summaryrefslogtreecommitdiff
path: root/svl
ModeNameSize
-rw-r--r--AllLangMoTarget_svl.mk401logplain
-rw-r--r--CppunitTest_svl_inetcontenttype.mk794logplain
-rw-r--r--CppunitTest_svl_itempool.mk857logplain
-rw-r--r--CppunitTest_svl_items.mk778logplain
-rw-r--r--CppunitTest_svl_lngmisc.mk878logplain
-rw-r--r--CppunitTest_svl_lockfiles.mk1233logplain
-rw-r--r--CppunitTest_svl_notify.mk852logplain
-rw-r--r--CppunitTest_svl_qa_cppunit.mk1767logplain
-rw-r--r--CppunitTest_svl_urihelper.mk1060logplain
-rw-r--r--JunitTest_svl_complex.mk1852logplain
-rw-r--r--Library_fsstorage.mk1605logplain
-rw-r--r--Library_passwordcontainer.mk1613logplain
-rw-r--r--Library_svl.mk5641logplain
-rw-r--r--Makefile225logplain
-rw-r--r--Module_svl.mk1597logplain
-rw-r--r--README2115logplain
d---------inc / pch30logplain
d---------qa65logplain
d---------source465logplain
d---------unx / source / svdde33logplain
d---------util41logplain
table summary='file diffstat' width='100%'> -rw-r--r--sw/inc/cellfml.hxx24
-rw-r--r--sw/inc/charatr.hxx132
-rw-r--r--sw/inc/charfmt.hxx4
-rw-r--r--sw/inc/chpfld.hxx20
-rw-r--r--sw/inc/crsrsh.hxx432
-rw-r--r--sw/inc/crsskip.hxx6
-rw-r--r--sw/inc/crstate.hxx102
-rw-r--r--sw/inc/cshtyp.hxx8
-rw-r--r--sw/inc/dbfld.hxx88
-rw-r--r--sw/inc/dbmgr.hxx106
-rw-r--r--sw/inc/dcontact.hxx8
-rw-r--r--sw/inc/ddefld.hxx24
-rw-r--r--sw/inc/doc.hxx244
-rw-r--r--sw/inc/docary.hxx26
-rw-r--r--sw/inc/docsh.hxx72
-rw-r--r--sw/inc/docstat.hxx18
-rw-r--r--sw/inc/docstyle.hxx64
-rw-r--r--sw/inc/docufld.hxx178
-rw-r--r--sw/inc/dpage.hxx6
-rw-r--r--sw/inc/edglbldc.hxx6
-rw-r--r--sw/inc/edimp.hxx18
-rw-r--r--sw/inc/editsh.hxx352
-rw-r--r--sw/inc/errhdl.hxx8
-rw-r--r--sw/inc/expfld.hxx144
-rw-r--r--sw/inc/extinput.hxx10
-rw-r--r--sw/inc/fchrfmt.hxx6
-rw-r--r--sw/inc/fesh.hxx334
-rw-r--r--sw/inc/fldbas.hxx76
-rw-r--r--sw/inc/flddat.hxx20
-rw-r--r--sw/inc/flddropdown.hxx10
-rw-r--r--sw/inc/flypos.hxx10
-rw-r--r--sw/inc/fmtanchr.hxx18
-rw-r--r--sw/inc/fmtautofmt.hxx6
-rw-r--r--sw/inc/fmtclbl.hxx6
-rw-r--r--sw/inc/fmtclds.hxx80
-rw-r--r--sw/inc/fmtcnct.hxx6
-rw-r--r--sw/inc/fmtcntnt.hxx4
-rw-r--r--sw/inc/fmtcol.hxx54
-rw-r--r--sw/inc/fmteiro.hxx8
-rw-r--r--sw/inc/fmtfld.hxx6
-rw-r--r--sw/inc/fmtfollowtextflow.hxx6
-rw-r--r--sw/inc/fmtfordr.hxx6
-rw-r--r--sw/inc/fmtfsize.hxx20
-rw-r--r--sw/inc/fmtftn.hxx8
-rw-r--r--sw/inc/fmtftntx.hxx26
-rw-r--r--sw/inc/fmthdft.hxx24
-rw-r--r--sw/inc/fmtinfmt.hxx24
-rw-r--r--sw/inc/fmtline.hxx18
-rw-r--r--sw/inc/fmtlsplt.hxx6
-rwxr-xr-xsw/inc/fmtmeta.hxx6
-rw-r--r--sw/inc/fmtornt.hxx30
-rw-r--r--sw/inc/fmtpdsc.hxx22
-rw-r--r--sw/inc/fmtrowsplt.hxx6
-rw-r--r--sw/inc/fmtruby.hxx26
-rw-r--r--sw/inc/fmtsrnd.hxx30
-rw-r--r--sw/inc/fmturl.hxx14
-rw-r--r--sw/inc/fmtwrapinfluenceonobjpos.hxx8
-rw-r--r--sw/inc/format.hxx298
-rw-r--r--sw/inc/frmatr.hxx52
-rw-r--r--sw/inc/frmfmt.hxx20
-rw-r--r--sw/inc/ftnidx.hxx6
-rw-r--r--sw/inc/ftninfo.hxx6
-rw-r--r--sw/inc/grfatr.hxx104
-rw-r--r--sw/inc/hfspacingitem.hxx8
-rw-r--r--sw/inc/hhcwrp.hxx8
-rw-r--r--sw/inc/hintids.hxx52
-rw-r--r--sw/inc/hints.hxx24
-rw-r--r--sw/inc/htmltbl.hxx330
-rw-r--r--sw/inc/index.hxx34
-rw-r--r--sw/inc/inetfld.hxx6
-rw-r--r--sw/inc/io.hxx4
-rw-r--r--sw/inc/iodetect.hxx16
-rw-r--r--sw/inc/itabenum.hxx20
-rw-r--r--sw/inc/lineinfo.hxx44
-rw-r--r--sw/inc/list.hxx2
-rw-r--r--sw/inc/mdiexp.hxx16
-rw-r--r--sw/inc/modcfg.hxx106
-rw-r--r--sw/inc/ndarr.hxx76
-rw-r--r--sw/inc/ndgrf.hxx68
-rw-r--r--sw/inc/ndhints.hxx34
-rw-r--r--sw/inc/ndindex.hxx110
-rw-r--r--sw/inc/ndnotxt.hxx30
-rw-r--r--sw/inc/ndole.hxx20
-rw-r--r--sw/inc/ndtxt.hxx122
-rw-r--r--sw/inc/ndtyp.hxx24
-rw-r--r--sw/inc/newhdl.hxx6
-rw-r--r--sw/inc/node.hxx168
-rw-r--r--sw/inc/numrule.hxx92
-rw-r--r--sw/inc/pagedesc.hxx84
-rw-r--r--sw/inc/pageiter.hxx8
-rw-r--r--sw/inc/pam.hxx56
-rw-r--r--sw/inc/paratr.hxx110
-rw-r--r--sw/inc/poolfmt.hxx42
-rw-r--r--sw/inc/postithelper.hxx2
-rw-r--r--sw/inc/pvprtdat.hxx44
-rw-r--r--sw/inc/redline.hxx78
-rw-r--r--sw/inc/redlnaut.hxx2
-rw-r--r--sw/inc/reffld.hxx22
-rw-r--r--sw/inc/rolbck.hxx106
-rw-r--r--sw/inc/section.hxx14
-rw-r--r--sw/inc/shellio.hxx258
-rw-r--r--sw/inc/shellres.hxx4
-rw-r--r--sw/inc/sortopt.hxx12
-rw-r--r--sw/inc/swabstdlg.hxx102
-rw-r--r--sw/inc/swacorr.hxx4
-rw-r--r--sw/inc/swatrset.hxx244
-rw-r--r--sw/inc/swbaslnk.hxx30
-rw-r--r--sw/inc/swcalwrp.hxx4
-rw-r--r--sw/inc/swcli.hxx8
-rw-r--r--sw/inc/swcrsr.hxx176
-rw-r--r--sw/inc/swdbdata.hxx4
-rw-r--r--sw/inc/swddetbl.hxx4
-rw-r--r--sw/inc/swerror.h4
-rw-r--r--sw/inc/swevent.hxx2
-rw-r--r--sw/inc/swgstr.hxx40
-rw-r--r--sw/inc/swmodule.hxx6
-rw-r--r--sw/inc/swrect.hxx34
-rw-r--r--sw/inc/swregion.hxx8
-rw-r--r--sw/inc/swserv.hxx8
-rw-r--r--sw/inc/swtable.hxx150
-rw-r--r--sw/inc/swtypes.hxx20
-rw-r--r--sw/inc/swunohelper.hxx16
-rw-r--r--sw/inc/swurl.hxx2
-rw-r--r--sw/inc/swwait.hxx4
-rw-r--r--sw/inc/tabcol.hxx28
-rw-r--r--sw/inc/tblafmt.hxx66
-rw-r--r--sw/inc/tblenum.hxx2
-rw-r--r--sw/inc/tblsel.hxx30
-rw-r--r--sw/inc/tgrditem.hxx50
-rw-r--r--sw/inc/tox.hxx186
-rw-r--r--sw/inc/toxwrap.hxx2
-rw-r--r--sw/inc/txatbase.hxx4
-rw-r--r--sw/inc/txatritr.hxx4
-rw-r--r--sw/inc/txtatr.hxx10
-rw-r--r--sw/inc/txtftn.hxx12
-rw-r--r--sw/inc/txtinet.hxx4
-rw-r--r--sw/inc/undobj.hxx466
-rw-r--r--sw/inc/unoatxt.hxx16
-rw-r--r--sw/inc/unochart.hxx2
-rw-r--r--sw/inc/unocoll.hxx18
-rw-r--r--sw/inc/unocrsr.hxx24
-rw-r--r--sw/inc/unocrsrhelper.hxx4
-rw-r--r--sw/inc/unodraw.hxx4
-rw-r--r--sw/inc/unoevtlstnr.hxx2
-rw-r--r--sw/inc/unofield.hxx12
-rw-r--r--sw/inc/unoflatpara.hxx6
-rw-r--r--sw/inc/unoframe.hxx8
-rw-r--r--sw/inc/unomailmerge.hxx6
-rw-r--r--sw/inc/unoprnms.hxx6
-rw-r--r--sw/inc/unoredline.hxx2
-rw-r--r--sw/inc/unoredlines.hxx8
-rw-r--r--sw/inc/unosett.hxx12
-rw-r--r--sw/inc/unosrch.hxx2
-rw-r--r--sw/inc/unostyle.hxx8
-rw-r--r--sw/inc/unotbl.hxx16
-rw-r--r--sw/inc/unotextrange.hxx2
-rw-r--r--sw/inc/unotxdoc.hxx8
-rw-r--r--sw/inc/usrfld.hxx44
-rw-r--r--[-rwxr-xr-x]sw/inc/viewopt.hxx430
-rw-r--r--sw/inc/viewsh.hxx6
-rw-r--r--sw/inc/viscrs.hxx28
-rw-r--r--sw/inc/wdocsh.hxx6
-rw-r--r--sw/qa/core/Test-BigPtrArray.cxx22
-rw-r--r--sw/qa/core/bigpointerarray-new.cxx14
-rw-r--r--sw/qa/core/bigpointerarray-new.hxx20
-rw-r--r--sw/source/core/SwNumberTree/SwNodeNum.cxx2
-rw-r--r--sw/source/core/access/accdoc.cxx2
-rw-r--r--sw/source/core/access/accmap.cxx2
-rw-r--r--sw/source/core/access/accpara.cxx50
-rw-r--r--sw/source/core/access/accpara.hxx2
-rw-r--r--sw/source/core/access/accportions.cxx48
-rw-r--r--sw/source/core/access/accportions.hxx24
-rw-r--r--sw/source/core/access/acctable.cxx2
-rw-r--r--sw/source/core/access/parachangetrackinginfo.cxx2
-rw-r--r--sw/source/core/access/textmarkuphelper.cxx10
-rw-r--r--sw/source/core/attr/calbck.cxx40
-rw-r--r--sw/source/core/attr/cellatr.cxx12
-rw-r--r--sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx4
-rw-r--r--sw/source/core/attr/format.cxx98
-rw-r--r--sw/source/core/attr/hints.cxx40
-rw-r--r--sw/source/core/attr/swatrset.cxx38
-rw-r--r--sw/source/core/bastyp/bparr.cxx92
-rw-r--r--sw/source/core/bastyp/breakit.cxx12
-rw-r--r--sw/source/core/bastyp/calc.cxx140
-rw-r--r--sw/source/core/bastyp/index.cxx10
-rw-r--r--sw/source/core/bastyp/init.cxx86
-rw-r--r--sw/source/core/bastyp/swcache.cxx46
-rw-r--r--sw/source/core/bastyp/swrect.cxx18
-rw-r--r--sw/source/core/bastyp/swregion.cxx32
-rw-r--r--sw/source/core/bastyp/tabcol.cxx20
-rw-r--r--sw/source/core/crsr/callnk.cxx14
-rw-r--r--sw/source/core/crsr/callnk.hxx10
-rw-r--r--sw/source/core/crsr/crsrsh.cxx494
-rw-r--r--sw/source/core/crsr/crstrvl.cxx306
-rw-r--r--sw/source/core/crsr/crstrvl1.cxx30
-rw-r--r--sw/source/core/crsr/findattr.cxx234
-rw-r--r--sw/source/core/crsr/findcoll.cxx14
-rw-r--r--sw/source/core/crsr/findfmt.cxx14
-rw-r--r--sw/source/core/crsr/findtxt.cxx68
-rw-r--r--sw/source/core/crsr/pam.cxx224
-rw-r--r--sw/source/core/crsr/paminit.cxx14
-rw-r--r--sw/source/core/crsr/swcrsr.cxx446
-rw-r--r--sw/source/core/crsr/trvlcol.cxx8
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx60
-rw-r--r--sw/source/core/crsr/trvlreg.cxx74
-rw-r--r--sw/source/core/crsr/trvltbl.cxx122
-rw-r--r--sw/source/core/crsr/unocrsr.cxx32
-rw-r--r--sw/source/core/crsr/viscrs.cxx86
-rw-r--r--sw/source/core/doc/SwStyleNameMapper.cxx8
-rw-r--r--sw/source/core/doc/acmplwrd.cxx58
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx40
-rw-r--r--sw/source/core/doc/doc.cxx236
-rw-r--r--sw/source/core/doc/docbasic.cxx22
-rw-r--r--sw/source/core/doc/docbm.cxx104
-rw-r--r--sw/source/core/doc/docchart.cxx12
-rw-r--r--sw/source/core/doc/doccomp.cxx328
-rw-r--r--sw/source/core/doc/doccorr.cxx24
-rw-r--r--sw/source/core/doc/docdde.cxx42
-rw-r--r--sw/source/core/doc/docdesc.cxx126
-rw-r--r--sw/source/core/doc/docdraw.cxx44
-rw-r--r--sw/source/core/doc/docedt.cxx46
-rw-r--r--sw/source/core/doc/docfld.cxx302
-rw-r--r--sw/source/core/doc/docfly.cxx100
-rw-r--r--sw/source/core/doc/docfmt.cxx280
-rw-r--r--sw/source/core/doc/docftn.cxx52
-rw-r--r--sw/source/core/doc/docglbl.cxx66
-rw-r--r--sw/source/core/doc/docglos.cxx12
-rw-r--r--sw/source/core/doc/doclay.cxx34
-rw-r--r--sw/source/core/doc/docnew.cxx58
-rw-r--r--sw/source/core/doc/docnum.cxx386
-rw-r--r--sw/source/core/doc/docredln.cxx466
-rw-r--r--sw/source/core/doc/docruby.cxx38
-rw-r--r--sw/source/core/doc/docsort.cxx162
-rw-r--r--sw/source/core/doc/docstat.cxx4
-rw-r--r--sw/source/core/doc/doctxm.cxx248
-rw-r--r--sw/source/core/doc/extinput.cxx14
-rw-r--r--sw/source/core/doc/fmtcol.cxx94
-rw-r--r--sw/source/core/doc/ftnidx.cxx68
-rw-r--r--sw/source/core/doc/gctable.cxx128
-rw-r--r--sw/source/core/doc/htmltbl.cxx486
-rw-r--r--sw/source/core/doc/lineinfo.cxx10
-rw-r--r--sw/source/core/doc/list.cxx8
-rw-r--r--sw/source/core/doc/notxtfrm.cxx100
-rw-r--r--sw/source/core/doc/number.cxx164
-rw-r--r--sw/source/core/doc/poolfmt.cxx396
-rw-r--r--sw/source/core/doc/sortopt.cxx10
-rw-r--r--sw/source/core/doc/swserv.cxx38
-rw-r--r--sw/source/core/doc/tblafmt.cxx224
-rw-r--r--sw/source/core/doc/tblcpy.cxx208
-rw-r--r--sw/source/core/doc/tblrwcl.cxx992
-rw-r--r--sw/source/core/doc/visiturl.cxx12
-rw-r--r--sw/source/core/docnode/ndcopy.cxx156
-rw-r--r--sw/source/core/docnode/ndindex.cxx6
-rw-r--r--sw/source/core/docnode/ndnotxt.cxx64
-rw-r--r--sw/source/core/docnode/ndnum.cxx28
-rw-r--r--sw/source/core/docnode/ndsect.cxx150
-rw-r--r--sw/source/core/docnode/ndtbl.cxx746
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx302
-rw-r--r--sw/source/core/docnode/node.cxx258
-rw-r--r--sw/source/core/docnode/node2lay.cxx54
-rw-r--r--sw/source/core/docnode/nodes.cxx276
-rw-r--r--sw/source/core/docnode/section.cxx152
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx86
-rw-r--r--sw/source/core/draw/dcontact.cxx58
-rw-r--r--sw/source/core/draw/dflyobj.cxx46
-rw-r--r--sw/source/core/draw/dpage.cxx12
-rw-r--r--sw/source/core/draw/drawdoc.cxx16
-rw-r--r--sw/source/core/draw/dview.cxx86
-rw-r--r--sw/source/core/edit/acorrect.cxx66
-rw-r--r--sw/source/core/edit/autofmt.cxx448
-rw-r--r--sw/source/core/edit/edatmisc.cxx12
-rw-r--r--sw/source/core/edit/edattr.cxx112
-rw-r--r--sw/source/core/edit/eddel.cxx34
-rw-r--r--sw/source/core/edit/edfcol.cxx16
-rw-r--r--sw/source/core/edit/edfld.cxx88
-rw-r--r--sw/source/core/edit/edfldexp.cxx16
-rw-r--r--sw/source/core/edit/edfmt.cxx22
-rw-r--r--sw/source/core/edit/edglbldc.cxx70
-rw-r--r--sw/source/core/edit/edglss.cxx52
-rw-r--r--sw/source/core/edit/editsh.cxx120
-rw-r--r--sw/source/core/edit/edlingu.cxx50
-rw-r--r--sw/source/core/edit/ednumber.cxx144
-rw-r--r--sw/source/core/edit/edredln.cxx26
-rw-r--r--sw/source/core/edit/edsect.cxx32
-rw-r--r--sw/source/core/edit/edtab.cxx82
-rw-r--r--sw/source/core/edit/edtox.cxx76
-rw-r--r--sw/source/core/edit/edundo.cxx44
-rw-r--r--sw/source/core/except/dbgloop.cxx10
-rw-r--r--sw/source/core/except/errhdl.cxx22
-rw-r--r--sw/source/core/fields/authfld.cxx96
-rw-r--r--sw/source/core/fields/cellfml.cxx92
-rw-r--r--sw/source/core/fields/chpfld.cxx18
-rw-r--r--sw/source/core/fields/dbfld.cxx112
-rw-r--r--sw/source/core/fields/ddefld.cxx40
-rw-r--r--sw/source/core/fields/ddetbl.cxx18
-rw-r--r--sw/source/core/fields/docufld.cxx84
-rw-r--r--sw/source/core/fields/expfld.cxx138
-rw-r--r--sw/source/core/fields/fldbas.cxx88
-rw-r--r--sw/source/core/fields/flddat.cxx24
-rw-r--r--sw/source/core/fields/flddropdown.cxx8
-rw-r--r--sw/source/core/fields/fldlst.cxx28
-rw-r--r--sw/source/core/fields/macrofld.cxx24
-rw-r--r--sw/source/core/fields/reffld.cxx86
-rw-r--r--sw/source/core/fields/scrptfld.cxx10
-rw-r--r--sw/source/core/fields/tblcalc.cxx18
-rw-r--r--sw/source/core/fields/usrfld.cxx14
-rw-r--r--sw/source/core/frmedt/fecopy.cxx176
-rw-r--r--sw/source/core/frmedt/fedesc.cxx34
-rw-r--r--sw/source/core/frmedt/fefly1.cxx30
-rw-r--r--sw/source/core/frmedt/feflyole.cxx12
-rw-r--r--sw/source/core/frmedt/feshview.cxx286
-rw-r--r--sw/source/core/frmedt/fetab.cxx312
-rw-r--r--sw/source/core/frmedt/fews.cxx108
-rw-r--r--sw/source/core/frmedt/tblsel.cxx372
-rw-r--r--sw/source/core/graphic/grfatr.cxx74
-rw-r--r--sw/source/core/graphic/ndgrf.cxx112
-rw-r--r--sw/source/core/inc/GetMetricVal.hxx6
-rw-r--r--sw/source/core/inc/SwPortionHandler.hxx10
-rw-r--r--sw/source/core/inc/SwXMLTextBlocks.hxx58
-rw-r--r--sw/source/core/inc/acorrect.hxx34
-rw-r--r--sw/source/core/inc/anchoredobjectposition.hxx2
-rw-r--r--sw/source/core/inc/blink.hxx16
-rw-r--r--sw/source/core/inc/cellfrm.hxx4
-rw-r--r--sw/source/core/inc/cntfrm.hxx44
-rw-r--r--sw/source/core/inc/dbg_lay.hxx20
-rw-r--r--sw/source/core/inc/dbgloop.hxx4
-rw-r--r--sw/source/core/inc/dflyobj.hxx16
-rw-r--r--sw/source/core/inc/docfld.hxx32
-rw-r--r--sw/source/core/inc/docsort.hxx60
-rw-r--r--sw/source/core/inc/doctxm.hxx10
-rw-r--r--sw/source/core/inc/drawdev.hxx28
-rw-r--r--sw/source/core/inc/drawfont.hxx154
-rw-r--r--sw/source/core/inc/dview.hxx8
-rw-r--r--sw/source/core/inc/flowfrm.hxx94
-rw-r--r--sw/source/core/inc/flyfrm.hxx114
-rw-r--r--sw/source/core/inc/flyfrms.hxx18
-rw-r--r--sw/source/core/inc/fntcache.hxx46
-rw-r--r--sw/source/core/inc/frame.hxx376
-rw-r--r--sw/source/core/inc/frminf.hxx12
-rw-r--r--sw/source/core/inc/frmtool.hxx152
-rw-r--r--sw/source/core/inc/ftnboss.hxx12
-rw-r--r--sw/source/core/inc/ftnfrm.hxx22
-rw-r--r--sw/source/core/inc/hffrm.hxx8
-rw-r--r--sw/source/core/inc/layact.hxx148
-rw-r--r--sw/source/core/inc/laycache.hxx4
-rw-r--r--sw/source/core/inc/layfrm.hxx32
-rw-r--r--sw/source/core/inc/layouter.hxx10
-rw-r--r--sw/source/core/inc/mvsave.hxx32
-rw-r--r--sw/source/core/inc/node2lay.hxx6
-rw-r--r--sw/source/core/inc/noteurl.hxx6
-rw-r--r--sw/source/core/inc/notxtfrm.hxx12
-rw-r--r--sw/source/core/inc/pagefrm.hxx122
-rw-r--r--sw/source/core/inc/pamtyp.hxx50
-rw-r--r--sw/source/core/inc/rootfrm.hxx106
-rw-r--r--sw/source/core/inc/rowfrm.hxx24
-rw-r--r--sw/source/core/inc/scriptinfo.hxx48
-rw-r--r--sw/source/core/inc/sectfrm.hxx60
-rw-r--r--sw/source/core/inc/swblocks.hxx136
-rw-r--r--sw/source/core/inc/swcache.hxx68
-rw-r--r--sw/source/core/inc/swfont.hxx354
-rw-r--r--sw/source/core/inc/tabfrm.hxx82
-rw-r--r--sw/source/core/inc/tblrwcl.hxx92
-rw-r--r--sw/source/core/inc/toxhlp.hxx2
-rw-r--r--sw/source/core/inc/txmsrt.hxx88
-rw-r--r--sw/source/core/inc/txtfrm.hxx48
-rw-r--r--sw/source/core/inc/txttypes.hxx4
-rwxr-xr-xsw/source/core/inc/unometa.hxx2
-rw-r--r--sw/source/core/inc/viewimp.hxx44
-rw-r--r--sw/source/core/inc/wrong.hxx28
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx2
-rw-r--r--sw/source/core/layout/atrfrm.cxx118
-rw-r--r--sw/source/core/layout/calcmove.cxx276
-rw-r--r--sw/source/core/layout/colfrm.cxx74
-rw-r--r--sw/source/core/layout/dbg_lay.cxx126
-rw-r--r--sw/source/core/layout/findfrm.cxx82
-rw-r--r--sw/source/core/layout/flowfrm.cxx326
-rw-r--r--sw/source/core/layout/fly.cxx182
-rw-r--r--sw/source/core/layout/flycnt.cxx104
-rw-r--r--sw/source/core/layout/flyincnt.cxx30
-rw-r--r--sw/source/core/layout/flylay.cxx82
-rw-r--r--sw/source/core/layout/flypos.cxx14
-rw-r--r--sw/source/core/layout/frmtool.cxx278
-rw-r--r--sw/source/core/layout/ftnfrm.cxx284
-rw-r--r--sw/source/core/layout/hffrm.cxx38
-rw-r--r--sw/source/core/layout/layact.cxx374
-rw-r--r--sw/source/core/layout/laycache.cxx226
-rw-r--r--sw/source/core/layout/layhelp.hxx76
-rw-r--r--sw/source/core/layout/layouter.cxx36
-rw-r--r--sw/source/core/layout/newfrm.cxx34
-rw-r--r--sw/source/core/layout/objectformatter.cxx4
-rw-r--r--sw/source/core/layout/pagechg.cxx202
-rw-r--r--sw/source/core/layout/pagedesc.cxx24
-rw-r--r--sw/source/core/layout/paintfrm.cxx386
-rw-r--r--sw/source/core/layout/sectfrm.cxx332
-rw-r--r--sw/source/core/layout/softpagebreak.cxx4
-rw-r--r--sw/source/core/layout/ssfrm.cxx76
-rw-r--r--sw/source/core/layout/tabfrm.cxx484
-rw-r--r--sw/source/core/layout/trvlfrm.cxx304
-rw-r--r--sw/source/core/layout/unusedf.cxx26
-rw-r--r--sw/source/core/layout/virtoutp.cxx24
-rw-r--r--sw/source/core/layout/virtoutp.hxx8
-rw-r--r--sw/source/core/layout/wsfrm.cxx256
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx14
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx14
-rw-r--r--sw/source/core/ole/ndole.cxx72
-rw-r--r--sw/source/core/para/paratr.cxx12
-rw-r--r--sw/source/core/sw3io/sw3convert.cxx30
-rw-r--r--sw/source/core/sw3io/swacorr.cxx12
-rw-r--r--sw/source/core/swg/SwXMLBlockListContext.cxx4
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks.cxx124
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks1.cxx34
-rw-r--r--sw/source/core/swg/swblocks.cxx200
-rw-r--r--sw/source/core/table/swnewtable.cxx372
-rw-r--r--sw/source/core/table/swtable.cxx398
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx52
-rw-r--r--sw/source/core/text/atrhndl.hxx24
-rw-r--r--sw/source/core/text/atrstck.cxx64
-rw-r--r--sw/source/core/text/blink.cxx2
-rw-r--r--sw/source/core/text/frmcrsr.cxx22
-rw-r--r--sw/source/core/text/frmform.cxx8
-rw-r--r--sw/source/core/text/frmpaint.cxx2
-rw-r--r--sw/source/core/text/guess.cxx18
-rw-r--r--sw/source/core/text/inftxt.cxx104
-rw-r--r--sw/source/core/text/inftxt.hxx42
-rw-r--r--sw/source/core/text/itradj.cxx28
-rw-r--r--sw/source/core/text/itratr.cxx38
-rw-r--r--sw/source/core/text/itratr.hxx6
-rw-r--r--sw/source/core/text/itrcrsr.cxx48
-rw-r--r--sw/source/core/text/itrform2.cxx58
-rw-r--r--sw/source/core/text/itrform2.hxx4
-rw-r--r--sw/source/core/text/itrpaint.cxx22
-rw-r--r--sw/source/core/text/itrtxt.cxx16
-rw-r--r--sw/source/core/text/itrtxt.hxx4
-rw-r--r--sw/source/core/text/pordrop.hxx6
-rw-r--r--sw/source/core/text/porexp.hxx8
-rw-r--r--sw/source/core/text/porfld.cxx62
-rw-r--r--sw/source/core/text/porfld.hxx12
-rw-r--r--sw/source/core/text/porfly.cxx12
-rw-r--r--sw/source/core/text/porftn.hxx4
-rw-r--r--sw/source/core/text/porglue.cxx2
-rw-r--r--sw/source/core/text/porlay.cxx164
-rw-r--r--sw/source/core/text/porlay.hxx6
-rw-r--r--sw/source/core/text/porlin.cxx16
-rw-r--r--sw/source/core/text/pormulti.cxx78
-rw-r--r--sw/source/core/text/pormulti.hxx24
-rw-r--r--sw/source/core/text/porrst.cxx4
-rw-r--r--sw/source/core/text/porrst.hxx4
-rw-r--r--sw/source/core/text/portab.hxx6
-rw-r--r--sw/source/core/text/portxt.cxx18
-rw-r--r--sw/source/core/text/redlnitr.cxx6
-rw-r--r--sw/source/core/text/redlnitr.hxx2
-rw-r--r--sw/source/core/text/txtdrop.cxx30
-rw-r--r--sw/source/core/text/txtfld.cxx4
-rw-r--r--sw/source/core/text/txtfly.cxx24
-rw-r--r--sw/source/core/text/txtfly.hxx2
-rw-r--r--sw/source/core/text/txtfrm.cxx36
-rw-r--r--sw/source/core/text/txtftn.cxx26
-rw-r--r--sw/source/core/text/txthyph.cxx2
-rw-r--r--sw/source/core/text/txttab.cxx12
-rw-r--r--sw/source/core/text/widorp.cxx2
-rw-r--r--sw/source/core/text/wrong.cxx14
-rw-r--r--sw/source/core/tox/tox.cxx130
-rw-r--r--sw/source/core/tox/toxhlp.cxx2
-rw-r--r--sw/source/core/tox/txmsrt.cxx106
-rw-r--r--sw/source/core/txtnode/atrfld.cxx16
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx10
-rw-r--r--sw/source/core/txtnode/atrftn.cxx40
-rw-r--r--sw/source/core/txtnode/atrtox.cxx4
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx74
-rw-r--r--sw/source/core/txtnode/fntcache.cxx198
-rw-r--r--sw/source/core/txtnode/fntcap.cxx60
-rw-r--r--sw/source/core/txtnode/ndhints.cxx60
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx398
-rw-r--r--sw/source/core/txtnode/swfntcch.cxx8
-rw-r--r--sw/source/core/txtnode/swfont.cxx166
-rw-r--r--sw/source/core/txtnode/thints.cxx228
-rw-r--r--sw/source/core/txtnode/txatritr.cxx14
-rw-r--r--sw/source/core/txtnode/txtatr2.cxx38
-rw-r--r--sw/source/core/txtnode/txtedt.cxx166
-rw-r--r--sw/source/core/undo/SwUndoField.cxx12
-rw-r--r--sw/source/core/undo/SwUndoFmt.cxx90
-rw-r--r--sw/source/core/undo/SwUndoPageDesc.cxx56
-rw-r--r--sw/source/core/undo/docundo.cxx112
-rw-r--r--sw/source/core/undo/rolbck.cxx126
-rw-r--r--sw/source/core/undo/unattr.cxx60
-rw-r--r--sw/source/core/undo/undel.cxx130
-rw-r--r--sw/source/core/undo/undobj.cxx136
-rw-r--r--sw/source/core/undo/undobj1.cxx38
-rw-r--r--sw/source/core/undo/undraw.cxx56
-rw-r--r--sw/source/core/undo/unfmco.cxx2
-rw-r--r--sw/source/core/undo/unins.cxx84
-rw-r--r--sw/source/core/undo/unmove.cxx26
-rw-r--r--sw/source/core/undo/unnum.cxx48
-rw-r--r--sw/source/core/undo/unovwr.cxx60
-rw-r--r--sw/source/core/undo/unredln.cxx62
-rw-r--r--sw/source/core/undo/unsect.cxx12
-rw-r--r--sw/source/core/undo/unsort.cxx30
-rw-r--r--sw/source/core/undo/unspnd.cxx12
-rw-r--r--sw/source/core/undo/untbl.cxx358
-rw-r--r--sw/source/core/undo/untblk.cxx34
-rw-r--r--sw/source/core/unocore/swunohelper.cxx52
-rw-r--r--sw/source/core/unocore/unochart.cxx12
-rw-r--r--sw/source/core/unocore/unocoll.cxx22
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx24
-rw-r--r--sw/source/core/unocore/unodraw.cxx16
-rw-r--r--sw/source/core/unocore/unoevent.cxx4
-rw-r--r--sw/source/core/unocore/unofield.cxx62
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx18
-rw-r--r--sw/source/core/unocore/unoframe.cxx40
-rw-r--r--sw/source/core/unocore/unoidx.cxx12
-rw-r--r--sw/source/core/unocore/unomap.cxx2
-rw-r--r--sw/source/core/unocore/unoobj.cxx56
-rw-r--r--sw/source/core/unocore/unoobj2.cxx34
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx12
-rw-r--r--sw/source/core/unocore/unoport.cxx8
-rw-r--r--sw/source/core/unocore/unoportenum.cxx54
-rw-r--r--sw/source/core/unocore/unoprnms.cxx4
-rw-r--r--sw/source/core/unocore/unoredline.cxx10
-rw-r--r--sw/source/core/unocore/unoredlines.cxx12
-rw-r--r--sw/source/core/unocore/unorefmk.cxx2
-rw-r--r--sw/source/core/unocore/unosect.cxx10
-rw-r--r--sw/source/core/unocore/unosett.cxx70
-rw-r--r--sw/source/core/unocore/unosrch.cxx4
-rw-r--r--sw/source/core/unocore/unostyle.cxx54
-rw-r--r--sw/source/core/unocore/unotbl.cxx114
-rw-r--r--sw/source/core/unocore/unotext.cxx20
-rw-r--r--sw/source/core/unocore/unotextmarkup.cxx12
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx6
-rw-r--r--sw/source/core/view/printdata.cxx4
-rw-r--r--sw/source/core/view/vdraw.cxx26
-rw-r--r--sw/source/core/view/viewimp.cxx28
-rw-r--r--sw/source/core/view/viewpg.cxx2
-rw-r--r--sw/source/core/view/viewsh.cxx276
-rw-r--r--sw/source/core/view/vnew.cxx18
-rw-r--r--sw/source/core/view/vprint.cxx54
-rw-r--r--sw/source/filter/ascii/ascatr.cxx14
-rw-r--r--sw/source/filter/ascii/parasc.cxx24
-rw-r--r--sw/source/filter/ascii/wrtasc.cxx20
-rw-r--r--sw/source/filter/ascii/wrtasc.hxx2
-rw-r--r--sw/source/filter/basflt/fltini.cxx2074
-rw-r--r--sw/source/filter/basflt/iodetect.cxx82
-rw-r--r--sw/source/filter/basflt/shellio.cxx134
-rw-r--r--sw/source/filter/html/SwAppletImpl.cxx10
-rw-r--r--sw/source/filter/html/css1atr.cxx330
-rw-r--r--sw/source/filter/html/htmlatr.cxx464
-rw-r--r--sw/source/filter/html/htmlbas.cxx24
-rw-r--r--sw/source/filter/html/htmlcss1.cxx416
-rw-r--r--sw/source/filter/html/htmlctxt.cxx108
-rw-r--r--sw/source/filter/html/htmlfld.cxx88
-rw-r--r--sw/source/filter/html/htmlfldw.cxx54
-rw-r--r--sw/source/filter/html/htmlfly.cxx254
-rw-r--r--sw/source/filter/html/htmlfly.hxx38
-rw-r--r--sw/source/filter/html/htmlflyt.cxx12
-rw-r--r--sw/source/filter/html/htmlform.cxx12
-rw-r--r--sw/source/filter/html/htmlforw.cxx2
-rw-r--r--sw/source/filter/html/htmlftn.cxx70
-rw-r--r--sw/source/filter/html/htmlgrin.cxx186
-rw-r--r--sw/source/filter/html/htmlnum.cxx12
-rw-r--r--sw/source/filter/html/htmlplug.cxx124
-rw-r--r--sw/source/filter/html/htmlsect.cxx4
-rw-r--r--sw/source/filter/html/htmltab.cxx10
-rw-r--r--sw/source/filter/html/htmltabw.cxx6
-rw-r--r--sw/source/filter/html/parcss1.cxx154
-rw-r--r--sw/source/filter/html/svxcss1.cxx642
-rw-r--r--sw/source/filter/html/swcss1.hxx94
-rw-r--r--sw/source/filter/html/swhtml.cxx580
-rw-r--r--sw/source/filter/html/swhtml.hxx4
-rw-r--r--sw/source/filter/html/wrthtml.cxx16
-rw-r--r--sw/source/filter/html/wrthtml.hxx6
-rw-r--r--sw/source/filter/inc/fltbase.hxx26
-rw-r--r--sw/source/filter/inc/fltglbls.hxx46
-rw-r--r--sw/source/filter/inc/fltini.hxx12
-rw-r--r--sw/source/filter/inc/fltshell.hxx240
-rw-r--r--sw/source/filter/inc/msfilter.hxx12
-rw-r--r--sw/source/filter/inc/rtf.hxx70
-rw-r--r--sw/source/filter/inc/wrt_fn.hxx2
-rw-r--r--sw/source/filter/inc/wrtswtbl.hxx142
-rw-r--r--sw/source/filter/rtf/rtffld.cxx58
-rw-r--r--sw/source/filter/rtf/rtffly.cxx182
-rw-r--r--sw/source/filter/rtf/rtfnum.cxx118
-rw-r--r--sw/source/filter/rtf/rtftbl.cxx96
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx424
-rw-r--r--sw/source/filter/rtf/swparrtf.hxx56
-rw-r--r--sw/source/filter/writer/writer.cxx78
-rw-r--r--sw/source/filter/writer/wrt_fn.cxx10
-rw-r--r--sw/source/filter/writer/wrtswtbl.cxx194
-rw-r--r--sw/source/filter/ww1/fltshell.cxx376
-rw-r--r--sw/source/filter/ww1/w1class.cxx354
-rw-r--r--sw/source/filter/ww1/w1class.hxx646
-rw-r--r--sw/source/filter/ww1/w1filter.cxx212
-rw-r--r--sw/source/filter/ww1/w1par.cxx16
-rw-r--r--sw/source/filter/ww1/w1par.hxx2
-rw-r--r--sw/source/filter/ww1/w1sprm.cxx144
-rw-r--r--sw/source/filter/ww1/w1struct.hxx524
-rw-r--r--sw/source/filter/ww8/WW8FFData.cxx2
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.cxx2
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.hxx6
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx6
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx46
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx108
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx42
-rw-r--r--sw/source/filter/ww8/docxexport.cxx14
-rw-r--r--sw/source/filter/ww8/docxexport.hxx10
-rw-r--r--sw/source/filter/ww8/dump/dump8.cxx6
-rw-r--r--sw/source/filter/ww8/dump/dump8a.cxx382
-rw-r--r--sw/source/filter/ww8/dump/msvbasic.cxx64
-rw-r--r--sw/source/filter/ww8/dump/msvbasic.hxx22
-rw-r--r--sw/source/filter/ww8/dump/ww8darr.cxx6
-rw-r--r--sw/source/filter/ww8/dump/ww8darr.hxx4
-rw-r--r--sw/source/filter/ww8/dump/ww8dout.cxx50
-rw-r--r--sw/source/filter/ww8/dump/ww8dout.hxx2
-rw-r--r--sw/source/filter/ww8/dump/ww8scan.cxx598
-rw-r--r--sw/source/filter/ww8/dump/ww8scan.hxx892
-rw-r--r--sw/source/filter/ww8/dump/ww8struc.hxx290
-rw-r--r--sw/source/filter/ww8/escher.hxx32
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx104
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx44
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx92
-rw-r--r--sw/source/filter/ww8/rtfexport.hxx36
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.hxx2
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx12
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.hxx8
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx46
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx8
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx16
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx190
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx130
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx134
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx270
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx374
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx348
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx78
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx378
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx50
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx18
-rw-r--r--sw/source/filter/ww8/ww8glsy.hxx10
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx290
-rw-r--r--sw/source/filter/ww8/ww8graf.hxx26
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx72
-rw-r--r--sw/source/filter/ww8/ww8par.cxx324
-rw-r--r--sw/source/filter/ww8/ww8par.hxx398
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx334
-rw-r--r--sw/source/filter/ww8/ww8par2.hxx68
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx74
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx50
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx142
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx478
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx636
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx940
-rw-r--r--sw/source/filter/ww8/ww8struc.hxx300
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx6
-rw-r--r--sw/source/filter/xml/swxml.cxx28
-rw-r--r--sw/source/filter/xml/wrtxml.cxx6
-rw-r--r--sw/source/filter/xml/wrtxml.hxx6
-rw-r--r--sw/source/filter/xml/xmlexp.hxx2
-rw-r--r--sw/source/filter/xml/xmlimp.cxx8
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx30
-rw-r--r--sw/source/filter/xml/xmlimpit.hxx8
-rw-r--r--sw/source/filter/xml/xmlitem.cxx6
-rw-r--r--sw/source/filter/xml/xmlitem.hxx6
-rw-r--r--sw/source/filter/xml/xmlitemi.cxx2
-rw-r--r--sw/source/filter/xml/xmlitmpr.cxx4
-rw-r--r--sw/source/filter/xml/xmlmeta.cxx4
-rw-r--r--sw/source/filter/xml/xmltble.cxx4
-rw-r--r--sw/source/filter/xml/xmltbli.cxx8
-rw-r--r--sw/source/filter/xml/xmltbli.hxx2
-rw-r--r--sw/source/filter/xml/xmltexte.cxx6
-rw-r--r--sw/source/ui/app/appenv.cxx76
-rw-r--r--sw/source/ui/app/apphdl.cxx16
-rw-r--r--sw/source/ui/app/appopt.cxx86
-rw-r--r--sw/source/ui/app/docsh.cxx162
-rw-r--r--sw/source/ui/app/docsh2.cxx240
-rw-r--r--sw/source/ui/app/docshini.cxx44
-rw-r--r--sw/source/ui/app/docst.cxx136
-rw-r--r--sw/source/ui/app/docstyle.cxx414
-rw-r--r--sw/source/ui/app/mainwn.cxx12
-rw-r--r--sw/source/ui/app/swmodul1.cxx12
-rw-r--r--sw/source/ui/app/swmodule.cxx2
-rw-r--r--sw/source/ui/app/swwait.cxx18
-rw-r--r--sw/source/ui/cctrl/actctrl.cxx12
-rw-r--r--sw/source/ui/cctrl/popbox.cxx4
-rw-r--r--sw/source/ui/cctrl/swlbox.cxx30
-rw-r--r--sw/source/ui/chrdlg/break.cxx38
-rw-r--r--sw/source/ui/chrdlg/ccoll.cxx12
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx32
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx124
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx60
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx26
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx46
-rw-r--r--sw/source/ui/config/barcfg.cxx4
-rw-r--r--sw/source/ui/config/caption.cxx28
-rw-r--r--sw/source/ui/config/cfgitems.cxx36
-rw-r--r--sw/source/ui/config/fontcfg.cxx16
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx2
-rw-r--r--sw/source/ui/config/modcfg.cxx44
-rw-r--r--sw/source/ui/config/optcomp.cxx80
-rw-r--r--sw/source/ui/config/optload.cxx106
-rw-r--r--sw/source/ui/config/optpage.cxx350
-rw-r--r--sw/source/ui/config/prtopt.cxx2
-rw-r--r--sw/source/ui/config/uinums.cxx114
-rw-r--r--sw/source/ui/config/usrpref.cxx34
-rw-r--r--sw/source/ui/config/viewopt.cxx44
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx8
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx18
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.cxx16
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx210
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx290
-rw-r--r--sw/source/ui/dbui/dbtree.cxx32
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.cxx4
-rw-r--r--sw/source/ui/dbui/mailmergehelper.cxx8
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx64
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmconfigitem.cxx12
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx20
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx20
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx32
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx2
-rw-r--r--sw/source/ui/dialog/SwSpellDialogChildWindow.cxx38
-rw-r--r--sw/source/ui/dialog/abstract.cxx8
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx56
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx14
-rw-r--r--sw/source/ui/dialog/macassgn.cxx14
-rw-r--r--sw/source/ui/dialog/regionsw.cxx44
-rw-r--r--sw/source/ui/dialog/swabstdlg.cxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx108
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx112
-rw-r--r--sw/source/ui/dialog/swwrtshitem.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx388
-rwxr-xr-xsw/source/ui/dochdl/gloshdl.cxx190
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx378
-rw-r--r--sw/source/ui/docvw/AnnotationMenuButton.cxx10
-rw-r--r--sw/source/ui/docvw/AnnotationWin.cxx8
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx12
-rw-r--r--sw/source/ui/docvw/SidebarTxtControl.cxx10
-rw-r--r--sw/source/ui/docvw/SidebarTxtControlAcc.cxx2
-rw-r--r--sw/source/ui/docvw/SidebarWin.cxx30
-rw-r--r--sw/source/ui/docvw/edtdd.cxx84
-rw-r--r--sw/source/ui/docvw/edtwin.cxx882
-rw-r--r--sw/source/ui/docvw/edtwin2.cxx38
-rw-r--r--sw/source/ui/docvw/edtwin3.cxx24
-rw-r--r--sw/source/ui/docvw/romenu.cxx86
-rw-r--r--sw/source/ui/docvw/romenu.hxx8
-rw-r--r--sw/source/ui/docvw/srcedtw.cxx110
-rw-r--r--sw/source/ui/envelp/envfmt.cxx70
-rw-r--r--sw/source/ui/envelp/envfmt.hxx4
-rw-r--r--sw/source/ui/envelp/envimg.cxx14
-rw-r--r--sw/source/ui/envelp/envlop1.cxx46
-rw-r--r--sw/source/ui/envelp/envprt.cxx20
-rw-r--r--sw/source/ui/envelp/envprt.hxx2
-rw-r--r--sw/source/ui/envelp/label1.cxx8
-rw-r--r--sw/source/ui/envelp/labelcfg.cxx4
-rw-r--r--sw/source/ui/envelp/labelexp.cxx2
-rw-r--r--sw/source/ui/envelp/labfmt.cxx52
-rw-r--r--sw/source/ui/envelp/labfmt.hxx6
-rw-r--r--sw/source/ui/envelp/labimg.cxx6
-rw-r--r--sw/source/ui/envelp/labprt.cxx12
-rw-r--r--sw/source/ui/envelp/labprt.hxx2
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx46
-rw-r--r--sw/source/ui/envelp/syncbtn.cxx2
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.cxx4
-rw-r--r--sw/source/ui/fldui/changedb.cxx18
-rw-r--r--sw/source/ui/fldui/flddb.cxx78
-rw-r--r--sw/source/ui/fldui/flddb.hxx8
-rw-r--r--sw/source/ui/fldui/flddinf.cxx98
-rw-r--r--sw/source/ui/fldui/flddinf.hxx10
-rw-r--r--sw/source/ui/fldui/flddok.cxx132
-rw-r--r--sw/source/ui/fldui/flddok.hxx12
-rw-r--r--sw/source/ui/fldui/fldedt.cxx22
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx130
-rw-r--r--sw/source/ui/fldui/fldfunc.hxx6
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx288
-rw-r--r--sw/source/ui/fldui/fldpage.cxx46
-rw-r--r--sw/source/ui/fldui/fldpage.hxx44
-rw-r--r--sw/source/ui/fldui/fldref.cxx148
-rw-r--r--sw/source/ui/fldui/fldref.hxx6
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx28
-rw-r--r--sw/source/ui/fldui/fldvar.cxx248
-rw-r--r--sw/source/ui/fldui/fldvar.hxx16
-rw-r--r--sw/source/ui/fldui/fldwrap.cxx28
-rw-r--r--sw/source/ui/fldui/inpdlg.cxx14
-rw-r--r--sw/source/ui/fldui/javaedit.cxx14
-rw-r--r--sw/source/ui/fldui/xfldui.cxx10
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx52
-rw-r--r--sw/source/ui/frmdlg/colex.cxx74
-rw-r--r--sw/source/ui/frmdlg/colmgr.cxx34
-rw-r--r--sw/source/ui/frmdlg/column.cxx210
-rw-r--r--sw/source/ui/frmdlg/cption.cxx8
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx18
-rw-r--r--sw/source/ui/frmdlg/frmmgr.cxx54
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx446
-rw-r--r--sw/source/ui/frmdlg/uiborder.cxx2
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx90
-rw-r--r--sw/source/ui/inc/DropDownFieldDialog.hxx2
-rw-r--r--sw/source/ui/inc/SwSpellDialogChildWindow.hxx2
-rw-r--r--sw/source/ui/inc/abstract.hxx4
-rwxr-xr-xsw/source/ui/inc/annotsh.hxx2
-rw-r--r--sw/source/ui/inc/ascfldlg.hxx2
-rw-r--r--sw/source/ui/inc/basesh.hxx4
-rw-r--r--sw/source/ui/inc/bmpwin.hxx16
-rw-r--r--sw/source/ui/inc/bookctrl.hxx4
-rw-r--r--sw/source/ui/inc/bookmark.hxx10
-rw-r--r--sw/source/ui/inc/break.hxx10
-rw-r--r--sw/source/ui/inc/caption.hxx40
-rw-r--r--sw/source/ui/inc/cfgdesc.hxx14
-rw-r--r--sw/source/ui/inc/cfgitems.hxx132
-rw-r--r--sw/source/ui/inc/chldwrap.hxx4
-rw-r--r--sw/source/ui/inc/chrdlg.hxx10
-rw-r--r--sw/source/ui/inc/cnttab.hxx8
-rw-r--r--sw/source/ui/inc/colex.hxx8
-rw-r--r--sw/source/ui/inc/colmgr.hxx44
-rw-r--r--sw/source/ui/inc/column.hxx36
-rw-r--r--sw/source/ui/inc/conarc.hxx8
-rw-r--r--sw/source/ui/inc/concustomshape.hxx6
-rw-r--r--sw/source/ui/inc/condedit.hxx8
-rw-r--r--sw/source/ui/inc/conform.hxx4
-rw-r--r--sw/source/ui/inc/conpoly.hxx8
-rw-r--r--sw/source/ui/inc/conrect.hxx10
-rw-r--r--sw/source/ui/inc/content.hxx66
-rw-r--r--sw/source/ui/inc/conttree.hxx120
-rw-r--r--sw/source/ui/inc/dbinsdlg.hxx16
-rw-r--r--sw/source/ui/inc/dbtree.hxx10
-rw-r--r--sw/source/ui/inc/docfnote.hxx2
-rw-r--r--sw/source/ui/inc/docstdlg.hxx2
-rw-r--r--sw/source/ui/inc/drawbase.hxx26
-rw-r--r--sw/source/ui/inc/drpcps.hxx12
-rw-r--r--sw/source/ui/inc/drwbassh.hxx8
-rw-r--r--sw/source/ui/inc/drwtxtsh.hxx6
-rw-r--r--sw/source/ui/inc/dselect.hxx4
-rw-r--r--sw/source/ui/inc/edtwin.hxx90
-rw-r--r--sw/source/ui/inc/envimg.hxx4
-rw-r--r--sw/source/ui/inc/envlop.hxx6
-rw-r--r--sw/source/ui/inc/fldedt.hxx4
-rw-r--r--sw/source/ui/inc/fldmgr.hxx80
-rw-r--r--sw/source/ui/inc/fldtdlg.hxx16
-rw-r--r--sw/source/ui/inc/fldwrap.hxx10
-rw-r--r--sw/source/ui/inc/fontcfg.hxx12
-rw-r--r--sw/source/ui/inc/formedt.hxx6
-rw-r--r--sw/source/ui/inc/frmdlg.hxx18
-rw-r--r--sw/source/ui/inc/frmmgr.hxx20
-rw-r--r--sw/source/ui/inc/frmpage.hxx84
-rw-r--r--sw/source/ui/inc/glosbib.hxx2
-rw-r--r--sw/source/ui/inc/glosdoc.hxx24
-rw-r--r--sw/source/ui/inc/gloshdl.hxx50
-rw-r--r--sw/source/ui/inc/gloslst.hxx16
-rw-r--r--sw/source/ui/inc/glossary.hxx12
-rw-r--r--sw/source/ui/inc/glshell.hxx4
-rw-r--r--sw/source/ui/inc/initui.hxx2
-rw-r--r--sw/source/ui/inc/inpdlg.hxx2
-rw-r--r--sw/source/ui/inc/inputwin.hxx26
-rw-r--r--sw/source/ui/inc/insfnote.hxx10
-rw-r--r--sw/source/ui/inc/insrule.hxx6
-rw-r--r--sw/source/ui/inc/instable.hxx2
-rw-r--r--sw/source/ui/inc/javaedit.hxx10
-rw-r--r--sw/source/ui/inc/label.hxx8
-rwxr-xr-xsw/source/ui/inc/langhelper.hxx8
-rw-r--r--sw/source/ui/inc/linenum.hxx2
-rw-r--r--sw/source/ui/inc/macassgn.hxx2
-rw-r--r--sw/source/ui/inc/mailconfigpage.hxx2
-rw-r--r--sw/source/ui/inc/mailmergechildwindow.hxx2
-rw-r--r--sw/source/ui/inc/mailmrge.hxx8
-rw-r--r--sw/source/ui/inc/mergetbl.hxx4
-rw-r--r--sw/source/ui/inc/mmconfigitem.hxx10
-rw-r--r--sw/source/ui/inc/multmrk.hxx2
-rw-r--r--sw/source/ui/inc/navicont.hxx8
-rw-r--r--sw/source/ui/inc/navipi.hxx36
-rw-r--r--sw/source/ui/inc/num.hxx20
-rw-r--r--sw/source/ui/inc/numberingtypelistbox.hxx4
-rw-r--r--sw/source/ui/inc/numfmtlb.hxx32
-rw-r--r--sw/source/ui/inc/numpara.hxx8
-rw-r--r--sw/source/ui/inc/numprevw.hxx10
-rw-r--r--sw/source/ui/inc/olmenu.hxx4
-rw-r--r--sw/source/ui/inc/optcomp.hxx8
-rw-r--r--sw/source/ui/inc/optload.hxx12
-rw-r--r--sw/source/ui/inc/optpage.hxx56
-rw-r--r--sw/source/ui/inc/outline.hxx16
-rw-r--r--sw/source/ui/inc/pgfnote.hxx4
-rw-r--r--sw/source/ui/inc/pggrid.hxx4
-rw-r--r--sw/source/ui/inc/prcntfld.hxx10
-rw-r--r--sw/source/ui/inc/pview.hxx56
-rw-r--r--sw/source/ui/inc/redlndlg.hxx36
-rw-r--r--sw/source/ui/inc/regionsw.hxx22
-rw-r--r--sw/source/ui/inc/scroll.hxx24
-rw-r--r--sw/source/ui/inc/selglos.hxx8
-rw-r--r--sw/source/ui/inc/shdwcrsr.hxx10
-rw-r--r--sw/source/ui/inc/split.hxx4
-rw-r--r--sw/source/ui/inc/splittbl.hxx4
-rw-r--r--sw/source/ui/inc/srcedtw.hxx30
-rw-r--r--sw/source/ui/inc/srcview.hxx20
-rw-r--r--sw/source/ui/inc/srtdlg.hxx4
-rw-r--r--sw/source/ui/inc/swcont.hxx16
-rw-r--r--sw/source/ui/inc/swdtflvr.hxx66
-rw-r--r--sw/source/ui/inc/swlbox.hxx30
-rw-r--r--sw/source/ui/inc/swmodalredlineacceptdlg.hxx2
-rw-r--r--sw/source/ui/inc/swtablerep.hxx46
-rw-r--r--sw/source/ui/inc/swuiccoll.hxx8
-rw-r--r--sw/source/ui/inc/swuicnttab.hxx54
-rw-r--r--sw/source/ui/inc/swuiidxmrk.hxx8
-rw-r--r--sw/source/ui/inc/swuipardlg.hxx14
-rw-r--r--sw/source/ui/inc/swwrtshitem.hxx2
-rw-r--r--sw/source/ui/inc/syncbtn.hxx2
-rw-r--r--sw/source/ui/inc/tabledlg.hxx4
-rw-r--r--sw/source/ui/inc/tablemgr.hxx18
-rw-r--r--sw/source/ui/inc/tabsh.hxx4
-rw-r--r--sw/source/ui/inc/tautofmt.hxx12
-rw-r--r--sw/source/ui/inc/tblctrl.hxx2
-rw-r--r--sw/source/ui/inc/tbxanchr.hxx6
-rw-r--r--sw/source/ui/inc/textcontrolcombo.hxx10
-rw-r--r--sw/source/ui/inc/textsh.hxx2
-rw-r--r--sw/source/ui/inc/tmpdlg.hxx14
-rw-r--r--sw/source/ui/inc/tmplctrl.hxx4
-rw-r--r--sw/source/ui/inc/toxmgr.hxx104
-rw-r--r--sw/source/ui/inc/uiborder.hxx2
-rw-r--r--sw/source/ui/inc/uiitems.hxx16
-rw-r--r--sw/source/ui/inc/uinums.hxx20
-rw-r--r--sw/source/ui/inc/uitool.hxx14
-rw-r--r--sw/source/ui/inc/uivwimp.hxx2
-rw-r--r--sw/source/ui/inc/unotools.hxx2
-rw-r--r--sw/source/ui/inc/unotxvw.hxx16
-rw-r--r--sw/source/ui/inc/usrpref.hxx18
-rw-r--r--sw/source/ui/inc/view.hxx208
-rw-r--r--sw/source/ui/inc/viewlayoutctrl.hxx6
-rw-r--r--sw/source/ui/inc/workctrl.hxx28
-rw-r--r--sw/source/ui/inc/wrap.hxx30
-rw-r--r--sw/source/ui/inc/wrtsh.hxx358
-rw-r--r--sw/source/ui/inc/zoomctrl.hxx4
-rw-r--r--sw/source/ui/index/cntex.cxx12
-rw-r--r--sw/source/ui/index/cnttab.cxx80
-rw-r--r--sw/source/ui/index/multmrk.cxx4
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx48
-rw-r--r--sw/source/ui/index/toxmgr.cxx50
-rw-r--r--sw/source/ui/lingu/hhcwrp.cxx8
-rw-r--r--sw/source/ui/lingu/olmenu.cxx58
-rw-r--r--sw/source/ui/misc/bookmark.cxx42
-rw-r--r--sw/source/ui/misc/docfnote.cxx52
-rw-r--r--sw/source/ui/misc/glosbib.cxx88
-rw-r--r--sw/source/ui/misc/glosdoc.cxx14
-rw-r--r--sw/source/ui/misc/glossary.cxx22
-rw-r--r--sw/source/ui/misc/glshell.cxx26
-rw-r--r--sw/source/ui/misc/impfnote.hxx8
-rw-r--r--sw/source/ui/misc/insfnote.cxx52
-rw-r--r--sw/source/ui/misc/insrule.cxx8
-rw-r--r--sw/source/ui/misc/linenum.cxx28
-rw-r--r--sw/source/ui/misc/num.cxx164
-rw-r--r--sw/source/ui/misc/numberingtypelistbox.cxx20
-rw-r--r--sw/source/ui/misc/outline.cxx220
-rw-r--r--sw/source/ui/misc/pgfnote.cxx46
-rw-r--r--sw/source/ui/misc/pggrid.cxx18
-rw-r--r--sw/source/ui/misc/redlndlg.cxx226
-rw-r--r--sw/source/ui/misc/srtdlg.cxx82
-rw-r--r--sw/source/ui/misc/swmodalredlineacceptdlg.cxx16
-rw-r--r--sw/source/ui/ribbar/conarc.cxx18
-rw-r--r--sw/source/ui/ribbar/concustomshape.cxx8
-rw-r--r--sw/source/ui/ribbar/conform.cxx28
-rw-r--r--sw/source/ui/ribbar/conpoly.cxx18
-rw-r--r--sw/source/ui/ribbar/conrect.cxx34
-rw-r--r--sw/source/ui/ribbar/drawbase.cxx138
-rw-r--r--sw/source/ui/ribbar/dselect.cxx18
-rwxr-xr-xsw/source/ui/ribbar/inputwin.cxx92
-rw-r--r--sw/source/ui/ribbar/tblctrl.cxx4
-rw-r--r--sw/source/ui/ribbar/tbxanchr.cxx10
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx108
-rwxr-xr-xsw/source/ui/shells/annotsh.cxx80
-rw-r--r--sw/source/ui/shells/basesh.cxx358
-rw-r--r--sw/source/ui/shells/beziersh.cxx30
-rw-r--r--sw/source/ui/shells/drawdlg.cxx38
-rw-r--r--sw/source/ui/shells/drawsh.cxx44
-rw-r--r--sw/source/ui/shells/drwbassh.cxx100
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx30
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx68
-rw-r--r--sw/source/ui/shells/frmsh.cxx100
-rw-r--r--sw/source/ui/shells/grfsh.cxx74
-rwxr-xr-x[-rw-r--r--]sw/source/ui/shells/langhelper.cxx38
-rw-r--r--sw/source/ui/shells/listsh.cxx28
-rw-r--r--sw/source/ui/shells/mediash.cxx12
-rw-r--r--sw/source/ui/shells/tabsh.cxx240
-rw-r--r--sw/source/ui/shells/textdrw.cxx2
-rw-r--r--sw/source/ui/shells/textfld.cxx144
-rw-r--r--sw/source/ui/shells/textglos.cxx26
-rw-r--r--sw/source/ui/shells/textidx.cxx26
-rw-r--r--sw/source/ui/shells/textsh.cxx134
-rw-r--r--sw/source/ui/shells/textsh1.cxx194
-rw-r--r--sw/source/ui/shells/textsh2.cxx22
-rw-r--r--sw/source/ui/shells/txtattr.cxx86
-rw-r--r--sw/source/ui/shells/txtcrsr.cxx98
-rw-r--r--sw/source/ui/shells/txtnum.cxx36
-rw-r--r--sw/source/ui/smartmenu/stmenu.cxx14
-rw-r--r--sw/source/ui/table/chartins.cxx6
-rw-r--r--sw/source/ui/table/colwd.cxx12
-rw-r--r--sw/source/ui/table/convert.cxx24
-rw-r--r--sw/source/ui/table/instable.cxx16
-rw-r--r--sw/source/ui/table/mergetbl.cxx2
-rw-r--r--sw/source/ui/table/swtablerep.cxx38
-rw-r--r--sw/source/ui/table/tabledlg.cxx364
-rw-r--r--sw/source/ui/table/tablemgr.cxx48
-rw-r--r--sw/source/ui/table/tablepg.hxx40
-rw-r--r--sw/source/ui/table/tautofmt.cxx118
-rw-r--r--sw/source/ui/uiview/formatclipboard.cxx56
-rw-r--r--sw/source/ui/uiview/pview.cxx252
-rw-r--r--sw/source/ui/uiview/scroll.cxx26
-rw-r--r--sw/source/ui/uiview/srcview.cxx116
-rw-r--r--sw/source/ui/uiview/swcli.cxx6
-rw-r--r--sw/source/ui/uiview/uivwimp.cxx14
-rw-r--r--sw/source/ui/uiview/view.cxx68
-rw-r--r--sw/source/ui/uiview/view0.cxx18
-rw-r--r--sw/source/ui/uiview/view1.cxx20
-rw-r--r--sw/source/ui/uiview/view2.cxx292
-rw-r--r--sw/source/ui/uiview/viewcoll.cxx8
-rw-r--r--sw/source/ui/uiview/viewdlg.cxx12
-rw-r--r--sw/source/ui/uiview/viewdlg2.cxx20
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx8
-rw-r--r--sw/source/ui/uiview/viewfunc.hxx12
-rwxr-xr-xsw/source/ui/uiview/viewling.cxx6
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx70
-rw-r--r--sw/source/ui/uiview/viewport.cxx242
-rw-r--r--sw/source/ui/uiview/viewprt.cxx42
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx128
-rw-r--r--sw/source/ui/uiview/viewstat.cxx8
-rw-r--r--sw/source/ui/uiview/viewtab.cxx376
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.cxx4
-rw-r--r--sw/source/ui/uno/swdet2.cxx6
-rw-r--r--sw/source/ui/uno/swdetect.cxx18
-rw-r--r--sw/source/ui/uno/swdetect.hxx4
-rw-r--r--sw/source/ui/uno/unoatxt.cxx26
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx38
-rw-r--r--sw/source/ui/uno/unomod.cxx30
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx122
-rw-r--r--sw/source/ui/uno/unotxvw.cxx28
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx38
-rw-r--r--sw/source/ui/utlui/bookctrl.cxx18
-rw-r--r--sw/source/ui/utlui/condedit.cxx2
-rw-r--r--sw/source/ui/utlui/content.cxx28
-rw-r--r--sw/source/ui/utlui/glbltree.cxx230
-rw-r--r--sw/source/ui/utlui/gloslst.cxx76
-rw-r--r--sw/source/ui/utlui/initui.cxx18
-rw-r--r--sw/source/ui/utlui/navicfg.cxx4
-rw-r--r--sw/source/ui/utlui/navipi.cxx182
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx80
-rw-r--r--sw/source/ui/utlui/prcntfld.cxx10
-rw-r--r--sw/source/ui/utlui/shdwcrsr.cxx10
-rw-r--r--sw/source/ui/utlui/textcontrolcombo.cxx6
-rw-r--r--sw/source/ui/utlui/tmplctrl.cxx14
-rw-r--r--sw/source/ui/utlui/uiitems.cxx24
-rw-r--r--sw/source/ui/utlui/uitool.cxx104
-rw-r--r--sw/source/ui/utlui/unotools.cxx8
-rw-r--r--sw/source/ui/utlui/viewlayoutctrl.cxx14
-rw-r--r--sw/source/ui/utlui/zoomctrl.cxx6
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.cxx2
-rw-r--r--sw/source/ui/vba/vbafield.cxx10
-rw-r--r--sw/source/ui/vba/vbaselection.cxx2
-rw-r--r--sw/source/ui/web/wview.cxx22
-rw-r--r--sw/source/ui/wrtsh/delete.cxx36
-rw-r--r--sw/source/ui/wrtsh/move.cxx180
-rw-r--r--sw/source/ui/wrtsh/select.cxx232
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx148
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx70
-rw-r--r--sw/source/ui/wrtsh/wrtsh3.cxx16
-rw-r--r--sw/source/ui/wrtsh/wrtsh4.cxx60
-rw-r--r--sw/source/ui/wrtsh/wrtundo.cxx18
1080 files changed, 39029 insertions, 39029 deletions
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx
index 333c591243ad..209fea22da72 100644
--- a/sw/inc/EnhancedPDFExportHelper.hxx
+++ b/sw/inc/EnhancedPDFExportHelper.hxx
@@ -148,7 +148,7 @@ class SwTaggedPDFHelper
// This will be incremented for each BeginTag() call.
// It denotes the number of tags to close during EndStructureElements();
- BYTE nEndStructureElement;
+ sal_uInt8 nEndStructureElement;
// If an already existing tag is reopened for follows of flow frames,
// this value stores the tag id which has to be restored.
diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx
index 693a24466b9d..e35c31cf2697 100644
--- a/sw/inc/IDocumentFieldsAccess.hxx
+++ b/sw/inc/IDocumentFieldsAccess.hxx
@@ -91,10 +91,10 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } }
@param rVal the value
@param nMId
- @retval TRUE putting of value was successful
- @retval FALSE else
+ @retval sal_True putting of value was successful
+ @retval sal_False else
*/
- virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, USHORT nWhich) = 0;
+ virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich) = 0;
// rufe das Update der Expression Felder auf; alle Ausdruecke werden
// neu berechnet.
@@ -105,10 +105,10 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } }
@param rDstFmtFld field to update
@param rSrcFld field containing the new values
@param pMsgHnt
- @param bUpdateTblFlds TRUE: update table fields, too.
+ @param bUpdateTblFlds sal_True: update table fields, too.
- @retval TRUE update was successful
- @retval FALSE else
+ @retval sal_True update was successful
+ @retval sal_False else
*/
virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds) = 0;
@@ -151,7 +151,7 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } }
SwNode (see parameter pChk) is (?) part of the private
data structure of SwDoc and should not be exposed
*/
- virtual bool SetFieldsDirty(bool b, const SwNode* pChk, ULONG nLen) = 0;
+ virtual bool SetFieldsDirty(bool b, const SwNode* pChk, sal_uLong nLen) = 0;
/**
*/
@@ -162,7 +162,7 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } }
// eine erzeugte Liste aller Felder mit uebergegeben werden.
// (ist die Adresse != 0, und der Pointer == 0 wird eine neue
// Liste returnt.)
- virtual void FldsToCalc(SwCalc& rCalc, ULONG nLastNd, sal_uInt16 nLastCnt) = 0;
+ virtual void FldsToCalc(SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt) = 0;
/**
*/
diff --git a/sw/inc/IDocumentLinksAdministration.hxx b/sw/inc/IDocumentLinksAdministration.hxx
index c3e6855f3c81..44fd8c148044 100644
--- a/sw/inc/IDocumentLinksAdministration.hxx
+++ b/sw/inc/IDocumentLinksAdministration.hxx
@@ -58,7 +58,7 @@ namespace sfx2 { class SvLinkSource; class LinkManager; }
/** FME 2005-02-25 #i42634# Moved common code of SwReader::Read() and
SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks():
*/
- virtual void UpdateLinks(BOOL bUI) = 0;
+ virtual void UpdateLinks(sal_Bool bUI) = 0;
/** SS fuers Linken von Dokumentteilen
*/
diff --git a/sw/inc/IDocumentRedlineAccess.hxx b/sw/inc/IDocumentRedlineAccess.hxx
index ed893dc1cf4a..078b405f0ce4 100644
--- a/sw/inc/IDocumentRedlineAccess.hxx
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -49,7 +49,7 @@
class SwNode;
class String;
-typedef USHORT RedlineMode_t;
+typedef sal_uInt16 RedlineMode_t;
namespace nsRedlineMode_t
{
const RedlineMode_t REDLINE_NONE = 0; // no RedlineMode
@@ -70,7 +70,7 @@ namespace nsRedlineMode_t
const RedlineMode_t REDLINE_DONTCOMBINE_REDLINES = 0x400;
}
-typedef USHORT RedlineType_t;
+typedef sal_uInt16 RedlineType_t;
namespace nsRedlineType_t
{
// die RedlineTypen gehen von 0 bis 127
@@ -92,16 +92,16 @@ class IDocumentRedlineAccess
{
// Static helper functions
public:
- static bool IsShowChanges(const USHORT eM)
+ static bool IsShowChanges(const sal_uInt16 eM)
{ return (nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
- static bool IsHideChanges(const USHORT eM)
+ static bool IsHideChanges(const sal_uInt16 eM)
{ return nsRedlineMode_t::REDLINE_SHOW_INSERT == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
- static bool IsShowOriginal(const USHORT eM)
+ static bool IsShowOriginal(const sal_uInt16 eM)
{ return nsRedlineMode_t::REDLINE_SHOW_DELETE == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
- static bool IsRedlineOn(const USHORT eM)
+ static bool IsRedlineOn(const sal_uInt16 eM)
{ return nsRedlineMode_t::REDLINE_ON == (eM & (nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_IGNORE )); }
public:
diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx
index 25b1c57f9a0b..214b9769ed32 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -129,7 +129,7 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
a list of forbidden characters.
*/
virtual const com::sun::star::i18n::ForbiddenCharacters*
- getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const = 0;
+ getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const = 0;
/** Set the forbidden characters.
@@ -139,7 +139,7 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
@param rForbiddenCharacters
[in] the new list of forbidden characters for language lang.
*/
- virtual void setForbiddenCharacters(/*[in]*/ USHORT nLang,
+ virtual void setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang,
/*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters ) = 0;
/** Get the forbidden character table and creates one if necessary.
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 485a9a5733f7..17000a4657c7 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -156,7 +156,7 @@ class SwPostItMgr: public SfxListener
SwEditWin* mpEditWin;
std::list< SwSidebarItem*> mvPostItFlds;
std::vector<SwPostItPageItem*> mPages;
- ULONG mnEventId;
+ sal_uLong mnEventId;
bool mbWaitingForCalcRects;
sw::sidebarwindows::SwSidebarWin* mpActivePostIt;
bool mbLayout;
@@ -184,7 +184,7 @@ class SwPostItMgr: public SfxListener
const Rectangle aBorder,
long lNeededHeight);
void CheckForRemovedPostIts();
- bool ArrowEnabled(USHORT aDirection,unsigned long aPage) const;
+ bool ArrowEnabled(sal_uInt16 aDirection,unsigned long aPage) const;
bool BorderOverPageBorder(unsigned long aPage) const;
bool HasScrollbars() const;
void Focus(SfxBroadcaster& rBC);
@@ -247,11 +247,11 @@ class SwPostItMgr: public SfxListener
Rectangle GetTopScrollRect(const unsigned long aPage) const;
bool IsHit(const Point &aPointPixel);
- Color GetArrowColor(USHORT aDirection,unsigned long aPage) const;
+ Color GetArrowColor(sal_uInt16 aDirection,unsigned long aPage) const;
sw::annotation::SwAnnotationWin* GetAnnotationWin(const SwPostItField* pFld) const;
- sw::sidebarwindows::SwSidebarWin* GetNextPostIt( USHORT aDirection,
+ sw::sidebarwindows::SwSidebarWin* GetNextPostIt( sal_uInt16 aDirection,
sw::sidebarwindows::SwSidebarWin* aPostIt);
long GetNextBorder();
diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx
index 729dc18a780b..00649f211f51 100644
--- a/sw/inc/SidebarWin.hxx
+++ b/sw/inc/SidebarWin.hxx
@@ -98,7 +98,7 @@ class SwSidebarWin : public Window
long GetPostItTextHeight();
- void SwitchToPostIt(USHORT aDirection);
+ void SwitchToPostIt(sal_uInt16 aDirection);
virtual void SwitchToFieldPos();
virtual sal_uInt32 MoveCaret() = 0;
@@ -112,7 +112,7 @@ class SwSidebarWin : public Window
virtual Date GetDate() = 0;
virtual Time GetTime() = 0;
- void ExecuteCommand(USHORT nSlot);
+ void ExecuteCommand(sal_uInt16 nSlot);
void InitControls();
void HidePostIt();
void DoResize();
@@ -130,8 +130,8 @@ class SwSidebarWin : public Window
void ResetAttributes();
void SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition);
- void SetReadonly(BOOL bSet);
- BOOL IsReadOnly() { return mbReadonly;}
+ void SetReadonly(sal_Bool bSet);
+ sal_Bool IsReadOnly() { return mbReadonly;}
bool IsPreview() { return nFlags & PB_Preview;}
void SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor);
@@ -204,7 +204,7 @@ class SwSidebarWin : public Window
SwView& mrView;
const SwPostItBits nFlags;
- ULONG mnEventId;
+ sal_uLong mnEventId;
OutlinerView* mpOutlinerView;
Outliner* mpOutliner;
diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx
index c5d052f660b2..0ad636adf67f 100644
--- a/sw/inc/SwAppletImpl.hxx
+++ b/sw/inc/SwAppletImpl.hxx
@@ -59,12 +59,12 @@ class SwApplet_Impl
String sAlt;
public:
- static USHORT GetOptionType( const String& rName, BOOL bApplet );
- SwApplet_Impl( SfxItemPool& rPool, USHORT nWhich1, USHORT nWhich2 );
+ static sal_uInt16 GetOptionType( const String& rName, sal_Bool bApplet );
+ SwApplet_Impl( SfxItemPool& rPool, sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
SwApplet_Impl( SfxItemSet& rSet ): aItemSet ( rSet) {}
~SwApplet_Impl();
void CreateApplet( const String& rCode, const String& rName,
- BOOL bMayScript, const String& rCodeBase,
+ sal_Bool bMayScript, const String& rCodeBase,
const String& rBaseURL );
#ifdef SOLAR_JAVA
sal_Bool CreateApplet( const String& rBaseURL );
diff --git a/sw/inc/SwGetPoolIdFromName.hxx b/sw/inc/SwGetPoolIdFromName.hxx
index 92959457e534..1bb40de8ba91 100644
--- a/sw/inc/SwGetPoolIdFromName.hxx
+++ b/sw/inc/SwGetPoolIdFromName.hxx
@@ -30,7 +30,7 @@
/* When using the NameMapper to translate pool ids to UI or programmatic
* names, this enum is used to define which family is required */
-typedef USHORT SwGetPoolIdFromName;
+typedef sal_uInt16 SwGetPoolIdFromName;
namespace nsSwGetPoolIdFromName
{
diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx
index 33f5cfd85e49..b24f867120ef 100644
--- a/sw/inc/SwUndoField.hxx
+++ b/sw/inc/SwUndoField.hxx
@@ -35,7 +35,7 @@ class SwMsgPoolItem;
class SwUndoField : public SwUndo
{
- ULONG nNodeIndex;
+ sal_uLong nNodeIndex;
xub_StrLen nOffset;
protected:
@@ -51,12 +51,12 @@ class SwUndoFieldFromDoc : public SwUndoField
{
SwField * pOldField, * pNewField;
SwMsgPoolItem * pHnt;
- BOOL bUpdate;
+ sal_Bool bUpdate;
public:
SwUndoFieldFromDoc(const SwPosition & rPos, const SwField & aOldField,
const SwField & aNewField,
- SwMsgPoolItem * pHnt, BOOL bUpdate,
+ SwMsgPoolItem * pHnt, sal_Bool bUpdate,
SwUndoId nId = UNDO_FIELD );
virtual ~SwUndoFieldFromDoc();
@@ -68,13 +68,13 @@ public:
class SwUndoFieldFromAPI : public SwUndoField
{
com::sun::star::uno::Any aOldVal, aNewVal;
- USHORT nWhich;
+ sal_uInt16 nWhich;
public:
SwUndoFieldFromAPI(const SwPosition & rPos,
const com::sun::star::uno::Any & rOldVal,
const com::sun::star::uno::Any & rNewVal,
- USHORT nWhich);
+ sal_uInt16 nWhich);
virtual ~SwUndoFieldFromAPI();
virtual void Undo(SwUndoIter & rIt);
diff --git a/sw/inc/SwUndoFmt.hxx b/sw/inc/SwUndoFmt.hxx
index ea23724fa817..157d87d2f26d 100644
--- a/sw/inc/SwUndoFmt.hxx
+++ b/sw/inc/SwUndoFmt.hxx
@@ -44,8 +44,8 @@ protected:
SwDoc * pDoc;
mutable String sNewName;
SfxItemSet * pNewSet;
- USHORT nId; // FmtId related
- BOOL bAuto;
+ sal_uInt16 nId; // FmtId related
+ sal_Bool bAuto;
public:
@@ -70,8 +70,8 @@ protected:
SwDoc * pDoc;
String sOldName;
SfxItemSet aOldSet;
- USHORT nId; // FmtId related
- BOOL bAuto;
+ sal_uInt16 nId; // FmtId related
+ sal_Bool bAuto;
public:
SwUndoFmtDelete(SwUndoId nUndoId, SwFmt * pOld, SwDoc * pDoc);
@@ -172,7 +172,7 @@ public:
class SwUndoFrmFmtCreate : public SwUndoFmtCreate
{
- BOOL bAuto;
+ sal_Bool bAuto;
public:
SwUndoFrmFmtCreate(SwFrmFmt * pNew, SwFrmFmt * pDerivedFrom,
diff --git a/sw/inc/accessibilityoptions.hxx b/sw/inc/accessibilityoptions.hxx
index 79be20d8cc07..08256b4c5e79 100644
--- a/sw/inc/accessibilityoptions.hxx
+++ b/sw/inc/accessibilityoptions.hxx
@@ -31,23 +31,23 @@
struct SwAccessibilityOptions
{
- BOOL bIsAlwaysAutoColor :1;
- BOOL bIsStopAnimatedText :1;
- BOOL bIsStopAnimatedGraphics :1;
+ sal_Bool bIsAlwaysAutoColor :1;
+ sal_Bool bIsStopAnimatedText :1;
+ sal_Bool bIsStopAnimatedGraphics :1;
SwAccessibilityOptions() :
- bIsAlwaysAutoColor(FALSE),
- bIsStopAnimatedText(FALSE),
- bIsStopAnimatedGraphics(FALSE) {}
+ bIsAlwaysAutoColor(sal_False),
+ bIsStopAnimatedText(sal_False),
+ bIsStopAnimatedGraphics(sal_False) {}
- inline BOOL IsAlwaysAutoColor() const { return bIsAlwaysAutoColor; }
- inline void SetAlwaysAutoColor( BOOL b ) { bIsAlwaysAutoColor = b; }
+ inline sal_Bool IsAlwaysAutoColor() const { return bIsAlwaysAutoColor; }
+ inline void SetAlwaysAutoColor( sal_Bool b ) { bIsAlwaysAutoColor = b; }
- inline BOOL IsStopAnimatedGraphics() const { return bIsStopAnimatedText;}
- inline void SetStopAnimatedGraphics( BOOL b ) { bIsStopAnimatedText = b; }
+ inline sal_Bool IsStopAnimatedGraphics() const { return bIsStopAnimatedText;}
+ inline void SetStopAnimatedGraphics( sal_Bool b ) { bIsStopAnimatedText = b; }
- inline BOOL IsStopAnimatedText() const { return bIsStopAnimatedGraphics; }
- inline void SetStopAnimatedText( BOOL b ) { bIsStopAnimatedGraphics = b;}
+ inline sal_Bool IsStopAnimatedText() const { return bIsStopAnimatedGraphics; }
+ inline void SetStopAnimatedText( sal_Bool b ) { bIsStopAnimatedGraphics = b;}
};
#endif
diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx
index 8dda01f28493..af0cb98e4e6f 100644
--- a/sw/inc/acmplwrd.hxx
+++ b/sw/inc/acmplwrd.hxx
@@ -43,27 +43,27 @@ class SwAutoCompleteWord
SvPtrarr aLRULst;
SwAutoCompleteWord_Impl* pImpl;
- USHORT nMaxCount, nMinWrdLen;
- BOOL bLockWordLst;
+ sal_uInt16 nMaxCount, nMinWrdLen;
+ sal_Bool bLockWordLst;
void DocumentDying(const SwDoc& rDoc);
public:
- SwAutoCompleteWord( USHORT nWords = 500, USHORT nMWrdLen = 10 );
+ SwAutoCompleteWord( sal_uInt16 nWords = 500, sal_uInt16 nMWrdLen = 10 );
~SwAutoCompleteWord();
- BOOL InsertWord( const String& rWord, SwDoc& rDoc );
+ sal_Bool InsertWord( const String& rWord, SwDoc& rDoc );
- BOOL GetRange( const String& rWord, USHORT& rStt, USHORT& rEnd ) const;
+ sal_Bool GetRange( const String& rWord, sal_uInt16& rStt, sal_uInt16& rEnd ) const;
- const String& operator[]( USHORT n ) const { return *aWordLst[ n ]; }
+ const String& operator[]( sal_uInt16 n ) const { return *aWordLst[ n ]; }
- BOOL IsLockWordLstLocked() const { return bLockWordLst; }
- void SetLockWordLstLocked( BOOL bFlag ) { bLockWordLst = bFlag; }
+ sal_Bool IsLockWordLstLocked() const { return bLockWordLst; }
+ void SetLockWordLstLocked( sal_Bool bFlag ) { bLockWordLst = bFlag; }
- void SetMaxCount( USHORT n );
+ void SetMaxCount( sal_uInt16 n );
- USHORT GetMinWordLen() const { return nMinWrdLen; }
- void SetMinWordLen( USHORT n );
+ sal_uInt16 GetMinWordLen() const { return nMinWrdLen; }
+ void SetMinWordLen( sal_uInt16 n );
const SvStringsISortDtor& GetWordList() const { return aWordLst; }
void CheckChangedList( const SvStringsISortDtor& rNewLst );
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index 71f8a201243f..03ef2af83cea 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -41,11 +41,11 @@ class SwAuthDataArr;
class SwAuthEntry
{
String aAuthFields[AUTH_FIELD_END];
- USHORT nRefCount;
+ sal_uInt16 nRefCount;
public:
SwAuthEntry() : nRefCount(0){}
SwAuthEntry( const SwAuthEntry& rCopy );
- BOOL operator==(const SwAuthEntry& rComp);
+ sal_Bool operator==(const SwAuthEntry& rComp);
inline const String& GetAuthorField(ToxAuthorityField ePos)const;
inline void SetAuthorField(ToxAuthorityField ePos,
@@ -53,7 +53,7 @@ public:
void AddRef() { ++nRefCount; }
void RemoveRef() { --nRefCount; }
- USHORT GetRefCount() { return nRefCount; }
+ sal_uInt16 GetRefCount() { return nRefCount; }
};
/* -----------------20.10.99 16:49-------------------
@@ -61,10 +61,10 @@ public:
struct SwTOXSortKey
{
ToxAuthorityField eField;
- BOOL bSortAscending;
+ sal_Bool bSortAscending;
SwTOXSortKey() :
eField(AUTH_FIELD_END),
- bSortAscending(TRUE){}
+ bSortAscending(sal_True){}
};
/* -----------------14.09.99 16:15-------------------
@@ -81,8 +81,8 @@ class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType
SortKeyArr* m_pSortKeyArr;
sal_Unicode m_cPrefix;
sal_Unicode m_cSuffix;
- BOOL m_bIsSequence :1;
- BOOL m_bSortByDocument :1;
+ sal_Bool m_bIsSequence :1;
+ sal_Bool m_bSortByDocument :1;
LanguageType m_eLanguage;
String m_sSortAlgorithm;
@@ -97,14 +97,14 @@ public:
virtual SwFieldType* Copy() const;
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; }
SwDoc* GetDoc(){ return m_pDoc; }
void RemoveField(long nHandle);
long AddField(const String& rFieldContents);
- BOOL AddField(long nHandle);
+ sal_Bool AddField(long nHandle);
void DelSequenceArray()
{
m_pSequArr->Remove(0, m_pSequArr->Count());
@@ -117,13 +117,13 @@ public:
bool ChangeEntryContent(const SwAuthEntry* pNewEntry);
// import interface
- USHORT AppendField(const SwAuthEntry& rInsert);
- long GetHandle(USHORT nPos);
+ sal_uInt16 AppendField(const SwAuthEntry& rInsert);
+ long GetHandle(sal_uInt16 nPos);
- USHORT GetSequencePos(long nHandle);
+ sal_uInt16 GetSequencePos(long nHandle);
- BOOL IsSequence() const {return m_bIsSequence;}
- void SetSequence(BOOL bSet)
+ sal_Bool IsSequence() const {return m_bIsSequence;}
+ void SetSequence(sal_Bool bSet)
{
DelSequenceArray();
m_bIsSequence = bSet;
@@ -137,16 +137,16 @@ public:
sal_Unicode GetPrefix() const { return m_cPrefix;}
sal_Unicode GetSuffix() const { return m_cSuffix;}
- BOOL IsSortByDocument() const {return m_bSortByDocument;}
- void SetSortByDocument(BOOL bSet)
+ sal_Bool IsSortByDocument() const {return m_bSortByDocument;}
+ void SetSortByDocument(sal_Bool bSet)
{
DelSequenceArray();
m_bSortByDocument = bSet;
}
- USHORT GetSortKeyCount() const ;
- const SwTOXSortKey* GetSortKey(USHORT nIdx) const ;
- void SetSortKeys(USHORT nKeyCount, SwTOXSortKey nKeys[]);
+ sal_uInt16 GetSortKeyCount() const ;
+ const SwTOXSortKey* GetSortKey(sal_uInt16 nIdx) const ;
+ void SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey nKeys[]);
//initui.cxx
static const String& GetAuthFieldName(ToxAuthorityField eType);
@@ -180,8 +180,8 @@ public:
virtual void SetPar1(const String& rStr);
virtual SwFieldType* ChgTyp( SwFieldType* );
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
long GetHandle() const { return m_nHandle; }
diff --git a/sw/inc/authratr.hxx b/sw/inc/authratr.hxx
index f8fe69818439..06ffbe633ac2 100644
--- a/sw/inc/authratr.hxx
+++ b/sw/inc/authratr.hxx
@@ -37,13 +37,13 @@
class SW_DLLPUBLIC AuthorCharAttr
{
public:
- USHORT nItemId;
- USHORT nAttr;
+ sal_uInt16 nItemId;
+ sal_uInt16 nAttr;
ColorData nColor;
AuthorCharAttr();
- inline BOOL operator == ( const AuthorCharAttr& rAttr ) const
+ inline sal_Bool operator == ( const AuthorCharAttr& rAttr ) const
{
return nItemId == rAttr.nItemId && nAttr == rAttr.nAttr &&
nColor == rAttr.nColor;
diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx
index 31a98adef990..731dddd2e3fe 100644
--- a/sw/inc/bparr.hxx
+++ b/sw/inc/bparr.hxx
@@ -39,19 +39,19 @@ class BigPtrEntry
{
friend class BigPtrArray;
BlockInfo* pBlock;
- USHORT nOffset;
+ sal_uInt16 nOffset;
public:
virtual ~BigPtrEntry() {}
protected:
BigPtrEntry() : pBlock(0), nOffset(0) {}
- inline ULONG GetPos() const;
+ inline sal_uLong GetPos() const;
inline BigPtrArray& GetArray() const;
};
typedef BigPtrEntry* ElementPtr;
-typedef BOOL (*FnForEach)( const ElementPtr&, void* pArgs );
+typedef sal_Bool (*FnForEach)( const ElementPtr&, void* pArgs );
// 1000 Eintrge pro Block = etwas weniger als 4K
#define MAXENTRY 1000
@@ -67,51 +67,51 @@ typedef BOOL (*FnForEach)( const ElementPtr&, void* pArgs );
struct BlockInfo { // Block-Info:
BigPtrArray* pBigArr; // in diesem Array steht der Block
ElementPtr* pData; // Datenblock
- ULONG nStart, nEnd; // Start- und EndIndex
- USHORT nElem; // Anzahl Elemente
+ sal_uLong nStart, nEnd; // Start- und EndIndex
+ sal_uInt16 nElem; // Anzahl Elemente
};
class SW_DLLPUBLIC BigPtrArray
{
BlockInfo** ppInf; // Block-Infos
- ULONG nSize; // Anzahl Elemente
- USHORT nMaxBlock; // akt. max Anzahl Bloecke
- USHORT nBlock; // Anzahl Bloecke
- USHORT nCur; // letzter Block
+ sal_uLong nSize; // Anzahl Elemente
+ sal_uInt16 nMaxBlock; // akt. max Anzahl Bloecke
+ sal_uInt16 nBlock; // Anzahl Bloecke
+ sal_uInt16 nCur; // letzter Block
- USHORT Index2Block( ULONG ) const; // Blocksuche
- BlockInfo* InsBlock( USHORT ); // Block einfuegen
- void BlockDel( USHORT ); // es wurden Bloecke geloescht
- void UpdIndex( USHORT ); // Indexe neu berechnen
+ sal_uInt16 Index2Block( sal_uLong ) const; // Blocksuche
+ BlockInfo* InsBlock( sal_uInt16 ); // Block einfuegen
+ void BlockDel( sal_uInt16 ); // es wurden Bloecke geloescht
+ void UpdIndex( sal_uInt16 ); // Indexe neu berechnen
protected:
// fuelle alle Bloecke auf.
// Der short gibt in Prozent an, wie voll die Bloecke werden sollen.
// Der ReturnWert besagt, das irgendetwas "getan" wurde
- USHORT Compress( short = COMPRESSLVL );
+ sal_uInt16 Compress( short = COMPRESSLVL );
public:
BigPtrArray();
~BigPtrArray();
- ULONG Count() const { return nSize; }
+ sal_uLong Count() const { return nSize; }
- void Insert( const ElementPtr& r, ULONG pos );
- void Remove( ULONG pos, ULONG n = 1 );
- void Move( ULONG from, ULONG to );
- void Replace( ULONG pos, const ElementPtr& r);
+ void Insert( const ElementPtr& r, sal_uLong pos );
+ void Remove( sal_uLong pos, sal_uLong n = 1 );
+ void Move( sal_uLong from, sal_uLong to );
+ void Replace( sal_uLong pos, const ElementPtr& r);
- ElementPtr operator[]( ULONG ) const;
+ ElementPtr operator[]( sal_uLong ) const;
void ForEach( FnForEach fn, void* pArgs = NULL )
{
ForEach( 0, nSize, fn, pArgs );
}
- void ForEach( ULONG nStart, ULONG nEnd, FnForEach fn, void* pArgs = NULL );
+ void ForEach( sal_uLong nStart, sal_uLong nEnd, FnForEach fn, void* pArgs = NULL );
};
-inline ULONG BigPtrEntry::GetPos() const
+inline sal_uLong BigPtrEntry::GetPos() const
{
DBG_ASSERT( this == pBlock->pData[ nOffset ], "Element nicht im Block" );
return pBlock->nStart + nOffset;
diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx
index 4c016593fab6..9427b4d26c6e 100644
--- a/sw/inc/breakit.hxx
+++ b/sw/inc/breakit.hxx
@@ -108,8 +108,8 @@ public:
return *m_pForbidden;
}
- USHORT GetRealScriptOfText( const String& rTxt, xub_StrLen nPos ) const;
- USHORT GetAllScriptsOfText( const String& rTxt ) const;
+ sal_uInt16 GetRealScriptOfText( const String& rTxt, xub_StrLen nPos ) const;
+ sal_uInt16 GetAllScriptsOfText( const String& rTxt ) const;
};
#define SW_BREAKITER() SwBreakIt::Get()
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 6ce5e181947a..407688df2a5f 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -65,14 +65,14 @@ class SW_DLLPUBLIC SwClient
friend class SwClientIter;
SwClient *pLeft, *pRight; // fuer die AVL-Sortierung
- BOOL bModifyLocked : 1; // wird in SwModify::Modify benutzt,
+ sal_Bool bModifyLocked : 1; // wird in SwModify::Modify benutzt,
// eigentlich ein Member des SwModify
// aber aus Platzgruenden hier.
- BOOL bInModify : 1; // ist in einem Modify. (Debug!!!)
- BOOL bInDocDTOR : 1; // Doc wird zerstoert, nicht "abmelden"
- BOOL bInCache : 1; // Ist im BorderAttrCache des Layout,
+ sal_Bool bInModify : 1; // ist in einem Modify. (Debug!!!)
+ sal_Bool bInDocDTOR : 1; // Doc wird zerstoert, nicht "abmelden"
+ sal_Bool bInCache : 1; // Ist im BorderAttrCache des Layout,
// Traegt sich dann im Modify aus!
- BOOL bInSwFntCache : 1; // Ist im SwFont-Cache der Formatierung
+ sal_Bool bInSwFntCache : 1; // Ist im SwFont-Cache der Formatierung
protected:
SwModify *pRegisteredIn;
@@ -92,17 +92,17 @@ public:
//werden.
TYPEINFO();
- void LockModify() { bModifyLocked = TRUE; }
- void UnlockModify() { bModifyLocked = FALSE; }
- void SetInCache( BOOL bNew ) { bInCache = bNew; }
- void SetInSwFntCache( BOOL bNew ) { bInSwFntCache = bNew; }
- BOOL IsModifyLocked() const { return bModifyLocked; }
- BOOL IsInDocDTOR() const { return bInDocDTOR; }
- BOOL IsInCache() const { return bInCache; }
- BOOL IsInSwFntCache() const { return bInSwFntCache; }
+ void LockModify() { bModifyLocked = sal_True; }
+ void UnlockModify() { bModifyLocked = sal_False; }
+ void SetInCache( sal_Bool bNew ) { bInCache = bNew; }
+ void SetInSwFntCache( sal_Bool bNew ) { bInSwFntCache = bNew; }
+ sal_Bool IsModifyLocked() const { return bModifyLocked; }
+ sal_Bool IsInDocDTOR() const { return bInDocDTOR; }
+ sal_Bool IsInCache() const { return bInCache; }
+ sal_Bool IsInSwFntCache() const { return bInSwFntCache; }
// erfrage vom Client Informationen
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
private:
SwClient( const SwClient& );
@@ -111,7 +111,7 @@ private:
inline SwClient::SwClient() :
pLeft(0), pRight(0), pRegisteredIn(0)
-{ bModifyLocked = bInModify = bInDocDTOR = bInCache = bInSwFntCache = FALSE; }
+{ bModifyLocked = bInModify = bInDocDTOR = bInCache = bInSwFntCache = sal_False; }
// ----------
@@ -144,13 +144,13 @@ public:
const SwClient* GetDepends() const { return pRoot; }
// erfrage vom Client Informationen
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
- void SetInDocDTOR() { bInDocDTOR = TRUE; }
+ void SetInDocDTOR() { bInDocDTOR = sal_True; }
- void CheckCaching( const USHORT nWhich );
+ void CheckCaching( const sal_uInt16 nWhich );
- BOOL IsLastDepend() const
+ sal_Bool IsLastDepend() const
{ return pRoot && !pRoot->pLeft && !pRoot->pRight; }
private:
@@ -185,7 +185,7 @@ public:
virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
// erfrage vom Client Informationen
- virtual BOOL GetInfo( SfxPoolItem & ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem & ) const;
private:
// forbidden and not implemented (see @ SwClient).
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 4db19fc9a29d..996f6edb2b2a 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -133,7 +133,7 @@ public:
// Strings sonderbehandeln
- BOOL GetBool() const;
+ sal_Bool GetBool() const;
// Strings sonderbehandeln BOOLs sonderbehandeln
double GetDouble() const;
SwSbxValue& MakeDouble();
@@ -163,9 +163,9 @@ struct SwCalcExp : public SwHash
};
SwHash* Find( const String& rSrch, SwHash** ppTable,
- USHORT nTblSize, USHORT* pPos = 0 );
+ sal_uInt16 nTblSize, sal_uInt16* pPos = 0 );
-void DeleteHashTable( SwHash** ppTable, USHORT nTblSize );
+void DeleteHashTable( SwHash** ppTable, sal_uInt16 nTblSize );
// falls _CalcOp != 0, dann ist das ein gueltiger Operator
struct _CalcOp;
@@ -190,7 +190,7 @@ class SwCalc
const LocaleDataWrapper* pLclData;
CharClass* pCharClass;
- USHORT nListPor;
+ sal_uInt16 nListPor;
SwCalcOper eCurrOper;
SwCalcOper eCurrListOper;
SwCalcError eError;
@@ -201,7 +201,7 @@ class SwCalc
SwSbxValue Term();
SwSbxValue Prim();
- BOOL ParseTime( USHORT*, USHORT*, USHORT* );
+ sal_Bool ParseTime( sal_uInt16*, sal_uInt16*, sal_uInt16* );
String GetColumnName( const String& rName );
String GetDBName( const String& rName );
@@ -215,20 +215,20 @@ public:
~SwCalc();
SwSbxValue Calculate( const String &rStr );
- String GetStrResult( const SwSbxValue& rValue, BOOL bRound = TRUE );
- String GetStrResult( double, BOOL bRound = TRUE );
+ String GetStrResult( const SwSbxValue& rValue, sal_Bool bRound = sal_True );
+ String GetStrResult( double, sal_Bool bRound = sal_True );
SwCalcExp* VarInsert( const String& r );
- SwCalcExp* VarLook( const String &rStr, USHORT ins = 0 );
+ SwCalcExp* VarLook( const String &rStr, sal_uInt16 ins = 0 );
void VarChange( const String& rStr, const SwSbxValue& rValue );
void VarChange( const String& rStr, double );
SwHash** GetVarTable() { return VarTable; }
- BOOL Push( const VoidPtr pPtr );
+ sal_Bool Push( const VoidPtr pPtr );
void Pop( const VoidPtr pPtr );
void SetCalcError( SwCalcError eErr ) { eError = eErr; }
- BOOL IsCalcError() const { return 0 != eError; }
+ sal_Bool IsCalcError() const { return 0 != eError; }
static bool Str2Double( const String& rStr, xub_StrLen& rPos,
double& rVal,
@@ -236,7 +236,7 @@ public:
static bool Str2Double( const String& rStr, xub_StrLen& rPos,
double& rVal, SwDoc *const pDoc );
- SW_DLLPUBLIC static BOOL IsValidVarName( const String& rStr,
+ SW_DLLPUBLIC static sal_Bool IsValidVarName( const String& rStr,
String* pValidName = 0 );
};
diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx
index d91c20409d0a..8e99f943360f 100644
--- a/sw/inc/ccoll.hxx
+++ b/sw/inc/ccoll.hxx
@@ -53,8 +53,8 @@
struct CollName {
// const char* pStr;
- ULONG nCnd;
- ULONG nSubCond;
+ sal_uLong nCnd;
+ sal_uLong nSubCond;
};
//***********************************************************
@@ -63,8 +63,8 @@ struct CollName {
struct CommandStruct
{
- ULONG nCnd;
- ULONG nSubCond;
+ sal_uLong nCnd;
+ sal_uLong nSubCond;
};
//***********************************************************
@@ -81,7 +81,7 @@ class SW_DLLPUBLIC SwCondCollItem : public SfxPoolItem
String sStyles[COND_COMMAND_COUNT];
public:
- SwCondCollItem(USHORT nWhich = FN_COND_COLL);
+ SwCondCollItem(sal_uInt16 nWhich = FN_COND_COLL);
~SwCondCollItem();
TYPEINFO();
@@ -91,8 +91,8 @@ public:
static const CommandStruct* GetCmds();
- const String& GetStyle(USHORT nPos) const;
- void SetStyle( const String* pStyle, USHORT nPos);
+ const String& GetStyle(sal_uInt16 nPos) const;
+ void SetStyle( const String* pStyle, sal_uInt16 nPos);
};
diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx
index b870da64231f..30f5f3bdc925 100644
--- a/sw/inc/cellatr.hxx
+++ b/sw/inc/cellatr.hxx
@@ -36,10 +36,10 @@
class SW_DLLPUBLIC SwTblBoxNumFormat : public SfxUInt32Item
{
- BOOL bAuto; // automatisch vergebenes Flag
+ sal_Bool bAuto; // automatisch vergebenes Flag
public:
- SwTblBoxNumFormat( UINT32 nFormat = NUMBERFORMAT_TEXT,
- BOOL bAuto = FALSE );
+ SwTblBoxNumFormat( sal_uInt32 nFormat = NUMBERFORMAT_TEXT,
+ sal_Bool bAuto = sal_False );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
@@ -52,8 +52,8 @@ public:
return *this;
}
- BOOL GetAutoFlag() const { return bAuto; }
- void SetAutoFlag( BOOL bFlag = TRUE ) { bAuto = bFlag; }
+ sal_Bool GetAutoFlag() const { return bAuto; }
+ void SetAutoFlag( sal_Bool bFlag = sal_True ) { bAuto = bFlag; }
};
class SwTblBoxFormula : public SfxPoolItem, public SwTableFormula
@@ -110,20 +110,20 @@ public:
//***************************************************************************
-inline const SwTblBoxNumFormat &SwAttrSet::GetTblBoxNumFmt(BOOL bInP) const
+inline const SwTblBoxNumFormat &SwAttrSet::GetTblBoxNumFmt(sal_Bool bInP) const
{ return (const SwTblBoxNumFormat&)Get( RES_BOXATR_FORMAT,bInP); }
-inline const SwTblBoxFormula &SwAttrSet::GetTblBoxFormula(BOOL bInP) const
+inline const SwTblBoxFormula &SwAttrSet::GetTblBoxFormula(sal_Bool bInP) const
{ return (const SwTblBoxFormula&)Get( RES_BOXATR_FORMULA,bInP); }
-inline const SwTblBoxValue &SwAttrSet::GetTblBoxValue(BOOL bInP) const
+inline const SwTblBoxValue &SwAttrSet::GetTblBoxValue(sal_Bool bInP) const
{ return (const SwTblBoxValue&)Get( RES_BOXATR_VALUE, bInP); }
//***************************************************************************
-inline const SwTblBoxNumFormat &SwFmt::GetTblBoxNumFmt(BOOL bInP) const
+inline const SwTblBoxNumFormat &SwFmt::GetTblBoxNumFmt(sal_Bool bInP) const
{ return aSet.GetTblBoxNumFmt(bInP); }
-inline const SwTblBoxFormula &SwFmt::GetTblBoxFormula(BOOL bInP) const
+inline const SwTblBoxFormula &SwFmt::GetTblBoxFormula(sal_Bool bInP) const
{ return aSet.GetTblBoxFormula(bInP); }
-inline const SwTblBoxValue &SwFmt::GetTblBoxValue(BOOL bInP) const
+inline const SwTblBoxValue &SwFmt::GetTblBoxValue(sal_Bool bInP) const
{ return aSet.GetTblBoxValue(bInP); }
#endif
diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx
index df24004a64fb..169058938f56 100644
--- a/sw/inc/cellfml.hxx
+++ b/sw/inc/cellfml.hxx
@@ -43,7 +43,7 @@ class String;
class SwTblCalcPara
{
const SwTableBox* pLastTblBox;
- USHORT nStackCnt, nMaxSize;
+ sal_uInt16 nStackCnt, nMaxSize;
public:
SwTableSortBoxes *pBoxStk; // Stack fuers erkennen von Rekursionen !
@@ -53,9 +53,9 @@ public:
SwTblCalcPara( SwCalc& rCalculator, const SwTable& rTable );
~SwTblCalcPara();
- BOOL CalcWithStackOverflow();
- BOOL IsStackOverFlow() const { return nMaxSize == nStackCnt; }
- BOOL IncStackCnt() { return nMaxSize == ++nStackCnt; }
+ sal_Bool CalcWithStackOverflow();
+ sal_Bool IsStackOverFlow() const { return nMaxSize == nStackCnt; }
+ sal_Bool IncStackCnt() { return nMaxSize == ++nStackCnt; }
void DecStackCnt() { if( nStackCnt ) --nStackCnt; }
void SetLastTblBox( const SwTableBox* pBox ) { pLastTblBox = pBox; }
};
@@ -98,7 +98,7 @@ protected:
String sFormel; // akt. Formel
NameType eNmType; // akt. Darstellungs Art
- BOOL bValidValue; // TRUE: Formel neu berechnen
+ sal_Bool bValidValue; // sal_True: Formel neu berechnen
// suche den Node, in dem die Formel steht:
// TextFeld -> TextNode,
@@ -114,7 +114,7 @@ protected:
*rCalcPara.pTbl, &rCalcPara );
}
- static USHORT GetLnPosInTbl( const SwTable& rTbl, const SwTableBox* pBox );
+ static sal_uInt16 GetLnPosInTbl( const SwTable& rTbl, const SwTableBox* pBox );
public:
@@ -138,25 +138,25 @@ public:
void ToSplitMergeBoxNm( SwTableFmlUpdate& rTblUpd );
// ist gerade eine intern Darstellung aktiv
- BOOL IsIntrnlName() const { return eNmType == INTRNL_NAME; }
+ sal_Bool IsIntrnlName() const { return eNmType == INTRNL_NAME; }
// erfrage die akt. Darstellung der Formel
NameType GetNameType() const { return eNmType; }
// erfrage/setze das Flag, ob der akt. Wert gueltig ist
- BOOL IsValid() const { return bValidValue; }
- inline void ChgValid( BOOL bNew ) { bValidValue = bNew; }
+ sal_Bool IsValid() const { return bValidValue; }
+ inline void ChgValid( sal_Bool bNew ) { bValidValue = bNew; }
const String& GetFormula() const { return sFormel; }
void SetFormula( const String& rNew )
{
sFormel = rNew;
- bValidValue = FALSE;
+ bValidValue = sal_False;
eNmType = EXTRNL_NAME;
}
- USHORT GetBoxesOfFormula( const SwTable& rTbl, SwSelBoxes& rBoxes );
+ sal_uInt16 GetBoxesOfFormula( const SwTable& rTbl, SwSelBoxes& rBoxes );
// sind alle Boxen gueltig, auf die sich die Formel bezieht?
- BOOL HasValidBoxes() const;
+ sal_Bool HasValidBoxes() const;
};
diff --git a/sw/inc/charatr.hxx b/sw/inc/charatr.hxx
index f9c4e113ea61..ba0040797a74 100644
--- a/sw/inc/charatr.hxx
+++ b/sw/inc/charatr.hxx
@@ -36,79 +36,79 @@
* AMA 12.10.94: Umstellung auf SvxItems.
******************************************************************************/
-inline const SvxPostureItem &SwAttrSet::GetPosture(BOOL bInP) const
+inline const SvxPostureItem &SwAttrSet::GetPosture(sal_Bool bInP) const
{ return (const SvxPostureItem&)Get( RES_CHRATR_POSTURE,bInP); }
-inline const SvxPostureItem &SwAttrSet::GetCJKPosture(BOOL bInP) const
+inline const SvxPostureItem &SwAttrSet::GetCJKPosture(sal_Bool bInP) const
{ return (const SvxPostureItem&)Get( RES_CHRATR_CJK_POSTURE,bInP); }
-inline const SvxPostureItem &SwAttrSet::GetCTLPosture(BOOL bInP) const
+inline const SvxPostureItem &SwAttrSet::GetCTLPosture(sal_Bool bInP) const
{ return (const SvxPostureItem&)Get( RES_CHRATR_CTL_POSTURE,bInP); }
-inline const SvxWeightItem &SwAttrSet::GetWeight(BOOL bInP) const
+inline const SvxWeightItem &SwAttrSet::GetWeight(sal_Bool bInP) const
{ return (const SvxWeightItem&)Get( RES_CHRATR_WEIGHT,bInP); }
-inline const SvxWeightItem &SwAttrSet::GetCJKWeight(BOOL bInP) const
+inline const SvxWeightItem &SwAttrSet::GetCJKWeight(sal_Bool bInP) const
{ return (const SvxWeightItem&)Get( RES_CHRATR_CJK_WEIGHT,bInP); }
-inline const SvxWeightItem &SwAttrSet::GetCTLWeight(BOOL bInP) const
+inline const SvxWeightItem &SwAttrSet::GetCTLWeight(sal_Bool bInP) const
{ return (const SvxWeightItem&)Get( RES_CHRATR_CTL_WEIGHT,bInP); }
-inline const SvxShadowedItem &SwAttrSet::GetShadowed(BOOL bInP) const
+inline const SvxShadowedItem &SwAttrSet::GetShadowed(sal_Bool bInP) const
{ return (const SvxShadowedItem&)Get( RES_CHRATR_SHADOWED,bInP); }
-inline const SvxAutoKernItem &SwAttrSet::GetAutoKern(BOOL bInP) const
+inline const SvxAutoKernItem &SwAttrSet::GetAutoKern(sal_Bool bInP) const
{ return (const SvxAutoKernItem&)Get( RES_CHRATR_AUTOKERN,bInP); }
-inline const SvxWordLineModeItem &SwAttrSet::GetWordLineMode(BOOL bInP) const
+inline const SvxWordLineModeItem &SwAttrSet::GetWordLineMode(sal_Bool bInP) const
{ return (const SvxWordLineModeItem&)Get( RES_CHRATR_WORDLINEMODE,bInP); }
-inline const SvxContourItem &SwAttrSet::GetContour(BOOL bInP) const
+inline const SvxContourItem &SwAttrSet::GetContour(sal_Bool bInP) const
{ return (const SvxContourItem&)Get( RES_CHRATR_CONTOUR,bInP); }
-inline const SvxKerningItem &SwAttrSet::GetKerning(BOOL bInP) const
+inline const SvxKerningItem &SwAttrSet::GetKerning(sal_Bool bInP) const
{ return (const SvxKerningItem&)Get( RES_CHRATR_KERNING,bInP); }
-inline const SvxUnderlineItem &SwAttrSet::GetUnderline(BOOL bInP) const
+inline const SvxUnderlineItem &SwAttrSet::GetUnderline(sal_Bool bInP) const
{ return (const SvxUnderlineItem&)Get( RES_CHRATR_UNDERLINE,bInP); }
-inline const SvxOverlineItem &SwAttrSet::GetOverline(BOOL bInP) const
+inline const SvxOverlineItem &SwAttrSet::GetOverline(sal_Bool bInP) const
{ return (const SvxOverlineItem&)Get( RES_CHRATR_OVERLINE,bInP); }
-inline const SvxCrossedOutItem &SwAttrSet::GetCrossedOut(BOOL bInP) const
+inline const SvxCrossedOutItem &SwAttrSet::GetCrossedOut(sal_Bool bInP) const
{ return (const SvxCrossedOutItem&)Get( RES_CHRATR_CROSSEDOUT,bInP); }
-inline const SvxFontHeightItem &SwAttrSet::GetSize(BOOL bInP) const
+inline const SvxFontHeightItem &SwAttrSet::GetSize(sal_Bool bInP) const
{ return (const SvxFontHeightItem&)Get( RES_CHRATR_FONTSIZE,bInP); }
-inline const SvxFontHeightItem &SwAttrSet::GetCJKSize(BOOL bInP) const
+inline const SvxFontHeightItem &SwAttrSet::GetCJKSize(sal_Bool bInP) const
{ return (const SvxFontHeightItem&)Get( RES_CHRATR_CJK_FONTSIZE,bInP); }
-inline const SvxFontHeightItem &SwAttrSet::GetCTLSize(BOOL bInP) const
+inline const SvxFontHeightItem &SwAttrSet::GetCTLSize(sal_Bool bInP) const
{ return (const SvxFontHeightItem&)Get( RES_CHRATR_CTL_FONTSIZE,bInP); }
-inline const SvxPropSizeItem &SwAttrSet::GetPropSize(BOOL bInP) const
+inline const SvxPropSizeItem &SwAttrSet::GetPropSize(sal_Bool bInP) const
{ return (const SvxPropSizeItem&)Get( RES_CHRATR_PROPORTIONALFONTSIZE,bInP); }
-inline const SvxFontItem &SwAttrSet::GetFont(BOOL bInP) const
+inline const SvxFontItem &SwAttrSet::GetFont(sal_Bool bInP) const
{ return (const SvxFontItem&)Get( RES_CHRATR_FONT,bInP); }
-inline const SvxFontItem &SwAttrSet::GetCJKFont(BOOL bInP) const
+inline const SvxFontItem &SwAttrSet::GetCJKFont(sal_Bool bInP) const
{ return (const SvxFontItem&)Get( RES_CHRATR_CJK_FONT,bInP); }
-inline const SvxFontItem &SwAttrSet::GetCTLFont(BOOL bInP) const
+inline const SvxFontItem &SwAttrSet::GetCTLFont(sal_Bool bInP) const
{ return (const SvxFontItem&)Get( RES_CHRATR_CTL_FONT,bInP); }
-inline const SvxColorItem &SwAttrSet::GetColor(BOOL bInP) const
+inline const SvxColorItem &SwAttrSet::GetColor(sal_Bool bInP) const
{ return (const SvxColorItem&)Get( RES_CHRATR_COLOR,bInP); }
-inline const SvxCharSetColorItem &SwAttrSet::GetCharSetColor(BOOL bInP) const
+inline const SvxCharSetColorItem &SwAttrSet::GetCharSetColor(sal_Bool bInP) const
{ return (const SvxCharSetColorItem&)Get( RES_CHRATR_CHARSETCOLOR,bInP); }
-inline const SvxLanguageItem &SwAttrSet::GetLanguage(BOOL bInP) const
+inline const SvxLanguageItem &SwAttrSet::GetLanguage(sal_Bool bInP) const
{ return (const SvxLanguageItem&)Get( RES_CHRATR_LANGUAGE,bInP); }
-inline const SvxLanguageItem &SwAttrSet::GetCJKLanguage(BOOL bInP) const
+inline const SvxLanguageItem &SwAttrSet::GetCJKLanguage(sal_Bool bInP) const
{ return (const SvxLanguageItem&)Get( RES_CHRATR_CJK_LANGUAGE,bInP); }
-inline const SvxLanguageItem &SwAttrSet::GetCTLLanguage(BOOL bInP) const
+inline const SvxLanguageItem &SwAttrSet::GetCTLLanguage(sal_Bool bInP) const
{ return (const SvxLanguageItem&)Get( RES_CHRATR_CTL_LANGUAGE,bInP); }
-inline const SvxEscapementItem &SwAttrSet::GetEscapement(BOOL bInP) const
+inline const SvxEscapementItem &SwAttrSet::GetEscapement(sal_Bool bInP) const
{ return (const SvxEscapementItem&)Get( RES_CHRATR_ESCAPEMENT,bInP); }
-inline const SvxCaseMapItem &SwAttrSet::GetCaseMap(BOOL bInP) const
+inline const SvxCaseMapItem &SwAttrSet::GetCaseMap(sal_Bool bInP) const
{ return (const SvxCaseMapItem&)Get( RES_CHRATR_CASEMAP,bInP); }
-inline const SvxNoHyphenItem &SwAttrSet::GetNoHyphenHere(BOOL bInP) const
+inline const SvxNoHyphenItem &SwAttrSet::GetNoHyphenHere(sal_Bool bInP) const
{ return (const SvxNoHyphenItem&)Get( RES_CHRATR_NOHYPHEN,bInP); }
-inline const SvxBlinkItem &SwAttrSet::GetBlink(BOOL bInP) const
+inline const SvxBlinkItem &SwAttrSet::GetBlink(sal_Bool bInP) const
{ return (const SvxBlinkItem&)Get( RES_CHRATR_BLINK,bInP); }
-inline const SvxBrushItem &SwAttrSet::GetChrBackground( BOOL bInP ) const
+inline const SvxBrushItem &SwAttrSet::GetChrBackground( sal_Bool bInP ) const
{ return (const SvxBrushItem&)Get( RES_CHRATR_BACKGROUND, bInP ); }
-inline const SvxEmphasisMarkItem &SwAttrSet::GetEmphasisMark( BOOL bInP ) const
+inline const SvxEmphasisMarkItem &SwAttrSet::GetEmphasisMark( sal_Bool bInP ) const
{ return (const SvxEmphasisMarkItem&)Get( RES_CHRATR_EMPHASIS_MARK, bInP ); }
-inline const SvxTwoLinesItem &SwAttrSet::Get2Lines( BOOL bInP ) const
+inline const SvxTwoLinesItem &SwAttrSet::Get2Lines( sal_Bool bInP ) const
{ return (const SvxTwoLinesItem&)Get( RES_CHRATR_TWO_LINES, bInP ); }
-inline const SvxCharScaleWidthItem &SwAttrSet::GetCharScaleW( BOOL bInP ) const
+inline const SvxCharScaleWidthItem &SwAttrSet::GetCharScaleW( sal_Bool bInP ) const
{ return (const SvxCharScaleWidthItem&)Get( RES_CHRATR_SCALEW, bInP ); }
-inline const SvxCharRotateItem &SwAttrSet::GetCharRotate( BOOL bInP ) const
+inline const SvxCharRotateItem &SwAttrSet::GetCharRotate( sal_Bool bInP ) const
{ return (const SvxCharRotateItem&)Get( RES_CHRATR_ROTATE, bInP ); }
-inline const SvxCharReliefItem &SwAttrSet::GetCharRelief( BOOL bInP ) const
+inline const SvxCharReliefItem &SwAttrSet::GetCharRelief( sal_Bool bInP ) const
{ return (const SvxCharReliefItem&)Get( RES_CHRATR_RELIEF, bInP ); }
-inline const SvxCharHiddenItem &SwAttrSet::GetCharHidden( BOOL bInP ) const
+inline const SvxCharHiddenItem &SwAttrSet::GetCharHidden( sal_Bool bInP ) const
{ return (const SvxCharHiddenItem&)Get( RES_CHRATR_HIDDEN, bInP ); }
/******************************************************************************
@@ -116,63 +116,63 @@ inline const SvxCharHiddenItem &SwAttrSet::GetCharHidden( BOOL bInP ) const
* AMA: 12.10.94: Umstellung auf SvxItems.
******************************************************************************/
-inline const SvxPostureItem &SwFmt::GetPosture(BOOL bInP) const
+inline const SvxPostureItem &SwFmt::GetPosture(sal_Bool bInP) const
{ return aSet.GetPosture(bInP); }
-inline const SvxWeightItem &SwFmt::GetWeight(BOOL bInP) const
+inline const SvxWeightItem &SwFmt::GetWeight(sal_Bool bInP) const
{ return aSet.GetWeight(bInP); }
-inline const SvxShadowedItem &SwFmt::GetShadowed(BOOL bInP) const
+inline const SvxShadowedItem &SwFmt::GetShadowed(sal_Bool bInP) const
{ return aSet.GetShadowed(bInP); }
-inline const SvxAutoKernItem &SwFmt::GetAutoKern(BOOL bInP) const
+inline const SvxAutoKernItem &SwFmt::GetAutoKern(sal_Bool bInP) const
{ return aSet.GetAutoKern(bInP); }
-inline const SvxWordLineModeItem &SwFmt::GetWordLineMode(BOOL bInP) const
+inline const SvxWordLineModeItem &SwFmt::GetWordLineMode(sal_Bool bInP) const
{ return aSet.GetWordLineMode(bInP); }
-inline const SvxContourItem &SwFmt::GetContour(BOOL bInP) const
+inline const SvxContourItem &SwFmt::GetContour(sal_Bool bInP) const
{ return aSet.GetContour(bInP); }
-inline const SvxKerningItem &SwFmt::GetKerning(BOOL bInP) const
+inline const SvxKerningItem &SwFmt::GetKerning(sal_Bool bInP) const
{ return aSet.GetKerning(bInP); }
-inline const SvxUnderlineItem &SwFmt::GetUnderline(BOOL bInP) const
+inline const SvxUnderlineItem &SwFmt::GetUnderline(sal_Bool bInP) const
{ return aSet.GetUnderline(bInP); }
-inline const SvxOverlineItem &SwFmt::GetOverline(BOOL bInP) const
+inline const SvxOverlineItem &SwFmt::GetOverline(sal_Bool bInP) const
{ return aSet.GetOverline(bInP); }
-inline const SvxCrossedOutItem &SwFmt::GetCrossedOut(BOOL bInP) const
+inline const SvxCrossedOutItem &SwFmt::GetCrossedOut(sal_Bool bInP) const
{ return aSet.GetCrossedOut(bInP); }
-inline const SvxFontHeightItem &SwFmt::GetSize(BOOL bInP) const
+inline const SvxFontHeightItem &SwFmt::GetSize(sal_Bool bInP) const
{ return aSet.GetSize(bInP); }
-inline const SvxPropSizeItem &SwFmt::GetPropSize(BOOL bInP) const
+inline const SvxPropSizeItem &SwFmt::GetPropSize(sal_Bool bInP) const
{ return aSet.GetPropSize(bInP); }
-inline const SvxFontItem &SwFmt::GetFont(BOOL bInP) const
+inline const SvxFontItem &SwFmt::GetFont(sal_Bool bInP) const
{ return aSet.GetFont(bInP); }
-inline const SvxFontItem &SwFmt::GetCJKFont(BOOL bInP) const
+inline const SvxFontItem &SwFmt::GetCJKFont(sal_Bool bInP) const
{ return aSet.GetCJKFont(bInP); }
-inline const SvxFontItem &SwFmt::GetCTLFont(BOOL bInP) const
+inline const SvxFontItem &SwFmt::GetCTLFont(sal_Bool bInP) const
{ return aSet.GetCTLFont(bInP); }
-inline const SvxColorItem &SwFmt::GetColor(BOOL bInP) const
+inline const SvxColorItem &SwFmt::GetColor(sal_Bool bInP) const
{ return aSet.GetColor(bInP); }
- inline const SvxCharSetColorItem &SwFmt::GetCharSetColor(BOOL bInP) const
+ inline const SvxCharSetColorItem &SwFmt::GetCharSetColor(sal_Bool bInP) const
{ return aSet.GetCharSetColor(bInP); }
-inline const SvxLanguageItem &SwFmt::GetLanguage(BOOL bInP) const
+inline const SvxLanguageItem &SwFmt::GetLanguage(sal_Bool bInP) const
{ return aSet.GetLanguage(bInP); }
-inline const SvxEscapementItem &SwFmt::GetEscapement(BOOL bInP) const
+inline const SvxEscapementItem &SwFmt::GetEscapement(sal_Bool bInP) const
{ return aSet.GetEscapement(bInP); }
-inline const SvxCaseMapItem &SwFmt::GetCaseMap(BOOL bInP) const
+inline const SvxCaseMapItem &SwFmt::GetCaseMap(sal_Bool bInP) const
{ return aSet.GetCaseMap(bInP); }
-inline const SvxNoHyphenItem &SwFmt::GetNoHyphenHere(BOOL bInP) const
+inline const SvxNoHyphenItem &SwFmt::GetNoHyphenHere(sal_Bool bInP) const
{ return aSet.GetNoHyphenHere(bInP); }
-inline const SvxBlinkItem &SwFmt::GetBlink(BOOL bInP) const
+inline const SvxBlinkItem &SwFmt::GetBlink(sal_Bool bInP) const
{ return aSet.GetBlink(bInP); }
-inline const SvxBrushItem &SwFmt::GetChrBackground(BOOL bInP) const
+inline const SvxBrushItem &SwFmt::GetChrBackground(sal_Bool bInP) const
{ return aSet.GetChrBackground(bInP); }
-inline const SvxEmphasisMarkItem &SwFmt::GetEmphasisMark( BOOL bInP ) const
+inline const SvxEmphasisMarkItem &SwFmt::GetEmphasisMark( sal_Bool bInP ) const
{ return aSet.GetEmphasisMark(bInP); }
-inline const SvxTwoLinesItem &SwFmt::Get2Lines( BOOL bInP ) const
+inline const SvxTwoLinesItem &SwFmt::Get2Lines( sal_Bool bInP ) const
{ return aSet.Get2Lines(bInP); }
-inline const SvxCharScaleWidthItem &SwFmt::GetCharScaleW( BOOL bInP ) const
+inline const SvxCharScaleWidthItem &SwFmt::GetCharScaleW( sal_Bool bInP ) const
{ return aSet.GetCharScaleW(bInP); }
-inline const SvxCharRotateItem &SwFmt::GetCharRotate( BOOL bInP ) const
+inline const SvxCharRotateItem &SwFmt::GetCharRotate( sal_Bool bInP ) const
{ return aSet.GetCharRotate(bInP); }
-inline const SvxCharReliefItem &SwFmt::GetCharRelief( BOOL bInP ) const
+inline const SvxCharReliefItem &SwFmt::GetCharRelief( sal_Bool bInP ) const
{ return aSet.GetCharRelief(bInP); }
-inline const SvxCharHiddenItem &SwFmt::GetCharHidden( BOOL bInP ) const
+inline const SvxCharHiddenItem &SwFmt::GetCharHidden( sal_Bool bInP ) const
{ return aSet.GetCharHidden(bInP); }
#endif
diff --git a/sw/inc/charfmt.hxx b/sw/inc/charfmt.hxx
index a3e4b22a0b88..3b018fcff186 100644
--- a/sw/inc/charfmt.hxx
+++ b/sw/inc/charfmt.hxx
@@ -51,8 +51,8 @@ public:
namespace CharFmt
{
extern const SfxItemSet* GetItemSet( const SfxPoolItem& rAttr );
- extern const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, USHORT nWhich );
- extern BOOL IsItemIncluded( const USHORT nWhich, const SwTxtAttr *pAttr );
+ extern const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, sal_uInt16 nWhich );
+ extern sal_Bool IsItemIncluded( const sal_uInt16 nWhich, const SwTxtAttr *pAttr );
}
#endif
diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx
index 5d63c866c68d..195b76f163d1 100644
--- a/sw/inc/chpfld.hxx
+++ b/sw/inc/chpfld.hxx
@@ -67,7 +67,7 @@ public:
class SW_DLLPUBLIC SwChapterField : public SwField
{
friend class SwChapterFieldType;
- BYTE nLevel;
+ sal_uInt8 nLevel;
String sTitle, sNumber, sPre, sPost;
virtual String Expand() const;
@@ -79,24 +79,24 @@ public:
// --> OD 2008-02-14 #i53420#
// void ChangeExpansion( const SwFrm*,
// const SwTxtNode*,
-// BOOL bSrchNum = FALSE);
+// sal_Bool bSrchNum = sal_False);
void ChangeExpansion( const SwFrm*,
const SwCntntNode*,
- BOOL bSrchNum = FALSE);
+ sal_Bool bSrchNum = sal_False);
// <--
- void ChangeExpansion(const SwTxtNode &rNd, BOOL bSrchNum);
+ void ChangeExpansion(const SwTxtNode &rNd, sal_Bool bSrchNum);
- inline BYTE GetLevel() const;
- inline void SetLevel(BYTE);
+ inline sal_uInt8 GetLevel() const;
+ inline void SetLevel(sal_uInt8);
inline const String& GetNumber() const;
inline const String& GetTitle() const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
-inline BYTE SwChapterField::GetLevel() const { return nLevel; }
-inline void SwChapterField::SetLevel(BYTE nLev) { nLevel = nLev; }
+inline sal_uInt8 SwChapterField::GetLevel() const { return nLevel; }
+inline void SwChapterField::SetLevel(sal_uInt8 nLev) { nLevel = nLev; }
inline const String& SwChapterField::GetNumber() const { return sNumber; }
inline const String& SwChapterField::GetTitle() const { return sTitle; }
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 22cb3613502e..567bc5746c8b 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -139,7 +139,7 @@ struct SwContentAtPos
}
// befindet sich der Node in einem geschuetzten Bereich?
- BOOL IsInProtectSect() const;
+ sal_Bool IsInProtectSect() const;
bool IsInRTLText()const;
};
@@ -160,7 +160,7 @@ class SW_DLLPUBLIC SwCrsrShell : public ViewShell, public SwModify
friend class SwChgLinkFlag;
//Braucht den Crsr als IntrnlCrsr.
- friend BOOL GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
+ friend sal_Bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
public: // public, damit defaultet werden kann !!
@@ -204,9 +204,9 @@ private:
long nUpDownX; // versuche den Cursor bei Up/Down immer in
// der gleichen Spalte zu bewegen
long nLeftFrmPos;
- ULONG nAktNode; // save CursorPos at Start-Action
+ sal_uLong nAktNode; // save CursorPos at Start-Action
xub_StrLen nAktCntnt;
- USHORT nAktNdTyp;
+ sal_uInt16 nAktNdTyp;
bool bAktSelection;
/*
@@ -215,8 +215,8 @@ private:
* auf den akt. Cursor kein Update. Dadurch koennen "komplizierte"
* Cursorbewegungen (ueber Find()) realisiert werden.
*/
- USHORT nCrsrMove;
- USHORT nBasicActionCnt; // Actions, die vom Basic geklammert wurden
+ sal_uInt16 nCrsrMove;
+ sal_uInt16 nBasicActionCnt; // Actions, die vom Basic geklammert wurden
CrsrMoveState eMvState; // Status fuers Crsr-Travelling - GetCrsrOfst
// --> OD 2008-04-02 #refactorlists#
@@ -224,35 +224,35 @@ private:
int nMarkedListLevel;
// <--
- BOOL bHasFocus : 1; // Shell ist in einem Window "aktiv"
- BOOL bSVCrsrVis : 1; // SV-Cursor Un-/Sichtbar
- BOOL bChgCallFlag : 1; // Attributaenderung innerhalb von
+ sal_Bool bHasFocus : 1; // Shell ist in einem Window "aktiv"
+ sal_Bool bSVCrsrVis : 1; // SV-Cursor Un-/Sichtbar
+ sal_Bool bChgCallFlag : 1; // Attributaenderung innerhalb von
// Start- und EndAction
- BOOL bVisPortChgd : 1; // befindet sich im VisPortChg-Aufruf
+ sal_Bool bVisPortChgd : 1; // befindet sich im VisPortChg-Aufruf
// (wird im Invalidate vom Cursor benutzt)
- BOOL bCallChgLnk : 1; // Flag fuer abgeleitete Klassen:
- // TRUE -> ChgLnk callen
+ sal_Bool bCallChgLnk : 1; // Flag fuer abgeleitete Klassen:
+ // sal_True -> ChgLnk callen
// Zugriff nur ueber SwChgLinkFlag
- BOOL bAllProtect : 1; // Flag fuer Bereiche
- // TRUE -> alles geschuetzt / versteckt
- BOOL bInCMvVisportChgd : 1; // Flag fuer CrsrMoves
- // TRUE -> die Sicht wurde verschoben
- BOOL bGCAttr : 1; // TRUE -> es existieren nichtaufgespannte Attr.
- BOOL bIgnoreReadonly : 1; // TRUE -> Beim naechsten EndAction trotz
+ sal_Bool bAllProtect : 1; // Flag fuer Bereiche
+ // sal_True -> alles geschuetzt / versteckt
+ sal_Bool bInCMvVisportChgd : 1; // Flag fuer CrsrMoves
+ // sal_True -> die Sicht wurde verschoben
+ sal_Bool bGCAttr : 1; // sal_True -> es existieren nichtaufgespannte Attr.
+ sal_Bool bIgnoreReadonly : 1; // sal_True -> Beim naechsten EndAction trotz
// Readonly den Crsr sichtbar machen.
- BOOL bSelTblCells : 1; // TRUE -> Zellen uebers InputWin selektieren
- BOOL bAutoUpdateCells : 1; // TRUE -> Zellen werden autoformatiert
- BOOL bBasicHideCrsr : 1; // TRUE -> HideCrsr vom Basic
- BOOL bSetCrsrInReadOnly : 1;// TRUE -> Cursor darf in ReadOnly-Bereiche
- BOOL bOverwriteCrsr : 1; // TRUE -> show Overwrite Crsr
+ sal_Bool bSelTblCells : 1; // sal_True -> Zellen uebers InputWin selektieren
+ sal_Bool bAutoUpdateCells : 1; // sal_True -> Zellen werden autoformatiert
+ sal_Bool bBasicHideCrsr : 1; // sal_True -> HideCrsr vom Basic
+ sal_Bool bSetCrsrInReadOnly : 1;// sal_True -> Cursor darf in ReadOnly-Bereiche
+ sal_Bool bOverwriteCrsr : 1; // sal_True -> show Overwrite Crsr
// OD 11.02.2003 #100556# - flag to allow/avoid execution of marcos (default: true)
bool mbMacroExecAllowed : 1;
- SW_DLLPRIVATE void UpdateCrsr( USHORT eFlags
+ SW_DLLPRIVATE void UpdateCrsr( sal_uInt16 eFlags
=SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE,
- BOOL bIdleEnd = FALSE );
+ sal_Bool bIdleEnd = sal_False );
SW_DLLPRIVATE void _ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing );
@@ -273,21 +273,21 @@ private:
// <- #i27615#
// private method(s) accessed from public inline method(s) must be exported.
- BOOL LeftRight( BOOL, USHORT, USHORT, BOOL );
- SW_DLLPRIVATE BOOL UpDown( BOOL, USHORT );
- SW_DLLPRIVATE BOOL LRMargin( BOOL, BOOL bAPI = FALSE );
- SW_DLLPRIVATE BOOL IsAtLRMargin( BOOL, BOOL bAPI = FALSE ) const;
+ sal_Bool LeftRight( sal_Bool, sal_uInt16, sal_uInt16, sal_Bool );
+ SW_DLLPRIVATE sal_Bool UpDown( sal_Bool, sal_uInt16 );
+ SW_DLLPRIVATE sal_Bool LRMargin( sal_Bool, sal_Bool bAPI = sal_False );
+ SW_DLLPRIVATE sal_Bool IsAtLRMargin( sal_Bool, sal_Bool bAPI = sal_False ) const;
SW_DLLPRIVATE short GetTextDirection( const Point* pPt = 0 ) const;
-typedef BOOL (SwCursor:: *FNCrsr)();
- SW_DLLPRIVATE BOOL CallCrsrFN( FNCrsr );
+typedef sal_Bool (SwCursor:: *FNCrsr)();
+ SW_DLLPRIVATE sal_Bool CallCrsrFN( FNCrsr );
- SW_DLLPRIVATE const SwRedline* _GotoRedline( USHORT nArrPos, BOOL bSelect );
+ SW_DLLPRIVATE const SwRedline* _GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect );
protected:
- inline SwMoveFnCollection* MakeFindRange( USHORT, USHORT, SwPaM* ) const;
+ inline SwMoveFnCollection* MakeFindRange( sal_uInt16, sal_uInt16, SwPaM* ) const;
/*
* Compare-Methode for the StackCursor and the current Cursor.
@@ -309,11 +309,11 @@ protected:
const xub_StrLen nOffset = 0 );
// --> FME 2004-07-30 #i32329# Enhanced table selection
- BOOL _SelTblRowOrCol( bool bRow, bool bRowSimple = false );
+ sal_Bool _SelTblRowOrCol( bool bRow, bool bRowSimple = false );
// <--
// --> FME 2005-01-31 #i41424# Only update the marked number levels if necessary
- bool SetInFrontOfLabel( BOOL bNew );
+ bool SetInFrontOfLabel( sal_Bool bNew );
// <--
void RefreshBlockCursor();
@@ -334,7 +334,7 @@ public:
// neuen Cusror erzeugen und den alten anhaengen
SwPaM * CreateCrsr();
// loesche den aktuellen Cursor und der folgende wird zum Aktuellen
- BOOL DestroyCrsr();
+ sal_Bool DestroyCrsr();
// TableCursor in normale Cursor verwandeln, Tablemode aufheben
void TblCrsrToCursor();
// enter block mode, change normal cursor into block cursor
@@ -347,8 +347,8 @@ public:
// only for usage in special cases allowed!
void ExtendedSelectAll();
- SwPaM* GetCrsr( BOOL bMakeTblCrsr = TRUE ) const;
- inline SwCursor* GetSwCrsr( BOOL bMakeTblCrsr = TRUE ) const;
+ SwPaM* GetCrsr( sal_Bool bMakeTblCrsr = sal_True ) const;
+ inline SwCursor* GetSwCrsr( sal_Bool bMakeTblCrsr = sal_True ) const;
// nur den akt. Cursor returnen
SwShellCrsr* _GetCrsr() { return pCurCrsr; }
const SwShellCrsr* _GetCrsr() const { return pCurCrsr; }
@@ -367,43 +367,43 @@ public:
// Start der Klammerung, SV-Cursor und selektierte Bereiche hiden
void StartAction();
// Ende der Klammerung, SV-Cursor und selektierte Bereiche anzeigen
- void EndAction( const BOOL bIdleEnd = FALSE );
+ void EndAction( const sal_Bool bIdleEnd = sal_False );
// Basiscursortravelling
long GetUpDownX() const { return nUpDownX; }
- BOOL Left( USHORT nCnt, USHORT nMode, BOOL bAllowVisual = FALSE )
- { return LeftRight( TRUE, nCnt, nMode, bAllowVisual ); }
- BOOL Right( USHORT nCnt, USHORT nMode, BOOL bAllowVisual = FALSE )
- { return LeftRight( FALSE, nCnt, nMode, bAllowVisual ); }
- BOOL Up( USHORT nCnt = 1 ) { return UpDown( TRUE, nCnt ); }
- BOOL Down( USHORT nCnt = 1 ) { return UpDown( FALSE, nCnt ); }
- BOOL LeftMargin() { return LRMargin( TRUE ); }
- BOOL RightMargin(BOOL bAPI = FALSE) { return LRMargin( FALSE, bAPI ); }
- BOOL SttEndDoc( BOOL bStt );
-
- BOOL MovePage( SwWhichPage, SwPosPage );
- BOOL MovePara( SwWhichPara, SwPosPara );
- BOOL MoveSection( SwWhichSection, SwPosSection );
- BOOL MoveTable( SwWhichTable, SwPosTable );
- BOOL MoveColumn( SwWhichColumn, SwPosColumn );
- BOOL MoveRegion( SwWhichRegion, SwPosRegion );
+ sal_Bool Left( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual = sal_False )
+ { return LeftRight( sal_True, nCnt, nMode, bAllowVisual ); }
+ sal_Bool Right( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual = sal_False )
+ { return LeftRight( sal_False, nCnt, nMode, bAllowVisual ); }
+ sal_Bool Up( sal_uInt16 nCnt = 1 ) { return UpDown( sal_True, nCnt ); }
+ sal_Bool Down( sal_uInt16 nCnt = 1 ) { return UpDown( sal_False, nCnt ); }
+ sal_Bool LeftMargin() { return LRMargin( sal_True ); }
+ sal_Bool RightMargin(sal_Bool bAPI = sal_False) { return LRMargin( sal_False, bAPI ); }
+ sal_Bool SttEndDoc( sal_Bool bStt );
+
+ sal_Bool MovePage( SwWhichPage, SwPosPage );
+ sal_Bool MovePara( SwWhichPara, SwPosPara );
+ sal_Bool MoveSection( SwWhichSection, SwPosSection );
+ sal_Bool MoveTable( SwWhichTable, SwPosTable );
+ sal_Bool MoveColumn( SwWhichColumn, SwPosColumn );
+ sal_Bool MoveRegion( SwWhichRegion, SwPosRegion );
// die Suchfunktionen
- ULONG Find( const com::sun::star::util::SearchOptions& rSearchOpt,
- BOOL bSearchInNotes,
+ sal_uLong Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ sal_Bool bSearchInNotes,
SwDocPositions eStart, SwDocPositions eEnde,
- BOOL& bCancel,
- FindRanges eRng, int bReplace = FALSE );
+ sal_Bool& bCancel,
+ FindRanges eRng, int bReplace = sal_False );
- ULONG Find( const SwTxtFmtColl& rFmtColl,
+ sal_uLong Find( const SwTxtFmtColl& rFmtColl,
SwDocPositions eStart, SwDocPositions eEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges eRng, const SwTxtFmtColl* pReplFmt = 0 );
- ULONG Find( const SfxItemSet& rSet, BOOL bNoCollections,
+ sal_uLong Find( const SfxItemSet& rSet, sal_Bool bNoCollections,
SwDocPositions eStart, SwDocPositions eEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges eRng,
const com::sun::star::util::SearchOptions* pSearchOpt = 0,
const SfxItemSet* rReplSet = 0 );
@@ -412,7 +412,7 @@ public:
// returnt
// CRSR_POSCHG: wenn der ob der SPoint vom Layout korrigiert wurde.
// CRSR_POSOLD: wenn der Crsr nicht veraendert wurde
- int SetCrsr( const Point &rPt, BOOL bOnlyText = FALSE, bool bBlock = true );
+ int SetCrsr( const Point &rPt, sal_Bool bOnlyText = sal_False, bool bBlock = true );
/*
@@ -431,35 +431,35 @@ public:
// Bereiche
inline void SetMark();
- inline BOOL HasMark();
+ inline sal_Bool HasMark();
void ClearMark();
/**
Ensure point and mark of the current PaM are in a specific order.
- @param bPointFirst TRUE: If the point is behind the mark then
- swap the PaM. FALSE: If the mark is behind the point then swap
+ @param bPointFirst sal_True: If the point is behind the mark then
+ swap the PaM. sal_False: If the mark is behind the point then swap
the PaM.
*/
- void NormalizePam(BOOL bPointFirst = TRUE);
+ void NormalizePam(sal_Bool bPointFirst = sal_True);
void SwapPam();
- BOOL ChgCurrPam( const Point & rPt,
- BOOL bTstOnly = TRUE, //Nur testen, nicht setzen
- BOOL bTstHit = FALSE ); //Nur genaue Treffer
+ sal_Bool ChgCurrPam( const Point & rPt,
+ sal_Bool bTstOnly = sal_True, //Nur testen, nicht setzen
+ sal_Bool bTstHit = sal_False ); //Nur genaue Treffer
void KillPams();
// erzeuge eine Kopie vom Cursor und speicher diese im Stack
void Push();
/*
* Loescht einen Cursor (gesteuert durch bOldCrsr)
- * - vom Stack oder ( bOldCrsr = TRUE )
+ * - vom Stack oder ( bOldCrsr = sal_True )
* - den aktuellen und der auf dem Stack stehende wird zum aktuellen
*
* Return: es war auf dem Stack noch einer vorhanden
*/
- BOOL Pop( BOOL bOldCrsr = TRUE );
+ sal_Bool Pop( sal_Bool bOldCrsr = sal_True );
/*
* Verbinde zwei Cursor miteinander.
* Loesche vom Stack den obersten und setzen dessen Mark im Aktuellen.
@@ -468,11 +468,11 @@ public:
#if !defined(DBG_UTIL)
void SttCrsrMove() { ++nCrsrMove; StartAction(); }
- void EndCrsrMove( const BOOL bIdleEnd = FALSE )
+ void EndCrsrMove( const sal_Bool bIdleEnd = sal_False )
{ EndAction( bIdleEnd ); --nCrsrMove; }
#else
void SttCrsrMove();
- void EndCrsrMove( const BOOL bIdleEnd = FALSE );
+ void EndCrsrMove( const sal_Bool bIdleEnd = sal_False );
#endif
/*
@@ -481,34 +481,34 @@ public:
* tierten Bereiche wieder angezeigt. (Bereiche muessen neu berechnet
* werden!)
*/
- BOOL HasShFcs() const { return bHasFocus; }
+ sal_Bool HasShFcs() const { return bHasFocus; }
void ShLooseFcs();
- void ShGetFcs( BOOL bUpdate = TRUE );
+ void ShGetFcs( sal_Bool bUpdate = sal_True );
// Methoden zum Anzeigen bzw. Verstecken des sichtbaren Text-Cursors
void ShowCrsr();
void HideCrsr();
// Methoden zum Anzeigen bzw. Verstecken der selektierten Bereiche mit
// dem sichtbaren Cursor
- void ShowCrsrs( BOOL bCrsrVis );
+ void ShowCrsrs( sal_Bool bCrsrVis );
void HideCrsrs();
- BOOL IsOverwriteCrsr() const { return bOverwriteCrsr; }
- void SetOverwriteCrsr( BOOL bFlag ) { bOverwriteCrsr = bFlag; }
+ sal_Bool IsOverwriteCrsr() const { return bOverwriteCrsr; }
+ void SetOverwriteCrsr( sal_Bool bFlag ) { bOverwriteCrsr = bFlag; }
// gebe den aktuellen Frame, in dem der Cursor steht, zurueck
- SwCntntFrm *GetCurrFrm( const BOOL bCalcFrm = TRUE ) const;
+ SwCntntFrm *GetCurrFrm( const sal_Bool bCalcFrm = sal_True ) const;
- //TRUE wenn der Crsr wenn der Crsr wegen Readonly gehidet ist,
- //FALSE wenn der arbeitet (trotz Readonly).
- BOOL IsCrsrReadonly() const;
+ //sal_True wenn der Crsr wenn der Crsr wegen Readonly gehidet ist,
+ //sal_False wenn der arbeitet (trotz Readonly).
+ sal_Bool IsCrsrReadonly() const;
// Cursor steht in etwas geschuetztem oder in die Selektion umspannt
// etwas geschuetztes.
- BOOL HasReadonlySel() const;
+ sal_Bool HasReadonlySel() const;
// darf der Cursor in ReadOnlyBereiche?
- BOOL IsReadOnlyAvailable() const { return bSetCrsrInReadOnly; }
- void SetReadOnlyAvailable( BOOL bFlag );
- BOOL IsOverReadOnlyPos( const Point& rPt ) const;
+ sal_Bool IsReadOnlyAvailable() const { return bSetCrsrInReadOnly; }
+ void SetReadOnlyAvailable( sal_Bool bFlag );
+ sal_Bool IsOverReadOnlyPos( const Point& rPt ) const;
// Methoden fuer aFlyMacroLnk
void SetFlyMacroLnk( const Link& rLnk ) { aFlyMacroLnk = rLnk; }
@@ -527,21 +527,21 @@ public:
// Abfrage, ob der aktuelle Cursor eine Selektion aufspannt,
// also, ob Mark gesetzt und SPoint und Mark unterschiedlich sind.
- BOOL HasSelection() const;
+ sal_Bool HasSelection() const;
// Abfrage, ob ueberhaupt eine Selektion existiert, sprich der akt. Cursor
// aufgespannt oder nicht der einzigste ist.
- inline BOOL IsSelection() const;
+ inline sal_Bool IsSelection() const;
// returns if multiple cursors are available
- inline BOOL IsMultiSelection() const;
+ inline sal_Bool IsMultiSelection() const;
// Abfrage, ob ein kompletter Absatz selektiert wurde
- BOOL IsSelFullPara() const;
+ sal_Bool IsSelFullPara() const;
// Abfrage, ob die Selektion in einem Absatz ist
- inline BOOL IsSelOnePara() const;
+ inline sal_Bool IsSelOnePara() const;
//Sollte fuer das Clipboard der WaitPtr geschaltet werden.
- BOOL ShouldWait() const;
+ sal_Bool ShouldWait() const;
/*
* liefert das SRectangle, auf dem der Cursor steht.
@@ -551,27 +551,27 @@ public:
* liefert zurueck, ob der Cursor sich ganz oder teilweise im
* sichtbaren Bereich befindet.
*/
- BOOL IsCrsrVisible() const { return VisArea().IsOver( GetCharRect() ); }
+ sal_Bool IsCrsrVisible() const { return VisArea().IsOver( GetCharRect() ); }
// gebe die aktuelle Seitennummer zurueck:
- // TRUE: in der der Cursor steht
- // FALSE: die am oberen Rand sichtbar ist
- void GetPageNum( USHORT &rnPhyNum, USHORT &rnVirtNum,
- BOOL bAtCrsrPos = TRUE, const BOOL bCalcFrm = TRUE );
+ // sal_True: in der der Cursor steht
+ // sal_False: die am oberen Rand sichtbar ist
+ void GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum,
+ sal_Bool bAtCrsrPos = sal_True, const sal_Bool bCalcFrm = sal_True );
// bestimme in welche Richtung "leere Seiten" behandelt werden!
// (wird benutzt im PhyPage.. )
- USHORT GetNextPrevPageNum( BOOL bNext = TRUE );
+ sal_uInt16 GetNextPrevPageNum( sal_Bool bNext = sal_True );
// setze den Cursor auf die Seite "nPage" an den Anfang
- BOOL GotoPage( USHORT nPage );
+ sal_Bool GotoPage( sal_uInt16 nPage );
// gebe alle Dokumentseiten zurueck
- USHORT GetPageCnt();
+ sal_uInt16 GetPageCnt();
// Gehe zur naechsten Selection
- BOOL GoNextCrsr();
+ sal_Bool GoNextCrsr();
// gehe zur vorherigen Selection
- BOOL GoPrevCrsr();
+ sal_Bool GoPrevCrsr();
// at CurCrsr.SPoint
::sw::mark::IMark* SetBookmark(
@@ -603,51 +603,51 @@ public:
String GetText() const;
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
- inline const SwTableNode* IsCrsrInTbl( BOOL bIsPtInTbl = TRUE ) const;
+ inline const SwTableNode* IsCrsrInTbl( sal_Bool bIsPtInTbl = sal_True ) const;
// erfrage die Document - Layout - Position vom akt. Crsr
- inline Point& GetCrsrDocPos( BOOL bPoint = TRUE ) const;
- inline BOOL IsCrsrPtAtEnd() const;
+ inline Point& GetCrsrDocPos( sal_Bool bPoint = sal_True ) const;
+ inline sal_Bool IsCrsrPtAtEnd() const;
inline const SwPaM* GetTblCrs() const;
inline SwPaM* GetTblCrs();
- BOOL IsTblComplex() const;
- BOOL IsTblComplexForChart();
+ sal_Bool IsTblComplex() const;
+ sal_Bool IsTblComplexForChart();
// erfrage die akt. TabellenSelektion als Text
String GetBoxNms() const;
// setze Crsr in die naechsten/vorherigen Celle
- BOOL GoNextCell( BOOL bAppendLine = TRUE );
- BOOL GoPrevCell();
+ sal_Bool GoNextCell( sal_Bool bAppendLine = sal_True );
+ sal_Bool GoPrevCell();
// gehe zu dieser Box (wenn vorhanden und in Tabelle!)
- BOOL GotoTable( const String& rName );
+ sal_Bool GotoTable( const String& rName );
// select a table row, column or box (based on the current cursor)
- BOOL SelTblRow() { return _SelTblRowOrCol( true ); }
- BOOL SelTblCol() { return _SelTblRowOrCol( false ); }
- BOOL SelTblBox();
+ sal_Bool SelTblRow() { return _SelTblRowOrCol( true ); }
+ sal_Bool SelTblCol() { return _SelTblRowOrCol( false ); }
+ sal_Bool SelTblBox();
// --> FME 2004-07-30 #i32329# Enhanced table selection
- BOOL SelTbl();
+ sal_Bool SelTbl();
// <--
// zum naechsten/vorhergehenden Punkt auf gleicher Ebene
- BOOL GotoNextNum();
- BOOL GotoPrevNum();
+ sal_Bool GotoNextNum();
+ sal_Bool GotoPrevNum();
// zu diesem Gliederungspunkt
- BOOL GotoOutline( const String& rName );
+ sal_Bool GotoOutline( const String& rName );
// zum naechsten/vorhergehenden oder angegebenen OultineNode
- void GotoOutline( USHORT nIdx );
+ void GotoOutline( sal_uInt16 nIdx );
// suche die "Outline-Position" im Nodes-Array vom akt. Kaiptel
- USHORT GetOutlinePos( BYTE nLevel = UCHAR_MAX );
+ sal_uInt16 GetOutlinePos( sal_uInt8 nLevel = UCHAR_MAX );
// selektiere den angeben Bereich von OutlineNodes. Optional
- // inclusive der Childs. Die USHORT sind die Positionen im
+ // inclusive der Childs. Die sal_uInt16 sind die Positionen im
// OutlineNds-Array!! (EditShell)
- BOOL MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
- BOOL bWithChilds = FALSE );
+ sal_Bool MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos,
+ sal_Bool bWithChilds = sal_False );
- BOOL GotoNextOutline(); // naechster Node mit Outline-Num.
- BOOL GotoPrevOutline(); // vorheriger Node mit Outline-Num.
+ sal_Bool GotoNextOutline(); // naechster Node mit Outline-Num.
+ sal_Bool GotoPrevOutline(); // vorheriger Node mit Outline-Num.
/** Delivers the current shell cursor
@@ -673,131 +673,131 @@ public:
// ist der Crsr in einer Tabelle und ist die Selection ueber
// zwei Spalten
- BOOL IsTableMode() const { return 0 != pTblCrsr; }
+ sal_Bool IsTableMode() const { return 0 != pTblCrsr; }
// erfrage den Tabellen Crsr; ausserhalb von Tabellen immer 0
const SwShellTableCrsr* GetTableCrsr() const { return pTblCrsr; }
SwShellTableCrsr* GetTableCrsr() { return pTblCrsr; }
- USHORT UpdateTblSelBoxes();
+ sal_uInt16 UpdateTblSelBoxes();
- BOOL GotoFtnTxt(); // springe aus dem Content zur Fussnote
- BOOL GotoFtnAnchor(); // springe aus der Fussnote zum Anker
- BOOL GotoPrevFtnAnchor();
- BOOL GotoNextFtnAnchor();
+ sal_Bool GotoFtnTxt(); // springe aus dem Content zur Fussnote
+ sal_Bool GotoFtnAnchor(); // springe aus der Fussnote zum Anker
+ sal_Bool GotoPrevFtnAnchor();
+ sal_Bool GotoNextFtnAnchor();
- BOOL GotoFlyAnchor(); // springe aus dem Rahmen zum Anker
- BOOL GotoHeaderTxt(); // springe aus dem Content zum Header
- BOOL GotoFooterTxt(); // springe aus dem Content zum Footer
+ sal_Bool GotoFlyAnchor(); // springe aus dem Rahmen zum Anker
+ sal_Bool GotoHeaderTxt(); // springe aus dem Content zum Header
+ sal_Bool GotoFooterTxt(); // springe aus dem Content zum Footer
// springe in den Header/Footer des angegebenen oder akt. PageDesc
- BOOL SetCrsrInHdFt( USHORT nDescNo = USHRT_MAX,
- BOOL bInHeader = TRUE );
- // is point of cursor in header/footer. pbInHeader return TRUE if it is
+ sal_Bool SetCrsrInHdFt( sal_uInt16 nDescNo = USHRT_MAX,
+ sal_Bool bInHeader = sal_True );
+ // is point of cursor in header/footer. pbInHeader return sal_True if it is
// in a headerframe otherwise in a footerframe
- BOOL IsInHeaderFooter( BOOL* pbInHeader = 0 ) const;
+ sal_Bool IsInHeaderFooter( sal_Bool* pbInHeader = 0 ) const;
// springe zum naechsten Verzeichnis [mit dem Namen]
- BOOL GotoNextTOXBase( const String* = 0 );
+ sal_Bool GotoNextTOXBase( const String* = 0 );
// springe zum vorherigen Verzeichnis [mit dem Namen]
- BOOL GotoPrevTOXBase( const String* = 0 );
- BOOL GotoTOXMarkBase(); // springe zum Verzeichnis vom TOXMark
+ sal_Bool GotoPrevTOXBase( const String* = 0 );
+ sal_Bool GotoTOXMarkBase(); // springe zum Verzeichnis vom TOXMark
// springe zum naechsten (vorherigen) Verzeichniseintrag
- BOOL GotoNxtPrvTOXMark( BOOL bNext = TRUE );
+ sal_Bool GotoNxtPrvTOXMark( sal_Bool bNext = sal_True );
// Zur naechsten/ vorherigen Verzeichnismarke dieses Typs traveln
const SwTOXMark& GotoTOXMark( const SwTOXMark& rStart, SwTOXSearch eDir );
// springe zum naechsten (vorherigen) Tabellenformel
// optional auch nur zu kaputten Formeln springen
- BOOL GotoNxtPrvTblFormula( BOOL bNext = TRUE,
- BOOL bOnlyErrors = FALSE );
+ sal_Bool GotoNxtPrvTblFormula( sal_Bool bNext = sal_True,
+ sal_Bool bOnlyErrors = sal_False );
// jump to the next / previous hyperlink - inside text and also
// on graphics
- BOOL SelectNxtPrvHyperlink( BOOL bNext = TRUE );
+ sal_Bool SelectNxtPrvHyperlink( sal_Bool bNext = sal_True );
// springe zu dieser Refmark
- BOOL GotoRefMark( const String& rRefMark, USHORT nSubType = 0,
- USHORT nSeqNo = 0 );
+ sal_Bool GotoRefMark( const String& rRefMark, sal_uInt16 nSubType = 0,
+ sal_uInt16 nSeqNo = 0 );
// hole vom Start/Ende der akt. Selection das nte Zeichen
- sal_Unicode GetChar( BOOL bEnd = TRUE, long nOffset = 0 );
+ sal_Unicode GetChar( sal_Bool bEnd = sal_True, long nOffset = 0 );
// erweiter die akt. Selection am Anfang/Ende um n Zeichen
- BOOL ExtendSelection( BOOL bEnd = TRUE, xub_StrLen nCount = 1 );
+ sal_Bool ExtendSelection( sal_Bool bEnd = sal_True, xub_StrLen nCount = 1 );
// setze nur den sichtbaren Cursor an die angegebene Dokument-Pos.
- // returnt FALSE: wenn der ob der SPoint vom Layout korrigiert wurde.
+ // returnt sal_False: wenn der ob der SPoint vom Layout korrigiert wurde.
// (wird zum Anzeigen von Drag&Drop/Copy-Cursor benoetigt)
- BOOL SetVisCrsr( const Point &rPt );
+ sal_Bool SetVisCrsr( const Point &rPt );
inline void UnSetVisCrsr();
// springe zum nachsten/vorherigen Feld des entsprechenden Types
- BOOL MoveFldType( const SwFieldType* pFldType, BOOL bNext,
- USHORT nSubType = USHRT_MAX,
- USHORT nResType = USHRT_MAX );
+ sal_Bool MoveFldType( const SwFieldType* pFldType, sal_Bool bNext,
+ sal_uInt16 nSubType = USHRT_MAX,
+ sal_uInt16 nResType = USHRT_MAX );
// springe genau zu diesem Feld
- BOOL GotoFld( const SwFmtFld& rFld );
+ sal_Bool GotoFld( const SwFmtFld& rFld );
// returne die Anzahl der Cursor im Ring (Flag besagt ob man nur
// aufgepspannte haben will - sprich etwas selektiert ist (Basic))
- USHORT GetCrsrCnt( BOOL bAll = TRUE ) const;
+ sal_uInt16 GetCrsrCnt( sal_Bool bAll = sal_True ) const;
// Char Travelling - Methoden (in crstrvl1.cxx)
- BOOL GoStartWord();
- BOOL GoEndWord();
- BOOL GoNextWord();
- BOOL GoPrevWord();
- BOOL GoNextSentence();
- BOOL GoPrevSentence();
- BOOL GoStartSentence();
- BOOL GoEndSentence();
- BOOL SelectWord( const Point* pPt = 0 );
- BOOL ExpandToSentenceBorders();
+ sal_Bool GoStartWord();
+ sal_Bool GoEndWord();
+ sal_Bool GoNextWord();
+ sal_Bool GoPrevWord();
+ sal_Bool GoNextSentence();
+ sal_Bool GoPrevSentence();
+ sal_Bool GoStartSentence();
+ sal_Bool GoEndSentence();
+ sal_Bool SelectWord( const Point* pPt = 0 );
+ sal_Bool ExpandToSentenceBorders();
// Position vom akt. Cursor erfragen
- BOOL IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES )const;
- BOOL IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
- BOOL IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
- BOOL IsStartSentence() const;
- BOOL IsEndSentence() const;
- BOOL IsSttPara() const;
- BOOL IsEndPara() const;
- BOOL IsStartOfDoc() const;
- BOOL IsEndOfDoc() const;
- BOOL IsInFrontOfLabel() const;
- BOOL IsAtLeftMargin() const { return IsAtLRMargin( TRUE ); }
- BOOL IsAtRightMargin(BOOL bAPI = FALSE) const { return IsAtLRMargin( FALSE, bAPI ); }
+ sal_Bool IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES )const;
+ sal_Bool IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsStartSentence() const;
+ sal_Bool IsEndSentence() const;
+ sal_Bool IsSttPara() const;
+ sal_Bool IsEndPara() const;
+ sal_Bool IsStartOfDoc() const;
+ sal_Bool IsEndOfDoc() const;
+ sal_Bool IsInFrontOfLabel() const;
+ sal_Bool IsAtLeftMargin() const { return IsAtLRMargin( sal_True ); }
+ sal_Bool IsAtRightMargin(sal_Bool bAPI = sal_False) const { return IsAtLRMargin( sal_False, bAPI ); }
// loesche alle erzeugten Crsr, setze den Tabellen-Crsr und den letzten
// Cursor auf seinen TextNode (oder StartNode?).
// Beim naechsten ::GetCrsr werden sie wieder alle erzeugt.
// Wird fuers Drag&Drop/ClipBorad-Paste in Tabellen benoetigt.
- BOOL ParkTblCrsr();
+ sal_Bool ParkTblCrsr();
// gibt es nicht aufgespannte Attribute?
- BOOL IsGCAttr() const { return bGCAttr; }
- void ClearGCAttr() { bGCAttr = FALSE; }
- void UpdateAttr() { bGCAttr = TRUE; }
+ sal_Bool IsGCAttr() const { return bGCAttr; }
+ void ClearGCAttr() { bGCAttr = sal_False; }
+ void UpdateAttr() { bGCAttr = sal_True; }
// ist das gesamte Dokument geschuetzt/versteckt?? (fuer UI,..)
- BOOL IsAllProtect() const { return bAllProtect; }
+ sal_Bool IsAllProtect() const { return bAllProtect; }
#ifdef SW_CRSR_TIMER
- // setze das Flag am VisCrsr, ob dieser ueber Timer getriggert (TRUE)
- // oder direkt (FALSE) angezeigt wird. (default ist Timer getriggert)
- BOOL ChgCrsrTimerFlag( BOOL bTimerOn = TRUE );
+ // setze das Flag am VisCrsr, ob dieser ueber Timer getriggert (sal_True)
+ // oder direkt (sal_False) angezeigt wird. (default ist Timer getriggert)
+ sal_Bool ChgCrsrTimerFlag( sal_Bool bTimerOn = sal_True );
#endif
- BOOL BasicActionPend() const { return nBasicActionCnt != nStartAction; }
+ sal_Bool BasicActionPend() const { return nBasicActionCnt != nStartAction; }
// springe zum benannten Bereich
- BOOL GotoRegion( const String& rName );
+ sal_Bool GotoRegion( const String& rName );
// zeige die aktuelle Selektion an
virtual void MakeSelVisible();
// setzte den Cursor auf einen NICHT geschuetzten/versteckten Node
- BOOL FindValidCntntNode( BOOL bOnlyText = FALSE );
+ sal_Bool FindValidCntntNode( sal_Bool bOnlyText = sal_False );
- BOOL GetContentAtPos( const Point& rPt,
+ sal_Bool GetContentAtPos( const Point& rPt,
SwContentAtPos& rCntntAtPos,
- BOOL bSetCrsr = FALSE,
+ sal_Bool bSetCrsr = sal_False,
SwRect* pFldRect = 0 );
// --> OD 2008-06-19 #i90516#
@@ -816,40 +816,40 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > >& rStringKeyMaps,
::com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& rRange ) const;
- BOOL IsPageAtPos( const Point &rPt ) const;
+ sal_Bool IsPageAtPos( const Point &rPt ) const;
// Attribut selelktieren
- BOOL SelectTxtAttr( USHORT nWhich, BOOL bExpand, const SwTxtAttr* pAttr = 0 );
- BOOL GotoINetAttr( const SwTxtINetFmt& rAttr );
+ sal_Bool SelectTxtAttr( sal_uInt16 nWhich, sal_Bool bExpand, const SwTxtAttr* pAttr = 0 );
+ sal_Bool GotoINetAttr( const SwTxtINetFmt& rAttr );
const SwFmtINetFmt* FindINetAttr( const String& rName ) const;
- BOOL CheckTblBoxCntnt( const SwPosition* pPos = 0 );
+ sal_Bool CheckTblBoxCntnt( const SwPosition* pPos = 0 );
void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
void ClearTblBoxCntnt();
- BOOL EndAllTblBoxEdit();
+ sal_Bool EndAllTblBoxEdit();
// wird gerufen, wenn eine Tabellenselektion im UpdateCrsr erzeugt wird,
// ohne das die UI davon etaws weiss
virtual void NewCoreSelection();
- void SetSelTblCells( BOOL bFlag ) { bSelTblCells = bFlag; }
- BOOL IsSelTblCells() const { return bSelTblCells; }
+ void SetSelTblCells( sal_Bool bFlag ) { bSelTblCells = bFlag; }
+ sal_Bool IsSelTblCells() const { return bSelTblCells; }
- BOOL IsAutoUpdateCells() const { return bAutoUpdateCells; }
- void SetAutoUpdateCells( BOOL bFlag ) { bAutoUpdateCells = bFlag; }
+ sal_Bool IsAutoUpdateCells() const { return bAutoUpdateCells; }
+ void SetAutoUpdateCells( sal_Bool bFlag ) { bAutoUpdateCells = bFlag; }
- BOOL GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
+ sal_Bool GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
SwRect& rRect, short& rOrient );
- BOOL SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode );
+ sal_Bool SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode );
const SwRedline* SelNextRedline();
const SwRedline* SelPrevRedline();
- const SwRedline* GotoRedline( USHORT nArrPos, BOOL bSelect = FALSE );
+ const SwRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = sal_False );
// is cursor or the point in/over a vertical formatted text?
- BOOL IsInVerticalText( const Point* pPt = 0 ) const;
+ sal_Bool IsInVerticalText( const Point* pPt = 0 ) const;
// is cursor or the point in/over a right to left formatted text?
- BOOL IsInRightToLeftText( const Point* pPt = 0 ) const;
+ sal_Bool IsInRightToLeftText( const Point* pPt = 0 ) const;
// If the current cursor position is inside a hidden range, the hidden range
// is selected and true is returned:
@@ -886,12 +886,12 @@ public:
// Cursor Inlines:
inline SwMoveFnCollection* SwCrsrShell::MakeFindRange(
- USHORT nStt, USHORT nEnd, SwPaM* pPam ) const
+ sal_uInt16 nStt, sal_uInt16 nEnd, SwPaM* pPam ) const
{
return pCurCrsr->MakeFindRange( (SwDocPositions)nStt, (SwDocPositions)nEnd, pPam );
}
-inline SwCursor* SwCrsrShell::GetSwCrsr( BOOL bMakeTblCrsr ) const
+inline SwCursor* SwCrsrShell::GetSwCrsr( sal_Bool bMakeTblCrsr ) const
{
return (SwCursor*)GetCrsr( bMakeTblCrsr );
}
@@ -900,35 +900,35 @@ inline SwPaM* SwCrsrShell::GetStkCrsr() const { return pCrsrStk; }
inline void SwCrsrShell::SetMark() { pCurCrsr->SetMark(); }
-inline BOOL SwCrsrShell::HasMark() { return( pCurCrsr->HasMark() ); }
+inline sal_Bool SwCrsrShell::HasMark() { return( pCurCrsr->HasMark() ); }
-inline BOOL SwCrsrShell::IsSelection() const
+inline sal_Bool SwCrsrShell::IsSelection() const
{
return IsTableMode() || pCurCrsr->HasMark() ||
pCurCrsr->GetNext() != pCurCrsr;
}
-inline BOOL SwCrsrShell::IsMultiSelection() const
+inline sal_Bool SwCrsrShell::IsMultiSelection() const
{
return pCurCrsr->GetNext() != pCurCrsr;
}
-inline BOOL SwCrsrShell::IsSelOnePara() const
+inline sal_Bool SwCrsrShell::IsSelOnePara() const
{
return pCurCrsr == pCurCrsr->GetNext() &&
pCurCrsr->GetPoint()->nNode == pCurCrsr->GetMark()->nNode;
}
-inline const SwTableNode* SwCrsrShell::IsCrsrInTbl( BOOL bIsPtInTbl ) const
+inline const SwTableNode* SwCrsrShell::IsCrsrInTbl( sal_Bool bIsPtInTbl ) const
{
return pCurCrsr->GetNode( bIsPtInTbl )->FindTableNode();
}
-inline BOOL SwCrsrShell::IsCrsrPtAtEnd() const
+inline sal_Bool SwCrsrShell::IsCrsrPtAtEnd() const
{
return pCurCrsr->End() == pCurCrsr->GetPoint();
}
-inline Point& SwCrsrShell::GetCrsrDocPos( BOOL bPoint ) const
+inline Point& SwCrsrShell::GetCrsrDocPos( sal_Bool bPoint ) const
{
return bPoint ? pCurCrsr->GetPtPos() : pCurCrsr->GetMkPos();
}
@@ -946,7 +946,7 @@ inline SwPaM* SwCrsrShell::GetTblCrs()
inline void SwCrsrShell::UnSetVisCrsr()
{
pVisCrsr->Hide();
- pVisCrsr->SetDragCrsr( FALSE );
+ pVisCrsr->SetDragCrsr( sal_False );
}
#endif // _CRSRSH_HXX
diff --git a/sw/inc/crsskip.hxx b/sw/inc/crsskip.hxx
index 84d9650c5eca..c89d871c9940 100644
--- a/sw/inc/crsskip.hxx
+++ b/sw/inc/crsskip.hxx
@@ -35,8 +35,8 @@
// the same, but in complex text cell skip over legatures and char skip
// into it.
// These defines exist only to cut off the dependicies to I18N project.
-const USHORT CRSR_SKIP_CHARS = 0;
-const USHORT CRSR_SKIP_CELLS = 1;
-const USHORT CRSR_SKIP_HIDDEN = 2;
+const sal_uInt16 CRSR_SKIP_CHARS = 0;
+const sal_uInt16 CRSR_SKIP_CELLS = 1;
+const sal_uInt16 CRSR_SKIP_HIDDEN = 2;
#endif
diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx
index de32f44c8f85..cf2e55118ab7 100644
--- a/sw/inc/crstate.hxx
+++ b/sw/inc/crstate.hxx
@@ -44,10 +44,10 @@ enum SwFillMode
struct SwFillCrsrPos
{
SwRect aCrsr; // Position und Groesse des Shadowcursors
- USHORT nParaCnt; // Anzahl der einzufuegenden Absaetze
- USHORT nTabCnt; // Anzahl der Tabs bzw. Groesse des Einzugs
- USHORT nSpaceCnt; // Anzahl der einzufuegenden Leerzeichen
- USHORT nColumnCnt; // Anzahl der notwendigen Spaltenumbrueche
+ sal_uInt16 nParaCnt; // Anzahl der einzufuegenden Absaetze
+ sal_uInt16 nTabCnt; // Anzahl der Tabs bzw. Groesse des Einzugs
+ sal_uInt16 nSpaceCnt; // Anzahl der einzufuegenden Leerzeichen
+ sal_uInt16 nColumnCnt; // Anzahl der notwendigen Spaltenumbrueche
sal_Int16 eOrient; // Absatzausrichtung
SwFillMode eMode; // Gewuenschte Auffuellregel
SwFillCrsrPos( SwFillMode eMd = FILL_TAB ) :
@@ -69,7 +69,7 @@ struct Sw2LinesPos
SwRect aLine; // Position and size of the line
SwRect aPortion; // Position and size of the multi portion
SwRect aPortion2; // needed for nested multi portions
- BYTE nMultiType; // Multiportion type
+ sal_uInt8 nMultiType; // Multiportion type
};
/**
@@ -110,8 +110,8 @@ struct Sw2LinesPos
struct SwSpecialPos
{
xub_StrLen nCharOfst;
- USHORT nLineOfst;
- BYTE nExtendRange;
+ sal_uInt16 nLineOfst;
+ sal_uInt8 nExtendRange;
// #i27615#
SwSpecialPos() : nCharOfst(0), nLineOfst(0),
@@ -138,32 +138,32 @@ struct SwCrsrMoveState
SwSpecialPos* pSpecialPos; // for positions inside fields
Point aRealHeight; // enthaelt dann die Position/Hoehe des Cursors
CrsrMoveState eState;
- BYTE nCursorBidiLevel;
- BOOL bStop :1;
- BOOL bRealHeight :1; // Soll die reale Hoehe berechnet werden?
- BOOL bFieldInfo :1; // Sollen Felder erkannt werden?
- BOOL bPosCorr :1; // Point musste korrigiert werden
- BOOL bFtnNoInfo :1; // Fussnotennumerierung erkannt
- BOOL bExactOnly :1; // GetCrsrOfst nur nach Exakten Treffern
+ sal_uInt8 nCursorBidiLevel;
+ sal_Bool bStop :1;
+ sal_Bool bRealHeight :1; // Soll die reale Hoehe berechnet werden?
+ sal_Bool bFieldInfo :1; // Sollen Felder erkannt werden?
+ sal_Bool bPosCorr :1; // Point musste korrigiert werden
+ sal_Bool bFtnNoInfo :1; // Fussnotennumerierung erkannt
+ sal_Bool bExactOnly :1; // GetCrsrOfst nur nach Exakten Treffern
// suchen lassen, sprich niemals in das
// GetCntntPos laufen.
- BOOL bFillRet :1; // wird nur im FillModus temp. genutzt
- BOOL bSetInReadOnly :1; // ReadOnlyBereiche duerfen betreten werden
- BOOL bRealWidth :1; // Calculation of the width required
- BOOL b2Lines :1; // Check 2line portions and fill p2Lines
- BOOL bNoScroll :1; // No scrolling of undersized textframes
- BOOL bPosMatchesBounds :1; // GetCrsrOfst should not return the next
+ sal_Bool bFillRet :1; // wird nur im FillModus temp. genutzt
+ sal_Bool bSetInReadOnly :1; // ReadOnlyBereiche duerfen betreten werden
+ sal_Bool bRealWidth :1; // Calculation of the width required
+ sal_Bool b2Lines :1; // Check 2line portions and fill p2Lines
+ sal_Bool bNoScroll :1; // No scrolling of undersized textframes
+ sal_Bool bPosMatchesBounds :1; // GetCrsrOfst should not return the next
// position if screen position is inside second
// have of bound rect
- BOOL bCntntCheck :1; // --> FME 2005-05-13 #i43742# Cursor position over content? <--
+ sal_Bool bCntntCheck :1; // --> FME 2005-05-13 #i43742# Cursor position over content? <--
// #i27615#
/**
cursor in front of label
*/
- BOOL bInFrontOfLabel :1;
- BOOL bInNumPortion :1; // point is in number portion #i23726#
+ sal_Bool bInFrontOfLabel :1;
+ sal_Bool bInNumPortion :1; // point is in number portion #i23726#
int nInNumPostionOffset; // distance from number portion's start
SwCrsrMoveState( CrsrMoveState eSt = MV_NONE ) :
@@ -172,20 +172,20 @@ struct SwCrsrMoveState
pSpecialPos( NULL ),
eState( eSt ),
nCursorBidiLevel( 0 ),
- bStop( FALSE ),
- bRealHeight( FALSE ),
- bFieldInfo( FALSE ),
- bPosCorr( FALSE ),
- bFtnNoInfo( FALSE ),
- bExactOnly( FALSE ),
- bSetInReadOnly( FALSE ),
- bRealWidth( FALSE ),
- b2Lines( FALSE ),
- bNoScroll( FALSE ),
- bPosMatchesBounds( FALSE ),
- bCntntCheck( FALSE ), // --> FME 2005-05-13 #i43742# <--
- bInFrontOfLabel( FALSE ), // #i27615#
- bInNumPortion(FALSE), // #i26726#
+ bStop( sal_False ),
+ bRealHeight( sal_False ),
+ bFieldInfo( sal_False ),
+ bPosCorr( sal_False ),
+ bFtnNoInfo( sal_False ),
+ bExactOnly( sal_False ),
+ bSetInReadOnly( sal_False ),
+ bRealWidth( sal_False ),
+ b2Lines( sal_False ),
+ bNoScroll( sal_False ),
+ bPosMatchesBounds( sal_False ),
+ bCntntCheck( sal_False ), // --> FME 2005-05-13 #i43742# <--
+ bInFrontOfLabel( sal_False ), // #i27615#
+ bInNumPortion(sal_False), // #i26726#
nInNumPostionOffset(0) // #i26726#
{}
SwCrsrMoveState( SwFillCrsrPos *pInitFill ) :
@@ -193,20 +193,20 @@ struct SwCrsrMoveState
pSpecialPos( NULL ),
eState( MV_SETONLYTEXT ),
nCursorBidiLevel( 0 ),
- bStop( FALSE ),
- bRealHeight( FALSE ),
- bFieldInfo( FALSE ),
- bPosCorr( FALSE ),
- bFtnNoInfo( FALSE ),
- bExactOnly( FALSE ),
- bSetInReadOnly( FALSE ),
- bRealWidth( FALSE ),
- b2Lines( FALSE ),
- bNoScroll( FALSE ),
- bPosMatchesBounds( FALSE ),
- bCntntCheck( FALSE ), // --> FME 2005-05-13 #i43742# <--
- bInFrontOfLabel( FALSE ), // #i27615#
- bInNumPortion(FALSE), // #i23726#
+ bStop( sal_False ),
+ bRealHeight( sal_False ),
+ bFieldInfo( sal_False ),
+ bPosCorr( sal_False ),
+ bFtnNoInfo( sal_False ),
+ bExactOnly( sal_False ),
+ bSetInReadOnly( sal_False ),
+ bRealWidth( sal_False ),
+ b2Lines( sal_False ),
+ bNoScroll( sal_False ),
+ bPosMatchesBounds( sal_False ),
+ bCntntCheck( sal_False ), // --> FME 2005-05-13 #i43742# <--
+ bInFrontOfLabel( sal_False ), // #i27615#
+ bInNumPortion(sal_False), // #i23726#
nInNumPostionOffset(0) // #i23726#
{}
};
diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx
index a99df015a7c1..b015337b4085 100644
--- a/sw/inc/cshtyp.hxx
+++ b/sw/inc/cshtyp.hxx
@@ -49,19 +49,19 @@ extern SwPosPage fnPageStart, fnPageEnd;
// Richtungsparameter fuer MovePara ( wird in SwPaM initialisiert )
typedef SwMoveFnCollection* SwPosPara;
-typedef BOOL (*SwWhichPara)( SwPaM&, SwPosPara );
+typedef sal_Bool (*SwWhichPara)( SwPaM&, SwPosPara );
extern SwWhichPara fnParaPrev, fnParaCurr, fnParaNext;
extern SwPosPara fnParaStart, fnParaEnd;
// Richtungsparameter fuer MoveSection
typedef SwMoveFnCollection* SwPosSection;
-typedef BOOL (*SwWhichSection)( SwPaM&, SwPosSection );
+typedef sal_Bool (*SwWhichSection)( SwPaM&, SwPosSection );
extern SwWhichSection fnSectionPrev, fnSectionCurr, fnSectionNext;
extern SwPosSection fnSectionStart, fnSectionEnd;
// Richtungsparameter fuer MoveTable
typedef SwMoveFnCollection* SwPosTable;
-typedef BOOL (*SwWhichTable)( SwPaM&, SwPosTable, BOOL bInReadOnly );
+typedef sal_Bool (*SwWhichTable)( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
extern SwWhichTable fnTablePrev, fnTableCurr, fnTableNext;
extern SwPosTable fnTableStart, fnTableEnd;
@@ -73,7 +73,7 @@ extern SwPosColumn fnColumnStart, fnColumnEnd;
// Richtungsparameter fuer MoveRegion (Bereiche!)
typedef SwMoveFnCollection* SwPosRegion;
-typedef BOOL (*SwWhichRegion)( SwPaM&, SwPosRegion, BOOL bInReadOnly );
+typedef sal_Bool (*SwWhichRegion)( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
extern SwWhichRegion fnRegionPrev, fnRegionCurr, fnRegionNext, fnRegionCurrAndSkip;
extern SwPosRegion fnRegionStart, fnRegionEnd;
diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx
index c13c766e1147..135553da1b64 100644
--- a/sw/inc/dbfld.hxx
+++ b/sw/inc/dbfld.hxx
@@ -60,8 +60,8 @@ public:
const String& GetColumnName() const {return sColumn;}
const SwDBData& GetDBData() const {return aDBData;}
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -74,16 +74,16 @@ class SW_DLLPUBLIC SwDBField : public SwValueField
{
String aContent;
String sFieldCode; // contains Word's field code
- USHORT nSubType;
- BOOL bIsInBodyTxt : 1;
- BOOL bValidValue : 1;
- BOOL bInitialized : 1;
+ sal_uInt16 nSubType;
+ sal_Bool bIsInBodyTxt : 1;
+ sal_Bool bValidValue : 1;
+ sal_Bool bInitialized : 1;
virtual String Expand() const;
virtual SwField* Copy() const;
public:
- SwDBField(SwDBFieldType*, ULONG nFmt = 0);
+ SwDBField(SwDBFieldType*, sal_uLong nFmt = 0);
virtual ~SwDBField();
virtual SwFieldType* ChgTyp( SwFieldType* );
@@ -91,13 +91,13 @@ public:
// Der aktuelle Text
inline void SetExpansion(const String& rStr);
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nType);
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nType);
virtual String GetFieldName() const;
// fuer Berechnungen in Ausdruecken
- void ChgValue( double d, BOOL bVal );
+ void ChgValue( double d, sal_Bool bVal );
// Evaluierung ueber den DBMgr String rauspulen
void Evaluate();
@@ -107,11 +107,11 @@ public:
void InitContent();
void InitContent(const String& rExpansion);
- inline void ChgBodyTxtFlag( BOOL bIsInBody );
+ inline void ChgBodyTxtFlag( sal_Bool bIsInBody );
- inline BOOL IsInitialized() const { return bInitialized; }
- inline void ClearInitialized() { bInitialized = FALSE; }
- inline void SetInitialized() { bInitialized = TRUE; }
+ inline sal_Bool IsInitialized() const { return bInitialized; }
+ inline void ClearInitialized() { bInitialized = sal_False; }
+ inline void SetInitialized() { bInitialized = sal_True; }
// Name erfragen
virtual const String& GetPar1() const;
@@ -124,15 +124,15 @@ public:
// DBName
inline const SwDBData& GetDBData() const { return ((SwDBFieldType*)GetTyp())->GetDBData(); }
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
inline void SwDBField::SetExpansion(const String& rStr)
{ aContent = rStr; }
// wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
-inline void SwDBField::ChgBodyTxtFlag( BOOL bIsInBody )
+inline void SwDBField::ChgBodyTxtFlag( sal_Bool bIsInBody )
{ bIsInBodyTxt = bIsInBody; }
/*--------------------------------------------------------------------
@@ -142,13 +142,13 @@ inline void SwDBField::ChgBodyTxtFlag( BOOL bIsInBody )
class SW_DLLPUBLIC SwDBNameInfField : public SwField
{
SwDBData aDBData;
- USHORT nSubType;
+ sal_uInt16 nSubType;
protected:
const SwDBData& GetDBData() const {return aDBData;}
SwDBData& GetDBData() {return aDBData;}
- SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, ULONG nFmt = 0);
+ SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, sal_uLong nFmt = 0);
public:
// DBName
@@ -159,10 +159,10 @@ public:
virtual String GetFieldName() const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nType);
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nType);
};
@@ -186,7 +186,7 @@ public:
class SW_DLLPUBLIC SwDBNextSetField : public SwDBNameInfField
{
String aCond;
- BOOL bCondValid;
+ sal_Bool bCondValid;
public:
SwDBNextSetField( SwDBNextSetFieldType*,
@@ -196,20 +196,20 @@ public:
virtual SwField* Copy() const;
void Evaluate(SwDoc*);
- inline void SetCondValid(BOOL bCond);
- inline BOOL IsCondValid() const;
+ inline void SetCondValid(sal_Bool bCond);
+ inline sal_Bool IsCondValid() const;
// Condition
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
-inline BOOL SwDBNextSetField::IsCondValid() const
+inline sal_Bool SwDBNextSetField::IsCondValid() const
{ return bCondValid; }
-inline void SwDBNextSetField::SetCondValid(BOOL bCond)
+inline void SwDBNextSetField::SetCondValid(sal_Bool bCond)
{ bCondValid = bCond; }
/*--------------------------------------------------------------------
@@ -235,7 +235,7 @@ class SwDBNumSetField : public SwDBNameInfField
{
String aCond;
String aPar2;
- BOOL bCondValid;
+ sal_Bool bCondValid;
public:
SwDBNumSetField(SwDBNumSetFieldType*, const String& rCond, const String& rDBNum, const SwDBData& rDBData);
@@ -243,8 +243,8 @@ public:
virtual String Expand() const;
virtual SwField* Copy() const;
- inline BOOL IsCondValid() const;
- inline void SetCondValid(BOOL bCond);
+ inline sal_Bool IsCondValid() const;
+ inline void SetCondValid(sal_Bool bCond);
void Evaluate(SwDoc*);
// Condition
@@ -256,14 +256,14 @@ public:
virtual void SetPar2(const String& rStr);
// Die Datensatznummer steht in nFormat !!
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
-inline BOOL SwDBNumSetField::IsCondValid() const
+inline sal_Bool SwDBNumSetField::IsCondValid() const
{ return bCondValid; }
-inline void SwDBNumSetField::SetCondValid(BOOL bCond)
+inline void SwDBNumSetField::SetCondValid(sal_Bool bCond)
{ bCondValid = bCond; }
/*--------------------------------------------------------------------
@@ -276,7 +276,7 @@ class SwDBNameFieldType : public SwFieldType
public:
SwDBNameFieldType(SwDoc*);
- String Expand(ULONG) const;
+ String Expand(sal_uLong) const;
virtual SwFieldType* Copy() const;
};
@@ -287,12 +287,12 @@ public:
class SW_DLLPUBLIC SwDBNameField : public SwDBNameInfField
{
public:
- SwDBNameField(SwDBNameFieldType*, const SwDBData& rDBData, ULONG nFmt = 0);
+ SwDBNameField(SwDBNameFieldType*, const SwDBData& rDBData, sal_uLong nFmt = 0);
virtual String Expand() const;
virtual SwField* Copy() const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -316,7 +316,7 @@ class SW_DLLPUBLIC SwDBSetNumberField : public SwDBNameInfField
long nNumber;
public:
- SwDBSetNumberField(SwDBSetNumberFieldType*, const SwDBData& rDBData, ULONG nFmt = 0);
+ SwDBSetNumberField(SwDBSetNumberFieldType*, const SwDBData& rDBData, sal_uLong nFmt = 0);
virtual String Expand() const;
virtual SwField* Copy() const;
@@ -324,8 +324,8 @@ public:
inline long GetSetNumber() const;
inline void SetSetNumber(long nNum);
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
inline long SwDBSetNumberField::GetSetNumber() const
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index fd2f694f5e3f..bc017ddbec5b 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -112,16 +112,16 @@ struct SwDSParam : public SwDBData
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement> xStatement;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xResultSet;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aSelection;
- BOOL bScrollable;
- BOOL bEndOfDB;
- BOOL bAfterSelection;
+ sal_Bool bScrollable;
+ sal_Bool bEndOfDB;
+ sal_Bool bAfterSelection;
long nSelectionIndex;
SwDSParam(const SwDBData& rData) :
SwDBData(rData),
- bScrollable(FALSE),
- bEndOfDB(FALSE),
- bAfterSelection(FALSE),
+ bScrollable(sal_False),
+ bEndOfDB(sal_False),
+ bAfterSelection(sal_False),
nSelectionIndex(0)
{}
@@ -131,16 +131,16 @@ struct SwDSParam : public SwDBData
SwDBData(rData),
xResultSet(xResSet),
aSelection(rSelection),
- bScrollable(TRUE),
- bEndOfDB(FALSE),
- bAfterSelection(FALSE),
+ bScrollable(sal_True),
+ bEndOfDB(sal_False),
+ bAfterSelection(sal_False),
nSelectionIndex(0)
{}
void CheckEndOfDB()
{
if(bEndOfDB)
- bAfterSelection = TRUE;
+ bAfterSelection = sal_True;
}
};
typedef SwDSParam* SwDSParamPtr;
@@ -148,7 +148,7 @@ SV_DECL_PTRARR_DEL(SwDSParamArr, SwDSParamPtr, 0, 5)
struct SwMergeDescriptor
{
- USHORT nMergeType;
+ sal_uInt16 nMergeType;
SwWrtShell& rSh;
const ::svx::ODataAccessDescriptor& rDescriptor;
String sSaveToFilter; //export filter to save resulting files
@@ -174,7 +174,7 @@ struct SwMergeDescriptor
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aPrintOptions;
- SwMergeDescriptor( USHORT nType, SwWrtShell& rShell, ::svx::ODataAccessDescriptor& rDesc ) :
+ SwMergeDescriptor( sal_uInt16 nType, SwWrtShell& rShell, ::svx::ODataAccessDescriptor& rDesc ) :
nMergeType(nType),
rSh(rShell),
rDescriptor(rDesc),
@@ -200,21 +200,21 @@ friend class SwConnectionDisposedListener_Impl;
String sEMailAddrFld; // Mailing: Spaltenname der E-Mail Adresse
String sSubject; // Mailing: Subject
String sAttached; // Mailing: Attachte Files
- USHORT nMergeType;
- BOOL bInitDBFields : 1; // TRUE: Datenbank an Feldern beim Mergen
- BOOL bSingleJobs : 1; // Einzelne Druckjobs bei Aufruf aus Basic
- BOOL bCancel : 1; // Serienbrief-Save abgebrochen
-
- BOOL bInMerge : 1; //merge process active
- BOOL bMergeSilent : 1; // suppress display of dialogs/boxes (used when called over API)
- BOOL bMergeLock : 1; // prevent update of database fields while document is
+ sal_uInt16 nMergeType;
+ sal_Bool bInitDBFields : 1; // sal_True: Datenbank an Feldern beim Mergen
+ sal_Bool bSingleJobs : 1; // Einzelne Druckjobs bei Aufruf aus Basic
+ sal_Bool bCancel : 1; // Serienbrief-Save abgebrochen
+
+ sal_Bool bInMerge : 1; //merge process active
+ sal_Bool bMergeSilent : 1; // suppress display of dialogs/boxes (used when called over API)
+ sal_Bool bMergeLock : 1; // prevent update of database fields while document is
// actually printed at the ViewShell
SwDSParamArr aDataSourceParams;
SwNewDBMgr_Impl* pImpl;
const SwXMailMerge* pMergeEvtSrc; // != 0 if mail merge events are to be send
- SW_DLLPRIVATE SwDSParam* FindDSData(const SwDBData& rData, BOOL bCreate);
- SW_DLLPRIVATE SwDSParam* FindDSConnection(const ::rtl::OUString& rSource, BOOL bCreate);
+ SW_DLLPRIVATE SwDSParam* FindDSData(const SwDBData& rData, sal_Bool bCreate);
+ SW_DLLPRIVATE SwDSParam* FindDSConnection(const ::rtl::OUString& rSource, sal_Bool bCreate);
SW_DLLPRIVATE DECL_LINK( PrtCancelHdl, Button * );
@@ -226,36 +226,36 @@ friend class SwConnectionDisposedListener_Impl;
SW_DLLPRIVATE void ImportDBEntry(SwWrtShell* pSh);
// merge to file _and_ merge to e-Mail
- SW_DLLPRIVATE BOOL MergeMailFiles(SwWrtShell* pSh,
+ SW_DLLPRIVATE sal_Bool MergeMailFiles(SwWrtShell* pSh,
const SwMergeDescriptor& rMergeDescriptor );
- SW_DLLPRIVATE BOOL ToNextRecord(SwDSParam* pParam);
+ SW_DLLPRIVATE sal_Bool ToNextRecord(SwDSParam* pParam);
public:
SwNewDBMgr();
~SwNewDBMgr();
// Art des aktellen Mergens. Siehe DBMgrOptions-enum
- inline USHORT GetMergeType() const { return nMergeType; }
- inline void SetMergeType( USHORT nTyp ) { nMergeType = nTyp; }
+ inline sal_uInt16 GetMergeType() const { return nMergeType; }
+ inline void SetMergeType( sal_uInt16 nTyp ) { nMergeType = nTyp; }
// MailMergeEvent source
const SwXMailMerge * GetMailMergeEvtSrc() const { return pMergeEvtSrc; }
void SetMailMergeEvtSrc( const SwXMailMerge *pSrc ) { pMergeEvtSrc = pSrc; }
- inline BOOL IsMergeSilent() const { return bMergeSilent != 0; }
- inline void SetMergeSilent( BOOL bVal ) { bMergeSilent = bVal; }
+ inline sal_Bool IsMergeSilent() const { return bMergeSilent != 0; }
+ inline void SetMergeSilent( sal_Bool bVal ) { bMergeSilent = bVal; }
// Mischen von Datensaetzen in Felder
- BOOL MergeNew( const SwMergeDescriptor& rMergeDesc );
- BOOL Merge(SwWrtShell* pSh);
+ sal_Bool MergeNew( const SwMergeDescriptor& rMergeDesc );
+ sal_Bool Merge(SwWrtShell* pSh);
// Datenbankfelder mit fehlendem Datenbankname initialisieren
- inline BOOL IsInitDBFields() const { return bInitDBFields; }
- inline void SetInitDBFields(BOOL b) { bInitDBFields = b; }
+ inline sal_Bool IsInitDBFields() const { return bInitDBFields; }
+ inline void SetInitDBFields(sal_Bool b) { bInitDBFields = b; }
// Serienbriefe einzelnd oder alle zusammen drucken/speichern
- inline BOOL IsSingleJobs() const { return bSingleJobs; }
- inline void SetSingleJobs(BOOL b) { bSingleJobs = b; }
+ inline sal_Bool IsSingleJobs() const { return bSingleJobs; }
+ inline void SetSingleJobs(sal_Bool b) { bSingleJobs = b; }
// Mailing
// email-Daten setzen
@@ -265,22 +265,22 @@ public:
// Listbox mit allen Tabellennamen einer Datenbank fuellen
- BOOL GetTableNames(ListBox* pListBox, const String& rDBName );
+ sal_Bool GetTableNames(ListBox* pListBox, const String& rDBName );
// Listbox mit allen Spaltennamen einer Datenbanktabelle fuellen
- BOOL GetColumnNames(ListBox* pListBox,
- const String& rDBName, const String& rTableName, BOOL bAppend = FALSE);
- BOOL GetColumnNames(ListBox* pListBox,
+ sal_Bool GetColumnNames(ListBox* pListBox,
+ const String& rDBName, const String& rTableName, sal_Bool bAppend = sal_False);
+ sal_Bool GetColumnNames(ListBox* pListBox,
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection,
- const String& rTableName, BOOL bAppend = FALSE);
+ const String& rTableName, sal_Bool bAppend = sal_False);
- ULONG GetColumnFmt( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> xSource,
+ sal_uLong GetColumnFmt( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> xSource,
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection,
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xColumn,
SvNumberFormatter* pNFmtr,
long nLanguage );
- ULONG GetColumnFmt( const String& rDBName,
+ sal_uLong GetColumnFmt( const String& rDBName,
const String& rTableName,
const String& rColNm,
SvNumberFormatter* pNFmtr,
@@ -289,25 +289,25 @@ public:
const String& rTableName,
const String& rColNm );
- inline BOOL IsInMerge() const { return bInMerge; }
+ inline sal_Bool IsInMerge() const { return bInMerge; }
void EndMerge();
void ExecuteFormLetter(SwWrtShell& rSh,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties,
- BOOL bWithDataSourceBrowser = FALSE);
+ sal_Bool bWithDataSourceBrowser = sal_False);
void InsertText(SwWrtShell& rSh,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties);
// check if a data source is open
- BOOL IsDataSourceOpen(const String& rDataSource,
+ sal_Bool IsDataSourceOpen(const String& rDataSource,
const String& rTableOrQuery, sal_Bool bMergeOnly);
// open the source while fields are updated - for the calculator only!
- BOOL OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
+ sal_Bool OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
sal_Int32 nCommandType = -1, bool bCreate = false);
sal_uInt32 GetSelectedRecordId(const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType = -1);
- BOOL GetColumnCnt(const String& rSourceName, const String& rTableName,
+ sal_Bool GetColumnCnt(const String& rSourceName, const String& rTableName,
const String& rColumnName, sal_uInt32 nAbsRecordId, long nLanguage,
String& rResult, double* pNumber);
//create and store or find an already stored connection to a data source for use
@@ -316,19 +316,19 @@ public:
RegisterConnection(::rtl::OUString& rSource);
const SwDSParam* CreateDSData(const SwDBData& rData)
- {return FindDSData(rData, TRUE);}
+ {return FindDSData(rData, sal_True);}
const SwDSParamArr& GetDSParamArray() const {return aDataSourceParams;}
//close all data sources - after fields were updated
- void CloseAll(BOOL bIncludingMerge = TRUE);
+ void CloseAll(sal_Bool bIncludingMerge = sal_True);
- BOOL GetMergeColumnCnt(const String& rColumnName, USHORT nLanguage,
+ sal_Bool GetMergeColumnCnt(const String& rColumnName, sal_uInt16 nLanguage,
String &rResult, double *pNumber, sal_uInt32 *pFormat);
- BOOL ToNextMergeRecord();
- BOOL ToNextRecord(const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType = -1);
+ sal_Bool ToNextMergeRecord();
+ sal_Bool ToNextRecord(const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType = -1);
- BOOL ExistsNextRecord()const;
+ sal_Bool ExistsNextRecord()const;
sal_uInt32 GetSelectedRecordId();
sal_Bool ToRecordId(sal_Int32 nSet);
@@ -346,7 +346,7 @@ public:
static ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>
GetColumnSupplier(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>,
const String& rTableOrQuery,
- BYTE eTableOrQuery = SW_DB_SELECT_UNKNOWN);
+ sal_uInt8 eTableOrQuery = SW_DB_SELECT_UNKNOWN);
static ::com::sun::star::uno::Sequence<rtl::OUString> GetExistingDatabaseNames();
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index 5406fb042e95..7d5fec3e37c0 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -84,8 +84,8 @@ SwRect GetBoundRectOfAnchoredObj( const SdrObject* pObj );
// OD 2004-03-31 #i26791# - change return type
SwContact* GetUserCall( const SdrObject* );
-// liefert TRUE falls das SrdObject ein Marquee-Object (Lauftext) ist
-BOOL IsMarqueeTextObj( const SdrObject& rObj );
+// liefert sal_True falls das SrdObject ein Marquee-Object (Lauftext) ist
+sal_Bool IsMarqueeTextObj( const SdrObject& rObj );
//Basisklasse fuer die folgenden KontaktObjekte (Rahmen+Zeichenobjekte)
class SwContact : public SdrObjUserCall, public SwClient
@@ -346,7 +346,7 @@ class SwDrawVirtObj : public SdrVirtObj
virtual ::basegfx::B2DPolyPolygon TakeXorPoly() const;
virtual ::basegfx::B2DPolyPolygon TakeContour() const;
virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const;
- virtual SdrHdl* GetPlusHdl(const SdrHdl& rHdl, USHORT nPlNum) const;
+ virtual SdrHdl* GetPlusHdl(const SdrHdl& rHdl, sal_uInt16 nPlNum) const;
virtual void NbcMove(const Size& rSiz);
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs);
@@ -421,7 +421,7 @@ class SwDrawContact : public SwContact
// method <_Changed(..)>
bool mbUserCallActive : 1;
// event type, which is handled for <mpSdrObjHandledByCurrentUserCall>.
- // Note: value only valid, if <mbUserCallActive> is TRUE.
+ // Note: value only valid, if <mbUserCallActive> is sal_True.
SdrUserCallType meEventTypeOfCurrentUserCall;
friend class NestedUserCallHdl;
diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx
index 87b8a9f53dea..6fb7a76c3728 100644
--- a/sw/inc/ddefld.hxx
+++ b/sw/inc/ddefld.hxx
@@ -45,35 +45,35 @@ class SW_DLLPUBLIC SwDDEFieldType : public SwFieldType
::sfx2::SvBaseLinkRef refLink;
SwDoc* pDoc;
- USHORT nRefCnt;
- BOOL bCRLFFlag : 1;
- BOOL bDeleted : 1;
+ sal_uInt16 nRefCnt;
+ sal_Bool bCRLFFlag : 1;
+ sal_Bool bDeleted : 1;
SW_DLLPRIVATE void _RefCntChgd();
public:
SwDDEFieldType( const String& rName, const String& rCmd,
- USHORT = sfx2::LINKUPDATE_ONCALL );
+ sal_uInt16 = sfx2::LINKUPDATE_ONCALL );
~SwDDEFieldType();
const String& GetExpansion() const { return aExpansion; }
void SetExpansion( const String& rStr ) { aExpansion = rStr,
- bCRLFFlag = FALSE; }
+ bCRLFFlag = sal_False; }
virtual SwFieldType* Copy() const;
virtual const String& GetName() const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
String GetCmd() const;
void SetCmd( const String& rStr );
- USHORT GetType() const { return refLink->GetUpdateMode(); }
- void SetType( USHORT nType ) { refLink->SetUpdateMode( nType ); }
+ sal_uInt16 GetType() const { return refLink->GetUpdateMode(); }
+ void SetType( sal_uInt16 nType ) { refLink->SetUpdateMode( nType ); }
- BOOL IsDeleted() const { return bDeleted; }
- void SetDeleted( BOOL b ) { bDeleted = b; }
+ sal_Bool IsDeleted() const { return bDeleted; }
+ void SetDeleted( sal_Bool b ) { bDeleted = b; }
void UpdateNow() { refLink->Update(); }
void Disconnect() { refLink->Disconnect(); }
@@ -88,7 +88,7 @@ public:
void IncRefCnt() { if( !nRefCnt++ && pDoc ) _RefCntChgd(); }
void DecRefCnt() { if( !--nRefCnt && pDoc ) _RefCntChgd(); }
- void SetCRLFDelFlag( BOOL bFlag = TRUE ) { bCRLFFlag = bFlag; }
+ void SetCRLFDelFlag( sal_Bool bFlag = sal_True ) { bCRLFFlag = bFlag; }
};
/*--------------------------------------------------------------------
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 736fbb70a3b5..34d060850a3c 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -458,43 +458,43 @@ private:
SdrLayerID nInvisibleHell;
SdrLayerID nInvisibleControls;
- bool mbGlossDoc : 1; //TRUE: ist ein Textbaustein Dokument
- bool mbModified : 1; //TRUE: Dokument ist veraendert
- bool mbDtor : 1; //TRUE: ist im SwDoc DTOR
+ bool mbGlossDoc : 1; //sal_True: ist ein Textbaustein Dokument
+ bool mbModified : 1; //sal_True: Dokument ist veraendert
+ bool mbDtor : 1; //sal_True: ist im SwDoc DTOR
// leider auch temporaer von
// SwSwgReader::InLayout(), wenn fehlerhafte
// Frames geloescht werden muessen
- bool mbUndo : 1; // TRUE: Undo eingeschaltet
- bool mbGroupUndo : 1; // TRUE: Undos werden gruppiert
- bool mbPageNums : 1; // TRUE: es gibt virtuelle Seitennummern
- bool mbLoaded : 1; // TRUE: ein geladenes Doc
- bool mbUpdateExpFld : 1; // TRUE: Expression-Felder updaten
- bool mbNewDoc : 1; // TRUE: neues Doc
- bool mbNewFldLst : 1; // TRUE: Felder-Liste neu aufbauen
- bool mbCopyIsMove : 1; // TRUE: Copy ist ein verstecktes Move
- bool mbNoDrawUndoObj : 1; // TRUE: keine DrawUndoObjecte speichern
- bool mbVisibleLinks : 1; // TRUE: Links werden sichtbar eingefuegt
- bool mbBrowseMode : 1; // TRUE: Dokument im BrowseModus anzeigen
- bool mbInReading : 1; // TRUE: Dokument wird gerade gelesen
- bool mbInXMLImport : 1; // TRUE: During xml import, attribute portion building is not necessary
- bool mbUpdateTOX : 1; // TRUE: nach Dokument laden die TOX Updaten
- bool mbInLoadAsynchron : 1; // TRUE: Dokument wird gerade asynchron geladen
- bool mbHTMLMode : 1; // TRUE: Dokument ist im HTMLMode
- bool mbInCallModified : 1; // TRUE: im Set/Reset-Modified Link
- bool mbIsGlobalDoc : 1; // TRUE: es ist ein GlobalDokument
- bool mbGlblDocSaveLinks : 1; // TRUE: im GlobalDoc. gelinkte Sect. mit speichern
- bool mbIsLabelDoc : 1; // TRUE: es ist ein Etiketten-Dokument
- bool mbIsAutoFmtRedline : 1; // TRUE: die Redlines werden vom Autoformat aufgezeichnet
- bool mbOLEPrtNotifyPending : 1; // TRUE: Printer ist geaendert und beim
+ bool mbUndo : 1; // sal_True: Undo eingeschaltet
+ bool mbGroupUndo : 1; // sal_True: Undos werden gruppiert
+ bool mbPageNums : 1; // sal_True: es gibt virtuelle Seitennummern
+ bool mbLoaded : 1; // sal_True: ein geladenes Doc
+ bool mbUpdateExpFld : 1; // sal_True: Expression-Felder updaten
+ bool mbNewDoc : 1; // sal_True: neues Doc
+ bool mbNewFldLst : 1; // sal_True: Felder-Liste neu aufbauen
+ bool mbCopyIsMove : 1; // sal_True: Copy ist ein verstecktes Move
+ bool mbNoDrawUndoObj : 1; // sal_True: keine DrawUndoObjecte speichern
+ bool mbVisibleLinks : 1; // sal_True: Links werden sichtbar eingefuegt
+ bool mbBrowseMode : 1; // sal_True: Dokument im BrowseModus anzeigen
+ bool mbInReading : 1; // sal_True: Dokument wird gerade gelesen
+ bool mbInXMLImport : 1; // sal_True: During xml import, attribute portion building is not necessary
+ bool mbUpdateTOX : 1; // sal_True: nach Dokument laden die TOX Updaten
+ bool mbInLoadAsynchron : 1; // sal_True: Dokument wird gerade asynchron geladen
+ bool mbHTMLMode : 1; // sal_True: Dokument ist im HTMLMode
+ bool mbInCallModified : 1; // sal_True: im Set/Reset-Modified Link
+ bool mbIsGlobalDoc : 1; // sal_True: es ist ein GlobalDokument
+ bool mbGlblDocSaveLinks : 1; // sal_True: im GlobalDoc. gelinkte Sect. mit speichern
+ bool mbIsLabelDoc : 1; // sal_True: es ist ein Etiketten-Dokument
+ bool mbIsAutoFmtRedline : 1; // sal_True: die Redlines werden vom Autoformat aufgezeichnet
+ bool mbOLEPrtNotifyPending : 1; // sal_True: Printer ist geaendert und beim
// Erzeugen der ::com::sun::star::sdbcx::View ist eine Benachrichtigung
// der OLE-Objekte PrtOLENotify() notwendig.
bool mbAllOLENotify : 1; // True: Benachrichtigung aller Objekte ist notwendig
bool mbIsRedlineMove : 1; // True: die Redlines werden in/aus der Section verschoben
bool mbInsOnlyTxtGlssry : 1; // True: insert 'only text' glossary into doc
bool mbContains_MSVBasic : 1; // True: MS-VBasic exist is in our storage
- bool mbPurgeOLE : 1; // TRUE: Purge OLE-Objects
- bool mbKernAsianPunctuation : 1; // TRUE: kerning also for ASIAN punctuation
- bool mbReadlineChecked : 1; // TRUE: if the query was already shown
+ bool mbPurgeOLE : 1; // sal_True: Purge OLE-Objects
+ bool mbKernAsianPunctuation : 1; // sal_True: kerning also for ASIAN punctuation
+ bool mbReadlineChecked : 1; // sal_True: if the query was already shown
bool mbLinksUpdated : 1; // OD 2005-02-11 #i38810#
// flag indicating, that the links have been updated.
bool mbClipBoard : 1; // true: this document represents the clipboard
@@ -502,7 +502,7 @@ private:
// (clipboard docs only)
#ifdef DBG_UTIL
- bool mbXMLExport : 1; // TRUE: during XML export
+ bool mbXMLExport : 1; // sal_True: during XML export
#endif
// --> OD 2006-03-21 #b6375613#
@@ -521,59 +521,59 @@ private:
// HISTORY OF THE COMPATIBILITY FLAGS:
//
// SO5:
- // mbParaSpaceMax def = FALSE, TRUE since SO8
- // mbParaSpaceMaxAtPages def = FALSE, TRUE since SO8
+ // mbParaSpaceMax def = sal_False, sal_True since SO8
+ // mbParaSpaceMaxAtPages def = sal_False, sal_True since SO8
//
// SO6:
- // mbTabCompat def = FALSE, TRUE since SO8
+ // mbTabCompat def = sal_False, sal_True since SO8
//
// SO7:
- // mbUseVirtualDevice def = TRUE
- // mbAddFlyOffsets def = FALSE, hidden
+ // mbUseVirtualDevice def = sal_True
+ // mbAddFlyOffsets def = sal_False, hidden
//
// SO7pp1:
- // bOldNumbering def = FALSE, hidden
+ // bOldNumbering def = sal_False, hidden
//
// SO8:
- // mbAddExternalLeading def = TRUE
- // mbUseHiResolutionVirtualDevice def = TRUE, hidden
- // mbOldLineSpacing def = FALSE
- // mbAddParaSpacingToTableCells def = TRUE
- // mbUseFormerObjectPos def = FALSE
- // mbUseFormerTextWrapping def = FALSE
- // mbConsiderWrapOnObjPos def = FALSE
+ // mbAddExternalLeading def = sal_True
+ // mbUseHiResolutionVirtualDevice def = sal_True, hidden
+ // mbOldLineSpacing def = sal_False
+ // mbAddParaSpacingToTableCells def = sal_True
+ // mbUseFormerObjectPos def = sal_False
+ // mbUseFormerTextWrapping def = sal_False
+ // mbConsiderWrapOnObjPos def = sal_False
//
// SO8pp1:
- // mbIgnoreFirstLineIndentInNumbering def = FALSE, hidden
- // mbDoNotJustifyLinesWithManualBreak def = FALSE, hidden
- // mbDoNotResetParaAttrsForNumFont def = FALSE, hidden
+ // mbIgnoreFirstLineIndentInNumbering def = sal_False, hidden
+ // mbDoNotJustifyLinesWithManualBreak def = sal_False, hidden
+ // mbDoNotResetParaAttrsForNumFont def = sal_False, hidden
//
// SO8pp3
- // mbDoNotCaptureDrawObjsOnPage def = FALSE, hidden
+ // mbDoNotCaptureDrawObjsOnPage def = sal_False, hidden
// - Relevant for drawing objects, which don't follow the text flow, but
// whose position is outside the page area:
- // FALSE: Such drawing objects are captured on the page area of its anchor.
- // TRUE: Such drawing objects can leave the page area, they aren't captured.
- // mbTableRowKeep def = FALSE, hidden
- // mbIgnoreTabsAndBlanksForLineCalculation def = FALSE, hidden
- // mbClipAsCharacterAnchoredWriterFlyFrame def = FALSE, hidden
+ // sal_False: Such drawing objects are captured on the page area of its anchor.
+ // sal_True: Such drawing objects can leave the page area, they aren't captured.
+ // mbTableRowKeep def = sal_False, hidden
+ // mbIgnoreTabsAndBlanksForLineCalculation def = sal_False, hidden
+ // mbClipAsCharacterAnchoredWriterFlyFrame def = sal_False, hidden
// - Introduced in order to re-activate clipping of as-character anchored
// Writer fly frames in method <SwFlyInCntFrm::MakeAll()> for documents,
// which are created with version prior SO8/OOo 2.0
//
// SO8pp4
- // mbUnixForceZeroExtLeading def = FALSE, hidden
+ // mbUnixForceZeroExtLeading def = sal_False, hidden
//
// SO8pu8
- // mbOldPrinterMetrics def = FALSE, hidden
+ // mbOldPrinterMetrics def = sal_False, hidden
//
// SO9
// #i24363# tab stops relative to indent
- // mbTabRelativeToIndent def = TRUE, hidden
+ // mbTabRelativeToIndent def = sal_True, hidden
// #i89181# suppress tab stop at left indent for paragraphs in lists, whose
// list level position and space mode equals LABEL_ALIGNMENT and whose list
// label is followed by a tab character.
- // mbTabAtLeftIndentForParagraphsInList def = FALSE, hidden
+ // mbTabAtLeftIndentForParagraphsInList def = sal_False, hidden
bool mbParaSpaceMax : 1;
bool mbParaSpaceMaxAtPages : 1;
@@ -587,7 +587,7 @@ private:
bool mbUseFormerObjectPos : 1; // OD 2004-03-12 #i11860#
bool mbUseFormerTextWrapping : 1; // FME 2005-05-11 #108724#
bool mbConsiderWrapOnObjPos : 1; // OD 2004-05-05 #i28701#
- // TRUE: object positioning algorithm has consider the wrapping style of // the floating screen objects as given by its attribute 'WrapInfluenceOnObjPos'
+ // sal_True: object positioning algorithm has consider the wrapping style of // the floating screen objects as given by its attribute 'WrapInfluenceOnObjPos'
bool mbMathBaselineAlignment : 1; // TL 2010-10-29 #i972#
// non-ui-compatibility flags:
@@ -650,7 +650,7 @@ private:
sal_Int8 SetFlyFrmAnchor( SwFrmFmt& rFlyFmt, SfxItemSet& rSet, sal_Bool bNewFrms );
// --> OD 2005-01-13 #i40550#
- typedef SwFmt* (SwDoc:: *FNCopyFmt)( const String&, SwFmt*, BOOL, BOOL );
+ typedef SwFmt* (SwDoc:: *FNCopyFmt)( const String&, SwFmt*, sal_Bool, sal_Bool );
// <--
SwFmt* CopyFmt( const SwFmt& rFmt, const SvPtrarr& rFmtArr,
FNCopyFmt fnCopyFmt, const SwFmt& rDfltFmt );
@@ -704,8 +704,8 @@ private:
// Charts der angegebenen Tabelle updaten
void _UpdateCharts( const SwTable& rTbl, ViewShell& rVSh ) const;
- BOOL _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry,
- USHORT nMode );
+ sal_Bool _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry,
+ sal_uInt16 nMode );
// unser eigener 'IdlTimer' ruft folgende Methode
DECL_LINK( DoIdleJobs, Timer * );
@@ -713,9 +713,9 @@ private:
DECL_LINK( DoUpdateAllCharts, Timer * );
DECL_LINK( DoUpdateModifiedOLE, Timer * );
- SwFmt *_MakeCharFmt(const String &, SwFmt *, BOOL, BOOL );
- SwFmt *_MakeFrmFmt(const String &, SwFmt *, BOOL, BOOL );
- SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, BOOL, BOOL );
+ SwFmt *_MakeCharFmt(const String &, SwFmt *, sal_Bool, sal_Bool );
+ SwFmt *_MakeFrmFmt(const String &, SwFmt *, sal_Bool, sal_Bool );
+ SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, sal_Bool, sal_Bool );
void InitTOXTypes();
void Paste( const SwDoc& );
@@ -750,8 +750,8 @@ public:
*/
virtual bool get(/*[in]*/ DocumentSettingId id) const;
virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value);
- virtual const com::sun::star::i18n::ForbiddenCharacters* getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const;
- virtual void setForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters );
+ virtual const com::sun::star::i18n::ForbiddenCharacters* getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const;
+ virtual void setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters );
virtual vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable();
virtual const vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const;
virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const;
@@ -850,7 +850,7 @@ public:
virtual void SetVisibleLinks(bool bFlag);
virtual sfx2::LinkManager& GetLinkManager();
virtual const sfx2::LinkManager& GetLinkManager() const;
- virtual void UpdateLinks(BOOL bUI);
+ virtual void UpdateLinks(sal_Bool bUI);
virtual bool GetData(const String& rItem, const String& rMimeType, ::com::sun::star::uno::Any& rValue) const;
virtual bool SetData(const String& rItem, const String& rMimeType, const ::com::sun::star::uno::Any& rValue);
virtual ::sfx2::SvLinkSource* CreateLinkSource(const String& rItem);
@@ -867,7 +867,7 @@ public:
virtual void RemoveFldType(sal_uInt16 nFld);
virtual void UpdateFlds( SfxPoolItem* pNewHt, bool bCloseDB);
virtual void InsDeletedFldType(SwFieldType &);
- virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, USHORT nWhich);
+ virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich);
virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds);
virtual void UpdateRefFlds(SfxPoolItem* pHt);
virtual void UpdateTblFlds(SfxPoolItem* pHt);
@@ -878,9 +878,9 @@ public:
virtual void UnlockExpFlds();
virtual bool IsExpFldsLocked() const;
virtual SwDocUpdtFld& GetUpdtFlds() const;
- virtual bool SetFieldsDirty(bool b, const SwNode* pChk, ULONG nLen);
+ virtual bool SetFieldsDirty(bool b, const SwNode* pChk, sal_uLong nLen);
virtual void SetFixFields(bool bOnlyTimeDate, const DateTime* pNewDateTime);
- virtual void FldsToCalc(SwCalc& rCalc, ULONG nLastNd, sal_uInt16 nLastCnt);
+ virtual void FldsToCalc(SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt);
virtual void FldsToCalc(SwCalc& rCalc, const _SetGetExpFld& rToThisFld);
virtual void FldsToExpand(SwHash**& ppTbl, sal_uInt16& rTblSize, const _SetGetExpFld& rToThisFld);
virtual bool IsNewFldLst() const;
@@ -1100,18 +1100,18 @@ public:
// im FlySet/FrmFmt mit gueltiger CntntPos gesetzt ist
/* #109161# new parameter bCalledFromShell
- TRUE: An existing adjust item at pAnchorPos is propagated to
+ sal_True: An existing adjust item at pAnchorPos is propagated to
the content node of the new fly section. That propagation only
takes place if there is no adjust item in the paragraph style
for the new fly section.
- FALSE: no propagation
+ sal_False: no propagation
*/
SwFlyFrmFmt* MakeFlySection( RndStdIds eAnchorType,
const SwPosition* pAnchorPos,
const SfxItemSet* pSet = 0,
SwFrmFmt *pParent = 0,
- BOOL bCalledFromShell = FALSE );
+ sal_Bool bCalledFromShell = sal_False );
SwFlyFrmFmt* MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
const SwSelBoxes* pSelBoxes = 0,
SwFrmFmt *pParent = 0 );
@@ -1226,7 +1226,7 @@ public:
const SvUShortsSort* = 0,
const bool bSendDataChangedEvents = true );
// <--
- void RstTxtAttrs(const SwPaM &rRg, BOOL bInclRefToxMark = FALSE );
+ void RstTxtAttrs(const SwPaM &rRg, sal_Bool bInclRefToxMark = sal_False );
// Setze das Attribut im angegebenen Format. Ist Undo aktiv, wird
// das alte in die Undo-History aufgenommen
@@ -1235,7 +1235,7 @@ public:
// --> OD 2008-02-12 #newlistlevelattrs#
// method to reset a certain attribute at the given format
- void ResetAttrAtFormat( const USHORT nWhichId,
+ void ResetAttrAtFormat( const sal_uInt16 nWhichId,
SwFmt& rChangedFormat );
// <--
@@ -1274,18 +1274,18 @@ public:
void RemoveAllFmtLanguageDependencies();
SwFrmFmt *MakeFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom,
- BOOL bBroadcast = FALSE, BOOL bAuto = TRUE);
- void DelFrmFmt( SwFrmFmt *pFmt, BOOL bBroadcast = FALSE );
+ sal_Bool bBroadcast = sal_False, sal_Bool bAuto = sal_True);
+ void DelFrmFmt( SwFrmFmt *pFmt, sal_Bool bBroadcast = sal_False );
SwFrmFmt* FindFrmFmtByName( const String& rName ) const
{ return (SwFrmFmt*)FindFmtByName( (SvPtrarr&)*pFrmFmtTbl, rName ); }
// --> OD 2005-01-13 #i40550#
SwCharFmt *MakeCharFmt(const String &rFmtName, SwCharFmt *pDerivedFrom,
- BOOL bBroadcast = FALSE,
- BOOL bAuto = TRUE );
+ sal_Bool bBroadcast = sal_False,
+ sal_Bool bAuto = sal_True );
// <--
- void DelCharFmt(sal_uInt16 nFmt, BOOL bBroadcast = FALSE);
- void DelCharFmt(SwCharFmt* pFmt, BOOL bBroadcast = FALSE);
+ void DelCharFmt(sal_uInt16 nFmt, sal_Bool bBroadcast = sal_False);
+ void DelCharFmt(SwCharFmt* pFmt, sal_Bool bBroadcast = sal_False);
SwCharFmt* FindCharFmtByName( const String& rName ) const
{ return (SwCharFmt*)FindFmtByName( (SvPtrarr&)*pCharFmtTbl, rName ); }
@@ -1296,14 +1296,14 @@ public:
// --> OD 2005-01-13 #i40550#
SwTxtFmtColl *MakeTxtFmtColl( const String &rFmtName,
SwTxtFmtColl *pDerivedFrom,
- BOOL bBroadcast = FALSE,
- BOOL bAuto = TRUE );
+ sal_Bool bBroadcast = sal_False,
+ sal_Bool bAuto = sal_True );
// <--
SwConditionTxtFmtColl* MakeCondTxtFmtColl( const String &rFmtName,
SwTxtFmtColl *pDerivedFrom,
- BOOL bBroadcast = FALSE);
- void DelTxtFmtColl(sal_uInt16 nFmt, BOOL bBroadcast = FALSE);
- void DelTxtFmtColl( SwTxtFmtColl* pColl, BOOL bBroadcast = FALSE );
+ sal_Bool bBroadcast = sal_False);
+ void DelTxtFmtColl(sal_uInt16 nFmt, sal_Bool bBroadcast = sal_False);
+ void DelTxtFmtColl( SwTxtFmtColl* pColl, sal_Bool bBroadcast = sal_False );
// --> OD 2007-11-06 #i62675#
// Add 4th optional parameter <bResetListAttrs>.
// 'side effect' of <SetTxtFmtColl> with <bReset = true> is that the hard
@@ -1410,18 +1410,18 @@ public:
SwPageDesc& _GetPageDesc( sal_uInt16 i ) const { return *aPageDescs[i]; }
void ChgPageDesc( const String & rName, const SwPageDesc& );
void ChgPageDesc( sal_uInt16 i, const SwPageDesc& );
- BOOL FindPageDesc( const String & rName, sal_uInt16 * pFound );
+ sal_Bool FindPageDesc( const String & rName, sal_uInt16 * pFound );
// -> #116530#
- void DelPageDesc( const String & rName, BOOL bBroadcast = FALSE);
- void DelPageDesc( sal_uInt16 i, BOOL bBroadcast = FALSE );
+ void DelPageDesc( const String & rName, sal_Bool bBroadcast = sal_False);
+ void DelPageDesc( sal_uInt16 i, sal_Bool bBroadcast = sal_False );
// <- #116530#
void PreDelPageDesc(SwPageDesc * pDel); // #i7983#
// -> #116530#
sal_uInt16 MakePageDesc( const String &rName, const SwPageDesc* pCpy = 0,
- BOOL bRegardLanguage = TRUE,
- BOOL bBroadcast = FALSE);
+ sal_Bool bRegardLanguage = sal_True,
+ sal_Bool bBroadcast = sal_False);
void BroadcastStyleOperation(String rName, SfxStyleFamily eFamily,
- USHORT nOp);
+ sal_uInt16 nOp);
// <- #116530#
@@ -1443,7 +1443,7 @@ public:
const SwTOXBase& rTOX,
const SfxItemSet* pSet = 0,
sal_Bool bExpand = sal_False );
- const SwTOXBaseSection* InsertTableOf( ULONG nSttNd, ULONG nEndNd,
+ const SwTOXBaseSection* InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd,
const SwTOXBase& rTOX,
const SfxItemSet* pSet = 0 );
const SwTOXBase* GetCurTOX( const SwPosition& rPos ) const;
@@ -1533,7 +1533,7 @@ public:
// arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren
// --> OD 2005-02-18 #i42921# - re-use unused 3rd parameter
// --> OD 2008-02-08 #newlistlevelattrs#
- // Add optional parameter <bResetIndentAttrs> - default value FALSE.
+ // Add optional parameter <bResetIndentAttrs> - default value sal_False.
// If <bResetIndentAttrs> equals true, the indent attributes "before text"
// and "first line indent" are additionally reset at the provided PaM, if
// the list style makes use of the new list level attributes.
@@ -1582,7 +1582,7 @@ public:
// add optional parameter <eDefaultNumberFormatPositionAndSpaceMode>
sal_uInt16 MakeNumRule( const String &rName,
const SwNumRule* pCpy = 0,
- BOOL bBroadcast = FALSE,
+ sal_Bool bBroadcast = sal_False,
const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode =
SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
// <--
@@ -1592,8 +1592,8 @@ public:
// loeschen geht nur, wenn die ::com::sun::star::chaos::Rule niemand benutzt!
// #106897#
sal_Bool RenameNumRule(const String & aOldName, const String & aNewName,
- BOOL bBroadcast = FALSE);
- sal_Bool DelNumRule( const String& rName, BOOL bBroadCast = FALSE );
+ sal_Bool bBroadcast = sal_False);
+ sal_Bool DelNumRule( const String& rName, sal_Bool bBroadCast = sal_False );
String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const;
void UpdateNumRule(); // alle invaliden Updaten
@@ -1615,12 +1615,12 @@ public:
OD 2008-03-18 #refactorlists# - add output parameter <sListId>
\param rPos position to start search
- \param bForward - TRUE: search forward
- - FALSE: search backward
- \param bNum - TRUE: search for enumeration
- - FALSE: search for itemize
- \param bOutline - TRUE: search for outline numbering rule
- - FALSE: search for non-outline numbering rule
+ \param bForward - sal_True: search forward
+ - sal_False: search backward
+ \param bNum - sal_True: search for enumeration
+ - sal_False: search for itemize
+ \param bOutline - sal_True: search for outline numbering rule
+ - sal_False: search for non-outline numbering rule
\param nNonEmptyAllowed number of non-empty paragraphs allowed between
rPos and found paragraph
@@ -1666,20 +1666,20 @@ public:
// Positionen der Spalten!! (nicht deren Breite!)
/* #109161# new parameter bCalledFromShell:
- TRUE: called from shell -> propagate existing adjust item at
+ sal_True: called from shell -> propagate existing adjust item at
rPos to every new cell. A existing adjust item in the table
heading or table contents paragraph style prevent that
propagation.
- FALSE: do not propagate
+ sal_False: do not propagate
*/
const SwTable* InsertTable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER
const SwPosition& rPos, sal_uInt16 nRows,
sal_uInt16 nCols, short eAdjust,
const SwTableAutoFmt* pTAFmt = 0,
const SvUShorts* pColArr = 0,
- BOOL bCalledFromShell = FALSE,
- BOOL bNewModel = TRUE );
+ sal_Bool bCalledFromShell = sal_False,
+ sal_Bool bNewModel = sal_True );
// steht der Index in einer Tabelle, dann returne den TableNode sonst 0
SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx );
@@ -1724,7 +1724,7 @@ public:
const SwCursor* pCrsr, const SwCellFrm* pBoxFrm = 0 );
void GetTabRows( SwTabCols &rFill, const SwCursor* pCrsr,
const SwCellFrm* pBoxFrm = 0 ) const;
- void SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const SwCursor* pCrsr,
+ void SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const SwCursor* pCrsr,
const SwCellFrm* pBoxFrm = 0 );
@@ -1732,14 +1732,14 @@ public:
void SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld,
const SwTableBox *pStart, sal_Bool bCurRowOnly);
- void SetRowsToRepeat( SwTable &rTable, USHORT nSet );
+ void SetRowsToRepeat( SwTable &rTable, sal_uInt16 nSet );
// AutoFormat fuer die Tabelle/TabellenSelection
sal_Bool SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew );
// Erfrage wie attributiert ist
sal_Bool GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet );
// setze das InsertDB als Tabelle Undo auf:
- void AppendUndoForInsertFromDB( const SwPaM& rPam, BOOL bIsTable );
+ void AppendUndoForInsertFromDB( const SwPaM& rPam, sal_Bool bIsTable );
// setze die Spalten/Zeilen/ZTellen Breite/Hoehe
sal_Bool SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff );
@@ -1792,7 +1792,7 @@ public:
// returne dieses.
SwFlyFrmFmt* InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
const String& rNumberingSeparator,
- const sal_Bool bBefore, const sal_uInt16 nId, const ULONG nIdx,
+ const sal_Bool bBefore, const sal_uInt16 nId, const sal_uLong nIdx,
const String& rCharacterStyle,
const sal_Bool bCpyBrd = sal_True );
SwFlyFrmFmt* InsertDrawLabel(
@@ -1907,7 +1907,7 @@ public:
//restore the invisible content if it's available on the undo stack
sal_Bool RestoreInvisibleContent();
// replace fields by text - mailmerge support
- BOOL ConvertFieldsToText();
+ sal_Bool ConvertFieldsToText();
// erzeuge Anhand der vorgebenen Collection Teildokumente
// falls keine angegeben ist, nehme die Kapitelvorlage der 1. Ebene
@@ -2008,10 +2008,10 @@ public:
void SetContainsMSVBasic( bool bFlag ) { mbContains_MSVBasic = bFlag; }
// Interface for the list of Ruby - texts/attributes
- USHORT FillRubyList( const SwPaM& rPam, SwRubyList& rList,
- USHORT nMode );
- USHORT SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
- USHORT nMode );
+ sal_uInt16 FillRubyList( const SwPaM& rPam, SwRubyList& rList,
+ sal_uInt16 nMode );
+ sal_uInt16 SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
+ sal_uInt16 nMode );
void ReadLayoutCache( SvStream& rStream );
void WriteLayoutCache( SvStream& rStream );
@@ -2036,12 +2036,12 @@ public:
@param sListId list Id of the list whose level has to be marked/unmarked
@param nListLevel level to mark
- @param bValue - TRUE mark the level
- - FALSE unmark the level
+ @param bValue - sal_True mark the level
+ - sal_False unmark the level
*/
void MarkListLevel( const String& sListId,
const int nListLevel,
- const BOOL bValue );
+ const sal_Bool bValue );
/** Marks/Unmarks a list level of a certain list
@@ -2050,19 +2050,19 @@ public:
@param rList list whose level has to be marked/unmarked
@param nListLevel level to mark
- @param bValue - TRUE mark the level
- - FALSE unmark the level
+ @param bValue - sal_True mark the level
+ - sal_False unmark the level
*/
void MarkListLevel( SwList& rList,
const int nListLevel,
- const BOOL bValue );
+ const sal_Bool bValue );
// <- #i27615#
// Change a format undoable.
void ChgFmt(SwFmt & rFmt, const SfxItemSet & rSet);
void RenameFmt(SwFmt & rFmt, const String & sNewName,
- BOOL bBroadcast = FALSE);
+ sal_Bool bBroadcast = sal_False);
// Change a TOX undoable.
void ChgTOX(SwTOXBase & rTOX, const SwTOXBase & rNew);
@@ -2088,7 +2088,7 @@ public:
String GetPaMDescr(const SwPaM & rPaM) const;
// -> #i23726#
- BOOL IsFirstOfNumRule(SwPosition & rPos);
+ sal_Bool IsFirstOfNumRule(SwPosition & rPos);
// <- #i23726#
// --> #i31958# access methods for XForms model(s)
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index 2b5ad3fd5203..015e8bee557a 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -91,28 +91,28 @@ SV_DECL_PTRARR_SORT_DEL( _SwRedlineTbl, SwRedlinePtr, 0, 16 )
class SwRedlineTbl : private _SwRedlineTbl
{
public:
- SwRedlineTbl( BYTE nSize = 0, BYTE nG = 16 )
+ SwRedlineTbl( sal_uInt8 nSize = 0, sal_uInt8 nG = 16 )
: _SwRedlineTbl( nSize, nG ) {}
~SwRedlineTbl() {}
- BOOL SavePtrInArr( SwRedlinePtr p ) { return _SwRedlineTbl::Insert( p ); }
+ sal_Bool SavePtrInArr( SwRedlinePtr p ) { return _SwRedlineTbl::Insert( p ); }
- BOOL Insert( SwRedlinePtr& p, BOOL bIns = TRUE );
- BOOL Insert( SwRedlinePtr& p, USHORT& rInsPos, BOOL bIns = TRUE );
- BOOL InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos = 0 );
+ sal_Bool Insert( SwRedlinePtr& p, sal_Bool bIns = sal_True );
+ sal_Bool Insert( SwRedlinePtr& p, sal_uInt16& rInsPos, sal_Bool bIns = sal_True );
+ sal_Bool InsertWithValidRanges( SwRedlinePtr& p, sal_uInt16* pInsPos = 0 );
- void Remove( USHORT nP, USHORT nL = 1 );
- void DeleteAndDestroy( USHORT nP, USHORT nL=1 );
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 );
// suche den naechsten oder vorherigen Redline mit dergleichen Seq.No
// Mit dem Lookahead kann die Suche eingeschraenkt werden. 0 oder
// USHRT_MAX suchen im gesamten Array.
- USHORT FindNextOfSeqNo( USHORT nSttPos, USHORT nLookahead = 20 ) const;
- USHORT FindPrevOfSeqNo( USHORT nSttPos, USHORT nLookahead = 20 ) const;
- USHORT FindNextSeqNo( USHORT nSeqNo, USHORT nSttPos,
- USHORT nLookahead = 20 ) const;
- USHORT FindPrevSeqNo( USHORT nSeqNo, USHORT nSttPos,
- USHORT nLookahead = 20 ) const;
+ sal_uInt16 FindNextOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead = 20 ) const;
+ sal_uInt16 FindPrevOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead = 20 ) const;
+ sal_uInt16 FindNextSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos,
+ sal_uInt16 nLookahead = 20 ) const;
+ sal_uInt16 FindPrevSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos,
+ sal_uInt16 nLookahead = 20 ) const;
using _SwRedlineTbl::Count;
using _SwRedlineTbl::operator[];
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 3dd338a5e129..1b6091668c67 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -99,28 +99,28 @@ class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener
SW_DLLPRIVATE virtual sal_Bool SaveAs( SfxMedium& rMedium );
SW_DLLPRIVATE virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
- SW_DLLPRIVATE virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+ SW_DLLPRIVATE virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
// DocInfo dem Doc melden
//
SW_DLLPRIVATE virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog(
Window *pParent, const SfxItemSet &);
// OLE-Geraffel
- SW_DLLPRIVATE virtual void Draw( OutputDevice*, const JobSetup&, USHORT);
+ SW_DLLPRIVATE virtual void Draw( OutputDevice*, const JobSetup&, sal_uInt16);
// Methoden fuer StyleSheets
- SW_DLLPRIVATE USHORT Edit( const String &rName, const String& rParent, USHORT nFamily,
- USHORT nMask, BOOL bNew,
- BOOL bColumn = FALSE,
+ SW_DLLPRIVATE sal_uInt16 Edit( const String &rName, const String& rParent, sal_uInt16 nFamily,
+ sal_uInt16 nMask, sal_Bool bNew,
+ sal_Bool bColumn = sal_False,
SwWrtShell* pActShell = 0,
- BOOL bBasic = FALSE );
- SW_DLLPRIVATE USHORT Delete(const String &rName, USHORT nFamily);
- SW_DLLPRIVATE USHORT ApplyStyles(const String &rName, USHORT nFamily, SwWrtShell* pShell = 0,
- USHORT nMode = 0 );
- SW_DLLPRIVATE USHORT DoWaterCan( const String &rName, USHORT nFamily);
- SW_DLLPRIVATE USHORT UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* pShell = 0);
- SW_DLLPRIVATE USHORT MakeByExample(const String &rName,
- USHORT nFamily, USHORT nMask, SwWrtShell* pShell = 0);
+ sal_Bool bBasic = sal_False );
+ SW_DLLPRIVATE sal_uInt16 Delete(const String &rName, sal_uInt16 nFamily);
+ SW_DLLPRIVATE sal_uInt16 ApplyStyles(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell = 0,
+ sal_uInt16 nMode = 0 );
+ SW_DLLPRIVATE sal_uInt16 DoWaterCan( const String &rName, sal_uInt16 nFamily);
+ SW_DLLPRIVATE sal_uInt16 UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell = 0);
+ SW_DLLPRIVATE sal_uInt16 MakeByExample(const String &rName,
+ sal_uInt16 nFamily, sal_uInt16 nMask, SwWrtShell* pShell = 0);
SW_DLLPRIVATE void InitDraw();
SW_DLLPRIVATE void SubInitNew(); // fuer InitNew und HtmlSourceModus
@@ -162,14 +162,14 @@ public:
// OLE-Geraffel
virtual void SetVisArea( const Rectangle &rRect );
- virtual Rectangle GetVisArea( USHORT nAspect ) const;
+ virtual Rectangle GetVisArea( sal_uInt16 nAspect ) const;
virtual Printer *GetDocumentPrinter();
virtual OutputDevice* GetDocumentRefDev();
virtual void OnDocumentPrinterChanged( Printer * pNewPrinter );
- virtual ULONG GetMiscStatus() const;
+ virtual sal_uLong GetMiscStatus() const;
virtual void PrepareReload();
- virtual void SetModified( BOOL = TRUE );
+ virtual void SetModified( sal_Bool = sal_True );
// Dispatcher
void Execute(SfxRequest &);
@@ -192,24 +192,24 @@ public:
void UpdateChildWindows();
// globaler IO
- virtual BOOL Save();
+ virtual sal_Bool Save();
// fuer VorlagenPI
virtual SfxStyleSheetBasePool* GetStyleSheetPool();
// Fuer Organizer
- virtual BOOL Insert(SfxObjectShell &rSource,
- USHORT nSourceIdx1,
- USHORT nSourceIdx2,
- USHORT nSourceIdx3,
- USHORT& nIdx1,
- USHORT& nIdx2,
- USHORT& nIdx3,
- USHORT& nRemovedIdx);
-
- virtual BOOL Remove(USHORT nIdx1,
- USHORT nIdx2 = INDEX_IGNORE,
- USHORT nIdx3 = INDEX_IGNORE);
+ virtual sal_Bool Insert(SfxObjectShell &rSource,
+ sal_uInt16 nSourceIdx1,
+ sal_uInt16 nSourceIdx2,
+ sal_uInt16 nSourceIdx3,
+ sal_uInt16& nIdx1,
+ sal_uInt16& nIdx2,
+ sal_uInt16& nIdx3,
+ sal_uInt16& nRemovedIdx);
+
+ virtual sal_Bool Remove(sal_uInt16 nIdx1,
+ sal_uInt16 nIdx2 = INDEX_IGNORE,
+ sal_uInt16 nIdx3 = INDEX_IGNORE);
virtual Bitmap GetStyleFamilyBitmap( SfxStyleFamily eFamily, BmpColorMode eColorMode );
@@ -247,11 +247,11 @@ public:
virtual void LoadStyles( SfxObjectShell& rSource );
- void _LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocument );
+ void _LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrentDocument );
// Seitenvorlagedialog anzeigen, ggf. auf Spaltenpage
void FormatPage( const String& rPage,
- BOOL bColumn = FALSE,
+ sal_Bool bColumn = sal_False,
SwWrtShell* pActShell = 0 );
// --> OD 2006-11-07 #i59688#
@@ -275,13 +275,13 @@ public:
//Activate wait cursor for all windows of this document
//Optionally all dispatcher could be Locked
//Usually locking should be done using the class: SwWaitObject!
- void EnterWait( BOOL bLockDispatcher );
- void LeaveWait( BOOL bLockDispatcher );
+ void EnterWait( sal_Bool bLockDispatcher );
+ void LeaveWait( sal_Bool bLockDispatcher );
- void ToggleBrowserMode(BOOL bOn, SwView* pView = 0);
+ void ToggleBrowserMode(sal_Bool bOn, SwView* pView = 0);
- ULONG LoadStylesFromFile( const String& rURL, SwgReaderOption& rOpt,
- BOOL bUnoCall );
+ sal_uLong LoadStylesFromFile( const String& rURL, SwgReaderOption& rOpt,
+ sal_Bool bUnoCall );
void InvalidateModel();
void ReactivateModel();
diff --git a/sw/inc/docstat.hxx b/sw/inc/docstat.hxx
index edcf4abad52a..5d40357524c8 100644
--- a/sw/inc/docstat.hxx
+++ b/sw/inc/docstat.hxx
@@ -33,17 +33,17 @@
struct SW_DLLPUBLIC SwDocStat
{
- USHORT nTbl;
- USHORT nGrf;
- USHORT nOLE;
- ULONG nPage;
+ sal_uInt16 nTbl;
+ sal_uInt16 nGrf;
+ sal_uInt16 nOLE;
+ sal_uLong nPage;
/// paragraphs for document statistic: non-empty and non-hidden ones
- ULONG nPara;
+ sal_uLong nPara;
/// all paragraphs, including empty/hidden ones
- ULONG nAllPara;
- ULONG nWord;
- ULONG nChar;
- BOOL bModified;
+ sal_uLong nAllPara;
+ sal_uLong nWord;
+ sal_uLong nChar;
+ sal_Bool bModified;
SwDocStat();
void Reset();
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index 91c44278878d..d8840a72a8d7 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -74,7 +74,7 @@ class SW_DLLPUBLIC SwDocStyleSheet : public SfxStyleSheetBase
SwDoc& rDoc;
SfxItemSet aCoreSet;
- BOOL bPhysical;
+ sal_Bool bPhysical;
// leere Huelse zum richtigen StyleSheet (Core) machen
@@ -87,7 +87,7 @@ class SW_DLLPUBLIC SwDocStyleSheet : public SfxStyleSheetBase
FillPhysical
};
- SW_DLLPRIVATE BOOL FillStyleSheet( FillStyleType eFType );
+ SW_DLLPRIVATE sal_Bool FillStyleSheet( FillStyleType eFType );
protected:
virtual ~SwDocStyleSheet();
@@ -97,20 +97,20 @@ public:
const String& rName,
SwDocStyleSheetPool& rPool,
SfxStyleFamily eFam,
- USHORT nMask);
+ sal_uInt16 nMask);
SwDocStyleSheet( const SwDocStyleSheet& );
void Reset();
- void SetMask(USHORT nMsk) { nMask = nMsk; }
+ void SetMask(sal_uInt16 nMsk) { nMask = nMsk; }
void SetFamily(SfxStyleFamily eFam) { nFamily = eFam; }
- BOOL IsPhysical() const { return bPhysical; }
- void SetPhysical(BOOL bPhys);
+ sal_Bool IsPhysical() const { return bPhysical; }
+ void SetPhysical(sal_Bool bPhys);
// --> OD 2008-02-11 #newlistlevelattrs#
- // add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value FALSE,
+ // add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value sal_False,
// which indicates that the indent attributes at a paragraph style should
// be reset in case that a list style is applied to the paragraph style and
// no indent attributes are applied.
@@ -127,8 +127,8 @@ public:
virtual const String& GetParent() const;
virtual const String& GetFollow() const;
- virtual ULONG GetHelpId( String& rFile );
- virtual void SetHelpId( const String& r, ULONG nId );
+ virtual sal_uLong GetHelpId( String& rFile );
+ virtual void SetHelpId( const String& r, sal_uLong nId );
// Vorbelegen der member ohne physikalischen Zugriff
// wird vom StyleSheetPool benutzt
@@ -138,13 +138,13 @@ public:
void PresetParent(const String& rName){ aParent = rName; }
void PresetFollow(const String& rName){ aFollow = rName; }
- virtual BOOL SetName( const String& rStr);
- virtual BOOL SetParent( const String& rStr);
- virtual BOOL SetFollow( const String& rStr);
+ virtual sal_Bool SetName( const String& rStr);
+ virtual sal_Bool SetParent( const String& rStr);
+ virtual sal_Bool SetFollow( const String& rStr);
- virtual BOOL HasFollowSupport() const;
- virtual BOOL HasParentSupport() const;
- virtual BOOL HasClearParentSupport() const;
+ virtual sal_Bool HasFollowSupport() const;
+ virtual sal_Bool HasParentSupport() const;
+ virtual sal_Bool HasClearParentSupport() const;
virtual String GetDescription();
virtual String GetDescription(SfxMapUnit eUnit);
@@ -155,7 +155,7 @@ public:
const SwNumRule* GetNumRule();
void SetNumRule(const SwNumRule& rRule);
- virtual BOOL IsUsed() const;
+ virtual sal_Bool IsUsed() const;
};
/*--------------------------------------------------------------------
@@ -167,21 +167,21 @@ class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener
rtl::Reference< SwDocStyleSheet > mxIterSheet;
rtl::Reference< SwDocStyleSheet > mxStyleSheet;
SwPoolFmtList aLst;
- USHORT nLastPos;
- BOOL bFirstCalled;
+ sal_uInt16 nLastPos;
+ sal_Bool bFirstCalled;
void AppendStyleList(const SvStringsDtor& rLst,
- BOOL bUsed,
- USHORT nSection,
+ sal_Bool bUsed,
+ sal_uInt16 nSection,
char cType);
public:
SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
- SfxStyleFamily eFam, USHORT n=0xFFFF );
+ SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
virtual ~SwStyleSheetIterator();
- 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);
@@ -197,34 +197,34 @@ class SwDocStyleSheetPool : public SfxStyleSheetBasePool
{
rtl::Reference< SwDocStyleSheet > mxStyleSheet;
SwDoc& rDoc;
- BOOL bOrganizer : 1; // TRUE: fuer den Organizer
+ sal_Bool bOrganizer : 1; // sal_True: fuer den Organizer
- virtual SfxStyleSheetBase* Create( const String&, SfxStyleFamily, USHORT nMask);
+ virtual SfxStyleSheetBase* Create( const String&, SfxStyleFamily, sal_uInt16 nMask);
virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& );
using SfxStyleSheetBasePool::Find;
public:
- SwDocStyleSheetPool( SwDoc&, BOOL bOrganizer = FALSE );
+ SwDocStyleSheetPool( SwDoc&, sal_Bool bOrganizer = sal_False );
virtual void Replace( SfxStyleSheetBase& rSource,
SfxStyleSheetBase& rTarget );
- virtual SfxStyleSheetBase& Make(const String&, SfxStyleFamily, USHORT nMask, USHORT nPos = 0xffff);
+ virtual SfxStyleSheetBase& Make(const String&, SfxStyleFamily, sal_uInt16 nMask, sal_uInt16 nPos = 0xffff);
virtual SfxStyleSheetBase* Find( const String&, SfxStyleFamily eFam,
- USHORT n=0xFFFF );
+ sal_uInt16 n=0xFFFF );
- virtual BOOL SetParent( SfxStyleFamily eFam, const String &rStyle,
+ virtual sal_Bool SetParent( SfxStyleFamily eFam, const String &rStyle,
const String &rParent );
virtual void Remove( SfxStyleSheetBase* pStyle);
- void SetOrganizerMode( BOOL bMode ) { bOrganizer = bMode; }
- BOOL IsOrganizerMode() const { return bOrganizer; }
+ void SetOrganizerMode( sal_Bool bMode ) { bOrganizer = bMode; }
+ sal_Bool IsOrganizerMode() const { return bOrganizer; }
virtual SfxStyleSheetIterator* CreateIterator( SfxStyleFamily,
- USHORT nMask );
+ sal_uInt16 nMask );
SwDoc& GetDoc() const { return rDoc; }
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 3607ad0cd970..af61eeec61dd 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -150,15 +150,15 @@ enum SwJumpEditFormat
class SwPageNumberFieldType : public SwFieldType
{
sal_Int16 nNumberingType;
- USHORT nNum, nMax;
- BOOL bVirtuell;
+ sal_uInt16 nNum, nMax;
+ sal_Bool bVirtuell;
public:
SwPageNumberFieldType();
String& Expand( sal_uInt32 nFmt, short nOff, const String&, String& rRet ) const;
- void ChangeExpansion( SwDoc* pDoc, USHORT nNum, USHORT nMax,
- BOOL bVirtPageNum, const sal_Int16* pNumFmt = 0 );
+ void ChangeExpansion( SwDoc* pDoc, sal_uInt16 nNum, sal_uInt16 nMax,
+ sal_Bool bVirtPageNum, const sal_Int16* pNumFmt = 0 );
virtual SwFieldType* Copy() const;
};
@@ -169,11 +169,11 @@ public:
class SW_DLLPUBLIC SwPageNumberField : public SwField
{
String sUserStr;
- USHORT nSubType;
+ sal_uInt16 nSubType;
short nOffset;
public:
- SwPageNumberField(SwPageNumberFieldType*, USHORT nSub = PG_RANDOM,
+ SwPageNumberField(SwPageNumberFieldType*, sal_uInt16 nSub = PG_RANDOM,
sal_uInt32 nFmt = 0, short nOff = 0);
virtual String Expand() const;
@@ -182,10 +182,10 @@ public:
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual USHORT GetSubType() const;
- // virtual void SetSubType(USHORT nSub); // OM: entfernt, da unbenoetigt und gefaehrlich
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_uInt16 GetSubType() const;
+ // virtual void SetSubType(sal_uInt16 nSub); // OM: entfernt, da unbenoetigt und gefaehrlich
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
const String& GetUserString() const { return sUserStr; }
void SetUserString( const String& rS ) { sUserStr = rS; }
@@ -200,7 +200,7 @@ class SwAuthorFieldType : public SwFieldType
public:
SwAuthorFieldType();
- String Expand(ULONG) const;
+ String Expand(sal_uLong) const;
virtual SwFieldType* Copy() const;
};
@@ -221,8 +221,8 @@ public:
inline void SetExpansion(const String& rStr) { aContent = rStr; }
inline const String& GetContent() const { return aContent; }
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -235,7 +235,7 @@ class SwFileNameFieldType : public SwFieldType
public:
SwFileNameFieldType(SwDoc*);
- String Expand(ULONG) const;
+ String Expand(sal_uLong) const;
virtual SwFieldType* Copy() const;
};
@@ -256,8 +256,8 @@ public:
inline void SetExpansion(const String& rStr) { aContent = rStr; }
inline const String& GetContent() const { return aContent; }
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -270,7 +270,7 @@ class SwTemplNameFieldType : public SwFieldType
public:
SwTemplNameFieldType(SwDoc*);
- String Expand(ULONG) const;
+ String Expand(sal_uLong) const;
virtual SwFieldType* Copy() const;
};
@@ -285,8 +285,8 @@ public:
virtual String Expand() const;
virtual SwField* Copy() const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
@@ -301,7 +301,7 @@ class SwDocStatFieldType : public SwFieldType
public:
SwDocStatFieldType(SwDoc*);
- String Expand(USHORT nSubType, sal_uInt32 nFmt) const;
+ String Expand(sal_uInt16 nSubType, sal_uInt32 nFmt) const;
virtual SwFieldType* Copy() const;
inline void SetNumFormat( sal_Int16 eFmt ) { nNumberingType = eFmt; }
@@ -313,21 +313,21 @@ public:
class SW_DLLPUBLIC SwDocStatField : public SwField
{
- USHORT nSubType;
+ sal_uInt16 nSubType;
public:
SwDocStatField( SwDocStatFieldType*,
- USHORT nSubType = 0, sal_uInt32 nFmt = 0);
+ sal_uInt16 nSubType = 0, sal_uInt32 nFmt = 0);
void ChangeExpansion( const SwFrm* pFrm );
virtual String Expand() const;
virtual SwField* Copy() const;
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nSub);
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -336,14 +336,14 @@ public:
class SwHiddenTxtFieldType : public SwFieldType
{
- BOOL bHidden;
+ sal_Bool bHidden;
public:
- SwHiddenTxtFieldType(BOOL bSetHidden = TRUE);
+ SwHiddenTxtFieldType(sal_Bool bSetHidden = sal_True);
virtual SwFieldType* Copy() const;
- void SetHiddenFlag( BOOL bSetHidden = TRUE );
- inline BOOL GetHiddenFlag() const { return bHidden; }
+ void SetHiddenFlag( sal_Bool bSetHidden = sal_True );
+ inline sal_Bool GetHiddenFlag() const { return bHidden; }
};
/*--------------------------------------------------------------------
@@ -352,39 +352,39 @@ public:
class SwHiddenTxtField : public SwField
{
- String aTRUETxt; // Text wenn Bedingung TRUE
+ String aTRUETxt; // Text wenn Bedingung sal_True
String aFALSETxt; // Wenn Bedingung falsch
String aContent; // Ausgewerteter DB-Text
String aCond; // Bedingung
- USHORT nSubType;
+ sal_uInt16 nSubType;
- BOOL bCanToggle : 1; // kann das Feld einzeln getoggelt werden?
- BOOL bIsHidden : 1; // ist es nicht sichtbar?
- BOOL bValid : 1; // DB-Feld evaluiert?
+ sal_Bool bCanToggle : 1; // kann das Feld einzeln getoggelt werden?
+ sal_Bool bIsHidden : 1; // ist es nicht sichtbar?
+ sal_Bool bValid : 1; // DB-Feld evaluiert?
virtual String Expand() const;
virtual SwField* Copy() const;
public:
SwHiddenTxtField( SwHiddenTxtFieldType*,
- BOOL bConditional,
+ sal_Bool bConditional,
const String& rCond,
const String& rTxt,
- BOOL bHidden = FALSE,
- USHORT nSubType = TYP_HIDDENTXTFLD);
+ sal_Bool bHidden = sal_False,
+ sal_uInt16 nSubType = TYP_HIDDENTXTFLD);
SwHiddenTxtField( SwHiddenTxtFieldType*,
const String& rCond,
const String& rTrue,
const String& rFalse,
- USHORT nSubType = TYP_HIDDENTXTFLD);
+ sal_uInt16 nSubType = TYP_HIDDENTXTFLD);
virtual String GetFieldName() const;
void Evaluate(SwDoc*);
- inline void SetValue(BOOL bHidden) { bIsHidden = bHidden; }
+ inline void SetValue(sal_Bool bHidden) { bIsHidden = bHidden; }
String GetColumnName(const String& rName);
String GetDBName(const String& rName, SwDoc *pDoc);
@@ -397,10 +397,10 @@ public:
virtual String GetPar2() const;
- virtual USHORT GetSubType() const;
- // virtual void SetSubType(USHORT nSub); // OM: entfernt, da unbenoetigt und gefaehrlich
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_uInt16 GetSubType() const;
+ // virtual void SetSubType(sal_uInt16 nSub); // OM: entfernt, da unbenoetigt und gefaehrlich
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -422,7 +422,7 @@ public:
class SwHiddenParaField : public SwField
{
String aCond;
- BOOL bIsHidden:1;
+ sal_Bool bIsHidden:1;
public:
// Direkte Eingabe alten Wert loeschen
SwHiddenParaField(SwHiddenParaFieldType*, const String& rCond);
@@ -430,14 +430,14 @@ public:
virtual String Expand() const;
virtual SwField* Copy() const;
- void SetHidden(BOOL bHidden) { bIsHidden = bHidden; }
- BOOL IsHidden() const { return bIsHidden; }
+ void SetHidden(sal_Bool bHidden) { bIsHidden = bHidden; }
+ sal_Bool IsHidden() const { return bIsHidden; }
// Bedingung erfragen/setzen
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -462,7 +462,7 @@ class SW_DLLPUBLIC SwMacroField : public SwField
{
String aMacro;
String aText;
- BOOL bIsScriptURL;
+ sal_Bool bIsScriptURL;
virtual String Expand() const;
virtual SwField* Copy() const;
@@ -486,14 +486,14 @@ public:
// Macrotext
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
static void CreateMacroString( String& rMacro,
const String& rMacroName,
const String& rLibraryName );
- static BOOL isScriptURL( const String& str );
+ static sal_Bool isScriptURL( const String& str );
};
@@ -549,8 +549,8 @@ public:
sal_uInt32 GetNumberOfParagraphs() const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
virtual String GetDescription() const;
};
@@ -563,13 +563,13 @@ class SwDocInfoFieldType : public SwValueFieldType
public:
SwDocInfoFieldType(SwDoc* pDc);
- String Expand(USHORT nSubType, sal_uInt32 nFormat, USHORT nLang, const String& rName) const;
+ String Expand(sal_uInt16 nSubType, sal_uInt32 nFormat, sal_uInt16 nLang, const String& rName) const;
virtual SwFieldType* Copy() const;
};
class SW_DLLPUBLIC SwDocInfoField : public SwValueField
{
- USHORT nSubType;
+ sal_uInt16 nSubType;
String aContent;
String aName;
@@ -577,18 +577,18 @@ class SW_DLLPUBLIC SwDocInfoField : public SwValueField
virtual SwField* Copy() const;
public:
- SwDocInfoField(SwDocInfoFieldType*, USHORT nSub, const String& rName, sal_uInt32 nFmt=0);
- SwDocInfoField(SwDocInfoFieldType*, USHORT nSub, const String& rName, const String& rValue, sal_uInt32 nFmt=0);
+ SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const String& rName, sal_uInt32 nFmt=0);
+ SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const String& rName, const String& rValue, sal_uInt32 nFmt=0);
- virtual void SetSubType(USHORT);
- virtual USHORT GetSubType() const;
- virtual void SetLanguage(USHORT nLng);
+ virtual void SetSubType(sal_uInt16);
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetLanguage(sal_uInt16 nLng);
virtual String GetFieldName() const;
String GetName() const { return aName; }
void SetName( const String& rName ) { aName = rName; }
inline void SetExpansion(const String& rStr) { aContent = rStr; }
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -604,28 +604,28 @@ public:
inline void SetData(const String& rStr) { aData = rStr; }
- String Expand(USHORT nSubType, sal_uInt32 nFormat) const;
+ String Expand(sal_uInt16 nSubType, sal_uInt32 nFormat) const;
virtual SwFieldType* Copy() const;
};
class SwExtUserField : public SwField
{
String aContent;
- USHORT nType;
+ sal_uInt16 nType;
public:
- SwExtUserField(SwExtUserFieldType*, USHORT nSub, sal_uInt32 nFmt=0);
+ SwExtUserField(SwExtUserFieldType*, sal_uInt16 nSub, sal_uInt32 nFmt=0);
virtual String Expand() const;
virtual SwField* Copy() const;
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nSub);
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
inline void SetExpansion(const String& rStr) { aContent = rStr; }
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
@@ -650,11 +650,11 @@ public:
class SwRefPageSetField : public SwField
{
short nOffset;
- BOOL bOn;
+ sal_Bool bOn;
public:
SwRefPageSetField( SwRefPageSetFieldType*, short nOff = 0,
- BOOL bOn = TRUE );
+ sal_Bool bOn = sal_True );
virtual String Expand() const;
virtual SwField* Copy() const;
@@ -662,12 +662,12 @@ public:
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- BOOL IsOn() const { return bOn; }
+ sal_Bool IsOn() const { return bOn; }
short GetOffset() const { return nOffset; }
void SetOffset( short nOff ) { nOffset = nOff; }
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -687,7 +687,7 @@ public:
// ueberlagert, um alle RefPageGet-Felder zu updaten
virtual void Modify( SfxPoolItem *, SfxPoolItem * );
- USHORT MakeSetList( _SetGetExpFlds& rTmpLst );
+ sal_uInt16 MakeSetList( _SetGetExpFlds& rTmpLst );
SwDoc* GetDoc() const { return pDoc; }
};
@@ -708,8 +708,8 @@ public:
void SetText( const String& rTxt ) { sTxt = rTxt; }
void ChangeExpansion( const SwFrm* pFrm, const SwTxtFld* pFld );
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -748,8 +748,8 @@ public:
SwCharFmt* GetCharFmt() const
{ return ((SwJumpEditFieldType*)GetTyp())->GetCharFmt(); }
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -775,11 +775,11 @@ class SwScriptField : public SwField
String sCode; // der Code als Text
// der Code als JavaCode ?
- BOOL bCodeURL; // Code enthaelt URL eines Scripts
+ sal_Bool bCodeURL; // Code enthaelt URL eines Scripts
public:
SwScriptField( SwScriptFieldType*, const String& rType,
- const String& rCode, BOOL bURL=FALSE );
+ const String& rCode, sal_Bool bURL=sal_False );
virtual String GetDescription() const;
@@ -793,10 +793,10 @@ public:
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- BOOL IsCodeURL() const { return bCodeURL; }
- void SetCodeURL( BOOL bURL ) { bCodeURL = bURL; }
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ sal_Bool IsCodeURL() const { return bCodeURL; }
+ void SetCodeURL( sal_Bool bURL ) { bCodeURL = bURL; }
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -831,8 +831,8 @@ public:
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx
index 6b791acf178a..84a1b2c99ba1 100644
--- a/sw/inc/dpage.hxx
+++ b/sw/inc/dpage.hxx
@@ -42,18 +42,18 @@ class SwDPage : public FmFormPage, public SdrObjUserCall
SwDoc& rDoc;
public:
- SwDPage(SwDrawDocument& rNewModel, BOOL bMasterPage=FALSE);
+ SwDPage(SwDrawDocument& rNewModel, sal_Bool bMasterPage=sal_False);
~SwDPage();
// #i3694#
// This GetOffset() method is not needed anymore, it even leads to errors.
// virtual Point GetOffset() const;
- virtual SdrObject* ReplaceObject( SdrObject* pNewObj, ULONG nObjNum );
+ virtual SdrObject* ReplaceObject( SdrObject* pNewObj, sal_uLong nObjNum );
virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV,
const Rectangle *pRect) const;
- BOOL RequestHelp( Window* pWindow, SdrView* pView, const HelpEvent& rEvt );
+ sal_Bool RequestHelp( Window* pWindow, SdrView* pView, const HelpEvent& rEvt );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage();
};
diff --git a/sw/inc/edglbldc.hxx b/sw/inc/edglbldc.hxx
index dd3187614ec4..23e63a8483d8 100644
--- a/sw/inc/edglbldc.hxx
+++ b/sw/inc/edglbldc.hxx
@@ -42,14 +42,14 @@ enum GlobalDocContentType {
class SwGlblDocContent
{
GlobalDocContentType eType;
- ULONG nDocPos;
+ sal_uLong nDocPos;
union {
const SwTOXBase* pTOX;
const SwSection* pSect;
} PTR;
public:
- SwGlblDocContent( ULONG nPos );
+ SwGlblDocContent( sal_uLong nPos );
SwGlblDocContent( const SwTOXBaseSection* pTOX );
SwGlblDocContent( const SwSection* pSect );
@@ -59,7 +59,7 @@ public:
{ return GLBLDOC_SECTION == eType ? PTR.pSect : 0; }
const SwTOXBase* GetTOX() const
{ return GLBLDOC_TOXBASE == eType ? PTR.pTOX : 0; }
- ULONG GetDocPos() const { return nDocPos; }
+ sal_uLong GetDocPos() const { return nDocPos; }
// fuers Sortieren
inline int operator==( const SwGlblDocContent& rCmp ) const
diff --git a/sw/inc/edimp.hxx b/sw/inc/edimp.hxx
index 60d6fbe99419..16a2a3ecb2f5 100644
--- a/sw/inc/edimp.hxx
+++ b/sw/inc/edimp.hxx
@@ -52,15 +52,15 @@ class SwNodeIndex;
struct SwPamRange
{
- ULONG nStart, nEnd;
+ sal_uLong nStart, nEnd;
SwPamRange() : nStart( 0 ), nEnd( 0 ) {}
- SwPamRange( ULONG nS, ULONG nE ) : nStart( nS ), nEnd( nE ) {}
+ SwPamRange( sal_uLong nS, sal_uLong nE ) : nStart( nS ), nEnd( nE ) {}
- BOOL operator==( const SwPamRange& rRg )
- { return nStart == rRg.nStart ? TRUE : FALSE; }
- BOOL operator<( const SwPamRange& rRg )
- { return nStart < rRg.nStart ? TRUE : FALSE; }
+ sal_Bool operator==( const SwPamRange& rRg )
+ { return nStart == rRg.nStart ? sal_True : sal_False; }
+ sal_Bool operator<( const SwPamRange& rRg )
+ { return nStart < rRg.nStart ? sal_True : sal_False; }
};
SV_DECL_VARARR_SORT( _SwPamRanges, SwPamRange, 0, 1 )
@@ -71,11 +71,11 @@ public:
SwPamRanges( const SwPaM& rRing );
void Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 );
- SwPaM& SetPam( USHORT nArrPos, SwPaM& rPam );
+ SwPaM& SetPam( sal_uInt16 nArrPos, SwPaM& rPam );
- USHORT Count() const
+ sal_uInt16 Count() const
{ return _SwPamRanges::Count(); }
- SwPamRange operator[]( USHORT nPos ) const
+ SwPamRange operator[]( sal_uInt16 nPos ) const
{ return _SwPamRanges::operator[](nPos); }
};
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 85201ff9b5b9..4b979416cc31 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -147,7 +147,7 @@ SV_DECL_PTRARR_DEL( SwGetINetAttrs, SwGetINetAttr*, 0, 5 )
#define CNT_TXT 0x0001
#define CNT_GRF 0x0002
#define CNT_OLE 0x0010
-/* Teste einen USHORT auf eine bestimmte Inhaltsform */
+/* Teste einen sal_uInt16 auf eine bestimmte Inhaltsform */
#define CNT_HasTxt(USH) ((USH)&CNT_TXT)
#define CNT_HasGrf(USH) ((USH)&CNT_GRF)
#define CNT_HasOLE(USH) ((USH)&CNT_OLE)
@@ -171,7 +171,7 @@ class SW_DLLPUBLIC SwEditShell: public SwCrsrShell
*/
SW_DLLPRIVATE SwGrfNode *_GetGrfNode() const ;
- SW_DLLPRIVATE void DeleteSel( SwPaM& rPam, BOOL* pUndo = 0 );
+ SW_DLLPRIVATE void DeleteSel( SwPaM& rPam, sal_Bool* pUndo = 0 );
SW_DLLPRIVATE void _SetSectionAttr( SwSectionFmt& rSectFmt, const SfxItemSet& rSet );
@@ -180,7 +180,7 @@ class SW_DLLPUBLIC SwEditShell: public SwCrsrShell
public:
// Editieren (immer auf allen selektierten Bereichen)
- void Insert( sal_Unicode, BOOL bOnlyCurrCrsr = FALSE );
+ void Insert( sal_Unicode, sal_Bool bOnlyCurrCrsr = sal_False );
void Insert2( const String &, const bool bForceExpandHints = false );
void Overwrite( const String & );
@@ -190,14 +190,14 @@ public:
// ein ( nicht \& )
// z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
// --> "xx\t<Tab>..zzz..&"
- BOOL Replace( const String& rNewStr, BOOL bRegExpRplc = FALSE );
+ sal_Bool Replace( const String& rNewStr, sal_Bool bRegExpRplc = sal_False );
// loescht den Inhalt aller Bereiche;
// werden ganze Nodes selektiert, werden die Nodes geloescht
long Delete();
// remove a complete paragraph
- BOOL DelFullPara();
+ sal_Bool DelFullPara();
// change text to Upper/Lower/Hiragana/Katagana/...
void TransliterateText( sal_uInt32 nType );
@@ -207,16 +207,16 @@ public:
// loesche den nicht sichtbaren Content aus dem Document, wie z.B.:
// versteckte Bereiche, versteckte Absaetze
- BOOL RemoveInvisibleContent();
+ sal_Bool RemoveInvisibleContent();
// replace fields by text - mailmerge support
- BOOL ConvertFieldsToText();
+ sal_Bool ConvertFieldsToText();
// set all numbering start points to a fixed value - mailmerge support
void SetNumberingRestart();
// embedded alle lokalen Links (Bereiche/Grafiken)
- USHORT GetLinkUpdMode(BOOL bDocSettings = FALSE) const;
- void SetLinkUpdMode( USHORT nMode );
+ sal_uInt16 GetLinkUpdMode(sal_Bool bDocSettings = sal_False) const;
+ void SetLinkUpdMode( sal_uInt16 nMode );
// kopiere den Inhalt aller Bereiche an die akt. Cursor-Position
// in die angegebene Shell
@@ -228,19 +228,19 @@ public:
// der FEShell stehen!
// kopiere alle Selectionen und das Doc
//JP 21.10.96: und fuer die SVX-Autokorrektur
- BOOL _CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pNdInsPos = 0 );
+ sal_Bool _CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pNdInsPos = 0 );
- long SplitNode( BOOL bAutoFormat = FALSE, BOOL bCheckTableStart = TRUE );
+ long SplitNode( sal_Bool bAutoFormat = sal_False, sal_Bool bCheckTableStart = sal_True );
sal_Bool AppendTxtNode();
void AutoFmtBySplitNode();
// ist der Cursor in einem INetAttribut, dann wird das komplett
// geloescht; inclusive des Hinweistextes (wird beim Drag&Drop gebraucht)
- BOOL DelINetAttrWithText();
+ sal_Bool DelINetAttrWithText();
// ist der Cursor am Ende einer Zeichenvorlage, an der das DontExpand-Flag
- // noch nicht gesetzt ist, wird dies gesetzt ( => return TRUE; )
- BOOL DontExpandFmt();
+ // noch nicht gesetzt ist, wird dies gesetzt ( => return sal_True; )
+ sal_Bool DontExpandFmt();
// Anwenden / Entfernen von Attributen
// liefert Attribute im angeforderten AttributSet. Wenn nicht eindeutig
@@ -249,42 +249,42 @@ public:
// Renaming method to <GetCurAttr(..)> indicating that the attributes at
// the current cursors are retrieved.
// Introduce 2nd optional parameter <bMergeIndentValuesOfNumRule>.
- // If <bMergeIndentValuesOfNumRule> == TRUE, the indent attributes of
+ // If <bMergeIndentValuesOfNumRule> == sal_True, the indent attributes of
// the corresponding list level of an applied list style is merged into
// the requested item set as a LR-SPACE item, if corresponding node has not
// its own indent attributes and the position-and-space mode of the list
// level is SvxNumberFormat::LABEL_ALIGNMENT.
- BOOL GetCurAttr( SfxItemSet& ,
+ sal_Bool GetCurAttr( SfxItemSet& ,
const bool bMergeIndentValuesOfNumRule = false ) const;
// <--
- void SetAttr( const SfxPoolItem&, USHORT nFlags = 0 );
- void SetAttr( const SfxItemSet&, USHORT nFlags = 0 );
+ void SetAttr( const SfxPoolItem&, sal_uInt16 nFlags = 0 );
+ void SetAttr( const SfxItemSet&, sal_uInt16 nFlags = 0 );
// Setze das Attribut als neues default Attribut im Dokument.
void SetDefault( const SfxPoolItem& );
// Erfrage das Default Attribut vom Dokument.
- const SfxPoolItem& GetDefault( USHORT nFmtHint ) const;
+ const SfxPoolItem& GetDefault( sal_uInt16 nFmtHint ) const;
void ResetAttr( const SvUShortsSort* pAttrs = 0 );
void GCAttr();
// returns the scripttpye of the selection
- USHORT GetScriptType() const;
+ sal_uInt16 GetScriptType() const;
// returns the language at current cursor position
- USHORT GetCurLang() const;
+ sal_uInt16 GetCurLang() const;
// TABLE
- USHORT GetTblFrmFmtCount( BOOL bUsed = FALSE ) const;
- SwFrmFmt& GetTblFrmFmt(USHORT nFmt, BOOL bUsed = FALSE ) const;
+ sal_uInt16 GetTblFrmFmtCount( sal_Bool bUsed = sal_False ) const;
+ SwFrmFmt& GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed = sal_False ) const;
String GetUniqueTblName() const;
// CHAR
- USHORT GetCharFmtCount() const;
- SwCharFmt& GetCharFmt(USHORT nFmt) const;
+ sal_uInt16 GetCharFmtCount() const;
+ SwCharFmt& GetCharFmt(sal_uInt16 nFmt) const;
SwCharFmt* GetCurCharFmt() const;
- void FillByEx(SwCharFmt*, BOOL bReset = FALSE);
+ void FillByEx(SwCharFmt*, sal_Bool bReset = sal_False);
SwCharFmt* MakeCharFmt( const String& rName, SwCharFmt* pDerivedFrom = 0 );
SwCharFmt* FindCharFmtByName( const String& rName ) const;
@@ -301,8 +301,8 @@ public:
// TXT
SwTxtFmtColl& GetDfltTxtFmtColl() const;
- USHORT GetTxtFmtCollCount() const;
- SwTxtFmtColl& GetTxtFmtColl( USHORT nTxtFmtColl) const;
+ sal_uInt16 GetTxtFmtCollCount() const;
+ SwTxtFmtColl& GetTxtFmtColl( sal_uInt16 nTxtFmtColl) const;
SwTxtFmtColl* GetCurTxtFmtColl() const;
// --> OD 2007-11-06 #i62675#
// Add 2nd optional parameter <bResetListAttrs> - see also <SwDoc::SetTxtFmtColl(..)>
@@ -311,24 +311,24 @@ public:
// <--
SwTxtFmtColl *MakeTxtFmtColl(const String &rFmtCollName,
SwTxtFmtColl *pDerivedFrom = 0);
- void FillByEx(SwTxtFmtColl*, BOOL bReset = FALSE);
+ void FillByEx(SwTxtFmtColl*, sal_Bool bReset = sal_False);
SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const;
// Gebe die "Auto-Collection" mit der Id zurueck. Existiert
// sie noch nicht, dann erzuege sie
- SwTxtFmtColl* GetTxtCollFromPool( USHORT nId );
+ SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId );
// return das geforderte automatische Format - Basis-Klasse !
- SwFmt* GetFmtFromPool( USHORT nId );
+ SwFmt* GetFmtFromPool( sal_uInt16 nId );
// returne die geforderte automatische Seiten-Vorlage
- SwPageDesc* GetPageDescFromPool( USHORT nId );
+ SwPageDesc* GetPageDescFromPool( sal_uInt16 nId );
// erfrage ob die Absatz-/Zeichen-/Rahmen-/Seiten - Vorlage benutzt wird
- BOOL IsUsed( const SwModify& ) const;
+ sal_Bool IsUsed( const SwModify& ) const;
// returne das geforderte automatische Format
- SwFrmFmt* GetFrmFmtFromPool( USHORT nId )
+ SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId )
{ return (SwFrmFmt*)SwEditShell::GetFmtFromPool( nId ); }
- SwCharFmt* GetCharFmtFromPool( USHORT nId )
+ SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId )
{ return (SwCharFmt*)SwEditShell::GetFmtFromPool( nId ); }
// Felder
@@ -337,12 +337,12 @@ public:
void UpdateFlds( SwField & ); // ein einzelnes Feld
- USHORT GetFldTypeCount(USHORT nResId = USHRT_MAX, BOOL bUsed = FALSE) const;
- SwFieldType* GetFldType(USHORT nId, USHORT nResId = USHRT_MAX, BOOL bUsed = FALSE) const;
- SwFieldType* GetFldType(USHORT nResId, const String& rName) const;
+ sal_uInt16 GetFldTypeCount(sal_uInt16 nResId = USHRT_MAX, sal_Bool bUsed = sal_False) const;
+ SwFieldType* GetFldType(sal_uInt16 nId, sal_uInt16 nResId = USHRT_MAX, sal_Bool bUsed = sal_False) const;
+ SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName) const;
- void RemoveFldType(USHORT nId, USHORT nResId = USHRT_MAX);
- void RemoveFldType(USHORT nResId, const String& rName);
+ void RemoveFldType(sal_uInt16 nId, sal_uInt16 nResId = USHRT_MAX);
+ void RemoveFldType(sal_uInt16 nResId, const String& rName);
void FieldToText( SwFieldType* pType );
@@ -357,16 +357,16 @@ public:
void GetAllUsedDB( SvStringsDtor& rDBNameList,
SvStringsDtor* pAllDBNames = 0 );
- BOOL IsAnyDatabaseFieldInDoc()const;
+ sal_Bool IsAnyDatabaseFieldInDoc()const;
//check whether DB fields point to an available data source and returns it
- BOOL IsFieldDataSourceAvailable(String& rUsedDataSource) const;
- void UpdateExpFlds(BOOL bCloseDB = FALSE);// nur alle ExpressionFelder updaten
- void SetFixFields( BOOL bOnlyTimeDate = FALSE,
+ sal_Bool IsFieldDataSourceAvailable(String& rUsedDataSource) const;
+ void UpdateExpFlds(sal_Bool bCloseDB = sal_False);// nur alle ExpressionFelder updaten
+ void SetFixFields( sal_Bool bOnlyTimeDate = sal_False,
const DateTime* pNewDateTime = 0 );
void LockExpFlds();
void UnlockExpFlds();
- SwFldUpdateFlags GetFldUpdateFlags(BOOL bDocSettings = FALSE) const;
+ SwFldUpdateFlags GetFldUpdateFlags(sal_Bool bDocSettings = sal_False) const;
void SetFldUpdateFlags( SwFldUpdateFlags eFlags );
// fuer die Evaluierung der DBFelder (neuer DB-Manager)
@@ -375,7 +375,7 @@ public:
SwFieldType* InsertFldType(const SwFieldType &);
// Aenderungen am Dokument?
- BOOL IsModified() const;
+ sal_Bool IsModified() const;
void SetModified();
void ResetModified();
void SetUndoNoResetModified();
@@ -388,31 +388,31 @@ public:
void DeleteTOXMark(SwTOXMark* pMark);
// Alle Markierungen am aktuellen SPoint ermitteln
- USHORT GetCurTOXMarks(SwTOXMarks& rMarks) const ;
+ sal_uInt16 GetCurTOXMarks(SwTOXMarks& rMarks) const ;
// Verzeichnis einfuegen, und bei Bedarf erneuern
void InsertTableOf(const SwTOXBase& rTOX,
const SfxItemSet* pSet = 0);
- BOOL UpdateTableOf(const SwTOXBase& rTOX,
+ sal_Bool UpdateTableOf(const SwTOXBase& rTOX,
const SfxItemSet* pSet = 0);
const SwTOXBase* GetCurTOX() const;
- const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, BOOL bCreate = FALSE );
+ const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate = sal_False );
void SetDefaultTOXBase(const SwTOXBase& rBase);
- BOOL IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const;
- void SetTOXBaseReadonly(const SwTOXBase& rTOXBase, BOOL bReadonly);
+ sal_Bool IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const;
+ void SetTOXBaseReadonly(const SwTOXBase& rTOXBase, sal_Bool bReadonly);
- USHORT GetTOXCount() const;
- const SwTOXBase* GetTOX( USHORT nPos ) const;
- BOOL DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes = FALSE );
+ sal_uInt16 GetTOXCount() const;
+ const SwTOXBase* GetTOX( sal_uInt16 nPos ) const;
+ sal_Bool DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes = sal_False );
// nach einlesen einer Datei alle Verzeichnisse updaten
- void SetUpdateTOX( BOOL bFlag = TRUE );
- BOOL IsUpdateTOX() const;
+ void SetUpdateTOX( sal_Bool bFlag = sal_True );
+ sal_Bool IsUpdateTOX() const;
// Verzeichnis-Typen verwalten
- USHORT GetTOXTypeCount(TOXTypes eTyp) const;
- const SwTOXType* GetTOXType(TOXTypes eTyp, USHORT nId) const;
+ sal_uInt16 GetTOXTypeCount(TOXTypes eTyp) const;
+ const SwTOXType* GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const;
void InsertTOXType(const SwTOXType& rTyp);
//AutoMark file
@@ -421,25 +421,25 @@ public:
void ApplyAutoMark();
// Schluessel fuer die Indexverwaltung
- USHORT GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const;
+ sal_uInt16 GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const;
void SetOutlineNumRule(const SwNumRule&);
const SwNumRule* GetOutlineNumRule() const;
// Gliederung - hoch-/runterstufen
- BOOL OutlineUpDown( short nOffset = 1 );
+ sal_Bool OutlineUpDown( short nOffset = 1 );
// Gliederung - hoch-/runtermoven
- BOOL MoveOutlinePara( short nOffset = 1);
+ sal_Bool MoveOutlinePara( short nOffset = 1);
// Outlines and SubOutline are protected ?
- BOOL IsProtectedOutlinePara() const;
+ sal_Bool IsProtectedOutlinePara() const;
// Numerierung Aufzaehlunglisten
- // liefert Regelwerk der aktuellen Aufzaehlung (FALSE sonst)
+ // liefert Regelwerk der aktuellen Aufzaehlung (sal_False sonst)
const SwNumRule* GetCurNumRule() const;
// setzt, wenn noch keine Numerierung, sonst wird geaendert
// arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren
// --> OD 2008-02-08 #newlistlevelattrs#
- // Add optional parameter <bResetIndentAttrs> (default value FALSE).
+ // Add optional parameter <bResetIndentAttrs> (default value sal_False).
// If <bResetIndentAttrs> equals true, the indent attributes "before text"
// and "first line indent" are additionally reset at the current selection,
// if the list style makes use of the new list level attributes.
@@ -447,7 +447,7 @@ public:
// introduce parameters <bCreateNewList> and <sContinuedListId>
// <bCreateNewList> indicates, if a new list is created by applying the
// given list style.
- // If <bCreateNewList> equals FALSE, <sContinuedListId> may contain the
+ // If <bCreateNewList> equals sal_False, <sContinuedListId> may contain the
// list Id of a list, which has to be continued by applying the given list style
void SetCurNumRule( const SwNumRule&,
const bool bCreateNewList /*= false*/,
@@ -455,16 +455,16 @@ public:
const bool bResetIndentAttrs = false );
// <--
// Absaetze ohne Numerierung, aber mit Einzuegen
- BOOL NoNum();
+ sal_Bool NoNum();
// Loeschen, Splitten der Aufzaehlungsliste
void DelNumRules();
// Hoch-/Runterstufen
- BOOL NumUpDown( BOOL bDown = TRUE );
+ sal_Bool NumUpDown( sal_Bool bDown = sal_True );
// Hoch-/Runtermoven sowohl innerhalb als auch ausserhalb von Numerierungen
- BOOL MoveParagraph( long nOffset = 1);
- BOOL MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft );
+ sal_Bool MoveParagraph( long nOffset = 1);
+ sal_Bool MoveNumParas( sal_Bool bUpperLower, sal_Bool bUpperLeft );
// No-/Numerierung ueber Delete/Backspace ein/abschalten #115901#
- BOOL NumOrNoNum( BOOL bDelete = FALSE, BOOL bChkStart = TRUE);
+ sal_Bool NumOrNoNum( sal_Bool bDelete = sal_False, sal_Bool bChkStart = sal_True);
// -> #i23726#
// --> OD 2008-06-09 #i90078#
// Remove unused default parameter <nLevel> and <bRelative>.
@@ -473,17 +473,17 @@ public:
// Adjust method name
void SetIndent(short nIndent, const SwPosition & rPos);
// <--
- BOOL IsFirstOfNumRule() const;
- BOOL IsFirstOfNumRule(const SwPaM & rPaM) const;
+ sal_Bool IsFirstOfNumRule() const;
+ sal_Bool IsFirstOfNumRule(const SwPaM & rPaM) const;
// <- #i23726#
- BOOL IsNoNum( BOOL bChkStart = TRUE ) const;
+ sal_Bool IsNoNum( sal_Bool bChkStart = sal_True ) const;
// returne den Num-Level des Nodes, in dem sich der Point vom
// Cursor befindet. Return kann sein :
// - NO_NUMBERING, 0..MAXLEVEL-1, NO_NUMLEVEL .. NO_NUMLEVEL|MAXLEVEL-1
// --> OD 2008-02-29 #refactorlists# - removed <pHasChilds>
-// BYTE GetNumLevel( BOOL* pHasChilds = 0 ) const;
- BYTE GetNumLevel() const;
+// sal_uInt8 GetNumLevel( sal_Bool* pHasChilds = 0 ) const;
+ sal_uInt8 GetNumLevel() const;
// <--
// detect highest and lowest level to check moving of outline levels
void GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower );
@@ -493,21 +493,21 @@ public:
int GetCurrentParaOutlineLevel( ) const;// #outlinelevel add by zhaojianwei
// -> i29560
- BOOL HasNumber() const;
- BOOL HasBullet() const;
+ sal_Bool HasNumber() const;
+ sal_Bool HasBullet() const;
// <- i29560
- String GetUniqueNumRuleName( const String* pChkStr = 0, BOOL bAutoNum = TRUE ) const;
+ String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const;
void ChgNumRuleFmts( const SwNumRule& rRule );
// setze und erfrage, ob an aktueller PointPos eine Numerierung mit
// dem StartFlag startet
- void SetNumRuleStart( BOOL bFlag = TRUE );
- BOOL IsNumRuleStart() const;
- void SetNodeNumStart( USHORT nStt );
+ void SetNumRuleStart( sal_Bool bFlag = sal_True );
+ sal_Bool IsNumRuleStart() const;
+ void SetNodeNumStart( sal_uInt16 nStt );
// --> OD 2008-02-29 #refactorlists#
- USHORT GetNodeNumStart() const;
+ sal_uInt16 GetNodeNumStart() const;
// <--
- BOOL ReplaceNumRule( const String& rOldRule, const String& rNewRule );
+ sal_Bool ReplaceNumRule( const String& rOldRule, const String& rNewRule );
// Searches for a text node with a numbering rule.
// --> OD 2008-03-18 #refactorlists# - add output parameter <sListId>
// in case a list style is found, <sListId> holds the list id, to which the
@@ -522,10 +522,10 @@ public:
// Undo
// UndoHistory am Dokument pflegen
// bei Save, SaveAs, Create wird UndoHistory zurueckgesetzt ???
- void DoUndo( BOOL bOn = TRUE );
- BOOL DoesUndo() const;
- void DoGroupUndo( BOOL bUn = TRUE );
- BOOL DoesGroupUndo() const;
+ void DoUndo( sal_Bool bOn = sal_True );
+ sal_Bool DoesUndo() const;
+ void DoGroupUndo( sal_Bool bUn = sal_True );
+ sal_Bool DoesGroupUndo() const;
void DelAllUndoObj();
// macht rueckgaengig:
@@ -539,8 +539,8 @@ public:
String GetUndoIdsStr( String* pUndoStr = 0, SwUndoIds *pUndoIds = 0) const;
// abfragen/setzen der Anzahl von wiederherstellbaren Undo-Actions
- static USHORT GetUndoActionCount();
- static void SetUndoActionCount( USHORT nNew );
+ static sal_uInt16 GetUndoActionCount();
+ static void SetUndoActionCount( sal_uInt16 nNew );
// Redo
// liefert die Id der letzten Redofaehigen Aktion zurueck
@@ -557,11 +557,11 @@ public:
// 0 letzte Aktion, sonst Aktionen bis zum Start der Klammerung nUndoId
// mit KillPaMs, ClearMark
- BOOL Undo(SwUndoId nUndoId = UNDO_EMPTY, USHORT nCnt = 1 );
+ sal_Bool Undo(SwUndoId nUndoId = UNDO_EMPTY, sal_uInt16 nCnt = 1 );
// wiederholt
- USHORT Repeat( USHORT nCount );
+ sal_uInt16 Repeat( sal_uInt16 nCount );
// wiederholt
- USHORT Redo( USHORT nCnt = 1 );
+ sal_uInt16 Redo( sal_uInt16 nCnt = 1 );
// fuer alle Sichten auf dieses Dokument
void StartAllAction();
void EndAllAction();
@@ -570,17 +570,17 @@ public:
void CalcLayout();
// Inhaltsform bestimmen, holen, liefert Type am CurCrsr->SPoint
- USHORT GetCntType() const;
- BOOL HasOtherCnt() const; // gibt es Rahmen, Fussnoten, ...
+ sal_uInt16 GetCntType() const;
+ sal_Bool HasOtherCnt() const; // gibt es Rahmen, Fussnoten, ...
/* Anwenden der ViewOptions mit Start-/EndAction */
inline void ApplyViewOptions( const SwViewOption &rOpt );
// Text innerhalb der Selektion erfragen
- // Returnwert liefert FALSE, wenn der selektierte Bereich
+ // Returnwert liefert sal_False, wenn der selektierte Bereich
// zu gross ist, um in den Stringpuffer kopiert zu werden
// oder andere Fehler auftreten
- BOOL GetSelectedText( String &rBuf,
+ sal_Bool GetSelectedText( String &rBuf,
int nHndlParaBreak = GETSELTXT_PARABRK_TO_BLANK );
/*
@@ -589,11 +589,11 @@ public:
* gleiche Graphic zeigt), sonst gibt's was auf die Finger
*/
// --> OD 2005-02-09 #119353# - robust
- const Graphic* GetGraphic( BOOL bWait = TRUE ) const;
+ const Graphic* GetGraphic( sal_Bool bWait = sal_True ) const;
const GraphicObject* GetGraphicObj() const;
// <--
- BOOL IsGrfSwapOut( BOOL bOnlyLinked = FALSE ) const;
- USHORT GetGraphicType() const;
+ sal_Bool IsGrfSwapOut( sal_Bool bOnlyLinked = sal_False ) const;
+ sal_uInt16 GetGraphicType() const;
const PolyPolygon *GetGraphicPolygon() const;
void SetGraphicPolygon( const PolyPolygon *pPoly );
@@ -604,9 +604,9 @@ public:
/*
* liefert die Groesse einer Graphic in Twips, wenn der Cursor
- * auf einer Graphic steht; BOOL liefert FALSE, wenn s.o.
+ * auf einer Graphic steht; sal_Bool liefert sal_False, wenn s.o.
*/
- BOOL GetGrfSize(Size&) const;
+ sal_Bool GetGrfSize(Size&) const;
/*
* liefert den Namen und den Filter einer Graphic, wenn der Cursor
* auf einer Graphic steht, sonst gibt's was auf die Finger!
@@ -632,7 +632,7 @@ public:
// remove default parameter, because method always called this default value
Graphic GetIMapGraphic() const; //liefert eine Graphic fuer alle Flys!
// <--
- const SwFlyFrmFmt* FindFlyByName( const String& rName, BYTE nNdTyp = 0 ) const;
+ const SwFlyFrmFmt* FindFlyByName( const String& rName, sal_uInt8 nNdTyp = 0 ) const;
//liefert ein ClientObject, wenn CurCrsr->Point() auf einen
//SwOLENode zeigt (und Mark nicht gesetzt ist oder auf das
@@ -640,7 +640,7 @@ public:
//Finger.
svt::EmbeddedObjectRef& GetOLEObject() const;
//Gibt es ein OleObject mit diesem Namen (SwFmt)?
- BOOL HasOLEObj( const String &rName ) const;
+ sal_Bool HasOLEObj( const String &rName ) const;
//Liefert den Pointer auf die Daten des Chart, indem sich der Crsr
//befindet.
@@ -657,14 +657,14 @@ public:
void InsertGlossary( SwTextBlocks& rGlossary, const String& );
// aktuelle Selektion zum Textbaustein machen und ins
// Textbausteindokument einfuegen, einschliesslich Vorlagen
- USHORT MakeGlossary( SwTextBlocks& rToFill, const String& rName,
- const String& rShortName, BOOL bSaveRelFile = FALSE,
+ sal_uInt16 MakeGlossary( SwTextBlocks& rToFill, const String& rName,
+ const String& rShortName, sal_Bool bSaveRelFile = sal_False,
const String* pOnlyTxt=0 );
// speicher den gesamten Inhalt des Docs als Textbaustein
- USHORT SaveGlossaryDoc( SwTextBlocks& rGlossary, const String& rName,
+ sal_uInt16 SaveGlossaryDoc( SwTextBlocks& rGlossary, const String& rName,
const String& rShortName,
- BOOL bSaveRelFile = FALSE,
- BOOL bOnlyTxt = FALSE );
+ sal_Bool bSaveRelFile = sal_False,
+ sal_Bool bOnlyTxt = sal_False );
// Linguistik
// Selektionen sichern
@@ -672,7 +672,7 @@ public:
// Selektionen wiederherstellen
void HyphEnd();
com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
- HyphContinue( USHORT* pPageCnt, USHORT* pPageSt );
+ HyphContinue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt );
// zu trennendes Wort ignorieren
void HyphIgnore();
@@ -682,30 +682,30 @@ public:
//Tabelle
const SwTable& InsertTable( const SwInsertTableOptions& rInsTblOpts, // ALL_TBL_INS_ATTR
- USHORT nRows, USHORT nCols,
+ sal_uInt16 nRows, sal_uInt16 nCols,
sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL,
const SwTableAutoFmt* pTAFmt = 0 );
void InsertDDETable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER
SwDDEFieldType* pDDEType,
- USHORT nRows, USHORT nCols,
+ sal_uInt16 nRows, sal_uInt16 nCols,
sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL );
void UpdateTable();
void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName );
SwFrmFmt *GetTableFmt();
- BOOL TextToTable( const SwInsertTableOptions& rInsTblOpts, //ALL_TBL_INS_ATTR
+ sal_Bool TextToTable( const SwInsertTableOptions& rInsTblOpts, //ALL_TBL_INS_ATTR
sal_Unicode cCh,
sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL,
const SwTableAutoFmt* pTAFmt = 0 );
- BOOL TableToText( sal_Unicode cCh );
- BOOL IsTextToTableAvailable() const;
+ sal_Bool TableToText( sal_Unicode cCh );
+ sal_Bool IsTextToTableAvailable() const;
- BOOL GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const;
+ sal_Bool GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const;
void SetTblBoxFormulaAttrs( const SfxItemSet& rSet );
- BOOL IsTableBoxTextFormat() const;
+ sal_Bool IsTableBoxTextFormat() const;
String GetTableBoxText() const;
// Change Modus erfragen/setzen
@@ -713,15 +713,15 @@ public:
void SetTblChgMode( TblChgMode eMode );
// Tabelle an der Cursor Position aufsplitten
- BOOL SplitTable( USHORT eMode );
+ sal_Bool SplitTable( sal_uInt16 eMode );
// Tabellen verbinden
// CanMerge kann feststellen, ob Prev oder Next moeglich ist. Wird
// der Pointer pChkNxtPrv uebergeben, wird festgestellt in welche
// Richtung es moeglich ist.
- BOOL CanMergeTable( BOOL bWithPrev = TRUE, BOOL* pChkNxtPrv = 0 ) const;
- BOOL MergeTable( BOOL bWithPrev = TRUE, USHORT nMode = 0 );
+ sal_Bool CanMergeTable( sal_Bool bWithPrev = sal_True, sal_Bool* pChkNxtPrv = 0 ) const;
+ sal_Bool MergeTable( sal_Bool bWithPrev = sal_True, sal_uInt16 nMode = 0 );
// setze das InsertDB als Tabelle Undo auf:
- void AppendUndoForInsertFromDB( BOOL bIsTable );
+ void AppendUndoForInsertFromDB( sal_Bool bIsTable );
/*
functions used for spell checking and text conversion
@@ -733,7 +733,7 @@ public:
// Selektionen wiederherstellen
void SpellEnd( SwConversionArgs *pConvArgs = 0, bool bRestoreSelection = true );
::com::sun::star::uno::Any SpellContinue(
- USHORT* pPageCnt, USHORT* pPageSt,
+ sal_uInt16* pPageCnt, sal_uInt16* pPageSt,
SwConversionArgs *pConvArgs = 0 );
// spells on a sentence basis - the SpellPortions are needed
@@ -750,9 +750,9 @@ public:
// check SwSpellIter data to see if the last sentence got grammar checked
bool HasLastSentenceGotGrammarChecked() const;
// Is text conversion active somewhere else?
- BOOL HasConvIter() const;
+ sal_Bool HasConvIter() const;
// Is hyphenation active somewhere else?
- BOOL HasHyphIter() const;
+ sal_Bool HasHyphIter() const;
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSpellAlternatives >
@@ -773,12 +773,12 @@ public:
// returne die Namen aller im Doc gesetzten Referenzen
// Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine RefMark
// gesetzt ist
- USHORT GetRefMarks( SvStringsDtor* = 0 ) const;
+ sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const;
// rufe die Autokorrektur auf
- void AutoCorrect( SvxAutoCorrect& rACorr, BOOL bInsertMode = TRUE,
+ void AutoCorrect( SvxAutoCorrect& rACorr, sal_Bool bInsertMode = sal_True,
sal_Unicode cChar = ' ' );
- BOOL GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, String& rWord );
+ sal_Bool GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, String& rWord );
// dann setze nach entsprechenden Regeln unsere Vorlagen
void AutoFormat( const SvxSwAutoFmtFlags* pAFlags = 0 );
@@ -789,49 +789,49 @@ public:
// errechnet die Selektion
String Calculate();
- BOOL InsertURL( const SwFmtINetFmt& rFmt, const String& rStr,
- BOOL bKeepSelection = FALSE );
- USHORT GetINetAttrs( SwGetINetAttrs& rArr );
+ sal_Bool InsertURL( const SwFmtINetFmt& rFmt, const String& rStr,
+ sal_Bool bKeepSelection = sal_False );
+ sal_uInt16 GetINetAttrs( SwGetINetAttrs& rArr );
//SS Fuer holen/ersetzen DropCap-Inhalt
- String GetDropTxt( const USHORT nChars ) const;
+ String GetDropTxt( const sal_uInt16 nChars ) const;
void ReplaceDropTxt( const String &rStr );
// may an outline be moved or copied?
// Check whether it's in text body, not in table, and not read-only (move)
- BOOL IsOutlineMovable( USHORT nIdx ) const;
- BOOL IsOutlineCopyable( USHORT nIdx ) const;
+ sal_Bool IsOutlineMovable( sal_uInt16 nIdx ) const;
+ sal_Bool IsOutlineCopyable( sal_uInt16 nIdx ) const;
- USHORT GetLineCount( BOOL bActPos = TRUE );
+ sal_uInt16 GetLineCount( sal_Bool bActPos = sal_True );
// erfrage und setze den Fussnoten-Text/Nummer. Set.. auf akt. SSelection!
- BOOL GetCurFtn( SwFmtFtn* pToFillFtn = 0 );
+ sal_Bool GetCurFtn( SwFmtFtn* pToFillFtn = 0 );
bool SetCurFtn( const SwFmtFtn& rFillFtn );
bool HasFtns( bool bEndNotes = false ) const;
-//z.Zt nicht benoetigt USHORT GetFtnCnt( BOOL bEndNotes = FALSE ) const;
+//z.Zt nicht benoetigt sal_uInt16 GetFtnCnt( sal_Bool bEndNotes = sal_False ) const;
// gebe Liste aller Fussnoten und deren Anfangstexte
- USHORT GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes = false );
+ sal_uInt16 GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes = false );
SwSection const* InsertSection(
SwSectionData & rNewData, SfxItemSet const*const = 0 );
- BOOL IsInsRegionAvailable() const;
+ sal_Bool IsInsRegionAvailable() const;
const SwSection* GetCurrSection() const;
// liefert wie GetCurrSection() den aktuellen Bereich, allerdings geht diese Funktion
// ueber die Frames und erwischt dabei auch den Bereich, wenn der Cursor in einer
// Fussnote steht, deren Referenz in einem spaltigen Bereich steckt.
// Wenn man bOutOfTab setzt, wird der Bereich gesucht,
// der die Tabelle umfasst, nicht etwa ein innerer.
- const SwSection* GetAnySection( BOOL bOutOfTab = FALSE, const Point* pPt = 0 ) const;
+ const SwSection* GetAnySection( sal_Bool bOutOfTab = sal_False, const Point* pPt = 0 ) const;
- USHORT GetSectionFmtCount() const;
- USHORT GetSectionFmtPos( const SwSectionFmt& ) const;
- const SwSectionFmt& GetSectionFmt(USHORT nFmt) const;
- void DelSectionFmt( USHORT nFmt );
+ sal_uInt16 GetSectionFmtCount() const;
+ sal_uInt16 GetSectionFmtPos( const SwSectionFmt& ) const;
+ const SwSectionFmt& GetSectionFmt(sal_uInt16 nFmt) const;
+ void DelSectionFmt( sal_uInt16 nFmt );
void UpdateSection(sal_uInt16 const nSect, SwSectionData &,
SfxItemSet const*const = 0);
- BOOL IsAnySectionInDoc( BOOL bChkReadOnly = FALSE,
- BOOL bChkHidden = FALSE,
- BOOL BChkTOX = FALSE ) const;
+ sal_Bool IsAnySectionInDoc( sal_Bool bChkReadOnly = sal_False,
+ sal_Bool bChkHidden = sal_False,
+ sal_Bool BChkTOX = sal_False ) const;
String GetUniqueSectionName( const String* pChkStr = 0 ) const;
@@ -841,7 +841,7 @@ public:
// search inside the cursor selection for full selected sections.
// if any part of section in the selection return 0.
// if more than one in the selection return the count
- USHORT GetFullSelectedSectionCount() const;
+ sal_uInt16 GetFullSelectedSectionCount() const;
// special insert: Insert a new text node just before or after a section or
// table, if the cursor is positioned at the start/end of said
@@ -852,16 +852,16 @@ public:
bool CanSpecialInsert() const;
// Optimierung UI
- void SetNewDoc(BOOL bNew = TRUE);
+ void SetNewDoc(sal_Bool bNew = sal_True);
sfx2::LinkManager& GetLinkManager();
inline const sfx2::LinkManager& GetLinkManager() const;
// linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von
// Numerierungen), optional kann man "um" den Offset stufen oder "auf"
- // die Position gestuft werden (bModulus = TRUE)
- BOOL IsMoveLeftMargin( BOOL bRight = TRUE, BOOL bModulus = TRUE ) const;
- void MoveLeftMargin( BOOL bRight = TRUE, BOOL bModulus = TRUE );
+ // die Position gestuft werden (bModulus = sal_True)
+ sal_Bool IsMoveLeftMargin( sal_Bool bRight = sal_True, sal_Bool bModulus = sal_True ) const;
+ void MoveLeftMargin( sal_Bool bRight = sal_True, sal_Bool bModulus = sal_True );
// Numberformatter vom Doc erfragen
SvNumberFormatter* GetNumberFormatter();
@@ -869,36 +869,36 @@ public:
{ return ((SwEditShell*)this)->GetNumberFormatter(); }
// Schnitstellen fuers GlobalDokument
- BOOL IsGlobalDoc() const;
- void SetGlblDocSaveLinks( BOOL bFlag = TRUE );
- BOOL IsGlblDocSaveLinks() const;
- USHORT GetGlobalDocContent( SwGlblDocContents& rArr ) const;
- BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos,
+ sal_Bool IsGlobalDoc() const;
+ void SetGlblDocSaveLinks( sal_Bool bFlag = sal_True );
+ sal_Bool IsGlblDocSaveLinks() const;
+ sal_uInt16 GetGlobalDocContent( SwGlblDocContents& rArr ) const;
+ sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos,
SwSectionData & rNew );
- BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos,
+ sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos,
const SwTOXBase& rTOX );
- BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos );
- BOOL DeleteGlobalDocContent( const SwGlblDocContents& rArr,
- USHORT nPos );
- BOOL MoveGlobalDocContent( const SwGlblDocContents& rArr ,
- USHORT nFromPos, USHORT nToPos,
- USHORT nNewPos );
- BOOL GotoGlobalDocContent( const SwGlblDocContent& rPos );
+ sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos );
+ sal_Bool DeleteGlobalDocContent( const SwGlblDocContents& rArr,
+ sal_uInt16 nPos );
+ sal_Bool MoveGlobalDocContent( const SwGlblDocContents& rArr ,
+ sal_uInt16 nFromPos, sal_uInt16 nToPos,
+ sal_uInt16 nNewPos );
+ sal_Bool GotoGlobalDocContent( const SwGlblDocContent& rPos );
// alles fuers Redlining
- USHORT GetRedlineMode() const;
- void SetRedlineMode( USHORT eMode );
- BOOL IsRedlineOn() const;
- USHORT GetRedlineCount() const;
- const SwRedline& GetRedline( USHORT nPos ) const;
- BOOL AcceptRedline( USHORT nPos );
- BOOL RejectRedline( USHORT nPos );
+ sal_uInt16 GetRedlineMode() const;
+ void SetRedlineMode( sal_uInt16 eMode );
+ sal_Bool IsRedlineOn() const;
+ sal_uInt16 GetRedlineCount() const;
+ const SwRedline& GetRedline( sal_uInt16 nPos ) const;
+ sal_Bool AcceptRedline( sal_uInt16 nPos );
+ sal_Bool RejectRedline( sal_uInt16 nPos );
// suche das Redline zu diesem Data und returne die Pos im Array
// USHRT_MAX wird returnt, falls nicht vorhanden
- USHORT FindRedlineOfData( const SwRedlineData& ) const;
+ sal_uInt16 FindRedlineOfData( const SwRedlineData& ) const;
// Kommentar am Redline an der Position setzen
- BOOL SetRedlineComment( const String& rS );
+ sal_Bool SetRedlineComment( const String& rS );
const SwRedline* GetCurrRedline() const;
// Redline Anzeigeattribute wurden geaendert, Views updaten
@@ -920,13 +920,13 @@ public:
void SetLineNumberInfo( const SwLineNumberInfo& rInfo);
// Etiketten: Bereiche synchronisieren
- void SetLabelDoc( BOOL bFlag = TRUE );
- BOOL IsLabelDoc() const;
+ void SetLabelDoc( sal_Bool bFlag = sal_True );
+ sal_Bool IsLabelDoc() const;
// Schnittstelle fuer die TextInputDaten - ( fuer die Texteingabe
// von japanischen/chinesischen Zeichen)
SwExtTextInput* CreateExtTextInput(LanguageType eInputLanguage);
- String DeleteExtTextInput( SwExtTextInput* pDel = 0, BOOL bInsText = TRUE);
+ String DeleteExtTextInput( SwExtTextInput* pDel = 0, sal_Bool bInsText = sal_True);
// SwExtTextInput* GetExtTextInput() const;
void SetExtTextInputData( const CommandExtTextInputData& );
@@ -935,7 +935,7 @@ public:
// returns a scaling factor of selected text. Used for the rotated
// character attribut dialog.
- USHORT GetScalingOfSelectedText() const;
+ sal_uInt16 GetScalingOfSelectedText() const;
// ctor/dtor
SwEditShell( SwDoc&, Window*, const SwViewOption *pOpt = 0 );
diff --git a/sw/inc/errhdl.hxx b/sw/inc/errhdl.hxx
index 222de5caaa10..31002c1875c8 100644
--- a/sw/inc/errhdl.hxx
+++ b/sw/inc/errhdl.hxx
@@ -33,7 +33,7 @@
#include <sal/types.h>
#include "swdllapi.h"
-extern BOOL bAssert; // TRUE, wenn eine ASSERT-Box hochkam
+extern sal_Bool bAssert; // sal_True, wenn eine ASSERT-Box hochkam
// -----------------------------------------------------------------------
@@ -41,8 +41,8 @@ extern BOOL bAssert; // TRUE, wenn eine ASSERT-Box hochkam
// wo der Fehler auftrat.
// Die Funktion darf nicht direkt benutzt werden!
// -----------------------------------------------------------------------
-SW_DLLPUBLIC void AssertFail( const sal_Char*, const sal_Char*, USHORT );
-SW_DLLPUBLIC void AssertFail( USHORT, const sal_Char*, USHORT );
+SW_DLLPUBLIC void AssertFail( const sal_Char*, const sal_Char*, sal_uInt16 );
+SW_DLLPUBLIC void AssertFail( sal_uInt16, const sal_Char*, sal_uInt16 );
#define ASSERT( cond, message ) \
if( !(cond) ) { \
@@ -58,7 +58,7 @@ SW_DLLPUBLIC void AssertFail( USHORT, const sal_Char*, USHORT );
#define ASSERT_ID( cond, id ) \
if( !(cond) ) { \
const char *_pFileName = __FILE__; \
- ::AssertFail( (USHORT)id, _pFileName, __LINE__ ); \
+ ::AssertFail( (sal_uInt16)id, _pFileName, __LINE__ ); \
}
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index 32fdbe202462..38d9c56b3213 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -47,14 +47,14 @@ class SwEditShell;
const SwTxtNode* GetBodyTxtNode( const SwDoc& pDoc, SwPosition& rPos,
const SwFrm& rFrm );
// Wandlung Address -> Adressen
-void ReplacePoint(String& sTmpName, BOOL bWithCommandType = FALSE);
+void ReplacePoint(String& sTmpName, sal_Bool bWithCommandType = sal_False);
struct _SeqFldLstElem
{
String sDlgEntry;
- USHORT nSeqNo;
+ sal_uInt16 nSeqNo;
- _SeqFldLstElem( const String& rStr, USHORT nNo )
+ _SeqFldLstElem( const String& rStr, sal_uInt16 nNo )
: sDlgEntry( rStr ), nSeqNo( nNo )
{}
};
@@ -65,8 +65,8 @@ class SW_DLLPUBLIC SwSeqFldList : public _SwSeqFldList
public:
SwSeqFldList() : _SwSeqFldList( 10, 10 ) {}
- BOOL InsertSort( _SeqFldLstElem* );
- BOOL SeekEntry( const _SeqFldLstElem& , USHORT* pPos = 0 );
+ sal_Bool InsertSort( _SeqFldLstElem* );
+ sal_Bool SeekEntry( const _SeqFldLstElem& , sal_uInt16* pPos = 0 );
};
/*--------------------------------------------------------------------
@@ -93,8 +93,8 @@ public:
class SW_DLLPUBLIC SwGetExpField : public SwFormulaField
{
String sExpand;
- BOOL bIsInBodyTxt;
- USHORT nSubType;
+ sal_Bool bIsInBodyTxt;
+ sal_uInt16 nSubType;
bool bLateInitialization; // #i82544#
@@ -103,18 +103,18 @@ class SW_DLLPUBLIC SwGetExpField : public SwFormulaField
public:
SwGetExpField( SwGetExpFieldType*, const String& rFormel,
- USHORT nSubType = nsSwGetSetExpType::GSE_EXPR, ULONG nFmt = 0);
+ sal_uInt16 nSubType = nsSwGetSetExpType::GSE_EXPR, sal_uLong nFmt = 0);
virtual void SetValue( const double& rVal );
- virtual void SetLanguage(USHORT nLng);
+ virtual void SetLanguage(sal_uInt16 nLng);
inline const String& GetExpStr() const;
inline void ChgExpStr(const String& rExpand);
// wird von der Formatierung abgefragt
- inline BOOL IsInBodyTxt() const;
+ inline sal_Bool IsInBodyTxt() const;
// wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
- inline void ChgBodyTxtFlag( BOOL bIsInBody );
+ inline void ChgBodyTxtFlag( sal_Bool bIsInBody );
// fuer Felder in Header/Footer/Footnotes/Flys:
// (wird nur von der Formatierung aufgerufen!!)
void ChangeExpansion( const SwFrm&, const SwTxtFld& );
@@ -125,12 +125,12 @@ public:
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nType);
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nType);
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
- static USHORT GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc);
+ static sal_uInt16 GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc);
// #i82544#
void SetLateInitialization() { bLateInitialization = true;}
};
@@ -142,11 +142,11 @@ inline const String& SwGetExpField::GetExpStr() const
{ return sExpand; }
// wird von der Formatierung abgefragt
-inline BOOL SwGetExpField::IsInBodyTxt() const
+inline sal_Bool SwGetExpField::IsInBodyTxt() const
{ return bIsInBodyTxt; }
// wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
-inline void SwGetExpField::ChgBodyTxtFlag( BOOL bIsInBody )
+inline void SwGetExpField::ChgBodyTxtFlag( sal_Bool bIsInBody )
{ bIsInBodyTxt = bIsInBody; }
@@ -162,59 +162,59 @@ class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType
const SwNode* pOutlChgNd;
// sal_Unicode cDelim;
String sDelim;
- USHORT nType;
- BYTE nLevel;
- BOOL bDeleted;
+ sal_uInt16 nType;
+ sal_uInt8 nLevel;
+ sal_Bool bDeleted;
public:
SwSetExpFieldType( SwDoc* pDoc, const String& rName,
- USHORT nType = nsSwGetSetExpType::GSE_EXPR );
+ sal_uInt16 nType = nsSwGetSetExpType::GSE_EXPR );
virtual SwFieldType* Copy() const;
virtual const String& GetName() const;
- inline void SetType(USHORT nTyp);
- inline USHORT GetType() const;
+ inline void SetType(sal_uInt16 nTyp);
+ inline sal_uInt16 GetType() const;
- void SetSeqFormat(ULONG nFormat);
- ULONG GetSeqFormat();
+ void SetSeqFormat(sal_uLong nFormat);
+ sal_uLong GetSeqFormat();
- BOOL IsDeleted() const { return bDeleted; }
- void SetDeleted( BOOL b ) { bDeleted = b; }
+ sal_Bool IsDeleted() const { return bDeleted; }
+ void SetDeleted( sal_Bool b ) { bDeleted = b; }
// ueberlagert, weil das Set-Field selbst dafuer sorgt, das
// es aktualisiert wird.
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
inline const String& GetSetRefName() const;
- USHORT SetSeqRefNo( SwSetExpField& rFld );
+ sal_uInt16 SetSeqRefNo( SwSetExpField& rFld );
- USHORT GetSeqFldList( SwSeqFldList& rList );
- String MakeSeqName( USHORT nSeqNo );
+ sal_uInt16 GetSeqFldList( SwSeqFldList& rList );
+ String MakeSeqName( sal_uInt16 nSeqNo );
// Seqencefelder ggfs. Kapitelweise numerieren
// sal_Unicode GetDelimiter() const { return cDelim; }
// void SetDelimiter( sal_Unicode c ) { cDelim = c; }
const String& GetDelimiter() const { return sDelim; }
void SetDelimiter( const String& s ) { sDelim = s; }
- BYTE GetOutlineLvl() const { return nLevel; }
- void SetOutlineLvl( BYTE n ) { nLevel = n; }
+ sal_uInt8 GetOutlineLvl() const { return nLevel; }
+ void SetOutlineLvl( sal_uInt8 n ) { nLevel = n; }
void SetChapter( SwSetExpField& rFld, const SwNode& rNd );
// Member nur fuers SwDoc::UpdateExpFld - wird nur waehrend der Laufzeit
// von SequencefeldTypen benoetigt!!!
const SwNode* GetOutlineChgNd() const { return pOutlChgNd; }
void SetOutlineChgNd( const SwNode* p ) { pOutlChgNd = p; }
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
-inline void SwSetExpFieldType::SetType( USHORT nTyp )
+inline void SwSetExpFieldType::SetType( sal_uInt16 nTyp )
{
nType = nTyp;
EnableFormat( !(nType & (nsSwGetSetExpType::GSE_SEQ|nsSwGetSetExpType::GSE_STRING)));
}
-inline USHORT SwSetExpFieldType::GetType() const
+inline sal_uInt16 SwSetExpFieldType::GetType() const
{ return nType; }
inline const String& SwSetExpFieldType::GetSetRefName() const
@@ -230,15 +230,15 @@ class SW_DLLPUBLIC SwSetExpField : public SwFormulaField
String sExpand;
String aPText;
String aSeqText;
- BOOL bInput;
- USHORT nSeqNo;
- USHORT nSubType;
+ sal_Bool bInput;
+ sal_uInt16 nSeqNo;
+ sal_uInt16 nSubType;
virtual String Expand() const;
virtual SwField* Copy() const;
public:
- SwSetExpField(SwSetExpFieldType*, const String& rFormel, ULONG nFmt = 0);
+ SwSetExpField(SwSetExpFieldType*, const String& rFormel, sal_uLong nFmt = 0);
virtual void SetValue( const double& rVal );
@@ -249,19 +249,19 @@ public:
inline void SetPromptText(const String& rStr);
inline const String& GetPromptText() const;
- inline void SetInputFlag(BOOL bInp);
- inline BOOL GetInputFlag() const;
+ inline void SetInputFlag(sal_Bool bInp);
+ inline sal_Bool GetInputFlag() const;
virtual String GetFieldName() const;
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nType);
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nType);
- inline BOOL IsSequenceFld() const;
+ inline sal_Bool IsSequenceFld() const;
// fuer SequenceFelder - logische Nummer
- inline void SetSeqNumber( USHORT n ) { nSeqNo = n; }
- inline USHORT GetSeqNumber() const { return nSeqNo; }
+ inline void SetSeqNumber( sal_uInt16 n ) { nSeqNo = n; }
+ inline sal_uInt16 GetSeqNumber() const { return nSeqNo; }
// Der Name nur erfragen
virtual const String& GetPar1() const;
@@ -269,8 +269,8 @@ public:
// Die Formel
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
inline const String& SwSetExpField::GetExpStr() const
@@ -285,13 +285,13 @@ inline void SwSetExpField::SetPromptText(const String& rStr)
inline const String& SwSetExpField::GetPromptText() const
{ return aPText; }
-inline void SwSetExpField::SetInputFlag(BOOL bInp)
+inline void SwSetExpField::SetInputFlag(sal_Bool bInp)
{ bInput = bInp; }
-inline BOOL SwSetExpField::GetInputFlag() const
+inline sal_Bool SwSetExpField::GetInputFlag() const
{ return bInput; }
-inline BOOL SwSetExpField::IsSequenceFld() const
+inline sal_Bool SwSetExpField::IsSequenceFld() const
{ return 0 != (nsSwGetSetExpType::GSE_SEQ & ((SwSetExpFieldType*)GetTyp())->GetType()); }
/*--------------------------------------------------------------------
@@ -319,7 +319,7 @@ class SW_DLLPUBLIC SwInputField : public SwField
String aPText;
String aHelp;
String aToolTip;
- USHORT nSubType;
+ sal_uInt16 nSubType;
virtual String Expand() const;
virtual SwField* Copy() const;
@@ -327,8 +327,8 @@ class SW_DLLPUBLIC SwInputField : public SwField
public:
// Direkte Eingabe ueber Dialog alten Wert loeschen
SwInputField(SwInputFieldType*, const String& rContent ,
- const String& rPrompt, USHORT nSubType = 0,
- ULONG nFmt = 0);
+ const String& rPrompt, sal_uInt16 nSubType = 0,
+ sal_uLong nFmt = 0);
virtual String GetFieldName() const;
@@ -346,12 +346,12 @@ public:
virtual String GetToolTip() const;
virtual void SetToolTip(const String & rStr);
- virtual BOOL isFormField() const;
+ virtual sal_Bool isFormField() const;
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nSub);
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -361,20 +361,20 @@ public:
class SwInputFieldList
{
public:
- SwInputFieldList( SwEditShell* pShell, BOOL bBuildTmpLst = FALSE );
+ SwInputFieldList( SwEditShell* pShell, sal_Bool bBuildTmpLst = sal_False );
~SwInputFieldList();
- USHORT Count() const;
- SwField* GetField(USHORT nId);
+ sal_uInt16 Count() const;
+ SwField* GetField(sal_uInt16 nId);
- void GotoFieldPos(USHORT nId);
+ void GotoFieldPos(sal_uInt16 nId);
void PushCrsr();
void PopCrsr();
// vergleiche TmpLst mit akt Feldern. Alle neue kommen in die SortLst
// damit sie geupdatet werden koennen. Returnt die Anzahl.
// (Fuer Textbausteine: nur seine Input-Felder aktualisieren)
- USHORT BuildSortLst();
+ sal_uInt16 BuildSortLst();
// Alle unselektierten Felder aus Liste entfernen
void RemoveUnselectedFlds();
@@ -406,7 +406,7 @@ public:
class SwTblField : public SwValueField, public SwTableFormula
{
String sExpand;
- USHORT nSubType;
+ sal_uInt16 nSubType;
virtual String Expand() const;
virtual SwField* Copy() const;
@@ -418,11 +418,11 @@ class SwTblField : public SwValueField, public SwTableFormula
public:
SwTblField( SwTblFieldType*, const String& rFormel,
- USHORT nSubType = 0, ULONG nFmt = 0);
+ sal_uInt16 nSubType = 0, sal_uLong nFmt = 0);
virtual void SetValue( const double& rVal );
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nType);
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nType);
const String& GetExpStr() const { return sExpand; }
void ChgExpStr(const String& rStr) { sExpand = rStr; }
@@ -435,8 +435,8 @@ public:
// Die Formel
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
diff --git a/sw/inc/extinput.hxx b/sw/inc/extinput.hxx
index b3a07efa1906..dba9bb5b5e2c 100644
--- a/sw/inc/extinput.hxx
+++ b/sw/inc/extinput.hxx
@@ -40,8 +40,8 @@ class SwExtTextInput : public SwPaM
{
SvUShorts aAttrs;
String sOverwriteText;
- BOOL bInsText : 1;
- BOOL bIsOverwriteCursor : 1;
+ sal_Bool bInsText : 1;
+ sal_Bool bIsOverwriteCursor : 1;
LanguageType eInputLanguage;
public:
SwExtTextInput( const SwPaM& rPam, Ring* pRing = 0 );
@@ -49,9 +49,9 @@ public:
void SetInputData( const CommandExtTextInputData& rData );
const SvUShorts& GetAttrs() const { return aAttrs; }
- void SetInsText( BOOL bFlag ) { bInsText = bFlag; }
- BOOL IsOverwriteCursor() const { return bIsOverwriteCursor; }
- void SetOverwriteCursor( BOOL bFlag );
+ void SetInsText( sal_Bool bFlag ) { bInsText = bFlag; }
+ sal_Bool IsOverwriteCursor() const { return bIsOverwriteCursor; }
+ void SetOverwriteCursor( sal_Bool bFlag );
void SetLanguage(LanguageType eSet) { eInputLanguage = eSet;}
};
diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx
index ee557e8eeaba..0b9cc9150227 100644
--- a/sw/inc/fchrfmt.hxx
+++ b/sw/inc/fchrfmt.hxx
@@ -69,12 +69,12 @@ public:
String &rText,
const IntlWrapper* pIntl = 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 );
// an das SwTxtCharFmt weiterleiten (vom SwClient)
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
void SetCharFmt( SwFmt* pFmt ) { pFmt->Add(this); }
SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 873b28225204..3beaff17ade8 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -72,41 +72,41 @@ namespace svx
// return values for GetFrmType() und GetSelFrmType().
//! values can be combined via logival or
-#define FRMTYPE_NONE (USHORT) 0
-#define FRMTYPE_PAGE (USHORT) 1
-#define FRMTYPE_HEADER (USHORT) 2
-#define FRMTYPE_FOOTER (USHORT) 4
-#define FRMTYPE_BODY (USHORT) 8
-#define FRMTYPE_COLUMN (USHORT) 16
-#define FRMTYPE_TABLE (USHORT) 32
-#define FRMTYPE_FLY_FREE (USHORT) 64
-#define FRMTYPE_FLY_ATCNT (USHORT) 128
-#define FRMTYPE_FLY_INCNT (USHORT) 256
-#define FRMTYPE_FOOTNOTE (USHORT) 512
-#define FRMTYPE_FTNPAGE (USHORT) 1024
-#define FRMTYPE_FLY_ANY (USHORT) 2048
-#define FRMTYPE_DRAWOBJ (USHORT) 4096
-#define FRMTYPE_COLSECT (USHORT) 8192
-#define FRMTYPE_COLSECTOUTTAB (USHORT) 16384
+#define FRMTYPE_NONE (sal_uInt16) 0
+#define FRMTYPE_PAGE (sal_uInt16) 1
+#define FRMTYPE_HEADER (sal_uInt16) 2
+#define FRMTYPE_FOOTER (sal_uInt16) 4
+#define FRMTYPE_BODY (sal_uInt16) 8
+#define FRMTYPE_COLUMN (sal_uInt16) 16
+#define FRMTYPE_TABLE (sal_uInt16) 32
+#define FRMTYPE_FLY_FREE (sal_uInt16) 64
+#define FRMTYPE_FLY_ATCNT (sal_uInt16) 128
+#define FRMTYPE_FLY_INCNT (sal_uInt16) 256
+#define FRMTYPE_FOOTNOTE (sal_uInt16) 512
+#define FRMTYPE_FTNPAGE (sal_uInt16) 1024
+#define FRMTYPE_FLY_ANY (sal_uInt16) 2048
+#define FRMTYPE_DRAWOBJ (sal_uInt16) 4096
+#define FRMTYPE_COLSECT (sal_uInt16) 8192
+#define FRMTYPE_COLSECTOUTTAB (sal_uInt16) 16384
#define FRMTYPE_ANYCOLSECT ( FRMTYPE_COLSECT | FRMTYPE_COLSECTOUTTAB )
//! values can be combined via logival or
-#define GOTOOBJ_DRAW_CONTROL (USHORT) 1
-#define GOTOOBJ_DRAW_SIMPLE (USHORT) 2
-#define GOTOOBJ_DRAW_ANY (USHORT) 3
-#define GOTOOBJ_FLY_FRM (USHORT) 4
-#define GOTOOBJ_FLY_GRF (USHORT) 8
-#define GOTOOBJ_FLY_OLE (USHORT) 16
-#define GOTOOBJ_FLY_ANY (USHORT) 28
-#define GOTOOBJ_GOTO_ANY (USHORT) 31
+#define GOTOOBJ_DRAW_CONTROL (sal_uInt16) 1
+#define GOTOOBJ_DRAW_SIMPLE (sal_uInt16) 2
+#define GOTOOBJ_DRAW_ANY (sal_uInt16) 3
+#define GOTOOBJ_FLY_FRM (sal_uInt16) 4
+#define GOTOOBJ_FLY_GRF (sal_uInt16) 8
+#define GOTOOBJ_FLY_OLE (sal_uInt16) 16
+#define GOTOOBJ_FLY_ANY (sal_uInt16) 28
+#define GOTOOBJ_GOTO_ANY (sal_uInt16) 31
//! values can be combined via logival or
-#define FLYPROTECT_CONTENT (USHORT) 1 // kann verodert werden!
-#define FLYPROTECT_SIZE (USHORT) 2
-#define FLYPROTECT_POS (USHORT) 4
-#define FLYPROTECT_PARENT (USHORT) 8 // nur Parents untersuchen
-#define FLYPROTECT_FIXED (USHORT) 16 // nur nicht aufhebbarer Schutz
+#define FLYPROTECT_CONTENT (sal_uInt16) 1 // kann verodert werden!
+#define FLYPROTECT_SIZE (sal_uInt16) 2
+#define FLYPROTECT_POS (sal_uInt16) 4
+#define FLYPROTECT_PARENT (sal_uInt16) 8 // nur Parents untersuchen
+#define FLYPROTECT_FIXED (sal_uInt16) 16 // nur nicht aufhebbarer Schutz
// z.B. durch OLE-Server, gilt auch
// fuer Dialog
@@ -187,7 +187,7 @@ class SdrDropMarkerOverlay;
class SW_DLLPUBLIC SwFEShell : public SwEditShell
{
SdrDropMarkerOverlay *pChainFrom, *pChainTo;
- BOOL bCheckForOLEInCaption;
+ sal_Bool bCheckForOLEInCaption;
SW_DLLPRIVATE SwFlyFrm *FindFlyFrm() const;
SW_DLLPRIVATE SwFlyFrm *FindFlyFrm( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const;
@@ -205,26 +205,26 @@ class SW_DLLPUBLIC SwFEShell : public SwEditShell
SW_DLLPRIVATE const SwFrm *GetBox( const Point &rPt, bool* pbRow = 0, bool* pbCol = 0 ) const;
//0 == in keiner Spalte
- SW_DLLPRIVATE USHORT _GetCurColNum( const SwFrm *pFrm,
+ SW_DLLPRIVATE sal_uInt16 _GetCurColNum( const SwFrm *pFrm,
SwGetCurColNumPara* pPara ) const;
SW_DLLPRIVATE void _GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const;
SW_DLLPRIVATE void _GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const;
- SW_DLLPRIVATE BOOL ImpEndCreate();
+ SW_DLLPRIVATE sal_Bool ImpEndCreate();
SW_DLLPRIVATE ObjCntType GetObjCntType( const SdrObject& rObj ) const;
// Methoden fuers kopieren von DrawObjecten
- SW_DLLPRIVATE BOOL CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
- const Point& rInsPt, BOOL bIsMove,
- BOOL bSelectInsert );
+ SW_DLLPRIVATE sal_Bool CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
+ const Point& rInsPt, sal_Bool bIsMove,
+ sal_Bool bSelectInsert );
// get list of marked SdrObjects;
// helper method for GetSelFrmType, IsSelContainsControl
SW_DLLPRIVATE const SdrMarkList* _GetMarkList() const;
- SW_DLLPRIVATE BOOL CheckHeadline( bool bRepeat ) const;
+ SW_DLLPRIVATE sal_Bool CheckHeadline( bool bRepeat ) const;
using SwEditShell::Copy;
@@ -238,15 +238,15 @@ public:
virtual ~SwFEShell();
// Copy und Paste Methoden fuer das interne Clipboard
- BOOL Copy( SwDoc* pClpDoc, const String* pNewClpTxt = 0 );
- BOOL Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames = sal_False);
+ sal_Bool Copy( SwDoc* pClpDoc, const String* pNewClpTxt = 0 );
+ sal_Bool Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames = sal_False);
//paste some pages into another doc - used in mailmerge
- BOOL PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPage);
+ sal_Bool PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage);
// Copy-Methode fuer Drag&Drop
- BOOL Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt,
- BOOL bIsMove = FALSE, BOOL bSelectInsert = TRUE );
+ sal_Bool Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt,
+ sal_Bool bIsMove = sal_False, sal_Bool bSelectInsert = sal_True );
- void SelectFlyFrm( SwFlyFrm& rFrm, BOOL bNew = FALSE );
+ void SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew = sal_False );
// befindet sich der selektierte Rahmen innerhalb eines anderen?
const SwFrmFmt* IsFlyInFly();
@@ -255,14 +255,14 @@ public:
//Wenn ein Objekt angegeben wurde, so wird genau diese Markiert (anstatt
//ueber die Position zu suchen.
- BOOL SelectObj( const Point& rSelPt, BYTE nFlag = 0, SdrObject *pObj = 0 );
+ sal_Bool SelectObj( const Point& rSelPt, sal_uInt8 nFlag = 0, SdrObject *pObj = 0 );
void DelSelectedObj();
//Selektion nach oben unten bewegen (Z-Order).
- //TRUE == ganz nach oben/unten
- //FALSE == einen ueberholen
- void SelectionToTop ( BOOL bTop = TRUE );
- void SelectionToBottom( BOOL bBottom = TRUE );
+ //sal_True == ganz nach oben/unten
+ //sal_False == einen ueberholen
+ void SelectionToTop ( sal_Bool bTop = sal_True );
+ void SelectionToBottom( sal_Bool bBottom = sal_True );
short GetLayerId() const; //1 Heaven, 0 Hell, -1 Uneindeutig
void SelectionToHeaven(); //Ueber dem Dokument
@@ -279,7 +279,7 @@ public:
// the draw object.
sal_Bool ShouldObjectBeSelected(const Point& rPt);
- sal_Bool MoveAnchor( USHORT nDir );
+ sal_Bool MoveAnchor( sal_uInt16 nDir );
// Returns if Upper of frame at current position is section frame
// Currently only used by the rules. To be replaced by something more
@@ -288,10 +288,10 @@ public:
//Returnwerte siehe oben FrmType.
//pPt: Crsr bzw. DocPos; bStopAtFly: Bei Flys anhalten oder ueber den Anchor weitergehen
- // Obgleich (0,TRUE) eine Art Standard ist, sind die Parameter nicht defaultet, damit
+ // Obgleich (0,sal_True) eine Art Standard ist, sind die Parameter nicht defaultet, damit
// bei jeder Benutzung insbesondere das bStopAtFly bewusst genutzt wird.
- USHORT GetFrmType( const Point *pPt, BOOL bStopAtFly ) const;
- USHORT GetSelFrmType() const; //Selektion (Drawing)
+ sal_uInt16 GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const;
+ sal_uInt16 GetSelFrmType() const; //Selektion (Drawing)
/** #108784# check whether selected frame contains a control;
* companion method to GetSelFrmType, used for preventing
@@ -323,9 +323,9 @@ public:
// Groesse von Drawobjekten setzen
void SetObjRect( const SwRect& rRect );
- long BeginDrag( const Point *pPt, BOOL bProp );
- long Drag ( const Point *pPt, BOOL bProp );
- long EndDrag ( const Point *pPt, BOOL bProp );
+ long BeginDrag( const Point *pPt, sal_Bool bProp );
+ long Drag ( const Point *pPt, sal_Bool bProp );
+ long EndDrag ( const Point *pPt, sal_Bool bProp );
void BreakDrag();
//Methoden fuer die Statuszeile.
@@ -348,13 +348,13 @@ public:
const SwFrmFmt* GetFmtFromAnyObj( const Point& rPt ) const;
//Welcher Schutz ist am selektierten Objekt gesetzt?
- //!! returns several flags in BYTE
- BYTE IsSelObjProtected( USHORT /*FLYPROTECT_...*/ eType ) const;
+ //!! returns several flags in sal_uInt8
+ sal_uInt8 IsSelObjProtected( sal_uInt16 /*FLYPROTECT_...*/ eType ) const;
//Liefert neben der Grafik in rName bei gelinkten Grafiken den Namen mit
//Pfad und sonst den Grafiknamen. rbLink ist TRU bei gelinkten Grafiken.
const Graphic *GetGrfAtPos( const Point &rDocPos,
- String &rName, BOOL &rbLink ) const;
+ String &rName, sal_Bool &rbLink ) const;
// --> OD 2009-07-13 #i73249#
const String GetObjTitle() const;
@@ -365,33 +365,33 @@ public:
//SS fuer Rahmen --------------------------------------------
- BOOL IsFrmSelected() const;
- BOOL GetFlyFrmAttr( SfxItemSet &rSet ) const;
- BOOL SetFlyFrmAttr( SfxItemSet &rSet );
- BOOL ResetFlyFrmAttr( USHORT nWhich, const SfxItemSet* pSet = 0 );
- const SwFrmFmt *NewFlyFrm( const SfxItemSet &rSet, BOOL bAnchValid = FALSE,
+ sal_Bool IsFrmSelected() const;
+ sal_Bool GetFlyFrmAttr( SfxItemSet &rSet ) const;
+ sal_Bool SetFlyFrmAttr( SfxItemSet &rSet );
+ sal_Bool ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet = 0 );
+ const SwFrmFmt *NewFlyFrm( const SfxItemSet &rSet, sal_Bool bAnchValid = sal_False,
SwFrmFmt *pParent = 0 );
void SetFlyPos( const Point &rAbsPos);
- Point FindAnchorPos( const Point &rAbsPos, BOOL bMoveIt = FALSE );
+ Point FindAnchorPos( const Point &rAbsPos, sal_Bool bMoveIt = sal_False );
// determines whether a frame or its environment is vertically formatted and right-to-left
- BOOL IsFrmVertical(BOOL bEnvironment, BOOL& bRightToLeft) const;
+ sal_Bool IsFrmVertical(sal_Bool bEnvironment, sal_Bool& bRightToLeft) const;
SwFrmFmt* GetCurFrmFmt() const; //Wenn Rahmen, dann Rahmenvorlage, sonst 0
- void SetFrmFmt( SwFrmFmt *pFmt, BOOL bKeepOrient = FALSE, Point* pDocPos = 0 ); //Wenn Rahmen, dann Rahmenvorlage setzen
+ void SetFrmFmt( SwFrmFmt *pFmt, sal_Bool bKeepOrient = sal_False, Point* pDocPos = 0 ); //Wenn Rahmen, dann Rahmenvorlage setzen
const SwFlyFrm *GetCurrFlyFrm() const { return FindFlyFrm(); }
// finde/loeschen den Fly, in dem der Cursor steht
SwFrmFmt* WizzardGetFly();
//Selebstaendiges selektieren von Flys
- BOOL GotoNextFly( USHORT /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY )
- { return GotoObj( TRUE, eType ); }
- BOOL GotoPrevFly( USHORT /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY)
- { return GotoObj( FALSE, eType); }
+ sal_Bool GotoNextFly( sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY )
+ { return GotoObj( sal_True, eType ); }
+ sal_Bool GotoPrevFly( sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY)
+ { return GotoObj( sal_False, eType); }
//iterieren ueber Flys - fuer Basic-Collections
- USHORT GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL ) const;
- const SwFrmFmt* GetFlyNum(USHORT nIdx, FlyCntType eType = FLYCNTTYPE_ALL) const;
+ sal_uInt16 GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL ) const;
+ const SwFrmFmt* GetFlyNum(sal_uInt16 nIdx, FlyCntType eType = FLYCNTTYPE_ALL) const;
//Wenn ein fly selectiert ist, zieht er den Crsr in den ersten CntntFrm
const SwFrmFmt* SelFlyGrabCrsr();
@@ -429,8 +429,8 @@ public:
void MakeObjVisible( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const;
// check resize of OLE-Object
- BOOL IsCheckForOLEInCaption() const { return bCheckForOLEInCaption; }
- void SetCheckForOLEInCaption( BOOL bFlag ) { bCheckForOLEInCaption = bFlag; }
+ sal_Bool IsCheckForOLEInCaption() const { return bCheckForOLEInCaption; }
+ void SetCheckForOLEInCaption( sal_Bool bFlag ) { bCheckForOLEInCaption = bFlag; }
// setze am selektierten FlyFrame einen Namen
void SetFlyName( const String& rName );
@@ -445,8 +445,8 @@ public:
String GetUniqueFrameName() const;
// springe zum benannten Rahmen (Grafik/OLE)
- BOOL GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL,
- BOOL bSelFrame = TRUE );
+ sal_Bool GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL,
+ sal_Bool bSelFrame = sal_True );
// steht an der Position eine Grafik mit einer URL ?
const SwFrmFmt* IsURLGrfAtPos( const Point& rPt, String* pURL = 0,
String *pTargetFrameName = 0,
@@ -470,16 +470,16 @@ public:
void CheckUnboundObjects();
//Achtung: Uneindeutikeiten bei Mehrfachselektionen.
- BOOL GetObjAttr( SfxItemSet &rSet ) const;
- BOOL SetObjAttr( const SfxItemSet &rSet );
+ sal_Bool GetObjAttr( SfxItemSet &rSet ) const;
+ sal_Bool SetObjAttr( const SfxItemSet &rSet );
- const SdrObject* GetBestObject( BOOL bNext, USHORT eType = GOTOOBJ_DRAW_ANY, BOOL bFlat = TRUE, const ::svx::ISdrObjectFilter* pFilter = NULL );
- BOOL GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType = GOTOOBJ_DRAW_ANY);
+ const SdrObject* GetBestObject( sal_Bool bNext, sal_uInt16 eType = GOTOOBJ_DRAW_ANY, sal_Bool bFlat = sal_True, const ::svx::ISdrObjectFilter* pFilter = NULL );
+ sal_Bool GotoObj( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_DRAW_ANY);
//Setzen vom DragMode (z.B. Rotate), tut nix bei Rahmenselektion.
- void SetDragMode( UINT16 eSdrDragMode );
+ void SetDragMode( sal_uInt16 eSdrDragMode );
- USHORT IsObjSelected() const; //Liefert gleich die Anzahl der Objekte,
+ sal_uInt16 IsObjSelected() const; //Liefert gleich die Anzahl der Objekte,
//zaehlt aber nicht die Objekte in Gruppen.
sal_Bool IsObjSelected( const SdrObject& rObj ) const;
@@ -496,22 +496,22 @@ public:
//selektiert.
//Mit BreakCreate wird der Vorgang abgebrochen, dann ist kein Objekt
//mehr selektiert.
- BOOL BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos );
- BOOL BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, UINT32 eObjInventor, const Point &);
+ sal_Bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos );
+ sal_Bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sal_uInt32 eObjInventor, const Point &);
void MoveCreate ( const Point &rPos );
- BOOL EndCreate ( UINT16 eSdrCreateCmd );
+ sal_Bool EndCreate ( sal_uInt16 eSdrCreateCmd );
void BreakCreate();
- BOOL IsDrawCreate() const;
- void CreateDefaultShape( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect, USHORT nSlotId);
+ sal_Bool IsDrawCreate() const;
+ void CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect, sal_uInt16 nSlotId);
// Funktionen f�r Rubberbox, um Draw-Objekte zu selektieren
- BOOL BeginMark( const Point &rPos );
+ sal_Bool BeginMark( const Point &rPos );
void MoveMark ( const Point &rPos );
- BOOL EndMark ();
+ sal_Bool EndMark ();
void BreakMark();
//Gruppe erzeugen, aufloesen, nix bei Rahmenselektion.
- BOOL IsGroupSelected(); //Kann auch eine Mischselektion sein!
+ sal_Bool IsGroupSelected(); //Kann auch eine Mischselektion sein!
void GroupSelection(); //Hinterher ist die Gruppe selektiert.
void UnGroupSelection(); //Die Einzelobjekte sind Selektiert
//Es koennen noch immer Gruppen dabei sein.
@@ -519,25 +519,25 @@ public:
// OD 27.06.2003 #108784# - change return type.
bool IsGroupAllowed() const;
- void MirrorSelection( BOOL bHorizontal ); //Bei FALSE Vertikal
+ void MirrorSelection( sal_Bool bHorizontal ); //Bei sal_False Vertikal
//frmatr.hxx. Hier kein enum wg. Abhaengigkeiten
- //Der BOOL ist nur fuer internen Gebrauch! Anker wird nur - anhand der
+ //Der sal_Bool ist nur fuer internen Gebrauch! Anker wird nur - anhand der
//aktuellen Dokumentposition - neu gesetzt aber nicht umgesetzt.
- void ChgAnchor( int eAnchorId, BOOL bSameOnly = FALSE,
- BOOL bPosCorr = TRUE );
+ void ChgAnchor( int eAnchorId, sal_Bool bSameOnly = sal_False,
+ sal_Bool bPosCorr = sal_True );
- BOOL SetDrawingAttr( SfxItemSet &rSet );
+ sal_Bool SetDrawingAttr( SfxItemSet &rSet );
// hole die selectierten DrawObj als Grafik (MetaFile/Bitmap)
// Return-Wert besagt ob konvertiert wurde!!
- BOOL GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const;
+ sal_Bool GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const;
- void Paste( SvStream& rStm, USHORT nAction, const Point* pPt = 0 );
- BOOL Paste( const Graphic &rGrf );
- BOOL Paste( SotDataObject& rObj, const Point& rPt );
+ void Paste( SvStream& rStm, sal_uInt16 nAction, const Point* pPt = 0 );
+ sal_Bool Paste( const Graphic &rGrf );
+ sal_Bool Paste( SotDataObject& rObj, const Point& rPt );
- BOOL IsAlignPossible() const;
+ sal_Bool IsAlignPossible() const;
void SetCalcFieldValueHdl(Outliner* pOutliner);
void Insert(const String& rGrfName,
@@ -551,7 +551,7 @@ public:
void InsertDrawObj( SdrObject& rDrawObj,
const Point& rInsertPosition );
- BOOL ReplaceSdrObj( const String& rGrfName, const String& rFltName,
+ sal_Bool ReplaceSdrObj( const String& rGrfName, const String& rFltName,
const Graphic* pGrf = 0 );
// --> #i972#
@@ -566,26 +566,26 @@ public:
//------------------------------------------
//Auskunft ueber naechstliegenden Inhalt zum uebergebenen Point
- Point GetCntntPos( const Point& rPoint, BOOL bNext ) const;
+ Point GetCntntPos( const Point& rPoint, sal_Bool bNext ) const;
//convert document position into position relative to the current page
Point GetRelativePagePosition(const Point& rDocPos);
//Layout-Selektion Hiden/Zeigen und aufruf an die CrsrSh weiterreichen.
void ShLooseFcs();
- void ShGetFcs( BOOL bUpdate = TRUE );
+ void ShGetFcs( sal_Bool bUpdate = sal_True );
//PageDescriptor-Schnittstelle
void ChgCurPageDesc( const SwPageDesc& );
- USHORT GetCurPageDesc( const BOOL bCalcFrm = TRUE ) const;
- USHORT GetMousePageDesc( const Point &rPt ) const;
- USHORT GetPageDescCnt() const;
+ sal_uInt16 GetCurPageDesc( const sal_Bool bCalcFrm = sal_True ) const;
+ sal_uInt16 GetMousePageDesc( const Point &rPt ) const;
+ sal_uInt16 GetPageDescCnt() const;
SwPageDesc* FindPageDescByName( const String& rName,
- BOOL bGetFromPool = FALSE,
- USHORT* pPos = 0 );
+ sal_Bool bGetFromPool = sal_False,
+ sal_uInt16* pPos = 0 );
- const SwPageDesc& GetPageDesc( USHORT i ) const;
- void ChgPageDesc( USHORT i, const SwPageDesc& );
+ const SwPageDesc& GetPageDesc( sal_uInt16 i ) const;
+ void ChgPageDesc( sal_uInt16 i, const SwPageDesc& );
// if inside all selection only one PageDesc, return this.
// Otherwise return 0 pointer
const SwPageDesc* GetSelectedPageDescs() const;
@@ -597,37 +597,37 @@ public:
//Seitennummer der Seite in der der Point liegt, 0 wenn keine
//getroffen ist.
- USHORT GetPageNumber( const Point &rPoint ) const;
- BOOL GetPageNumber( long nYPos, BOOL bAtCrsrPos, USHORT& rPhyNum, USHORT& rVirtNum, String &rDisplay ) const;
+ sal_uInt16 GetPageNumber( const Point &rPoint ) const;
+ sal_Bool GetPageNumber( long nYPos, sal_Bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, String &rDisplay ) const;
SwFlyFrmFmt* InsertObject( const svt::EmbeddedObjectRef&,
const SfxItemSet* pFlyAttrSet = 0,
const SfxItemSet* pGrfAttrSet = 0,
SwFrmFmt* = 0 );
- BOOL FinishOLEObj(); // Server wird beendet
+ sal_Bool FinishOLEObj(); // Server wird beendet
//Attribute der Tabelle besorgen/setzen.
void GetTblAttr( SfxItemSet & ) const;
void SetTblAttr( const SfxItemSet & );
//Tabelle vollstaendig selektiert?
- BOOL HasWholeTabSelection() const;
+ sal_Bool HasWholeTabSelection() const;
//Ist der Inhalt einer Tabellenzelle oder mindestens eine Tabellenzelle
//vollstaendig selektiert ist
- BOOL HasBoxSelection() const;
+ sal_Bool HasBoxSelection() const;
- BOOL InsertRow( USHORT nCnt, BOOL bBehind );
- BOOL InsertCol( USHORT nCnt, BOOL bBehind ); // 0 == am Ende
- BOOL DeleteCol();
- BOOL DeleteRow();
+ sal_Bool InsertRow( sal_uInt16 nCnt, sal_Bool bBehind );
+ sal_Bool InsertCol( sal_uInt16 nCnt, sal_Bool bBehind ); // 0 == am Ende
+ sal_Bool DeleteCol();
+ sal_Bool DeleteRow();
- BOOL DeleteTblSel(); //Aktuelle Selektion, ggf. die ganze Tabelle.
+ sal_Bool DeleteTblSel(); //Aktuelle Selektion, ggf. die ganze Tabelle.
- USHORT MergeTab(); //Merged selektierte Tabellenteile zusammen
+ sal_uInt16 MergeTab(); //Merged selektierte Tabellenteile zusammen
//Fehler ueber enum zurueck
// Zelle Vertikal oder Horizontal splitten.
- BOOL SplitTab( BOOL nVert = TRUE, USHORT nCnt = 1, BOOL bSameHeight = FALSE );
- BOOL Sort(const SwSortOptions&); //Sortieren.
+ sal_Bool SplitTab( sal_Bool nVert = sal_True, sal_uInt16 nCnt = 1, sal_Bool bSameHeight = sal_False );
+ sal_Bool Sort(const SwSortOptions&); //Sortieren.
void SetRowHeight( const SwFmtFrmSize &rSz );
//Der Pointer muss vom Aufrufer zerstoert werden wenn != 0
@@ -636,34 +636,34 @@ public:
void SetRowSplit( const SwFmtRowSplit &rSz );
void GetRowSplit( SwFmtRowSplit *&rpSz ) const;
- void SetBoxAlign( USHORT nOrient );
- USHORT GetBoxAlign() const; //USHRT_MAX fuer uneindeutig!
+ void SetBoxAlign( sal_uInt16 nOrient );
+ sal_uInt16 GetBoxAlign() const; //USHRT_MAX fuer uneindeutig!
//Ausgleichen der Zeilenhoehen. Mit bTstOnly festellen ob mehr als eine
//Zeile markiert ist.
- BOOL BalanceRowHeight( BOOL bTstOnly );
+ sal_Bool BalanceRowHeight( sal_Bool bTstOnly );
void SetTabBorders( const SfxItemSet& rSet );
void GetTabBorders( SfxItemSet& rSet) const;
- void SetTabLineStyle(const Color* pColor, BOOL bSetLine = FALSE, const SvxBorderLine* pBorderLine = NULL);
+ void SetTabLineStyle(const Color* pColor, sal_Bool bSetLine = sal_False, const SvxBorderLine* pBorderLine = NULL);
void SetTabBackground( const SvxBrushItem &rNew );
void GetTabBackground( SvxBrushItem &rToFill ) const;
void SetBoxBackground( const SvxBrushItem &rNew );
- BOOL GetBoxBackground( SvxBrushItem &rToFill ) const; //FALSE uneindeutig
+ sal_Bool GetBoxBackground( SvxBrushItem &rToFill ) const; //sal_False uneindeutig
void SetBoxDirection( const SvxFrameDirectionItem& rNew );
- BOOL GetBoxDirection( SvxFrameDirectionItem& rToFill ) const; //FALSE uneindeutig
+ sal_Bool GetBoxDirection( SvxFrameDirectionItem& rToFill ) const; //sal_False uneindeutig
void SetRowBackground( const SvxBrushItem &rNew );
- BOOL GetRowBackground( SvxBrushItem &rToFill ) const; //FALSE uneindeutig
+ sal_Bool GetRowBackground( SvxBrushItem &rToFill ) const; //sal_False uneindeutig
- BYTE WhichMouseTabCol( const Point &rPt ) const;
+ sal_uInt8 WhichMouseTabCol( const Point &rPt ) const;
void GetTabCols( SwTabCols &rToFill ) const; //Spalten- und Randinfo.
- void SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly = TRUE );
+ void SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly = sal_True );
void GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const;
- void SetMouseTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
+ void SetMouseTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly,
const Point &rPt );
// --> FME 2004-07-30 #i20126# Enhanced table selection
@@ -673,82 +673,82 @@ public:
// #i24134# adjustment of table rows via Ruler
void GetTabRows( SwTabCols &rToFill ) const;
- void SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly );
+ void SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly );
void GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const;
- void SetMouseTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const Point &rPt );
+ void SetMouseTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const Point &rPt );
void ProtectCells(); //Falls eine Tabselektion besteht, wird sie ver-
// nichtet, wenn der Cursor nicht in Readonly darf
void UnProtectCells(); // auf die Tabellenselektin
void UnProtectTbls(); //bei allen Tabellen in der Selektion den Schutz aufheben
- BOOL HasTblAnyProtection( const String* pTblName = 0,
- BOOL* pFullTblProtection = 0 );
- BOOL CanUnProtectCells() const;
+ sal_Bool HasTblAnyProtection( const String* pTblName = 0,
+ sal_Bool* pFullTblProtection = 0 );
+ sal_Bool CanUnProtectCells() const;
- USHORT GetRowsToRepeat() const;
- void SetRowsToRepeat( USHORT nNumOfRows );
- USHORT GetVirtPageNum( const BOOL bCalcFrm = TRUE );
+ sal_uInt16 GetRowsToRepeat() const;
+ void SetRowsToRepeat( sal_uInt16 nNumOfRows );
+ sal_uInt16 GetVirtPageNum( const sal_Bool bCalcFrm = sal_True );
//returns the number of table rows currently selected
//if the selection start at the top of the table
- USHORT GetRowSelectionFromTop() const;
+ sal_uInt16 GetRowSelectionFromTop() const;
- BOOL IsInRepeatedHeadline() const { return CheckHeadline( true ); }
- BOOL IsInHeadline() const { return CheckHeadline( false ); }
+ sal_Bool IsInRepeatedHeadline() const { return CheckHeadline( true ); }
+ sal_Bool IsInHeadline() const { return CheckHeadline( false ); }
//Stellt die Breiten der Zellen so ein, dass der Inhalt moeglichst
//nicht umgebrochen werden muss.
//bBalance sorgt fuer einen Ausgleich der markierten Spalten.
- void AdjustCellWidth( BOOL bBalance = FALSE );
+ void AdjustCellWidth( sal_Bool bBalance = sal_False );
//Nicht erlaubt, wenn nur leere Zellen selektiert sind.
- BOOL IsAdjustCellWidthAllowed( BOOL bBalance = FALSE ) const;
+ sal_Bool IsAdjustCellWidthAllowed( sal_Bool bBalance = sal_False ) const;
//Ausgleich der Zellenbreiten, mit bTstOnly feststellen, ob mehr als
//eine Zelle markiert ist.
- BOOL BalanceCellWidth( BOOL bTstOnly );
+ sal_Bool BalanceCellWidth( sal_Bool bTstOnly );
// AutoFormat fuer die Tabelle/TabellenSelection
- BOOL SetTableAutoFmt( const SwTableAutoFmt& rNew );
+ sal_Bool SetTableAutoFmt( const SwTableAutoFmt& rNew );
// Erfrage wie attributiert ist
- BOOL GetTableAutoFmt( SwTableAutoFmt& rGet );
+ sal_Bool GetTableAutoFmt( SwTableAutoFmt& rGet );
// aender eine Zellenbreite/-Hoehe/Spaltenbreite/Zeilenhoehe
- BOOL SetColRowWidthHeight( USHORT eType, USHORT nDiff = 283 );
+ sal_Bool SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff = 283 );
// Autosumme
- BOOL GetAutoSum( String& rFml ) const;
+ sal_Bool GetAutoSum( String& rFml ) const;
//Phy: Tatsaechliche Seitenanzahl.
//Virt: Vom User evtl. gesetzten Offset mit einbeziehen.
- USHORT GetPhyPageNum();
+ sal_uInt16 GetPhyPageNum();
// Setzt an der aktuellen Postion einen neuen Page Offset
- void SetNewPageOffset( USHORT nOffset );
- void SetPageOffset( USHORT nOffset ); //Aendert den letzten Page Offset
- USHORT GetPageOffset() const; //Liefert den letzten Page Offset
+ void SetNewPageOffset( sal_uInt16 nOffset );
+ void SetPageOffset( sal_uInt16 nOffset ); //Aendert den letzten Page Offset
+ sal_uInt16 GetPageOffset() const; //Liefert den letzten Page Offset
//SS fuer Beschriftungen
void InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
const String& rNumberSeparator,
- const BOOL bBefore, const USHORT nId,
+ const sal_Bool bBefore, const sal_uInt16 nId,
const String& rCharacterStyle,
- const BOOL bCpyBrd = TRUE );
+ const sal_Bool bCpyBrd = sal_True );
//Das Lineal will auch noch etwas von uns wissen.
- USHORT GetCurColNum( SwGetCurColNumPara* pPara = 0 ) const; //0 == in keiner Spalte
- USHORT GetCurMouseColNum( const Point &rPt,
+ sal_uInt16 GetCurColNum( SwGetCurColNumPara* pPara = 0 ) const; //0 == in keiner Spalte
+ sal_uInt16 GetCurMouseColNum( const Point &rPt,
SwGetCurColNumPara* pPara = 0 ) const;
- USHORT GetCurTabColNum() const; //0 == in keiner Tabelle
- USHORT GetCurMouseTabColNum( const Point &rPt ) const;
- USHORT GetCurOutColNum( SwGetCurColNumPara* pPara = 0 ) const; // aktuelle aeussere Spalte
+ sal_uInt16 GetCurTabColNum() const; //0 == in keiner Tabelle
+ sal_uInt16 GetCurMouseTabColNum( const Point &rPt ) const;
+ sal_uInt16 GetCurOutColNum( SwGetCurColNumPara* pPara = 0 ) const; // aktuelle aeussere Spalte
- BOOL IsTableRightToLeft() const;
- BOOL IsMouseTableRightToLeft( const Point &rPt ) const;
- BOOL IsTableVertical() const;
+ sal_Bool IsTableRightToLeft() const;
+ sal_Bool IsMouseTableRightToLeft( const Point &rPt ) const;
+ sal_Bool IsTableVertical() const;
- BOOL IsLastCellInRow() const;
+ sal_Bool IsLastCellInRow() const;
// Die Breite des aktuellen Bereichs fuer Spaltendialog
long GetSectionWidth( SwFmt& rFmt ) const;
void GetConnectableFrmFmts
- (SwFrmFmt & rFmt, const String & rReference, BOOL bSuccessors,
+ (SwFrmFmt & rFmt, const String & rReference, sal_Bool bSuccessors,
::std::vector< String > & aPrevPageVec,
::std::vector< String > & aThisPageVec,
::std::vector< String > & aNextPageVec,
@@ -787,7 +787,7 @@ public:
// -> #i23726#
SwTxtNode * GetNumRuleNodeAtPos(const Point &rPot);
- BOOL IsNumLabel( const Point &rPt, int nMaxOffset = -1 );
+ sal_Bool IsNumLabel( const Point &rPt, int nMaxOffset = -1 );
// <- #i23726#
// --> OD 2005-02-21 #i42921#
bool IsVerticalModeAtNdAndPos( const SwTxtNode& _rTxtNode,
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index fd570f623eaf..fc375b3401c3 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -193,7 +193,7 @@ enum SwVarFormat
};
-typedef USHORT SwGetSetExpType;
+typedef sal_uInt16 SwGetSetExpType;
namespace nsSwGetSetExpType
{
const SwGetSetExpType GSE_STRING = 0x0001; // String
@@ -203,7 +203,7 @@ namespace nsSwGetSetExpType
const SwGetSetExpType GSE_FORMULA = 0x0010; // Formel
}
-typedef USHORT SwExtendedSubType;
+typedef sal_uInt16 SwExtendedSubType;
namespace nsSwExtendedSubType
{
const SwExtendedSubType SUB_CMD = 0x0100; // Kommando anzeigen
@@ -234,17 +234,17 @@ enum SwDateTimeSubType
};
-extern USHORT __FAR_DATA aTypeTab[];
+extern sal_uInt16 __FAR_DATA aTypeTab[];
/*--------------------------------------------------------------------
Beschreibung: Allgemeine Tools
--------------------------------------------------------------------*/
-String GetResult(double nVal, sal_uInt32 nNumFmt, USHORT nLang = LANGUAGE_SYSTEM);
+String GetResult(double nVal, sal_uInt32 nNumFmt, sal_uInt16 nLang = LANGUAGE_SYSTEM);
void SetErrorStr(const String& rStr);
-//String ExpandDate(const Date& rDate, ULONG nFmt, USHORT nLang);
-//String ExpandTime(const Time& rTime, ULONG nFmt, USHORT nLang);
-String FormatNumber(USHORT nNum, sal_uInt32 nFormat);
+//String ExpandDate(const Date& rDate, sal_uLong nFmt, sal_uInt16 nLang);
+//String ExpandTime(const Time& rTime, sal_uLong nFmt, sal_uInt16 nLang);
+String FormatNumber(sal_uInt16 nNum, sal_uInt32 nFormat);
/*--------------------------------------------------------------------
Beschreibung: Instanzen von SwFields und Abgeleiteten kommen 0-n mal vor.
@@ -257,7 +257,7 @@ DBG_NAMEEX(SwFieldType)
class SW_DLLPUBLIC SwFieldType : public SwModify
{
- USHORT nWhich;
+ sal_uInt16 nWhich;
friend void _FinitUI(); // um den Pointer zu loeschen!
static SvStringsDtor* pFldNames;
@@ -266,22 +266,22 @@ class SW_DLLPUBLIC SwFieldType : public SwModify
protected:
// single argument ctors shall be explicit.
- explicit SwFieldType( USHORT nWhichId );
+ explicit SwFieldType( sal_uInt16 nWhichId );
public:
#ifdef DBG_UTIL
virtual ~SwFieldType();
#endif
- static const String& GetTypeStr( USHORT nTypeId );
+ static const String& GetTypeStr( sal_uInt16 nTypeId );
// nur in abgeleiteten Klassen
virtual const String& GetName() const;
virtual SwFieldType* Copy() const = 0;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
- USHORT Which() const { return nWhich; }
+ sal_uInt16 Which() const { return nWhich; }
inline void UpdateFlds() const;
};
@@ -302,8 +302,8 @@ class SW_DLLPUBLIC SwField
{
private:
mutable String m_Cache; /// #i85766# cached expansion (for clipboard)
- USHORT nLang; // Immer ueber SetLanguage aendern!
- BOOL bIsAutomaticLanguage;
+ sal_uInt16 nLang; // Immer ueber SetLanguage aendern!
+ sal_Bool bIsAutomaticLanguage;
sal_uInt32 nFormat;
SwFieldType* pType;
@@ -314,7 +314,7 @@ private:
protected:
void SetFormat(sal_uInt32 nSet) {nFormat = nSet;}
- SwField(SwFieldType* pTyp, sal_uInt32 nFmt = 0, USHORT nLang = LANGUAGE_SYSTEM);
+ SwField(SwFieldType* pTyp, sal_uInt32 nFmt = 0, sal_uInt16 nLang = LANGUAGE_SYSTEM);
public:
virtual ~SwField();
@@ -340,7 +340,7 @@ public:
SwField * CopyField() const;
// ResId
- USHORT Which() const
+ sal_uInt16 Which() const
#ifndef DBG_UTIL
{ return pType->Which(); }
#else
@@ -348,13 +348,13 @@ public:
#endif
// TYP_ID
- USHORT GetTypeId() const;
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT);
+ sal_uInt16 GetTypeId() const;
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16);
// Sprache an der Feldposition
- inline USHORT GetLanguage() const;
- virtual void SetLanguage(USHORT nLng);
+ inline sal_uInt16 GetLanguage() const;
+ virtual void SetLanguage(sal_uInt16 nLng);
// Parameter fuer Dialog und BASIC erfragen
inline sal_uInt32 GetFormat() const;
@@ -367,15 +367,15 @@ public:
virtual void SetPar1(const String& rStr);
virtual void SetPar2(const String& rStr);
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
// hat das Feld eine Action auf dem ClickHandler ? (z.B. INetFelder,..)
- BOOL HasClickHdl() const;
+ sal_Bool HasClickHdl() const;
// ist es ein Fix-Feld?
- BOOL IsFixed() const;
+ sal_Bool IsFixed() const;
- BOOL IsAutomaticLanguage() const { return bIsAutomaticLanguage;}
- void SetAutomaticLanguage(BOOL bSet){bIsAutomaticLanguage = bSet;}
+ sal_Bool IsAutomaticLanguage() const { return bIsAutomaticLanguage;}
+ void SetAutomaticLanguage(sal_Bool bSet){bIsAutomaticLanguage = bSet;}
virtual String GetDescription() const;
};
@@ -386,7 +386,7 @@ inline SwFieldType* SwField::GetTyp() const
inline sal_uInt32 SwField::GetFormat() const
{ return nFormat; }
-inline USHORT SwField::GetLanguage() const
+inline sal_uInt16 SwField::GetLanguage() const
{ return nLang; }
/*--------------------------------------------------------------------
@@ -397,20 +397,20 @@ inline USHORT SwField::GetLanguage() const
class SwValueFieldType : public SwFieldType
{
SwDoc* pDoc;
- BOOL bUseFormat; // Numberformatter verwenden
+ sal_Bool bUseFormat; // Numberformatter verwenden
protected:
- SwValueFieldType( SwDoc* pDocPtr, USHORT nWhichId );
+ SwValueFieldType( SwDoc* pDocPtr, sal_uInt16 nWhichId );
SwValueFieldType( const SwValueFieldType& rTyp );
public:
inline SwDoc* GetDoc() const { return pDoc; }
inline void SetDoc(SwDoc* pNewDoc) { pDoc = pNewDoc; }
- inline BOOL UseFormat() const { return bUseFormat; }
- inline void EnableFormat(BOOL bFormat = TRUE) { bUseFormat = bFormat; }
+ inline sal_Bool UseFormat() const { return bUseFormat; }
+ inline void EnableFormat(sal_Bool bFormat = sal_True) { bUseFormat = bFormat; }
- String ExpandValue(const double& rVal, sal_uInt32 nFmt, USHORT nLng=0) const;
+ String ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 nLng=0) const;
void DoubleToString(String &rValue, const double &rVal, LanguageType eLng) const;
void DoubleToString(String &rValue, const double &rVal, sal_uInt32 nFmt) const;
};
@@ -421,23 +421,23 @@ class SW_DLLPUBLIC SwValueField : public SwField
// String sExpand;
protected:
- SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, USHORT nLang = LANGUAGE_SYSTEM, const double fVal = 0.0 );
+ SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, sal_uInt16 nLang = LANGUAGE_SYSTEM, const double fVal = 0.0 );
SwValueField( const SwValueField& rFld );
public:
virtual ~SwValueField();
virtual SwFieldType* ChgTyp( SwFieldType* );
- virtual void SetLanguage(USHORT nLng);
+ virtual void SetLanguage(sal_uInt16 nLng);
// os: wozu war das denn da?
-// virtual void ChangeFormat(ULONG n);
+// virtual void ChangeFormat(sal_uLong n);
inline SwDoc* GetDoc() const { return ((SwValueFieldType*)GetTyp())->GetDoc(); }
virtual double GetValue() const;
virtual void SetValue( const double& rVal );
- inline String ExpandValue(const double& rVal, sal_uInt32 nFmt, USHORT nLng=0) const
+ inline String ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 nLng=0) const
{ return ((SwValueFieldType*)GetTyp())->ExpandValue(rVal, nFmt, nLng); }
static sal_uInt32 GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFmt);
diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx
index 1196f0f1264d..b5f7292d32ba 100644
--- a/sw/inc/flddat.hxx
+++ b/sw/inc/flddat.hxx
@@ -112,37 +112,37 @@ public:
class SW_DLLPUBLIC SwDateTimeField : public SwValueField
{
- USHORT nSubType;
+ sal_uInt16 nSubType;
long nOffset; // Offset in Minuten
virtual String Expand() const;
virtual SwField* Copy() const;
public:
- SwDateTimeField(SwDateTimeFieldType* pType, USHORT nSubType = DATEFLD,
- ULONG nFmt = 0, USHORT nLng = 0);
+ SwDateTimeField(SwDateTimeFieldType* pType, sal_uInt16 nSubType = DATEFLD,
+ sal_uLong nFmt = 0, sal_uInt16 nLng = 0);
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nSub);
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
virtual double GetValue() const;
virtual void SetPar2(const String& rStr);
virtual String GetPar2() const;
- inline BOOL IsDate() const
+ inline sal_Bool IsDate() const
{ return (nSubType & DATEFLD) != 0; }
inline void SetOffset(long nMinutes) { nOffset = nMinutes; }
inline long GetOffset() const { return nOffset; }
- Date GetDate(BOOL bUseOffset = FALSE) const;
- Time GetTime(BOOL bUseOffset = FALSE) const;
+ Date GetDate(sal_Bool bUseOffset = sal_False) const;
+ Time GetTime(sal_Bool bUseOffset = sal_False) const;
void SetDateTime(const DateTime& rDT);
static double GetDateTime(SwDoc* pDoc, const DateTime& rDT);
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nMId ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nMId );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nMId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nMId );
};
#endif // SW_FLDDAT_HXX
diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx
index e3e40a82b940..b18a8fa22b9b 100644
--- a/sw/inc/flddropdown.hxx
+++ b/sw/inc/flddropdown.hxx
@@ -220,10 +220,10 @@ public:
@param rItem the item to be set
- @retval TRUE the selected item was successfully set
- @retval TRUE failure (empty selection)
+ @retval sal_True the selected item was successfully set
+ @retval sal_True failure (empty selection)
*/
- BOOL SetSelectedItem(const String & rItem);
+ sal_Bool SetSelectedItem(const String & rItem);
/**
Sets the name of the field.
@@ -256,7 +256,7 @@ public:
- FIELD_PROP_PAR3 Get the help text of the field.
- FIELD_PROP_PAR4 Get the tool tip of the field.
*/
- virtual BOOL QueryValue(com::sun::star::uno::Any &rVal, USHORT nWhichId) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any &rVal, sal_uInt16 nWhichId) const;
/**
API: Sets a property value on the dropdown field.
@@ -268,7 +268,7 @@ public:
- FIELD_PROP_PAR3 Set the help text of the field.
- FIELD_PROP_PAR4 Set the tool tip of the field.
*/
- virtual BOOL PutValue(const com::sun::star::uno::Any &rVal, USHORT nWhichId);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any &rVal, sal_uInt16 nWhichId);
};
#endif
diff --git a/sw/inc/flypos.hxx b/sw/inc/flypos.hxx
index c2ebb0d81950..488e49ad2f9e 100644
--- a/sw/inc/flypos.hxx
+++ b/sw/inc/flypos.hxx
@@ -40,18 +40,18 @@ class SW_DLLPUBLIC SwPosFlyFrm
const SwFrmFmt* pFrmFmt; // das FlyFrmFmt
// SwPosition* pPos; // Position in den ContentNode
SwNodeIndex* pNdIdx; // es reicht ein Index auf den Node
- UINT32 nOrdNum;
+ sal_uInt32 nOrdNum;
public:
- SwPosFlyFrm( const SwNodeIndex& , const SwFrmFmt*, USHORT nArrPos );
+ SwPosFlyFrm( const SwNodeIndex& , const SwFrmFmt*, sal_uInt16 nArrPos );
virtual ~SwPosFlyFrm(); // virtual fuer die Writer (DLL !!)
// operatoren fuer das Sort-Array
- BOOL operator==( const SwPosFlyFrm& );
- BOOL operator<( const SwPosFlyFrm& );
+ sal_Bool operator==( const SwPosFlyFrm& );
+ sal_Bool operator<( const SwPosFlyFrm& );
const SwFrmFmt& GetFmt() const { return *pFrmFmt; }
const SwNodeIndex& GetNdIndex() const { return *pNdIdx; }
- UINT32 GetOrdNum() const { return nOrdNum; }
+ sal_uInt32 GetOrdNum() const { return nOrdNum; }
};
typedef SwPosFlyFrm* SwPosFlyFrmPtr;
diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx
index 3b505952e4d9..3c91bad86b60 100644
--- a/sw/inc/fmtanchr.hxx
+++ b/sw/inc/fmtanchr.hxx
@@ -35,7 +35,7 @@
struct SwPosition;
class IntlWrapper;
-#define IVER_FMTANCHOR_LONGIDX ((USHORT)1)
+#define IVER_FMTANCHOR_LONGIDX ((sal_uInt16)1)
//FlyAnchor, Anker des Freifliegenden Rahmen ----
@@ -45,14 +45,14 @@ class SW_DLLPUBLIC SwFmtAnchor: public SfxPoolItem
//Index fuer Absatzgebundene Rahmen.
//Position fuer Zeichengebundene Rahmen
RndStdIds nAnchorId;
- USHORT nPageNum; //Seitennummer bei Seitengeb. Rahmen.
+ sal_uInt16 nPageNum; //Seitennummer bei Seitengeb. Rahmen.
// OD 2004-05-05 #i28701# - getting anchor positions ordered
sal_uInt32 mnOrder;
static sal_uInt32 mnOrderCounter;
public:
- SwFmtAnchor( RndStdIds eRnd = FLY_AT_PAGE, USHORT nPageNum = 0 );
+ SwFmtAnchor( RndStdIds eRnd = FLY_AT_PAGE, sal_uInt16 nPageNum = 0 );
SwFmtAnchor( const SwFmtAnchor &rCpy );
~SwFmtAnchor();
@@ -68,24 +68,24 @@ public:
String &rText,
const IntlWrapper* pIntl = 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 );
RndStdIds GetAnchorId() const { return nAnchorId; }
- USHORT GetPageNum() const { return nPageNum; }
+ sal_uInt16 GetPageNum() const { return nPageNum; }
const SwPosition *GetCntntAnchor() const { return pCntntAnchor; }
// OD 2004-05-05 #i28701#
sal_uInt32 GetOrder() const;
void SetType( RndStdIds nRndId ) { nAnchorId = nRndId; }
- void SetPageNum( USHORT nNew ) { nPageNum = nNew; }
+ void SetPageNum( sal_uInt16 nNew ) { nPageNum = nNew; }
void SetAnchor( const SwPosition *pPos );
};
-inline const SwFmtAnchor &SwAttrSet::GetAnchor(BOOL bInP) const
+inline const SwFmtAnchor &SwAttrSet::GetAnchor(sal_Bool bInP) const
{ return static_cast<const SwFmtAnchor&>(Get(RES_ANCHOR, bInP)); }
- inline const SwFmtAnchor &SwFmt::GetAnchor(BOOL bInP) const
+ inline const SwFmtAnchor &SwFmt::GetAnchor(sal_Bool bInP) const
{ return aSet.GetAnchor(bInP); }
#endif
diff --git a/sw/inc/fmtautofmt.hxx b/sw/inc/fmtautofmt.hxx
index a230943f2ab0..ce16b775b82d 100644
--- a/sw/inc/fmtautofmt.hxx
+++ b/sw/inc/fmtautofmt.hxx
@@ -40,7 +40,7 @@ class SwFmtAutoFmt: public SfxPoolItem
boost::shared_ptr<SfxItemSet> mpHandle;
public:
- SwFmtAutoFmt( USHORT nWhich = RES_TXTATR_AUTOFMT );
+ SwFmtAutoFmt( sal_uInt16 nWhich = RES_TXTATR_AUTOFMT );
// single argument ctors shall be explicit.
virtual ~SwFmtAutoFmt();
@@ -63,8 +63,8 @@ public:
String &rText,
const IntlWrapper* pIntl = 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 SetStyleHandle( boost::shared_ptr<SfxItemSet> pHandle ) { mpHandle = pHandle; }
const boost::shared_ptr<SfxItemSet> GetStyleHandle() const { return mpHandle; }
diff --git a/sw/inc/fmtclbl.hxx b/sw/inc/fmtclbl.hxx
index 63dbe1f57dc6..8feb5293c141 100644
--- a/sw/inc/fmtclbl.hxx
+++ b/sw/inc/fmtclbl.hxx
@@ -36,7 +36,7 @@
class SW_DLLPUBLIC SwFmtNoBalancedColumns : public SfxBoolItem
{
public:
- SwFmtNoBalancedColumns( BOOL bFlag = FALSE )
+ SwFmtNoBalancedColumns( sal_Bool bFlag = sal_False )
: SfxBoolItem( RES_COLUMNBALANCE, bFlag ) {}
// "pure virtual Methoden" vom SfxPoolItem
@@ -44,10 +44,10 @@ public:
};
-inline const SwFmtNoBalancedColumns &SwAttrSet::GetBalancedColumns(BOOL bInP) const
+inline const SwFmtNoBalancedColumns &SwAttrSet::GetBalancedColumns(sal_Bool bInP) const
{ return (const SwFmtNoBalancedColumns&)Get( RES_COLUMNBALANCE, bInP ); }
-inline const SwFmtNoBalancedColumns &SwFmt::GetBalancedColumns(BOOL bInP) const
+inline const SwFmtNoBalancedColumns &SwFmt::GetBalancedColumns(sal_Bool bInP) const
{ return aSet.GetBalancedColumns( bInP ); }
#endif
diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx
index 1efcd900f358..8a649ed5b80f 100644
--- a/sw/inc/fmtclds.hxx
+++ b/sw/inc/fmtclds.hxx
@@ -37,31 +37,31 @@
class SwColumn
{
- USHORT nWish; //Wunschbreite incl. Raender.
+ sal_uInt16 nWish; //Wunschbreite incl. Raender.
//Verhaelt sich proportional zum Verhaeltniss:
//Wunschbreite der Umgebung / aktuelle Breite der Spalte
- USHORT nUpper; //Oberer Rand
- USHORT nLower; //Unterer Rand
- USHORT nLeft; //Linker Rand
- USHORT nRight; //Rechter Rand
+ sal_uInt16 nUpper; //Oberer Rand
+ sal_uInt16 nLower; //Unterer Rand
+ sal_uInt16 nLeft; //Linker Rand
+ sal_uInt16 nRight; //Rechter Rand
public:
SwColumn();
- BOOL operator==( const SwColumn & );
+ sal_Bool operator==( const SwColumn & );
- void SetWishWidth( USHORT nNew ) { nWish = nNew; }
- void SetUpper( USHORT nNew ) { nUpper = nNew; }
- void SetLower( USHORT nNew ) { nLower = nNew; }
- void SetLeft ( USHORT nNew ) { nLeft = nNew; }
- void SetRight( USHORT nNew ) { nRight = nNew; }
+ void SetWishWidth( sal_uInt16 nNew ) { nWish = nNew; }
+ void SetUpper( sal_uInt16 nNew ) { nUpper = nNew; }
+ void SetLower( sal_uInt16 nNew ) { nLower = nNew; }
+ void SetLeft ( sal_uInt16 nNew ) { nLeft = nNew; }
+ void SetRight( sal_uInt16 nNew ) { nRight = nNew; }
- USHORT GetWishWidth() const { return nWish; }
- USHORT GetUpper() const { return nUpper; }
- USHORT GetLower() const { return nLower; }
- USHORT GetLeft () const { return nLeft; }
- USHORT GetRight() const { return nRight; }
+ sal_uInt16 GetWishWidth() const { return nWish; }
+ sal_uInt16 GetUpper() const { return nUpper; }
+ sal_uInt16 GetLower() const { return nLower; }
+ sal_uInt16 GetLeft () const { return nLeft; }
+ sal_uInt16 GetRight() const { return nRight; }
};
typedef SwColumn* SwColumnPtr;
@@ -78,17 +78,17 @@ enum SwColLineAdj
class SW_DLLPUBLIC SwFmtCol : public SfxPoolItem
{
// Pen aPen; //Pen fuer die Linine zwischen den Spalten
- ULONG nLineWidth; //width of the separator line
+ sal_uLong nLineWidth; //width of the separator line
Color aLineColor; //color of the separator line
- BYTE nLineHeight; //Prozentuale Hoehe der Linien
+ sal_uInt8 nLineHeight; //Prozentuale Hoehe der Linien
//(Relativ zu der Hoehe der Spalten incl. UL).
SwColLineAdj eAdj; //Linie wird oben, mittig oder unten ausgerichtet.
SwColumns aColumns; //Informationen fuer die einzelnen Spalten.
- USHORT nWidth; //Gesamtwunschbreite aller Spalten.
+ sal_uInt16 nWidth; //Gesamtwunschbreite aller Spalten.
- BOOL bOrtho; //Nur wenn dieses Flag gesetzt ist wird beim setzen
+ sal_Bool bOrtho; //Nur wenn dieses Flag gesetzt ist wird beim setzen
//der GutterWidth eine 'optische Verteilung'
//vorgenommen.
//Es muss zurueckgesetzt werden wenn an den
@@ -97,7 +97,7 @@ class SW_DLLPUBLIC SwFmtCol : public SfxPoolItem
//gemischt (optisch verteilt).
//Das Flag ist initial gesetzt.
- SW_DLLPRIVATE void Calc( USHORT nGutterWidth, USHORT nAct );
+ SW_DLLPRIVATE void Calc( sal_uInt16 nGutterWidth, sal_uInt16 nAct );
public:
SwFmtCol();
@@ -115,64 +115,64 @@ public:
String &rText,
const IntlWrapper* pIntl = 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 );
const SwColumns &GetColumns() const { return aColumns; }
SwColumns &GetColumns() { return aColumns; }
- USHORT GetNumCols() const { return aColumns.Count(); }
+ sal_uInt16 GetNumCols() const { return aColumns.Count(); }
// const Pen& GetLinePen() const { return aPen; }
- ULONG GetLineWidth() const { return nLineWidth;}
+ sal_uLong GetLineWidth() const { return nLineWidth;}
const Color& GetLineColor() const { return aLineColor;}
SwColLineAdj GetLineAdj() const { return eAdj; }
- BOOL IsOrtho() const { return bOrtho; }
- USHORT GetWishWidth() const { return nWidth; }
- BYTE GetLineHeight()const { return nLineHeight; }
+ sal_Bool IsOrtho() const { return bOrtho; }
+ sal_uInt16 GetWishWidth() const { return nWidth; }
+ sal_uInt8 GetLineHeight()const { return nLineHeight; }
//Return USHRT_MAX wenn uneindeutig.
//Return die kleinste Breite wenn bMin True ist.
- USHORT GetGutterWidth( BOOL bMin = FALSE ) const;
+ sal_uInt16 GetGutterWidth( sal_Bool bMin = sal_False ) const;
// void SetLinePen( const Pen& rNew ) { aPen = rNew; }
- void SetLineWidth(ULONG nLWidth) { nLineWidth = nLWidth;}
+ void SetLineWidth(sal_uLong nLWidth) { nLineWidth = nLWidth;}
void SetLineColor(const Color& rCol ) { aLineColor = rCol;}
- void SetLineHeight( BYTE nNew ) { nLineHeight = nNew; }
+ void SetLineHeight( sal_uInt8 nNew ) { nLineHeight = nNew; }
void SetLineAdj( SwColLineAdj eNew ){ eAdj = eNew; }
- void SetWishWidth( USHORT nNew ) { nWidth = nNew; }
+ void SetWishWidth( sal_uInt16 nNew ) { nWidth = nNew; }
//Mit dieser Funktion koennen die Spalten (immer wieder) initialisert
//werden. Das Ortho Flag wird automatisch gesetzt.
- void Init( USHORT nNumCols, USHORT nGutterWidth, USHORT nAct );
+ void Init( sal_uInt16 nNumCols, sal_uInt16 nGutterWidth, sal_uInt16 nAct );
//Stellt die Raender fuer die Spalten in aColumns ein.
//Wenn das Flag bOrtho gesetzt ist, werden die Spalten neu optisch
//verteilt. Ist das Flag nicht gesetzt werden die Spaltenbreiten nicht
//veraendert und die Raender werden einfach eingestellt.
- void SetGutterWidth( USHORT nNew, USHORT nAct );
+ void SetGutterWidth( sal_uInt16 nNew, sal_uInt16 nAct );
//Verteilt ebenfalls automatisch neu wenn das Flag gesetzt wird;
//nur dann wird auch der zweite Param. benoetigt und beachtet.
- void SetOrtho( BOOL bNew, USHORT nGutterWidth, USHORT nAct );
+ void SetOrtho( sal_Bool bNew, sal_uInt16 nGutterWidth, sal_uInt16 nAct );
//Fuer den Reader
- void _SetOrtho( BOOL bNew ) { bOrtho = bNew; }
+ void _SetOrtho( sal_Bool bNew ) { bOrtho = bNew; }
//Berechnet die aktuelle Breite der Spalte nCol.
//Das Verhaeltniss von Wunschbreite der Spalte zum Returnwert ist
//proportional zum Verhaeltniss des Gesamtwunschwertes zu nAct.
- USHORT CalcColWidth( USHORT nCol, USHORT nAct ) const;
+ sal_uInt16 CalcColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const;
//Wie oben, aber es wir die Breite der PrtArea - also das was fuer
//den Anwender die Spalte ist - geliefert.
- USHORT CalcPrtColWidth( USHORT nCol, USHORT nAct ) const;
+ sal_uInt16 CalcPrtColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const;
};
-inline const SwFmtCol &SwAttrSet::GetCol(BOOL bInP) const
+inline const SwFmtCol &SwAttrSet::GetCol(sal_Bool bInP) const
{ return (const SwFmtCol&)Get( RES_COL,bInP); }
-inline const SwFmtCol &SwFmt::GetCol(BOOL bInP) const
+inline const SwFmtCol &SwFmt::GetCol(sal_Bool bInP) const
{ return aSet.GetCol(bInP); }
#endif
diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx
index 55e2212985c0..28252ff1c99c 100644
--- a/sw/inc/fmtcnct.hxx
+++ b/sw/inc/fmtcnct.hxx
@@ -59,7 +59,7 @@ public:
String &rText,
const IntlWrapper* pIntl = 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;
SwFlyFrmFmt* GetPrev() const { return (SwFlyFrmFmt*)aPrev.GetRegisteredIn(); }
SwFlyFrmFmt* GetNext() const { return (SwFlyFrmFmt*)aNext.GetRegisteredIn(); }
@@ -77,10 +77,10 @@ SwFmtChain &SwFmtChain::operator=( const SwFmtChain &rCpy )
}
-inline const SwFmtChain &SwAttrSet::GetChain(BOOL bInP) const
+inline const SwFmtChain &SwAttrSet::GetChain(sal_Bool bInP) const
{ return (const SwFmtChain&)Get( RES_CHAIN,bInP); }
-inline const SwFmtChain &SwFmt::GetChain(BOOL bInP) const
+inline const SwFmtChain &SwFmt::GetChain(sal_Bool bInP) const
{ return aSet.GetChain(bInP); }
#endif
diff --git a/sw/inc/fmtcntnt.hxx b/sw/inc/fmtcntnt.hxx
index 0f8449cac766..af4e8a3f3b8f 100644
--- a/sw/inc/fmtcntnt.hxx
+++ b/sw/inc/fmtcntnt.hxx
@@ -56,10 +56,10 @@ public:
void SetNewCntntIdx( const SwNodeIndex *pIdx );
};
-inline const SwFmtCntnt &SwAttrSet::GetCntnt(BOOL bInP) const
+inline const SwFmtCntnt &SwAttrSet::GetCntnt(sal_Bool bInP) const
{ return (const SwFmtCntnt&)Get( RES_CNTNT,bInP); }
-inline const SwFmtCntnt &SwFmt::GetCntnt(BOOL bInP) const
+inline const SwFmtCntnt &SwFmt::GetCntnt(sal_Bool bInP) const
{ return aSet.GetCntnt(bInP); }
#endif
diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx
index aba9b8533c0a..f7725cb6294a 100644
--- a/sw/inc/fmtcol.hxx
+++ b/sw/inc/fmtcol.hxx
@@ -38,16 +38,16 @@ class SwFmtColl : public SwFmt
{
protected:
SwFmtColl( SwAttrPool& rPool, const sal_Char* pFmtName,
- const USHORT* pWhichRanges, SwFmtColl* pDerFrom,
- USHORT nFmtWhich )
+ const sal_uInt16* pWhichRanges, SwFmtColl* pDerFrom,
+ sal_uInt16 nFmtWhich )
: SwFmt( rPool, pFmtName, pWhichRanges, pDerFrom, nFmtWhich )
- { SetAuto( FALSE ); }
+ { SetAuto( sal_False ); }
SwFmtColl( SwAttrPool& rPool, const String &rFmtName,
- const USHORT* pWhichRanges, SwFmtColl* pDerFrom,
- USHORT nFmtWhich )
+ const sal_uInt16* pWhichRanges, SwFmtColl* pDerFrom,
+ sal_uInt16 nFmtWhich )
: SwFmt( rPool, rFmtName, pWhichRanges, pDerFrom, nFmtWhich )
- { SetAuto( FALSE ); }
+ { SetAuto( sal_False ); }
private:
@@ -68,14 +68,14 @@ class SW_DLLPUBLIC SwTxtFmtColl: public SwFmtColl
// <--
protected:
- //BYTE nOutlineLevel; //<-#outline level, removed by zhaojianwei
+ //sal_uInt8 nOutlineLevel; //<-#outline level, removed by zhaojianwei
bool mbAssignedToOutlineStyle;//<-#outline level added by zhaojianwei
SwTxtFmtColl *pNextTxtFmtColl;
SwTxtFmtColl( SwAttrPool& rPool, const sal_Char* pFmtCollName,
SwTxtFmtColl* pDerFrom = 0,
- USHORT nFmtWh = RES_TXTFMTCOLL )
+ sal_uInt16 nFmtWh = RES_TXTFMTCOLL )
: SwFmtColl( rPool, pFmtCollName, aTxtFmtCollSetRange,
pDerFrom, nFmtWh ),
// --> OD 2007-01-24 #i73790#
@@ -87,7 +87,7 @@ protected:
SwTxtFmtColl( SwAttrPool& rPool, const String &rFmtCollName,
SwTxtFmtColl* pDerFrom = 0,
- USHORT nFmtWh = RES_TXTFMTCOLL )
+ sal_uInt16 nFmtWh = RES_TXTFMTCOLL )
: SwFmtColl( rPool, rFmtCollName, aTxtFmtCollSetRange,
pDerFrom, nFmtWh ),
// --> OD 2007-01-24 #i73790#
@@ -106,7 +106,7 @@ public:
inline void SetNextTxtFmtColl(SwTxtFmtColl& rNext);
SwTxtFmtColl& GetNextTxtFmtColl() const { return *pNextTxtFmtColl; }
- BOOL IsAtDocNodeSet() const;
+ sal_Bool IsAtDocNodeSet() const;
// --> OD 2006-11-22 #i71574#
//<-#outline level,zhaojianwei
@@ -125,14 +125,14 @@ public:
// --> OD 2008-03-04 #refactorlists#
// override to recognize changes on the <SwNumRuleItem> and register/unregister
// the paragragh style at the corresponding <SwNumRule> instance
- virtual BOOL SetFmtAttr( const SfxPoolItem& rAttr );
- virtual BOOL SetFmtAttr( const SfxItemSet& rSet );
- virtual BOOL ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
+ virtual sal_Bool SetFmtAttr( const SfxPoolItem& rAttr );
+ virtual sal_Bool SetFmtAttr( const SfxItemSet& rSet );
+ virtual sal_Bool ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
// <--
// --> OD 2007-01-24 #i73790#
// override <ResetAllFmtAttr()> to stay assigned to list level of outline style
- virtual USHORT ResetAllFmtAttr();
+ virtual sal_uInt16 ResetAllFmtAttr();
inline bool StayAssignedToListLevelOfOutlineStyle() const
{
@@ -152,15 +152,15 @@ public:
Attset fuer die Char-Attribute angelegt werden; damit die Vererbung
und der Zugriff auf die gesetzen Attribute richtig funktioniert!!
- virtual BOOL SetDerivedFrom( SwFmtColl* pDerFrom = 0 );
+ virtual sal_Bool SetDerivedFrom( SwFmtColl* pDerFrom = 0 );
inline SwCharFmt* GetCharFmt() const;
- inline BOOL IsCharFmtSet() const;
+ inline sal_Bool IsCharFmtSet() const;
void SetCharFmt(SwCharFmt *);
void ResetCharFmt();
-inline BOOL SwTxtFmtColl::IsCharFmtSet() const
+inline sal_Bool SwTxtFmtColl::IsCharFmtSet() const
{
- return aCharDepend.GetRegisteredIn() ? TRUE : FALSE;
+ return aCharDepend.GetRegisteredIn() ? sal_True : sal_False;
}
inline SwCharFmt* SwTxtFmtColl::GetCharFmt() const
{
@@ -220,10 +220,10 @@ enum Master_CollConditions
class SW_DLLPUBLIC SwCollCondition : public SwClient
{
- ULONG nCondition;
+ sal_uLong nCondition;
union
{
- ULONG nSubCondition;
+ sal_uLong nSubCondition;
String* pFldExpression;
} aSubCondition;
@@ -231,9 +231,9 @@ public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
- SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond,
- ULONG nSubCond = 0 );
- SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond,
+ SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond,
+ sal_uLong nSubCond = 0 );
+ SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond,
const String& rSubExp );
virtual ~SwCollCondition();
@@ -248,12 +248,12 @@ public:
int operator!=( const SwCollCondition& rCmp ) const
{ return ! (*this == rCmp); }
- ULONG GetCondition() const { return nCondition; }
- ULONG GetSubCondition() const { return aSubCondition.nSubCondition; }
+ sal_uLong GetCondition() const { return nCondition; }
+ sal_uLong GetSubCondition() const { return aSubCondition.nSubCondition; }
const String* GetFldExpression() const
{ return aSubCondition.pFldExpression; }
- void SetCondition( ULONG nCond, ULONG nSubCond );
+ void SetCondition( sal_uLong nCond, sal_uLong nSubCond );
SwTxtFmtColl* GetTxtFmtColl() const { return (SwTxtFmtColl*)GetRegisteredIn(); }
};
@@ -287,7 +287,7 @@ public:
const SwCollCondition* HasCondition( const SwCollCondition& rCond ) const;
const SwFmtCollConditions& GetCondColls() const { return aCondColls; }
void InsertCondition( const SwCollCondition& rCond );
- BOOL RemoveCondition( const SwCollCondition& rCond );
+ sal_Bool RemoveCondition( const SwCollCondition& rCond );
void SetConditions( const SwFmtCollConditions& );
};
diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx
index b3b98373905e..476708948e60 100644
--- a/sw/inc/fmteiro.hxx
+++ b/sw/inc/fmteiro.hxx
@@ -38,8 +38,8 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtEditInReadonly : public SfxBoolItem
{
public:
- SwFmtEditInReadonly( USHORT nId = RES_EDIT_IN_READONLY,
- BOOL bPrt = FALSE ) : SfxBoolItem( nId, bPrt ) {}
+ SwFmtEditInReadonly( sal_uInt16 nId = RES_EDIT_IN_READONLY,
+ sal_Bool bPrt = sal_False ) : SfxBoolItem( nId, bPrt ) {}
// "pure virtual Methoden" vom SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -50,10 +50,10 @@ public:
const IntlWrapper* pIntl = 0 ) const;
};
-inline const SwFmtEditInReadonly &SwAttrSet::GetEditInReadonly(BOOL bInP) const
+inline const SwFmtEditInReadonly &SwAttrSet::GetEditInReadonly(sal_Bool bInP) const
{ return (const SwFmtEditInReadonly&)Get( RES_EDIT_IN_READONLY,bInP); }
-inline const SwFmtEditInReadonly &SwFmt::GetEditInReadonly(BOOL bInP) const
+inline const SwFmtEditInReadonly &SwFmt::GetEditInReadonly(sal_Bool bInP) const
{ return aSet.GetEditInReadonly(bInP); }
#endif
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index 0e1932f9605b..a6289406c505 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -69,7 +69,7 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
- virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
const SwField *GetFld() const { return pField; }
SwField *GetFld() { return pField; }
@@ -87,8 +87,8 @@ public:
const SwTxtFld *GetTxtFld() const { return pTxtAttr; }
SwTxtFld *GetTxtFld() { return pTxtAttr; }
- BOOL IsFldInDoc() const;
- BOOL IsProtect() const;
+ sal_Bool IsFldInDoc() const;
+ sal_Bool IsProtect() const;
};
class SW_DLLPUBLIC SwFmtFldHint : public SfxHint
diff --git a/sw/inc/fmtfollowtextflow.hxx b/sw/inc/fmtfollowtextflow.hxx
index 5a5792978c93..878b59e5ccf6 100644
--- a/sw/inc/fmtfollowtextflow.hxx
+++ b/sw/inc/fmtfollowtextflow.hxx
@@ -38,7 +38,7 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtFollowTextFlow : public SfxBoolItem
{
public:
- SwFmtFollowTextFlow( BOOL bFlag = FALSE )
+ SwFmtFollowTextFlow( sal_Bool bFlag = sal_False )
: SfxBoolItem( RES_FOLLOW_TEXT_FLOW, bFlag ) {}
TYPEINFO();
@@ -55,10 +55,10 @@ public:
#if !(defined(MACOSX) && ( __GNUC__ < 3 ))
// GrP moved to gcc_outl.cxx; revisit with gcc3
-inline const SwFmtFollowTextFlow &SwAttrSet::GetFollowTextFlow(BOOL bInP) const
+inline const SwFmtFollowTextFlow &SwAttrSet::GetFollowTextFlow(sal_Bool bInP) const
{ return (const SwFmtFollowTextFlow&)Get( RES_FOLLOW_TEXT_FLOW, bInP ); }
-inline const SwFmtFollowTextFlow &SwFmt::GetFollowTextFlow(BOOL bInP) const
+inline const SwFmtFollowTextFlow &SwFmt::GetFollowTextFlow(sal_Bool bInP) const
{ return aSet.GetFollowTextFlow( bInP ); }
#endif
diff --git a/sw/inc/fmtfordr.hxx b/sw/inc/fmtfordr.hxx
index a79788555c72..04647edc1e68 100644
--- a/sw/inc/fmtfordr.hxx
+++ b/sw/inc/fmtfordr.hxx
@@ -51,7 +51,7 @@ public:
// "pure virtual Methoden" vom SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
SwFillOrder GetFillOrder() const { return SwFillOrder(GetValue()); }
};
@@ -62,10 +62,10 @@ inline SwFmtFillOrder &SwFmtFillOrder::operator=( const SwFmtFillOrder &rCpy )
return *this;
}
-inline const SwFmtFillOrder &SwAttrSet::GetFillOrder(BOOL bInP) const
+inline const SwFmtFillOrder &SwAttrSet::GetFillOrder(sal_Bool bInP) const
{ return (const SwFmtFillOrder&)Get( RES_FILL_ORDER,bInP); }
-inline const SwFmtFillOrder &SwFmt::GetFillOrder(BOOL bInP) const
+inline const SwFmtFillOrder &SwFmt::GetFillOrder(sal_Bool bInP) const
{ return aSet.GetFillOrder(bInP); }
#endif
diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx
index df6d99910e91..ec3b7458ef6a 100644
--- a/sw/inc/fmtfsize.hxx
+++ b/sw/inc/fmtfsize.hxx
@@ -52,8 +52,8 @@ class SW_DLLPUBLIC SwFmtFrmSize: public SfxPoolItem
Size aSize;
SwFrmSize eFrmHeightType;
SwFrmSize eFrmWidthType;
- BYTE nWidthPercent; //Fuer Tabellen kann die Breite in Prozent
- BYTE nHeightPercent; //angegeben sein.
+ sal_uInt8 nWidthPercent; //Fuer Tabellen kann die Breite in Prozent
+ sal_uInt8 nHeightPercent; //angegeben sein.
//Fuer Rahmen koennen Hoehe und/oder Breite
//in Prozent angegeben sein. Wenn nur eine
//der Angaben in Prozent angeben ist, kann
@@ -80,8 +80,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 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 );
SwFrmSize GetHeightSizeType() const { return eFrmHeightType; }
void SetHeightSizeType( SwFrmSize eSize ) { eFrmHeightType = eSize; }
@@ -97,16 +97,16 @@ public:
void SetHeight( const SwTwips nNew ) { aSize.Height() = nNew; }
void SetWidth ( const SwTwips nNew ) { aSize.Width() = nNew; }
- BYTE GetHeightPercent() const{ return nHeightPercent; }
- BYTE GetWidthPercent() const { return nWidthPercent; }
- void SetHeightPercent( BYTE n ) { nHeightPercent = n; }
- void SetWidthPercent ( BYTE n ) { nWidthPercent = n; }
+ sal_uInt8 GetHeightPercent() const{ return nHeightPercent; }
+ sal_uInt8 GetWidthPercent() const { return nWidthPercent; }
+ void SetHeightPercent( sal_uInt8 n ) { nHeightPercent = n; }
+ void SetWidthPercent ( sal_uInt8 n ) { nWidthPercent = n; }
};
-inline const SwFmtFrmSize &SwAttrSet::GetFrmSize(BOOL bInP) const
+inline const SwFmtFrmSize &SwAttrSet::GetFrmSize(sal_Bool bInP) const
{ return (const SwFmtFrmSize&)Get( RES_FRM_SIZE,bInP); }
-inline const SwFmtFrmSize &SwFmt::GetFrmSize(BOOL bInP) const
+inline const SwFmtFrmSize &SwFmt::GetFrmSize(sal_Bool bInP) const
{ return aSet.GetFrmSize(bInP); }
#endif
diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx
index 381703302585..9a470ddfa1df 100644
--- a/sw/inc/fmtftn.hxx
+++ b/sw/inc/fmtftn.hxx
@@ -41,7 +41,7 @@ class SW_DLLPUBLIC SwFmtFtn: public SfxPoolItem
friend class SwTxtFtn;
SwTxtFtn* pTxtAttr; //mein TextAttribut
String aNumber; //Benutzerdefinierte 'Nummer'
- USHORT nNumber; //Automatische Nummerierung
+ sal_uInt16 nNumber; //Automatische Nummerierung
bool m_bEndNote; // is it an End note?
// geschuetzter CopyCtor
@@ -57,11 +57,11 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
const String &GetNumStr() const { return aNumber; }
- const USHORT &GetNumber() const { return nNumber; }
+ const sal_uInt16 &GetNumber() const { return nNumber; }
bool IsEndNote() const { return m_bEndNote;}
void SetNumStr( const String& rStr ) { aNumber = rStr; }
- void SetNumber( USHORT nNo ) { nNumber = nNo; }
+ void SetNumber( sal_uInt16 nNo ) { nNumber = nNo; }
void SetEndNote( bool b );
void SetNumber( const SwFmtFtn& rFtn )
@@ -73,7 +73,7 @@ public:
void GetFtnText( String& rStr ) const;
// returnt den anzuzeigenden String der Fuss-/Endnote
- String GetViewNumStr( const SwDoc& rDoc, BOOL bInclStrs = FALSE ) const;
+ String GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrs = sal_False ) const;
};
diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx
index f44cbc0f12c5..f3472108de97 100644
--- a/sw/inc/fmtftntx.hxx
+++ b/sw/inc/fmtftntx.hxx
@@ -48,11 +48,11 @@ class SW_DLLPUBLIC SwFmtFtnEndAtTxtEnd : public SfxEnumItem
String sPrefix;
String sSuffix;
SvxNumberType aFmt;
- USHORT nOffset;
+ sal_uInt16 nOffset;
protected:
- SwFmtFtnEndAtTxtEnd( USHORT nWhichL, SwFtnEndPosEnum ePos )
- : SfxEnumItem( nWhichL, sal::static_int_cast< USHORT >(ePos) ), nOffset( 0 )
+ SwFmtFtnEndAtTxtEnd( sal_uInt16 nWhichL, SwFtnEndPosEnum ePos )
+ : SfxEnumItem( nWhichL, sal::static_int_cast< sal_uInt16 >(ePos) ), nOffset( 0 )
{}
SwFmtFtnEndAtTxtEnd( const SwFmtFtnEndAtTxtEnd& rAttr )
: SfxEnumItem( rAttr ), sPrefix( rAttr.sPrefix ),
@@ -61,12 +61,12 @@ protected:
{}
public:
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() 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 );
// will be used at time??
// void FillVariable( SbxVariable &rVar,
@@ -81,7 +81,7 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- inline BOOL IsAtEnd() const { return FTNEND_ATPGORDOCEND != GetValue(); }
+ inline sal_Bool IsAtEnd() const { return FTNEND_ATPGORDOCEND != GetValue(); }
SwFmtFtnEndAtTxtEnd & operator=( const SwFmtFtnEndAtTxtEnd & rAttr );
@@ -90,8 +90,8 @@ public:
const SvxNumberType& GetSwNumType() const { return aFmt; }
- USHORT GetOffset() const { return nOffset; }
- void SetOffset( USHORT nOff ) { nOffset = nOff; }
+ sal_uInt16 GetOffset() const { return nOffset; }
+ void SetOffset( sal_uInt16 nOff ) { nOffset = nOff; }
const String& GetPrefix() const { return sPrefix; }
void SetPrefix(const String& rSet) { sPrefix = rSet; }
@@ -122,15 +122,15 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
};
-inline const SwFmtFtnAtTxtEnd &SwAttrSet::GetFtnAtTxtEnd(BOOL bInP) const
+inline const SwFmtFtnAtTxtEnd &SwAttrSet::GetFtnAtTxtEnd(sal_Bool bInP) const
{ return (const SwFmtFtnAtTxtEnd&)Get( RES_FTN_AT_TXTEND, bInP); }
-inline const SwFmtEndAtTxtEnd &SwAttrSet::GetEndAtTxtEnd(BOOL bInP) const
+inline const SwFmtEndAtTxtEnd &SwAttrSet::GetEndAtTxtEnd(sal_Bool bInP) const
{ return (const SwFmtEndAtTxtEnd&)Get( RES_END_AT_TXTEND, bInP); }
-inline const SwFmtFtnAtTxtEnd &SwFmt::GetFtnAtTxtEnd(BOOL bInP) const
+inline const SwFmtFtnAtTxtEnd &SwFmt::GetFtnAtTxtEnd(sal_Bool bInP) const
{ return aSet.GetFtnAtTxtEnd(bInP); }
-inline const SwFmtEndAtTxtEnd &SwFmt::GetEndAtTxtEnd(BOOL bInP) const
+inline const SwFmtEndAtTxtEnd &SwFmt::GetEndAtTxtEnd(sal_Bool bInP) const
{ return aSet.GetEndAtTxtEnd(bInP); }
#endif
diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
index 14c71d6a0264..c8773d61d1d5 100644
--- a/sw/inc/fmthdft.hxx
+++ b/sw/inc/fmthdft.hxx
@@ -41,10 +41,10 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtHeader: public SfxPoolItem, public SwClient
{
- BOOL bActive; //Nur zur Steuerung (Erzeugung des Inhaltes)
+ sal_Bool bActive; //Nur zur Steuerung (Erzeugung des Inhaltes)
public:
- SwFmtHeader( BOOL bOn = FALSE );
+ SwFmtHeader( sal_Bool bOn = sal_False );
SwFmtHeader( SwFrmFmt *pHeaderFmt );
SwFmtHeader( const SwFmtHeader &rCpy );
~SwFmtHeader();
@@ -64,8 +64,8 @@ public:
const SwFrmFmt *GetHeaderFmt() const { return (SwFrmFmt*)pRegisteredIn; }
SwFrmFmt *GetHeaderFmt() { return (SwFrmFmt*)pRegisteredIn; }
- BOOL IsActive() const { return bActive; }
- void SetActive( BOOL bNew = TRUE ) { bActive = bNew; }
+ sal_Bool IsActive() const { return bActive; }
+ void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; }
};
//Fusszeile, fuer Seitenformate
@@ -73,10 +73,10 @@ public:
class SW_DLLPUBLIC SwFmtFooter: public SfxPoolItem, public SwClient
{
- BOOL bActive; //Nur zur Steuerung (Erzeugung des Inhaltes)
+ sal_Bool bActive; //Nur zur Steuerung (Erzeugung des Inhaltes)
public:
- SwFmtFooter( BOOL bOn = FALSE );
+ SwFmtFooter( sal_Bool bOn = sal_False );
SwFmtFooter( SwFrmFmt *pFooterFmt );
SwFmtFooter( const SwFmtFooter &rCpy );
~SwFmtFooter();
@@ -96,18 +96,18 @@ public:
const SwFrmFmt *GetFooterFmt() const { return (SwFrmFmt*)pRegisteredIn; }
SwFrmFmt *GetFooterFmt() { return (SwFrmFmt*)pRegisteredIn; }
- BOOL IsActive() const { return bActive; }
- void SetActive( BOOL bNew = TRUE ) { bActive = bNew; }
+ sal_Bool IsActive() const { return bActive; }
+ void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; }
};
-inline const SwFmtHeader &SwAttrSet::GetHeader(BOOL bInP) const
+inline const SwFmtHeader &SwAttrSet::GetHeader(sal_Bool bInP) const
{ return (const SwFmtHeader&)Get( RES_HEADER,bInP); }
-inline const SwFmtFooter &SwAttrSet::GetFooter(BOOL bInP) const
+inline const SwFmtFooter &SwAttrSet::GetFooter(sal_Bool bInP) const
{ return (const SwFmtFooter&)Get( RES_FOOTER,bInP); }
-inline const SwFmtHeader &SwFmt::GetHeader(BOOL bInP) const
+inline const SwFmtHeader &SwFmt::GetHeader(sal_Bool bInP) const
{ return aSet.GetHeader(bInP); }
-inline const SwFmtFooter &SwFmt::GetFooter(BOOL bInP) const
+inline const SwFmtFooter &SwFmt::GetFooter(sal_Bool bInP) const
{ return aSet.GetFooter(bInP); }
#endif
diff --git a/sw/inc/fmtinfmt.hxx b/sw/inc/fmtinfmt.hxx
index 75fc863b147d..bfb6d35d2e76 100644
--- a/sw/inc/fmtinfmt.hxx
+++ b/sw/inc/fmtinfmt.hxx
@@ -49,8 +49,8 @@ class SW_DLLPUBLIC SwFmtINetFmt: public SfxPoolItem
String aName; // Name des Links
SvxMacroTableDtor* pMacroTbl;
SwTxtINetFmt* pTxtAttr; // mein TextAttribut
- USHORT nINetId;
- USHORT nVisitedId;
+ sal_uInt16 nINetId;
+ sal_uInt16 nVisitedId;
public:
SwFmtINetFmt( const String& rURL, const String& rTarget );
SwFmtINetFmt( const SwFmtINetFmt& rAttr );
@@ -68,10 +68,10 @@ public:
String &rText,
const IntlWrapper* pIntl = 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 );
const SwTxtINetFmt* GetTxtINetFmt() const { return pTxtAttr; }
@@ -90,19 +90,19 @@ public:
const String& GetVisitedFmt() const { return aVisitedFmt; }
void SetVisitedFmt( const String& rNm ) { aVisitedFmt = rNm; }
- USHORT GetINetFmtId() const { return nINetId; }
- void SetINetFmtId( USHORT nNew ) { nINetId = nNew; }
+ sal_uInt16 GetINetFmtId() const { return nINetId; }
+ void SetINetFmtId( sal_uInt16 nNew ) { nINetId = nNew; }
- USHORT GetVisitedFmtId() const { return nVisitedId; }
- void SetVisitedFmtId( USHORT nNew ) { nVisitedId = nNew; }
+ sal_uInt16 GetVisitedFmtId() const { return nVisitedId; }
+ void SetVisitedFmtId( sal_uInt16 nNew ) { nVisitedId = nNew; }
// setze eine neue oder loesche die akt. MakroTabelle
void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
// setze / erfrage ein Makro
- void SetMacro( USHORT nEvent, const SvxMacro& rMacro );
- const SvxMacro* GetMacro( USHORT nEvent ) const;
+ void SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro );
+ const SvxMacro* GetMacro( sal_uInt16 nEvent ) const;
};
diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx
index 7ae0e80d0350..fb04ec8ed94d 100644
--- a/sw/inc/fmtline.hxx
+++ b/sw/inc/fmtline.hxx
@@ -37,8 +37,8 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtLineNumber: public SfxPoolItem
{
- ULONG nStartValue :24; //Startwert fuer den Absatz, 0 == kein Startwert
- ULONG bCountLines :1; //Zeilen des Absatzes sollen mitgezaehlt werden.
+ sal_uLong nStartValue :24; //Startwert fuer den Absatz, 0 == kein Startwert
+ sal_uLong bCountLines :1; //Zeilen des Absatzes sollen mitgezaehlt werden.
public:
SwFmtLineNumber();
@@ -54,17 +54,17 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 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 );
- ULONG GetStartValue() const { return nStartValue; }
- BOOL IsCount() const { return bCountLines != 0; }
+ sal_uLong GetStartValue() const { return nStartValue; }
+ sal_Bool IsCount() const { return bCountLines != 0; }
- void SetStartValue( ULONG nNew ) { nStartValue = nNew; }
- void SetCountLines( BOOL b ) { bCountLines = b; }
+ void SetStartValue( sal_uLong nNew ) { nStartValue = nNew; }
+ void SetCountLines( sal_Bool b ) { bCountLines = b; }
};
-inline const SwFmtLineNumber &SwAttrSet::GetLineNumber(BOOL bInP) const
+inline const SwFmtLineNumber &SwAttrSet::GetLineNumber(sal_Bool bInP) const
{ return (const SwFmtLineNumber&)Get( RES_LINENUMBER,bInP); }
#endif
diff --git a/sw/inc/fmtlsplt.hxx b/sw/inc/fmtlsplt.hxx
index cfe9172ea02f..1ac109d067ef 100644
--- a/sw/inc/fmtlsplt.hxx
+++ b/sw/inc/fmtlsplt.hxx
@@ -37,7 +37,7 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtLayoutSplit : public SfxBoolItem
{
public:
- SwFmtLayoutSplit( BOOL bSplit = TRUE ) : SfxBoolItem( RES_LAYOUT_SPLIT, bSplit ) {}
+ SwFmtLayoutSplit( sal_Bool bSplit = sal_True ) : SfxBoolItem( RES_LAYOUT_SPLIT, bSplit ) {}
// "pure virtual Methoden" vom SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -48,10 +48,10 @@ public:
const IntlWrapper* pIntl = 0 ) const;
};
-inline const SwFmtLayoutSplit &SwAttrSet::GetLayoutSplit(BOOL bInP) const
+inline const SwFmtLayoutSplit &SwAttrSet::GetLayoutSplit(sal_Bool bInP) const
{ return (const SwFmtLayoutSplit&)Get( RES_LAYOUT_SPLIT,bInP); }
-inline const SwFmtLayoutSplit &SwFmt::GetLayoutSplit(BOOL bInP) const
+inline const SwFmtLayoutSplit &SwFmt::GetLayoutSplit(sal_Bool bInP) const
{ return aSet.GetLayoutSplit(bInP); }
#endif
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index d09df11bb1aa..b486434d19df 100755
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -108,12 +108,12 @@ private:
SwTxtMeta * GetTxtAttr() { return m_pTxtAttr; }
void SetTxtAttr(SwTxtMeta * const i_pTxtAttr);
- explicit SwFmtMeta( const USHORT i_nWhich );
+ explicit SwFmtMeta( const sal_uInt16 i_nWhich );
public:
// takes ownership
explicit SwFmtMeta( ::boost::shared_ptr< ::sw::Meta > const & i_pMeta,
- const USHORT i_nWhich );
+ const sal_uInt16 i_nWhich );
virtual ~SwFmtMeta();
// SfxPoolItem
@@ -123,7 +123,7 @@ public:
/// notify clients registered at m_pMeta that this meta is being (re-)moved
void NotifyChangeTxtNode(SwTxtNode *const pTxtNode);
- static SwFmtMeta * CreatePoolDefault( const USHORT i_nWhich );
+ static SwFmtMeta * CreatePoolDefault( const sal_uInt16 i_nWhich );
::sw::Meta * GetMeta() { return m_pMeta.get(); }
/// this method <em>must</em> be called when the hint is actually copied
void DoCopy( SwFmtMeta & rOriginalMeta );
diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx
index 098177d4bd9b..aa6389992a3d 100644
--- a/sw/inc/fmtornt.hxx
+++ b/sw/inc/fmtornt.hxx
@@ -39,7 +39,7 @@
class IntlWrapper;
-#define IVER_VERTORIENT_REL ((USHORT)0x0001)
+#define IVER_VERTORIENT_REL ((sal_uInt16)0x0001)
class SW_DLLPUBLIC SwFmtVertOrient: public SfxPoolItem
{
@@ -60,8 +60,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 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 );
sal_Int16 GetVertOrient() const { return eOrient; }
sal_Int16 GetRelationOrient() const { return eRelation; }
@@ -75,19 +75,19 @@ public:
//SwFmtHoriOrient, wie und woran orientiert --
// sich der FlyFrm in der Hoizontalen ----------
-#define IVER_HORIORIENT_TOGGLE ((USHORT)0x0001)
-#define IVER_HORIORIENT_REL ((USHORT)0x0002)
+#define IVER_HORIORIENT_TOGGLE ((sal_uInt16)0x0001)
+#define IVER_HORIORIENT_REL ((sal_uInt16)0x0002)
class SW_DLLPUBLIC SwFmtHoriOrient: public SfxPoolItem
{
SwTwips nXPos; //Enthaelt _immer_ die aktuelle RelPos.
sal_Int16 eOrient;
sal_Int16 eRelation;
- BOOL bPosToggle : 1; // auf geraden Seiten Position spiegeln
+ sal_Bool bPosToggle : 1; // auf geraden Seiten Position spiegeln
public:
TYPEINFO();
SwFmtHoriOrient( SwTwips nX = 0, sal_Int16 eHori = com::sun::star::text::HoriOrientation::NONE,
- sal_Int16 eRel = com::sun::star::text::RelOrientation::PRINT_AREA, BOOL bPos = FALSE );
+ sal_Int16 eRel = com::sun::star::text::RelOrientation::PRINT_AREA, sal_Bool bPos = sal_False );
inline SwFmtHoriOrient &operator=( const SwFmtHoriOrient &rCpy );
// "pure virtual Methoden" vom SfxPoolItem
@@ -98,8 +98,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 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 );
sal_Int16 GetHoriOrient() const { return eOrient; }
sal_Int16 GetRelationOrient() const { return eRelation; }
@@ -109,8 +109,8 @@ public:
SwTwips GetPos() const { return nXPos; }
void SetPos( SwTwips nNew ) { nXPos = nNew; }
- BOOL IsPosToggle() const { return bPosToggle; }
- void SetPosToggle( BOOL bNew ) { bPosToggle = bNew; }
+ sal_Bool IsPosToggle() const { return bPosToggle; }
+ void SetPosToggle( sal_Bool bNew ) { bPosToggle = bNew; }
};
inline SwFmtVertOrient &SwFmtVertOrient::operator=( const SwFmtVertOrient &rCpy )
@@ -129,14 +129,14 @@ inline SwFmtHoriOrient &SwFmtHoriOrient::operator=( const SwFmtHoriOrient &rCpy
return *this;
}
-inline const SwFmtVertOrient &SwAttrSet::GetVertOrient(BOOL bInP) const
+inline const SwFmtVertOrient &SwAttrSet::GetVertOrient(sal_Bool bInP) const
{ return (const SwFmtVertOrient&)Get( RES_VERT_ORIENT,bInP); }
-inline const SwFmtHoriOrient &SwAttrSet::GetHoriOrient(BOOL bInP) const
+inline const SwFmtHoriOrient &SwAttrSet::GetHoriOrient(sal_Bool bInP) const
{ return (const SwFmtHoriOrient&)Get( RES_HORI_ORIENT,bInP); }
-inline const SwFmtVertOrient &SwFmt::GetVertOrient(BOOL bInP) const
+inline const SwFmtVertOrient &SwFmt::GetVertOrient(sal_Bool bInP) const
{ return aSet.GetVertOrient(bInP); }
-inline const SwFmtHoriOrient &SwFmt::GetHoriOrient(BOOL bInP) const
+inline const SwFmtHoriOrient &SwFmt::GetHoriOrient(sal_Bool bInP) const
{ return aSet.GetHoriOrient(bInP); }
#endif
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
index 47ad826bc875..8305b9b98954 100644
--- a/sw/inc/fmtpdsc.hxx
+++ b/sw/inc/fmtpdsc.hxx
@@ -42,17 +42,17 @@ class IntlWrapper;
//Pagedescriptor
//Client vom SwPageDesc der durch das Attribut "beschrieben" wird.
-#define IVER_FMTPAGEDESC_NOAUTO ((USHORT)0x0001)
-#define IVER_FMTPAGEDESC_LONGPAGE ((USHORT)0x0002)
+#define IVER_FMTPAGEDESC_NOAUTO ((sal_uInt16)0x0001)
+#define IVER_FMTPAGEDESC_LONGPAGE ((sal_uInt16)0x0002)
class SW_DLLPUBLIC SwFmtPageDesc : public SfxPoolItem, public SwClient
{
// diese "Doc"-Funktion ist friend, um nach dem kopieren das
// Auto-Flag setzen zu koennen !!
- friend BOOL InsAttr( SwDoc*, const SwPaM &, const SfxItemSet&, USHORT,
+ friend sal_Bool InsAttr( SwDoc*, const SwPaM &, const SfxItemSet&, sal_uInt16,
SwHistory* );
- USHORT nNumOffset; // Seitennummer Offset
- USHORT nDescNameIdx; // SW3-Reader: Stringpool-Index des Vorlagennamens
+ sal_uInt16 nNumOffset; // Seitennummer Offset
+ sal_uInt16 nDescNameIdx; // SW3-Reader: Stringpool-Index des Vorlagennamens
SwModify* pDefinedIn; // Verweis auf das Objekt, in dem das
// Attribut gesetzt wurde (CntntNode/Format)
@@ -72,16 +72,16 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 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 );
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
SwPageDesc *GetPageDesc() { return (SwPageDesc*)GetRegisteredIn(); }
const SwPageDesc *GetPageDesc() const { return (SwPageDesc*)GetRegisteredIn(); }
- USHORT GetNumOffset() const { return nNumOffset; }
- void SetNumOffset( USHORT nNum ) { nNumOffset = nNum; }
+ sal_uInt16 GetNumOffset() const { return nNumOffset; }
+ void SetNumOffset( sal_uInt16 nNum ) { nNumOffset = nNum; }
// erfrage/setze, wo drin das Attribut verankert ist
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
@@ -89,10 +89,10 @@ public:
};
-inline const SwFmtPageDesc &SwAttrSet::GetPageDesc(BOOL bInP) const
+inline const SwFmtPageDesc &SwAttrSet::GetPageDesc(sal_Bool bInP) const
{ return (const SwFmtPageDesc&)Get( RES_PAGEDESC,bInP); }
-inline const SwFmtPageDesc &SwFmt::GetPageDesc(BOOL bInP) const
+inline const SwFmtPageDesc &SwFmt::GetPageDesc(sal_Bool bInP) const
{ return aSet.GetPageDesc(bInP); }
#endif
diff --git a/sw/inc/fmtrowsplt.hxx b/sw/inc/fmtrowsplt.hxx
index 11efcc20546f..8f0606b87ac2 100644
--- a/sw/inc/fmtrowsplt.hxx
+++ b/sw/inc/fmtrowsplt.hxx
@@ -37,7 +37,7 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtRowSplit : public SfxBoolItem
{
public:
- SwFmtRowSplit( BOOL bSplit = TRUE ) : SfxBoolItem( RES_ROW_SPLIT, bSplit ) {}
+ SwFmtRowSplit( sal_Bool bSplit = sal_True ) : SfxBoolItem( RES_ROW_SPLIT, bSplit ) {}
// "pure virtual Methoden" vom SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -48,10 +48,10 @@ public:
const IntlWrapper* pIntl = 0 ) const;
};
-inline const SwFmtRowSplit &SwAttrSet::GetRowSplit(BOOL bInP) const
+inline const SwFmtRowSplit &SwAttrSet::GetRowSplit(sal_Bool bInP) const
{ return (const SwFmtRowSplit&)Get( RES_ROW_SPLIT,bInP); }
-inline const SwFmtRowSplit &SwFmt::GetRowSplit(BOOL bInP) const
+inline const SwFmtRowSplit &SwFmt::GetRowSplit(sal_Bool bInP) const
{ return aSet.GetRowSplit(bInP); }
#endif
diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx
index c60169140870..76f2156bcfdd 100644
--- a/sw/inc/fmtruby.hxx
+++ b/sw/inc/fmtruby.hxx
@@ -40,9 +40,9 @@ class SW_DLLPUBLIC SwFmtRuby : public SfxPoolItem
String sRubyTxt; // the ruby txt
String sCharFmtName; // name of the charformat
SwTxtRuby* pTxtAttr; // the TextAttribut
- USHORT nCharFmtId; // PoolId of the charformat
- USHORT nPosition; // Position of the Ruby-Character
- USHORT nAdjustment; // specific adjustment of the Ruby-Ch.
+ sal_uInt16 nCharFmtId; // PoolId of the charformat
+ sal_uInt16 nPosition; // Position of the Ruby-Character
+ sal_uInt16 nAdjustment; // specific adjustment of the Ruby-Ch.
public:
SwFmtRuby( const String& rRubyTxt );
@@ -61,10 +61,10 @@ public:
String &rText,
const IntlWrapper* pIntl = 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 );
const SwTxtRuby* GetTxtRuby() const { return pTxtAttr; }
@@ -76,14 +76,14 @@ public:
const String& GetCharFmtName() const { return sCharFmtName; }
void SetCharFmtName( const String& rNm ) { sCharFmtName = rNm; }
- USHORT GetCharFmtId() const { return nCharFmtId; }
- void SetCharFmtId( USHORT nNew ) { nCharFmtId = nNew; }
+ sal_uInt16 GetCharFmtId() const { return nCharFmtId; }
+ void SetCharFmtId( sal_uInt16 nNew ) { nCharFmtId = nNew; }
- USHORT GetPosition() const { return nPosition; }
- void SetPosition( USHORT nNew ) { nPosition = nNew; }
+ sal_uInt16 GetPosition() const { return nPosition; }
+ void SetPosition( sal_uInt16 nNew ) { nPosition = nNew; }
- USHORT GetAdjustment() const { return nAdjustment; }
- void SetAdjustment( USHORT nNew ) { nAdjustment = nNew; }
+ sal_uInt16 GetAdjustment() const { return nAdjustment; }
+ void SetAdjustment( sal_uInt16 nNew ) { nAdjustment = nNew; }
};
diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx
index 889c7adc6b5e..f9ceb522a2c5 100644
--- a/sw/inc/fmtsrnd.hxx
+++ b/sw/inc/fmtsrnd.hxx
@@ -43,9 +43,9 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtSurround: public SfxEnumItem
{
- BOOL bAnchorOnly :1;
- BOOL bContour :1;
- BOOL bOutside :1;
+ sal_Bool bAnchorOnly :1;
+ sal_Bool bContour :1;
+ sal_Bool bOutside :1;
public:
SwFmtSurround( SwSurround eNew = SURROUND_PARALLEL );
SwFmtSurround( const SwFmtSurround & );
@@ -54,24 +54,24 @@ public:
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 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 );
SwSurround GetSurround()const { return SwSurround( GetValue() ); }
- BOOL IsAnchorOnly() const { return bAnchorOnly; }
- BOOL IsContour() const { return bContour; }
- BOOL IsOutside() const { return bOutside; }
- void SetSurround ( SwSurround eNew ){ SfxEnumItem::SetValue( USHORT( eNew ) ); }
- void SetAnchorOnly( BOOL bNew ) { bAnchorOnly = bNew; }
- void SetContour( BOOL bNew ) { bContour = bNew; }
- void SetOutside( BOOL bNew ) { bOutside = bNew; }
+ sal_Bool IsAnchorOnly() const { return bAnchorOnly; }
+ sal_Bool IsContour() const { return bContour; }
+ sal_Bool IsOutside() const { return bOutside; }
+ void SetSurround ( SwSurround eNew ){ SfxEnumItem::SetValue( sal_uInt16( eNew ) ); }
+ void SetAnchorOnly( sal_Bool bNew ) { bAnchorOnly = bNew; }
+ void SetContour( sal_Bool bNew ) { bContour = bNew; }
+ void SetOutside( sal_Bool bNew ) { bOutside = bNew; }
};
inline SwFmtSurround &SwFmtSurround::operator=( const SwFmtSurround &rCpy )
@@ -83,10 +83,10 @@ inline SwFmtSurround &SwFmtSurround::operator=( const SwFmtSurround &rCpy )
return *this;
}
-inline const SwFmtSurround &SwAttrSet::GetSurround(BOOL bInP) const
+inline const SwFmtSurround &SwAttrSet::GetSurround(sal_Bool bInP) const
{ return (const SwFmtSurround&)Get( RES_SURROUND,bInP); }
-inline const SwFmtSurround &SwFmt::GetSurround(BOOL bInP) const
+inline const SwFmtSurround &SwFmt::GetSurround(sal_Bool bInP) const
{ return aSet.GetSurround(bInP); }
#endif
diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx
index ae2828899f1d..86241fb60649 100644
--- a/sw/inc/fmturl.hxx
+++ b/sw/inc/fmturl.hxx
@@ -44,7 +44,7 @@ class SW_DLLPUBLIC SwFmtURL: public SfxPoolItem
String sName; // Name des Anchors
ImageMap *pMap; //ClientSide Images
- BOOL bIsServerMap; //mit der URL eine ServerSideImageMap
+ sal_Bool bIsServerMap; //mit der URL eine ServerSideImageMap
SwFmtURL& operator=( const SwFmtURL& );
@@ -64,16 +64,16 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 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 SetTargetFrameName( const String& rStr ) { sTargetFrameName = rStr; }
- void SetURL( const String &rURL, BOOL bServerMap );
+ void SetURL( const String &rURL, sal_Bool bServerMap );
void SetMap( const ImageMap *pM ); //Pointer wird kopiert!
const String &GetTargetFrameName()const { return sTargetFrameName; }
const String &GetURL() const { return sURL; }
- BOOL IsServerMap() const { return bIsServerMap; }
+ sal_Bool IsServerMap() const { return bIsServerMap; }
const ImageMap *GetMap() const { return pMap; }
ImageMap *GetMap() { return pMap; }
@@ -82,10 +82,10 @@ public:
};
-inline const SwFmtURL &SwAttrSet::GetURL(BOOL bInP) const
+inline const SwFmtURL &SwAttrSet::GetURL(sal_Bool bInP) const
{ return (const SwFmtURL&)Get( RES_URL,bInP); }
-inline const SwFmtURL &SwFmt::GetURL(BOOL bInP) const
+inline const SwFmtURL &SwFmt::GetURL(sal_Bool bInP) const
{ return aSet.GetURL(bInP); }
#endif
diff --git a/sw/inc/fmtwrapinfluenceonobjpos.hxx b/sw/inc/fmtwrapinfluenceonobjpos.hxx
index 031292514a47..1959ff1abf9f 100644
--- a/sw/inc/fmtwrapinfluenceonobjpos.hxx
+++ b/sw/inc/fmtwrapinfluenceonobjpos.hxx
@@ -56,8 +56,8 @@ public:
virtual int operator==( const SfxPoolItem& _rAttr ) 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 );
// direct accessors to data
void SetWrapInfluenceOnObjPos( sal_Int16 _nWrapInfluenceOnPosition );
@@ -68,10 +68,10 @@ public:
// <--
};
-inline const SwFmtWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(BOOL bInP) const
+inline const SwFmtWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(sal_Bool bInP) const
{ return (const SwFmtWrapInfluenceOnObjPos&)Get( RES_WRAP_INFLUENCE_ON_OBJPOS,bInP); }
- inline const SwFmtWrapInfluenceOnObjPos& SwFmt::GetWrapInfluenceOnObjPos(BOOL bInP) const
+ inline const SwFmtWrapInfluenceOnObjPos& SwFmt::GetWrapInfluenceOnObjPos(sal_Bool bInP) const
{ return aSet.GetWrapInfluenceOnObjPos(bInP); }
#endif
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index d1a33db7b246..d6e51aa6a617 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -50,25 +50,25 @@ class SW_DLLPUBLIC SwFmt : public SwModify
String aFmtName;
SwAttrSet aSet;
- USHORT nWhichId;
- USHORT nFmtId; // Format-ID fuer Lesen/Schreiben
- USHORT nPoolFmtId; // Id-fuer "automatich" erzeugte Formate
+ sal_uInt16 nWhichId;
+ sal_uInt16 nFmtId; // Format-ID fuer Lesen/Schreiben
+ sal_uInt16 nPoolFmtId; // Id-fuer "automatich" erzeugte Formate
// (ist keine harte Attributierung !!)
- USHORT nPoolHelpId; // HelpId fuer diese Pool-Vorlage
- BYTE nPoolHlpFileId; // FilePos ans Doc auf die Vorlagen-Hilfen
- BOOL bWritten : 1; // TRUE: bereits geschrieben
- BOOL bAutoFmt : 1; // FALSE: es handelt sich um eine Vorlage
- // ist dflt immer auf TRUE !
- BOOL bFmtInDTOR : 1; // TRUE: das Format wird geloscht. Damit man in
+ sal_uInt16 nPoolHelpId; // HelpId fuer diese Pool-Vorlage
+ sal_uInt8 nPoolHlpFileId; // FilePos ans Doc auf die Vorlagen-Hilfen
+ sal_Bool bWritten : 1; // sal_True: bereits geschrieben
+ sal_Bool bAutoFmt : 1; // sal_False: es handelt sich um eine Vorlage
+ // ist dflt immer auf sal_True !
+ sal_Bool bFmtInDTOR : 1; // sal_True: das Format wird geloscht. Damit man in
// der FmtChg-Message das erkennen kann!!!
- BOOL bAutoUpdateFmt : 1; // TRUE: am Format werden die Attribute
+ sal_Bool bAutoUpdateFmt : 1; // sal_True: am Format werden die Attribute
// eines kompletten Absatzes gesetzt (UI-seitig!)
protected:
SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
- const USHORT* pWhichRanges, SwFmt *pDrvdFrm, USHORT nFmtWhich );
- SwFmt( SwAttrPool& rPool, const String &rFmtNm, const USHORT* pWhichRanges,
- SwFmt *pDrvdFrm, USHORT nFmtWhich );
+ const sal_uInt16* pWhichRanges, SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich );
+ SwFmt( SwAttrPool& rPool, const String &rFmtNm, const sal_uInt16* pWhichRanges,
+ SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich );
SwFmt( const SwFmt& rFmt );
public:
@@ -78,44 +78,44 @@ public:
SwFmt &operator=(const SwFmt&);
// fuer die Abfrage der Writer-Funktionen
- USHORT Which() const { return nWhichId; }
+ sal_uInt16 Which() const { return nWhichId; }
virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
// erfrage vom Format Informationen
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
// kopiere Attribute; auch ueber Dokumentgrenzen hinweg
- void CopyAttrs( const SwFmt&, BOOL bReplace=TRUE );
+ void CopyAttrs( const SwFmt&, sal_Bool bReplace=sal_True );
// loesche alle Attribute, die nicht in rFmt stehen
void DelDiffs( const SfxItemSet& rSet );
void DelDiffs( const SwFmt& rFmt ) { DelDiffs( rFmt.GetAttrSet() ); }
// Umhaengen des Formats (0 = Default)
- BOOL SetDerivedFrom(SwFmt *pDerivedFrom = 0);
+ sal_Bool SetDerivedFrom(SwFmt *pDerivedFrom = 0);
- // Ist bInParents FALSE,
+ // Ist bInParents sal_False,
// wird nur in diesem Format nach dem Attribut gesucht.
- inline const SfxPoolItem& GetFmtAttr( USHORT nWhich,
- BOOL bInParents = TRUE ) const;
- inline SfxItemState GetItemState( USHORT nWhich, BOOL bSrchInParent = TRUE,
+ inline const SfxPoolItem& GetFmtAttr( sal_uInt16 nWhich,
+ sal_Bool bInParents = sal_True ) const;
+ inline SfxItemState GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInParent = sal_True,
const SfxPoolItem **ppItem = 0 ) const;
// --> OD 2008-03-03 #refactorlists#
// methods renamed and made virtual
- virtual BOOL SetFmtAttr( const SfxPoolItem& rAttr );
- virtual BOOL SetFmtAttr( const SfxItemSet& rSet );
- virtual BOOL ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
+ virtual sal_Bool SetFmtAttr( const SfxPoolItem& rAttr );
+ virtual sal_Bool SetFmtAttr( const SfxItemSet& rSet );
+ virtual sal_Bool ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
// <--
// --> OD 2007-01-24 #i73790#
// Method renamed and made virtual
// Nimmt alle Hints aus dem Delta-Array,
// liefert die Anzahl der geloeschten Hints
- virtual USHORT ResetAllFmtAttr();
+ virtual sal_uInt16 ResetAllFmtAttr();
// <--
inline SwFmt* DerivedFrom() const { return (SwFmt*)pRegisteredIn; }
- inline BOOL IsDefault() const { return DerivedFrom() == 0; }
+ inline sal_Bool IsDefault() const { return DerivedFrom() == 0; }
inline const String& GetName() const { return aFmtName; }
void SetName( const String& rNewName, sal_Bool bBroadcast=sal_False );
@@ -157,153 +157,153 @@ public:
IDocumentChartDataProviderAccess* getIDocumentChartDataProviderAccess();
// erfragen und setzen der Poolvorlagen-Id's
- USHORT GetPoolFmtId() const { return nPoolFmtId; }
- void SetPoolFmtId( USHORT nId ) { nPoolFmtId = nId; }
+ sal_uInt16 GetPoolFmtId() const { return nPoolFmtId; }
+ void SetPoolFmtId( sal_uInt16 nId ) { nPoolFmtId = nId; }
// erfragen und setzen der Hilfe-Id's fuer die Document-Vorlagen
- USHORT GetPoolHelpId() const { return nPoolHelpId; }
- void SetPoolHelpId( USHORT nId ) { nPoolHelpId = nId; }
- BYTE GetPoolHlpFileId() const { return nPoolHlpFileId; }
- void SetPoolHlpFileId( BYTE nId ) { nPoolHlpFileId = nId; }
+ sal_uInt16 GetPoolHelpId() const { return nPoolHelpId; }
+ void SetPoolHelpId( sal_uInt16 nId ) { nPoolHelpId = nId; }
+ sal_uInt8 GetPoolHlpFileId() const { return nPoolHlpFileId; }
+ void SetPoolHlpFileId( sal_uInt8 nId ) { nPoolHlpFileId = nId; }
// erfrage die Attribut-Beschreibung, returnt den reingereichten String
void GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText ) const
{ aSet.GetPresentation( ePres, eCoreMetric, ePresMetric, rText ); }
// Das Format-ID fuer Lesen/Schreiben:
- void ResetWritten() { bWritten = FALSE; }
+ void ResetWritten() { bWritten = sal_False; }
// Abfragen/Setzen vom AutoFmt-Flag
- BOOL IsAuto() const { return bAutoFmt; }
- void SetAuto( BOOL bNew = FALSE ) { bAutoFmt = bNew; }
+ sal_Bool IsAuto() const { return bAutoFmt; }
+ void SetAuto( sal_Bool bNew = sal_False ) { bAutoFmt = bNew; }
// Abfragen/Setzen vom bAutoUpdateFmt-Flag
- BOOL IsAutoUpdateFmt() const { return bAutoUpdateFmt; }
- void SetAutoUpdateFmt( BOOL bNew = TRUE ) { bAutoUpdateFmt = bNew; }
+ sal_Bool IsAutoUpdateFmt() const { return bAutoUpdateFmt; }
+ void SetAutoUpdateFmt( sal_Bool bNew = sal_True ) { bAutoUpdateFmt = bNew; }
- BOOL IsFmtInDTOR() const { return bFmtInDTOR; }
+ sal_Bool IsFmtInDTOR() const { return bFmtInDTOR; }
- // GetMethoden: das Bool gibt an, ob nur im Set (FALSE) oder auch in
+ // GetMethoden: das Bool gibt an, ob nur im Set (sal_False) oder auch in
// den Parents gesucht werden soll. Wird nichts gefunden,
// wird das deflt. Attribut returnt.
// Charakter-Attribute - impl. steht im charatr.hxx
// AMA 12.10.94: Umstellung von SwFmt... auf Svx...
- inline const SvxPostureItem &GetPosture( BOOL = TRUE ) const;
- inline const SvxWeightItem &GetWeight( BOOL = TRUE ) const;
- inline const SvxShadowedItem &GetShadowed( BOOL = TRUE ) const;
- inline const SvxAutoKernItem &GetAutoKern( BOOL = TRUE ) const;
- inline const SvxWordLineModeItem &GetWordLineMode( BOOL = TRUE ) const;
- inline const SvxContourItem &GetContour( BOOL = TRUE ) const;
- inline const SvxKerningItem &GetKerning( BOOL = TRUE ) const;
- inline const SvxUnderlineItem &GetUnderline( BOOL = TRUE ) const;
- inline const SvxOverlineItem &GetOverline( BOOL = TRUE ) const;
- inline const SvxCrossedOutItem &GetCrossedOut( BOOL = TRUE ) const;
- inline const SvxFontHeightItem &GetSize( BOOL = TRUE ) const;
- inline const SvxPropSizeItem &GetPropSize( BOOL = TRUE ) const;
- inline const SvxFontItem &GetFont( BOOL = TRUE ) const;
- inline const SvxColorItem &GetColor( BOOL = TRUE ) const;
- inline const SvxCharSetColorItem &GetCharSetColor( BOOL = TRUE ) const;
- inline const SvxLanguageItem &GetLanguage( BOOL = TRUE ) const;
- inline const SvxEscapementItem &GetEscapement( BOOL = TRUE ) const;
- inline const SvxCaseMapItem &GetCaseMap( BOOL = TRUE ) const;
- inline const SvxNoHyphenItem &GetNoHyphenHere( BOOL = TRUE ) const;
- inline const SvxBlinkItem &GetBlink( BOOL = TRUE ) const;
- inline const SvxBrushItem &GetChrBackground( BOOL = TRUE ) const;
-
- inline const SvxFontItem &GetCJKFont( BOOL = TRUE ) const;
- inline const SvxFontHeightItem &GetCJKSize( BOOL = TRUE ) const;
- inline const SvxLanguageItem &GetCJKLanguage( BOOL = TRUE ) const;
- inline const SvxPostureItem &GetCJKPosture( BOOL = TRUE ) const;
- inline const SvxWeightItem &GetCJKWeight( BOOL = TRUE ) const;
- inline const SvxFontItem &GetCTLFont( BOOL = TRUE ) const;
- inline const SvxFontHeightItem &GetCTLSize( BOOL = TRUE ) const;
- inline const SvxLanguageItem &GetCTLLanguage( BOOL = TRUE ) const;
- inline const SvxPostureItem &GetCTLPosture( BOOL = TRUE ) const;
- inline const SvxWeightItem &GetCTLWeight( BOOL = TRUE ) const;
- inline const SfxBoolItem &GetWritingDirection( BOOL = TRUE ) const;
- inline const SvxEmphasisMarkItem &GetEmphasisMark( BOOL = TRUE ) const;
- inline const SvxTwoLinesItem &Get2Lines( BOOL = TRUE ) const;
- inline const SvxCharScaleWidthItem &GetCharScaleW( BOOL = TRUE ) const;
- inline const SvxCharRotateItem &GetCharRotate( BOOL = TRUE ) const;
- inline const SvxCharReliefItem &GetCharRelief( BOOL = TRUE ) const;
- inline const SvxCharHiddenItem &GetCharHidden( BOOL = TRUE ) const;
+ inline const SvxPostureItem &GetPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetWeight( sal_Bool = sal_True ) const;
+ inline const SvxShadowedItem &GetShadowed( sal_Bool = sal_True ) const;
+ inline const SvxAutoKernItem &GetAutoKern( sal_Bool = sal_True ) const;
+ inline const SvxWordLineModeItem &GetWordLineMode( sal_Bool = sal_True ) const;
+ inline const SvxContourItem &GetContour( sal_Bool = sal_True ) const;
+ inline const SvxKerningItem &GetKerning( sal_Bool = sal_True ) const;
+ inline const SvxUnderlineItem &GetUnderline( sal_Bool = sal_True ) const;
+ inline const SvxOverlineItem &GetOverline( sal_Bool = sal_True ) const;
+ inline const SvxCrossedOutItem &GetCrossedOut( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetSize( sal_Bool = sal_True ) const;
+ inline const SvxPropSizeItem &GetPropSize( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetFont( sal_Bool = sal_True ) const;
+ inline const SvxColorItem &GetColor( sal_Bool = sal_True ) const;
+ inline const SvxCharSetColorItem &GetCharSetColor( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetLanguage( sal_Bool = sal_True ) const;
+ inline const SvxEscapementItem &GetEscapement( sal_Bool = sal_True ) const;
+ inline const SvxCaseMapItem &GetCaseMap( sal_Bool = sal_True ) const;
+ inline const SvxNoHyphenItem &GetNoHyphenHere( sal_Bool = sal_True ) const;
+ inline const SvxBlinkItem &GetBlink( sal_Bool = sal_True ) const;
+ inline const SvxBrushItem &GetChrBackground( sal_Bool = sal_True ) const;
+
+ inline const SvxFontItem &GetCJKFont( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetCJKSize( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetCJKLanguage( sal_Bool = sal_True ) const;
+ inline const SvxPostureItem &GetCJKPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetCJKWeight( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetCTLFont( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetCTLSize( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetCTLLanguage( sal_Bool = sal_True ) const;
+ inline const SvxPostureItem &GetCTLPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetCTLWeight( sal_Bool = sal_True ) const;
+ inline const SfxBoolItem &GetWritingDirection( sal_Bool = sal_True ) const;
+ inline const SvxEmphasisMarkItem &GetEmphasisMark( sal_Bool = sal_True ) const;
+ inline const SvxTwoLinesItem &Get2Lines( sal_Bool = sal_True ) const;
+ inline const SvxCharScaleWidthItem &GetCharScaleW( sal_Bool = sal_True ) const;
+ inline const SvxCharRotateItem &GetCharRotate( sal_Bool = sal_True ) const;
+ inline const SvxCharReliefItem &GetCharRelief( sal_Bool = sal_True ) const;
+ inline const SvxCharHiddenItem &GetCharHidden( sal_Bool = sal_True ) const;
// Frame-Attribute - impl. steht im frmatr.hxx,
- inline const SwFmtFillOrder &GetFillOrder( BOOL = TRUE ) const;
- inline const SwFmtFrmSize &GetFrmSize( BOOL = TRUE ) const;
- inline const SwFmtHeader &GetHeader( BOOL = TRUE ) const;
- inline const SwFmtFooter &GetFooter( BOOL = TRUE ) const;
- inline const SwFmtSurround &GetSurround( BOOL = TRUE ) const;
- inline const SwFmtHoriOrient &GetHoriOrient( BOOL = TRUE ) const;
- inline const SwFmtAnchor &GetAnchor( BOOL = TRUE ) const;
- inline const SwFmtCol &GetCol( BOOL = TRUE ) const;
- inline const SvxPaperBinItem &GetPaperBin( BOOL = TRUE ) const;
- inline const SvxLRSpaceItem &GetLRSpace( BOOL = TRUE ) const;
- inline const SvxULSpaceItem &GetULSpace( BOOL = TRUE ) const;
- inline const SwFmtCntnt &GetCntnt( BOOL = TRUE ) const;
- inline const SvxPrintItem &GetPrint( BOOL = TRUE ) const;
- inline const SvxOpaqueItem &GetOpaque( BOOL = TRUE ) const;
- inline const SvxProtectItem &GetProtect( BOOL = TRUE ) const;
- inline const SwFmtVertOrient &GetVertOrient( BOOL = TRUE ) const;
- inline const SvxBoxItem &GetBox( BOOL = TRUE ) const;
- inline const SvxFmtKeepItem &GetKeep( BOOL = TRUE ) const;
- inline const SvxBrushItem &GetBackground( BOOL = TRUE ) const;
- inline const SvxShadowItem &GetShadow( BOOL = TRUE ) const;
- inline const SwFmtPageDesc &GetPageDesc( BOOL = TRUE ) const;
- inline const SvxFmtBreakItem &GetBreak( BOOL = TRUE ) const;
- inline const SvxMacroItem &GetMacro( BOOL = TRUE ) const;
- inline const SwFmtURL &GetURL( BOOL = TRUE ) const;
- inline const SwFmtEditInReadonly &GetEditInReadonly( BOOL = TRUE ) const;
- inline const SwFmtLayoutSplit &GetLayoutSplit( BOOL = TRUE ) const;
- inline const SwFmtRowSplit &GetRowSplit( BOOL = TRUE ) const;
- inline const SwFmtChain &GetChain( BOOL = TRUE ) const;
- inline const SwFmtLineNumber &GetLineNumber( BOOL = TRUE ) const;
- inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( BOOL = TRUE ) const;
- inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( BOOL = TRUE ) const;
- inline const SwFmtNoBalancedColumns &GetBalancedColumns( BOOL = TRUE ) const;
- inline const SvxFrameDirectionItem &GetFrmDir( BOOL = TRUE ) const;
- inline const SwTextGridItem &GetTextGrid( BOOL = TRUE ) const;
- inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( BOOL = TRUE ) const;
+ inline const SwFmtFillOrder &GetFillOrder( sal_Bool = sal_True ) const;
+ inline const SwFmtFrmSize &GetFrmSize( sal_Bool = sal_True ) const;
+ inline const SwFmtHeader &GetHeader( sal_Bool = sal_True ) const;
+ inline const SwFmtFooter &GetFooter( sal_Bool = sal_True ) const;
+ inline const SwFmtSurround &GetSurround( sal_Bool = sal_True ) const;
+ inline const SwFmtHoriOrient &GetHoriOrient( sal_Bool = sal_True ) const;
+ inline const SwFmtAnchor &GetAnchor( sal_Bool = sal_True ) const;
+ inline const SwFmtCol &GetCol( sal_Bool = sal_True ) const;
+ inline const SvxPaperBinItem &GetPaperBin( sal_Bool = sal_True ) const;
+ inline const SvxLRSpaceItem &GetLRSpace( sal_Bool = sal_True ) const;
+ inline const SvxULSpaceItem &GetULSpace( sal_Bool = sal_True ) const;
+ inline const SwFmtCntnt &GetCntnt( sal_Bool = sal_True ) const;
+ inline const SvxPrintItem &GetPrint( sal_Bool = sal_True ) const;
+ inline const SvxOpaqueItem &GetOpaque( sal_Bool = sal_True ) const;
+ inline const SvxProtectItem &GetProtect( sal_Bool = sal_True ) const;
+ inline const SwFmtVertOrient &GetVertOrient( sal_Bool = sal_True ) const;
+ inline const SvxBoxItem &GetBox( sal_Bool = sal_True ) const;
+ inline const SvxFmtKeepItem &GetKeep( sal_Bool = sal_True ) const;
+ inline const SvxBrushItem &GetBackground( sal_Bool = sal_True ) const;
+ inline const SvxShadowItem &GetShadow( sal_Bool = sal_True ) const;
+ inline const SwFmtPageDesc &GetPageDesc( sal_Bool = sal_True ) const;
+ inline const SvxFmtBreakItem &GetBreak( sal_Bool = sal_True ) const;
+ inline const SvxMacroItem &GetMacro( sal_Bool = sal_True ) const;
+ inline const SwFmtURL &GetURL( sal_Bool = sal_True ) const;
+ inline const SwFmtEditInReadonly &GetEditInReadonly( sal_Bool = sal_True ) const;
+ inline const SwFmtLayoutSplit &GetLayoutSplit( sal_Bool = sal_True ) const;
+ inline const SwFmtRowSplit &GetRowSplit( sal_Bool = sal_True ) const;
+ inline const SwFmtChain &GetChain( sal_Bool = sal_True ) const;
+ inline const SwFmtLineNumber &GetLineNumber( sal_Bool = sal_True ) const;
+ inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( sal_Bool = sal_True ) const;
+ inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( sal_Bool = sal_True ) const;
+ inline const SwFmtNoBalancedColumns &GetBalancedColumns( sal_Bool = sal_True ) const;
+ inline const SvxFrameDirectionItem &GetFrmDir( sal_Bool = sal_True ) const;
+ inline const SwTextGridItem &GetTextGrid( sal_Bool = sal_True ) const;
+ inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( sal_Bool = sal_True ) const;
// OD 18.09.2003 #i18732#
- inline const SwFmtFollowTextFlow &GetFollowTextFlow(BOOL = TRUE) const;
+ inline const SwFmtFollowTextFlow &GetFollowTextFlow(sal_Bool = sal_True) const;
// OD 2004-05-05 #i28701#
- inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(BOOL = TRUE) const;
+ inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(sal_Bool = sal_True) const;
// Grafik-Attribute - impl. steht im grfatr.hxx
- inline const SwMirrorGrf &GetMirrorGrf( BOOL = TRUE ) const;
- inline const SwCropGrf &GetCropGrf( BOOL = TRUE ) const;
- inline const SwRotationGrf &GetRotationGrf(BOOL = TRUE ) const;
- inline const SwLuminanceGrf &GetLuminanceGrf(BOOL = TRUE ) const;
- inline const SwContrastGrf &GetContrastGrf(BOOL = TRUE ) const;
- inline const SwChannelRGrf &GetChannelRGrf(BOOL = TRUE ) const;
- inline const SwChannelGGrf &GetChannelGGrf(BOOL = TRUE ) const;
- inline const SwChannelBGrf &GetChannelBGrf(BOOL = TRUE ) const;
- inline const SwGammaGrf &GetGammaGrf(BOOL = TRUE ) const;
- inline const SwInvertGrf &GetInvertGrf(BOOL = TRUE ) const;
- inline const SwTransparencyGrf &GetTransparencyGrf(BOOL = TRUE ) const;
- inline const SwDrawModeGrf &GetDrawModeGrf(BOOL = TRUE ) const;
+ inline const SwMirrorGrf &GetMirrorGrf( sal_Bool = sal_True ) const;
+ inline const SwCropGrf &GetCropGrf( sal_Bool = sal_True ) const;
+ inline const SwRotationGrf &GetRotationGrf(sal_Bool = sal_True ) const;
+ inline const SwLuminanceGrf &GetLuminanceGrf(sal_Bool = sal_True ) const;
+ inline const SwContrastGrf &GetContrastGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelRGrf &GetChannelRGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelGGrf &GetChannelGGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelBGrf &GetChannelBGrf(sal_Bool = sal_True ) const;
+ inline const SwGammaGrf &GetGammaGrf(sal_Bool = sal_True ) const;
+ inline const SwInvertGrf &GetInvertGrf(sal_Bool = sal_True ) const;
+ inline const SwTransparencyGrf &GetTransparencyGrf(sal_Bool = sal_True ) const;
+ inline const SwDrawModeGrf &GetDrawModeGrf(sal_Bool = sal_True ) const;
// Paragraph-Attribute - impl. steht im paratr.hxx
- inline const SvxLineSpacingItem &GetLineSpacing( BOOL = TRUE ) const;
- inline const SvxAdjustItem &GetAdjust( BOOL = TRUE ) const;
- inline const SvxFmtSplitItem &GetSplit( BOOL = TRUE ) const;
- inline const SwRegisterItem &GetRegister( BOOL = TRUE ) const;
- inline const SwNumRuleItem &GetNumRule( BOOL = TRUE ) const;
- inline const SvxWidowsItem &GetWidows( BOOL = TRUE ) const;
- inline const SvxOrphansItem &GetOrphans( BOOL = TRUE ) const;
- inline const SvxTabStopItem &GetTabStops( BOOL = TRUE ) const;
- inline const SvxHyphenZoneItem &GetHyphenZone( BOOL = TRUE ) const;
- inline const SwFmtDrop &GetDrop( BOOL = TRUE ) const;
- inline const SvxScriptSpaceItem &GetScriptSpace(BOOL = TRUE) const;
- inline const SvxHangingPunctuationItem &GetHangingPunctuation(BOOL = TRUE) const;
- inline const SvxForbiddenRuleItem &GetForbiddenRule(BOOL = TRUE) const;
- inline const SvxParaVertAlignItem &GetParaVertAlign(BOOL = TRUE) const;
- inline const SvxParaGridItem &GetParaGrid(BOOL = TRUE) const;
- inline const SwParaConnectBorderItem &GetParaConnectBorder(BOOL = TRUE ) const;
+ inline const SvxLineSpacingItem &GetLineSpacing( sal_Bool = sal_True ) const;
+ inline const SvxAdjustItem &GetAdjust( sal_Bool = sal_True ) const;
+ inline const SvxFmtSplitItem &GetSplit( sal_Bool = sal_True ) const;
+ inline const SwRegisterItem &GetRegister( sal_Bool = sal_True ) const;
+ inline const SwNumRuleItem &GetNumRule( sal_Bool = sal_True ) const;
+ inline const SvxWidowsItem &GetWidows( sal_Bool = sal_True ) const;
+ inline const SvxOrphansItem &GetOrphans( sal_Bool = sal_True ) const;
+ inline const SvxTabStopItem &GetTabStops( sal_Bool = sal_True ) const;
+ inline const SvxHyphenZoneItem &GetHyphenZone( sal_Bool = sal_True ) const;
+ inline const SwFmtDrop &GetDrop( sal_Bool = sal_True ) const;
+ inline const SvxScriptSpaceItem &GetScriptSpace(sal_Bool = sal_True) const;
+ inline const SvxHangingPunctuationItem &GetHangingPunctuation(sal_Bool = sal_True) const;
+ inline const SvxForbiddenRuleItem &GetForbiddenRule(sal_Bool = sal_True) const;
+ inline const SvxParaVertAlignItem &GetParaVertAlign(sal_Bool = sal_True) const;
+ inline const SvxParaGridItem &GetParaGrid(sal_Bool = sal_True) const;
+ inline const SwParaConnectBorderItem &GetParaConnectBorder(sal_Bool = sal_True ) const;
// TabellenBox-Attribute - impl. steht im cellatr.hxx
- inline const SwTblBoxNumFormat &GetTblBoxNumFmt( BOOL = TRUE ) const;
- inline const SwTblBoxFormula &GetTblBoxFormula( BOOL = TRUE ) const;
- inline const SwTblBoxValue &GetTblBoxValue( BOOL = TRUE ) const;
+ inline const SwTblBoxNumFormat &GetTblBoxNumFmt( sal_Bool = sal_True ) const;
+ inline const SwTblBoxFormula &GetTblBoxFormula( sal_Bool = sal_True ) const;
+ inline const SwTblBoxValue &GetTblBoxValue( sal_Bool = sal_True ) const;
/** SwFmt::IsBackgroundTransparent - for feature #99657#
@@ -334,8 +334,8 @@ public:
// --------------- inline Implementierungen ------------------------
-inline const SfxPoolItem& SwFmt::GetFmtAttr( USHORT nWhich,
- BOOL bInParents ) const
+inline const SfxPoolItem& SwFmt::GetFmtAttr( sal_uInt16 nWhich,
+ sal_Bool bInParents ) const
{
return aSet.Get( nWhich, bInParents );
}
@@ -347,7 +347,7 @@ inline void SwFmt::SetName( const sal_Char* pNewName,
SetName( aTmp, bBroadcast );
}
-inline SfxItemState SwFmt::GetItemState( USHORT nWhich, BOOL bSrchInParent,
+inline SfxItemState SwFmt::GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInParent,
const SfxPoolItem **ppItem ) const
{
return aSet.GetItemState( nWhich, bSrchInParent, ppItem );
diff --git a/sw/inc/frmatr.hxx b/sw/inc/frmatr.hxx
index 93f7a60123c5..94deef35e018 100644
--- a/sw/inc/frmatr.hxx
+++ b/sw/inc/frmatr.hxx
@@ -37,31 +37,31 @@
* Implementierung der FrameAttribut Methoden vom SwAttrSet
******************************************************************************/
-inline const SvxPaperBinItem &SwAttrSet::GetPaperBin(BOOL bInP) const
+inline const SvxPaperBinItem &SwAttrSet::GetPaperBin(sal_Bool bInP) const
{ return (const SvxPaperBinItem&)Get( RES_PAPER_BIN,bInP); }
-inline const SvxLRSpaceItem &SwAttrSet::GetLRSpace(BOOL bInP) const
+inline const SvxLRSpaceItem &SwAttrSet::GetLRSpace(sal_Bool bInP) const
{ return (const SvxLRSpaceItem&)Get( RES_LR_SPACE,bInP); }
-inline const SvxULSpaceItem &SwAttrSet::GetULSpace(BOOL bInP) const
+inline const SvxULSpaceItem &SwAttrSet::GetULSpace(sal_Bool bInP) const
{ return (const SvxULSpaceItem&)Get( RES_UL_SPACE,bInP); }
-inline const SvxPrintItem &SwAttrSet::GetPrint(BOOL bInP) const
+inline const SvxPrintItem &SwAttrSet::GetPrint(sal_Bool bInP) const
{ return (const SvxPrintItem&)Get( RES_PRINT,bInP); }
-inline const SvxOpaqueItem &SwAttrSet::GetOpaque(BOOL bInP) const
+inline const SvxOpaqueItem &SwAttrSet::GetOpaque(sal_Bool bInP) const
{ return (const SvxOpaqueItem&)Get( RES_OPAQUE,bInP); }
-inline const SvxProtectItem &SwAttrSet::GetProtect(BOOL bInP) const
+inline const SvxProtectItem &SwAttrSet::GetProtect(sal_Bool bInP) const
{ return (const SvxProtectItem&)Get( RES_PROTECT,bInP); }
-inline const SvxBoxItem &SwAttrSet::GetBox(BOOL bInP) const
+inline const SvxBoxItem &SwAttrSet::GetBox(sal_Bool bInP) const
{ return (const SvxBoxItem&)Get( RES_BOX,bInP); }
-inline const SvxFmtKeepItem &SwAttrSet::GetKeep(BOOL bInP) const
+inline const SvxFmtKeepItem &SwAttrSet::GetKeep(sal_Bool bInP) const
{ return (const SvxFmtKeepItem&)Get( RES_KEEP,bInP); }
-inline const SvxBrushItem &SwAttrSet::GetBackground(BOOL bInP) const
+inline const SvxBrushItem &SwAttrSet::GetBackground(sal_Bool bInP) const
{ return (const SvxBrushItem&)Get( RES_BACKGROUND,bInP); }
-inline const SvxShadowItem &SwAttrSet::GetShadow(BOOL bInP) const
+inline const SvxShadowItem &SwAttrSet::GetShadow(sal_Bool bInP) const
{ return (const SvxShadowItem&)Get( RES_SHADOW,bInP); }
-inline const SvxFmtBreakItem &SwAttrSet::GetBreak(BOOL bInP) const
+inline const SvxFmtBreakItem &SwAttrSet::GetBreak(sal_Bool bInP) const
{ return (const SvxFmtBreakItem&)Get( RES_BREAK,bInP); }
-inline const SvxMacroItem &SwAttrSet::GetMacro(BOOL bInP) const
+inline const SvxMacroItem &SwAttrSet::GetMacro(sal_Bool bInP) const
{ return (const SvxMacroItem&)Get( RES_FRMMACRO,bInP); }
-inline const SvxFrameDirectionItem &SwAttrSet::GetFrmDir(BOOL bInP) const
+inline const SvxFrameDirectionItem &SwAttrSet::GetFrmDir(sal_Bool bInP) const
{ return (const SvxFrameDirectionItem&)Get( RES_FRAMEDIR,bInP); }
@@ -69,31 +69,31 @@ inline const SvxFrameDirectionItem &SwAttrSet::GetFrmDir(BOOL bInP) const
* Implementierung der FrameAttribut Methoden vom SwFmt
******************************************************************************/
-inline const SvxPaperBinItem &SwFmt::GetPaperBin(BOOL bInP) const
+inline const SvxPaperBinItem &SwFmt::GetPaperBin(sal_Bool bInP) const
{ return aSet.GetPaperBin(bInP); }
-inline const SvxLRSpaceItem &SwFmt::GetLRSpace(BOOL bInP) const
+inline const SvxLRSpaceItem &SwFmt::GetLRSpace(sal_Bool bInP) const
{ return aSet.GetLRSpace(bInP); }
-inline const SvxULSpaceItem &SwFmt::GetULSpace(BOOL bInP) const
+inline const SvxULSpaceItem &SwFmt::GetULSpace(sal_Bool bInP) const
{ return aSet.GetULSpace(bInP); }
-inline const SvxPrintItem &SwFmt::GetPrint(BOOL bInP) const
+inline const SvxPrintItem &SwFmt::GetPrint(sal_Bool bInP) const
{ return aSet.GetPrint(bInP); }
-inline const SvxOpaqueItem &SwFmt::GetOpaque(BOOL bInP) const
+inline const SvxOpaqueItem &SwFmt::GetOpaque(sal_Bool bInP) const
{ return aSet.GetOpaque(bInP); }
-inline const SvxProtectItem &SwFmt::GetProtect(BOOL bInP) const
+inline const SvxProtectItem &SwFmt::GetProtect(sal_Bool bInP) const
{ return aSet.GetProtect(bInP); }
-inline const SvxBoxItem &SwFmt::GetBox(BOOL bInP) const
+inline const SvxBoxItem &SwFmt::GetBox(sal_Bool bInP) const
{ return aSet.GetBox(bInP); }
-inline const SvxFmtKeepItem &SwFmt::GetKeep(BOOL bInP) const
+inline const SvxFmtKeepItem &SwFmt::GetKeep(sal_Bool bInP) const
{ return aSet.GetKeep(bInP); }
-inline const SvxBrushItem &SwFmt::GetBackground(BOOL bInP) const
+inline const SvxBrushItem &SwFmt::GetBackground(sal_Bool bInP) const
{ return aSet.GetBackground(bInP); }
-inline const SvxShadowItem &SwFmt::GetShadow(BOOL bInP) const
+inline const SvxShadowItem &SwFmt::GetShadow(sal_Bool bInP) const
{ return aSet.GetShadow(bInP); }
-inline const SvxFmtBreakItem &SwFmt::GetBreak(BOOL bInP) const
+inline const SvxFmtBreakItem &SwFmt::GetBreak(sal_Bool bInP) const
{ return aSet.GetBreak(bInP); }
-inline const SvxMacroItem &SwFmt::GetMacro(BOOL bInP) const
+inline const SvxMacroItem &SwFmt::GetMacro(sal_Bool bInP) const
{ return aSet.GetMacro(bInP); }
-inline const SvxFrameDirectionItem &SwFmt::GetFrmDir(BOOL bInP) const
+inline const SvxFrameDirectionItem &SwFmt::GetFrmDir(sal_Bool bInP) const
{ return aSet.GetFrmDir(bInP); }
#endif //_FRMATR_HXX
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 4829775cf0fb..16c72e1a9d19 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -58,15 +58,15 @@ class SW_DLLPUBLIC SwFrmFmt: public SwFmt
protected:
SwFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
- SwFrmFmt *pDrvdFrm, USHORT nFmtWhich = RES_FRMFMT,
- const USHORT* pWhichRange = 0 )
+ SwFrmFmt *pDrvdFrm, sal_uInt16 nFmtWhich = RES_FRMFMT,
+ const sal_uInt16* pWhichRange = 0 )
: SwFmt( rPool, pFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
pDrvdFrm, nFmtWhich )
{}
SwFrmFmt( SwAttrPool& rPool, const String &rFmtNm,
- SwFrmFmt *pDrvdFrm, USHORT nFmtWhich = RES_FRMFMT,
- const USHORT* pWhichRange = 0 )
+ SwFrmFmt *pDrvdFrm, sal_uInt16 nFmtWhich = RES_FRMFMT,
+ const sal_uInt16* pWhichRange = 0 )
: SwFmt( rPool, rFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
pDrvdFrm, nFmtWhich )
{}
@@ -94,9 +94,9 @@ public:
// Gibt die tatsaechlche Groesse des Frames zurueck bzw. ein leeres
// Rechteck, wenn kein Layout existiert. Wird pPoint angegeben, dann
// wird der am dichtesten liegende Frame gesucht.
- SwRect FindLayoutRect( const BOOL bPrtArea = FALSE,
+ SwRect FindLayoutRect( const sal_Bool bPrtArea = sal_False,
const Point* pPoint = 0,
- const BOOL bCalcFrm = FALSE ) const;
+ const sal_Bool bCalcFrm = sal_False ) const;
// Sucht das SdrObject. Der SdrObjUserCall ist Client vom Format.
// Der UserCall kennt sein SdrObject.
@@ -116,7 +116,7 @@ public:
const SdrObject *FindRealSdrObject() const
{ return ((SwFrmFmt*)this)->FindRealSdrObject(); }
- BOOL IsLowerOf( const SwFrmFmt& rFmt ) const;
+ sal_Bool IsLowerOf( const SwFrmFmt& rFmt ) const;
// --> OD 2004-07-27 #i31698#
enum tLayoutDir
@@ -182,14 +182,14 @@ public:
virtual void MakeFrms();
SwFlyFrm* GetFrm( const Point* pDocPos = 0,
- const BOOL bCalcFrm = FALSE ) const;
+ const sal_Bool bCalcFrm = sal_False ) const;
SwAnchoredObject* GetAnchoredObj( const Point* pDocPos = 0,
- const BOOL bCalcFrm = FALSE ) const;
+ const sal_Bool bCalcFrm = sal_False ) const;
virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
- virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
// --> OD 2009-07-14 #i73249#
const String GetObjTitle() const;
diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx
index aa5ecc829364..9e645ee32e3c 100644
--- a/sw/inc/ftnidx.hxx
+++ b/sw/inc/ftnidx.hxx
@@ -52,7 +52,7 @@ public:
void UpdateFtn( const SwNodeIndex& rStt ); // ab Pos. alle Updaten
void UpdateAllFtn(); // alle Fussnoten updaten
- SwTxtFtn* SeekEntry( const SwNodeIndex& rIdx, USHORT* pPos = 0 ) const;
+ SwTxtFtn* SeekEntry( const SwNodeIndex& rIdx, sal_uInt16* pPos = 0 ) const;
};
@@ -69,8 +69,8 @@ public:
static const SwSectionNode* FindSectNdWithEndAttr(
const SwTxtFtn& rTxtFtn );
- USHORT GetNumber( const SwTxtFtn& rTxtFtn, const SwSectionNode& rNd );
- USHORT ChkNumber( const SwTxtFtn& rTxtFtn );
+ sal_uInt16 GetNumber( const SwTxtFtn& rTxtFtn, const SwSectionNode& rNd );
+ sal_uInt16 ChkNumber( const SwTxtFtn& rTxtFtn );
};
diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx
index c3b9f7c7dc13..6a5a5c583eba 100644
--- a/sw/inc/ftninfo.hxx
+++ b/sw/inc/ftninfo.hxx
@@ -50,7 +50,7 @@ protected:
bool m_bEndNote;
public:
SvxNumberType aFmt;
- USHORT nFtnOffset;
+ sal_uInt16 nFtnOffset;
void ChgPageDesc( SwPageDesc *pDesc );
SwPageDesc *GetPageDesc( SwDoc &rDoc ) const;
@@ -70,7 +70,7 @@ public:
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
SwEndNoteInfo & operator=(const SwEndNoteInfo&);
- BOOL operator==( const SwEndNoteInfo &rInf ) const;
+ sal_Bool operator==( const SwEndNoteInfo &rInf ) const;
SwEndNoteInfo( SwTxtFmtColl *pTxtColl = 0);
SwEndNoteInfo(const SwEndNoteInfo&);
@@ -107,7 +107,7 @@ public:
SwFtnInfo& operator=(const SwFtnInfo&);
- BOOL operator==( const SwFtnInfo &rInf ) const;
+ sal_Bool operator==( const SwFtnInfo &rInf ) const;
SwFtnInfo(SwTxtFmtColl* pTxtColl = 0);
SwFtnInfo(const SwFtnInfo&);
diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx
index bee336490450..28c24e16b48a 100644
--- a/sw/inc/grfatr.hxx
+++ b/sw/inc/grfatr.hxx
@@ -52,11 +52,11 @@ RES_MIRROR_GRAPH_END
class SW_DLLPUBLIC SwMirrorGrf : public SfxEnumItem
{
- BOOL bGrfToggle; // auf geraden Seiten Grafiken spiegeln
+ sal_Bool bGrfToggle; // auf geraden Seiten Grafiken spiegeln
public:
SwMirrorGrf( MirrorGraph eMiro = RES_MIRROR_GRAPH_DONT )
- : SfxEnumItem( RES_GRFATR_MIRRORGRF, static_cast< USHORT >(eMiro) ), bGrfToggle( sal_False )
+ : SfxEnumItem( RES_GRFATR_MIRRORGRF, static_cast< sal_uInt16 >(eMiro) ), bGrfToggle( sal_False )
{}
SwMirrorGrf( const SwMirrorGrf &rMirrorGrf )
: SfxEnumItem( RES_GRFATR_MIRRORGRF, rMirrorGrf.GetValue()),
@@ -67,7 +67,7 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
// pure virtual-Methiden von SfxEnumItem
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -75,10 +75,10 @@ public:
String &rText,
const IntlWrapper* pIntl = 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 );
inline SwMirrorGrf& operator=( const SwMirrorGrf& rMirrorGrf )
{
@@ -87,8 +87,8 @@ public:
return *this;
}
- inline BOOL IsGrfToggle() const { return bGrfToggle; }
- inline void SetGrfToggle( BOOL bNew ) { bGrfToggle = bNew; }
+ inline sal_Bool IsGrfToggle() const { return bGrfToggle; }
+ inline void SetGrfToggle( sal_Bool bNew ) { bGrfToggle = bNew; }
};
@@ -127,10 +127,10 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 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 SetUnrotatedSize( const Size& rSz ) { aUnrotatedSize = rSz; }
const Size& GetUnrotatedSize() const { return aUnrotatedSize; }
@@ -171,7 +171,7 @@ public:
class SwChannelGrf : public SfxInt16Item
{
protected:
- SwChannelGrf( sal_Int16 nVal, USHORT nWhichL )
+ SwChannelGrf( sal_Int16 nVal, sal_uInt16 nWhichL )
: SfxInt16Item( nWhichL, nVal )
{}
@@ -236,10 +236,10 @@ public:
String &rText,
const IntlWrapper* pIntl = 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 );
const double& GetValue() const { return nValue; }
@@ -276,16 +276,16 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 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 );
};
class SW_DLLPUBLIC SwDrawModeGrf : public SfxEnumItem
{
public:
- SwDrawModeGrf( USHORT nMode = 0 )
+ SwDrawModeGrf( sal_uInt16 nMode = 0 )
: SfxEnumItem( RES_GRFATR_DRAWMODE, nMode )
{}
@@ -293,17 +293,17 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
// pure virtual-Methiden von SfxEnumItem
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 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 );
};
@@ -312,58 +312,58 @@ public:
* Implementierung der GrafikAttribut Methoden vom SwAttrSet
******************************************************************************/
-inline const SwMirrorGrf &SwAttrSet::GetMirrorGrf(BOOL bInP) const
+inline const SwMirrorGrf &SwAttrSet::GetMirrorGrf(sal_Bool bInP) const
{ return (const SwMirrorGrf&)Get( RES_GRFATR_MIRRORGRF,bInP); }
-inline const SwCropGrf &SwAttrSet::GetCropGrf(BOOL bInP) const
+inline const SwCropGrf &SwAttrSet::GetCropGrf(sal_Bool bInP) const
{ return (const SwCropGrf&)Get( RES_GRFATR_CROPGRF,bInP); }
-inline const SwRotationGrf &SwAttrSet::GetRotationGrf(BOOL bInP) const
+inline const SwRotationGrf &SwAttrSet::GetRotationGrf(sal_Bool bInP) const
{ return (const SwRotationGrf&)Get( RES_GRFATR_ROTATION,bInP); }
-inline const SwLuminanceGrf &SwAttrSet::GetLuminanceGrf(BOOL bInP) const
+inline const SwLuminanceGrf &SwAttrSet::GetLuminanceGrf(sal_Bool bInP) const
{ return (const SwLuminanceGrf&)Get( RES_GRFATR_LUMINANCE,bInP); }
-inline const SwContrastGrf &SwAttrSet::GetContrastGrf(BOOL bInP) const
+inline const SwContrastGrf &SwAttrSet::GetContrastGrf(sal_Bool bInP) const
{ return (const SwContrastGrf&)Get( RES_GRFATR_CONTRAST,bInP); }
-inline const SwChannelRGrf &SwAttrSet::GetChannelRGrf(BOOL bInP) const
+inline const SwChannelRGrf &SwAttrSet::GetChannelRGrf(sal_Bool bInP) const
{ return (const SwChannelRGrf&)Get( RES_GRFATR_CHANNELR,bInP); }
-inline const SwChannelGGrf &SwAttrSet::GetChannelGGrf(BOOL bInP) const
+inline const SwChannelGGrf &SwAttrSet::GetChannelGGrf(sal_Bool bInP) const
{ return (const SwChannelGGrf&)Get( RES_GRFATR_CHANNELG,bInP); }
-inline const SwChannelBGrf &SwAttrSet::GetChannelBGrf(BOOL bInP) const
+inline const SwChannelBGrf &SwAttrSet::GetChannelBGrf(sal_Bool bInP) const
{ return (const SwChannelBGrf&)Get( RES_GRFATR_CHANNELB,bInP); }
-inline const SwGammaGrf &SwAttrSet::GetGammaGrf(BOOL bInP) const
+inline const SwGammaGrf &SwAttrSet::GetGammaGrf(sal_Bool bInP) const
{ return (const SwGammaGrf&)Get( RES_GRFATR_GAMMA,bInP); }
-inline const SwInvertGrf &SwAttrSet::GetInvertGrf(BOOL bInP) const
+inline const SwInvertGrf &SwAttrSet::GetInvertGrf(sal_Bool bInP) const
{ return (const SwInvertGrf&)Get( RES_GRFATR_INVERT,bInP); }
-inline const SwTransparencyGrf &SwAttrSet::GetTransparencyGrf(BOOL bInP) const
+inline const SwTransparencyGrf &SwAttrSet::GetTransparencyGrf(sal_Bool bInP) const
{ return (const SwTransparencyGrf&)Get( RES_GRFATR_TRANSPARENCY,bInP); }
-inline const SwDrawModeGrf &SwAttrSet::GetDrawModeGrf(BOOL bInP) const
+inline const SwDrawModeGrf &SwAttrSet::GetDrawModeGrf(sal_Bool bInP) const
{ return (const SwDrawModeGrf&)Get( RES_GRFATR_DRAWMODE,bInP); }
/******************************************************************************
* Implementierung der GrafikAttribut Methoden vom SwFmt
******************************************************************************/
-inline const SwMirrorGrf &SwFmt::GetMirrorGrf(BOOL bInP) const
+inline const SwMirrorGrf &SwFmt::GetMirrorGrf(sal_Bool bInP) const
{ return aSet.GetMirrorGrf(bInP); }
-inline const SwCropGrf &SwFmt::GetCropGrf(BOOL bInP) const
+inline const SwCropGrf &SwFmt::GetCropGrf(sal_Bool bInP) const
{ return aSet.GetCropGrf(bInP); }
-inline const SwRotationGrf &SwFmt::GetRotationGrf(BOOL bInP) const
+inline const SwRotationGrf &SwFmt::GetRotationGrf(sal_Bool bInP) const
{ return aSet.GetRotationGrf(bInP); }
-inline const SwLuminanceGrf &SwFmt::GetLuminanceGrf(BOOL bInP) const
+inline const SwLuminanceGrf &SwFmt::GetLuminanceGrf(sal_Bool bInP) const
{ return aSet.GetLuminanceGrf( bInP); }
-inline const SwContrastGrf &SwFmt::GetContrastGrf(BOOL bInP) const
+inline const SwContrastGrf &SwFmt::GetContrastGrf(sal_Bool bInP) const
{ return aSet.GetContrastGrf( bInP); }
-inline const SwChannelRGrf &SwFmt::GetChannelRGrf(BOOL bInP) const
+inline const SwChannelRGrf &SwFmt::GetChannelRGrf(sal_Bool bInP) const
{ return aSet.GetChannelRGrf( bInP); }
-inline const SwChannelGGrf &SwFmt::GetChannelGGrf(BOOL bInP) const
+inline const SwChannelGGrf &SwFmt::GetChannelGGrf(sal_Bool bInP) const
{ return aSet.GetChannelGGrf( bInP); }
-inline const SwChannelBGrf &SwFmt::GetChannelBGrf(BOOL bInP) const
+inline const SwChannelBGrf &SwFmt::GetChannelBGrf(sal_Bool bInP) const
{ return aSet.GetChannelBGrf( bInP); }
-inline const SwGammaGrf &SwFmt::GetGammaGrf(BOOL bInP) const
+inline const SwGammaGrf &SwFmt::GetGammaGrf(sal_Bool bInP) const
{ return aSet.GetGammaGrf( bInP); }
-inline const SwInvertGrf &SwFmt::GetInvertGrf(BOOL bInP) const
+inline const SwInvertGrf &SwFmt::GetInvertGrf(sal_Bool bInP) const
{ return aSet.GetInvertGrf( bInP); }
-inline const SwTransparencyGrf &SwFmt::GetTransparencyGrf(BOOL bInP) const
+inline const SwTransparencyGrf &SwFmt::GetTransparencyGrf(sal_Bool bInP) const
{ return aSet.GetTransparencyGrf( bInP); }
-inline const SwDrawModeGrf &SwFmt::GetDrawModeGrf(BOOL bInP) const
+inline const SwDrawModeGrf &SwFmt::GetDrawModeGrf(sal_Bool bInP) const
{ return aSet.GetDrawModeGrf(bInP); }
diff --git a/sw/inc/hfspacingitem.hxx b/sw/inc/hfspacingitem.hxx
index 3d5ed332455e..0a4103688335 100644
--- a/sw/inc/hfspacingitem.hxx
+++ b/sw/inc/hfspacingitem.hxx
@@ -37,8 +37,8 @@ class IntlWrapper;
class SW_DLLPUBLIC SwHeaderAndFooterEatSpacingItem : public SfxBoolItem
{
public:
- SwHeaderAndFooterEatSpacingItem( USHORT nId = RES_HEADER_FOOTER_EAT_SPACING,
- BOOL bPrt = FALSE ) : SfxBoolItem( nId, bPrt ) {}
+ SwHeaderAndFooterEatSpacingItem( sal_uInt16 nId = RES_HEADER_FOOTER_EAT_SPACING,
+ sal_Bool bPrt = sal_False ) : SfxBoolItem( nId, bPrt ) {}
// "pure virtual Methoden" vom SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -49,10 +49,10 @@ public:
const IntlWrapper* pIntl = 0 ) const;
};
-inline const SwHeaderAndFooterEatSpacingItem &SwAttrSet::GetHeaderAndFooterEatSpacing(BOOL bInP) const
+inline const SwHeaderAndFooterEatSpacingItem &SwAttrSet::GetHeaderAndFooterEatSpacing(sal_Bool bInP) const
{ return (const SwHeaderAndFooterEatSpacingItem&)Get( RES_HEADER_FOOTER_EAT_SPACING,bInP); }
-inline const SwHeaderAndFooterEatSpacingItem &SwFmt::GetHeaderAndFooterEatSpacing(BOOL bInP) const
+inline const SwHeaderAndFooterEatSpacingItem &SwFmt::GetHeaderAndFooterEatSpacing(sal_Bool bInP) const
{ return aSet.GetHeaderAndFooterEatSpacing(bInP); }
#endif
diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx
index 7f794757aa26..7b60590db033 100644
--- a/sw/inc/hhcwrp.hxx
+++ b/sw/inc/hhcwrp.hxx
@@ -51,8 +51,8 @@ class SwHHCWrapper : public editeng::HangulHanjaConversion
// SwPaM or SwPosition by replace operations!)
sal_Int32 nUnitOffset;
- USHORT nPageCount; // page count for progress bar
- USHORT nPageStart; // first checked page
+ sal_uInt16 nPageCount; // page count for progress bar
+ sal_uInt16 nPageStart; // first checked page
sal_Bool bIsDrawObj;
sal_Bool bIsStart;
@@ -83,8 +83,8 @@ class SwHHCWrapper : public editeng::HangulHanjaConversion
SwPaM *pCrsr );
void ChangeText_impl( const String &rNewText, sal_Bool bKeepAttributes );
- inline BOOL IsDrawObj() { return bIsDrawObj; }
- inline void SetDrawObj( BOOL bNew ) { bIsDrawObj = bNew; }
+ inline sal_Bool IsDrawObj() { return bIsDrawObj; }
+ inline void SetDrawObj( sal_Bool bNew ) { bIsDrawObj = bNew; }
protected:
virtual void GetNextPortion( ::rtl::OUString& rNextPortion,
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index 8a6f536ad46b..c7aa3638d90a 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -379,48 +379,48 @@ RES_FLTRATTR_END
#define RES_WHICHHINT_END HINT_END
-inline bool isATR(const USHORT nWhich)
+inline bool isATR(const sal_uInt16 nWhich)
{
return (RES_CHRATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich);
}
-inline bool isCHRATR(const USHORT nWhich)
+inline bool isCHRATR(const sal_uInt16 nWhich)
{
return (RES_CHRATR_BEGIN <= nWhich) && (RES_CHRATR_END > nWhich);
}
-inline bool isTXTATR_WITHEND(const USHORT nWhich)
+inline bool isTXTATR_WITHEND(const sal_uInt16 nWhich)
{
return (RES_TXTATR_WITHEND_BEGIN <= nWhich)
&& (RES_TXTATR_WITHEND_END > nWhich);
}
-inline bool isTXTATR_NOEND(const USHORT nWhich)
+inline bool isTXTATR_NOEND(const sal_uInt16 nWhich)
{
return (RES_TXTATR_NOEND_BEGIN <= nWhich)
&& (RES_TXTATR_NOEND_END > nWhich);
}
-inline bool isTXTATR(const USHORT nWhich)
+inline bool isTXTATR(const sal_uInt16 nWhich)
{
return (RES_TXTATR_BEGIN <= nWhich) && (RES_TXTATR_END > nWhich);
}
-inline bool isPARATR(const USHORT nWhich)
+inline bool isPARATR(const sal_uInt16 nWhich)
{
return (RES_PARATR_BEGIN <= nWhich) && (RES_PARATR_END > nWhich);
}
-inline bool isPARATR_LIST(const USHORT nWhich)
+inline bool isPARATR_LIST(const sal_uInt16 nWhich)
{
return (RES_PARATR_LIST_BEGIN <= nWhich) && (RES_PARATR_LIST_END > nWhich); }
-inline bool isFRMATR(const USHORT nWhich)
+inline bool isFRMATR(const sal_uInt16 nWhich)
{
return (RES_FRMATR_BEGIN <= nWhich) && (RES_FRMATR_END > nWhich);
}
-inline bool isGRFATR(const USHORT nWhich)
+inline bool isGRFATR(const sal_uInt16 nWhich)
{
return (RES_GRFATR_BEGIN <= nWhich) && (RES_GRFATR_END > nWhich);
}
-inline bool isBOXATR(const USHORT nWhich)
+inline bool isBOXATR(const sal_uInt16 nWhich)
{
return (RES_BOXATR_BEGIN <= nWhich) && (RES_BOXATR_END > nWhich);
}
-inline bool isUNKNOWNATR(const USHORT nWhich)
+inline bool isUNKNOWNATR(const sal_uInt16 nWhich)
{
return (RES_UNKNOWNATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich);
}
@@ -442,9 +442,9 @@ typedef SfxPoolItem* SwDfltAttrTab[ POOLATTR_END - POOLATTR_BEGIN ];
extern SwDfltAttrTab __FAR_DATA aAttrTab;
extern SfxItemInfo __FAR_DATA aSlotTab[];
-SW_DLLPUBLIC const SfxPoolItem* GetDfltAttr( USHORT nWhich );
+SW_DLLPUBLIC const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich );
-SW_DLLPUBLIC USHORT GetWhichOfScript( USHORT nWhich, USHORT nScript );
+SW_DLLPUBLIC sal_uInt16 GetWhichOfScript( sal_uInt16 nWhich, sal_uInt16 nScript );
// return for the given TextAttribut without an end the correct character.
// This function returns
@@ -456,31 +456,31 @@ sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr );
// alle Sets stehen im init.cxx
// AttrSet-Range fuer die 3 Break-Attribute
-extern USHORT __FAR_DATA aBreakSetRange[];
+extern sal_uInt16 __FAR_DATA aBreakSetRange[];
// AttrSet-Range fuer die TxtFmtColl
-extern USHORT __FAR_DATA aTxtFmtCollSetRange[];
+extern sal_uInt16 __FAR_DATA aTxtFmtCollSetRange[];
// AttrSet-Range fuer die GrfFmtColl
-extern USHORT __FAR_DATA aGrfFmtCollSetRange[];
+extern sal_uInt16 __FAR_DATA aGrfFmtCollSetRange[];
// AttrSet-Range fuer die TextNode
-SW_DLLPUBLIC extern USHORT __FAR_DATA aTxtNodeSetRange[];
+SW_DLLPUBLIC extern sal_uInt16 __FAR_DATA aTxtNodeSetRange[];
// AttrSet-Range fuer die NoTxtNode
-extern USHORT __FAR_DATA aNoTxtNodeSetRange[];
+extern sal_uInt16 __FAR_DATA aNoTxtNodeSetRange[];
// AttrSet-Range fuer die SwTable
-extern USHORT __FAR_DATA aTableSetRange[];
+extern sal_uInt16 __FAR_DATA aTableSetRange[];
// AttrSet-Range fuer die SwTableLine
-extern USHORT __FAR_DATA aTableLineSetRange[];
+extern sal_uInt16 __FAR_DATA aTableLineSetRange[];
// AttrSet-Range fuer die SwTableBox
-extern USHORT __FAR_DATA aTableBoxSetRange[];
+extern sal_uInt16 __FAR_DATA aTableBoxSetRange[];
// AttrSet-Range fuer die SwFrmFmt
-SW_DLLPUBLIC extern USHORT __FAR_DATA aFrmFmtSetRange[];
+SW_DLLPUBLIC extern sal_uInt16 __FAR_DATA aFrmFmtSetRange[];
// AttrSet-Range fuer die SwCharFmt
-extern USHORT __FAR_DATA aCharFmtSetRange[];
+extern sal_uInt16 __FAR_DATA aCharFmtSetRange[];
// AttrSet-Range fuer die character autostyles
-extern USHORT __FAR_DATA aCharAutoFmtSetRange[];
+extern sal_uInt16 __FAR_DATA aCharAutoFmtSetRange[];
// AttrSet-Range fuer die SwPageDescFmt
-extern USHORT __FAR_DATA aPgFrmFmtSetRange[];
+extern sal_uInt16 __FAR_DATA aPgFrmFmtSetRange[];
// check if ID is InRange of AttrSet-Ids
-BOOL IsInRange( const USHORT* pRange, const USHORT nId );
+sal_Bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId );
#endif
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index b706dbdeab21..8476d8542f70 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -48,7 +48,7 @@ class SwHistory;
class SwMsgPoolItem : public SfxPoolItem
{
public:
- SwMsgPoolItem( USHORT nWhich );
+ SwMsgPoolItem( sal_uInt16 nWhich );
// "Overhead" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
@@ -65,7 +65,7 @@ class SwPtrMsgPoolItem : public SwMsgPoolItem
public:
void * pObject;
- SwPtrMsgPoolItem( USHORT nId, void * pObj )
+ SwPtrMsgPoolItem( sal_uInt16 nId, void * pObj )
: SwMsgPoolItem( nId ), pObject( pObj )
{}
};
@@ -116,8 +116,8 @@ class SwUpdateAttr: public SwMsgPoolItem
public:
xub_StrLen nStart;
xub_StrLen nEnd;
- USHORT nWhichAttr;
- SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, USHORT nW );
+ sal_uInt16 nWhichAttr;
+ SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, sal_uInt16 nW );
};
@@ -161,10 +161,10 @@ public:
const String* pNewTblNm; // Split: der Name der neuen Tabelle
} DATA;
SwHistory* pHistory;
- USHORT nSplitLine; // Split: ab dieser BaseLine wird gespl.
+ sal_uInt16 nSplitLine; // Split: ab dieser BaseLine wird gespl.
TableFmlUpdtFlags eFlags;
- BOOL bModified : 1;
- BOOL bBehindSplitLine : 1;
+ sal_Bool bModified : 1;
+ sal_Bool bBehindSplitLine : 1;
SwTableFmlUpdate( const SwTable* );
};
@@ -186,7 +186,7 @@ public:
*/
class SwAttrSetChg: public SwMsgPoolItem
{
- BOOL bDelSet;
+ sal_Bool bDelSet;
SwAttrSet* pChgSet; // was sich veraendert hat
const SwAttrSet* pTheChgdSet; // wird nur zum Vergleichen gebraucht !!
public:
@@ -201,8 +201,8 @@ public:
// wo es sich geaendert hat
const SwAttrSet* GetTheChgdSet() const { return pTheChgdSet; }
- USHORT Count() const { return pChgSet->Count(); }
- void ClearItem( USHORT nWhichL = 0 )
+ sal_uInt16 Count() const { return pChgSet->Count(); }
+ void ClearItem( sal_uInt16 nWhichL = 0 )
#ifndef DBG_UTIL
{ pChgSet->ClearItem( nWhichL ); }
#else
@@ -253,7 +253,7 @@ public:
// // erzeuge die Liste aller Nodes der NumRule in dem angegebenem Doc
// // Der Code steht im docnum.cxx
// // #111955#
-// void MakeList( SwDoc& rDoc, BOOL bOutline = FALSE );
+// void MakeList( SwDoc& rDoc, sal_Bool bOutline = sal_False );
// const SwTxtNodeTable& GetTxtNodeList() const { return aList; }
//};
@@ -276,7 +276,7 @@ public:
const String& GetString() const { return sStr; }
- SwStringMsgPoolItem( USHORT nId, const String& rStr )
+ SwStringMsgPoolItem( sal_uInt16 nId, const String& rStr )
: SwMsgPoolItem( nId ), sStr( rStr )
{}
};
diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx
index ef16a2a89b86..cf95a232d9df 100644
--- a/sw/inc/htmltbl.hxx
+++ b/sw/inc/htmltbl.hxx
@@ -60,15 +60,15 @@ class SwHTMLTableLayoutCnts
// Inhalt durchgefuehrt wurde. Dazu werden sie mit einer Soll-Vorgabe
// verglichen. Wird 255 erreicht laufen sie bei 0 weiter. So wird
// eine Reinitialisierung bei jedem Resize vermieden.
- BYTE nPass1Done; // Wieoft wurde Pass 1 aufgerufen?
- BYTE nWidthSet; // Wieoft wurde die Breite gesetzt?
+ sal_uInt8 nPass1Done; // Wieoft wurde Pass 1 aufgerufen?
+ sal_uInt8 nWidthSet; // Wieoft wurde die Breite gesetzt?
- BOOL bNoBreakTag; // <NOBR>-Tag ueber gesamten Inhalt
+ sal_Bool bNoBreakTag; // <NOBR>-Tag ueber gesamten Inhalt
public:
SwHTMLTableLayoutCnts( const SwStartNode* pSttNd, SwHTMLTableLayout* pTab,
- BOOL bNoBreakTag, SwHTMLTableLayoutCnts* pNxt );
+ sal_Bool bNoBreakTag, SwHTMLTableLayoutCnts* pNxt );
~SwHTMLTableLayoutCnts();
@@ -82,13 +82,13 @@ public:
// Ermitteln des naechsten Knotens
SwHTMLTableLayoutCnts *GetNext() const { return pNext; }
- void SetWidthSet( BYTE nRef ) { nWidthSet = nRef; }
- BOOL IsWidthSet( BYTE nRef ) const { return nRef==nWidthSet; }
+ void SetWidthSet( sal_uInt8 nRef ) { nWidthSet = nRef; }
+ sal_Bool IsWidthSet( sal_uInt8 nRef ) const { return nRef==nWidthSet; }
- void SetPass1Done( BYTE nRef ) { nPass1Done = nRef; }
- BOOL IsPass1Done( BYTE nRef ) const { return nRef==nPass1Done; }
+ void SetPass1Done( sal_uInt8 nRef ) { nPass1Done = nRef; }
+ sal_Bool IsPass1Done( sal_uInt8 nRef ) const { return nRef==nPass1Done; }
- BOOL HasNoBreakTag() const { return bNoBreakTag; }
+ sal_Bool HasNoBreakTag() const { return bNoBreakTag; }
};
/* */
@@ -97,19 +97,19 @@ class SwHTMLTableLayoutCell
{
SwHTMLTableLayoutCnts *pContents; // der Inhalt der Zelle
- USHORT nRowSpan; // ROWSPAN der Zelle
- USHORT nColSpan; // COLSPAN der Zelle
- USHORT nWidthOption;// angegebene Breite der Zelle in Twip oder %
+ sal_uInt16 nRowSpan; // ROWSPAN der Zelle
+ sal_uInt16 nColSpan; // COLSPAN der Zelle
+ sal_uInt16 nWidthOption;// angegebene Breite der Zelle in Twip oder %
- BOOL bPrcWidthOption : 1;// nWidth ist %-Angabe
- BOOL bNoWrapOption : 1; // NOWRAP-Option
+ sal_Bool bPrcWidthOption : 1;// nWidth ist %-Angabe
+ sal_Bool bNoWrapOption : 1; // NOWRAP-Option
public:
SwHTMLTableLayoutCell( SwHTMLTableLayoutCnts *pCnts,
- USHORT nRSpan, USHORT nCSpan,
- USHORT nWidthOpt, BOOL bPrcWdthOpt,
- BOOL nNWrapOpt );
+ sal_uInt16 nRSpan, sal_uInt16 nCSpan,
+ sal_uInt16 nWidthOpt, sal_Bool bPrcWdthOpt,
+ sal_Bool nNWrapOpt );
~SwHTMLTableLayoutCell();
@@ -120,14 +120,14 @@ public:
inline void SetProtected();
// ROWSPAN/COLSPAN der Zelle Setzen/Ermitteln
- void SetRowSpan( USHORT nRSpan ) { nRowSpan = nRSpan; }
- USHORT GetRowSpan() const { return nRowSpan; }
- USHORT GetColSpan() const { return nColSpan; }
+ void SetRowSpan( sal_uInt16 nRSpan ) { nRowSpan = nRSpan; }
+ sal_uInt16 GetRowSpan() const { return nRowSpan; }
+ sal_uInt16 GetColSpan() const { return nColSpan; }
- USHORT GetWidthOption() const { return nWidthOption; }
- BOOL IsPrcWidthOption() const { return bPrcWidthOption; }
+ sal_uInt16 GetWidthOption() const { return nWidthOption; }
+ sal_Bool IsPrcWidthOption() const { return bPrcWidthOption; }
- BOOL HasNoWrapOption() const { return bNoWrapOption; }
+ sal_Bool HasNoWrapOption() const { return bNoWrapOption; }
};
/* */
@@ -135,53 +135,53 @@ public:
class SwHTMLTableLayoutColumn
{
// Zwischenwerte von AutoLayoutPass1
- ULONG nMinNoAlign, nMaxNoAlign, nAbsMinNoAlign;
+ sal_uLong nMinNoAlign, nMaxNoAlign, nAbsMinNoAlign;
// Ergebnisse von AutoLayoutPass1
- ULONG nMin, nMax;
+ sal_uLong nMin, nMax;
// Ergibnisse von Pass 2
- USHORT nAbsColWidth; // in Twips
- USHORT nRelColWidth; // in Twips bzw. relativ zu USHRT_MAX
+ sal_uInt16 nAbsColWidth; // in Twips
+ sal_uInt16 nRelColWidth; // in Twips bzw. relativ zu USHRT_MAX
- USHORT nWidthOption; // Optionen von <COL> oder <TD>/<TH>
+ sal_uInt16 nWidthOption; // Optionen von <COL> oder <TD>/<TH>
- BOOL bRelWidthOption : 1;
- BOOL bLeftBorder : 1;
+ sal_Bool bRelWidthOption : 1;
+ sal_Bool bLeftBorder : 1;
public:
- SwHTMLTableLayoutColumn( USHORT nColWidthOpt, BOOL bRelColWidthOpt,
- BOOL bLBorder );
+ SwHTMLTableLayoutColumn( sal_uInt16 nColWidthOpt, sal_Bool bRelColWidthOpt,
+ sal_Bool bLBorder );
~SwHTMLTableLayoutColumn() {}
- inline void MergeCellWidthOption( USHORT nWidth, BOOL bPrc );
- inline void SetWidthOption( USHORT nWidth, BOOL bRelWidth, BOOL bTest );
+ inline void MergeCellWidthOption( sal_uInt16 nWidth, sal_Bool bPrc );
+ inline void SetWidthOption( sal_uInt16 nWidth, sal_Bool bRelWidth, sal_Bool bTest );
- USHORT GetWidthOption() const { return nWidthOption; }
- BOOL IsRelWidthOption() const { return bRelWidthOption; }
+ sal_uInt16 GetWidthOption() const { return nWidthOption; }
+ sal_Bool IsRelWidthOption() const { return bRelWidthOption; }
- inline void MergeMinMaxNoAlign( ULONG nMin, ULONG nMax, ULONG nAbsMin );
- ULONG GetMinNoAlign() const { return nMinNoAlign; }
- ULONG GetMaxNoAlign() const { return nMaxNoAlign; }
- ULONG GetAbsMinNoAlign() const { return nAbsMinNoAlign; }
- inline void ClearPass1Info( BOOL bWidthOpt );
+ inline void MergeMinMaxNoAlign( sal_uLong nMin, sal_uLong nMax, sal_uLong nAbsMin );
+ sal_uLong GetMinNoAlign() const { return nMinNoAlign; }
+ sal_uLong GetMaxNoAlign() const { return nMaxNoAlign; }
+ sal_uLong GetAbsMinNoAlign() const { return nAbsMinNoAlign; }
+ inline void ClearPass1Info( sal_Bool bWidthOpt );
- inline void SetMinMax( ULONG nMin, ULONG nMax );
- void SetMax( ULONG nVal ) { nMax = nVal; }
- void AddToMin( ULONG nVal ) { nMin += nVal; }
- void AddToMax( ULONG nVal ) { nMax += nVal; }
- ULONG GetMin() const { return nMin; }
- ULONG GetMax() const { return nMax; }
+ inline void SetMinMax( sal_uLong nMin, sal_uLong nMax );
+ void SetMax( sal_uLong nVal ) { nMax = nVal; }
+ void AddToMin( sal_uLong nVal ) { nMin += nVal; }
+ void AddToMax( sal_uLong nVal ) { nMax += nVal; }
+ sal_uLong GetMin() const { return nMin; }
+ sal_uLong GetMax() const { return nMax; }
- void SetAbsColWidth( USHORT nWidth ) { nAbsColWidth = nWidth; }
- USHORT GetAbsColWidth() const { return nAbsColWidth; }
+ void SetAbsColWidth( sal_uInt16 nWidth ) { nAbsColWidth = nWidth; }
+ sal_uInt16 GetAbsColWidth() const { return nAbsColWidth; }
- void SetRelColWidth( USHORT nWidth ) { nRelColWidth = nWidth; }
- USHORT GetRelColWidth() const { return nRelColWidth; }
+ void SetRelColWidth( sal_uInt16 nWidth ) { nRelColWidth = nWidth; }
+ sal_uInt16 GetRelColWidth() const { return nRelColWidth; }
- BOOL HasLeftBorder() const { return bLeftBorder; }
+ sal_Bool HasLeftBorder() const { return bLeftBorder; }
};
/* */
@@ -197,65 +197,65 @@ class SwHTMLTableLayout
SwTableBox *pLeftFillerBox; // linke Filler-Zelle (nur Tab in Tab)
SwTableBox *pRightFillerBox; // rechte Filler-Zelle (nur Tab-in Tab)
- ULONG nMin; // minimale Breite der Tabelle (Twips)
- ULONG nMax; // maximale Breite der Tabelle (Twips)
+ sal_uLong nMin; // minimale Breite der Tabelle (Twips)
+ sal_uLong nMax; // maximale Breite der Tabelle (Twips)
- USHORT nRows; // Anzahl Zeilen
- USHORT nCols; // Anzahl Spalten
+ sal_uInt16 nRows; // Anzahl Zeilen
+ sal_uInt16 nCols; // Anzahl Spalten
- USHORT nLeftMargin; // Abstand zum linken Rand (aus Absatz)
- USHORT nRightMargin; // Abstand zum rechten Rand (aus Absatz)
+ sal_uInt16 nLeftMargin; // Abstand zum linken Rand (aus Absatz)
+ sal_uInt16 nRightMargin; // Abstand zum rechten Rand (aus Absatz)
- USHORT nInhAbsLeftSpace; // von umgebender Zelle geerbter Abstand,
- USHORT nInhAbsRightSpace; // der Zellen zugeschlagen wurde
+ sal_uInt16 nInhAbsLeftSpace; // von umgebender Zelle geerbter Abstand,
+ sal_uInt16 nInhAbsRightSpace; // der Zellen zugeschlagen wurde
- USHORT nRelLeftFill; // relative Breiten der Zellen zur
- USHORT nRelRightFill; // Ausrichtung von Tabellen in Tabellen
+ sal_uInt16 nRelLeftFill; // relative Breiten der Zellen zur
+ sal_uInt16 nRelRightFill; // Ausrichtung von Tabellen in Tabellen
- USHORT nRelTabWidth; // Die relative Breite der Tabelle
+ sal_uInt16 nRelTabWidth; // Die relative Breite der Tabelle
- USHORT nWidthOption; // die Breite der Tabelle (in Twip oder %)
- USHORT nCellPadding; // Abstand zum Inhalt (in Twip)
- USHORT nCellSpacing; // Absatnd zwischen Zellen (in Twip)
- USHORT nBorder; // Dicke der ausseren Umrandung bzw.
+ sal_uInt16 nWidthOption; // die Breite der Tabelle (in Twip oder %)
+ sal_uInt16 nCellPadding; // Abstand zum Inhalt (in Twip)
+ sal_uInt16 nCellSpacing; // Absatnd zwischen Zellen (in Twip)
+ sal_uInt16 nBorder; // Dicke der ausseren Umrandung bzw.
// Platz, den Netscape hierfuer einrechnet.
- USHORT nLeftBorderWidth;
- USHORT nRightBorderWidth;
- USHORT nInhLeftBorderWidth;
- USHORT nInhRightBorderWidth;
- USHORT nBorderWidth;
+ sal_uInt16 nLeftBorderWidth;
+ sal_uInt16 nRightBorderWidth;
+ sal_uInt16 nInhLeftBorderWidth;
+ sal_uInt16 nInhRightBorderWidth;
+ sal_uInt16 nBorderWidth;
- USHORT nDelayedResizeAbsAvail; // Param fuer's verzoegerte Resize
- USHORT nLastResizeAbsAvail;
+ sal_uInt16 nDelayedResizeAbsAvail; // Param fuer's verzoegerte Resize
+ sal_uInt16 nLastResizeAbsAvail;
- BYTE nPass1Done; // Vorgabe-Werte fuer die einzelen
- BYTE nWidthSet; // Schleifen-Durchlauefe
+ sal_uInt8 nPass1Done; // Vorgabe-Werte fuer die einzelen
+ sal_uInt8 nWidthSet; // Schleifen-Durchlauefe
SvxAdjust eTableAdjust; // Die Ausrichtung der Tabelle
- BOOL bColsOption : 1; // Tabelle besitzt eine COLS-Option
- BOOL bColTags : 1; // Tabelle besitzt COL/COLGRP-Tags
- BOOL bPrcWidthOption : 1; // Breite ist eine %-Angabe
- BOOL bUseRelWidth : 1; // SwTable bekommt relative Breite
+ sal_Bool bColsOption : 1; // Tabelle besitzt eine COLS-Option
+ sal_Bool bColTags : 1; // Tabelle besitzt COL/COLGRP-Tags
+ sal_Bool bPrcWidthOption : 1; // Breite ist eine %-Angabe
+ sal_Bool bUseRelWidth : 1; // SwTable bekommt relative Breite
- BOOL bMustResize : 1; // Tabelle muss in der Breite ang. werden
- BOOL bExportable : 1; // Layout kann zum Export genutzt werden
- BOOL bBordersChanged : 1; // Umrandung wurde geaendert
- BOOL bMayBeInFlyFrame : 1; // Die Tabelle koennte im Rahmen sein
+ sal_Bool bMustResize : 1; // Tabelle muss in der Breite ang. werden
+ sal_Bool bExportable : 1; // Layout kann zum Export genutzt werden
+ sal_Bool bBordersChanged : 1; // Umrandung wurde geaendert
+ sal_Bool bMayBeInFlyFrame : 1; // Die Tabelle koennte im Rahmen sein
- BOOL bDelayedResizeRecalc : 1; // Param fuer's verzoegerte Resize
- BOOL bMustNotResize : 1; // Die Tabelle darf nicht reseized werden
- BOOL bMustNotRecalc : 1; // Tabelle darf nicht an Inhalt angepasst
+ sal_Bool bDelayedResizeRecalc : 1; // Param fuer's verzoegerte Resize
+ sal_Bool bMustNotResize : 1; // Die Tabelle darf nicht reseized werden
+ sal_Bool bMustNotRecalc : 1; // Tabelle darf nicht an Inhalt angepasst
// werden
-// USHORT GetLeftBorderWidth( USHORT nCol ) const;
-// USHORT GetRightBorderWidth( USHORT nCol, USHORT nColSpan ) const;
+// sal_uInt16 GetLeftBorderWidth( sal_uInt16 nCol ) const;
+// sal_uInt16 GetRightBorderWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
- void AddBorderWidth( ULONG &rMin, ULONG &rMax, ULONG& rAbsMin,
- USHORT nCol, USHORT nColSpan,
- BOOL bSwBorders=TRUE ) const;
- void SetBoxWidth( SwTableBox *pBox, USHORT nCol, USHORT nColSpan ) const;
+ void AddBorderWidth( sal_uLong &rMin, sal_uLong &rMax, sal_uLong& rAbsMin,
+ sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders=sal_True ) const;
+ void SetBoxWidth( SwTableBox *pBox, sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
const SwStartNode *GetAnyBoxStartNode() const;
SwFrmFmt *FindFlyFrmFmt() const;
@@ -263,68 +263,68 @@ class SwHTMLTableLayout
void ClearPass1Info() { nMin = nMax = 0; }
- void _Resize( USHORT nAbsAvail, BOOL bRecalc=FALSE );
+ void _Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False );
DECL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void* );
- static USHORT GetBrowseWidthByVisArea( const SwDoc& rDoc );
+ static sal_uInt16 GetBrowseWidthByVisArea( const SwDoc& rDoc );
public:
SwHTMLTableLayout( const SwTable *pSwTbl,
- USHORT nRows, USHORT nCols, BOOL bColsOpt, BOOL ColTgs,
- USHORT nWidth, BOOL bPrcWidth, USHORT nBorderOpt,
- USHORT nCellPad, USHORT nCellSp, SvxAdjust eAdjust,
- USHORT nLMargin, USHORT nRMargin, USHORT nBWidth,
- USHORT nLeftBWidth, USHORT nRightBWidth,
- USHORT nInhLeftBWidth, USHORT nInhRightBWidth );
+ sal_uInt16 nRows, sal_uInt16 nCols, sal_Bool bColsOpt, sal_Bool ColTgs,
+ sal_uInt16 nWidth, sal_Bool bPrcWidth, sal_uInt16 nBorderOpt,
+ sal_uInt16 nCellPad, sal_uInt16 nCellSp, SvxAdjust eAdjust,
+ sal_uInt16 nLMargin, sal_uInt16 nRMargin, sal_uInt16 nBWidth,
+ sal_uInt16 nLeftBWidth, sal_uInt16 nRightBWidth,
+ sal_uInt16 nInhLeftBWidth, sal_uInt16 nInhRightBWidth );
~SwHTMLTableLayout();
- USHORT GetLeftCellSpace( USHORT nCol, USHORT nColSpan,
- BOOL bSwBorders=TRUE ) const;
- USHORT GetRightCellSpace( USHORT nCol, USHORT nColSpan,
- BOOL bSwBorders=TRUE ) const;
- inline USHORT GetInhCellSpace( USHORT nCol, USHORT nColSpan ) const;
+ sal_uInt16 GetLeftCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders=sal_True ) const;
+ sal_uInt16 GetRightCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders=sal_True ) const;
+ inline sal_uInt16 GetInhCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
- inline void SetInhBorderWidths( USHORT nLeft, USHORT nRight );
+ inline void SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight );
- void GetAvail( USHORT nCol, USHORT nColSpan, USHORT& rAbsAvail,
- USHORT& rRelAvail ) const;
+ void GetAvail( sal_uInt16 nCol, sal_uInt16 nColSpan, sal_uInt16& rAbsAvail,
+ sal_uInt16& rRelAvail ) const;
void AutoLayoutPass1();
- void AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
- USHORT nAbsLeftSpace, USHORT nAbsRightSpace,
- USHORT nParentInhSpace );
- void SetWidths( BOOL bCallPass2=FALSE, USHORT nAbsAvail=0,
- USHORT nRelAvail=0, USHORT nAbsLeftSpace=0,
- USHORT nAbsRightSpace=0,
- USHORT nParentInhSpace=0 );
+ void AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAvail,
+ sal_uInt16 nAbsLeftSpace, sal_uInt16 nAbsRightSpace,
+ sal_uInt16 nParentInhSpace );
+ void SetWidths( sal_Bool bCallPass2=sal_False, sal_uInt16 nAbsAvail=0,
+ sal_uInt16 nRelAvail=0, sal_uInt16 nAbsLeftSpace=0,
+ sal_uInt16 nAbsRightSpace=0,
+ sal_uInt16 nParentInhSpace=0 );
- inline SwHTMLTableLayoutColumn *GetColumn( USHORT nCol ) const;
- inline void SetColumn( SwHTMLTableLayoutColumn *pCol, USHORT nCol );
+ inline SwHTMLTableLayoutColumn *GetColumn( sal_uInt16 nCol ) const;
+ inline void SetColumn( SwHTMLTableLayoutColumn *pCol, sal_uInt16 nCol );
- inline SwHTMLTableLayoutCell *GetCell( USHORT nRow, USHORT nCol ) const;
- inline void SetCell( SwHTMLTableLayoutCell *pCell, USHORT nRow, USHORT nCol );
+ inline SwHTMLTableLayoutCell *GetCell( sal_uInt16 nRow, sal_uInt16 nCol ) const;
+ inline void SetCell( SwHTMLTableLayoutCell *pCell, sal_uInt16 nRow, sal_uInt16 nCol );
void SetLeftFillerBox( SwTableBox *pBox ) { pLeftFillerBox = pBox; }
void SetRightFillerBox( SwTableBox *pBox ) { pRightFillerBox = pBox; }
- ULONG GetMin() const { return nMin; }
- ULONG GetMax() const { return nMax; }
- USHORT GetRelLeftFill() const { return nRelLeftFill; }
- USHORT GetRelRightFill() const { return nRelRightFill; }
+ sal_uLong GetMin() const { return nMin; }
+ sal_uLong GetMax() const { return nMax; }
+ sal_uInt16 GetRelLeftFill() const { return nRelLeftFill; }
+ sal_uInt16 GetRelRightFill() const { return nRelRightFill; }
inline long GetBrowseWidthMin() const;
- BOOL HasColsOption() const { return bColsOption; }
- BOOL HasColTags() const { return bColTags; }
+ sal_Bool HasColsOption() const { return bColsOption; }
+ sal_Bool HasColTags() const { return bColTags; }
- BOOL IsTopTable() const { return pSwTable != 0; }
+ sal_Bool IsTopTable() const { return pSwTable != 0; }
- void SetMustResize( BOOL bSet ) { bMustResize = bSet; }
- void SetMustNotResize( BOOL bSet ) { bMustNotResize = bSet; }
- void SetMustNotRecalc( BOOL bSet ) { bMustNotRecalc = bSet; }
+ void SetMustResize( sal_Bool bSet ) { bMustResize = bSet; }
+ void SetMustNotResize( sal_Bool bSet ) { bMustNotResize = bSet; }
+ void SetMustNotRecalc( sal_Bool bSet ) { bMustNotRecalc = bSet; }
// Neueberechnung der Tabellenbreiten fuer die uebergebene verfuegbare
// Breite.
@@ -340,41 +340,41 @@ public:
// eventuell noch asstehende Resize-Aufrufe werden nicht mehr
// ausgefuehrt.
// - Der Rueckgabewert gibt an, ob sich die Tabelle geaendert hat.
- BOOL Resize( USHORT nAbsAvail, BOOL bRecalc=FALSE, BOOL bForce=FALSE,
- ULONG nDelay=0 );
+ sal_Bool Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False, sal_Bool bForce=sal_False,
+ sal_uLong nDelay=0 );
- void BordersChanged( USHORT nAbsAvail, BOOL bRecalc=FALSE );
+ void BordersChanged( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False );
// Ermitteln der verfuegbaren Breite. Das geht nur, wenn ein Layout
// oder eine ViewShell vorhanden ist. Sonst wird 0 zurueckgegeben.
// (Wird vom HTML-Filter benoetigt, da der nicht an das Layout kommt.)
- static USHORT GetBrowseWidth( const SwDoc& rDoc );
+ static sal_uInt16 GetBrowseWidth( const SwDoc& rDoc );
// Ermitteln der verfuegbaren Breite uber den Tabellen-Frame
- USHORT GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const;
+ sal_uInt16 GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const;
// Ermitteln der verfuegbaren Breite uber den Tabellen-Frame oder
// das statische GetBrowseWidth, wenn kein Layout existiert.
- USHORT GetBrowseWidthByTable( const SwDoc& rDoc ) const;
+ sal_uInt16 GetBrowseWidthByTable( const SwDoc& rDoc ) const;
// Fuer Export
- USHORT GetWidthOption() const { return nWidthOption; }
- BOOL HasPrcWidthOption() const { return bPrcWidthOption; }
+ sal_uInt16 GetWidthOption() const { return nWidthOption; }
+ sal_Bool HasPrcWidthOption() const { return bPrcWidthOption; }
- USHORT GetCellPadding() const { return nCellPadding; }
- USHORT GetCellSpacing() const { return nCellSpacing; }
- USHORT GetBorder() const { return nBorder; }
+ sal_uInt16 GetCellPadding() const { return nCellPadding; }
+ sal_uInt16 GetCellSpacing() const { return nCellSpacing; }
+ sal_uInt16 GetBorder() const { return nBorder; }
- USHORT GetRowCount() const { return nRows; }
- USHORT GetColCount() const { return nCols; }
+ sal_uInt16 GetRowCount() const { return nRows; }
+ sal_uInt16 GetColCount() const { return nCols; }
- void SetExportable( BOOL bSet ) { bExportable = bSet; }
- BOOL IsExportable() const { return bExportable; }
+ void SetExportable( sal_Bool bSet ) { bExportable = bSet; }
+ sal_Bool IsExportable() const { return bExportable; }
- BOOL HaveBordersChanged() const { return bBordersChanged; }
+ sal_Bool HaveBordersChanged() const { return bBordersChanged; }
- void SetMayBeInFlyFrame( BOOL bSet ) { bMayBeInFlyFrame = bSet; }
- BOOL MayBeInFlyFrame() const { return bMayBeInFlyFrame; }
+ void SetMayBeInFlyFrame( sal_Bool bSet ) { bMayBeInFlyFrame = bSet; }
+ sal_Bool MayBeInFlyFrame() const { return bMayBeInFlyFrame; }
};
/* */
@@ -389,8 +389,8 @@ inline void SwHTMLTableLayoutCell::SetProtected()
/* */
-inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( ULONG nCMin,
- ULONG nCMax, ULONG nAbsMin )
+inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( sal_uLong nCMin,
+ sal_uLong nCMax, sal_uLong nAbsMin )
{
if( nCMin > nMinNoAlign )
nMinNoAlign = nCMin;
@@ -400,19 +400,19 @@ inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( ULONG nCMin,
nAbsMinNoAlign = nAbsMin;
}
-inline void SwHTMLTableLayoutColumn::ClearPass1Info( BOOL bWidthOpt )
+inline void SwHTMLTableLayoutColumn::ClearPass1Info( sal_Bool bWidthOpt )
{
nMinNoAlign = nMaxNoAlign = nAbsMinNoAlign = MINLAY;
nMin = nMax = 0;
if( bWidthOpt )
{
nWidthOption = 0;
- bRelWidthOption = FALSE;
+ bRelWidthOption = sal_False;
}
}
inline void SwHTMLTableLayoutColumn::MergeCellWidthOption(
- USHORT nWidth, BOOL bRel )
+ sal_uInt16 nWidth, sal_Bool bRel )
{
if( !nWidthOption ||
(bRel==bRelWidthOption && nWidthOption < nWidth) )
@@ -422,7 +422,7 @@ inline void SwHTMLTableLayoutColumn::MergeCellWidthOption(
}
}
-inline void SwHTMLTableLayoutColumn::SetMinMax( ULONG nMn, ULONG nMx )
+inline void SwHTMLTableLayoutColumn::SetMinMax( sal_uLong nMn, sal_uLong nMx )
{
nMin = nMn;
nMax = nMx;
@@ -430,25 +430,25 @@ inline void SwHTMLTableLayoutColumn::SetMinMax( ULONG nMn, ULONG nMx )
/* */
-inline USHORT SwHTMLTableLayout::GetInhCellSpace( USHORT nCol,
- USHORT nColSpan ) const
+inline sal_uInt16 SwHTMLTableLayout::GetInhCellSpace( sal_uInt16 nCol,
+ sal_uInt16 nColSpan ) const
{
- USHORT nSpace = 0;
+ sal_uInt16 nSpace = 0;
if( nCol==0 )
- nSpace = nSpace + sal::static_int_cast< USHORT >(nInhAbsLeftSpace);
+ nSpace = nSpace + sal::static_int_cast< sal_uInt16 >(nInhAbsLeftSpace);
if( nCol+nColSpan==nCols )
- nSpace = nSpace + sal::static_int_cast< USHORT >(nInhAbsRightSpace);
+ nSpace = nSpace + sal::static_int_cast< sal_uInt16 >(nInhAbsRightSpace);
return nSpace;
}
-inline SwHTMLTableLayoutColumn *SwHTMLTableLayout::GetColumn( USHORT nCol ) const
+inline SwHTMLTableLayoutColumn *SwHTMLTableLayout::GetColumn( sal_uInt16 nCol ) const
{
return aColumns[nCol];
}
inline void SwHTMLTableLayoutColumn::SetWidthOption(
- USHORT nWidth, BOOL bRelWidth, BOOL bTest )
+ sal_uInt16 nWidth, sal_Bool bRelWidth, sal_Bool bTest )
{
if( bTest && bRelWidthOption==bRelWidth )
{
@@ -460,18 +460,18 @@ inline void SwHTMLTableLayoutColumn::SetWidthOption(
bRelWidthOption = bRelWidth;
}
-inline void SwHTMLTableLayout::SetColumn( SwHTMLTableLayoutColumn *pCol, USHORT nCol )
+inline void SwHTMLTableLayout::SetColumn( SwHTMLTableLayoutColumn *pCol, sal_uInt16 nCol )
{
aColumns[nCol] = pCol;
}
-inline SwHTMLTableLayoutCell *SwHTMLTableLayout::GetCell( USHORT nRow, USHORT nCol ) const
+inline SwHTMLTableLayoutCell *SwHTMLTableLayout::GetCell( sal_uInt16 nRow, sal_uInt16 nCol ) const
{
return aCells[nRow*nCols+nCol];
}
inline void SwHTMLTableLayout::SetCell( SwHTMLTableLayoutCell *pCell,
- USHORT nRow, USHORT nCol )
+ sal_uInt16 nRow, sal_uInt16 nCol )
{
aCells[nRow*nCols+nCol] = pCell;
}
@@ -481,7 +481,7 @@ inline long SwHTMLTableLayout::GetBrowseWidthMin() const
return (long)( (!nWidthOption || bPrcWidthOption) ? nMin : nRelTabWidth );
}
-void SwHTMLTableLayout::SetInhBorderWidths( USHORT nLeft, USHORT nRight )
+void SwHTMLTableLayout::SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight )
{
nInhLeftBorderWidth = nLeft;
nInhRightBorderWidth = nRight;
diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx
index 5b9dd827108e..fd5ba88b0a69 100644
--- a/sw/inc/index.hxx
+++ b/sw/inc/index.hxx
@@ -80,22 +80,22 @@ public:
INLINE xub_StrLen operator+=( const SwIndex& );
INLINE xub_StrLen operator-=( const SwIndex& );
- INLINE BOOL operator<( const SwIndex& ) const;
- INLINE BOOL operator<=( const SwIndex& ) const;
- INLINE BOOL operator>( const SwIndex& ) const;
- INLINE BOOL operator>=( const SwIndex& ) const;
- BOOL operator==( const SwIndex& rSwIndex ) const
+ INLINE sal_Bool operator<( const SwIndex& ) const;
+ INLINE sal_Bool operator<=( const SwIndex& ) const;
+ INLINE sal_Bool operator>( const SwIndex& ) const;
+ INLINE sal_Bool operator>=( const SwIndex& ) const;
+ sal_Bool operator==( const SwIndex& rSwIndex ) const
{ return (nIndex == rSwIndex.nIndex) && (pArray == rSwIndex.pArray); }
- BOOL operator!=( const SwIndex& rSwIndex ) const
+ sal_Bool operator!=( const SwIndex& rSwIndex ) const
{ return (nIndex != rSwIndex.nIndex) || (pArray != rSwIndex.pArray); }
- BOOL operator<( xub_StrLen nWert ) const { return nIndex < nWert; }
- BOOL operator<=( xub_StrLen nWert ) const { return nIndex <= nWert; }
- BOOL operator>( xub_StrLen nWert ) const { return nIndex > nWert; }
- BOOL operator>=( xub_StrLen nWert ) const { return nIndex >= nWert; }
- BOOL operator==( xub_StrLen nWert ) const { return nIndex == nWert; }
- BOOL operator!=( xub_StrLen nWert ) const { return nIndex != nWert; }
+ sal_Bool operator<( xub_StrLen nWert ) const { return nIndex < nWert; }
+ sal_Bool operator<=( xub_StrLen nWert ) const { return nIndex <= nWert; }
+ sal_Bool operator>( xub_StrLen nWert ) const { return nIndex > nWert; }
+ sal_Bool operator>=( xub_StrLen nWert ) const { return nIndex >= nWert; }
+ sal_Bool operator==( xub_StrLen nWert ) const { return nIndex == nWert; }
+ sal_Bool operator!=( xub_StrLen nWert ) const { return nIndex != nWert; }
INLINE SwIndex& operator=( xub_StrLen );
SwIndex& operator=( const SwIndex & );
@@ -134,7 +134,7 @@ protected:
void ChkArr();
- BOOL HasAnyIndex() const { return 0 != pFirst; }
+ sal_Bool HasAnyIndex() const { return 0 != pFirst; }
public:
SwIndexReg();
@@ -189,19 +189,19 @@ inline xub_StrLen SwIndex::operator-=( const SwIndex& rIndex )
return ChgValue( *this, nIndex - rIndex.nIndex ).nIndex;
}
-inline BOOL SwIndex::operator<( const SwIndex& rIndex ) const
+inline sal_Bool SwIndex::operator<( const SwIndex& rIndex ) const
{
return nIndex < rIndex.nIndex;
}
-inline BOOL SwIndex::operator<=( const SwIndex& rIndex ) const
+inline sal_Bool SwIndex::operator<=( const SwIndex& rIndex ) const
{
return nIndex <= rIndex.nIndex;
}
-inline BOOL SwIndex::operator>( const SwIndex& rIndex ) const
+inline sal_Bool SwIndex::operator>( const SwIndex& rIndex ) const
{
return nIndex > rIndex.nIndex;
}
-inline BOOL SwIndex::operator>=( const SwIndex& rIndex ) const
+inline sal_Bool SwIndex::operator>=( const SwIndex& rIndex ) const
{
return nIndex >= rIndex.nIndex;
}
diff --git a/sw/inc/inetfld.hxx b/sw/inc/inetfld.hxx
index de3f81c49e31..4160928ea8ce 100644
--- a/sw/inc/inetfld.hxx
+++ b/sw/inc/inetfld.hxx
@@ -74,7 +74,7 @@ class SwINetField : public SwField
public:
// Direkte Eingabe alten Wert loeschen
- SwINetField( SwINetFieldType* pTyp, USHORT nFmt,
+ SwINetField( SwINetFieldType* pTyp, sal_uInt16 nFmt,
const String& rURL, const String& rText );
virtual ~SwINetField();
@@ -101,8 +101,8 @@ public:
const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
// setze / erfrage ein Makro
- void SetMacro( USHORT nEvent, const SvxMacro& rMacro );
- const SvxMacro* GetMacro( USHORT nEvent ) const;
+ void SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro );
+ const SvxMacro* GetMacro( sal_uInt16 nEvent ) const;
};
diff --git a/sw/inc/io.hxx b/sw/inc/io.hxx
index b0e6f0fce00b..66af95e9a28a 100644
--- a/sw/inc/io.hxx
+++ b/sw/inc/io.hxx
@@ -60,7 +60,7 @@ public:
// ctor oeffnet File im BinearMode, dtor schliesst es
BinaryFile(const String &, int eOpenMode);
~BinaryFile();
- BOOL Ok() const {
+ sal_Bool Ok() const {
return -1 != fd;
}
operator int() const { return fd; }
@@ -167,7 +167,7 @@ public:
return aStr;
}
- BOOL Ok();
+ sal_Bool Ok();
};
diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx
index 22ecd7bb0a36..2fb66559b98d 100644
--- a/sw/inc/iodetect.hxx
+++ b/sw/inc/iodetect.hxx
@@ -56,9 +56,9 @@
struct SwIoDetect
{
const sal_Char* pName;
- USHORT nLen;
+ sal_uInt16 nLen;
- inline SwIoDetect( const sal_Char *pN, USHORT nL )
+ inline SwIoDetect( const sal_Char *pN, sal_uInt16 nL )
: pName( pN ), nLen( nL )
{}
@@ -67,7 +67,7 @@ struct SwIoDetect
return pName && rNm.EqualsAscii( pName, 0, nLen );
}
- const sal_Char* IsReader( const sal_Char* pHeader, ULONG nLen_,
+ const sal_Char* IsReader( const sal_Char* pHeader, sal_uLong nLen_,
const String &rFileName, const String& rUserData ) const;
};
@@ -109,17 +109,17 @@ public:
// Feststellen ob das File in dem vorgegebenen Format vorliegt.
// Z.z werden nur unsere eigene Filter unterstuetzt!!
- static BOOL IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
+ static sal_Bool IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
const SfxFilter** ppFlt = 0 );
- static BOOL IsValidStgFilter( SotStorage& , const SfxFilter& );
- static BOOL IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter);
+ static sal_Bool IsValidStgFilter( SotStorage& , const SfxFilter& );
+ static sal_Bool IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter);
- static bool IsDetectableText( const sal_Char* pBuf, ULONG &rLen,
+ static bool IsDetectableText( const sal_Char* pBuf, sal_uLong &rLen,
CharSet *pCharSet=0, bool *pSwap=0, LineEnd *pLineEnd=0, bool bEncodedFilter = false );
// static bool IsDetectableW4W(const String& rFileName, const String& rUserData);
- static const SfxFilter* GetTextFilter( const sal_Char* pBuf, ULONG nLen );
+ static const SfxFilter* GetTextFilter( const sal_Char* pBuf, sal_uLong nLen );
static const String GetSubStorageName( const SfxFilter& rFltr );
};
diff --git a/sw/inc/itabenum.hxx b/sw/inc/itabenum.hxx
index 0188267c0497..9dfa8c3a43b7 100644
--- a/sw/inc/itabenum.hxx
+++ b/sw/inc/itabenum.hxx
@@ -31,21 +31,21 @@
namespace tabopts
{
- const USHORT DEFAULT_BORDER = 0x01;
- const USHORT HEADLINE = 0x02;
-// const USHORT REPEAT = 0x04;
-// const USHORT HEADLINE_REPEAT = 0x06; // Headline + Repeat
- const USHORT SPLIT_LAYOUT = 0x08;
- const USHORT HEADLINE_NO_BORDER = HEADLINE | SPLIT_LAYOUT;
- const USHORT ALL_TBL_INS_ATTR = DEFAULT_BORDER | HEADLINE | SPLIT_LAYOUT;
+ const sal_uInt16 DEFAULT_BORDER = 0x01;
+ const sal_uInt16 HEADLINE = 0x02;
+// const sal_uInt16 REPEAT = 0x04;
+// const sal_uInt16 HEADLINE_REPEAT = 0x06; // Headline + Repeat
+ const sal_uInt16 SPLIT_LAYOUT = 0x08;
+ const sal_uInt16 HEADLINE_NO_BORDER = HEADLINE | SPLIT_LAYOUT;
+ const sal_uInt16 ALL_TBL_INS_ATTR = DEFAULT_BORDER | HEADLINE | SPLIT_LAYOUT;
}
struct SwInsertTableOptions
{
- USHORT mnInsMode;
- USHORT mnRowsToRepeat;
+ sal_uInt16 mnInsMode;
+ sal_uInt16 mnRowsToRepeat;
- SwInsertTableOptions( USHORT nInsMode, USHORT nRowsToRepeat ) :
+ SwInsertTableOptions( sal_uInt16 nInsMode, sal_uInt16 nRowsToRepeat ) :
mnInsMode( nInsMode ), mnRowsToRepeat( nRowsToRepeat ) {};
};
diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx
index 079fbeee4cf5..51d6a8c18c9a 100644
--- a/sw/inc/lineinfo.hxx
+++ b/sw/inc/lineinfo.hxx
@@ -50,15 +50,15 @@ class SW_DLLPUBLIC SwLineNumberInfo : public SwClient //purpose of derivation fr
{
SvxNumberType aType; //e.g. roman linenumbers
String aDivider; //String for aditional interval (vert. lines user defined)
- USHORT nPosFromLeft; //Position for paint
- USHORT nCountBy; //Paint only for every n line
- USHORT nDividerCountBy; //Interval for display of an user defined
+ sal_uInt16 nPosFromLeft; //Position for paint
+ sal_uInt16 nCountBy; //Paint only for every n line
+ sal_uInt16 nDividerCountBy; //Interval for display of an user defined
//string every n lines
LineNumberPosition ePos; //Where should the display occur (number and divicer)
- BOOL bPaintLineNumbers; //Should anything be displayed?
- BOOL bCountBlankLines; //Count empty lines?
- BOOL bCountInFlys; //Count also within FlyFrames?
- BOOL bRestartEachPage; //Restart counting at the first paragraph of each page
+ sal_Bool bPaintLineNumbers; //Should anything be displayed?
+ sal_Bool bCountBlankLines; //Count empty lines?
+ sal_Bool bCountInFlys; //Count also within FlyFrames?
+ sal_Bool bRestartEachPage; //Restart counting at the first paragraph of each page
//(even on follows when paragraphs are splitted)
public:
@@ -66,7 +66,7 @@ public:
SwLineNumberInfo(const SwLineNumberInfo&);
SwLineNumberInfo& operator=(const SwLineNumberInfo&);
- BOOL operator==( const SwLineNumberInfo& rInf ) const;
+ sal_Bool operator==( const SwLineNumberInfo& rInf ) const;
SwCharFmt *GetCharFmt( IDocumentStylePoolAccess& rIDSPA ) const;
void SetCharFmt( SwCharFmt* );
@@ -76,29 +76,29 @@ public:
const String &GetDivider() const { return aDivider; }
void SetDivider( const String &r ) { aDivider = r; }
- USHORT GetDividerCountBy() const { return nDividerCountBy; }
- void SetDividerCountBy( USHORT n ) { nDividerCountBy = n; }
+ sal_uInt16 GetDividerCountBy() const { return nDividerCountBy; }
+ void SetDividerCountBy( sal_uInt16 n ) { nDividerCountBy = n; }
- USHORT GetPosFromLeft() const { return nPosFromLeft; }
- void SetPosFromLeft( USHORT n) { nPosFromLeft = n; }
+ sal_uInt16 GetPosFromLeft() const { return nPosFromLeft; }
+ void SetPosFromLeft( sal_uInt16 n) { nPosFromLeft = n; }
- USHORT GetCountBy() const { return nCountBy; }
- void SetCountBy( USHORT n) { nCountBy = n; }
+ sal_uInt16 GetCountBy() const { return nCountBy; }
+ void SetCountBy( sal_uInt16 n) { nCountBy = n; }
LineNumberPosition GetPos() const { return ePos; }
void SetPos( LineNumberPosition eP ){ ePos = eP; }
- BOOL IsPaintLineNumbers() const { return bPaintLineNumbers; }
- void SetPaintLineNumbers( BOOL b ){ bPaintLineNumbers = b; }
+ sal_Bool IsPaintLineNumbers() const { return bPaintLineNumbers; }
+ void SetPaintLineNumbers( sal_Bool b ){ bPaintLineNumbers = b; }
- BOOL IsCountBlankLines() const { return bCountBlankLines; }
- void SetCountBlankLines( BOOL b ) { bCountBlankLines = b; }
+ sal_Bool IsCountBlankLines() const { return bCountBlankLines; }
+ void SetCountBlankLines( sal_Bool b ) { bCountBlankLines = b; }
- BOOL IsCountInFlys() const { return bCountInFlys; }
- void SetCountInFlys( BOOL b ) { bCountInFlys = b; }
+ sal_Bool IsCountInFlys() const { return bCountInFlys; }
+ void SetCountInFlys( sal_Bool b ) { bCountInFlys = b; }
- BOOL IsRestartEachPage() const { return bRestartEachPage; }
- void SetRestartEachPage( BOOL b ) { bRestartEachPage = b; }
+ sal_Bool IsRestartEachPage() const { return bRestartEachPage; }
+ void SetRestartEachPage( sal_Bool b ) { bRestartEachPage = b; }
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
};
diff --git a/sw/inc/list.hxx b/sw/inc/list.hxx
index 2c97c4da1c9c..a080440a55ea 100644
--- a/sw/inc/list.hxx
+++ b/sw/inc/list.hxx
@@ -56,7 +56,7 @@ class SwList
void ValidateListTree();
void MarkListLevel( const int nListLevel,
- const BOOL bValue );
+ const sal_Bool bValue );
bool IsListLevelMarked( const int nListLevel ) const;
diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx
index a6ebc3d11761..7a3f27bb0eed 100644
--- a/sw/inc/mdiexp.hxx
+++ b/sw/inc/mdiexp.hxx
@@ -40,26 +40,26 @@ class ViewShell;
class SwDoc;
class SwDocShell;
-extern void ScrollMDI(ViewShell* pVwSh, const SwRect &, USHORT nRangeX, USHORT nRangeY);
-extern BOOL IsScrollMDI(ViewShell* pVwSh, const SwRect &);
+extern void ScrollMDI(ViewShell* pVwSh, const SwRect &, sal_uInt16 nRangeX, sal_uInt16 nRangeY);
+extern sal_Bool IsScrollMDI(ViewShell* pVwSh, const SwRect &);
extern void SizeNotify(ViewShell* pVwSh, const Size &);
//Update der Statusleiste, waehrend einer Action.
extern void PageNumNotify( ViewShell* pVwSh,
- USHORT nPhyNum,
- USHORT nVirtNum,
+ sal_uInt16 nPhyNum,
+ sal_uInt16 nVirtNum,
const UniString& rPg );
enum FlyMode { FLY_DRAG_START, FLY_DRAG, FLY_DRAG_END };
extern void FrameNotify( ViewShell* pVwSh, FlyMode eMode = FLY_DRAG );
-SW_DLLPUBLIC void StartProgress ( USHORT nMessId, long nStartVal, long nEndVal, SwDocShell *pDocSh = 0 );
+SW_DLLPUBLIC void StartProgress ( sal_uInt16 nMessId, long nStartVal, long nEndVal, SwDocShell *pDocSh = 0 );
SW_DLLPUBLIC void EndProgress ( SwDocShell *pDocSh = 0 );
SW_DLLPUBLIC void SetProgressState ( long nPosition, SwDocShell *pDocShell );
-void SetProgressText ( USHORT nMessId, SwDocShell *pDocShell );
+void SetProgressText ( sal_uInt16 nMessId, SwDocShell *pDocShell );
void RescheduleProgress( SwDocShell *pDocShell );
-void EnableCmdInterface(BOOL bEnable = TRUE);
+void EnableCmdInterface(sal_Bool bEnable = sal_True);
LAYOUT_NS Dialog* GetSearchDialog();
@@ -72,7 +72,7 @@ void DelAllGrfCacheEntries( SwDoc* pDoc );
// ChgMode fuer Tabellen aus der Konfiguration lesen
TblChgMode GetTblChgDefaultMode();
-BOOL JumpToSwMark( ViewShell* pVwSh, const UniString& rMark );
+sal_Bool JumpToSwMark( ViewShell* pVwSh, const UniString& rMark );
#endif
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
index c5d67217ab2a..279c54a5d435 100644
--- a/sw/inc/modcfg.hxx
+++ b/sw/inc/modcfg.hxx
@@ -66,7 +66,7 @@ class SwRevisionConfig : public utl::ConfigItem
//Revision/TextDisplay/Delete/Color
AuthorCharAttr aFormatAttr; //Revision/TextDisplay/ChangeAttribute/Attribute
//Revision/TextDisplay/ChangeAttribute/Color
- USHORT nMarkAlign; //Revision/LinesChanged/Mark
+ sal_uInt16 nMarkAlign; //Revision/LinesChanged/Mark
Color aMarkColor; //Revision/LinesChanged/Color
const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
@@ -117,10 +117,10 @@ class SwTableConfig : public utl::ConfigItem
{
friend class SwModuleOptions;
- USHORT nTblHMove; //int Table/Shift/Row
- USHORT nTblVMove; //int Table/Shift/Column
- USHORT nTblHInsert; //int Table/Insert/Row
- USHORT nTblVInsert; //int Table/Insert/Column
+ sal_uInt16 nTblHMove; //int Table/Shift/Row
+ sal_uInt16 nTblVMove; //int Table/Shift/Column
+ sal_uInt16 nTblHInsert; //int Table/Insert/Row
+ sal_uInt16 nTblVInsert; //int Table/Insert/Column
TblChgMode eTblChgMode; //int Table/Change/Effect
sal_Bool bInsTblFormatNum; // Table/Input/NumberRecognition // Automatische Zahlenerkennung
@@ -145,13 +145,13 @@ class SwMiscConfig : public utl::ConfigItem
friend class SwModuleOptions;
String sWordDelimiter; // Statistics/WordNumber/Delimiter
- BOOL bDefaultFontsInCurrDocOnly; // DefaultFont/Document
- BOOL bShowIndexPreview ; // Index/ShowPreview
- BOOL bGrfToGalleryAsLnk; // Misc/GraphicToGalleryAsLink
- BOOL bNumAlignSize; // Numbering/Graphic/KeepRatio
- BOOL bSinglePrintJob; // FormLetter/PrintOutput/SinglePrintJobs
- BOOL bIsNameFromColumn; // FormLetter/FileOutput/FileName/Generation
- BOOL bAskForMailMergeInPrint; // Ask if documents containing fields should be 'mailmerged'
+ sal_Bool bDefaultFontsInCurrDocOnly; // DefaultFont/Document
+ sal_Bool bShowIndexPreview ; // Index/ShowPreview
+ sal_Bool bGrfToGalleryAsLnk; // Misc/GraphicToGalleryAsLink
+ sal_Bool bNumAlignSize; // Numbering/Graphic/KeepRatio
+ sal_Bool bSinglePrintJob; // FormLetter/PrintOutput/SinglePrintJobs
+ sal_Bool bIsNameFromColumn; // FormLetter/FileOutput/FileName/Generation
+ sal_Bool bAskForMailMergeInPrint; // Ask if documents containing fields should be 'mailmerged'
sal_Int16 nMailingFormats; // FormLetter/MailingOutput/Formats
String sNameFromColumn; // FormLetter/FileOutput/FileName/FromDatabaseField (string!)
String sMailingPath; // FormLetter/FileOutput/Path
@@ -183,7 +183,7 @@ class SW_DLLPUBLIC SwModuleOptions
SwMiscConfig aMiscConfig;
//fiscus: don't show tips of text fields - it's not part of the configuration!
- BOOL bHideFieldTips : 1;
+ sal_Bool bHideFieldTips : 1;
public:
SwModuleOptions();
@@ -192,20 +192,20 @@ public:
void SetTblMode( TblChgMode eSet ) { aTableConfig.eTblChgMode = eSet;
aTableConfig.SetModified();}
- USHORT GetTblHMove() const { return aTableConfig.nTblHMove;}
- void SetTblHMove( USHORT nSet ) { aTableConfig.nTblHMove = nSet;
+ sal_uInt16 GetTblHMove() const { return aTableConfig.nTblHMove;}
+ void SetTblHMove( sal_uInt16 nSet ) { aTableConfig.nTblHMove = nSet;
aTableConfig.SetModified();}
- USHORT GetTblVMove() const { return aTableConfig.nTblVMove;}
- void SetTblVMove( USHORT nSet ) { aTableConfig.nTblVMove = nSet;
+ sal_uInt16 GetTblVMove() const { return aTableConfig.nTblVMove;}
+ void SetTblVMove( sal_uInt16 nSet ) { aTableConfig.nTblVMove = nSet;
aTableConfig.SetModified();}
- USHORT GetTblHInsert() const {return aTableConfig.nTblHInsert;}
- void SetTblHInsert( USHORT nSet ) { aTableConfig.nTblHInsert = nSet;
+ sal_uInt16 GetTblHInsert() const {return aTableConfig.nTblHInsert;}
+ void SetTblHInsert( sal_uInt16 nSet ) { aTableConfig.nTblHInsert = nSet;
aTableConfig.SetModified();}
- USHORT GetTblVInsert() const {return aTableConfig.nTblVInsert;}
- void SetTblVInsert( USHORT nSet ) { aTableConfig.nTblVInsert = nSet;
+ sal_uInt16 GetTblVInsert() const {return aTableConfig.nTblVInsert;}
+ void SetTblVInsert( sal_uInt16 nSet ) { aTableConfig.nTblVInsert = nSet;
aTableConfig.SetModified();}
const AuthorCharAttr &GetInsertAuthorAttr() const { return aRevisionConfig.aInsertAttr; }
@@ -220,17 +220,17 @@ public:
void SetFormatAuthorAttr( AuthorCharAttr &rAttr ) { aRevisionConfig.aFormatAttr = rAttr;
aRevisionConfig.SetModified();}
- USHORT GetMarkAlignMode() const { return aRevisionConfig.nMarkAlign; }
- void SetMarkAlignMode(USHORT nMode) { aRevisionConfig.nMarkAlign = nMode;
+ sal_uInt16 GetMarkAlignMode() const { return aRevisionConfig.nMarkAlign; }
+ void SetMarkAlignMode(sal_uInt16 nMode) { aRevisionConfig.nMarkAlign = nMode;
aRevisionConfig.SetModified();}
const Color& GetMarkAlignColor() const { return aRevisionConfig.aMarkColor; }
void SetMarkAlignColor(const Color &rColor) { aRevisionConfig.aMarkColor = rColor;
aRevisionConfig.SetModified();}
- BOOL IsInsWithCaption(BOOL bHTML) const
- { return bHTML ? FALSE : aInsertConfig.bInsWithCaption; }
- void SetInsWithCaption( BOOL bHTML, BOOL b )
+ sal_Bool IsInsWithCaption(sal_Bool bHTML) const
+ { return bHTML ? sal_False : aInsertConfig.bInsWithCaption; }
+ void SetInsWithCaption( sal_Bool bHTML, sal_Bool b )
{ if(!bHTML)
aInsertConfig.bInsWithCaption = b;
aInsertConfig.SetModified();}
@@ -245,60 +245,60 @@ public:
}
}
- BOOL IsInsTblFormatNum(BOOL bHTML) const
+ sal_Bool IsInsTblFormatNum(sal_Bool bHTML) const
{ return bHTML ? aWebTableConfig.bInsTblFormatNum : aTableConfig.bInsTblFormatNum; }
- void SetInsTblFormatNum( BOOL bHTML, BOOL b )
+ void SetInsTblFormatNum( sal_Bool bHTML, sal_Bool b )
{ bHTML ? (aWebTableConfig.bInsTblFormatNum = b) : (aTableConfig.bInsTblFormatNum = b);
bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();}
- BOOL IsInsTblChangeNumFormat(BOOL bHTML) const
+ sal_Bool IsInsTblChangeNumFormat(sal_Bool bHTML) const
{ return bHTML ? aWebTableConfig.bInsTblChangeNumFormat : aTableConfig.bInsTblChangeNumFormat; }
- void SetInsTblChangeNumFormat( BOOL bHTML, BOOL b )
+ void SetInsTblChangeNumFormat( sal_Bool bHTML, sal_Bool b )
{ bHTML ? (aWebTableConfig.bInsTblChangeNumFormat = b) : (aTableConfig.bInsTblChangeNumFormat = b);
bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();}
- BOOL IsInsTblAlignNum(BOOL bHTML) const
+ sal_Bool IsInsTblAlignNum(sal_Bool bHTML) const
{ return bHTML ? aWebTableConfig.bInsTblAlignNum : aTableConfig.bInsTblAlignNum; }
- void SetInsTblAlignNum( BOOL bHTML, BOOL b )
+ void SetInsTblAlignNum( sal_Bool bHTML, sal_Bool b )
{ bHTML ? (aWebTableConfig.bInsTblAlignNum = b) : (aTableConfig.bInsTblAlignNum = b);
bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();;}
- SwInsertTableOptions GetInsTblFlags(BOOL bHTML) const
+ SwInsertTableOptions GetInsTblFlags(sal_Bool bHTML) const
{ return bHTML ? aWebInsertConfig.aInsTblOpts : aInsertConfig.aInsTblOpts;}
- void SetInsTblFlags( BOOL bHTML, const SwInsertTableOptions& rOpts ) {
+ void SetInsTblFlags( sal_Bool bHTML, const SwInsertTableOptions& rOpts ) {
bHTML ? (aWebInsertConfig.aInsTblOpts = rOpts) : (aInsertConfig.aInsTblOpts = rOpts);
bHTML ? aWebInsertConfig.SetModified() : aInsertConfig.SetModified();}
- const InsCaptionOpt* GetCapOption(BOOL bHTML, const SwCapObjType eType, const SvGlobalName *pOleId);
- BOOL SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt);
+ const InsCaptionOpt* GetCapOption(sal_Bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId);
+ sal_Bool SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt);
- BOOL IsGrfToGalleryAsLnk() const { return aMiscConfig.bGrfToGalleryAsLnk; }
- void SetGrfToGalleryAsLnk( BOOL b ) { aMiscConfig.bGrfToGalleryAsLnk = b;
+ sal_Bool IsGrfToGalleryAsLnk() const { return aMiscConfig.bGrfToGalleryAsLnk; }
+ void SetGrfToGalleryAsLnk( sal_Bool b ) { aMiscConfig.bGrfToGalleryAsLnk = b;
aMiscConfig.SetModified();}
sal_Int16 GetMailingFormats() const { return aMiscConfig.nMailingFormats;}
void SetMailingFormats( sal_Int16 nSet ) { aMiscConfig.nMailingFormats = nSet;
aMiscConfig.SetModified();}
- BOOL IsSinglePrintJob() const { return aMiscConfig.bSinglePrintJob; }
- void SetSinglePrintJob( BOOL b ) { aMiscConfig.bSinglePrintJob = b;
+ sal_Bool IsSinglePrintJob() const { return aMiscConfig.bSinglePrintJob; }
+ void SetSinglePrintJob( sal_Bool b ) { aMiscConfig.bSinglePrintJob = b;
aMiscConfig.SetModified();}
- BOOL IsNumAlignSize() const { return aMiscConfig.bNumAlignSize; }
- void SetNumAlignSize( BOOL b ) { aMiscConfig.bNumAlignSize = b;
+ sal_Bool IsNumAlignSize() const { return aMiscConfig.bNumAlignSize; }
+ void SetNumAlignSize( sal_Bool b ) { aMiscConfig.bNumAlignSize = b;
aMiscConfig.SetModified();}
- BOOL IsNameFromColumn() const { return aMiscConfig.bIsNameFromColumn; }
- void SetIsNameFromColumn( BOOL bSet )
+ sal_Bool IsNameFromColumn() const { return aMiscConfig.bIsNameFromColumn; }
+ void SetIsNameFromColumn( sal_Bool bSet )
{
aMiscConfig.SetModified();
aMiscConfig.bIsNameFromColumn = bSet;
}
- BOOL IsAskForMailMerge() const { return aMiscConfig.bAskForMailMergeInPrint;}
- void SetAskForMailMerge(BOOL bSet)
+ sal_Bool IsAskForMailMerge() const { return aMiscConfig.bAskForMailMergeInPrint;}
+ void SetAskForMailMerge(sal_Bool bSet)
{
aMiscConfig.SetModified();
aMiscConfig.bAskForMailMergeInPrint = bSet;
@@ -322,22 +322,22 @@ public:
aMiscConfig.SetModified();}
//convert word delimiter from or to user interface
- static String ConvertWordDelimiter(const String& rDelim, BOOL bFromUI);
+ static String ConvertWordDelimiter(const String& rDelim, sal_Bool bFromUI);
- BOOL IsShowIndexPreview() const {return aMiscConfig.bShowIndexPreview;}
- void SetShowIndexPreview(BOOL bSet)
+ sal_Bool IsShowIndexPreview() const {return aMiscConfig.bShowIndexPreview;}
+ void SetShowIndexPreview(sal_Bool bSet)
{aMiscConfig.bShowIndexPreview = bSet;
aMiscConfig.SetModified();}
- BOOL IsDefaultFontInCurrDocOnly() const { return aMiscConfig.bDefaultFontsInCurrDocOnly;}
- void SetDefaultFontInCurrDocOnly(BOOL bSet)
+ sal_Bool IsDefaultFontInCurrDocOnly() const { return aMiscConfig.bDefaultFontsInCurrDocOnly;}
+ void SetDefaultFontInCurrDocOnly(sal_Bool bSet)
{
aMiscConfig.bDefaultFontsInCurrDocOnly = bSet;
aMiscConfig.SetModified();
}
- BOOL IsHideFieldTips() const {return bHideFieldTips;}
- void SetHideFieldTips(BOOL bSet) {bHideFieldTips = bSet;}
+ sal_Bool IsHideFieldTips() const {return bHideFieldTips;}
+ void SetHideFieldTips(sal_Bool bSet) {bHideFieldTips = bSet;}
};
#endif
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index dd822a11dfdd..74a9bb215b37 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -78,7 +78,7 @@ struct SwPosition;
// --------------------
typedef SwNode * SwNodePtr;
-typedef BOOL (*FnForEach_SwNodes)( const SwNodePtr&, void* pArgs );
+typedef sal_Bool (*FnForEach_SwNodes)( const SwNodePtr&, void* pArgs );
SV_DECL_PTRARR_SORT( SwOutlineNodes, SwNodePtr, 0, 10 )
@@ -94,7 +94,7 @@ class SW_DLLPUBLIC SwNodes: private BigPtrArray
void InsertNode( const SwNodePtr pNode,
const SwNodeIndex& rPos );
void InsertNode( const SwNodePtr pNode,
- ULONG nPos );
+ sal_uLong nPos );
// <--
@@ -106,27 +106,27 @@ class SW_DLLPUBLIC SwNodes: private BigPtrArray
mutable SwOutlineNodes* pOutlineNds; // Array aller GliederiungsNodes
- BOOL bInNodesDel : 1; // falls rekursiv aufgerufen wird
+ sal_Bool bInNodesDel : 1; // falls rekursiv aufgerufen wird
// Num/Outline nicht aktualisierem
- BOOL bInDelUpdOutl : 1; // Flags fuers aktualisieren von Outl.
- BOOL bInDelUpdNum : 1; // Flags fuers aktualisieren von Outl.
+ sal_Bool bInDelUpdOutl : 1; // Flags fuers aktualisieren von Outl.
+ sal_Bool bInDelUpdNum : 1; // Flags fuers aktualisieren von Outl.
// fuer dier Verwaltung der Indizies
void RegisterIndex( SwNodeIndex& rIdx );
void DeRegisterIndex( SwNodeIndex& rIdx );
- void RemoveNode( ULONG nDelPos, ULONG nLen, BOOL bDel );
+ void RemoveNode( sal_uLong nDelPos, sal_uLong nLen, sal_Bool bDel );
// Aktionen auf die Nodes
void SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEnd );
- void DelNodes( const SwNodeIndex& rStart, ULONG nCnt = 1 );
+ void DelNodes( const SwNodeIndex& rStart, sal_uLong nCnt = 1 );
- void ChgNode( SwNodeIndex& rDelPos, ULONG nSize,
- SwNodeIndex& rInsPos, BOOL bNewFrms );
+ void ChgNode( SwNodeIndex& rDelPos, sal_uLong nSize,
+ SwNodeIndex& rInsPos, sal_Bool bNewFrms );
void UpdtOutlineIdx( const SwNode& ); // Update ab Node alle OutlineNodes
void _CopyNodes( const SwNodeRange&, const SwNodeIndex&,
- BOOL bNewFrms = TRUE, BOOL bTblInsDummyNode = FALSE ) const;
+ sal_Bool bNewFrms = sal_True, sal_Bool bTblInsDummyNode = sal_False ) const;
void _DelDummyNodes( const SwNodeRange& rRg );
protected:
@@ -138,20 +138,20 @@ public:
typedef ::std::vector<SwNodeRange> NodeRanges_t;
typedef ::std::vector<NodeRanges_t> TableRanges_t;
- SwNodePtr operator[]( ULONG n ) const
+ SwNodePtr operator[]( sal_uLong n ) const
{ return (SwNodePtr)BigPtrArray::operator[] ( n ); }
//JP 29.09.97: impl. steht im ndindex.hxx - sollte moeglichst bald auf die
// neue Schnittstelle angepasst werden
inline SwNodePtr operator[]( const SwNodeIndex& rIdx ) const;
- ULONG Count() const { return BigPtrArray::Count(); }
+ sal_uLong Count() const { return BigPtrArray::Count(); }
void ForEach( FnForEach_SwNodes fnForEach, void* pArgs = 0 )
{
BigPtrArray::ForEach( 0, BigPtrArray::Count(),
(FnForEach) fnForEach, pArgs );
}
- void ForEach( ULONG nStt, ULONG nEnd, FnForEach_SwNodes fnForEach, void* pArgs = 0 )
+ void ForEach( sal_uLong nStt, sal_uLong nEnd, FnForEach_SwNodes fnForEach, void* pArgs = 0 )
{
BigPtrArray::ForEach( nStt, nEnd, (FnForEach) fnForEach, pArgs );
}
@@ -174,23 +174,23 @@ public:
// ist das NodesArray das normale vom Doc? (nicht das UndoNds, .. )
// Implementierung steht im doc.hxx (weil man dazu Doc kennen muss) !
- BOOL IsDocNodes() const;
+ sal_Bool IsDocNodes() const;
- USHORT GetSectionLevel(const SwNodeIndex &rIndex) const;
- void Delete(const SwNodeIndex &rPos, ULONG nNodes = 1);
+ sal_uInt16 GetSectionLevel(const SwNodeIndex &rIndex) const;
+ void Delete(const SwNodeIndex &rPos, sal_uLong nNodes = 1);
- BOOL _MoveNodes( const SwNodeRange&, SwNodes& rNodes, const SwNodeIndex&,
- BOOL bNewFrms = TRUE );
+ sal_Bool _MoveNodes( const SwNodeRange&, SwNodes& rNodes, const SwNodeIndex&,
+ sal_Bool bNewFrms = sal_True );
void MoveRange( SwPaM&, SwPosition&, SwNodes& rNodes );
void _Copy( const SwNodeRange& rRg, const SwNodeIndex& rInsPos,
- BOOL bNewFrms = TRUE ) const
+ sal_Bool bNewFrms = sal_True ) const
{ _CopyNodes( rRg, rInsPos, bNewFrms ); }
void SectionUp( SwNodeRange *);
void SectionDown( SwNodeRange *pRange, SwStartNodeType = SwNormalStartNode );
- BOOL CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd ) const;
+ sal_Bool CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd ) const;
void GoStartOfSection(SwNodeIndex *) const;
void GoEndOfSection(SwNodeIndex *) const;
@@ -204,11 +204,11 @@ public:
SwNode* GoPreviousWithFrm(SwNodeIndex *) const;
// zum naechsten Content-Node, der nicht geschuetzt oder versteckt ist
- // (beides auf FALSE ==> GoNext/GoPrevious!!!)
- SwCntntNode* GoNextSection( SwNodeIndex *, int bSkipHidden = TRUE,
- int bSkipProtect = TRUE ) const;
- SwCntntNode* GoPrevSection( SwNodeIndex *, int bSkipHidden = TRUE,
- int bSkipProtect = TRUE ) const;
+ // (beides auf sal_False ==> GoNext/GoPrevious!!!)
+ SwCntntNode* GoNextSection( SwNodeIndex *, int bSkipHidden = sal_True,
+ int bSkipProtect = sal_True ) const;
+ SwCntntNode* GoPrevSection( SwNodeIndex *, int bSkipHidden = sal_True,
+ int bSkipProtect = sal_True ) const;
// erzeuge ein leere Section von Start und EndNode. Darf nur gerufen
// werden, wenn eine neue Section mit Inhalt erzeugt werden soll.
@@ -231,7 +231,7 @@ public:
const Graphic* pGraphic,
SwGrfFmtColl *pColl,
SwAttrSet* pAutoAttr = 0,
- BOOL bDelayed = FALSE ); // in ndgrf.cxx
+ sal_Bool bDelayed = sal_False ); // in ndgrf.cxx
SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere,
const GraphicObject& rGrfObj,
@@ -251,7 +251,7 @@ public:
// Array aller GliederiungsNodes;
const SwOutlineNodes& GetOutLineNds() const;
- //void UpdateOutlineNode( const SwNode&, BYTE nOldLevel, BYTE nNewLevel );//#outline level,removed by zhaojianwei
+ //void UpdateOutlineNode( const SwNode&, sal_uInt8 nOldLevel, sal_uInt8 nNewLevel );//#outline level,removed by zhaojianwei
// alle Nodes Updaten - Rule/Format-Aenderung
void UpdateOutlineNode(SwNode & rNd);
@@ -267,8 +267,8 @@ public:
*/
SwTableNode* InsertTable( const SwNodeIndex& rNdIdx,
- USHORT nBoxes, SwTxtFmtColl* pCntntTxtColl,
- USHORT nLines = 0, USHORT nRepeat = 0,
+ sal_uInt16 nBoxes, SwTxtFmtColl* pCntntTxtColl,
+ sal_uInt16 nLines = 0, sal_uInt16 nRepeat = 0,
SwTxtFmtColl* pHeadlineTxtColl = 0,
const SwAttrSet * pAttrSet = 0);
@@ -291,30 +291,30 @@ public:
/*, SwUndo... pUndo*/ );
// erzeuge aus der Tabelle wieder normalen Text
- BOOL TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
+ sal_Bool TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
SwUndoTblToTxt* = 0 );
// steht im untbl.cxx und darf nur vom Undoobject gerufen werden
- SwTableNode* UndoTableToText( ULONG nStt, ULONG nEnd,
+ SwTableNode* UndoTableToText( sal_uLong nStt, sal_uLong nEnd,
const SwTblToTxtSaves& rSavedData );
// fuege in der Line, vor der InsPos eine neue Box ein. Das Format
// wird von der nachfolgenden (vorhergenden;wenn an Ende) genommen
// in der Line muss schon eine Box vorhanden sein !
- BOOL InsBoxen( SwTableNode*, SwTableLine*, SwTableBoxFmt*,
+ sal_Bool InsBoxen( SwTableNode*, SwTableLine*, SwTableBoxFmt*,
// Formate fuer den TextNode der Box
SwTxtFmtColl*, const SfxItemSet* pAutoAttr,
- USHORT nInsPos, USHORT nCnt = 1 );
+ sal_uInt16 nInsPos, sal_uInt16 nCnt = 1 );
// Splittet eine Tabelle in der Grund-Zeile, in der der Index steht.
// Alle GrundZeilen dahinter wandern in eine neue Tabelle/-Node.
- // Ist das Flag bCalcNewSize auf TRUE, wird fuer beide neuen Tabellen
+ // Ist das Flag bCalcNewSize auf sal_True, wird fuer beide neuen Tabellen
// die neue SSize aus dem Max der Boxen errechnet; vorrausgesetzt,
// die SSize ist "absolut" gesetzt (LONG_MAX)
// (Wird zur Zeit nur fuer den RTF-Parser benoetigt)
- SwTableNode* SplitTable( const SwNodeIndex& rPos, BOOL bAfter = TRUE,
- BOOL bCalcNewSize = FALSE );
+ SwTableNode* SplitTable( const SwNodeIndex& rPos, sal_Bool bAfter = sal_True,
+ sal_Bool bCalcNewSize = sal_False );
// fuegt 2 Tabellen, die hintereinander stehen, wieder zusammen
- BOOL MergeTable( const SwNodeIndex& rPos, BOOL bWithPrev = TRUE,
- USHORT nMode = 0, SwHistory* pHistory = 0 );
+ sal_Bool MergeTable( const SwNodeIndex& rPos, sal_Bool bWithPrev = sal_True,
+ sal_uInt16 nMode = 0, SwHistory* pHistory = 0 );
// fuege eine neue SwSection ein
SwSectionNode* InsertTextSection(SwNodeIndex const& rNdIdx,
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index 748dceed0c83..fb1c1d4c8c33 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -57,16 +57,16 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
// name or package url)
String aLowResGrf; // HTML: LowRes Grafik (Ersatzdarstellung bis
// die normale (HighRes) geladen ist.
- BOOL bTransparentFlagValid :1;
- BOOL bInSwapIn :1;
-
- BOOL bGrafikArrived :1;
- BOOL bChgTwipSize :1;
- BOOL bChgTwipSizeFromPixel :1;
- BOOL bLoadLowResGrf :1;
- BOOL bFrameInPaint :1; //Um Start-/EndActions im Paint (ueber
+ sal_Bool bTransparentFlagValid :1;
+ sal_Bool bInSwapIn :1;
+
+ sal_Bool bGrafikArrived :1;
+ sal_Bool bChgTwipSize :1;
+ sal_Bool bChgTwipSizeFromPixel :1;
+ sal_Bool bLoadLowResGrf :1;
+ sal_Bool bFrameInPaint :1; //Um Start-/EndActions im Paint (ueber
//SwapIn zu verhindern.
- BOOL bScaleImageMap :1; //Image-Map in SetTwipSize skalieren
+ sal_Bool bScaleImageMap :1; //Image-Map in SetTwipSize skalieren
// --> OD 2007-01-19 #i73788#
boost::shared_ptr< SwAsyncRetrieveInputStreamThreadConsumer > mpThreadConsumer;
@@ -91,8 +91,8 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
SwAttrSet* pAutoAttr = 0 );
void InsertLink( const String& rGrfName, const String& rFltName );
- BOOL ImportGraphic( SvStream& rStrm );
- BOOL HasStreamName() const { return aGrfObj.HasUserData(); }
+ sal_Bool ImportGraphic( SvStream& rStrm );
+ sal_Bool HasStreamName() const { return aGrfObj.HasUserData(); }
// --> OD 2005-05-04 #i48434# - adjust return type and rename method to
// indicate that its an private one.
// --> OD 2005-08-17 #i53025#
@@ -157,22 +157,22 @@ public:
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
void SetTwipSize( const Size& rSz );
- BOOL IsTransparent() const;
+ sal_Bool IsTransparent() const;
- inline BOOL IsAnimated() const { return aGrfObj.IsAnimated(); }
+ inline sal_Bool IsAnimated() const { return aGrfObj.IsAnimated(); }
- inline BOOL IsChgTwipSize() const { return bChgTwipSize; }
- inline BOOL IsChgTwipSizeFromPixel() const { return bChgTwipSizeFromPixel; }
- inline void SetChgTwipSize( BOOL b, BOOL bFromPx=FALSE ) { bChgTwipSize = b; bChgTwipSizeFromPixel = bFromPx; }
+ inline sal_Bool IsChgTwipSize() const { return bChgTwipSize; }
+ inline sal_Bool IsChgTwipSizeFromPixel() const { return bChgTwipSizeFromPixel; }
+ inline void SetChgTwipSize( sal_Bool b, sal_Bool bFromPx=sal_False ) { bChgTwipSize = b; bChgTwipSizeFromPixel = bFromPx; }
- inline BOOL IsGrafikArrived() const { return bGrafikArrived; }
- inline void SetGrafikArrived( BOOL b ) { bGrafikArrived = b; }
+ inline sal_Bool IsGrafikArrived() const { return bGrafikArrived; }
+ inline void SetGrafikArrived( sal_Bool b ) { bGrafikArrived = b; }
- inline BOOL IsFrameInPaint() const { return bFrameInPaint; }
- inline void SetFrameInPaint( BOOL b ) { bFrameInPaint = b; }
+ inline sal_Bool IsFrameInPaint() const { return bFrameInPaint; }
+ inline void SetFrameInPaint( sal_Bool b ) { bFrameInPaint = b; }
- inline BOOL IsScaleImageMap() const { return bScaleImageMap; }
- inline void SetScaleImageMap( BOOL b ) { bScaleImageMap = b; }
+ inline sal_Bool IsScaleImageMap() const { return bScaleImageMap; }
+ inline void SetScaleImageMap( sal_Bool b ) { bScaleImageMap = b; }
#endif
// steht in ndcopy.cxx
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
@@ -180,32 +180,32 @@ public:
// erneutes Einlesen, falls Graphic nicht Ok ist. Die
// aktuelle wird durch die neue ersetzt.
- BOOL ReRead( const String& rGrfName, const String& rFltName,
+ sal_Bool ReRead( const String& rGrfName, const String& rFltName,
const Graphic* pGraphic = 0,
const GraphicObject* pGrfObj = 0,
- BOOL bModify = TRUE );
+ sal_Bool bModify = sal_True );
// Laden der Grafik unmittelbar vor der Anzeige
- short SwapIn( BOOL bWaitForData = FALSE );
+ short SwapIn( sal_Bool bWaitForData = sal_False );
// Entfernen der Grafik, um Speicher freizugeben
short SwapOut();
// Zugriff auf den Storage-Streamnamen
void SetStreamName( const String& r ) { aGrfObj.SetUserData( r ); }
void SetNewStreamName( const String& r ) { aNewStrmName = r; }
// is this node selected by any shell?
- BOOL IsSelected() const;
+ sal_Bool IsSelected() const;
#endif
// Der Grafik sagen, dass sich der Node im Undobereich befindet
- virtual BOOL SavePersistentData();
- virtual BOOL RestorePersistentData();
+ virtual sal_Bool SavePersistentData();
+ virtual sal_Bool RestorePersistentData();
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
// Abfrage der Link-Daten
- BOOL IsGrfLink() const { return refLink.Is(); }
- inline BOOL IsLinkedFile() const;
- inline BOOL IsLinkedDDE() const;
+ sal_Bool IsGrfLink() const { return refLink.Is(); }
+ inline sal_Bool IsLinkedFile() const;
+ inline sal_Bool IsLinkedDDE() const;
::sfx2::SvBaseLinkRef GetLink() const { return refLink; }
- BOOL GetFileFilterNms( String* pFileNm, String* pFilterNm ) const;
+ sal_Bool GetFileFilterNms( String* pFileNm, String* pFilterNm ) const;
void ReleaseLink();
// Skalieren einer Image-Map: Die Image-Map wird um den Faktor
@@ -243,11 +243,11 @@ inline const SwGrfNode *SwNode::GetGrfNode() const
}
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
-inline BOOL SwGrfNode::IsLinkedFile() const
+inline sal_Bool SwGrfNode::IsLinkedFile() const
{
return refLink.Is() && OBJECT_CLIENT_GRF == refLink->GetObjType();
}
-inline BOOL SwGrfNode::IsLinkedDDE() const
+inline sal_Bool SwGrfNode::IsLinkedDDE() const
{
return refLink.Is() && OBJECT_CLIENT_DDE == refLink->GetObjType();
}
diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx
index c1d210464eb3..f24dce137463 100644
--- a/sw/inc/ndhints.hxx
+++ b/sw/inc/ndhints.hxx
@@ -88,31 +88,31 @@ protected:
//FIXME: why are the non-const methods public?
public:
void Insert( const SwTxtAttr *pHt );
- void DeleteAtPos( const USHORT nPosInStart );
+ void DeleteAtPos( const sal_uInt16 nPosInStart );
bool Resort();
- SwTxtAttr * Cut( const USHORT nPosInStart );
+ SwTxtAttr * Cut( const sal_uInt16 nPosInStart );
- inline const SwTxtAttr * GetStart( const USHORT nPos ) const
+ inline const SwTxtAttr * GetStart( const sal_uInt16 nPos ) const
{ return m_HintStarts[nPos]; }
- inline const SwTxtAttr * GetEnd ( const USHORT nPos ) const
+ inline const SwTxtAttr * GetEnd ( const sal_uInt16 nPos ) const
{ return m_HintEnds [nPos]; }
- inline SwTxtAttr * GetStart( const USHORT nPos )
+ inline SwTxtAttr * GetStart( const sal_uInt16 nPos )
{ return m_HintStarts[nPos]; }
- inline SwTxtAttr * GetEnd ( const USHORT nPos )
+ inline SwTxtAttr * GetEnd ( const sal_uInt16 nPos )
{ return m_HintEnds [nPos]; }
- inline USHORT GetEndCount() const { return m_HintEnds .Count(); }
- inline USHORT GetStartCount() const { return m_HintStarts.Count(); }
+ inline sal_uInt16 GetEndCount() const { return m_HintEnds .Count(); }
+ inline sal_uInt16 GetStartCount() const { return m_HintStarts.Count(); }
- inline USHORT GetStartOf( const SwTxtAttr *pHt ) const;
- inline USHORT GetPos( const SwTxtAttr *pHt ) const
+ inline sal_uInt16 GetStartOf( const SwTxtAttr *pHt ) const;
+ inline sal_uInt16 GetPos( const SwTxtAttr *pHt ) const
{ return m_HintStarts.GetPos( pHt ); }
- inline SwTxtAttr * GetTextHint( const USHORT nIdx )
+ inline SwTxtAttr * GetTextHint( const sal_uInt16 nIdx )
{ return GetStart(nIdx); }
- inline const SwTxtAttr * operator[]( const USHORT nIdx ) const
+ inline const SwTxtAttr * operator[]( const sal_uInt16 nIdx ) const
{ return m_HintStarts[nIdx]; }
- inline USHORT Count() const { return m_HintStarts.Count(); }
+ inline sal_uInt16 Count() const { return m_HintStarts.Count(); }
#ifdef DBG_UTIL
bool Check() const;
@@ -147,7 +147,7 @@ private:
// Because the TextNode also guarantees removal of the Character for
// attributes without an end.
friend class SwTxtNode;
- void DeleteAtPos( const USHORT nPos );
+ void DeleteAtPos( const sal_uInt16 nPos );
// Delete the given Hint. The Hint must actually be in the array!
void Delete( SwTxtAttr* pTxtHt );
@@ -202,9 +202,9 @@ SvStream &operator<<(SvStream &aS, const SwpHints &rHints); //$ ostream
* Inline Implementations
*************************************************************************/
-inline USHORT SwpHintsArray::GetStartOf( const SwTxtAttr *pHt ) const
+inline sal_uInt16 SwpHintsArray::GetStartOf( const SwTxtAttr *pHt ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
if ( !m_HintStarts.Seek_Entry( pHt, &nPos ) )
{
nPos = USHRT_MAX;
@@ -212,7 +212,7 @@ inline USHORT SwpHintsArray::GetStartOf( const SwTxtAttr *pHt ) const
return nPos;
}
-inline SwTxtAttr *SwpHintsArray::Cut( const USHORT nPosInStart )
+inline SwTxtAttr *SwpHintsArray::Cut( const sal_uInt16 nPosInStart )
{
SwTxtAttr *pHt = GetTextHint(nPosInStart);
DeleteAtPos( nPosInStart );
diff --git a/sw/inc/ndindex.hxx b/sw/inc/ndindex.hxx
index 3c3a71dd8641..611c09390728 100644
--- a/sw/inc/ndindex.hxx
+++ b/sw/inc/ndindex.hxx
@@ -40,7 +40,7 @@ class SW_DLLPUBLIC SwNodeIndex
{
friend void SwNodes::RegisterIndex( SwNodeIndex& );
friend void SwNodes::DeRegisterIndex( SwNodeIndex& );
- friend void SwNodes::RemoveNode( ULONG, ULONG, BOOL );
+ friend void SwNodes::RemoveNode( sal_uLong, sal_uLong, sal_Bool );
#ifdef DBG_UTIL
static int nSerial;
@@ -53,50 +53,50 @@ class SW_DLLPUBLIC SwNodeIndex
void Remove(); // Ausketten
// diese sind nicht erlaubt!
- SwNodeIndex( SwNodes& rNds, USHORT nIdx );
+ SwNodeIndex( SwNodes& rNds, sal_uInt16 nIdx );
SwNodeIndex( SwNodes& rNds, int nIdx );
public:
- SwNodeIndex( SwNodes& rNds, ULONG nIdx = 0 );
+ SwNodeIndex( SwNodes& rNds, sal_uLong nIdx = 0 );
SwNodeIndex( const SwNodeIndex &, long nDiff = 0 );
SwNodeIndex( const SwNode&, long nDiff = 0 );
~SwNodeIndex() { Remove(); }
- inline ULONG operator++();
- inline ULONG operator--();
+ inline sal_uLong operator++();
+ inline sal_uLong operator--();
#ifndef CFRONT
- inline ULONG operator++(int);
- inline ULONG operator--(int);
+ inline sal_uLong operator++(int);
+ inline sal_uLong operator--(int);
#endif
- inline ULONG operator+=( ULONG );
- inline ULONG operator-=( ULONG );
- inline ULONG operator+=( const SwNodeIndex& );
- inline ULONG operator-=( const SwNodeIndex& );
-
- inline BOOL operator< ( const SwNodeIndex& ) const;
- inline BOOL operator<=( const SwNodeIndex& ) const;
- inline BOOL operator> ( const SwNodeIndex& ) const;
- inline BOOL operator>=( const SwNodeIndex& ) const;
- inline BOOL operator==( const SwNodeIndex& ) const;
- inline BOOL operator!=( const SwNodeIndex& ) const;
-
- inline BOOL operator< ( ULONG nWert ) const;
- inline BOOL operator<=( ULONG nWert ) const;
- inline BOOL operator> ( ULONG nWert ) const;
- inline BOOL operator>=( ULONG nWert ) const;
- inline BOOL operator==( ULONG nWert ) const;
- inline BOOL operator!=( ULONG nWert ) const;
-
- inline SwNodeIndex& operator=( ULONG );
+ inline sal_uLong operator+=( sal_uLong );
+ inline sal_uLong operator-=( sal_uLong );
+ inline sal_uLong operator+=( const SwNodeIndex& );
+ inline sal_uLong operator-=( const SwNodeIndex& );
+
+ inline sal_Bool operator< ( const SwNodeIndex& ) const;
+ inline sal_Bool operator<=( const SwNodeIndex& ) const;
+ inline sal_Bool operator> ( const SwNodeIndex& ) const;
+ inline sal_Bool operator>=( const SwNodeIndex& ) const;
+ inline sal_Bool operator==( const SwNodeIndex& ) const;
+ inline sal_Bool operator!=( const SwNodeIndex& ) const;
+
+ inline sal_Bool operator< ( sal_uLong nWert ) const;
+ inline sal_Bool operator<=( sal_uLong nWert ) const;
+ inline sal_Bool operator> ( sal_uLong nWert ) const;
+ inline sal_Bool operator>=( sal_uLong nWert ) const;
+ inline sal_Bool operator==( sal_uLong nWert ) const;
+ inline sal_Bool operator!=( sal_uLong nWert ) const;
+
+ inline SwNodeIndex& operator=( sal_uLong );
SwNodeIndex& operator=( const SwNodeIndex& );
SwNodeIndex& operator=( const SwNode& );
- // gebe den Wert vom Index als ULONG zurueck
- inline ULONG GetIndex() const;
+ // gebe den Wert vom Index als sal_uLong zurueck
+ inline sal_uLong GetIndex() const;
// ermoeglicht Zuweisungen ohne Erzeugen eines temporaeren Objektes
- SwNodeIndex& Assign( SwNodes& rNds, ULONG );
+ SwNodeIndex& Assign( SwNodes& rNds, sal_uLong );
SwNodeIndex& Assign( const SwNode& rNd, long nOffset = 0 );
// Herausgabe des Pointers auf das NodesArray,
@@ -118,7 +118,7 @@ public:
SwNodeRange( const SwNodeIndex &rS, const SwNodeIndex &rE );
SwNodeRange( const SwNodeRange &rRange );
- SwNodeRange( SwNodes& rArr, ULONG nSttIdx = 0, ULONG nEndIdx = 0 );
+ SwNodeRange( SwNodes& rArr, sal_uLong nSttIdx = 0, sal_uLong nEndIdx = 0 );
SwNodeRange( const SwNodeIndex& rS, long nSttDiff,
const SwNodeIndex& rE, long nEndDiff = 0 );
SwNodeRange( const SwNode& rS, long nSttDiff,
@@ -132,7 +132,7 @@ public:
// auch wieder dieses. Also alle Inlines, die auf pNd zugreifen werden
// hier implementiert.
-inline ULONG SwNodeIndex::GetIndex() const
+inline sal_uLong SwNodeIndex::GetIndex() const
{
return pNd->GetIndex();
}
@@ -144,96 +144,96 @@ inline SwNodes& SwNodeIndex::GetNodes()
{
return pNd->GetNodes();
}
-inline BOOL SwNodeIndex::operator< ( ULONG nWert ) const
+inline sal_Bool SwNodeIndex::operator< ( sal_uLong nWert ) const
{
return pNd->GetIndex() < nWert;
}
-inline BOOL SwNodeIndex::operator<=( ULONG nWert ) const
+inline sal_Bool SwNodeIndex::operator<=( sal_uLong nWert ) const
{
return pNd->GetIndex() <= nWert;
}
-inline BOOL SwNodeIndex::operator> ( ULONG nWert ) const
+inline sal_Bool SwNodeIndex::operator> ( sal_uLong nWert ) const
{
return pNd->GetIndex() > nWert;
}
-inline BOOL SwNodeIndex::operator>=( ULONG nWert ) const
+inline sal_Bool SwNodeIndex::operator>=( sal_uLong nWert ) const
{
return pNd->GetIndex() >= nWert;
}
-inline BOOL SwNodeIndex::operator==( ULONG nWert ) const
+inline sal_Bool SwNodeIndex::operator==( sal_uLong nWert ) const
{
return pNd->GetIndex() == nWert;
}
-inline BOOL SwNodeIndex::operator!=( ULONG nWert ) const
+inline sal_Bool SwNodeIndex::operator!=( sal_uLong nWert ) const
{
return pNd->GetIndex() != nWert;
}
-inline BOOL SwNodeIndex::operator<( const SwNodeIndex& rIndex ) const
+inline sal_Bool SwNodeIndex::operator<( const SwNodeIndex& rIndex ) const
{
return pNd->GetIndex() < rIndex.GetIndex();
}
-inline BOOL SwNodeIndex::operator<=( const SwNodeIndex& rIndex ) const
+inline sal_Bool SwNodeIndex::operator<=( const SwNodeIndex& rIndex ) const
{
return pNd->GetIndex() <= rIndex.GetIndex();
}
-inline BOOL SwNodeIndex::operator>( const SwNodeIndex& rIndex ) const
+inline sal_Bool SwNodeIndex::operator>( const SwNodeIndex& rIndex ) const
{
return pNd->GetIndex() > rIndex.GetIndex();
}
-inline BOOL SwNodeIndex::operator>=( const SwNodeIndex& rIndex ) const
+inline sal_Bool SwNodeIndex::operator>=( const SwNodeIndex& rIndex ) const
{
return pNd->GetIndex() >= rIndex.GetIndex();
}
-inline BOOL SwNodeIndex::operator==( const SwNodeIndex& rIdx ) const
+inline sal_Bool SwNodeIndex::operator==( const SwNodeIndex& rIdx ) const
{
return pNd == rIdx.pNd;
}
-inline BOOL SwNodeIndex::operator!=( const SwNodeIndex& rIdx ) const
+inline sal_Bool SwNodeIndex::operator!=( const SwNodeIndex& rIdx ) const
{
return pNd != rIdx.pNd;
}
-inline ULONG SwNodeIndex::operator++()
+inline sal_uLong SwNodeIndex::operator++()
{
return ( pNd = GetNodes()[ pNd->GetIndex()+1 ] )->GetIndex();
}
-inline ULONG SwNodeIndex::operator--()
+inline sal_uLong SwNodeIndex::operator--()
{
return ( pNd = GetNodes()[ pNd->GetIndex()-1 ] )->GetIndex();
}
#ifndef CFRONT
-inline ULONG SwNodeIndex::operator++(int)
+inline sal_uLong SwNodeIndex::operator++(int)
{
- ULONG nOldIndex = pNd->GetIndex();
+ sal_uLong nOldIndex = pNd->GetIndex();
pNd = GetNodes()[ nOldIndex + 1 ];
return nOldIndex;
}
-inline ULONG SwNodeIndex::operator--(int)
+inline sal_uLong SwNodeIndex::operator--(int)
{
- ULONG nOldIndex = pNd->GetIndex();
+ sal_uLong nOldIndex = pNd->GetIndex();
pNd = GetNodes()[ nOldIndex - 1 ];
return nOldIndex;
}
#endif
-inline ULONG SwNodeIndex::operator+=( ULONG nWert )
+inline sal_uLong SwNodeIndex::operator+=( sal_uLong nWert )
{
return ( pNd = GetNodes()[ pNd->GetIndex() + nWert ] )->GetIndex();
}
-inline ULONG SwNodeIndex::operator-=( ULONG nWert )
+inline sal_uLong SwNodeIndex::operator-=( sal_uLong nWert )
{
return ( pNd = GetNodes()[ pNd->GetIndex() - nWert ] )->GetIndex();
}
-inline ULONG SwNodeIndex::operator+=( const SwNodeIndex& rIndex )
+inline sal_uLong SwNodeIndex::operator+=( const SwNodeIndex& rIndex )
{
return ( pNd = GetNodes()[ pNd->GetIndex() + rIndex.GetIndex() ] )->GetIndex();
}
-inline ULONG SwNodeIndex::operator-=( const SwNodeIndex& rIndex )
+inline sal_uLong SwNodeIndex::operator-=( const SwNodeIndex& rIndex )
{
return ( pNd = GetNodes()[ pNd->GetIndex() - rIndex.GetIndex() ] )->GetIndex();
}
-inline SwNodeIndex& SwNodeIndex::operator=( ULONG nWert )
+inline SwNodeIndex& SwNodeIndex::operator=( sal_uLong nWert )
{
pNd = GetNodes()[ nWert ];
return *this;
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx
index 64586f06cd8c..b61e46325bc5 100644
--- a/sw/inc/ndnotxt.hxx
+++ b/sw/inc/ndnotxt.hxx
@@ -43,11 +43,11 @@ class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode
// String aAlternateText; // alternativer Text (HTML)
PolyPolygon *pContour; // Polygon fuer Konturumlauf
- BOOL bAutomaticContour : 1; // automatic contour polygon, not manipulated
- BOOL bContourMapModeValid : 1; // contour map mode is not the graphics's
+ sal_Bool bAutomaticContour : 1; // automatic contour polygon, not manipulated
+ sal_Bool bContourMapModeValid : 1; // contour map mode is not the graphics's
// prefered map mode, but either
// MM100 or or pixel
- BOOL bPixelContour : 1; // contour map mode is invalid and pixel.
+ sal_Bool bPixelContour : 1; // contour map mode is invalid and pixel.
// erzeugt fuer alle Ableitungen einen AttrSet mit Bereichen
// fuer Frame- und Grafik-Attributen (wird nur vom SwCntntNode gerufen)
@@ -57,7 +57,7 @@ class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode
SwNoTxtNode &operator=( const SwNoTxtNode& ); //nicht erlaubt
protected:
- SwNoTxtNode( const SwNodeIndex &rWhere, const BYTE nNdType,
+ SwNoTxtNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
SwGrfFmtColl *pGrColl, SwAttrSet* pAutoAttr = 0 );
public:
@@ -69,8 +69,8 @@ public:
virtual Size GetTwipSize() const = 0;
- virtual BOOL SavePersistentData();
- virtual BOOL RestorePersistentData();
+ virtual sal_Bool SavePersistentData();
+ virtual sal_Bool RestorePersistentData();
const String GetTitle() const;
void SetTitle( const String& rTitle,
@@ -84,25 +84,25 @@ public:
// sal_Bool bBroadcast=sal_False );
void SetContour( const PolyPolygon *pPoly,
- BOOL bAutomatic = FALSE );
+ sal_Bool bAutomatic = sal_False );
const PolyPolygon *HasContour() const;
- BOOL _HasContour() const { return pContour!=0; };
+ sal_Bool _HasContour() const { return pContour!=0; };
void GetContour( PolyPolygon &rPoly ) const;
void CreateContour();
- void SetAutomaticContour( BOOL bSet ) { bAutomaticContour = bSet; }
- BOOL HasAutomaticContour() const { return bAutomaticContour; }
+ void SetAutomaticContour( sal_Bool bSet ) { bAutomaticContour = bSet; }
+ sal_Bool HasAutomaticContour() const { return bAutomaticContour; }
// set either a MM100 or pixel contour
void SetContourAPI( const PolyPolygon *pPoly );
- // get either a MM100 or pixel contour, return FALSE if no contour is set.
- BOOL GetContourAPI( PolyPolygon &rPoly ) const;
+ // get either a MM100 or pixel contour, return sal_False if no contour is set.
+ sal_Bool GetContourAPI( PolyPolygon &rPoly ) const;
- void SetPixelContour( BOOL bSet ) { bPixelContour = bSet; }
- BOOL IsPixelContour() const;
+ void SetPixelContour( sal_Bool bSet ) { bPixelContour = bSet; }
+ sal_Bool IsPixelContour() const;
- BOOL IsContourMapModeValid() const { return bContourMapModeValid; }
+ sal_Bool IsContourMapModeValid() const { return bContourMapModeValid; }
//Besorgt die Graphic, mit SwapIn fuer GrfNode, per GetData fuer OLE.
Graphic GetGraphic() const;
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index e439109ff866..0199d2e399bb 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -59,8 +59,8 @@ public:
SwOLEObj( const String &rName, sal_Int64 nAspect );
~SwOLEObj();
- BOOL UnloadObject();
- static BOOL UnloadObject( ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > xObj,
+ sal_Bool UnloadObject();
+ static sal_Bool UnloadObject( ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > xObj,
const SwDoc* pDoc,
sal_Int64 nAspect );
@@ -70,7 +70,7 @@ public:
const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef();
svt::EmbeddedObjectRef& GetObject();
const String& GetCurrentPersistName() const { return aName; }
- BOOL IsOleRef() const; //Damit das Objekt nicht unnoetig geladen werden muss.
+ sal_Bool IsOleRef() const; //Damit das Objekt nicht unnoetig geladen werden muss.
#endif
};
@@ -85,7 +85,7 @@ class SW_DLLPUBLIC SwOLENode: public SwNoTxtNode
mutable SwOLEObj aOLEObj;
Graphic* pGraphic;
String sChartTblName; // bei Chart Objecten: Name der ref. Tabelle
- BOOL bOLESizeInvalid; //Soll beim SwDoc::PrtOLENotify beruecksichtig
+ sal_Bool bOLESizeInvalid; //Soll beim SwDoc::PrtOLENotify beruecksichtig
//werden (zum Beispiel kopiert). Ist nicht
//Persistent.
@@ -124,14 +124,14 @@ public:
Graphic* GetHCGraphic(); // tries to retrieve HighContrast representation if possible
void GetNewReplacement();
- virtual BOOL SavePersistentData();
- virtual BOOL RestorePersistentData();
+ virtual sal_Bool SavePersistentData();
+ virtual sal_Bool RestorePersistentData();
- BOOL IsInGlobalDocSection() const;
- BOOL IsOLEObjectDeleted() const;
+ sal_Bool IsInGlobalDocSection() const;
+ sal_Bool IsOLEObjectDeleted() const;
- BOOL IsOLESizeInvalid() const { return bOLESizeInvalid; }
- void SetOLESizeInvalid( BOOL b ){ bOLESizeInvalid = b; }
+ sal_Bool IsOLESizeInvalid() const { return bOLESizeInvalid; }
+ void SetOLESizeInvalid( sal_Bool b ){ bOLESizeInvalid = b; }
sal_Int64 GetAspect() const { return aOLEObj.GetObject().GetViewAspect(); }
void SetAspect( sal_Int64 nAspect) { aOLEObj.GetObject().SetViewAspect( nAspect ); }
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 53168d5a9cb4..5ccaf0329f70 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -118,7 +118,7 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
mutable bool m_bLastOutlineState : 1;
bool m_bNotifiable;
- // BYTE nOutlineLevel; //#outline level, removed by zhaojianwei.
+ // sal_uInt8 nOutlineLevel; //#outline level, removed by zhaojianwei.
// --> OD 2008-11-19 #i70748#
bool mbEmptyListStyleSetDueToSetOutlineLevelAttr;
// <--
@@ -145,8 +145,8 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
// Kopiert die Attribute an nStart nach pDest.
SW_DLLPRIVATE void CopyAttr( SwTxtNode *pDest, const xub_StrLen nStart, const xub_StrLen nOldPos);
- SW_DLLPRIVATE SwTxtNode* _MakeNewTxtNode( const SwNodeIndex&, BOOL bNext = TRUE,
- BOOL bChgFollow = TRUE );
+ SW_DLLPRIVATE SwTxtNode* _MakeNewTxtNode( const SwNodeIndex&, sal_Bool bNext = sal_True,
+ sal_Bool bChgFollow = sal_True );
SW_DLLPRIVATE void CutImpl(
SwTxtNode * const pDest, const SwIndex & rDestStart,
@@ -160,7 +160,7 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
SW_DLLPRIVATE virtual void NewAttrSet( SwAttrPool& );
SW_DLLPRIVATE void Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
- xub_StrLen nEndPos, BOOL bExpandFlds ) const;
+ xub_StrLen nEndPos, sal_Bool bExpandFlds ) const;
// Optimization: Asking for information about hidden characters at SwScriptInfo
// updates these flags.
@@ -175,19 +175,19 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
SW_DLLPRIVATE void CalcHiddenCharFlags() const;
- SW_DLLPRIVATE SwNumRule * _GetNumRule(BOOL bInParent = TRUE) const;
+ SW_DLLPRIVATE SwNumRule * _GetNumRule(sal_Bool bInParent = sal_True) const;
SW_DLLPRIVATE void SetLanguageAndFont( const SwPaM &rPaM,
- LanguageType nLang, USHORT nLangWhichId,
- const Font *pFont, USHORT nFontWhichId );
+ LanguageType nLang, sal_uInt16 nLangWhichId,
+ const Font *pFont, sal_uInt16 nFontWhichId );
//
// Start: Data collected during idle time
//
- SW_DLLPRIVATE void SetParaNumberOfWords( ULONG nTmpWords ) const;
- SW_DLLPRIVATE ULONG GetParaNumberOfWords() const;
- SW_DLLPRIVATE void SetParaNumberOfChars( ULONG nTmpChars ) const;
- SW_DLLPRIVATE ULONG GetParaNumberOfChars() const;
+ SW_DLLPRIVATE void SetParaNumberOfWords( sal_uLong nTmpWords ) const;
+ SW_DLLPRIVATE sal_uLong GetParaNumberOfWords() const;
+ SW_DLLPRIVATE void SetParaNumberOfChars( sal_uLong nTmpChars ) const;
+ SW_DLLPRIVATE sal_uLong GetParaNumberOfChars() const;
SW_DLLPRIVATE void InitSwParaStatistics( bool bNew );
/** create number for this text node, if not already existing
@@ -247,16 +247,16 @@ public:
virtual xub_StrLen Len() const;
// steht in itratr
- void GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax, ULONG &rAbs,
+ void GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs,
OutputDevice* pOut = 0 ) const;
// --> OD 2008-03-13 #refactorlists#
// overriding to handle change of certain paragraph attributes
- virtual BOOL SetAttr( const SfxPoolItem& );
- virtual BOOL SetAttr( const SfxItemSet& rSet );
- virtual BOOL ResetAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
- virtual BOOL ResetAttr( const SvUShorts& rWhichArr );
- virtual USHORT ResetAllAttr();
+ virtual sal_Bool SetAttr( const SfxPoolItem& );
+ virtual sal_Bool SetAttr( const SfxItemSet& rSet );
+ virtual sal_Bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
+ virtual sal_Bool ResetAttr( const SvUShorts& rWhichArr );
+ virtual sal_uInt16 ResetAllAttr();
// <--
/// insert text content
@@ -283,8 +283,8 @@ public:
refmarks, toxmarks, and metas will be ignored unless this is true
ATTENTION: setting bInclRefToxMark is only allowed from UNDO!
*/
- void RstAttr( const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich = 0,
- const SfxItemSet* pSet = 0, BOOL bInclRefToxMark = FALSE );
+ void RstAttr( const SwIndex &rIdx, xub_StrLen nLen, sal_uInt16 nWhich = 0,
+ const SfxItemSet* pSet = 0, sal_Bool bInclRefToxMark = sal_False );
void GCAttr();
// loesche das Text-Attribut (muss beim Pool abgemeldet werden!)
@@ -304,20 +304,20 @@ public:
// setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt,
// dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr)
- BOOL SetAttr( const SfxItemSet& rSet,
+ sal_Bool SetAttr( const SfxItemSet& rSet,
xub_StrLen nStt, xub_StrLen nEnd,
const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
// erfrage die Attribute vom TextNode ueber den Bereich
// --> OD 2008-01-16 #newlistlevelattrs#
// Introduce 4th optional parameter <bMergeIndentValuesOfNumRule>.
- // If <bMergeIndentValuesOfNumRule> == TRUE, the indent attributes of
+ // If <bMergeIndentValuesOfNumRule> == sal_True, the indent attributes of
// the corresponding list level of an applied list style is merged into
- // the requested item set as a LR-SPACE item, if <bOnlyTxtAttr> == FALSE,
+ // the requested item set as a LR-SPACE item, if <bOnlyTxtAttr> == sal_False,
// corresponding node has not its own indent attributes and the
// position-and-space mode of the list level is SvxNumberFormat::LABEL_ALIGNMENT.
- BOOL GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
- BOOL bOnlyTxtAttr = FALSE,
- BOOL bGetFromChrFmt = TRUE,
+ sal_Bool GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
+ sal_Bool bOnlyTxtAttr = sal_False,
+ sal_Bool bGetFromChrFmt = sal_True,
const bool bMergeIndentValuesOfNumRule = false ) const;
// <--
@@ -325,7 +325,7 @@ public:
void FmtToTxtAttr( SwTxtNode* pNd );
/// delete all attributes of type nWhich at nStart (opt. end nEnd)
- void DeleteAttributes( const USHORT nWhich,
+ void DeleteAttributes( const sal_uInt16 nWhich,
const xub_StrLen nStart, const xub_StrLen nEnd = 0 );
/// delete the attribute pTxtAttr
void DeleteAttribute ( SwTxtAttr * const pTxtAttr );
@@ -364,8 +364,8 @@ public:
SwCntntNode *AppendNode( const SwPosition & );
// setze ggf. das DontExpand-Flag an INet bzw. Zeichenvorlagen
- BOOL DontExpandFmt( const SwIndex& rIdx, bool bFlag = true,
- BOOL bFmtToTxtAttributes = TRUE );
+ sal_Bool DontExpandFmt( const SwIndex& rIdx, bool bFlag = true,
+ sal_Bool bFmtToTxtAttributes = sal_True );
enum GetTxtAttrMode {
DEFAULT, /// DEFAULT: (Start < nIndex <= End)
@@ -404,8 +404,8 @@ public:
// Aktuelles Wort zurueckliefern
XubString GetCurWord(xub_StrLen) const;
- USHORT Spell(SwSpellArgs*);
- USHORT Convert( SwConversionArgs & );
+ sal_uInt16 Spell(SwSpellArgs*);
+ sal_uInt16 Convert( SwConversionArgs & );
inline SwTxtFmtColl *GetTxtColl() const;
virtual SwFmtColl *ChgFmtColl( SwFmtColl* );
@@ -430,7 +430,7 @@ public:
@return numbering rule of this text node or NULL if none is set
*/
- SwNumRule *GetNumRule(BOOL bInParent = TRUE) const;
+ SwNumRule *GetNumRule(sal_Bool bInParent = sal_True) const;
inline const SwNodeNum* GetNum() const
{
@@ -460,10 +460,10 @@ public:
- it has a SwNodeNum and it has a numbering rule and the according
SwNumFmt defines a numbering type that is an enumeration.
- @retval TRUE this text node may be numbered
- @retval FALSE else
+ @retval sal_True this text node may be numbered
+ @retval sal_False else
*/
- //BOOL MayBeNumbered() const;
+ //sal_Bool MayBeNumbered() const;
/**
Notify this textnode that its numbering rule has changed.
@@ -494,7 +494,7 @@ public:
@return additional indents
*/
- long GetLeftMarginWithNum( BOOL bTxtLeft = FALSE ) const;
+ long GetLeftMarginWithNum( sal_Bool bTxtLeft = sal_False ) const;
/**
Returns the combined first line indent of this text node and
@@ -503,10 +503,10 @@ public:
@param the first line indent of this text node taking the
numbering into account (return parameter)
- @retval TRUE this node has SwNodeNum and has numbering rule
- @retval FALSE else
+ @retval sal_True this node has SwNodeNum and has numbering rule
+ @retval sal_False else
*/
- BOOL GetFirstLineOfsWithNum( short& rFirstOffset ) const;
+ sal_Bool GetFirstLineOfsWithNum( short& rFirstOffset ) const;
// --> OD 2010-01-05 #b6884103#
SwTwips GetAdditionalIndentForStartingNewList() const;
@@ -533,10 +533,10 @@ public:
numbering rule and the numbering format specified for the
level of the SwNodeNum is of an enumeration type.
- @retval TRUE This text node has a number.
- @retval FALSE else
+ @retval sal_True This text node has a number.
+ @retval sal_False else
*/
- BOOL HasNumber() const;
+ sal_Bool HasNumber() const;
/** -> #i29560
Returns if this text node has a bullet.
@@ -545,10 +545,10 @@ public:
numbering rule and the numbering format specified for the
level of the SwNodeNum is of a bullet type.
- @retval TRUE This text node has a bullet.
- @retval FALSE else
+ @retval sal_True This text node has a bullet.
+ @retval sal_False else
*/
- BOOL HasBullet() const;
+ sal_Bool HasBullet() const;
/** -> #i27615#
Returns is this text node is numbered.
@@ -556,13 +556,13 @@ public:
This node is numbered if it has a SwNodeNum and it has a
numbering rule and has not a hidden SwNodeNum.
- ATTENTION: Returns TRUE even if the SwNumFmt has type
+ ATTENTION: Returns sal_True even if the SwNumFmt has type
SVX_NUM_NUMBER_NONE.
- @retval TRUE This node is numbered.
- @retval FALSE else
+ @retval sal_True This node is numbered.
+ @retval sal_False else
*/
- BOOL IsNumbered() const;
+ sal_Bool IsNumbered() const;
/** -> #i27615#
Returns if this text node has a marked label.
@@ -644,7 +644,7 @@ public:
@return the width of the leading whitespace
*/
- USHORT GetWidthOfLeadingTabs() const;
+ sal_uInt16 GetWidthOfLeadingTabs() const;
/**
@@ -653,7 +653,7 @@ public:
Note: This function returns false, if the numbering format is
SVX_NUM_NUMBER_NONE or if the numbering/bullet has been deleted.
- @return TRUE if the paragraph has a visible numbering/bullet/outline
+ @return sal_True if the paragraph has a visible numbering/bullet/outline
*/
bool HasVisibleNumberingOrBullet() const;
@@ -712,15 +712,15 @@ public:
void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const;
- USHORT GetLang( const xub_StrLen nBegin, const xub_StrLen nLen = 0,
- USHORT nScript = 0 ) const;
+ sal_uInt16 GetLang( const xub_StrLen nBegin, const xub_StrLen nLen = 0,
+ sal_uInt16 nScript = 0 ) const;
// steht in ndcopy.cxx
- BOOL IsSymbol( const xub_StrLen nBegin ) const; // steht in itratr.cxx
+ sal_Bool IsSymbol( const xub_StrLen nBegin ) const; // steht in itratr.cxx
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
// interaktive Trennung: wir finden den TxtFrm und rufen sein CalcHyph
- BOOL Hyphenate( SwInterHyphInfo &rHyphInf );
+ sal_Bool Hyphenate( SwInterHyphInfo &rHyphInf );
void DelSoftHyph( const xub_StrLen nStart, const xub_StrLen nEnd );
// --> OD 2007-11-15 #i83479#
@@ -736,10 +736,10 @@ public:
const bool bAddSpaceAfterListLabelStr = false,
const bool bWithSpacesForLevel = false ) const;
// <--
- BOOL GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx = 0,
+ sal_Bool GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx = 0,
xub_StrLen nIdx = 0, xub_StrLen nLen = STRING_LEN,
- BOOL bWithNum = FALSE, BOOL bWithFtn = TRUE,
- BOOL bReplaceTabsWithSpaces = FALSE ) const;
+ sal_Bool bWithNum = sal_False, sal_Bool bWithFtn = sal_True,
+ sal_Bool bReplaceTabsWithSpaces = sal_False ) const;
/*
*
@@ -749,11 +749,11 @@ public:
XubString GetRedlineTxt( xub_StrLen nIdx = 0,
xub_StrLen nLen = STRING_LEN,
- BOOL bExpandFlds = FALSE,
- BOOL bWithNum = FALSE ) const;
+ sal_Bool bExpandFlds = sal_False,
+ sal_Bool bWithNum = sal_False ) const;
//Liefert fuer die Initalfunktion tatsaechliche Anzahl der Initialzeichen
//bei nWishLen == 0 die des ersten Wortes
- USHORT GetDropLen( USHORT nWishLen) const;
+ sal_uInt16 GetDropLen( sal_uInt16 nWishLen) const;
// Passes back info needed on the dropcap dimensions
bool GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const;
@@ -839,7 +839,7 @@ public:
bool IsFirstOfNumRule() const;
- USHORT GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) const;
+ sal_uInt16 GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) const;
SW_DLLPRIVATE ::com::sun::star::uno::WeakReference<
::com::sun::star::text::XTextContent> const& GetXParagraph() const
diff --git a/sw/inc/ndtyp.hxx b/sw/inc/ndtyp.hxx
index f752348b5df4..6fb429980703 100644
--- a/sw/inc/ndtyp.hxx
+++ b/sw/inc/ndtyp.hxx
@@ -32,19 +32,19 @@
// Ids fuer die verschiedenden Nodes; in der Basisklasse steht der Member,
// der angibt, um was fuer einen es sich handelt
-const BYTE ND_ENDNODE = 0x01;
-const BYTE ND_STARTNODE = 0x02;
-const BYTE ND_TABLENODE = 0x06;
-const BYTE ND_TEXTNODE = 0x08;
-const BYTE ND_GRFNODE = 0x10;
-const BYTE ND_OLENODE = 0x20;
+const sal_uInt8 ND_ENDNODE = 0x01;
+const sal_uInt8 ND_STARTNODE = 0x02;
+const sal_uInt8 ND_TABLENODE = 0x06;
+const sal_uInt8 ND_TEXTNODE = 0x08;
+const sal_uInt8 ND_GRFNODE = 0x10;
+const sal_uInt8 ND_OLENODE = 0x20;
-const BYTE ND_CONTENTNODE = 0x38; // ContentNode (eines von den 3 Bits)
-const BYTE ND_NOTXTNODE = 0x30; // NoTxtNode (eines von den 2 Bits)
+const sal_uInt8 ND_CONTENTNODE = 0x38; // ContentNode (eines von den 3 Bits)
+const sal_uInt8 ND_NOTXTNODE = 0x30; // NoTxtNode (eines von den 2 Bits)
-const BYTE ND_SECTIONNODE = 0x42;
+const sal_uInt8 ND_SECTIONNODE = 0x42;
// nur fuer internen Gebrauch!!
-const BYTE ND_SECTIONDUMMY = 0x40; //(ND_SECTIONNODE & ~ND_STARTNODE);
+const sal_uInt8 ND_SECTIONDUMMY = 0x40; //(ND_SECTIONNODE & ~ND_STARTNODE);
// spezielle Types der StartNodes, die keine Ableitungen sind, aber
// "Bereiche" zusammenhalten.
@@ -61,8 +61,8 @@ enum SwStartNodeType
// is the node the first and/or last node of a section?
// This information is used for the export filters. Our layout never have a
// distance before or after if the node is the first or last in a section.
-const BYTE ND_HAS_PREV_LAYNODE = 0x01;
-const BYTE ND_HAS_NEXT_LAYNODE = 0x02;
+const sal_uInt8 ND_HAS_PREV_LAYNODE = 0x01;
+const sal_uInt8 ND_HAS_NEXT_LAYNODE = 0x02;
diff --git a/sw/inc/newhdl.hxx b/sw/inc/newhdl.hxx
index 04d88f2789be..574dc3f9167a 100644
--- a/sw/inc/newhdl.hxx
+++ b/sw/inc/newhdl.hxx
@@ -47,10 +47,10 @@ public:
void SetWarnLnk( const Link &rLink );
void SetErrLnk( const Link &rLink );
- BOOL TryWarnMem();
+ sal_Bool TryWarnMem();
- BOOL Flush_WarnMem();
- BOOL Flush_ExceptMem();
+ sal_Bool Flush_WarnMem();
+ sal_Bool Flush_ExceptMem();
SwNewHdl();
~SwNewHdl();
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 6cc14bbbf2c2..9ee05188898c 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -97,22 +97,22 @@ class SW_DLLPUBLIC SwNode : private /* public*/ BigPtrEntry
long nMySerial;
#endif
- BYTE nNodeType;
+ sal_uInt8 nNodeType;
// JP 28.03.96
// fuer Textnodes: Stufungslevel der Autoformatierung. Ist erstmal hier
// gelandet, weil noch Bits frei sind
- BYTE nAFmtNumLvl : 3;
- BOOL bSetNumLSpace : 1; // fuer Numerierung: TRUE Einzug setzen
- BOOL bIgnoreDontExpand : 1; // for Text Attributes - ignore the flag
+ sal_uInt8 nAFmtNumLvl : 3;
+ sal_Bool bSetNumLSpace : 1; // fuer Numerierung: sal_True Einzug setzen
+ sal_Bool bIgnoreDontExpand : 1; // for Text Attributes - ignore the flag
protected:
SwStartNode* pStartOfSection;
- SwNode( const SwNodeIndex &rWhere, const BYTE nNodeId );
+ SwNode( const SwNodeIndex &rWhere, const sal_uInt8 nNodeId );
// fuer den initialen StartNode
- SwNode( SwNodes& rNodes, ULONG nPos, const BYTE nNodeId );
+ SwNode( SwNodes& rNodes, sal_uLong nPos, const sal_uInt8 nNodeId );
public:
virtual ~SwNode();
@@ -121,26 +121,26 @@ public:
long int GetSerial() const { return nMySerial; }
#endif
- USHORT GetSectionLevel() const;
+ sal_uInt16 GetSectionLevel() const;
- inline ULONG StartOfSectionIndex() const;
+ inline sal_uLong StartOfSectionIndex() const;
inline const SwStartNode* StartOfSectionNode() const { return pStartOfSection; }
inline SwStartNode* StartOfSectionNode() { return pStartOfSection; }
- inline ULONG EndOfSectionIndex() const;
+ inline sal_uLong EndOfSectionIndex() const;
inline const SwEndNode* EndOfSectionNode() const;
inline SwEndNode* EndOfSectionNode();
- inline BYTE GetAutoFmtLvl() const { return nAFmtNumLvl; }
- inline void SetAutoFmtLvl( BYTE nVal ) { nAFmtNumLvl = nVal; }
+ inline sal_uInt8 GetAutoFmtLvl() const { return nAFmtNumLvl; }
+ inline void SetAutoFmtLvl( sal_uInt8 nVal ) { nAFmtNumLvl = nVal; }
- inline BOOL IsSetNumLSpace() const { return bSetNumLSpace; }
- inline void SetNumLSpace( BOOL bFlag ) { bSetNumLSpace = bFlag; }
+ inline sal_Bool IsSetNumLSpace() const { return bSetNumLSpace; }
+ inline void SetNumLSpace( sal_Bool bFlag ) { bSetNumLSpace = bFlag; }
- inline BOOL IsIgnoreDontExpand() const { return bIgnoreDontExpand; }
- inline void SetIgnoreDontExpand( BOOL bNew ) { bIgnoreDontExpand = bNew; }
+ inline sal_Bool IsIgnoreDontExpand() const { return bIgnoreDontExpand; }
+ inline void SetIgnoreDontExpand( sal_Bool bNew ) { bIgnoreDontExpand = bNew; }
- BYTE GetNodeType() const { return nNodeType; }
+ sal_uInt8 GetNodeType() const { return nNodeType; }
inline SwStartNode *GetStartNode();
inline const SwStartNode *GetStartNode() const;
@@ -168,23 +168,23 @@ public:
inline SwSectionNode *GetSectionNode();
inline const SwSectionNode *GetSectionNode() const;
- inline BOOL IsStartNode() const;
- inline BOOL IsCntntNode() const;
- inline BOOL IsEndNode() const;
- inline BOOL IsTxtNode() const;
- inline BOOL IsTableNode() const;
- inline BOOL IsSectionNode() const;
- inline BOOL IsOLENode() const;
- inline BOOL IsNoTxtNode() const;
- inline BOOL IsGrfNode() const;
+ inline sal_Bool IsStartNode() const;
+ inline sal_Bool IsCntntNode() const;
+ inline sal_Bool IsEndNode() const;
+ inline sal_Bool IsTxtNode() const;
+ inline sal_Bool IsTableNode() const;
+ inline sal_Bool IsSectionNode() const;
+ inline sal_Bool IsOLENode() const;
+ inline sal_Bool IsNoTxtNode() const;
+ inline sal_Bool IsGrfNode() const;
/**
Checks if this node is in redlines.
- @retval TRUE this node is in redlines
- @retval FALSE else
+ @retval sal_True this node is in redlines
+ @retval sal_False else
*/
- BOOL IsInRedlines() const;
+ sal_Bool IsInRedlines() const;
// suche den TabellenNode, in dem dieser steht. Wenn in keiner
// Tabelle wird 0 returnt.
@@ -276,18 +276,18 @@ public:
IDocumentListItems& getIDocumentListItems();
// liegt der Node im Sichtbarenbereich der Shell ?
- BOOL IsInVisibleArea( ViewShell* pSh = 0 ) const;
+ sal_Bool IsInVisibleArea( ViewShell* pSh = 0 ) const;
// befindet sich der Node in einem geschuetzten Bereich?
- BOOL IsInProtectSect() const;
+ sal_Bool IsInProtectSect() const;
// befindet sich der Node in irgendetwas geschuetzten ?
// (Bereich/Rahmen/Tabellenzellen/... incl. des Ankers bei
// Rahmen/Fussnoten/..)
- BOOL IsProtect() const;
+ sal_Bool IsProtect() const;
// suche den PageDesc, mit dem dieser Node formatiert ist. Wenn das
// Layout vorhanden ist wird ueber das gesucht, ansonsten gibt es nur
// die harte Tour ueber die Nodes nach vorne suchen!!
// OD 18.03.2003 #106326#
- const SwPageDesc* FindPageDesc( BOOL bCalcLay, sal_uInt32* pPgDescNdIdx = 0 ) const;
+ const SwPageDesc* FindPageDesc( sal_Bool bCalcLay, sal_uInt32* pPgDescNdIdx = 0 ) const;
// falls der Node in einem Fly steht, dann wird das entsprechende Format
// returnt
@@ -297,11 +297,11 @@ public:
// TabellenBox returnt
SwTableBox* GetTblBox() const;
- inline ULONG GetIndex() const { return GetPos(); }
+ inline sal_uLong GetIndex() const { return GetPos(); }
- const SwTxtNode* FindOutlineNodeOfLevel( BYTE nLvl ) const;
+ const SwTxtNode* FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const;
- BYTE HasPrevNextLayNode() const;
+ sal_uInt8 HasPrevNextLayNode() const;
private:
// privater Constructor, weil nie kopiert werden darf !!
@@ -322,11 +322,11 @@ class SwStartNode: public SwNode
SwStartNodeType eSttNdTyp;
// fuer den initialen StartNode
- SwStartNode( SwNodes& rNodes, ULONG nPos );
+ SwStartNode( SwNodes& rNodes, sal_uLong nPos );
protected:
SwStartNode( const SwNodeIndex &rWhere,
- const BYTE nNodeType = ND_STARTNODE,
+ const sal_uInt8 nNodeType = ND_STARTNODE,
SwStartNodeType = SwNormalStartNode );
public:
DECL_FIXEDMEMPOOL_NEWDEL(SwStartNode)
@@ -353,7 +353,7 @@ class SwEndNode : public SwNode
friend class SwSectionNode; // um seinen EndNode anlegen zukoennen
// fuer den initialen StartNode
- SwEndNode( SwNodes& rNodes, ULONG nPos, SwStartNode& rSttNd );
+ SwEndNode( SwNodes& rNodes, sal_uLong nPos, SwStartNode& rSttNd );
protected:
SwEndNode( const SwNodeIndex &rWhere, SwStartNode& rSttNd );
@@ -382,7 +382,7 @@ class SW_DLLPUBLIC SwCntntNode: public SwModify, public SwNode, public SwIndexRe
mutable bool mbSetModifyAtAttr;
protected:
- SwCntntNode( const SwNodeIndex &rWhere, const BYTE nNodeType,
+ SwCntntNode( const SwNodeIndex &rWhere, const sal_uInt8 nNodeType,
SwFmtColl *pFmtColl );
virtual ~SwCntntNode();
@@ -395,7 +395,7 @@ protected:
// There some functions that like to remove items from the internal
// SwAttrSet (handle):
- USHORT ClearItemsFromAttrSet( const std::vector<USHORT>& rWhichIds );
+ sal_uInt16 ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rWhichIds );
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
@@ -414,21 +414,21 @@ public:
void MakeStartIndex( SwIndex * pIdx ) { pIdx->Assign( this, 0 ); }
void MakeEndIndex( SwIndex * pIdx ) { pIdx->Assign( this, Len() ); }
- BOOL GoNext(SwIndex *, USHORT nMode ) const;
- BOOL GoPrevious(SwIndex *, USHORT nMode ) const;
+ sal_Bool GoNext(SwIndex *, sal_uInt16 nMode ) const;
+ sal_Bool GoPrevious(SwIndex *, sal_uInt16 nMode ) const;
SwCntntFrm *GetFrm( const Point* pDocPos = 0,
const SwPosition *pPos = 0,
- const BOOL bCalcFrm = TRUE ) const;
+ const sal_Bool bCalcFrm = sal_True ) const;
// Gibt die tatsaechlcheGroesse des Frames zurueck bzw. ein leeres
// Rechteck, wenn kein Layout existiert.
// Wird fuer die Export Filter benoetigt.
- SwRect FindLayoutRect( const BOOL bPrtArea = FALSE,
+ SwRect FindLayoutRect( const sal_Bool bPrtArea = sal_False,
const Point* pPoint = 0,
- const BOOL bCalcFrm = FALSE ) const;
- SwRect FindPageFrmRect( const BOOL bPrtArea = FALSE,
+ const sal_Bool bCalcFrm = sal_False ) const;
+ SwRect FindPageFrmRect( const sal_Bool bPrtArea = sal_False,
const Point* pPoint = 0,
- const BOOL bCalcFrm = FALSE ) const;
+ const sal_Bool bCalcFrm = sal_False ) const;
/*
* Methode erzeugt fuer den angegebenen Node alle Ansichten vom
* Dokument. Die erzeugten Contentframes werden in das entsprechende
@@ -451,30 +451,30 @@ public:
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const = 0;
// erfrage vom Client Informationen
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
// SS fuer die PoolItems: (Harte-(Fmt)Attrbutierung)
- // Ist bInParent FALSE, wird nur in diesem Node nach dem Attribut gesucht.
- const SfxPoolItem& GetAttr( USHORT nWhich, BOOL bInParent=TRUE ) const;
- BOOL GetAttr( SfxItemSet& rSet, BOOL bInParent=TRUE ) const;
+ // Ist bInParent sal_False, wird nur in diesem Node nach dem Attribut gesucht.
+ const SfxPoolItem& GetAttr( sal_uInt16 nWhich, sal_Bool bInParent=sal_True ) const;
+ sal_Bool GetAttr( SfxItemSet& rSet, sal_Bool bInParent=sal_True ) const;
// --> OD 2008-03-13 #refactorlists#
// made virtual
- virtual BOOL SetAttr( const SfxPoolItem& );
- virtual BOOL SetAttr( const SfxItemSet& rSet );
- virtual BOOL ResetAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
- virtual BOOL ResetAttr( const SvUShorts& rWhichArr );
- virtual USHORT ResetAllAttr();
+ virtual sal_Bool SetAttr( const SfxPoolItem& );
+ virtual sal_Bool SetAttr( const SfxItemSet& rSet );
+ virtual sal_Bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
+ virtual sal_Bool ResetAttr( const SvUShorts& rWhichArr );
+ virtual sal_uInt16 ResetAllAttr();
// <--
// liefert das Attribut, das nicht ueber die bedingte Vorlage kommt!
- const SfxPoolItem* GetNoCondAttr( USHORT nWhich, BOOL bInParents ) const;
+ const SfxPoolItem* GetNoCondAttr( sal_uInt16 nWhich, sal_Bool bInParents ) const;
// hat der Node schon eigene Auto-Attribute ?
// Zugriff auf SwAttrSet
inline const SwAttrSet &GetSwAttrSet() const;
inline const SwAttrSet *GetpSwAttrSet() const { return static_cast<const SwAttrSet*>(mpAttrSet.get()); }
- inline BOOL HasSwAttrSet() const { return mpAttrSet ? TRUE : FALSE; }
+ inline sal_Bool HasSwAttrSet() const { return mpAttrSet ? sal_True : sal_False; }
virtual SwFmtColl* ChgFmtColl( SwFmtColl* );
SwFmtColl* GetFmtColl() const { return (SwFmtColl*)GetRegisteredIn(); }
@@ -484,13 +484,13 @@ public:
void SetCondFmtColl( SwFmtColl* );
inline SwFmtColl* GetCondFmtColl() const;
- BOOL IsAnyCondition( SwCollCondition& rTmp ) const;
+ sal_Bool IsAnyCondition( SwCollCondition& rTmp ) const;
void ChkCondColl();
//FEATURE::CONDCOLL
// invalidiert die am Node gesetzte NumRule. Diese wird
// spaetestend in EndAction einer Shell geupdatet
- BOOL InvalidateNumRule();
+ sal_Bool InvalidateNumRule();
// --> OD 2005-02-21 #i42921# - determines the text direction for a certain
// position. Return -1, if text direction could *not* be determined.
@@ -541,7 +541,7 @@ public:
void MakeFrms( const SwNodeIndex & rIdx );
SwTableNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
- void SetNewTable( SwTable* , BOOL bNewFrames=TRUE );
+ void SetNewTable( SwTable* , sal_Bool bNewFrames=sal_True );
private:
// privater Constructor, weil nie kopiert werden darf !!
@@ -597,7 +597,7 @@ public:
// ueberprueft bei _nicht_ versteckten Bereichen, ob es Inhalt gibt, der
// _nicht_ in einem versteckten (Unter-)Bereich liegt
- BOOL IsCntntHidden() const;
+ sal_Bool IsCntntHidden() const;
};
@@ -646,41 +646,41 @@ inline const SwCntntNode *SwNode::GetCntntNode() const
}
-inline BOOL SwNode::IsStartNode() const
+inline sal_Bool SwNode::IsStartNode() const
{
- return ND_STARTNODE & nNodeType ? TRUE : FALSE;
+ return ND_STARTNODE & nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsCntntNode() const
+inline sal_Bool SwNode::IsCntntNode() const
{
- return ND_CONTENTNODE & nNodeType ? TRUE : FALSE;
+ return ND_CONTENTNODE & nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsEndNode() const
+inline sal_Bool SwNode::IsEndNode() const
{
- return ND_ENDNODE == nNodeType ? TRUE : FALSE;
+ return ND_ENDNODE == nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsTxtNode() const
+inline sal_Bool SwNode::IsTxtNode() const
{
- return ND_TEXTNODE == nNodeType ? TRUE : FALSE;
+ return ND_TEXTNODE == nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsTableNode() const
+inline sal_Bool SwNode::IsTableNode() const
{
- return ND_TABLENODE == nNodeType ? TRUE : FALSE;
+ return ND_TABLENODE == nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsSectionNode() const
+inline sal_Bool SwNode::IsSectionNode() const
{
- return ND_SECTIONNODE == nNodeType ? TRUE : FALSE;
+ return ND_SECTIONNODE == nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsNoTxtNode() const
+inline sal_Bool SwNode::IsNoTxtNode() const
{
- return ND_NOTXTNODE & nNodeType ? TRUE : FALSE;
+ return ND_NOTXTNODE & nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsOLENode() const
+inline sal_Bool SwNode::IsOLENode() const
{
- return ND_OLENODE == nNodeType ? TRUE : FALSE;
+ return ND_OLENODE == nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsGrfNode() const
+inline sal_Bool SwNode::IsGrfNode() const
{
- return ND_GRFNODE == nNodeType ? TRUE : FALSE;
+ return ND_GRFNODE == nNodeType ? sal_True : sal_False;
}
inline const SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp ) const
@@ -695,11 +695,11 @@ inline const SwSectionNode* SwNode::FindSectionNode() const
{
return ((SwNode*)this)->FindSectionNode();
}
-inline ULONG SwNode::StartOfSectionIndex() const
+inline sal_uLong SwNode::StartOfSectionIndex() const
{
return pStartOfSection->GetIndex();
}
-inline ULONG SwNode::EndOfSectionIndex() const
+inline sal_uLong SwNode::EndOfSectionIndex() const
{
const SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
return pStNd->pEndOfSection->GetIndex();
@@ -753,8 +753,8 @@ inline const SwAttrSet& SwCntntNode::GetSwAttrSet() const
//FEATURE::CONDCOLL
-inline const SfxPoolItem& SwCntntNode::GetAttr( USHORT nWhich,
- BOOL bInParents ) const
+inline const SfxPoolItem& SwCntntNode::GetAttr( sal_uInt16 nWhich,
+ sal_Bool bInParents ) const
{
return GetSwAttrSet().Get( nWhich, bInParents );
}
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index 11920c2d6f61..d1125a0f4130 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -81,8 +81,8 @@ public:
SwNumFmt& operator=( const SwNumFmt& );
- BOOL operator==( const SwNumFmt& ) const;
- BOOL operator!=( const SwNumFmt& r ) const { return !(*this == r); }
+ sal_Bool operator==( const SwNumFmt& ) const;
+ sal_Bool operator!=( const SwNumFmt& r ) const { return !(*this == r); }
SwCharFmt* GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; }
void SetCharFmt( SwCharFmt* );
@@ -97,8 +97,8 @@ public:
virtual sal_Int16 GetVertOrient() const;
const SwFmtVertOrient* GetGraphicOrientation() const;
- BOOL IsEnumeration() const; // #i22362#
- BOOL IsItemize() const; // #i29560#
+ sal_Bool IsEnumeration() const; // #i22362#
+ sal_Bool IsItemize() const; // #i29560#
};
class SwPaM;
@@ -119,12 +119,12 @@ private:
#endif
static SwNumFmt* aBaseFmts [ RULE_END ][ MAXLEVEL ];
- static USHORT aDefNumIndents[ MAXLEVEL ];
+ static sal_uInt16 aDefNumIndents[ MAXLEVEL ];
// --> OD 2008-02-11 #newlistlevelattrs#
// default list level properties for position-and-space mode LABEL_ALIGNMENT
static SwNumFmt* aLabelAlignmentBaseFmts [ RULE_END ][ MAXLEVEL ];
// <--
- static USHORT nRefCount;
+ static sal_uInt16 nRefCount;
static char* pDefOutlineName;
SwNumFmt* aFmts[ MAXLEVEL ];
@@ -151,13 +151,13 @@ private:
String sName;
SwNumRuleType eRuleType;
- USHORT nPoolFmtId; // Id-fuer "automatich" erzeugte NumRules
- USHORT nPoolHelpId; // HelpId fuer diese Pool-Vorlage
- BYTE nPoolHlpFileId; // FilePos ans Doc auf die Vorlagen-Hilfen
- BOOL bAutoRuleFlag : 1;
- BOOL bInvalidRuleFlag : 1;
- BOOL bContinusNum : 1; // Fortlaufende Numerierung - ohne Ebenen
- BOOL bAbsSpaces : 1; // die Ebenen repraesentieren absol. Einzuege
+ sal_uInt16 nPoolFmtId; // Id-fuer "automatich" erzeugte NumRules
+ sal_uInt16 nPoolHelpId; // HelpId fuer diese Pool-Vorlage
+ sal_uInt8 nPoolHlpFileId; // FilePos ans Doc auf die Vorlagen-Hilfen
+ sal_Bool bAutoRuleFlag : 1;
+ sal_Bool bInvalidRuleFlag : 1;
+ sal_Bool bContinusNum : 1; // Fortlaufende Numerierung - ohne Ebenen
+ sal_Bool bAbsSpaces : 1; // die Ebenen repraesentieren absol. Einzuege
bool mbCountPhantoms;
// --> OD 2008-02-11 #newlistlevelattrs#
@@ -177,28 +177,28 @@ public:
SwNumRule( const String& rNm,
const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode,
SwNumRuleType = NUM_RULE,
- BOOL bAutoFlg = TRUE );
+ sal_Bool bAutoFlg = sal_True );
SwNumRule( const SwNumRule& );
~SwNumRule();
SwNumRule& operator=( const SwNumRule& );
- BOOL operator==( const SwNumRule& ) const;
- BOOL operator!=( const SwNumRule& r ) const { return !(*this == r); }
+ sal_Bool operator==( const SwNumRule& ) const;
+ sal_Bool operator!=( const SwNumRule& r ) const { return !(*this == r); }
- const SwNumFmt* GetNumFmt( USHORT i ) const;
- const SwNumFmt& Get( USHORT i ) const;
+ const SwNumFmt* GetNumFmt( sal_uInt16 i ) const;
+ const SwNumFmt& Get( sal_uInt16 i ) const;
- void Set( USHORT i, const SwNumFmt* );
- void Set( USHORT i, const SwNumFmt& );
- String MakeNumString( const SwNodeNum&, BOOL bInclStrings = TRUE,
- BOOL bOnlyArabic = FALSE ) const;
+ void Set( sal_uInt16 i, const SwNumFmt* );
+ void Set( sal_uInt16 i, const SwNumFmt& );
+ String MakeNumString( const SwNodeNum&, sal_Bool bInclStrings = sal_True,
+ sal_Bool bOnlyArabic = sal_False ) const;
// --> OD 2005-10-17 #126238#
// - add optional parameter <_nRestrictToThisLevel> in order to
// restrict returned string to this level.
String MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
- const BOOL bInclStrings = TRUE,
- const BOOL bOnlyArabic = FALSE,
+ const sal_Bool bInclStrings = sal_True,
+ const sal_Bool bOnlyArabic = sal_False,
const unsigned int _nRestrictToThisLevel = MAXLEVEL ) const;
// <--
// --> OD 2007-08-24 #i81002#
@@ -249,12 +249,12 @@ public:
static char* GetOutlineRuleName() { return pDefOutlineName; }
- static USHORT GetNumIndent( BYTE nLvl );
- static USHORT GetBullIndent( BYTE nLvl );
+ static sal_uInt16 GetNumIndent( sal_uInt8 nLvl );
+ static sal_uInt16 GetBullIndent( sal_uInt8 nLvl );
SwNumRuleType GetRuleType() const { return eRuleType; }
void SetRuleType( SwNumRuleType eNew ) { eRuleType = eNew;
- bInvalidRuleFlag = TRUE; }
+ bInvalidRuleFlag = sal_True; }
// eine Art Copy-Constructor, damit die Num-Formate auch an den
// richtigen CharFormaten eines Dokumentes haengen !!
@@ -271,33 +271,33 @@ public:
IDocumentListsAccess& rDocListAccess ); // #i36749#
// <--
- BOOL IsAutoRule() const { return bAutoRuleFlag; }
- void SetAutoRule( BOOL bFlag ) { bAutoRuleFlag = bFlag; }
+ sal_Bool IsAutoRule() const { return bAutoRuleFlag; }
+ void SetAutoRule( sal_Bool bFlag ) { bAutoRuleFlag = bFlag; }
- BOOL IsInvalidRule() const { return bInvalidRuleFlag; }
- void SetInvalidRule( BOOL bFlag );
+ sal_Bool IsInvalidRule() const { return bInvalidRuleFlag; }
+ void SetInvalidRule( sal_Bool bFlag );
- BOOL IsContinusNum() const { return bContinusNum; }
- void SetContinusNum( BOOL bFlag ) { bContinusNum = bFlag; }
+ sal_Bool IsContinusNum() const { return bContinusNum; }
+ void SetContinusNum( sal_Bool bFlag ) { bContinusNum = bFlag; }
- BOOL IsAbsSpaces() const { return bAbsSpaces; }
- void SetAbsSpaces( BOOL bFlag ) { bAbsSpaces = bFlag; }
+ sal_Bool IsAbsSpaces() const { return bAbsSpaces; }
+ void SetAbsSpaces( sal_Bool bFlag ) { bAbsSpaces = bFlag; }
// #115901#
- BOOL IsOutlineRule() const { return eRuleType == OUTLINE_RULE; }
+ sal_Bool IsOutlineRule() const { return eRuleType == OUTLINE_RULE; }
bool IsCountPhantoms() const;
void SetCountPhantoms(bool bCountPhantoms);
// erfragen und setzen der Poolvorlagen-Id's
- USHORT GetPoolFmtId() const { return nPoolFmtId; }
- void SetPoolFmtId( USHORT nId ) { nPoolFmtId = nId; }
+ sal_uInt16 GetPoolFmtId() const { return nPoolFmtId; }
+ void SetPoolFmtId( sal_uInt16 nId ) { nPoolFmtId = nId; }
// erfragen und setzen der Hilfe-Id's fuer die Document-Vorlagen
- USHORT GetPoolHelpId() const { return nPoolHelpId; }
- void SetPoolHelpId( USHORT nId ) { nPoolHelpId = nId; }
- BYTE GetPoolHlpFileId() const { return nPoolHlpFileId; }
- void SetPoolHlpFileId( BYTE nId ) { nPoolHlpFileId = nId; }
+ sal_uInt16 GetPoolHelpId() const { return nPoolHelpId; }
+ void SetPoolHelpId( sal_uInt16 nId ) { nPoolHelpId = nId; }
+ sal_uInt8 GetPoolHlpFileId() const { return nPoolHlpFileId; }
+ void SetPoolHlpFileId( sal_uInt8 nId ) { nPoolHlpFileId = nId; }
void SetSvxRule(const SvxNumRule&, SwDoc* pDoc);
SvxNumRule MakeSvxNumRule() const;
@@ -306,13 +306,13 @@ public:
// --> OD 2008-06-09 #i90078#
// refactoring: provide certain method for certain purpose
// void Indent(short aAmount, int nLevel = -1,
-// int nReferenceLevel = -1, BOOL bRelative = TRUE,
-// BOOL bFirstLine = TRUE, BOOL bCheckGtZero = TRUE);
+// int nReferenceLevel = -1, sal_Bool bRelative = sal_True,
+// sal_Bool bFirstLine = sal_True, sal_Bool bCheckGtZero = sal_True);
// change indent of all list levels by given difference
void ChangeIndent( const short nDiff );
// set indent of certain list level to given value
void SetIndent( const short nNewIndent,
- const USHORT nListLevel );
+ const sal_uInt16 nListLevel );
// set indent of first list level to given value and change other list level's
// indents accordingly
void SetIndentOfFirstListLevelAndChangeOthers( const short nNewIndent );
@@ -350,7 +350,7 @@ namespace numfunc
@author OD
*/
- sal_Unicode GetBulletChar( BYTE nLevel );
+ sal_Unicode GetBulletChar( sal_uInt8 nLevel );
/** configuration, if at first position of the first list item the <TAB>-key
increased the indent of the complete list or only demotes this list item.
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 6df70d20199d..8ba32064c3ba 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -54,7 +54,7 @@ enum SwFtnAdj
class SW_DLLPUBLIC SwPageFtnInfo
{
SwTwips nMaxHeight; //maximum height of the footnote area.
- ULONG nLineWidth; //width of separator line
+ sal_uLong nLineWidth; //width of separator line
Color aLineColor; //color of the separator line
Fraction aWidth; //percentage width of the separator line.
SwFtnAdj eAdj; //line adjustment.
@@ -63,7 +63,7 @@ class SW_DLLPUBLIC SwPageFtnInfo
public:
SwTwips GetHeight() const { return nMaxHeight; }
- ULONG GetLineWidth() const { return nLineWidth; }
+ sal_uLong GetLineWidth() const { return nLineWidth; }
const Color& GetLineColor() const { return aLineColor;}
const Fraction& GetWidth() const { return aWidth; }
SwFtnAdj GetAdj() const { return eAdj; }
@@ -71,7 +71,7 @@ public:
SwTwips GetBottomDist() const { return nBottomDist; }
void SetHeight( SwTwips nNew ) { nMaxHeight = nNew; }
- void SetLineWidth(ULONG nSet ) { nLineWidth = nSet; }
+ void SetLineWidth(sal_uLong nSet ) { nLineWidth = nSet; }
void SetLineColor(const Color& rCol ) { aLineColor = rCol;}
void SetWidth( const Fraction &rNew){ aWidth = rNew; }
void SetAdj ( SwFtnAdj eNew ) { eAdj = eNew; }
@@ -82,7 +82,7 @@ public:
SwPageFtnInfo( const SwPageFtnInfo& );
SwPageFtnInfo& operator=( const SwPageFtnInfo& );
- BOOL operator ==( const SwPageFtnInfo& ) const;
+ sal_Bool operator ==( const SwPageFtnInfo& ) const;
};
/*
@@ -119,7 +119,7 @@ public:
*
*/
-typedef USHORT UseOnPage;
+typedef sal_uInt16 UseOnPage;
namespace nsUseOnPage
{
const UseOnPage PD_NONE = 0x0000; //for internal use only.
@@ -144,10 +144,10 @@ class SW_DLLPUBLIC SwPageDesc : public SwModify
SwFrmFmt aLeft;
SwDepend aDepend; // wg. Registerhaltigkeit
SwPageDesc *pFollow;
- USHORT nRegHeight; // Zeilenabstand und Fontascent der Vorlage
- USHORT nRegAscent; // fuer die Registerhaltigkeit
+ sal_uInt16 nRegHeight; // Zeilenabstand und Fontascent der Vorlage
+ sal_uInt16 nRegAscent; // fuer die Registerhaltigkeit
UseOnPage eUse;
- BOOL bLandscape;
+ sal_Bool bLandscape;
//Fussnoteninformationen
SwPageFtnInfo aFtnInfo;
@@ -164,8 +164,8 @@ public:
const String &GetName() const { return aDescName; }
void SetName( const String& rNewName ) { aDescName = rNewName; }
- BOOL GetLandscape() const { return bLandscape; }
- void SetLandscape( BOOL bNew ) { bLandscape = bNew; }
+ sal_Bool GetLandscape() const { return bLandscape; }
+ void SetLandscape( sal_Bool bNew ) { bLandscape = bNew; }
const SvxNumberType &GetNumType() const { return aNumType; }
void SetNumType( const SvxNumberType& rNew ) { aNumType = rNew; }
@@ -174,10 +174,10 @@ public:
SwPageFtnInfo &GetFtnInfo() { return aFtnInfo; }
void SetFtnInfo( const SwPageFtnInfo &rNew ) { aFtnInfo = rNew; }
- inline BOOL IsHeaderShared() const;
- inline BOOL IsFooterShared() const;
- inline void ChgHeaderShare( BOOL bNew );
- inline void ChgFooterShare( BOOL bNew );
+ inline sal_Bool IsHeaderShared() const;
+ inline sal_Bool IsFooterShared() const;
+ inline void ChgHeaderShare( sal_Bool bNew );
+ inline void ChgFooterShare( sal_Bool bNew );
inline void SetUseOn( UseOnPage eNew );
inline UseOnPage GetUseOn() const;
@@ -202,10 +202,10 @@ public:
inline SwFrmFmt *GetLeftFmt();
inline const SwFrmFmt *GetLeftFmt() const;
- USHORT GetRegHeight() const { return nRegHeight; }
- USHORT GetRegAscent() const { return nRegAscent; }
- void SetRegHeight( USHORT nNew ){ nRegHeight = nNew; }
- void SetRegAscent( USHORT nNew ){ nRegAscent = nNew; }
+ sal_uInt16 GetRegHeight() const { return nRegHeight; }
+ sal_uInt16 GetRegAscent() const { return nRegAscent; }
+ void SetRegHeight( sal_uInt16 nNew ){ nRegHeight = nNew; }
+ void SetRegAscent( sal_uInt16 nNew ){ nRegAscent = nNew; }
inline void SetFollow( const SwPageDesc* pNew );
const SwPageDesc* GetFollow() const { return pFollow; }
@@ -217,19 +217,19 @@ public:
void RegisterChange();
// erfragen und setzen der PoolFormat-Id
- USHORT GetPoolFmtId() const { return aMaster.GetPoolFmtId(); }
- void SetPoolFmtId( USHORT nId ) { aMaster.SetPoolFmtId( nId ); }
- USHORT GetPoolHelpId() const { return aMaster.GetPoolHelpId(); }
- void SetPoolHelpId( USHORT nId ) { aMaster.SetPoolHelpId( nId ); }
- BYTE GetPoolHlpFileId() const { return aMaster.GetPoolHlpFileId(); }
- void SetPoolHlpFileId( BYTE nId ) { aMaster.SetPoolHlpFileId( nId ); }
+ sal_uInt16 GetPoolFmtId() const { return aMaster.GetPoolFmtId(); }
+ void SetPoolFmtId( sal_uInt16 nId ) { aMaster.SetPoolFmtId( nId ); }
+ sal_uInt16 GetPoolHelpId() const { return aMaster.GetPoolHelpId(); }
+ void SetPoolHelpId( sal_uInt16 nId ) { aMaster.SetPoolHelpId( nId ); }
+ sal_uInt8 GetPoolHlpFileId() const { return aMaster.GetPoolHlpFileId(); }
+ void SetPoolHlpFileId( sal_uInt8 nId ) { aMaster.SetPoolHlpFileId( nId ); }
// erfrage vom Client Informationen
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
const SwFrmFmt* GetPageFmtOfNode( const SwNode& rNd,
- BOOL bCheckForThisPgDc = TRUE ) const;
- BOOL IsFollowNextPageOfNode( const SwNode& rNd ) const;
+ sal_Bool bCheckForThisPgDc = sal_True ) const;
+ sal_Bool IsFollowNextPageOfNode( const SwNode& rNd ) const;
//Given a SwNode return the pagedesc in use at that location.
static const SwPageDesc* GetPageDescOfNode(const SwNode& rNd);
@@ -245,51 +245,51 @@ inline void SwPageDesc::SetFollow( const SwPageDesc* pNew )
pFollow = pNew ? (SwPageDesc*)pNew : this;
}
-inline BOOL SwPageDesc::IsHeaderShared() const
+inline sal_Bool SwPageDesc::IsHeaderShared() const
{
- return eUse & nsUseOnPage::PD_HEADERSHARE ? TRUE : FALSE;
+ return eUse & nsUseOnPage::PD_HEADERSHARE ? sal_True : sal_False;
}
-inline BOOL SwPageDesc::IsFooterShared() const
+inline sal_Bool SwPageDesc::IsFooterShared() const
{
- return eUse & nsUseOnPage::PD_FOOTERSHARE ? TRUE : FALSE;
+ return eUse & nsUseOnPage::PD_FOOTERSHARE ? sal_True : sal_False;
}
-inline void SwPageDesc::ChgHeaderShare( BOOL bNew )
+inline void SwPageDesc::ChgHeaderShare( sal_Bool bNew )
{
if ( bNew )
eUse = (UseOnPage) (eUse | nsUseOnPage::PD_HEADERSHARE);
- // (USHORT&)eUse |= (USHORT)nsUseOnPage::PD_HEADERSHARE;
+ // (sal_uInt16&)eUse |= (sal_uInt16)nsUseOnPage::PD_HEADERSHARE;
else
eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOHEADERSHARE);
- // (USHORT&)eUse &= (USHORT)nsUseOnPage::PD_NOHEADERSHARE;
+ // (sal_uInt16&)eUse &= (sal_uInt16)nsUseOnPage::PD_NOHEADERSHARE;
}
-inline void SwPageDesc::ChgFooterShare( BOOL bNew )
+inline void SwPageDesc::ChgFooterShare( sal_Bool bNew )
{
if ( bNew )
eUse = (UseOnPage) (eUse | nsUseOnPage::PD_FOOTERSHARE);
- // (USHORT&)eUse |= (USHORT)nsUseOnPage::PD_FOOTERSHARE;
+ // (sal_uInt16&)eUse |= (sal_uInt16)nsUseOnPage::PD_FOOTERSHARE;
else
eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOFOOTERSHARE);
- // (USHORT&)eUse &= (USHORT)nsUseOnPage::PD_NOFOOTERSHARE;
+ // (sal_uInt16&)eUse &= (sal_uInt16)nsUseOnPage::PD_NOFOOTERSHARE;
}
inline void SwPageDesc::SetUseOn( UseOnPage eNew )
{
UseOnPage eTmp = nsUseOnPage::PD_NONE;
if ( eUse & nsUseOnPage::PD_HEADERSHARE )
eTmp = nsUseOnPage::PD_HEADERSHARE;
- // (USHORT&)eTmp |= (USHORT)nsUseOnPage::PD_HEADERSHARE;
+ // (sal_uInt16&)eTmp |= (sal_uInt16)nsUseOnPage::PD_HEADERSHARE;
if ( eUse & nsUseOnPage::PD_FOOTERSHARE )
eTmp = (UseOnPage) (eTmp | nsUseOnPage::PD_FOOTERSHARE);
- // (USHORT&)eTmp |= (USHORT)nsUseOnPage::PD_FOOTERSHARE;
+ // (sal_uInt16&)eTmp |= (sal_uInt16)nsUseOnPage::PD_FOOTERSHARE;
eUse = (UseOnPage) (eTmp | eNew);
- // (USHORT&)eUse = eTmp | eNew;
+ // (sal_uInt16&)eUse = eTmp | eNew;
}
inline UseOnPage SwPageDesc::GetUseOn() const
{
UseOnPage eRet = eUse;
eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOHEADERSHARE);
- // (USHORT&)eRet &= (USHORT)nsUseOnPage::PD_NOHEADERSHARE;
+ // (sal_uInt16&)eRet &= (sal_uInt16)nsUseOnPage::PD_NOHEADERSHARE;
eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOFOOTERSHARE);
- // (USHORT&)eRet &= (USHORT)nsUseOnPage::PD_NOFOOTERSHARE;
+ // (sal_uInt16&)eRet &= (sal_uInt16)nsUseOnPage::PD_NOFOOTERSHARE;
return eRet;
}
diff --git a/sw/inc/pageiter.hxx b/sw/inc/pageiter.hxx
index 97e03873ec8d..2280ae414093 100644
--- a/sw/inc/pageiter.hxx
+++ b/sw/inc/pageiter.hxx
@@ -41,11 +41,11 @@ class SwPageIter {
public:
SwPageIter( const SwDoc &rDoc, const SwPosition &rStartPos );
- BOOL IsEnd() const { return 0 == pPage; }
- BOOL NextPage();
+ sal_Bool IsEnd() const { return 0 == pPage; }
+ sal_Bool NextPage();
const SwPageDesc* GetPageDesc() const;
- BOOL Seek( const SwPosition &rPos );
- BOOL GetPosition( SwPosition &rPos ) const;
+ sal_Bool Seek( const SwPosition &rPos );
+ sal_Bool GetPosition( SwPosition &rPos ) const;
};
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index 62277e6d48b0..995246f8d9e9 100644
--- a/sw/inc/pam.hxx
+++ b/sw/inc/pam.hxx
@@ -73,12 +73,12 @@ struct SW_DLLPUBLIC SwPosition
*/
SwDoc * GetDoc() const;
- BOOL operator < (const SwPosition &) const;
- BOOL operator > (const SwPosition &) const;
- BOOL operator <=(const SwPosition &) const;
- BOOL operator >=(const SwPosition &) const;
- BOOL operator ==(const SwPosition &) const;
- BOOL operator !=(const SwPosition &) const;
+ sal_Bool operator < (const SwPosition &) const;
+ sal_Bool operator > (const SwPosition &) const;
+ sal_Bool operator <=(const SwPosition &) const;
+ sal_Bool operator >=(const SwPosition &) const;
+ sal_Bool operator ==(const SwPosition &) const;
+ sal_Bool operator !=(const SwPosition &) const;
};
@@ -109,7 +109,7 @@ typedef SwMoveFnCollection* SwMoveFn;
SW_DLLPUBLIC extern SwMoveFn fnMoveForward; // SwPam::Move()/Find() default argument.
SW_DLLPUBLIC extern SwMoveFn fnMoveBackward;
-typedef BOOL (*SwGoInDoc)( SwPaM& rPam, SwMoveFn fnMove );
+typedef sal_Bool (*SwGoInDoc)( SwPaM& rPam, SwMoveFn fnMove );
SW_DLLPUBLIC extern SwGoInDoc fnGoDoc;
extern SwGoInDoc fnGoSection;
SW_DLLPUBLIC extern SwGoInDoc fnGoNode;
@@ -151,27 +151,27 @@ public:
SwPaM& operator=( const SwPaM & );
// Bewegen des Cursors
- BOOL Move( SwMoveFn fnMove = fnMoveForward,
+ sal_Bool Move( SwMoveFn fnMove = fnMoveForward,
SwGoInDoc fnGo = fnGoCntnt );
// Suchen
- BYTE Find( const com::sun::star::util::SearchOptions& rSearchOpt,
- BOOL bSearchInNotes,
+ sal_uInt8 Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ sal_Bool bSearchInNotes,
utl::TextSearch& rSTxt,
SwMoveFn fnMove = fnMoveForward,
- const SwPaM *pPam =0, BOOL bInReadOnly = FALSE);
- BOOL Find( const SwFmt& rFmt,
+ const SwPaM *pPam =0, sal_Bool bInReadOnly = sal_False);
+ sal_Bool Find( const SwFmt& rFmt,
SwMoveFn fnMove = fnMoveForward,
- const SwPaM *pPam =0, BOOL bInReadOnly = FALSE);
- BOOL Find( const SfxPoolItem& rAttr, BOOL bValue = TRUE,
+ const SwPaM *pPam =0, sal_Bool bInReadOnly = sal_False);
+ sal_Bool Find( const SfxPoolItem& rAttr, sal_Bool bValue = sal_True,
SwMoveFn fnMove = fnMoveForward,
- const SwPaM *pPam =0, BOOL bInReadOnly = FALSE );
- BOOL Find( const SfxItemSet& rAttr, BOOL bNoColls,
+ const SwPaM *pPam =0, sal_Bool bInReadOnly = sal_False );
+ sal_Bool Find( const SfxItemSet& rAttr, sal_Bool bNoColls,
SwMoveFn fnMove,
- const SwPaM *pPam, BOOL bInReadOnly, BOOL bMoveFirst );
+ const SwPaM *pPam, sal_Bool bInReadOnly, sal_Bool bMoveFirst );
bool DoSearch( const com::sun::star::util::SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
- SwMoveFn fnMove, BOOL bSrchForward, BOOL bRegSearch, BOOL bChkEmptyPara, BOOL bChkParaEnd,
+ SwMoveFn fnMove, sal_Bool bSrchForward, sal_Bool bRegSearch, sal_Bool bChkEmptyPara, sal_Bool bChkParaEnd,
xub_StrLen &nStart, xub_StrLen &nEnde,xub_StrLen nTxtLen,SwNode* pNode, SwPaM* pPam);
inline bool IsInFrontOfLabel() const { return m_bIsInFrontOfLabel; }
@@ -239,10 +239,10 @@ public:
/**
Normalizes PaM, i.e. sort point and mark.
- @param bPointFirst TRUE: If the point is behind the mark then swap.
- FALSE: If the mark is behind the point then swap.
+ @param bPointFirst sal_True: If the point is behind the mark then swap.
+ sal_False: If the mark is behind the point then swap.
*/
- SwPaM & Normalize(BOOL bPointFirst = TRUE);
+ SwPaM & Normalize(sal_Bool bPointFirst = sal_True);
/// @return the document (SwDoc) at which the PaM is registered
SwDoc* GetDoc() const { return m_pPoint->nNode.GetNode().GetDoc(); }
@@ -253,18 +253,18 @@ public:
{ return bOne ? m_Bound1 : m_Bound2; }
// erfrage die Seitennummer auf der der Cursor steht
- USHORT GetPageNum( BOOL bAtPoint = TRUE, const Point* pLayPos = 0 );
+ sal_uInt16 GetPageNum( sal_Bool bAtPoint = sal_True, const Point* pLayPos = 0 );
// steht in etwas geschuetztem oder in die Selektion umspannt
// etwas geschuetztes.
- BOOL HasReadonlySel( bool bFormView ) const;
+ sal_Bool HasReadonlySel( bool bFormView ) const;
- BOOL ContainsPosition(const SwPosition & rPos)
+ sal_Bool ContainsPosition(const SwPosition & rPos)
{ return *Start() <= rPos && rPos <= *End(); }
- static BOOL Overlap(const SwPaM & a, const SwPaM & b);
+ static sal_Bool Overlap(const SwPaM & a, const SwPaM & b);
- static BOOL LessThan(const SwPaM & a, const SwPaM & b);
+ static sal_Bool LessThan(const SwPaM & a, const SwPaM & b);
DECL_FIXEDMEMPOOL_NEWDEL(SwPaM);
@@ -273,8 +273,8 @@ public:
};
-BOOL CheckNodesRange( const SwNodeIndex&, const SwNodeIndex&, BOOL );
-BOOL GoInCntnt( SwPaM & rPam, SwMoveFn fnMove );
+sal_Bool CheckNodesRange( const SwNodeIndex&, const SwNodeIndex&, sal_Bool );
+sal_Bool GoInCntnt( SwPaM & rPam, SwMoveFn fnMove );
#endif // _PAM_HXX
diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx
index 68b9ba203ba3..bdd4a0155614 100644
--- a/sw/inc/paratr.hxx
+++ b/sw/inc/paratr.hxx
@@ -42,7 +42,7 @@ class IntlWrapper;
|* class SwFmtDrop
*************************************************************************/
-#define DROP_WHOLEWORD ((USHORT)0x0001)
+#define DROP_WHOLEWORD ((sal_uInt16)0x0001)
//Wenn ein SwFmtDrop Client ist, so ist dies das CharFmt welches den Font fuer
//die DropCaps beschreibt. Ist es kein Client, so wird von der Formatierung
@@ -53,11 +53,11 @@ class SW_DLLPUBLIC SwFmtDrop: public SfxPoolItem, public SwClient
{
SwModify* pDefinedIn; // Modify-Object, in dem der DropCaps steht
// kann nur TxtFmtCollection/TxtNode sein
- USHORT nDistance; // Abstand zum Textbeginn
- USHORT nReadFmt; // fuer den Sw3-Reader: CharFormat-Id (Pool laden!)
- BYTE nLines; // Anzahl der Zeilen
- BYTE nChars; // Anzahl der Zeichen
- BOOL bWholeWord; // Erstes Wort als Initialen
+ sal_uInt16 nDistance; // Abstand zum Textbeginn
+ sal_uInt16 nReadFmt; // fuer den Sw3-Reader: CharFormat-Id (Pool laden!)
+ sal_uInt8 nLines; // Anzahl der Zeilen
+ sal_uInt8 nChars; // Anzahl der Zeichen
+ sal_Bool bWholeWord; // Erstes Wort als Initialen
public:
TYPEINFO(); //Bereits in der Basisklasse SwClient
@@ -79,27 +79,27 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 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 );
- inline BYTE GetLines() const { return nLines; }
- inline BYTE &GetLines() { return nLines; }
+ inline sal_uInt8 GetLines() const { return nLines; }
+ inline sal_uInt8 &GetLines() { return nLines; }
- inline BYTE GetChars() const { return nChars; }
- inline BYTE &GetChars() { return nChars; }
+ inline sal_uInt8 GetChars() const { return nChars; }
+ inline sal_uInt8 &GetChars() { return nChars; }
- inline BOOL GetWholeWord() const { return bWholeWord; }
- inline BYTE &GetWholeWord() { return bWholeWord; }
+ inline sal_Bool GetWholeWord() const { return bWholeWord; }
+ inline sal_uInt8 &GetWholeWord() { return bWholeWord; }
- inline USHORT GetDistance() const { return nDistance; }
- inline USHORT &GetDistance() { return nDistance; }
+ inline sal_uInt16 GetDistance() const { return nDistance; }
+ inline sal_uInt16 &GetDistance() { return nDistance; }
inline const SwCharFmt *GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; }
inline SwCharFmt *GetCharFmt() { return (SwCharFmt*)pRegisteredIn; }
void SetCharFmt( SwCharFmt *pNew );
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
// erfrage vom Client Informationen
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
// erfrage und setze den Modify-Pointer
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
@@ -112,7 +112,7 @@ class SwRegisterItem : public SfxBoolItem
public:
TYPEINFO();
- inline SwRegisterItem( const BOOL bRegister = FALSE );
+ inline SwRegisterItem( const sal_Bool bRegister = sal_False );
// @@@ public copy assignment, but no copy ctor?
inline SwRegisterItem& operator=( const SwRegisterItem& rRegister );
@@ -126,7 +126,7 @@ public:
const IntlWrapper* pIntl = 0 ) const;
};
-inline SwRegisterItem::SwRegisterItem( const BOOL bRegister ) :
+inline SwRegisterItem::SwRegisterItem( const sal_Bool bRegister ) :
SfxBoolItem( RES_PARATR_REGISTER, bRegister )
{}
@@ -165,8 +165,8 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId );
};
class SwParaConnectBorderItem : public SfxBoolItem
@@ -174,7 +174,7 @@ class SwParaConnectBorderItem : public SfxBoolItem
public:
TYPEINFO();
- inline SwParaConnectBorderItem( const BOOL bConnect = TRUE );
+ inline SwParaConnectBorderItem( const sal_Bool bConnect = sal_True );
// @@@ public copy assignment, but no copy ctor?
inline SwParaConnectBorderItem& operator=( const SwParaConnectBorderItem& rConnect );
@@ -188,7 +188,7 @@ public:
const IntlWrapper* pIntl = 0 ) const;
};
-inline SwParaConnectBorderItem::SwParaConnectBorderItem( const BOOL bConnect ) :
+inline SwParaConnectBorderItem::SwParaConnectBorderItem( const sal_Bool bConnect ) :
SfxBoolItem( RES_PARATR_CONNECT_BORDER, bConnect )
{}
@@ -205,74 +205,74 @@ inline SwParaConnectBorderItem& SwParaConnectBorderItem::operator=(
* Implementierung der Paragraph-Attribut Methoden vom SwAttrSet
******************************************************************************/
-inline const SvxLineSpacingItem &SwAttrSet::GetLineSpacing(BOOL bInP) const
+inline const SvxLineSpacingItem &SwAttrSet::GetLineSpacing(sal_Bool bInP) const
{ return (const SvxLineSpacingItem&)Get( RES_PARATR_LINESPACING,bInP); }
-inline const SvxAdjustItem &SwAttrSet::GetAdjust(BOOL bInP) const
+inline const SvxAdjustItem &SwAttrSet::GetAdjust(sal_Bool bInP) const
{ return (const SvxAdjustItem&)Get( RES_PARATR_ADJUST,bInP); }
-inline const SvxFmtSplitItem &SwAttrSet::GetSplit(BOOL bInP) const
+inline const SvxFmtSplitItem &SwAttrSet::GetSplit(sal_Bool bInP) const
{ return (const SvxFmtSplitItem&)Get( RES_PARATR_SPLIT,bInP); }
-inline const SwRegisterItem &SwAttrSet::GetRegister(BOOL bInP) const
+inline const SwRegisterItem &SwAttrSet::GetRegister(sal_Bool bInP) const
{ return (const SwRegisterItem&)Get( RES_PARATR_REGISTER,bInP); }
-inline const SvxWidowsItem &SwAttrSet::GetWidows(BOOL bInP) const
+inline const SvxWidowsItem &SwAttrSet::GetWidows(sal_Bool bInP) const
{ return (const SvxWidowsItem&)Get( RES_PARATR_WIDOWS,bInP); }
-inline const SvxOrphansItem &SwAttrSet::GetOrphans(BOOL bInP) const
+inline const SvxOrphansItem &SwAttrSet::GetOrphans(sal_Bool bInP) const
{ return (const SvxOrphansItem&)Get( RES_PARATR_ORPHANS,bInP); }
-inline const SvxTabStopItem &SwAttrSet::GetTabStops(BOOL bInP) const
+inline const SvxTabStopItem &SwAttrSet::GetTabStops(sal_Bool bInP) const
{ return (const SvxTabStopItem&)Get( RES_PARATR_TABSTOP,bInP); }
-inline const SvxHyphenZoneItem &SwAttrSet::GetHyphenZone(BOOL bInP) const
+inline const SvxHyphenZoneItem &SwAttrSet::GetHyphenZone(sal_Bool bInP) const
{ return (const SvxHyphenZoneItem&)Get(RES_PARATR_HYPHENZONE,bInP); }
-inline const SwFmtDrop &SwAttrSet::GetDrop(BOOL bInP) const
+inline const SwFmtDrop &SwAttrSet::GetDrop(sal_Bool bInP) const
{ return (const SwFmtDrop&)Get(RES_PARATR_DROP,bInP); }
-inline const SwNumRuleItem &SwAttrSet::GetNumRule(BOOL bInP) const
+inline const SwNumRuleItem &SwAttrSet::GetNumRule(sal_Bool bInP) const
{ return (const SwNumRuleItem&)Get(RES_PARATR_NUMRULE,bInP); }
-inline const SvxScriptSpaceItem& SwAttrSet::GetScriptSpace(BOOL bInP) const
+inline const SvxScriptSpaceItem& SwAttrSet::GetScriptSpace(sal_Bool bInP) const
{ return (const SvxScriptSpaceItem&)Get(RES_PARATR_SCRIPTSPACE,bInP); }
-inline const SvxHangingPunctuationItem &SwAttrSet::GetHangingPunctuation(BOOL bInP) const
+inline const SvxHangingPunctuationItem &SwAttrSet::GetHangingPunctuation(sal_Bool bInP) const
{ return (const SvxHangingPunctuationItem&)Get(RES_PARATR_HANGINGPUNCTUATION,bInP); }
-inline const SvxForbiddenRuleItem &SwAttrSet::GetForbiddenRule(BOOL bInP) const
+inline const SvxForbiddenRuleItem &SwAttrSet::GetForbiddenRule(sal_Bool bInP) const
{ return (const SvxForbiddenRuleItem&)Get(RES_PARATR_FORBIDDEN_RULES, bInP); }
-inline const SvxParaVertAlignItem &SwAttrSet::GetParaVertAlign(BOOL bInP) const
+inline const SvxParaVertAlignItem &SwAttrSet::GetParaVertAlign(sal_Bool bInP) const
{ return (const SvxParaVertAlignItem&)Get( RES_PARATR_VERTALIGN, bInP ); }
-inline const SvxParaGridItem &SwAttrSet::GetParaGrid(BOOL bInP) const
+inline const SvxParaGridItem &SwAttrSet::GetParaGrid(sal_Bool bInP) const
{ return (const SvxParaGridItem&)Get( RES_PARATR_SNAPTOGRID, bInP ); }
-inline const SwParaConnectBorderItem &SwAttrSet::GetParaConnectBorder(BOOL bInP) const
+inline const SwParaConnectBorderItem &SwAttrSet::GetParaConnectBorder(sal_Bool bInP) const
{ return (const SwParaConnectBorderItem&)Get( RES_PARATR_CONNECT_BORDER, bInP ); }
/******************************************************************************
* Implementierung der Paragraph-Attribut Methoden vom SwFmt
******************************************************************************/
-inline const SvxLineSpacingItem &SwFmt::GetLineSpacing(BOOL bInP) const
+inline const SvxLineSpacingItem &SwFmt::GetLineSpacing(sal_Bool bInP) const
{ return aSet.GetLineSpacing(bInP); }
-inline const SvxAdjustItem &SwFmt::GetAdjust(BOOL bInP) const
+inline const SvxAdjustItem &SwFmt::GetAdjust(sal_Bool bInP) const
{ return aSet.GetAdjust(bInP); }
-inline const SvxFmtSplitItem &SwFmt::GetSplit(BOOL bInP) const
+inline const SvxFmtSplitItem &SwFmt::GetSplit(sal_Bool bInP) const
{ return aSet.GetSplit(bInP); }
-inline const SwRegisterItem &SwFmt::GetRegister(BOOL bInP) const
+inline const SwRegisterItem &SwFmt::GetRegister(sal_Bool bInP) const
{ return aSet.GetRegister(bInP); }
-inline const SvxWidowsItem &SwFmt::GetWidows(BOOL bInP) const
+inline const SvxWidowsItem &SwFmt::GetWidows(sal_Bool bInP) const
{ return aSet.GetWidows(bInP); }
-inline const SvxOrphansItem &SwFmt::GetOrphans(BOOL bInP) const
+inline const SvxOrphansItem &SwFmt::GetOrphans(sal_Bool bInP) const
{ return aSet.GetOrphans(bInP); }
-inline const SvxTabStopItem &SwFmt::GetTabStops(BOOL bInP) const
+inline const SvxTabStopItem &SwFmt::GetTabStops(sal_Bool bInP) const
{ return aSet.GetTabStops(bInP); }
-inline const SvxHyphenZoneItem &SwFmt::GetHyphenZone(BOOL bInP) const
+inline const SvxHyphenZoneItem &SwFmt::GetHyphenZone(sal_Bool bInP) const
{ return aSet.GetHyphenZone(bInP); }
-inline const SwFmtDrop &SwFmt::GetDrop(BOOL bInP) const
+inline const SwFmtDrop &SwFmt::GetDrop(sal_Bool bInP) const
{ return aSet.GetDrop(bInP); }
-inline const SwNumRuleItem &SwFmt::GetNumRule(BOOL bInP) const
+inline const SwNumRuleItem &SwFmt::GetNumRule(sal_Bool bInP) const
{ return aSet.GetNumRule(bInP); }
-inline const SvxScriptSpaceItem& SwFmt::GetScriptSpace(BOOL bInP) const
+inline const SvxScriptSpaceItem& SwFmt::GetScriptSpace(sal_Bool bInP) const
{ return aSet.GetScriptSpace(bInP) ; }
-inline const SvxHangingPunctuationItem &SwFmt::GetHangingPunctuation(BOOL bInP) const
+inline const SvxHangingPunctuationItem &SwFmt::GetHangingPunctuation(sal_Bool bInP) const
{ return aSet.GetHangingPunctuation(bInP) ; }
-inline const SvxForbiddenRuleItem &SwFmt::GetForbiddenRule(BOOL bInP) const
+inline const SvxForbiddenRuleItem &SwFmt::GetForbiddenRule(sal_Bool bInP) const
{ return (const SvxForbiddenRuleItem&)aSet.Get(RES_PARATR_FORBIDDEN_RULES, bInP); }
-inline const SvxParaVertAlignItem &SwFmt::GetParaVertAlign(BOOL bInP) const
+inline const SvxParaVertAlignItem &SwFmt::GetParaVertAlign(sal_Bool bInP) const
{ return (const SvxParaVertAlignItem&)aSet.Get( RES_PARATR_VERTALIGN, bInP ); }
-inline const SvxParaGridItem &SwFmt::GetParaGrid(BOOL bInP) const
+inline const SvxParaGridItem &SwFmt::GetParaGrid(sal_Bool bInP) const
{ return (const SvxParaGridItem&)aSet.Get( RES_PARATR_SNAPTOGRID, bInP ); }
-inline const SwParaConnectBorderItem &SwFmt::GetParaConnectBorder(BOOL bInP) const
+inline const SwParaConnectBorderItem &SwFmt::GetParaConnectBorder(sal_Bool bInP) const
{ return (const SwParaConnectBorderItem&)aSet.Get( RES_PARATR_CONNECT_BORDER, bInP ); }
#endif
diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx
index 7c4be27c76a7..e3dec80e22a8 100644
--- a/sw/inc/poolfmt.hxx
+++ b/sw/inc/poolfmt.hxx
@@ -69,38 +69,38 @@
// Maske fuer Erkennung von COLLPOOL-Ids:
-const USHORT POOLGRP_NOCOLLID = (1 << 10);
+const sal_uInt16 POOLGRP_NOCOLLID = (1 << 10);
// POLLCOLL-Gruppen:
-const USHORT USER_FMT = (1 << 15);
-const USHORT POOL_FMT = (0 << 15);
+const sal_uInt16 USER_FMT = (1 << 15);
+const sal_uInt16 POOL_FMT = (0 << 15);
-const USHORT COLL_TEXT_BITS = (1 << 11);
-const USHORT COLL_LISTS_BITS = (2 << 11);
-const USHORT COLL_EXTRA_BITS = (3 << 11);
-const USHORT COLL_REGISTER_BITS = (4 << 11);
-const USHORT COLL_DOC_BITS = (5 << 11);
-const USHORT COLL_HTML_BITS = (6 << 11);
-const USHORT COLL_GET_RANGE_BITS = (15 << 11);
+const sal_uInt16 COLL_TEXT_BITS = (1 << 11);
+const sal_uInt16 COLL_LISTS_BITS = (2 << 11);
+const sal_uInt16 COLL_EXTRA_BITS = (3 << 11);
+const sal_uInt16 COLL_REGISTER_BITS = (4 << 11);
+const sal_uInt16 COLL_DOC_BITS = (5 << 11);
+const sal_uInt16 COLL_HTML_BITS = (6 << 11);
+const sal_uInt16 COLL_GET_RANGE_BITS = (15 << 11);
// Sonstige Gruppen:
-const USHORT POOLGRP_CHARFMT = (0 << 11) + POOLGRP_NOCOLLID;
-const USHORT POOLGRP_FRAMEFMT = (1 << 11) + POOLGRP_NOCOLLID;
-const USHORT POOLGRP_PAGEDESC = (2 << 11) + POOLGRP_NOCOLLID;
-const USHORT POOLGRP_NUMRULE = (3 << 11) + POOLGRP_NOCOLLID;
-//const USHORT POOLGRP_GRFFMT = (4 << 11) + POOLGRP_NOCOLLID; // ?
+const sal_uInt16 POOLGRP_CHARFMT = (0 << 11) + POOLGRP_NOCOLLID;
+const sal_uInt16 POOLGRP_FRAMEFMT = (1 << 11) + POOLGRP_NOCOLLID;
+const sal_uInt16 POOLGRP_PAGEDESC = (2 << 11) + POOLGRP_NOCOLLID;
+const sal_uInt16 POOLGRP_NUMRULE = (3 << 11) + POOLGRP_NOCOLLID;
+//const sal_uInt16 POOLGRP_GRFFMT = (4 << 11) + POOLGRP_NOCOLLID; // ?
// fuer Erkennung ob Benutzer-Vorlage oder nicht:
-const USHORT POOL_IDUSER_FMT =
+const sal_uInt16 POOL_IDUSER_FMT =
USHRT_MAX & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID);
-inline BOOL IsPoolUserFmt( USHORT nId )
+inline sal_Bool IsPoolUserFmt( sal_uInt16 nId )
{
return POOL_IDUSER_FMT ==
(nId & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID))
- ? TRUE : FALSE;
+ ? sal_True : sal_False;
}
@@ -423,11 +423,11 @@ RES_POOLCOLL_HTML_END
// returnt: 0 -> Standard
// USHRT_MAX -> kein Parent
// sonst -> den Parent
-USHORT GetPoolParent( USHORT nId );
+sal_uInt16 GetPoolParent( sal_uInt16 nId );
-SvxFrameDirection GetDefaultFrameDirection(ULONG nLanguage);
+SvxFrameDirection GetDefaultFrameDirection(sal_uLong nLanguage);
-inline BOOL IsConditionalByPoolId(USHORT nId)
+inline sal_Bool IsConditionalByPoolId(sal_uInt16 nId)
{
return RES_POOLCOLL_TEXT == nId;
}
diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
index 31df018985c6..620936cdcf5b 100644
--- a/sw/inc/postithelper.hxx
+++ b/sw/inc/postithelper.hxx
@@ -57,7 +57,7 @@ struct SwLayoutInfo
SwRect mPagePrtArea;
unsigned long mnPageNumber;
sw::sidebarwindows::SidebarPosition meSidebarPosition;
- USHORT mRedlineAuthor;
+ sal_uInt16 mRedlineAuthor;
SwLayoutInfo()
: mpAnchorFrm(0)
diff --git a/sw/inc/pvprtdat.hxx b/sw/inc/pvprtdat.hxx
index 7b23800cb206..14b20f147714 100644
--- a/sw/inc/pvprtdat.hxx
+++ b/sw/inc/pvprtdat.hxx
@@ -33,11 +33,11 @@
class SwPagePreViewPrtData
{
- ULONG nLeftSpace, nRightSpace, nTopSpace, nBottomSpace,
+ sal_uLong nLeftSpace, nRightSpace, nTopSpace, nBottomSpace,
nHorzSpace, nVertSpace;
- BYTE nRow, nCol;
- BOOL bLandscape : 1;
- BOOL bStretch : 1;
+ sal_uInt8 nRow, nCol;
+ sal_Bool bLandscape : 1;
+ sal_Bool bStretch : 1;
public:
SwPagePreViewPrtData()
: nLeftSpace(0), nRightSpace(0), nTopSpace(0), nBottomSpace(0),
@@ -45,32 +45,32 @@ public:
bLandscape(0),bStretch(0)
{}
- ULONG GetLeftSpace() const { return nLeftSpace; }
- void SetLeftSpace( ULONG n ) { nLeftSpace = n; }
+ sal_uLong GetLeftSpace() const { return nLeftSpace; }
+ void SetLeftSpace( sal_uLong n ) { nLeftSpace = n; }
- ULONG GetRightSpace() const { return nRightSpace; }
- void SetRightSpace( ULONG n ) { nRightSpace = n; }
+ sal_uLong GetRightSpace() const { return nRightSpace; }
+ void SetRightSpace( sal_uLong n ) { nRightSpace = n; }
- ULONG GetTopSpace() const { return nTopSpace; }
- void SetTopSpace( ULONG n ) { nTopSpace = n; }
+ sal_uLong GetTopSpace() const { return nTopSpace; }
+ void SetTopSpace( sal_uLong n ) { nTopSpace = n; }
- ULONG GetBottomSpace() const { return nBottomSpace; }
- void SetBottomSpace( ULONG n ) { nBottomSpace = n; }
+ sal_uLong GetBottomSpace() const { return nBottomSpace; }
+ void SetBottomSpace( sal_uLong n ) { nBottomSpace = n; }
- ULONG GetHorzSpace() const { return nHorzSpace; }
- void SetHorzSpace( ULONG n ) { nHorzSpace = n; }
+ sal_uLong GetHorzSpace() const { return nHorzSpace; }
+ void SetHorzSpace( sal_uLong n ) { nHorzSpace = n; }
- ULONG GetVertSpace() const { return nVertSpace; }
- void SetVertSpace( ULONG n ) { nVertSpace = n; }
+ sal_uLong GetVertSpace() const { return nVertSpace; }
+ void SetVertSpace( sal_uLong n ) { nVertSpace = n; }
- BYTE GetRow() const { return nRow; }
- void SetRow(BYTE n ) { nRow = n; }
+ sal_uInt8 GetRow() const { return nRow; }
+ void SetRow(sal_uInt8 n ) { nRow = n; }
- BYTE GetCol() const { return nCol; }
- void SetCol( BYTE n ) { nCol = n; }
+ sal_uInt8 GetCol() const { return nCol; }
+ void SetCol( sal_uInt8 n ) { nCol = n; }
- BOOL GetLandscape() const { return bLandscape; }
- void SetLandscape( BOOL b ) { bLandscape = b; }
+ sal_Bool GetLandscape() const { return bLandscape; }
+ void SetLandscape( sal_Bool b ) { bLandscape = b; }
};
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index 5d3dce538793..d4242d35f383 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -62,9 +62,9 @@ class SwRedlineExtraData_FmtColl : public SwRedlineExtraData
{
String sFmtNm;
SfxItemSet* pSet;
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
public:
- SwRedlineExtraData_FmtColl( const String& rColl, USHORT nPoolFmtId,
+ SwRedlineExtraData_FmtColl( const String& rColl, sal_uInt16 nPoolFmtId,
const SfxItemSet* pSet = 0 );
virtual ~SwRedlineExtraData_FmtColl();
virtual SwRedlineExtraData* CreateNew() const;
@@ -98,14 +98,14 @@ class SW_DLLPUBLIC SwRedlineData
String sComment;
DateTime aStamp;
RedlineType_t eType;
- USHORT nAuthor, nSeqNo;
+ sal_uInt16 nAuthor, nSeqNo;
public:
- SwRedlineData( RedlineType_t eT, USHORT nAut );
- SwRedlineData( const SwRedlineData& rCpy, BOOL bCpyNext = TRUE );
+ SwRedlineData( RedlineType_t eT, sal_uInt16 nAut );
+ SwRedlineData( const SwRedlineData& rCpy, sal_Bool bCpyNext = sal_True );
// fuer sw3io: pNext/pExtraData gehen in eigenen Besitz ueber!
- SwRedlineData( RedlineType_t eT, USHORT nAut, const DateTime& rDT,
+ SwRedlineData( RedlineType_t eT, sal_uInt16 nAut, const DateTime& rDT,
const String& rCmnt, SwRedlineData* pNxt,
SwRedlineExtraData* pExtraData = 0 );
@@ -128,7 +128,7 @@ public:
RedlineType_t GetType() const
{ return ((RedlineType_t)(eType & nsRedlineType_t::REDLINE_NO_FLAG_MASK)); }
RedlineType_t GetRealType() const { return eType; }
- USHORT GetAuthor() const { return nAuthor; }
+ sal_uInt16 GetAuthor() const { return nAuthor; }
const String& GetComment() const { return sComment; }
const DateTime& GetTimeStamp() const { return aStamp; }
inline const SwRedlineData* Next() const{ return pNext; }
@@ -160,8 +160,8 @@ public:
// fuers UI-seitige zusammenfassen von Redline-Actionen. Wird z.Z. nur
// fuers Autoformat mit Redline benoetigt. Der Wert != 0 bedeutet dabei,
// das es noch weitere geben kann!
- USHORT GetSeqNo() const { return nSeqNo; }
- void SetSeqNo( USHORT nNo ) { nSeqNo = nNo; }
+ sal_uInt16 GetSeqNo() const { return nSeqNo; }
+ void SetSeqNo( sal_uInt16 nNo ) { nSeqNo = nNo; }
String GetDescr() const;
};
@@ -171,9 +171,9 @@ class SW_DLLPUBLIC SwRedline : public SwPaM
{
SwRedlineData* pRedlineData;
SwNodeIndex* pCntntSect;
- BOOL bDelLastPara : 1;
- BOOL bIsLastParaDelete : 1;
- BOOL bIsVisible : 1;
+ sal_Bool bDelLastPara : 1;
+ sal_Bool bIsLastParaDelete : 1;
+ sal_Bool bIsVisible : 1;
void MoveToSection();
void CopyToSection();
@@ -185,8 +185,8 @@ public:
SwRedline( const SwRedlineData& rData, const SwPaM& rPam );
SwRedline( const SwRedlineData& rData, const SwPosition& rPos );
// fuer sw3io: pData geht in eigenen Besitz ueber!
- SwRedline(SwRedlineData* pData, const SwPosition& rPos, BOOL bVsbl,
- BOOL bDelLP, BOOL bIsPD) :
+ SwRedline(SwRedlineData* pData, const SwPosition& rPos, sal_Bool bVsbl,
+ sal_Bool bDelLP, sal_Bool bIsPD) :
SwPaM( rPos ), pRedlineData( pData ), pCntntSect( 0 ),
bDelLastPara( bDelLP ), bIsLastParaDelete( bIsPD ), bIsVisible( bVsbl )
{}
@@ -197,11 +197,11 @@ public:
// fuers Undo
void SetContentIdx( const SwNodeIndex* );
- BOOL IsVisible() const { return bIsVisible; }
- BOOL IsDelLastPara() const { return bDelLastPara; }
+ sal_Bool IsVisible() const { return bIsVisible; }
+ sal_Bool IsDelLastPara() const { return bDelLastPara; }
- // das BOOL besagt, ob nach dem setzen der Pos kein Bereich mehr
- // aufgespannt ist. -> TRUE, ansonten Bereich und FALSE
+ // das sal_Bool besagt, ob nach dem setzen der Pos kein Bereich mehr
+ // aufgespannt ist. -> sal_True, ansonten Bereich und sal_False
void SetStart( const SwPosition& rPos, SwPosition* pSttPtr = 0 )
{
if( !pSttPtr ) pSttPtr = Start();
@@ -213,23 +213,23 @@ public:
*pEndPtr = rPos;
}
// liegt eine gueltige Selektion vor?
- BOOL HasValidRange() const;
+ sal_Bool HasValidRange() const;
- const SwRedlineData& GetRedlineData(USHORT nPos = 0) const;
+ const SwRedlineData& GetRedlineData(sal_uInt16 nPos = 0) const;
int operator==( const SwRedlineData& rCmp ) const
{ return *pRedlineData == rCmp; }
int operator!=( const SwRedlineData& rCmp ) const
{ return *pRedlineData != rCmp; }
void SetAutoFmtFlag() { pRedlineData->SetAutoFmtFlag(); }
- USHORT GetStackCount() const;
- USHORT GetAuthor( USHORT nPos = 0) const;
- const String& GetAuthorString( USHORT nPos = 0 ) const;
- const DateTime& GetTimeStamp( USHORT nPos = 0) const;
- RedlineType_t GetRealType( USHORT nPos = 0 ) const;
- RedlineType_t GetType( USHORT nPos = 0) const
+ sal_uInt16 GetStackCount() const;
+ sal_uInt16 GetAuthor( sal_uInt16 nPos = 0) const;
+ const String& GetAuthorString( sal_uInt16 nPos = 0 ) const;
+ const DateTime& GetTimeStamp( sal_uInt16 nPos = 0) const;
+ RedlineType_t GetRealType( sal_uInt16 nPos = 0 ) const;
+ RedlineType_t GetType( sal_uInt16 nPos = 0) const
{ return ( (RedlineType_t)(GetRealType( nPos ) & nsRedlineType_t::REDLINE_NO_FLAG_MASK)); }
- const String& GetComment( USHORT nPos = 0 ) const;
+ const String& GetComment( sal_uInt16 nPos = 0 ) const;
void SetComment( const String& rS ) { pRedlineData->SetComment( rS ); }
@@ -243,29 +243,29 @@ public:
// fuers UI-seitige zusammenfassen von Redline-Actionen. Wird z.Z. nur
// fuers Autoformat mit Redline benoetigt. Der Wert != 0 bedeutet dabei,
// das es noch weitere geben kann!
- USHORT GetSeqNo() const { return pRedlineData->GetSeqNo(); }
- void SetSeqNo( USHORT nNo ) { pRedlineData->SetSeqNo( nNo ); }
+ sal_uInt16 GetSeqNo() const { return pRedlineData->GetSeqNo(); }
+ void SetSeqNo( sal_uInt16 nNo ) { pRedlineData->SetSeqNo( nNo ); }
// Beim Hide/ShowOriginal wird 2 mal ueber die Liste gelaufen, damit
// die Del-Redlines per Copy und Delete versteckt werden. Beim Move
// wird sonst die Attributierung falsch behandelt.
// Alle anderen Aufrufer muessen immer 0 angeben.
- void CallDisplayFunc( USHORT nLoop = 0 );
- void Show( USHORT nLoop = 0 );
- void Hide( USHORT nLoop = 0 );
- void ShowOriginal( USHORT nLoop = 0 );
+ void CallDisplayFunc( sal_uInt16 nLoop = 0 );
+ void Show( sal_uInt16 nLoop = 0 );
+ void Hide( sal_uInt16 nLoop = 0 );
+ void ShowOriginal( sal_uInt16 nLoop = 0 );
// calculates the intersection with text node number nNdIdx
- void CalcStartEnd( ULONG nNdIdx, USHORT& nStart, USHORT& nEnd ) const;
+ void CalcStartEnd( sal_uLong nNdIdx, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
void InvalidateRange(); // das Layout anstossen
- BOOL IsOwnRedline( const SwRedline& rRedl ) const
+ sal_Bool IsOwnRedline( const SwRedline& rRedl ) const
{ return GetAuthor() == rRedl.GetAuthor(); }
- BOOL CanCombine( const SwRedline& rRedl ) const;
+ sal_Bool CanCombine( const SwRedline& rRedl ) const;
- void PushData( const SwRedline& rRedl, BOOL bOwnAsNext = TRUE );
- BOOL PopData();
+ void PushData( const SwRedline& rRedl, sal_Bool bOwnAsNext = sal_True );
+ sal_Bool PopData();
// #111827#
/**
@@ -279,7 +279,7 @@ public:
@return textual description of the selected redline data element
*/
- String GetDescr(USHORT nPos = 0);
+ String GetDescr(sal_uInt16 nPos = 0);
int operator==( const SwRedline& ) const;
int operator<( const SwRedline& ) const;
diff --git a/sw/inc/redlnaut.hxx b/sw/inc/redlnaut.hxx
index 4290b3ec709c..e1a238f0704b 100644
--- a/sw/inc/redlnaut.hxx
+++ b/sw/inc/redlnaut.hxx
@@ -41,7 +41,7 @@ class SwRedlineAuthor
Color aChgLineColor;
SfxItemSet *pInsAttrSet, *pDelAttrSet, *pFmtAttrSet;
short eChgLineOrient;
- BYTE cDelChar;
+ sal_uInt8 cDelChar;
public:
SwRedlineAuthor( SwAttrPool& rPool, const String& );
SwRedlineAuthor( const SwRedlineAuthor& );
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index 44d17eb38ca8..fcd8ba2c70b8 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -83,8 +83,8 @@ public:
void MergeWithOtherDoc( SwDoc& rDestDoc );
static SwTxtNode* FindAnchor( SwDoc* pDoc, const String& rRefMark,
- USHORT nSubType, USHORT nSeqNo,
- USHORT* pStt, USHORT* pEnd = 0 );
+ sal_uInt16 nSubType, sal_uInt16 nSeqNo,
+ sal_uInt16* pStt, sal_uInt16* pEnd = 0 );
};
/*--------------------------------------------------------------------
@@ -96,8 +96,8 @@ class SW_DLLPUBLIC SwGetRefField : public SwField
private:
String sSetRefName;
String sTxt;
- USHORT nSubType;
- USHORT nSeqNo;
+ sal_uInt16 nSubType;
+ sal_uInt16 nSeqNo;
virtual String Expand() const;
virtual SwField* Copy() const;
@@ -109,7 +109,7 @@ private:
// <--
public:
SwGetRefField( SwGetRefFieldType*, const String& rSetRef,
- USHORT nSubType, USHORT nSeqNo, ULONG nFmt );
+ sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_uLong nFmt );
virtual ~SwGetRefField();
@@ -129,8 +129,8 @@ public:
void SetExpand( const String& rStr ) { sTxt = rStr; }
// SubType erfragen/setzen
- virtual USHORT GetSubType() const;
- virtual void SetSubType( USHORT n );
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType( sal_uInt16 n );
// --> OD 2007-11-09 #i81002#
bool IsRefToHeadingCrossRefBookmark() const;
@@ -142,16 +142,16 @@ public:
// <--
// SequenceNo erfragen/setzen (nur fuer REF_SEQUENCEFLD interressant)
- USHORT GetSeqNo() const { return nSeqNo; }
- void SetSeqNo( USHORT n ) { nSeqNo = n; }
+ sal_uInt16 GetSeqNo() const { return nSeqNo; }
+ void SetSeqNo( sal_uInt16 n ) { nSeqNo = n; }
// Name der Referenz
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
virtual String GetPar2() const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
void ConvertProgrammaticToUIName();
diff --git a/sw/inc/rolbck.hxx b/sw/inc/rolbck.hxx
index e2aa129f65e1..9a39200f0b21 100644
--- a/sw/inc/rolbck.hxx
+++ b/sw/inc/rolbck.hxx
@@ -111,10 +111,10 @@ public:
class SwHistorySetFmt : public SwHistoryHint
{
::std::auto_ptr<SfxPoolItem> m_pAttr;
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
public:
- SwHistorySetFmt( const SfxPoolItem* pFmtHt, ULONG nNode );
+ SwHistorySetFmt( const SfxPoolItem* pFmtHt, sal_uLong nNode );
virtual ~SwHistorySetFmt();
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
virtual String GetDescription() const;
@@ -123,12 +123,12 @@ public:
class SwHistoryResetFmt : public SwHistoryHint
{
- const ULONG m_nNodeIndex;
- const USHORT m_nWhich;
+ const sal_uLong m_nNodeIndex;
+ const sal_uInt16 m_nWhich;
public:
// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
- SwHistoryResetFmt( const SfxPoolItem* pFmtHt, ULONG nNodeIdx );
+ SwHistoryResetFmt( const SfxPoolItem* pFmtHt, sal_uLong nNodeIdx );
// <--
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
@@ -137,12 +137,12 @@ public:
class SwHistorySetTxt : public SwHistoryHint
{
::std::auto_ptr<SfxPoolItem> m_pAttr;
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
const xub_StrLen m_nStart;
const xub_StrLen m_nEnd;
public:
- SwHistorySetTxt( SwTxtAttr* pTxtHt, ULONG nNode );
+ SwHistorySetTxt( SwTxtAttr* pTxtHt, sal_uLong nNode );
virtual ~SwHistorySetTxt();
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
@@ -155,12 +155,12 @@ class SwHistorySetTxtFld : public SwHistoryHint
::std::auto_ptr<SwFieldType> m_pFldType;
const ::std::auto_ptr<SwFmtFld> m_pFld;
- ULONG m_nNodeIndex;
+ sal_uLong m_nNodeIndex;
xub_StrLen m_nPos;
- USHORT m_nFldWhich;
+ sal_uInt16 m_nFldWhich;
public:
- SwHistorySetTxtFld( SwTxtFld* pTxtFld, ULONG nNode );
+ SwHistorySetTxtFld( SwTxtFld* pTxtFld, sal_uLong nNode );
virtual ~SwHistorySetTxtFld();
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
@@ -171,12 +171,12 @@ public:
class SwHistorySetRefMark : public SwHistoryHint
{
const String m_RefName;
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
const xub_StrLen m_nStart;
const xub_StrLen m_nEnd;
public:
- SwHistorySetRefMark( SwTxtRefMark* pTxtHt, ULONG nNode );
+ SwHistorySetRefMark( SwTxtRefMark* pTxtHt, sal_uLong nNode );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
};
@@ -186,12 +186,12 @@ class SwHistorySetTOXMark : public SwHistoryHint
SwTOXMark m_TOXMark;
const String m_TOXName;
const TOXTypes m_eTOXTypes;
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
const xub_StrLen m_nStart;
const xub_StrLen m_nEnd;
public:
- SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, ULONG nNode );
+ SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, sal_uLong nNode );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
int IsEqual( const SwTOXMark& rCmp ) const;
@@ -199,18 +199,18 @@ public:
class SwHistoryResetTxt : public SwHistoryHint
{
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
const xub_StrLen m_nStart;
const xub_StrLen m_nEnd;
- const USHORT m_nAttr;
+ const sal_uInt16 m_nAttr;
public:
- SwHistoryResetTxt( USHORT nWhich, xub_StrLen nStt, xub_StrLen nEnd,
- ULONG nNode );
+ SwHistoryResetTxt( sal_uInt16 nWhich, xub_StrLen nStt, xub_StrLen nEnd,
+ sal_uLong nNode );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
- USHORT GetWhich() const { return m_nAttr; }
- ULONG GetNode() const { return m_nNodeIndex; }
+ sal_uInt16 GetWhich() const { return m_nAttr; }
+ sal_uLong GetNode() const { return m_nNodeIndex; }
xub_StrLen GetCntnt() const { return m_nStart; }
};
@@ -219,12 +219,12 @@ class SwHistorySetFootnote : public SwHistoryHint
{
const ::std::auto_ptr<SwUndoSaveSection> m_pUndo;
const String m_FootnoteNumber;
- ULONG m_nNodeIndex;
+ sal_uLong m_nNodeIndex;
const xub_StrLen m_nStart;
const bool m_bEndNote;
public:
- SwHistorySetFootnote( SwTxtFtn* pTxtFtn, ULONG nNode );
+ SwHistorySetFootnote( SwTxtFtn* pTxtFtn, sal_uLong nNode );
SwHistorySetFootnote( const SwTxtFtn& );
virtual ~SwHistorySetFootnote();
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
@@ -236,11 +236,11 @@ public:
class SwHistoryChangeFmtColl : public SwHistoryHint
{
SwFmtColl * const m_pColl;
- const ULONG m_nNodeIndex;
- const BYTE m_nNodeType;
+ const sal_uLong m_nNodeIndex;
+ const sal_uInt8 m_nNodeType;
public:
- SwHistoryChangeFmtColl( SwFmtColl* pColl, ULONG nNode, BYTE nNodeWhich );
+ SwHistoryChangeFmtColl( SwFmtColl* pColl, sal_uLong nNode, sal_uInt8 nNodeWhich );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
};
@@ -272,8 +272,8 @@ class SwHistoryBookmark : public SwHistoryHint
const ::rtl::OUString m_aName;
::rtl::OUString m_aShortName;
KeyCode m_aKeycode;
- const ULONG m_nNode;
- const ULONG m_nOtherNode;
+ const sal_uLong m_nNode;
+ const sal_uLong m_nOtherNode;
const xub_StrLen m_nCntnt;
const xub_StrLen m_nOtherCntnt;
const bool m_bSavePos;
@@ -287,10 +287,10 @@ class SwHistorySetAttrSet : public SwHistoryHint
{
SfxItemSet m_OldSet;
SvUShorts m_ResetArray;
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
public:
- SwHistorySetAttrSet( const SfxItemSet& rSet, ULONG nNode,
+ SwHistorySetAttrSet( const SfxItemSet& rSet, sal_uLong nNode,
const SvUShortsSort& rSetArr );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
@@ -299,19 +299,19 @@ public:
class SwHistoryResetAttrSet : public SwHistoryHint
{
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
const xub_StrLen m_nStart;
const xub_StrLen m_nEnd;
SvUShorts m_Array;
public:
- SwHistoryResetAttrSet( const SfxItemSet& rSet, ULONG nNode,
+ SwHistoryResetAttrSet( const SfxItemSet& rSet, sal_uLong nNode,
xub_StrLen nStt = STRING_MAXLEN,
xub_StrLen nEnd = STRING_MAXLEN );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
const SvUShorts& GetArr() const { return m_Array; }
- ULONG GetNode() const { return m_nNodeIndex; }
+ sal_uLong GetNode() const { return m_nNodeIndex; }
xub_StrLen GetCntnt() const { return m_nStart; }
};
@@ -319,7 +319,7 @@ public:
class SwHistoryChangeFlyAnchor : public SwHistoryHint
{
SwFrmFmt & m_rFmt;
- const ULONG m_nOldNodeIndex;
+ const sal_uLong m_nOldNodeIndex;
const xub_StrLen m_nOldContentIndex;
public:
@@ -363,41 +363,41 @@ class SwHistory
friend class SwRegHistory; // for inserting History attributes
SwpHstry m_SwpHstry;
- USHORT m_nEndDiff;
+ sal_uInt16 m_nEndDiff;
public:
- SwHistory( USHORT nInitSz = 0, USHORT nGrowSz = 2 );
+ SwHistory( sal_uInt16 nInitSz = 0, sal_uInt16 nGrowSz = 2 );
~SwHistory();
// delete History from nStart to array end
- void Delete( USHORT nStart = 0 );
+ void Delete( sal_uInt16 nStart = 0 );
// call and delete all objects between nStart and array end
- bool Rollback( SwDoc* pDoc, USHORT nStart = 0 );
+ bool Rollback( SwDoc* pDoc, sal_uInt16 nStart = 0 );
// call all objects between nStart and TmpEnd; store nStart as TmpEnd
- bool TmpRollback( SwDoc* pDoc, USHORT nStart, bool ToFirst = true );
+ bool TmpRollback( SwDoc* pDoc, sal_uInt16 nStart, bool ToFirst = true );
// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
void Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue,
- ULONG nNodeIdx );
+ sal_uLong nNodeIdx );
// <--
- void Add( SwTxtAttr* pTxtHt, ULONG nNodeIdx, bool bNewAttr = true );
- void Add( SwFmtColl*, ULONG nNodeIdx, BYTE nWhichNd );
+ void Add( SwTxtAttr* pTxtHt, sal_uLong nNodeIdx, bool bNewAttr = true );
+ void Add( SwFmtColl*, sal_uLong nNodeIdx, sal_uInt8 nWhichNd );
void Add( const ::sw::mark::IMark&, bool bSavePos, bool bSaveOtherPos );
void Add( SwFrmFmt& rFmt );
- void Add( SwFlyFrmFmt&, USHORT& rSetPos );
+ void Add( SwFlyFrmFmt&, sal_uInt16& rSetPos );
void Add( const SwTxtFtn& );
void Add( const SfxItemSet & rSet, const SwCharFmt & rCharFmt); // #i27615#
- USHORT Count() const { return m_SwpHstry.Count(); }
- USHORT GetTmpEnd() const { return m_SwpHstry.Count() - m_nEndDiff; }
- USHORT SetTmpEnd( USHORT nTmpEnd ); // return previous value
- SwHistoryHint * operator[]( USHORT nPos ) { return m_SwpHstry[nPos]; }
- SwHistoryHint const* operator[]( USHORT nPos ) const
+ sal_uInt16 Count() const { return m_SwpHstry.Count(); }
+ sal_uInt16 GetTmpEnd() const { return m_SwpHstry.Count() - m_nEndDiff; }
+ sal_uInt16 SetTmpEnd( sal_uInt16 nTmpEnd ); // return previous value
+ SwHistoryHint * operator[]( sal_uInt16 nPos ) { return m_SwpHstry[nPos]; }
+ SwHistoryHint const* operator[]( sal_uInt16 nPos ) const
{ return m_SwpHstry[nPos]; }
// for SwUndoDelete::Undo/Redo
- void Move( USHORT nPos, SwHistory *pIns,
- USHORT nStart = 0, USHORT nEnd = USHRT_MAX )
+ void Move( sal_uInt16 nPos, SwHistory *pIns,
+ sal_uInt16 nStart = 0, sal_uInt16 nEnd = USHRT_MAX )
{
m_SwpHstry.Insert( &pIns->m_SwpHstry, nPos, nStart, nEnd );
pIns->m_SwpHstry.Remove( nStart, (nEnd == USHRT_MAX)
@@ -407,10 +407,10 @@ public:
// helper methods for recording attribute in History
// used by Undo classes (Delete/Overwrite/Inserts)
- void CopyAttr( SwpHints* pHts, ULONG nNodeIdx, xub_StrLen nStart,
+ void CopyAttr( SwpHints* pHts, sal_uLong nNodeIdx, xub_StrLen nStart,
xub_StrLen nEnd, bool bFields );
// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
- void CopyFmtAttr( const SfxItemSet& rSet, ULONG nNodeIdx );
+ void CopyFmtAttr( const SfxItemSet& rSet, sal_uLong nNodeIdx );
// <--
};
@@ -421,7 +421,7 @@ class SwRegHistory : public SwClient
private:
SvUShortsSort m_WhichIdSet;
SwHistory * const m_pHistory;
- ULONG m_nNodeIndex;
+ sal_uLong m_nNodeIndex;
void _MakeSetWhichIds();
@@ -442,7 +442,7 @@ public:
void AddHint( SwTxtAttr* pHt, const bool bNew = false );
void RegisterInModify( SwModify* pRegIn, const SwNode& rNd );
- void ChangeNodeIndex( ULONG nNew ) { m_nNodeIndex = nNew; }
+ void ChangeNodeIndex( sal_uLong nNew ) { m_nNodeIndex = nNew; }
};
#endif
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index db99cfdf4d52..98948c228678 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -220,7 +220,7 @@ public:
void SetCondHidden(bool const bFlag = true);
bool IsCondHidden() const { return m_Data.IsCondHidden(); }
// erfrage (auch ueber die Parents), ob diese Section versteckt sein soll.
- BOOL CalcHiddenFlag() const;
+ sal_Bool CalcHiddenFlag() const;
inline SwSection* GetParent() const;
@@ -249,8 +249,8 @@ public:
bool IsServer() const { return m_RefObj.Is(); }
// Methoden fuer gelinkte Bereiche
- USHORT GetUpdateType() const { return m_RefLink->GetUpdateMode(); }
- void SetUpdateType(USHORT const nType )
+ sal_uInt16 GetUpdateType() const { return m_RefLink->GetUpdateMode(); }
+ void SetUpdateType(sal_uInt16 const nType )
{ m_RefLink->SetUpdateMode(nType); }
bool IsConnected() const { return m_RefLink.Is(); }
@@ -313,7 +313,7 @@ public:
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
// erfrage vom Format Informationen
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
SwSection* GetSection() const;
inline SwSectionFmt* GetParent() const;
@@ -322,13 +322,13 @@ public:
// alle Sections, die von dieser abgeleitet sind
// - sortiert nach : Name oder Position oder unsortiert
// - alle oder nur die, die sich im normalten Nodes-Array befinden
- USHORT GetChildSections( SwSections& rArr,
+ sal_uInt16 GetChildSections( SwSections& rArr,
SectionSort eSort = SORTSECT_NOT,
- BOOL bAllSections = TRUE ) const;
+ sal_Bool bAllSections = sal_True ) const;
// erfrage, ob sich die Section im Nodes-Array oder UndoNodes-Array
// befindet.
- BOOL IsInNodesArr() const;
+ sal_Bool IsInNodesArr() const;
SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false);
const SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false) const
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 0e52ce256754..43c2066330f7 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -78,7 +78,7 @@ class SW_DLLPUBLIC SwAsciiOptions
{
String sFont;
rtl_TextEncoding eCharSet;
- USHORT nLanguage;
+ sal_uInt16 nLanguage;
LineEnd eCRLF_Flag;
public:
@@ -89,8 +89,8 @@ public:
rtl_TextEncoding GetCharSet() const { return eCharSet; }
void SetCharSet( rtl_TextEncoding nVal ) { eCharSet = nVal; }
- USHORT GetLanguage() const { return nLanguage; }
- void SetLanguage( USHORT nVal ) { nLanguage = nVal; }
+ sal_uInt16 GetLanguage() const { return nLanguage; }
+ void SetLanguage( sal_uInt16 nVal ) { nLanguage = nVal; }
LineEnd GetParaFlags() const { return eCRLF_Flag; }
void SetParaFlags( LineEnd eVal ) { eCRLF_Flag = eVal; }
@@ -122,35 +122,35 @@ class SwgReaderOption
SwAsciiOptions aASCIIOpts;
union
{
- BOOL bFmtsOnly;
+ sal_Bool bFmtsOnly;
struct
{
- BOOL bFrmFmts: 1;
- BOOL bPageDescs: 1;
- BOOL bTxtFmts: 1;
- BOOL bNumRules: 1;
- BOOL bMerge:1;
+ sal_Bool bFrmFmts: 1;
+ sal_Bool bPageDescs: 1;
+ sal_Bool bTxtFmts: 1;
+ sal_Bool bNumRules: 1;
+ sal_Bool bMerge:1;
} Fmts;
} What;
public:
void ResetAllFmtsOnly() { What.bFmtsOnly = 0; }
- BOOL IsFmtsOnly() const { return What.bFmtsOnly; }
+ sal_Bool IsFmtsOnly() const { return What.bFmtsOnly; }
- BOOL IsFrmFmts() const { return What.Fmts.bFrmFmts; }
- void SetFrmFmts( const BOOL bNew) { What.Fmts.bFrmFmts = bNew; }
+ sal_Bool IsFrmFmts() const { return What.Fmts.bFrmFmts; }
+ void SetFrmFmts( const sal_Bool bNew) { What.Fmts.bFrmFmts = bNew; }
- BOOL IsPageDescs() const { return What.Fmts.bPageDescs; }
- void SetPageDescs( const BOOL bNew) { What.Fmts.bPageDescs = bNew; }
+ sal_Bool IsPageDescs() const { return What.Fmts.bPageDescs; }
+ void SetPageDescs( const sal_Bool bNew) { What.Fmts.bPageDescs = bNew; }
- BOOL IsTxtFmts() const { return What.Fmts.bTxtFmts; }
- void SetTxtFmts( const BOOL bNew) { What.Fmts.bTxtFmts = bNew; }
+ sal_Bool IsTxtFmts() const { return What.Fmts.bTxtFmts; }
+ void SetTxtFmts( const sal_Bool bNew) { What.Fmts.bTxtFmts = bNew; }
- BOOL IsNumRules() const { return What.Fmts.bNumRules; }
- void SetNumRules( const BOOL bNew) { What.Fmts.bNumRules = bNew; }
+ sal_Bool IsNumRules() const { return What.Fmts.bNumRules; }
+ void SetNumRules( const sal_Bool bNew) { What.Fmts.bNumRules = bNew; }
- BOOL IsMerge() const { return What.Fmts.bMerge; }
- void SetMerge( const BOOL bNew ) { What.Fmts.bMerge = bNew; }
+ sal_Bool IsMerge() const { return What.Fmts.bMerge; }
+ void SetMerge( const sal_Bool bNew ) { What.Fmts.bMerge = bNew; }
const SwAsciiOptions& GetASCIIOpts() const { return aASCIIOpts; }
void SetASCIIOpts( const SwAsciiOptions& rOpts ) { aASCIIOpts = rOpts; }
@@ -192,13 +192,13 @@ public:
/*
* Nur SwReader::Read(...) ist die Export-Schnittstelle!!!
*/
- BOOL NeedsPasswd( const Reader& );
- BOOL CheckPasswd( const String&, const Reader& );
- ULONG Read( const Reader& );
+ sal_Bool NeedsPasswd( const Reader& );
+ sal_Bool CheckPasswd( const String&, const Reader& );
+ sal_uLong Read( const Reader& );
// ask for glossaries
- BOOL HasGlossaries( const Reader& );
- BOOL ReadGlossaries( const Reader&, SwTextBlocks&, BOOL bSaveRelFiles );
+ sal_Bool HasGlossaries( const Reader& );
+ sal_Bool ReadGlossaries( const Reader&, SwTextBlocks&, sal_Bool bSaveRelFiles );
const String& GetBaseURL() const { return sBaseURL;}
@@ -233,13 +233,13 @@ protected:
SfxMedium* pMedium; // wer ein Medium haben will (W4W)
SwgReaderOption aOpt;
- BOOL bInsertMode : 1;
- BOOL bTmplBrowseMode : 1;
- BOOL bReadUTF8: 1; // Stream als UTF-8 interpretieren
- BOOL bBlockMode: 1;
- BOOL bOrganizerMode : 1;
- BOOL bHasAskTemplateName : 1;
- BOOL bIgnoreHTMLComments : 1;
+ sal_Bool bInsertMode : 1;
+ sal_Bool bTmplBrowseMode : 1;
+ sal_Bool bReadUTF8: 1; // Stream als UTF-8 interpretieren
+ sal_Bool bBlockMode: 1;
+ sal_Bool bOrganizerMode : 1;
+ sal_Bool bHasAskTemplateName : 1;
+ sal_Bool bIgnoreHTMLComments : 1;
virtual String GetTemplateName() const;
@@ -262,35 +262,35 @@ public:
// Die Filter-Vorlage laden, setzen und wieder freigeben
SwDoc* GetTemplateDoc();
- BOOL SetTemplate( SwDoc& rDoc );
+ sal_Bool SetTemplate( SwDoc& rDoc );
void ClearTemplate();
void SetTemplateName( const String& rDir );
void MakeHTMLDummyTemplateDoc();
- BOOL IsReadUTF8() const { return bReadUTF8; }
- void SetReadUTF8( BOOL bSet ) { bReadUTF8 = bSet; }
+ sal_Bool IsReadUTF8() const { return bReadUTF8; }
+ void SetReadUTF8( sal_Bool bSet ) { bReadUTF8 = bSet; }
- BOOL IsBlockMode() const { return bBlockMode; }
- void SetBlockMode( BOOL bSet ) { bBlockMode = bSet; }
+ sal_Bool IsBlockMode() const { return bBlockMode; }
+ void SetBlockMode( sal_Bool bSet ) { bBlockMode = bSet; }
- BOOL IsOrganizerMode() const { return bOrganizerMode; }
- void SetOrganizerMode( BOOL bSet ) { bOrganizerMode = bSet; }
+ sal_Bool IsOrganizerMode() const { return bOrganizerMode; }
+ void SetOrganizerMode( sal_Bool bSet ) { bOrganizerMode = bSet; }
- void SetIgnoreHTMLComments( BOOL bSet ) { bIgnoreHTMLComments = bSet; }
+ void SetIgnoreHTMLComments( sal_Bool bSet ) { bIgnoreHTMLComments = bSet; }
- virtual BOOL HasGlossaries() const;
- virtual BOOL ReadGlossaries( SwTextBlocks&, BOOL bSaveRelFiles ) const;
+ virtual sal_Bool HasGlossaries() const;
+ virtual sal_Bool ReadGlossaries( SwTextBlocks&, sal_Bool bSaveRelFiles ) const;
// read the sections of the document, which is equal to the medium.
// returns the count of it
- virtual USHORT GetSectionList( SfxMedium& rMedium,
+ virtual sal_uInt16 GetSectionList( SfxMedium& rMedium,
SvStrings& rStrings ) const;
SotStorageRef getSotStorageRef() { return pStg; };
void setSotStorageRef(SotStorageRef pStgRef) { pStg = pStgRef; };
private:
- virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &)=0;
+ virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &)=0;
// alle die die Streams / Storages nicht geoeffnet brauchen,
// muessen die Methode ueberladen (W4W!!)
@@ -300,14 +300,14 @@ private:
class AsciiReader: public Reader
{
friend class SwReader;
- virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
public:
AsciiReader(): Reader() {}
};
/*class SwgReader: public Reader
{
- virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
};
*/
class SW_DLLPUBLIC StgReader : public Reader
@@ -315,7 +315,7 @@ class SW_DLLPUBLIC StgReader : public Reader
String aFltName;
protected:
- ULONG OpenMainStream( SotStorageStreamRef& rRef, USHORT& rBuffSize );
+ sal_uLong OpenMainStream( SotStorageStreamRef& rRef, sal_uInt16& rBuffSize );
public:
virtual int GetReaderType();
@@ -327,7 +327,7 @@ public:
/*class Sw3Reader : public StgReader
{
Sw3Io* pIO;
- virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
public:
Sw3Reader() : pIO( 0 ) {}
@@ -335,7 +335,7 @@ public:
// read the sections of the document, which is equal to the medium.
// returns the count of it
- virtual USHORT GetSectionList( SfxMedium& rMedium,
+ virtual sal_uInt16 GetSectionList( SfxMedium& rMedium,
SvStrings& rStrings ) const;
};*/
@@ -353,7 +353,7 @@ class SW_DLLPUBLIC SwTextBlocks
// friend class Sw2TextBlocks;
// friend class Sw3IoImp;
SwImpBlocks* pImp;
- ULONG nErr;
+ sal_uLong nErr;
public:
SwTextBlocks( const String& );
@@ -365,43 +365,43 @@ public:
void ClearDoc(); // Doc-Inhalt loeschen
const String& GetName();
void SetName( const String& );
- ULONG GetError() const { return nErr; }
+ sal_uLong GetError() const { return nErr; }
String GetBaseURL() const;
void SetBaseURL( const String& rURL );
- BOOL IsOld() const;
- ULONG ConvertToNew(); // Textbausteine konvertieren
+ sal_Bool IsOld() const;
+ sal_uLong ConvertToNew(); // Textbausteine konvertieren
- USHORT GetCount() const; // Anzahl Textbausteine ermitteln
- USHORT GetIndex( const String& ) const; // Index fuer Kurznamen ermitteln
- USHORT GetLongIndex( const String& ) const; //Index fuer Langnamen ermitteln
- const String& GetShortName( USHORT ) const; // Kurzname fuer Index zurueck
- const String& GetLongName( USHORT ) const; // Langname fuer Index zurueck
+ sal_uInt16 GetCount() const; // Anzahl Textbausteine ermitteln
+ sal_uInt16 GetIndex( const String& ) const; // Index fuer Kurznamen ermitteln
+ sal_uInt16 GetLongIndex( const String& ) const; //Index fuer Langnamen ermitteln
+ const String& GetShortName( sal_uInt16 ) const; // Kurzname fuer Index zurueck
+ const String& GetLongName( sal_uInt16 ) const; // Langname fuer Index zurueck
- BOOL Delete( USHORT ); // Loeschen
- USHORT Rename( USHORT, const String*, const String* ); // Umbenennen
- ULONG CopyBlock( SwTextBlocks& rSource, String& rSrcShort,
+ sal_Bool Delete( sal_uInt16 ); // Loeschen
+ sal_uInt16 Rename( sal_uInt16, const String*, const String* ); // Umbenennen
+ sal_uLong CopyBlock( SwTextBlocks& rSource, String& rSrcShort,
const String& rLong ); // Block kopieren
- BOOL BeginGetDoc( USHORT ); // Textbaustein einlesen
+ sal_Bool BeginGetDoc( sal_uInt16 ); // Textbaustein einlesen
void EndGetDoc(); // Textbaustein wieder loslassen
- BOOL BeginPutDoc( const String&, const String& ); // Speichern Beginn
- USHORT PutDoc(); // Speichern Ende
+ sal_Bool BeginPutDoc( const String&, const String& ); // Speichern Beginn
+ sal_uInt16 PutDoc(); // Speichern Ende
- USHORT PutText( const String&, const String&, const String& ); // Speichern( Kurzn., Text)
+ sal_uInt16 PutText( const String&, const String&, const String& ); // Speichern( Kurzn., Text)
- BOOL IsOnlyTextBlock( USHORT ) const;
- BOOL IsOnlyTextBlock( const String& rShort ) const;
+ sal_Bool IsOnlyTextBlock( sal_uInt16 ) const;
+ sal_Bool IsOnlyTextBlock( const String& rShort ) const;
const String& GetFileName() const; // Dateiname von pImp
- BOOL IsReadOnly() const; // ReadOnly-Flag von pImp
+ sal_Bool IsReadOnly() const; // ReadOnly-Flag von pImp
- BOOL GetMacroTable( USHORT nIdx, SvxMacroTableDtor& rMacroTbl );
- BOOL SetMacroTable( USHORT nIdx, const SvxMacroTableDtor& rMacroTbl );
+ sal_Bool GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTbl );
+ sal_Bool SetMacroTable( sal_uInt16 nIdx, const SvxMacroTableDtor& rMacroTbl );
- BOOL StartPutMuchBlockEntries();
+ sal_Bool StartPutMuchBlockEntries();
void EndPutMuchBlockEntries();
};
@@ -418,7 +418,7 @@ SW_DLLPUBLIC SwRead SwGetReaderXML();
// END source/filter/basflt/fltini.cxx
-extern BOOL SetHTMLTemplate( SwDoc &rDoc ); //Fuer Vorlagen aus HTML.vor laden shellio.cxx
+extern sal_Bool SetHTMLTemplate( SwDoc &rDoc ); //Fuer Vorlagen aus HTML.vor laden shellio.cxx
/* */
@@ -442,7 +442,7 @@ class SW_DLLPUBLIC Writer
String sBaseURL;
void _AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont );
- void _AddFontItems( SfxItemPool& rPool, USHORT nWhichId );
+ void _AddFontItems( SfxItemPool& rPool, sal_uInt16 nWhichId );
::std::auto_ptr<Writer_Impl> m_pImpl;
@@ -452,13 +452,13 @@ protected:
const String* pOrigFileName;
void ResetWriter();
- BOOL CopyNextPam( SwPaM ** );
+ sal_Bool CopyNextPam( SwPaM ** );
void PutNumFmtFontsInAttrPool();
- void PutEditEngFontsInAttrPool( BOOL bIncl_CJK_CTL = TRUE );
+ void PutEditEngFontsInAttrPool( sal_Bool bIncl_CJK_CTL = sal_True );
void PutCJKandCTLFontsInAttrPool();
- virtual ULONG WriteStream() = 0;
+ virtual sal_uLong WriteStream() = 0;
void SetBaseURL( const String& rURL ) { sBaseURL = rURL; }
IDocumentSettingAccess* getIDocumentSettingAccess();
@@ -470,33 +470,33 @@ protected:
public:
SwDoc* pDoc;
SwPaM* pCurPam;
- BOOL bWriteAll : 1;
- BOOL bShowProgress : 1;
- BOOL bWriteClipboardDoc : 1;
- BOOL bWriteOnlyFirstTable : 1;
- BOOL bASCII_ParaAsCR : 1;
- BOOL bASCII_ParaAsBlanc : 1;
- BOOL bASCII_NoLastLineEnd : 1;
- BOOL bUCS2_WithStartChar : 1;
- BOOL bExportPargraphNumbering : 1;
-
- BOOL bBlock : 1;
- BOOL bOrganizerMode : 1;
+ sal_Bool bWriteAll : 1;
+ sal_Bool bShowProgress : 1;
+ sal_Bool bWriteClipboardDoc : 1;
+ sal_Bool bWriteOnlyFirstTable : 1;
+ sal_Bool bASCII_ParaAsCR : 1;
+ sal_Bool bASCII_ParaAsBlanc : 1;
+ sal_Bool bASCII_NoLastLineEnd : 1;
+ sal_Bool bUCS2_WithStartChar : 1;
+ sal_Bool bExportPargraphNumbering : 1;
+
+ sal_Bool bBlock : 1;
+ sal_Bool bOrganizerMode : 1;
Writer();
virtual ~Writer();
- virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 );
- ULONG Write( SwPaM&, SvStream&, const String* = 0 );
- virtual ULONG Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
- virtual ULONG Write( SwPaM&, SotStorage&, const String* = 0 );
+ virtual sal_uLong Write( SwPaM&, SfxMedium&, const String* = 0 );
+ sal_uLong Write( SwPaM&, SvStream&, const String* = 0 );
+ virtual sal_uLong Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
+ virtual sal_uLong Write( SwPaM&, SotStorage&, const String* = 0 );
virtual void SetPasswd( const String& );
virtual void SetVersion( const String&, long );
- virtual BOOL IsStgWriter() const;
-// virtual BOOL IsSw3Writer() const;
+ virtual sal_Bool IsStgWriter() const;
+// virtual sal_Bool IsSw3Writer() const;
- void SetShowProgress( BOOL bFlag = FALSE ) { bShowProgress = bFlag; }
+ void SetShowProgress( sal_Bool bFlag = sal_False ) { bShowProgress = bFlag; }
const String* GetOrigFileName() const { return pOrigFileName; }
@@ -511,38 +511,38 @@ public:
// OtherPos of the bookmarks also inserted.
void CreateBookmarkTbl();
// search alle Bookmarks in the range and return it in the Array
- USHORT GetBookmarks( const SwCntntNode& rNd,
+ sal_uInt16 GetBookmarks( const SwCntntNode& rNd,
xub_StrLen nStt, xub_StrLen nEnd,
SvPtrarr& rArr );
// lege einen neuen PaM an der Position an
- static SwPaM* NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx,
- BOOL bNodesArray = TRUE );
+ static SwPaM* NewSwPaM( SwDoc & rDoc, sal_uLong nStartIdx, sal_uLong nEndIdx,
+ sal_Bool bNodesArray = sal_True );
// kopiere ggfs. eine lokale Datei ins Internet
- BOOL CopyLocalFileToINet( String& rFileNm );
+ sal_Bool CopyLocalFileToINet( String& rFileNm );
// Stream-spezifische Routinen, im Storage-Writer NICHT VERWENDEN!
// Optimierung der Ausgabe auf den Stream.
SvStream& OutLong( SvStream& rStrm, long nVal );
- SvStream& OutULong( SvStream& rStrm, ULONG nVal );
+ SvStream& OutULong( SvStream& rStrm, sal_uLong nVal );
// Hex-Zahl ausgeben, default ist 2.stellige Zahl
- SvStream& OutHex( SvStream& rStrm, ULONG nHex, BYTE nLen = 2 );
+ SvStream& OutHex( SvStream& rStrm, sal_uLong nHex, sal_uInt8 nLen = 2 );
// 4-st. Hex-Zahl ausgeben
- inline SvStream& OutHex4( SvStream& rStrm, USHORT nHex )
+ inline SvStream& OutHex4( SvStream& rStrm, sal_uInt16 nHex )
{ return OutHex( rStrm, nHex, 4 ); }
- inline SvStream& OutHex( USHORT nHex, BYTE nLen = 2 ) { return OutHex( Strm(), nHex, nLen ); }
- inline SvStream& OutHex4( USHORT nHex ) { return OutHex( Strm(), nHex, 4 ); }
+ inline SvStream& OutHex( sal_uInt16 nHex, sal_uInt8 nLen = 2 ) { return OutHex( Strm(), nHex, nLen ); }
+ inline SvStream& OutHex4( sal_uInt16 nHex ) { return OutHex( Strm(), nHex, 4 ); }
inline SvStream& OutLong( long nVal ) { return OutLong( Strm(), nVal ); }
- inline SvStream& OutULong( ULONG nVal ) { return OutULong( Strm(), nVal ); }
+ inline SvStream& OutULong( sal_uLong nVal ) { return OutULong( Strm(), nVal ); }
void SetStream(SvStream *const pStream);
SvStream& Strm();
- void SetOrganizerMode( BOOL bSet ) { bOrganizerMode = bSet; }
+ void SetOrganizerMode( sal_Bool bSet ) { bOrganizerMode = bSet; }
};
#ifndef SW_DECL_WRITER_DEFINED
@@ -560,19 +560,19 @@ protected:
com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
// Fehler beim Aufruf erzeugen
- virtual ULONG WriteStream();
- virtual ULONG WriteStorage() = 0;
- virtual ULONG WriteMedium( SfxMedium& ) = 0;
+ virtual sal_uLong WriteStream();
+ virtual sal_uLong WriteStorage() = 0;
+ virtual sal_uLong WriteMedium( SfxMedium& ) = 0;
using Writer::Write;
public:
StgWriter() : Writer() {}
- virtual BOOL IsStgWriter() const;
+ virtual sal_Bool IsStgWriter() const;
- virtual ULONG Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
- virtual ULONG Write( SwPaM&, SotStorage&, const String* = 0 );
+ virtual sal_uLong Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
+ virtual sal_uLong Write( SwPaM&, SotStorage&, const String* = 0 );
SotStorage& GetStorage() const { return *pStg; }
};
@@ -580,15 +580,15 @@ public:
/*class Sw3Writer : public StgWriter
{
Sw3Io* pIO;
- BOOL bSaveAs : 1;
+ sal_Bool bSaveAs : 1;
- virtual ULONG WriteStorage();
- virtual ULONG WriteMedium( SfxMedium& );
+ virtual sal_uLong WriteStorage();
+ virtual sal_uLong WriteMedium( SfxMedium& );
public:
- Sw3Writer() : pIO( 0 ), bSaveAs( FALSE ) {}
+ Sw3Writer() : pIO( 0 ), bSaveAs( sal_False ) {}
- virtual BOOL IsSw3Writer() const;
+ virtual sal_Bool IsSw3Writer() const;
};
*/
@@ -609,22 +609,22 @@ class SwWriter
//String sBaseURL;
- BOOL bWriteAll;
+ sal_Bool bWriteAll;
public:
- ULONG Write( WriterRef& rxWriter, const String* = 0);
+ sal_uLong Write( WriterRef& rxWriter, const String* = 0);
- SwWriter( SvStream&, SwCrsrShell &,BOOL bWriteAll = FALSE );
+ SwWriter( SvStream&, SwCrsrShell &,sal_Bool bWriteAll = sal_False );
SwWriter( SvStream&, SwDoc & );
- SwWriter( SvStream&, SwPaM &, BOOL bWriteAll = FALSE );
+ SwWriter( SvStream&, SwPaM &, sal_Bool bWriteAll = sal_False );
-// SwWriter( SotStorage&, SwCrsrShell &,BOOL bWriteAll = FALSE );
+// SwWriter( SotStorage&, SwCrsrShell &,sal_Bool bWriteAll = sal_False );
SwWriter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, SwDoc& );
-// SwWriter( SotStorage&, SwPaM&, BOOL bWriteAll = FALSE );
+// SwWriter( SotStorage&, SwPaM&, sal_Bool bWriteAll = sal_False );
- SwWriter( SfxMedium&, SwCrsrShell &,BOOL bWriteAll = FALSE );
+ SwWriter( SfxMedium&, SwCrsrShell &,sal_Bool bWriteAll = sal_False );
SwWriter( SfxMedium&, SwDoc & );
-// SwWriter( SfxMedium&, SwPaM&, BOOL bWriteAll = FALSE );
+// SwWriter( SfxMedium&, SwPaM&, sal_Bool bWriteAll = sal_False );
//const String& GetBaseURL() const { return sBaseURL;}
};
@@ -635,17 +635,17 @@ public:
typedef Reader* (*FnGetReader)();
typedef void (*FnGetWriter)(const String&, const String& rBaseURL, WriterRef&);
-ULONG SaveOrDelMSVBAStorage( SfxObjectShell&, SotStorage&, BOOL, const String& );
-ULONG GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS );
+sal_uLong SaveOrDelMSVBAStorage( SfxObjectShell&, SotStorage&, sal_Bool, const String& );
+sal_uLong GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS );
struct SwReaderWriterEntry
{
Reader* pReader;
FnGetReader fnGetReader;
FnGetWriter fnGetWriter;
- BOOL bDelReader;
+ sal_Bool bDelReader;
- SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, BOOL bDel )
+ SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, sal_Bool bDel )
: pReader( NULL ), fnGetReader( fnReader ), fnGetWriter( fnWriter ), bDelReader( bDel )
{}
diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx
index 3875c5b1c15e..02f9742016ad 100644
--- a/sw/inc/shellres.hxx
+++ b/sw/inc/shellres.hxx
@@ -95,8 +95,8 @@ struct SW_DLLPUBLIC ShellResource : public Resource
// returns for the specific filter the new names of pagedescs
// This method is for the old code of the specific filters with
// now localized names
- String GetPageDescName( USHORT nNo, BOOL bFirst = FALSE,
- BOOL bFollow = FALSE );
+ String GetPageDescName( sal_uInt16 nNo, sal_Bool bFirst = sal_False,
+ sal_Bool bFollow = sal_False );
ShellResource();
~ShellResource();
diff --git a/sw/inc/sortopt.hxx b/sw/inc/sortopt.hxx
index 0e15f3758dd6..dbb58486f879 100644
--- a/sw/inc/sortopt.hxx
+++ b/sw/inc/sortopt.hxx
@@ -41,13 +41,13 @@ enum SwSortDirection { SRT_COLUMNS, SRT_ROWS };
struct SW_DLLPUBLIC SwSortKey
{
SwSortKey();
- SwSortKey( USHORT nId, const String& rSrtType, SwSortOrder eOrder );
+ SwSortKey( sal_uInt16 nId, const String& rSrtType, SwSortOrder eOrder );
SwSortKey( const SwSortKey& rOld );
String sSortType;
SwSortOrder eSortOrder;
- USHORT nColumnId;
- BOOL bIsNumeric;
+ sal_uInt16 nColumnId;
+ sal_Bool bIsNumeric;
};
SV_DECL_PTRARR(SwSortKeys, SwSortKey*, 3, 1)
@@ -61,9 +61,9 @@ struct SW_DLLPUBLIC SwSortOptions
SwSortKeys aKeys;
SwSortDirection eDirection;
sal_Unicode cDeli;
- USHORT nLanguage;
- BOOL bTable;
- BOOL bIgnoreCase;
+ sal_uInt16 nLanguage;
+ sal_Bool bTable;
+ sal_Bool bIgnoreCase;
};
#endif // _SORTOPT_HXX
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 351d3bdf76f4..2768cc50bc82 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -117,14 +117,14 @@ class AbstractFldInputDlg : public VclAbstractDialog //add for SwFldInputDlg
public:
//from class SalFrame
virtual void SetWindowState( const ByteString& rStr ) = 0;
- virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const = 0;
+ virtual ByteString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const = 0;
};
class AbstractInsFootNoteDlg : public VclAbstractDialog //add for SwInsFootNoteDlg
{
public:
virtual String GetFontName() = 0;
- virtual BOOL IsEndNote() = 0;
+ virtual sal_Bool IsEndNote() = 0;
virtual String GetStr() = 0;
//from class Window
virtual void SetHelpId( const rtl::OString& sHelpId ) = 0;
@@ -135,14 +135,14 @@ class AbstractInsertGrfRulerDlg : public VclAbstractDialog //add for SwInsertGr
{
public:
virtual String GetGraphicName() = 0;
- virtual BOOL IsSimpleLine() = 0;
- virtual BOOL HasImages() const = 0;
+ virtual sal_Bool IsSimpleLine() = 0;
+ virtual sal_Bool HasImages() const = 0;
};
class AbstractInsTableDlg : public VclAbstractDialog //add for SwInsTableDlg
{
public:
- virtual void GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+ virtual void GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName,
SwTableAutoFmt *& prTAFmt ) = 0;
};
@@ -152,15 +152,15 @@ class AbstractJavaEditDialog : public VclAbstractDialog //add for SwJavaEditDia
public:
virtual String GetText() = 0;
virtual String GetType() = 0;
- virtual BOOL IsUrl() = 0;
- virtual BOOL IsNew() = 0;
- virtual BOOL IsUpdate() = 0;
+ virtual sal_Bool IsUrl() = 0;
+ virtual sal_Bool IsNew() = 0;
+ virtual sal_Bool IsUpdate() = 0;
};
class AbstractMailMergeDlg : public VclAbstractDialog //add for SwMailMergeDlg
{
public:
- virtual USHORT GetMergeType() = 0;
+ virtual sal_uInt16 GetMergeType() = 0;
virtual const ::rtl::OUString& GetSaveFilter() const = 0;
virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const = 0;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const = 0;
@@ -168,12 +168,12 @@ public:
class AbstractMailMergeCreateFromDlg : public VclAbstractDialog //add for SwMailMergeCreateFromDlg
{
public:
- virtual BOOL IsThisDocument() const = 0;
+ virtual sal_Bool IsThisDocument() const = 0;
};
class AbstractMailMergeFieldConnectionsDlg : public VclAbstractDialog //add for SwMailMergeFieldConnectionsDlg
{
public:
- virtual BOOL IsUseExistingConnections() const = 0;
+ virtual sal_Bool IsUseExistingConnections() const = 0;
};
class AbstractMultiTOXTabDialog : public VclAbstractDialog //add for SwMultiTOXTabDialog
@@ -206,8 +206,8 @@ public:
class AbstractSwInsertAbstractDlg : public VclAbstractDialog // add for SwInsertAbstractDlg
{
public:
- virtual BYTE GetLevel() const = 0;
- virtual BYTE GetPara() const = 0;
+ virtual sal_uInt8 GetLevel() const = 0;
+ virtual sal_uInt8 GetPara() const = 0;
};
class AbstractSwAsciiFilterDlg : public VclAbstractDialog // add for SwAsciiFilterDlg
@@ -221,8 +221,8 @@ class AbstractSwBreakDlg : public VclAbstractDialog // add for SwBreakDlg
{
public:
virtual String GetTemplateName() = 0;
- virtual USHORT GetKind() = 0;
- virtual USHORT GetPageNumber() = 0;
+ virtual sal_uInt16 GetKind() = 0;
+ virtual sal_uInt16 GetPageNumber() = 0;
};
@@ -253,7 +253,7 @@ public:
class AbstractDropDownFieldDialog : public VclAbstractDialog //add for DropDownFieldDialog
{
public:
- virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const = 0; //this method inherit from SystemWindow
+ virtual ByteString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const = 0; //this method inherit from SystemWindow
virtual void SetWindowState( const ByteString& rStr ) =0;//this method inherit from SystemWindow
};
@@ -268,15 +268,15 @@ class AbstarctSwSelGlossaryDlg : public VclAbstractDialog //add for SwSelGlossar
{
public:
virtual void InsertGlos(const String &rRegion, const String &rGlosName) = 0; // inline
- virtual USHORT GetSelectedIdx() const = 0; // inline
- virtual void SelectEntryPos(USHORT nIdx) = 0; // inline
+ virtual sal_uInt16 GetSelectedIdx() const = 0; // inline
+ virtual void SelectEntryPos(sal_uInt16 nIdx) = 0; // inline
};
class AbstractSwSplitTableDlg :public VclAbstractDialog //add for SwSplitTableDlg
{
public:
- virtual BOOL IsHorizontal() const = 0;
- virtual BOOL IsProportional() const = 0;
+ virtual sal_Bool IsHorizontal() const = 0;
+ virtual sal_Bool IsProportional() const = 0;
virtual long GetCount() const = 0;
};
@@ -289,11 +289,11 @@ public:
class AbstractSwFldDlg : public SfxAbstractTabDialog //add for SwFldDlg
{
public:
- virtual void Start( BOOL bShow = TRUE ) = 0; //this method from sfxtabdialog
+ virtual void Start( sal_Bool bShow = sal_True ) = 0; //this method from sfxtabdialog
virtual void Initialize(SfxChildWinInfo *pInfo) = 0;
virtual void ReInitDlg() = 0;
virtual void ActivateDatabasePage() = 0;
- virtual void ShowPage( USHORT nId ) = 0;// this method from SfxTabDialog
+ virtual void ShowPage( sal_uInt16 nId ) = 0;// this method from SfxTabDialog
virtual Window * GetWindow() = 0; //this method is added for return a Window type pointer
};
@@ -309,7 +309,7 @@ public:
class AbstractSwModalRedlineAcceptDlg : public VclAbstractDialog //add for SwModalRedlineAcceptDlg
{
public:
- virtual void AcceptAll( BOOL bAccept ) = 0;
+ virtual void AcceptAll( sal_Bool bAccept ) = 0;
};
class AbstractMarkFloatDlg : public VclAbstractDialog //add for SwIndexMarkFloatDlg & SwAuthMarkFloatDlg
@@ -333,7 +333,7 @@ class AbstractMailMergeWizard : public VclAbstractDialog2
public:
virtual void SetReloadDocument(const String& rURL) = 0;
virtual const String& GetReloadDocument() const = 0;
- virtual BOOL ShowPage( USHORT nLevel ) = 0;
+ virtual sal_Bool ShowPage( sal_uInt16 nLevel ) = 0;
virtual sal_uInt16 GetRestartPage() const = 0;
};
@@ -358,7 +358,7 @@ public:
virtual AbstractSwBreakDlg * CreateSwBreakDlg( Window *pParent, SwWrtShell &rSh,int nResId ) = 0; // add for SwBreakDlg
virtual VclAbstractDialog * CreateSwChangeDBDlg( SwView& rVw, int nResId ) = 0; //add for SwChangeDBDlg
virtual SfxAbstractTabDialog * CreateSwCharDlg( Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
- const String* pFmtStr = 0, BOOL bIsDrwTxtDlg = FALSE) = 0;
+ const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False) = 0;
virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg ( SwView& rView , int nResId, bool bToTable) = 0; //add for SwConvertTableDlg
virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId) = 0; //add for SwCaptionDialog
@@ -369,23 +369,23 @@ public:
virtual SfxAbstractTabDialog * CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId) = 0;//add for SwFootNoteOptionDlg
virtual AbstractDropDownFieldDialog * CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog
- SwField* pField,int nResId, BOOL bNextButton = FALSE ) = 0;
- virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert,int nResId ) = 0; //add for SwEnvDlg
+ SwField* pField,int nResId, sal_Bool bNextButton = sal_False ) = 0;
+ virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert,int nResId ) = 0; //add for SwEnvDlg
virtual AbstarctSwLabDlg* CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
- SwNewDBMgr* pNewDBMgr, BOOL bLabel,int nResId ) = 0;
+ SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId ) = 0;
virtual SwLabDlgMethod GetSwLabDlgStaticMethod () =0;//add for SwLabDlg
virtual SfxAbstractTabDialog* CreateSwParaDlg ( Window *pParent, //add for SwParaDlg
SwView& rVw,
const SfxItemSet& rCoreSet,
- BYTE nDialogMode,
+ sal_uInt8 nDialogMode,
int nResId,
const String *pCollName = 0,
- BOOL bDraw = FALSE,
- UINT16 nDefPage = 0) = 0;
+ sal_Bool bDraw = sal_False,
+ sal_uInt16 nDefPage = 0) = 0;
virtual AbstarctSwSelGlossaryDlg * CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId ) = 0; //add for SwSelGlossaryDlg
@@ -394,10 +394,10 @@ public:
virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell, //add for SwAutoFormatDlg
int nResId,
- BOOL bSetAutoFmt = TRUE,
+ sal_Bool bSetAutoFmt = sal_True,
const SwTableAutoFmt* pSelFmt = 0 ) = 0;
- virtual SfxAbstractDialog * CreateSwBorderDlg ( Window* pParent, SfxItemSet& rSet, USHORT nType, int nResId ) = 0;//add for SwBorderDlg
- virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId ) = 0; //add for SwWrapDlg
+ virtual SfxAbstractDialog * CreateSwBorderDlg ( Window* pParent, SfxItemSet& rSet, sal_uInt16 nType, int nResId ) = 0;//add for SwBorderDlg
+ virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId ) = 0; //add for SwWrapDlg
virtual VclAbstractDialog * CreateSwTableWidthDlg ( Window *pParent, SwTableFUNC &rFnc , int nResId ) = 0; //add for SwTableWidthDlg
virtual SfxAbstractTabDialog* CreateSwTableTabDlg( Window* pParent, SfxItemPool& Pool,
@@ -410,33 +410,33 @@ public:
STAR_REFERENCE( container::XNameAccess ) & xNameAccess, int nResId ) = 0;
virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId ) = 0; //add for SwModalRedlineAcceptDlg
- virtual VclAbstractDialog* CreateSwVclDialog( int nResId, Window* pParent, BOOL& rWithPrev ) = 0; //add for SwMergeTblDlg
+ virtual VclAbstractDialog* CreateSwVclDialog( int nResId, Window* pParent, sal_Bool& rWithPrev ) = 0; //add for SwMergeTblDlg
virtual SfxAbstractTabDialog* CreateFrmTabDialog( int nResId,
SfxViewFrame *pFrame, Window *pParent,
const SfxItemSet& rCoreSet,
- BOOL bNewFrm = TRUE,
- USHORT nResType = DLG_FRM_STD,
- BOOL bFmt = FALSE,
- UINT16 nDefPage = 0,
+ sal_Bool bNewFrm = sal_True,
+ sal_uInt16 nResType = DLG_FRM_STD,
+ sal_Bool bFmt = sal_False,
+ sal_uInt16 nDefPage = 0,
const String* pFmtStr = 0) = 0; //add for SwFrmDlg
virtual SfxAbstractTabDialog* CreateTemplateDialog( int nResId,
Window* pParent,
SfxStyleSheetBase& rBase,
- USHORT nRegion,
- BOOL bColumn = FALSE,
+ sal_uInt16 nRegion,
+ sal_Bool bColumn = sal_False,
SwWrtShell* pActShell = 0,
- BOOL bNew = FALSE ) = 0; //add for SwTemplateDlg
+ sal_Bool bNew = sal_False ) = 0; //add for SwTemplateDlg
virtual AbstractGlossaryDlg* CreateGlossaryDlg( int nResId,
SfxViewFrame* pViewFrame,
SwGlossaryHdl* pGlosHdl,
SwWrtShell *pWrtShell) = 0; //add for SwGlossaryDlg
virtual AbstractFldInputDlg* CreateFldInputDlg( int nResId,
Window *pParent, SwWrtShell &rSh,
- SwField* pField, BOOL bNextButton = FALSE ) = 0; //add for SwFldInputDlg
+ SwField* pField, sal_Bool bNextButton = sal_False ) = 0; //add for SwFldInputDlg
virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId,
- Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE) = 0; //add for SwInsFootNoteDlg
+ Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False) = 0; //add for SwInsFootNoteDlg
virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
- SwView& rView, BOOL bCol = FALSE ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
+ SwView& rView, sal_Bool bCol = sal_False ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
Window * pParent ) = 0; //add for SwInsertGrfRulerDlg
virtual AbstractInsTableDlg* CreateInsTableDlg( int nResId,
@@ -463,8 +463,8 @@ public:
virtual AbstractMultiTOXTabDialog* CreateMultiTOXTabDialog( int nResId,
Window* pParent, const SfxItemSet& rSet,
SwWrtShell &rShell,
- SwTOXBase* pCurTOX, USHORT nToxType = USHRT_MAX,
- BOOL bGlobal = FALSE) = 0; //add for SwMultiTOXTabDialog
+ SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX,
+ sal_Bool bGlobal = sal_False) = 0; //add for SwMultiTOXTabDialog
virtual AbstractEditRegionDlg* CreateEditRegionDlg( int nResId,
Window* pParent, SwWrtShell& rWrtSh ) = 0; //add for SwEditRegionDlg
virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( int nResId,
@@ -487,12 +487,12 @@ public:
virtual AbstractMailMergeWizard* CreateMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem) = 0;
//add for static func in SwGlossaryDlg
- virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( USHORT nId ) = 0;
- virtual GlossarySetActGroup SetGlossaryActGroupFunc( USHORT nId ) = 0;
+ virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( sal_uInt16 nId ) = 0;
+ virtual GlossarySetActGroup SetGlossaryActGroupFunc( sal_uInt16 nId ) = 0;
// for tabpage
- virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId ) = 0;
- virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId ) = 0;
+ virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
+ virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) = 0;
};
#endif
diff --git a/sw/inc/swacorr.hxx b/sw/inc/swacorr.hxx
index aed3597b2478..c83bc740ea0a 100644
--- a/sw/inc/swacorr.hxx
+++ b/sw/inc/swacorr.hxx
@@ -40,11 +40,11 @@ protected:
// - return den Ersetzungstext (nur fuer SWG-Format, alle anderen
// koennen aus der Wortliste herausgeholt werden!)
// rShort ist der Stream-Name - gecryptet!
- virtual BOOL GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& , const String& rFileName, const String& rShort, String& rLong );
+ virtual sal_Bool GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& , const String& rFileName, const String& rShort, String& rLong );
// - Text mit Attributierung (kann nur der SWG - SWG-Format!)
// rShort ist der Stream-Name - gecryptet!
- virtual BOOL PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFileName, const String& rShort, SfxObjectShell& ,
+ virtual sal_Bool PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFileName, const String& rShort, SfxObjectShell& ,
String& );
public:
diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx
index c64307845d6f..cc2f1532a6fc 100644
--- a/sw/inc/swatrset.hxx
+++ b/sw/inc/swatrset.hxx
@@ -146,14 +146,14 @@ class SwAttrPool : public SfxItemPool
{
friend void _InitCore(); // fuers anlegen/zerstoeren der
friend void _FinitCore(); // Versionsmaps
- static USHORT* pVersionMap1;
- static USHORT* pVersionMap2;
- static USHORT* pVersionMap3;
- static USHORT* pVersionMap4;
+ static sal_uInt16* pVersionMap1;
+ static sal_uInt16* pVersionMap2;
+ static sal_uInt16* pVersionMap3;
+ static sal_uInt16* pVersionMap4;
// OD 2004-01-21 #i18732# - due to extension of attribute set a new version
// map for binary filter is necessary (version map 5).
- static USHORT* pVersionMap5;
- static USHORT* pVersionMap6;
+ static sal_uInt16* pVersionMap5;
+ static sal_uInt16* pVersionMap6;
SwDoc* pDoc;
@@ -166,10 +166,10 @@ public:
SwDoc* GetDoc() { return pDoc; }
const SwDoc* GetDoc() const { return pDoc; }
- static USHORT* GetVersionMap1() { return pVersionMap1; }
- static USHORT* GetVersionMap2() { return pVersionMap2; }
- static USHORT* GetVersionMap3() { return pVersionMap3; }
- static USHORT* GetVersionMap6() { return pVersionMap4; }
+ static sal_uInt16* GetVersionMap1() { return pVersionMap1; }
+ static sal_uInt16* GetVersionMap2() { return pVersionMap2; }
+ static sal_uInt16* GetVersionMap3() { return pVersionMap3; }
+ static sal_uInt16* GetVersionMap6() { return pVersionMap4; }
};
@@ -183,18 +183,18 @@ class SW_DLLPUBLIC SwAttrSet : public SfxItemSet
void PutChgd( const SfxPoolItem& rI ) { SfxItemSet::PutDirect( rI ); }
public:
- SwAttrSet( SwAttrPool&, USHORT nWhich1, USHORT nWhich2 );
- SwAttrSet( SwAttrPool&, const USHORT* nWhichPairTable );
+ SwAttrSet( SwAttrPool&, sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
+ SwAttrSet( SwAttrPool&, const sal_uInt16* nWhichPairTable );
SwAttrSet( const SwAttrSet& );
- virtual SfxItemSet* Clone(BOOL bItems = TRUE, SfxItemPool *pToPool = 0) const;
+ virtual SfxItemSet* Clone(sal_Bool bItems = sal_True, SfxItemPool *pToPool = 0) const;
int Put_BC( const SfxPoolItem& rAttr, SwAttrSet* pOld, SwAttrSet* pNew );
int Put_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew );
// ein Item oder einen Bereich loeschen
- USHORT ClearItem_BC( USHORT nWhich, SwAttrSet* pOld, SwAttrSet* pNew );
- USHORT ClearItem_BC( USHORT nWhich1, USHORT nWhich2,
+ sal_uInt16 ClearItem_BC( sal_uInt16 nWhich, SwAttrSet* pOld, SwAttrSet* pNew );
+ sal_uInt16 ClearItem_BC( sal_uInt16 nWhich1, sal_uInt16 nWhich2,
SwAttrSet* pOld = 0, SwAttrSet* pNew = 0 );
int Intersect_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew );
@@ -221,127 +221,127 @@ public:
const SwDoc *GetDoc() const { return GetPool()->GetDoc(); }
SwDoc *GetDoc() { return GetPool()->GetDoc(); }
- // GetMethoden: das Bool gibt an, ob nur im Set (FALSE) oder auch in
+ // GetMethoden: das Bool gibt an, ob nur im Set (sal_False) oder auch in
// den Parents gesucht werden soll. Wird nichts gefunden,
// wird das deflt. Attribut returnt.
// Charakter-Attribute - impl. steht im charatr.hxx
// AMA 12.10.94: Umstellung von SwFmt... auf Svx...
- inline const SvxPostureItem &GetPosture( BOOL = TRUE ) const;
- inline const SvxWeightItem &GetWeight( BOOL = TRUE ) const;
- inline const SvxShadowedItem &GetShadowed( BOOL = TRUE ) const;
- inline const SvxAutoKernItem &GetAutoKern( BOOL = TRUE ) const;
- inline const SvxWordLineModeItem &GetWordLineMode( BOOL = TRUE ) const;
- inline const SvxContourItem &GetContour( BOOL = TRUE ) const;
- inline const SvxKerningItem &GetKerning( BOOL = TRUE ) const;
- inline const SvxUnderlineItem &GetUnderline( BOOL = TRUE ) const;
- inline const SvxOverlineItem &GetOverline( BOOL = TRUE ) const;
- inline const SvxCrossedOutItem &GetCrossedOut( BOOL = TRUE ) const;
- inline const SvxFontHeightItem &GetSize( BOOL = TRUE ) const;
- inline const SvxPropSizeItem &GetPropSize( BOOL = TRUE ) const;
- inline const SvxFontItem &GetFont( BOOL = TRUE ) const;
- inline const SvxColorItem &GetColor( BOOL = TRUE ) const;
- inline const SvxCharSetColorItem &GetCharSetColor( BOOL = TRUE ) const;
- inline const SvxLanguageItem &GetLanguage( BOOL = TRUE ) const;
- inline const SvxEscapementItem &GetEscapement( BOOL = TRUE ) const;
- inline const SvxCaseMapItem &GetCaseMap( BOOL = TRUE ) const;
- inline const SvxNoHyphenItem &GetNoHyphenHere( BOOL = TRUE ) const;
- inline const SvxBlinkItem &GetBlink( BOOL = TRUE ) const;
- inline const SvxBrushItem &GetChrBackground( BOOL = TRUE ) const;
- inline const SvxFontItem &GetCJKFont( BOOL = TRUE ) const;
- inline const SvxFontHeightItem &GetCJKSize( BOOL = TRUE ) const;
- inline const SvxLanguageItem &GetCJKLanguage( BOOL = TRUE ) const;
- inline const SvxPostureItem &GetCJKPosture( BOOL = TRUE ) const;
- inline const SvxWeightItem &GetCJKWeight( BOOL = TRUE ) const;
- inline const SvxFontItem &GetCTLFont( BOOL = TRUE ) const;
- inline const SvxFontHeightItem &GetCTLSize( BOOL = TRUE ) const;
- inline const SvxLanguageItem &GetCTLLanguage( BOOL = TRUE ) const;
- inline const SvxPostureItem &GetCTLPosture( BOOL = TRUE ) const;
- inline const SvxWeightItem &GetCTLWeight( BOOL = TRUE ) const;
- inline const SfxBoolItem &GetWritingDirection( BOOL = TRUE ) const;
- inline const SvxEmphasisMarkItem &GetEmphasisMark( BOOL = TRUE ) const;
- inline const SvxTwoLinesItem &Get2Lines( BOOL = TRUE ) const;
- inline const SvxCharScaleWidthItem &GetCharScaleW( BOOL = TRUE ) const;
- inline const SvxCharRotateItem &GetCharRotate( BOOL = TRUE ) const;
- inline const SvxCharReliefItem &GetCharRelief( BOOL = TRUE ) const;
- inline const SvxCharHiddenItem &GetCharHidden( BOOL = TRUE ) const;
+ inline const SvxPostureItem &GetPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetWeight( sal_Bool = sal_True ) const;
+ inline const SvxShadowedItem &GetShadowed( sal_Bool = sal_True ) const;
+ inline const SvxAutoKernItem &GetAutoKern( sal_Bool = sal_True ) const;
+ inline const SvxWordLineModeItem &GetWordLineMode( sal_Bool = sal_True ) const;
+ inline const SvxContourItem &GetContour( sal_Bool = sal_True ) const;
+ inline const SvxKerningItem &GetKerning( sal_Bool = sal_True ) const;
+ inline const SvxUnderlineItem &GetUnderline( sal_Bool = sal_True ) const;
+ inline const SvxOverlineItem &GetOverline( sal_Bool = sal_True ) const;
+ inline const SvxCrossedOutItem &GetCrossedOut( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetSize( sal_Bool = sal_True ) const;
+ inline const SvxPropSizeItem &GetPropSize( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetFont( sal_Bool = sal_True ) const;
+ inline const SvxColorItem &GetColor( sal_Bool = sal_True ) const;
+ inline const SvxCharSetColorItem &GetCharSetColor( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetLanguage( sal_Bool = sal_True ) const;
+ inline const SvxEscapementItem &GetEscapement( sal_Bool = sal_True ) const;
+ inline const SvxCaseMapItem &GetCaseMap( sal_Bool = sal_True ) const;
+ inline const SvxNoHyphenItem &GetNoHyphenHere( sal_Bool = sal_True ) const;
+ inline const SvxBlinkItem &GetBlink( sal_Bool = sal_True ) const;
+ inline const SvxBrushItem &GetChrBackground( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetCJKFont( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetCJKSize( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetCJKLanguage( sal_Bool = sal_True ) const;
+ inline const SvxPostureItem &GetCJKPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetCJKWeight( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetCTLFont( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetCTLSize( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetCTLLanguage( sal_Bool = sal_True ) const;
+ inline const SvxPostureItem &GetCTLPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetCTLWeight( sal_Bool = sal_True ) const;
+ inline const SfxBoolItem &GetWritingDirection( sal_Bool = sal_True ) const;
+ inline const SvxEmphasisMarkItem &GetEmphasisMark( sal_Bool = sal_True ) const;
+ inline const SvxTwoLinesItem &Get2Lines( sal_Bool = sal_True ) const;
+ inline const SvxCharScaleWidthItem &GetCharScaleW( sal_Bool = sal_True ) const;
+ inline const SvxCharRotateItem &GetCharRotate( sal_Bool = sal_True ) const;
+ inline const SvxCharReliefItem &GetCharRelief( sal_Bool = sal_True ) const;
+ inline const SvxCharHiddenItem &GetCharHidden( sal_Bool = sal_True ) const;
// Frame-Attribute - impl. steht im frmatr.hxx
- inline const SwFmtFillOrder &GetFillOrder( BOOL = TRUE ) const;
- inline const SwFmtFrmSize &GetFrmSize( BOOL = TRUE ) const;
- inline const SvxPaperBinItem &GetPaperBin( BOOL = TRUE ) const;
- inline const SvxLRSpaceItem &GetLRSpace( BOOL = TRUE ) const;
- inline const SvxULSpaceItem &GetULSpace( BOOL = TRUE ) const;
- inline const SwFmtCntnt &GetCntnt( BOOL = TRUE ) const;
- inline const SwFmtHeader &GetHeader( BOOL = TRUE ) const;
- inline const SwFmtFooter &GetFooter( BOOL = TRUE ) const;
- inline const SvxPrintItem &GetPrint( BOOL = TRUE ) const;
- inline const SvxOpaqueItem &GetOpaque( BOOL = TRUE ) const;
- inline const SvxProtectItem &GetProtect( BOOL = TRUE ) const;
- inline const SwFmtSurround &GetSurround( BOOL = TRUE ) const;
- inline const SwFmtVertOrient &GetVertOrient( BOOL = TRUE ) const;
- inline const SwFmtHoriOrient &GetHoriOrient( BOOL = TRUE ) const;
- inline const SwFmtAnchor &GetAnchor( BOOL = TRUE ) const;
- inline const SvxBoxItem &GetBox( BOOL = TRUE ) const;
- inline const SvxFmtKeepItem &GetKeep( BOOL = TRUE ) const;
- inline const SvxBrushItem &GetBackground( BOOL = TRUE ) const;
- inline const SvxShadowItem &GetShadow( BOOL = TRUE ) const;
- inline const SwFmtPageDesc &GetPageDesc( BOOL = TRUE ) const;
- inline const SvxFmtBreakItem &GetBreak( BOOL = TRUE ) const;
- inline const SwFmtCol &GetCol( BOOL = TRUE ) const;
- inline const SvxMacroItem &GetMacro( BOOL = TRUE ) const;
- inline const SwFmtURL &GetURL( BOOL = TRUE ) const;
- inline const SwFmtEditInReadonly &GetEditInReadonly( BOOL = TRUE ) const;
- inline const SwFmtLayoutSplit &GetLayoutSplit( BOOL = TRUE ) const;
- inline const SwFmtRowSplit &GetRowSplit( BOOL = TRUE ) const;
- inline const SwFmtChain &GetChain( BOOL = TRUE ) const;
- inline const SwFmtLineNumber &GetLineNumber( BOOL = TRUE ) const;
- inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( BOOL = TRUE ) const;
- inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( BOOL = TRUE ) const;
- inline const SwFmtNoBalancedColumns &GetBalancedColumns( BOOL = TRUE ) const;
- inline const SvxFrameDirectionItem &GetFrmDir( BOOL = TRUE ) const;
- inline const SwTextGridItem &GetTextGrid( BOOL = TRUE ) const;
- inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( BOOL = TRUE ) const;
+ inline const SwFmtFillOrder &GetFillOrder( sal_Bool = sal_True ) const;
+ inline const SwFmtFrmSize &GetFrmSize( sal_Bool = sal_True ) const;
+ inline const SvxPaperBinItem &GetPaperBin( sal_Bool = sal_True ) const;
+ inline const SvxLRSpaceItem &GetLRSpace( sal_Bool = sal_True ) const;
+ inline const SvxULSpaceItem &GetULSpace( sal_Bool = sal_True ) const;
+ inline const SwFmtCntnt &GetCntnt( sal_Bool = sal_True ) const;
+ inline const SwFmtHeader &GetHeader( sal_Bool = sal_True ) const;
+ inline const SwFmtFooter &GetFooter( sal_Bool = sal_True ) const;
+ inline const SvxPrintItem &GetPrint( sal_Bool = sal_True ) const;
+ inline const SvxOpaqueItem &GetOpaque( sal_Bool = sal_True ) const;
+ inline const SvxProtectItem &GetProtect( sal_Bool = sal_True ) const;
+ inline const SwFmtSurround &GetSurround( sal_Bool = sal_True ) const;
+ inline const SwFmtVertOrient &GetVertOrient( sal_Bool = sal_True ) const;
+ inline const SwFmtHoriOrient &GetHoriOrient( sal_Bool = sal_True ) const;
+ inline const SwFmtAnchor &GetAnchor( sal_Bool = sal_True ) const;
+ inline const SvxBoxItem &GetBox( sal_Bool = sal_True ) const;
+ inline const SvxFmtKeepItem &GetKeep( sal_Bool = sal_True ) const;
+ inline const SvxBrushItem &GetBackground( sal_Bool = sal_True ) const;
+ inline const SvxShadowItem &GetShadow( sal_Bool = sal_True ) const;
+ inline const SwFmtPageDesc &GetPageDesc( sal_Bool = sal_True ) const;
+ inline const SvxFmtBreakItem &GetBreak( sal_Bool = sal_True ) const;
+ inline const SwFmtCol &GetCol( sal_Bool = sal_True ) const;
+ inline const SvxMacroItem &GetMacro( sal_Bool = sal_True ) const;
+ inline const SwFmtURL &GetURL( sal_Bool = sal_True ) const;
+ inline const SwFmtEditInReadonly &GetEditInReadonly( sal_Bool = sal_True ) const;
+ inline const SwFmtLayoutSplit &GetLayoutSplit( sal_Bool = sal_True ) const;
+ inline const SwFmtRowSplit &GetRowSplit( sal_Bool = sal_True ) const;
+ inline const SwFmtChain &GetChain( sal_Bool = sal_True ) const;
+ inline const SwFmtLineNumber &GetLineNumber( sal_Bool = sal_True ) const;
+ inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( sal_Bool = sal_True ) const;
+ inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( sal_Bool = sal_True ) const;
+ inline const SwFmtNoBalancedColumns &GetBalancedColumns( sal_Bool = sal_True ) const;
+ inline const SvxFrameDirectionItem &GetFrmDir( sal_Bool = sal_True ) const;
+ inline const SwTextGridItem &GetTextGrid( sal_Bool = sal_True ) const;
+ inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( sal_Bool = sal_True ) const;
// OD 18.09.2003 #i18732#
- inline const SwFmtFollowTextFlow &GetFollowTextFlow(BOOL = TRUE) const;
+ inline const SwFmtFollowTextFlow &GetFollowTextFlow(sal_Bool = sal_True) const;
// OD 2004-05-05 #i28701#
- inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(BOOL = TRUE) const;
+ inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(sal_Bool = sal_True) const;
// Grafik-Attribute - impl. steht im grfatr.hxx
- inline const SwMirrorGrf &GetMirrorGrf( BOOL = TRUE ) const;
- inline const SwCropGrf &GetCropGrf( BOOL = TRUE ) const;
- inline const SwRotationGrf &GetRotationGrf(BOOL = TRUE ) const;
- inline const SwLuminanceGrf &GetLuminanceGrf(BOOL = TRUE ) const;
- inline const SwContrastGrf &GetContrastGrf(BOOL = TRUE ) const;
- inline const SwChannelRGrf &GetChannelRGrf(BOOL = TRUE ) const;
- inline const SwChannelGGrf &GetChannelGGrf(BOOL = TRUE ) const;
- inline const SwChannelBGrf &GetChannelBGrf(BOOL = TRUE ) const;
- inline const SwGammaGrf &GetGammaGrf(BOOL = TRUE ) const;
- inline const SwInvertGrf &GetInvertGrf(BOOL = TRUE ) const;
- inline const SwTransparencyGrf &GetTransparencyGrf(BOOL = TRUE ) const;
- inline const SwDrawModeGrf &GetDrawModeGrf(BOOL = TRUE ) const;
+ inline const SwMirrorGrf &GetMirrorGrf( sal_Bool = sal_True ) const;
+ inline const SwCropGrf &GetCropGrf( sal_Bool = sal_True ) const;
+ inline const SwRotationGrf &GetRotationGrf(sal_Bool = sal_True ) const;
+ inline const SwLuminanceGrf &GetLuminanceGrf(sal_Bool = sal_True ) const;
+ inline const SwContrastGrf &GetContrastGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelRGrf &GetChannelRGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelGGrf &GetChannelGGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelBGrf &GetChannelBGrf(sal_Bool = sal_True ) const;
+ inline const SwGammaGrf &GetGammaGrf(sal_Bool = sal_True ) const;
+ inline const SwInvertGrf &GetInvertGrf(sal_Bool = sal_True ) const;
+ inline const SwTransparencyGrf &GetTransparencyGrf(sal_Bool = sal_True ) const;
+ inline const SwDrawModeGrf &GetDrawModeGrf(sal_Bool = sal_True ) const;
// Paragraph-Attribute - impl. steht im paratr.hxx
- inline const SvxLineSpacingItem &GetLineSpacing( BOOL = TRUE ) const;
- inline const SvxAdjustItem &GetAdjust( BOOL = TRUE ) const;
- inline const SvxFmtSplitItem &GetSplit( BOOL = TRUE ) const;
- inline const SwRegisterItem &GetRegister( BOOL = TRUE ) const;
- inline const SwNumRuleItem &GetNumRule( BOOL = TRUE ) const;
- inline const SvxWidowsItem &GetWidows( BOOL = TRUE ) const;
- inline const SvxOrphansItem &GetOrphans( BOOL = TRUE ) const;
- inline const SvxTabStopItem &GetTabStops( BOOL = TRUE ) const;
- inline const SvxHyphenZoneItem &GetHyphenZone( BOOL = TRUE ) const;
- inline const SwFmtDrop &GetDrop( BOOL = TRUE ) const;
- inline const SvxScriptSpaceItem &GetScriptSpace(BOOL = TRUE) const;
- inline const SvxHangingPunctuationItem &GetHangingPunctuation(BOOL = TRUE) const;
- inline const SvxForbiddenRuleItem &GetForbiddenRule(BOOL = TRUE) const;
- inline const SvxParaVertAlignItem &GetParaVertAlign(BOOL = TRUE) const;
- inline const SvxParaGridItem &GetParaGrid(BOOL = TRUE) const;
- inline const SwParaConnectBorderItem &GetParaConnectBorder(BOOL = TRUE ) const;
+ inline const SvxLineSpacingItem &GetLineSpacing( sal_Bool = sal_True ) const;
+ inline const SvxAdjustItem &GetAdjust( sal_Bool = sal_True ) const;
+ inline const SvxFmtSplitItem &GetSplit( sal_Bool = sal_True ) const;
+ inline const SwRegisterItem &GetRegister( sal_Bool = sal_True ) const;
+ inline const SwNumRuleItem &GetNumRule( sal_Bool = sal_True ) const;
+ inline const SvxWidowsItem &GetWidows( sal_Bool = sal_True ) const;
+ inline const SvxOrphansItem &GetOrphans( sal_Bool = sal_True ) const;
+ inline const SvxTabStopItem &GetTabStops( sal_Bool = sal_True ) const;
+ inline const SvxHyphenZoneItem &GetHyphenZone( sal_Bool = sal_True ) const;
+ inline const SwFmtDrop &GetDrop( sal_Bool = sal_True ) const;
+ inline const SvxScriptSpaceItem &GetScriptSpace(sal_Bool = sal_True) const;
+ inline const SvxHangingPunctuationItem &GetHangingPunctuation(sal_Bool = sal_True) const;
+ inline const SvxForbiddenRuleItem &GetForbiddenRule(sal_Bool = sal_True) const;
+ inline const SvxParaVertAlignItem &GetParaVertAlign(sal_Bool = sal_True) const;
+ inline const SvxParaGridItem &GetParaGrid(sal_Bool = sal_True) const;
+ inline const SwParaConnectBorderItem &GetParaConnectBorder(sal_Bool = sal_True ) const;
// TabellenBox-Attribute - impl. steht im cellatr.hxx
- inline const SwTblBoxNumFormat &GetTblBoxNumFmt( BOOL = TRUE ) const;
- inline const SwTblBoxFormula &GetTblBoxFormula( BOOL = TRUE ) const;
- inline const SwTblBoxValue &GetTblBoxValue( BOOL = TRUE ) const;
+ inline const SwTblBoxNumFormat &GetTblBoxNumFmt( sal_Bool = sal_True ) const;
+ inline const SwTblBoxFormula &GetTblBoxFormula( sal_Bool = sal_True ) const;
+ inline const SwTblBoxValue &GetTblBoxValue( sal_Bool = sal_True ) const;
DECL_FIXEDMEMPOOL_NEWDEL(SwAttrSet)
};
diff --git a/sw/inc/swbaslnk.hxx b/sw/inc/swbaslnk.hxx
index de70c0a250f0..46fbb36df723 100644
--- a/sw/inc/swbaslnk.hxx
+++ b/sw/inc/swbaslnk.hxx
@@ -39,27 +39,27 @@ class SwBaseLink : public ::sfx2::SvBaseLink
friend long GrfNodeChanged( void* pLink, void* pCaller );
SwCntntNode* pCntntNode;
- BOOL bSwapIn : 1;
- BOOL bNoDataFlag : 1;
- BOOL bIgnoreDataChanged : 1;
+ sal_Bool bSwapIn : 1;
+ sal_Bool bNoDataFlag : 1;
+ sal_Bool bIgnoreDataChanged : 1;
ReReadThread* m_pReReadThread;
protected:
SwBaseLink(): m_pReReadThread(0) {}
- SwBaseLink( const String& rNm, USHORT nObjectType, ::sfx2::SvLinkSource* pObj,
+ SwBaseLink( const String& rNm, sal_uInt16 nObjectType, ::sfx2::SvLinkSource* pObj,
SwCntntNode* pNode = 0 )
: ::sfx2::SvBaseLink( rNm, nObjectType, pObj ), pCntntNode( pNode ),
- bSwapIn( FALSE ), bNoDataFlag( FALSE ), bIgnoreDataChanged( FALSE ),
+ bSwapIn( sal_False ), bNoDataFlag( sal_False ), bIgnoreDataChanged( sal_False ),
m_pReReadThread(0)
{}
public:
TYPEINFO();
- SwBaseLink( USHORT nMode, USHORT nFormat, SwCntntNode* pNode = 0 )
+ SwBaseLink( sal_uInt16 nMode, sal_uInt16 nFormat, SwCntntNode* pNode = 0 )
: ::sfx2::SvBaseLink( nMode, nFormat ), pCntntNode( pNode ),
- bSwapIn( FALSE ), bNoDataFlag( FALSE ), bIgnoreDataChanged( FALSE ),
+ bSwapIn( sal_False ), bNoDataFlag( sal_False ), bIgnoreDataChanged( sal_False ),
m_pReReadThread(0)
{}
virtual ~SwBaseLink();
@@ -74,20 +74,20 @@ public:
SwCntntNode *GetCntntNode() { return pCntntNode; }
// nur fuer Grafiken
- BOOL SwapIn( BOOL bWaitForData = FALSE, BOOL bNativFormat = FALSE );
+ sal_Bool SwapIn( sal_Bool bWaitForData = sal_False, sal_Bool bNativFormat = sal_False );
- BOOL Connect() { return 0 != SvBaseLink::GetRealObject(); }
+ sal_Bool Connect() { return 0 != SvBaseLink::GetRealObject(); }
// nur fuer Grafik-Links ( zum Umschalten zwischen DDE / Grf-Link)
- void SetObjType( USHORT nType ) { SvBaseLink::SetObjType( nType ); }
+ void SetObjType( sal_uInt16 nType ) { SvBaseLink::SetObjType( nType ); }
- BOOL IsRecursion( const SwBaseLink* pChkLnk ) const;
- virtual BOOL IsInRange( ULONG nSttNd, ULONG nEndNd, xub_StrLen nStt = 0,
+ sal_Bool IsRecursion( const SwBaseLink* pChkLnk ) const;
+ virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, xub_StrLen nStt = 0,
xub_StrLen nEnd = STRING_NOTFOUND ) const;
- void SetNoDataFlag() { bNoDataFlag = TRUE; }
- BOOL ChkNoDataFlag() { BOOL bRet = bNoDataFlag; bNoDataFlag = FALSE; return bRet; }
- BOOL IsNoDataFlag() const { return bNoDataFlag; }
+ void SetNoDataFlag() { bNoDataFlag = sal_True; }
+ sal_Bool ChkNoDataFlag() { sal_Bool bRet = bNoDataFlag; bNoDataFlag = sal_False; return bRet; }
+ sal_Bool IsNoDataFlag() const { return bNoDataFlag; }
};
diff --git a/sw/inc/swcalwrp.hxx b/sw/inc/swcalwrp.hxx
index 1f0e9c7a8348..f7def58ab211 100644
--- a/sw/inc/swcalwrp.hxx
+++ b/sw/inc/swcalwrp.hxx
@@ -36,7 +36,7 @@
class SwCalendarWrapper : public CalendarWrapper
{
String sUniqueId;
- USHORT nLang;
+ sal_uInt16 nLang;
public:
SwCalendarWrapper( const ::com::sun::star::uno::Reference<
@@ -44,7 +44,7 @@ public:
: CalendarWrapper( xMSF ), nLang( LANGUAGE_SYSTEM )
{}
- void LoadDefaultCalendar( USHORT nLang );
+ void LoadDefaultCalendar( sal_uInt16 nLang );
};
diff --git a/sw/inc/swcli.hxx b/sw/inc/swcli.hxx
index 113a63cc6d7c..86a42512475f 100644
--- a/sw/inc/swcli.hxx
+++ b/sw/inc/swcli.hxx
@@ -39,8 +39,8 @@ class SwEditWin;
class SwOleClient : public SfxInPlaceClient
{
- BOOL bInDoVerb;
- BOOL bOldCheckForOLEInCaption;
+ sal_Bool bInDoVerb;
+ sal_Bool bOldCheckForOLEInCaption;
virtual void ObjectAreaChanged();
virtual void RequestNewObjectArea( Rectangle& );
@@ -50,9 +50,9 @@ class SwOleClient : public SfxInPlaceClient
public:
SwOleClient( SwView *pView, SwEditWin *pWin, const svt::EmbeddedObjectRef& );
- void SetInDoVerb( BOOL bFlag ) { bInDoVerb = bFlag; }
+ void SetInDoVerb( sal_Bool bFlag ) { bInDoVerb = bFlag; }
- BOOL IsCheckForOLEInCaption() const { return bOldCheckForOLEInCaption; }
+ sal_Bool IsCheckForOLEInCaption() const { return bOldCheckForOLEInCaption; }
virtual void FormatChanged();
};
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index 49a95e9b7c41..daa33e4f232a 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -49,11 +49,11 @@ const int FIND_NO_RING = 2;
struct SwFindParas
{
- virtual int Find( SwPaM*, SwMoveFn, const SwPaM*, BOOL ) = 0;
+ virtual int Find( SwPaM*, SwMoveFn, const SwPaM*, sal_Bool ) = 0;
virtual int IsReplaceMode() const = 0;
};
-typedef USHORT SwCursorSelOverFlags;
+typedef sal_uInt16 SwCursorSelOverFlags;
namespace nsSwCursorSelOverFlags
{
const SwCursorSelOverFlags SELOVER_NONE = 0x00;
@@ -69,10 +69,10 @@ class SwCursor : public SwPaM
_SwCursor_SavePos* pSavePos;
long mnRowSpanOffset; // required for travelling in tabs with rowspans
- BYTE nCursorBidiLevel; // bidi level of the cursor
+ sal_uInt8 nCursorBidiLevel; // bidi level of the cursor
bool mbColumnSelection; // true: cursor is aprt of a column selection
- ULONG FindAll( SwFindParas& , SwDocPositions, SwDocPositions, FindRanges, BOOL& bCancel );
+ sal_uLong FindAll( SwFindParas& , SwDocPositions, SwDocPositions, FindRanges, sal_Bool& bCancel );
using SwPaM::Find;
@@ -84,7 +84,7 @@ protected:
const _SwCursor_SavePos* GetSavePos() const { return pSavePos; }
virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
- BOOL & io_rbLeft, BOOL bVisualAllowed, BOOL bInsertCrsr);
+ sal_Bool & io_rbLeft, sal_Bool bVisualAllowed, sal_Bool bInsertCrsr);
virtual void DoSetBidiLevelUpDown();
virtual bool IsSelOvrCheck(int eFlags);
@@ -112,45 +112,45 @@ public:
SwPaM* ) const;
- ULONG Find( const com::sun::star::util::SearchOptions& rSearchOpt,
- BOOL bSearchInNotes,
+ sal_uLong Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ sal_Bool bSearchInNotes,
SwDocPositions nStart, SwDocPositions nEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges = FND_IN_BODY,
- int bReplace = FALSE );
- ULONG Find( const SwTxtFmtColl& rFmtColl,
+ int bReplace = sal_False );
+ sal_uLong Find( const SwTxtFmtColl& rFmtColl,
SwDocPositions nStart, SwDocPositions nEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges = FND_IN_BODY,
const SwTxtFmtColl* pReplFmt = 0 );
- ULONG Find( const SfxItemSet& rSet, BOOL bNoCollections,
+ sal_uLong Find( const SfxItemSet& rSet, sal_Bool bNoCollections,
SwDocPositions nStart, SwDocPositions nEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges = FND_IN_BODY,
const com::sun::star::util::SearchOptions* pSearchOpt = 0,
const SfxItemSet* rReplSet = 0 );
// UI versions
- BOOL IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
- BOOL IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
- BOOL IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
- BOOL IsStartEndSentence( bool bEnd ) const;
- BOOL GoStartWord();
- BOOL GoEndWord();
- BOOL GoNextWord();
- BOOL GoPrevWord();
- BOOL SelectWord( const Point* pPt = 0 );
+ sal_Bool IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsStartEndSentence( bool bEnd ) const;
+ sal_Bool GoStartWord();
+ sal_Bool GoEndWord();
+ sal_Bool GoNextWord();
+ sal_Bool GoPrevWord();
+ sal_Bool SelectWord( const Point* pPt = 0 );
// API versions of above functions (will be used with a different
// WordType for the break iterator)
- BOOL IsStartWordWT( sal_Int16 nWordType ) const;
- BOOL IsEndWordWT( sal_Int16 nWordType ) const;
- BOOL IsInWordWT( sal_Int16 nWordType ) const;
- BOOL GoStartWordWT( sal_Int16 nWordType );
- BOOL GoEndWordWT( sal_Int16 nWordType );
- BOOL GoNextWordWT( sal_Int16 nWordType );
- BOOL GoPrevWordWT( sal_Int16 nWordType );
- BOOL SelectWordWT( sal_Int16 nWordType, const Point* pPt = 0 );
+ sal_Bool IsStartWordWT( sal_Int16 nWordType ) const;
+ sal_Bool IsEndWordWT( sal_Int16 nWordType ) const;
+ sal_Bool IsInWordWT( sal_Int16 nWordType ) const;
+ sal_Bool GoStartWordWT( sal_Int16 nWordType );
+ sal_Bool GoEndWordWT( sal_Int16 nWordType );
+ sal_Bool GoNextWordWT( sal_Int16 nWordType );
+ sal_Bool GoPrevWordWT( sal_Int16 nWordType );
+ sal_Bool SelectWordWT( sal_Int16 nWordType, const Point* pPt = 0 );
enum SentenceMoveType
{
@@ -159,66 +159,66 @@ public:
START_SENT,
END_SENT
};
- BOOL GoSentence(SentenceMoveType eMoveType);
- BOOL GoNextSentence(){return GoSentence(NEXT_SENT);}
- BOOL GoEndSentence(){return GoSentence(END_SENT);}
- BOOL GoPrevSentence(){return GoSentence(PREV_SENT);}
- BOOL GoStartSentence(){return GoSentence(START_SENT);}
- BOOL ExpandToSentenceBorders();
-
- virtual BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
- BOOL bAllowVisual, BOOL bSkipHidden, BOOL bInsertCrsr );
- BOOL UpDown( BOOL bUp, USHORT nCnt, Point* pPt, long nUpDownX );
- BOOL LeftRightMargin( BOOL bLeftMargin, BOOL bAPI = FALSE );
- BOOL IsAtLeftRightMargin( BOOL bLeftMargin, BOOL bAPI = FALSE ) const;
- BOOL SttEndDoc( BOOL bSttDoc );
- BOOL GoPrevNextCell( BOOL bNext, USHORT nCnt );
-
- BOOL Left( USHORT nCnt, USHORT nMode, BOOL bAllowVisual, BOOL bSkipHidden )
- { return LeftRight( TRUE, nCnt, nMode, bAllowVisual, bSkipHidden, FALSE ); }
- BOOL Right( USHORT nCnt, USHORT nMode, BOOL bAllowVisual, BOOL bSkipHidden )
- { return LeftRight( FALSE, nCnt, nMode, bAllowVisual, bSkipHidden, FALSE ); }
- BOOL GoNextCell( USHORT nCnt = 1 ) { return GoPrevNextCell( TRUE, nCnt ); }
- BOOL GoPrevCell( USHORT nCnt = 1 ) { return GoPrevNextCell( FALSE, nCnt ); }
- virtual BOOL GotoTable( const String& rName );
- BOOL GotoTblBox( const String& rName );
- BOOL GotoRegion( const String& rName );
- BOOL GotoFtnAnchor();
- BOOL GotoFtnTxt();
- BOOL GotoNextFtnAnchor();
- BOOL GotoPrevFtnAnchor();
- BOOL GotoNextFtnCntnt();
- BOOL GotoPrevFtnCntnt();
-
- BOOL MovePara( SwWhichPara, SwPosPara );
- BOOL MoveSection( SwWhichSection, SwPosSection );
- BOOL MoveTable( SwWhichTable, SwPosTable );
- BOOL MoveRegion( SwWhichRegion, SwPosRegion );
+ sal_Bool GoSentence(SentenceMoveType eMoveType);
+ sal_Bool GoNextSentence(){return GoSentence(NEXT_SENT);}
+ sal_Bool GoEndSentence(){return GoSentence(END_SENT);}
+ sal_Bool GoPrevSentence(){return GoSentence(PREV_SENT);}
+ sal_Bool GoStartSentence(){return GoSentence(START_SENT);}
+ sal_Bool ExpandToSentenceBorders();
+
+ virtual sal_Bool LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
+ sal_Bool bAllowVisual, sal_Bool bSkipHidden, sal_Bool bInsertCrsr );
+ sal_Bool UpDown( sal_Bool bUp, sal_uInt16 nCnt, Point* pPt, long nUpDownX );
+ sal_Bool LeftRightMargin( sal_Bool bLeftMargin, sal_Bool bAPI = sal_False );
+ sal_Bool IsAtLeftRightMargin( sal_Bool bLeftMargin, sal_Bool bAPI = sal_False ) const;
+ sal_Bool SttEndDoc( sal_Bool bSttDoc );
+ sal_Bool GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt );
+
+ sal_Bool Left( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual, sal_Bool bSkipHidden )
+ { return LeftRight( sal_True, nCnt, nMode, bAllowVisual, bSkipHidden, sal_False ); }
+ sal_Bool Right( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual, sal_Bool bSkipHidden )
+ { return LeftRight( sal_False, nCnt, nMode, bAllowVisual, bSkipHidden, sal_False ); }
+ sal_Bool GoNextCell( sal_uInt16 nCnt = 1 ) { return GoPrevNextCell( sal_True, nCnt ); }
+ sal_Bool GoPrevCell( sal_uInt16 nCnt = 1 ) { return GoPrevNextCell( sal_False, nCnt ); }
+ virtual sal_Bool GotoTable( const String& rName );
+ sal_Bool GotoTblBox( const String& rName );
+ sal_Bool GotoRegion( const String& rName );
+ sal_Bool GotoFtnAnchor();
+ sal_Bool GotoFtnTxt();
+ sal_Bool GotoNextFtnAnchor();
+ sal_Bool GotoPrevFtnAnchor();
+ sal_Bool GotoNextFtnCntnt();
+ sal_Bool GotoPrevFtnCntnt();
+
+ sal_Bool MovePara( SwWhichPara, SwPosPara );
+ sal_Bool MoveSection( SwWhichSection, SwPosSection );
+ sal_Bool MoveTable( SwWhichTable, SwPosTable );
+ sal_Bool MoveRegion( SwWhichRegion, SwPosRegion );
// gibt es eine Selection vom Content in die Tabelle
// Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
- virtual BOOL IsSelOvr( int eFlags =
+ virtual sal_Bool IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
- virtual BOOL IsInProtectTable( BOOL bMove = FALSE,
- BOOL bChgCrsr = TRUE );
- BOOL IsNoCntnt() const;
+ virtual sal_Bool IsInProtectTable( sal_Bool bMove = sal_False,
+ sal_Bool bChgCrsr = sal_True );
+ sal_Bool IsNoCntnt() const;
void RestoreSavePos(); // Point auf die SavePos setzen
- // TRUE: an die Position kann der Cursor gesetzt werden
- virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
+ // sal_True: an die Position kann der Cursor gesetzt werden
+ virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
// darf der Cursor in ReadOnlyBereiche?
virtual bool IsReadOnlyAvailable() const;
- virtual BOOL IsSkipOverProtectSections() const;
- virtual BOOL IsSkipOverHiddenSections() const;
+ virtual sal_Bool IsSkipOverProtectSections() const;
+ virtual sal_Bool IsSkipOverHiddenSections() const;
- BYTE GetCrsrBidiLevel() const { return nCursorBidiLevel; }
- void SetCrsrBidiLevel( BYTE nNewLevel ) { nCursorBidiLevel = nNewLevel; }
+ sal_uInt8 GetCrsrBidiLevel() const { return nCursorBidiLevel; }
+ void SetCrsrBidiLevel( sal_uInt8 nNewLevel ) { nCursorBidiLevel = nNewLevel; }
bool IsColumnSelection() const { return mbColumnSelection; }
void SetColumnSelection( bool bNew ) { mbColumnSelection = bNew; }
@@ -240,7 +240,7 @@ public:
struct _SwCursor_SavePos
{
- ULONG nNode;
+ sal_uLong nNode;
xub_StrLen nCntnt;
_SwCursor_SavePos* pNext;
@@ -260,11 +260,11 @@ class SwTableCursor : public virtual SwCursor
{
protected:
- ULONG nTblPtNd, nTblMkNd;
+ sal_uLong nTblPtNd, nTblMkNd;
xub_StrLen nTblPtCnt, nTblMkCnt;
SwSelBoxes aSelBoxes;
- BOOL bChg : 1;
- BOOL bParked : 1; // Tabellen-Cursor wurde geparkt
+ sal_Bool bChg : 1;
+ sal_Bool bParked : 1; // Tabellen-Cursor wurde geparkt
virtual bool IsSelOvrCheck(int eFlags);
@@ -273,25 +273,25 @@ public:
SwTableCursor( SwTableCursor& );
virtual ~SwTableCursor();
- virtual BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
- BOOL bAllowVisual, BOOL bSkipHidden, BOOL bInsertCrsr );
- virtual BOOL GotoTable( const String& rName );
+ virtual sal_Bool LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
+ sal_Bool bAllowVisual, sal_Bool bSkipHidden, sal_Bool bInsertCrsr );
+ virtual sal_Bool GotoTable( const String& rName );
void InsertBox( const SwTableBox& rTblBox );
- void DeleteBox( USHORT nPos ) { aSelBoxes.Remove( nPos ); bChg = TRUE; }
- USHORT GetBoxesCount() const { return aSelBoxes.Count(); }
+ void DeleteBox( sal_uInt16 nPos ) { aSelBoxes.Remove( nPos ); bChg = sal_True; }
+ sal_uInt16 GetBoxesCount() const { return aSelBoxes.Count(); }
const SwSelBoxes& GetBoxes() const { return aSelBoxes; }
// Baut fuer alle Boxen die Cursor auf
SwCursor* MakeBoxSels( SwCursor* pAktCrsr );
// sind irgendwelche Boxen mit einem Schutz versehen?
- BOOL HasReadOnlyBoxSel() const;
+ sal_Bool HasReadOnlyBoxSel() const;
// wurde der TabelleCursor veraendert ? Wenn ja speicher gleich
// die neuen Werte.
- BOOL IsCrsrMovedUpdt();
+ sal_Bool IsCrsrMovedUpdt();
// wurde der TabelleCursor veraendert ?
- BOOL IsCrsrMoved() const
+ sal_Bool IsCrsrMoved() const
{
return nTblMkNd != GetMark()->nNode.GetIndex() ||
nTblPtNd != GetPoint()->nNode.GetIndex() ||
@@ -299,7 +299,7 @@ public:
nTblPtCnt != GetPoint()->nContent.GetIndex();
}
- BOOL IsChgd() const { return bChg; }
+ sal_Bool IsChgd() const { return bChg; }
// Parke den Tabellen-Cursor auf dem StartNode der Boxen.
void ParkCrsr();
diff --git a/sw/inc/swdbdata.hxx b/sw/inc/swdbdata.hxx
index d5c50f30dda7..a19cd67e8783 100644
--- a/sw/inc/swdbdata.hxx
+++ b/sw/inc/swdbdata.hxx
@@ -39,9 +39,9 @@ struct SwDBData
SwDBData() :
nCommandType(0){}
- BOOL operator !=(const SwDBData& rCmp) const
+ sal_Bool operator !=(const SwDBData& rCmp) const
{return rCmp.sDataSource != sDataSource || rCmp.sCommand != sCommand || rCmp.nCommandType != nCommandType;}
- BOOL operator ==(const SwDBData& rCmp) const
+ sal_Bool operator ==(const SwDBData& rCmp) const
{return rCmp.sDataSource == sDataSource && rCmp.sCommand == sCommand && rCmp.nCommandType == nCommandType;}
};
diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx
index 042654389174..f7e7bb56f97d 100644
--- a/sw/inc/swddetbl.hxx
+++ b/sw/inc/swddetbl.hxx
@@ -39,12 +39,12 @@ public:
// Constructor movet alle Lines/Boxen aus der SwTable zu sich.
// Die SwTable ist danach Leer und muss geloescht werden.
SwDDETable( SwTable& rTable, SwDDEFieldType* pDDEType,
- BOOL bUpdate = TRUE );
+ sal_Bool bUpdate = sal_True );
~SwDDETable();
void Modify( SfxPoolItem*, SfxPoolItem* );
void ChangeContent();
- BOOL NoDDETable();
+ sal_Bool NoDDETable();
SwDDEFieldType* GetDDEFldType();
inline const SwDDEFieldType* GetDDEFldType() const;
diff --git a/sw/inc/swerror.h b/sw/inc/swerror.h
index fa7e03f3a381..74755e45b74b 100644
--- a/sw/inc/swerror.h
+++ b/sw/inc/swerror.h
@@ -95,12 +95,12 @@
#ifndef __RSC
-inline FASTBOOL IsWarning( ULONG nErr )
+inline FASTBOOL IsWarning( sal_uLong nErr )
{
return 0 != ( nErr & ERRCODE_WARNING_MASK & nErr );
}
-inline FASTBOOL IsError( ULONG nErr )
+inline FASTBOOL IsError( sal_uLong nErr )
{
return nErr && 0 == ( ERRCODE_WARNING_MASK & nErr );
}
diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx
index 81e599c7464f..4194042d2327 100644
--- a/sw/inc/swevent.hxx
+++ b/sw/inc/swevent.hxx
@@ -121,7 +121,7 @@ struct SwCallMouseEvent
void Clear()
{ eType = EVENT_OBJECT_NONE; PTR.pFmt = 0; PTR.IMAP.pIMapObj = 0; }
- BOOL HasEvent() const { return EVENT_OBJECT_NONE != eType; }
+ sal_Bool HasEvent() const { return EVENT_OBJECT_NONE != eType; }
};
diff --git a/sw/inc/swgstr.hxx b/sw/inc/swgstr.hxx
index 50600cf945de..8b65028166a3 100644
--- a/sw/inc/swgstr.hxx
+++ b/sw/inc/swgstr.hxx
@@ -41,11 +41,11 @@ typedef long long3; // Zur Dokumentation: 3-byte-Longs
class swcrypter {
protected:
sal_Char cPasswd[ PASSWDLEN ]; // Passwort-Puffer
- BOOL bPasswd; // TRUE wenn mit Passwort
- void encode( sal_Char*, USHORT ); // Puffer codieren/decodieren
+ sal_Bool bPasswd; // sal_True wenn mit Passwort
+ void encode( sal_Char*, sal_uInt16 ); // Puffer codieren/decodieren
public:
swcrypter();
- BOOL setpasswd( const String& ); // Passwort setzen
+ sal_Bool setpasswd( const String& ); // Passwort setzen
void copypasswd( const sal_Char* ); // Passwort direkt setzen
const sal_Char* getpasswd() { return cPasswd; }
};
@@ -57,10 +57,10 @@ class swstreambase : public swcrypter {
protected:
SvStream* pStrm; // eigentlicher Stream
sal_Char* pBuf; // Zwischenpuffer
- USHORT nBuflen; // Laenge des Zwischenpuffers
+ sal_uInt16 nBuflen; // Laenge des Zwischenpuffers
short nLong; // Long-Laenge (3 oder 4)
- BOOL bTempStrm; // TRUE: Stream loeschen
- void checkbuf( USHORT ); // Testen der Pufferlaenge
+ sal_Bool bTempStrm; // sal_True: Stream loeschen
+ void checkbuf( sal_uInt16 ); // Testen der Pufferlaenge
swstreambase( SvStream& );
@@ -87,15 +87,15 @@ public:
int operator!() { return ( pStrm->GetError() != SVSTREAM_OK ); }
int eof() { return pStrm->IsEof(); }
- BYTE get();
- void get( void* p, USHORT n ) { pStrm->Read( (sal_Char*) p, n ); }
+ sal_uInt8 get();
+ void get( void* p, sal_uInt16 n ) { pStrm->Read( (sal_Char*) p, n ); }
inline swstreambase& operator>>( sal_Char& );
- inline swstreambase& operator>>( BYTE& );
+ inline swstreambase& operator>>( sal_uInt8& );
inline swstreambase& operator>>( short& );
- inline swstreambase& operator>>( USHORT& );
+ inline swstreambase& operator>>( sal_uInt16& );
swstreambase& operator>>( long& );
- inline swstreambase& operator>>( ULONG& );
+ inline swstreambase& operator>>( sal_uLong& );
};
inline swstreambase& swstreambase::operator>>( sal_Char& c )
@@ -103,7 +103,7 @@ inline swstreambase& swstreambase::operator>>( sal_Char& c )
*pStrm >> c; return *this;
}
-inline swstreambase& swstreambase::operator>>( BYTE& c )
+inline swstreambase& swstreambase::operator>>( sal_uInt8& c )
{
*pStrm >> c; return *this;
}
@@ -113,26 +113,26 @@ inline swstreambase& swstreambase::operator>>( short& c )
*pStrm >> c; return *this;
}
-inline swstreambase& swstreambase::operator>>( USHORT& c )
+inline swstreambase& swstreambase::operator>>( sal_uInt16& c )
{
*pStrm >> c; return *this;
}
-inline swstreambase& swstreambase::operator>>( ULONG& c )
+inline swstreambase& swstreambase::operator>>( sal_uLong& c )
{
return *this >> (long&) c;
}
class swistream : public swstreambase {
- BYTE cType; // Record-Typ
- ULONG nOffset; // Record-Offset-Portion
+ sal_uInt8 cType; // Record-Typ
+ sal_uLong nOffset; // Record-Offset-Portion
public:
swistream( SvStream& );
- BYTE peek(); // 1 Byte testen
- BYTE next(); // Blockstart
- BYTE cur() { return cType; } // aktueller Block
- BYTE skipnext(); // Record ueberspringen
+ sal_uInt8 peek(); // 1 Byte testen
+ sal_uInt8 next(); // Blockstart
+ sal_uInt8 cur() { return cType; } // aktueller Block
+ sal_uInt8 skipnext(); // Record ueberspringen
void undonext(); // next() rueckgaengig machen
long getskip() { return nOffset; }
void skip( long = -1L ); // Block ueberspringen
diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx
index c8e601143877..a2df211cd598 100644
--- a/sw/inc/swmodule.hxx
+++ b/sw/inc/swmodule.hxx
@@ -161,8 +161,8 @@ public:
const SwViewOption* GetViewOption(sal_Bool bWeb);
void ApplyUsrPref(const SwViewOption &, SwView*,
sal_uInt16 nDest = VIEWOPT_DEST_VIEW );
- void ApplyUserMetric( FieldUnit eMetric, BOOL bWeb );
- void ApplyRulerMetric( FieldUnit eMetric, BOOL bHorizontal, BOOL bWeb );
+ void ApplyUserMetric( FieldUnit eMetric, sal_Bool bWeb );
+ void ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_Bool bWeb );
void ApplyFldUpdateFlags(SwFldUpdateFlags eFldFlags);
void ApplyLinkMode(sal_Int32 nNewLinkMode);
@@ -191,7 +191,7 @@ public:
sal_Bool IsEmbeddedLoadSave() const { return bEmbeddedLoadSave; }
void SetEmbeddedLoadSave( sal_Bool bFlag ) { bEmbeddedLoadSave = bFlag; }
- void ShowDBObj( SwView& rView, const SwDBData& rData, BOOL bOnlyIfAvailable = FALSE);
+ void ShowDBObj( SwView& rView, const SwDBData& rData, sal_Bool bOnlyIfAvailable = sal_False);
// Tabellenmodi
sal_Bool IsInsTblFormatNum(sal_Bool bHTML) const;
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
index f90bebcbbc7e..1cf85bfd5c42 100644
--- a/sw/inc/swrect.hxx
+++ b/sw/inc/swrect.hxx
@@ -84,18 +84,18 @@ public:
SwRect &_Intersection( const SwRect &rRect );
inline SwRect GetIntersection( const SwRect& rRect ) const;
- BOOL IsInside( const Point& rPOINT ) const;
- BOOL IsNear(const Point& rPoint, long nTolerance ) const;
- BOOL IsInside( const SwRect& rRect ) const;
- BOOL IsOver( const SwRect& rRect ) const;
- inline BOOL HasArea() const;
- inline BOOL IsEmpty() const;
+ sal_Bool IsInside( const Point& rPOINT ) const;
+ sal_Bool IsNear(const Point& rPoint, long nTolerance ) const;
+ sal_Bool IsInside( const SwRect& rRect ) const;
+ sal_Bool IsOver( const SwRect& rRect ) const;
+ inline sal_Bool HasArea() const;
+ inline sal_Bool IsEmpty() const;
inline void Clear();
inline SwRect &operator = ( const SwRect &rRect );
- inline BOOL operator == ( const SwRect& rRect ) const;
- inline BOOL operator != ( const SwRect& rRect ) const;
+ inline sal_Bool operator == ( const SwRect& rRect ) const;
+ inline sal_Bool operator != ( const SwRect& rRect ) const;
inline SwRect &operator+=( const Point &rPt );
inline SwRect &operator-=( const Point &rPt );
@@ -151,10 +151,10 @@ public:
long GetBottomDistance( long ) const;
long GetRightDistance( long ) const;
long GetTopDistance( long ) const;
- BOOL OverStepLeft( long ) const;
- BOOL OverStepBottom( long ) const;
- BOOL OverStepTop( long ) const;
- BOOL OverStepRight( long ) const;
+ sal_Bool OverStepLeft( long ) const;
+ sal_Bool OverStepBottom( long ) const;
+ sal_Bool OverStepTop( long ) const;
+ sal_Bool OverStepRight( long ) const;
};
// Implementation in in swrect.cxx
@@ -164,7 +164,7 @@ typedef void (SwRect:: *SwRectSet)( const long nNew );
typedef long (SwRect:: *SwRectGet)() const;
typedef const Point (SwRect:: *SwRectPoint)() const;
typedef const Size (SwRect:: *SwRectSize)() const;
-typedef BOOL (SwRect:: *SwRectMax)( long ) const;
+typedef sal_Bool (SwRect:: *SwRectMax)( long ) const;
typedef long (SwRect:: *SwRectDist)( long ) const;
typedef void (SwRect:: *SwRectSetTwice)( long, long );
typedef void (SwRect:: *SwRectSetPos)( const Point& );
@@ -269,11 +269,11 @@ inline SwRect &SwRect::operator = ( const SwRect &rRect )
m_Size = rRect.m_Size;
return *this;
}
-inline BOOL SwRect::operator == ( const SwRect& rRect ) const
+inline sal_Bool SwRect::operator == ( const SwRect& rRect ) const
{
return (m_Point == rRect.m_Point && m_Size == rRect.m_Size);
}
-inline BOOL SwRect::operator != ( const SwRect& rRect ) const
+inline sal_Bool SwRect::operator != ( const SwRect& rRect ) const
{
return (m_Point != rRect.m_Point || m_Size != rRect.m_Size);
}
@@ -317,11 +317,11 @@ inline SwRect SwRect::GetIntersection( const SwRect& rRect ) const
return SwRect( *this ).Intersection( rRect );
}
-inline BOOL SwRect::HasArea() const
+inline sal_Bool SwRect::HasArea() const
{
return !IsEmpty();
}
-inline BOOL SwRect::IsEmpty() const
+inline sal_Bool SwRect::IsEmpty() const
{
return !(m_Size.getHeight() && m_Size.getWidth());
}
diff --git a/sw/inc/swregion.hxx b/sw/inc/swregion.hxx
index e3c7dadf4732..5693622409aa 100644
--- a/sw/inc/swregion.hxx
+++ b/sw/inc/swregion.hxx
@@ -37,18 +37,18 @@ class SwRegionRects : public SwRects
{
SwRect aOrigin; // die Kopie des StartRects
- inline void InsertRect( const SwRect &rRect, const USHORT nPos, BOOL &rDel);
+ inline void InsertRect( const SwRect &rRect, const sal_uInt16 nPos, sal_Bool &rDel);
public:
- SwRegionRects( const SwRect& rStartRect, USHORT nInit = 20,
- USHORT nGrow = 8 );
+ SwRegionRects( const SwRect& rStartRect, sal_uInt16 nInit = 20,
+ sal_uInt16 nGrow = 8 );
// Zum Ausstanzen aus aOrigin.
void operator-=( const SwRect& rRect );
// Aus Loechern werden Flaechen, aus Flaechen werden Loecher.
void Invert();
// Benachbarte Rechtecke zusammenfassen.
- void Compress( BOOL bFuzzy = TRUE );
+ void Compress( sal_Bool bFuzzy = sal_True );
inline const SwRect &GetOrigin() const { return aOrigin; }
inline void ChangeOrigin( const SwRect &rRect ) { aOrigin = rRect; }
diff --git a/sw/inc/swserv.hxx b/sw/inc/swserv.hxx
index f5f790ddf9b8..797c57db44d7 100644
--- a/sw/inc/swserv.hxx
+++ b/sw/inc/swserv.hxx
@@ -68,17 +68,17 @@ public:
}
virtual ~SwServerObject();
- virtual BOOL GetData( ::com::sun::star::uno::Any & rData,
+ virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData,
const String & rMimeType,
- BOOL bSynchron = FALSE );
+ sal_Bool bSynchron = sal_False );
- BOOL SetData( const String & rMimeType,
+ sal_Bool SetData( const String & rMimeType,
const ::com::sun::star::uno::Any& rData );
virtual void SendDataChanged( const SwPosition& rPos );
virtual void SendDataChanged( const SwPaM& rRange );
- BOOL IsLinkInServer( const SwBaseLink* ) const;
+ sal_Bool IsLinkInServer( const SwBaseLink* ) const;
void SetNoServer();
void SetDdeBookmark( ::sw::mark::IMark& rBookmark);
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 1b1316ce37d1..2dd3bfaf7467 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -104,17 +104,17 @@ protected:
//SOLL das fuer jede Tabelle einstellbar sein?
TblChgMode eTblChgMode;
- USHORT nGrfsThatResize; // Anzahl der Grfs, die beim HTML-Import
+ sal_uInt16 nGrfsThatResize; // Anzahl der Grfs, die beim HTML-Import
// noch ein Resize der Tbl. anstossen
- USHORT nRowsToRepeat; // number of rows to repeat on every page
+ sal_uInt16 nRowsToRepeat; // number of rows to repeat on every page
- BOOL bModifyLocked :1;
- BOOL bNewModel :1; // FALSE: old SubTableModel; TRUE: new RowSpanModel
+ sal_Bool bModifyLocked :1;
+ sal_Bool bNewModel :1; // sal_False: old SubTableModel; sal_True: new RowSpanModel
#ifdef DBG_UTIL
bool bDontChangeModel; // This is set by functions (like Merge()) to forbid a laet model change
#endif
- BOOL IsModifyLocked(){ return bModifyLocked;}
+ sal_Bool IsModifyLocked(){ return bModifyLocked;}
public:
enum SearchType
@@ -137,19 +137,19 @@ private:
SwTable & operator= (const SwTable &);
// no default ctor.
SwTable();
- BOOL OldMerge( SwDoc*, const SwSelBoxes&, SwTableBox*, SwUndoTblMerge* );
- BOOL OldSplitRow( SwDoc*, const SwSelBoxes&, USHORT, BOOL );
- BOOL NewMerge( SwDoc*, const SwSelBoxes&, const SwSelBoxes& rMerged,
+ sal_Bool OldMerge( SwDoc*, const SwSelBoxes&, SwTableBox*, SwUndoTblMerge* );
+ sal_Bool OldSplitRow( SwDoc*, const SwSelBoxes&, sal_uInt16, sal_Bool );
+ sal_Bool NewMerge( SwDoc*, const SwSelBoxes&, const SwSelBoxes& rMerged,
SwTableBox*, SwUndoTblMerge* );
- BOOL NewSplitRow( SwDoc*, const SwSelBoxes&, USHORT, BOOL );
+ sal_Bool NewSplitRow( SwDoc*, const SwSelBoxes&, sal_uInt16, sal_Bool );
SwBoxSelection* CollectBoxSelection( const SwPaM& rPam ) const;
- void InsertSpannedRow( SwDoc* pDoc, USHORT nIdx, USHORT nCnt );
- BOOL _InsertRow( SwDoc*, const SwSelBoxes&, USHORT nCnt, BOOL bBehind );
- BOOL NewInsertCol( SwDoc*, const SwSelBoxes& rBoxes, USHORT nCnt, BOOL );
+ void InsertSpannedRow( SwDoc* pDoc, sal_uInt16 nIdx, sal_uInt16 nCnt );
+ sal_Bool _InsertRow( SwDoc*, const SwSelBoxes&, sal_uInt16 nCnt, sal_Bool bBehind );
+ sal_Bool NewInsertCol( SwDoc*, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool );
void _FindSuperfluousRows( SwSelBoxes& rBoxes, SwTableLine*, SwTableLine* );
void AdjustWidths( const long nOld, const long nNew );
void NewSetTabCols( Parm &rP, const SwTabCols &rNew, const SwTabCols &rOld,
- const SwTableBox *pStart, BOOL bCurRowOnly );
+ const SwTableBox *pStart, sal_Bool bCurRowOnly );
public:
@@ -157,18 +157,18 @@ public:
const SwHTMLTableLayout *GetHTMLTableLayout() const { return pHTMLLayout; }
void SetHTMLTableLayout( SwHTMLTableLayout *p ); //Eigentumsuebergang!
- USHORT IncGrfsThatResize() { return ++nGrfsThatResize; }
- USHORT DecGrfsThatResize() { return nGrfsThatResize ? --nGrfsThatResize : 0; }
+ sal_uInt16 IncGrfsThatResize() { return ++nGrfsThatResize; }
+ sal_uInt16 DecGrfsThatResize() { return nGrfsThatResize ? --nGrfsThatResize : 0; }
- void LockModify() { bModifyLocked = TRUE; } //Muessen _immer_ paarig
- void UnlockModify() { bModifyLocked = FALSE;} //benutzt werden!
+ void LockModify() { bModifyLocked = sal_True; } //Muessen _immer_ paarig
+ void UnlockModify() { bModifyLocked = sal_False;} //benutzt werden!
- void SetTableModel( BOOL bNew ){ bNewModel = bNew; }
- BOOL IsNewModel() const { return bNewModel; }
+ void SetTableModel( sal_Bool bNew ){ bNewModel = bNew; }
+ sal_Bool IsNewModel() const { return bNewModel; }
- USHORT GetRowsToRepeat() const { return Min( GetTabLines().Count(), nRowsToRepeat ); }
- USHORT _GetRowsToRepeat() const { return nRowsToRepeat; }
- void SetRowsToRepeat( USHORT nNumOfRows ) { nRowsToRepeat = nNumOfRows; }
+ sal_uInt16 GetRowsToRepeat() const { return Min( GetTabLines().Count(), nRowsToRepeat ); }
+ sal_uInt16 _GetRowsToRepeat() const { return nRowsToRepeat; }
+ void SetRowsToRepeat( sal_uInt16 nNumOfRows ) { nRowsToRepeat = nNumOfRows; }
bool IsHeadline( const SwTableLine& rLine ) const;
@@ -181,9 +181,9 @@ public:
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
void GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
- BOOL bHidden = FALSE, BOOL bCurRowOnly = FALSE ) const;
+ sal_Bool bHidden = sal_False, sal_Bool bCurRowOnly = sal_False ) const;
void SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
- const SwTableBox *pStart, BOOL bCurRowOnly );
+ const SwTableBox *pStart, sal_Bool bCurRowOnly );
// The following functions are for new table model only...
void CreateSelection( const SwPaM& rPam, SwSelBoxes& rBoxes,
@@ -196,17 +196,17 @@ public:
// SwSavRowSpan is the structure needed by Undo to undo the split operation
// CleanUpRowSpan corrects the (top of the) second table and delviers the structure
// for Undo
- SwSaveRowSpan* CleanUpTopRowSpan( USHORT nSplitLine );
+ SwSaveRowSpan* CleanUpTopRowSpan( sal_uInt16 nSplitLine );
// RestoreRowSpan is called by Undo to restore the old row span values
void RestoreRowSpan( const SwSaveRowSpan& );
// CleanUpBottomRowSpan corrects the overhanging row spans at the end of the first table
- void CleanUpBottomRowSpan( USHORT nDelLines );
+ void CleanUpBottomRowSpan( sal_uInt16 nDelLines );
// The following functions are "pseudo-virtual", i.e. they are different for old and new table model
// It's not allowed to change the table model after the first call of one of these functions.
- BOOL Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, const SwSelBoxes& rMerged,
+ sal_Bool Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, const SwSelBoxes& rMerged,
SwTableBox* pMergeBox, SwUndoTblMerge* pUndo = 0 )
{
#ifdef DBG_UTIL
@@ -215,8 +215,8 @@ public:
return bNewModel ? NewMerge( pDoc, rBoxes, rMerged, pMergeBox, pUndo ) :
OldMerge( pDoc, rBoxes, pMergeBox, pUndo );
}
- BOOL SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt=1,
- BOOL bSameHeight = FALSE )
+ sal_Bool SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1,
+ sal_Bool bSameHeight = sal_False )
{
#ifdef DBG_UTIL
bDontChangeModel = true;
@@ -229,16 +229,16 @@ public:
void ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax ) const;
void PrepareDeleteCol( long nMin, long nMax );
- BOOL InsertCol( SwDoc*, const SwSelBoxes& rBoxes,
- USHORT nCnt = 1, BOOL bBehind = TRUE );
- BOOL InsertRow( SwDoc*, const SwSelBoxes& rBoxes,
- USHORT nCnt = 1, BOOL bBehind = TRUE );
- BOOL AppendRow( SwDoc* pDoc, USHORT nCnt = 1 );
+ sal_Bool InsertCol( SwDoc*, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
+ sal_Bool InsertRow( SwDoc*, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
+ sal_Bool AppendRow( SwDoc* pDoc, sal_uInt16 nCnt = 1 );
void PrepareDelBoxes( const SwSelBoxes& rBoxes );
- BOOL DeleteSel( SwDoc*, const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged,
- SwUndo* pUndo, const BOOL bDelMakeFrms, const BOOL bCorrBorder );
- BOOL SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt=1 );
- BOOL Merge( const SwSelBoxes& rBoxes,
+ sal_Bool DeleteSel( SwDoc*, const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged,
+ SwUndo* pUndo, const sal_Bool bDelMakeFrms, const sal_Bool bCorrBorder );
+ sal_Bool SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1 );
+ sal_Bool Merge( const SwSelBoxes& rBoxes,
SwTableBox* pMergeBox, SwUndoTblMerge* = 0 );
void FindSuperfluousRows( SwSelBoxes& rBoxes )
@@ -252,8 +252,8 @@ public:
// (wird von GetTblBox und SwTblFld benutzt)
// --> OD 2007-08-03 #i80314#
// add 3rd parameter in order to control validation check on <rStr>
- static USHORT _GetBoxNum( String& rStr,
- BOOL bFirst = FALSE,
+ static sal_uInt16 _GetBoxNum( String& rStr,
+ sal_Bool bFirst = sal_False,
const bool bPerformValidCheck = false );
// <--
// suche die Inhaltstragende Box mit dem Namen
@@ -264,38 +264,38 @@ public:
const bool bPerformValidCheck = false ) const;
// <--
// kopiere die selektierten Boxen in ein anderes Dokument.
- BOOL MakeCopy( SwDoc*, const SwPosition&, const SwSelBoxes&,
- BOOL bCpyNds = TRUE, BOOL bCpyName = FALSE ) const;
+ sal_Bool MakeCopy( SwDoc*, const SwPosition&, const SwSelBoxes&,
+ sal_Bool bCpyNds = sal_True, sal_Bool bCpyName = sal_False ) const;
// kopiere die Tabelle in diese. (die Logik steht im TBLRWCL.CXX)
- BOOL InsTable( const SwTable& rCpyTbl, const SwNodeIndex&,
+ sal_Bool InsTable( const SwTable& rCpyTbl, const SwNodeIndex&,
SwUndoTblCpyTbl* pUndo = 0 );
- BOOL InsTable( const SwTable& rCpyTbl, const SwSelBoxes&,
+ sal_Bool InsTable( const SwTable& rCpyTbl, const SwSelBoxes&,
SwUndoTblCpyTbl* pUndo = 0 );
- BOOL InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes&,
+ sal_Bool InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes&,
SwUndoTblCpyTbl* pUndo );
// kopiere die Headline (mit Inhalt!) der Tabelle in eine andere
- BOOL CopyHeadlineIntoTable( SwTableNode& rTblNd );
+ sal_Bool CopyHeadlineIntoTable( SwTableNode& rTblNd );
// erfrage die Box, dessen Start-Index auf nBoxStt steht
- SwTableBox* GetTblBox( ULONG nSttIdx );
- const SwTableBox* GetTblBox( ULONG nSttIdx ) const
+ SwTableBox* GetTblBox( sal_uLong nSttIdx );
+ const SwTableBox* GetTblBox( sal_uLong nSttIdx ) const
{ return ((SwTable*)this)->GetTblBox( nSttIdx ); }
- // returnt TRUE wenn sich in der Tabelle Verschachtelungen befinden
- BOOL IsTblComplex() const;
+ // returnt sal_True wenn sich in der Tabelle Verschachtelungen befinden
+ sal_Bool IsTblComplex() const;
- //returnt TRUE wenn die Tabelle oder Selektion ausgeglichen ist
- BOOL IsTblComplexForChart( const String& rSel,
+ //returnt sal_True wenn die Tabelle oder Selektion ausgeglichen ist
+ sal_Bool IsTblComplexForChart( const String& rSel,
SwChartLines* pGetCLines = 0 ) const;
// suche alle Inhaltstragenden-Boxen der Grundline in der diese Box
// steht. rBoxes auch als Return-Wert, um es gleich weiter zu benutzen
- //JP 31.01.97: bToTop = TRUE -> hoch bis zur Grundline,
- // FALSE-> sonst nur die Line der Box
+ //JP 31.01.97: bToTop = sal_True -> hoch bis zur Grundline,
+ // sal_False-> sonst nur die Line der Box
SwSelBoxes& SelLineFromBox( const SwTableBox* pBox,
- SwSelBoxes& rBoxes, BOOL bToTop = TRUE ) const;
+ SwSelBoxes& rBoxes, sal_Bool bToTop = sal_True ) const;
// erfrage vom Client Informationen
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
// suche im Format nach der angemeldeten Tabelle
static SwTable * FindTable( SwFrmFmt const*const pFmt );
@@ -318,9 +318,9 @@ public:
TblChgMode GetTblChgMode() const { return eTblChgMode; }
void SetTblChgMode( TblChgMode eMode ) { eTblChgMode = eMode; }
- BOOL SetColWidth( SwTableBox& rAktBox, USHORT eType,
+ sal_Bool SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
- BOOL SetRowHeight( SwTableBox& rAktBox, USHORT eType,
+ sal_Bool SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
#ifdef DBG_UTIL
void CheckConsistency() const;
@@ -337,7 +337,7 @@ public:
SwTableLine() : pUpper(0) {}
- SwTableLine( SwTableLineFmt*, USHORT nBoxes, SwTableBox *pUp );
+ SwTableLine( SwTableLineFmt*, sal_uInt16 nBoxes, SwTableBox *pUp );
virtual ~SwTableLine();
SwTableBoxes &GetTabBoxes() { return aBoxes; }
@@ -357,9 +357,9 @@ public:
// suche nach der naechsten/vorherigen Box mit Inhalt
SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0,
- BOOL bOvrTblLns=TRUE ) const;
+ sal_Bool bOvrTblLns=sal_True ) const;
SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0,
- BOOL bOvrTblLns=TRUE ) const;
+ sal_Bool bOvrTblLns=sal_True ) const;
SwTwips GetTableLineHeight( bool& bLayoutAvailable ) const;
@@ -390,7 +390,7 @@ public:
SwTableBox() : pSttNd(0), pUpper(0), pImpl(0) {}
- SwTableBox( SwTableBoxFmt*, USHORT nLines, SwTableLine *pUp = 0 );
+ SwTableBox( SwTableBoxFmt*, sal_uInt16 nLines, SwTableLine *pUp = 0 );
SwTableBox( SwTableBoxFmt*, const SwStartNode&, SwTableLine *pUp = 0 );
SwTableBox( SwTableBoxFmt*, const SwNodeIndex&, SwTableLine *pUp = 0 );
virtual ~SwTableBox();
@@ -410,7 +410,7 @@ public:
void ChgFrmFmt( SwTableBoxFmt *pNewFmt );
const SwStartNode *GetSttNd() const { return pSttNd; }
- ULONG GetSttIdx() const
+ sal_uLong GetSttIdx() const
#ifndef DBG_UTIL
{ return pSttNd ? pSttNd->GetIndex() : 0; }
#else
@@ -419,29 +419,29 @@ public:
// suche nach der naechsten/vorherigen Box mit Inhalt
SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0,
- BOOL bOvrTblLns=TRUE ) const;
+ sal_Bool bOvrTblLns=sal_True ) const;
SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0,
- BOOL bOvrTblLns=TRUE ) const;
+ sal_Bool bOvrTblLns=sal_True ) const;
// gebe den Namen dieser Box zurueck. Dieser wird dynamisch bestimmt
// und ergibt sich aus der Position in den Lines/Boxen/Tabelle
String GetName() const;
// gebe den "Wert" der Box zurueck (fuers rechnen in der Tabelle)
double GetValue( SwTblCalcPara& rPara ) const;
- BOOL IsInHeadline( const SwTable* pTbl = 0 ) const;
+ sal_Bool IsInHeadline( const SwTable* pTbl = 0 ) const;
// enthaelt die Box Inhalt, der als Nummer formatiert werden kann?
- BOOL HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
- BOOL& rIsEmptyTxtNd ) const;
- ULONG IsValidNumTxtNd( BOOL bCheckAttr = TRUE ) const;
+ sal_Bool HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
+ sal_Bool& rIsEmptyTxtNd ) const;
+ sal_uLong IsValidNumTxtNd( sal_Bool bCheckAttr = sal_True ) const;
// teste ob der BoxInhalt mit der Nummer uebereinstimmt, wenn eine
// Tabellenformel gesetzt ist. (fuers Redo des Change vom NumFormat!)
- BOOL IsNumberChanged() const;
+ sal_Bool IsNumberChanged() const;
// ist das eine FormelBox oder eine Box mit numerischen Inhalt (AutoSum)
// Was es ist, besagt der ReturnWert - die WhichId des Attributes
// Leere Boxen haben den ReturnWert USHRT_MAX !!
- USHORT IsFormulaOrValueBox() const;
+ sal_uInt16 IsFormulaOrValueBox() const;
// Loading of a document requires an actualisation of cells with values
void ActualiseValueBox();
@@ -459,14 +459,14 @@ public:
bool getDummyFlag() const;
void setDummyFlag( bool bDummy );
- SwTableBox& FindStartOfRowSpan( const SwTable&, USHORT nMaxStep = USHRT_MAX );
+ SwTableBox& FindStartOfRowSpan( const SwTable&, sal_uInt16 nMaxStep = USHRT_MAX );
const SwTableBox& FindStartOfRowSpan( const SwTable& rTable,
- USHORT nMaxStep = USHRT_MAX ) const
+ sal_uInt16 nMaxStep = USHRT_MAX ) const
{ return const_cast<SwTableBox*>(this)->FindStartOfRowSpan( rTable, nMaxStep ); }
- SwTableBox& FindEndOfRowSpan( const SwTable&, USHORT nMaxStep = USHRT_MAX );
+ SwTableBox& FindEndOfRowSpan( const SwTable&, sal_uInt16 nMaxStep = USHRT_MAX );
const SwTableBox& FindEndOfRowSpan( const SwTable& rTable,
- USHORT nMaxStep = USHRT_MAX ) const
+ sal_uInt16 nMaxStep = USHRT_MAX ) const
{ return const_cast<SwTableBox*>(this)->FindEndOfRowSpan( rTable, nMaxStep ); }
};
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
index 0d37e63c367d..1f417052638d 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -116,15 +116,15 @@ enum SwLabelType
};
-const BYTE OLD_MAXLEVEL = 5;
-const BYTE MAXLEVEL = 10; //Ehemals numrule.hxx
-const BYTE NO_NUM = 200; //Ehemals numrule.hxx
-//const BYTE NO_NUMBERING = 201; //Ehemals numrule.hxx //#outline level,removed by zhaojianwei
-//const BYTE NO_INIT = 202; //Ehemals numrule.hxx
+const sal_uInt8 OLD_MAXLEVEL = 5;
+const sal_uInt8 MAXLEVEL = 10; //Ehemals numrule.hxx
+const sal_uInt8 NO_NUM = 200; //Ehemals numrule.hxx
+//const sal_uInt8 NO_NUMBERING = 201; //Ehemals numrule.hxx //#outline level,removed by zhaojianwei
+//const sal_uInt8 NO_INIT = 202; //Ehemals numrule.hxx
// fuer Absaetze mit NO_NUM aber auf unterschiedlichen Leveln
// DAMIT entfaellt das NO_NUM !!!!
-const BYTE NO_NUMLEVEL = 0x20; // wird mit den Levels verodert
+const sal_uInt8 NO_NUMLEVEL = 0x20; // wird mit den Levels verodert
/*
@@ -145,9 +145,9 @@ extern SwPathFinder *pPathFinder;
// multiplizieren; Ebenen 0..4 !!!)
// -> #i30312#
-const USHORT lBullIndent = 1440/4;
+const sal_uInt16 lBullIndent = 1440/4;
const short lBullFirstLineOffset = -lBullIndent;
-const USHORT lNumIndent = 1440/4;
+const sal_uInt16 lNumIndent = 1440/4;
const short lNumFirstLineOffset = -lNumIndent;
const short lOutlineMinTextDistance = 216; // 0.15 inch = 0.38 cm
// <- #i30312#
@@ -212,7 +212,7 @@ extern const sal_Char* __FAR_DATA pMarkToOLE;
#endif
-typedef USHORT SetAttrMode;
+typedef sal_uInt16 SetAttrMode;
namespace nsSetAttrMode
{
@@ -301,7 +301,7 @@ enum PrepareHint
PREP_FTN, //Fussnoten-Invalidierung
PREP_POS_CHGD, //Position des Frm hat sich verandert
//(Zum Fly-Umbruch pruefen). Im void* des Prepare()
- //wird ein BOOL& uebergeben, dieser zeigt mit TRUE,
+ //wird ein sal_Bool& uebergeben, dieser zeigt mit sal_True,
//dass ein Format ausgefuehrt wurde.
PREP_UL_SPACE, //UL-Space hat sich veraendert, TxtFrms muessen
//den Zeilenabstand neu kalkulieren.
diff --git a/sw/inc/swunohelper.hxx b/sw/inc/swunohelper.hxx
index 96ea90f5ce1d..f2623f48aa3b 100644
--- a/sw/inc/swunohelper.hxx
+++ b/sw/inc/swunohelper.hxx
@@ -50,32 +50,32 @@ sal_Int32 GetEnumAsInt32( const com::sun::star::uno::Any& rVal );
// methods for UCB actions:
// delete the file under this URL
-SW_DLLPUBLIC BOOL UCB_DeleteFile( const String& rURL );
+SW_DLLPUBLIC sal_Bool UCB_DeleteFile( const String& rURL );
// copy/move the file to a new location
-BOOL UCB_CopyFile( const String& rURL, const String& rNewURL,
- BOOL bCopyIsMove = FALSE );
+sal_Bool UCB_CopyFile( const String& rURL, const String& rNewURL,
+ sal_Bool bCopyIsMove = sal_False );
// is the URL on the current system case sentive?
-SW_DLLPUBLIC BOOL UCB_IsCaseSensitiveFileName( const String& rURL );
+SW_DLLPUBLIC sal_Bool UCB_IsCaseSensitiveFileName( const String& rURL );
// is the URL readonly?
-SW_DLLPUBLIC BOOL UCB_IsReadOnlyFileName( const String& rURL );
+SW_DLLPUBLIC sal_Bool UCB_IsReadOnlyFileName( const String& rURL );
// get a list of files from the folder of the URL
// options: pExtension = 0 -> all, else this specific extension
// pDateTime != 0 -> returns also the modified date/time of
// the files in a SvPtrarr -->
// !! objects must be deleted from the caller!!
-BOOL UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
+sal_Bool UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
const String* pExtension = 0,
SvPtrarr* pDateTimeList = 0 );
// is the URL an existing file?
-SW_DLLPUBLIC BOOL UCB_IsFile( const String& rURL );
+SW_DLLPUBLIC sal_Bool UCB_IsFile( const String& rURL );
// is the URL a existing directory?
-BOOL UCB_IsDirectory( const String& rURL );
+sal_Bool UCB_IsDirectory( const String& rURL );
}
#endif
diff --git a/sw/inc/swurl.hxx b/sw/inc/swurl.hxx
index f8b9af4d6097..07f4b0631d78 100644
--- a/sw/inc/swurl.hxx
+++ b/sw/inc/swurl.hxx
@@ -38,7 +38,7 @@ class ViewShell;
void LoadURL( const UniString& rName, ViewShell* pSh,
- USHORT nFilter = URLLOAD_NOFILTER,
+ sal_uInt16 nFilter = URLLOAD_NOFILTER,
const UniString *pTargetFrameName = 0 );
diff --git a/sw/inc/swwait.hxx b/sw/inc/swwait.hxx
index 19fb3045359c..19fb6cfb40a3 100644
--- a/sw/inc/swwait.hxx
+++ b/sw/inc/swwait.hxx
@@ -35,9 +35,9 @@ class SwDocShell;
class SW_DLLPUBLIC SwWait
{
SwDocShell &rDoc;
- BOOL bLock;
+ sal_Bool bLock;
public:
- SwWait( SwDocShell &rDocShell, BOOL bLockDispatcher );
+ SwWait( SwDocShell &rDocShell, sal_Bool bLockDispatcher );
~SwWait();
};
diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx
index fed5ab748b6f..abbb7dcf9933 100644
--- a/sw/inc/tabcol.hxx
+++ b/sw/inc/tabcol.hxx
@@ -44,8 +44,8 @@ struct SwTabColsEntry
long nPos;
long nMin;
long nMax;
- BOOL bHidden; //Fuer jeden Eintrag ein Flag, Hidden oder nicht.
- //Wenn das Flag Hidden TRUE ist liegt der Spalten-
+ sal_Bool bHidden; //Fuer jeden Eintrag ein Flag, Hidden oder nicht.
+ //Wenn das Flag Hidden sal_True ist liegt der Spalten-
//trenner nicht in der aktuellen Zeile; er muss
//mit gepflegt werden, darf aber nicht angezeigt
//werden.
@@ -72,23 +72,23 @@ class SW_DLLPUBLIC SwTabCols
const SwTabColsEntries& GetData() const { return aData; }
public:
- SwTabCols( USHORT nSize = 0 );
+ SwTabCols( sal_uInt16 nSize = 0 );
SwTabCols( const SwTabCols& );
SwTabCols &operator=( const SwTabCols& );
- BOOL operator==( const SwTabCols& rCmp ) const;
- long& operator[]( USHORT nPos ) { return aData[nPos].nPos; }
- long operator[]( USHORT nPos ) const { return aData[nPos].nPos; }
- USHORT Count() const { return sal::static_int_cast< USHORT >(aData.size()); }
+ sal_Bool operator==( const SwTabCols& rCmp ) const;
+ long& operator[]( sal_uInt16 nPos ) { return aData[nPos].nPos; }
+ long operator[]( sal_uInt16 nPos ) const { return aData[nPos].nPos; }
+ sal_uInt16 Count() const { return sal::static_int_cast< sal_uInt16 >(aData.size()); }
- BOOL IsHidden( USHORT nPos ) const { return aData[nPos].bHidden; }
- void SetHidden( USHORT nPos, BOOL bValue ) { aData[nPos].bHidden = bValue; }
+ sal_Bool IsHidden( sal_uInt16 nPos ) const { return aData[nPos].bHidden; }
+ void SetHidden( sal_uInt16 nPos, sal_Bool bValue ) { aData[nPos].bHidden = bValue; }
- void Insert( long nValue, BOOL bValue, USHORT nPos );
- void Insert( long nValue, long nMin, long nMax, BOOL bValue, USHORT nPos );
- void Remove( USHORT nPos, USHORT nAnz = 1 );
+ void Insert( long nValue, sal_Bool bValue, sal_uInt16 nPos );
+ void Insert( long nValue, long nMin, long nMax, sal_Bool bValue, sal_uInt16 nPos );
+ void Remove( sal_uInt16 nPos, sal_uInt16 nAnz = 1 );
- const SwTabColsEntry& GetEntry( USHORT nPos ) const { return aData[nPos]; }
- SwTabColsEntry& GetEntry( USHORT nPos ) { return aData[nPos]; }
+ const SwTabColsEntry& GetEntry( sal_uInt16 nPos ) const { return aData[nPos]; }
+ SwTabColsEntry& GetEntry( sal_uInt16 nPos ) { return aData[nPos]; }
long GetLeftMin() const { return nLeftMin; }
long GetLeft() const { return nLeft; }
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index fe2dd58b477d..99324909e20c 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -181,13 +181,13 @@ public:
void SetValueFormat( const String& rFmt, LanguageType eLng, LanguageType eSys )
{ sNumFmtString = rFmt; eNumFmtLanguage = eLng; eSysLanguage = eSys; }
- BOOL Load( SvStream& rStream, const SwAfVersions& rVersions, USHORT nVer );
- BOOL Save( SvStream& rStream ) const;
- BOOL SaveVerionNo( SvStream& rStream ) const;
+ sal_Bool Load( SvStream& rStream, const SwAfVersions& rVersions, sal_uInt16 nVer );
+ sal_Bool Save( SvStream& rStream ) const;
+ sal_Bool SaveVerionNo( SvStream& rStream ) const;
#ifdef READ_OLDVERS
// lade alte Version
- BOOL LoadOld( SvStream& rStream, USHORT aLoadVer[] );
+ sal_Bool LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] );
#endif
};
@@ -197,17 +197,17 @@ class SW_DLLPUBLIC SwTableAutoFmt
static SwBoxAutoFmt* pDfltBoxAutoFmt;
String aName;
- USHORT nStrResId;
+ sal_uInt16 nStrResId;
// common flags of Calc and Writer
- BOOL bInclFont : 1;
- BOOL bInclJustify : 1;
- BOOL bInclFrame : 1;
- BOOL bInclBackground : 1;
- BOOL bInclValueFormat : 1;
+ sal_Bool bInclFont : 1;
+ sal_Bool bInclJustify : 1;
+ sal_Bool bInclFrame : 1;
+ sal_Bool bInclBackground : 1;
+ sal_Bool bInclValueFormat : 1;
// Calc specific flags
- BOOL bInclWidthHeight : 1;
+ sal_Bool bInclWidthHeight : 1;
SwBoxAutoFmt* aBoxAutoFmt[ 16 ];
@@ -218,37 +218,37 @@ public:
SwTableAutoFmt& operator=( const SwTableAutoFmt& rNew );
- void SetBoxFmt( const SwBoxAutoFmt& rNew, BYTE nPos );
- const SwBoxAutoFmt& GetBoxFmt( BYTE nPos ) const;
+ void SetBoxFmt( const SwBoxAutoFmt& rNew, sal_uInt8 nPos );
+ const SwBoxAutoFmt& GetBoxFmt( sal_uInt8 nPos ) const;
void SetName( const String& rNew ) { aName = rNew; nStrResId = USHRT_MAX; }
const String& GetName() const { return aName; }
enum UpdateFlags { UPDATE_CHAR = 1, UPDATE_BOX = 2, UPDATE_ALL = 3 };
- SwBoxAutoFmt& UpdateFromSet( BYTE nPos, const SfxItemSet& rSet,
+ SwBoxAutoFmt& UpdateFromSet( sal_uInt8 nPos, const SfxItemSet& rSet,
UpdateFlags eFlags, SvNumberFormatter* );
- void UpdateToSet( BYTE nPos, SfxItemSet& rSet, UpdateFlags eFlags,
+ void UpdateToSet( sal_uInt8 nPos, SfxItemSet& rSet, UpdateFlags eFlags,
SvNumberFormatter* ) const ;
- BOOL IsFont() const { return bInclFont; }
- BOOL IsJustify() const { return bInclJustify; }
- BOOL IsFrame() const { return bInclFrame; }
- BOOL IsBackground() const { return bInclBackground; }
- BOOL IsValueFormat() const { return bInclValueFormat; }
+ sal_Bool IsFont() const { return bInclFont; }
+ sal_Bool IsJustify() const { return bInclJustify; }
+ sal_Bool IsFrame() const { return bInclFrame; }
+ sal_Bool IsBackground() const { return bInclBackground; }
+ sal_Bool IsValueFormat() const { return bInclValueFormat; }
- void SetFont( const BOOL bNew ) { bInclFont = bNew; }
- void SetJustify( const BOOL bNew ) { bInclJustify = bNew; }
- void SetFrame( const BOOL bNew ) { bInclFrame = bNew; }
- void SetBackground( const BOOL bNew ) { bInclBackground = bNew; }
- void SetValueFormat( const BOOL bNew ) { bInclValueFormat = bNew; }
- void SetWidthHeight( const BOOL bNew ) { bInclWidthHeight = bNew; }
+ void SetFont( const sal_Bool bNew ) { bInclFont = bNew; }
+ void SetJustify( const sal_Bool bNew ) { bInclJustify = bNew; }
+ void SetFrame( const sal_Bool bNew ) { bInclFrame = bNew; }
+ void SetBackground( const sal_Bool bNew ) { bInclBackground = bNew; }
+ void SetValueFormat( const sal_Bool bNew ) { bInclValueFormat = bNew; }
+ void SetWidthHeight( const sal_Bool bNew ) { bInclWidthHeight = bNew; }
- BOOL Load( SvStream& rStream, const SwAfVersions& );
- BOOL Save( SvStream& rStream ) const;
+ sal_Bool Load( SvStream& rStream, const SwAfVersions& );
+ sal_Bool Save( SvStream& rStream ) const;
#ifdef READ_OLDVERS
// lade alte Version
- BOOL LoadOld( SvStream& rStream, USHORT aLoadVer[] );
+ sal_Bool LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] );
#endif
};
@@ -257,14 +257,14 @@ SV_DECL_PTRARR_DEL( _SwTableAutoFmtTbl, SwTableAutoFmtPtr, 1, 5 )
class SW_DLLPUBLIC SwTableAutoFmtTbl : public _SwTableAutoFmtTbl
{
- SW_DLLPRIVATE BOOL Load( SvStream& rStream );
- SW_DLLPRIVATE BOOL Save( SvStream& rStream ) const;
+ SW_DLLPRIVATE sal_Bool Load( SvStream& rStream );
+ SW_DLLPRIVATE sal_Bool Save( SvStream& rStream ) const;
public:
SwTableAutoFmtTbl();
- BOOL Load();
- BOOL Save() const;
+ sal_Bool Load();
+ sal_Bool Save() const;
};
#endif
diff --git a/sw/inc/tblenum.hxx b/sw/inc/tblenum.hxx
index 66fc5756407e..e5ca58c3df78 100644
--- a/sw/inc/tblenum.hxx
+++ b/sw/inc/tblenum.hxx
@@ -28,7 +28,7 @@
#define _TBLENUM_HXX
//fuers aendern der Tabellen/Spalten/Zeilen Breiten/Hoehen
-typedef USHORT TblChgWidthHeightType;
+typedef sal_uInt16 TblChgWidthHeightType;
namespace nsTblChgWidthHeightType
{
diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
index c56068d28ed7..f284c1597ed9 100644
--- a/sw/inc/tblsel.hxx
+++ b/sw/inc/tblsel.hxx
@@ -55,7 +55,7 @@ SV_DECL_PTRARR_SORT( SwSelBoxes, SwTableBoxPtr, 10, 20 )
//erweitert.
//Die Boxen werden ueber das Layout zusammengsucht, es wird auch bei
//aufgespaltenen Tabellen korrekt gearbeitet (siehe: MakeSelUnions()).
-typedef USHORT SwTblSearchType;
+typedef sal_uInt16 SwTblSearchType;
namespace nsSwTblSearchType
{
const SwTblSearchType TBLSEARCH_NONE = 0x1; // keine Erweiterung
@@ -84,22 +84,22 @@ void GetTblSelCrs( const SwCrsrShell& rShell, SwSelBoxes& rBoxes );
void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes );
// suche fuer eine AutoSumme die beteiligten Boxen zusammen
-BOOL GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
+sal_Bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
// check if the SelBoxes contains protected Boxes
-BOOL HasProtectedCells( const SwSelBoxes& rBoxes );
+sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes );
// teste, ob die Selektion ausgeglichen ist
SV_DECL_PTRARR( SwChartBoxes, SwTableBoxPtr, 16, 16)
SV_DECL_PTRARR_DEL( SwChartLines, SwChartBoxes*, 25, 50)
-BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
+sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
SwChartLines* pGetCLines = 0 );
// teste ob die Celle in die SSelection gehoert
// (wurde eine Funktion, damit GetTblSel() und MakeTblCrsr() immer
// das "gleiche Verstaendnis" fuer die Selektion haben)
-BOOL IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell );
+sal_Bool IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell );
// bestimme die Boxen, die zusammen gefasst werden sollen.
// Dabei wird auf Layout Basis das Rechteck "angepasst". D.H. es
@@ -110,16 +110,16 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwTableBox** ppMergeBox, SwUndoTblMerge* pUndo = 0 );
// teste ob die selektierten Boxen ein gueltiges Merge erlauben
-USHORT CheckMergeSel( const SwPaM& rPam );
-USHORT CheckMergeSel( const SwSelBoxes& rBoxes );
+sal_uInt16 CheckMergeSel( const SwPaM& rPam );
+sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes );
-BOOL IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam );
+sal_Bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam );
// teste ob ein Split oder InsertCol dazu fuehrt, das eine Box
// kleiner als MINLAY wird.
-BOOL CheckSplitCells( const SwCrsrShell& rShell, USHORT nDiv,
+sal_Bool CheckSplitCells( const SwCrsrShell& rShell, sal_uInt16 nDiv,
const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
-BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv,
+sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv,
const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
//Fuer das Arbeiten auf TabSelektion auch fuer aufgespaltene Tabellen.
@@ -183,9 +183,9 @@ public:
void SetTableLines( const SwTable &rTable );
void DelFrms ( SwTable &rTable );
void MakeFrms( SwTable &rTable );
- void MakeNewFrms( SwTable &rTable, const USHORT nNumber,
- const BOOL bBehind );
- BOOL AreLinesToRestore( const SwTable &rTable ) const;
+ void MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber,
+ const sal_Bool bBehind );
+ sal_Bool AreLinesToRestore( const SwTable &rTable ) const;
void ClearLineBehind() { pLineBehind = 0; }
};
@@ -223,8 +223,8 @@ struct _FndPara
: rBoxes(rPara.rBoxes), pFndLine(pFL), pFndBox(rPara.pFndBox) {}
};
-BOOL _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara );
-SW_DLLPUBLIC BOOL _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara );
+sal_Bool _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara );
+SW_DLLPUBLIC sal_Bool _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara );
#endif // _TBLSEL_HXX
diff --git a/sw/inc/tgrditem.hxx b/sw/inc/tgrditem.hxx
index ca9ba7fd6db9..267aeacb7793 100644
--- a/sw/inc/tgrditem.hxx
+++ b/sw/inc/tgrditem.hxx
@@ -43,14 +43,14 @@ class SW_DLLPUBLIC SwTextGridItem : public SfxPoolItem
sal_uInt16 nLines;
sal_uInt16 nBaseHeight, nRubyHeight;
SwTextGrid eGridType;
- BOOL bRubyTextBelow;
- BOOL bPrintGrid;
- BOOL bDisplayGrid;
+ sal_Bool bRubyTextBelow;
+ sal_Bool bPrintGrid;
+ sal_Bool bDisplayGrid;
//for textgrid enhancement
sal_uInt16 nBaseWidth;
- BOOL bSnapToChars;
- BOOL bSquaredMode;
+ sal_Bool bSnapToChars;
+ sal_Bool bSquaredMode;
public:
SwTextGridItem();
virtual ~SwTextGridItem();
@@ -63,8 +63,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 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 );
SwTextGridItem& operator=( const SwTextGridItem& );
@@ -83,37 +83,37 @@ public:
SwTextGrid GetGridType() const { return eGridType; }
void SetGridType( SwTextGrid eNew ) { eGridType = eNew; }
- BOOL IsRubyTextBelow() const { return bRubyTextBelow; }
- BOOL GetRubyTextBelow() const { return bRubyTextBelow; }
- void SetRubyTextBelow( BOOL bNew ) { bRubyTextBelow = bNew; }
+ sal_Bool IsRubyTextBelow() const { return bRubyTextBelow; }
+ sal_Bool GetRubyTextBelow() const { return bRubyTextBelow; }
+ void SetRubyTextBelow( sal_Bool bNew ) { bRubyTextBelow = bNew; }
- BOOL IsPrintGrid() const { return bPrintGrid; }
- BOOL GetPrintGrid() const { return bPrintGrid; }
- void SetPrintGrid( BOOL bNew ) { bPrintGrid = bNew; }
+ sal_Bool IsPrintGrid() const { return bPrintGrid; }
+ sal_Bool GetPrintGrid() const { return bPrintGrid; }
+ void SetPrintGrid( sal_Bool bNew ) { bPrintGrid = bNew; }
- BOOL IsDisplayGrid() const { return bDisplayGrid; }
- BOOL GetDisplayGrid() const { return bDisplayGrid; }
- void SetDisplayGrid( BOOL bNew ) { bDisplayGrid = bNew; }
+ sal_Bool IsDisplayGrid() const { return bDisplayGrid; }
+ sal_Bool GetDisplayGrid() const { return bDisplayGrid; }
+ void SetDisplayGrid( sal_Bool bNew ) { bDisplayGrid = bNew; }
//for textgrid enhancement
sal_uInt16 GetBaseWidth() const { return nBaseWidth;}
void SetBaseWidth( sal_uInt16 nNew ) { nBaseWidth = nNew; }
- BOOL IsSnapToChars() const { return bSnapToChars; }
- BOOL GetSnapToChars() const { return bSnapToChars; }
- void SetSnapToChars( BOOL bNew ) { bSnapToChars = bNew; }
+ sal_Bool IsSnapToChars() const { return bSnapToChars; }
+ sal_Bool GetSnapToChars() const { return bSnapToChars; }
+ void SetSnapToChars( sal_Bool bNew ) { bSnapToChars = bNew; }
- BOOL IsSquaredMode() const { return bSquaredMode; }
- BOOL GetSquaredMode() const { return bSquaredMode; }
- void SetSquaredMode( BOOL bNew ) { bSquaredMode = bNew; }
- void SwitchPaperMode(BOOL bNew );
+ sal_Bool IsSquaredMode() const { return bSquaredMode; }
+ sal_Bool GetSquaredMode() const { return bSquaredMode; }
+ void SetSquaredMode( sal_Bool bNew ) { bSquaredMode = bNew; }
+ void SwitchPaperMode(sal_Bool bNew );
void Init();
};
-inline const SwTextGridItem &SwAttrSet::GetTextGrid(BOOL bInP) const
+inline const SwTextGridItem &SwAttrSet::GetTextGrid(sal_Bool bInP) const
{ return (const SwTextGridItem&)Get( RES_TEXTGRID, bInP ); }
-inline const SwTextGridItem &SwFmt::GetTextGrid(BOOL bInP) const
+inline const SwTextGridItem &SwFmt::GetTextGrid(sal_Bool bInP) const
{ return (const SwTextGridItem&)aSet.Get( RES_TEXTGRID, bInP ); }
#endif
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index fea15cfafb82..f8bdb12f113b 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -62,8 +62,8 @@ SV_DECL_PTRARR(SwTOXMarks, SwTOXMark*, 0, 10)
Description: Entry of content index, alphabetical index or user defined index
--------------------------------------------------------------------*/
-#define IVER_TOXMARK_STRPOOL ((USHORT)1)
-#define IVER_TOXMARK_NEWTOX ((USHORT)2)
+#define IVER_TOXMARK_STRPOOL ((sal_uInt16)1)
+#define IVER_TOXMARK_NEWTOX ((sal_uInt16)2)
class SW_DLLPUBLIC SwTOXMark
: public SfxPoolItem
@@ -82,9 +82,9 @@ class SW_DLLPUBLIC SwTOXMark
SwTxtTOXMark* pTxtAttr;
- USHORT nLevel;
- BOOL bAutoGenerated : 1; // generated using a concordance file
- BOOL bMainEntry : 1; // main entry emphasized by character style
+ sal_uInt16 nLevel;
+ sal_Bool bAutoGenerated : 1; // generated using a concordance file
+ sal_Bool bMainEntry : 1; // main entry emphasized by character style
::com::sun::star::uno::WeakReference<
::com::sun::star::text::XDocumentIndexMark> m_wXDocumentIndexMark;
@@ -112,14 +112,14 @@ public:
String GetText() const;
- inline BOOL IsAlternativeText() const;
+ inline sal_Bool IsAlternativeText() const;
inline const String& GetAlternativeText() const;
inline void SetAlternativeText( const String& rAlt );
// content or user defined index
- inline void SetLevel(USHORT nLevel);
- inline USHORT GetLevel() const;
+ inline void SetLevel(sal_uInt16 nLevel);
+ inline sal_uInt16 GetLevel() const;
// for alphabetical index only
inline void SetPrimaryKey(const String& rStr );
@@ -134,11 +134,11 @@ public:
inline const String& GetPrimaryKeyReading() const;
inline const String& GetSecondaryKeyReading() const;
- BOOL IsAutoGenerated() const {return bAutoGenerated;}
- void SetAutoGenerated(BOOL bSet) {bAutoGenerated = bSet;}
+ sal_Bool IsAutoGenerated() const {return bAutoGenerated;}
+ void SetAutoGenerated(sal_Bool bSet) {bAutoGenerated = bSet;}
- BOOL IsMainEntry() const {return bMainEntry;}
- void SetMainEntry(BOOL bSet) { bMainEntry = bSet;}
+ sal_Bool IsMainEntry() const {return bMainEntry;}
+ void SetMainEntry(sal_Bool bSet) { bMainEntry = bSet;}
inline const SwTOXType* GetTOXType() const;
@@ -224,13 +224,13 @@ struct SW_DLLPUBLIC SwFormToken
String sCharStyleName;
SwTwips nTabStopPosition;
FormTokenType eTokenType;
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
SvxTabAdjust eTabAlign;
- USHORT nChapterFormat; //SwChapterFormat;
- USHORT nOutlineLevel;//the maximum permitted outline level in numbering
- USHORT nAuthorityField; //enum ToxAuthorityField
+ sal_uInt16 nChapterFormat; //SwChapterFormat;
+ sal_uInt16 nOutlineLevel;//the maximum permitted outline level in numbering
+ sal_uInt16 nAuthorityField; //enum ToxAuthorityField
sal_Unicode cTabFillChar;
- sal_Bool bWithTab; // TRUE: do generate tab
+ sal_Bool bWithTab; // sal_True: do generate tab
// character only the tab stop
// #i21237#
@@ -256,8 +256,8 @@ struct SW_DLLPUBLIC SwFormToken
@param _eType the type to check for
@param rToken the token to check
- @retval TRUE the token has the given type
- @retval FALSE else
+ @retval sal_True the token has the given type
+ @retval sal_False else
*/
struct SwFormTokenEqualToFormTokenType
{
@@ -361,13 +361,13 @@ class SW_DLLPUBLIC SwForm
String aTemplate[ AUTH_TYPE_END + 1 ];
TOXTypes eType;
- USHORT nFormMaxLevel;
+ sal_uInt16 nFormMaxLevel;
- //USHORT nFirstTabPos; -> Value in tab token
-// BOOL bHasFirstTabPos : 1;
- BOOL bGenerateTabPos : 1;
- BOOL bIsRelTabPos : 1;
- BOOL bCommaSeparated : 1;
+ //sal_uInt16 nFirstTabPos; -> Value in tab token
+// sal_Bool bHasFirstTabPos : 1;
+ sal_Bool bGenerateTabPos : 1;
+ sal_Bool bIsRelTabPos : 1;
+ sal_Bool bCommaSeparated : 1;
public:
SwForm( TOXTypes eTOXType = TOX_CONTENT );
@@ -375,57 +375,57 @@ public:
SwForm& operator=( const SwForm& rForm );
- inline void SetTemplate(USHORT nLevel, const String& rName);
- inline const String& GetTemplate(USHORT nLevel) const;
+ inline void SetTemplate(sal_uInt16 nLevel, const String& rName);
+ inline const String& GetTemplate(sal_uInt16 nLevel) const;
// #i21237#
- void SetPattern(USHORT nLevel, const SwFormTokens& rName);
- void SetPattern(USHORT nLevel, const String& rStr);
- const SwFormTokens& GetPattern(USHORT nLevel) const;
+ void SetPattern(sal_uInt16 nLevel, const SwFormTokens& rName);
+ void SetPattern(sal_uInt16 nLevel, const String& rStr);
+ const SwFormTokens& GetPattern(sal_uInt16 nLevel) const;
// fill tab stop positions from template to pattern
// #i21237#
void AdjustTabStops(SwDoc& rDoc,
- BOOL bInsertNewTabStops = FALSE);
+ sal_Bool bInsertNewTabStops = sal_False);
inline TOXTypes GetTOXType() const;
- inline USHORT GetFormMax() const;
+ inline sal_uInt16 GetFormMax() const;
- BOOL IsRelTabPos() const { return bIsRelTabPos; }
- void SetRelTabPos( BOOL b ) { bIsRelTabPos = b; }
+ sal_Bool IsRelTabPos() const { return bIsRelTabPos; }
+ void SetRelTabPos( sal_Bool b ) { bIsRelTabPos = b; }
- BOOL IsCommaSeparated() const { return bCommaSeparated;}
- void SetCommaSeparated( BOOL b) { bCommaSeparated = b;}
+ sal_Bool IsCommaSeparated() const { return bCommaSeparated;}
+ void SetCommaSeparated( sal_Bool b) { bCommaSeparated = b;}
- static USHORT GetFormMaxLevel( TOXTypes eType );
+ static sal_uInt16 GetFormMaxLevel( TOXTypes eType );
static const sal_Char* aFormEntry; // <E>
- static BYTE nFormEntryLen; // 3 characters
+ static sal_uInt8 nFormEntryLen; // 3 characters
static const sal_Char* aFormTab; // <T>
- static BYTE nFormTabLen; // 3 characters
+ static sal_uInt8 nFormTabLen; // 3 characters
static const sal_Char* aFormPageNums; // <P>
- static BYTE nFormPageNumsLen; // 3 characters
+ static sal_uInt8 nFormPageNumsLen; // 3 characters
static const sal_Char* aFormLinkStt; // <LS>
- static BYTE nFormLinkSttLen; // 4 characters
+ static sal_uInt8 nFormLinkSttLen; // 4 characters
static const sal_Char* aFormLinkEnd; // <LE>
- static BYTE nFormLinkEndLen; // 4 characters
+ static sal_uInt8 nFormLinkEndLen; // 4 characters
static const sal_Char* aFormEntryNum; // <E#>
- static BYTE nFormEntryNumLen; // 4 characters
+ static sal_uInt8 nFormEntryNumLen; // 4 characters
static const sal_Char* aFormEntryTxt; // <ET>
- static BYTE nFormEntryTxtLen; // 4 characters
+ static sal_uInt8 nFormEntryTxtLen; // 4 characters
static const sal_Char* aFormChapterMark; // <C>
- static BYTE nFormChapterMarkLen; // 3 characters
+ static sal_uInt8 nFormChapterMarkLen; // 3 characters
static const sal_Char* aFormText; // <TX>
- static BYTE nFormTextLen; // 4 characters
+ static sal_uInt8 nFormTextLen; // 4 characters
static const sal_Char* aFormAuth; // <Axx> xx - decimal enum value
- static BYTE nFormAuthLen; // 3 characters
+ static sal_uInt8 nFormAuthLen; // 3 characters
};
/*--------------------------------------------------------------------
Description: Content to create indexes of
--------------------------------------------------------------------*/
-typedef USHORT SwTOXElement;
+typedef sal_uInt16 SwTOXElement;
namespace nsSwTOXElement
{
const SwTOXElement TOX_MARK = 1;
@@ -438,7 +438,7 @@ namespace nsSwTOXElement
const SwTOXElement TOX_SEQUENCE = 128;
}
-typedef USHORT SwTOIOptions;
+typedef sal_uInt16 SwTOIOptions;
namespace nsSwTOIOptions
{
const SwTOIOptions TOI_SAME_ENTRY = 1;
@@ -458,7 +458,7 @@ enum SwCaptionDisplay
CAPTION_TEXT
};
-typedef USHORT SwTOOElements;
+typedef sal_uInt16 SwTOOElements;
namespace nsSwTOOElements
{
const SwTOOElements TOO_MATH = 0x01;
@@ -490,25 +490,25 @@ class SW_DLLPUBLIC SwTOXBase : public SwClient
String sSortAlgorithm;
union {
- USHORT nLevel; // consider outline levels
- USHORT nOptions; // options of alphabetical index
+ sal_uInt16 nLevel; // consider outline levels
+ sal_uInt16 nOptions; // options of alphabetical index
} aData;
- USHORT nCreateType; // sources to create the index from
- USHORT nOLEOptions; // OLE sources
+ sal_uInt16 nCreateType; // sources to create the index from
+ sal_uInt16 nOLEOptions; // OLE sources
SwCaptionDisplay eCaptionDisplay; //
- BOOL bProtected : 1; // index protected ?
- BOOL bFromChapter : 1; // create from chapter or document
- BOOL bFromObjectNames : 1; // create a table or object index
+ sal_Bool bProtected : 1; // index protected ?
+ sal_Bool bFromChapter : 1; // create from chapter or document
+ sal_Bool bFromObjectNames : 1; // create a table or object index
// from the names rather than the caption
- BOOL bLevelFromChapter : 1; // User index: get the level from the source chapter
+ sal_Bool bLevelFromChapter : 1; // User index: get the level from the source chapter
public:
SwTOXBase( const SwTOXType* pTyp, const SwForm& rForm,
- USHORT nCreaType, const String& rTitle );
+ sal_uInt16 nCreaType, const String& rTitle );
SwTOXBase( const SwTOXBase& rCopy, SwDoc* pDoc = 0 );
virtual ~SwTOXBase();
- virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
// a kind of CopyCtor - check if the TOXBase is at TOXType of the doc.
// If not, so create it an copy all other used things. The return is this
@@ -516,7 +516,7 @@ public:
const SwTOXType* GetTOXType() const; //
- USHORT GetCreateType() const; // creation types
+ sal_uInt16 GetCreateType() const; // creation types
const String& GetTOXName() const {return aName;}
void SetTOXName(const String& rSet) {aName = rSet;}
@@ -525,7 +525,7 @@ public:
const String& GetTypeName() const; // Name
const SwForm& GetTOXForm() const; // description of the lines
- void SetCreate(USHORT);
+ void SetCreate(sal_uInt16);
void SetTitle(const String& rTitle);
void SetTOXForm(const SwForm& rForm);
@@ -535,43 +535,43 @@ public:
void SetMainEntryCharStyle(const String& rSet) {sMainEntryCharStyle = rSet;}
// content index only
- inline void SetLevel(USHORT); // consider outline level
- inline USHORT GetLevel() const;
+ inline void SetLevel(sal_uInt16); // consider outline level
+ inline sal_uInt16 GetLevel() const;
// alphabetical index only
- inline USHORT GetOptions() const; // alphabetical index options
- inline void SetOptions(USHORT nOpt);
+ inline sal_uInt16 GetOptions() const; // alphabetical index options
+ inline void SetOptions(sal_uInt16 nOpt);
// index of objects
- USHORT GetOLEOptions() const {return nOLEOptions;}
- void SetOLEOptions(USHORT nOpt) {nOLEOptions = nOpt;}
+ sal_uInt16 GetOLEOptions() const {return nOLEOptions;}
+ void SetOLEOptions(sal_uInt16 nOpt) {nOLEOptions = nOpt;}
// index of objects
// user defined index only
inline void SetTemplateName(const String& rName); // Absatzlayout beachten
- const String& GetStyleNames(USHORT nLevel) const
+ const String& GetStyleNames(sal_uInt16 nLevel) const
{
DBG_ASSERT( nLevel < MAXLEVEL, "Which level?");
return aStyleNames[nLevel];
}
- void SetStyleNames(const String& rSet, USHORT nLevel)
+ void SetStyleNames(const String& rSet, sal_uInt16 nLevel)
{
DBG_ASSERT( nLevel < MAXLEVEL, "Which level?");
aStyleNames[nLevel] = rSet;
}
- BOOL IsFromChapter() const { return bFromChapter;}
- void SetFromChapter(BOOL bSet) { bFromChapter = bSet;}
+ sal_Bool IsFromChapter() const { return bFromChapter;}
+ void SetFromChapter(sal_Bool bSet) { bFromChapter = bSet;}
- BOOL IsFromObjectNames() const {return bFromObjectNames;}
- void SetFromObjectNames(BOOL bSet) {bFromObjectNames = bSet;}
+ sal_Bool IsFromObjectNames() const {return bFromObjectNames;}
+ void SetFromObjectNames(sal_Bool bSet) {bFromObjectNames = bSet;}
- BOOL IsLevelFromChapter() const {return bLevelFromChapter;}
- void SetLevelFromChapter(BOOL bSet) {bLevelFromChapter = bSet;}
+ sal_Bool IsLevelFromChapter() const {return bLevelFromChapter;}
+ void SetLevelFromChapter(sal_Bool bSet) {bLevelFromChapter = bSet;}
- BOOL IsProtected() const { return bProtected; }
- void SetProtected(BOOL bSet) { bProtected = bSet; }
+ sal_Bool IsProtected() const { return bProtected; }
+ void SetProtected(sal_Bool bSet) { bProtected = bSet; }
const String& GetSequenceName() const {return sSequenceName;}
void SetSequenceName(const String& rSet) {sSequenceName = rSet;}
@@ -579,7 +579,7 @@ public:
SwCaptionDisplay GetCaptionDisplay() const { return eCaptionDisplay;}
void SetCaptionDisplay(SwCaptionDisplay eSet) {eCaptionDisplay = eSet;}
- BOOL IsTOXBaseInReadonly() const;
+ sal_Bool IsTOXBaseInReadonly() const;
const SfxItemSet* GetAttrSet() const;
void SetAttrSet( const SfxItemSet& );
@@ -590,7 +590,7 @@ public:
const String& GetSortAlgorithm()const {return sSortAlgorithm;}
void SetSortAlgorithm(const String& rSet) {sSortAlgorithm = rSet;}
// #i21237#
- void AdjustTabStops(SwDoc & rDoc, BOOL bDefaultRightTabStop);
+ void AdjustTabStops(SwDoc & rDoc, sal_Bool bDefaultRightTabStop);
SwTOXBase& operator=(const SwTOXBase& rSource);
};
@@ -608,7 +608,7 @@ inline const String& SwTOXMark::GetAlternativeText() const
inline const SwTOXType* SwTOXMark::GetTOXType() const
{ return (SwTOXType*)GetRegisteredIn(); }
-inline BOOL SwTOXMark::IsAlternativeText() const
+inline sal_Bool SwTOXMark::IsAlternativeText() const
{ return aAltText.Len() > 0; }
inline void SwTOXMark::SetAlternativeText(const String& rAlt)
@@ -616,7 +616,7 @@ inline void SwTOXMark::SetAlternativeText(const String& rAlt)
aAltText = rAlt;
}
-inline void SwTOXMark::SetLevel( USHORT nLvl )
+inline void SwTOXMark::SetLevel( sal_uInt16 nLvl )
{
ASSERT( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
nLevel = nLvl;
@@ -652,7 +652,7 @@ inline void SwTOXMark::SetSecondaryKeyReading( const String& rKey )
aSecondaryKeyReading = rKey;
}
-inline USHORT SwTOXMark::GetLevel() const
+inline sal_uInt16 SwTOXMark::GetLevel() const
{
ASSERT( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
return nLevel;
@@ -691,13 +691,13 @@ inline const String& SwTOXMark::GetSecondaryKeyReading() const
//
//SwForm
//
-inline void SwForm::SetTemplate(USHORT nLevel, const String& rTemplate)
+inline void SwForm::SetTemplate(sal_uInt16 nLevel, const String& rTemplate)
{
ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
aTemplate[nLevel] = rTemplate;
}
-inline const String& SwForm::GetTemplate(USHORT nLevel) const
+inline const String& SwForm::GetTemplate(sal_uInt16 nLevel) const
{
ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
return aTemplate[nLevel];
@@ -708,7 +708,7 @@ inline TOXTypes SwForm::GetTOXType() const
return eType;
}
-inline USHORT SwForm::GetFormMax() const
+inline sal_uInt16 SwForm::GetFormMax() const
{
return nFormMaxLevel;
}
@@ -729,7 +729,7 @@ inline TOXTypes SwTOXType::GetType() const
inline const SwTOXType* SwTOXBase::GetTOXType() const
{ return (SwTOXType*)GetRegisteredIn(); }
-inline USHORT SwTOXBase::GetCreateType() const
+inline sal_uInt16 SwTOXBase::GetCreateType() const
{ return nCreateType; }
inline const String& SwTOXBase::GetTitle() const
@@ -741,12 +741,12 @@ inline const String& SwTOXBase::GetTypeName() const
inline const SwForm& SwTOXBase::GetTOXForm() const
{ return aForm; }
-inline void SwTOXBase::AdjustTabStops(SwDoc & rDoc, BOOL bDefaultRightTabStop)
+inline void SwTOXBase::AdjustTabStops(SwDoc & rDoc, sal_Bool bDefaultRightTabStop)
{
aForm.AdjustTabStops(rDoc, bDefaultRightTabStop);
}
-inline void SwTOXBase::SetCreate(USHORT nCreate)
+inline void SwTOXBase::SetCreate(sal_uInt16 nCreate)
{ nCreateType = nCreate; }
inline void SwTOXBase::SetTOXForm(const SwForm& rForm)
@@ -755,13 +755,13 @@ inline void SwTOXBase::SetTOXForm(const SwForm& rForm)
inline TOXTypes SwTOXBase::GetType() const
{ return GetTOXType()->GetType(); }
-inline void SwTOXBase::SetLevel(USHORT nLev)
+inline void SwTOXBase::SetLevel(sal_uInt16 nLev)
{
ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
aData.nLevel = nLev;
}
-inline USHORT SwTOXBase::GetLevel() const
+inline sal_uInt16 SwTOXBase::GetLevel() const
{
ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
return aData.nLevel;
@@ -777,13 +777,13 @@ inline void SwTOXBase::SetTemplateName(const String& rName)
}
-inline USHORT SwTOXBase::GetOptions() const
+inline sal_uInt16 SwTOXBase::GetOptions() const
{
ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
return aData.nOptions;
}
-inline void SwTOXBase::SetOptions(USHORT nOpt)
+inline void SwTOXBase::SetOptions(sal_uInt16 nOpt)
{
ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
aData.nOptions = nOpt;
diff --git a/sw/inc/toxwrap.hxx b/sw/inc/toxwrap.hxx
index 2d14cb0fad29..f38cd15c877c 100644
--- a/sw/inc/toxwrap.hxx
+++ b/sw/inc/toxwrap.hxx
@@ -60,7 +60,7 @@ public:
String GetIndexKey( const String& rTxt, const String& rTxtReading,
const STAR_NMSPC::lang::Locale& rLocale ) const;
- String GetFollowingText( BOOL bMorePages ) const;
+ String GetFollowingText( sal_Bool bMorePages ) const;
STAR_NMSPC::uno::Sequence< ::rtl::OUString >
GetAlgorithmList( const STAR_NMSPC::lang::Locale& rLcl ) const;
diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
index 8bdf77ad34fd..4829b1bcb012 100644
--- a/sw/inc/txatbase.hxx
+++ b/sw/inc/txatbase.hxx
@@ -106,7 +106,7 @@ public:
inline const SfxPoolItem& GetAttr() const;
inline SfxPoolItem& GetAttr();
- inline USHORT Which() const { return GetAttr().Which(); }
+ inline sal_uInt16 Which() const { return GetAttr().Which(); }
virtual int operator==( const SwTxtAttr& ) const;
@@ -129,7 +129,7 @@ protected:
xub_StrLen m_nEnd;
public:
- SwTxtAttrEnd( SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd );
+ SwTxtAttrEnd( SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
using SwTxtAttr::GetEnd;
virtual xub_StrLen* GetEnd();
diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx
index da63c0c64b5a..6c6b354a7b59 100644
--- a/sw/inc/txatritr.hxx
+++ b/sw/inc/txatritr.hxx
@@ -72,7 +72,7 @@ class SwTxtAttrIterator
void SearchNextChg();
public:
- SwTxtAttrIterator( const SwTxtNode& rTxtNd, USHORT nWhichId,
+ SwTxtAttrIterator( const SwTxtNode& rTxtNd, sal_uInt16 nWhichId,
xub_StrLen nStart = 0, sal_Bool bUseGetWhichOfScript = sal_True );
sal_Bool Next();
@@ -86,7 +86,7 @@ class SwLanguageIterator : public SwTxtAttrIterator
{
public:
SwLanguageIterator( const SwTxtNode& rTxtNode, xub_StrLen nStart = 0,
- USHORT nWhich = RES_CHRATR_LANGUAGE,
+ sal_uInt16 nWhich = RES_CHRATR_LANGUAGE,
sal_Bool bUseGetWhichOfScript = sal_True )
: SwTxtAttrIterator( rTxtNode, nWhich, nStart, bUseGetWhichOfScript )
{}
diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx
index 65ecd951868c..f074a8696fdf 100644
--- a/sw/inc/txtatr.hxx
+++ b/sw/inc/txtatr.hxx
@@ -39,7 +39,7 @@ class SwCharFmt;
class SwTxtCharFmt : public SwTxtAttrEnd
{
SwTxtNode * m_pTxtNode;
- USHORT m_nSortNumber;
+ sal_uInt16 m_nSortNumber;
public:
SwTxtCharFmt( SwFmtCharFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
@@ -47,13 +47,13 @@ public:
// werden vom SwFmtCharFmt hierher weitergeleitet
virtual void Modify( SfxPoolItem*, SfxPoolItem* ); // SwClient
- virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
// get and set TxtNode pointer
void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
- void SetSortNumber( USHORT nSortNumber ) { m_nSortNumber = nSortNumber; }
- USHORT GetSortNumber() const { return m_nSortNumber; }
+ void SetSortNumber( sal_uInt16 nSortNumber ) { m_nSortNumber = nSortNumber; }
+ sal_uInt16 GetSortNumber() const { return m_nSortNumber; }
};
@@ -95,7 +95,7 @@ public:
TYPEINFO();
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
- virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
/// get and set TxtNode pointer
const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
index 07043a9263bc..4f19924172ef 100644
--- a/sw/inc/txtftn.hxx
+++ b/sw/inc/txtftn.hxx
@@ -40,15 +40,15 @@ class SW_DLLPUBLIC SwTxtFtn : public SwTxtAttr
{
SwNodeIndex * m_pStartNode;
SwTxtNode * m_pTxtNode;
- USHORT m_nSeqNo;
+ sal_uInt16 m_nSeqNo;
public:
SwTxtFtn( SwFmtFtn& rAttr, xub_StrLen nStart );
virtual ~SwTxtFtn();
inline SwNodeIndex *GetStartNode() const { return m_pStartNode; }
- void SetStartNode( const SwNodeIndex *pNode, BOOL bDelNodes = TRUE );
- void SetNumber( const USHORT nNumber, const String* = 0 );
+ void SetStartNode( const SwNodeIndex *pNode, sal_Bool bDelNodes = sal_True );
+ void SetNumber( const sal_uInt16 nNumber, const String* = 0 );
void CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const;
// get and set TxtNode pointer
@@ -64,9 +64,9 @@ public:
void CheckCondColl();
// fuer die Querverweise auf Fussnoten
- USHORT SetSeqRefNo();
- void SetSeqNo( USHORT n ) { m_nSeqNo = n; } // for Readers
- USHORT GetSeqRefNo() const { return m_nSeqNo; }
+ sal_uInt16 SetSeqRefNo();
+ void SetSeqNo( sal_uInt16 n ) { m_nSeqNo = n; } // for Readers
+ sal_uInt16 GetSeqRefNo() const { return m_nSeqNo; }
static void SetUniqueSeqRefNo( SwDoc& rDoc );
};
diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx
index 8e0d66df654e..62d48320bf06 100644
--- a/sw/inc/txtinet.hxx
+++ b/sw/inc/txtinet.hxx
@@ -51,7 +51,7 @@ public:
TYPEINFO();
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
- virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
// get and set TxtNode pointer
const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
@@ -68,7 +68,7 @@ public:
bool IsVisitedValid() const { return m_bVisitedValid; }
void SetVisitedValid( bool bNew ) { m_bVisitedValid = bNew; }
- BOOL IsProtect() const;
+ sal_Bool IsProtect() const;
};
inline const SwTxtNode& SwTxtINetFmt::GetTxtNode() const
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index 7f16e4e4d44c..31c34407f57d 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -125,21 +125,21 @@ SV_DECL_PTRARR_DEL( SwRedlineSaveDatas, SwRedlineSaveDataPtr, 8, 8 )
class SwUndo
{
SwUndoId nId;
- USHORT nOrigRedlineMode;
+ sal_uInt16 nOrigRedlineMode;
protected:
bool bCacheComment;
mutable String * pComment;
- void RemoveIdxFromSection( SwDoc&, ULONG nSttIdx, ULONG* pEndIdx = 0 );
- void RemoveIdxFromRange( SwPaM& rPam, BOOL bMoveNext );
- void RemoveIdxRel( ULONG, const SwPosition& );
+ void RemoveIdxFromSection( SwDoc&, sal_uLong nSttIdx, sal_uLong* pEndIdx = 0 );
+ void RemoveIdxFromRange( SwPaM& rPam, sal_Bool bMoveNext );
+ void RemoveIdxRel( sal_uLong, const SwPosition& );
void SetId( SwUndoId nNew ) { nId = nNew; }
- static BOOL CanRedlineGroup( SwRedlineSaveDatas& rCurr,
+ static sal_Bool CanRedlineGroup( SwRedlineSaveDatas& rCurr,
const SwRedlineSaveDatas& rCheck,
- BOOL bCurrIsEnd );
+ sal_Bool bCurrIsEnd );
// #111827#
/**
@@ -172,20 +172,20 @@ public:
// das UndoObject merkt sich, welcher Mode eingeschaltet war.
// In Undo/Redo/Repeat wird dann immer auf diesen zurueck geschaltet
- USHORT GetRedlineMode() const { return nOrigRedlineMode; }
- void SetRedlineMode( USHORT eMode ) { nOrigRedlineMode = eMode; }
+ sal_uInt16 GetRedlineMode() const { return nOrigRedlineMode; }
+ void SetRedlineMode( sal_uInt16 eMode ) { nOrigRedlineMode = eMode; }
bool IsDelBox() const;
// sicher und setze die RedlineDaten
- static BOOL FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
- BOOL bDelRange = TRUE, BOOL bCopyNext = TRUE );
- static BOOL FillSaveDataForFmt( const SwPaM& , SwRedlineSaveDatas& );
+ static sal_Bool FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
+ sal_Bool bDelRange = sal_True, sal_Bool bCopyNext = sal_True );
+ static sal_Bool FillSaveDataForFmt( const SwPaM& , SwRedlineSaveDatas& );
static void SetSaveData( SwDoc& rDoc, const SwRedlineSaveDatas& rSData );
- static BOOL HasHiddenRedlines( const SwRedlineSaveDatas& rSData );
+ static sal_Bool HasHiddenRedlines( const SwRedlineSaveDatas& rSData );
};
-typedef USHORT DelCntntType;
+typedef sal_uInt16 DelCntntType;
namespace nsDelCntntType
{
const DelCntntType DELCNT_FTN = 0x01;
@@ -217,17 +217,17 @@ protected:
// MoveFrom.. verschiebt aus dem UndoNodesArray in das NodesArray
void MoveToUndoNds( SwPaM& rPam,
SwNodeIndex* pNodeIdx = 0, SwIndex* pCntIdx = 0,
- ULONG* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 );
- void MoveFromUndoNds( SwDoc& rDoc, ULONG nNodeIdx, xub_StrLen nCntntIdx,
+ sal_uLong* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 );
+ void MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx, xub_StrLen nCntntIdx,
SwPosition& rInsPos,
- ULONG* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 );
+ sal_uLong* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 );
// diese beiden Methoden bewegen den SPoint vom Pam zurueck/vor. Damit
// kann fuer ein Undo/Redo ein Bereich aufgespannt werden. (Der
// SPoint liegt dann vor dem manipuliertem Bereich !!)
// Das Flag gibt an, ob noch vorm SPoint Inhalt steht.
- BOOL MovePtBackward( SwPaM& rPam );
- void MovePtForward( SwPaM& rPam, BOOL bMvBkwrd );
+ sal_Bool MovePtBackward( SwPaM& rPam );
+ void MovePtForward( SwPaM& rPam, sal_Bool bMvBkwrd );
// vor dem Move ins UndoNodes-Array muss dafuer gesorgt werden, das
// die Inhaltstragenden Attribute aus dem Nodes-Array entfernt werden.
@@ -245,12 +245,12 @@ class SwUndoSaveSection : private SwUndoSaveCntnt
{
SwNodeIndex *pMvStt;
SwRedlineSaveDatas* pRedlSaveData;
- ULONG nMvLen; // Index ins UndoNodes-Array
- ULONG nStartPos;
+ sal_uLong nMvLen; // Index ins UndoNodes-Array
+ sal_uLong nStartPos;
protected:
SwNodeIndex* GetMvSttIdx() const { return pMvStt; }
- ULONG GetMvNodeCnt() const { return nMvLen; }
+ sal_uLong GetMvNodeCnt() const { return nMvLen; }
public:
SwUndoSaveSection();
@@ -258,7 +258,7 @@ public:
void SaveSection( SwDoc* pDoc, const SwNodeIndex& rSttIdx );
void SaveSection( SwDoc* pDoc, const SwNodeRange& rRange );
- void RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx, USHORT nSectType );
+ void RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx, sal_uInt16 nSectType );
void RestoreSection( SwDoc* pDoc, const SwNodeIndex& rInsPos );
const SwHistory* GetHistory() const { return pHistory; }
@@ -266,20 +266,20 @@ public:
};
-// Diese Klasse speichert den Pam als USHORT's und kann diese wieder zu
+// Diese Klasse speichert den Pam als sal_uInt16's und kann diese wieder zu
// einem PaM zusammensetzen
class SwUndRng
{
public:
- ULONG nSttNode, nEndNode;
+ sal_uLong nSttNode, nEndNode;
xub_StrLen nSttCntnt, nEndCntnt;
SwUndRng();
SwUndRng( const SwPaM& );
void SetValues( const SwPaM& rPam );
- void SetPaM( SwPaM&, BOOL bCorrToCntnt = FALSE ) const;
- void SetPaM( SwUndoIter&, BOOL bCorrToCntnt = FALSE ) const;
+ void SetPaM( SwPaM&, sal_Bool bCorrToCntnt = sal_False ) const;
+ void SetPaM( SwUndoIter&, sal_Bool bCorrToCntnt = sal_False ) const;
};
@@ -290,7 +290,7 @@ class SwUndoStart: public SwUndo
// GetUserId() erfragt werden.
SwUndoId nUserId;
// fuer die "Verpointerung" von Start- und End-Undos
- USHORT nEndOffset;
+ sal_uInt16 nEndOffset;
SwRewriter mRewriter;
@@ -309,8 +309,8 @@ public:
virtual SwUndoId GetEffectiveId() const;
SwUndoId GetUserId() const { return nUserId; }
// Setzen vom End-Undo-Offset geschieht im Doc::EndUndo
- USHORT GetEndOffset() const { return nEndOffset; }
- void SetEndOffset( USHORT n ) { nEndOffset = n; }
+ sal_uInt16 GetEndOffset() const { return nEndOffset; }
+ void SetEndOffset( sal_uInt16 n ) { nEndOffset = n; }
};
class SwUndoEnd: public SwUndo
@@ -320,7 +320,7 @@ class SwUndoEnd: public SwUndo
// GetUserId() erfragt werden.
SwUndoId nUserId;
// fuer die "Verpointerung" von Start- und End-Undos
- USHORT nSttOffset;
+ sal_uInt16 nSttOffset;
SwRewriter mRewriter;
@@ -340,8 +340,8 @@ public:
SwUndoId GetUserId() const { return nUserId; }
// Setzen vom Start-Undo-Offset geschieht im Doc::EndUndo
- void SetSttOffset(USHORT _nSttOffSet) { nSttOffset = _nSttOffSet; }
- USHORT GetSttOffset() const { return nSttOffset; }
+ void SetSttOffset(sal_uInt16 _nSttOffSet) { nSttOffset = _nSttOffSet; }
+ sal_uInt16 GetSttOffset() const { return nSttOffset; }
};
class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt
@@ -349,16 +349,16 @@ class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt
SwPosition *pPos; // Inhalt fuers Redo
String *pTxt, *pUndoTxt;
SwRedlineData* pRedlData;
- ULONG nNode;
+ sal_uLong nNode;
xub_StrLen nCntnt, nLen;
- BOOL bIsWordDelim : 1;
- BOOL bIsAppend : 1;
+ sal_Bool bIsWordDelim : 1;
+ sal_Bool bIsAppend : 1;
const IDocumentContentOperations::InsertFlags m_nInsertFlags;
friend class SwDoc; // eigentlich nur SwDoc::Insert( String )
- BOOL CanGrouping( sal_Unicode cIns );
- BOOL CanGrouping( const SwPosition& rPos );
+ sal_Bool CanGrouping( sal_Unicode cIns );
+ sal_Bool CanGrouping( const SwPosition& rPos );
SwDoc * pDoc;
@@ -368,7 +368,7 @@ class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt
public:
SwUndoInsert( const SwNodeIndex& rNode, xub_StrLen nCntnt, xub_StrLen nLen,
const IDocumentContentOperations::InsertFlags nInsertFlags,
- BOOL bWDelim = TRUE );
+ sal_Bool bWDelim = sal_True );
SwUndoInsert( const SwNodeIndex& rNode );
virtual ~SwUndoInsert();
@@ -406,25 +406,25 @@ class SwUndoDelete: public SwUndo, private SwUndRng, private SwUndoSaveCntnt
String sTableName;
- ULONG nNode;
- ULONG nNdDiff; // Differenz von Nodes vor-nach Delete
- ULONG nSectDiff; // Diff. von Nodes vor/nach Move mit SectionNodes
- ULONG nReplaceDummy; // Diff. to a temporary dummy object
- USHORT nSetPos;
-
- BOOL bGroup : 1; // TRUE: ist schon eine Gruppe; wird in CanGrouping() ausgwertet !!
- BOOL bBackSp : 1; // TRUE: wenn Gruppierung und der Inhalt davor geloescht wird
- BOOL bJoinNext: 1; // TRUE: wenn der Bereich von Oben nach unten geht
- BOOL bTblDelLastNd : 1; // TRUE: TextNode hinter der Tabelle einf./loeschen
- BOOL bDelFullPara : 1; // TRUE: gesamte Nodes wurden geloescht
- BOOL bResetPgDesc : 1; // TRUE: am nachfolgenden Node das PgDsc zuruecksetzen
- BOOL bResetPgBrk : 1; // TRUE: am nachfolgenden Node das PgBreak zuruecksetzen
- BOOL bFromTableCopy : 1; // TRUE: called by SwUndoTblCpyTbl
-
- BOOL SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
+ sal_uLong nNode;
+ sal_uLong nNdDiff; // Differenz von Nodes vor-nach Delete
+ sal_uLong nSectDiff; // Diff. von Nodes vor/nach Move mit SectionNodes
+ sal_uLong nReplaceDummy; // Diff. to a temporary dummy object
+ sal_uInt16 nSetPos;
+
+ sal_Bool bGroup : 1; // sal_True: ist schon eine Gruppe; wird in CanGrouping() ausgwertet !!
+ sal_Bool bBackSp : 1; // sal_True: wenn Gruppierung und der Inhalt davor geloescht wird
+ sal_Bool bJoinNext: 1; // sal_True: wenn der Bereich von Oben nach unten geht
+ sal_Bool bTblDelLastNd : 1; // sal_True: TextNode hinter der Tabelle einf./loeschen
+ sal_Bool bDelFullPara : 1; // sal_True: gesamte Nodes wurden geloescht
+ sal_Bool bResetPgDesc : 1; // sal_True: am nachfolgenden Node das PgDsc zuruecksetzen
+ sal_Bool bResetPgBrk : 1; // sal_True: am nachfolgenden Node das PgBreak zuruecksetzen
+ sal_Bool bFromTableCopy : 1; // sal_True: called by SwUndoTblCpyTbl
+
+ sal_Bool SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
SwTxtNode* pSttTxtNd, SwTxtNode* pEndTxtNd );
public:
- SwUndoDelete( SwPaM&, BOOL bFullPara = FALSE, BOOL bCalledByTblCpy = FALSE );
+ SwUndoDelete( SwPaM&, sal_Bool bFullPara = sal_False, sal_Bool bCalledByTblCpy = sal_False );
virtual ~SwUndoDelete();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
@@ -444,12 +444,12 @@ public:
*/
virtual SwRewriter GetRewriter() const;
- BOOL CanGrouping( SwDoc*, const SwPaM& );
+ sal_Bool CanGrouping( SwDoc*, const SwPaM& );
- void SetTblDelLastNd() { bTblDelLastNd = TRUE; }
+ void SetTblDelLastNd() { bTblDelLastNd = sal_True; }
// fuer die PageDesc/PageBreak Attribute einer Tabelle
- void SetPgBrkFlags( BOOL bPageBreak, BOOL bPageDesc )
+ void SetPgBrkFlags( sal_Bool bPageBreak, sal_Bool bPageDesc )
{ bResetPgDesc = bPageDesc; bResetPgBrk = bPageBreak; }
void SetTableName(const String & rName);
@@ -457,7 +457,7 @@ public:
// SwUndoTblCpyTbl needs this information:
long NodeDiff() const { return nSttNode - nEndNode; }
xub_StrLen ContentStart() const { return nSttCntnt; }
- BOOL IsDelFullPara() const { return bDelFullPara; }
+ sal_Bool IsDelFullPara() const { return bDelFullPara; }
DECL_FIXEDMEMPOOL_NEWDEL(SwUndoDelete)
};
@@ -467,10 +467,10 @@ class SwUndoOverwrite: public SwUndo, private SwUndoSaveCntnt
{
String aDelStr, aInsStr;
SwRedlineSaveDatas* pRedlSaveData;
- ULONG nSttNode;
+ sal_uLong nSttNode;
xub_StrLen nSttCntnt;
- BOOL bInsChar : 1; // kein Overwrite mehr; sondern Insert
- BOOL bGroup : 1; // TRUE: ist schon eine Gruppe; wird in
+ sal_Bool bInsChar : 1; // kein Overwrite mehr; sondern Insert
+ sal_Bool bGroup : 1; // sal_True: ist schon eine Gruppe; wird in
// CanGrouping() ausgwertet !!
public:
SwUndoOverwrite( SwDoc*, SwPosition&, sal_Unicode cIns );
@@ -493,7 +493,7 @@ public:
*/
virtual SwRewriter GetRewriter() const;
- BOOL CanGrouping( SwDoc*, SwPosition&, sal_Unicode cIns );
+ sal_Bool CanGrouping( SwDoc*, SwPosition&, sal_Unicode cIns );
};
@@ -501,17 +501,17 @@ class SwUndoSplitNode: public SwUndo
{
SwHistory* pHistory;
SwRedlineData* pRedlData;
- ULONG nNode;
+ sal_uLong nNode;
xub_StrLen nCntnt;
- BOOL bTblFlag : 1;
- BOOL bChkTblStt : 1;
+ sal_Bool bTblFlag : 1;
+ sal_Bool bChkTblStt : 1;
public:
- SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos, BOOL bChkTbl );
+ SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos, sal_Bool bChkTbl );
virtual ~SwUndoSplitNode();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- void SetTblFlag() { bTblFlag = TRUE; }
+ void SetTblFlag() { bTblFlag = sal_True; }
};
@@ -520,12 +520,12 @@ class SwUndoMove : public SwUndo, private SwUndRng, private SwUndoSaveCntnt
// nDest.. - Bereich, in den verschoben wurde (nach dem Move!)
// nIns.. - Position, von der verschoben wurde und wieder die neue InsPos. ist
// nMv.. Position auf die verschoben wird (vor dem Move!) ; fuers REDO
- ULONG nDestSttNode, nDestEndNode, nInsPosNode, nMvDestNode;
+ sal_uLong nDestSttNode, nDestEndNode, nInsPosNode, nMvDestNode;
xub_StrLen nDestSttCntnt, nDestEndCntnt, nInsPosCntnt, nMvDestCntnt;
- USHORT nFtnStt; // StartPos der Fussnoten in der History
+ sal_uInt16 nFtnStt; // StartPos der Fussnoten in der History
- BOOL bJoinNext : 1,
+ sal_Bool bJoinNext : 1,
bJoinPrev : 1,
bMoveRange : 1;
@@ -538,13 +538,13 @@ public:
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
// setze den Destination-Bereich nach dem Verschieben.
- void SetDestRange( const SwPaM&, const SwPosition&, BOOL, BOOL );
+ void SetDestRange( const SwPaM&, const SwPosition&, sal_Bool, sal_Bool );
void SetDestRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd,
const SwNodeIndex& rInsPos );
- BOOL IsMoveRange() const { return bMoveRange; }
- ULONG GetEndNode() const { return nEndNode; }
- ULONG GetDestSttNode() const { return nDestSttNode; }
+ sal_Bool IsMoveRange() const { return bMoveRange; }
+ sal_uLong GetEndNode() const { return nEndNode; }
+ sal_uLong GetDestSttNode() const { return nDestSttNode; }
xub_StrLen GetDestSttCntnt() const { return nDestSttCntnt; }
void SetMoveRedlines( bool b ) { bMoveRedlines = b; }
@@ -558,7 +558,7 @@ class SwUndoAttr : public SwUndo, private SwUndRng
const ::std::auto_ptr<SwHistory> m_pHistory; // History for Undo
::std::auto_ptr<SwRedlineData> m_pRedlineData; // Redlining
::std::auto_ptr<SwRedlineSaveDatas> m_pRedlineSaveData;
- ULONG m_nNodeIndex; // Offset: for Redlining
+ sal_uLong m_nNodeIndex; // Offset: for Redlining
const SetAttrMode m_nInsertFlags; // insert flags
void RemoveIdx( SwDoc& rDoc );
@@ -570,7 +570,7 @@ public:
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- void SaveRedlineData( const SwPaM& rPam, BOOL bInsCntnt );
+ void SaveRedlineData( const SwPaM& rPam, sal_Bool bInsCntnt );
SwHistory& GetHistory() { return *m_pHistory; }
@@ -580,11 +580,11 @@ class SwUndoResetAttr : public SwUndo, private SwUndRng
{
const ::std::auto_ptr<SwHistory> m_pHistory;
SvUShortsSort m_Ids;
- const USHORT m_nFormatId; // Format-Id for Redo
+ const sal_uInt16 m_nFormatId; // Format-Id for Redo
public:
- SwUndoResetAttr( const SwPaM&, USHORT nFmtId );
- SwUndoResetAttr( const SwPosition&, USHORT nFmtId );
+ SwUndoResetAttr( const SwPaM&, sal_uInt16 nFmtId );
+ SwUndoResetAttr( const SwPosition&, sal_uInt16 nFmtId );
virtual ~SwUndoResetAttr();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
@@ -600,8 +600,8 @@ class SwUndoFmtAttr : public SwUndo
friend class SwUndoDefaultAttr;
SwFmt * m_pFmt;
::std::auto_ptr<SfxItemSet> m_pOldSet; // old attributes
- ULONG m_nNodeIndex;
- const USHORT m_nFmtWhich;
+ sal_uLong m_nNodeIndex;
+ const sal_uInt16 m_nFmtWhich;
const bool m_bSaveDrawPt;
bool IsFmtInDoc( SwDoc* ); //is the attribute format still in the Doc?
@@ -647,7 +647,7 @@ class SwUndoFmtResetAttr : public SwUndo
{
public:
SwUndoFmtResetAttr( SwFmt& rChangedFormat,
- const USHORT nWhichId );
+ const sal_uInt16 nWhichId );
~SwUndoFmtResetAttr();
virtual void Undo( SwUndoIter& );
@@ -657,7 +657,7 @@ class SwUndoFmtResetAttr : public SwUndo
// format at which a certain attribute is reset.
SwFmt * const m_pChangedFormat;
// which ID of the reset attribute
- const USHORT m_nWhichId;
+ const sal_uInt16 m_nWhichId;
// old attribute which has been reset - needed for undo.
::std::auto_ptr<SfxPoolItem> m_pOldItem;
};
@@ -665,7 +665,7 @@ class SwUndoFmtResetAttr : public SwUndo
class SwUndoDontExpandFmt : public SwUndo
{
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
const xub_StrLen m_nContentIndex;
public:
@@ -744,7 +744,7 @@ class SwUndoMoveLeftMargin : public SwUndo, private SwUndRng
const bool m_bModulus;
public:
- SwUndoMoveLeftMargin( const SwPaM&, BOOL bRight, BOOL bModulus );
+ SwUndoMoveLeftMargin( const SwPaM&, sal_Bool bRight, sal_Bool bModulus );
virtual ~SwUndoMoveLeftMargin();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
@@ -761,11 +761,11 @@ class SwUndoInserts : public SwUndo, public SwUndRng, private SwUndoSaveCntnt
SvPtrarr* pFrmFmts;
SwUndos* pFlyUndos;
SwRedlineData* pRedlData;
- BOOL bSttWasTxtNd;
+ sal_Bool bSttWasTxtNd;
protected:
- ULONG nNdDiff;
+ sal_uLong nNdDiff;
SwPosition *pPos; // Inhalt fuers Redo
- USHORT nSetPos; // Start in der History-Liste
+ sal_uInt16 nSetPos; // Start in der History-Liste
SwUndoInserts( SwUndoId nUndoId, const SwPaM& );
public:
@@ -775,8 +775,8 @@ public:
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
// setze den Destination-Bereich nach dem Einlesen.
- void SetInsertRange( const SwPaM&, BOOL bScanFlys = TRUE,
- BOOL bSttWasTxtNd = TRUE );
+ void SetInsertRange( const SwPaM&, sal_Bool bScanFlys = sal_True,
+ sal_Bool bSttWasTxtNd = sal_True );
};
class SwUndoInsDoc : public SwUndoInserts
@@ -799,13 +799,13 @@ class SwUndoInsTbl : public SwUndo
SvUShorts* pColWidth;
SwRedlineData* pRedlData;
SwTableAutoFmt* pAutoFmt;
- ULONG nSttNode;
- USHORT nRows, nCols;
- USHORT nAdjust;
+ sal_uLong nSttNode;
+ sal_uInt16 nRows, nCols;
+ sal_uInt16 nAdjust;
public:
- SwUndoInsTbl( const SwPosition&, USHORT nCols, USHORT nRows,
- USHORT eAdjust, const SwInsertTableOptions& rInsTblOpts,
+ SwUndoInsTbl( const SwPosition&, sal_uInt16 nCols, sal_uInt16 nRows,
+ sal_uInt16 eAdjust, const SwInsertTableOptions& rInsTblOpts,
const SwTableAutoFmt* pTAFmt, const SvUShorts* pColArr,
const String & rName);
virtual ~SwUndoInsTbl();
@@ -825,11 +825,11 @@ class SwUndoTxtToTbl : public SwUndo, public SwUndRng
SwTableAutoFmt* pAutoFmt;
SwHistory* pHistory;
sal_Unicode cTrenner;
- USHORT nAdjust;
- BOOL bSplitEnd : 1;
+ sal_uInt16 nAdjust;
+ sal_Bool bSplitEnd : 1;
public:
- SwUndoTxtToTbl( const SwPaM&, const SwInsertTableOptions&, sal_Unicode , USHORT,
+ SwUndoTxtToTbl( const SwPaM&, const SwInsertTableOptions&, sal_Unicode , sal_uInt16,
const SwTableAutoFmt* pAFmt );
virtual ~SwUndoTxtToTbl();
@@ -848,11 +848,11 @@ class SwUndoTblToTxt : public SwUndo
_SaveTable* pTblSave;
SwTblToTxtSaves* pBoxSaves;
SwHistory* pHistory;
- ULONG nSttNd, nEndNd;
- USHORT nAdjust;
+ sal_uLong nSttNd, nEndNd;
+ sal_uInt16 nAdjust;
sal_Unicode cTrenner;
- USHORT nHdlnRpt;
- BOOL bCheckNumFmt : 1;
+ sal_uInt16 nHdlnRpt;
+ sal_Bool bCheckNumFmt : 1;
public:
SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh );
@@ -862,17 +862,17 @@ public:
virtual void Repeat( SwUndoIter& );
void SetRange( const SwNodeRange& );
- void AddBoxPos( SwDoc& rDoc, ULONG nNdIdx, ULONG nEndIdx,
+ void AddBoxPos( SwDoc& rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx,
xub_StrLen nCntntIdx = STRING_MAXLEN);
};
class SwUndoAttrTbl : public SwUndo
{
- ULONG nSttNode;
+ sal_uLong nSttNode;
_SaveTable* pSaveTbl;
- BOOL bClearTabCol : 1;
+ sal_Bool bClearTabCol : 1;
public:
- SwUndoAttrTbl( const SwTableNode& rTblNd, BOOL bClearTabCols = FALSE );
+ SwUndoAttrTbl( const SwTableNode& rTblNd, sal_Bool bClearTabCols = sal_False );
virtual ~SwUndoAttrTbl();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
@@ -880,12 +880,12 @@ public:
class SwUndoTblAutoFmt : public SwUndo
{
- ULONG nSttNode;
+ sal_uLong nSttNode;
_SaveTable* pSaveTbl;
SwUndos* pUndos;
- BOOL bSaveCntntAttr;
+ sal_Bool bSaveCntntAttr;
- void UndoRedo( BOOL bUndo, SwUndoIter& rUndoIter );
+ void UndoRedo( sal_Bool bUndo, SwUndoIter& rUndoIter );
public:
SwUndoTblAutoFmt( const SwTableNode& rTblNd, const SwTableAutoFmt& );
@@ -906,16 +906,16 @@ class SwUndoTblNdsChg : public SwUndo
} Ptrs;
SvBools aMvBoxes; // fuers SplitRow (aufgeteilte Nodes einer Box)
long nMin, nMax; // for redo of delete column
- ULONG nSttNode, nCurrBox;
- USHORT nCount, nRelDiff, nAbsDiff, nSetColType;
- BOOL bFlag;
- BOOL bSameHeight; // only used for SplitRow
+ sal_uLong nSttNode, nCurrBox;
+ sal_uInt16 nCount, nRelDiff, nAbsDiff, nSetColType;
+ sal_Bool bFlag;
+ sal_Bool bSameHeight; // only used for SplitRow
public:
SwUndoTblNdsChg( SwUndoId UndoId,
const SwSelBoxes& rBoxes,
const SwTableNode& rTblNd,
long nMn, long nMx,
- USHORT nCnt, BOOL bFlg, BOOL bSameHeight );
+ sal_uInt16 nCnt, sal_Bool bFlg, sal_Bool bSameHeight );
// fuer SetColWidth
SwUndoTblNdsChg( SwUndoId UndoId, const SwSelBoxes& rBoxes,
@@ -932,21 +932,21 @@ public:
void ReNewBoxes( const SwSelBoxes& rBoxes );
- void SetColWidthParam( ULONG nBoxIdx, USHORT nMode, USHORT nType,
+ void SetColWidthParam( sal_uLong nBoxIdx, sal_uInt16 nMode, sal_uInt16 nType,
SwTwips nAbsDif, SwTwips nRelDif )
{
nCurrBox = nBoxIdx;
nCount = nMode;
nSetColType = nType;
- nAbsDiff = (USHORT)nAbsDif;
- nRelDiff = (USHORT)nRelDif;
+ nAbsDiff = (sal_uInt16)nAbsDif;
+ nRelDiff = (sal_uInt16)nRelDif;
}
};
class SwUndoTblMerge : public SwUndo, private SwUndRng
{
- ULONG nTblNode;
+ sal_uLong nTblNode;
_SaveTable* pSaveTbl;
SvULongs aBoxes, aNewSttNds;
SwUndoMoves* pMoves;
@@ -962,7 +962,7 @@ public:
void SetSelBoxes( const SwSelBoxes& rBoxes );
- void AddNewBox( ULONG nSttNdIdx )
+ void AddNewBox( sal_uLong nSttNdIdx )
{ aNewSttNds.Insert( nSttNdIdx, aNewSttNds.Count() ); }
void SaveCollection( const SwTableBox& rBox );
@@ -976,14 +976,14 @@ class SwUndoTblNumFmt : public SwUndo
SwHistory* pHistory;
String aStr, aNewFml;
- ULONG nFmtIdx, nNewFmtIdx;
+ sal_uLong nFmtIdx, nNewFmtIdx;
double fNum, fNewNum;
- ULONG nNode;
- ULONG nNdPos;
+ sal_uLong nNode;
+ sal_uLong nNdPos;
- BOOL bNewFmt : 1;
- BOOL bNewFml : 1;
- BOOL bNewValue : 1;
+ sal_Bool bNewFmt : 1;
+ sal_Bool bNewFml : 1;
+ sal_Bool bNewValue : 1;
public:
SwUndoTblNumFmt( const SwTableBox& rBox, const SfxItemSet* pNewSet = 0 );
@@ -991,7 +991,7 @@ public:
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
- void SetNumFmt( ULONG nNewNumFmtIdx, const double& rNewNumber )
+ void SetNumFmt( sal_uLong nNewNumFmtIdx, const double& rNewNumber )
{ nFmtIdx = nNewNumFmtIdx; fNum = rNewNumber; }
void SetBox( const SwTableBox& rBox );
};
@@ -1013,42 +1013,42 @@ public:
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
- void AddBoxBefore( const SwTableBox& rBox, BOOL bDelCntnt );
- void AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx, BOOL bDelCntnt );
+ void AddBoxBefore( const SwTableBox& rBox, sal_Bool bDelCntnt );
+ void AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx, sal_Bool bDelCntnt );
- BOOL IsEmpty() const;
- BOOL InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, USHORT nCnt );
+ sal_Bool IsEmpty() const;
+ sal_Bool InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, sal_uInt16 nCnt );
};
class SwUndoCpyTbl : public SwUndo
{
SwUndoDelete* pDel;
- ULONG nTblNode;
+ sal_uLong nTblNode;
public:
SwUndoCpyTbl();
virtual ~SwUndoCpyTbl();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
- void SetTableSttIdx( ULONG nIdx ) { nTblNode = nIdx; }
+ void SetTableSttIdx( sal_uLong nIdx ) { nTblNode = nIdx; }
};
class SwUndoSplitTbl : public SwUndo
{
- ULONG nTblNode, nOffset;
+ sal_uLong nTblNode, nOffset;
SwSaveRowSpan* mpSaveRowSpan; // stores the row span values at the splitting row
_SaveTable* pSavTbl;
SwHistory* pHistory;
- USHORT nMode, nFmlEnd;
- BOOL bCalcNewSize;
+ sal_uInt16 nMode, nFmlEnd;
+ sal_Bool bCalcNewSize;
public:
- SwUndoSplitTbl( const SwTableNode& rTblNd, SwSaveRowSpan* pRowSp, USHORT nMode, BOOL bCalcNewSize );
+ SwUndoSplitTbl( const SwTableNode& rTblNd, SwSaveRowSpan* pRowSp, sal_uInt16 nMode, sal_Bool bCalcNewSize );
virtual ~SwUndoSplitTbl();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- void SetTblNodeOffset( ULONG nIdx ) { nOffset = nIdx - nTblNode; }
+ void SetTblNodeOffset( sal_uLong nIdx ) { nOffset = nIdx - nTblNode; }
SwHistory* GetHistory() { return pHistory; }
void SaveFormula( SwHistory& rHistory );
};
@@ -1056,14 +1056,14 @@ public:
class SwUndoMergeTbl : public SwUndo
{
String aName;
- ULONG nTblNode;
+ sal_uLong nTblNode;
_SaveTable* pSavTbl, *pSavHdl;
SwHistory* pHistory;
- USHORT nMode;
- BOOL bWithPrev;
+ sal_uInt16 nMode;
+ sal_Bool bWithPrev;
public:
SwUndoMergeTbl( const SwTableNode& rTblNd, const SwTableNode& rDelTblNd,
- BOOL bWithPrev, USHORT nMode );
+ sal_Bool bWithPrev, sal_uInt16 nMode );
virtual ~SwUndoMergeTbl();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
@@ -1120,8 +1120,8 @@ struct SwSortUndoElement
{
union {
struct {
- ULONG nKenn;
- ULONG nSource, nTarget;
+ sal_uLong nKenn;
+ sal_uLong nSource, nTarget;
} TXT;
struct {
String *pSource, *pTarget;
@@ -1133,7 +1133,7 @@ struct SwSortUndoElement
SORT_TXT_TBL.TBL.pSource = new String( aS );
SORT_TXT_TBL.TBL.pTarget = new String( aT );
}
- SwSortUndoElement( ULONG nS, ULONG nT )
+ SwSortUndoElement( sal_uLong nS, sal_uLong nT )
{
SORT_TXT_TBL.TXT.nSource = nS;
SORT_TXT_TBL.TXT.nTarget = nT;
@@ -1151,13 +1151,13 @@ class SwUndoSort : public SwUndo, private SwUndRng
SwSortList aSortList;
SwUndoAttrTbl* pUndoTblAttr;
SwRedlineData* pRedlData;
- ULONG nTblNd;
+ sal_uLong nTblNd;
void RemoveIdx( SwPaM& rPam );
public:
SwUndoSort( const SwPaM&, const SwSortOptions& );
- SwUndoSort( ULONG nStt, ULONG nEnd, const SwTableNode&,
- const SwSortOptions&, BOOL bSaveTable );
+ SwUndoSort( sal_uLong nStt, sal_uLong nEnd, const SwTableNode&,
+ const SwSortOptions&, sal_Bool bSaveTable );
virtual ~SwUndoSort();
virtual void Undo( SwUndoIter& );
@@ -1165,7 +1165,7 @@ public:
virtual void Repeat( SwUndoIter& );
void Insert( const String& rOrgPos, const String& rNewPos );
- void Insert( ULONG nOrgPos, ULONG nNewPos );
+ void Insert( sal_uLong nOrgPos, sal_uLong nNewPos );
};
@@ -1177,18 +1177,18 @@ class SwUndoFlyBase : public SwUndo, private SwUndoSaveSection
{
protected:
SwFrmFmt* pFrmFmt; // das gespeicherte FlyFormat
- ULONG nNdPgPos;
+ sal_uLong nNdPgPos;
xub_StrLen nCntPos; // Seite/am Absatz/im Absatz
- USHORT nRndId;
- BOOL bDelFmt; // loesche das gespeicherte Format
+ sal_uInt16 nRndId;
+ sal_Bool bDelFmt; // loesche das gespeicherte Format
- void InsFly( SwUndoIter&, BOOL bShowSel = TRUE );
+ void InsFly( SwUndoIter&, sal_Bool bShowSel = sal_True );
void DelFly( SwDoc* );
SwUndoFlyBase( SwFrmFmt* pFormat, SwUndoId nUndoId );
SwNodeIndex* GetMvSttIdx() const { return SwUndoSaveSection::GetMvSttIdx(); }
- ULONG GetMvNodeCnt() const { return SwUndoSaveSection::GetMvNodeCnt(); }
+ sal_uLong GetMvNodeCnt() const { return SwUndoSaveSection::GetMvNodeCnt(); }
public:
virtual ~SwUndoFlyBase();
@@ -1200,10 +1200,10 @@ public:
class SwUndoInsLayFmt : public SwUndoFlyBase
{
- ULONG mnCrsrSaveIndexPara; // Cursor position
+ sal_uLong mnCrsrSaveIndexPara; // Cursor position
xub_StrLen mnCrsrSaveIndexPos; // for undo
public:
- SwUndoInsLayFmt( SwFrmFmt* pFormat, ULONG nNodeIdx, xub_StrLen nCntIdx );
+ SwUndoInsLayFmt( SwFrmFmt* pFormat, sal_uLong nNodeIdx, xub_StrLen nCntIdx );
~SwUndoInsLayFmt();
virtual void Undo( SwUndoIter& );
@@ -1216,7 +1216,7 @@ public:
class SwUndoDelLayFmt : public SwUndoFlyBase
{
- BOOL bShowSelFrm;
+ sal_Bool bShowSelFrm;
public:
SwUndoDelLayFmt( SwFrmFmt* pFormat );
@@ -1224,7 +1224,7 @@ public:
virtual void Redo( SwUndoIter& );
void Redo(); // Schnittstelle fuers Rollback
- void ChgShowSel( BOOL bNew ) { bShowSelFrm = bNew; }
+ void ChgShowSel( sal_Bool bNew ) { bShowSelFrm = bNew; }
virtual SwRewriter GetRewriter() const;
@@ -1237,14 +1237,14 @@ class SwUndoSetFlyFmt : public SwUndo, public SwClient
SwFrmFmt* pOldFmt; // die alte Fly Vorlage
SwFrmFmt* pNewFmt; // die neue Fly Vorlage
SfxItemSet* pItemSet; // die zurueck-/ gesetzten Attribute
- ULONG nOldNode, nNewNode;
+ sal_uLong nOldNode, nNewNode;
xub_StrLen nOldCntnt, nNewCntnt;
- USHORT nOldAnchorTyp, nNewAnchorTyp;
- BOOL bAnchorChgd;
+ sal_uInt16 nOldAnchorTyp, nNewAnchorTyp;
+ sal_Bool bAnchorChgd;
- void PutAttr( USHORT nWhich, const SfxPoolItem* pItem );
+ void PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem );
void Modify( SfxPoolItem*, SfxPoolItem* );
- void GetAnchor( SwFmtAnchor& rAnhor, ULONG nNode, xub_StrLen nCntnt );
+ void GetAnchor( SwFmtAnchor& rAnhor, sal_uLong nNode, xub_StrLen nCntnt );
public:
SwUndoSetFlyFmt( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFrmFmt );
@@ -1265,8 +1265,8 @@ class SwUndoReplace : public SwUndo
{
friend class SwDoc;
- BOOL bOldIterFlag; // Status vom Undo-Iter vorm 1. Aufruf
- USHORT nAktPos; // fuer GetUndoRange und Undo/Redo
+ sal_Bool bOldIterFlag; // Status vom Undo-Iter vorm 1. Aufruf
+ sal_uInt16 nAktPos; // fuer GetUndoRange und Undo/Redo
_UnReplaceDatas aArr;
SwRedlineData* pRedlData;
@@ -1298,10 +1298,10 @@ public:
*/
virtual SwRewriter GetRewriter() const;
- void AddEntry( const SwPaM& rPam, const String& rInsert, BOOL bRegExp );
+ void AddEntry( const SwPaM& rPam, const String& rInsert, sal_Bool bRegExp );
void SetEntryEnd( const SwPaM& rPam );
- BOOL IsFull() const
+ sal_Bool IsFull() const
{ return ((USHRT_MAX / sizeof( void* )) - 50 ) < aArr.Count(); }
};
@@ -1312,11 +1312,11 @@ public:
class SwUndoTblHeadline : public SwUndo
{
- ULONG nTblNd;
- USHORT nOldHeadline;
- USHORT nNewHeadline;
+ sal_uLong nTblNd;
+ sal_uInt16 nOldHeadline;
+ sal_uInt16 nNewHeadline;
public:
- SwUndoTblHeadline( const SwTable&, USHORT nOldHdl, USHORT nNewHdl );
+ SwUndoTblHeadline( const SwTable&, sal_uInt16 nOldHdl, sal_uInt16 nNewHdl );
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
@@ -1333,12 +1333,12 @@ private:
const ::std::auto_ptr<SfxItemSet> m_pAttrSet;
::std::auto_ptr<SwHistory> m_pHistory;
::std::auto_ptr<SwRedlineData> m_pRedlData;
- ULONG m_nSectionNodePos;
+ sal_uLong m_nSectionNodePos;
bool m_bSplitAtStart : 1;
bool m_bSplitAtEnd : 1;
bool m_bUpdateFtn : 1;
- void Join( SwDoc& rDoc, ULONG nNode );
+ void Join( SwDoc& rDoc, sal_uLong nNode );
public:
SwUndoInsSection(SwPaM const&, SwSectionData const&,
@@ -1348,7 +1348,7 @@ public:
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- void SetSectNdPos(ULONG const nPos) { m_nSectionNodePos = nPos; }
+ void SetSectNdPos(sal_uLong const nPos) { m_nSectionNodePos = nPos; }
void SaveSplitNode(SwTxtNode *const pTxtNd, bool const bAtStart);
void SetUpdtFtnFlag(bool const bFlag) { m_bUpdateFtn = bFlag; }
};
@@ -1392,10 +1392,10 @@ class SwUndoInsNum : public SwUndo, private SwUndRng
{
SwNumRule aNumRule;
SwHistory* pHistory;
- ULONG nSttSet;
+ sal_uLong nSttSet;
SwNumRule* pOldNumRule;
String sReplaceRule;
- USHORT nLRSavePos;
+ sal_uInt16 nLRSavePos;
public:
SwUndoInsNum( const SwPaM& rPam, const SwNumRule& rRule );
SwUndoInsNum( const SwNumRule& rOldRule, const SwNumRule& rNewRule,
@@ -1409,7 +1409,7 @@ public:
virtual SwRewriter GetRewriter() const;
SwHistory* GetHistory(); // wird ggfs. neu angelegt!
- void SetSttNum( ULONG nNdIdx ) { nSttSet = nNdIdx; }
+ void SetSttNum( sal_uLong nNdIdx ) { nSttSet = nNdIdx; }
void SaveOldNumRule( const SwNumRule& rOld );
void SetLRSpaceEndPos();
@@ -1429,21 +1429,21 @@ public:
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- void AddNode( const SwTxtNode& rNd, BOOL bResetLRSpace );
+ void AddNode( const SwTxtNode& rNd, sal_Bool bResetLRSpace );
SwHistory* GetHistory() { return pHistory; }
};
class SwUndoMoveNum : public SwUndo, private SwUndRng
{
- ULONG nNewStt;
+ sal_uLong nNewStt;
long nOffset;
public:
- SwUndoMoveNum( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv = FALSE );
+ SwUndoMoveNum( const SwPaM& rPam, long nOffset, sal_Bool bIsOutlMv = sal_False );
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- void SetStartNode( ULONG nValue ) { nNewStt = nValue; }
+ void SetStartNode( sal_uLong nValue ) { nNewStt = nValue; }
};
class SwUndoNumUpDown : public SwUndo, private SwUndRng
@@ -1458,12 +1458,12 @@ public:
class SwUndoNumOrNoNum : public SwUndo
{
- ULONG nIdx;
- BOOL mbNewNum, mbOldNum;
+ sal_uLong nIdx;
+ sal_Bool mbNewNum, mbOldNum;
public:
- SwUndoNumOrNoNum( const SwNodeIndex& rIdx, BOOL mbOldNum,
- BOOL mbNewNum );
+ SwUndoNumOrNoNum( const SwNodeIndex& rIdx, sal_Bool mbOldNum,
+ sal_Bool mbNewNum );
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
@@ -1471,13 +1471,13 @@ public:
class SwUndoNumRuleStart : public SwUndo
{
- ULONG nIdx;
- USHORT nOldStt, nNewStt;
- BOOL bSetSttValue : 1;
- BOOL bFlag : 1;
+ sal_uLong nIdx;
+ sal_uInt16 nOldStt, nNewStt;
+ sal_Bool bSetSttValue : 1;
+ sal_Bool bFlag : 1;
public:
- SwUndoNumRuleStart( const SwPosition& rPos, BOOL bDelete );
- SwUndoNumRuleStart( const SwPosition& rPos, USHORT nStt );
+ SwUndoNumRuleStart( const SwPosition& rPos, sal_Bool bDelete );
+ SwUndoNumRuleStart( const SwPosition& rPos, sal_uInt16 nStt );
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
@@ -1502,16 +1502,16 @@ public:
class SwUndoDrawGroup : public SwUndo
{
SwUndoGroupObjImpl* pObjArr;
- USHORT nSize;
- BOOL bDelFmt;
+ sal_uInt16 nSize;
+ sal_Bool bDelFmt;
public:
- SwUndoDrawGroup( USHORT nCnt );
+ SwUndoDrawGroup( sal_uInt16 nCnt );
virtual ~SwUndoDrawGroup();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
- void AddObj( USHORT nPos, SwDrawFrmFmt*, SdrObject* );
+ void AddObj( sal_uInt16 nPos, SwDrawFrmFmt*, SdrObject* );
void SetGroupFmt( SwDrawFrmFmt* );
};
@@ -1530,8 +1530,8 @@ public:
class SwUndoDrawUnGroup : public SwUndo
{
SwUndoGroupObjImpl* pObjArr;
- USHORT nSize;
- BOOL bDelFmt;
+ sal_uInt16 nSize;
+ sal_Bool bDelFmt;
public:
SwUndoDrawUnGroup( SdrObjGroup* );
@@ -1539,7 +1539,7 @@ public:
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
- void AddObj( USHORT nPos, SwDrawFrmFmt* );
+ void AddObj( sal_uInt16 nPos, SwDrawFrmFmt* );
};
// --> OD 2006-11-01 #130889#
@@ -1564,16 +1564,16 @@ class SwUndoDrawDelete : public SwUndo
{
SwUndoGroupObjImpl* pObjArr;
SdrMarkList* pMarkLst; // MarkList for all selected SdrObjects
- USHORT nSize;
- BOOL bDelFmt;
+ sal_uInt16 nSize;
+ sal_Bool bDelFmt;
public:
- SwUndoDrawDelete( USHORT nCnt );
+ SwUndoDrawDelete( sal_uInt16 nCnt );
virtual ~SwUndoDrawDelete();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
- void AddObj( USHORT nPos, SwDrawFrmFmt*, const SdrMark& );
+ void AddObj( sal_uInt16 nPos, SwDrawFrmFmt*, const SdrMark& );
};
//--------------------------------------------------------------------
@@ -1582,8 +1582,8 @@ class SwUndoReRead : public SwUndo
{
Graphic *pGrf;
String *pNm, *pFltr;
- ULONG nPos;
- USHORT nMirr;
+ sal_uLong nPos;
+ sal_uInt16 nMirr;
void SaveGraphicData( const SwGrfNode& );
void SetAndSave( SwUndoIter& );
@@ -1609,7 +1609,7 @@ class SwUndoInsertLabel : public SwUndo
struct {
// fuer Tabelle/TextRahmen
SwUndoDelete* pUndoInsNd;
- ULONG nNode;
+ sal_uLong nNode;
} NODE;
};
@@ -1620,12 +1620,12 @@ class SwUndoInsertLabel : public SwUndo
String sNumberSeparator;
String sCharacterStyle;
// OD 2004-04-15 #i26791# - re-store of drawing object position no longer needed
- USHORT nFldId;
+ sal_uInt16 nFldId;
SwLabelType eType;
- BYTE nLayerId; // fuer Zeichen-Objekte
- BOOL bBefore :1;
- BOOL bUndoKeep :1;
- BOOL bCpyBrd :1;
+ sal_uInt8 nLayerId; // fuer Zeichen-Objekte
+ sal_Bool bBefore :1;
+ sal_Bool bUndoKeep :1;
+ sal_Bool bCpyBrd :1;
public:
SwUndoInsertLabel( const SwLabelType eTyp, const String &rText,
@@ -1633,9 +1633,9 @@ public:
const String& rSeparator,
// <--
const String& rNumberSeparator, //#i61007# order of captions
- const BOOL bBefore, const USHORT nId,
+ const sal_Bool bBefore, const sal_uInt16 nId,
const String& rCharacterStyle,
- const BOOL bCpyBrd );
+ const sal_Bool bCpyBrd );
virtual ~SwUndoInsertLabel();
virtual void Undo( SwUndoIter& );
@@ -1657,12 +1657,12 @@ public:
*/
virtual SwRewriter GetRewriter() const;
- void SetNodePos( ULONG nNd )
+ void SetNodePos( sal_uLong nNd )
{ if( LTYPE_OBJECT != eType ) NODE.nNode = nNd; }
- void SetUndoKeep() { bUndoKeep = TRUE; }
+ void SetUndoKeep() { bUndoKeep = sal_True; }
void SetFlys( SwFrmFmt& rOldFly, SfxItemSet& rChgSet, SwFrmFmt& rNewFly );
- void SetDrawObj( BYTE nLayerId );
+ void SetDrawObj( sal_uInt8 nLayerId );
};
//--------------------------------------------------------------------
@@ -1671,12 +1671,12 @@ class SwUndoChangeFootNote : public SwUndo, private SwUndRng
{
const ::std::auto_ptr<SwHistory> m_pHistory;
const String m_Text;
- const USHORT m_nNumber;
+ const sal_uInt16 m_nNumber;
const bool m_bEndNote;
public:
SwUndoChangeFootNote( const SwPaM& rRange, const String& rTxt,
- USHORT nNum, bool bIsEndNote );
+ sal_uInt16 nNum, bool bIsEndNote );
virtual ~SwUndoChangeFootNote();
virtual void Undo( SwUndoIter& );
@@ -1730,7 +1730,7 @@ public:
void AddChanges( SwTxtNode& rTNd, xub_StrLen nStart, xub_StrLen nLen,
::com::sun::star::uno::Sequence <sal_Int32>& rOffsets );
- BOOL HasData() const { return aChanges.size() > 0; }
+ sal_Bool HasData() const { return aChanges.size() > 0; }
};
//--------------------------------------------------------------------
@@ -1741,7 +1741,7 @@ protected:
SwRedlineData* pRedlData;
SwRedlineSaveDatas* pRedlSaveData;
SwUndoId nUserId;
- BOOL bHiddenRedlines;
+ sal_Bool bHiddenRedlines;
virtual void _Undo( SwUndoIter& );
virtual void _Redo( SwUndoIter& );
@@ -1753,15 +1753,15 @@ public:
virtual void Redo( SwUndoIter& );
SwUndoId GetUserId() const { return nUserId; }
- USHORT GetRedlSaveCount() const
+ sal_uInt16 GetRedlSaveCount() const
{ return pRedlSaveData ? pRedlSaveData->Count() : 0; }
};
class SwUndoRedlineDelete : public SwUndoRedline
{
- BOOL bCanGroup : 1;
- BOOL bIsDelim : 1;
- BOOL bIsBackspace : 1;
+ sal_Bool bCanGroup : 1;
+ sal_Bool bIsDelim : 1;
+ sal_Bool bIsBackspace : 1;
virtual void _Undo( SwUndoIter& );
virtual void _Redo( SwUndoIter& );
@@ -1769,13 +1769,13 @@ class SwUndoRedlineDelete : public SwUndoRedline
public:
SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUserId = UNDO_EMPTY );
- BOOL CanGrouping( const SwUndoRedlineDelete& rPrev );
+ sal_Bool CanGrouping( const SwUndoRedlineDelete& rPrev );
};
class SwUndoRedlineSort : public SwUndoRedline
{
SwSortOptions* pOpt;
- ULONG nSaveEndNode, nOffset;
+ sal_uLong nSaveEndNode, nOffset;
xub_StrLen nSaveEndCntnt;
virtual void _Undo( SwUndoIter& );
@@ -1813,9 +1813,9 @@ class SwUndoCompDoc : public SwUndo, public SwUndRng
SwRedlineData* pRedlData;
SwUndoDelete* pUnDel, *pUnDel2;
SwRedlineSaveDatas* pRedlSaveData;
- BOOL bInsert;
+ sal_Bool bInsert;
public:
- SwUndoCompDoc( const SwPaM& rRg, BOOL bIns );
+ SwUndoCompDoc( const SwPaM& rRg, sal_Bool bIns );
SwUndoCompDoc( const SwRedline& rRedl );
virtual ~SwUndoCompDoc();
@@ -1842,9 +1842,9 @@ class SwUndoIter
friend void SwUndoReplace::Redo( SwUndoIter& );
SwUndoId nUndoId;
- USHORT nEndCnt;
- BOOL bWeiter : 1;
- BOOL bUpdateAttr : 1; // Setze das GCAttr an der CursorShell
+ sal_uInt16 nEndCnt;
+ sal_Bool bWeiter : 1;
+ sal_Bool bUpdateAttr : 1; // Setze das GCAttr an der CursorShell
public:
SwPaM * pAktPam; // Member fuer das Undo
@@ -1854,9 +1854,9 @@ public:
SwUndoIter( SwPaM * pPam, SwUndoId nId = UNDO_EMPTY );
- BOOL IsNextUndo() const { return bWeiter; }
- BOOL IsUpdateAttr() const { return bUpdateAttr; }
- void SetUpdateAttr( BOOL bNew ) { bUpdateAttr = bNew; }
+ sal_Bool IsNextUndo() const { return bWeiter; }
+ sal_Bool IsUpdateAttr() const { return bUpdateAttr; }
+ void SetUpdateAttr( sal_Bool bNew ) { bUpdateAttr = bNew; }
inline SwDoc& GetDoc() const;
SwUndoId GetId() const { return nUndoId; }
diff --git a/sw/inc/unoatxt.hxx b/sw/inc/unoatxt.hxx
index 3a072b9ff5b0..01033eb856ec 100644
--- a/sw/inc/unoatxt.hxx
+++ b/sw/inc/unoatxt.hxx
@@ -99,7 +99,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
};
@@ -159,7 +159,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//XPropertySet
@@ -234,9 +234,9 @@ public:
//XText
virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL insertString(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const rtl::OUString& aString, BOOL bAbsorb) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL insertControlCharacter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, sal_Int16 nControlCharacter, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL insertTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insertString(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const rtl::OUString& aString, sal_Bool bAbsorb) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insertControlCharacter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insertTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent, sal_Bool bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL removeTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
//XTextRange
@@ -251,7 +251,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
// XEventsSupplier
@@ -285,7 +285,7 @@ public:
protected:
virtual void replaceByName(
- const USHORT nEvent, /// item ID of event
+ const sal_uInt16 nEvent, /// item ID of event
const SvxMacro& rMacro) /// event (will be copied)
throw(
::com::sun::star::lang::IllegalArgumentException,
@@ -295,7 +295,7 @@ protected:
virtual void getByName(
SvxMacro& rMacro, /// macro to be filled
- const USHORT nEvent ) /// item ID of event
+ const sal_uInt16 nEvent ) /// item ID of event
throw(
::com::sun::star::container::NoSuchElementException,
::com::sun::star::lang::WrappedTargetException,
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
index eeced6e62c50..01e45671a3c0 100644
--- a/sw/inc/unochart.hxx
+++ b/sw/inc/unochart.hxx
@@ -212,7 +212,7 @@ public:
void DisposeAllDataSequences( const SwTable *pTable );
// functionality needed to get notified about new added rows/cols
- void AddRowCols( const SwTable &rTable, const SwSelBoxes& rBoxes, USHORT nLines, BOOL bBehind );
+ void AddRowCols( const SwTable &rTable, const SwSelBoxes& rBoxes, sal_uInt16 nLines, sal_Bool bBehind );
};
//////////////////////////////////////////////////////////////////////
diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx
index cc65666d8fd4..8b799ad98b9b 100644
--- a/sw/inc/unocoll.hxx
+++ b/sw/inc/unocoll.hxx
@@ -306,7 +306,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
static ::com::sun::star::text::XTextTable* GetObject( SwFrmFmt& rFmt );
@@ -348,7 +348,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
FlyCntType GetType()const{return eType;}
@@ -371,7 +371,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
};
@@ -391,7 +391,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
};
@@ -411,7 +411,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
};
@@ -443,7 +443,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection> GetObject( SwSectionFmt& rFmt );
@@ -475,7 +475,7 @@ class SwXBookmarks : public SwCollectionBaseClass,
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
};
@@ -533,7 +533,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
static ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote> GetObject( SwDoc& rDoc, const SwFmtFtn& rFmt );
@@ -566,7 +566,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
static SwXReferenceMark* GetObject( SwDoc* pDoc, const SwFmtRefMark* pMark );
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
index 001f0eef3ab2..91fbc0a1d552 100644
--- a/sw/inc/unocrsr.hxx
+++ b/sw/inc/unocrsr.hxx
@@ -32,9 +32,9 @@
class SwUnoCrsr : public virtual SwCursor, public SwModify
{
- BOOL bRemainInSection : 1;
- BOOL bSkipOverHiddenSections : 1;
- BOOL bSkipOverProtectSections : 1;
+ sal_Bool bRemainInSection : 1;
+ sal_Bool bSkipOverHiddenSections : 1;
+ sal_Bool bSkipOverProtectSections : 1;
public:
SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 );
@@ -50,7 +50,7 @@ private:
protected:
virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
- BOOL & io_rbLeft, BOOL bVisualAllowed, BOOL bInsertCrsr);
+ sal_Bool & io_rbLeft, sal_Bool bVisualAllowed, sal_Bool bInsertCrsr);
virtual void DoSetBidiLevelUpDown();
public:
@@ -59,24 +59,24 @@ public:
// gibt es eine Selection vom Content in die Tabelle
// Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
- virtual BOOL IsSelOvr( int eFlags =
+ virtual sal_Bool IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
virtual bool IsReadOnlyAvailable() const;
- BOOL IsRemainInSection() const { return bRemainInSection; }
- void SetRemainInSection( BOOL bFlag ) { bRemainInSection = bFlag; }
+ sal_Bool IsRemainInSection() const { return bRemainInSection; }
+ void SetRemainInSection( sal_Bool bFlag ) { bRemainInSection = bFlag; }
- virtual BOOL IsSkipOverProtectSections() const
+ virtual sal_Bool IsSkipOverProtectSections() const
{ return bSkipOverProtectSections; }
- void SetSkipOverProtectSections( BOOL bFlag )
+ void SetSkipOverProtectSections( sal_Bool bFlag )
{ bSkipOverProtectSections = bFlag; }
- virtual BOOL IsSkipOverHiddenSections() const
+ virtual sal_Bool IsSkipOverHiddenSections() const
{ return bSkipOverHiddenSections; }
- void SetSkipOverHiddenSections( BOOL bFlag )
+ void SetSkipOverHiddenSections( sal_Bool bFlag )
{ bSkipOverHiddenSections = bFlag; }
// make copy of cursor
@@ -104,7 +104,7 @@ public:
// gibt es eine Selection vom Content in die Tabelle
// Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
- virtual BOOL IsSelOvr( int eFlags =
+ virtual sal_Bool IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
index 7ca06ee09391..f2f8ca922b8c 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -83,8 +83,8 @@ namespace SwUnoCursorHelper
public:
~SwAnyMapHelper();
- void SetValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any& rAny );
- bool FillValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any*& pAny );
+ void SetValue( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const com::sun::star::uno::Any& rAny );
+ bool FillValue( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const com::sun::star::uno::Any*& pAny );
};
::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
index d4ac0f4f3d61..f0168d632f51 100644
--- a/sw/inc/unodraw.hxx
+++ b/sw/inc/unodraw.hxx
@@ -123,7 +123,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
SwFmDrawPage* GetSvxPage();
@@ -297,7 +297,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
// --> OD 2004-07-22 #i31698# XShape
diff --git a/sw/inc/unoevtlstnr.hxx b/sw/inc/unoevtlstnr.hxx
index 9063120a6240..3b56ff6c3d33 100644
--- a/sw/inc/unoevtlstnr.hxx
+++ b/sw/inc/unoevtlstnr.hxx
@@ -52,7 +52,7 @@ class SwEventListenerContainer
~SwEventListenerContainer();
void AddListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & rxListener);
- BOOL RemoveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & rxListener);
+ sal_Bool RemoveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & rxListener);
void Disposing();
};
#endif
diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx
index 521a85e9168e..66fe2cb92a99 100644
--- a/sw/inc/unofield.hxx
+++ b/sw/inc/unofield.hxx
@@ -106,7 +106,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
@@ -192,7 +192,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//XUpdatable
@@ -243,7 +243,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
@@ -285,7 +285,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
// SwUnoCollection
@@ -313,12 +313,12 @@ public:
SwXFieldEnumeration(SwDoc* pDoc);
//XEnumeration
- virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
diff --git a/sw/inc/unoflatpara.hxx b/sw/inc/unoflatpara.hxx
index acc004d473ab..b69fb448c102 100644
--- a/sw/inc/unoflatpara.hxx
+++ b/sw/inc/unoflatpara.hxx
@@ -136,9 +136,9 @@ private:
const sal_Int32 mnType;
const sal_Bool mbAutomatic;
- ULONG mnCurrentNode; // used for non-automatic mode
- ULONG mnStartNode; // used for non-automatic mode
- ULONG mnEndNode; // used for non-automatic mode
+ sal_uLong mnCurrentNode; // used for non-automatic mode
+ sal_uLong mnStartNode; // used for non-automatic mode
+ sal_uLong mnEndNode; // used for non-automatic mode
sal_Bool mbWrapped; // used for non-automatic mode
};
diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx
index 9323d209c19a..269401e3d28f 100644
--- a/sw/inc/unoframe.hxx
+++ b/sw/inc/unoframe.hxx
@@ -142,7 +142,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
@@ -229,7 +229,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
// XEventsSupplier
@@ -282,7 +282,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
// XEventsSupplier
@@ -338,7 +338,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
// XEventsSupplier
diff --git a/sw/inc/unomailmerge.hxx b/sw/inc/unomailmerge.hxx
index 39a9664c4123..0c2b77eb60d2 100644
--- a/sw/inc/unomailmerge.hxx
+++ b/sw/inc/unomailmerge.hxx
@@ -79,14 +79,14 @@ namespace rtl {
// helper function call class
struct PropHashType_Impl
{
- size_t operator()(const INT32 &s) const { return s; }
+ size_t operator()(const sal_Int32 &s) const { return s; }
};
typedef cppu::OMultiTypeInterfaceContainerHelperVar
<
- INT32,
+ sal_Int32,
PropHashType_Impl,
- std::equal_to< INT32 >
+ std::equal_to< sal_Int32 >
> OPropertyListenerContainerHelper;
////////////////////////////////////////////////////////////
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 0ea5fa9db598..5fe59c9648fe 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -813,7 +813,7 @@ enum SwPropNameIds
struct SwPropNameLen
{
const char* pName;
- USHORT nNameLen;
+ sal_uInt16 nNameLen;
operator const char*() const { return pName; }
};
@@ -825,8 +825,8 @@ extern const SwPropNameTab aPropNameTab;
// !!! function must not(!) be inline because it is called via the below !!!
// !!! listed macros from the swui DLL and that can not access the !!!
// !!! array aPropNameTab which is located in a different DLL. !!!
-SW_DLLPUBLIC const SwPropNameLen& GetPropName( USHORT nId );
-SW_DLLPUBLIC const SwPropNameLen& SwGetPropName( USHORT nId );
+SW_DLLPUBLIC const SwPropNameLen& GetPropName( sal_uInt16 nId );
+SW_DLLPUBLIC const SwPropNameLen& SwGetPropName( sal_uInt16 nId );
#define SW_PROP_NAME(nId) \
GetPropName( nId ).pName, GetPropName( nId ).nNameLen
diff --git a/sw/inc/unoredline.hxx b/sw/inc/unoredline.hxx
index 92db9257c4a6..65c14d82bbbf 100644
--- a/sw/inc/unoredline.hxx
+++ b/sw/inc/unoredline.hxx
@@ -86,7 +86,7 @@ public:
SwXRedlinePortion( const SwRedline* pRed,
const SwUnoCrsr* pPortionCrsr,
::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent,
- BOOL bIsStart);
+ sal_Bool bIsStart);
~SwXRedlinePortion();
diff --git a/sw/inc/unoredlines.hxx b/sw/inc/unoredlines.hxx
index 948e972e1998..49db8cf27761 100644
--- a/sw/inc/unoredlines.hxx
+++ b/sw/inc/unoredlines.hxx
@@ -67,7 +67,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
static ::com::sun::star::beans::XPropertySet* GetObject( SwRedline& rRedline, SwDoc& rDoc );
@@ -80,7 +80,7 @@ class SwXRedlineEnumeration
, public SwClient
{
SwDoc* pDoc;
- USHORT nCurrentIndex;
+ sal_uInt16 nCurrentIndex;
protected:
virtual ~SwXRedlineEnumeration();
public:
@@ -88,12 +88,12 @@ public:
//XEnumeration
- virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
index 8423ac29ad4c..4c2d66868420 100644
--- a/sw/inc/unosett.hxx
+++ b/sw/inc/unosett.hxx
@@ -78,7 +78,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
void Invalidate() {pDoc = 0;}
@@ -112,7 +112,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
void Invalidate() {pDoc = 0;}
@@ -146,7 +146,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
void Invalidate() {pDoc = 0;}
@@ -213,7 +213,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Sequence<
@@ -249,7 +249,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
};
@@ -310,7 +310,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
sal_Int32 GetSepLineWidth() const {return nSepLineWidth;}
diff --git a/sw/inc/unosrch.hxx b/sw/inc/unosrch.hxx
index c9da0cc39fe4..a4021761925f 100644
--- a/sw/inc/unosrch.hxx
+++ b/sw/inc/unosrch.hxx
@@ -119,7 +119,7 @@ public:
//XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
void FillSearchItemSet(SfxItemSet& rSet) const;
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
index 4a9fd533da66..740b909f1f7a 100644
--- a/sw/inc/unostyle.hxx
+++ b/sw/inc/unostyle.hxx
@@ -108,7 +108,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
};
@@ -166,7 +166,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
};
/* -----------------20.05.98 09:51-------------------
@@ -212,7 +212,7 @@ protected:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
- SwXStyle(SwDoc* pDoc, SfxStyleFamily eFam = SFX_STYLE_FAMILY_PARA, BOOL bConditional = FALSE);
+ SwXStyle(SwDoc* pDoc, SfxStyleFamily eFam = SFX_STYLE_FAMILY_PARA, sal_Bool bConditional = sal_False);
SwXStyle(SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam,
SwDoc* pDoc,
const String& rStyleName);//,
@@ -267,7 +267,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SfxListener
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index 3121a6420a69..e359726f94dc 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -91,7 +91,7 @@ class SwXCell : public SwXCellBaseClass,
public SwClient
{
friend void lcl_setString( SwXCell &rCell, const rtl::OUString &rTxt,
- BOOL bKeepNumberFmt = FALSE );
+ sal_Bool bKeepNumberFmt = sal_False );
friend double lcl_getValue( SwXCell &rCell );
friend void lcl_setValue( SwXCell &rCell, double nVal );
@@ -159,7 +159,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
@@ -211,7 +211,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
@@ -270,7 +270,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
@@ -406,7 +406,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
@@ -499,7 +499,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
@@ -561,7 +561,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
@@ -609,7 +609,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx
index ff7a536fb69e..4a10c7acf513 100644
--- a/sw/inc/unotextrange.hxx
+++ b/sw/inc/unotextrange.hxx
@@ -81,7 +81,7 @@ namespace sw {
CreateParentXText(SwDoc & rDoc, const SwPosition& rPos);
bool GetDefaultTextContentValue(::com::sun::star::uno::Any& rAny,
- const ::rtl::OUString& rPropertyName, USHORT nWID = 0);
+ const ::rtl::OUString& rPropertyName, sal_uInt16 nWID = 0);
} // namespace sw
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 2869415d3978..f51e4a7892f0 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -364,7 +364,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
// css::drawing::XDrawPageSupplier
@@ -475,7 +475,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
//
@@ -530,7 +530,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
};
@@ -561,7 +561,7 @@ public:
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
};
#endif
diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx
index dea534074179..21243589daf1 100644
--- a/sw/inc/usrfld.hxx
+++ b/sw/inc/usrfld.hxx
@@ -40,12 +40,12 @@ class SwDoc;
class SW_DLLPUBLIC SwUserFieldType : public SwValueFieldType
{
- BOOL bValidValue : 1;
- BOOL bDeleted : 1;
+ sal_Bool bValidValue : 1;
+ sal_Bool bDeleted : 1;
double nValue;
String aName;
String aContent;
- USHORT nType;
+ sal_uInt16 nType;
public:
SwUserFieldType( SwDoc* pDocPtr, const String& );
@@ -53,13 +53,13 @@ public:
virtual const String& GetName() const;
virtual SwFieldType* Copy() const;
- String Expand(sal_uInt32 nFmt, USHORT nSubType, USHORT nLng);
+ String Expand(sal_uInt32 nFmt, sal_uInt16 nSubType, sal_uInt16 nLng);
String GetContent( sal_uInt32 nFmt = 0 );
void SetContent( const String& rStr, sal_uInt32 nFmt = 0 );
- inline BOOL IsValid() const;
- inline void ChgValid( BOOL bNew );
+ inline sal_Bool IsValid() const;
+ inline void ChgValid( sal_Bool bNew );
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
@@ -67,20 +67,20 @@ public:
inline double GetValue() const;
inline void SetValue(const double nVal);
- inline USHORT GetType() const;
- inline void SetType(USHORT);
+ inline sal_uInt16 GetType() const;
+ inline void SetType(sal_uInt16);
- BOOL IsDeleted() const { return bDeleted; }
- void SetDeleted( BOOL b ) { bDeleted = b; }
+ sal_Bool IsDeleted() const { return bDeleted; }
+ void SetDeleted( sal_Bool b ) { bDeleted = b; }
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nMId ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nMId );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nMId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nMId );
};
-inline BOOL SwUserFieldType::IsValid() const
+inline sal_Bool SwUserFieldType::IsValid() const
{ return bValidValue; }
-inline void SwUserFieldType::ChgValid( BOOL bNew )
+inline void SwUserFieldType::ChgValid( sal_Bool bNew )
{ bValidValue = bNew; }
inline double SwUserFieldType::GetValue() const
@@ -89,10 +89,10 @@ inline double SwUserFieldType::GetValue() const
inline void SwUserFieldType::SetValue(const double nVal)
{ nValue = nVal; }
-inline USHORT SwUserFieldType::GetType() const
+inline sal_uInt16 SwUserFieldType::GetType() const
{ return nType; }
-inline void SwUserFieldType::SetType(USHORT nSub)
+inline void SwUserFieldType::SetType(sal_uInt16 nSub)
{
nType = nSub;
EnableFormat(!(nSub & nsSwGetSetExpType::GSE_STRING));
@@ -104,16 +104,16 @@ inline void SwUserFieldType::SetType(USHORT nSub)
class SW_DLLPUBLIC SwUserField : public SwValueField
{
- USHORT nSubType;
+ sal_uInt16 nSubType;
virtual String Expand() const;
virtual SwField* Copy() const;
public:
- SwUserField(SwUserFieldType*, USHORT nSub = 0, sal_uInt32 nFmt = 0);
+ SwUserField(SwUserFieldType*, sal_uInt16 nSub = 0, sal_uInt32 nFmt = 0);
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nSub);
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
virtual double GetValue() const;
virtual void SetValue( const double& rVal );
@@ -126,8 +126,8 @@ public:
// Inhalt
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
};
#endif // SW_USRFLD_HXX
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 8d37888ea789..8bacf2ee8f67 100755..100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -140,50 +140,50 @@ class SwViewOption
static sal_Int32 nAppearanceFlags; //
protected:
- static USHORT nPixelTwips;// 1 Pixel == ? Twips
+ static sal_uInt16 nPixelTwips;// 1 Pixel == ? Twips
String sSymbolFont; // Symbolzeichensatz
- UINT32 nCoreOptions; // Bits fuer die ViewShell
- UINT32 nCore2Options; // Bits fuer die ViewShell
- UINT32 nUIOptions; // UI-Bits
+ sal_uInt32 nCoreOptions; // Bits fuer die ViewShell
+ sal_uInt32 nCore2Options; // Bits fuer die ViewShell
+ sal_uInt32 nUIOptions; // UI-Bits
Color aRetoucheColor; // DefaultBackground fuer BrowseView
Size aSnapSize; // Beschreibt hori. wie vert. Snap
- USHORT mnViewLayoutColumns;// # columns for edit view
+ sal_uInt16 mnViewLayoutColumns;// # columns for edit view
short nDivisionX; // Rasterunterteilung
short nDivisionY;
- BYTE nPagePrevRow; // Page Preview Row/Columns
- BYTE nPagePrevCol; // Page Preview Row/Columns
- BYTE nShdwCrsrFillMode; // FillMode fuer den ShadowCrsr
- BOOL bReadonly : 1; // Readonly-Doc
- BOOL bStarOneSetting : 1;// prevent from UI automatics (no scrollbars in readonly documents)
- BOOL bIsPagePreview : 1; // the preview mustn't print field/footnote/... shadings
- BOOL bSelectionInReadonly : 1; //determines whether selection is switched on in readonly documents
+ sal_uInt8 nPagePrevRow; // Page Preview Row/Columns
+ sal_uInt8 nPagePrevCol; // Page Preview Row/Columns
+ sal_uInt8 nShdwCrsrFillMode; // FillMode fuer den ShadowCrsr
+ sal_Bool bReadonly : 1; // Readonly-Doc
+ sal_Bool bStarOneSetting : 1;// prevent from UI automatics (no scrollbars in readonly documents)
+ sal_Bool bIsPagePreview : 1; // the preview mustn't print field/footnote/... shadings
+ sal_Bool bSelectionInReadonly : 1; //determines whether selection is switched on in readonly documents
// --> FME 2004-06-29 #114856# Formular view
- BOOL bFormView : 1;
+ sal_Bool bFormView : 1;
// <--
- BOOL bBookview : 1; // view mode for page preview
- BOOL mbViewLayoutBookMode : 1; // book view mode for edit view
+ sal_Bool bBookview : 1; // view mode for page preview
+ sal_Bool mbViewLayoutBookMode : 1; // book view mode for edit view
sal_Bool bShowPlaceHolderFields : 1; //only used in printing!
mutable bool bIdle;
// Maszstab
- USHORT nZoom; // Angaben in Prozent
+ sal_uInt16 nZoom; // Angaben in Prozent
SvxZoomType eZoom; // 'enum' fuer Zoom
- BYTE nTblDest; // Ziel fuer Tabellenhintergrund
+ sal_uInt8 nTblDest; // Ziel fuer Tabellenhintergrund
#ifdef DBG_UTIL
// korrespondieren zu den Angaben in ui/config/cfgvw.src
- BOOL bTest1 :1; // Test-Flag "Layout not loading"
- BOOL bTest2 :1; // Test-Flag "WYSIWYG++"
- BOOL bTest3 :1; // Test-Flag ""
- BOOL bTest4 :1; // Test-Flag "WYSIWYG debug"
- BOOL bTest5 :1; // Test-Flag "No idle format"
- BOOL bTest6 :1; // Test-Flag "No screen adj"
- BOOL bTest7 :1; // Test-Flag "win format"
- BOOL bTest8 :1; // Test-Flag ""
- static BOOL bTest9; // Test-Flag "DrawingLayerNotLoading"
- BOOL bTest10 :1; // Test-Flag "Format by Input"
+ sal_Bool bTest1 :1; // Test-Flag "Layout not loading"
+ sal_Bool bTest2 :1; // Test-Flag "WYSIWYG++"
+ sal_Bool bTest3 :1; // Test-Flag ""
+ sal_Bool bTest4 :1; // Test-Flag "WYSIWYG debug"
+ sal_Bool bTest5 :1; // Test-Flag "No idle format"
+ sal_Bool bTest6 :1; // Test-Flag "No screen adj"
+ sal_Bool bTest7 :1; // Test-Flag "win format"
+ sal_Bool bTest8 :1; // Test-Flag ""
+ static sal_Bool bTest9; // Test-Flag "DrawingLayerNotLoading"
+ sal_Bool bTest10 :1; // Test-Flag "Format by Input"
#endif
public:
@@ -193,200 +193,200 @@ public:
void Init( Window *pWin ); // Initialisierung der statischen Daten
- USHORT GetPixelTwips() const { return nPixelTwips; }
+ sal_uInt16 GetPixelTwips() const { return nPixelTwips; }
- inline UINT32 GetCoreOptions() const {return nCoreOptions;}
+ inline sal_uInt32 GetCoreOptions() const {return nCoreOptions;}
inline void SetUIOptions( const SwViewOption& );
/*---------------------------------------------------------------------------
Optionen aus nCoreOptions
----------------------------------------------------------------------------*/
- inline BOOL IsIdle() const
+ inline sal_Bool IsIdle() const
{ return bIdle; }
// logically this is a const function since it does not modify the viewoptions
// but only effects idle formatting. Of course that member is already implement
// in the wrong place here... Also currently there are many const modifying casts in the code
// just to call this function on otherwise const objects. Thus declaring it as const now.
- inline void SetIdle( BOOL b ) const
+ inline void SetIdle( sal_Bool b ) const
{ bIdle = b; }
- inline BOOL IsTab(BOOL bHard = FALSE) const
+ inline sal_Bool IsTab(sal_Bool bHard = sal_False) const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_TAB) &&
((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
- ? TRUE : FALSE; }
- inline void SetTab( BOOL b ) {
+ ? sal_True : sal_False; }
+ inline void SetTab( sal_Bool b ) {
(b != 0) ? (nCoreOptions |= VIEWOPT_1_TAB ) : ( nCoreOptions &= ~VIEWOPT_1_TAB); }
- inline BOOL IsBlank(BOOL bHard = FALSE) const
+ inline sal_Bool IsBlank(sal_Bool bHard = sal_False) const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_BLANK) &&
((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
- ? TRUE : FALSE; }
- inline void SetBlank( BOOL b )
+ ? sal_True : sal_False; }
+ inline void SetBlank( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_BLANK ) : ( nCoreOptions &= ~VIEWOPT_1_BLANK); }
- inline BOOL IsHardBlank() const
- { return !bReadonly && nCoreOptions & VIEWOPT_1_HARDBLANK ? TRUE : FALSE; }
- inline void SetHardBlank( BOOL b )
+ inline sal_Bool IsHardBlank() const
+ { return !bReadonly && nCoreOptions & VIEWOPT_1_HARDBLANK ? sal_True : sal_False; }
+ inline void SetHardBlank( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_HARDBLANK ) : ( nCoreOptions &= ~VIEWOPT_1_HARDBLANK); }
- inline BOOL IsParagraph(BOOL bHard = FALSE) const
+ inline sal_Bool IsParagraph(sal_Bool bHard = sal_False) const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_PARAGRAPH) &&
((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
- ? TRUE : FALSE; }
- inline void SetParagraph( BOOL b )
+ ? sal_True : sal_False; }
+ inline void SetParagraph( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_PARAGRAPH ) : ( nCoreOptions &= ~VIEWOPT_1_PARAGRAPH); }
- inline BOOL IsLineBreak(BOOL bHard = FALSE) const
+ inline sal_Bool IsLineBreak(sal_Bool bHard = sal_False) const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_LINEBREAK) &&
((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
- ? TRUE : FALSE; }
- inline void SetLineBreak( BOOL b )
+ ? sal_True : sal_False; }
+ inline void SetLineBreak( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_LINEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_LINEBREAK); }
- inline void SetPageBreak( BOOL b )
+ inline void SetPageBreak( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBREAK); }
- inline void SetColumnBreak( BOOL b)
+ inline void SetColumnBreak( sal_Bool b)
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_COLUMNBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_COLUMNBREAK); }
- inline BOOL IsSoftHyph() const
- { return !bReadonly && (nCoreOptions & VIEWOPT_1_SOFTHYPH) ? TRUE : FALSE; }
- inline void SetSoftHyph( BOOL b )
+ inline sal_Bool IsSoftHyph() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_SOFTHYPH) ? sal_True : sal_False; }
+ inline void SetSoftHyph( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOFTHYPH ) : ( nCoreOptions &= ~VIEWOPT_1_SOFTHYPH); }
- inline BOOL IsFldName() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLDNAME) ? TRUE : FALSE; }
- inline void SetFldName( BOOL b )
+ inline sal_Bool IsFldName() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLDNAME) ? sal_True : sal_False; }
+ inline void SetFldName( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLDNAME ) : ( nCoreOptions &= ~VIEWOPT_1_FLDNAME); }
- inline BOOL IsPostIts() const
- { return (nCoreOptions & VIEWOPT_1_POSTITS) ? TRUE : FALSE; }
- inline void SetPostIts( BOOL b )
+ inline sal_Bool IsPostIts() const
+ { return (nCoreOptions & VIEWOPT_1_POSTITS) ? sal_True : sal_False; }
+ inline void SetPostIts( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_POSTITS ) : ( nCoreOptions &= ~VIEWOPT_1_POSTITS); }
void PaintPostIts( OutputDevice *pOut, const SwRect &rRect,
sal_Bool bIsScript ) const;
- USHORT GetPostItsWidth( const OutputDevice *pOut = 0 ) const;
+ sal_uInt16 GetPostItsWidth( const OutputDevice *pOut = 0 ) const;
- inline BOOL IsShowHiddenChar(sal_Bool bHard = sal_False) const
+ inline sal_Bool IsShowHiddenChar(sal_Bool bHard = sal_False) const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_CHAR_HIDDEN) &&
((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
- ? TRUE : FALSE; }
+ ? sal_True : sal_False; }
- inline void SetShowHiddenChar( BOOL b )
+ inline void SetShowHiddenChar( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_CHAR_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_CHAR_HIDDEN); }
- inline BOOL IsShowHiddenField() const
- { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLD_HIDDEN) ? TRUE : FALSE; }
- inline void SetShowHiddenField( BOOL b )
+ inline sal_Bool IsShowHiddenField() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLD_HIDDEN) ? sal_True : sal_False; }
+ inline void SetShowHiddenField( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLD_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_FLD_HIDDEN); }
- inline BOOL IsGraphic() const
- { return nCoreOptions & VIEWOPT_1_GRAPHIC ? TRUE : FALSE; }
- inline void SetGraphic( BOOL b )
+ inline sal_Bool IsGraphic() const
+ { return nCoreOptions & VIEWOPT_1_GRAPHIC ? sal_True : sal_False; }
+ inline void SetGraphic( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRAPHIC ) : ( nCoreOptions &= ~VIEWOPT_1_GRAPHIC); }
- inline BOOL IsPageBack() const
- { return nCoreOptions & VIEWOPT_1_PAGEBACK ? TRUE : FALSE; }
- inline void SetPageBack( BOOL b )
+ inline sal_Bool IsPageBack() const
+ { return nCoreOptions & VIEWOPT_1_PAGEBACK ? sal_True : sal_False; }
+ inline void SetPageBack( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBACK) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBACK); }
- inline BOOL IsSolidMarkHdl() const
- { return nCoreOptions & VIEWOPT_1_SOLIDMARKHDL ? TRUE : FALSE; }
- inline void SetSolidMarkHdl( BOOL b )
+ inline sal_Bool IsSolidMarkHdl() const
+ { return nCoreOptions & VIEWOPT_1_SOLIDMARKHDL ? sal_True : sal_False; }
+ inline void SetSolidMarkHdl( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOLIDMARKHDL) : ( nCoreOptions &= ~VIEWOPT_1_SOLIDMARKHDL); }
- inline BOOL IsBigMarkHdl() const
- { return nCore2Options & VIEWOPT_CORE2_BIGMARKHDL ? TRUE : FALSE;}
- inline void SetBigMarkHdl(BOOL b)
+ inline sal_Bool IsBigMarkHdl() const
+ { return nCore2Options & VIEWOPT_CORE2_BIGMARKHDL ? sal_True : sal_False;}
+ inline void SetBigMarkHdl(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BIGMARKHDL ) : (nCore2Options &= ~VIEWOPT_CORE2_BIGMARKHDL);}
- inline BOOL IsTable() const
- { return nCoreOptions & VIEWOPT_1_TABLE ? TRUE : FALSE; }
- inline void SetTable( BOOL b )
+ inline sal_Bool IsTable() const
+ { return nCoreOptions & VIEWOPT_1_TABLE ? sal_True : sal_False; }
+ inline void SetTable( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_TABLE ) : ( nCoreOptions &= ~VIEWOPT_1_TABLE); }
- inline BOOL IsDraw() const
- { return nCoreOptions & VIEWOPT_1_DRAW ? TRUE : FALSE; }
- inline void SetDraw( BOOL b )
+ inline sal_Bool IsDraw() const
+ { return nCoreOptions & VIEWOPT_1_DRAW ? sal_True : sal_False; }
+ inline void SetDraw( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_DRAW ) : ( nCoreOptions &= ~VIEWOPT_1_DRAW); }
- inline BOOL IsControl() const
- { return nCoreOptions & VIEWOPT_1_CONTROL ? TRUE : FALSE; }
- inline void SetControl( BOOL b )
+ inline sal_Bool IsControl() const
+ { return nCoreOptions & VIEWOPT_1_CONTROL ? sal_True : sal_False; }
+ inline void SetControl( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_CONTROL ) : ( nCoreOptions &= ~VIEWOPT_1_CONTROL); }
- inline BOOL IsSnap() const
- { return nCoreOptions & VIEWOPT_1_SNAP ? TRUE : FALSE; }
- inline void SetSnap( BOOL b )
+ inline sal_Bool IsSnap() const
+ { return nCoreOptions & VIEWOPT_1_SNAP ? sal_True : sal_False; }
+ inline void SetSnap( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_SNAP ) : ( nCoreOptions &= ~VIEWOPT_1_SNAP); }
inline void SetSnapSize( Size &rSz ){ aSnapSize = rSz; }
inline const Size &GetSnapSize() const { return aSnapSize; }
- inline BOOL IsGridVisible() const
- { return !bReadonly && (nCoreOptions & VIEWOPT_1_GRIDVISIBLE) ? TRUE : FALSE; }
- inline void SetGridVisible( BOOL b )
+ inline sal_Bool IsGridVisible() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_GRIDVISIBLE) ? sal_True : sal_False; }
+ inline void SetGridVisible( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRIDVISIBLE ) : ( nCoreOptions &= ~VIEWOPT_1_GRIDVISIBLE); }
- inline BOOL IsOnlineSpell() const
- { return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) ? TRUE : FALSE; }
- inline void SetOnlineSpell( BOOL b )
+ inline sal_Bool IsOnlineSpell() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) ? sal_True : sal_False; }
+ inline void SetOnlineSpell( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL); }
- inline BOOL IsViewMetaChars() const
- { return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) ? TRUE : FALSE; }
- inline void SetViewMetaChars( BOOL b)
+ inline sal_Bool IsViewMetaChars() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) ? sal_True : sal_False; }
+ inline void SetViewMetaChars( sal_Bool b)
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_VIEWMETACHARS ) : ( nCoreOptions &= ~VIEWOPT_1_VIEWMETACHARS); }
- inline BOOL IsSynchronize() const
- { return nCoreOptions & VIEWOPT_1_SYNCHRONIZE ? TRUE : FALSE;}
- inline void SetSynchronize( BOOL b )
+ inline sal_Bool IsSynchronize() const
+ { return nCoreOptions & VIEWOPT_1_SYNCHRONIZE ? sal_True : sal_False;}
+ inline void SetSynchronize( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_SYNCHRONIZE ) : ( nCoreOptions &= ~VIEWOPT_1_SYNCHRONIZE); }
- inline BOOL IsCrossHair() const
- { return nCoreOptions & VIEWOPT_1_CROSSHAIR ? TRUE : FALSE; }
- inline void SetCrossHair( BOOL b )
+ inline sal_Bool IsCrossHair() const
+ { return nCoreOptions & VIEWOPT_1_CROSSHAIR ? sal_True : sal_False; }
+ inline void SetCrossHair( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_CROSSHAIR ) : ( nCoreOptions &= ~VIEWOPT_1_CROSSHAIR); }
/*---------------------------------------------------------------------------
Optionen aus nCore2Options
----------------------------------------------------------------------------*/
- inline BOOL IsBlackFont() const
- {return nCore2Options & VIEWOPT_CORE2_BLACKFONT ? TRUE : FALSE;}
+ inline sal_Bool IsBlackFont() const
+ {return nCore2Options & VIEWOPT_CORE2_BLACKFONT ? sal_True : sal_False;}
- inline void SetBlackFont(BOOL b)
+ inline void SetBlackFont(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BLACKFONT) : (nCore2Options &= ~VIEWOPT_CORE2_BLACKFONT);}
- inline BOOL IsShowHiddenPara() const
- {return nCore2Options & VIEWOPT_CORE2_HIDDENPARA ? TRUE : FALSE;}
+ inline sal_Bool IsShowHiddenPara() const
+ {return nCore2Options & VIEWOPT_CORE2_HIDDENPARA ? sal_True : sal_False;}
- inline void SetShowHiddenPara(BOOL b)
+ inline void SetShowHiddenPara(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_HIDDENPARA) : (nCore2Options &= ~VIEWOPT_CORE2_HIDDENPARA);}
- inline BOOL IsSmoothScroll() const
- {return nCore2Options & VIEWOPT_CORE2_SMOOTHSCROLL ? TRUE : FALSE;}
+ inline sal_Bool IsSmoothScroll() const
+ {return nCore2Options & VIEWOPT_CORE2_SMOOTHSCROLL ? sal_True : sal_False;}
- inline void SetSmoothScroll(BOOL b)
+ inline void SetSmoothScroll(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_SMOOTHSCROLL) : (nCore2Options &= ~VIEWOPT_CORE2_SMOOTHSCROLL);}
- inline BOOL IsCursorInProtectedArea() const
- {return nCore2Options & VIEWOPT_CORE2_CRSR_IN_PROT ? TRUE : FALSE;}
+ inline sal_Bool IsCursorInProtectedArea() const
+ {return nCore2Options & VIEWOPT_CORE2_CRSR_IN_PROT ? sal_True : sal_False;}
- inline void SetCursorInProtectedArea(BOOL b)
+ inline void SetCursorInProtectedArea(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_CRSR_IN_PROT) : (nCore2Options &= ~VIEWOPT_CORE2_CRSR_IN_PROT);}
- inline BOOL IsPDFExport() const
- {return nCore2Options & VIEWOPT_CORE2_PDF_EXPORT ? TRUE : FALSE;}
+ inline sal_Bool IsPDFExport() const
+ {return nCore2Options & VIEWOPT_CORE2_PDF_EXPORT ? sal_True : sal_False;}
- inline void SetPDFExport(BOOL b)
+ inline void SetPDFExport(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PDF_EXPORT) : (nCore2Options &= ~VIEWOPT_CORE2_PDF_EXPORT);}
- inline BOOL IsPrinting() const
- {return nCore2Options & VIEWOPT_CORE2_PRINTING ? TRUE : FALSE;}
+ inline sal_Bool IsPrinting() const
+ {return nCore2Options & VIEWOPT_CORE2_PRINTING ? sal_True : sal_False;}
- inline void SetPrinting(BOOL b)
+ inline void SetPrinting(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PRINTING) : (nCore2Options &= ~VIEWOPT_CORE2_PRINTING);}
/*---------------------------------------------------------------------------
@@ -399,105 +399,105 @@ public:
inline short GetDivisionY() const { return nDivisionY; }
inline void SetDivisionY( short n ){ nDivisionY = n; }
- inline BYTE GetPagePrevRow() const { return nPagePrevRow; }
- inline void SetPagePrevRow( BYTE n ) { nPagePrevRow = n; }
- inline BYTE GetPagePrevCol() const { return nPagePrevCol; }
- inline void SetPagePrevCol( BYTE n ) { nPagePrevCol = n; }
- BOOL IsReadonly() const { return bReadonly; }
- void SetReadonly(BOOL bSet) { bReadonly = bSet; }
+ inline sal_uInt8 GetPagePrevRow() const { return nPagePrevRow; }
+ inline void SetPagePrevRow( sal_uInt8 n ) { nPagePrevRow = n; }
+ inline sal_uInt8 GetPagePrevCol() const { return nPagePrevCol; }
+ inline void SetPagePrevCol( sal_uInt8 n ) { nPagePrevCol = n; }
+ sal_Bool IsReadonly() const { return bReadonly; }
+ void SetReadonly(sal_Bool bSet) { bReadonly = bSet; }
- BOOL IsSelectionInReadonly() const {return bSelectionInReadonly;}
- void SetSelectionInReadonly(BOOL bSet) {bSelectionInReadonly = bSet;}
+ sal_Bool IsSelectionInReadonly() const {return bSelectionInReadonly;}
+ void SetSelectionInReadonly(sal_Bool bSet) {bSelectionInReadonly = bSet;}
// --> FME 2004-06-29 #114856# Formular view
- BOOL IsFormView() const { return bFormView; }
- void SetFormView( BOOL bSet ) { bFormView = bSet; }
+ sal_Bool IsFormView() const { return bFormView; }
+ void SetFormView( sal_Bool bSet ) { bFormView = bSet; }
// <--
- inline BOOL IsPagePrevBookview() const { return bBookview; }
- inline void SetPagePrevBookview(BOOL bSet) { bBookview = bSet; }
+ inline sal_Bool IsPagePrevBookview() const { return bBookview; }
+ inline void SetPagePrevBookview(sal_Bool bSet) { bBookview = bSet; }
- BOOL IsAutoCompleteWords() const;
+ sal_Bool IsAutoCompleteWords() const;
// PAGES01
bool IsViewLayoutBookMode() const { return mbViewLayoutBookMode; }
void SetViewLayoutBookMode( bool bNew ) { mbViewLayoutBookMode = bNew; }
- USHORT GetViewLayoutColumns() const { return mnViewLayoutColumns; }
- void SetViewLayoutColumns( USHORT nNew ) { mnViewLayoutColumns = nNew; }
+ sal_uInt16 GetViewLayoutColumns() const { return mnViewLayoutColumns; }
+ void SetViewLayoutColumns( sal_uInt16 nNew ) { mnViewLayoutColumns = nNew; }
#ifdef DBG_UTIL
// korrespondieren zu den Angaben in ui/config/cfgvw.src
- inline BOOL IsTest1() const { return bTest1; }
- inline void SetTest1( BOOL b ) { bTest1 = b; }
- inline BOOL IsTest2() const { return bTest2; }
- inline void SetTest2( BOOL b ) { bTest2 = b; }
- inline BOOL IsTest3() const { return bTest3; }
- inline void SetTest3( BOOL b ) { bTest3 = b; }
- inline BOOL IsTest4() const { return bTest4; }
- inline void SetTest4( BOOL b ) { bTest4 = b; }
- inline BOOL IsTest5() const { return bTest5; }
- inline void SetTest5( BOOL b ) { bTest5 = b; }
- inline BOOL IsTest6() const { return bTest6; }
- inline void SetTest6( BOOL b ) { bTest6 = b; }
- inline BOOL IsTest7() const { return bTest7; }
- inline void SetTest7( BOOL b ) { bTest7 = b; }
- inline BOOL IsTest8() const { return bTest8; }
- inline void SetTest8( BOOL b ) { bTest8 = b; }
- static inline BOOL IsTest9() { return bTest9; }
- static inline void SetTest9( BOOL b ) { bTest9 = b; }
- inline BOOL IsTest10() const { return bTest10; }
- inline void SetTest10( BOOL b ) { bTest10 = b; }
+ inline sal_Bool IsTest1() const { return bTest1; }
+ inline void SetTest1( sal_Bool b ) { bTest1 = b; }
+ inline sal_Bool IsTest2() const { return bTest2; }
+ inline void SetTest2( sal_Bool b ) { bTest2 = b; }
+ inline sal_Bool IsTest3() const { return bTest3; }
+ inline void SetTest3( sal_Bool b ) { bTest3 = b; }
+ inline sal_Bool IsTest4() const { return bTest4; }
+ inline void SetTest4( sal_Bool b ) { bTest4 = b; }
+ inline sal_Bool IsTest5() const { return bTest5; }
+ inline void SetTest5( sal_Bool b ) { bTest5 = b; }
+ inline sal_Bool IsTest6() const { return bTest6; }
+ inline void SetTest6( sal_Bool b ) { bTest6 = b; }
+ inline sal_Bool IsTest7() const { return bTest7; }
+ inline void SetTest7( sal_Bool b ) { bTest7 = b; }
+ inline sal_Bool IsTest8() const { return bTest8; }
+ inline void SetTest8( sal_Bool b ) { bTest8 = b; }
+ static inline sal_Bool IsTest9() { return bTest9; }
+ static inline void SetTest9( sal_Bool b ) { bTest9 = b; }
+ inline sal_Bool IsTest10() const { return bTest10; }
+ inline void SetTest10( sal_Bool b ) { bTest10 = b; }
#endif
- inline USHORT GetZoom() const { return nZoom; }
- inline void SetZoom( USHORT n ){ nZoom = n; }
+ inline sal_uInt16 GetZoom() const { return nZoom; }
+ inline void SetZoom( sal_uInt16 n ){ nZoom = n; }
void DrawRect( OutputDevice* pOut, const SwRect &rRect, long nCol ) const;
void DrawRectPrinter( OutputDevice* pOut, const SwRect& rRect ) const;
SwViewOption& operator=( const SwViewOption &rOpt );
// Vergleichsmethoden
- BOOL IsEqualFlags ( const SwViewOption &rOpt ) const;
- inline BOOL operator == ( const SwViewOption &rOpt ) const;
- inline BOOL operator != ( const SwViewOption &rOpt ) const { return !(*this == rOpt); }
+ sal_Bool IsEqualFlags ( const SwViewOption &rOpt ) const;
+ inline sal_Bool operator == ( const SwViewOption &rOpt ) const;
+ inline sal_Bool operator != ( const SwViewOption &rOpt ) const { return !(*this == rOpt); }
/*---------------------------------------------------------------------------
Optionen aus nUIOptions
----------------------------------------------------------------------------*/
- BOOL IsViewVScrollBar() const
- { return nUIOptions & VIEWOPT_2_VSCROLLBAR ? TRUE : FALSE; }
- BOOL IsViewHScrollBar() const
- { return nUIOptions & VIEWOPT_2_HSCROLLBAR ? TRUE : FALSE; }
- BOOL IsKeepRatio() const
- { return nUIOptions & VIEWOPT_2_KEEPASPECTRATIO ? TRUE : FALSE; }
- BOOL IsGrfKeepZoom() const
- { return nUIOptions & VIEWOPT_2_GRFKEEPZOOM ? TRUE : FALSE; }
- BOOL IsPreventTips() const
- { return nUIOptions & VIEWOPT_2_PREVENT_TIPS ? TRUE : FALSE; }
- BOOL IsPrtFormat() const
- { return nUIOptions & VIEWOPT_2_PRTFORMAT ? TRUE : FALSE; }
+ sal_Bool IsViewVScrollBar() const
+ { return nUIOptions & VIEWOPT_2_VSCROLLBAR ? sal_True : sal_False; }
+ sal_Bool IsViewHScrollBar() const
+ { return nUIOptions & VIEWOPT_2_HSCROLLBAR ? sal_True : sal_False; }
+ sal_Bool IsKeepRatio() const
+ { return nUIOptions & VIEWOPT_2_KEEPASPECTRATIO ? sal_True : sal_False; }
+ sal_Bool IsGrfKeepZoom() const
+ { return nUIOptions & VIEWOPT_2_GRFKEEPZOOM ? sal_True : sal_False; }
+ sal_Bool IsPreventTips() const
+ { return nUIOptions & VIEWOPT_2_PREVENT_TIPS ? sal_True : sal_False; }
+ sal_Bool IsPrtFormat() const
+ { return nUIOptions & VIEWOPT_2_PRTFORMAT ? sal_True : sal_False; }
SvxZoomType GetZoomType() const { return eZoom; }
- BYTE GetTblDest() const { return nTblDest; }
+ sal_uInt8 GetTblDest() const { return nTblDest; }
- void SetViewVScrollBar(BOOL b)
+ void SetViewVScrollBar(sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_VSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_VSCROLLBAR); }
- void SetViewHScrollBar(BOOL b)
+ void SetViewHScrollBar(sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_HSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_HSCROLLBAR); }
- void SetKeepRatio (BOOL b)
+ void SetKeepRatio (sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_KEEPASPECTRATIO ) : ( nUIOptions &= ~VIEWOPT_2_KEEPASPECTRATIO); }
- void SetGrfKeepZoom (BOOL b)
+ void SetGrfKeepZoom (sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_GRFKEEPZOOM ) : ( nUIOptions &= ~VIEWOPT_2_GRFKEEPZOOM); }
- void SetPreventTips( BOOL b)
+ void SetPreventTips( sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_PREVENT_TIPS) : (nUIOptions &= ~VIEWOPT_2_PREVENT_TIPS); }
- void SetPrtFormat( BOOL b)
+ void SetPrtFormat( sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_PRTFORMAT) : (nUIOptions &= ~VIEWOPT_2_PRTFORMAT); }
void SetZoomType (SvxZoomType eZoom_){ eZoom = eZoom_; }
- void SetTblDest( BYTE nNew ) { nTblDest = nNew; }
+ void SetTblDest( sal_uInt8 nNew ) { nTblDest = nNew; }
const String& GetSymbolFont() const {return sSymbolFont;}
void SetSymbolFont(const String& sSet) {sSymbolFont = sSet;}
@@ -505,56 +505,56 @@ public:
const Color& GetRetoucheColor() const { return aRetoucheColor;}
void SetRetoucheColor(const Color&r) { aRetoucheColor = r; }
- BOOL IsViewAnyRuler() const {return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER);}
- void SetViewAnyRuler(BOOL bSet)
+ sal_Bool IsViewAnyRuler() const {return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER);}
+ void SetViewAnyRuler(sal_Bool bSet)
{ bSet ? (nUIOptions |= VIEWOPT_2_ANY_RULER) : (nUIOptions &= ~VIEWOPT_2_ANY_RULER);}
- BOOL IsViewHRuler(BOOL bDirect = FALSE) const
+ sal_Bool IsViewHRuler(sal_Bool bDirect = sal_False) const
{
- BOOL bRet = sal::static_int_cast< BOOL >( bDirect ?
+ sal_Bool bRet = sal::static_int_cast< sal_Bool >( bDirect ?
0 != (nUIOptions & VIEWOPT_2_H_RULER) :
!bReadonly ?
(nUIOptions & (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)
- : FALSE );
+ : sal_False );
return bRet;
}
- void SetViewHRuler (BOOL b)
+ void SetViewHRuler (sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_H_RULER ) : ( nUIOptions &= ~VIEWOPT_2_H_RULER);}
- BOOL IsViewVRuler(BOOL bDirect = FALSE) const
+ sal_Bool IsViewVRuler(sal_Bool bDirect = sal_False) const
{
- BOOL bRet = sal::static_int_cast< BOOL >( bDirect ?
+ sal_Bool bRet = sal::static_int_cast< sal_Bool >( bDirect ?
0 !=(nUIOptions & VIEWOPT_2_V_RULER) :
!bReadonly ?
(nUIOptions &
(VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)
- : FALSE );
+ : sal_False );
return bRet;
}
- void SetViewVRuler (BOOL b)
+ void SetViewVRuler (sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_V_RULER ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER);}
// ShadowCursor ein schalten/abfragen/Farbe setzen/Modus setzen
- BOOL IsShadowCursor() const
- { return nUIOptions & VIEWOPT_2_SHADOWCRSR ? TRUE : FALSE; }
- void SetShadowCursor(BOOL b)
+ sal_Bool IsShadowCursor() const
+ { return nUIOptions & VIEWOPT_2_SHADOWCRSR ? sal_True : sal_False; }
+ void SetShadowCursor(sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_SHADOWCRSR ) : ( nUIOptions &= ~VIEWOPT_2_SHADOWCRSR); }
//move vertical ruler to the right
- BOOL IsVRulerRight() const
- { return nUIOptions & VIEWOPT_2_V_RULER_RIGHT ? TRUE : FALSE; }
- void SetVRulerRight(BOOL b)
+ sal_Bool IsVRulerRight() const
+ { return nUIOptions & VIEWOPT_2_V_RULER_RIGHT ? sal_True : sal_False; }
+ void SetVRulerRight(sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_V_RULER_RIGHT ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER_RIGHT); }
- BOOL IsStarOneSetting() const {return bStarOneSetting; }
- void SetStarOneSetting(BOOL bSet) {bStarOneSetting = bSet; }
+ sal_Bool IsStarOneSetting() const {return bStarOneSetting; }
+ void SetStarOneSetting(sal_Bool bSet) {bStarOneSetting = bSet; }
- BOOL IsPagePreview() const {return bIsPagePreview; }
- void SetPagePreview(BOOL bSet) { bIsPagePreview= bSet; }
+ sal_Bool IsPagePreview() const {return bIsPagePreview; }
+ void SetPagePreview(sal_Bool bSet) { bIsPagePreview= bSet; }
- BYTE GetShdwCrsrFillMode() const { return nShdwCrsrFillMode; }
- void SetShdwCrsrFillMode( BYTE nMode ) { nShdwCrsrFillMode = nMode; };
+ sal_uInt8 GetShdwCrsrFillMode() const { return nShdwCrsrFillMode; }
+ void SetShdwCrsrFillMode( sal_uInt8 nMode ) { nShdwCrsrFillMode = nMode; };
sal_Bool IsShowPlaceHolderFields() const { return bShowPlaceHolderFields; }
void SetShowPlaceHolderFields(sal_Bool bSet) { bShowPlaceHolderFields = bSet; }
@@ -576,26 +576,26 @@ public:
static Color& GetSectionBoundColor();
static Color& GetPageBreakColor();
- static BOOL IsAppearanceFlag(sal_Int32 nFlag);
+ static sal_Bool IsAppearanceFlag(sal_Int32 nFlag);
- static BOOL IsDocBoundaries() {return IsAppearanceFlag(VIEWOPT_DOC_BOUNDARIES);}
- static BOOL IsObjectBoundaries(){return IsAppearanceFlag(VIEWOPT_OBJECT_BOUNDARIES);}
- static BOOL IsTableBoundaries() {return IsAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES );}
- static BOOL IsIndexShadings() {return IsAppearanceFlag(VIEWOPT_INDEX_SHADINGS );}
- static BOOL IsLinks() {return IsAppearanceFlag(VIEWOPT_LINKS );}
- static BOOL IsVisitedLinks() {return IsAppearanceFlag(VIEWOPT_VISITED_LINKS );}
- static BOOL IsFieldShadings() {return IsAppearanceFlag(VIEWOPT_FIELD_SHADINGS);}
- static BOOL IsSectionBoundaries() {return IsAppearanceFlag(VIEWOPT_SECTION_BOUNDARIES);}
+ static sal_Bool IsDocBoundaries() {return IsAppearanceFlag(VIEWOPT_DOC_BOUNDARIES);}
+ static sal_Bool IsObjectBoundaries(){return IsAppearanceFlag(VIEWOPT_OBJECT_BOUNDARIES);}
+ static sal_Bool IsTableBoundaries() {return IsAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES );}
+ static sal_Bool IsIndexShadings() {return IsAppearanceFlag(VIEWOPT_INDEX_SHADINGS );}
+ static sal_Bool IsLinks() {return IsAppearanceFlag(VIEWOPT_LINKS );}
+ static sal_Bool IsVisitedLinks() {return IsAppearanceFlag(VIEWOPT_VISITED_LINKS );}
+ static sal_Bool IsFieldShadings() {return IsAppearanceFlag(VIEWOPT_FIELD_SHADINGS);}
+ static sal_Bool IsSectionBoundaries() {return IsAppearanceFlag(VIEWOPT_SECTION_BOUNDARIES);}
- static void SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInConfig = FALSE);
+ static void SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bSaveInConfig = sal_False);
- void SetDocBoundaries(BOOL bSet) {SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bSet);}
+ void SetDocBoundaries(sal_Bool bSet) {SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bSet);}
static void ApplyColorConfigValues(const svtools::ColorConfig& rConfig);
};
-inline BOOL SwViewOption::operator==( const SwViewOption &rOpt ) const
+inline sal_Bool SwViewOption::operator==( const SwViewOption &rOpt ) const
{
return IsEqualFlags( rOpt ) && nZoom == rOpt.GetZoom();
}
@@ -609,7 +609,7 @@ inline void SwViewOption::SetUIOptions( const SwViewOption& rVOpt )
// Hilfsfunktion zur Ermittlung der HTML-Faehigkeiten
-SW_DLLPUBLIC USHORT GetHtmlMode(const SwDocShell*);
+SW_DLLPUBLIC sal_uInt16 GetHtmlMode(const SwDocShell*);
#endif
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 480876904d59..26300f99e24d 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -114,7 +114,7 @@ class SW_DLLPUBLIC ViewShell : public Ring
//Umsetzen der SwVisArea, damit vor dem Drucken sauber formatiert
//werden kann.
- friend void SetSwVisArea( ViewShell *pSh, const SwRect &, BOOL bPDFExport = FALSE );
+ friend void SetSwVisArea( ViewShell *pSh, const SwRect &, sal_Bool bPDFExport = sal_False );
// --> PB 2007-05-30 #146850#
static BitmapEx* pReplaceBmp; // replaced display of still loaded images
@@ -272,7 +272,7 @@ public:
Point GetPagePos( sal_uInt16 nPageNum ) const;
sal_uInt16 GetNumPages(); //Anzahl der aktuellen Seiten Layout erfragen.
- sal_Bool IsDummyPage( USHORT nPageNum ) const; // An empty page?
+ sal_Bool IsDummyPage( sal_uInt16 nPageNum ) const; // An empty page?
//Invalidierung der ersten Sichtbaren Seite fuer alle Shells im Ring.
void SetFirstVisPageInvalid();
@@ -503,7 +503,7 @@ public:
//wenn sich der BrowdseModus aendert, bBrowseChgd == sal_True
//oder, im BrowseModus, wenn sich die Groessenverhaeltnisse
//aendern (bBrowseChgd == sal_False)
- void CheckBrowseView( BOOL bBrowseChgd );
+ void CheckBrowseView( sal_Bool bBrowseChgd );
const Size& GetBrowseBorder() const;
sal_Int32 GetBrowseWidth() const;
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index 827671a7f94e..0dc52572d40e 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -45,11 +45,11 @@ class SwVisCrsr
friend void _InitCore();
friend void _FinitCore();
- BOOL bIsVisible : 1;
- BOOL bIsDragCrsr : 1;
+ sal_Bool bIsVisible : 1;
+ sal_Bool bIsDragCrsr : 1;
#ifdef SW_CRSR_TIMER
- BOOL bTimerOn : 1;
+ sal_Bool bTimerOn : 1;
#endif
Cursor aTxtCrsr;
@@ -67,11 +67,11 @@ public:
void Show();
void Hide();
- BOOL IsVisible() const { return bIsVisible; }
- void SetDragCrsr( BOOL bFlag = TRUE ) { bIsDragCrsr = bFlag; }
+ sal_Bool IsVisible() const { return bIsVisible; }
+ void SetDragCrsr( sal_Bool bFlag = sal_True ) { bIsDragCrsr = bFlag; }
#ifdef SW_CRSR_TIMER
- BOOL ChgTimerFlag( BOOL bTimerOn = TRUE );
+ sal_Bool ChgTimerFlag( sal_Bool bTimerOn = sal_True );
#endif
};
@@ -159,15 +159,15 @@ public:
virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO
virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
- BOOL UpDown( BOOL bUp, USHORT nCnt = 1 );
+ sal_Bool UpDown( sal_Bool bUp, sal_uInt16 nCnt = 1 );
- // TRUE: an die Position kann der Cursor gesetzt werden
- virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
+ // sal_True: an die Position kann der Cursor gesetzt werden
+ virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
#ifdef DBG_UTIL
// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
// am sichtbaren Cursor
- virtual BOOL IsSelOvr( int eFlags =
+ virtual sal_Bool IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
@@ -197,7 +197,7 @@ public:
virtual void FillRects(); // fuer Table- und normalen Crsr
// Pruefe, ob sich der SPoint innerhalb der Tabellen-SSelection befindet
- BOOL IsInside( const Point& rPt ) const;
+ sal_Bool IsInside( const Point& rPt ) const;
virtual void SetMark();
virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
@@ -205,13 +205,13 @@ public:
virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO
virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
- // TRUE: an die Position kann der Cursor gesetzt werden
- virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
+ // sal_True: an die Position kann der Cursor gesetzt werden
+ virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
#ifdef DBG_UTIL
// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
// am sichtbaren Cursor
- virtual BOOL IsSelOvr( int eFlags =
+ virtual sal_Bool IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
diff --git a/sw/inc/wdocsh.hxx b/sw/inc/wdocsh.hxx
index fe066a6b010c..7b97317bc23b 100644
--- a/sw/inc/wdocsh.hxx
+++ b/sw/inc/wdocsh.hxx
@@ -32,7 +32,7 @@
class SW_DLLPUBLIC SwWebDocShell: public SwDocShell
{
- USHORT nSourcePara; // aktive Zeile in der SourceView
+ sal_uInt16 nSourcePara; // aktive Zeile in der SourceView
public:
@@ -53,9 +53,9 @@ public:
String * pUserName,
sal_Int32 nFileFormat,
sal_Bool bTemplate = sal_False ) const;
- USHORT GetSourcePara()const
+ sal_uInt16 GetSourcePara()const
{return nSourcePara;}
- void SetSourcePara(USHORT nSet) {nSourcePara = nSet;}
+ void SetSourcePara(sal_uInt16 nSet) {nSourcePara = nSet;}
};
#endif
diff --git a/sw/qa/core/Test-BigPtrArray.cxx b/sw/qa/core/Test-BigPtrArray.cxx
index 4b5394a77d3c..4e828bb980b9 100644
--- a/sw/qa/core/Test-BigPtrArray.cxx
+++ b/sw/qa/core/Test-BigPtrArray.cxx
@@ -68,7 +68,7 @@ namespace /* private */
count_ = newCount;
}
- ULONG Position() const
+ sal_uLong Position() const
{
return GetPos();
}
@@ -77,7 +77,7 @@ namespace /* private */
int count_;
};
- BOOL AddToCount(const ElementPtr& rElem, void* pArgs)
+ sal_Bool AddToCount(const ElementPtr& rElem, void* pArgs)
{
BigPtrEntryMock* const pbem = static_cast<BigPtrEntryMock* const>(rElem);
pbem->setCount(pbem->getCount() + *((int*)pArgs));
@@ -94,7 +94,7 @@ namespace /* private */
#endif
}
- void fillBigPtrArray(BigPtrArray& bparr, ULONG numEntries)
+ void fillBigPtrArray(BigPtrArray& bparr, sal_uLong numEntries)
{
for (int i = 0; i < numEntries; i++)
bparr.Insert(new BigPtrEntryMock(i), bparr.Count());
@@ -162,7 +162,7 @@ public:
for (int i = 0; i < NUM_ENTRIES; i++)
{
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
bparr.Insert(new BigPtrEntryMock(i), 0);
CPPUNIT_ASSERT_MESSAGE
(
@@ -203,7 +203,7 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
bparr.Insert(new BigPtrEntryMock(NUM_ENTRIES), bparr.Count() / 2);
@@ -277,7 +277,7 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
bparr.Insert(new BigPtrEntryMock(NUM_ENTRIES), bparr.Count());
CPPUNIT_ASSERT_MESSAGE
@@ -309,7 +309,7 @@ public:
for (int i = 0; i < NUM_ENTRIES; i++)
{
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
delete bparr[0]; // release content
bparr.Remove(0); // remove item from container
@@ -352,7 +352,7 @@ public:
for (int i = NUM_ENTRIES - 1; i >= 0; i--)
{
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
delete bparr[i];
bparr.Remove(i);
@@ -394,7 +394,7 @@ public:
while (bparr.Count())
{
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
int oldElement = static_cast<BigPtrEntryMock*>(bparr[bparr.Count() / 2])->getCount();
delete bparr[bparr.Count() / 2];
@@ -437,8 +437,8 @@ public:
while(bparr.Count())
{
- ULONG nRemove = (bparr.Count() > 3) ? 3 : bparr.Count();
- ULONG oldCount = bparr.Count();
+ sal_uLong nRemove = (bparr.Count() > 3) ? 3 : bparr.Count();
+ sal_uLong oldCount = bparr.Count();
for (int i = 0; i < nRemove; i++)
delete bparr[i];
diff --git a/sw/qa/core/bigpointerarray-new.cxx b/sw/qa/core/bigpointerarray-new.cxx
index 28501f4c3f4a..a769a8e3fae0 100644
--- a/sw/qa/core/bigpointerarray-new.cxx
+++ b/sw/qa/core/bigpointerarray-new.cxx
@@ -36,19 +36,19 @@ BigPtrArray::BigPtrArray()
//container_.reserve(1000);
}
-ULONG BigPtrArray::Count() const
+sal_uLong BigPtrArray::Count() const
{
return container_.size();
}
-void BigPtrArray::Move(ULONG fromPos, ULONG toPos)
+void BigPtrArray::Move(sal_uLong fromPos, sal_uLong toPos)
{
DBG_ASSERT(fromPos < container_.size() && toPos < container_.size(), "BigPtrArray.Move precondition violation");
Insert(container_[fromPos], toPos);
Remove(toPos < fromPos ? fromPos + 1 : fromPos, 1);
}
-void BigPtrArray::ForEach(ULONG fromPos, ULONG toPos, FnForEach fn, void* pArgs)
+void BigPtrArray::ForEach(sal_uLong fromPos, sal_uLong toPos, FnForEach fn, void* pArgs)
{
DBG_ASSERT(fromPos < toPos && fromPos < container_.size() && toPos < container_.size(), "BigPtrArray::ForEach precondition violation");
Container_t::const_iterator iter = container_.begin() + fromPos;
@@ -65,13 +65,13 @@ void BigPtrArray::ForEach(FnForEach fn, void* pArgs)
fn(*iter, pArgs);
}
-ElementPtr BigPtrArray::operator[](ULONG pos) const
+ElementPtr BigPtrArray::operator[](sal_uLong pos) const
{
DBG_ASSERT(pos < container_.size(), "BigPtrArray::operator[] precondition violation");
return container_[pos];
}
-void BigPtrArray::Insert(const ElementPtr& rElem, ULONG pos)
+void BigPtrArray::Insert(const ElementPtr& rElem, sal_uLong pos)
{
DBG_ASSERT(pos <= container_.size(), "BigPtrArray::Insert precondition violation");
@@ -87,14 +87,14 @@ void BigPtrArray::Insert(const ElementPtr& rElem, ULONG pos)
}
}
-void BigPtrArray::Remove( ULONG pos, ULONG n )
+void BigPtrArray::Remove( sal_uLong pos, sal_uLong n )
{
DBG_ASSERT((pos < container_.size()) && ((container_.begin() + pos + n) < container_.end()), "BigPtrArray.Remove precondition violation")
container_.erase(container_.begin() + pos, container_.begin() + pos + n);
FixElementIndizes(container_.begin(), container_.end());
}
-void BigPtrArray::Replace(ULONG pos, const ElementPtr& rElem)
+void BigPtrArray::Replace(sal_uLong pos, const ElementPtr& rElem)
{
DBG_ASSERT(pos < container_.size(), "BigPtrArray::Replace precondition violation");
rElem->pBigPtrArray_ = this;
diff --git a/sw/qa/core/bigpointerarray-new.hxx b/sw/qa/core/bigpointerarray-new.hxx
index 9e639ad96f16..af6805880fe8 100644
--- a/sw/qa/core/bigpointerarray-new.hxx
+++ b/sw/qa/core/bigpointerarray-new.hxx
@@ -41,7 +41,7 @@ class BigPtrEntry
{
friend class BigPtrArray;
BigPtrArray* pBigPtrArray_;
- ULONG pos_;
+ sal_uLong pos_;
protected:
BigPtrEntry() : pBigPtrArray_(0), pos_(0)
@@ -50,7 +50,7 @@ protected:
virtual ~BigPtrEntry()
{}
- ULONG GetPos() const
+ sal_uLong GetPos() const
{
return pos_;
}
@@ -62,7 +62,7 @@ protected:
};
typedef BigPtrEntry* ElementPtr;
-typedef BOOL (*FnForEach)(const ElementPtr&, void* pArgs);
+typedef sal_Bool (*FnForEach)(const ElementPtr&, void* pArgs);
/** A container abstraction
*/
@@ -79,7 +79,7 @@ public:
/** Return the number of entries inserted
into the array
*/
- ULONG Count() const;
+ sal_uLong Count() const;
/** Insert an Element into the array at a certain
position
@@ -93,7 +93,7 @@ public:
@pre (pos >= 0 && pos <= BigPtrArray.Count())
@post (((oldCount + 1) == BigPtrArray.Count()) && BigPtrArray[pos] == rElem)
*/
- void Insert(const ElementPtr& rElem, ULONG pos);
+ void Insert(const ElementPtr& rElem, sal_uLong pos);
/** Remove a specified number of elements starting at a certain position.
@@ -106,7 +106,7 @@ public:
@pre (pos < BigPtrArray.Count() && n <= BigPtrArray.Count())
@post ((oldCount - n) == BigPtrArray.Count())
*/
- void Remove(ULONG pos, ULONG n = 1);
+ void Remove(sal_uLong pos, sal_uLong n = 1);
/** Move an entry from a certain position to another on.
@@ -116,7 +116,7 @@ public:
@param to
[in]
*/
- void Move(ULONG fromPos, ULONG toPos);
+ void Move(sal_uLong fromPos, sal_uLong toPos);
/** Replace an entry at a certain position
@@ -129,7 +129,7 @@ public:
@pre pos < BigPtrArray.Count()
@post (oldCount == BigPtrArray.Count() && BigPtrArray[pos] == rElem)
*/
- void Replace(ULONG pos, const ElementPtr& rElem);
+ void Replace(sal_uLong pos, const ElementPtr& rElem);
/** Get the entry at a certain index
@@ -138,7 +138,7 @@ public:
@pre pos < BigPtrArray.Count()
*/
- ElementPtr operator[](ULONG pos) const;
+ ElementPtr operator[](sal_uLong pos) const;
/**
*/
@@ -146,7 +146,7 @@ public:
/**
*/
- void ForEach(ULONG fromPos, ULONG toPos, FnForEach fn, void* pArgs = NULL);
+ void ForEach(sal_uLong fromPos, sal_uLong toPos, FnForEach fn, void* pArgs = NULL);
private:
diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx
index d4a9dc0a07d0..cec279e73096 100644
--- a/sw/source/core/SwNumberTree/SwNodeNum.cxx
+++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx
@@ -376,7 +376,7 @@ SwNumberTree::tSwNumTreeNumber SwNodeNum::GetStartValue() const
if (nLevel >= 0 && nLevel < MAXLEVEL)
{
- const SwNumFmt * pFmt = pRule->GetNumFmt( static_cast<USHORT>(nLevel));
+ const SwNumFmt * pFmt = pRule->GetNumFmt( static_cast<sal_uInt16>(nLevel));
if (pFmt)
aResult = pFmt->GetStart();
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index e0d3945e0a51..4d9fb4d60e2e 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -319,7 +319,7 @@ SwAccessibleDocument::SwAccessibleDocument ( SwAccessibleMap* pInitMap ) :
if( pWin )
{
pWin->AddChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
- USHORT nCount = pWin->GetChildCount();
+ sal_uInt16 nCount = pWin->GetChildCount();
for( sal_uInt16 i=0; i < nCount; i++ )
{
Window* pChildWin = pWin->GetChild( i );
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 0d7ab98d3b03..df33bbeaf2fa 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -2690,7 +2690,7 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas()
pFEShell->IsObjSelected() == 0 ) )
{
// get cursor without updating an existing table cursor.
- pCrsr = pCrsrShell->GetCrsr( FALSE );
+ pCrsr = pCrsrShell->GetCrsr( sal_False );
}
}
}
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 368e076470ab..1a1d7312de02 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -151,7 +151,7 @@ sal_Int32 SwAccessibleParagraph::GetCaretPos()
{
// same node? Then check whether it's also within 'our' part
// of the paragraph
- USHORT nIndex = pPoint->nContent.GetIndex();
+ sal_uInt16 nIndex = pPoint->nContent.GetIndex();
if( GetPortionData().IsValidCorePosition( nIndex ) )
{
// Yes, it's us!
@@ -195,7 +195,7 @@ sal_Bool SwAccessibleParagraph::GetSelection(
{
// get SwPosition for my node
const SwTxtNode* pNode = GetTxtNode();
- ULONG nHere = pNode->GetIndex();
+ sal_uLong nHere = pNode->GetIndex();
// iterate over ring
SwPaM* pRingStart = pCrsr;
@@ -206,9 +206,9 @@ sal_Bool SwAccessibleParagraph::GetSelection(
{
// check whether nHere is 'inside' pCrsr
SwPosition* pStart = pCrsr->Start();
- ULONG nStartIndex = pStart->nNode.GetIndex();
+ sal_uLong nStartIndex = pStart->nNode.GetIndex();
SwPosition* pEnd = pCrsr->End();
- ULONG nEndIndex = pEnd->nNode.GetIndex();
+ sal_uLong nEndIndex = pEnd->nNode.GetIndex();
if( ( nHere >= nStartIndex ) &&
( nHere <= nEndIndex ) )
{
@@ -230,7 +230,7 @@ sal_Bool SwAccessibleParagraph::GetSelection(
// selection starts in this node:
// then check whether it's before or inside our part of
// the paragraph, and if so, get the proper position
- USHORT nCoreStart = pStart->nContent.GetIndex();
+ sal_uInt16 nCoreStart = pStart->nContent.GetIndex();
if( nCoreStart <
GetPortionData().GetFirstValidCorePosition() )
{
@@ -266,7 +266,7 @@ sal_Bool SwAccessibleParagraph::GetSelection(
// selection ends in this node: then select everything
// before our part of the node
- USHORT nCoreEnd = pEnd->nContent.GetIndex();
+ sal_uInt16 nCoreEnd = pEnd->nContent.GetIndex();
if( nCoreEnd >
GetPortionData().GetLastValidCorePosition() )
{
@@ -329,7 +329,7 @@ SwPaM* SwAccessibleParagraph::GetCursor( const bool _bForSelection )
!(pFESh->IsFrmSelected() || pFESh->IsObjSelected() > 0) )
{
// get the selection, and test whether it affects our text node
- pCrsr = pCrsrShell->GetCrsr( FALSE /* ??? */ );
+ pCrsr = pCrsrShell->GetCrsr( sal_False /* ??? */ );
}
}
@@ -563,7 +563,7 @@ void SwAccessibleParagraph::ClearPortionData()
}
-void SwAccessibleParagraph::ExecuteAtViewShell( UINT16 nSlot )
+void SwAccessibleParagraph::ExecuteAtViewShell( sal_uInt16 nSlot )
{
DBG_ASSERT( GetMap() != NULL, "no map?" );
ViewShell* pViewShell = GetMap()->GetShell();
@@ -597,8 +597,8 @@ SwXTextPortion* SwAccessibleParagraph::CreateUnoPortion(
IsValidRange(nStartIndex, nEndIndex, GetString().getLength()),
"please check parameters before calling this method" );
- USHORT nStart = GetPortionData().GetModelPosition( nStartIndex );
- USHORT nEnd = (nEndIndex == -1) ? (nStart + 1) :
+ sal_uInt16 nStart = GetPortionData().GetModelPosition( nStartIndex );
+ sal_uInt16 nEnd = (nEndIndex == -1) ? (nStart + 1) :
GetPortionData().GetModelPosition( nEndIndex );
// create UNO cursor
@@ -670,13 +670,13 @@ sal_Bool SwAccessibleParagraph::GetWordBoundary(
if( pBreakIt->GetBreakIter().is() )
{
// get locale for this position
- USHORT nModelPos = GetPortionData().GetModelPosition( nPos );
+ sal_uInt16 nModelPos = GetPortionData().GetModelPosition( nPos );
lang::Locale aLocale = pBreakIt->GetLocale(
GetTxtNode()->GetLang( nModelPos ) );
// which type of word are we interested in?
// (DICTIONARY_WORD includes punctuation, ANY_WORD doesn't.)
- const USHORT nWordType = i18n::WordType::ANY_WORD;
+ const sal_uInt16 nWordType = i18n::WordType::ANY_WORD;
// get word boundary, as the Break-Iterator sees fit.
rBound = pBreakIt->GetBreakIter()->getWordBoundary(
@@ -750,12 +750,12 @@ sal_Bool SwAccessibleParagraph::GetGlyphBoundary(
if( pBreakIt->GetBreakIter().is() )
{
// get locale for this position
- USHORT nModelPos = GetPortionData().GetModelPosition( nPos );
+ sal_uInt16 nModelPos = GetPortionData().GetModelPosition( nPos );
lang::Locale aLocale = pBreakIt->GetLocale(
GetTxtNode()->GetLang( nModelPos ) );
// get word boundary, as the Break-Iterator sees fit.
- const USHORT nIterMode = i18n::CharacterIteratorMode::SKIPCELL;
+ const sal_uInt16 nIterMode = i18n::CharacterIteratorMode::SKIPCELL;
sal_Int32 nDone = 0;
rBound.endPos = pBreakIt->GetBreakIter()->nextCharacters(
rText, nPos, aLocale, nIterMode, 1, nDone );
@@ -1532,9 +1532,9 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
{
const SwTxtNode* pTxtNode( GetTxtNode() );
SwPosition* pStartPos = new SwPosition( *pTxtNode );
- pStartPos->nContent.Assign( const_cast<SwTxtNode*>(pTxtNode), static_cast<USHORT>(nIndex) );
+ pStartPos->nContent.Assign( const_cast<SwTxtNode*>(pTxtNode), static_cast<sal_uInt16>(nIndex) );
SwPosition* pEndPos = new SwPosition( *pTxtNode );
- pEndPos->nContent.Assign( const_cast<SwTxtNode*>(pTxtNode), static_cast<USHORT>(nIndex+1) );
+ pEndPos->nContent.Assign( const_cast<SwTxtNode*>(pTxtNode), static_cast<sal_uInt16>(nIndex+1) );
pPaM = new SwPaM( *pStartPos, *pEndPos );
@@ -1550,7 +1550,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
// From the perspective of the a11y API the character attributes, which
// are set at the automatic paragraph style of the paragraph are treated
// as run attributes.
-// SwXTextCursor::GetCrsrAttr( *pPaM, aSet, TRUE, TRUE );
+// SwXTextCursor::GetCrsrAttr( *pPaM, aSet, sal_True, sal_True );
// get character attributes from automatic paragraph style and merge these into <aSet>
{
const SwTxtNode* pTxtNode( GetTxtNode() );
@@ -1559,7 +1559,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
SfxItemSet aAutomaticParaStyleCharAttrs( pPaM->GetDoc()->GetAttrPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END -1,
0 );
- aAutomaticParaStyleCharAttrs.Put( *(pTxtNode->GetpSwAttrSet()), FALSE );
+ aAutomaticParaStyleCharAttrs.Put( *(pTxtNode->GetpSwAttrSet()), sal_False );
aSet.Put( aAutomaticParaStyleCharAttrs );
}
}
@@ -1568,7 +1568,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
SfxItemSet aCharAttrsAtPaM( pPaM->GetDoc()->GetAttrPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END -1,
0 );
- SwUnoCursorHelper::GetCrsrAttr(*pPaM, aCharAttrsAtPaM, TRUE, TRUE);
+ SwUnoCursorHelper::GetCrsrAttr(*pPaM, aCharAttrsAtPaM, sal_True, sal_True);
aSet.Put( aCharAttrsAtPaM );
}
// <--
@@ -1593,7 +1593,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
// --> OD 2007-11-12 #i82637#
// Found character attributes, whose value equals the value of
// the corresponding default character attributes, are excluded.
- if ( aSet.GetItemState( aPropIt->nWID, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( aSet.GetItemState( aPropIt->nWID, sal_True, &pItem ) == SFX_ITEM_SET )
{
uno::Any aVal;
pItem->QueryValue( aVal, aPropIt->nMemberId );
@@ -1696,12 +1696,12 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds(
// get model position & prepare GetCharRect() arguments
SwCrsrMoveState aMoveState;
- aMoveState.bRealHeight = TRUE;
- aMoveState.bRealWidth = TRUE;
+ aMoveState.bRealHeight = sal_True;
+ aMoveState.bRealWidth = sal_True;
SwSpecialPos aSpecialPos;
SwTxtNode* pNode = const_cast<SwTxtNode*>( GetTxtNode() );
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
/* #i12332# FillSpecialPos does not accept nIndex ==
GetString().getLength(). In that case nPos is set to the
@@ -1793,7 +1793,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint )
DBG_ASSERT( GetFrm()->IsTxtFrm(), "The text frame has mutated!" );
const SwTxtFrm* pFrm = static_cast<const SwTxtFrm*>( GetFrm() );
SwCrsrMoveState aMoveState;
- aMoveState.bPosMatchesBounds = TRUE;
+ aMoveState.bPosMatchesBounds = sal_True;
sal_Bool bSuccess = pFrm->GetCrsrOfst( &aPos, aCorePoint, &aMoveState );
SwIndex aCntntIdx = aPos.nContent;
@@ -2126,7 +2126,7 @@ sal_Bool SwAccessibleParagraph::replaceText(
SwTxtNode* pNode = const_cast<SwTxtNode*>( GetTxtNode() );
// translate positions
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
sal_Bool bSuccess = GetPortionData().GetEditableRange(
nStartIndex, nEndIndex, nStart, nEnd );
diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx
index 7e07fa132d05..3d3f0bed687f 100644
--- a/sw/source/core/access/accpara.hxx
+++ b/sw/source/core/access/accpara.hxx
@@ -120,7 +120,7 @@ class SwAccessibleParagraph :
SwPaM* GetCursor( const bool _bForSelection );
/// for cut/copy/paste: execute a particular slot at the view shell
- void ExecuteAtViewShell( UINT16 nSlot );
+ void ExecuteAtViewShell( sal_uInt16 nSlot );
/// helper method for get/setAttributes
/// (for the special case of (nEndIndex==-1) a single character will
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index 093d22136d81..c90fa9d4e34d 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -116,7 +116,7 @@ SwAccessiblePortionData::~SwAccessiblePortionData()
delete pSentences;
}
-void SwAccessiblePortionData::Text(USHORT nLength, USHORT nType)
+void SwAccessiblePortionData::Text(sal_uInt16 nLength, sal_uInt16 nType)
{
DBG_ASSERT( (nModelPosition + nLength) <= pTxtNode->GetTxt().Len(),
"portion exceeds model string!" );
@@ -138,7 +138,7 @@ void SwAccessiblePortionData::Text(USHORT nLength, USHORT nType)
// update buffer + nModelPosition
aBuffer.append( OUString(
pTxtNode->GetTxt().Copy(
- static_cast<USHORT>( nModelPosition ),
+ static_cast<sal_uInt16>( nModelPosition ),
nLength ) ) );
nModelPosition += nLength;
@@ -146,7 +146,7 @@ void SwAccessiblePortionData::Text(USHORT nLength, USHORT nType)
}
void SwAccessiblePortionData::Special(
- USHORT nLength, const String& rText, USHORT nType)
+ sal_uInt16 nLength, const String& rText, sal_uInt16 nType)
{
DBG_ASSERT( nModelPosition >= 0, "illegal position" );
DBG_ASSERT( (nModelPosition + nLength) <= pTxtNode->GetTxt().Len(),
@@ -226,7 +226,7 @@ void SwAccessiblePortionData::LineBreak()
aLineBreaks.push_back( aBuffer.getLength() );
}
-void SwAccessiblePortionData::Skip(USHORT nLength)
+void SwAccessiblePortionData::Skip(sal_uInt16 nLength)
{
DBG_ASSERT( !bFinished, "We are already done!" );
DBG_ASSERT( aModelPositions.size() == 0, "Never Skip() after portions" );
@@ -270,7 +270,7 @@ sal_Bool SwAccessiblePortionData::IsReadOnlyPortion( size_t nPortionNo ) const
return IsPortionAttrSet(nPortionNo, PORATTR_READONLY);
}
-sal_Bool SwAccessiblePortionData::IsGrayPortionType( USHORT nType ) const
+sal_Bool SwAccessiblePortionData::IsGrayPortionType( sal_uInt16 nType ) const
{
// gray portions?
// Compare with: inftxt.cxx, SwTxtPaintInfo::DrawViewOpt(...)
@@ -362,7 +362,7 @@ void SwAccessiblePortionData::GetLastLineBoundary(
FillBoundary( rBound, aLineBreaks, nBreaks <= 3 ? 0 : nBreaks-4 );
}
-USHORT SwAccessiblePortionData::GetModelPosition( sal_Int32 nPos ) const
+sal_uInt16 SwAccessiblePortionData::GetModelPosition( sal_Int32 nPos ) const
{
DBG_ASSERT( nPos >= 0, "illegal position" );
DBG_ASSERT( nPos <= sAccessibleString.getLength(), "illegal position" );
@@ -390,7 +390,7 @@ USHORT SwAccessiblePortionData::GetModelPosition( sal_Int32 nPos ) const
DBG_ASSERT( (nStartPos >= 0) && (nStartPos < USHRT_MAX),
"How can the SwTxtNode have so many characters?" );
- return static_cast<USHORT>(nStartPos);
+ return static_cast<sal_uInt16>(nStartPos);
}
void SwAccessiblePortionData::FillBoundary(
@@ -505,7 +505,7 @@ void SwAccessiblePortionData::GetSentenceBoundary(
{
pSentences->push_back( nCurrent );
- USHORT nModelPos = GetModelPosition( nCurrent );
+ sal_uInt16 nModelPos = GetModelPosition( nCurrent );
sal_Int32 nNew = pBreakIt->GetBreakIter()->endOfSentence(
sAccessibleString, nCurrent,
@@ -548,7 +548,7 @@ void SwAccessiblePortionData::GetAttributeBoundary(
}
-sal_Int32 SwAccessiblePortionData::GetAccessiblePosition( USHORT nPos ) const
+sal_Int32 SwAccessiblePortionData::GetAccessiblePosition( sal_uInt16 nPos ) const
{
DBG_ASSERT( nPos <= pTxtNode->GetTxt().Len(), "illegal position" );
@@ -583,14 +583,14 @@ sal_Int32 SwAccessiblePortionData::GetAccessiblePosition( USHORT nPos ) const
return nRet;
}
-USHORT SwAccessiblePortionData::FillSpecialPos(
+sal_uInt16 SwAccessiblePortionData::FillSpecialPos(
sal_Int32 nPos,
SwSpecialPos& rPos,
SwSpecialPos*& rpPos ) const
{
size_t nPortionNo = FindLastBreak( aAccessiblePositions, nPos );
- BYTE nExtend(SP_EXTEND_RANGE_NONE);
+ sal_uInt8 nExtend(SP_EXTEND_RANGE_NONE);
sal_Int32 nRefPos(0);
sal_Int32 nModelPos(0);
@@ -622,7 +622,7 @@ USHORT SwAccessiblePortionData::FillSpecialPos(
// if we have anything except plain text, compute nExtend + nRefPos
if( (nModelEndPos - nModelPos == 1) &&
- (pTxtNode->GetTxt().GetChar(static_cast<USHORT>(nModelPos)) !=
+ (pTxtNode->GetTxt().GetChar(static_cast<sal_uInt16>(nModelPos)) !=
sAccessibleString.getStr()[nPos]) )
{
// case 1: a one-character, non-text portion
@@ -666,41 +666,41 @@ USHORT SwAccessiblePortionData::FillSpecialPos(
// (if necessary)
size_t nRefLine = FindBreak( aLineBreaks, nRefPos );
size_t nMyLine = FindBreak( aLineBreaks, nPos );
- USHORT nLineOffset = static_cast<USHORT>( nMyLine - nRefLine );
+ sal_uInt16 nLineOffset = static_cast<sal_uInt16>( nMyLine - nRefLine );
if( nLineOffset != 0 )
nRefPos = aLineBreaks[ nMyLine ];
// fill char offset and 'special position'
- rPos.nCharOfst = static_cast<USHORT>( nPos - nRefPos );
+ rPos.nCharOfst = static_cast<sal_uInt16>( nPos - nRefPos );
rPos.nExtendRange = nExtend;
rPos.nLineOfst = nLineOffset;
}
- return static_cast<USHORT>( nModelPos );
+ return static_cast<sal_uInt16>( nModelPos );
}
void SwAccessiblePortionData::AdjustAndCheck(
sal_Int32 nPos,
size_t& nPortionNo,
- USHORT& nCorePos,
+ sal_uInt16& nCorePos,
sal_Bool& bEdit) const
{
// find portion and get mode position
nPortionNo = FindBreak( aAccessiblePositions, nPos );
- nCorePos = static_cast<USHORT>( aModelPositions[ nPortionNo ] );
+ nCorePos = static_cast<sal_uInt16>( aModelPositions[ nPortionNo ] );
// for special portions, make sure we're on a portion boundary
// for text portions, add the in-portion offset
if( IsSpecialPortion( nPortionNo ) )
bEdit &= nPos == aAccessiblePositions[nPortionNo];
else
- nCorePos = static_cast<USHORT>( nCorePos +
+ nCorePos = static_cast<sal_uInt16>( nCorePos +
nPos - aAccessiblePositions[nPortionNo] );
}
sal_Bool SwAccessiblePortionData::GetEditableRange(
sal_Int32 nStart, sal_Int32 nEnd,
- USHORT& nCoreStart, USHORT& nCoreEnd ) const
+ sal_uInt16& nCoreStart, sal_uInt16& nCoreEnd ) const
{
sal_Bool bIsEditable = sal_True;
@@ -735,19 +735,19 @@ sal_Bool SwAccessiblePortionData::GetEditableRange(
return bIsEditable;
}
-sal_Bool SwAccessiblePortionData::IsValidCorePosition( USHORT nPos ) const
+sal_Bool SwAccessiblePortionData::IsValidCorePosition( sal_uInt16 nPos ) const
{
// a position is valid its within the model positions that we know
return ( aModelPositions[0] <= nPos ) &&
( nPos <= aModelPositions[ aModelPositions.size()-1 ] );
}
-USHORT SwAccessiblePortionData::GetFirstValidCorePosition() const
+sal_uInt16 SwAccessiblePortionData::GetFirstValidCorePosition() const
{
- return static_cast<USHORT>( aModelPositions[0] );
+ return static_cast<sal_uInt16>( aModelPositions[0] );
}
-USHORT SwAccessiblePortionData::GetLastValidCorePosition() const
+sal_uInt16 SwAccessiblePortionData::GetLastValidCorePosition() const
{
- return static_cast<USHORT>( aModelPositions[ aModelPositions.size()-1 ] );
+ return static_cast<sal_uInt16>( aModelPositions[ aModelPositions.size()-1 ] );
}
diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx
index 807070a6573d..1e147ff2d99b 100644
--- a/sw/source/core/access/accportions.hxx
+++ b/sw/source/core/access/accportions.hxx
@@ -90,11 +90,11 @@ class SwAccessiblePortionData : public SwPortionHandler
sal_Bool IsPortionAttrSet( size_t nPortionNo, sal_uInt8 nAttr ) const;
sal_Bool IsSpecialPortion( size_t nPortionNo ) const;
sal_Bool IsReadOnlyPortion( size_t nPortionNo ) const;
- sal_Bool IsGrayPortionType( USHORT nType ) const;
+ sal_Bool IsGrayPortionType( sal_uInt16 nType ) const;
// helper method for GetEditableRange(...):
void AdjustAndCheck( sal_Int32 nPos, size_t& nPortionNo,
- USHORT& nCorePos, sal_Bool& bEdit ) const;
+ sal_uInt16& nCorePos, sal_Bool& bEdit ) const;
public:
SwAccessiblePortionData( const SwTxtNode* pTxtNd,
@@ -102,10 +102,10 @@ public:
virtual ~SwAccessiblePortionData();
// SwPortionHandler methods
- virtual void Text(USHORT nLength, USHORT nType);
- virtual void Special(USHORT nLength, const String& rText, USHORT nType);
+ virtual void Text(sal_uInt16 nLength, sal_uInt16 nType);
+ virtual void Special(sal_uInt16 nLength, const String& rText, sal_uInt16 nType);
virtual void LineBreak();
- virtual void Skip(USHORT nLength);
+ virtual void Skip(sal_uInt16 nLength);
virtual void Finish();
@@ -130,16 +130,16 @@ public:
/// get the position in the model string for a given
/// (accessibility) position
- USHORT GetModelPosition( sal_Int32 nPos ) const;
+ sal_uInt16 GetModelPosition( sal_Int32 nPos ) const;
/// get the position in the accessibility string for a given model position
- sal_Int32 GetAccessiblePosition( USHORT nPos ) const;
+ sal_Int32 GetAccessiblePosition( sal_uInt16 nPos ) const;
/// fill a SwSpecialPos structure, suitable for calling
/// SwTxtFrm->GetCharRect
/// Returns the core position, and fills thr rpPos either with NULL or
/// with the &rPos, after putting the appropriate data into it.
- USHORT FillSpecialPos( sal_Int32 nPos,
+ sal_uInt16 FillSpecialPos( sal_Int32 nPos,
SwSpecialPos& rPos,
SwSpecialPos*& rpPos ) const;
@@ -158,16 +158,16 @@ public:
/// or not at all. This can be used to test whether editing
/// that range would be legal
sal_Bool GetEditableRange( sal_Int32 nStart, sal_Int32 nEnd,
- USHORT& nCoreStart, USHORT& nCoreEnd ) const;
+ sal_uInt16& nCoreStart, sal_uInt16& nCoreEnd ) const;
/// Determine whether this core position is valid for these portions.
/// (A paragraph may be split into several frames, e.g. at page
/// boundaries. In this case, only part of a paragraph is represented
/// through this object. This method determines whether one particular
/// position is valid for this object or not.)
- sal_Bool IsValidCorePosition( USHORT nPos ) const;
- USHORT GetFirstValidCorePosition() const;
- USHORT GetLastValidCorePosition() const;
+ sal_Bool IsValidCorePosition( sal_uInt16 nPos ) const;
+ sal_uInt16 GetFirstValidCorePosition() const;
+ sal_uInt16 GetLastValidCorePosition() const;
};
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index 43befb2a3f86..8114f67ec3f0 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -1467,7 +1467,7 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild(
const SwTableLine* pUpper = pBox->GetUpper();
while( pUpper->GetUpper() != NULL )
pUpper = pUpper->GetUpper()->GetUpper();
- USHORT nPos =
+ sal_uInt16 nPos =
pSelectedTable->GetTable().GetTabLines().GetPos( pUpper );
if( nPos == USHRT_MAX )
pSelectedTable = NULL;
diff --git a/sw/source/core/access/parachangetrackinginfo.cxx b/sw/source/core/access/parachangetrackinginfo.cxx
index 7c1e25f05c93..465e4a01b3da 100644
--- a/sw/source/core/access/parachangetrackinginfo.cxx
+++ b/sw/source/core/access/parachangetrackinginfo.cxx
@@ -94,7 +94,7 @@ namespace {
// iteration over the redlines which overlap with the text node.
const SwRedlineTbl& rRedlineTbl = pIDocChangeTrack->GetRedlineTbl();
- const USHORT nRedlineCount( rRedlineTbl.Count() );
+ const sal_uInt16 nRedlineCount( rRedlineTbl.Count() );
for ( sal_uInt16 nActRedline = nIdxOfFirstRedlineForTxtNode;
nActRedline < nRedlineCount;
++nActRedline)
diff --git a/sw/source/core/access/textmarkuphelper.cxx b/sw/source/core/access/textmarkuphelper.cxx
index 408a22ebd8ba..90444e4cdca0 100644
--- a/sw/source/core/access/textmarkuphelper.cxx
+++ b/sw/source/core/access/textmarkuphelper.cxx
@@ -147,7 +147,7 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupTyp
if ( pTextMarkupList )
{
const SwWrongArea* pTextMarkup =
- pTextMarkupList->GetElement( static_cast<USHORT>(nTextMarkupIndex) );
+ pTextMarkupList->GetElement( static_cast<sal_uInt16>(nTextMarkupIndex) );
if ( pTextMarkup )
{
const ::rtl::OUString rText = mrPortionData.GetAccessibleString();
@@ -179,7 +179,7 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupTyp
// assumption:
// value of <nCharIndex> is in range [0..length of accessible text)
- const USHORT nCoreCharIndex = mrPortionData.GetModelPosition( nCharIndex );
+ const sal_uInt16 nCoreCharIndex = mrPortionData.GetModelPosition( nCharIndex );
// Handling of portions with core length == 0 at the beginning of the
// paragraph - e.g. numbering portion.
if ( mrPortionData.GetAccessiblePosition( nCoreCharIndex ) > nCharIndex )
@@ -198,11 +198,11 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupTyp
{
const ::rtl::OUString rText = mrPortionData.GetAccessibleString();
- const USHORT nTextMarkupCount = pTextMarkupList->Count();
- for ( USHORT nTextMarkupIdx = 0; nTextMarkupIdx < nTextMarkupCount; ++nTextMarkupIdx )
+ const sal_uInt16 nTextMarkupCount = pTextMarkupList->Count();
+ for ( sal_uInt16 nTextMarkupIdx = 0; nTextMarkupIdx < nTextMarkupCount; ++nTextMarkupIdx )
{
const SwWrongArea* pTextMarkup =
- pTextMarkupList->GetElement( static_cast<USHORT>(nTextMarkupIdx) );
+ pTextMarkupList->GetElement( static_cast<sal_uInt16>(nTextMarkupIdx) );
ASSERT( pTextMarkup,
"<SwTextMarkupHelper::getTextMarkup(..)> - missing <SwWrongArea> instance" );
if ( pTextMarkup &&
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index 65b11401b1da..bbdedfea13d4 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -58,8 +58,8 @@ SwClient::SwClient(SwModify *pToRegisterIn)
bModifyLocked =
bInModify =
bInDocDTOR =
- bInCache = FALSE;
- bInSwFntCache = FALSE;
+ bInCache = sal_False;
+ bInSwFntCache = sal_False;
if(pToRegisterIn)
pToRegisterIn->Add(this);
@@ -111,9 +111,9 @@ SwClient::~SwClient()
// erfrage vom Client Informationen
-BOOL SwClient::GetInfo( SfxPoolItem& ) const
+sal_Bool SwClient::GetInfo( SfxPoolItem& ) const
{
- return TRUE; // und weiter
+ return sal_True; // und weiter
}
/*************************************************************************
@@ -198,7 +198,7 @@ void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
{
if (IsInCache() || IsInSwFntCache())
{
- const USHORT nWhich = pOldValue ? pOldValue->Which() :
+ const sal_uInt16 nWhich = pOldValue ? pOldValue->Which() :
pNewValue ? pNewValue->Which() : 0;
CheckCaching( nWhich );
}
@@ -209,10 +209,10 @@ void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
LockModify();
#ifndef DBG_UTIL
- bInModify = TRUE;
+ bInModify = sal_True;
#else
if( !pOldValue )
- bInModify = TRUE;
+ bInModify = sal_True;
else
// following Modifies don't calls an ASSRT
switch( pOldValue->Which() )
@@ -226,10 +226,10 @@ void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
case RES_REFMARK_DELETED:
case RES_TOXMARK_DELETED:
case RES_FIELD_DELETED:
- bInModify = FALSE;
+ bInModify = sal_False;
break;
default:
- bInModify = TRUE;
+ bInModify = sal_True;
}
#endif
@@ -243,15 +243,15 @@ void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
break;
} while( 0 != ( pLast = aIter++ ));
- bInModify = FALSE;
+ bInModify = sal_False;
UnlockModify();
}
// erfrage vom Modify Informationen
-BOOL SwModify::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwModify::GetInfo( SfxPoolItem& rInfo ) const
{
- BOOL bRet = TRUE; // bedeutet weiter zum naechsten
+ sal_Bool bRet = sal_True; // bedeutet weiter zum naechsten
if( pRoot )
{
@@ -365,7 +365,7 @@ SwClient *SwModify::_Remove(SwClient * pDepend)
pDepend->pRight = 0;
}
else {
- ASSERT( FALSE, "SwModify::Remove(): pDepend nicht gefunden");
+ ASSERT( sal_False, "SwModify::Remove(): pDepend nicht gefunden");
}
pDepend->pRegisteredIn = 0;
return pDepend;
@@ -373,7 +373,7 @@ SwClient *SwModify::_Remove(SwClient * pDepend)
/*************************************************************************
-|* SwModify::CheckCaching( const USHORT nWhich )
+|* SwModify::CheckCaching( const sal_uInt16 nWhich )
|*
|* Ersterstellung JP 25.06.95
|* Letzte Aenderung JP 25.06.95
@@ -381,11 +381,11 @@ SwClient *SwModify::_Remove(SwClient * pDepend)
-void SwModify::CheckCaching( const USHORT nWhich )
+void SwModify::CheckCaching( const sal_uInt16 nWhich )
{
if (isCHRATR(nWhich))
{
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
}
else
switch ( nWhich )
@@ -393,7 +393,7 @@ void SwModify::CheckCaching( const USHORT nWhich )
case RES_OBJECTDYING:
case RES_FMT_CHG:
case RES_ATTRSET_CHG:
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
case RES_UL_SPACE:
case RES_LR_SPACE:
@@ -405,7 +405,7 @@ void SwModify::CheckCaching( const USHORT nWhich )
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
break;
}
@@ -452,9 +452,9 @@ void SwDepend::Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue )
// erfrage vom Modify Informationen
-BOOL SwDepend::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwDepend::GetInfo( SfxPoolItem& rInfo ) const
{
- return pToTell ? pToTell->GetInfo( rInfo ) : TRUE;
+ return pToTell ? pToTell->GetInfo( rInfo ) : sal_True;
}
/********************************************************************/
diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
index f492696ef8ac..cb5624b615e4 100644
--- a/sw/source/core/attr/cellatr.cxx
+++ b/sw/source/core/attr/cellatr.cxx
@@ -51,7 +51,7 @@
*************************************************************************/
-SwTblBoxNumFormat::SwTblBoxNumFormat( UINT32 nFormat, BOOL bFlag )
+SwTblBoxNumFormat::SwTblBoxNumFormat( sal_uInt32 nFormat, sal_Bool bFlag )
: SfxUInt32Item( RES_BOXATR_FORMAT, nFormat ), bAuto( bFlag )
{
}
@@ -139,7 +139,7 @@ void SwTblBoxFormula::ChangeState( const SfxPoolItem* pItem )
if( !pItem || RES_TABLEFML_UPDATE != pItem->Which() )
{
// setze bei allen das Value-Flag zurueck
- ChgValid( FALSE );
+ ChgValid( sal_False );
return ;
}
@@ -160,7 +160,7 @@ void SwTblBoxFormula::ChangeState( const SfxPoolItem* pItem )
// if( VF_CMD & pFld->GetFormat() )
// pFld->PtrToBoxNm( pUpdtFld->pTbl );
// else
- ChgValid( FALSE );
+ ChgValid( sal_False );
break;
case TBL_BOXNAME:
// ist es die gesuchte Tabelle ??
@@ -184,20 +184,20 @@ void SwTblBoxFormula::ChangeState( const SfxPoolItem* pItem )
case TBL_SPLITTBL:
if( &pTblNd->GetTable() == pUpdtFld->pTbl )
{
- USHORT nLnPos = SwTableFormula::GetLnPosInTbl(
+ sal_uInt16 nLnPos = SwTableFormula::GetLnPosInTbl(
pTblNd->GetTable(), GetTableBox() );
pUpdtFld->bBehindSplitLine = USHRT_MAX != nLnPos &&
pUpdtFld->nSplitLine <= nLnPos;
}
else
- pUpdtFld->bBehindSplitLine = FALSE;
+ pUpdtFld->bBehindSplitLine = sal_False;
// kein break
case TBL_MERGETBL:
if( pUpdtFld->pHistory )
{
// fuer die History brauche ich aber die unveraenderte Formel
SwTblBoxFormula aCopy( *this );
- pUpdtFld->bModified = FALSE;
+ pUpdtFld->bModified = sal_False;
ToSplitMergeBoxNm( *pUpdtFld );
if( pUpdtFld->bModified )
diff --git a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
index 48b9ad321e0e..fde57e74e2ff 100644
--- a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
+++ b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
@@ -77,7 +77,7 @@ SfxPoolItem* SwFmtWrapInfluenceOnObjPos::Clone( SfxItemPool * ) const
return new SwFmtWrapInfluenceOnObjPos(*this);
}
-BOOL SwFmtWrapInfluenceOnObjPos::QueryValue( Any& rVal, BYTE nMemberId ) const
+sal_Bool SwFmtWrapInfluenceOnObjPos::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
sal_Bool bRet = sal_True;
@@ -96,7 +96,7 @@ BOOL SwFmtWrapInfluenceOnObjPos::QueryValue( Any& rVal, BYTE nMemberId ) const
return bRet;
}
-BOOL SwFmtWrapInfluenceOnObjPos::PutValue( const Any& rVal, BYTE nMemberId )
+sal_Bool SwFmtWrapInfluenceOnObjPos::PutValue( const Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
sal_Bool bRet = sal_True;
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index 6a296782ce6c..f1c9142b7193 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -48,7 +48,7 @@ TYPEINIT1( SwFmt, SwClient ); //rtti fuer SwFmt
SwFmt::SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
- const USHORT* pWhichRanges, SwFmt *pDrvdFrm, USHORT nFmtWhich )
+ const sal_uInt16* pWhichRanges, SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich )
: SwModify( pDrvdFrm ),
aSet( rPool, pWhichRanges ),
nWhichId( nFmtWhich ),
@@ -58,8 +58,8 @@ SwFmt::SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
nPoolHlpFileId( UCHAR_MAX )
{
aFmtName.AssignAscii( pFmtNm );
- bWritten = bFmtInDTOR = bAutoUpdateFmt = FALSE; // LAYER_IMPL
- bAutoFmt = TRUE;
+ bWritten = bFmtInDTOR = bAutoUpdateFmt = sal_False; // LAYER_IMPL
+ bAutoFmt = sal_True;
if( pDrvdFrm )
aSet.SetParent( &pDrvdFrm->aSet );
@@ -67,7 +67,7 @@ SwFmt::SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
SwFmt::SwFmt( SwAttrPool& rPool, const String &rFmtNm,
- const USHORT* pWhichRanges, SwFmt *pDrvdFrm, USHORT nFmtWhich )
+ const sal_uInt16* pWhichRanges, SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich )
: SwModify( pDrvdFrm ),
aFmtName( rFmtNm ),
aSet( rPool, pWhichRanges ),
@@ -77,8 +77,8 @@ SwFmt::SwFmt( SwAttrPool& rPool, const String &rFmtNm,
nPoolHelpId( USHRT_MAX ),
nPoolHlpFileId( UCHAR_MAX )
{
- bWritten = bFmtInDTOR = bAutoUpdateFmt = FALSE; // LAYER_IMPL
- bAutoFmt = TRUE;
+ bWritten = bFmtInDTOR = bAutoUpdateFmt = sal_False; // LAYER_IMPL
+ bAutoFmt = sal_True;
if( pDrvdFrm )
aSet.SetParent( &pDrvdFrm->aSet );
@@ -95,7 +95,7 @@ SwFmt::SwFmt( const SwFmt& rFmt )
nPoolHelpId( rFmt.GetPoolHelpId() ),
nPoolHlpFileId( rFmt.GetPoolHlpFileId() )
{
- bWritten = bFmtInDTOR = FALSE; // LAYER_IMPL
+ bWritten = bFmtInDTOR = sal_False; // LAYER_IMPL
bAutoFmt = rFmt.bAutoFmt;
bAutoUpdateFmt = rFmt.bAutoUpdateFmt;
@@ -124,9 +124,9 @@ SwFmt &SwFmt::operator=(const SwFmt& rFmt)
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
// kopiere nur das Attribut-Delta Array
SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
@@ -193,16 +193,16 @@ void SwFmt::SetName( const String& rNewName, sal_Bool bBroadcast )
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
-void SwFmt::CopyAttrs( const SwFmt& rFmt, BOOL bReplace )
+void SwFmt::CopyAttrs( const SwFmt& rFmt, sal_Bool bReplace )
{
// kopiere nur das Attribut-Delta Array
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
// Sonderbehandlung fuer einige Attribute
SwAttrSet* pChgSet = (SwAttrSet*)&rFmt.aSet;
@@ -254,7 +254,7 @@ SwFmt::~SwFmt()
{
ASSERT(DerivedFrom(), "SwFmt::~SwFmt: Def Abhaengige!" );
- bFmtInDTOR = TRUE;
+ bFmtInDTOR = sal_True;
SwFmt *pParentFmt = DerivedFrom();
if (!pParentFmt) // see #112405#
@@ -287,9 +287,9 @@ SwFmt::~SwFmt()
void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
{
- BOOL bWeiter = TRUE; // TRUE = Propagierung an die Abhaengigen
+ sal_Bool bWeiter = sal_True; // sal_True = Propagierung an die Abhaengigen
- USHORT nWhich = pOldValue ? pOldValue->Which() :
+ sal_uInt16 nWhich = pOldValue ? pOldValue->Which() :
pNewValue ? pNewValue->Which() : 0 ;
switch( nWhich )
{
@@ -333,7 +333,7 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
if( aNew.Count() )
// keine mehr gesetzt, dann Ende !!
SwModify::Modify( &aOld, &aNew );
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
break;
case RES_FMT_CHG:
@@ -359,7 +359,7 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
pClient = aIter.Next() )
pClient->Modify( pOldValue, pNewValue );
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
break;
@@ -367,14 +367,14 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
{
// Ist das Attribut in diesem Format definiert, dann auf
// NICHT weiter propagieren !!
- if( SFX_ITEM_SET == aSet.GetItemState( nWhich, FALSE ))
+ if( SFX_ITEM_SET == aSet.GetItemState( nWhich, sal_False ))
{
// wie finde ich heraus, ob nicht ich die Message versende ??
// aber wer ruft das hier ????
-//ASSERT( FALSE, "Modify ohne Absender verschickt" );
+//ASSERT( sal_False, "Modify ohne Absender verschickt" );
//JP 11.06.96: DropCaps koennen hierher kommen
ASSERT( RES_PARATR_DROP == nWhich, "Modify ohne Absender verschickt" );
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
} // default
@@ -389,7 +389,7 @@ ASSERT( RES_PARATR_DROP == nWhich, "Modify ohne Absender verschickt" );
}
-BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
+sal_Bool SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
{
if ( pDerFrom )
{
@@ -398,7 +398,7 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
while ( pFmt != 0 )
{
if ( pFmt == this )
- return FALSE;
+ return sal_False;
pFmt=pFmt->DerivedFrom();
}
@@ -411,7 +411,7 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
pDerFrom = pDerFrom->DerivedFrom();
}
if ( (pDerFrom == DerivedFrom()) || (pDerFrom == this) )
- return FALSE;
+ return sal_False;
ASSERT( Which()==pDerFrom->Which()
|| ( Which()==RES_CONDTXTFMTCOLL && pDerFrom->Which()==RES_TXTFMTCOLL)
@@ -422,9 +422,9 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
pDerFrom->Add(this);
aSet.SetParent( &pDerFrom->aSet );
@@ -433,22 +433,22 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
SwFmtChg aNewFmt(this);
Modify( &aOldFmt, &aNewFmt );
- return TRUE;
+ return sal_True;
}
-BOOL SwFmt::SetFmtAttr(const SfxPoolItem& rAttr )
+sal_Bool SwFmt::SetFmtAttr(const SfxPoolItem& rAttr )
{
if ( IsInCache() || IsInSwFntCache() )
{
- const USHORT nWhich = rAttr.Which();
+ const sal_uInt16 nWhich = rAttr.Which();
CheckCaching( nWhich );
}
// wenn Modify gelockt ist, werden keine Modifies verschickt;
// fuer FrmFmt's immer das Modify verschicken!
- BOOL bRet = FALSE;
- const USHORT nFmtWhich = Which();
+ sal_Bool bRet = sal_False;
+ const sal_uInt16 nFmtWhich = Which();
if( IsModifyLocked() || (!GetDepends() &&
(RES_GRFFMTCOLL == nFmtWhich ||
RES_TXTFMTCOLL == nFmtWhich ) ) )
@@ -483,22 +483,22 @@ BOOL SwFmt::SetFmtAttr(const SfxPoolItem& rAttr )
}
-BOOL SwFmt::SetFmtAttr( const SfxItemSet& rSet )
+sal_Bool SwFmt::SetFmtAttr( const SfxItemSet& rSet )
{
if( !rSet.Count() )
- return FALSE;
+ return sal_False;
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
// wenn Modify gelockt ist, werden keine Modifies verschickt;
// fuer FrmFmt's immer das Modify verschicken!
- BOOL bRet = FALSE;
- const USHORT nFmtWhich = Which();
+ sal_Bool bRet = sal_False;
+ const sal_uInt16 nFmtWhich = Which();
if ( IsModifyLocked() ||
( !GetDepends() &&
( RES_GRFFMTCOLL == nFmtWhich ||
@@ -533,17 +533,17 @@ BOOL SwFmt::SetFmtAttr( const SfxItemSet& rSet )
// Nimmt den Hint mit nWhich aus dem Delta-Array
-BOOL SwFmt::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 )
+sal_Bool SwFmt::ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
{
if( !aSet.Count() )
- return FALSE;
+ return sal_False;
if( !nWhich2 || nWhich2 < nWhich1 )
nWhich2 = nWhich1; // dann setze auf 1. Id, nur dieses Item
if ( IsInCache() || IsInSwFntCache() )
{
- for( USHORT n = nWhich1; n < nWhich2; ++n )
+ for( sal_uInt16 n = nWhich1; n < nWhich2; ++n )
CheckCaching( n );
}
@@ -555,7 +555,7 @@ BOOL SwFmt::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 )
SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
aNew( *aSet.GetPool(), aSet.GetRanges() );
- BOOL bRet = 0 != aSet.ClearItem_BC( nWhich1, nWhich2, &aOld, &aNew );
+ sal_Bool bRet = 0 != aSet.ClearItem_BC( nWhich1, nWhich2, &aOld, &aNew );
if( bRet )
{
@@ -570,7 +570,7 @@ BOOL SwFmt::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 )
// --> OD 2007-01-24 #i73790#
// method renamed
-USHORT SwFmt::ResetAllFmtAttr()
+sal_uInt16 SwFmt::ResetAllFmtAttr()
// <--
{
if( !aSet.Count() )
@@ -579,9 +579,9 @@ USHORT SwFmt::ResetAllFmtAttr()
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
// wenn Modify gelockt ist, werden keine Modifies verschickt
if( IsModifyLocked() )
@@ -589,7 +589,7 @@ USHORT SwFmt::ResetAllFmtAttr()
SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
aNew( *aSet.GetPool(), aSet.GetRanges() );
- BOOL bRet = 0 != aSet.ClearItem_BC( 0, &aOld, &aNew );
+ sal_Bool bRet = 0 != aSet.ClearItem_BC( 0, &aOld, &aNew );
if( bRet )
{
@@ -610,9 +610,9 @@ USHORT SwFmt::ResetAllFmtAttr()
*************************************************************************/
-BOOL SwFmt::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwFmt::GetInfo( SfxPoolItem& rInfo ) const
{
- BOOL bRet = SwModify::GetInfo( rInfo );
+ sal_Bool bRet = SwModify::GetInfo( rInfo );
return bRet;
}
@@ -625,9 +625,9 @@ void SwFmt::DelDiffs( const SfxItemSet& rSet )
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
// wenn Modify gelockt ist, werden keine Modifies verschickt
if( IsModifyLocked() )
@@ -638,7 +638,7 @@ void SwFmt::DelDiffs( const SfxItemSet& rSet )
SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
aNew( *aSet.GetPool(), aSet.GetRanges() );
- BOOL bRet = 0 != aSet.Intersect_BC( rSet, &aOld, &aNew );
+ sal_Bool bRet = 0 != aSet.Intersect_BC( rSet, &aOld, &aNew );
if( bRet )
{
diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx
index 0ded6c326320..3d9d284b8c6d 100644
--- a/sw/source/core/attr/hints.cxx
+++ b/sw/source/core/attr/hints.cxx
@@ -68,7 +68,7 @@ SwDelTxt::SwDelTxt( xub_StrLen nS, xub_StrLen nL )
-SwUpdateAttr::SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, USHORT nW )
+SwUpdateAttr::SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, sal_uInt16 nW )
: SwMsgPoolItem( RES_UPDATE_ATTR ),
nStart( nS ),
nEnd( nE ),
@@ -103,7 +103,7 @@ SwTableFmlUpdate::SwTableFmlUpdate( const SwTable* pNewTbl )
eFlags( TBL_CALC )
{
DATA.pDelTbl = 0;
- bModified = bBehindSplitLine = FALSE;
+ bModified = bBehindSplitLine = sal_False;
ASSERT( pTbl, "es muss ein Table-Pointer gesetzt werden!" );
}
@@ -116,7 +116,7 @@ SwAutoFmtGetDocNode::SwAutoFmtGetDocNode( const SwNodes* pNds )
SwAttrSetChg::SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet )
: SwMsgPoolItem( RES_ATTRSET_CHG ),
- bDelSet( FALSE ),
+ bDelSet( sal_False ),
pChgSet( &rSet ),
pTheChgdSet( &rTheSet )
{}
@@ -124,7 +124,7 @@ SwAttrSetChg::SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet )
SwAttrSetChg::SwAttrSetChg( const SwAttrSetChg& rChgSet )
: SwMsgPoolItem( RES_ATTRSET_CHG ),
- bDelSet( TRUE ),
+ bDelSet( sal_True ),
pTheChgdSet( rChgSet.pTheChgdSet )
{
pChgSet = new SwAttrSet( *rChgSet.pChgSet );
@@ -140,7 +140,7 @@ SwAttrSetChg::~SwAttrSetChg()
#ifdef DBG_UTIL
-void SwAttrSetChg::ClearItem( USHORT nWhch )
+void SwAttrSetChg::ClearItem( sal_uInt16 nWhch )
{
ASSERT( bDelSet, "der Set darf nicht veraendert werden!" );
pChgSet->ClearItem( nWhch );
@@ -149,7 +149,7 @@ void SwAttrSetChg::ClearItem( USHORT nWhch )
#endif
-SwMsgPoolItem::SwMsgPoolItem( USHORT nWhch )
+SwMsgPoolItem::SwMsgPoolItem( sal_uInt16 nWhch )
: SfxPoolItem( nWhch )
{}
@@ -157,14 +157,14 @@ SwMsgPoolItem::SwMsgPoolItem( USHORT nWhch )
// "Overhead" vom SfxPoolItem
int SwMsgPoolItem::operator==( const SfxPoolItem& ) const
{
- ASSERT( FALSE, "SwMsgPoolItem kennt kein ==" );
+ ASSERT( sal_False, "SwMsgPoolItem kennt kein ==" );
return 0;
}
SfxPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const
{
- ASSERT( FALSE, "SwMsgPoolItem kennt kein Clone" );
+ ASSERT( sal_False, "SwMsgPoolItem kennt kein Clone" );
return 0;
}
@@ -175,12 +175,12 @@ SfxPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const
* Used to be inlined (hintids.hxx) in PRODUCT.
******************************************************************************/
#ifndef DBG_UTIL
-const SfxPoolItem* GetDfltAttr( USHORT nWhich )
+const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich )
{
return aAttrTab[ nWhich - POOLATTR_BEGIN ];
}
#else
-const SfxPoolItem* GetDfltAttr( USHORT nWhich )
+const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich )
{
ASSERT_ID( nWhich < POOLATTR_END && nWhich >= POOLATTR_BEGIN,
ERR_OUTOFSCOPE );
@@ -228,7 +228,7 @@ void SwFindNearestNode::CheckNode( const SwNode& rNd )
{
if( &pNd->GetNodes() == &rNd.GetNodes() )
{
- ULONG nIdx = rNd.GetIndex();
+ sal_uLong nIdx = rNd.GetIndex();
if( nIdx < pNd->GetIndex() &&
( !pFnd || nIdx > pFnd->GetIndex() ) &&
nIdx > rNd.GetNodes().GetEndOfExtras().GetIndex() )
@@ -238,20 +238,20 @@ void SwFindNearestNode::CheckNode( const SwNode& rNd )
-USHORT GetWhichOfScript( USHORT nWhich, USHORT nScript )
+sal_uInt16 GetWhichOfScript( sal_uInt16 nWhich, sal_uInt16 nScript )
{
- static const USHORT aLangMap[3] =
+ static const sal_uInt16 aLangMap[3] =
{ RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE };
- static const USHORT aFontMap[3] =
+ static const sal_uInt16 aFontMap[3] =
{ RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT};
- static const USHORT aFontSizeMap[3] =
+ static const sal_uInt16 aFontSizeMap[3] =
{ RES_CHRATR_FONTSIZE, RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CTL_FONTSIZE };
- static const USHORT aWeightMap[3] =
+ static const sal_uInt16 aWeightMap[3] =
{ RES_CHRATR_WEIGHT, RES_CHRATR_CJK_WEIGHT, RES_CHRATR_CTL_WEIGHT};
- static const USHORT aPostureMap[3] =
+ static const sal_uInt16 aPostureMap[3] =
{ RES_CHRATR_POSTURE, RES_CHRATR_CJK_POSTURE, RES_CHRATR_CTL_POSTURE};
- const USHORT* pM;
+ const sal_uInt16* pM;
switch( nWhich )
{
case RES_CHRATR_LANGUAGE:
@@ -287,13 +287,13 @@ USHORT GetWhichOfScript( USHORT nWhich, USHORT nScript )
pM = 0;
}
- USHORT nRet;
+ sal_uInt16 nRet;
if( pM )
{
using namespace ::com::sun::star::i18n;
{
if( ScriptType::WEAK == nScript )
- nScript = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
+ nScript = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
switch( nScript)
{
case ScriptType::COMPLEX: ++pM; // no break;
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
index cdfa6a5f6d3f..1753f06a8c1f 100644
--- a/sw/source/core/attr/swatrset.cxx
+++ b/sw/source/core/attr/swatrset.cxx
@@ -73,13 +73,13 @@ SwAttrPool::~SwAttrPool()
{
}
-SwAttrSet::SwAttrSet( SwAttrPool& rPool, USHORT nWh1, USHORT nWh2 )
+SwAttrSet::SwAttrSet( SwAttrPool& rPool, sal_uInt16 nWh1, sal_uInt16 nWh2 )
: SfxItemSet( rPool, nWh1, nWh2 ), pOldSet( 0 ), pNewSet( 0 )
{
}
-SwAttrSet::SwAttrSet( SwAttrPool& rPool, const USHORT* nWhichPairTable )
+SwAttrSet::SwAttrSet( SwAttrPool& rPool, const sal_uInt16* nWhichPairTable )
: SfxItemSet( rPool, nWhichPairTable ), pOldSet( 0 ), pNewSet( 0 )
{
}
@@ -90,7 +90,7 @@ SwAttrSet::SwAttrSet( const SwAttrSet& rSet )
{
}
-SfxItemSet* SwAttrSet::Clone( BOOL bItems, SfxItemPool *pToPool ) const
+SfxItemSet* SwAttrSet::Clone( sal_Bool bItems, SfxItemPool *pToPool ) const
{
if ( pToPool && pToPool != GetPool() )
{
@@ -104,11 +104,11 @@ SfxItemSet* SwAttrSet::Clone( BOOL bItems, SfxItemPool *pToPool ) const
if ( bItems )
{
SfxWhichIter aIter(*pTmpSet);
- 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 ) )
pTmpSet->Put( *pItem, pItem->Which() );
nWhich = aIter.NextWhich();
}
@@ -145,24 +145,24 @@ int SwAttrSet::Put_BC( const SfxItemSet& rSet,
-USHORT SwAttrSet::ClearItem_BC( USHORT nWhich,
+sal_uInt16 SwAttrSet::ClearItem_BC( sal_uInt16 nWhich,
SwAttrSet* pOld, SwAttrSet* pNew )
{
pNewSet = pNew;
pOldSet = pOld;
- USHORT nRet = SfxItemSet::ClearItem( nWhich );
+ sal_uInt16 nRet = SfxItemSet::ClearItem( nWhich );
pOldSet = pNewSet = 0;
return nRet;
}
-USHORT SwAttrSet::ClearItem_BC( USHORT nWhich1, USHORT nWhich2,
+sal_uInt16 SwAttrSet::ClearItem_BC( sal_uInt16 nWhich1, sal_uInt16 nWhich2,
SwAttrSet* pOld, SwAttrSet* pNew )
{
ASSERT( nWhich1 <= nWhich2, "kein gueltiger Bereich" );
pNewSet = pNew;
pOldSet = pOld;
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
for( ; nWhich1 <= nWhich2; ++nWhich1 )
nRet = nRet + SfxItemSet::ClearItem( nWhich1 );
pOldSet = pNewSet = 0;
@@ -206,14 +206,14 @@ bool SwAttrSet::SetModifyAtAttr( const SwModify* pModify )
bool bSet = false;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == GetItemState( RES_PAGEDESC, FALSE, &pItem ) &&
+ if( SFX_ITEM_SET == GetItemState( RES_PAGEDESC, sal_False, &pItem ) &&
((SwFmtPageDesc*)pItem)->GetDefinedIn() != pModify )
{
((SwFmtPageDesc*)pItem)->ChgDefinedIn( pModify );
bSet = true;
}
- if( SFX_ITEM_SET == GetItemState( RES_PARATR_DROP, FALSE, &pItem ) &&
+ if( SFX_ITEM_SET == GetItemState( RES_PARATR_DROP, sal_False, &pItem ) &&
((SwFmtDrop*)pItem)->GetDefinedIn() != pModify )
{
// CharFormat gesetzt und dann noch in unterschiedlichen
@@ -229,7 +229,7 @@ bool SwAttrSet::SetModifyAtAttr( const SwModify* pModify )
bSet = true;
}
- if( SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMULA, FALSE, &pItem ) &&
+ if( SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMULA, sal_False, &pItem ) &&
((SwTblBoxFormula*)pItem)->GetDefinedIn() != pModify )
{
((SwTblBoxFormula*)pItem)->ChgDefinedIn( pModify );
@@ -259,14 +259,14 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
// muss die NumRule kopiert werden?
if( pSrcDoc != pDstDoc && SFX_ITEM_SET == GetItemState(
- RES_PARATR_NUMRULE, FALSE, &pItem ) )
+ RES_PARATR_NUMRULE, sal_False, &pItem ) )
{
const String& rNm = ((SwNumRuleItem*)pItem)->GetValue();
if( rNm.Len() )
{
SwNumRule* pDestRule = pDstDoc->FindNumRulePtr( rNm );
if( pDestRule )
- pDestRule->SetInvalidRule( TRUE );
+ pDestRule->SetInvalidRule( sal_True );
else
pDstDoc->MakeNumRule( rNm,
pSrcDoc->FindNumRulePtr( rNm ) );
@@ -278,7 +278,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
// for text nodes
if ( pSrcDoc != pDstDoc &&
pCNd && pCNd->IsTxtNode() &&
- GetItemState( RES_PARATR_LIST_ID, FALSE, &pItem ) == SFX_ITEM_SET )
+ GetItemState( RES_PARATR_LIST_ID, sal_False, &pItem ) == SFX_ITEM_SET )
{
const String& sListId =
dynamic_cast<const SfxStringItem*>(pItem)->GetValue();
@@ -329,7 +329,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
// Gegenueber dem alten Verhalten, sie zu entfernen
const SwPageDesc* pPgDesc;
if( pSrcDoc != pDstDoc && SFX_ITEM_SET == GetItemState(
- RES_PAGEDESC, FALSE, &pItem ) &&
+ RES_PAGEDESC, sal_False, &pItem ) &&
0 != ( pPgDesc = ((SwFmtPageDesc*)pItem)->GetPageDesc()) )
{
SfxItemSet aTmpSet( *this );
@@ -391,14 +391,14 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
}
// check if ID is InRange of AttrSet-Ids
-BOOL IsInRange( const USHORT* pRange, const USHORT nId )
+sal_Bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId )
{
while( *pRange )
{
if( *pRange <= nId && nId <= *(pRange+1) )
- return TRUE;
+ return sal_True;
pRange += 2;
}
- return FALSE;
+ return sal_False;
}
diff --git a/sw/source/core/bastyp/bparr.cxx b/sw/source/core/bastyp/bparr.cxx
index 5dbb3dad6537..1b6db5d3dc52 100644
--- a/sw/source/core/bastyp/bparr.cxx
+++ b/sw/source/core/bastyp/bparr.cxx
@@ -36,7 +36,7 @@
// die Blockverwaltung waechst/schrumpft immer um 20 Bloecke, das sind dann
// immer ~ 20 * MAXENTRY == 20000 Eintraege
-const USHORT nBlockGrowSize = 20;
+const sal_uInt16 nBlockGrowSize = 20;
#ifndef DBG_UTIL
@@ -46,12 +46,12 @@ const USHORT nBlockGrowSize = 20;
#define CHECKIDX( p, n, i, c ) CheckIdx( p, n, i, c );
-void CheckIdx( BlockInfo** ppInf, USHORT nBlock, ULONG nSize, USHORT nCur )
+void CheckIdx( BlockInfo** ppInf, sal_uInt16 nBlock, sal_uLong nSize, sal_uInt16 nCur )
{
DBG_ASSERT( !nSize || nCur < nBlock, "BigPtrArray: CurIndex steht falsch" );
- ULONG nIdx = 0;
- for( USHORT nCnt = 0; nCnt < nBlock; ++nCnt, ++ppInf )
+ sal_uLong nIdx = 0;
+ for( sal_uInt16 nCnt = 0; nCnt < nBlock; ++nCnt, ++ppInf )
{
nIdx += (*ppInf)->nElem;
// Array mit Luecken darf es nicht geben
@@ -80,7 +80,7 @@ BigPtrArray::~BigPtrArray()
if( nBlock )
{
BlockInfo** pp = ppInf;
- for( USHORT n = 0; n < nBlock; ++n, ++pp )
+ for( sal_uInt16 n = 0; n < nBlock; ++n, ++pp )
{
delete[] (*pp)->pData;
delete *pp;
@@ -92,9 +92,9 @@ BigPtrArray::~BigPtrArray()
// Auch der Move ist schlicht. Optimieren ist hier wg. der
// Stueckelung des Feldes zwecklos!
-void BigPtrArray::Move( ULONG from, ULONG to )
+void BigPtrArray::Move( sal_uLong from, sal_uLong to )
{
- USHORT cur = Index2Block( from );
+ sal_uInt16 cur = Index2Block( from );
BlockInfo* p = ppInf[ cur ];
ElementPtr pElem = p->pData[ from - p->nStart ];
Insert( pElem, to ); // erst einfuegen, dann loeschen !!!!
@@ -104,7 +104,7 @@ void BigPtrArray::Move( ULONG from, ULONG to )
// das Ende ist EXCLUSIV
-void BigPtrArray::ForEach( ULONG nStart, ULONG nEnd,
+void BigPtrArray::ForEach( sal_uLong nStart, sal_uLong nEnd,
FnForEach fn, void* pArgs )
{
if( nEnd > nSize )
@@ -112,10 +112,10 @@ void BigPtrArray::ForEach( ULONG nStart, ULONG nEnd,
if( nStart < nEnd )
{
- USHORT cur = Index2Block( nStart );
+ sal_uInt16 cur = Index2Block( nStart );
BlockInfo** pp = ppInf + cur;
BlockInfo* p = *pp;
- USHORT nElem = USHORT( nStart - p->nStart );
+ sal_uInt16 nElem = sal_uInt16( nStart - p->nStart );
ElementPtr* pElem = p->pData + nElem;
nElem = p->nElem - nElem;
for(;;)
@@ -136,12 +136,12 @@ void BigPtrArray::ForEach( ULONG nStart, ULONG nEnd,
}
-ElementPtr BigPtrArray::operator[]( ULONG idx ) const
+ElementPtr BigPtrArray::operator[]( sal_uLong idx ) const
{
// weil die Funktion eben doch nicht const ist:
DBG_ASSERT( idx < nSize, "operator[]: Index aussserhalb" );
BigPtrArray* pThis = (BigPtrArray*) this;
- USHORT cur = Index2Block( idx );
+ sal_uInt16 cur = Index2Block( idx );
BlockInfo* p = ppInf[ cur ];
pThis->nCur = cur;
return p->pData[ idx - p->nStart ];
@@ -161,7 +161,7 @@ ElementPtr BigPtrArray::operator[]( ULONG idx ) const
-USHORT BigPtrArray::Index2Block( ULONG pos ) const
+sal_uInt16 BigPtrArray::Index2Block( sal_uLong pos ) const
{
// zuletzt verwendeter Block?
BlockInfo* p = ppInf[ nCur ];
@@ -186,11 +186,11 @@ USHORT BigPtrArray::Index2Block( ULONG pos ) const
}
// Binaere Suche:
// Diese fuehrt immer zum Erfolg
- USHORT lower = 0, upper = nBlock - 1;
- USHORT cur = 0;
+ sal_uInt16 lower = 0, upper = nBlock - 1;
+ sal_uInt16 cur = 0;
for(;;)
{
- USHORT n = lower + ( upper - lower ) / 2;
+ sal_uInt16 n = lower + ( upper - lower ) / 2;
cur = ( n == cur ) ? n+1 : n;
p = ppInf[ cur ];
if( p->nStart <= pos && p->nEnd >= pos )
@@ -207,10 +207,10 @@ USHORT BigPtrArray::Index2Block( ULONG pos ) const
// pos bezeichnet den letzten korrekten Block
-void BigPtrArray::UpdIndex( USHORT pos )
+void BigPtrArray::UpdIndex( sal_uInt16 pos )
{
BlockInfo** pp = ppInf + pos;
- ULONG idx = (*pp)->nEnd + 1;
+ sal_uLong idx = (*pp)->nEnd + 1;
BlockInfo* p;
while( ++pos < nBlock )
{
@@ -227,7 +227,7 @@ void BigPtrArray::UpdIndex( USHORT pos )
-BlockInfo* BigPtrArray::InsBlock( USHORT pos )
+BlockInfo* BigPtrArray::InsBlock( sal_uInt16 pos )
{
if( nBlock == nMaxBlock )
{
@@ -256,7 +256,7 @@ BlockInfo* BigPtrArray::InsBlock( USHORT pos )
return p;
}
-void BigPtrArray::BlockDel( USHORT nDel )
+void BigPtrArray::BlockDel( sal_uInt16 nDel )
{
nBlock = nBlock - nDel;
if( nMaxBlock - nBlock > nBlockGrowSize )
@@ -272,12 +272,12 @@ void BigPtrArray::BlockDel( USHORT nDel )
}
-void BigPtrArray::Insert( const ElementPtr& rElem, ULONG pos )
+void BigPtrArray::Insert( const ElementPtr& rElem, sal_uLong pos )
{
CHECKIDX( ppInf, nBlock, nSize, nCur );
BlockInfo* p;
- USHORT cur;
+ sal_uInt16 cur;
if( !nSize )
// Sonderfall: erstes Element einfuegen
p = InsBlock( cur = 0 );
@@ -353,14 +353,14 @@ void BigPtrArray::Insert( const ElementPtr& rElem, ULONG pos )
DBG_ASSERT( pos < MAXENTRY, "falsche Pos" );
if( pos != p->nElem )
{
- int nCount = p->nElem - USHORT(pos);
+ int nCount = p->nElem - sal_uInt16(pos);
ElementPtr *pFrom = p->pData + p->nElem,
*pTo = pFrom + 1;
while( nCount-- )
++( *--pTo = *--pFrom )->nOffset;
}
// Element eintragen und Indexe updaten
- ((ElementPtr&)rElem)->nOffset = USHORT(pos);
+ ((ElementPtr&)rElem)->nOffset = sal_uInt16(pos);
((ElementPtr&)rElem)->pBlock = p;
p->pData[ pos ] = rElem;
p->nEnd++;
@@ -372,28 +372,28 @@ void BigPtrArray::Insert( const ElementPtr& rElem, ULONG pos )
CHECKIDX( ppInf, nBlock, nSize, nCur );
}
-void BigPtrArray::Remove( ULONG pos, ULONG n )
+void BigPtrArray::Remove( sal_uLong pos, sal_uLong n )
{
CHECKIDX( ppInf, nBlock, nSize, nCur );
- USHORT nBlkdel = 0; // entfernte Bloecke
- USHORT cur = Index2Block( pos ); // aktuelle Blocknr
- USHORT nBlk1 = cur; // 1. behandelter Block
- USHORT nBlk1del = USHRT_MAX; // 1. entfernter Block
+ sal_uInt16 nBlkdel = 0; // entfernte Bloecke
+ sal_uInt16 cur = Index2Block( pos ); // aktuelle Blocknr
+ sal_uInt16 nBlk1 = cur; // 1. behandelter Block
+ sal_uInt16 nBlk1del = USHRT_MAX; // 1. entfernter Block
BlockInfo* p = ppInf[ cur ];
pos -= p->nStart;
- ULONG nElem = n;
+ sal_uLong nElem = n;
while( nElem )
{
- USHORT nel = p->nElem - USHORT(pos);
- if( ULONG(nel) > nElem )
- nel = USHORT(nElem);
+ sal_uInt16 nel = p->nElem - sal_uInt16(pos);
+ if( sal_uLong(nel) > nElem )
+ nel = sal_uInt16(nElem);
// Eventuell Elemente verschieben
- if( ( pos + nel ) < ULONG(p->nElem) )
+ if( ( pos + nel ) < sal_uLong(p->nElem) )
{
ElementPtr *pTo = p->pData + pos,
*pFrom = pTo + nel;
- int nCount = p->nElem - nel - USHORT(pos);
+ int nCount = p->nElem - nel - sal_uInt16(pos);
while( nCount-- )
{
*pTo = *pFrom++;
@@ -421,7 +421,7 @@ void BigPtrArray::Remove( ULONG pos, ULONG n )
if( nBlkdel )
{
// loeschen sollte man immer !!
- for( USHORT i = nBlk1del; i < ( nBlk1del + nBlkdel ); i++ )
+ for( sal_uInt16 i = nBlk1del; i < ( nBlk1del + nBlkdel ); i++ )
delete ppInf[ i ];
if( ( nBlk1del + nBlkdel ) < nBlock )
@@ -457,15 +457,15 @@ void BigPtrArray::Remove( ULONG pos, ULONG n )
}
-void BigPtrArray::Replace( ULONG idx, const ElementPtr& rElem)
+void BigPtrArray::Replace( sal_uLong idx, const ElementPtr& rElem)
{
// weil die Funktion eben doch nicht const ist:
DBG_ASSERT( idx < nSize, "Set: Index aussserhalb" );
BigPtrArray* pThis = (BigPtrArray*) this;
- USHORT cur = Index2Block( idx );
+ sal_uInt16 cur = Index2Block( idx );
BlockInfo* p = ppInf[ cur ];
pThis->nCur = cur;
- ((ElementPtr&)rElem)->nOffset = USHORT(idx - p->nStart);
+ ((ElementPtr&)rElem)->nOffset = sal_uInt16(idx - p->nStart);
((ElementPtr&)rElem)->pBlock = p;
p->pData[ idx - p->nStart ] = rElem;
}
@@ -473,7 +473,7 @@ void BigPtrArray::Replace( ULONG idx, const ElementPtr& rElem)
// Array komprimieren
-USHORT BigPtrArray::Compress( short nMax )
+sal_uInt16 BigPtrArray::Compress( short nMax )
{
CHECKIDX( ppInf, nBlock, nSize, nCur );
@@ -484,17 +484,17 @@ USHORT BigPtrArray::Compress( short nMax )
BlockInfo** pp = ppInf, **qq = pp;
BlockInfo* p;
BlockInfo* pLast(0); // letzter nicht voller Block
- USHORT nLast = 0; // fehlende Elemente
- USHORT nBlkdel = 0; // Anzahl der geloeschte Bloecke
- USHORT nFirstChgPos = USHRT_MAX; // ab welcher Pos gab es die 1. Aenderung?
+ sal_uInt16 nLast = 0; // fehlende Elemente
+ sal_uInt16 nBlkdel = 0; // Anzahl der geloeschte Bloecke
+ sal_uInt16 nFirstChgPos = USHRT_MAX; // ab welcher Pos gab es die 1. Aenderung?
// von Fuell-Prozenten auf uebrige Eintrage umrechnen
nMax = MAXENTRY - (long) MAXENTRY * nMax / 100;
- for( USHORT cur = 0; cur < nBlock; ++cur )
+ for( sal_uInt16 cur = 0; cur < nBlock; ++cur )
{
p = *pp++;
- USHORT n = p->nElem;
+ sal_uInt16 n = p->nElem;
// Testen, ob der noch nicht volle Block so gelassen wird
// dies ist der Fall, wenn der aktuelle Block gesplittet
// werden muesste, der noch nicht volle Block aber bereits
@@ -515,7 +515,7 @@ USHORT BigPtrArray::Compress( short nMax )
// Elemente uebertragen, vom akt. in den letzten
ElementPtr* pElem = pLast->pData + pLast->nElem;
ElementPtr* pFrom = p->pData;
- for( USHORT nCount = n, nOff = pLast->nElem;
+ for( sal_uInt16 nCount = n, nOff = pLast->nElem;
nCount; --nCount, ++pElem )
*pElem = *pFrom++,
(*pElem)->pBlock = pLast,
diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx
index 4253507b11b5..29fc02a3f7e1 100644
--- a/sw/source/core/bastyp/breakit.cxx
+++ b/sw/source/core/bastyp/breakit.cxx
@@ -116,11 +116,11 @@ void SwBreakIt::_GetForbidden( const LanguageType aLang )
m_pForbidden = new i18n::ForbiddenCharacters( aWrap.getForbiddenCharacters() );
}
-USHORT SwBreakIt::GetRealScriptOfText( const String& rTxt,
+sal_uInt16 SwBreakIt::GetRealScriptOfText( const String& rTxt,
xub_StrLen nPos ) const
{
createBreakIterator();
- USHORT nScript = i18n::ScriptType::WEAK;
+ sal_uInt16 nScript = i18n::ScriptType::WEAK;
if( xBreak.is() && rTxt.Len() )
{
if( nPos && nPos == rTxt.Len() )
@@ -149,17 +149,17 @@ USHORT SwBreakIt::GetRealScriptOfText( const String& rTxt,
nScript = xBreak->getScriptType( rTxt, nChgPos );
}
if( i18n::ScriptType::WEAK == nScript )
- nScript = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
+ nScript = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
return nScript;
}
-USHORT SwBreakIt::GetAllScriptsOfText( const String& rTxt ) const
+sal_uInt16 SwBreakIt::GetAllScriptsOfText( const String& rTxt ) const
{
- const USHORT coAllScripts = ( SCRIPTTYPE_LATIN |
+ const sal_uInt16 coAllScripts = ( SCRIPTTYPE_LATIN |
SCRIPTTYPE_ASIAN |
SCRIPTTYPE_COMPLEX );
createBreakIterator();
- USHORT nRet = 0, nScript;
+ sal_uInt16 nRet = 0, nScript;
if( !xBreak.is() )
nRet = coAllScripts;
else if( rTxt.Len() )
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index baf76e5fe5ec..b5622c150801 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -218,16 +218,16 @@ _CalcOp* FindOperator( const String& rSrch )
//-----------------------------------------------------------------------------
-SwHash* Find( const String& rStr, SwHash** ppTable, USHORT nTblSize,
- USHORT* pPos )
+SwHash* Find( const String& rStr, SwHash** ppTable, sal_uInt16 nTblSize,
+ sal_uInt16* pPos )
{
- ULONG ii = 0;
+ sal_uLong ii = 0;
for( xub_StrLen n = 0; n < rStr.Len(); ++n )
ii = ii << 1 ^ rStr.GetChar( n );
ii %= nTblSize;
if( pPos )
- *pPos = (USHORT)ii;
+ *pPos = (sal_uInt16)ii;
for( SwHash* pEntry = *(ppTable+ii); pEntry; pEntry = pEntry->pNext )
if( rStr == pEntry->aStr )
@@ -239,7 +239,7 @@ inline LanguageType GetDocAppScriptLang( SwDoc& rDoc )
{
return ((SvxLanguageItem&)rDoc.GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ))
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ))
)).GetLanguage();
}
@@ -336,25 +336,25 @@ static const sal_Char* __READONLY_DATA sNTypeTab[ 27 ] =
// diese sind mit doppelten HashIds
sNType25, sNType26
};
-static USHORT __READONLY_DATA aHashValue[ 27 ] =
+static sal_uInt16 __READONLY_DATA aHashValue[ 27 ] =
{
34, 38, 43, 7, 18, 32, 22, 29, 30, 33, 3,
28, 24, 40, 9, 11, 26, 45, 4, 23, 36, 44, 19, 5, 1,
// diese sind mit doppelten HashIds
11, 38
};
-static USHORT __READONLY_DATA aAdrToken[ 12 ] =
+static sal_uInt16 __READONLY_DATA aAdrToken[ 12 ] =
{
USER_OPT_COMPANY, USER_OPT_STREET, USER_OPT_COUNTRY, USER_OPT_ZIP,
USER_OPT_CITY, USER_OPT_TITLE, USER_OPT_POSITION, USER_OPT_TELEPHONEWORK,
USER_OPT_TELEPHONEHOME, USER_OPT_FAX, USER_OPT_EMAIL, USER_OPT_STATE
};
-static USHORT SwDocStat::* __READONLY_DATA aDocStat1[ 3 ] =
+static sal_uInt16 SwDocStat::* __READONLY_DATA aDocStat1[ 3 ] =
{
&SwDocStat::nTbl, &SwDocStat::nGrf, &SwDocStat::nOLE
};
-static ULONG SwDocStat::* __READONLY_DATA aDocStat2[ 4 ] =
+static sal_uLong SwDocStat::* __READONLY_DATA aDocStat2[ 4 ] =
{
&SwDocStat::nPage, &SwDocStat::nPara,
&SwDocStat::nWord, &SwDocStat::nChar
@@ -368,7 +368,7 @@ static ULONG SwDocStat::* __READONLY_DATA aDocStat2[ 4 ] =
SwSbxValue nVal;
String sTmpStr;
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < 25; ++n )
{
@@ -376,8 +376,8 @@ static ULONG SwDocStat::* __READONLY_DATA aDocStat2[ 4 ] =
VarTable[ aHashValue[ n ] ] = new SwCalcExp( sTmpStr, nVal, 0 );
}
- ((SwCalcExp*)VarTable[ aHashValue[ 0 ] ])->nValue.PutBool( FALSE );
- ((SwCalcExp*)VarTable[ aHashValue[ 1 ] ])->nValue.PutBool( TRUE );
+ ((SwCalcExp*)VarTable[ aHashValue[ 0 ] ])->nValue.PutBool( sal_False );
+ ((SwCalcExp*)VarTable[ aHashValue[ 1 ] ])->nValue.PutBool( sal_True );
((SwCalcExp*)VarTable[ aHashValue[ 2 ] ])->nValue.PutDouble( F_PI );
((SwCalcExp*)VarTable[ aHashValue[ 3 ] ])->nValue.PutDouble( 2.7182818284590452354 );
@@ -418,7 +418,7 @@ static ULONG SwDocStat::* __READONLY_DATA aDocStat2[ 4 ] =
SwCalc::~SwCalc()
{
- for( USHORT n = 0; n < TBLSZ; ++n )
+ for( sal_uInt16 n = 0; n < TBLSZ; ++n )
delete VarTable[n];
if( pLclData != m_aSysLocale.GetLocaleDataPtr() )
delete pLclData;
@@ -460,9 +460,9 @@ SwSbxValue SwCalc::Calculate( const String& rStr )
/******************************************************************************
|*
-|* String SwCalc::GetStrResult( SwSbxValue nValue, BOOL bRound = TRUE )
-|* Beschreibung Der Parameter bRound ist auf TRUE defaultet und darf
-|* nur beim errechnen von Tabellenzellen auf FALSE gesetzt
+|* String SwCalc::GetStrResult( SwSbxValue nValue, sal_Bool bRound = sal_True )
+|* Beschreibung Der Parameter bRound ist auf sal_True defaultet und darf
+|* nur beim errechnen von Tabellenzellen auf sal_False gesetzt
|* werden, damit keine Rundungsfehler beim zusammenstellen
|* der Formel entstehen.
|* Erstellung OK 12-02-93 11:04am
@@ -470,7 +470,7 @@ SwSbxValue SwCalc::Calculate( const String& rStr )
|*
|******************************************************************************/
-String SwCalc::GetStrResult( const SwSbxValue& rVal, BOOL bRound )
+String SwCalc::GetStrResult( const SwSbxValue& rVal, sal_Bool bRound )
{
if( !rVal.IsDouble() )
return rVal.GetString();
@@ -479,7 +479,7 @@ String SwCalc::GetStrResult( const SwSbxValue& rVal, BOOL bRound )
}
-String SwCalc::GetStrResult( double nValue, BOOL )
+String SwCalc::GetStrResult( double nValue, sal_Bool )
{
if( nValue >= DBL_MAX )
switch( eError )
@@ -494,7 +494,7 @@ String SwCalc::GetStrResult( double nValue, BOOL )
default : return RESOURCE->aCalc_Default;
}
- USHORT nDec = 15; //pLclData->getNumDigits();
+ sal_uInt16 nDec = 15; //pLclData->getNumDigits();
String aRetStr( ::rtl::math::doubleToUString( nValue,
rtl_math_StringFormat_Automatic,
nDec,
@@ -522,17 +522,17 @@ SwCalcExp* SwCalc::VarInsert( const String &rStr )
/******************************************************************************
|*
-|* SwCalcExp* SwCalc::VarLook( const String& , USHORT ins )
+|* SwCalcExp* SwCalc::VarLook( const String& , sal_uInt16 ins )
|*
|* Erstellung OK 12-02-93 11:04am
|* Letzte Aenderung JP 15.11.99
|*
|******************************************************************************/
-SwCalcExp* SwCalc::VarLook( const String& rStr, USHORT ins )
+SwCalcExp* SwCalc::VarLook( const String& rStr, sal_uInt16 ins )
{
aErrExpr.nValue.SetVoidValue(false);
- USHORT ii = 0;
+ sal_uInt16 ii = 0;
String aStr( rStr );
pCharClass->toLower( aStr );
@@ -566,7 +566,7 @@ SwCalcExp* SwCalc::VarLook( const String& rStr, USHORT ins )
else if( !pUFld->IsValid() )
{
// Die aktuellen Werte sichern . . .
- USHORT nOld_ListPor = nListPor;
+ sal_uInt16 nOld_ListPor = nListPor;
SwSbxValue nOld_LastLeft = nLastLeft;
SwSbxValue nOld_NumberValue = nNumberValue;
xub_StrLen nOld_CommandPos = nCommandPos;
@@ -624,7 +624,7 @@ SwCalcExp* SwCalc::VarLook( const String& rStr, USHORT ins )
return &aErrExpr;
}
- ULONG nTmpRec = 0;
+ sal_uLong nTmpRec = 0;
if( 0 != ( pFnd = Find( sDBNum, VarTable, TBLSZ ) ) )
nTmpRec = ((SwCalcExp*)pFnd)->nValue.GetULong();
@@ -679,7 +679,7 @@ SwCalcExp* SwCalc::VarLook( const String& rStr, USHORT ins )
/******************************************************************************
|*
-|* BOOL SwCalc::VarChange( const String& rStr, const SwSbxValue nValue )
+|* sal_Bool SwCalc::VarChange( const String& rStr, const SwSbxValue nValue )
|*
|* Erstellung OK 12-02-93 11:04am
|* Letzte Aenderung OK 12-02-93 11:04am
@@ -697,7 +697,7 @@ void SwCalc::VarChange( const String& rStr, const SwSbxValue& rValue )
String aStr( rStr );
pCharClass->toLower( aStr );
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
SwCalcExp* pFnd = (SwCalcExp*)Find( aStr, VarTable, TBLSZ, &nPos );
if( !pFnd )
@@ -712,20 +712,20 @@ void SwCalc::VarChange( const String& rStr, const SwSbxValue& rValue )
/******************************************************************************
|*
-|* BOOL SwCalc::Push( const void* pPtr )
+|* sal_Bool SwCalc::Push( const void* pPtr )
|*
|* Erstellung OK 12-02-93 11:05am
|* Letzte Aenderung OK 12-02-93 11:05am
|*
|******************************************************************************/
-BOOL SwCalc::Push( const VoidPtr pPtr )
+sal_Bool SwCalc::Push( const VoidPtr pPtr )
{
if( USHRT_MAX != aRekurStk.GetPos( pPtr ) )
- return FALSE;
+ return sal_False;
aRekurStk.Insert( pPtr, aRekurStk.Count() );
- return TRUE;
+ return sal_True;
}
/******************************************************************************
@@ -774,13 +774,13 @@ if( !nUseOld )
coStartFlags, aEmptyStr,
coContFlags, aEmptyStr );
- BOOL bSetError = TRUE;
+ sal_Bool bSetError = sal_True;
xub_StrLen nRealStt = nCommandPos + (xub_StrLen)aRes.LeadingWhiteSpace;
if( aRes.TokenType & (KParseType::ASC_NUMBER | KParseType::UNI_NUMBER) )
{
nNumberValue.PutDouble( aRes.Value );
eCurrOper = CALC_NUMBER;
- bSetError = FALSE;
+ bSetError = sal_False;
}
else if( aRes.TokenType & KParseType::IDENTNAME )
{
@@ -824,20 +824,20 @@ if( !nUseOld )
}
aVarName = aName;
eCurrOper = CALC_NAME;
- bSetError = FALSE;
+ bSetError = sal_False;
}
else if ( aRes.TokenType & KParseType::DOUBLE_QUOTE_STRING )
{
nNumberValue.PutString( String( aRes.DequotedNameOrString ));
eCurrOper = CALC_NUMBER;
- bSetError = FALSE;
+ bSetError = sal_False;
}
else if( aRes.TokenType & KParseType::ONE_SINGLE_CHAR )
{
String aName( sCommand.Copy( nRealStt, static_cast<xub_StrLen>(aRes.EndPos) - nRealStt ));
if( 1 == aName.Len() )
{
- bSetError = FALSE;
+ bSetError = sal_False;
sal_Unicode ch = aName.GetChar( 0 );
switch( ch )
{
@@ -914,14 +914,14 @@ if( !nUseOld )
eCurrOper = CALC_NAME;
}
else
- bSetError = TRUE;
+ bSetError = sal_True;
}
else
- bSetError = TRUE;
+ bSetError = sal_True;
break;
default:
- bSetError = TRUE;
+ bSetError = sal_True;
break;
}
}
@@ -933,10 +933,10 @@ if( !nUseOld )
{
sal_Unicode ch = aName.GetChar(0);
- bSetError = TRUE;
+ bSetError = sal_True;
if ('<' == ch || '>' == ch)
{
- bSetError = FALSE;
+ bSetError = sal_False;
SwCalcOper eTmp2 = ('<' == ch) ? CALC_LEQ : CALC_GEQ;
eCurrOper = ('<' == ch) ? CALC_LES : CALC_GRE;
@@ -944,14 +944,14 @@ if( !nUseOld )
if( 2 == aName.Len() && '=' == aName.GetChar(1) )
eCurrOper = eTmp2;
else if( 1 != aName.Len() )
- bSetError = TRUE;
+ bSetError = sal_True;
}
}
}
else if( nRealStt == sCommand.Len() )
{
eCurrOper = CALC_ENDCALC;
- bSetError = FALSE;
+ bSetError = sal_False;
}
if( bSetError )
@@ -1066,15 +1066,15 @@ else
case '[': {
String aStr;
- BOOL bIgnore = FALSE;
+ sal_Bool bIgnore = sal_False;
do {
while( 0 != ( ch = NextCh( sCommand, nCommandPos ))
&& ch != ']' )
{
if( !bIgnore && '\\' == ch )
- bIgnore = TRUE;
+ bIgnore = sal_True;
else if( bIgnore )
- bIgnore = FALSE;
+ bIgnore = sal_False;
aStr += ch;
}
@@ -1175,7 +1175,7 @@ SwSbxValue SwCalc::Term()
nLastLeft = left;
for(;;)
{
- USHORT nSbxOper = USHRT_MAX;
+ sal_uInt16 nSbxOper = USHRT_MAX;
switch( eCurrOper )
{
@@ -1185,20 +1185,20 @@ SwSbxValue SwCalc::Term()
// case CALC_XOR: eSbxOper = SbxXOR; break;
case CALC_AND: {
GetToken();
- BOOL bB = Prim().GetBool();
+ sal_Bool bB = Prim().GetBool();
left.PutBool( left.GetBool() && bB );
}
break;
case CALC_OR: {
GetToken();
- BOOL bB = Prim().GetBool();
+ sal_Bool bB = Prim().GetBool();
left.PutBool( left.GetBool() || bB );
}
break;
case CALC_XOR: {
GetToken();
- BOOL bR = Prim().GetBool();
- BOOL bL = left.GetBool();
+ sal_Bool bR = Prim().GetBool();
+ sal_Bool bL = left.GetBool();
left.PutBool( (bL && !bR) || (!bL && bR) );
}
break;
@@ -1235,7 +1235,7 @@ SwSbxValue SwCalc::Term()
SwSbxValue e = Prim();
sal_Int32 nYear = (sal_Int32) floor( left.GetDouble() );
nYear = nYear & 0x0000FFFF;
- sal_Int32 nMonth = (INT32) floor( e.GetDouble() );
+ sal_Int32 nMonth = (sal_Int32) floor( e.GetDouble() );
nMonth = ( nMonth & 0x000000FF ) << 16;
left.PutLong( nMonth + nYear );
eCurrOper = CALC_DAY;
@@ -1259,7 +1259,7 @@ SwSbxValue SwCalc::Term()
double fVal = 0;
double fFac = 1;
- INT32 nDec = (INT32) floor( e.GetDouble() );
+ sal_Int32 nDec = (sal_Int32) floor( e.GetDouble() );
if( nDec < -20 || nDec > 20 )
{
eError = CALC_OVERFLOW;
@@ -1267,24 +1267,24 @@ SwSbxValue SwCalc::Term()
return left;
}
fVal = left.GetDouble();
- USHORT i;
+ sal_uInt16 i;
if( nDec >= 0)
- for (i = 0; i < (USHORT) nDec; ++i )
+ for (i = 0; i < (sal_uInt16) nDec; ++i )
fFac *= 10.0;
else
- for (i = 0; i < (USHORT) -nDec; ++i )
+ for (i = 0; i < (sal_uInt16) -nDec; ++i )
fFac /= 10.0;
fVal *= fFac;
- BOOL bSign;
+ sal_Bool bSign;
if (fVal < 0.0)
{
fVal *= -1.0;
- bSign = TRUE;
+ bSign = sal_True;
}
else
- bSign = FALSE;
+ bSign = sal_False;
// runden
double fNum = fVal; // find the exponent
@@ -1380,7 +1380,7 @@ SwSbxValue SwCalc::Prim()
pfCalc pFnc = 0;
- BOOL bChkTrig = FALSE, bChkPow = FALSE;
+ sal_Bool bChkTrig = sal_False, bChkPow = sal_False;
switch( eCurrOper )
{
@@ -1388,8 +1388,8 @@ SwSbxValue SwCalc::Prim()
case CALC_COS: pFnc = &cos; break;
case CALC_TAN: pFnc = &tan; break;
case CALC_ATAN: pFnc = &atan; break;
- case CALC_ASIN: pFnc = &asin; bChkTrig = TRUE; break;
- case CALC_ACOS: pFnc = &acos; bChkTrig = TRUE; break;
+ case CALC_ASIN: pFnc = &asin; bChkTrig = sal_True; break;
+ case CALC_ACOS: pFnc = &acos; bChkTrig = sal_True; break;
case CALC_NOT: {
GetToken();
@@ -1424,7 +1424,7 @@ SwSbxValue SwCalc::Prim()
else
{
nErg = nNumberValue;
- bChkPow = TRUE;
+ bChkPow = sal_True;
}
break;
@@ -1437,7 +1437,7 @@ SwSbxValue SwCalc::Prim()
else
{
nErg = VarLook( aVarName )->nValue;
- bChkPow = TRUE;
+ bChkPow = sal_True;
}
break;
@@ -1453,7 +1453,7 @@ SwSbxValue SwCalc::Prim()
else
{
GetToken();
- bChkPow = TRUE; // in order for =(7)^2 to work
+ bChkPow = sal_True; // in order for =(7)^2 to work
}
}
break;
@@ -1633,7 +1633,7 @@ lcl_Str2Double( const String& rCommand, xub_StrLen& rCommandPos, double& rVal,
}
/******************************************************************************
- * Methode : BOOL SwCalc::Str2Double( double& )
+ * Methode : sal_Bool SwCalc::Str2Double( double& )
* Beschreibung:
* Erstellt : OK 07.06.94 12:56
* Aenderung : JP 27.10.98
@@ -1671,10 +1671,10 @@ bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
//------------------------------------------------------------------------------
-BOOL SwCalc::IsValidVarName( const String& rStr,
+sal_Bool SwCalc::IsValidVarName( const String& rStr,
String* pValidName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
using namespace ::com::sun::star::i18n;
{
// Parse any token.
@@ -1719,9 +1719,9 @@ SwHash::~SwHash()
delete pNext;
}
-void DeleteHashTable( SwHash **ppHashTable, USHORT nCount )
+void DeleteHashTable( SwHash **ppHashTable, sal_uInt16 nCount )
{
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
delete *(ppHashTable+i);
delete [] ppHashTable;
}
@@ -1739,7 +1739,7 @@ SwSbxValue::~SwSbxValue()
{
}
-BOOL SwSbxValue::GetBool() const
+sal_Bool SwSbxValue::GetBool() const
{
return SbxSTRING == GetType() ? 0 != GetString().Len()
: 0 != SbxValue::GetBool();
diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx
index 2c1b6e2bbb65..d22c781169b3 100644
--- a/sw/source/core/bastyp/index.cxx
+++ b/sw/source/core/bastyp/index.cxx
@@ -260,7 +260,7 @@ SwIndex& SwIndex::operator=( const SwIndex& rIdx )
Remove();
pArray = rIdx.pArray;
pNext = pPrev = 0;
- bEqual = FALSE;
+ bEqual = sal_False;
}
else
bEqual = rIdx.nIndex == nIndex;
@@ -502,7 +502,7 @@ xub_StrLen SwIndex::operator-=( const SwIndex & rIndex )
|*
*************************************************************************/
-BOOL SwIndex::operator<( const SwIndex & rIndex ) const
+sal_Bool SwIndex::operator<( const SwIndex & rIndex ) const
{
ASSERT( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex < rIndex.nIndex;
@@ -518,7 +518,7 @@ BOOL SwIndex::operator<( const SwIndex & rIndex ) const
|*
*************************************************************************/
-BOOL SwIndex::operator<=( const SwIndex & rIndex ) const
+sal_Bool SwIndex::operator<=( const SwIndex & rIndex ) const
{
ASSERT( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex <= rIndex.nIndex;
@@ -534,7 +534,7 @@ BOOL SwIndex::operator<=( const SwIndex & rIndex ) const
|*
*************************************************************************/
-BOOL SwIndex::operator>( const SwIndex & rIndex ) const
+sal_Bool SwIndex::operator>( const SwIndex & rIndex ) const
{
ASSERT( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex > rIndex.nIndex;
@@ -550,7 +550,7 @@ BOOL SwIndex::operator>( const SwIndex & rIndex ) const
|*
*************************************************************************/
-BOOL SwIndex::operator>=( const SwIndex & rIndex ) const
+sal_Bool SwIndex::operator>=( const SwIndex & rIndex ) const
{
ASSERT( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex >= rIndex.nIndex;
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 345dd0221ffd..e150f5f0ae26 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -148,7 +148,7 @@ extern void ClearFEShellTabCols();
|* einige Bereiche fuer die Set in Collections / Nodes
|*************************************************************************/
// AttrSet-Range fuer die 2 Break-Attribute
-USHORT __FAR_DATA aBreakSetRange[] = {
+sal_uInt16 __FAR_DATA aBreakSetRange[] = {
RES_PAGEDESC, RES_BREAK,
0 };
@@ -156,7 +156,7 @@ USHORT __FAR_DATA aBreakSetRange[] = {
// OD 2008-02-27 #refactorlists# :
// list attributes ( RES_PARATR_LIST_BEGIN - RES_PARATR_LIST_END ) are not
// included in the paragraph style's itemset.
-USHORT __FAR_DATA aTxtFmtCollSetRange[] = {
+sal_uInt16 __FAR_DATA aTxtFmtCollSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -165,7 +165,7 @@ USHORT __FAR_DATA aTxtFmtCollSetRange[] = {
};
// AttrSet-Range fuer die GrfFmtColl
-USHORT __FAR_DATA aGrfFmtCollSetRange[] = {
+sal_uInt16 __FAR_DATA aGrfFmtCollSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_GRFATR_BEGIN, RES_GRFATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
@@ -173,7 +173,7 @@ USHORT __FAR_DATA aGrfFmtCollSetRange[] = {
};
// AttrSet-Range fuer die TextNode
-USHORT __FAR_DATA aTxtNodeSetRange[] = {
+sal_uInt16 __FAR_DATA aTxtNodeSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -185,14 +185,14 @@ USHORT __FAR_DATA aTxtNodeSetRange[] = {
};
// AttrSet-Range fuer die NoTxtNode
-USHORT __FAR_DATA aNoTxtNodeSetRange[] = {
+sal_uInt16 __FAR_DATA aNoTxtNodeSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_GRFATR_BEGIN, RES_GRFATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
-USHORT __FAR_DATA aTableSetRange[] = {
+sal_uInt16 __FAR_DATA aTableSetRange[] = {
RES_FILL_ORDER, RES_FRM_SIZE,
RES_LR_SPACE, RES_BREAK,
RES_BACKGROUND, RES_SHADOW,
@@ -207,7 +207,7 @@ USHORT __FAR_DATA aTableSetRange[] = {
0
};
-USHORT __FAR_DATA aTableLineSetRange[] = {
+sal_uInt16 __FAR_DATA aTableLineSetRange[] = {
RES_FILL_ORDER, RES_FRM_SIZE,
RES_LR_SPACE, RES_UL_SPACE,
RES_BACKGROUND, RES_SHADOW,
@@ -218,7 +218,7 @@ USHORT __FAR_DATA aTableLineSetRange[] = {
0
};
-USHORT __FAR_DATA aTableBoxSetRange[] = {
+sal_uInt16 __FAR_DATA aTableBoxSetRange[] = {
RES_FILL_ORDER, RES_FRM_SIZE,
RES_LR_SPACE, RES_UL_SPACE,
RES_BACKGROUND, RES_SHADOW,
@@ -231,21 +231,21 @@ USHORT __FAR_DATA aTableBoxSetRange[] = {
};
// AttrSet-Range fuer die SwFrmFmt
-USHORT __FAR_DATA aFrmFmtSetRange[] = {
+sal_uInt16 __FAR_DATA aFrmFmtSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
// AttrSet-Range fuer die SwCharFmt
-USHORT __FAR_DATA aCharFmtSetRange[] = {
+sal_uInt16 __FAR_DATA aCharFmtSetRange[] = {
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
// AttrSet-Range fuer die character autostyles
-USHORT __FAR_DATA aCharAutoFmtSetRange[] = {
+sal_uInt16 __FAR_DATA aCharAutoFmtSetRange[] = {
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
@@ -253,7 +253,7 @@ USHORT __FAR_DATA aCharAutoFmtSetRange[] = {
};
// AttrSet-Range fuer die SwPageDescFmt
-USHORT __FAR_DATA aPgFrmFmtSetRange[] = {
+sal_uInt16 __FAR_DATA aPgFrmFmtSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
@@ -433,13 +433,13 @@ SfxItemInfo __FAR_DATA aSlotTab[] =
};
-USHORT* SwAttrPool::pVersionMap1 = 0;
-USHORT* SwAttrPool::pVersionMap2 = 0;
-USHORT* SwAttrPool::pVersionMap3 = 0;
-USHORT* SwAttrPool::pVersionMap4 = 0;
+sal_uInt16* SwAttrPool::pVersionMap1 = 0;
+sal_uInt16* SwAttrPool::pVersionMap2 = 0;
+sal_uInt16* SwAttrPool::pVersionMap3 = 0;
+sal_uInt16* SwAttrPool::pVersionMap4 = 0;
// OD 2004-01-21 #i18732#
-USHORT* SwAttrPool::pVersionMap5 = 0;
-USHORT* SwAttrPool::pVersionMap6 = 0;
+sal_uInt16* SwAttrPool::pVersionMap5 = 0;
+sal_uInt16* SwAttrPool::pVersionMap6 = 0;
SwIndexReg* SwIndexReg::pEmptyIndexArray = 0;
const sal_Char* __FAR_DATA pMarkToTable = "table";
@@ -494,9 +494,9 @@ void _InitCore()
aAttrTab[ RES_CHRATR_WEIGHT- POOLATTR_BEGIN ] = new SvxWeightItem( WEIGHT_NORMAL, RES_CHRATR_WEIGHT );
aAttrTab[ RES_CHRATR_WORDLINEMODE- POOLATTR_BEGIN ] = new SvxWordLineModeItem( sal_False, RES_CHRATR_WORDLINEMODE );
aAttrTab[ RES_CHRATR_AUTOKERN- POOLATTR_BEGIN ] = new SvxAutoKernItem( sal_False, RES_CHRATR_AUTOKERN );
- aAttrTab[ RES_CHRATR_BLINK - POOLATTR_BEGIN ] = new SvxBlinkItem( FALSE, RES_CHRATR_BLINK );
- aAttrTab[ RES_CHRATR_NOHYPHEN - POOLATTR_BEGIN ] = new SvxNoHyphenItem( TRUE, RES_CHRATR_NOHYPHEN );
- aAttrTab[ RES_CHRATR_NOLINEBREAK- POOLATTR_BEGIN ] = new SvxNoLinebreakItem( TRUE, RES_CHRATR_NOLINEBREAK );
+ aAttrTab[ RES_CHRATR_BLINK - POOLATTR_BEGIN ] = new SvxBlinkItem( sal_False, RES_CHRATR_BLINK );
+ aAttrTab[ RES_CHRATR_NOHYPHEN - POOLATTR_BEGIN ] = new SvxNoHyphenItem( sal_True, RES_CHRATR_NOHYPHEN );
+ aAttrTab[ RES_CHRATR_NOLINEBREAK- POOLATTR_BEGIN ] = new SvxNoLinebreakItem( sal_True, RES_CHRATR_NOLINEBREAK );
aAttrTab[ RES_CHRATR_BACKGROUND - POOLATTR_BEGIN ] = new SvxBrushItem( RES_CHRATR_BACKGROUND );
// CJK-Attributes
@@ -515,10 +515,10 @@ void _InitCore()
aAttrTab[ RES_CHRATR_ROTATE - POOLATTR_BEGIN ] = new SvxCharRotateItem( 0, sal_False, RES_CHRATR_ROTATE );
aAttrTab[ RES_CHRATR_EMPHASIS_MARK - POOLATTR_BEGIN ] = new SvxEmphasisMarkItem( EMPHASISMARK_NONE, RES_CHRATR_EMPHASIS_MARK );
- aAttrTab[ RES_CHRATR_TWO_LINES - POOLATTR_BEGIN ] = new SvxTwoLinesItem( FALSE, 0, 0, RES_CHRATR_TWO_LINES );
+ aAttrTab[ RES_CHRATR_TWO_LINES - POOLATTR_BEGIN ] = new SvxTwoLinesItem( sal_False, 0, 0, RES_CHRATR_TWO_LINES );
aAttrTab[ RES_CHRATR_SCALEW - POOLATTR_BEGIN ] = new SvxCharScaleWidthItem( 100, RES_CHRATR_SCALEW );
aAttrTab[ RES_CHRATR_RELIEF - POOLATTR_BEGIN ] = new SvxCharReliefItem( RELIEF_NONE, RES_CHRATR_RELIEF );
- aAttrTab[ RES_CHRATR_HIDDEN - POOLATTR_BEGIN ] = new SvxCharHiddenItem( FALSE, RES_CHRATR_HIDDEN );
+ aAttrTab[ RES_CHRATR_HIDDEN - POOLATTR_BEGIN ] = new SvxCharHiddenItem( sal_False, RES_CHRATR_HIDDEN );
aAttrTab[ RES_CHRATR_OVERLINE- POOLATTR_BEGIN ] = new SvxOverlineItem( UNDERLINE_NONE, RES_CHRATR_OVERLINE );
// CharakterAttr - Dummies
@@ -560,12 +560,12 @@ void _InitCore()
aAttrTab[ RES_PARATR_HYPHENZONE- POOLATTR_BEGIN ] = pItem;
aAttrTab[ RES_PARATR_DROP- POOLATTR_BEGIN ] = new SwFmtDrop;
- aAttrTab[ RES_PARATR_REGISTER - POOLATTR_BEGIN ] = new SwRegisterItem( FALSE );
+ aAttrTab[ RES_PARATR_REGISTER - POOLATTR_BEGIN ] = new SwRegisterItem( sal_False );
aAttrTab[ RES_PARATR_NUMRULE - POOLATTR_BEGIN ] = new SwNumRuleItem( aEmptyStr );
- aAttrTab[ RES_PARATR_SCRIPTSPACE - POOLATTR_BEGIN ] = new SvxScriptSpaceItem( TRUE, RES_PARATR_SCRIPTSPACE );
- aAttrTab[ RES_PARATR_HANGINGPUNCTUATION - POOLATTR_BEGIN ] = new SvxHangingPunctuationItem( TRUE, RES_PARATR_HANGINGPUNCTUATION );
- aAttrTab[ RES_PARATR_FORBIDDEN_RULES - POOLATTR_BEGIN ] = new SvxForbiddenRuleItem( TRUE, RES_PARATR_FORBIDDEN_RULES );
+ aAttrTab[ RES_PARATR_SCRIPTSPACE - POOLATTR_BEGIN ] = new SvxScriptSpaceItem( sal_True, RES_PARATR_SCRIPTSPACE );
+ aAttrTab[ RES_PARATR_HANGINGPUNCTUATION - POOLATTR_BEGIN ] = new SvxHangingPunctuationItem( sal_True, RES_PARATR_HANGINGPUNCTUATION );
+ aAttrTab[ RES_PARATR_FORBIDDEN_RULES - POOLATTR_BEGIN ] = new SvxForbiddenRuleItem( sal_True, RES_PARATR_FORBIDDEN_RULES );
aAttrTab[ RES_PARATR_VERTALIGN - POOLATTR_BEGIN ] = new SvxParaVertAlignItem( 0, RES_PARATR_VERTALIGN );
aAttrTab[ RES_PARATR_SNAPTOGRID - POOLATTR_BEGIN ] = new SvxParaGridItem( sal_True, RES_PARATR_SNAPTOGRID );
aAttrTab[ RES_PARATR_CONNECT_BORDER - POOLATTR_BEGIN ] = new SwParaConnectBorderItem;
@@ -575,9 +575,9 @@ void _InitCore()
// --> OD 2008-02-19 #refactorlists#
aAttrTab[ RES_PARATR_LIST_ID - POOLATTR_BEGIN ] = new SfxStringItem( RES_PARATR_LIST_ID, aEmptyStr );
aAttrTab[ RES_PARATR_LIST_LEVEL - POOLATTR_BEGIN ] = new SfxInt16Item( RES_PARATR_LIST_LEVEL, 0 );
- aAttrTab[ RES_PARATR_LIST_ISRESTART - POOLATTR_BEGIN ] = new SfxBoolItem( RES_PARATR_LIST_ISRESTART, FALSE );
+ aAttrTab[ RES_PARATR_LIST_ISRESTART - POOLATTR_BEGIN ] = new SfxBoolItem( RES_PARATR_LIST_ISRESTART, sal_False );
aAttrTab[ RES_PARATR_LIST_RESTARTVALUE - POOLATTR_BEGIN ] = new SfxInt16Item( RES_PARATR_LIST_RESTARTVALUE, 1 );
- aAttrTab[ RES_PARATR_LIST_ISCOUNTED - POOLATTR_BEGIN ] = new SfxBoolItem( RES_PARATR_LIST_ISCOUNTED, TRUE );
+ aAttrTab[ RES_PARATR_LIST_ISCOUNTED - POOLATTR_BEGIN ] = new SfxBoolItem( RES_PARATR_LIST_ISCOUNTED, sal_True );
// <--
aAttrTab[ RES_FILL_ORDER- POOLATTR_BEGIN ] = new SwFmtFillOrder;
@@ -602,7 +602,7 @@ void _InitCore()
aAttrTab[ RES_SHADOW- POOLATTR_BEGIN ] = new SvxShadowItem( RES_SHADOW );
aAttrTab[ RES_FRMMACRO- POOLATTR_BEGIN ] = new SvxMacroItem( RES_FRMMACRO );
aAttrTab[ RES_COL- POOLATTR_BEGIN ] = new SwFmtCol;
- aAttrTab[ RES_KEEP - POOLATTR_BEGIN ] = new SvxFmtKeepItem( FALSE, RES_KEEP );
+ aAttrTab[ RES_KEEP - POOLATTR_BEGIN ] = new SvxFmtKeepItem( sal_False, RES_KEEP );
aAttrTab[ RES_URL - POOLATTR_BEGIN ] = new SwFmtURL();
aAttrTab[ RES_EDIT_IN_READONLY - POOLATTR_BEGIN ] = new SwFmtEditInReadonly;
aAttrTab[ RES_LAYOUT_SPLIT - POOLATTR_BEGIN ] = new SwFmtLayoutSplit;
@@ -617,9 +617,9 @@ void _InitCore()
aAttrTab[ RES_ROW_SPLIT - POOLATTR_BEGIN ] = new SwFmtRowSplit;
// OD 18.09.2003 #i18732#
- aAttrTab[ RES_FOLLOW_TEXT_FLOW - POOLATTR_BEGIN ] = new SwFmtFollowTextFlow( TRUE );
+ aAttrTab[ RES_FOLLOW_TEXT_FLOW - POOLATTR_BEGIN ] = new SwFmtFollowTextFlow( sal_True );
// --> collapsing borders FME 2005-05-27 #i29550#
- aAttrTab[ RES_COLLAPSING_BORDERS - POOLATTR_BEGIN ] = new SfxBoolItem( RES_COLLAPSING_BORDERS, FALSE );
+ aAttrTab[ RES_COLLAPSING_BORDERS - POOLATTR_BEGIN ] = new SfxBoolItem( RES_COLLAPSING_BORDERS, sal_False );
// <-- collapsing
// OD 2004-05-04 #i28701#
// --> OD 2004-10-18 #i35017# - constant name has changed
@@ -671,8 +671,8 @@ void _InitCore()
// - RES_CHRATR_NOLINEBREAK
// - RES_PARATR_REGISTER
// + 2 Dummies fuer die einzelnen "Bereiche"
- SwAttrPool::pVersionMap1 = new USHORT[ 60 ];
- USHORT i;
+ SwAttrPool::pVersionMap1 = new sal_uInt16[ 60 ];
+ sal_uInt16 i;
for( i = 1; i <= 17; i++ )
SwAttrPool::pVersionMap1[ i-1 ] = i;
for ( i = 18; i <= 27; ++i )
@@ -686,7 +686,7 @@ void _InitCore()
// 2. Version - neue Attribute:
// 10 Dummies fuer den Frame "Bereich"
- SwAttrPool::pVersionMap2 = new USHORT[ 75 ];
+ SwAttrPool::pVersionMap2 = new sal_uInt16[ 75 ];
for( i = 1; i <= 70; i++ )
SwAttrPool::pVersionMap2[ i-1 ] = i;
for ( i = 71; i <= 75; ++i )
@@ -695,7 +695,7 @@ void _InitCore()
// 3. Version - neue Attribute:
// neue Attribute und Dummies fuer die CJK-Version
// und neue Grafik-Attribute
- SwAttrPool::pVersionMap3 = new USHORT[ 86 ];
+ SwAttrPool::pVersionMap3 = new sal_uInt16[ 86 ];
for( i = 1; i <= 21; i++ )
SwAttrPool::pVersionMap3[ i-1 ] = i;
for ( i = 22; i <= 27; ++i )
@@ -706,7 +706,7 @@ void _InitCore()
SwAttrPool::pVersionMap3[ i-1 ] = i + 35;
// 4. Version - neue Paragraph Attribute fuer die CJK-Version
- SwAttrPool::pVersionMap4 = new USHORT[ 121 ];
+ SwAttrPool::pVersionMap4 = new sal_uInt16[ 121 ];
for( i = 1; i <= 65; i++ )
SwAttrPool::pVersionMap4[ i-1 ] = i;
for ( i = 66; i <= 121; ++i )
@@ -714,14 +714,14 @@ void _InitCore()
// OD 2004-01-21 #i18732# - setup new version map due to extension of
// the frame attributes (RES_FRMATR_*) for binary filters.
- SwAttrPool::pVersionMap5 = new USHORT[ 130 ];
+ SwAttrPool::pVersionMap5 = new sal_uInt16[ 130 ];
for( i = 1; i <= 109; i++ )
SwAttrPool::pVersionMap5[ i-1 ] = i;
for ( i = 110; i <= 130; ++i )
SwAttrPool::pVersionMap5[ i-1 ] = i + 6;
// 6. Version - new character attribute for overlining plus 2 dummies
- SwAttrPool::pVersionMap6 = new USHORT[ 136 ];
+ SwAttrPool::pVersionMap6 = new sal_uInt16[ 136 ];
for( i = 1; i <= 37; i++ )
SwAttrPool::pVersionMap6[ i-1 ] = i;
for ( i = 38; i <= 136; ++i )
@@ -780,7 +780,7 @@ void _FinitCore()
#ifdef DBG_UTIL
//Defaultattribut freigeben lassen um asserts zu vermeiden.
if ( aAttrTab[0]->GetRefCount() )
- SfxItemPool::ReleaseDefaults( aAttrTab, POOLATTR_END-POOLATTR_BEGIN, FALSE);
+ SfxItemPool::ReleaseDefaults( aAttrTab, POOLATTR_END-POOLATTR_BEGIN, sal_False);
#endif
delete SwDoc::pACmpltWords;
@@ -825,7 +825,7 @@ void _FinitCore()
// loesche alle default-Attribute
SfxPoolItem* pHt;
- for( USHORT n = 0; n < POOLATTR_END - POOLATTR_BEGIN; n++ )
+ for( sal_uInt16 n = 0; n < POOLATTR_END - POOLATTR_BEGIN; n++ )
if( 0 != ( pHt = aAttrTab[n] ))
delete pHt;
@@ -840,7 +840,7 @@ void _FinitCore()
delete[] SwAttrPool::pVersionMap5;
delete[] SwAttrPool::pVersionMap6;
- for ( USHORT i = 0; i < pGlobalOLEExcludeList->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pGlobalOLEExcludeList->Count(); ++i )
delete (SvGlobalName*)(*pGlobalOLEExcludeList)[i];
delete pGlobalOLEExcludeList;
}
@@ -857,7 +857,7 @@ CharClass& GetAppCharClass()
return *pAppCharClass;
}
-void SwCalendarWrapper::LoadDefaultCalendar( USHORT eLang )
+void SwCalendarWrapper::LoadDefaultCalendar( sal_uInt16 eLang )
{
sUniqueId.Erase();
if( eLang != nLang )
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index c0611a85160a..e3db1a266648 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -60,8 +60,8 @@ void SwCache::Check()
//Konsistenspruefung.
ASSERT( !pLast->GetNext(), "Last but not last." );
ASSERT( !pRealFirst->GetPrev(), "First but not first." );
- USHORT nCnt = 0;
- BOOL bFirstFound = FALSE;
+ sal_uInt16 nCnt = 0;
+ sal_Bool bFirstFound = sal_False;
SwCacheObj *pObj = pRealFirst;
SwCacheObj *pRekursive = pObj;
while ( pObj )
@@ -74,7 +74,7 @@ void SwCache::Check()
++nCnt;
if ( pObj == pFirst )
- bFirstFound = TRUE;
+ bFirstFound = sal_True;
if ( !pObj->GetNext() )
ASSERT( pObj == pLast, "Last not Found." );
pObj = pObj->GetNext();
@@ -103,12 +103,12 @@ void SwCache::Check()
|*************************************************************************/
-SwCache::SwCache( const USHORT nInitSize, const USHORT nGrowSize
+SwCache::SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize
#ifdef DBG_UTIL
, const ByteString &rNm
#endif
) :
- SwCacheObjArr( (BYTE)nInitSize, (BYTE)nGrowSize ),
+ SwCacheObjArr( (sal_uInt8)nInitSize, (sal_uInt8)nGrowSize ),
aFreePositions( 5, 5 ),
pRealFirst( 0 ),
pFirst( 0 ),
@@ -186,7 +186,7 @@ SwCache::~SwCache()
|*************************************************************************/
-void SwCache::Flush( const BYTE )
+void SwCache::Flush( const sal_uInt8 )
{
INCREMENT( nFlushCnt );
SwCacheObj *pObj = pRealFirst;
@@ -197,7 +197,7 @@ void SwCache::Flush( const BYTE )
#ifdef DBG_UTIL
if ( pObj->IsLocked() )
{
- ASSERT( TRUE, "Flushing locked objects." );
+ ASSERT( sal_True, "Flushing locked objects." );
if ( !pRealFirst )
{
pRealFirst = pFirst = pLast = pObj;
@@ -307,8 +307,8 @@ void SwCache::ToTop( SwCacheObj *pObj )
|*************************************************************************/
-SwCacheObj *SwCache::Get( const void *pOwner, const USHORT nIndex,
- const BOOL bToTop )
+SwCacheObj *SwCache::Get( const void *pOwner, const sal_uInt16 nIndex,
+ const sal_Bool bToTop )
{
SwCacheObj *pRet;
if ( 0 != (pRet = nIndex < Count() ? operator[]( nIndex ) : 0) )
@@ -331,7 +331,7 @@ SwCacheObj *SwCache::Get( const void *pOwner, const USHORT nIndex,
-SwCacheObj *SwCache::Get( const void *pOwner, const BOOL bToTop )
+SwCacheObj *SwCache::Get( const void *pOwner, const sal_Bool bToTop )
{
SwCacheObj *pRet = pRealFirst;
while ( pRet && !pRet->IsOwner( pOwner ) )
@@ -399,7 +399,7 @@ void SwCache::DeleteObj( SwCacheObj *pObj )
//Unangenehmer Nebeneffekt ist, das die Positionen verschoben werden
//muessen, und die Eigentuemer der Objekte diese wahrscheinlich nicht
//wiederfinden werden.
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
SwCacheObj *pTmpObj = operator[](i);
if ( !pTmpObj )
@@ -417,11 +417,11 @@ void SwCache::DeleteObj( SwCacheObj *pObj )
/*
-void SwCache::Delete( const void *pOwner, const USHORT nIndex )
+void SwCache::Delete( const void *pOwner, const sal_uInt16 nIndex )
{
INCREMENT( nDelete );
SwCacheObj *pObj;
- if ( 0 != (pObj = Get( pOwner, nIndex, FALSE )) )
+ if ( 0 != (pObj = Get( pOwner, nIndex, sal_False )) )
DeleteObj( pObj );
}
*/
@@ -432,7 +432,7 @@ void SwCache::Delete( const void *pOwner )
{
INCREMENT( nDelete );
SwCacheObj *pObj;
- if ( 0 != (pObj = Get( pOwner, BOOL(FALSE) )) )
+ if ( 0 != (pObj = Get( pOwner, sal_Bool(sal_False) )) )
DeleteObj( pObj );
}
@@ -447,12 +447,12 @@ void SwCache::Delete( const void *pOwner )
|*************************************************************************/
-BOOL SwCache::Insert( SwCacheObj *pNew )
+sal_Bool SwCache::Insert( SwCacheObj *pNew )
{
CHECK;
ASSERT( !pNew->GetPrev() && !pNew->GetNext(), "New but not new." );
- USHORT nPos;//Wird hinter den if's zum setzen am Obj benutzt.
+ sal_uInt16 nPos;//Wird hinter den if's zum setzen am Obj benutzt.
if ( Count() < nCurMax )
{
//Es ist noch Platz frei, also einfach einfuegen.
@@ -464,7 +464,7 @@ BOOL SwCache::Insert( SwCacheObj *pNew )
{
//Es exitieren Platzhalter, also den letzten benutzen.
INCREMENT( nInsertFree );
- const USHORT nFreePos = aFreePositions.Count() - 1;
+ const sal_uInt16 nFreePos = aFreePositions.Count() - 1;
nPos = aFreePositions[ nFreePos ];
*(pData + nPos) = pNew;
aFreePositions.Remove( nFreePos );
@@ -479,8 +479,8 @@ BOOL SwCache::Insert( SwCacheObj *pNew )
pObj = pObj->GetPrev();
if ( !pObj )
{
- ASSERT( FALSE, "Cache overflow." );
- return FALSE;
+ ASSERT( sal_False, "Cache overflow." );
+ return sal_False;
}
nPos = pObj->GetCachePos();
@@ -521,7 +521,7 @@ BOOL SwCache::Insert( SwCacheObj *pNew )
pFirst = pNew;
CHECK;
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -534,14 +534,14 @@ BOOL SwCache::Insert( SwCacheObj *pNew )
|*************************************************************************/
-void SwCache::SetLRUOfst( const USHORT nOfst )
+void SwCache::SetLRUOfst( const sal_uInt16 nOfst )
{
if ( !pRealFirst || ((Count() - aFreePositions.Count()) < nOfst) )
return;
CHECK;
pFirst = pRealFirst;
- for ( USHORT i = 0; i < Count() && i < nOfst; ++i )
+ for ( sal_uInt16 i = 0; i < Count() && i < nOfst; ++i )
{
if ( pFirst->GetNext() && pFirst->GetNext()->GetNext() )
pFirst = pFirst->GetNext();
@@ -645,7 +645,7 @@ void SwCacheAccess::_Get()
|*************************************************************************/
-BOOL SwCacheAccess::IsAvailable() const
+sal_Bool SwCacheAccess::IsAvailable() const
{
return pObj != 0;
}
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index 1213bfaea896..701f7dbbd69c 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -170,7 +170,7 @@ SwRect& SwRect::_Intersection( const SwRect& rRect )
-BOOL SwRect::IsInside( const SwRect& rRect ) const
+sal_Bool SwRect::IsInside( const SwRect& rRect ) const
{
const long nRight = Right();
const long nBottom = Bottom();
@@ -184,7 +184,7 @@ BOOL SwRect::IsInside( const SwRect& rRect ) const
-BOOL SwRect::IsInside( const Point& rPoint ) const
+sal_Bool SwRect::IsInside( const Point& rPoint ) const
{
return (Left() <= rPoint.X())
&& (Top() <= rPoint.Y())
@@ -194,7 +194,7 @@ BOOL SwRect::IsInside( const Point& rPoint ) const
/* -----------------------------11.04.00 15:46--------------------------------
mouse moving of table borders
---------------------------------------------------------------------------*/
-BOOL SwRect::IsNear( const Point& rPoint, long nTolerance ) const
+sal_Bool SwRect::IsNear( const Point& rPoint, long nTolerance ) const
{
return IsInside(rPoint) ||
(((Left() - nTolerance) <= rPoint.X())
@@ -214,12 +214,12 @@ BOOL SwRect::IsNear( const Point& rPoint, long nTolerance ) const
-BOOL SwRect::IsOver( const SwRect& rRect ) const
+sal_Bool SwRect::IsOver( const SwRect& rRect ) const
{
return (Top() <= rRect.Bottom())
&& (Left() <= rRect.Right())
&& (Right() >= rRect.Left())
- && (Bottom()>= rRect.Top()) ? TRUE : FALSE;
+ && (Bottom()>= rRect.Top()) ? sal_True : sal_False;
}
/*************************************************************************
@@ -283,13 +283,13 @@ long SwRect::GetLeftDistance( long nLimit ) const { return m_Point.getX() - nLim
long SwRect::GetBottomDistance( long nLim ) const { return nLim - m_Point.getY() - m_Size.getHeight();}
long SwRect::GetTopDistance( long nLimit ) const { return m_Point.getY() - nLimit; }
long SwRect::GetRightDistance( long nLim ) const { return nLim - m_Point.getX() - m_Size.getWidth(); }
-BOOL SwRect::OverStepLeft( long nLimit ) const
+sal_Bool SwRect::OverStepLeft( long nLimit ) const
{ return nLimit > m_Point.getX() && m_Point.getX() + m_Size.getWidth() > nLimit; }
-BOOL SwRect::OverStepBottom( long nLimit ) const
+sal_Bool SwRect::OverStepBottom( long nLimit ) const
{ return nLimit > m_Point.getY() && m_Point.getY() + m_Size.getHeight() > nLimit; }
-BOOL SwRect::OverStepTop( long nLimit ) const
+sal_Bool SwRect::OverStepTop( long nLimit ) const
{ return nLimit > m_Point.getY() && m_Point.getY() + m_Size.getHeight() > nLimit; }
-BOOL SwRect::OverStepRight( long nLimit ) const
+sal_Bool SwRect::OverStepRight( long nLimit ) const
{ return nLimit > m_Point.getX() && m_Point.getX() + m_Size.getWidth() > nLimit; }
void SwRect::SetLeftAndWidth( long nLeft, long nNew )
{
diff --git a/sw/source/core/bastyp/swregion.cxx b/sw/source/core/bastyp/swregion.cxx
index 899b8f164194..e2b4829b563c 100644
--- a/sw/source/core/bastyp/swregion.cxx
+++ b/sw/source/core/bastyp/swregion.cxx
@@ -48,9 +48,9 @@ SV_IMPL_VARARR( SwRects, SwRect );
|*
|*************************************************************************/
-SwRegionRects::SwRegionRects( const SwRect &rStartRect, USHORT nInit,
- USHORT nGrow ) :
- SwRects( (BYTE)nInit, (BYTE)nGrow ),
+SwRegionRects::SwRegionRects( const SwRect &rStartRect, sal_uInt16 nInit,
+ sal_uInt16 nGrow ) :
+ SwRects( (sal_uInt8)nInit, (sal_uInt8)nGrow ),
aOrigin( rStartRect )
{
Insert( aOrigin, 0 );
@@ -60,18 +60,18 @@ SwRegionRects::SwRegionRects( const SwRect &rStartRect, USHORT nInit,
* inline InsertRect()
*
* InsertRect() wird nur von operator-=() gerufen.
- * Wenn bDel == TRUE ist, dann wird das Rect an der Position nPos mit
+ * Wenn bDel == sal_True ist, dann wird das Rect an der Position nPos mit
* rRect ueberschrieben, ansonsten wird rRect hinten angehaengt.
*************************************************************************/
-inline void SwRegionRects::InsertRect( const SwRect &rRect, const USHORT nPos,
- BOOL &rDel )
+inline void SwRegionRects::InsertRect( const SwRect &rRect, const sal_uInt16 nPos,
+ sal_Bool &rDel )
{
if( rDel )
{
pData = (SwRect*)pData; // looks weird but seems to help gcc ->i78417
*(pData+nPos) = rRect;
- rDel = FALSE;
+ rDel = sal_False;
}
else
Insert( rRect, Count() );
@@ -93,8 +93,8 @@ inline void SwRegionRects::InsertRect( const SwRect &rRect, const USHORT nPos,
void SwRegionRects::operator-=( const SwRect &rRect )
{
- USHORT nMax = Count();
- for ( USHORT i = 0; i < nMax; ++i )
+ sal_uInt16 nMax = Count();
+ for ( sal_uInt16 i = 0; i < nMax; ++i )
{
if ( rRect.IsOver( *(pData+i) ) )
{
@@ -104,7 +104,7 @@ void SwRegionRects::operator-=( const SwRect &rRect )
// Das erste Rect, das wir inserten wollen, nimmt die
// Stelle von i ein. So ersparen wir uns das Delete().
- BOOL bDel = TRUE;
+ sal_Bool bDel = sal_True;
//Jetzt aufteilen das Teil: Es sollen diejenigen Rechtecke
//zurueckbleiben, die im alten aber nicht im neuen liegen.
@@ -173,10 +173,10 @@ void SwRegionRects::Invert()
SwRegionRects aInvRegion( aOrigin, Count()*2+2 );
const SwRect *pDat = GetData();
- for( USHORT i = 0; i < Count(); ++pDat, ++i )
+ for( sal_uInt16 i = 0; i < Count(); ++pDat, ++i )
aInvRegion -= *pDat;
- USHORT nCpy = Count(), nDel = 0;
+ sal_uInt16 nCpy = Count(), nDel = 0;
if( aInvRegion.Count() < Count() )
{
nDel = Count() - aInvRegion.Count();
@@ -205,7 +205,7 @@ inline SwTwips CalcArea( const SwRect &rRect )
}
-void SwRegionRects::Compress( BOOL bFuzzy )
+void SwRegionRects::Compress( sal_Bool bFuzzy )
{
for ( int i = 0; i < Count(); ++i )
{
@@ -215,13 +215,13 @@ void SwRegionRects::Compress( BOOL bFuzzy )
//uberfluessig.
if ( (*(pData + i)).IsInside( *(pData + j) ) )
{
- Remove( static_cast<USHORT>(j), 1 );
+ Remove( static_cast<sal_uInt16>(j), 1 );
--j;
}
else if ( (*(pData + j)).IsInside( *(pData + i) ) )
{
*(pData + i) = *(pData + j);
- Remove( static_cast<USHORT>(j), 1 );
+ Remove( static_cast<sal_uInt16>(j), 1 );
i = -1;
break;
}
@@ -243,7 +243,7 @@ void SwRegionRects::Compress( BOOL bFuzzy )
(::CalcArea( aUnion ) - CalcArea( aInter )) )
{
*(pData + i) = aUnion;
- Remove( static_cast<USHORT>(j), 1 );
+ Remove( static_cast<sal_uInt16>(j), 1 );
i = -1;
break;
}
diff --git a/sw/source/core/bastyp/tabcol.cxx b/sw/source/core/bastyp/tabcol.cxx
index 63d9ceee8043..bf5b4b06084f 100644
--- a/sw/source/core/bastyp/tabcol.cxx
+++ b/sw/source/core/bastyp/tabcol.cxx
@@ -34,7 +34,7 @@
#include <errhdl.hxx> // fuer Create-Methoden
-SwTabCols::SwTabCols( USHORT nSize ) :
+SwTabCols::SwTabCols( sal_uInt16 nSize ) :
nLeftMin( 0 ),
nLeft( 0 ),
nRight( 0 ),
@@ -54,7 +54,7 @@ SwTabCols::SwTabCols( const SwTabCols& rCpy ) :
aData( rCpy.GetData() )
{
#if OSL_DEBUG_LEVEL > 1
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
SwTabColsEntry aEntry1 = aData[i];
SwTabColsEntry aEntry2 = rCpy.GetData()[i];
@@ -83,9 +83,9 @@ SwTabCols &SwTabCols::operator=( const SwTabCols& rCpy )
return *this;
}
-BOOL SwTabCols::operator==( const SwTabCols& rCmp ) const
+sal_Bool SwTabCols::operator==( const SwTabCols& rCmp ) const
{
- USHORT i;
+ sal_uInt16 i;
if ( !(nLeftMin == rCmp.GetLeftMin() &&
nLeft == rCmp.GetLeft() &&
@@ -93,20 +93,20 @@ BOOL SwTabCols::operator==( const SwTabCols& rCmp ) const
nRightMax== rCmp.GetRightMax()&&
bLastRowAllowedToChange== rCmp.IsLastRowAllowedToChange() &&
Count()== rCmp.Count()) )
- return FALSE;
+ return sal_False;
for ( i = 0; i < Count(); ++i )
{
SwTabColsEntry aEntry1 = aData[i];
SwTabColsEntry aEntry2 = rCmp.GetData()[i];
if ( aEntry1.nPos != aEntry2.nPos || aEntry1.bHidden != aEntry2.bHidden )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-void SwTabCols::Insert( long nValue, long nMin, long nMax, BOOL bValue, USHORT nPos )
+void SwTabCols::Insert( long nValue, long nMin, long nMax, sal_Bool bValue, sal_uInt16 nPos )
{
SwTabColsEntry aEntry;
aEntry.nPos = nValue;
@@ -116,7 +116,7 @@ void SwTabCols::Insert( long nValue, long nMin, long nMax, BOOL bValue, USHORT n
aData.insert( aData.begin() + nPos, aEntry );
}
-void SwTabCols::Insert( long nValue, BOOL bValue, USHORT nPos )
+void SwTabCols::Insert( long nValue, sal_Bool bValue, sal_uInt16 nPos )
{
SwTabColsEntry aEntry;
aEntry.nPos = nValue;
@@ -134,7 +134,7 @@ void SwTabCols::Insert( long nValue, BOOL bValue, USHORT nPos )
#endif
}
-void SwTabCols::Remove( USHORT nPos, USHORT nAnz )
+void SwTabCols::Remove( sal_uInt16 nPos, sal_uInt16 nAnz )
{
SwTabColsEntries::iterator aStart = aData.begin() + nPos;
aData.erase( aStart, aStart + nAnz );
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 37087c189355..74275c1014ef 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -48,8 +48,8 @@
#include <breakit.hxx>
-SwCallLink::SwCallLink( SwCrsrShell & rSh, ULONG nAktNode, xub_StrLen nAktCntnt,
- BYTE nAktNdTyp, long nLRPos, bool bAktSelection )
+SwCallLink::SwCallLink( SwCrsrShell & rSh, sal_uLong nAktNode, xub_StrLen nAktCntnt,
+ sal_uInt8 nAktNdTyp, long nLRPos, bool bAktSelection )
: rShell( rSh ), nNode( nAktNode ), nCntnt( nAktCntnt ),
nNdTyp( nAktNdTyp ), nLeftFrmPos( nLRPos ),
bHasSelection( bAktSelection )
@@ -98,8 +98,8 @@ SwCallLink::~SwCallLink()
return;
xub_StrLen nCmp, nAktCntnt = pCurCrsr->GetPoint()->nContent.GetIndex();
- USHORT nNdWhich = pCNd->GetNodeType();
- ULONG nAktNode = pCurCrsr->GetPoint()->nNode.GetIndex();
+ sal_uInt16 nNdWhich = pCNd->GetNodeType();
+ sal_uLong nAktNode = pCurCrsr->GetPoint()->nNode.GetIndex();
// melde die Shell beim akt. Node als abhaengig an, dadurch koennen
// alle Attribut-Aenderungen ueber den Link weiter gemeldet werden.
@@ -135,7 +135,7 @@ SwCallLink::~SwCallLink()
{
const SwpHints &rHts = ((SwTxtNode*)pCNd)->GetSwpHints();
- USHORT n;
+ sal_uInt16 n;
xub_StrLen nStart;
const xub_StrLen *pEnd;
@@ -191,7 +191,7 @@ SwCallLink::~SwCallLink()
const SwFrm* pFrm;
const SwFlyFrm *pFlyFrm;
- if( !rShell.ActionPend() && 0 != ( pFrm = pCNd->GetFrm(0,0,FALSE) ) &&
+ if( !rShell.ActionPend() && 0 != ( pFrm = pCNd->GetFrm(0,0,sal_False) ) &&
0 != ( pFlyFrm = pFrm->FindFlyFrm() ) && !rShell.IsTableMode() )
{
const SwNodeIndex* pIndex = pFlyFrm->GetFmt()->GetCntnt().GetCntntIdx();
@@ -208,7 +208,7 @@ SwCallLink::~SwCallLink()
}
}
-long SwCallLink::GetFrm( SwTxtNode& rNd, xub_StrLen nCntPos, BOOL bCalcFrm )
+long SwCallLink::GetFrm( SwTxtNode& rNd, xub_StrLen nCntPos, sal_Bool bCalcFrm )
{
SwTxtFrm* pFrm = (SwTxtFrm*)rNd.GetFrm(0,0,bCalcFrm), *pNext = pFrm;
if ( pFrm && !pFrm->IsHiddenNow() )
diff --git a/sw/source/core/crsr/callnk.hxx b/sw/source/core/crsr/callnk.hxx
index f85e0c5db123..ad2ea384cc8b 100644
--- a/sw/source/core/crsr/callnk.hxx
+++ b/sw/source/core/crsr/callnk.hxx
@@ -36,19 +36,19 @@ class SwCallLink
{
public:
SwCrsrShell & rShell;
- ULONG nNode;
+ sal_uLong nNode;
xub_StrLen nCntnt;
- BYTE nNdTyp;
+ sal_uInt8 nNdTyp;
long nLeftFrmPos;
bool bHasSelection;
SwCallLink( SwCrsrShell & rSh );
- SwCallLink( SwCrsrShell & rSh, ULONG nAktNode, xub_StrLen nAktCntnt,
- BYTE nAktNdTyp, long nLRPos,
+ SwCallLink( SwCrsrShell & rSh, sal_uLong nAktNode, xub_StrLen nAktCntnt,
+ sal_uInt8 nAktNdTyp, long nLRPos,
bool bAktSelection );
~SwCallLink();
- static long GetFrm( SwTxtNode& rNd, xub_StrLen nCntPos, BOOL bCalcFrm );
+ static long GetFrm( SwTxtNode& rNd, xub_StrLen nCntPos, sal_Bool bCalcFrm );
};
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 9cf698a3a709..4a14a924d80a 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -156,27 +156,27 @@ SwPaM * SwCrsrShell::CreateCrsr()
// loesche den aktuellen Cursor und der folgende wird zum Aktuellen
-BOOL SwCrsrShell::DestroyCrsr()
+sal_Bool SwCrsrShell::DestroyCrsr()
{
// Innerhalb der Tabellen-SSelection keinen neuen Crsr loeschen
ASSERT( !IsTableMode(), "in Tabellen SSelection" );
// ist ueberhaupt ein naechtser vorhanden ?
if(pCurCrsr->GetNext() == pCurCrsr)
- return FALSE;
+ return sal_False;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
SwCursor* pNextCrsr = (SwCursor*)pCurCrsr->GetNext();
delete pCurCrsr;
pCurCrsr = dynamic_cast<SwShellCrsr*>(pNextCrsr);
UpdateCrsr();
- return TRUE;
+ return sal_True;
}
// gebe den aktuellen zurueck
-SwPaM* SwCrsrShell::GetCrsr( BOOL bMakeTblCrsr ) const
+SwPaM* SwCrsrShell::GetCrsr( sal_Bool bMakeTblCrsr ) const
{
if( pTblCrsr )
{
@@ -187,7 +187,7 @@ SwPaM* SwCrsrShell::GetCrsr( BOOL bMakeTblCrsr ) const
if( pTblCrsr->GetPoint()->nNode.GetIndex() &&
pTblCrsr->GetMark()->nNode.GetIndex() &&
0 != ( pCNd = pTblCrsr->GetCntntNode() ) && pCNd->GetFrm() &&
- 0 != ( pCNd = pTblCrsr->GetCntntNode(FALSE) ) && pCNd->GetFrm())
+ 0 != ( pCNd = pTblCrsr->GetCntntNode(sal_False) ) && pCNd->GetFrm())
{
SwShellTableCrsr* pTC = (SwShellTableCrsr*)pTblCrsr;
GetLayout()->MakeTblCrsrs( *pTC );
@@ -215,7 +215,7 @@ void SwCrsrShell::StartAction()
nAktNdTyp = rNd.GetNodeType();
bAktSelection = *pCurCrsr->GetPoint() != *pCurCrsr->GetMark();
if( ND_TEXTNODE & nAktNdTyp )
- nLeftFrmPos = SwCallLink::GetFrm( (SwTxtNode&)rNd, nAktCntnt, TRUE );
+ nLeftFrmPos = SwCallLink::GetFrm( (SwTxtNode&)rNd, nAktCntnt, sal_True );
else
nLeftFrmPos = 0;
}
@@ -223,7 +223,7 @@ void SwCrsrShell::StartAction()
}
-void SwCrsrShell::EndAction( const BOOL bIdleEnd )
+void SwCrsrShell::EndAction( const sal_Bool bIdleEnd )
{
/*
//OS: Wird z.B. eine Basic-Action im Hintergrund ausgefuehrt, geht es so nicht
@@ -236,7 +236,7 @@ void SwCrsrShell::EndAction( const BOOL bIdleEnd )
}
*/
- BOOL bVis = bSVCrsrVis;
+ sal_Bool bVis = bSVCrsrVis;
// Idle-Formatierung ?
if( bIdleEnd && Imp()->GetRegion() )
@@ -248,7 +248,7 @@ if( GetWin() )
{
GetWin()->Push();
GetWin()->ChangePen( Pen( Color( COL_YELLOW )));
- for( USHORT n = 0; n < aPntReg.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aPntReg.Count(); ++n )
{
SwRect aIRect( aPntReg[n] );
GetWin()->DrawRect( aIRect.SVRect() );
@@ -265,8 +265,8 @@ if( GetWin() )
// Task: 76923: dont show the cursor in the ViewShell::EndAction() - call.
// Only the UpdateCrsr shows the cursor.
- BOOL bSavSVCrsrVis = bSVCrsrVis;
- bSVCrsrVis = FALSE;
+ sal_Bool bSavSVCrsrVis = bSVCrsrVis;
+ bSVCrsrVis = sal_False;
ViewShell::EndAction( bIdleEnd ); //der ViewShell den Vortritt lassen
@@ -291,20 +291,20 @@ if( GetWin() )
{
// Crsr-Moves ueberwachen, evt. Link callen
// der DTOR ist das interressante!!
- SwCallLink aLk( *this, nAktNode, nAktCntnt, (BYTE)nAktNdTyp,
+ SwCallLink aLk( *this, nAktNode, nAktCntnt, (sal_uInt8)nAktNdTyp,
nLeftFrmPos, bAktSelection );
}
if( bCallChgLnk && bChgCallFlag && aChgLnk.IsSet() )
{
aChgLnk.Call( this );
- bChgCallFlag = FALSE; // Flag zuruecksetzen
+ bChgCallFlag = sal_False; // Flag zuruecksetzen
}
}
return;
}
- USHORT nParm = SwCrsrShell::CHKRANGE;
+ sal_uInt16 nParm = SwCrsrShell::CHKRANGE;
if ( !bIdleEnd )
nParm |= SwCrsrShell::SCROLLWIN;
UpdateCrsr( nParm, bIdleEnd ); // Cursor-Aenderungen anzeigen
@@ -312,19 +312,19 @@ if( GetWin() )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
aLk.nNode = nAktNode; // evt. Link callen
- aLk.nNdTyp = (BYTE)nAktNdTyp;
+ aLk.nNdTyp = (sal_uInt8)nAktNdTyp;
aLk.nCntnt = nAktCntnt;
aLk.nLeftFrmPos = nLeftFrmPos;
if( !nCrsrMove ||
( 1 == nCrsrMove && bInCMvVisportChgd ) )
- ShowCrsrs( bSVCrsrVis ? TRUE : FALSE ); // Cursor & Selektionen wieder anzeigen
+ ShowCrsrs( bSVCrsrVis ? sal_True : sal_False ); // Cursor & Selektionen wieder anzeigen
}
// falls noch ein ChgCall vorhanden ist, dann rufe ihn
if( bCallChgLnk && bChgCallFlag && aChgLnk.IsSet() )
{
aChgLnk.Call( this );
- bChgCallFlag = FALSE; // Flag zuruecksetzen
+ bChgCallFlag = sal_False; // Flag zuruecksetzen
}
}
@@ -338,25 +338,25 @@ void SwCrsrShell::SttCrsrMove()
StartAction();
}
-void SwCrsrShell::EndCrsrMove( const BOOL bIdleEnd )
+void SwCrsrShell::EndCrsrMove( const sal_Bool bIdleEnd )
{
ASSERT( nCrsrMove, "EndCrsrMove() ohne SttCrsrMove()." );
EndAction( bIdleEnd );
if( !--nCrsrMove )
- bInCMvVisportChgd = FALSE;
+ bInCMvVisportChgd = sal_False;
}
#endif
-BOOL SwCrsrShell::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
- BOOL bVisualAllowed )
+sal_Bool SwCrsrShell::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
+ sal_Bool bVisualAllowed )
{
if( IsTableMode() )
return bLeft ? GoPrevCell() : GoNextCell();
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// #i27615# Handle cursor in front of label.
const SwTxtNode* pTxtNd = 0;
@@ -371,8 +371,8 @@ BOOL SwCrsrShell::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
SwShellCrsr* pShellCrsr = getShellCrsr( true );
if ( !bLeft && pShellCrsr->IsInFrontOfLabel() )
{
- SetInFrontOfLabel( FALSE );
- bRet = TRUE;
+ SetInFrontOfLabel( sal_False );
+ bRet = sal_True;
}
//
// 2. CASE: Cursor is at beginning of numbered paragraph. A move
@@ -383,25 +383,25 @@ BOOL SwCrsrShell::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
0 != ( pTxtNd = pShellCrsr->GetNode()->GetTxtNode() ) &&
pTxtNd->HasVisibleNumberingOrBullet() )
{
- SetInFrontOfLabel( TRUE );
- bRet = TRUE;
+ SetInFrontOfLabel( sal_True );
+ bRet = sal_True;
}
//
// 3. CASE: Regular cursor move. Reset the bInFrontOfLabel flag:
//
else
{
- const BOOL bSkipHidden = !GetViewOptions()->IsShowHiddenChar();
+ const sal_Bool bSkipHidden = !GetViewOptions()->IsShowHiddenChar();
// --> OD 2009-12-30 #i107447#
// To avoid loop the reset of <bInFrontOfLabel> flag is no longer
// reflected in the return value <bRet>.
- const bool bResetOfInFrontOfLabel = SetInFrontOfLabel( FALSE );
+ const bool bResetOfInFrontOfLabel = SetInFrontOfLabel( sal_False );
bRet = pShellCrsr->LeftRight( bLeft, nCnt, nMode, bVisualAllowed,
bSkipHidden, !IsOverwriteCrsr() );
if ( !bRet && bLeft && bResetOfInFrontOfLabel )
{
// undo reset of <bInFrontOfLabel> flag
- SetInFrontOfLabel( TRUE );
+ SetInFrontOfLabel( sal_True );
}
// <--
}
@@ -421,11 +421,11 @@ void SwCrsrShell::MarkListLevel( const String& sListId,
nListLevel != nMarkedListLevel)
{
if ( sMarkedListId.Len() > 0 )
- pDoc->MarkListLevel( sMarkedListId, nMarkedListLevel, FALSE );
+ pDoc->MarkListLevel( sMarkedListId, nMarkedListLevel, sal_False );
if ( sListId.Len() > 0 )
{
- pDoc->MarkListLevel( sListId, nListLevel, TRUE );
+ pDoc->MarkListLevel( sListId, nListLevel, sal_True );
}
sMarkedListId = sListId;
@@ -441,7 +441,7 @@ void SwCrsrShell::UpdateMarkedListLevel()
{
if ( !pTxtNd->IsNumbered() )
{
- pCurCrsr->_SetInFrontOfLabel( FALSE );
+ pCurCrsr->_SetInFrontOfLabel( sal_False );
MarkListLevel( String(), 0 );
}
else if ( pCurCrsr->IsInFrontOfLabel() )
@@ -462,18 +462,18 @@ void SwCrsrShell::UpdateMarkedListLevel()
}
// <--
-BOOL SwCrsrShell::UpDown( BOOL bUp, USHORT nCnt )
+sal_Bool SwCrsrShell::UpDown( sal_Bool bUp, sal_uInt16 nCnt )
{
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
- BOOL bTableMode = IsTableMode();
+ sal_Bool bTableMode = IsTableMode();
SwShellCrsr* pTmpCrsr = getShellCrsr( true );
- BOOL bRet = pTmpCrsr->UpDown( bUp, nCnt );
+ sal_Bool bRet = pTmpCrsr->UpDown( bUp, nCnt );
// --> FME 2005-01-10 #i40019# UpDown should always reset the
// bInFrontOfLabel flag:
- bRet = SetInFrontOfLabel(FALSE) || bRet;
+ bRet = SetInFrontOfLabel(sal_False) || bRet;
// <--
if( pBlockCrsr )
@@ -488,39 +488,39 @@ BOOL SwCrsrShell::UpDown( BOOL bUp, USHORT nCnt )
if( !bTableMode )
eUpdtMode = (CrsrFlag) (eUpdtMode
| SwCrsrShell::UPDOWN | SwCrsrShell::CHKRANGE);
- UpdateCrsr( static_cast<USHORT>(eUpdtMode) );
+ UpdateCrsr( static_cast<sal_uInt16>(eUpdtMode) );
}
}
return bRet;
}
-BOOL SwCrsrShell::LRMargin( BOOL bLeft, BOOL bAPI)
+sal_Bool SwCrsrShell::LRMargin( sal_Bool bLeft, sal_Bool bAPI)
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SET_CURR_SHELL( this );
eMvState = MV_LEFTMARGIN; // Status fuers Crsr-Travelling - GetCrsrOfst
- const BOOL bTableMode = IsTableMode();
+ const sal_Bool bTableMode = IsTableMode();
SwShellCrsr* pTmpCrsr = getShellCrsr( true );
if( pBlockCrsr )
pBlockCrsr->clearPoints();
- const BOOL bWasAtLM =
+ const sal_Bool bWasAtLM =
( 0 == _GetCrsr()->GetPoint()->nContent.GetIndex() );
- BOOL bRet = pTmpCrsr->LeftRightMargin( bLeft, bAPI );
+ sal_Bool bRet = pTmpCrsr->LeftRightMargin( bLeft, bAPI );
if ( bLeft && !bTableMode && bRet && bWasAtLM && !_GetCrsr()->HasMark() )
{
const SwTxtNode * pTxtNd = _GetCrsr()->GetNode()->GetTxtNode();
if ( pTxtNd && pTxtNd->HasVisibleNumberingOrBullet() )
- SetInFrontOfLabel( TRUE );
+ SetInFrontOfLabel( sal_True );
}
else if ( !bLeft )
{
- bRet = SetInFrontOfLabel( FALSE ) || bRet;
+ bRet = SetInFrontOfLabel( sal_False ) || bRet;
}
if( bRet )
@@ -530,19 +530,19 @@ BOOL SwCrsrShell::LRMargin( BOOL bLeft, BOOL bAPI)
return bRet;
}
-BOOL SwCrsrShell::IsAtLRMargin( BOOL bLeft, BOOL bAPI ) const
+sal_Bool SwCrsrShell::IsAtLRMargin( sal_Bool bLeft, sal_Bool bAPI ) const
{
const SwShellCrsr* pTmpCrsr = getShellCrsr( true );
return pTmpCrsr->IsAtLeftRightMargin( bLeft, bAPI );
}
-BOOL SwCrsrShell::SttEndDoc( BOOL bStt )
+sal_Bool SwCrsrShell::SttEndDoc( sal_Bool bStt )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SwShellCrsr* pTmpCrsr = pBlockCrsr ? &pBlockCrsr->getShellCrsr() : pCurCrsr;
- BOOL bRet = pTmpCrsr->SttEndDoc( bStt );
+ sal_Bool bRet = pTmpCrsr->SttEndDoc( bStt );
if( bRet )
{
if( bStt )
@@ -570,9 +570,9 @@ void SwCrsrShell::ExtendedSelectAll()
pPos->nContent.Assign( pCNd, pCNd ? pCNd->Len() : 0 );
}
-BOOL SwCrsrShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage )
+sal_Bool SwCrsrShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// Springe beim Selektieren nie ueber Section-Grenzen !!
if( !pCurCrsr->HasMark() || !pCurCrsr->IsNoCntnt() )
@@ -584,35 +584,35 @@ BOOL SwCrsrShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage )
Point& rPt = pCurCrsr->GetPtPos();
SwCntntFrm * pFrm = pCurCrsr->GetCntntNode()->
GetFrm( &rPt, pCurCrsr->GetPoint() );
- if( pFrm && TRUE == ( bRet = GetFrmInPage( pFrm, fnWhichPage,
+ if( pFrm && sal_True == ( bRet = GetFrmInPage( pFrm, fnWhichPage,
fnPosPage, pCurCrsr ) ) &&
!pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ))
UpdateCrsr();
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
-BOOL SwCrsrShell::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
+sal_Bool SwCrsrShell::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SwCursor* pTmpCrsr = getShellCrsr( true );
- BOOL bRet = pTmpCrsr->MovePara( fnWhichPara, fnPosPara );
+ sal_Bool bRet = pTmpCrsr->MovePara( fnWhichPara, fnPosPara );
if( bRet )
UpdateCrsr();
return bRet;
}
-BOOL SwCrsrShell::MoveSection( SwWhichSection fnWhichSect,
+sal_Bool SwCrsrShell::MoveSection( SwWhichSection fnWhichSect,
SwPosSection fnPosSect)
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SwCursor* pTmpCrsr = getShellCrsr( true );
- BOOL bRet = pTmpCrsr->MoveSection( fnWhichSect, fnPosSect );
+ sal_Bool bRet = pTmpCrsr->MoveSection( fnWhichSect, fnPosSect );
if( bRet )
UpdateCrsr();
return bRet;
@@ -629,7 +629,7 @@ SwFrm* lcl_IsInHeaderFooter( const SwNodeIndex& rIdx, Point& rPt )
SwCntntNode* pCNd = rIdx.GetNode().GetCntntNode();
if( pCNd )
{
- pFrm = pCNd->GetFrm( &rPt, 0, FALSE )->GetUpper();
+ pFrm = pCNd->GetFrm( &rPt, 0, sal_False )->GetUpper();
while( pFrm && !pFrm->IsHeaderFrm() && !pFrm->IsFooterFrm() )
pFrm = pFrm->IsFlyFrm() ? ((SwFlyFrm*)pFrm)->AnchorFrm()
: pFrm->GetUpper();
@@ -637,7 +637,7 @@ SwFrm* lcl_IsInHeaderFooter( const SwNodeIndex& rIdx, Point& rPt )
return pFrm;
}
-BOOL SwCrsrShell::IsInHeaderFooter( BOOL* pbInHeader ) const
+sal_Bool SwCrsrShell::IsInHeaderFooter( sal_Bool* pbInHeader ) const
{
Point aPt;
SwFrm* pFrm = ::lcl_IsInHeaderFooter( pCurCrsr->GetPoint()->nNode, aPt );
@@ -646,7 +646,7 @@ BOOL SwCrsrShell::IsInHeaderFooter( BOOL* pbInHeader ) const
return 0 != pFrm;
}
-int SwCrsrShell::SetCrsr( const Point &rLPt, BOOL bOnlyText, bool bBlock )
+int SwCrsrShell::SetCrsr( const Point &rLPt, sal_Bool bOnlyText, bool bBlock )
{
SET_CURR_SHELL( this );
@@ -666,11 +666,11 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, BOOL bOnlyText, bool bBlock )
// <--
pTxtNd->HasVisibleNumberingOrBullet() )
{
- aTmpState.bInFrontOfLabel = TRUE; // #i27615#
+ aTmpState.bInFrontOfLabel = sal_True; // #i27615#
}
else
{
- aTmpState.bInFrontOfLabel = FALSE;
+ aTmpState.bInFrontOfLabel = sal_False;
}
int bRet = CRSR_POSOLD |
@@ -716,9 +716,9 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, BOOL bOnlyText, bool bBlock )
{
// im gleichen Frame gelandet?
SwFrm* pOld = ((SwCntntNode&)aPos.nNode.GetNode()).GetFrm(
- &aCharRect.Pos(), 0, FALSE );
+ &aCharRect.Pos(), 0, sal_False );
SwFrm* pNew = ((SwCntntNode&)aPos.nNode.GetNode()).GetFrm(
- &aPt, 0, FALSE );
+ &aPt, 0, sal_False );
if( pNew == pOld )
return bRet;
}
@@ -728,7 +728,7 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, BOOL bOnlyText, bool bBlock )
{
// SSelection ueber nicht erlaubte Sections oder wenn im Header/Footer
// dann in verschiedene
- if( !CheckNodesRange( aPos.nNode, pCrsr->GetMark()->nNode, TRUE )
+ if( !CheckNodesRange( aPos.nNode, pCrsr->GetMark()->nNode, sal_True )
|| ( pFrm && !pFrm->Frm().IsInside( pCrsr->GetMkPos() ) ))
return bRet;
@@ -752,7 +752,7 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, BOOL bOnlyText, bool bBlock )
if( !pCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) )
{
- USHORT nFlag = SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE;
+ sal_uInt16 nFlag = SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE;
UpdateCrsr( nFlag );
bRet &= ~CRSR_POSOLD;
}
@@ -774,10 +774,10 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, BOOL bOnlyText, bool bBlock )
// es gibt keinen gueltigen Inhalt -> Cursor verstecken
pVisCrsr->Hide(); // sichtbaren Cursor immer verstecken
eMvState = MV_NONE; // Status fuers Crsr-Travelling
- bAllProtect = TRUE;
+ bAllProtect = sal_True;
if( GetDoc()->GetDocShell() )
{
- GetDoc()->GetDocShell()->SetReadOnlyUI( TRUE );
+ GetDoc()->GetDocShell()->SetReadOnlyUI( sal_True );
CallChgLnk(); // UI bescheid sagen!
}
}
@@ -870,7 +870,7 @@ void SwCrsrShell::ClearMark()
}
-void SwCrsrShell::NormalizePam(BOOL bPointFirst)
+void SwCrsrShell::NormalizePam(sal_Bool bPointFirst)
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
pCurCrsr->Normalize(bPointFirst);
@@ -890,8 +890,8 @@ void SwCrsrShell::SwapPam()
// Ansonsten wird er auf die gewaehlte SSelection gesetzt.
-BOOL SwCrsrShell::ChgCurrPam( const Point & rPt,
- BOOL bTstOnly, BOOL bTstHit )
+sal_Bool SwCrsrShell::ChgCurrPam( const Point & rPt,
+ sal_Bool bTstOnly, sal_Bool bTstHit )
{
SET_CURR_SHELL( this );
@@ -907,7 +907,7 @@ BOOL SwCrsrShell::ChgCurrPam( const Point & rPt,
SwCrsrMoveState aTmpState( MV_NONE );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
if ( !GetLayout()->GetCrsrOfst( &aPtPos, aPt, &aTmpState ) && bTstHit )
- return FALSE;
+ return sal_False;
// suche in allen Selektionen nach dieser Position
SwShellCrsr* pCmp = (SwShellCrsr*)pCurCrsr; // sicher den Pointer auf Cursor
@@ -916,15 +916,15 @@ BOOL SwCrsrShell::ChgCurrPam( const Point & rPt,
*pCmp->Start() <= aPtPos && *pCmp->End() > aPtPos )
{
if( bTstOnly || pCurCrsr == pCmp ) // ist der aktuelle.
- return TRUE; // return ohne Update
+ return sal_True; // return ohne Update
pCurCrsr = pCmp;
UpdateCrsr(); // Cursor steht schon richtig
- return TRUE;
+ return sal_True;
}
} while( pCurCrsr !=
( pCmp = dynamic_cast<SwShellCrsr*>(pCmp->GetNext()) ) );
- return FALSE;
+ return sal_False;
}
@@ -1008,20 +1008,20 @@ int SwCrsrShell::CompareCursor( CrsrCompareType eType ) const
}
-BOOL SwCrsrShell::IsSttPara() const
-{ return( pCurCrsr->GetPoint()->nContent == 0 ? TRUE : FALSE ); }
+sal_Bool SwCrsrShell::IsSttPara() const
+{ return( pCurCrsr->GetPoint()->nContent == 0 ? sal_True : sal_False ); }
-BOOL SwCrsrShell::IsEndPara() const
-{ return( pCurCrsr->GetPoint()->nContent == pCurCrsr->GetCntntNode()->Len() ? TRUE : FALSE ); }
+sal_Bool SwCrsrShell::IsEndPara() const
+{ return( pCurCrsr->GetPoint()->nContent == pCurCrsr->GetCntntNode()->Len() ? sal_True : sal_False ); }
-BOOL SwCrsrShell::IsInFrontOfLabel() const
+sal_Bool SwCrsrShell::IsInFrontOfLabel() const
{
return pCurCrsr->IsInFrontOfLabel();
}
-bool SwCrsrShell::SetInFrontOfLabel( BOOL bNew )
+bool SwCrsrShell::SetInFrontOfLabel( sal_Bool bNew )
{
if ( bNew != IsInFrontOfLabel() )
{
@@ -1032,12 +1032,12 @@ bool SwCrsrShell::SetInFrontOfLabel( BOOL bNew )
return false;
}
-BOOL SwCrsrShell::GotoPage( USHORT nPage )
+sal_Bool SwCrsrShell::GotoPage( sal_uInt16 nPage )
{
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SwCrsrSaveState aSaveState( *pCurCrsr );
- BOOL bRet = GetLayout()->SetCurrPage( pCurCrsr, nPage ) &&
+ sal_Bool bRet = GetLayout()->SetCurrPage( pCurCrsr, nPage ) &&
!pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
if( bRet )
@@ -1046,8 +1046,8 @@ BOOL SwCrsrShell::GotoPage( USHORT nPage )
}
-void SwCrsrShell::GetPageNum( USHORT &rnPhyNum, USHORT &rnVirtNum,
- BOOL bAtCrsrPos, const BOOL bCalcFrm )
+void SwCrsrShell::GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum,
+ sal_Bool bAtCrsrPos, const sal_Bool bCalcFrm )
{
SET_CURR_SHELL( this );
// Seitennummer: die erste sichtbare Seite oder die am Cursor
@@ -1068,7 +1068,7 @@ void SwCrsrShell::GetPageNum( USHORT &rnPhyNum, USHORT &rnVirtNum,
}
-USHORT SwCrsrShell::GetNextPrevPageNum( BOOL bNext )
+sal_uInt16 SwCrsrShell::GetNextPrevPageNum( sal_Bool bNext )
{
SET_CURR_SHELL( this );
@@ -1109,7 +1109,7 @@ USHORT SwCrsrShell::GetNextPrevPageNum( BOOL bNext )
}
-USHORT SwCrsrShell::GetPageCnt()
+sal_uInt16 SwCrsrShell::GetPageCnt()
{
SET_CURR_SHELL( this );
// gebe die Anzahl der Seiten zurueck
@@ -1119,11 +1119,11 @@ USHORT SwCrsrShell::GetPageCnt()
// Gehe zur naechsten SSelection
-BOOL SwCrsrShell::GoNextCrsr()
+sal_Bool SwCrsrShell::GoNextCrsr()
{
// besteht ueberhaupt ein Ring ?
if( pCurCrsr->GetNext() == pCurCrsr )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
@@ -1135,17 +1135,17 @@ BOOL SwCrsrShell::GoNextCrsr()
UpdateCrsr();
pCurCrsr->Show();
}
- return TRUE;
+ return sal_True;
}
// gehe zur vorherigen SSelection
-BOOL SwCrsrShell::GoPrevCrsr()
+sal_Bool SwCrsrShell::GoPrevCrsr()
{
// besteht ueberhaupt ein Ring ?
if( pCurCrsr->GetNext() == pCurCrsr )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
@@ -1158,7 +1158,7 @@ BOOL SwCrsrShell::GoPrevCrsr()
pCurCrsr->Show();
}
- return TRUE;
+ return sal_True;
}
@@ -1169,11 +1169,11 @@ void SwCrsrShell::Paint( const Rectangle &rRect)
// beim Painten immer alle Cursor ausschalten
SwRect aRect( rRect );
- BOOL bVis = FALSE;
+ sal_Bool bVis = sal_False;
// ist Cursor sichtbar, dann verstecke den SV-Cursor
if( pVisCrsr->IsVisible() && !aRect.IsOver( aCharRect ) ) //JP 18.06.97: ???
{
- bVis = TRUE;
+ bVis = sal_True;
pVisCrsr->Hide();
}
@@ -1203,13 +1203,13 @@ void SwCrsrShell::Paint( const Rectangle &rRect)
void SwCrsrShell::VisPortChgd( const SwRect & rRect )
{
SET_CURR_SHELL( this );
- BOOL bVis; // beim Scrollen immer alle Cursor ausschalten
+ sal_Bool bVis; // beim Scrollen immer alle Cursor ausschalten
// ist Cursor sichtbar, dann verstecke den SV-Cursor
- if( TRUE == ( bVis = pVisCrsr->IsVisible() ))
+ if( sal_True == ( bVis = pVisCrsr->IsVisible() ))
pVisCrsr->Hide();
- bVisPortChgd = TRUE;
+ bVisPortChgd = sal_True;
aOldRBPos.X() = VisArea().Right();
aOldRBPos.Y() = VisArea().Bottom();
@@ -1229,9 +1229,9 @@ void SwCrsrShell::VisPortChgd( const SwRect & rRect )
pVisCrsr->Show();
if( nCrsrMove )
- bInCMvVisportChgd = TRUE;
+ bInCMvVisportChgd = sal_True;
- bVisPortChgd = FALSE;
+ bVisPortChgd = sal_False;
}
// aktualisiere den Crsrs, d.H. setze ihn wieder in den Content.
@@ -1323,7 +1323,7 @@ class SwNotifyAccAboutInvalidTextSelections
}
};
// <--
-void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
+void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
{
SET_CURR_SHELL( this );
@@ -1338,7 +1338,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
if( ActionPend() && BasicActionPend() )
{
if ( eFlags & SwCrsrShell::READONLY )
- bIgnoreReadonly = TRUE;
+ bIgnoreReadonly = sal_True;
return; // wenn nicht, dann kein Update !!
}
@@ -1348,7 +1348,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
if ( bIgnoreReadonly )
{
- bIgnoreReadonly = FALSE;
+ bIgnoreReadonly = sal_False;
eFlags |= SwCrsrShell::READONLY;
}
@@ -1364,8 +1364,8 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
if( pTstCrsr->HasMark() && !pBlockCrsr &&
pDoc->IsIdxInTbl( pTstCrsr->GetPoint()->nNode ) &&
( pTblCrsr ||
- pTstCrsr->GetNode( TRUE )->StartOfSectionNode() !=
- pTstCrsr->GetNode( FALSE )->StartOfSectionNode() ) )
+ pTstCrsr->GetNode( sal_True )->StartOfSectionNode() !=
+ pTstCrsr->GetNode( sal_False )->StartOfSectionNode() ) )
{
SwShellCrsr* pITmpCrsr = getShellCrsr( true );
Point aTmpPt( pITmpCrsr->GetPtPos() );
@@ -1402,7 +1402,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
// Second check if mark is in repeated headline:
if ( !bInRepeatedHeadline )
{
- SwCntntFrm* pMarkTblFrm = pITmpCrsr->GetCntntNode( FALSE )->GetFrm( &aTmpMk, pITmpCrsr->GetMark() );
+ SwCntntFrm* pMarkTblFrm = pITmpCrsr->GetCntntNode( sal_False )->GetFrm( &aTmpMk, pITmpCrsr->GetMark() );
ASSERT( pMarkTblFrm, "Tabelle Crsr nicht im Content ??" );
if ( pMarkTblFrm )
@@ -1458,7 +1458,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
}
SwCrsrMoveState aTmpState( MV_NONE );
- aTmpState.bRealHeight = TRUE;
+ aTmpState.bRealHeight = sal_True;
if( !pTblFrm->GetCharRect( aCharRect, *pTblCrsr->GetPoint(), &aTmpState ) )
{
Point aCentrPt( aCharRect.Center() );
@@ -1528,7 +1528,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
// sind wir vielleicht in einer geschuetzten/versteckten Section ?
{
SwShellCrsr* pShellCrsr = getShellCrsr( true );
- BOOL bChgState = TRUE;
+ sal_Bool bChgState = sal_True;
const SwSectionNode* pSectNd = pShellCrsr->GetNode()->FindSectionNode();
if( pSectNd && ( pSectNd->GetSection().IsHiddenFlag() ||
( !IsReadOnlyAvailable() &&
@@ -1542,14 +1542,14 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
// alles ist geschuetzt / versteckt -> besonderer Mode
if( bAllProtect && !IsReadOnlyAvailable() &&
pSectNd->GetSection().IsProtectFlag() )
- bChgState = FALSE;
+ bChgState = sal_False;
else
{
eMvState = MV_NONE; // Status fuers Crsr-Travelling
- bAllProtect = TRUE;
+ bAllProtect = sal_True;
if( GetDoc()->GetDocShell() )
{
- GetDoc()->GetDocShell()->SetReadOnlyUI( TRUE );
+ GetDoc()->GetDocShell()->SetReadOnlyUI( sal_True );
CallChgLnk(); // UI bescheid sagen!
}
return;
@@ -1558,12 +1558,12 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
}
if( bChgState )
{
- BOOL bWasAllProtect = bAllProtect;
- bAllProtect = FALSE;
+ sal_Bool bWasAllProtect = bAllProtect;
+ bAllProtect = sal_False;
if( bWasAllProtect && GetDoc()->GetDocShell() &&
GetDoc()->GetDocShell()->IsReadOnlyUI() )
{
- GetDoc()->GetDocShell()->SetReadOnlyUI( FALSE );
+ GetDoc()->GetDocShell()->SetReadOnlyUI( sal_False );
CallChgLnk(); // UI bescheid sagen!
}
}
@@ -1606,15 +1606,15 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
SwRect aOld( aCharRect );
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
SwCntntFrm *pFrm;
int nLoopCnt = 100;
SwShellCrsr* pShellCrsr = getShellCrsr( true );
do {
- BOOL bAgainst;
+ sal_Bool bAgainst;
do {
- bAgainst = FALSE;
+ bAgainst = sal_False;
pFrm = pShellCrsr->GetCntntNode()->GetFrm(
&pShellCrsr->GetPtPos(), pShellCrsr->GetPoint() );
// ist der Frm nicht mehr vorhanden, dann muss das gesamte Layout
@@ -1640,20 +1640,20 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
!pDoc->GetDocShell()->IsReadOnly() || bAllProtect ) )
{
// dann suche eine gueltige Position
- BOOL bChgState = TRUE;
+ sal_Bool bChgState = sal_True;
if( !FindValidCntntNode(!HasDrawView() ||
0 == Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount()))
{
// alles ist geschuetzt / versteckt -> besonderer Mode
if( bAllProtect )
- bChgState = FALSE;
+ bChgState = sal_False;
else
{
eMvState = MV_NONE; // Status fuers Crsr-Travelling
- bAllProtect = TRUE;
+ bAllProtect = sal_True;
if( GetDoc()->GetDocShell() )
{
- GetDoc()->GetDocShell()->SetReadOnlyUI( TRUE );
+ GetDoc()->GetDocShell()->SetReadOnlyUI( sal_True );
CallChgLnk(); // UI bescheid sagen!
}
return;
@@ -1662,16 +1662,16 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
if( bChgState )
{
- BOOL bWasAllProtect = bAllProtect;
- bAllProtect = FALSE;
+ sal_Bool bWasAllProtect = bAllProtect;
+ bAllProtect = sal_False;
if( bWasAllProtect && GetDoc()->GetDocShell() &&
GetDoc()->GetDocShell()->IsReadOnlyUI() )
{
- GetDoc()->GetDocShell()->SetReadOnlyUI( FALSE );
+ GetDoc()->GetDocShell()->SetReadOnlyUI( sal_False );
CallChgLnk(); // UI bescheid sagen!
}
- bAllProtect = FALSE;
- bAgainst = TRUE; // nochmal den richigen Frm suchen
+ bAllProtect = sal_False;
+ bAgainst = sal_True; // nochmal den richigen Frm suchen
}
}
} while( bAgainst );
@@ -1680,7 +1680,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
{
SwCrsrMoveState aTmpState( eMvState );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
- aTmpState.bRealHeight = TRUE;
+ aTmpState.bRealHeight = sal_True;
aTmpState.bRealWidth = IsOverwriteCrsr();
aTmpState.nCursorBidiLevel = pShellCrsr->GetCrsrBidiLevel();
@@ -1727,7 +1727,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
break;
}
aOld = aCharRect;
- bFirst = FALSE;
+ bFirst = sal_False;
// Cursor-Points auf die neuen Positionen setzen
pShellCrsr->GetPtPos().X() = aCharRect.Left();
@@ -1749,7 +1749,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
//JP 30.04.99: damit das EndAction, beim evtuellen Scrollen, den
// SV-Crsr nicht wieder sichtbar macht, wird hier das Flag
// gesichert und zurueckgesetzt.
- BOOL bSav = bSVCrsrVis; bSVCrsrVis = FALSE;
+ sal_Bool bSav = bSVCrsrVis; bSVCrsrVis = sal_False;
MakeSelVisible();
bSVCrsrVis = bSav;
}
@@ -1934,20 +1934,20 @@ void SwCrsrShell::Push()
/*
* Loescht einen Cursor (gesteuert durch bOldCrsr)
- * - vom Stack oder ( bOldCrsr = TRUE )
+ * - vom Stack oder ( bOldCrsr = sal_True )
* - den aktuellen und der auf dem Stack stehende wird zum aktuellen
*
* Return: es war auf dem Stack noch einer vorhanden
*/
-BOOL SwCrsrShell::Pop( BOOL bOldCrsr )
+sal_Bool SwCrsrShell::Pop( sal_Bool bOldCrsr )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
// noch weitere vorhanden ?
if( 0 == pCrsrStk )
- return FALSE;
+ return sal_False;
SwShellCrsr *pTmp = 0, *pOldStk = pCrsrStk;
@@ -1988,12 +1988,12 @@ BOOL SwCrsrShell::Pop( BOOL bOldCrsr )
pCurCrsr->GetPtPos() = pOldStk->GetPtPos();
delete pOldStk;
- if( !pCurCrsr->IsInProtectTable( TRUE ) &&
+ if( !pCurCrsr->IsInProtectTable( sal_True ) &&
!pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) )
UpdateCrsr(); // akt. Cursor Updaten
}
- return TRUE;
+ return sal_True;
}
/*
@@ -2013,9 +2013,9 @@ void SwCrsrShell::Combine()
if( pCrsrStk->HasMark() ) // nur wenn GetMark gesetzt wurde
{
#ifndef DBG_UTIL
- CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, TRUE );
+ CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, sal_True );
#else
- if( !CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, TRUE ))
+ if( !CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, sal_True ))
ASSERT( !this, "StackCrsr & akt. Crsr nicht in gleicher Section." );
#endif
// kopiere das GetMark
@@ -2032,7 +2032,7 @@ void SwCrsrShell::Combine()
}
delete pCrsrStk;
pCrsrStk = pTmp;
- if( !pCurCrsr->IsInProtectTable( TRUE ) &&
+ if( !pCurCrsr->IsInProtectTable( sal_True ) &&
!pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) )
UpdateCrsr(); // akt. Cursor Updaten
@@ -2057,7 +2057,7 @@ void SwCrsrShell::HideCrsrs()
-void SwCrsrShell::ShowCrsrs( BOOL bCrsrVis )
+void SwCrsrShell::ShowCrsrs( sal_Bool bCrsrVis )
{
if( !bHasFocus || bAllProtect || bBasicHideCrsr )
return;
@@ -2077,7 +2077,7 @@ void SwCrsrShell::ShowCrsr()
{
if( !bBasicHideCrsr )
{
- bSVCrsrVis = TRUE;
+ bSVCrsrVis = sal_True;
UpdateCrsr();
}
}
@@ -2087,7 +2087,7 @@ void SwCrsrShell::HideCrsr()
{
if( !bBasicHideCrsr )
{
- bSVCrsrVis = FALSE;
+ bSVCrsrVis = sal_False;
// evt. die sel. Bereiche aufheben !!
SET_CURR_SHELL( this );
pVisCrsr->Hide();
@@ -2099,25 +2099,25 @@ void SwCrsrShell::ShLooseFcs()
{
if( !bBasicHideCrsr )
HideCrsrs();
- bHasFocus = FALSE;
+ bHasFocus = sal_False;
}
-void SwCrsrShell::ShGetFcs( BOOL bUpdate )
+void SwCrsrShell::ShGetFcs( sal_Bool bUpdate )
{
- bHasFocus = TRUE;
+ bHasFocus = sal_True;
if( !bBasicHideCrsr && VisArea().Width() )
{
- UpdateCrsr( static_cast<USHORT>( bUpdate ?
+ UpdateCrsr( static_cast<sal_uInt16>( bUpdate ?
SwCrsrShell::CHKRANGE|SwCrsrShell::SCROLLWIN
: SwCrsrShell::CHKRANGE ) );
- ShowCrsrs( bSVCrsrVis ? TRUE : FALSE );
+ ShowCrsrs( bSVCrsrVis ? sal_True : sal_False );
}
}
// gebe den aktuellen Frame, in dem der Cursor steht, zurueck
-SwCntntFrm *SwCrsrShell::GetCurrFrm( const BOOL bCalcFrm ) const
+SwCntntFrm *SwCrsrShell::GetCurrFrm( const sal_Bool bCalcFrm ) const
{
SET_CURR_SHELL( (ViewShell*)this );
SwCntntFrm *pRet = 0;
@@ -2126,16 +2126,16 @@ SwCntntFrm *SwCrsrShell::GetCurrFrm( const BOOL bCalcFrm ) const
{
if ( bCalcFrm )
{
- const USHORT* pST = &nStartAction;
- ++(*((USHORT*)pST));
+ const sal_uInt16* pST = &nStartAction;
+ ++(*((sal_uInt16*)pST));
const Size aOldSz( GetDocSize() );
pRet = pNd->GetFrm( &pCurCrsr->GetPtPos(), pCurCrsr->GetPoint() );
- --(*((USHORT*)pST));
+ --(*((sal_uInt16*)pST));
if( aOldSz != GetDocSize() )
((SwCrsrShell*)this)->SizeChgNotify();
}
else
- pRet = pNd->GetFrm( &pCurCrsr->GetPtPos(), pCurCrsr->GetPoint(), FALSE);
+ pRet = pNd->GetFrm( &pCurCrsr->GetPtPos(), pCurCrsr->GetPoint(), sal_False);
}
return pRet;
}
@@ -2147,11 +2147,11 @@ SwCntntFrm *SwCrsrShell::GetCurrFrm( const BOOL bCalcFrm ) const
void SwCrsrShell::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- const USHORT nWhich = pOld ?
+ const sal_uInt16 nWhich = pOld ?
pOld->Which() :
pNew ?
pNew->Which() :
- sal::static_int_cast<USHORT>(RES_MSG_BEGIN);
+ sal::static_int_cast<sal_uInt16>(RES_MSG_BEGIN);
if( bCallChgLnk &&
( nWhich < RES_MSG_BEGIN || nWhich >= RES_MSG_END ||
@@ -2159,7 +2159,7 @@ void SwCrsrShell::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
nWhich == RES_ATTRSET_CHG ))
// die Messages werden nicht weitergemeldet
//MA 07. Apr. 94 fix(6681): RES_UPDATE_ATTR wird implizit vom
- //SwTxtNode::Insert(SwTxtHint*, USHORT) abgesetzt; hier wird reagiert und
+ //SwTxtNode::Insert(SwTxtHint*, sal_uInt16) abgesetzt; hier wird reagiert und
//vom Insert brauch nicht mehr die Keule RES_FMT_CHG versandt werden.
CallChgLnk();
@@ -2173,12 +2173,12 @@ void SwCrsrShell::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// also, ob GetMark gesetzt und SPoint und GetMark unterschiedlich sind.
-BOOL SwCrsrShell::HasSelection() const
+sal_Bool SwCrsrShell::HasSelection() const
{
const SwPaM* pCrsr = getShellCrsr( true );
return( IsTableMode() || ( pCrsr->HasMark() &&
*pCrsr->GetPoint() != *pCrsr->GetMark())
- ? TRUE : FALSE );
+ ? sal_True : sal_False );
}
@@ -2187,12 +2187,12 @@ void SwCrsrShell::CallChgLnk()
// innerhalb von Start-/End-Action kein Call, sondern nur merken,
// das sich etwas geaendert hat. Wird bei EndAction beachtet.
if( BasicActionPend() )
- bChgCallFlag = TRUE; // das Change merken
+ bChgCallFlag = sal_True; // das Change merken
else if( aChgLnk.IsSet() )
{
if( bCallChgLnk )
aChgLnk.Call( this );
- bChgCallFlag = FALSE; // Flag zuruecksetzen
+ bChgCallFlag = sal_False; // Flag zuruecksetzen
}
}
@@ -2234,7 +2234,7 @@ String SwCrsrShell::GetText() const
}
// hole vom Start/Ende der akt. SSelection das nte Zeichen
-sal_Unicode SwCrsrShell::GetChar( BOOL bEnd, long nOffset )
+sal_Unicode SwCrsrShell::GetChar( sal_Bool bEnd, long nOffset )
{
if( IsTableMode() ) // im TabelleMode nicht moeglich
return 0;
@@ -2258,10 +2258,10 @@ sal_Unicode SwCrsrShell::GetChar( BOOL bEnd, long nOffset )
// erweiter die akt. SSelection am Anfang/Ende um n Zeichen
-BOOL SwCrsrShell::ExtendSelection( BOOL bEnd, xub_StrLen nCount )
+sal_Bool SwCrsrShell::ExtendSelection( sal_Bool bEnd, xub_StrLen nCount )
{
if( !pCurCrsr->HasMark() || IsTableMode() )
- return FALSE; // keine Selektion
+ return sal_False; // keine Selektion
SwPosition* pPos = bEnd ? pCurCrsr->End() : pCurCrsr->Start();
SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode();
@@ -2273,47 +2273,47 @@ BOOL SwCrsrShell::ExtendSelection( BOOL bEnd, xub_StrLen nCount )
if( ( nPos + nCount ) <= pTxtNd->GetTxt().Len() )
nPos = nPos + nCount;
else
- return FALSE; // nicht mehr moeglich
+ return sal_False; // nicht mehr moeglich
}
else if( nPos >= nCount )
nPos = nPos - nCount;
else
- return FALSE; // nicht mehr moeglich
+ return sal_False; // nicht mehr moeglich
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
pPos->nContent = nPos;
UpdateCrsr();
- return TRUE;
+ return sal_True;
}
// setze nur den sichtbaren Cursor an die angegebene Dokument-Pos.
-// returnt FALSE: wenn der SPoint vom Layout korrigiert wurde.
+// returnt sal_False: wenn der SPoint vom Layout korrigiert wurde.
-BOOL SwCrsrShell::SetVisCrsr( const Point &rPt )
+sal_Bool SwCrsrShell::SetVisCrsr( const Point &rPt )
{
SET_CURR_SHELL( this );
Point aPt( rPt );
SwPosition aPos( *pCurCrsr->GetPoint() );
SwCrsrMoveState aTmpState( MV_SETONLYTEXT );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
- aTmpState.bRealHeight = TRUE;
+ aTmpState.bRealHeight = sal_True;
- BOOL bRet = GetLayout()->GetCrsrOfst( &aPos, aPt /*, &aTmpState*/ );
+ sal_Bool bRet = GetLayout()->GetCrsrOfst( &aPos, aPt /*, &aTmpState*/ );
- SetInFrontOfLabel( FALSE ); // #i27615#
+ SetInFrontOfLabel( sal_False ); // #i27615#
// nur in TextNodes anzeigen !!
SwTxtNode* pTxtNd = aPos.nNode.GetNode().GetTxtNode();
if( !pTxtNd )
- return FALSE;
+ return sal_False;
const SwSectionNode* pSectNd = pTxtNd->FindSectionNode();
if( pSectNd && (pSectNd->GetSection().IsHiddenFlag() ||
( !IsReadOnlyAvailable() &&
pSectNd->GetSection().IsProtectFlag())) )
- return FALSE;
+ return sal_False;
SwCntntFrm *pFrm = pTxtNd->GetFrm( &aPt, &aPos );
if ( Imp()->IsIdleAction() )
@@ -2325,7 +2325,7 @@ BOOL SwCrsrShell::SetVisCrsr( const Point &rPt )
if( aTmp == aCharRect && // BUG 10137: bleibt der Cursor auf der
pVisCrsr->IsVisible() ) // Position nicht hidden & showen
- return TRUE;
+ return sal_True;
pVisCrsr->Hide(); // sichtbaren Cursor immer verstecken
if( IsScrollMDI( this, aCharRect ))
@@ -2346,13 +2346,13 @@ BOOL SwCrsrShell::SetVisCrsr( const Point &rPt )
aCrsrHeight.Y() = aCharRect.Height();
}
- pVisCrsr->SetDragCrsr( TRUE );
+ pVisCrsr->SetDragCrsr( sal_True );
pVisCrsr->Show(); // wieder anzeigen
}
return bRet;
}
-BOOL SwCrsrShell::IsOverReadOnlyPos( const Point& rPt ) const
+sal_Bool SwCrsrShell::IsOverReadOnlyPos( const Point& rPt ) const
{
Point aPt( rPt );
SwPaM aPam( *pCurCrsr->GetPoint() );
@@ -2365,10 +2365,10 @@ BOOL SwCrsrShell::IsOverReadOnlyPos( const Point& rPt ) const
// returne die Anzahl der Cursor im Ring (Flag besagt ob man nur
// aufgepspannte haben will - sprich etwas selektiert ist (Basic))
-USHORT SwCrsrShell::GetCrsrCnt( BOOL bAll ) const
+sal_uInt16 SwCrsrShell::GetCrsrCnt( sal_Bool bAll ) const
{
Ring* pTmp = GetCrsr()->GetNext();
- USHORT n = (bAll || ( pCurCrsr->HasMark() &&
+ sal_uInt16 n = (bAll || ( pCurCrsr->HasMark() &&
*pCurCrsr->GetPoint() != *pCurCrsr->GetMark())) ? 1 : 0;
while( pTmp != pCurCrsr )
{
@@ -2381,10 +2381,10 @@ USHORT SwCrsrShell::GetCrsrCnt( BOOL bAll ) const
}
-BOOL SwCrsrShell::IsStartOfDoc() const
+sal_Bool SwCrsrShell::IsStartOfDoc() const
{
if( pCurCrsr->GetPoint()->nContent.GetIndex() )
- return FALSE;
+ return sal_False;
// Hinter EndOfIcons kommt die Content-Section (EndNd+StNd+CntntNd)
SwNodeIndex aIdx( GetDoc()->GetNodes().GetEndOfExtras(), 2 );
@@ -2394,7 +2394,7 @@ BOOL SwCrsrShell::IsStartOfDoc() const
}
-BOOL SwCrsrShell::IsEndOfDoc() const
+sal_Bool SwCrsrShell::IsEndOfDoc() const
{
SwNodeIndex aIdx( GetDoc()->GetNodes().GetEndOfContent(), -1 );
SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode();
@@ -2410,10 +2410,10 @@ BOOL SwCrsrShell::IsEndOfDoc() const
// Cursor auf seinen TextNode (oder StartNode?).
// Beim naechsten ::GetCrsr werden sie wieder alle erzeugt
// Wird fuers Drag&Drop / ClipBorad-Paste in Tabellen benoetigt.
-BOOL SwCrsrShell::ParkTblCrsr()
+sal_Bool SwCrsrShell::ParkTblCrsr()
{
if( !pTblCrsr )
- return FALSE;
+ return sal_False;
pTblCrsr->ParkCrsr();
@@ -2425,7 +2425,7 @@ BOOL SwCrsrShell::ParkTblCrsr()
*pCurCrsr->GetMark() = *pCurCrsr->GetPoint() = *pTblCrsr->GetPoint();
pCurCrsr->DeleteMark();
- return TRUE;
+ return sal_True;
}
/***********************************************************************
@@ -2445,7 +2445,7 @@ void SwCrsrShell::_ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing )
SwPaM *pTmpDel = 0, *pTmp = *ppDelRing;
// durchsuche den gesamten Ring
- BOOL bGoNext;
+ sal_Bool bGoNext;
do {
const SwPosition *pTmpStt = pTmp->Start(),
*pTmpEnd = pTmp->GetPoint() == pTmpStt ?
@@ -2466,22 +2466,22 @@ void SwCrsrShell::_ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing )
if( *pStt < *pTmpEnd )
pTmpDel = pTmp;
- bGoNext = TRUE;
+ bGoNext = sal_True;
if( pTmpDel ) // ist der Pam im Bereich ?? loesche ihn
{
- BOOL bDelete = TRUE;
+ sal_Bool bDelete = sal_True;
if( *ppDelRing == pTmpDel )
{
if( *ppDelRing == pCurCrsr )
{
- if( TRUE == ( bDelete = GoNextCrsr() ))
+ if( sal_True == ( bDelete = GoNextCrsr() ))
{
- bGoNext = FALSE;
+ bGoNext = sal_False;
pTmp = (SwPaM*)pTmp->GetNext();
}
}
else
- bDelete = FALSE; // StackCrsr nie loeschen !!
+ bDelete = sal_False; // StackCrsr nie loeschen !!
}
if( bDelete )
@@ -2584,9 +2584,9 @@ SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, Window *pInitWin )
bAllProtect = bVisPortChgd = bChgCallFlag = bInCMvVisportChgd =
bGCAttr = bIgnoreReadonly = bSelTblCells = bBasicHideCrsr =
- bOverwriteCrsr = FALSE;
- bCallChgLnk = bHasFocus = bSVCrsrVis = bAutoUpdateCells = TRUE;
- bSetCrsrInReadOnly = TRUE;
+ bOverwriteCrsr = sal_False;
+ bCallChgLnk = bHasFocus = bSVCrsrVis = bAutoUpdateCells = sal_True;
+ bSetCrsrInReadOnly = sal_True;
pVisCrsr = new SwVisCrsr( this );
// UpdateCrsr( 0 );
// OD 11.02.2003 #100556#
@@ -2627,9 +2627,9 @@ SwCrsrShell::SwCrsrShell( SwDoc& rDoc, Window *pInitWin,
bAllProtect = bVisPortChgd = bChgCallFlag = bInCMvVisportChgd =
bGCAttr = bIgnoreReadonly = bSelTblCells = bBasicHideCrsr =
- bOverwriteCrsr = FALSE;
- bCallChgLnk = bHasFocus = bSVCrsrVis = bAutoUpdateCells = TRUE;
- bSetCrsrInReadOnly = TRUE;
+ bOverwriteCrsr = sal_False;
+ bCallChgLnk = bHasFocus = bSVCrsrVis = bAutoUpdateCells = sal_True;
+ bSetCrsrInReadOnly = sal_True;
pVisCrsr = new SwVisCrsr( this );
// UpdateCrsr( 0 );
@@ -2686,13 +2686,13 @@ SwShellCrsr* SwCrsrShell::getShellCrsr( bool bBlock )
//Sollte fuer das Clipboard der WaitPtr geschaltet werden?
//Warten bei TableMode, Mehrfachselektion und mehr als x Selektieren Absaetzen.
-BOOL SwCrsrShell::ShouldWait() const
+sal_Bool SwCrsrShell::ShouldWait() const
{
if ( IsTableMode() || GetCrsrCnt() > 1 )
- return TRUE;
+ return sal_True;
if( HasDrawView() && GetDrawView()->GetMarkedObjectList().GetMarkCount() )
- return TRUE;
+ return sal_True;
SwPaM* pPam = GetCrsr();
return pPam->Start()->nNode.GetIndex() + 10 <
@@ -2700,7 +2700,7 @@ BOOL SwCrsrShell::ShouldWait() const
}
-USHORT SwCrsrShell::UpdateTblSelBoxes()
+sal_uInt16 SwCrsrShell::UpdateTblSelBoxes()
{
if( pTblCrsr && ( pTblCrsr->IsChgd() || !pTblCrsr->GetBoxesCount() ))
GetLayout()->MakeTblCrsrs( *pTblCrsr );
@@ -2744,18 +2744,18 @@ void SwCrsrShell::MakeSelVisible()
// suche eine gueltige ContentPosition (nicht geschuetzt/nicht versteckt)
-BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
+sal_Bool SwCrsrShell::FindValidCntntNode( sal_Bool bOnlyText )
{
if( pTblCrsr ) // was soll ich jetzt machen ??
{
ASSERT( !this, "TabellenSelection nicht aufgehoben!" );
- return FALSE;
+ return sal_False;
}
//JP 28.10.97: Bug 45129 - im UI-ReadOnly ist alles erlaubt
if( !bAllProtect && GetDoc()->GetDocShell() &&
GetDoc()->GetDocShell()->IsReadOnlyUI() )
- return TRUE;
+ return sal_True;
// dann raus da!
if( pCurCrsr->HasMark() )
@@ -2763,12 +2763,12 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
// als erstes mal auf Rahmen abpruefen
SwNodeIndex& rNdIdx = pCurCrsr->GetPoint()->nNode;
- ULONG nNdIdx = rNdIdx.GetIndex(); // sichern
+ sal_uLong nNdIdx = rNdIdx.GetIndex(); // sichern
SwNodes& rNds = pDoc->GetNodes();
SwCntntNode* pCNd = rNdIdx.GetNode().GetCntntNode();
const SwCntntFrm * pFrm;
- if( pCNd && 0 != (pFrm = pCNd->GetFrm(0,pCurCrsr->GetPoint(),FALSE)) &&
+ if( pCNd && 0 != (pFrm = pCNd->GetFrm(0,pCurCrsr->GetPoint(),sal_False)) &&
!IsReadOnlyAvailable() && pFrm->IsProtected() &&
nNdIdx < rNds.GetEndOfExtras().GetIndex() )
{
@@ -2778,17 +2778,17 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
aPam.GetMark()->nNode = rNds.GetEndOfContent();
aPam.GetPoint()->nNode = *pCNd->EndOfSectionNode();
- BOOL bFirst = FALSE;
- if( 0 == (pCNd = ::GetNode( aPam, bFirst, fnMoveForward, FALSE )))
+ sal_Bool bFirst = sal_False;
+ if( 0 == (pCNd = ::GetNode( aPam, bFirst, fnMoveForward, sal_False )))
{
aPam.GetMark()->nNode = *rNds.GetEndOfPostIts().StartOfSectionNode();
- pCNd = ::GetNode( aPam, bFirst, fnMoveBackward, FALSE );
+ pCNd = ::GetNode( aPam, bFirst, fnMoveBackward, sal_False );
}
if( !pCNd ) // sollte nie passieren !!!
{
rNdIdx = nNdIdx; // alten Node zurueck
- return FALSE;
+ return sal_False;
}
*pCurCrsr->GetPoint() = *aPam.GetPoint();
}
@@ -2801,7 +2801,7 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
nNdIdx = rNdIdx.GetIndex();
}
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
// #i9059# cursor may not stand in protected cells
// (unless cursor in protected areas is OK.)
@@ -2844,15 +2844,15 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
typedef SwCntntNode* (SwNodes:: *FNGoSection)( SwNodeIndex *, int, int ) const;
FNGoSection funcGoSection = &SwNodes::GoNextSection;
- bOk = FALSE;
+ bOk = sal_False;
for( int nLoopCnt = 0; !bOk && nLoopCnt < 2; ++nLoopCnt )
{
- BOOL bWeiter;
+ sal_Bool bWeiter;
do {
- bWeiter = FALSE;
+ bWeiter = sal_False;
while( 0 != ( pCNd = (rNds.*funcGoSection)( &rNdIdx,
- TRUE, !IsReadOnlyAvailable() )) )
+ sal_True, !IsReadOnlyAvailable() )) )
{
// in eine Tabelle verschoben -> pruefe ob die
// vielleicht geschuetzt ist
@@ -2861,14 +2861,14 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
SwCallLink aTmp( *this );
SwCrsrSaveState aSaveState( *pCurCrsr );
aTmp.nNdTyp = 0; // im DTOR nichts machen!
- if( !pCurCrsr->IsInProtectTable( TRUE, TRUE ) )
+ if( !pCurCrsr->IsInProtectTable( sal_True, sal_True ) )
{
const SwSectionNode* pSNd = pCNd->FindSectionNode();
if( !pSNd || !pSNd->GetSection().IsHiddenFlag()
|| (!IsReadOnlyAvailable() &&
pSNd->GetSection().IsProtectFlag() ))
{
- bOk = TRUE;
+ bOk = sal_True;
break; // eine nicht geschuetzte Zelle gef.
}
continue; // dann weiter suchen
@@ -2876,7 +2876,7 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
}
else
{
- bOk = TRUE;
+ bOk = sal_True;
break; // eine nicht geschuetzte Zelle gef.
}
}
@@ -2884,13 +2884,13 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
if( bOk && rNdIdx.GetIndex() < rNds.GetEndOfExtras().GetIndex() )
{
// Teste mal auf Fly - kann auch noch geschuetzt sein!!
- if( 0 == (pFrm = pCNd->GetFrm(0,0,FALSE)) ||
+ if( 0 == (pFrm = pCNd->GetFrm(0,0,sal_False)) ||
( !IsReadOnlyAvailable() && pFrm->IsProtected() ) ||
( bOnlyText && pCNd->IsNoTxtNode() ) )
{
// dann weiter suchen!
- bOk = FALSE;
- bWeiter = TRUE;
+ bOk = sal_False;
+ bWeiter = sal_True;
}
}
} while( bWeiter );
@@ -2906,7 +2906,7 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
if( bOk )
{
pCNd = rNdIdx.GetNode().GetCntntNode();
-// USHORT nCntnt = Min( pCNd->Len(), pCurCrsr->GetPoint()->nContent.GetIndex() );
+// sal_uInt16 nCntnt = Min( pCNd->Len(), pCurCrsr->GetPoint()->nContent.GetIndex() );
xub_StrLen nCntnt = rNdIdx.GetIndex() < nNdIdx ? pCNd->Len() : 0;
pCurCrsr->GetPoint()->nContent.Assign( pCNd, nCntnt );
}
@@ -2916,7 +2916,7 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
// falls Cursor im versteckten Bereich ist, auf jedenfall schon mal
// verschieben!!
- if( !pCNd || !pCNd->GetFrm(0,0,FALSE) )
+ if( !pCNd || !pCNd->GetFrm(0,0,sal_False) )
{
SwCrsrMoveState aTmpState( MV_NONE );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
@@ -2933,14 +2933,14 @@ void SwCrsrShell::NewCoreSelection()
}
-BOOL SwCrsrShell::IsCrsrReadonly() const
+sal_Bool SwCrsrShell::IsCrsrReadonly() const
{
if ( GetViewOptions()->IsReadonly() ||
// --> FME 2004-06-29 #114856# Formular view
GetViewOptions()->IsFormView() )
// <--
{
- SwFrm *pFrm = GetCurrFrm( FALSE );
+ SwFrm *pFrm = GetCurrFrm( sal_False );
const SwFlyFrm* pFly;
const SwSection* pSection;
@@ -2950,25 +2950,25 @@ BOOL SwCrsrShell::IsCrsrReadonly() const
!pFly->Lower()->IsNoTxtFrm() &&
!GetDrawView()->GetMarkedObjectList().GetMarkCount() )
{
- return FALSE;
+ return sal_False;
}
// --> FME 2004-06-22 #114856# edit in readonly sections
else if ( pFrm && pFrm->IsInSct() &&
0 != ( pSection = pFrm->FindSctFrm()->GetSection() ) &&
pSection->IsEditInReadonlyFlag() )
{
- return FALSE;
+ return sal_False;
}
// <--
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// darf der Cursor in ReadOnlyBereiche?
-void SwCrsrShell::SetReadOnlyAvailable( BOOL bFlag )
+void SwCrsrShell::SetReadOnlyAvailable( sal_Bool bFlag )
{
// im GlobalDoc darf NIE umgeschaltet werden
if( (!GetDoc()->GetDocShell() ||
@@ -2987,9 +2987,9 @@ void SwCrsrShell::SetReadOnlyAvailable( BOOL bFlag )
}
}
-BOOL SwCrsrShell::HasReadonlySel() const
+sal_Bool SwCrsrShell::HasReadonlySel() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( IsReadOnlyAvailable() ||
// --> FME 2004-06-29 #114856# Formular view
GetViewOptions()->IsFormView() )
@@ -3010,16 +3010,16 @@ BOOL SwCrsrShell::HasReadonlySel() const
// --> FME 2004-06-29 #114856# Formular view
GetViewOptions()->IsFormView() ) )
// <--
- bRet = TRUE;
+ bRet = sal_True;
} while( !bRet && pCurCrsr != ( pCrsr = (SwPaM*)pCrsr->GetNext() ));
}
}
return bRet;
}
-BOOL SwCrsrShell::IsSelFullPara() const
+sal_Bool SwCrsrShell::IsSelFullPara() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pCurCrsr->GetPoint()->nNode.GetIndex() ==
pCurCrsr->GetMark()->nNode.GetIndex() && pCurCrsr == pCurCrsr->GetNext() )
@@ -3053,13 +3053,13 @@ short SwCrsrShell::GetTextDirection( const Point* pPt ) const
return pDoc->GetTextDirection( aPos, &aPt );
}
-BOOL SwCrsrShell::IsInVerticalText( const Point* pPt ) const
+sal_Bool SwCrsrShell::IsInVerticalText( const Point* pPt ) const
{
const short nDir = GetTextDirection( pPt );
return FRMDIR_VERT_TOP_RIGHT == nDir || FRMDIR_VERT_TOP_LEFT == nDir;
}
-BOOL SwCrsrShell::IsInRightToLeftText( const Point* pPt ) const
+sal_Bool SwCrsrShell::IsInRightToLeftText( const Point* pPt ) const
{
const short nDir = GetTextDirection( pPt );
// GetTextDirection uses FRMDIR_VERT_TOP_LEFT to indicate RTL in
@@ -3102,39 +3102,39 @@ bool SwCrsrShell::SelectHiddenRange()
/* */
// die Suchfunktionen
-ULONG SwCrsrShell::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes,
+sal_uLong SwCrsrShell::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes,
SwDocPositions eStart, SwDocPositions eEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges eRng, int bReplace )
{
if( pTblCrsr )
GetCrsr();
delete pTblCrsr, pTblCrsr = 0;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
- ULONG nRet = pCurCrsr->Find( rSearchOpt, bSearchInNotes, eStart, eEnde, bCancel, eRng, bReplace );
+ sal_uLong nRet = pCurCrsr->Find( rSearchOpt, bSearchInNotes, eStart, eEnde, bCancel, eRng, bReplace );
if( nRet || bCancel )
UpdateCrsr();
return nRet;
}
-ULONG SwCrsrShell::Find( const SwTxtFmtColl& rFmtColl,
+sal_uLong SwCrsrShell::Find( const SwTxtFmtColl& rFmtColl,
SwDocPositions eStart, SwDocPositions eEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges eRng, const SwTxtFmtColl* pReplFmt )
{
if( pTblCrsr )
GetCrsr();
delete pTblCrsr, pTblCrsr = 0;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
- ULONG nRet = pCurCrsr->Find( rFmtColl, eStart, eEnde, bCancel, eRng, pReplFmt );
+ sal_uLong nRet = pCurCrsr->Find( rFmtColl, eStart, eEnde, bCancel, eRng, pReplFmt );
if( nRet )
UpdateCrsr();
return nRet;
}
-ULONG SwCrsrShell::Find( const SfxItemSet& rSet, BOOL bNoCollections,
+sal_uLong SwCrsrShell::Find( const SfxItemSet& rSet, sal_Bool bNoCollections,
SwDocPositions eStart, SwDocPositions eEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges eRng, const SearchOptions* pSearchOpt,
const SfxItemSet* rReplSet )
{
@@ -3142,7 +3142,7 @@ ULONG SwCrsrShell::Find( const SfxItemSet& rSet, BOOL bNoCollections,
GetCrsr();
delete pTblCrsr, pTblCrsr = 0;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
- ULONG nRet = pCurCrsr->Find( rSet, bNoCollections, eStart, eEnde, bCancel,
+ sal_uLong nRet = pCurCrsr->Find( rSet, bNoCollections, eStart, eEnde, bCancel,
eRng, pSearchOpt, rReplSet );
if( nRet )
UpdateCrsr();
@@ -3313,7 +3313,7 @@ void lcl_FillRecognizerData( uno::Sequence< rtl::OUString >& rSmartTagTypes,
std::vector< rtl::OUString > aSmartTagTypes;
std::vector< uno::Reference< container::XStringKeyMap > > aStringKeyMaps;
- for ( USHORT i = 0; i < rSmartTagList.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rSmartTagList.Count(); ++i )
{
const xub_StrLen nSTPos = rSmartTagList.Pos( i );
const xub_StrLen nSTLen = rSmartTagList.Len( i );
@@ -3335,7 +3335,7 @@ void lcl_FillRecognizerData( uno::Sequence< rtl::OUString >& rSmartTagTypes,
rStringKeyMaps.realloc( aSmartTagTypes.size() );
std::vector< rtl::OUString >::const_iterator aTypesIter = aSmartTagTypes.begin();
- USHORT i = 0;
+ sal_uInt16 i = 0;
for ( aTypesIter = aSmartTagTypes.begin(); aTypesIter != aSmartTagTypes.end(); ++aTypesIter )
rSmartTagTypes[i++] = *aTypesIter;
@@ -3384,7 +3384,7 @@ void SwCrsrShell::GetSmartTagTerm( uno::Sequence< rtl::OUString >& rSmartTagType
if( pSmartTagList->InWrongWord( nBegin, nLen ) && !pNode->IsSymbol(nBegin) )
{
- const USHORT nIndex = pSmartTagList->GetWrongPos( nBegin );
+ const sal_uInt16 nIndex = pSmartTagList->GetWrongPos( nBegin );
const SwWrongList* pSubList = pSmartTagList->SubList( nIndex );
if ( pSubList )
{
@@ -3428,7 +3428,7 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
if( pSmartTagList->InWrongWord( nBegin, nLen ) && !pNode->IsSymbol(nBegin) )
{
- const USHORT nIndex = pSmartTagList->GetWrongPos( nBegin );
+ const sal_uInt16 nIndex = pSmartTagList->GetWrongPos( nBegin );
const SwWrongList* pSubList = pSmartTagList->SubList( nIndex );
if ( pSubList )
{
@@ -3448,7 +3448,7 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
xub_StrLen nLineStart = GetCrsr()->GetPoint()->nContent.GetIndex();
RightMargin();
xub_StrLen nLineEnd = GetCrsr()->GetPoint()->nContent.GetIndex();
- Pop(FALSE);
+ Pop(sal_False);
// make sure the selection build later from the
// data below does not include footnotes and other
@@ -3479,16 +3479,16 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
rContent = nWordStart;
SwRect aStartRect;
SwCrsrMoveState aState;
- aState.bRealWidth = TRUE;
+ aState.bRealWidth = sal_True;
SwCntntNode* pCntntNode = pCrsr->GetCntntNode();
- SwCntntFrm *pCntntFrame = pCntntNode->GetFrm( &rPt, pCrsr->GetPoint(), FALSE);
+ SwCntntFrm *pCntntFrame = pCntntNode->GetFrm( &rPt, pCrsr->GetPoint(), sal_False);
pCntntFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState );
rContent = nWordEnd;
SwRect aEndRect;
pCntntFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState );
rSelectRect = aStartRect.Union( aEndRect );
- Pop(FALSE);
+ Pop(sal_False);
}
}
}
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index e16207f03fa0..0093010fcbba 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -79,9 +79,9 @@ using namespace ::com::sun::star;
// zum naechsten/vorhergehenden Punkt auf gleicher Ebene
-BOOL SwCrsrShell::GotoNextNum()
+sal_Bool SwCrsrShell::GotoNextNum()
{
- BOOL bRet = GetDoc()->GotoNextNum( *pCurCrsr->GetPoint() );
+ sal_Bool bRet = GetDoc()->GotoNextNum( *pCurCrsr->GetPoint() );
if( bRet )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
@@ -119,9 +119,9 @@ BOOL SwCrsrShell::GotoNextNum()
}
-BOOL SwCrsrShell::GotoPrevNum()
+sal_Bool SwCrsrShell::GotoPrevNum()
{
- BOOL bRet = GetDoc()->GotoPrevNum( *pCurCrsr->GetPoint() );
+ sal_Bool bRet = GetDoc()->GotoPrevNum( *pCurCrsr->GetPoint() );
if( bRet )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
@@ -160,7 +160,7 @@ BOOL SwCrsrShell::GotoPrevNum()
// springe aus dem Content zum Header
-BOOL SwCrsrShell::GotoHeaderTxt()
+sal_Bool SwCrsrShell::GotoHeaderTxt()
{
const SwFrm* pFrm = GetCurrFrm()->FindPageFrm();
while( pFrm && !pFrm->IsHeaderFrm() )
@@ -189,7 +189,7 @@ BOOL SwCrsrShell::GotoHeaderTxt()
// springe aus dem Content zum Footer
-BOOL SwCrsrShell::GotoFooterTxt()
+sal_Bool SwCrsrShell::GotoFooterTxt()
{
const SwPageFrm* pFrm = GetCurrFrm()->FindPageFrm();
if( pFrm )
@@ -225,9 +225,9 @@ BOOL SwCrsrShell::GotoFooterTxt()
return 0 != pFrm;
}
-BOOL SwCrsrShell::SetCrsrInHdFt( USHORT nDescNo, BOOL bInHeader )
+sal_Bool SwCrsrShell::SetCrsrInHdFt( sal_uInt16 nDescNo, sal_Bool bInHeader )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwDoc *pMyDoc = GetDoc();
SET_CURR_SHELL( this );
@@ -237,7 +237,7 @@ BOOL SwCrsrShell::SetCrsrInHdFt( USHORT nDescNo, BOOL bInHeader )
// dann den akt. nehmen
const SwPageFrm* pPage = GetCurrFrm()->FindPageFrm();
if( pPage )
- for( USHORT i = 0; i < pMyDoc->GetPageDescCnt(); ++i )
+ for( sal_uInt16 i = 0; i < pMyDoc->GetPageDescCnt(); ++i )
if( pPage->GetPageDesc() ==
&const_cast<const SwDoc *>(pMyDoc)->GetPageDesc( i ) )
{
@@ -276,7 +276,7 @@ BOOL SwCrsrShell::SetCrsrInHdFt( USHORT nDescNo, BOOL bInHeader )
const SwFrm* pFrm;
Point aPt( pCurCrsr->GetPtPos() );
- if( pCNd && 0 != ( pFrm = pCNd->GetFrm( &aPt, 0, FALSE ) ))
+ if( pCNd && 0 != ( pFrm = pCNd->GetFrm( &aPt, 0, sal_False ) ))
{
// dann kann der Cursor ja auch hinein gesetzt werden
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
@@ -300,13 +300,13 @@ BOOL SwCrsrShell::SetCrsrInHdFt( USHORT nDescNo, BOOL bInHeader )
// springe zum naechsten Verzeichnis
-BOOL SwCrsrShell::GotoNextTOXBase( const String* pName )
+sal_Bool SwCrsrShell::GotoNextTOXBase( const String* pName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwSectionFmts& rFmts = GetDoc()->GetSections();
SwCntntNode* pFnd = 0;
- for( USHORT n = rFmts.Count(); n; )
+ for( sal_uInt16 n = rFmts.Count(); n; )
{
const SwSection* pSect = rFmts[ --n ]->GetSection();
const SwSectionNode* pSectNd;
@@ -350,13 +350,13 @@ BOOL SwCrsrShell::GotoNextTOXBase( const String* pName )
// springe zum vorherigen Verzeichnis
-BOOL SwCrsrShell::GotoPrevTOXBase( const String* pName )
+sal_Bool SwCrsrShell::GotoPrevTOXBase( const String* pName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwSectionFmts& rFmts = GetDoc()->GetSections();
SwCntntNode* pFnd = 0;
- for( USHORT n = rFmts.Count(); n; )
+ for( sal_uInt16 n = rFmts.Count(); n; )
{
const SwSection* pSect = rFmts[ --n ]->GetSection();
const SwSectionNode* pSectNd;
@@ -400,12 +400,12 @@ BOOL SwCrsrShell::GotoPrevTOXBase( const String* pName )
// springe zum Verzeichnis vom TOXMark
-BOOL SwCrsrShell::GotoTOXMarkBase()
+sal_Bool SwCrsrShell::GotoTOXMarkBase()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTOXMarks aMarks;
- USHORT nCnt = GetDoc()->GetCurTOXMark( *pCurCrsr->GetPoint(), aMarks );
+ sal_uInt16 nCnt = GetDoc()->GetCurTOXMark( *pCurCrsr->GetPoint(), aMarks );
if( nCnt )
{
// dann nehme den 1. und hole den Verzeichnis-Typ.
@@ -451,12 +451,12 @@ BOOL SwCrsrShell::GotoTOXMarkBase()
// springe zur naechsten (vorherigen) Tabellenformel
// optional auch nur zu kaputten Formeln springen
-BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors )
+sal_Bool SwCrsrShell::GotoNxtPrvTblFormula( sal_Bool bNext, sal_Bool bOnlyErrors )
{
if( IsTableMode() )
- return FALSE;
+ return sal_False;
- BOOL bFnd = FALSE;
+ sal_Bool bFnd = sal_False;
SwPosition& rPos = *pCurCrsr->GetPoint();
Point aPt;
@@ -479,7 +479,7 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors )
if( rPos.nNode < GetDoc()->GetNodes().GetEndOfExtras() )
// auch beim Einsammeln wird nur der erste Frame benutzt!
aCurGEF.SetBodyPos( *rPos.nNode.GetNode().GetCntntNode()->GetFrm(
- &aPt, &rPos, FALSE ) );
+ &aPt, &rPos, sal_False ) );
{
const SfxPoolItem* pItem;
@@ -498,7 +498,7 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors )
const SwCntntFrm* pCFrm;
SwNodeIndex aIdx( *pTBox->GetSttNd() );
const SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aIdx );
- if( pCNd && 0 != ( pCFrm = pCNd->GetFrm( &aPt, 0, FALSE ) ) &&
+ if( pCNd && 0 != ( pCFrm = pCNd->GetFrm( &aPt, 0, sal_False ) ) &&
(IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
{
_SetGetExpFld aCmp( *pTBox );
@@ -508,7 +508,7 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors )
: ( aCmp < aCurGEF && aFndGEF < aCmp ))
{
aFndGEF = aCmp;
- bFnd = TRUE;
+ bFnd = sal_True;
}
}
}
@@ -532,12 +532,12 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors )
}
// springe zum naechsten (vorherigen) Verzeichniseintrag
-BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext )
+sal_Bool SwCrsrShell::GotoNxtPrvTOXMark( sal_Bool bNext )
{
if( IsTableMode() )
- return FALSE;
+ return sal_False;
- BOOL bFnd = FALSE;
+ sal_Bool bFnd = sal_False;
SwPosition& rPos = *pCurCrsr->GetPoint();
Point aPt;
@@ -549,7 +549,7 @@ BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext )
if( rPos.nNode.GetIndex() < GetDoc()->GetNodes().GetEndOfExtras().GetIndex() )
// auch beim Einsammeln wird nur der erste Frame benutzt!
aCurGEF.SetBodyPos( *rPos.nNode.GetNode().
- GetCntntNode()->GetFrm( &aPt, &rPos, FALSE ) );
+ GetCntntNode()->GetFrm( &aPt, &rPos, sal_False ) );
{
const SfxPoolItem* pItem;
@@ -563,7 +563,7 @@ BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext )
RES_TXTATR_TOXMARK, n ) ) &&
0 != (pTxtTOX = ((SwTOXMark*)pItem)->GetTxtTOXMark() ) &&
( pTxtNd = &pTxtTOX->GetTxtNode())->GetNodes().IsDocNodes() &&
- 0 != ( pCFrm = pTxtNd->GetFrm( &aPt, 0, FALSE )) &&
+ 0 != ( pCFrm = pTxtNd->GetFrm( &aPt, 0, sal_False )) &&
( IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
{
SwNodeIndex aNdIndex( *pTxtNd ); // UNIX benoetigt dieses Obj.
@@ -574,7 +574,7 @@ BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext )
: ( aCmp < aCurGEF && aFndGEF < aCmp ))
{
aFndGEF = aCmp;
- bFnd = TRUE;
+ bFnd = sal_True;
}
}
}
@@ -624,14 +624,14 @@ const SwTOXMark& SwCrsrShell::GotoTOXMark( const SwTOXMark& rStart,
// springe zum naechsten / vorherigen FeldTypen
void lcl_MakeFldLst( _SetGetExpFlds& rLst, const SwFieldType& rFldType,
- USHORT nSubType, BOOL bInReadOnly,
- BOOL bChkInpFlag = FALSE )
+ sal_uInt16 nSubType, sal_Bool bInReadOnly,
+ sal_Bool bChkInpFlag = sal_False )
{
// es muss immer der 1. Frame gesucht werden
Point aPt;
SwTxtFld* pTxtFld;
SwClientIter aIter( (SwFieldType&)rFldType );
- BOOL bSubType = nSubType != USHRT_MAX;
+ sal_Bool bSubType = nSubType != USHRT_MAX;
for( SwClient* pLast = aIter.First( TYPE( SwFmtFld )); pLast; pLast = aIter.Next() )
if( 0 != ( pTxtFld = ((SwFmtFld*)pLast)->GetTxtFld() ) &&
( !bChkInpFlag || ((SwSetExpField*)pTxtFld->GetFld().GetFld())
@@ -641,7 +641,7 @@ void lcl_MakeFldLst( _SetGetExpFlds& rLst, const SwFieldType& rFldType,
{
SwCntntFrm* pCFrm;
const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode();
- if( 0 != ( pCFrm = rTxtNode.GetFrm( &aPt, 0, FALSE )) &&
+ if( 0 != ( pCFrm = rTxtNode.GetFrm( &aPt, 0, sal_False )) &&
( bInReadOnly || !pCFrm->IsProtected() ))
{
_SetGetExpFld* pNew = new _SetGetExpFld(
@@ -653,8 +653,8 @@ void lcl_MakeFldLst( _SetGetExpFlds& rLst, const SwFieldType& rFldType,
}
-BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
- USHORT nSubType, USHORT nResType )
+sal_Bool SwCrsrShell::MoveFldType( const SwFieldType* pFldType, sal_Bool bNext,
+ sal_uInt16 nSubType, sal_uInt16 nResType )
{
// sortierte Liste aller Felder
_SetGetExpFlds aSrtLst( 64 );
@@ -662,7 +662,7 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
if (pFldType)
{
if( RES_INPUTFLD != pFldType->Which() && !pFldType->GetDepends() )
- return FALSE;
+ return sal_False;
// Modify-Object gefunden, trage alle Felder ins Array ein
::lcl_MakeFldLst( aSrtLst, *pFldType, nSubType, IsReadOnlyAvailable() );
@@ -671,22 +671,22 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
{
// es gibt noch versteckte InputFelder in den SetExp. Feldern
const SwFldTypes& rFldTypes = *pDoc->GetFldTypes();
- const USHORT nSize = rFldTypes.Count();
+ const sal_uInt16 nSize = rFldTypes.Count();
// Alle Typen abklappern
- for( USHORT i=0; i < nSize; ++i )
+ for( sal_uInt16 i=0; i < nSize; ++i )
if( RES_SETEXPFLD == ( pFldType = rFldTypes[ i ] )->Which() )
::lcl_MakeFldLst( aSrtLst, *pFldType, nSubType,
- IsReadOnlyAvailable(), TRUE );
+ IsReadOnlyAvailable(), sal_True );
}
}
else
{
const SwFldTypes& rFldTypes = *pDoc->GetFldTypes();
- const USHORT nSize = rFldTypes.Count();
+ const sal_uInt16 nSize = rFldTypes.Count();
// Alle Typen abklappern
- for( USHORT i=0; i < nSize; ++i )
+ for( sal_uInt16 i=0; i < nSize; ++i )
if( nResType == ( pFldType = rFldTypes[ i ] )->Which() )
::lcl_MakeFldLst( aSrtLst, *pFldType, nSubType,
IsReadOnlyAvailable() );
@@ -694,9 +694,9 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
// keine Felder gefunden?
if( !aSrtLst.Count() )
- return FALSE;
+ return sal_False;
- USHORT nPos;
+ sal_uInt16 nPos;
SwCursor* pCrsr = getShellCrsr( true );
{
// JP 19.08.98: es muss immer ueber das Feld gesucht werden, damit
@@ -711,7 +711,7 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
SwTxtFld * pTxtFld = static_cast<SwTxtFld *>(
pTNd->GetTxtAttrForCharAt(rPos.nContent.GetIndex(),
RES_TXTATR_FIELD));
- BOOL bDelFld = 0 == pTxtFld;
+ sal_Bool bDelFld = 0 == pTxtFld;
if( bDelFld )
{
SwFmtFld* pFmtFld = new SwFmtFld( SwDateTimeField(
@@ -726,10 +726,10 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
{
// auch beim Einsammeln wird nur der erste Frame benutzt!
Point aPt;
- aSrch.SetBodyPos( *pTNd->GetFrm( &aPt, &rPos, FALSE ) );
+ aSrch.SetBodyPos( *pTNd->GetFrm( &aPt, &rPos, sal_False ) );
}
- BOOL bFound = aSrtLst.Seek_Entry( &aSrch, &nPos );
+ sal_Bool bFound = aSrtLst.Seek_Entry( &aSrch, &nPos );
if( bDelFld )
{
delete (SwFmtFld*)&pTxtFld->GetAttr();
@@ -741,13 +741,13 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
if( bNext )
{
if( ++nPos >= aSrtLst.Count() )
- return FALSE; // schon am Ende
+ return sal_False; // schon am Ende
}
else if( !nPos-- )
- return FALSE; // weiter nach vorne geht nicht
+ return sal_False; // weiter nach vorne geht nicht
}
else if( bNext ? nPos >= aSrtLst.Count() : !nPos--)
- return FALSE;
+ return sal_False;
}
const _SetGetExpFld& rFnd = **( aSrtLst.GetData() + nPos );
@@ -757,7 +757,7 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
SwCrsrSaveState aSaveState( *pCrsr );
rFnd.GetPosOfContent( *pCrsr->GetPoint() );
- BOOL bRet = !pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ sal_Bool bRet = !pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE );
if( bRet )
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
@@ -765,9 +765,9 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
}
-BOOL SwCrsrShell::GotoFld( const SwFmtFld& rFld )
+sal_Bool SwCrsrShell::GotoFld( const SwFmtFld& rFld )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rFld.GetTxtFld() )
{
SET_CURR_SHELL( this );
@@ -788,7 +788,7 @@ BOOL SwCrsrShell::GotoFld( const SwFmtFld& rFld )
}
-void SwCrsrShell::GotoOutline( USHORT nIdx )
+void SwCrsrShell::GotoOutline( sal_uInt16 nIdx )
{
SwCursor* pCrsr = getShellCrsr( true );
@@ -806,7 +806,7 @@ void SwCrsrShell::GotoOutline( USHORT nIdx )
}
-BOOL SwCrsrShell::GotoOutline( const String& rName )
+sal_Bool SwCrsrShell::GotoOutline( const String& rName )
{
SwCursor* pCrsr = getShellCrsr( true );
@@ -814,29 +814,29 @@ BOOL SwCrsrShell::GotoOutline( const String& rName )
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SwCrsrSaveState aSaveState( *pCrsr );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pDoc->GotoOutline( *pCrsr->GetPoint(), rName ) && !pCrsr->IsSelOvr() )
{
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-BOOL SwCrsrShell::GotoNextOutline() // naechster Node mit Outline-Num.
+sal_Bool SwCrsrShell::GotoNextOutline() // naechster Node mit Outline-Num.
{
SwCursor* pCrsr = getShellCrsr( true );
const SwNodes& rNds = GetDoc()->GetNodes();
SwNode* pNd = pCrsr->GetNode();
- USHORT nPos;
+ sal_uInt16 nPos;
if( rNds.GetOutLineNds().Seek_Entry( pNd, &nPos ))
++nPos;
if( nPos == rNds.GetOutLineNds().Count() )
- return FALSE;
+ return sal_False;
pNd = rNds.GetOutLineNds()[ nPos ];
@@ -846,30 +846,30 @@ BOOL SwCrsrShell::GotoNextOutline() // naechster Node mit Outline-Num.
pCrsr->GetPoint()->nNode = *pNd;
pCrsr->GetPoint()->nContent.Assign( (SwTxtNode*)pNd, 0 );
- BOOL bRet = !pCrsr->IsSelOvr();
+ sal_Bool bRet = !pCrsr->IsSelOvr();
if( bRet )
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
return bRet;
}
-BOOL SwCrsrShell::GotoPrevOutline() // vorheriger Node mit Outline-Num.
+sal_Bool SwCrsrShell::GotoPrevOutline() // vorheriger Node mit Outline-Num.
{
SwCursor* pCrsr = getShellCrsr( true );
const SwNodes& rNds = GetDoc()->GetNodes();
SwNode* pNd = pCrsr->GetNode();
- USHORT nPos;
+ sal_uInt16 nPos;
rNds.GetOutLineNds().Seek_Entry( pNd, &nPos );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nPos )
{
--nPos; // davor
pNd = rNds.GetOutLineNds()[ nPos ];
if( pNd->GetIndex() > pCrsr->GetPoint()->nNode.GetIndex() )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
@@ -887,13 +887,13 @@ BOOL SwCrsrShell::GotoPrevOutline() // vorheriger Node mit Outline-Num.
// suche die "Outline-Position" vom vorherigen Outline-Node mit dem
// Level.
-USHORT SwCrsrShell::GetOutlinePos( BYTE nLevel )
+sal_uInt16 SwCrsrShell::GetOutlinePos( sal_uInt8 nLevel )
{
SwPaM* pCrsr = getShellCrsr( true );
const SwNodes& rNds = GetDoc()->GetNodes();
SwNode* pNd = pCrsr->GetNode();
- USHORT nPos;
+ sal_uInt16 nPos;
if( rNds.GetOutLineNds().Seek_Entry( pNd, &nPos ))
nPos++; // steht auf der Position, fuers while zum Naechsten
@@ -910,13 +910,13 @@ USHORT SwCrsrShell::GetOutlinePos( BYTE nLevel )
}
-BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
- BOOL bWithChilds )
+sal_Bool SwCrsrShell::MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos,
+ sal_Bool bWithChilds )
{
const SwNodes& rNds = GetDoc()->GetNodes();
const SwOutlineNodes& rOutlNds = rNds.GetOutLineNds();
if( !rOutlNds.Count() ) // wie jetzt ???
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
@@ -924,7 +924,7 @@ BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
if( nSttPos > nEndPos ) // sollte jemand das vertauscht haben?
{
ASSERT( !this, "Start- > Ende-Position im Array" );
- USHORT nTmp = nSttPos;
+ sal_uInt16 nTmp = nSttPos;
nSttPos = nEndPos;
nEndPos = nTmp;
}
@@ -934,12 +934,12 @@ BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
if( bWithChilds )
{
- //BYTE nLevel = pEndNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
+ //sal_uInt8 nLevel = pEndNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
const int nLevel = pEndNd->GetTxtNode()->GetAttrOutlineLevel()-1;//<-end.zhaojianwei
for( ++nEndPos; nEndPos < rOutlNds.Count(); ++nEndPos )
{
pEndNd = rOutlNds[ nEndPos ];
- //BYTE nNxtLevel = pEndNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
+ //sal_uInt8 nNxtLevel = pEndNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
const int nNxtLevel = pEndNd->GetTxtNode()->GetAttrOutlineLevel()-1;//<-end,zhaojianwei
if( nNxtLevel <= nLevel )
break; // EndPos steht jetzt auf dem naechsten
@@ -964,7 +964,7 @@ BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
pCurCrsr->Move( fnMoveBackward, fnGoNode ); // ans Ende vom Vorgaenger
// und schon ist alles selektiert
- BOOL bRet = !pCurCrsr->IsSelOvr();
+ sal_Bool bRet = !pCurCrsr->IsSelOvr();
if( bRet )
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
return bRet;
@@ -972,14 +972,14 @@ BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
// springe zu dieser Refmark
-BOOL SwCrsrShell::GotoRefMark( const String& rRefMark, USHORT nSubType,
- USHORT nSeqNo )
+sal_Bool SwCrsrShell::GotoRefMark( const String& rRefMark, sal_uInt16 nSubType,
+ sal_uInt16 nSeqNo )
{
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SwCrsrSaveState aSaveState( *pCurCrsr );
- USHORT nPos;
+ sal_uInt16 nPos;
SwTxtNode* pTxtNd = SwGetRefFieldType::FindAnchor( GetDoc(), rRefMark,
nSubType, nSeqNo, &nPos );
if( pTxtNd && pTxtNd->GetNodes().IsDocNodes() )
@@ -990,26 +990,26 @@ BOOL SwCrsrShell::GotoRefMark( const String& rRefMark, USHORT nSubType,
if( !pCurCrsr->IsSelOvr() )
{
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SwCrsrShell::IsPageAtPos( const Point &rPt ) const
+sal_Bool SwCrsrShell::IsPageAtPos( const Point &rPt ) const
{
if( GetLayout() )
return 0 != GetLayout()->GetPageAtPos( rPt );
- return FALSE;
+ return sal_False;
}
-BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
+sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
SwContentAtPos& rCntntAtPos,
- BOOL bSetCrsr,
+ sal_Bool bSetCrsr,
SwRect* pFldRect )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsTableMode() )
{
@@ -1020,16 +1020,16 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
SwCntntFrm *pFrm(0);
SwTxtAttr* pTxtAttr;
SwCrsrMoveState aTmpState;
- aTmpState.bFieldInfo = TRUE;
+ aTmpState.bFieldInfo = sal_True;
aTmpState.bExactOnly = !( SwContentAtPos::SW_OUTLINE & rCntntAtPos.eCntntAtPos );
- aTmpState.bCntntCheck = (SwContentAtPos::SW_CONTENT_CHECK & rCntntAtPos.eCntntAtPos) ? TRUE : FALSE;
+ aTmpState.bCntntCheck = (SwContentAtPos::SW_CONTENT_CHECK & rCntntAtPos.eCntntAtPos) ? sal_True : sal_False;
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
SwSpecialPos aSpecialPos;
aTmpState.pSpecialPos = ( SwContentAtPos::SW_SMARTTAG & rCntntAtPos.eCntntAtPos ) ?
&aSpecialPos : 0;
- const BOOL bCrsrFoundExact = GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState );
+ const sal_Bool bCrsrFoundExact = GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState );
pTxtNd = aPos.nNode.GetNode().GetTxtNode();
const SwNodes& rNds = GetDoc()->GetNodes();
@@ -1041,14 +1041,14 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
{
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_OUTLINE;
rCntntAtPos.sStr = pONd->GetExpandTxt( 0, STRING_LEN, true );
- bRet = TRUE;
+ bRet = sal_True;
}
}
// --> FME 2005-05-13 #i43742# New function: SW_CONTENT_CHECK
else if ( SwContentAtPos::SW_CONTENT_CHECK & rCntntAtPos.eCntntAtPos &&
bCrsrFoundExact )
{
- bRet = TRUE;
+ bRet = sal_True;
}
// <--
// #i23726#
@@ -1076,17 +1076,17 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
if ( pSmartTagList && pSmartTagList->InWrongWord( nCurrent, nLen ) && !pTxtNd->IsSymbol(nBegin) )
{
- const USHORT nIndex = pSmartTagList->GetWrongPos( nBegin );
+ const sal_uInt16 nIndex = pSmartTagList->GetWrongPos( nBegin );
const SwWrongList* pSubList = pSmartTagList->SubList( nIndex );
if ( pSubList )
{
nCurrent = aTmpState.pSpecialPos->nCharOfst;
if ( pSubList->InWrongWord( nCurrent, nLen ) )
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE;
+ bRet = sal_True;
if( bRet && bSetCrsr )
{
@@ -1096,7 +1096,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
*pCurCrsr->GetPoint() = aPos;
if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE) )
- bRet = FALSE;
+ bRet = sal_False;
else
UpdateCrsr();
}
@@ -1105,7 +1105,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
// rCntntAtPos.sStr = pTxtNd->GetExpandTxt(
// *pTxtAttr->GetStart(),
// *pTxtAttr->GetEnd() - *pTxtAttr->GetStart(),
-// FALSE );
+// sal_False );
// rCntntAtPos.aFnd.pAttr = &pTxtAttr->GetAttr();
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_SMARTTAG;
@@ -1167,7 +1167,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
rCntntAtPos.aFnd.pFld = pFld;
rCntntAtPos.pFndTxtAttr = pTxtAttr;
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FIELD;
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -1178,7 +1178,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
if( bCrsrFoundExact && pTxtNd && pFldBookmark) {
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FORMCTRL;
rCntntAtPos.aFnd.pFldmark = pFldBookmark;
- bRet=TRUE;
+ bRet=sal_True;
}
}
@@ -1187,12 +1187,12 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
if( aTmpState.bFtnNoInfo )
{
// stehe ueber dem Zeichen der Fussnote (??)
- bRet = TRUE;
+ bRet = sal_True;
if( bSetCrsr )
{
*pCurCrsr->GetPoint() = aPos;
if( !GotoFtnAnchor() )
- bRet = FALSE;
+ bRet = sal_False;
}
if( bRet )
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FTN;
@@ -1200,7 +1200,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
else if ( 0 != ( pTxtAttr = pTxtNd->GetTxtAttrForCharAt(
aPos.nContent.GetIndex(), RES_TXTATR_FTN )) )
{
- bRet = TRUE;
+ bRet = sal_True;
if( bSetCrsr )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
@@ -1208,19 +1208,19 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
pCurCrsr->GetPoint()->nNode = *((SwTxtFtn*)pTxtAttr)->GetStartNode();
SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection(
&pCurCrsr->GetPoint()->nNode,
- TRUE, !IsReadOnlyAvailable() );
+ sal_True, !IsReadOnlyAvailable() );
if( pCNd )
{
pCurCrsr->GetPoint()->nContent.Assign( pCNd, 0 );
if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE ))
- bRet = FALSE;
+ bRet = sal_False;
else
UpdateCrsr();
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
if( bRet )
@@ -1265,7 +1265,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
if( pTxtAttr )
{
- bRet = TRUE;
+ bRet = sal_True;
if( bSetCrsr )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
@@ -1274,7 +1274,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
*pCurCrsr->GetPoint() = aPos;
if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE ) )
- bRet = FALSE;
+ bRet = sal_False;
else
UpdateCrsr();
}
@@ -1311,7 +1311,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
// nur INetAttrs mit URLs "erkennen"
if( pTxtAttr && pTxtAttr->GetINetFmt().GetValue().Len() )
{
- bRet = TRUE;
+ bRet = sal_True;
if( bSetCrsr )
{
SwCrsrSaveState aSaveState( *pCurCrsr );
@@ -1320,7 +1320,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
*pCurCrsr->GetPoint() = aPos;
if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE) )
- bRet = FALSE;
+ bRet = sal_False;
else
UpdateCrsr();
}
@@ -1348,7 +1348,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
rCntntAtPos.aFnd.pRedl = pRedl;
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_REDLINE;
rCntntAtPos.pFndTxtAttr = 0;
- bRet = TRUE;
+ bRet = sal_True;
if( pFldRect && 0 != ( pFrm = pTxtNd->GetFrm( &aPt ) ) )
pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
@@ -1372,12 +1372,12 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
pSttNd->GetIndex() )) &&
#ifdef DBG_UTIL
( SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
- RES_BOXATR_FORMULA, FALSE, &pItem ) ||
+ RES_BOXATR_FORMULA, sal_False, &pItem ) ||
SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
- RES_BOXATR_VALUE, FALSE, &pItem ))
+ RES_BOXATR_VALUE, sal_False, &pItem ))
#else
SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
- RES_BOXATR_FORMULA, FALSE, &pItem )
+ RES_BOXATR_FORMULA, sal_False, &pItem )
#endif
)
{
@@ -1411,7 +1411,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
#endif
((SwTblBoxFormula*)pItem)->PtrToBoxNm( &pTblNd->GetTable() );
- bRet = TRUE;
+ bRet = sal_True;
if( bSetCrsr )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
@@ -1419,7 +1419,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
*pCurCrsr->GetPoint() = aPos;
if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE) )
- bRet = FALSE;
+ bRet = sal_False;
else
UpdateCrsr();
}
@@ -1446,7 +1446,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
POOLATTR_END - 1 );
if( pTxtNd->GetpSwpHints() )
{
- for( USHORT i = 0; i < pTxtNd->GetSwpHints().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pTxtNd->GetSwpHints().Count(); ++i )
{
const SwTxtAttr* pHt = pTxtNd->GetSwpHints()[i];
xub_StrLen nAttrStart = *pHt->GetStart();
@@ -1495,7 +1495,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
String sAttrs;
SfxItemIter aIter( aSet );
const SfxPoolItem* pItem = aIter.FirstItem();
- while( TRUE )
+ while( sal_True )
{
if( !IsInvalidItem( pItem ))
{
@@ -1521,7 +1521,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
+= sAttrs;
}
}
- bRet = TRUE;
+ bRet = sal_True;
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_CURR_ATTRS;
}
#endif
@@ -1562,7 +1562,7 @@ const SwPostItField* SwCrsrShell::GetPostItFieldAtCursor() const
// <--
// befindet sich der Node in einem geschuetzten Bereich?
-BOOL SwContentAtPos::IsInProtectSect() const
+sal_Bool SwContentAtPos::IsInProtectSect() const
{
const SwTxtNode* pNd = 0;
if( pFndTxtAttr )
@@ -1589,7 +1589,7 @@ BOOL SwContentAtPos::IsInProtectSect() const
const SwCntntFrm* pFrm;
return pNd && ( pNd->IsInProtectSect() ||
- ( 0 != ( pFrm = pNd->GetFrm(0,0,FALSE)) &&
+ ( 0 != ( pFrm = pNd->GetFrm(0,0,sal_False)) &&
pFrm->IsProtected() ));
}
bool SwContentAtPos::IsInRTLText()const
@@ -1630,11 +1630,11 @@ bool SwContentAtPos::IsInRTLText()const
return bRet;
}
-BOOL SwCrsrShell::SelectTxtAttr( USHORT nWhich, BOOL bExpand,
+sal_Bool SwCrsrShell::SelectTxtAttr( sal_uInt16 nWhich, sal_Bool bExpand,
const SwTxtAttr* pTxtAttr )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsTableMode() )
{
@@ -1663,7 +1663,7 @@ BOOL SwCrsrShell::SelectTxtAttr( USHORT nWhich, BOOL bExpand,
if( !pCurCrsr->IsSelOvr() )
{
UpdateCrsr();
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -1671,9 +1671,9 @@ BOOL SwCrsrShell::SelectTxtAttr( USHORT nWhich, BOOL bExpand,
}
-BOOL SwCrsrShell::GotoINetAttr( const SwTxtINetFmt& rAttr )
+sal_Bool SwCrsrShell::GotoINetAttr( const SwTxtINetFmt& rAttr )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rAttr.GetpTxtNode() )
{
SwCursor* pCrsr = getShellCrsr( true );
@@ -1698,12 +1698,12 @@ const SwFmtINetFmt* SwCrsrShell::FindINetAttr( const String& rName ) const
return pDoc->FindINetAttr( rName );
}
-BOOL SwCrsrShell::GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
+sal_Bool SwCrsrShell::GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
SwRect& rRect, sal_Int16& rOrient )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsTableMode() && !HasSelection() && GetDoc()->DoesUndo() )
{
@@ -1719,16 +1719,16 @@ BOOL SwCrsrShell::GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
// Start-Position im geschuetzten Bereich?
rRect = aFPos.aCrsr;
rOrient = aFPos.eOrient;
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
+sal_Bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsTableMode() && !HasSelection() && GetDoc()->DoesUndo() )
{
@@ -1775,7 +1775,7 @@ BOOL SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
aPos.nNode = *pSectNd->EndOfSectionNode();
}
- for( USHORT n = 0; n < aFPos.nParaCnt + aFPos.nColumnCnt; ++n )
+ for( sal_uInt16 n = 0; n < aFPos.nParaCnt + aFPos.nColumnCnt; ++n )
{
GetDoc()->AppendTxtNode( aPos );
if( !n && pNextFmt )
@@ -1863,7 +1863,7 @@ BOOL SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
GetDoc()->EndUndo( nUndoId, NULL );
EndAction();
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -1905,7 +1905,7 @@ const SwRedline* SwCrsrShell::SelPrevRedline()
return pFnd;
}
-const SwRedline* SwCrsrShell::_GotoRedline( USHORT nArrPos, BOOL bSelect )
+const SwRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect )
{
const SwRedline* pFnd = 0;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
@@ -1920,7 +1920,7 @@ const SwRedline* SwCrsrShell::_GotoRedline( USHORT nArrPos, BOOL bSelect )
SwNodeIndex* pIdx = &pCurCrsr->GetPoint()->nNode;
if( !pIdx->GetNode().IsCntntNode() &&
0 != ( pCNd = GetDoc()->GetNodes().GoNextSection( pIdx,
- TRUE, IsReadOnlyAvailable() )) )
+ sal_True, IsReadOnlyAvailable() )) )
{
if( *pIdx <= pFnd->End()->nNode )
pCurCrsr->GetPoint()->nContent.Assign( pCNd, 0 );
@@ -1943,7 +1943,7 @@ const SwRedline* SwCrsrShell::_GotoRedline( USHORT nArrPos, BOOL bSelect )
pIdx = &pCurCrsr->GetPoint()->nNode;
if( !pIdx->GetNode().IsCntntNode() &&
0 != ( pCNd = GetDoc()->GetNodes().GoPrevSection( pIdx,
- TRUE, IsReadOnlyAvailable() )) )
+ sal_True, IsReadOnlyAvailable() )) )
{
if( *pIdx >= pCurCrsr->GetMark()->nNode )
pCurCrsr->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
@@ -1973,7 +1973,7 @@ const SwRedline* SwCrsrShell::_GotoRedline( USHORT nArrPos, BOOL bSelect )
return pFnd;
}
-const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
+const SwRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect )
{
const SwRedline* pFnd = 0;
if( !IsTableMode() )
@@ -1982,15 +1982,15 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
const SwRedlineTbl& rTbl = GetDoc()->GetRedlineTbl();
const SwRedline* pTmp = rTbl[ nArrPos ];
- USHORT nSeqNo = pTmp->GetSeqNo();
+ sal_uInt16 nSeqNo = pTmp->GetSeqNo();
if( nSeqNo && bSelect )
{
- BOOL bCheck = FALSE;
+ sal_Bool bCheck = sal_False;
int nLoopCnt = 2;
- USHORT nArrSavPos = nArrPos;
+ sal_uInt16 nArrSavPos = nArrPos;
do {
- pTmp = _GotoRedline( nArrPos, TRUE );
+ pTmp = _GotoRedline( nArrPos, sal_True );
if( !pFnd )
pFnd = pTmp;
@@ -2009,7 +2009,7 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
const SwPosition *pNStt = pNextPam->Start(),
*pNEnd = pNextPam->End();
- BOOL bDel = TRUE;
+ sal_Bool bDel = sal_True;
switch( ::ComparePosition( *pCStt, *pCEnd,
*pNStt, *pNEnd ))
{
@@ -2044,7 +2044,7 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
break;
default:
- bDel = FALSE;
+ bDel = sal_False;
}
if( bDel )
@@ -2058,7 +2058,7 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
}
}
- USHORT nFndPos = 2 == nLoopCnt
+ sal_uInt16 nFndPos = 2 == nLoopCnt
? rTbl.FindNextOfSeqNo( nArrPos )
: rTbl.FindPrevOfSeqNo( nArrPos );
if( USHRT_MAX != nFndPos ||
@@ -2069,7 +2069,7 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
{
// neuen Cursor erzeugen
CreateCrsr();
- bCheck = TRUE;
+ bCheck = sal_True;
}
nArrPos = nFndPos;
}
@@ -2085,12 +2085,12 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
}
-BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext )
+sal_Bool SwCrsrShell::SelectNxtPrvHyperlink( sal_Bool bNext )
{
SwNodes& rNds = GetDoc()->GetNodes();
const SwNode* pBodyEndNd = &rNds.GetEndOfContent();
const SwNode* pBodySttNd = pBodyEndNd->StartOfSectionNode();
- ULONG nBodySttNdIdx = pBodySttNd->GetIndex();
+ sal_uLong nBodySttNdIdx = pBodySttNd->GetIndex();
Point aPt;
_SetGetExpFld aCmpPos( SwPosition( bNext ? *pBodyEndNd : *pBodySttNd ) );
@@ -2107,7 +2107,7 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext )
{
const SwTxtNode* pTxtNd;
const SwCharFmts* pFmts = GetDoc()->GetCharFmts();
- for( USHORT n = pFmts->Count(); 1 < n; )
+ for( sal_uInt16 n = pFmts->Count(); 1 < n; )
{
SwClientIter aIter( *(*pFmts)[ --n ] );
@@ -2143,13 +2143,13 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext )
// then check all the Flys with a URL or imapge map
{
const SwSpzFrmFmts* pFmts = GetDoc()->GetSpzFrmFmts();
- for( USHORT n = 0, nEnd = pFmts->Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = pFmts->Count(); n < nEnd; ++n )
{
SwFlyFrmFmt* pFmt = (SwFlyFrmFmt*)(*pFmts)[ n ];
const SwFmtURL& rURLItem = pFmt->GetURL();
if( rURLItem.GetMap() || rURLItem.GetURL().Len() )
{
- SwFlyFrm* pFly = pFmt->GetFrm( &aPt, FALSE );
+ SwFlyFrm* pFly = pFmt->GetFrm( &aPt, sal_False );
SwPosition aTmpPos( *pBodySttNd );
if( pFly &&
GetBodyTxtNode( *GetDoc(), aTmpPos, *pFly->GetLower() ) )
@@ -2166,7 +2166,7 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext )
}
// found any URL ?
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtINetFmt* pFndAttr = aCmpPos.GetINetFmt();
const SwFlyFrmFmt* pFndFmt = aCmpPos.GetFlyFmt();
if( pFndAttr || pFndFmt )
@@ -2188,7 +2188,7 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext )
{
UpdateCrsr( SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|
SwCrsrShell::READONLY );
- bRet = TRUE;
+ bRet = sal_True;
}
}
// find a draw object ?
@@ -2197,16 +2197,16 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext )
const SdrObject* pSObj = pFndFmt->FindSdrObject();
((SwFEShell*)this)->SelectObj( pSObj->GetCurrentBoundRect().Center() );
MakeSelVisible();
- bRet = TRUE;
+ bRet = sal_True;
}
else // then is it a fly
{
- SwFlyFrm* pFly = pFndFmt->GetFrm(&aPt, FALSE );
+ SwFlyFrm* pFly = pFndFmt->GetFrm(&aPt, sal_False );
if( pFly )
{
- ((SwFEShell*)this)->SelectFlyFrm( *pFly, TRUE );
+ ((SwFEShell*)this)->SelectFlyFrm( *pFly, sal_True );
MakeSelVisible();
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
diff --git a/sw/source/core/crsr/crstrvl1.cxx b/sw/source/core/crsr/crstrvl1.cxx
index 53790c2ac28f..55c407d1f209 100644
--- a/sw/source/core/crsr/crstrvl1.cxx
+++ b/sw/source/core/crsr/crstrvl1.cxx
@@ -33,72 +33,72 @@
#include <viscrs.hxx>
#include <callnk.hxx>
-BOOL SwCrsrShell::IsStartWord( sal_Int16 nWordType ) const
+sal_Bool SwCrsrShell::IsStartWord( sal_Int16 nWordType ) const
{
return pCurCrsr->IsStartWord( nWordType );
}
-BOOL SwCrsrShell::IsEndWord( sal_Int16 nWordType ) const
+sal_Bool SwCrsrShell::IsEndWord( sal_Int16 nWordType ) const
{
return pCurCrsr->IsEndWord( nWordType );
}
-BOOL SwCrsrShell::IsInWord( sal_Int16 nWordType ) const
+sal_Bool SwCrsrShell::IsInWord( sal_Int16 nWordType ) const
{
return pCurCrsr->IsInWord( nWordType );
}
-BOOL SwCrsrShell::IsStartSentence() const
+sal_Bool SwCrsrShell::IsStartSentence() const
{
return pCurCrsr->IsStartEndSentence( false );
}
-BOOL SwCrsrShell::IsEndSentence() const
+sal_Bool SwCrsrShell::IsEndSentence() const
{
return pCurCrsr->IsStartEndSentence( true );
}
-BOOL SwCrsrShell::GoStartWord()
+sal_Bool SwCrsrShell::GoStartWord()
{
return CallCrsrFN( &SwCursor::GoStartWord );
}
-BOOL SwCrsrShell::GoEndWord()
+sal_Bool SwCrsrShell::GoEndWord()
{
return CallCrsrFN( &SwCursor::GoEndWord );
}
-BOOL SwCrsrShell::GoNextWord()
+sal_Bool SwCrsrShell::GoNextWord()
{
return CallCrsrFN( &SwCursor::GoNextWord );
}
-BOOL SwCrsrShell::GoPrevWord()
+sal_Bool SwCrsrShell::GoPrevWord()
{
return CallCrsrFN( &SwCursor::GoPrevWord );
}
-BOOL SwCrsrShell::GoNextSentence()
+sal_Bool SwCrsrShell::GoNextSentence()
{
return CallCrsrFN( &SwCursor::GoNextSentence );
}
-BOOL SwCrsrShell::GoEndSentence()
+sal_Bool SwCrsrShell::GoEndSentence()
{
return CallCrsrFN( &SwCursor::GoEndSentence );
}
-BOOL SwCrsrShell::GoPrevSentence()
+sal_Bool SwCrsrShell::GoPrevSentence()
{
return CallCrsrFN( &SwCursor::GoPrevSentence );
}
-BOOL SwCrsrShell::GoStartSentence()
+sal_Bool SwCrsrShell::GoStartSentence()
{
return CallCrsrFN( &SwCursor::GoStartSentence );
}
-BOOL SwCrsrShell::SelectWord( const Point* pPt )
+sal_Bool SwCrsrShell::SelectWord( const Point* pPt )
{
return pCurCrsr->SelectWord( pPt );
}
-BOOL SwCrsrShell::ExpandToSentenceBorders()
+sal_Bool SwCrsrShell::ExpandToSentenceBorders()
{
return pCurCrsr->ExpandToSentenceBorders();
}
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index be581b17735d..5f07d6b1a190 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -82,7 +82,7 @@ int CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 )
}
-const SwTxtAttr* GetFrwrdTxtHint( const SwpHints& rHtsArr, USHORT& rPos,
+const SwTxtAttr* GetFrwrdTxtHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
xub_StrLen nCntntPos )
{
while( rPos < rHtsArr.Count() )
@@ -96,7 +96,7 @@ const SwTxtAttr* GetFrwrdTxtHint( const SwpHints& rHtsArr, USHORT& rPos,
}
-const SwTxtAttr* GetBkwrdTxtHint( const SwpHints& rHtsArr, USHORT& rPos,
+const SwTxtAttr* GetBkwrdTxtHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
xub_StrLen nCntntPos )
{
while( rPos > 0 )
@@ -112,14 +112,14 @@ const SwTxtAttr* GetBkwrdTxtHint( const SwpHints& rHtsArr, USHORT& rPos,
void lcl_SetAttrPam( SwPaM & rPam, xub_StrLen nStart, const xub_StrLen* pEnde,
- const BOOL bSaveMark )
+ const sal_Bool bSaveMark )
{
xub_StrLen nCntntPos;
if( bSaveMark )
nCntntPos = rPam.GetMark()->nContent.GetIndex();
else
nCntntPos = rPam.GetPoint()->nContent.GetIndex();
- BOOL bTstEnde = rPam.GetPoint()->nNode == rPam.GetMark()->nNode;
+ sal_Bool bTstEnde = rPam.GetPoint()->nNode == rPam.GetMark()->nNode;
SwCntntNode* pCNd = rPam.GetCntntNode();
rPam.GetPoint()->nContent.Assign( pCNd, nStart );
@@ -142,15 +142,15 @@ void lcl_SetAttrPam( SwPaM & rPam, xub_StrLen nStart, const xub_StrLen* pEnde,
// umspannt, unter Beachtung des Suchbereiches
-BOOL lcl_Search( const SwTxtNode& rTxtNd, SwPaM& rPam,
+sal_Bool lcl_Search( const SwTxtNode& rTxtNd, SwPaM& rPam,
const SfxPoolItem& rCmpItem,
- SwMoveFn fnMove, BOOL bValue )
+ SwMoveFn fnMove, sal_Bool bValue )
{
if ( !rTxtNd.HasHints() )
- return FALSE;
+ return sal_False;
const SwTxtAttr *pTxtHt = 0;
- BOOL bForward = fnMove == fnMoveForward;
- USHORT nPos = bForward ? 0 : rTxtNd.GetSwpHints().Count();
+ sal_Bool bForward = fnMove == fnMoveForward;
+ sal_uInt16 nPos = bForward ? 0 : rTxtNd.GetSwpHints().Count();
xub_StrLen nCntntPos = rPam.GetPoint()->nContent.GetIndex();
while( 0 != ( pTxtHt=(*fnMove->fnGetHint)(rTxtNd.GetSwpHints(),nPos,nCntntPos)))
@@ -158,9 +158,9 @@ BOOL lcl_Search( const SwTxtNode& rTxtNd, SwPaM& rPam,
( !bValue || CmpAttr( pTxtHt->GetAttr(), rCmpItem )))
{
lcl_SetAttrPam( rPam, *pTxtHt->GetStart(), pTxtHt->GetEnd(), bForward );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -168,7 +168,7 @@ BOOL lcl_Search( const SwTxtNode& rTxtNd, SwPaM& rPam,
struct _SwSrchChrAttr
{
- USHORT nWhich;
+ sal_uInt16 nWhich;
xub_StrLen nStt, nEnd;
_SwSrchChrAttr( const SfxPoolItem& rItem,
@@ -181,11 +181,11 @@ class SwAttrCheckArr
{
_SwSrchChrAttr *pFndArr, *pStackArr;
xub_StrLen nNdStt, nNdEnd;
- USHORT nArrStart, nArrLen;
- USHORT nFound, nStackCnt;
+ sal_uInt16 nArrStart, nArrLen;
+ sal_uInt16 nFound, nStackCnt;
SfxItemSet aCmpSet;
- BOOL bNoColls;
- BOOL bForward;
+ sal_Bool bNoColls;
+ sal_Bool bForward;
public:
SwAttrCheckArr( const SfxItemSet& rSet, int bForward, int bNoCollections );
@@ -194,7 +194,7 @@ public:
void SetNewSet( const SwTxtNode& rTxtNd, const SwPaM& rPam );
// wieviele Attribute ueberhaupt ??
- USHORT Count() const { return aCmpSet.Count(); }
+ sal_uInt16 Count() const { return aCmpSet.Count(); }
int Found() const { return nFound == aCmpSet.Count(); }
int CheckStack();
@@ -214,7 +214,7 @@ SwAttrCheckArr::SwAttrCheckArr( const SfxItemSet& rSet, int bFwd,
int bNoCollections )
: aCmpSet( *rSet.GetPool(), RES_CHRATR_BEGIN, RES_TXTATR_END-1 )
{
- aCmpSet.Put( rSet, FALSE );
+ aCmpSet.Put( rSet, sal_False );
bNoColls = 0 != bNoCollections;
bForward = 0 != bFwd;
@@ -269,9 +269,9 @@ void SwAttrCheckArr::SetNewSet( const SwTxtNode& rTxtNd, const SwPaM& rPam )
SfxItemIter aIter( aCmpSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
const SfxPoolItem* pFndItem;
- USHORT nWhich;
+ sal_uInt16 nWhich;
- while( TRUE )
+ while( sal_True )
{
// nur testen, ob vorhanden ist ?
if( IsInvalidItem( pItem ) )
@@ -322,7 +322,7 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
// --------------------------------------------------------------
// Hier wird jetzt ausdruecklich auch in Zeichenvorlagen gesucht
// --------------------------------------------------------------
- USHORT nWhch = rAttr.Which();
+ sal_uInt16 nWhch = rAttr.Which();
SfxWhichIter* pIter = NULL;
const SfxPoolItem* pTmpItem = NULL;
const SfxItemSet* pSet = NULL;
@@ -337,7 +337,7 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
pIter = new SfxWhichIter( *pSet );
nWhch = pIter->FirstWhich();
while( nWhch &&
- SFX_ITEM_SET != pSet->GetItemState( nWhch, TRUE, &pTmpItem ) )
+ SFX_ITEM_SET != pSet->GetItemState( nWhch, sal_True, &pTmpItem ) )
nWhch = pIter->NextWhich();
if( !nWhch )
pTmpItem = NULL;
@@ -347,10 +347,10 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
pTmpItem = &rAttr.GetAttr();
while( pTmpItem )
{
- SfxItemState eState = aCmpSet.GetItemState( nWhch, FALSE, &pItem );
+ SfxItemState eState = aCmpSet.GetItemState( nWhch, sal_False, &pItem );
if( SFX_ITEM_DONTCARE == eState || SFX_ITEM_SET == eState )
{
- USHORT n;
+ sal_uInt16 n;
_SwSrchChrAttr* pCmp;
// loesche erstmal alle, die bis zu der Start Position schon wieder
@@ -400,7 +400,7 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
}
}
- BOOL bContinue = FALSE;
+ sal_Bool bContinue = sal_False;
if( SFX_ITEM_DONTCARE == eState )
{
@@ -417,7 +417,7 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
else if( pCmp->nEnd < aTmp.nEnd ) // erweitern ?
pCmp->nEnd = aTmp.nEnd;
- bContinue = TRUE;
+ bContinue = sal_True;
}
}
// wird Attribut gueltig ?
@@ -425,7 +425,7 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
{
pFndArr[ nWhch - nArrStart ] = aTmp;
++nFound;
- bContinue = TRUE;
+ bContinue = sal_True;
}
// tja, dann muss es auf den Stack
@@ -457,7 +457,7 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
{
nWhch = pIter->NextWhich();
while( nWhch &&
- SFX_ITEM_SET != pSet->GetItemState( nWhch, TRUE, &pTmpItem ) )
+ SFX_ITEM_SET != pSet->GetItemState( nWhch, sal_True, &pTmpItem ) )
nWhch = pIter->NextWhich();
if( !nWhch )
break;
@@ -480,7 +480,7 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
// --------------------------------------------------------------
// Hier wird jetzt ausdruecklich auch in Zeichenvorlagen gesucht
// --------------------------------------------------------------
- USHORT nWhch = rAttr.Which();
+ sal_uInt16 nWhch = rAttr.Which();
SfxWhichIter* pIter = NULL;
const SfxPoolItem* pTmpItem = NULL;
const SfxItemSet* pSet = NULL;
@@ -495,7 +495,7 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
pIter = new SfxWhichIter( *pSet );
nWhch = pIter->FirstWhich();
while( nWhch &&
- SFX_ITEM_SET != pSet->GetItemState( nWhch, TRUE, &pTmpItem ) )
+ SFX_ITEM_SET != pSet->GetItemState( nWhch, sal_True, &pTmpItem ) )
nWhch = pIter->NextWhich();
if( !nWhch )
pTmpItem = NULL;
@@ -505,10 +505,10 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
pTmpItem = &rAttr.GetAttr();
while( pTmpItem )
{
- SfxItemState eState = aCmpSet.GetItemState( nWhch, FALSE, &pItem );
+ SfxItemState eState = aCmpSet.GetItemState( nWhch, sal_False, &pItem );
if( SFX_ITEM_DONTCARE == eState || SFX_ITEM_SET == eState )
{
- USHORT n;
+ sal_uInt16 n;
_SwSrchChrAttr* pCmp;
// loesche erstmal alle, die bis zu der Start Position schon wieder
@@ -557,7 +557,7 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
}
}
- BOOL bContinue = FALSE;
+ sal_Bool bContinue = sal_False;
if( SFX_ITEM_DONTCARE == eState )
{
// wird Attribut gueltig ?
@@ -573,7 +573,7 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
else if( pCmp->nStt > aTmp.nStt ) // erweitern ?
pCmp->nStt = aTmp.nStt;
- bContinue = TRUE;
+ bContinue = sal_True;
}
}
// wird Attribut gueltig ?
@@ -581,7 +581,7 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
{
pFndArr[ nWhch - nArrStart ] = aTmp;
++nFound;
- bContinue = TRUE;
+ bContinue = sal_True;
}
// tja, dann muss es auf den Stack
@@ -613,7 +613,7 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
{
nWhch = pIter->NextWhich();
while( nWhch &&
- SFX_ITEM_SET != pSet->GetItemState( nWhch, TRUE, &pTmpItem ) )
+ SFX_ITEM_SET != pSet->GetItemState( nWhch, sal_True, &pTmpItem ) )
nWhch = pIter->NextWhich();
if( !nWhch )
break;
@@ -629,7 +629,7 @@ xub_StrLen SwAttrCheckArr::Start() const
{
xub_StrLen nStart = nNdStt;
_SwSrchChrAttr* pArrPtr = pFndArr;
- for( USHORT n = 0; n < nArrLen; ++n, ++pArrPtr )
+ for( sal_uInt16 n = 0; n < nArrLen; ++n, ++pArrPtr )
if( pArrPtr->nWhich && pArrPtr->nStt > nStart )
nStart = pArrPtr->nStt;
@@ -641,7 +641,7 @@ xub_StrLen SwAttrCheckArr::End() const
{
_SwSrchChrAttr* pArrPtr = pFndArr;
xub_StrLen nEnd = nNdEnd;
- for( USHORT n = 0; n < nArrLen; ++n, ++pArrPtr )
+ for( sal_uInt16 n = 0; n < nArrLen; ++n, ++pArrPtr )
if( pArrPtr->nWhich && pArrPtr->nEnd < nEnd )
nEnd = pArrPtr->nEnd;
@@ -652,9 +652,9 @@ xub_StrLen SwAttrCheckArr::End() const
int SwAttrCheckArr::CheckStack()
{
if( !nStackCnt )
- return FALSE;
+ return sal_False;
- USHORT n;
+ sal_uInt16 n;
xub_StrLen nSttPos = Start(), nEndPos = End();
_SwSrchChrAttr* pArrPtr;
for( pArrPtr = pStackArr, n = 0; n < nArrLen; ++n, ++pArrPtr )
@@ -693,16 +693,16 @@ int lcl_SearchForward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
if( !rTxtNd.HasHints() )
{
if( !rCmpArr.Found() )
- return FALSE;
+ return sal_False;
nEndPos = rCmpArr.GetNdEnd();
- lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, TRUE );
- return TRUE;
+ lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, sal_True );
+ return sal_True;
}
// dann gehe mal durch das nach "Start" sortierte Array
const SwpHints& rHtArr = rTxtNd.GetSwpHints();
const SwTxtAttr* pAttr;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
// sollte jetzt schon alles vorhanden sein, dann teste, mit welchem
// das wieder beendet wird.
@@ -715,8 +715,8 @@ int lcl_SearchForward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
{
// dann haben wir unser Ende:
lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(),
- pAttr->GetStart(), TRUE );
- return TRUE;
+ pAttr->GetStart(), sal_True );
+ return sal_True;
}
// ansonsten muessen wir weiter suchen
break;
@@ -726,8 +726,8 @@ int lcl_SearchForward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
{
// dann haben wir unseren Bereich
nEndPos = rCmpArr.GetNdEnd();
- lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, TRUE );
- return TRUE;
+ lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, sal_True );
+ return sal_True;
}
}
@@ -746,16 +746,16 @@ int lcl_SearchForward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
// dann haben wir den Bereich zusammen
if( (nSttPos = rCmpArr.Start()) > (nEndPos = rCmpArr.End()) )
- return FALSE;
- lcl_SetAttrPam( rPam, nSttPos, &nEndPos, TRUE );
- return TRUE;
+ return sal_False;
+ lcl_SetAttrPam( rPam, nSttPos, &nEndPos, sal_True );
+ return sal_True;
}
if( !rCmpArr.CheckStack() ||
(nSttPos = rCmpArr.Start()) > (nEndPos = rCmpArr.End()) )
- return FALSE;
- lcl_SetAttrPam( rPam, nSttPos, &nEndPos, TRUE );
- return TRUE;
+ return sal_False;
+ lcl_SetAttrPam( rPam, nSttPos, &nEndPos, sal_True );
+ return sal_True;
}
@@ -767,16 +767,16 @@ int lcl_SearchBackward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
if( !rTxtNd.HasHints() )
{
if( !rCmpArr.Found() )
- return FALSE;
+ return sal_False;
nEndPos = rCmpArr.GetNdEnd();
- lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, FALSE );
- return TRUE;
+ lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, sal_False );
+ return sal_True;
}
// dann gehe mal durch das nach "Start" sortierte Array
const SwpHints& rHtArr = rTxtNd.GetSwpHints();
const SwTxtAttr* pAttr;
- USHORT nPos = rHtArr.Count();
+ sal_uInt16 nPos = rHtArr.Count();
// sollte jetzt schon alles vorhanden sein, dann teste, mit welchem
// das wieder beendet wird.
@@ -790,8 +790,8 @@ int lcl_SearchBackward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
{
// dann haben wir unser Ende:
nEndPos = rCmpArr.GetNdEnd();
- lcl_SetAttrPam( rPam, nSttPos, &nEndPos, FALSE );
- return TRUE;
+ lcl_SetAttrPam( rPam, nSttPos, &nEndPos, sal_False );
+ return sal_True;
}
// ansonsten muessen wir weiter suchen
@@ -802,8 +802,8 @@ int lcl_SearchBackward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
{
// dann haben wir unseren Bereich
nEndPos = rCmpArr.GetNdEnd();
- lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, FALSE );
- return TRUE;
+ lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, sal_False );
+ return sal_True;
}
}
@@ -826,32 +826,32 @@ int lcl_SearchBackward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
// dann haben wir den Bereich zusammen
if( (nSttPos = rCmpArr.Start()) > (nEndPos = rCmpArr.End()) )
- return FALSE;
- lcl_SetAttrPam( rPam, nSttPos, &nEndPos, FALSE );
- return TRUE;
+ return sal_False;
+ lcl_SetAttrPam( rPam, nSttPos, &nEndPos, sal_False );
+ return sal_True;
}
if( !rCmpArr.CheckStack() ||
(nSttPos = rCmpArr.Start()) > (nEndPos = rCmpArr.End()) )
- return FALSE;
- lcl_SetAttrPam( rPam, nSttPos, &nEndPos, FALSE );
- return TRUE;
+ return sal_False;
+ lcl_SetAttrPam( rPam, nSttPos, &nEndPos, sal_False );
+ return sal_True;
}
-int lcl_Search( const SwCntntNode& rCNd, const SfxItemSet& rCmpSet, BOOL bNoColls )
+int lcl_Search( const SwCntntNode& rCNd, const SfxItemSet& rCmpSet, sal_Bool bNoColls )
{
// nur die harte Attributierung suchen ?
if( bNoColls && !rCNd.HasSwAttrSet() )
- return FALSE;
+ return sal_False;
const SfxItemSet& rNdSet = rCNd.GetSwAttrSet();
SfxItemIter aIter( rCmpSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
const SfxPoolItem* pNdItem;
- USHORT nWhich;
+ sal_uInt16 nWhich;
- while( TRUE )
+ while( sal_True )
{
// nur testen, ob vorhanden ist ?
if( IsInvalidItem( pItem ))
@@ -859,7 +859,7 @@ int lcl_Search( const SwCntntNode& rCNd, const SfxItemSet& rCmpSet, BOOL bNoColl
nWhich = rCmpSet.GetWhichByPos( aIter.GetCurPos() );
if( SFX_ITEM_SET != rNdSet.GetItemState( nWhich, !bNoColls, &pNdItem )
|| CmpAttr( *pNdItem, rNdSet.GetPool()->GetDefaultItem( nWhich ) ))
- return FALSE;
+ return sal_False;
}
else
{
@@ -869,29 +869,29 @@ int lcl_Search( const SwCntntNode& rCNd, const SfxItemSet& rCmpSet, BOOL bNoColl
// if( SFX_ITEM_SET != rNdSet.GetItemState( nWhich, !bNoColls, &pNdItem )
// || *pNdItem != *pItem )
if( !CmpAttr( rNdSet.Get( nWhich, !bNoColls ), *pItem ))
- return FALSE;
+ return sal_False;
}
if( aIter.IsAtEnd() )
break;
pItem = aIter.NextItem();
}
- return TRUE; // wurde gefunden
+ return sal_True; // wurde gefunden
}
-BOOL SwPaM::Find( const SfxPoolItem& rAttr, BOOL bValue, SwMoveFn fnMove,
- const SwPaM *pRegion, BOOL bInReadOnly )
+sal_Bool SwPaM::Find( const SfxPoolItem& rAttr, sal_Bool bValue, SwMoveFn fnMove,
+ const SwPaM *pRegion, sal_Bool bInReadOnly )
{
// stelle fest welches Attribut gesucht wird:
- USHORT nWhich = rAttr.Which();
+ sal_uInt16 nWhich = rAttr.Which();
int bCharAttr = isCHRATR(nWhich) || isTXTATR(nWhich);
SwPaM* pPam = MakeRegion( fnMove, pRegion );
- BOOL bFound = FALSE;
- BOOL bFirst = TRUE;
- BOOL bSrchForward = fnMove == fnMoveForward;
+ sal_Bool bFound = sal_False;
+ sal_Bool bFirst = sal_True;
+ sal_Bool bSrchForward = fnMove == fnMoveForward;
SwCntntNode * pNode;
const SfxPoolItem* pItem;
SwpFmts aFmtArr;
@@ -901,10 +901,10 @@ BOOL SwPaM::Find( const SfxPoolItem& rAttr, BOOL bValue, SwMoveFn fnMove,
? pPam->GetPoint()->nContent.GetIndex() == pPam->GetCntntNode()->Len()
: !pPam->GetPoint()->nContent.GetIndex() )
{
- if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, FALSE ))
+ if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, sal_False ))
{
delete pPam;
- return FALSE;
+ return sal_False;
}
SwCntntNode *pNd = pPam->GetCntntNode();
xub_StrLen nTmpPos = bSrchForward ? 0 : pNd->Len();
@@ -925,7 +925,7 @@ BOOL SwPaM::Find( const SfxPoolItem& rAttr, BOOL bValue, SwMoveFn fnMove,
SetMark();
*GetPoint() = *pPam->GetPoint();
*GetMark() = *pPam->GetMark();
- bFound = TRUE;
+ bFound = sal_True;
break;
}
else if (isTXTATR(nWhich))
@@ -943,7 +943,7 @@ BOOL SwPaM::Find( const SfxPoolItem& rAttr, BOOL bValue, SwMoveFn fnMove,
}
if( SFX_ITEM_SET == pNode->GetSwAttrSet().GetItemState( nWhich,
- TRUE, &pItem ) && ( !bValue || *pItem == rAttr ) )
+ sal_True, &pItem ) && ( !bValue || *pItem == rAttr ) )
{
// FORWARD: Point an das Ende, GetMark zum Anfanf vom Node
// BACKWARD: Point zum Anfang, GetMark an das Ende vom Node
@@ -951,7 +951,7 @@ BOOL SwPaM::Find( const SfxPoolItem& rAttr, BOOL bValue, SwMoveFn fnMove,
*GetPoint() = *pPam->GetPoint();
SetMark();
pNode->MakeEndIndex( &GetPoint()->nContent );
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -967,14 +967,14 @@ BOOL SwPaM::Find( const SfxPoolItem& rAttr, BOOL bValue, SwMoveFn fnMove,
typedef int (*FnSearchAttr)( const SwTxtNode&, SwAttrCheckArr&, SwPaM& );
-BOOL SwPaM::Find( const SfxItemSet& rSet, BOOL bNoColls, SwMoveFn fnMove,
- const SwPaM *pRegion, BOOL bInReadOnly, BOOL bMoveFirst )
+sal_Bool SwPaM::Find( const SfxItemSet& rSet, sal_Bool bNoColls, SwMoveFn fnMove,
+ const SwPaM *pRegion, sal_Bool bInReadOnly, sal_Bool bMoveFirst )
{
SwPaM* pPam = MakeRegion( fnMove, pRegion );
- BOOL bFound = FALSE;
- BOOL bFirst = TRUE;
- BOOL bSrchForward = fnMove == fnMoveForward;
+ sal_Bool bFound = sal_False;
+ sal_Bool bFirst = sal_True;
+ sal_Bool bSrchForward = fnMove == fnMoveForward;
SwCntntNode * pNode;
SwpFmts aFmtArr;
@@ -982,7 +982,7 @@ BOOL SwPaM::Find( const SfxItemSet& rSet, BOOL bNoColls, SwMoveFn fnMove,
SwAttrCheckArr aCmpArr( rSet, bSrchForward, bNoColls );
SfxItemSet aOtherSet( GetDoc()->GetAttrPool(),
RES_PARATR_BEGIN, RES_GRFATR_END-1 );
- aOtherSet.Put( rSet, FALSE ); // alle Invalid-Items erhalten!
+ aOtherSet.Put( rSet, sal_False ); // alle Invalid-Items erhalten!
FnSearchAttr fnSearch = bSrchForward
? (&::lcl_SearchForward)
@@ -995,10 +995,10 @@ BOOL SwPaM::Find( const SfxItemSet& rSet, BOOL bNoColls, SwMoveFn fnMove,
? pPam->GetPoint()->nContent.GetIndex() == pPam->GetCntntNode()->Len()
: !pPam->GetPoint()->nContent.GetIndex() ) )
{
- if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, FALSE ))
+ if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, sal_False ))
{
delete pPam;
- return FALSE;
+ return sal_False;
}
SwCntntNode *pNd = pPam->GetCntntNode();
xub_StrLen nTmpPos = bSrchForward ? 0 : pNd->Len();
@@ -1021,7 +1021,7 @@ BOOL SwPaM::Find( const SfxItemSet& rSet, BOOL bNoColls, SwMoveFn fnMove,
SetMark();
*GetPoint() = *pPam->GetPoint();
*GetMark() = *pPam->GetMark();
- bFound = TRUE;
+ bFound = sal_True;
break;
}
continue; // TextAttribute
@@ -1048,7 +1048,7 @@ BOOL SwPaM::Find( const SfxItemSet& rSet, BOOL bNoColls, SwMoveFn fnMove,
*GetPoint() = *pPam->GetPoint();
SetMark();
pNode->MakeEndIndex( &GetPoint()->nContent );
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -1066,13 +1066,13 @@ BOOL SwPaM::Find( const SfxItemSet& rSet, BOOL bNoColls, SwMoveFn fnMove,
// Parameter fuer das Suchen vom Attributen
struct SwFindParaAttr : public SwFindParas
{
- BOOL bValue;
+ sal_Bool bValue;
const SfxItemSet *pSet, *pReplSet;
const SearchOptions *pSearchOpt;
SwCursor& rCursor;
utl::TextSearch* pSTxt;
- SwFindParaAttr( const SfxItemSet& rSet, BOOL bNoCollection,
+ SwFindParaAttr( const SfxItemSet& rSet, sal_Bool bNoCollection,
const SearchOptions* pOpt, const SfxItemSet* pRSet,
SwCursor& rCrsr )
: bValue( bNoCollection ), pSet( &rSet ), pReplSet( pRSet ),
@@ -1080,22 +1080,22 @@ struct SwFindParaAttr : public SwFindParas
virtual ~SwFindParaAttr() { delete pSTxt; }
- virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, BOOL bInReadOnly );
+ virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, sal_Bool bInReadOnly );
virtual int IsReplaceMode() const;
};
int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
- BOOL bInReadOnly )
+ sal_Bool bInReadOnly )
{
// String ersetzen ?? (nur wenn Text angegeben oder nicht attributiert
// gesucht wird)
- BOOL bReplaceTxt = pSearchOpt && ( pSearchOpt->replaceString.getLength() ||
+ sal_Bool bReplaceTxt = pSearchOpt && ( pSearchOpt->replaceString.getLength() ||
!pSet->Count() );
- BOOL bReplaceAttr = pReplSet && pReplSet->Count();
- BOOL bMoveFirst = !bReplaceAttr;
+ sal_Bool bReplaceAttr = pReplSet && pReplSet->Count();
+ sal_Bool bMoveFirst = !bReplaceAttr;
if( bInReadOnly && (bReplaceAttr || bReplaceTxt ))
- bInReadOnly = FALSE;
+ bInReadOnly = sal_False;
// wir suchen nach Attributen, soll zusaetzlich Text gesucht werden ?
{
@@ -1103,7 +1103,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
SwPaM* pTextRegion = &aRegion;
SwPaM aSrchPam( *pCrsr->GetPoint() );
- while( TRUE )
+ while( sal_True )
{
if( pSet->Count() ) // gibts ueberhaupt Attributierung?
{
@@ -1112,7 +1112,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
//JP 17.11.95: was ist mit Attributen in leeren Absaetzen !!
// || *pCrsr->GetMark() == *pCrsr->GetPoint() ) // kein Bereich ??
return FIND_NOT_FOUND;
- bMoveFirst = TRUE;
+ bMoveFirst = sal_True;
if( !pSearchOpt )
break; // ok, nur Attribute, also gefunden
@@ -1137,7 +1137,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
}
// todo/mba: searching for attributes in Outliner text?!
- BOOL bSearchInNotes = FALSE;
+ sal_Bool bSearchInNotes = sal_False;
// Bug 24665: suche im richtigen Bereich weiter (pTextRegion!)
if( aSrchPam.Find( *pSearchOpt, bSearchInNotes, *pSTxt, fnMove, pTextRegion, bInReadOnly ) &&
@@ -1155,12 +1155,12 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
//JP 04.11.97: Bug 44897 - aber den Mark wieder aufheben, damit
// weiterbewegt werden kann!
{
- BOOL bCheckRegion = TRUE;
+ sal_Bool bCheckRegion = sal_True;
SwPosition* pPos = aSrchPam.GetPoint();
if( !(*fnMove->fnNd)( &pPos->nNode.GetNode(),
&pPos->nContent, CRSR_SKIP_CHARS ))
{
- if( (*fnMove->fnNds)( &pPos->nNode, FALSE ))
+ if( (*fnMove->fnNds)( &pPos->nNode, sal_False ))
{
SwCntntNode *pNd = pPos->nNode.GetNode().GetCntntNode();
xub_StrLen nCPos;
@@ -1171,7 +1171,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
pPos->nContent.Assign( pNd, nCPos );
}
else
- bCheckRegion = FALSE;
+ bCheckRegion = sal_False;
}
if( !bCheckRegion || *aRegion.GetPoint() <= *pPos )
return FIND_NOT_FOUND; // nicht gefunden
@@ -1242,11 +1242,11 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
SfxItemIter aIter( *pSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
// alle die nicht gesetzt sind mit Pool-Defaults aufuellen
if( !IsInvalidItem( pItem ) && SFX_ITEM_SET !=
- pReplSet->GetItemState( pItem->Which(), FALSE ))
+ pReplSet->GetItemState( pItem->Which(), sal_False ))
aSet.Put( pPool->GetDefaultItem( pItem->Which() ));
if( aIter.IsAtEnd() )
@@ -1274,8 +1274,8 @@ int SwFindParaAttr::IsReplaceMode() const
// Suchen nach Attributen
-ULONG SwCursor::Find( const SfxItemSet& rSet, BOOL bNoCollections,
- SwDocPositions nStart, SwDocPositions nEnde, BOOL& bCancel,
+sal_uLong SwCursor::Find( const SfxItemSet& rSet, sal_Bool bNoCollections,
+ SwDocPositions nStart, SwDocPositions nEnde, sal_Bool& bCancel,
FindRanges eFndRngs,
const SearchOptions* pSearchOpt, const SfxItemSet* pReplSet )
{
@@ -1284,17 +1284,17 @@ ULONG SwCursor::Find( const SfxItemSet& rSet, BOOL bNoCollections,
Link aLnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- BOOL bReplace = ( pSearchOpt && ( pSearchOpt->replaceString.getLength() ||
+ sal_Bool bReplace = ( pSearchOpt && ( pSearchOpt->replaceString.getLength() ||
!rSet.Count() ) ) ||
(pReplSet && pReplSet->Count());
- BOOL bSttUndo = pDoc->DoesUndo() && bReplace;
+ sal_Bool bSttUndo = pDoc->DoesUndo() && bReplace;
if( bSttUndo )
pDoc->StartUndo( UNDO_REPLACE, NULL );
SwFindParaAttr aSwFindParaAttr( rSet, bNoCollections, pSearchOpt,
pReplSet, *this );
- ULONG nRet = FindAll(aSwFindParaAttr, nStart, nEnde, eFndRngs, bCancel );
+ sal_uLong nRet = FindAll(aSwFindParaAttr, nStart, nEnde, eFndRngs, bCancel );
pDoc->SetOle2Link( aLnk );
if( nRet && bReplace )
pDoc->SetModified();
diff --git a/sw/source/core/crsr/findcoll.cxx b/sw/source/core/crsr/findcoll.cxx
index 4bb594ceb4ca..d7fdf7d4954d 100644
--- a/sw/source/core/crsr/findcoll.cxx
+++ b/sw/source/core/crsr/findcoll.cxx
@@ -50,17 +50,17 @@ struct SwFindParaFmtColl : public SwFindParas
const SwTxtFmtColl* pRpColl, SwCursor& rCrsr )
: pFmtColl( &rFmtColl ), pReplColl( pRpColl ), rCursor( rCrsr )
{}
- virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, BOOL bInReadOnly );
+ virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, sal_Bool bInReadOnly );
virtual int IsReplaceMode() const;
};
int SwFindParaFmtColl::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
- BOOL bInReadOnly )
+ sal_Bool bInReadOnly )
{
int nRet = FIND_FOUND;
if( bInReadOnly && pReplColl )
- bInReadOnly = FALSE;
+ bInReadOnly = sal_False;
if( !pCrsr->Find( *pFmtColl, fnMove, pRegion, bInReadOnly ) )
nRet = FIND_NOT_FOUND;
@@ -82,8 +82,8 @@ int SwFindParaFmtColl::IsReplaceMode() const
// Suchen nach Format-Collections
-ULONG SwCursor::Find( const SwTxtFmtColl& rFmtColl,
- SwDocPositions nStart, SwDocPositions nEnde, BOOL& bCancel,
+sal_uLong SwCursor::Find( const SwTxtFmtColl& rFmtColl,
+ SwDocPositions nStart, SwDocPositions nEnde, sal_Bool& bCancel,
FindRanges eFndRngs, const SwTxtFmtColl* pReplFmtColl )
{
// OLE-Benachrichtigung abschalten !!
@@ -91,7 +91,7 @@ ULONG SwCursor::Find( const SwTxtFmtColl& rFmtColl,
Link aLnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- BOOL bSttUndo = pDoc->DoesUndo() && pReplFmtColl;
+ sal_Bool bSttUndo = pDoc->DoesUndo() && pReplFmtColl;
if( bSttUndo )
{
SwRewriter aRewriter;
@@ -104,7 +104,7 @@ ULONG SwCursor::Find( const SwTxtFmtColl& rFmtColl,
SwFindParaFmtColl aSwFindParaFmtColl( rFmtColl, pReplFmtColl, *this );
- ULONG nRet = FindAll( aSwFindParaFmtColl, nStart, nEnde, eFndRngs, bCancel );
+ sal_uLong nRet = FindAll( aSwFindParaFmtColl, nStart, nEnde, eFndRngs, bCancel );
pDoc->SetOle2Link( aLnk );
if( nRet && pReplFmtColl )
diff --git a/sw/source/core/crsr/findfmt.cxx b/sw/source/core/crsr/findfmt.cxx
index bf3492ae0a65..8da8e83bd5cf 100644
--- a/sw/source/core/crsr/findfmt.cxx
+++ b/sw/source/core/crsr/findfmt.cxx
@@ -33,11 +33,11 @@
#include <pamtyp.hxx>
-BOOL SwPaM::Find( const SwFmt& rFmt, SwMoveFn fnMove,
- const SwPaM *pRegion, BOOL bInReadOnly )
+sal_Bool SwPaM::Find( const SwFmt& rFmt, SwMoveFn fnMove,
+ const SwPaM *pRegion, sal_Bool bInReadOnly )
{
- BOOL bFound = FALSE;
- BOOL bSrchForward = fnMove == fnMoveForward;
+ sal_Bool bFound = sal_False;
+ sal_Bool bSrchForward = fnMove == fnMoveForward;
SwPaM* pPam = MakeRegion( fnMove, pRegion );
// Wenn am Anfang/Ende, aus dem Node moven
@@ -45,17 +45,17 @@ BOOL SwPaM::Find( const SwFmt& rFmt, SwMoveFn fnMove,
? pPam->GetPoint()->nContent.GetIndex() == pPam->GetCntntNode()->Len()
: !pPam->GetPoint()->nContent.GetIndex() )
{
- if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, FALSE ))
+ if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, sal_False ))
{
delete pPam;
- return FALSE;
+ return sal_False;
}
SwCntntNode *pNd = pPam->GetPoint()->nNode.GetNode().GetCntntNode();
xub_StrLen nTmpPos = bSrchForward ? 0 : pNd->Len();
pPam->GetPoint()->nContent.Assign( pNd, nTmpPos );
}
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
SwCntntNode* pNode;
while( !bFound &&
0 != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly )))
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index ed4bcc089957..1f5e7b6eb9ff 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -68,7 +68,7 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart,
const SwpHints *pHts = rNd.GetpSwpHints();
- USHORT n = 0;
+ sal_uInt16 n = 0;
xub_StrLen nSoftHyphen = nStart;
xub_StrLen nHintStart = STRING_LEN;
bool bNewHint = true;
@@ -141,7 +141,7 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart,
// wir sie einfach.
// Fuer das Ende merken wir uns die Ersetzungen und entferenen
// hinterher alle am Stringende (koenten ja 'normale' 0x7f drinstehen
- BOOL bEmpty = RES_TXTATR_FIELD != pHt->Which() ||
+ sal_Bool bEmpty = RES_TXTATR_FIELD != pHt->Which() ||
!(static_cast<SwTxtFld const*>(pHt)
->GetFld().GetFld()->ExpandField(true).Len());
if ( bEmpty && nStart == nAkt )
@@ -176,7 +176,7 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart,
}
while ( true );
- for( USHORT i = aReplaced.Count(); i; )
+ for( sal_uInt16 i = aReplaced.Count(); i; )
{
const xub_StrLen nTmp = aReplaced[ --i ];
if( nTmp == rRet.Len() - 1 )
@@ -222,15 +222,15 @@ xub_StrLen GetPostIt(xub_StrLen aCount,const SwpHints *pHts)
return aIndex;
}
-BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::TextSearch& rSTxt,
+sal_uInt8 SwPaM::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes , utl::TextSearch& rSTxt,
SwMoveFn fnMove, const SwPaM * pRegion,
- BOOL bInReadOnly )
+ sal_Bool bInReadOnly )
{
if( !rSearchOpt.searchString.getLength() )
- return FALSE;
+ return sal_False;
SwPaM* pPam = MakeRegion( fnMove, pRegion );
- BOOL bSrchForward = fnMove == fnMoveForward;
+ sal_Bool bSrchForward = fnMove == fnMoveForward;
SwNodeIndex& rNdIdx = pPam->GetPoint()->nNode;
SwIndex& rCntntIdx = pPam->GetPoint()->nContent;
@@ -241,10 +241,10 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
rCntntIdx.GetIndex() )
: !rCntntIdx.GetIndex() && pPam->GetCntntNode()->Len() )
{
- if( !(*fnMove->fnNds)( &rNdIdx, FALSE ))
+ if( !(*fnMove->fnNds)( &rNdIdx, sal_False ))
{
delete pPam;
- return FALSE;
+ return sal_False;
}
SwCntntNode *pNd = rNdIdx.GetNode().GetCntntNode();
xub_StrLen nTmpPos = bSrchForward ? 0 : pNd->Len();
@@ -252,14 +252,14 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
}
/*
- * Ist bFound == TRUE, dann wurde der String gefunden und in
+ * Ist bFound == sal_True, dann wurde der String gefunden und in
* nStart und nEnde steht der gefundenen String
*/
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
/*
* StartPostion im Text oder Anfangsposition
*/
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
SwCntntNode * pNode;
//testarea
//String sCleanStr;
@@ -268,11 +268,11 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
xub_StrLen nStart, nEnde, nTxtLen;
- BOOL bRegSearch = SearchAlgorithms_REGEXP == rSearchOpt.algorithmType;
- BOOL bChkEmptyPara = bRegSearch && 2 == rSearchOpt.searchString.getLength() &&
+ sal_Bool bRegSearch = SearchAlgorithms_REGEXP == rSearchOpt.algorithmType;
+ sal_Bool bChkEmptyPara = bRegSearch && 2 == rSearchOpt.searchString.getLength() &&
( !rSearchOpt.searchString.compareToAscii( "^$" ) ||
!rSearchOpt.searchString.compareToAscii( "$^" ) );
- BOOL bChkParaEnd = bRegSearch && 1 == rSearchOpt.searchString.getLength() &&
+ sal_Bool bChkParaEnd = bRegSearch && 1 == rSearchOpt.searchString.getLength() &&
!rSearchOpt.searchString.compareToAscii( "$" );
// LanguageType eLastLang = 0;
@@ -418,7 +418,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
SwMoveFn fnMove,
- BOOL bSrchForward, BOOL bRegSearch, BOOL bChkEmptyPara, BOOL bChkParaEnd,
+ sal_Bool bSrchForward, sal_Bool bRegSearch, sal_Bool bChkEmptyPara, sal_Bool bChkParaEnd,
xub_StrLen &nStart, xub_StrLen &nEnde, xub_StrLen nTxtLen,SwNode* pNode, SwPaM* pPam)
{
bool bFound = false;
@@ -450,8 +450,8 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
aFltArr, sCleanStr, bRemoveSoftHyphens );
SwScriptIterator* pScriptIter = 0;
- USHORT nSearchScript = 0;
- USHORT nCurrScript = 0;
+ sal_uInt16 nSearchScript = 0;
+ sal_uInt16 nCurrScript = 0;
if ( SearchAlgorithms_APPROXIMATE == rSearchOpt.algorithmType &&
pBreakIt->GetBreakIter().is() )
@@ -522,7 +522,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
if( !bSrchForward ) // rueckwaerts Suche?
Exchange(); // Point und Mark tauschen
- bFound = TRUE;
+ bFound = sal_True;
break;
}
@@ -546,7 +546,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
{
if( !bSrchForward ) // rueckwaerts Suche?
Exchange(); // Point und Mark tauschen
- //bFound = TRUE;
+ //bFound = sal_True;
//break;
return true;
}
@@ -560,13 +560,13 @@ struct SwFindParaText : public SwFindParas
const SearchOptions& rSearchOpt;
SwCursor& rCursor;
utl::TextSearch aSTxt;
- BOOL bReplace;
- BOOL bSearchInNotes;
+ sal_Bool bReplace;
+ sal_Bool bSearchInNotes;
- SwFindParaText( const SearchOptions& rOpt, BOOL bSearchNotes, int bRepl, SwCursor& rCrsr )
+ SwFindParaText( const SearchOptions& rOpt, sal_Bool bSearchNotes, int bRepl, SwCursor& rCrsr )
: rSearchOpt( rOpt ), rCursor( rCrsr ), aSTxt( rOpt ), bReplace( 0 != bRepl ), bSearchInNotes( bSearchNotes )
{}
- virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, BOOL bInReadOnly );
+ virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, sal_Bool bInReadOnly );
virtual int IsReplaceMode() const;
virtual ~SwFindParaText();
};
@@ -576,12 +576,12 @@ SwFindParaText::~SwFindParaText()
}
int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
- const SwPaM* pRegion, BOOL bInReadOnly )
+ const SwPaM* pRegion, sal_Bool bInReadOnly )
{
if( bInReadOnly && bReplace )
- bInReadOnly = FALSE;
+ bInReadOnly = sal_False;
- BOOL bFnd = (BOOL)pCrsr->Find( rSearchOpt, bSearchInNotes, aSTxt, fnMove, pRegion, bInReadOnly );
+ sal_Bool bFnd = (sal_Bool)pCrsr->Find( rSearchOpt, bSearchInNotes, aSTxt, fnMove, pRegion, bInReadOnly );
/* #i80135# if we found something in a note, Mark and Point is the same
if( bFnd && *pCrsr->GetMark() == *pCrsr->GetPoint() )
@@ -633,9 +633,9 @@ int SwFindParaText::IsReplaceMode() const
}
-ULONG SwCursor::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes,
+sal_uLong SwCursor::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes,
SwDocPositions nStart, SwDocPositions nEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges eFndRngs, int bReplace )
{
// OLE-Benachrichtigung abschalten !!
@@ -643,15 +643,15 @@ ULONG SwCursor::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes,
Link aLnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- BOOL bSttUndo = pDoc->DoesUndo() && bReplace;
+ sal_Bool bSttUndo = pDoc->DoesUndo() && bReplace;
if( bSttUndo )
pDoc->StartUndo( UNDO_REPLACE, NULL );
- BOOL bSearchSel = 0 != (rSearchOpt.searchFlag & SearchFlags::REG_NOT_BEGINOFLINE);
+ sal_Bool bSearchSel = 0 != (rSearchOpt.searchFlag & SearchFlags::REG_NOT_BEGINOFLINE);
if( bSearchSel )
eFndRngs = (FindRanges)(eFndRngs | FND_IN_SEL);
SwFindParaText aSwFindParaText( rSearchOpt, bSearchInNotes, bReplace, *this );
- ULONG nRet = FindAll( aSwFindParaText, nStart, nEnde, eFndRngs, bCancel );
+ sal_uLong nRet = FindAll( aSwFindParaText, nStart, nEnde, eFndRngs, bCancel );
pDoc->SetOle2Link( aLnk );
if( nRet && bReplace )
pDoc->SetModified();
@@ -667,8 +667,8 @@ String *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam )
if( pPam && pPam->HasMark() &&
SearchAlgorithms_REGEXP == rSearchOpt.algorithmType )
{
- const SwCntntNode* pTxtNode = pPam->GetCntntNode( TRUE );
- if( pTxtNode && pTxtNode->IsTxtNode() && pTxtNode == pPam->GetCntntNode( FALSE ) )
+ const SwCntntNode* pTxtNode = pPam->GetCntntNode( sal_True );
+ if( pTxtNode && pTxtNode->IsTxtNode() && pTxtNode == pPam->GetCntntNode( sal_False ) )
{
utl::TextSearch aSTxt( rSearchOpt );
String aStr( pPam->GetTxt() );
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index ec30b5aefbe0..48e22c79ec6b 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -56,7 +56,7 @@
#include <hints.hxx>
// fuer den dummen ?MSC-? Compiler
-inline xub_StrLen GetSttOrEnd( BOOL bCondition, const SwCntntNode& rNd )
+inline xub_StrLen GetSttOrEnd( sal_Bool bCondition, const SwCntntNode& rNd )
{
return bCondition ? 0 : rNd.Len();
}
@@ -106,58 +106,58 @@ SwPosition &SwPosition::operator=(const SwPosition &rPos)
}
-BOOL SwPosition::operator<(const SwPosition &rPos) const
+sal_Bool SwPosition::operator<(const SwPosition &rPos) const
{
if( nNode < rPos.nNode )
- return TRUE;
+ return sal_True;
if( nNode == rPos.nNode )
return ( nContent < rPos.nContent );
- return FALSE;
+ return sal_False;
}
-BOOL SwPosition::operator>(const SwPosition &rPos) const
+sal_Bool SwPosition::operator>(const SwPosition &rPos) const
{
if(nNode > rPos.nNode )
- return TRUE;
+ return sal_True;
if( nNode == rPos.nNode )
return ( nContent > rPos.nContent );
- return FALSE;
+ return sal_False;
}
-BOOL SwPosition::operator<=(const SwPosition &rPos) const
+sal_Bool SwPosition::operator<=(const SwPosition &rPos) const
{
if(nNode < rPos.nNode )
- return TRUE;
+ return sal_True;
if( nNode == rPos.nNode )
return ( nContent <= rPos.nContent );
- return FALSE;
+ return sal_False;
}
-BOOL SwPosition::operator>=(const SwPosition &rPos) const
+sal_Bool SwPosition::operator>=(const SwPosition &rPos) const
{
if(nNode > rPos.nNode )
- return TRUE;
+ return sal_True;
if( nNode == rPos.nNode )
return ( nContent >= rPos.nContent );
- return FALSE;
+ return sal_False;
}
-BOOL SwPosition::operator==(const SwPosition &rPos) const
+sal_Bool SwPosition::operator==(const SwPosition &rPos) const
{
return
( ( nNode == rPos.nNode ) && ( nContent == rPos.nContent ) ?
- TRUE: FALSE);
+ sal_True: sal_False);
}
-BOOL SwPosition::operator!=(const SwPosition &rPos) const
+sal_Bool SwPosition::operator!=(const SwPosition &rPos) const
{
if( nNode != rPos.nNode )
- return TRUE;
+ return sal_True;
return ( nContent != rPos.nContent );
}
@@ -259,9 +259,9 @@ SwComparePosition ComparePosition(
enum CHKSECTION { Chk_Both, Chk_One, Chk_None };
-CHKSECTION lcl_TstIdx( ULONG nSttIdx, ULONG nEndIdx, const SwNode& rEndNd )
+CHKSECTION lcl_TstIdx( sal_uLong nSttIdx, sal_uLong nEndIdx, const SwNode& rEndNd )
{
- ULONG nStt = rEndNd.StartOfSectionIndex(), nEnd = rEndNd.GetIndex();
+ sal_uLong nStt = rEndNd.StartOfSectionIndex(), nEnd = rEndNd.GetIndex();
CHKSECTION eSec = nStt < nSttIdx && nEnd >= nSttIdx ? Chk_One : Chk_None;
if( nStt < nEndIdx && nEnd >= nEndIdx )
return( eSec == Chk_One ? Chk_Both : Chk_One );
@@ -269,14 +269,14 @@ CHKSECTION lcl_TstIdx( ULONG nSttIdx, ULONG nEndIdx, const SwNode& rEndNd )
}
-BOOL lcl_ChkOneRange( CHKSECTION eSec, BOOL bChkSections,
- const SwNode& rBaseEnd, ULONG nStt, ULONG nEnd )
+sal_Bool lcl_ChkOneRange( CHKSECTION eSec, sal_Bool bChkSections,
+ const SwNode& rBaseEnd, sal_uLong nStt, sal_uLong nEnd )
{
if( eSec != Chk_Both )
- return FALSE;
+ return sal_False;
if( !bChkSections )
- return TRUE;
+ return sal_True;
// suche die umspannende Section
const SwNodes& rNds = rBaseEnd.GetNodes();
@@ -285,29 +285,29 @@ BOOL lcl_ChkOneRange( CHKSECTION eSec, BOOL bChkSections,
pNd = pNd->StartOfSectionNode();
if( pNd == rNds[ nEnd ]->StartOfSectionNode() )
- return TRUE; // der gleiche StartNode, die selbe Section
+ return sal_True; // der gleiche StartNode, die selbe Section
// steht schon auf einem GrundSection Node ? Fehler !!!
if( !pNd->StartOfSectionIndex() )
- return FALSE;
+ return sal_False;
while( ( pTmp = pNd->StartOfSectionNode())->EndOfSectionNode() !=
&rBaseEnd )
pNd = pTmp;
- ULONG nSttIdx = pNd->GetIndex(), nEndIdx = pNd->EndOfSectionIndex();
+ sal_uLong nSttIdx = pNd->GetIndex(), nEndIdx = pNd->EndOfSectionIndex();
return nSttIdx <= nStt && nStt <= nEndIdx &&
- nSttIdx <= nEnd && nEnd <= nEndIdx ? TRUE : FALSE;
+ nSttIdx <= nEnd && nEnd <= nEndIdx ? sal_True : sal_False;
}
-BOOL CheckNodesRange( const SwNodeIndex& rStt,
- const SwNodeIndex& rEnd, BOOL bChkSection )
+sal_Bool CheckNodesRange( const SwNodeIndex& rStt,
+ const SwNodeIndex& rEnd, sal_Bool bChkSection )
{
const SwNodes& rNds = rStt.GetNodes();
- ULONG nStt = rStt.GetIndex(), nEnd = rEnd.GetIndex();
+ sal_uLong nStt = rStt.GetIndex(), nEnd = rEnd.GetIndex();
CHKSECTION eSec = lcl_TstIdx( nStt, nEnd, rNds.GetEndOfContent() );
- if( Chk_None != eSec ) return eSec == Chk_Both ? TRUE : FALSE;
+ if( Chk_None != eSec ) return eSec == Chk_Both ? sal_True : sal_False;
eSec = lcl_TstIdx( nStt, nEnd, rNds.GetEndOfAutotext() );
if( Chk_None != eSec )
@@ -329,34 +329,34 @@ BOOL CheckNodesRange( const SwNodeIndex& rStt,
return lcl_ChkOneRange( eSec, bChkSection,
rNds.GetEndOfRedlines(), nStt, nEnd );
- return FALSE; // liegt irgendwo dazwischen, FEHLER
+ return sal_False; // liegt irgendwo dazwischen, FEHLER
}
-BOOL GoNext(SwNode* pNd, SwIndex * pIdx, USHORT nMode )
+sal_Bool GoNext(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode )
{
if( pNd->IsCntntNode() )
return ((SwCntntNode*)pNd)->GoNext( pIdx, nMode );
- return FALSE;
+ return sal_False;
}
-BOOL GoPrevious( SwNode* pNd, SwIndex * pIdx, USHORT nMode )
+sal_Bool GoPrevious( SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode )
{
if( pNd->IsCntntNode() )
return ((SwCntntNode*)pNd)->GoPrevious( pIdx, nMode );
- return FALSE;
+ return sal_False;
}
-SwCntntNode* GoNextNds( SwNodeIndex* pIdx, BOOL bChk )
+SwCntntNode* GoNextNds( SwNodeIndex* pIdx, sal_Bool bChk )
{
SwNodeIndex aIdx( *pIdx );
SwCntntNode* pNd = aIdx.GetNodes().GoNext( &aIdx );
if( pNd )
{
if( bChk && 1 != aIdx.GetIndex() - pIdx->GetIndex() &&
- !CheckNodesRange( *pIdx, aIdx, TRUE ) )
+ !CheckNodesRange( *pIdx, aIdx, sal_True ) )
pNd = 0;
else
*pIdx = aIdx;
@@ -365,14 +365,14 @@ SwCntntNode* GoNextNds( SwNodeIndex* pIdx, BOOL bChk )
}
-SwCntntNode* GoPreviousNds( SwNodeIndex * pIdx, BOOL bChk )
+SwCntntNode* GoPreviousNds( SwNodeIndex * pIdx, sal_Bool bChk )
{
SwNodeIndex aIdx( *pIdx );
SwCntntNode* pNd = aIdx.GetNodes().GoPrevious( &aIdx );
if( pNd )
{
if( bChk && 1 != pIdx->GetIndex() - aIdx.GetIndex() &&
- !CheckNodesRange( *pIdx, aIdx, TRUE ) )
+ !CheckNodesRange( *pIdx, aIdx, sal_True ) )
pNd = 0;
else
*pIdx = aIdx;
@@ -564,9 +564,9 @@ void SwPaM::Exchange()
// Bewegen des Cursors
-BOOL SwPaM::Move( SwMoveFn fnMove, SwGoInDoc fnGo )
+sal_Bool SwPaM::Move( SwMoveFn fnMove, SwGoInDoc fnGo )
{
- BOOL bRet = (*fnGo)( *this, fnMove );
+ sal_Bool bRet = (*fnGo)( *this, fnMove );
m_bIsInFrontOfLabel = false;
@@ -618,7 +618,7 @@ SwPaM* SwPaM::MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg )
return pPam;
}
-SwPaM & SwPaM::Normalize(BOOL bPointFirst)
+SwPaM & SwPaM::Normalize(sal_Bool bPointFirst)
{
if (HasMark())
if ( ( bPointFirst && *m_pPoint > *m_pMark) ||
@@ -630,7 +630,7 @@ SwPaM & SwPaM::Normalize(BOOL bPointFirst)
return *this;
}
-USHORT SwPaM::GetPageNum( BOOL bAtPoint, const Point* pLayPos )
+sal_uInt16 SwPaM::GetPageNum( sal_Bool bAtPoint, const Point* pLayPos )
{
// return die Seitennummer am Cursor
// (fuer Reader + Seitengebundene Rahmen)
@@ -640,7 +640,7 @@ USHORT SwPaM::GetPageNum( BOOL bAtPoint, const Point* pLayPos )
const SwPosition* pPos = bAtPoint ? m_pPoint : m_pMark;
if( 0 != ( pNd = pPos->nNode.GetNode().GetCntntNode() ) &&
- 0 != ( pCFrm = pNd->GetFrm( pLayPos, pPos, FALSE )) &&
+ 0 != ( pCFrm = pNd->GetFrm( pLayPos, pPos, sal_False )) &&
0 != ( pPg = pCFrm->FindPageFrm() ))
return pPg->GetPhyPageNum();
return 0;
@@ -675,15 +675,15 @@ const SwFrm* lcl_FindEditInReadonlyFrm( const SwFrm& rFrm )
// steht in etwas geschuetztem oder in die Selektion umspannt
// etwas geschuetztes.
-BOOL SwPaM::HasReadonlySel( bool bFormView ) const
+sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
Point aTmpPt;
const SwCntntNode *pNd;
const SwCntntFrm *pFrm;
if( 0 != ( pNd = GetPoint()->nNode.GetNode().GetCntntNode() ))
- pFrm = pNd->GetFrm( &aTmpPt, GetPoint(), FALSE );
+ pFrm = pNd->GetFrm( &aTmpPt, GetPoint(), sal_False );
else
pFrm = 0;
@@ -697,7 +697,7 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
( bFormView &&
0 == ( pSttEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
// <--
- bRet = TRUE;
+ bRet = sal_True;
else if( pNd )
{
const SwSectionNode* pSNd = pNd->GetSectionNode();
@@ -705,13 +705,13 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
// --> FME 2004-06-29 #114856# Formular view
(bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
// <--
- bRet = TRUE;
+ bRet = sal_True;
}
if( !bRet && HasMark() && GetPoint()->nNode != GetMark()->nNode )
{
if( 0 != ( pNd = GetMark()->nNode.GetNode().GetCntntNode() ))
- pFrm = pNd->GetFrm( &aTmpPt, GetMark(), FALSE );
+ pFrm = pNd->GetFrm( &aTmpPt, GetMark(), sal_False );
else
pFrm = 0;
@@ -720,7 +720,7 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
( bFormView &&
0 == ( pEndEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
// <--
- bRet = TRUE;
+ bRet = sal_True;
else if( pNd )
{
const SwSectionNode* pSNd = pNd->GetSectionNode();
@@ -728,7 +728,7 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
// --> FME 2004-06-29 #114856# Formular view
(bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
// <--
- bRet = TRUE;
+ bRet = sal_True;
}
// --> FME 2004-06-29 #114856# Formular view
@@ -737,7 +737,7 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
// Check if start and end frame are inside the _same_
// edit-in-readonly-environment. Otherwise we better return 'true'
if ( pSttEIRFrm != pEndEIRFrm )
- bRet = TRUE;
+ bRet = sal_True;
}
// <--
@@ -745,11 +745,11 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
// Selektion liegen?
if( !bRet )
{
- ULONG nSttIdx = GetMark()->nNode.GetIndex(),
+ sal_uLong nSttIdx = GetMark()->nNode.GetIndex(),
nEndIdx = GetPoint()->nNode.GetIndex();
if( nEndIdx <= nSttIdx )
{
- ULONG nTmp = nSttIdx;
+ sal_uLong nTmp = nSttIdx;
nSttIdx = nEndIdx;
nEndIdx = nTmp;
}
@@ -760,14 +760,14 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
if( nSttIdx + 3 < nEndIdx )
{
const SwSectionFmts& rFmts = GetDoc()->GetSections();
- for( USHORT n = rFmts.Count(); n; )
+ for( sal_uInt16 n = rFmts.Count(); n; )
{
const SwSectionFmt* pFmt = rFmts[ --n ];
if( pFmt->GetProtect().IsCntntProtected() )
{
- const SwFmtCntnt& rCntnt = pFmt->GetCntnt(FALSE);
+ const SwFmtCntnt& rCntnt = pFmt->GetCntnt(sal_False);
ASSERT( rCntnt.GetCntntIdx(), "wo ist der SectionNode?" );
- ULONG nIdx = rCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nIdx = rCntnt.GetCntntIdx()->GetIndex();
if( nSttIdx <= nIdx && nEndIdx >= nIdx &&
rCntnt.GetCntntIdx()->GetNode().GetNodes().IsDocNodes() )
{
@@ -777,10 +777,10 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
if( CONTENT_SECTION == rSect.GetType() )
{
RestoreSavePos();
- return TRUE;
+ return sal_True;
}
*/
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -799,18 +799,18 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
{
SwFrmFmt* pFmt = (SwFrmFmt*)rFmts[ --n ];
const SwTable* pTbl = SwTable::FindTable( pFmt );
- ULONG nIdx = pTbl ? pTbl->GetTabSortBoxes()[0]->GetSttIdx()
+ sal_uLong nIdx = pTbl ? pTbl->GetTabSortBoxes()[0]->GetSttIdx()
: 0;
if( nSttIdx <= nIdx && nEndIdx >= nIdx )
{
// dann teste mal alle Boxen
const SwTableSortBoxes& rBoxes = pTbl->GetTabSortBoxes();
- for( USHORT i = rBoxes.Count(); i; )
+ for( sal_uInt16 i = rBoxes.Count(); i; )
if( rBoxes[ --i ]->GetFrmFmt()->GetProtect().
IsCntntProtected() )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
@@ -852,8 +852,8 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
// Fall, darf die Position vom Pam nicht veraendert werden!
-SwCntntNode* GetNode( SwPaM & rPam, BOOL& rbFirst, SwMoveFn fnMove,
- BOOL bInReadOnly )
+SwCntntNode* GetNode( SwPaM & rPam, sal_Bool& rbFirst, SwMoveFn fnMove,
+ sal_Bool bInReadOnly )
{
SwCntntNode * pNd = 0;
SwCntntFrm* pFrm;
@@ -862,7 +862,7 @@ SwCntntNode* GetNode( SwPaM & rPam, BOOL& rbFirst, SwMoveFn fnMove,
{
if( rbFirst )
{
- rbFirst = FALSE;
+ rbFirst = sal_False;
pNd = rPam.GetCntntNode();
if( pNd )
{
@@ -885,18 +885,18 @@ SwCntntNode* GetNode( SwPaM & rPam, BOOL& rbFirst, SwMoveFn fnMove,
if( !pNd ) // steht Cursor auf keinem ContentNode ?
{
SwPosition aPos( *rPam.GetPoint() );
- BOOL bSrchForward = fnMove == fnMoveForward;
+ sal_Bool bSrchForward = fnMove == fnMoveForward;
SwNodes& rNodes = aPos.nNode.GetNodes();
// zum naechsten / vorherigen ContentNode
// Funktioniert noch alles, wenn die Uerbpruefung vom ueberspringen der
// Sektions herausgenommen wird ??
// if( (*fnMove->fnNds)( rNodes, &aPos.nNode ) )
- while( TRUE )
+ while( sal_True )
{
pNd = bSrchForward
- ? rNodes.GoNextSection( &aPos.nNode, TRUE, !bInReadOnly )
- : rNodes.GoPrevSection( &aPos.nNode, TRUE, !bInReadOnly );
+ ? rNodes.GoNextSection( &aPos.nNode, sal_True, !bInReadOnly )
+ : rNodes.GoPrevSection( &aPos.nNode, sal_True, !bInReadOnly );
if( pNd )
{
aPos.nContent.Assign( pNd, ::GetSttOrEnd( bSrchForward,*pNd ));
@@ -952,7 +952,7 @@ void GoEndDoc( SwPosition * pPos )
{
SwNodes& rNodes = pPos->nNode.GetNodes();
pPos->nNode = rNodes.GetEndOfContent();
- SwCntntNode* pCNd = GoPreviousNds( &pPos->nNode, TRUE );
+ SwCntntNode* pCNd = GoPreviousNds( &pPos->nNode, sal_True );
if( pCNd )
pCNd->MakeEndIndex( &pPos->nContent );
}
@@ -962,7 +962,7 @@ void GoStartSection( SwPosition * pPos )
{
// springe zum Anfang der Section
SwNodes& rNodes = pPos->nNode.GetNodes();
- USHORT nLevel = rNodes.GetSectionLevel( pPos->nNode );
+ sal_uInt16 nLevel = rNodes.GetSectionLevel( pPos->nNode );
if( pPos->nNode < rNodes.GetEndOfContent().StartOfSectionIndex() )
nLevel--;
do { rNodes.GoStartOfSection( &pPos->nNode ); } while( nLevel-- );
@@ -978,35 +978,35 @@ void GoEndSection( SwPosition * pPos )
{
// springe zum Anfang/Ende der Section
SwNodes& rNodes = pPos->nNode.GetNodes();
- USHORT nLevel = rNodes.GetSectionLevel( pPos->nNode );
+ sal_uInt16 nLevel = rNodes.GetSectionLevel( pPos->nNode );
if( pPos->nNode < rNodes.GetEndOfContent().StartOfSectionIndex() )
nLevel--;
do { rNodes.GoEndOfSection( &pPos->nNode ); } while( nLevel-- );
// steht jetzt auf einem EndNode, also zum vorherigen CntntNode
- if( GoPreviousNds( &pPos->nNode, TRUE ) )
+ if( GoPreviousNds( &pPos->nNode, sal_True ) )
pPos->nNode.GetNode().GetCntntNode()->MakeEndIndex( &pPos->nContent );
}
-BOOL GoInDoc( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoInDoc( SwPaM & rPam, SwMoveFn fnMove )
{
(*fnMove->fnDoc)( rPam.GetPoint() );
- return TRUE;
+ return sal_True;
}
-BOOL GoInSection( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoInSection( SwPaM & rPam, SwMoveFn fnMove )
{
(*fnMove->fnSections)( (SwPosition*)rPam.GetPoint() );
- return TRUE;
+ return sal_True;
}
-BOOL GoInNode( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoInNode( SwPaM & rPam, SwMoveFn fnMove )
{
- SwCntntNode *pNd = (*fnMove->fnNds)( &rPam.GetPoint()->nNode, TRUE );
+ SwCntntNode *pNd = (*fnMove->fnNds)( &rPam.GetPoint()->nNode, sal_True );
if( pNd )
rPam.GetPoint()->nContent.Assign( pNd,
::GetSttOrEnd( fnMove == fnMoveForward, *pNd ) );
@@ -1014,35 +1014,35 @@ BOOL GoInNode( SwPaM & rPam, SwMoveFn fnMove )
}
-BOOL GoInCntnt( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoInCntnt( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CHARS ))
- return TRUE;
+ return sal_True;
return GoInNode( rPam, fnMove );
}
-BOOL GoInCntntCells( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoInCntntCells( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CELLS ))
- return TRUE;
+ return sal_True;
return GoInNode( rPam, fnMove );
}
-BOOL GoInCntntSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoInCntntSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CHARS | CRSR_SKIP_HIDDEN ) )
- return TRUE;
+ return sal_True;
return GoInNode( rPam, fnMove );
}
-BOOL GoInCntntCellsSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoInCntntCellsSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CELLS | CRSR_SKIP_HIDDEN ) )
- return TRUE;
+ return sal_True;
return GoInNode( rPam, fnMove );
}
@@ -1051,7 +1051,7 @@ BOOL GoInCntntCellsSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
// --------- Funktionsdefinitionen fuer die SwCrsrShell --------------
-BOOL GoPrevPara( SwPaM & rPam, SwPosPara aPosPara )
+sal_Bool GoPrevPara( SwPaM & rPam, SwPosPara aPosPara )
{
if( rPam.Move( fnMoveBackward, fnGoNode ) )
{
@@ -1060,13 +1060,13 @@ BOOL GoPrevPara( SwPaM & rPam, SwPosPara aPosPara )
SwCntntNode * pNd = rPos.nNode.GetNode().GetCntntNode();
rPos.nContent.Assign( pNd,
::GetSttOrEnd( aPosPara == fnMoveForward, *pNd ) );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL GoCurrPara( SwPaM & rPam, SwPosPara aPosPara )
+sal_Bool GoCurrPara( SwPaM & rPam, SwPosPara aPosPara )
{
SwPosition& rPos = *rPam.GetPoint();
SwCntntNode * pNd = rPos.nNode.GetNode().GetCntntNode();
@@ -1078,24 +1078,24 @@ BOOL GoCurrPara( SwPaM & rPam, SwPosPara aPosPara )
if( nOld != nNew )
{
rPos.nContent.Assign( pNd, nNew );
- return TRUE;
+ return sal_True;
}
}
// den Node noch etwas bewegen ( auf den naechsten/vorh. CntntNode)
if( ( aPosPara==fnParaStart && 0 != ( pNd =
- GoPreviousNds( &rPos.nNode, TRUE ))) ||
+ GoPreviousNds( &rPos.nNode, sal_True ))) ||
( aPosPara==fnParaEnd && 0 != ( pNd =
- GoNextNds( &rPos.nNode, TRUE ))) )
+ GoNextNds( &rPos.nNode, sal_True ))) )
{
rPos.nContent.Assign( pNd,
::GetSttOrEnd( aPosPara == fnMoveForward, *pNd ));
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL GoNextPara( SwPaM & rPam, SwPosPara aPosPara )
+sal_Bool GoNextPara( SwPaM & rPam, SwPosPara aPosPara )
{
if( rPam.Move( fnMoveForward, fnGoNode ) )
{
@@ -1104,14 +1104,14 @@ BOOL GoNextPara( SwPaM & rPam, SwPosPara aPosPara )
SwCntntNode * pNd = rPos.nNode.GetNode().GetCntntNode();
rPos.nContent.Assign( pNd,
::GetSttOrEnd( aPosPara == fnMoveForward, *pNd ) );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL GoCurrSection( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoCurrSection( SwPaM & rPam, SwMoveFn fnMove )
{
SwPosition& rPos = *rPam.GetPoint();
SwPosition aSavePos( rPos ); // eine Vergleichsposition
@@ -1119,10 +1119,10 @@ BOOL GoCurrSection( SwPaM & rPam, SwMoveFn fnMove )
(rNds.*fnMove->fnSection)( &rPos.nNode );
SwCntntNode *pNd;
if( 0 == ( pNd = rPos.nNode.GetNode().GetCntntNode()) &&
- 0 == ( pNd = (*fnMove->fnNds)( &rPos.nNode, TRUE )) )
+ 0 == ( pNd = (*fnMove->fnNds)( &rPos.nNode, sal_True )) )
{
rPos = aSavePos; // Cusror nicht veraendern
- return FALSE;
+ return sal_False;
}
rPos.nContent.Assign( pNd,
@@ -1131,7 +1131,7 @@ BOOL GoCurrSection( SwPaM & rPam, SwMoveFn fnMove )
}
-BOOL GoNextSection( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoNextSection( SwPaM & rPam, SwMoveFn fnMove )
{
SwPosition& rPos = *rPam.GetPoint();
SwPosition aSavePos( rPos ); // eine Vergleichsposition
@@ -1142,17 +1142,17 @@ BOOL GoNextSection( SwPaM & rPam, SwMoveFn fnMove )
if( !GoInCntnt( rPam, fnMoveForward ) )
{
rPos = aSavePos; // Cusror nicht veraendern
- return FALSE;
+ return sal_False;
}
(rNds.*fnMove->fnSection)( &rPos.nNode );
SwCntntNode *pNd = rPos.nNode.GetNode().GetCntntNode();
rPos.nContent.Assign( pNd,
::GetSttOrEnd( fnMove == fnMoveForward, *pNd ) );
- return TRUE;
+ return sal_True;
}
-BOOL GoPrevSection( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoPrevSection( SwPaM & rPam, SwMoveFn fnMove )
{
SwPosition& rPos = *rPam.GetPoint();
SwPosition aSavePos( rPos ); // eine Vergleichsposition
@@ -1163,13 +1163,13 @@ BOOL GoPrevSection( SwPaM & rPam, SwMoveFn fnMove )
if( !GoInCntnt( rPam, fnMoveBackward ))
{
rPos = aSavePos; // Cusror nicht veraendern
- return FALSE;
+ return sal_False;
}
(rNds.*fnMove->fnSection)( &rPos.nNode );
SwCntntNode *pNd = rPos.nNode.GetNode().GetCntntNode();
rPos.nContent.Assign( pNd,
::GetSttOrEnd( fnMove == fnMoveForward, *pNd ));
- return TRUE;
+ return sal_True;
}
// #111827#
@@ -1221,7 +1221,7 @@ String SwPaM::GetTxt() const
return aResult;
}
-BOOL SwPaM::Overlap(const SwPaM & a, const SwPaM & b)
+sal_Bool SwPaM::Overlap(const SwPaM & a, const SwPaM & b)
{
return !(*b.End() <= *a.Start() || *a.End() <= *b.End());
}
@@ -1240,7 +1240,7 @@ void SwPaM::InvalidatePaM()
}
}
-BOOL SwPaM::LessThan(const SwPaM & a, const SwPaM & b)
+sal_Bool SwPaM::LessThan(const SwPaM & a, const SwPaM & b)
{
return (*a.Start() < *b.Start()) || (*a.Start() == *b.Start() && *a.End() < *b.End());
}
diff --git a/sw/source/core/crsr/paminit.cxx b/sw/source/core/crsr/paminit.cxx
index 56f497215f91..37bd63fe224d 100644
--- a/sw/source/core/crsr/paminit.cxx
+++ b/sw/source/core/crsr/paminit.cxx
@@ -75,9 +75,9 @@ SwPosSection fnSectionStart = &aFwrd;
SwPosSection fnSectionEnd = &aBwrd;
// Travelling in Tabellen
-BOOL GotoPrevTable( SwPaM&, SwPosTable, BOOL bInReadOnly );
-BOOL GotoCurrTable( SwPaM&, SwPosTable, BOOL bInReadOnly );
-BOOL GotoNextTable( SwPaM&, SwPosTable, BOOL bInReadOnly );
+sal_Bool GotoPrevTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
+sal_Bool GotoCurrTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
+sal_Bool GotoNextTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
SwWhichTable fnTablePrev = &GotoPrevTable;
SwWhichTable fnTableCurr = &GotoCurrTable;
@@ -86,10 +86,10 @@ SwPosTable fnTableStart = &aFwrd;
SwPosTable fnTableEnd = &aBwrd;
// Travelling in Bereichen
-BOOL GotoPrevRegion( SwPaM&, SwPosRegion, BOOL bInReadOnly );
-BOOL GotoCurrRegion( SwPaM&, SwPosRegion, BOOL bInReadOnly );
-BOOL GotoCurrRegionAndSkip( SwPaM&, SwPosRegion, BOOL bInReadOnly );
-BOOL GotoNextRegion( SwPaM&, SwPosRegion, BOOL bInReadOnly );
+sal_Bool GotoPrevRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
+sal_Bool GotoCurrRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
+sal_Bool GotoCurrRegionAndSkip( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
+sal_Bool GotoNextRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
SwWhichRegion fnRegionPrev = &GotoPrevRegion;
SwWhichRegion fnRegionCurr = &GotoCurrRegion;
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 7637df0a67b4..96211aaadf77 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -67,21 +67,21 @@
using namespace ::com::sun::star::i18n;
-static const USHORT coSrchRplcThreshold = 60000;
+static const sal_uInt16 coSrchRplcThreshold = 60000;
struct _PercentHdl
{
SwDocShell* pDSh;
- ULONG nActPos;
- BOOL bBack, bNodeIdx;
+ sal_uLong nActPos;
+ sal_Bool bBack, bNodeIdx;
- _PercentHdl( ULONG nStt, ULONG nEnd, SwDocShell* pSh )
+ _PercentHdl( sal_uLong nStt, sal_uLong nEnd, SwDocShell* pSh )
: pDSh( pSh )
{
nActPos = nStt;
if( 0 != ( bBack = (nStt > nEnd )) )
{
- ULONG n = nStt; nStt = nEnd; nEnd = n;
+ sal_uLong n = nStt; nStt = nEnd; nEnd = n;
}
::StartProgress( STR_STATSTR_SEARCH, nStt, nEnd, 0 );
}
@@ -89,35 +89,35 @@ struct _PercentHdl
_PercentHdl( const SwPaM& rPam )
: pDSh( (SwDocShell*)rPam.GetDoc()->GetDocShell() )
{
- ULONG nStt, nEnd;
+ sal_uLong nStt, nEnd;
if( rPam.GetPoint()->nNode == rPam.GetMark()->nNode )
{
- bNodeIdx = FALSE;
+ bNodeIdx = sal_False;
nStt = rPam.GetMark()->nContent.GetIndex();
nEnd = rPam.GetPoint()->nContent.GetIndex();
}
else
{
- bNodeIdx = TRUE;
+ bNodeIdx = sal_True;
nStt = rPam.GetMark()->nNode.GetIndex();
nEnd = rPam.GetPoint()->nNode.GetIndex();
}
nActPos = nStt;
if( 0 != ( bBack = (nStt > nEnd )) )
{
- ULONG n = nStt; nStt = nEnd; nEnd = n;
+ sal_uLong n = nStt; nStt = nEnd; nEnd = n;
}
::StartProgress( STR_STATSTR_SEARCH, nStt, nEnd, pDSh );
}
~_PercentHdl() { ::EndProgress( pDSh ); }
- void NextPos( ULONG nPos ) const
+ void NextPos( sal_uLong nPos ) const
{ ::SetProgressState( bBack ? nActPos - nPos : nPos, pDSh ); }
void NextPos( SwPosition& rPos ) const
{
- ULONG nPos;
+ sal_uLong nPos;
if( bNodeIdx )
nPos = rPos.nNode.GetIndex();
else
@@ -159,12 +159,12 @@ bool SwCursor::IsReadOnlyAvailable() const
return false;
}
-BOOL SwCursor::IsSkipOverHiddenSections() const
+sal_Bool SwCursor::IsSkipOverHiddenSections() const
{
- return TRUE;
+ return sal_True;
}
-BOOL SwCursor::IsSkipOverProtectSections() const
+sal_Bool SwCursor::IsSkipOverProtectSections() const
{
return !IsReadOnlyAvailable();
}
@@ -201,7 +201,7 @@ _SwCursor_SavePos* SwCursor::CreateNewSavePos() const
// stelle fest, ob sich der Point ausserhalb des Content-Bereichs
// vom Nodes-Array befindet
-BOOL SwCursor::IsNoCntnt() const
+sal_Bool SwCursor::IsNoCntnt() const
{
return GetPoint()->nNode.GetIndex() <
GetDoc()->GetNodes().GetEndOfExtras().GetIndex();
@@ -221,7 +221,7 @@ bool SwTableCursor::IsSelOvrCheck(int eFlags)
&& HasMark() )
{
SwNodeIndex aOldPos( rNds, GetSavePos()->nNode );
- if( !CheckNodesRange( aOldPos, GetPoint()->nNode, TRUE ))
+ if( !CheckNodesRange( aOldPos, GetPoint()->nNode, sal_True ))
{
GetPoint()->nNode = aOldPos;
GetPoint()->nContent.Assign( GetCntntNode(), GetSavePos()->nCntnt );
@@ -231,17 +231,17 @@ bool SwTableCursor::IsSelOvrCheck(int eFlags)
return SwCursor::IsSelOvrCheck(eFlags);
}
-BOOL SwCursor::IsSelOvr( int eFlags )
+sal_Bool SwCursor::IsSelOvr( int eFlags )
{
SwDoc* pDoc = GetDoc();
SwNodes& rNds = pDoc->GetNodes();
- BOOL bSkipOverHiddenSections = IsSkipOverHiddenSections();
- BOOL bSkipOverProtectSections = IsSkipOverProtectSections();
+ sal_Bool bSkipOverHiddenSections = IsSkipOverHiddenSections();
+ sal_Bool bSkipOverProtectSections = IsSkipOverProtectSections();
if ( IsSelOvrCheck( eFlags ) )
{
- return TRUE;
+ return sal_True;
}
// neu: Bereiche ueberpruefen
@@ -261,7 +261,7 @@ BOOL SwCursor::IsSelOvr( int eFlags )
{
// dann wars das schon
RestoreSavePos();
- return TRUE;
+ return sal_True;
}
// dann setze den Cursor auf die neue Position:
@@ -279,14 +279,14 @@ BOOL SwCursor::IsSelOvr( int eFlags )
}
int bIsValidPos = 0 != pCNd;
- BOOL bValidNodesRange = bIsValidPos &&
- ::CheckNodesRange( rPtIdx, aIdx, TRUE );
+ sal_Bool bValidNodesRange = bIsValidPos &&
+ ::CheckNodesRange( rPtIdx, aIdx, sal_True );
if( !bValidNodesRange )
{
rPtIdx = pSavePos->nNode;
if( 0 == ( pCNd = rPtIdx.GetNode().GetCntntNode() ) )
{
- bIsValidPos = FALSE;
+ bIsValidPos = sal_False;
nCntntPos = 0;
rPtIdx = aIdx;
if( 0 == ( pCNd = rPtIdx.GetNode().GetCntntNode() ) )
@@ -303,32 +303,32 @@ BOOL SwCursor::IsSelOvr( int eFlags )
GetPoint()->nContent.Assign( pCNd, nTmpPos );
if( !bIsValidPos || !bValidNodesRange ||
// sollten wir in einer Tabelle gelandet sein?
- IsInProtectTable( TRUE ) )
- return TRUE;
+ IsInProtectTable( sal_True ) )
+ return sal_True;
}
// oder sollte eine geschuetzte Section innerhalb der Selektion liegen?
if( HasMark() && bSkipOverProtectSections)
{
- ULONG nSttIdx = GetMark()->nNode.GetIndex(),
+ sal_uLong nSttIdx = GetMark()->nNode.GetIndex(),
nEndIdx = GetPoint()->nNode.GetIndex();
if( nEndIdx <= nSttIdx )
{
- ULONG nTmp = nSttIdx;
+ sal_uLong nTmp = nSttIdx;
nSttIdx = nEndIdx;
nEndIdx = nTmp;
}
const SwSectionFmts& rFmts = pDoc->GetSections();
- for( USHORT n = 0; n < rFmts.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFmts.Count(); ++n )
{
const SwSectionFmt* pFmt = rFmts[n];
const SvxProtectItem& rProtect = pFmt->GetProtect();
if( rProtect.IsCntntProtected() )
{
- const SwFmtCntnt& rCntnt = pFmt->GetCntnt(FALSE);
+ const SwFmtCntnt& rCntnt = pFmt->GetCntnt(sal_False);
ASSERT( rCntnt.GetCntntIdx(), "wo ist der SectionNode?" );
- ULONG nIdx = rCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nIdx = rCntnt.GetCntntIdx()->GetIndex();
if( nSttIdx <= nIdx && nEndIdx >= nIdx )
{
// ist es keine gelinkte Section, dann kann sie auch
@@ -337,7 +337,7 @@ BOOL SwCursor::IsSelOvr( int eFlags )
if( CONTENT_SECTION == rSect.GetType() )
{
RestoreSavePos();
- return TRUE;
+ return sal_True;
}
}
}
@@ -389,7 +389,7 @@ BOOL SwCursor::IsSelOvr( int eFlags )
GetPoint()->nContent.Assign( pCNd, nTmpPos );
// sollten wir in einer Tabelle gelandet sein?
- if( IsInProtectTable( TRUE ) )
+ if( IsInProtectTable( sal_True ) )
pFrm = 0;
}
}
@@ -398,7 +398,7 @@ BOOL SwCursor::IsSelOvr( int eFlags )
{
DeleteMark();
RestoreSavePos();
- return TRUE; // ohne Frames geht gar nichts!
+ return sal_True; // ohne Frames geht gar nichts!
}
}
@@ -407,19 +407,19 @@ BOOL SwCursor::IsSelOvr( int eFlags )
{
DeleteMark();
RestoreSavePos();
- return TRUE;
+ return sal_True;
}
if( !HasMark() )
- return FALSE;
+ return sal_False;
//JP 19.08.98: teste mal auf ungueltige Selektion - sprich ueber
// GrundSections:
- if( !::CheckNodesRange( GetMark()->nNode, GetPoint()->nNode, TRUE ))
+ if( !::CheckNodesRange( GetMark()->nNode, GetPoint()->nNode, sal_True ))
{
DeleteMark();
RestoreSavePos();
- return TRUE; // ohne Frames geht gar nichts!
+ return sal_True; // ohne Frames geht gar nichts!
}
const SwTableNode* pPtNd = pNd->FindTableNode();
@@ -429,21 +429,21 @@ BOOL SwCursor::IsSelOvr( int eFlags )
{
DeleteMark();
RestoreSavePos();
- return TRUE; // ohne Frames geht gar nichts!
+ return sal_True; // ohne Frames geht gar nichts!
}
const SwTableNode* pMrkNd = pNd->FindTableNode();
// beide in keinem oder beide im gleichen TableNode
if( ( !pMrkNd && !pPtNd ) || pPtNd == pMrkNd )
- return FALSE;
+ return sal_False;
// in unterschiedlichen Tabellen oder nur Mark in der Tabelle
if( ( pPtNd && pMrkNd ) || pMrkNd )
{ // dann lasse das nicht zu, alte Pos zurueck
RestoreSavePos();
// Crsr bleibt an der alten Position
- return TRUE;
+ return sal_True;
}
// ACHTUNG: dieses kann nicht im TableMode geschehen !!
@@ -451,14 +451,14 @@ BOOL SwCursor::IsSelOvr( int eFlags )
{
if( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS & eFlags )
{
- BOOL bSelTop = GetPoint()->nNode.GetIndex() <
+ sal_Bool bSelTop = GetPoint()->nNode.GetIndex() <
(( nsSwCursorSelOverFlags::SELOVER_TOGGLE & eFlags ) ? pSavePos->nNode
: GetMark()->nNode.GetIndex());
do {
// in Schleife fuer Tabelle hinter Tabelle
- ULONG nSEIdx = pPtNd->EndOfSectionIndex();
- ULONG nSttEndTbl = nSEIdx + 1; // dflt. Sel. nach unten
+ sal_uLong nSEIdx = pPtNd->EndOfSectionIndex();
+ sal_uLong nSttEndTbl = nSEIdx + 1; // dflt. Sel. nach unten
if( bSelTop ) // Sel. nach oben
nSttEndTbl = rNds[ nSEIdx ]->StartOfSectionIndex() - 1;
@@ -471,8 +471,8 @@ BOOL SwCursor::IsSelOvr( int eFlags )
{
// die lassen wir zu:
pMyNd = bSelTop
- ? rNds.GoPrevSection( &GetPoint()->nNode,TRUE,FALSE )
- : rNds.GoNextSection( &GetPoint()->nNode,TRUE,FALSE );
+ ? rNds.GoPrevSection( &GetPoint()->nNode,sal_True,sal_False )
+ : rNds.GoNextSection( &GetPoint()->nNode,sal_True,sal_False );
/* #i12312# Handle failure of Go{Prev|Next}Section */
if ( 0 == pMyNd)
@@ -484,7 +484,7 @@ BOOL SwCursor::IsSelOvr( int eFlags )
if( pMyNd->IsCntntNode() && // ist es ein ContentNode ??
::CheckNodesRange( GetMark()->nNode,
- GetPoint()->nNode, TRUE ))
+ GetPoint()->nNode, sal_True ))
{
// TABLE IN TABLE
const SwTableNode* pOuterTableNd = pMyNd->FindTableNode();
@@ -495,21 +495,21 @@ BOOL SwCursor::IsSelOvr( int eFlags )
SwCntntNode* pCNd = (SwCntntNode*)pMyNd;
xub_StrLen nTmpPos = bSelTop ? pCNd->Len() : 0;
GetPoint()->nContent.Assign( pCNd, nTmpPos );
- return FALSE;
+ return sal_False;
}
}
if( bSelTop
? ( !pMyNd->IsEndNode() || 0 == ( pPtNd = pMyNd->FindTableNode() ))
: 0 == ( pPtNd = pMyNd->GetTableNode() ))
break;
- } while( TRUE );
+ } while( sal_True );
}
// dann verbleibe auf der alten Position
RestoreSavePos();
- return TRUE; // Crsr bleibt an der alten Position
+ return sal_True; // Crsr bleibt an der alten Position
}
- return FALSE; // was bleibt noch ??
+ return sal_False; // was bleibt noch ??
}
#if defined( UNX )
@@ -519,20 +519,20 @@ BOOL SwCursor::IsSelOvr( int eFlags )
#endif
-BOOL SwCursor::IsInProtectTable( BOOL bMove, BOOL bChgCrsr )
+sal_Bool SwCursor::IsInProtectTable( sal_Bool bMove, sal_Bool bChgCrsr )
{
SwCntntNode* pCNd = GetCntntNode();
if( !pCNd )
- return FALSE;
+ return sal_False;
// No table, no protected cell:
const SwTableNode* pTableNode = pCNd->FindTableNode();
if ( !pTableNode )
- return FALSE;
+ return sal_False;
// Current position == last save position?
if ( pSavePos->nNode == GetPoint()->nNode.GetIndex() )
- return FALSE;
+ return sal_False;
// Check for convered cell:
bool bInCoveredCell = false;
@@ -547,11 +547,11 @@ BOOL SwCursor::IsInProtectTable( BOOL bMove, BOOL bChgCrsr )
{
// Position not protected?
if ( !pCNd->IsProtect() )
- return FALSE;
+ return sal_False;
// Cursor in protected cells allowed?
if ( IsReadOnlyAvailable() )
- return FALSE;
+ return sal_False;
}
// If we reach this point, we are in a protected or covered table cell!
@@ -561,7 +561,7 @@ BOOL SwCursor::IsInProtectTable( BOOL bMove, BOOL bChgCrsr )
if( bChgCrsr )
// restore the last save position
RestoreSavePos();
- return TRUE; // Crsr bleibt an der alten Position
+ return sal_True; // Crsr bleibt an der alten Position
}
// wir stehen in einer geschuetzten TabellenZelle
@@ -578,7 +578,7 @@ BOOL SwCursor::IsInProtectTable( BOOL bMove, BOOL bChgCrsr )
#else
SwNodeIndex aCellStt( *GetNode()->FindTableBoxStartNode()->EndOfSectionNode(), 1 );
#endif
- BOOL bProt = TRUE;
+ sal_Bool bProt = sal_True;
GoNextCell:
do {
if( !IDX.GetNode().IsStartNode() )
@@ -602,7 +602,7 @@ SetNextCrsr:
if( pTmpCNd )
{
GetPoint()->nContent.Assign( pTmpCNd, 0 );
- return FALSE;
+ return sal_False;
}
return IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
@@ -619,12 +619,12 @@ SetNextCrsr:
#if defined( UNX )
delete pCellStt;
#endif
- return TRUE; // Crsr bleibt an der alten Position
+ return sal_True; // Crsr bleibt an der alten Position
}
else if( pNd->IsTableNode() && IDX++ )
goto GoNextCell;
- bProt = FALSE; // Index steht jetzt auf einem ContentNode
+ bProt = sal_False; // Index steht jetzt auf einem ContentNode
goto SetNextCrsr;
}
@@ -639,7 +639,7 @@ SetNextCrsr:
SwNodeIndex aCellStt( *GetNode()->FindTableBoxStartNode(), -1 );
#endif
SwNode* pNd;
- BOOL bProt = TRUE;
+ sal_Bool bProt = sal_True;
GoPrevCell:
do {
if( !( pNd = &IDX.GetNode())->IsEndNode() )
@@ -663,7 +663,7 @@ SetPrevCrsr:
if( pTmpCNd )
{
GetPoint()->nContent.Assign( pTmpCNd, 0 );
- return FALSE;
+ return sal_False;
}
return IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
@@ -679,18 +679,18 @@ SetPrevCrsr:
#if defined( UNX )
delete pCellStt;
#endif
- return TRUE; // Crsr bleibt an der alten Position
+ return sal_True; // Crsr bleibt an der alten Position
}
else if( pNd->StartOfSectionNode()->IsTableNode() && IDX-- )
goto GoPrevCell;
- bProt = FALSE; // Index steht jetzt auf einem ContentNode
+ bProt = sal_False; // Index steht jetzt auf einem ContentNode
goto SetPrevCrsr;
}
}
-// TRUE: an die Position kann der Cursor gesetzt werden
-BOOL SwCursor::IsAtValidPos( BOOL bPoint ) const
+// sal_True: an die Position kann der Cursor gesetzt werden
+sal_Bool SwCursor::IsAtValidPos( sal_Bool bPoint ) const
{
const SwDoc* pDoc = GetDoc();
const SwPosition* pPos = bPoint ? GetPoint() : GetMark();
@@ -699,23 +699,23 @@ BOOL SwCursor::IsAtValidPos( BOOL bPoint ) const
if( pNd->IsCntntNode() && !((SwCntntNode*)pNd)->GetFrm() &&
!dynamic_cast<const SwUnoCrsr*>(this) )
{
- return FALSE;
+ return sal_False;
}
//JP 28.10.97: Bug 45129 - im UI-ReadOnly ist alles erlaubt
if( !pDoc->GetDocShell() || !pDoc->GetDocShell()->IsReadOnlyUI() )
- return TRUE;
+ return sal_True;
- BOOL bCrsrInReadOnly = IsReadOnlyAvailable();
+ sal_Bool bCrsrInReadOnly = IsReadOnlyAvailable();
if( !bCrsrInReadOnly && pNd->IsProtect() )
- return FALSE;
+ return sal_False;
const SwSectionNode* pSectNd = pNd->FindSectionNode();
if( pSectNd && (pSectNd->GetSection().IsHiddenFlag() ||
( !bCrsrInReadOnly && pSectNd->GetSection().IsProtectFlag() )))
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
void SwCursor::SaveTblBoxCntnt( const SwPosition* ) {}
@@ -737,22 +737,22 @@ SwMoveFnCollection* SwCursor::MakeFindRange( SwDocPositions nStart,
}
-ULONG lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
+sal_uLong lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
SwMoveFn fnMove, SwCursor*& pFndRing,
SwPaM& aRegion, FindRanges eFndRngs,
- BOOL bInReadOnly, BOOL& bCancel )
+ sal_Bool bInReadOnly, sal_Bool& bCancel )
{
SwDoc* pDoc = pCurCrsr->GetDoc();
- BOOL bDoesUndo = pDoc->DoesUndo();
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
int nFndRet = 0;
- ULONG nFound = 0;
- int bSrchBkwrd = fnMove == fnMoveBackward, bEnde = FALSE;
+ sal_uLong nFound = 0;
+ int bSrchBkwrd = fnMove == fnMoveBackward, bEnde = sal_False;
SwPaM *pTmpCrsr = pCurCrsr, *pSaveCrsr = pCurCrsr;
// only create progress-bar for ShellCrsr
bool bIsUnoCrsr = 0 != dynamic_cast<SwUnoCrsr*>(pCurCrsr);
_PercentHdl* pPHdl = 0;
- USHORT nCrsrCnt = 0;
+ sal_uInt16 nCrsrCnt = 0;
if( FND_IN_SEL & eFndRngs )
{
while( pCurCrsr != ( pTmpCrsr = (SwPaM*)pTmpCrsr->GetNext() ))
@@ -802,7 +802,7 @@ ULONG lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
if( !( eFndRngs & FND_IN_SELALL) )
{
- bEnde = TRUE;
+ bEnde = sal_True;
break;
}
@@ -813,14 +813,14 @@ ULONG lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
if( RET_YES == nRet )
{
pDoc->DelAllUndoObj();
- pDoc->DoUndo( FALSE );
+ pDoc->DoUndo( sal_False );
}
else
{
- bEnde = TRUE;
+ bEnde = sal_True;
if(RET_CANCEL == nRet)
{
- bCancel = TRUE;
+ bCancel = sal_True;
//unwind() ??
}
break;
@@ -867,7 +867,7 @@ int lcl_MakeSelFwrd( const SwNode& rSttNd, const SwNode& rEndNd,
SwPaM& rPam, int bFirst )
{
if( rSttNd.GetIndex() + 1 == rEndNd.GetIndex() )
- return FALSE;
+ return sal_False;
SwNodes& rNds = rPam.GetDoc()->GetNodes();
rPam.DeleteMark();
@@ -877,18 +877,18 @@ int lcl_MakeSelFwrd( const SwNode& rSttNd, const SwNode& rEndNd,
rPam.GetPoint()->nNode = rSttNd;
pCNd = rNds.GoNext( &rPam.GetPoint()->nNode );
if( !pCNd )
- return FALSE;
+ return sal_False;
pCNd->MakeStartIndex( &rPam.GetPoint()->nContent );
}
else if( rSttNd.GetIndex() > rPam.GetPoint()->nNode.GetIndex() ||
rPam.GetPoint()->nNode.GetIndex() >= rEndNd.GetIndex() )
- return FALSE; // steht nicht in dieser Section
+ return sal_False; // steht nicht in dieser Section
rPam.SetMark();
rPam.GetPoint()->nNode = rEndNd;
pCNd = rNds.GoPrevious( &rPam.GetPoint()->nNode );
if( !pCNd )
- return FALSE;
+ return sal_False;
pCNd->MakeEndIndex( &rPam.GetPoint()->nContent );
return *rPam.GetMark() < *rPam.GetPoint();
@@ -899,7 +899,7 @@ int lcl_MakeSelBkwrd( const SwNode& rSttNd, const SwNode& rEndNd,
SwPaM& rPam, int bFirst )
{
if( rEndNd.GetIndex() + 1 == rSttNd.GetIndex() )
- return FALSE;
+ return sal_False;
SwNodes& rNds = rPam.GetDoc()->GetNodes();
rPam.DeleteMark();
@@ -909,18 +909,18 @@ int lcl_MakeSelBkwrd( const SwNode& rSttNd, const SwNode& rEndNd,
rPam.GetPoint()->nNode = rSttNd;
pCNd = rNds.GoPrevious( &rPam.GetPoint()->nNode );
if( !pCNd )
- return FALSE;
+ return sal_False;
pCNd->MakeEndIndex( &rPam.GetPoint()->nContent );
}
else if( rEndNd.GetIndex() > rPam.GetPoint()->nNode.GetIndex() ||
rPam.GetPoint()->nNode.GetIndex() >= rSttNd.GetIndex() )
- return FALSE; // steht nicht in dieser Section
+ return sal_False; // steht nicht in dieser Section
rPam.SetMark();
rPam.GetPoint()->nNode = rEndNd;
pCNd = rNds.GoNext( &rPam.GetPoint()->nNode );
if( !pCNd )
- return FALSE;
+ return sal_False;
pCNd->MakeStartIndex( &rPam.GetPoint()->nContent );
return *rPam.GetPoint() < *rPam.GetMark();
@@ -930,20 +930,20 @@ int lcl_MakeSelBkwrd( const SwNode& rSttNd, const SwNode& rEndNd,
// diese Methode "sucht" fuer alle Anwendungsfaelle, denn in SwFindParas
// steht immer die richtigen Parameter und die entsprechende Find-Methode
-ULONG SwCursor::FindAll( SwFindParas& rParas,
+sal_uLong SwCursor::FindAll( SwFindParas& rParas,
SwDocPositions nStart, SwDocPositions nEnde,
- FindRanges eFndRngs, BOOL& bCancel )
+ FindRanges eFndRngs, sal_Bool& bCancel )
{
- bCancel = FALSE;
+ bCancel = sal_False;
SwCrsrSaveState aSaveState( *this );
// Region erzeugen, ohne das diese in den Ring aufgenommen wird !
SwPaM aRegion( *GetPoint() );
SwMoveFn fnMove = MakeFindRange( nStart, nEnde, &aRegion );
- ULONG nFound = 0;
+ sal_uLong nFound = 0;
int bMvBkwrd = fnMove == fnMoveBackward;
- BOOL bInReadOnly = IsReadOnlyAvailable();
+ sal_Bool bInReadOnly = IsReadOnlyAvailable();
SwCursor* pFndRing = 0;
SwNodes& rNds = GetDoc()->GetNodes();
@@ -1038,8 +1038,8 @@ ULONG SwCursor::FindAll( SwFindParas& rParas,
: rNds.GetEndOfPostIts().StartOfSectionNode();
if( bMvBkwrd
- ? lcl_MakeSelBkwrd( rNds.GetEndOfContent(), *pSttNd,*this, FALSE )
- : lcl_MakeSelFwrd( *pSttNd, rNds.GetEndOfContent(), *this, FALSE ))
+ ? lcl_MakeSelBkwrd( rNds.GetEndOfContent(), *pSttNd,*this, sal_False )
+ : lcl_MakeSelFwrd( *pSttNd, rNds.GetEndOfContent(), *this, sal_False ))
{
nFound = lcl_FindSelection( rParas, this, fnMove, pFndRing,
aRegion, eFndRngs, bInReadOnly, bCancel );
@@ -1093,7 +1093,7 @@ ULONG SwCursor::FindAll( SwFindParas& rParas,
void SwCursor::FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const
{
- BOOL bIsStart = TRUE;
+ sal_Bool bIsStart = sal_True;
SwCntntNode* pCNd = 0;
SwNodes& rNds = GetDoc()->GetNodes();
@@ -1107,18 +1107,18 @@ void SwCursor::FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const
case DOCPOS_END:
rPos.nNode = rNds.GetEndOfContent();
pCNd = rNds.GoPrevious( &rPos.nNode );
- bIsStart = FALSE;
+ bIsStart = sal_False;
break;
case DOCPOS_OTHERSTART:
- rPos.nNode = *rNds[ ULONG(0) ];
+ rPos.nNode = *rNds[ sal_uLong(0) ];
pCNd = rNds.GoNext( &rPos.nNode );
break;
case DOCPOS_OTHEREND:
rPos.nNode = *rNds.GetEndOfContent().StartOfSectionNode();
pCNd = rNds.GoPrevious( &rPos.nNode );
- bIsStart = FALSE;
+ bIsStart = sal_False;
break;
// case DOCPOS_CURR:
@@ -1141,49 +1141,49 @@ short SwCursor::MaxReplaceArived()
}
-BOOL SwCursor::IsStartWord( sal_Int16 nWordType ) const
+sal_Bool SwCursor::IsStartWord( sal_Int16 nWordType ) const
{
return IsStartWordWT( nWordType );
}
-BOOL SwCursor::IsEndWord( sal_Int16 nWordType ) const
+sal_Bool SwCursor::IsEndWord( sal_Int16 nWordType ) const
{
return IsEndWordWT( nWordType );
}
-BOOL SwCursor::IsInWord( sal_Int16 nWordType ) const
+sal_Bool SwCursor::IsInWord( sal_Int16 nWordType ) const
{
return IsInWordWT( nWordType );
}
-BOOL SwCursor::GoStartWord()
+sal_Bool SwCursor::GoStartWord()
{
return GoStartWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
}
-BOOL SwCursor::GoEndWord()
+sal_Bool SwCursor::GoEndWord()
{
return GoEndWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
}
-BOOL SwCursor::GoNextWord()
+sal_Bool SwCursor::GoNextWord()
{
return GoNextWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
}
-BOOL SwCursor::GoPrevWord()
+sal_Bool SwCursor::GoPrevWord()
{
return GoPrevWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
}
-BOOL SwCursor::SelectWord( const Point* pPt )
+sal_Bool SwCursor::SelectWord( const Point* pPt )
{
return SelectWordWT( WordType::ANYWORD_IGNOREWHITESPACES, pPt );
}
-BOOL SwCursor::IsStartWordWT( sal_Int16 nWordType ) const
+sal_Bool SwCursor::IsStartWordWT( sal_Int16 nWordType ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1196,9 +1196,9 @@ BOOL SwCursor::IsStartWordWT( sal_Int16 nWordType ) const
return bRet;
}
-BOOL SwCursor::IsEndWordWT( sal_Int16 nWordType ) const
+sal_Bool SwCursor::IsEndWordWT( sal_Int16 nWordType ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1212,9 +1212,9 @@ BOOL SwCursor::IsEndWordWT( sal_Int16 nWordType ) const
return bRet;
}
-BOOL SwCursor::IsInWordWT( sal_Int16 nWordType ) const
+sal_Bool SwCursor::IsInWordWT( sal_Int16 nWordType ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1223,7 +1223,7 @@ BOOL SwCursor::IsInWordWT( sal_Int16 nWordType ) const
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType,
- TRUE );
+ sal_True );
bRet = aBoundary.startPos != aBoundary.endPos &&
aBoundary.startPos <= nPtPos &&
@@ -1237,9 +1237,9 @@ BOOL SwCursor::IsInWordWT( sal_Int16 nWordType ) const
return bRet;
}
-BOOL SwCursor::IsStartEndSentence( bool bEnd ) const
+sal_Bool SwCursor::IsStartEndSentence( bool bEnd ) const
{
- BOOL bRet = bEnd ?
+ sal_Bool bRet = bEnd ?
GetCntntNode() && GetPoint()->nContent == GetCntntNode()->Len() :
GetPoint()->nContent.GetIndex() == 0;
@@ -1254,9 +1254,9 @@ BOOL SwCursor::IsStartEndSentence( bool bEnd ) const
return bRet;
}
-BOOL SwCursor::GoStartWordWT( sal_Int16 nWordType )
+sal_Bool SwCursor::GoStartWordWT( sal_Int16 nWordType )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1266,21 +1266,21 @@ BOOL SwCursor::GoStartWordWT( sal_Int16 nWordType )
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType,
- FALSE ).startPos;
+ sal_False ).startPos;
if( nPtPos < pTxtNd->GetTxt().Len() )
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SwCursor::GoEndWordWT( sal_Int16 nWordType )
+sal_Bool SwCursor::GoEndWordWT( sal_Int16 nWordType )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1290,22 +1290,22 @@ BOOL SwCursor::GoEndWordWT( sal_Int16 nWordType )
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType,
- TRUE ).endPos;
+ sal_True ).endPos;
if( nPtPos <= pTxtNd->GetTxt().Len() &&
GetPoint()->nContent.GetIndex() != nPtPos )
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SwCursor::GoNextWordWT( sal_Int16 nWordType )
+sal_Bool SwCursor::GoNextWordWT( sal_Int16 nWordType )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1321,15 +1321,15 @@ BOOL SwCursor::GoNextWordWT( sal_Int16 nWordType )
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SwCursor::GoPrevWordWT( sal_Int16 nWordType )
+sal_Bool SwCursor::GoPrevWordWT( sal_Int16 nWordType )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1348,18 +1348,18 @@ BOOL SwCursor::GoPrevWordWT( sal_Int16 nWordType )
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt )
+sal_Bool SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt )
{
SwCrsrSaveState aSave( *this );
- BOOL bRet = FALSE;
- BOOL bForward = TRUE;
+ sal_Bool bRet = sal_False;
+ sal_Bool bForward = sal_True;
DeleteMark();
SwRootFrm* pLayout;
if( pPt && 0 != (pLayout = GetDoc()->GetRootFrm()) )
@@ -1387,7 +1387,7 @@ BOOL SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt )
SetMark();
GetMark()->nContent = (xub_StrLen)aBndry.startPos;
if( !IsSelOvr() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -1413,7 +1413,7 @@ static String lcl_MaskDeletedRedlines( const SwTxtNode* pTxtNd )
const bool nShowChg = IDocumentRedlineAccess::IsShowChanges( rDoc.GetRedlineMode() );
if ( nShowChg )
{
- USHORT nAct = rDoc.GetRedlinePos( *pTxtNd, USHRT_MAX );
+ sal_uInt16 nAct = rDoc.GetRedlinePos( *pTxtNd, USHRT_MAX );
for ( ; nAct < rDoc.GetRedlineTbl().Count(); nAct++ )
{
const SwRedline* pRed = rDoc.GetRedlineTbl()[ nAct ];
@@ -1435,9 +1435,9 @@ static String lcl_MaskDeletedRedlines( const SwTxtNode* pTxtNd )
return aRes;
}
-BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
+sal_Bool SwCursor::GoSentence( SentenceMoveType eMoveType )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1465,7 +1465,7 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
sNodeText,
nPtPos, pBreakIt->GetLocale(
pTxtNd->GetLang( nPtPos ) ));
- while (nPtPos != (USHORT) -1 && ++nPtPos < sNodeText.Len()
+ while (nPtPos != (sal_uInt16) -1 && ++nPtPos < sNodeText.Len()
&& sNodeText.GetChar(nPtPos)== ' ' /*isWhiteSpace( aTxt.GetChar(nPtPos)*/ )
;
break;
@@ -1476,7 +1476,7 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
nPtPos, pBreakIt->GetLocale(
pTxtNd->GetLang( nPtPos ) ));
if (nPtPos == 0)
- return FALSE; // the previous sentence is not in this paragraph
+ return sal_False; // the previous sentence is not in this paragraph
if (nPtPos > 0)
nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
sNodeText,
@@ -1491,16 +1491,16 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SwCursor::ExpandToSentenceBorders()
+sal_Bool SwCursor::ExpandToSentenceBorders()
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
const SwTxtNode* pStartNd = Start()->nNode.GetNode().GetTxtNode();
const SwTxtNode* pEndNd = End()->nNode.GetNode().GetTxtNode();
if (pStartNd && pEndNd && pBreakIt->GetBreakIter().is())
@@ -1536,14 +1536,14 @@ BOOL SwCursor::ExpandToSentenceBorders()
bChanged = true;
}
if (bChanged && !IsSelOvr())
- bRes = TRUE;
+ bRes = sal_True;
}
return bRes;
}
-BOOL SwTableCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT /*nMode*/,
- BOOL /*bVisualAllowed*/, BOOL /*bSkipHidden*/, BOOL /*bInsertCrsr*/ )
+sal_Bool SwTableCursor::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 /*nMode*/,
+ sal_Bool /*bVisualAllowed*/, sal_Bool /*bSkipHidden*/, sal_Bool /*bInsertCrsr*/ )
{
return bLeft ? GoPrevCell( nCnt )
: GoNextCell( nCnt );
@@ -1553,7 +1553,7 @@ BOOL SwTableCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT /*nMode*/,
// calculate cursor bidi level: extracted from LeftRight()
const SwCntntFrm*
SwCursor::DoSetBidiLevelLeftRight(
- BOOL & io_rbLeft, BOOL bVisualAllowed, BOOL bInsertCrsr)
+ sal_Bool & io_rbLeft, sal_Bool bVisualAllowed, sal_Bool bInsertCrsr)
{
// calculate cursor bidi level
const SwCntntFrm* pSttFrm = NULL;
@@ -1576,7 +1576,7 @@ SwCursor::DoSetBidiLevelLeftRight(
pSttFrm = rTNd.GetFrm( &aPt, GetPoint() );
if( pSttFrm )
{
- BYTE nCrsrLevel = GetCrsrBidiLevel();
+ sal_uInt8 nCrsrLevel = GetCrsrBidiLevel();
sal_Bool bForward = ! io_rbLeft;
((SwTxtFrm*)pSttFrm)->PrepareVisualMove( nPos, nCrsrLevel,
bForward, bInsertCrsr );
@@ -1600,8 +1600,8 @@ SwCursor::DoSetBidiLevelLeftRight(
return pSttFrm;
}
-BOOL SwCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
- BOOL bVisualAllowed,BOOL bSkipHidden, BOOL bInsertCrsr )
+sal_Bool SwCursor::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
+ sal_Bool bVisualAllowed,sal_Bool bSkipHidden, sal_Bool bInsertCrsr )
{
// calculate cursor bidi level
SwNode& rNode = GetPoint()->nNode.GetNode();
@@ -1651,12 +1651,12 @@ BOOL SwCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
const long nRowSpan = pTableBox->getRowSpan();
if ( nRowSpan > 1 )
{
- pTableBox = & pTableBox->FindEndOfRowSpan( pOldTabSttNode->GetTable(), (USHORT)(pTableBox->getRowSpan() + mnRowSpanOffset ) );
+ pTableBox = & pTableBox->FindEndOfRowSpan( pOldTabSttNode->GetTable(), (sal_uInt16)(pTableBox->getRowSpan() + mnRowSpanOffset ) );
SwNodeIndex& rPtIdx = GetPoint()->nNode;
SwNodeIndex aNewIdx( *pTableBox->GetSttNd() );
rPtIdx = aNewIdx;
- GetDoc()->GetNodes().GoNextSection( &rPtIdx, FALSE, FALSE );
+ GetDoc()->GetNodes().GoNextSection( &rPtIdx, sal_False, sal_False );
SwCntntNode* pCntntNode = GetCntntNode();
if ( pCntntNode )
{
@@ -1692,7 +1692,7 @@ BOOL SwCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
SwNodeIndex aNewIdx( *pTableBox->GetSttNd() );
rPtIdx = aNewIdx;
- GetDoc()->GetNodes().GoNextSection( &rPtIdx, FALSE, FALSE );
+ GetDoc()->GetNodes().GoNextSection( &rPtIdx, sal_False, sal_False );
SwCntntNode* pCntntNode = GetCntntNode();
if ( pCntntNode )
{
@@ -1726,7 +1726,7 @@ BOOL SwCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
}
}
- return 0 == nCnt && !IsInProtectTable( TRUE ) &&
+ return 0 == nCnt && !IsInProtectTable( sal_True ) &&
!IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
}
@@ -1746,8 +1746,8 @@ void SwCursor::DoSetBidiLevelUpDown()
if( nPos && nPos < ((SwTxtNode&)rNode).GetTxt().Len() )
{
- const BYTE nCurrLevel = pSI->DirType( nPos );
- const BYTE nPrevLevel = pSI->DirType( nPos - 1 );
+ const sal_uInt8 nCurrLevel = pSI->DirType( nPos );
+ const sal_uInt8 nPrevLevel = pSI->DirType( nPos - 1 );
if ( nCurrLevel % 2 != nPrevLevel % 2 )
{
@@ -1761,7 +1761,7 @@ void SwCursor::DoSetBidiLevelUpDown()
}
}
-BOOL SwCursor::UpDown( BOOL bUp, USHORT nCnt,
+sal_Bool SwCursor::UpDown( sal_Bool bUp, sal_uInt16 nCnt,
Point* pPt, long nUpDownX )
{
SwTableCursor* pTblCrsr = dynamic_cast<SwTableCursor*>(this);
@@ -1769,15 +1769,15 @@ BOOL SwCursor::UpDown( BOOL bUp, USHORT nCnt,
// vom Tabellen Crsr Point/Mark in der gleichen Box ??
// dann stelle den Point an den Anfang der Box
- if( pTblCrsr && GetNode( TRUE )->StartOfSectionNode() ==
- GetNode( FALSE )->StartOfSectionNode() )
+ if( pTblCrsr && GetNode( sal_True )->StartOfSectionNode() ==
+ GetNode( sal_False )->StartOfSectionNode() )
{
if ( End() != GetPoint() )
Exchange();
bAdjustTableCrsr = sal_True;
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
Point aPt;
if( pPt )
aPt = *pPt;
@@ -1800,10 +1800,10 @@ BOOL SwCursor::UpDown( BOOL bUp, USHORT nCnt,
// Bei Fussnoten ist auch die Bewegung in eine andere Fussnote erlaubt.
// aber keine Selection!!
- const BOOL bChkRange = pFrm->IsInFtn() && !HasMark()
- ? FALSE : TRUE;
+ const sal_Bool bChkRange = pFrm->IsInFtn() && !HasMark()
+ ? sal_False : sal_True;
const SwPosition aOldPos( *GetPoint() );
- BOOL bInReadOnly = IsReadOnlyAvailable();
+ sal_Bool bInReadOnly = IsReadOnlyAvailable();
if ( bAdjustTableCrsr && !bUp )
{
@@ -1811,7 +1811,7 @@ BOOL SwCursor::UpDown( BOOL bUp, USHORT nCnt,
// has more than one paragraph. If we want to go down, we have to
// set the point to the last frame in the table box. This is
// only necessary if we do not already have a table selection
- const SwStartNode* pTblNd = GetNode( TRUE )->FindTableBoxStartNode();
+ const SwStartNode* pTblNd = GetNode( sal_True )->FindTableBoxStartNode();
ASSERT( pTblNd, "pTblCrsr without SwTableNode?" )
if ( pTblNd ) // safety first
@@ -1858,7 +1858,7 @@ BOOL SwCursor::UpDown( BOOL bUp, USHORT nCnt,
}
pFrm->GetCrsrOfst( GetPoint(), aPt, &eTmpState );
}
- bRet = TRUE;
+ bRet = sal_True;
}
else
*GetPoint() = aOldPos;
@@ -1869,7 +1869,7 @@ BOOL SwCursor::UpDown( BOOL bUp, USHORT nCnt,
return bRet;
}
-BOOL SwCursor::LeftRightMargin( BOOL bLeft, BOOL bAPI )
+sal_Bool SwCursor::LeftRightMargin( sal_Bool bLeft, sal_Bool bAPI )
{
Point aPt;
SwCntntFrm * pFrm = GetCntntNode()->GetFrm( &aPt, GetPoint() );
@@ -1882,9 +1882,9 @@ BOOL SwCursor::LeftRightMargin( BOOL bLeft, BOOL bAPI )
pFrm->RightMargin( this, bAPI ) );
}
-BOOL SwCursor::IsAtLeftRightMargin( BOOL bLeft, BOOL bAPI ) const
+sal_Bool SwCursor::IsAtLeftRightMargin( sal_Bool bLeft, sal_Bool bAPI ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
Point aPt;
SwCntntFrm * pFrm = GetCntntNode()->GetFrm( &aPt, GetPoint() );
if( pFrm )
@@ -1899,16 +1899,16 @@ BOOL SwCursor::IsAtLeftRightMargin( BOOL bLeft, BOOL bAPI ) const
return bRet;
}
-BOOL SwCursor::SttEndDoc( BOOL bStt )
+sal_Bool SwCursor::SttEndDoc( sal_Bool bStt )
{
SwCrsrSaveState aSave( *this );
// Springe beim Selektieren nie ueber Section-Grenzen !!
// kann der Cursor weiterverschoben werden ?
SwMoveFn fnMove = bStt ? fnMoveBackward : fnMoveForward;
- BOOL bRet = (!HasMark() || !IsNoCntnt() ) &&
+ sal_Bool bRet = (!HasMark() || !IsNoCntnt() ) &&
Move( fnMove, fnGoDoc ) &&
- !IsInProtectTable( TRUE ) &&
+ !IsInProtectTable( sal_True ) &&
!IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS |
nsSwCursorSelOverFlags::SELOVER_ENABLEREVDIREKTION );
@@ -1916,11 +1916,11 @@ BOOL SwCursor::SttEndDoc( BOOL bStt )
return bRet;
}
-BOOL SwCursor::GoPrevNextCell( BOOL bNext, USHORT nCnt )
+sal_Bool SwCursor::GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt )
{
const SwTableNode* pTblNd = GetPoint()->nNode.GetNode().FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// liegt vor dem StartNode der Cell ein weiterer EndNode, dann
// gibt es auch eine vorherige Celle
@@ -1938,7 +1938,7 @@ BOOL SwCursor::GoPrevNextCell( BOOL bNext, USHORT nCnt )
{
if ( pTableBox->getRowSpan() > 1 )
{
- pTableBox = & pTableBox->FindEndOfRowSpan( pTblNd->GetTable(), (USHORT)(pTableBox->getRowSpan() + mnRowSpanOffset) );
+ pTableBox = & pTableBox->FindEndOfRowSpan( pTblNd->GetTable(), (sal_uInt16)(pTableBox->getRowSpan() + mnRowSpanOffset) );
SwNodeIndex aNewIdx( *pTableBox->GetSttNd() );
rPtIdx = aNewIdx;
pTableBoxStartNode = rPtIdx.GetNode().FindTableBoxStartNode();
@@ -1953,7 +1953,7 @@ BOOL SwCursor::GoPrevNextCell( BOOL bNext, USHORT nCnt )
SwNodeIndex aCellIdx( *pTmpNode, bNext ? 1 : -1 );
if( (bNext && !aCellIdx.GetNode().IsStartNode()) ||
(!bNext && !aCellIdx.GetNode().IsEndNode()) )
- return FALSE;
+ return sal_False;
rPtIdx = bNext ? aCellIdx : SwNodeIndex(*aCellIdx.GetNode().StartOfSectionNode());
@@ -1971,20 +1971,20 @@ BOOL SwCursor::GoPrevNextCell( BOOL bNext, USHORT nCnt )
rPtIdx++;
if( !rPtIdx.GetNode().IsCntntNode() )
- GetDoc()->GetNodes().GoNextSection( &rPtIdx, TRUE, FALSE );
+ GetDoc()->GetNodes().GoNextSection( &rPtIdx, sal_True, sal_False );
GetPoint()->nContent.Assign( GetCntntNode(), 0 );
- return !IsInProtectTable( TRUE );
+ return !IsInProtectTable( sal_True );
}
-BOOL SwTableCursor::GotoTable( const String& /*rName*/ )
+sal_Bool SwTableCursor::GotoTable( const String& /*rName*/ )
{
- return FALSE; // invalid action
+ return sal_False; // invalid action
}
-BOOL SwCursor::GotoTable( const String& rName )
+sal_Bool SwCursor::GotoTable( const String& rName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !HasMark() )
{
SwTable* pTmpTbl = SwTable::FindTable( GetDoc()->FindTblFmtByName( rName ) );
@@ -2001,9 +2001,9 @@ BOOL SwCursor::GotoTable( const String& rName )
return bRet;
}
-BOOL SwCursor::GotoTblBox( const String& rName )
+sal_Bool SwCursor::GotoTblBox( const String& rName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTableNode* pTblNd = GetPoint()->nNode.GetNode().FindTableNode();
if( pTblNd )
{
@@ -2022,7 +2022,7 @@ BOOL SwCursor::GotoTblBox( const String& rName )
return bRet;
}
-BOOL SwCursor::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
+sal_Bool SwCursor::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
{
//JP 28.8.2001: for optimization test something before
const SwNode* pNd = &GetPoint()->nNode.GetNode();
@@ -2057,26 +2057,26 @@ BOOL SwCursor::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
// a same node type.
SwCrsrSaveState aSave( *this );
return (*fnWhichPara)( *this, fnPosPara ) &&
- !IsInProtectTable( TRUE ) &&
+ !IsInProtectTable( sal_True ) &&
!IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
}
-BOOL SwCursor::MoveSection( SwWhichSection fnWhichSect,
+sal_Bool SwCursor::MoveSection( SwWhichSection fnWhichSect,
SwPosSection fnPosSect)
{
SwCrsrSaveState aSave( *this );
return (*fnWhichSect)( *this, fnPosSect ) &&
- !IsInProtectTable( TRUE ) &&
+ !IsInProtectTable( sal_True ) &&
!IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
}
/*
- BOOL MoveTable( SwWhichTable, SwPosTable );
- BOOL MoveColumn( SwWhichColumn, SwPosColumn );
- BOOL MoveRegion( SwWhichRegion, SwPosRegion );
+ sal_Bool MoveTable( SwWhichTable, SwPosTable );
+ sal_Bool MoveColumn( SwWhichColumn, SwPosColumn );
+ sal_Bool MoveRegion( SwWhichRegion, SwPosRegion );
*/
void SwCursor::RestoreSavePos() // Point auf die SavePos setzen
@@ -2094,8 +2094,8 @@ void SwCursor::RestoreSavePos() // Point auf die SavePos setzen
SwTableCursor::SwTableCursor( const SwPosition &rPos, SwPaM* pRing )
: SwCursor( rPos, pRing, false )
{
- bParked = FALSE;
- bChg = FALSE;
+ bParked = sal_False;
+ bChg = sal_False;
nTblPtNd = 0, nTblMkNd = 0;
nTblPtCnt = 0, nTblMkCnt = 0;
}
@@ -2103,11 +2103,11 @@ SwTableCursor::SwTableCursor( const SwPosition &rPos, SwPaM* pRing )
SwTableCursor::~SwTableCursor() {}
-BOOL lcl_SeekEntry( const SwSelBoxes& rTmp, const SwStartNode* pSrch, USHORT& rFndPos )
+sal_Bool lcl_SeekEntry( const SwSelBoxes& rTmp, const SwStartNode* pSrch, sal_uInt16& rFndPos )
{
- ULONG nIdx = pSrch->GetIndex();
+ sal_uLong nIdx = pSrch->GetIndex();
- USHORT nO = rTmp.Count(), nM, nU = 0;
+ sal_uInt16 nO = rTmp.Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
@@ -2117,17 +2117,17 @@ BOOL lcl_SeekEntry( const SwSelBoxes& rTmp, const SwStartNode* pSrch, USHORT& rF
if( rTmp[ nM ]->GetSttNd() == pSrch )
{
rFndPos = nM;
- return TRUE;
+ return sal_True;
}
else if( rTmp[ nM ]->GetSttIdx() < nIdx )
nU = nM + 1;
else if( nM == 0 )
- return FALSE;
+ return sal_False;
else
nO = nM - 1;
}
}
- return FALSE;
+ return sal_False;
}
@@ -2142,10 +2142,10 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
Move( fnMoveForward );
Exchange();
Move( fnMoveForward );
- bParked = FALSE;
+ bParked = sal_False;
}
- bChg = FALSE;
+ bChg = sal_False;
// temp Kopie anlegen, damit alle Boxen, fuer die schon Cursor
// existieren, entfernt werden koennen.
@@ -2154,22 +2154,22 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
//Jetzt die Alten und die neuen abgleichen.
SwNodes& rNds = pAktCrsr->GetDoc()->GetNodes();
- USHORT nPos;
+ sal_uInt16 nPos;
const SwStartNode* pSttNd;
SwPaM* pCur = pAktCrsr;
do {
- BOOL bDel = FALSE;
+ sal_Bool bDel = sal_False;
pSttNd = pCur->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
if( !pCur->HasMark() || !pSttNd ||
pSttNd != pCur->GetMark()->nNode.GetNode().FindTableBoxStartNode() )
- bDel = TRUE;
+ bDel = sal_True;
else if( lcl_SeekEntry( aTmp, pSttNd, nPos ))
{
SwNodeIndex aIdx( *pSttNd, 1 );
const SwNode* pNd = &aIdx.GetNode();
if( !pNd->IsCntntNode() )
- pNd = rNds.GoNextSection( &aIdx, TRUE, FALSE );
+ pNd = rNds.GoNextSection( &aIdx, sal_True, sal_False );
SwPosition* pPos = pCur->GetMark();
if( pNd != &pPos->nNode.GetNode() )
@@ -2178,7 +2178,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
aIdx.Assign( *pSttNd->EndOfSectionNode(), - 1 );
if( !( pNd = &aIdx.GetNode())->IsCntntNode() )
- pNd = rNds.GoPrevSection( &aIdx, TRUE, FALSE );
+ pNd = rNds.GoPrevSection( &aIdx, sal_True, sal_False );
pPos = pCur->GetPoint();
if( pNd != &pPos->nNode.GetNode() )
@@ -2188,7 +2188,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
aTmp.Remove( nPos );
}
else
- bDel = TRUE;
+ bDel = sal_True;
pCur = (SwPaM*)pCur->GetNext();
if( bDel )
@@ -2224,7 +2224,7 @@ JP 20.07.98: der alte Code geht mit dem UNO-TableCrsr nicht
break;
const SwNode* pNd = &aIdx.GetNode();
if( !pNd->IsCntntNode() )
- pNd = rNds.GoNextSection( &aIdx, TRUE, FALSE );
+ pNd = rNds.GoNextSection( &aIdx, sal_True, sal_False );
SwPaM* pNew;
if( pAktCrsr->GetNext() == pAktCrsr && !pAktCrsr->HasMark() )
@@ -2244,7 +2244,7 @@ JP 20.07.98: der alte Code geht mit dem UNO-TableCrsr nicht
SwPosition* pPos = pNew->GetPoint();
pPos->nNode.Assign( *pSttNd->EndOfSectionNode(), - 1 );
if( !( pNd = &pPos->nNode.GetNode())->IsCntntNode() )
- pNd = rNds.GoPrevSection( &pPos->nNode, TRUE, FALSE );
+ pNd = rNds.GoPrevSection( &pPos->nNode, sal_True, sal_False );
pPos->nContent.Assign( (SwCntntNode*)pNd, ((SwCntntNode*)pNd)->Len() );
}
@@ -2257,14 +2257,14 @@ void SwTableCursor::InsertBox( const SwTableBox& rTblBox )
{
SwTableBox* pBox = (SwTableBox*)&rTblBox;
aSelBoxes.Insert( pBox );
- bChg = TRUE;
+ bChg = sal_True;
}
bool SwTableCursor::NewTableSelection()
{
bool bRet = false;
const SwNode *pStart = GetCntntNode()->FindTableBoxStartNode();
- const SwNode *pEnd = GetCntntNode(FALSE)->FindTableBoxStartNode();
+ const SwNode *pEnd = GetCntntNode(sal_False)->FindTableBoxStartNode();
if( pStart && pEnd )
{
const SwTableNode *pTableNode = pStart->FindTableNode();
@@ -2284,7 +2284,7 @@ bool SwTableCursor::NewTableSelection()
void SwTableCursor::ActualizeSelection( const SwSelBoxes &rNew )
{
- USHORT nOld = 0, nNew = 0;
+ sal_uInt16 nOld = 0, nNew = 0;
while ( nOld < aSelBoxes.Count() && nNew < rNew.Count() )
{
const SwTableBox* pPOld = *( aSelBoxes.GetData() + nOld );
@@ -2311,16 +2311,16 @@ void SwTableCursor::ActualizeSelection( const SwSelBoxes &rNew )
InsertBox( **( rNew.GetData() + nNew ) );
}
-BOOL SwTableCursor::IsCrsrMovedUpdt()
+sal_Bool SwTableCursor::IsCrsrMovedUpdt()
{
if( !IsCrsrMoved() )
- return FALSE;
+ return sal_False;
nTblMkNd = GetMark()->nNode.GetIndex();
nTblPtNd = GetPoint()->nNode.GetIndex();
nTblMkCnt = GetMark()->nContent.GetIndex();
nTblPtCnt = GetPoint()->nContent.GetIndex();
- return TRUE;
+ return sal_True;
}
@@ -2340,18 +2340,18 @@ void SwTableCursor::ParkCrsr()
GetMark()->nNode = *pNd;
GetMark()->nContent.Assign( 0, 0 );
- bChg = TRUE;
- bParked = TRUE;
+ bChg = sal_True;
+ bParked = sal_True;
}
-BOOL SwTableCursor::HasReadOnlyBoxSel() const
+sal_Bool SwTableCursor::HasReadOnlyBoxSel() const
{
- BOOL bRet = FALSE;
- for( USHORT n = aSelBoxes.Count(); n; )
+ sal_Bool bRet = sal_False;
+ for( sal_uInt16 n = aSelBoxes.Count(); n; )
if( aSelBoxes[ --n ]->GetFrmFmt()->GetProtect().IsCntntProtected() )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
return bRet;
diff --git a/sw/source/core/crsr/trvlcol.cxx b/sw/source/core/crsr/trvlcol.cxx
index 076af3be386c..92cd87889875 100644
--- a/sw/source/core/crsr/trvlcol.cxx
+++ b/sw/source/core/crsr/trvlcol.cxx
@@ -91,9 +91,9 @@ SwPosColumn fnColumnStart = &GetColumnStt;
SwPosColumn fnColumnEnd = &GetColumnEnd;
-BOOL SwCrsrShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol )
+sal_Bool SwCrsrShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !pTblCrsr )
{
SwLayoutFrm* pLayFrm = GetCurrFrm()->GetUpper();
@@ -117,11 +117,11 @@ BOOL SwCrsrShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol )
pCnt->GetCrsrOfst( pCurCrsr->GetPoint(), aPt );
- if( !pCurCrsr->IsInProtectTable( TRUE ) &&
+ if( !pCurCrsr->IsInProtectTable( sal_True ) &&
!pCurCrsr->IsSelOvr() )
{
UpdateCrsr();
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index 3edf3718eabe..e20724fe157d 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -47,21 +47,21 @@
#include <viscrs.hxx>
#include <callnk.hxx>
-BOOL SwCrsrShell::CallCrsrFN( FNCrsr fnCrsr )
+sal_Bool SwCrsrShell::CallCrsrFN( FNCrsr fnCrsr )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
SwCursor* pCrsr = getShellCrsr( true );
- BOOL bRet = (pCrsr->*fnCrsr)();
+ sal_Bool bRet = (pCrsr->*fnCrsr)();
if( bRet )
UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE |
SwCrsrShell::READONLY );
return bRet;
}
-BOOL SwCursor::GotoFtnTxt()
+sal_Bool SwCursor::GotoFtnTxt()
{
// springe aus dem Content zur Fussnote
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTxtNode* pTxtNd = GetPoint()->nNode.GetNode().GetTxtNode();
SwTxtAttr *const pFtn( (pTxtNd)
@@ -75,7 +75,7 @@ BOOL SwCursor::GotoFtnTxt()
SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection(
&GetPoint()->nNode,
- TRUE, !IsReadOnlyAvailable() );
+ sal_True, !IsReadOnlyAvailable() );
if( pCNd )
{
GetPoint()->nContent.Assign( pCNd, 0 );
@@ -86,9 +86,9 @@ BOOL SwCursor::GotoFtnTxt()
return bRet;
}
-BOOL SwCrsrShell::GotoFtnTxt()
+sal_Bool SwCrsrShell::GotoFtnTxt()
{
- BOOL bRet = CallCrsrFN( &SwCursor::GotoFtnTxt );
+ sal_Bool bRet = CallCrsrFN( &SwCursor::GotoFtnTxt );
if( !bRet )
{
SwTxtNode* pTxtNd = _GetCrsr() ?
@@ -134,7 +134,7 @@ BOOL SwCrsrShell::GotoFtnTxt()
}
-BOOL SwCursor::GotoFtnAnchor()
+sal_Bool SwCursor::GotoFtnAnchor()
{
// springe aus der Fussnote zum Anker
const SwNode* pSttNd = GetNode()->FindFootnoteStartNode();
@@ -143,7 +143,7 @@ BOOL SwCursor::GotoFtnAnchor()
// durchsuche alle Fussnoten im Dokument nach diesem StartIndex
const SwTxtFtn* pTxtFtn;
const SwFtnIdxs& rFtnArr = pSttNd->GetDoc()->GetFtnIdxs();
- for( USHORT n = 0; n < rFtnArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFtnArr.Count(); ++n )
if( 0 != ( pTxtFtn = rFtnArr[ n ])->GetStartNode() &&
pSttNd == &pTxtFtn->GetStartNode()->GetNode() )
{
@@ -158,14 +158,14 @@ BOOL SwCursor::GotoFtnAnchor()
nsSwCursorSelOverFlags::SELOVER_TOGGLE );
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SwCrsrShell::GotoFtnAnchor()
+sal_Bool SwCrsrShell::GotoFtnAnchor()
{
// springe aus der Fussnote zum Anker
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
- BOOL bRet = pCurCrsr->GotoFtnAnchor();
+ sal_Bool bRet = pCurCrsr->GotoFtnAnchor();
if( bRet )
{
// BUG 5996: Tabellen-Kopfzeile sonderbehandeln
@@ -176,22 +176,22 @@ BOOL SwCrsrShell::GotoFtnAnchor()
return bRet;
}
-inline sal_Bool CmpLE( const SwTxtFtn& rFtn, ULONG nNd, xub_StrLen nCnt )
+inline sal_Bool CmpLE( const SwTxtFtn& rFtn, sal_uLong nNd, xub_StrLen nCnt )
{
- ULONG nTNd = rFtn.GetTxtNode().GetIndex();
+ sal_uLong nTNd = rFtn.GetTxtNode().GetIndex();
return nTNd < nNd || ( nTNd == nNd && *rFtn.GetStart() <= nCnt );
}
-inline sal_Bool CmpL( const SwTxtFtn& rFtn, ULONG nNd, xub_StrLen nCnt )
+inline sal_Bool CmpL( const SwTxtFtn& rFtn, sal_uLong nNd, xub_StrLen nCnt )
{
- ULONG nTNd = rFtn.GetTxtNode().GetIndex();
+ sal_uLong nTNd = rFtn.GetTxtNode().GetIndex();
return nTNd < nNd || ( nTNd == nNd && *rFtn.GetStart() < nCnt );
}
-BOOL SwCursor::GotoNextFtnAnchor()
+sal_Bool SwCursor::GotoNextFtnAnchor()
{
const SwFtnIdxs& rFtnArr = GetDoc()->GetFtnIdxs();
const SwTxtFtn* pTxtFtn = 0;
- USHORT nPos;
+ sal_uInt16 nPos;
if( rFtnArr.SeekEntry( GetPoint()->nNode, &nPos ))
{
@@ -199,7 +199,7 @@ BOOL SwCursor::GotoNextFtnAnchor()
// naechstgelegene
if( nPos < rFtnArr.Count() )
{
- ULONG nNdPos = GetPoint()->nNode.GetIndex();
+ sal_uLong nNdPos = GetPoint()->nNode.GetIndex();
xub_StrLen nCntPos = GetPoint()->nContent.GetIndex();
pTxtFtn = rFtnArr[ nPos ];
@@ -235,7 +235,7 @@ BOOL SwCursor::GotoNextFtnAnchor()
else if( nPos < rFtnArr.Count() )
pTxtFtn = rFtnArr[ nPos ];
- BOOL bRet = 0 != pTxtFtn;
+ sal_Bool bRet = 0 != pTxtFtn;
if( bRet )
{
SwCrsrSaveState aSaveState( *this );
@@ -248,17 +248,17 @@ BOOL SwCursor::GotoNextFtnAnchor()
return bRet;
}
-BOOL SwCursor::GotoPrevFtnAnchor()
+sal_Bool SwCursor::GotoPrevFtnAnchor()
{
const SwFtnIdxs& rFtnArr = GetDoc()->GetFtnIdxs();
const SwTxtFtn* pTxtFtn = 0;
- USHORT nPos;
+ sal_uInt16 nPos;
if( rFtnArr.SeekEntry( GetPoint()->nNode, &nPos ) )
{
// es gibt eine Fussnote mit dem Index, suche also die
// naechstgelegene
- ULONG nNdPos = GetPoint()->nNode.GetIndex();
+ sal_uLong nNdPos = GetPoint()->nNode.GetIndex();
xub_StrLen nCntPos = GetPoint()->nContent.GetIndex();
pTxtFtn = rFtnArr[ nPos ];
@@ -293,7 +293,7 @@ BOOL SwCursor::GotoPrevFtnAnchor()
else if( nPos )
pTxtFtn = rFtnArr[ nPos-1 ];
- BOOL bRet = 0 != pTxtFtn;
+ sal_Bool bRet = 0 != pTxtFtn;
if( bRet )
{
SwCrsrSaveState aSaveState( *this );
@@ -306,12 +306,12 @@ BOOL SwCursor::GotoPrevFtnAnchor()
return bRet;
}
-BOOL SwCrsrShell::GotoNextFtnAnchor()
+sal_Bool SwCrsrShell::GotoNextFtnAnchor()
{
return CallCrsrFN( &SwCursor::GotoNextFtnAnchor );
}
-BOOL SwCrsrShell::GotoPrevFtnAnchor()
+sal_Bool SwCrsrShell::GotoPrevFtnAnchor()
{
return CallCrsrFN( &SwCursor::GotoPrevFtnAnchor );
}
@@ -319,7 +319,7 @@ BOOL SwCrsrShell::GotoPrevFtnAnchor()
// springe aus dem Rahmen zum Anker
-BOOL SwCrsrShell::GotoFlyAnchor()
+sal_Bool SwCrsrShell::GotoFlyAnchor()
{
SET_CURR_SHELL( this );
const SwFrm* pFrm = GetCurrFrm();
@@ -328,7 +328,7 @@ BOOL SwCrsrShell::GotoFlyAnchor()
} while( pFrm && !pFrm->IsFlyFrm() );
if( !pFrm ) // ist kein FlyFrame
- return FALSE;
+ return sal_False;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
SwCrsrSaveState aSaveState( *pCurCrsr );
@@ -344,10 +344,10 @@ BOOL SwCrsrShell::GotoFlyAnchor()
: pFrm->Frm().Left();
const SwPageFrm* pPageFrm = pFrm->FindPageFrm();
- const SwCntntFrm* pFndFrm = pPageFrm->GetCntntPos( aPt, FALSE, TRUE );
+ const SwCntntFrm* pFndFrm = pPageFrm->GetCntntPos( aPt, sal_False, sal_True );
pFndFrm->GetCrsrOfst( pCurCrsr->GetPoint(), aPt );
- BOOL bRet = !pCurCrsr->IsInProtectTable() && !pCurCrsr->IsSelOvr();
+ sal_Bool bRet = !pCurCrsr->IsInProtectTable() && !pCurCrsr->IsSelOvr();
if( bRet )
UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE |
SwCrsrShell::READONLY );
diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx
index bf6343e77bc0..0dbc6013e465 100644
--- a/sw/source/core/crsr/trvlreg.cxx
+++ b/sw/source/core/crsr/trvlreg.cxx
@@ -41,8 +41,8 @@
-BOOL GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
- BOOL bInReadOnly )
+sal_Bool GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
+ sal_Bool bInReadOnly )
{
SwNodeIndex aIdx( rCurCrsr.GetPoint()->nNode );
SwSectionNode* pNd = aIdx.GetNode().FindSectionNode();
@@ -67,7 +67,7 @@ BOOL GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
{
aIdx = *pNd;
SwCntntNode* pCNd = pNd->GetNodes().GoNextSection( &aIdx,
- TRUE, !bInReadOnly );
+ sal_True, !bInReadOnly );
if( !pCNd )
{
aIdx--;
@@ -79,7 +79,7 @@ BOOL GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
{
aIdx = *pNd->EndOfSectionNode();
SwCntntNode* pCNd = pNd->GetNodes().GoPrevSection( &aIdx,
- TRUE, !bInReadOnly );
+ sal_True, !bInReadOnly );
if( !pCNd )
{
aIdx.Assign( *pNd, - 1 );
@@ -89,22 +89,22 @@ BOOL GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
}
rCurCrsr.GetPoint()->nNode = aIdx;
- return TRUE;
+ return sal_True;
}
} while( pNd );
- return FALSE;
+ return sal_False;
}
-BOOL GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
- BOOL bInReadOnly )
+sal_Bool GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
+ sal_Bool bInReadOnly )
{
SwNodeIndex aIdx( rCurCrsr.GetPoint()->nNode );
SwSectionNode* pNd = aIdx.GetNode().FindSectionNode();
if( pNd )
aIdx.Assign( *pNd->EndOfSectionNode(), - 1 );
- ULONG nEndCount = aIdx.GetNode().GetNodes().Count()-1;
+ sal_uLong nEndCount = aIdx.GetNode().GetNodes().Count()-1;
do {
while( aIdx.GetIndex() < nEndCount &&
0 == ( pNd = aIdx.GetNode().GetSectionNode()) )
@@ -123,7 +123,7 @@ BOOL GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
{
aIdx = *pNd;
SwCntntNode* pCNd = pNd->GetNodes().GoNextSection( &aIdx,
- TRUE, !bInReadOnly );
+ sal_True, !bInReadOnly );
if( !pCNd )
{
aIdx.Assign( *pNd->EndOfSectionNode(), +1 );
@@ -135,7 +135,7 @@ BOOL GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
{
aIdx = *pNd->EndOfSectionNode();
SwCntntNode* pCNd = pNd->GetNodes().GoPrevSection( &aIdx,
- TRUE, !bInReadOnly );
+ sal_True, !bInReadOnly );
if( !pCNd )
{
aIdx++;
@@ -145,33 +145,33 @@ BOOL GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
}
rCurCrsr.GetPoint()->nNode = aIdx;
- return TRUE;
+ return sal_True;
}
} while( pNd );
- return FALSE;
+ return sal_False;
}
-BOOL GotoCurrRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
- BOOL bInReadOnly )
+sal_Bool GotoCurrRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
+ sal_Bool bInReadOnly )
{
SwSectionNode* pNd = rCurCrsr.GetNode()->FindSectionNode();
if( !pNd )
- return FALSE;
+ return sal_False;
SwPosition* pPos = rCurCrsr.GetPoint();
- BOOL bMoveBackward = fnPosRegion == fnMoveBackward;
+ sal_Bool bMoveBackward = fnPosRegion == fnMoveBackward;
SwCntntNode* pCNd;
if( bMoveBackward )
{
SwNodeIndex aIdx( *pNd->EndOfSectionNode() );
- pCNd = pNd->GetNodes().GoPrevSection( &aIdx, TRUE, !bInReadOnly );
+ pCNd = pNd->GetNodes().GoPrevSection( &aIdx, sal_True, !bInReadOnly );
}
else
{
SwNodeIndex aIdx( *pNd );
- pCNd = pNd->GetNodes().GoNextSection( &aIdx, TRUE, !bInReadOnly );
+ pCNd = pNd->GetNodes().GoNextSection( &aIdx, sal_True, !bInReadOnly );
}
if( pCNd )
@@ -184,34 +184,34 @@ BOOL GotoCurrRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
}
-BOOL GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
- BOOL bInReadOnly )
+sal_Bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
+ sal_Bool bInReadOnly )
{
SwNode* pCurrNd = rCurCrsr.GetNode();
SwSectionNode* pNd = pCurrNd->FindSectionNode();
if( !pNd )
- return FALSE;
+ return sal_False;
SwPosition* pPos = rCurCrsr.GetPoint();
xub_StrLen nCurrCnt = pPos->nContent.GetIndex();
- BOOL bMoveBackward = fnPosRegion == fnMoveBackward;
+ sal_Bool bMoveBackward = fnPosRegion == fnMoveBackward;
do {
SwCntntNode* pCNd;
if( bMoveBackward ) // ans Ende vom Bereich
{
SwNodeIndex aIdx( *pNd->EndOfSectionNode() );
- pCNd = pNd->GetNodes().GoPrevSection( &aIdx, TRUE, !bInReadOnly );
+ pCNd = pNd->GetNodes().GoPrevSection( &aIdx, sal_True, !bInReadOnly );
if( !pCNd )
- return FALSE;
+ return sal_False;
pPos->nNode = aIdx;
}
else
{
SwNodeIndex aIdx( *pNd );
- pCNd = pNd->GetNodes().GoNextSection( &aIdx, TRUE, !bInReadOnly );
+ pCNd = pNd->GetNodes().GoNextSection( &aIdx, sal_True, !bInReadOnly );
if( !pCNd )
- return FALSE;
+ return sal_False;
pPos->nNode = aIdx;
}
@@ -221,18 +221,18 @@ BOOL GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
if( &pPos->nNode.GetNode() != pCurrNd ||
pPos->nContent.GetIndex() != nCurrCnt )
// es gab eine Veraenderung
- return TRUE;
+ return sal_True;
// dann versuche mal den "Parent" dieser Section
SwSection* pParent = pNd->GetSection().GetParent();
pNd = pParent ? pParent->GetFmt()->GetSectionNode() : 0;
} while( pNd );
- return FALSE;
+ return sal_False;
}
-BOOL SwCursor::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion )
+sal_Bool SwCursor::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion )
{
SwCrsrSaveState aSaveState( *this );
return !dynamic_cast<SwTableCursor*>(this) &&
@@ -242,21 +242,21 @@ BOOL SwCursor::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion
GetPoint()->nContent.GetIndex() != pSavePos->nCntnt );
}
-BOOL SwCrsrShell::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion )
+sal_Bool SwCrsrShell::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
- BOOL bRet = !pTblCrsr && pCurCrsr->MoveRegion( fnWhichRegion, fnPosRegion );
+ sal_Bool bRet = !pTblCrsr && pCurCrsr->MoveRegion( fnWhichRegion, fnPosRegion );
if( bRet )
UpdateCrsr();
return bRet;
}
-BOOL SwCursor::GotoRegion( const String& rName )
+sal_Bool SwCursor::GotoRegion( const String& rName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwSectionFmts& rFmts = GetDoc()->GetSections();
- for( USHORT n = rFmts.Count(); n; )
+ for( sal_uInt16 n = rFmts.Count(); n; )
{
const SwSectionFmt* pFmt = rFmts[ --n ];
const SwNodeIndex* pIdx;
@@ -277,10 +277,10 @@ BOOL SwCursor::GotoRegion( const String& rName )
return bRet;
}
-BOOL SwCrsrShell::GotoRegion( const String& rName )
+sal_Bool SwCrsrShell::GotoRegion( const String& rName )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
- BOOL bRet = !pTblCrsr && pCurCrsr->GotoRegion( rName );
+ sal_Bool bRet = !pTblCrsr && pCurCrsr->GotoRegion( rName );
if( bRet )
UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE |
SwCrsrShell::READONLY ); // und den akt. Updaten
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index d9a887e61ad9..0c6a659f2eb0 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -51,16 +51,16 @@
// setze Crsr in die naechsten/vorherigen Celle
-BOOL SwCrsrShell::GoNextCell( BOOL bAppendLine )
+sal_Bool SwCrsrShell::GoNextCell( sal_Bool bAppendLine )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTableNode* pTblNd = 0;
if( IsTableMode() || 0 != ( pTblNd = IsCrsrInTbl() ))
{
SwCursor* pCrsr = pTblCrsr ? pTblCrsr : pCurCrsr;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
- bRet = TRUE;
+ bRet = sal_True;
// Check if we have to move the cursor to a covered cell before
// proceeding:
@@ -75,7 +75,7 @@ BOOL SwCrsrShell::GoNextCell( BOOL bAppendLine )
if ( !pTblNd )
pTblNd = IsCrsrInTbl();
pTableBox = & pTableBox->FindEndOfRowSpan( pTblNd->GetTable(),
- (USHORT)(pTableBox->getRowSpan() + pCrsr->GetCrsrRowSpanOffset() ) );
+ (sal_uInt16)(pTableBox->getRowSpan() + pCrsr->GetCrsrRowSpanOffset() ) );
pTableBoxStartNode = pTableBox->GetSttNd();
}
}
@@ -88,7 +88,7 @@ BOOL SwCrsrShell::GoNextCell( BOOL bAppendLine )
if( !aCellStt.GetNode().IsStartNode() )
{
if( pCrsr->HasMark() || !bAppendLine )
- bRet = FALSE;
+ bRet = sal_False;
else
{
// auf besonderen Wunsch: keine Line mehr vorhanden, dann
@@ -105,7 +105,7 @@ BOOL SwCrsrShell::GoNextCell( BOOL bAppendLine )
//nichts mitbekommen.
((SwEditShell*)this)->StartAllAction();
bRet = pDoc->InsertRow( pTblNd->GetTable().
- SelLineFromBox( pTableBox, aBoxes, FALSE ));
+ SelLineFromBox( pTableBox, aBoxes, sal_False ));
((SwEditShell*)this)->EndAllAction();
}
}
@@ -116,9 +116,9 @@ BOOL SwCrsrShell::GoNextCell( BOOL bAppendLine )
}
-BOOL SwCrsrShell::GoPrevCell()
+sal_Bool SwCrsrShell::GoPrevCell()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTableNode* pTblNd;
if( IsTableMode() || 0 != ( pTblNd = IsCrsrInTbl() ))
{
@@ -143,12 +143,12 @@ const SwFrm* lcl_FindMostUpperCellFrm( const SwFrm* pFrm )
return pFrm;
}
-BOOL SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
+sal_Bool SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
const SwTabFrm* pTabFrm = pFrm->FindTabFrm();
const SwTabFrm* pMasterTabFrm = pTabFrm->IsFollow() ? pTabFrm->FindMaster( true ) : pTabFrm;
@@ -172,7 +172,7 @@ BOOL SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
GetTblSel( *this, aBoxes, eType );
if( !aBoxes.Count() )
- return FALSE;
+ return sal_False;
pStt = aBoxes[0];
pEnd = aBoxes[aBoxes.Count() - 1];
@@ -184,7 +184,7 @@ BOOL SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
SwTable::SearchType eSearchType = bRow ? SwTable::SEARCH_ROW : SwTable::SEARCH_COL;
pTable->CreateSelection( *pCrsr, aBoxes, eSearchType, bCheckProtected );
if( !aBoxes.Count() )
- return FALSE;
+ return sal_False;
pStt = aBoxes[0];
pEnd = aBoxes[aBoxes.Count() - 1];
@@ -193,7 +193,7 @@ BOOL SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
{
const SwShellCrsr *pCrsr = _GetCrsr();
const SwFrm* pStartFrm = pFrm;
- const SwCntntNode *pCNd = pCrsr->GetCntntNode( FALSE );
+ const SwCntntNode *pCNd = pCrsr->GetCntntNode( sal_False );
const SwFrm* pEndFrm = pCNd ? pCNd->GetFrm( &pCrsr->GetMkPos() ) : 0;
if ( bRow )
@@ -203,7 +203,7 @@ BOOL SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
}
if ( !pStartFrm || !pEndFrm )
- return FALSE;
+ return sal_False;
const bool bVert = pFrm->ImplFindTabFrm()->IsVertical();
@@ -220,7 +220,7 @@ BOOL SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
aBoxes, bSelectUp ? 0 : &aCells, eType );
if( !aBoxes.Count() || ( !bSelectUp && 4 != aCells.Count() ) )
- return FALSE;
+ return sal_False;
if ( bSelectUp )
{
@@ -258,15 +258,15 @@ BOOL SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
pTblCrsr->GetPtPos() = pMasterTabFrm->IsVertical() ? pMasterTabFrm->Frm().TopRight() : pMasterTabFrm->Frm().TopLeft();
UpdateCrsr(); // und den akt. Updaten
- return TRUE;
+ return sal_True;
}
-BOOL SwCrsrShell::SelTbl()
+sal_Bool SwCrsrShell::SelTbl()
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
const SwTabFrm *pTblFrm = pFrm->ImplFindTabFrm();
const SwTabFrm* pMasterTabFrm = pTblFrm->IsFollow() ? pTblFrm->FindMaster( true ) : pTblFrm;
@@ -291,11 +291,11 @@ BOOL SwCrsrShell::SelTbl()
pTblCrsr->GetPoint()->nNode = *pTblNd->EndOfSectionNode();
pTblCrsr->Move( fnMoveBackward, fnGoCntnt );
UpdateCrsr(); // und den akt. Updaten
- return TRUE;
+ return sal_True;
}
-BOOL SwCrsrShell::SelTblBox()
+sal_Bool SwCrsrShell::SelTblBox()
{
// if we're in a table, create a table cursor, and select the cell
// that the current cursor's point resides in
@@ -314,7 +314,7 @@ BOOL SwCrsrShell::SelTblBox()
#endif
if( pStartNode == NULL )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
@@ -346,7 +346,7 @@ BOOL SwCrsrShell::SelTblBox()
// needs updateing
UpdateCrsr();
- return TRUE;
+ return sal_True;
}
// return the next non-protected cell inside a table
@@ -354,7 +354,7 @@ BOOL SwCrsrShell::SelTblBox()
// return:
// true - Idx points to content in a suitable cell
// false - could not find a suitable cell
-bool lcl_FindNextCell( SwNodeIndex& rIdx, BOOL bInReadOnly )
+bool lcl_FindNextCell( SwNodeIndex& rIdx, sal_Bool bInReadOnly )
{
// ueberpruefe geschuetzte Zellen
SwNodeIndex aTmp( rIdx, 2 ); // TableNode + StartNode
@@ -433,7 +433,7 @@ bool lcl_FindNextCell( SwNodeIndex& rIdx, BOOL bInReadOnly )
}
// comments see lcl_FindNextCell
-bool lcl_FindPrevCell( SwNodeIndex& rIdx, BOOL bInReadOnly )
+bool lcl_FindPrevCell( SwNodeIndex& rIdx, sal_Bool bInReadOnly )
{
SwNodeIndex aTmp( rIdx, -2 ); // TableNode + EndNode
@@ -493,8 +493,8 @@ bool lcl_FindPrevCell( SwNodeIndex& rIdx, BOOL bInReadOnly )
}
-BOOL GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
- BOOL bInReadOnly )
+sal_Bool GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
+ sal_Bool bInReadOnly )
{
SwNodeIndex aIdx( rCurCrsr.GetPoint()->nNode );
@@ -550,16 +550,16 @@ BOOL GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
pTxtNode->Len() :
0 );
}
- return TRUE;
+ return sal_True;
}
} while( pTblNd );
- return FALSE;
+ return sal_False;
}
-BOOL GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
- BOOL bInReadOnly )
+sal_Bool GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
+ sal_Bool bInReadOnly )
{
SwNodeIndex aIdx( rCurCrsr.GetPoint()->nNode );
SwTableNode* pTblNd = aIdx.GetNode().FindTableNode();
@@ -567,7 +567,7 @@ BOOL GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
if( pTblNd )
aIdx.Assign( *pTblNd->EndOfSectionNode(), 1 );
- ULONG nLastNd = rCurCrsr.GetDoc()->GetNodes().Count() - 1;
+ sal_uLong nLastNd = rCurCrsr.GetDoc()->GetNodes().Count() - 1;
do {
while( aIdx.GetIndex() < nLastNd &&
0 == ( pTblNd = aIdx.GetNode().GetTableNode()) )
@@ -603,34 +603,34 @@ BOOL GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
pTxtNode->Len() :
0 );
}
- return TRUE;
+ return sal_True;
}
} while( pTblNd );
- return FALSE;
+ return sal_False;
}
-BOOL GotoCurrTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
- BOOL bInReadOnly )
+sal_Bool GotoCurrTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
+ sal_Bool bInReadOnly )
{
SwTableNode* pTblNd = rCurCrsr.GetPoint()->nNode.GetNode().FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
SwTxtNode* pTxtNode = 0;
if( fnPosTbl == fnMoveBackward ) // ans Ende der Tabelle
{
SwNodeIndex aIdx( *pTblNd->EndOfSectionNode() );
if( !lcl_FindPrevCell( aIdx, bInReadOnly ))
- return FALSE;
+ return sal_False;
pTxtNode = aIdx.GetNode().GetTxtNode();
}
else
{
SwNodeIndex aIdx( *pTblNd );
if( !lcl_FindNextCell( aIdx, bInReadOnly ))
- return FALSE;
+ return sal_False;
pTxtNode = aIdx.GetNode().GetTxtNode();
}
@@ -642,13 +642,13 @@ BOOL GotoCurrTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
0 );
}
- return TRUE;
+ return sal_True;
}
-BOOL SwCursor::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
+sal_Bool SwCursor::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTableCursor* pTblCrsr = dynamic_cast<SwTableCursor*>(this);
if( pTblCrsr || !HasMark() ) // nur wenn kein Mark oder ein TblCrsr
@@ -661,13 +661,13 @@ BOOL SwCursor::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
return bRet;
}
-BOOL SwCrsrShell::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
+sal_Bool SwCrsrShell::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SwShellCrsr* pCrsr = pTblCrsr ? pTblCrsr : pCurCrsr;
- BOOL bCheckPos, bRet;
- ULONG nPtNd = 0;
+ sal_Bool bCheckPos, bRet;
+ sal_uLong nPtNd = 0;
xub_StrLen nPtCnt = 0;
if( !pTblCrsr && pCurCrsr->HasMark() ) // wenn Mark und kein TblCrsr,
@@ -678,11 +678,11 @@ BOOL SwCrsrShell::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
pCurCrsr->SwSelPaintRects::Hide();
pTblCrsr->SetMark();
pCrsr = pTblCrsr;
- bCheckPos = FALSE;
+ bCheckPos = sal_False;
}
else
{
- bCheckPos = TRUE;
+ bCheckPos = sal_True;
nPtNd = pCrsr->GetPoint()->nNode.GetIndex();
nPtCnt = pCrsr->GetPoint()->nContent.GetIndex();
}
@@ -700,24 +700,24 @@ BOOL SwCrsrShell::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
if( bCheckPos &&
pCrsr->GetPoint()->nNode.GetIndex() == nPtNd &&
pCrsr->GetPoint()->nContent.GetIndex() == nPtCnt )
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
-BOOL SwCrsrShell::IsTblComplex() const
+sal_Bool SwCrsrShell::IsTblComplex() const
{
- SwFrm *pFrm = GetCurrFrm( FALSE );
+ SwFrm *pFrm = GetCurrFrm( sal_False );
if ( pFrm && pFrm->IsInTab() )
return pFrm->FindTabFrm()->GetTable()->IsTblComplex();
- return FALSE;
+ return sal_False;
}
-BOOL SwCrsrShell::IsTblComplexForChart()
+sal_Bool SwCrsrShell::IsTblComplexForChart()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
StartAction(); // IsTblComplexForChart() may trigger table formatting
// we better do that inside an action
@@ -784,10 +784,10 @@ String SwCrsrShell::GetBoxNms() const
}
-BOOL SwCrsrShell::GotoTable( const String& rName )
+sal_Bool SwCrsrShell::GotoTable( const String& rName )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
- BOOL bRet = !pTblCrsr && pCurCrsr->GotoTable( rName );
+ sal_Bool bRet = !pTblCrsr && pCurCrsr->GotoTable( rName );
if( bRet )
{
pCurCrsr->GetPtPos() = Point();
@@ -798,10 +798,10 @@ BOOL SwCrsrShell::GotoTable( const String& rName )
}
-BOOL SwCrsrShell::CheckTblBoxCntnt( const SwPosition* pPos )
+sal_Bool SwCrsrShell::CheckTblBoxCntnt( const SwPosition* pPos )
{
if( !pBoxIdx || !pBoxPtr || IsSelTblCells() || !IsAutoUpdateCells() )
- return FALSE;
+ return sal_False;
// ueberpruefe, ob der Box Inhalt mit dem angegebenen Format der Box
// ueber einstimmt. Wenn nicht, setze neu
@@ -859,7 +859,7 @@ BOOL SwCrsrShell::CheckTblBoxCntnt( const SwPosition* pPos )
// aufruf kommt.
ClearTblBoxCntnt();
StartAction();
- GetDoc()->ChkBoxNumFmt( *pChkBox, TRUE );
+ GetDoc()->ChkBoxNumFmt( *pChkBox, sal_True );
EndAction();
}
@@ -877,13 +877,13 @@ void SwCrsrShell::SaveTblBoxCntnt( const SwPosition* pPos )
SwStartNode* pSttNd = pPos->nNode.GetNode().FindSttNodeByType( SwTableBoxStartNode );
- BOOL bCheckBox = FALSE;
+ sal_Bool bCheckBox = sal_False;
if( pSttNd && pBoxIdx )
{
if( pSttNd == &pBoxIdx->GetNode() )
pSttNd = 0; // die haben wir schon
else
- bCheckBox = TRUE;
+ bCheckBox = sal_True;
}
else
bCheckBox = 0 != pBoxIdx;
@@ -913,9 +913,9 @@ void SwCrsrShell::ClearTblBoxCntnt()
pBoxPtr = 0;
}
-BOOL SwCrsrShell::EndAllTblBoxEdit()
+sal_Bool SwCrsrShell::EndAllTblBoxEdit()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ViewShell *pSh = this;
do {
if( pSh->IsA( TYPE( SwCrsrShell ) ) )
diff --git a/sw/source/core/crsr/unocrsr.cxx b/sw/source/core/crsr/unocrsr.cxx
index a4e0d6f79785..b57e423623a2 100644
--- a/sw/source/core/crsr/unocrsr.cxx
+++ b/sw/source/core/crsr/unocrsr.cxx
@@ -41,9 +41,9 @@ IMPL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr, 10, 10 )
SwUnoCrsr::SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing )
: SwCursor( rPos, pRing, false ), SwModify( 0 ),
- bRemainInSection( TRUE ),
- bSkipOverHiddenSections( FALSE ),
- bSkipOverProtectSections( FALSE )
+ bRemainInSection( sal_True ),
+ bSkipOverHiddenSections( sal_False ),
+ bSkipOverProtectSections( sal_False )
{}
@@ -62,7 +62,7 @@ SwUnoCrsr::~SwUnoCrsr()
{
// dann muss der Cursor aus dem Array ausgetragen werden
SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
- USHORT nDelPos = rTbl.GetPos( this );
+ sal_uInt16 nDelPos = rTbl.GetPos( this );
if( USHRT_MAX != nDelPos )
rTbl.Remove( nDelPos );
@@ -112,7 +112,7 @@ bool SwUnoCrsr::IsReadOnlyAvailable() const
}
const SwCntntFrm*
-SwUnoCrsr::DoSetBidiLevelLeftRight( BOOL &, BOOL, BOOL )
+SwUnoCrsr::DoSetBidiLevelLeftRight( sal_Bool &, sal_Bool, sal_Bool )
{
return 0; // not for uno cursor
}
@@ -122,7 +122,7 @@ void SwUnoCrsr::DoSetBidiLevelUpDown()
return; // not for uno cursor
}
-BOOL SwUnoCrsr::IsSelOvr( int eFlags )
+sal_Bool SwUnoCrsr::IsSelOvr( int eFlags )
{
if( bRemainInSection )
{
@@ -133,8 +133,8 @@ BOOL SwUnoCrsr::IsSelOvr( int eFlags )
*pNewSttNd = rPtIdx.GetNode().StartOfSectionNode();
if( pOldSttNd != pNewSttNd )
{
- BOOL bMoveDown = GetSavePos()->nNode < rPtIdx.GetIndex();
- BOOL bValidPos = FALSE;
+ sal_Bool bMoveDown = GetSavePos()->nNode < rPtIdx.GetIndex();
+ sal_Bool bValidPos = sal_False;
// search the correct surrounded start node - which the index
// can't leave.
@@ -188,14 +188,14 @@ BOOL SwUnoCrsr::IsSelOvr( int eFlags )
}
}
else
- bValidPos = TRUE;
+ bValidPos = sal_True;
} while ( pInvalidNode );
}
if( bValidPos )
{
SwCntntNode* pCNd = GetCntntNode();
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
if( pCNd && !bMoveDown )
nCnt = pCNd->Len();
GetPoint()->nContent.Assign( pCNd, nCnt );
@@ -204,7 +204,7 @@ BOOL SwUnoCrsr::IsSelOvr( int eFlags )
{
rPtIdx = GetSavePos()->nNode;
GetPoint()->nContent.Assign( GetCntntNode(), GetSavePos()->nCntnt );
- return TRUE;
+ return sal_True;
}
}
}
@@ -217,7 +217,7 @@ BOOL SwUnoCrsr::IsSelOvr( int eFlags )
SwUnoTableCrsr::SwUnoTableCrsr(const SwPosition& rPos)
: SwCursor(rPos,0,false), SwUnoCrsr(rPos), SwTableCursor(rPos), aTblSel(rPos,0,false)
{
- SetRemainInSection(FALSE);
+ SetRemainInSection(sal_False);
}
SwUnoTableCrsr::~SwUnoTableCrsr()
@@ -234,9 +234,9 @@ SwCursor* SwUnoTableCrsr::Create( SwPaM* pRing ) const
}
*/
-BOOL SwUnoTableCrsr::IsSelOvr( int eFlags )
+sal_Bool SwUnoTableCrsr::IsSelOvr( int eFlags )
{
- BOOL bRet = SwUnoCrsr::IsSelOvr( eFlags );
+ sal_Bool bRet = SwUnoCrsr::IsSelOvr( eFlags );
if( !bRet )
{
const SwTableNode* pTNd = GetPoint()->nNode.GetNode().FindTableNode();
@@ -253,13 +253,13 @@ void SwUnoTableCrsr::MakeBoxSels()
bool bMakeTblCrsrs = true;
if( GetPoint()->nNode.GetIndex() && GetMark()->nNode.GetIndex() &&
0 != ( pCNd = GetCntntNode() ) && pCNd->GetFrm() &&
- 0 != ( pCNd = GetCntntNode(FALSE) ) && pCNd->GetFrm() )
+ 0 != ( pCNd = GetCntntNode(sal_False) ) && pCNd->GetFrm() )
bMakeTblCrsrs = GetDoc()->GetRootFrm()->MakeTblCrsrs( *this );
if ( !bMakeTblCrsrs )
{
SwSelBoxes& rTmpBoxes = (SwSelBoxes&)GetBoxes();
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
while( nCount < rTmpBoxes.Count() )
DeleteBox( nCount );
}
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 214700c5e680..53cd935289de 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -89,9 +89,9 @@ MapMode* SwSelPaintRects::pMapMode = 0;
// Window* pWin = GetShell()->GetWin();
//
// RasterOp eOld( pWin->GetRasterOp() );
-// BOOL bLCol = pWin->IsLineColor();
+// sal_Bool bLCol = pWin->IsLineColor();
// Color aLCol( pWin->GetLineColor() );
-// BOOL bFCol = pWin->IsFillColor();
+// sal_Bool bFCol = pWin->IsFillColor();
// Color aFCol( pWin->GetFillColor() );
//
// pWin->SetRasterOp( ROP_XOR );
@@ -112,7 +112,7 @@ MapMode* SwSelPaintRects::pMapMode = 0;
//
// const SwBookmarks& rBkmkTbl = GetShell()->getIDocumentMarkAccess()->getBookmarks();
// SwShellCrsr* pCrsr = 0;
-// for( USHORT n = 0; n < rBkmkTbl.Count(); ++n )
+// for( sal_uInt16 n = 0; n < rBkmkTbl.Count(); ++n )
// {
// const SwBookmark& rBkmk = *rBkmkTbl[ n ];
// if( rBkmk.IsBookMark() && rBkmk.GetOtherPos() )
@@ -126,7 +126,7 @@ MapMode* SwSelPaintRects::pMapMode = 0;
// *pCrsr->GetPoint() = rBkmk.GetPos();
// *pCrsr->GetMark() = *rBkmk.GetOtherPos();
// pCrsr->FillRects();
-// for( USHORT i = 0; i < pCrsr->Count(); ++i )
+// for( sal_uInt16 i = 0; i < pCrsr->Count(); ++i )
// aReg -= (*pCrsr)[ i ];
//
// pCrsr->Remove( 0, i );
@@ -174,14 +174,14 @@ MapMode* SwSelPaintRects::pMapMode = 0;
class SwRedlineRects : public SwSelPaintRects
{
- USHORT nMode;
- USHORT nNm;
+ sal_uInt16 nMode;
+ sal_uInt16 nNm;
virtual void Paint( const Rectangle& rRect );
virtual void FillRects();
public:
- SwRedlineRects( const SwCrsrShell& rSh, USHORT nName, USHORT n )
+ SwRedlineRects( const SwCrsrShell& rSh, sal_uInt16 nName, sal_uInt16 n )
: SwSelPaintRects( rSh ), nMode( n ), nNm( nName )
{}
};
@@ -191,15 +191,15 @@ void SwRedlineRects::Paint( const Rectangle& rRect )
Window* pWin = GetShell()->GetWin();
RasterOp eOld( pWin->GetRasterOp() );
- BOOL bLCol = pWin->IsLineColor();
+ sal_Bool bLCol = pWin->IsLineColor();
Color aLCol( pWin->GetLineColor() );
- BOOL bFCol = pWin->IsFillColor();
+ sal_Bool bFCol = pWin->IsFillColor();
Color aFCol( pWin->GetFillColor() );
pWin->SetRasterOp( ROP_XOR );
Color aCol;
- UINT8 nVal = 0xc8 - ( (nMode / 4) * 16 );
+ sal_uInt8 nVal = 0xc8 - ( (nMode / 4) * 16 );
switch( nMode % 4 )
{
case 0: aCol = RGB_COLORDATA( nVal, nVal, 0xFF ); break;
@@ -225,7 +225,7 @@ void SwRedlineRects::FillRects()
const SwRedlineTbl& rTbl = GetShell()->GetDoc()->GetRedlineTbl();
SwShellCrsr* pCrsr = 0;
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
const SwRedline& rRed = *rTbl[ n ];
if( rRed.HasMark() && (nMode % 4 ) == rRed.GetType() &&
@@ -240,7 +240,7 @@ void SwRedlineRects::FillRects()
*pCrsr->GetPoint() = *rRed.GetPoint();
*pCrsr->GetMark() = *rRed.GetMark();
pCrsr->FillRects();
- for( USHORT i = 0; i < pCrsr->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pCrsr->Count(); ++i )
aReg -= (*pCrsr)[ i ];
pCrsr->Remove( 0, i );
@@ -253,20 +253,20 @@ void SwRedlineRects::FillRects()
}
SwRedlineRects* aRedlines[ 10 * 4 ];
-static int bFirstCall = TRUE;
+static int bFirstCall = sal_True;
void ShowRedlines( const SwCrsrShell* pSh, int nAction, const SwRect* pRect = 0 )
{
if( bFirstCall )
{
memset( aRedlines, 0, sizeof(aRedlines));
- bFirstCall = FALSE;
+ bFirstCall = sal_False;
}
const SwRedlineTbl& rTbl = pSh->GetDoc()->GetRedlineTbl();
const SwRedlineAuthorTbl& rAuthorTbl = pSh->GetDoc()->GetRedlineAuthorTbl();
- for( USHORT n = 0; n < rAuthorTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rAuthorTbl.Count(); ++n )
{
for( int i = 0; i < 4; ++i )
{
@@ -304,7 +304,7 @@ void ShowRedlines( const SwCrsrShell* pSh, int nAction, const SwRect* pRect = 0
if( GetDoc()->GetRedlineTbl().Count() )
{
SwRedlineTbl& rRedlineTbl = (SwRedlineTbl&)GetDoc()->GetRedlineTbl();
- for( USHORT i = 0; i < rRedlineTbl.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rRedlineTbl.Count(); ++i )
rRedlineTbl[ i ]->HideRects( *GetShell() );
}
#endif
@@ -316,11 +316,11 @@ SwVisCrsr::SwVisCrsr( const SwCrsrShell * pCShell )
{
pCShell->GetWin()->SetCursor( &aTxtCrsr );
bIsVisible = aTxtCrsr.IsVisible();
- bIsDragCrsr = FALSE;
+ bIsDragCrsr = sal_False;
aTxtCrsr.SetWidth( 0 );
#ifdef SW_CRSR_TIMER
- bTimerOn = TRUE;
+ bTimerOn = sal_True;
SetTimeout( 50 ); // 50msec Verzoegerung
#endif
}
@@ -347,7 +347,7 @@ void SwVisCrsr::Show()
{
if( !bIsVisible )
{
- bIsVisible = TRUE;
+ bIsVisible = sal_True;
// muss ueberhaupt angezeigt werden ?
if( pCrsrShell->VisArea().IsOver( pCrsrShell->aCharRect ) )
@@ -375,7 +375,7 @@ void SwVisCrsr::Hide()
{
if( bIsVisible )
{
- bIsVisible = FALSE;
+ bIsVisible = sal_False;
#ifdef SW_CRSR_TIMER
if( IsActive() )
@@ -401,13 +401,13 @@ void __EXPORT SwVisCrsr::Timeout()
}
}
-BOOL SwCrsrShell::ChgCrsrTimerFlag( BOOL bTimerOn )
+sal_Bool SwCrsrShell::ChgCrsrTimerFlag( sal_Bool bTimerOn )
{
return pVisCrsr->ChgTimerFlag( bTimerOn );
}
-BOOL SwVisCrsr::ChgTimerFlag( BOOL bFlag )
+sal_Bool SwVisCrsr::ChgTimerFlag( sal_Bool bFlag )
{
bOld = bTimerOn;
if( !bFlag && bIsVisible && IsActive() )
@@ -454,7 +454,7 @@ void SwVisCrsr::_SetPosAndShow()
if( rNode.IsTxtNode() )
{
const SwTxtNode& rTNd = *rNode.GetTxtNode();
- const SwFrm* pFrm = rTNd.GetFrm( 0, 0, FALSE );
+ const SwFrm* pFrm = rTNd.GetFrm( 0, 0, sal_False );
if ( pFrm )
{
const SwScriptInfo* pSI = ((SwTxtFrm*)pFrm)->GetScriptInfo();
@@ -500,7 +500,7 @@ void SwVisCrsr::_SetPosAndShow()
((SwDrawView*)pCrsrShell->GetDrawView())->SetAnimationEnabled(
!pCrsrShell->IsSelection() );
- USHORT nStyle = bIsDragCrsr ? CURSOR_SHADOW : 0;
+ sal_uInt16 nStyle = bIsDragCrsr ? CURSOR_SHADOW : 0;
if( nStyle != aTxtCrsr.GetStyle() )
{
aTxtCrsr.SetStyle( nStyle );
@@ -631,7 +631,7 @@ void SwSelPaintRects::Show()
void SwSelPaintRects::Invalidate( const SwRect& rRect )
{
- USHORT nSz = Count();
+ sal_uInt16 nSz = Count();
if( !nSz )
return;
@@ -811,7 +811,7 @@ short SwShellCrsr::MaxReplaceArived()
// alte Actions beenden; die Tabellen-Frames werden angelegt und
// eine SSelection kann erzeugt werden
SvUShorts aArr;
- USHORT nActCnt;
+ sal_uInt16 nActCnt;
ViewShell *pShell = GetDoc()->GetRootFrm()->GetCurrShell(),
*pSh = pShell;
do {
@@ -824,7 +824,7 @@ short SwShellCrsr::MaxReplaceArived()
nRet = QueryBox( pDlg, SW_RES( MSG_COMCORE_ASKSEARCH )).Execute();
}
- for( USHORT n = 0; n < aArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aArr.Count(); ++n )
{
for( nActCnt = aArr[n]; nActCnt--; )
pSh->StartAction();
@@ -843,7 +843,7 @@ void SwShellCrsr::SaveTblBoxCntnt( const SwPosition* pPos )
((SwCrsrShell*)GetShell())->SaveTblBoxCntnt( pPos );
}
-BOOL SwShellCrsr::UpDown( BOOL bUp, USHORT nCnt )
+sal_Bool SwShellCrsr::UpDown( sal_Bool bUp, sal_uInt16 nCnt )
{
return SwCursor::UpDown( bUp, nCnt,
&GetPtPos(), GetShell()->GetUpDownX() );
@@ -854,21 +854,21 @@ BOOL SwShellCrsr::UpDown( BOOL bUp, USHORT nCnt )
// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
// am sichtbaren Cursor
-BOOL SwShellCrsr::IsSelOvr( int eFlags )
+sal_Bool SwShellCrsr::IsSelOvr( int eFlags )
{
return SwCursor::IsSelOvr( eFlags );
}
#endif
-// TRUE: an die Position kann der Cursor gesetzt werden
-BOOL SwShellCrsr::IsAtValidPos( BOOL bPoint ) const
+// sal_True: an die Position kann der Cursor gesetzt werden
+sal_Bool SwShellCrsr::IsAtValidPos( sal_Bool bPoint ) const
{
if( GetShell() && ( GetShell()->IsAllProtect() ||
GetShell()->GetViewOptions()->IsReadonly() ||
( GetShell()->Imp()->GetDrawView() &&
GetShell()->Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() )))
- return TRUE;
+ return sal_True;
return SwCursor::IsAtValidPos( bPoint );
}
@@ -920,13 +920,13 @@ void SwShellTableCrsr::FillRects()
SwRegionRects aReg( GetShell()->VisArea() );
SwNodes& rNds = GetDoc()->GetNodes();
- for( USHORT n = 0; n < aSelBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aSelBoxes.Count(); ++n )
{
const SwStartNode* pSttNd = (*(aSelBoxes.GetData() + n ))->GetSttNd();
const SwTableNode* pSelTblNd = pSttNd->FindTableNode();
SwNodeIndex aIdx( *pSttNd );
- SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, TRUE, FALSE );
+ SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, sal_True, sal_False );
// TABLE IN TABLE
// (see also lcl_FindTopLevelTable in unoobj2.cxx for a different
@@ -935,7 +935,7 @@ void SwShellTableCrsr::FillRects()
while ( pSelTblNd != pCurTblNd && pCurTblNd )
{
aIdx = pCurTblNd->EndOfSectionIndex();
- pCNd = rNds.GoNextSection( &aIdx, TRUE, FALSE );
+ pCNd = rNds.GoNextSection( &aIdx, sal_True, sal_False );
pCurTblNd = pCNd->FindTableNode();
}
@@ -962,19 +962,19 @@ void SwShellTableCrsr::FillRects()
// Pruefe, ob sich der SPoint innerhalb der Tabellen-SSelection befindet
-BOOL SwShellTableCrsr::IsInside( const Point& rPt ) const
+sal_Bool SwShellTableCrsr::IsInside( const Point& rPt ) const
{
// die neuen Rechtecke berechnen
// JP 16.01.98: wenn der Cursor noch "geparkt" ist nichts machen!!
if( !aSelBoxes.Count() || bParked ||
!GetPoint()->nNode.GetIndex() )
- return FALSE;
+ return sal_False;
SwNodes& rNds = GetDoc()->GetNodes();
- for( USHORT n = 0; n < aSelBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aSelBoxes.Count(); ++n )
{
SwNodeIndex aIdx( *(*(aSelBoxes.GetData() + n ))->GetSttNd() );
- SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, TRUE, FALSE );
+ SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, sal_True, sal_False );
if( !pCNd )
continue;
@@ -983,23 +983,23 @@ BOOL SwShellTableCrsr::IsInside( const Point& rPt ) const
pFrm = pFrm->GetUpper();
ASSERT( pFrm, "Node nicht in einer Tabelle" );
if( pFrm && pFrm->Frm().IsInside( rPt ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
#ifdef DBG_UTIL
// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
// am sichtbaren Cursor
-BOOL SwShellTableCrsr::IsSelOvr( int eFlags )
+sal_Bool SwShellTableCrsr::IsSelOvr( int eFlags )
{
return SwShellCrsr::IsSelOvr( eFlags );
}
#endif
-BOOL SwShellTableCrsr::IsAtValidPos( BOOL bPoint ) const
+sal_Bool SwShellTableCrsr::IsAtValidPos( sal_Bool bPoint ) const
{
return SwShellCrsr::IsAtValidPos( bPoint );
}
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index 99fd15dbc9e2..d25c7d8417cb 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -1088,7 +1088,7 @@ const SvStringsDtor& SwStyleNameMapper::GetNumRuleProgNameArray()
const String SwStyleNameMapper::GetSpecialExtraProgName( const String& rExtraUIName )
{
String aRes = rExtraUIName;
- BOOL bChgName = FALSE;
+ sal_Bool bChgName = sal_False;
const SvStringsDtor& rExtraArr = GetExtraUINameArray();
static sal_uInt16 nIds[] =
{
@@ -1103,7 +1103,7 @@ const String SwStyleNameMapper::GetSpecialExtraProgName( const String& rExtraUIN
{
if (aRes == *rExtraArr[ *pIds ])
{
- bChgName = TRUE;
+ bChgName = sal_True;
break;
}
}
@@ -1115,7 +1115,7 @@ const String SwStyleNameMapper::GetSpecialExtraProgName( const String& rExtraUIN
const String SwStyleNameMapper::GetSpecialExtraUIName( const String& rExtraProgName )
{
String aRes = rExtraProgName;
- BOOL bChgName = FALSE;
+ sal_Bool bChgName = sal_False;
const SvStringsDtor& rExtraArr = GetExtraProgNameArray();
static sal_uInt16 nIds[] =
{
@@ -1131,7 +1131,7 @@ const String SwStyleNameMapper::GetSpecialExtraUIName( const String& rExtraProgN
{
if (aRes == *rExtraArr[ *pIds ])
{
- bChgName = TRUE;
+ bChgName = sal_True;
break;
}
}
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 5431de73cd6a..e53679d8d92e 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -57,7 +57,7 @@ class SwAutoCompleteClient : public SwClient
SwAutoCompleteWord* pAutoCompleteWord;
SwDoc* pDoc;
#ifdef DBG_UTIL
- static ULONG nSwAutoCompleteClientCount;
+ static sal_uLong nSwAutoCompleteClientCount;
#endif
public:
SwAutoCompleteClient(SwAutoCompleteWord& rToTell, SwDoc& rSwDoc);
@@ -69,7 +69,7 @@ public:
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
const SwDoc& GetDoc(){return *pDoc;}
#ifdef DBG_UTIL
- static ULONG GetElementCount() {return nSwAutoCompleteClientCount;}
+ static sal_uLong GetElementCount() {return nSwAutoCompleteClientCount;}
#endif
};
/* -----------------------------05.08.2002 12:48------------------------------
@@ -96,7 +96,7 @@ typedef std::vector<SwDocPtr> SwDocPtrVector;
class SwAutoCompleteString : public String
{
#ifdef DBG_UTIL
- static ULONG nSwAutoCompleteStringCount;
+ static sal_uLong nSwAutoCompleteStringCount;
#endif
SwDocPtrVector aSourceDocs;
public:
@@ -107,12 +107,12 @@ class SwAutoCompleteString : public String
//returns true if last document reference has been removed
sal_Bool RemoveDocument(const SwDoc& rDoc);
#ifdef DBG_UTIL
- static ULONG GetElementCount() {return nSwAutoCompleteStringCount;}
+ static sal_uLong GetElementCount() {return nSwAutoCompleteStringCount;}
#endif
};
#ifdef DBG_UTIL
- ULONG SwAutoCompleteClient::nSwAutoCompleteClientCount = 0;
- ULONG SwAutoCompleteString::nSwAutoCompleteStringCount = 0;
+ sal_uLong SwAutoCompleteClient::nSwAutoCompleteClientCount = 0;
+ sal_uLong SwAutoCompleteString::nSwAutoCompleteStringCount = 0;
#endif
/* -----------------------------06.08.2002 08:57------------------------------
@@ -257,18 +257,18 @@ sal_Bool SwAutoCompleteString::RemoveDocument(const SwDoc& rDoc)
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-SwAutoCompleteWord::SwAutoCompleteWord( USHORT nWords, USHORT nMWrdLen )
+SwAutoCompleteWord::SwAutoCompleteWord( sal_uInt16 nWords, sal_uInt16 nMWrdLen )
: aWordLst( 0, 255 ), aLRULst( 0, 255 ),
pImpl(new SwAutoCompleteWord_Impl(*this)),
nMaxCount( nWords ),
nMinWrdLen( nMWrdLen ),
- bLockWordLst( FALSE )
+ bLockWordLst( sal_False )
{
}
SwAutoCompleteWord::~SwAutoCompleteWord()
{
- for(USHORT nPos = aWordLst.Count(); nPos; nPos--)
+ for(sal_uInt16 nPos = aWordLst.Count(); nPos; nPos--)
{
SwAutoCompleteString* pCurrent = (SwAutoCompleteString*)aWordLst[ nPos - 1 ];
aWordLst.Remove( nPos - 1 );
@@ -276,13 +276,13 @@ SwAutoCompleteWord::~SwAutoCompleteWord()
}
delete pImpl;
#ifdef DBG_UTIL
- ULONG nStrings = SwAutoCompleteString::GetElementCount();
- ULONG nClients = SwAutoCompleteClient::GetElementCount();
+ sal_uLong nStrings = SwAutoCompleteString::GetElementCount();
+ sal_uLong nClients = SwAutoCompleteClient::GetElementCount();
DBG_ASSERT(!nStrings && !nClients, "AutoComplete: clients or string count mismatch");
#endif
}
-BOOL SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
+sal_Bool SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
{
SwDocShell* pDocShell = rDoc.GetDocShell();
SfxMedium* pMedium = pDocShell ? pDocShell->GetMedium() : 0;
@@ -299,7 +299,7 @@ BOOL SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
aNewWord.EraseAllChars( CH_TXTATR_BREAKWORD );
pImpl->AddDocument(rDoc);
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
xub_StrLen nWrdLen = aNewWord.Len();
while( nWrdLen && '.' == aNewWord.GetChar( nWrdLen-1 ))
--nWrdLen;
@@ -309,10 +309,10 @@ BOOL SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
SwAutoCompleteString* pAutoString;
StringPtr pNew = pAutoString = new SwAutoCompleteString( aNewWord, 0, nWrdLen );
pAutoString->AddDocument(rDoc);
- USHORT nInsPos;
+ sal_uInt16 nInsPos;
if( aWordLst.Insert( pNew, nInsPos ) )
{
- bRet = TRUE;
+ bRet = sal_True;
if( aLRULst.Count() < nMaxCount )
aLRULst.Insert( pNew, 0 );
else
@@ -352,15 +352,15 @@ BOOL SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
return bRet;
}
-void SwAutoCompleteWord::SetMaxCount( USHORT nNewMax )
+void SwAutoCompleteWord::SetMaxCount( sal_uInt16 nNewMax )
{
if( nNewMax < nMaxCount && aLRULst.Count() > nNewMax )
{
// dann die unten ueberhaengenden entfernen
- USHORT nLRUIndex = nNewMax-1;
+ sal_uInt16 nLRUIndex = nNewMax-1;
while( nNewMax < aWordLst.Count() && nLRUIndex < aLRULst.Count())
{
- USHORT nPos = aWordLst.GetPos( (String*)aLRULst[ nLRUIndex++ ] );
+ sal_uInt16 nPos = aWordLst.GetPos( (String*)aLRULst[ nLRUIndex++ ] );
ASSERT( USHRT_MAX != nPos, "String nicht gefunden" );
void * pDel = aWordLst[nPos];
aWordLst.Remove(nPos);
@@ -371,7 +371,7 @@ void SwAutoCompleteWord::SetMaxCount( USHORT nNewMax )
nMaxCount = nNewMax;
}
-void SwAutoCompleteWord::SetMinWordLen( USHORT n )
+void SwAutoCompleteWord::SetMinWordLen( sal_uInt16 n )
{
// will man wirklich alle Worte, die kleiner als die neue Min Laenge
// sind entfernen?
@@ -380,13 +380,13 @@ void SwAutoCompleteWord::SetMinWordLen( USHORT n )
// JP 11.03.99 - mal testhalber eingebaut
if( n < nMinWrdLen )
{
- for( USHORT nPos = 0; nPos < aWordLst.Count(); ++nPos )
+ for( sal_uInt16 nPos = 0; nPos < aWordLst.Count(); ++nPos )
if( aWordLst[ nPos ]->Len() < n )
{
void* pDel = aWordLst[ nPos ];
aWordLst.Remove(nPos);
- USHORT nDelPos = aLRULst.GetPos( pDel );
+ sal_uInt16 nDelPos = aLRULst.GetPos( pDel );
ASSERT( USHRT_MAX != nDelPos, "String nicht gefunden" );
aLRULst.Remove( nDelPos );
--nPos;
@@ -397,8 +397,8 @@ void SwAutoCompleteWord::SetMinWordLen( USHORT n )
nMinWrdLen = n;
}
-BOOL SwAutoCompleteWord::GetRange( const String& rWord, USHORT& rStt,
- USHORT& rEnd ) const
+sal_Bool SwAutoCompleteWord::GetRange( const String& rWord, sal_uInt16& rStt,
+ sal_uInt16& rEnd ) const
{
const StringPtr pStr = (StringPtr)&rWord;
aWordLst.Seek_Entry( pStr, &rStt );
@@ -413,8 +413,8 @@ BOOL SwAutoCompleteWord::GetRange( const String& rWord, USHORT& rStt,
void SwAutoCompleteWord::CheckChangedList( const SvStringsISortDtor& rNewLst )
{
- USHORT nMyLen = aWordLst.Count(), nNewLen = rNewLst.Count();
- USHORT nMyPos = 0, nNewPos = 0;
+ sal_uInt16 nMyLen = aWordLst.Count(), nNewLen = rNewLst.Count();
+ sal_uInt16 nMyPos = 0, nNewPos = 0;
for( ; nMyPos < nMyLen && nNewPos < nNewLen; ++nMyPos, ++nNewPos )
{
@@ -424,7 +424,7 @@ void SwAutoCompleteWord::CheckChangedList( const SvStringsISortDtor& rNewLst )
void* pDel = aWordLst[ nMyPos ];
aWordLst.Remove(nMyPos);
- USHORT nPos = aLRULst.GetPos( pDel );
+ sal_uInt16 nPos = aLRULst.GetPos( pDel );
ASSERT( USHRT_MAX != nPos, "String nicht gefunden" );
aLRULst.Remove( nPos );
delete (SwAutoCompleteString*)pDel;
@@ -439,7 +439,7 @@ void SwAutoCompleteWord::CheckChangedList( const SvStringsISortDtor& rNewLst )
for( ; nNewPos < nMyLen; ++nNewPos )
{
void* pDel = aWordLst[ nNewPos ];
- USHORT nPos = aLRULst.GetPos( pDel );
+ sal_uInt16 nPos = aLRULst.GetPos( pDel );
ASSERT( USHRT_MAX != nPos, "String nicht gefunden" );
aLRULst.Remove( nPos );
delete (SwAutoCompleteString*)pDel;
@@ -457,13 +457,13 @@ void SwAutoCompleteWord::DocumentDying(const SwDoc& rDoc)
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get()->GetAutoCorrect();
const sal_Bool bDelete = !pACorr->GetSwFlags().bAutoCmpltKeepList;
- for(USHORT nPos = aWordLst.Count(); nPos; nPos--)
+ for(sal_uInt16 nPos = aWordLst.Count(); nPos; nPos--)
{
SwAutoCompleteString* pCurrent = (SwAutoCompleteString*)aWordLst[ nPos - 1 ];
if(pCurrent->RemoveDocument(rDoc) && bDelete)
{
aWordLst.Remove( nPos - 1 );
- USHORT nLRUPos = aLRULst.GetPos( (void*)pCurrent );
+ sal_uInt16 nLRUPos = aLRULst.GetPos( (void*)pCurrent );
DBG_ASSERT(nLRUPos < USHRT_MAX, "word not found in LRU list" );
aLRULst.Remove( nLRUPos );
delete pCurrent;
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 3c85091c7d20..bd42d09bcd24 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -117,15 +117,15 @@ SW_DLLPUBLIC const char * dbg_out(const ::rtl::OUString & aStr)
struct CompareUShort
{
- bool operator()(USHORT a, USHORT b) const
+ bool operator()(sal_uInt16 a, sal_uInt16 b) const
{
return a < b;
}
};
-map<USHORT,String,CompareUShort> & GetItemWhichMap()
+map<sal_uInt16,String,CompareUShort> & GetItemWhichMap()
{
- static map<USHORT,String,CompareUShort> aItemWhichMap;
+ static map<sal_uInt16,String,CompareUShort> aItemWhichMap;
static bool bInitialized = false;
if (! bInitialized)
@@ -341,7 +341,7 @@ const String lcl_dbg_out(const SwpHints & rHints)
{
String aStr("[ SwpHints\n", RTL_TEXTENCODING_ASCII_US);
- for (USHORT i = 0; i < rHints.Count(); i++)
+ for (sal_uInt16 i = 0; i < rHints.Count(); i++)
{
aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
aStr += lcl_dbg_out(*rHints[i]);
@@ -472,7 +472,7 @@ const String lcl_AnchoredFrames(const SwNode & rNode)
if (pFrmFmts)
{
bool bFirst = true;
- for (USHORT nI = 0; nI < pFrmFmts->Count(); nI++)
+ for (sal_uInt16 nI = 0; nI < pFrmFmts->Count(); nI++)
{
const SwFmtAnchor & rAnchor = (*pFrmFmts)[nI]->GetAnchor();
const SwPosition * pPos = rAnchor.GetCntntAnchor();
@@ -601,7 +601,7 @@ String lcl_dbg_out(const SwNode & rNode)
const SfxPoolItem * pItem = NULL;
if (pAttrSet && SFX_ITEM_SET ==
- pAttrSet->GetItemState(RES_PARATR_NUMRULE, FALSE, &pItem))
+ pAttrSet->GetItemState(RES_PARATR_NUMRULE, sal_False, &pItem))
{
aTmpStr += String("(", RTL_TEXTENCODING_ASCII_US);
aTmpStr +=
@@ -614,7 +614,7 @@ String lcl_dbg_out(const SwNode & rNode)
aTmpStr += String("</rule>", RTL_TEXTENCODING_ASCII_US);
if (pTxtNode->GetActualListLevel() > 0)
- pNumFmt = pNumRule->GetNumFmt( static_cast< USHORT >(pTxtNode->GetActualListLevel()) );
+ pNumFmt = pNumRule->GetNumFmt( static_cast< sal_uInt16 >(pTxtNode->GetActualListLevel()) );
if (pNumFmt)
{
@@ -721,7 +721,7 @@ SW_DLLPUBLIC const char * dbg_out(const SwTxtNode * pNode)
return NULL;
}
-BOOL lcl_dbg_add_node(const SwNodePtr & pNode, void * pArgs)
+sal_Bool lcl_dbg_add_node(const SwNodePtr & pNode, void * pArgs)
{
if (pNode)
{
@@ -730,10 +730,10 @@ BOOL lcl_dbg_add_node(const SwNodePtr & pNode, void * pArgs)
}
//MBA: this code didn't compile, needed to add a return value
- return TRUE;
+ return sal_True;
}
-void lcl_dbg_nodes_inner(String & aStr, SwNodes & rNodes, ULONG & nIndex)
+void lcl_dbg_nodes_inner(String & aStr, SwNodes & rNodes, sal_uLong & nIndex)
{
SwNode * pNode = rNodes[nIndex];
SwStartNode * pStartNode = dynamic_cast<SwStartNode *> (pNode);
@@ -742,8 +742,8 @@ void lcl_dbg_nodes_inner(String & aStr, SwNodes & rNodes, ULONG & nIndex)
if (pStartNode != NULL)
pEndNode = pStartNode->EndOfSectionNode();
- ULONG nCount = rNodes.Count();
- ULONG nStartIndex = nIndex;
+ sal_uLong nCount = rNodes.Count();
+ sal_uLong nStartIndex = nIndex;
bool bDone = false;
@@ -786,8 +786,8 @@ String lcl_dbg_out(SwNodes & rNodes)
{
String aStr("<nodes-array>", RTL_TEXTENCODING_ASCII_US);
- ULONG nIndex = 0;
- ULONG nCount = rNodes.Count();
+ sal_uLong nIndex = 0;
+ sal_uLong nCount = rNodes.Count();
while (nIndex < nCount)
{
@@ -860,7 +860,7 @@ String lcl_dbg_out(SwOutlineNodes & rNodes)
{
String aStr("[\n", RTL_TEXTENCODING_ASCII_US);
- for (USHORT i = 0; i < rNodes.Count(); i++)
+ for (sal_uInt16 i = 0; i < rNodes.Count(); i++)
{
aStr += lcl_dbg_out(*rNodes[i]);
aStr += String("\n", RTL_TEXTENCODING_ASCII_US);
@@ -878,18 +878,18 @@ SW_DLLPUBLIC const char * dbg_out(SwOutlineNodes & rNodes)
String lcl_dbg_out(const SwUndos & rUndos)
{
- USHORT nIndent = 0;
+ sal_uInt16 nIndent = 0;
String aStr("[\n", RTL_TEXTENCODING_ASCII_US);
- for (USHORT n = 0; n < rUndos.Count(); n++)
+ for (sal_uInt16 n = 0; n < rUndos.Count(); n++)
{
SwUndo * pUndo = rUndos[n];
if (pUndo->GetId() == UNDO_END)
nIndent--;
- for (USHORT nI = 0; n < nIndent; nI++)
+ for (sal_uInt16 nI = 0; n < nIndent; nI++)
aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
aStr += lcl_dbg_out(*pUndo);
@@ -940,7 +940,7 @@ String lcl_dbg_out(const SwNumRule & rRule)
aResult += rRule.GetName();
aResult += String(" [", RTL_TEXTENCODING_ASCII_US);
- for (BYTE n = 0; n < MAXLEVEL; n++)
+ for (sal_uInt8 n = 0; n < MAXLEVEL; n++)
{
if (n > 0)
aResult += String(", ", RTL_TEXTENCODING_ASCII_US);
@@ -990,7 +990,7 @@ String lcl_dbg_out(const SwNumRuleTbl & rTbl)
{
String aResult("[", RTL_TEXTENCODING_ASCII_US);
- for (USHORT n = 0; n < rTbl.Count(); n++)
+ for (sal_uInt16 n = 0; n < rTbl.Count(); n++)
{
if (n > 0)
aResult += String(", ", RTL_TEXTENCODING_ASCII_US);
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 9b835a1a4b05..a61ab3364e30 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -245,8 +245,8 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
mbOldNumbering = value;
const SwNumRuleTbl& rNmTbl = GetNumRuleTbl();
- for( USHORT n = 0; n < rNmTbl.Count(); ++n )
- rNmTbl[n]->SetInvalidRule(TRUE);
+ for( sal_uInt16 n = 0; n < rNmTbl.Count(); ++n )
+ rNmTbl[n]->SetInvalidRule(sal_True);
UpdateNumRule();
@@ -355,17 +355,17 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
}
const i18n::ForbiddenCharacters*
- SwDoc::getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const
+ SwDoc::getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const
{
const i18n::ForbiddenCharacters* pRet = 0;
if( xForbiddenCharsTable.isValid() )
- pRet = xForbiddenCharsTable->GetForbiddenCharacters( nLang, FALSE );
+ pRet = xForbiddenCharsTable->GetForbiddenCharacters( nLang, sal_False );
if( bLocaleData && !pRet && pBreakIt )
pRet = &pBreakIt->GetForbidden( (LanguageType)nLang );
return pRet;
}
-void SwDoc::setForbiddenCharacters(/*[in]*/ USHORT nLang,
+void SwDoc::setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang,
/*[in]*/ const i18n::ForbiddenCharacters& rFChars )
{
if( !xForbiddenCharsTable.isValid() )
@@ -447,7 +447,7 @@ void SwDoc::setCharacterCompressionType( /*[in]*/SwCharCompressType n )
eChrCmprType = n;
if( pDrawModel )
{
- pDrawModel->SetCharCompressType( static_cast<UINT16>(n) );
+ pDrawModel->SetCharCompressType( static_cast<sal_uInt16>(n) );
if( !mbInReading )
pDrawModel->ReformatAllTextObjects();
}
@@ -593,8 +593,8 @@ const JobSetup* SwDoc::getJobsetup() const
void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup )
{
- BOOL bCheckPageDescs = 0 == pPrt;
- BOOL bDataChanged = FALSE;
+ sal_Bool bCheckPageDescs = 0 == pPrt;
+ sal_Bool bDataChanged = sal_False;
if ( pPrt )
{
@@ -603,7 +603,7 @@ void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup )
if ( pPrt->GetJobSetup() != rJobSetup )
{
pPrt->SetJobSetup( rJobSetup );
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
}
else
@@ -625,7 +625,7 @@ void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup )
else
{
pPrt = p;
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
}
if ( bDataChanged && !get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) )
@@ -694,7 +694,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
// einen Absatz ein
if( bChkTableStart && !rPos.nContent.GetIndex() && pNode->IsTxtNode() )
{
- ULONG nPrevPos = rPos.nNode.GetIndex() - 1;
+ sal_uLong nPrevPos = rPos.nNode.GetIndex() - 1;
const SwTableNode* pTblNd;
const SwNode* pNd = GetNodes()[ nPrevPos ];
if( pNd->IsStartNode() &&
@@ -717,8 +717,8 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
{
// Dann nur, wenn die Tabelle Umbrueche traegt!
const SwFrmFmt* pFrmFmt = pTblNd->GetTable().GetFrmFmt();
- if( SFX_ITEM_SET != pFrmFmt->GetItemState(RES_PAGEDESC, FALSE) &&
- SFX_ITEM_SET != pFrmFmt->GetItemState( RES_BREAK, FALSE ) )
+ if( SFX_ITEM_SET != pFrmFmt->GetItemState(RES_PAGEDESC, sal_False) &&
+ SFX_ITEM_SET != pFrmFmt->GetItemState( RES_BREAK, sal_False ) )
pNd = 0;
}
}
@@ -739,13 +739,13 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
SwFrmFmt* pFrmFmt = pTblNd->GetTable().GetFrmFmt();
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pFrmFmt->GetItemState( RES_PAGEDESC,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
pTxtNd->SetAttr( *pItem );
pFrmFmt->ResetFmtAttr( RES_PAGEDESC );
}
if( SFX_ITEM_SET == pFrmFmt->GetItemState( RES_BREAK,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
pTxtNd->SetAttr( *pItem );
pFrmFmt->ResetFmtAttr( RES_BREAK );
@@ -771,7 +771,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
{
// verschiebe noch alle Bookmarks/TOXMarks/FlyAtCnt
if( aBkmkArr.Count() )
- _RestoreCntntIdx( this, aBkmkArr, rPos.nNode.GetIndex()-1, 0, TRUE );
+ _RestoreCntntIdx( this, aBkmkArr, rPos.nNode.GetIndex()-1, 0, sal_True );
if( IsRedlineOn() || (!IsIgnoreRedline() && pRedlineTbl->Count() ))
{
@@ -826,7 +826,7 @@ bool SwDoc::AppendTxtNode( SwPosition& rPos )
}
SetModified();
- return TRUE;
+ return sal_True;
}
bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
@@ -875,7 +875,7 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
if (!(nInsertMode & IDocumentContentOperations::INS_FORCEHINTEXPAND))
// -> #111827#
{
- USHORT const nUndoSize = pUndos->Count();
+ sal_uInt16 const nUndoSize = pUndos->Count();
if (0 != nUndoSize)
{
SwUndo * const pLastUndo = (*pUndos)[ nUndoSize - 1 ];
@@ -913,7 +913,7 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
for( xub_StrLen i = 0; i < rStr.Len(); ++i )
{
nInsPos++;
- // wenn CanGrouping() TRUE returnt, ist schon alles erledigt
+ // wenn CanGrouping() sal_True returnt, ist schon alles erledigt
if( !pUndo->CanGrouping( rStr.GetChar( i ) ))
{
pUndo = new SwUndoInsert( rPos.nNode, nInsPos, 1, nInsertMode,
@@ -994,7 +994,7 @@ SwFlyFrmFmt* SwDoc::Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj,
{
if( !pFrmFmt )
{
- USHORT nId = RES_POOLFRM_OLE;
+ sal_uInt16 nId = RES_POOLFRM_OLE;
SvGlobalName aClassName( xObj->getClassID() );
if (SotExchange::IsMath(aClassName))
nId = RES_POOLFRM_FORMEL;
@@ -1034,9 +1034,9 @@ SwFlyFrmFmt* SwDoc::InsertOLE(const SwPaM &rRg, const String& rObjName,
|* Beschreibung: liefert den am Doc eingerichteten Feldtypen zurueck
*************************************************************************/
-SwFieldType *SwDoc::GetSysFldType( const USHORT eWhich ) const
+SwFieldType *SwDoc::GetSysFldType( const sal_uInt16 eWhich ) const
{
- for( USHORT i = 0; i < INIT_FLDTYPES; ++i )
+ for( sal_uInt16 i = 0; i < INIT_FLDTYPES; ++i )
if( eWhich == (*pFldTypes)[i]->Which() )
return (*pFldTypes)[i];
return 0;
@@ -1063,9 +1063,9 @@ struct _PostItFld : public _SetGetExpFld
_PostItFld( const SwNodeIndex& rNdIdx, const SwTxtFld* pFld, const SwIndex* pIdx = 0 )
: _SetGetExpFld( rNdIdx, pFld, pIdx ) {}
- USHORT GetPageNo( const StringRangeEnumerator &rRangeEnum,
+ sal_uInt16 GetPageNo( const StringRangeEnumerator &rRangeEnum,
const std::set< sal_Int32 > &rPossiblePages,
- USHORT& rVirtPgNo, USHORT& rLineNo );
+ sal_uInt16& rVirtPgNo, sal_uInt16& rLineNo );
SwPostItField* GetPostIt() const
{
@@ -1074,10 +1074,10 @@ struct _PostItFld : public _SetGetExpFld
};
-USHORT _PostItFld::GetPageNo(
+sal_uInt16 _PostItFld::GetPageNo(
const StringRangeEnumerator &rRangeEnum,
const std::set< sal_Int32 > &rPossiblePages,
- /* out */ USHORT& rVirtPgNo, /* out */ USHORT& rLineNo )
+ /* out */ sal_uInt16& rVirtPgNo, /* out */ sal_uInt16& rLineNo )
{
//Problem: Wenn ein PostItFld in einem Node steht, der von mehr als
//einer Layout-Instanz repraesentiert wird, steht die Frage im Raum,
@@ -1086,7 +1086,7 @@ USHORT _PostItFld::GetPageNo(
//sondern die des ersten Auftretens des PostIts innerhalb des selektierten
//Bereichs ermittelt werden.
rVirtPgNo = 0;
- USHORT nPos = GetCntnt();
+ sal_uInt16 nPos = GetCntnt();
SwClientIter aIter( (SwModify &)GetFld()->GetTxtNode() );
for( SwTxtFrm* pFrm = (SwTxtFrm*)aIter.First( TYPE( SwFrm ));
pFrm; pFrm = (SwTxtFrm*)aIter.Next() )
@@ -1094,10 +1094,10 @@ USHORT _PostItFld::GetPageNo(
if( pFrm->GetOfst() > nPos ||
(pFrm->HasFollow() && pFrm->GetFollow()->GetOfst() <= nPos) )
continue;
- USHORT nPgNo = pFrm->GetPhyPageNum();
+ sal_uInt16 nPgNo = pFrm->GetPhyPageNum();
if( rRangeEnum.hasValue( nPgNo, &rPossiblePages ))
{
- rLineNo = (USHORT)(pFrm->GetLineCount( nPos ) +
+ rLineNo = (sal_uInt16)(pFrm->GetLineCount( nPos ) +
pFrm->GetAllLines() - pFrm->GetThisLines());
rVirtPgNo = pFrm->GetVirtPageNum();
return nPgNo;
@@ -1150,7 +1150,7 @@ static void lcl_FormatPostIt(
SwPaM& aPam,
SwPostItField* pField,
bool bNewPage, bool bIsFirstPostIt,
- USHORT nPageNo, USHORT nLineNo )
+ sal_uInt16 nPageNo, sal_uInt16 nLineNo )
{
static char __READONLY_DATA sTmp[] = " : ";
@@ -1206,7 +1206,7 @@ static sal_Int32 lcl_GetPaperBin( const SwPageFrm *pStartFrm )
const SwFrmFmt &rFmt = pStartFrm->GetPageDesc()->GetMaster();
const SfxPoolItem *pItem = NULL;
- SfxItemState eState = rFmt.GetItemState( RES_PAPER_BIN, FALSE, &pItem );
+ SfxItemState eState = rFmt.GetItemState( RES_PAPER_BIN, sal_False, &pItem );
const SvxPaperBinItem *pPaperBinItem = dynamic_cast< const SvxPaperBinItem * >(pItem);
if (eState > SFX_ITEM_DEFAULT && pPaperBinItem)
nRes = pPaperBinItem->GetValue();
@@ -1244,31 +1244,31 @@ void SwDoc::CalculatePagesForPrinting(
const SwPageFrm *pStPage = (SwPageFrm*)pLayout->Lower();
const SwFrm *pEndPage = pStPage;
- USHORT nFirstPageNo = 0;
- USHORT nLastPageNo = 0;
- USHORT nPageNo = 1;
+ sal_uInt16 nFirstPageNo = 0;
+ sal_uInt16 nLastPageNo = 0;
+ sal_uInt16 nPageNo = 1;
- for( USHORT i = 1; i <= (USHORT)aPages.Max(); ++i )
+ for( sal_uInt16 i = 1; i <= (sal_uInt16)aPages.Max(); ++i )
{
- if( i < (USHORT)aPages.Min() )
+ if( i < (sal_uInt16)aPages.Min() )
{
if( !pStPage->GetNext() )
break;
pStPage = (SwPageFrm*)pStPage->GetNext();
pEndPage= pStPage;
}
- else if( i == (USHORT)aPages.Min() )
+ else if( i == (sal_uInt16)aPages.Min() )
{
nFirstPageNo = i;
nLastPageNo = nFirstPageNo;
- if( !pStPage->GetNext() || (i == (USHORT)aPages.Max()) )
+ if( !pStPage->GetNext() || (i == (sal_uInt16)aPages.Max()) )
break;
pEndPage = pStPage->GetNext();
}
- else if( i > (USHORT)aPages.Min() )
+ else if( i > (sal_uInt16)aPages.Min() )
{
nLastPageNo = i;
- if( !pEndPage->GetNext() || (i == (USHORT)aPages.Max()) )
+ if( !pEndPage->GetNext() || (i == (sal_uInt16)aPages.Max()) )
break;
pEndPage = pEndPage->GetNext();
}
@@ -1281,7 +1281,7 @@ void SwDoc::CalculatePagesForPrinting(
// geschaffen werden, alle Seiten von Seite x an zu deselektieren.
// Z.B. durch SetTotalRange ....
-// aMulti.Select( Range( nLastPageNo+1, SELECTION_MAX ), FALSE );
+// aMulti.Select( Range( nLastPageNo+1, SELECTION_MAX ), sal_False );
MultiSelection aTmpMulti( Range( 1, nLastPageNo ) );
long nTmpIdx = aMulti.FirstSelected();
static long nEndOfSelection = SFX_ENDOFSELECTION;
@@ -1302,7 +1302,7 @@ void SwDoc::CalculatePagesForPrinting(
rValidStartFrms.clear();
while ( pStPage )
{
- const BOOL bRightPg = pStPage->OnRightPage();
+ const sal_Bool bRightPg = pStPage->OnRightPage();
if ( aMulti.IsSelected( nPageNo ) &&
( (bRightPg && bPrintRightPages) ||
(!bRightPg && bPrintLeftPages) ) )
@@ -1390,7 +1390,7 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
sal_Int16 nPostItMode = (sal_Int16) rOptions.getIntValue( "PrintAnnotationMode", 0 );
DBG_ASSERT(nPostItMode == POSTITS_NONE || rData.HasPostItData(),
"print post-its without post-it data?" );
- const USHORT nPostItCount = rData.HasPostItData() ? rData.m_pPostItFields->Count() : 0;
+ const sal_uInt16 nPostItCount = rData.HasPostItData() ? rData.m_pPostItFields->Count() : 0;
if (nPostItMode != POSTITS_NONE && nPostItCount > 0)
{
SET_CURR_SHELL( rData.m_pPostItShell );
@@ -1414,9 +1414,9 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
// temporary post-it document.
// Since the array of post-it fileds is sorted by page and line number we will
// already get them in the correct order
- USHORT nVirtPg = 0, nLineNo = 0, nLastPageNum = 0, nPhyPageNum = 0;
+ sal_uInt16 nVirtPg = 0, nLineNo = 0, nLastPageNum = 0, nPhyPageNum = 0;
bool bIsFirstPostIt = true;
- for (USHORT i = 0; i < nPostItCount; ++i)
+ for (sal_uInt16 i = 0; i < nPostItCount; ++i)
{
_PostItFld& rPostIt = (_PostItFld&)*(*rData.m_pPostItFields)[ i ];
nLastPageNum = nPhyPageNum;
@@ -1657,7 +1657,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
// dann sorge mal dafuer, das alle Seiten in der richtigen
// Reihenfolge stehen:
- USHORT nSPg = 0, nEPg = aVec.size(), nStep = 1;
+ sal_uInt16 nSPg = 0, nEPg = aVec.size(), nStep = 1;
if ( 0 == (nEPg & 1 )) // ungerade gibt es nicht!
--nEPg;
@@ -1672,7 +1672,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
// the number of 'virtual' pages to be printed
sal_Int32 nCntPage = (( nEPg - nSPg ) / ( 2 * nStep )) + 1;
- for ( USHORT nPrintCount = 0; nSPg < nEPg &&
+ for ( sal_uInt16 nPrintCount = 0; nSPg < nEPg &&
nPrintCount < nCntPage; ++nPrintCount )
{
pStPage = aVec[ nSPg ];
@@ -1754,7 +1754,7 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
rStat.nPara = 0; // Default ist auf 1 !!
SwNode* pNd;
- for( ULONG i = GetNodes().Count(); i; )
+ for( sal_uLong i = GetNodes().Count(); i; )
{
switch( ( pNd = GetNodes()[ --i ])->GetNodeType() )
{
@@ -1787,7 +1787,7 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
}
rStat.nPage = GetRootFrm() ? GetRootFrm()->GetPageNum() : 0;
- rStat.bModified = FALSE;
+ rStat.bModified = sal_False;
SetDocStat( rStat );
com::sun::star::uno::Sequence < com::sun::star::beans::NamedValue > aStat( rStat.nPage ? 7 : 6);
@@ -1864,7 +1864,7 @@ const SwFmtRefMark* SwDoc::GetRefMark( const String& rName ) const
}
// returne die RefMark per Index - fuer Uno
-const SwFmtRefMark* SwDoc::GetRefMark( USHORT nIndex ) const
+const SwFmtRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex ) const
{
const SfxPoolItem* pItem;
const SwTxtRefMark* pTxtRef;
@@ -1891,7 +1891,7 @@ const SwFmtRefMark* SwDoc::GetRefMark( USHORT nIndex ) const
//JP 24.06.96: Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine
// RefMark gesetzt ist
// OS 25.06.96: ab jetzt wird immer die Anzahl der Referenzen returnt
-USHORT SwDoc::GetRefMarks( SvStringsDtor* pNames ) const
+sal_uInt16 SwDoc::GetRefMarks( SvStringsDtor* pNames ) const
{
const SfxPoolItem* pItem;
const SwTxtRefMark* pTxtRef;
@@ -1973,13 +1973,13 @@ void SwDoc::SetModified()
// Bit 0: -> alter Zustand
// Bit 1: -> neuer Zustand
long nCall = mbModified ? 3 : 2;
- mbModified = TRUE;
- pDocStat->bModified = TRUE;
+ mbModified = sal_True;
+ pDocStat->bModified = sal_True;
if( aOle2Link.IsSet() )
{
- mbInCallModified = TRUE;
+ mbInCallModified = sal_True;
aOle2Link.Call( (void*)nCall );
- mbInCallModified = FALSE;
+ mbInCallModified = sal_False;
}
if( pACEWord && !pACEWord->IsDeleted() )
@@ -1992,17 +1992,17 @@ void SwDoc::ResetModified()
// Bit 0: -> alter Zustand
// Bit 1: -> neuer Zustand
long nCall = mbModified ? 1 : 0;
- mbModified = FALSE;
+ mbModified = sal_False;
// If there is already a document statistic, we assume that
// it is correct. In this case we reset the modified flag.
if ( 0 != pDocStat->nChar )
- pDocStat->bModified = FALSE;
+ pDocStat->bModified = sal_False;
nUndoSavePos = nUndoPos;
if( nCall && aOle2Link.IsSet() )
{
- mbInCallModified = TRUE;
+ mbInCallModified = sal_True;
aOle2Link.Call( (void*)nCall );
- mbInCallModified = FALSE;
+ mbInCallModified = sal_False;
}
}
@@ -2028,15 +2028,15 @@ void SwDoc::ReRead( SwPaM& rPam, const String& rGrfName,
GetMirrorGrf().GetValue() )
pGrfNd->SetAttr( SwMirrorGrf() );
- pGrfNd->ReRead( rGrfName, rFltName, pGraphic, pGrafObj, TRUE );
+ pGrfNd->ReRead( rGrfName, rFltName, pGraphic, pGrafObj, sal_True );
SetModified();
}
}
-BOOL lcl_SpellAndGrammarAgain( const SwNodePtr& rpNd, void* pArgs )
+sal_Bool lcl_SpellAndGrammarAgain( const SwNodePtr& rpNd, void* pArgs )
{
SwTxtNode *pTxtNode = (SwTxtNode*)rpNd->GetTxtNode();
- BOOL bOnlyWrong = *(BOOL*)pArgs;
+ sal_Bool bOnlyWrong = *(sal_Bool*)pArgs;
if( pTxtNode )
{
if( bOnlyWrong )
@@ -2058,13 +2058,13 @@ BOOL lcl_SpellAndGrammarAgain( const SwNodePtr& rpNd, void* pArgs )
pTxtNode->GetGrammarCheck()->SetInvalid( 0, STRING_LEN );
}
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* )
+sal_Bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* )
{
SwTxtNode *pTxtNode = (SwTxtNode*)rpNd->GetTxtNode();
-// BOOL bOnlyWrong = *(BOOL*)pArgs;
+// sal_Bool bOnlyWrong = *(sal_Bool*)pArgs;
if( pTxtNode )
{
pTxtNode->SetSmartTagDirty( true );
@@ -2076,22 +2076,22 @@ BOOL lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* )
pTxtNode->SetSmartTags( NULL );
}
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
- * SwDoc::SpellItAgainSam( BOOL bInvalid, BOOL bOnlyWrong )
+ * SwDoc::SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong )
*
* stoesst das Spelling im Idle-Handler wieder an.
- * Wird bInvalid als TRUE uebergeben, so werden zusaetzlich die WrongListen
+ * Wird bInvalid als sal_True uebergeben, so werden zusaetzlich die WrongListen
* an allen Nodes invalidiert und auf allen Seiten das SpellInvalid-Flag
* gesetzt.
* Mit bOnlyWrong kann man dann steuern, ob nur die Bereiche mit falschen
* Woertern oder die kompletten Bereiche neu ueberprueft werden muessen.
************************************************************************/
-void SwDoc::SpellItAgainSam( BOOL bInvalid, BOOL bOnlyWrong, BOOL bSmartTags )
+void SwDoc::SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong, sal_Bool bSmartTags )
{
ASSERT( GetRootFrm(), "SpellAgain: Where's my RootFrm?" );
if( bInvalid )
@@ -2126,7 +2126,7 @@ void SwDoc::InvalidateAutoCompleteFlag()
pPage->InvalidateAutoCompleteWords();
pPage = (SwPageFrm*)pPage->GetNext();
}
- for( ULONG nNd = 1, nCnt = GetNodes().Count(); nNd < nCnt; ++nNd )
+ for( sal_uLong nNd = 1, nCnt = GetNodes().Count(); nNd < nCnt; ++nNd )
{
SwTxtNode* pTxtNode = GetNodes()[ nNd ]->GetTxtNode();
if ( pTxtNode ) pTxtNode->SetAutoCompleteWordDirty( true );
@@ -2155,28 +2155,28 @@ const SwFmtINetFmt* SwDoc::FindINetAttr( const String& rName ) const
return 0;
}
-void SwDoc::Summary( SwDoc* pExtDoc, BYTE nLevel, BYTE nPara, BOOL bImpress )
+void SwDoc::Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, sal_Bool bImpress )
{
const SwOutlineNodes& rOutNds = GetNodes().GetOutLineNds();
if( pExtDoc && rOutNds.Count() )
{
- USHORT i;
+ sal_uInt16 i;
::StartProgress( STR_STATSTR_SUMMARY, 0, rOutNds.Count(), GetDocShell() );
SwNodeIndex aEndOfDoc( pExtDoc->GetNodes().GetEndOfContent(), -1 );
for( i = 0; i < rOutNds.Count(); ++i )
{
::SetProgressState( i, GetDocShell() );
- const ULONG nIndex = rOutNds[ i ]->GetIndex();
- //BYTE nLvl = ((SwTxtNode*)GetNodes()[ nIndex ])->GetTxtColl()//#outline level,zhaojianwei
+ const sal_uLong nIndex = rOutNds[ i ]->GetIndex();
+ //sal_uInt8 nLvl = ((SwTxtNode*)GetNodes()[ nIndex ])->GetTxtColl()//#outline level,zhaojianwei
// ->GetOutlineLevel();
const int nLvl = ((SwTxtNode*)GetNodes()[ nIndex ])->GetAttrOutlineLevel()-1;//<-end,zhaojianwei
if( nLvl > nLevel )
continue;
- USHORT nEndOfs = 1;
- BYTE nWish = nPara;
- ULONG nNextOutNd = i + 1 < rOutNds.Count() ?
+ sal_uInt16 nEndOfs = 1;
+ sal_uInt8 nWish = nPara;
+ sal_uLong nNextOutNd = i + 1 < rOutNds.Count() ?
rOutNds[ i + 1 ]->GetIndex() : GetNodes().Count();
- BOOL bKeep = FALSE;
+ sal_Bool bKeep = sal_False;
while( ( nWish || bKeep ) && nIndex + nEndOfs < nNextOutNd &&
GetNodes()[ nIndex + nEndOfs ]->IsTxtNode() )
{
@@ -2198,7 +2198,7 @@ void SwDoc::Summary( SwDoc* pExtDoc, BYTE nLevel, BYTE nPara, BOOL bImpress )
while( aIndx < aEndOfDoc )
{
SwNode *pNode;
- BOOL bDelete = FALSE;
+ sal_Bool bDelete = sal_False;
if( (pNode = &aIndx.GetNode())->IsTxtNode() )
{
SwTxtNode *pNd = (SwTxtNode*)pNode;
@@ -2207,8 +2207,8 @@ void SwDoc::Summary( SwDoc* pExtDoc, BYTE nLevel, BYTE nPara, BOOL bImpress )
if( bImpress )
{
SwTxtFmtColl* pMyColl = pNd->GetTxtColl();
- //USHORT nHeadLine = static_cast<USHORT>(pMyColl->GetOutlineLevel()==NO_NUMBERING ?//#outlinelevel,zhaojianwei
- const USHORT nHeadLine = static_cast<USHORT>(
+ //sal_uInt16 nHeadLine = static_cast<sal_uInt16>(pMyColl->GetOutlineLevel()==NO_NUMBERING ?//#outlinelevel,zhaojianwei
+ const sal_uInt16 nHeadLine = static_cast<sal_uInt16>(
!pMyColl->IsAssignedToListLevelOfOutlineStyle() //<-end,zhaojianwei
? RES_POOLCOLL_HEADLINE2
: RES_POOLCOLL_HEADLINE1 );
@@ -2218,7 +2218,7 @@ void SwDoc::Summary( SwDoc* pExtDoc, BYTE nLevel, BYTE nPara, BOOL bImpress )
if( !pNd->Len() &&
pNd->StartOfSectionIndex()+2 < pNd->EndOfSectionIndex() )
{
- bDelete = TRUE;
+ bDelete = sal_True;
pExtDoc->GetNodes().Delete( aIndx );
}
}
@@ -2231,9 +2231,9 @@ void SwDoc::Summary( SwDoc* pExtDoc, BYTE nLevel, BYTE nPara, BOOL bImpress )
// loesche den nicht sichtbaren Content aus dem Document, wie z.B.:
// versteckte Bereiche, versteckte Absaetze
-BOOL SwDoc::RemoveInvisibleContent()
+sal_Bool SwDoc::RemoveInvisibleContent()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
StartUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL );
{
@@ -2247,7 +2247,7 @@ BOOL SwDoc::RemoveInvisibleContent()
pTxtNd->GetpSwpHints() && pTxtNd->HasHiddenParaField() &&
&pTxtNd->GetNodes() == &GetNodes() )
{
- bRet = TRUE;
+ bRet = sal_True;
SwPaM aPam( *pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().Len() );
// Remove hidden paragraph or delete contents:
@@ -2273,7 +2273,7 @@ BOOL SwDoc::RemoveInvisibleContent()
//
// Remove any hidden paragraph (hidden text attribute)
//
- for( ULONG n = GetNodes().Count(); n; )
+ for( sal_uLong n = GetNodes().Count(); n; )
{
SwTxtNode* pTxtNd = GetNodes()[ --n ]->GetTxtNode();
if ( pTxtNd )
@@ -2282,8 +2282,8 @@ BOOL SwDoc::RemoveInvisibleContent()
SwPaM aPam( *pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().Len() );
if ( pTxtNd->HasHiddenCharAttribute( true ) )
{
- bRemoved = TRUE;
- bRet = TRUE;
+ bRemoved = sal_True;
+ bRet = sal_True;
// Remove hidden paragraph or delete contents:
// Delete contents if
@@ -2305,8 +2305,8 @@ BOOL SwDoc::RemoveInvisibleContent()
}
else if ( pTxtNd->HasHiddenCharAttribute( false ) )
{
- bRemoved = TRUE;
- bRet = TRUE;
+ bRemoved = sal_True;
+ bRet = sal_True;
SwScriptInfo::DeleteHiddenRanges( *pTxtNd );
}
@@ -2323,7 +2323,7 @@ BOOL SwDoc::RemoveInvisibleContent()
// dann noch alle versteckten Bereiche loeschen/leeren
SwSectionFmts aSectFmts;
SwSectionFmts& rSectFmts = GetSections();
- USHORT n;
+ sal_uInt16 n;
for( n = rSectFmts.Count(); n; )
{
@@ -2362,7 +2362,7 @@ BOOL SwDoc::RemoveInvisibleContent()
SwSectionNode* pSectNd = pSectFmt->GetSectionNode();
if( pSectNd )
{
- bRet = TRUE;
+ bRet = sal_True;
SwPaM aPam( *pSectNd );
if( pSectNd->StartOfSectionNode()->StartOfSectionIndex() ==
@@ -2404,9 +2404,9 @@ BOOL SwDoc::RemoveInvisibleContent()
/*-- 25.08.2010 14:18:12---------------------------------------------------
-----------------------------------------------------------------------*/
-BOOL SwDoc::HasInvisibleContent() const
+sal_Bool SwDoc::HasInvisibleContent() const
{
- BOOL bRet = sal_False;
+ sal_Bool bRet = sal_False;
SwClientIter aIter( *GetSysFldType( RES_HIDDENPARAFLD ) );
if( aIter.First( TYPE( SwFmtFld ) ) )
@@ -2417,7 +2417,7 @@ BOOL SwDoc::HasInvisibleContent() const
//
if( ! bRet )
{
- for( ULONG n = GetNodes().Count(); !bRet && (n > 0); )
+ for( sal_uLong n = GetNodes().Count(); !bRet && (n > 0); )
{
SwTxtNode* pTxtNd = GetNodes()[ --n ]->GetTxtNode();
if ( pTxtNd )
@@ -2434,7 +2434,7 @@ BOOL SwDoc::HasInvisibleContent() const
if( ! bRet )
{
const SwSectionFmts& rSectFmts = GetSections();
- USHORT n;
+ sal_uInt16 n;
for( n = rSectFmts.Count(); !bRet && (n > 0); )
{
@@ -2452,9 +2452,9 @@ BOOL SwDoc::HasInvisibleContent() const
/*-- 11.06.2004 08:34:04---------------------------------------------------
-----------------------------------------------------------------------*/
-BOOL SwDoc::ConvertFieldsToText()
+sal_Bool SwDoc::ConvertFieldsToText()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
LockExpFlds();
StartUndo( UNDO_UI_REPLACE, NULL );
@@ -2484,17 +2484,17 @@ BOOL SwDoc::ConvertFieldsToText()
// skip fields that are currently not in the document
// e.g. fields in undo or redo array
- BOOL bSkip = !pTxtFld ||
+ sal_Bool bSkip = !pTxtFld ||
!pTxtFld->GetpTxtNode()->GetNodes().IsDocNodes();
if (!bSkip)
{
- BOOL bInHeaderFooter = IsInHeaderFooter(SwNodeIndex(*pTxtFld->GetpTxtNode()));
+ sal_Bool bInHeaderFooter = IsInHeaderFooter(SwNodeIndex(*pTxtFld->GetpTxtNode()));
const SwFmtFld& rFmtFld = pTxtFld->GetFld();
const SwField* pField = rFmtFld.GetFld();
//#i55595# some fields have to be excluded in headers/footers
- USHORT nWhich = pField->GetTyp()->Which();
+ sal_uInt16 nWhich = pField->GetTyp()->Which();
if(!bInHeaderFooter ||
(nWhich != RES_PAGENUMBERFLD &&
nWhich != RES_CHAPTERFLD &&
@@ -2565,7 +2565,7 @@ bool SwDoc::LinksUpdated() const
// embedded alle lokalen Links (Bereiche/Grafiken)
::sfx2::SvBaseLink* lcl_FindNextRemovableLink( const ::sfx2::SvBaseLinks& rLinks, sfx2::LinkManager& rLnkMgr )
{
- for( USHORT n = 0; n < rLinks.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rLinks.Count(); ++n )
{
::sfx2::SvBaseLink* pLnk = &(*rLinks[ n ]);
if( pLnk &&
@@ -2588,13 +2588,13 @@ bool SwDoc::LinksUpdated() const
}
bool SwDoc::EmbedAllLinks()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
sfx2::LinkManager& rLnkMgr = GetLinkManager();
const ::sfx2::SvBaseLinks& rLinks = rLnkMgr.GetLinks();
if( rLinks.Count() )
{
- BOOL bDoesUndo = DoesUndo();
- DoUndo( FALSE );
+ sal_Bool bDoesUndo = DoesUndo();
+ DoUndo( sal_False );
::sfx2::SvBaseLink* pLnk = 0;
while( 0 != (pLnk = lcl_FindNextRemovableLink( rLinks, rLnkMgr ) ) )
@@ -2607,7 +2607,7 @@ bool SwDoc::EmbedAllLinks()
if( xLink.Is() )
rLnkMgr.Remove( xLink );
- bRet = TRUE;
+ bRet = sal_True;
}
DelAllUndoObj();
@@ -2621,12 +2621,12 @@ bool SwDoc::EmbedAllLinks()
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwDoc::IsInsTblFormatNum() const
+sal_Bool SwDoc::IsInsTblFormatNum() const
{
return SW_MOD()->IsInsTblFormatNum(get(IDocumentSettingAccess::HTML_MODE));
}
-BOOL SwDoc::IsInsTblChangeNumFormat() const
+sal_Bool SwDoc::IsInsTblChangeNumFormat() const
{
return SW_MOD()->IsInsTblChangeNumFormat(get(IDocumentSettingAccess::HTML_MODE));
}
@@ -2635,13 +2635,13 @@ BOOL SwDoc::IsInsTblChangeNumFormat() const
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwDoc::IsInsTblAlignNum() const
+sal_Bool SwDoc::IsInsTblAlignNum() const
{
return SW_MOD()->IsInsTblAlignNum(get(IDocumentSettingAccess::HTML_MODE));
}
// setze das InsertDB als Tabelle Undo auf:
-void SwDoc::AppendUndoForInsertFromDB( const SwPaM& rPam, BOOL bIsTable )
+void SwDoc::AppendUndoForInsertFromDB( const SwPaM& rPam, sal_Bool bIsTable )
{
if( bIsTable )
{
@@ -2656,7 +2656,7 @@ void SwDoc::AppendUndoForInsertFromDB( const SwPaM& rPam, BOOL bIsTable )
else if( rPam.HasMark() )
{
SwUndoCpyDoc* pUndo = new SwUndoCpyDoc( rPam );
- pUndo->SetInsertRange( rPam, FALSE );
+ pUndo->SetInsertRange( rPam, sal_False );
AppendUndo( pUndo );
}
}
@@ -2687,9 +2687,9 @@ String SwDoc::GetPaMDescr(const SwPaM & rPam) const
String aResult;
bool bOK = false;
- if (rPam.GetNode(TRUE) == rPam.GetNode(FALSE))
+ if (rPam.GetNode(sal_True) == rPam.GetNode(sal_False))
{
- SwTxtNode * pTxtNode = rPam.GetNode(TRUE)->GetTxtNode();
+ SwTxtNode * pTxtNode = rPam.GetNode(sal_True)->GetTxtNode();
if (0 != pTxtNode)
{
@@ -2706,9 +2706,9 @@ String SwDoc::GetPaMDescr(const SwPaM & rPam) const
bOK = true;
}
}
- else if (0 != rPam.GetNode(TRUE))
+ else if (0 != rPam.GetNode(sal_True))
{
- if (0 != rPam.GetNode(FALSE))
+ if (0 != rPam.GetNode(sal_False))
aResult += String(SW_RES(STR_PARAGRAPHS));
bOK = true;
@@ -2741,7 +2741,7 @@ SwTxtFld * SwDoc::GetTxtFld(const SwPosition & rPos)
bool SwDoc::ContainsHiddenChars() const
{
- for( ULONG n = GetNodes().Count(); n; )
+ for( sal_uLong n = GetNodes().Count(); n; )
{
SwNode* pNd = GetNodes()[ --n ];
if ( ND_TEXTNODE == pNd->GetNodeType() &&
@@ -2752,7 +2752,7 @@ bool SwDoc::ContainsHiddenChars() const
return false;
}
-SwUnoCrsr* SwDoc::CreateUnoCrsr( const SwPosition& rPos, BOOL bTblCrsr )
+SwUnoCrsr* SwDoc::CreateUnoCrsr( const SwPosition& rPos, sal_Bool bTblCrsr )
{
SwUnoCrsr* pNew;
if( bTblCrsr )
@@ -2766,7 +2766,7 @@ SwUnoCrsr* SwDoc::CreateUnoCrsr( const SwPosition& rPos, BOOL bTblCrsr )
void SwDoc::ChkCondColls()
{
- for (USHORT n = 0; n < pTxtFmtCollTbl->Count(); n++)
+ for (sal_uInt16 n = 0; n < pTxtFmtCollTbl->Count(); n++)
{
SwTxtFmtColl *pColl = (*pTxtFmtCollTbl)[n];
diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx
index 37568933e522..d617b5c5ffa1 100644
--- a/sw/source/core/doc/docbasic.cxx
+++ b/sw/source/core/doc/docbasic.cxx
@@ -55,13 +55,13 @@ static Sequence<Any> *lcl_docbasic_convertArgs( SbxArray& rArgs )
{
Sequence<Any> *pRet = 0;
- USHORT nCount = rArgs.Count();
+ sal_uInt16 nCount = rArgs.Count();
if( nCount > 1 )
{
nCount--;
pRet = new Sequence<Any>( nCount );
Any *pUnoArgs = pRet->getArray();
- for( USHORT i=0; i<nCount; i++ )
+ for( sal_uInt16 i=0; i<nCount; i++ )
{
SbxVariable *pVar = rArgs.Get( i+1 );
switch( pVar->GetType() )
@@ -88,7 +88,7 @@ static Sequence<Any> *lcl_docbasic_convertArgs( SbxArray& rArgs )
return pRet;
}
-BOOL SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs )
+sal_Bool SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs )
{
ErrCode eErr = 0;
switch( rMacro.GetScriptType() )
@@ -153,13 +153,13 @@ BOOL SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs )
-USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
- BOOL bCheckPtr, SbxArray* pArgs, const Link* )
+sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
+ sal_Bool bCheckPtr, SbxArray* pArgs, const Link* )
{
if( !pDocShell ) // ohne DocShell geht das nicht!
return 0;
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
const SvxMacroTableDtor* pTbl = 0;
switch( rCallEvent.eType )
{
@@ -172,7 +172,7 @@ USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) )
&& rCallEvent.PTR.pINetAttr == pItem )
{
- bCheckPtr = FALSE; // als Flag missbrauchen
+ bCheckPtr = sal_False; // als Flag missbrauchen
break;
}
}
@@ -186,9 +186,9 @@ USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
const SwFrmFmtPtr pFmt = (SwFrmFmtPtr)rCallEvent.PTR.pFmt;
if( bCheckPtr )
{
- USHORT nPos = GetSpzFrmFmts()->GetPos( pFmt );
+ sal_uInt16 nPos = GetSpzFrmFmts()->GetPos( pFmt );
if( USHRT_MAX != nPos )
- bCheckPtr = FALSE; // als Flag missbrauchen
+ bCheckPtr = sal_False; // als Flag missbrauchen
}
if( !bCheckPtr )
pTbl = &pFmt->GetMacro().GetMacroTable();
@@ -201,7 +201,7 @@ USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
if( bCheckPtr )
{
const SwFrmFmtPtr pFmt = (SwFrmFmtPtr)rCallEvent.PTR.IMAP.pFmt;
- USHORT nPos = GetSpzFrmFmts()->GetPos( pFmt );
+ sal_uInt16 nPos = GetSpzFrmFmts()->GetPos( pFmt );
const ImageMap* pIMap;
if( USHRT_MAX != nPos &&
0 != (pIMap = pFmt->GetURL().GetMap()) )
@@ -209,7 +209,7 @@ USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
for( nPos = pIMap->GetIMapObjectCount(); nPos; )
if( pIMapObj == pIMap->GetIMapObject( --nPos ))
{
- bCheckPtr = FALSE; // als Flag missbrauchen
+ bCheckPtr = sal_False; // als Flag missbrauchen
break;
}
}
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 587c846667f4..a7185b54ac54 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -247,7 +247,7 @@ namespace
bind(&::rtl::OUString::equals, bind(&IMark::GetName, _1), rName));
}
-#if FALSE
+#if 0
static void lcl_DebugMarks(IDocumentMarkAccess::container_t vMarks)
{
OSL_TRACE("%d Marks", vMarks.size());
@@ -321,7 +321,7 @@ namespace sw { namespace mark
const ::rtl::OUString& rName,
const IDocumentMarkAccess::MarkType eType)
{
-#if FALSE
+#if 0
{
::rtl::OString sName = ::rtl::OUStringToOString(rName, RTL_TEXTENCODING_UTF8);
const SwPosition* const pPos1 = rPaM.GetPoint();
@@ -410,7 +410,7 @@ namespace sw { namespace mark
break;
}
pMarkBase->InitDoc(m_pDoc);
-#if FALSE
+#if 0
OSL_TRACE("--- makeType ---");
OSL_TRACE("Marks");
lcl_DebugMarks(m_vMarks);
@@ -520,7 +520,7 @@ namespace sw { namespace mark
// restore sorting if needed
if(isSortingNeeded)
sortMarks();
-#if FALSE
+#if 0
OSL_TRACE("correctMarksAbsolute");
lcl_DebugMarks(m_vMarks);
#endif
@@ -560,7 +560,7 @@ namespace sw { namespace mark
// restore sorting if needed
if(isSortingNeeded)
sortMarks();
-#if FALSE
+#if 0
OSL_TRACE("correctMarksRelative");
lcl_DebugMarks(m_vMarks);
#endif
@@ -678,7 +678,7 @@ namespace sw { namespace mark
}
if(isSortingNeeded)
sortMarks();
-#if FALSE
+#if 0
OSL_TRACE("deleteMarks");
lcl_DebugMarks(m_vMarks);
#endif
@@ -885,19 +885,19 @@ namespace
class _SwSaveTypeCountContent
{
union {
- struct { USHORT nType, nCount; } TC;
- ULONG nTypeCount;
+ struct { sal_uInt16 nType, nCount; } TC;
+ sal_uLong nTypeCount;
} TYPECOUNT;
xub_StrLen nContent;
public:
_SwSaveTypeCountContent() { TYPECOUNT.nTypeCount = 0; nContent = 0; }
- _SwSaveTypeCountContent( USHORT nType )
+ _SwSaveTypeCountContent( sal_uInt16 nType )
{
SetTypeAndCount( nType, 0 );
nContent = 0;
}
- _SwSaveTypeCountContent( const SvULongs& rArr, USHORT& rPos )
+ _SwSaveTypeCountContent( const SvULongs& rArr, sal_uInt16& rPos )
{
TYPECOUNT.nTypeCount = rArr[ rPos++ ];
nContent = static_cast<xub_StrLen>(rArr[ rPos++ ]);
@@ -908,17 +908,17 @@ namespace
rArr.Insert( nContent, rArr.Count() );
}
- void SetType( USHORT n ) { TYPECOUNT.TC.nType = n; }
- USHORT GetType() const { return TYPECOUNT.TC.nType; }
+ void SetType( sal_uInt16 n ) { TYPECOUNT.TC.nType = n; }
+ sal_uInt16 GetType() const { return TYPECOUNT.TC.nType; }
void IncType() { ++TYPECOUNT.TC.nType; }
void DecType() { --TYPECOUNT.TC.nType; }
- void SetCount( USHORT n ) { TYPECOUNT.TC.nCount = n; }
- USHORT GetCount() const { return TYPECOUNT.TC.nCount; }
- USHORT IncCount() { return ++TYPECOUNT.TC.nCount; }
- USHORT DecCount() { return --TYPECOUNT.TC.nCount; }
+ void SetCount( sal_uInt16 n ) { TYPECOUNT.TC.nCount = n; }
+ sal_uInt16 GetCount() const { return TYPECOUNT.TC.nCount; }
+ sal_uInt16 IncCount() { return ++TYPECOUNT.TC.nCount; }
+ sal_uInt16 DecCount() { return --TYPECOUNT.TC.nCount; }
- void SetTypeAndCount( USHORT nT, USHORT nC )
+ void SetTypeAndCount( sal_uInt16 nT, sal_uInt16 nC )
{ TYPECOUNT.TC.nCount = nC; TYPECOUNT.TC.nType = nT; }
void SetContent( xub_StrLen n ) { nContent = n; }
@@ -934,9 +934,9 @@ namespace
static const int BEHIND_SAME_NODE = 3; // Same node index but content index behind given content index
static const int BEHIND_NODE = 4; // Position behind the given node index
- static int lcl_RelativePosition( const SwPosition& rPos, ULONG nNode, xub_StrLen nCntnt )
+ static int lcl_RelativePosition( const SwPosition& rPos, sal_uLong nNode, xub_StrLen nCntnt )
{
- ULONG nIndex = rPos.nNode.GetIndex();
+ sal_uLong nIndex = rPos.nNode.GetIndex();
int nReturn = BEFORE_NODE;
if( nIndex == nNode )
{
@@ -959,17 +959,17 @@ namespace
return rPos.nNode > rNdIdx || ( pIdx && rPos.nNode == rNdIdx && rPos.nContent > pIdx->GetIndex() );
}
- static void lcl_ChkPaM( SvULongs& rSaveArr, ULONG nNode, xub_StrLen nCntnt,
+ static void lcl_ChkPaM( SvULongs& rSaveArr, sal_uLong nNode, xub_StrLen nCntnt,
const SwPaM& rPam, _SwSaveTypeCountContent& rSave,
- BOOL bChkSelDirection )
+ sal_Bool bChkSelDirection )
{
// SelektionsRichtung beachten
- bool bBound1IsStart = !bChkSelDirection ? TRUE :
+ bool bBound1IsStart = !bChkSelDirection ? sal_True :
( *rPam.GetPoint() < *rPam.GetMark()
? rPam.GetPoint() == &rPam.GetBound()
: rPam.GetMark() == &rPam.GetBound());
- const SwPosition* pPos = &rPam.GetBound( TRUE );
+ const SwPosition* pPos = &rPam.GetBound( sal_True );
if( pPos->nNode.GetIndex() == nNode &&
( bBound1IsStart ? pPos->nContent.GetIndex() < nCntnt
: pPos->nContent.GetIndex() <= nCntnt ))
@@ -978,7 +978,7 @@ namespace
rSave.Add( rSaveArr );
}
- pPos = &rPam.GetBound( FALSE );
+ pPos = &rPam.GetBound( sal_False );
if( pPos->nNode.GetIndex() == nNode &&
( (bBound1IsStart && bChkSelDirection)
? pPos->nContent.GetIndex() <= nCntnt
@@ -1075,12 +1075,12 @@ void SaveBookmark::SetInDoc(
if(pIdx && !m_nNode2)
aPam.GetMark()->nContent += m_nCntnt2;
else
- aPam.GetMark()->nContent.Assign(aPam.GetCntntNode(FALSE), m_nCntnt2);
+ aPam.GetMark()->nContent.Assign(aPam.GetCntntNode(sal_False), m_nCntnt2);
}
else
{
aPam.GetMark()->nNode = m_nNode2;
- aPam.GetMark()->nContent.Assign(aPam.GetCntntNode(FALSE), m_nCntnt2);
+ aPam.GetMark()->nContent.Assign(aPam.GetCntntNode(sal_False), m_nCntnt2);
}
}
@@ -1100,7 +1100,7 @@ void SaveBookmark::SetInDoc(
}
if(!aPam.HasMark()
- || CheckNodesRange(aPam.GetPoint()->nNode, aPam.GetMark()->nNode, TRUE))
+ || CheckNodesRange(aPam.GetPoint()->nNode, aPam.GetMark()->nNode, sal_True))
{
::sw::mark::IBookmark* const pBookmark = dynamic_cast< ::sw::mark::IBookmark* >(pDoc->getIDocumentMarkAccess()->makeMark(aPam, m_aName, m_eOrigBkmType));
if(pBookmark)
@@ -1142,13 +1142,13 @@ void _DelBookmarks(
// Array, das alle Angaben auf die Position als Offset speichert.
// Die neue Zuordung erfolgt nach dem Moven.
SwRedlineTbl& rTbl = (SwRedlineTbl&)pDoc->GetRedlineTbl();
- for(USHORT nCnt = 0; nCnt < rTbl.Count(); ++nCnt )
+ for(sal_uInt16 nCnt = 0; nCnt < rTbl.Count(); ++nCnt )
{
// liegt auf der Position ??
SwRedline* pRedl = rTbl[ nCnt ];
- SwPosition *pRStt = &pRedl->GetBound(TRUE),
- *pREnd = &pRedl->GetBound(FALSE);
+ SwPosition *pRStt = &pRedl->GetBound(sal_True),
+ *pREnd = &pRedl->GetBound(sal_False);
if( *pRStt > *pREnd )
{
SwPosition *pTmp = pRStt; pRStt = pREnd, pREnd = pTmp;
@@ -1161,11 +1161,11 @@ void _DelBookmarks(
pRStt->nContent = *pEndIdx;
else
{
- BOOL bStt = TRUE;
+ sal_Bool bStt = sal_True;
SwCntntNode* pCNd = pRStt->nNode.GetNode().GetCntntNode();
if( !pCNd && 0 == ( pCNd = pDoc->GetNodes().GoNext( &pRStt->nNode )) )
{
- bStt = FALSE;
+ bStt = sal_False;
pRStt->nNode = rStt;
if( 0 == ( pCNd = pDoc->GetNodes().GoPrevious( &pRStt->nNode )) )
{
@@ -1184,11 +1184,11 @@ void _DelBookmarks(
pREnd->nContent = *pSttIdx;
else
{
- BOOL bStt = FALSE;
+ sal_Bool bStt = sal_False;
SwCntntNode* pCNd = pREnd->nNode.GetNode().GetCntntNode();
if( !pCNd && 0 == ( pCNd = pDoc->GetNodes().GoPrevious( &pREnd->nNode )) )
{
- bStt = TRUE;
+ bStt = sal_True;
pREnd->nNode = rEnd;
if( 0 == ( pCNd = pDoc->GetNodes().GoNext( &pREnd->nNode )) )
{
@@ -1204,10 +1204,10 @@ void _DelBookmarks(
}
void _SaveCntntIdx(SwDoc* pDoc,
- ULONG nNode,
+ sal_uLong nNode,
xub_StrLen nCntnt,
SvULongs& rSaveArr,
- BYTE nSaveFly)
+ sal_uInt8 nSaveFly)
{
// 1. Bookmarks
_SwSaveTypeCountContent aSave;
@@ -1288,7 +1288,7 @@ void _SaveCntntIdx(SwDoc* pDoc,
SwFrm* pFrm = pNode->GetFrm();
#if OSL_DEBUG_LEVEL > 1
- static BOOL bViaDoc = FALSE;
+ static sal_Bool bViaDoc = sal_False;
if( bViaDoc )
pFrm = NULL;
#endif
@@ -1382,14 +1382,14 @@ void _SaveCntntIdx(SwDoc* pDoc,
if( _pStkCrsr )
do {
lcl_ChkPaM( rSaveArr, nNode, nCntnt, *_pStkCrsr,
- aSave, FALSE );
+ aSave, sal_False );
aSave.IncCount();
} while ( (_pStkCrsr != 0 ) &&
((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) );
FOREACHPAM_START( PCURSH->_GetCrsr() )
lcl_ChkPaM( rSaveArr, nNode, nCntnt, *PCURCRSR,
- aSave, FALSE );
+ aSave, sal_False );
aSave.IncCount();
FOREACHPAM_END()
@@ -1400,10 +1400,10 @@ void _SaveCntntIdx(SwDoc* pDoc,
{
aSave.SetTypeAndCount( 0x400, 0 );
const SwUnoCrsrTbl& rTbl = pDoc->GetUnoCrsrTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
FOREACHPAM_START( rTbl[ n ] )
- lcl_ChkPaM( rSaveArr, nNode, nCntnt, *PCURCRSR, aSave, FALSE );
+ lcl_ChkPaM( rSaveArr, nNode, nCntnt, *PCURCRSR, aSave, sal_False );
aSave.IncCount();
FOREACHPAM_END()
@@ -1412,7 +1412,7 @@ void _SaveCntntIdx(SwDoc* pDoc,
if( pUnoTblCrsr )
{
FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() )
- lcl_ChkPaM( rSaveArr, nNode, nCntnt, *PCURCRSR, aSave, FALSE );
+ lcl_ChkPaM( rSaveArr, nNode, nCntnt, *PCURCRSR, aSave, sal_False );
aSave.IncCount();
FOREACHPAM_END()
}
@@ -1423,15 +1423,15 @@ void _SaveCntntIdx(SwDoc* pDoc,
void _RestoreCntntIdx(SwDoc* pDoc,
SvULongs& rSaveArr,
- ULONG nNode,
+ sal_uLong nNode,
xub_StrLen nOffset,
- BOOL bAuto)
+ sal_Bool bAuto)
{
SwCntntNode* pCNd = pDoc->GetNodes()[ nNode ]->GetCntntNode();
const SwRedlineTbl& rRedlTbl = pDoc->GetRedlineTbl();
SwSpzFrmFmts* pSpz = pDoc->GetSpzFrmFmts();
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
- USHORT n = 0;
+ sal_uInt16 n = 0;
while( n < rSaveArr.Count() )
{
_SwSaveTypeCountContent aSave( rSaveArr, n );
@@ -1497,7 +1497,7 @@ void _RestoreCntntIdx(SwDoc* pDoc,
case 0x0800:
case 0x0801:
{
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
SwCrsrShell* pShell = pDoc->GetEditShell();
if( pShell )
{
@@ -1538,9 +1538,9 @@ void _RestoreCntntIdx(SwDoc* pDoc,
case 0x0400:
case 0x0401:
{
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
const SwUnoCrsrTbl& rTbl = pDoc->GetUnoCrsrTbl();
- for( USHORT i = 0; i < rTbl.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rTbl.Count(); ++i )
{
FOREACHPAM_START( rTbl[ i ] )
if( aSave.GetCount() == nCnt )
@@ -1594,7 +1594,7 @@ void _RestoreCntntIdx(SvULongs& rSaveArr,
const IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
SwCntntNode* pCNd = (SwCntntNode*)rNd.GetCntntNode();
- USHORT n = 0;
+ sal_uInt16 n = 0;
while( n < rSaveArr.Count() )
{
_SwSaveTypeCountContent aSave( rSaveArr, n );
@@ -1657,7 +1657,7 @@ void _RestoreCntntIdx(SvULongs& rSaveArr,
case 0x0800:
case 0x0801:
{
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
SwCrsrShell* pShell = pDoc->GetEditShell();
if( pShell )
{
@@ -1698,9 +1698,9 @@ void _RestoreCntntIdx(SvULongs& rSaveArr,
case 0x0400:
case 0x0401:
{
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
const SwUnoCrsrTbl& rTbl = pDoc->GetUnoCrsrTbl();
- for( USHORT i = 0; i < rTbl.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rTbl.Count(); ++i )
{
FOREACHPAM_START( rTbl[ i ] )
if( aSave.GetCount() == nCnt )
diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx
index 85b59cc556df..1d1890521acf 100644
--- a/sw/source/core/doc/docchart.cxx
+++ b/sw/source/core/doc/docchart.cxx
@@ -66,7 +66,7 @@ void SwTable::UpdateCharts() const
GetFrmFmt()->GetDoc()->UpdateCharts( GetFrmFmt()->GetName() );
}
-BOOL SwTable::IsTblComplexForChart( const String& rSelection,
+sal_Bool SwTable::IsTblComplexForChart( const String& rSelection,
SwChartLines* pGetCLines ) const
{
const SwTableBox* pSttBox, *pEndBox;
@@ -115,7 +115,7 @@ IMPL_LINK( SwDoc, DoUpdateAllCharts, Timer *, EMPTYARG )
if( pVSh )
{
const SwFrmFmts& rTblFmts = *GetTblFrmFmts();
- for( USHORT n = 0; n < rTblFmts.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTblFmts.Count(); ++n )
{
SwTable* pTmpTbl;
const SwTableNode* pTblNd;
@@ -171,20 +171,20 @@ void SwDoc::UpdateCharts( const String &rName ) const
void SwDoc::SetTableName( SwFrmFmt& rTblFmt, const String &rNewName )
{
-// BOOL bStop = 1;
+// sal_Bool bStop = 1;
const String aOldName( rTblFmt.GetName() );
- BOOL bNameFound = 0 == rNewName.Len();
+ sal_Bool bNameFound = 0 == rNewName.Len();
if( !bNameFound )
{
SwFrmFmt* pFmt;
const SwFrmFmts& rTbl = *GetTblFrmFmts();
- for( USHORT i = rTbl.Count(); i; )
+ for( sal_uInt16 i = rTbl.Count(); i; )
if( !( pFmt = rTbl[ --i ] )->IsDefault() &&
pFmt->GetName() == rNewName && IsUsed( *pFmt ) )
{
- bNameFound = TRUE;
+ bNameFound = sal_True;
break;
}
}
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 170193778421..cfd9646d5163 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -58,20 +58,20 @@ public:
CompareLine() {}
virtual ~CompareLine();
- virtual ULONG GetHashValue() const = 0;
- virtual BOOL Compare( const CompareLine& rLine ) const = 0;
+ virtual sal_uLong GetHashValue() const = 0;
+ virtual sal_Bool Compare( const CompareLine& rLine ) const = 0;
};
DECLARE_LIST( CompareList, CompareLine* )
class CompareData
{
- ULONG* pIndex;
- BOOL* pChangedFlag;
+ sal_uLong* pIndex;
+ sal_Bool* pChangedFlag;
protected:
CompareList aLines;
- ULONG nSttLineNum;
+ sal_uLong nSttLineNum;
// Anfang und Ende beschneiden und alle anderen in das
// LinesArray setzen
@@ -82,7 +82,7 @@ public:
virtual ~CompareData();
// gibt es unterschiede?
- BOOL HasDiffs( const CompareData& rData ) const;
+ sal_Bool HasDiffs( const CompareData& rData ) const;
// startet das Vergleichen und Erzeugen der Unterschiede zweier
// Dokumente
@@ -91,33 +91,33 @@ public:
// ShowInsert / ShowDelete. Diese bekommen die Start und EndLine-Nummer
// uebergeben. Die Abbildung auf den tatsaechline Inhalt muss die
// Ableitung uebernehmen!
- ULONG ShowDiffs( const CompareData& rData );
+ sal_uLong ShowDiffs( const CompareData& rData );
- virtual void ShowInsert( ULONG nStt, ULONG nEnd );
- virtual void ShowDelete( const CompareData& rData, ULONG nStt,
- ULONG nEnd, ULONG nInsPos );
+ virtual void ShowInsert( sal_uLong nStt, sal_uLong nEnd );
+ virtual void ShowDelete( const CompareData& rData, sal_uLong nStt,
+ sal_uLong nEnd, sal_uLong nInsPos );
virtual void CheckForChangesInLine( const CompareData& rData,
- ULONG& nStt, ULONG& nEnd,
- ULONG& nThisStt, ULONG& nThisEnd );
+ sal_uLong& nStt, sal_uLong& nEnd,
+ sal_uLong& nThisStt, sal_uLong& nThisEnd );
// Eindeutigen Index fuer eine Line setzen. Gleiche Lines haben den
// selben Index; auch in den anderen CompareData!
- void SetIndex( ULONG nLine, ULONG nIndex );
- ULONG GetIndex( ULONG nLine ) const
+ void SetIndex( sal_uLong nLine, sal_uLong nIndex );
+ sal_uLong GetIndex( sal_uLong nLine ) const
{ return nLine < aLines.Count() ? pIndex[ nLine ] : 0; }
// setze/erfrage ob eine Zeile veraendert ist
- void SetChanged( ULONG nLine, BOOL bFlag = TRUE );
- BOOL GetChanged( ULONG nLine ) const
+ void SetChanged( sal_uLong nLine, sal_Bool bFlag = sal_True );
+ sal_Bool GetChanged( sal_uLong nLine ) const
{
return (pChangedFlag && nLine < aLines.Count())
? pChangedFlag[ nLine ]
: 0;
}
- ULONG GetLineCount() const { return aLines.Count(); }
- ULONG GetLineOffset() const { return nSttLineNum; }
- const CompareLine* GetLine( ULONG nLine ) const
+ sal_uLong GetLineCount() const { return aLines.Count(); }
+ sal_uLong GetLineOffset() const { return nSttLineNum; }
+ const CompareLine* GetLine( sal_uLong nLine ) const
{ return aLines.GetObject( nLine ); }
void InsertLine( CompareLine* pLine )
{ aLines.Insert( pLine, LIST_APPEND ); }
@@ -127,24 +127,24 @@ class Hash
{
struct _HashData
{
- ULONG nNext, nHash;
+ sal_uLong nNext, nHash;
const CompareLine* pLine;
_HashData()
: nNext( 0 ), nHash( 0 ), pLine(0) {}
};
- ULONG* pHashArr;
+ sal_uLong* pHashArr;
_HashData* pDataArr;
- ULONG nCount, nPrime;
+ sal_uLong nCount, nPrime;
public:
- Hash( ULONG nSize );
+ Hash( sal_uLong nSize );
~Hash();
void CalcHashValue( CompareData& rData );
- ULONG GetCount() const { return nCount; }
+ sal_uLong GetCount() const { return nCount; }
};
class Compare
@@ -152,17 +152,17 @@ class Compare
public:
class MovedData
{
- ULONG* pIndex;
- ULONG* pLineNum;
- ULONG nCount;
+ sal_uLong* pIndex;
+ sal_uLong* pLineNum;
+ sal_uLong nCount;
public:
MovedData( CompareData& rData, sal_Char* pDiscard );
~MovedData();
- ULONG GetIndex( ULONG n ) const { return pIndex[ n ]; }
- ULONG GetLineNum( ULONG n ) const { return pLineNum[ n ]; }
- ULONG GetCount() const { return nCount; }
+ sal_uLong GetIndex( sal_uLong n ) const { return pIndex[ n ]; }
+ sal_uLong GetLineNum( sal_uLong n ) const { return pLineNum[ n ]; }
+ sal_uLong GetCount() const { return nCount; }
};
private:
@@ -173,9 +173,9 @@ private:
const MovedData &rMoved1, &rMoved2;
long *pMemory, *pFDiag, *pBDiag;
- void Compare( ULONG nStt1, ULONG nEnd1, ULONG nStt2, ULONG nEnd2 );
- ULONG CheckDiag( ULONG nStt1, ULONG nEnd1,
- ULONG nStt2, ULONG nEnd2, ULONG* pCost );
+ void Compare( sal_uLong nStt1, sal_uLong nEnd1, sal_uLong nStt2, sal_uLong nEnd2 );
+ sal_uLong CheckDiag( sal_uLong nStt1, sal_uLong nEnd1,
+ sal_uLong nStt2, sal_uLong nEnd2, sal_uLong* pCost );
public:
CompareSequence( CompareData& rData1, CompareData& rData2,
const MovedData& rD1, const MovedData& rD2 );
@@ -183,15 +183,15 @@ private:
};
- static void CountDifference( const CompareData& rData, ULONG* pCounts );
+ static void CountDifference( const CompareData& rData, sal_uLong* pCounts );
static void SetDiscard( const CompareData& rData,
- sal_Char* pDiscard, ULONG* pCounts );
- static void CheckDiscard( ULONG nLen, sal_Char* pDiscard );
- static ULONG SetChangedFlag( CompareData& rData, sal_Char* pDiscard, int bFirst );
+ sal_Char* pDiscard, sal_uLong* pCounts );
+ static void CheckDiscard( sal_uLong nLen, sal_Char* pDiscard );
+ static sal_uLong SetChangedFlag( CompareData& rData, sal_Char* pDiscard, int bFirst );
static void ShiftBoundaries( CompareData& rData1, CompareData& rData2 );
public:
- Compare( ULONG nDiff, CompareData& rData1, CompareData& rData2 );
+ Compare( sal_uLong nDiff, CompareData& rData1, CompareData& rData2 );
};
// ====================================================================
@@ -211,23 +211,23 @@ CompareData::~CompareData()
delete[] pChangedFlag;
}
-void CompareData::SetIndex( ULONG nLine, ULONG nIndex )
+void CompareData::SetIndex( sal_uLong nLine, sal_uLong nIndex )
{
if( !pIndex )
{
- pIndex = new ULONG[ aLines.Count() ];
- memset( pIndex, 0, aLines.Count() * sizeof( ULONG ) );
+ pIndex = new sal_uLong[ aLines.Count() ];
+ memset( pIndex, 0, aLines.Count() * sizeof( sal_uLong ) );
}
if( nLine < aLines.Count() )
pIndex[ nLine ] = nIndex;
}
-void CompareData::SetChanged( ULONG nLine, BOOL bFlag )
+void CompareData::SetChanged( sal_uLong nLine, sal_Bool bFlag )
{
if( !pChangedFlag )
{
- pChangedFlag = new BOOL[ aLines.Count() +1 ];
- memset( pChangedFlag, 0, aLines.Count() +1 * sizeof( BOOL ) );
+ pChangedFlag = new sal_Bool[ aLines.Count() +1 ];
+ memset( pChangedFlag, 0, aLines.Count() +1 * sizeof( sal_Bool ) );
}
if( nLine < aLines.Count() )
pChangedFlag[ nLine ] = bFlag;
@@ -237,7 +237,7 @@ void CompareData::CompareLines( CompareData& rData )
{
CheckRanges( rData );
- ULONG nDifferent;
+ sal_uLong nDifferent;
{
Hash aH( GetLineCount() + rData.GetLineCount() + 1 );
aH.CalcHashValue( *this );
@@ -249,17 +249,17 @@ void CompareData::CompareLines( CompareData& rData )
}
}
-ULONG CompareData::ShowDiffs( const CompareData& rData )
+sal_uLong CompareData::ShowDiffs( const CompareData& rData )
{
- ULONG nLen1 = rData.GetLineCount(), nLen2 = GetLineCount();
- ULONG nStt1 = 0, nStt2 = 0;
- ULONG nCnt = 0;
+ sal_uLong nLen1 = rData.GetLineCount(), nLen2 = GetLineCount();
+ sal_uLong nStt1 = 0, nStt2 = 0;
+ sal_uLong nCnt = 0;
while( nStt1 < nLen1 || nStt2 < nLen2 )
{
if( rData.GetChanged( nStt1 ) || GetChanged( nStt2 ) )
{
- ULONG nSav1 = nStt1, nSav2 = nStt2;
+ sal_uLong nSav1 = nStt1, nSav2 = nStt2;
while( nStt1 < nLen1 && rData.GetChanged( nStt1 )) ++nStt1;
while( nStt2 < nLen2 && GetChanged( nStt2 )) ++nStt2;
@@ -280,17 +280,17 @@ ULONG CompareData::ShowDiffs( const CompareData& rData )
return nCnt;
}
-BOOL CompareData::HasDiffs( const CompareData& rData ) const
+sal_Bool CompareData::HasDiffs( const CompareData& rData ) const
{
- BOOL bRet = FALSE;
- ULONG nLen1 = rData.GetLineCount(), nLen2 = GetLineCount();
- ULONG nStt1 = 0, nStt2 = 0;
+ sal_Bool bRet = sal_False;
+ sal_uLong nLen1 = rData.GetLineCount(), nLen2 = GetLineCount();
+ sal_uLong nStt1 = 0, nStt2 = 0;
while( nStt1 < nLen1 || nStt2 < nLen2 )
{
if( rData.GetChanged( nStt1 ) || GetChanged( nStt2 ) )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
++nStt1, ++nStt2;
@@ -298,26 +298,26 @@ BOOL CompareData::HasDiffs( const CompareData& rData ) const
return bRet;
}
-void CompareData::ShowInsert( ULONG, ULONG )
+void CompareData::ShowInsert( sal_uLong, sal_uLong )
{
}
-void CompareData::ShowDelete( const CompareData&, ULONG, ULONG, ULONG )
+void CompareData::ShowDelete( const CompareData&, sal_uLong, sal_uLong, sal_uLong )
{
}
void CompareData::CheckForChangesInLine( const CompareData& ,
- ULONG&, ULONG&, ULONG&, ULONG& )
+ sal_uLong&, sal_uLong&, sal_uLong&, sal_uLong& )
{
}
// ----------------------------------------------------------------------
-Hash::Hash( ULONG nSize )
+Hash::Hash( sal_uLong nSize )
: nCount( 1 )
{
-static const ULONG primes[] =
+static const sal_uLong primes[] =
{
509,
1021,
@@ -358,8 +358,8 @@ static const ULONG primes[] =
return;
}
nPrime = primes[ i ];
- pHashArr = new ULONG[ nPrime ];
- memset( pHashArr, 0, nPrime * sizeof( ULONG ) );
+ pHashArr = new sal_uLong[ nPrime ];
+ memset( pHashArr, 0, nPrime * sizeof( sal_uLong ) );
}
Hash::~Hash()
@@ -372,14 +372,14 @@ void Hash::CalcHashValue( CompareData& rData )
{
if( pHashArr )
{
- for( ULONG n = 0; n < rData.GetLineCount(); ++n )
+ for( sal_uLong n = 0; n < rData.GetLineCount(); ++n )
{
const CompareLine* pLine = rData.GetLine( n );
ASSERT( pLine, "wo ist die Line?" );
- ULONG nH = pLine->GetHashValue();
+ sal_uLong nH = pLine->GetHashValue();
- ULONG* pFound = &pHashArr[ nH % nPrime ];
- ULONG i;
+ sal_uLong* pFound = &pHashArr[ nH % nPrime ];
+ sal_uLong i;
for( i = *pFound; ; i = pDataArr[i].nNext )
if( !i )
{
@@ -401,7 +401,7 @@ void Hash::CalcHashValue( CompareData& rData )
// ----------------------------------------------------------------------
-Compare::Compare( ULONG nDiff, CompareData& rData1, CompareData& rData2 )
+Compare::Compare( sal_uLong nDiff, CompareData& rData1, CompareData& rData2 )
{
MovedData *pMD1, *pMD2;
// Suche die unterschiedlichen Lines
@@ -409,10 +409,10 @@ Compare::Compare( ULONG nDiff, CompareData& rData1, CompareData& rData2 )
sal_Char* pDiscard1 = new sal_Char[ rData1.GetLineCount() ];
sal_Char* pDiscard2 = new sal_Char[ rData2.GetLineCount() ];
- ULONG* pCount1 = new ULONG[ nDiff ];
- ULONG* pCount2 = new ULONG[ nDiff ];
- memset( pCount1, 0, nDiff * sizeof( ULONG ));
- memset( pCount2, 0, nDiff * sizeof( ULONG ));
+ sal_uLong* pCount1 = new sal_uLong[ nDiff ];
+ sal_uLong* pCount2 = new sal_uLong[ nDiff ];
+ memset( pCount1, 0, nDiff * sizeof( sal_uLong ));
+ memset( pCount2, 0, nDiff * sizeof( sal_uLong ));
// stelle fest, welche Indizies in den CompareData mehrfach vergeben wurden
CountDifference( rData1, pCount1 );
@@ -449,31 +449,31 @@ Compare::Compare( ULONG nDiff, CompareData& rData1, CompareData& rData2 )
-void Compare::CountDifference( const CompareData& rData, ULONG* pCounts )
+void Compare::CountDifference( const CompareData& rData, sal_uLong* pCounts )
{
- ULONG nLen = rData.GetLineCount();
- for( ULONG n = 0; n < nLen; ++n )
+ sal_uLong nLen = rData.GetLineCount();
+ for( sal_uLong n = 0; n < nLen; ++n )
{
- ULONG nIdx = rData.GetIndex( n );
+ sal_uLong nIdx = rData.GetIndex( n );
++pCounts[ nIdx ];
}
}
void Compare::SetDiscard( const CompareData& rData,
- sal_Char* pDiscard, ULONG* pCounts )
+ sal_Char* pDiscard, sal_uLong* pCounts )
{
- ULONG nLen = rData.GetLineCount();
+ sal_uLong nLen = rData.GetLineCount();
// berechne Max in Abhanegigkeit zur LineAnzahl
- USHORT nMax = 5;
- ULONG n;
+ sal_uInt16 nMax = 5;
+ sal_uLong n;
for( n = nLen / 64; ( n = n >> 2 ) > 0; )
nMax <<= 1;
for( n = 0; n < nLen; ++n )
{
- ULONG nIdx = rData.GetIndex( n );
+ sal_uLong nIdx = rData.GetIndex( n );
if( nIdx )
{
nIdx = pCounts[ nIdx ];
@@ -484,17 +484,17 @@ void Compare::SetDiscard( const CompareData& rData,
}
}
-void Compare::CheckDiscard( ULONG nLen, sal_Char* pDiscard )
+void Compare::CheckDiscard( sal_uLong nLen, sal_Char* pDiscard )
{
- for( ULONG n = 0; n < nLen; ++n )
+ for( sal_uLong n = 0; n < nLen; ++n )
{
if( 2 == pDiscard[ n ] )
pDiscard[n] = 0;
else if( pDiscard[ n ] )
{
- ULONG j;
- ULONG length;
- ULONG provisional = 0;
+ sal_uLong j;
+ sal_uLong length;
+ sal_uLong provisional = 0;
/* Find end of this run of discardable lines.
Count how many are provisionally discardable. */
@@ -524,9 +524,9 @@ void Compare::CheckDiscard( ULONG nLen, sal_Char* pDiscard )
}
else
{
- ULONG consec;
- ULONG minimum = 1;
- ULONG tem = length / 4;
+ sal_uLong consec;
+ sal_uLong minimum = 1;
+ sal_uLong tem = length / 4;
/* MINIMUM is approximate square root of LENGTH/4.
A subrun of two or more provisionals can stand
@@ -592,8 +592,8 @@ void Compare::CheckDiscard( ULONG nLen, sal_Char* pDiscard )
Compare::MovedData::MovedData( CompareData& rData, sal_Char* pDiscard )
: pIndex( 0 ), pLineNum( 0 ), nCount( 0 )
{
- ULONG nLen = rData.GetLineCount();
- ULONG n;
+ sal_uLong nLen = rData.GetLineCount();
+ sal_uLong n;
for( n = 0; n < nLen; ++n )
if( pDiscard[ n ] )
@@ -603,8 +603,8 @@ Compare::MovedData::MovedData( CompareData& rData, sal_Char* pDiscard )
if( nCount )
{
- pIndex = new ULONG[ nCount ];
- pLineNum = new ULONG[ nCount ];
+ pIndex = new sal_uLong[ nCount ];
+ pLineNum = new sal_uLong[ nCount ];
for( n = 0, nCount = 0; n < nLen; ++n )
if( !pDiscard[ n ] )
@@ -629,7 +629,7 @@ Compare::CompareSequence::CompareSequence(
const MovedData& rMD1, const MovedData& rMD2 )
: rData1( rD1 ), rData2( rD2 ), rMoved1( rMD1 ), rMoved2( rMD2 )
{
- ULONG nSize = rMD1.GetCount() + rMD2.GetCount() + 3;
+ sal_uLong nSize = rMD1.GetCount() + rMD2.GetCount() + 3;
pMemory = new long[ nSize * 2 ];
pFDiag = pMemory + ( rMD2.GetCount() + 1 );
pBDiag = pMemory + ( nSize + rMD2.GetCount() + 1 );
@@ -642,8 +642,8 @@ Compare::CompareSequence::~CompareSequence()
delete pMemory;
}
-void Compare::CompareSequence::Compare( ULONG nStt1, ULONG nEnd1,
- ULONG nStt2, ULONG nEnd2 )
+void Compare::CompareSequence::Compare( sal_uLong nStt1, sal_uLong nEnd1,
+ sal_uLong nStt2, sal_uLong nEnd2 )
{
/* Slide down the bottom initial diagonal. */
while( nStt1 < nEnd1 && nStt2 < nEnd2 &&
@@ -666,7 +666,7 @@ void Compare::CompareSequence::Compare( ULONG nStt1, ULONG nEnd1,
else
{
- ULONG c, d, b;
+ sal_uLong c, d, b;
/* Find a point of correspondence in the middle of the files. */
@@ -686,8 +686,8 @@ void Compare::CompareSequence::Compare( ULONG nStt1, ULONG nEnd1,
}
}
-ULONG Compare::CompareSequence::CheckDiag( ULONG nStt1, ULONG nEnd1,
- ULONG nStt2, ULONG nEnd2, ULONG* pCost )
+sal_uLong Compare::CompareSequence::CheckDiag( sal_uLong nStt1, sal_uLong nEnd1,
+ sal_uLong nStt2, sal_uLong nEnd2, sal_uLong* pCost )
{
const long dmin = nStt1 - nEnd2; /* Minimum valid diagonal. */
const long dmax = nEnd1 - nStt2; /* Maximum valid diagonal. */
@@ -722,7 +722,7 @@ ULONG Compare::CompareSequence::CheckDiag( ULONG nStt1, ULONG nEnd1,
x = thi;
oldx = x;
y = x - d;
- while( ULONG(x) < nEnd1 && ULONG(y) < nEnd2 &&
+ while( sal_uLong(x) < nEnd1 && sal_uLong(y) < nEnd2 &&
rMoved1.GetIndex( x ) == rMoved2.GetIndex( y ))
++x, ++y;
if (x - oldx > 20)
@@ -748,7 +748,7 @@ ULONG Compare::CompareSequence::CheckDiag( ULONG nStt1, ULONG nEnd1,
x = thi - 1;
oldx = x;
y = x - d;
- while( ULONG(x) > nStt1 && ULONG(y) > nStt2 &&
+ while( sal_uLong(x) > nStt1 && sal_uLong(y) > nStt2 &&
rMoved1.GetIndex( x - 1 ) == rMoved2.GetIndex( y - 1 ))
--x, --y;
if (oldx - x > 20)
@@ -770,15 +770,15 @@ void Compare::ShiftBoundaries( CompareData& rData1, CompareData& rData2 )
CompareData* pData = &rData1;
CompareData* pOtherData = &rData2;
- ULONG i = 0;
- ULONG j = 0;
- ULONG i_end = pData->GetLineCount();
- ULONG preceding = ULONG_MAX;
- ULONG other_preceding = ULONG_MAX;
+ sal_uLong i = 0;
+ sal_uLong j = 0;
+ sal_uLong i_end = pData->GetLineCount();
+ sal_uLong preceding = ULONG_MAX;
+ sal_uLong other_preceding = ULONG_MAX;
while (1)
{
- ULONG start, other_start;
+ sal_uLong start, other_start;
/* Scan forwards to find beginning of another run of changes.
Also keep track of the corresponding point in the other file. */
@@ -848,15 +848,15 @@ public:
SwCompareLine( const SwNode& rNd );
virtual ~SwCompareLine();
- virtual ULONG GetHashValue() const;
- virtual BOOL Compare( const CompareLine& rLine ) const;
+ virtual sal_uLong GetHashValue() const;
+ virtual sal_Bool Compare( const CompareLine& rLine ) const;
- static ULONG GetTxtNodeHashValue( const SwTxtNode& rNd, ULONG nVal );
- static BOOL CompareNode( const SwNode& rDstNd, const SwNode& rSrcNd );
- static BOOL CompareTxtNd( const SwTxtNode& rDstNd,
+ static sal_uLong GetTxtNodeHashValue( const SwTxtNode& rNd, sal_uLong nVal );
+ static sal_Bool CompareNode( const SwNode& rDstNd, const SwNode& rSrcNd );
+ static sal_Bool CompareTxtNd( const SwTxtNode& rDstNd,
const SwTxtNode& rSrcNd );
- BOOL ChangesInLine( const SwCompareLine& rLine,
+ sal_Bool ChangesInLine( const SwCompareLine& rLine,
SwPaM *& rpInsRing, SwPaM*& rpDelRing ) const;
const SwNode& GetNode() const { return rNode; }
@@ -872,23 +872,23 @@ class SwCompareData : public CompareData
SwDoc& rDoc;
SwPaM *pInsRing, *pDelRing;
- ULONG PrevIdx( const SwNode* pNd );
- ULONG NextIdx( const SwNode* pNd );
+ sal_uLong PrevIdx( const SwNode* pNd );
+ sal_uLong NextIdx( const SwNode* pNd );
virtual void CheckRanges( CompareData& );
- virtual void ShowInsert( ULONG nStt, ULONG nEnd );
- virtual void ShowDelete( const CompareData& rData, ULONG nStt,
- ULONG nEnd, ULONG nInsPos );
+ virtual void ShowInsert( sal_uLong nStt, sal_uLong nEnd );
+ virtual void ShowDelete( const CompareData& rData, sal_uLong nStt,
+ sal_uLong nEnd, sal_uLong nInsPos );
virtual void CheckForChangesInLine( const CompareData& rData,
- ULONG& nStt, ULONG& nEnd,
- ULONG& nThisStt, ULONG& nThisEnd );
+ sal_uLong& nStt, sal_uLong& nEnd,
+ sal_uLong& nThisStt, sal_uLong& nThisEnd );
public:
SwCompareData( SwDoc& rD ) : rDoc( rD ), pInsRing(0), pDelRing(0) {}
virtual ~SwCompareData();
- void SetRedlinesToDoc( BOOL bUseDocInfo );
+ void SetRedlinesToDoc( sal_Bool bUseDocInfo );
};
// ----------------------------------------------------------------
@@ -902,9 +902,9 @@ SwCompareLine::~SwCompareLine()
{
}
-ULONG SwCompareLine::GetHashValue() const
+sal_uLong SwCompareLine::GetHashValue() const
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
switch( rNode.GetNodeType() )
{
case ND_TEXTNODE:
@@ -961,7 +961,7 @@ const SwNode& SwCompareLine::GetEndNode() const
return *pNd;
}
-BOOL SwCompareLine::Compare( const CompareLine& rLine ) const
+sal_Bool SwCompareLine::Compare( const CompareLine& rLine ) const
{
return CompareNode( rNode, ((SwCompareLine&)rLine).rNode );
}
@@ -989,12 +989,12 @@ namespace
}
}
-BOOL SwCompareLine::CompareNode( const SwNode& rDstNd, const SwNode& rSrcNd )
+sal_Bool SwCompareLine::CompareNode( const SwNode& rDstNd, const SwNode& rSrcNd )
{
if( rSrcNd.GetNodeType() != rDstNd.GetNodeType() )
- return FALSE;
+ return sal_False;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch( rDstNd.GetNodeType() )
{
@@ -1144,7 +1144,7 @@ String SwCompareLine::GetText() const
return sRet;
}
-ULONG SwCompareLine::GetTxtNodeHashValue( const SwTxtNode& rNd, ULONG nVal )
+sal_uLong SwCompareLine::GetTxtNodeHashValue( const SwTxtNode& rNd, sal_uLong nVal )
{
String sStr( rNd.GetExpandTxt() );
for( xub_StrLen n = 0; n < sStr.Len(); ++n )
@@ -1152,24 +1152,24 @@ ULONG SwCompareLine::GetTxtNodeHashValue( const SwTxtNode& rNd, ULONG nVal )
return nVal;
}
-BOOL SwCompareLine::CompareTxtNd( const SwTxtNode& rDstNd,
+sal_Bool SwCompareLine::CompareTxtNd( const SwTxtNode& rDstNd,
const SwTxtNode& rSrcNd )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// erstmal ganz einfach!
if( rDstNd.GetTxt() == rSrcNd.GetTxt() )
{
// der Text ist gleich, aber sind die "Sonderattribute" (0xFF) auch
// dieselben??
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-BOOL SwCompareLine::ChangesInLine( const SwCompareLine& rLine,
+sal_Bool SwCompareLine::ChangesInLine( const SwCompareLine& rLine,
SwPaM *& rpInsRing, SwPaM*& rpDelRing ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( ND_TEXTNODE == rNode.GetNodeType() &&
ND_TEXTNODE == rLine.GetNode().GetNodeType() )
{
@@ -1216,8 +1216,8 @@ BOOL SwCompareLine::ChangesInLine( const SwCompareLine& rLine,
if( nStt != nSEnd )
{
{
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
SwPaM aCpyPam( rSrcNd, nStt );
aCpyPam.SetMark();
aCpyPam.GetPoint()->nContent = nSEnd;
@@ -1240,7 +1240,7 @@ BOOL SwCompareLine::ChangesInLine( const SwCompareLine& rLine,
*pCorr->GetPoint() = *pTmp->GetMark();
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -1264,7 +1264,7 @@ SwCompareData::~SwCompareData()
}
}
-ULONG SwCompareData::NextIdx( const SwNode* pNd )
+sal_uLong SwCompareData::NextIdx( const SwNode* pNd )
{
if( pNd->IsStartNode() )
{
@@ -1278,7 +1278,7 @@ ULONG SwCompareData::NextIdx( const SwNode* pNd )
return pNd->GetIndex() + 1;
}
-ULONG SwCompareData::PrevIdx( const SwNode* pNd )
+sal_uLong SwCompareData::PrevIdx( const SwNode* pNd )
{
if( pNd->IsEndNode() )
{
@@ -1301,11 +1301,11 @@ void SwCompareData::CheckRanges( CompareData& rData )
const SwNode& rSrcEndNd = rSrcNds.GetEndOfContent();
const SwNode& rDstEndNd = rDstNds.GetEndOfContent();
- ULONG nSrcSttIdx = NextIdx( rSrcEndNd.StartOfSectionNode() );
- ULONG nSrcEndIdx = rSrcEndNd.GetIndex();
+ sal_uLong nSrcSttIdx = NextIdx( rSrcEndNd.StartOfSectionNode() );
+ sal_uLong nSrcEndIdx = rSrcEndNd.GetIndex();
- ULONG nDstSttIdx = NextIdx( rDstEndNd.StartOfSectionNode() );
- ULONG nDstEndIdx = rDstEndNd.GetIndex();
+ sal_uLong nDstSttIdx = NextIdx( rDstEndNd.StartOfSectionNode() );
+ sal_uLong nDstEndIdx = rDstEndNd.GetIndex();
while( nSrcSttIdx < nSrcEndIdx && nDstSttIdx < nDstEndIdx )
{
@@ -1347,7 +1347,7 @@ void SwCompareData::CheckRanges( CompareData& rData )
}
-void SwCompareData::ShowInsert( ULONG nStt, ULONG nEnd )
+void SwCompareData::ShowInsert( sal_uLong nStt, sal_uLong nEnd )
{
SwPaM* pTmp = new SwPaM( ((SwCompareLine*)GetLine( nStt ))->GetNode(), 0,
((SwCompareLine*)GetLine( nEnd-1 ))->GetEndNode(), 0,
@@ -1359,14 +1359,14 @@ void SwCompareData::ShowInsert( ULONG nStt, ULONG nEnd )
}
-void SwCompareData::ShowDelete( const CompareData& rData, ULONG nStt,
- ULONG nEnd, ULONG nInsPos )
+void SwCompareData::ShowDelete( const CompareData& rData, sal_uLong nStt,
+ sal_uLong nEnd, sal_uLong nInsPos )
{
SwNodeRange aRg(
((SwCompareLine*)rData.GetLine( nStt ))->GetNode(), 0,
((SwCompareLine*)rData.GetLine( nEnd-1 ))->GetEndNode(), 1 );
- USHORT nOffset = 0;
+ sal_uInt16 nOffset = 0;
const CompareLine* pLine;
if( GetLineCount() == nInsPos )
{
@@ -1418,8 +1418,8 @@ void SwCompareData::ShowDelete( const CompareData& rData, ULONG nStt,
}
void SwCompareData::CheckForChangesInLine( const CompareData& rData,
- ULONG& rStt, ULONG& rEnd,
- ULONG& rThisStt, ULONG& rThisEnd )
+ sal_uLong& rStt, sal_uLong& rEnd,
+ sal_uLong& rThisStt, sal_uLong& rThisEnd )
{
while( rStt < rEnd && rThisStt < rThisEnd )
{
@@ -1433,13 +1433,13 @@ void SwCompareData::CheckForChangesInLine( const CompareData& rData,
}
}
-void SwCompareData::SetRedlinesToDoc( BOOL bUseDocInfo )
+void SwCompareData::SetRedlinesToDoc( sal_Bool bUseDocInfo )
{
SwPaM* pTmp = pDelRing;
// Bug #83296#: get the Author / TimeStamp from the "other"
// document info
- USHORT nAuthor = rDoc.GetRedlineAuthor();
+ sal_uInt16 nAuthor = rDoc.GetRedlineAuthor();
DateTime aTimeStamp;
SwDocShell *pDocShell(rDoc.GetDocShell());
DBG_ASSERT(pDocShell, "no SwDocShell");
@@ -1495,7 +1495,7 @@ void SwCompareData::SetRedlinesToDoc( BOOL bUseDocInfo )
rDoc.DeleteRedline( *pTmp, false, USHRT_MAX );
if( rDoc.DoesUndo() )
- rDoc.AppendUndo( new SwUndoCompDoc( *pTmp, FALSE ));
+ rDoc.AppendUndo( new SwUndoCompDoc( *pTmp, sal_False ));
rDoc.AppendRedline( new SwRedline( aRedlnData, *pTmp ), true );
} while( pDelRing != ( pTmp = (SwPaM*)pTmp->GetNext() ));
@@ -1561,7 +1561,7 @@ void SwCompareData::SetRedlinesToDoc( BOOL bUseDocInfo )
do {
if( rDoc.AppendRedline( new SwRedline( aRedlnData, *pTmp ), true) &&
rDoc.DoesUndo() )
- rDoc.AppendUndo( new SwUndoCompDoc( *pTmp, TRUE ));
+ rDoc.AppendUndo( new SwUndoCompDoc( *pTmp, sal_True ));
} while( pInsRing != ( pTmp = (SwPaM*)pTmp->GetNext() ));
}
}
@@ -1579,9 +1579,9 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
long nRet = 0;
StartUndo(UNDO_EMPTY, NULL);
- BOOL bDocWasModified = IsModified();
+ sal_Bool bDocWasModified = IsModified();
SwDoc& rSrcDoc = (SwDoc&)rDoc;
- BOOL bSrcModified = rSrcDoc.IsModified();
+ sal_Bool bSrcModified = rSrcDoc.IsModified();
RedlineMode_t eSrcRedlMode = rSrcDoc.GetRedlineMode();
rSrcDoc.SetRedlineMode( nsRedlineMode_t::REDLINE_SHOW_INSERT );
@@ -1624,7 +1624,7 @@ class _SaveMergeRedlines : public Ring
public:
_SaveMergeRedlines( const SwNode& rDstNd,
const SwRedline& rSrcRedl, Ring* pRing );
- USHORT InsertRedline( FNInsUndo pFn );
+ sal_uInt16 InsertRedline( FNInsUndo pFn );
SwRedline* GetDestRedline() { return pDestRedl; }
};
@@ -1655,16 +1655,16 @@ _SaveMergeRedlines::_SaveMergeRedlines( const SwNode& rDstNd,
}
}
-USHORT _SaveMergeRedlines::InsertRedline( FNInsUndo pFn )
+sal_uInt16 _SaveMergeRedlines::InsertRedline( FNInsUndo pFn )
{
- USHORT nIns = 0;
+ sal_uInt16 nIns = 0;
SwDoc* pDoc = pDestRedl->GetDoc();
if( nsRedlineType_t::REDLINE_INSERT == pDestRedl->GetType() )
{
// der Teil wurde eingefuegt, also kopiere ihn aus dem SourceDoc
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
SwNodeIndex aSaveNd( pDestRedl->GetPoint()->nNode, -1 );
xub_StrLen nSaveCnt = pDestRedl->GetPoint()->nContent.GetIndex();
@@ -1699,7 +1699,7 @@ USHORT _SaveMergeRedlines::InsertRedline( FNInsUndo pFn )
// eingefuegter ist, dann muss dieser gesplittet werden!
SwPosition* pDStt = pDestRedl->GetMark(),
* pDEnd = pDestRedl->GetPoint();
- USHORT n = 0;
+ sal_uInt16 n = 0;
// zur StartPos das erste Redline suchen
if( !pDoc->GetRedline( *pDStt, &n ) && n )
@@ -1799,7 +1799,7 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
StartUndo(UNDO_EMPTY, NULL);
SwDoc& rSrcDoc = (SwDoc&)rDoc;
- BOOL bSrcModified = rSrcDoc.IsModified();
+ sal_Bool bSrcModified = rSrcDoc.IsModified();
RedlineMode_t eSrcRedlMode = rSrcDoc.GetRedlineMode();
rSrcDoc.SetRedlineMode( nsRedlineMode_t::REDLINE_SHOW_DELETE );
@@ -1818,12 +1818,12 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
// deren Position im DestDoc
_SaveMergeRedlines* pRing = 0;
const SwRedlineTbl& rSrcRedlTbl = rSrcDoc.GetRedlineTbl();
- ULONG nEndOfExtra = rSrcDoc.GetNodes().GetEndOfExtras().GetIndex();
- ULONG nMyEndOfExtra = GetNodes().GetEndOfExtras().GetIndex();
- for( USHORT n = 0; n < rSrcRedlTbl.Count(); ++n )
+ sal_uLong nEndOfExtra = rSrcDoc.GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nMyEndOfExtra = GetNodes().GetEndOfExtras().GetIndex();
+ for( sal_uInt16 n = 0; n < rSrcRedlTbl.Count(); ++n )
{
const SwRedline* pRedl = rSrcRedlTbl[ n ];
- ULONG nNd = pRedl->GetPoint()->nNode.GetIndex();
+ sal_uLong nNd = pRedl->GetPoint()->nNode.GetIndex();
RedlineType_t eType = pRedl->GetType();
if( nEndOfExtra < nNd &&
( nsRedlineType_t::REDLINE_INSERT == eType || nsRedlineType_t::REDLINE_DELETE == eType ))
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index 0520a9b5c81c..5c0409cb1bec 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -116,12 +116,12 @@ namespace
const xub_StrLen nCntIdx)
{
for(int nb = 0; nb < 2; ++nb)
- if(&((pPam)->GetBound(BOOL(nb)).nNode.GetNode()) == pOldNode)
+ if(&((pPam)->GetBound(sal_Bool(nb)).nNode.GetNode()) == pOldNode)
{
- (pPam)->GetBound(BOOL(nb)).nNode = rNewPos.nNode;
- (pPam)->GetBound(BOOL(nb)).nContent.Assign(
+ (pPam)->GetBound(sal_Bool(nb)).nNode = rNewPos.nNode;
+ (pPam)->GetBound(sal_Bool(nb)).nContent.Assign(
const_cast<SwIndexReg*>(rNewPos.nContent.GetIdxReg()),
- nCntIdx + (pPam)->GetBound(BOOL(nb)).nContent.GetIndex());
+ nCntIdx + (pPam)->GetBound(sal_Bool(nb)).nContent.GetIndex());
}
}
}
@@ -158,7 +158,7 @@ void PaMCorrAbs( const SwPaM& rRange,
{
SwUnoCrsrTbl& rTbl = const_cast<SwUnoCrsrTbl&>(pDoc->GetUnoCrsrTbl());
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
SwUnoCrsr *const pUnoCursor = rTbl[ n ];
@@ -201,7 +201,7 @@ void PaMCorrAbs( const SwPaM& rRange,
void SwDoc::CorrAbs(const SwNodeIndex& rOldNode,
const SwPosition& rNewPos,
const xub_StrLen nOffset,
- BOOL bMoveCrsr)
+ sal_Bool bMoveCrsr)
{
SwCntntNode *const pCntntNode( rOldNode.GetNode().GetCntntNode() );
SwPaM const aPam(rOldNode, 0,
@@ -212,7 +212,7 @@ void SwDoc::CorrAbs(const SwNodeIndex& rOldNode,
getIDocumentMarkAccess()->correctMarksAbsolute(rOldNode, rNewPos, nOffset);
{ // fix redlines
SwRedlineTbl& rTbl = *pRedlineTbl;
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
// is on position ??
lcl_PaMCorrAbs(*rTbl[ n ], *aPam.Start(), *aPam.End(), aNewPos);
@@ -227,7 +227,7 @@ void SwDoc::CorrAbs(const SwNodeIndex& rOldNode,
void SwDoc::CorrAbs(const SwPaM& rRange,
const SwPosition& rNewPos,
- BOOL bMoveCrsr)
+ sal_Bool bMoveCrsr)
{
SwPosition aStart(*rRange.Start());
SwPosition aEnd(*rRange.End());
@@ -242,7 +242,7 @@ void SwDoc::CorrAbs(const SwPaM& rRange,
void SwDoc::CorrAbs(const SwNodeIndex& rStartNode,
const SwNodeIndex& rEndNode,
const SwPosition& rNewPos,
- BOOL bMoveCrsr)
+ sal_Bool bMoveCrsr)
{
_DelBookmarks(rStartNode, rEndNode);
@@ -291,7 +291,7 @@ void PaMCorrRel( const SwNodeIndex &rOldNode,
}
{
SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
FOREACHPAM_START( rTbl[ n ] )
lcl_PaMCorrRel1( PCURCRSR, pOldNode, aNewPos, nCntIdx );
@@ -312,14 +312,14 @@ void PaMCorrRel( const SwNodeIndex &rOldNode,
void SwDoc::CorrRel(const SwNodeIndex& rOldNode,
const SwPosition& rNewPos,
const xub_StrLen nOffset,
- BOOL bMoveCrsr)
+ sal_Bool bMoveCrsr)
{
getIDocumentMarkAccess()->correctMarksRelative(rOldNode, rNewPos, nOffset);
{ // dann die Redlines korrigieren
SwRedlineTbl& rTbl = *pRedlineTbl;
SwPosition aNewPos(rNewPos);
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
// liegt auf der Position ??
lcl_PaMCorrRel1( rTbl[ n ], &rOldNode.GetNode(), aNewPos, aNewPos.nContent.GetIndex() + nOffset );
diff --git a/sw/source/core/doc/docdde.cxx b/sw/source/core/doc/docdde.cxx
index d21e6313a2df..bef9ea1f254f 100644
--- a/sw/source/core/doc/docdde.cxx
+++ b/sw/source/core/doc/docdde.cxx
@@ -93,7 +93,7 @@ struct _FindItem
{}
};
-BOOL lcl_FindSection( const SwSectionFmtPtr& rpSectFmt, void* pArgs, bool bCaseSensitive )
+sal_Bool lcl_FindSection( const SwSectionFmtPtr& rpSectFmt, void* pArgs, bool bCaseSensitive )
{
_FindItem * const pItem( static_cast<_FindItem*>(pArgs) );
SwSection* pSect = rpSectFmt->GetSection();
@@ -114,26 +114,26 @@ BOOL lcl_FindSection( const SwSectionFmtPtr& rpSectFmt, void* pArgs, bool bCaseS
{
// eine Tabelle im normalen NodesArr
pItem->pSectNd = pIdx->GetNode().GetSectionNode();
- return FALSE;
+ return sal_False;
}
//nein!! // sollte der Namen schon passen, der Rest aber nicht, dann haben wir
// sie nicht. Die Namen sind immer eindeutig.
}
}
- return TRUE; // dann weiter
+ return sal_True; // dann weiter
}
-BOOL lcl_FindSectionCaseSensitive( const SwSectionFmtPtr& rpSectFmt, void* pArgs )
+sal_Bool lcl_FindSectionCaseSensitive( const SwSectionFmtPtr& rpSectFmt, void* pArgs )
{
return lcl_FindSection( rpSectFmt, pArgs, true );
}
-BOOL lcl_FindSectionCaseInsensitive( const SwSectionFmtPtr& rpSectFmt, void* pArgs )
+sal_Bool lcl_FindSectionCaseInsensitive( const SwSectionFmtPtr& rpSectFmt, void* pArgs )
{
return lcl_FindSection( rpSectFmt, pArgs, false );
}
-BOOL lcl_FindTable( const SwFrmFmtPtr& rpTableFmt, void* pArgs )
+sal_Bool lcl_FindTable( const SwFrmFmtPtr& rpTableFmt, void* pArgs )
{
_FindItem * const pItem( static_cast<_FindItem*>(pArgs) );
String sNm( GetAppCharClass().lower( rpTableFmt->GetName() ));
@@ -149,12 +149,12 @@ BOOL lcl_FindTable( const SwFrmFmtPtr& rpTableFmt, void* pArgs )
// eine Tabelle im normalen NodesArr
pItem->pTblNd = (SwTableNode*)
pFBox->GetSttNd()->FindTableNode();
- return FALSE;
+ return sal_False;
}
//nein! // sollte der Namen schon passen, der Rest aber nicht, dann haben wir
// sie nicht. Die Namen sind immer eindeutig.
}
- return TRUE; // dann weiter
+ return sal_True; // dann weiter
}
@@ -193,7 +193,7 @@ bool SwDoc::GetData( const String& rItem, const String& rMimeType,
return SwServerObject( *aPara.pTblNd ).GetData( rValue, rMimeType );
}
- return FALSE;
+ return sal_False;
}
@@ -231,7 +231,7 @@ bool SwDoc::SetData( const String& rItem, const String& rMimeType,
return SwServerObject( *aPara.pTblNd ).SetData( rMimeType, rValue );
}
- return FALSE;
+ return sal_False;
}
@@ -289,7 +289,7 @@ bool SwDoc::SetData( const String& rItem, const String& rMimeType,
return pObj;
}
-BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
+sal_Bool SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
SwNodeRange*& rpRange ) const
{
// haben wir ueberhaupt das Item vorraetig?
@@ -308,7 +308,7 @@ BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
// sondern auch Rahmen(Text!), Tabellen, Gliederungen:
if( STRING_NOTFOUND != nPos )
{
- BOOL bWeiter = FALSE;
+ sal_Bool bWeiter = sal_False;
String sName( sItem.Copy( 0, nPos ) );
String sCmp( sItem.Copy( nPos + 1 ));
rCC.toLower( sItem );
@@ -324,7 +324,7 @@ BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
{
rpRange = new SwNodeRange( *aPara.pTblNd, 0,
*aPara.pTblNd->EndOfSectionNode(), 1 );
- return TRUE;
+ return sal_True;
}
}
else if( sCmp.EqualsAscii( pMarkToFrame ) )
@@ -337,13 +337,13 @@ BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
!( pNd = &pIdx->GetNode())->IsNoTxtNode() )
{
rpRange = new SwNodeRange( *pNd, 1, *pNd->EndOfSectionNode() );
- return TRUE;
+ return sal_True;
}
}
else if( sCmp.EqualsAscii( pMarkToRegion ) )
{
sItem = sName; // wird unten behandelt !
- bWeiter = TRUE;
+ bWeiter = sal_True;
}
else if( sCmp.EqualsAscii( pMarkToOutline ) )
{
@@ -351,11 +351,11 @@ BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
if( GotoOutline( aPos, sName ))
{
SwNode* pNd = &aPos.nNode.GetNode();
- //BYTE nLvl = pNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
+ //sal_uInt8 nLvl = pNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
const int nLvl = pNd->GetTxtNode()->GetAttrOutlineLevel()-1;//<-end,zhaojianwei
const SwOutlineNodes& rOutlNds = GetNodes().GetOutLineNds();
- USHORT nTmpPos;
+ sal_uInt16 nTmpPos;
rOutlNds.Seek_Entry( pNd, &nTmpPos );
rpRange = new SwNodeRange( aPos.nNode, 0, aPos.nNode );
@@ -372,12 +372,12 @@ BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
rpRange->aEnd = *rOutlNds[ nTmpPos ];
else
rpRange->aEnd = GetNodes().GetEndOfContent();
- return TRUE;
+ return sal_True;
}
}
if( !bWeiter )
- return FALSE;
+ return sal_False;
}
//search for bookmarks and sections case senstive at first. If nothing is found then try again case insensitive
@@ -405,7 +405,7 @@ BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
{
rpRange = new SwNodeRange( *aPara.pSectNd, 1,
*aPara.pSectNd->EndOfSectionNode() );
- return TRUE;
+ return sal_True;
}
}
@@ -413,6 +413,6 @@ BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
break;
bCaseSensitive = false;
}
- return FALSE;
+ return sal_False;
}
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 0b56578e0536..d7f88e671825 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -123,8 +123,8 @@ static void lcl_DefaultPageFmt( sal_uInt16 nPoolFmtId,
SvxLRSpaceItem aLR( RES_LR_SPACE );
SvxULSpaceItem aUL( RES_UL_SPACE );
- aUL.SetUpper( (USHORT)nMinTop );
- aUL.SetLower( (USHORT)nMinBottom );
+ aUL.SetUpper( (sal_uInt16)nMinTop );
+ aUL.SetLower( (sal_uInt16)nMinBottom );
aLR.SetRight( nMinRight );
aLR.SetLeft( nMinLeft );
@@ -147,7 +147,7 @@ static void lcl_DefaultPageFmt( sal_uInt16 nPoolFmtId,
|*************************************************************************/
void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
- const BOOL bPage = TRUE )
+ const sal_Bool bPage = sal_True )
{
/////////////// !!!!!!!!!!!!!!!!
//JP 03.03.99:
@@ -155,7 +155,7 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
// funktioniert nicht richtig, wenn man unterschiedliche WhichRanges hat.
/////////////// !!!!!!!!!!!!!!!!
//Die interressanten Attribute uebernehmen.
- USHORT __READONLY_DATA aIdArr[] = { RES_FRM_SIZE, RES_UL_SPACE,
+ sal_uInt16 __READONLY_DATA aIdArr[] = { RES_FRM_SIZE, RES_UL_SPACE,
RES_BACKGROUND, RES_SHADOW,
RES_COL, RES_COL,
RES_FRAMEDIR, RES_FRAMEDIR,
@@ -169,9 +169,9 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
0 };
const SfxPoolItem* pItem;
- for( USHORT n = 0; aIdArr[ n ]; n += 2 )
+ for( sal_uInt16 n = 0; aIdArr[ n ]; n += 2 )
{
- for( USHORT nId = aIdArr[ n ]; nId <= aIdArr[ n+1]; ++nId )
+ for( sal_uInt16 nId = aIdArr[ n ]; nId <= aIdArr[ n+1]; ++nId )
{
// --> FME 2005-04-18 #i45539#
// bPage == true:
@@ -182,7 +182,7 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
if( ( bPage && RES_HEADER_FOOTER_EAT_SPACING != nId ) ||
( !bPage && RES_COL != nId && RES_PAPER_BIN != nId ))
{
- if( SFX_ITEM_SET == rSource.GetItemState( nId, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSource.GetItemState( nId, sal_False, &pItem ))
rDest.SetFmtAttr( *pItem );
else
rDest.ResetFmtAttr( nId );
@@ -197,17 +197,17 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
}
-void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
+void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
{
ASSERT( i < aPageDescs.Count(), "PageDescs ueberindiziert." );
SwPageDesc *pDesc = aPageDescs[i];
- BOOL bDoesUndo = DoesUndo();
+ sal_Bool bDoesUndo = DoesUndo();
if (DoesUndo())
{
AppendUndo(new SwUndoPageDesc(*pDesc, rChged, this));
- DoUndo(FALSE);
+ DoUndo(sal_False);
}
//Als erstes wird ggf. gespiegelt.
@@ -231,7 +231,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
// ErgoSum-Texte geben, die sich auf eine geaenderte Seite beziehen,
// deshalb werden die Fussnoten invalidiert
SwFtnIdxs& rFtnIdxs = GetFtnIdxs();
- for( USHORT nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
+ for( sal_uInt16 nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
{
SwTxtFtn *pTxtFtn = rFtnIdxs[ nPos ];
const SwFmtFtn &rFtn = pTxtFtn->GetFtn();
@@ -274,7 +274,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
SwFmtHeader aHead( MakeLayoutFmt( RND_STD_HEADERL, 0 ) );
pDesc->GetLeft().SetFmtAttr( aHead );
//Weitere Attribute (Raender, Umrandung...) uebernehmen.
- ::lcl_DescSetAttr( *rHead.GetHeaderFmt(), *aHead.GetHeaderFmt(), FALSE);
+ ::lcl_DescSetAttr( *rHead.GetHeaderFmt(), *aHead.GetHeaderFmt(), sal_False);
}
else
{
@@ -287,7 +287,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
{
SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), "Header",
GetDfltFrmFmt() );
- ::lcl_DescSetAttr( *pRight, *pFmt, FALSE );
+ ::lcl_DescSetAttr( *pRight, *pFmt, sal_False );
//Der Bereich auf den das rechte Kopfattribut zeigt wird
//kopiert und der Index auf den StartNode in das linke
//Kopfattribut gehaengt.
@@ -296,14 +296,14 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
SwNodeRange aRange( aRCnt.GetCntntIdx()->GetNode(), 0,
*aRCnt.GetCntntIdx()->GetNode().EndOfSectionNode() );
aTmp = *pSttNd->EndOfSectionNode();
- GetNodes()._Copy( aRange, aTmp, FALSE );
+ GetNodes()._Copy( aRange, aTmp, sal_False );
pFmt->SetFmtAttr( SwFmtCntnt( pSttNd ) );
pDesc->GetLeft().SetFmtAttr( SwFmtHeader( pFmt ) );
}
else
::lcl_DescSetAttr( *pRight,
- *(SwFrmFmt*)rLeftHead.GetHeaderFmt(), FALSE );
+ *(SwFrmFmt*)rLeftHead.GetHeaderFmt(), sal_False );
}
}
@@ -336,7 +336,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
SwFmtFooter aFoot( MakeLayoutFmt( RND_STD_FOOTER, 0 ) );
pDesc->GetLeft().SetFmtAttr( aFoot );
//Weitere Attribute (Raender, Umrandung...) uebernehmen.
- ::lcl_DescSetAttr( *rFoot.GetFooterFmt(), *aFoot.GetFooterFmt(), FALSE);
+ ::lcl_DescSetAttr( *rFoot.GetFooterFmt(), *aFoot.GetFooterFmt(), sal_False);
}
else
{
@@ -349,7 +349,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
{
SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), "Footer",
GetDfltFrmFmt() );
- ::lcl_DescSetAttr( *pRight, *pFmt, FALSE );
+ ::lcl_DescSetAttr( *pRight, *pFmt, sal_False );
//Der Bereich auf den das rechte Kopfattribut zeigt wird
//kopiert und der Index auf den StartNode in das linke
//Kopfattribut gehaengt.
@@ -358,14 +358,14 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
SwNodeRange aRange( aRCnt.GetCntntIdx()->GetNode(), 0,
*aRCnt.GetCntntIdx()->GetNode().EndOfSectionNode() );
aTmp = *pSttNd->EndOfSectionNode();
- GetNodes()._Copy( aRange, aTmp, FALSE );
+ GetNodes()._Copy( aRange, aTmp, sal_False );
pFmt->SetFmtAttr( SwFmtCntnt( pSttNd ) );
pDesc->GetLeft().SetFmtAttr( SwFmtFooter( pFmt ) );
}
else
::lcl_DescSetAttr( *pRight,
- *(SwFrmFmt*)rLeftFoot.GetFooterFmt(), FALSE );
+ *(SwFrmFmt*)rLeftFoot.GetFooterFmt(), sal_False );
}
}
pDesc->ChgFooterShare( rChged.IsFooterShared() );
@@ -378,22 +378,22 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
//Wenn sich das UseOn oder der Follow aendern muessen die
//Absaetze das erfahren.
- BOOL bUseOn = FALSE;
- BOOL bFollow = FALSE;
+ sal_Bool bUseOn = sal_False;
+ sal_Bool bFollow = sal_False;
if ( pDesc->GetUseOn() != rChged.GetUseOn() )
{ pDesc->SetUseOn( rChged.GetUseOn() );
- bUseOn = TRUE;
+ bUseOn = sal_True;
}
if ( pDesc->GetFollow() != rChged.GetFollow() )
{ if ( rChged.GetFollow() == &rChged )
{ if ( pDesc->GetFollow() != pDesc )
{ pDesc->SetFollow( pDesc );
- bFollow = TRUE;
+ bFollow = sal_True;
}
}
else
{ pDesc->SetFollow( rChged.pFollow );
- bFollow = TRUE;
+ bFollow = sal_True;
}
}
@@ -447,7 +447,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
|*
|*************************************************************************/
-void lcl_RemoveFrms( SwFrmFmt& rFmt, BOOL& rbFtnsRemoved )
+void lcl_RemoveFrms( SwFrmFmt& rFmt, sal_Bool& rbFtnsRemoved )
{
SwClientIter aIter( rFmt );
SwFrm *pFrm;
@@ -456,8 +456,8 @@ void lcl_RemoveFrms( SwFrmFmt& rFmt, BOOL& rbFtnsRemoved )
if ( !rbFtnsRemoved && pFrm->IsPageFrm() &&
((SwPageFrm*)pFrm)->IsFtnPage() )
{
- rFmt.getIDocumentLayoutAccess()->GetRootFrm()->RemoveFtns( 0, FALSE, TRUE );
- rbFtnsRemoved = TRUE;
+ rFmt.getIDocumentLayoutAccess()->GetRootFrm()->RemoveFtns( 0, sal_False, sal_True );
+ rbFtnsRemoved = sal_True;
}
else
{
@@ -496,8 +496,8 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
aPageDescs[0]->Add( pLast );
}
- BOOL bFtnInf = FALSE;
- if ( TRUE == (bFtnInf = pLast == pFtnInfo->GetPageDescDep()) ||
+ sal_Bool bFtnInf = sal_False;
+ if ( sal_True == (bFtnInf = pLast == pFtnInfo->GetPageDescDep()) ||
pLast == pEndNoteInfo->GetPageDescDep() )
{
aPageDescs[0]->Add( pLast );
@@ -506,7 +506,7 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
}
}
- for ( USHORT j = 0; j < aPageDescs.Count(); ++j )
+ for ( sal_uInt16 j = 0; j < aPageDescs.Count(); ++j )
{
if ( aPageDescs[j]->GetFollow() == pDel )
{
@@ -529,7 +529,7 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
// Wenn wir auf Endnotenseiten stossen, schmeissen wir alle Fussnoten weg,
// anders kann die Reihenfolge der Seiten (FollowsPageDescs usw.)
// nicht garantiert werden.
- BOOL bFtnsRemoved = FALSE;
+ sal_Bool bFtnsRemoved = sal_False;
::lcl_RemoveFrms( pDel->GetMaster(), bFtnsRemoved );
::lcl_RemoveFrms( pDel->GetLeft(), bFtnsRemoved );
@@ -538,7 +538,7 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
// #116530#
void SwDoc::BroadcastStyleOperation(String rName, SfxStyleFamily eFamily,
- USHORT nOp)
+ sal_uInt16 nOp)
{
if (pDocShell)
{
@@ -555,7 +555,7 @@ void SwDoc::BroadcastStyleOperation(String rName, SfxStyleFamily eFamily,
}
}
-void SwDoc::DelPageDesc( USHORT i, BOOL bBroadcast )
+void SwDoc::DelPageDesc( sal_uInt16 i, sal_Bool bBroadcast )
{
ASSERT( i < aPageDescs.Count(), "PageDescs ueberindiziert." );
ASSERT( i != 0, "Default Pagedesc loeschen is nicht." );
@@ -593,8 +593,8 @@ void SwDoc::DelPageDesc( USHORT i, BOOL bBroadcast )
|*
|*************************************************************************/
-USHORT SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy,
- BOOL bRegardLanguage, BOOL bBroadcast) // #116530#
+sal_uInt16 SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy,
+ sal_Bool bRegardLanguage, sal_Bool bBroadcast) // #116530#
{
SwPageDesc *pNew;
if( pCpy )
@@ -636,12 +636,12 @@ USHORT SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy,
return (aPageDescs.Count()-1);
}
-SwPageDesc* SwDoc::FindPageDescByName( const String& rName, USHORT* pPos ) const
+SwPageDesc* SwDoc::FindPageDescByName( const String& rName, sal_uInt16* pPos ) const
{
SwPageDesc* pRet = 0;
if( pPos ) *pPos = USHRT_MAX;
- for( USHORT n = 0, nEnd = aPageDescs.Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = aPageDescs.Count(); n < nEnd; ++n )
if( aPageDescs[ n ]->GetName() == rName )
{
pRet = aPageDescs[ n ];
@@ -669,12 +669,12 @@ void SwDoc::PrtDataChanged()
// <--
SwWait *pWait = 0;
- BOOL bEndAction = FALSE;
+ sal_Bool bEndAction = sal_False;
if( GetDocShell() )
GetDocShell()->UpdateFontList();
- BOOL bDraw = TRUE;
+ sal_Bool bDraw = sal_True;
if ( GetRootFrm() )
{
ViewShell *pSh = GetRootFrm()->GetCurrShell();
@@ -682,12 +682,12 @@ void SwDoc::PrtDataChanged()
( pSh && pSh->GetViewOptions()->IsPrtFormat() ) )
{
if ( GetDocShell() )
- pWait = new SwWait( *GetDocShell(), TRUE );
+ pWait = new SwWait( *GetDocShell(), sal_True );
GetRootFrm()->StartAllAction();
- bEndAction = TRUE;
+ bEndAction = sal_True;
- bDraw = FALSE;
+ bDraw = sal_False;
if( pDrawModel )
{
pDrawModel->SetAddExtLeading( get(IDocumentSettingAccess::ADD_EXT_LEADING) );
@@ -720,7 +720,7 @@ void SwDoc::PrtDataChanged()
pDrawModel->SetRefDevice( pOutDev );
}
- PrtOLENotify( TRUE );
+ PrtOLENotify( sal_True );
if ( bEndAction )
GetRootFrm()->EndAllAction();
@@ -734,7 +734,7 @@ void SwDoc::PrtDataChanged()
//ist in init.cxx zu finden.
extern SvPtrarr *pGlobalOLEExcludeList;
-void SwDoc::PrtOLENotify( BOOL bAll )
+void SwDoc::PrtOLENotify( sal_Bool bAll )
{
SwFEShell *pShell = 0;
if ( GetRootFrm() && GetRootFrm()->GetCurrShell() )
@@ -756,16 +756,16 @@ void SwDoc::PrtOLENotify( BOOL bAll )
//Da wir keine Shell haben, merken wir uns diesen unguenstigen
//Zustand am Dokument, dies wird dann beim Erzeugen der ersten Shell
//nachgeholt.
- mbOLEPrtNotifyPending = TRUE;
+ mbOLEPrtNotifyPending = sal_True;
if ( bAll )
- mbAllOLENotify = TRUE;
+ mbAllOLENotify = sal_True;
}
else
{
if ( mbAllOLENotify )
- bAll = TRUE;
+ bAll = sal_True;
- mbOLEPrtNotifyPending = mbAllOLENotify = FALSE;
+ mbOLEPrtNotifyPending = mbAllOLENotify = sal_False;
SwOLENodes *pNodes = 0;
@@ -790,12 +790,12 @@ void SwDoc::PrtOLENotify( BOOL bAll )
0, pNodes->Count(), GetDocShell());
GetRootFrm()->StartAllAction();
- for( USHORT i = 0; i < pNodes->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pNodes->Count(); ++i )
{
::SetProgressState( i, GetDocShell() );
SwOLENode* pOLENd = (*pNodes)[i];
- pOLENd->SetOLESizeInvalid( FALSE );
+ pOLENd->SetOLESizeInvalid( sal_False );
//Ersteinmal die Infos laden und festellen ob das Teil nicht
//schon in der Exclude-Liste steht
@@ -810,8 +810,8 @@ void SwDoc::PrtOLENotify( BOOL bAll )
// aName = ????
}
- BOOL bFound = FALSE;
- for ( USHORT j = 0;
+ sal_Bool bFound = sal_False;
+ for ( sal_uInt16 j = 0;
j < pGlobalOLEExcludeList->Count() && !bFound;
++j )
{
@@ -835,7 +835,7 @@ void SwDoc::PrtOLENotify( BOOL bAll )
pShell->CalcAndSetScale( xObj );//Client erzeugen lassen.
}
else
- pOLENd->SetOLESizeInvalid( TRUE );
+ pOLENd->SetOLESizeInvalid( sal_True );
}
else */
pGlobalOLEExcludeList->Insert(
@@ -855,7 +855,7 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, )
SwFEShell* pSh = (SwFEShell*)GetEditShell();
if( pSh )
{
- mbOLEPrtNotifyPending = mbAllOLENotify = FALSE;
+ mbOLEPrtNotifyPending = mbAllOLENotify = sal_False;
SwOLENodes aOLENodes;
SwClientIter aIter( *(SwModify*)GetDfltGrfFmtColl() );
@@ -877,12 +877,12 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, )
GetRootFrm()->StartAllAction();
SwMsgPoolItem aMsgHint( RES_UPDATE_ATTR );
- for( USHORT i = 0; i < aOLENodes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aOLENodes.Count(); ++i )
{
::SetProgressState( i, GetDocShell() );
SwOLENode* pOLENd = aOLENodes[i];
- pOLENd->SetOLESizeInvalid( FALSE );
+ pOLENd->SetOLESizeInvalid( sal_False );
//Kennen wir nicht, also muss das Objekt geladen werden.
//Wenn es keine Benachrichtigung wuenscht
@@ -899,7 +899,7 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, )
pSh->CalcAndSetScale( xRef );//Client erzeugen lassen.
}
else
- pOLENd->SetOLESizeInvalid( TRUE );
+ pOLENd->SetOLESizeInvalid( sal_True );
}*/
// repaint it
pOLENd->Modify( &aMsgHint, &aMsgHint );
@@ -912,16 +912,16 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, )
return 0;
}
-BOOL SwDoc::FindPageDesc( const String & rName, sal_uInt16 * pFound)
+sal_Bool SwDoc::FindPageDesc( const String & rName, sal_uInt16 * pFound)
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
sal_uInt16 nI;
for (nI = 0; nI < aPageDescs.Count(); nI++)
{
if (aPageDescs[nI]->GetName() == rName)
{
*pFound = nI;
- bResult = TRUE;
+ bResult = sal_True;
break;
}
}
@@ -941,7 +941,7 @@ SwPageDesc * SwDoc::GetPageDesc( const String & rName )
return aResult;
}
-void SwDoc::DelPageDesc( const String & rName, BOOL bBroadcast ) // #116530#
+void SwDoc::DelPageDesc( const String & rName, sal_Bool bBroadcast ) // #116530#
{
sal_uInt16 nI;
@@ -964,7 +964,7 @@ void SwDoc::ChgPageDesc( const String & rName, const SwPageDesc & rDesc)
*/
void SwDoc::CheckDefaultPageFmt()
{
- for ( USHORT i = 0; i < GetPageDescCnt(); ++i )
+ for ( sal_uInt16 i = 0; i < GetPageDescCnt(); ++i )
{
SwPageDesc& rDesc = _GetPageDesc( i );
@@ -996,7 +996,7 @@ void SwDoc::SetDefaultPageMode(bool bSquaredPageMode)
aNewGrid.Init();
SetDefault(aNewGrid);
- for ( USHORT i = 0; i < GetPageDescCnt(); ++i )
+ for ( sal_uInt16 i = 0; i < GetPageDescCnt(); ++i )
{
SwPageDesc& rDesc = _GetPageDesc( i );
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 1a10428d5a58..e40e2a74b48b 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -219,7 +219,7 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
const SdrMarkList &rMrkList = rDrawView.GetMarkedObjectList();
SwDrawFrmFmt *pFmt = 0L;
SdrObject *pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
- BOOL bNoGroup = ( 0 == pObj->GetUpGroup() );
+ sal_Bool bNoGroup = ( 0 == pObj->GetUpGroup() );
SwDrawContact* pNewContact = 0;
if( bNoGroup )
{
@@ -229,7 +229,7 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
SwUndoDrawGroup* pUndo = !DoesUndo()
? 0
- : new SwUndoDrawGroup( (USHORT)rMrkList.GetMarkCount() );
+ : new SwUndoDrawGroup( (sal_uInt16)rMrkList.GetMarkCount() );
// --> OD 2005-08-16 #i53320#
bool bGroupMembersNotPositioned( false );
@@ -240,7 +240,7 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
}
// <--
//ContactObjekte und Formate vernichten.
- for( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
@@ -345,7 +345,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
{
String sDrwFmtNm( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM("DrawObject" )));
- for ( USHORT i = 0; i < nMarkCount; ++i )
+ for ( sal_uInt16 i = 0; i < nMarkCount; ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( pObj->IsA( TYPE(SdrObjGroup) ) )
@@ -361,7 +361,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
AppendUndo( pUndo );
}
- for ( USHORT i2 = 0; i2 < pLst->GetObjCount(); ++i2 )
+ for ( sal_uInt16 i2 = 0; i2 < pLst->GetObjCount(); ++i2 )
{
SdrObject* pSubObj = pLst->GetObj( i2 );
SwDrawFrmFmt *pFmt = MakeDrawFrmFmt( sDrwFmtNm,
@@ -436,15 +436,15 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
|*
|*************************************************************************/
-BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView )
+sal_Bool SwDoc::DeleteSelection( SwDrawView& rDrawView )
{
- BOOL bCallBase = FALSE;
+ sal_Bool bCallBase = sal_False;
const SdrMarkList &rMrkList = rDrawView.GetMarkedObjectList();
if( rMrkList.GetMarkCount() )
{
StartUndo(UNDO_EMPTY, NULL);
- USHORT i;
- BOOL bDelMarked = TRUE;
+ sal_uInt16 i;
+ sal_Bool bDelMarked = sal_True;
if( 1 == rMrkList.GetMarkCount() )
{
@@ -456,7 +456,7 @@ BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView )
if( pFrmFmt )
{
DelLayoutFmt( pFrmFmt );
- bDelMarked = FALSE;
+ bDelMarked = sal_False;
}
}
}
@@ -471,7 +471,7 @@ BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView )
if( pFrmFmt &&
FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId() )
{
- rDrawView.MarkObj( pObj, rDrawView.Imp().GetPageView(), TRUE );
+ rDrawView.MarkObj( pObj, rDrawView.Imp().GetPageView(), sal_True );
--i;
DelLayoutFmt( pFrmFmt );
}
@@ -484,7 +484,7 @@ BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView )
if( !pObj->GetUpGroup() )
{
SwUndoDrawDelete* pUndo = !DoesUndo() ? 0
- : new SwUndoDrawDelete( (USHORT)rMrkList.GetMarkCount() );
+ : new SwUndoDrawDelete( (sal_uInt16)rMrkList.GetMarkCount() );
//ContactObjekte vernichten, Formate sicherstellen.
for( i = 0; i < rMrkList.GetMarkCount(); ++i )
@@ -518,7 +518,7 @@ BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView )
if( pUndo )
AppendUndo( pUndo );
}
- bCallBase = TRUE;
+ bCallBase = sal_True;
}
SetModified();
@@ -538,7 +538,7 @@ BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView )
|*************************************************************************/
_ZSortFly::_ZSortFly( const SwFrmFmt* pFrmFmt, const SwFmtAnchor* pFlyAn,
- UINT32 nArrOrdNum )
+ sal_uInt32 nArrOrdNum )
: pFmt( pFrmFmt ), pAnchor( pFlyAn ), nOrdNum( nArrOrdNum )
{
// #i11176#
@@ -610,7 +610,7 @@ void SwDoc::InitDrawModel()
pSdrPool->SetPoolDefaultItem(SdrShadowXDistItem((300 * 72) / 127));
pSdrPool->SetPoolDefaultItem(SdrShadowYDistItem((300 * 72) / 127));
}
- SfxItemPool *pEEgPool = EditEngine::CreatePool( FALSE );
+ SfxItemPool *pEEgPool = EditEngine::CreatePool( sal_False );
pSdrPool->SetSecondaryPool( pEEgPool );
if ( !GetAttrPool().GetFrozenIdRanges () )
GetAttrPool().FreezeIdRanges();
@@ -650,7 +650,7 @@ void SwDoc::InitDrawModel()
nInvisibleControls = pDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID();
}
- pDrawModel->InsertPage( pDrawModel->AllocPage( FALSE ) );
+ pDrawModel->InsertPage( pDrawModel->AllocPage( sal_False ) );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "after create DrawDocument" );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "before create Spellchecker/Hyphenator" );
@@ -692,13 +692,13 @@ void SwDoc::NotifyInvisibleLayers( SdrPageView& _rSdrPageView )
{
String sLayerNm;
sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("InvisibleHell" ));
- _rSdrPageView.SetLayerVisible( sLayerNm, FALSE );
+ _rSdrPageView.SetLayerVisible( sLayerNm, sal_False );
sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("InvisibleHeaven" ));
- _rSdrPageView.SetLayerVisible( sLayerNm, FALSE );
+ _rSdrPageView.SetLayerVisible( sLayerNm, sal_False );
sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("InvisibleControls" ));
- _rSdrPageView.SetLayerVisible( sLayerNm, FALSE );
+ _rSdrPageView.SetLayerVisible( sLayerNm, sal_False );
}
/** method to determine, if a layer ID belongs to the visible ones.
@@ -901,7 +901,7 @@ IMPL_LINK(SwDoc, CalcFieldValueHdl, EditFieldInfo*, pInfo)
******************************************************************/
pInfo->SetRepresentation(
((const SvxDateField*) pField)->GetFormatted(
- *GetNumberFormatter( TRUE ), LANGUAGE_SYSTEM) );
+ *GetNumberFormatter( sal_True ), LANGUAGE_SYSTEM) );
}
else if (pField && pField->ISA(SvxURLField))
{
@@ -927,7 +927,7 @@ IMPL_LINK(SwDoc, CalcFieldValueHdl, EditFieldInfo*, pInfo)
break;
}
- USHORT nChrFmt;
+ sal_uInt16 nChrFmt;
if (IsVisitedURL(((const SvxURLField*)pField)->GetURL()))
nChrFmt = RES_POOLCHR_INET_VISIT;
@@ -956,7 +956,7 @@ IMPL_LINK(SwDoc, CalcFieldValueHdl, EditFieldInfo*, pInfo)
******************************************************************/
pInfo->SetRepresentation(
((const SvxExtTimeField*) pField)->GetFormatted(
- *GetNumberFormatter( TRUE ), LANGUAGE_SYSTEM) );
+ *GetNumberFormatter( sal_True ), LANGUAGE_SYSTEM) );
}
else
{
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index bdcf8caaff7b..61098176ce52 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -463,8 +463,8 @@ bool lcl_SaveFtn( const SwNodeIndex& rSttNd, const SwNodeIndex& rEndNd,
if( pHints && pHints->HasFtn() ) //...with footnotes
{
bUpdateFtn = sal_True; // Heureka
- USHORT nCount = pHints->Count();
- for( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = pHints->Count();
+ for( sal_uInt16 i = 0; i < nCount; ++i )
{
SwTxtAttr *pAttr = pHints->GetTextHint( i );
if ( pAttr->Which() == RES_TXTATR_FTN )
@@ -787,8 +787,8 @@ bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr )
sal_Unicode c;
String aStr;
- BOOL bOldExpFlg = pNode->IsIgnoreDontExpand();
- pNode->SetIgnoreDontExpand( TRUE );
+ sal_Bool bOldExpFlg = pNode->IsIgnoreDontExpand();
+ pNode->SetIgnoreDontExpand( sal_True );
for( xub_StrLen nCnt = 0; nCnt < rStr.Len(); ++nCnt )
{
@@ -909,8 +909,8 @@ bool SwDoc::MoveRange( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
// in a particular order, and presence of bookmarks
// will change this order. Hence, we delete bookmarks
// here without undo.
- BOOL bDoesUndo = DoesUndo();
- DoUndo( FALSE );
+ sal_Bool bDoesUndo = DoesUndo();
+ DoUndo( sal_False );
_DelBookmarks(
pStt->nNode,
pEnd->nNode,
@@ -1202,7 +1202,7 @@ bool SwDoc::MoveNodeRange( SwNodeRange& rRange, SwNodeIndex& rPos,
pSaveInsPos = new SwNodeIndex( rRange.aStart, -1 );
// verschiebe die Nodes
- BOOL bNoDelFrms = 0 != (DOC_NO_DELFRMS & eMvFlags);
+ sal_Bool bNoDelFrms = 0 != (DOC_NO_DELFRMS & eMvFlags);
if( GetNodes()._MoveNodes( rRange, GetNodes(), rPos, !bNoDelFrms ) )
{
aIdx++; // wieder auf alte Position
@@ -1271,7 +1271,7 @@ bool SwDoc::MoveNodeRange( SwNodeRange& rRange, SwNodeIndex& rPos,
/* #107318# Convert list of ranges of whichIds to a corresponding list
of whichIds*/
-SvUShorts * lcl_RangesToUShorts(USHORT * pRanges)
+SvUShorts * lcl_RangesToUShorts(sal_uInt16 * pRanges)
{
SvUShorts * pResult = new SvUShorts();
@@ -1280,7 +1280,7 @@ SvUShorts * lcl_RangesToUShorts(USHORT * pRanges)
{
ASSERT(pRanges[i+1] != 0, "malformed ranges");
- for (USHORT j = pRanges[i]; j < pRanges[i+1]; j++)
+ for (sal_uInt16 j = pRanges[i]; j < pRanges[i+1]; j++)
pResult->Insert(j, pResult->Count());
i += 2;
@@ -1838,7 +1838,7 @@ void lcl_syncGrammarError( SwTxtNode &rTxtNode, linguistic2::ProofreadingResult&
return;
SwGrammarMarkUp* pWrong = rTxtNode.GetGrammarCheck();
linguistic2::SingleProofreadingError* pArray = rResult.aErrors.getArray();
- USHORT i, j = 0;
+ sal_uInt16 i, j = 0;
if( pWrong )
{
for( i = 0; i < rResult.aErrors.getLength(); ++i )
@@ -1879,8 +1879,8 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
pEndPos->nNode.GetNode().GetTxtNode(), pEndPos->nContent,
bGrammarCheck );
- ULONG nCurrNd = pSttPos->nNode.GetIndex();
- ULONG nEndNd = pEndPos->nNode.GetIndex();
+ sal_uLong nCurrNd = pSttPos->nNode.GetIndex();
+ sal_uLong nEndNd = pEndPos->nNode.GetIndex();
uno::Any aRet;
if( nCurrNd <= nEndNd )
@@ -2213,7 +2213,7 @@ bool SwDoc::ReplaceRange( SwPaM& rPam, const String& rStr,
::std::vector<xub_StrLen> Breaks;
SwPaM aPam( *rPam.GetMark(), *rPam.GetPoint() );
- aPam.Normalize(FALSE);
+ aPam.Normalize(sal_False);
if (aPam.GetPoint()->nNode != aPam.GetMark()->nNode)
{
aPam.Move(fnMoveBackward);
@@ -2540,7 +2540,7 @@ bool SwDoc::DelFullPara( SwPaM& rPam )
/* #i9185# This whould lead to a segmentation fault if not catched
above. */
- ULONG nNextNd = rEnd.nNode.GetIndex() + 1;
+ sal_uLong nNextNd = rEnd.nNode.GetIndex() + 1;
SwTableNode* pTblNd = aNodes[ nNextNd ]->GetTableNode();
if( pTblNd && pNd->IsCntntNode() )
@@ -2643,10 +2643,10 @@ bool SwDoc::DelFullPara( SwPaM& rPam )
}
}
- SwCntntNode *pTmpNode = rPam.GetBound( TRUE ).nNode.GetNode().GetCntntNode();
- rPam.GetBound( TRUE ).nContent.Assign( pTmpNode, 0 );
- pTmpNode = rPam.GetBound( FALSE ).nNode.GetNode().GetCntntNode();
- rPam.GetBound( FALSE ).nContent.Assign( pTmpNode, 0 );
+ SwCntntNode *pTmpNode = rPam.GetBound( sal_True ).nNode.GetNode().GetCntntNode();
+ rPam.GetBound( sal_True ).nContent.Assign( pTmpNode, 0 );
+ pTmpNode = rPam.GetBound( sal_False ).nNode.GetNode().GetCntntNode();
+ rPam.GetBound( sal_False ).nContent.Assign( pTmpNode, 0 );
GetNodes().Delete( aRg.aStart, nNodeDiff+1 );
}
rPam.DeleteMark();
@@ -2668,7 +2668,7 @@ void SwDoc::TransliterateText(
const SwPosition* pStt = rPaM.Start(),
* pEnd = rPaM.End();
- ULONG nSttNd = pStt->nNode.GetIndex(),
+ sal_uLong nSttNd = pStt->nNode.GetIndex(),
nEndNd = pEnd->nNode.GetIndex();
xub_StrLen nSttCnt = pStt->nContent.GetIndex(),
nEndCnt = pEnd->nContent.GetIndex();
@@ -2684,7 +2684,7 @@ void SwDoc::TransliterateText(
pTNd->GetTxt(), nSttCnt,
pBreakIt->GetLocale( pTNd->GetLang( nSttCnt ) ),
WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/,
- TRUE );
+ sal_True );
if( aBndry.startPos < nSttCnt && nSttCnt < aBndry.endPos )
{
@@ -2743,7 +2743,7 @@ void SwDoc::checkRedlining(RedlineMode_t& _rReadlineMode)
&& !((_rReadlineMode & nsRedlineMode_t::REDLINE_SHOW_DELETE) == nsRedlineMode_t::REDLINE_SHOW_DELETE) )
{
WarningBox aWarning( pParent,SW_RES(MSG_DISABLE_READLINE_QUESTION));
- USHORT nResult = aWarning.Execute();
+ sal_uInt16 nResult = aWarning.Execute();
mbReadlineChecked = sal_True;
if ( nResult == RET_YES )
{
@@ -2762,8 +2762,8 @@ void SwDoc::CountWords( const SwPaM& rPaM, SwDocStat& rStat ) const
const SwPosition* pEnd = pStt == rPaM.GetPoint() ? rPaM.GetMark()
: rPaM.GetPoint();
- const ULONG nSttNd = pStt->nNode.GetIndex();
- const ULONG nEndNd = pEnd->nNode.GetIndex();
+ const sal_uLong nSttNd = pStt->nNode.GetIndex();
+ const sal_uLong nEndNd = pEnd->nNode.GetIndex();
const xub_StrLen nSttCnt = pStt->nContent.GetIndex();
const xub_StrLen nEndCnt = pEnd->nContent.GetIndex();
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 7e18e990d070..ff0de7de7dff 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -77,8 +77,8 @@
using namespace ::com::sun::star::uno;
-extern BOOL IsFrameBehind( const SwTxtNode& rMyNd, USHORT nMySttPos,
- const SwTxtNode& rBehindNd, USHORT nSttPos );
+extern sal_Bool IsFrameBehind( const SwTxtNode& rMyNd, sal_uInt16 nMySttPos,
+ const SwTxtNode& rBehindNd, sal_uInt16 nSttPos );
SV_IMPL_OP_PTRARR_SORT( _SetGetExpFlds, _SetGetExpFldPtr )
@@ -94,10 +94,10 @@ SV_IMPL_OP_PTRARR_SORT( _SetGetExpFlds, _SetGetExpFldPtr )
SwFieldType* SwDoc::InsertFldType(const SwFieldType &rFldTyp)
{
- USHORT nSize = pFldTypes->Count(),
+ sal_uInt16 nSize = pFldTypes->Count(),
nFldWhich = rFldTyp.Which();
- USHORT i = INIT_FLDTYPES;
+ sal_uInt16 i = INIT_FLDTYPES;
switch( nFldWhich )
{
@@ -174,8 +174,8 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp )
// - Wird genau der gleiche Typ gefunden, dann muss der geloeschte
// einen anderen Namen erhalten.
- USHORT nSize = pFldTypes->Count(), nFldWhich = rFldTyp.Which();
- USHORT i = INIT_FLDTYPES;
+ sal_uInt16 nSize = pFldTypes->Count(), nFldWhich = rFldTyp.Which();
+ sal_uInt16 i = INIT_FLDTYPES;
ASSERT( RES_SETEXPFLD == nFldWhich ||
RES_USERFLD == nFldWhich ||
@@ -190,7 +190,7 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp )
rSCmp.isEqual( rFldNm, pFnd->GetName() ) )
{
// neuen Namen suchen
- USHORT nNum = 1;
+ sal_uInt16 nNum = 1;
do {
String sSrch( rFldNm );
sSrch.Append( String::CreateFromInt32( nNum ));
@@ -205,7 +205,7 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp )
break; // raus aus der While-Schleife
}
++nNum;
- } while( TRUE );
+ } while( sal_True );
break;
}
@@ -214,13 +214,13 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp )
switch( nFldWhich )
{
case RES_SETEXPFLD:
- ((SwSetExpFieldType&)rFldTyp).SetDeleted( FALSE );
+ ((SwSetExpFieldType&)rFldTyp).SetDeleted( sal_False );
break;
case RES_USERFLD:
- ((SwUserFieldType&)rFldTyp).SetDeleted( FALSE );
+ ((SwUserFieldType&)rFldTyp).SetDeleted( sal_False );
break;
case RES_DDEFLD:
- ((SwDDEFieldType&)rFldTyp).SetDeleted( FALSE );
+ ((SwDDEFieldType&)rFldTyp).SetDeleted( sal_False );
break;
}
}
@@ -229,19 +229,19 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp )
Beschreibung: Feldtypen loeschen
--------------------------------------------------------------------*/
-void SwDoc::RemoveFldType(USHORT nFld)
+void SwDoc::RemoveFldType(sal_uInt16 nFld)
{
ASSERT( INIT_FLDTYPES <= nFld, "keine InitFields loeschen" );
/*
* Abheangige Felder vorhanden -> ErrRaise
*/
- USHORT nSize = pFldTypes->Count();
+ sal_uInt16 nSize = pFldTypes->Count();
if(nFld < nSize)
{
SwFieldType* pTmp = (*pFldTypes)[nFld];
// JP 29.07.96: opt. FeldListe fuer den Calculator vorbereiten:
- USHORT nWhich = pTmp->Which();
+ sal_uInt16 nWhich = pTmp->Which();
switch( nWhich )
{
case RES_SETEXPFLD:
@@ -252,11 +252,11 @@ void SwDoc::RemoveFldType(USHORT nFld)
if( pTmp->GetDepends() && !IsUsed( *pTmp ) )
{
if( RES_SETEXPFLD == nWhich )
- ((SwSetExpFieldType*)pTmp)->SetDeleted( TRUE );
+ ((SwSetExpFieldType*)pTmp)->SetDeleted( sal_True );
else if( RES_USERFLD == nWhich )
- ((SwUserFieldType*)pTmp)->SetDeleted( TRUE );
+ ((SwUserFieldType*)pTmp)->SetDeleted( sal_True );
else
- ((SwDDEFieldType*)pTmp)->SetDeleted( TRUE );
+ ((SwDDEFieldType*)pTmp)->SetDeleted( sal_True );
nWhich = 0;
}
break;
@@ -282,13 +282,13 @@ const SwFldTypes* SwDoc::GetFldTypes() const
Beschreibung: Den ersten Typen mit ResId und Namen finden
--------------------------------------------------------------------*/
-SwFieldType* SwDoc::GetFldType( USHORT nResId, const String& rName,
+SwFieldType* SwDoc::GetFldType( sal_uInt16 nResId, const String& rName,
bool bDbFieldMatching // used in some UNO calls for RES_DBFLD
// to use different string matching code
// #i51815#
) const
{
- USHORT nSize = pFldTypes->Count(), i = 0;
+ sal_uInt16 nSize = pFldTypes->Count(), i = 0;
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
switch( nResId )
@@ -343,7 +343,7 @@ void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB )
// Modify() fuer jeden Feldtypen rufen,
// abhaengige SwTxtFld werden benachrichtigt ...
- for( USHORT i=0; i < pFldTypes->Count(); ++i)
+ for( sal_uInt16 i=0; i < pFldTypes->Count(); ++i)
{
switch( (*pFldTypes)[i]->Which() )
{
@@ -380,7 +380,7 @@ void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB )
}
if( !IsExpFldsLocked() )
- UpdateExpFlds( 0, FALSE ); // Expression-Felder Updaten
+ UpdateExpFlds( 0, sal_False ); // Expression-Felder Updaten
// Tabellen
UpdateTblFlds(pNewHt);
@@ -403,7 +403,7 @@ void SwDoc::UpdateUsrFlds()
{
SwCalc* pCalc = 0;
const SwFieldType* pFldType;
- for( USHORT i = INIT_FLDTYPES; i < pFldTypes->Count(); ++i )
+ for( sal_uInt16 i = INIT_FLDTYPES; i < pFldTypes->Count(); ++i )
if( RES_USERFLD == ( pFldType = (*pFldTypes)[i] )->Which() )
{
if( !pCalc )
@@ -425,7 +425,7 @@ void SwDoc::UpdateUsrFlds()
void SwDoc::UpdateRefFlds( SfxPoolItem* pHt )
{
SwFieldType* pFldType;
- for( USHORT i = 0; i < pFldTypes->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pFldTypes->Count(); ++i )
if( RES_GETREFFLD == ( pFldType = (*pFldTypes)[i] )->Which() )
pFldType->Modify( 0, pHt );
}
@@ -437,7 +437,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
SwFieldType* pFldType(0);
- for (USHORT i = 0; i < pFldTypes->Count(); ++i)
+ for (sal_uInt16 i = 0; i < pFldTypes->Count(); ++i)
{
if( RES_TABLEFLD == ( pFldType = (*pFldTypes)[i] )->Which() )
{
@@ -470,7 +470,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
if( nsSwExtendedSubType::SUB_CMD & pFld->GetSubType() )
pFld->PtrToBoxNm( pUpdtFld->pTbl );
else
- pFld->ChgValid( FALSE );
+ pFld->ChgValid( sal_False );
break;
case TBL_BOXNAME:
// ist es die gesuchte Tabelle ??
@@ -496,7 +496,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
}
else
// setze bei allen das Value-Flag zurueck
- pFld->ChgValid( FALSE );
+ pFld->ChgValid( sal_False );
}
break;
@@ -696,7 +696,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
void SwDoc::UpdatePageFlds( SfxPoolItem* pMsgHnt )
{
SwFieldType* pFldType;
- for( USHORT i = 0; i < INIT_FLDTYPES; ++i )
+ for( sal_uInt16 i = 0; i < INIT_FLDTYPES; ++i )
switch( ( pFldType = (*pFldTypes)[ i ] )->Which() )
{
case RES_PAGENUMBERFLD:
@@ -719,7 +719,7 @@ void SwDoc::UpdatePageFlds( SfxPoolItem* pMsgHnt )
// ---- Loesche alle nicht referenzierten FeldTypen eines Dokumentes --
void SwDoc::GCFieldTypes()
{
- for( USHORT n = pFldTypes->Count(); n > INIT_FLDTYPES; )
+ for( sal_uInt16 n = pFldTypes->Count(); n > INIT_FLDTYPES; )
if( !(*pFldTypes)[ --n ]->GetDepends() )
RemoveFldType( n );
}
@@ -912,19 +912,19 @@ void _SetGetExpFld::SetBodyPos( const SwCntntFrm& rFrm )
}
}
-BOOL _SetGetExpFld::operator<( const _SetGetExpFld& rFld ) const
+sal_Bool _SetGetExpFld::operator<( const _SetGetExpFld& rFld ) const
{
if( nNode < rFld.nNode || ( nNode == rFld.nNode && nCntnt < rFld.nCntnt ))
- return TRUE;
+ return sal_True;
else if( nNode != rFld.nNode || nCntnt != rFld.nCntnt )
- return FALSE;
+ return sal_False;
const SwNode *pFirst = GetNodeFromCntnt(),
*pNext = rFld.GetNodeFromCntnt();
// Position gleich: nur weiter wenn beide FeldPointer besetzt sind !!
if( !pFirst || !pNext )
- return FALSE;
+ return sal_False;
// gleiche Section ??
if( pFirst->StartOfSectionNode() != pNext->StartOfSectionNode() )
@@ -1008,7 +1008,7 @@ const SwNode* _SetGetExpFld::GetNodeFromCntnt() const
xub_StrLen _SetGetExpFld::GetCntPosFromCntnt() const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if( CNTNT.pTxtFld )
switch( eSetGetExpFldType )
{
@@ -1035,8 +1035,8 @@ _HashStr::_HashStr( const String& rName, const String& rText,
// suche nach dem Namen, ist er vorhanden, returne seinen String, sonst
// einen LeerString
-void LookString( SwHash** ppTbl, USHORT nSize, const String& rName,
- String& rRet, USHORT* pPos )
+void LookString( SwHash** ppTbl, sal_uInt16 nSize, const String& rName,
+ String& rRet, sal_uInt16* pPos )
{
rRet = rName;
rRet.EraseLeadingChars().EraseTrailingChars();
@@ -1081,7 +1081,7 @@ void lcl_CalcFld( SwDoc& rDoc, SwCalc& rCalc, const _SetGetExpFld& rSGEFld,
return ;
const SwField* pFld = pTxtFld->GetFld().GetFld();
- const USHORT nFldWhich = pFld->GetTyp()->Which();
+ const sal_uInt16 nFldWhich = pFld->GetTyp()->Which();
if( RES_SETEXPFLD == nFldWhich )
{
@@ -1134,38 +1134,38 @@ void SwDoc::FldsToCalc( SwCalc& rCalc, const _SetGetExpFld& rToThisFld )
{
// erzeuge die Sortierteliste aller SetFelder
pUpdtFlds->MakeFldList( *this, mbNewFldLst, GETFLD_CALC );
- mbNewFldLst = FALSE;
+ mbNewFldLst = sal_False;
SwNewDBMgr* pMgr = GetNewDBMgr();
- pMgr->CloseAll(FALSE);
+ pMgr->CloseAll(sal_False);
if( pUpdtFlds->GetSortLst()->Count() )
{
- USHORT nLast;
+ sal_uInt16 nLast;
_SetGetExpFld* pFld = (_SetGetExpFld*)&rToThisFld;
if( pUpdtFlds->GetSortLst()->Seek_Entry( pFld, &nLast ) )
++nLast;
const _SetGetExpFldPtr* ppSortLst = pUpdtFlds->GetSortLst()->GetData();
- for( USHORT n = 0; n < nLast; ++n, ++ppSortLst )
+ for( sal_uInt16 n = 0; n < nLast; ++n, ++ppSortLst )
lcl_CalcFld( *this, rCalc, **ppSortLst, pMgr );
}
- pMgr->CloseAll(FALSE);
+ pMgr->CloseAll(sal_False);
}
-void SwDoc::FldsToCalc( SwCalc& rCalc, ULONG nLastNd, sal_uInt16 nLastCnt )
+void SwDoc::FldsToCalc( SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt )
{
// erzeuge die Sortierteliste aller SetFelder
pUpdtFlds->MakeFldList( *this, mbNewFldLst, GETFLD_CALC );
- mbNewFldLst = FALSE;
+ mbNewFldLst = sal_False;
SwNewDBMgr* pMgr = GetNewDBMgr();
- pMgr->CloseAll(FALSE);
+ pMgr->CloseAll(sal_False);
const _SetGetExpFldPtr* ppSortLst = pUpdtFlds->GetSortLst()->GetData();
- for( USHORT n = pUpdtFlds->GetSortLst()->Count();
+ for( sal_uInt16 n = pUpdtFlds->GetSortLst()->Count();
n &&
( (*ppSortLst)->GetNode() < nLastNd ||
( (*ppSortLst)->GetNode() == nLastNd && (*ppSortLst)->GetCntnt() <= nLastCnt )
@@ -1173,15 +1173,15 @@ void SwDoc::FldsToCalc( SwCalc& rCalc, ULONG nLastNd, sal_uInt16 nLastCnt )
--n, ++ppSortLst )
lcl_CalcFld( *this, rCalc, **ppSortLst, pMgr );
- pMgr->CloseAll(FALSE);
+ pMgr->CloseAll(sal_False);
}
-void SwDoc::FldsToExpand( SwHash**& ppHashTbl, USHORT& rTblSize,
+void SwDoc::FldsToExpand( SwHash**& ppHashTbl, sal_uInt16& rTblSize,
const _SetGetExpFld& rToThisFld )
{
// erzeuge die Sortierteliste aller SetFelder
pUpdtFlds->MakeFldList( *this, mbNewFldLst, GETFLD_EXPAND );
- mbNewFldLst = FALSE;
+ mbNewFldLst = sal_False;
// HashTabelle fuer alle String Ersetzungen, wird "one the fly" gefuellt
// (versuche eine "ungerade"-Zahl zu erzeugen)
@@ -1189,14 +1189,14 @@ void SwDoc::FldsToExpand( SwHash**& ppHashTbl, USHORT& rTblSize,
ppHashTbl = new SwHash*[ rTblSize ];
memset( ppHashTbl, 0, sizeof( _HashStr* ) * rTblSize );
- USHORT nLast;
+ sal_uInt16 nLast;
{
_SetGetExpFld* pTmp = (_SetGetExpFld*)&rToThisFld;
if( pUpdtFlds->GetSortLst()->Seek_Entry( pTmp, &nLast ) )
++nLast;
}
- USHORT nPos;
+ sal_uInt16 nPos;
SwHash* pFnd;
String aNew;
const _SetGetExpFldPtr* ppSortLst = pUpdtFlds->GetSortLst()->GetData();
@@ -1268,11 +1268,11 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
if( IsExpFldsLocked() || IsInReading() )
return;
- BOOL bOldInUpdateFlds = pUpdtFlds->IsInUpdateFlds();
- pUpdtFlds->SetInUpdateFlds( TRUE );
+ sal_Bool bOldInUpdateFlds = pUpdtFlds->IsInUpdateFlds();
+ pUpdtFlds->SetInUpdateFlds( sal_True );
- pUpdtFlds->MakeFldList( *this, TRUE, GETFLD_ALL );
- mbNewFldLst = FALSE;
+ pUpdtFlds->MakeFldList( *this, sal_True, GETFLD_ALL );
+ mbNewFldLst = sal_False;
if( !pUpdtFlds->GetSortLst()->Count() )
{
@@ -1280,15 +1280,15 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
UpdateRefFlds(NULL);
pUpdtFlds->SetInUpdateFlds( bOldInUpdateFlds );
- pUpdtFlds->SetFieldsDirty( FALSE );
+ pUpdtFlds->SetFieldsDirty( sal_False );
return ;
}
- USHORT nWhich, n;
+ sal_uInt16 nWhich, n;
// HashTabelle fuer alle String Ersetzungen, wird "one the fly" gefuellt
// (versuche eine "ungerade"-Zahl zu erzeugen)
- USHORT nStrFmtCnt = (( pFldTypes->Count() / 7 ) + 1 ) * 7;
+ sal_uInt16 nStrFmtCnt = (( pFldTypes->Count() / 7 ) + 1 ) * 7;
SwHash** pHashStrTbl = new SwHash*[ nStrFmtCnt ];
memset( pHashStrTbl, 0, sizeof( _HashStr* ) * nStrFmtCnt );
@@ -1301,7 +1301,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
case RES_USERFLD:
{
// Eintrag vorhanden ?
- USHORT nPos;
+ sal_uInt16 nPos;
const String& rNm = pFldType->GetName();
String sExpand(((SwUserFieldType*)pFldType)->Expand(nsSwGetSetExpType::GSE_STRING, 0, 0));
SwHash* pFnd = Find( rNm, pHashStrTbl, nStrFmtCnt, &nPos );
@@ -1327,9 +1327,9 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
// aktuelle Datensatznummer schon vorher einstellen
SwNewDBMgr* pMgr = GetNewDBMgr();
- pMgr->CloseAll(FALSE);
+ pMgr->CloseAll(sal_False);
/*
- if(pMgr && pMgr->OpenDB(DBMGR_STD, GetDBDesc(), FALSE))
+ if(pMgr && pMgr->OpenDB(DBMGR_STD, GetDBDesc(), sal_False))
{
if(!pMgr->IsInMerge() )
pMgr->ToFirstSelectedRecord(DBMGR_STD);
@@ -1419,7 +1419,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
// Eintrag in den HashTable eintragen
// Eintrag vorhanden ?
- USHORT nPos;
+ sal_uInt16 nPos;
SwHash* pFnd = Find( rName, pHashStrTbl, nStrFmtCnt, &nPos );
String const value(pFld->ExpandField(IsClipBoard()));
if( pFnd )
@@ -1469,7 +1469,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
// suche den Namen vom Feld
aNew = ((SwSetExpFieldType*)pSFld->GetTyp())->GetSetRefName();
// Eintrag vorhanden ?
- USHORT nPos;
+ sal_uInt16 nPos;
SwHash* pFnd = Find( aNew, pHashStrTbl, nStrFmtCnt, &nPos );
if( pFnd )
// Eintrag in der HashTabelle aendern
@@ -1511,7 +1511,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
if( pSFld->IsSequenceFld() )
{
- const BYTE nLvl = pSFldTyp->GetOutlineLvl();
+ const sal_uInt8 nLvl = pSFldTyp->GetOutlineLvl();
if( MAXLEVEL > nLvl )
{
// dann teste, ob die Nummer neu aufsetzen muss
@@ -1557,7 +1557,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
}
}
- pMgr->CloseAll(FALSE);
+ pMgr->CloseAll(sal_False);
// HashTabelle wieder loeschen
::DeleteHashTable( pHashStrTbl, nStrFmtCnt );
@@ -1566,7 +1566,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
UpdateRefFlds(NULL);
pUpdtFlds->SetInUpdateFlds( bOldInUpdateFlds );
- pUpdtFlds->SetFieldsDirty( FALSE );
+ pUpdtFlds->SetFieldsDirty( sal_False );
}
/*--------------------------------------------------------------------
@@ -1577,9 +1577,9 @@ void SwDoc::UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc )
{
SwNewDBMgr* pMgr = GetNewDBMgr();
- USHORT nFldType = rDBFld.Which();
+ sal_uInt16 nFldType = rDBFld.Which();
- BOOL bPar1 = rCalc.Calculate( rDBFld.GetPar1() ).GetBool();
+ sal_Bool bPar1 = rCalc.Calculate( rDBFld.GetPar1() ).GetBool();
if( RES_DBNEXTSETFLD == nFldType )
((SwDBNextSetField&)rDBFld).SetCondValid( bPar1 );
@@ -1613,7 +1613,7 @@ void SwDoc::UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc )
void SwDoc::_InitFieldTypes() // wird vom CTOR gerufen!!
{
// Feldtypen
- USHORT nFldType = 0;
+ sal_uInt16 nFldType = 0;
pFldTypes->Insert( new SwDateTimeFieldType(this), nFldType++ );
pFldTypes->Insert( new SwChapterFieldType, nFldType++ );
pFldTypes->Insert( new SwPageNumberFieldType, nFldType++ );
@@ -1674,11 +1674,11 @@ const SwDBData& SwDoc::GetDBDesc()
{
if(!aDBData.sDataSource.getLength())
{
- const USHORT nSize = pFldTypes->Count();
- for(USHORT i = 0; i < nSize && !aDBData.sDataSource.getLength(); ++i)
+ const sal_uInt16 nSize = pFldTypes->Count();
+ for(sal_uInt16 i = 0; i < nSize && !aDBData.sDataSource.getLength(); ++i)
{
SwFieldType& rFldType = *((*pFldTypes)[i]);
- USHORT nWhich = rFldType.Which();
+ sal_uInt16 nWhich = rFldType.Which();
if(IsUsed(rFldType))
{
switch(nWhich)
@@ -1715,7 +1715,7 @@ const SwDBData& SwDoc::GetDBDesc()
return aDBData;
}
-void SwDoc::SetInitDBFields( BOOL b )
+void SwDoc::SetInitDBFields( sal_Bool b )
{
GetNewDBMgr()->SetInitDBFields( b );
}
@@ -1745,7 +1745,7 @@ void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList,
}
SwSectionFmts& rArr = GetSections();
- for (USHORT n = rArr.Count(); n; )
+ for (sal_uInt16 n = rArr.Count(); n; )
{
SwSection* pSect = rArr[ --n ]->GetSection();
@@ -1817,7 +1817,7 @@ void SwDoc::GetAllDBNames( SvStringsDtor& rAllDBNames )
SwNewDBMgr* pMgr = GetNewDBMgr();
const SwDSParamArr& rArr = pMgr->GetDSParamArray();
- for(USHORT i = 0; i < rArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < rArr.Count(); i++)
{
SwDSParam* pParam = rArr[i];
String* pStr = new String( pParam->sDataSource );
@@ -1842,7 +1842,7 @@ SvStringsDtor& SwDoc::FindUsedDBs( const SvStringsDtor& rAllDBNames,
#endif
xub_StrLen nPos;
- for (USHORT i = 0; i < rAllDBNames.Count(); ++i )
+ for (sal_uInt16 i = 0; i < rAllDBNames.Count(); ++i )
{
const String* pStr = rAllDBNames.GetObject(i);
@@ -1872,7 +1872,7 @@ SvStringsDtor& SwDoc::FindUsedDBs( const SvStringsDtor& rAllDBNames,
void SwDoc::AddUsedDBToList( SvStringsDtor& rDBNameList,
const SvStringsDtor& rUsedDBNames )
{
- for (USHORT i = 0; i < rUsedDBNames.Count(); i++)
+ for (sal_uInt16 i = 0; i < rUsedDBNames.Count(); i++)
AddUsedDBToList( rDBNameList, *rUsedDBNames.GetObject(i) );
}
@@ -1886,12 +1886,12 @@ void SwDoc::AddUsedDBToList( SvStringsDtor& rDBNameList, const String& rDBName)
return;
#ifdef UNX
- for( USHORT i = 0; i < rDBNameList.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rDBNameList.Count(); ++i )
if( rDBName == rDBNameList.GetObject(i)->GetToken(0) )
return;
#else
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
- for( USHORT i = 0; i < rDBNameList.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rDBNameList.Count(); ++i )
if( rSCmp.isEqual( rDBName, rDBNameList.GetObject(i)->GetToken(0) ) )
return;
#endif
@@ -1920,7 +1920,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
String sFormel;
SwSectionFmts& rArr = GetSections();
- for (USHORT n = rArr.Count(); n; )
+ for (sal_uInt16 n = rArr.Count(); n; )
{
SwSection* pSect = rArr[ --n ]->GetSection();
@@ -1946,7 +1946,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
continue;
SwField* pFld = pFmtFld->GetFld();
- BOOL bExpand = FALSE;
+ sal_Bool bExpand = sal_False;
switch( pFld->GetTyp()->Which() )
{
@@ -1964,7 +1964,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
((SwDBField*)pFld)->ClearInitialized();
((SwDBField*)pFld)->InitContent();
- bExpand = TRUE;
+ bExpand = sal_True;
}
break;
@@ -1974,7 +1974,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
lcl_DBDataToString(((SwDBNameInfField*)pFld)->GetRealDBData())))
{
((SwDBNameInfField*)pFld)->SetDBData(aNewDBData);
- bExpand = TRUE;
+ bExpand = sal_True;
}
break;
@@ -1984,7 +1984,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
lcl_DBDataToString(((SwDBNameInfField*)pFld)->GetRealDBData())))
{
((SwDBNameInfField*)pFld)->SetDBData(aNewDBData);
- bExpand = TRUE;
+ bExpand = sal_True;
}
// kein break;
case RES_HIDDENTXTFLD:
@@ -1992,7 +1992,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
sFormel = pFld->GetPar1();
ReplaceUsedDBs( rOldNames, rNewName, sFormel);
pFld->SetPar1( sFormel );
- bExpand = TRUE;
+ bExpand = sal_True;
break;
case RES_SETEXPFLD:
@@ -2001,7 +2001,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
sFormel = pFld->GetFormula();
ReplaceUsedDBs( rOldNames, rNewName, sFormel);
pFld->SetPar2( sFormel );
- bExpand = TRUE;
+ bExpand = sal_True;
break;
}
@@ -2027,7 +2027,7 @@ void SwDoc::ReplaceUsedDBs( const SvStringsDtor& rUsedDBNames,
String sUpperNewNm( sNewName );
- for( USHORT i = 0; i < rUsedDBNames.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rUsedDBNames.Count(); ++i )
{
String sDBName( *rUsedDBNames.GetObject( i ) );
@@ -2060,26 +2060,26 @@ void SwDoc::ReplaceUsedDBs( const SvStringsDtor& rUsedDBNames,
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwDoc::IsNameInArray( const SvStringsDtor& rArr, const String& rName )
+sal_Bool SwDoc::IsNameInArray( const SvStringsDtor& rArr, const String& rName )
{
#ifdef UNX
- for( USHORT i = 0; i < rArr.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rArr.Count(); ++i )
if( rName == *rArr[ i ] )
- return TRUE;
+ return sal_True;
#else
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
- for( USHORT i = 0; i < rArr.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rArr.Count(); ++i )
if( rSCmp.isEqual( rName, *rArr[ i] ))
- return TRUE;
+ return sal_True;
#endif
- return FALSE;
+ return sal_False;
}
void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
{
- BOOL bIsModified = IsModified();
+ sal_Bool bIsModified = IsModified();
- ULONG nDate, nTime;
+ sal_uLong nDate, nTime;
if( pNewDateTime )
{
nDate = pNewDateTime->GetDate();
@@ -2091,14 +2091,14 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
nTime = Time().GetTime();
}
- USHORT aTypes[5] = {
+ sal_uInt16 aTypes[5] = {
/*0*/ RES_DOCINFOFLD,
/*1*/ RES_AUTHORFLD,
/*2*/ RES_EXTUSERFLD,
/*3*/ RES_FILENAMEFLD,
/*4*/ RES_DATETIMEFLD }; // MUSS am Ende stehen!!
- USHORT nStt = bOnlyTimeDate ? 4 : 0;
+ sal_uInt16 nStt = bOnlyTimeDate ? 4 : 0;
for( ; nStt < 5; ++nStt )
{
@@ -2110,13 +2110,13 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
{
if( pFld && pFld->GetTxtFld() )
{
- BOOL bChgd = FALSE;
+ sal_Bool bChgd = sal_False;
switch( aTypes[ nStt ] )
{
case RES_DOCINFOFLD:
if( ((SwDocInfoField*)pFld->GetFld())->IsFixed() )
{
- bChgd = TRUE;
+ bChgd = sal_True;
SwDocInfoField* pDocInfFld = (SwDocInfoField*)pFld->GetFld();
pDocInfFld->SetExpansion( ((SwDocInfoFieldType*)
pDocInfFld->GetTyp())->Expand(
@@ -2130,7 +2130,7 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
case RES_AUTHORFLD:
if( ((SwAuthorField*)pFld->GetFld())->IsFixed() )
{
- bChgd = TRUE;
+ bChgd = sal_True;
SwAuthorField* pAuthorFld = (SwAuthorField*)pFld->GetFld();
pAuthorFld->SetExpansion( ((SwAuthorFieldType*)
pAuthorFld->GetTyp())->Expand(
@@ -2141,7 +2141,7 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
case RES_EXTUSERFLD:
if( ((SwExtUserField*)pFld->GetFld())->IsFixed() )
{
- bChgd = TRUE;
+ bChgd = sal_True;
SwExtUserField* pExtUserFld = (SwExtUserField*)pFld->GetFld();
pExtUserFld->SetExpansion( ((SwExtUserFieldType*)
pExtUserFld->GetTyp())->Expand(
@@ -2153,7 +2153,7 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
case RES_DATETIMEFLD:
if( ((SwDateTimeField*)pFld->GetFld())->IsFixed() )
{
- bChgd = TRUE;
+ bChgd = sal_True;
((SwDateTimeField*)pFld->GetFld())->SetDateTime(
DateTime(Date(nDate), Time(nTime)) );
}
@@ -2162,7 +2162,7 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
case RES_FILENAMEFLD:
if( ((SwFileNameField*)pFld->GetFld())->IsFixed() )
{
- bChgd = TRUE;
+ bChgd = sal_True;
SwFileNameField* pFileNameFld =
(SwFileNameField*)pFld->GetFld();
pFileNameFld->SetExpansion( ((SwFileNameFieldType*)
@@ -2183,19 +2183,19 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
ResetModified();
}
-bool SwDoc::SetFieldsDirty( bool b, const SwNode* pChk, ULONG nLen )
+bool SwDoc::SetFieldsDirty( bool b, const SwNode* pChk, sal_uLong nLen )
{
// teste ggfs. mal, ob die angegbenen Nodes ueberhaupt Felder beinhalten.
// wenn nicht, braucht das Flag nicht veraendert werden.
- BOOL bFldsFnd = FALSE;
+ sal_Bool bFldsFnd = sal_False;
if( b && pChk && !GetUpdtFlds().IsFieldsDirty() && !IsInDtor()
// ?? was ist mit Undo, da will man es doch auch haben !!
/*&& &pChk->GetNodes() == &GetNodes()*/ )
{
- b = FALSE;
+ b = sal_False;
if( !nLen )
++nLen;
- ULONG nStt = pChk->GetIndex();
+ sal_uLong nStt = pChk->GetIndex();
const SwNodes& rNds = pChk->GetNodes();
while( nLen-- )
{
@@ -2206,15 +2206,15 @@ bool SwDoc::SetFieldsDirty( bool b, const SwNode* pChk, ULONG nLen )
// MAXLEVEL > pTNd->GetTxtColl()->GetOutlineLevel() )
pTNd->GetAttrOutlineLevel() != 0 )//<-end,zhaojianwei
// Kapitelfelder aktualisieren
- b = TRUE;
+ b = sal_True;
else if( pTNd->GetpSwpHints() && pTNd->GetSwpHints().Count() )
- for( USHORT n = 0, nEnd = pTNd->GetSwpHints().Count();
+ for( sal_uInt16 n = 0, nEnd = pTNd->GetSwpHints().Count();
n < nEnd; ++n )
{
const SwTxtAttr* pAttr = pTNd->GetSwpHints()[ n ];
if( RES_TXTATR_FIELD == pAttr->Which() )
{
- b = TRUE;
+ b = sal_True;
break;
}
}
@@ -2233,9 +2233,9 @@ bool SwDoc::SetFieldsDirty( bool b, const SwNode* pChk, ULONG nLen )
---------------------------------------------------------------------------*/
void SwDoc::ChangeAuthorityData( const SwAuthEntry* pNewData )
{
- const USHORT nSize = pFldTypes->Count();
+ const sal_uInt16 nSize = pFldTypes->Count();
- for( USHORT i = INIT_FLDTYPES; i < nSize; ++i )
+ for( sal_uInt16 i = INIT_FLDTYPES; i < nSize; ++i )
{
SwFieldType* pFldType = (*pFldTypes)[i];
if( RES_AUTHORITY == pFldType->Which() )
@@ -2251,9 +2251,9 @@ void SwDoc::ChangeAuthorityData( const SwAuthEntry* pNewData )
Beschreibung:
--------------------------------------------------------------------*/
-void SwDocUpdtFld::InsDelFldInFldLst( BOOL bIns, const SwTxtFld& rFld )
+void SwDocUpdtFld::InsDelFldInFldLst( sal_Bool bIns, const SwTxtFld& rFld )
{
- USHORT nWhich = rFld.GetFld().GetFld()->GetTyp()->Which();
+ sal_uInt16 nWhich = rFld.GetFld().GetFld()->GetTyp()->Which();
switch( nWhich )
{
case RES_DBFLD:
@@ -2270,7 +2270,7 @@ void SwDocUpdtFld::InsDelFldInFldLst( BOOL bIns, const SwTxtFld& rFld )
return;
}
- SetFieldsDirty( TRUE );
+ SetFieldsDirty( sal_True );
if( !pFldSortLst )
{
if( !bIns ) // keine Liste vorhanden und loeschen
@@ -2285,7 +2285,7 @@ void SwDocUpdtFld::InsDelFldInFldLst( BOOL bIns, const SwTxtFld& rFld )
// ueber den pTxtFld Pointer suchen. Ist zwar eine Sortierte
// Liste, aber nach Node-Positionen sortiert. Bis dieser
// bestimmt ist, ist das Suchen nach dem Pointer schon fertig
- for( USHORT n = 0; n < pFldSortLst->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pFldSortLst->Count(); ++n )
if( &rFld == (*pFldSortLst)[ n ]->GetPointer() )
pFldSortLst->DeleteAndDestroy( n--, 1 );
// ein Feld kann mehrfach vorhanden sein!
@@ -2328,17 +2328,17 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
SvULongs aTmpArr;
SwSectionFmts& rArr = rDoc.GetSections();
SwSectionNode* pSectNd;
- USHORT nArrStt = 0;
- ULONG nSttCntnt = rDoc.GetNodes().GetEndOfExtras().GetIndex();
+ sal_uInt16 nArrStt = 0;
+ sal_uLong nSttCntnt = rDoc.GetNodes().GetEndOfExtras().GetIndex();
- for (USHORT n = rArr.Count(); n; )
+ for (sal_uInt16 n = rArr.Count(); n; )
{
SwSection* pSect = rArr[ --n ]->GetSection();
if( pSect && pSect->IsHidden() && pSect->GetCondition().Len() &&
0 != ( pSectNd = pSect->GetFmt()->GetSectionNode() ))
{
- ULONG nIdx = pSectNd->GetIndex();
- USHORT i;
+ sal_uLong nIdx = pSectNd->GetIndex();
+ sal_uInt16 i;
for( i = 0; i < aTmpArr.Count() && aTmpArr[ i ] < nIdx; ++i )
;
@@ -2351,33 +2351,33 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
// erst alle anzeigen, damit die Frames vorhanden sind. Mit deren
// Position wird das BodyAnchor ermittelt.
// Dafuer erst den ContentBereich, dann die Sonderbereiche!!!
- for (USHORT n = nArrStt; n < aTmpArr.Count(); ++n)
+ for (sal_uInt16 n = nArrStt; n < aTmpArr.Count(); ++n)
{
pSectNd = rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode();
ASSERT( pSectNd, "Wo ist mein SectionNode" );
- pSectNd->GetSection().SetCondHidden( FALSE );
+ pSectNd->GetSection().SetCondHidden( sal_False );
}
- for (USHORT n = 0; n < nArrStt; ++n)
+ for (sal_uInt16 n = 0; n < nArrStt; ++n)
{
pSectNd = rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode();
ASSERT( pSectNd, "Wo ist mein SectionNode" );
- pSectNd->GetSection().SetCondHidden( FALSE );
+ pSectNd->GetSection().SetCondHidden( sal_False );
}
// so, erst jetzt alle sortiert in die Liste eintragen
- for (USHORT n = 0; n < aTmpArr.Count(); ++n)
+ for (sal_uInt16 n = 0; n < aTmpArr.Count(); ++n)
{
GetBodyNode( *rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode() );
}
}
String sTrue( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "TRUE" ))),
+ RTL_CONSTASCII_STRINGPARAM( "sal_True" ))),
sFalse( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "FALSE" )));
+ RTL_CONSTASCII_STRINGPARAM( "sal_False" )));
- BOOL bIsDBMgr = 0 != rDoc.GetNewDBMgr();
- USHORT nWhich, n;
+ sal_Bool bIsDBMgr = 0 != rDoc.GetNewDBMgr();
+ sal_uInt16 nWhich, n;
const String* pFormel = 0;
const SfxPoolItem* pItem;
sal_uInt32 nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
@@ -2430,9 +2430,9 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
{
pFormel = &pFld->GetPar1();
if( !pFormel->Len() || pFormel->Equals( sFalse ))
- ((SwHiddenParaField*)pFld)->SetHidden( FALSE );
+ ((SwHiddenParaField*)pFld)->SetHidden( sal_False );
else if( pFormel->Equals( sTrue ))
- ((SwHiddenParaField*)pFld)->SetHidden( TRUE );
+ ((SwHiddenParaField*)pFld)->SetHidden( sal_True );
else
break;
@@ -2447,9 +2447,9 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
{
pFormel = &pFld->GetPar1();
if( !pFormel->Len() || pFormel->Equals( sFalse ))
- ((SwHiddenTxtField*)pFld)->SetValue( TRUE );
+ ((SwHiddenTxtField*)pFld)->SetValue( sal_True );
else if( pFormel->Equals( sTrue ))
- ((SwHiddenTxtField*)pFld)->SetValue( FALSE );
+ ((SwHiddenTxtField*)pFld)->SetValue( sal_False );
else
break;
@@ -2496,7 +2496,7 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
pFormel = 0;
}
}
- nFldLstGetMode = static_cast<BYTE>( eGetMode );
+ nFldLstGetMode = static_cast<sal_uInt8>( eGetMode );
nNodes = rDoc.GetNodes().Count();
#ifdef JP_DEBUG
@@ -2505,7 +2505,7 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
sOut.Seek( STREAM_SEEK_TO_END );
sOut << "------------------" << endl;
const _SetGetExpFldPtr* pSortLst = pFldSortLst->GetData();
- for( USHORT n = pFldSortLst->Count(); n; --n, ++pSortLst )
+ for( sal_uInt16 n = pFldSortLst->Count(); n; --n, ++pSortLst )
{
String sStr( (*pSortLst)->GetNode() );
sStr += "\t, ";
@@ -2528,17 +2528,17 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
Beschreibung:
--------------------------------------------------------------------*/
-void SwDocUpdtFld::GetBodyNode( const SwTxtFld& rTFld, USHORT nFldWhich )
+void SwDocUpdtFld::GetBodyNode( const SwTxtFld& rTFld, sal_uInt16 nFldWhich )
{
const SwTxtNode& rTxtNd = rTFld.GetTxtNode();
const SwDoc& rDoc = *rTxtNd.GetDoc();
// immer den ersten !! (in Tab-Headline, Kopf-/Fuss )
Point aPt;
- const SwCntntFrm* pFrm = rTxtNd.GetFrm( &aPt, 0, FALSE );
+ const SwCntntFrm* pFrm = rTxtNd.GetFrm( &aPt, 0, sal_False );
_SetGetExpFld* pNew = NULL;
- BOOL bIsInBody = FALSE;
+ sal_Bool bIsInBody = sal_False;
if( !pFrm || pFrm->IsInDocBody() )
{
@@ -2601,7 +2601,7 @@ void SwDocUpdtFld::GetBodyNode( const SwSectionNode& rSectNd )
// immer den ersten !! (in Tab-Headline, Kopf-/Fuss )
Point aPt;
- const SwCntntFrm* pFrm = pCNd->GetFrm( &aPt, 0, FALSE );
+ const SwCntntFrm* pFrm = pCNd->GetFrm( &aPt, 0, sal_False );
if( !pFrm )
break;
@@ -2612,7 +2612,7 @@ void SwDocUpdtFld::GetBodyNode( const SwSectionNode& rSectNd )
#endif
pNew = new _SetGetExpFld( rSectNd, &aPos );
- } while( FALSE );
+ } while( sal_False );
}
if( !pNew )
@@ -2639,10 +2639,10 @@ void SwDocUpdtFld::InsertFldType( const SwFieldType& rType )
if( sFldName.Len() )
{
- SetFieldsDirty( TRUE );
+ SetFieldsDirty( sal_True );
// suchen und aus der HashTabelle entfernen
GetAppCharClass().toLower( sFldName );
- USHORT n;
+ sal_uInt16 n;
SwHash* pFnd = Find( sFldName, GetFldTypeTable(), TBLSZ, &n );
@@ -2670,10 +2670,10 @@ void SwDocUpdtFld::RemoveFldType( const SwFieldType& rType )
if( sFldName.Len() )
{
- SetFieldsDirty( TRUE );
+ SetFieldsDirty( sal_True );
// suchen und aus der HashTabelle entfernen
GetAppCharClass().toLower( sFldName );
- USHORT n;
+ sal_uInt16 n;
SwHash* pFnd = Find( sFldName, GetFldTypeTable(), TBLSZ, &n );
if( pFnd )
@@ -2696,7 +2696,7 @@ void SwDocUpdtFld::RemoveFldType( const SwFieldType& rType )
SwDocUpdtFld::SwDocUpdtFld()
: pFldSortLst(0), nFldUpdtPos(LONG_MAX), nFldLstGetMode(0)
{
- bInUpdateFlds = bFldsDirty = FALSE;
+ bInUpdateFlds = bFldsDirty = sal_False;
memset( aFldTypeTable, 0, sizeof( aFldTypeTable ) );
}
@@ -2704,7 +2704,7 @@ SwDocUpdtFld::~SwDocUpdtFld()
{
delete pFldSortLst;
- for( USHORT n = 0; n < TBLSZ; ++n )
+ for( sal_uInt16 n = 0; n < TBLSZ; ++n )
delete aFldTypeTable[n];
}
@@ -2715,11 +2715,11 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
{
ASSERT(pDstTxtFld, "no field to update!");
- BOOL bTblSelBreak = FALSE;
+ sal_Bool bTblSelBreak = sal_False;
SwFmtFld * pDstFmtFld = (SwFmtFld*)&pDstTxtFld->GetFld();
SwField * pDstFld = pDstFmtFld->GetFld();
- USHORT nFldWhich = rSrcFld.GetTyp()->Which();
+ sal_uInt16 nFldWhich = rSrcFld.GetTyp()->Which();
SwNodeIndex aTblNdIdx(pDstTxtFld->GetTxtNode());
if (pDstFld->GetTyp()->Which() ==
@@ -2764,7 +2764,7 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
pNewFld->GetTyp()->Modify(0, &aTblUpdate);
if (! bUpdateFlds)
- bTblSelBreak = TRUE;
+ bTblSelBreak = sal_True;
}
}
break;
@@ -2791,7 +2791,7 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
//richtig setzt
SwDBField* pDBFld = (SwDBField*)pNewFld;
if (pDBFld->IsInitialized())
- pDBFld->ChgValue( pDBFld->GetValue(), TRUE );
+ pDBFld->ChgValue( pDBFld->GetValue(), sal_True );
pDBFld->ClearInitialized();
pDBFld->InitContent();
@@ -2812,7 +2812,7 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
}
bool SwDoc::PutValueToField(const SwPosition & rPos,
- const Any& rVal, USHORT nWhich)
+ const Any& rVal, sal_uInt16 nWhich)
{
Any aOldVal;
SwField * pField = GetField(rPos);
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index 68c525ad74e1..ea79b22bb68c 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -69,7 +69,7 @@
#include <undoflystrattr.hxx>
// <--
-extern USHORT GetHtmlMode( const SwDocShell* );
+extern sal_uInt16 GetHtmlMode( const SwDocShell* );
using namespace ::com::sun::star;
@@ -77,13 +77,13 @@ using namespace ::com::sun::star;
/*-----------------17.02.98 08:35-------------------
--------------------------------------------------*/
-USHORT SwDoc::GetFlyCount( FlyCntType eType ) const
+sal_uInt16 SwDoc::GetFlyCount( FlyCntType eType ) const
{
const SwSpzFrmFmts& rFmts = *GetSpzFrmFmts();
- USHORT nSize = rFmts.Count();
- USHORT nCount = 0;
+ sal_uInt16 nSize = rFmts.Count();
+ sal_uInt16 nCount = 0;
const SwNodeIndex* pIdx;
- for ( USHORT i = 0; i < nSize; i++)
+ for ( sal_uInt16 i = 0; i < nSize; i++)
{
const SwFrmFmt* pFlyFmt = rFmts[ i ];
if( RES_FLYFRMFMT == pFlyFmt->Which()
@@ -122,14 +122,14 @@ USHORT SwDoc::GetFlyCount( FlyCntType eType ) const
--------------------------------------------------*/
// If you change this, also update SwXFrameEnumeration in unocoll.
-SwFrmFmt* SwDoc::GetFlyNum( USHORT nIdx, FlyCntType eType )
+SwFrmFmt* SwDoc::GetFlyNum( sal_uInt16 nIdx, FlyCntType eType )
{
SwSpzFrmFmts& rFmts = *GetSpzFrmFmts();
SwFrmFmt* pRetFmt = 0;
- USHORT nSize = rFmts.Count();
+ sal_uInt16 nSize = rFmts.Count();
const SwNodeIndex* pIdx;
- USHORT nCount = 0;
- for( USHORT i = 0; !pRetFmt && i < nSize; ++i )
+ sal_uInt16 nCount = 0;
+ for( sal_uInt16 i = 0; !pRetFmt && i < nSize; ++i )
{
SwFrmFmt* pFlyFmt = rFmts[ i ];
if( RES_FLYFRMFMT == pFlyFmt->Which()
@@ -181,7 +181,7 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
case FLY_AS_CHAR:
if( pFlyFmt && rAnch.GetCntntAnchor() )
{
- const SwFrm* pOld = ((SwFlyFrmFmt*)pFlyFmt)->GetFrm( &aRet, FALSE );
+ const SwFrm* pOld = ((SwFlyFrmFmt*)pFlyFmt)->GetFrm( &aRet, sal_False );
if( pOld )
aRet = pOld->Frm().Pos();
}
@@ -193,7 +193,7 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
{
const SwPosition *pPos = rAnch.GetCntntAnchor();
const SwCntntNode* pNd = pPos->nNode.GetNode().GetCntntNode();
- const SwFrm* pOld = pNd ? pNd->GetFrm( &aRet, 0, FALSE ) : 0;
+ const SwFrm* pOld = pNd ? pNd->GetFrm( &aRet, 0, sal_False ) : 0;
if( pOld )
aRet = pOld->Frm().Pos();
}
@@ -204,7 +204,7 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
{
const SwFlyFrmFmt* pFmt = (SwFlyFrmFmt*)rAnch.GetCntntAnchor()->
nNode.GetNode().GetFlyFmt();
- const SwFrm* pOld = pFmt ? pFmt->GetFrm( &aRet, FALSE ) : 0;
+ const SwFrm* pOld = pFmt ? pFmt->GetFrm( &aRet, sal_False ) : 0;
if( pOld )
aRet = pOld->Frm().Pos();
}
@@ -212,9 +212,9 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
case FLY_AT_PAGE:
{
- USHORT nPgNum = rAnch.GetPageNum();
+ sal_uInt16 nPgNum = rAnch.GetPageNum();
const SwPageFrm *pPage = (SwPageFrm*)rDoc.GetRootFrm()->Lower();
- for( USHORT i = 1; (i <= nPgNum) && pPage; ++i,
+ for( sal_uInt16 i = 1; (i <= nPgNum) && pPage; ++i,
pPage = (const SwPageFrm*)pPage->GetNext() )
if( i == nPgNum )
{
@@ -233,7 +233,7 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
#define IGNOREANCHOR 1
#define DONTMAKEFRMS 2
-sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms )
+sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, sal_Bool bNewFrms )
{
//Ankerwechsel sind fast immer in alle 'Richtungen' erlaubt.
//Ausnahme: Absatz- bzw. Zeichengebundene Rahmen duerfen wenn sie in
@@ -307,10 +307,10 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
pNd->InsertItem( aFmt, pPos->nContent.GetIndex(), 0 );
}
- if( SFX_ITEM_SET != rSet.GetItemState( RES_VERT_ORIENT, FALSE, &pItem ))
+ if( SFX_ITEM_SET != rSet.GetItemState( RES_VERT_ORIENT, sal_False, &pItem ))
{
SwFmtVertOrient aOldV( rFmt.GetVertOrient() );
- BOOL bSet = TRUE;
+ sal_Bool bSet = sal_True;
switch( aOldV.GetVertOrient() )
{
case text::VertOrientation::LINE_TOP: aOldV.SetVertOrient( text::VertOrientation::TOP ); break;
@@ -318,7 +318,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
case text::VertOrientation::LINE_BOTTOM: aOldV.SetVertOrient( text::VertOrientation::BOTTOM); break;
case text::VertOrientation::NONE: aOldV.SetVertOrient( text::VertOrientation::CENTER); break;
default:
- bSet = FALSE;
+ bSet = sal_False;
}
if( bSet )
rSet.Put( aOldV );
@@ -336,7 +336,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
//Chg: Wenn sich in den Positionsattributen lediglich die
//Ausrichtung veraendert (text::RelOrientation::FRAME vs. text::RelOrientation::PRTAREA), dann wird die
//Position ebenfalls korrigiert.
- if( SFX_ITEM_SET != rSet.GetItemState( RES_HORI_ORIENT, FALSE, &pItem ))
+ if( SFX_ITEM_SET != rSet.GetItemState( RES_HORI_ORIENT, sal_False, &pItem ))
pItem = 0;
SwFmtHoriOrient aOldH( rFmt.GetHoriOrient() );
@@ -357,7 +357,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
rSet.Put( aOldH );
}
- if( SFX_ITEM_SET != rSet.GetItemState( RES_VERT_ORIENT, FALSE, &pItem ))
+ if( SFX_ITEM_SET != rSet.GetItemState( RES_VERT_ORIENT, sal_False, &pItem ))
pItem = 0;
SwFmtVertOrient aOldV( rFmt.GetVertOrient() );
@@ -389,10 +389,10 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
return MAKEFRMS;
}
-BOOL SwDoc::SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet )
+sal_Bool SwDoc::SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet )
{
if( !rSet.Count() )
- return FALSE;
+ return sal_False;
::std::auto_ptr<SwUndoFmtAttrHelper> pSaveUndo;
const bool bDoesUndo = DoesUndo();
@@ -404,20 +404,20 @@ BOOL SwDoc::SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet )
// --> FME 2004-10-13 #i32968#
// Inserting columns in the frame causes MakeFrmFmt to put two
// objects of type SwUndoFrmFmt on the undo stack. We don't want them.
- DoUndo( FALSE );
+ DoUndo( sal_False );
// <--
}
//Ist das Ankerattribut dabei? Falls ja ueberlassen wir die Verarbeitung
- //desselben einer Spezialmethode. Sie Returnt TRUE wenn der Fly neu
+ //desselben einer Spezialmethode. Sie Returnt sal_True wenn der Fly neu
//erzeugt werden muss (z.B. weil ein Wechsel des FlyTyps vorliegt).
- sal_Int8 nMakeFrms = SFX_ITEM_SET == rSet.GetItemState( RES_ANCHOR, FALSE )?
- SetFlyFrmAnchor( rFlyFmt, rSet, FALSE ) : DONTMAKEFRMS;
+ sal_Int8 nMakeFrms = SFX_ITEM_SET == rSet.GetItemState( RES_ANCHOR, sal_False )?
+ SetFlyFrmAnchor( rFlyFmt, rSet, sal_False ) : DONTMAKEFRMS;
const SfxPoolItem* pItem;
SfxItemIter aIter( rSet );
SfxItemSet aTmpSet( GetAttrPool(), aFrmFmtSetRange );
- USHORT nWhich = aIter.GetCurItem()->Which();
+ sal_uInt16 nWhich = aIter.GetCurItem()->Which();
do {
switch( nWhich )
{
@@ -437,7 +437,7 @@ BOOL SwDoc::SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet )
default:
if( !IsInvalidItem( aIter.GetCurItem() ) && ( SFX_ITEM_SET !=
- rFlyFmt.GetAttrSet().GetItemState( nWhich, TRUE, &pItem ) ||
+ rFlyFmt.GetAttrSet().GetItemState( nWhich, sal_True, &pItem ) ||
*pItem != *aIter.GetCurItem() ))
aTmpSet.Put( *aIter.GetCurItem() );
break;
@@ -528,16 +528,16 @@ void SwDoc::SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt,
// <--
/***************************************************************************
- * Methode : BOOL SwDoc::SetFrmFmtToFly( SwFlyFrm&, SwFrmFmt& )
+ * Methode : sal_Bool SwDoc::SetFrmFmtToFly( SwFlyFrm&, SwFrmFmt& )
* Beschreibung:
* Erstellt : OK 14.04.94 15:40
* Aenderung : JP 23.04.98
***************************************************************************/
-BOOL SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
- SfxItemSet* pSet, BOOL bKeepOrient )
+sal_Bool SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
+ SfxItemSet* pSet, sal_Bool bKeepOrient )
{
- BOOL bChgAnchor = FALSE, bFrmSz = FALSE;
+ sal_Bool bChgAnchor = sal_False, bFrmSz = sal_False;
const SwFmtFrmSize aFrmSz( rFmt.GetFrmSize() );
const SwFmtVertOrient aVert( rFmt.GetVertOrient() );
@@ -551,7 +551,7 @@ BOOL SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
// --> FME 2004-10-13 #i32968#
// Inserting columns in the section causes MakeFrmFmt to put two
// objects of type SwUndoFrmFmt on the undo stack. We don't want them.
- DoUndo( FALSE );
+ DoUndo( sal_False );
// <--
}
@@ -567,20 +567,20 @@ BOOL SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
// 1. wenn nicht automatisch -> ignorieren, sonst -> wech
// 2. wech damit, MB!
- if( SFX_ITEM_SET == rNewFmt.GetAttrSet().GetItemState( RES_FRM_SIZE, FALSE ))
+ if( SFX_ITEM_SET == rNewFmt.GetAttrSet().GetItemState( RES_FRM_SIZE, sal_False ))
{
rFmt.ResetFmtAttr( RES_FRM_SIZE );
- bFrmSz = TRUE;
+ bFrmSz = sal_True;
}
const SfxItemSet* pAsk = pSet;
if( !pAsk ) pAsk = &rNewFmt.GetAttrSet();
- if( SFX_ITEM_SET == pAsk->GetItemState( RES_ANCHOR, FALSE, &pItem )
+ if( SFX_ITEM_SET == pAsk->GetItemState( RES_ANCHOR, sal_False, &pItem )
&& ((SwFmtAnchor*)pItem)->GetAnchorId() !=
rFmt.GetAnchor().GetAnchorId() )
{
if( pSet )
- bChgAnchor = MAKEFRMS == SetFlyFrmAnchor( rFmt, *pSet, FALSE );
+ bChgAnchor = MAKEFRMS == SetFlyFrmAnchor( rFmt, *pSet, sal_False );
else
{
//JP 23.04.98: muss den FlyFmt-Range haben, denn im SetFlyFrmAnchor
@@ -588,7 +588,7 @@ BOOL SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
SfxItemSet aFlySet( *rNewFmt.GetAttrSet().GetPool(),
rNewFmt.GetAttrSet().GetRanges() );
aFlySet.Put( *pItem );
- bChgAnchor = MAKEFRMS == SetFlyFrmAnchor( rFmt, aFlySet, FALSE);
+ bChgAnchor = MAKEFRMS == SetFlyFrmAnchor( rFmt, aFlySet, sal_False);
}
}
}
@@ -623,7 +623,7 @@ BOOL SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
// --> FME 2004-10-13 #i32968#
if ( pUndo )
- DoUndo( TRUE );
+ DoUndo( sal_True );
// <--
return bChgAnchor;
@@ -662,8 +662,8 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
StartUndo( UNDO_INSATTR, NULL );
- BOOL bUnmark = FALSE;
- for ( USHORT i = 0; i < _rMrkList.GetMarkCount(); ++i )
+ sal_Bool bUnmark = sal_False;
+ for ( sal_uInt16 i = 0; i < _rMrkList.GetMarkCount(); ++i )
{
SdrObject* pObj = _rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( !pObj->ISA(SwVirtFlyDrawObj) )
@@ -754,7 +754,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
// OD 20.06.2003 #108784# - consider that drawing objects
// can be in header/footer. Thus, <GetFrm()> by left-top-corner
pTxtFrm = aPos.nNode.GetNode().
- GetCntntNode()->GetFrm( &aPt, 0, FALSE );
+ GetCntntNode()->GetFrm( &aPt, 0, sal_False );
}
const SwFrm *pTmp = ::FindAnchor( pTxtFrm, aPt );
pNewAnchorFrm = pTmp->FindFlyFrm();
@@ -937,16 +937,16 @@ int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest )
if( !pTxtNd )
return SW_CHAIN_NOT_FOUND;
- const ULONG nFlySttNd = pCntIdx->GetIndex();
+ const sal_uLong nFlySttNd = pCntIdx->GetIndex();
if( 2 != ( pCntIdx->GetNode().EndOfSectionIndex() - nFlySttNd ) ||
pTxtNd->GetTxt().Len() )
return SW_CHAIN_NOT_EMPTY;
- USHORT nArrLen = GetSpzFrmFmts()->Count();
- for( USHORT n = 0; n < nArrLen; ++n )
+ sal_uInt16 nArrLen = GetSpzFrmFmts()->Count();
+ for( sal_uInt16 n = 0; n < nArrLen; ++n )
{
const SwFmtAnchor& rAnchor = (*GetSpzFrmFmts())[ n ]->GetAnchor();
- ULONG nTstSttNd;
+ sal_uLong nTstSttNd;
// OD 11.12.2003 #i20622# - to-frame anchored objects are allowed.
if ( ((rAnchor.GetAnchorId() == FLY_AT_PARA) ||
(rAnchor.GetAnchorId() == FLY_AT_CHAR)) &&
@@ -968,14 +968,14 @@ int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest )
// both in the same fly, header, footer or on the page?
const SwFmtAnchor &rSrcAnchor = rSource.GetAnchor(),
&rDstAnchor = rDest.GetAnchor();
- ULONG nEndOfExtras = GetNodes().GetEndOfExtras().GetIndex();
- BOOL bAllowed = FALSE;
+ sal_uLong nEndOfExtras = GetNodes().GetEndOfExtras().GetIndex();
+ sal_Bool bAllowed = sal_False;
if ( FLY_AT_PAGE == rSrcAnchor.GetAnchorId() )
{
if ( (FLY_AT_PAGE == rDstAnchor.GetAnchorId()) ||
( rDstAnchor.GetCntntAnchor() &&
rDstAnchor.GetCntntAnchor()->nNode.GetIndex() > nEndOfExtras ))
- bAllowed = TRUE;
+ bAllowed = sal_True;
}
else if( rSrcAnchor.GetCntntAnchor() && rDstAnchor.GetCntntAnchor() )
{
@@ -994,7 +994,7 @@ int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest )
pSttNd == rDstIdx.GetNode().FindHeaderStartNode() ) ||
( !pSttNd && rDstIdx.GetIndex() > nEndOfExtras &&
rSrcIdx.GetIndex() > nEndOfExtras ))
- bAllowed = TRUE;
+ bAllowed = sal_True;
}
return bAllowed ? SW_CHAIN_OK : SW_CHAIN_WRONG_AREA;
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index eba51c0354f8..663cca144989 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -95,14 +95,14 @@ SV_IMPL_PTRARR(SwSpzFrmFmts,SwFrmFmtPtr)
* interne Funktionen
*/
-BOOL SetTxtFmtCollNext( const SwTxtFmtCollPtr& rpTxtColl, void* pArgs )
+sal_Bool SetTxtFmtCollNext( const SwTxtFmtCollPtr& rpTxtColl, void* pArgs )
{
SwTxtFmtColl *pDel = (SwTxtFmtColl*) pArgs;
if ( &rpTxtColl->GetNextTxtFmtColl() == pDel )
{
rpTxtColl->SetNextTxtFmtColl( *rpTxtColl );
}
- return TRUE;
+ return sal_True;
}
/*
@@ -116,7 +116,7 @@ struct ParaRstFmt
SwHistory* pHistory;
const SwPosition *pSttNd, *pEndNd;
const SfxItemSet* pDelSet;
- USHORT nWhich;
+ sal_uInt16 nWhich;
bool bReset;
// --> OD 2007-11-06 #i62575#
bool bResetListAttrs;
@@ -127,7 +127,7 @@ struct ParaRstFmt
bool bKeepOutlineLevelAttr; //#outline level,add by zhaojianwei
ParaRstFmt( const SwPosition* pStt, const SwPosition* pEnd,
- SwHistory* pHst, USHORT nWhch = 0, const SfxItemSet* pSet = 0 )
+ SwHistory* pHst, sal_uInt16 nWhch = 0, const SfxItemSet* pSet = 0 )
: pFmtColl(0),
pHistory(pHst),
pSttNd(pStt),
@@ -164,14 +164,14 @@ struct ParaRstFmt
* (wird bei Selectionen am Start/Ende und bei keiner SSelection benoetigt)
*/
-BOOL lcl_RstTxtAttr( const SwNodePtr& rpNd, void* pArgs )
+sal_Bool lcl_RstTxtAttr( const SwNodePtr& rpNd, void* pArgs )
{
ParaRstFmt* pPara = (ParaRstFmt*)pArgs;
SwTxtNode * pTxtNode = (SwTxtNode*)rpNd->GetTxtNode();
if( pTxtNode && pTxtNode->GetpSwpHints() )
{
SwIndex aSt( pTxtNode, 0 );
- USHORT nEnd = pTxtNode->Len();
+ sal_uInt16 nEnd = pTxtNode->Len();
if( &pPara->pSttNd->nNode.GetNode() == pTxtNode &&
pPara->pSttNd->nContent.GetIndex() )
@@ -194,16 +194,16 @@ BOOL lcl_RstTxtAttr( const SwNodePtr& rpNd, void* pArgs )
pTxtNode->RstAttr( aSt, nEnd - aSt.GetIndex(), pPara->nWhich,
pPara->pDelSet, pPara->bInclRefToxMark );
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
+sal_Bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
{
ParaRstFmt* pPara = (ParaRstFmt*)pArgs;
SwCntntNode* pNode = (SwCntntNode*)rpNd->GetCntntNode();
if( pNode && pNode->HasSwAttrSet() )
{
- const BOOL bLocked = pNode->IsModifyLocked();
+ const sal_Bool bLocked = pNode->IsModifyLocked();
pNode->LockModify();
SwDoc* pDoc = pNode->GetDoc();
@@ -220,7 +220,7 @@ BOOL lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
const SfxItemSet* pSet = pNode->GetpSwAttrSet();
// --> OD 2008-04-15 #refactorlists#
-// std::vector<USHORT> aClearWhichIds;
+// std::vector<sal_uInt16> aClearWhichIds;
SvUShorts aClearWhichIds;
// <--
// --> OD 2008-04-15 #refactorlists#
@@ -245,15 +245,15 @@ BOOL lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
// <--
const SfxPoolItem* pItem;
- // USHORT __READONLY_DATA aSavIds[ 3 ] = { RES_PAGEDESC, RES_BREAK, //#outline level,removed by zhaojianwei
+ // sal_uInt16 __READONLY_DATA aSavIds[ 3 ] = { RES_PAGEDESC, RES_BREAK, //#outline level,removed by zhaojianwei
// RES_PARATR_NUMRULE };
- //for( USHORT n = 0; n < 3; ++n )
- USHORT __READONLY_DATA aSavIds[ 4 ] = { RES_PAGEDESC, RES_BREAK, //->add by zhaojianwei
+ //for( sal_uInt16 n = 0; n < 3; ++n )
+ sal_uInt16 __READONLY_DATA aSavIds[ 4 ] = { RES_PAGEDESC, RES_BREAK, //->add by zhaojianwei
RES_PARATR_NUMRULE,
RES_PARATR_OUTLINELEVEL };
- for( USHORT n = 0; n < 4; ++n ) //<-end,zhaojianwei
+ for( sal_uInt16 n = 0; n < 4; ++n ) //<-end,zhaojianwei
{
- if( SFX_ITEM_SET == pSet->GetItemState( aSavIds[ n ], FALSE, &pItem ))
+ if( SFX_ITEM_SET == pSet->GetItemState( aSavIds[ n ], sal_False, &pItem ))
{
bool bSave = false;
switch( aSavIds[ n ] )
@@ -312,14 +312,14 @@ BOOL lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
// <--
SfxItemIter aIter( *pPara->pDelSet );
pItem = aIter.FirstItem();
- while( TRUE )
+ while( sal_True )
{
// --> OD 2008-04-14 #refactorlists#
//
if ( ( pItem->Which() != RES_PAGEDESC &&
pItem->Which() != RES_BREAK &&
pItem->Which() != RES_PARATR_NUMRULE ) ||
- ( aSet.GetItemState( pItem->Which(), FALSE ) != SFX_ITEM_SET ) )
+ ( aSet.GetItemState( pItem->Which(), sal_False ) != SFX_ITEM_SET ) )
{
pNode->ResetAttr( pItem->Which() );
}
@@ -350,10 +350,10 @@ BOOL lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
pNode->UnlockModify();
}
}
- return TRUE;
+ return sal_True;
}
-void SwDoc::RstTxtAttrs(const SwPaM &rRg, BOOL bInclRefToxMark )
+void SwDoc::RstTxtAttrs(const SwPaM &rRg, sal_Bool bInclRefToxMark )
{
SwHistory* pHst = 0;
SwDataChanged aTmp( rRg, 0 );
@@ -366,14 +366,14 @@ void SwDoc::RstTxtAttrs(const SwPaM &rRg, BOOL bInclRefToxMark )
}
const SwPosition *pStt = rRg.Start(), *pEnd = rRg.End();
ParaRstFmt aPara( pStt, pEnd, pHst );
- aPara.bInclRefToxMark = ( bInclRefToxMark == TRUE );
+ aPara.bInclRefToxMark = ( bInclRefToxMark == sal_True );
GetNodes().ForEach( pStt->nNode.GetIndex(), pEnd->nNode.GetIndex()+1,
lcl_RstTxtAttr, &aPara );
SetModified();
}
void SwDoc::ResetAttrs( const SwPaM &rRg,
- BOOL bTxtAttr,
+ sal_Bool bTxtAttr,
const SvUShortsSort* pAttrs,
// --> OD 2008-11-28 #b96644#
const bool bSendDataChangedEvents )
@@ -382,7 +382,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
SwPaM* pPam = (SwPaM*)&rRg;
if( !bTxtAttr && pAttrs && pAttrs->Count() &&
RES_TXTATR_END > (*pAttrs)[ 0 ] )
- bTxtAttr = TRUE;
+ bTxtAttr = sal_True;
if( !rRg.HasMark() )
{
@@ -393,7 +393,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
pPam = new SwPaM( *rRg.GetPoint() );
SwIndex& rSt = pPam->GetPoint()->nContent;
- USHORT nMkPos, nPtPos = rSt.GetIndex();
+ sal_uInt16 nMkPos, nPtPos = rSt.GetIndex();
// JP 22.08.96: Sonderfall: steht der Crsr in einem URL-Attribut
// dann wird dessen Bereich genommen
@@ -412,7 +412,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/,
- TRUE );
+ sal_True );
if( aBndry.startPos < nPtPos && nPtPos < aBndry.endPos )
{
@@ -423,7 +423,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
{
nPtPos = nMkPos = rSt.GetIndex();
if( bTxtAttr )
- pTxtNd->DontExpandFmt( rSt, TRUE );
+ pTxtNd->DontExpandFmt( rSt, sal_True );
}
}
@@ -445,7 +445,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
{
ClearRedo();
SwUndoResetAttr* pUndo = new SwUndoResetAttr( rRg,
- static_cast<USHORT>(bTxtAttr ? RES_CONDTXTFMTCOLL : RES_TXTFMTCOLL ));
+ static_cast<sal_uInt16>(bTxtAttr ? RES_CONDTXTFMTCOLL : RES_TXTFMTCOLL ));
if( pAttrs && pAttrs->Count() )
{
pUndo->SetAttrs( *pAttrs );
@@ -458,7 +458,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
ParaRstFmt aPara( pStt, pEnd, pHst );
// mst: not including META here; it seems attrs with CH_TXTATR are omitted
- USHORT __FAR_DATA aResetableSetRange[] = {
+ sal_uInt16 __FAR_DATA aResetableSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -476,7 +476,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
SfxItemSet aDelSet( GetAttrPool(), aResetableSetRange );
if( pAttrs && pAttrs->Count() )
{
- for( USHORT n = pAttrs->Count(); n; )
+ for( sal_uInt16 n = pAttrs->Count(); n; )
if( POOLATTR_END > (*pAttrs)[ --n ] )
aDelSet.Put( *GetDfltAttr( (*pAttrs)[ n ] ));
@@ -484,7 +484,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
aPara.pDelSet = &aDelSet;
}
- BOOL bAdd = TRUE;
+ sal_Bool bAdd = sal_True;
SwNodeIndex aTmpStt( pStt->nNode );
SwNodeIndex aTmpEnd( pEnd->nNode );
if( pStt->nContent.GetIndex() ) // nur ein Teil
@@ -497,7 +497,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
const SfxPoolItem* pItem = aIter.GetCurItem();
SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END );
- while( TRUE )
+ while( sal_True )
{
if( IsInRange( aCharFmtSetRange, pItem->Which() ))
{
@@ -539,7 +539,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
}
if( pEnd->nContent.GetIndex() == pEnd->nNode.GetNode().GetCntntNode()->Len() )
// dann spaeter aufsetzen und alle CharFmtAttr -> TxtFmtAttr
- aTmpEnd++, bAdd = FALSE;
+ aTmpEnd++, bAdd = sal_False;
else if( pStt->nNode != pEnd->nNode || !pStt->nContent.GetIndex() )
{
SwTxtNode* pTNd = aTmpEnd.GetNode().GetTxtNode();
@@ -547,7 +547,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
{
SfxItemIter aIter( *pTNd->GetpSwAttrSet() );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
if( IsInRange( aCharFmtSetRange, pItem->Which() ))
{
@@ -615,7 +615,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
{
SfxItemIter aIter( rChgSet );
const SfxPoolItem* pItem = aIter.FirstItem();
- const USHORT nWhich = pItem->Which();
+ const sal_uInt16 nWhich = pItem->Which();
if ( isCHRATR(nWhich) ||
(RES_TXTATR_CHARFMT == nWhich) ||
@@ -695,7 +695,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
}
// <--
- SwNumFmt aNumFmt = pNumRule->Get(static_cast<USHORT>(pTxtNd->GetActualListLevel()));
+ SwNumFmt aNumFmt = pNumRule->Get(static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()));
SwCharFmt * pCharFmt =
pDoc->FindCharFmtByName(aNumFmt.GetCharFmtName());
@@ -734,7 +734,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
pStt->nNode, pStt->nContent.GetIndex() );
if( pUndo )
- pUndo->SaveRedlineData( aPam, TRUE );
+ pUndo->SaveRedlineData( aPam, sal_True );
if( pDoc->IsRedlineOn() )
pDoc->AppendRedline( new SwRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
@@ -759,8 +759,8 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
aTxtSet.Put( rChgSet );
if( aTxtSet.Count() )
{
- USHORT nInsCnt = rSt.GetIndex();
- USHORT nEnd = pStt->nNode == pEnd->nNode
+ sal_uInt16 nInsCnt = rSt.GetIndex();
+ sal_uInt16 nEnd = pStt->nNode == pEnd->nNode
? pEnd->nContent.GetIndex()
: pNode->Len();
SwRegHistory history( pNode, *pNode, pHistory );
@@ -771,7 +771,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
&& pDoc->GetRedlineTbl().Count())))
{
// wurde Text-Inhalt eingefuegt? (RefMark/TOXMarks ohne Ende)
- BOOL bTxtIns = nInsCnt != rSt.GetIndex();
+ sal_Bool bTxtIns = nInsCnt != rSt.GetIndex();
// wurde Inhalt eingefuegt oder ueber die Selektion gesetzt?
SwPaM aPam( pStt->nNode, bTxtIns ? nInsCnt + 1 : nEnd,
pStt->nNode, nInsCnt );
@@ -795,7 +795,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
SwTableNode* pTblNd;
const SwFmtPageDesc* pDesc;
if( SFX_ITEM_SET == pOtherSet->GetItemState( RES_PAGEDESC,
- FALSE, (const SfxPoolItem**)&pDesc ))
+ sal_False, (const SfxPoolItem**)&pDesc ))
{
if( pNode )
{
@@ -844,7 +844,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
if( pNode && 0 == (nFlags & nsSetAttrMode::SETATTR_APICALL) &&
0 != (pTblNd = pNode->FindTableNode() ) &&
SFX_ITEM_SET == pOtherSet->GetItemState( RES_BREAK,
- FALSE, (const SfxPoolItem**)&pBreak ) )
+ sal_False, (const SfxPoolItem**)&pBreak ) )
{
SwTableNode* pCurTblNd = pTblNd;
while ( 0 != ( pCurTblNd = pCurTblNd->StartOfSectionNode()->FindTableNode() ) )
@@ -873,9 +873,9 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
{
// wenns eine PoolNumRule ist, diese ggfs. anlegen
const SwNumRuleItem* pRule;
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
if( SFX_ITEM_SET == pOtherSet->GetItemState( RES_PARATR_NUMRULE,
- FALSE, (const SfxPoolItem**)&pRule ) &&
+ sal_False, (const SfxPoolItem**)&pRule ) &&
!pDoc->FindNumRulePtr( pRule->GetValue() ) &&
USHRT_MAX != (nPoolId = SwStyleNameMapper::GetPoolIdFromUIName ( pRule->GetValue(),
nsSwGetPoolIdFromName::GET_POOLID_NUMRULE )) )
@@ -896,7 +896,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
{
SwTxtNode* pTxtNd = static_cast<SwTxtNode*>(pNode);
const SwIndex& rSt = pStt->nContent;
- USHORT nMkPos, nPtPos = rSt.GetIndex();
+ sal_uInt16 nMkPos, nPtPos = rSt.GetIndex();
const String& rStr = pTxtNd->GetTxt();
// JP 22.08.96: Sonderfall: steht der Crsr in einem URL-Attribut
@@ -916,7 +916,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/,
- TRUE );
+ sal_True );
if( aBndry.startPos < nPtPos && nPtPos < aBndry.endPos )
{
@@ -958,7 +958,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
SwPaM aPam( *pNode, nMkPos, *pNode, nPtPos );
if( pUndo )
- pUndo->SaveRedlineData( aPam, FALSE );
+ pUndo->SaveRedlineData( aPam, sal_False );
pDoc->AppendRedline( new SwRedline( nsRedlineType_t::REDLINE_FORMAT, aPam ), true);
}
}
@@ -975,12 +975,12 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
if( pDoc->IsRedlineOn() && pCharSet && pCharSet->Count() )
{
if( pUndo )
- pUndo->SaveRedlineData( rRg, FALSE );
+ pUndo->SaveRedlineData( rRg, sal_False );
pDoc->AppendRedline( new SwRedline( nsRedlineType_t::REDLINE_FORMAT, rRg ), true);
}
/* jetzt wenn Bereich */
- ULONG nNodes = 0;
+ sal_uLong nNodes = 0;
SwNodeIndex aSt( pDoc->GetNodes() );
SwNodeIndex aEnd( pDoc->GetNodes() );
@@ -988,7 +988,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
if( pNode )
{
- USHORT nLen = pNode->Len();
+ sal_uInt16 nLen = pNode->Len();
if( pStt->nNode != pEnd->nNode )
aCntEnd.Assign( pNode, nLen );
@@ -1035,7 +1035,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
pNode = pEnd->nNode.GetNode().GetCntntNode();
if(pNode)
{
- USHORT nLen = pNode->Len();
+ sal_uInt16 nLen = pNode->Len();
if( aCntEnd.GetIndex() != nLen )
{
// the SwRegHistory inserts the attribute into the TxtNode!
@@ -1075,9 +1075,9 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
pDoc->GetNodes().ForEach( aSt, aEnd, lcl_RstTxtAttr, &aPara );
}
- BOOL bCreateSwpHints = pCharSet && (
- SFX_ITEM_SET == pCharSet->GetItemState( RES_TXTATR_CHARFMT, FALSE ) ||
- SFX_ITEM_SET == pCharSet->GetItemState( RES_TXTATR_INETFMT, FALSE ) );
+ sal_Bool bCreateSwpHints = pCharSet && (
+ SFX_ITEM_SET == pCharSet->GetItemState( RES_TXTATR_CHARFMT, sal_False ) ||
+ SFX_ITEM_SET == pCharSet->GetItemState( RES_TXTATR_INETFMT, sal_False ) );
for(; aSt < aEnd; aSt++ )
{
@@ -1197,14 +1197,14 @@ void SwDoc::SetAttr( const SfxItemSet& rSet, SwFmt& rFmt )
}
// --> OD 2008-02-12 #newlistlevelattrs#
-void SwDoc::ResetAttrAtFormat( const USHORT nWhichId,
+void SwDoc::ResetAttrAtFormat( const sal_uInt16 nWhichId,
SwFmt& rChangedFormat )
{
SwUndo* pUndo = 0;
if ( DoesUndo() )
pUndo = new SwUndoFmtResetAttr( rChangedFormat, nWhichId );
- const BOOL bAttrReset = rChangedFormat.ResetFmtAttr( nWhichId );
+ const sal_Bool bAttrReset = rChangedFormat.ResetFmtAttr( nWhichId );
if ( bAttrReset )
{
@@ -1227,14 +1227,14 @@ int lcl_SetNewDefTabStops( SwTwips nOldWidth, SwTwips nNewWidth,
// auf dem gleichen TabStop (gepoolt!) vorgenommen
// wird. Als Modify wird ein FmtChg verschickt.
- USHORT nOldCnt = rChgTabStop.Count();
+ sal_uInt16 nOldCnt = rChgTabStop.Count();
if( !nOldCnt || nOldWidth == nNewWidth )
- return FALSE;
+ return sal_False;
// suche den Anfang der Defaults
SvxTabStop* pTabs = ((SvxTabStop*)rChgTabStop.GetStart())
+ (nOldCnt-1);
- USHORT n;
+ sal_uInt16 n;
for( n = nOldCnt; n ; --n, --pTabs )
if( SVX_TAB_ADJUST_DEFAULT != pTabs->GetAdjustment() )
@@ -1242,7 +1242,7 @@ int lcl_SetNewDefTabStops( SwTwips nOldWidth, SwTwips nNewWidth,
++n;
if( n < nOldCnt ) // die DefTabStops loeschen
rChgTabStop.Remove( n, nOldCnt - n );
- return TRUE;
+ return sal_True;
}
// Setze das Attribut als neues default Attribut in diesem Dokument.
@@ -1263,12 +1263,12 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
SwAttrSet aOld( GetAttrPool(), rSet.GetRanges() ),
aNew( GetAttrPool(), rSet.GetRanges() );
SfxItemIter aIter( rSet );
- USHORT nWhich;
+ sal_uInt16 nWhich;
const SfxPoolItem* pItem = aIter.GetCurItem();
SfxItemPool* pSdrPool = GetAttrPool().GetSecondaryPool();
- while( TRUE )
+ while( sal_True )
{
- BOOL bCheckSdrDflt = FALSE;
+ sal_Bool bCheckSdrDflt = sal_False;
nWhich = pItem->Which();
aOld.Put( GetAttrPool().GetDefaultItem( nWhich ) );
GetAttrPool().SetPoolDefaultItem( *pItem );
@@ -1306,7 +1306,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
// copy also the defaults
if( bCheckSdrDflt )
{
- USHORT nEdtWhich, nSlotId;
+ sal_uInt16 nEdtWhich, nSlotId;
if( 0 != (nSlotId = GetAttrPool().GetSlotId( nWhich ) ) &&
nSlotId != nWhich &&
0 != (nEdtWhich = pSdrPool->GetWhich( nSlotId )) &&
@@ -1334,7 +1334,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
const SfxPoolItem* pTmpItem;
if( ( SFX_ITEM_SET ==
- aNew.GetItemState( RES_PARATR_TABSTOP, FALSE, &pTmpItem ) ) &&
+ aNew.GetItemState( RES_PARATR_TABSTOP, sal_False, &pTmpItem ) ) &&
((SvxTabStopItem*)pTmpItem)->Count() )
{
// TabStop-Aenderungen behandeln wir erstmal anders:
@@ -1346,7 +1346,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
SwTwips nNewWidth = (*(SvxTabStopItem*)pTmpItem)[ 0 ].GetTabPos(),
nOldWidth = ((SvxTabStopItem&)aOld.Get(RES_PARATR_TABSTOP))[ 0 ].GetTabPos();
- int bChg = FALSE;
+ int bChg = sal_False;
sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_PARATR_TABSTOP );
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
if( 0 != (pTmpItem = GetAttrPool().GetItem2( RES_PARATR_TABSTOP, n ) ))
@@ -1380,7 +1380,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
}
// Erfrage das Default Attribut in diesem Dokument.
-const SfxPoolItem& SwDoc::GetDefault( USHORT nFmtHint ) const
+const SfxPoolItem& SwDoc::GetDefault( sal_uInt16 nFmtHint ) const
{
return GetAttrPool().GetDefaultItem( nFmtHint );
}
@@ -1388,7 +1388,7 @@ const SfxPoolItem& SwDoc::GetDefault( USHORT nFmtHint ) const
/*
* Loeschen der Formate
*/
-void SwDoc::DelCharFmt(USHORT nFmt, BOOL bBroadcast)
+void SwDoc::DelCharFmt(sal_uInt16 nFmt, sal_Bool bBroadcast)
{
SwCharFmt * pDel = (*pCharFmtTbl)[nFmt];
@@ -1409,15 +1409,15 @@ void SwDoc::DelCharFmt(USHORT nFmt, BOOL bBroadcast)
SetModified();
}
-void SwDoc::DelCharFmt( SwCharFmt *pFmt, BOOL bBroadcast )
+void SwDoc::DelCharFmt( SwCharFmt *pFmt, sal_Bool bBroadcast )
{
- USHORT nFmt = pCharFmtTbl->GetPos( pFmt );
+ sal_uInt16 nFmt = pCharFmtTbl->GetPos( pFmt );
ASSERT( USHRT_MAX != nFmt, "Fmt not found," );
DelCharFmt( nFmt, bBroadcast );
}
-void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, BOOL bBroadcast )
+void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, sal_Bool bBroadcast )
{
if( pFmt->ISA( SwTableBoxFmt ) || pFmt->ISA( SwTableLineFmt ))
{
@@ -1430,7 +1430,7 @@ void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, BOOL bBroadcast )
//Das Format muss in einem der beiden Arrays stehen, in welchem
//werden wir schon merken.
- USHORT nPos;
+ sal_uInt16 nPos;
if ( USHRT_MAX != ( nPos = pFrmFmtTbl->GetPos( pFmt )) )
{
if (bBroadcast)
@@ -1459,7 +1459,7 @@ void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, BOOL bBroadcast )
void SwDoc::DelTblFrmFmt( SwTableFmt *pFmt )
{
- USHORT nPos = pTblFrmFmtTbl->GetPos( pFmt );
+ sal_uInt16 nPos = pTblFrmFmtTbl->GetPos( pFmt );
ASSERT( USHRT_MAX != nPos, "Fmt not found," );
pTblFrmFmtTbl->DeleteAndDestroy( nPos );
}
@@ -1486,13 +1486,13 @@ SwDrawFrmFmt *SwDoc::MakeDrawFrmFmt( const String &rFmtName,
}
-USHORT SwDoc::GetTblFrmFmtCount(BOOL bUsed) const
+sal_uInt16 SwDoc::GetTblFrmFmtCount(sal_Bool bUsed) const
{
- USHORT nCount = pTblFrmFmtTbl->Count();
+ sal_uInt16 nCount = pTblFrmFmtTbl->Count();
if(bUsed)
{
SwAutoFmtGetDocNode aGetHt( &aNodes );
- for ( USHORT i = nCount; i; )
+ for ( sal_uInt16 i = nCount; i; )
{
if((*pTblFrmFmtTbl)[--i]->GetInfo( aGetHt ))
@@ -1504,14 +1504,14 @@ USHORT SwDoc::GetTblFrmFmtCount(BOOL bUsed) const
}
-SwFrmFmt& SwDoc::GetTblFrmFmt(USHORT nFmt, BOOL bUsed ) const
+SwFrmFmt& SwDoc::GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed ) const
{
- USHORT nRemoved = 0;
+ sal_uInt16 nRemoved = 0;
if(bUsed)
{
SwAutoFmtGetDocNode aGetHt( &aNodes );
- for ( USHORT i = 0; i <= nFmt; i++ )
+ for ( sal_uInt16 i = 0; i <= nFmt; i++ )
{
while ( (*pTblFrmFmtTbl)[ i + nRemoved]->GetInfo( aGetHt ))
{
@@ -1534,7 +1534,7 @@ SwTableFmt* SwDoc::MakeTblFrmFmt( const String &rFmtName,
SwFrmFmt *SwDoc::MakeFrmFmt(const String &rFmtName,
SwFrmFmt *pDerivedFrom,
- BOOL bBroadcast, BOOL bAuto)
+ sal_Bool bBroadcast, sal_Bool bAuto)
{
SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), rFmtName, pDerivedFrom );
@@ -1561,7 +1561,7 @@ SwFrmFmt *SwDoc::MakeFrmFmt(const String &rFmtName,
SwFmt *SwDoc::_MakeFrmFmt(const String &rFmtName,
SwFmt *pDerivedFrom,
- BOOL bBroadcast, BOOL bAuto)
+ sal_Bool bBroadcast, sal_Bool bAuto)
{
SwFrmFmt *pFrmFmt = dynamic_cast<SwFrmFmt*>(pDerivedFrom);
pFrmFmt = MakeFrmFmt( rFmtName, pFrmFmt, bBroadcast, bAuto );
@@ -1572,13 +1572,13 @@ SwFmt *SwDoc::_MakeFrmFmt(const String &rFmtName,
// --> OD 2005-01-13 #i40550# - add parameter <bAuto> - not relevant
SwCharFmt *SwDoc::MakeCharFmt( const String &rFmtName,
SwCharFmt *pDerivedFrom,
- BOOL bBroadcast,
- BOOL )
+ sal_Bool bBroadcast,
+ sal_Bool )
// <--
{
SwCharFmt *pFmt = new SwCharFmt( GetAttrPool(), rFmtName, pDerivedFrom );
pCharFmtTbl->Insert( pFmt, pCharFmtTbl->Count() );
- pFmt->SetAuto( FALSE );
+ pFmt->SetAuto( sal_False );
SetModified();
if (DoesUndo())
@@ -1599,7 +1599,7 @@ SwCharFmt *SwDoc::MakeCharFmt( const String &rFmtName,
SwFmt *SwDoc::_MakeCharFmt(const String &rFmtName,
SwFmt *pDerivedFrom,
- BOOL bBroadcast, BOOL bAuto)
+ sal_Bool bBroadcast, sal_Bool bAuto)
{
SwCharFmt *pCharFmt = dynamic_cast<SwCharFmt*>(pDerivedFrom);
pCharFmt = MakeCharFmt( rFmtName, pCharFmt, bBroadcast, bAuto );
@@ -1614,14 +1614,14 @@ SwFmt *SwDoc::_MakeCharFmt(const String &rFmtName,
// --> OD 2005-01-13 #i40550# - add parameter <bAuto> - not relevant
SwTxtFmtColl* SwDoc::MakeTxtFmtColl( const String &rFmtName,
SwTxtFmtColl *pDerivedFrom,
- BOOL bBroadcast,
- BOOL )
+ sal_Bool bBroadcast,
+ sal_Bool )
// <--
{
SwTxtFmtColl *pFmtColl = new SwTxtFmtColl( GetAttrPool(), rFmtName,
pDerivedFrom );
pTxtFmtCollTbl->Insert(pFmtColl, pTxtFmtCollTbl->Count());
- pFmtColl->SetAuto( FALSE );
+ pFmtColl->SetAuto( sal_False );
SetModified();
if (DoesUndo())
@@ -1640,7 +1640,7 @@ SwTxtFmtColl* SwDoc::MakeTxtFmtColl( const String &rFmtName,
SwFmt *SwDoc::_MakeTxtFmtColl(const String &rFmtName,
SwFmt *pDerivedFrom,
- BOOL bBroadcast, BOOL bAuto)
+ sal_Bool bBroadcast, sal_Bool bAuto)
{
SwTxtFmtColl *pTxtFmtColl = dynamic_cast<SwTxtFmtColl*>(pDerivedFrom);
pTxtFmtColl = MakeTxtFmtColl( rFmtName, pTxtFmtColl, bBroadcast, bAuto );
@@ -1651,12 +1651,12 @@ SwFmt *SwDoc::_MakeTxtFmtColl(const String &rFmtName,
//FEATURE::CONDCOLL
SwConditionTxtFmtColl* SwDoc::MakeCondTxtFmtColl( const String &rFmtName,
SwTxtFmtColl *pDerivedFrom,
- BOOL bBroadcast)
+ sal_Bool bBroadcast)
{
SwConditionTxtFmtColl*pFmtColl = new SwConditionTxtFmtColl( GetAttrPool(),
rFmtName, pDerivedFrom );
pTxtFmtCollTbl->Insert(pFmtColl, pTxtFmtCollTbl->Count());
- pFmtColl->SetAuto( FALSE );
+ pFmtColl->SetAuto( sal_False );
SetModified();
if (bBroadcast)
@@ -1675,12 +1675,12 @@ SwGrfFmtColl* SwDoc::MakeGrfFmtColl( const String &rFmtName,
SwGrfFmtColl *pFmtColl = new SwGrfFmtColl( GetAttrPool(), rFmtName,
pDerivedFrom );
pGrfFmtCollTbl->Insert( pFmtColl, pGrfFmtCollTbl->Count() );
- pFmtColl->SetAuto( FALSE );
+ pFmtColl->SetAuto( sal_False );
SetModified();
return pFmtColl;
}
-void SwDoc::DelTxtFmtColl(USHORT nFmtColl, BOOL bBroadcast)
+void SwDoc::DelTxtFmtColl(sal_uInt16 nFmtColl, sal_Bool bBroadcast)
{
ASSERT( nFmtColl, "Remove fuer Coll 0." );
@@ -1710,14 +1710,14 @@ void SwDoc::DelTxtFmtColl(USHORT nFmtColl, BOOL bBroadcast)
SetModified();
}
-void SwDoc::DelTxtFmtColl( SwTxtFmtColl *pColl, BOOL bBroadcast )
+void SwDoc::DelTxtFmtColl( SwTxtFmtColl *pColl, sal_Bool bBroadcast )
{
- USHORT nFmt = pTxtFmtCollTbl->GetPos( pColl );
+ sal_uInt16 nFmt = pTxtFmtCollTbl->GetPos( pColl );
ASSERT( USHRT_MAX != nFmt, "Collection not found," );
DelTxtFmtColl( nFmt, bBroadcast );
}
-BOOL lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs )
+sal_Bool lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs )
{
// ParaSetFmtColl * pPara = (ParaSetFmtColl*)pArgs;
SwCntntNode* pCNd = (SwCntntNode*)rpNode->GetTxtNode();
@@ -1794,10 +1794,10 @@ BOOL lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs )
pPara->nWhich++;
}
- return TRUE;
+ return sal_True;
}
-BOOL SwDoc::SetTxtFmtColl( const SwPaM &rRg,
+sal_Bool SwDoc::SetTxtFmtColl( const SwPaM &rRg,
SwTxtFmtColl *pFmt,
bool bReset,
bool bResetListAttrs )
@@ -1805,7 +1805,7 @@ BOOL SwDoc::SetTxtFmtColl( const SwPaM &rRg,
SwDataChanged aTmp( rRg, 0 );
const SwPosition *pStt = rRg.Start(), *pEnd = rRg.End();
SwHistory* pHst = 0;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( DoesUndo() )
{
@@ -1829,7 +1829,7 @@ BOOL SwDoc::SetTxtFmtColl( const SwPaM &rRg,
GetNodes().ForEach( pStt->nNode.GetIndex(), pEnd->nNode.GetIndex()+1,
lcl_SetTxtFmtColl, &aPara );
if( !aPara.nWhich )
- bRet = FALSE; // keinen gueltigen Node gefunden
+ bRet = sal_False; // keinen gueltigen Node gefunden
if( bRet )
SetModified();
@@ -1846,7 +1846,7 @@ SwFmt* SwDoc::CopyFmt( const SwFmt& rFmt,
// kein-Autoformat || default Format || Collection-Format
// dann suche danach.
if( !rFmt.IsAuto() || !rFmt.GetRegisteredIn() )
- for( USHORT n = 0; n < rFmtArr.Count(); n++ )
+ for( sal_uInt16 n = 0; n < rFmtArr.Count(); n++ )
{
// ist die Vorlage schon im Doc vorhanden ??
if( ((SwFmt*)rFmtArr[n])->GetName().Equals( rFmt.GetName() ))
@@ -1861,10 +1861,10 @@ SwFmt* SwDoc::CopyFmt( const SwFmt& rFmt,
// erzeuge das Format und kopiere die Attribute
// --> OD 2005-01-13 #i40550#
- SwFmt* pNewFmt = (this->*fnCopyFmt)( rFmt.GetName(), pParent, FALSE, TRUE );
+ SwFmt* pNewFmt = (this->*fnCopyFmt)( rFmt.GetName(), pParent, sal_False, sal_True );
// <--
pNewFmt->SetAuto( rFmt.IsAuto() );
- pNewFmt->CopyAttrs( rFmt, TRUE ); // kopiere Attribute
+ pNewFmt->CopyAttrs( rFmt, sal_True ); // kopiere Attribute
pNewFmt->SetPoolFmtId( rFmt.GetPoolFmtId() );
pNewFmt->SetPoolHelpId( rFmt.GetPoolHelpId() );
@@ -1913,7 +1913,7 @@ SwTxtFmtColl* SwDoc::CopyTxtColl( const SwTxtFmtColl& rColl )
pNewColl = new SwConditionTxtFmtColl( GetAttrPool(), rColl.GetName(),
pParent);
pTxtFmtCollTbl->Insert( pNewColl, pTxtFmtCollTbl->Count() );
- pNewColl->SetAuto( FALSE );
+ pNewColl->SetAuto( sal_False );
SetModified();
// Kopiere noch die Bedingungen
@@ -1925,7 +1925,7 @@ SwTxtFmtColl* SwDoc::CopyTxtColl( const SwTxtFmtColl& rColl )
pNewColl = MakeTxtFmtColl( rColl.GetName(), pParent );
// kopiere jetzt noch die Auto-Formate oder kopiere die Attribute
- pNewColl->CopyAttrs( rColl, TRUE );
+ pNewColl->CopyAttrs( rColl, sal_True );
// setze noch den Outline-Level
//if( NO_NUMBERING != rColl.GetOutlineLevel() ) //#outline level,zhaojianwei
@@ -1947,7 +1947,7 @@ SwTxtFmtColl* SwDoc::CopyTxtColl( const SwTxtFmtColl& rColl )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pNewColl->GetItemState( RES_PARATR_NUMRULE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
const SwNumRule* pRule;
const String& rName = ((SwNumRuleItem*)pItem)->GetValue();
@@ -1957,7 +1957,7 @@ SwTxtFmtColl* SwDoc::CopyTxtColl( const SwTxtFmtColl& rColl )
{
SwNumRule* pDestRule = FindNumRulePtr( rName );
if( pDestRule )
- pDestRule->SetInvalidRule( TRUE );
+ pDestRule->SetInvalidRule( sal_True );
else
MakeNumRule( rName, pRule );
}
@@ -1996,7 +1996,7 @@ SwGrfFmtColl* SwDoc::CopyGrfColl( const SwGrfFmtColl& rColl )
SwPageDesc* lcl_FindPageDesc( const SwPageDescs& rArr, const String& rName )
{
- for( USHORT n = rArr.Count(); n; )
+ for( sal_uInt16 n = rArr.Count(); n; )
{
SwPageDesc* pDesc = rArr[ --n ];
if( pDesc->GetName() == rName )
@@ -2010,7 +2010,7 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
FNCopyFmt fnCopyFmt,
SwFmt& rDfltFmt )
{
- USHORT nSrc;
+ sal_uInt16 nSrc;
SwFmt* pSrc, *pDest;
// 1. Schritt alle Formate anlegen (das 0. ueberspringen - Default!)
@@ -2026,7 +2026,7 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
MakeCondTxtFmtColl( pSrc->GetName(), (SwTxtFmtColl*)&rDfltFmt );
else
// --> OD 2005-01-13 #i40550#
- (this->*fnCopyFmt)( pSrc->GetName(), &rDfltFmt, FALSE, TRUE );
+ (this->*fnCopyFmt)( pSrc->GetName(), &rDfltFmt, sal_False, sal_True );
// <--
}
}
@@ -2039,9 +2039,9 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
continue;
pDest = FindFmtByName( rDestArr, pSrc->GetName() );
- pDest->SetAuto( FALSE );
+ pDest->SetAuto( sal_False );
// pDest->ResetAllAttr();
-// pDest->CopyAttrs( *pSrc, TRUE ); // kopiere Attribute
+// pDest->CopyAttrs( *pSrc, sal_True ); // kopiere Attribute
//JP 19.02.96: ist so wohl optimaler - loest ggfs. kein Modify aus!
pDest->DelDiffs( *pSrc );
// --> OD 2009-03-23 #i94285#
@@ -2051,7 +2051,7 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
const SfxPoolItem* pItem;
if( &GetAttrPool() != pSrc->GetAttrSet().GetPool() &&
SFX_ITEM_SET == pSrc->GetAttrSet().GetItemState(
- RES_PAGEDESC, FALSE, &pItem ) &&
+ RES_PAGEDESC, sal_False, &pItem ) &&
((SwFmtPageDesc*)pItem)->GetPageDesc() )
{
SwFmtPageDesc aPageDesc( *(SwFmtPageDesc*)pItem );
@@ -2114,9 +2114,9 @@ void SwDoc::CopyPageDescHeaderFooterImpl( bool bCpyHeader,
{
// jetzt noch Header-/Footer-Attribute richtig behandeln
// Contenten Nodes Dokumentuebergreifend kopieren!
- USHORT nAttr = static_cast<USHORT>( bCpyHeader ? RES_HEADER : RES_FOOTER );
+ sal_uInt16 nAttr = static_cast<sal_uInt16>( bCpyHeader ? RES_HEADER : RES_FOOTER );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET != rSrcFmt.GetAttrSet().GetItemState( nAttr, FALSE, &pItem ))
+ if( SFX_ITEM_SET != rSrcFmt.GetAttrSet().GetItemState( nAttr, sal_False, &pItem ))
return ;
// Im Header steht noch der Verweis auf das Format aus dem
@@ -2133,10 +2133,10 @@ void SwDoc::CopyPageDescHeaderFooterImpl( bool bCpyHeader,
{
SwFrmFmt* pNewFmt = new SwFrmFmt( GetAttrPool(), "CpyDesc",
GetDfltFrmFmt() );
- pNewFmt->CopyAttrs( *pOldFmt, TRUE );
+ pNewFmt->CopyAttrs( *pOldFmt, sal_True );
if( SFX_ITEM_SET == pNewFmt->GetAttrSet().GetItemState(
- RES_CNTNT, FALSE, &pItem ))
+ RES_CNTNT, sal_False, &pItem ))
{
SwFmtCntnt* pCntnt = (SwFmtCntnt*)pItem;
if( pCntnt->GetCntntIdx() )
@@ -2168,16 +2168,16 @@ void SwDoc::CopyPageDescHeaderFooterImpl( bool bCpyHeader,
}
void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
- BOOL bCopyPoolIds )
+ sal_Bool bCopyPoolIds )
{
- BOOL bNotifyLayout = FALSE;
+ sal_Bool bNotifyLayout = sal_False;
rDstDesc.SetLandscape( rSrcDesc.GetLandscape() );
rDstDesc.SetNumType( rSrcDesc.GetNumType() );
if( rDstDesc.ReadUseOn() != rSrcDesc.ReadUseOn() )
{
rDstDesc.WriteUseOn( rSrcDesc.ReadUseOn() );
- bNotifyLayout = TRUE;
+ bNotifyLayout = sal_True;
}
if( bCopyPoolIds )
@@ -2195,12 +2195,12 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
if( !pFollow )
{
// dann mal kopieren
- USHORT nPos = MakePageDesc( rSrcDesc.GetFollow()->GetName() );
+ sal_uInt16 nPos = MakePageDesc( rSrcDesc.GetFollow()->GetName() );
pFollow = aPageDescs[ nPos ];
CopyPageDesc( *rSrcDesc.GetFollow(), *pFollow );
}
rDstDesc.SetFollow( pFollow );
- bNotifyLayout = TRUE;
+ bNotifyLayout = sal_True;
}
// die Header/Footer-Attribute werden gesondert kopiert, die Content-
@@ -2261,8 +2261,8 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
void SwDoc::ReplaceStyles( SwDoc& rSource )
{
- BOOL bIsUndo = DoesUndo();
- DoUndo( FALSE );
+ sal_Bool bIsUndo = DoesUndo();
+ DoUndo( sal_False );
CopyFmtArr( *rSource.pCharFmtTbl, *pCharFmtTbl,
&SwDoc::_MakeCharFmt, *pDfltCharFmt );
@@ -2272,7 +2272,7 @@ void SwDoc::ReplaceStyles( SwDoc& rSource )
&SwDoc::_MakeTxtFmtColl, *pDfltTxtFmtColl );
// und jetzt noch die Seiten-Vorlagen
- USHORT nCnt = rSource.aPageDescs.Count();
+ sal_uInt16 nCnt = rSource.aPageDescs.Count();
if( nCnt )
{
// ein anderes Doc -> Numberformatter muessen gemergt werden
@@ -2299,7 +2299,7 @@ void SwDoc::ReplaceStyles( SwDoc& rSource )
if( nCnt )
{
const SwNumRuleTbl& rArr = rSource.GetNumRuleTbl();
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
const SwNumRule& rR = *rArr[ n ];
if( !rR.IsAutoRule() )
@@ -2328,7 +2328,7 @@ SwFmt* SwDoc::FindFmtByName( const SvPtrarr& rFmtArr,
const String& rName ) const
{
SwFmt* pFnd = 0;
- for( USHORT n = 0; n < rFmtArr.Count(); n++ )
+ for( sal_uInt16 n = 0; n < rFmtArr.Count(); n++ )
{
// ist die Vorlage schon im Doc vorhanden ??
if( ((SwFmt*)rFmtArr[n])->GetName() == rName )
@@ -2340,7 +2340,7 @@ SwFmt* SwDoc::FindFmtByName( const SvPtrarr& rFmtArr,
return pFnd;
}
-void SwDoc::MoveLeftMargin( const SwPaM& rPam, BOOL bRight, BOOL bModulus )
+void SwDoc::MoveLeftMargin( const SwPaM& rPam, sal_Bool bRight, sal_Bool bModulus )
{
SwHistory* pHistory = 0;
if( DoesUndo() )
@@ -2353,8 +2353,8 @@ void SwDoc::MoveLeftMargin( const SwPaM& rPam, BOOL bRight, BOOL bModulus )
}
const SvxTabStopItem& rTabItem = (SvxTabStopItem&)GetDefault( RES_PARATR_TABSTOP );
- USHORT nDefDist = rTabItem.Count() ?
- static_cast<USHORT>(rTabItem[0].GetTabPos()) : 1134;
+ sal_uInt16 nDefDist = rTabItem.Count() ?
+ static_cast<sal_uInt16>(rTabItem[0].GetTabPos()) : 1134;
const SwPosition &rStt = *rPam.Start(), &rEnd = *rPam.End();
SwNodeIndex aIdx( rStt.nNode );
while( aIdx <= rEnd.nNode )
@@ -2373,7 +2373,7 @@ void SwDoc::MoveLeftMargin( const SwPaM& rPam, BOOL bRight, BOOL bModulus )
const int nListLevel = pTNd->GetActualListLevel();
if ( nListLevel >= 0 )
{
- const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(nListLevel));
+ const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(nListLevel));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
aLS.SetTxtLeft( rFmt.GetIndentAt() );
@@ -2402,9 +2402,9 @@ void SwDoc::MoveLeftMargin( const SwPaM& rPam, BOOL bRight, BOOL bModulus )
SetModified();
}
-BOOL SwDoc::DontExpandFmt( const SwPosition& rPos, BOOL bFlag )
+sal_Bool SwDoc::DontExpandFmt( const SwPosition& rPos, sal_Bool bFlag )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
if( pTxtNd )
{
@@ -2448,7 +2448,7 @@ void SwDoc::_CreateNumberFormatter()
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
pNumberFormatter = new SvNumberFormatter( xMSF, eLang );
pNumberFormatter->SetEvalDateFormat( NF_EVALDATEFORMAT_FORMAT_INTL );
- pNumberFormatter->SetYear2000(static_cast<USHORT>(::utl::MiscCfg().GetYear2000()));
+ pNumberFormatter->SetYear2000(static_cast<sal_uInt16>(::utl::MiscCfg().GetYear2000()));
}
@@ -2457,8 +2457,8 @@ SwTblNumFmtMerge::SwTblNumFmtMerge( const SwDoc& rSrc, SwDoc& rDest )
{
// ein anderes Doc -> Numberformatter muessen gemergt werden
SvNumberFormatter* pN;
- if( &rSrc != &rDest && 0 != ( pN = ((SwDoc&)rSrc).GetNumberFormatter( FALSE ) ))
- ( pNFmt = rDest.GetNumberFormatter( TRUE ))->MergeFormatter( *pN );
+ if( &rSrc != &rDest && 0 != ( pN = ((SwDoc&)rSrc).GetNumberFormatter( sal_False ) ))
+ ( pNFmt = rDest.GetNumberFormatter( sal_True ))->MergeFormatter( *pN );
if( &rSrc != &rDest )
((SwGetRefFieldType*)rSrc.GetSysFldType( RES_GETREFFLD ))->
@@ -2472,7 +2472,7 @@ SwTblNumFmtMerge::~SwTblNumFmtMerge()
}
-void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& rPos, USHORT nPoolId,
+void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId,
const SfxItemSet* pSet )
{
SwPaM aPam( rPos );
@@ -2496,7 +2496,7 @@ void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& rPos, USHORT nPoolId,
// das Adjust Item behalten wir extra
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pTNd->GetpSwAttrSet()->GetItemState(
- RES_PARATR_ADJUST, FALSE, &pItem ))
+ RES_PARATR_ADJUST, sal_False, &pItem ))
aTmp.Put( *pItem );
aExtraData.SetItemSet( aTmp );
}
@@ -2541,7 +2541,7 @@ void SwDoc::SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxItemSet& rSet )
// das Adjust Item behalten wir extra
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pTNd->GetpSwAttrSet()->GetItemState(
- RES_PARATR_ADJUST, FALSE, &pItem ))
+ RES_PARATR_ADJUST, sal_False, &pItem ))
aTmp.Put( *pItem );
aExtraData.SetItemSet( aTmp );
}
@@ -2595,7 +2595,7 @@ void SwDoc::ChgFmt(SwFmt & rFmt, const SfxItemSet & rSet)
}
void SwDoc::RenameFmt(SwFmt & rFmt, const String & sNewName,
- BOOL bBroadcast)
+ sal_Bool bBroadcast)
{
SfxStyleFamily eFamily = SFX_STYLE_FAMILY_ALL;
@@ -2647,8 +2647,8 @@ namespace docfunc
const SwTxtFmtColls* pTxtFmtColls( rDoc.GetTxtFmtColls() );
if ( pTxtFmtColls )
{
- const USHORT nCount = pTxtFmtColls->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ const sal_uInt16 nCount = pTxtFmtColls->Count();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
SwTxtFmtColl* pTxtFmtColl = (*pTxtFmtColls)[i];
diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index 306f7b3dfcc8..4ee3811ec4a2 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -78,7 +78,7 @@ SwEndNoteInfo& SwEndNoteInfo::operator=(const SwEndNoteInfo& rInfo)
}
-BOOL SwEndNoteInfo::operator==( const SwEndNoteInfo& rInfo ) const
+sal_Bool SwEndNoteInfo::operator==( const SwEndNoteInfo& rInfo ) const
{
return aPageDescDep.GetRegisteredIn() ==
rInfo.aPageDescDep.GetRegisteredIn() &&
@@ -185,7 +185,7 @@ void SwEndNoteInfo::SetAnchorCharFmt( SwCharFmt* pChFmt )
void SwEndNoteInfo::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
if( RES_ATTRSET_CHG == nWhich ||
RES_FMT_CHG == nWhich )
@@ -196,7 +196,7 @@ void SwEndNoteInfo::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
else
pDoc = ((SwCharFmt*)aAnchorCharFmtDep.GetRegisteredIn())->GetDoc();
SwFtnIdxs& rFtnIdxs = pDoc->GetFtnIdxs();
- for( USHORT nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
+ for( sal_uInt16 nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
{
SwTxtFtn *pTxtFtn = rFtnIdxs[ nPos ];
const SwFmtFtn &rFtn = pTxtFtn->GetFtn();
@@ -221,7 +221,7 @@ SwFtnInfo& SwFtnInfo::operator=(const SwFtnInfo& rInfo)
}
-BOOL SwFtnInfo::operator==( const SwFtnInfo& rInfo ) const
+sal_Bool SwFtnInfo::operator==( const SwFtnInfo& rInfo ) const
{
return ePos == rInfo.ePos &&
eNum == rInfo.eNum &&
@@ -265,17 +265,17 @@ void SwDoc::SetFtnInfo(const SwFtnInfo& rInfo)
AppendUndo( new SwUndoFootNoteInfo( rOld ) );
}
- BOOL bFtnPos = rInfo.ePos != rOld.ePos;
- BOOL bFtnDesc = rOld.ePos == FTNPOS_CHAPTER &&
+ sal_Bool bFtnPos = rInfo.ePos != rOld.ePos;
+ sal_Bool bFtnDesc = rOld.ePos == FTNPOS_CHAPTER &&
rInfo.GetPageDesc( *this ) != rOld.GetPageDesc( *this );
- BOOL bExtra = rInfo.aQuoVadis != rOld.aQuoVadis ||
+ sal_Bool bExtra = rInfo.aQuoVadis != rOld.aQuoVadis ||
rInfo.aErgoSum != rOld.aErgoSum ||
rInfo.aFmt.GetNumberingType() != rOld.aFmt.GetNumberingType() ||
rInfo.GetPrefix() != rOld.GetPrefix() ||
rInfo.GetSuffix() != rOld.GetSuffix();
SwCharFmt *pOldChrFmt = rOld.GetCharFmt( *this ),
*pNewChrFmt = rInfo.GetCharFmt( *this );
- BOOL bFtnChrFmts = pOldChrFmt != pNewChrFmt;
+ sal_Bool bFtnChrFmts = pOldChrFmt != pNewChrFmt;
*pFtnInfo = rInfo;
@@ -287,13 +287,13 @@ void SwDoc::SetFtnInfo(const SwFtnInfo& rInfo)
{
GetRootFrm()->UpdateFtnNums();
if ( bFtnDesc )
- GetRootFrm()->CheckFtnPageDescs( FALSE );
+ GetRootFrm()->CheckFtnPageDescs( sal_False );
if ( bExtra )
{
//Fuer die Benachrichtung bezueglich ErgoSum usw. sparen wir uns
//extra-Code und nutzen die vorhandenen Wege.
SwFtnIdxs& rFtnIdxs = GetFtnIdxs();
- for( USHORT nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
+ for( sal_uInt16 nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
{
SwTxtFtn *pTxtFtn = rFtnIdxs[ nPos ];
const SwFmtFtn &rFtn = pTxtFtn->GetFtn();
@@ -332,7 +332,7 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo)
AppendUndo( new SwUndoEndNoteInfo( GetEndNoteInfo() ) );
}
- BOOL bNumChg = rInfo.nFtnOffset != GetEndNoteInfo().nFtnOffset;
+ sal_Bool bNumChg = rInfo.nFtnOffset != GetEndNoteInfo().nFtnOffset;
// this seems to be an optimization: UpdateAllFtn() is only called
// if the offset changes; if the offset is the same,
// but type/prefix/suffix changes, just set new numbers.
@@ -342,24 +342,24 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo)
|| (rInfo.GetPrefix() != GetEndNoteInfo().GetPrefix())
|| (rInfo.GetSuffix() != GetEndNoteInfo().GetSuffix())
);
- BOOL bFtnDesc = rInfo.GetPageDesc( *this ) !=
+ sal_Bool bFtnDesc = rInfo.GetPageDesc( *this ) !=
GetEndNoteInfo().GetPageDesc( *this );
SwCharFmt *pOldChrFmt = GetEndNoteInfo().GetCharFmt( *this ),
*pNewChrFmt = rInfo.GetCharFmt( *this );
- BOOL bFtnChrFmts = pOldChrFmt != pNewChrFmt;
+ sal_Bool bFtnChrFmts = pOldChrFmt != pNewChrFmt;
*pEndNoteInfo = rInfo;
if ( GetRootFrm() )
{
if ( bFtnDesc )
- GetRootFrm()->CheckFtnPageDescs( TRUE );
+ GetRootFrm()->CheckFtnPageDescs( sal_True );
if ( bExtra )
{
//Fuer die Benachrichtung bezueglich ErgoSum usw. sparen wir uns
//extra-Code und nutzen die vorhandenen Wege.
SwFtnIdxs& rFtnIdxs = GetFtnIdxs();
- for( USHORT nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
+ for( sal_uInt16 nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
{
SwTxtFtn *pTxtFtn = rFtnIdxs[ nPos ];
const SwFmtFtn &rFtn = pTxtFtn->GetFtn();
@@ -394,12 +394,12 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
SwFtnIdxs& rFtnArr = GetFtnIdxs();
const SwPosition* pStt = rPam.Start(), *pEnd = rPam.End();
- const ULONG nSttNd = pStt->nNode.GetIndex();
+ const sal_uLong nSttNd = pStt->nNode.GetIndex();
const xub_StrLen nSttCnt = pStt->nContent.GetIndex();
- const ULONG nEndNd = pEnd->nNode.GetIndex();
+ const sal_uLong nEndNd = pEnd->nNode.GetIndex();
const xub_StrLen nEndCnt = pEnd->nContent.GetIndex();
- USHORT nPos;
+ sal_uInt16 nPos;
rFtnArr.SeekEntry( pStt->nNode, &nPos );
SwUndoChangeFootNote* pUndo = 0;
@@ -410,10 +410,10 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
}
SwTxtFtn* pTxtFtn;
- ULONG nIdx;
- BOOL bChg = FALSE;
- BOOL bTypeChgd = FALSE;
- USHORT n = nPos; // sichern
+ sal_uLong nIdx;
+ sal_Bool bChg = sal_False;
+ sal_Bool bTypeChgd = sal_False;
+ sal_uInt16 n = nPos; // sichern
while( nPos < rFtnArr.Count() &&
(( nIdx = _SwTxtFtn_GetIndex((pTxtFtn = rFtnArr[ nPos++ ] )))
< nEndNd || ( nIdx == nEndNd &&
@@ -426,7 +426,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
rFtn.GetNumStr() != rNumStr ||
rFtn.IsEndNote() != bIsEndNote )
{
- bChg = TRUE;
+ bChg = sal_True;
if ( pUndo )
{
pUndo->GetHistory().Add( *pTxtFtn );
@@ -436,7 +436,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
if( rFtn.IsEndNote() != bIsEndNote )
{
((SwFmtFtn&)rFtn).SetEndNote( bIsEndNote );
- bTypeChgd = TRUE;
+ bTypeChgd = sal_True;
pTxtFtn->CheckCondColl();
//#i11339# dispose UNO wrapper when a footnote is changed to an endnote or vice versa
SwPtrMsgPoolItem aMsgHint( RES_FOOTNOTE_DELETED, (void*)&pTxtFtn->GetAttr() );
@@ -458,7 +458,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
rFtn.GetNumStr() != rNumStr ||
rFtn.IsEndNote() != bIsEndNote )
{
- bChg = TRUE;
+ bChg = sal_True;
if ( pUndo )
{
pUndo->GetHistory().Add( *pTxtFtn );
@@ -468,7 +468,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
if( rFtn.IsEndNote() != bIsEndNote )
{
((SwFmtFtn&)rFtn).SetEndNote( bIsEndNote );
- bTypeChgd = TRUE;
+ bTypeChgd = sal_True;
pTxtFtn->CheckCondColl();
}
}
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 30a385442fc0..27e506995864 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -66,32 +66,32 @@ enum SwSplitDocType
SPLITDOC_TO_HTML
};
-BOOL SwDoc::GenerateGlobalDoc( const String& rPath,
+sal_Bool SwDoc::GenerateGlobalDoc( const String& rPath,
const SwTxtFmtColl* pSplitColl )
{
return SplitDoc( SPLITDOC_TO_GLOBALDOC, rPath, pSplitColl );
}
//#outline level,add by zhaojianwei
-BOOL SwDoc::GenerateGlobalDoc( const String& rPath, int nOutlineLevel )
+sal_Bool SwDoc::GenerateGlobalDoc( const String& rPath, int nOutlineLevel )
{
return SplitDoc( SPLITDOC_TO_GLOBALDOC, rPath, nOutlineLevel );
}
-BOOL SwDoc::GenerateHTMLDoc( const String& rPath, int nOutlineLevel )
+sal_Bool SwDoc::GenerateHTMLDoc( const String& rPath, int nOutlineLevel )
{
return SplitDoc( SPLITDOC_TO_HTML, rPath, nOutlineLevel );
}
//<-end,zhaojianwei
-BOOL SwDoc::GenerateHTMLDoc( const String& rPath,
+sal_Bool SwDoc::GenerateHTMLDoc( const String& rPath,
const SwTxtFmtColl* pSplitColl )
{
#ifdef JP_TEST
if( !pSplitColl )
{
- BYTE nLvl = 1;
+ sal_uInt8 nLvl = 1;
const SwTxtFmtColls& rFmtColls =*GetTxtFmtColls();
- for( USHORT n = rFmtColls.Count(); n; )
+ for( sal_uInt16 n = rFmtColls.Count(); n; )
//if( nLvl == rFmtColls[ --n ]->GetOutlineLevel() )//#outline level,zhaojianwei
if( nLvl == rFmtColls[ --n ]->GetAttrOutlineLevel() -1 )//<-end,zhaojianwei 0814
{
@@ -107,7 +107,7 @@ BOOL SwDoc::GenerateHTMLDoc( const String& rPath,
return SplitDoc( SPLITDOC_TO_HTML, rPath, pSplitColl );
}
-BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
+sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath,
const SwTxtFmtColl* pSplitColl )
{
// ueber alle Node der Vorlage Iterieren und dafuer einzelne
@@ -118,9 +118,9 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
// Am Ende wird dieses Doc als GlobalDoc/HTML-Doc gespreichert.
if( !pDocShell || !pDocShell->GetMedium() ||
( SPLITDOC_TO_GLOBALDOC == eDocType && get(IDocumentSettingAccess::GLOBAL_DOCUMENT) ) )
- return FALSE;
+ return sal_False;
- USHORT nOutl = 0;
+ sal_uInt16 nOutl = 0;
SwOutlineNodes* pOutlNds = (SwOutlineNodes*)&GetNodes().GetOutLineNds();
SwNodePtr pSttNd;
@@ -141,7 +141,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
if( !pOutlNds->Count() )
{
delete pOutlNds;
- return FALSE;
+ return sal_False;
}
}
}
@@ -149,7 +149,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
{
// dann suche die Gliederungs - Vorlage, der 1. Ebene
const SwTxtFmtColls& rFmtColls =*GetTxtFmtColls();
- for( USHORT n = rFmtColls.Count(); n; )
+ for( sal_uInt16 n = rFmtColls.Count(); n; )
//if( !rFmtColls[ --n ]->GetOutlineLevel() )//#outline level,zhaojianwei
if ( rFmtColls[ --n ]->GetAttrOutlineLevel() == 1 )//<-end,zhaojianwei
{
@@ -158,7 +158,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
}
if( !pSplitColl )
- return FALSE;
+ return sal_False;
}
const SfxFilter* pFilter;
@@ -178,10 +178,10 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
}
if( !pFilter )
- return FALSE;
+ return sal_False;
// Undo/Redline aufjedenfall abschalten
- DoUndo( FALSE );
+ DoUndo( sal_False );
SetRedlineMode_intern( (RedlineMode_t)(GetRedlineMode() & ~nsRedlineMode_t::REDLINE_ON));
String sExt( pFilter->GetSuffixes().GetToken(0, ',') );
@@ -291,7 +291,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
SwNodeRange aRg( *pSttNd, 0, aEndIdx.GetNode() );
SwNodeIndex aTmpIdx( pDoc->GetNodes().GetEndOfContent() );
- GetNodes()._Copy( aRg, aTmpIdx, FALSE );
+ GetNodes()._Copy( aRg, aTmpIdx, sal_False );
// den initialen TextNode loeschen
SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), 2 );
@@ -309,7 +309,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
utl::TempFile aTempFile2(sLeading,&sExt,&sPath );
sFileName = aTempFile2.GetURL();
SfxMedium* pTmpMed = new SfxMedium( sFileName,
- STREAM_STD_READWRITE, TRUE );
+ STREAM_STD_READWRITE, sal_True );
pTmpMed->SetFilter( pFilter );
// fuer den HTML-Filter mussen wir aber ein Layout
@@ -340,7 +340,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
{
// loesche alle Nodes im Bereich und setze im "Start-
// Node" den Link auf das gespeicherte Doc
- ULONG nNodeDiff = aEndIdx.GetIndex() -
+ sal_uLong nNodeDiff = aEndIdx.GetIndex() -
pSttNd->GetIndex() - 1;
if( nNodeDiff )
{
@@ -357,14 +357,14 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
aTmp.Exchange();
if( !aTmp.Move( fnMoveBackward, fnGoNode ))
{
- ASSERT( FALSE, "kein Node mehr vorhanden" );
+ ASSERT( sal_False, "kein Node mehr vorhanden" );
}
}
// Bookmarks usw. verschieben
- CorrAbs( aSIdx, aEIdx, *aTmp.GetPoint(), TRUE);
+ CorrAbs( aSIdx, aEIdx, *aTmp.GetPoint(), sal_True);
// stehen noch FlyFrames rum, loesche auch diese
- for( USHORT n = 0; n < GetSpzFrmFmts()->Count(); ++n )
+ for( sal_uInt16 n = 0; n < GetSpzFrmFmts()->Count(); ++n )
{
SwFrmFmt* pFly = (*GetSpzFrmFmts())[n];
const SwFmtAnchor* pAnchor = &pFly->GetAnchor();
@@ -421,7 +421,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
if( pSectNd->GetIndex() + 1 ==
pSttNd->GetIndex() )
{
- BOOL bMvIdx = aEndIdx == *pSectEnd;
+ sal_Bool bMvIdx = aEndIdx == *pSectEnd;
DelSectionFmt( pSectNd->GetSection().GetFmt() );
if( bMvIdx )
aEndIdx--;
@@ -512,13 +512,13 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
}
//#outline level,add by zhaojianwei
-BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
+sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, int nOutlineLevel )
{
if( !pDocShell || !pDocShell->GetMedium() ||
( SPLITDOC_TO_GLOBALDOC == eDocType && get(IDocumentSettingAccess::GLOBAL_DOCUMENT) ) )
- return FALSE;
+ return sal_False;
- USHORT nOutl = 0;
+ sal_uInt16 nOutl = 0;
SwOutlineNodes* pOutlNds = (SwOutlineNodes*)&GetNodes().GetOutLineNds();
SwNodePtr pSttNd;
@@ -539,10 +539,10 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
}
if( !pFilter )
- return FALSE;
+ return sal_False;
// Undo/Redline aufjedenfall abschalten
- DoUndo( FALSE );
+ DoUndo( sal_False );
SetRedlineMode_intern( (RedlineMode_t)(GetRedlineMode() & ~nsRedlineMode_t::REDLINE_ON));
String sExt( pFilter->GetSuffixes().GetToken(0, ',') );
@@ -642,7 +642,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
SwNodeRange aRg( *pSttNd, 0, aEndIdx.GetNode() );
SwNodeIndex aTmpIdx( pDoc->GetNodes().GetEndOfContent() );
- GetNodes()._Copy( aRg, aTmpIdx, FALSE );
+ GetNodes()._Copy( aRg, aTmpIdx, sal_False );
// den initialen TextNode loeschen
SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), 2 );
@@ -660,7 +660,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
utl::TempFile aTempFile2(sLeading,&sExt,&sPath );
sFileName = aTempFile2.GetURL();
SfxMedium* pTmpMed = new SfxMedium( sFileName,
- STREAM_STD_READWRITE, TRUE );
+ STREAM_STD_READWRITE, sal_True );
pTmpMed->SetFilter( pFilter );
// fuer den HTML-Filter mussen wir aber ein Layout
@@ -691,7 +691,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
{
// loesche alle Nodes im Bereich und setze im "Start-
// Node" den Link auf das gespeicherte Doc
- ULONG nNodeDiff = aEndIdx.GetIndex() -
+ sal_uLong nNodeDiff = aEndIdx.GetIndex() -
pSttNd->GetIndex() - 1;
if( nNodeDiff )
{
@@ -708,14 +708,14 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
aTmp.Exchange();
if( !aTmp.Move( fnMoveBackward, fnGoNode ))
{
- ASSERT( FALSE, "kein Node mehr vorhanden" );
+ ASSERT( sal_False, "kein Node mehr vorhanden" );
}
}
// Bookmarks usw. verschieben
- CorrAbs( aSIdx, aEIdx, *aTmp.GetPoint(), TRUE);
+ CorrAbs( aSIdx, aEIdx, *aTmp.GetPoint(), sal_True);
// stehen noch FlyFrames rum, loesche auch diese
- for( USHORT n = 0; n < GetSpzFrmFmts()->Count(); ++n )
+ for( sal_uInt16 n = 0; n < GetSpzFrmFmts()->Count(); ++n )
{
SwFrmFmt* pFly = (*GetSpzFrmFmts())[n];
const SwFmtAnchor* pAnchor = &pFly->GetAnchor();
@@ -772,7 +772,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
if( pSectNd->GetIndex() + 1 ==
pSttNd->GetIndex() )
{
- BOOL bMvIdx = aEndIdx == *pSectEnd;
+ sal_Bool bMvIdx = aEndIdx == *pSectEnd;
DelSectionFmt( pSectNd->GetSection().GetFmt() );
if( bMvIdx )
aEndIdx--;
diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx
index 8395c358c495..c95f7ddad010 100644
--- a/sw/source/core/doc/docglos.cxx
+++ b/sw/source/core/doc/docglos.cxx
@@ -108,16 +108,16 @@ static void lcl_copyDocumentProperties(
/* -----------------22.07.99 11:47-------------------
Description: inserts an AutoText block
--------------------------------------------------*/
-BOOL SwDoc::InsertGlossary( SwTextBlocks& rBlock, const String& rEntry,
+sal_Bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const String& rEntry,
SwPaM& rPaM, SwCrsrShell* pShell )
{
- BOOL bRet = FALSE;
- USHORT nIdx = rBlock.GetIndex( rEntry );
- if( (USHORT) -1 != nIdx )
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nIdx = rBlock.GetIndex( rEntry );
+ if( (sal_uInt16) -1 != nIdx )
{
// Bug #70238# ask the TextOnly-Flag before BeginGetDoc, because
// the method closed the Storage!
- BOOL bSav_IsInsGlossary = mbInsOnlyTxtGlssry;
+ sal_Bool bSav_IsInsGlossary = mbInsOnlyTxtGlssry;
mbInsOnlyTxtGlssry = rBlock.IsOnlyTextBlock( nIdx );
if( rBlock.BeginGetDoc( nIdx ) )
@@ -192,7 +192,7 @@ BOOL SwDoc::InsertGlossary( SwTextBlocks& rBlock, const String& rEntry,
UnlockExpFlds();
if( !IsExpFldsLocked() )
UpdateExpFlds(NULL, true);
- bRet = TRUE;
+ bRet = sal_True;
}
mbInsOnlyTxtGlssry = bSav_IsInsGlossary;
}
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index cc29cc8406d0..da1b64aed389 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -115,7 +115,7 @@ using ::rtl::OUString;
#define DEF_FLY_WIDTH 2268 //Defaultbreite fuer FlyFrms (2268 == 4cm)
/* #109161# */
-static bool lcl_IsItemSet(const SwCntntNode & rNode, USHORT which)
+static bool lcl_IsItemSet(const SwCntntNode & rNode, sal_uInt16 which)
{
bool bResult = false;
@@ -314,9 +314,9 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt )
if ( pTbl )
{
std::vector<SwFrmFmt*> aToDeleteFrmFmts;
- const ULONG nNodeIdxOfFlyFmt( pCntntIdx->GetIndex() );
+ const sal_uLong nNodeIdxOfFlyFmt( pCntntIdx->GetIndex() );
- for ( USHORT i = 0; i < pTbl->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pTbl->Count(); ++i )
{
SwFrmFmt* pTmpFmt = (*pTbl)[i];
const SwFmtAnchor &rAnch = pTmpFmt->GetAnchor();
@@ -732,7 +732,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
if( DoesUndo() )
{
ClearRedo();
- ULONG nNodeIdx = rAnchPos.nNode.GetIndex();
+ sal_uLong nNodeIdx = rAnchPos.nNode.GetIndex();
xub_StrLen nCntIdx = rAnchPos.nContent.GetIndex();
AppendUndo( new SwUndoInsLayFmt( pFmt, nNodeIdx, nCntIdx ));
}
@@ -744,7 +744,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType,
const SwPosition* pAnchorPos,
const SfxItemSet* pFlySet,
- SwFrmFmt* pFrmFmt, BOOL bCalledFromShell )
+ SwFrmFmt* pFrmFmt, sal_Bool bCalledFromShell )
{
SwFlyFrmFmt* pFmt = 0;
sal_Bool bCallMake = sal_True;
@@ -788,7 +788,7 @@ SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType,
if (bCalledFromShell && !lcl_IsItemSet(*pNewTxtNd, RES_PARATR_ADJUST) &&
SFX_ITEM_SET == pAnchorNode->GetSwAttrSet().
- GetItemState(RES_PARATR_ADJUST, TRUE, &pItem))
+ GetItemState(RES_PARATR_ADJUST, sal_True, &pItem))
static_cast<SwCntntNode *>(pNewTxtNd)->SetAttr(*pItem);
pFmt = _MakeFlySection( *pAnchorPos, *pNewTxtNd,
@@ -860,7 +860,7 @@ SwFlyFrmFmt* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
rTbl.MakeCopy( this, aPos, *pSelBoxes );
// Don't delete a part of a table with row span!!
// You could delete the content instead -> ToDo
- //rTbl.DeleteSel( this, *pSelBoxes, 0, 0, TRUE, TRUE );
+ //rTbl.DeleteSel( this, *pSelBoxes, 0, 0, sal_True, sal_True );
}
// wenn Tabelle im Rahmen, dann ohne nachfolgenden TextNode
@@ -888,9 +888,9 @@ if( DoesUndo() ) // werden erstmal alle Undo - Objecte geloescht.
*/
// copy all Pams and then delete all
SwPaM* pTmp = (SwPaM*)&rPam;
- BOOL bOldFlag = mbCopyIsMove, bOldUndo = mbUndo;
- mbCopyIsMove = TRUE;
- mbUndo = FALSE;
+ sal_Bool bOldFlag = mbCopyIsMove, bOldUndo = mbUndo;
+ mbCopyIsMove = sal_True;
+ mbUndo = sal_False;
do {
if( pTmp->HasMark() &&
*pTmp->GetPoint() != *pTmp->GetMark() )
@@ -1055,7 +1055,7 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg,
sal_Bool TstFlyRange( const SwPaM* pPam, const SwPosition* pFlyPos,
RndStdIds nAnchorId )
{
- sal_Bool bOk = FALSE;
+ sal_Bool bOk = sal_False;
const SwPaM* pTmp = pPam;
do {
const sal_uInt32 nFlyIndex = pFlyPos->nNode.GetIndex();
@@ -1227,7 +1227,7 @@ void lcl_CpyAttr( SfxItemSet &rNewSet, const SfxItemSet &rOldSet, sal_uInt16 nWh
SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
const String& rNumberingSeparator,
- const sal_Bool bBefore, const sal_uInt16 nId, const ULONG nNdIdx,
+ const sal_Bool bBefore, const sal_uInt16 nId, const sal_uLong nNdIdx,
const String& rCharacterStyle,
const sal_Bool bCpyBrd )
{
@@ -1280,7 +1280,7 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
{
SwStartNode *pSttNd = GetNodes()[nNdIdx]->GetStartNode();
ASSERT( pSttNd, "Kein StartNode in InsertLabel." );
- ULONG nNode;
+ sal_uLong nNode;
if( bBefore )
{
nNode = pSttNd->GetIndex();
@@ -1499,7 +1499,7 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
SwCharFmt* pCharFmt = FindCharFmtByName( rCharacterStyle );
if( !pCharFmt )
{
- const USHORT nMyId = SwStyleNameMapper::GetPoolIdFromUIName(rCharacterStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ const sal_uInt16 nMyId = SwStyleNameMapper::GetPoolIdFromUIName(rCharacterStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
pCharFmt = GetCharFmtFromPool( nMyId );
}
if (pCharFmt)
@@ -1788,7 +1788,7 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel( const String &rTxt,
SwCharFmt* pCharFmt = FindCharFmtByName( rCharacterStyle );
if ( !pCharFmt )
{
- const USHORT nMyId = SwStyleNameMapper::GetPoolIdFromUIName( rCharacterStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
+ const sal_uInt16 nMyId = SwStyleNameMapper::GetPoolIdFromUIName( rCharacterStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
pCharFmt = GetCharFmtFromPool( nMyId );
}
if ( pCharFmt )
@@ -1880,7 +1880,7 @@ IMPL_LINK( SwDoc, DoIdleJobs, Timer *, pTimer )
if (GetRootFrm()->IsNeedGrammarCheck())
{
- BOOL bIsOnlineSpell = pSh->GetViewOptions()->IsOnlineSpell();
+ sal_Bool bIsOnlineSpell = pSh->GetViewOptions()->IsOnlineSpell();
sal_Bool bIsAutoGrammar = sal_False;
SvtLinguConfig().GetProperty( ::rtl::OUString::createFromAscii(
@@ -2270,7 +2270,7 @@ short SwDoc::GetTextDirection( const SwPosition& rPos,
if( !pItem )
{
- const SwPageDesc* pPgDsc = pNd->FindPageDesc( FALSE );
+ const SwPageDesc* pPgDsc = pNd->FindPageDesc( sal_False );
if( pPgDsc )
pItem = &pPgDsc->GetMaster().GetFrmDir();
}
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 484b5119d9e5..b17e718ea3cf 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -202,7 +202,7 @@ void StartGrammarChecking( SwDoc &rDoc )
-BOOL lcl_DelFmtIndizes( const SwFrmFmtPtr& rpFmt, void* )
+sal_Bool lcl_DelFmtIndizes( const SwFrmFmtPtr& rpFmt, void* )
{
SwFmtCntnt &rFmtCntnt = (SwFmtCntnt&)rpFmt->GetCntnt();
if ( rFmtCntnt.GetCntntIdx() )
@@ -210,7 +210,7 @@ BOOL lcl_DelFmtIndizes( const SwFrmFmtPtr& rpFmt, void* )
SwFmtAnchor &rFmtAnchor = (SwFmtAnchor&)rpFmt->GetAnchor();
if ( rFmtAnchor.GetCntntAnchor() )
rFmtAnchor.SetAnchor( 0 );
- return TRUE;
+ return sal_True;
}
/*
@@ -523,9 +523,9 @@ SwDoc::~SwDoc()
delete pPgPViewPrtData;
- mbUndo = FALSE; // immer das Undo abschalten !!
+ mbUndo = sal_False; // immer das Undo abschalten !!
// damit die Fussnotenattribute die Fussnotennodes in Frieden lassen.
- mbDtor = TRUE;
+ mbDtor = sal_True;
DELETEZ( pLayout );
@@ -541,7 +541,7 @@ SwDoc::~SwDoc()
// die BaseLinks freigeben.
{
- for( USHORT n = pLinkMgr->GetServers().Count(); n; )
+ for( sal_uInt16 n = pLinkMgr->GetServers().Count(); n; )
pLinkMgr->GetServers()[ --n ]->Closed();
if( pLinkMgr->GetLinks().Count() )
@@ -550,10 +550,10 @@ SwDoc::~SwDoc()
// die KapitelNummern / Nummern muessen vor den Vorlage geloescht werden
// ansonsten wird noch staendig geupdatet !!!
- aNodes.pOutlineNds->Remove( USHORT(0), aNodes.pOutlineNds->Count() );
- aUndoNodes.pOutlineNds->Remove( USHORT(0), aUndoNodes.pOutlineNds->Count() );
+ aNodes.pOutlineNds->Remove( sal_uInt16(0), aNodes.pOutlineNds->Count() );
+ aUndoNodes.pOutlineNds->Remove( sal_uInt16(0), aUndoNodes.pOutlineNds->Count() );
- pFtnIdxs->Remove( USHORT(0), pFtnIdxs->Count() );
+ pFtnIdxs->Remove( sal_uInt16(0), pFtnIdxs->Count() );
pUndos->DeleteAndDestroy( 0, pUndos->Count() ); //Es koennen in den Attributen noch
//noch indizes angemeldet sein.
@@ -575,7 +575,7 @@ SwDoc::~SwDoc()
//JP: alt - loeschen ohne Flag ist teuer; Modify wird verschickt!
// aTOXTypes.DeleteAndDestroy( 0, aTOXTypes.Count() );
{
- for( USHORT n = pTOXTypes->Count(); n; )
+ for( sal_uInt16 n = pTOXTypes->Count(); n; )
{
(*pTOXTypes)[ --n ]->SetInDocDTOR();
delete (*pTOXTypes)[ n ];
@@ -794,9 +794,9 @@ SfxObjectShell* SwDoc::GetPersist() const
void SwDoc::ClearDoc()
{
- BOOL bOldUndo = mbUndo;
+ sal_Bool bOldUndo = mbUndo;
DelAllUndoObj();
- mbUndo = FALSE; // immer das Undo abschalten !!
+ mbUndo = sal_False; // immer das Undo abschalten !!
// Undo-Benachrichtigung vom Draw abschalten
if( pDrawModel )
@@ -806,7 +806,7 @@ void SwDoc::ClearDoc()
}
// stehen noch FlyFrames rum, loesche auch diese
- USHORT n;
+ sal_uInt16 n;
while ( 0 != (n = GetSpzFrmFmts()->Count()) )
DelLayoutFmt((*pSpzFrmFmtTbl)[n-1]);
ASSERT( !pDrawModel || !pDrawModel->GetPage(0)->GetObjCount(),
@@ -964,11 +964,11 @@ IGrammarContact* getGrammarContact( const SwTxtNode& rTxtNode )
// --> FME 2005-02-25 #i42634# Moved common code of SwReader::Read() and
// SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks():
-void SwDoc::UpdateLinks( BOOL bUI )
+void SwDoc::UpdateLinks( sal_Bool bUI )
{
SfxObjectCreateMode eMode;
- USHORT nLinkMode = getLinkUpdateMode( true );
- USHORT nUpdateDocMode = GetDocShell()->GetUpdateDocMode();
+ sal_uInt16 nLinkMode = getLinkUpdateMode( true );
+ sal_uInt16 nUpdateDocMode = GetDocShell()->GetUpdateDocMode();
if( GetDocShell() &&
(nLinkMode != NEVER || document::UpdateDocMode::FULL_UPDATE == nUpdateDocMode) &&
GetLinkManager().GetLinks().Count() &&
@@ -979,13 +979,13 @@ void SwDoc::UpdateLinks( BOOL bUI )
!GetDocShell()->IsPreview() )
{
ViewShell* pVSh = 0;
- BOOL bAskUpdate = nLinkMode == MANUAL;
- BOOL bUpdate = TRUE;
+ sal_Bool bAskUpdate = nLinkMode == MANUAL;
+ sal_Bool bUpdate = sal_True;
switch(nUpdateDocMode)
{
- case document::UpdateDocMode::NO_UPDATE: bUpdate = FALSE;break;
- case document::UpdateDocMode::QUIET_UPDATE:bAskUpdate = FALSE; break;
- case document::UpdateDocMode::FULL_UPDATE: bAskUpdate = TRUE; break;
+ case document::UpdateDocMode::NO_UPDATE: bUpdate = sal_False;break;
+ case document::UpdateDocMode::QUIET_UPDATE:bAskUpdate = sal_False; break;
+ case document::UpdateDocMode::FULL_UPDATE: bAskUpdate = sal_True; break;
}
if( bUpdate && (bUI || !bAskUpdate) )
{
@@ -997,10 +997,10 @@ void SwDoc::UpdateLinks( BOOL bUI )
ViewShell aVSh( *this, 0, 0 );
SET_CURR_SHELL( &aVSh );
- GetLinkManager().UpdateAllLinks( bAskUpdate , TRUE, FALSE, pDlgParent );
+ GetLinkManager().UpdateAllLinks( bAskUpdate , sal_True, sal_False, pDlgParent );
}
else
- GetLinkManager().UpdateAllLinks( bAskUpdate, TRUE, FALSE, pDlgParent );
+ GetLinkManager().UpdateAllLinks( bAskUpdate, sal_True, sal_False, pDlgParent );
}
}
@@ -1089,7 +1089,7 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
{
SwDoc* pRet = new SwDoc;
//copy settings
- USHORT __FAR_DATA aRangeOfDefaults[] = {
+ sal_uInt16 __FAR_DATA aRangeOfDefaults[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -1102,8 +1102,8 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
SfxItemSet aNewDefaults( pRet->GetAttrPool(), aRangeOfDefaults );
- USHORT nWhich;
- USHORT nRange = 0;
+ sal_uInt16 nWhich;
+ sal_uInt16 nRange = 0;
while( aRangeOfDefaults[nRange] != 0)
{
for( nWhich = aRangeOfDefaults[nRange]; nWhich < aRangeOfDefaults[nRange + 1]; ++nWhich )
@@ -1160,11 +1160,11 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
return xRetShell;
}
/*-- 08.05.2009 10:52:40---------------------------------------------------
- copy document content - code from SwFEShell::Paste( SwDoc* , BOOL )
+ copy document content - code from SwFEShell::Paste( SwDoc* , sal_Bool )
-----------------------------------------------------------------------*/
void SwDoc::Paste( const SwDoc& rSource )
{
-// this has to be empty const USHORT nStartPageNumber = GetPhyPageNum();
+// this has to be empty const sal_uInt16 nStartPageNumber = GetPhyPageNum();
// until the end of the NodesArray
SwNodeIndex aSourceIdx( rSource.GetNodes().GetEndOfExtras(), 2 );
SwPaM aCpyPam( aSourceIdx ); //DocStart
@@ -1210,9 +1210,9 @@ void SwDoc::Paste( const SwDoc& rSource )
//additionally copy page bound frames
if( /*bIncludingPageFrames && */rSource.GetSpzFrmFmts()->Count() )
{
- for ( USHORT i = 0; i < rSource.GetSpzFrmFmts()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rSource.GetSpzFrmFmts()->Count(); ++i )
{
- BOOL bInsWithFmt = TRUE;
+ sal_Bool bInsWithFmt = sal_True;
const SwFrmFmt& rCpyFmt = *(*rSource.GetSpzFrmFmts())[i];
if( bInsWithFmt )
{
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 6ba37816b0dc..32fd242999cd 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -64,7 +64,7 @@
#include <map>
-inline BYTE GetUpperLvlChg( BYTE nCurLvl, BYTE nLevel, USHORT nMask )
+inline sal_uInt8 GetUpperLvlChg( sal_uInt8 nCurLvl, sal_uInt8 nLevel, sal_uInt16 nMask )
{
if( 1 < nLevel )
{
@@ -73,7 +73,7 @@ inline BYTE GetUpperLvlChg( BYTE nCurLvl, BYTE nLevel, USHORT nMask )
else
nCurLvl = 0;
}
- return static_cast<BYTE>((nMask - 1) & ~(( 1 << nCurLvl ) - 1));
+ return static_cast<sal_uInt8>((nMask - 1) & ~(( 1 << nCurLvl ) - 1));
}
void SwDoc::SetOutlineNumRule( const SwNumRule& rRule )
@@ -95,7 +95,7 @@ void SwDoc::SetOutlineNumRule( const SwNumRule& rRule )
// <--
// --> OD 2006-09-21 #i69522#
// assure that the outline numbering rule is an automatic rule
- pOutlineRule->SetAutoRule( TRUE );
+ pOutlineRule->SetAutoRule( sal_True );
// <--
// teste ob die evt. gesetzen CharFormate in diesem Document
@@ -124,7 +124,7 @@ void SwDoc::SetOutlineNumRule( const SwNumRule& rRule )
// <--
PropagateOutlineRule();
- pOutlineRule->SetInvalidRule(TRUE);
+ pOutlineRule->SetInvalidRule(sal_True);
UpdateNumRule();
// gibt es Fussnoten && gilt Kapitelweises Nummerieren, dann updaten
@@ -138,7 +138,7 @@ void SwDoc::SetOutlineNumRule( const SwNumRule& rRule )
void SwDoc::PropagateOutlineRule()
{
- for (USHORT n = 0; n < pTxtFmtCollTbl->Count(); n++)
+ for (sal_uInt16 n = 0; n < pTxtFmtCollTbl->Count(); n++)
{
SwTxtFmtColl *pColl = (*pTxtFmtCollTbl)[n];
@@ -149,7 +149,7 @@ void SwDoc::PropagateOutlineRule()
// --> OD 2006-11-20 #i71764#
// Check only the list style, which is set at the paragraph style
- const SwNumRuleItem & rCollRuleItem = pColl->GetNumRule( FALSE );
+ const SwNumRuleItem & rCollRuleItem = pColl->GetNumRule( sal_False );
// <--
// --> OD 2006-11-20 #i71764#
@@ -171,21 +171,21 @@ void SwDoc::PropagateOutlineRule()
}
// Hoch-/Runterstufen
-BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
+sal_Bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
{
if( !GetNodes().GetOutLineNds().Count() || !nOffset )
- return FALSE;
+ return sal_False;
// den Bereich feststellen
const SwOutlineNodes& rOutlNds = GetNodes().GetOutLineNds();
const SwNodePtr pSttNd = (SwNodePtr)&rPam.Start()->nNode.GetNode();
const SwNodePtr pEndNd = (SwNodePtr)&rPam.End()->nNode.GetNode();
- USHORT nSttPos, nEndPos;
+ sal_uInt16 nSttPos, nEndPos;
if( !rOutlNds.Seek_Entry( pSttNd, &nSttPos ) &&
!nSttPos-- )
// wir stehen in keiner "Outline-Section"
- return FALSE;
+ return sal_False;
if( rOutlNds.Seek_Entry( pEndNd, &nEndPos ) )
++nEndPos;
@@ -193,7 +193,7 @@ BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
// jetzt haben wir unseren Bereich im OutlineNodes-Array
// dann prufe ersmal, ob nicht unterebenen aufgehoben werden
// (Stufung ueber die Grenzen)
- USHORT n;
+ sal_uInt16 n;
// so, dann koennen wir:
// 1. Vorlagen-Array anlegen
@@ -202,7 +202,7 @@ BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
for( n = 0; n < pTxtFmtCollTbl->Count(); ++n )
{
- //BYTE nLevel = (*pTxtFmtCollTbl)[ n ]->GetOutlineLevel();//#outline level,zhaojianwei
+ //sal_uInt8 nLevel = (*pTxtFmtCollTbl)[ n ]->GetOutlineLevel();//#outline level,zhaojianwei
//if( nLevel < MAXLEVEL )
// aCollArr[ nLevel ] = (*pTxtFmtCollTbl)[ n ];
if((*pTxtFmtCollTbl)[ n ]->IsAssignedToListLevelOfOutlineStyle())
@@ -315,12 +315,12 @@ BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
*/
if (aCollArr[n] != NULL)
{
- USHORT m = n;
+ sal_uInt16 m = n;
int nCount = nNum;
while (nCount > 0 && m + nStep >= 0 && m + nStep < MAXLEVEL)
{
- m = static_cast<USHORT>(m + nStep);
+ m = static_cast<sal_uInt16>(m + nStep);
if (aCollArr[m] != NULL)
nCount--;
@@ -368,7 +368,7 @@ BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
}
if (! bMoveApplicable )
- return FALSE;
+ return sal_False;
/* <-- #i13747 # */
if( DoesUndo() )
@@ -423,13 +423,13 @@ BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
ChkCondColls();
SetModified();
- return TRUE;
+ return sal_True;
}
// Hoch-/Runter - Verschieben !
-BOOL SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
+sal_Bool SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
{
// kein Verschiebung in den Sonderbereichen
const SwPosition& rStt = *rPam.Start(),
@@ -438,31 +438,31 @@ BOOL SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
if( !GetNodes().GetOutLineNds().Count() || !nOffset ||
rStt.nNode.GetIndex() < aNodes.GetEndOfExtras().GetIndex() ||
rEnd.nNode.GetIndex() < aNodes.GetEndOfExtras().GetIndex() )
- return FALSE;
+ return sal_False;
- USHORT nAktPos = 0;
+ sal_uInt16 nAktPos = 0;
SwNodeIndex aSttRg( rStt.nNode ), aEndRg( rEnd.nNode );
- //BYTE nOutLineLevel = NO_NUMBERING; //#outline level,zhaojianwei
+ //sal_uInt8 nOutLineLevel = NO_NUMBERING; //#outline level,zhaojianwei
int nOutLineLevel = MAXLEVEL; //<-end,zhaojianwei
SwNode* pSrch = &aSttRg.GetNode();
//if( pSrch->IsTxtNode() ) //#outline level,zhaojianwei
- // nOutLineLevel = static_cast<BYTE>(((SwTxtNode*)pSrch)->GetOutlineLevel());
+ // nOutLineLevel = static_cast<sal_uInt8>(((SwTxtNode*)pSrch)->GetOutlineLevel());
if( pSrch->IsTxtNode())
- nOutLineLevel = static_cast<BYTE>(((SwTxtNode*)pSrch)->GetAttrOutlineLevel()-1);//<-end,zhaojianwei
+ nOutLineLevel = static_cast<sal_uInt8>(((SwTxtNode*)pSrch)->GetAttrOutlineLevel()-1);//<-end,zhaojianwei
SwNode* pEndSrch = &aEndRg.GetNode();
if( !GetNodes().GetOutLineNds().Seek_Entry( pSrch, &nAktPos ) )
{
if( !nAktPos )
- return FALSE; // Promoting or demoting before the first outline => no.
+ return sal_False; // Promoting or demoting before the first outline => no.
if( --nAktPos )
aSttRg = *GetNodes().GetOutLineNds()[ nAktPos ];
else if( 0 > nOffset )
- return FALSE; // Promoting at the top of document?!
+ return sal_False; // Promoting at the top of document?!
else
aSttRg = *GetNodes().GetEndOfContent().StartOfSectionNode();
}
- USHORT nTmpPos = 0;
+ sal_uInt16 nTmpPos = 0;
// If the given range ends at an outlined text node we have to decide if it has to be a part of
// the moving range or not. Normally it will be a sub outline of our chapter
// and has to be moved, too. But if the chapter ends with a table(or a section end),
@@ -516,14 +516,14 @@ BOOL SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
aEndRg++;
// calculation of the new position
- if( nOffset < 0 && nAktPos < USHORT(-nOffset) )
+ if( nOffset < 0 && nAktPos < sal_uInt16(-nOffset) )
pNd = GetNodes().GetEndOfContent().StartOfSectionNode();
else if( nAktPos + nOffset >= GetNodes().GetOutLineNds().Count() )
pNd = &GetNodes().GetEndOfContent();
else
pNd = GetNodes().GetOutLineNds()[ nAktPos + nOffset ];
- ULONG nNewPos = pNd->GetIndex();
+ sal_uLong nNewPos = pNd->GetIndex();
// And now a correction of the insert position if necessary...
SwNodeIndex aInsertPos( *pNd, -1 );
@@ -563,7 +563,7 @@ BOOL SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
if( pNd->IsTableNode() )
pNd = pNd->StartOfSectionNode();
if( pNd->FindTableNode() )
- return FALSE;
+ return sal_False;
ASSERT( aSttRg.GetIndex() > nNewPos || nNewPos >= aEndRg.GetIndex(),
"Position liegt im MoveBereich" );
@@ -576,16 +576,16 @@ BOOL SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
long nOffs = nNewPos - ( 0 < nOffset ? aEndRg.GetIndex() : aSttRg.GetIndex());
SwPaM aPam( aSttRg, aEndRg, 0, -1 );
- return MoveParagraph( aPam, nOffs, TRUE );
+ return MoveParagraph( aPam, nOffs, sal_True );
}
-USHORT lcl_FindOutlineName( const SwNodes& rNds, const String& rName,
- BOOL bExact )
+sal_uInt16 lcl_FindOutlineName( const SwNodes& rNds, const String& rName,
+ sal_Bool bExact )
{
- USHORT nSavePos = USHRT_MAX;
+ sal_uInt16 nSavePos = USHRT_MAX;
const SwOutlineNodes& rOutlNds = rNds.GetOutLineNds();
- for( USHORT n = 0; n < rOutlNds.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rOutlNds.Count(); ++n )
{
SwTxtNode* pTxtNd = rOutlNds[ n ]->GetTxtNode();
String sTxt( pTxtNd->GetExpandTxt() );
@@ -608,7 +608,7 @@ USHORT lcl_FindOutlineName( const SwNodes& rNds, const String& rName,
-USHORT lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
+sal_uInt16 lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
{
// Gueltig Nummern sind (immer nur Offsets!!!):
// ([Nummer]+\.)+ (als regulaerer Ausdruck!)
@@ -619,16 +619,16 @@ USHORT lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
if( STRING_NOTFOUND == nPos )
return USHRT_MAX; // ungueltige Nummer!!!
- USHORT nLevelVal[ MAXLEVEL ]; // Nummern aller Levels
+ sal_uInt16 nLevelVal[ MAXLEVEL ]; // Nummern aller Levels
memset( nLevelVal, 0, MAXLEVEL * sizeof( nLevelVal[0] ));
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
String sName( rName );
while( STRING_NOTFOUND != nPos )
{
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
sal_Unicode c;
- for( USHORT n = 0; n < sNum.Len(); ++n )
+ for( sal_uInt16 n = 0; n < sNum.Len(); ++n )
if( '0' <= ( c = sNum.GetChar( n )) && c <= '9' )
{
nVal *= 10; nVal += c - '0';
@@ -663,7 +663,7 @@ USHORT lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
for( ; nPos < rOutlNds.Count(); ++nPos )
{
pNd = rOutlNds[ nPos ]->GetTxtNode();
- //BYTE nLvl = pNd->GetTxtColl()->GetOutlineLevel(); //#outline level,zhaojianwei
+ //sal_uInt8 nLvl = pNd->GetTxtColl()->GetOutlineLevel(); //#outline level,zhaojianwei
const int nLvl = pNd->GetAttrOutlineLevel()-1; //<-end,zhaojianwei
if( nLvl == nLevel - 1)
{
@@ -681,7 +681,7 @@ USHORT lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
SwNumberTree::tNumberVector aLevelVal = rNdNum.GetNumberVector();
//now compare with the one searched for
bool bEqual = true;
- for( BYTE n = 0; (n < nLevel) && bEqual; ++n )
+ for( sal_uInt8 n = 0; (n < nLevel) && bEqual; ++n )
{
bEqual = aLevelVal[n] == nLevelVal[n];
}
@@ -719,7 +719,7 @@ USHORT lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
// der ueber die Nummer gefunden wurde.
// Ist keine Nummer angegeben, dann nur den Text suchen.
-BOOL SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
+sal_Bool SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
{
if( rName.Len() )
{
@@ -727,7 +727,7 @@ BOOL SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
// 1. Schritt: ueber die Nummer:
String sName( rName );
- USHORT nFndPos = ::lcl_FindOutlineNum( GetNodes(), sName );
+ sal_uInt16 nFndPos = ::lcl_FindOutlineNum( GetNodes(), sName );
if( USHRT_MAX != nFndPos )
{
SwTxtNode* pNd = rOutlNds[ nFndPos ]->GetTxtNode();
@@ -735,7 +735,7 @@ BOOL SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
//#i4533# leading numbers followed by a dot have been remove while
//searching for the outline position
//to compensate this they must be removed from the paragraphs text content, too
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
String sTempNum;
while(sExpandedText.Len() && (sTempNum = sExpandedText.GetToken(0, '.', nPos)).Len() &&
STRING_NOTFOUND != nPos &&
@@ -747,7 +747,7 @@ BOOL SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
if( !sExpandedText.Equals( sName ) )
{
- USHORT nTmp = ::lcl_FindOutlineName( GetNodes(), sName, TRUE );
+ sal_uInt16 nTmp = ::lcl_FindOutlineName( GetNodes(), sName, sal_True );
if( USHRT_MAX != nTmp ) // ueber den Namen gefunden
{
nFndPos = nTmp;
@@ -756,34 +756,34 @@ BOOL SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
}
rPos.nNode = *pNd;
rPos.nContent.Assign( pNd, 0 );
- return TRUE;
+ return sal_True;
}
- nFndPos = ::lcl_FindOutlineName( GetNodes(), rName, FALSE );
+ nFndPos = ::lcl_FindOutlineName( GetNodes(), rName, sal_False );
if( USHRT_MAX != nFndPos )
{
SwTxtNode* pNd = rOutlNds[ nFndPos ]->GetTxtNode();
rPos.nNode = *pNd;
rPos.nContent.Assign( pNd, 0 );
- return TRUE;
+ return sal_True;
}
// --> OD 2006-09-22 #i68289#
// additional search on hyperlink URL without its outline numbering part
if ( !sName.Equals( rName ) )
{
- nFndPos = ::lcl_FindOutlineName( GetNodes(), sName, FALSE );
+ nFndPos = ::lcl_FindOutlineName( GetNodes(), sName, sal_False );
if( USHRT_MAX != nFndPos )
{
SwTxtNode* pNd = rOutlNds[ nFndPos ]->GetTxtNode();
rPos.nNode = *pNd;
rPos.nContent.Assign( pNd, 0 );
- return TRUE;
+ return sal_True;
}
}
// <--
}
- return FALSE;
+ return sal_False;
}
/* */
@@ -791,7 +791,7 @@ BOOL SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
// --- Nummerierung -----------------------------------------
// --> OD 2008-02-19 #refactorlists#
-//void SwNumRuleInfo::MakeList( SwDoc& rDoc, BOOL )
+//void SwNumRuleInfo::MakeList( SwDoc& rDoc, sal_Bool )
//{
// SwNumRule* pRule = rDoc.FindNumRulePtr(rName);
@@ -817,7 +817,7 @@ BOOL SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
// {
// const SwOutlineNodes & rOutlineNodes = rDoc.GetNodes().GetOutLineNds();
-// for (USHORT i = 0; i < rOutlineNodes.Count(); ++i)
+// for (sal_uInt16 i = 0; i < rOutlineNodes.Count(); ++i)
// {
// SwTxtNode & aNode = *((SwTxtNode *) rOutlineNodes[i]);
@@ -828,7 +828,7 @@ BOOL SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
// {
// SwModify* pMod;
// const SfxPoolItem* pItem;
-// USHORT i, nMaxItems = rDoc.GetAttrPool().GetItemCount
+// sal_uInt16 i, nMaxItems = rDoc.GetAttrPool().GetItemCount
// ( RES_PARATR_NUMRULE);
// for( i = 0; i < nMaxItems; ++i )
// {
@@ -872,8 +872,8 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
SwNumRule* pOld = rDoc.FindNumRulePtr( rRule.GetName() );
ASSERT( pOld, "ohne die alte NumRule geht gar nichts" );
- USHORT nChgFmtLevel = 0, nMask = 1;
- BYTE n;
+ sal_uInt16 nChgFmtLevel = 0, nMask = 1;
+ sal_uInt8 n;
for( n = 0; n < MAXLEVEL; ++n, nMask <<= 1 )
{
@@ -903,7 +903,7 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
// --> OD 2006-04-27 #i64311#
if ( bInvalidateNumRule )
{
- pOld->SetInvalidRule(TRUE);
+ pOld->SetInvalidRule(sal_True);
}
// <--
return ;
@@ -913,12 +913,12 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
// SwNumRuleInfo* pUpd = new SwNumRuleInfo( rRule.GetName() );
// pUpd->MakeList( rDoc );
-// BYTE nLvl;
-// for( ULONG nFirst = 0, nLast = pUpd->GetList().Count();
+// sal_uInt8 nLvl;
+// for( sal_uLong nFirst = 0, nLast = pUpd->GetList().Count();
// nFirst < nLast; ++nFirst )
// {
// SwTxtNode* pTxtNd = pUpd->GetList().GetObject( nFirst );
-// nLvl = static_cast<BYTE>(pTxtNd->GetLevel());
+// nLvl = static_cast<sal_uInt8>(pTxtNd->GetLevel());
// if( nLvl < MAXLEVEL )
// {
@@ -930,12 +930,12 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
// }
SwNumRule::tTxtNodeList aTxtNodeList;
pOld->GetTxtNodeList( aTxtNodeList );
- BYTE nLvl( 0 );
+ sal_uInt8 nLvl( 0 );
for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin();
aIter != aTxtNodeList.end(); ++aIter )
{
SwTxtNode* pTxtNd = *aIter;
- nLvl = static_cast<BYTE>(pTxtNd->GetActualListLevel());
+ nLvl = static_cast<sal_uInt8>(pTxtNd->GetActualListLevel());
if( nLvl < MAXLEVEL )
{
@@ -952,7 +952,7 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
pOld->Set( n, rRule.GetNumFmt( n ));
pOld->CheckCharFmts( &rDoc );
- pOld->SetInvalidRule(TRUE);
+ pOld->SetInvalidRule(sal_True);
pOld->SetContinusNum( rRule.IsContinusNum() );
// --> OD 2008-06-17 #i87166#
// Do NOT change list style type
@@ -1102,11 +1102,11 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
rPam.End()->nNode );
aPam.Start()->nContent = 0;
aPam.End()->nContent = rPam.End()->nNode.GetNode().GetTxtNode()->Len();
- ResetAttrs( aPam, FALSE, &aResetAttrsArray );
+ ResetAttrs( aPam, sal_False, &aResetAttrsArray );
}
else
{
- ResetAttrs( rPam, FALSE, &aResetAttrsArray );
+ ResetAttrs( rPam, sal_False, &aResetAttrsArray );
}
// <--
}
@@ -1134,22 +1134,22 @@ void SwDoc::SetCounted(const SwPaM & rPam, bool bCounted)
rPam.End()->nNode );
aPam.Start()->nContent = 0;
aPam.End()->nContent = rPam.End()->nNode.GetNode().GetTxtNode()->Len();
- ResetAttrs( aPam, FALSE, &aResetAttrsArray );
+ ResetAttrs( aPam, sal_False, &aResetAttrsArray );
}
else
{
- ResetAttrs( rPam, FALSE, &aResetAttrsArray );
+ ResetAttrs( rPam, sal_False, &aResetAttrsArray );
}
// <--
}
else
{
InsertPoolItem( rPam,
- SfxBoolItem( RES_PARATR_LIST_ISCOUNTED, FALSE ), 0 );
+ SfxBoolItem( RES_PARATR_LIST_ISCOUNTED, sal_False ), 0 );
}
}
-void SwDoc::SetNumRuleStart( const SwPosition& rPos, BOOL bFlag )
+void SwDoc::SetNumRuleStart( const SwPosition& rPos, sal_Bool bFlag )
{
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
@@ -1171,7 +1171,7 @@ void SwDoc::SetNumRuleStart( const SwPosition& rPos, BOOL bFlag )
}
}
-void SwDoc::SetNodeNumStart( const SwPosition& rPos, USHORT nStt )
+void SwDoc::SetNodeNumStart( const SwPosition& rPos, sal_uInt16 nStt )
{
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
@@ -1207,16 +1207,16 @@ void SwDoc::SetNodeNumStart( const SwPosition& rPos, USHORT nStt )
}
// loeschen geht nur, wenn die Rule niemand benutzt!
-BOOL SwDoc::DelNumRule( const String& rName, BOOL bBroadcast )
+sal_Bool SwDoc::DelNumRule( const String& rName, sal_Bool bBroadcast )
{
- USHORT nPos = FindNumRule( rName );
+ sal_uInt16 nPos = FindNumRule( rName );
// --> OD 2007-12-17 #151213#
if ( (*pNumRuleTbl)[ nPos ] == GetOutlineNumRule() )
{
ASSERT( false,
"<SwDoc::DelNumRule(..)> - No deletion of outline list style. This is serious defect - please inform OD" );
- return FALSE;
+ return sal_False;
}
// <--
@@ -1266,9 +1266,9 @@ BOOL SwDoc::DelNumRule( const String& rName, BOOL bBroadcast )
maNumRuleMap.erase(aTmpName);
SetModified();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// #106897#
@@ -1296,7 +1296,7 @@ void SwDoc::ChgNumRuleFmts( const SwNumRule& rRule, const String * pName )
}
sal_Bool SwDoc::RenameNumRule(const String & rOldName, const String & rNewName,
- BOOL bBroadcast)
+ sal_Bool bBroadcast)
{
sal_Bool bResult = sal_False;
SwNumRule * pNumRule = FindNumRulePtr(rOldName);
@@ -1323,7 +1323,7 @@ sal_Bool SwDoc::RenameNumRule(const String & rOldName, const String & rNewName,
SwNumRuleItem aItem(rNewName);
// --> OD 2008-02-19 #refactorlists#
-// for (ULONG nI = 0; nI < aInfo.GetList().Count(); ++nI)
+// for (sal_uLong nI = 0; nI < aInfo.GetList().Count(); ++nI)
// {
// SwTxtNode * pTxtNd = aInfo.GetList().GetObject(nI);
// pTxtNd->SwCntntNode::SetAttr(aItem);
@@ -1348,13 +1348,13 @@ sal_Bool SwDoc::RenameNumRule(const String & rOldName, const String & rNewName,
void SwDoc::StopNumRuleAnimations( OutputDevice* pOut )
{
- for( USHORT n = GetNumRuleTbl().Count(); n; )
+ for( sal_uInt16 n = GetNumRuleTbl().Count(); n; )
{
// --> OD 2008-02-19 #refactorlists#
// SwNumRuleInfo aUpd( GetNumRuleTbl()[ --n ]->GetName() );
// aUpd.MakeList( *this );
-// for( ULONG nFirst = 0, nLast = aUpd.GetList().Count();
+// for( sal_uLong nFirst = 0, nLast = aUpd.GetList().Count();
// nFirst < nLast; ++nFirst )
// {
// SwTxtNode* pTNd = aUpd.GetList().GetObject( nFirst );
@@ -1380,10 +1380,10 @@ void SwDoc::StopNumRuleAnimations( OutputDevice* pOut )
}
}
-BOOL SwDoc::ReplaceNumRule( const SwPosition& rPos,
+sal_Bool SwDoc::ReplaceNumRule( const SwPosition& rPos,
const String& rOldRule, const String& rNewRule )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwNumRule *pOldRule = FindNumRulePtr( rOldRule ),
*pNewRule = FindNumRulePtr( rNewRule );
if( pOldRule && pNewRule && pOldRule != pNewRule )
@@ -1412,7 +1412,7 @@ BOOL SwDoc::ReplaceNumRule( const SwPosition& rPos,
// // Position suchen und bestimme ob ein Node davor oder dahinter
// // einen Start erzwingt
// SwTxtNode* pTxtNd;
-// ULONG nFndPos, nFirst, nLast;
+// sal_uLong nFndPos, nFirst, nLast;
// if( TABLE_ENTRY_NOTFOUND != aUpd.GetList().SearchKey(
// rPos.nNode.GetIndex(), &nFndPos ))
@@ -1441,8 +1441,8 @@ BOOL SwDoc::ReplaceNumRule( const SwPosition& rPos,
// }
SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : 0 );
- USHORT nChgFmtLevel = 0;
- for( BYTE n = 0; n < MAXLEVEL; ++n )
+ sal_uInt16 nChgFmtLevel = 0;
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
{
const SwNumFmt& rOldFmt = pOldRule->Get( n ),
& rNewFmt = pNewRule->Get( n );
@@ -1480,7 +1480,7 @@ BOOL SwDoc::ReplaceNumRule( const SwPosition& rPos,
EndUndo( UNDO_END, NULL );
SetModified();
- bRet = TRUE; // #106897#
+ bRet = sal_True; // #106897#
}
}
@@ -1514,12 +1514,12 @@ void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM)
::std::map<SwNumRule *, ListStyleData> aMyNumRuleMap;
// <--
- ULONG nStt = rPaM.Start()->nNode.GetIndex();
- ULONG nEnd = rPaM.End()->nNode.GetIndex();
+ sal_uLong nStt = rPaM.Start()->nNode.GetIndex();
+ sal_uLong nEnd = rPaM.End()->nNode.GetIndex();
bool bFirst = true;
- for (ULONG n = nStt; n <= nEnd; n++)
+ for (sal_uLong n = nStt; n <= nEnd; n++)
{
SwTxtNode * pCNd = GetNodes()[n]->GetTxtNode();
@@ -1582,10 +1582,10 @@ void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM)
}
}
-BOOL SwDoc::NoNum( const SwPaM& rPam )
+sal_Bool SwDoc::NoNum( const SwPaM& rPam )
{
- BOOL bRet = SplitNode( *rPam.GetPoint(), false );
+ sal_Bool bRet = SplitNode( *rPam.GetPoint(), false );
// ist ueberhaupt Nummerierung im Spiel ?
if( bRet )
{
@@ -1600,18 +1600,18 @@ BOOL SwDoc::NoNum( const SwPaM& rPam )
SetModified();
}
else
- bRet = FALSE; // keine Nummerierung , ?? oder immer TRUE ??
+ bRet = sal_False; // keine Nummerierung , ?? oder immer sal_True ??
}
return bRet;
}
void SwDoc::DelNumRules( const SwPaM& rPam )
{
- ULONG nStt = rPam.GetPoint()->nNode.GetIndex(),
+ sal_uLong nStt = rPam.GetPoint()->nNode.GetIndex(),
nEnd = rPam.GetMark()->nNode.GetIndex();
if( nStt > nEnd )
{
- ULONG nTmp = nStt; nStt = nEnd; nEnd = nTmp;
+ sal_uLong nTmp = nStt; nStt = nEnd; nEnd = nTmp;
}
SwUndoDelNum* pUndo;
@@ -1632,7 +1632,7 @@ void SwDoc::DelNumRules( const SwPaM& rPam )
SwTxtNode* pTNd = GetNodes()[ nStt ]->GetTxtNode();
// --> OD 2008-03-13 #refactorlists#
// if( pTNd && 0 != ( pItem = pTNd->GetNoCondAttr(
-// RES_PARATR_NUMRULE, TRUE ) ) &&
+// RES_PARATR_NUMRULE, sal_True ) ) &&
// ( pName = &((SwNumRuleItem*)pItem)->GetValue())->Len() )
SwNumRule* pNumRuleOfTxtNode = pTNd ? pTNd->GetNumRule() : 0;
if ( pTNd && pNumRuleOfTxtNode )
@@ -1642,13 +1642,13 @@ void SwDoc::DelNumRules( const SwPaM& rPam )
aRegH.RegisterInModify( pTNd, *pTNd );
if( pUndo )
- pUndo->AddNode( *pTNd, FALSE );
+ pUndo->AddNode( *pTNd, sal_False );
// directly set list style attribute is reset, otherwise empty
// list style is applied
const SfxItemSet* pAttrSet = pTNd->GetpSwAttrSet();
if ( pAttrSet &&
- pAttrSet->GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET )
+ pAttrSet->GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET )
pTNd->ResetAttr( RES_PARATR_NUMRULE );
else
pTNd->SetAttr( aEmptyRule );
@@ -1680,24 +1680,24 @@ void SwDoc::DelNumRules( const SwPaM& rPam )
void SwDoc::InvalidateNumRules()
{
- for (USHORT n = 0; n < pNumRuleTbl->Count(); ++n)
- (*pNumRuleTbl)[n]->SetInvalidRule(TRUE);
+ for (sal_uInt16 n = 0; n < pNumRuleTbl->Count(); ++n)
+ (*pNumRuleTbl)[n]->SetInvalidRule(sal_True);
}
// zum naechsten/vorhergehenden Punkt auf gleicher Ebene
-BOOL lcl_IsNumOk( BYTE nSrchNum, BYTE& rLower, BYTE& rUpper,
- BOOL bOverUpper, BYTE nNumber )
+sal_Bool lcl_IsNumOk( sal_uInt8 nSrchNum, sal_uInt8& rLower, sal_uInt8& rUpper,
+ sal_Bool bOverUpper, sal_uInt8 nNumber )
{
// --> OD 2008-04-02 #refactorlists#
ASSERT( nNumber < MAXLEVEL,
"<lcl_IsNumOk(..)> - misusage of method" );
// <--
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
{
if( bOverUpper ? nSrchNum == nNumber : nSrchNum >= nNumber )
- bRet = TRUE;
+ bRet = sal_True;
else if( nNumber > rLower )
rLower = nNumber;
else if( nNumber < rUpper )
@@ -1706,9 +1706,9 @@ BOOL lcl_IsNumOk( BYTE nSrchNum, BYTE& rLower, BYTE& rUpper,
return bRet;
}
-BOOL lcl_IsValidPrevNextNumNode( const SwNodeIndex& rIdx )
+sal_Bool lcl_IsValidPrevNextNumNode( const SwNodeIndex& rIdx )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwNode& rNd = rIdx.GetNode();
switch( rNd.GetNodeType() )
{
@@ -1722,28 +1722,28 @@ BOOL lcl_IsValidPrevNextNumNode( const SwNodeIndex& rIdx )
break;
case ND_SECTIONNODE: // der ist erlaubt, also weiter
- bRet = TRUE;
+ bRet = sal_True;
break;
}
return bRet;
}
-BOOL lcl_GotoNextPrevNum( SwPosition& rPos, BOOL bNext,
- BOOL bOverUpper, BYTE* pUpper, BYTE* pLower )
+sal_Bool lcl_GotoNextPrevNum( SwPosition& rPos, sal_Bool bNext,
+ sal_Bool bOverUpper, sal_uInt8* pUpper, sal_uInt8* pLower )
{
const SwTxtNode* pNd = rPos.nNode.GetNode().GetTxtNode();
const SwNumRule* pRule;
if( !pNd || 0 == ( pRule = pNd->GetNumRule()))
- return FALSE;
+ return sal_False;
- BYTE nSrchNum = static_cast<BYTE>(pNd->GetActualListLevel());
+ sal_uInt8 nSrchNum = static_cast<sal_uInt8>(pNd->GetActualListLevel());
SwNodeIndex aIdx( rPos.nNode );
if( ! pNd->IsCountedInList() )
{
// falls gerade mal NO_NUMLEVEL an ist, so such den vorherigen Node
// mit Nummerierung
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
do {
aIdx--;
if( aIdx.GetNode().IsTxtNode() )
@@ -1751,28 +1751,28 @@ BOOL lcl_GotoNextPrevNum( SwPosition& rPos, BOOL bNext,
pNd = aIdx.GetNode().GetTxtNode();
pRule = pNd->GetNumRule();
- BYTE nTmpNum;
+ sal_uInt8 nTmpNum;
if( pRule )
{
- nTmpNum = static_cast<BYTE>(pNd->GetActualListLevel());
+ nTmpNum = static_cast<sal_uInt8>(pNd->GetActualListLevel());
if( !( ! pNd->IsCountedInList() &&
(nTmpNum >= nSrchNum )) )
break; // gefunden
}
else
- bError = TRUE;
+ bError = sal_True;
}
else
bError = !lcl_IsValidPrevNextNumNode( aIdx );
} while( !bError );
if( bError )
- return FALSE;
+ return sal_False;
}
- BYTE nLower = nSrchNum, nUpper = nSrchNum;
- BOOL bRet = FALSE;
+ sal_uInt8 nLower = nSrchNum, nUpper = nSrchNum;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pLast;
if( bNext )
@@ -1790,11 +1790,11 @@ BOOL lcl_GotoNextPrevNum( SwPosition& rPos, BOOL bNext,
if( pRule )
{
if( ::lcl_IsNumOk( nSrchNum, nLower, nUpper, bOverUpper,
- static_cast<BYTE>(pNd->GetActualListLevel()) ))
+ static_cast<sal_uInt8>(pNd->GetActualListLevel()) ))
{
rPos.nNode = aIdx;
rPos.nContent.Assign( (SwTxtNode*)pNd, 0 );
- bRet = TRUE;
+ bRet = sal_True;
break;
}
else
@@ -1825,7 +1825,7 @@ BOOL lcl_GotoNextPrevNum( SwPosition& rPos, BOOL bNext,
rPos.nNode.Assign( *pLast );
rPos.nContent.Assign( (SwTxtNode*)pLast, 0 );
}
- bRet = TRUE;
+ bRet = sal_True;
}
if( bRet )
@@ -1838,10 +1838,10 @@ BOOL lcl_GotoNextPrevNum( SwPosition& rPos, BOOL bNext,
return bRet;
}
-BOOL SwDoc::GotoNextNum( SwPosition& rPos, BOOL bOverUpper,
- BYTE* pUpper, BYTE* pLower )
+sal_Bool SwDoc::GotoNextNum( SwPosition& rPos, sal_Bool bOverUpper,
+ sal_uInt8* pUpper, sal_uInt8* pLower )
{
- return ::lcl_GotoNextPrevNum( rPos, TRUE, bOverUpper, pUpper, pLower );
+ return ::lcl_GotoNextPrevNum( rPos, sal_True, bOverUpper, pUpper, pLower );
}
// -> #i23731#
@@ -1883,7 +1883,7 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
const SwNumRule * pNumRule = pTxtNd->GetNumRule();
if (pNumRule)
{
- if ( ( pNumRule->IsOutlineRule() == ( bOutline ? TRUE : FALSE ) ) && // #115901#
+ if ( ( pNumRule->IsOutlineRule() == ( bOutline ? sal_True : sal_False ) ) && // #115901#
( ( bNum && pNumRule->Get(0).IsEnumeration()) ||
( !bNum && pNumRule->Get(0).IsItemize() ) ) ) // #i22362#, #i29560#
{
@@ -1928,25 +1928,25 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
}
// <- #i23731#
-BOOL SwDoc::GotoPrevNum( SwPosition& rPos, BOOL bOverUpper,
- BYTE* pUpper, BYTE* pLower )
+sal_Bool SwDoc::GotoPrevNum( SwPosition& rPos, sal_Bool bOverUpper,
+ sal_uInt8* pUpper, sal_uInt8* pLower )
{
- return ::lcl_GotoNextPrevNum( rPos, FALSE, bOverUpper, pUpper, pLower );
+ return ::lcl_GotoNextPrevNum( rPos, sal_False, bOverUpper, pUpper, pLower );
}
-BOOL SwDoc::NumUpDown( const SwPaM& rPam, BOOL bDown )
+sal_Bool SwDoc::NumUpDown( const SwPaM& rPam, sal_Bool bDown )
{
- ULONG nStt = rPam.GetPoint()->nNode.GetIndex(),
+ sal_uLong nStt = rPam.GetPoint()->nNode.GetIndex(),
nEnd = rPam.GetMark()->nNode.GetIndex();
if( nStt > nEnd )
{
- ULONG nTmp = nStt; nStt = nEnd; nEnd = nTmp;
+ sal_uLong nTmp = nStt; nStt = nEnd; nEnd = nTmp;
}
// -> #115901# outline nodes are promoted or demoted differently
bool bOnlyOutline = true;
bool bOnlyNonOutline = true;
- for (ULONG n = nStt; n <= nEnd; n++)
+ for (sal_uLong n = nStt; n <= nEnd; n++)
{
SwTxtNode * pTxtNd = GetNodes()[n]->GetTxtNode();
@@ -1965,7 +1965,7 @@ BOOL SwDoc::NumUpDown( const SwPaM& rPam, BOOL bDown )
}
// <- #115901#
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
char nDiff = bDown ? 1 : -1;
// ->#115901#
@@ -1979,7 +1979,7 @@ BOOL SwDoc::NumUpDown( const SwPaM& rPam, BOOL bDown )
promotable resp. demotable.
*/
- for (ULONG nTmp = nStt; nTmp <= nEnd; ++nTmp)
+ for (sal_uLong nTmp = nStt; nTmp <= nEnd; ++nTmp)
{
SwTxtNode* pTNd = GetNodes()[ nTmp ]->GetTxtNode();
@@ -1991,10 +1991,10 @@ BOOL SwDoc::NumUpDown( const SwPaM& rPam, BOOL bDown )
if (pRule)
{
- BYTE nLevel = static_cast<BYTE>(pTNd->GetActualListLevel());
+ sal_uInt8 nLevel = static_cast<sal_uInt8>(pTNd->GetActualListLevel());
if( (-1 == nDiff && 0 >= nLevel) ||
(1 == nDiff && MAXLEVEL - 1 <= nLevel))
- bRet = FALSE;
+ bRet = sal_False;
}
}
// <--
@@ -2011,7 +2011,7 @@ BOOL SwDoc::NumUpDown( const SwPaM& rPam, BOOL bDown )
String sNumRule;
- for(ULONG nTmp = nStt; nTmp <= nEnd; ++nTmp )
+ for(sal_uLong nTmp = nStt; nTmp <= nEnd; ++nTmp )
{
SwTxtNode* pTNd = GetNodes()[ nTmp ]->GetTxtNode();
@@ -2021,7 +2021,7 @@ BOOL SwDoc::NumUpDown( const SwPaM& rPam, BOOL bDown )
if (pRule)
{
- BYTE nLevel = static_cast<BYTE>(pTNd->GetActualListLevel());
+ sal_uInt8 nLevel = static_cast<sal_uInt8>(pTNd->GetActualListLevel());
nLevel = nLevel + nDiff;
pTNd->SetAttrListLevel(nLevel);
@@ -2037,12 +2037,12 @@ BOOL SwDoc::NumUpDown( const SwPaM& rPam, BOOL bDown )
return bRet;
}
-BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
+sal_Bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, sal_Bool bIsOutlMv )
{
const SwPosition *pStt = rPam.Start(), *pEnd = rPam.End();
- ULONG nStIdx = pStt->nNode.GetIndex();
- ULONG nEndIdx = pEnd->nNode.GetIndex();
+ sal_uLong nStIdx = pStt->nNode.GetIndex();
+ sal_uLong nEndIdx = pEnd->nNode.GetIndex();
// Here are some sophisticated checks whether the wished PaM will be moved or not.
// For moving outlines (bIsOutlMv) I've already done some checks, so here are two different
@@ -2062,24 +2062,24 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
{ // First is a start node
pTmp2 = pTmp1->EndOfSectionNode();
if( pTmp2->GetIndex() > nEndIdx )
- return FALSE; // Its end node is behind the moved range
+ return sal_False; // Its end node is behind the moved range
}
pTmp1 = pTmp1->StartOfSectionNode()->EndOfSectionNode();
if( pTmp1->GetIndex() <= nEndIdx )
- return FALSE; // End node inside but start node before moved range => no.
+ return sal_False; // End node inside but start node before moved range => no.
pTmp1 = GetNodes()[ nEndIdx ];
if( pTmp1->IsEndNode() )
{ // The last one is an end node
pTmp1 = pTmp1->StartOfSectionNode();
if( pTmp1->GetIndex() < nStIdx )
- return FALSE; // Its start node is before the moved range.
+ return sal_False; // Its start node is before the moved range.
}
pTmp1 = pTmp1->StartOfSectionNode();
if( pTmp1->GetIndex() >= nStIdx )
- return FALSE; // A start node which ends behind the moved area => no.
+ return sal_False; // A start node which ends behind the moved area => no.
}
- ULONG nInStIdx, nInEndIdx;
+ sal_uLong nInStIdx, nInEndIdx;
long nOffs = nOffset;
if( nOffset > 0 )
{
@@ -2090,8 +2090,8 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
else
{
//Impossible to move to negative index
- if( ULONG(abs( nOffset )) > nStIdx)
- return FALSE;
+ if( sal_uLong(abs( nOffset )) > nStIdx)
+ return sal_False;
nInEndIdx = nStIdx - 1;
nStIdx += nOffset;
@@ -2101,7 +2101,7 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
// [ nStIdx, nInEndIdx ] mit [ nInStIdx, nEndIdx ]
if( nEndIdx >= GetNodes().GetEndOfContent().GetIndex() )
- return FALSE;
+ return sal_False;
if( !bIsOutlMv )
{ // And here the restrictions for moving paragraphs other than chapters (outlines)
@@ -2112,7 +2112,7 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
pTmp1 = GetNodes()[ nStIdx ]->StartOfSectionNode();
pTmp2 = GetNodes()[ nInStIdx ]->StartOfSectionNode();
if( pTmp1 != pTmp2 )
- return FALSE; // "start" nodes in different sections
+ return sal_False; // "start" nodes in different sections
pTmp1 = GetNodes()[ nEndIdx ];
bool bIsEndNode = pTmp1->IsEndNode();
if( !pTmp1->IsStartNode() )
@@ -2132,21 +2132,21 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
}
pTmp2 = pTmp2->EndOfSectionNode();
if( pTmp1 != pTmp2 )
- return FALSE; // The "end" notes are in different sections
+ return sal_False; // The "end" notes are in different sections
}
// auf Redlining testen - darf die Selektion ueberhaupt verschoben
// werden?
if( !IsIgnoreRedline() )
{
- USHORT nRedlPos = GetRedlinePos( pStt->nNode.GetNode(), nsRedlineType_t::REDLINE_DELETE );
+ sal_uInt16 nRedlPos = GetRedlinePos( pStt->nNode.GetNode(), nsRedlineType_t::REDLINE_DELETE );
if( USHRT_MAX != nRedlPos )
{
SwPosition aStPos( *pStt ), aEndPos( *pEnd );
aStPos.nContent = 0;
SwCntntNode* pCNd = pEnd->nNode.GetNode().GetCntntNode();
aEndPos.nContent = pCNd ? pCNd->Len() : 1;
- BOOL bCheckDel = TRUE;
+ sal_Bool bCheckDel = sal_True;
// es existiert fuer den Bereich irgendein Redline-Delete-Object
for( ; nRedlPos < GetRedlineTbl().Count(); ++nRedlPos )
@@ -2168,14 +2168,14 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
case POS_INSIDE: // Pos1 liegt vollstaendig in Pos2
// ist erlaubt, aber checke dann alle nachfolgenden
// auf Ueberlappungen
- bCheckDel = FALSE;
+ bCheckDel = sal_False;
break;
case POS_OUTSIDE: // Pos2 liegt vollstaendig in Pos1
case POS_EQUAL: // Pos1 ist genauso gross wie Pos2
case POS_OVERLAP_BEFORE: // Pos1 ueberlappt Pos2 am Anfang
case POS_OVERLAP_BEHIND: // Pos1 ueberlappt Pos2 am Ende
- return FALSE;
+ return sal_False;
}
}
}
@@ -2197,7 +2197,7 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
{
// wenn der Bereich komplett im eigenen Redline liegt, kann es
// verschoben werden!
- USHORT nRedlPos = GetRedlinePos( pStt->nNode.GetNode(), nsRedlineType_t::REDLINE_INSERT );
+ sal_uInt16 nRedlPos = GetRedlinePos( pStt->nNode.GetNode(), nsRedlineType_t::REDLINE_INSERT );
if( USHRT_MAX != nRedlPos )
{
SwRedline* pTmp = GetRedlineTbl()[ nRedlPos ];
@@ -2245,7 +2245,7 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
rOrigPam.DeleteMark();
rOrigPam.GetPoint()->nNode = aIdx.GetIndex() - 1;
- BOOL bDelLastPara = !aInsPos.nNode.GetNode().IsCntntNode();
+ sal_Bool bDelLastPara = !aInsPos.nNode.GetNode().IsCntntNode();
/* #101076# When copying to a non-content node Copy will
insert a paragraph before that node and insert before
@@ -2258,7 +2258,7 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
/* aInsPos points to the non-content node. Move it to
the previous content node. */
SwPaM aInsPam(aInsPos);
- BOOL bMoved = aInsPam.Move(fnMoveBackward);
+ sal_Bool bMoved = aInsPam.Move(fnMoveBackward);
ASSERT(bMoved, "No content node found!");
if (bMoved)
@@ -2284,21 +2284,21 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
// alle die im zu loeschenden Node stehen, mussen auf den
// naechsten umgestezt werden
SwPosition* pPos;
- for( USHORT n = 0; n < GetRedlineTbl().Count(); ++n )
+ for( sal_uInt16 n = 0; n < GetRedlineTbl().Count(); ++n )
{
SwRedline* pTmp = GetRedlineTbl()[ n ];
- if( ( pPos = &pTmp->GetBound(TRUE))->nNode == aIdx )
+ if( ( pPos = &pTmp->GetBound(sal_True))->nNode == aIdx )
{
pPos->nNode++;
pPos->nContent.Assign( pPos->nNode.GetNode().GetCntntNode(),0);
}
- if( ( pPos = &pTmp->GetBound(FALSE))->nNode == aIdx )
+ if( ( pPos = &pTmp->GetBound(sal_False))->nNode == aIdx )
{
pPos->nNode++;
pPos->nContent.Assign( pPos->nNode.GetNode().GetCntntNode(),0);
}
}
- CorrRel( aIdx, aInsPos, 0, FALSE );
+ CorrRel( aIdx, aInsPos, 0, sal_False );
pCNd->JoinNext();
}
@@ -2321,8 +2321,8 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
// #101654# prevent assertion from aPam's target being deleted
// (Alternatively, one could just let aPam go out of scope, but
// that requires touching a lot of code.)
- aPam.GetBound(TRUE).nContent.Assign( NULL, 0 );
- aPam.GetBound(FALSE).nContent.Assign( NULL, 0 );
+ aPam.GetBound(sal_True).nContent.Assign( NULL, 0 );
+ aPam.GetBound(sal_False).nContent.Assign( NULL, 0 );
AppendRedline( pNewRedline, true );
@@ -2331,7 +2331,7 @@ SetRedlineMode( eOld );
EndUndo( UNDO_END, NULL );
SetModified();
- return TRUE;
+ return sal_True;
}
}
@@ -2341,7 +2341,7 @@ SetRedlineMode( eOld );
SplitRedline(aTemp);
}
- ULONG nRedlSttNd(0), nRedlEndNd(0);
+ sal_uLong nRedlSttNd(0), nRedlEndNd(0);
if( pOwnRedl )
{
const SwPosition *pRStt = pOwnRedl->Start(), *pREnd = pOwnRedl->End();
@@ -2350,7 +2350,7 @@ SetRedlineMode( eOld );
}
SwUndoMoveNum* pUndo = 0;
- ULONG nMoved = 0;
+ sal_uLong nMoved = 0;
if( DoesUndo() )
{
pUndo = new SwUndoMoveNum( rPam, nOffset, bIsOutlMv );
@@ -2389,12 +2389,12 @@ SetRedlineMode( eOld );
}
SetModified();
- return TRUE;
+ return sal_True;
}
-BOOL SwDoc::NumOrNoNum( const SwNodeIndex& rIdx, BOOL bDel )
+sal_Bool SwDoc::NumOrNoNum( const SwNodeIndex& rIdx, sal_Bool bDel )
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwTxtNode * pTxtNd = rIdx.GetNode().GetTxtNode();
if (pTxtNd && pTxtNd->GetNumRule() != NULL &&
@@ -2402,13 +2402,13 @@ BOOL SwDoc::NumOrNoNum( const SwNodeIndex& rIdx, BOOL bDel )
{
if ( !pTxtNd->IsCountedInList() == !bDel)
{
- BOOL bOldNum = bDel; // == pTxtNd->IsCounted();
- BOOL bNewNum = bDel ? FALSE : TRUE;
+ sal_Bool bOldNum = bDel; // == pTxtNd->IsCounted();
+ sal_Bool bNewNum = bDel ? sal_False : sal_True;
pTxtNd->SetCountedInList(bNewNum ? true : false);
SetModified();
- bResult = TRUE;
+ bResult = sal_True;
if (DoesUndo())
{
@@ -2418,7 +2418,7 @@ BOOL SwDoc::NumOrNoNum( const SwNodeIndex& rIdx, BOOL bDel )
AppendUndo(pUndo);
}
}
- else if (bDel && pTxtNd->GetNumRule(FALSE) &&
+ else if (bDel && pTxtNd->GetNumRule(sal_False) &&
pTxtNd->GetActualListLevel() >= 0 &&
pTxtNd->GetActualListLevel() < MAXLEVEL)
{
@@ -2426,7 +2426,7 @@ BOOL SwDoc::NumOrNoNum( const SwNodeIndex& rIdx, BOOL bDel )
DelNumRules(aPam);
- bResult = TRUE;
+ bResult = sal_True;
}
}
@@ -2449,9 +2449,9 @@ SwNumRule* SwDoc::GetCurrNumRule( const SwPosition& rPos ) const
return pRet;
}
-USHORT SwDoc::FindNumRule( const String& rName ) const
+sal_uInt16 SwDoc::FindNumRule( const String& rName ) const
{
- for( USHORT n = pNumRuleTbl->Count(); n; )
+ for( sal_uInt16 n = pNumRuleTbl->Count(); n; )
if( (*pNumRuleTbl)[ --n ]->GetName() == rName )
return n;
@@ -2466,7 +2466,7 @@ SwNumRule* SwDoc::FindNumRulePtr( const String& rName ) const
if ( !pResult )
{
- for (USHORT n = 0; n < pNumRuleTbl->Count(); ++n)
+ for (sal_uInt16 n = 0; n < pNumRuleTbl->Count(); ++n)
{
if ((*pNumRuleTbl)[n]->GetName() == rName)
{
@@ -2493,9 +2493,9 @@ void SwDoc::AddNumRule(SwNumRule * pRule)
}
// --> OD 2008-02-11 #newlistlevelattrs#
-USHORT SwDoc::MakeNumRule( const String &rName,
+sal_uInt16 SwDoc::MakeNumRule( const String &rName,
const SwNumRule* pCpy,
- BOOL bBroadcast,
+ sal_Bool bBroadcast,
const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode )
{
SwNumRule* pNew;
@@ -2525,7 +2525,7 @@ USHORT SwDoc::MakeNumRule( const String &rName,
// <--
}
- USHORT nRet = pNumRuleTbl->Count();
+ sal_uInt16 nRet = pNumRuleTbl->Count();
AddNumRule(pNew); // #i36749#
@@ -2543,7 +2543,7 @@ USHORT SwDoc::MakeNumRule( const String &rName,
return nRet;
}
-String SwDoc::GetUniqueNumRuleName( const String* pChkStr, BOOL bAutoNum ) const
+String SwDoc::GetUniqueNumRuleName( const String* pChkStr, sal_Bool bAutoNum ) const
{
String aName;
if( bAutoNum )
@@ -2562,8 +2562,8 @@ String SwDoc::GetUniqueNumRuleName( const String* pChkStr, BOOL bAutoNum ) const
aName = SW_RESSTR( STR_NUMRULE_DEFNAME );
}
- USHORT nNum(0), nTmp, nFlagSize = ( pNumRuleTbl->Count() / 8 ) +2;
- BYTE* pSetFlags = new BYTE[ nFlagSize ];
+ sal_uInt16 nNum(0), nTmp, nFlagSize = ( pNumRuleTbl->Count() / 8 ) +2;
+ sal_uInt8* pSetFlags = new sal_uInt8[ nFlagSize ];
memset( pSetFlags, 0, nFlagSize );
xub_StrLen nNmLen = aName.Len();
@@ -2581,7 +2581,7 @@ String SwDoc::GetUniqueNumRuleName( const String* pChkStr, BOOL bAutoNum ) const
}
const SwNumRule* pNumRule;
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < pNumRuleTbl->Count(); ++n )
if( 0 != ( pNumRule = (*pNumRuleTbl)[ n ] ) )
@@ -2590,7 +2590,7 @@ String SwDoc::GetUniqueNumRuleName( const String* pChkStr, BOOL bAutoNum ) const
if( rNm.Match( aName ) == nNmLen )
{
// Nummer bestimmen und das Flag setzen
- nNum = (USHORT)rNm.Copy( nNmLen ).ToInt32();
+ nNum = (sal_uInt16)rNm.Copy( nNmLen ).ToInt32();
if( nNum-- && nNum < pNumRuleTbl->Count() )
pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 ));
}
@@ -2622,7 +2622,7 @@ String SwDoc::GetUniqueNumRuleName( const String* pChkStr, BOOL bAutoNum ) const
void SwDoc::UpdateNumRule()
{
const SwNumRuleTbl& rNmTbl = GetNumRuleTbl();
- for( USHORT n = 0; n < rNmTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rNmTbl.Count(); ++n )
if( rNmTbl[ n ]->IsInvalidRule() )
rNmTbl[ n ]->Validate();
}
@@ -2630,7 +2630,7 @@ void SwDoc::UpdateNumRule()
// --> OD 2008-04-02 #refactorlists#
void SwDoc::MarkListLevel( const String& sListId,
const int nListLevel,
- const BOOL bValue )
+ const sal_Bool bValue )
{
SwList* pList = getListByName( sListId );
@@ -2642,7 +2642,7 @@ void SwDoc::MarkListLevel( const String& sListId,
void SwDoc::MarkListLevel( SwList& rList,
const int nListLevel,
- const BOOL bValue )
+ const sal_Bool bValue )
{
// Set new marked list level and notify all affected nodes of the changed mark.
rList.MarkListLevel( nListLevel, bValue );
@@ -2651,9 +2651,9 @@ void SwDoc::MarkListLevel( SwList& rList,
// <--
// #i23726#
-BOOL SwDoc::IsFirstOfNumRule(SwPosition & rPos)
+sal_Bool SwDoc::IsFirstOfNumRule(SwPosition & rPos)
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwTxtNode * pTxtNode = rPos.nNode.GetNode().GetTxtNode();
if (pTxtNode)
@@ -2758,7 +2758,7 @@ sal_Int32 SwDoc::getOutlineNodesCount() const
int SwDoc::getOutlineLevel( const sal_Int32 nIdx ) const
{
- return GetNodes().GetOutLineNds()[ static_cast<USHORT>(nIdx) ]->
+ return GetNodes().GetOutLineNds()[ static_cast<sal_uInt16>(nIdx) ]->
// GetTxtNode()->GetOutlineLevel(); //#outline level,zhaojianwei
GetTxtNode()->GetAttrOutlineLevel()-1; //<-end,zhaojianwei
}
@@ -2767,14 +2767,14 @@ String SwDoc::getOutlineText( const sal_Int32 nIdx,
const bool bWithNumber,
const bool bWithSpacesForLevel ) const
{
- return GetNodes().GetOutLineNds()[ static_cast<USHORT>(nIdx) ]->
+ return GetNodes().GetOutLineNds()[ static_cast<sal_uInt16>(nIdx) ]->
GetTxtNode()->GetExpandTxt( 0, STRING_LEN, bWithNumber,
bWithNumber, bWithSpacesForLevel );
}
SwTxtNode* SwDoc::getOutlineNode( const sal_Int32 nIdx ) const
{
- return GetNodes().GetOutLineNds()[ static_cast<USHORT>(nIdx) ]->GetTxtNode();
+ return GetNodes().GetOutLineNds()[ static_cast<sal_uInt16>(nIdx) ]->GetTxtNode();
}
void SwDoc::getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOutlineNodeList ) const
@@ -2782,8 +2782,8 @@ void SwDoc::getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOu
orOutlineNodeList.clear();
orOutlineNodeList.reserve( getOutlineNodesCount() );
- const USHORT nOutlCount( static_cast<USHORT>(getOutlineNodesCount()) );
- for ( USHORT i = 0; i < nOutlCount; ++i )
+ const sal_uInt16 nOutlCount( static_cast<sal_uInt16>(getOutlineNodesCount()) );
+ for ( sal_uInt16 i = 0; i < nOutlCount; ++i )
{
orOutlineNodeList.push_back(
GetNodes().GetOutLineNds()[i]->GetTxtNode() );
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 9997eabd79c3..a12d2daa60b1 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -106,10 +106,10 @@ TYPEINIT1(SwRedlineHint, SfxHint);
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
// verify valid redline positions
- for( USHORT i = 0; i < rTbl.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rTbl.Count(); ++i )
lcl_CheckPam( rTbl[ i ] );
- for( USHORT j = 0; j < rTbl.Count(); ++j )
+ for( sal_uInt16 j = 0; j < rTbl.Count(); ++j )
{
// check for empty redlines
DBG_ASSERT( ( *(rTbl[j]->GetPoint()) != *(rTbl[j]->GetMark()) ) ||
@@ -118,7 +118,7 @@ TYPEINIT1(SwRedlineHint, SfxHint);
}
// verify proper redline sorting
- for( USHORT n = 1; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 1; n < rTbl.Count(); ++n )
{
const SwRedline* pPrev = rTbl[ n-1 ];
const SwRedline* pCurrent = rTbl[ n ];
@@ -137,11 +137,11 @@ TYPEINIT1(SwRedlineHint, SfxHint);
void lcl_DebugRedline( const SwDoc* pDoc )
{
- static USHORT nWatch = 0;
+ static sal_uInt16 nWatch = 0;
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
- USHORT nDummy = 0;
+ sal_uInt16 nDummy = 0;
const SwRedline* pCurrent = rTbl[ n ];
const SwRedline* pNext = n+1 < rTbl.Count() ? rTbl[ n+1 ] : 0;
if( pCurrent == pNext )
@@ -172,7 +172,7 @@ void SwDoc::SetRedlineMode( RedlineMode_t eMode )
bool bSaveInXMLImportFlag = IsInXMLImport();
SetInXMLImport( false );
// und dann alles verstecken, anzeigen
- void (SwRedline::*pFnc)( USHORT ) = 0;
+ void (SwRedline::*pFnc)( sal_uInt16 ) = 0;
switch( nsRedlineMode_t::REDLINE_SHOW_MASK & eMode )
{
@@ -195,8 +195,8 @@ void SwDoc::SetRedlineMode( RedlineMode_t eMode )
_CHECK_REDLINE( this )
if( pFnc )
- for( USHORT nLoop = 1; nLoop <= 2; ++nLoop )
- for( USHORT i = 0; i < pRedlineTbl->Count(); ++i )
+ for( sal_uInt16 nLoop = 1; nLoop <= 2; ++nLoop )
+ for( sal_uInt16 i = 0; i < pRedlineTbl->Count(); ++i )
((*pRedlineTbl)[ i ]->*pFnc)( nLoop );
_CHECK_REDLINE( this )
SetInXMLImport( bSaveInXMLImportFlag );
@@ -371,10 +371,10 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
( pNewRedl->GetContentIdx() == NULL ) )
{ // Do not insert empty redlines
delete pNewRedl;
- return FALSE;
+ return sal_False;
}
- BOOL bCompress = FALSE;
- USHORT n = 0;
+ sal_Bool bCompress = sal_False;
+ sal_uInt16 n = 0;
// zur StartPos das erste Redline suchen
if( !GetRedline( *pStt, &n ) && n )
--n;
@@ -477,7 +477,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
if( bDelete )
{
delete pNewRedl, pNewRedl = 0;
- bCompress = TRUE;
+ bCompress = sal_True;
}
}
else if( POS_INSIDE == eCmpPos )
@@ -681,7 +681,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
case POS_INSIDE:
case POS_EQUAL:
delete pNewRedl, pNewRedl = 0;
- bCompress = TRUE;
+ bCompress = sal_True;
break;
case POS_OVERLAP_BEFORE:
@@ -734,7 +734,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
// delete current (below), and restart process with
// previous
- USHORT nToBeDeleted = n;
+ sal_uInt16 nToBeDeleted = n;
bDec = true;
// #107359# Do it again, Sam!
@@ -775,7 +775,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
switch( eCmpPos )
{
case POS_EQUAL:
- bCompress = TRUE;
+ bCompress = sal_True;
pRedlineTbl->DeleteAndDestroy( n );
bDec = true;
// kein break!
@@ -802,7 +802,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
else
DeleteAndJoin( *pNewRedl );
- bCompress = TRUE;
+ bCompress = sal_True;
}
delete pNewRedl, pNewRedl = 0;
break;
@@ -817,7 +817,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
{
pRedlineTbl->SavePtrInArr( pNewRedl );
DeleteAndJoin( *pRedl );
- USHORT nFnd = pRedlineTbl->GetPos(pNewRedl );
+ sal_uInt16 nFnd = pRedlineTbl->GetPos(pNewRedl );
if( USHRT_MAX != nFnd )
pRedlineTbl->Remove( nFnd );
else
@@ -847,7 +847,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
// behandelt wird, erstmal temp. einfuegen
pRedlineTbl->SavePtrInArr( pNewRedl );
DeleteAndJoin( aPam );
- USHORT nFnd = pRedlineTbl->GetPos(pNewRedl );
+ sal_uInt16 nFnd = pRedlineTbl->GetPos(pNewRedl );
if( USHRT_MAX != nFnd )
pRedlineTbl->Remove( nFnd );
else
@@ -876,7 +876,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
// behandelt wird, erstmal temp. einfuegen
pRedlineTbl->SavePtrInArr( pNewRedl );
DeleteAndJoin( aPam );
- USHORT nFnd = pRedlineTbl->GetPos(pNewRedl );
+ sal_uInt16 nFnd = pRedlineTbl->GetPos(pNewRedl );
if( USHRT_MAX != nFnd )
pRedlineTbl->Remove( nFnd );
else
@@ -908,7 +908,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
delete pNewRedl, pNewRedl = 0;
if( IsHideChanges( eRedlineMode ))
pRedl->Hide();
- bCompress = TRUE;
+ bCompress = sal_True;
}
break;
@@ -921,7 +921,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
if (*pStt != *pEnd)
// <--
{
- pNewRedl->PushData( *pRedl, FALSE );
+ pNewRedl->PushData( *pRedl, sal_False );
pRedl->SetStart( *pEnd, pRStt );
// re-insert
pRedlineTbl->Remove( n );
@@ -931,7 +931,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
}
else
{
- pNewRedl->PushData( *pRedl, FALSE );
+ pNewRedl->PushData( *pRedl, sal_False );
if( *pREnd != *pEnd )
{
pNew = new SwRedline( *pRedl );
@@ -959,7 +959,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
pNew->SetEnd( *pRStt );
pNewRedl->SetStart( *pREnd, pStt );
}
- bCompress = TRUE;
+ bCompress = sal_True;
}
break;
@@ -1286,7 +1286,7 @@ void SwDoc::CompressRedlines()
{
_CHECK_REDLINE( this )
- void (SwRedline::*pFnc)(USHORT) = 0;
+ void (SwRedline::*pFnc)(sal_uInt16) = 0;
switch( nsRedlineMode_t::REDLINE_SHOW_MASK & eRedlineMode )
{
case nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE:
@@ -1298,7 +1298,7 @@ void SwDoc::CompressRedlines()
}
// versuche gleiche zusammenzufassen
- for( USHORT n = 1; n < pRedlineTbl->Count(); ++n )
+ for( sal_uInt16 n = 1; n < pRedlineTbl->Count(); ++n )
{
SwRedline* pPrev = (*pRedlineTbl)[ n-1 ],
* pCur = (*pRedlineTbl)[ n ];
@@ -1329,8 +1329,8 @@ void SwDoc::CompressRedlines()
bool SwDoc::SplitRedline( const SwPaM& rRange )
{
- BOOL bChg = FALSE;
- USHORT n = 0;
+ sal_Bool bChg = sal_False;
+ sal_uInt16 n = 0;
const SwPosition* pStt = rRange.Start(),
* pEnd = pStt == rRange.GetPoint() ? rRange.GetMark()
: rRange.GetPoint();
@@ -1344,7 +1344,7 @@ bool SwDoc::SplitRedline( const SwPaM& rRange )
if( *pTStt <= *pStt && *pStt <= *pTEnd &&
*pTStt <= *pEnd && *pEnd <= *pTEnd )
{
- bChg = TRUE;
+ bChg = sal_True;
int nn = 0;
if( *pStt == *pTStt )
nn += 1;
@@ -1390,13 +1390,13 @@ bool SwDoc::SplitRedline( const SwPaM& rRange )
}
bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
- USHORT nDelType )
+ sal_uInt16 nDelType )
{
if( nsRedlineMode_t::REDLINE_IGNOREDELETE_REDLINES & eRedlineMode ||
!rRange.HasMark() || *rRange.GetMark() == *rRange.GetPoint() )
- return FALSE;
+ return sal_False;
- BOOL bChg = FALSE;
+ sal_Bool bChg = sal_False;
if( bSaveInUndo && DoesUndo() )
{
@@ -1413,7 +1413,7 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
const SwPosition* pStt = rRange.Start(),
* pEnd = pStt == rRange.GetPoint() ? rRange.GetMark()
: rRange.GetPoint();
- USHORT n = 0;
+ sal_uInt16 n = 0;
GetRedline( *pStt, &n );
for( ; n < pRedlineTbl->Count() ; ++n )
{
@@ -1424,17 +1424,17 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
SwPosition* pRStt = pRedl->Start(),
* pREnd = pRStt == pRedl->GetPoint() ? pRedl->GetMark()
: pRedl->GetPoint();
- BOOL bDel = FALSE;
+ sal_Bool bDel = sal_False;
switch( ComparePosition( *pStt, *pEnd, *pRStt, *pREnd ) )
{
case POS_EQUAL:
case POS_OUTSIDE:
- bDel = TRUE;
+ bDel = sal_True;
break;
case POS_OVERLAP_BEFORE:
if( *pEnd == *pREnd )
- bDel = TRUE;
+ bDel = sal_True;
else
{
pRedl->InvalidateRange();
@@ -1448,7 +1448,7 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
case POS_OVERLAP_BEHIND:
if( *pStt == *pRStt )
- bDel = TRUE;
+ bDel = sal_True;
else
{
pRedl->InvalidateRange();
@@ -1511,7 +1511,7 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
{
pRedl->InvalidateRange();
pRedlineTbl->DeleteAndDestroy( n-- );
- bChg = TRUE;
+ bChg = sal_True;
}
}
@@ -1522,19 +1522,19 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
}
bool SwDoc::DeleteRedline( const SwStartNode& rNode, bool bSaveInUndo,
- USHORT nDelType )
+ sal_uInt16 nDelType )
{
SwPaM aTemp(*rNode.EndOfSectionNode(), rNode);
return DeleteRedline(aTemp, bSaveInUndo, nDelType);
}
-USHORT SwDoc::GetRedlinePos( const SwNode& rNd, USHORT nType ) const
+sal_uInt16 SwDoc::GetRedlinePos( const SwNode& rNd, sal_uInt16 nType ) const
{
- const ULONG nNdIdx = rNd.GetIndex();
- for( USHORT n = 0; n < pRedlineTbl->Count() ; ++n )
+ const sal_uLong nNdIdx = rNd.GetIndex();
+ for( sal_uInt16 n = 0; n < pRedlineTbl->Count() ; ++n )
{
const SwRedline* pTmp = (*pRedlineTbl)[ n ];
- ULONG nPt = pTmp->GetPoint()->nNode.GetIndex(),
+ sal_uLong nPt = pTmp->GetPoint()->nNode.GetIndex(),
nMk = pTmp->GetMark()->nNode.GetIndex();
if( nPt < nMk ) { long nTmp = nMk; nMk = nPt; nPt = nTmp; }
@@ -1549,9 +1549,9 @@ USHORT SwDoc::GetRedlinePos( const SwNode& rNd, USHORT nType ) const
}
const SwRedline* SwDoc::GetRedline( const SwPosition& rPos,
- USHORT* pFndPos ) const
+ sal_uInt16* pFndPos ) const
{
- USHORT nO = pRedlineTbl->Count(), nM, nU = 0;
+ sal_uInt16 nO = pRedlineTbl->Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
@@ -1596,17 +1596,17 @@ const SwRedline* SwDoc::GetRedline( const SwPosition& rPos,
return 0;
}
-typedef BOOL (*Fn_AcceptReject)( SwRedlineTbl& rArr, USHORT& rPos,
- BOOL bCallDelete,
+typedef sal_Bool (*Fn_AcceptReject)( SwRedlineTbl& rArr, sal_uInt16& rPos,
+ sal_Bool bCallDelete,
const SwPosition* pSttRng,
const SwPosition* pEndRng);
-BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
- BOOL bCallDelete,
+sal_Bool lcl_AcceptRedline( SwRedlineTbl& rArr, sal_uInt16& rPos,
+ sal_Bool bCallDelete,
const SwPosition* pSttRng = 0,
const SwPosition* pEndRng = 0 )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SwRedline* pRedl = rArr[ rPos ];
SwPosition *pRStt = 0, *pREnd = 0;
SwComparePosition eCmp = POS_OUTSIDE;
@@ -1624,7 +1624,7 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
case nsRedlineType_t::REDLINE_INSERT:
case nsRedlineType_t::REDLINE_FORMAT:
{
- BOOL bCheck = FALSE, bReplace = FALSE;
+ sal_Bool bCheck = sal_False, bReplace = sal_False;
switch( eCmp )
{
case POS_INSIDE:
@@ -1640,18 +1640,18 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
rArr.Insert( pNew ); ++rPos;
}
pRedl->SetEnd( *pSttRng, pREnd );
- bCheck = TRUE;
+ bCheck = sal_True;
}
break;
case POS_OVERLAP_BEFORE:
pRedl->SetStart( *pEndRng, pRStt );
- bReplace = TRUE;
+ bReplace = sal_True;
break;
case POS_OVERLAP_BEHIND:
pRedl->SetEnd( *pSttRng, pREnd );
- bCheck = TRUE;
+ bCheck = sal_True;
break;
case POS_OUTSIDE:
@@ -1660,7 +1660,7 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
if( bReplace || ( bCheck && !pRedl->HasValidRange() ))
@@ -1675,7 +1675,7 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
{
SwDoc& rDoc = *pRedl->GetDoc();
const SwPosition *pDelStt = 0, *pDelEnd = 0;
- BOOL bDelRedl = FALSE;
+ sal_Bool bDelRedl = sal_False;
switch( eCmp )
{
case POS_INSIDE:
@@ -1705,7 +1705,7 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
case POS_EQUAL:
{
rArr.Remove( rPos-- );
- bDelRedl = TRUE;
+ bDelRedl = sal_True;
if( bCallDelete )
{
pDelStt = pRedl->Start();
@@ -1714,7 +1714,7 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
}
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
if( pDelStt && pDelEnd )
@@ -1737,8 +1737,8 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
if( pCSttNd && !pCEndNd )
{
- aPam.GetBound( TRUE ).nContent.Assign( 0, 0 );
- aPam.GetBound( FALSE ).nContent.Assign( 0, 0 );
+ aPam.GetBound( sal_True ).nContent.Assign( 0, 0 );
+ aPam.GetBound( sal_False ).nContent.Assign( 0, 0 );
aPam.DeleteMark();
rDoc.DelFullPara( aPam );
}
@@ -1755,17 +1755,17 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
-BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
- BOOL bCallDelete,
+sal_Bool lcl_RejectRedline( SwRedlineTbl& rArr, sal_uInt16& rPos,
+ sal_Bool bCallDelete,
const SwPosition* pSttRng = 0,
const SwPosition* pEndRng = 0 )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SwRedline* pRedl = rArr[ rPos ];
SwPosition *pRStt = 0, *pREnd = 0;
SwComparePosition eCmp = POS_OUTSIDE;
@@ -1784,7 +1784,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
{
SwDoc& rDoc = *pRedl->GetDoc();
const SwPosition *pDelStt = 0, *pDelEnd = 0;
- BOOL bDelRedl = FALSE;
+ sal_Bool bDelRedl = sal_False;
switch( eCmp )
{
case POS_INSIDE:
@@ -1814,7 +1814,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
{
// dann den Bereich wieder loeschen
rArr.Remove( rPos-- );
- bDelRedl = TRUE;
+ bDelRedl = sal_True;
if( bCallDelete )
{
pDelStt = pRedl->Start();
@@ -1824,7 +1824,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
if( pDelStt && pDelEnd )
{
@@ -1847,8 +1847,8 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
if( pCSttNd && !pCEndNd )
{
- aPam.GetBound( TRUE ).nContent.Assign( 0, 0 );
- aPam.GetBound( FALSE ).nContent.Assign( 0, 0 );
+ aPam.GetBound( sal_True ).nContent.Assign( 0, 0 );
+ aPam.GetBound( sal_False ).nContent.Assign( 0, 0 );
aPam.DeleteMark();
rDoc.DelFullPara( aPam );
}
@@ -1862,7 +1862,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
case nsRedlineType_t::REDLINE_DELETE:
{
SwRedline* pNew = 0;
- BOOL bCheck = FALSE, bReplace = FALSE;
+ sal_Bool bCheck = sal_False, bReplace = sal_False;
switch( eCmp )
{
@@ -1876,7 +1876,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
if( *pSttRng == *pRStt )
{
pRedl->SetStart( *pEndRng, pRStt );
- bReplace = TRUE;
+ bReplace = sal_True;
if( pNew )
pNew->SetEnd( *pEndRng );
}
@@ -1893,7 +1893,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
}
pRedl->SetEnd( *pSttRng, pREnd );
- bCheck = TRUE;
+ bCheck = sal_True;
if( pNew )
pNew->SetStart( *pSttRng );
}
@@ -1907,7 +1907,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
pNew->PopData();
}
pRedl->SetStart( *pEndRng, pRStt );
- bReplace = TRUE;
+ bReplace = sal_True;
if( pNew )
pNew->SetEnd( *pEndRng );
break;
@@ -1919,7 +1919,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
pNew->PopData();
}
pRedl->SetEnd( *pSttRng, pREnd );
- bCheck = TRUE;
+ bCheck = sal_True;
if( pNew )
pNew->SetStart( *pSttRng );
break;
@@ -1932,7 +1932,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
if( pNew )
@@ -1959,15 +1959,15 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
const SwRedline* lcl_FindCurrRedline( const SwPosition& rSttPos,
- USHORT& rPos,
- BOOL bNext = TRUE )
+ sal_uInt16& rPos,
+ sal_Bool bNext = sal_True )
{
const SwRedline* pFnd = 0;
const SwRedlineTbl& rArr = rSttPos.nNode.GetNode().GetDoc()->GetRedlineTbl();
@@ -1996,16 +1996,16 @@ const SwRedline* lcl_FindCurrRedline( const SwPosition& rSttPos,
// #111827#
int lcl_AcceptRejectRedl( Fn_AcceptReject fn_AcceptReject,
- SwRedlineTbl& rArr, BOOL bCallDelete,
+ SwRedlineTbl& rArr, sal_Bool bCallDelete,
const SwPaM& rPam)
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
int nCount = 0; // #111827#
const SwPosition* pStt = rPam.Start(),
* pEnd = pStt == rPam.GetPoint() ? rPam.GetMark()
: rPam.GetPoint();
- const SwRedline* pFnd = lcl_FindCurrRedline( *pStt, n, TRUE );
+ const SwRedline* pFnd = lcl_FindCurrRedline( *pStt, n, sal_True );
if( pFnd && // neu ein Teil davon?
( *pFnd->Start() != *pStt || *pFnd->End() > *pEnd ))
{
@@ -2077,9 +2077,9 @@ void lcl_AdjustRedlineRange( SwPaM& rPam )
}
-bool SwDoc::AcceptRedline( USHORT nPos, bool bCallDelete )
+bool SwDoc::AcceptRedline( sal_uInt16 nPos, bool bCallDelete )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// aufjedenfall auf sichtbar umschalten
if( (nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) !=
@@ -2099,7 +2099,7 @@ bool SwDoc::AcceptRedline( USHORT nPos, bool bCallDelete )
}
int nLoopCnt = 2;
- USHORT nSeqNo = pTmp->GetSeqNo();
+ sal_uInt16 nSeqNo = pTmp->GetSeqNo();
do {
@@ -2112,7 +2112,7 @@ bool SwDoc::AcceptRedline( USHORT nPos, bool bCallDelete )
{
if( USHRT_MAX == nPos )
nPos = 0;
- USHORT nFndPos = 2 == nLoopCnt
+ sal_uInt16 nFndPos = 2 == nLoopCnt
? pRedlineTbl->FindNextSeqNo( nSeqNo, nPos )
: pRedlineTbl->FindPrevSeqNo( nSeqNo, nPos );
if( USHRT_MAX != nFndPos || ( 0 != ( --nLoopCnt ) &&
@@ -2185,9 +2185,9 @@ bool SwDoc::AcceptRedline( const SwPaM& rPam, bool bCallDelete )
return nRet != 0;
}
-bool SwDoc::RejectRedline( USHORT nPos, bool bCallDelete )
+bool SwDoc::RejectRedline( sal_uInt16 nPos, bool bCallDelete )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// aufjedenfall auf sichtbar umschalten
if( (nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) !=
@@ -2207,7 +2207,7 @@ bool SwDoc::RejectRedline( USHORT nPos, bool bCallDelete )
}
int nLoopCnt = 2;
- USHORT nSeqNo = pTmp->GetSeqNo();
+ sal_uInt16 nSeqNo = pTmp->GetSeqNo();
do {
@@ -2220,7 +2220,7 @@ bool SwDoc::RejectRedline( USHORT nPos, bool bCallDelete )
{
if( USHRT_MAX == nPos )
nPos = 0;
- USHORT nFndPos = 2 == nLoopCnt
+ sal_uInt16 nFndPos = 2 == nLoopCnt
? pRedlineTbl->FindNextSeqNo( nSeqNo, nPos )
: pRedlineTbl->FindPrevSeqNo( nSeqNo, nPos );
if( USHRT_MAX != nFndPos || ( 0 != ( --nLoopCnt ) &&
@@ -2301,12 +2301,12 @@ const SwRedline* SwDoc::SelNextRedline( SwPaM& rPam ) const
SwPosition& rSttPos = *rPam.GetPoint();
SwPosition aSavePos( rSttPos );
- BOOL bRestart;
+ sal_Bool bRestart;
// sollte die StartPos auf dem letzen gueligen ContentNode stehen,
// dann aufjedenfall das naechste Redline nehmen
- USHORT n = 0;
- const SwRedline* pFnd = lcl_FindCurrRedline( rSttPos, n, TRUE );
+ sal_uInt16 n = 0;
+ const SwRedline* pFnd = lcl_FindCurrRedline( rSttPos, n, sal_True );
if( pFnd )
{
const SwPosition* pEnd = pFnd->End();
@@ -2323,7 +2323,7 @@ const SwRedline* SwDoc::SelNextRedline( SwPaM& rPam ) const
}
do {
- bRestart = FALSE;
+ bRestart = sal_False;
for( ; !pFnd && n < pRedlineTbl->Count(); ++n )
{
@@ -2395,7 +2395,7 @@ const SwRedline* SwDoc::SelNextRedline( SwPaM& rPam ) const
{
if( n < pRedlineTbl->Count() )
{
- bRestart = TRUE;
+ bRestart = sal_True;
*rPam.GetPoint() = *pSaveFnd->End();
}
else
@@ -2418,12 +2418,12 @@ const SwRedline* SwDoc::SelPrevRedline( SwPaM& rPam ) const
SwPosition& rSttPos = *rPam.GetPoint();
SwPosition aSavePos( rSttPos );
- BOOL bRestart;
+ sal_Bool bRestart;
// sollte die StartPos auf dem ersten gueligen ContentNode stehen,
// dann aufjedenfall das vorherige Redline nehmen
- USHORT n = 0;
- const SwRedline* pFnd = lcl_FindCurrRedline( rSttPos, n, FALSE );
+ sal_uInt16 n = 0;
+ const SwRedline* pFnd = lcl_FindCurrRedline( rSttPos, n, sal_False );
if( pFnd )
{
const SwPosition* pStt = pFnd->Start();
@@ -2440,7 +2440,7 @@ const SwRedline* SwDoc::SelPrevRedline( SwPaM& rPam ) const
}
do {
- bRestart = FALSE;
+ bRestart = sal_False;
while( !pFnd && 0 < n )
{
@@ -2514,7 +2514,7 @@ const SwRedline* SwDoc::SelPrevRedline( SwPaM& rPam ) const
{
if( n )
{
- bRestart = TRUE;
+ bRestart = sal_True;
*rPam.GetPoint() = *pSaveFnd->Start();
}
else
@@ -2533,16 +2533,16 @@ const SwRedline* SwDoc::SelPrevRedline( SwPaM& rPam ) const
// Kommentar am Redline setzen
bool SwDoc::SetRedlineComment( const SwPaM& rPaM, const String& rS )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwPosition* pStt = rPaM.Start(),
* pEnd = pStt == rPaM.GetPoint() ? rPaM.GetMark()
: rPaM.GetPoint();
- USHORT n = 0;
- if( lcl_FindCurrRedline( *pStt, n, TRUE ) )
+ sal_uInt16 n = 0;
+ if( lcl_FindCurrRedline( *pStt, n, sal_True ) )
{
for( ; n < pRedlineTbl->Count(); ++n )
{
- bRet = TRUE;
+ bRet = sal_True;
SwRedline* pTmp = (*pRedlineTbl)[ n ];
if( pStt != pEnd && *pTmp->Start() > *pEnd )
break;
@@ -2559,13 +2559,13 @@ bool SwDoc::SetRedlineComment( const SwPaM& rPaM, const String& rS )
}
// legt gebenenfalls einen neuen Author an
-USHORT SwDoc::GetRedlineAuthor()
+sal_uInt16 SwDoc::GetRedlineAuthor()
{
return SW_MOD()->GetRedlineAuthor();
}
// fuer die Reader usw. - neuen Author in die Tabelle eintragen
-USHORT SwDoc::InsertRedlineAuthor( const String& rNew )
+sal_uInt16 SwDoc::InsertRedlineAuthor( const String& rNew )
{
return SW_MOD()->InsertRedlineAuthor(rNew);
}
@@ -2573,7 +2573,7 @@ USHORT SwDoc::InsertRedlineAuthor( const String& rNew )
void SwDoc::UpdateRedlineAttr()
{
const SwRedlineTbl& rTbl = GetRedlineTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
SwRedline* pRedl = rTbl[ n ];
if( pRedl->IsVisible() )
@@ -2584,7 +2584,7 @@ void SwDoc::UpdateRedlineAttr()
// setze Kommentar-Text fuers Redline, das dann per AppendRedline
// hereinkommt. Wird vom Autoformat benutzt. 0-Pointer setzt den Modus
// wieder zurueck. Pointer wird nicht kopiert, muss also gueltig bleiben!
-void SwDoc::SetAutoFmtRedlineComment( const String* pTxt, USHORT nSeqNo )
+void SwDoc::SetAutoFmtRedlineComment( const String* pTxt, sal_uInt16 nSeqNo )
{
mbIsAutoFmtRedline = 0 != pTxt;
if( pTxt )
@@ -2609,9 +2609,9 @@ void SwDoc::SetRedlinePassword(
/* */
-BOOL SwRedlineTbl::Insert( SwRedlinePtr& p, BOOL bIns )
+sal_Bool SwRedlineTbl::Insert( SwRedlinePtr& p, sal_Bool bIns )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( p->HasValidRange() )
{
bRet = _SwRedlineTbl::Insert( p );
@@ -2626,9 +2626,9 @@ BOOL SwRedlineTbl::Insert( SwRedlinePtr& p, BOOL bIns )
return bRet;
}
-BOOL SwRedlineTbl::Insert( SwRedlinePtr& p, USHORT& rP, BOOL bIns )
+sal_Bool SwRedlineTbl::Insert( SwRedlinePtr& p, sal_uInt16& rP, sal_Bool bIns )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( p->HasValidRange() )
{
bRet = _SwRedlineTbl::Insert( p, rP );
@@ -2643,10 +2643,10 @@ BOOL SwRedlineTbl::Insert( SwRedlinePtr& p, USHORT& rP, BOOL bIns )
return bRet;
}
-BOOL SwRedlineTbl::InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos )
+sal_Bool SwRedlineTbl::InsertWithValidRanges( SwRedlinePtr& p, sal_uInt16* pInsPos )
{
// erzeuge aus den Selektion gueltige "Teilbereiche".
- BOOL bAnyIns = FALSE;
+ sal_Bool bAnyIns = sal_False;
SwPosition* pStt = p->Start(),
* pEnd = pStt == p->GetPoint() ? p->GetMark() : p->GetPoint();
SwPosition aNewStt( *pStt );
@@ -2663,7 +2663,7 @@ BOOL SwRedlineTbl::InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos )
}
SwRedline* pNew = 0;
- USHORT nInsPos;
+ sal_uInt16 nInsPos;
if( aNewStt < *pEnd )
do {
@@ -2688,7 +2688,7 @@ BOOL SwRedlineTbl::InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos )
{
// We want to be before the table
*pNew->GetPoint() = SwPosition(*pTab);
- pC = GoPreviousNds( &pNew->GetPoint()->nNode, FALSE ); // here we are.
+ pC = GoPreviousNds( &pNew->GetPoint()->nNode, sal_False ); // here we are.
if( pC )
pNew->GetPoint()->nContent.Assign( pC, 0 );
pTab = pNew->GetPoint()->nNode.GetNode().StartOfSectionNode()->FindTableNode();
@@ -2733,7 +2733,7 @@ BOOL SwRedlineTbl::InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos )
_SwRedlineTbl::Insert( pNew, nInsPos ) )
{
pNew->CallDisplayFunc();
- bAnyIns = TRUE;
+ bAnyIns = sal_True;
pNew = 0;
if( pInsPos && *pInsPos < nInsPos )
*pInsPos = nInsPos;
@@ -2752,7 +2752,7 @@ BOOL SwRedlineTbl::InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos )
return bAnyIns;
}
-void SwRedlineTbl::Remove( USHORT nP, USHORT nL )
+void SwRedlineTbl::Remove( sal_uInt16 nP, sal_uInt16 nL )
{
SwDoc* pDoc = 0;
if( !nP && nL && nL == _SwRedlineTbl::Count() )
@@ -2766,7 +2766,7 @@ void SwRedlineTbl::Remove( USHORT nP, USHORT nL )
pSh->InvalidateWindows( SwRect( 0, 0, LONG_MAX, LONG_MAX ) );
}
-void SwRedlineTbl::DeleteAndDestroy( USHORT nP, USHORT nL )
+void SwRedlineTbl::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
{
SwDoc* pDoc = 0;
if( !nP && nL && nL == _SwRedlineTbl::Count() )
@@ -2783,7 +2783,7 @@ void SwRedlineTbl::DeleteAndDestroy( USHORT nP, USHORT nL )
// suche den naechsten oder vorherigen Redline mit dergleichen Seq.No
// Mit dem Lookahead kann die Suche eingeschraenkt werden. 0 oder
// USHRT_MAX suchen im gesamten Array.
-USHORT SwRedlineTbl::FindNextOfSeqNo( USHORT nSttPos, USHORT nLookahead ) const
+sal_uInt16 SwRedlineTbl::FindNextOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead ) const
{
return nSttPos + 1 < _SwRedlineTbl::Count()
? FindNextSeqNo( _SwRedlineTbl::GetObject( nSttPos )
@@ -2791,7 +2791,7 @@ USHORT SwRedlineTbl::FindNextOfSeqNo( USHORT nSttPos, USHORT nLookahead ) const
: USHRT_MAX;
}
-USHORT SwRedlineTbl::FindPrevOfSeqNo( USHORT nSttPos, USHORT nLookahead ) const
+sal_uInt16 SwRedlineTbl::FindPrevOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead ) const
{
return nSttPos ? FindPrevSeqNo( _SwRedlineTbl::GetObject(
nSttPos )->GetSeqNo(),
@@ -2799,10 +2799,10 @@ USHORT SwRedlineTbl::FindPrevOfSeqNo( USHORT nSttPos, USHORT nLookahead ) const
: USHRT_MAX;
}
-USHORT SwRedlineTbl::FindNextSeqNo( USHORT nSeqNo, USHORT nSttPos,
- USHORT nLookahead ) const
+sal_uInt16 SwRedlineTbl::FindNextSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos,
+ sal_uInt16 nLookahead ) const
{
- USHORT nRet = USHRT_MAX, nEnd;
+ sal_uInt16 nRet = USHRT_MAX, nEnd;
if( nSeqNo && nSttPos < _SwRedlineTbl::Count() )
{
nEnd = _SwRedlineTbl::Count();
@@ -2820,10 +2820,10 @@ USHORT SwRedlineTbl::FindNextSeqNo( USHORT nSeqNo, USHORT nSttPos,
return nRet;
}
-USHORT SwRedlineTbl::FindPrevSeqNo( USHORT nSeqNo, USHORT nSttPos,
- USHORT nLookahead ) const
+sal_uInt16 SwRedlineTbl::FindPrevSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos,
+ sal_uInt16 nLookahead ) const
{
- USHORT nRet = USHRT_MAX, nEnd;
+ sal_uInt16 nRet = USHRT_MAX, nEnd;
if( nSeqNo && nSttPos < _SwRedlineTbl::Count() )
{
nEnd = 0;
@@ -2857,12 +2857,12 @@ void SwRedlineExtraData::Reject( SwPaM& ) const
int SwRedlineExtraData::operator == ( const SwRedlineExtraData& ) const
{
- return FALSE;
+ return sal_False;
}
SwRedlineExtraData_FmtColl::SwRedlineExtraData_FmtColl( const String& rColl,
- USHORT nPoolFmtId,
+ sal_uInt16 nPoolFmtId,
const SfxItemSet* pItemSet )
: sFmtNm(rColl), pSet(0), nPoolId(nPoolFmtId)
{
@@ -2940,7 +2940,7 @@ SwRedlineExtraData_Format::SwRedlineExtraData_Format( const SfxItemSet& rSet )
{
SfxItemIter aIter( rSet );
const SfxPoolItem* pItem = aIter.FirstItem();
- while( TRUE )
+ while( sal_True )
{
aWhichIds.Insert( pItem->Which(), aWhichIds.Count() );
if( aIter.IsAtEnd() )
@@ -2951,7 +2951,7 @@ SwRedlineExtraData_Format::SwRedlineExtraData_Format( const SfxItemSet& rSet )
SwRedlineExtraData_Format::SwRedlineExtraData_Format(
const SwRedlineExtraData_Format& rCpy )
- : SwRedlineExtraData(), aWhichIds( (BYTE)rCpy.aWhichIds.Count() )
+ : SwRedlineExtraData(), aWhichIds( (sal_uInt8)rCpy.aWhichIds.Count() )
{
aWhichIds.Insert( &rCpy.aWhichIds, 0 );
}
@@ -2973,7 +2973,7 @@ void SwRedlineExtraData_Format::Reject( SwPaM& rPam ) const
pDoc->SetRedlineMode_intern((RedlineMode_t)(eOld & ~(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_IGNORE)));
// eigentlich muesste hier das Attribut zurueck gesetzt werden!!!
- for( USHORT n = 0, nEnd = aWhichIds.Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = aWhichIds.Count(); n < nEnd; ++n )
{
pDoc->InsertPoolItem( rPam, *GetDfltAttr( aWhichIds[ n ] ),
nsSetAttrMode::SETATTR_DONTEXPAND );
@@ -2985,7 +2985,7 @@ void SwRedlineExtraData_Format::Reject( SwPaM& rPam ) const
int SwRedlineExtraData_Format::operator == ( const SwRedlineExtraData& rCmp ) const
{
int nRet = 1;
- USHORT n = 0, nEnd = aWhichIds.Count();
+ sal_uInt16 n = 0, nEnd = aWhichIds.Count();
if( nEnd != ((SwRedlineExtraData_Format&)rCmp).aWhichIds.Count() )
nRet = 0;
else
@@ -3000,14 +3000,14 @@ int SwRedlineExtraData_Format::operator == ( const SwRedlineExtraData& rCmp ) co
/* */
-SwRedlineData::SwRedlineData( RedlineType_t eT, USHORT nAut )
+SwRedlineData::SwRedlineData( RedlineType_t eT, sal_uInt16 nAut )
: pNext( 0 ), pExtraData( 0 ), eType( eT ), nAuthor( nAut ), nSeqNo( 0 )
{
aStamp.SetSec( 0 );
aStamp.Set100Sec( 0 );
}
-SwRedlineData::SwRedlineData( const SwRedlineData& rCpy, BOOL bCpyNext )
+SwRedlineData::SwRedlineData( const SwRedlineData& rCpy, sal_Bool bCpyNext )
:
pNext( (bCpyNext && rCpy.pNext) ? new SwRedlineData( *rCpy.pNext ) : 0 ),
pExtraData( rCpy.pExtraData ? rCpy.pExtraData->CreateNew() : 0 ),
@@ -3017,7 +3017,7 @@ SwRedlineData::SwRedlineData( const SwRedlineData& rCpy, BOOL bCpyNext )
}
// fuer sw3io: pNext geht in eigenen Besitz ueber!
-SwRedlineData::SwRedlineData(RedlineType_t eT, USHORT nAut, const DateTime& rDT,
+SwRedlineData::SwRedlineData(RedlineType_t eT, sal_uInt16 nAut, const DateTime& rDT,
const String& rCmnt, SwRedlineData *pNxt, SwRedlineExtraData* pData)
: pNext(pNxt), pExtraData(pData), sComment(rCmnt), aStamp(rDT),
eType(eT), nAuthor(nAut), nSeqNo(0)
@@ -3059,8 +3059,8 @@ SwRedline::SwRedline(RedlineType_t eTyp, const SwPaM& rPam )
pRedlineData( new SwRedlineData( eTyp, GetDoc()->GetRedlineAuthor() ) ),
pCntntSect( 0 )
{
- bDelLastPara = bIsLastParaDelete = FALSE;
- bIsVisible = TRUE;
+ bDelLastPara = bIsLastParaDelete = sal_False;
+ bIsVisible = sal_True;
if( !rPam.HasMark() )
DeleteMark();
}
@@ -3070,8 +3070,8 @@ SwRedline::SwRedline( const SwRedlineData& rData, const SwPaM& rPam )
pRedlineData( new SwRedlineData( rData )),
pCntntSect( 0 )
{
- bDelLastPara = bIsLastParaDelete = FALSE;
- bIsVisible = TRUE;
+ bDelLastPara = bIsLastParaDelete = sal_False;
+ bIsVisible = sal_True;
if( !rPam.HasMark() )
DeleteMark();
}
@@ -3081,8 +3081,8 @@ SwRedline::SwRedline( const SwRedlineData& rData, const SwPosition& rPos )
pRedlineData( new SwRedlineData( rData )),
pCntntSect( 0 )
{
- bDelLastPara = bIsLastParaDelete = FALSE;
- bIsVisible = TRUE;
+ bDelLastPara = bIsLastParaDelete = sal_False;
+ bIsVisible = sal_True;
}
SwRedline::SwRedline( const SwRedline& rCpy )
@@ -3090,8 +3090,8 @@ SwRedline::SwRedline( const SwRedline& rCpy )
pRedlineData( new SwRedlineData( *rCpy.pRedlineData )),
pCntntSect( 0 )
{
- bDelLastPara = bIsLastParaDelete = FALSE;
- bIsVisible = TRUE;
+ bDelLastPara = bIsLastParaDelete = sal_False;
+ bIsVisible = sal_True;
if( !rCpy.HasMark() )
DeleteMark();
}
@@ -3109,7 +3109,7 @@ SwRedline::~SwRedline()
}
// liegt eine gueltige Selektion vor?
-BOOL SwRedline::HasValidRange() const
+sal_Bool SwRedline::HasValidRange() const
{
const SwNode* pPtNd = &GetPoint()->nNode.GetNode(),
* pMkNd = &GetMark()->nNode.GetNode();
@@ -3121,11 +3121,11 @@ BOOL SwRedline::HasValidRange() const
( pPtNd != pMkNd || GetContentIdx() != NULL ||
pPtNd != &pPtNd->GetNodes().GetEndOfContent() )
)
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
-void SwRedline::CallDisplayFunc( USHORT nLoop )
+void SwRedline::CallDisplayFunc( sal_uInt16 nLoop )
{
switch( nsRedlineMode_t::REDLINE_SHOW_MASK & GetDoc()->GetRedlineMode() )
{
@@ -3141,25 +3141,25 @@ void SwRedline::CallDisplayFunc( USHORT nLoop )
}
}
-void SwRedline::Show( USHORT nLoop )
+void SwRedline::Show( sal_uInt16 nLoop )
{
if( 1 <= nLoop )
{
SwDoc* pDoc = GetDoc();
RedlineMode_t eOld = pDoc->GetRedlineMode();
pDoc->SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE));
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
switch( GetType() )
{
case nsRedlineType_t::REDLINE_INSERT: // Inhalt wurde eingefuegt
- bIsVisible = TRUE;
+ bIsVisible = sal_True;
MoveFromSection();
break;
case nsRedlineType_t::REDLINE_DELETE: // Inhalt wurde geloescht
- bIsVisible = TRUE;
+ bIsVisible = sal_True;
MoveFromSection();
break;
@@ -3175,24 +3175,24 @@ void SwRedline::Show( USHORT nLoop )
}
}
-void SwRedline::Hide( USHORT nLoop )
+void SwRedline::Hide( sal_uInt16 nLoop )
{
SwDoc* pDoc = GetDoc();
RedlineMode_t eOld = pDoc->GetRedlineMode();
pDoc->SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE));
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
switch( GetType() )
{
case nsRedlineType_t::REDLINE_INSERT: // Inhalt wurde eingefuegt
- bIsVisible = TRUE;
+ bIsVisible = sal_True;
if( 1 <= nLoop )
MoveFromSection();
break;
case nsRedlineType_t::REDLINE_DELETE: // Inhalt wurde geloescht
- bIsVisible = FALSE;
+ bIsVisible = sal_False;
switch( nLoop )
{
case 0: MoveToSection(); break;
@@ -3213,15 +3213,15 @@ void SwRedline::Hide( USHORT nLoop )
pDoc->DoUndo( bUndo );
}
-void SwRedline::ShowOriginal( USHORT nLoop )
+void SwRedline::ShowOriginal( sal_uInt16 nLoop )
{
SwDoc* pDoc = GetDoc();
RedlineMode_t eOld = pDoc->GetRedlineMode();
SwRedlineData* pCur;
pDoc->SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE));
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
// bestimme den Type, ist der erste auf Stack
for( pCur = pRedlineData; pCur->pNext; )
@@ -3230,7 +3230,7 @@ void SwRedline::ShowOriginal( USHORT nLoop )
switch( pCur->eType )
{
case nsRedlineType_t::REDLINE_INSERT: // Inhalt wurde eingefuegt
- bIsVisible = FALSE;
+ bIsVisible = sal_False;
switch( nLoop )
{
case 0: MoveToSection(); break;
@@ -3240,7 +3240,7 @@ void SwRedline::ShowOriginal( USHORT nLoop )
break;
case nsRedlineType_t::REDLINE_DELETE: // Inhalt wurde geloescht
- bIsVisible = TRUE;
+ bIsVisible = sal_True;
if( 1 <= nLoop )
MoveFromSection();
break;
@@ -3260,21 +3260,21 @@ void SwRedline::ShowOriginal( USHORT nLoop )
void SwRedline::InvalidateRange() // das Layout anstossen
{
- ULONG nSttNd = GetMark()->nNode.GetIndex(),
+ sal_uLong nSttNd = GetMark()->nNode.GetIndex(),
nEndNd = GetPoint()->nNode.GetIndex();
- USHORT nSttCnt = GetMark()->nContent.GetIndex(),
+ sal_uInt16 nSttCnt = GetMark()->nContent.GetIndex(),
nEndCnt = GetPoint()->nContent.GetIndex();
if( nSttNd > nEndNd || ( nSttNd == nEndNd && nSttCnt > nEndCnt ))
{
- ULONG nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
- nTmp = nSttCnt; nSttCnt = nEndCnt; nEndCnt = (USHORT)nTmp;
+ sal_uLong nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
+ nTmp = nSttCnt; nSttCnt = nEndCnt; nEndCnt = (sal_uInt16)nTmp;
}
SwUpdateAttr aHt( 0, 0, RES_FMT_CHG );
SwNodes& rNds = GetDoc()->GetNodes();
SwNode* pNd;
- for( ULONG n = nSttNd; n <= nEndNd; ++n )
+ for( sal_uLong n = nSttNd; n <= nEndNd; ++n )
if( ND_TEXTNODE == ( pNd = rNds[ n ] )->GetNodeType() )
{
aHt.nStart = n == nSttNd ? nSttCnt : 0;
@@ -3289,7 +3289,7 @@ void SwRedline::InvalidateRange() // das Layout anstossen
* text node nNdIdx
*************************************************************************/
-void SwRedline::CalcStartEnd( ULONG nNdIdx, USHORT& nStart, USHORT& nEnd ) const
+void SwRedline::CalcStartEnd( sal_uLong nNdIdx, sal_uInt16& nStart, sal_uInt16& nEnd ) const
{
const SwPosition *pRStt = Start(), *pREnd = End();
if( pRStt->nNode < nNdIdx )
@@ -3339,13 +3339,13 @@ void SwRedline::MoveToSection()
// damit die Indizies der anderen Redlines nicht mitverschoben
// werden, diese aufs Ende setzen (ist exclusive).
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
SwRedline* pRedl = rTbl[ n ];
- if( pRedl->GetBound(TRUE) == *pStt )
- pRedl->GetBound(TRUE) = *pEnd;
- if( pRedl->GetBound(FALSE) == *pStt )
- pRedl->GetBound(FALSE) = *pEnd;
+ if( pRedl->GetBound(sal_True) == *pStt )
+ pRedl->GetBound(sal_True) = *pEnd;
+ if( pRedl->GetBound(sal_False) == *pStt )
+ pRedl->GetBound(sal_False) = *pEnd;
}
}
@@ -3371,7 +3371,7 @@ void SwRedline::MoveToSection()
else
{
if( pCSttNd && !pCEndNd )
- bDelLastPara = TRUE;
+ bDelLastPara = sal_True;
pDoc->MoveRange( aPam, aPos,
IDocumentContentOperations::DOC_MOVEDEFAULT );
}
@@ -3410,9 +3410,9 @@ void SwRedline::CopyToSection()
SwDoc* pDoc = GetDoc();
SwNodes& rNds = pDoc->GetNodes();
- BOOL bSaveCopyFlag = pDoc->IsCopyIsMove(),
+ sal_Bool bSaveCopyFlag = pDoc->IsCopyIsMove(),
bSaveRdlMoveFlg = pDoc->IsRedlineMove();
- pDoc->SetCopyIsMove( TRUE );
+ pDoc->SetCopyIsMove( sal_True );
// #100619# The IsRedlineMove() flag causes the behaviour of the
// SwDoc::_CopyFlyInFly method to change, which will eventually be
@@ -3492,13 +3492,13 @@ void SwRedline::DelCopyOfSection()
// damit die Indizies der anderen Redlines nicht mitverschoben
// werden, diese aufs Ende setzen (ist exclusive).
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
SwRedline* pRedl = rTbl[ n ];
- if( pRedl->GetBound(TRUE) == *pStt )
- pRedl->GetBound(TRUE) = *pEnd;
- if( pRedl->GetBound(FALSE) == *pStt )
- pRedl->GetBound(FALSE) = *pEnd;
+ if( pRedl->GetBound(sal_True) == *pStt )
+ pRedl->GetBound(sal_True) = *pEnd;
+ if( pRedl->GetBound(sal_False) == *pStt )
+ pRedl->GetBound(sal_False) = *pEnd;
}
}
@@ -3512,7 +3512,7 @@ void SwRedline::DelCopyOfSection()
else if( pCSttNd || pCEndNd )
{
if( pCSttNd && !pCEndNd )
- bDelLastPara = TRUE;
+ bDelLastPara = sal_True;
pDoc->DeleteRange( aPam );
if( bDelLastPara )
@@ -3524,21 +3524,21 @@ void SwRedline::DelCopyOfSection()
// bDelLastPara condition above), only redlines before the
// current ones can be affected.
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
- USHORT n = rTbl.GetPos( this );
+ sal_uInt16 n = rTbl.GetPos( this );
ASSERT( n != USHRT_MAX, "How strange. We don't exist!" );
- for( BOOL bBreak = FALSE; !bBreak && n > 0; )
+ for( sal_Bool bBreak = sal_False; !bBreak && n > 0; )
{
--n;
- bBreak = TRUE;
- if( rTbl[ n ]->GetBound(TRUE) == *aPam.GetPoint() )
+ bBreak = sal_True;
+ if( rTbl[ n ]->GetBound(sal_True) == *aPam.GetPoint() )
{
- rTbl[ n ]->GetBound(TRUE) = *pEnd;
- bBreak = FALSE;
+ rTbl[ n ]->GetBound(sal_True) = *pEnd;
+ bBreak = sal_False;
}
- if( rTbl[ n ]->GetBound(FALSE) == *aPam.GetPoint() )
+ if( rTbl[ n ]->GetBound(sal_False) == *aPam.GetPoint() )
{
- rTbl[ n ]->GetBound(FALSE) = *pEnd;
- bBreak = FALSE;
+ rTbl[ n ]->GetBound(sal_False) = *pEnd;
+ bBreak = sal_False;
}
}
@@ -3547,8 +3547,8 @@ void SwRedline::DelCopyOfSection()
*GetMark() = *pEnd;
DeleteMark();
- aPam.GetBound( TRUE ).nContent.Assign( 0, 0 );
- aPam.GetBound( FALSE ).nContent.Assign( 0, 0 );
+ aPam.GetBound( sal_True ).nContent.Assign( 0, 0 );
+ aPam.GetBound( sal_False ).nContent.Assign( 0, 0 );
aPam.DeleteMark();
pDoc->DelFullPara( aPam );
}
@@ -3572,42 +3572,42 @@ void SwRedline::MoveFromSection()
SwDoc* pDoc = GetDoc();
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
SvPtrarr aBeforeArr( 16, 16 ), aBehindArr( 16, 16 );
- USHORT nMyPos = rTbl.GetPos( this );
+ sal_uInt16 nMyPos = rTbl.GetPos( this );
ASSERT( this, "this nicht im Array?" );
- BOOL bBreak = FALSE;
- USHORT n;
+ sal_Bool bBreak = sal_False;
+ sal_uInt16 n;
for( n = nMyPos+1; !bBreak && n < rTbl.Count(); ++n )
{
- bBreak = TRUE;
- if( rTbl[ n ]->GetBound(TRUE) == *GetPoint() )
+ bBreak = sal_True;
+ if( rTbl[ n ]->GetBound(sal_True) == *GetPoint() )
{
- void* pTmp = &rTbl[ n ]->GetBound(TRUE);
+ void* pTmp = &rTbl[ n ]->GetBound(sal_True);
aBehindArr.Insert( pTmp, aBehindArr.Count());
- bBreak = FALSE;
+ bBreak = sal_False;
}
- if( rTbl[ n ]->GetBound(FALSE) == *GetPoint() )
+ if( rTbl[ n ]->GetBound(sal_False) == *GetPoint() )
{
- void* pTmp = &rTbl[ n ]->GetBound(FALSE);
+ void* pTmp = &rTbl[ n ]->GetBound(sal_False);
aBehindArr.Insert( pTmp, aBehindArr.Count() );
- bBreak = FALSE;
+ bBreak = sal_False;
}
}
- for( bBreak = FALSE, n = nMyPos; !bBreak && n ; )
+ for( bBreak = sal_False, n = nMyPos; !bBreak && n ; )
{
--n;
- bBreak = TRUE;
- if( rTbl[ n ]->GetBound(TRUE) == *GetPoint() )
+ bBreak = sal_True;
+ if( rTbl[ n ]->GetBound(sal_True) == *GetPoint() )
{
- void* pTmp = &rTbl[ n ]->GetBound(TRUE);
+ void* pTmp = &rTbl[ n ]->GetBound(sal_True);
aBeforeArr.Insert( pTmp, aBeforeArr.Count() );
- bBreak = FALSE;
+ bBreak = sal_False;
}
- if( rTbl[ n ]->GetBound(FALSE) == *GetPoint() )
+ if( rTbl[ n ]->GetBound(sal_False) == *GetPoint() )
{
- void* pTmp = &rTbl[ n ]->GetBound(FALSE);
+ void* pTmp = &rTbl[ n ]->GetBound(sal_False);
aBeforeArr.Insert( pTmp, aBeforeArr.Count() );
- bBreak = FALSE;
+ bBreak = sal_False;
}
}
@@ -3629,7 +3629,7 @@ void SwRedline::MoveFromSection()
? pCNd->GetFmtColl() : 0;
SwNodeIndex aNdIdx( GetPoint()->nNode, -1 );
- USHORT nPos = GetPoint()->nContent.GetIndex();
+ sal_uInt16 nPos = GetPoint()->nContent.GetIndex();
SwPosition aPos( *GetPoint() );
if( bDelLastPara && *aPam.GetPoint() == *aPam.GetMark() )
@@ -3654,7 +3654,7 @@ void SwRedline::MoveFromSection()
{
GetPoint()->nNode++;
GetPoint()->nContent.Assign( pCNd = GetCntntNode(), 0 );
- bDelLastPara = FALSE;
+ bDelLastPara = sal_False;
}
else if( pColl )
pCNd = GetCntntNode();
@@ -3694,12 +3694,12 @@ void SwRedline::SetContentIdx( const SwNodeIndex* pIdx )
if( pIdx && !pCntntSect )
{
pCntntSect = new SwNodeIndex( *pIdx );
- bIsVisible = FALSE;
+ bIsVisible = sal_False;
}
else if( !pIdx && pCntntSect )
{
delete pCntntSect, pCntntSect = 0;
- bIsVisible = FALSE;
+ bIsVisible = sal_False;
}
#ifdef DBG_UTIL
else
@@ -3707,17 +3707,17 @@ void SwRedline::SetContentIdx( const SwNodeIndex* pIdx )
#endif
}
-BOOL SwRedline::CanCombine( const SwRedline& rRedl ) const
+sal_Bool SwRedline::CanCombine( const SwRedline& rRedl ) const
{
return IsVisible() && rRedl.IsVisible() &&
pRedlineData->CanCombine( *rRedl.pRedlineData );
}
-void SwRedline::PushData( const SwRedline& rRedl, BOOL bOwnAsNext )
+void SwRedline::PushData( const SwRedline& rRedl, sal_Bool bOwnAsNext )
{
// SwRedlineData* pNew = new SwRedlineData( rRedl.GetType(),
// rRedl.GetAuthor() );
- SwRedlineData* pNew = new SwRedlineData( *rRedl.pRedlineData, FALSE );
+ SwRedlineData* pNew = new SwRedlineData( *rRedl.pRedlineData, sal_False );
if( bOwnAsNext )
{
pNew->pNext = pRedlineData;
@@ -3730,47 +3730,47 @@ void SwRedline::PushData( const SwRedline& rRedl, BOOL bOwnAsNext )
}
}
-BOOL SwRedline::PopData()
+sal_Bool SwRedline::PopData()
{
if( !pRedlineData->pNext )
- return FALSE;
+ return sal_False;
SwRedlineData* pCur = pRedlineData;
pRedlineData = pCur->pNext;
pCur->pNext = 0;
delete pCur;
- return TRUE;
+ return sal_True;
}
-USHORT SwRedline::GetStackCount() const
+sal_uInt16 SwRedline::GetStackCount() const
{
- USHORT nRet = 1;
+ sal_uInt16 nRet = 1;
for( SwRedlineData* pCur = pRedlineData; pCur->pNext; ++nRet )
pCur = pCur->pNext;
return nRet;
}
// -> #111827#
-USHORT SwRedline::GetAuthor( USHORT nPos ) const
+sal_uInt16 SwRedline::GetAuthor( sal_uInt16 nPos ) const
{
return GetRedlineData(nPos).nAuthor;
}
-const String& SwRedline::GetAuthorString( USHORT nPos ) const
+const String& SwRedline::GetAuthorString( sal_uInt16 nPos ) const
{
return SW_MOD()->GetRedlineAuthor(GetRedlineData(nPos).nAuthor);
}
-const DateTime& SwRedline::GetTimeStamp( USHORT nPos ) const
+const DateTime& SwRedline::GetTimeStamp( sal_uInt16 nPos ) const
{
return GetRedlineData(nPos).aStamp;
}
-RedlineType_t SwRedline::GetRealType( USHORT nPos ) const
+RedlineType_t SwRedline::GetRealType( sal_uInt16 nPos ) const
{
return GetRedlineData(nPos).eType;
}
-const String& SwRedline::GetComment( USHORT nPos ) const
+const String& SwRedline::GetComment( sal_uInt16 nPos ) const
{
return GetRedlineData(nPos).sComment;
}
@@ -3783,19 +3783,19 @@ int SwRedline::operator==( const SwRedline& rCmp ) const
int SwRedline::operator<( const SwRedline& rCmp ) const
{
- BOOL nResult = FALSE;
+ sal_Bool nResult = sal_False;
if (*Start() < *rCmp.Start())
- nResult = TRUE;
+ nResult = sal_True;
else if (*Start() == *rCmp.Start())
if (*End() < *rCmp.End())
- nResult = TRUE;
+ nResult = sal_True;
return nResult;
}
// -> #111827#
-const SwRedlineData & SwRedline::GetRedlineData(USHORT nPos) const
+const SwRedlineData & SwRedline::GetRedlineData(sal_uInt16 nPos) const
{
SwRedlineData * pCur = pRedlineData;
@@ -3811,7 +3811,7 @@ const SwRedlineData & SwRedline::GetRedlineData(USHORT nPos) const
return *pCur;
}
-String SwRedline::GetDescr(USHORT nPos)
+String SwRedline::GetDescr(sal_uInt16 nPos)
{
String aResult;
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index 4a707e1fb1af..f19677e65c62 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -63,12 +63,12 @@ using namespace ::com::sun::star::i18n;
*
*
*/
-USHORT SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList,
- USHORT nMode )
+sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList,
+ sal_uInt16 nMode )
{
const SwPaM *_pStartCrsr = (SwPaM*)rPam.GetNext(),
*__pStartCrsr = _pStartCrsr;
- BOOL bCheckEmpty = &rPam != _pStartCrsr;
+ sal_Bool bCheckEmpty = &rPam != _pStartCrsr;
do {
const SwPosition* pStt = _pStartCrsr->Start(),
* pEnd = pStt == _pStartCrsr->GetPoint()
@@ -109,18 +109,18 @@ USHORT SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList,
return rList.Count();
}
-USHORT SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
- USHORT nMode )
+sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
+ sal_uInt16 nMode )
{
StartUndo( UNDO_SETRUBYATTR, NULL );
SvUShortsSort aDelArr;
aDelArr.Insert( RES_TXTATR_CJK_RUBY );
- USHORT nListEntry = 0;
+ sal_uInt16 nListEntry = 0;
const SwPaM *_pStartCrsr = (SwPaM*)rPam.GetNext(),
*__pStartCrsr = _pStartCrsr;
- BOOL bCheckEmpty = &rPam != _pStartCrsr;
+ sal_Bool bCheckEmpty = &rPam != _pStartCrsr;
do {
const SwPosition* pStt = _pStartCrsr->Start(),
* pEnd = pStt == _pStartCrsr->GetPoint()
@@ -149,7 +149,7 @@ USHORT SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
}
else
{
- ResetAttrs( aPam, TRUE, &aDelArr );
+ ResetAttrs( aPam, sal_True, &aDelArr );
}
}
@@ -198,7 +198,7 @@ USHORT SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
return nListEntry;
}
-BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
+sal_Bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_uInt16 )
{
// Point must be the startposition, Mark is optional the end position
SwPosition* pPos = rPam.GetPoint();
@@ -206,7 +206,7 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
const String* pTxt = &pTNd->GetTxt();
xub_StrLen nStart = pPos->nContent.GetIndex(), nEnd = pTxt->Len();
- BOOL bHasMark = rPam.HasMark();
+ sal_Bool bHasMark = rPam.HasMark();
if( bHasMark )
{
// in the same node?
@@ -222,7 +222,7 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
// ----- search the start
// --- look where a ruby attribut starts
- USHORT nHtIdx = USHRT_MAX;
+ sal_uInt16 nHtIdx = USHRT_MAX;
const SwpHints* pHts = pTNd->GetpSwpHints();
const SwTxtAttr* pAttr = 0;
if( pHts )
@@ -252,7 +252,7 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
*pTxt, nStart,
pBreakIt->GetLocale( pTNd->GetLang( nStart )),
WordType::ANYWORD_IGNOREWHITESPACES,
- TRUE ).startPos;
+ sal_True ).startPos;
if( nWordStt < nStart && -1 != nWordStt )
{
nStart = (xub_StrLen)nWordStt;
@@ -260,7 +260,7 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
}
}
- BOOL bAlphaNum = FALSE;
+ sal_Bool bAlphaNum = sal_False;
long nWordEnd = nEnd;
CharClass& rCC = GetAppCharClass();
while( nStart < nEnd )
@@ -280,14 +280,14 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
}
sal_Int32 nChType = rCC.getType( *pTxt, nStart );
- BOOL bIgnoreChar = FALSE, bIsAlphaNum = FALSE, bChkNxtWrd = FALSE;
+ sal_Bool bIgnoreChar = sal_False, bIsAlphaNum = sal_False, bChkNxtWrd = sal_False;
switch( nChType )
{
case UnicodeType::UPPERCASE_LETTER:
case UnicodeType::LOWERCASE_LETTER:
case UnicodeType::TITLECASE_LETTER:
case UnicodeType::DECIMAL_DIGIT_NUMBER:
- bChkNxtWrd = bIsAlphaNum = TRUE;
+ bChkNxtWrd = bIsAlphaNum = sal_True;
break;
case UnicodeType::SPACE_SEPARATOR:
@@ -295,12 +295,12 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
/*??*/ case UnicodeType::PRIVATE_USE:
case UnicodeType::START_PUNCTUATION:
case UnicodeType::END_PUNCTUATION:
- bIgnoreChar = TRUE;
+ bIgnoreChar = sal_True;
break;
case UnicodeType::OTHER_LETTER:
- bChkNxtWrd = TRUE;
+ bChkNxtWrd = sal_True;
// no break!
// case UnicodeType::UNASSIGNED:
// case UnicodeType::MODIFIER_LETTER:
@@ -324,7 +324,7 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
// case UnicodeType::INITIAL_PUNCTUATION:
// case UnicodeType::FINAL_PUNCTUATION:
default:
- bIsAlphaNum = FALSE;
+ bIsAlphaNum = sal_False;
break;
}
@@ -344,7 +344,7 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
*pTxt, nStart,
pBreakIt->GetLocale( pTNd->GetLang( nStart )),
WordType::ANYWORD_IGNOREWHITESPACES,
- TRUE ).endPos;
+ sal_True ).endPos;
if( 0 > nWordEnd || nWordEnd > nEnd || nWordEnd == nStart )
nWordEnd = nEnd;
}
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 8923b5322998..d37a8a2c8d5a 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -141,21 +141,21 @@ double SwSortElement::StrToDouble( const String& rStr ) const
--------------------------------------------------------------------*/
-BOOL SwSortElement::operator==(const SwSortElement& )
+sal_Bool SwSortElement::operator==(const SwSortElement& )
{
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
Beschreibung: Kleiner-Operator fuers sortieren
--------------------------------------------------------------------*/
-BOOL SwSortElement::operator<(const SwSortElement& rCmp)
+sal_Bool SwSortElement::operator<(const SwSortElement& rCmp)
{
// der eigentliche Vergleich
//
- for(USHORT nKey = 0; nKey < pOptions->aKeys.Count(); ++nKey)
+ for(sal_uInt16 nKey = 0; nKey < pOptions->aKeys.Count(); ++nKey)
{
const SwSortElement *pOrig, *pCmp;
@@ -196,10 +196,10 @@ BOOL SwSortElement::operator<(const SwSortElement& rCmp)
return -1 == nCmp;
}
}
- return FALSE;
+ return sal_False;
}
-double SwSortElement::GetValue( USHORT nKey ) const
+double SwSortElement::GetValue( sal_uInt16 nKey ) const
{
return StrToDouble( GetKey( nKey ));
}
@@ -225,7 +225,7 @@ SwSortTxtElement::~SwSortTxtElement()
--------------------------------------------------------------------*/
-String SwSortTxtElement::GetKey(USHORT nId) const
+String SwSortTxtElement::GetKey(sal_uInt16 nId) const
{
SwTxtNode* pTxtNd = aPos.GetNode().GetTxtNode();
if( !pTxtNd )
@@ -235,7 +235,7 @@ String SwSortTxtElement::GetKey(USHORT nId) const
const String& rStr = pTxtNd->GetTxt();
sal_Unicode nDeli = pOptions->cDeli;
- USHORT nDCount = pOptions->aKeys[nId]->nColumnId, i = 1;
+ sal_uInt16 nDCount = pOptions->aKeys[nId]->nColumnId, i = 1;
xub_StrLen nStart = 0;
// Den Delimitter suchen
@@ -256,7 +256,7 @@ String SwSortTxtElement::GetKey(USHORT nId) const
Beschreibung: Sortier-Elemente fuer Tabellen
--------------------------------------------------------------------*/
-SwSortBoxElement::SwSortBoxElement( USHORT nRC )
+SwSortBoxElement::SwSortBoxElement( sal_uInt16 nRC )
: nRow( nRC )
{
}
@@ -271,10 +271,10 @@ SwSortBoxElement::~SwSortBoxElement()
--------------------------------------------------------------------*/
-String SwSortBoxElement::GetKey(USHORT nKey) const
+String SwSortBoxElement::GetKey(sal_uInt16 nKey) const
{
const _FndBox* pFndBox;
- USHORT nCol = pOptions->aKeys[nKey]->nColumnId-1;
+ sal_uInt16 nCol = pOptions->aKeys[nKey]->nColumnId-1;
if( SRT_ROWS == pOptions->eDirection )
pFndBox = pBox->GetBox(nCol, nRow); // Zeilen sortieren
@@ -292,7 +292,7 @@ String SwSortBoxElement::GetKey(USHORT nKey) const
{
// ueber alle TextNodes der Box
const SwNode *pNd = 0, *pEndNd = pMyBox->GetSttNd()->EndOfSectionNode();
- for( ULONG nIdx = pMyBox->GetSttIdx() + 1; pNd != pEndNd; ++nIdx )
+ for( sal_uLong nIdx = pMyBox->GetSttIdx() + 1; pNd != pEndNd; ++nIdx )
if( ( pNd = pDoc->GetNodes()[ nIdx ])->IsTxtNode() )
aRetStr += ((SwTxtNode*)pNd)->GetTxt();
}
@@ -300,10 +300,10 @@ String SwSortBoxElement::GetKey(USHORT nKey) const
return aRetStr;
}
-double SwSortBoxElement::GetValue( USHORT nKey ) const
+double SwSortBoxElement::GetValue( sal_uInt16 nKey ) const
{
const _FndBox* pFndBox;
- USHORT nCol = pOptions->aKeys[nKey]->nColumnId-1;
+ sal_uInt16 nCol = pOptions->aKeys[nKey]->nColumnId-1;
if( SRT_ROWS == pOptions->eDirection )
pFndBox = pBox->GetBox(nCol, nRow); // Zeilen sortieren
@@ -330,13 +330,13 @@ double SwSortBoxElement::GetValue( USHORT nKey ) const
--------------------------------------------------------------------*/
-BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
+sal_Bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
{
// pruefen ob Rahmen im Text
const SwPosition *pStart = rPaM.Start(), *pEnd = rPaM.End();
// Index auf den Start der Selektion
- for ( USHORT n = 0; n < GetSpzFrmFmts()->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < GetSpzFrmFmts()->Count(); ++n )
{
SwFrmFmt *const pFmt = static_cast<SwFrmFmt*>((*GetSpzFrmFmts())[n]);
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -344,20 +344,20 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
if (pAPos && (FLY_AT_PARA == pAnchor->GetAnchorId()) &&
pStart->nNode <= pAPos->nNode && pAPos->nNode <= pEnd->nNode )
- return FALSE;
+ return sal_False;
}
// pruefe ob nur TextNodes in der Selection liegen
{
- ULONG nStart = pStart->nNode.GetIndex(),
+ sal_uLong nStart = pStart->nNode.GetIndex(),
nEnd = pEnd->nNode.GetIndex();
while( nStart <= nEnd )
// Iterieren ueber einen selektierten Bereich
if( !GetNodes()[ nStart++ ]->IsTxtNode() )
- return FALSE;
+ return sal_False;
}
- BOOL bUndo = DoesUndo();
+ sal_Bool bUndo = DoesUndo();
if( bUndo )
StartUndo( UNDO_START, NULL );
@@ -368,7 +368,7 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
if( IsRedlineOn() || (!IsIgnoreRedline() && pRedlineTbl->Count() ))
{
pRedlPam = new SwPaM( pStart->nNode, pEnd->nNode, -1, 1 );
- SwCntntNode* pCNd = pRedlPam->GetCntntNode( FALSE );
+ SwCntntNode* pCNd = pRedlPam->GetCntntNode( sal_False );
if( pCNd )
pRedlPam->GetMark()->nContent = pCNd->Len();
@@ -377,7 +377,7 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
if( bUndo )
{
pRedlUndo = new SwUndoRedlineSort( *pRedlPam,rOpt );
- DoUndo( FALSE );
+ DoUndo( sal_False );
}
// erst den Bereich kopieren, dann
SwNodeIndex aEndIdx( pEnd->nNode, 1 );
@@ -388,11 +388,11 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
DeleteRedline( *pRedlPam, true, USHRT_MAX );
pRedlPam->GetMark()->nNode.Assign( pEnd->nNode.GetNode(), 1 );
- pCNd = pRedlPam->GetCntntNode( FALSE );
+ pCNd = pRedlPam->GetCntntNode( sal_False );
pRedlPam->GetMark()->nContent.Assign( pCNd, 0 );
pRedlPam->GetPoint()->nNode.Assign( aEndIdx.GetNode() );
- pCNd = pRedlPam->GetCntntNode( TRUE );
+ pCNd = pRedlPam->GetCntntNode( sal_True );
xub_StrLen nCLen = 0;
if( !pCNd &&
0 != (pCNd = GetNodes()[ aEndIdx.GetIndex()-1 ]->GetCntntNode()))
@@ -426,15 +426,15 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
// Und jetzt der Akt: Verschieben von Nodes und immer schoen auf UNDO
// achten
//
- ULONG nBeg = pStart->nNode.GetIndex();
+ sal_uLong nBeg = pStart->nNode.GetIndex();
SwNodeRange aRg( aStart, aStart );
if( bUndo && !pRedlUndo )
AppendUndo( pUndoSort = new SwUndoSort( rPaM, rOpt ) );
- DoUndo( FALSE );
+ DoUndo( sal_False );
- for ( USHORT n = 0; n < aSortArr.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aSortArr.Count(); ++n )
{
SwSortTxtElement* pBox = (SwSortTxtElement*)aSortArr[n];
aStart = nBeg + n;
@@ -499,20 +499,20 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
if( bUndo )
EndUndo( UNDO_END, NULL );
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
Beschreibung: Tabelle sortieren im Document
--------------------------------------------------------------------*/
-BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
+sal_Bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
{
// uebers SwDoc fuer Undo !!
ASSERT( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// Auf gehts sortieren
// suche alle Boxen / Lines
@@ -523,12 +523,12 @@ BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
}
if(!aFndBox.GetLines().Count())
- return FALSE;
+ return sal_False;
if( !IsIgnoreRedline() && GetRedlineTbl().Count() )
DeleteRedline( *pTblNd, true, USHRT_MAX );
- USHORT nStart = 0;
+ sal_uInt16 nStart = 0;
if( pTblNd->GetTable().GetRowsToRepeat() > 0 && rOpt.eDirection == SRT_ROWS )
{
// Oberste seleketierte Zeile
@@ -561,7 +561,7 @@ BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
FlatFndBox aFlatBox(this, aFndBox);
if(!aFlatBox.IsSymmetric())
- return FALSE;
+ return sal_False;
// MIB 9.7.97: HTML-Layout loeschen
pTblNd->GetTable().SetHTMLTableLayout( 0 );
@@ -576,7 +576,7 @@ BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
// ? TL_CHART2: ?
// Redo loeschen bevor Undo
- BOOL bUndo = DoesUndo();
+ sal_Bool bUndo = DoesUndo();
SwUndoSort* pUndoSort = 0;
if(bUndo)
{
@@ -585,11 +585,11 @@ BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
rBoxes[rBoxes.Count()-1]->GetSttIdx(),
*pTblNd, rOpt, aFlatBox.HasItemSets() );
AppendUndo(pUndoSort);
- DoUndo(FALSE);
+ DoUndo(sal_False);
}
// SchluesselElemente einsortieren
- USHORT nCount = (rOpt.eDirection == SRT_ROWS) ?
+ sal_uInt16 nCount = (rOpt.eDirection == SRT_ROWS) ?
aFlatBox.GetRows() : aFlatBox.GetCols();
// SortList nach Schluessel sortieren
@@ -598,7 +598,7 @@ BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
// wenn die HeaderLine wiederholt wird und die
// Zeilen sortiert werden 1.Zeile nicht mitsortieren
- USHORT i;
+ sal_uInt16 i;
for( i = nStart; i < nCount; ++i)
{
@@ -620,7 +620,7 @@ BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
// Restore table frames:
// --> FME 2004-11-26 #i37739# A simple 'MakeFrms' after the node sorting
// does not work if the table is inside a frame and has no prev/next.
- const ULONG nIdx = pTblNd->GetIndex();
+ const sal_uLong nIdx = pTblNd->GetIndex();
aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 );
// <--
@@ -635,7 +635,7 @@ BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
DoUndo(bUndo);
SetModified();
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -643,10 +643,10 @@ BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
--------------------------------------------------------------------*/
-void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, USHORT nS, USHORT nT,
+void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT,
SwMovedBoxes& rMovedList, SwUndoSort* pUD)
{
- for( USHORT i=0; i < rBox.GetCols(); ++i )
+ for( sal_uInt16 i=0; i < rBox.GetCols(); ++i )
{ // Alte Zellen-Pos bestimmen und merken
const _FndBox* pSource = rBox.GetBox(i, nS);
@@ -656,7 +656,7 @@ void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, USHORT nS, USHORT nT,
const SwTableBox* pT = pTarget->GetBox();
const SwTableBox* pS = pSource->GetBox();
- BOOL bMoved = rMovedList.GetPos(pT) != USHRT_MAX;
+ sal_Bool bMoved = rMovedList.GetPos(pT) != USHRT_MAX;
// und verschieben
MoveCell(pDoc, pS, pT, bMoved, pUD);
@@ -691,10 +691,10 @@ void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, USHORT nS, USHORT nT,
--------------------------------------------------------------------*/
-void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, USHORT nS, USHORT nT,
+void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT,
SwMovedBoxes& rMovedList, SwUndoSort* pUD)
{
- for(USHORT i=0; i < rBox.GetRows(); ++i)
+ for(sal_uInt16 i=0; i < rBox.GetRows(); ++i)
{ // Alte Zellen-Pos bestimmen und merken
const _FndBox* pSource = rBox.GetBox(nS, i);
@@ -706,7 +706,7 @@ void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, USHORT nS, USHORT nT,
const SwTableBox* pS = pSource->GetBox();
// und verschieben
- BOOL bMoved = rMovedList.GetPos(pT) != USHRT_MAX;
+ sal_Bool bMoved = rMovedList.GetPos(pT) != USHRT_MAX;
MoveCell(pDoc, pS, pT, bMoved, pUD);
rMovedList.Insert(pS, rMovedList.Count() );
@@ -740,7 +740,7 @@ void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, USHORT nS, USHORT nT,
void MoveCell(SwDoc* pDoc, const SwTableBox* pSource, const SwTableBox* pTar,
- BOOL bMovedBefore, SwUndoSort* pUD)
+ sal_Bool bMovedBefore, SwUndoSort* pUD)
{
ASSERT(pSource && pTar,"Fehlende Quelle oder Ziel");
@@ -767,9 +767,9 @@ void MoveCell(SwDoc* pDoc, const SwTableBox* pSource, const SwTableBox* pTar,
// Ziel
SwNodeIndex aTar( *pTar->GetSttNd() );
pNd = pDoc->GetNodes().GoNext( &aTar ); // naechsten ContentNode
- ULONG nCount = pNd->EndOfSectionIndex() - pNd->StartOfSectionIndex();
+ sal_uLong nCount = pNd->EndOfSectionIndex() - pNd->StartOfSectionIndex();
- BOOL bDelFirst = FALSE;
+ sal_Bool bDelFirst = sal_False;
if( nCount == 2 )
{
ASSERT( pNd->GetCntntNode(), "Kein ContentNode");
@@ -836,26 +836,26 @@ FlatFndBox::~FlatFndBox()
--------------------------------------------------------------------*/
-BOOL FlatFndBox::CheckLineSymmetry(const _FndBox& rBox)
+sal_Bool FlatFndBox::CheckLineSymmetry(const _FndBox& rBox)
{
const _FndLines &rLines = rBox.GetLines();
- USHORT nBoxes(0);
+ sal_uInt16 nBoxes(0);
// UeberLines iterieren
- for(USHORT i=0; i < rLines.Count(); ++i)
+ for(sal_uInt16 i=0; i < rLines.Count(); ++i)
{ // Die Boxen einer Line
_FndLine* pLn = rLines[i];
const _FndBoxes& rBoxes = pLn->GetBoxes();
// Anzahl der Boxen aller Lines ungleich -> keine Symmetrie
if( i && nBoxes != rBoxes.Count())
- return FALSE;
+ return sal_False;
nBoxes = rBoxes.Count();
if( !CheckBoxSymmetry( *pLn ) )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -864,26 +864,26 @@ BOOL FlatFndBox::CheckLineSymmetry(const _FndBox& rBox)
--------------------------------------------------------------------*/
-BOOL FlatFndBox::CheckBoxSymmetry(const _FndLine& rLn)
+sal_Bool FlatFndBox::CheckBoxSymmetry(const _FndLine& rLn)
{
const _FndBoxes &rBoxes = rLn.GetBoxes();
- USHORT nLines(0);
+ sal_uInt16 nLines(0);
// Ueber Boxes iterieren
- for(USHORT i=0; i < rBoxes.Count(); ++i)
+ for(sal_uInt16 i=0; i < rBoxes.Count(); ++i)
{ // Die Boxen einer Line
_FndBox* pBox = rBoxes[i];
const _FndLines& rLines = pBox->GetLines();
// Anzahl der Boxen aller Lines ungleich -> keine Symmetrie
if( i && nLines != rLines.Count() )
- return FALSE;
+ return sal_False;
nLines = rLines.Count();
if( nLines && !CheckLineSymmetry( *pBox ) )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -891,20 +891,20 @@ BOOL FlatFndBox::CheckBoxSymmetry(const _FndLine& rLn)
--------------------------------------------------------------------*/
-USHORT FlatFndBox::GetColCount(const _FndBox& rBox)
+sal_uInt16 FlatFndBox::GetColCount(const _FndBox& rBox)
{
const _FndLines& rLines = rBox.GetLines();
// Ueber Lines iterieren
if( !rLines.Count() )
return 1;
- USHORT nSum = 0;
- for( USHORT i=0; i < rLines.Count(); ++i )
+ sal_uInt16 nSum = 0;
+ for( sal_uInt16 i=0; i < rLines.Count(); ++i )
{
// Die Boxen einer Line
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
const _FndBoxes& rBoxes = rLines[i]->GetBoxes();
- for( USHORT j=0; j < rBoxes.Count(); ++j )
+ for( sal_uInt16 j=0; j < rBoxes.Count(); ++j )
// Rekursiv wirder ueber die Lines Iterieren
nCount += rBoxes[j]->GetLines().Count()
? GetColCount(*rBoxes[j]) : 1;
@@ -920,18 +920,18 @@ USHORT FlatFndBox::GetColCount(const _FndBox& rBox)
--------------------------------------------------------------------*/
-USHORT FlatFndBox::GetRowCount(const _FndBox& rBox)
+sal_uInt16 FlatFndBox::GetRowCount(const _FndBox& rBox)
{
const _FndLines& rLines = rBox.GetLines();
if( !rLines.Count() )
return 1;
- USHORT nLines = 0;
- for(USHORT i=0; i < rLines.Count(); ++i)
+ sal_uInt16 nLines = 0;
+ for(sal_uInt16 i=0; i < rLines.Count(); ++i)
{ // Die Boxen einer Line
const _FndBoxes& rBoxes = rLines[i]->GetBoxes();
- USHORT nLn = 1;
- for(USHORT j=0; j < rBoxes.Count(); ++j)
+ sal_uInt16 nLn = 1;
+ for(sal_uInt16 j=0; j < rBoxes.Count(); ++j)
if( rBoxes[j]->GetLines().Count() )
// Rekursiv ueber die Lines Iterieren
nLn = Max(GetRowCount(*rBoxes[j]), nLn);
@@ -946,19 +946,19 @@ USHORT FlatFndBox::GetRowCount(const _FndBox& rBox)
--------------------------------------------------------------------*/
-void FlatFndBox::FillFlat(const _FndBox& rBox, BOOL bLastBox)
+void FlatFndBox::FillFlat(const _FndBox& rBox, sal_Bool bLastBox)
{
- BOOL bModRow = FALSE;
+ sal_Bool bModRow = sal_False;
const _FndLines& rLines = rBox.GetLines();
// Ueber Lines iterieren
- USHORT nOldRow = nRow;
- for( USHORT i=0; i < rLines.Count(); ++i )
+ sal_uInt16 nOldRow = nRow;
+ for( sal_uInt16 i=0; i < rLines.Count(); ++i )
{
// Die Boxen einer Line
const _FndBoxes& rBoxes = rLines[i]->GetBoxes();
- USHORT nOldCol = nCol;
- for( USHORT j = 0; j < rBoxes.Count(); ++j )
+ sal_uInt16 nOldCol = nCol;
+ for( sal_uInt16 j = 0; j < rBoxes.Count(); ++j )
{
// Die Box pruefen ob es eine atomare Box ist
const _FndBox* pBox = rBoxes[ j ];
@@ -966,7 +966,7 @@ void FlatFndBox::FillFlat(const _FndBox& rBox, BOOL bLastBox)
if( !pBox->GetLines().Count() )
{
// peichern
- USHORT nOff = nRow * nCols + nCol;
+ sal_uInt16 nOff = nRow * nCols + nCol;
*(pArr + nOff) = pBox;
// sicher die Formel/Format/Value Werte
@@ -987,7 +987,7 @@ void FlatFndBox::FillFlat(const _FndBox& rBox, BOOL bLastBox)
*(ppItemSets + nOff ) = pSet;
}
- bModRow = TRUE;
+ bModRow = sal_True;
}
else
{
@@ -1009,16 +1009,16 @@ void FlatFndBox::FillFlat(const _FndBox& rBox, BOOL bLastBox)
--------------------------------------------------------------------*/
-const _FndBox* FlatFndBox::GetBox(USHORT n_Col, USHORT n_Row) const
+const _FndBox* FlatFndBox::GetBox(sal_uInt16 n_Col, sal_uInt16 n_Row) const
{
- USHORT nOff = n_Row * nCols + n_Col;
+ sal_uInt16 nOff = n_Row * nCols + n_Col;
const _FndBox* pTmp = *(pArr + nOff);
ASSERT(n_Col < nCols && n_Row < nRows && pTmp, "unzulaessiger Array-Zugriff");
return pTmp;
}
-const SfxItemSet* FlatFndBox::GetItemSet(USHORT n_Col, USHORT n_Row) const
+const SfxItemSet* FlatFndBox::GetItemSet(sal_uInt16 n_Col, sal_uInt16 n_Row) const
{
ASSERT( !ppItemSets || ( n_Col < nCols && n_Row < nRows), "unzulaessiger Array-Zugriff");
diff --git a/sw/source/core/doc/docstat.cxx b/sw/source/core/doc/docstat.cxx
index ee53168bb175..ee44bf142de3 100644
--- a/sw/source/core/doc/docstat.cxx
+++ b/sw/source/core/doc/docstat.cxx
@@ -45,7 +45,7 @@ SwDocStat::SwDocStat() :
nAllPara(1),
nWord(0),
nChar(0),
- bModified(TRUE)
+ bModified(sal_True)
{}
/************************************************************************
@@ -62,6 +62,6 @@ void SwDocStat::Reset()
nAllPara= 1;
nWord = 0;
nChar = 0;
- bModified = TRUE;
+ bModified = sal_True;
}
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index b7395402d01d..d0e1d3b4f158 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -101,10 +101,10 @@ typedef LinkStruct* LinkStructPtr;
SV_DECL_PTRARR(LinkStructArr, LinkStructPtr, 0, 5 )
SV_IMPL_PTRARR(LinkStructArr, LinkStructPtr)
-USHORT SwDoc::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
+sal_uInt16 SwDoc::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
{
if( rArr.Count() )
- rArr.Remove( USHORT(0), rArr.Count() );
+ rArr.Remove( sal_uInt16(0), rArr.Count() );
// dann mal ueber den Pool und alle Primary oder Secondary heraussuchen
const SwTxtTOXMark* pMark;
@@ -137,7 +137,7 @@ USHORT SwDoc::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
--------------------------------------------------------------------*/
-USHORT SwDoc::GetCurTOXMark( const SwPosition& rPos,
+sal_uInt16 SwDoc::GetCurTOXMark( const SwPosition& rPos,
SwTOXMarks& rArr ) const
{
// suche an der Position rPos nach allen SwTOXMark's
@@ -153,7 +153,7 @@ USHORT SwDoc::GetCurTOXMark( const SwPosition& rPos,
xub_StrLen nAktPos = rPos.nContent.GetIndex();
- for( USHORT n = 0; n < rHts.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rHts.Count(); ++n )
{
if( RES_TXTATR_TOXMARK != (pHt = rHts[n])->Which() )
continue;
@@ -217,10 +217,10 @@ void SwDoc::DeleteTOXMark( const SwTOXMark* pTOXMark )
class CompareNodeCntnt
{
- ULONG nNode;
+ sal_uLong nNode;
xub_StrLen nCntnt;
public:
- CompareNodeCntnt( ULONG nNd, xub_StrLen nCnt )
+ CompareNodeCntnt( sal_uLong nNd, xub_StrLen nCnt )
: nNode( nNd ), nCntnt( nCnt ) {}
int operator==( const CompareNodeCntnt& rCmp )
@@ -242,7 +242,7 @@ public:
};
const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
- SwTOXSearch eDir, BOOL bInReadOnly )
+ SwTOXSearch eDir, sal_Bool bInReadOnly )
{
const SwTxtTOXMark* pMark = rCurTOXMark.GetTxtTOXMark();
ASSERT(pMark, "pMark==0 Ungueltige TxtTOXMark");
@@ -271,7 +271,7 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
if( pTOXMark != &rCurTOXMark &&
0 != ( pMark = pTOXMark->GetTxtTOXMark()) &&
0 != ( pTOXSrc = pMark->GetpTxtNd() ) &&
- 0 != ( pCFrm = pTOXSrc->GetFrm( &aPt, 0, FALSE )) &&
+ 0 != ( pCFrm = pTOXSrc->GetFrm( &aPt, 0, sal_False )) &&
( bInReadOnly || !pCFrm->IsProtected() ))
{
CompareNodeCntnt aAbsNew( pTOXSrc->GetIndex(), *pMark->GetStart() );
@@ -290,12 +290,12 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
if ( (aAbsNew < aAbsIdx && aAbsNew > aPrevPos &&
aPrevPos != aAbsIdx && aAbsNew != aAbsIdx ) ||
(aAbsIdx == aAbsNew &&
- (ULONG(&rCurTOXMark) > ULONG(pTOXMark) &&
+ (sal_uLong(&rCurTOXMark) > sal_uLong(pTOXMark) &&
(!pNew ||
(pNew && (aPrevPos < aAbsIdx ||
- ULONG(pNew) < ULONG(pTOXMark)))))) ||
+ sal_uLong(pNew) < sal_uLong(pTOXMark)))))) ||
(aPrevPos == aAbsNew && aAbsIdx != aAbsNew &&
- ULONG(pTOXMark) > ULONG(pNew)) )
+ sal_uLong(pTOXMark) > sal_uLong(pNew)) )
{
pNew = pTOXMark;
aPrevPos = aAbsNew;
@@ -315,12 +315,12 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
if ( (aAbsNew > aAbsIdx && aAbsNew < aNextPos &&
aNextPos != aAbsIdx && aAbsNew != aAbsIdx ) ||
(aAbsIdx == aAbsNew &&
- (ULONG(&rCurTOXMark) < ULONG(pTOXMark) &&
+ (sal_uLong(&rCurTOXMark) < sal_uLong(pTOXMark) &&
(!pNew ||
(pNew && (aNextPos > aAbsIdx ||
- ULONG(pNew) > ULONG(pTOXMark)))))) ||
+ sal_uLong(pNew) > sal_uLong(pTOXMark)))))) ||
(aNextPos == aAbsNew && aAbsIdx != aAbsNew &&
- ULONG(pTOXMark) < ULONG(pNew)) )
+ sal_uLong(pTOXMark) < sal_uLong(pNew)) )
{
pNew = pTOXMark;
aNextPos = aAbsNew;
@@ -362,7 +362,7 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
const SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos,
const SwTOXBase& rTOX,
const SfxItemSet* pSet,
- BOOL bExpand )
+ sal_Bool bExpand )
{
StartUndo( UNDO_INSTOX, NULL );
@@ -413,7 +413,7 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
-const SwTOXBaseSection* SwDoc::InsertTableOf( ULONG nSttNd, ULONG nEndNd,
+const SwTOXBaseSection* SwDoc::InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd,
const SwTOXBase& rTOX,
const SfxItemSet* pSet )
{
@@ -491,7 +491,7 @@ const SwAttrSet& SwDoc::GetTOXBaseAttrSet(const SwTOXBase& rTOXBase) const
/* -----------------02.09.99 07:48-------------------
--------------------------------------------------*/
-const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, BOOL bCreate )
+const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate )
{
SwTOXBase** prBase = 0;
switch(eTyp)
@@ -538,10 +538,10 @@ void SwDoc::SetDefaultTOXBase(const SwTOXBase& rBase)
--------------------------------------------------------------------*/
-BOOL SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
+sal_Bool SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes )
{
// its only delete the TOX, not the nodes
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ASSERT( rTOXBase.ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
const SwTOXBaseSection& rTOXSect = (const SwTOXBaseSection&)rTOXBase;
@@ -607,8 +607,8 @@ BOOL SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
if( !bDelNodes )
{
SwSections aArr( 0, 4 );
- USHORT nCnt = pFmt->GetChildSections( aArr, SORTSECT_NOT, FALSE );
- for( USHORT n = 0; n < nCnt; ++n )
+ sal_uInt16 nCnt = pFmt->GetChildSections( aArr, SORTSECT_NOT, sal_False );
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
SwSection* pSect = aArr[ n ];
if( TOX_HEADER_SECTION == pSect->GetType() )
@@ -621,7 +621,7 @@ BOOL SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
DelSectionFmt( pFmt, bDelNodes );
EndUndo( UNDO_CLEARTOXRANGE, NULL );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -631,11 +631,11 @@ BOOL SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
Beschreibung: Verzeichnistypen verwalten
--------------------------------------------------------------------*/
-USHORT SwDoc::GetTOXTypeCount(TOXTypes eTyp) const
+sal_uInt16 SwDoc::GetTOXTypeCount(TOXTypes eTyp) const
{
const SwTOXTypePtr * ppTTypes = pTOXTypes->GetData();
- USHORT nCnt = 0;
- for( USHORT n = 0; n < pTOXTypes->Count(); ++n, ++ppTTypes )
+ sal_uInt16 nCnt = 0;
+ for( sal_uInt16 n = 0; n < pTOXTypes->Count(); ++n, ++ppTTypes )
if( eTyp == (*ppTTypes)->GetType() )
++nCnt;
return nCnt;
@@ -643,11 +643,11 @@ USHORT SwDoc::GetTOXTypeCount(TOXTypes eTyp) const
/*--------------------------------------------------------------------
--------------------------------------------------------------------*/
-const SwTOXType* SwDoc::GetTOXType( TOXTypes eTyp, USHORT nId ) const
+const SwTOXType* SwDoc::GetTOXType( TOXTypes eTyp, sal_uInt16 nId ) const
{
const SwTOXTypePtr * ppTTypes = pTOXTypes->GetData();
- USHORT nCnt = 0;
- for( USHORT n = 0; n < pTOXTypes->Count(); ++n, ++ppTTypes )
+ sal_uInt16 nCnt = 0;
+ for( sal_uInt16 n = 0; n < pTOXTypes->Count(); ++n, ++ppTTypes )
if( eTyp == (*ppTTypes)->GetType() && nCnt++ == nId )
return (*ppTTypes);
return 0;
@@ -668,7 +668,7 @@ const SwTOXType* SwDoc::InsertTOXType( const SwTOXType& rTyp )
String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType,
const String* pChkStr ) const
{
- USHORT n;
+ sal_uInt16 n;
const SwSectionNode* pSectNd;
const SwSection* pSect;
@@ -677,21 +677,21 @@ String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType,
String aName( rType.GetTypeName() );
xub_StrLen nNmLen = aName.Len();
- USHORT nNum = 0;
- USHORT nTmp = 0;
- USHORT nFlagSize = ( pSectionFmtTbl->Count() / 8 ) +2;
- BYTE* pSetFlags = new BYTE[ nFlagSize ];
+ sal_uInt16 nNum = 0;
+ sal_uInt16 nTmp = 0;
+ sal_uInt16 nFlagSize = ( pSectionFmtTbl->Count() / 8 ) +2;
+ sal_uInt8* pSetFlags = new sal_uInt8[ nFlagSize ];
memset( pSetFlags, 0, nFlagSize );
for( n = 0; n < pSectionFmtTbl->Count(); ++n )
- if( 0 != ( pSectNd = (*pSectionFmtTbl)[ n ]->GetSectionNode( FALSE ) )&&
+ if( 0 != ( pSectNd = (*pSectionFmtTbl)[ n ]->GetSectionNode( sal_False ) )&&
TOX_CONTENT_SECTION == (pSect = &pSectNd->GetSection())->GetType())
{
const String& rNm = pSect->GetSectionName();
if( rNm.Match( aName ) == nNmLen )
{
// Nummer bestimmen und das Flag setzen
- nNum = (USHORT)rNm.Copy( nNmLen ).ToInt32();
+ nNum = (sal_uInt16)rNm.Copy( nNmLen ).ToInt32();
if( nNum-- && nNum < pSectionFmtTbl->Count() )
pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 ));
}
@@ -722,14 +722,14 @@ String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType,
/*--------------------------------------------------------------------
--------------------------------------------------------------------*/
-BOOL SwDoc::SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName)
+sal_Bool SwDoc::SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName)
{
ASSERT( rTOXBase.ISA( SwTOXBaseSection ),
"keine TOXBaseSection!" );
SwTOXBaseSection* pTOX = (SwTOXBaseSection*)&rTOXBase;
String sTmp = GetUniqueTOXBaseName(*rTOXBase.GetTOXType(), &rName);
- BOOL bRet = sTmp == rName;
+ sal_Bool bRet = sTmp == rName;
if(bRet)
{
pTOX->SetTOXName(rName);
@@ -741,7 +741,7 @@ BOOL SwDoc::SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName)
/* */
-const SwTxtNode* lcl_FindChapterNode( const SwNode& rNd, BYTE nLvl = 0 )
+const SwTxtNode* lcl_FindChapterNode( const SwNode& rNd, sal_uInt8 nLvl = 0 )
{
const SwNode* pNd = &rNd;
if( pNd->GetNodes().GetEndOfExtras().GetIndex() > pNd->GetIndex() )
@@ -749,7 +749,7 @@ const SwTxtNode* lcl_FindChapterNode( const SwNode& rNd, BYTE nLvl = 0 )
// then find the "Anchor" (Body) position
Point aPt;
SwNode2Layout aNode2Layout( *pNd, pNd->GetIndex() );
- const SwFrm* pFrm = aNode2Layout.GetFrm( &aPt, 0, FALSE );
+ const SwFrm* pFrm = aNode2Layout.GetFrm( &aPt, 0, sal_False );
if( pFrm )
{
@@ -780,9 +780,9 @@ SwTOXBaseSection::~SwTOXBaseSection()
}
-BOOL SwTOXBaseSection::SetPosAtStartEnd( SwPosition& rPos, BOOL bAtStart ) const
+sal_Bool SwTOXBaseSection::SetPosAtStartEnd( SwPosition& rPos, sal_Bool bAtStart ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwSectionNode* pSectNd = GetFmt()->GetSectionNode();
if( pSectNd )
{
@@ -800,7 +800,7 @@ BOOL SwTOXBaseSection::SetPosAtStartEnd( SwPosition& rPos, BOOL bAtStart ) const
if( pCNd ) nC = pCNd->Len();
}
rPos.nContent.Assign( pCNd, nC );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -837,7 +837,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
// determine page description of table-of-content
sal_uInt32 nPgDescNdIdx = pSectNd->GetIndex() + 1;
sal_uInt32* pPgDescNdIdx = &nPgDescNdIdx;
- pDefaultPageDesc = pSectNd->FindPageDesc( FALSE, pPgDescNdIdx );
+ pDefaultPageDesc = pSectNd->FindPageDesc( sal_False, pPgDescNdIdx );
if ( nPgDescNdIdx < pSectNd->GetIndex() )
{
pDefaultPageDesc = 0;
@@ -859,7 +859,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
eBreak == SVX_BREAK_PAGE_BOTH )
)
{
- pDefaultPageDesc = pNdAfterTOX->FindPageDesc( FALSE );
+ pDefaultPageDesc = pNdAfterTOX->FindPageDesc( sal_False );
}
}
// OD 28.04.2003 #109166# - consider start node of content section in
@@ -872,7 +872,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
// determine page description of content before table-of-content
SwNodeIndex aIdx( *pSectNd );
pDefaultPageDesc =
- pSectNd->GetNodes().GoPrevious( &aIdx )->FindPageDesc( FALSE );
+ pSectNd->GetNodes().GoPrevious( &aIdx )->FindPageDesc( sal_False );
}
if ( !pDefaultPageDesc )
@@ -928,7 +928,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
}
aEndIdx--;
SwPosition aPos( aEndIdx, SwIndex( pFirstEmptyNd, 0 ));
- pDoc->CorrAbs( aSttIdx, aEndIdx, aPos, TRUE );
+ pDoc->CorrAbs( aSttIdx, aEndIdx, aPos, sal_True );
// delete all before
DelFlyInRange( aSttIdx, aEndIdx );
@@ -1005,9 +1005,9 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
// sortierte Liste aller Verzeichnismarken und Verzeichnisbereiche
void* p = 0;
String* pStr = 0;
- USHORT nCnt = 0, nFormMax = GetTOXForm().GetFormMax();
- SvStringsDtor aStrArr( (BYTE)nFormMax );
- SvPtrarr aCollArr( (BYTE)nFormMax );
+ sal_uInt16 nCnt = 0, nFormMax = GetTOXForm().GetFormMax();
+ SvStringsDtor aStrArr( (sal_uInt8)nFormMax );
+ SvPtrarr aCollArr( (sal_uInt8)nFormMax );
for( ; nCnt < nFormMax; ++nCnt )
{
aCollArr.Insert( p, nCnt );
@@ -1020,7 +1020,7 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
::SetProgressState( 0, pDoc->GetDocShell() );
// setze den Text in das Verzeichniss
- USHORT nLvl = aSortArr[ nCnt ]->GetLevel();
+ sal_uInt16 nLvl = aSortArr[ nCnt ]->GetLevel();
SwTxtFmtColl* pColl = (SwTxtFmtColl*)aCollArr[ nLvl ];
if( !pColl )
{
@@ -1038,7 +1038,7 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
// fuer die Seitennummer eintragen
//if it is a TOX_INDEX and the SwForm IsCommaSeparated()
// then a range of entries must be generated into one paragraph
- USHORT nRange = 1;
+ sal_uInt16 nRange = 1;
if(TOX_INDEX == SwTOXBase::GetType() &&
GetTOXForm().IsCommaSeparated() &&
aSortArr[nCnt]->GetType() == TOX_SORT_INDEX)
@@ -1068,7 +1068,7 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
if( !aCorPam.Move( fnMoveForward ) )
aCorPam.Move( fnMoveBackward );
SwNodeIndex aEndIdx( aInsPos, 1 );
- pDoc->CorrAbs( aInsPos, aEndIdx, *aCorPam.GetPoint(), TRUE );
+ pDoc->CorrAbs( aInsPos, aEndIdx, *aCorPam.GetPoint(), sal_True );
// Task 70995 - save and restore PageDesc and Break Attributes
if( pFirstEmptyNd->HasSwAttrSet() )
@@ -1084,7 +1084,7 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
}
// now create the new Frames
- ULONG nIdx = pSectNd->GetIndex();
+ sal_uLong nIdx = pSectNd->GetIndex();
// don't delete if index is empty
if(nIdx + 2 < pSectNd->EndOfSectionIndex())
pDoc->GetNodes().Delete( aInsPos, 1 );
@@ -1105,12 +1105,12 @@ void SwTOXBaseSection::InsertAlphaDelimitter( const SwTOXInternational& rIntl )
{
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
String sDeli, sLastDeli;
- USHORT i = 0;
+ sal_uInt16 i = 0;
while( i < aSortArr.Count() )
{
::SetProgressState( 0, pDoc->GetDocShell() );
- USHORT nLevel = aSortArr[i]->GetLevel();
+ sal_uInt16 nLevel = aSortArr[i]->GetLevel();
// Alpha-Delimitter ueberlesen
if( nLevel == FORM_ALPHA_DELIMITTER )
@@ -1146,14 +1146,14 @@ void SwTOXBaseSection::InsertAlphaDelimitter( const SwTOXInternational& rIntl )
Beschreibung: Template auswerten
--------------------------------------------------------------------*/
-SwTxtFmtColl* SwTOXBaseSection::GetTxtFmtColl( USHORT nLevel )
+SwTxtFmtColl* SwTOXBaseSection::GetTxtFmtColl( sal_uInt16 nLevel )
{
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
const String& rName = GetTOXForm().GetTemplate( nLevel );
SwTxtFmtColl* pColl = rName.Len() ? pDoc->FindTxtFmtCollByName(rName) :0;
if( !pColl )
{
- USHORT nPoolFmt = 0;
+ sal_uInt16 nPoolFmt = 0;
const TOXTypes eMyType = SwTOXBase::GetType();
switch( eMyType )
{
@@ -1283,13 +1283,13 @@ void SwTOXBaseSection::UpdateOutline( const SwTxtNode* pOwnChapterNode )
SwNodes& rNds = pDoc->GetNodes();
const SwOutlineNodes& rOutlNds = rNds.GetOutLineNds();
- for( USHORT n = 0; n < rOutlNds.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rOutlNds.Count(); ++n )
{
::SetProgressState( 0, pDoc->GetDocShell() );
SwTxtNode* pTxtNd = rOutlNds[ n ]->GetTxtNode();
if( pTxtNd && pTxtNd->Len() && pTxtNd->GetDepends() &&
- //USHORT(pTxtNd->GetTxtColl()->GetOutlineLevel()+1) <= GetLevel() && //#outline level,zhaojianwei
- USHORT( pTxtNd->GetAttrOutlineLevel()) <= GetLevel() && //<-end,zhaojianwei
+ //sal_uInt16(pTxtNd->GetTxtColl()->GetOutlineLevel()+1) <= GetLevel() && //#outline level,zhaojianwei
+ sal_uInt16( pTxtNd->GetAttrOutlineLevel()) <= GetLevel() && //<-end,zhaojianwei
pTxtNd->GetFrm() &&
!pTxtNd->HasHiddenParaField() &&
!pTxtNd->HasHiddenCharAttribute( true ) &&
@@ -1309,11 +1309,11 @@ void SwTOXBaseSection::UpdateOutline( const SwTxtNode* pOwnChapterNode )
void SwTOXBaseSection::UpdateTemplate( const SwTxtNode* pOwnChapterNode )
{
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
String sTmpStyleNames = GetStyleNames(i);
- USHORT nTokenCount = sTmpStyleNames.GetTokenCount(TOX_STYLE_DELIMITER);
- for( USHORT nStyle = 0; nStyle < nTokenCount; ++nStyle )
+ sal_uInt16 nTokenCount = sTmpStyleNames.GetTokenCount(TOX_STYLE_DELIMITER);
+ for( sal_uInt16 nStyle = 0; nStyle < nTokenCount; ++nStyle )
{
SwTxtFmtColl* pColl = pDoc->FindTxtFmtCollByName(
sTmpStyleNames.GetToken( nStyle,
@@ -1433,9 +1433,9 @@ long lcl_IsSOObject( const SvGlobalName& rFactoryNm )
long nFlag;
// GlobalNameId
struct _GlobalNameIds {
- UINT32 n1;
- USHORT n2, n3;
- BYTE b8, b9, b10, b11, b12, b13, b14, b15;
+ sal_uInt32 n1;
+ sal_uInt16 n2, n3;
+ sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15;
} aGlNmIds[4];
} aArr[] = {
{ nsSwTOOElements::TOO_MATH,
@@ -1482,7 +1482,7 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
SwNodes& rNds = pDoc->GetNodes();
// auf den 1. Node der 1. Section
- ULONG nIdx = rNds.GetEndOfAutotext().StartOfSectionIndex() + 2,
+ sal_uLong nIdx = rNds.GetEndOfAutotext().StartOfSectionIndex() + 2,
nEndIdx = rNds.GetEndOfAutotext().GetIndex();
while( nIdx < nEndIdx )
@@ -1511,7 +1511,7 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
case nsSwTOXElement::TOX_OLE:
if( pNd->IsOLENode() )
{
- BOOL bInclude = TRUE;
+ sal_Bool bInclude = sal_True;
if(TOX_OBJECTS == SwTOXBase::GetType())
{
SwOLENode* pOLENode = pNd->GetOLENode();
@@ -1528,7 +1528,7 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
else
{
DBG_ERROR("OLE-object nicht geladen?");
- bInclude = FALSE;
+ bInclude = sal_False;
}
}
@@ -1554,7 +1554,7 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
MAXLEVEL - 1 );
if( pOutlNd )
{
- //USHORT nTmp = pOutlNd->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
+ //sal_uInt16 nTmp = pOutlNd->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
//if( nTmp < NO_NUMBERING )
// nSetLevel = nTmp + 1;
if( pOutlNd->GetTxtColl()->IsAssignedToListLevelOfOutlineStyle())
@@ -1567,7 +1567,7 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
{
SwTOXPara * pNew = new SwTOXPara( *pCNd, eMyType,
( USHRT_MAX != nSetLevel )
- ? static_cast<USHORT>(nSetLevel)
+ ? static_cast<sal_uInt16>(nSetLevel)
: FORM_ALPHA_DELIMITTER );
InsertSorted( pNew );
}
@@ -1587,7 +1587,7 @@ void SwTOXBaseSection::UpdateTable( const SwTxtNode* pOwnChapterNode )
SwNodes& rNds = pDoc->GetNodes();
const SwFrmFmts& rArr = *pDoc->GetTblFrmFmts();
- for( USHORT n = 0; n < rArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rArr.Count(); ++n )
{
::SetProgressState( 0, pDoc->GetDocShell() );
@@ -1613,13 +1613,13 @@ void SwTOXBaseSection::UpdateTable( const SwTxtNode* pOwnChapterNode )
::lcl_FindChapterNode( *pCNd, MAXLEVEL - 1 );
if( pOutlNd )
{
- //USHORT nTmp = pOutlNd->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
+ //sal_uInt16 nTmp = pOutlNd->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
//if( nTmp < NO_NUMBERING )
// pNew->SetLevel( nTmp + 1 );
if( pOutlNd->GetTxtColl()->IsAssignedToListLevelOfOutlineStyle())
{
const int nTmp = pOutlNd->GetTxtColl()->GetAttrOutlineLevel();
- pNew->SetLevel( static_cast<USHORT>(nTmp) );//<-end ,zhaojianwei
+ pNew->SetLevel( static_cast<sal_uInt16>(nTmp) );//<-end ,zhaojianwei
}
}
}
@@ -1636,7 +1636,7 @@ void SwTOXBaseSection::UpdateTable( const SwTxtNode* pOwnChapterNode )
SonderZeichen 0-31 und 255 entfernen
--------------------------------------------------------------------*/
-String lcl_GetNumString( const SwTOXSortTabBase& rBase, sal_Bool bUsePrefix, BYTE nLevel )
+String lcl_GetNumString( const SwTOXSortTabBase& rBase, sal_Bool bUsePrefix, sal_uInt8 nLevel )
{
String sRet;
@@ -1656,8 +1656,8 @@ String lcl_GetNumString( const SwTOXSortTabBase& rBase, sal_Bool bUsePrefix, BYT
// OD 18.03.2003 #106329# - add parameter <_TOXSectNdIdx> and <_pDefaultPageDesc>
// in order to control, which page description is used, no appropriate one is found.
-void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
- USHORT nCount,
+void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
+ sal_uInt16 nCount,
SvStringsDtor& ,
const sal_uInt32 _nTOXSectNdIdx,
const SwPageDesc* _pDefaultPageDesc )
@@ -1670,13 +1670,13 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
SwTxtNode* pTOXNd = (SwTxtNode*)aSortArr[nArrayIdx]->pTOXNd;
String& rTxt = (String&)pTOXNd->GetTxt();
rTxt.Erase();
- for(USHORT nIndex = nArrayIdx; nIndex < nArrayIdx + nCount; nIndex++)
+ for(sal_uInt16 nIndex = nArrayIdx; nIndex < nArrayIdx + nCount; nIndex++)
{
if(nIndex > nArrayIdx)
rTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " )); // comma separation
// String mit dem Pattern aus der Form initialisieren
const SwTOXSortTabBase& rBase = *aSortArr[nIndex];
- USHORT nLvl = rBase.GetLevel();
+ sal_uInt16 nLvl = rBase.GetLevel();
ASSERT( nLvl < GetTOXForm().GetFormMax(), "ungueltiges FORM_LEVEL");
SvxTabStopItem aTStops( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
@@ -1696,7 +1696,7 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
{
case TOKEN_ENTRY_NO:
// fuer Inhaltsverzeichnis Numerierung
- rTxt.Insert( lcl_GetNumString( rBase, aToken.nChapterFormat == CF_NUMBER, static_cast<BYTE>(aToken.nOutlineLevel - 1)) );
+ rTxt.Insert( lcl_GetNumString( rBase, aToken.nChapterFormat == CF_NUMBER, static_cast<sal_uInt8>(aToken.nOutlineLevel - 1)) );
break;
case TOKEN_ENTRY_TEXT:
@@ -1725,7 +1725,7 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
{
const SvxLRSpaceItem& rLR =
(SvxLRSpaceItem&)pTOXNd->
- SwCntntNode::GetAttr( RES_LR_SPACE, TRUE );
+ SwCntntNode::GetAttr( RES_LR_SPACE, sal_True );
long nTabPosition = aToken.nTabStopPosition;
if( !GetTOXForm().IsRelTabPos() && rLR.GetTxtLeft() )
@@ -1740,20 +1740,20 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
const SwPageDesc* pPageDesc = ((SwFmtPageDesc&)pTOXNd->
SwCntntNode::GetAttr( RES_PAGEDESC )).GetPageDesc();
- BOOL bCallFindRect = TRUE;
+ sal_Bool bCallFindRect = sal_True;
long nRightMargin;
if( pPageDesc )
{
- const SwFrm* pFrm = pTOXNd->GetFrm( 0, 0, TRUE );
+ const SwFrm* pFrm = pTOXNd->GetFrm( 0, 0, sal_True );
if( !pFrm || 0 == ( pFrm = pFrm->FindPageFrm() ) ||
pPageDesc != ((SwPageFrm*)pFrm)->GetPageDesc() )
// dann muss man ueber den PageDesc gehen
- bCallFindRect = FALSE;
+ bCallFindRect = sal_False;
}
SwRect aNdRect;
if( bCallFindRect )
- aNdRect = pTOXNd->FindLayoutRect( TRUE );
+ aNdRect = pTOXNd->FindLayoutRect( sal_True );
if( aNdRect.IsEmpty() )
{
@@ -1762,7 +1762,7 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
// OD 18.03.2003 #106329# - call
sal_uInt32 nPgDescNdIdx = pTOXNd->GetIndex() + 1;
sal_uInt32* pPgDescNdIdx = &nPgDescNdIdx;
- pPageDesc = pTOXNd->FindPageDesc( FALSE, pPgDescNdIdx );
+ pPageDesc = pTOXNd->FindPageDesc( sal_False, pPgDescNdIdx );
if ( !pPageDesc ||
*pPgDescNdIdx < _nTOXSectNdIdx )
{
@@ -1804,11 +1804,11 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
{
// Die Anzahl der gleichen Eintrage bestimmt die Seitennummern-Pattern
//
- USHORT nSize = rBase.aTOXSources.Count();
+ sal_uInt16 nSize = rBase.aTOXSources.Count();
if( nSize > 0 )
{
String aInsStr( cNumRepl );
- for(USHORT i=1; i < nSize; ++i)
+ for(sal_uInt16 i=1; i < nSize; ++i)
{
aInsStr.AppendAscii( sPageDeli );
aInsStr += cNumRepl;
@@ -1841,12 +1841,12 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
{
SwChapterFieldType aFldTyp;
SwChapterField aFld( &aFldTyp, aToken.nChapterFormat );
- aFld.SetLevel( static_cast<BYTE>(aToken.nOutlineLevel - 1) );
+ aFld.SetLevel( static_cast<sal_uInt8>(aToken.nOutlineLevel - 1) );
// --> OD 2008-02-14 #i53420#
-// aFld.ChangeExpansion( pFrm, (SwTxtNode*)pTOXSource->pNd, TRUE );
+// aFld.ChangeExpansion( pFrm, (SwTxtNode*)pTOXSource->pNd, sal_True );
aFld.ChangeExpansion( pFrm,
dynamic_cast<const SwCntntNode*>(pTOXSource->pNd),
- TRUE );
+ sal_True );
// <--
//---> i89791
// OD 2008-06-26 - continue to support CF_NUMBER
@@ -1896,7 +1896,7 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
pNewLink->aINetFmt.SetINetFmt(sLinkCharacterStyle);
if(sLinkCharacterStyle.Len())
{
- USHORT nPoolId =
+ sal_uInt16 nPoolId =
SwStyleNameMapper::GetPoolIdFromUIName( sLinkCharacterStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
pNewLink->aINetFmt.SetVisitedFmtId(nPoolId);
pNewLink->aINetFmt.SetINetFmtId(nPoolId);
@@ -1916,7 +1916,7 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
{
ToxAuthorityField eField = (ToxAuthorityField)aToken.nAuthorityField;
SwIndex aIdx( pTOXNd, rTxt.Len() );
- rBase.FillText( *pTOXNd, aIdx, static_cast<USHORT>(eField) );
+ rBase.FillText( *pTOXNd, aIdx, static_cast<sal_uInt16>(eField) );
}
break;
case TOKEN_END: break;
@@ -1945,7 +1945,7 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
}
if(aLinkArr.Count())
- for(USHORT i = 0; i < aLinkArr.Count(); ++i )
+ for(sal_uInt16 i = 0; i < aLinkArr.Count(); ++i )
{
LinkStruct* pTmp = aLinkArr.GetObject(i);
pTOXNd->InsertItem( pTmp->aINetFmt, pTmp->nStartTextPos,
@@ -1965,7 +1965,7 @@ void SwTOXBaseSection::UpdatePageNum()
// die aktuellen Seitennummern ins Verzeichnis eintragen
SwPageFrm* pAktPage = 0;
- USHORT nPage = 0;
+ sal_uInt16 nPage = 0;
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
SwTOXInternational aIntl( GetLanguage(),
@@ -1973,7 +1973,7 @@ void SwTOXBaseSection::UpdatePageNum()
GetOptions() : 0,
GetSortAlgorithm() );
- for( USHORT nCnt = 0; nCnt < aSortArr.Count(); ++nCnt )
+ for( sal_uInt16 nCnt = 0; nCnt < aSortArr.Count(); ++nCnt )
{
// Schleife ueber alle SourceNodes
SvUShorts aNums; //Die Seitennummern
@@ -1981,7 +1981,7 @@ void SwTOXBaseSection::UpdatePageNum()
SvUShorts* pMainNums = 0; // contains page numbers of main entries
// process run in lines
- USHORT nRange = 0;
+ sal_uInt16 nRange = 0;
if(GetTOXForm().IsCommaSeparated() &&
aSortArr[nCnt]->GetType() == TOX_SORT_INDEX)
{
@@ -1999,12 +1999,12 @@ void SwTOXBaseSection::UpdatePageNum()
else
nRange = 1;
- for(USHORT nRunInEntry = nCnt; nRunInEntry < nCnt + nRange; nRunInEntry++)
+ for(sal_uInt16 nRunInEntry = nCnt; nRunInEntry < nCnt + nRange; nRunInEntry++)
{
SwTOXSortTabBase* pSortBase = aSortArr[nRunInEntry];
- USHORT nSize = pSortBase->aTOXSources.Count();
- USHORT i;
- for( USHORT j = 0; j < nSize; ++j )
+ sal_uInt16 nSize = pSortBase->aTOXSources.Count();
+ sal_uInt16 i;
+ for( sal_uInt16 j = 0; j < nSize; ++j )
{
::SetProgressState( 0, pDoc->GetDocShell() );
@@ -2075,12 +2075,12 @@ void SwTOXBaseSection::UpdatePageNum()
--------------------------------------------------------------------*/
// search for the page no in the array of main entry page numbers
-BOOL lcl_HasMainEntry( const SvUShorts* pMainEntryNums, USHORT nToFind )
+sal_Bool lcl_HasMainEntry( const SvUShorts* pMainEntryNums, sal_uInt16 nToFind )
{
- for(USHORT i = 0; pMainEntryNums && i < pMainEntryNums->Count(); ++i)
+ for(sal_uInt16 i = 0; pMainEntryNums && i < pMainEntryNums->Count(); ++i)
if(nToFind == (*pMainEntryNums)[i])
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
@@ -2097,7 +2097,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
xub_StrLen nStartPos = pNd->GetTxt().Search( sSrchStr );
( sSrchStr = cNumRepl ) += cEndPageNum;
xub_StrLen nEndPos = pNd->GetTxt().Search( sSrchStr );
- USHORT i;
+ sal_uInt16 i;
if( STRING_NOTFOUND == nEndPos || !rNums.Count() )
return;
@@ -2105,14 +2105,14 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
if( STRING_NOTFOUND == nStartPos || nStartPos > nEndPos)
nStartPos = nEndPos;
- USHORT nOld = rNums[0],
+ sal_uInt16 nOld = rNums[0],
nBeg = nOld,
nCount = 0;
String aNumStr( SvxNumberType( ((SwPageDesc*)rDescs[0])->GetNumType() ).
GetNumStr( nBeg ) );
if( pCharStyleIdx && lcl_HasMainEntry( pMainEntryNums, nBeg ))
{
- USHORT nTemp = 0;
+ sal_uInt16 nTemp = 0;
pCharStyleIdx->Insert( nTemp, pCharStyleIdx->Count());
}
@@ -2121,7 +2121,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
SwCharFmt* pPageNoCharFmt = 0;
SwpHints* pHints = pNd->GetpSwpHints();
if(pHints)
- for(USHORT nHintIdx = 0; nHintIdx < pHints->GetStartCount(); nHintIdx++)
+ for(sal_uInt16 nHintIdx = 0; nHintIdx < pHints->GetStartCount(); nHintIdx++)
{
SwTxtAttr* pAttr = pHints->GetStart(nHintIdx);
xub_StrLen nTmpEnd = pAttr->GetEnd() ? *pAttr->GetEnd() : 0;
@@ -2143,7 +2143,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
// Alle folgenden aufaddieren
// break up if main entry starts or ends and
// insert a char style index
- BOOL bMainEntryChanges = lcl_HasMainEntry(pMainEntryNums, nOld)
+ sal_Bool bMainEntryChanges = lcl_HasMainEntry(pMainEntryNums, nOld)
!= lcl_HasMainEntry(pMainEntryNums, rNums[i]);
if(nOld == rNums[i]-1 && !bMainEntryChanges &&
@@ -2182,7 +2182,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
}
else
{ // Alle Nummern eintragen
- aNumStr += aType.GetNumStr( USHORT(rNums[i]) );
+ aNumStr += aType.GetNumStr( sal_uInt16(rNums[i]) );
if(i != (rNums.Count()-1))
aNumStr.AppendAscii( sPageDeli );
}
@@ -2226,7 +2226,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
//search by name
SwDoc* pDoc = pNd->GetDoc();
- USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( GetMainEntryCharStyle(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
+ sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( GetMainEntryCharStyle(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
SwCharFmt* pCharFmt = 0;
if(USHRT_MAX != nPoolId)
pCharFmt = pDoc->GetCharFmtFromPool(nPoolId);
@@ -2238,7 +2238,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
//find the page numbers in aNumStr and set the character style
xub_StrLen nOffset = pNd->GetTxt().Len() - aNumStr.Len();
SwFmtCharFmt aCharFmt(pCharFmt);
- for(USHORT j = 0; j < pCharStyleIdx->Count(); j += 2)
+ for(sal_uInt16 j = 0; j < pCharStyleIdx->Count(); j += 2)
{
xub_StrLen nStartIdx = (*pCharStyleIdx)[j] + nOffset;
xub_StrLen nEndIdx = (*pCharStyleIdx)[j + 1] + nOffset;
@@ -2352,7 +2352,7 @@ void SwTOXBaseSection::InsertSorted(SwTOXSortTabBase* pNew)
Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReading,
const SwTOXSortTabBase& rNew,
- USHORT nLevel, const Range& rRange )
+ sal_uInt16 nLevel, const Range& rRange )
{
const SwTOXInternational& rIntl = *rNew.pTOXIntl;
String sToCompare(rStr);
@@ -2366,10 +2366,10 @@ Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReadin
ASSERT(rRange.Min() >= 0 && rRange.Max() >= 0, "Min Max < 0");
- const USHORT nMin = (USHORT)rRange.Min();
- const USHORT nMax = (USHORT)rRange.Max();
+ const sal_uInt16 nMin = (sal_uInt16)rRange.Min();
+ const sal_uInt16 nMax = (sal_uInt16)rRange.Max();
- USHORT i;
+ sal_uInt16 i;
for( i = nMin; i < nMax; ++i)
{
@@ -2395,8 +2395,8 @@ Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReadin
}
aSortArr.Insert(pKey, i );
}
- USHORT nStart = i+1;
- USHORT nEnd = aSortArr.Count();
+ sal_uInt16 nStart = i+1;
+ sal_uInt16 nEnd = aSortArr.Count();
// Ende des Bereiches suchen
for(i = nStart; i < aSortArr.Count(); ++i)
@@ -2410,10 +2410,10 @@ Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReadin
}
-BOOL SwTOXBase::IsTOXBaseInReadonly() const
+sal_Bool SwTOXBase::IsTOXBaseInReadonly() const
{
const SwTOXBaseSection *pSect = PTR_CAST(SwTOXBaseSection, this);
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwSectionNode* pSectNode;
if(pSect && pSect->GetFmt() &&
0 != (pSectNode = pSect->GetFmt()->GetSectionNode()))
@@ -2445,7 +2445,7 @@ void SwTOXBase::SetAttrSet( const SfxItemSet& rSet )
pSect->GetFmt()->SetFmtAttr( rSet );
}
-BOOL SwTOXBase::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwTOXBase::GetInfo( SfxPoolItem& rInfo ) const
{
switch( rInfo.Which() )
{
@@ -2455,9 +2455,9 @@ BOOL SwTOXBase::GetInfo( SfxPoolItem& rInfo ) const
if( pSect && pSect->GetFmt() )
pSect->GetFmt()->GetInfo( rInfo );
}
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/* */
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index f627870932f9..f33bbbc3ece8 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -48,8 +48,8 @@ SwExtTextInput::SwExtTextInput( const SwPaM& rPam, Ring* pRing )
: SwPaM( *rPam.GetPoint(), (SwPaM*)pRing ),
eInputLanguage(LANGUAGE_DONTKNOW)
{
- bIsOverwriteCursor = FALSE;
- bInsText = TRUE;
+ bIsOverwriteCursor = sal_False;
+ bInsText = sal_True;
}
SwExtTextInput::~SwExtTextInput()
@@ -78,7 +78,7 @@ SwExtTextInput::~SwExtTextInput()
// for CJK/CTL scripts.
bool bLang = true;
// <--
- USHORT nWhich = RES_CHRATR_LANGUAGE;
+ sal_uInt16 nWhich = RES_CHRATR_LANGUAGE;
switch(GetI18NScriptTypeOfLanguage(eInputLanguage))
{
case i18n::ScriptType::ASIAN: nWhich = RES_CHRATR_CJK_LANGUAGE; break;
@@ -205,7 +205,7 @@ void SwExtTextInput::SetInputData( const CommandExtTextInputData& rData )
}
}
-void SwExtTextInput::SetOverwriteCursor( BOOL bFlag )
+void SwExtTextInput::SetOverwriteCursor( sal_Bool bFlag )
{
bIsOverwriteCursor = bFlag;
@@ -258,17 +258,17 @@ SwExtTextInput* SwDoc::GetExtTextInput( const SwNode& rNd,
SwExtTextInput* pRet = 0;
if( pExtInputRing )
{
- ULONG nNdIdx = rNd.GetIndex();
+ sal_uLong nNdIdx = rNd.GetIndex();
SwExtTextInput* pTmp = (SwExtTextInput*)pExtInputRing;
do {
- ULONG nPt = pTmp->GetPoint()->nNode.GetIndex(),
+ sal_uLong nPt = pTmp->GetPoint()->nNode.GetIndex(),
nMk = pTmp->GetMark()->nNode.GetIndex();
xub_StrLen nPtCnt = pTmp->GetPoint()->nContent.GetIndex(),
nMkCnt = pTmp->GetMark()->nContent.GetIndex();
if( nPt < nMk || ( nPt == nMk && nPtCnt < nMkCnt ))
{
- ULONG nTmp = nMk; nMk = nPt; nPt = nTmp;
+ sal_uLong nTmp = nMk; nMk = nPt; nPt = nTmp;
nTmp = nMkCnt; nMkCnt = nPtCnt; nPtCnt = (xub_StrLen)nTmp;
}
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx
index cb0b44b66822..c43e363e3a72 100644
--- a/sw/source/core/doc/fmtcol.cxx
+++ b/sw/source/core/doc/fmtcol.cxx
@@ -83,7 +83,7 @@ namespace TxtFmtCollFunc
{
if ( !pNewNumRuleItem )
{
- pTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, FALSE, (const SfxPoolItem**)&pNewNumRuleItem );
+ pTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, sal_False, (const SfxPoolItem**)&pNewNumRuleItem );
}
if ( pNewNumRuleItem )
{
@@ -104,7 +104,7 @@ namespace TxtFmtCollFunc
SwNumRule* pNumRule( 0 );
const SwNumRuleItem* pNumRuleItem( 0 );
- rTxtFmtColl.GetItemState( RES_PARATR_NUMRULE, FALSE, (const SfxPoolItem**)&pNumRuleItem );
+ rTxtFmtColl.GetItemState( RES_PARATR_NUMRULE, sal_False, (const SfxPoolItem**)&pNumRuleItem );
if ( pNumRuleItem )
{
const String sNumRuleName = pNumRuleItem->GetValue();
@@ -169,22 +169,22 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
pNewChgSet = (SwAttrSetChg*)pNew;
pOldChgSet = (SwAttrSetChg*)pOld;
pNewChgSet->GetChgSet()->GetItemState(
- RES_LR_SPACE, FALSE, (const SfxPoolItem**)&pNewLRSpace );
+ RES_LR_SPACE, sal_False, (const SfxPoolItem**)&pNewLRSpace );
pNewChgSet->GetChgSet()->GetItemState(
- RES_UL_SPACE, FALSE, (const SfxPoolItem**)&pNewULSpace );
+ RES_UL_SPACE, sal_False, (const SfxPoolItem**)&pNewULSpace );
pNewChgSet->GetChgSet()->GetItemState( RES_CHRATR_FONTSIZE,
- FALSE, (const SfxPoolItem**)&(aFontSizeArr[0]) );
+ sal_False, (const SfxPoolItem**)&(aFontSizeArr[0]) );
pNewChgSet->GetChgSet()->GetItemState( RES_CHRATR_CJK_FONTSIZE,
- FALSE, (const SfxPoolItem**)&(aFontSizeArr[1]) );
+ sal_False, (const SfxPoolItem**)&(aFontSizeArr[1]) );
pNewChgSet->GetChgSet()->GetItemState( RES_CHRATR_CTL_FONTSIZE,
- FALSE, (const SfxPoolItem**)&(aFontSizeArr[2]) );
+ sal_False, (const SfxPoolItem**)&(aFontSizeArr[2]) );
// --> OD 2006-10-17 #i70223#
// --> OD 2007-12-19 #i84745#
// check, if attribute set is applied to this paragraph style
if ( bAssignedToListLevelOfOutlineStyle &&
pNewChgSet->GetTheChgdSet() == &GetAttrSet() )
{
- pNewChgSet->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, FALSE,
+ pNewChgSet->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, sal_False,
(const SfxPoolItem**)&pNewNumRuleItem );
}
// <--
@@ -242,13 +242,13 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
// <--
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
// dann pruefe doch mal gegen die eigenen Attribute
- if( pNewLRSpace && SFX_ITEM_SET == GetItemState( RES_LR_SPACE, FALSE,
+ if( pNewLRSpace && SFX_ITEM_SET == GetItemState( RES_LR_SPACE, sal_False,
(const SfxPoolItem**)&pOldLRSpace ))
{
- int bChg = FALSE;
+ int bChg = sal_False;
if( pOldLRSpace != pNewLRSpace ) // verhinder Rekursion (SetAttr!!)
{
SvxLRSpaceItem aNew( *pOldLRSpace );
@@ -287,22 +287,22 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
if( pNewULSpace && SFX_ITEM_SET == GetItemState(
- RES_UL_SPACE, FALSE, (const SfxPoolItem**)&pOldULSpace ) &&
+ RES_UL_SPACE, sal_False, (const SfxPoolItem**)&pOldULSpace ) &&
pOldULSpace != pNewULSpace ) // verhinder Rekursion (SetAttr!!)
{
SvxULSpaceItem aNew( *pOldULSpace );
- int bChg = FALSE;
+ int bChg = sal_False;
// wir hatten eine relative Angabe -> neu berechnen
if( 100 != aNew.GetPropUpper() )
{
- USHORT nTmp = aNew.GetUpper(); // alten zum Vergleichen
+ sal_uInt16 nTmp = aNew.GetUpper(); // alten zum Vergleichen
aNew.SetUpper( pNewULSpace->GetUpper(), aNew.GetPropUpper() );
bChg |= nTmp != aNew.GetUpper();
}
// wir hatten eine relative Angabe -> neu berechnen
if( 100 != aNew.GetPropLower() )
{
- USHORT nTmp = aNew.GetLower(); // alten zum Vergleichen
+ sal_uInt16 nTmp = aNew.GetLower(); // alten zum Vergleichen
aNew.SetLower( pNewULSpace->GetLower(), aNew.GetPropLower() );
bChg |= nTmp != aNew.GetLower();
}
@@ -323,7 +323,7 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
SvxFontHeightItem *pFSize = aFontSizeArr[ nC ], *pOldFSize;
if( pFSize && SFX_ITEM_SET == GetItemState(
- pFSize->Which(), FALSE, (const SfxPoolItem**)&pOldFSize ) &&
+ pFSize->Which(), sal_False, (const SfxPoolItem**)&pOldFSize ) &&
// verhinder Rekursion (SetAttr!!)
pFSize != pOldFSize )
{
@@ -338,7 +338,7 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
else
{
// wir hatten eine relative Angabe -> neu berechnen
- UINT32 nTmp = pOldFSize->GetHeight(); // alten zum Vergleichen
+ sal_uInt32 nTmp = pOldFSize->GetHeight(); // alten zum Vergleichen
SvxFontHeightItem aNew(240 , 100, pFSize->Which());
aNew.SetHeight( pFSize->GetHeight(), pOldFSize->GetProp(),
pOldFSize->GetPropUnit() );
@@ -359,19 +359,19 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
SwFmtColl::Modify( pOld, pNew );
}
-BOOL SwTxtFmtColl::IsAtDocNodeSet() const
+sal_Bool SwTxtFmtColl::IsAtDocNodeSet() const
{
SwClientIter aIter( *(SwModify*)this );
const SwNodes& rNds = GetDoc()->GetNodes();
for( SwClient* pC = aIter.First(TYPE(SwCntntNode)); pC; pC = aIter.Next() )
if( &((SwCntntNode*)pC)->GetNodes() == &rNds )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
// --> OD 2008-03-04 #refactorlists#
-BOOL SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr )
+sal_Bool SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr )
{
const bool bIsNumRuleItem = rAttr.Which() == RES_PARATR_NUMRULE;
if ( bIsNumRuleItem )
@@ -379,7 +379,7 @@ BOOL SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr )
TxtFmtCollFunc::RemoveFromNumRule( *this );
}
- const BOOL bRet = SwFmtColl::SetFmtAttr( rAttr );
+ const sal_Bool bRet = SwFmtColl::SetFmtAttr( rAttr );
if ( bIsNumRuleItem )
{
@@ -389,16 +389,16 @@ BOOL SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr )
return bRet;
}
-BOOL SwTxtFmtColl::SetFmtAttr( const SfxItemSet& rSet )
+sal_Bool SwTxtFmtColl::SetFmtAttr( const SfxItemSet& rSet )
{
const bool bIsNumRuleItemAffected =
- rSet.GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET;
+ rSet.GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET;
if ( bIsNumRuleItemAffected )
{
TxtFmtCollFunc::RemoveFromNumRule( *this );
}
- const BOOL bRet = SwFmtColl::SetFmtAttr( rSet );
+ const sal_Bool bRet = SwFmtColl::SetFmtAttr( rSet );
if ( bIsNumRuleItemAffected )
{
@@ -408,7 +408,7 @@ BOOL SwTxtFmtColl::SetFmtAttr( const SfxItemSet& rSet )
return bRet;
}
-BOOL SwTxtFmtColl::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 )
+sal_Bool SwTxtFmtColl::ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
{
const bool bIsNumRuleItemAffected =
( nWhich2 != 0 && nWhich2 > nWhich1 )
@@ -420,14 +420,14 @@ BOOL SwTxtFmtColl::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 )
TxtFmtCollFunc::RemoveFromNumRule( *this );
}
- const BOOL bRet = SwFmtColl::ResetFmtAttr( nWhich1, nWhich2 );
+ const sal_Bool bRet = SwFmtColl::ResetFmtAttr( nWhich1, nWhich2 );
return bRet;
}
// <--
// --> OD 2007-01-24 #i73790#
-USHORT SwTxtFmtColl::ResetAllFmtAttr()
+sal_uInt16 SwTxtFmtColl::ResetAllFmtAttr()
{
const bool bOldState( mbStayAssignedToListLevelOfOutlineStyle );
mbStayAssignedToListLevelOfOutlineStyle = true;
@@ -440,7 +440,7 @@ USHORT SwTxtFmtColl::ResetAllFmtAttr()
: -1;
// <--
- USHORT nRet = SwFmtColl::ResetAllFmtAttr();
+ sal_uInt16 nRet = SwFmtColl::ResetAllFmtAttr();
// --> OD 2008-12-16 #i70748#
if ( nAssignedOutlineStyleLevel != -1 )
@@ -465,12 +465,12 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const
// no list style applied to paragraph style
bAreListLevelIndentsApplicable = false;
}
- else if ( GetItemState( RES_LR_SPACE, FALSE ) == SFX_ITEM_SET )
+ else if ( GetItemState( RES_LR_SPACE, sal_False ) == SFX_ITEM_SET )
{
// paragraph style has hard-set indent attributes
bAreListLevelIndentsApplicable = false;
}
- else if ( GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET )
+ else if ( GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET )
{
// list style is directly applied to paragraph style and paragraph
// style has no hard-set indent attributes
@@ -485,14 +485,14 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const
const SwTxtFmtColl* pColl = dynamic_cast<const SwTxtFmtColl*>(DerivedFrom());
while ( pColl )
{
- if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, FALSE ) == SFX_ITEM_SET )
+ if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, sal_False ) == SFX_ITEM_SET )
{
// indent attributes found in the paragraph style hierarchy.
bAreListLevelIndentsApplicable = false;
break;
}
- if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET )
+ if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET )
{
// paragraph style with the list style found and until now no
// indent attributes are found in the paragraph style hierarchy.
@@ -512,15 +512,15 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const
//FEATURE::CONDCOLL
-SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond,
- ULONG nSubCond )
+SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond,
+ sal_uLong nSubCond )
: SwClient( pColl ), nCondition( nMasterCond )
{
aSubCondition.nSubCondition = nSubCond;
}
-SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond,
+SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond,
const String& rSubExp )
: SwClient( pColl ), nCondition( nMasterCond )
{
@@ -580,7 +580,7 @@ int SwCollCondition::operator==( const SwCollCondition& rCmp ) const
}
-void SwCollCondition::SetCondition( ULONG nCond, ULONG nSubCond )
+void SwCollCondition::SetCondition( sal_uLong nCond, sal_uLong nSubCond )
{
if( USRFLD_EXPRESSION & nCondition )
delete aSubCondition.pFldExpression;
@@ -597,7 +597,7 @@ const SwCollCondition* SwConditionTxtFmtColl::HasCondition(
const SwCollCondition& rCond ) const
{
const SwCollCondition* pFnd = 0;
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < aCondColls.Count(); ++n )
if( *( pFnd = aCondColls[ n ]) == rCond )
@@ -609,7 +609,7 @@ const SwCollCondition* SwConditionTxtFmtColl::HasCondition(
void SwConditionTxtFmtColl::InsertCondition( const SwCollCondition& rCond )
{
- for( USHORT n = 0; n < aCondColls.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aCondColls.Count(); ++n )
if( *aCondColls[ n ] == rCond )
{
aCondColls.DeleteAndDestroy( n );
@@ -622,14 +622,14 @@ void SwConditionTxtFmtColl::InsertCondition( const SwCollCondition& rCond )
}
-BOOL SwConditionTxtFmtColl::RemoveCondition( const SwCollCondition& rCond )
+sal_Bool SwConditionTxtFmtColl::RemoveCondition( const SwCollCondition& rCond )
{
- BOOL bRet = FALSE;
- for( USHORT n = 0; n < aCondColls.Count(); ++n )
+ sal_Bool bRet = sal_False;
+ for( sal_uInt16 n = 0; n < aCondColls.Count(); ++n )
if( *aCondColls[ n ] == rCond )
{
aCondColls.DeleteAndDestroy( n );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -642,7 +642,7 @@ void SwConditionTxtFmtColl::SetConditions( const SwFmtCollConditions& rCndClls )
if( aCondColls.Count() )
aCondColls.DeleteAndDestroy( 0, aCondColls.Count() );
SwDoc& rDoc = *GetDoc();
- for( USHORT n = 0; n < rCndClls.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rCndClls.Count(); ++n )
{
SwCollCondition* pFnd = rCndClls[ n ];
SwTxtFmtColl* pTmpColl = pFnd->GetTxtFmtColl()
@@ -663,7 +663,7 @@ void SwTxtFmtColl::SetAttrOutlineLevel( int nLevel)
{
ASSERT( 0 <= nLevel && nLevel <= MAXLEVEL ,"SwTxtFmtColl: Level Out Of Range" );
SetFmtAttr( SfxUInt16Item( RES_PARATR_OUTLINELEVEL,
- static_cast<UINT16>(nLevel) ) );
+ static_cast<sal_uInt16>(nLevel) ) );
}
int SwTxtFmtColl::GetAttrOutlineLevel() const
@@ -691,12 +691,12 @@ void SwTxtFmtColl::AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
{
if ( !pDerivedTxtFmtColl->IsAssignedToListLevelOfOutlineStyle() )
{
- if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_DEFAULT )
+ if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_DEFAULT )
{
SwNumRuleItem aItem(aEmptyStr);
pDerivedTxtFmtColl->SetFmtAttr( aItem );
}
- if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_OUTLINELEVEL, FALSE ) == SFX_ITEM_DEFAULT )
+ if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_OUTLINELEVEL, sal_False ) == SFX_ITEM_DEFAULT )
{
pDerivedTxtFmtColl->SetAttrOutlineLevel( 0 );
}
diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx
index 3def8b968a60..7395e7ae7449 100644
--- a/sw/source/core/doc/ftnidx.cxx
+++ b/sw/source/core/doc/ftnidx.cxx
@@ -42,24 +42,24 @@
_SV_IMPL_SORTAR_ALG( _SwFtnIdxs, SwTxtFtnPtr )
-BOOL _SwFtnIdxs::Seek_Entry( const SwTxtFtnPtr rSrch, USHORT* pFndPos ) const
+sal_Bool _SwFtnIdxs::Seek_Entry( const SwTxtFtnPtr rSrch, sal_uInt16* pFndPos ) const
{
- ULONG nIdx = _SwTxtFtn_GetIndex( rSrch );
+ sal_uLong nIdx = _SwTxtFtn_GetIndex( rSrch );
xub_StrLen nCntIdx = *rSrch->GetStart();
- USHORT nO = Count(), nM, nU = 0;
+ sal_uInt16 nO = Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
while( nU <= nO )
{
nM = nU + ( nO - nU ) / 2;
- ULONG nFndIdx = _SwTxtFtn_GetIndex( (*this)[ nM ] );
+ sal_uLong nFndIdx = _SwTxtFtn_GetIndex( (*this)[ nM ] );
if( nFndIdx == nIdx && *(*this)[ nM ]->GetStart() == nCntIdx )
{
if( pFndPos )
*pFndPos = nM;
- return TRUE;
+ return sal_True;
}
else if( nFndIdx < nIdx ||
(nFndIdx == nIdx && *(*this)[ nM ]->GetStart() < nCntIdx ))
@@ -68,7 +68,7 @@ BOOL _SwFtnIdxs::Seek_Entry( const SwTxtFtnPtr rSrch, USHORT* pFndPos ) const
{
if( pFndPos )
*pFndPos = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
@@ -76,7 +76,7 @@ BOOL _SwFtnIdxs::Seek_Entry( const SwTxtFtnPtr rSrch, USHORT* pFndPos ) const
}
if( pFndPos )
*pFndPos = nU;
- return FALSE;
+ return sal_False;
}
@@ -101,11 +101,11 @@ void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt )
{
const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
const SwNode* pCapStt = &pDoc->GetNodes().GetEndOfExtras();
- ULONG nCapEnd = pDoc->GetNodes().GetEndOfContent().GetIndex();
+ sal_uLong nCapEnd = pDoc->GetNodes().GetEndOfContent().GetIndex();
if( rOutlNds.Count() )
{
// suche den Start des Kapitels, in den rStt steht.
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < rOutlNds.Count(); ++n )
if( rOutlNds[ n ]->GetIndex() > rStt.GetIndex() )
@@ -123,7 +123,7 @@ void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt )
}
}
- USHORT nPos, nFtnNo = 1;
+ sal_uInt16 nPos, nFtnNo = 1;
if( SeekEntry( *pCapStt, &nPos ) && nPos )
{
// gehe nach vorne bis der Index nicht mehr gleich ist
@@ -155,12 +155,12 @@ void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt )
SwUpdFtnEndNtAtEnd aNumArr;
- // BOOL, damit hier auch bei Chapter-Einstellung die Endnoten
+ // sal_Bool, damit hier auch bei Chapter-Einstellung die Endnoten
// durchlaufen.
- const BOOL bEndNoteOnly = FTNNUM_DOC != rFtnInfo.eNum;
+ const sal_Bool bEndNoteOnly = FTNNUM_DOC != rFtnInfo.eNum;
- USHORT nPos, nFtnNo = 1, nEndNo = 1;
- ULONG nUpdNdIdx = rStt.GetIndex();
+ sal_uInt16 nPos, nFtnNo = 1, nEndNo = 1;
+ sal_uLong nUpdNdIdx = rStt.GetIndex();
for( nPos = 0; nPos < Count(); ++nPos )
{
pTxtFtn = (*this)[ nPos ];
@@ -187,7 +187,7 @@ void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt )
const SwFmtFtn &rFtn = pTxtFtn->GetFtn();
if( !rFtn.GetNumStr().Len() )
{
- USHORT nSectNo = aNumArr.ChkNumber( *pTxtFtn );
+ sal_uInt16 nSectNo = aNumArr.ChkNumber( *pTxtFtn );
if( !nSectNo && ( rFtn.IsEndNote() || !bEndNoteOnly ))
nSectNo = rFtn.IsEndNote()
? rEndInfo.nFtnOffset + nEndNo++
@@ -226,14 +226,14 @@ void SwFtnIdxs::UpdateAllFtn()
if( FTNNUM_CHAPTER == rFtnInfo.eNum )
{
const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
- USHORT nNo = 1, // Nummer fuer die Fussnoten
+ sal_uInt16 nNo = 1, // Nummer fuer die Fussnoten
nFtnIdx = 0; // Index in das FtnIdx-Array
- for( USHORT n = 0; n < rOutlNds.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rOutlNds.Count(); ++n )
{
//if( !rOutlNds[ n ]->GetTxtNode()->GetTxtColl()->GetOutlineLevel() )//#outline level,zhaojianwei
if ( rOutlNds[ n ]->GetTxtNode()->GetAttrOutlineLevel() == 1 )//<-end,zhaojianwei
{
- ULONG nCapStt = rOutlNds[ n ]->GetIndex(); // Start eines neuen Kapitels
+ sal_uLong nCapStt = rOutlNds[ n ]->GetIndex(); // Start eines neuen Kapitels
for( ; nFtnIdx < Count(); ++nFtnIdx )
{
pTxtFtn = (*this)[ nFtnIdx ];
@@ -266,17 +266,17 @@ void SwFtnIdxs::UpdateAllFtn()
}
- // BOOL, damit hier auch bei Chapter-Einstellung die Endnoten
+ // sal_Bool, damit hier auch bei Chapter-Einstellung die Endnoten
// durchlaufen.
- const BOOL bEndNoteOnly = FTNNUM_DOC != rFtnInfo.eNum;
- USHORT nFtnNo = 0, nEndNo = 0;
- for( USHORT nPos = 0; nPos < Count(); ++nPos )
+ const sal_Bool bEndNoteOnly = FTNNUM_DOC != rFtnInfo.eNum;
+ sal_uInt16 nFtnNo = 0, nEndNo = 0;
+ for( sal_uInt16 nPos = 0; nPos < Count(); ++nPos )
{
pTxtFtn = (*this)[ nPos ];
const SwFmtFtn &rFtn = pTxtFtn->GetFtn();
if( !rFtn.GetNumStr().Len() )
{
- USHORT nSectNo = aNumArr.ChkNumber( *pTxtFtn );
+ sal_uInt16 nSectNo = aNumArr.ChkNumber( *pTxtFtn );
if( !nSectNo && ( rFtn.IsEndNote() || !bEndNoteOnly ))
nSectNo = rFtn.IsEndNote()
? rEndInfo.nFtnOffset + (++nEndNo)
@@ -296,18 +296,18 @@ void SwFtnIdxs::UpdateAllFtn()
pDoc->GetRootFrm()->UpdateFtnNums();
}
-SwTxtFtn* SwFtnIdxs::SeekEntry( const SwNodeIndex& rPos, USHORT* pFndPos ) const
+SwTxtFtn* SwFtnIdxs::SeekEntry( const SwNodeIndex& rPos, sal_uInt16* pFndPos ) const
{
- ULONG nIdx = rPos.GetIndex();
+ sal_uLong nIdx = rPos.GetIndex();
- USHORT nO = Count(), nM, nU = 0;
+ sal_uInt16 nO = Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
while( nU <= nO )
{
nM = nU + ( nO - nU ) / 2;
- ULONG nNdIdx = _SwTxtFtn_GetIndex( (*this)[ nM ] );
+ sal_uLong nNdIdx = _SwTxtFtn_GetIndex( (*this)[ nM ] );
if( nNdIdx == nIdx )
{
if( pFndPos )
@@ -336,23 +336,23 @@ SwTxtFtn* SwFtnIdxs::SeekEntry( const SwNodeIndex& rPos, USHORT* pFndPos ) const
const SwSectionNode* SwUpdFtnEndNtAtEnd::FindSectNdWithEndAttr(
const SwTxtFtn& rTxtFtn )
{
- USHORT nWh = static_cast<USHORT>( rTxtFtn.GetFtn().IsEndNote() ?
+ sal_uInt16 nWh = static_cast<sal_uInt16>( rTxtFtn.GetFtn().IsEndNote() ?
RES_END_AT_TXTEND : RES_FTN_AT_TXTEND );
- USHORT nVal;
+ sal_uInt16 nVal;
const SwSectionNode* pNd = rTxtFtn.GetTxtNode().FindSectionNode();
while( pNd && FTNEND_ATTXTEND_OWNNUMSEQ != ( nVal =
((const SwFmtFtnAtTxtEnd&)pNd->GetSection().GetFmt()->
- GetFmtAttr( nWh, TRUE )).GetValue() ) &&
+ GetFmtAttr( nWh, sal_True )).GetValue() ) &&
FTNEND_ATTXTEND_OWNNUMANDFMT != nVal )
pNd = pNd->StartOfSectionNode()->FindSectionNode();
return pNd;
}
-USHORT SwUpdFtnEndNtAtEnd::GetNumber( const SwTxtFtn& rTxtFtn,
+sal_uInt16 SwUpdFtnEndNtAtEnd::GetNumber( const SwTxtFtn& rTxtFtn,
const SwSectionNode& rNd )
{
- USHORT nRet = 0, nWh;
+ sal_uInt16 nRet = 0, nWh;
SvPtrarr* pArr;
SvUShorts* pNum;
if( rTxtFtn.GetFtn().IsEndNote() )
@@ -369,7 +369,7 @@ USHORT SwUpdFtnEndNtAtEnd::GetNumber( const SwTxtFtn& rTxtFtn,
}
void* pNd = (void*)&rNd;
- for( USHORT n = pArr->Count(); n; )
+ for( sal_uInt16 n = pArr->Count(); n; )
if( pArr->GetObject( --n ) == pNd )
{
nRet = ++pNum->GetObject( n );
@@ -387,7 +387,7 @@ USHORT SwUpdFtnEndNtAtEnd::GetNumber( const SwTxtFtn& rTxtFtn,
return nRet;
}
-USHORT SwUpdFtnEndNtAtEnd::ChkNumber( const SwTxtFtn& rTxtFtn )
+sal_uInt16 SwUpdFtnEndNtAtEnd::ChkNumber( const SwTxtFtn& rTxtFtn )
{
const SwSectionNode* pSectNd = FindSectNdWithEndAttr( rTxtFtn );
return pSectNd ? GetNumber( rTxtFtn, *pSectNd ) : 0;
diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx
index 5f22b885cada..607bb4f79c2e 100644
--- a/sw/source/core/doc/gctable.cxx
+++ b/sw/source/core/doc/gctable.cxx
@@ -35,40 +35,40 @@
#include <swtblfmt.hxx>
-inline const SvxBorderLine* GetLineTB( const SvxBoxItem* pBox, BOOL bTop )
+inline const SvxBorderLine* GetLineTB( const SvxBoxItem* pBox, sal_Bool bTop )
{
return bTop ? pBox->GetTop() : pBox->GetBottom();
}
-BOOL _SwGCBorder_BoxBrd::CheckLeftBorderOfFormat( const SwFrmFmt& rFmt )
+sal_Bool _SwGCBorder_BoxBrd::CheckLeftBorderOfFormat( const SwFrmFmt& rFmt )
{
const SvxBorderLine* pBrd;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rFmt.GetItemState( RES_BOX, TRUE, &pItem ) &&
+ if( SFX_ITEM_SET == rFmt.GetItemState( RES_BOX, sal_True, &pItem ) &&
0 != ( pBrd = ((SvxBoxItem*)pItem)->GetLeft() ) )
{
if( *pBrdLn == *pBrd )
- bAnyBorderFnd = TRUE;
- return TRUE;
+ bAnyBorderFnd = sal_True;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL lcl_GCBorder_ChkBoxBrd_L( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_GCBorder_ChkBoxBrd_L( const SwTableLine*& rpLine, void* pPara )
{
const SwTableBox* pBox = rpLine->GetTabBoxes()[ 0 ];
return lcl_GCBorder_ChkBoxBrd_B( pBox, pPara );
}
-BOOL lcl_GCBorder_ChkBoxBrd_B( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_GCBorder_ChkBoxBrd_B( const SwTableBox*& rpBox, void* pPara )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( rpBox->GetTabLines().Count() )
{
- for( USHORT n = 0, nLines = rpBox->GetTabLines().Count();
+ for( sal_uInt16 n = 0, nLines = rpBox->GetTabLines().Count();
n < nLines && bRet; ++n )
{
const SwTableLine* pLine = rpBox->GetTabLines()[ n ];
@@ -83,36 +83,36 @@ BOOL lcl_GCBorder_ChkBoxBrd_B( const SwTableBox*& rpBox, void* pPara )
return bRet;
}
-BOOL lcl_GCBorder_GetLastBox_L( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_GCBorder_GetLastBox_L( const SwTableLine*& rpLine, void* pPara )
{
const SwTableBoxes& rBoxes = rpLine->GetTabBoxes();
const SwTableBox* pBox = rBoxes[ rBoxes.Count()-1 ];
::lcl_GCBorder_GetLastBox_B( pBox, pPara );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_GCBorder_GetLastBox_B( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_GCBorder_GetLastBox_B( const SwTableBox*& rpBox, void* pPara )
{
SwTableLines& rLines = (SwTableLines&)rpBox->GetTabLines();
if( rLines.Count() )
rLines.ForEach( &lcl_GCBorder_GetLastBox_L, pPara );
else
((SwTableBoxes*)pPara)->Insert( rpBox, ((SwTableBoxes*)pPara)->Count() );
- return TRUE;
+ return sal_True;
}
// suche das "Ende" der vorgegebene BorderLine. Returnt wird die "Layout"Pos!
-USHORT lcl_FindEndPosOfBorder( const SwCollectTblLineBoxes& rCollTLB,
- const SvxBorderLine& rBrdLn, USHORT& rStt, BOOL bTop )
+sal_uInt16 lcl_FindEndPosOfBorder( const SwCollectTblLineBoxes& rCollTLB,
+ const SvxBorderLine& rBrdLn, sal_uInt16& rStt, sal_Bool bTop )
{
- USHORT nPos, nLastPos = 0;
- for( USHORT nEnd = rCollTLB.Count(); rStt < nEnd; ++rStt )
+ sal_uInt16 nPos, nLastPos = 0;
+ for( sal_uInt16 nEnd = rCollTLB.Count(); rStt < nEnd; ++rStt )
{
const SfxPoolItem* pItem;
const SvxBorderLine* pBrd;
const SwTableBox& rBox = rCollTLB.GetBox( rStt, &nPos );
- if( SFX_ITEM_SET != rBox.GetFrmFmt()->GetItemState(RES_BOX,TRUE, &pItem )
+ if( SFX_ITEM_SET != rBox.GetFrmFmt()->GetItemState(RES_BOX,sal_True, &pItem )
|| 0 == ( pBrd = GetLineTB( (SvxBoxItem*)pItem, bTop ))
|| !( *pBrd == rBrdLn ))
break;
@@ -122,23 +122,23 @@ USHORT lcl_FindEndPosOfBorder( const SwCollectTblLineBoxes& rCollTLB,
}
inline const SvxBorderLine* lcl_GCBorder_GetBorder( const SwTableBox& rBox,
- BOOL bTop,
+ sal_Bool bTop,
const SfxPoolItem** ppItem )
{
- return SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState( RES_BOX, TRUE, ppItem )
+ return SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState( RES_BOX, sal_True, ppItem )
? GetLineTB( (SvxBoxItem*)*ppItem, bTop )
: 0;
}
void lcl_GCBorder_DelBorder( const SwCollectTblLineBoxes& rCollTLB,
- USHORT& rStt, BOOL bTop,
+ sal_uInt16& rStt, sal_Bool bTop,
const SvxBorderLine& rLine,
const SfxPoolItem* pItem,
- USHORT nEndPos,
+ sal_uInt16 nEndPos,
SwShareBoxFmts* pShareFmts )
{
SwTableBox* pBox = (SwTableBox*)&rCollTLB.GetBox( rStt );
- USHORT nNextPos;
+ sal_uInt16 nNextPos;
const SvxBorderLine* pLn = &rLine;
do {
@@ -165,11 +165,11 @@ void lcl_GCBorder_DelBorder( const SwCollectTblLineBoxes& rCollTLB,
pLn = lcl_GCBorder_GetBorder( *pBox, bTop, &pItem );
- } while( TRUE );
+ } while( sal_True );
}
-BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
{
_SwGCLineBorder* pGCPara = (_SwGCLineBorder*)pPara;
@@ -180,7 +180,7 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
const SvxBorderLine* pBrd;
const SfxPoolItem* pItem;
const SwTableBoxes& rBoxes = rpLine->GetTabBoxes();
- for( USHORT n = 0, nBoxes = rBoxes.Count() - 1; n < nBoxes; ++n )
+ for( sal_uInt16 n = 0, nBoxes = rBoxes.Count() - 1; n < nBoxes; ++n )
{
SwTableBoxes aBoxes;
{
@@ -192,9 +192,9 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
}
SwTableBox* pBox;
- for( USHORT i = aBoxes.Count(); i; )
+ for( sal_uInt16 i = aBoxes.Count(); i; )
if( SFX_ITEM_SET == (pBox = aBoxes[ --i ])->GetFrmFmt()->
- GetItemState( RES_BOX, TRUE, &pItem ) &&
+ GetItemState( RES_BOX, sal_True, &pItem ) &&
0 != ( pBrd = ((SvxBoxItem*)pItem)->GetRight() ) )
{
aBPara.SetBorder( *pBrd );
@@ -218,8 +218,8 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
// und jetzt die eigene untere Kante mit der nachfolgenden oberen Kante
if( !pGCPara->IsLastLine() )
{
- SwCollectTblLineBoxes aBottom( FALSE );
- SwCollectTblLineBoxes aTop( TRUE );
+ SwCollectTblLineBoxes aBottom( sal_False );
+ SwCollectTblLineBoxes aTop( sal_True );
::lcl_Line_CollectBox( rpLine, &aBottom );
@@ -227,7 +227,7 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
::lcl_Line_CollectBox( pNextLine, &aTop );
// dann entferne mal alle "doppelten" gleichen Lines
- USHORT nBtmPos, nTopPos,
+ sal_uInt16 nBtmPos, nTopPos,
nSttBtm = 0, nSttTop = 0,
nEndBtm = aBottom.Count(), nEndTop = aTop.Count();
@@ -235,23 +235,23 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
*pTopBox = &aTop.GetBox( nSttTop++, &nTopPos );
const SfxPoolItem *pBtmItem = 0, *pTopItem = 0;
const SvxBorderLine *pBtmLine(0), *pTopLine(0);
- BOOL bGetTopItem = TRUE, bGetBtmItem = TRUE;
+ sal_Bool bGetTopItem = sal_True, bGetBtmItem = sal_True;
do {
if( bGetBtmItem )
- pBtmLine = lcl_GCBorder_GetBorder( *pBtmBox, FALSE, &pBtmItem );
+ pBtmLine = lcl_GCBorder_GetBorder( *pBtmBox, sal_False, &pBtmItem );
if( bGetTopItem )
- pTopLine = lcl_GCBorder_GetBorder( *pTopBox, TRUE, &pTopItem );
+ pTopLine = lcl_GCBorder_GetBorder( *pTopBox, sal_True, &pTopItem );
if( pTopLine && pBtmLine && *pTopLine == *pBtmLine )
{
// dann kann einer entfernt werden, aber welche?
- USHORT nSavSttBtm = nSttBtm, nSavSttTop = nSttTop;
- USHORT nBtmEndPos = ::lcl_FindEndPosOfBorder( aBottom,
- *pTopLine, nSttBtm, FALSE );
+ sal_uInt16 nSavSttBtm = nSttBtm, nSavSttTop = nSttTop;
+ sal_uInt16 nBtmEndPos = ::lcl_FindEndPosOfBorder( aBottom,
+ *pTopLine, nSttBtm, sal_False );
if( !nBtmEndPos ) nBtmEndPos = nBtmPos;
- USHORT nTopEndPos = ::lcl_FindEndPosOfBorder( aTop,
- *pTopLine, nSttTop, TRUE );
+ sal_uInt16 nTopEndPos = ::lcl_FindEndPosOfBorder( aTop,
+ *pTopLine, nSttTop, sal_True );
if( !nTopEndPos ) nTopEndPos = nTopPos;
@@ -260,7 +260,7 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
// dann die TopBorder bis zur BottomEndPos loeschen
nSttTop = nSavSttTop;
if( nTopPos <= nBtmEndPos )
- lcl_GCBorder_DelBorder( aTop, --nSttTop, TRUE,
+ lcl_GCBorder_DelBorder( aTop, --nSttTop, sal_True,
*pBtmLine, pTopItem, nBtmEndPos,
pGCPara->pShareFmts );
else
@@ -271,7 +271,7 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
// sonst die BottomBorder bis zur TopEndPos loeschen
nSttBtm = nSavSttBtm;
if( nBtmPos <= nTopEndPos )
- lcl_GCBorder_DelBorder( aBottom, --nSttBtm, FALSE,
+ lcl_GCBorder_DelBorder( aBottom, --nSttBtm, sal_False,
*pTopLine, pBtmItem, nTopEndPos,
pGCPara->pShareFmts );
else
@@ -287,36 +287,36 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
pBtmBox = &aBottom.GetBox( nSttBtm++, &nBtmPos );
pTopBox = &aTop.GetBox( nSttTop++, &nTopPos );
- bGetTopItem = bGetBtmItem = TRUE;
+ bGetTopItem = bGetBtmItem = sal_True;
}
else if( nTopPos < nBtmPos )
{
if( nSttTop >= nEndTop )
break;
pTopBox = &aTop.GetBox( nSttTop++, &nTopPos );
- bGetTopItem = TRUE;
- bGetBtmItem = FALSE;
+ bGetTopItem = sal_True;
+ bGetBtmItem = sal_False;
}
else
{
if( nSttBtm >= nEndBtm )
break;
pBtmBox = &aBottom.GetBox( nSttBtm++, &nBtmPos );
- bGetTopItem = FALSE;
- bGetBtmItem = TRUE;
+ bGetTopItem = sal_False;
+ bGetBtmItem = sal_True;
}
- } while( TRUE );
+ } while( sal_True );
}
((SwTableLine*)rpLine)->GetTabBoxes().ForEach( &lcl_GC_Box_Border, pPara );
++pGCPara->nLinePos;
- return TRUE;
+ return sal_True;
}
-BOOL lcl_GC_Box_Border( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_GC_Box_Border( const SwTableBox*& rpBox, void* pPara )
{
if( rpBox->GetTabLines().Count() )
{
@@ -324,7 +324,7 @@ BOOL lcl_GC_Box_Border( const SwTableBox*& rpBox, void* pPara )
aPara.pShareFmts = ((_SwGCLineBorder*)pPara)->pShareFmts;
((SwTableBox*)rpBox)->GetTabLines().ForEach( &lcl_GC_Line_Border, &aPara );
}
- return TRUE;
+ return sal_True;
}
struct _GCLinePara
@@ -337,10 +337,10 @@ struct _GCLinePara
{}
};
-BOOL lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara )
+sal_Bool lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara )
{
SwTableBox*& rpBox = (SwTableBox*&)rpTblBox;
- USHORT n, nLen = rpBox->GetTabLines().Count();
+ sal_uInt16 n, nLen = rpBox->GetTabLines().Count();
if( nLen )
{
// ACHTUNG: die Anzahl der Lines kann sich aendern!
@@ -356,7 +356,7 @@ BOOL lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara )
// hinter diese Box in der Parent-Line und loesche diese Box
SwTableLine* pInsLine = rpBox->GetUpper();
SwTableLine* pCpyLine = rpBox->GetTabLines()[0];
- USHORT nInsPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, rpBox );
+ sal_uInt16 nInsPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, rpBox );
for( n = 0; n < pCpyLine->GetTabBoxes().Count(); ++n )
pCpyLine->GetTabBoxes()[n]->SetUpper( pInsLine );
@@ -365,16 +365,16 @@ BOOL lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara )
// loesche alte die Box mit der Line
pInsLine->GetTabBoxes().DeleteAndDestroy( nInsPos );
- return FALSE; // neu aufsetzen
+ return sal_False; // neu aufsetzen
}
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
{
SwTableLine* pLn = (SwTableLine*)rpLine;
- USHORT nLen = pLn->GetTabBoxes().Count();
+ sal_uInt16 nLen = pLn->GetTabBoxes().Count();
if( nLen )
{
_GCLinePara* pGCPara = (_GCLinePara*)pPara;
@@ -395,7 +395,7 @@ BOOL lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
SwTableLines& rLns = *pGCPara->pLns;
const SwTableLine* pTmp = pLn;
- USHORT nInsPos = rLns.GetPos( pTmp );
+ sal_uInt16 nInsPos = rLns.GetPos( pTmp );
ASSERT( USHRT_MAX != nInsPos, "Line nicht gefunden!" );
SwTableBox* pUpper = pLn->GetUpper();
@@ -407,12 +407,12 @@ BOOL lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
// Line an die "eingefuegten" uebertragen
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pLn->GetFrmFmt()->GetItemState(
- RES_BACKGROUND, TRUE, &pItem ))
+ RES_BACKGROUND, sal_True, &pItem ))
{
SwTableLines& rBoxLns = pBox->GetTabLines();
- for( USHORT nLns = 0; nLns < nLen; ++nLns )
+ for( sal_uInt16 nLns = 0; nLns < nLen; ++nLns )
if( SFX_ITEM_SET != rBoxLns[ nLns ]->GetFrmFmt()->
- GetItemState( RES_BACKGROUND, TRUE ))
+ GetItemState( RES_BACKGROUND, sal_True ))
pGCPara->pShareFmts->SetAttr( *rBoxLns[ nLns ], *pItem );
}
@@ -433,7 +433,7 @@ BOOL lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
if( !lcl_MergeGCBox( *(pLn->GetTabBoxes().GetData() + nLen ), pPara ))
--nLen;
}
- return TRUE;
+ return sal_True;
}
// Struktur ein wenig aufraeumen
@@ -443,7 +443,7 @@ void SwTable::GCLines()
_GCLinePara aPara( GetTabLines() );
SwShareBoxFmts aShareFmts;
aPara.pShareFmts = &aShareFmts;
- for( USHORT n = 0; n < GetTabLines().Count() &&
+ for( sal_uInt16 n = 0; n < GetTabLines().Count() &&
lcl_MergeGCLine( *(GetTabLines().GetData() + n ), &aPara ); ++n )
;
}
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index a3e28fc0e425..9cef646cffce 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -69,37 +69,37 @@ using namespace ::com::sun::star;
class SwHTMLTableLayoutConstraints
{
- USHORT nRow; // Start-Zeile
- USHORT nCol; // Start-Spalte
- USHORT nColSpan; // COLSPAN der Zelle
+ sal_uInt16 nRow; // Start-Zeile
+ sal_uInt16 nCol; // Start-Spalte
+ sal_uInt16 nColSpan; // COLSPAN der Zelle
SwHTMLTableLayoutConstraints *pNext; // die naechste Bedingung
- ULONG nMinNoAlign, nMaxNoAlign; // Zwischenergebnisse AL-Pass 1
+ sal_uLong nMinNoAlign, nMaxNoAlign; // Zwischenergebnisse AL-Pass 1
public:
- SwHTMLTableLayoutConstraints( ULONG nMin, ULONG nMax, USHORT nRow,
- USHORT nCol, USHORT nColSp );
+ SwHTMLTableLayoutConstraints( sal_uLong nMin, sal_uLong nMax, sal_uInt16 nRow,
+ sal_uInt16 nCol, sal_uInt16 nColSp );
~SwHTMLTableLayoutConstraints();
- ULONG GetMinNoAlign() const { return nMinNoAlign; }
- ULONG GetMaxNoAlign() const { return nMaxNoAlign; }
+ sal_uLong GetMinNoAlign() const { return nMinNoAlign; }
+ sal_uLong GetMaxNoAlign() const { return nMaxNoAlign; }
SwHTMLTableLayoutConstraints *InsertNext( SwHTMLTableLayoutConstraints *pNxt );
SwHTMLTableLayoutConstraints* GetNext() const { return pNext; }
- USHORT GetRow() const { return nRow; }
+ sal_uInt16 GetRow() const { return nRow; }
- USHORT GetColSpan() const { return nColSpan; }
- USHORT GetColumn() const { return nCol; }
+ sal_uInt16 GetColSpan() const { return nColSpan; }
+ sal_uInt16 GetColumn() const { return nCol; }
};
/* */
SwHTMLTableLayoutCnts::SwHTMLTableLayoutCnts( const SwStartNode *pSttNd,
SwHTMLTableLayout* pTab,
- BOOL bNoBrTag,
+ sal_Bool bNoBrTag,
SwHTMLTableLayoutCnts* pNxt ) :
pNext( pNxt ), pBox( 0 ), pTable( pTab ), pStartNode( pSttNd ),
nPass1Done( 0 ), nWidthSet( 0 ), bNoBreakTag( bNoBrTag )
@@ -120,9 +120,9 @@ const SwStartNode *SwHTMLTableLayoutCnts::GetStartNode() const
/* */
SwHTMLTableLayoutCell::SwHTMLTableLayoutCell( SwHTMLTableLayoutCnts *pCnts,
- USHORT nRSpan, USHORT nCSpan,
- USHORT nWidth, BOOL bPrcWidth,
- BOOL bNWrapOpt ) :
+ sal_uInt16 nRSpan, sal_uInt16 nCSpan,
+ sal_uInt16 nWidth, sal_Bool bPrcWidth,
+ sal_Bool bNWrapOpt ) :
pContents( pCnts ),
nRowSpan( nRSpan ), nColSpan( nCSpan ),
nWidthOption( nWidth ), bPrcWidthOption( bPrcWidth ),
@@ -139,9 +139,9 @@ SwHTMLTableLayoutCell::~SwHTMLTableLayoutCell()
/* */
-SwHTMLTableLayoutColumn::SwHTMLTableLayoutColumn( USHORT nWidth,
- BOOL bRelWidth,
- BOOL bLBorder ) :
+SwHTMLTableLayoutColumn::SwHTMLTableLayoutColumn( sal_uInt16 nWidth,
+ sal_Bool bRelWidth,
+ sal_Bool bLBorder ) :
nMinNoAlign(MINLAY), nMaxNoAlign(MINLAY), nAbsMinNoAlign(MINLAY),
nMin(0), nMax(0),
nAbsColWidth(0), nRelColWidth(0),
@@ -153,7 +153,7 @@ SwHTMLTableLayoutColumn::SwHTMLTableLayoutColumn( USHORT nWidth,
/* */
SwHTMLTableLayoutConstraints::SwHTMLTableLayoutConstraints(
- ULONG nMin, ULONG nMax, USHORT nRw, USHORT nColumn, USHORT nColSp ):
+ sal_uLong nMin, sal_uLong nMax, sal_uInt16 nRw, sal_uInt16 nColumn, sal_uInt16 nColSp ):
nRow( nRw ), nCol( nColumn ), nColSpan( nColSp ),
pNext( 0 ),
nMinNoAlign( nMin ), nMaxNoAlign( nMax )
@@ -200,13 +200,13 @@ typedef SwHTMLTableLayoutCell *SwHTMLTableLayoutCellPtr;
SwHTMLTableLayout::SwHTMLTableLayout(
const SwTable * pSwTbl,
- USHORT nRws, USHORT nCls, BOOL bColsOpt, BOOL bColTgs,
- USHORT nWdth, BOOL bPrcWdth, USHORT nBorderOpt,
- USHORT nCellPad, USHORT nCellSp, SvxAdjust eAdjust,
- USHORT nLMargin, USHORT nRMargin,
- USHORT nBWidth, USHORT nLeftBWidth,
- USHORT nRightBWidth,
- USHORT nInhLeftBWidth, USHORT nInhRightBWidth ) :
+ sal_uInt16 nRws, sal_uInt16 nCls, sal_Bool bColsOpt, sal_Bool bColTgs,
+ sal_uInt16 nWdth, sal_Bool bPrcWdth, sal_uInt16 nBorderOpt,
+ sal_uInt16 nCellPad, sal_uInt16 nCellSp, SvxAdjust eAdjust,
+ sal_uInt16 nLMargin, sal_uInt16 nRMargin,
+ sal_uInt16 nBWidth, sal_uInt16 nLeftBWidth,
+ sal_uInt16 nRightBWidth,
+ sal_uInt16 nInhLeftBWidth, sal_uInt16 nInhRightBWidth ) :
aColumns( new SwHTMLTableLayoutColumnPtr[nCls] ),
aCells( new SwHTMLTableLayoutCellPtr[nRws*nCls] ),
pSwTable( pSwTbl ), pLeftFillerBox( 0 ), pRightFillerBox( 0 ),
@@ -224,9 +224,9 @@ SwHTMLTableLayout::SwHTMLTableLayout(
nDelayedResizeAbsAvail( 0 ), nLastResizeAbsAvail( 0 ),
nPass1Done( 0 ), nWidthSet( 0 ), eTableAdjust( eAdjust ),
bColsOption( bColsOpt ), bColTags( bColTgs ),
- bPrcWidthOption( bPrcWdth ), bUseRelWidth( FALSE ),
- bMustResize( TRUE ), bExportable( TRUE ), bBordersChanged( FALSE ),
- bMustNotResize( FALSE ), bMustNotRecalc( FALSE )
+ bPrcWidthOption( bPrcWdth ), bUseRelWidth( sal_False ),
+ bMustResize( sal_True ), bExportable( sal_True ), bBordersChanged( sal_False ),
+ bMustNotResize( sal_False ), bMustNotRecalc( sal_False )
{
aResizeTimer.SetTimeoutHdl( STATIC_LINK( this, SwHTMLTableLayout,
DelayedResize_Impl ) );
@@ -234,13 +234,13 @@ SwHTMLTableLayout::SwHTMLTableLayout(
SwHTMLTableLayout::~SwHTMLTableLayout()
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < nCols; i++ )
delete aColumns[i];
delete[] aColumns;
- USHORT nCount = nRows*nCols;
+ sal_uInt16 nCount = nRows*nCols;
for( i=0; i<nCount; i++ )
delete aCells[i];
delete[] aCells;
@@ -254,10 +254,10 @@ SwHTMLTableLayout::~SwHTMLTableLayout()
// MIB 27.6.97: Dabei muss auch der Abstand zum Inhalt berueckichtigt werden,
// und zwar auch dann, wenn wenn nur die gegenueberliegende Seite
// eine Umrandung hat.
-USHORT SwHTMLTableLayout::GetLeftCellSpace( USHORT nCol, USHORT nColSpan,
- BOOL bSwBorders ) const
+sal_uInt16 SwHTMLTableLayout::GetLeftCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders ) const
{
- USHORT nSpace = nCellSpacing + nCellPadding;
+ sal_uInt16 nSpace = nCellSpacing + nCellPadding;
if( nCol == 0 )
{
@@ -288,10 +288,10 @@ USHORT SwHTMLTableLayout::GetLeftCellSpace( USHORT nCol, USHORT nColSpan,
return nSpace;
}
-USHORT SwHTMLTableLayout::GetRightCellSpace( USHORT nCol, USHORT nColSpan,
- BOOL bSwBorders ) const
+sal_uInt16 SwHTMLTableLayout::GetRightCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders ) const
{
- USHORT nSpace = nCellPadding;
+ sal_uInt16 nSpace = nCellPadding;
if( nCol+nColSpan == nCols )
{
@@ -313,12 +313,12 @@ USHORT SwHTMLTableLayout::GetRightCellSpace( USHORT nCol, USHORT nColSpan,
return nSpace;
}
-void SwHTMLTableLayout::AddBorderWidth( ULONG &rMin, ULONG &rMax,
- ULONG &rAbsMin,
- USHORT nCol, USHORT nColSpan,
- BOOL bSwBorders ) const
+void SwHTMLTableLayout::AddBorderWidth( sal_uLong &rMin, sal_uLong &rMax,
+ sal_uLong &rAbsMin,
+ sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders ) const
{
- ULONG nAdd = GetLeftCellSpace( nCol, nColSpan, bSwBorders ) +
+ sal_uLong nAdd = GetLeftCellSpace( nCol, nColSpan, bSwBorders ) +
GetRightCellSpace( nCol, nColSpan, bSwBorders );
rMin += nAdd;
@@ -326,8 +326,8 @@ void SwHTMLTableLayout::AddBorderWidth( ULONG &rMin, ULONG &rMax,
rAbsMin += nAdd;
}
-void SwHTMLTableLayout::SetBoxWidth( SwTableBox *pBox, USHORT nCol,
- USHORT nColSpan ) const
+void SwHTMLTableLayout::SetBoxWidth( SwTableBox *pBox, sal_uInt16 nCol,
+ sal_uInt16 nColSpan ) const
{
SwFrmFmt *pFrmFmt = pBox->GetFrmFmt();
@@ -341,12 +341,12 @@ void SwHTMLTableLayout::SetBoxWidth( SwTableBox *pBox, USHORT nCol,
pFrmFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nFrmWidth, 0 ));
}
-void SwHTMLTableLayout::GetAvail( USHORT nCol, USHORT nColSpan,
- USHORT& rAbsAvail, USHORT& rRelAvail ) const
+void SwHTMLTableLayout::GetAvail( sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_uInt16& rAbsAvail, sal_uInt16& rRelAvail ) const
{
rAbsAvail = 0;
rRelAvail = 0;
- for( USHORT i=nCol; i<nCol+nColSpan;i++ )
+ for( sal_uInt16 i=nCol; i<nCol+nColSpan;i++ )
{
const SwHTMLTableLayoutColumn *pColumn = GetColumn(i);
rAbsAvail = rAbsAvail + pColumn->GetAbsColWidth();
@@ -354,19 +354,19 @@ void SwHTMLTableLayout::GetAvail( USHORT nCol, USHORT nColSpan,
}
}
-USHORT SwHTMLTableLayout::GetBrowseWidthByVisArea( const SwDoc& rDoc )
+sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByVisArea( const SwDoc& rDoc )
{
ViewShell *pVSh = 0;
rDoc.GetEditShell( &pVSh );
if( pVSh )
{
- return (USHORT)pVSh->GetBrowseWidth();
+ return (sal_uInt16)pVSh->GetBrowseWidth();
}
return 0;
}
-USHORT SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc )
+sal_uInt16 SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc )
{
// Wenn ein Layout da ist, koennen wir die Breite dort herholen.
const SwRootFrm *pRootFrm = rDoc.GetRootFrm();
@@ -374,7 +374,7 @@ USHORT SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc )
{
const SwFrm *pPageFrm = pRootFrm->GetLower();
if( pPageFrm )
- return (USHORT)pPageFrm->Prt().Width();
+ return (sal_uInt16)pPageFrm->Prt().Width();
}
// --> OD 2010-05-12 #i91658#
@@ -385,7 +385,7 @@ USHORT SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc )
// <--
}
-USHORT SwHTMLTableLayout::GetBrowseWidthByTabFrm(
+sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTabFrm(
const SwTabFrm& rTabFrm ) const
{
SwTwips nWidth = 0;
@@ -414,12 +414,12 @@ USHORT SwHTMLTableLayout::GetBrowseWidthByTabFrm(
rTabFrm.CalcFlyOffsets( nUpperDummy, nLeftOffset, nRightOffset );
nWidth -= (nLeftOffset + nRightOffset);
- return nWidth < USHRT_MAX ? static_cast<USHORT>(nWidth) : USHRT_MAX;
+ return nWidth < USHRT_MAX ? static_cast<sal_uInt16>(nWidth) : USHRT_MAX;
}
-USHORT SwHTMLTableLayout::GetBrowseWidthByTable( const SwDoc& rDoc ) const
+sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTable( const SwDoc& rDoc ) const
{
- USHORT nBrowseWidth = 0;
+ sal_uInt16 nBrowseWidth = 0;
SwClientIter aIter( *(SwModify*)pSwTable->GetFrmFmt() );
SwClient* pCli = aIter.First( TYPE( SwTabFrm ));
if( pCli )
@@ -458,12 +458,12 @@ SwFrmFmt *SwHTMLTableLayout::FindFlyFrmFmt() const
return pTblNd->GetFlyFmt();
}
-static void lcl_GetMinMaxSize( ULONG& rMinNoAlignCnts, ULONG& rMaxNoAlignCnts,
- ULONG& rAbsMinNoAlignCnts,
+static void lcl_GetMinMaxSize( sal_uLong& rMinNoAlignCnts, sal_uLong& rMaxNoAlignCnts,
+ sal_uLong& rAbsMinNoAlignCnts,
#ifdef FIX41370
- BOOL& rHR,
+ sal_Bool& rHR,
#endif
- SwTxtNode *pTxtNd, ULONG nIdx, BOOL bNoBreak )
+ SwTxtNode *pTxtNd, sal_uLong nIdx, sal_Bool bNoBreak )
{
pTxtNd->GetMinMaxSize( nIdx, rMinNoAlignCnts, rMaxNoAlignCnts,
rAbsMinNoAlignCnts );
@@ -493,7 +493,7 @@ static void lcl_GetMinMaxSize( ULONG& rMinNoAlignCnts, ULONG& rMaxNoAlignCnts,
{
rHR |= !pTxtNd->HasSwAttrSet() ||
SFX_ITEM_SET != pTxtNd->GetpSwAttrSet()
- ->GetItemState( RES_LR_SPACE, FALSE );
+ ->GetItemState( RES_LR_SPACE, sal_False );
}
#endif
}
@@ -504,8 +504,8 @@ void SwHTMLTableLayout::AutoLayoutPass1()
ClearPass1Info();
- BOOL bFixRelWidths = FALSE;
- USHORT i;
+ sal_Bool bFixRelWidths = sal_False;
+ sal_uInt16 i;
SwHTMLTableLayoutConstraints *pConstraints = 0;
@@ -513,19 +513,19 @@ void SwHTMLTableLayout::AutoLayoutPass1()
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
pColumn->ClearPass1Info( !HasColTags() );
- USHORT nMinColSpan = USHRT_MAX; // Spaltenzahl, auf die sich dir
+ sal_uInt16 nMinColSpan = USHRT_MAX; // Spaltenzahl, auf die sich dir
// berechnete Breite bezieht
- USHORT nColSkip = USHRT_MAX; // Wie viele Spalten muessen
+ sal_uInt16 nColSkip = USHRT_MAX; // Wie viele Spalten muessen
// uebersprungen werden
- for( USHORT j=0; j<nRows; j++ )
+ for( sal_uInt16 j=0; j<nRows; j++ )
{
SwHTMLTableLayoutCell *pCell = GetCell(j,i);
SwHTMLTableLayoutCnts *pCnts = pCell->GetContents();
// fix #31488#: Zum Ermitteln der naechsten zu berechnenden
// Spalte muessen alle Zeilen herangezogen werden
- USHORT nColSpan = pCell->GetColSpan();
+ sal_uInt16 nColSpan = pCell->GetColSpan();
if( nColSpan < nColSkip )
nColSkip = nColSpan;
@@ -536,13 +536,13 @@ void SwHTMLTableLayout::AutoLayoutPass1()
if( nColSpan < nMinColSpan )
nMinColSpan = nColSpan;
- ULONG nMinNoAlignCell = 0;
- ULONG nMaxNoAlignCell = 0;
- ULONG nAbsMinNoAlignCell = 0;
- ULONG nMaxTableCell = 0;
- ULONG nAbsMinTableCell = 0;
+ sal_uLong nMinNoAlignCell = 0;
+ sal_uLong nMaxNoAlignCell = 0;
+ sal_uLong nAbsMinNoAlignCell = 0;
+ sal_uLong nMaxTableCell = 0;
+ sal_uLong nAbsMinTableCell = 0;
#ifdef FIX41370
- BOOL bHR = FALSE;
+ sal_Bool bHR = sal_False;
#endif
while( pCnts )
@@ -551,15 +551,15 @@ void SwHTMLTableLayout::AutoLayoutPass1()
if( pSttNd )
{
const SwDoc *pDoc = pSttNd->GetDoc();
- ULONG nIdx = pSttNd->GetIndex();
+ sal_uLong nIdx = pSttNd->GetIndex();
while( !(pDoc->GetNodes()[nIdx])->IsEndNode() )
{
SwTxtNode *pTxtNd = (pDoc->GetNodes()[nIdx])->GetTxtNode();
if( pTxtNd )
{
- ULONG nMinNoAlignCnts = 0;
- ULONG nMaxNoAlignCnts = 0;
- ULONG nAbsMinNoAlignCnts = 0;
+ sal_uLong nMinNoAlignCnts = 0;
+ sal_uLong nMaxNoAlignCnts = 0;
+ sal_uLong nAbsMinNoAlignCnts = 0;
lcl_GetMinMaxSize( nMinNoAlignCnts,
nMaxNoAlignCnts,
@@ -586,14 +586,14 @@ void SwHTMLTableLayout::AutoLayoutPass1()
if( pChild )
{
pChild->AutoLayoutPass1();
- ULONG nMaxTableCnts = pChild->nMax;
- ULONG nAbsMinTableCnts = pChild->nMin;
+ sal_uLong nMaxTableCnts = pChild->nMax;
+ sal_uLong nAbsMinTableCnts = pChild->nMin;
// Eine feste Tabellen-Breite wird als Minimum
// und Maximum gleichzeitig uebernommen
if( !pChild->bPrcWidthOption && pChild->nWidthOption )
{
- ULONG nTabWidth = pChild->nWidthOption;
+ sal_uLong nTabWidth = pChild->nWidthOption;
if( nTabWidth >= nAbsMinTableCnts )
{
nMaxTableCnts = nTabWidth;
@@ -621,14 +621,14 @@ void SwHTMLTableLayout::AutoLayoutPass1()
ASSERT( !this, "Sub tables in HTML import?" )
SwHTMLTableLayout *pChild = pCnts->GetTable();
pChild->AutoLayoutPass1();
- ULONG nMaxTableCnts = pChild->nMax;
- ULONG nAbsMinTableCnts = pChild->nMin;
+ sal_uLong nMaxTableCnts = pChild->nMax;
+ sal_uLong nAbsMinTableCnts = pChild->nMin;
// Eine feste Tabellen-Breite wird als Minimum
// und Maximum gleichzeitig uebernommen
if( !pChild->bPrcWidthOption && pChild->nWidthOption )
{
- ULONG nTabWidth = pChild->nWidthOption;
+ sal_uLong nTabWidth = pChild->nWidthOption;
if( nTabWidth >= nAbsMinTableCnts )
{
nMaxTableCnts = nTabWidth;
@@ -665,8 +665,8 @@ void SwHTMLTableLayout::AutoLayoutPass1()
}
// War frueher hinter AddBorderWidth
- BOOL bRelWidth = pCell->IsPrcWidthOption();
- USHORT nWidth = pCell->GetWidthOption();
+ sal_Bool bRelWidth = pCell->IsPrcWidthOption();
+ sal_uInt16 nWidth = pCell->GetWidthOption();
// Eine NOWRAP-Option bezieht sich auf Text und auf
// Tabellen, wird aber bei fester Zellenbreite
@@ -738,9 +738,9 @@ void SwHTMLTableLayout::AutoLayoutPass1()
// unten erklaert.
if( !HasColTags() && nWidth && !bRelWidth )
{
- ULONG nAbsWidth = nWidth, nDummy = 0, nDummy2 = 0;
+ sal_uLong nAbsWidth = nWidth, nDummy = 0, nDummy2 = 0;
AddBorderWidth( nAbsWidth, nDummy, nDummy2,
- i, nColSpan, FALSE );
+ i, nColSpan, sal_False );
if( nAbsWidth >= nMinNoAlignCell )
{
@@ -807,9 +807,9 @@ void SwHTMLTableLayout::AutoLayoutPass1()
{
// absolute Breiten als Minimal- und Maximalbreite
// uebernehmen.
- ULONG nAbsWidth = pColumn->GetWidthOption();
- ULONG nDummy = 0, nDummy2 = 0;
- AddBorderWidth( nAbsWidth, nDummy, nDummy2, i, 1, FALSE );
+ sal_uLong nAbsWidth = pColumn->GetWidthOption();
+ sal_uLong nDummy = 0, nDummy2 = 0;
+ AddBorderWidth( nAbsWidth, nDummy, nDummy2, i, 1, sal_False );
if( nAbsWidth >= pColumn->GetMinNoAlign() )
{
@@ -855,16 +855,16 @@ void SwHTMLTableLayout::AutoLayoutPass1()
{
// Erstmal muss die Breite analog zu den den Spaltenbreiten
// aufbereitet werden
- USHORT nCol = pConstr->GetColumn();
- USHORT nColSpan = pConstr->GetColSpan();
- ULONG nConstrMin = pConstr->GetMinNoAlign();
- ULONG nConstrMax = pConstr->GetMaxNoAlign();
+ sal_uInt16 nCol = pConstr->GetColumn();
+ sal_uInt16 nColSpan = pConstr->GetColSpan();
+ sal_uLong nConstrMin = pConstr->GetMinNoAlign();
+ sal_uLong nConstrMax = pConstr->GetMaxNoAlign();
// jetzt holen wir uns die bisherige Breite der ueberspannten
// Spalten
- ULONG nColsMin = 0;
- ULONG nColsMax = 0;
- for( USHORT j=nCol; j<nCol+nColSpan; j++ )
+ sal_uLong nColsMin = 0;
+ sal_uLong nColsMax = 0;
+ for( sal_uInt16 j=nCol; j<nCol+nColSpan; j++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( j );
nColsMin += pColumn->GetMin();
@@ -874,22 +874,22 @@ void SwHTMLTableLayout::AutoLayoutPass1()
if( nColsMin<nConstrMin )
{
// den Minimalwert anteilig auf die Spalten verteilen
- ULONG nMinD = nConstrMin-nColsMin;
+ sal_uLong nMinD = nConstrMin-nColsMin;
if( nConstrMin > nColsMax )
{
// Anteilig anhand der Mindestbreiten
- USHORT nEndCol = nCol+nColSpan;
- ULONG nDiff = nMinD;
- for( USHORT ic=nCol; ic<nEndCol; ic++ )
+ sal_uInt16 nEndCol = nCol+nColSpan;
+ sal_uLong nDiff = nMinD;
+ for( sal_uInt16 ic=nCol; ic<nEndCol; ic++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( ic );
- ULONG nColMin = pColumn->GetMin();
- ULONG nColMax = pColumn->GetMax();
+ sal_uLong nColMin = pColumn->GetMin();
+ sal_uLong nColMax = pColumn->GetMax();
nMin -= nColMin;
- ULONG nAdd = ic<nEndCol-1 ? (nColMin * nMinD) / nColsMin
+ sal_uLong nAdd = ic<nEndCol-1 ? (nColMin * nMinD) / nColsMin
: nDiff;
nColMin += nAdd;
nMin += nColMin;
@@ -911,11 +911,11 @@ void SwHTMLTableLayout::AutoLayoutPass1()
else
{
// Anteilig anhand der Differenz zwischen Max und Min
- for( USHORT ic=nCol; ic<nCol+nColSpan; ic++ )
+ for( sal_uInt16 ic=nCol; ic<nCol+nColSpan; ic++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( ic );
- ULONG nDiff = pColumn->GetMax()-pColumn->GetMin();
+ sal_uLong nDiff = pColumn->GetMax()-pColumn->GetMin();
if( nMinD < nDiff )
nDiff = nMinD;
@@ -932,9 +932,9 @@ void SwHTMLTableLayout::AutoLayoutPass1()
if( !HasColTags() && nColsMax<nConstrMax )
{
- ULONG nMaxD = nConstrMax-nColsMax;
+ sal_uLong nMaxD = nConstrMax-nColsMax;
- for( USHORT ic=nCol; ic<nCol+nColSpan; ic++ )
+ for( sal_uInt16 ic=nCol; ic<nCol+nColSpan; ic++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( ic );
@@ -965,9 +965,9 @@ void SwHTMLTableLayout::AutoLayoutPass1()
// erhalten und dient als Ausgangsbasis fuer die andern Breiten.
// Es werden auch hier nur die Maximalbreiten beeinflusst!
- ULONG nAbsMin = 0; // absolte Min-Breite alter Spalten mit
+ sal_uLong nAbsMin = 0; // absolte Min-Breite alter Spalten mit
// relativer Breite
- ULONG nRel = 0; // Summe der relativen Breiten aller Spalten
+ sal_uLong nRel = 0; // Summe der relativen Breiten aller Spalten
for( i=0; i<nCols; i++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
@@ -978,7 +978,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
}
}
- ULONG nQuot = ULONG_MAX;
+ sal_uLong nQuot = ULONG_MAX;
for( i=0; i<nCols; i++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
@@ -988,7 +988,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
if( pColumn->GetWidthOption() && pColumn->GetMin() )
{
pColumn->SetMax( nAbsMin * pColumn->GetWidthOption() );
- ULONG nColQuot = pColumn->GetMax() / pColumn->GetMin();
+ sal_uLong nColQuot = pColumn->GetMax() / pColumn->GetMin();
if( nColQuot<nQuot )
nQuot = nColQuot;
}
@@ -1013,9 +1013,9 @@ void SwHTMLTableLayout::AutoLayoutPass1()
}
else
{
- USHORT nRel = 0; // Summe der relativen Breiten aller Spalten
- USHORT nRelCols = 0; // Anzahl Spalten mit relativer Angabe
- ULONG nRelMax = 0; // Anteil am Maximum dieser Spalten
+ sal_uInt16 nRel = 0; // Summe der relativen Breiten aller Spalten
+ sal_uInt16 nRelCols = 0; // Anzahl Spalten mit relativer Angabe
+ sal_uLong nRelMax = 0; // Anteil am Maximum dieser Spalten
for( i=0; i<nCols; i++ )
{
ASSERT( nRel<=100, "relative Breite aller Spalten>100%" );
@@ -1024,11 +1024,11 @@ void SwHTMLTableLayout::AutoLayoutPass1()
{
// Sicherstellen, dass die relativen breiten nicht
// ueber 100% landen
- USHORT nColWidth = pColumn->GetWidthOption();
+ sal_uInt16 nColWidth = pColumn->GetWidthOption();
if( nRel+nColWidth > 100 )
{
nColWidth = 100 - nRel;
- pColumn->SetWidthOption( nColWidth, TRUE, FALSE );
+ pColumn->SetWidthOption( nColWidth, sal_True, sal_False );
}
nRelMax += pColumn->GetMax();
nRel = nRel + nColWidth;
@@ -1052,8 +1052,8 @@ void SwHTMLTableLayout::AutoLayoutPass1()
// mit fester Breite. Ist das richtig???
if( nRel < 100 && nRelCols < nCols )
{
- USHORT nRelLeft = 100 - nRel;
- ULONG nFixMax = nMax - nRelMax;
+ sal_uInt16 nRelLeft = 100 - nRel;
+ sal_uLong nFixMax = nMax - nRelMax;
for( i=0; i<nCols; i++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
@@ -1062,16 +1062,16 @@ void SwHTMLTableLayout::AutoLayoutPass1()
pColumn->GetMin() )
{
// den Rest bekommt die naechste Spalte
- USHORT nColWidth =
- (USHORT)((pColumn->GetMax() * nRelLeft) / nFixMax);
- pColumn->SetWidthOption( nColWidth, TRUE, FALSE );
+ sal_uInt16 nColWidth =
+ (sal_uInt16)((pColumn->GetMax() * nRelLeft) / nFixMax);
+ pColumn->SetWidthOption( nColWidth, sal_True, sal_False );
}
}
}
// nun die Maximalbreiten entsprechend anpassen
- ULONG nQuotMax = ULONG_MAX;
- ULONG nOldMax = nMax;
+ sal_uLong nQuotMax = ULONG_MAX;
+ sal_uLong nOldMax = nMax;
nMax = 0;
for( i=0; i<nCols; i++ )
{
@@ -1083,8 +1083,8 @@ void SwHTMLTableLayout::AutoLayoutPass1()
SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
if( pColumn->IsRelWidthOption() && pColumn->GetWidthOption() )
{
- ULONG nNewMax;
- ULONG nColQuotMax;
+ sal_uLong nNewMax;
+ sal_uLong nColQuotMax;
if( !nWidthOption )
{
nNewMax = nOldMax * pColumn->GetWidthOption();
@@ -1132,10 +1132,10 @@ void SwHTMLTableLayout::AutoLayoutPass1()
// nRelAvail ist der auf USHRT_MAX bezogene verfuegbare Platz oder 0
// nAbsSpace ist der Anteil von nAbsAvail, der durch der umgebende Zelle
// fur die Umrandung und den Abstand zum Inhalt reserviert ist.
-void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
- USHORT nAbsLeftSpace,
- USHORT nAbsRightSpace,
- USHORT nParentInhAbsSpace )
+void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAvail,
+ sal_uInt16 nAbsLeftSpace,
+ sal_uInt16 nAbsRightSpace,
+ sal_uInt16 nParentInhAbsSpace )
{
// Erstmal fuehren wie jede Menge Plausibilaets-Test durch
@@ -1161,7 +1161,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// vorhandene Filler-Zellen und Abstande angepasst
// Abstand zum Inhalt und Unrandung
- USHORT nAbsLeftFill = 0, nAbsRightFill = 0;
+ sal_uInt16 nAbsLeftFill = 0, nAbsRightFill = 0;
if( !IsTopTable() &&
GetMin() + nAbsLeftSpace + nAbsRightSpace <= nAbsAvail )
{
@@ -1201,10 +1201,10 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
nRelRightFill = 0;
if( !IsTopTable() && (nAbsLeftFill>0 || nAbsRightFill) )
{
- ULONG nAbsLeftFillL = nAbsLeftFill, nAbsRightFillL = nAbsRightFill;
+ sal_uLong nAbsLeftFillL = nAbsLeftFill, nAbsRightFillL = nAbsRightFill;
- nRelLeftFill = (USHORT)((nAbsLeftFillL * nRelAvail) / nAbsAvail);
- nRelRightFill = (USHORT)((nAbsRightFillL * nRelAvail) / nAbsAvail);
+ nRelLeftFill = (sal_uInt16)((nAbsLeftFillL * nRelAvail) / nAbsAvail);
+ nRelRightFill = (sal_uInt16)((nAbsRightFillL * nRelAvail) / nAbsAvail);
nAbsAvail -= (nAbsLeftFill + nAbsRightFill);
if( nRelAvail )
@@ -1213,8 +1213,8 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// Schritt 2: Die absolute Tabellenbreite wird berechnet.
- USHORT nAbsTabWidth = 0;
- bUseRelWidth = FALSE;
+ sal_uInt16 nAbsTabWidth = 0;
+ bUseRelWidth = sal_False;
if( nWidthOption )
{
if( bPrcWidthOption )
@@ -1236,12 +1236,12 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// MIB 19.2.98: Wegen fix #47394# spielen wir solche Spielchen
// jetzt doch. Dort war eine Grafik in einer 1%-breiten
// Tabelle und hat da natuerlich nicht hineingepasst.
- nAbsTabWidth = (USHORT)( ((ULONG)nAbsAvail * nWidthOption) / 100 );
+ nAbsTabWidth = (sal_uInt16)( ((sal_uLong)nAbsAvail * nWidthOption) / 100 );
if( IsTopTable() &&
- ( /*MayBeInFlyFrame() ||*/ (ULONG)nAbsTabWidth > nMin ) )
+ ( /*MayBeInFlyFrame() ||*/ (sal_uLong)nAbsTabWidth > nMin ) )
{
nRelAvail = USHRT_MAX;
- bUseRelWidth = TRUE;
+ bUseRelWidth = sal_True;
}
}
else
@@ -1269,7 +1269,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// Schritt 3: Bestimmen der Spaltenbreiten und ggf. auch der
// absoluten und relativen Tabellenbreiten.
- if( (!IsTopTable() && nMin > (ULONG)nAbsAvail) ||
+ if( (!IsTopTable() && nMin > (sal_uLong)nAbsAvail) ||
nMin > MAX_TABWIDTH )
{
// Wenn
@@ -1287,10 +1287,10 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// that are: Every cell's width excluding the borders must be at least
// MINLAY:
- ULONG nRealMin = 0;
- for( USHORT i=0; i<nCols; i++ )
+ sal_uLong nRealMin = 0;
+ for( sal_uInt16 i=0; i<nCols; i++ )
{
- ULONG nRealColMin = MINLAY, nDummy1, nDummy2;
+ sal_uLong nRealColMin = MINLAY, nDummy1, nDummy2;
AddBorderWidth( nRealColMin, nDummy1, nDummy2, i, 1 );
nRealMin += nRealColMin;
}
@@ -1299,30 +1299,30 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// "Nichts geht mehr". We cannot get the minimum column widths
// the layout wants to have.
- USHORT nAbs = 0, nRel = 0;
+ sal_uInt16 nAbs = 0, nRel = 0;
SwHTMLTableLayoutColumn *pColumn;
- for( USHORT i=0; i<nCols-1; i++ )
+ for( sal_uInt16 i=0; i<nCols-1; i++ )
{
pColumn = GetColumn( i );
- ULONG nColMin = pColumn->GetMin();
+ sal_uLong nColMin = pColumn->GetMin();
if( nColMin <= USHRT_MAX )
{
pColumn->SetAbsColWidth(
- (USHORT)((nColMin * nAbsTabWidth) / nMin) );
+ (sal_uInt16)((nColMin * nAbsTabWidth) / nMin) );
pColumn->SetRelColWidth(
- (USHORT)((nColMin * nRelTabWidth) / nMin) );
+ (sal_uInt16)((nColMin * nRelTabWidth) / nMin) );
}
else
{
double nColMinD = nColMin;
pColumn->SetAbsColWidth(
- (USHORT)((nColMinD * nAbsTabWidth) / nMin) );
+ (sal_uInt16)((nColMinD * nAbsTabWidth) / nMin) );
pColumn->SetRelColWidth(
- (USHORT)((nColMinD * nRelTabWidth) / nMin) );
+ (sal_uInt16)((nColMinD * nRelTabWidth) / nMin) );
}
- nAbs = nAbs + (USHORT)pColumn->GetAbsColWidth();
- nRel = nRel + (USHORT)pColumn->GetRelColWidth();
+ nAbs = nAbs + (sal_uInt16)pColumn->GetAbsColWidth();
+ nRel = nRel + (sal_uInt16)pColumn->GetRelColWidth();
}
pColumn = GetColumn( nCols-1 );
pColumn->SetAbsColWidth( nAbsTabWidth - nAbs );
@@ -1330,43 +1330,43 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
}
else
{
- ULONG nDistAbs = nAbsTabWidth - nRealMin;
- ULONG nDistRel = nRelTabWidth - nRealMin;
- ULONG nDistMin = nMin - nRealMin;
- USHORT nAbs = 0, nRel = 0;
+ sal_uLong nDistAbs = nAbsTabWidth - nRealMin;
+ sal_uLong nDistRel = nRelTabWidth - nRealMin;
+ sal_uLong nDistMin = nMin - nRealMin;
+ sal_uInt16 nAbs = 0, nRel = 0;
SwHTMLTableLayoutColumn *pColumn;
- for( USHORT i=0; i<nCols-1; i++ )
+ for( sal_uInt16 i=0; i<nCols-1; i++ )
{
pColumn = GetColumn( i );
- ULONG nColMin = pColumn->GetMin();
- ULONG nRealColMin = MINLAY, nDummy1, nDummy2;
+ sal_uLong nColMin = pColumn->GetMin();
+ sal_uLong nRealColMin = MINLAY, nDummy1, nDummy2;
AddBorderWidth( nRealColMin, nDummy1, nDummy2, i, 1 );
if( nColMin <= USHRT_MAX )
{
pColumn->SetAbsColWidth(
- (USHORT)((((nColMin-nRealColMin) * nDistAbs) / nDistMin) + nRealColMin) );
+ (sal_uInt16)((((nColMin-nRealColMin) * nDistAbs) / nDistMin) + nRealColMin) );
pColumn->SetRelColWidth(
- (USHORT)((((nColMin-nRealColMin) * nDistRel) / nDistMin) + nRealColMin) );
+ (sal_uInt16)((((nColMin-nRealColMin) * nDistRel) / nDistMin) + nRealColMin) );
}
else
{
double nColMinD = nColMin;
pColumn->SetAbsColWidth(
- (USHORT)((((nColMinD-nRealColMin) * nDistAbs) / nDistMin) + nRealColMin) );
+ (sal_uInt16)((((nColMinD-nRealColMin) * nDistAbs) / nDistMin) + nRealColMin) );
pColumn->SetRelColWidth(
- (USHORT)((((nColMinD-nRealColMin) * nDistRel) / nDistMin) + nRealColMin) );
+ (sal_uInt16)((((nColMinD-nRealColMin) * nDistRel) / nDistMin) + nRealColMin) );
}
- nAbs = nAbs + (USHORT)pColumn->GetAbsColWidth();
- nRel = nRel + (USHORT)pColumn->GetRelColWidth();
+ nAbs = nAbs + (sal_uInt16)pColumn->GetAbsColWidth();
+ nRel = nRel + (sal_uInt16)pColumn->GetRelColWidth();
}
pColumn = GetColumn( nCols-1 );
pColumn->SetAbsColWidth( nAbsTabWidth - nAbs );
pColumn->SetRelColWidth( nRelTabWidth - nRel );
}
}
- else if( nMax <= (ULONG)(nAbsTabWidth ? nAbsTabWidth : nAbsAvail) )
+ else if( nMax <= (sal_uLong)(nAbsTabWidth ? nAbsTabWidth : nAbsAvail) )
{
// Wenn
// - die Tabelle eine fixe Breite besitzt und das Maximum der
@@ -1378,7 +1378,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// Keine fixe Breite, dann das Maximum nehmen.
if( !nAbsTabWidth )
- nAbsTabWidth = (USHORT)nMax;
+ nAbsTabWidth = (sal_uInt16)nMax;
// Eine Top-Table darf auch beriter werden als der verfuegbare Platz.
if( nAbsTabWidth > nAbsAvail )
@@ -1390,14 +1390,14 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// Nur den Anteil der relativen Breite verwenden, der auch fuer
// die absolute Breite verwendet wuerde.
- ULONG nAbsTabWidthL = nAbsTabWidth;
+ sal_uLong nAbsTabWidthL = nAbsTabWidth;
nRelTabWidth =
- ( nRelAvail ? (USHORT)((nAbsTabWidthL * nRelAvail) / nAbsAvail)
+ ( nRelAvail ? (sal_uInt16)((nAbsTabWidthL * nRelAvail) / nAbsAvail)
: nAbsTabWidth );
// Gibt es Spalten mit und Spalten ohne %-Angabe?
- ULONG nFixMax = nMax;
- for( USHORT i=0; i<nCols; i++ )
+ sal_uLong nFixMax = nMax;
+ for( sal_uInt16 i=0; i<nCols; i++ )
{
const SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
if( pColumn->IsRelWidthOption() && pColumn->GetWidthOption()>0 )
@@ -1417,9 +1417,9 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// werden zuerst die fixen Breiten entsprechend korrigiert
// eingestellt und erst danach die relativen.
- USHORT nAbs = 0, nRel = 0;
- USHORT nFixedCols = 0;
- USHORT i;
+ sal_uInt16 nAbs = 0, nRel = 0;
+ sal_uInt16 nFixedCols = 0;
+ sal_uInt16 i;
for( i = 0; i < nCols; i++ )
{
@@ -1428,21 +1428,21 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
{
// Die Spalte behaelt ihre Breite bei.
nFixedCols++;
- ULONG nColMax = pColumn->GetMax();
- pColumn->SetAbsColWidth( (USHORT)nColMax );
+ sal_uLong nColMax = pColumn->GetMax();
+ pColumn->SetAbsColWidth( (sal_uInt16)nColMax );
- ULONG nRelColWidth =
+ sal_uLong nRelColWidth =
(nColMax * nRelTabWidth) / nAbsTabWidth;
- ULONG nChkWidth =
+ sal_uLong nChkWidth =
(nRelColWidth * nAbsTabWidth) / nRelTabWidth;
if( nChkWidth < nColMax )
nRelColWidth++;
else if( nChkWidth > nColMax )
nRelColWidth--;
- pColumn->SetRelColWidth( (USHORT)nRelColWidth );
+ pColumn->SetRelColWidth( (sal_uInt16)nRelColWidth );
- nAbs = nAbs + (USHORT)nColMax;
- nRel = nRel + (USHORT)nRelColWidth;
+ nAbs = nAbs + (sal_uInt16)nColMax;
+ nRel = nRel + (sal_uInt16)nRelColWidth;
}
}
@@ -1451,9 +1451,9 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// nAbs, so dass man gleich nFixMax haette nehmen koennen.
// Der Code ist so aber verstaendlicher.
ASSERT( nFixMax == nAbs, "Zwei Schleifen, zwei Summen?" )
- ULONG nDistMax = nMax - nFixMax;
- USHORT nDistAbsTabWidth = nAbsTabWidth - nAbs;
- USHORT nDistRelTabWidth = nRelTabWidth - nRel;
+ sal_uLong nDistMax = nMax - nFixMax;
+ sal_uInt16 nDistAbsTabWidth = nAbsTabWidth - nAbs;
+ sal_uInt16 nDistRelTabWidth = nRelTabWidth - nRel;
for( i=0; i<nCols; i++ )
{
@@ -1469,11 +1469,11 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
}
else
{
- ULONG nColMax = pColumn->GetMax();
+ sal_uLong nColMax = pColumn->GetMax();
pColumn->SetAbsColWidth(
- (USHORT)((nColMax * nDistAbsTabWidth) / nDistMax) );
+ (sal_uInt16)((nColMax * nDistAbsTabWidth) / nDistMax) );
pColumn->SetRelColWidth(
- (USHORT)((nColMax * nDistRelTabWidth) / nDistMax) );
+ (sal_uInt16)((nColMax * nDistRelTabWidth) / nDistMax) );
}
nAbs = nAbs + pColumn->GetAbsColWidth();
nRel = nRel + pColumn->GetRelColWidth();
@@ -1485,13 +1485,13 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
{
// nein, dann den zu verteilenden Platz auf alle Spalten
// gleichmaessig vertilen.
- for( USHORT i=0; i<nCols; i++ )
+ for( sal_uInt16 i=0; i<nCols; i++ )
{
- ULONG nColMax = GetColumn( i )->GetMax();
+ sal_uLong nColMax = GetColumn( i )->GetMax();
GetColumn( i )->SetAbsColWidth(
- (USHORT)((nColMax * nAbsTabWidth) / nMax) );
+ (sal_uInt16)((nColMax * nAbsTabWidth) / nMax) );
GetColumn( i )->SetRelColWidth(
- (USHORT)((nColMax * nRelTabWidth) / nMax) );
+ (sal_uInt16)((nColMax * nRelTabWidth) / nMax) );
}
}
}
@@ -1502,7 +1502,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
if( !nAbsTabWidth )
nAbsTabWidth = nAbsAvail;
if( nAbsTabWidth < nMin )
- nAbsTabWidth = (USHORT)nMin;
+ nAbsTabWidth = (sal_uInt16)nMin;
if( nAbsTabWidth > nAbsAvail )
{
@@ -1511,25 +1511,25 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
nAbsAvail = nAbsTabWidth;
}
- ULONG nAbsTabWidthL = nAbsTabWidth;
+ sal_uLong nAbsTabWidthL = nAbsTabWidth;
nRelTabWidth =
- ( nRelAvail ? (USHORT)((nAbsTabWidthL * nRelAvail) / nAbsAvail)
+ ( nRelAvail ? (sal_uInt16)((nAbsTabWidthL * nRelAvail) / nAbsAvail)
: nAbsTabWidth );
double nW = nAbsTabWidth - nMin;
double nD = (nMax==nMin ? 1 : nMax-nMin);
- USHORT nAbs = 0, nRel = 0;
- for( USHORT i=0; i<nCols-1; i++ )
+ sal_uInt16 nAbs = 0, nRel = 0;
+ for( sal_uInt16 i=0; i<nCols-1; i++ )
{
double nd = GetColumn( i )->GetMax() - GetColumn( i )->GetMin();
- ULONG nAbsColWidth = GetColumn( i )->GetMin() + (ULONG)((nd*nW)/nD);
- ULONG nRelColWidth = nRelAvail
+ sal_uLong nAbsColWidth = GetColumn( i )->GetMin() + (sal_uLong)((nd*nW)/nD);
+ sal_uLong nRelColWidth = nRelAvail
? (nAbsColWidth * nRelTabWidth) / nAbsTabWidth
: nAbsColWidth;
- GetColumn( i )->SetAbsColWidth( (USHORT)nAbsColWidth );
- GetColumn( i )->SetRelColWidth( (USHORT)nRelColWidth );
- nAbs = nAbs + (USHORT)nAbsColWidth;
- nRel = nRel + (USHORT)nRelColWidth;
+ GetColumn( i )->SetAbsColWidth( (sal_uInt16)nAbsColWidth );
+ GetColumn( i )->SetRelColWidth( (sal_uInt16)nRelColWidth );
+ nAbs = nAbs + (sal_uInt16)nAbsColWidth;
+ nRel = nRel + (sal_uInt16)nRelColWidth;
}
GetColumn( nCols-1 )->SetAbsColWidth( nAbsTabWidth - nAbs );
GetColumn( nCols-1 )->SetRelColWidth( nRelTabWidth - nRel );
@@ -1545,9 +1545,9 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
{
// Die Breite von zusaetzlichen Zellen zur Ausrichtung der
// inneren Tabelle bestimmen
- USHORT nAbsDist = (USHORT)(nAbsAvail-nAbsTabWidth);
- USHORT nRelDist = (USHORT)(nRelAvail-nRelTabWidth);
- USHORT nParentInhAbsLeftSpace = 0, nParentInhAbsRightSpace = 0;
+ sal_uInt16 nAbsDist = (sal_uInt16)(nAbsAvail-nAbsTabWidth);
+ sal_uInt16 nRelDist = (sal_uInt16)(nRelAvail-nRelTabWidth);
+ sal_uInt16 nParentInhAbsLeftSpace = 0, nParentInhAbsRightSpace = 0;
// Groesse und Position der zusaetzlichen Zellen bestimmen
switch( eTableAdjust )
@@ -1559,10 +1559,10 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
break;
case SVX_ADJUST_CENTER:
{
- USHORT nAbsLeftDist = nAbsDist / 2;
+ sal_uInt16 nAbsLeftDist = nAbsDist / 2;
nAbsLeftFill = nAbsLeftFill + nAbsLeftDist;
nAbsRightFill += nAbsDist - nAbsLeftDist;
- USHORT nRelLeftDist = nRelDist / 2;
+ sal_uInt16 nRelLeftDist = nRelDist / 2;
nRelLeftFill = nRelLeftFill + nRelLeftDist;
nRelRightFill += nRelDist - nRelLeftDist;
nParentInhAbsLeftSpace = nParentInhAbsSpace / 2;
@@ -1613,32 +1613,32 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
}
}
-static BOOL lcl_ResizeLine( const SwTableLine*& rpLine, void* pPara );
+static sal_Bool lcl_ResizeLine( const SwTableLine*& rpLine, void* pPara );
-static BOOL lcl_ResizeBox( const SwTableBox*& rpBox, void* pPara )
+static sal_Bool lcl_ResizeBox( const SwTableBox*& rpBox, void* pPara )
{
- USHORT *pWidth = (USHORT *)pPara;
+ sal_uInt16 *pWidth = (sal_uInt16 *)pPara;
if( !rpBox->GetSttNd() )
{
- USHORT nWidth = 0;
+ sal_uInt16 nWidth = 0;
((SwTableBox *)rpBox)->GetTabLines().ForEach( &lcl_ResizeLine, &nWidth );
rpBox->GetFrmFmt()->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nWidth, 0 ));
*pWidth = *pWidth + nWidth;
}
else
{
- *pWidth = *pWidth + (USHORT)rpBox->GetFrmFmt()->GetFrmSize().GetSize().Width();
+ *pWidth = *pWidth + (sal_uInt16)rpBox->GetFrmFmt()->GetFrmSize().GetSize().Width();
}
- return TRUE;
+ return sal_True;
}
-static BOOL lcl_ResizeLine( const SwTableLine*& rpLine, void* pPara )
+static sal_Bool lcl_ResizeLine( const SwTableLine*& rpLine, void* pPara )
{
- USHORT *pWidth = (USHORT *)pPara;
+ sal_uInt16 *pWidth = (sal_uInt16 *)pPara;
#ifdef DBG_UTIL
- USHORT nOldWidth = *pWidth;
+ sal_uInt16 nOldWidth = *pWidth;
#endif
*pWidth = 0;
((SwTableLine *)rpLine)->GetTabBoxes().ForEach( &lcl_ResizeBox, pWidth );
@@ -1648,13 +1648,13 @@ static BOOL lcl_ResizeLine( const SwTableLine*& rpLine, void* pPara )
"Zeilen einer Box sind unterschiedlich lang" );
#endif
- return TRUE;
+ return sal_True;
}
-void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
- USHORT nRelAvail, USHORT nAbsLeftSpace,
- USHORT nAbsRightSpace,
- USHORT nParentInhAbsSpace )
+void SwHTMLTableLayout::SetWidths( sal_Bool bCallPass2, sal_uInt16 nAbsAvail,
+ sal_uInt16 nRelAvail, sal_uInt16 nAbsLeftSpace,
+ sal_uInt16 nAbsRightSpace,
+ sal_uInt16 nParentInhAbsSpace )
{
// SetWidth muss am Ende einmal mehr fuer jede Zelle durchlaufen
// worden sein.
@@ -1670,9 +1670,9 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
// Da die Boxen nichts von der HTML-Tabellen-Struktur wissen, wird
// ueber die HTML-Tabellen-Struktur iteriert. Fuer Tabellen in Tabellen
// in Tabellen wird rekursiv SetWidth aufgerufen.
- for( USHORT i=0; i<nRows; i++ )
+ for( sal_uInt16 i=0; i<nRows; i++ )
{
- for( USHORT j=0; j<nCols; j++ )
+ for( sal_uInt16 j=0; j<nCols; j++ )
{
SwHTMLTableLayoutCell *pCell = GetCell( i, j );
@@ -1686,11 +1686,11 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
}
else
{
- USHORT nAbs = 0, nRel = 0, nLSpace = 0, nRSpace = 0,
+ sal_uInt16 nAbs = 0, nRel = 0, nLSpace = 0, nRSpace = 0,
nInhSpace = 0;
if( bCallPass2 )
{
- USHORT nColSpan = pCell->GetColSpan();
+ sal_uInt16 nColSpan = pCell->GetColSpan();
GetAvail( j, nColSpan, nAbs, nRel );
nLSpace = GetLeftCellSpace( j, nColSpan );
nRSpace = GetRightCellSpace( j, nColSpan );
@@ -1715,7 +1715,7 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
// stattdessen die Breiten der Filler-Zellen gesetzt.
if( IsTopTable() )
{
- USHORT nCalcTabWidth = 0;
+ sal_uInt16 nCalcTabWidth = 0;
((SwTable *)pSwTable)->GetTabLines().ForEach( &lcl_ResizeLine,
&nCalcTabWidth );
ASSERT( Abs( nRelTabWidth-nCalcTabWidth ) < COLFUZZY,
@@ -1728,9 +1728,9 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
((SwTable *)pSwTable)->LockModify();
SwFmtFrmSize aFrmSize( pFrmFmt->GetFrmSize() );
aFrmSize.SetWidth( nRelTabWidth );
- BOOL bRel = bUseRelWidth &&
+ sal_Bool bRel = bUseRelWidth &&
text::HoriOrientation::FULL!=pFrmFmt->GetHoriOrient().GetHoriOrient();
- aFrmSize.SetWidthPercent( (BYTE)(bRel ? nWidthOption : 0) );
+ aFrmSize.SetWidthPercent( (sal_uInt8)(bRel ? nWidthOption : 0) );
pFrmFmt->SetFmtAttr( aFrmSize );
((SwTable *)pSwTable)->UnlockModify();
@@ -1748,7 +1748,7 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
// Bei %-Angaben wird die Breite auf das Minimum gesetzt.
aFlyFrmSize.SetWidth( nMin > USHRT_MAX ? USHRT_MAX
: nMin );
- aFlyFrmSize.SetWidthPercent( (BYTE)nWidthOption );
+ aFlyFrmSize.SetWidthPercent( (sal_uInt8)nWidthOption );
}
pFlyFrmFmt->SetFmtAttr( aFlyFrmSize );
}
@@ -1762,7 +1762,7 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
// checke doch mal ob die Tabellen korrekte Breiten haben
SwTwips nSize = pSwTable->GetFrmFmt()->GetFrmSize().GetWidth();
const SwTableLines& rLines = pSwTable->GetTabLines();
- for( USHORT n = 0; n < rLines.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rLines.Count(); ++n )
_CheckBoxWidth( *rLines[ n ], nSize );
}
#endif
@@ -1783,7 +1783,7 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
}
}
-void SwHTMLTableLayout::_Resize( USHORT nAbsAvail, BOOL bRecalc )
+void SwHTMLTableLayout::_Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc )
{
// Wenn bRecalc gestzt ist, hat sich am Inhalt der Tabelle etwas
// geaendert. Es muss dann der erste Pass noch einmal durchgefuehrt
@@ -1797,10 +1797,10 @@ void SwHTMLTableLayout::_Resize( USHORT nAbsAvail, BOOL bRecalc )
// Sonst koennen die Breiten gesetzt werden, wobei zuvor aber jewils
// noch der Pass 2 laufen muss.
- SetWidths( TRUE, nAbsAvail );
+ SetWidths( sal_True, nAbsAvail );
if ( pRoot && pRoot->IsCallbackActionEnabled() )
- pRoot->EndAllAction( TRUE ); //True per VirDev (Browsen ruhiger)
+ pRoot->EndAllAction( sal_True ); //True per VirDev (Browsen ruhiger)
}
IMPL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void*, EMPTYARG )
@@ -1816,20 +1816,20 @@ IMPL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void*, EMPTYARG )
}
-BOOL SwHTMLTableLayout::Resize( USHORT nAbsAvail, BOOL bRecalc,
- BOOL bForce, ULONG nDelay )
+sal_Bool SwHTMLTableLayout::Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc,
+ sal_Bool bForce, sal_uLong nDelay )
{
if( 0 == nAbsAvail )
- return FALSE;
+ return sal_False;
ASSERT( IsTopTable(), "Resize darf nur an Top-Tabellen aufgerufen werden" );
// Darf die Tabelle uberhaupt Resized werden oder soll sie es trotzdem?
if( bMustNotResize && !bForce )
- return FALSE;
+ return sal_False;
// Darf ein Recalc der Tabelle durchgefuehrt werden?
if( bMustNotRecalc && !bForce )
- bRecalc = FALSE;
+ bRecalc = sal_False;
const SwDoc *pDoc = GetDoc();
@@ -1839,7 +1839,7 @@ BOOL SwHTMLTableLayout::Resize( USHORT nAbsAvail, BOOL bRecalc,
// weil sond die Umschaltung von relativ nach absolut nicht funktioniert.
if( pDoc->GetRootFrm() && pDoc->get(IDocumentSettingAccess::BROWSE_MODE) )
{
- const USHORT nVisAreaWidth = GetBrowseWidthByVisArea( *pDoc );
+ const sal_uInt16 nVisAreaWidth = GetBrowseWidthByVisArea( *pDoc );
if( nVisAreaWidth < nAbsAvail && !FindFlyFrmFmt() )
nAbsAvail = nVisAreaWidth;
}
@@ -1851,7 +1851,7 @@ BOOL SwHTMLTableLayout::Resize( USHORT nAbsAvail, BOOL bRecalc,
bRecalc |= bDelayedResizeRecalc;
nDelayedResizeAbsAvail = nAbsAvail;
- return FALSE;
+ return sal_False;
}
// Optimierung:
@@ -1867,7 +1867,7 @@ BOOL SwHTMLTableLayout::Resize( USHORT nAbsAvail, BOOL bRecalc,
(nLastResizeAbsAvail==nAbsAvail) ||
(nAbsAvail<=nMin && nRelTabWidth==nMin) ||
(!bPrcWidthOption && nAbsAvail>=nMax && nRelTabWidth==nMax) ) )
- return FALSE;
+ return sal_False;
if( nDelay==HTMLTABLE_RESIZE_NOW )
{
@@ -1890,12 +1890,12 @@ BOOL SwHTMLTableLayout::Resize( USHORT nAbsAvail, BOOL bRecalc,
_Resize( nAbsAvail, bRecalc );
}
- return TRUE;
+ return sal_True;
}
-void SwHTMLTableLayout::BordersChanged( USHORT nAbsAvail, BOOL bRecalc )
+void SwHTMLTableLayout::BordersChanged( sal_uInt16 nAbsAvail, sal_Bool bRecalc )
{
- bBordersChanged = TRUE;
+ bBordersChanged = sal_True;
Resize( nAbsAvail, bRecalc );
}
diff --git a/sw/source/core/doc/lineinfo.cxx b/sw/source/core/doc/lineinfo.cxx
index c0c3e296f7b1..7490cf9f0719 100644
--- a/sw/source/core/doc/lineinfo.cxx
+++ b/sw/source/core/doc/lineinfo.cxx
@@ -63,10 +63,10 @@ SwLineNumberInfo::SwLineNumberInfo() :
nCountBy( 5 ),
nDividerCountBy( 3 ),
ePos( LINENUMBER_POS_LEFT ),
- bPaintLineNumbers( FALSE ),
- bCountBlankLines( TRUE ),
- bCountInFlys( FALSE ),
- bRestartEachPage( FALSE )
+ bPaintLineNumbers( sal_False ),
+ bCountBlankLines( sal_True ),
+ bCountInFlys( sal_False ),
+ bRestartEachPage( sal_False )
{
}
@@ -107,7 +107,7 @@ SwLineNumberInfo& SwLineNumberInfo::operator=(const SwLineNumberInfo &rCpy)
return *this;
}
-BOOL SwLineNumberInfo::operator==( const SwLineNumberInfo& rInf ) const
+sal_Bool SwLineNumberInfo::operator==( const SwLineNumberInfo& rInf ) const
{
return GetRegisteredIn() == rInf.GetRegisteredIn() &&
aType.GetNumberingType() == rInf.GetNumType().GetNumberingType() &&
diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx
index 42fc6bc7919d..81f139bba99e 100644
--- a/sw/source/core/doc/list.cxx
+++ b/sw/source/core/doc/list.cxx
@@ -60,7 +60,7 @@ class SwListImpl
void ValidateListTree();
void MarkListLevel( const int nListLevel,
- const BOOL bValue );
+ const sal_Bool bValue );
bool IsListLevelMarked( const int nListLevel ) const;
@@ -102,7 +102,7 @@ SwListImpl::SwListImpl( const String sListId,
pNode = pNode->EndOfSectionNode();
if (pNode != &rNodes.GetEndOfContent())
{
- ULONG nIndex = pNode->GetIndex();
+ sal_uLong nIndex = pNode->GetIndex();
nIndex++;
pNode = rNodes[nIndex];
}
@@ -186,7 +186,7 @@ void SwListImpl::ValidateListTree()
}
void SwListImpl::MarkListLevel( const int nListLevel,
- const BOOL bValue )
+ const sal_Bool bValue )
{
if ( bValue )
{
@@ -279,7 +279,7 @@ void SwList::ValidateListTree()
}
void SwList::MarkListLevel( const int nListLevel,
- const BOOL bValue )
+ const sal_Bool bValue )
{
mpListImpl->MarkListLevel( nListLevel, bValue );
}
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index e967e7f33fa8..8721d5d21164 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -89,9 +89,9 @@ using namespace com::sun::star;
extern void ClrContourCache( const SdrObject *pObj ); // TxtFly.Cxx
-inline BOOL GetRealURL( const SwGrfNode& rNd, String& rTxt )
+inline sal_Bool GetRealURL( const SwGrfNode& rNd, String& rTxt )
{
- BOOL bRet = rNd.GetFileFilterNms( &rTxt, 0 );
+ sal_Bool bRet = rNd.GetFileFilterNms( &rTxt, 0 );
if( bRet )
rTxt = URIHelper::removePassword( rTxt, INetURLObject::WAS_ENCODED,
INetURLObject::DECODE_UNAMBIGUOUS);
@@ -100,7 +100,7 @@ inline BOOL GetRealURL( const SwGrfNode& rNd, String& rTxt )
void lcl_PaintReplacement( const SwRect &rRect, const String &rText,
const ViewShell &rSh, const SwNoTxtFrm *pFrm,
- BOOL bDefect )
+ sal_Bool bDefect )
{
static Font *pFont = 0;
if ( !pFont )
@@ -111,7 +111,7 @@ void lcl_PaintReplacement( const SwRect &rRect, const String &rText,
pFont->SetName( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "Arial Unicode" )));
pFont->SetFamily( FAMILY_SWISS );
- pFont->SetTransparent( TRUE );
+ pFont->SetTransparent( sal_True );
}
Color aCol( COL_RED );
@@ -119,16 +119,16 @@ void lcl_PaintReplacement( const SwRect &rRect, const String &rText,
const SwFmtURL &rURL = pFrm->FindFlyFrm()->GetFmt()->GetURL();
if( rURL.GetURL().Len() || rURL.GetMap() )
{
- BOOL bVisited = FALSE;
+ sal_Bool bVisited = sal_False;
if ( rURL.GetMap() )
{
ImageMap *pMap = (ImageMap*)rURL.GetMap();
- for( USHORT i = 0; i < pMap->GetIMapObjectCount(); i++ )
+ for( sal_uInt16 i = 0; i < pMap->GetIMapObjectCount(); i++ )
{
IMapObject *pObj = pMap->GetIMapObject( i );
if( rSh.GetDoc()->IsVisitedURL( pObj->GetURL() ) )
{
- bVisited = TRUE;
+ bVisited = sal_True;
break;
}
}
@@ -145,7 +145,7 @@ void lcl_PaintReplacement( const SwRect &rRect, const String &rText,
pFont->SetUnderline( eUnderline );
pFont->SetColor( aCol );
- const BitmapEx& rBmp = ViewShell::GetReplacementBitmap( bDefect != FALSE );
+ const BitmapEx& rBmp = ViewShell::GetReplacementBitmap( bDefect != sal_False );
Graphic::DrawEx( rSh.GetOut(), rText, *pFont, rBmp, rRect.Pos(), rRect.SSize() );
}
@@ -238,8 +238,8 @@ void lcl_ClearArea( const SwFrm &rFrm,
if ( aRegion.Count() )
{
const SvxBrushItem *pItem; const Color *pCol; SwRect aOrigRect;
- if ( rFrm.GetBackgroundBrush( pItem, pCol, aOrigRect, FALSE ) )
- for( USHORT i = 0; i < aRegion.Count(); ++i )
+ if ( rFrm.GetBackgroundBrush( pItem, pCol, aOrigRect, sal_False ) )
+ for( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
::DrawGraphic( pItem, &rOut, aOrigRect, aRegion[i] );
else
{
@@ -247,7 +247,7 @@ void lcl_ClearArea( const SwFrm &rFrm,
rOut.Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
rOut.SetFillColor( rFrm.GetShell()->Imp()->GetRetoucheColor());
rOut.SetLineColor();
- for( USHORT i = 0; i < aRegion.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
rOut.DrawRect( aRegion[i].SVRect() );
rOut.Pop();
}
@@ -282,7 +282,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
GetRealURL( *(SwGrfNode*)pNd, aTxt );
if( !aTxt.Len() )
aTxt = FindFlyFrm()->GetFmt()->GetName();
- lcl_PaintReplacement( Frm(), aTxt, *pSh, this, FALSE );
+ lcl_PaintReplacement( Frm(), aTxt, *pSh, this, sal_False );
}
return;
}
@@ -297,13 +297,13 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
OutputDevice *pOut = pSh->GetOut();
pOut->Push();
- BOOL bClip = TRUE;
+ sal_Bool bClip = sal_True;
PolyPolygon aPoly;
SwNoTxtNode& rNoTNd = *(SwNoTxtNode*)GetNode();
SwGrfNode* pGrfNd = rNoTNd.GetGrfNode();
if( pGrfNd )
- pGrfNd->SetFrameInPaint( TRUE );
+ pGrfNd->SetFrameInPaint( sal_True );
// OD 16.04.2003 #i13147# - add 2nd parameter with value <sal_True> to
// method call <FindFlyFrm().GetContour(..)> to indicate that it is called
@@ -314,7 +314,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
)
{
pOut->SetClipRegion( aPoly );
- bClip = FALSE;
+ bClip = sal_False;
}
SwRect aOrigPaint( rRect );
@@ -349,7 +349,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
// wenn nicht sichtbar, loesche einfach den angegebenen Bereich
lcl_ClearArea( *this, *pSh->GetOut(), aPaintArea, SwRect() );
if( pGrfNd )
- pGrfNd->SetFrameInPaint( FALSE );
+ pGrfNd->SetFrameInPaint( sal_False );
pOut->Pop();
SfxProgress::LeaveLock();
@@ -358,7 +358,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
/*************************************************************************
|*
|* void lcl_CalcRect( Point & aPt, Size & aDim,
-|* USHORT nMirror )
+|* sal_uInt16 nMirror )
|*
|* Beschreibung Errechne die Position und die Groesse der Grafik im
|* Frame, entsprechen der aktuellen Grafik-Attribute
@@ -372,7 +372,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
*************************************************************************/
-void lcl_CalcRect( Point& rPt, Size& rDim, USHORT nMirror )
+void lcl_CalcRect( Point& rPt, Size& rDim, sal_uInt16 nMirror )
{
if( nMirror == RES_MIRROR_GRAPH_VERT || nMirror == RES_MIRROR_GRAPH_BOTH )
{
@@ -400,7 +400,7 @@ void lcl_CalcRect( Point& rPt, Size& rDim, USHORT nMirror )
*************************************************************************/
void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
- BOOL ) const
+ sal_Bool ) const
{
// JP 23.01.2001: currently only used for scaling, cropping and mirroring
// the contour of graphics!
@@ -411,7 +411,7 @@ void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
const SwAttrSet& rAttrSet = GetNode()->GetSwAttrSet();
const SwCropGrf& rCrop = rAttrSet.GetCropGrf();
- USHORT nMirror = rAttrSet.GetMirrorGrf().GetValue();
+ sal_uInt16 nMirror = rAttrSet.GetMirrorGrf().GetValue();
if( rAttrSet.GetMirrorGrf().IsGrfToggle() )
{
@@ -563,7 +563,7 @@ void SwNoTxtFrm::MakeAll()
MakePrtArea( rAttrs );
if ( !bValidSize )
- { bValidSize = TRUE;
+ { bValidSize = sal_True;
Format();
}
}
@@ -605,11 +605,11 @@ void SwNoTxtFrm::Format( const SwBorderAttrs * )
|*************************************************************************/
-BOOL SwNoTxtFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos,
+sal_Bool SwNoTxtFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos,
SwCrsrMoveState *pCMS ) const
{
if ( &rPos.nNode.GetNode() != (SwNode*)GetNode() )
- return FALSE;
+ return sal_False;
Calc();
SwRect aFrameRect( Frm() );
@@ -638,17 +638,17 @@ BOOL SwNoTxtFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos,
}
}
- return TRUE;
+ return sal_True;
}
-BOOL SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& ,
+sal_Bool SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& ,
SwCrsrMoveState* ) const
{
SwCntntNode* pCNd = (SwCntntNode*)GetNode();
pPos->nNode = *pCNd;
pPos->nContent.Assign( pCNd, 0 );
- return TRUE;
+ return sal_True;
}
#define CLEARCACHE( pNd ) {\
@@ -663,7 +663,7 @@ BOOL SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& ,
void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- USHORT nWhich = pNew ? pNew->Which() : pOld ? pOld->Which() : 0;
+ sal_uInt16 nWhich = pNew ? pNew->Which() : pOld ? pOld->Which() : 0;
// --> OD 2007-03-06 #i73788#
// no <SwCntntFrm::Modify(..)> for RES_LINKED_GRAPHIC_STREAM_ARRIVED
@@ -676,7 +676,7 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
SwCntntFrm::Modify( pOld, pNew );
}
- BOOL bComplete = TRUE;
+ sal_Bool bComplete = sal_True;
switch( nWhich )
{
@@ -686,7 +686,7 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
case RES_GRF_REREAD_AND_INCACHE:
if( ND_GRFNODE == GetNode()->GetNodeType() )
{
- bComplete = FALSE;
+ bComplete = sal_False;
SwGrfNode* pNd = (SwGrfNode*) GetNode();
ViewShell *pVSh = 0;
@@ -722,10 +722,10 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
case RES_ATTRSET_CHG:
{
- USHORT n;
+ sal_uInt16 n;
for( n = RES_GRFATR_BEGIN; n < RES_GRFATR_END; ++n )
if( SFX_ITEM_SET == ((SwAttrSetChg*)pOld)->GetChgSet()->
- GetItemState( n, FALSE ))
+ GetItemState( n, sal_False ))
{
CLEARCACHE( (SwGrfNode*) GetNode() )
break;
@@ -743,7 +743,7 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// <--
if ( GetNode()->GetNodeType() == ND_GRFNODE )
{
- bComplete = FALSE;
+ bComplete = sal_False;
SwGrfNode* pNd = (SwGrfNode*) GetNode();
CLEARCACHE( pNd )
@@ -830,7 +830,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
SwGrfNode* pGrfNd = rNoTNd.GetGrfNode();
SwOLENode* pOLENd = rNoTNd.GetOLENode();
- const BOOL bPrn = pOut == rNoTNd.getIDocumentDeviceAccess()->getPrinter( false ) ||
+ const sal_Bool bPrn = pOut == rNoTNd.getIDocumentDeviceAccess()->getPrinter( false ) ||
pOut->GetConnectMetaFile();
const bool bIsChart = pOLENd && ChartPrettyPainter::IsChart( pOLENd->GetOLEObj().GetObject() );
@@ -860,7 +860,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
if( pGrfNd )
{
- BOOL bForceSwap = FALSE, bContinue = TRUE;
+ sal_Bool bForceSwap = sal_False, bContinue = sal_True;
GraphicObject& rGrfObj = pGrfNd->GetGrfObj();
GraphicAttr aGrfAttr;
@@ -898,8 +898,8 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
String aTxt( pGrfNd->GetTitle() );
if ( !aTxt.Len() )
GetRealURL( *pGrfNd, aTxt );
- ::lcl_PaintReplacement( aAlignedGrfArea, aTxt, *pShell, this, FALSE );
- bContinue = FALSE;
+ ::lcl_PaintReplacement( aAlignedGrfArea, aTxt, *pShell, this, sal_False );
+ bContinue = sal_False;
}
else if( rGrfObj.IsCached( pOut, aAlignedGrfArea.Pos(),
aAlignedGrfArea.SSize(), &aGrfAttr ))
@@ -907,17 +907,17 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
rGrfObj.DrawWithPDFHandling( *pOut,
aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(),
&aGrfAttr );
- bContinue = FALSE;
+ bContinue = sal_False;
}
}
if( bContinue )
{
- const BOOL bSwapped = rGrfObj.IsSwappedOut();
- const BOOL bSwappedIn = 0 != pGrfNd->SwapIn( bPrn );
+ const sal_Bool bSwapped = rGrfObj.IsSwappedOut();
+ const sal_Bool bSwappedIn = 0 != pGrfNd->SwapIn( bPrn );
if( bSwappedIn && rGrfObj.GetGraphic().IsSupportedGraphic())
{
- const BOOL bAnimate = rGrfObj.IsAnimated() &&
+ const sal_Bool bAnimate = rGrfObj.IsAnimated() &&
!pShell->IsPreView() &&
!pShell->GetAccessibilityOptions()->IsStopAnimatedGraphics() &&
// --> FME 2004-06-21 #i9684# Stop animation during printing/pdf export
@@ -951,7 +951,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
}
else
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
if( bSwappedIn )
{
if( GRAPHIC_NONE == rGrfObj.GetType() )
@@ -970,12 +970,12 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
if ( nResId )
aText = SW_RESSTR( nResId );
- ::lcl_PaintReplacement( aAlignedGrfArea, aText, *pShell, this, TRUE );
+ ::lcl_PaintReplacement( aAlignedGrfArea, aText, *pShell, this, sal_True );
}
//Beim Drucken duerfen wir nicht die Grafiken sammeln...
if( bSwapped && bPrn )
- bForceSwap = TRUE;
+ bForceSwap = sal_True;
}
if( bForceSwap )
pGrfNd->SwapOut();
@@ -993,11 +993,11 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
{
// --> OD 2009-03-05 #i99665#
// Adjust AntiAliasing mode at output device for chart OLE
- const USHORT nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
+ const sal_uInt16 nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
if ( pOLENd->IsChart() &&
pShell->Imp()->GetDrawView()->IsAntiAliasing() )
{
- const USHORT nAntialiasingForChartOLE =
+ const sal_uInt16 nAntialiasingForChartOLE =
nFormerAntialiasingAtOutput | ANTIALIASING_PIXELSNAPHAIRLINE;
pOut->SetAntialiasing( nAntialiasingForChartOLE );
}
@@ -1009,7 +1009,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
// Im BrowseModus gibt es nicht unbedingt einen Drucker und
// damit kein JobSetup, also legen wir eines an ...
const JobSetup* pJobSetup = pOLENd->getIDocumentDeviceAccess()->getJobsetup();
- BOOL bDummyJobSetup = 0 == pJobSetup;
+ sal_Bool bDummyJobSetup = 0 == pJobSetup;
if( bDummyJobSetup )
pJobSetup = new JobSetup();
@@ -1064,18 +1064,18 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
}
-BOOL SwNoTxtFrm::IsTransparent() const
+sal_Bool SwNoTxtFrm::IsTransparent() const
{
const ViewShell* pSh = GetShell();
if ( !pSh || !pSh->GetViewOptions()->IsGraphic() )
- return TRUE;
+ return sal_True;
const SwGrfNode *pNd;
if( 0 != (pNd = GetNode()->GetGrfNode()) )
return pNd->IsTransparent();
//#29381# OLE sind immer Transparent.
- return TRUE;
+ return sal_True;
}
@@ -1088,7 +1088,7 @@ void SwNoTxtFrm::StopAnimation( OutputDevice* pOut ) const
}
-BOOL SwNoTxtFrm::HasAnimation() const
+sal_Bool SwNoTxtFrm::HasAnimation() const
{
const SwGrfNode* pGrfNd = GetNode()->GetGrfNode();
return pGrfNd && pGrfNd->IsAnimated();
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 847c6b229fd1..2333169f2222 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -70,7 +70,7 @@
using namespace ::com::sun::star;
-USHORT SwNumRule::nRefCount = 0;
+sal_uInt16 SwNumRule::nRefCount = 0;
SwNumFmt* SwNumRule::aBaseFmts[ RULE_END ][ MAXLEVEL ] = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
// --> OD 2008-02-11 #newlistlevelattrs#
@@ -81,13 +81,13 @@ char sOutline[] = "Outline";
char* SwNumRule::pDefOutlineName = sOutline;
// #i30312#
-USHORT SwNumRule::aDefNumIndents[ MAXLEVEL ] = {
+sal_uInt16 SwNumRule::aDefNumIndents[ MAXLEVEL ] = {
//inch: 0,5 1,0 1,5 2,0 2,5 3,0 3,5 4,0 4,5 5,0
1440/4, 1440/2, 1440*3/4, 1440, 1440*5/4, 1440*3/2, 1440*7/4, 1440*2,
1440*9/4, 1440*5/2
};
-const SwNumFmt& SwNumRule::Get( USHORT i ) const
+const SwNumFmt& SwNumRule::Get( sal_uInt16 i ) const
{
ASSERT_ID( i < MAXLEVEL && eRuleType < RULE_END, ERR_NUMLEVEL);
return aFmts[ i ]
@@ -99,7 +99,7 @@ const SwNumFmt& SwNumRule::Get( USHORT i ) const
// <--
}
-const SwNumFmt* SwNumRule::GetNumFmt( USHORT i ) const
+const SwNumFmt* SwNumRule::GetNumFmt( sal_uInt16 i ) const
{
const SwNumFmt * pResult = NULL;
@@ -176,13 +176,13 @@ void SwNumRule::SetNumRuleMap(std::hash_map<String, SwNumRule *, StringHash> *
pNumRuleMap = _pNumRuleMap;
}
-USHORT SwNumRule::GetNumIndent( BYTE nLvl )
+sal_uInt16 SwNumRule::GetNumIndent( sal_uInt8 nLvl )
{
ASSERT( MAXLEVEL > nLvl, "NumLevel is out of range" );
return aDefNumIndents[ nLvl ];
}
-USHORT SwNumRule::GetBullIndent( BYTE nLvl )
+sal_uInt16 SwNumRule::GetBullIndent( sal_uInt8 nLvl )
{
ASSERT( MAXLEVEL > nLvl, "NumLevel is out of range" );
return aDefNumIndents[ nLvl ];
@@ -190,7 +190,7 @@ USHORT SwNumRule::GetBullIndent( BYTE nLvl )
-static void lcl_SetRuleChgd( SwTxtNode& rNd, BYTE nLevel )
+static void lcl_SetRuleChgd( SwTxtNode& rNd, sal_uInt8 nLevel )
{
if( rNd.GetActualListLevel() == nLevel )
rNd.NumRuleChgd();
@@ -232,7 +232,7 @@ SwNumFmt::SwNumFmt(const SvxNumberFormat& rNumFmt, SwDoc* pDoc) :
SwCharFmt* pCFmt = pDoc->FindCharFmtByName( rCharStyleName );
if( !pCFmt )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( rCharStyleName,
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rCharStyleName,
nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
pCFmt = nId != USHRT_MAX
? pDoc->GetCharFmtFromPool( nId )
@@ -261,7 +261,7 @@ void SwNumFmt::NotifyGraphicArrived()
}
// #i22362#
-BOOL SwNumFmt::IsEnumeration() const
+sal_Bool SwNumFmt::IsEnumeration() const
{
// --> FME 2004-08-12 #i30655# native numbering did not work any longer
// using this code. Therefore HBRINKM and I agreed upon defining
@@ -270,7 +270,7 @@ BOOL SwNumFmt::IsEnumeration() const
// <--
/*
- BOOL bResult;
+ sal_Bool bResult;
switch(GetNumberingType())
{
@@ -282,12 +282,12 @@ BOOL SwNumFmt::IsEnumeration() const
case SVX_NUM_PAGEDESC:
case SVX_NUM_CHARS_UPPER_LETTER_N:
case SVX_NUM_CHARS_LOWER_LETTER_N:
- bResult = TRUE;
+ bResult = sal_True;
break;
default:
- bResult = FALSE;
+ bResult = sal_False;
}
return bResult;
@@ -295,20 +295,20 @@ BOOL SwNumFmt::IsEnumeration() const
}
// #i29560#
-BOOL SwNumFmt::IsItemize() const
+sal_Bool SwNumFmt::IsItemize() const
{
- BOOL bResult;
+ sal_Bool bResult;
switch(GetNumberingType())
{
case SVX_NUM_CHAR_SPECIAL:
case SVX_NUM_BITMAP:
- bResult = TRUE;
+ bResult = sal_True;
break;
default:
- bResult = FALSE;
+ bResult = sal_False;
}
return bResult;
@@ -331,9 +331,9 @@ SwNumFmt& SwNumFmt::operator=( const SwNumFmt& rNumFmt)
/* -----------------------------23.02.01 09:28--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNumFmt::operator==( const SwNumFmt& rNumFmt) const
+sal_Bool SwNumFmt::operator==( const SwNumFmt& rNumFmt) const
{
- BOOL bRet = SvxNumberFormat::operator==(rNumFmt) &&
+ sal_Bool bRet = SvxNumberFormat::operator==(rNumFmt) &&
pRegisteredIn == rNumFmt.pRegisteredIn;
return bRet;
}
@@ -415,13 +415,13 @@ sal_Int16 SwNumFmt::GetVertOrient() const
---------------------------------------------------------------------------*/
void SwNumFmt::UpdateNumNodes( SwDoc* pDoc )
{
- BOOL bDocIsModified = pDoc->IsModified();
- BOOL bFnd = FALSE;
+ sal_Bool bDocIsModified = pDoc->IsModified();
+ sal_Bool bFnd = sal_False;
const SwNumRule* pRule;
- for( USHORT n = pDoc->GetNumRuleTbl().Count(); !bFnd && n; )
+ for( sal_uInt16 n = pDoc->GetNumRuleTbl().Count(); !bFnd && n; )
{
pRule = pDoc->GetNumRuleTbl()[ --n ];
- for( BYTE i = 0; i < MAXLEVEL; ++i )
+ for( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
if( pRule->GetNumFmt( i ) == this )
{
// --> OD 2008-02-19 #refactorlists#
@@ -429,7 +429,7 @@ void SwNumFmt::UpdateNumNodes( SwDoc* pDoc )
// SwModify* pMod;
// const SfxPoolItem* pItem;
-// USHORT k, nMaxItems = pDoc->GetAttrPool().GetItemCount(
+// sal_uInt16 k, nMaxItems = pDoc->GetAttrPool().GetItemCount(
// RES_PARATR_NUMRULE );
// for( k = 0; k < nMaxItems; ++k )
// if( 0 != (pItem = pDoc->GetAttrPool().GetItem(
@@ -443,7 +443,7 @@ void SwNumFmt::UpdateNumNodes( SwDoc* pDoc )
// SwNumRuleInfo aInfo( rRuleNm );
// pMod->GetInfo( aInfo );
-// for( ULONG nFirst = 0, nLast = aInfo.GetList().Count();
+// for( sal_uLong nFirst = 0, nLast = aInfo.GetList().Count();
// nFirst < nLast; ++nFirst )
// lcl_SetRuleChgd(
// *aInfo.GetList().GetObject( nFirst ), i );
@@ -459,7 +459,7 @@ void SwNumFmt::UpdateNumNodes( SwDoc* pDoc )
lcl_SetRuleChgd( *(*aIter), i );
}
// <--
- bFnd = TRUE;
+ bFnd = sal_True;
break;
}
}
@@ -491,7 +491,7 @@ long int SwNumRule::nInstances = 0;
SwNumRule::SwNumRule( const String& rNm,
const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode,
SwNumRuleType eType,
- BOOL bAutoFlg )
+ sal_Bool bAutoFlg )
: maTxtNodeList(),
// --> OD 2008-03-03 #refactorlists#
maParagraphStyleList(),
@@ -503,9 +503,9 @@ SwNumRule::SwNumRule( const String& rNm,
nPoolHelpId( USHRT_MAX ),
nPoolHlpFileId( UCHAR_MAX ),
bAutoRuleFlag( bAutoFlg ),
- bInvalidRuleFlag( TRUE ),
- bContinusNum( FALSE ),
- bAbsSpaces( FALSE ),
+ bInvalidRuleFlag( sal_True ),
+ bContinusNum( sal_False ),
+ bAbsSpaces( sal_False ),
// --> OD 2005-10-21 - initialize member <mbCountPhantoms>
mbCountPhantoms( true ),
// <--
@@ -523,7 +523,7 @@ SwNumRule::SwNumRule( const String& rNm,
if( !nRefCount++ ) // zum erstmal, also initialisiern
{
SwNumFmt* pFmt;
- BYTE n;
+ sal_uInt8 n;
// numbering:
// position-and-space mode LABEL_WIDTH_AND_POSITION:
@@ -623,7 +623,7 @@ SwNumRule::SwNumRule( const SwNumRule& rNumRule )
nPoolHelpId( rNumRule.GetPoolHelpId() ),
nPoolHlpFileId( rNumRule.GetPoolHlpFileId() ),
bAutoRuleFlag( rNumRule.bAutoRuleFlag ),
- bInvalidRuleFlag( TRUE ),
+ bInvalidRuleFlag( sal_True ),
bContinusNum( rNumRule.bContinusNum ),
bAbsSpaces( rNumRule.bAbsSpaces ),
// --> OD 2005-10-21 - initialize member <mbCountPhantoms>
@@ -642,14 +642,14 @@ SwNumRule::SwNumRule( const SwNumRule& rNumRule )
++nRefCount;
memset( aFmts, 0, sizeof( aFmts ));
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
if( rNumRule.aFmts[ n ] )
Set( n, *rNumRule.aFmts[ n ] );
}
SwNumRule::~SwNumRule()
{
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
delete aFmts[ n ];
if (pNumRuleMap)
@@ -688,7 +688,7 @@ SwNumRule::~SwNumRule()
void SwNumRule::CheckCharFmts( SwDoc* pDoc )
{
SwCharFmt* pFmt;
- for( BYTE n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
if( aFmts[ n ] && 0 != ( pFmt = aFmts[ n ]->GetCharFmt() ) &&
pFmt->GetDoc() != pDoc )
{
@@ -704,13 +704,13 @@ SwNumRule& SwNumRule::operator=( const SwNumRule& rNumRule )
{
if( this != &rNumRule )
{
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
Set( n, rNumRule.aFmts[ n ] );
eRuleType = rNumRule.eRuleType;
sName = rNumRule.sName;
bAutoRuleFlag = rNumRule.bAutoRuleFlag;
- bInvalidRuleFlag = TRUE;
+ bInvalidRuleFlag = sal_True;
bContinusNum = rNumRule.bContinusNum;
bAbsSpaces = rNumRule.bAbsSpaces;
nPoolFmtId = rNumRule.GetPoolFmtId();
@@ -721,9 +721,9 @@ SwNumRule& SwNumRule::operator=( const SwNumRule& rNumRule )
}
-BOOL SwNumRule::operator==( const SwNumRule& rRule ) const
+sal_Bool SwNumRule::operator==( const SwNumRule& rRule ) const
{
- BOOL bRet = eRuleType == rRule.eRuleType &&
+ sal_Bool bRet = eRuleType == rRule.eRuleType &&
sName == rRule.sName &&
bAutoRuleFlag == rRule.bAutoRuleFlag &&
bContinusNum == rRule.bContinusNum &&
@@ -733,10 +733,10 @@ BOOL SwNumRule::operator==( const SwNumRule& rRule ) const
nPoolHlpFileId == rRule.GetPoolHlpFileId();
if( bRet )
{
- for( BYTE n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
if( !( rRule.Get( n ) == Get( n ) ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -744,7 +744,7 @@ BOOL SwNumRule::operator==( const SwNumRule& rRule ) const
}
-void SwNumRule::Set( USHORT i, const SwNumFmt& rNumFmt )
+void SwNumRule::Set( sal_uInt16 i, const SwNumFmt& rNumFmt )
{
ASSERT( i < MAXLEVEL, "Serious defect, please inform OD" )
if( i < MAXLEVEL )
@@ -753,12 +753,12 @@ void SwNumRule::Set( USHORT i, const SwNumFmt& rNumFmt )
{
delete aFmts[ i ];
aFmts[ i ] = new SwNumFmt( rNumFmt );
- bInvalidRuleFlag = TRUE;
+ bInvalidRuleFlag = sal_True;
}
}
}
-void SwNumRule::Set( USHORT i, const SwNumFmt* pNumFmt )
+void SwNumRule::Set( sal_uInt16 i, const SwNumFmt* pNumFmt )
{
ASSERT( i < MAXLEVEL, "Serious defect, please inform OD" )
if( i >= MAXLEVEL )
@@ -769,18 +769,18 @@ void SwNumRule::Set( USHORT i, const SwNumFmt* pNumFmt )
if( pNumFmt )
{
aFmts[ i ] = new SwNumFmt( *pNumFmt );
- bInvalidRuleFlag = TRUE;
+ bInvalidRuleFlag = sal_True;
}
}
else if( !pNumFmt )
- delete pOld, aFmts[ i ] = 0, bInvalidRuleFlag = TRUE;
+ delete pOld, aFmts[ i ] = 0, bInvalidRuleFlag = sal_True;
else if( *pOld != *pNumFmt )
- *pOld = *pNumFmt, bInvalidRuleFlag = TRUE;
+ *pOld = *pNumFmt, bInvalidRuleFlag = sal_True;
}
-String SwNumRule::MakeNumString( const SwNodeNum& rNum, BOOL bInclStrings,
- BOOL bOnlyArabic ) const
+String SwNumRule::MakeNumString( const SwNodeNum& rNum, sal_Bool bInclStrings,
+ sal_Bool bOnlyArabic ) const
{
String aStr;
@@ -792,8 +792,8 @@ String SwNumRule::MakeNumString( const SwNodeNum& rNum, BOOL bInclStrings,
}
String SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
- const BOOL bInclStrings,
- const BOOL bOnlyArabic,
+ const sal_Bool bInclStrings,
+ const sal_Bool bOnlyArabic,
const unsigned int _nRestrictToThisLevel ) const
{
String aStr;
@@ -808,13 +808,13 @@ String SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
if (nLevel < MAXLEVEL)
{
- const SwNumFmt& rMyNFmt = Get( static_cast<USHORT>(nLevel) );
+ const SwNumFmt& rMyNFmt = Get( static_cast<sal_uInt16>(nLevel) );
// --> OD 2006-06-02 #b6432095#
// - levels with numbering none has to provide prefix and suffix string
// if( SVX_NUM_NUMBER_NONE != rMyNFmt.GetNumberingType() )
// <--
{
- BYTE i = static_cast<BYTE>(nLevel);
+ sal_uInt8 i = static_cast<sal_uInt8>(nLevel);
if( !IsContinusNum() &&
// --> OD 2006-09-19 #i69672#
@@ -823,7 +823,7 @@ String SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
// <--
rMyNFmt.GetIncludeUpperLevels() ) // nur der eigene Level ?
{
- BYTE n = rMyNFmt.GetIncludeUpperLevels();
+ sal_uInt8 n = rMyNFmt.GetIncludeUpperLevels();
if( 1 < n )
{
if( i+1 >= n )
@@ -887,7 +887,7 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum,
bool bMakeNumStringForPhantom( false );
if ( pWorkingNodeNum->IsPhantom() )
{
- SwNumFmt aFmt( Get( static_cast<USHORT>(pWorkingNodeNum->GetLevelInListTree()) ) );
+ SwNumFmt aFmt( Get( static_cast<sal_uInt16>(pWorkingNodeNum->GetLevelInListTree()) ) );
bMakeNumStringForPhantom = aFmt.IsEnumeration() &&
SVX_NUM_NUMBER_NONE != aFmt.GetNumberingType();
@@ -906,7 +906,7 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum,
if ( bInclSuperiorNumLabels && pWorkingNodeNum->GetLevelInListTree() > 0 )
{
- BYTE n = Get( static_cast<USHORT>(pWorkingNodeNum->GetLevelInListTree()) ).GetIncludeUpperLevels();
+ sal_uInt8 n = Get( static_cast<sal_uInt16>(pWorkingNodeNum->GetLevelInListTree()) ).GetIncludeUpperLevels();
pWorkingNodeNum = dynamic_cast<SwNodeNum*>(pWorkingNodeNum->GetParent());
// skip parents, whose list label is already contained in the actual list label.
while ( pWorkingNodeNum && n > 1 )
@@ -935,7 +935,7 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum,
SwNumRule& SwNumRule::CopyNumRule( SwDoc* pDoc, const SwNumRule& rNumRule )
{
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
Set( n, rNumRule.aFmts[ n ] );
if( aFmts[ n ] && aFmts[ n ]->GetCharFmt() &&
@@ -952,7 +952,7 @@ SwNumRule& SwNumRule::CopyNumRule( SwDoc* pDoc, const SwNumRule& rNumRule )
nPoolFmtId = rNumRule.GetPoolFmtId();
nPoolHelpId = rNumRule.GetPoolHelpId();
nPoolHlpFileId = rNumRule.GetPoolHlpFileId();
- bInvalidRuleFlag = TRUE;
+ bInvalidRuleFlag = sal_True;
return *this;
}
/* -----------------30.10.98 08:33-------------------
@@ -960,14 +960,14 @@ SwNumRule& SwNumRule::CopyNumRule( SwDoc* pDoc, const SwNumRule& rNumRule )
* --------------------------------------------------*/
void SwNumRule::SetSvxRule(const SvxNumRule& rNumRule, SwDoc* pDoc)
{
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
const SvxNumberFormat* pSvxFmt = rNumRule.Get(n);
delete aFmts[n];
aFmts[n] = pSvxFmt ? new SwNumFmt(*pSvxFmt, pDoc) : 0;
}
- bInvalidRuleFlag = TRUE;
+ bInvalidRuleFlag = sal_True;
bContinusNum = rNumRule.IsContinuousNumbering();
}
/* -----------------30.10.98 08:33-------------------
@@ -982,7 +982,7 @@ SvxNumRule SwNumRule::MakeSvxNumRule() const
NUM_RULE ?
SVX_RULETYPE_NUMBERING :
SVX_RULETYPE_OUTLINE_NUMBERING );
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
SwNumFmt aNumFmt = Get(n);
if(aNumFmt.GetCharFmt())
@@ -992,7 +992,7 @@ SvxNumRule SwNumRule::MakeSvxNumRule() const
return aRule;
}
-void SwNumRule::SetInvalidRule(BOOL bFlag)
+void SwNumRule::SetInvalidRule(sal_Bool bFlag)
{
if (bFlag)
{
@@ -1026,11 +1026,11 @@ void SwNumRule::SetInvalidRule(BOOL bFlag)
// --> OD 2008-06-16 #i90078#
// #i23725#, #i23726#
//void SwNumRule::Indent(short nAmount, int nLevel, int nReferenceLevel,
-// BOOL bRelative, BOOL bFirstLine, BOOL bCheckGtZero)
+// sal_Bool bRelative, sal_Bool bFirstLine, sal_Bool bCheckGtZero)
//{
// int nStartLevel = 0;
// int nEndLevel = MAXLEVEL - 1;
-// BOOL bGotInvalid = FALSE;
+// sal_Bool bGotInvalid = sal_False;
// if (nLevel >= 0)
// nStartLevel = nEndLevel = nLevel;
@@ -1043,46 +1043,46 @@ void SwNumRule::SetInvalidRule(BOOL bFlag)
// if (bFirstLine)
// {
// if (nReferenceLevel >= 0)
-// nAmount = nAmount - Get(static_cast<USHORT>(nReferenceLevel)).GetFirstLineOffset();
+// nAmount = nAmount - Get(static_cast<sal_uInt16>(nReferenceLevel)).GetFirstLineOffset();
// else
-// nAmount = nAmount - Get(static_cast<USHORT>(nStartLevel)).GetFirstLineOffset();
+// nAmount = nAmount - Get(static_cast<sal_uInt16>(nStartLevel)).GetFirstLineOffset();
// }
-// BOOL bFirst = TRUE;
+// sal_Bool bFirst = sal_True;
// if (nReferenceLevel >= 0)
-// nRealAmount = nAmount - Get(static_cast<USHORT>(nReferenceLevel)).GetAbsLSpace();
+// nRealAmount = nAmount - Get(static_cast<sal_uInt16>(nReferenceLevel)).GetAbsLSpace();
// else
// for (i = nStartLevel; i < nEndLevel + 1; i++)
// {
-// short nTmp = nAmount - Get(static_cast<USHORT>(i)).GetAbsLSpace();
+// short nTmp = nAmount - Get(static_cast<sal_uInt16>(i)).GetAbsLSpace();
// if (bFirst || nTmp > nRealAmount)
// {
// nRealAmount = nTmp;
-// bFirst = FALSE;
+// bFirst = sal_False;
// }
// }
// }
// if (nRealAmount < 0)
// for (i = nStartLevel; i < nEndLevel + 1; i++)
-// if (Get(static_cast<USHORT>(i)).GetAbsLSpace() + nRealAmount < 0)
-// nRealAmount = -Get(static_cast<USHORT>(i)).GetAbsLSpace();
+// if (Get(static_cast<sal_uInt16>(i)).GetAbsLSpace() + nRealAmount < 0)
+// nRealAmount = -Get(static_cast<sal_uInt16>(i)).GetAbsLSpace();
// for (i = nStartLevel; i < nEndLevel + 1; i++)
// {
-// short nNew = Get(static_cast<USHORT>(i)).GetAbsLSpace() + nRealAmount;
+// short nNew = Get(static_cast<sal_uInt16>(i)).GetAbsLSpace() + nRealAmount;
// if (bCheckGtZero && nNew < 0)
// nNew = 0;
-// SwNumFmt aTmpNumFmt(Get(static_cast<USHORT>(i)));
+// SwNumFmt aTmpNumFmt(Get(static_cast<sal_uInt16>(i)));
// aTmpNumFmt.SetAbsLSpace(nNew);
-// Set(static_cast<USHORT>(i), aTmpNumFmt);
+// Set(static_cast<sal_uInt16>(i), aTmpNumFmt);
-// bGotInvalid = TRUE;
+// bGotInvalid = sal_True;
// }
// if (bGotInvalid)
@@ -1092,7 +1092,7 @@ void SwNumRule::SetInvalidRule(BOOL bFlag)
// change indent of all list levels by given difference
void SwNumRule::ChangeIndent( const short nDiff )
{
- for ( USHORT i = 0; i < MAXLEVEL; ++i )
+ for ( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
SwNumFmt aTmpNumFmt( Get(i) );
@@ -1126,12 +1126,12 @@ void SwNumRule::ChangeIndent( const short nDiff )
Set( i, aTmpNumFmt );
}
- SetInvalidRule( TRUE );
+ SetInvalidRule( sal_True );
}
// set indent of certain list level to given value
void SwNumRule::SetIndent( const short nNewIndent,
- const USHORT nListLevel )
+ const sal_uInt16 nListLevel )
{
SwNumFmt aTmpNumFmt( Get(nListLevel) );
@@ -1155,7 +1155,7 @@ void SwNumRule::SetIndent( const short nNewIndent,
aTmpNumFmt.SetIndentAt( nNewIndent );
}
- SetInvalidRule( TRUE );
+ SetInvalidRule( sal_True );
}
// set indent of first list level to given value and change other list level's
@@ -1202,7 +1202,7 @@ void SwNumRule::Validate()
std::mem_fun( &SwList::ValidateListTree ) );
// <--
- SetInvalidRule(FALSE);
+ SetInvalidRule(sal_False);
}
bool SwNumRule::IsCountPhantoms() const
@@ -1286,7 +1286,7 @@ namespace numfunc
{
return static_cast<short>(meFontItalic);
}
- inline sal_Unicode GetChar( BYTE p_nListLevel ) const
+ inline sal_Unicode GetChar( sal_uInt8 p_nListLevel ) const
{
if ( p_nListLevel > MAXLEVEL )
{
@@ -1521,7 +1521,7 @@ namespace numfunc
return SwDefBulletConfig::getInstance()->GetFont();
}
- sal_Unicode GetBulletChar( BYTE nLevel )
+ sal_Unicode GetBulletChar( sal_uInt8 nLevel )
{
return SwDefBulletConfig::getInstance()->GetChar( nLevel );
}
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index e5cfc065db2a..74db46cbb1b1 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -76,27 +76,27 @@
using namespace ::com::sun::star;
-const USHORT PT_3 = 3 * 20; // 3 pt
-const USHORT PT_6 = 6 * 20; // 6 pt
-const USHORT PT_7 = 7 * 20; // 6 pt
-const USHORT PT_8 = 8 * 20; // 8 pt
-const USHORT PT_9 = 9 * 20; // 9 pt
-const USHORT PT_10 = 10 * 20; // 10 pt
-const USHORT PT_11 = 11 * 20; // 11 pt
-const USHORT PT_12 = 12 * 20; // 12 pt
-const USHORT PT_14 = 14 * 20; // 14 pt
-const USHORT PT_16 = 16 * 20; // 16 pt
-const USHORT PT_18 = 18 * 20; // 18 pt
-const USHORT PT_22 = 22 * 20; // 22 pt
-const USHORT PT_24 = 24 * 20; // 22 pt
-
-
-//const USHORT HTML_PARSPACE = ((CM_05 * 7) / 10);
+const sal_uInt16 PT_3 = 3 * 20; // 3 pt
+const sal_uInt16 PT_6 = 6 * 20; // 6 pt
+const sal_uInt16 PT_7 = 7 * 20; // 6 pt
+const sal_uInt16 PT_8 = 8 * 20; // 8 pt
+const sal_uInt16 PT_9 = 9 * 20; // 9 pt
+const sal_uInt16 PT_10 = 10 * 20; // 10 pt
+const sal_uInt16 PT_11 = 11 * 20; // 11 pt
+const sal_uInt16 PT_12 = 12 * 20; // 12 pt
+const sal_uInt16 PT_14 = 14 * 20; // 14 pt
+const sal_uInt16 PT_16 = 16 * 20; // 16 pt
+const sal_uInt16 PT_18 = 18 * 20; // 18 pt
+const sal_uInt16 PT_22 = 22 * 20; // 22 pt
+const sal_uInt16 PT_24 = 24 * 20; // 22 pt
+
+
+//const sal_uInt16 HTML_PARSPACE = ((CM_05 * 7) / 10);
#define HTML_PARSPACE GetMetricVal( CM_05 )
static const sal_Char __FAR_DATA sKomma[] = ", ";
-static const USHORT aHeadlineSizes[ 2 * MAXLEVEL ] = {
+static const sal_uInt16 aHeadlineSizes[ 2 * MAXLEVEL ] = {
// PT_16, PT_14, PT_14, PT_12, PT_12, // normal
//JP 10.12.96: jetzt soll alles prozentual sein:
115, 100, 100, 85, 85,
@@ -122,7 +122,7 @@ long lcl_GetRightMargin( SwDoc& rDoc )
void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem )
{
rSet.Put( rItem );
- USHORT nWhCJK = 0, nWhCTL = 0;
+ sal_uInt16 nWhCJK = 0, nWhCTL = 0;
switch( rItem.Which() )
{
case RES_CHRATR_FONTSIZE:
@@ -148,19 +148,19 @@ void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem )
rSet.Put( rItem, nWhCTL );
}
-void lcl_SetDfltFont( USHORT nFntType, SfxItemSet& rSet )
+void lcl_SetDfltFont( sal_uInt16 nFntType, SfxItemSet& rSet )
{
static struct {
- USHORT nResLngId;
- USHORT nResFntId;
+ sal_uInt16 nResLngId;
+ sal_uInt16 nResFntId;
} aArr[ 3 ] = {
{ RES_CHRATR_LANGUAGE, RES_CHRATR_FONT },
{ RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_FONT },
{ RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_FONT }
};
- for( USHORT n = 0; n < 3; ++n )
+ for( sal_uInt16 n = 0; n < 3; ++n )
{
- USHORT nLng = ((SvxLanguageItem&)rSet.GetPool()->GetDefaultItem(
+ sal_uInt16 nLng = ((SvxLanguageItem&)rSet.GetPool()->GetDefaultItem(
aArr[n].nResLngId )).GetLanguage();
Font aFnt( OutputDevice::GetDefaultFont( nFntType,
nLng, DEFAULTFONT_FLAGS_ONLYONE ) );
@@ -171,13 +171,13 @@ void lcl_SetDfltFont( USHORT nFntType, SfxItemSet& rSet )
}
}
-void lcl_SetDfltFont( USHORT nLatinFntType, USHORT nCJKFntType,
- USHORT nCTLFntType, SfxItemSet& rSet )
+void lcl_SetDfltFont( sal_uInt16 nLatinFntType, sal_uInt16 nCJKFntType,
+ sal_uInt16 nCTLFntType, SfxItemSet& rSet )
{
static struct {
- USHORT nResLngId;
- USHORT nResFntId;
- USHORT nFntType;
+ sal_uInt16 nResLngId;
+ sal_uInt16 nResFntId;
+ sal_uInt16 nFntType;
} aArr[ 3 ] = {
{ RES_CHRATR_LANGUAGE, RES_CHRATR_FONT, 0 },
{ RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_FONT, 0 },
@@ -187,9 +187,9 @@ void lcl_SetDfltFont( USHORT nLatinFntType, USHORT nCJKFntType,
aArr[1].nFntType = nCJKFntType;
aArr[2].nFntType = nCTLFntType;
- for( USHORT n = 0; n < 3; ++n )
+ for( sal_uInt16 n = 0; n < 3; ++n )
{
- USHORT nLng = ((SvxLanguageItem&)rSet.GetPool()->GetDefaultItem(
+ sal_uInt16 nLng = ((SvxLanguageItem&)rSet.GetPool()->GetDefaultItem(
aArr[n].nResLngId )).GetLanguage();
Font aFnt( OutputDevice::GetDefaultFont( aArr[n].nFntType,
nLng, DEFAULTFONT_FLAGS_ONLYONE ) );
@@ -202,7 +202,7 @@ void lcl_SetDfltFont( USHORT nLatinFntType, USHORT nCJKFntType,
void lcl_SetHeadline( SwDoc* pDoc, SwTxtFmtColl* pColl,
SfxItemSet& rSet,
- USHORT nOutLvlBits, BYTE nLevel, BOOL bItalic )
+ sal_uInt16 nOutLvlBits, sal_uInt8 nLevel, sal_Bool bItalic )
{
SetAllScriptItem( rSet, SvxWeightItem( WEIGHT_BOLD, RES_CHRATR_WEIGHT ) );
SvxFontHeightItem aHItem(240, 100, RES_CHRATR_FONTSIZE);
@@ -263,11 +263,11 @@ void lcl_SetHeadline( SwDoc* pDoc, SwTxtFmtColl* pColl,
-void lcl_SetRegister( SwDoc* pDoc, SfxItemSet& rSet, USHORT nFact,
- BOOL bHeader, BOOL bTab )
+void lcl_SetRegister( SwDoc* pDoc, SfxItemSet& rSet, sal_uInt16 nFact,
+ sal_Bool bHeader, sal_Bool bTab )
{
SvxLRSpaceItem aLR( RES_LR_SPACE );
- USHORT nLeft = nFact ? GetMetricVal( CM_05 ) * nFact : 0;
+ sal_uInt16 nLeft = nFact ? GetMetricVal( CM_05 ) * nFact : 0;
aLR.SetTxtLeft( nLeft );
rSet.Put( aLR );
@@ -291,13 +291,13 @@ void lcl_SetRegister( SwDoc* pDoc, SfxItemSet& rSet, USHORT nFact,
void lcl_SetNumBul( SwDoc* pDoc, SwTxtFmtColl* pColl,
SfxItemSet& rSet,
- USHORT nNxt, SwTwips nEZ, SwTwips nLeft,
+ sal_uInt16 nNxt, SwTwips nEZ, SwTwips nLeft,
SwTwips nUpper, SwTwips nLower )
{
SvxLRSpaceItem aLR( RES_LR_SPACE ); SvxULSpaceItem aUL( RES_UL_SPACE );
- aLR.SetTxtFirstLineOfst( USHORT(nEZ) ); aLR.SetTxtLeft( USHORT(nLeft) );
- aUL.SetUpper( USHORT(nUpper) ); aUL.SetLower( USHORT(nLower) );
+ aLR.SetTxtFirstLineOfst( sal_uInt16(nEZ) ); aLR.SetTxtLeft( sal_uInt16(nLeft) );
+ aUL.SetUpper( sal_uInt16(nUpper) ); aUL.SetLower( sal_uInt16(nLower) );
rSet.Put( aLR );
rSet.Put( aUL );
@@ -312,14 +312,14 @@ void lcl_SetNumBul( SwDoc* pDoc, SwTxtFmtColl* pColl,
// Ist der String-Pointer definiert, dann erfrage nur die
// Beschreibung der Attribute, !! es legt keine Vorlage an !!
-SvxFrameDirection GetDefaultFrameDirection(ULONG nLanguage)
+SvxFrameDirection GetDefaultFrameDirection(sal_uLong nLanguage)
{
SvxFrameDirection eResult = (MsLangId::isRightToLeft( static_cast<LanguageType>(nLanguage)) ?
FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP);
return eResult;
}
-SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
+SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage )
{
ASSERT(
(RES_POOLCOLL_TEXT_BEGIN <= nId && nId < RES_POOLCOLL_TEXT_END) ||
@@ -331,8 +331,8 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
"Falsche AutoFormat-Id" );
SwTxtFmtColl* pNewColl;
- USHORT nOutLvlBits = 0;
- for( USHORT n = 0; n < pTxtFmtCollTbl->Count(); ++n )
+ sal_uInt16 nOutLvlBits = 0;
+ for( sal_uInt16 n = 0; n < pTxtFmtCollTbl->Count(); ++n )
{
if( nId == ( pNewColl = (*pTxtFmtCollTbl)[ n ] )->GetPoolFmtId() )
{
@@ -345,7 +345,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
}
// bis hierher nicht gefunden -> neu anlegen
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
if( RES_POOLCOLL_TEXT_BEGIN <= nId && nId < RES_POOLCOLL_TEXT_END )
nResId = RC_POOLCOLL_TEXT_BEGIN - RES_POOLCOLL_TEXT_BEGIN;
else if (RES_POOLCOLL_LISTS_BEGIN <= nId && nId < RES_POOLCOLL_LISTS_END)
@@ -368,7 +368,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
// ein Set fuer alle zusetzenden Attribute
SwAttrSet aSet( GetAttrPool(), aTxtFmtCollSetRange );
- USHORT nParent = GetPoolParent( nId );
+ sal_uInt16 nParent = GetPoolParent( nId );
{
@@ -390,10 +390,10 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
{
// allgemeine Inhaltsformen
case RES_POOLCOLL_STANDARD:
- /* #111214# koreans do not like SvxScriptItem(TRUE) */
+ /* #111214# koreans do not like SvxScriptItem(sal_True) */
if (bRegardLanguage)
{
- ULONG nAppLanguage = GetAppLanguage();
+ sal_uLong nAppLanguage = GetAppLanguage();
if (GetDefaultFrameDirection(nAppLanguage) ==
FRMDIR_HORI_RIGHT_TOP)
{
@@ -402,7 +402,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
}
if (nAppLanguage == LANGUAGE_KOREAN)
{
- SvxScriptSpaceItem aScriptSpace(FALSE, RES_PARATR_SCRIPTSPACE);
+ SvxScriptSpaceItem aScriptSpace(sal_False, RES_PARATR_SCRIPTSPACE);
aSet.Put(aScriptSpace);
}
}
@@ -463,7 +463,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
case RES_POOLCOLL_HEADLINE_BASE: // Basis Ueberschrift
{
- static const USHORT aFntInit[] = {
+ static const sal_uInt16 aFntInit[] = {
DEFAULTFONT_LATIN_HEADING, RES_CHRATR_FONT,
RES_CHRATR_LANGUAGE, LANGUAGE_ENGLISH_US,
DEFAULTFONT_CJK_HEADING, RES_CHRATR_CJK_FONT,
@@ -473,9 +473,9 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
0
};
- for( const USHORT* pArr = aFntInit; *pArr; pArr += 4 )
+ for( const sal_uInt16* pArr = aFntInit; *pArr; pArr += 4 )
{
- USHORT nLng = ((SvxLanguageItem&)GetDefault( *(pArr+2) )).GetLanguage();
+ sal_uInt16 nLng = ((SvxLanguageItem&)GetDefault( *(pArr+2) )).GetLanguage();
if( LANGUAGE_DONTKNOW == nLng )
nLng = *(pArr+3);
@@ -491,7 +491,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
SvxULSpaceItem aUL( PT_12, PT_6, RES_UL_SPACE );
if( get(IDocumentSettingAccess::HTML_MODE) )
aUL.SetLower( HTML_PARSPACE );
- aSet.Put( SvxFmtKeepItem( TRUE, RES_KEEP ));
+ aSet.Put( SvxFmtKeepItem( sal_True, RES_KEEP ));
pNewColl->SetNextTxtFmtColl( *GetTxtCollFromPool( RES_POOLCOLL_TEXT ));
@@ -508,40 +508,40 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
case RES_POOLCOLL_SIGNATURE: // Unterschrift
case RES_POOLCOLL_TABLE: // Tabelle-Inhalt
{
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
case RES_POOLCOLL_HEADLINE1: // Ueberschrift 1
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 0, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 0, sal_False );
break;
case RES_POOLCOLL_HEADLINE2: // Ueberschrift 2
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 1, TRUE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 1, sal_True );
break;
case RES_POOLCOLL_HEADLINE3: // Ueberschrift 3
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 2, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 2, sal_False );
break;
case RES_POOLCOLL_HEADLINE4: // Ueberschrift 4
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 3, TRUE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 3, sal_True );
break;
case RES_POOLCOLL_HEADLINE5: // Ueberschrift 5
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 4, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 4, sal_False );
break;
case RES_POOLCOLL_HEADLINE6: // Ueberschrift 6
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 5, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 5, sal_False );
break;
case RES_POOLCOLL_HEADLINE7: // Ueberschrift 7
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 6, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 6, sal_False );
break;
case RES_POOLCOLL_HEADLINE8: // Ueberschrift 8
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 7, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 7, sal_False );
break;
case RES_POOLCOLL_HEADLINE9: // Ueberschrift 9
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 8, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 8, sal_False );
break;
case RES_POOLCOLL_HEADLINE10: // Ueberschrift 10
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 9, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 9, sal_False );
break;
@@ -555,7 +555,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
case RES_POOLCOLL_FOOTERL:
case RES_POOLCOLL_FOOTERR:
{
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
long nRightMargin = lcl_GetRightMargin( *this );
@@ -572,7 +572,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
{
SetAllScriptItem( aSet, SvxWeightItem( WEIGHT_BOLD, RES_CHRATR_WEIGHT ) );
aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ) );
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
@@ -585,7 +585,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
aLR.SetTxtLeft( GetMetricVal( CM_05 ));
SetAllScriptItem( aSet, SvxFontHeightItem( PT_10, 100, RES_CHRATR_FONTSIZE ) );
aSet.Put( aLR );
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
@@ -596,7 +596,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
aSet.Put( aUL );
SetAllScriptItem( aSet, SvxPostureItem( ITALIC_NORMAL, RES_CHRATR_POSTURE ) );
SetAllScriptItem( aSet, SvxFontHeightItem( PT_10, 100, RES_CHRATR_FONTSIZE ) );
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
@@ -612,7 +612,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
{
SvxULSpaceItem aUL( RES_UL_SPACE ); aUL.SetLower( PT_3 );
aSet.Put( aUL );
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
@@ -626,117 +626,117 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
SvxULSpaceItem aUL( RES_UL_SPACE ); aUL.SetLower( PT_3 );
aSet.Put( aUL );
}
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
// Benutzer-Verzeichnisse:
case RES_POOLCOLL_TOX_USERH: // Header
- lcl_SetRegister( this, aSet, 0, TRUE, FALSE );
+ lcl_SetRegister( this, aSet, 0, sal_True, sal_False );
{
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
case RES_POOLCOLL_TOX_USER1: // 1. Ebene
- lcl_SetRegister( this, aSet, 0, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 0, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER2: // 2. Ebene
- lcl_SetRegister( this, aSet, 1, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 1, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER3: // 3. Ebene
- lcl_SetRegister( this, aSet, 2, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 2, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER4: // 4. Ebene
- lcl_SetRegister( this, aSet, 3, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 3, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER5: // 5. Ebene
- lcl_SetRegister( this, aSet, 4, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 4, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER6: // 6. Ebene
- lcl_SetRegister( this, aSet, 5, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 5, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER7: // 7. Ebene
- lcl_SetRegister( this, aSet, 6, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 6, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER8: // 8. Ebene
- lcl_SetRegister( this, aSet, 7, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 7, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER9: // 9. Ebene
- lcl_SetRegister( this, aSet, 8, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 8, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER10: // 10. Ebene
- lcl_SetRegister( this, aSet, 9, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 9, sal_False, sal_True );
break;
// Index-Verzeichnisse
case RES_POOLCOLL_TOX_IDXH: // Header
- lcl_SetRegister( this, aSet, 0, TRUE, FALSE );
+ lcl_SetRegister( this, aSet, 0, sal_True, sal_False );
{
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
case RES_POOLCOLL_TOX_IDX1: // 1. Ebene
- lcl_SetRegister( this, aSet, 0, FALSE, FALSE );
+ lcl_SetRegister( this, aSet, 0, sal_False, sal_False );
break;
case RES_POOLCOLL_TOX_IDX2: // 2. Ebene
- lcl_SetRegister( this, aSet, 1, FALSE, FALSE );
+ lcl_SetRegister( this, aSet, 1, sal_False, sal_False );
break;
case RES_POOLCOLL_TOX_IDX3: // 3. Ebene
- lcl_SetRegister( this, aSet, 2, FALSE, FALSE );
+ lcl_SetRegister( this, aSet, 2, sal_False, sal_False );
break;
case RES_POOLCOLL_TOX_IDXBREAK: // Trenner
- lcl_SetRegister( this, aSet, 0, FALSE, FALSE );
+ lcl_SetRegister( this, aSet, 0, sal_False, sal_False );
break;
// Inhalts-Verzeichnisse
case RES_POOLCOLL_TOX_CNTNTH: // Header
- lcl_SetRegister( this, aSet, 0, TRUE, FALSE );
+ lcl_SetRegister( this, aSet, 0, sal_True, sal_False );
{
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
case RES_POOLCOLL_TOX_CNTNT1: // 1. Ebene
- lcl_SetRegister( this, aSet, 0, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 0, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT2: // 2. Ebene
- lcl_SetRegister( this, aSet, 1, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 1, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT3: // 3. Ebene
- lcl_SetRegister( this, aSet, 2, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 2, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT4: // 4. Ebene
- lcl_SetRegister( this, aSet, 3, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 3, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT5: // 5. Ebene
- lcl_SetRegister( this, aSet, 4, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 4, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT6: // 6. Ebene
- lcl_SetRegister( this, aSet, 5, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 5, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT7: // 7. Ebene
- lcl_SetRegister( this, aSet, 6, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 6, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT8: // 8. Ebene
- lcl_SetRegister( this, aSet, 7, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 7, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT9: // 9. Ebene
- lcl_SetRegister( this, aSet, 8, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 8, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT10: // 10. Ebene
- lcl_SetRegister( this, aSet, 9, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 9, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_ILLUSH:
case RES_POOLCOLL_TOX_OBJECTH:
case RES_POOLCOLL_TOX_TABLESH:
case RES_POOLCOLL_TOX_AUTHORITIESH:
- lcl_SetRegister( this, aSet, 0, TRUE, FALSE );
+ lcl_SetRegister( this, aSet, 0, sal_True, sal_False );
{
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
@@ -744,7 +744,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
case RES_POOLCOLL_TOX_OBJECT1:
case RES_POOLCOLL_TOX_TABLES1:
case RES_POOLCOLL_TOX_AUTHORITIES1:
- lcl_SetRegister( this, aSet, 0, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 0, sal_False, sal_True );
break;
@@ -1006,7 +1006,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
aBox.SetLine( &aNew, BOX_LINE_BOTTOM );
aSet.Put( aBox );
- aSet.Put( SwParaConnectBorderItem( FALSE ) );
+ aSet.Put( SwParaConnectBorderItem( sal_False ) );
SetAllScriptItem( aSet, SvxFontHeightItem(120, 100, RES_CHRATR_FONTSIZE) );
SvxULSpaceItem aUL( RES_UL_SPACE );
@@ -1017,7 +1017,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
}
aUL.SetLower( HTML_PARSPACE );
aSet.Put( aUL);
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
@@ -1062,7 +1062,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
// pruefe, ob diese "Auto-Collection" in Dokument schon/noch
// benutzt wird
-bool SwDoc::IsPoolTxtCollUsed( USHORT nId ) const
+bool SwDoc::IsPoolTxtCollUsed( sal_uInt16 nId ) const
{
ASSERT(
(RES_POOLCOLL_TEXT_BEGIN <= nId && nId < RES_POOLCOLL_TEXT_END) ||
@@ -1074,16 +1074,16 @@ bool SwDoc::IsPoolTxtCollUsed( USHORT nId ) const
"Falsche AutoFormat-Id" );
SwTxtFmtColl* pNewColl = 0;
- BOOL bFnd = FALSE;
- for( USHORT n = 0; !bFnd && n < pTxtFmtCollTbl->Count(); ++n )
+ sal_Bool bFnd = sal_False;
+ for( sal_uInt16 n = 0; !bFnd && n < pTxtFmtCollTbl->Count(); ++n )
{
pNewColl = (*pTxtFmtCollTbl)[ n ];
if( nId == pNewColl->GetPoolFmtId() )
- bFnd = TRUE;
+ bFnd = sal_True;
}
if( !bFnd || !pNewColl->GetDepends() )
- return FALSE;
+ return sal_False;
SwAutoFmtGetDocNode aGetHt( &aNodes );
return !pNewColl->GetInfo( aGetHt );
@@ -1092,14 +1092,14 @@ bool SwDoc::IsPoolTxtCollUsed( USHORT nId ) const
// Gebe das "Auto[matische]-Format" mit der Id zurueck. Existiert
// es noch nicht, dann erzeuge es
-SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
+SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId )
{
SwFmt *pNewFmt = 0;
SwFmt *pDeriveFmt = 0;
SvPtrarr* pArray[ 2 ];
- USHORT nArrCnt = 1, nRCId = 0;
- USHORT* pWhichRange = 0;
+ sal_uInt16 nArrCnt = 1, nRCId = 0;
+ sal_uInt16* pWhichRange = 0;
switch( nId & (COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID) )
{
@@ -1150,7 +1150,7 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
ASSERT( nRCId, "ungueltige Id" );
while( nArrCnt-- )
- for( USHORT n = 0; n < (*pArray[nArrCnt]).Count(); ++n )
+ for( sal_uInt16 n = 0; n < (*pArray[nArrCnt]).Count(); ++n )
if( nId == ( pNewFmt = (SwFmt*)(*pArray[ nArrCnt ] )[ n ] )->
GetPoolFmtId() )
{
@@ -1162,18 +1162,18 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
SwAttrSet aSet( GetAttrPool(), pWhichRange );
{
- BOOL bIsModified = IsModified();
+ sal_Bool bIsModified = IsModified();
- BOOL bDoesUndo = DoesUndo();
- DoUndo(FALSE);
+ sal_Bool bDoesUndo = DoesUndo();
+ DoUndo(sal_False);
switch (nId & (COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID) )
{
case POOLGRP_CHARFMT:
- pNewFmt = _MakeCharFmt( aNm, pDeriveFmt, FALSE, TRUE );
+ pNewFmt = _MakeCharFmt( aNm, pDeriveFmt, sal_False, sal_True );
break;
case POOLGRP_FRAMEFMT:
- pNewFmt = _MakeFrmFmt(aNm, pDeriveFmt, FALSE, TRUE );
+ pNewFmt = _MakeFrmFmt(aNm, pDeriveFmt, sal_False, sal_True );
break;
default:
@@ -1185,7 +1185,7 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
if( !bIsModified )
ResetModified();
pNewFmt->SetPoolFmtId( nId );
- pNewFmt->SetAuto( FALSE ); // kein Auto-Format
+ pNewFmt->SetAuto( sal_False ); // kein Auto-Format
}
switch( nId )
@@ -1354,7 +1354,7 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
aSet.Put( SwFmtAnchor( FLY_AT_PAGE ));
aSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::FRAME ));
aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::CENTER, text::RelOrientation::FRAME ));
- aSet.Put( SvxOpaqueItem( FALSE ));
+ aSet.Put( SvxOpaqueItem( sal_False ));
aSet.Put( SwFmtSurround( SURROUND_THROUGHT ));
}
break;
@@ -1366,11 +1366,11 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
aSet.Put( SvxLRSpaceItem( 114, 114, 0, 0, RES_LR_SPACE ) );
SvxProtectItem aProtect( RES_PROTECT );
- aProtect.SetSizeProtect( TRUE );
- aProtect.SetPosProtect( TRUE );
+ aProtect.SetSizeProtect( sal_True );
+ aProtect.SetPosProtect( sal_True );
aSet.Put( aProtect );
- pNewFmt->SetAutoUpdateFmt( TRUE );
+ pNewFmt->SetAutoUpdateFmt( sal_True );
}
break;
}
@@ -1398,12 +1398,12 @@ SwCharFmt* SwDoc::GetCharFmtFromPool( sal_uInt16 nId )
// pruefe, ob diese "Auto-Collection" in Dokument schon/noch
// benutzt wird
-bool SwDoc::IsPoolFmtUsed( USHORT nId ) const
+bool SwDoc::IsPoolFmtUsed( sal_uInt16 nId ) const
{
SwFmt *pNewFmt = 0;
const SvPtrarr* pArray[ 2 ];
- USHORT nArrCnt = 1;
- BOOL bFnd = TRUE;
+ sal_uInt16 nArrCnt = 1;
+ sal_Bool bFnd = sal_True;
if( RES_POOLCHR_BEGIN <= nId && nId < RES_POOLCHR_END )
{
@@ -1417,18 +1417,18 @@ bool SwDoc::IsPoolFmtUsed( USHORT nId ) const
}
else
{
- ASSERT( FALSE, "ungueltige Id" );
- bFnd = FALSE;
+ ASSERT( sal_False, "ungueltige Id" );
+ bFnd = sal_False;
}
if( bFnd )
{
- bFnd = FALSE;
+ bFnd = sal_False;
while( nArrCnt-- && !bFnd )
- for( USHORT n = 0; !bFnd && n < (*pArray[nArrCnt]).Count(); ++n )
+ for( sal_uInt16 n = 0; !bFnd && n < (*pArray[nArrCnt]).Count(); ++n )
if( nId == ( pNewFmt = (SwFmt*)(*pArray[ nArrCnt ] )[ n ] )->
GetPoolFmtId() )
- bFnd = TRUE;
+ bFnd = sal_True;
}
// nicht gefunden oder keine Abhaengigen ?
@@ -1440,7 +1440,7 @@ bool SwDoc::IsPoolFmtUsed( USHORT nId ) const
bFnd = !pNewFmt->GetInfo( aGetHt );
}
else
- bFnd = FALSE;
+ bFnd = sal_False;
return bFnd;
}
@@ -1466,7 +1466,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
"Falsche AutoFormat-Id" );
SwPageDesc *pNewPgDsc;
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < aPageDescs.Count(); ++n )
if( nId == ( pNewPgDsc = aPageDescs[ n ] )->GetPoolFmtId() )
@@ -1484,10 +1484,10 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
ResId aResId( sal_uInt32(RC_POOLPAGEDESC_BEGIN + nId - RES_POOLPAGE_BEGIN), *pSwResMgr );
String aNm( aResId );
{
- BOOL bIsModified = IsModified();
+ sal_Bool bIsModified = IsModified();
- BOOL bDoesUndo = DoesUndo();
- DoUndo(FALSE);
+ sal_Bool bDoesUndo = DoesUndo();
+ DoUndo(sal_False);
n = MakePageDesc( aNm, 0, bRegardLanguage );
DoUndo(bDoesUndo);
@@ -1502,11 +1502,11 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
aLR.SetLeft( GetMetricVal( CM_1 ) * 2 );
aLR.SetRight( aLR.GetLeft() );
SvxULSpaceItem aUL( RES_UL_SPACE );
- aUL.SetUpper( (USHORT)aLR.GetLeft() );
- aUL.SetLower( (USHORT)aLR.GetLeft() );
+ aUL.SetUpper( (sal_uInt16)aLR.GetLeft() );
+ aUL.SetLower( (sal_uInt16)aLR.GetLeft() );
SwAttrSet aSet( GetAttrPool(), aPgFrmFmtSetRange );
- BOOL bSetLeft = TRUE;
+ sal_Bool bSetLeft = sal_True;
switch( nId )
{
@@ -1539,7 +1539,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
lcl_GetStdPgSize( this, aSet );
aSet.Put( aLR );
aSet.Put( aUL );
- bSetLeft = FALSE;
+ bSetLeft = sal_False;
if( pNewPgDsc )
pNewPgDsc->SetUseOn( nsUseOnPage::PD_LEFT );
}
@@ -1549,7 +1549,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
lcl_GetStdPgSize( this, aSet );
aSet.Put( aLR );
aSet.Put( aUL );
- bSetLeft = FALSE;
+ bSetLeft = sal_False;
if( pNewPgDsc )
pNewPgDsc->SetUseOn( nsUseOnPage::PD_RIGHT );
}
@@ -1568,7 +1568,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
if( pNewPgDsc )
{
pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
- pNewPgDsc->SetLandscape( TRUE );
+ pNewPgDsc->SetLandscape( sal_True );
}
}
break;
@@ -1577,8 +1577,8 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
{
lcl_GetStdPgSize( this, aSet );
aLR.SetRight( GetMetricVal( CM_1 ));
- aUL.SetUpper( (USHORT)aLR.GetRight() );
- aUL.SetLower( (USHORT)aLR.GetRight() );
+ aUL.SetUpper( (sal_uInt16)aLR.GetRight() );
+ aUL.SetLower( (sal_uInt16)aLR.GetRight() );
aSet.Put( aLR );
aSet.Put( aUL );
@@ -1614,7 +1614,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
if( pNewPgDsc )
{
pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
- pNewPgDsc->SetLandscape( TRUE );
+ pNewPgDsc->SetLandscape( sal_True );
}
}
break;
@@ -1635,13 +1635,13 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
return pNewPgDsc;
}
-SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
+SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
{
ASSERT( RES_POOLNUMRULE_BEGIN <= nId && nId < RES_POOLNUMRULE_END,
"Falsche AutoFormat-Id" );
SwNumRule* pNewRule;
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < GetNumRuleTbl().Count(); ++n )
if( nId == ( pNewRule = GetNumRuleTbl()[ n ] )->GetPoolFmtId() )
@@ -1668,13 +1668,13 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
// <--
// <--
{
- BOOL bIsModified = IsModified();
+ sal_Bool bIsModified = IsModified();
// --> OD 2008-02-11 #newlistlevelattrs#
- n = MakeNumRule( aNm, 0, FALSE, eNumberFormatPositionAndSpaceMode );
+ n = MakeNumRule( aNm, 0, sal_False, eNumberFormatPositionAndSpaceMode );
// <--
pNewRule = GetNumRuleTbl()[ n ];
pNewRule->SetPoolFmtId( nId );
- pNewRule->SetAutoRule( FALSE );
+ pNewRule->SetAutoRule( sal_False );
if( RES_POOLNUMRULE_NUM1 <= nId && nId <= RES_POOLNUMRULE_NUM5 )
pNumCFmt = GetCharFmtFromPool( RES_POOLCHR_NUM_LEVEL );
@@ -1701,22 +1701,22 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetIncludeUpperLevels( 1 );
aFmt.SetSuffix( aDotStr );
- static const USHORT aAbsSpace[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
// cm: 0,5 1,0 1,5 2,0 2,5 3,0 3,5 4,0 4,5 5,0
283, 567, 850, 1134, 1417, 1701, 1984, 2268, 2551, 2835
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpaceInch[ MAXLEVEL ] =
{
283, 567, 850, 1134, 1417, 1701, 1984, 2268, 2551, 2835
};
- const USHORT* pArr = MEASURE_METRIC ==
+ const sal_uInt16* pArr = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
- const USHORT* pArr = aAbsSpace;
+ const sal_uInt16* pArr = aAbsSpace;
#endif
// --> OD 2008-02-11 #newlistlevelattrs#
@@ -1750,7 +1750,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
case RES_POOLNUMRULE_NUM2:
{
- static const USHORT aAbsSpace[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
283, 283, 567, 709, // 0.50, 0.50, 1.00, 1.25
850, 1021, 1304, 1474, // 1.50, 1.80, 2.30, 2.60
@@ -1758,19 +1758,19 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpaceInch[ MAXLEVEL ] =
{
385, 385, 770, 963,
1155, 1386, 1771, 2002,
2156, 2387
};
- const USHORT* pArr = MEASURE_METRIC ==
+ const sal_uInt16* pArr = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
- const USHORT* pArr = aAbsSpace;
+ const sal_uInt16* pArr = aAbsSpace;
#endif
SwNumFmt aFmt;
// --> OD 2008-02-11 #newlistlevelattrs#
@@ -1785,7 +1785,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
}
// <--
- USHORT nSpace = 0;
+ sal_uInt16 nSpace = 0;
for( n = 0; n < MAXLEVEL; ++n )
{
// --> OD 2008-02-11 #newlistlevelattrs#
@@ -1816,7 +1816,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetCharFmt( pNumCFmt );
aFmt.SetIncludeUpperLevels( 1 );
- USHORT nOffs = GetMetricVal( CM_1 ) * 3;
+ sal_uInt16 nOffs = GetMetricVal( CM_1 ) * 3;
// --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -1858,22 +1858,22 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetIncludeUpperLevels( 1 );
aFmt.SetSuffix( aDotStr );
- static const USHORT aAbsSpace[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
// cm: 0,5 1,0 1,5 2,0 2,5 3,0 3,5 4,0 4,5 5,0
283, 567, 850, 1134, 1417, 1701, 1984, 2268, 2551, 2835
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpaceInch[ MAXLEVEL ] =
{
283, 567, 850, 1134, 1417, 1701, 1984, 2268, 2551, 2835
};
- const USHORT* pArr = MEASURE_METRIC ==
+ const sal_uInt16* pArr = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
- const USHORT* pArr = aAbsSpace;
+ const sal_uInt16* pArr = aAbsSpace;
#endif
// --> OD 2008-02-11 #newlistlevelattrs#
@@ -1908,7 +1908,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
case RES_POOLNUMRULE_NUM5:
{
// [ First, LSpace ]
- static const USHORT aAbsSpace0to2[] =
+ static const sal_uInt16 aAbsSpace0to2[] =
{
227, 227, // 0.40, 0.40,
369, 624, // 0.65, 1.10,
@@ -1916,18 +1916,18 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch0to2[] =
+ static const sal_uInt16 aAbsSpaceInch0to2[] =
{
308, 308,
501, 847,
347, 1194
};
- const USHORT* pArr0to2 = MEASURE_METRIC ==
+ const sal_uInt16* pArr0to2 = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace0to2
: aAbsSpaceInch0to2;
#else
- const USHORT* pArr0to2 = aAbsSpace0to2;
+ const sal_uInt16* pArr0to2 = aAbsSpace0to2;
#endif
SwNumFmt aFmt;
// --> OD 2008-02-11 #newlistlevelattrs#
@@ -2004,7 +2004,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
// <--
aFmt.SetBulletChar( cBulletChar );
- USHORT nOffs = GetMetricVal( CM_01 ) * 4,
+ sal_uInt16 nOffs = GetMetricVal( CM_01 ) * 4,
nOffs2 = GetMetricVal( CM_1 ) * 2;
// --> OD 2008-02-11 #newlistlevelattrs#
@@ -2052,22 +2052,22 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
// <--
aFmt.SetBulletChar( cBulletChar );
- static const USHORT aAbsSpace[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
// cm: 0,4 0,8 1,2 1,6 2,0 2,4 2,8 3,2 3,6 4,0
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpaceInch[ MAXLEVEL ] =
{
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
- const USHORT* pArr = MEASURE_METRIC ==
+ const sal_uInt16* pArr = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
- const USHORT* pArr = aAbsSpace;
+ const sal_uInt16* pArr = aAbsSpace;
#endif
// --> OD 2008-02-11 #newlistlevelattrs#
@@ -2113,22 +2113,22 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
// <--
aFmt.SetBulletChar( 0x2013 );
- static const USHORT aAbsSpace[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
// cm: 0,3 0,6 0,9 1,2 1,5 1,8 2,1 2,4 2,7 3,0
170, 340, 510, 680, 850, 1020, 1191, 1361, 1531, 1701
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpaceInch[ MAXLEVEL ] =
{
170, 340, 510, 680, 850, 1020, 1191, 1361, 1531, 1701
};
- const USHORT* pArr = MEASURE_METRIC ==
+ const sal_uInt16* pArr = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
- const USHORT* pArr = aAbsSpace;
+ const sal_uInt16* pArr = aAbsSpace;
#endif
// --> OD 2008-02-11 #newlistlevelattrs#
@@ -2173,7 +2173,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
// <--
- USHORT nOffs = GetMetricVal( CM_01 ) * 4;
+ sal_uInt16 nOffs = GetMetricVal( CM_01 ) * 4;
// --> OD 2008-02-11 #newlistlevelattrs#
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -2218,22 +2218,22 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
// <--
- static const USHORT aAbsSpace[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
// cm: 0,4 0,8 1,2 1,6 2,0 2,4 2,8 3,2 3,6 4,0
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpaceInch[ MAXLEVEL ] =
{
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
- const USHORT* pArr = MEASURE_METRIC ==
+ const sal_uInt16* pArr = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
- const USHORT* pArr = aAbsSpace;
+ const sal_uInt16* pArr = aAbsSpace;
#endif
// --> OD 2008-02-11 #newlistlevelattrs#
@@ -2285,22 +2285,22 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
// <--
- static const USHORT aAbsSpace[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
// cm: 0,4 0,8 1,2 1,6 2,0 2,4 2,8 3,2 3,6 4,0
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpaceInch[ MAXLEVEL ] =
{
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
- const USHORT* pArr = MEASURE_METRIC ==
+ const sal_uInt16* pArr = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
- const USHORT* pArr = aAbsSpace;
+ const sal_uInt16* pArr = aAbsSpace;
#endif
// --> OD 2008-02-11 #newlistlevelattrs#
@@ -2340,22 +2340,22 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
// pruefe, ob diese "Auto-Collection" in Dokument schon/noch
// benutzt wird
-bool SwDoc::IsPoolPageDescUsed( USHORT nId ) const
+bool SwDoc::IsPoolPageDescUsed( sal_uInt16 nId ) const
{
ASSERT( RES_POOLPAGE_BEGIN <= nId && nId < RES_POOLPAGE_END,
"Falsche AutoFormat-Id" );
SwPageDesc *pNewPgDsc = 0;
- BOOL bFnd = FALSE;
- for( USHORT n = 0; !bFnd && n < aPageDescs.Count(); ++n )
+ sal_Bool bFnd = sal_False;
+ for( sal_uInt16 n = 0; !bFnd && n < aPageDescs.Count(); ++n )
{
pNewPgDsc = aPageDescs[ n ];
if( nId == pNewPgDsc->GetPoolFmtId() )
- bFnd = TRUE;
+ bFnd = sal_True;
}
// nicht gefunden oder keine Abhaengigen ?
if( !bFnd || !pNewPgDsc->GetDepends() ) // ??????
- return FALSE;
+ return sal_False;
// dann teste mal, ob es abhaengige ContentNodes im Nodes Array gibt
// (auch indirekte fuer Format-Ableitung! )
@@ -2378,11 +2378,11 @@ sal_Bool SwDoc::IsUsed( const SwNumRule& rRule ) const
// --> OD 2008-03-04 #refactorlists#
// // dann teste mal, ob es abhaengige ContentNodes im Nodes Array gibt
// // (auch indirekte fuer Format-Ableitung! )
-// sal_Bool bUsed = FALSE;
+// sal_Bool bUsed = sal_False;
// SwAutoFmtGetDocNode aGetHt( &aNodes );
// SwModify* pMod;
// const SfxPoolItem* pItem;
-// USHORT i, nMaxItems = GetAttrPool().GetItemCount( RES_PARATR_NUMRULE);
+// sal_uInt16 i, nMaxItems = GetAttrPool().GetItemCount( RES_PARATR_NUMRULE);
// for( i = 0; i < nMaxItems; ++i )
// {
// if( 0 != (pItem = GetAttrPool().GetItem( RES_PARATR_NUMRULE, i ) ) &&
@@ -2398,7 +2398,7 @@ sal_Bool SwDoc::IsUsed( const SwNumRule& rRule ) const
// }
// else if( ((SwTxtNode*)pMod)->GetNodes().IsDocNodes() )
// {
-// bUsed = TRUE;
+// bUsed = sal_True;
// break;
// }
// }
@@ -2414,12 +2414,12 @@ sal_Bool SwDoc::IsUsed( const SwNumRule& rRule ) const
// Suche die Position vom Vorlagen-Namen. Ist nicht vorhanden
// dann fuege neu ein
-USHORT SwDoc::SetDocPattern( const String& rPatternName )
+sal_uInt16 SwDoc::SetDocPattern( const String& rPatternName )
{
ASSERT( rPatternName.Len(), "kein Dokument-Vorlagenname" );
- USHORT nNewPos = aPatternNms.Count();
- for( USHORT n = 0; n < aPatternNms.Count(); ++n )
+ sal_uInt16 nNewPos = aPatternNms.Count();
+ for( sal_uInt16 n = 0; n < aPatternNms.Count(); ++n )
if( !aPatternNms[n] )
{
if( nNewPos == aPatternNms.Count() )
@@ -2437,9 +2437,9 @@ USHORT SwDoc::SetDocPattern( const String& rPatternName )
return nNewPos;
}
-USHORT GetPoolParent( USHORT nId )
+sal_uInt16 GetPoolParent( sal_uInt16 nId )
{
- USHORT nRet = USHRT_MAX;
+ sal_uInt16 nRet = USHRT_MAX;
if( POOLGRP_NOCOLLID & nId ) // 1 == Formate / 0 == Collections
{
switch( ( COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID ) & nId )
@@ -2572,7 +2572,7 @@ void SwDoc::RemoveAllFmtLanguageDependencies()
SwTxtFmtColl * pTxtFmtColl = GetTxtCollFromPool( RES_POOLCOLL_STANDARD );
pTxtFmtColl->ResetFmtAttr( RES_PARATR_ADJUST );
- /* #111214# koreans do not like SvxScriptItem(TRUE) */
+ /* #111214# koreans do not like SvxScriptItem(sal_True) */
pTxtFmtColl->ResetFmtAttr( RES_PARATR_SCRIPTSPACE );
SvxFrameDirectionItem aFrameDir( FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR );
diff --git a/sw/source/core/doc/sortopt.cxx b/sw/source/core/doc/sortopt.cxx
index 51cf1d4bca93..e845ec6f6897 100644
--- a/sw/source/core/doc/sortopt.cxx
+++ b/sw/source/core/doc/sortopt.cxx
@@ -43,11 +43,11 @@ SV_IMPL_PTRARR(SwSortKeys, SwSortKey*)
SwSortKey::SwSortKey() :
eSortOrder( SRT_ASCENDING ),
nColumnId( 0 ),
- bIsNumeric( TRUE )
+ bIsNumeric( sal_True )
{
}
-SwSortKey::SwSortKey(USHORT nId, const String& rSrtType, SwSortOrder eOrder) :
+SwSortKey::SwSortKey(sal_uInt16 nId, const String& rSrtType, SwSortOrder eOrder) :
sSortType( rSrtType ),
eSortOrder( eOrder ),
nColumnId( nId ),
@@ -73,8 +73,8 @@ SwSortOptions::SwSortOptions()
: eDirection( SRT_ROWS ),
cDeli( 9 ),
nLanguage( LANGUAGE_SYSTEM ),
- bTable( FALSE ),
- bIgnoreCase( FALSE )
+ bTable( sal_False ),
+ bIgnoreCase( sal_False )
{
}
@@ -86,7 +86,7 @@ SwSortOptions::SwSortOptions(const SwSortOptions& rOpt) :
bTable( rOpt.bTable ),
bIgnoreCase( rOpt.bIgnoreCase )
{
- for( USHORT i=0; i < rOpt.aKeys.Count(); ++i )
+ for( sal_uInt16 i=0; i < rOpt.aKeys.Count(); ++i )
{
SwSortKey* pNew = new SwSortKey(*rOpt.aKeys[i]);
aKeys.C40_INSERT( SwSortKey, pNew, aKeys.Count());
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx
index e40b82d673b7..7903bffa2309 100644
--- a/sw/source/core/doc/swserv.cxx
+++ b/sw/source/core/doc/swserv.cxx
@@ -54,10 +54,10 @@ SwServerObject::~SwServerObject()
}
-BOOL SwServerObject::GetData( uno::Any & rData,
- const String & rMimeType, BOOL )
+sal_Bool SwServerObject::GetData( uno::Any & rData,
+ const String & rMimeType, sal_Bool )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
WriterRef xWrt;
switch( SotExchange::GetFormatIdFromMimeType( rMimeType ) )
{
@@ -104,14 +104,14 @@ BOOL SwServerObject::GetData( uno::Any & rData,
{
// Stream anlegen
SvMemoryStream aMemStm( 65535, 65535 );
- SwWriter aWrt( aMemStm, *pPam, FALSE );
+ SwWriter aWrt( aMemStm, *pPam, sal_False );
if( !IsError( aWrt.Write( xWrt )) )
{
aMemStm << '\0'; // append a zero char
rData <<= uno::Sequence< sal_Int8 >(
(sal_Int8*)aMemStm.GetData(),
aMemStm.Seek( STREAM_SEEK_TO_END ) );
- bRet = TRUE;
+ bRet = sal_True;
}
delete pPam;
@@ -121,11 +121,11 @@ BOOL SwServerObject::GetData( uno::Any & rData,
}
-BOOL SwServerObject::SetData( const String & ,
+sal_Bool SwServerObject::SetData( const String & ,
const uno::Any& )
{
// set new data into the "server" -> at first nothing to do
- return FALSE;
+ return sal_False;
}
@@ -134,7 +134,7 @@ void SwServerObject::SendDataChanged( const SwPosition& rPos )
// ist an unseren Aenderungen jemand interessiert ?
if( HasDataLinks() )
{
- int bCall = FALSE;
+ int bCall = sal_False;
const SwStartNode* pNd = 0;
switch( eType )
{
@@ -152,7 +152,7 @@ void SwServerObject::SendDataChanged( const SwPosition& rPos )
}
if( pNd )
{
- ULONG nNd = rPos.nNode.GetIndex();
+ sal_uLong nNd = rPos.nNode.GetIndex();
bCall = pNd->GetIndex() < nNd && nNd < pNd->EndOfSectionIndex();
}
@@ -175,7 +175,7 @@ void SwServerObject::SendDataChanged( const SwPaM& rRange )
// ist an unseren Aenderungen jemand interessiert ?
if( HasDataLinks() )
{
- int bCall = FALSE;
+ int bCall = sal_False;
const SwStartNode* pNd = 0;
const SwPosition* pStt = rRange.Start(), *pEnd = rRange.End();
switch( eType )
@@ -213,9 +213,9 @@ void SwServerObject::SendDataChanged( const SwPaM& rRange )
}
-BOOL SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
+sal_Bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
{
- ULONG nSttNd = 0, nEndNd = 0;
+ sal_uLong nSttNd = 0, nEndNd = 0;
xub_StrLen nStt = 0;
xub_StrLen nEnd = 0;
const SwNode* pNd = 0;
@@ -241,7 +241,7 @@ BOOL SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
case SECTION_SERVER: pNd = CNTNT_TYPE.pSectNd; break;
case SECTION_SERVER+1:
- return TRUE;
+ return sal_True;
}
if( pNd )
@@ -265,7 +265,7 @@ if( !pChkLnk )
// #41723#
// *((int*)&eType) = SECTION_SERVER+1;
((SwServerObject*)this)->eType = NONE_SERVER;
- for( USHORT n = rLnks.Count(); n; )
+ for( sal_uInt16 n = rLnks.Count(); n; )
{
const ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]);
if( pLnk && OBJECT_CLIENT_GRF != pLnk->GetObjType() &&
@@ -277,7 +277,7 @@ if( !pChkLnk )
{
if( pLnk == pChkLnk ||
((SwBaseLink*)pLnk)->IsRecursion( pChkLnk ) )
- return TRUE;
+ return sal_True;
}
else if( ((SwBaseLink*)pLnk)->IsRecursion( (SwBaseLink*)pLnk ) )
((SwBaseLink*)pLnk)->SetNoDataFlag();
@@ -288,7 +288,7 @@ if( !pChkLnk )
((SwServerObject*)this)->eType = eSave;
}
- return FALSE;
+ return sal_False;
}
void SwServerObject::SetNoServer()
@@ -322,7 +322,7 @@ void SwServerObject::SetDdeBookmark( ::sw::mark::IMark& rBookmark)
/* */
-SwDataChanged::SwDataChanged( const SwPaM& rPam, USHORT nTyp )
+SwDataChanged::SwDataChanged( const SwPaM& rPam, sal_uInt16 nTyp )
: pPam( &rPam ), pPos( 0 ), pDoc( rPam.GetDoc() ), nType( nTyp )
{
nNode = rPam.GetPoint()->nNode.GetIndex();
@@ -330,7 +330,7 @@ SwDataChanged::SwDataChanged( const SwPaM& rPam, USHORT nTyp )
}
-SwDataChanged::SwDataChanged( SwDoc* pDc, const SwPosition& rPos, USHORT nTyp )
+SwDataChanged::SwDataChanged( SwDoc* pDc, const SwPosition& rPos, sal_uInt16 nTyp )
: pPam( 0 ), pPos( &rPos ), pDoc( pDc ), nType( nTyp )
{
nNode = rPos.nNode.GetIndex();
@@ -345,7 +345,7 @@ SwDataChanged::~SwDataChanged()
{
const ::sfx2::SvLinkSources& rServers = pDoc->GetLinkManager().GetServers();
- for( USHORT nCnt = rServers.Count(); nCnt; )
+ for( sal_uInt16 nCnt = rServers.Count(); nCnt; )
{
::sfx2::SvLinkSourceRef refObj( rServers[ --nCnt ] );
// noch jemand am Object interessiert ?
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 7633f92e7867..647acfe9d9a4 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -53,43 +53,43 @@
#include <SwStyleNameMapper.hxx>
// bis SO5PF
-const USHORT AUTOFORMAT_ID_X = 9501;
-const USHORT AUTOFORMAT_ID_358 = 9601;
-const USHORT AUTOFORMAT_DATA_ID_X = 9502;
+const sal_uInt16 AUTOFORMAT_ID_X = 9501;
+const sal_uInt16 AUTOFORMAT_ID_358 = 9601;
+const sal_uInt16 AUTOFORMAT_DATA_ID_X = 9502;
// ab SO5
//! in nachfolgenden Versionen muss der Betrag dieser IDs groesser sein
-const USHORT AUTOFORMAT_ID_504 = 9801;
-const USHORT AUTOFORMAT_DATA_ID_504 = 9802;
+const sal_uInt16 AUTOFORMAT_ID_504 = 9801;
+const sal_uInt16 AUTOFORMAT_DATA_ID_504 = 9802;
-const USHORT AUTOFORMAT_ID_552 = 9901;
-const USHORT AUTOFORMAT_DATA_ID_552 = 9902;
+const sal_uInt16 AUTOFORMAT_ID_552 = 9901;
+const sal_uInt16 AUTOFORMAT_DATA_ID_552 = 9902;
// --- from 641 on: CJK and CTL font settings
-const USHORT AUTOFORMAT_ID_641 = 10001;
-const USHORT AUTOFORMAT_DATA_ID_641 = 10002;
+const sal_uInt16 AUTOFORMAT_ID_641 = 10001;
+const sal_uInt16 AUTOFORMAT_DATA_ID_641 = 10002;
// --- from 680/dr14 on: diagonal frame lines
-const USHORT AUTOFORMAT_ID_680DR14 = 10011;
-const USHORT AUTOFORMAT_DATA_ID_680DR14 = 10012;
+const sal_uInt16 AUTOFORMAT_ID_680DR14 = 10011;
+const sal_uInt16 AUTOFORMAT_DATA_ID_680DR14 = 10012;
// --- from 680/dr25 on: #21549# store strings as UTF-8
-const USHORT AUTOFORMAT_ID_680DR25 = 10021;
-const USHORT AUTOFORMAT_DATA_ID_680DR25 = 10022;
+const sal_uInt16 AUTOFORMAT_ID_680DR25 = 10021;
+const sal_uInt16 AUTOFORMAT_DATA_ID_680DR25 = 10022;
// --- from DEV300/overline2 on: #5991# overline
-const USHORT AUTOFORMAT_ID_300OVRLN = 10031;
-const USHORT AUTOFORMAT_DATA_ID_300OVRLN = 10032;
+const sal_uInt16 AUTOFORMAT_ID_300OVRLN = 10031;
+const sal_uInt16 AUTOFORMAT_DATA_ID_300OVRLN = 10032;
// current version
-const USHORT AUTOFORMAT_ID = AUTOFORMAT_ID_300OVRLN;
-const USHORT AUTOFORMAT_DATA_ID = AUTOFORMAT_DATA_ID_300OVRLN;
+const sal_uInt16 AUTOFORMAT_ID = AUTOFORMAT_ID_300OVRLN;
+const sal_uInt16 AUTOFORMAT_DATA_ID = AUTOFORMAT_DATA_ID_300OVRLN;
#ifdef READ_OLDVERS
-const USHORT AUTOFORMAT_OLD_ID = 8201;
-const USHORT AUTOFORMAT_OLD_ID1 = 8301;
-const USHORT AUTOFORMAT_OLD_DATA_ID = 8202;
+const sal_uInt16 AUTOFORMAT_OLD_ID = 8201;
+const sal_uInt16 AUTOFORMAT_OLD_ID1 = 8301;
+const sal_uInt16 AUTOFORMAT_OLD_DATA_ID = 8202;
#endif
@@ -106,34 +106,34 @@ SV_IMPL_PTRARR( _SwTableAutoFmtTbl, SwTableAutoFmt* )
struct SwAfVersions
{
public:
- USHORT nFontVersion;
- USHORT nFontHeightVersion;
- USHORT nWeightVersion;
- USHORT nPostureVersion;
- USHORT nUnderlineVersion;
- USHORT nOverlineVersion;
- USHORT nCrossedOutVersion;
- USHORT nContourVersion;
- USHORT nShadowedVersion;
- USHORT nColorVersion;
- USHORT nBoxVersion;
- USHORT nLineVersion;
- USHORT nBrushVersion;
-
- USHORT nAdjustVersion;
-
- USHORT nHorJustifyVersion;
- USHORT nVerJustifyVersion;
- USHORT nOrientationVersion;
- USHORT nMarginVersion;
- USHORT nBoolVersion;
- USHORT nInt32Version;
- USHORT nRotateModeVersion;
-
- USHORT nNumFmtVersion;
+ sal_uInt16 nFontVersion;
+ sal_uInt16 nFontHeightVersion;
+ sal_uInt16 nWeightVersion;
+ sal_uInt16 nPostureVersion;
+ sal_uInt16 nUnderlineVersion;
+ sal_uInt16 nOverlineVersion;
+ sal_uInt16 nCrossedOutVersion;
+ sal_uInt16 nContourVersion;
+ sal_uInt16 nShadowedVersion;
+ sal_uInt16 nColorVersion;
+ sal_uInt16 nBoxVersion;
+ sal_uInt16 nLineVersion;
+ sal_uInt16 nBrushVersion;
+
+ sal_uInt16 nAdjustVersion;
+
+ sal_uInt16 nHorJustifyVersion;
+ sal_uInt16 nVerJustifyVersion;
+ sal_uInt16 nOrientationVersion;
+ sal_uInt16 nMarginVersion;
+ sal_uInt16 nBoolVersion;
+ sal_uInt16 nInt32Version;
+ sal_uInt16 nRotateModeVersion;
+
+ sal_uInt16 nNumFmtVersion;
SwAfVersions();
- void Load( SvStream& rStream, USHORT nVer );
+ void Load( SvStream& rStream, sal_uInt16 nVer );
};
SwAfVersions::SwAfVersions() :
@@ -162,7 +162,7 @@ SwAfVersions::SwAfVersions() :
{
}
-void SwAfVersions::Load( SvStream& rStream, USHORT nVer )
+void SwAfVersions::Load( SvStream& rStream, sal_uInt16 nVer )
{
rStream >> nFontVersion;
rStream >> nFontHeightVersion;
@@ -328,7 +328,7 @@ SwBoxAutoFmt& SwBoxAutoFmt::operator=( const SwBoxAutoFmt& rNew )
aItem = *(aItemType*)pNew; \
delete pNew;
-BOOL SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, USHORT nVer )
+sal_Bool SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, sal_uInt16 nVer )
{
SfxPoolItem* pNew;
SvxOrientationItem aOrientation( SVX_ORIENTATION_STANDARD, 0);
@@ -399,7 +399,7 @@ BOOL SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, USHOR
if( 0 == rVersions.nNumFmtVersion )
{
- USHORT eSys, eLge;
+ sal_uInt16 eSys, eLge;
// --- from 680/dr25 on: #21549# store strings as UTF-8
CharSet eCharSet = (nVer >= AUTOFORMAT_ID_680DR25) ? RTL_TEXTENCODING_UTF8 : rStream.GetStreamCharSet();
rStream.ReadByteString( sNumFmtString, eCharSet )
@@ -418,7 +418,7 @@ BOOL SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, USHOR
#ifdef READ_OLDVERS
-BOOL SwBoxAutoFmt::LoadOld( SvStream& rStream, USHORT aLoadVer[] )
+sal_Bool SwBoxAutoFmt::LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] )
{
SfxPoolItem* pNew;
READ( aFont, SvxFontItem , 0)
@@ -448,7 +448,7 @@ BOOL SwBoxAutoFmt::LoadOld( SvStream& rStream, USHORT aLoadVer[] )
#endif
-BOOL SwBoxAutoFmt::Save( SvStream& rStream ) const
+sal_Bool SwBoxAutoFmt::Save( SvStream& rStream ) const
{
SvxOrientationItem aOrientation( aRotateAngle.GetValue(), aStacked.GetValue(), 0 );
@@ -488,13 +488,13 @@ BOOL SwBoxAutoFmt::Save( SvStream& rStream ) const
// --- from 680/dr25 on: #21549# store strings as UTF-8
rStream.WriteByteString( sNumFmtString, RTL_TEXTENCODING_UTF8 )
- << (USHORT)eSysLanguage << (USHORT)eNumFmtLanguage;
+ << (sal_uInt16)eSysLanguage << (sal_uInt16)eNumFmtLanguage;
return 0 == rStream.GetError();
}
-BOOL SwBoxAutoFmt::SaveVerionNo( SvStream& rStream ) const
+sal_Bool SwBoxAutoFmt::SaveVerionNo( SvStream& rStream ) const
{
rStream << aFont.GetVersion( SOFFICE_FILEFORMAT_40 );
rStream << aHeight.GetVersion( SOFFICE_FILEFORMAT_40 );
@@ -520,7 +520,7 @@ BOOL SwBoxAutoFmt::SaveVerionNo( SvStream& rStream ) const
rStream << aRotateAngle.GetVersion( SOFFICE_FILEFORMAT_40 );
rStream << aRotateMode.GetVersion( SOFFICE_FILEFORMAT_40 );
- rStream << (USHORT)0; // NumberFormat
+ rStream << (sal_uInt16)0; // NumberFormat
return 0 == rStream.GetError();
}
@@ -531,12 +531,12 @@ BOOL SwBoxAutoFmt::SaveVerionNo( SvStream& rStream ) const
SwTableAutoFmt::SwTableAutoFmt( const String& rName )
: aName( rName ), nStrResId( USHRT_MAX )
{
- bInclFont = TRUE;
- bInclJustify = TRUE;
- bInclFrame = TRUE;
- bInclBackground = TRUE;
- bInclValueFormat = TRUE;
- bInclWidthHeight = TRUE;
+ bInclFont = sal_True;
+ bInclJustify = sal_True;
+ bInclFrame = sal_True;
+ bInclBackground = sal_True;
+ bInclValueFormat = sal_True;
+ bInclWidthHeight = sal_True;
memset( aBoxAutoFmt, 0, sizeof( aBoxAutoFmt ) );
}
@@ -544,14 +544,14 @@ SwTableAutoFmt::SwTableAutoFmt( const String& rName )
SwTableAutoFmt::SwTableAutoFmt( const SwTableAutoFmt& rNew )
{
- for( BYTE n = 0; n < 16; ++n )
+ for( sal_uInt8 n = 0; n < 16; ++n )
aBoxAutoFmt[ n ] = 0;
*this = rNew;
}
SwTableAutoFmt& SwTableAutoFmt::operator=( const SwTableAutoFmt& rNew )
{
- for( BYTE n = 0; n < 16; ++n )
+ for( sal_uInt8 n = 0; n < 16; ++n )
{
if( aBoxAutoFmt[ n ] )
delete aBoxAutoFmt[ n ];
@@ -579,13 +579,13 @@ SwTableAutoFmt& SwTableAutoFmt::operator=( const SwTableAutoFmt& rNew )
SwTableAutoFmt::~SwTableAutoFmt()
{
SwBoxAutoFmt** ppFmt = aBoxAutoFmt;
- for( BYTE n = 0; n < 16; ++n, ++ppFmt )
+ for( sal_uInt8 n = 0; n < 16; ++n, ++ppFmt )
if( *ppFmt )
delete *ppFmt;
}
-void SwTableAutoFmt::SetBoxFmt( const SwBoxAutoFmt& rNew, BYTE nPos )
+void SwTableAutoFmt::SetBoxFmt( const SwBoxAutoFmt& rNew, sal_uInt8 nPos )
{
ASSERT( nPos < 16, "falscher Bereich" );
@@ -597,7 +597,7 @@ void SwTableAutoFmt::SetBoxFmt( const SwBoxAutoFmt& rNew, BYTE nPos )
}
-const SwBoxAutoFmt& SwTableAutoFmt::GetBoxFmt( BYTE nPos ) const
+const SwBoxAutoFmt& SwTableAutoFmt::GetBoxFmt( sal_uInt8 nPos ) const
{
ASSERT( nPos < 16, "falscher Bereich" );
@@ -615,7 +615,7 @@ const SwBoxAutoFmt& SwTableAutoFmt::GetBoxFmt( BYTE nPos ) const
-SwBoxAutoFmt& SwTableAutoFmt::UpdateFromSet( BYTE nPos,
+SwBoxAutoFmt& SwTableAutoFmt::UpdateFromSet( sal_uInt8 nPos,
const SfxItemSet& rSet,
UpdateFlags eFlags,
SvNumberFormatter* pNFmtr )
@@ -661,7 +661,7 @@ SwBoxAutoFmt& SwTableAutoFmt::UpdateFromSet( BYTE nPos,
const SwTblBoxNumFormat* pNumFmtItem;
const SvNumberformat* pNumFormat = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, TRUE,
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, sal_True,
(const SfxPoolItem**)&pNumFmtItem ) && pNFmtr &&
0 != (pNumFormat = pNFmtr->GetEntry( pNumFmtItem->GetValue() )) )
pFmt->SetValueFormat( ((SvNumberformat*)pNumFormat)->GetFormatstring(),
@@ -680,7 +680,7 @@ SwBoxAutoFmt& SwTableAutoFmt::UpdateFromSet( BYTE nPos,
}
-void SwTableAutoFmt::UpdateToSet( BYTE nPos, SfxItemSet& rSet,
+void SwTableAutoFmt::UpdateToSet( sal_uInt8 nPos, SfxItemSet& rSet,
UpdateFlags eFlags, SvNumberFormatter* pNFmtr ) const
{
const SwBoxAutoFmt& rChg = GetBoxFmt( nPos );
@@ -753,7 +753,7 @@ void SwTableAutoFmt::UpdateToSet( BYTE nPos, SfxItemSet& rSet,
if( sFmt.Len() )
{
short nType;
- BOOL bNew;
+ sal_Bool bNew;
xub_StrLen nCheckPos;
sal_uInt32 nKey = pNFmtr->GetIndexPuttingAndConverting( sFmt, eLng,
eSys, nType, bNew, nCheckPos);
@@ -768,24 +768,24 @@ void SwTableAutoFmt::UpdateToSet( BYTE nPos, SfxItemSet& rSet,
}
-BOOL SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions )
+sal_Bool SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions )
{
- BOOL bRet = TRUE;
- USHORT nVal = 0;
+ sal_Bool bRet = sal_True;
+ sal_uInt16 nVal = 0;
rStream >> nVal;
bRet = 0 == rStream.GetError();
if( bRet && (nVal == AUTOFORMAT_DATA_ID_X ||
(AUTOFORMAT_DATA_ID_504 <= nVal && nVal <= AUTOFORMAT_DATA_ID)) )
{
- BOOL b;
+ sal_Bool b;
// --- from 680/dr25 on: #21549# store strings as UTF-8
CharSet eCharSet = (nVal >= AUTOFORMAT_ID_680DR25) ? RTL_TEXTENCODING_UTF8 : rStream.GetStreamCharSet();
rStream.ReadByteString( aName, eCharSet );
if( AUTOFORMAT_DATA_ID_552 <= nVal )
{
rStream >> nStrResId;
- USHORT nId = RID_SVXSTR_TBLAFMT_BEGIN + nStrResId;
+ sal_uInt16 nId = RID_SVXSTR_TBLAFMT_BEGIN + nStrResId;
if( RID_SVXSTR_TBLAFMT_BEGIN <= nId &&
nId < RID_SVXSTR_TBLAFMT_END )
{
@@ -803,7 +803,7 @@ BOOL SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions )
bRet = 0 == rStream.GetError();
- for( BYTE i = 0; i < 16; ++i )
+ for( sal_uInt8 i = 0; i < 16; ++i )
{
SwBoxAutoFmt* pFmt = new SwBoxAutoFmt;
bRet = pFmt->Load( rStream, rVersions, nVal );
@@ -821,16 +821,16 @@ BOOL SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions )
#ifdef READ_OLDVERS
-BOOL SwTableAutoFmt::LoadOld( SvStream& rStream, USHORT aLoadVer[] )
+sal_Bool SwTableAutoFmt::LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] )
{
- BOOL bRet = TRUE;
- USHORT nVal = 0;
+ sal_Bool bRet = sal_True;
+ sal_uInt16 nVal = 0;
rStream >> nVal;
bRet = 0 == rStream.GetError();
if( bRet && ( AUTOFORMAT_OLD_DATA_ID == nVal ))
{
- BOOL b;
+ sal_Bool b;
rStream.ReadByteString( aName, rStream.GetStreamCharSet() );
rStream >> b; bInclFont = b;
rStream >> b; bInclJustify = b;
@@ -856,10 +856,10 @@ BOOL SwTableAutoFmt::LoadOld( SvStream& rStream, USHORT aLoadVer[] )
#endif
-BOOL SwTableAutoFmt::Save( SvStream& rStream ) const
+sal_Bool SwTableAutoFmt::Save( SvStream& rStream ) const
{
- USHORT nVal = AUTOFORMAT_DATA_ID;
- BOOL b;
+ sal_uInt16 nVal = AUTOFORMAT_DATA_ID;
+ sal_Bool b;
rStream << nVal;
// --- from 680/dr25 on: #21549# store strings as UTF-8
rStream.WriteByteString( aName, RTL_TEXTENCODING_UTF8 );
@@ -871,7 +871,7 @@ BOOL SwTableAutoFmt::Save( SvStream& rStream ) const
rStream << ( b = bInclValueFormat );
rStream << ( b = bInclWidthHeight );
- BOOL bRet = 0 == rStream.GetError();
+ sal_Bool bRet = 0 == rStream.GetError();
for( int i = 0; bRet && i < 16; ++i )
{
@@ -897,7 +897,7 @@ SwTableAutoFmtTbl::SwTableAutoFmtTbl()
SwBoxAutoFmt aNew;
- BYTE i;
+ sal_uInt8 i;
Color aColor( COL_BLUE );
SvxBrushItem aBrushItem( aColor, RES_BACKGROUND );
@@ -947,39 +947,39 @@ SwTableAutoFmtTbl::SwTableAutoFmtTbl()
Insert( pNew, Count() );
}
-BOOL SwTableAutoFmtTbl::Load()
+sal_Bool SwTableAutoFmtTbl::Load()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sNm( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( sAutoTblFmtName )));
SvtPathOptions aOpt;
if( aOpt.SearchFile( sNm, SvtPathOptions::PATH_USERCONFIG ))
{
- SfxMedium aStream( sNm, STREAM_STD_READ, TRUE );
+ SfxMedium aStream( sNm, STREAM_STD_READ, sal_True );
bRet = Load( *aStream.GetInStream() );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
-BOOL SwTableAutoFmtTbl::Save() const
+sal_Bool SwTableAutoFmtTbl::Save() const
{
SvtPathOptions aPathOpt;
String sNm( aPathOpt.GetUserConfigPath() );
sNm += INET_PATH_TOKEN;
sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( sAutoTblFmtName ));
- SfxMedium aStream(sNm, STREAM_STD_WRITE, TRUE );
+ SfxMedium aStream(sNm, STREAM_STD_WRITE, sal_True );
return Save( *aStream.GetOutStream() ) && aStream.Commit();
}
-BOOL SwTableAutoFmtTbl::Load( SvStream& rStream )
+sal_Bool SwTableAutoFmtTbl::Load( SvStream& rStream )
{
- BOOL bRet = 0 == rStream.GetError();
+ sal_Bool bRet = 0 == rStream.GetError();
if (bRet)
{
// Achtung hier muss ein allgemeiner Header gelesen werden
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
rStream >> nVal;
bRet = 0 == rStream.GetError();
@@ -990,13 +990,13 @@ BOOL SwTableAutoFmtTbl::Load( SvStream& rStream )
if( nVal == AUTOFORMAT_ID_358 ||
(AUTOFORMAT_ID_504 <= nVal && nVal <= AUTOFORMAT_ID) )
{
- UINT16 nFileVers = SOFFICE_FILEFORMAT_40;
- BYTE nChrSet, nCnt;
+ sal_uInt16 nFileVers = SOFFICE_FILEFORMAT_40;
+ sal_uInt8 nChrSet, nCnt;
long nPos = rStream.Tell();
rStream >> nCnt >> nChrSet;
// if( 4 <= nCnt )
// rStream >> nFileVers;
- if( rStream.Tell() != ULONG(nPos + nCnt) )
+ if( rStream.Tell() != sal_uLong(nPos + nCnt) )
{
ASSERT( !this, "Der Header enthaelt mehr/neuere Daten" );
rStream.Seek( nPos + nCnt );
@@ -1011,12 +1011,12 @@ BOOL SwTableAutoFmtTbl::Load( SvStream& rStream )
aVersions.Load( rStream, nVal ); // Item-Versionen
SwTableAutoFmt* pNew;
- USHORT nAnz = 0;
+ sal_uInt16 nAnz = 0;
rStream >> nAnz;
bRet = 0 == rStream.GetError();
- for( USHORT i = 0; i < nAnz; ++i )
+ for( sal_uInt16 i = 0; i < nAnz; ++i )
{
pNew = new SwTableAutoFmt( aEmptyStr );
bRet = pNew->Load( rStream, aVersions );
@@ -1035,18 +1035,18 @@ BOOL SwTableAutoFmtTbl::Load( SvStream& rStream )
else if( AUTOFORMAT_OLD_ID == nVal || AUTOFORMAT_OLD_ID1 == nVal )
{
SwTableAutoFmt* pNew;
- USHORT nAnz = 0;
+ sal_uInt16 nAnz = 0;
rStream >> nAnz;
- USHORT aArr[ 12 ];
- memset( aArr, 0, 12 * sizeof( USHORT ) );
+ sal_uInt16 aArr[ 12 ];
+ memset( aArr, 0, 12 * sizeof( sal_uInt16 ) );
if( AUTOFORMAT_OLD_ID1 == nVal )
- for( USHORT n = 0; n < 12; ++n )
+ for( sal_uInt16 n = 0; n < 12; ++n )
rStream >> aArr[ n ];
bRet = 0 == rStream.GetError();
- for( USHORT i = 0; i < nAnz; ++i )
+ for( sal_uInt16 i = 0; i < nAnz; ++i )
{
pNew = new SwTableAutoFmt( aEmptyStr );
bRet = pNew->LoadOld( rStream, aArr );
@@ -1068,20 +1068,20 @@ BOOL SwTableAutoFmtTbl::Load( SvStream& rStream )
}
-BOOL SwTableAutoFmtTbl::Save( SvStream& rStream ) const
+sal_Bool SwTableAutoFmtTbl::Save( SvStream& rStream ) const
{
- BOOL bRet = 0 == rStream.GetError();
+ sal_Bool bRet = 0 == rStream.GetError();
if (bRet)
{
rStream.SetVersion( SOFFICE_FILEFORMAT_40 );
// Achtung hier muss ein allgemeiner Header gespeichert werden
- USHORT nVal = AUTOFORMAT_ID;
+ sal_uInt16 nVal = AUTOFORMAT_ID;
rStream << nVal
- << (BYTE)2 // Anzahl von Zeichen des Headers incl. diesem
- << (BYTE)GetStoreCharSet( ::gsl_getSystemTextEncoding() );
-// << (BYTE)4 // Anzahl von Zeichen des Headers incl. diesem
-// << (BYTE)::GetSystemCharSet()
+ << (sal_uInt8)2 // Anzahl von Zeichen des Headers incl. diesem
+ << (sal_uInt8)GetStoreCharSet( ::gsl_getSystemTextEncoding() );
+// << (sal_uInt8)4 // Anzahl von Zeichen des Headers incl. diesem
+// << (sal_uInt8)::GetSystemCharSet()
// << (UNIT16)SOFFICE_FILEFORMAT_NOW;
bRet = 0 == rStream.GetError();
@@ -1089,10 +1089,10 @@ BOOL SwTableAutoFmtTbl::Save( SvStream& rStream ) const
// die VersionsNummer fuer alle Attribute schreiben
(*this)[ 0 ]->GetBoxFmt( 0 ).SaveVerionNo( rStream );
- rStream << (USHORT)(Count() - 1);
+ rStream << (sal_uInt16)(Count() - 1);
bRet = 0 == rStream.GetError();
- for( USHORT i = 1; bRet && i < Count(); ++i )
+ for( sal_uInt16 i = 1; bRet && i < Count(); ++i )
{
SwTableAutoFmt* pFmt = (*this)[ i ];
bRet = pFmt->Save( rStream );
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index e19e60e645df..b7e9b3105e3f 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -52,11 +52,11 @@
#include <fmtfsize.hxx>
#include <list>
-BOOL _FndCntntLine( const SwTableLine*& rpLine, void* pPara );
-BOOL _FndCntntBox( const SwTableBox*& rpBox, void* pPara );
+sal_Bool _FndCntntLine( const SwTableLine*& rpLine, void* pPara );
+sal_Bool _FndCntntBox( const SwTableBox*& rpBox, void* pPara );
void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
SwTable& rDstTbl, SwTableBox* pDstBox,
- BOOL bDelCntnt, SwUndoTblCpyTbl* pUndo );
+ sal_Bool bDelCntnt, SwUndoTblCpyTbl* pUndo );
// The following type will be used by table copy functions to describe
// the structure of tables (or parts of tables).
@@ -68,13 +68,13 @@ namespace
{
SwTableBox* mpBox;
SwTableBox* mpCopy;
- USHORT mnColSpan;
+ sal_uInt16 mnColSpan;
bool mbSelected;
};
typedef std::vector< BoxSpanInfo > BoxStructure;
typedef std::vector< BoxStructure > LineStructure;
- typedef std::list< ULONG > ColumnStructure;
+ typedef std::list< sal_uLong > ColumnStructure;
struct SubBox
{
@@ -90,14 +90,14 @@ namespace
public:
LineStructure maLines;
ColumnStructure maCols;
- USHORT mnStartCol;
- USHORT mnAddLine;
- void addLine( USHORT &rLine, const SwTableBoxes&, const SwSelBoxes*,
+ sal_uInt16 mnStartCol;
+ sal_uInt16 mnAddLine;
+ void addLine( sal_uInt16 &rLine, const SwTableBoxes&, const SwSelBoxes*,
bool bNewModel );
- void addBox( USHORT nLine, const SwSelBoxes*, SwTableBox *pBox,
- ULONG &rnB, USHORT &rnC, ColumnStructure::iterator& rpCl,
+ void addBox( sal_uInt16 nLine, const SwSelBoxes*, SwTableBox *pBox,
+ sal_uLong &rnB, sal_uInt16 &rnC, ColumnStructure::iterator& rpCl,
BoxStructure::iterator& rpSel, bool &rbSel, bool bCover );
- void incColSpan( USHORT nLine, USHORT nCol );
+ void incColSpan( sal_uInt16 nLine, sal_uInt16 nCol );
TableStructure( const SwTable& rTable );
TableStructure( const SwTable& rTable, _FndBox &rFndBox,
const SwSelBoxes& rSelBoxes,
@@ -137,7 +137,7 @@ namespace
rSubTable.insert( pEndLn, aSubLine );
} while( ++nSize < rBox.GetTabLines().Count() );
}
- for( USHORT nLine = 0; nLine < rBox.GetTabLines().Count(); ++nLine )
+ for( sal_uInt16 nLine = 0; nLine < rBox.GetTabLines().Count(); ++nLine )
pStartLn = insertSubLine( rSubTable, *rBox.GetTabLines()[nLine],
pStartLn );
ASSERT( pStartLn == pEndLn, "Sub line confusion" );
@@ -163,7 +163,7 @@ namespace
SubTable::iterator pMax = pStartLn;
++pMax;
SubTable::difference_type nMax = 1;
- for( USHORT nBox = 0; nBox < rLine.GetTabBoxes().Count(); ++nBox )
+ for( sal_uInt16 nBox = 0; nBox < rLine.GetTabBoxes().Count(); ++nBox )
{
SubTable::iterator pTmp = insertSubBox( rSubTable,
*rLine.GetTabBoxes()[nBox], pStartLn, pMax );
@@ -183,8 +183,8 @@ namespace
{
maCols.push_front(0);
const SwTableLines &rLines = rTable.GetTabLines();
- USHORT nCnt = 0;
- for( USHORT nLine = 0; nLine < rLines.Count(); ++nLine )
+ sal_uInt16 nCnt = 0;
+ for( sal_uInt16 nLine = 0; nLine < rLines.Count(); ++nLine )
addLine( nCnt, rLines[nLine]->GetTabBoxes(), 0, rTable.IsNewModel() );
}
@@ -199,8 +199,8 @@ namespace
_FndLines &rFndLines = rFndBox.GetLines();
maCols.push_front(0);
const SwTableLine* pLine = rFndLines[0]->GetLine();
- USHORT nStartLn = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine );
- USHORT nEndLn = nStartLn;
+ sal_uInt16 nStartLn = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine );
+ sal_uInt16 nEndLn = nStartLn;
if( rFndLines.Count() > 1 )
{
pLine = rFndLines[ rFndLines.Count()-1 ]->GetLine();
@@ -210,9 +210,9 @@ namespace
{
const SwTableLines &rLines = rTable.GetTabLines();
if( bNoSelection &&
- (USHORT)nMinSize > nEndLn - nStartLn + 1 )
+ (sal_uInt16)nMinSize > nEndLn - nStartLn + 1 )
{
- USHORT nNewEndLn = nStartLn + (USHORT)nMinSize - 1;
+ sal_uInt16 nNewEndLn = nStartLn + (sal_uInt16)nMinSize - 1;
if( nNewEndLn >= rLines.Count() )
{
mnAddLine = nNewEndLn - rLines.Count() + 1;
@@ -230,8 +230,8 @@ namespace
}
maLines.resize( nEndLn - nStartLn + 1 );
const SwSelBoxes* pSelBoxes = &rSelBoxes;
- USHORT nCnt = 0;
- for( USHORT nLine = nStartLn; nLine <= nEndLn; ++nLine )
+ sal_uInt16 nCnt = 0;
+ for( sal_uInt16 nLine = nStartLn; nLine <= nEndLn; ++nLine )
{
addLine( nCnt, rLines[nLine]->GetTabBoxes(),
pSelBoxes, rTable.IsNewModel() );
@@ -243,7 +243,7 @@ namespace
{
BoxStructure::iterator pC = maLines[0].begin();
BoxStructure::iterator pEnd = maLines[0].end();
- USHORT nIdx = mnStartCol;
+ sal_uInt16 nIdx = mnStartCol;
mnStartCol = 0;
while( nIdx && pC != pEnd )
{
@@ -257,12 +257,12 @@ namespace
}
}
- void TableStructure::addLine( USHORT &rLine, const SwTableBoxes& rBoxes,
+ void TableStructure::addLine( sal_uInt16 &rLine, const SwTableBoxes& rBoxes,
const SwSelBoxes* pSelBoxes, bool bNewModel )
{
bool bComplex = false;
if( !bNewModel )
- for( USHORT nBox = 0; !bComplex && nBox < rBoxes.Count(); ++nBox )
+ for( sal_uInt16 nBox = 0; !bComplex && nBox < rBoxes.Count(); ++nBox )
bComplex = rBoxes[nBox]->GetTabLines().Count() > 0;
if( bComplex )
{
@@ -271,7 +271,7 @@ namespace
aSubTable.push_back( aSubLine );
SubTable::iterator pStartLn = aSubTable.begin();
SubTable::iterator pEndLn = aSubTable.end();
- for( USHORT nBox = 0; nBox < rBoxes.Count(); ++nBox )
+ for( sal_uInt16 nBox = 0; nBox < rBoxes.Count(); ++nBox )
insertSubBox( aSubTable, *rBoxes[nBox], pStartLn, pEndLn );
SubTable::size_type nSize = aSubTable.size();
if( nSize )
@@ -280,8 +280,8 @@ namespace
while( pStartLn != pEndLn )
{
bool bSelected = false;
- ULONG nBorder = 0;
- USHORT nCol = 0;
+ sal_uLong nBorder = 0;
+ sal_uInt16 nCol = 0;
maLines[rLine].reserve( pStartLn->size() );
BoxStructure::iterator pSel = maLines[rLine].end();
ColumnStructure::iterator pCol = maCols.begin();
@@ -301,20 +301,20 @@ namespace
else
{
bool bSelected = false;
- ULONG nBorder = 0;
- USHORT nCol = 0;
+ sal_uLong nBorder = 0;
+ sal_uInt16 nCol = 0;
maLines[rLine].reserve( rBoxes.Count() );
ColumnStructure::iterator pCol = maCols.begin();
BoxStructure::iterator pSel = maLines[rLine].end();
- for( USHORT nBox = 0; nBox < rBoxes.Count(); ++nBox )
+ for( sal_uInt16 nBox = 0; nBox < rBoxes.Count(); ++nBox )
addBox( rLine, pSelBoxes, rBoxes[nBox], nBorder, nCol,
pCol, pSel, bSelected, false );
++rLine;
}
}
- void TableStructure::addBox( USHORT nLine, const SwSelBoxes* pSelBoxes,
- SwTableBox *pBox, ULONG &rnBorder, USHORT &rnCol,
+ void TableStructure::addBox( sal_uInt16 nLine, const SwSelBoxes* pSelBoxes,
+ SwTableBox *pBox, sal_uLong &rnBorder, sal_uInt16 &rnCol,
ColumnStructure::iterator& rpCol, BoxStructure::iterator& rpSel,
bool &rbSelected, bool bCovered )
{
@@ -325,7 +325,7 @@ namespace
aInfo.mbSelected = true;
if( mnStartCol == USHRT_MAX )
{
- mnStartCol = (USHORT)maLines[nLine].size();
+ mnStartCol = (sal_uInt16)maLines[nLine].size();
if( pSelBoxes->Count() < 2 )
{
pSelBoxes = 0;
@@ -336,7 +336,7 @@ namespace
else
aInfo.mbSelected = false;
rnBorder += pBox->GetFrmFmt()->GetFrmSize().GetWidth();
- USHORT nLeftCol = rnCol;
+ sal_uInt16 nLeftCol = rnCol;
while( rpCol != maCols.end() && *rpCol < rnBorder )
{
++rnCol;
@@ -376,10 +376,10 @@ namespace
if( mnAddLine )
{
const SwTableLines &rLines = rTable.GetTabLines();
- USHORT nLineCount = rLines.Count();
+ sal_uInt16 nLineCount = rLines.Count();
if( nLineCount < mnAddLine )
mnAddLine = nLineCount;
- USHORT nLine = (USHORT)maLines.size();
+ sal_uInt16 nLine = (sal_uInt16)maLines.size();
maLines.resize( nLine + mnAddLine );
while( mnAddLine )
{
@@ -390,9 +390,9 @@ namespace
}
}
- void TableStructure::incColSpan( USHORT nLineMax, USHORT nNewCol )
+ void TableStructure::incColSpan( sal_uInt16 nLineMax, sal_uInt16 nNewCol )
{
- for( USHORT nLine = 0; nLine < nLineMax; ++nLine )
+ for( sal_uInt16 nLine = 0; nLine < nLineMax; ++nLine )
{
BoxStructure::iterator pInfo = maLines[nLine].begin();
BoxStructure::iterator pEnd = maLines[nLine].end();
@@ -412,7 +412,7 @@ namespace
return;
LineStructure::const_iterator pCurrLine = pFirstLine;
LineStructure::size_type nLineCount = maLines.size();
- USHORT nFirstStartCol = 0;
+ sal_uInt16 nFirstStartCol = 0;
{
BoxStructure::const_iterator pFirstBox = pFirstLine->begin();
if( pFirstBox != pFirstLine->end() && pFirstBox->mpBox &&
@@ -423,7 +423,7 @@ namespace
{
BoxStructure::const_iterator pFirstBox = pCurrLine->begin();
BoxStructure::const_iterator pLastBox = pCurrLine->end();
- USHORT nCurrStartCol = mnStartCol;
+ sal_uInt16 nCurrStartCol = mnStartCol;
if( pFirstBox != pLastBox )
{
BoxStructure::const_iterator pTmpBox = pLastBox;
@@ -447,7 +447,7 @@ namespace
BoxStructure::const_iterator pCurrBox = pFirstBox;
BoxStructure &rBox = maLines[nLine];
BoxStructure::size_type nBoxCount = rBox.size();
- USHORT nCol = 0;
+ sal_uInt16 nCol = 0;
for( BoxStructure::size_type nBox = 0; nBox < nBoxCount; ++nBox )
{
BoxSpanInfo& rInfo = rBox[nBox];
@@ -504,16 +504,16 @@ namespace
SwTableBox *pBox = rInfo.mpBox;
if( pBox && pBox->getRowSpan() > 0 )
lcl_CpyBox( rSource, rInfo.mpCopy, rDstTbl, pBox,
- TRUE, pUndo );
+ sal_True, pUndo );
/* Idea: If target cell is a covered cell, append content
to master cell.
- BOOL bReplace = TRUE;
+ sal_Bool bReplace = sal_True;
if( pBox->getRowSpan() < 0 )
{
if( rInfo.mpCopy->getRowSpan() < 0 )
continue;
pBox = &pBox->FindStartOfRowSpan( rDstTbl );
- bReplace = FALSE;
+ bReplace = sal_False;
}
lcl_CpyBox( rSource, rInfo.mpCopy, rDstTbl, pBox,
bReplace, pUndo );
@@ -537,7 +537,7 @@ namespace
void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
SwTable& rDstTbl, SwTableBox* pDstBox,
- BOOL bDelCntnt, SwUndoTblCpyTbl* pUndo )
+ sal_Bool bDelCntnt, SwUndoTblCpyTbl* pUndo )
{
ASSERT( ( !pCpyBox || pCpyBox->GetSttNd() ) && pDstBox->GetSttNd(),
"Keine inhaltstragende Box" );
@@ -558,13 +558,13 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
if( pUndo )
pUndo->AddBoxBefore( *pDstBox, bDelCntnt );
- BOOL bUndo = pDoc->DoesUndo();
+ sal_Bool bUndo = pDoc->DoesUndo();
bool bUndoRedline = pUndo && pDoc->IsRedlineOn();
- pDoc->DoUndo( FALSE );
+ pDoc->DoUndo( sal_False );
SwNodeIndex aSavePos( aInsIdx, -1 );
if( pRg.get() )
- pCpyDoc->CopyWithFlyInFly( *pRg, 0, aInsIdx, FALSE );
+ pCpyDoc->CopyWithFlyInFly( *pRg, 0, aInsIdx, sal_False );
else
pDoc->GetNodes().MakeTxtNode( aInsIdx, (SwTxtFmtColl*)pDoc->GetDfltTxtFmtColl() );
aSavePos++;
@@ -573,7 +573,7 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
while( pLine->GetUpper() )
pLine = pLine->GetUpper()->GetUpper();
- BOOL bReplaceColl = TRUE;
+ sal_Bool bReplaceColl = sal_True;
if( bDelCntnt && !bUndoRedline )
{
// zuerst die Fly loeschen, dann die entsprechenden Nodes
@@ -584,11 +584,11 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
SwPosition aMvPos( aInsIdx );
SwCntntNode* pCNd = pDoc->GetNodes().GoPrevious( &aMvPos.nNode );
aMvPos.nContent.Assign( pCNd, pCNd->Len() );
- pDoc->CorrAbs( aInsIdx, aEndNdIdx, aMvPos, /*TRUE*/FALSE );
+ pDoc->CorrAbs( aInsIdx, aEndNdIdx, aMvPos, /*sal_True*/sal_False );
}
// stehen noch FlyFrames rum, loesche auch diese
- for( USHORT n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n )
{
SwFrmFmt *const pFly = (*pDoc->GetSpzFrmFmts())[n];
SwFmtAnchor const*const pAnchor = &pFly->GetAnchor();
@@ -618,7 +618,7 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
/*RES_POOLCOLL_TABLE == */
RES_POOLCOLL_TABLE_HDLN !=
pCNd->GetFmtColl()->GetPoolFmtId() )
- bReplaceColl = FALSE;
+ bReplaceColl = sal_False;
}
pDoc->GetNodes().Delete( aInsIdx, aEndNdIdx.GetIndex() - aInsIdx.GetIndex() );
@@ -632,7 +632,7 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
SwTxtNode* pTxtNd = pDoc->GetNodes()[ aSavePos ]->GetTxtNode();
if( pTxtNd )
{
- USHORT nPoolId = pTxtNd->GetTxtColl()->GetPoolFmtId();
+ sal_uInt16 nPoolId = pTxtNd->GetTxtColl()->GetPoolFmtId();
if( bReplaceColl &&
(( 1 < rDstTbl.GetTabLines().Count() &&
pLine == rDstTbl.GetTabLines()[0] )
@@ -672,12 +672,12 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
if( aBoxAttrSet.Count() )
{
const SfxPoolItem* pItem;
- SvNumberFormatter* pN = pDoc->GetNumberFormatter( FALSE );
+ SvNumberFormatter* pN = pDoc->GetNumberFormatter( sal_False );
if( pN && pN->HasMergeFmtTbl() && SFX_ITEM_SET == aBoxAttrSet.
- GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem ) )
+ GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem ) )
{
- ULONG nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
- ULONG nNewIdx = pN->GetMergeFmtIndex( nOldIdx );
+ sal_uLong nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
+ sal_uLong nNewIdx = pN->GetMergeFmtIndex( nOldIdx );
if( nNewIdx != nOldIdx )
aBoxAttrSet.Put( SwTblBoxNumFormat( nNewIdx ));
}
@@ -689,7 +689,7 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
pDoc->DoUndo( bUndo );
}
-BOOL SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
+sal_Bool SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
SwUndoTblCpyTbl* pUndo )
{
SwDoc* pDoc = GetFrmFmt()->GetDoc();
@@ -716,7 +716,7 @@ BOOL SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( pUndo )
pUndo->InsertRow( *this, aBoxes, aTarget.mnAddLine );
else
- InsertRow( pDoc, aBoxes, aTarget.mnAddLine, TRUE );
+ InsertRow( pDoc, aBoxes, aTarget.mnAddLine, sal_True );
aTarget.moreLines( *this );
bClear = true;
@@ -746,7 +746,7 @@ BOOL SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
// make frames
aFndBox.MakeFrms( *this );
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------
@@ -760,7 +760,7 @@ BOOL SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
// einer "GrundLine"
-BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
+sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
SwUndoTblCpyTbl* pUndo )
{
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -790,10 +790,10 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
SwTblNumFmtMerge aTNFM( *pCpyDoc, *pDoc );
- BOOL bDelCntnt = TRUE;
+ sal_Bool bDelCntnt = sal_True;
const SwTableBox* pTmp;
- for( USHORT nLines = 0; nLines < rCpyTbl.GetTabLines().Count(); ++nLines )
+ for( sal_uInt16 nLines = 0; nLines < rCpyTbl.GetTabLines().Count(); ++nLines )
{
// hole die erste Box von der Copy-Line
const SwTableBox* pCpyBox = rCpyTbl.GetTabLines()[nLines]
@@ -806,25 +806,25 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
// (keine leeren Section erzeugen, werden sonst geloescht!)
lcl_CpyBox( rCpyTbl, pCpyBox, *this, pMyBox, bDelCntnt, pUndo );
- if( 0 == (pTmp = pCpyBox->FindNextBox( rCpyTbl, pCpyBox, FALSE )))
+ if( 0 == (pTmp = pCpyBox->FindNextBox( rCpyTbl, pCpyBox, sal_False )))
break; // es folgt keine weitere Box mehr
pCpyBox = pTmp;
- if( 0 == ( pTmp = pMyBox->FindNextBox( *this, pMyBox, FALSE )))
- bDelCntnt = FALSE; // kein Platz mehr ??
+ if( 0 == ( pTmp = pMyBox->FindNextBox( *this, pMyBox, sal_False )))
+ bDelCntnt = sal_False; // kein Platz mehr ??
else
pMyBox = (SwTableBox*)pTmp;
- } while( TRUE );
+ } while( sal_True );
// suche die oberste Line
SwTableLine* pNxtLine = pMyBox->GetUpper();
while( pNxtLine->GetUpper() )
pNxtLine = pNxtLine->GetUpper()->GetUpper();
- USHORT nPos = GetTabLines().C40_GETPOS( SwTableLine, pNxtLine );
+ sal_uInt16 nPos = GetTabLines().C40_GETPOS( SwTableLine, pNxtLine );
// gibt es eine naechste ??
if( nPos + 1 >= GetTabLines().Count() )
- bDelCntnt = FALSE; // es gibt keine, alles in die letzte Box
+ bDelCntnt = sal_False; // es gibt keine, alles in die letzte Box
else
{
// suche die naechste "Inhaltstragende Box"
@@ -832,16 +832,16 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
pMyBox = pNxtLine->GetTabBoxes()[0];
while( pMyBox->GetTabLines().Count() )
pMyBox = pMyBox->GetTabLines()[0]->GetTabBoxes()[0];
- bDelCntnt = TRUE;
+ bDelCntnt = sal_True;
}
}
aFndBox.MakeFrms( pTblNd->GetTable() ); // erzeuge die Frames neu
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
+sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
SwUndoTblCpyTbl* pUndo )
{
ASSERT( rSelBoxes.Count(), "Missing selection" )
@@ -860,7 +860,7 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
SwTableBox *pTmpBox, *pSttBox = (SwTableBox*)rSelBoxes[0];
- USHORT nLn, nBx;
+ sal_uInt16 nLn, nBx;
_FndLine *pFLine, *pInsFLine = 0;
_FndBox aFndBox( 0, 0 );
// suche alle Boxen / Lines
@@ -874,16 +874,16 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( 1 != rCpyTbl.GetTabSortBoxes().Count() )
{
SwTableLine* pSttLine = pSttBox->GetUpper();
- USHORT nSttBox = pSttLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSttBox );
- USHORT nSttLine = GetTabLines().C40_GETPOS( SwTableLine, pSttLine );
+ sal_uInt16 nSttBox = pSttLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSttBox );
+ sal_uInt16 nSttLine = GetTabLines().C40_GETPOS( SwTableLine, pSttLine );
_FndBox* pFndBox;
- USHORT nFndCnt = aFndBox.GetLines().Count();
+ sal_uInt16 nFndCnt = aFndBox.GetLines().Count();
if( !nFndCnt )
- return FALSE;
+ return sal_False;
// teste ob genug Platz fuer die einzelnen Lines und Boxen ist:
- USHORT nTstLns = 0;
+ sal_uInt16 nTstLns = 0;
pFLine = aFndBox.GetLines()[ 0 ];
pSttLine = pFLine->GetLine();
nSttLine = GetTabLines().C40_GETPOS( SwTableLine, pSttLine );
@@ -898,9 +898,9 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
// teste, ob man durch einfuegen neuer zum Ziel kommt. Aber
// nur wenn die SSelection eine Box umfasst !!
if( 1 < rSelBoxes.Count() )
- return FALSE;
+ return sal_False;
- USHORT nNewLns = rCpyTbl.GetTabLines().Count() -
+ sal_uInt16 nNewLns = rCpyTbl.GetTabLines().Count() -
(GetTabLines().Count() - nSttLine );
// Dann teste mal ob die Anzahl der Boxen fuer die Lines reicht
@@ -908,7 +908,7 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
pSttBox = pFLine->GetBoxes()[0]->GetBox();
nSttBox = pFLine->GetLine()->GetTabBoxes().C40_GETPOS( SwTableBox, pSttBox );
- for( USHORT n = rCpyTbl.GetTabLines().Count() - nNewLns;
+ for( sal_uInt16 n = rCpyTbl.GetTabLines().Count() - nNewLns;
n < rCpyTbl.GetTabLines().Count(); ++n )
{
SwTableLine* pCpyLn = rCpyTbl.GetTabLines()[ n ];
@@ -916,13 +916,13 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( pLastLn->GetTabBoxes().Count() < nSttBox ||
( pLastLn->GetTabBoxes().Count() - nSttBox ) <
pCpyLn->GetTabBoxes().Count() )
- return FALSE;
+ return sal_False;
// Test auf Verschachtelungen
for( nBx = 0; nBx < pCpyLn->GetTabBoxes().Count(); ++nBx )
if( !( pTmpBox = pLastLn->GetTabBoxes()[ nSttBox + nBx ])
->GetSttNd() )
- return FALSE;
+ return sal_False;
}
// es ist also Platz fuer das zu kopierende vorhanden, also
// fuege entsprechend neue Zeilen ein.
@@ -933,10 +933,10 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( pUndo
? !pUndo->InsertRow( *this, SelLineFromBox( pInsBox,
- aBoxes, TRUE ), nNewLns )
+ aBoxes, sal_True ), nNewLns )
: !InsertRow( pDoc, SelLineFromBox( pInsBox,
- aBoxes, TRUE ), nNewLns, TRUE ) )
- return FALSE;
+ aBoxes, sal_True ), nNewLns, sal_True ) )
+ return sal_False;
}
nTstLns = rCpyTbl.GetTabLines().Count(); // soviele Kopieren
@@ -944,7 +944,7 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
else if( 0 == (nFndCnt % rCpyTbl.GetTabLines().Count()) )
nTstLns = nFndCnt;
else
- return FALSE; // kein Platz fuer die Zeilen
+ return sal_False; // kein Platz fuer die Zeilen
for( nLn = 0; nLn < nTstLns; ++nLn )
{
@@ -971,14 +971,14 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( pLine->GetTabBoxes().Count() < nSttBox ||
( pLine->GetTabBoxes().Count() - nSttBox ) <
pFLine->GetBoxes().Count() )
- return FALSE;
+ return sal_False;
// Test auf Verschachtelungen
for( nBx = 0; nBx < pFLine->GetBoxes().Count(); ++nBx )
{
if( !( pTmpBox = pLine->GetTabBoxes()[ nSttBox + nBx ])
->GetSttNd() )
- return FALSE;
+ return sal_False;
// wenn Ok, fuege die Box in die FndLine zu
pFndBox = new _FndBox( pTmpBox, pInsFLine );
pInsFLine->GetBoxes().C40_INSERT( _FndBox, pFndBox, nBx );
@@ -990,14 +990,14 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( pLine->GetTabBoxes().Count() < nSttBox ||
( pLine->GetTabBoxes().Count() - nSttBox ) <
pCpyLn->GetTabBoxes().Count() )
- return FALSE;
+ return sal_False;
// Test auf Verschachtelungen
for( nBx = 0; nBx < pCpyLn->GetTabBoxes().Count(); ++nBx )
{
if( !( pTmpBox = pLine->GetTabBoxes()[ nSttBox + nBx ])
->GetSttNd() )
- return FALSE;
+ return sal_False;
// wenn Ok, fuege die Box in die FndLine zu
if( nBx == pFLine->GetBoxes().Count() )
{
@@ -1012,17 +1012,17 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
// (n-Fach)
if( 0 != ( pFLine->GetBoxes().Count() %
pCpyLn->GetTabBoxes().Count() ))
- return FALSE;
+ return sal_False;
// Test auf Verschachtelungen
for( nBx = 0; nBx < pFLine->GetBoxes().Count(); ++nBx )
if( !pFLine->GetBoxes()[ nBx ]->GetBox()->GetSttNd() )
- return FALSE;
+ return sal_False;
}
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
}
{
@@ -1039,9 +1039,9 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( 1 == rCpyTbl.GetTabSortBoxes().Count() )
{
SwTableBox *pTmpBx = rCpyTbl.GetTabSortBoxes()[0];
- for( USHORT n = 0; n < rSelBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rSelBoxes.Count(); ++n )
lcl_CpyBox( rCpyTbl, pTmpBx, *this,
- (SwTableBox*)rSelBoxes[n], TRUE, pUndo );
+ (SwTableBox*)rSelBoxes[n], sal_True, pUndo );
}
else
for( nLn = 0; nLn < aFndBox.GetLines().Count(); ++nLn )
@@ -1054,37 +1054,37 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
// Kopiere in pMyBox die pCpyBox
lcl_CpyBox( rCpyTbl, pCpyLn->GetTabBoxes()[
nBx % pCpyLn->GetTabBoxes().Count() ],
- *this, pFLine->GetBoxes()[ nBx ]->GetBox(), TRUE, pUndo );
+ *this, pFLine->GetBoxes()[ nBx ]->GetBox(), sal_True, pUndo );
}
}
aFndBox.MakeFrms( *this );
- return TRUE;
+ return sal_True;
}
-BOOL _FndCntntBox( const SwTableBox*& rpBox, void* pPara )
+sal_Bool _FndCntntBox( const SwTableBox*& rpBox, void* pPara )
{
SwTableBox* pBox = (SwTableBox*)rpBox;
if( rpBox->GetTabLines().Count() )
pBox->GetTabLines().ForEach( &_FndCntntLine, pPara );
else
((SwSelBoxes*)pPara)->Insert( pBox );
- return TRUE;
+ return sal_True;
}
-BOOL _FndCntntLine( const SwTableLine*& rpLine, void* pPara )
+sal_Bool _FndCntntLine( const SwTableLine*& rpLine, void* pPara )
{
((SwTableLine*)rpLine)->GetTabBoxes().ForEach( &_FndCntntBox, pPara );
- return TRUE;
+ return sal_True;
}
// suche alle Inhaltstragenden-Boxen dieser Box
SwSelBoxes& SwTable::SelLineFromBox( const SwTableBox* pBox,
- SwSelBoxes& rBoxes, BOOL bToTop ) const
+ SwSelBoxes& rBoxes, sal_Bool bToTop ) const
{
SwTableLine* pLine = (SwTableLine*)pBox->GetUpper();
if( bToTop )
@@ -1092,7 +1092,7 @@ SwSelBoxes& SwTable::SelLineFromBox( const SwTableBox* pBox,
pLine = pLine->GetUpper()->GetUpper();
// alle alten loeschen
- rBoxes.Remove( USHORT(0), rBoxes.Count() );
+ rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
pLine->GetTabBoxes().ForEach( &_FndCntntBox, &rBoxes );
return rBoxes;
}
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index fe5beeb006a0..d36e669ee860 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -102,10 +102,10 @@ struct _CpyTabFrm
_CpyTabFrm& operator=( const _CpyTabFrm& );
- BOOL operator==( const _CpyTabFrm& rCpyTabFrm )
- { return (ULONG)Value.nSize == (ULONG)rCpyTabFrm.Value.nSize; }
- BOOL operator<( const _CpyTabFrm& rCpyTabFrm )
- { return (ULONG)Value.nSize < (ULONG)rCpyTabFrm.Value.nSize; }
+ sal_Bool operator==( const _CpyTabFrm& rCpyTabFrm )
+ { return (sal_uLong)Value.nSize == (sal_uLong)rCpyTabFrm.Value.nSize; }
+ sal_Bool operator<( const _CpyTabFrm& rCpyTabFrm )
+ { return (sal_uLong)Value.nSize < (sal_uLong)rCpyTabFrm.Value.nSize; }
};
struct CR_SetBoxWidth
@@ -118,15 +118,15 @@ struct CR_SetBoxWidth
SwUndoTblNdsChg* pUndo;
SwTwips nDiff, nSide, nMaxSize, nLowerDiff;
TblChgMode nMode;
- USHORT nTblWidth, nRemainWidth, nBoxWidth;
- BOOL bBigger, bLeft, bSplittBox, bAnyBoxFnd;
+ sal_uInt16 nTblWidth, nRemainWidth, nBoxWidth;
+ sal_Bool bBigger, bLeft, bSplittBox, bAnyBoxFnd;
- CR_SetBoxWidth( USHORT eType, SwTwips nDif, SwTwips nSid, SwTwips nTblW,
+ CR_SetBoxWidth( sal_uInt16 eType, SwTwips nDif, SwTwips nSid, SwTwips nTblW,
SwTwips nMax, SwTableNode* pTNd )
: pTblNd( pTNd ),
nDiff( nDif ), nSide( nSid ), nMaxSize( nMax ), nLowerDiff( 0 ),
- nTblWidth( (USHORT)nTblW ), nRemainWidth( 0 ), nBoxWidth( 0 ),
- bSplittBox( FALSE ), bAnyBoxFnd( FALSE )
+ nTblWidth( (sal_uInt16)nTblW ), nRemainWidth( 0 ), nBoxWidth( 0 ),
+ bSplittBox( sal_False ), bAnyBoxFnd( sal_False )
{
bLeft = nsTblChgWidthHeightType::WH_COL_LEFT == ( eType & 0xff ) ||
nsTblChgWidthHeightType::WH_CELL_LEFT == ( eType & 0xff );
@@ -157,20 +157,20 @@ struct CR_SetBoxWidth
nLowerDiff = 0; nRemainWidth = 0;
}
- void AddBoxWidth( const SwTableBox& rBox, USHORT nWidth )
+ void AddBoxWidth( const SwTableBox& rBox, sal_uInt16 nWidth )
{
SwTableLinePtr p = (SwTableLine*)rBox.GetUpper();
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( aLines.Insert( p, nFndPos ))
aLinesWidth.Insert( nWidth, nFndPos );
else
aLinesWidth[ nFndPos ] = aLinesWidth[ nFndPos ] + nWidth;
}
- USHORT GetBoxWidth( const SwTableLine& rLn ) const
+ sal_uInt16 GetBoxWidth( const SwTableLine& rLn ) const
{
SwTableLinePtr p = (SwTableLine*)&rLn;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( aLines.Seek_Entry( p, &nFndPos ) )
nFndPos = aLinesWidth[ nFndPos ];
else
@@ -179,20 +179,20 @@ struct CR_SetBoxWidth
}
};
-BOOL lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_DelSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_DelOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-
-typedef BOOL (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, BOOL );
+sal_Bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_DelSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_DelOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+
+typedef sal_Bool (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, sal_Bool );
#if defined(DBG_UTIL) || defined( JP_DEBUG )
@@ -201,13 +201,13 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize );
#define CHECKBOXWIDTH \
{ \
SwTwips nSize = GetFrmFmt()->GetFrmSize().GetWidth(); \
- for( USHORT nTmp = 0; nTmp < aLines.Count(); ++nTmp ) \
+ for( sal_uInt16 nTmp = 0; nTmp < aLines.Count(); ++nTmp ) \
::_CheckBoxWidth( *aLines[ nTmp ], nSize ); \
}
#define CHECKTABLELAYOUT \
{ \
- for ( USHORT i = 0; i < GetTabLines().Count(); ++i ) \
+ for ( sal_uInt16 i = 0; i < GetTabLines().Count(); ++i ) \
{ \
SwFrmFmt* pFmt = GetTabLines()[i]->GetFrmFmt(); \
SwClientIter aIter( *pFmt ); \
@@ -244,13 +244,13 @@ struct CR_SetLineHeight
SwUndoTblNdsChg* pUndo;
SwTwips nMaxSpace, nMaxHeight;
TblChgMode nMode;
- USHORT nLines;
- BOOL bBigger, bTop, bSplittBox, bAnyBoxFnd;
+ sal_uInt16 nLines;
+ sal_Bool bBigger, bTop, bSplittBox, bAnyBoxFnd;
- CR_SetLineHeight( USHORT eType, SwTableNode* pTNd )
+ CR_SetLineHeight( sal_uInt16 eType, SwTableNode* pTNd )
: pTblNd( pTNd ), pUndo( 0 ),
nMaxSpace( 0 ), nMaxHeight( 0 ), nLines( 0 ),
- bSplittBox( FALSE ), bAnyBoxFnd( FALSE )
+ bSplittBox( sal_False ), bAnyBoxFnd( sal_False )
{
bTop = nsTblChgWidthHeightType::WH_ROW_TOP == ( eType & 0xff ) || nsTblChgWidthHeightType::WH_CELL_TOP == ( eType & 0xff );
bBigger = 0 != (eType & nsTblChgWidthHeightType::WH_FLAG_BIGGER );
@@ -272,14 +272,14 @@ struct CR_SetLineHeight
}
};
-BOOL lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck );
+sal_Bool lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck );
-typedef BOOL (*FN_lcl_SetLineHeight)(SwTableLine*, CR_SetLineHeight&, SwTwips, BOOL );
+typedef sal_Bool (*FN_lcl_SetLineHeight)(SwTableLine*, CR_SetLineHeight&, SwTwips, sal_Bool );
_CpyTabFrm& _CpyTabFrm::operator=( const _CpyTabFrm& rCpyTabFrm )
{
@@ -297,21 +297,21 @@ void lcl_DelCpyTabFrmFmts( _CpyTabFrm& rArr );
struct _CpyPara
{
- boost::shared_ptr< std::vector< std::vector< ULONG > > > pWidths;
+ boost::shared_ptr< std::vector< std::vector< sal_uLong > > > pWidths;
SwDoc* pDoc;
SwTableNode* pTblNd;
_CpyTabFrms& rTabFrmArr;
SwTableLine* pInsLine;
SwTableBox* pInsBox;
- ULONG nOldSize, nNewSize; // zum Korrigieren der Size-Attribute
- ULONG nMinLeft, nMaxRight;
- USHORT nCpyCnt, nInsPos;
- USHORT nLnIdx, nBoxIdx;
- BYTE nDelBorderFlag;
- BOOL bCpyCntnt;
-
- _CpyPara( SwTableNode* pNd, USHORT nCopies, _CpyTabFrms& rFrmArr,
- BOOL bCopyContent = TRUE )
+ sal_uLong nOldSize, nNewSize; // zum Korrigieren der Size-Attribute
+ sal_uLong nMinLeft, nMaxRight;
+ sal_uInt16 nCpyCnt, nInsPos;
+ sal_uInt16 nLnIdx, nBoxIdx;
+ sal_uInt8 nDelBorderFlag;
+ sal_Bool bCpyCntnt;
+
+ _CpyPara( SwTableNode* pNd, sal_uInt16 nCopies, _CpyTabFrms& rFrmArr,
+ sal_Bool bCopyContent = sal_True )
: pDoc( pNd->GetDoc() ), pTblNd( pNd ), rTabFrmArr(rFrmArr),
pInsLine(0), pInsBox(0), nOldSize(0), nNewSize(0),
nMinLeft(ULONG_MAX), nMaxRight(0),
@@ -339,7 +339,7 @@ struct _CpyPara
};
-BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
+sal_Bool lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
@@ -347,7 +347,7 @@ BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
SwTableBox* pBox = (SwTableBox*)rpFndBox->GetBox();
_CpyTabFrm aFindFrm( (SwTableBoxFmt*)pBox->GetFrmFmt() );
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( pCpyPara->nCpyCnt )
{
if( !pCpyPara->rTabFrmArr.Seek_Entry( aFindFrm, &nFndPos ))
@@ -373,7 +373,7 @@ BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
// die erste Line sollte reichen
_FndBoxes& rFndBoxes = pCmpLine->GetBoxes();
long nSz = 0;
- for( USHORT n = rFndBoxes.Count(); n; )
+ for( sal_uInt16 n = rFndBoxes.Count(); n; )
nSz += rFndBoxes[ --n ]->GetBox()->GetFrmFmt()->GetFrmSize().GetWidth();
aFrmSz.SetWidth( aFrmSz.GetWidth() -
nSz / ( pCpyPara->nCpyCnt + 1 ) );
@@ -466,10 +466,10 @@ BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
}
}
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara )
+sal_Bool lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
SwTableLine* pNewLine = new SwTableLine(
@@ -489,13 +489,13 @@ BOOL lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara )
((_FndLine*)rpFndLine)->GetBoxes().ForEach( &lcl_CopyCol, &aPara );
pCpyPara->nDelBorderFlag &= 0xf8;
- return TRUE;
+ return sal_True;
}
//-----------------------------------------------------------
-void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, USHORT nCpyCnt,
- BOOL bBehind )
+void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, sal_uInt16 nCpyCnt,
+ sal_Bool bBehind )
{
// Bug 29124: nicht nur in den Grundlines kopieren. Wenns geht, so weit
// runter wie moeglich.
@@ -504,7 +504,7 @@ void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, USHORT nCpyCnt,
!( pFBox = pFndLn->GetBoxes()[ 0 ] )->GetBox()->GetSttNd() )
{
// eine Box mit mehreren Lines, also in diese Lines einfuegen
- for( USHORT n = 0; n < pFBox->GetLines().Count(); ++n )
+ for( sal_uInt16 n = 0; n < pFBox->GetLines().Count(); ++n )
lcl_InsCol( pFBox->GetLines()[ n ], rCpyPara, nCpyCnt, bBehind );
}
else
@@ -516,7 +516,7 @@ void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, USHORT nCpyCnt,
if( bBehind )
++rCpyPara.nInsPos;
- for( USHORT n = 0; n < nCpyCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCpyCnt; ++n )
{
if( n + 1 == nCpyCnt && bBehind )
rCpyPara.nDelBorderFlag = 9;
@@ -538,14 +538,14 @@ SwRowFrm* GetRowFrm( SwTableLine& rLine )
}
-BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
+sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind )
{
ASSERT( rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
- BOOL bRes = TRUE;
+ sal_Bool bRes = sal_True;
if( IsNewModel() )
bRes = NewInsertCol( pDoc, rBoxes, nCnt, bBehind );
else
@@ -557,7 +557,7 @@ BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOO
GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -571,7 +571,7 @@ BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOO
_CpyTabFrms aTabFrmArr;
_CpyPara aCpyPara( pTblNd, nCnt, aTabFrmArr );
- for( USHORT n = 0; n < aFndBox.GetLines().Count(); ++n )
+ for( sal_uInt16 n = 0; n < aFndBox.GetLines().Count(); ++n )
lcl_InsCol( aFndBox.GetLines()[ n ], aCpyPara, nCnt, bBehind );
// dann raeume die Struktur dieser Line noch mal auf, generell alle
@@ -582,7 +582,7 @@ BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOO
CHECKBOXWIDTH
CHECKTABLELAYOUT
- bRes = TRUE;
+ bRes = sal_True;
}
SwChartDataProvider *pPCD = pDoc->GetChartDataProvider();
@@ -593,13 +593,13 @@ BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOO
return bRes;
}
-BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
- USHORT nCnt, BOOL bBehind )
+sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt, sal_Bool bBehind )
{
ASSERT( pDoc && rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -608,7 +608,7 @@ BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -628,7 +628,7 @@ BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
}
//Lines fuer das Layout-Update herausuchen.
- const BOOL bLayout = !IsNewModel() &&
+ const sal_Bool bLayout = !IsNewModel() &&
0 != SwClientIter( *GetFrmFmt() ).First( TYPE(SwTabFrm) );
if ( bLayout )
@@ -661,7 +661,7 @@ BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
else
aCpyPara.nDelBorderFlag = 2;
- for( USHORT nCpyCnt = 0; nCpyCnt < nCnt; ++nCpyCnt )
+ for( sal_uInt16 nCpyCnt = 0; nCpyCnt < nCnt; ++nCpyCnt )
{
if( bBehind )
aCpyPara.nDelBorderFlag = 1;
@@ -689,12 +689,12 @@ BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pPCD->AddRowCols( *this, rBoxes, nCnt, bBehind );
pDoc->UpdateCharts( GetFrmFmt()->GetName() );
- return TRUE;
+ return sal_True;
}
-BOOL _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara );
+sal_Bool _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara );
-BOOL _FndBoxAppendRowBox( const SwTableBox*& rpBox, void* pPara )
+sal_Bool _FndBoxAppendRowBox( const SwTableBox*& rpBox, void* pPara )
{
_FndPara* pFndPara = (_FndPara*)pPara;
_FndBox* pFndBox = new _FndBox( (SwTableBox*)rpBox, pFndPara->pFndLine );
@@ -708,10 +708,10 @@ BOOL _FndBoxAppendRowBox( const SwTableBox*& rpBox, void* pPara )
else
pFndPara->pFndLine->GetBoxes().C40_INSERT( _FndBox, pFndBox,
pFndPara->pFndLine->GetBoxes().Count() );
- return TRUE;
+ return sal_True;
}
-BOOL _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara )
+sal_Bool _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara )
{
_FndPara* pFndPara = (_FndPara*)pPara;
_FndLine* pFndLine = new _FndLine( (SwTableLine*)rpLine, pFndPara->pFndBox );
@@ -724,15 +724,15 @@ BOOL _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara )
}
else
delete pFndLine;
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
+sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt )
{
SwTableNode* pTblNd = (SwTableNode*)aSortCntBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -745,12 +745,12 @@ BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
_FndBoxAppendRowLine( pLLine, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
//Lines fuer das Layout-Update herausuchen.
- const BOOL bLayout = 0 != SwClientIter( *GetFrmFmt() ).First( TYPE(SwTabFrm) );
+ const sal_Bool bLayout = 0 != SwClientIter( *GetFrmFmt() ).First( TYPE(SwTabFrm) );
if( bLayout )
{
aFndBox.SetTableLines( *this );
@@ -763,7 +763,7 @@ BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
aCpyPara.nInsPos = GetTabLines().Count();
aCpyPara.nDelBorderFlag = 1;
- for( USHORT nCpyCnt = 0; nCpyCnt < nCnt; ++nCpyCnt )
+ for( sal_uInt16 nCpyCnt = 0; nCpyCnt < nCnt; ++nCpyCnt )
{
aCpyPara.nDelBorderFlag = 1;
aFndBox.GetLines().ForEach( &lcl_CopyRow, &aCpyPara );
@@ -776,7 +776,7 @@ BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
//Layout updaten
if ( bLayout )
{
- aFndBox.MakeNewFrms( *this, nCnt, TRUE );
+ aFndBox.MakeNewFrms( *this, nCnt, sal_True );
}
// TL_CHART2: need to inform chart of probably changed cell names
pDoc->UpdateCharts( GetFrmFmt()->GetName() );
@@ -784,23 +784,23 @@ BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
CHECKBOXWIDTH
CHECKTABLELAYOUT
- return TRUE;
+ return sal_True;
}
void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset,
- BOOL bFirst, SwShareBoxFmts& rShareFmts );
+ sal_Bool bFirst, SwShareBoxFmts& rShareFmts );
void lcl_LastBoxSetWidthLine( SwTableLines &rLines, const long nOffset,
- BOOL bFirst, SwShareBoxFmts& rShareFmts )
+ sal_Bool bFirst, SwShareBoxFmts& rShareFmts )
{
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
::lcl_LastBoxSetWidth( rLines[i]->GetTabBoxes(), nOffset, bFirst,
rShareFmts );
}
void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset,
- BOOL bFirst, SwShareBoxFmts& rShareFmts )
+ sal_Bool bFirst, SwShareBoxFmts& rShareFmts )
{
SwTableBox& rBox = *rBoxes[ bFirst ? 0 : rBoxes.Count() - 1 ];
if( !rBox.GetSttNd() )
@@ -827,7 +827,7 @@ void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset,
}
void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
- BOOL bCalcNewSize, const BOOL bCorrBorder,
+ sal_Bool bCalcNewSize, const sal_Bool bCorrBorder,
SwShareBoxFmts* pShareFmts )
{
do {
@@ -835,13 +835,13 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
pBox->GetFrmFmt()->GetFrmSize().GetWidth() : 0;
SwTableLine* pLine = pBox->GetUpper();
SwTableBoxes& rTblBoxes = pLine->GetTabBoxes();
- USHORT nDelPos = rTblBoxes.C40_GETPOS( SwTableBox, pBox );
+ sal_uInt16 nDelPos = rTblBoxes.C40_GETPOS( SwTableBox, pBox );
SwTableBox* pUpperBox = pBox->GetUpper()->GetUpper();
// Sonderbehandlung fuer Umrandung:
if( bCorrBorder && 1 < rTblBoxes.Count() )
{
- BOOL bChgd = FALSE;
+ sal_Bool bChgd = sal_False;
const SvxBoxItem& rBoxItem = pBox->GetFrmFmt()->GetBox();
if( rBoxItem.GetLeft() || rBoxItem.GetRight() )
@@ -866,7 +866,7 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
pShareFmts->SetAttr( *pNxtBox, aTmp );
else
pNxtBox->ClaimFrmFmt()->SetFmtAttr( aTmp );
- bChgd = TRUE;
+ bChgd = sal_True;
}
}
if( !bChgd && nDelPos )
@@ -913,7 +913,7 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
if( rTblBoxes.Count() )
{
// dann passe noch die Frame-SSize an
- BOOL bLastBox = nDelPos == rTblBoxes.Count();
+ sal_Bool bLastBox = nDelPos == rTblBoxes.Count();
if( bLastBox )
--nDelPos;
pBox = rTblBoxes[nDelPos];
@@ -961,8 +961,8 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
SwTwips nBoxStt, SwTwips nBoxWidth,
- USHORT nLinePos, BOOL bNxt,
- SwSelBoxes* pAllDelBoxes, USHORT* pCurPos )
+ sal_uInt16 nLinePos, sal_Bool bNxt,
+ SwSelBoxes* pAllDelBoxes, sal_uInt16* pCurPos )
{
SwTableBox* pFndBox = 0;
do {
@@ -973,10 +973,10 @@ SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
SwTableLine* pLine = rTblLns[ nLinePos ];
SwTwips nFndBoxWidth = 0;
SwTwips nFndWidth = nBoxStt + nBoxWidth;
- USHORT nBoxCnt = pLine->GetTabBoxes().Count();
+ sal_uInt16 nBoxCnt = pLine->GetTabBoxes().Count();
pFndBox = pLine->GetTabBoxes()[ 0 ];
- for( USHORT n = 0; 0 < nFndWidth && n < nBoxCnt; ++n )
+ for( sal_uInt16 n = 0; 0 < nFndWidth && n < nBoxCnt; ++n )
{
pFndBox = pLine->GetTabBoxes()[ n ];
nFndWidth -= (nFndBoxWidth = pFndBox->GetFrmFmt()->
@@ -999,7 +999,7 @@ SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
else if( pAllDelBoxes )
{
// falls der Vorganger auch geloscht wird, ist nicht zu tun
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( !pAllDelBoxes->Seek_Entry( pFndBox, &nFndPos ) )
break;
@@ -1017,45 +1017,45 @@ SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
void lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox,
SwShareBoxFmts& rShareFmts,
SwSelBoxes* pAllDelBoxes = 0,
- USHORT* pCurPos = 0 )
+ sal_uInt16* pCurPos = 0 )
{
//JP 16.04.97: 2.Teil fuer Bug 36271
- BOOL bChgd = FALSE;
+ sal_Bool bChgd = sal_False;
const SwTableLine* pLine = rBox.GetUpper();
const SwTableBoxes& rTblBoxes = pLine->GetTabBoxes();
const SwTableBox* pUpperBox = &rBox;
- USHORT nDelPos = rTblBoxes.C40_GETPOS( SwTableBox, pUpperBox );
+ sal_uInt16 nDelPos = rTblBoxes.C40_GETPOS( SwTableBox, pUpperBox );
pUpperBox = rBox.GetUpper()->GetUpper();
const SvxBoxItem& rBoxItem = rBox.GetFrmFmt()->GetBox();
// dann die unteren/oberen Kanten
if( rBoxItem.GetTop() || rBoxItem.GetBottom() )
{
- bChgd = FALSE;
+ bChgd = sal_False;
const SwTableLines* pTblLns;
if( pUpperBox )
pTblLns = &pUpperBox->GetTabLines();
else
pTblLns = &rTbl.GetTabLines();
- USHORT nLnPos = pTblLns->GetPos( pLine );
+ sal_uInt16 nLnPos = pTblLns->GetPos( pLine );
// bestimme die Attr.Position der akt. zu loeschenden Box
// und suche dann in der unteren / oberen Line die entspr.
// Gegenstuecke
SwTwips nBoxStt = 0;
- for( USHORT n = 0; n < nDelPos; ++n )
+ for( sal_uInt16 n = 0; n < nDelPos; ++n )
nBoxStt += rTblBoxes[ n ]->GetFrmFmt()->GetFrmSize().GetWidth();
SwTwips nBoxWidth = rBox.GetFrmFmt()->GetFrmSize().GetWidth();
SwTableBox *pPrvBox = 0, *pNxtBox = 0;
if( nLnPos ) // Vorgaenger?
pPrvBox = ::lcl_FndNxtPrvDelBox( *pTblLns, nBoxStt, nBoxWidth,
- nLnPos, FALSE, pAllDelBoxes, pCurPos );
+ nLnPos, sal_False, pAllDelBoxes, pCurPos );
if( nLnPos + 1 < pTblLns->Count() ) // Nachfolger?
pNxtBox = ::lcl_FndNxtPrvDelBox( *pTblLns, nBoxStt, nBoxWidth,
- nLnPos, TRUE, pAllDelBoxes, pCurPos );
+ nLnPos, sal_True, pAllDelBoxes, pCurPos );
if( pNxtBox && pNxtBox->GetSttNd() )
{
@@ -1068,7 +1068,7 @@ void lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox,
: rBoxItem.GetBottom(),
BOX_LINE_TOP );
rShareFmts.SetAttr( *pNxtBox, aTmp );
- bChgd = TRUE;
+ bChgd = sal_True;
}
}
if( !bChgd && pPrvBox && pPrvBox->GetSttNd() )
@@ -1089,12 +1089,12 @@ void lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox,
}
-BOOL SwTable::DeleteSel(
+sal_Bool SwTable::DeleteSel(
SwDoc* pDoc
,
const SwSelBoxes& rBoxes,
const SwSelBoxes* pMerged, SwUndo* pUndo,
- const BOOL bDelMakeFrms, const BOOL bCorrBorder )
+ const sal_Bool bDelMakeFrms, const sal_Bool bCorrBorder )
{
ASSERT( pDoc, "No doc?" );
SwTableNode* pTblNd = 0;
@@ -1102,7 +1102,7 @@ BOOL SwTable::DeleteSel(
{
pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
}
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -1125,7 +1125,7 @@ BOOL SwTable::DeleteSel(
{
SwSelBoxes aBoxes;
aBoxes.Insert( &rBoxes );
- for( USHORT n = 0; n < aBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n )
::lcl_SaveUpperLowerBorder( *this, *rBoxes[ n ], aShareFmts,
&aBoxes, &n );
}
@@ -1135,9 +1135,9 @@ BOOL SwTable::DeleteSel(
SwChartDataProvider *pPCD = pDoc->GetChartDataProvider();
//
// delete boxes from last to first
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
- USHORT nIdx = rBoxes.Count() - 1 - n;
+ sal_uInt16 nIdx = rBoxes.Count() - 1 - n;
// first adapt the data-sequence for chart if necessary
// (needed to move the implementation cursor properly to it's new
@@ -1146,7 +1146,7 @@ BOOL SwTable::DeleteSel(
pPCD->DeleteBox( &pTblNd->GetTable(), *rBoxes[nIdx] );
// ... then delete the boxes
- _DeleteBox( *this, rBoxes[nIdx], pUndo, TRUE, bCorrBorder, &aShareFmts );
+ _DeleteBox( *this, rBoxes[nIdx], pUndo, sal_True, bCorrBorder, &aShareFmts );
}
// dann raeume die Struktur aller Lines auf
@@ -1161,19 +1161,19 @@ BOOL SwTable::DeleteSel(
CHECKTABLELAYOUT
CHECK_TABLE( *this )
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------
-BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
- BOOL bSameHeight )
+sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt,
+ sal_Bool bSameHeight )
{
ASSERT( pDoc && rBoxes.Count() && nCnt, "keine gueltigen Werte" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// TL_CHART2: splitting/merging of a number of cells or rows will usually make
// the table to complex to be handled with chart.
@@ -1188,7 +1188,7 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
if ( bSameHeight )
{
pRowHeights = new long[ rBoxes.Count() ];
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pSelBox = *( rBoxes.GetData() + n );
const SwRowFrm* pRow = GetRowFrm( *pSelBox->GetUpper() );
@@ -1203,7 +1203,7 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
aFndBox.SetTableLines( rBoxes, *this );
aFndBox.DelFrms( *this );
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pSelBox = *( rBoxes.GetData() + n );
ASSERT( pSelBox, "Box steht nicht in der Tabelle" );
@@ -1217,13 +1217,13 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
if ( bSameHeight && ATT_VAR_SIZE == aFSz.GetHeightSizeType() )
aFSz.SetHeightSizeType( ATT_MIN_SIZE );
- BOOL bChgLineSz = 0 != aFSz.GetHeight() || bSameHeight;
+ sal_Bool bChgLineSz = 0 != aFSz.GetHeight() || bSameHeight;
if ( bChgLineSz )
aFSz.SetHeight( ( bSameHeight ? pRowHeights[ n ] : aFSz.GetHeight() ) /
(nCnt + 1) );
SwTableBox* pNewBox = new SwTableBox( pFrmFmt, nCnt, pInsLine );
- USHORT nBoxPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSelBox );
+ sal_uInt16 nBoxPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSelBox );
pInsLine->GetTabBoxes().Remove( nBoxPos ); // alte loeschen
pInsLine->GetTabBoxes().C40_INSERT( SwTableBox, pNewBox, nBoxPos );
@@ -1231,24 +1231,24 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
SwTableBox* pLastBox = pSelBox; // zum verteilen der TextNodes !!
// sollte Bereiche in der Box stehen, dann bleibt sie so bestehen
// !! FALLS DAS GEAENDERT WIRD MUSS DAS UNDO ANGEPASST WERDEN !!!
- BOOL bMoveNodes = TRUE;
+ sal_Bool bMoveNodes = sal_True;
{
- ULONG nSttNd = pLastBox->GetSttIdx() + 1,
+ sal_uLong nSttNd = pLastBox->GetSttIdx() + 1,
nEndNd = pLastBox->GetSttNd()->EndOfSectionIndex();
while( nSttNd < nEndNd )
if( !pDoc->GetNodes()[ nSttNd++ ]->IsTxtNode() )
{
- bMoveNodes = FALSE;
+ bMoveNodes = sal_False;
break;
}
}
SwTableBoxFmt* pCpyBoxFrmFmt = (SwTableBoxFmt*)pSelBox->GetFrmFmt();
- BOOL bChkBorder = 0 != pCpyBoxFrmFmt->GetBox().GetTop();
+ sal_Bool bChkBorder = 0 != pCpyBoxFrmFmt->GetBox().GetTop();
if( bChkBorder )
pCpyBoxFrmFmt = (SwTableBoxFmt*)pSelBox->ClaimFrmFmt();
- for( USHORT i = 0; i <= nCnt; ++i )
+ for( sal_uInt16 i = 0; i <= nCnt; ++i )
{
// also erstmal eine neue Linie in der neuen Box
SwTableLine* pNewLine = new SwTableLine(
@@ -1276,7 +1276,7 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
SvxBoxItem aTmp( pCpyBoxFrmFmt->GetBox() );
aTmp.SetLine( 0, BOX_LINE_TOP );
pCpyBoxFrmFmt->SetFmtAttr( aTmp );
- bChkBorder = FALSE;
+ bChkBorder = sal_False;
}
if( bMoveNodes )
@@ -1288,7 +1288,7 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
SwNodeRange aRg( *pLastBox->GetSttNd(), +2, *pEndNd );
pLastBox = pNewLine->GetTabBoxes()[0]; // neu setzen
SwNodeIndex aInsPos( *pLastBox->GetSttNd(), 1 );
- pDoc->GetNodes()._MoveNodes(aRg, pDoc->GetNodes(), aInsPos, FALSE);
+ pDoc->GetNodes()._MoveNodes(aRg, pDoc->GetNodes(), aInsPos, sal_False);
pDoc->GetNodes().Delete( aInsPos, 1 ); // den leeren noch loeschen
}
}
@@ -1308,15 +1308,15 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
CHECKBOXWIDTH
CHECKTABLELAYOUT
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
+sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
{
ASSERT( pDoc && rBoxes.Count() && nCnt, "keine gueltigen Werte" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// TL_CHART2: splitting/merging of a number of cells or rows will usually make
// the table to complex to be handled with chart.
@@ -1335,8 +1335,8 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
_CpyTabFrms aFrmArr;
SvPtrarr aLastBoxArr;
- USHORT nFndPos;
- for( USHORT n = 0; n < aSelBoxes.Count(); ++n )
+ sal_uInt16 nFndPos;
+ for( sal_uInt16 n = 0; n < aSelBoxes.Count(); ++n )
{
SwTableBox* pSelBox = *( aSelBoxes.GetData() + n );
ASSERT( pSelBox, "Box steht nicht in der Tabelle" );
@@ -1347,7 +1347,7 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
// dann teile die Box nCnt in nCnt Boxen
SwTableLine* pInsLine = pSelBox->GetUpper();
- USHORT nBoxPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSelBox );
+ sal_uInt16 nBoxPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSelBox );
// suche das FrmFmt im Array aller Frame-Formate
SwTableBoxFmt* pLastBoxFmt;
@@ -1382,7 +1382,7 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
}
// dann fuege mal an der Position die neuen Boxen ein
- for( USHORT i = 1; i < nCnt; ++i )
+ for( sal_uInt16 i = 1; i < nCnt; ++i )
::_InsTblBox( pDoc, pTblNd, pInsLine, aFindFrm.pNewFrmFmt,
pSelBox, nBoxPos + i ); // dahinter einfuegen
@@ -1400,7 +1400,7 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
aFindFrm.pNewFrmFmt->SetFmtAttr( aTmp );
// und dann das Format aus dem "cache" entfernen
- for( USHORT i = aFrmArr.Count(); i; )
+ for( sal_uInt16 i = aFrmArr.Count(); i; )
{
const _CpyTabFrm& rCTF = aFrmArr[ --i ];
if( rCTF.pNewFrmFmt == aFindFrm.pNewFrmFmt ||
@@ -1418,7 +1418,7 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
CHECKBOXWIDTH
CHECKTABLELAYOUT
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------
@@ -1438,12 +1438,12 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
----------------------- >> MERGE << ------------------------
*/
-void lcl_CpyLines( USHORT nStt, USHORT nEnd,
+void lcl_CpyLines( sal_uInt16 nStt, sal_uInt16 nEnd,
SwTableLines& rLines,
SwTableBox* pInsBox,
- USHORT nPos = USHRT_MAX )
+ sal_uInt16 nPos = USHRT_MAX )
{
- for( USHORT n = nStt; n < nEnd; ++n )
+ for( sal_uInt16 n = nStt; n < nEnd; ++n )
rLines[n]->SetUpper( pInsBox );
if( USHRT_MAX == nPos )
nPos = pInsBox->GetTabLines().Count();
@@ -1451,12 +1451,12 @@ void lcl_CpyLines( USHORT nStt, USHORT nEnd,
rLines.Remove( nStt, nEnd - nStt );
}
-void lcl_CpyBoxes( USHORT nStt, USHORT nEnd,
+void lcl_CpyBoxes( sal_uInt16 nStt, sal_uInt16 nEnd,
SwTableBoxes& rBoxes,
SwTableLine* pInsLine,
- USHORT nPos = USHRT_MAX )
+ sal_uInt16 nPos = USHRT_MAX )
{
- for( USHORT n = nStt; n < nEnd; ++n )
+ for( sal_uInt16 n = nStt; n < nEnd; ++n )
rBoxes[n]->SetUpper( pInsLine );
if( USHRT_MAX == nPos )
nPos = pInsLine->GetTabBoxes().Count();
@@ -1474,7 +1474,7 @@ void lcl_CalcWidth( SwTableBox* pBox )
ASSERT( pLine, "Box steht in keiner Line" );
long nWidth = 0;
- for( USHORT n = 0; n < pLine->GetTabBoxes().Count(); ++n )
+ for( sal_uInt16 n = 0; n < pLine->GetTabBoxes().Count(); ++n )
nWidth += pLine->GetTabBoxes()[n]->GetFrmFmt()->GetFrmSize().GetWidth();
pFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nWidth, 0 ));
@@ -1491,14 +1491,14 @@ struct _InsULPara
SwTableNode* pTblNd;
SwTableLine* pInsLine;
SwTableBox* pInsBox;
- BOOL bUL_LR : 1; // Upper-Lower(TRUE) oder Left-Right(FALSE) ?
- BOOL bUL : 1; // Upper-Left(TRUE) oder Lower-Right(FALSE) ?
+ sal_Bool bUL_LR : 1; // Upper-Lower(sal_True) oder Left-Right(sal_False) ?
+ sal_Bool bUL : 1; // Upper-Left(sal_True) oder Lower-Right(sal_False) ?
SwTableBox* pLeftBox;
SwTableBox* pRightBox;
SwTableBox* pMergeBox;
- _InsULPara( SwTableNode* pTNd, BOOL bUpperLower, BOOL bUpper,
+ _InsULPara( SwTableNode* pTNd, sal_Bool bUpperLower, sal_Bool bUpper,
SwTableBox* pLeft, SwTableBox* pMerge, SwTableBox* pRight,
SwTableLine* pLine=0, SwTableBox* pBox=0 )
: pTblNd( pTNd ), pInsLine( pLine ), pInsBox( pBox ),
@@ -1506,26 +1506,26 @@ struct _InsULPara
{ bUL_LR = bUpperLower; bUL = bUpper; }
void SetLeft( SwTableBox* pBox=0 )
- { bUL_LR = FALSE; bUL = TRUE; if( pBox ) pInsBox = pBox; }
+ { bUL_LR = sal_False; bUL = sal_True; if( pBox ) pInsBox = pBox; }
void SetRight( SwTableBox* pBox=0 )
- { bUL_LR = FALSE; bUL = FALSE; if( pBox ) pInsBox = pBox; }
+ { bUL_LR = sal_False; bUL = sal_False; if( pBox ) pInsBox = pBox; }
void SetUpper( SwTableLine* pLine=0 )
- { bUL_LR = TRUE; bUL = TRUE; if( pLine ) pInsLine = pLine; }
+ { bUL_LR = sal_True; bUL = sal_True; if( pLine ) pInsLine = pLine; }
void SetLower( SwTableLine* pLine=0 )
- { bUL_LR = TRUE; bUL = FALSE; if( pLine ) pInsLine = pLine; }
+ { bUL_LR = sal_True; bUL = sal_False; if( pLine ) pInsLine = pLine; }
};
-BOOL lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara )
+sal_Bool lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara )
{
_InsULPara* pULPara = (_InsULPara*)pPara;
SwTableBoxes* pBoxes;
- USHORT nStt = 0, nEnd = rpFndBox->GetLines().Count();
- USHORT nInsPos = USHRT_MAX;
+ sal_uInt16 nStt = 0, nEnd = rpFndBox->GetLines().Count();
+ sal_uInt16 nInsPos = USHRT_MAX;
if( !pULPara->bUL_LR ) // Left/Right
{
- USHORT nPos;
+ sal_uInt16 nPos;
SwTableBox* pFndBox = (SwTableBox*)rpFndBox->GetBox();
pBoxes = &pFndBox->GetUpper()->GetTabBoxes();
if( pULPara->bUL ) // Left ?
@@ -1572,19 +1572,19 @@ BOOL lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara )
else
delete pBox;
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
+sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
{
_InsULPara* pULPara = (_InsULPara*)pPara;
SwTableLines* pLines;
- USHORT nStt = 0, nEnd = rpFndLine->GetBoxes().Count();
- USHORT nInsPos = USHRT_MAX;
+ sal_uInt16 nStt = 0, nEnd = rpFndLine->GetBoxes().Count();
+ sal_uInt16 nInsPos = USHRT_MAX;
if( pULPara->bUL_LR ) // UpperLower ?
{
- USHORT nPos;
+ sal_uInt16 nPos;
SwTableLine* pFndLn = (SwTableLine*)rpFndLine->GetLine();
pLines = pFndLn->GetUpper() ?
&pFndLn->GetUpper()->GetTabLines() :
@@ -1593,8 +1593,8 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
SwTableBox* pLBx = rpFndLine->GetBoxes()[0]->GetBox();
SwTableBox* pRBx = rpFndLine->GetBoxes()[
rpFndLine->GetBoxes().Count()-1]->GetBox();
- USHORT nLeft = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pLBx );
- USHORT nRight = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pRBx );
+ sal_uInt16 nLeft = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pLBx );
+ sal_uInt16 nRight = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pRBx );
// if( ( nLeft && nRight+1 < pFndLn->GetTabBoxes().Count() ) ||
// ( !nLeft && nRight+1 >= pFndLn->GetTabBoxes().Count() ) )
@@ -1674,7 +1674,7 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
// Right auch mit in die Line
pInsLine = pULPara->pLeftBox->GetUpper();
- USHORT nMvPos = pULPara->pRightBox->GetUpper()->GetTabBoxes().
+ sal_uInt16 nMvPos = pULPara->pRightBox->GetUpper()->GetTabBoxes().
C40_GETPOS( SwTableBox, pULPara->pRightBox );
lcl_CpyBoxes( nMvPos, nMvPos+1,
pULPara->pRightBox->GetUpper()->GetTabBoxes(),
@@ -1696,7 +1696,7 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
pRMBox = new SwTableBox( (SwTableBoxFmt*)pRMBox->GetFrmFmt(), 0, pNewLn );
pNewLn->GetTabBoxes().C40_INSERT( SwTableBox, pRMBox, 0 );
- USHORT nPos1, nPos2;
+ sal_uInt16 nPos1, nPos2;
if( pULPara->bUL )
nPos1 = 0,
nPos2 = nMvPos;
@@ -1727,7 +1727,7 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
lcl_CalcWidth( pRMBox ); // bereche die Breite der Box
}
else {
- ASSERT( FALSE , "Was denn nun" );
+ ASSERT( sal_False , "Was denn nun" );
}
}
// Left/Right
@@ -1754,17 +1754,17 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
else
delete pNewLine;
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
+sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
SwTableBox* pMergeBox, SwUndoTblMerge* pUndo )
{
ASSERT( rBoxes.Count() && pMergeBox, "keine gueltigen Werte" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -1773,7 +1773,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
// TL_CHART2: splitting/merging of a number of cells or rows will usually make
// the table to complex to be handled with chart.
@@ -1804,7 +1804,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
&pFndBox->GetBox()->GetTabLines() : &GetTabLines();
SwTableLine* pNewLine = pFndBox->GetLines()[0]->GetLine();
- USHORT nInsPos = pLines->C40_GETPOS( SwTableLine, pNewLine );
+ sal_uInt16 nInsPos = pLines->C40_GETPOS( SwTableLine, pNewLine );
pLines->C40_INSERT( SwTableLine, pInsLine, nInsPos );
SwTableBox* pLeftBox = new SwTableBox( (SwTableBoxFmt*)pMergeBox->GetFrmFmt(), 0, pInsLine );
@@ -1818,13 +1818,13 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
// in diese kommen alle Lines, die ueber dem selektierten Bereich stehen
// Sie bilden also eine Upper/Lower Line
- _InsULPara aPara( pTblNd, TRUE, TRUE, pLeftBox, pMergeBox, pRightBox, pInsLine );
+ _InsULPara aPara( pTblNd, sal_True, sal_True, pLeftBox, pMergeBox, pRightBox, pInsLine );
// move die oben/unten ueberhaengenden Lines vom selektierten Bereich
pFndBox->GetLines()[0]->GetBoxes().ForEach( &lcl_Merge_MoveBox,
&aPara );
aPara.SetLower( pInsLine );
- USHORT nEnd = pFndBox->GetLines().Count()-1;
+ sal_uInt16 nEnd = pFndBox->GetLines().Count()-1;
pFndBox->GetLines()[nEnd]->GetBoxes().ForEach( &lcl_Merge_MoveBox,
&aPara );
@@ -1836,7 +1836,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pFndBox->GetLines().ForEach( &lcl_Merge_MoveLine, &aPara );
if( !pLeftBox->GetTabLines().Count() )
- _DeleteBox( *this, pLeftBox, 0, FALSE, FALSE );
+ _DeleteBox( *this, pLeftBox, 0, sal_False, sal_False );
else
{
lcl_CalcWidth( pLeftBox ); // bereche die Breite der Box
@@ -1844,7 +1844,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pUndo->AddNewBox( pLeftBox->GetSttIdx() );
}
if( !pRightBox->GetTabLines().Count() )
- _DeleteBox( *this, pRightBox, 0, FALSE, FALSE );
+ _DeleteBox( *this, pRightBox, 0, sal_False, sal_False );
else
{
lcl_CalcWidth( pRightBox ); // bereche die Breite der Box
@@ -1852,7 +1852,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pUndo->AddNewBox( pRightBox->GetSttIdx() );
}
- DeleteSel( pDoc, rBoxes, 0, 0, FALSE, FALSE );
+ DeleteSel( pDoc, rBoxes, 0, 0, sal_False, sal_False );
// dann raeume die Struktur dieser Line noch mal auf:
// generell alle Aufraeumen
@@ -1865,20 +1865,20 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
CHECKBOXWIDTH
CHECKTABLELAYOUT
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------
void lcl_CheckRowSpan( SwTable &rTbl )
{
- USHORT nLineCount = rTbl.GetTabLines().Count();
- USHORT nMaxSpan = nLineCount;
+ sal_uInt16 nLineCount = rTbl.GetTabLines().Count();
+ sal_uInt16 nMaxSpan = nLineCount;
long nMinSpan = 1;
while( nMaxSpan )
{
SwTableLine* pLine = rTbl.GetTabLines()[ nLineCount - nMaxSpan ];
- for( USHORT nBox = 0; nBox < pLine->GetTabBoxes().Count(); ++nBox )
+ for( sal_uInt16 nBox = 0; nBox < pLine->GetTabBoxes().Count(); ++nBox )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nBox];
long nRowSpan = pBox->getRowSpan();
@@ -1892,31 +1892,31 @@ void lcl_CheckRowSpan( SwTable &rTbl )
}
}
-USHORT lcl_GetBoxOffset( const _FndBox& rBox )
+sal_uInt16 lcl_GetBoxOffset( const _FndBox& rBox )
{
// suche die erste Box
const _FndBox* pFirstBox = &rBox;
while( pFirstBox->GetLines().Count() )
pFirstBox = pFirstBox->GetLines()[ 0 ]->GetBoxes()[ 0 ];
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
// dann ueber die Lines nach oben die Position bestimmen
const SwTableBox* pBox = pFirstBox->GetBox();
do {
const SwTableBoxes& rBoxes = pBox->GetUpper()->GetTabBoxes();
const SwTableBox* pCmp;
- for( USHORT n = 0; pBox != ( pCmp = rBoxes[ n ] ); ++n )
- nRet = nRet + (USHORT) pCmp->GetFrmFmt()->GetFrmSize().GetWidth();
+ for( sal_uInt16 n = 0; pBox != ( pCmp = rBoxes[ n ] ); ++n )
+ nRet = nRet + (sal_uInt16) pCmp->GetFrmFmt()->GetFrmSize().GetWidth();
pBox = pBox->GetUpper()->GetUpper();
} while( pBox );
return nRet;
}
-USHORT lcl_GetLineWidth( const _FndLine& rLine )
+sal_uInt16 lcl_GetLineWidth( const _FndLine& rLine )
{
- USHORT nRet = 0;
- for( USHORT n = rLine.GetBoxes().Count(); n; )
- nRet = nRet + (USHORT)rLine.GetBoxes()[ --n ]->GetBox()->GetFrmFmt()
+ sal_uInt16 nRet = 0;
+ for( sal_uInt16 n = rLine.GetBoxes().Count(); n; )
+ nRet = nRet + (sal_uInt16)rLine.GetBoxes()[ --n ]->GetBox()->GetFrmFmt()
->GetFrmSize().GetWidth();
return nRet;
}
@@ -1924,27 +1924,27 @@ USHORT lcl_GetLineWidth( const _FndLine& rLine )
void lcl_CalcNewWidths( const _FndLines& rFndLines, _CpyPara& rPara )
{
rPara.pWidths.reset();
- USHORT nLineCount = rFndLines.Count();
+ sal_uInt16 nLineCount = rFndLines.Count();
if( nLineCount )
{
- rPara.pWidths = boost::shared_ptr< std::vector< std::vector< ULONG > > >
- ( new std::vector< std::vector< ULONG > >( nLineCount ));
+ rPara.pWidths = boost::shared_ptr< std::vector< std::vector< sal_uLong > > >
+ ( new std::vector< std::vector< sal_uLong > >( nLineCount ));
// First we collect information about the left/right borders of all
// selected cells
- for( USHORT nLine = 0; nLine < nLineCount; ++nLine )
+ for( sal_uInt16 nLine = 0; nLine < nLineCount; ++nLine )
{
- std::vector< ULONG > &rWidth = (*rPara.pWidths.get())[ nLine ];
+ std::vector< sal_uLong > &rWidth = (*rPara.pWidths.get())[ nLine ];
const _FndLine *pFndLine = rFndLines[ nLine ];
if( pFndLine && pFndLine->GetBoxes().Count() )
{
const SwTableLine *pLine = pFndLine->GetLine();
if( pLine && pLine->GetTabBoxes().Count() )
{
- USHORT nBoxCount = pLine->GetTabBoxes().Count();
- ULONG nPos = 0;
+ sal_uInt16 nBoxCount = pLine->GetTabBoxes().Count();
+ sal_uLong nPos = 0;
// The first selected box...
const SwTableBox *pSel = pFndLine->GetBoxes()[0]->GetBox();
- USHORT nBox = 0;
+ sal_uInt16 nBox = 0;
// Sum up the width of all boxes before the first selected box
while( nBox < nBoxCount )
{
@@ -1958,7 +1958,7 @@ void lcl_CalcNewWidths( const _FndLines& rFndLines, _CpyPara& rPara )
if( rPara.nMinLeft > nPos )
rPara.nMinLeft = nPos;
nBoxCount = pFndLine->GetBoxes().Count();
- rWidth = std::vector< ULONG >( nBoxCount+2 );
+ rWidth = std::vector< sal_uLong >( nBoxCount+2 );
rWidth[ 0 ] = nPos;
// Add now the widths of all selected boxes and store
// the positions in the vector
@@ -1978,39 +1978,39 @@ void lcl_CalcNewWidths( const _FndLines& rFndLines, _CpyPara& rPara )
}
}
// Second step: calculate the new widths for the copied cells
- ULONG nSelSize = rPara.nMaxRight - rPara.nMinLeft;
+ sal_uLong nSelSize = rPara.nMaxRight - rPara.nMinLeft;
if( nSelSize )
{
- for( USHORT nLine = 0; nLine < nLineCount; ++nLine )
+ for( sal_uInt16 nLine = 0; nLine < nLineCount; ++nLine )
{
- std::vector< ULONG > &rWidth = (*rPara.pWidths.get())[ nLine ];
- USHORT nCount = (USHORT)rWidth.size();
+ std::vector< sal_uLong > &rWidth = (*rPara.pWidths.get())[ nLine ];
+ sal_uInt16 nCount = (sal_uInt16)rWidth.size();
if( nCount > 2 )
{
rWidth[ nCount - 1 ] = rPara.nMaxRight;
- ULONG nLastPos = 0;
- for( USHORT nBox = 0; nBox < nCount; ++nBox )
+ sal_uLong nLastPos = 0;
+ for( sal_uInt16 nBox = 0; nBox < nCount; ++nBox )
{
sal_uInt64 nNextPos = rWidth[ nBox ];
nNextPos -= rPara.nMinLeft;
nNextPos *= rPara.nNewSize;
nNextPos /= nSelSize;
- rWidth[ nBox ] = (ULONG)(nNextPos - nLastPos);
- nLastPos = (ULONG)nNextPos;
+ rWidth[ nBox ] = (sal_uLong)(nNextPos - nLastPos);
+ nLastPos = (sal_uLong)nNextPos;
}
}
}
}
}
-BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
+sal_Bool lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
// Calculation of new size
- ULONG nRealSize;
- ULONG nDummy1 = 0;
- ULONG nDummy2 = 0;
+ sal_uLong nRealSize;
+ sal_uLong nDummy1 = 0;
+ sal_uLong nDummy2 = 0;
if( pCpyPara->pTblNd->GetTable().IsNewModel() )
{
if( pCpyPara->nBoxIdx == 1 )
@@ -2026,7 +2026,7 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
nRealSize /= pCpyPara->nOldSize;
}
- ULONG nSize;
+ sal_uLong nSize;
bool bDummy = nDummy1 > 0;
if( bDummy )
nSize = nDummy1;
@@ -2041,7 +2041,7 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
_CpyTabFrm aFindFrm( (SwTableBoxFmt*)rpFndBox->GetBox()->GetFrmFmt() );
SwFmtFrmSize aFrmSz;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( !pCpyPara->rTabFrmArr.Seek_Entry( aFindFrm, &nFndPos ) ||
( aFrmSz = ( aFindFrm = pCpyPara->rTabFrmArr[ nFndPos ]).pNewFrmFmt->
GetFrmSize()).GetWidth() != (SwTwips)nSize )
@@ -2090,12 +2090,12 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
if( aBoxAttrSet.Count() )
{
const SfxPoolItem* pItem;
- SvNumberFormatter* pN = pCpyPara->pDoc->GetNumberFormatter( FALSE );
+ SvNumberFormatter* pN = pCpyPara->pDoc->GetNumberFormatter( sal_False );
if( pN && pN->HasMergeFmtTbl() && SFX_ITEM_SET == aBoxAttrSet.
- GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem ) )
+ GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem ) )
{
- ULONG nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
- ULONG nNewIdx = pN->GetMergeFmtIndex( nOldIdx );
+ sal_uLong nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
+ sal_uLong nNewIdx = pN->GetMergeFmtIndex( nOldIdx );
if( nNewIdx != nOldIdx )
aBoxAttrSet.Put( SwTblBoxNumFormat( nNewIdx ));
}
@@ -2107,7 +2107,7 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
*rpFndBox->GetBox()->GetSttNd()->EndOfSectionNode() );
SwNodeIndex aInsIdx( *pBox->GetSttNd(), 1 );
- pFromDoc->CopyWithFlyInFly( aCpyRg, 0, aInsIdx, FALSE );
+ pFromDoc->CopyWithFlyInFly( aCpyRg, 0, aInsIdx, sal_False );
// den initialen TextNode loeschen
pCpyPara->pDoc->GetNodes().Delete( aInsIdx, 1 );
}
@@ -2127,16 +2127,16 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
}
}
while( nSize );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_CopyLineToDoc( const _FndLine*& rpFndLine, void* pPara )
+sal_Bool lcl_CopyLineToDoc( const _FndLine*& rpFndLine, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
// suche das Format in der Liste aller Formate
_CpyTabFrm aFindFrm( (SwTableBoxFmt*)rpFndLine->GetLine()->GetFrmFmt() );
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( !pCpyPara->rTabFrmArr.Seek_Entry( aFindFrm, &nFndPos ))
{
// es ist noch nicht vorhanden, also kopiere es
@@ -2180,23 +2180,23 @@ BOOL lcl_CopyLineToDoc( const _FndLine*& rpFndLine, void* pPara )
}
else
// errechne sie
- for( USHORT n = 0; n < rpFndLine->GetBoxes().Count(); ++n )
+ for( sal_uInt16 n = 0; n < rpFndLine->GetBoxes().Count(); ++n )
aPara.nOldSize += rpFndLine->GetBoxes()[n]
->GetBox()->GetFrmFmt()->GetFrmSize().GetWidth();
((_FndLine*)rpFndLine)->GetBoxes().ForEach( &lcl_CopyBoxToDoc, &aPara );
if( pCpyPara->pTblNd->GetTable().IsNewModel() )
++pCpyPara->nLnIdx;
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
+sal_Bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
{
// suche alle Boxen / Lines
SwSelBoxes aSelBoxes;
SwTableBox* pBox = GetTabSortBoxes()[ 0 ];
pBox = GetTblBox( pBox->GetSttNd()->StartOfSectionNode()->GetIndex() + 1 );
- SelLineFromBox( pBox, aSelBoxes, TRUE );
+ SelLineFromBox( pBox, aSelBoxes, sal_True );
_FndBox aFndBox( 0, 0 );
{
@@ -2204,7 +2204,7 @@ BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
((SwTableLines&)GetTabLines()).ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
{
// Tabellen-Formeln in die relative Darstellung umwandeln
@@ -2214,7 +2214,7 @@ BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
}
_CpyTabFrms aCpyFmt;
- _CpyPara aPara( &rTblNd, 1, aCpyFmt, TRUE );
+ _CpyPara aPara( &rTblNd, 1, aCpyFmt, sal_True );
aPara.nNewSize = aPara.nOldSize = rTblNd.GetTable().GetFrmFmt()->GetFrmSize().GetWidth();
// dann kopiere mal
if( IsNewModel() )
@@ -2223,9 +2223,9 @@ BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
if( rTblNd.GetTable().IsNewModel() )
{ // The copied line must not contain any row span attributes > 1
SwTableLine* pLine = rTblNd.GetTable().GetTabLines()[0];
- USHORT nColCount = pLine->GetTabBoxes().Count();
+ sal_uInt16 nColCount = pLine->GetTabBoxes().Count();
ASSERT( nColCount, "Empty Table Line" )
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pTableBox = pLine->GetTabBoxes()[nCurrCol];
ASSERT( pTableBox, "Missing Table Box" );
@@ -2233,12 +2233,12 @@ BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
}
}
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
- const SwSelBoxes& rSelBoxes, BOOL bCpyNds,
- BOOL bCpyName ) const
+sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
+ const SwSelBoxes& rSelBoxes, sal_Bool bCpyNds,
+ sal_Bool bCpyName ) const
{
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -2247,7 +2247,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
((SwTableLines&)GetTabLines()).ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
// erst die Poolvorlagen fuer die Tabelle kopieren, damit die dann
// wirklich kopiert und damit die gueltigen Werte haben.
@@ -2261,9 +2261,9 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
SwTable* pNewTbl = (SwTable*)pInsDoc->InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ),
rPos, 1, 1, GetFrmFmt()->GetHoriOrient().GetHoriOrient(),
- 0, 0, FALSE, IsNewModel() );
+ 0, 0, sal_False, IsNewModel() );
if( !pNewTbl )
- return FALSE;
+ return sal_False;
SwNodeIndex aIdx( rPos.nNode, -1 );
SwTableNode* pTblNd = aIdx.GetNode().FindTableNode();
@@ -2283,7 +2283,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
// tauschen am Node den Tabellen-Pointer aus
pNewTbl = new SwDDETable( *pNewTbl,
(SwDDEFieldType*)pFldType );
- pTblNd->SetNewTable( pNewTbl, FALSE );
+ pTblNd->SetNewTable( pNewTbl, sal_False );
}
pNewTbl->GetFrmFmt()->CopyAttrs( *GetFrmFmt() );
@@ -2319,11 +2319,11 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
_FndLine* pFndLn = aFndBox.GetLines()[ 0 ];
SwTableLine* pLn = pFndLn->GetLine();
const SwTableLine* pTmp = pLn;
- USHORT nLnPos = GetTabLines().GetPos( pTmp );
+ sal_uInt16 nLnPos = GetTabLines().GetPos( pTmp );
if( USHRT_MAX != nLnPos && nLnPos )
{
// es gibt eine Line davor
- SwCollectTblLineBoxes aLnPara( FALSE, HEADLINE_BORDERCOPY );
+ SwCollectTblLineBoxes aLnPara( sal_False, HEADLINE_BORDERCOPY );
pLn = GetTabLines()[ nLnPos - 1 ];
pLn->GetTabBoxes().ForEach( &lcl_Box_CollectBox, &aLnPara );
@@ -2331,7 +2331,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
if( aLnPara.Resize( lcl_GetBoxOffset( aFndBox ),
lcl_GetLineWidth( *pFndLn )) )
{
- aLnPara.SetValues( TRUE );
+ aLnPara.SetValues( sal_True );
pLn = pNewTbl->GetTabLines()[ 0 ];
pLn->GetTabBoxes().ForEach( &lcl_BoxSetSplitBoxFmts, &aLnPara );
}
@@ -2344,7 +2344,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
if( nLnPos < GetTabLines().Count() - 1 )
{
// es gibt eine Line dahinter
- SwCollectTblLineBoxes aLnPara( TRUE, HEADLINE_BORDERCOPY );
+ SwCollectTblLineBoxes aLnPara( sal_True, HEADLINE_BORDERCOPY );
pLn = GetTabLines()[ nLnPos + 1 ];
pLn->GetTabBoxes().ForEach( &lcl_Box_CollectBox, &aLnPara );
@@ -2352,7 +2352,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
if( aLnPara.Resize( lcl_GetBoxOffset( aFndBox ),
lcl_GetLineWidth( *pFndLn )) )
{
- aLnPara.SetValues( FALSE );
+ aLnPara.SetValues( sal_False );
pLn = pNewTbl->GetTabLines()[ pNewTbl->GetTabLines().Count()-1 ];
pLn->GetTabBoxes().ForEach( &lcl_BoxSetSplitBoxFmts, &aLnPara );
}
@@ -2362,7 +2362,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
// die initiale Box muss noch geloescht werden
_DeleteBox( *pNewTbl, pNewTbl->GetTabLines()[
pNewTbl->GetTabLines().Count() - 1 ]->GetTabBoxes()[0],
- 0, FALSE, FALSE );
+ 0, sal_False, sal_False );
if( pNewTbl->IsNewModel() )
lcl_CheckRowSpan( *pNewTbl );
@@ -2373,7 +2373,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
CHECKTABLELAYOUT
- return TRUE;
+ return sal_True;
}
@@ -2382,11 +2382,11 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
// suche ab dieser Line nach der naechsten Box mit Inhalt
SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
- const SwTableBox* pSrchBox, BOOL bOvrTblLns ) const
+ const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
{
const SwTableLine* pLine = this; // fuer M800
SwTableBox* pBox;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( GetTabBoxes().Count() && pSrchBox &&
USHRT_MAX != ( nFndPos = GetTabBoxes().GetPos( pSrchBox )) &&
nFndPos + 1 != GetTabBoxes().Count() )
@@ -2430,11 +2430,11 @@ SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
// suche ab dieser Line nach der vorherigen Box
SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTbl,
- const SwTableBox* pSrchBox, BOOL bOvrTblLns ) const
+ const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
{
const SwTableLine* pLine = this; // fuer M800
SwTableBox* pBox;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( GetTabBoxes().Count() && pSrchBox &&
USHRT_MAX != ( nFndPos = GetTabBoxes().GetPos( pSrchBox )) &&
nFndPos )
@@ -2484,7 +2484,7 @@ SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTbl,
// suche ab dieser Line nach der naechsten Box mit Inhalt
SwTableBox* SwTableBox::FindNextBox( const SwTable& rTbl,
- const SwTableBox* pSrchBox, BOOL bOvrTblLns ) const
+ const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
{
if( !pSrchBox && !GetTabLines().Count() )
return (SwTableBox*)this;
@@ -2495,7 +2495,7 @@ SwTableBox* SwTableBox::FindNextBox( const SwTable& rTbl,
// suche ab dieser Line nach der naechsten Box mit Inhalt
SwTableBox* SwTableBox::FindPreviousBox( const SwTable& rTbl,
- const SwTableBox* pSrchBox, BOOL bOvrTblLns ) const
+ const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
{
if( !pSrchBox && !GetTabLines().Count() )
return (SwTableBox*)this;
@@ -2504,7 +2504,7 @@ SwTableBox* SwTableBox::FindPreviousBox( const SwTable& rTbl,
}
-BOOL lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* )
+sal_Bool lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* )
{
// in der HeadLine sind die Absaetze mit BedingtenVorlage anzupassen
const SwStartNode* pSttNd = rpBox->GetSttNd();
@@ -2512,29 +2512,29 @@ BOOL lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* )
pSttNd->CheckSectionCondColl();
else
((SwTableBox*)rpBox)->GetTabLines().ForEach( &lcl_LineSetHeadCondColl, 0 );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* )
+sal_Bool lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* )
{
((SwTableLine*)rpLine)->GetTabBoxes().ForEach( &lcl_BoxSetHeadCondColl, 0 );
- return TRUE;
+ return sal_True;
}
/* */
-SwTwips lcl_GetDistance( SwTableBox* pBox, BOOL bLeft )
+SwTwips lcl_GetDistance( SwTableBox* pBox, sal_Bool bLeft )
{
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
SwTwips nRet = 0;
SwTableLine* pLine;
while( pBox && 0 != ( pLine = pBox->GetUpper() ) )
{
- USHORT nStt = 0, nPos = pLine->GetTabBoxes().C40_GETPOS( SwTableBox, pBox );
+ sal_uInt16 nStt = 0, nPos = pLine->GetTabBoxes().C40_GETPOS( SwTableBox, pBox );
if( bFirst && !bLeft )
++nPos;
- bFirst = FALSE;
+ bFirst = sal_False;
while( nStt < nPos )
nRet += pLine->GetTabBoxes()[ nStt++ ]->GetFrmFmt()
@@ -2544,30 +2544,30 @@ SwTwips lcl_GetDistance( SwTableBox* pBox, BOOL bLeft )
return nRet;
}
-BOOL lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pBox = rBoxes[ n ];
SwFrmFmt* pFmt = pBox->GetFrmFmt();
const SwFmtFrmSize& rSz = pFmt->GetFrmSize();
SwTwips nWidth = rSz.GetWidth();
- BOOL bGreaterBox = FALSE;
+ sal_Bool bGreaterBox = sal_False;
if( bCheck )
{
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
if( !::lcl_SetSelBoxWidth( pBox->GetTabLines()[ i ], rParam,
- nDist, TRUE ))
- return FALSE;
+ nDist, sal_True ))
+ return sal_False;
// dann noch mal alle "ContentBoxen" sammeln
if( ( 0 != ( bGreaterBox = TBLFIX_CHGABS != rParam.nMode && ( nDist + ( rParam.bLeft ? 0 : nWidth ) ) >= rParam.nSide)) ||
( !rParam.bBigger && ( Abs( nDist + (( rParam.nMode && rParam.bLeft ) ? 0 : nWidth ) - rParam.nSide ) < COLFUZZY ) ) )
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
SwTwips nLowerDiff;
if( bGreaterBox && TBLFIX_CHGPROP == rParam.nMode )
{
@@ -2582,16 +2582,16 @@ BOOL lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nLowerDiff = rParam.nDiff;
if( nWidth < nLowerDiff || nWidth - nLowerDiff < MINLAY )
- return FALSE;
+ return sal_False;
}
}
else
{
SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
{
rParam.nLowerDiff = 0;
- lcl_SetSelBoxWidth( pBox->GetTabLines()[ i ], rParam, nDist, FALSE );
+ lcl_SetSelBoxWidth( pBox->GetTabLines()[ i ], rParam, nDist, sal_False );
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
@@ -2644,14 +2644,14 @@ BOOL lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDist >= rParam.nSide )
break;
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pBox = rBoxes[ n ];
SwFrmFmt* pFmt = pBox->GetFrmFmt();
@@ -2660,17 +2660,17 @@ BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
if( !::lcl_SetOtherBoxWidth( pBox->GetTabLines()[ i ],
- rParam, nDist, TRUE ))
- return FALSE;
+ rParam, nDist, sal_True ))
+ return sal_False;
if( rParam.bBigger && ( TBLFIX_CHGABS == rParam.nMode
? Abs( nDist - rParam.nSide ) < COLFUZZY
: ( rParam.bLeft ? nDist < rParam.nSide - COLFUZZY
: nDist >= rParam.nSide - COLFUZZY )) )
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
SwTwips nDiff;
if( TBLFIX_CHGPROP == rParam.nMode ) // Tabelle fix, proport.
{
@@ -2683,17 +2683,17 @@ BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDiff = rParam.nDiff;
if( nWidth < nDiff || nWidth - nDiff < MINLAY )
- return FALSE;
+ return sal_False;
}
}
else
{
SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
{
rParam.nLowerDiff = 0;
lcl_SetOtherBoxWidth( pBox->GetTabLines()[ i ], rParam,
- nDist, FALSE );
+ nDist, sal_False );
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
@@ -2738,16 +2738,16 @@ BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDist > rParam.nSide )
break;
}
- return TRUE;
+ return sal_True;
}
/* */
-BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- USHORT n, nCmp;
+ sal_uInt16 n, nCmp;
for( n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pBox = rBoxes[ n ];
@@ -2757,10 +2757,10 @@ BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
if( !::lcl_InsSelBox( pBox->GetTabLines()[ i ], rParam,
- nDist, TRUE ))
- return FALSE;
+ nDist, sal_True ))
+ return sal_False;
// dann noch mal alle "ContentBoxen" sammeln
if( Abs( nDist + ( rParam.bLeft ? 0 : nWidth )
@@ -2773,14 +2773,14 @@ BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( nCmp )
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
if( pFmt->GetProtect().IsCntntProtected() )
- return FALSE;
+ return sal_False;
if( rParam.bSplittBox &&
nWidth - rParam.nDiff <= COLFUZZY +
( 567 / 2 /* min. 0,5 cm Platz lassen*/) )
- return FALSE;
+ return sal_False;
if( pBox->GetSttNd() )
rParam.aBoxes.Insert( pBox );
@@ -2791,10 +2791,10 @@ BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
else
{
SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
{
rParam.nLowerDiff = 0;
- lcl_InsSelBox( pBox->GetTabLines()[ i ], rParam, nDist, FALSE );
+ lcl_InsSelBox( pBox->GetTabLines()[ i ], rParam, nDist, sal_False );
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
@@ -2874,18 +2874,18 @@ BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDist += nWidth;
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
// Sonderfall: kein Platz in den anderen Boxen aber in der Zelle
if( rParam.bSplittBox )
- return TRUE;
+ return sal_True;
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- USHORT n;
+ sal_uInt16 n;
// Tabelle fix, proport.
if( !rParam.nRemainWidth && TBLFIX_CHGPROP == rParam.nMode )
@@ -2899,8 +2899,8 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( (nTmpDist + nWidth / 2 ) > rParam.nSide )
{
rParam.nRemainWidth = rParam.bLeft
- ? USHORT(nTmpDist)
- : USHORT(rParam.nTblWidth - nTmpDist);
+ ? sal_uInt16(nTmpDist)
+ : sal_uInt16(rParam.nTblWidth - nTmpDist);
break;
}
nTmpDist += nWidth;
@@ -2916,10 +2916,10 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
if( !::lcl_InsOtherBox( pBox->GetTabLines()[ i ],
- rParam, nDist, TRUE ))
- return FALSE;
+ rParam, nDist, sal_True ))
+ return sal_False;
if(
rParam.bLeft ? ((nDist + nWidth / 2 ) <= rParam.nSide &&
@@ -2931,7 +2931,7 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
: (nDist + nWidth / 2 ) > rParam.nSide
)
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
SwTwips nDiff;
if( TBLFIX_CHGPROP == rParam.nMode ) // Tabelle fix, proport.
{
@@ -2941,7 +2941,7 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDiff /= rParam.nRemainWidth;
if( nWidth < nDiff || nWidth - nDiff < MINLAY )
- return FALSE;
+ return sal_False;
}
else
{
@@ -2954,7 +2954,7 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( rParam.bLeft && pBox->GetUpper()->GetUpper() )
{
const SwTableBox* pTmpBox = pBox;
- USHORT nBoxPos = n;
+ sal_uInt16 nBoxPos = n;
while( !nBoxPos && pTmpBox->GetUpper()->GetUpper() )
{
pTmpBox = pTmpBox->GetUpper()->GetUpper();
@@ -2967,7 +2967,7 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
}
if( nTmpWidth < nDiff || nTmpWidth - nDiff < MINLAY )
- return FALSE;
+ return sal_False;
break;
}
}
@@ -2975,11 +2975,11 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
else
{
SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
{
rParam.nLowerDiff = 0;
lcl_InsOtherBox( pBox->GetTabLines()[ i ], rParam,
- nDist, FALSE );
+ nDist, sal_False );
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
@@ -3024,7 +3024,7 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDist += nWidth;
}
- return TRUE;
+ return sal_True;
}
@@ -3037,8 +3037,8 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
// POS_OVERLAP_BEFORE, // Box ueberlappt den Start
// POS_OVERLAP_BEHIND // Box ueberlappt das Ende
-SwComparePosition _CheckBoxInRange( USHORT nStt, USHORT nEnd,
- USHORT nBoxStt, USHORT nBoxEnd )
+SwComparePosition _CheckBoxInRange( sal_uInt16 nStt, sal_uInt16 nEnd,
+ sal_uInt16 nBoxStt, sal_uInt16 nBoxEnd )
{
// COLFUZZY noch beachten!!
SwComparePosition nRet;
@@ -3079,7 +3079,7 @@ void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam,
// 1. Schritt die eigene Breite feststellen
SwTableBoxes& rBoxes = rLine.GetTabBoxes();
SwTwips nBoxWidth = 0;
- USHORT n;
+ sal_uInt16 n;
for( n = rBoxes.Count(); n; )
nBoxWidth += rBoxes[ --n ]->GetFrmFmt()->GetFrmSize().GetWidth();
@@ -3101,7 +3101,7 @@ void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam,
if( !pBox->GetSttNd() )
{
// hat selbst auch Lower, also auch die anpassen
- for( USHORT i = pBox->GetTabLines().Count(); i; )
+ for( sal_uInt16 i = pBox->GetTabLines().Count(); i; )
::lcl_DelSelBox_CorrLowers( *pBox->GetTabLines()[ --i ],
rParam, nDiff );
}
@@ -3111,16 +3111,16 @@ void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam,
void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
const SwFmtFrmSize& rOldSz,
- USHORT& rDelWidth, SwTwips nDist )
+ sal_uInt16& rDelWidth, SwTwips nDist )
{
long nDiff = 0;
- BOOL bSetSize = FALSE;
+ sal_Bool bSetSize = sal_False;
switch( rParam.nMode )
{
case TBLFIX_CHGABS: // Tabelle feste Breite, den Nachbar andern
nDiff = rDelWidth + rParam.nLowerDiff;
- bSetSize = TRUE;
+ bSetSize = sal_True;
break;
case TBLFIX_CHGPROP: // Tabelle feste Breite, alle Nachbarn aendern
@@ -3128,9 +3128,9 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
{
// dann kurz berechnen:
if( rParam.bLeft )
- rParam.nRemainWidth = USHORT(nDist);
+ rParam.nRemainWidth = sal_uInt16(nDist);
else
- rParam.nRemainWidth = USHORT(rParam.nTblWidth - nDist);
+ rParam.nRemainWidth = sal_uInt16(rParam.nTblWidth - nDist);
}
// relativ berechnen
@@ -3138,7 +3138,7 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
nDiff *= rDelWidth + rParam.nLowerDiff;
nDiff /= rParam.nRemainWidth;
- bSetSize = TRUE;
+ bSetSize = sal_True;
break;
case TBLVAR_CHGABS: // Tabelle variable, alle Nachbarn aendern
@@ -3147,10 +3147,10 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
{
nDiff = rDelWidth + rParam.nLowerDiff - rParam.nBoxWidth;
if( 0 < nDiff )
- rDelWidth = rDelWidth - USHORT(nDiff);
+ rDelWidth = rDelWidth - sal_uInt16(nDiff);
else
- rDelWidth = rDelWidth + USHORT(-nDiff);
- bSetSize = TRUE;
+ rDelWidth = rDelWidth + sal_uInt16(-nDiff);
+ bSetSize = sal_True;
}
break;
}
@@ -3162,23 +3162,23 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
rParam.aShareFmts.SetSize( rBox, aNew );
// dann leider nochmals die Lower anpassen
- for( USHORT i = rBox.GetTabLines().Count(); i; )
+ for( sal_uInt16 i = rBox.GetTabLines().Count(); i; )
::lcl_DelSelBox_CorrLowers( *rBox.GetTabLines()[ --i ], rParam,
aNew.GetWidth() );
}
}
-BOOL lcl_DeleteBox_Rekursiv( CR_SetBoxWidth& rParam, SwTableBox& rBox,
- BOOL bCheck )
+sal_Bool lcl_DeleteBox_Rekursiv( CR_SetBoxWidth& rParam, SwTableBox& rBox,
+ sal_Bool bCheck )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( rBox.GetSttNd() )
{
if( bCheck )
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
if( rBox.GetFrmFmt()->GetProtect().IsCntntProtected() )
- bRet = FALSE;
+ bRet = sal_False;
else
{
SwTableBox* pBox = &rBox;
@@ -3187,42 +3187,42 @@ BOOL lcl_DeleteBox_Rekursiv( CR_SetBoxWidth& rParam, SwTableBox& rBox,
}
else
::_DeleteBox( rParam.pTblNd->GetTable(), &rBox,
- rParam.pUndo, FALSE, TRUE, &rParam.aShareFmts );
+ rParam.pUndo, sal_False, sal_True, &rParam.aShareFmts );
}
else
{
// die muessen leider alle sequentiel ueber die
// Contentboxen geloescht werden
- for( USHORT i = rBox.GetTabLines().Count(); i; )
+ for( sal_uInt16 i = rBox.GetTabLines().Count(); i; )
{
SwTableLine& rLine = *rBox.GetTabLines()[ --i ];
- for( USHORT n = rLine.GetTabBoxes().Count(); n; )
+ for( sal_uInt16 n = rLine.GetTabBoxes().Count(); n; )
if( !::lcl_DeleteBox_Rekursiv( rParam,
*rLine.GetTabBoxes()[ --n ], bCheck ))
- return FALSE;
+ return sal_False;
}
}
return bRet;
}
-BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
SwTableBoxes& rBoxes = pTabLine->GetTabBoxes();
- USHORT n, nCntEnd, nBoxChkStt, nBoxChkEnd, nDelWidth = 0;
+ sal_uInt16 n, nCntEnd, nBoxChkStt, nBoxChkEnd, nDelWidth = 0;
if( rParam.bLeft )
{
n = rBoxes.Count();
nCntEnd = 0;
- nBoxChkStt = (USHORT)rParam.nSide;
- nBoxChkEnd = static_cast<USHORT>(rParam.nSide + rParam.nBoxWidth);
+ nBoxChkStt = (sal_uInt16)rParam.nSide;
+ nBoxChkEnd = static_cast<sal_uInt16>(rParam.nSide + rParam.nBoxWidth);
}
else
{
n = 0;
nCntEnd = rBoxes.Count();
- nBoxChkStt = static_cast<USHORT>(rParam.nSide - rParam.nBoxWidth);
- nBoxChkEnd = (USHORT)rParam.nSide;
+ nBoxChkStt = static_cast<sal_uInt16>(rParam.nSide - rParam.nBoxWidth);
+ nBoxChkEnd = (sal_uInt16)rParam.nSide;
}
@@ -3237,13 +3237,13 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
SwFrmFmt* pFmt = pBox->GetFrmFmt();
const SwFmtFrmSize& rSz = pFmt->GetFrmSize();
long nWidth = rSz.GetWidth();
- BOOL bDelBox = FALSE, bChgLowers = FALSE;
+ sal_Bool bDelBox = sal_False, bChgLowers = sal_False;
// die Boxenbreite testen und entpsrechend reagieren
SwComparePosition ePosType = ::_CheckBoxInRange(
nBoxChkStt, nBoxChkEnd,
- USHORT(rParam.bLeft ? nDist - nWidth : nDist),
- USHORT(rParam.bLeft ? nDist : nDist + nWidth));
+ sal_uInt16(rParam.bLeft ? nDist - nWidth : nDist),
+ sal_uInt16(rParam.bLeft ? nDist : nDist + nWidth));
switch( ePosType )
{
@@ -3251,7 +3251,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
if( rParam.bLeft )
- return TRUE;
+ return sal_True;
}
else if( rParam.bLeft )
{
@@ -3265,7 +3265,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
if( !rParam.bLeft )
- return TRUE;
+ return sal_True;
}
else if( !rParam.bLeft )
{
@@ -3278,7 +3278,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
case POS_OUTSIDE: // Box ueberlappt Start/End vollstaendig
case POS_INSIDE: // Box liegt vollstaendig in Start/End
case POS_EQUAL: // Box und Start/End sind gleich
- bDelBox = TRUE;
+ bDelBox = sal_True;
break;
case POS_OVERLAP_BEFORE: // Box ueberlappt den Start
@@ -3286,14 +3286,14 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
: nWidth / 2 )))
{
if( !pBox->GetSttNd() )
- bChgLowers = TRUE;
+ bChgLowers = sal_True;
else
- bDelBox = TRUE;
+ bDelBox = sal_True;
}
else if( !bCheck && rParam.bLeft )
{
if( !pBox->GetSttNd() )
- bChgLowers = TRUE;
+ bChgLowers = sal_True;
else
{
::lcl_ChgBoxSize( *pBox, rParam, rSz, nDelWidth, nDist );
@@ -3308,16 +3308,16 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
// generell loeschen oder wie beim OVERLAP_Before nur die, die
// bis zur Haelfte in die "Loesch-"Box reicht ???
if( !pBox->GetSttNd() )
- bChgLowers = TRUE;
+ bChgLowers = sal_True;
else
- bDelBox = TRUE;
+ bDelBox = sal_True;
break;
default: break;
}
if( bDelBox )
{
- nDelWidth = nDelWidth + USHORT(nWidth);
+ nDelWidth = nDelWidth + sal_uInt16(nWidth);
if( bCheck )
{
// die letzte/erste Box kann nur bei Tbl-Var geloescht werden,
@@ -3328,10 +3328,10 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
? nWidth - nDist
: (nDist + nWidth - rParam.nTblWidth )))
|| !::lcl_DeleteBox_Rekursiv( rParam, *pBox, bCheck ) )
- return FALSE;
+ return sal_False;
if( pFmt->GetProtect().IsCntntProtected() )
- return FALSE;
+ return sal_False;
}
else
{
@@ -3343,11 +3343,11 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
}
else if( bChgLowers )
{
- BOOL bFirst = TRUE, bCorrLowers = FALSE;
+ sal_Bool bFirst = sal_True, bCorrLowers = sal_False;
long nLowerDiff = 0;
long nOldLower = rParam.nLowerDiff;
- USHORT nOldRemain = rParam.nRemainWidth;
- USHORT i;
+ sal_uInt16 nOldRemain = rParam.nRemainWidth;
+ sal_uInt16 i;
for( i = pBox->GetTabLines().Count(); i; )
{
@@ -3355,7 +3355,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
rParam.nRemainWidth = nOldRemain;
SwTableLine* pLine = pBox->GetTabLines()[ --i ];
if( !::lcl_DelSelBox( pLine, rParam, nDist, bCheck ))
- return FALSE;
+ return sal_False;
// gibt es die Box und die darin enthaltenen Lines noch??
if( n < rBoxes.Count() &&
@@ -3365,14 +3365,14 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
{
if( !bFirst && !bCorrLowers &&
COLFUZZY < Abs( nLowerDiff - rParam.nLowerDiff ) )
- bCorrLowers = TRUE;
+ bCorrLowers = sal_True;
// die groesste "loesch" Breite entscheidet, aber nur wenn
// nicht die gesamte Line geloescht wurde
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
- bFirst = FALSE;
+ bFirst = sal_False;
}
}
rParam.nLowerDiff = nOldLower;
@@ -3384,7 +3384,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
nLowerDiff = nWidth;
// DelBreite anpassen!!
- nDelWidth = nDelWidth + USHORT(nLowerDiff);
+ nDelWidth = nDelWidth + sal_uInt16(nLowerDiff);
if( !bCheck )
{
@@ -3400,7 +3400,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
{
// sonst muss die Groesse der Box angepasst werden
SwFmtFrmSize aNew( rSz );
- BOOL bCorrRel = FALSE;
+ sal_Bool bCorrRel = sal_False;
if( TBLVAR_CHGABS != rParam.nMode )
{
@@ -3412,7 +3412,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
else if( rParam.bLeft ) // TBLFIX_CHGABS
{
nLowerDiff = nLowerDiff - nDelWidth;
- bCorrLowers = TRUE;
+ bCorrLowers = sal_True;
n = nCntEnd;
}
break;
@@ -3423,7 +3423,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
else if( !rParam.bLeft ) // TBLFIX_CHGABS
{
nLowerDiff = nLowerDiff - nDelWidth;
- bCorrLowers = TRUE;
+ bCorrLowers = sal_True;
n = nCntEnd;
}
break;
@@ -3440,9 +3440,9 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
{
// dann kurz berechnen:
if( rParam.bLeft )
- rParam.nRemainWidth = USHORT(nDist - nLowerDiff);
+ rParam.nRemainWidth = sal_uInt16(nDist - nLowerDiff);
else
- rParam.nRemainWidth = USHORT(rParam.nTblWidth - nDist
+ rParam.nRemainWidth = sal_uInt16(rParam.nTblWidth - nDist
- nLowerDiff );
}
@@ -3473,13 +3473,13 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
nDist += nWidth;
}
rParam.nLowerDiff = nDelWidth;
- return TRUE;
+ return sal_True;
}
// Dummy Funktion fuer die Methode SetColWidth
-BOOL lcl_DelOtherBox( SwTableLine* , CR_SetBoxWidth& , SwTwips , BOOL )
+sal_Bool lcl_DelOtherBox( SwTableLine* , CR_SetBoxWidth& , SwTwips , sal_Bool )
{
- return TRUE;
+ return sal_True;
}
/* */
@@ -3487,7 +3487,7 @@ BOOL lcl_DelOtherBox( SwTableLine* , CR_SetBoxWidth& , SwTwips , BOOL )
void lcl_AjustLines( SwTableLine* pLine, CR_SetBoxWidth& rParam )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pBox = rBoxes[ n ];
@@ -3498,7 +3498,7 @@ void lcl_AjustLines( SwTableLine* pLine, CR_SetBoxWidth& rParam )
aSz.SetWidth( nWidth );
rParam.aShareFmts.SetSize( *pBox, aSz );
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
::lcl_AjustLines( pBox->GetTabLines()[ i ], rParam );
}
}
@@ -3511,13 +3511,13 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize )
SwTwips nAktSize = 0;
// checke doch mal ob die Tabellen korrekte Breiten haben
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
const SwTableBox* pBox = rBoxes[ n ];
const SwTwips nBoxW = pBox->GetFrmFmt()->GetFrmSize().GetWidth();
nAktSize += nBoxW;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
_CheckBoxWidth( *pBox->GetTabLines()[ i ], nBoxW );
}
@@ -3542,11 +3542,11 @@ _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo,
{
// erstmal die Boxen besorgen !
if( rParam.bBigger )
- for( USHORT n = 0; n < rTbl.GetTabLines().Count(); ++n )
- ::lcl_DelSelBox( rTbl.GetTabLines()[ n ], rParam, nDistStt, TRUE );
+ for( sal_uInt16 n = 0; n < rTbl.GetTabLines().Count(); ++n )
+ ::lcl_DelSelBox( rTbl.GetTabLines()[ n ], rParam, nDistStt, sal_True );
else
- for( USHORT n = 0; n < rTbl.GetTabLines().Count(); ++n )
- ::lcl_InsSelBox( rTbl.GetTabLines()[ n ], rParam, nDistStt, TRUE );
+ for( sal_uInt16 n = 0; n < rTbl.GetTabLines().Count(); ++n )
+ ::lcl_InsSelBox( rTbl.GetTabLines()[ n ], rParam, nDistStt, sal_True );
}
// loeschen der gesamten Tabelle verhindern
@@ -3578,7 +3578,7 @@ _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo,
return pFndBox;
}
-BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
+sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo )
{
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -3588,13 +3588,13 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
_FndBox* pFndBox = 0; // fuers Einfuegen/Loeschen
SwTableSortBoxes aTmpLst( 0, 5 ); // fuers Undo
- BOOL bBigger,
- bRet = FALSE,
+ sal_Bool bBigger,
+ bRet = sal_False,
bLeft = nsTblChgWidthHeightType::WH_COL_LEFT == ( eType & 0xff ) ||
nsTblChgWidthHeightType::WH_CELL_LEFT == ( eType & 0xff ),
bInsDel = 0 != (eType & nsTblChgWidthHeightType::WH_FLAG_INSDEL );
- USHORT n;
- ULONG nBoxIdx = rAktBox.GetSttIdx();
+ sal_uInt16 n;
+ sal_uLong nBoxIdx = rAktBox.GetSttIdx();
// bestimme die akt. Kante der Box
// wird nur fuer die Breitenmanipulation benoetigt!
@@ -3612,7 +3612,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
{
fnSelBox = lcl_DelSelBox;
fnOtherBox = lcl_DelOtherBox;
- aParam.nBoxWidth = (USHORT)rAktBox.GetFrmFmt()->GetFrmSize().GetWidth();
+ aParam.nBoxWidth = (sal_uInt16)rAktBox.GetFrmFmt()->GetFrmSize().GetWidth();
if( bLeft )
nDistStt = rSz.GetWidth();
}
@@ -3639,7 +3639,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
bBigger = !bBigger;
// erstmal testen, ob ueberhaupt Platz ist
- BOOL bChgLRSpace = TRUE;
+ sal_Bool bChgLRSpace = sal_True;
if( bBigger )
{
if( GetFrmFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
@@ -3658,7 +3658,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
( bLeft ? rLR.GetRight() >= nAbsDiff
: rLR.GetLeft() >= nAbsDiff ))
{
- bRet = TRUE; bLeft = !bLeft;
+ bRet = sal_True; bLeft = !bLeft;
}
if( !bRet )
@@ -3676,13 +3676,13 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
}
else
{
- bRet = TRUE;
+ bRet = sal_True;
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, TRUE ))
+ if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3699,7 +3699,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
{
// dies gesamte Tabelle soll geloescht werden!!
GetFrmFmt()->GetDoc()->DeleteRowCol( aParam.aBoxes );
- return FALSE;
+ return sal_False;
}
if( ppUndo )
@@ -3708,7 +3708,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
: UNDO_TABLE_INSCOL );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
long nFrmWidth = LONG_MAX;
LockModify();
@@ -3723,7 +3723,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
// dann mal herunterbrechen auf USHRT_MAX / 2
CR_SetBoxWidth aTmpPara( 0, aSz.GetWidth() / 2,
0, aSz.GetWidth(), aSz.GetWidth(), aParam.pTblNd );
- for( USHORT nLn = 0; nLn < aLines.Count(); ++nLn )
+ for( sal_uInt16 nLn = 0; nLn < aLines.Count(); ++nLn )
::lcl_AjustLines( aLines[ nLn ], aTmpPara );
aSz.SetWidth( aSz.GetWidth() / 2 );
aParam.nDiff = nRelDiff /= 2;
@@ -3732,14 +3732,14 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
}
if( bLeft )
- aLR.SetLeft( USHORT( aLR.GetLeft() - nAbsDiff ) );
+ aLR.SetLeft( sal_uInt16( aLR.GetLeft() - nAbsDiff ) );
else
- aLR.SetRight( USHORT( aLR.GetRight() - nAbsDiff ) );
+ aLR.SetRight( sal_uInt16( aLR.GetRight() - nAbsDiff ) );
}
else if( bLeft )
- aLR.SetLeft( USHORT( aLR.GetLeft() + nAbsDiff ) );
+ aLR.SetLeft( sal_uInt16( aLR.GetLeft() + nAbsDiff ) );
else
- aLR.SetRight( USHORT( aLR.GetRight() + nAbsDiff ) );
+ aLR.SetRight( sal_uInt16( aLR.GetRight() + nAbsDiff ) );
if( bChgLRSpace )
GetFrmFmt()->SetFmtAttr( aLR );
@@ -3778,11 +3778,11 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
aSz.SetWidth( aSz.GetWidth() - nRelDiff );
if( rSz.GetWidthPercent() )
- aSz.SetWidthPercent( static_cast<BYTE>(( aSz.GetWidth() * 100 ) /
+ aSz.SetWidthPercent( static_cast<sal_uInt8>(( aSz.GetWidth() * 100 ) /
( aSz.GetWidth() + aLR.GetRight() + aLR.GetLeft())));
GetFrmFmt()->SetFmtAttr( aSz );
- aParam.nTblWidth = USHORT( aSz.GetWidth() );
+ aParam.nTblWidth = sal_uInt16( aSz.GetWidth() );
UnlockModify();
@@ -3790,7 +3790,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
{
--n;
aParam.LoopClear();
- (*fnSelBox)( aLines[ n ], aParam, nDistStt, FALSE );
+ (*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_False );
}
// sollte die Tabelle noch auf relativen Werten
@@ -3807,7 +3807,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
else if( bInsDel ||
( bLeft ? nDist : Abs( rSz.GetWidth() - nDist ) > COLFUZZY ) )
{
- bRet = TRUE;
+ bRet = sal_True;
if( bLeft && TBLFIX_CHGABS == eTblChgMode && !bInsDel )
aParam.bBigger = !bBigger;
@@ -3819,9 +3819,9 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, TRUE ))
+ if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3834,14 +3834,14 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnOtherBox)( aLines[ n ], aParam, 0, TRUE ))
+ if( !(*fnOtherBox)( aLines[ n ], aParam, 0, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
if( bRet && !aParam.bAnyBoxFnd )
- bRet = FALSE;
+ bRet = sal_False;
}
if( !bRet && rAktBox.GetFrmFmt()->GetFrmSize().GetWidth()
@@ -3849,16 +3849,16 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
( 567 / 2 /* min. 0,5 cm Platz lassen*/) )
{
// dann den Platz von der akt. Zelle nehmen
- aParam.bSplittBox = TRUE;
+ aParam.bSplittBox = sal_True;
// aber das muss auch mal getestet werden!
- bRet = TRUE;
+ bRet = sal_True;
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, TRUE ))
+ if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3870,9 +3870,9 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnOtherBox)( aLines[ n ], aParam, 0, TRUE ))
+ if( !(*fnOtherBox)( aLines[ n ], aParam, 0, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3882,9 +3882,9 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, TRUE ))
+ if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3905,7 +3905,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
: UNDO_TABLE_INSCOL );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
if( bInsDel
? ( TBLFIX_CHGABS == eTblChgMode ? bLeft : bLeft )
@@ -3916,8 +3916,8 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
--n;
aParam.LoopClear();
aParam1.LoopClear();
- (*fnSelBox)( aLines[ n ], aParam, nDistStt, FALSE );
- (*fnOtherBox)( aLines[ n ], aParam1, nDistStt, FALSE );
+ (*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_False );
+ (*fnOtherBox)( aLines[ n ], aParam1, nDistStt, sal_False );
}
}
else
@@ -3926,8 +3926,8 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
--n;
aParam.LoopClear();
aParam1.LoopClear();
- (*fnOtherBox)( aLines[ n ], aParam1, nDistStt, FALSE );
- (*fnSelBox)( aLines[ n ], aParam, nDistStt, FALSE );
+ (*fnOtherBox)( aLines[ n ], aParam1, nDistStt, sal_False );
+ (*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_False );
}
}
}
@@ -3958,7 +3958,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
SwTableLine* pLine = rAktBox.GetUpper();
while( pLine->GetUpper() )
{
- USHORT nPos = pLine->GetTabBoxes().C40_GETPOS( SwTableBox, pBox );
+ sal_uInt16 nPos = pLine->GetTabBoxes().C40_GETPOS( SwTableBox, pBox );
if( bLeft ? nPos : nPos + 1 != pLine->GetTabBoxes().Count() )
break;
@@ -3969,7 +3969,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
if( pLine->GetUpper() )
{
// dann muss die Distanz wieder korriegiert werden!
- aParam.nSide -= ::lcl_GetDistance( pLine->GetUpper(), TRUE );
+ aParam.nSide -= ::lcl_GetDistance( pLine->GetUpper(), sal_True );
if( bLeft )
aParam.nMaxSize = aParam.nSide;
@@ -3985,9 +3985,9 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
: ( rSz.GetWidth() - nDist ) > COLFUZZY ) &&
!aParam.bBigger )
{
- bRet = (*fnOtherBox)( pLine, aParam, 0, TRUE );
+ bRet = (*fnOtherBox)( pLine, aParam, 0, sal_True );
if( bRet && !aParam.bAnyBoxFnd )
- bRet = FALSE;
+ bRet = sal_False;
}
if( !bRet && !aParam.bBigger && rAktBox.GetFrmFmt()->
@@ -3995,14 +3995,14 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
( 567 / 2 /* min. 0,5 cm Platz lassen*/) )
{
// dann den Platz von der akt. Zelle nehmen
- aParam.bSplittBox = TRUE;
- bRet = TRUE;
+ aParam.bSplittBox = sal_True;
+ bRet = sal_True;
}
}
else
{
FN_lcl_SetBoxWidth fnTmp = aParam.bBigger ? fnOtherBox : fnSelBox;
- bRet = (*fnTmp)( pLine, aParam, nDistStt, TRUE );
+ bRet = (*fnTmp)( pLine, aParam, nDistStt, sal_True );
}
// wenn ja, dann setzen
@@ -4019,19 +4019,19 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
: UNDO_TABLE_INSCOL );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
if( bInsDel
? ( TBLFIX_CHGABS == eTblChgMode ? (bBigger && bLeft) : bLeft )
: ( TBLFIX_CHGABS != eTblChgMode && bLeft ) )
{
- (*fnSelBox)( pLine, aParam, nDistStt, FALSE );
- (*fnOtherBox)( pLine, aParam1, nDistStt, FALSE );
+ (*fnSelBox)( pLine, aParam, nDistStt, sal_False );
+ (*fnOtherBox)( pLine, aParam1, nDistStt, sal_False );
}
else
{
- (*fnOtherBox)( pLine, aParam1, nDistStt, FALSE );
- (*fnSelBox)( pLine, aParam, nDistStt, FALSE );
+ (*fnOtherBox)( pLine, aParam1, nDistStt, sal_False );
+ (*fnSelBox)( pLine, aParam, nDistStt, sal_False );
}
}
}
@@ -4056,7 +4056,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
if( ppUndo && *ppUndo )
{
- aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<USHORT>(eTblChgMode), eType,
+ aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<sal_uInt16>(eTblChgMode), eType,
nAbsDiff, nRelDiff );
if( !aParam.bBigger )
aParam.pUndo->SaveNewBoxes( *aParam.pTblNd, aTmpLst );
@@ -4109,7 +4109,7 @@ _FndBox* lcl_SaveInsDelData( CR_SetLineHeight& rParam, SwUndo** ppUndo,
}
void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight,
- BOOL bMinSize )
+ sal_Bool bMinSize )
{
SwLayoutFrm* pLineFrm = GetRowFrm( rLine );
ASSERT( pLineFrm, "wo ist der Frm von der SwTableLine?" );
@@ -4137,18 +4137,18 @@ void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight,
// erst alle inneren anpassen
SwTableBoxes& rBoxes = rLine.GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox& rBox = *rBoxes[ n ];
- for( USHORT i = 0; i < rBox.GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBox.GetTabLines().Count(); ++i )
SetLineHeight( *rBox.GetTabLines()[ i ], nMyOldH, nMyNewH, bMinSize );
}
}
-BOOL lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( !bCheck )
{
// Zeilenhoehe einstellen
@@ -4162,15 +4162,15 @@ BOOL lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
ASSERT( pLineFrm, "wo ist der Frm von der SwTableLine?" );
SwTwips nRstHeight = CalcRowRstHeight( pLineFrm );
if( (nRstHeight + ROWFUZZY) < nDist )
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
-BOOL lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( bCheck )
{
if( rParam.bBigger )
@@ -4217,17 +4217,17 @@ BOOL lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
return bRet;
}
-BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( !bCheck )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
SwDoc* pDoc = pLine->GetFrmFmt()->GetDoc();
if( !rParam.bBigger )
{
- USHORT n;
+ sal_uInt16 n;
for( n = rBoxes.Count(); n; )
::lcl_SaveUpperLowerBorder( rParam.pTblNd->GetTable(),
@@ -4235,8 +4235,8 @@ BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
rParam.aShareFmts );
for( n = rBoxes.Count(); n; )
::_DeleteBox( rParam.pTblNd->GetTable(),
- rBoxes[ --n ], rParam.pUndo, FALSE,
- FALSE, &rParam.aShareFmts );
+ rBoxes[ --n ], rParam.pUndo, sal_False,
+ sal_False, &rParam.aShareFmts );
}
else
{
@@ -4248,7 +4248,7 @@ BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
pLines = &pLine->GetUpper()->GetTabLines();
else
pLines = &rParam.pTblNd->GetTable().GetTabLines();
- USHORT nPos = pLines->C40_GETPOS( SwTableLine, pLine );
+ sal_uInt16 nPos = pLines->C40_GETPOS( SwTableLine, pLine );
if( !rParam.bTop )
++nPos;
pLines->C40_INSERT( SwTableLine, pNewLine, nPos );
@@ -4258,7 +4258,7 @@ BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
// und noch mal die Anzahl Boxen erzeugen
SwTableBoxes& rNewBoxes = pNewLine->GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTwips nWidth = 0;
SwTableBox* pOld = rBoxes[ n ];
@@ -4295,26 +4295,26 @@ BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
{
// Boxen einsammeln!
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- for( USHORT n = rBoxes.Count(); n; )
+ for( sal_uInt16 n = rBoxes.Count(); n; )
{
SwTableBox* pBox = rBoxes[ --n ];
if( pBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
- return FALSE;
+ return sal_False;
if( pBox->GetSttNd() )
rParam.aBoxes.Insert( pBox );
else
{
- for( USHORT i = pBox->GetTabLines().Count(); i; )
+ for( sal_uInt16 i = pBox->GetTabLines().Count(); i; )
lcl_InsDelSelLine( pBox->GetTabLines()[ --i ],
- rParam, 0, TRUE );
+ rParam, 0, sal_True );
}
}
}
return bRet;
}
-BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
+sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff,SwUndo** ppUndo )
{
SwTableLine* pLine = rAktBox.GetUpper();
@@ -4325,13 +4325,13 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
_FndBox* pFndBox = 0; // fuers Einfuegen/Loeschen
SwTableSortBoxes aTmpLst( 0, 5 ); // fuers Undo
- BOOL bBigger,
- bRet = FALSE,
+ sal_Bool bBigger,
+ bRet = sal_False,
bTop = nsTblChgWidthHeightType::WH_ROW_TOP == ( eType & 0xff ) ||
nsTblChgWidthHeightType::WH_CELL_TOP == ( eType & 0xff ),
bInsDel = 0 != (eType & nsTblChgWidthHeightType::WH_FLAG_INSDEL );
- USHORT n, nBaseLinePos = GetTabLines().C40_GETPOS( SwTableLine, pBaseLine );
- ULONG nBoxIdx = rAktBox.GetSttIdx();
+ sal_uInt16 n, nBaseLinePos = GetTabLines().C40_GETPOS( SwTableLine, pBaseLine );
+ sal_uLong nBoxIdx = rAktBox.GetSttIdx();
CR_SetLineHeight aParam( eType,
(SwTableNode*)rAktBox.GetSttNd()->FindTableNode() );
@@ -4372,7 +4372,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
// erstmal testen, ob ueberhaupt Platz ist
if( bBigger )
{
- bRet = TRUE;
+ bRet = sal_True;
// was ist mit Top, was ist mit Tabelle im Rahmen oder in Kopf-/Fusszeile
// mit fester Hoehe ??
if( !bRet )
@@ -4391,7 +4391,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
}
else
bRet = (*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, TRUE );
+ nAbsDiff, sal_True );
if( bRet )
{
@@ -4399,7 +4399,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
{
if( !aParam.aBoxes.Count() )
::lcl_InsDelSelLine( (*pLines)[ nBaseLinePos ],
- aParam, 0, TRUE );
+ aParam, 0, sal_True );
pFndBox = ::lcl_SaveInsDelData( aParam, ppUndo, aTmpLst );
@@ -4409,7 +4409,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
aParam.aBoxes.Count() == aSortCntBoxes.Count() )
{
GetFrmFmt()->GetDoc()->DeleteRowCol( aParam.aBoxes );
- return FALSE;
+ return sal_False;
}
@@ -4419,16 +4419,16 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
: UNDO_ROW_DELETE );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
(*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
}
}
else
{
- bRet = TRUE;
- USHORT nStt, nEnd;
+ bRet = sal_True;
+ sal_uInt16 nStt, nEnd;
if( bTop )
nStt = 0, nEnd = nBaseLinePos;
else
@@ -4445,7 +4445,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
aParam.nMaxHeight += pLineFrm->Frm().Height();
}
if( bBigger && aParam.nMaxSpace < nAbsDiff )
- bRet = FALSE;
+ bRet = sal_False;
}
else
{
@@ -4457,7 +4457,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
nEnd = nStt + 1;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
if( bRet )
@@ -4467,16 +4467,16 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
for( n = nStt; n < nEnd; ++n )
{
if( !(*fnOtherLine)( (*pLines)[ n ], aParam,
- nAbsDiff, TRUE ))
+ nAbsDiff, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
}
else
bRet = (*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, TRUE );
+ nAbsDiff, sal_True );
}
if( bRet )
@@ -4486,7 +4486,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
{
if( !aParam.aBoxes.Count() )
::lcl_InsDelSelLine( (*pLines)[ nBaseLinePos ],
- aParam, 0, TRUE );
+ aParam, 0, sal_True );
pFndBox = ::lcl_SaveInsDelData( aParam, ppUndo, aTmpLst );
if( ppUndo )
*ppUndo = aParam.CreateUndo(
@@ -4494,7 +4494,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
: UNDO_ROW_DELETE );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
CR_SetLineHeight aParam1( aParam );
if( TBLFIX_CHGPROP == eTblChgMode && !bBigger &&
@@ -4509,18 +4509,18 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
if( bTop )
{
(*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
for( n = nStt; n < nEnd; ++n )
(*fnOtherLine)( (*pLines)[ n ], aParam1,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
}
else
{
for( n = nStt; n < nEnd; ++n )
(*fnOtherLine)( (*pLines)[ n ], aParam1,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
(*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
}
}
else
@@ -4556,7 +4556,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
if( ppUndo && *ppUndo )
{
- aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<USHORT>(eTblChgMode), eType,
+ aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<sal_uInt16>(eTblChgMode), eType,
nAbsDiff, nRelDiff );
if( bBigger )
aParam.pUndo->SaveNewBoxes( *aParam.pTblNd, aTmpLst );
@@ -4573,7 +4573,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
SwFrmFmt* SwShareBoxFmt::GetFormat( long nWidth ) const
{
SwFrmFmt *pRet = 0, *pTmp;
- for( USHORT n = aNewFmts.Count(); n; )
+ for( sal_uInt16 n = aNewFmts.Count(); n; )
if( ( pTmp = (SwFrmFmt*)aNewFmts[ --n ])->GetFrmSize().GetWidth()
== nWidth )
{
@@ -4586,13 +4586,13 @@ SwFrmFmt* SwShareBoxFmt::GetFormat( long nWidth ) const
SwFrmFmt* SwShareBoxFmt::GetFormat( const SfxPoolItem& rItem ) const
{
const SfxPoolItem* pItem;
- USHORT nWhich = rItem.Which();
+ sal_uInt16 nWhich = rItem.Which();
SwFrmFmt *pRet = 0, *pTmp;
- const SfxPoolItem& rFrmSz = pOldFmt->GetFmtAttr( RES_FRM_SIZE, FALSE );
- for( USHORT n = aNewFmts.Count(); n; )
+ const SfxPoolItem& rFrmSz = pOldFmt->GetFmtAttr( RES_FRM_SIZE, sal_False );
+ for( sal_uInt16 n = aNewFmts.Count(); n; )
if( SFX_ITEM_SET == ( pTmp = (SwFrmFmt*)aNewFmts[ --n ])->
- GetItemState( nWhich, FALSE, &pItem ) && *pItem == rItem &&
- pTmp->GetFmtAttr( RES_FRM_SIZE, FALSE ) == rFrmSz )
+ GetItemState( nWhich, sal_False, &pItem ) && *pItem == rItem &&
+ pTmp->GetFmtAttr( RES_FRM_SIZE, sal_False ) == rFrmSz )
{
pRet = pTmp;
break;
@@ -4606,14 +4606,14 @@ void SwShareBoxFmt::AddFormat( const SwFrmFmt& rNew )
aNewFmts.Insert( pFmt, aNewFmts.Count() );
}
-BOOL SwShareBoxFmt::RemoveFormat( const SwFrmFmt& rFmt )
+sal_Bool SwShareBoxFmt::RemoveFormat( const SwFrmFmt& rFmt )
{
- // returnt TRUE, wenn geloescht werden kann
+ // returnt sal_True, wenn geloescht werden kann
if( pOldFmt == &rFmt )
- return TRUE;
+ return sal_True;
void* p = (void*)&rFmt;
- USHORT nFnd = aNewFmts.GetPos( p );
+ sal_uInt16 nFnd = aNewFmts.GetPos( p );
if( USHRT_MAX != nFnd )
aNewFmts.Remove( nFnd );
return 0 == aNewFmts.Count();
@@ -4625,7 +4625,7 @@ SwShareBoxFmts::~SwShareBoxFmts()
SwFrmFmt* SwShareBoxFmts::GetFormat( const SwFrmFmt& rFmt, long nWidth ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
return Seek_Entry( rFmt, &nPos )
? aShareArr[ nPos ]->GetFormat( nWidth )
: 0;
@@ -4633,7 +4633,7 @@ SwFrmFmt* SwShareBoxFmts::GetFormat( const SwFrmFmt& rFmt, long nWidth ) const
SwFrmFmt* SwShareBoxFmts::GetFormat( const SwFrmFmt& rFmt,
const SfxPoolItem& rItem ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
return Seek_Entry( rFmt, &nPos )
? aShareArr[ nPos ]->GetFormat( rItem )
: 0;
@@ -4646,7 +4646,7 @@ void SwShareBoxFmts::AddFormat( const SwFrmFmt& rOld, const SwFrmFmt& rNew )
//leider werden auch die CellFrms gefunden
// if( !rOld.IsLastDepend() )
{
- USHORT nPos;
+ sal_uInt16 nPos;
SwShareBoxFmt* pEntry;
if( !Seek_Entry( rOld, &nPos ))
{
@@ -4727,27 +4727,27 @@ void SwShareBoxFmts::SetAttr( SwTableLine& rLine, const SfxPoolItem& rItem )
void SwShareBoxFmts::RemoveFormat( const SwFrmFmt& rFmt )
{
- for( USHORT i = aShareArr.Count(); i; )
+ for( sal_uInt16 i = aShareArr.Count(); i; )
if( aShareArr[ --i ]->RemoveFormat( rFmt ))
aShareArr.DeleteAndDestroy( i );
}
-BOOL SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, USHORT* pPos ) const
+sal_Bool SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, sal_uInt16* pPos ) const
{
- ULONG nIdx = (ULONG)&rFmt;
- USHORT nO = aShareArr.Count(), nM, nU = 0;
+ sal_uLong nIdx = (sal_uLong)&rFmt;
+ sal_uInt16 nO = aShareArr.Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
while( nU <= nO )
{
nM = nU + ( nO - nU ) / 2;
- ULONG nFmt = (ULONG)&aShareArr[ nM ]->GetOldFormat();
+ sal_uLong nFmt = (sal_uLong)&aShareArr[ nM ]->GetOldFormat();
if( nFmt == nIdx )
{
if( pPos )
*pPos = nM;
- return TRUE;
+ return sal_True;
}
else if( nFmt < nIdx )
nU = nM + 1;
@@ -4755,7 +4755,7 @@ BOOL SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, USHORT* pPos ) const
{
if( pPos )
*pPos = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
@@ -4763,7 +4763,7 @@ BOOL SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, USHORT* pPos ) const
}
if( pPos )
*pPos = nU;
- return FALSE;
+ return sal_False;
}
diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx
index 322d27d7a859..b5ca141e1fa2 100644
--- a/sw/source/core/doc/visiturl.cxx
+++ b/sw/source/core/doc/visiturl.cxx
@@ -67,7 +67,7 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
sURL == pDoc->GetDocShell()->GetMedium()->GetName() )
(sBkmk = pIURL->GetMark()).Insert( INET_MARK_TOKEN, 0 );
- BOOL bAction = FALSE, bUnLockView = FALSE;
+ sal_Bool bAction = sal_False, bUnLockView = sal_False;
const SwFmtINetFmt* pItem;
const SwTxtINetFmt* pTxtAttr;
const SwTxtNode* pTxtNd;
@@ -83,9 +83,9 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
if( !bAction && pESh )
{
pESh->StartAllAction();
- bAction = TRUE;
+ bAction = sal_True;
bUnLockView = !pESh->IsViewLocked();
- pESh->LockView( TRUE );
+ pESh->LockView( sal_True );
}
const_cast<SwTxtINetFmt*>(pTxtAttr)->SetVisitedValid( false );
const SwTxtAttr* pAttr = pTxtAttr;
@@ -98,20 +98,20 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
if( bAction )
pESh->EndAllAction();
if( bUnLockView )
- pESh->LockView( FALSE );
+ pESh->LockView( sal_False );
}
}
// erfrage ob die URL besucht war. Uebers Doc, falls nur ein Bookmark
// angegeben ist. Dann muss der Doc. Name davor gesetzt werden!
-BOOL SwDoc::IsVisitedURL( const String& rURL ) const
+sal_Bool SwDoc::IsVisitedURL( const String& rURL ) const
{
#if OSL_DEBUG_LEVEL > 1
static long nTmp = 0;
++nTmp;
#endif
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rURL.Len() )
{
INetURLHistory *pHist = INetURLHistory::GetOrCreate();
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index 9c2ce7af3139..658033bbb05c 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -79,10 +79,10 @@ namespace
nNewIdx is the new position of interest.
*/
- static void lcl_NonCopyCount( const SwPaM& rPam, SwNodeIndex& rLastIdx, const ULONG nNewIdx, ULONG& rDelCount )
+ static void lcl_NonCopyCount( const SwPaM& rPam, SwNodeIndex& rLastIdx, const sal_uLong nNewIdx, sal_uLong& rDelCount )
{
- ULONG nStart = rPam.Start()->nNode.GetIndex();
- ULONG nEnd = rPam.End()->nNode.GetIndex();
+ sal_uLong nStart = rPam.Start()->nNode.GetIndex();
+ sal_uLong nEnd = rPam.End()->nNode.GetIndex();
if( rLastIdx.GetIndex() < nNewIdx ) // Moving forward?
{
do // count "non-copy" nodes
@@ -113,9 +113,9 @@ namespace
const SwPosition& rOrigStt,
const SwPosition& rCpyStt,
SwPosition& rChgPos,
- ULONG nDelCount )
+ sal_uLong nDelCount )
{
- ULONG nNdOff = rOrigPos.nNode.GetIndex();
+ sal_uLong nNdOff = rOrigPos.nNode.GetIndex();
nNdOff -= rOrigStt.nNode.GetIndex();
nNdOff -= nDelCount;
xub_StrLen nCntntPos = rOrigPos.nContent.GetIndex();
@@ -169,7 +169,7 @@ namespace
}
// We have to count the "non-copied" nodes..
SwNodeIndex aCorrIdx(rStt.nNode);
- ULONG nDelCount = 0;
+ sal_uLong nDelCount = 0;
for(mark_vector_t::const_iterator ppMark = vMarksToCopy.begin();
ppMark != vMarksToCopy.end();
++ppMark)
@@ -289,37 +289,37 @@ SwCntntNode* SwTxtNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
}
-BOOL lcl_SrchNew( const _MapTblFrmFmt& rMap, void * pPara )
+sal_Bool lcl_SrchNew( const _MapTblFrmFmt& rMap, void * pPara )
{
if( rMap.pOld != *(const SwFrmFmt**)pPara )
- return TRUE;
+ return sal_True;
*((const SwFrmFmt**)pPara) = rMap.pNew;
- return FALSE; // abbrechen, Pointer gefunden
+ return sal_False; // abbrechen, Pointer gefunden
}
struct _CopyTable
{
SwDoc* pDoc;
- ULONG nOldTblSttIdx;
+ sal_uLong nOldTblSttIdx;
_MapTblFrmFmts& rMapArr;
SwTableLine* pInsLine;
SwTableBox* pInsBox;
SwTableNode *pTblNd;
const SwTable *pOldTable;
- _CopyTable( SwDoc* pDc, _MapTblFrmFmts& rArr, ULONG nOldStt,
+ _CopyTable( SwDoc* pDc, _MapTblFrmFmts& rArr, sal_uLong nOldStt,
SwTableNode& rTblNd, const SwTable* pOldTbl )
: pDoc(pDc), nOldTblSttIdx(nOldStt), rMapArr(rArr),
pInsLine(0), pInsBox(0), pTblNd(&rTblNd), pOldTable( pOldTbl )
{}
};
-BOOL lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara );
+sal_Bool lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara );
-BOOL lcl_CopyTblLine( const SwTableLine*& rpLine, void* pPara );
+sal_Bool lcl_CopyTblLine( const SwTableLine*& rpLine, void* pPara );
-BOOL lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara )
{
_CopyTable* pCT = (_CopyTable*)pPara;
@@ -328,7 +328,7 @@ BOOL lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara )
if( pBoxFmt == rpBox->GetFrmFmt() ) // ein neues anlegen ??
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pBoxFmt->GetItemState( RES_BOXATR_FORMULA, FALSE,
+ if( SFX_ITEM_SET == pBoxFmt->GetItemState( RES_BOXATR_FORMULA, sal_False,
&pItem ) && ((SwTblBoxFormula*)pItem)->IsIntrnlName() )
{
((SwTblBoxFormula*)pItem)->PtrToBoxNm( pCT->pOldTable );
@@ -339,12 +339,12 @@ BOOL lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara )
if( rpBox->GetSttIdx() )
{
- SvNumberFormatter* pN = pCT->pDoc->GetNumberFormatter( FALSE );
+ SvNumberFormatter* pN = pCT->pDoc->GetNumberFormatter( sal_False );
if( pN && pN->HasMergeFmtTbl() && SFX_ITEM_SET == pBoxFmt->
- GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem ) )
+ GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem ) )
{
- ULONG nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
- ULONG nNewIdx = pN->GetMergeFmtIndex( nOldIdx );
+ sal_uLong nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
+ sal_uLong nNewIdx = pN->GetMergeFmtIndex( nOldIdx );
if( nNewIdx != nOldIdx )
pBoxFmt->SetFmtAttr( SwTblBoxNumFormat( nNewIdx ));
@@ -355,7 +355,7 @@ BOOL lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara )
pCT->rMapArr.Count() );
}
- USHORT nLines = rpBox->GetTabLines().Count();
+ sal_uInt16 nLines = rpBox->GetTabLines().Count();
SwTableBox* pNewBox;
if( nLines )
pNewBox = new SwTableBox( pBoxFmt, nLines, pCT->pInsLine );
@@ -380,10 +380,10 @@ BOOL lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara )
else if( pNewBox->IsInHeadline( &pCT->pTblNd->GetTable() ))
// in der HeadLine sind die Absaetze mit BedingtenVorlage anzupassen
pNewBox->GetSttNd()->CheckSectionCondColl();
- return TRUE;
+ return sal_True;
}
-BOOL lcl_CopyTblLine( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_CopyTblLine( const SwTableLine*& rpLine, void* pPara )
{
_CopyTable* pCT = (_CopyTable*)pPara;
SwTableLineFmt* pLineFmt = (SwTableLineFmt*)rpLine->GetFrmFmt();
@@ -410,7 +410,7 @@ BOOL lcl_CopyTblLine( const SwTableLine*& rpLine, void* pPara )
}
pCT->pInsLine = pNewLine;
((SwTableLine*)rpLine)->GetTabBoxes().ForEach( &lcl_CopyTblBox, pCT );
- return TRUE;
+ return sal_True;
}
SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
@@ -440,7 +440,7 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
if( !pDoc->IsCopyIsMove() )
{
const SwFrmFmts& rTblFmts = *pDoc->GetTblFrmFmts();
- for( USHORT n = rTblFmts.Count(); n; )
+ for( sal_uInt16 n = rTblFmts.Count(); n; )
if( rTblFmts[ --n ]->GetName() == sTblName )
{
sTblName = pDoc->GetUniqueTblName();
@@ -475,7 +475,7 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
// tauschen am Node den Tabellen-Pointer aus
SwDDETable* pNewTable = new SwDDETable( pTblNd->GetTable(), pDDEType );
- pTblNd->SetNewTable( pNewTable, FALSE );
+ pTblNd->SetNewTable( pNewTable, sal_False );
}
// dann kopiere erstmal den Inhalt der Tabelle, die Zuordnung der
// Boxen/Lines und das anlegen der Frames erfolgt spaeter
@@ -487,7 +487,7 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
// We have to make sure that the table node of the SwTable is accessible, even
// without any content in aSortCntBoxes. #i26629#
pTblNd->GetTable().SetTableNode( pTblNd );
- rNds._Copy( aRg, aInsPos, FALSE );
+ rNds._Copy( aRg, aInsPos, sal_False );
pTblNd->GetTable().SetTableNode( 0 );
// Sonderbehandlung fuer eine einzelne Box
@@ -527,10 +527,10 @@ void SwTxtNode::CopyCollFmt( SwTxtNode& rDestNd )
{
// Sonderbehandlung fuer unsere Break-Attribute
const SfxPoolItem* pAttr;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE, &pAttr ) )
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pAttr ) )
aPgBrkSet.Put( *pAttr );
- if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, FALSE, &pAttr ) )
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, sal_False, &pAttr ) )
aPgBrkSet.Put( *pAttr );
}
@@ -546,12 +546,12 @@ void SwTxtNode::CopyCollFmt( SwTxtNode& rDestNd )
// ----- Copy-Methode vom SwDoc ------
// verhinder das Kopieren in Fly's, die im Bereich verankert sind.
-BOOL lcl_ChkFlyFly( SwDoc* pDoc, ULONG nSttNd, ULONG nEndNd,
- ULONG nInsNd )
+sal_Bool lcl_ChkFlyFly( SwDoc* pDoc, sal_uLong nSttNd, sal_uLong nEndNd,
+ sal_uLong nInsNd )
{
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- for( USHORT n = 0; n < rFrmFmtTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFrmFmtTbl.Count(); ++n )
{
SwFrmFmt const*const pFmt = rFrmFmtTbl[n];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -572,15 +572,15 @@ BOOL lcl_ChkFlyFly( SwDoc* pDoc, ULONG nSttNd, ULONG nEndNd,
if( pSNd->GetIndex() < nInsNd &&
nInsNd < pSNd->EndOfSectionIndex() )
- return TRUE; // nicht kopieren !!
+ return sal_True; // nicht kopieren !!
if( lcl_ChkFlyFly( pDoc, pSNd->GetIndex(),
pSNd->EndOfSectionIndex(), nInsNd ) )
- return TRUE; // nicht kopieren !!
+ return sal_True; // nicht kopieren !!
}
}
- return FALSE;
+ return sal_False;
}
void lcl_DeleteRedlines( const SwPaM& rPam, SwPaM& rCpyPam )
@@ -594,10 +594,10 @@ void lcl_DeleteRedlines( const SwPaM& rPam, SwPaM& rCpyPam )
SwPaM* pDelPam = 0;
const SwPosition *pStt = rPam.Start(), *pEnd = rPam.End();
// We have to count the "non-copied" nodes
- ULONG nDelCount = 0;
+ sal_uLong nDelCount = 0;
SwNodeIndex aCorrIdx( pStt->nNode );
- USHORT n = 0;
+ sal_uInt16 n = 0;
pSrcDoc->GetRedline( *pStt, &n );
for( ; n < rTbl.Count(); ++n )
{
@@ -647,15 +647,15 @@ void lcl_DeleteRedlines( const SwPaM& rPam, SwPaM& rCpyPam )
RedlineMode_t eOld = pDestDoc->GetRedlineMode();
pDestDoc->SetRedlineMode_intern( (RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE));
- BOOL bDoesUndo = pDestDoc->DoesUndo();
- pDestDoc->DoUndo( FALSE );
+ sal_Bool bDoesUndo = pDestDoc->DoesUndo();
+ pDestDoc->DoUndo( sal_False );
do {
pDestDoc->DeleteAndJoin( *(SwPaM*)pDelPam->GetNext() );
if( pDelPam->GetNext() == pDelPam )
break;
delete pDelPam->GetNext();
- } while( TRUE );
+ } while( sal_True );
delete pDelPam;
pDestDoc->DoUndo( bDoesUndo );
@@ -693,7 +693,7 @@ SwDoc::CopyRange( SwPaM& rPam, SwPosition& rPos, const bool bCopyAll ) const
if( pDoc == this )
{
// Start-/EndNode noch korrigieren
- ULONG nStt = pStt->nNode.GetIndex(),
+ sal_uLong nStt = pStt->nNode.GetIndex(),
nEnd = pEnd->nNode.GetIndex(),
nDiff = nEnd - nStt +1;
SwNode* pNd = GetNodes()[ nStt ];
@@ -737,8 +737,8 @@ SwDoc::CopyRange( SwPaM& rPam, SwPosition& rPos, const bool bCopyAll ) const
"please tell me what you did to get here!");
pDoc->SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE));
- BOOL bDoUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE ); // Auf jedenfall Undo abschalten
+ sal_Bool bDoUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False ); // Auf jedenfall Undo abschalten
// dann kopiere den Bereich im unteren DokumentBereich,
// (mit Start/End-Nodes geklammert) und verschiebe diese
// dann an die gewuenschte Stelle.
@@ -903,7 +903,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
// bewege den Pam von der Insert-Position ein zurueck, dadurch wird
// die Position nicht "verschoben"
aCpyPam.SetMark();
- BOOL bCanMoveBack = aCpyPam.Move( fnMoveBackward, fnGoCntnt );
+ sal_Bool bCanMoveBack = aCpyPam.Move( fnMoveBackward, fnGoCntnt );
if( !bCanMoveBack )
aCpyPam.GetPoint()->nNode--;
@@ -917,7 +917,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
( ( pDestTxtNd && !pDestTxtNd->GetTxt().Len() ) ||
( !bOneNode && !rPos.nContent.GetIndex() ) );
bool bCopyBookmarks = true;
- BOOL bStartIsTxtNode = 0 != pSttTxtNd;
+ sal_Bool bStartIsTxtNode = 0 != pSttTxtNd;
// #i104585# copy outline num rule to clipboard (for ASCII filter)
if (pDoc->IsClipBoard() && GetOutlineNumRule())
@@ -959,7 +959,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
if( !bCopyCollFmt || bColumnSel || pStt->nContent.GetIndex() )
{
SwIndex aDestIdx( rPos.nContent );
- BOOL bCopyOk = FALSE;
+ sal_Bool bCopyOk = sal_False;
if( !pDestTxtNd )
{
if( pStt->nContent.GetIndex() || bOneNode )
@@ -968,7 +968,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
else
{
pDestTxtNd = static_cast<SwTxtNode*>(pSttTxtNd->MakeCopy( pDoc, aInsPos ));
- bCopyOk = TRUE;
+ bCopyOk = sal_True;
}
aDestIdx.Assign( pDestTxtNd, 0 );
bCopyCollFmt = true;
@@ -976,8 +976,8 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
else if( !bOneNode || bColumnSel )
{
xub_StrLen nCntntEnd = pEnd->nContent.GetIndex();
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
pDoc->SplitNode( rPos, false );
pDoc->DoUndo( bDoesUndo );
@@ -994,7 +994,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
// korrigiere den Bereich wieder !!
if( bEndEqualIns )
{
- BOOL bChg = pEnd != rPam.GetPoint();
+ sal_Bool bChg = pEnd != rPam.GetPoint();
if( bChg )
rPam.Exchange();
rPam.Move( fnMoveBackward, fnGoCntnt );
@@ -1025,12 +1025,12 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
if (pAttrSet != NULL)
{
const SfxPoolItem * pItem = NULL;
- aNumRuleState = pAttrSet->GetItemState(RES_PARATR_NUMRULE, FALSE, &pItem);
+ aNumRuleState = pAttrSet->GetItemState(RES_PARATR_NUMRULE, sal_False, &pItem);
if (SFX_ITEM_SET == aNumRuleState)
aNumRuleItem = *((SwNumRuleItem *) pItem);
aListIdState =
- pAttrSet->GetItemState(RES_PARATR_LIST_ID, FALSE, &pItem);
+ pAttrSet->GetItemState(RES_PARATR_LIST_ID, sal_False, &pItem);
if (SFX_ITEM_SET == aListIdState)
{
aListIdItem.SetValue( static_cast<const SfxStringItem*>(pItem)->GetValue() );
@@ -1102,12 +1102,12 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
else if( rPos.nContent.GetIndex() )
{ // Insertion in the middle of a text node, it has to be split
// (and joined from undo)
- bStartIsTxtNode = TRUE;
+ bStartIsTxtNode = sal_True;
// splitte den TextNode, bei dem Eingefuegt wird.
xub_StrLen nCntntEnd = pEnd->nContent.GetIndex();
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
pDoc->SplitNode( rPos, false );
pDoc->DoUndo( bDoesUndo );
@@ -1159,7 +1159,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
// will ensure that this node will be deleted during Undo
// using JoinNext.
DBG_ASSERT( !bStartIsTxtNode, "Oops, undo may be instable now." );
- bStartIsTxtNode = TRUE;
+ bStartIsTxtNode = sal_True;
}
/* #107213# Save numrule at destination */
@@ -1176,12 +1176,12 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
const SfxPoolItem * pItem = NULL;
aNumRuleState =
- pAttrSet->GetItemState(RES_PARATR_NUMRULE, FALSE, &pItem);
+ pAttrSet->GetItemState(RES_PARATR_NUMRULE, sal_False, &pItem);
if (SFX_ITEM_SET == aNumRuleState)
aNumRuleItem = *((SwNumRuleItem *) pItem);
aListIdState =
- pAttrSet->GetItemState(RES_PARATR_LIST_ID, FALSE, &pItem);
+ pAttrSet->GetItemState(RES_PARATR_LIST_ID, sal_False, &pItem);
if (SFX_ITEM_SET == aListIdState)
aListIdItem.SetValue( static_cast<const SfxStringItem*>(pItem)->GetValue() );
}
@@ -1233,22 +1233,22 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
if( pSttTxtNd && bCopyCollFmt && pDestTxtNd->HasSwAttrSet() )
{
aBrkSet.Put( *pDestTxtNd->GetpSwAttrSet() );
- if( SFX_ITEM_SET == aBrkSet.GetItemState( RES_BREAK, FALSE ) )
+ if( SFX_ITEM_SET == aBrkSet.GetItemState( RES_BREAK, sal_False ) )
pDestTxtNd->ResetAttr( RES_BREAK );
- if( SFX_ITEM_SET == aBrkSet.GetItemState( RES_PAGEDESC, FALSE ) )
+ if( SFX_ITEM_SET == aBrkSet.GetItemState( RES_PAGEDESC, sal_False ) )
pDestTxtNd->ResetAttr( RES_PAGEDESC );
}
if( aInsPos == pEnd->nNode )
{
SwNodeIndex aSaveIdx( aInsPos, -1 );
- CopyWithFlyInFly( aRg, 0,aInsPos, bMakeNewFrms, FALSE );
+ CopyWithFlyInFly( aRg, 0,aInsPos, bMakeNewFrms, sal_False );
aSaveIdx++;
pEnd->nNode = aSaveIdx;
pEnd->nContent.Assign( aSaveIdx.GetNode().GetTxtNode(), 0 );
}
else
- CopyWithFlyInFly( aRg, pEnd->nContent.GetIndex(), aInsPos, bMakeNewFrms, FALSE );
+ CopyWithFlyInFly( aRg, pEnd->nContent.GetIndex(), aInsPos, bMakeNewFrms, sal_False );
bCopyBookmarks = false;
@@ -1259,7 +1259,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
pDestTxtNd->SetAttr( aBrkSet );
}
}
- } while( FALSE );
+ } while( sal_False );
// Position ummelden ( falls verschoben / im anderen Node )
rPos.nContent.Assign( rPos.nNode.GetNode().GetCntntNode(),
@@ -1268,7 +1268,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
if( rPos.nNode != aInsPos )
{
aCpyPam.GetMark()->nNode = aInsPos;
- aCpyPam.GetMark()->nContent.Assign( aCpyPam.GetCntntNode(FALSE), 0 );
+ aCpyPam.GetMark()->nContent.Assign( aCpyPam.GetCntntNode(sal_False), 0 );
rPos = *aCpyPam.GetMark();
}
else
@@ -1286,7 +1286,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
// falls Undo eingeschaltet ist, so speicher den eingefuegten Bereich
if( pDoc->DoesUndo() )
- pUndo->SetInsertRange( aCpyPam, TRUE, bStartIsTxtNode );
+ pUndo->SetInsertRange( aCpyPam, sal_True, bStartIsTxtNode );
if( pCpyRange )
{
@@ -1314,16 +1314,16 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
// ----- Copy-Methode vom SwDoc - "kopiere Fly's in Fly's" ------
void SwDoc::CopyWithFlyInFly( const SwNodeRange& rRg, const xub_StrLen nEndContentIndex,
- const SwNodeIndex& rInsPos, BOOL bMakeNewFrms,
- BOOL bDelRedlines, BOOL bCopyFlyAtFly ) const
+ const SwNodeIndex& rInsPos, sal_Bool bMakeNewFrms,
+ sal_Bool bDelRedlines, sal_Bool bCopyFlyAtFly ) const
{
SwDoc* pDest = rInsPos.GetNode().GetDoc();
_SaveRedlEndPosForRestore aRedlRest( rInsPos, 0 );
SwNodeIndex aSavePos( rInsPos, -1 );
- BOOL bEndIsEqualEndPos = rInsPos == rRg.aEnd;
- GetNodes()._CopyNodes( rRg, rInsPos, bMakeNewFrms, TRUE );
+ sal_Bool bEndIsEqualEndPos = rInsPos == rRg.aEnd;
+ GetNodes()._CopyNodes( rRg, rInsPos, bMakeNewFrms, sal_True );
aSavePos++;
if( bEndIsEqualEndPos )
((SwNodeIndex&)rRg.aEnd) = aSavePos;
@@ -1350,8 +1350,8 @@ void SwDoc::CopyWithFlyInFly( const SwNodeRange& rRg, const xub_StrLen nEndConte
#endif
// Undo abschalten
- BOOL bUndo = pDest->DoesUndo();
- pDest->DoUndo( FALSE );
+ sal_Bool bUndo = pDest->DoesUndo();
+ pDest->DoUndo( sal_False );
CopyFlyInFlyImpl( rRg, nEndContentIndex, aSavePos, bCopyFlyAtFly );
pDest->DoUndo( bUndo );
@@ -1398,9 +1398,9 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
// beibehalten.
SwDoc *const pDest = rStartIdx.GetNode().GetDoc();
_ZSortFlys aArr;
- USHORT nArrLen = GetSpzFrmFmts()->Count();
+ sal_uInt16 nArrLen = GetSpzFrmFmts()->Count();
- for ( USHORT n = 0; n < nArrLen; ++n )
+ for ( sal_uInt16 n = 0; n < nArrLen; ++n )
{
SwFrmFmt const*const pFmt = (*GetSpzFrmFmts())[n];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -1470,7 +1470,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
//die Chains entsprechend aufgebaut werden koennen.
SvPtrarr aNewArr( 10, 10 );
- for ( USHORT n = 0; n < aArr.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aArr.Count(); ++n )
{
const _ZSortFly& rZSortFly = aArr[ n ];
@@ -1490,7 +1490,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
{
// First, determine number of anchor text node in the copied range.
// Note: The anchor text node *have* to be inside the copied range.
- ULONG nAnchorTxtNdNumInRange( 0L );
+ sal_uLong nAnchorTxtNdNumInRange( 0L );
bool bAnchorTxtNdFound( false );
SwNodeIndex aIdx( rRg.aStart );
while ( !bAnchorTxtNdFound && aIdx <= rRg.aEnd )
@@ -1565,7 +1565,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
// ueberpruefe Rekursion: Inhalt in "seinen eigenen" Frame
// kopieren. Dann nicht kopieren
- BOOL bMakeCpy = TRUE;
+ sal_Bool bMakeCpy = sal_True;
if( pDest == this )
{
const SwFmtCntnt& rCntnt = rZSortFly.GetFmt()->GetCntnt();
@@ -1575,7 +1575,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
pSNd->GetIndex() < rStartIdx.GetIndex() &&
rStartIdx.GetIndex() < pSNd->EndOfSectionIndex() )
{
- bMakeCpy = FALSE;
+ bMakeCpy = sal_False;
aArr.Remove( n, 1 );
--n;
}
@@ -1592,13 +1592,13 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
ASSERT( aArr.Count() == aNewArr.Count(), "Missing new Flys" );
if ( aArr.Count() == aNewArr.Count() )
{
- for ( USHORT n = 0; n < aArr.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aArr.Count(); ++n )
{
const SwFrmFmt *pFmt = aArr[n].GetFmt();
const SwFmtChain &rChain = pFmt->GetChain();
int nCnt = 0 != rChain.GetPrev();
nCnt += rChain.GetNext() ? 1: 0;
- for ( USHORT k = 0; nCnt && k < aArr.Count(); ++k )
+ for ( sal_uInt16 k = 0; nCnt && k < aArr.Count(); ++k )
{
const _ZSortFly &rTmp = aArr[k];
const SwFrmFmt *pTmp = rTmp.GetFmt();
diff --git a/sw/source/core/docnode/ndindex.cxx b/sw/source/core/docnode/ndindex.cxx
index cd7288430479..a6b718df2d09 100644
--- a/sw/source/core/docnode/ndindex.cxx
+++ b/sw/source/core/docnode/ndindex.cxx
@@ -47,7 +47,7 @@ SwNodeRange::SwNodeRange( const SwNodeRange &rRange )
: aStart( rRange.aStart ), aEnd( rRange.aEnd )
{}
-SwNodeRange::SwNodeRange( SwNodes& rNds, ULONG nSttIdx, ULONG nEndIdx )
+SwNodeRange::SwNodeRange( SwNodes& rNds, sal_uLong nSttIdx, sal_uLong nEndIdx )
: aStart( rNds, nSttIdx ), aEnd( rNds, nEndIdx )
{}
@@ -63,7 +63,7 @@ SwNodeRange::SwNodeRange( const SwNode& rS, long nSttDiff,
{}
-SwNodeIndex::SwNodeIndex( SwNodes& rNds, ULONG nIdx )
+SwNodeIndex::SwNodeIndex( SwNodes& rNds, sal_uLong nIdx )
: pNd( rNds[ nIdx ] ), pNext( 0 ), pPrev( 0 )
{
rNds.RegisterIndex( *this );
@@ -135,7 +135,7 @@ SwNodeIndex& SwNodeIndex::operator=( const SwNode& rNd )
return *this;
}
-SwNodeIndex& SwNodeIndex::Assign( SwNodes& rNds, ULONG nIdx )
+SwNodeIndex& SwNodeIndex::Assign( SwNodes& rNds, sal_uLong nIdx )
{
if( &pNd->GetNodes() != &rNds )
{
diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx
index 985c4c8e4709..6ad9605a18f2 100644
--- a/sw/source/core/docnode/ndnotxt.cxx
+++ b/sw/source/core/docnode/ndnotxt.cxx
@@ -50,14 +50,14 @@
// <--
SwNoTxtNode::SwNoTxtNode( const SwNodeIndex & rWhere,
- const BYTE nNdType,
+ const sal_uInt8 nNdType,
SwGrfFmtColl *pGrfColl,
SwAttrSet* pAutoAttr ) :
SwCntntNode( rWhere, nNdType, pGrfColl ),
pContour( 0 ),
- bAutomaticContour( FALSE ),
- bContourMapModeValid( TRUE ),
- bPixelContour( FALSE )
+ bAutomaticContour( sal_False ),
+ bContourMapModeValid( sal_True ),
+ bPixelContour( sal_False )
{
// soll eine Harte-Attributierung gesetzt werden?
if( pAutoAttr )
@@ -93,19 +93,19 @@ void SwNoTxtNode::NewAttrSet( SwAttrPool& rPool )
// bei Grafiken und OLE-Objekten
-BOOL SwNoTxtNode::RestorePersistentData()
+sal_Bool SwNoTxtNode::RestorePersistentData()
{
- return TRUE;
+ return sal_True;
}
-BOOL SwNoTxtNode::SavePersistentData()
+sal_Bool SwNoTxtNode::SavePersistentData()
{
- return TRUE;
+ return sal_True;
}
-void SwNoTxtNode::SetContour( const PolyPolygon *pPoly, BOOL bAutomatic )
+void SwNoTxtNode::SetContour( const PolyPolygon *pPoly, sal_Bool bAutomatic )
{
delete pContour;
if ( pPoly )
@@ -113,8 +113,8 @@ void SwNoTxtNode::SetContour( const PolyPolygon *pPoly, BOOL bAutomatic )
else
pContour = 0;
bAutomaticContour = bAutomatic;
- bContourMapModeValid = TRUE;
- bPixelContour = FALSE;
+ bContourMapModeValid = sal_True;
+ bPixelContour = sal_False;
}
@@ -122,9 +122,9 @@ void SwNoTxtNode::CreateContour()
{
ASSERT( !pContour, "Contour available." );
pContour = new PolyPolygon(SvxContourDlg::CreateAutoContour(GetGraphic()));
- bAutomaticContour = TRUE;
- bContourMapModeValid = TRUE;
- bPixelContour = FALSE;
+ bAutomaticContour = sal_True;
+ bContourMapModeValid = sal_True;
+ bPixelContour = sal_False;
}
const PolyPolygon *SwNoTxtNode::HasContour() const
@@ -132,7 +132,7 @@ const PolyPolygon *SwNoTxtNode::HasContour() const
if( !bContourMapModeValid )
{
const MapMode aGrfMap( GetGraphic().GetPrefMapMode() );
- BOOL bPixelGrf = aGrfMap.GetMapUnit() == MAP_PIXEL;
+ sal_Bool bPixelGrf = aGrfMap.GetMapUnit() == MAP_PIXEL;
const MapMode aContourMap( bPixelGrf ? MAP_PIXEL : MAP_100TH_MM );
if( bPixelGrf ? !bPixelContour : aGrfMap != aContourMap )
{
@@ -141,13 +141,13 @@ const PolyPolygon *SwNoTxtNode::HasContour() const
OutputDevice* pOutDev =
(bPixelGrf || bPixelContour) ? Application::GetDefaultDevice()
: 0;
- USHORT nPolyCount = pContour->Count();
- for( USHORT j=0; j<nPolyCount; j++ )
+ sal_uInt16 nPolyCount = pContour->Count();
+ for( sal_uInt16 j=0; j<nPolyCount; j++ )
{
Polygon& rPoly = (*pContour)[j];
- USHORT nCount = rPoly.GetSize();
- for( USHORT i=0 ; i<nCount; i++ )
+ sal_uInt16 nCount = rPoly.GetSize();
+ for( sal_uInt16 i=0 ; i<nCount; i++ )
{
if( bPixelGrf )
rPoly[i] = pOutDev->LogicToPixel( rPoly[i],
@@ -161,8 +161,8 @@ const PolyPolygon *SwNoTxtNode::HasContour() const
}
}
}
- ((SwNoTxtNode *)this)->bContourMapModeValid = TRUE;
- ((SwNoTxtNode *)this)->bPixelContour = FALSE;
+ ((SwNoTxtNode *)this)->bContourMapModeValid = sal_True;
+ ((SwNoTxtNode *)this)->bPixelContour = sal_False;
}
return pContour;
@@ -181,13 +181,13 @@ void SwNoTxtNode::SetContourAPI( const PolyPolygon *pPoly )
pContour = new PolyPolygon( *pPoly );
else
pContour = 0;
- bContourMapModeValid = FALSE;
+ bContourMapModeValid = sal_False;
}
-BOOL SwNoTxtNode::GetContourAPI( PolyPolygon &rContour ) const
+sal_Bool SwNoTxtNode::GetContourAPI( PolyPolygon &rContour ) const
{
if( !pContour )
- return FALSE;
+ return sal_False;
rContour = *pContour;
if( bContourMapModeValid )
@@ -200,13 +200,13 @@ BOOL SwNoTxtNode::GetContourAPI( PolyPolygon &rContour ) const
if( aGrfMap.GetMapUnit() != MAP_PIXEL &&
aGrfMap != aContourMap )
{
- USHORT nPolyCount = rContour.Count();
- for( USHORT j=0; j<nPolyCount; j++ )
+ sal_uInt16 nPolyCount = rContour.Count();
+ for( sal_uInt16 j=0; j<nPolyCount; j++ )
{
Polygon& rPoly = (*pContour)[j];
- USHORT nCount = rPoly.GetSize();
- for( USHORT i=0 ; i<nCount; i++ )
+ sal_uInt16 nCount = rPoly.GetSize();
+ for( sal_uInt16 i=0 ; i<nCount; i++ )
{
rPoly[i] = OutputDevice::LogicToLogic( rPoly[i], aGrfMap,
aContourMap );
@@ -215,12 +215,12 @@ BOOL SwNoTxtNode::GetContourAPI( PolyPolygon &rContour ) const
}
}
- return TRUE;
+ return sal_True;
}
-BOOL SwNoTxtNode::IsPixelContour() const
+sal_Bool SwNoTxtNode::IsPixelContour() const
{
- BOOL bRet;
+ sal_Bool bRet;
if( bContourMapModeValid )
{
const MapMode aGrfMap( GetGraphic().GetPrefMapMode() );
@@ -240,7 +240,7 @@ Graphic SwNoTxtNode::GetGraphic() const
Graphic aRet;
if ( GetGrfNode() )
{
- ((SwGrfNode*)this)->SwapIn( TRUE );
+ ((SwGrfNode*)this)->SwapIn( sal_True );
aRet = ((SwGrfNode*)this)->GetGrf();
}
else
diff --git a/sw/source/core/docnode/ndnum.cxx b/sw/source/core/docnode/ndnum.cxx
index 1d1203a70e9b..6e00748b618e 100644
--- a/sw/source/core/docnode/ndnum.cxx
+++ b/sw/source/core/docnode/ndnum.cxx
@@ -37,11 +37,11 @@
#include <docary.hxx>
_SV_IMPL_SORTAR_ALG( SwOutlineNodes, SwNodePtr )
-BOOL SwOutlineNodes::Seek_Entry( const SwNodePtr rSrch, USHORT* pFndPos ) const
+sal_Bool SwOutlineNodes::Seek_Entry( const SwNodePtr rSrch, sal_uInt16* pFndPos ) const
{
- ULONG nIdx = rSrch->GetIndex();
+ sal_uLong nIdx = rSrch->GetIndex();
- USHORT nO = Count(), nM, nU = 0;
+ sal_uInt16 nO = Count(), nM, nU = 0;
if( nO > 0 )
{
//JP 17.03.98: aufgrund des Bug 48592 - wo unter anderem nach Undo/Redo
@@ -49,7 +49,7 @@ BOOL SwOutlineNodes::Seek_Entry( const SwNodePtr rSrch, USHORT* pFndPos ) const
// jetzt mal einen Check eingebaut.
#ifdef DBG_UTIL
{
- for( USHORT n = 1; n < nO; ++n )
+ for( sal_uInt16 n = 1; n < nO; ++n )
if( &(*this)[ n-1 ]->GetNodes() !=
&(*this)[ n ]->GetNodes() )
{
@@ -66,7 +66,7 @@ BOOL SwOutlineNodes::Seek_Entry( const SwNodePtr rSrch, USHORT* pFndPos ) const
{
if( pFndPos )
*pFndPos = nM;
- return TRUE;
+ return sal_True;
}
else if( (*this)[ nM ]->GetIndex() < nIdx )
nU = nM + 1;
@@ -74,7 +74,7 @@ BOOL SwOutlineNodes::Seek_Entry( const SwNodePtr rSrch, USHORT* pFndPos ) const
{
if( pFndPos )
*pFndPos = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
@@ -82,7 +82,7 @@ BOOL SwOutlineNodes::Seek_Entry( const SwNodePtr rSrch, USHORT* pFndPos ) const
}
if( pFndPos )
*pFndPos = nU;
- return FALSE;
+ return sal_False;
}
void SwNodes::UpdateOutlineNode(SwNode & rNd)
@@ -91,7 +91,7 @@ void SwNodes::UpdateOutlineNode(SwNode & rNd)
if (pTxtNd && pTxtNd->IsOutlineStateChanged())
{
- BOOL bFound = pOutlineNds->Seek_Entry(pTxtNd);
+ sal_Bool bFound = pOutlineNds->Seek_Entry(pTxtNd);
if (pTxtNd->IsOutline())
{
@@ -124,12 +124,12 @@ void SwNodes::UpdateOutlineNode(SwNode & rNd)
}
}
-//void SwNodes::UpdateOutlineNode( const SwNode& rNd, BYTE nOldLevel, //#outline level,removed by zhaojianwei
-// BYTE nNewLevel )
+//void SwNodes::UpdateOutlineNode( const SwNode& rNd, sal_uInt8 nOldLevel, //#outline level,removed by zhaojianwei
+// sal_uInt8 nNewLevel )
//{
// const SwNodePtr pSrch = (SwNodePtr)&rNd;
-// USHORT nSttPos;
-// BOOL bSeekIdx = pOutlineNds->Seek_Entry( pSrch, &nSttPos );
+// sal_uInt16 nSttPos;
+// sal_Bool bSeekIdx = pOutlineNds->Seek_Entry( pSrch, &nSttPos );
//
// //if( NO_NUMBERING == nOldLevel ) //#outline level,zhaojianwei
// if( 0 == nOldLevel ) //<-end, zhaojianwei
@@ -138,7 +138,7 @@ void SwNodes::UpdateOutlineNode(SwNode & rNd)
// //ASSERT( !bSeekIdx, "Der Node ist schon als OutlineNode vorhanden" );
//
// //JP 12.03.99: 63293 - Nodes vom RedlineBereich NIE aufnehmen
-// ULONG nNd = rNd.GetIndex();
+// sal_uLong nNd = rNd.GetIndex();
// if( nNd < GetEndOfRedlines().GetIndex() &&
// nNd > GetEndOfRedlines().StartOfSectionNode()->GetIndex() )
// return ;
@@ -207,7 +207,7 @@ void SwNodes::UpdtOutlineIdx( const SwNode& rNd )
return;
const SwNodePtr pSrch = (SwNodePtr)&rNd;
- USHORT nPos;
+ sal_uInt16 nPos;
pOutlineNds->Seek_Entry( pSrch, &nPos );
if( nPos == pOutlineNds->Count() ) // keine zum Updaten vorhanden ?
return;
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 306560272c6f..d2876438dff3 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -91,8 +91,8 @@ bool lcl_IsInSameTblBox( SwNodes& _rNds,
do
{
if ( _bPrev
- ? !_rNds.GoPrevSection( &aChkIdx, FALSE, FALSE )
- : !_rNds.GoNextSection( &aChkIdx, FALSE, FALSE ) )
+ ? !_rNds.GoPrevSection( &aChkIdx, sal_False, sal_False )
+ : !_rNds.GoNextSection( &aChkIdx, sal_False, sal_False ) )
{
ASSERT( false, "<lcl_IsInSameTblBox(..)> - no previous/next!" );
return false;
@@ -122,8 +122,8 @@ bool lcl_IsInSameTblBox( SwNodes& _rNds,
// dann suche den StartNode der Box
const SwTableSortBoxes& rSortBoxes = pTblNd->GetTable().GetTabSortBoxes();
- ULONG nIdx = _rNd.GetIndex();
- for( USHORT n = 0; n < rSortBoxes.Count(); ++n )
+ sal_uLong nIdx = _rNd.GetIndex();
+ for( sal_uInt16 n = 0; n < rSortBoxes.Count(); ++n )
{
const SwStartNode* pNd = rSortBoxes[ n ]->GetSttNd();
if ( pNd->GetIndex() < nIdx && nIdx < pNd->EndOfSectionIndex() )
@@ -141,14 +141,14 @@ void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSectionData& rSectionData,
const SwNode& rStt, const SwNode& rEnd )
{
SwNodeIndex aIdx( rStt );
- if( !rNds.GoPrevSection( &aIdx, TRUE, FALSE ) ||
- !CheckNodesRange( rStt, aIdx, TRUE ) ||
+ if( !rNds.GoPrevSection( &aIdx, sal_True, sal_False ) ||
+ !CheckNodesRange( rStt, aIdx, sal_True ) ||
// OD 04.11.2003 #i21457#
!lcl_IsInSameTblBox( rNds, rStt, true ))
{
aIdx = rEnd;
- if( !rNds.GoNextSection( &aIdx, TRUE, FALSE ) ||
- !CheckNodesRange( rEnd, aIdx, TRUE ) ||
+ if( !rNds.GoNextSection( &aIdx, sal_True, sal_False ) ||
+ !CheckNodesRange( rEnd, aIdx, sal_True ) ||
// OD 04.11.2003 #i21457#
!lcl_IsInSameTblBox( rNds, rEnd, false ))
{
@@ -163,7 +163,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
SfxItemSet const*const pAttr, bool const bUpdate)
{
const SwNode* pPrvNd = 0;
- USHORT nRegionRet = 0;
+ sal_uInt16 nRegionRet = 0;
if( rRange.HasMark() &&
0 == ( nRegionRet = IsInsRegionAvailable( rRange, &pPrvNd ) ))
{
@@ -193,7 +193,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
ClearRedo();
pUndoInsSect = new SwUndoInsSection(rRange, rNewData, pAttr, pTOXBase);
AppendUndo( pUndoInsSect );
- DoUndo( FALSE );
+ DoUndo( sal_False );
}
SwSectionFmt* const pFmt = MakeSectionFmt( 0 );
@@ -235,7 +235,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
pSttPos->nNode.GetNode().GetTxtNode();
if (pTNd)
{
- pUndoInsSect->SaveSplitNode( pTNd, TRUE );
+ pUndoInsSect->SaveSplitNode( pTNd, sal_True );
}
}
@@ -246,7 +246,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
if (pTNd &&
(pTNd->GetTxt().Len() != pEndPos->nContent.GetIndex()))
{
- pUndoInsSect->SaveSplitNode( pTNd, FALSE );
+ pUndoInsSect->SaveSplitNode( pTNd, sal_False );
}
}
}
@@ -315,7 +315,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
{
if( pUndoInsSect && pCNd->IsTxtNode() )
{
- pUndoInsSect->SaveSplitNode( (SwTxtNode*)pCNd, TRUE );
+ pUndoInsSect->SaveSplitNode( (SwTxtNode*)pCNd, sal_True );
}
SplitNode( *pPos, false );
pNewSectNode = GetNodes().InsertTextSection(
@@ -355,10 +355,10 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
rNewSect.SetCondHidden( aCalc.Calculate( rNewSect.GetCondition() ).GetBool() );
}
- BOOL bUpdateFtn = FALSE;
+ sal_Bool bUpdateFtn = sal_False;
if( GetFtnIdxs().Count() && pAttr )
{
- USHORT nVal = ((SwFmtFtnAtTxtEnd&)pAttr->Get(
+ sal_uInt16 nVal = ((SwFmtFtnAtTxtEnd&)pAttr->Get(
RES_FTN_AT_TXTEND )).GetValue();
if( ( FTNEND_ATTXTEND_OWNNUMSEQ == nVal ||
FTNEND_ATTXTEND_OWNNUMANDFMT == nVal ) ||
@@ -366,7 +366,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
pAttr->Get( RES_END_AT_TXTEND )).GetValue() ) ||
FTNEND_ATTXTEND_OWNNUMANDFMT == nVal ))
{
- bUpdateFtn = TRUE;
+ bUpdateFtn = sal_True;
}
}
@@ -374,7 +374,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
{
pUndoInsSect->SetSectNdPos( pNewSectNode->GetIndex() );
pUndoInsSect->SetUpdtFtnFlag( bUpdateFtn );
- DoUndo( TRUE );
+ DoUndo( sal_True );
}
if (rNewData.IsLinkType())
@@ -391,10 +391,10 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
return &pNewSectNode->GetSection();
}
-USHORT SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
+sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
const SwNode** ppSttNd ) const
{
- USHORT nRet = 1;
+ sal_uInt16 nRet = 1;
if( rRange.HasMark() )
{
// teste ob es sich um eine gueltige Selektion handelt
@@ -416,7 +416,7 @@ USHORT SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
pCNd->Len() )
{
SwNodeIndex aIdx( pStt->nNode, -1 );
- ULONG nCmp = pEnd->nNode.GetIndex();
+ sal_uLong nCmp = pEnd->nNode.GetIndex();
const SwStartNode* pPrvNd;
const SwEndNode* pNxtNd;
while( 0 != ( pPrvNd = (pNd = &aIdx.GetNode())->GetSectionNode() ) &&
@@ -523,20 +523,20 @@ SwSectionFmt* SwDoc::MakeSectionFmt( SwSectionFmt *pDerivedFrom )
return pNew;
}
-void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, BOOL bDelNodes )
+void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, sal_Bool bDelNodes )
{
- USHORT nPos = pSectionFmtTbl->GetPos( pFmt );
+ sal_uInt16 nPos = pSectionFmtTbl->GetPos( pFmt );
StartUndo(UNDO_DELSECTION, NULL);
if( USHRT_MAX != nPos )
{
- const SwNodeIndex* pIdx = pFmt->GetCntnt( FALSE ).GetCntntIdx();
+ const SwNodeIndex* pIdx = pFmt->GetCntnt( sal_False ).GetCntntIdx();
const SfxPoolItem* pFtnEndAtTxtEnd;
if( SFX_ITEM_SET != pFmt->GetItemState(
- RES_FTN_AT_TXTEND, TRUE, &pFtnEndAtTxtEnd ) ||
+ RES_FTN_AT_TXTEND, sal_True, &pFtnEndAtTxtEnd ) ||
SFX_ITEM_SET != pFmt->GetItemState(
- RES_END_AT_TXTEND, TRUE, &pFtnEndAtTxtEnd ))
+ RES_END_AT_TXTEND, sal_True, &pFtnEndAtTxtEnd ))
pFtnEndAtTxtEnd = 0;
const SwSectionNode* pSectNd;
@@ -587,7 +587,7 @@ void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, BOOL bDelNodes )
// zu loeschen!
pSectionFmtTbl->Remove( nPos );
//FEATURE::CONDCOLL
- ULONG nCnt = 0, nSttNd = 0;
+ sal_uLong nCnt = 0, nSttNd = 0;
if( pIdx && &GetNodes() == &pIdx->GetNodes() &&
0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
{
@@ -630,16 +630,16 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
if (pSection->DataEquals(rNewData))
{
// die Attribute ueberpruefen
- BOOL bOnlyAttrChg = FALSE;
+ sal_Bool bOnlyAttrChg = sal_False;
if( pAttr && pAttr->Count() )
{
SfxItemIter aIter( *pAttr );
- USHORT nWhich = aIter.GetCurItem()->Which();
- while( TRUE )
+ sal_uInt16 nWhich = aIter.GetCurItem()->Which();
+ while( sal_True )
{
if( pFmt->GetFmtAttr( nWhich ) != *aIter.GetCurItem() )
{
- bOnlyAttrChg = TRUE;
+ bOnlyAttrChg = sal_True;
break;
}
@@ -651,7 +651,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
if( bOnlyAttrChg )
{
- const BOOL bDoesUndo = DoesUndo();
+ const sal_Bool bDoesUndo = DoesUndo();
if( DoesUndo() )
{
ClearRedo();
@@ -659,7 +659,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
// --> FME 2004-10-13 #i32968#
// Inserting columns in the section causes MakeFrmFmt to put two
// objects of type SwUndoFrmFmt on the undo stack. We don't want them.
- DoUndo( FALSE );
+ DoUndo( sal_False );
// <--
}
pFmt->SetFmtAttr( *pAttr );
@@ -692,7 +692,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
}
}
- const BOOL bDoesUndo = DoesUndo();
+ const sal_Bool bDoesUndo = DoesUndo();
if( DoesUndo() )
{
ClearRedo();
@@ -700,7 +700,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
// --> FME 2004-10-13 #i32968#
// Inserting columns in the section causes MakeFrmFmt to put two
// objects of type SwUndoFrmFmt on the undo stack. We don't want them.
- DoUndo( FALSE );
+ DoUndo( sal_False );
// <--
}
@@ -720,9 +720,9 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
sSectName.Erase();
/// OD 04.10.2002 #102894# - NOTE
- /// In SwSection::operator=(..) class member bCondHiddenFlag is always set to TRUE.
+ /// In SwSection::operator=(..) class member bCondHiddenFlag is always set to sal_True.
/// IMHO this have to be changed, but I can't estimate the consequences:
- /// Either it is set to TRUE using corresponding method <SwSection.SetCondHidden(..)>,
+ /// Either it is set to sal_True using corresponding method <SwSection.SetCondHidden(..)>,
/// or it is set to the value of SwSection which is assigned to it.
/// Discussion with AMA results that the adjustment to the assignment operator
/// could be very risky -> see notes in bug #102894#.
@@ -747,9 +747,9 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
/// OD 04.10.2002 #102894#
/// Because on using SwSection::operator=() to set up <pSection>
/// with <rNewData> and the above given note, the hidden condition flag
- /// has to be set to FALSE, if hidden condition flag of <pFmt->GetSection()>
- /// (SwSection before the changes) is FALSE (already saved in <bOldCondHidden>)
- /// and new calculated condition is TRUE.
+ /// has to be set to sal_False, if hidden condition flag of <pFmt->GetSection()>
+ /// (SwSection before the changes) is sal_False (already saved in <bOldCondHidden>)
+ /// and new calculated condition is sal_True.
/// This is necessary, because otherwise the <SetCondHidden> would have
/// no effect.
bool bCalculatedCondHidden =
@@ -786,12 +786,12 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
* --------------------------------------------------*/
// und dann waren da noch die Fussnoten:
-void lcl_DeleteFtn( SwSectionNode *pNd, ULONG nStt, ULONG nEnd )
+void lcl_DeleteFtn( SwSectionNode *pNd, sal_uLong nStt, sal_uLong nEnd )
{
SwFtnIdxs& rFtnArr = pNd->GetDoc()->GetFtnIdxs();
if( rFtnArr.Count() )
{
- USHORT nPos;
+ sal_uInt16 nPos;
rFtnArr.SeekEntry( SwNodeIndex( *pNd ), &nPos );
SwTxtFtn* pSrch;
@@ -879,7 +879,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx,
// aInsPos is at the moment the Position where my EndNode will be inserted
const SwStartNode* pStartNode = aInsPos.GetNode().StartOfSectionNode();
// This StartNode should be in front of me, but if not, I wanna survive
- ULONG nMyIndex = pSectNd->GetIndex();
+ sal_uLong nMyIndex = pSectNd->GetIndex();
if( pStartNode->GetIndex() > nMyIndex ) // Suspicious!
{
const SwNode* pTemp;
@@ -936,7 +936,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx,
// Hier bietet sich als Optimierung an, vorhandene Frames nicht zu
// zerstoeren und wieder neu anzulegen, sondern nur umzuhaengen.
- BOOL bInsFrm = bCreateFrms && !pSectNd->GetSection().IsHidden() &&
+ sal_Bool bInsFrm = bCreateFrms && !pSectNd->GetSection().IsHidden() &&
GetDoc()->GetRootFrm();
SwNode2Layout *pNode2Layout = NULL;
if( bInsFrm )
@@ -948,10 +948,10 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx,
}
// jetzt noch bei allen im Bereich den richtigen StartNode setzen
- ULONG nEnde = pSectNd->EndOfSectionIndex();
- ULONG nStart = pSectNd->GetIndex()+1;
- ULONG nSkipIdx = ULONG_MAX;
- for( ULONG n = nStart; n < nEnde; ++n )
+ sal_uLong nEnde = pSectNd->EndOfSectionIndex();
+ sal_uLong nStart = pSectNd->GetIndex()+1;
+ sal_uLong nSkipIdx = ULONG_MAX;
+ for( sal_uLong n = nStart; n < nEnde; ++n )
{
SwNode* pNd = (*this)[n];
@@ -991,7 +991,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx,
{
if( pNode2Layout )
{
- ULONG nIdx = pSectNd->GetIndex();
+ sal_uLong nIdx = pSectNd->GetIndex();
pNode2Layout->RestoreUpperFrms( pSectNd->GetNodes(), nIdx, nIdx + 1 );
delete pNode2Layout;
}
@@ -1090,7 +1090,7 @@ SwSectionNode::~SwSectionNode()
if ( pLast->IsA( TYPE(SwFrm) ) )
{
SwSectionFrm *pSectFrm = (SwSectionFrm*)pLast;
- SwSectionFrm::MoveCntntAndDelete( pSectFrm, TRUE );
+ SwSectionFrm::MoveCntntAndDelete( pSectFrm, sal_True );
pLast = aIter.GoStart();
}
else
@@ -1109,10 +1109,10 @@ SwSectionNode::~SwSectionNode()
pFmt->UnlockModify();
}
- BOOL bUndo = pDoc->DoesUndo();
+ sal_Bool bUndo = pDoc->DoesUndo();
// verhinder beim Loeschen aus der Undo/Redo-History einen rekursiven Aufruf
if( bUndo && &pDoc->GetNodes() != &GetNodes() )
- pDoc->DoUndo( FALSE );
+ pDoc->DoUndo( sal_False );
pDoc->DoUndo( bUndo );
}
@@ -1135,11 +1135,11 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx )
if( GetSection().IsHidden() || IsCntntHidden() )
{
SwNodeIndex aIdx( *EndOfSectionNode() );
- SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, TRUE, FALSE );
+ SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, sal_True, sal_False );
if( !pCNd )
{
aIdx = *this;
- if( 0 == ( pCNd = rNds.GoPrevSection( &aIdx, TRUE, FALSE )) )
+ if( 0 == ( pCNd = rNds.GoPrevSection( &aIdx, sal_True, sal_False )) )
return ;
}
pCNd = rNds[ aIdx ]->GetCntntNode();
@@ -1262,11 +1262,11 @@ void SwSectionNode::MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEndIdx )
void SwSectionNode::DelFrms()
{
- ULONG nStt = GetIndex()+1, nEnd = EndOfSectionIndex();
+ sal_uLong nStt = GetIndex()+1, nEnd = EndOfSectionIndex();
if( nStt >= nEnd )
{
// unser Flag muessen wir noch aktualisieren
- // pSection->bHiddenFlag = TRUE;
+ // pSection->bHiddenFlag = sal_True;
return ;
}
@@ -1282,14 +1282,14 @@ void SwSectionNode::DelFrms()
// Fly/TblBox-Frame keinen Lower !!!
{
SwNodeIndex aIdx( *this );
- if( !rNds.GoPrevSection( &aIdx, TRUE, FALSE ) ||
- !CheckNodesRange( *this, aIdx, TRUE ) ||
+ if( !rNds.GoPrevSection( &aIdx, sal_True, sal_False ) ||
+ !CheckNodesRange( *this, aIdx, sal_True ) ||
// OD 04.11.2003 #i21457#
!lcl_IsInSameTblBox( rNds, *this, true ))
{
aIdx = *EndOfSectionNode();
- if( !rNds.GoNextSection( &aIdx, TRUE, FALSE ) ||
- !CheckNodesRange( *EndOfSectionNode(), aIdx, TRUE ) ||
+ if( !rNds.GoNextSection( &aIdx, sal_True, sal_False ) ||
+ !CheckNodesRange( *EndOfSectionNode(), aIdx, sal_True ) ||
// OD 04.11.2003 #i21457#
!lcl_IsInSameTblBox( rNds, *EndOfSectionNode(), false ))
{
@@ -1344,16 +1344,16 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c
pNewSect->SetCondition( GetSection().GetCondition() );
pNewSect->SetLinkFileName( GetSection().GetLinkFileName() );
if( !pNewSect->IsHiddenFlag() && GetSection().IsHidden() )
- pNewSect->SetHidden( TRUE );
+ pNewSect->SetHidden( sal_True );
if( !pNewSect->IsProtectFlag() && GetSection().IsProtect() )
- pNewSect->SetProtect( TRUE );
+ pNewSect->SetProtect( sal_True );
// --> FME 2004-06-22 #114856# edit in readonly sections
if( !pNewSect->IsEditInReadonlyFlag() && GetSection().IsEditInReadonly() )
- pNewSect->SetEditInReadonly( TRUE );
+ pNewSect->SetEditInReadonly( sal_True );
// <--
SwNodeRange aRg( *this, +1, *EndOfSectionNode() ); // (wo stehe in denn nun ??)
- rNds._Copy( aRg, aInsPos, FALSE );
+ rNds._Copy( aRg, aInsPos, sal_False );
// loesche alle Frames vom kopierten Bereich, diese werden beim
// erzeugen des SectionFrames angelegt !
@@ -1377,12 +1377,12 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c
return pSectNd;
}
-BOOL SwSectionNode::IsCntntHidden() const
+sal_Bool SwSectionNode::IsCntntHidden() const
{
ASSERT( !m_pSection->IsHidden(),
"That's simple: Hidden Section => Hidden Content" );
SwNodeIndex aTmp( *this, 1 );
- ULONG nEnd = EndOfSectionIndex();
+ sal_uLong nEnd = EndOfSectionIndex();
while( aTmp < nEnd )
{
if( aTmp.GetNode().IsSectionNode() )
@@ -1395,12 +1395,12 @@ BOOL SwSectionNode::IsCntntHidden() const
else
{
if( aTmp.GetNode().IsCntntNode() || aTmp.GetNode().IsTableNode() )
- return FALSE; // Nicht versteckter Inhalt wurde gefunden
+ return sal_False; // Nicht versteckter Inhalt wurde gefunden
ASSERT( aTmp.GetNode().IsEndNode(), "EndNode expected" );
}
aTmp++;
}
- return TRUE; // Alles versteckt
+ return sal_True; // Alles versteckt
}
@@ -1428,8 +1428,8 @@ void SwSectionNode::NodesArrChgd()
: pDoc->GetDfltFrmFmt() );
// jetzt noch bei allen im Bereich den richtigen StartNode setzen
- ULONG nStart = GetIndex()+1, nEnde = EndOfSectionIndex();
- for( ULONG n = nStart; n < nEnde; ++n )
+ sal_uLong nStart = GetIndex()+1, nEnde = EndOfSectionIndex();
+ for( sal_uLong n = nStart; n < nEnde; ++n )
// die Verschachtelung der Formate herstellen!
if( 0 != ( pSectNd = rNds[ n ]->GetSectionNode() ) )
{
@@ -1475,22 +1475,22 @@ String SwDoc::GetUniqueSectionName( const String* pChkStr ) const
String aName( aId );
xub_StrLen nNmLen = aName.Len();
- USHORT nNum = 0;
- USHORT nTmp, nFlagSize = ( pSectionFmtTbl->Count() / 8 ) +2;
- BYTE* pSetFlags = new BYTE[ nFlagSize ];
+ sal_uInt16 nNum = 0;
+ sal_uInt16 nTmp, nFlagSize = ( pSectionFmtTbl->Count() / 8 ) +2;
+ sal_uInt8* pSetFlags = new sal_uInt8[ nFlagSize ];
memset( pSetFlags, 0, nFlagSize );
const SwSectionNode* pSectNd;
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < pSectionFmtTbl->Count(); ++n )
- if( 0 != ( pSectNd = (*pSectionFmtTbl)[ n ]->GetSectionNode( FALSE ) ))
+ if( 0 != ( pSectNd = (*pSectionFmtTbl)[ n ]->GetSectionNode( sal_False ) ))
{
const String& rNm = pSectNd->GetSection().GetSectionName();
if( rNm.Match( aName ) == nNmLen )
{
// Nummer bestimmen und das Flag setzen
- nNum = static_cast<USHORT>(rNm.Copy( nNmLen ).ToInt32());
+ nNum = static_cast<sal_uInt16>(rNm.Copy( nNmLen ).ToInt32());
if( nNum-- && nNum < pSectionFmtTbl->Count() )
pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 ));
}
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 588ef88f7740..0c1304229d7a 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -122,14 +122,14 @@ const sal_Unicode T2T_PARA = 0x0a;
extern void ClearFEShellTabCols();
// steht im gctable.cxx
-extern BOOL lcl_GC_Line_Border( const SwTableLine*& , void* pPara );
+extern sal_Bool lcl_GC_Line_Border( const SwTableLine*& , void* pPara );
#ifdef DEL_TABLE_REDLINES
class lcl_DelRedlines
{
SwDoc* pDoc;
public:
- lcl_DelRedlines( const SwTableNode& rNd, BOOL bCheckForOwnRedline );
+ lcl_DelRedlines( const SwTableNode& rNd, sal_Bool bCheckForOwnRedline );
lcl_DelRedlines( SwPaM& rPam );
~lcl_DelRedlines() { pDoc->EndUndo(UNDO_EMPTY, NULL); }
@@ -143,18 +143,18 @@ lcl_DelRedlines::lcl_DelRedlines( SwPaM & rPam) : pDoc( rPam.GetDoc() )
}
#endif
-void lcl_SetDfltBoxAttr( SwFrmFmt& rFmt, BYTE nId )
+void lcl_SetDfltBoxAttr( SwFrmFmt& rFmt, sal_uInt8 nId )
{
- BOOL bTop = FALSE, bBottom = FALSE, bLeft = FALSE, bRight = FALSE;
+ sal_Bool bTop = sal_False, bBottom = sal_False, bLeft = sal_False, bRight = sal_False;
switch ( nId )
{
- case 0: bTop = bBottom = bLeft = TRUE; break;
- case 1: bTop = bBottom = bLeft = bRight = TRUE; break;
- case 2: bBottom = bLeft = TRUE; break;
- case 3: bBottom = bLeft = bRight = TRUE; break;
+ case 0: bTop = bBottom = bLeft = sal_True; break;
+ case 1: bTop = bBottom = bLeft = bRight = sal_True; break;
+ case 2: bBottom = bLeft = sal_True; break;
+ case 3: bBottom = bLeft = bRight = sal_True; break;
}
- const BOOL bHTML = rFmt.getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE);
+ const sal_Bool bHTML = rFmt.getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE);
Color aCol( bHTML ? COL_GRAY : COL_BLACK );
SvxBorderLine aLine( &aCol, DEF_LINE_WIDTH_0 );
if ( bHTML )
@@ -175,7 +175,7 @@ void lcl_SetDfltBoxAttr( SwFrmFmt& rFmt, BYTE nId )
rFmt.SetFmtAttr( aBox );
}
-void lcl_SetDfltBoxAttr( SwTableBox& rBox, SvPtrarr &rBoxFmtArr, BYTE nId,
+void lcl_SetDfltBoxAttr( SwTableBox& rBox, SvPtrarr &rBoxFmtArr, sal_uInt8 nId,
const SwTableAutoFmt* pAutoFmt = 0 )
{
SvPtrarr* pArr = (SvPtrarr*)rBoxFmtArr[ nId ];
@@ -187,7 +187,7 @@ void lcl_SetDfltBoxAttr( SwTableBox& rBox, SvPtrarr &rBoxFmtArr, BYTE nId,
SwTableBoxFmt* pNewBoxFmt = 0;
SwFrmFmt* pBoxFmt = rBox.GetFrmFmt();
- for( USHORT n = 0; n < pArr->Count(); n += 2 )
+ for( sal_uInt16 n = 0; n < pArr->Count(); n += 2 )
if( pArr->GetObject( n ) == pBoxFmt )
{
pNewBoxFmt = (SwTableBoxFmt*)pArr->GetObject( n + 1 );
@@ -204,7 +204,7 @@ void lcl_SetDfltBoxAttr( SwTableBox& rBox, SvPtrarr &rBoxFmtArr, BYTE nId,
if( pAutoFmt )
pAutoFmt->UpdateToSet( nId, (SfxItemSet&)pNewBoxFmt->GetAttrSet(),
SwTableAutoFmt::UPDATE_BOX,
- pDoc->GetNumberFormatter( TRUE ) );
+ pDoc->GetNumberFormatter( sal_True ) );
else
::lcl_SetDfltBoxAttr( *pNewBoxFmt, nId );
@@ -217,7 +217,7 @@ void lcl_SetDfltBoxAttr( SwTableBox& rBox, SvPtrarr &rBoxFmtArr, BYTE nId,
}
SwTableBoxFmt *lcl_CreateDfltBoxFmt( SwDoc &rDoc, SvPtrarr &rBoxFmtArr,
- USHORT nCols, BYTE nId )
+ sal_uInt16 nCols, sal_uInt8 nId )
{
if ( !rBoxFmtArr[nId] )
{
@@ -233,14 +233,14 @@ SwTableBoxFmt *lcl_CreateDfltBoxFmt( SwDoc &rDoc, SvPtrarr &rBoxFmtArr,
SwTableBoxFmt *lcl_CreateAFmtBoxFmt( SwDoc &rDoc, SvPtrarr &rBoxFmtArr,
const SwTableAutoFmt& rAutoFmt,
- USHORT nCols, BYTE nId )
+ sal_uInt16 nCols, sal_uInt8 nId )
{
if( !rBoxFmtArr[nId] )
{
SwTableBoxFmt* pBoxFmt = rDoc.MakeTableBoxFmt();
rAutoFmt.UpdateToSet( nId, (SfxItemSet&)pBoxFmt->GetAttrSet(),
SwTableAutoFmt::UPDATE_BOX,
- rDoc.GetNumberFormatter( TRUE ) );
+ rDoc.GetNumberFormatter( sal_True ) );
if( USHRT_MAX != nCols )
pBoxFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE,
USHRT_MAX / nCols, 0 ));
@@ -252,7 +252,7 @@ SwTableBoxFmt *lcl_CreateAFmtBoxFmt( SwDoc &rDoc, SvPtrarr &rBoxFmtArr,
SwTableNode* SwDoc::IsIdxInTbl(const SwNodeIndex& rIdx)
{
SwTableNode* pTableNd = 0;
- ULONG nIndex = rIdx.GetIndex();
+ sal_uLong nIndex = rIdx.GetIndex();
do {
SwNode* pNd = (SwNode*)GetNodes()[ nIndex ]->StartOfSectionNode();
if( 0 != ( pTableNd = pNd->GetTableNode() ) )
@@ -268,20 +268,20 @@ SwTableNode* SwDoc::IsIdxInTbl(const SwNodeIndex& rIdx)
// fuege in der Line, vor der InsPos eine neue Box ein.
-BOOL SwNodes::InsBoxen( SwTableNode* pTblNd,
+sal_Bool SwNodes::InsBoxen( SwTableNode* pTblNd,
SwTableLine* pLine,
SwTableBoxFmt* pBoxFmt,
SwTxtFmtColl* pTxtColl,
const SfxItemSet* pAutoAttr,
- USHORT nInsPos,
- USHORT nCnt )
+ sal_uInt16 nInsPos,
+ sal_uInt16 nCnt )
{
if( !nCnt )
- return FALSE;
+ return sal_False;
ASSERT( pLine, "keine gueltige Zeile" );
// Index hinter die letzte Box der Line
- ULONG nIdxPos = 0;
+ sal_uLong nIdxPos = 0;
SwTableBox *pPrvBox = 0, *pNxtBox = 0;
if( pLine->GetTabBoxes().Count() )
{
@@ -300,7 +300,7 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd,
if( !pPrvBox && !pNxtBox )
{
- BOOL bSetIdxPos = TRUE;
+ sal_Bool bSetIdxPos = sal_True;
if( pTblNd->GetTable().GetTabLines().Count() && !nInsPos )
{
const SwTableLine* pTblLn = pLine;
@@ -313,7 +313,7 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd,
while( ( pNxtBox = pLine->GetTabBoxes()[0])->GetTabLines().Count() )
pLine = pNxtBox->GetTabLines()[0];
nIdxPos = pNxtBox->GetSttIdx();
- bSetIdxPos = FALSE;
+ bSetIdxPos = sal_False;
}
}
if( bSetIdxPos )
@@ -326,7 +326,7 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd,
nIdxPos = pPrvBox->GetSttNd()->EndOfSectionIndex() + 1;
SwNodeIndex aEndIdx( *this, nIdxPos );
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
SwStartNode* pSttNd = new SwStartNode( aEndIdx, ND_STARTNODE,
SwTableBoxStartNode );
@@ -336,7 +336,7 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd,
pPrvBox = new SwTableBox( pBoxFmt, *pSttNd, pLine );
SwTableBoxes & rTabBoxes = pLine->GetTabBoxes();
- USHORT nRealInsPos = nInsPos + n;
+ sal_uInt16 nRealInsPos = nInsPos + n;
if (nRealInsPos > rTabBoxes.Count())
nRealInsPos = rTabBoxes.Count();
@@ -360,18 +360,18 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd,
pTNd->ChgFmtColl( pTxtColl );
}
}
- return TRUE;
+ return sal_True;
}
// --------------- einfuegen einer neuen Tabelle --------------
const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
- const SwPosition& rPos, USHORT nRows,
- USHORT nCols, sal_Int16 eAdjust,
+ const SwPosition& rPos, sal_uInt16 nRows,
+ sal_uInt16 nCols, sal_Int16 eAdjust,
const SwTableAutoFmt* pTAFmt,
const SvUShorts* pColArr,
- BOOL bCalledFromShell,
- BOOL bNewModel )
+ sal_Bool bCalledFromShell,
+ sal_Bool bNewModel )
{
ASSERT( nRows, "Tabelle ohne Zeile?" );
ASSERT( nCols, "Tabelle ohne Spalten?" );
@@ -393,7 +393,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
if( DoesUndo() )
{
ClearRedo();
- AppendUndo( new SwUndoInsTbl( rPos, nCols, nRows, static_cast<USHORT>(eAdjust),
+ AppendUndo( new SwUndoInsTbl( rPos, nCols, nRows, static_cast<sal_uInt16>(eAdjust),
rInsTblOpts, pTAFmt, pColArr,
aTblName));
}
@@ -403,12 +403,12 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
SwTxtFmtColl *pBodyColl = GetTxtCollFromPool( RES_POOLCOLL_TABLE ),
*pHeadColl = pBodyColl;
- BOOL bDfltBorders = 0 != ( rInsTblOpts.mnInsMode & tabopts::DEFAULT_BORDER );
+ sal_Bool bDfltBorders = 0 != ( rInsTblOpts.mnInsMode & tabopts::DEFAULT_BORDER );
if( (rInsTblOpts.mnInsMode & tabopts::HEADLINE) && (1 != nRows || !bDfltBorders) )
pHeadColl = GetTxtCollFromPool( RES_POOLCOLL_TABLE_HDLN );
- const USHORT nRowsToRepeat =
+ const sal_uInt16 nRowsToRepeat =
tabopts::HEADLINE == (rInsTblOpts.mnInsMode & tabopts::HEADLINE) ?
rInsTblOpts.mnRowsToRepeat :
0;
@@ -440,7 +440,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
const SwAttrSet & aNdSet = pCntntNd->GetSwAttrSet();
const SfxPoolItem *pItem = NULL;
- if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem )
+ if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem )
&& pItem != NULL)
{
pTableFmt->SetFmtAttr( *pItem );
@@ -456,12 +456,12 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
SwTwips nWidth = USHRT_MAX;
if( pColArr )
{
- USHORT nSttPos = (*pColArr)[ 0 ];
- USHORT nLastPos = (*pColArr)[ USHORT(pColArr->Count()-1)];
+ sal_uInt16 nSttPos = (*pColArr)[ 0 ];
+ sal_uInt16 nLastPos = (*pColArr)[ sal_uInt16(pColArr->Count()-1)];
if( text::HoriOrientation::NONE == eAdjust )
{
- USHORT nFrmWidth = nLastPos;
- nLastPos = (*pColArr)[ USHORT(pColArr->Count()-2)];
+ sal_uInt16 nFrmWidth = nLastPos;
+ nLastPos = (*pColArr)[ sal_uInt16(pColArr->Count()-2)];
pTableFmt->SetFmtAttr( SvxLRSpaceItem( nSttPos, nFrmWidth - nLastPos, 0, 0, RES_LR_SPACE ) );
}
nWidth = nLastPos - nSttPos;
@@ -473,7 +473,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
}
pTableFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nWidth ));
if( !(rInsTblOpts.mnInsMode & tabopts::SPLIT_LAYOUT) )
- pTableFmt->SetFmtAttr( SwFmtLayoutSplit( FALSE ));
+ pTableFmt->SetFmtAttr( SwFmtLayoutSplit( sal_False ));
// verschiebe ggfs. die harten PageDesc/PageBreak Attribute:
SwCntntNode* pNextNd = GetNodes()[ pTblNd->EndOfSectionIndex()+1 ]
@@ -482,14 +482,14 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
{
const SfxItemSet* pNdSet = pNextNd->GetpSwAttrSet();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pNdSet->GetItemState( RES_PAGEDESC, FALSE,
+ if( SFX_ITEM_SET == pNdSet->GetItemState( RES_PAGEDESC, sal_False,
&pItem ) )
{
pTableFmt->SetFmtAttr( *pItem );
pNextNd->ResetAttr( RES_PAGEDESC );
pNdSet = pNextNd->GetpSwAttrSet();
}
- if( pNdSet && SFX_ITEM_SET == pNdSet->GetItemState( RES_BREAK, FALSE,
+ if( pNdSet && SFX_ITEM_SET == pNdSet->GetItemState( RES_BREAK, sal_False,
&pItem ) )
{
pTableFmt->SetFmtAttr( *pItem );
@@ -512,8 +512,8 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
}
else
{
- const USHORT nBoxArrLen = pTAFmt ? 16 : 4;
- for( USHORT i = 0; i < nBoxArrLen; ++i )
+ const sal_uInt16 nBoxArrLen = pTAFmt ? 16 : 4;
+ for( sal_uInt16 i = 0; i < nBoxArrLen; ++i )
aBoxFmtArr.Insert( (void*)0, i );
}
// --> OD 2008-02-25 #refactorlists#
@@ -523,19 +523,19 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
SwNodeIndex aNdIdx( *pTblNd, 1 ); // auf den ersten Box-StartNode
SwTableLines& rLines = pNdTbl->GetTabLines();
- for( USHORT n = 0; n < nRows; ++n )
+ for( sal_uInt16 n = 0; n < nRows; ++n )
{
SwTableLine* pLine = new SwTableLine( pLineFmt, nCols, 0 );
rLines.C40_INSERT( SwTableLine, pLine, n );
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- for( USHORT i = 0; i < nCols; ++i )
+ for( sal_uInt16 i = 0; i < nCols; ++i )
{
SwTableBoxFmt *pBoxF;
if( pTAFmt )
{
- BYTE nId = static_cast<BYTE>(!n ? 0 : (( n+1 == nRows )
+ sal_uInt8 nId = static_cast<sal_uInt8>(!n ? 0 : (( n+1 == nRows )
? 12 : (4 * (1 + ((n-1) & 1 )))));
- nId = nId + static_cast<BYTE>( !i ? 0 :
+ nId = nId + static_cast<sal_uInt8>( !i ? 0 :
( i+1 == nCols ? 3 : (1 + ((i-1) & 1))));
pBoxF = ::lcl_CreateAFmtBoxFmt( *this, aBoxFmtArr, *pTAFmt,
nCols, nId );
@@ -553,7 +553,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
}
else if( bDfltBorders )
{
- BYTE nBoxId = (i < nCols - 1 ? 0 : 1) + (n ? 2 : 0 );
+ sal_uInt8 nBoxId = (i < nCols - 1 ? 0 : 1) + (n ? 2 : 0 );
pBoxF = ::lcl_CreateDfltBoxFmt( *this, aBoxFmtArr, nCols, nBoxId);
}
else
@@ -564,7 +564,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
// Positionen der Spalten!! (nicht deren Breite!)
if( pColArr )
{
- nWidth = (*pColArr)[ USHORT(i + 1) ] - (*pColArr)[ i ];
+ nWidth = (*pColArr)[ sal_uInt16(i + 1) ] - (*pColArr)[ i ];
if( pBoxF->GetFrmSize().GetWidth() != nWidth )
{
if( pBoxF->GetDepends() ) // neues Format erzeugen!
@@ -601,10 +601,10 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
}
SwTableNode* SwNodes::InsertTable( const SwNodeIndex& rNdIdx,
- USHORT nBoxes,
+ sal_uInt16 nBoxes,
SwTxtFmtColl* pCntntTxtColl,
- USHORT nLines,
- USHORT nRepeat,
+ sal_uInt16 nLines,
+ sal_uInt16 nRepeat,
SwTxtFmtColl* pHeadlineTxtColl,
const SwAttrSet * pAttrSet)
{
@@ -623,9 +623,9 @@ SwTableNode* SwNodes::InsertTable( const SwNodeIndex& rNdIdx,
SwNodeIndex aIdx( *pEndNd );
SwTxtFmtColl* pTxtColl = pHeadlineTxtColl;
- for( USHORT nL = 0; nL < nLines; ++nL )
+ for( sal_uInt16 nL = 0; nL < nLines; ++nL )
{
- for( USHORT nB = 0; nB < nBoxes; ++nB )
+ for( sal_uInt16 nB = 0; nB < nBoxes; ++nB )
{
SwStartNode* pSttNd = new SwStartNode( aIdx, ND_STARTNODE,
SwTableBoxStartNode );
@@ -638,17 +638,17 @@ SwTableNode* SwNodes::InsertTable( const SwNodeIndex& rNdIdx,
const SfxPoolItem* pItem = NULL;
if ( NULL != pAttrSet )
{
- static const USHORT aPropagateItems[] = {
+ static const sal_uInt16 aPropagateItems[] = {
RES_PARATR_ADJUST,
RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONTSIZE, 0 };
- const USHORT* pIdx = aPropagateItems;
+ const sal_uInt16* pIdx = aPropagateItems;
while ( *pIdx != 0 )
{
if ( SFX_ITEM_SET != pTmpNd->GetSwAttrSet().GetItemState( *pIdx ) &&
- SFX_ITEM_SET == pAttrSet->GetItemState( *pIdx, TRUE, &pItem ) )
+ SFX_ITEM_SET == pAttrSet->GetItemState( *pIdx, sal_True, &pItem ) )
static_cast<SwCntntNode *>(pTmpNd)->SetAttr(*pItem);
++pIdx;
}
@@ -674,7 +674,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
// pruefe ob in der Selection eine Tabelle liegt
const SwPosition *pStt = rRange.Start(), *pEnd = rRange.End();
{
- ULONG nCnt = pStt->nNode.GetIndex();
+ sal_uLong nCnt = pStt->nNode.GetIndex();
for( ; nCnt <= pEnd->nNode.GetIndex(); ++nCnt )
if( !GetNodes()[ nCnt ]->IsTxtNode() )
return 0;
@@ -696,11 +696,11 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
{
StartUndo( UNDO_TEXTTOTABLE, NULL );
pUndo = new SwUndoTxtToTbl( aOriginal, rInsTblOpts, cCh,
- static_cast<USHORT>(eAdjust), pTAFmt );
+ static_cast<sal_uInt16>(eAdjust), pTAFmt );
AppendUndo( pUndo );
// das Splitten vom TextNode nicht in die Undohistory aufnehmen
- DoUndo( FALSE );
+ DoUndo( sal_False );
}
::PaMCorrAbs( aOriginal, *pEnd );
@@ -710,7 +710,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
if( pStt->nContent.GetIndex() )
SplitNode( *pStt, false );
- BOOL bEndCntnt = 0 != pEnd->nContent.GetIndex();
+ sal_Bool bEndCntnt = 0 != pEnd->nContent.GetIndex();
// nicht splitten am Ende der Zeile (aber am Ende vom Doc!!)
if( bEndCntnt )
{
@@ -732,7 +732,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
if( aRg.aEnd.GetIndex() == aRg.aStart.GetIndex() )
{
- ASSERT( FALSE, "Kein Bereich" );
+ ASSERT( sal_False, "Kein Bereich" );
aRg.aEnd++;
}
@@ -751,7 +751,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
// die Tabelle bekommt USHRT_MAX als default SSize
pTableFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, USHRT_MAX ));
if( !(rInsTblOpts.mnInsMode & tabopts::SPLIT_LAYOUT) )
- pTableFmt->SetFmtAttr( SwFmtLayoutSplit( FALSE ));
+ pTableFmt->SetFmtAttr( SwFmtLayoutSplit( sal_False ));
/* #106283# If the first node in the selection is a context node and if it
has an item FRAMEDIR set (no default) propagate the item to the
@@ -761,7 +761,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
const SwAttrSet & aNdSet = pSttCntntNd->GetSwAttrSet();
const SfxPoolItem *pItem = NULL;
- if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem )
+ if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem )
&& pItem != NULL)
{
pTableFmt->SetFmtAttr( *pItem );
@@ -775,18 +775,18 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
SwTable * pNdTbl = &pTblNd->GetTable();
ASSERT( pNdTbl, "kein Tabellen-Node angelegt." )
- const USHORT nRowsToRepeat =
+ const sal_uInt16 nRowsToRepeat =
tabopts::HEADLINE == (rInsTblOpts.mnInsMode & tabopts::HEADLINE) ?
rInsTblOpts.mnRowsToRepeat :
0;
pNdTbl->SetRowsToRepeat( nRowsToRepeat );
- BOOL bUseBoxFmt = FALSE;
+ sal_Bool bUseBoxFmt = sal_False;
if( !pBoxFmt->GetDepends() )
{
// die Formate an den Boxen haben schon die richtige Size, es darf
// also nur noch die richtige Umrandung/AutoFmt gesetzt werden.
- bUseBoxFmt = TRUE;
+ bUseBoxFmt = sal_True;
pTableFmt->SetFmtAttr( pBoxFmt->GetFrmSize() );
delete pBoxFmt;
eAdjust = text::HoriOrientation::NONE;
@@ -798,10 +798,10 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
if( pTAFmt || ( rInsTblOpts.mnInsMode & tabopts::DEFAULT_BORDER) )
{
- BYTE nBoxArrLen = pTAFmt ? 16 : 4;
+ sal_uInt8 nBoxArrLen = pTAFmt ? 16 : 4;
SvPtrarr aBoxFmtArr( nBoxArrLen, 0 );
{
- for( BYTE i = 0; i < nBoxArrLen; ++i )
+ for( sal_uInt8 i = 0; i < nBoxArrLen; ++i )
aBoxFmtArr.Insert( (void*)0, i );
}
@@ -813,21 +813,21 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
SwTableBoxFmt *pBoxF = 0;
SwTableLines& rLines = pNdTbl->GetTabLines();
- USHORT nRows = rLines.Count();
- for( USHORT n = 0; n < nRows; ++n )
+ sal_uInt16 nRows = rLines.Count();
+ for( sal_uInt16 n = 0; n < nRows; ++n )
{
SwTableBoxes& rBoxes = rLines[ n ]->GetTabBoxes();
- USHORT nCols = rBoxes.Count();
- for( USHORT i = 0; i < nCols; ++i )
+ sal_uInt16 nCols = rBoxes.Count();
+ for( sal_uInt16 i = 0; i < nCols; ++i )
{
SwTableBox* pBox = rBoxes[ i ];
- BOOL bChgSz = FALSE;
+ sal_Bool bChgSz = sal_False;
if( pTAFmt )
{
- BYTE nId = static_cast<BYTE>(!n ? 0 : (( n+1 == nRows )
+ sal_uInt8 nId = static_cast<sal_uInt8>(!n ? 0 : (( n+1 == nRows )
? 12 : (4 * (1 + ((n-1) & 1 )))));
- nId = nId + static_cast<BYTE>(!i ? 0 :
+ nId = nId + static_cast<sal_uInt8>(!i ? 0 :
( i+1 == nCols ? 3 : (1 + ((i-1) & 1))));
if( bUseBoxFmt )
::lcl_SetDfltBoxAttr( *pBox, aBoxFmtArr, nId, pTAFmt );
@@ -846,8 +846,8 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
SwTableAutoFmt::UPDATE_CHAR, 0 );
if( aCharSet.Count() )
{
- ULONG nSttNd = pBox->GetSttIdx()+1;
- ULONG nEndNd = pBox->GetSttNd()->EndOfSectionIndex();
+ sal_uLong nSttNd = pBox->GetSttIdx()+1;
+ sal_uLong nEndNd = pBox->GetSttNd()->EndOfSectionIndex();
for( ; nSttNd < nEndNd; ++nSttNd )
{
SwCntntNode* pNd = GetNodes()[ nSttNd ]->GetCntntNode();
@@ -867,7 +867,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
}
else
{
- BYTE nId = (i < nCols - 1 ? 0 : 1) + (n ? 2 : 0 );
+ sal_uInt8 nId = (i < nCols - 1 ? 0 : 1) + (n ? 2 : 0 );
if( bUseBoxFmt )
::lcl_SetDfltBoxAttr( *pBox, aBoxFmtArr, nId );
else
@@ -889,7 +889,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
if( bUseBoxFmt )
{
- for( BYTE i = 0; i < nBoxArrLen; ++i )
+ for( sal_uInt8 i = 0; i < nBoxArrLen; ++i )
{
SvPtrarr* pArr = (SvPtrarr*)aBoxFmtArr[ i ];
delete pArr;
@@ -900,11 +900,11 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
// JP 03.04.97: Inhalt der Boxen auf Zahlen abpruefen
if( IsInsTblFormatNum() )
{
- for( USHORT nBoxes = pNdTbl->GetTabSortBoxes().Count(); nBoxes; )
- ChkBoxNumFmt( *pNdTbl->GetTabSortBoxes()[ --nBoxes ], FALSE );
+ for( sal_uInt16 nBoxes = pNdTbl->GetTabSortBoxes().Count(); nBoxes; )
+ ChkBoxNumFmt( *pNdTbl->GetTabSortBoxes()[ --nBoxes ], sal_False );
}
- ULONG nIdx = pTblNd->GetIndex();
+ sal_uLong nIdx = pTblNd->GetIndex();
aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 );
{
@@ -941,7 +941,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
SwTable * pTable = &pTblNd->GetTable();
SwTableLine* pLine;
SwTableBox* pBox;
- USHORT nBoxes, nLines, nMaxBoxes = 0;
+ sal_uInt16 nBoxes, nLines, nMaxBoxes = 0;
SwNodeIndex aSttIdx( *pTblNd, 1 );
SwNodeIndex aEndIdx( rRange.aEnd, -1 );
@@ -966,14 +966,14 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
{
if( *pTxt == cCh )
{
- aPosArr.Insert( static_cast<USHORT>(
- aFInfo.GetCharPos( nChPos+1, FALSE )),
+ aPosArr.Insert( static_cast<sal_uInt16>(
+ aFInfo.GetCharPos( nChPos+1, sal_False )),
aPosArr.Count() );
}
}
aPosArr.Insert( /*aFInfo.GetFrm()->Frm().Left() +*/
- static_cast<USHORT>(aFInfo.GetFrm()->IsVertical() ?
+ static_cast<sal_uInt16>(aFInfo.GetFrm()->IsVertical() ?
aFInfo.GetFrm()->Prt().Bottom() :
aFInfo.GetFrm()->Prt().Right()),
aPosArr.Count() );
@@ -991,7 +991,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
// erfolgen, denn sonst stehen sie falsch in der History !!!
// SwRegHistory aRegH( pTxtNd, *pTxtNd, pHistory );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pItem ) )
{
if( !nLines )
pTblFmt->SetFmtAttr( *pItem );
@@ -1000,7 +1000,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
}
if( pSet && SFX_ITEM_SET == pSet->GetItemState(
- RES_PAGEDESC, FALSE, &pItem ) &&
+ RES_PAGEDESC, sal_False, &pItem ) &&
((SwFmtPageDesc*)pItem)->GetPageDesc() )
{
if( !nLines )
@@ -1071,7 +1071,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
}
// die Tabelle ausgleichen, leere Sections einfuegen
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < pTable->GetTabLines().Count(); ++n )
{
@@ -1082,7 +1082,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
nBoxes, nMaxBoxes - nBoxes );
if( pUndo )
- for( USHORT i = nBoxes; i < nMaxBoxes; ++i )
+ for( sal_uInt16 i = nBoxes; i < nMaxBoxes; ++i )
pUndo->AddFillBox( *pCurrLine->GetTabBoxes()[ i ] );
// fehlen der 1. Line Boxen, dann kann man das Breiten Array
@@ -1095,13 +1095,13 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
if( aPosArr.Count() )
{
SwTableLines& rLns = pTable->GetTabLines();
- USHORT nLastPos = 0;
+ sal_uInt16 nLastPos = 0;
for( n = 0; n < aPosArr.Count(); ++n )
{
SwTableBoxFmt *pNewFmt = pDoc->MakeTableBoxFmt();
pNewFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE,
aPosArr[ n ] - nLastPos ));
- for( USHORT nTmpLine = 0; nTmpLine < rLns.Count(); ++nTmpLine )
+ for( sal_uInt16 nTmpLine = 0; nTmpLine < rLns.Count(); ++nTmpLine )
//JP 24.06.98: hier muss ein Add erfolgen, da das BoxFormat
// von der rufenden Methode noch gebraucht wird!
pNewFmt->Add( rLns[ nTmpLine ]->GetTabBoxes()[ n ] );
@@ -1154,7 +1154,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
// AppendUndo( pUndo );
// das Splitten vom TextNode nicht in die Undohistory aufnehmen
- DoUndo( FALSE );
+ DoUndo( sal_False );
}
::PaMCorrAbs( aOriginal, *pEnd );
@@ -1164,7 +1164,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
if( pStt->nContent.GetIndex() )
SplitNode( *pStt, false );
- BOOL bEndCntnt = 0 != pEnd->nContent.GetIndex();
+ sal_Bool bEndCntnt = 0 != pEnd->nContent.GetIndex();
// nicht splitten am Ende der Zeile (aber am Ende vom Doc!!)
if( bEndCntnt )
{
@@ -1186,7 +1186,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
if( aRg.aEnd.GetIndex() == aRg.aStart.GetIndex() )
{
- ASSERT( FALSE, "Kein Bereich" );
+ ASSERT( sal_False, "Kein Bereich" );
aRg.aEnd++;
}
@@ -1205,7 +1205,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
// die Tabelle bekommt USHRT_MAX als default SSize
pTableFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, USHRT_MAX ));
// if( !(rInsTblOpts.mnInsMode & tabopts::SPLIT_LAYOUT) )
-// pTableFmt->SetAttr( SwFmtLayoutSplit( FALSE ));
+// pTableFmt->SetAttr( SwFmtLayoutSplit( sal_False ));
/* #106283# If the first node in the selection is a context node and if it
has an item FRAMEDIR set (no default) propagate the item to the
@@ -1215,7 +1215,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
const SwAttrSet & aNdSet = pSttCntntNd->GetSwAttrSet();
const SfxPoolItem *pItem = NULL;
- if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem )
+ if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem )
&& pItem != NULL)
{
pTableFmt->SetFmtAttr( *pItem );
@@ -1230,18 +1230,18 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
ASSERT( pNdTbl, "kein Tabellen-Node angelegt." )
pTableFmt->Add( pNdTbl ); // das Frame-Format setzen
-// const USHORT nRowsToRepeat =
+// const sal_uInt16 nRowsToRepeat =
// tabopts::HEADLINE == (rInsTblOpts.mnInsMode & tabopts::HEADLINE) ?
// rInsTblOpts.mnRowsToRepeat :
// 0;
// pNdTbl->SetRowsToRepeat( nRowsToRepeat );
- BOOL bUseBoxFmt = FALSE;
+ sal_Bool bUseBoxFmt = sal_False;
if( !pBoxFmt->GetDepends() )
{
// die Formate an den Boxen haben schon die richtige Size, es darf
// also nur noch die richtige Umrandung/AutoFmt gesetzt werden.
- bUseBoxFmt = TRUE;
+ bUseBoxFmt = sal_True;
pTableFmt->SetFmtAttr( pBoxFmt->GetFrmSize() );
delete pBoxFmt;
// eAdjust = HORI_NONE;
@@ -1252,7 +1252,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
// pTableFmt->Add( pNdTbl ); // das Frame-Format setzen
- ULONG nIdx = pTblNd->GetIndex();
+ sal_uLong nIdx = pTblNd->GetIndex();
aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 );
{
@@ -1368,7 +1368,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
SwTable * pTable = &pTblNd->GetTable();
SwTableLine* pLine;
SwTableBox* pBox;
- USHORT nBoxes, nLines, nMaxBoxes = 0;
+ sal_uInt16 nBoxes, nLines, nMaxBoxes = 0;
// SwHistory* pHistory = pUndo ? &pUndo->GetHistory() : 0;
@@ -1396,7 +1396,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
// erfolgen, denn sonst stehen sie falsch in der History !!!
// SwRegHistory aRegH( pTxtNd, *pTxtNd, pHistory );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pItem ) )
{
if( !nLines )
pTblFmt->SetFmtAttr( *pItem );
@@ -1405,7 +1405,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
}
if( pSet && SFX_ITEM_SET == pSet->GetItemState(
- RES_PAGEDESC, FALSE, &pItem ) &&
+ RES_PAGEDESC, sal_False, &pItem ) &&
((SwFmtPageDesc*)pItem)->GetPageDesc() )
{
if( !nLines )
@@ -1475,18 +1475,18 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
}
// die Tabelle ausgleichen, leere Sections einfuegen
- USHORT n;
+ sal_uInt16 n;
if( aPosArr.Count() )
{
SwTableLines& rLns = pTable->GetTabLines();
- USHORT nLastPos = 0;
+ sal_uInt16 nLastPos = 0;
for( n = 0; n < aPosArr.Count(); ++n )
{
SwTableBoxFmt *pNewFmt = pDoc->MakeTableBoxFmt();
pNewFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE,
aPosArr[ n ] - nLastPos ));
- for( USHORT nLines2 = 0; nLines2 < rLns.Count(); ++nLines2 )
+ for( sal_uInt16 nLines2 = 0; nLines2 < rLns.Count(); ++nLines2 )
//JP 24.06.98: hier muss ein Add erfolgen, da das BoxFormat
// von der rufenden Methode noch gebraucht wird!
pNewFmt->Add( rLns[ nLines2 ]->GetTabBoxes()[ n ] );
@@ -1510,10 +1510,10 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
//---------------- Tabelle -> Text -----------------------
-BOOL SwDoc::TableToText( const SwTableNode* pTblNd, sal_Unicode cCh )
+sal_Bool SwDoc::TableToText( const SwTableNode* pTblNd, sal_Unicode cCh )
{
if( !pTblNd )
- return FALSE;
+ return sal_False;
// --> FME 2004-09-28 #i34471#
// If this is trigged by SwUndoTblToTxt::Repeat() nobody ever deleted
@@ -1524,7 +1524,7 @@ BOOL SwDoc::TableToText( const SwTableNode* pTblNd, sal_Unicode cCh )
// <--
#ifdef DEL_TABLE_REDLINES
- lcl_DelRedlines aDelRedl( *pTblNd, FALSE );
+ lcl_DelRedlines aDelRedl( *pTblNd, sal_False );
#endif
SwNodeRange aRg( *pTblNd, 0, *pTblNd->EndOfSectionNode() );
@@ -1541,7 +1541,7 @@ BOOL SwDoc::TableToText( const SwTableNode* pTblNd, sal_Unicode cCh )
aMsgHnt.eFlags = TBL_BOXNAME;
UpdateTblFlds( &aMsgHnt );
- BOOL bRet = GetNodes().TableToText( aRg, cCh, pUndo );
+ sal_Bool bRet = GetNodes().TableToText( aRg, cCh, pUndo );
if( pUndoRg )
{
pUndoRg->aStart++;
@@ -1575,9 +1575,9 @@ struct _DelTabPara
// forward deklarieren damit sich die Lines und Boxen rekursiv aufrufen
// koennen.
-BOOL lcl_DelBox( const SwTableBox*&, void *pPara );
+sal_Bool lcl_DelBox( const SwTableBox*&, void *pPara );
-BOOL lcl_DelLine( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_DelLine( const SwTableLine*& rpLine, void* pPara )
{
ASSERT( pPara, "die Parameter fehlen" );
_DelTabPara aPara( *(_DelTabPara*)pPara );
@@ -1585,11 +1585,11 @@ BOOL lcl_DelLine( const SwTableLine*& rpLine, void* pPara )
if( rpLine->GetUpper() ) // gibt es noch eine uebergeordnete Box ??
// dann gebe den letzten TextNode zurueck
((_DelTabPara*)pPara)->pLastNd = aPara.pLastNd;
- return TRUE;
+ return sal_True;
}
-BOOL lcl_DelBox( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_DelBox( const SwTableBox*& rpBox, void* pPara )
{
ASSERT( pPara, "die Parameter fehlen" );
@@ -1609,7 +1609,7 @@ BOOL lcl_DelBox( const SwTableBox*& rpBox, void* pPara )
0 != ( pCurTxtNd = aDelRg.aStart.GetNode().GetTxtNode() ))
{
// Join the current text node with the last from the previous box if possible
- ULONG nNdIdx = aDelRg.aStart.GetIndex();
+ sal_uLong nNdIdx = aDelRg.aStart.GetIndex();
aDelRg.aStart--;
if( pDelPara->pLastNd == &aDelRg.aStart.GetNode() )
{
@@ -1649,11 +1649,11 @@ BOOL lcl_DelBox( const SwTableBox*& rpBox, void* pPara )
if( pDelPara->pLastNd && pDelPara->pLastNd->HasSwAttrSet() )
pDelPara->pLastNd->ResetAttr( RES_PARATR_ADJUST );
}
- return TRUE;
+ return sal_True;
}
-BOOL SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
+sal_Bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
SwUndoTblToTxt* pUndo )
{
// ist eine Tabelle selektiert ?
@@ -1661,7 +1661,7 @@ BOOL SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
if( rRange.aStart.GetIndex() >= rRange.aEnd.GetIndex() ||
0 == ( pTblNd = (*this)[ rRange.aStart ]->GetTableNode()) ||
&rRange.aEnd.GetNode() != pTblNd->EndOfSectionNode() )
- return FALSE;
+ return sal_False;
// stand die Tabelle ganz alleine in einer Section ?
// dann ueber den Upper der Tabelle die Frames anlegen
@@ -1690,9 +1690,9 @@ BOOL SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
// was ist mit UNDO???
const SfxItemSet& rTblSet = pTblNd->pTable->GetFrmFmt()->GetAttrSet();
const SfxPoolItem *pBreak, *pDesc;
- if( SFX_ITEM_SET != rTblSet.GetItemState( RES_PAGEDESC, FALSE, &pDesc ))
+ if( SFX_ITEM_SET != rTblSet.GetItemState( RES_PAGEDESC, sal_False, &pDesc ))
pDesc = 0;
- if( SFX_ITEM_SET != rTblSet.GetItemState( RES_BREAK, FALSE, &pBreak ))
+ if( SFX_ITEM_SET != rTblSet.GetItemState( RES_BREAK, sal_False, &pBreak ))
pBreak = 0;
if( pBreak || pDesc )
@@ -1708,7 +1708,7 @@ BOOL SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
SectionUp( &aDelRg ); // loesche die Section und damit die Tabelle
// #i28006#
- ULONG nStt = aDelRg.aStart.GetIndex(), nEnd = aDelRg.aEnd.GetIndex();
+ sal_uLong nStt = aDelRg.aStart.GetIndex(), nEnd = aDelRg.aEnd.GetIndex();
if( !pFrmNd )
{
pNode2Layout->RestoreUpperFrms( *this,
@@ -1748,7 +1748,7 @@ BOOL SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
// #i28006# Fly frames have to be restored even if the table was
// #alone in the section
const SwSpzFrmFmts& rFlyArr = *GetDoc()->GetSpzFrmFmts();
- for( USHORT n = 0; n < rFlyArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFlyArr.Count(); ++n )
{
SwFrmFmt *const pFmt = (SwFrmFmt*)rFlyArr[n];
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
@@ -1763,50 +1763,50 @@ BOOL SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
}
}
- return TRUE;
+ return sal_True;
}
// ----- einfuegen von Spalten/Zeilen ------------------------
-BOOL SwDoc::InsertCol( const SwCursor& rCursor, USHORT nCnt, BOOL bBehind )
+sal_Bool SwDoc::InsertCol( const SwCursor& rCursor, sal_uInt16 nCnt, sal_Bool bBehind )
{
if( !::CheckSplitCells( rCursor, nCnt + 1, nsSwTblSearchType::TBLSEARCH_COL ) )
- return FALSE;
+ return sal_False;
// lasse ueber das Layout die Boxen suchen
SwSelBoxes aBoxes;
::GetTblSel( rCursor, aBoxes, nsSwTblSearchType::TBLSEARCH_COL );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aBoxes.Count() )
bRet = InsertCol( aBoxes, nCnt, bBehind );
return bRet;
}
-BOOL SwDoc::InsertCol( const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
+sal_Bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind )
{
// uebers SwDoc fuer Undo !!
ASSERT( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
SwTable& rTbl = pTblNd->GetTable();
if( rTbl.ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
#ifdef DEL_TABLE_REDLINES
- lcl_DelRedlines aDelRedl( *pTblNd, TRUE );
+ lcl_DelRedlines aDelRedl( *pTblNd, sal_True );
#endif
SwTableSortBoxes aTmpLst( 0, 5 );
SwUndoTblNdsChg* pUndo = 0;
if( DoesUndo() )
{
- DoUndo( FALSE );
+ DoUndo( sal_False );
pUndo = new SwUndoTblNdsChg( UNDO_TABLE_INSCOL, rBoxes, *pTblNd,
- 0, 0, nCnt, bBehind, FALSE );
+ 0, 0, nCnt, bBehind, sal_False );
aTmpLst.Insert( &rTbl.GetTabSortBoxes(), 0, rTbl.GetTabSortBoxes().Count() );
}
@@ -1814,7 +1814,7 @@ BOOL SwDoc::InsertCol( const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
aMsgHnt.eFlags = TBL_BOXPTR;
UpdateTblFlds( &aMsgHnt );
- BOOL bRet = rTbl.InsertCol( this, rBoxes, nCnt, bBehind );
+ sal_Bool bRet = rTbl.InsertCol( this, rBoxes, nCnt, bBehind );
if( bRet )
{
SetModified();
@@ -1824,7 +1824,7 @@ BOOL SwDoc::InsertCol( const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
if( pUndo )
{
- DoUndo( TRUE );
+ DoUndo( sal_True );
if( bRet )
{
ClearRedo();
@@ -1837,41 +1837,41 @@ BOOL SwDoc::InsertCol( const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
return bRet;
}
-BOOL SwDoc::InsertRow( const SwCursor& rCursor, USHORT nCnt, BOOL bBehind )
+sal_Bool SwDoc::InsertRow( const SwCursor& rCursor, sal_uInt16 nCnt, sal_Bool bBehind )
{
// lasse ueber das Layout die Boxen suchen
SwSelBoxes aBoxes;
GetTblSel( rCursor, aBoxes, nsSwTblSearchType::TBLSEARCH_ROW );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aBoxes.Count() )
bRet = InsertRow( aBoxes, nCnt, bBehind );
return bRet;
}
-BOOL SwDoc::InsertRow( const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
+sal_Bool SwDoc::InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind )
{
// uebers SwDoc fuer Undo !!
ASSERT( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
SwTable& rTbl = pTblNd->GetTable();
if( rTbl.ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
#ifdef DEL_TABLE_REDLINES
- lcl_DelRedlines aDelRedl( *pTblNd, TRUE );
+ lcl_DelRedlines aDelRedl( *pTblNd, sal_True );
#endif
SwTableSortBoxes aTmpLst( 0, 5 );
SwUndoTblNdsChg* pUndo = 0;
if( DoesUndo() )
{
- DoUndo( FALSE );
+ DoUndo( sal_False );
pUndo = new SwUndoTblNdsChg( UNDO_TABLE_INSROW,rBoxes, *pTblNd,
- 0, 0, nCnt, bBehind, FALSE );
+ 0, 0, nCnt, bBehind, sal_False );
aTmpLst.Insert( &rTbl.GetTabSortBoxes(), 0, rTbl.GetTabSortBoxes().Count() );
}
@@ -1879,7 +1879,7 @@ BOOL SwDoc::InsertRow( const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
aMsgHnt.eFlags = TBL_BOXPTR;
UpdateTblFlds( &aMsgHnt );
- BOOL bRet = rTbl.InsertRow( this, rBoxes, nCnt, bBehind );
+ sal_Bool bRet = rTbl.InsertRow( this, rBoxes, nCnt, bBehind );
if( bRet )
{
SetModified();
@@ -1889,7 +1889,7 @@ BOOL SwDoc::InsertRow( const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
if( pUndo )
{
- DoUndo( TRUE );
+ DoUndo( sal_True );
if( bRet )
{
ClearRedo();
@@ -1905,13 +1905,13 @@ BOOL SwDoc::InsertRow( const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
// ----- loeschen von Spalten/Zeilen ------------------------
-BOOL SwDoc::DeleteRow( const SwCursor& rCursor )
+sal_Bool SwDoc::DeleteRow( const SwCursor& rCursor )
{
// lasse ueber das Layout die Boxen suchen
SwSelBoxes aBoxes;
GetTblSel( rCursor, aBoxes, nsSwTblSearchType::TBLSEARCH_ROW );
if( ::HasProtectedCells( aBoxes ))
- return FALSE;
+ return sal_False;
// die Crsr aus dem Loeschbereich entfernen.
// Der Cursor steht danach:
@@ -1922,7 +1922,7 @@ BOOL SwDoc::DeleteRow( const SwCursor& rCursor )
SwTableNode* pTblNd = rCursor.GetNode()->FindTableNode();
if( pTblNd->GetTable().ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -1932,7 +1932,7 @@ BOOL SwDoc::DeleteRow( const SwCursor& rCursor )
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
SwEditShell* pESh = GetEditShell();
if( pESh )
@@ -1962,7 +1962,7 @@ BOOL SwDoc::DeleteRow( const SwCursor& rCursor )
pDelBox = pLn->GetTabBoxes()[ pLn->GetTabBoxes().Count() - 1 ];
}
SwTableBox* pNextBox = pDelLine->FindNextBox( pTblNd->GetTable(),
- pDelBox, TRUE );
+ pDelBox, sal_True );
while( pNextBox &&
pNextBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
pNextBox = pNextBox->FindNextBox( pTblNd->GetTable(), pNextBox );
@@ -1974,13 +1974,13 @@ BOOL SwDoc::DeleteRow( const SwCursor& rCursor )
while( !pDelBox->GetSttNd() )
pDelBox = pDelBox->GetTabLines()[0]->GetTabBoxes()[0];
pNextBox = pDelLine->FindPreviousBox( pTblNd->GetTable(),
- pDelBox, TRUE );
+ pDelBox, sal_True );
while( pNextBox &&
pNextBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
pNextBox = pNextBox->FindPreviousBox( pTblNd->GetTable(), pNextBox );
}
- ULONG nIdx;
+ sal_uLong nIdx;
if( pNextBox ) // dann den Cursor hier hinein
nIdx = pNextBox->GetSttIdx() + 1;
else // ansonsten hinter die Tabelle
@@ -2005,19 +2005,19 @@ BOOL SwDoc::DeleteRow( const SwCursor& rCursor )
// dann loesche doch die Zeilen
StartUndo(UNDO_ROW_DELETE, NULL);
- BOOL bResult = DeleteRowCol( aBoxes );
+ sal_Bool bResult = DeleteRowCol( aBoxes );
EndUndo(UNDO_ROW_DELETE, NULL);
return bResult;
}
-BOOL SwDoc::DeleteCol( const SwCursor& rCursor )
+sal_Bool SwDoc::DeleteCol( const SwCursor& rCursor )
{
// lasse ueber das Layout die Boxen suchen
SwSelBoxes aBoxes;
GetTblSel( rCursor, aBoxes, nsSwTblSearchType::TBLSEARCH_COL );
if( ::HasProtectedCells( aBoxes ))
- return FALSE;
+ return sal_False;
// die Crsr muessen noch aus dem Loesch Bereich entfernt
// werden. Setze sie immer hinter/auf die Tabelle; ueber die
@@ -2031,25 +2031,25 @@ BOOL SwDoc::DeleteCol( const SwCursor& rCursor )
// dann loesche doch die Spalten
StartUndo(UNDO_COL_DELETE, NULL);
- BOOL bResult = DeleteRowCol( aBoxes, true );
+ sal_Bool bResult = DeleteRowCol( aBoxes, true );
EndUndo(UNDO_COL_DELETE, NULL);
return bResult;
}
-BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
+sal_Bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
{
if( ::HasProtectedCells( rBoxes ))
- return FALSE;
+ return sal_False;
// uebers SwDoc fuer Undo !!
ASSERT( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
if( pTblNd->GetTable().ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
::ClearFEShellTabCols();
SwSelBoxes aSelBoxes;
@@ -2066,25 +2066,25 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
}
#ifdef DEL_TABLE_REDLINES
- lcl_DelRedlines aDelRedl( *pTblNd, TRUE );
+ lcl_DelRedlines aDelRedl( *pTblNd, sal_True );
#endif
// soll die gesamte Tabelle geloescht werden ??
- const ULONG nTmpIdx1 = pTblNd->GetIndex();
- const ULONG nTmpIdx2 = aSelBoxes[ aSelBoxes.Count()-1 ]->GetSttNd()->
+ const sal_uLong nTmpIdx1 = pTblNd->GetIndex();
+ const sal_uLong nTmpIdx2 = aSelBoxes[ aSelBoxes.Count()-1 ]->GetSttNd()->
EndOfSectionIndex()+1;
if( pTblNd->GetTable().GetTabSortBoxes().Count() == aSelBoxes.Count() &&
aSelBoxes[0]->GetSttIdx()-1 == nTmpIdx1 &&
nTmpIdx2 == pTblNd->EndOfSectionIndex() )
{
- BOOL bNewTxtNd = FALSE;
+ sal_Bool bNewTxtNd = sal_False;
// steht diese auch noch alleine in einem FlyFrame ?
SwNodeIndex aIdx( *pTblNd, -1 );
const SwStartNode* pSttNd = aIdx.GetNode().GetStartNode();
if( pSttNd )
{
- const ULONG nTblEnd = pTblNd->EndOfSectionIndex() + 1;
- const ULONG nSectEnd = pSttNd->EndOfSectionIndex();
+ const sal_uLong nTblEnd = pTblNd->EndOfSectionIndex() + 1;
+ const sal_uLong nSectEnd = pSttNd->EndOfSectionIndex();
if( nTblEnd == nSectEnd )
{
if( SwFlyStartNode == pSttNd->GetStartNodeType() )
@@ -2094,13 +2094,13 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
{
// Ok, das ist das gesuchte FlyFormat
DelLayoutFmt( pFmt );
- return TRUE;
+ return sal_True;
}
}
// kein Fly ?? also Kopf- oder Fusszeile: dann immer einen
// TextNode ueberig lassen.
// Undo koennen wir dann vergessen !!
- bNewTxtNd = TRUE;
+ bNewTxtNd = sal_True;
}
}
@@ -2132,8 +2132,8 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
}
// harte SeitenUmbrueche am nachfolgenden Node verschieben
- BOOL bSavePageBreak = FALSE, bSavePageDesc = FALSE;
- ULONG nNextNd = pTblNd->EndOfSectionIndex()+1;
+ sal_Bool bSavePageBreak = sal_False, bSavePageDesc = sal_False;
+ sal_uLong nNextNd = pTblNd->EndOfSectionIndex()+1;
SwCntntNode* pNextNd = GetNodes()[ nNextNd ]->GetCntntNode();
if( pNextNd )
{
@@ -2146,17 +2146,17 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt();
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
pNextNd->SetAttr( *pItem );
- bSavePageDesc = TRUE;
+ bSavePageDesc = sal_True;
}
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
pNextNd->SetAttr( *pItem );
- bSavePageBreak = TRUE;
+ bSavePageBreak = sal_True;
}
}
}
@@ -2195,11 +2195,11 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt();
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
}
@@ -2208,15 +2208,15 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
}
SetModified();
SetFieldsDirty( true, NULL, 0 );
- return TRUE;
+ return sal_True;
}
SwUndoTblNdsChg* pUndo = 0;
if( DoesUndo() )
{
- DoUndo( FALSE );
+ DoUndo( sal_False );
pUndo = new SwUndoTblNdsChg( UNDO_TABLE_DELBOX, aSelBoxes, *pTblNd,
- nMin, nMax, 0, FALSE, FALSE );
+ nMin, nMax, 0, sal_False, sal_False );
}
SwTableFmlUpdate aMsgHnt( &pTblNd->GetTable() );
@@ -2231,7 +2231,7 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
if( pUndo )
pUndo->ReNewBoxes( aSelBoxes );
}
- const BOOL bRet = rTable.DeleteSel( this, aSelBoxes, 0, pUndo, TRUE, TRUE );
+ const sal_Bool bRet = rTable.DeleteSel( this, aSelBoxes, 0, pUndo, sal_True, sal_True );
if( bRet )
{
SetModified();
@@ -2240,7 +2240,7 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
if( pUndo )
{
- DoUndo( TRUE );
+ DoUndo( sal_True );
if( bRet )
{
ClearRedo();
@@ -2256,37 +2256,37 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
// ---------- teilen / zusammenfassen von Boxen in der Tabelle --------
-BOOL SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, USHORT nCnt,
+sal_Bool SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, sal_uInt16 nCnt,
sal_Bool bSameHeight )
{
// uebers SwDoc fuer Undo !!
ASSERT( rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
SwTable& rTbl = pTblNd->GetTable();
if( rTbl.ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
#ifdef DEL_TABLE_REDLINES
- lcl_DelRedlines aDelRedl( *pTblNd, TRUE );
+ lcl_DelRedlines aDelRedl( *pTblNd, sal_True );
#endif
SvULongs aNdsCnts;
SwTableSortBoxes aTmpLst( 0, 5 );
SwUndoTblNdsChg* pUndo = 0;
- BOOL bDoUndo = DoesUndo();
+ sal_Bool bDoUndo = DoesUndo();
if( bDoUndo )
{
- DoUndo( FALSE );
+ DoUndo( sal_False );
pUndo = new SwUndoTblNdsChg( UNDO_TABLE_SPLIT, rBoxes, *pTblNd, 0, 0,
nCnt, bVert, bSameHeight );
aTmpLst.Insert( &rTbl.GetTabSortBoxes(), 0, rTbl.GetTabSortBoxes().Count() );
if( !bVert )
{
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
const SwStartNode* pSttNd = rBoxes[ n ]->GetSttNd();
aNdsCnts.Insert( pSttNd->EndOfSectionIndex() -
@@ -2299,7 +2299,7 @@ BOOL SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, USHORT nCnt,
aMsgHnt.eFlags = TBL_BOXPTR;
UpdateTblFlds( &aMsgHnt );
- BOOL bRet;
+ sal_Bool bRet;
if( bVert )
bRet = rTbl.SplitCol( this, rBoxes, nCnt );
else
@@ -2331,7 +2331,7 @@ BOOL SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, USHORT nCnt,
}
-USHORT SwDoc::MergeTbl( SwPaM& rPam )
+sal_uInt16 SwDoc::MergeTbl( SwPaM& rPam )
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwTableNode* pTblNd = rPam.GetNode()->FindTableNode();
@@ -2340,7 +2340,7 @@ USHORT SwDoc::MergeTbl( SwPaM& rPam )
SwTable& rTable = pTblNd->GetTable();
if( rTable.ISA(SwDDETable) )
return TBLMERGE_NOSELECTION;
- USHORT nRet = TBLMERGE_NOSELECTION;
+ sal_uInt16 nRet = TBLMERGE_NOSELECTION;
if( !rTable.IsNewModel() )
{
nRet =::CheckMergeSel( rPam );
@@ -2404,7 +2404,7 @@ USHORT SwDoc::MergeTbl( SwPaM& rPam )
SwPaM* pTmp = &rPam;
while( &rPam != ( pTmp = (SwPaM*)pTmp->GetNext() ))
for( int i = 0; i < 2; ++i )
- pTmp->GetBound( (BOOL)i ) = *rPam.GetPoint();
+ pTmp->GetBound( (sal_Bool)i ) = *rPam.GetPoint();
}
// dann fuege sie zusammen
@@ -2476,7 +2476,7 @@ void SwTableNode::MakeFrms(const SwNodeIndex & rIdx )
ASSERT( pNode, "Kein Contentnode oder Copy-Node und neuer Node identisch.");
- BOOL bBefore = rIdx < GetIndex();
+ sal_Bool bBefore = rIdx < GetIndex();
SwNode2Layout aNode2Layout( *this, rIdx.GetIndex() );
@@ -2543,7 +2543,7 @@ void SwTableNode::DelFrms()
SwClient *pLast = aIter.GoStart();
while ( pLast )
{
- BOOL bAgain = FALSE;
+ sal_Bool bAgain = sal_False;
if ( pLast->IsA( TYPE(SwFrm) ) )
{
SwTabFrm *pFrm = (SwTabFrm*)pLast;
@@ -2569,7 +2569,7 @@ void SwTableNode::DelFrms()
// <--
pFrm->Cut();
delete pFrm;
- bAgain = TRUE;
+ bAgain = sal_True;
}
}
pLast = bAgain ? aIter.GoStart() : aIter++;
@@ -2577,7 +2577,7 @@ void SwTableNode::DelFrms()
}
-void SwTableNode::SetNewTable( SwTable* pNewTable, BOOL bNewFrames )
+void SwTableNode::SetNewTable( SwTable* pNewTable, sal_Bool bNewFrames )
{
DelFrms();
delete pTable;
@@ -2612,7 +2612,7 @@ void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr,
if( pShCrsr )
aPt = pShCrsr->GetPtPos();
- const SwFrm* pTmpFrm = pCNd->GetFrm( &aPt, 0, FALSE );
+ const SwFrm* pTmpFrm = pCNd->GetFrm( &aPt, 0, sal_False );
do {
pTmpFrm = pTmpFrm->GetUpper();
} while ( !pTmpFrm->IsCellFrm() );
@@ -2630,9 +2630,9 @@ void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr,
//Fix-Punkte setzen, LeftMin in Dokumentkoordinaten die anderen relativ.
SWRECTFN( pTab )
const SwPageFrm* pPage = pTab->FindPageFrm();
- const ULONG nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() -
+ const sal_uLong nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() -
(pPage->Frm().*fnRect->fnGetLeft)();
- const ULONG nRightMax = (pTab->Frm().*fnRect->fnGetRight)() -
+ const sal_uLong nRightMax = (pTab->Frm().*fnRect->fnGetRight)() -
(pPage->Frm().*fnRect->fnGetLeft)();
rFill.SetLeftMin ( nLeftMin );
@@ -2661,7 +2661,7 @@ bool FuzzyCompare::operator() ( long s1, long s2 ) const
bool lcl_IsFrmInColumn( const SwCellFrm& rFrm, SwSelBoxes& rBoxes )
{
- for( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
if ( rFrm.GetTabBox() == rBoxes[ i ] )
return true;
@@ -2772,7 +2772,7 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* ,
// calculate hidden flags for entry nUpperBorder/nLowerBorder:
long nTmpVal = nUpperBorder;
- for ( BYTE i = 0; i < 2; ++i )
+ for ( sal_uInt8 i = 0; i < 2; ++i )
{
aHiddenIter = aHidden.find( nTmpVal );
if ( aHiddenIter == aHidden.end() )
@@ -2791,7 +2791,7 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* ,
}
// transfer calculated values from BoundaryMap and HiddenMap into rFill:
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
for ( aIter = aBoundaries.begin(); aIter != aBoundaries.end(); ++aIter )
{
const long nTabTop = (pTab->*fnRect->fnGetPrtTop)();
@@ -2815,7 +2815,7 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* ,
rFill.SetLastRowAllowedToChange( !pTab->HasFollowFlowLine() );
}
-void SwDoc::SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
+void SwDoc::SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly,
const SwCursor* pCrsr, const SwCellFrm* pBoxFrm )
{
const SwTableBox* pBox = 0;
@@ -2837,7 +2837,7 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
if( pShCrsr )
aPt = pShCrsr->GetPtPos();
- const SwFrm* pTmpFrm = pCNd->GetFrm( &aPt, 0, FALSE );
+ const SwFrm* pTmpFrm = pCNd->GetFrm( &aPt, 0, sal_False );
do {
pTmpFrm = pTmpFrm->GetUpper();
} while ( !pTmpFrm->IsCellFrm() );
@@ -2876,9 +2876,9 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
SwTabCols aOld( rNew.Count() );
const SwPageFrm* pPage = pTab->FindPageFrm();
- const ULONG nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() -
+ const sal_uLong nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() -
(pPage->Frm().*fnRect->fnGetLeft)();
- const ULONG nRightMax = (pTab->Frm().*fnRect->fnGetRight)() -
+ const sal_uLong nRightMax = (pTab->Frm().*fnRect->fnGetRight)() -
(pPage->Frm().*fnRect->fnGetLeft)();
//Fix-Punkte setzen, LeftMin in Dokumentkoordinaten die anderen relativ.
@@ -2891,7 +2891,7 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
SetTabCols(rTab, rNew, aOld, pBox, bCurRowOnly );
}
-void SwDoc::SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const SwCursor*,
+void SwDoc::SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const SwCursor*,
const SwCellFrm* pBoxFrm )
{
const SwTableBox* pBox;
@@ -2932,14 +2932,14 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const SwCursor*
StartUndo( UNDO_TABLE_ATTR, NULL );
// check for differences between aOld and rNew:
- const USHORT nCount = rNew.Count();
+ const sal_uInt16 nCount = rNew.Count();
const SwTable* pTable = pTab->GetTable();
ASSERT( pTable, "My colleague told me, this couldn't happen" );
- for ( USHORT i = 0; i <= nCount; ++i )
+ for ( sal_uInt16 i = 0; i <= nCount; ++i )
{
- const USHORT nIdxStt = bVert ? nCount - i : i - 1;
- const USHORT nIdxEnd = bVert ? nCount - i - 1 : i;
+ const sal_uInt16 nIdxStt = bVert ? nCount - i : i - 1;
+ const sal_uInt16 nIdxEnd = bVert ? nCount - i - 1 : i;
const long nOldRowStart = i == 0 ? 0 : aOld[ nIdxStt ];
const long nOldRowEnd = i == nCount ? aOld.GetRight() : aOld[ nIdxEnd ];
@@ -2967,7 +2967,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const SwCursor*
if ( pFrm->IsCellFrm() && pFrm->FindTabFrm() == pTab )
{
const long nLowerBorder = (pFrm->Frm().*fnRect->fnGetBottom)();
- const ULONG nTabTop = (pTab->*fnRect->fnGetPrtTop)();
+ const sal_uLong nTabTop = (pTab->*fnRect->fnGetPrtTop)();
if ( abs( (*fnRect->fnYInc)( nTabTop, nOldRowEnd ) - nLowerBorder ) <= ROWFUZZY )
{
if ( !bCurColOnly || pFrm == pBoxFrm )
@@ -3021,19 +3021,19 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const SwCursor*
* Direktzugriff fuer UNO
* --------------------------------------------------*/
void SwDoc::SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld,
- const SwTableBox *pStart, BOOL bCurRowOnly )
+ const SwTableBox *pStart, sal_Bool bCurRowOnly )
{
if( DoesUndo() )
{
ClearRedo();
- AppendUndo( new SwUndoAttrTbl( *rTab.GetTableNode(), TRUE ));
+ AppendUndo( new SwUndoAttrTbl( *rTab.GetTableNode(), sal_True ));
}
rTab.SetTabCols( rNew, rOld, pStart, bCurRowOnly );
::ClearFEShellTabCols();
SetModified();
}
-void SwDoc::SetRowsToRepeat( SwTable &rTable, USHORT nSet )
+void SwDoc::SetRowsToRepeat( SwTable &rTable, sal_uInt16 nSet )
{
if( nSet == rTable.GetRowsToRepeat() )
return;
@@ -3055,7 +3055,7 @@ void SwDoc::SetRowsToRepeat( SwTable &rTable, USHORT nSet )
// Splittet eine Tabelle in der Grund-Zeile, in der der Index steht.
// Alle GrundZeilen dahinter wandern in eine neue Tabelle/-Node.
-// Ist das Flag bCalcNewSize auf TRUE, wird fuer beide neuen Tabellen
+// Ist das Flag bCalcNewSize auf sal_True, wird fuer beide neuen Tabellen
// die neue Size aus dem Max der Boxen errechnet; vorrausgesetzt,
// die Size ist "absolut" gesetzt (USHRT_MAX)
@@ -3070,13 +3070,13 @@ void SwCollectTblLineBoxes::AddBox( const SwTableBox& rBox )
aPosArr.Insert( nWidth, aPosArr.Count() );
SwTableBox* p = (SwTableBox*)&rBox;
aBoxes.Insert( p, aBoxes.Count() );
- nWidth = nWidth + (USHORT)rBox.GetFrmFmt()->GetFrmSize().GetWidth();
+ nWidth = nWidth + (sal_uInt16)rBox.GetFrmFmt()->GetFrmSize().GetWidth();
}
const SwTableBox* SwCollectTblLineBoxes::GetBoxOfPos( const SwTableBox& rBox )
{
const SwTableBox* pRet = 0;
- USHORT n;
+ sal_uInt16 n;
if( aPosArr.Count() )
{
@@ -3093,15 +3093,15 @@ const SwTableBox* SwCollectTblLineBoxes::GetBoxOfPos( const SwTableBox& rBox )
if( n >= aPosArr.Count() )
--n;
- nWidth = nWidth + (USHORT)rBox.GetFrmFmt()->GetFrmSize().GetWidth();
+ nWidth = nWidth + (sal_uInt16)rBox.GetFrmFmt()->GetFrmSize().GetWidth();
pRet = aBoxes[ n ];
}
return pRet;
}
-BOOL SwCollectTblLineBoxes::Resize( USHORT nOffset, USHORT nOldWidth )
+sal_Bool SwCollectTblLineBoxes::Resize( sal_uInt16 nOffset, sal_uInt16 nOldWidth )
{
- USHORT n;
+ sal_uInt16 n;
if( aPosArr.Count() )
{
@@ -3121,29 +3121,29 @@ BOOL SwCollectTblLineBoxes::Resize( USHORT nOffset, USHORT nOldWidth )
// dann die Positionen der neuen Size anpassen
for( n = 0; n < aPosArr.Count(); ++n )
{
- ULONG nSize = nWidth;
+ sal_uLong nSize = nWidth;
nSize *= ( aPosArr[ n ] - nOffset );
nSize /= nOldWidth;
- aPosArr[ n ] = USHORT( nSize );
+ aPosArr[ n ] = sal_uInt16( nSize );
}
}
return 0 != aPosArr.Count();
}
-BOOL lcl_Line_CollectBox( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_Line_CollectBox( const SwTableLine*& rpLine, void* pPara )
{
SwCollectTblLineBoxes* pSplPara = (SwCollectTblLineBoxes*)pPara;
if( pSplPara->IsGetValues() )
((SwTableLine*)rpLine)->GetTabBoxes().ForEach( &lcl_Box_CollectBox, pPara );
else
((SwTableLine*)rpLine)->GetTabBoxes().ForEach( &lcl_BoxSetSplitBoxFmts, pPara );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_Box_CollectBox( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_Box_CollectBox( const SwTableBox*& rpBox, void* pPara )
{
SwCollectTblLineBoxes* pSplPara = (SwCollectTblLineBoxes*)pPara;
- USHORT nLen = rpBox->GetTabLines().Count();
+ sal_uInt16 nLen = rpBox->GetTabLines().Count();
if( nLen )
{
// dann mit der richtigen Line weitermachen
@@ -3157,13 +3157,13 @@ BOOL lcl_Box_CollectBox( const SwTableBox*& rpBox, void* pPara )
}
else
pSplPara->AddBox( *rpBox );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_BoxSetSplitBoxFmts( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_BoxSetSplitBoxFmts( const SwTableBox*& rpBox, void* pPara )
{
SwCollectTblLineBoxes* pSplPara = (SwCollectTblLineBoxes*)pPara;
- USHORT nLen = rpBox->GetTabLines().Count();
+ sal_uInt16 nLen = rpBox->GetTabLines().Count();
if( nLen )
{
// dann mit der richtigen Line weitermachen
@@ -3194,7 +3194,7 @@ BOOL lcl_BoxSetSplitBoxFmts( const SwTableBox*& rpBox, void* pPara )
}
else
{
-USHORT __FAR_DATA aTableSplitBoxSetRange[] = {
+sal_uInt16 __FAR_DATA aTableSplitBoxSetRange[] = {
RES_LR_SPACE, RES_UL_SPACE,
RES_BACKGROUND, RES_SHADOW,
RES_PROTECT, RES_PROTECT,
@@ -3228,12 +3228,12 @@ USHORT __FAR_DATA aTableSplitBoxSetRange[] = {
pBox->GetSttNd()->CheckSectionCondColl();
}
}
- return TRUE;
+ return sal_True;
}
-BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode,
- BOOL bCalcNewSize )
+sal_Bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode,
+ sal_Bool bCalcNewSize )
{
SwNode* pNd = &rPos.nNode.GetNode();
SwTableNode* pTNd = pNd->FindTableNode();
@@ -3241,7 +3241,7 @@ BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode,
return 0;
if( pTNd->GetTable().ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
SwTable& rTbl = pTNd->GetTable();
rTbl.SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -3253,7 +3253,7 @@ BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode,
aMsgHnt.pHistory = &aHistory;
{
- ULONG nSttIdx = pNd->FindTableBoxStartNode()->GetIndex();
+ sal_uLong nSttIdx = pNd->FindTableBoxStartNode()->GetIndex();
// Suche die Grund-Line dieser Box:
SwTableBox* pBox = rTbl.GetTblBox( nSttIdx );
@@ -3281,7 +3281,7 @@ BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode,
// TL_CHART2: need to inform chart of probably changed cell names
//pDoc->UpdateCharts( rTbl.GetFrmFmt()->GetName() );
- SwTableNode* pNew = GetNodes().SplitTable( rPos.nNode, FALSE, bCalcNewSize );
+ SwTableNode* pNew = GetNodes().SplitTable( rPos.nNode, sal_False, bCalcNewSize );
if( pNew )
{
@@ -3301,12 +3301,12 @@ BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode,
// an der aktuellen als obere
case HEADLINE_BORDERCOPY:
{
- SwCollectTblLineBoxes aPara( FALSE, eHdlnMode );
+ SwCollectTblLineBoxes aPara( sal_False, eHdlnMode );
SwTableLine* pLn = rTbl.GetTabLines()[
rTbl.GetTabLines().Count() - 1 ];
pLn->GetTabBoxes().ForEach( &lcl_Box_CollectBox, &aPara );
- aPara.SetValues( TRUE );
+ aPara.SetValues( sal_True );
pLn = pNew->GetTable().GetTabLines()[ 0 ];
pLn->GetTabBoxes().ForEach( &lcl_BoxSetSplitBoxFmts, &aPara );
@@ -3323,11 +3323,11 @@ BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode,
if( HEADLINE_BOXATRCOLLCOPY == eHdlnMode && pUndo )
pHst = pUndo->GetHistory();
- SwCollectTblLineBoxes aPara( TRUE, eHdlnMode, pHst );
+ SwCollectTblLineBoxes aPara( sal_True, eHdlnMode, pHst );
SwTableLine* pLn = rTbl.GetTabLines()[ 0 ];
pLn->GetTabBoxes().ForEach( &lcl_Box_CollectBox, &aPara );
- aPara.SetValues( TRUE );
+ aPara.SetValues( sal_True );
pLn = pNew->GetTable().GetTabLines()[ 0 ];
pLn->GetTabBoxes().ForEach( &lcl_BoxSetSplitBoxFmts, &aPara );
}
@@ -3366,7 +3366,7 @@ BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode,
return 0 != pNew;
}
-BOOL lcl_ChgTblSize( SwTable& rTbl )
+sal_Bool lcl_ChgTblSize( SwTable& rTbl )
{
// das Attribut darf nicht ueber das Modify an der
// Tabelle gesetzt werden, denn sonst werden alle
@@ -3375,19 +3375,19 @@ BOOL lcl_ChgTblSize( SwTable& rTbl )
SwFmtFrmSize aTblMaxSz( pFmt->GetFrmSize() );
if( USHRT_MAX == aTblMaxSz.GetWidth() )
- return FALSE;
+ return sal_False;
- BOOL bLocked = pFmt->IsModifyLocked();
+ sal_Bool bLocked = pFmt->IsModifyLocked();
pFmt->LockModify();
aTblMaxSz.SetWidth( 0 );
SwTableLines& rLns = rTbl.GetTabLines();
- for( USHORT nLns = 0; nLns < rLns.Count(); ++nLns )
+ for( sal_uInt16 nLns = 0; nLns < rLns.Count(); ++nLns )
{
SwTwips nMaxLnWidth = 0;
SwTableBoxes& rBoxes = rLns[ nLns ]->GetTabBoxes();
- for( USHORT nBox = 0; nBox < rBoxes.Count(); ++nBox )
+ for( sal_uInt16 nBox = 0; nBox < rBoxes.Count(); ++nBox )
nMaxLnWidth += rBoxes[nBox]->GetFrmFmt()->GetFrmSize().GetWidth();
if( nMaxLnWidth > aTblMaxSz.GetWidth() )
@@ -3397,7 +3397,7 @@ BOOL lcl_ChgTblSize( SwTable& rTbl )
if( !bLocked ) // und gegebenenfalls Lock wieder freigeben
pFmt->UnlockModify();
- return TRUE;
+ return sal_True;
}
class _SplitTable_Para
@@ -3410,7 +3410,7 @@ public:
_SplitTable_Para( SwTableNode* pNew, SwTable& rOld )
: aSrc( 16, 16 ), aDest( 16, 16 ), pNewTblNd( pNew ), rOldTbl( rOld )
{}
- USHORT SrcFmt_GetPos( void* pFmt ) const
+ sal_uInt16 SrcFmt_GetPos( void* pFmt ) const
{ return aSrc.GetPos( pFmt ); }
void DestFmt_Insert( void* pFmt )
@@ -3419,7 +3419,7 @@ public:
void SrcFmt_Insert( void* pFmt )
{ aSrc.Insert( pFmt, aSrc.Count() ); }
- SwFrmFmt* DestFmt_Get( USHORT nPos ) const
+ SwFrmFmt* DestFmt_Get( sal_uInt16 nPos ) const
{ return (SwFrmFmt*)aDest[ nPos ]; }
void ChgBox( SwTableBox* pBox )
@@ -3430,15 +3430,15 @@ public:
};
-BOOL lcl_SplitTable_CpyBox( const SwTableBox*& rpBox, void* pPara );
+sal_Bool lcl_SplitTable_CpyBox( const SwTableBox*& rpBox, void* pPara );
-BOOL lcl_SplitTable_CpyLine( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_SplitTable_CpyLine( const SwTableLine*& rpLine, void* pPara )
{
SwTableLine* pLn = (SwTableLine*)rpLine;
_SplitTable_Para& rPara = *(_SplitTable_Para*)pPara;
SwFrmFmt *pSrcFmt = pLn->GetFrmFmt();
- USHORT nPos = rPara.SrcFmt_GetPos( pSrcFmt );
+ sal_uInt16 nPos = rPara.SrcFmt_GetPos( pSrcFmt );
if( USHRT_MAX == nPos )
{
rPara.DestFmt_Insert( pLn->ClaimFrmFmt() );
@@ -3448,16 +3448,16 @@ BOOL lcl_SplitTable_CpyLine( const SwTableLine*& rpLine, void* pPara )
pLn->ChgFrmFmt( (SwTableLineFmt*)rPara.DestFmt_Get( nPos ) );
pLn->GetTabBoxes().ForEach( &lcl_SplitTable_CpyBox, pPara );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_SplitTable_CpyBox( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_SplitTable_CpyBox( const SwTableBox*& rpBox, void* pPara )
{
SwTableBox* pBox = (SwTableBox*)rpBox;
_SplitTable_Para& rPara = *(_SplitTable_Para*)pPara;
SwFrmFmt *pSrcFmt = pBox->GetFrmFmt();
- USHORT nPos = rPara.SrcFmt_GetPos( pSrcFmt );
+ sal_uInt16 nPos = rPara.SrcFmt_GetPos( pSrcFmt );
if( USHRT_MAX == nPos )
{
rPara.DestFmt_Insert( pBox->ClaimFrmFmt() );
@@ -3470,18 +3470,18 @@ BOOL lcl_SplitTable_CpyBox( const SwTableBox*& rpBox, void* pPara )
rPara.ChgBox( pBox );
else
pBox->GetTabLines().ForEach( &lcl_SplitTable_CpyLine, pPara );
- return TRUE;
+ return sal_True;
}
-SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, BOOL bAfter,
- BOOL bCalcNewSize )
+SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, sal_Bool bAfter,
+ sal_Bool bCalcNewSize )
{
SwNode* pNd = &rPos.GetNode();
SwTableNode* pTNd = pNd->FindTableNode();
if( !pTNd || pNd->IsTableNode() )
return 0;
- ULONG nSttIdx = pNd->FindTableBoxStartNode()->GetIndex();
+ sal_uLong nSttIdx = pNd->FindTableBoxStartNode()->GetIndex();
// Suche die Grund-Line dieser Box:
SwTable& rTbl = pTNd->GetTable();
@@ -3494,7 +3494,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, BOOL bAfter,
pLine = pLine->GetUpper()->GetUpper();
// in pLine steht jetzt die GrundLine.
- USHORT nLinePos = rTbl.GetTabLines().C40_GETPOS( SwTableLine, pLine );
+ sal_uInt16 nLinePos = rTbl.GetTabLines().C40_GETPOS( SwTableLine, pLine );
if( USHRT_MAX == nLinePos ||
( bAfter ? ++nLinePos >= rTbl.GetTabLines().Count() : !nLinePos ))
return 0; // nicht gefunden oder letze Line !!
@@ -3539,20 +3539,20 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, BOOL bAfter,
SwChartDataProvider *pPCD = rTbl.GetFrmFmt()->getIDocumentChartDataProviderAccess()->GetChartDataProvider();
if( pPCD )
{
- for (USHORT k = nLinePos; k < rTbl.GetTabLines().Count(); ++k)
+ for (sal_uInt16 k = nLinePos; k < rTbl.GetTabLines().Count(); ++k)
{
- USHORT nLineIdx = (rTbl.GetTabLines().Count() - 1) - k + nLinePos;
- USHORT nBoxCnt = rTbl.GetTabLines()[ nLineIdx ]->GetTabBoxes().Count();
- for (USHORT j = 0; j < nBoxCnt; ++j)
+ sal_uInt16 nLineIdx = (rTbl.GetTabLines().Count() - 1) - k + nLinePos;
+ sal_uInt16 nBoxCnt = rTbl.GetTabLines()[ nLineIdx ]->GetTabBoxes().Count();
+ for (sal_uInt16 j = 0; j < nBoxCnt; ++j)
{
- USHORT nIdx = nBoxCnt - 1 - j;
+ sal_uInt16 nIdx = nBoxCnt - 1 - j;
pPCD->DeleteBox( &rTbl, *rTbl.GetTabLines()[ nLineIdx ]->GetTabBoxes()[nIdx] );
}
}
}
//
// ...und loeschen
- USHORT nDeleted = rTbl.GetTabLines().Count() - nLinePos;
+ sal_uInt16 nDeleted = rTbl.GetTabLines().Count() - nLinePos;
rTbl.GetTabLines().Remove( nLinePos, nDeleted );
// und die betr. Boxen verschieben. Dabei die Formate eindeutig
@@ -3587,11 +3587,11 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, BOOL bAfter,
// und die Umkehrung davon. rPos muss in der Tabelle stehen, die bestehen
// bleibt. Das Flag besagt ob die aktuelle mit der davor oder dahinter
// stehenden vereint wird.
-BOOL SwDoc::MergeTable( const SwPosition& rPos, BOOL bWithPrev, USHORT nMode )
+sal_Bool SwDoc::MergeTable( const SwPosition& rPos, sal_Bool bWithPrev, sal_uInt16 nMode )
{
SwTableNode* pTblNd = rPos.nNode.GetNode().FindTableNode(), *pDelTblNd;
if( !pTblNd )
- return FALSE;
+ return sal_False;
SwNodes& rNds = GetNodes();
if( bWithPrev )
@@ -3599,11 +3599,11 @@ BOOL SwDoc::MergeTable( const SwPosition& rPos, BOOL bWithPrev, USHORT nMode )
else
pDelTblNd = rNds[ pTblNd->EndOfSectionIndex() + 1 ]->GetTableNode();
if( !pDelTblNd )
- return FALSE;
+ return sal_False;
if( pTblNd->GetTable().ISA( SwDDETable ) ||
pDelTblNd->GetTable().ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
// MIB 9.7.97: HTML-Layout loeschen
pTblNd->GetTable().SetHTMLTableLayout( 0 );
@@ -3629,7 +3629,7 @@ BOOL SwDoc::MergeTable( const SwPosition& rPos, BOOL bWithPrev, USHORT nMode )
// das eigentliche Mergen
SwNodeIndex aIdx( bWithPrev ? *pTblNd : *pDelTblNd );
- BOOL bRet = rNds.MergeTable( aIdx, !bWithPrev, nMode, pHistory );
+ sal_Bool bRet = rNds.MergeTable( aIdx, !bWithPrev, nMode, pHistory );
if( pHistory )
{
@@ -3645,8 +3645,8 @@ BOOL SwDoc::MergeTable( const SwPosition& rPos, BOOL bWithPrev, USHORT nMode )
return bRet;
}
-BOOL SwNodes::MergeTable( const SwNodeIndex& rPos, BOOL bWithPrev,
- USHORT nMode, SwHistory* )
+sal_Bool SwNodes::MergeTable( const SwNodeIndex& rPos, sal_Bool bWithPrev,
+ sal_uInt16 nMode, SwHistory* )
{
SwTableNode* pDelTblNd = rPos.GetNode().GetTableNode();
ASSERT( pDelTblNd, "wo ist der TableNode geblieben?" );
@@ -3655,7 +3655,7 @@ BOOL SwNodes::MergeTable( const SwNodeIndex& rPos, BOOL bWithPrev,
ASSERT( pTblNd, "wo ist der TableNode geblieben?" );
if( !pDelTblNd || !pTblNd )
- return FALSE;
+ return sal_False;
pDelTblNd->DelFrms();
@@ -3708,12 +3708,12 @@ BOOL SwNodes::MergeTable( const SwNodeIndex& rPos, BOOL bWithPrev,
}
// die Lines und Boxen ruebermoven
- USHORT nOldSize = rTbl.GetTabLines().Count();
+ sal_uInt16 nOldSize = rTbl.GetTabLines().Count();
rTbl.GetTabLines().Insert( &rDelTbl.GetTabLines(), nOldSize );
rDelTbl.GetTabLines().Remove( 0, rDelTbl.GetTabLines().Count() );
rTbl.GetTabSortBoxes().Insert( &rDelTbl.GetTabSortBoxes() );
- rDelTbl.GetTabSortBoxes().Remove( (USHORT)0, rDelTbl.GetTabSortBoxes().Count() );
+ rDelTbl.GetTabSortBoxes().Remove( (sal_uInt16)0, rDelTbl.GetTabSortBoxes().Count() );
// die vordere Tabelle bleibt immer stehen, die hintere wird geloescht
SwEndNode* pTblEndNd = pDelTblNd->EndOfSectionNode();
@@ -3753,7 +3753,7 @@ BOOL SwNodes::MergeTable( const SwNodeIndex& rPos, BOOL bWithPrev,
//Layout updaten
aFndBox.MakeFrms( rTbl );
- return TRUE;
+ return sal_True;
}
// -------------------------------------------------------------------
@@ -3764,8 +3764,8 @@ struct _SetAFmtTabPara
{
SwTableAutoFmt& rTblFmt;
SwUndoTblAutoFmt* pUndo;
- USHORT nEndBox, nCurBox;
- BYTE nAFmtLine, nAFmtBox;
+ sal_uInt16 nEndBox, nCurBox;
+ sal_uInt8 nAFmtLine, nAFmtBox;
_SetAFmtTabPara( const SwTableAutoFmt& rNew )
: rTblFmt( (SwTableAutoFmt&)rNew ), pUndo( 0 ),
@@ -3775,16 +3775,16 @@ struct _SetAFmtTabPara
// forward deklarieren damit sich die Lines und Boxen rekursiv aufrufen
// koennen.
-BOOL lcl_SetAFmtBox( const _FndBox*&, void *pPara );
-BOOL lcl_SetAFmtLine( const _FndLine*&, void *pPara );
+sal_Bool lcl_SetAFmtBox( const _FndBox*&, void *pPara );
+sal_Bool lcl_SetAFmtLine( const _FndLine*&, void *pPara );
-BOOL lcl_SetAFmtLine( const _FndLine*& rpLine, void *pPara )
+sal_Bool lcl_SetAFmtLine( const _FndLine*& rpLine, void *pPara )
{
((_FndLine*&)rpLine)->GetBoxes().ForEach( &lcl_SetAFmtBox, pPara );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_SetAFmtBox( const _FndBox*& rpBox, void *pPara )
+sal_Bool lcl_SetAFmtBox( const _FndBox*& rpBox, void *pPara )
{
_SetAFmtTabPara* pSetPara = (_SetAFmtTabPara*)pPara;
@@ -3795,7 +3795,7 @@ BOOL lcl_SetAFmtBox( const _FndBox*& rpBox, void *pPara )
else if( pSetPara->nCurBox == pSetPara->nEndBox )
pSetPara->nAFmtBox = 3;
else
- pSetPara->nAFmtBox = (BYTE)(1 + ((pSetPara->nCurBox-1) & 1));
+ pSetPara->nAFmtBox = (sal_uInt8)(1 + ((pSetPara->nCurBox-1) & 1));
}
if( rpBox->GetBox()->GetSttNd() )
@@ -3807,16 +3807,16 @@ BOOL lcl_SetAFmtBox( const _FndBox*& rpBox, void *pPara )
SfxItemSet aCharSet( pDoc->GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1 );
// <--
SfxItemSet aBoxSet( pDoc->GetAttrPool(), aTableBoxSetRange );
- BYTE nPos = pSetPara->nAFmtLine * 4 + pSetPara->nAFmtBox;
+ sal_uInt8 nPos = pSetPara->nAFmtLine * 4 + pSetPara->nAFmtBox;
pSetPara->rTblFmt.UpdateToSet( nPos, aCharSet,
SwTableAutoFmt::UPDATE_CHAR, 0 );
pSetPara->rTblFmt.UpdateToSet( nPos, aBoxSet,
SwTableAutoFmt::UPDATE_BOX,
- pDoc->GetNumberFormatter( TRUE ) );
+ pDoc->GetNumberFormatter( sal_True ) );
if( aCharSet.Count() )
{
- ULONG nSttNd = pSetBox->GetSttIdx()+1;
- ULONG nEndNd = pSetBox->GetSttNd()->EndOfSectionIndex();
+ sal_uLong nSttNd = pSetBox->GetSttIdx()+1;
+ sal_uLong nEndNd = pSetBox->GetSttNd()->EndOfSectionIndex();
for( ; nSttNd < nEndNd; ++nSttNd )
{
SwCntntNode* pNd = pDoc->GetNodes()[ nSttNd ]->GetCntntNode();
@@ -3839,17 +3839,17 @@ BOOL lcl_SetAFmtBox( const _FndBox*& rpBox, void *pPara )
if( !rpBox->GetUpper()->GetUpper() ) // eine BaseLine
++pSetPara->nCurBox;
- return TRUE;
+ return sal_True;
}
// AutoFormat fuer die Tabelle/TabellenSelection
-BOOL SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew )
+sal_Bool SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew )
{
ASSERT( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -3858,7 +3858,7 @@ BOOL SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNe
pTblNd->GetTable().GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
pTblNd->GetTable().SetHTMLTableLayout( 0 );
@@ -3877,14 +3877,14 @@ BOOL SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNe
{
ClearRedo();
AppendUndo( pUndo = new SwUndoTblAutoFmt( *pTblNd, rNew ) );
- DoUndo( FALSE );
+ DoUndo( sal_False );
}
_SetAFmtTabPara aPara( rNew );
_FndLines& rFLns = pFndBox->GetLines();
_FndLine* pLine;
- for( USHORT n = 0; n < rFLns.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFLns.Count(); ++n )
{
pLine = rFLns[n];
@@ -3897,7 +3897,7 @@ BOOL SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNe
else if( n+1 == rFLns.Count() )
aPara.nAFmtLine = 3;
else
- aPara.nAFmtLine = (BYTE)(1 + ((n-1) & 1 ));
+ aPara.nAFmtLine = (sal_uInt8)(1 + ((n-1) & 1 ));
aPara.nAFmtBox = 0;
aPara.nCurBox = 0;
@@ -3909,22 +3909,22 @@ BOOL SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNe
}
if( pUndo )
- DoUndo( TRUE );
+ DoUndo( sal_True );
SetModified();
SetFieldsDirty( true, NULL, 0 );
- return TRUE;
+ return sal_True;
}
// Erfrage wie attributiert ist
-BOOL SwDoc::GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet )
+sal_Bool SwDoc::GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet )
{
ASSERT( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -3933,7 +3933,7 @@ BOOL SwDoc::GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet )
pTblNd->GetTable().GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
_FndBox* pFndBox = &aFndBox;
while( 1 == pFndBox->GetLines().Count() &&
@@ -3945,30 +3945,30 @@ BOOL SwDoc::GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet )
_FndLines& rFLns = pFndBox->GetLines();
- USHORT aLnArr[4];
+ sal_uInt16 aLnArr[4];
aLnArr[0] = 0;
aLnArr[1] = 1 < rFLns.Count() ? 1 : 0;
aLnArr[2] = 2 < rFLns.Count() ? 2 : aLnArr[1];
aLnArr[3] = rFLns.Count() - 1;
- for( BYTE nLine = 0; nLine < 4; ++nLine )
+ for( sal_uInt8 nLine = 0; nLine < 4; ++nLine )
{
_FndLine& rLine = *rFLns[ aLnArr[ nLine ] ];
- USHORT aBoxArr[4];
+ sal_uInt16 aBoxArr[4];
aBoxArr[0] = 0;
aBoxArr[1] = 1 < rLine.GetBoxes().Count() ? 1 : 0;
aBoxArr[2] = 2 < rLine.GetBoxes().Count() ? 2 : aBoxArr[1];
aBoxArr[3] = rLine.GetBoxes().Count() - 1;
- for( BYTE nBox = 0; nBox < 4; ++nBox )
+ for( sal_uInt8 nBox = 0; nBox < 4; ++nBox )
{
SwTableBox* pFBox = rLine.GetBoxes()[ aBoxArr[ nBox ] ]->GetBox();
// immer auf die 1. runterfallen
while( !pFBox->GetSttNd() )
pFBox = pFBox->GetTabLines()[0]->GetTabBoxes()[0];
- BYTE nPos = nLine * 4 + nBox;
+ sal_uInt8 nPos = nLine * 4 + nBox;
SwNodeIndex aIdx( *pFBox->GetSttNd(), 1 );
SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode();
if( !pCNd )
@@ -3979,11 +3979,11 @@ BOOL SwDoc::GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet )
SwTableAutoFmt::UPDATE_CHAR, 0 );
rGet.UpdateFromSet( nPos, pFBox->GetFrmFmt()->GetAttrSet(),
SwTableAutoFmt::UPDATE_BOX,
- GetNumberFormatter( TRUE ) );
+ GetNumberFormatter( sal_True ) );
}
}
- return TRUE;
+ return sal_True;
}
String SwDoc::GetUniqueTblName() const
@@ -3992,10 +3992,10 @@ String SwDoc::GetUniqueTblName() const
String aName( aId );
xub_StrLen nNmLen = aName.Len();
- USHORT nNum, nTmp, nFlagSize = ( pTblFrmFmtTbl->Count() / 8 ) +2;
- USHORT n;
+ sal_uInt16 nNum, nTmp, nFlagSize = ( pTblFrmFmtTbl->Count() / 8 ) +2;
+ sal_uInt16 n;
- BYTE* pSetFlags = new BYTE[ nFlagSize ];
+ sal_uInt8* pSetFlags = new sal_uInt8[ nFlagSize ];
memset( pSetFlags, 0, nFlagSize );
for( n = 0; n < pTblFrmFmtTbl->Count(); ++n )
@@ -4005,7 +4005,7 @@ String SwDoc::GetUniqueTblName() const
pFmt->GetName().Match( aName ) == nNmLen )
{
// Nummer bestimmen und das Flag setzen
- nNum = static_cast<USHORT>(pFmt->GetName().Copy( nNmLen ).ToInt32());
+ nNum = static_cast<sal_uInt16>(pFmt->GetName().Copy( nNmLen ).ToInt32());
if( nNum-- && nNum < pTblFrmFmtTbl->Count() )
pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 ));
}
@@ -4027,7 +4027,7 @@ String SwDoc::GetUniqueTblName() const
return aName += String::CreateFromInt32( ++nNum );
}
-SwTableFmt* SwDoc::FindTblFmtByName( const String& rName, BOOL bAll ) const
+SwTableFmt* SwDoc::FindTblFmtByName( const String& rName, sal_Bool bAll ) const
{
const SwFmt* pRet = 0;
if( bAll )
@@ -4035,7 +4035,7 @@ SwTableFmt* SwDoc::FindTblFmtByName( const String& rName, BOOL bAll ) const
else
{
// dann nur die, die im Doc gesetzt sind
- for( USHORT n = 0; n < pTblFrmFmtTbl->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pTblFrmFmtTbl->Count(); ++n )
{
const SwFrmFmt* pFmt = (*pTblFrmFmtTbl)[ n ];
if( !pFmt->IsDefault() && IsUsed( *pFmt ) &&
@@ -4049,20 +4049,20 @@ SwTableFmt* SwDoc::FindTblFmtByName( const String& rName, BOOL bAll ) const
return (SwTableFmt*)pRet;
}
-BOOL SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, USHORT eType,
+sal_Bool SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff )
{
SwTableNode* pTblNd = (SwTableNode*)rAktBox.GetSttNd()->FindTableNode();
SwUndo* pUndo = 0;
if( nsTblChgWidthHeightType::WH_FLAG_INSDEL & eType && pTblNd->GetTable().ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
SwTableFmlUpdate aMsgHnt( &pTblNd->GetTable() );
aMsgHnt.eFlags = TBL_BOXPTR;
UpdateTblFlds( &aMsgHnt );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch( eType & 0xff )
{
case nsTblChgWidthHeightType::WH_COL_LEFT:
@@ -4089,7 +4089,7 @@ BOOL SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, USHORT eType,
{
ClearRedo();
AppendUndo( pUndo );
- DoUndo( TRUE ); // im SetColWidth kann es abgeschaltet werden!
+ DoUndo( sal_True ); // im SetColWidth kann es abgeschaltet werden!
}
if( bRet )
@@ -4102,25 +4102,25 @@ BOOL SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, USHORT eType,
}
-void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, BOOL bCallUpdate )
+void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, sal_Bool bCallUpdate )
{
//JP 09.07.97: Optimierung: wenn die Box schon sagt, das es Text
// sein soll, dann bleibt das auch Text!
const SfxPoolItem* pNumFmtItem = 0;
if( SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT,
- FALSE, &pNumFmtItem ) && GetNumberFormatter()->IsTextFormat(
+ sal_False, &pNumFmtItem ) && GetNumberFormatter()->IsTextFormat(
((SwTblBoxNumFormat*)pNumFmtItem)->GetValue() ))
return ;
SwUndoTblNumFmt* pUndo = 0;
- BOOL bIsEmptyTxtNd, bChgd = TRUE;
+ sal_Bool bIsEmptyTxtNd, bChgd = sal_True;
sal_uInt32 nFmtIdx;
double fNumber;
if( rBox.HasNumCntnt( fNumber, nFmtIdx, bIsEmptyTxtNd ) )
{
if( !rBox.IsNumberChanged() )
- bChgd = FALSE;
+ bChgd = sal_False;
else
{
if( DoesUndo() )
@@ -4133,16 +4133,16 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, BOOL bCallUpdate )
SwTableBoxFmt* pBoxFmt = (SwTableBoxFmt*)rBox.GetFrmFmt();
SfxItemSet aBoxSet( GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_VALUE );
- BOOL bSetNumFmt = IsInsTblFormatNum(), bLockModify = TRUE;
+ sal_Bool bSetNumFmt = IsInsTblFormatNum(), bLockModify = sal_True;
if( bSetNumFmt )
{
if( !IsInsTblChangeNumFormat() )
{
if( !pNumFmtItem )
- bSetNumFmt = FALSE;
+ bSetNumFmt = sal_False;
else
{
- ULONG nOldNumFmt = ((SwTblBoxNumFormat*)pNumFmtItem)->
+ sal_uLong nOldNumFmt = ((SwTblBoxNumFormat*)pNumFmtItem)->
GetValue();
SvNumberFormatter* pNumFmtr = GetNumberFormatter();
@@ -4155,7 +4155,7 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, BOOL bCallUpdate )
else
// eingstelltes und vorgegebenes NumFormat
// stimmen nicht ueberein -> als Text einfuegen
- bLockModify = bSetNumFmt = FALSE;
+ bLockModify = bSetNumFmt = sal_False;
}
}
@@ -4194,9 +4194,9 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, BOOL bCallUpdate )
const SfxPoolItem* pValueItem = 0, *pFmtItem = 0;
SwTableBoxFmt* pBoxFmt = (SwTableBoxFmt*)rBox.GetFrmFmt();
if( SFX_ITEM_SET == pBoxFmt->GetItemState( RES_BOXATR_FORMAT,
- FALSE, &pFmtItem ) ||
+ sal_False, &pFmtItem ) ||
SFX_ITEM_SET == pBoxFmt->GetItemState( RES_BOXATR_VALUE,
- FALSE, &pValueItem ))
+ sal_False, &pValueItem ))
{
if( DoesUndo() )
{
@@ -4207,7 +4207,7 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, BOOL bCallUpdate )
pBoxFmt = (SwTableBoxFmt*)rBox.ClaimFrmFmt();
// alle Zahlenformate entfernen
- USHORT nWhich1 = RES_BOXATR_FORMULA;
+ sal_uInt16 nWhich1 = RES_BOXATR_FORMULA;
if( !bIsEmptyTxtNd )
//JP 15.01.99: dieser Teil wurde doch schon oben abgeprueft!
/* && pFmtItem && !GetNumberFormatter()->
@@ -4223,7 +4223,7 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, BOOL bCallUpdate )
pBoxFmt->ResetFmtAttr( nWhich1, RES_BOXATR_VALUE );
}
else
- bChgd = FALSE;
+ bChgd = sal_False;
}
if( bChgd )
@@ -4287,9 +4287,9 @@ void SwDoc::ClearBoxNumAttrs( const SwNodeIndex& rNode )
const SfxPoolItem* pFmtItem = 0;
const SfxItemSet& rSet = pBox->GetFrmFmt()->GetAttrSet();
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, FALSE, &pFmtItem ) ||
- SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMULA, FALSE ) ||
- SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_VALUE, FALSE ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, sal_False, &pFmtItem ) ||
+ SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMULA, sal_False ) ||
+ SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_VALUE, sal_False ))
{
if( DoesUndo() )
{
@@ -4300,7 +4300,7 @@ void SwDoc::ClearBoxNumAttrs( const SwNodeIndex& rNode )
SwFrmFmt* pBoxFmt = pBox->ClaimFrmFmt();
//JP 01.09.97: TextFormate bleiben erhalten!
- USHORT nWhich1 = RES_BOXATR_FORMAT;
+ sal_uInt16 nWhich1 = RES_BOXATR_FORMAT;
if( pFmtItem && GetNumberFormatter()->IsTextFormat(
((SwTblBoxNumFormat*)pFmtItem)->GetValue() ))
nWhich1 = RES_BOXATR_FORMULA;
@@ -4322,10 +4322,10 @@ void SwDoc::ClearBoxNumAttrs( const SwNodeIndex& rNode )
// in eine bestehende TblSelektion gefuellt wird.
// Gerufen wird es von: edglss.cxx/fecopy.cxx
-BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
- const SwTable* pCpyTbl, BOOL bCpyName, BOOL bCorrPos )
+sal_Bool SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
+ const SwTable* pCpyTbl, sal_Bool bCpyName, sal_Bool bCorrPos )
{
- BOOL bRet;
+ sal_Bool bRet;
const SwTableNode* pSrcTblNd = pCpyTbl
? pCpyTbl->GetTableNode()
@@ -4340,11 +4340,11 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
{
ClearRedo();
pUndo = new SwUndoCpyTbl;
- DoUndo( FALSE );
+ DoUndo( sal_False );
}
bRet = pSrcTblNd->GetTable().MakeCopy( this, rInsPos, rBoxes,
- TRUE, bCpyName );
+ sal_True, bCpyName );
if( pUndo )
{
if( !bRet )
@@ -4356,7 +4356,7 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
pUndo->SetTableSttIdx( pInsTblNd->GetIndex() );
AppendUndo( pUndo );
}
- DoUndo( TRUE );
+ DoUndo( sal_True );
}
}
else
@@ -4372,12 +4372,12 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
{
ClearRedo();
pUndo = new SwUndoTblCpyTbl;
- DoUndo( FALSE );
+ DoUndo( sal_False );
}
SwDoc* pCpyDoc = (SwDoc*)pSrcTblNd->GetDoc();
SfxObjectShellRef* pRefForDocSh = 0;
- BOOL bDelCpyDoc = pCpyDoc == this;
+ sal_Bool bDelCpyDoc = pCpyDoc == this;
if( bDelCpyDoc )
{
@@ -4388,7 +4388,7 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
pCpyDoc->SetRefForDocShell( pRefForDocSh );
SwPosition aPos( SwNodeIndex( pCpyDoc->GetNodes().GetEndOfContent() ));
- if( !pSrcTblNd->GetTable().MakeCopy( pCpyDoc, aPos, rBoxes, TRUE, TRUE ))
+ if( !pSrcTblNd->GetTable().MakeCopy( pCpyDoc, aPos, rBoxes, sal_True, sal_True ))
{
delete pRefForDocSh;
if( pCpyDoc->release() == 0 )
@@ -4396,10 +4396,10 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
if( pUndo )
{
- DoUndo( TRUE );
+ DoUndo( sal_True );
delete pUndo;
}
- return FALSE;
+ return sal_False;
}
aPos.nNode -= 1; // auf den EndNode der Tabelle
pSrcTblNd = aPos.nNode.GetNode().FindTableNode();
@@ -4456,7 +4456,7 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
delete pUndo;
else
AppendUndo( pUndo );
- DoUndo( TRUE );
+ DoUndo( sal_True );
}
if( bCorrPos )
@@ -4477,20 +4477,20 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
-BOOL SwDoc::_UnProtectTblCells( SwTable& rTbl )
+sal_Bool SwDoc::_UnProtectTblCells( SwTable& rTbl )
{
- BOOL bChgd = FALSE;
+ sal_Bool bChgd = sal_False;
SwUndoAttrTbl* pUndo = DoesUndo() ? new SwUndoAttrTbl( *rTbl.GetTableNode() )
: 0;
SwTableSortBoxes& rSrtBox = rTbl.GetTabSortBoxes();
- for( USHORT i = rSrtBox.Count(); i; )
+ for( sal_uInt16 i = rSrtBox.Count(); i; )
{
SwFrmFmt *pBoxFmt = rSrtBox[ --i ]->GetFrmFmt();
if( pBoxFmt->GetProtect().IsCntntProtected() )
{
pBoxFmt->ResetFmtAttr( RES_PROTECT );
- bChgd = TRUE;
+ bChgd = sal_True;
}
}
@@ -4508,9 +4508,9 @@ BOOL SwDoc::_UnProtectTblCells( SwTable& rTbl )
}
-BOOL SwDoc::UnProtectCells( const String& rName )
+sal_Bool SwDoc::UnProtectCells( const String& rName )
{
- BOOL bChgd = FALSE;
+ sal_Bool bChgd = sal_False;
SwTableFmt* pFmt = FindTblFmtByName( rName );
if( pFmt )
{
@@ -4522,9 +4522,9 @@ BOOL SwDoc::UnProtectCells( const String& rName )
return bChgd;
}
-BOOL SwDoc::UnProtectCells( const SwSelBoxes& rBoxes )
+sal_Bool SwDoc::UnProtectCells( const SwSelBoxes& rBoxes )
{
- BOOL bChgd = FALSE;
+ sal_Bool bChgd = sal_False;
if( rBoxes.Count() )
{
SwUndoAttrTbl* pUndo = DoesUndo()
@@ -4532,13 +4532,13 @@ BOOL SwDoc::UnProtectCells( const SwSelBoxes& rBoxes )
: 0;
SvPtrarr aFmts( 16 ), aNewFmts( 16 );
- for( USHORT i = rBoxes.Count(); i; )
+ for( sal_uInt16 i = rBoxes.Count(); i; )
{
SwTableBox* pBox = rBoxes[ --i ];
SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
if( pBoxFmt->GetProtect().IsCntntProtected() )
{
- USHORT nFnd = aFmts.GetPos( pBoxFmt );
+ sal_uInt16 nFnd = aFmts.GetPos( pBoxFmt );
if( USHRT_MAX != nFnd )
pBox->ChgFrmFmt( (SwTableBoxFmt*)aNewFmts[ nFnd ] );
else
@@ -4548,7 +4548,7 @@ BOOL SwDoc::UnProtectCells( const SwSelBoxes& rBoxes )
pBoxFmt->ResetFmtAttr( RES_PROTECT );
aNewFmts.Insert( pBoxFmt, aNewFmts.Count() );
}
- bChgd = TRUE;
+ bChgd = sal_True;
}
}
@@ -4566,26 +4566,26 @@ BOOL SwDoc::UnProtectCells( const SwSelBoxes& rBoxes )
return bChgd;
}
-BOOL SwDoc::UnProtectTbls( const SwPaM& rPam )
+sal_Bool SwDoc::UnProtectTbls( const SwPaM& rPam )
{
StartUndo(UNDO_EMPTY, NULL);
- BOOL bChgd = FALSE, bHasSel = rPam.HasMark() ||
+ sal_Bool bChgd = sal_False, bHasSel = rPam.HasMark() ||
rPam.GetNext() != (SwPaM*)&rPam;
SwFrmFmts& rFmts = *GetTblFrmFmts();
SwTable* pTbl;
const SwTableNode* pTblNd;
- for( USHORT n = rFmts.Count(); n ; )
+ for( sal_uInt16 n = rFmts.Count(); n ; )
if( 0 != (pTbl = SwTable::FindTable( rFmts[ --n ] )) &&
0 != (pTblNd = pTbl->GetTableNode() ) &&
pTblNd->GetNodes().IsDocNodes() )
{
- ULONG nTblIdx = pTblNd->GetIndex();
+ sal_uLong nTblIdx = pTblNd->GetIndex();
// dann ueberpruefe ob Tabelle in der Selection liegt
if( bHasSel )
{
- int bFound = FALSE;
+ int bFound = sal_False;
SwPaM* pTmp = (SwPaM*)&rPam;
do {
const SwPosition *pStt = pTmp->Start(),
@@ -4609,11 +4609,11 @@ BOOL SwDoc::UnProtectTbls( const SwPaM& rPam )
return bChgd;
}
-BOOL SwDoc::HasTblAnyProtection( const SwPosition* pPos,
+sal_Bool SwDoc::HasTblAnyProtection( const SwPosition* pPos,
const String* pTblName,
- BOOL* pFullTblProtection )
+ sal_Bool* pFullTblProtection )
{
- BOOL bHasProtection = FALSE;
+ sal_Bool bHasProtection = sal_False;
SwTable* pTbl = 0;
if( pTblName )
pTbl = SwTable::FindTable( FindTblFmtByName( *pTblName ) );
@@ -4627,22 +4627,22 @@ BOOL SwDoc::HasTblAnyProtection( const SwPosition* pPos,
if( pTbl )
{
SwTableSortBoxes& rSrtBox = pTbl->GetTabSortBoxes();
- for( USHORT i = rSrtBox.Count(); i; )
+ for( sal_uInt16 i = rSrtBox.Count(); i; )
{
SwFrmFmt *pBoxFmt = rSrtBox[ --i ]->GetFrmFmt();
if( pBoxFmt->GetProtect().IsCntntProtected() )
{
if( !bHasProtection )
{
- bHasProtection = TRUE;
+ bHasProtection = sal_True;
if( !pFullTblProtection )
break;
- *pFullTblProtection = TRUE;
+ *pFullTblProtection = sal_True;
}
}
else if( bHasProtection && pFullTblProtection )
{
- *pFullTblProtection = FALSE;
+ *pFullTblProtection = sal_False;
break;
}
}
@@ -4652,14 +4652,14 @@ BOOL SwDoc::HasTblAnyProtection( const SwPosition* pPos,
#ifdef DEL_TABLE_REDLINES
lcl_DelRedlines::lcl_DelRedlines( const SwTableNode& rNd,
- BOOL bCheckForOwnRedline )
+ sal_Bool bCheckForOwnRedline )
: pDoc( (SwDoc*)rNd.GetNodes().GetDoc() )
{
pDoc->StartUndo(UNDO_EMPTY, NULL);
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
if( !pDoc->IsIgnoreRedline() && rTbl.Count() )
{
- BOOL bDelete = TRUE;
+ sal_Bool bDelete = sal_True;
if( bCheckForOwnRedline )
{
sal_uInt16 nRedlPos = pDoc->GetRedlinePos( rNd, USHRT_MAX );
@@ -4678,7 +4678,7 @@ lcl_DelRedlines::lcl_DelRedlines( const SwTableNode& rNd,
if( pEnd->nNode >= nEndNd &&
pRedline->GetAuthor() == pDoc->GetRedlineAuthor() )
{
- bDelete = FALSE;
+ bDelete = sal_False;
break;
}
}
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index c561f10d0a3f..5c5bd1c77bf6 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -69,30 +69,30 @@ extern void ClearFEShellTabCols();
//siehe auch swtable.cxx
#define COLFUZZY 20L
-inline BOOL IsSame( long nA, long nB ) { return Abs(nA-nB) <= COLFUZZY; }
+inline sal_Bool IsSame( long nA, long nB ) { return Abs(nA-nB) <= COLFUZZY; }
class SwTblFmtCmp
{
public:
SwFrmFmt *pOld,
*pNew;
- INT16 nType;
+ sal_Int16 nType;
- SwTblFmtCmp( SwFrmFmt *pOld, SwFrmFmt *pNew, INT16 nType );
+ SwTblFmtCmp( SwFrmFmt *pOld, SwFrmFmt *pNew, sal_Int16 nType );
- static SwFrmFmt *FindNewFmt( SvPtrarr &rArr, SwFrmFmt*pOld, INT16 nType );
+ static SwFrmFmt *FindNewFmt( SvPtrarr &rArr, SwFrmFmt*pOld, sal_Int16 nType );
static void Delete( SvPtrarr &rArr );
};
-SwTblFmtCmp::SwTblFmtCmp( SwFrmFmt *pO, SwFrmFmt *pN, INT16 nT )
+SwTblFmtCmp::SwTblFmtCmp( SwFrmFmt *pO, SwFrmFmt *pN, sal_Int16 nT )
: pOld ( pO ), pNew ( pN ), nType( nT )
{
}
-SwFrmFmt *SwTblFmtCmp::FindNewFmt( SvPtrarr &rArr, SwFrmFmt *pOld, INT16 nType )
+SwFrmFmt *SwTblFmtCmp::FindNewFmt( SvPtrarr &rArr, SwFrmFmt *pOld, sal_Int16 nType )
{
- for ( USHORT i = 0; i < rArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rArr.Count(); ++i )
{
SwTblFmtCmp *pCmp = (SwTblFmtCmp*)rArr[i];
if ( pCmp->pOld == pOld && pCmp->nType == nType )
@@ -103,14 +103,14 @@ SwFrmFmt *SwTblFmtCmp::FindNewFmt( SvPtrarr &rArr, SwFrmFmt *pOld, INT16 nType )
void SwTblFmtCmp::Delete( SvPtrarr &rArr )
{
- for ( USHORT i = 0; i < rArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rArr.Count(); ++i )
delete (SwTblFmtCmp*)rArr[i];
}
void lcl_GetStartEndCell( const SwCursor& rCrsr,
SwLayoutFrm *&prStart, SwLayoutFrm *&prEnd )
{
- ASSERT( rCrsr.GetCntntNode() && rCrsr.GetCntntNode( FALSE ),
+ ASSERT( rCrsr.GetCntntNode() && rCrsr.GetCntntNode( sal_False ),
"Tabselection nicht auf Cnt." );
Point aPtPos, aMkPos;
@@ -123,7 +123,7 @@ void lcl_GetStartEndCell( const SwCursor& rCrsr,
// robust:
SwCntntNode* pPointNd = rCrsr.GetCntntNode();
- SwCntntNode* pMarkNd = rCrsr.GetCntntNode(FALSE);
+ SwCntntNode* pMarkNd = rCrsr.GetCntntNode(sal_False);
SwFrm* pPointFrm = pPointNd ? pPointNd->GetFrm( &aPtPos ) : 0;
SwFrm* pMarkFrm = pMarkNd ? pMarkNd->GetFrm( &aMkPos ) : 0;
@@ -132,8 +132,8 @@ void lcl_GetStartEndCell( const SwCursor& rCrsr,
prEnd = pMarkFrm ? pMarkFrm->GetUpper() : 0;
}
-BOOL lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes,
- BOOL bAllCrsr = FALSE )
+sal_Bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes,
+ sal_Bool bAllCrsr = sal_False )
{
const SwTableCursor* pTblCrsr =
dynamic_cast<const SwTableCursor*>(&rCursor);
@@ -179,17 +179,17 @@ inline void InsertLine( SvPtrarr& rLineArr, SwTableLine* pLine )
//-----------------------------------------------------------------------------
-BOOL lcl_IsAnLower( const SwTableLine *pLine, const SwTableLine *pAssumed )
+sal_Bool lcl_IsAnLower( const SwTableLine *pLine, const SwTableLine *pAssumed )
{
const SwTableLine *pTmp = pAssumed->GetUpper() ?
pAssumed->GetUpper()->GetUpper() : 0;
while ( pTmp )
{
if ( pTmp == pLine )
- return TRUE;
+ return sal_True;
pTmp = pTmp->GetUpper() ? pTmp->GetUpper()->GetUpper() : 0;
}
- return FALSE;
+ return sal_False;
}
//-----------------------------------------------------------------------------
@@ -197,20 +197,20 @@ struct LinesAndTable
{
SvPtrarr &rLines;
const SwTable &rTable;
- BOOL bInsertLines;
+ sal_Bool bInsertLines;
LinesAndTable( SvPtrarr &rL, const SwTable &rTbl ) :
- rLines( rL ), rTable( rTbl ), bInsertLines( TRUE ) {}
+ rLines( rL ), rTable( rTbl ), bInsertLines( sal_True ) {}
};
-BOOL _FindLine( const _FndLine*& rpLine, void* pPara );
+sal_Bool _FindLine( const _FndLine*& rpLine, void* pPara );
-BOOL _FindBox( const _FndBox*& rpBox, void* pPara )
+sal_Bool _FindBox( const _FndBox*& rpBox, void* pPara )
{
if ( rpBox->GetLines().Count() )
{
- ((LinesAndTable*)pPara)->bInsertLines = TRUE;
+ ((LinesAndTable*)pPara)->bInsertLines = sal_True;
((_FndBox*)rpBox)->GetLines().ForEach( _FindLine, pPara );
if ( ((LinesAndTable*)pPara)->bInsertLines )
{
@@ -219,24 +219,24 @@ BOOL _FindBox( const _FndBox*& rpBox, void* pPara )
: ((LinesAndTable*)pPara)->rTable.GetTabLines();
if ( rpBox->GetLines().Count() == rLines.Count() )
{
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
::InsertLine( ((LinesAndTable*)pPara)->rLines,
(SwTableLine*)rLines[i] );
}
else
- ((LinesAndTable*)pPara)->bInsertLines = FALSE;
+ ((LinesAndTable*)pPara)->bInsertLines = sal_False;
}
}
else if ( rpBox->GetBox() )
::InsertLine( ((LinesAndTable*)pPara)->rLines,
(SwTableLine*)rpBox->GetBox()->GetUpper() );
- return TRUE;
+ return sal_True;
}
-BOOL _FindLine( const _FndLine*& rpLine, void* pPara )
+sal_Bool _FindLine( const _FndLine*& rpLine, void* pPara )
{
((_FndLine*)rpLine)->GetBoxes().ForEach( _FindBox, pPara );
- return TRUE;
+ return sal_True;
}
void lcl_CollectLines( SvPtrarr &rArr, const SwCursor& rCursor, bool bRemoveLines )
@@ -263,10 +263,10 @@ void lcl_CollectLines( SvPtrarr &rArr, const SwCursor& rCursor, bool bRemoveLine
// (Not for row split)
if ( bRemoveLines )
{
- for ( USHORT i = 0; i < rArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rArr.Count(); ++i )
{
SwTableLine *pUpLine = (SwTableLine*)rArr[i];
- for ( USHORT k = 0; k < rArr.Count(); ++k )
+ for ( sal_uInt16 k = 0; k < rArr.Count(); ++k )
{
if ( k != i && ::lcl_IsAnLower( pUpLine, (SwTableLine*)rArr[k] ) )
{
@@ -304,7 +304,7 @@ void lcl_ProcessRowSize( SvPtrarr &rFmtCmp, SwTableLine *pLine, const SwFmtFrmSi
{
lcl_ProcessRowAttr( rFmtCmp, pLine, rNew );
SwTableBoxes &rBoxes = pLine->GetTabBoxes();
- for ( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
::lcl_ProcessBoxSize( rFmtCmp, rBoxes[i], rNew );
}
@@ -317,7 +317,7 @@ void lcl_ProcessBoxSize( SvPtrarr &rFmtCmp, SwTableBox *pBox, const SwFmtFrmSize
{
SwFmtFrmSize aSz( rNew );
aSz.SetHeight( rNew.GetHeight() ? rNew.GetHeight() / rLines.Count() : 0 );
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
::lcl_ProcessRowSize( rFmtCmp, rLines[i], aSz );
}
}
@@ -343,9 +343,9 @@ void SwDoc::SetRowSplit( const SwCursor& rCursor, const SwFmtRowSplit &rNew )
AppendUndo( new SwUndoAttrTbl( *pTblNd ));
}
- SvPtrarr aFmtCmp( Max( BYTE(255), BYTE(aRowArr.Count()) ), 255 );
+ SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ), 255 );
- for( USHORT i = 0; i < aRowArr.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aRowArr.Count(); ++i )
::lcl_ProcessRowAttr( aFmtCmp, (SwTableLine*)aRowArr[i], rNew );
SwTblFmtCmp::Delete( aFmtCmp );
@@ -373,7 +373,7 @@ void SwDoc::GetRowSplit( const SwCursor& rCursor, SwFmtRowSplit *& rpSz ) const
rpSz = &(SwFmtRowSplit&)((SwTableLine*)aRowArr[0])->
GetFrmFmt()->GetRowSplit();
- for ( USHORT i = 1; i < aRowArr.Count() && rpSz; ++i )
+ for ( sal_uInt16 i = 1; i < aRowArr.Count() && rpSz; ++i )
{
if ( (*rpSz).GetValue() != ((SwTableLine*)aRowArr[i])->GetFrmFmt()->GetRowSplit().GetValue() )
rpSz = 0;
@@ -404,8 +404,8 @@ void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFmtFrmSize &rNew )
AppendUndo( new SwUndoAttrTbl( *pTblNd ));
}
- SvPtrarr aFmtCmp( Max( BYTE(255), BYTE(aRowArr.Count()) ), 255 );
- for ( USHORT i = 0; i < aRowArr.Count(); ++i )
+ SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ), 255 );
+ for ( sal_uInt16 i = 0; i < aRowArr.Count(); ++i )
::lcl_ProcessRowSize( aFmtCmp, (SwTableLine*)aRowArr[i], rNew );
SwTblFmtCmp::Delete( aFmtCmp );
@@ -433,7 +433,7 @@ void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ) const
rpSz = &(SwFmtFrmSize&)((SwTableLine*)aRowArr[0])->
GetFrmFmt()->GetFrmSize();
- for ( USHORT i = 1; i < aRowArr.Count() && rpSz; ++i )
+ for ( sal_uInt16 i = 1; i < aRowArr.Count() && rpSz; ++i )
{
if ( *rpSz != ((SwTableLine*)aRowArr[i])->GetFrmFmt()->GetFrmSize() )
rpSz = 0;
@@ -444,9 +444,9 @@ void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ) const
}
}
-BOOL SwDoc::BalanceRowHeight( const SwCursor& rCursor, BOOL bTstOnly )
+sal_Bool SwDoc::BalanceRowHeight( const SwCursor& rCursor, sal_Bool bTstOnly )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
if( pTblNd )
{
@@ -458,7 +458,7 @@ BOOL SwDoc::BalanceRowHeight( const SwCursor& rCursor, BOOL bTstOnly )
if( !bTstOnly )
{
long nHeight = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < aRowArr.Count(); ++i )
{
@@ -478,14 +478,14 @@ BOOL SwDoc::BalanceRowHeight( const SwCursor& rCursor, BOOL bTstOnly )
AppendUndo( new SwUndoAttrTbl( *pTblNd ));
}
- SvPtrarr aFmtCmp( Max( BYTE(255), BYTE(aRowArr.Count()) ), 255 );
+ SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ), 255 );
for( i = 0; i < aRowArr.Count(); ++i )
::lcl_ProcessRowSize( aFmtCmp, (SwTableLine*)aRowArr[i], aNew );
SwTblFmtCmp::Delete( aFmtCmp );
SetModified();
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -510,9 +510,9 @@ void SwDoc::SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew
AppendUndo( new SwUndoAttrTbl( *pTblNd ));
}
- SvPtrarr aFmtCmp( Max( BYTE(255), BYTE(aRowArr.Count()) ), 255 );
+ SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ), 255 );
- for( USHORT i = 0; i < aRowArr.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aRowArr.Count(); ++i )
::lcl_ProcessRowAttr( aFmtCmp, (SwTableLine*)aRowArr[i], rNew );
SwTblFmtCmp::Delete( aFmtCmp );
@@ -524,9 +524,9 @@ void SwDoc::SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew
/******************************************************************************
* SwTwips SwDoc::GetRowBackground() const
******************************************************************************/
-BOOL SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) const
+sal_Bool SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
if( pTblNd )
{
@@ -537,11 +537,11 @@ BOOL SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) c
{
rToFill = ((SwTableLine*)aRowArr[0])->GetFrmFmt()->GetBackground();
- bRet = TRUE;
- for ( USHORT i = 1; i < aRowArr.Count(); ++i )
+ bRet = sal_True;
+ for ( sal_uInt16 i = 1; i < aRowArr.Count(); ++i )
if ( rToFill != ((SwTableLine*)aRowArr[i])->GetFrmFmt()->GetBackground() )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -616,13 +616,13 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
const SvxBorderLine* pBottom = 0;
const SvxBorderLine* pHori = 0;
const SvxBorderLine* pVert = 0;
- BOOL bHoriValid = TRUE, bVertValid = TRUE,
- bTopValid = TRUE, bBottomValid = TRUE,
- bLeftValid = TRUE, bRightValid = TRUE;
+ sal_Bool bHoriValid = sal_True, bVertValid = sal_True,
+ bTopValid = sal_True, bBottomValid = sal_True,
+ bLeftValid = sal_True, bRightValid = sal_True;
// JP 21.07.95: die Flags im BoxInfo-Item entscheiden, wann eine
// BorderLine gueltig ist!!
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, FALSE,
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, sal_False,
(const SfxPoolItem**)&pSetBoxInfo) )
{
pHori = pSetBoxInfo->GetHori();
@@ -638,7 +638,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
bRightValid = pSetBoxInfo->IsValid(VALID_RIGHT);
}
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOX, FALSE,
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_BOX, sal_False,
(const SfxPoolItem**)&pSetBox) )
{
pLeft = pSetBox->GetLeft();
@@ -649,17 +649,17 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
else
{
// nicht gesetzt, also keine gueltigen Werte
- bTopValid = bBottomValid = bLeftValid = bRightValid = FALSE;
+ bTopValid = bBottomValid = bLeftValid = bRightValid = sal_False;
pSetBox = 0;
}
- BOOL bFirst = TRUE;
- for ( USHORT i = 0; i < aUnions.Count(); ++i )
+ sal_Bool bFirst = sal_True;
+ for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
{
SwSelUnion *pUnion = aUnions[i];
SwTabFrm *pTab = pUnion->GetTable();
const SwRect &rUnion = pUnion->GetUnion();
- const BOOL bLast = i == aUnions.Count() - 1 ? TRUE : FALSE;
+ const sal_Bool bLast = i == aUnions.Count() - 1 ? sal_True : sal_False;
SvPtrarr aCellArr( 255, 255 );
::lcl_CollectCells( aCellArr, pUnion->GetUnion(), pTab );
@@ -672,7 +672,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
//handelt doch keine Aussenkanten sein.
//Aussenkanten werden links, rechts, oben und unten gesetzt.
//Innenkanten werden nur oben und links gesetzt.
- for ( USHORT j = 0; j < aCellArr.Count(); ++j )
+ for ( sal_uInt16 j = 0; j < aCellArr.Count(); ++j )
{
SwCellFrm *pCell = (SwCellFrm*)aCellArr[j];
const sal_Bool bVert = pTab->IsVertical();
@@ -710,7 +710,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
SvxBoxItem aBox( pCell->GetFmt()->GetBox() );
- INT16 nType = 0;
+ sal_Int16 nType = 0;
//Obere Kante
if( bTopValid )
@@ -774,10 +774,10 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
if( pSetBox )
{
- static USHORT __READONLY_DATA aBorders[] = {
+ static sal_uInt16 __READONLY_DATA aBorders[] = {
BOX_LINE_BOTTOM, BOX_LINE_TOP,
BOX_LINE_RIGHT, BOX_LINE_LEFT };
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
for( int k = 0; k < 4; ++k, ++pBrd )
aBox.SetDistance( pSetBox->GetDistance( *pBrd ), *pBrd );
}
@@ -795,7 +795,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
}
}
- bFirst = FALSE;
+ bFirst = sal_False;
}
SwHTMLTableLayout *pTableLayout = rTable.GetHTMLTableLayout();
@@ -805,7 +805,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
SwTabFrm* pTabFrm = pFrm->ImplFindTabFrm();
pTableLayout->BordersChanged(
- pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), TRUE );
+ pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), sal_True );
}
SwTblFmtCmp::Delete( aFmtCmp );
::ClearFEShellTabCols();
@@ -832,7 +832,7 @@ void lcl_SetLineStyle( SvxBorderLine *pToSet,
}
void SwDoc::SetTabLineStyle( const SwCursor& rCursor,
- const Color* pColor, BOOL bSetLine,
+ const Color* pColor, sal_Bool bSetLine,
const SvxBorderLine* pBorderLine )
{
SwCntntNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetCntntNode();
@@ -855,14 +855,14 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor,
AppendUndo( new SwUndoAttrTbl( *pTblNd ));
}
- for( USHORT i = 0; i < aUnions.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
{
SwSelUnion *pUnion = aUnions[i];
SwTabFrm *pTab = pUnion->GetTable();
SvPtrarr aCellArr( 255, 255 );
::lcl_CollectCells( aCellArr, pUnion->GetUnion(), pTab );
- for ( USHORT j = 0; j < aCellArr.Count(); ++j )
+ for ( sal_uInt16 j = 0; j < aCellArr.Count(); ++j )
{
SwCellFrm *pCell = ( SwCellFrm* )aCellArr[j];
@@ -902,7 +902,7 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor,
SwTabFrm* pTabFrm = pFrm->ImplFindTabFrm();
pTableLayout->BordersChanged(
- pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), TRUE );
+ pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), sal_True );
}
::ClearFEShellTabCols();
SetModified();
@@ -927,28 +927,28 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
SvxBoxItem aSetBox ((const SvxBoxItem &) rSet.Get(RES_BOX ));
SvxBoxInfoItem aSetBoxInfo((const SvxBoxInfoItem&) rSet.Get(SID_ATTR_BORDER_INNER));
- BOOL bTopSet = FALSE,
- bBottomSet = FALSE,
- bLeftSet = FALSE,
- bRightSet = FALSE,
- bHoriSet = FALSE,
- bVertSet = FALSE,
- bDistanceSet = FALSE;
+ sal_Bool bTopSet = sal_False,
+ bBottomSet = sal_False,
+ bLeftSet = sal_False,
+ bRightSet = sal_False,
+ bHoriSet = sal_False,
+ bVertSet = sal_False,
+ bDistanceSet = sal_False;
aSetBoxInfo.ResetFlags();
- for ( USHORT i = 0; i < aUnions.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
{
SwSelUnion *pUnion = aUnions[i];
const SwTabFrm *pTab = pUnion->GetTable();
const SwRect &rUnion = pUnion->GetUnion();
- const BOOL bFirst = i == 0 ? TRUE : FALSE;
- const BOOL bLast = i == aUnions.Count() - 1 ? TRUE : FALSE;
+ const sal_Bool bFirst = i == 0 ? sal_True : sal_False;
+ const sal_Bool bLast = i == aUnions.Count() - 1 ? sal_True : sal_False;
SvPtrarr aCellArr( 255, 255 );
::lcl_CollectCells( aCellArr, rUnion, (SwTabFrm*)pTab );
- for ( USHORT j = 0; j < aCellArr.Count(); ++j )
+ for ( sal_uInt16 j = 0; j < aCellArr.Count(); ++j )
{
const SwCellFrm *pCell = (const SwCellFrm*)aCellArr[j];
const sal_Bool bVert = pTab->IsVertical();
@@ -985,14 +985,14 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
if (aSetBoxInfo.IsValid(VALID_TOP))
{
if ( !bTopSet )
- { bTopSet = TRUE;
+ { bTopSet = sal_True;
aSetBox.SetLine( rBox.GetTop(), BOX_LINE_TOP );
}
else if ((aSetBox.GetTop() && rBox.GetTop() &&
!(*aSetBox.GetTop() == *rBox.GetTop())) ||
- ((!aSetBox.GetTop()) ^ (!rBox.GetTop()))) // XOR-Ausdruck ist TRUE, wenn genau einer der beiden Pointer 0 ist
+ ((!aSetBox.GetTop()) ^ (!rBox.GetTop()))) // XOR-Ausdruck ist sal_True, wenn genau einer der beiden Pointer 0 ist
{
- aSetBoxInfo.SetValid(VALID_TOP, FALSE );
+ aSetBoxInfo.SetValid(VALID_TOP, sal_False );
aSetBox.SetLine( 0, BOX_LINE_TOP );
}
}
@@ -1004,14 +1004,14 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
if (aSetBoxInfo.IsValid(VALID_LEFT))
{
if ( !bLeftSet )
- { bLeftSet = TRUE;
+ { bLeftSet = sal_True;
aSetBox.SetLine( rBox.GetLeft(), BOX_LINE_LEFT );
}
else if ((aSetBox.GetLeft() && rBox.GetLeft() &&
!(*aSetBox.GetLeft() == *rBox.GetLeft())) ||
((!aSetBox.GetLeft()) ^ (!rBox.GetLeft())))
{
- aSetBoxInfo.SetValid(VALID_LEFT, FALSE );
+ aSetBoxInfo.SetValid(VALID_LEFT, sal_False );
aSetBox.SetLine( 0, BOX_LINE_LEFT );
}
}
@@ -1021,13 +1021,13 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
if (aSetBoxInfo.IsValid(VALID_VERT))
{
if ( !bVertSet )
- { bVertSet = TRUE;
+ { bVertSet = sal_True;
aSetBoxInfo.SetLine( rBox.GetLeft(), BOXINFO_LINE_VERT );
}
else if ((aSetBoxInfo.GetVert() && rBox.GetLeft() &&
!(*aSetBoxInfo.GetVert() == *rBox.GetLeft())) ||
((!aSetBoxInfo.GetVert()) ^ (!rBox.GetLeft())))
- { aSetBoxInfo.SetValid( VALID_VERT, FALSE );
+ { aSetBoxInfo.SetValid( VALID_VERT, sal_False );
aSetBoxInfo.SetLine( 0, BOXINFO_LINE_VERT );
}
}
@@ -1037,13 +1037,13 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
if ( aSetBoxInfo.IsValid(VALID_RIGHT) && bRightOver )
{
if ( !bRightSet )
- { bRightSet = TRUE;
+ { bRightSet = sal_True;
aSetBox.SetLine( rBox.GetRight(), BOX_LINE_RIGHT );
}
else if ((aSetBox.GetRight() && rBox.GetRight() &&
!(*aSetBox.GetRight() == *rBox.GetRight())) ||
(!aSetBox.GetRight() ^ !rBox.GetRight()))
- { aSetBoxInfo.SetValid( VALID_RIGHT, FALSE );
+ { aSetBoxInfo.SetValid( VALID_RIGHT, sal_False );
aSetBox.SetLine( 0, BOX_LINE_RIGHT );
}
}
@@ -1054,13 +1054,13 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
if ( aSetBoxInfo.IsValid(VALID_BOTTOM) )
{
if ( !bBottomSet )
- { bBottomSet = TRUE;
+ { bBottomSet = sal_True;
aSetBox.SetLine( rBox.GetBottom(), BOX_LINE_BOTTOM );
}
else if ((aSetBox.GetBottom() && rBox.GetBottom() &&
!(*aSetBox.GetBottom() == *rBox.GetBottom())) ||
(!aSetBox.GetBottom() ^ !rBox.GetBottom()))
- { aSetBoxInfo.SetValid( VALID_BOTTOM, FALSE );
+ { aSetBoxInfo.SetValid( VALID_BOTTOM, sal_False );
aSetBox.SetLine( 0, BOX_LINE_BOTTOM );
}
}
@@ -1072,14 +1072,14 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
if (aSetBoxInfo.IsValid(VALID_HORI))
{
if ( !bHoriSet )
- { bHoriSet = TRUE;
+ { bHoriSet = sal_True;
aSetBoxInfo.SetLine( rBox.GetBottom(), BOXINFO_LINE_HORI );
}
else if ((aSetBoxInfo.GetHori() && rBox.GetBottom() &&
!(*aSetBoxInfo.GetHori() == *rBox.GetBottom())) ||
((!aSetBoxInfo.GetHori()) ^ (!rBox.GetBottom())))
{
- aSetBoxInfo.SetValid( VALID_HORI, FALSE );
+ aSetBoxInfo.SetValid( VALID_HORI, sal_False );
aSetBoxInfo.SetLine( 0, BOXINFO_LINE_HORI );
}
}
@@ -1088,14 +1088,14 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
// Abstand zum Text
if (aSetBoxInfo.IsValid(VALID_DISTANCE))
{
- static USHORT __READONLY_DATA aBorders[] = {
+ static sal_uInt16 __READONLY_DATA aBorders[] = {
BOX_LINE_BOTTOM, BOX_LINE_TOP,
BOX_LINE_RIGHT, BOX_LINE_LEFT };
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
if( !bDistanceSet ) // bei 1. Durchlauf erstmal setzen
{
- bDistanceSet = TRUE;
+ bDistanceSet = sal_True;
for( int k = 0; k < 4; ++k, ++pBrd )
aSetBox.SetDistance( rBox.GetDistance( *pBrd ),
*pBrd );
@@ -1106,8 +1106,8 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
if( aSetBox.GetDistance( *pBrd ) !=
rBox.GetDistance( *pBrd ) )
{
- aSetBoxInfo.SetValid( VALID_DISTANCE, FALSE );
- aSetBox.SetDistance( (USHORT) 0 );
+ aSetBoxInfo.SetValid( VALID_DISTANCE, sal_False );
+ aSetBox.SetDistance( (sal_uInt16) 0 );
break;
}
}
@@ -1129,7 +1129,7 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew )
{
SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
SwSelBoxes aBoxes;
- if( pTblNd && ::lcl_GetBoxSel( rCursor, aBoxes, TRUE ) )
+ if( pTblNd && ::lcl_GetBoxSel( rCursor, aBoxes, sal_True ) )
{
SwTable& rTable = pTblNd->GetTable();
if( DoesUndo() )
@@ -1138,8 +1138,8 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew )
AppendUndo( new SwUndoAttrTbl( *pTblNd ));
}
- SvPtrarr aFmtCmp( Max( BYTE(255), BYTE(aBoxes.Count()) ), 255 );
- for ( USHORT i = 0; i < aBoxes.Count(); ++i )
+ SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aBoxes.Count()) ), 255 );
+ for ( sal_uInt16 i = 0; i < aBoxes.Count(); ++i )
{
SwTableBox *pBox = aBoxes[i];
@@ -1162,7 +1162,7 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew )
SwTabFrm* pTabFrm = pFrm->ImplFindTabFrm();
pTableLayout->Resize(
- pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), TRUE );
+ pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), sal_True );
}
SwTblFmtCmp::Delete( aFmtCmp );
SetModified();
@@ -1176,17 +1176,17 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew )
#* Update : JP 29.04.98
#***********************************************************************/
-BOOL SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
+sal_Bool SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
SwSelBoxes aBoxes;
if( pTblNd && lcl_GetBoxSel( rCursor, aBoxes ))
{
- bRet = TRUE;
- BOOL bOneFound = FALSE;
- const USHORT nWhich = rToFill.Which();
- for( USHORT i = 0; i < aBoxes.Count(); ++i )
+ bRet = sal_True;
+ sal_Bool bOneFound = sal_False;
+ const sal_uInt16 nWhich = rToFill.Which();
+ for( sal_uInt16 i = 0; i < aBoxes.Count(); ++i )
{
switch ( nWhich )
{
@@ -1197,10 +1197,10 @@ BOOL SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
if( !bOneFound )
{
(SvxBrushItem&)rToFill = rBack;
- bOneFound = TRUE;
+ bOneFound = sal_True;
}
else if( rToFill != rBack )
- bRet = FALSE;
+ bRet = sal_False;
}
break;
@@ -1211,14 +1211,14 @@ BOOL SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
if( !bOneFound )
{
(SvxFrameDirectionItem&)rToFill = rDir;
- bOneFound = TRUE;
+ bOneFound = sal_True;
}
else if( rToFill != rDir )
- bRet = FALSE;
+ bRet = sal_False;
}
}
- if ( FALSE == bRet )
+ if ( sal_False == bRet )
break;
}
}
@@ -1231,7 +1231,7 @@ BOOL SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
#* Datum : MA 18. Dec. 96
#* Update : JP 29.04.98
#***********************************************************************/
-void SwDoc::SetBoxAlign( const SwCursor& rCursor, USHORT nAlign )
+void SwDoc::SetBoxAlign( const SwCursor& rCursor, sal_uInt16 nAlign )
{
ASSERT( nAlign == text::VertOrientation::NONE ||
nAlign == text::VertOrientation::CENTER ||
@@ -1240,18 +1240,18 @@ void SwDoc::SetBoxAlign( const SwCursor& rCursor, USHORT nAlign )
SetBoxAttr( rCursor, aVertOri );
}
-USHORT SwDoc::GetBoxAlign( const SwCursor& rCursor ) const
+sal_uInt16 SwDoc::GetBoxAlign( const SwCursor& rCursor ) const
{
- USHORT nAlign = USHRT_MAX;
+ sal_uInt16 nAlign = USHRT_MAX;
SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
SwSelBoxes aBoxes;
if( pTblNd && ::lcl_GetBoxSel( rCursor, aBoxes ))
- for( USHORT i = 0; i < aBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aBoxes.Count(); ++i )
{
const SwFmtVertOrient &rOri =
aBoxes[i]->GetFrmFmt()->GetVertOrient();
if( USHRT_MAX == nAlign )
- nAlign = static_cast<USHORT>(rOri.GetVertOrient());
+ nAlign = static_cast<sal_uInt16>(rOri.GetVertOrient());
else if( rOri.GetVertOrient() != nAlign )
{
nAlign = USHRT_MAX;
@@ -1268,7 +1268,7 @@ USHORT SwDoc::GetBoxAlign( const SwCursor& rCursor ) const
#* Datum : MA 20. Feb. 95
#* Update : JP 29.04.98
#***********************************************************************/
-USHORT lcl_CalcCellFit( const SwLayoutFrm *pCell )
+sal_uInt16 lcl_CalcCellFit( const SwLayoutFrm *pCell )
{
SwTwips nRet = 0;
const SwFrm *pFrm = pCell->Lower(); //Die ganze Zelle.
@@ -1294,7 +1294,7 @@ USHORT lcl_CalcCellFit( const SwLayoutFrm *pCell )
//Um Rechenungenauikeiten, die spaeter bei SwTable::SetTabCols enstehen,
//auszugleichen, addieren wir noch ein bischen.
nRet += COLFUZZY;
- return (USHORT)Max( long(MINLAY), nRet );
+ return (sal_uInt16)Max( long(MINLAY), nRet );
}
/*Die Zelle ist in der Selektion, wird aber nicht von den TabCols beschrieben.
@@ -1311,15 +1311,15 @@ USHORT lcl_CalcCellFit( const SwLayoutFrm *pCell )
void lcl_CalcSubColValues( SvUShorts &rToFill, const SwTabCols &rCols,
const SwLayoutFrm *pCell, const SwLayoutFrm *pTab,
- BOOL bWishValues )
+ sal_Bool bWishValues )
{
- const USHORT nWish = bWishValues ?
+ const sal_uInt16 nWish = bWishValues ?
::lcl_CalcCellFit( pCell ) :
- MINLAY + USHORT(pCell->Frm().Width() - pCell->Prt().Width());
+ MINLAY + sal_uInt16(pCell->Frm().Width() - pCell->Prt().Width());
SWRECTFN( pTab )
- for ( USHORT i = 0 ; i <= rCols.Count(); ++i )
+ for ( sal_uInt16 i = 0 ; i <= rCols.Count(); ++i )
{
long nColLeft = i == 0 ? rCols.GetLeft() : rCols[i-1];
long nColRight = i == rCols.Count() ? rCols.GetRight() : rCols[i];
@@ -1327,7 +1327,7 @@ void lcl_CalcSubColValues( SvUShorts &rToFill, const SwTabCols &rCols,
nColRight += rCols.GetLeftMin();
//Werte auf die Verhaeltnisse der Tabelle (Follows) anpassen.
- if ( rCols.GetLeftMin() != USHORT((pTab->Frm().*fnRect->fnGetLeft)()) )
+ if ( rCols.GetLeftMin() != sal_uInt16((pTab->Frm().*fnRect->fnGetLeft)()) )
{
const long nDiff = (pTab->Frm().*fnRect->fnGetLeft)() - rCols.GetLeftMin();
nColLeft += nDiff;
@@ -1347,8 +1347,8 @@ void lcl_CalcSubColValues( SvUShorts &rToFill, const SwTabCols &rCols,
if ( nWidth && pCell->Frm().Width() )
{
long nTmp = nWidth * nWish / pCell->Frm().Width();
- if ( USHORT(nTmp) > rToFill[i] )
- rToFill[i] = USHORT(nTmp);
+ if ( sal_uInt16(nTmp) > rToFill[i] )
+ rToFill[i] = sal_uInt16(nTmp);
}
}
}
@@ -1357,27 +1357,27 @@ void lcl_CalcSubColValues( SvUShorts &rToFill, const SwTabCols &rCols,
*Es wird nicht ueber die Eintrage in den TabCols itereriert, sondern
*quasi ueber die Zwischenraeume, die ja die Zellen beschreiben.
*
- *bWishValues == TRUE: Es werden zur aktuellen Selektion bzw. zur aktuellen
+ *bWishValues == sal_True: Es werden zur aktuellen Selektion bzw. zur aktuellen
* Zelle die Wunschwerte aller betroffen Zellen ermittelt.
* Sind mehrere Zellen in einer Spalte, so wird der
* groesste Wunschwert als Ergebnis geliefert.
* Fuer die TabCol-Eintraege, zu denen keine Zellen
* ermittelt wurden, werden 0-en eingetragen.
*
- *bWishValues == FALSE: Die Selektion wird senkrecht ausgedehnt. Zu jeder
+ *bWishValues == sal_False: Die Selektion wird senkrecht ausgedehnt. Zu jeder
* Spalte in den TabCols, die sich mit der Selektion
* schneidet wird der Minimalwert ermittelt.
*/
void lcl_CalcColValues( SvUShorts &rToFill, const SwTabCols &rCols,
const SwLayoutFrm *pStart, const SwLayoutFrm *pEnd,
- BOOL bWishValues )
+ sal_Bool bWishValues )
{
SwSelUnions aUnions;
::MakeSelUnions( aUnions, pStart, pEnd,
bWishValues ? nsSwTblSearchType::TBLSEARCH_NONE : nsSwTblSearchType::TBLSEARCH_COL );
- for ( USHORT i2 = 0; i2 < aUnions.Count(); ++i2 )
+ for ( sal_uInt16 i2 = 0; i2 < aUnions.Count(); ++i2 )
{
SwSelUnion *pSelUnion = aUnions[i2];
const SwTabFrm *pTab = pSelUnion->GetTable();
@@ -1394,11 +1394,11 @@ void lcl_CalcColValues( SvUShorts &rToFill, const SwTabCols &rCols,
const long nCLeft = (pCell->Frm().*fnRect->fnGetLeft)();
const long nCRight = (pCell->Frm().*fnRect->fnGetRight)();
- BOOL bNotInCols = TRUE;
+ sal_Bool bNotInCols = sal_True;
- for ( USHORT i = 0; i <= rCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i <= rCols.Count(); ++i )
{
- USHORT nFit = rToFill[i];
+ sal_uInt16 nFit = rToFill[i];
long nColLeft = i == 0 ? rCols.GetLeft() : rCols[i-1];
long nColRight = i == rCols.Count() ? rCols.GetRight() : rCols[i];
@@ -1415,7 +1415,7 @@ void lcl_CalcColValues( SvUShorts &rToFill, const SwTabCols &rCols,
//Werte auf die Verhaeltnisse der Tabelle (Follows) anpassen.
long nLeftA = nColLeft;
long nRightA = nColRight;
- if ( rCols.GetLeftMin() != USHORT((pTab->Frm().*fnRect->fnGetLeft)()) )
+ if ( rCols.GetLeftMin() != sal_uInt16((pTab->Frm().*fnRect->fnGetLeft)()) )
{
const long nDiff = (pTab->Frm().*fnRect->fnGetLeft)() - rCols.GetLeftMin();
nLeftA += nDiff;
@@ -1425,15 +1425,15 @@ void lcl_CalcColValues( SvUShorts &rToFill, const SwTabCols &rCols,
//Wir wollen nicht allzu genau hinsehen.
if ( ::IsSame(nCLeft, nLeftA) && ::IsSame(nCRight, nRightA))
{
- bNotInCols = FALSE;
+ bNotInCols = sal_False;
if ( bWishValues )
{
- const USHORT nWish = ::lcl_CalcCellFit( pCell );
+ const sal_uInt16 nWish = ::lcl_CalcCellFit( pCell );
if ( nWish > nFit )
nFit = nWish;
}
else
- { const USHORT nMin = MINLAY + USHORT(pCell->Frm().Width() -
+ { const sal_uInt16 nMin = MINLAY + sal_uInt16(pCell->Frm().Width() -
pCell->Prt().Width());
if ( !nFit || nMin < nFit )
nFit = nMin;
@@ -1453,7 +1453,7 @@ void lcl_CalcColValues( SvUShorts &rToFill, const SwTabCols &rCols,
}
-void SwDoc::AdjustCellWidth( const SwCursor& rCursor, BOOL bBalance )
+void SwDoc::AdjustCellWidth( const SwCursor& rCursor, sal_Bool bBalance )
{
// pruefe ob vom aktuellen Crsr der Point/Mark in einer Tabelle stehen
SwCntntNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetCntntNode();
@@ -1478,17 +1478,17 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, BOOL bBalance )
if ( ! aTabCols.Count() )
return;
- const BYTE nTmp = (BYTE)Max( USHORT(255), USHORT(aTabCols.Count() + 1) );
+ const sal_uInt8 nTmp = (sal_uInt8)Max( sal_uInt16(255), sal_uInt16(aTabCols.Count() + 1) );
SvUShorts aWish( nTmp, nTmp ),
aMins( nTmp, nTmp );
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i <= aTabCols.Count(); ++i )
{
- aWish.Insert( USHORT(0), aWish.Count() );
- aMins.Insert( USHORT(0), aMins.Count() );
+ aWish.Insert( sal_uInt16(0), aWish.Count() );
+ aMins.Insert( sal_uInt16(0), aMins.Count() );
}
- ::lcl_CalcColValues( aWish, aTabCols, pStart, pEnd, TRUE );
+ ::lcl_CalcColValues( aWish, aTabCols, pStart, pEnd, sal_True );
//Es ist Robuster wenn wir die Min-Werte fuer die ganze Tabelle berechnen.
const SwTabFrm *pTab = pStart->ImplFindTabFrm();
@@ -1496,25 +1496,25 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, BOOL bBalance )
pEnd = (SwLayoutFrm*)pTab->FindLastCntnt()->GetUpper();
while( !pEnd->IsCellFrm() )
pEnd = pEnd->GetUpper();
- ::lcl_CalcColValues( aMins, aTabCols, pStart, pEnd, FALSE );
+ ::lcl_CalcColValues( aMins, aTabCols, pStart, pEnd, sal_False );
if( bBalance )
{
//Alle Spalten, die makiert sind haben jetzt einen Wunschwert
//eingtragen. Wir addieren die aktuellen Werte, teilen das Ergebnis
//durch die Anzahl und haben eine Wunschwert fuer den ausgleich.
- USHORT nWish = 0, nCnt = 0;
+ sal_uInt16 nWish = 0, nCnt = 0;
for ( i = 0; i <= aTabCols.Count(); ++i )
{
int nDiff = aWish[i];
if ( nDiff )
{
if ( i == 0 )
- nWish = static_cast<USHORT>( nWish + aTabCols[i] - aTabCols.GetLeft() );
+ nWish = static_cast<sal_uInt16>( nWish + aTabCols[i] - aTabCols.GetLeft() );
else if ( i == aTabCols.Count() )
- nWish = static_cast<USHORT>(nWish + aTabCols.GetRight() - aTabCols[i-1] );
+ nWish = static_cast<sal_uInt16>(nWish + aTabCols.GetRight() - aTabCols[i-1] );
else
- nWish = static_cast<USHORT>(nWish + aTabCols[i] - aTabCols[i-1] );
+ nWish = static_cast<sal_uInt16>(nWish + aTabCols[i] - aTabCols[i-1] );
++nCnt;
}
}
@@ -1524,14 +1524,14 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, BOOL bBalance )
aWish[i] = nWish;
}
- const USHORT nOldRight = static_cast<USHORT>(aTabCols.GetRight());
+ const sal_uInt16 nOldRight = static_cast<sal_uInt16>(aTabCols.GetRight());
//Um die Impl. einfach zu gestalten, aber trotzdem in den meissten Faellen
//den Platz richtig auszunutzen laufen wir zweimal.
//Problem: Erste Spalte wird breiter, die anderen aber erst danach
//schmaler. Die Wunschbreite der ersten Spalte wuerde abgelehnt, weil
//mit ihr die max. Breite der Tabelle ueberschritten wuerde.
- for ( USHORT k= 0; k < 2; ++k )
+ for ( sal_uInt16 k= 0; k < 2; ++k )
{
for ( i = 0; i <= aTabCols.Count(); ++i )
{
@@ -1564,20 +1564,20 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, BOOL bBalance )
nDiff -= nTmpD;
nTabRight -= nTmpD;
}
- for ( USHORT i2 = i; i2 < aTabCols.Count(); ++i2 )
+ for ( sal_uInt16 i2 = i; i2 < aTabCols.Count(); ++i2 )
aTabCols[i2] += nDiff;
aTabCols.SetRight( nTabRight );
}
}
}
- const USHORT nNewRight = static_cast<USHORT>(aTabCols.GetRight());
+ const sal_uInt16 nNewRight = static_cast<sal_uInt16>(aTabCols.GetRight());
SwFrmFmt *pFmt = pTblNd->GetTable().GetFrmFmt();
const sal_Int16 nOriHori = pFmt->GetHoriOrient().GetHoriOrient();
//So, die richtige Arbeit koennen wir jetzt der SwTable ueberlassen.
- SetTabCols( aTabCols, FALSE, 0, (SwCellFrm*)pBoxFrm );
+ SetTabCols( aTabCols, sal_False, 0, (SwCellFrm*)pBoxFrm );
// i54248: lijian/fme
// alignment might have been changed in SetTabCols, restore old value:
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 1eb673f241d4..f8d7170099ee 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -163,7 +163,7 @@ int Put( boost::shared_ptr<const SfxItemSet>& mrpAttrSet, const SwCntntNode& rNo
// --> FME 2007-4-12 #i76273# Robust: Save the style name items:
SfxItemSet* pStyleNames = 0;
- if ( SFX_ITEM_SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, FALSE ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, sal_False ) )
{
pStyleNames = new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME );
pStyleNames->Put( aNewSet );
@@ -213,7 +213,7 @@ int Put_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
// --> FME 2007-4-12 #i76273# Robust: Save the style name items:
SfxItemSet* pStyleNames = 0;
- if ( SFX_ITEM_SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, FALSE ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, sal_False ) )
{
pStyleNames = new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME );
pStyleNames->Put( aNewSet );
@@ -241,28 +241,28 @@ int Put_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
return nRet;
}
-USHORT ClearItem_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
- const SwCntntNode& rNode, USHORT nWhich,
+sal_uInt16 ClearItem_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
+ const SwCntntNode& rNode, sal_uInt16 nWhich,
SwAttrSet* pOld, SwAttrSet* pNew )
{
SwAttrSet aNewSet( (SwAttrSet&)*mrpAttrSet );
if( rNode.GetModifyAtAttr() )
aNewSet.SetModifyAtAttr( &rNode );
- const USHORT nRet = aNewSet.ClearItem_BC( nWhich, pOld, pNew );
+ const sal_uInt16 nRet = aNewSet.ClearItem_BC( nWhich, pOld, pNew );
if ( nRet )
GetNewAutoStyle( mrpAttrSet, rNode, aNewSet );
return nRet;
}
-USHORT ClearItem_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
+sal_uInt16 ClearItem_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
const SwCntntNode& rNode,
- USHORT nWhich1, USHORT nWhich2,
+ sal_uInt16 nWhich1, sal_uInt16 nWhich2,
SwAttrSet* pOld, SwAttrSet* pNew )
{
SwAttrSet aNewSet( (SwAttrSet&)*mrpAttrSet );
if( rNode.GetModifyAtAttr() )
aNewSet.SetModifyAtAttr( &rNode );
- const USHORT nRet = aNewSet.ClearItem_BC( nWhich1, nWhich2, pOld, pNew );
+ const sal_uInt16 nRet = aNewSet.ClearItem_BC( nWhich1, nWhich2, pOld, pNew );
if ( nRet )
GetNewAutoStyle( mrpAttrSet, rNode, aNewSet );
return nRet;
@@ -295,13 +295,13 @@ USHORT ClearItem_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
*******************************************************************/
-USHORT SwNode::GetSectionLevel() const
+sal_uInt16 SwNode::GetSectionLevel() const
{
// EndNode einer Grund-Section ?? diese sind immer 0 !!
if( IsEndNode() && 0 == pStartOfSection->StartOfSectionIndex() )
return 0;
- USHORT nLevel;
+ sal_uInt16 nLevel;
const SwNode* pNode = IsStartNode() ? this : pStartOfSection;
for( nLevel = 1; 0 != pNode->StartOfSectionIndex(); ++nLevel )
pNode = pNode->pStartOfSection;
@@ -340,10 +340,10 @@ USHORT SwNode::GetSectionLevel() const
long SwNode::nSerial = 0;
#endif
-SwNode::SwNode( const SwNodeIndex &rWhere, const BYTE nNdType )
+SwNode::SwNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType )
: nNodeType( nNdType ), pStartOfSection( 0 )
{
- bSetNumLSpace = bIgnoreDontExpand = FALSE;
+ bSetNumLSpace = bIgnoreDontExpand = sal_False;
nAFmtNumLvl = 0;
SwNodes& rNodes = (SwNodes&)rWhere.GetNodes();
@@ -374,10 +374,10 @@ SwNode::SwNode( const SwNodeIndex &rWhere, const BYTE nNdType )
#endif
}
-SwNode::SwNode( SwNodes& rNodes, ULONG nPos, const BYTE nNdType )
+SwNode::SwNode( SwNodes& rNodes, sal_uLong nPos, const sal_uInt8 nNdType )
: nNodeType( nNdType ), pStartOfSection( 0 )
{
- bSetNumLSpace = bIgnoreDontExpand = FALSE;
+ bSetNumLSpace = bIgnoreDontExpand = sal_False;
nAFmtNumLvl = 0;
SwNode* pInsNd = this; // der MAC kann this nicht einfuegen !!
@@ -431,9 +431,9 @@ SwTableNode* SwNode::FindTableNode()
// liegt der Node im Sichtbarenbereich der Shell ?
-BOOL SwNode::IsInVisibleArea( ViewShell* pSh ) const
+sal_Bool SwNode::IsInVisibleArea( ViewShell* pSh ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwCntntNode* pNd;
if( ND_STARTNODE & nNodeType )
@@ -450,7 +450,7 @@ BOOL SwNode::IsInVisibleArea( ViewShell* pSh ) const
pNd = GetCntntNode();
const SwFrm* pFrm;
- if( pNd && 0 != ( pFrm = pNd->GetFrm( 0, 0, FALSE ) ) )
+ if( pNd && 0 != ( pFrm = pNd->GetFrm( 0, 0, sal_False ) ) )
{
if( !pSh )
// dann die Shell vom Doc besorgen:
@@ -467,14 +467,14 @@ BOOL SwNode::IsInVisibleArea( ViewShell* pSh ) const
} while ( pFrm && !pFrm->IsValid() );
if( !pFrm || pSh->VisArea().IsOver( pFrm->Frm() ) )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SwNode::IsInProtectSect() const
+sal_Bool SwNode::IsInProtectSect() const
{
const SwNode* pNd = ND_SECTIONNODE == nNodeType ? pStartOfSection : this;
const SwSectionNode* pSectNd = pNd->FindSectionNode();
@@ -484,12 +484,12 @@ BOOL SwNode::IsInProtectSect() const
// befindet sich der Node in irgendetwas geschuetzten ?
// (Bereich/Rahmen/Tabellenzellen/... incl. des Ankers bei
// Rahmen/Fussnoten/..)
-BOOL SwNode::IsProtect() const
+sal_Bool SwNode::IsProtect() const
{
const SwNode* pNd = ND_SECTIONNODE == nNodeType ? pStartOfSection : this;
const SwStartNode* pSttNd = pNd->FindSectionNode();
if( pSttNd && ((SwSectionNode*)pSttNd)->GetSection().IsProtectFlag() )
- return TRUE;
+ return sal_True;
if( 0 != ( pSttNd = FindTableBoxStartNode() ) )
{
@@ -501,18 +501,18 @@ BOOL SwNode::IsProtect() const
GetTblBox( pSttNd->GetIndex() );
//Robust #149568
if( pBox && pBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
- return TRUE;
+ return sal_True;
}
SwFrmFmt* pFlyFmt = GetFlyFmt();
if( pFlyFmt )
{
if( pFlyFmt->GetProtect().IsCntntProtected() )
- return TRUE;
+ return sal_True;
const SwFmtAnchor& rAnchor = pFlyFmt->GetAnchor();
return rAnchor.GetCntntAnchor()
? rAnchor.GetCntntAnchor()->nNode.GetNode().IsProtect()
- : FALSE;
+ : sal_False;
}
if( 0 != ( pSttNd = FindFootnoteStartNode() ) )
@@ -523,13 +523,13 @@ BOOL SwNode::IsProtect() const
return pTFtn->GetTxtNode().IsProtect();
}
- return FALSE;
+ return sal_False;
}
// suche den PageDesc, mit dem dieser Node formatiert ist. Wenn das
// Layout vorhanden ist wird ueber das gesucht, ansonsten gibt es nur
// die harte Tour ueber die Nodes nach vorne suchen!!
-const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
+const SwPageDesc* SwNode::FindPageDesc( sal_Bool bCalcLay,
sal_uInt32* pPgDescNdIdx ) const
{
// OD 18.03.2003 #106329#
@@ -587,7 +587,7 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
// dann erstmal den richtigen Anker finden
const SwFrmFmt* pFmt = 0;
const SwSpzFrmFmts& rFmts = *pDoc->GetSpzFrmFmts();
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < rFmts.Count(); ++n )
{
@@ -641,7 +641,7 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
if( n >= rFmts.Count() )
{
ASSERT( !this, "Fly-Section aber kein Format gefunden" );
- return FALSE;
+ return sal_False;
}
}
}
@@ -664,7 +664,7 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
0 != ( pSttNd = pNd->FindFooterStartNode() ))
{
// dann in den PageDescs diesen StartNode suchen
- USHORT nId;
+ sal_uInt16 nId;
UseOnPage eAskUse;
if( SwHeaderStartNode == pSttNd->GetStartNodeType())
{
@@ -677,7 +677,7 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
eAskUse = nsUseOnPage::PD_FOOTERSHARE;
}
- for( USHORT n = pDoc->GetPageDescCnt(); n && !pPgDesc; )
+ for( sal_uInt16 n = pDoc->GetPageDescCnt(); n && !pPgDesc; )
{
const SwPageDesc& rPgDsc = pDoc->GetPageDesc( --n );
const SwFrmFmt* pFmt = &rPgDsc.GetMaster();
@@ -712,7 +712,7 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
// der Anker kann nur im Bodytext sein
const SwTxtFtn* pTxtFtn;
const SwFtnIdxs& rFtnArr = pDoc->GetFtnIdxs();
- for( USHORT n = 0; n < rFtnArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFtnArr.Count(); ++n )
if( 0 != ( pTxtFtn = rFtnArr[ n ])->GetStartNode() &&
(SwNode*)pSttNd ==
&pTxtFtn->GetStartNode()->GetNode() )
@@ -796,7 +796,7 @@ SwFrmFmt* SwNode::GetFlyFmt() const
{
// dann gibts noch harten steinigen Weg uebers Dokument:
const SwSpzFrmFmts& rFrmFmtTbl = *GetDoc()->GetSpzFrmFmts();
- for( USHORT n = 0; n < rFrmFmtTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFrmFmtTbl.Count(); ++n )
{
SwFrmFmt* pFmt = rFrmFmtTbl[n];
const SwFmtCntnt& rCntnt = pFmt->GetCntnt();
@@ -835,21 +835,21 @@ SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp )
return eTyp == pTmp->GetStartNodeType() ? pTmp : 0;
}
-const SwTxtNode* SwNode::FindOutlineNodeOfLevel( BYTE nLvl ) const
+const SwTxtNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const
{
const SwTxtNode* pRet = 0;
const SwOutlineNodes& rONds = GetNodes().GetOutLineNds();
if( MAXLEVEL > nLvl && rONds.Count() )
{
- USHORT nPos;
+ sal_uInt16 nPos;
SwNode* pNd = (SwNode*)this;
- BOOL bCheckFirst = FALSE;
+ sal_Bool bCheckFirst = sal_False;
if( !rONds.Seek_Entry( pNd, &nPos ))
{
if( nPos )
nPos = nPos-1;
else
- bCheckFirst = TRUE;
+ bCheckFirst = sal_True;
}
if( bCheckFirst )
@@ -862,8 +862,8 @@ const SwTxtNode* SwNode::FindOutlineNodeOfLevel( BYTE nLvl ) const
const SwCntntNode* pCNd = GetCntntNode();
Point aPt( 0, 0 );
- const SwFrm* pFrm = pRet->GetFrm( &aPt, 0, FALSE ),
- * pMyFrm = pCNd ? pCNd->GetFrm( &aPt, 0, FALSE ) : 0;
+ const SwFrm* pFrm = pRet->GetFrm( &aPt, 0, sal_False ),
+ * pMyFrm = pCNd ? pCNd->GetFrm( &aPt, 0, sal_False ) : 0;
const SwPageFrm* pPgFrm = pFrm ? pFrm->FindPageFrm() : 0;
if( pPgFrm && pMyFrm &&
pPgFrm->Frm().Top() > pMyFrm->Frm().Top() )
@@ -896,11 +896,11 @@ inline sal_Bool IsValidNextPrevNd( const SwNode& rNd )
ND_TABLENODE == rNd.StartOfSectionNode()->GetNodeType() );
}
-BYTE SwNode::HasPrevNextLayNode() const
+sal_uInt8 SwNode::HasPrevNextLayNode() const
{
// assumption: <this> node is a node inside the document nodes array section.
- BYTE nRet = 0;
+ sal_uInt8 nRet = 0;
if( IsValidNextPrevNd( *this ))
{
SwNodeIndex aIdx( *this, -1 );
@@ -952,7 +952,7 @@ BYTE SwNode::HasPrevNextLayNode() const
*******************************************************************/
-SwStartNode::SwStartNode( const SwNodeIndex &rWhere, const BYTE nNdType,
+SwStartNode::SwStartNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
SwStartNodeType eSttNd )
: SwNode( rWhere, nNdType ), eSttNdTyp( eSttNd )
{
@@ -960,7 +960,7 @@ SwStartNode::SwStartNode( const SwNodeIndex &rWhere, const BYTE nNdType,
pEndOfSection = (SwEndNode*)this;
}
-SwStartNode::SwStartNode( SwNodes& rNodes, ULONG nPos )
+SwStartNode::SwStartNode( SwNodes& rNodes, sal_uLong nPos )
: SwNode( rNodes, nPos, ND_STARTNODE ), eSttNdTyp( SwNormalStartNode )
{
// erstmal temporaer, bis der EndNode eingefuegt wird.
@@ -972,7 +972,7 @@ void SwStartNode::CheckSectionCondColl() const
{
//FEATURE::CONDCOLL
SwNodeIndex aIdx( *this );
- ULONG nEndIdx = EndOfSectionIndex();
+ sal_uLong nEndIdx = EndOfSectionIndex();
const SwNodes& rNds = GetNodes();
SwCntntNode* pCNd;
while( 0 != ( pCNd = rNds.GoNext( &aIdx )) && pCNd->GetIndex() < nEndIdx )
@@ -1018,7 +1018,7 @@ SwEndNode::SwEndNode( const SwNodeIndex &rWhere, SwStartNode& rSttNd )
pStartOfSection->pEndOfSection = this;
}
-SwEndNode::SwEndNode( SwNodes& rNds, ULONG nPos, SwStartNode& rSttNd )
+SwEndNode::SwEndNode( SwNodes& rNds, sal_uLong nPos, SwStartNode& rSttNd )
: SwNode( rNds, nPos, ND_ENDNODE )
{
pStartOfSection = &rSttNd;
@@ -1032,7 +1032,7 @@ SwEndNode::SwEndNode( SwNodes& rNds, ULONG nPos, SwStartNode& rSttNd )
// --------------------
-SwCntntNode::SwCntntNode( const SwNodeIndex &rWhere, const BYTE nNdType,
+SwCntntNode::SwCntntNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
SwFmtColl *pColl )
: SwModify( pColl ), // CrsrsShell, FrameFmt,
SwNode( rWhere, nNdType ),
@@ -1062,7 +1062,7 @@ SwCntntNode::~SwCntntNode()
void SwCntntNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
{
- USHORT nWhich = pOldValue ? pOldValue->Which() :
+ sal_uInt16 nWhich = pOldValue ? pOldValue->Which() :
pNewValue ? pNewValue->Which() : 0 ;
switch( nWhich )
@@ -1119,7 +1119,7 @@ void SwCntntNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
if( GetNodes().IsDocNodes() && IsTxtNode() )
{
if( SFX_ITEM_SET == ((SwAttrSetChg*)pOldValue)->GetChgSet()->GetItemState(
- RES_CHRATR_HIDDEN, FALSE ) )
+ RES_CHRATR_HIDDEN, sal_False ) )
{
((SwTxtNode*)this)->SetCalcHiddenCharFlags();
}
@@ -1129,7 +1129,7 @@ void SwCntntNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
case RES_UPDATE_ATTR:
if( GetNodes().IsDocNodes() && IsTxtNode() )
{
- const USHORT nTmp = ((SwUpdateAttr*)pNewValue)->nWhichAttr;
+ const sal_uInt16 nTmp = ((SwUpdateAttr*)pNewValue)->nWhichAttr;
if ( RES_ATTRSET_CHG == nTmp )
{
// anybody wants to do some optimization here?
@@ -1142,17 +1142,17 @@ void SwCntntNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
SwModify::Modify( pOldValue, pNewValue );
}
-BOOL SwCntntNode::InvalidateNumRule()
+sal_Bool SwCntntNode::InvalidateNumRule()
{
SwNumRule* pRule = 0;
const SfxPoolItem* pItem;
if( GetNodes().IsDocNodes() &&
- 0 != ( pItem = GetNoCondAttr( RES_PARATR_NUMRULE, TRUE )) &&
+ 0 != ( pItem = GetNoCondAttr( RES_PARATR_NUMRULE, sal_True )) &&
((SwNumRuleItem*)pItem)->GetValue().Len() &&
0 != (pRule = GetDoc()->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() ) ) )
{
- pRule->SetInvalidRule( TRUE );
+ pRule->SetInvalidRule( sal_True );
}
return 0 != pRule;
}
@@ -1160,14 +1160,14 @@ BOOL SwCntntNode::InvalidateNumRule()
SwCntntFrm *SwCntntNode::GetFrm( const Point* pPoint,
const SwPosition *pPos,
- const BOOL bCalcFrm ) const
+ const sal_Bool bCalcFrm ) const
{
return (SwCntntFrm*) ::GetFrmOfModify( *(SwModify*)this, FRM_CNTNT,
pPoint, pPos, bCalcFrm );
}
-SwRect SwCntntNode::FindLayoutRect( const BOOL bPrtArea, const Point* pPoint,
- const BOOL bCalcFrm ) const
+SwRect SwCntntNode::FindLayoutRect( const sal_Bool bPrtArea, const Point* pPoint,
+ const sal_Bool bCalcFrm ) const
{
SwRect aRet;
SwCntntFrm* pFrm = (SwCntntFrm*)::GetFrmOfModify( *(SwModify*)this,
@@ -1177,8 +1177,8 @@ SwRect SwCntntNode::FindLayoutRect( const BOOL bPrtArea, const Point* pPoint,
return aRet;
}
-SwRect SwCntntNode::FindPageFrmRect( const BOOL bPrtArea, const Point* pPoint,
- const BOOL bCalcFrm ) const
+SwRect SwCntntNode::FindPageFrmRect( const sal_Bool bPrtArea, const Point* pPoint,
+ const sal_Bool bCalcFrm ) const
{
SwRect aRet;
SwFrm* pFrm = ::GetFrmOfModify( *(SwModify*)this,
@@ -1209,7 +1209,7 @@ SwFmtColl *SwCntntNode::ChgFmtColl( SwFmtColl *pNewColl )
//FEATURE::CONDCOLL
// HACK: hier muss die entsprechend der neuen Vorlage die Bedingungen
// neu ueberprueft werden!
- if( TRUE /*pNewColl */ )
+ if( sal_True /*pNewColl */ )
{
SetCondFmtColl( 0 );
}
@@ -1227,15 +1227,15 @@ SwFmtColl *SwCntntNode::ChgFmtColl( SwFmtColl *pNewColl )
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
return pOldColl;
}
-BOOL SwCntntNode::GoNext(SwIndex * pIdx, USHORT nMode ) const
+sal_Bool SwCntntNode::GoNext(SwIndex * pIdx, sal_uInt16 nMode ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( pIdx->GetIndex() < Len() )
{
if( !IsTxtNode() )
@@ -1267,23 +1267,23 @@ BOOL SwCntntNode::GoNext(SwIndex * pIdx, USHORT nMode ) const
if( 1 == nDone )
*pIdx = nPos;
else
- bRet = FALSE;
+ bRet = sal_False;
}
else if( nPos < rTNd.GetTxt().Len() )
(*pIdx)++;
else
- bRet = FALSE;
+ bRet = sal_False;
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
-BOOL SwCntntNode::GoPrevious(SwIndex * pIdx, USHORT nMode ) const
+sal_Bool SwCntntNode::GoPrevious(SwIndex * pIdx, sal_uInt16 nMode ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( pIdx->GetIndex() > 0 )
{
if( !IsTxtNode() )
@@ -1315,16 +1315,16 @@ BOOL SwCntntNode::GoPrevious(SwIndex * pIdx, USHORT nMode ) const
if( 1 == nDone )
*pIdx = nPos;
else
- bRet = FALSE;
+ bRet = sal_False;
}
else if( nPos )
(*pIdx)--;
else
- bRet = FALSE;
+ bRet = sal_False;
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -1416,7 +1416,7 @@ void SwCntntNode::DelFrms()
{
SwCntntFrm* pMaster = (SwTxtFrm*)pFrm->FindMaster();
pMaster->SetFollow( pFrm->GetFollow() );
- pFrm->_SetIsFollow( FALSE );
+ pFrm->_SetIsFollow( sal_False );
}
pFrm->SetFollow( 0 );//Damit er nicht auf dumme Gedanken kommt.
//Andernfalls kann es sein, dass ein Follow
@@ -1472,7 +1472,7 @@ SwCntntNode *SwCntntNode::JoinPrev()
// erfrage vom Modify Informationen
-BOOL SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
{
switch( rInfo.Which() )
{
@@ -1480,7 +1480,7 @@ BOOL SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
if( &GetNodes() == ((SwAutoFmtGetDocNode&)rInfo).pNodes )
{
((SwAutoFmtGetDocNode&)rInfo).pCntntNode = this;
- return FALSE;
+ return sal_False;
}
break;
// --> OD 2008-02-19 #refactorlists#
@@ -1489,7 +1489,7 @@ BOOL SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
// if( IsTxtNode())
// {
// SwTxtNode * pTxtNode = (SwTxtNode*)this;
-// pItem = (SwNumRuleItem*)GetNoCondAttr(RES_PARATR_NUMRULE, TRUE );
+// pItem = (SwNumRuleItem*)GetNoCondAttr(RES_PARATR_NUMRULE, sal_True );
// if (0 != pItem &&
// pItem->GetValue().Len() &&
@@ -1500,20 +1500,20 @@ BOOL SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
// }
// }
-// return TRUE;
+// return sal_True;
// <--
case RES_FINDNEARESTNODE:
if( ((SwFmtPageDesc&)GetAttr( RES_PAGEDESC )).GetPageDesc() )
((SwFindNearestNode&)rInfo).CheckNode( *this );
- return TRUE;
+ return sal_True;
case RES_CONTENT_VISIBLE:
{
((SwPtrMsgPoolItem&)rInfo).pObject =
SwClientIter( *(SwCntntNode*)this ).First( TYPE(SwFrm) );
}
- return FALSE;
+ return sal_False;
}
return SwModify::GetInfo( rInfo );
@@ -1521,7 +1521,7 @@ BOOL SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
// setze ein Attribut
-BOOL SwCntntNode::SetAttr(const SfxPoolItem& rAttr )
+sal_Bool SwCntntNode::SetAttr(const SfxPoolItem& rAttr )
{
if( !GetpSwAttrSet() ) // lasse von den entsprechenden Nodes die
NewAttrSet( GetDoc()->GetAttrPool() ); // AttrSets anlegen
@@ -1531,10 +1531,10 @@ BOOL SwCntntNode::SetAttr(const SfxPoolItem& rAttr )
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// wenn Modify gelockt ist, werden keine Modifies verschickt
if( IsModifyLocked() ||
( !GetDepends() && RES_PARATR_NUMRULE != rAttr.Which() ))
@@ -1556,16 +1556,16 @@ BOOL SwCntntNode::SetAttr(const SfxPoolItem& rAttr )
}
#include <svl/itemiter.hxx>
-BOOL SwCntntNode::SetAttr( const SfxItemSet& rSet )
+sal_Bool SwCntntNode::SetAttr( const SfxItemSet& rSet )
{
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
const SfxPoolItem* pFnd = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_AUTO_STYLE, FALSE, &pFnd ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_AUTO_STYLE, sal_False, &pFnd ) )
{
ASSERT( rSet.Count() == 1, "SetAutoStyle mixed with other attributes?!" );
const SwFmtAutoFmt* pTmp = static_cast<const SwFmtAutoFmt*>(pFnd);
@@ -1594,24 +1594,24 @@ BOOL SwCntntNode::SetAttr( const SfxItemSet& rSet )
// the string is empty.
const SfxPoolItem* pNameItem = 0;
if ( 0 != GetCondFmtColl() ||
- SFX_ITEM_SET != mpAttrSet->GetItemState( RES_FRMATR_STYLE_NAME, FALSE, &pNameItem ) ||
+ SFX_ITEM_SET != mpAttrSet->GetItemState( RES_FRMATR_STYLE_NAME, sal_False, &pNameItem ) ||
0 == static_cast<const SfxStringItem*>(pNameItem)->GetValue().Len() )
AttrSetHandleHelper::SetParent( mpAttrSet, *this, &GetAnyFmtColl(), GetFmtColl() );
else
const_cast<SfxItemSet*>(mpAttrSet.get())->SetParent( &GetFmtColl()->GetAttrSet() );
}
- return TRUE;
+ return sal_True;
}
if( !GetpSwAttrSet() ) // lasse von den entsprechenden Nodes die
NewAttrSet( GetDoc()->GetAttrPool() ); // AttrSets anlegen
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// wenn Modify gelockt ist, werden keine Modifies verschickt
if ( IsModifyLocked() ||
( !GetDepends() &&
- SFX_ITEM_SET != rSet.GetItemState( RES_PARATR_NUMRULE, FALSE ) ) )
+ SFX_ITEM_SET != rSet.GetItemState( RES_PARATR_NUMRULE, sal_False ) ) )
{
// einige Sonderbehandlungen fuer Attribute
bRet = 0 != AttrSetHandleHelper::Put( mpAttrSet, *this, rSet );
@@ -1634,24 +1634,24 @@ BOOL SwCntntNode::SetAttr( const SfxItemSet& rSet )
// Nimmt den Hint mit nWhich aus dem Delta-Array
-BOOL SwCntntNode::ResetAttr( USHORT nWhich1, USHORT nWhich2 )
+sal_Bool SwCntntNode::ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
{
if( !GetpSwAttrSet() )
- return FALSE;
+ return sal_False;
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
// wenn Modify gelockt ist, werden keine Modifies verschickt
if( IsModifyLocked() )
{
- USHORT nDel = 0;
+ sal_uInt16 nDel = 0;
if ( !nWhich2 || nWhich2 < nWhich1 )
{
- std::vector<USHORT> aClearWhichIds;
+ std::vector<sal_uInt16> aClearWhichIds;
aClearWhichIds.push_back( nWhich1 );
nDel = ClearItemsFromAttrSet( aClearWhichIds );
}
@@ -1669,7 +1669,7 @@ BOOL SwCntntNode::ResetAttr( USHORT nWhich1, USHORT nWhich2 )
SwAttrSet aOld( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() ),
aNew( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() );
- BOOL bRet = 0 != AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, nWhich1, nWhich2, &aOld, &aNew );
+ sal_Bool bRet = 0 != AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, nWhich1, nWhich2, &aOld, &aNew );
if( bRet )
{
@@ -1682,23 +1682,23 @@ BOOL SwCntntNode::ResetAttr( USHORT nWhich1, USHORT nWhich2 )
}
return bRet;
}
-BOOL SwCntntNode::ResetAttr( const SvUShorts& rWhichArr )
+sal_Bool SwCntntNode::ResetAttr( const SvUShorts& rWhichArr )
{
if( !GetpSwAttrSet() )
- return FALSE;
+ return sal_False;
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
// wenn Modify gelockt ist, werden keine Modifies verschickt
- USHORT nDel = 0;
+ sal_uInt16 nDel = 0;
if( IsModifyLocked() )
{
- std::vector<USHORT> aClearWhichIds;
- for( USHORT n = 0, nEnd = rWhichArr.Count(); n < nEnd; ++n )
+ std::vector<sal_uInt16> aClearWhichIds;
+ for( sal_uInt16 n = 0, nEnd = rWhichArr.Count(); n < nEnd; ++n )
aClearWhichIds.push_back( rWhichArr[ n ] );
nDel = ClearItemsFromAttrSet( aClearWhichIds );
@@ -1708,7 +1708,7 @@ BOOL SwCntntNode::ResetAttr( const SvUShorts& rWhichArr )
SwAttrSet aOld( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() ),
aNew( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() );
- for( USHORT n = 0, nEnd = rWhichArr.Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = rWhichArr.Count(); n < nEnd; ++n )
if( AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, rWhichArr[ n ], &aOld, &aNew ))
++nDel;
@@ -1725,7 +1725,7 @@ BOOL SwCntntNode::ResetAttr( const SvUShorts& rWhichArr )
}
-USHORT SwCntntNode::ResetAllAttr()
+sal_uInt16 SwCntntNode::ResetAllAttr()
{
if( !GetpSwAttrSet() )
return 0;
@@ -1733,15 +1733,15 @@ USHORT SwCntntNode::ResetAllAttr()
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
// wenn Modify gelockt ist, werden keine Modifies verschickt
if( IsModifyLocked() )
{
- std::vector<USHORT> aClearWhichIds;
+ std::vector<sal_uInt16> aClearWhichIds;
aClearWhichIds.push_back(0);
- USHORT nDel = ClearItemsFromAttrSet( aClearWhichIds );
+ sal_uInt16 nDel = ClearItemsFromAttrSet( aClearWhichIds );
if( !GetpSwAttrSet()->Count() ) // leer, dann loeschen
mpAttrSet.reset(); // DELETEZ( mpAttrSet );
return nDel;
@@ -1749,7 +1749,7 @@ USHORT SwCntntNode::ResetAllAttr()
SwAttrSet aOld( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() ),
aNew( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() );
- BOOL bRet = 0 != AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, 0, &aOld, &aNew );
+ sal_Bool bRet = 0 != AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, 0, &aOld, &aNew );
if( bRet )
{
@@ -1764,28 +1764,28 @@ USHORT SwCntntNode::ResetAllAttr()
}
-BOOL SwCntntNode::GetAttr( SfxItemSet& rSet, BOOL bInParent ) const
+sal_Bool SwCntntNode::GetAttr( SfxItemSet& rSet, sal_Bool bInParent ) const
{
if( rSet.Count() )
rSet.ClearItem();
const SwAttrSet& rAttrSet = GetSwAttrSet();
if( bInParent )
- return rSet.Set( rAttrSet, TRUE ) ? TRUE : FALSE;
+ return rSet.Set( rAttrSet, sal_True ) ? sal_True : sal_False;
rSet.Put( rAttrSet );
- return rSet.Count() ? TRUE : FALSE;
+ return rSet.Count() ? sal_True : sal_False;
}
-USHORT SwCntntNode::ClearItemsFromAttrSet( const std::vector<USHORT>& rWhichIds )
+sal_uInt16 SwCntntNode::ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rWhichIds )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if ( 0 == rWhichIds.size() )
return nRet;
ASSERT( GetpSwAttrSet(), "no item set" )
SwAttrSet aNewAttrSet( *GetpSwAttrSet() );
- for ( std::vector<USHORT>::const_iterator aIter = rWhichIds.begin();
+ for ( std::vector<sal_uInt16>::const_iterator aIter = rWhichIds.begin();
aIter != rWhichIds.end();
++aIter )
{
@@ -1797,14 +1797,14 @@ USHORT SwCntntNode::ClearItemsFromAttrSet( const std::vector<USHORT>& rWhichIds
return nRet;
}
-const SfxPoolItem* SwCntntNode::GetNoCondAttr( USHORT nWhich,
- BOOL bInParents ) const
+const SfxPoolItem* SwCntntNode::GetNoCondAttr( sal_uInt16 nWhich,
+ sal_Bool bInParents ) const
{
const SfxPoolItem* pFnd = 0;
if( pCondColl && pCondColl->GetRegisteredIn() )
{
if( !GetpSwAttrSet() || ( SFX_ITEM_SET != GetpSwAttrSet()->GetItemState(
- nWhich, FALSE, &pFnd ) && bInParents ))
+ nWhich, sal_False, &pFnd ) && bInParents ))
((SwFmt*)GetRegisteredIn())->GetItemState( nWhich, bInParents, &pFnd );
}
// --> OD 2005-10-25 #126347# - undo change of issue #i51029#
@@ -1824,7 +1824,7 @@ const SfxPoolItem* SwCntntNode::GetNoCondAttr( USHORT nWhich,
int SwCntntNode::CanJoinNext( SwNodeIndex* pIdx ) const
{
const SwNodes& rNds = GetNodes();
- BYTE nNdType = GetNodeType();
+ sal_uInt8 nNdType = GetNodeType();
SwNodeIndex aIdx( *this, 1 );
const SwNode* pNd = this;
@@ -1834,7 +1834,7 @@ int SwCntntNode::CanJoinNext( SwNodeIndex* pIdx ) const
aIdx++;
if( pNd->GetNodeType() != nNdType || rNds.Count()-1 == aIdx.GetIndex() )
- return FALSE;
+ return sal_False;
if( IsTxtNode() )
{ // Do not merge strings if the result exceeds the allowed string length
const SwTxtNode* pTxtNd = static_cast<const SwTxtNode*>(this);
@@ -1842,11 +1842,11 @@ int SwCntntNode::CanJoinNext( SwNodeIndex* pIdx ) const
pTxtNd = static_cast<const SwTxtNode*>(pNd);
nSum += pTxtNd->GetTxt().Len();
if( nSum > STRING_LEN )
- return FALSE;
+ return sal_False;
}
if( pIdx )
*pIdx = aIdx;
- return TRUE;
+ return sal_True;
}
@@ -1854,7 +1854,7 @@ int SwCntntNode::CanJoinNext( SwNodeIndex* pIdx ) const
// in pIdx kann die 2. Position returnt werden.
int SwCntntNode::CanJoinPrev( SwNodeIndex* pIdx ) const
{
- BYTE nNdType = GetNodeType();
+ sal_uInt8 nNdType = GetNodeType();
SwNodeIndex aIdx( *this, -1 );
const SwNode* pNd = this;
@@ -1864,10 +1864,10 @@ int SwCntntNode::CanJoinPrev( SwNodeIndex* pIdx ) const
aIdx--;
if( pNd->GetNodeType() != nNdType || 0 == aIdx.GetIndex() )
- return FALSE;
+ return sal_False;
if( pIdx )
*pIdx = aIdx;
- return TRUE;
+ return sal_True;
}
@@ -1900,13 +1900,13 @@ void SwCntntNode::SetCondFmtColl( SwFmtColl* pColl )
if( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
}
}
-BOOL SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
+sal_Bool SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
{
const SwNodes& rNds = GetNodes();
{
@@ -1941,7 +1941,7 @@ BOOL SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
const SwTxtFtn* pTxtFtn;
const SwNode* pSrchNd = pSttNd;
- for( USHORT n = 0; n < rFtnArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFtnArr.Count(); ++n )
if( 0 != ( pTxtFtn = rFtnArr[ n ])->GetStartNode() &&
pSrchNd == &pTxtFtn->GetStartNode()->GetNode() )
{
@@ -1960,7 +1960,7 @@ BOOL SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
if( nCond )
{
rTmp.SetCondition( (Master_CollConditions)nCond, 0 );
- return TRUE;
+ return sal_True;
}
pSttNd = pSttNd->GetIndex()
? pSttNd->StartOfSectionNode()
@@ -1969,7 +1969,7 @@ BOOL SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
}
{
- USHORT nPos;
+ sal_uInt16 nPos;
const SwOutlineNodes& rOutlNds = rNds.GetOutLineNds();
if( rOutlNds.Count() )
{
@@ -1983,13 +1983,13 @@ BOOL SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
if( pOutlNd->IsOutline())
{
rTmp.SetCondition( PARA_IN_OUTLINE, pOutlNd->GetAttrOutlineLevel() - 1 );
- return TRUE;
+ return sal_True;
}
}
}
}
- return FALSE;
+ return sal_False;
}
@@ -2049,7 +2049,7 @@ short SwCntntNode::GetTextDirection( const SwPosition& rPos,
// --> OD 2007-01-10 #i72024#
// No format of the frame, because this can cause recursive layout actions
- SwFrm* pFrm = GetFrm( &aPt, &rPos, FALSE );
+ SwFrm* pFrm = GetFrm( &aPt, &rPos, sal_False );
// <--
if ( pFrm )
@@ -2114,10 +2114,10 @@ IDocumentListItems& SwNode::getIDocumentListItems()
}
// <--
-BOOL SwNode::IsInRedlines() const
+sal_Bool SwNode::IsInRedlines() const
{
const SwDoc * pDoc = GetDoc();
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
if (pDoc != NULL)
bResult = pDoc->IsInRedlines(*this);
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx
index cce0919e1e1a..ca80bc391c7a 100644
--- a/sw/source/core/docnode/node2lay.cxx
+++ b/sw/source/core/docnode/node2lay.cxx
@@ -51,34 +51,34 @@ class SwNode2LayImpl
{
SwClientIter *pIter; // Der eigentliche Iterator
SvPtrarr *pUpperFrms;// Zum Einsammeln der Upper
- ULONG nIndex; // Der Index des einzufuegenden Nodes
- BOOL bMaster : 1; // TRUE => nur Master , FALSE => nur Frames ohne Follow
- BOOL bInit : 1; // Ist am SwClient bereits ein First()-Aufruf erfolgt?
+ sal_uLong nIndex; // Der Index des einzufuegenden Nodes
+ sal_Bool bMaster : 1; // sal_True => nur Master , sal_False => nur Frames ohne Follow
+ sal_Bool bInit : 1; // Ist am SwClient bereits ein First()-Aufruf erfolgt?
public:
- SwNode2LayImpl( const SwNode& rNode, ULONG nIdx, BOOL bSearch );
+ SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, sal_Bool bSearch );
~SwNode2LayImpl() { delete pIter; delete pUpperFrms; }
SwFrm* NextFrm(); // liefert den naechsten "sinnvollen" Frame
SwLayoutFrm* UpperFrm( SwFrm* &rpFrm, const SwNode &rNode );
void SaveUpperFrms(); // Speichert (und lockt ggf.) die pUpper
// Fuegt unter jeden pUpper des Arrays einen Frame ein.
- void RestoreUpperFrms( SwNodes& rNds, ULONG nStt, ULONG nEnd );
+ void RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd );
SwFrm* GetFrm( const Point* pDocPos = 0,
const SwPosition *pPos = 0,
- const BOOL bCalcFrm = TRUE ) const;
+ const sal_Bool bCalcFrm = sal_True ) const;
};
/* -----------------25.02.99 10:38-------------------
* Hauptaufgabe des Ctor: Das richtige SwModify zu ermitteln,
* ueber das iteriert wird.
- * Uebergibt man bSearch == TRUE, so wird der naechste Cntnt- oder TableNode
+ * Uebergibt man bSearch == sal_True, so wird der naechste Cntnt- oder TableNode
* gesucht, der Frames besitzt ( zum Einsammeln der pUpper ), ansonsten wird
* erwartet, das rNode bereits auf einem solchen Cntnt- oder TableNode sitzt,
* vor oder hinter den eingefuegt werden soll.
* --------------------------------------------------*/
-SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, ULONG nIdx, BOOL bSearch )
- : pUpperFrms( NULL ), nIndex( nIdx ), bInit( FALSE )
+SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, sal_Bool bSearch )
+ : pUpperFrms( NULL ), nIndex( nIdx ), bInit( sal_False )
{
const SwNode* pNd;
if( bSearch || rNode.IsSectionNode() )
@@ -91,13 +91,13 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, ULONG nIdx, BOOL bSearch )
pNd = rNode.GetNodes().GoPreviousWithFrm( &aTmp );
if( !bSearch && pNd && rNode.GetIndex() > pNd->GetIndex() )
pNd = NULL; // Nicht ueber den Bereich hinausschiessen
- bMaster = FALSE;
+ bMaster = sal_False;
}
else
{
SwNodeIndex aTmp( rNode, -1 );
pNd = rNode.GetNodes().GoNextWithFrm( &aTmp );
- bMaster = TRUE;
+ bMaster = sal_True;
if( !bSearch && pNd && rNode.EndOfSectionIndex() < pNd->GetIndex() )
pNd = NULL; // Nicht ueber den Bereich hinausschiessen
}
@@ -138,11 +138,11 @@ SwFrm* SwNode2LayImpl::NextFrm()
{
SwFrm* pRet;
if( !pIter )
- return FALSE;
+ return sal_False;
if( !bInit )
{
pRet = (SwFrm*)pIter->First(TYPE(SwFrm));
- bInit = TRUE;
+ bInit = sal_True;
}
else
pRet = (SwFrm*)pIter->Next();
@@ -277,19 +277,19 @@ SwLayoutFrm* SwNode2LayImpl::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode )
return pUpper;
}
-void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, ULONG nStt, ULONG nEnd )
+void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd )
{
ASSERT( pUpperFrms, "RestoreUpper without SaveUpper?" )
SwNode* pNd;
SwDoc *pDoc = rNds.GetDoc();
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
for( ; nStt < nEnd; ++nStt )
{
SwFrm* pNew = 0;
SwFrm* pNxt;
SwLayoutFrm* pUp;
if( (pNd = rNds[nStt])->IsCntntNode() )
- for( USHORT n = 0; n < pUpperFrms->Count(); )
+ for( sal_uInt16 n = 0; n < pUpperFrms->Count(); )
{
pNxt = (SwFrm*)(*pUpperFrms)[n++];
if( bFirst && pNxt && pNxt->IsSctFrm() )
@@ -304,7 +304,7 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, ULONG nStt, ULONG nEnd )
(*pUpperFrms)[n-2] = pNew;
}
else if( pNd->IsTableNode() )
- for( USHORT x = 0; x < pUpperFrms->Count(); )
+ for( sal_uInt16 x = 0; x < pUpperFrms->Count(); )
{
pNxt = (SwFrm*)(*pUpperFrms)[x++];
if( bFirst && pNxt && pNxt->IsSctFrm() )
@@ -323,21 +323,21 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, ULONG nStt, ULONG nEnd )
else if( pNd->IsSectionNode() )
{
nStt = pNd->EndOfSectionIndex();
- for( USHORT x = 0; x < pUpperFrms->Count(); )
+ for( sal_uInt16 x = 0; x < pUpperFrms->Count(); )
{
pNxt = (SwFrm*)(*pUpperFrms)[x++];
if( bFirst && pNxt && pNxt->IsSctFrm() )
((SwSectionFrm*)pNxt)->UnlockJoin();
pUp = (SwLayoutFrm*)(*pUpperFrms)[x++];
ASSERT( pUp->GetUpper() || pUp->IsFlyFrm(), "Lost Upper" );
- ::_InsertCnt( pUp, pDoc, pNd->GetIndex(), FALSE, nStt+1, pNxt );
+ ::_InsertCnt( pUp, pDoc, pNd->GetIndex(), sal_False, nStt+1, pNxt );
pNxt = pUp->GetLastLower();
(*pUpperFrms)[x-2] = pNxt;
}
}
- bFirst = FALSE;
+ bFirst = sal_False;
}
- for( USHORT x = 0; x < pUpperFrms->Count(); ++x )
+ for( sal_uInt16 x = 0; x < pUpperFrms->Count(); ++x )
{
SwFrm* pTmp = (SwFrm*)(*pUpperFrms)[++x];
if( pTmp->IsFtnFrm() )
@@ -356,25 +356,25 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, ULONG nStt, ULONG nEnd )
SwFrm* SwNode2LayImpl::GetFrm( const Point* pDocPos,
const SwPosition *pPos,
- const BOOL bCalcFrm ) const
+ const sal_Bool bCalcFrm ) const
{
return pIter ? ::GetFrmOfModify( pIter->GetModify(), USHRT_MAX,
pDocPos, pPos, bCalcFrm )
: 0;
}
-SwNode2Layout::SwNode2Layout( const SwNode& rNd, ULONG nIdx )
+SwNode2Layout::SwNode2Layout( const SwNode& rNd, sal_uLong nIdx )
{
- pImpl = new SwNode2LayImpl( rNd, nIdx, FALSE );
+ pImpl = new SwNode2LayImpl( rNd, nIdx, sal_False );
}
SwNode2Layout::SwNode2Layout( const SwNode& rNd )
{
- pImpl = new SwNode2LayImpl( rNd, rNd.GetIndex(), TRUE );
+ pImpl = new SwNode2LayImpl( rNd, rNd.GetIndex(), sal_True );
pImpl->SaveUpperFrms();
}
-void SwNode2Layout::RestoreUpperFrms( SwNodes& rNds, ULONG nStt, ULONG nEnd )
+void SwNode2Layout::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd )
{
ASSERT( pImpl, "RestoreUpperFrms without SaveUpperFrms" );
pImpl->RestoreUpperFrms( rNds, nStt, nEnd );
@@ -397,7 +397,7 @@ SwNode2Layout::~SwNode2Layout()
SwFrm* SwNode2Layout::GetFrm( const Point* pDocPos,
const SwPosition *pPos,
- const BOOL bCalcFrm ) const
+ const sal_Bool bCalcFrm ) const
{
return pImpl->GetFrm( pDocPos, pPos, bCalcFrm );
}
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 1d387df76063..0f704cd8a1cf 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -50,8 +50,8 @@
#include <docsh.hxx>
#include <svl/smplhint.hxx>
-extern BOOL CheckNodesRange( const SwNodeIndex& rStt,
- const SwNodeIndex& rEnd, BOOL bChkSection );
+extern sal_Bool CheckNodesRange( const SwNodeIndex& rStt,
+ const SwNodeIndex& rEnd, sal_Bool bChkSection );
SV_DECL_PTRARR(SwSttNdPtrs,SwStartNode*,2,2)
@@ -64,7 +64,7 @@ SV_DECL_PTRARR(SwSttNdPtrs,SwStartNode*,2,2)
// Funktion zum bestimmen des hoechsten Levels innerhalb des Bereiches
-USHORT HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange );
+sal_uInt16 HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange );
//-----------------------------------------------------------------------
@@ -78,11 +78,11 @@ USHORT HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange );
SwNodes::SwNodes( SwDoc* pDocument )
: pRoot( 0 ), pMyDoc( pDocument )
{
- bInNodesDel = bInDelUpdOutl = bInDelUpdNum = FALSE;
+ bInNodesDel = bInDelUpdOutl = bInDelUpdNum = sal_False;
ASSERT( pMyDoc, "in welchem Doc stehe ich denn?" );
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SwStartNode* pSttNd = new SwStartNode( *this, nPos++ );
pEndOfPostIts = new SwEndNode( *this, nPos++, *pSttNd );
@@ -129,7 +129,7 @@ SwNodes::~SwNodes()
{
SwNode *pNode;
SwNodeIndex aNdIdx( *this );
- while( TRUE )
+ while( sal_True )
{
pNode = &aNdIdx.GetNode();
if( pNode == pEndOfContent )
@@ -144,8 +144,8 @@ SwNodes::~SwNodes()
delete pEndOfContent;
}
-void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
- SwNodeIndex& rInsPos, BOOL bNewFrms )
+void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
+ SwNodeIndex& rInsPos, sal_Bool bNewFrms )
{
// im UndoBereich brauchen wir keine Frames
SwNodes& rNds = rInsPos.GetNodes();
@@ -153,13 +153,13 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
//JP 03.02.99: alle Felder als invalide erklaeren, aktu. erfolgt im
// Idle-Handler des Docs
- if( GetDoc()->SetFieldsDirty( TRUE, &rDelPos.GetNode(), nSz ) &&
+ if( GetDoc()->SetFieldsDirty( sal_True, &rDelPos.GetNode(), nSz ) &&
rNds.GetDoc() != GetDoc() )
rNds.GetDoc()->SetFieldsDirty( true, NULL, 0 );
//JP 12.03.99: 63293 - Nodes vom RedlineBereich NIE aufnehmen
- ULONG nNd = rInsPos.GetIndex();
- BOOL bInsOutlineIdx = !(
+ sal_uLong nNd = rInsPos.GetIndex();
+ sal_Bool bInsOutlineIdx = !(
rNds.GetEndOfRedlines().StartOfSectionNode()->GetIndex() < nNd &&
nNd < rNds.GetEndOfRedlines().GetIndex() );
@@ -167,9 +167,9 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
{
// wird von vorne nach hinten gemovt, so wird nach vorne immer
// nachgeschoben, d.H. die Loeschposition ist immer gleich
- USHORT nDiff = rDelPos.GetIndex() < rInsPos.GetIndex() ? 0 : 1;
+ sal_uInt16 nDiff = rDelPos.GetIndex() < rInsPos.GetIndex() ? 0 : 1;
- for( ULONG n = rDelPos.GetIndex(); nSz; n += nDiff, --nSz )
+ for( sal_uLong n = rDelPos.GetIndex(); nSz; n += nDiff, --nSz )
{
SwNodeIndex aDelIdx( *this, n );
SwNode& rNd = aDelIdx.GetNode();
@@ -230,11 +230,11 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
int bRestPersData = GetDoc()->GetUndoNds() == this;
SwDoc* pDestDoc = rNds.GetDoc() != GetDoc() ? rNds.GetDoc() : 0;
if( !bRestPersData && !bSavePersData && pDestDoc )
- bSavePersData = bRestPersData = TRUE;
+ bSavePersData = bRestPersData = sal_True;
String sNumRule;
SwNodeIndex aInsPos( rInsPos );
- for( ULONG n = 0; n < nSz; n++ )
+ for( sal_uLong n = 0; n < nSz; n++ )
{
SwNode* pNd = &rDelPos.GetNode();
@@ -262,7 +262,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
sNumRule = pNumRule->GetName();
SwNumRule* pDestRule = pDestDoc->FindNumRulePtr( sNumRule );
if( pDestRule )
- pDestRule->SetInvalidRule( TRUE );
+ pDestRule->SetInvalidRule( sal_True );
else
pDestDoc->MakeNumRule( sNumRule, pNumRule );
}
@@ -278,7 +278,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
// <--
}
- RemoveNode( rDelPos.GetIndex(), 1, FALSE ); // Indizies verschieben !!
+ RemoveNode( rDelPos.GetIndex(), 1, sal_False ); // Indizies verschieben !!
SwCntntNode * pCNd = pNd->GetCntntNode();
rNds.InsertNode( pNd, aInsPos );
@@ -306,9 +306,9 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
if( pHts && pHts->Count() )
{
int bToUndo = &pDestDoc->GetNodes() != &rNds;
- for( USHORT i = pHts->Count(); i; )
+ for( sal_uInt16 i = pHts->Count(); i; )
{
- USHORT nDelMsg = 0;
+ sal_uInt16 nDelMsg = 0;
SwTxtAttr * const pAttr = pHts->GetTextHint( --i );
switch ( pAttr->Which() )
{
@@ -408,7 +408,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
{
ASSERT( !this, "ob das so richtig ist ??" );
aFrmNdIdx = rNds.GetEndOfContent();
- pFrmNd = rNds.GoPrevSection( &aFrmNdIdx, TRUE, FALSE );
+ pFrmNd = rNds.GoPrevSection( &aFrmNdIdx, sal_True, sal_False );
if( pFrmNd && !((SwCntntNode*)pFrmNd)->GetDepends() )
pFrmNd = 0;
@@ -457,14 +457,14 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
|*
***********************************************************************/
-BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
- const SwNodeIndex& aIndex, BOOL bNewFrms )
+sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
+ const SwNodeIndex& aIndex, sal_Bool bNewFrms )
{
SwNode * pAktNode;
if( aIndex == 0 ||
( (pAktNode = &aIndex.GetNode())->GetStartNode() &&
!pAktNode->StartOfSectionIndex() ))
- return FALSE;
+ return sal_False;
SwNodeRange aRg( aRange );
@@ -487,18 +487,18 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
// wird im selben Array's verschoben, dann ueberpruefe die Einfuegepos.
if( aRg.aStart >= aRg.aEnd )
- return FALSE;
+ return sal_False;
if( this == &rNodes )
{
if( ( aIndex.GetIndex()-1 >= aRg.aStart.GetIndex() &&
aIndex.GetIndex()-1 < aRg.aEnd.GetIndex()) ||
( aIndex.GetIndex()-1 == aRg.aEnd.GetIndex() ) )
- return FALSE;
+ return sal_False;
}
- USHORT nLevel = 0; // Level-Counter
- ULONG nInsPos = 0; // Cnt fuer das TmpArray
+ sal_uInt16 nLevel = 0; // Level-Counter
+ sal_uLong nInsPos = 0; // Cnt fuer das TmpArray
// das Array bildet einen Stack, es werden alle StartOfSelction's gesichert
SwSttNdPtrs aSttNdStack( 1, 5 );
@@ -507,7 +507,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
SwNodeIndex aIdx( aIndex );
/*
--- JP 17.11.94: sollte ueberholt sein, wird im ChgNode schon erledigt!
- BOOL bCorrNum = pSect && pSect->aStart.GetIndex() == aIdx.GetIndex();
+ sal_Bool bCorrNum = pSect && pSect->aStart.GetIndex() == aIdx.GetIndex();
*/
SwStartNode* pStartNode = aIdx.GetNode().pStartOfSection;
@@ -516,8 +516,8 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
SwNodeRange aOrigInsPos( aIdx, -1, aIdx ); // Originale Insert Pos
//JP 16.01.98: SectionNodes: DelFrms/MakeFrms beim obersten SectionNode!
- USHORT nSectNdCnt = 0;
- BOOL bSaveNewFrms = bNewFrms;
+ sal_uInt16 nSectNdCnt = 0;
+ sal_Bool bSaveNewFrms = bNewFrms;
// bis alles verschoben ist
while( aRg.aStart < aRg.aEnd )
@@ -546,8 +546,8 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
aRg.aEnd -= nInsPos;
//JP 12.03.99: 63293 - Nodes vom RedlineBereich NIE aufnehmen
- ULONG nNd = aIdx.GetIndex();
- BOOL bInsOutlineIdx = !( rNodes.GetEndOfRedlines().
+ sal_uLong nNd = aIdx.GetIndex();
+ sal_Bool bInsOutlineIdx = !( rNodes.GetEndOfRedlines().
StartOfSectionNode()->GetIndex() < nNd &&
nNd < rNodes.GetEndOfRedlines().GetIndex() );
@@ -559,7 +559,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
// dann bewege alle Start/End/ContentNodes. Loesche
// bei den ContentNodes auch die Frames !!
pTblNd->pStartOfSection = aIdx.GetNode().pStartOfSection;
- for( ULONG n = 0; n < nInsPos; ++n )
+ for( sal_uLong n = 0; n < nInsPos; ++n )
{
SwNodeIndex aMvIdx( aRg.aEnd, 1 );
SwCntntNode* pCNd = 0;
@@ -606,7 +606,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
// (Array kopieren und alle gefunden wieder loeschen;
// erleichtert das suchen!!)
SwNodeIndex aMvIdx( aRg.aEnd, 1 );
- for( ULONG n = 0; n < nInsPos; ++n )
+ for( sal_uLong n = 0; n < nInsPos; ++n )
{
SwNode* pNd = &aMvIdx.GetNode();
/* if( bNewFrms )
@@ -617,7 +617,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
((SwSectionNode*)pNd)->DelFrms();
}
*/
- //BOOL bOutlNd = pNd->IsTxtNode() && NO_NUMBERING !=//#outline level,zhaojianwei
+ //sal_Bool bOutlNd = pNd->IsTxtNode() && NO_NUMBERING !=//#outline level,zhaojianwei
// ((SwTxtNode*)pNd)->GetTxtColl()->GetOutlineLevel();
const bool bOutlNd = pNd->IsTxtNode() &&
0 != ((SwTxtNode*)pNd)->GetAttrOutlineLevel();//<-end,zhaojianwei
@@ -626,7 +626,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
if( bOutlNd )
pOutlineNds->Remove( pNd );
- RemoveNode( aMvIdx.GetIndex(), 1, FALSE );
+ RemoveNode( aMvIdx.GetIndex(), 1, sal_False );
pNd->pStartOfSection = pSttNode;
rNodes.InsertNode( pNd, aIdx );
@@ -712,7 +712,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
aRg.aEnd--;
aIdx--;
- } while( FALSE );
+ } while( sal_False );
}
else
{
@@ -727,14 +727,14 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
if( bNewFrms && pSctNd )
pSctNd->DelFrms();
- RemoveNode( aRg.aEnd.GetIndex(), 1, FALSE ); // EndNode loeschen
- ULONG nSttPos = pSttNd->GetIndex();
+ RemoveNode( aRg.aEnd.GetIndex(), 1, sal_False ); // EndNode loeschen
+ sal_uLong nSttPos = pSttNd->GetIndex();
// dieser StartNode wird spaeter wieder entfernt!
SwStartNode* pTmpSttNd = new SwStartNode( *this, nSttPos+1 );
pTmpSttNd->pStartOfSection = pSttNd->pStartOfSection;
- RemoveNode( nSttPos, 1, FALSE ); // SttNode loeschen
+ RemoveNode( nSttPos, 1, sal_False ); // SttNode loeschen
pSttNd->pStartOfSection = aIdx.GetNode().pStartOfSection;
rNodes.InsertNode( pSttNd, aIdx );
@@ -752,7 +752,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
{
pSctNd->NodesArrChgd();
++nSectNdCnt;
- bNewFrms = FALSE;
+ bNewFrms = sal_False;
}
}
}
@@ -811,7 +811,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
aRg.aEnd++;
{
SwNodeIndex aCntIdx( aRg.aEnd );
- for( ULONG n = 0; n < nInsPos; n++, aCntIdx++)
+ for( sal_uLong n = 0; n < nInsPos; n++, aCntIdx++)
aCntIdx.GetNode().pStartOfSection = pTmpStt;
}
@@ -847,8 +847,8 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
nInsPos = 0;
// loesche nur noch den Pointer aus dem Nodes-Array.
-// RemoveNode( aRg.aEnd.GetIndex(), 1, FALSE );
- RemoveNode( aRg.aEnd.GetIndex(), 1, TRUE );
+// RemoveNode( aRg.aEnd.GetIndex(), 1, sal_False );
+ RemoveNode( aRg.aEnd.GetIndex(), 1, sal_True );
aRg.aEnd--;
SwSectionNode* pSectNd = aSttNdStack[ nLevel ]->GetSectionNode();
@@ -918,13 +918,13 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
}
}
else {
- ASSERT( FALSE, "wie kommt diser Node ins Nodes-Array??" );
+ ASSERT( sal_False, "wie kommt diser Node ins Nodes-Array??" );
}
aRg.aEnd--;
break;
default:
- ASSERT( FALSE, "was ist das fuer ein Node??" );
+ ASSERT( sal_False, "was ist das fuer ein Node??" );
break;
}
@@ -973,7 +973,7 @@ extern Writer* GetDebugWriter(const String&);
}
#endif
- return TRUE;
+ return sal_True;
}
@@ -1119,8 +1119,8 @@ void SwNodes::SectionUp(SwNodeRange *pRange)
{
// dann wurde paarig aufgehoben, also nur die im Berich neu anpassen
SwStartNode* pTmpSttNd = pAktNode->pStartOfSection;
- RemoveNode( pRange->aStart.GetIndex(), 1, TRUE );
- RemoveNode( pRange->aEnd.GetIndex(), 1, TRUE );
+ RemoveNode( pRange->aStart.GetIndex(), 1, sal_True );
+ RemoveNode( pRange->aEnd.GetIndex(), 1, sal_True );
SwNodeIndex aTmpIdx( pRange->aStart );
while( aTmpIdx < pRange->aEnd )
@@ -1236,7 +1236,7 @@ void SwNodes::SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEn
|* SwIndex &rIndex bezeichnet die Position, an der
|* geloescht wird
|* rIndex ist nach Aufruf der Funktion unveraendert (Kopie?!)
-|* USHORT nNodes bezeichnet die Anzahl der zu loeschenden
+|* sal_uInt16 nNodes bezeichnet die Anzahl der zu loeschenden
|* Nodes; ist auf 1 defaulted
|*
|* Debug-Funktionen
@@ -1250,12 +1250,12 @@ void SwNodes::SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEn
|* VER0100 vb 901214
|*
*******************************************************************/
-void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
+void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes)
{
- USHORT nLevel = 0; // Level-Counter
+ sal_uInt16 nLevel = 0; // Level-Counter
SwNode * pAktNode;
- ULONG nCnt = Count() - rIndex.GetIndex() - 1;
+ sal_uLong nCnt = Count() - rIndex.GetIndex() - 1;
if( nCnt > nNodes ) nCnt = nNodes;
if( nCnt == 0 ) // keine Anzahl -> return
@@ -1281,9 +1281,9 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
// so ist aEnd <= aStart
aRg.aStart--;
- BOOL bSaveInNodesDel = bInNodesDel;
- bInNodesDel = TRUE;
- BOOL bUpdateOutline = FALSE;
+ sal_Bool bSaveInNodesDel = bInNodesDel;
+ bInNodesDel = sal_True;
+ sal_Bool bUpdateOutline = sal_False;
// bis alles geloescht ist
while( aRg.aStart < aRg.aEnd )
@@ -1300,7 +1300,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
pTblNd->DelFrms();
SwNode *pNd, *pChkNd = pAktNode->pStartOfSection;
- USHORT nIdxPos;
+ sal_uInt16 nIdxPos;
do {
pNd = &aRg.aEnd.GetNode();
@@ -1313,7 +1313,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
{
// loesche die Gliederungs-Indizies.
pOutlineNds->Remove( nIdxPos );
- bUpdateOutline = TRUE;
+ bUpdateOutline = sal_True;
}
((SwTxtNode*)pNd)->InvalidateNumRule();
}
@@ -1328,7 +1328,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
}
else
{
- RemoveNode( aRg.aEnd.GetIndex()+1, nCnt, TRUE ); // loesche
+ RemoveNode( aRg.aEnd.GetIndex()+1, nCnt, sal_True ); // loesche
nCnt = 0;
aRg.aEnd--; // vor den EndNode
nLevel++;
@@ -1342,13 +1342,13 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
{
// loesche jetzt das Array
aRg.aEnd++;
- RemoveNode( aRg.aEnd.GetIndex(), nCnt, TRUE );
+ RemoveNode( aRg.aEnd.GetIndex(), nCnt, sal_True );
nCnt = 0;
}
}
else // es werden alle Nodes Innerhalb eines Start- und
{ // End-Nodes geloescht, loesche mit Start/EndNode
- RemoveNode( aRg.aEnd.GetIndex(), nCnt + 2, TRUE ); // loesche Array
+ RemoveNode( aRg.aEnd.GetIndex(), nCnt + 2, sal_True ); // loesche Array
nCnt = 0;
nLevel--;
}
@@ -1375,7 +1375,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
if( pTxtNd->IsOutline())
{ // loesche die Gliederungs-Indizies.
pOutlineNds->Remove( pTxtNd );
- bUpdateOutline = TRUE;
+ bUpdateOutline = sal_True;
}
pTxtNd->InvalidateNumRule();
}
@@ -1389,7 +1389,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
aRg.aEnd++;
if( nCnt != 0 )
- RemoveNode( aRg.aEnd.GetIndex(), nCnt, TRUE ); // loesche den Rest
+ RemoveNode( aRg.aEnd.GetIndex(), nCnt, sal_True ); // loesche den Rest
// loesche alle leeren Start-/End-Node-Paare
while( aRg.aEnd.GetNode().GetEndNode() &&
@@ -1409,14 +1409,14 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
if( bUpdateOutline || bInDelUpdOutl )
{
UpdtOutlineIdx( aRg.aEnd.GetNode() );
- bInDelUpdOutl = FALSE;
+ bInDelUpdOutl = sal_False;
}
}
else
{
if( bUpdateOutline )
- bInDelUpdOutl = TRUE;
+ bInDelUpdOutl = sal_True;
}
}
@@ -1454,7 +1454,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
|* VER0100 vb 901214
|*
*******************************************************************/
-USHORT SwNodes::GetSectionLevel(const SwNodeIndex &rIdx) const {
+sal_uInt16 SwNodes::GetSectionLevel(const SwNodeIndex &rIdx) const {
// Sonderbehandlung 1. Node
if(rIdx == 0) return 1;
/*
@@ -1600,7 +1600,7 @@ SwNode* SwNodes::GoPreviousWithFrm(SwNodeIndex *pIdx) const
/*************************************************************************
|*
-|* BOOL SwNodes::CheckNodesRange()
+|* sal_Bool SwNodes::CheckNodesRange()
|*
|* Beschreibung
|* Teste ob der uebergene SRange nicht ueber die Grenzen der
@@ -1613,37 +1613,37 @@ SwNode* SwNodes::GoPreviousWithFrm(SwNodeIndex *pIdx) const
|*
|* Parameter SwIndex & Start-Index vom Bereich
|* SwIndex & End-Index vom Bereich
-|* BOOL TRUE: Start+End in gleicher Section!
-|* FALSE: Start+End in verschiedenen Sect.
-|* Return-Wert BOOL TRUE: gueltiger SRange
-|* FALSE: ungueltiger SRange
+|* sal_Bool sal_True: Start+End in gleicher Section!
+|* sal_False: Start+End in verschiedenen Sect.
+|* Return-Wert sal_Bool sal_True: gueltiger SRange
+|* sal_False: ungueltiger SRange
|*
|* Ersterstellung JP 23.04.91
|* Letzte Aenderung JP 18.06.92
|*
*************************************************************************/
-inline int TstIdx( ULONG nSttIdx, ULONG nEndIdx, ULONG nStt, ULONG nEnd )
+inline int TstIdx( sal_uLong nSttIdx, sal_uLong nEndIdx, sal_uLong nStt, sal_uLong nEnd )
{
return nStt < nSttIdx && nEnd >= nSttIdx &&
nStt < nEndIdx && nEnd >= nEndIdx;
}
-BOOL SwNodes::CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd ) const
+sal_Bool SwNodes::CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd ) const
{
- ULONG nStt = rStt.GetIndex(), nEnd = rEnd.GetIndex();
+ sal_uLong nStt = rStt.GetIndex(), nEnd = rEnd.GetIndex();
if( TstIdx( nStt, nEnd, pEndOfContent->StartOfSectionIndex(),
- pEndOfContent->GetIndex() )) return TRUE;
+ pEndOfContent->GetIndex() )) return sal_True;
if( TstIdx( nStt, nEnd, pEndOfAutotext->StartOfSectionIndex(),
- pEndOfAutotext->GetIndex() )) return TRUE;
+ pEndOfAutotext->GetIndex() )) return sal_True;
if( TstIdx( nStt, nEnd, pEndOfPostIts->StartOfSectionIndex(),
- pEndOfPostIts->GetIndex() )) return TRUE;
+ pEndOfPostIts->GetIndex() )) return sal_True;
if( TstIdx( nStt, nEnd, pEndOfInserts->StartOfSectionIndex(),
- pEndOfInserts->GetIndex() )) return TRUE;
+ pEndOfInserts->GetIndex() )) return sal_True;
if( TstIdx( nStt, nEnd, pEndOfRedlines->StartOfSectionIndex(),
- pEndOfRedlines->GetIndex() )) return TRUE;
+ pEndOfRedlines->GetIndex() )) return sal_True;
- return FALSE; // liegt irgendwo dazwischen, FEHLER
+ return sal_False; // liegt irgendwo dazwischen, FEHLER
}
@@ -1655,16 +1655,16 @@ BOOL SwNodes::CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd
|* Loesche aus den NodesArray ab einer Position entsprechend Node's.
|*
|* Parameter SwIndex & Der Startpunkt im Nodes-Array
-|* USHORT die Anzahl
+|* sal_uInt16 die Anzahl
|*
|* Ersterstellung JP 23.04.91
|* Letzte Aenderung JP 23.04.91
|*
*************************************************************************/
-void SwNodes::DelNodes( const SwNodeIndex & rStart, ULONG nCnt )
+void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt )
{
int bUpdateNum = 0;
- ULONG nSttIdx = rStart.GetIndex();
+ sal_uLong nSttIdx = rStart.GetIndex();
if( !nSttIdx && nCnt == GetEndOfContent().GetIndex()+1 )
{
@@ -1681,17 +1681,17 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, ULONG nCnt )
while( *ppEndNdArr )
{
nSttIdx = (*ppEndNdArr)->StartOfSectionIndex() + 1;
- ULONG nEndIdx = (*ppEndNdArr)->GetIndex();
+ sal_uLong nEndIdx = (*ppEndNdArr)->GetIndex();
if( nSttIdx != nEndIdx )
- RemoveNode( nSttIdx, nEndIdx - nSttIdx, TRUE );
+ RemoveNode( nSttIdx, nEndIdx - nSttIdx, sal_True );
++ppEndNdArr;
}
}
else
{
- for( ULONG n = nSttIdx, nEnd = nSttIdx + nCnt; n < nEnd; ++n )
+ for( sal_uLong n = nSttIdx, nEnd = nSttIdx + nCnt; n < nEnd; ++n )
{
SwNode* pNd = (*this)[ n ];
@@ -1699,7 +1699,7 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, ULONG nCnt )
//NO_NUMBERING != ((SwTxtNode*)pNd)->GetTxtColl()->GetOutlineLevel() )//#outline level,zhaojianwei
0 != ((SwTxtNode*)pNd)->GetAttrOutlineLevel() ) //<-end,zhaojianwei
{ // loesche die Gliederungs-Indizies.
- USHORT nIdxPos;
+ sal_uInt16 nIdxPos;
if( pOutlineNds->Seek_Entry( pNd, &nIdxPos ))
{
pOutlineNds->Remove( nIdxPos );
@@ -1712,7 +1712,7 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, ULONG nCnt )
((SwCntntNode*)pNd)->DelFrms();
}
}
- RemoveNode( nSttIdx, nCnt, TRUE );
+ RemoveNode( nSttIdx, nCnt, sal_True );
// rufe noch das Update fuer die Gliederungsnumerierung auf
if( bUpdateNum )
@@ -1723,14 +1723,14 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, ULONG nCnt )
/*************************************************************************
|*
-|* USHORT HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange )
+|* sal_uInt16 HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange )
|*
|* Beschreibung
|* Berechne den hoehsten Level innerhalb des Bereiches
|*
|* Parameter SwNodes & das Node-Array
|* SwNodeRange & der zu ueberpruefende Bereich
-|* Return USHORT der hoechste Level
+|* Return sal_uInt16 der hoechste Level
|*
|* Ersterstellung JP 24.04.91
|* Letzte Aenderung JP 24.04.91
@@ -1739,12 +1739,12 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, ULONG nCnt )
struct HighLevel
{
- USHORT nLevel, nTop;
- HighLevel( USHORT nLv ) : nLevel( nLv ), nTop( nLv ) {}
+ sal_uInt16 nLevel, nTop;
+ HighLevel( sal_uInt16 nLv ) : nLevel( nLv ), nTop( nLv ) {}
};
-BOOL _HighestLevel( const SwNodePtr& rpNode, void * pPara )
+sal_Bool _HighestLevel( const SwNodePtr& rpNode, void * pPara )
{
HighLevel * pHL = (HighLevel*)pPara;
if( rpNode->GetStartNode() )
@@ -1753,11 +1753,11 @@ BOOL _HighestLevel( const SwNodePtr& rpNode, void * pPara )
pHL->nLevel--;
if( pHL->nTop > pHL->nLevel )
pHL->nTop = pHL->nLevel;
- return TRUE;
+ return sal_True;
}
-USHORT HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange )
+sal_uInt16 HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange )
{
HighLevel aPara( rNodes.GetSectionLevel( rRange.aStart ));
rNodes.ForEach( rRange.aStart, rRange.aEnd, _HighestLevel, &aPara );
@@ -1792,8 +1792,8 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
SwNodeIndex aSttIdx( pStt->nNode );
SwTxtNode* const pSrcNd = (*this)[ aSttIdx ]->GetTxtNode();
SwTxtNode* pDestNd = rNodes[ rPos.nNode ]->GetTxtNode();
- BOOL bSplitDestNd = TRUE;
- BOOL bCopyCollFmt = pDestNd && !pDestNd->GetTxt().Len();
+ sal_Bool bSplitDestNd = sal_True;
+ sal_Bool bCopyCollFmt = pDestNd && !pDestNd->GetTxt().Len();
if( pSrcNd )
{
@@ -1804,27 +1804,27 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
pDestNd = rNodes.MakeTxtNode( rPos.nNode, pSrcNd->GetTxtColl() );
rPos.nNode--;
rPos.nContent.Assign( pDestNd, 0 );
- bCopyCollFmt = TRUE;
+ bCopyCollFmt = sal_True;
}
bSplitDestNd = pDestNd->Len() > rPos.nContent.GetIndex() ||
pEnd->nNode.GetNode().IsTxtNode();
// verschiebe jetzt noch den Inhalt in den neuen Node
- BOOL bOneNd = pStt->nNode == pEnd->nNode;
+ sal_Bool bOneNd = pStt->nNode == pEnd->nNode;
const xub_StrLen nLen =
( (bOneNd) ? pEnd->nContent.GetIndex() : pSrcNd->Len() )
- pStt->nContent.GetIndex();
if( !pEnd->nNode.GetNode().IsCntntNode() )
{
- bOneNd = TRUE;
- ULONG nSttNdIdx = pStt->nNode.GetIndex() + 1;
- const ULONG nEndNdIdx = pEnd->nNode.GetIndex();
+ bOneNd = sal_True;
+ sal_uLong nSttNdIdx = pStt->nNode.GetIndex() + 1;
+ const sal_uLong nEndNdIdx = pEnd->nNode.GetIndex();
for( ; nSttNdIdx < nEndNdIdx; ++nSttNdIdx )
{
if( (*this)[ nSttNdIdx ]->IsCntntNode() )
{
- bOneNd = FALSE;
+ bOneNd = sal_False;
break;
}
}
@@ -1836,7 +1836,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
{
if( !rPos.nContent.GetIndex() )
{
- bCopyCollFmt = TRUE;
+ bCopyCollFmt = sal_True;
}
if( rNodes.IsDocNodes() )
{
@@ -1855,7 +1855,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
{
aEndIdx--;
}
- bSplitDestNd = TRUE;
+ bSplitDestNd = sal_True;
pDestNd = rNodes[ rPos.nNode.GetIndex() - 1 ]->GetTxtNode();
if( nLen )
@@ -1876,7 +1876,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
pInsDoc->DoUndo( false );
pSrcNd->CopyCollFmt( *pDestNd );
pInsDoc->DoUndo( bIsUndo );
- bCopyCollFmt = FALSE;
+ bCopyCollFmt = sal_False;
}
if( bOneNd ) // das wars schon
@@ -1930,7 +1930,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
}
}
// am Ende steht noch ein leerer Text Node herum.
- bSplitDestNd = TRUE;
+ bSplitDestNd = sal_True;
}
SwTxtNode* const pEndSrcNd = (*this)[ aEndIdx ]->GetTxtNode();
@@ -1989,7 +1989,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
if( aEndIdx != aSttIdx )
{
// verschiebe jetzt die Nodes in das NodesArary
- const ULONG nSttDiff = aSttIdx.GetIndex() - pStt->nNode.GetIndex();
+ const sal_uLong nSttDiff = aSttIdx.GetIndex() - pStt->nNode.GetIndex();
SwNodeRange aRg( aSttIdx, aEndIdx );
_MoveNodes( aRg, rNodes, rPos.nNode );
// falls ins gleiche Nodes-Array verschoben wurde, stehen die
@@ -2035,13 +2035,13 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
|*
*************************************************************************/
-inline BYTE MaxLvl( BYTE nMin, BYTE nMax, short nNew )
+inline sal_uInt8 MaxLvl( sal_uInt8 nMin, sal_uInt8 nMax, short nNew )
{
- return (BYTE)(nNew < nMin ? nMin : nNew > nMax ? nMax : nNew);
+ return (sal_uInt8)(nNew < nMin ? nMin : nNew > nMax ? nMax : nNew);
}
void SwNodes::_CopyNodes( const SwNodeRange& rRange,
- const SwNodeIndex& rIndex, BOOL bNewFrms, BOOL bTblInsDummyNode ) const
+ const SwNodeIndex& rIndex, sal_Bool bNewFrms, sal_Bool bTblInsDummyNode ) const
{
SwDoc* pDoc = rIndex.GetNode().GetDoc();
@@ -2092,9 +2092,9 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange,
SwNodeIndex aInsPos( rIndex );
SwNodeIndex aOrigInsPos( rIndex, -1 ); // Originale Insert Pos
- USHORT nLevel = 0; // Level-Counter
+ sal_uInt16 nLevel = 0; // Level-Counter
- for( ULONG nNodeCnt = aRg.aEnd.GetIndex() - aRg.aStart.GetIndex();
+ for( sal_uLong nNodeCnt = aRg.aEnd.GetIndex() - aRg.aStart.GetIndex();
nNodeCnt > 0; --nNodeCnt )
{
pAktNode = &aRg.aStart.GetNode();
@@ -2127,7 +2127,7 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange,
SwStartNode* pSttNd = aRg.aStart.GetNode().GetStartNode();
_CopyNodes( SwNodeRange( *pSttNd, + 1,
*pSttNd->EndOfSectionNode() ),
- aInsPos, bNewFrms, FALSE );
+ aInsPos, bNewFrms, sal_False );
// fuer den Box-EndNode einen DummyNode einfuegen?
if( bTblInsDummyNode )
@@ -2225,12 +2225,12 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange,
aInsPos++; // ueberspringen
}
else {
- ASSERT( FALSE, "wie kommt diser Node ins Nodes-Array??" );
+ ASSERT( sal_False, "wie kommt diser Node ins Nodes-Array??" );
}
break;
default:
- ASSERT( FALSE, "weder Start-/End-/Content-Node, unbekannter Typ" );
+ ASSERT( sal_False, "weder Start-/End-/Content-Node, unbekannter Typ" );
}
aRg.aStart++;
}
@@ -2258,7 +2258,7 @@ void SwNodes::_DelDummyNodes( const SwNodeRange& rRg )
while( aIdx.GetIndex() < rRg.aEnd.GetIndex() )
{
if( ND_SECTIONDUMMY == aIdx.GetNode().GetNodeType() )
- RemoveNode( aIdx.GetIndex(), 1, TRUE );
+ RemoveNode( aIdx.GetIndex(), 1, sal_True );
else
aIdx++;
}
@@ -2285,11 +2285,11 @@ SwStartNode* SwNodes::MakeTextSection( const SwNodeIndex & rWhere,
}
// zum naechsten Content-Node, der nicht geschuetzt oder versteckt ist
- // (beides auf FALSE ==> GoNext/GoPrevious!!!)
+ // (beides auf sal_False ==> GoNext/GoPrevious!!!)
SwCntntNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
int bSkipHidden, int bSkipProtect ) const
{
- int bFirst = TRUE;
+ int bFirst = sal_True;
SwNodeIndex aTmp( *pIdx );
const SwNode* pNd;
while( aTmp < Count() - 1 )
@@ -2301,11 +2301,11 @@ SwCntntNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
(bSkipProtect && rSect.IsProtectFlag()) )
// dann diese Section ueberspringen
aTmp = *pNd->EndOfSectionNode();
- bFirst = FALSE;
+ bFirst = sal_False;
}
else if( bFirst )
{
- bFirst = FALSE;
+ bFirst = sal_False;
if( pNd->pStartOfSection->IsSectionNode() )
{
const SwSection& rSect = ((SwSectionNode*)pNd->
@@ -2333,7 +2333,7 @@ SwCntntNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
}
}
aTmp++;
- bFirst = FALSE;
+ bFirst = sal_False;
}
return 0;
}
@@ -2341,7 +2341,7 @@ SwCntntNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
SwCntntNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx,
int bSkipHidden, int bSkipProtect ) const
{
- int bFirst = TRUE;
+ int bFirst = sal_True;
SwNodeIndex aTmp( *pIdx );
const SwNode* pNd;
while( aTmp > 0 )
@@ -2357,11 +2357,11 @@ SwCntntNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx,
// dann diese Section ueberspringen
aTmp = *pNd->StartOfSectionNode();
}
- bFirst = FALSE;
+ bFirst = sal_False;
}
else if( bFirst )
{
- bFirst = FALSE;
+ bFirst = sal_False;
if( pNd->pStartOfSection->IsSectionNode() )
{
const SwSection& rSect = ((SwSectionNode*)pNd->
@@ -2435,8 +2435,8 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
rFrmIdx = aIdx;
// suche nach vorne/hinten nach einem Content Node
- else if( 0 != ( pFrmNd = GoPrevSection( &aIdx, TRUE, FALSE )) &&
- ::CheckNodesRange( aIdx, rFrmIdx, TRUE ) &&
+ else if( 0 != ( pFrmNd = GoPrevSection( &aIdx, sal_True, sal_False )) &&
+ ::CheckNodesRange( aIdx, rFrmIdx, sal_True ) &&
// nach vorne nie aus der Tabelle hinaus!
pFrmNd->FindTableNode() == pTableNd &&
// Bug 37652: nach hinten nie aus der Tabellenzelle hinaus!
@@ -2457,8 +2457,8 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
// JP 19.09.93: aber nie die Section dafuer verlassen !!
if( ( pEnd && ( pFrmNd = &aIdx.GetNode())->IsCntntNode() ) ||
- ( 0 != ( pFrmNd = GoNextSection( &aIdx, TRUE, FALSE )) &&
- ::CheckNodesRange( aIdx, rFrmIdx, TRUE ) &&
+ ( 0 != ( pFrmNd = GoNextSection( &aIdx, sal_True, sal_False )) &&
+ ::CheckNodesRange( aIdx, rFrmIdx, sal_True ) &&
( pFrmNd->FindTableNode() == pTableNd &&
// Bug 37652: nach hinten nie aus der Tabellenzelle hinaus!
(!pFrmNd->FindTableNode() || pFrmNd->FindTableBoxStartNode()
@@ -2538,9 +2538,9 @@ struct _TempBigPtrEntry : public BigPtrEntry
};
-void SwNodes::RemoveNode( ULONG nDelPos, ULONG nSz, BOOL bDel )
+void SwNodes::RemoveNode( sal_uLong nDelPos, sal_uLong nSz, sal_Bool bDel )
{
- ULONG nEnd = nDelPos + nSz;
+ sal_uLong nEnd = nDelPos + nSz;
SwNode* pNew = (*this)[ nEnd ];
if( pRoot )
@@ -2548,7 +2548,7 @@ void SwNodes::RemoveNode( ULONG nDelPos, ULONG nSz, BOOL bDel )
SwNodeIndex *p = pRoot;
while( p )
{
- ULONG nIdx = p->GetIndex();
+ sal_uLong nIdx = p->GetIndex();
SwNodeIndex* pNext = p->pNext;
if( nDelPos <= nIdx && nIdx < nEnd )
(*p) = *pNew;
@@ -2559,7 +2559,7 @@ void SwNodes::RemoveNode( ULONG nDelPos, ULONG nSz, BOOL bDel )
p = pRoot->pPrev;
while( p )
{
- ULONG nIdx = p->GetIndex();
+ sal_uLong nIdx = p->GetIndex();
SwNodeIndex* pPrev = p->pPrev;
if( nDelPos <= nIdx && nIdx < nEnd )
(*p) = *pNew;
@@ -2569,7 +2569,7 @@ void SwNodes::RemoveNode( ULONG nDelPos, ULONG nSz, BOOL bDel )
}
{
- for (ULONG nCnt = 0; nCnt < nSz; nCnt++)
+ for (sal_uLong nCnt = 0; nCnt < nSz; nCnt++)
{
SwTxtNode * pTxtNd = ((*this)[ nDelPos + nCnt ])->GetTxtNode();
@@ -2585,7 +2585,7 @@ void SwNodes::RemoveNode( ULONG nDelPos, ULONG nSz, BOOL bDel )
if( bDel )
{
- ULONG nCnt = nSz;
+ sal_uLong nCnt = nSz;
SwNode *pDel = (*this)[ nDelPos+nCnt-1 ], *pPrev = (*this)[ nDelPos+nCnt-2 ];
// temp. Object setzen
@@ -2602,7 +2602,7 @@ void SwNodes::RemoveNode( ULONG nDelPos, ULONG nSz, BOOL bDel )
{
delete pDel;
pDel = pPrev;
- ULONG nPrevNdIdx = pPrev->GetIndex();
+ sal_uLong nPrevNdIdx = pPrev->GetIndex();
BigPtrArray::Replace( nPrevNdIdx+1, pTempEntry );
if( nCnt )
pPrev = (*this)[ nPrevNdIdx - 1 ];
@@ -2657,7 +2657,7 @@ void SwNodes::InsertNode( const SwNodePtr pNode,
}
void SwNodes::InsertNode( const SwNodePtr pNode,
- ULONG nPos )
+ sal_uLong nPos )
{
const ElementPtr pIns = pNode;
BigPtrArray::Insert( pIns, nPos );
@@ -2689,7 +2689,7 @@ SwNode * SwNodes::DocumentSectionEndNode(SwNode * pNode) const
//SwNode * SwNodes::operator[](int n) const
//{
-// return operator[]((ULONG) n);
+// return operator[]((sal_uLong) n);
//}
// <-#112139#
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index 2d54cb88f2e6..521b371f775a 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -82,7 +82,7 @@ class SwIntrnlSectRefLink : public SwBaseLink
{
SwSectionFmt& rSectFmt;
public:
- SwIntrnlSectRefLink( SwSectionFmt& rFmt, USHORT nUpdateType, USHORT nFmt )
+ SwIntrnlSectRefLink( SwSectionFmt& rFmt, sal_uInt16 nUpdateType, sal_uInt16 nFmt )
: SwBaseLink( nUpdateType, nFmt ),
rSectFmt( rFmt )
{}
@@ -92,7 +92,7 @@ public:
const uno::Any & rValue );
virtual const SwNode* GetAnchor() const;
- virtual BOOL IsInRange( ULONG nSttNd, ULONG nEndNd, xub_StrLen nStt = 0,
+ virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, xub_StrLen nStt = 0,
xub_StrLen nEnd = STRING_NOTFOUND ) const;
// --> OD 2007-02-14 #b6521322#
@@ -274,8 +274,8 @@ SwSection::~SwSection()
{
// Bug: 28191 - nicht ins Undo aufnehmen, sollte schon vorher
// geschehen sein!!
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
pDoc->DelSectionFmt( pFmt ); // und loeschen
pDoc->DoUndo( bUndo );
}
@@ -361,15 +361,15 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition)
}
}
-BOOL SwSection::CalcHiddenFlag() const
+sal_Bool SwSection::CalcHiddenFlag() const
{
const SwSection* pSect = this;
do {
if( pSect->IsHidden() && pSect->IsCondHidden() )
- return TRUE;
+ return sal_True;
} while( 0 != ( pSect = pSect->GetParent()) );
- return FALSE;
+ return sal_False;
}
bool SwSection::IsProtect() const
@@ -409,7 +409,7 @@ void SwSection::SetProtect(bool const bFlag)
if (pFormat)
{
SvxProtectItem aItem( RES_PROTECT );
- aItem.SetCntntProtect( (BOOL)bFlag );
+ aItem.SetCntntProtect( (sal_Bool)bFlag );
pFormat->SetFmtAttr( aItem );
// note: this will call m_Data.SetProtectFlag via Modify!
}
@@ -427,7 +427,7 @@ void SwSection::SetEditInReadonly(bool const bFlag)
if (pFormat)
{
SwFmtEditInReadonly aItem;
- aItem.SetValue( (BOOL)bFlag );
+ aItem.SetValue( (sal_Bool)bFlag );
pFormat->SetFmtAttr( aItem );
// note: this will call m_Data.SetEditInReadonlyFlag via Modify!
}
@@ -451,7 +451,7 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pNewSet->GetItemState(
- RES_PROTECT, FALSE, &pItem ) )
+ RES_PROTECT, sal_False, &pItem ) )
{
m_Data.SetProtectFlag( static_cast<SvxProtectItem const*>(pItem)
->IsCntntProtected() );
@@ -461,7 +461,7 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// --> FME 2004-06-22 #114856# edit in readonly sections
if( SFX_ITEM_SET == pNewSet->GetItemState(
- RES_EDIT_IN_READONLY, FALSE, &pItem ) )
+ RES_EDIT_IN_READONLY, sal_False, &pItem ) )
{
m_Data.SetEditInReadonlyFlag(
static_cast<SwFmtEditInReadonly const*>(pItem)->GetValue());
@@ -471,9 +471,9 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// <--
if( SFX_ITEM_SET == pNewSet->GetItemState(
- RES_FTN_AT_TXTEND, FALSE, &pItem ) ||
+ RES_FTN_AT_TXTEND, sal_False, &pItem ) ||
SFX_ITEM_SET == pNewSet->GetItemState(
- RES_END_AT_TXTEND, FALSE, &pItem ))
+ RES_END_AT_TXTEND, sal_False, &pItem ))
{
bUpdateFtn = true;
}
@@ -553,7 +553,7 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
if( bUpdateFtn )
{
- SwSectionNode* pSectNd = GetFmt()->GetSectionNode( FALSE );
+ SwSectionNode* pSectNd = GetFmt()->GetSectionNode( sal_False );
if( pSectNd )
pSectNd->GetDoc()->GetFtnIdxs().UpdateFtn(SwNodeIndex( *pSectNd ));
}
@@ -634,7 +634,7 @@ void SwSection::MakeChildLinksVisible( const SwSectionNode& rSectNd )
{
const SwNode* pNd;
const ::sfx2::SvBaseLinks& rLnks = rSectNd.GetDoc()->GetLinkManager().GetLinks();
- for( USHORT n = rLnks.Count(); n; )
+ for( sal_uInt16 n = rLnks.Count(); n; )
{
::sfx2::SvBaseLink* pBLnk = &(*rLnks[ --n ]);
if( pBLnk && !pBLnk->IsVisible() &&
@@ -651,7 +651,7 @@ void SwSection::MakeChildLinksVisible( const SwSectionNode& rSectNd )
// steht nur noch in einer normalen Section, also
// wieder anzeigen
if( !pParent )
- pBLnk->SetVisible( TRUE );
+ pBLnk->SetVisible( sal_True );
}
}
}
@@ -679,7 +679,7 @@ SwSectionFmt::~SwSectionFmt()
if( !GetDoc()->IsInDtor() )
{
SwSectionNode* pSectNd;
- const SwNodeIndex* pIdx = GetCntnt( FALSE ).GetCntntIdx();
+ const SwNodeIndex* pIdx = GetCntnt( sal_False ).GetCntntIdx();
if( pIdx && &GetDoc()->GetNodes() == &pIdx->GetNodes() &&
0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
{
@@ -707,7 +707,7 @@ SwSectionFmt::~SwSectionFmt()
if ( pLast->IsA( TYPE(SwFrm) ) )
{
SwSectionFrm *pFrm = (SwSectionFrm*)pLast;
- SwSectionFrm::MoveCntntAndDelete( pFrm, TRUE );
+ SwSectionFrm::MoveCntntAndDelete( pFrm, sal_True );
pLast = aIter.GoStart();
}
else
@@ -732,17 +732,17 @@ SwSection * SwSectionFmt::GetSection() const
return (SwSectionPtr)aIter.First( TYPE(SwSection) );
}
- ASSERT( FALSE, "keine Section als Client." )
+ ASSERT( sal_False, "keine Section als Client." )
return 0;
}
-extern void lcl_DeleteFtn( SwSectionNode *pNd, ULONG nStt, ULONG nEnd );
+extern void lcl_DeleteFtn( SwSectionNode *pNd, sal_uLong nStt, sal_uLong nEnd );
//Vernichtet alle Frms in aDepend (Frms werden per PTR_CAST erkannt).
void SwSectionFmt::DelFrms()
{
SwSectionNode* pSectNd;
- const SwNodeIndex* pIdx = GetCntnt(FALSE).GetCntntIdx();
+ const SwNodeIndex* pIdx = GetCntnt(sal_False).GetCntntIdx();
if( pIdx && &GetDoc()->GetNodes() == &pIdx->GetNodes() &&
0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
{
@@ -755,7 +755,7 @@ void SwSectionFmt::DelFrms()
if ( pLast->IsA( TYPE(SwFrm) ) )
{
SwSectionFrm *pFrm = (SwSectionFrm*)pLast;
- SwSectionFrm::MoveCntntAndDelete( pFrm, FALSE );
+ SwSectionFrm::MoveCntntAndDelete( pFrm, sal_False );
pLast = aIter.GoStart();
}
else
@@ -774,8 +774,8 @@ void SwSectionFmt::DelFrms()
pLast = aIter++;
}
// <--
- ULONG nEnde = pSectNd->EndOfSectionIndex();
- ULONG nStart = pSectNd->GetIndex()+1;
+ sal_uLong nEnde = pSectNd->EndOfSectionIndex();
+ sal_uLong nStart = pSectNd->GetIndex()+1;
lcl_DeleteFtn( pSectNd, nStart, nEnde );
}
if( pIdx )
@@ -786,7 +786,7 @@ void SwSectionFmt::DelFrms()
//zu weiteren Folgefehlern, die mit Laufzeitkosten geloest werden
//muesten. #56977# #55001# #56135#
SwNodeIndex aNextNd( *pIdx );
- SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection( &aNextNd, TRUE, FALSE );
+ SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection( &aNextNd, sal_True, sal_False );
if( pCNd )
{
const SfxPoolItem& rItem = pCNd->GetSwAttrSet().Get( RES_PAGEDESC );
@@ -800,7 +800,7 @@ void SwSectionFmt::DelFrms()
void SwSectionFmt::MakeFrms()
{
SwSectionNode* pSectNd;
- const SwNodeIndex* pIdx = GetCntnt(FALSE).GetCntntIdx();
+ const SwNodeIndex* pIdx = GetCntnt(sal_False).GetCntntIdx();
if( pIdx && &GetDoc()->GetNodes() == &pIdx->GetNodes() &&
0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
@@ -823,8 +823,8 @@ void lcl_ClientIter( SwSectionFmt* pFmt, const SfxPoolItem* pOld,
void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- BOOL bClients = FALSE;
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_Bool bClients = sal_False;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
switch( nWhich )
{
case RES_ATTRSET_CHG:
@@ -834,7 +834,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
SfxItemSet* pOldSet = ((SwAttrSetChg*)pOld)->GetChgSet();
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pNewSet->GetItemState(
- RES_PROTECT, FALSE, &pItem ))
+ RES_PROTECT, sal_False, &pItem ))
{
lcl_ClientIter( this, pItem, pItem );
pNewSet->ClearItem( RES_PROTECT );
@@ -843,7 +843,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// --> FME 2004-06-22 #114856# edit in readonly sections
if( SFX_ITEM_SET == pNewSet->GetItemState(
- RES_EDIT_IN_READONLY, FALSE, &pItem ) )
+ RES_EDIT_IN_READONLY, sal_False, &pItem ) )
{
lcl_ClientIter( this, pItem, pItem );
pNewSet->ClearItem( RES_EDIT_IN_READONLY );
@@ -852,7 +852,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// <--
if( SFX_ITEM_SET == pNewSet->GetItemState(
- RES_FTN_AT_TXTEND, FALSE, &pItem ))
+ RES_FTN_AT_TXTEND, sal_False, &pItem ))
{
lcl_ClientIter( this, &pOldSet->Get( RES_FTN_AT_TXTEND ),
pItem );
@@ -860,7 +860,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
pOldSet->ClearItem( RES_FTN_AT_TXTEND );
}
if( SFX_ITEM_SET == pNewSet->GetItemState(
- RES_END_AT_TXTEND, FALSE, &pItem ))
+ RES_END_AT_TXTEND, sal_False, &pItem ))
{
lcl_ClientIter( this, &pOldSet->Get( RES_END_AT_TXTEND ),
pItem );
@@ -874,7 +874,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
case RES_SECTION_RESETHIDDENFLAG:
case RES_FTN_AT_TXTEND:
- case RES_END_AT_TXTEND : bClients = TRUE;
+ case RES_END_AT_TXTEND : bClients = sal_True;
// no break !!
case RES_SECTION_HIDDEN:
case RES_SECTION_NOT_HIDDEN:
@@ -943,7 +943,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
// erfrage vom Format Informationen
-BOOL SwSectionFmt::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwSectionFmt::GetInfo( SfxPoolItem& rInfo ) const
{
switch( rInfo.Which() )
{
@@ -954,7 +954,7 @@ BOOL SwSectionFmt::GetInfo( SfxPoolItem& rInfo ) const
if( pNd )
((SwFindNearestNode&)rInfo).CheckNode( *pNd );
}
- return TRUE;
+ return sal_True;
case RES_CONTENT_VISIBLE:
{
@@ -973,7 +973,7 @@ BOOL SwSectionFmt::GetInfo( SfxPoolItem& rInfo ) const
}
((SwPtrMsgPoolItem&)rInfo).pObject = pFrm;
}
- return FALSE;
+ return sal_False;
}
return SwModify::GetInfo( rInfo );
}
@@ -992,11 +992,11 @@ extern "C" {
const SwSectionFmt* pFSectFmt = (*(SwSectionPtr*)pFirst)->GetFmt();
const SwSectionFmt* pSSectFmt = (*(SwSectionPtr*)pSecond)->GetFmt();
ASSERT( pFSectFmt && pSSectFmt &&
- pFSectFmt->GetCntnt(FALSE).GetCntntIdx() &&
- pSSectFmt->GetCntnt(FALSE).GetCntntIdx(),
+ pFSectFmt->GetCntnt(sal_False).GetCntntIdx() &&
+ pSSectFmt->GetCntnt(sal_False).GetCntntIdx(),
"ungueltige Sections" );
- return (int)((long)pFSectFmt->GetCntnt(FALSE).GetCntntIdx()->GetIndex()) -
- pSSectFmt->GetCntnt(FALSE).GetCntntIdx()->GetIndex();
+ return (int)((long)pFSectFmt->GetCntnt(sal_False).GetCntntIdx()->GetIndex()) -
+ pSSectFmt->GetCntnt(sal_False).GetCntntIdx()->GetIndex();
}
int
@@ -1019,9 +1019,9 @@ extern "C" {
}
// alle Sections, die von dieser abgeleitet sind
-USHORT SwSectionFmt::GetChildSections( SwSections& rArr,
+sal_uInt16 SwSectionFmt::GetChildSections( SwSections& rArr,
SectionSort eSort,
- BOOL bAllSections ) const
+ sal_Bool bAllSections ) const
{
rArr.Remove( 0, rArr.Count() );
@@ -1032,7 +1032,7 @@ USHORT SwSectionFmt::GetChildSections( SwSections& rArr,
const SwNodeIndex* pIdx;
for( pLast = aIter.First(TYPE(SwSectionFmt)); pLast; pLast = aIter.Next() )
if( bAllSections ||
- ( 0 != ( pIdx = ((SwSectionFmt*)pLast)->GetCntnt(FALSE).
+ ( 0 != ( pIdx = ((SwSectionFmt*)pLast)->GetCntnt(sal_False).
GetCntntIdx()) && &pIdx->GetNodes() == &GetDoc()->GetNodes() ))
{
const SwSection* Dummy=((SwSectionFmt*)pLast)->GetSection();
@@ -1066,9 +1066,9 @@ USHORT SwSectionFmt::GetChildSections( SwSections& rArr,
// erfrage, ob sich die Section im Nodes-Array oder UndoNodes-Array
// befindet.
-BOOL SwSectionFmt::IsInNodesArr() const
+sal_Bool SwSectionFmt::IsInNodesArr() const
{
- const SwNodeIndex* pIdx = GetCntnt(FALSE).GetCntntIdx();
+ const SwNodeIndex* pIdx = GetCntnt(sal_False).GetCntntIdx();
return pIdx && &pIdx->GetNodes() == &GetDoc()->GetNodes();
}
@@ -1130,7 +1130,7 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
if( bIsHidden == pSection->IsHiddenFlag() )
{
- SwMsgPoolItem aMsgItem( static_cast<USHORT>(bIsHidden
+ SwMsgPoolItem aMsgItem( static_cast<sal_uInt16>(bIsHidden
? RES_SECTION_HIDDEN
: RES_SECTION_NOT_HIDDEN ) );
pLast->Modify( &aMsgItem, &aMsgItem );
@@ -1164,7 +1164,7 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
SwSectionNode* SwSectionFmt::GetSectionNode(bool const bAlways)
{
- const SwNodeIndex* pIdx = GetCntnt(FALSE).GetCntntIdx();
+ const SwNodeIndex* pIdx = GetCntnt(sal_False).GetCntntIdx();
if( pIdx && ( bAlways || &pIdx->GetNodes() == &GetDoc()->GetNodes() ))
return pIdx->GetNode().GetSectionNode();
return 0;
@@ -1202,7 +1202,7 @@ bool SwSectionFmt::IsInUndo() const
bool SwSectionFmt::IsInContent() const
{
- SwNodeIndex const*const pIdx = GetCntnt(FALSE).GetCntntIdx();
+ SwNodeIndex const*const pIdx = GetCntnt(sal_False).GetCntntIdx();
OSL_ENSURE(pIdx, "SwSectionFmt::IsInContent: no index?");
return (pIdx) ? !GetDoc()->IsInHeaderFooter(*pIdx) : true;
}
@@ -1246,7 +1246,7 @@ void lcl_BreakSectionLinksInSect( const SwSectionNode& rSectNd )
}
const ::sfx2::SvBaseLink* pOwnLink( &(rSectNd.GetSection().GetBaseLink() ) );
const ::sfx2::SvBaseLinks& rLnks = rSectNd.GetDoc()->GetLinkManager().GetLinks();
- for ( USHORT n = rLnks.Count(); n > 0; )
+ for ( sal_uInt16 n = rLnks.Count(); n > 0; )
{
SwIntrnlSectRefLink* pSectLnk = dynamic_cast<SwIntrnlSectRefLink*>(&(*rLnks[ --n ]));
if ( pSectLnk && pSectLnk != pOwnLink &&
@@ -1280,7 +1280,7 @@ void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
aValue <<= ::rtl::OUString( sName ); // beliebiger Name
const ::sfx2::SvBaseLinks& rLnks = pDoc->GetLinkManager().GetLinks();
- for( USHORT n = rLnks.Count(); n; )
+ for( sal_uInt16 n = rLnks.Count(); n; )
{
::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]);
if( pLnk && pLnk != &rUpdLnk &&
@@ -1325,7 +1325,7 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
const String& rFileName,
const String& rPasswd,
String& rFilter,
- INT16 nVersion,
+ sal_Int16 nVersion,
SwDocShell* pDestSh )
{
if( !rFileName.Len() )
@@ -1340,7 +1340,7 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
TypeId aType( TYPE(SwDocShell) );
SfxObjectShell* pShell = pDestSh;
- BOOL bFirst = 0 != pShell;
+ sal_Bool bFirst = 0 != pShell;
if( !bFirst )
// keine DocShell uebergeben, also beginne mit der ersten aus der
@@ -1355,7 +1355,7 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
{
const SfxPoolItem* pItem;
if( ( SFX_ITEM_SET == pMed->GetItemSet()->GetItemState(
- SID_VERSION, FALSE, &pItem ) )
+ SID_VERSION, sal_False, &pItem ) )
? (nVersion == ((SfxInt16Item*)pItem)->GetValue())
: !nVersion )
{
@@ -1367,7 +1367,7 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
if( bFirst )
{
- bFirst = FALSE;
+ bFirst = sal_False;
pShell = SfxObjectShell::GetFirst( &aType );
}
else
@@ -1376,7 +1376,7 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
// 2. selbst die Date oeffnen
SfxMedium* pMed = new SfxMedium( aTmpObj.GetMainURL(
- INetURLObject::NO_DECODE ), STREAM_READ, TRUE );
+ INetURLObject::NO_DECODE ), STREAM_READ, sal_True );
if( INET_PROT_FILE == aTmpObj.GetProtocol() )
pMed->DownLoad(); // nur mal das Medium anfassen (DownLoaden)
@@ -1400,7 +1400,7 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
pMed->GetItemSet()->Put( SfxStringItem( SID_PASSWORD, rPasswd ));
if( !pSfxFlt )
- aMatcher.DetectFilter( *pMed, &pSfxFlt, FALSE, FALSE );
+ aMatcher.DetectFilter( *pMed, &pSfxFlt, sal_False, sal_False );
if( pSfxFlt )
{
@@ -1423,10 +1423,10 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
const uno::Any & rValue )
{
- SwSectionNode* pSectNd = rSectFmt.GetSectionNode( FALSE );
+ SwSectionNode* pSectNd = rSectFmt.GetSectionNode( sal_False );
SwDoc* pDoc = rSectFmt.GetDoc();
- ULONG nDataFormat = SotExchange::GetFormatIdFromMimeType( rMimeType );
+ sal_uLong nDataFormat = SotExchange::GetFormatIdFromMimeType( rMimeType );
if( !pSectNd || !pDoc || pDoc->IsInDtor() || ChkNoDataFlag() ||
sfx2::LinkManager::RegisterStatusInfoId() == nDataFormat )
@@ -1444,10 +1444,10 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
// <--
// Undo immer abschalten
- BOOL bWasUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
- BOOL bWasVisibleLinks = pDoc->IsVisibleLinks();
- pDoc->SetVisibleLinks( FALSE );
+ sal_Bool bWasUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
+ sal_Bool bWasVisibleLinks = pDoc->IsVisibleLinks();
+ pDoc->SetVisibleLinks( sal_False );
SwPaM* pPam;
ViewShell* pVSh = 0;
@@ -1467,7 +1467,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
SwPosition aPos( aIdx, SwIndex( pNewNd, 0 ));
aPos.nNode--;
- pDoc->CorrAbs( aIdx, aEndIdx, aPos, TRUE );
+ pDoc->CorrAbs( aIdx, aEndIdx, aPos, sal_True );
pPam = new SwPaM( aPos );
@@ -1535,7 +1535,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == xDocSh->GetMedium()->GetItemSet()->
- GetItemState( SID_PASSWORD, FALSE, &pItem ) )
+ GetItemState( SID_PASSWORD, sal_False, &pItem ) )
rSection.SetLinkFilePassword(
((SfxStringItem*)pItem)->GetValue() );
}
@@ -1545,7 +1545,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
if( sRange.Len() )
{
// Rekursionen abfangen
- BOOL bRecursion = FALSE;
+ sal_Bool bRecursion = sal_False;
if( pSrcDoc == pDoc )
{
SwServerObjectRef refObj( (SwServerObject*)
@@ -1587,13 +1587,13 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
if ( pSrcDoc != pDoc &&
rSection.IsProtectFlag() )
{
- pSrcDoc->GetLinkManager().UpdateAllLinks( FALSE, TRUE, FALSE, 0 );
+ pSrcDoc->GetLinkManager().UpdateAllLinks( sal_False, sal_True, sal_False, 0 );
}
// <--
if( pCpyRg )
{
SwNodeIndex& rInsPos = pPam->GetPoint()->nNode;
- BOOL bCreateFrm = rInsPos.GetIndex() <=
+ sal_Bool bCreateFrm = rInsPos.GetIndex() <=
pDoc->GetNodes().GetEndOfExtras().GetIndex() ||
rInsPos.GetNode().FindTableNode();
@@ -1614,7 +1614,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
pPam->Move( fnMoveBackward, fnGoNode );
pPam->SetMark(); // beide SwPositions ummelden!
- pDoc->CorrAbs( aSave, *pPam->GetPoint(), 0, TRUE );
+ pDoc->CorrAbs( aSave, *pPam->GetPoint(), 0, sal_True );
pDoc->GetNodes().Delete( aSave, 1 );
}
delete pCpyRg;
@@ -1675,7 +1675,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
if( pESh )
{
- pESh->Pop( FALSE );
+ pESh->Pop( sal_False );
pPam = 0; // pam is deleted before
}
}
@@ -1707,7 +1707,7 @@ void SwIntrnlSectRefLink::Closed()
// kennzeichnen und das Flag umsetzen
const SwSectionFmts& rFmts = pDoc->GetSections();
- for( USHORT n = rFmts.Count(); n; )
+ for( sal_uInt16 n = rFmts.Count(); n; )
if( rFmts[ --n ] == &rSectFmt )
{
ViewShell* pSh;
@@ -1732,7 +1732,7 @@ void SwIntrnlSectRefLink::Closed()
pDoc->UpdateSection( n, aSectionData );
// alle in der Section liegenden Links werden sichtbar
- SwSectionNode* pSectNd = rSectFmt.GetSectionNode( FALSE );
+ SwSectionNode* pSectNd = rSectFmt.GetSectionNode( sal_False );
if( pSectNd )
pSectNd->GetSection().MakeChildLinksVisible( *pSectNd );
@@ -1754,7 +1754,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType )
if (!pFmt || (CONTENT_SECTION == m_Data.GetType()))
return ;
- USHORT nUpdateType = sfx2::LINKUPDATE_ALWAYS;
+ sal_uInt16 nUpdateType = sfx2::LINKUPDATE_ALWAYS;
if (!m_RefLink.Is())
{
@@ -1789,7 +1789,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType )
String sFltr( sCmd.GetToken( 1, sfx2::cTokenSeperator ) );
String sRange( sCmd.GetToken( 2, sfx2::cTokenSeperator ) );
pFmt->GetDoc()->GetLinkManager().InsertFileLink( *pLnk,
- static_cast<USHORT>(m_Data.GetType()),
+ static_cast<sal_uInt16>(m_Data.GetType()),
sCmd.GetToken( 0, sfx2::cTokenSeperator ),
( sFltr.Len() ? &sFltr : 0 ),
( sRange.Len() ? &sRange : 0 ) );
@@ -1845,14 +1845,14 @@ void SwSection::BreakLink()
const SwNode* SwIntrnlSectRefLink::GetAnchor() const
{
- return rSectFmt.GetSectionNode( FALSE );
+ return rSectFmt.GetSectionNode( sal_False );
}
-BOOL SwIntrnlSectRefLink::IsInRange( ULONG nSttNd, ULONG nEndNd,
+sal_Bool SwIntrnlSectRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd,
xub_StrLen , xub_StrLen ) const
{
- SwStartNode* pSttNd = rSectFmt.GetSectionNode( FALSE );
+ SwStartNode* pSttNd = rSectFmt.GetSectionNode( sal_False );
return pSttNd &&
nSttNd < pSttNd->GetIndex() &&
pSttNd->EndOfSectionIndex() < nEndNd;
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx
index cb804b102c0e..e2a504383e8e 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -66,7 +66,7 @@
using namespace com::sun::star;
-BOOL SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd );
+sal_Bool SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd );
TYPEINIT1( SwBaseLink, ::sfx2::SvBaseLink );
@@ -108,11 +108,11 @@ void SwBaseLink::DataChanged( const String& rMimeType,
SwDoc* pDoc = pCntntNode->GetDoc();
if( pDoc->IsInDtor() || ChkNoDataFlag() || bIgnoreDataChanged )
{
- bIgnoreDataChanged = FALSE;
+ bIgnoreDataChanged = sal_False;
return ;
}
- ULONG nFmt = SotExchange::GetFormatIdFromMimeType( rMimeType );
+ sal_uLong nFmt = SotExchange::GetFormatIdFromMimeType( rMimeType );
if( pCntntNode->IsNoTxtNode() &&
nFmt == sfx2::LinkManager::RegisterStatusInfoId() )
@@ -121,7 +121,7 @@ void SwBaseLink::DataChanged( const String& rMimeType,
::rtl::OUString sState;
if( rValue.hasValue() && ( rValue >>= sState ))
{
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
switch( sState.toInt32() )
{
case sfx2::LinkManager::STATE_LOAD_OK: nEvent = SVX_EVENT_IMAGE_LOAD; break;
@@ -140,10 +140,10 @@ void SwBaseLink::DataChanged( const String& rMimeType,
return; // das wars!
}
- BOOL bUpdate = FALSE;
- BOOL bGraphicArrived = FALSE;
- BOOL bGraphicPieceArrived = FALSE;
- BOOL bDontNotify = FALSE;
+ sal_Bool bUpdate = sal_False;
+ sal_Bool bGraphicArrived = sal_False;
+ sal_Bool bGraphicPieceArrived = sal_False;
+ sal_Bool bDontNotify = sal_False;
Size aGrfSz, aFrmFmtSz;
if( pCntntNode->IsGrfNode() )
@@ -183,12 +183,12 @@ void SwBaseLink::DataChanged( const String& rMimeType,
// gesetzt ist, dann muss "unten" der Teil von
// bGraphicArrived durchlaufen werden!
// (ansonten wird die Grafik in deft. Size gepaintet)
- bGraphicArrived = TRUE;
- bGraphicPieceArrived = FALSE;
+ bGraphicArrived = sal_True;
+ bGraphicPieceArrived = sal_False;
}
rGrfObj.SetGraphic( aGrf, rGrfObj.GetLink() );
- bUpdate = TRUE;
+ bUpdate = sal_True;
// Bug 33999: damit der Node den Transparent-Status
// richtig gesetzt hat, ohne auf die Grafik
@@ -207,7 +207,7 @@ void SwBaseLink::DataChanged( const String& rMimeType,
((SwGrfNode*)pCntntNode)->SetTwipSize( Size(0,0) );
}
else if( pCntntNode->IsOLENode() )
- bUpdate = TRUE;
+ bUpdate = sal_True;
ViewShell *pSh = 0;
SwEditShell* pESh = pDoc->GetEditShell( &pSh );
@@ -219,19 +219,19 @@ void SwBaseLink::DataChanged( const String& rMimeType,
{
SwMsgPoolItem aMsgHint( RES_GRAPHIC_PIECE_ARRIVED );
pCntntNode->Modify( &aMsgHint, &aMsgHint );
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
}
- static BOOL bInNotifyLinks = FALSE;
+ static sal_Bool bInNotifyLinks = sal_False;
if( bUpdate && !bDontNotify && (!bSwapIn || bGraphicArrived) &&
!bInNotifyLinks)
{
- BOOL bLockView = FALSE;
+ sal_Bool bLockView = sal_False;
if( pSh )
{
bLockView = pSh->IsViewLocked();
- pSh->LockView( TRUE );
+ pSh->LockView( sal_True );
}
if( pESh )
@@ -239,16 +239,16 @@ void SwBaseLink::DataChanged( const String& rMimeType,
else if( pSh )
pSh->StartAction();
- SwMsgPoolItem aMsgHint( static_cast<USHORT>(
+ SwMsgPoolItem aMsgHint( static_cast<sal_uInt16>(
bGraphicArrived ? RES_GRAPHIC_ARRIVED : RES_UPDATE_ATTR ) );
if ( bGraphicArrived )
{
//Alle benachrichtigen, die am gleichen Link horchen.
- bInNotifyLinks = TRUE;
+ bInNotifyLinks = sal_True;
const ::sfx2::SvBaseLinks& rLnks = pDoc->GetLinkManager().GetLinks();
- for( USHORT n = rLnks.Count(); n; )
+ for( sal_uInt16 n = rLnks.Count(); n; )
{
::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]);
if( pLnk && OBJECT_CLIENT_GRF == pLnk->GetObjType() &&
@@ -261,9 +261,9 @@ void SwBaseLink::DataChanged( const String& rMimeType,
( !bSwapIn ||
GRAPHIC_DEFAULT == pGrfNd->GetGrfObj().GetType()))
{
- pBLink->bIgnoreDataChanged = FALSE;
+ pBLink->bIgnoreDataChanged = sal_False;
pBLink->DataChanged( rMimeType, rValue );
- pBLink->bIgnoreDataChanged = TRUE;
+ pBLink->bIgnoreDataChanged = sal_True;
pGrfNd->SetGrafikArrived( ((SwGrfNode*)pCntntNode)->
IsGrafikArrived() );
@@ -279,7 +279,7 @@ void SwBaseLink::DataChanged( const String& rMimeType,
}
}
- bInNotifyLinks = FALSE;
+ bInNotifyLinks = sal_False;
}
else
{
@@ -289,8 +289,8 @@ void SwBaseLink::DataChanged( const String& rMimeType,
if( pESh )
{
- const BOOL bEndActionByVirDev = pESh->IsEndActionByVirDev();
- pESh->SetEndActionByVirDev( TRUE );
+ const sal_Bool bEndActionByVirDev = pESh->IsEndActionByVirDev();
+ pESh->SetEndActionByVirDev( sal_True );
pESh->EndAllAction();
pESh->SetEndActionByVirDev( bEndActionByVirDev );
}
@@ -298,13 +298,13 @@ void SwBaseLink::DataChanged( const String& rMimeType,
pSh->EndAction();
if( pSh && !bLockView )
- pSh->LockView( FALSE );
+ pSh->LockView( sal_False );
}
}
-BOOL SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd )
+sal_Bool SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ViewShell *pSh;
CurrShell *pCurr = 0;
if ( pGrfNd->GetDoc()->GetEditShell( &pSh ) )
@@ -342,7 +342,7 @@ BOOL SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd )
SwFmtFrmSize aAttr( rOldAttr );
aAttr.SetSize( aCalcSz );
pFmt->SetFmtAttr( aAttr );
- bRet = TRUE;
+ bRet = sal_True;
}
if( !aSz.Width() )
@@ -357,16 +357,16 @@ BOOL SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd )
0 != (pANd = pDoc->GetNodes()[pAPos->nNode]) &&
0 != (pTblNd = pANd->FindTableNode()) )
{
- const BOOL bLastGrf = !pTblNd->GetTable().DecGrfsThatResize();
+ const sal_Bool bLastGrf = !pTblNd->GetTable().DecGrfsThatResize();
SwHTMLTableLayout *pLayout =
pTblNd->GetTable().GetHTMLTableLayout();
if( pLayout )
{
- const USHORT nBrowseWidth =
+ const sal_uInt16 nBrowseWidth =
pLayout->GetBrowseWidthByTable( *pDoc );
if ( nBrowseWidth )
{
- pLayout->Resize( nBrowseWidth, TRUE, TRUE,
+ pLayout->Resize( nBrowseWidth, sal_True, sal_True,
bLastGrf ? HTMLTABLE_RESIZE_NOW
: 500 );
}
@@ -386,11 +386,11 @@ BOOL SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd )
}
-BOOL SwBaseLink::SwapIn( BOOL bWaitForData, BOOL bNativFormat )
+sal_Bool SwBaseLink::SwapIn( sal_Bool bWaitForData, sal_Bool bNativFormat )
{
- bSwapIn = TRUE;
+ bSwapIn = sal_True;
- BOOL bRes;
+ sal_Bool bRes;
if( !GetObj() && ( bNativFormat || ( !IsSynchron() && bWaitForData ) ))
{
@@ -439,27 +439,27 @@ BOOL SwBaseLink::SwapIn( BOOL bWaitForData, BOOL bNativFormat )
if( bWaitForData && !GetObj() )
{
ASSERT( !this, "das SvxFileObject wurde in einem GetData geloescht!" );
- bRes = FALSE;
+ bRes = sal_False;
}
else if( 0 != ( bRes = aValue.hasValue() ) )
{
//JP 14.04.99: Bug 64820 - das Flag muss beim SwapIn natuerlich
// zurueckgesetzt werden. Die Daten sollen ja neu
// uebernommen werden
- bIgnoreDataChanged = FALSE;
+ bIgnoreDataChanged = sal_False;
DataChanged( aMimeType, aValue );
}
}
else if( !IsSynchron() && bWaitForData )
{
- SetSynchron( TRUE );
+ SetSynchron( sal_True );
bRes = Update();
- SetSynchron( FALSE );
+ SetSynchron( sal_False );
}
else
bRes = Update();
- bSwapIn = FALSE;
+ bSwapIn = sal_False;
// --> OD 2005-04-11 #i46300# - deactivate fix for issues i9861 and i33293
// if ( pTBIS && pTBIS->isTouched() )
@@ -511,7 +511,7 @@ const SwNode* SwBaseLink::GetAnchor() const
return 0;
}
-BOOL SwBaseLink::IsRecursion( const SwBaseLink* pChkLnk ) const
+sal_Bool SwBaseLink::IsRecursion( const SwBaseLink* pChkLnk ) const
{
SwServerObjectRef aRef( (SwServerObject*)GetObj() );
if( aRef.Is() )
@@ -521,14 +521,14 @@ BOOL SwBaseLink::IsRecursion( const SwBaseLink* pChkLnk ) const
// handelt es sich um eine Rekursion.
return aRef->IsLinkInServer( pChkLnk );
}
- return FALSE;
+ return sal_False;
}
-BOOL SwBaseLink::IsInRange( ULONG, ULONG, xub_StrLen, xub_StrLen ) const
+sal_Bool SwBaseLink::IsInRange( sal_uLong, sal_uLong, xub_StrLen, xub_StrLen ) const
{
// Grafik oder OLE-Links nicht,
// Felder oder Sections haben eigene Ableitung!
- return FALSE;
+ return sal_False;
}
SwBaseLink::~SwBaseLink()
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 766c3ca86377..c510705c533c 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -180,8 +180,8 @@ SwContact* GetUserCall( const SdrObject* pObj )
return static_cast<SwContact*>(pObj->GetUserCall());
}
-// liefert TRUE falls das SrdObject ein Marquee-Object (Lauftext) ist
-BOOL IsMarqueeTextObj( const SdrObject& rObj )
+// liefert sal_True falls das SrdObject ein Marquee-Object (Lauftext) ist
+sal_Bool IsMarqueeTextObj( const SdrObject& rObj )
{
SdrTextAniKind eTKind;
return SdrInventor == rObj.GetObjInventor() &&
@@ -252,7 +252,7 @@ void SwContact::MoveObjToVisibleLayer( SdrObject* _pDrawObj )
if ( pAnchoredObj->GetPageFrm() )
{
::Notify_Background( _pDrawObj, pAnchoredObj->GetPageFrm(),
- pAnchoredObj->GetObjRect(), PREP_FLY_ARRIVE, TRUE );
+ pAnchoredObj->GetObjRect(), PREP_FLY_ARRIVE, sal_True );
}
pAnchoredObj->InvalidateObjPos();
@@ -286,7 +286,7 @@ void SwContact::MoveObjToInvisibleLayer( SdrObject* _pDrawObj )
if ( pAnchoredObj && pAnchoredObj->GetPageFrm() )
{
::Notify_Background( _pDrawObj, pAnchoredObj->GetPageFrm(),
- pAnchoredObj->GetObjRect(), PREP_FLY_LEAVE, TRUE );
+ pAnchoredObj->GetObjRect(), PREP_FLY_LEAVE, sal_True );
}
}
// <--
@@ -365,7 +365,7 @@ void SwContact::_MoveObjToLayer( const bool _bToVisible,
static_cast<SdrObjGroup*>(_pDrawObj)->GetSubList();
if ( pLst )
{
- for ( USHORT i = 0; i < pLst->GetObjCount(); ++i )
+ for ( sal_uInt16 i = 0; i < pLst->GetObjCount(); ++i )
{
_MoveObjToLayer( _bToVisible, pLst->GetObj( i ) );
}
@@ -565,7 +565,7 @@ SwVirtFlyDrawObj *SwFlyDrawContact::CreateNewRef( SwFlyFrm *pFly )
SdrPage* pPg( 0L );
if ( 0 != ( pPg = GetMaster()->GetPage() ) )
{
- const UINT32 nOrdNum = GetMaster()->GetOrdNum();
+ const sal_uInt32 nOrdNum = GetMaster()->GetOrdNum();
pPg->ReplaceObject( pDrawObj, nOrdNum );
}
// --> OD 2004-08-16 #i27030# - insert new <SwVirtFlyDrawObj> instance
@@ -744,7 +744,7 @@ bool CheckControlLayer( const SdrObject *pObj )
if ( pObj->ISA( SdrObjGroup ) )
{
const SdrObjList *pLst = ((SdrObjGroup*)pObj)->GetSubList();
- for ( USHORT i = 0; i < pLst->GetObjCount(); ++i )
+ for ( sal_uInt16 i = 0; i < pLst->GetObjCount(); ++i )
{
if ( ::CheckControlLayer( pLst->GetObj( i ) ) )
{
@@ -765,7 +765,7 @@ SwDrawContact::SwDrawContact( SwFrmFmt* pToRegisterIn, SdrObject* pObj ) :
// --> OD 2006-01-18 #129959#
mbUserCallActive( false ),
// Note: value of <meEventTypeOfCurrentUserCall> isn't of relevance, because
- // <mbUserCallActive> is FALSE.
+ // <mbUserCallActive> is sal_False.
meEventTypeOfCurrentUserCall( SDRUSERCALL_MOVEONLY )
// <--
{
@@ -1142,7 +1142,7 @@ void SwDrawContact::NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect )
aOldRect.Pos() += pDrawVirtObj->GetOffset();
if( aOldRect.HasArea() )
::Notify_Background( pDrawVirtObj, pPage,
- aOldRect, PREP_FLY_LEAVE,TRUE);
+ aOldRect, PREP_FLY_LEAVE,sal_True);
}
// --> OD 2004-10-21 #i34640# - include spacing for wrapping
SwRect aRect( pDrawVirtObj->GetAnchoredObj()->GetObjRectWithSpaces() );
@@ -1154,7 +1154,7 @@ void SwDrawContact::NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect )
// <--
if ( pPg )
::Notify_Background( pDrawVirtObj, pPg, aRect,
- PREP_FLY_ARRIVE, TRUE );
+ PREP_FLY_ARRIVE, sal_True );
}
::ClrContourCache( pDrawVirtObj );
}
@@ -1184,7 +1184,7 @@ void lcl_NotifyBackgroundOfObj( SwDrawContact& _rDrawContact,
SwPageFrm* pOldPageFrm = (SwPageFrm*)::FindPage( aOldRect, pPageFrm );
// <--
::Notify_Background( &_rObj, pOldPageFrm, aOldRect,
- PREP_FLY_LEAVE, TRUE);
+ PREP_FLY_LEAVE, sal_True);
}
}
// --> OD 2004-10-21 #i34640# - include spacing for wrapping
@@ -1194,7 +1194,7 @@ void lcl_NotifyBackgroundOfObj( SwDrawContact& _rDrawContact,
{
pPageFrm = (SwPageFrm*)::FindPage( aNewRect, pPageFrm );
::Notify_Background( &_rObj, pPageFrm, aNewRect,
- PREP_FLY_ARRIVE, TRUE );
+ PREP_FLY_ARRIVE, sal_True );
}
ClrContourCache( &_rObj );
}
@@ -1597,12 +1597,12 @@ namespace
{
static const SwFmtAnchor* lcl_getAnchorFmt( const SfxPoolItem& _rItem )
{
- USHORT nWhich = _rItem.Which();
+ sal_uInt16 nWhich = _rItem.Which();
const SwFmtAnchor* pAnchorFmt = NULL;
if ( RES_ATTRSET_CHG == nWhich )
{
static_cast<const SwAttrSetChg&>(_rItem).GetChgSet()->
- GetItemState( RES_ANCHOR, FALSE, (const SfxPoolItem**)&pAnchorFmt );
+ GetItemState( RES_ANCHOR, sal_False, (const SfxPoolItem**)&pAnchorFmt );
}
else if ( RES_ANCHOR == nWhich )
{
@@ -1627,14 +1627,14 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
ASSERT( !mbDisconnectInProgress,
"<SwDrawContact::Modify(..)> called during disconnection.");
- USHORT nWhich = pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
const SwFmtAnchor* pNewAnchorFmt = pNew ? lcl_getAnchorFmt( *pNew ) : NULL;
if ( pNewAnchorFmt )
{
// JP 10.04.95: nicht auf ein Reset Anchor reagieren !!!!!
if ( SFX_ITEM_SET ==
- GetFmt()->GetAttrSet().GetItemState( RES_ANCHOR, FALSE ) )
+ GetFmt()->GetAttrSet().GetItemState( RES_ANCHOR, sal_False ) )
{
// OD 10.10.2003 #112299# - no connect to layout during disconnection
if ( !mbDisconnectInProgress )
@@ -1688,11 +1688,11 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
RES_WRAP_INFLUENCE_ON_OBJPOS == nWhich ||
( RES_ATTRSET_CHG == nWhich &&
( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_SURROUND, FALSE ) ||
+ RES_SURROUND, sal_False ) ||
SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_OPAQUE, FALSE ) ||
+ RES_OPAQUE, sal_False ) ||
SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_WRAP_INFLUENCE_ON_OBJPOS, FALSE ) ) ) )
+ RES_WRAP_INFLUENCE_ON_OBJPOS, sal_False ) ) ) )
{
lcl_NotifyBackgroundOfObj( *this, *GetMaster(), 0L );
NotifyBackgrdOfAllVirtObjs( 0L );
@@ -1704,15 +1704,15 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
RES_FOLLOW_TEXT_FLOW == nWhich ||
( RES_ATTRSET_CHG == nWhich &&
( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_LR_SPACE, FALSE ) ||
+ RES_LR_SPACE, sal_False ) ||
SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_UL_SPACE, FALSE ) ||
+ RES_UL_SPACE, sal_False ) ||
SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_HORI_ORIENT, FALSE ) ||
+ RES_HORI_ORIENT, sal_False ) ||
SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_VERT_ORIENT, FALSE ) ||
+ RES_VERT_ORIENT, sal_False ) ||
SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_FOLLOW_TEXT_FLOW, FALSE ) ) ) )
+ RES_FOLLOW_TEXT_FLOW, sal_False ) ) ) )
{
lcl_NotifyBackgroundOfObj( *this, *GetMaster(), 0L );
NotifyBackgrdOfAllVirtObjs( 0L );
@@ -1827,7 +1827,7 @@ void SwDrawContact::DisconnectFromLayout( bool _bMoveMasterToInvisibleLayer )
for( SdrView* pView = aIter.FirstView(); pView;
pView = aIter.NextView() )
{
- pView->MarkObj( GetMaster(), pView->GetSdrPageView(), TRUE );
+ pView->MarkObj( GetMaster(), pView->GetSdrPageView(), sal_True );
}
// OD 25.06.2003 #108784# - Instead of removing 'master' object from
@@ -1969,10 +1969,10 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
{
case FLY_AT_PAGE:
{
- USHORT nPgNum = pAnch->GetPageNum();
+ sal_uInt16 nPgNum = pAnch->GetPageNum();
SwPageFrm *pPage = static_cast<SwPageFrm*>(pRoot->Lower());
- for ( USHORT i = 1; i < nPgNum && pPage; ++i )
+ for ( sal_uInt16 i = 1; i < nPgNum && pPage; ++i )
{
pPage = static_cast<SwPageFrm*>(pPage->GetNext());
}
@@ -2105,7 +2105,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
}
break;
default:
- ASSERT( FALSE, "Unknown Anchor." )
+ ASSERT( sal_False, "Unknown Anchor." )
break;
}
if ( GetAnchorFrm() )
@@ -2636,7 +2636,7 @@ SdrHdl* SwDrawVirtObj::GetHdl(sal_uInt32 nHdlNum) const
return pHdl;
}
-SdrHdl* SwDrawVirtObj::GetPlusHdl(const SdrHdl& rHdl, USHORT nPlNum) const
+SdrHdl* SwDrawVirtObj::GetPlusHdl(const SdrHdl& rHdl, sal_uInt16 nPlNum) const
{
SdrHdl* pHdl = rRefObj.GetPlusHdl(rHdl, nPlNum);
pHdl->SetPos(pHdl->GetPos() + GetOffset());
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 75111933e0ec..29def9485518 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -73,7 +73,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star;
-static BOOL bInResize = FALSE;
+static sal_Bool bInResize = sal_False;
TYPEINIT1( SwFlyDrawObj, SdrObject )
TYPEINIT1( SwVirtFlyDrawObj, SdrVirtObj )
@@ -158,19 +158,19 @@ SwFlyDrawObj::~SwFlyDrawObj()
|*
*************************************************************************/
-UINT32 __EXPORT SwFlyDrawObj::GetObjInventor() const
+sal_uInt32 __EXPORT SwFlyDrawObj::GetObjInventor() const
{
return SWGInventor;
}
-UINT16 __EXPORT SwFlyDrawObj::GetObjIdentifier() const
+sal_uInt16 __EXPORT SwFlyDrawObj::GetObjIdentifier() const
{
return SwFlyDrawObjIdentifier;
}
-UINT16 __EXPORT SwFlyDrawObj::GetObjVersion() const
+sal_uInt16 __EXPORT SwFlyDrawObj::GetObjVersion() const
{
return SwDrawFirst;
}
@@ -429,7 +429,7 @@ SwVirtFlyDrawObj::SwVirtFlyDrawObj(SdrObject& rNew, SwFlyFrm* pFly) :
pFlyFrm( pFly )
{
//#110094#-1
- // bNotPersistent = bNeedColorRestore = bWriterFlyFrame = TRUE;
+ // bNotPersistent = bNeedColorRestore = bWriterFlyFrame = sal_True;
const SvxProtectItem &rP = pFlyFrm->GetFmt()->GetProtect();
bMovProt = rP.IsPosProtected();
bSizProt = rP.IsSizeProtected();
@@ -522,13 +522,13 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject() const
void __EXPORT SwVirtFlyDrawObj::TakeObjInfo( SdrObjTransformInfoRec& rInfo ) const
{
rInfo.bSelectAllowed = rInfo.bMoveAllowed =
- rInfo.bResizeFreeAllowed = rInfo.bResizePropAllowed = TRUE;
+ rInfo.bResizeFreeAllowed = rInfo.bResizePropAllowed = sal_True;
rInfo.bRotateFreeAllowed = rInfo.bRotate90Allowed =
rInfo.bMirrorFreeAllowed = rInfo.bMirror45Allowed =
rInfo.bMirror90Allowed = rInfo.bShearAllowed =
rInfo.bCanConvToPath = rInfo.bCanConvToPoly =
- rInfo.bCanConvToPathLineToArea = rInfo.bCanConvToPolyLineToArea = FALSE;
+ rInfo.bCanConvToPathLineToArea = rInfo.bCanConvToPolyLineToArea = sal_False;
}
@@ -700,7 +700,7 @@ void __EXPORT SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
RES_VERT_ORIENT, RES_HORI_ORIENT );
SwFmtHoriOrient aHori( pFmt->GetHoriOrient() );
SwFmtVertOrient aVert( pFmt->GetVertOrient() );
- BOOL bPut = FALSE;
+ sal_Bool bPut = sal_False;
if( !GetFlyFrm()->IsFlyLayFrm() &&
::GetHtmlMode(pFmt->GetDoc()->GetDocShell()) )
@@ -709,7 +709,7 @@ void __EXPORT SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
//Einzig einen Snap auf Links/Rechts bzw. Linker-/Rechter-Rand koennen
//wir versuchen.
const SwFrm* pAnch = GetFlyFrm()->GetAnchorFrm();
- BOOL bNextLine = FALSE;
+ sal_Bool bNextLine = sal_False;
if( !GetFlyFrm()->IsAutoPos() || text::RelOrientation::PAGE_FRAME != aHori.GetRelationOrient() )
{
@@ -720,9 +720,9 @@ void __EXPORT SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
}
else
{
- bNextLine = TRUE;
+ bNextLine = sal_True;
//Horizontale Ausrichtung:
- const BOOL bLeftFrm =
+ const sal_Bool bLeftFrm =
aFlyRect.Left() < pAnch->Frm().Left() + pAnch->Prt().Left(),
bLeftPrt = aFlyRect.Left() + aFlyRect.Width() <
pAnch->Frm().Left() + pAnch->Prt().Width()/2;
@@ -733,7 +733,7 @@ void __EXPORT SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
}
else
{
- const BOOL bRightFrm = aFlyRect.Left() >
+ const sal_Bool bRightFrm = aFlyRect.Left() >
pAnch->Frm().Left() + pAnch->Prt().Width();
aHori.SetHoriOrient( text::HoriOrientation::RIGHT );
aHori.SetRelationOrient( bRightFrm ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA );
@@ -743,7 +743,7 @@ void __EXPORT SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
}
//Vertikale Ausrichtung bleibt grundsaetzlich schlicht erhalten,
//nur bei nicht automatischer Ausrichtung wird umgeschaltet.
- BOOL bRelChar = text::RelOrientation::CHAR == eRelVert;
+ sal_Bool bRelChar = text::RelOrientation::CHAR == eRelVert;
aVert.SetVertOrient( eVert != text::VertOrientation::NONE ? eVert :
GetFlyFrm()->IsFlyInCntFrm() ? text::VertOrientation::CHAR_CENTER :
bRelChar && bNextLine ? text::VertOrientation::CHAR_TOP : text::VertOrientation::TOP );
@@ -752,7 +752,7 @@ void __EXPORT SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
else
aVert.SetRelationOrient( text::RelOrientation::PRINT_AREA );
aSet.Put( aVert );
- bPut = TRUE;
+ bPut = sal_True;
}
//Automatische Ausrichtungen wollen wir moeglichst nicht verlieren.
@@ -763,14 +763,14 @@ void __EXPORT SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
aHori.SetHoriOrient( eHori );
aHori.SetRelationOrient( eRelHori );
aSet.Put( aHori );
- bPut = TRUE;
+ bPut = sal_True;
}
if ( text::VertOrientation::NONE != eVert )
{
aVert.SetVertOrient( eVert );
aVert.SetRelationOrient( eRelVert );
aSet.Put( aVert );
- bPut = TRUE;
+ bPut = sal_True;
}
}
if ( bPut )
@@ -808,7 +808,7 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef,
const SwFmtCol& rCol = rAttrs.GetAttrSet().GetCol();
if ( rCol.GetColumns().Count() > 1 )
{
- for ( USHORT i = 0; i < rCol.GetColumns().Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rCol.GetColumns().Count(); ++i )
{
nMin += rCol.GetColumns()[i]->GetLeft() +
rCol.GetColumns()[i]->GetRight() +
@@ -846,10 +846,10 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef,
}
if ( aFrmSz.GetWidthPercent() && aFrmSz.GetWidthPercent() != 0xFF &&
aOldFrmSz.GetWidth() != aFrmSz.GetWidth() )
- aFrmSz.SetWidthPercent( BYTE(aSz.Width() * 100L / nRelWidth + 0.5) );
+ aFrmSz.SetWidthPercent( sal_uInt8(aSz.Width() * 100L / nRelWidth + 0.5) );
if ( aFrmSz.GetHeightPercent() && aFrmSz.GetHeightPercent() != 0xFF &&
aOldFrmSz.GetHeight() != aFrmSz.GetHeight() )
- aFrmSz.SetHeightPercent( BYTE(aSz.Height() * 100L / nRelHeight + 0.5) );
+ aFrmSz.SetHeightPercent( sal_uInt8(aSz.Height() * 100L / nRelHeight + 0.5) );
pFmt->GetDoc()->SetAttr( aFrmSz, *pFmt );
}
}
@@ -873,9 +873,9 @@ void __EXPORT SwVirtFlyDrawObj::NbcResize(const Point& rRef,
}
else if ( aOutRect.TopLeft() != aNewPos )
aOutRect.SetPos( aNewPos );
- bInResize = TRUE;
+ bInResize = sal_True;
NbcMove( Size( 0, 0 ) );
- bInResize = FALSE;
+ bInResize = sal_False;
}
}
@@ -884,7 +884,7 @@ void __EXPORT SwVirtFlyDrawObj::Move(const Size& rSiz)
{
NbcMove( rSiz );
SetChanged();
- GetFmt()->GetDoc()->SetNoDrawUndoObj( TRUE );
+ GetFmt()->GetDoc()->SetNoDrawUndoObj( sal_True );
}
@@ -893,7 +893,7 @@ void __EXPORT SwVirtFlyDrawObj::Resize(const Point& rRef,
{
NbcResize( rRef, xFact, yFact );
SetChanged();
- GetFmt()->GetDoc()->SetNoDrawUndoObj( TRUE );
+ GetFmt()->GetDoc()->SetNoDrawUndoObj( sal_True );
}
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index 694599181b81..8c774bcdeba1 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -63,7 +63,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::frame;
-SwDPage::SwDPage(SwDrawDocument& rNewModel, BOOL bMasterPage) :
+SwDPage::SwDPage(SwDrawDocument& rNewModel, sal_Bool bMasterPage) :
FmFormPage(rNewModel, 0, bMasterPage),
pGridLst( 0 ),
rDoc(rNewModel.GetDoc())
@@ -85,7 +85,7 @@ SwDPage::~SwDPage()
|*
*************************************************************************/
-SdrObject* SwDPage::ReplaceObject( SdrObject* pNewObj, ULONG nObjNum )
+SdrObject* SwDPage::ReplaceObject( SdrObject* pNewObj, sal_uLong nObjNum )
{
SdrObject *pOld = GetObj( nObjNum );
ASSERT( pOld, "Oups, Object not replaced" );
@@ -156,10 +156,10 @@ const SdrPageGridFrameList* SwDPage::GetGridFrameList(
return pGridLst;
}
-BOOL SwDPage::RequestHelp( Window* pWindow, SdrView* pView,
+sal_Bool SwDPage::RequestHelp( Window* pWindow, SdrView* pView,
const HelpEvent& rEvt )
{
- BOOL bWeiter = TRUE;
+ sal_Bool bWeiter = sal_True;
if( rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON ))
{
@@ -210,7 +210,7 @@ BOOL SwDPage::RequestHelp( Window* pWindow, SdrView* pView,
if ( sTxt.Len() )
{
// --> OD 2007-07-26 #i80029#
- BOOL bExecHyperlinks = rDoc.GetDocShell()->IsReadOnly();
+ sal_Bool bExecHyperlinks = rDoc.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
@@ -235,7 +235,7 @@ BOOL SwDPage::RequestHelp( Window* pWindow, SdrView* pView,
Rectangle aRect( rEvt.GetMousePosPixel(), Size(1,1) );
Help::ShowQuickHelp( pWindow, aRect, sTxt );
}
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
}
diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx
index 650edcfceaed..be94db96d47f 100644
--- a/sw/source/core/draw/drawdoc.cxx
+++ b/sw/source/core/draw/drawdoc.cxx
@@ -68,11 +68,11 @@ const String GetPalettePath()
SwDrawDocument::SwDrawDocument( SwDoc* pD ) :
FmFormModel( ::GetPalettePath(), &pD->GetAttrPool(),
- pD->GetDocShell(), TRUE ),
+ pD->GetDocShell(), sal_True ),
pDoc( pD )
{
SetScaleUnit( MAP_TWIP );
- SetSwapGraphics( TRUE );
+ SetSwapGraphics( sal_True );
SwDocShell* pDocSh = pDoc->GetDocShell();
if ( pDocSh )
@@ -102,7 +102,7 @@ SwDrawDocument::SwDrawDocument( SwDoc* pD ) :
SfxItemPool* pSdrPool = pD->GetAttrPool().GetSecondaryPool();
if( pSdrPool )
{
- const USHORT aWhichRanges[] =
+ const sal_uInt16 aWhichRanges[] =
{
RES_CHRATR_BEGIN, RES_CHRATR_END,
RES_PARATR_BEGIN, RES_PARATR_END,
@@ -110,11 +110,11 @@ SwDrawDocument::SwDrawDocument( SwDoc* pD ) :
};
SfxItemPool& rDocPool = pD->GetAttrPool();
- USHORT nEdtWhich, nSlotId;
+ sal_uInt16 nEdtWhich, nSlotId;
const SfxPoolItem* pItem;
- for( const USHORT* pRangeArr = aWhichRanges;
+ for( const sal_uInt16* pRangeArr = aWhichRanges;
*pRangeArr; pRangeArr += 2 )
- for( USHORT nW = *pRangeArr, nEnd = *(pRangeArr+1);
+ for( sal_uInt16 nW = *pRangeArr, nEnd = *(pRangeArr+1);
nW < nEnd; ++nW )
if( 0 != (pItem = rDocPool.GetPoolDefaultItem( nW )) &&
0 != (nSlotId = rDocPool.GetSlotId( nW ) ) &&
@@ -131,7 +131,7 @@ SwDrawDocument::SwDrawDocument( SwDoc* pD ) :
SetForbiddenCharsTable( pD->getForbiddenCharacterTable() );
// #87795# Implementation for asian compression
- SetCharCompressType( static_cast<UINT16>(pD->getCharacterCompressionType() ));
+ SetCharCompressType( static_cast<sal_uInt16>(pD->getCharacterCompressionType() ));
}
/*************************************************************************
@@ -196,7 +196,7 @@ SvStream* SwDrawDocument::GetDocumentStream( SdrDocumentStreamInfo& rInfo ) cons
pRet = utl::UcbStreamHelper::CreateStream( xStream );
if( pRet )
{
- rInfo.mbDeleteAfterUse = TRUE;
+ rInfo.mbDeleteAfterUse = sal_True;
rInfo.mxStorageRef = xPictureStorage;
}
}
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 441b474c6b27..38ca0fd6e96f 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -77,17 +77,17 @@ class SwSdrHdl : public SdrHdl
public:
SwSdrHdl(const Point& rPnt, bool bTopRight ) :
SdrHdl( rPnt, bTopRight ? HDL_ANCHOR_TR : HDL_ANCHOR ) {}
- virtual BOOL IsFocusHdl() const;
+ virtual sal_Bool IsFocusHdl() const;
};
-BOOL SwSdrHdl::IsFocusHdl() const
+sal_Bool SwSdrHdl::IsFocusHdl() const
{
if( HDL_ANCHOR == eKind || HDL_ANCHOR_TR == eKind )
- return TRUE;
+ return sal_True;
return SdrHdl::IsFocusHdl();
}
-const SwFrm *lcl_FindAnchor( const SdrObject *pObj, BOOL bAll )
+const SwFrm *lcl_FindAnchor( const SdrObject *pObj, sal_Bool bAll )
{
const SwVirtFlyDrawObj *pVirt = pObj->ISA(SwVirtFlyDrawObj) ?
(SwVirtFlyDrawObj*)pObj : 0;
@@ -120,18 +120,18 @@ SwDrawView::SwDrawView( SwViewImp &rI, SdrModel *pMd, OutputDevice *pOutDev) :
FmFormView( (FmFormModel*)pMd, pOutDev ),
rImp( rI )
{
- SetPageVisible( FALSE );
- SetBordVisible( FALSE );
- SetGridVisible( FALSE );
- SetHlplVisible( FALSE );
- SetGlueVisible( FALSE );
- SetFrameDragSingles( TRUE );
- SetVirtualObjectBundling( TRUE );
- SetSwapAsynchron( TRUE );
-
- EnableExtendedKeyInputDispatcher( FALSE );
- EnableExtendedMouseEventDispatcher( FALSE );
- EnableExtendedCommandEventDispatcher( FALSE );
+ SetPageVisible( sal_False );
+ SetBordVisible( sal_False );
+ SetGridVisible( sal_False );
+ SetHlplVisible( sal_False );
+ SetGlueVisible( sal_False );
+ SetFrameDragSingles( sal_True );
+ SetVirtualObjectBundling( sal_True );
+ SetSwapAsynchron( sal_True );
+
+ EnableExtendedKeyInputDispatcher( sal_False );
+ EnableExtendedMouseEventDispatcher( sal_False );
+ EnableExtendedCommandEventDispatcher( sal_False );
SetHitTolerancePixel( GetMarkHdlSizePixel()/2 );
@@ -153,7 +153,7 @@ sal_Bool SwDrawView::IsAntiAliasing() const
//////////////////////////////////////////////////////////////////////////////
-SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, USHORT nTol, const SdrMarkList &rMrkList)
+SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, sal_uInt16 nTol, const SdrMarkList &rMrkList)
{
if(!nTol)
{
@@ -212,7 +212,7 @@ SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, USHORT n
return pRetval;
}
-SdrObject* SwDrawView::CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const
+SdrObject* SwDrawView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const
{
// call parent
SdrObject* pRetval = FmFormView::CheckSingleSdrObjectHit(rPnt, nTol, pObj, pPV, nOptions, pMVisLay);
@@ -296,7 +296,7 @@ SdrObject* SwDrawView::GetMaxToTopObj( SdrObject* pObj ) const
{
if ( GetUserCall(pObj) )
{
- const SwFrm *pAnch = ::lcl_FindAnchor( pObj, FALSE );
+ const SwFrm *pAnch = ::lcl_FindAnchor( pObj, sal_False );
if ( pAnch )
{
//Das oberste Obj innerhalb des Ankers darf nicht ueberholt
@@ -307,15 +307,15 @@ SdrObject* SwDrawView::GetMaxToTopObj( SdrObject* pObj ) const
const SwPageFrm *pPage = pFly->FindPageFrm();
if ( pPage->GetSortedObjs() )
{
- UINT32 nOrdNum = 0;
- for ( USHORT i = 0; i < pPage->GetSortedObjs()->Count(); ++i )
+ sal_uInt32 nOrdNum = 0;
+ for ( sal_uInt16 i = 0; i < pPage->GetSortedObjs()->Count(); ++i )
{
const SdrObject *pO =
(*pPage->GetSortedObjs())[i]->GetDrawObj();
if ( pO->GetOrdNumDirect() > nOrdNum )
{
- const SwFrm *pTmpAnch = ::lcl_FindAnchor( pO, FALSE );
+ const SwFrm *pTmpAnch = ::lcl_FindAnchor( pO, sal_False );
if ( pFly->IsAnLower( pTmpAnch ) )
{
nOrdNum = pO->GetOrdNumDirect();
@@ -352,7 +352,7 @@ SdrObject* SwDrawView::GetMaxToBtmObj(SdrObject* pObj) const
{
if ( GetUserCall(pObj) )
{
- const SwFrm *pAnch = ::lcl_FindAnchor( pObj, FALSE );
+ const SwFrm *pAnch = ::lcl_FindAnchor( pObj, sal_False );
if ( pAnch )
{
//Der Fly des Ankers darf nicht "unterflogen" werden.
@@ -376,22 +376,22 @@ SdrObject* SwDrawView::GetMaxToBtmObj(SdrObject* pObj) const
|*
*************************************************************************/
-inline BOOL lcl_IsChild( SdrObject *pParent, SdrObject *pChild )
+inline sal_Bool lcl_IsChild( SdrObject *pParent, SdrObject *pChild )
{
if ( pParent->ISA(SwVirtFlyDrawObj) )
{
- const SwFrm *pAnch = lcl_FindAnchor( pChild, FALSE );
+ const SwFrm *pAnch = lcl_FindAnchor( pChild, sal_False );
if ( pAnch && ((SwVirtFlyDrawObj*)pParent)->GetFlyFrm()->IsAnLower( pAnch ))
{
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
inline SdrObject *lcl_FindParent( SdrObject *pObj )
{
- const SwFrm *pAnch = lcl_FindAnchor( pObj, FALSE );
+ const SwFrm *pAnch = lcl_FindAnchor( pObj, sal_False );
if ( pAnch && pAnch->IsInFly() )
return (SdrObject*)pAnch->FindFlyFrm()->GetVirtDrawObj();
return 0;
@@ -424,7 +424,7 @@ sal_uInt32 SwDrawView::_GetMaxChildOrdNum( const SwFlyFrm& _rParentObj,
}
if ( pObj->GetOrdNum() > nMaxChildOrdNum &&
- _rParentObj.IsAnLower( lcl_FindAnchor( pObj, TRUE ) ) )
+ _rParentObj.IsAnLower( lcl_FindAnchor( pObj, sal_True ) ) )
{
nMaxChildOrdNum = pObj->GetOrdNum();
break;
@@ -525,8 +525,8 @@ void SwDrawView::_MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
}
// --> OD 2004-08-20 #110810# - adjustment and re-factoring of method
-void SwDrawView::ObjOrderChanged( SdrObject* pObj, ULONG nOldPos,
- ULONG nNewPos )
+void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
+ sal_uLong nNewPos )
{
// --> OD 2004-08-17 #110810# - nothing to do for group members
if ( pObj->GetUpGroup() )
@@ -650,7 +650,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, ULONG nOldPos,
// If object is anchored inside a invisible part of the document
// (e.g. page header, whose page style isn't applied, or hidden
// section), no anchor frame exists.
- const SwFrm* pTmpAnchorFrm = lcl_FindAnchor( pTmpObj, TRUE );
+ const SwFrm* pTmpAnchorFrm = lcl_FindAnchor( pTmpObj, sal_True );
const SwFlyFrm* pTmpParentObj = pTmpAnchorFrm
? pTmpAnchorFrm->FindFlyFrm() : 0L;
// <--
@@ -704,7 +704,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, ULONG nOldPos,
// If object is anchored inside a invisible part of the document
// (e.g. page header, whose page style isn't applied, or hidden
// section), no anchor frame exists.
- const SwFrm* pTmpAnchorFrm = lcl_FindAnchor( pTmpObj, TRUE );
+ const SwFrm* pTmpAnchorFrm = lcl_FindAnchor( pTmpObj, sal_True );
const SwFlyFrm* pTmpParentObj = pTmpAnchorFrm
? pTmpAnchorFrm->FindFlyFrm() : 0L;
// <--
@@ -764,11 +764,11 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, ULONG nOldPos,
*************************************************************************/
-BOOL SwDrawView::TakeDragLimit( SdrDragMode eMode,
+sal_Bool SwDrawView::TakeDragLimit( SdrDragMode eMode,
Rectangle& rRect ) const
{
const SdrMarkList &rMrkList = GetMarkedObjectList();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( 1 == rMrkList.GetMarkCount() )
{
const SdrObject *pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
@@ -776,7 +776,7 @@ BOOL SwDrawView::TakeDragLimit( SdrDragMode eMode,
if( ::CalcClipRect( pObj, aRect, eMode == SDRDRAG_MOVE ) )
{
rRect = aRect.SVRect();
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -804,7 +804,7 @@ const SwFrm* SwDrawView::CalcAnchor()
//der aktuelle Anker. Nur suchen wenn wir gerade draggen.
const SwFrm* pAnch;
Rectangle aMyRect;
- const BOOL bFly = pObj->ISA(SwVirtFlyDrawObj);
+ const sal_Bool bFly = pObj->ISA(SwVirtFlyDrawObj);
if ( bFly )
{
pAnch = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm()->GetAnchorFrm();
@@ -964,9 +964,9 @@ void SwDrawView::CheckPossibilities()
//OLE-Objekte konnen selbst einen Resize-Schutz wuenschen (StarMath)
const SdrMarkList &rMrkList = GetMarkedObjectList();
- BOOL bProtect = FALSE,
- bSzProtect = FALSE;
- for ( USHORT i = 0; !bProtect && i < rMrkList.GetMarkCount(); ++i )
+ sal_Bool bProtect = sal_False,
+ bSzProtect = sal_False;
+ for ( sal_uInt16 i = 0; !bProtect && i < rMrkList.GetMarkCount(); ++i )
{
const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
const SwFrm *pFrm = NULL;
@@ -989,7 +989,7 @@ void SwDrawView::CheckPossibilities()
// can be selected.
// TODO/LATER: retrieve Aspect - from where?!
- bSzProtect |= ( embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ) ) ? TRUE : FALSE;
+ bSzProtect |= ( embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ) ) ? sal_True : sal_False;
// <--
@@ -1019,12 +1019,12 @@ void SwDrawView::CheckPossibilities()
{
ASSERT( false,
"<SwDrawView::CheckPossibilities()> - missing frame format" );
- bProtect = TRUE;
+ bProtect = sal_True;
}
else if ((FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId()) &&
rMrkList.GetMarkCount() > 1 )
{
- bProtect = TRUE;
+ bProtect = sal_True;
}
}
}
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index b7e92570df42..9ac7ff7c64cb 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -126,7 +126,7 @@ void SwAutoCorrDoc::DeleteSel( SwPaM& rDelPam )
}
}
-BOOL SwAutoCorrDoc::Delete( xub_StrLen nStt, xub_StrLen nEnd )
+sal_Bool SwAutoCorrDoc::Delete( xub_StrLen nStt, xub_StrLen nEnd )
{
const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode;
SwPaM aSel( rNd, nStt, rNd, nEnd );
@@ -134,11 +134,11 @@ BOOL SwAutoCorrDoc::Delete( xub_StrLen nStt, xub_StrLen nEnd )
if( bUndoIdInitialized )
bUndoIdInitialized = true;
- return TRUE;
+ return sal_True;
}
-BOOL SwAutoCorrDoc::Insert( xub_StrLen nPos, const String& rTxt )
+sal_Bool SwAutoCorrDoc::Insert( xub_StrLen nPos, const String& rTxt )
{
SwPaM aPam( rCrsr.GetPoint()->nNode.GetNode(), nPos );
rEditSh.GetDoc()->InsertString( aPam, rTxt );
@@ -148,11 +148,11 @@ BOOL SwAutoCorrDoc::Insert( xub_StrLen nPos, const String& rTxt )
if( 1 == rTxt.Len() )
rEditSh.StartUndo( nUndoId = UNDO_AUTOCORRECT );
}
- return TRUE;
+ return sal_True;
}
-BOOL SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
+sal_Bool SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
{
SwPaM* pPam = &rCrsr;
if( pPam->GetPoint()->nContent.GetIndex() != nPos )
@@ -164,7 +164,7 @@ BOOL SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
SwTxtNode * const pNd = pPam->GetNode()->GetTxtNode();
if ( !pNd )
{
- return FALSE;
+ return sal_False;
}
// text attributes with dummy characters must not be replaced!
@@ -222,19 +222,19 @@ BOOL SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
if( pPam != &rCrsr )
delete pPam;
- return TRUE;
+ return sal_True;
}
-BOOL SwAutoCorrDoc::SetAttr( xub_StrLen nStt, xub_StrLen nEnd, USHORT nSlotId,
+sal_Bool SwAutoCorrDoc::SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nSlotId,
SfxPoolItem& rItem )
{
const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode;
SwPaM aPam( rNd, nStt, rNd, nEnd );
SfxItemPool& rPool = rEditSh.GetDoc()->GetAttrPool();
- USHORT nWhich = rPool.GetWhich( nSlotId, FALSE );
+ sal_uInt16 nWhich = rPool.GetWhich( nSlotId, sal_False );
if( nWhich )
{
rItem.SetWhich( nWhich );
@@ -252,7 +252,7 @@ BOOL SwAutoCorrDoc::SetAttr( xub_StrLen nStt, xub_StrLen nEnd, USHORT nSlotId,
-BOOL SwAutoCorrDoc::SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL )
+sal_Bool SwAutoCorrDoc::SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL )
{
const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode;
SwPaM aPam( rNd, nStt, rNd, nEnd );
@@ -263,17 +263,17 @@ BOOL SwAutoCorrDoc::SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String&
rEditSh.GetDoc()->SetFmtItemByAutoFmt( aPam, aSet );
if( bUndoIdInitialized )
bUndoIdInitialized = true;
- return TRUE;
+ return sal_True;
}
// returne den Text eines vorherigen Absatzes.
// Dieser darf nicht leer sein!
// Gibt es diesen nicht oder gibt es davor nur Leere, dann returne 0
// Das Flag gibt an:
- // TRUE: den, vor der normalen Einfuegeposition (TRUE)
- // FALSE: den, in den das korrigierte Wort eingfuegt wurde.
+ // sal_True: den, vor der normalen Einfuegeposition (sal_True)
+ // sal_False: den, in den das korrigierte Wort eingfuegt wurde.
// (Muss nicht der gleiche Absatz sein!!!!)
-const String* SwAutoCorrDoc::GetPrevPara( BOOL bAtNormalPos )
+const String* SwAutoCorrDoc::GetPrevPara( sal_Bool bAtNormalPos )
{
const String* pStr = 0;
@@ -298,7 +298,7 @@ const String* SwAutoCorrDoc::GetPrevPara( BOOL bAtNormalPos )
}
-BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
+sal_Bool SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
SvxAutoCorrect& rACorrect,
const String** ppPara )
{
@@ -310,16 +310,16 @@ BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
SwTxtNode* pTxtNd = rCrsr.GetNode()->GetTxtNode();
ASSERT( pTxtNd, "wo ist denn der TextNode?" );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nEndPos == rSttPos )
return bRet;
- LanguageType eLang = GetLanguage(nEndPos, FALSE);
+ LanguageType eLang = GetLanguage(nEndPos, sal_False);
if(LANGUAGE_SYSTEM == eLang)
eLang = (LanguageType)GetAppLanguage();
//JP 22.04.99: Bug 63883 - Sonderbehandlung fuer Punkte.
- BOOL bLastCharIsPoint = nEndPos < pTxtNd->GetTxt().Len() &&
+ sal_Bool bLastCharIsPoint = nEndPos < pTxtNd->GetTxt().Len() &&
'.' == pTxtNd->GetTxt().GetChar( nEndPos );
const SvxAutocorrWord* pFnd = rACorrect.SearchWordsInList(
@@ -338,13 +338,13 @@ BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
{
// replace the selection
pDoc->ReplaceRange( aPam, pFnd->GetLong(), false);
- bRet = TRUE;
+ bRet = sal_True;
}
}
else
{
- SwTextBlocks aTBlks( rACorrect.GetAutoCorrFileName( eLang, FALSE, TRUE ));
- USHORT nPos = aTBlks.GetIndex( pFnd->GetShort() );
+ SwTextBlocks aTBlks( rACorrect.GetAutoCorrFileName( eLang, sal_False, sal_True ));
+ sal_uInt16 nPos = aTBlks.GetIndex( pFnd->GetShort() );
if( USHRT_MAX != nPos && aTBlks.BeginGetDoc( nPos ) )
{
DeleteSel( aPam );
@@ -387,7 +387,7 @@ BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
(*pIdx)++;
pTxtNd = pIdx->GetNode().GetTxtNode();
}
- bRet = TRUE;
+ bRet = sal_True;
}
aTBlks.EndGetDoc();
}
@@ -405,17 +405,17 @@ BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
// - FnCptlSttSntnc
// gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten
// aufgenommen werden.
-void SwAutoCorrDoc::SaveCpltSttWord( ULONG nFlag, xub_StrLen nPos,
+void SwAutoCorrDoc::SaveCpltSttWord( sal_uLong nFlag, xub_StrLen nPos,
const String& rExceptWord,
sal_Unicode cChar )
{
- ULONG nNode = pIdx ? pIdx->GetIndex() : rCrsr.GetPoint()->nNode.GetIndex();
- LanguageType eLang = GetLanguage(nPos, FALSE);
+ sal_uLong nNode = pIdx ? pIdx->GetIndex() : rCrsr.GetPoint()->nNode.GetIndex();
+ LanguageType eLang = GetLanguage(nPos, sal_False);
rEditSh.GetDoc()->SetAutoCorrExceptWord( new SwAutoCorrExceptWord( nFlag,
nNode, nPos, rExceptWord, cChar, eLang ));
}
-LanguageType SwAutoCorrDoc::GetLanguage( xub_StrLen nPos, BOOL bPrevPara ) const
+LanguageType SwAutoCorrDoc::GetLanguage( xub_StrLen nPos, sal_Bool bPrevPara ) const
{
LanguageType eRet = LANGUAGE_SYSTEM;
@@ -449,12 +449,12 @@ void SwAutoCorrExceptWord::CheckChar( const SwPosition& rPos, sal_Unicode cChr )
}
-BOOL SwAutoCorrExceptWord::CheckDelChar( const SwPosition& rPos )
+sal_Bool SwAutoCorrExceptWord::CheckDelChar( const SwPosition& rPos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !bDeleted && rPos.nNode.GetIndex() == nNode &&
rPos.nContent.GetIndex() == nCntnt )
- bDeleted = bRet = TRUE;
+ bDeleted = bRet = sal_True;
return bRet;
}
@@ -488,8 +488,8 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos )
if( pTxtNd->GetpSwpHints() && pTxtNd->GetpSwpHints()->Count() )
{
- const USHORT nSize = pTxtNd->GetpSwpHints()->Count();
- USHORT n;
+ const sal_uInt16 nSize = pTxtNd->GetpSwpHints()->Count();
+ sal_uInt16 n;
xub_StrLen nAttrStart;
const xub_StrLen* pAttrEnd;
@@ -509,13 +509,13 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos )
{
const SfxPoolItem* pItem;
if( !pDontExpItems || SFX_ITEM_SET != pDontExpItems->
- GetItemState( pHt->Which(), FALSE, &pItem ) ||
+ GetItemState( pHt->Which(), sal_False, &pItem ) ||
*pItem != pHt->GetAttr() )
{
// das Attribut war vorher nicht in dieser Form im Absatz
// gesetzt, also kann es nur durchs einfuegen/kopieren erzeugt
// worden sein. Damit ist es ein Kandiadat fuers DontExpand
- pHt->SetDontExpand( TRUE );
+ pHt->SetDontExpand( sal_True );
}
}
}
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 639bab3c10c5..7987106cd349 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -101,7 +101,7 @@ SvxSwAutoFmtFlags* SwEditShell::pAutoFmtFlags = 0;
// Anzahl von Num-/Bullet-Absatzvorlagen. MAXLEVEL wird demnaechst auf
// x erhoeht, die Anzahl Vorlagen aber nicht (Ueberbleibsel aus <= 4.0)
-const USHORT cnNumBullColls = 4;
+const sal_uInt16 cnNumBullColls = 4;
class SwAutoFormat
{
@@ -115,12 +115,12 @@ class SwAutoFormat
SwTxtNode* pAktTxtNd; // der akt. TextNode
SwTxtFrm* pAktTxtFrm; // Frame vom akt. TextNode
CharClass* pCharClass; // Character classification
- ULONG nEndNdIdx; // fuer die Prozent-Anzeige
+ sal_uLong nEndNdIdx; // fuer die Prozent-Anzeige
LanguageType eCharClassLang;
- USHORT nLastHeadLvl, nLastCalcHeadLvl;
- USHORT nLastEnumLvl, nLastCalcEnumLvl;
- USHORT nRedlAutoFmtSeqId;
+ sal_uInt16 nLastHeadLvl, nLastCalcHeadLvl;
+ sal_uInt16 nLastEnumLvl, nLastCalcEnumLvl;
+ sal_uInt16 nRedlAutoFmtSeqId;
enum
{
@@ -150,11 +150,11 @@ class SwAutoFormat
IS_ENDE
} eStat;
- BOOL bEnde : 1;
- BOOL bEmptyLine : 1;
- BOOL bMoreLines : 1;
+ sal_Bool bEnde : 1;
+ sal_Bool bEmptyLine : 1;
+ sal_Bool bMoreLines : 1;
- static BOOL m_bAskForCancelUndoWhileBufferOverflow;
+ static sal_Bool m_bAskForCancelUndoWhileBufferOverflow;
static short m_nActionWhileAutoformatUndoBufferOverflow;
@@ -171,25 +171,25 @@ class SwAutoFormat
}
- BOOL IsSpace( const sal_Unicode c ) const
- { return (' ' == c || '\t' == c || 0x0a == c|| 0x3000 == c /* Jap. space */) ? TRUE : FALSE; }
+ sal_Bool IsSpace( const sal_Unicode c ) const
+ { return (' ' == c || '\t' == c || 0x0a == c|| 0x3000 == c /* Jap. space */) ? sal_True : sal_False; }
- void SetColl( USHORT nId, BOOL bHdLineOrText = FALSE );
+ void SetColl( sal_uInt16 nId, sal_Bool bHdLineOrText = sal_False );
String GoNextPara();
- BOOL HasObjects( const SwNode& rNd );
+ sal_Bool HasObjects( const SwNode& rNd );
// TxtNode Methoden
const SwTxtNode* GetNextNode() const;
- BOOL IsEmptyLine( const SwTxtNode& rNd ) const
+ sal_Bool IsEmptyLine( const SwTxtNode& rNd ) const
{ return 0 == rNd.GetTxt().Len() ||
rNd.GetTxt().Len() == GetLeadingBlanks( rNd.GetTxt() ); }
- BOOL IsOneLine( const SwTxtNode& ) const;
- BOOL IsFastFullLine( const SwTxtNode& ) const;
- BOOL IsNoAlphaLine( const SwTxtNode&) const;
- BOOL IsEnumericChar( const SwTxtNode&) const;
- BOOL IsBlanksInString( const SwTxtNode&) const;
- USHORT CalcLevel( const SwTxtNode&, USHORT *pDigitLvl = 0 ) const;
+ sal_Bool IsOneLine( const SwTxtNode& ) const;
+ sal_Bool IsFastFullLine( const SwTxtNode& ) const;
+ sal_Bool IsNoAlphaLine( const SwTxtNode&) const;
+ sal_Bool IsEnumericChar( const SwTxtNode&) const;
+ sal_Bool IsBlanksInString( const SwTxtNode&) const;
+ sal_uInt16 CalcLevel( const SwTxtNode&, sal_uInt16 *pDigitLvl = 0 ) const;
xub_StrLen GetBigIndent( xub_StrLen& rAktSpacePos ) const;
String& DelLeadingBlanks( String& rStr ) const;
@@ -197,8 +197,8 @@ class SwAutoFormat
xub_StrLen GetLeadingBlanks( const String& rStr ) const;
xub_StrLen GetTrailingBlanks( const String& rStr ) const;
- BOOL IsFirstCharCapital( const SwTxtNode& rNd ) const;
- USHORT GetDigitLevel( const SwTxtNode& rTxtNd, xub_StrLen& rPos,
+ sal_Bool IsFirstCharCapital( const SwTxtNode& rNd ) const;
+ sal_uInt16 GetDigitLevel( const SwTxtNode& rTxtNd, xub_StrLen& rPos,
String* pPreFix = 0, String* pPostFix = 0,
String* pNumTypes = 0 ) const;
// hole den FORMATIERTEN TextFrame
@@ -207,26 +207,26 @@ class SwAutoFormat
void BuildIndent();
void BuildText();
void BuildTextIndent();
- void BuildEnum( USHORT nLvl, USHORT nDigitLevel );
+ void BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel );
void BuildNegIndent( SwTwips nSpaces );
- void BuildHeadLine( USHORT nLvl );
+ void BuildHeadLine( sal_uInt16 nLvl );
- BOOL HasSelBlanks( SwPaM& rPam ) const;
- BOOL HasBreakAttr( const SwTxtNode& ) const;
+ sal_Bool HasSelBlanks( SwPaM& rPam ) const;
+ sal_Bool HasBreakAttr( const SwTxtNode& ) const;
void DeleteSel( SwPaM& rPam );
- BOOL DeleteAktNxtPara( const String& rNxtPara );
+ sal_Bool DeleteAktNxtPara( const String& rNxtPara );
// loesche im Node Anfang oder/und Ende
- void DeleteAktPara( BOOL bStart = TRUE, BOOL nEnd = TRUE );
- void DelEmptyLine( BOOL bTstNextPara = TRUE );
+ void DeleteAktPara( sal_Bool bStart = sal_True, sal_Bool nEnd = sal_True );
+ void DelEmptyLine( sal_Bool bTstNextPara = sal_True );
// loesche bei mehrzeiligen Absaetzen die "linken" und/oder
// "rechten" Raender
- void DelMoreLinesBlanks( BOOL bWithLineBreaks = FALSE );
+ void DelMoreLinesBlanks( sal_Bool bWithLineBreaks = sal_False );
// loesche den vorherigen Absatz
void DelPrevPara();
// dann lasse doch mal das AutoCorrect auf den akt. TextNode los
void AutoCorrect( xub_StrLen nSttPos = 0 );
- BOOL CanJoin( const SwTxtNode* pTxtNd ) const
+ sal_Bool CanJoin( const SwTxtNode* pTxtNd ) const
{
return !bEnde && pTxtNd &&
!IsEmptyLine( *pTxtNd ) &&
@@ -238,16 +238,16 @@ class SwAutoFormat
}
// ist ein Punkt am Ende ??
- BOOL IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const;
+ sal_Bool IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const;
- BOOL DoUnderline();
- BOOL DoTable();
+ sal_Bool DoUnderline();
+ sal_Bool DoTable();
- void _SetRedlineTxt( USHORT nId );
- BOOL SetRedlineTxt( USHORT nId )
- { if( aFlags.bWithRedlining ) _SetRedlineTxt( nId ); return TRUE; }
- BOOL ClearRedlineTxt()
- { if( aFlags.bWithRedlining ) pDoc->SetAutoFmtRedlineComment(0); return TRUE; }
+ void _SetRedlineTxt( sal_uInt16 nId );
+ sal_Bool SetRedlineTxt( sal_uInt16 nId )
+ { if( aFlags.bWithRedlining ) _SetRedlineTxt( nId ); return sal_True; }
+ sal_Bool ClearRedlineTxt()
+ { if( aFlags.bWithRedlining ) pDoc->SetAutoFmtRedlineComment(0); return sal_True; }
public:
SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
@@ -257,7 +257,7 @@ public:
}
};
-BOOL SwAutoFormat::m_bAskForCancelUndoWhileBufferOverflow = TRUE;
+sal_Bool SwAutoFormat::m_bAskForCancelUndoWhileBufferOverflow = sal_True;
short SwAutoFormat::m_nActionWhileAutoformatUndoBufferOverflow = RET_YES;
const sal_Unicode* StrChr( const sal_Unicode* pSrc, sal_Unicode c )
@@ -291,10 +291,10 @@ void SwAutoFormat::_GetCharClass( LanguageType eLang )
eCharClassLang = eLang;
}
-void SwAutoFormat::_SetRedlineTxt( USHORT nActionId )
+void SwAutoFormat::_SetRedlineTxt( sal_uInt16 nActionId )
{
String sTxt;
- USHORT nSeqNo = 0;
+ sal_uInt16 nSeqNo = 0;
if( STR_AUTOFMTREDL_END > nActionId )
{
sTxt = *ViewShell::GetShellRes()->GetAutoFmtNameLst()[ nActionId ];
@@ -334,14 +334,14 @@ String SwAutoFormat::GoNextPara()
//has to be checed twice before and after incrementation
if( aNdIdx.GetIndex() >= aEndNdIdx.GetIndex() )
{
- bEnde = TRUE;
+ bEnde = sal_True;
return aEmptyStr;
}
aNdIdx++;
if( aNdIdx.GetIndex() >= aEndNdIdx.GetIndex() )
{
- bEnde = TRUE;
+ bEnde = sal_True;
return aEmptyStr;
}
else
@@ -353,7 +353,7 @@ String SwAutoFormat::GoNextPara()
// EndNode : Ende erreicht, beenden
if( pNewNd->IsEndNode() )
{
- bEnde = TRUE;
+ bEnde = sal_True;
return aEmptyStr;
}
else if( pNewNd->IsTableNode() )
@@ -375,20 +375,20 @@ String SwAutoFormat::GoNextPara()
return pAktTxtNd->GetTxt();
}
-BOOL SwAutoFormat::HasObjects( const SwNode& rNd )
+sal_Bool SwAutoFormat::HasObjects( const SwNode& rNd )
{
// haengt irgend etwas absatzgebundenes am Absatz?
// z.B. Rahmen, DrawObjecte, ..
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwSpzFrmFmts& rFmts = *pDoc->GetSpzFrmFmts();
- for( USHORT n = 0; n < rFmts.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFmts.Count(); ++n )
{
const SwFmtAnchor& rAnchor = rFmts[ n ]->GetAnchor();
if ((FLY_AT_PAGE != rAnchor.GetAnchorId()) &&
rAnchor.GetCntntAnchor() &&
&rAnchor.GetCntntAnchor()->nNode.GetNode() == &rNd )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -403,16 +403,16 @@ const SwTxtNode* SwAutoFormat::GetNextNode() const
}
-BOOL SwAutoFormat::IsOneLine( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsOneLine( const SwTxtNode& rNd ) const
{
SwTxtFrmInfo aFInfo( GetFrm( rNd ) );
return aFInfo.IsOneLine();
}
-BOOL SwAutoFormat::IsFastFullLine( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsFastFullLine( const SwTxtNode& rNd ) const
{
- BOOL bRet = aFlags.bRightMargin;
+ sal_Bool bRet = aFlags.bRightMargin;
if( bRet )
{
SwTxtFrmInfo aFInfo( GetFrm( rNd ) );
@@ -422,24 +422,24 @@ BOOL SwAutoFormat::IsFastFullLine( const SwTxtNode& rNd ) const
}
-BOOL SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const
{
const String& rTxt = rNd.GetTxt();
String sTmp( rTxt );
xub_StrLen nBlnks = GetLeadingBlanks( sTmp );
xub_StrLen nLen = rTxt.Len() - nBlnks;
if( !nLen )
- return FALSE;
+ return sal_False;
// -, +, * getrennt durch Blank ??
if( 2 < nLen && IsSpace( rTxt.GetChar( nBlnks + 1 ) ) )
{
if( StrChr( pBulletChar, rTxt.GetChar( nBlnks ) ) )
- return TRUE;
+ return sal_True;
// sollte an der Position ein Symbolfont existieren ?
SwTxtFrmInfo aFInfo( GetFrm( rNd ) );
if( aFInfo.IsBullet( nBlnks ))
- return TRUE;
+ return sal_True;
}
// 1.) / 1. / 1.1.1 / (1). / (1) / ....
@@ -447,7 +447,7 @@ BOOL SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const
}
-BOOL SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
{
// suche im String mehr als 5 Blanks/Tabs
String sTmp( rNd.GetTxt() );
@@ -463,7 +463,7 @@ BOOL SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
while( *pTmp && IsSpace( *++pTmp ))
;
if( 5 <= pTmp - pStt )
- return TRUE;
+ return sal_True;
}
else
++pTmp;
@@ -471,13 +471,13 @@ BOOL SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
else
++pTmp;
}
- return FALSE;
+ return sal_False;
}
-USHORT SwAutoFormat::CalcLevel( const SwTxtNode& rNd, USHORT *pDigitLvl ) const
+sal_uInt16 SwAutoFormat::CalcLevel( const SwTxtNode& rNd, sal_uInt16 *pDigitLvl ) const
{
- USHORT nLvl = 0, nBlnk = 0;
+ sal_uInt16 nLvl = 0, nBlnk = 0;
const String& rTxt = rNd.GetTxt();
if( pDigitLvl )
*pDigitLvl = USHRT_MAX;
@@ -534,11 +534,11 @@ xub_StrLen SwAutoFormat::GetBigIndent( xub_StrLen& rAktSpacePos ) const
}
-BOOL SwAutoFormat::IsNoAlphaLine( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsNoAlphaLine( const SwTxtNode& rNd ) const
{
const String& rStr = rNd.GetTxt();
if( !rStr.Len() )
- return FALSE;
+ return sal_False;
// oder besser: ueber die Anzahl von Alpha/Num- und !AN-Zeichen
// bestimmen.
xub_StrLen nANChar = 0, nBlnk = 0;
@@ -550,18 +550,18 @@ BOOL SwAutoFormat::IsNoAlphaLine( const SwTxtNode& rNd ) const
else if( rCC.isLetterNumeric( rStr, n ))
++nANChar;
- // sind zu 75% keine Alpha-Nummerische-Zeichen, dann TRUE
- ULONG nLen = rStr.Len() - nBlnk;
- nLen = ( nLen * 3 ) / 4; // long overflow, if the strlen > USHORT
+ // sind zu 75% keine Alpha-Nummerische-Zeichen, dann sal_True
+ sal_uLong nLen = rStr.Len() - nBlnk;
+ nLen = ( nLen * 3 ) / 4; // long overflow, if the strlen > sal_uInt16
return xub_StrLen(nLen) < (rStr.Len() - nANChar - nBlnk);
}
-BOOL SwAutoFormat::DoUnderline()
+sal_Bool SwAutoFormat::DoUnderline()
{
if( !aFlags.bSetBorder )
- return FALSE;
+ return sal_False;
const sal_Unicode* pStr = pAktTxtNd->GetTxt().GetBuffer();
int eState = 0;
@@ -581,12 +581,12 @@ BOOL SwAutoFormat::DoUnderline()
case '~': eTmp = 5; break;
case '#': eTmp = 6; break;
default:
- return FALSE;
+ return sal_False;
}
if( 0 == eState )
eState = eTmp;
else if( eState != eTmp )
- return FALSE;
+ return sal_False;
++nCnt;
}
++pStr;
@@ -595,7 +595,7 @@ BOOL SwAutoFormat::DoUnderline()
if( 2 < nCnt )
{
// dann unterstreiche mal den vorherigen Absatz, wenn es diesen gibt!
- DelEmptyLine( FALSE );
+ DelEmptyLine( sal_False );
aDelPam.SetMark();
aDelPam.GetMark()->nContent = 0;
//JP 19.03.96: kein Underline sondern eine Umrandung setzen!
@@ -635,7 +635,7 @@ BOOL SwAutoFormat::DoUnderline()
RES_PARATR_CONNECT_BORDER, RES_PARATR_CONNECT_BORDER,
RES_BOX, RES_BOX,
0);
- aSet.Put( SwParaConnectBorderItem( FALSE ) );
+ aSet.Put( SwParaConnectBorderItem( sal_False ) );
SvxBoxItem aBox( RES_BOX );
aBox.SetLine( &aLine, BOX_LINE_BOTTOM );
aBox.SetDistance( 42 ); // ~0,75 mm
@@ -648,11 +648,11 @@ BOOL SwAutoFormat::DoUnderline()
}
-BOOL SwAutoFormat::DoTable()
+sal_Bool SwAutoFormat::DoTable()
{
if( !aFlags.bCreateTable || !aFlags.bAFmtByInput ||
pAktTxtNd->FindTableNode() )
- return FALSE;
+ return sal_False;
const String& rTmp = pAktTxtNd->GetTxt();
xub_StrLen nSttPlus = GetLeadingBlanks( rTmp );
@@ -662,7 +662,7 @@ BOOL SwAutoFormat::DoTable()
if( 2 > nEndPlus - nSttPlus ||
( '+' != ( cChar = rTmp.GetChar( nSttPlus )) && '|' != cChar ) ||
( '+' != ( cChar = rTmp.GetChar( nEndPlus - 1)) && '|' != cChar ))
- return FALSE;
+ return sal_False;
SwTxtFrmInfo aInfo( pAktTxtFrm );
@@ -683,11 +683,11 @@ BOOL SwAutoFormat::DoTable()
case '+':
case '|':
- aPosArr.Insert( static_cast<USHORT>(aInfo.GetCharPos(n)), aPosArr.Count() );
+ aPosArr.Insert( static_cast<sal_uInt16>(aInfo.GetCharPos(n)), aPosArr.Count() );
break;
default:
- return FALSE;
+ return sal_False;
}
if( ++n == nEndPlus )
break;
@@ -698,7 +698,7 @@ BOOL SwAutoFormat::DoTable()
if( 1 < aPosArr.Count() )
{
// Ausrichtung vom Textnode besorgen:
- USHORT nColCnt = aPosArr.Count() - 1;
+ sal_uInt16 nColCnt = aPosArr.Count() - 1;
SwTwips nSttPos = aPosArr[ 0 ];
sal_Int16 eHori;
switch( pAktTxtNd->GetSwAttrSet().GetAdjust().GetAdjust() )
@@ -712,7 +712,7 @@ BOOL SwAutoFormat::DoTable()
eHori = text::HoriOrientation::NONE;
// dann muss als letztes noch die akt. FrameBreite
// ins Array
- aPosArr.Insert( static_cast<USHORT>(pAktTxtFrm->Frm().Width()), aPosArr.Count() );
+ aPosArr.Insert( static_cast<sal_uInt16>(pAktTxtFrm->Frm().Width()), aPosArr.Count() );
}
else
eHori = text::HoriOrientation::LEFT;
@@ -782,7 +782,7 @@ xub_StrLen SwAutoFormat::GetTrailingBlanks( const String& rStr ) const
}
-BOOL SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const
{
const String& rTxt = rNd.GetTxt();
for( xub_StrLen n = 0, nEnd = rTxt.Len(); n < nEnd; ++n )
@@ -795,11 +795,11 @@ BOOL SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const
0 != ( i18n::KCharacterType::UPPER &
nCharType );
}
- return FALSE;
+ return sal_False;
}
-USHORT SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
+sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
String* pPreFix, String* pPostFix, String* pNumTypes ) const
{
// Teste auf 1.) / 1. / 1.1.1 / (1). / (1) / ....
@@ -807,11 +807,11 @@ USHORT SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
xub_StrLen nPos = rPos;
int eScan = NONE;
- USHORT nStart = 0;
- BYTE nDigitLvl = 0, nDigitCnt = 0;
+ sal_uInt16 nStart = 0;
+ sal_uInt8 nDigitLvl = 0, nDigitCnt = 0;
//count number of parenthesis to assure a sensible order is found
- USHORT nOpeningParentheses = 0;
- USHORT nClosingParentheses = 0;
+ sal_uInt16 nOpeningParentheses = 0;
+ sal_uInt16 nClosingParentheses = 0;
CharClass& rCC = GetCharClass( rNd.GetSwAttrSet().GetLanguage().GetLanguage() );
@@ -851,7 +851,7 @@ USHORT SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
}
else if( rCC.isAlpha( rTxt, nPos ) )
{
- BOOL bIsUpper =
+ sal_Bool bIsUpper =
0 != ( i18n::KCharacterType::UPPER &
rCC.getCharacterType( rTxt, nPos ));
sal_Unicode cLow = rCC.toLower( rTxt, nPos, 1 ).GetChar(0), cNumTyp;
@@ -930,8 +930,8 @@ USHORT SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
else
{
// roemische Zahlen: checke ob das gueltige Zeichen sind
- USHORT nVal;
- BOOL bError = FALSE;
+ sal_uInt16 nVal;
+ sal_Bool bError = sal_False;
switch( cLow )
{
case 'm': nVal = 1000; goto CHECK_ROMAN_1;
@@ -950,43 +950,43 @@ CHECK_ROMAN_1:
if( nMod5 == ((3 * nVal) + n10 ) ||
nMod5 == ((4 * nVal) + n10 ) ||
nLast == n10 )
- nStart = static_cast<USHORT>(nStart + (n10 * 8));
+ nStart = static_cast<sal_uInt16>(nStart + (n10 * 8));
else if( nMod5 == 0 ||
nMod5 == (1 * nVal) ||
nMod5 == (2 * nVal) )
nStart = nStart + nVal;
else
- bError = TRUE;
+ bError = sal_True;
}
break;
CHECK_ROMAN_5:
{
if( ( nStart / nVal ) & 1 )
- bError = TRUE;
+ bError = sal_True;
else
{
int nMod = nStart % nVal;
int n10 = nVal / 5;
if( n10 == nMod )
- nStart = static_cast<USHORT>(nStart + (3 * n10));
+ nStart = static_cast<sal_uInt16>(nStart + (3 * n10));
else if( 0 == nMod )
nStart = nStart + nVal;
else
- bError = TRUE;
+ bError = sal_True;
}
}
break;
case 'i':
if( nStart % 5 >= 3 )
- bError = TRUE;
+ bError = sal_True;
else
nStart += 1;
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
if( bError )
@@ -1041,7 +1041,7 @@ CHECK_ROMAN_5:
}
-void SwAutoFormat::SetColl( USHORT nId, BOOL bHdLineOrText )
+void SwAutoFormat::SetColl( sal_uInt16 nId, sal_Bool bHdLineOrText )
{
aDelPam.DeleteMark();
aDelPam.GetPoint()->nNode = aNdIdx;
@@ -1064,7 +1064,7 @@ void SwAutoFormat::SetColl( USHORT nId, BOOL bHdLineOrText )
// sonst nur den Blocksatz
SvxAdjustItem* pAdj;
if( SFX_ITEM_SET == aSet.GetItemState( RES_PARATR_ADJUST,
- FALSE, (const SfxPoolItem**)&pAdj ))
+ sal_False, (const SfxPoolItem**)&pAdj ))
{
SvxAdjust eAdj = pAdj->GetAdjust();
if( bHdLineOrText ? (SVX_ADJUST_RIGHT != eAdj &&
@@ -1078,7 +1078,7 @@ void SwAutoFormat::SetColl( USHORT nId, BOOL bHdLineOrText )
}
-BOOL SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
+sal_Bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
{
// noch ein Blank am Anfang oder Ende ?
// nicht loeschen, wird wieder eingefuegt.
@@ -1101,38 +1101,38 @@ BOOL SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
// ( ' ' == ( cCh = pTxtNd->GetTxt()[ nBlnkPos ] ) || '\t' == cCh ))
pPos->nContent++;
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-BOOL SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) const
+sal_Bool SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) const
{
const SfxItemSet* pSet = rTxtNd.GetpSwAttrSet();
if( !pSet )
- return FALSE;
+ return sal_False;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE, &pItem )
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pItem )
&& SVX_BREAK_NONE != ((SvxFmtBreakItem*)pItem)->GetBreak() )
- return TRUE;
+ return sal_True;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, FALSE, &pItem )
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, sal_False, &pItem )
&& ((SwFmtPageDesc*)pItem)->GetPageDesc()
&& nsUseOnPage::PD_NONE != ((SwFmtPageDesc*)pItem)->GetPageDesc()->GetUseOn() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
// ist ein Punkt am Ende ??
-BOOL SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const
+sal_Bool SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const
{
const String& rStr = rTxtNd.GetTxt();
xub_StrLen n = rStr.Len();
if( !n )
- return TRUE;
+ return sal_True;
while( --n && IsSpace( rStr.GetChar( n ) ) )
;
@@ -1141,7 +1141,7 @@ BOOL SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const
// loesche im Node Anfang oder/und Ende
-void SwAutoFormat::DeleteAktPara( BOOL bStart, BOOL bEnd )
+void SwAutoFormat::DeleteAktPara( sal_Bool bStart, sal_Bool bEnd )
{
if( aFlags.bAFmtByInput
? aFlags.bAFmtByInpDelSpacesAtSttEnd
@@ -1200,7 +1200,7 @@ void SwAutoFormat::DeleteSel( SwPaM& rDelPam )
pEditShell->DeleteSel( rDelPam );
}
-BOOL SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
+sal_Bool SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
{
// Loesche Blanks am Ende vom akt. und am Anfang vom naechsten
aDelPam.DeleteMark();
@@ -1223,7 +1223,7 @@ BOOL SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
// noch ein Blank am Anfang oder Ende ?
// nicht loeschen, wird wieder eingefuegt.
- BOOL bHasBlnks = HasSelBlanks( aDelPam );
+ sal_Bool bHasBlnks = HasSelBlanks( aDelPam );
if( *aDelPam.GetPoint() != *aDelPam.GetMark() )
DeleteSel( aDelPam );
@@ -1233,7 +1233,7 @@ BOOL SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
}
-void SwAutoFormat::DelEmptyLine( BOOL bTstNextPara )
+void SwAutoFormat::DelEmptyLine( sal_Bool bTstNextPara )
{
SetRedlineTxt( STR_AUTOFMTREDL_DEL_EMPTY_PARA );
// Loesche Blanks den leeren Absatz
@@ -1243,7 +1243,7 @@ void SwAutoFormat::DelEmptyLine( BOOL bTstNextPara )
aDelPam.SetMark();
aDelPam.GetMark()->nNode--;
- SwTxtNode* pTNd = aDelPam.GetNode( FALSE )->GetTxtNode();
+ SwTxtNode* pTNd = aDelPam.GetNode( sal_False )->GetTxtNode();
if( pTNd )
// erstmal den vorherigen Textnode benutzen.
aDelPam.GetMark()->nContent.Assign( pTNd, pTNd->GetTxt().Len() );
@@ -1252,7 +1252,7 @@ void SwAutoFormat::DelEmptyLine( BOOL bTstNextPara )
// dann versuche den naechsten (am Anfang vom Dok, Tabellen-Zellen,
// Rahmen, ...
aDelPam.GetMark()->nNode += 2;
- pTNd = aDelPam.GetNode( FALSE )->GetTxtNode();
+ pTNd = aDelPam.GetNode( sal_False )->GetTxtNode();
if( pTNd )
{
aDelPam.GetMark()->nContent.Assign( pTNd, 0 );
@@ -1273,7 +1273,7 @@ void SwAutoFormat::DelEmptyLine( BOOL bTstNextPara )
}
-void SwAutoFormat::DelMoreLinesBlanks( BOOL bWithLineBreaks )
+void SwAutoFormat::DelMoreLinesBlanks( sal_Bool bWithLineBreaks )
{
if( aFlags.bAFmtByInput
? aFlags.bAFmtByInpDelSpacesBetweenLines
@@ -1292,7 +1292,7 @@ void SwAutoFormat::DelMoreLinesBlanks( BOOL bWithLineBreaks )
pNxt = (SwPaM*)aDelPam.GetNext();
if( pNxt->HasMark() && *pNxt->GetPoint() != *pNxt->GetMark() )
{
- BOOL bHasBlnks = HasSelBlanks( *pNxt );
+ sal_Bool bHasBlnks = HasSelBlanks( *pNxt );
DeleteSel( *pNxt );
if( !bHasBlnks )
{
@@ -1303,7 +1303,7 @@ void SwAutoFormat::DelMoreLinesBlanks( BOOL bWithLineBreaks )
if( pNxt == &aDelPam )
break;
delete pNxt;
- } while( TRUE );
+ } while( sal_True );
aDelPam.DeleteMark();
}
@@ -1335,9 +1335,9 @@ void SwAutoFormat::BuildIndent()
SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_INDENT );
// lese alle nachfolgenden Absaetze die zu diesem Einzug gehoeren
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
if( bMoreLines )
- DelMoreLinesBlanks( TRUE );
+ DelMoreLinesBlanks( sal_True );
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
IsBlanksInString( *pAktTxtNd ) ||
@@ -1364,7 +1364,7 @@ void SwAutoFormat::BuildIndent()
!CalcLevel( *pNxtNd ) );
}
}
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
@@ -1373,16 +1373,16 @@ void SwAutoFormat::BuildTextIndent()
{
SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_TEXT_INDENT);
// lese alle nachfolgenden Absaetze die zu diesem Einzug gehoeren
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
if( bMoreLines )
- DelMoreLinesBlanks( TRUE );
+ DelMoreLinesBlanks( sal_True );
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
IsBlanksInString( *pAktTxtNd ) ||
IsSentenceAtEnd( *pAktTxtNd );
if( aFlags.bAFmtByInput )
- pAktTxtNd->SetAutoFmtLvl( (BYTE)CalcLevel( *pAktTxtNd ) );
+ pAktTxtNd->SetAutoFmtLvl( (sal_uInt8)CalcLevel( *pAktTxtNd ) );
SetColl( RES_POOLCOLL_TEXT_MOVE );
if( !bBreak )
@@ -1403,7 +1403,7 @@ void SwAutoFormat::BuildTextIndent()
pNxtNd = GetNextNode();
}
}
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
@@ -1413,14 +1413,14 @@ void SwAutoFormat::BuildText()
SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_TEXT );
// lese alle nachfolgenden Absaetze die zu diesem Text
// ohne Einzug gehoeren
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
if( bMoreLines )
DelMoreLinesBlanks();
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
IsBlanksInString( *pAktTxtNd ) ||
IsSentenceAtEnd( *pAktTxtNd );
- SetColl( RES_POOLCOLL_TEXT, TRUE );
+ SetColl( RES_POOLCOLL_TEXT, sal_True );
if( !bBreak )
{
SetRedlineTxt( STR_AUTOFMTREDL_DEL_MORELINES );
@@ -1442,16 +1442,16 @@ void SwAutoFormat::BuildText()
break;
}
}
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
-void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
+void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
{
SetRedlineTxt( STR_AUTOFMTREDL_SET_NUMBULET );
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
// als erstes den akt. Einzug bestimmen und die Framebreite bestimmen
SwTwips nFrmWidth = pAktTxtFrm->Prt().Width();;
@@ -1474,9 +1474,9 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
IsSentenceAtEnd( *pAktTxtNd );
sal_Bool bRTL = pEditShell->IsInRightToLeftText();
// SetColl( RES_POOLCOLL_NUM_LEVEL1 + ( nLvl * 4 ) );
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
- BOOL bChgBullet = FALSE, bChgEnum = FALSE;
+ sal_Bool bChgBullet = sal_False, bChgEnum = sal_False;
xub_StrLen nAutoCorrPos = 0;
// falls die Numerierung gesetzt werden, die akt. besorgen
@@ -1506,7 +1506,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
{
SwCharFmt* pCFmt = pDoc->GetCharFmtFromPool(
RES_POOLCHR_BUL_LEVEL );
- bChgBullet = TRUE;
+ bChgBullet = sal_True;
// wurde das Format schon mal angepasst?
if( !aRule.GetNumFmt( nLvl ) )
{
@@ -1532,11 +1532,11 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
// <--
}
- USHORT nAbsPos = lBullIndent;
- USHORT nSpaceSteps = nLvl
- ? USHORT(nLeftTxtPos / nLvl)
+ sal_uInt16 nAbsPos = lBullIndent;
+ sal_uInt16 nSpaceSteps = nLvl
+ ? sal_uInt16(nLeftTxtPos / nLvl)
: lBullIndent;
- for( BYTE n = 0; n < MAXLEVEL; ++n, nAbsPos = nAbsPos + nSpaceSteps )
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n, nAbsPos = nAbsPos + nSpaceSteps )
{
SwNumFmt aFmt( aRule.Get( n ) );
aFmt.SetBulletFont( pBullFnt );
@@ -1553,7 +1553,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if( n == nLvl &&
nFrmWidth < ( nSpaceSteps * MAXLEVEL ) )
- nSpaceSteps = static_cast<USHORT>(( nFrmWidth - nLeftTxtPos ) /
+ nSpaceSteps = static_cast<sal_uInt16>(( nFrmWidth - nLeftTxtPos ) /
( MAXLEVEL - nLvl ));
}
}
@@ -1561,8 +1561,8 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
}
else
{
- bChgBullet = TRUE;
- SetColl( static_cast<USHORT>(RES_POOLCOLL_BUL_LEVEL1 + ( Min( nLvl, cnNumBullColls ) * 4 )) );
+ bChgBullet = sal_True;
+ SetColl( static_cast<sal_uInt16>(RES_POOLCOLL_BUL_LEVEL1 + ( Min( nLvl, cnNumBullColls ) * 4 )) );
}
}
else
@@ -1577,13 +1577,13 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if( USHRT_MAX != ( nDigitLevel = GetDigitLevel( *pAktTxtNd, nTxtStt,
&aPreFix, &aPostFix, &aNumTypes )) )
{
- bChgEnum = TRUE;
+ bChgEnum = sal_True;
// Ebene 0 und Einrueckung dann wird die Ebene durch den linken
// Einzug und der default NumEinrueckung bestimmt.
if( !nDigitLevel && nLeftTxtPos )
- nLvl = Min( USHORT( nLeftTxtPos / lNumIndent ),
- USHORT( MAXLEVEL - 1 ) );
+ nLvl = Min( sal_uInt16( nLeftTxtPos / lNumIndent ),
+ sal_uInt16( MAXLEVEL - 1 ) );
else
nLvl = nDigitLevel;
}
@@ -1597,7 +1597,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if( !nDigitLevel )
{
SwNumFmt aFmt( aRule.Get( nLvl ) );
- aFmt.SetStart( static_cast<USHORT>(aPreFix.GetToken( 1,
+ aFmt.SetStart( static_cast<sal_uInt16>(aPreFix.GetToken( 1,
(sal_Unicode)1 ).ToInt32()));
aFmt.SetPrefix( aPreFix.GetToken( 0, (sal_Unicode)1 ));
aFmt.SetSuffix( aPostFix.GetToken( 0, (sal_Unicode)1 ));
@@ -1615,13 +1615,13 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
}
else
{
- USHORT nSpaceSteps = nLvl ? USHORT(nLeftTxtPos / nLvl) : 0;
- BYTE n;
+ sal_uInt16 nSpaceSteps = nLvl ? sal_uInt16(nLeftTxtPos / nLvl) : 0;
+ sal_uInt8 n;
for( n = 0; n <= nLvl; ++n )
{
SwNumFmt aFmt( aRule.Get( n ) );
- aFmt.SetStart( static_cast<USHORT>(aPreFix.GetToken( n+1,
+ aFmt.SetStart( static_cast<sal_uInt16>(aPreFix.GetToken( n+1,
(sal_Unicode)1 ).ToInt32() ));
if( !n )
aFmt.SetPrefix( aPreFix.GetToken( n, (sal_Unicode)1 ));
@@ -1630,7 +1630,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if( n < aNumTypes.Len() )
aFmt.SetNumberingType((aNumTypes.GetChar( n ) - '0'));
- aFmt.SetAbsLSpace( USHORT( nSpaceSteps * n )
+ aFmt.SetAbsLSpace( sal_uInt16( nSpaceSteps * n )
+ lNumIndent );
if( !aFmt.GetCharFmt() )
@@ -1642,16 +1642,16 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
}
// passt alles vollstaendig in den Frame?
- BOOL bDefStep = nFrmWidth < (nSpaceSteps * MAXLEVEL);
+ sal_Bool bDefStep = nFrmWidth < (nSpaceSteps * MAXLEVEL);
for( ; n < MAXLEVEL; ++n )
{
SwNumFmt aFmt( aRule.Get( n ) );
aFmt.SetIncludeUpperLevels( MAXLEVEL );
if( bDefStep )
- aFmt.SetAbsLSpace( USHORT( (nLeftTxtPos +
- SwNumRule::GetNumIndent(static_cast<BYTE>(n-nLvl)))));
+ aFmt.SetAbsLSpace( sal_uInt16( (nLeftTxtPos +
+ SwNumRule::GetNumIndent(static_cast<sal_uInt8>(n-nLvl)))));
else
- aFmt.SetAbsLSpace( USHORT( nSpaceSteps * n )
+ aFmt.SetAbsLSpace( sal_uInt16( nSpaceSteps * n )
+ lNumIndent );
aRule.Set( n, aFmt );
}
@@ -1659,9 +1659,9 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
}
}
else if( !aFlags.bAFmtByInput )
- SetColl( static_cast<USHORT>(RES_POOLCOLL_NUM_LEVEL1 + ( Min( nLvl, cnNumBullColls ) * 4 ) ));
+ SetColl( static_cast<sal_uInt16>(RES_POOLCOLL_NUM_LEVEL1 + ( Min( nLvl, cnNumBullColls ) * 4 ) ));
else
- bChgEnum = FALSE;
+ bChgEnum = sal_False;
}
if( bChgEnum || bChgBullet )
@@ -1675,11 +1675,11 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
{
aDelPam.SetMark();
aDelPam.GetMark()->nNode++;
- aDelPam.GetNode(FALSE)->GetTxtNode()->SetAttrListLevel( nLvl );
+ aDelPam.GetNode(sal_False)->GetTxtNode()->SetAttrListLevel( nLvl );
}
pAktTxtNd->SetAttrListLevel(nLvl);
- pAktTxtNd->SetNumLSpace( TRUE );
+ pAktTxtNd->SetNumLSpace( sal_True );
// --> OD 2008-03-17 #refactorlists#
// start new list
@@ -1758,7 +1758,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if(!pNxtNd || pCurrNode == pNxtNd)
break;
}
- DeleteAktPara( FALSE, TRUE );
+ DeleteAktPara( sal_False, sal_True );
AutoCorrect( nAutoCorrPos );
}
@@ -1771,28 +1771,28 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
// Einrueckung in der 2.Zeile)
// lese alle nachfolgenden Absaetze die zu dieser Aufzaehlung gehoeren
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
xub_StrLen nSpacePos, nTxtPos = GetBigIndent( nSpacePos );
if( bMoreLines )
- DelMoreLinesBlanks( TRUE );
+ DelMoreLinesBlanks( sal_True );
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
( !nTxtPos && IsBlanksInString( *pAktTxtNd )) ||
IsSentenceAtEnd( *pAktTxtNd );
- SetColl( static_cast<USHORT>( nTxtPos
+ SetColl( static_cast<sal_uInt16>( nTxtPos
? RES_POOLCOLL_CONFRONTATION
: RES_POOLCOLL_TEXT_NEGIDENT ) );
if( nTxtPos )
{
const String& rStr = pAktTxtNd->GetTxt();
- BOOL bInsTab = TRUE;
+ sal_Bool bInsTab = sal_True;
if( '\t' == rStr.GetChar( nSpacePos+1 )) // ein Tab, das belassen wir
{
--nSpacePos;
- bInsTab = FALSE;
+ bInsTab = sal_False;
}
xub_StrLen nSpaceStt = nSpacePos;
@@ -1803,7 +1803,7 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
if( bInsTab && '\t' == rStr.GetChar( nSpaceStt ) ) // ein Tab, das belassen wir
{
++nSpaceStt;
- bInsTab = FALSE;
+ bInsTab = sal_False;
}
@@ -1846,12 +1846,12 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
pNxtNd = GetNextNode();
}
}
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
-void SwAutoFormat::BuildHeadLine( USHORT nLvl )
+void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl )
{
if( aFlags.bWithRedlining )
{
@@ -1863,14 +1863,14 @@ void SwAutoFormat::BuildHeadLine( USHORT nLvl )
pDoc->SetAutoFmtRedlineComment( &sTxt );
}
- SetColl( static_cast<USHORT>(RES_POOLCOLL_HEADLINE1 + nLvl ), TRUE );
+ SetColl( static_cast<sal_uInt16>(RES_POOLCOLL_HEADLINE1 + nLvl ), sal_True );
if( aFlags.bAFmtByInput )
{
SwTxtFmtColl& rNxtColl = pAktTxtNd->GetTxtColl()->GetNextTxtFmtColl();
DelPrevPara();
- DeleteAktPara( TRUE, FALSE );
+ DeleteAktPara( sal_True, sal_False );
DeleteAktNxtPara( aEmptyStr );
aDelPam.DeleteMark();
@@ -1880,7 +1880,7 @@ void SwAutoFormat::BuildHeadLine( USHORT nLvl )
}
else
{
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
}
@@ -1906,7 +1906,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( nPos >= pTxt->Len() )
return;
- BOOL bGetLanguage = aFlags.bChgOrdinalNumber ||
+ sal_Bool bGetLanguage = aFlags.bChgOrdinalNumber ||
aFlags.bChgToEnEmDash || aFlags.bSetINetAttr ||
aFlags.bCptlSttWrd || aFlags.bCptlSttSntnc ||
aFlags.bAddNonBrkSpace;
@@ -1921,7 +1921,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
SwTxtFrmInfo aFInfo( 0 );
xub_StrLen nSttPos, nLastBlank = nPos;
- BOOL bFirst = aFlags.bCptlSttSntnc, bFirstSent = bFirst;
+ sal_Bool bFirst = aFlags.bCptlSttSntnc, bFirstSent = bFirst;
sal_Unicode cChar = 0;
CharClass& rAppCC = GetAppCharClass();
@@ -1944,17 +1944,17 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
{
SetRedlineTxt( STR_AUTOFMTREDL_TYPO );
aDelPam.GetPoint()->nContent = nPos;
- BOOL bSetHardBlank = FALSE;
+ sal_Bool bSetHardBlank = sal_False;
String sReplace( pATst->GetQuote( aACorrDoc,
- nPos, cChar, TRUE ));
+ nPos, cChar, sal_True ));
aDelPam.SetMark();
aDelPam.GetPoint()->nContent = nPos+1;
if( 2 == sReplace.Len() && ' ' == sReplace.GetChar( 1 ))
{
sReplace.Erase( 1 );
- bSetHardBlank = TRUE;
+ bSetHardBlank = sal_True;
}
pDoc->ReplaceRange( aDelPam, sReplace, false );
@@ -1977,7 +1977,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
}
}
- int bCallACorr = FALSE;
+ int bCallACorr = sal_False;
int bBreak = 0;
if( nPos && IsSpace( pTxt->GetChar( nPos-1 )))
nLastBlank = nPos;
@@ -1995,15 +1995,15 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( !aFInfo.IsBullet( nPos ))
{
SetRedlineTxt( STR_AUTOFMTREDL_TYPO );
- BOOL bSetHardBlank = FALSE;
+ sal_Bool bSetHardBlank = sal_False;
aDelPam.GetPoint()->nContent = nPos;
String sReplace( pATst->GetQuote( aACorrDoc,
- nPos, cChar, FALSE ));
+ nPos, cChar, sal_False ));
if( 2 == sReplace.Len() && ' ' == sReplace.GetChar( 0 ))
{
sReplace.Erase( 0, 1 );
- bSetHardBlank = TRUE;
+ bSetHardBlank = sal_True;
}
aDelPam.SetMark();
@@ -2088,7 +2088,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
case '!':
case '?':
if( aFlags.bCptlSttSntnc )
- bFirstSent = TRUE;
+ bFirstSent = sal_True;
//alle Wortrenner loesen die Autokorrektur aus!
// break;
default:
@@ -2107,15 +2107,15 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( nPos == nSttPos )
{
if( ++nPos == pTxt->Len() )
- bCallACorr = TRUE;
+ bCallACorr = sal_True;
}
else
- bCallACorr = TRUE;
+ bCallACorr = sal_True;
if( bCallACorr )
{
- bCallACorr = FALSE;
+ bCallACorr = sal_False;
aDelPam.GetPoint()->nContent = nPos;
SetRedlineTxt( STR_AUTOFMTREDL_USE_REPLACE );
if( aFlags.bAutoCorrect &&
@@ -2168,12 +2168,12 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( aFlags.bCptlSttSntnc && bFirst )
{
SetRedlineTxt( STR_AUTOFMTREDL_CPTL_STT_SENT );
- pATst->FnCptlSttSntnc( aACorrDoc, *pTxt, TRUE, nSttPos, nPos, eLang);
- bFirst = FALSE;
+ pATst->FnCptlSttSntnc( aACorrDoc, *pTxt, sal_True, nSttPos, nPos, eLang);
+ bFirst = sal_False;
}
bFirst = bFirstSent;
- bFirstSent = FALSE;
+ bFirstSent = sal_False;
if( aFlags.bWithRedlining )
{
@@ -2206,14 +2206,14 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
"Kein Bereich angegeben" );
if( aFlags.bSetNumRule && !aFlags.bAFmtByInput )
- aFlags.bSetNumRule = FALSE;
+ aFlags.bSetNumRule = sal_False;
- BOOL bReplaceStyles = !aFlags.bAFmtByInput || aFlags.bReplaceStyles;
+ sal_Bool bReplaceStyles = !aFlags.bAFmtByInput || aFlags.bReplaceStyles;
const SwTxtNode* pNxtNd = 0;
- BOOL bNxtEmpty = FALSE;
- BOOL bNxtAlpha = FALSE;
- USHORT nNxtLevel = 0;
+ sal_Bool bNxtEmpty = sal_False;
+ sal_Bool bNxtAlpha = sal_False;
+ sal_uInt16 nNxtLevel = 0;
// setze den Bereich zum Autoformatieren
if( pSttNd )
@@ -2230,9 +2230,9 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
IsNoAlphaLine( *pNxtNd );
}
else
- bEmptyLine = TRUE; // am Dokument Anfang
+ bEmptyLine = sal_True; // am Dokument Anfang
- bEnde = FALSE;
+ bEnde = sal_False;
// setze die Werte fuer die Prozent-Anzeige
nEndNdIdx = aEndNdIdx.GetIndex();
@@ -2245,7 +2245,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
RedlineMode_t eRedlMode = pDoc->GetRedlineMode(), eOldMode = eRedlMode;
if( aFlags.bWithRedlining )
{
- pDoc->SetAutoFmtRedline( TRUE );
+ pDoc->SetAutoFmtRedline( sal_True );
eRedlMode = (RedlineMode_t)(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_SHOW_INSERT);
}
else
@@ -2257,12 +2257,12 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// wenn mehrere Zeilen, dann erstmal nicht mit
// dem nachfolgenden Absatz zusammenfassen.
- bMoreLines = FALSE;
+ bMoreLines = sal_False;
nLastCalcHeadLvl = nLastCalcEnumLvl = 0;
nLastHeadLvl = nLastEnumLvl = USHRT_MAX;
- USHORT nLevel = 0;
- USHORT nDigitLvl = 0;
+ sal_uInt16 nLevel = 0;
+ sal_uInt16 nDigitLvl = 0;
// defaulten
SwTxtFrmInfo aFInfo( 0 );
@@ -2284,7 +2284,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
Window* pParent = pEditShell?pEditShell->GetWin():NULL;
WarningBox aWarning( pParent,SW_RES(MSG_DISABLE_UNDO_QUESTION));
aWarning.SetDefaultCheckBoxText();
- USHORT nDefaultButton = nResult==RET_YES?BUTTONID_YES:(nResult==RET_NO?BUTTONID_NO:BUTTONID_CANCEL);
+ sal_uInt16 nDefaultButton = nResult==RET_YES?BUTTONID_YES:(nResult==RET_NO?BUTTONID_NO:BUTTONID_CANCEL);
aWarning.SetFocusButton(nDefaultButton);
nResult = aWarning.Execute();
m_bAskForCancelUndoWhileBufferOverflow = !aWarning.GetCheckBoxState();
@@ -2330,8 +2330,8 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
{
if( aFlags.bDelEmptyNode && !HasObjects( *pAktTxtNd ) )
{
- bEmptyLine = TRUE;
- ULONG nOldCnt = pDoc->GetNodes().Count();
+ bEmptyLine = sal_True;
+ sal_uLong nOldCnt = pDoc->GetNodes().Count();
DelEmptyLine();
// wurde wiklich ein Node geloescht ?
if( nOldCnt != pDoc->GetNodes().Count() )
@@ -2351,7 +2351,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
{
//JP 30.09.96: das DoTable() verlaesst sich auf das
// Pop und Move - Crsr nach dem AutoFormat!
- pEdShell->Pop( FALSE );
+ pEdShell->Pop( sal_False );
*pEdShell->GetCrsr() = aDelPam;
pEdShell->Push();
@@ -2364,8 +2364,8 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// geloescht werden!
if( !DoUnderline() && bReplaceStyles )
{
- SetColl( RES_POOLCOLL_STANDARD, TRUE );
- bEmptyLine = TRUE;
+ SetColl( RES_POOLCOLL_STANDARD, sal_True );
+ bEmptyLine = sal_True;
}
eStat = READ_NEXT_PARA;
}
@@ -2378,12 +2378,12 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
if( pAktTxtNd->GetNumRule() )
{
// in Numerierung nichts machen, zum naechsten
- bEmptyLine = FALSE;
+ bEmptyLine = sal_False;
eStat = READ_NEXT_PARA;
// loesche alle Blanks am Anfang/Ende
// und alle mitten drin
//JP 29.04.98: erstmal nur alle "mitten drin".
- DelMoreLinesBlanks( FALSE );
+ DelMoreLinesBlanks( sal_False );
break;
}
@@ -2392,7 +2392,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// erstmal: wurden schon mal entsprechende Vorlagen
// vergeben, so behalte die bei, gehe zum
// naechsten Node.
- USHORT nPoolId = pAktTxtNd->GetTxtColl()->GetPoolFmtId();
+ sal_uInt16 nPoolId = pAktTxtNd->GetTxtColl()->GetPoolFmtId();
if( IsPoolUserFmt( nPoolId )
? !aFlags.bChgUserColl
: ( RES_POOLCOLL_STANDARD != nPoolId &&
@@ -2411,7 +2411,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
short nSz;
SvxLRSpaceItem* pLRSpace;
if( SFX_ITEM_SET == pAktTxtNd->GetSwAttrSet().
- GetItemState( RES_LR_SPACE, TRUE,
+ GetItemState( RES_LR_SPACE, sal_True,
(const SfxPoolItem**)&pLRSpace ) &&
( 0 != (nSz = pLRSpace->GetTxtFirstLineOfst()) ||
0 != pLRSpace->GetTxtLeft() ) )
@@ -2431,7 +2431,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// nie zusammenfassen, so belassen
// (Opt. vielleicht als Ausnahmen nur Einzug)
- bMoreLines = TRUE;
+ bMoreLines = sal_True;
if( bReplaceStyles )
{
@@ -2458,9 +2458,9 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
nNxtLevel = CalcLevel( *pNxtNd );
if( !bEmptyLine && HasBreakAttr( *pAktTxtNd ) )
- bEmptyLine = TRUE;
+ bEmptyLine = sal_True;
if( !bNxtEmpty && HasBreakAttr( *pNxtNd ) )
- bNxtEmpty = TRUE;
+ bNxtEmpty = sal_True;
// fuer z.B. selbst definierte Einzuege oder
// rechts/zentierte Ausrichtung
@@ -2469,8 +2469,8 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
}
else
{
- bNxtEmpty = FALSE; // TRUE;
- bNxtAlpha = FALSE;
+ bNxtEmpty = sal_False; // sal_True;
+ bNxtAlpha = sal_False;
nNxtLevel = 0;
}
eStat = !bMoreLines ? IS_ONE_LINE : TST_ENUMERIC;
@@ -2487,7 +2487,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
if( !DelLeadingBlanks( sClrStr ).Len() )
{
- bEmptyLine = TRUE;
+ bEmptyLine = sal_True;
eStat = READ_NEXT_PARA;
break; // naechsten Absatz lesen
}
@@ -2497,7 +2497,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
IsBlanksInString( *pAktTxtNd ) )
break;
- bEmptyLine = FALSE;
+ bEmptyLine = sal_False;
String sEndClrStr( sClrStr );
xub_StrLen nLen = DelTrailingBlanks( sEndClrStr ).Len();
@@ -2566,7 +2566,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
case TST_ENUMERIC:
{
- bEmptyLine = FALSE;
+ bEmptyLine = sal_False;
if( IsEnumericChar( *pAktTxtNd ))
{
if( nLevel >= MAXLEVEL )
@@ -2663,12 +2663,12 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// erstmal: wurden schon mal entsprechende Vorlagen
// vergeben, so behalte die bei, gehe zum
// naechsten Node.
- bEmptyLine = FALSE;
+ bEmptyLine = sal_False;
eStat = READ_NEXT_PARA;
// loesche alle Blanks am Anfang/Ende
// und alle mitten drin
//JP 29.04.98: erstmal nur alle "mitten drin".
- DelMoreLinesBlanks( FALSE );
+ DelMoreLinesBlanks( sal_False );
// behandel die harte Attributierung
if( pAktTxtNd->HasSwAttrSet() )
@@ -2677,7 +2677,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
SvxLRSpaceItem* pLRSpace;
if( bReplaceStyles &&
SFX_ITEM_SET == pAktTxtNd->GetSwAttrSet().
- GetItemState( RES_LR_SPACE, FALSE,
+ GetItemState( RES_LR_SPACE, sal_False,
(const SfxPoolItem**)&pLRSpace ) &&
( 0 != (nSz = pLRSpace->GetTxtFirstLineOfst()) ||
0 != pLRSpace->GetTxtLeft() ) )
@@ -2699,13 +2699,13 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
break;
case IS_ENDE:
- bEnde = TRUE;
+ bEnde = sal_True;
break;
}
}
if( aFlags.bWithRedlining )
- pDoc->SetAutoFmtRedline( FALSE );
+ pDoc->SetAutoFmtRedline( sal_False );
pDoc->SetRedlineMode( eOldMode );
// restore undo (in case it has been changed)
@@ -2729,7 +2729,7 @@ void SwEditShell::AutoFormat( const SvxSwAutoFmtFlags* pAFlags )
{
aAFFlags = *pAFlags;
if( !aAFFlags.bAFmtByInput )
- pWait = new SwWait( *GetDoc()->GetDocShell(), TRUE );
+ pWait = new SwWait( *GetDoc()->GetDocShell(), sal_True );
}
SwPaM* pCrsr = GetCrsr();
@@ -2765,13 +2765,13 @@ void SwEditShell::AutoFmtBySplitNode()
StartAllAction();
StartUndo( UNDO_AUTOFORMAT );
- BOOL bRange = FALSE;
+ sal_Bool bRange = sal_False;
pCrsr->SetMark();
SwIndex* pCntnt = &pCrsr->GetMark()->nContent;
if( pCntnt->GetIndex() )
{
*pCntnt = 0;
- bRange = TRUE;
+ bRange = sal_True;
}
else
{
@@ -2782,7 +2782,7 @@ void SwEditShell::AutoFmtBySplitNode()
{
pCntnt->Assign( pTxtNd, 0 );
pCrsr->GetMark()->nNode = aNdIdx;
- bRange = TRUE;
+ bRange = sal_True;
}
}
@@ -2797,7 +2797,7 @@ void SwEditShell::AutoFmtBySplitNode()
//JP 30.09.96: das DoTable() verlaesst sich auf das PopCrsr
// und MoveCrsr!
- Pop( FALSE );
+ Pop( sal_False );
pCrsr = GetCrsr();
}
pCrsr->DeleteMark();
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx
index 6fda3a164c32..80bc442b8960 100644
--- a/sw/source/core/edit/edatmisc.cxx
+++ b/sw/source/core/edit/edatmisc.cxx
@@ -47,7 +47,7 @@ void SwEditShell::ResetAttr( const SvUShortsSort* pAttrs )
{
SET_CURR_SHELL( this );
StartAllAction();
- BOOL bUndoGroup = GetCrsr()->GetNext() != GetCrsr();
+ sal_Bool bUndoGroup = GetCrsr()->GetNext() != GetCrsr();
if( bUndoGroup )
GetDoc()->StartUndo(UNDO_RESETATTR, NULL);
@@ -118,21 +118,21 @@ void SwEditShell::SetDefault( const SfxItemSet& rSet )
// Erfrage das Default Attribut in diesem Dokument.
-const SfxPoolItem& SwEditShell::GetDefault( USHORT nFmtHint ) const
+const SfxPoolItem& SwEditShell::GetDefault( sal_uInt16 nFmtHint ) const
{
return GetDoc()->GetDefault( nFmtHint );
}
-void SwEditShell::SetAttr( const SfxPoolItem& rHint, USHORT nFlags )
+void SwEditShell::SetAttr( const SfxPoolItem& rHint, sal_uInt16 nFlags )
{
SET_CURR_SHELL( this );
StartAllAction();
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr ) // Ring von Cursorn
{
- BOOL bIsTblMode = IsTableMode();
+ sal_Bool bIsTblMode = IsTableMode();
GetDoc()->StartUndo(UNDO_INSATTR, NULL);
FOREACHPAM_START(this)
@@ -155,14 +155,14 @@ void SwEditShell::SetAttr( const SfxPoolItem& rHint, USHORT nFlags )
}
-void SwEditShell::SetAttr( const SfxItemSet& rSet, USHORT nFlags )
+void SwEditShell::SetAttr( const SfxItemSet& rSet, sal_uInt16 nFlags )
{
SET_CURR_SHELL( this );
StartAllAction();
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr ) // Ring von Cursorn
{
- BOOL bIsTblMode = IsTableMode();
+ sal_Bool bIsTblMode = IsTableMode();
GetDoc()->StartUndo(UNDO_INSATTR, NULL);
FOREACHPAM_START(this)
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index f1f288f99d06..95b053aac213 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -64,21 +64,21 @@
// wenn Selektion groesser Max Nodes oder mehr als Max Selektionen
// => keine Attribute
-const USHORT& getMaxLookup()
+const sal_uInt16& getMaxLookup()
{
- static const USHORT nMaxLookup = 1000;
+ static const sal_uInt16 nMaxLookup = 1000;
return nMaxLookup;
}
// --> OD 2008-01-16 #newlistlevelattrs#
-BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
+sal_Bool SwEditShell::GetCurAttr( SfxItemSet& rSet,
const bool bMergeIndentValuesOfNumRule ) const
// <--
{
if( GetCrsrCnt() > getMaxLookup() )
{
rSet.InvalidateAllItems();
- return FALSE;
+ return sal_False;
}
SfxItemSet aSet( *rSet.GetPool(), rSet.GetRanges() );
@@ -100,7 +100,7 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
if (pNumRule)
{
const String & aCharFmtName =
- pNumRule->Get(static_cast<USHORT>(pTxtNd->GetActualListLevel())).GetCharFmtName();
+ pNumRule->Get(static_cast<sal_uInt16>(pTxtNd->GetActualListLevel())).GetCharFmtName();
SwCharFmt * pCharFmt =
GetDoc()->FindCharFmtByName(aCharFmtName);
@@ -112,14 +112,14 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
continue;
}
- ULONG nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
+ sal_uLong nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
nEndNd = PCURCRSR->GetPoint()->nNode.GetIndex();
xub_StrLen nSttCnt = PCURCRSR->GetMark()->nContent.GetIndex(),
nEndCnt = PCURCRSR->GetPoint()->nContent.GetIndex();
if( nSttNd > nEndNd || ( nSttNd == nEndNd && nSttCnt > nEndCnt ))
{
- ULONG nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
+ sal_uLong nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
nTmp = nSttCnt; nSttCnt = nEndCnt; nEndCnt = (xub_StrLen)nTmp;
}
@@ -127,12 +127,12 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
{
rSet.ClearItem();
rSet.InvalidateAllItems();
- return FALSE;
+ return sal_False;
}
// beim 1.Node traegt der Node die Werte in den GetSet ein (Initial)
// alle weiteren Nodes werden zum GetSet zu gemergt
- for( ULONG n = nSttNd; n <= nEndNd; ++n )
+ for( sal_uLong n = nSttNd; n <= nEndNd; ++n )
{
SwNode* pNd = GetDoc()->GetNodes()[ n ];
switch( pNd->GetNodeType() )
@@ -144,7 +144,7 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
: ((SwTxtNode*)pNd)->GetTxt().Len();
// --> OD 2008-01-16 #newlistlevelattrs#
((SwTxtNode*)pNd)->GetAttr( *pSet, nStt, nEnd,
- FALSE, TRUE,
+ sal_False, sal_True,
bMergeIndentValuesOfNumRule );
// <--
}
@@ -171,7 +171,7 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
FOREACHPAM_END()
- return TRUE;
+ return sal_True;
}
SwTxtFmtColl* SwEditShell::GetCurTxtFmtColl() const
@@ -183,14 +183,14 @@ SwTxtFmtColl* SwEditShell::GetCurTxtFmtColl() const
FOREACHPAM_START(this)
- ULONG nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
+ sal_uLong nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
nEndNd = PCURCRSR->GetPoint()->nNode.GetIndex();
xub_StrLen nSttCnt = PCURCRSR->GetMark()->nContent.GetIndex(),
nEndCnt = PCURCRSR->GetPoint()->nContent.GetIndex();
if( nSttNd > nEndNd || ( nSttNd == nEndNd && nSttCnt > nEndCnt ))
{
- ULONG nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
+ sal_uLong nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
nTmp = nSttCnt; nSttCnt = nEndCnt; nEndCnt = (xub_StrLen)nTmp;
}
@@ -200,7 +200,7 @@ SwTxtFmtColl* SwEditShell::GetCurTxtFmtColl() const
break;
}
- for( ULONG n = nSttNd; n <= nEndNd; ++n )
+ for( sal_uLong n = nSttNd; n <= nEndNd; ++n )
{
SwNode* pNd = GetDoc()->GetNodes()[ n ];
if( pNd->IsTxtNode() )
@@ -218,13 +218,13 @@ SwTxtFmtColl* SwEditShell::GetCurTxtFmtColl() const
-BOOL SwEditShell::GetCurFtn( SwFmtFtn* pFillFtn )
+sal_Bool SwEditShell::GetCurFtn( SwFmtFtn* pFillFtn )
{
// der Cursor muss auf dem akt. Fussnoten-Anker stehen:
SwPaM* pCrsr = GetCrsr();
SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
if( !pTxtNd )
- return FALSE;
+ return sal_False;
SwTxtAttr *const pFtn = pTxtNd->GetTxtAttrForCharAt(
pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
@@ -258,11 +258,11 @@ bool SwEditShell::SetCurFtn( const SwFmtFtn& rFillFtn )
-/*USHORT SwEditShell::GetFtnCnt( BOOL bEndNotes = FALSE ) const
+/*sal_uInt16 SwEditShell::GetFtnCnt( sal_Bool bEndNotes = sal_False ) const
{
const SwFtnIdxs &rIdxs = pDoc->GetFtnIdxs();
- USHORT nCnt = 0;
- for ( USHORT i = 0; i < rIdxs.Count(); ++i )
+ sal_uInt16 nCnt = 0;
+ for ( sal_uInt16 i = 0; i < rIdxs.Count(); ++i )
{
const SwFmtFtn &rFtn = rIdxs[i]->GetFtn();
if ( bEndNotes == rFtn.IsEndNote() )
@@ -275,23 +275,23 @@ bool SwEditShell::SetCurFtn( const SwFmtFtn& rFillFtn )
bool SwEditShell::HasFtns( bool bEndNotes ) const
{
const SwFtnIdxs &rIdxs = pDoc->GetFtnIdxs();
- for ( USHORT i = 0; i < rIdxs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rIdxs.Count(); ++i )
{
const SwFmtFtn &rFtn = rIdxs[i]->GetFtn();
if ( bEndNotes == rFtn.IsEndNote() )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// gebe Liste aller Fussnoten und deren Anfangstexte
-USHORT SwEditShell::GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes )
+sal_uInt16 SwEditShell::GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes )
{
if( rList.Count() )
rList.Remove( 0, rList.Count() );
- USHORT n, nFtnCnt = pDoc->GetFtnIdxs().Count();
+ sal_uInt16 n, nFtnCnt = pDoc->GetFtnIdxs().Count();
SwTxtFtn* pTxtFtn;
for( n = 0; n < nFtnCnt; ++n )
{
@@ -329,28 +329,28 @@ USHORT SwEditShell::GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes )
// linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von
// Numerierungen)
-BOOL SwEditShell::IsMoveLeftMargin( BOOL bRight, BOOL bModulus ) const
+sal_Bool SwEditShell::IsMoveLeftMargin( sal_Bool bRight, sal_Bool bModulus ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
const SvxTabStopItem& rTabItem = (SvxTabStopItem&)GetDoc()->
GetDefault( RES_PARATR_TABSTOP );
- USHORT nDefDist = static_cast<USHORT>(rTabItem.Count() ? rTabItem[0].GetTabPos() : 1134);
+ sal_uInt16 nDefDist = static_cast<sal_uInt16>(rTabItem.Count() ? rTabItem[0].GetTabPos() : 1134);
if( !nDefDist )
- return FALSE;
+ return sal_False;
FOREACHPAM_START(this)
- ULONG nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
+ sal_uLong nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
nEndNd = PCURCRSR->GetPoint()->nNode.GetIndex();
if( nSttNd > nEndNd )
{
- ULONG nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
+ sal_uLong nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
}
SwCntntNode* pCNd;
- for( ULONG n = nSttNd; bRet && n <= nEndNd; ++n )
+ for( sal_uLong n = nSttNd; bRet && n <= nEndNd; ++n )
if( 0 != ( pCNd = GetDoc()->GetNodes()[ n ]->GetTxtNode() ))
{
const SvxLRSpaceItem& rLS = (SvxLRSpaceItem&)
@@ -363,13 +363,13 @@ BOOL SwEditShell::IsMoveLeftMargin( BOOL bRight, BOOL bModulus ) const
SwFrm* pFrm = pCNd->GetFrm();
if ( pFrm )
{
- const USHORT nFrmWidth = static_cast<USHORT>( pFrm->IsVertical() ?
+ const sal_uInt16 nFrmWidth = static_cast<sal_uInt16>( pFrm->IsVertical() ?
pFrm->Frm().Height() :
pFrm->Frm().Width() );
bRet = nFrmWidth > ( nNext + MM50 );
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
}
@@ -380,7 +380,7 @@ BOOL SwEditShell::IsMoveLeftMargin( BOOL bRight, BOOL bModulus ) const
return bRet;
}
-void SwEditShell::MoveLeftMargin( BOOL bRight, BOOL bModulus )
+void SwEditShell::MoveLeftMargin( sal_Bool bRight, sal_Bool bModulus )
{
StartAllAction();
StartUndo( UNDO_START );
@@ -390,7 +390,7 @@ void SwEditShell::MoveLeftMargin( BOOL bRight, BOOL bModulus )
{
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
GetDoc()->MoveLeftMargin( aRangeArr.SetPam( n, aPam ),
bRight, bModulus );
}
@@ -402,9 +402,9 @@ void SwEditShell::MoveLeftMargin( BOOL bRight, BOOL bModulus )
}
-inline USHORT lcl_SetScriptFlags( USHORT nType )
+inline sal_uInt16 lcl_SetScriptFlags( sal_uInt16 nType )
{
- USHORT nRet;
+ sal_uInt16 nRet;
switch( nType )
{
case ::com::sun::star::i18n::ScriptType::LATIN: nRet = SCRIPTTYPE_LATIN; break;
@@ -415,17 +415,17 @@ inline USHORT lcl_SetScriptFlags( USHORT nType )
return nRet;
}
-BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
- USHORT &rScrpt, BOOL bInSelection, BOOL bNum )
+sal_Bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
+ sal_uInt16 &rScrpt, sal_Bool bInSelection, sal_Bool bNum )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const String& rTxt = rTNd.GetTxt();
String sExp;
// consider numbering
if ( bNum )
{
- bRet = FALSE;
+ bRet = sal_False;
// --> OD 2008-03-19 #refactorlists#
if ( rTNd.IsInList() )
@@ -433,7 +433,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
ASSERT( rTNd.GetNumRule(),
"<lcl_IsNoEndTxtAttrAtPos(..)> - no list style found at text node. Serious defect -> please inform OD." );
const SwNumRule* pNumRule = rTNd.GetNumRule();
- const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<USHORT>(rTNd.GetActualListLevel()) );
+ const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<sal_uInt16>(rTNd.GetActualListLevel()) );
if( SVX_NUM_BITMAP != rNumFmt.GetNumberingType() )
{
if ( SVX_NUM_CHAR_SPECIAL == rNumFmt.GetNumberingType() )
@@ -450,7 +450,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
const SwTxtAttr* const pAttr = rTNd.GetTxtAttrForCharAt( nPos );
if (pAttr)
{
- bRet = TRUE; // all other than fields can be
+ bRet = sal_True; // all other than fields can be
// defined as weak-script ?
if ( RES_TXTATR_FIELD == pAttr->Which() )
{
@@ -469,7 +469,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
xub_StrLen n;
if( bInSelection )
{
- USHORT nScript;
+ sal_uInt16 nScript;
for( n = 0; n < nEnd; n = (xub_StrLen)
pBreakIt->GetBreakIter()->endOfScript( sExp, n, nScript ))
{
@@ -487,9 +487,9 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
// returns the scripttpye of the selection
-USHORT SwEditShell::GetScriptType() const
+sal_uInt16 SwEditShell::GetScriptType() const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
//if( pBreakIt->GetBreakIter().is() )
{
FOREACHPAM_START(this)
@@ -516,7 +516,7 @@ USHORT SwEditShell::GetScriptType() const
nPos = aIdx.GetIndex();
}
- USHORT nScript;
+ sal_uInt16 nScript;
if ( pTNd->GetTxt().Len() )
{
@@ -525,15 +525,15 @@ USHORT SwEditShell::GetScriptType() const
pBreakIt->GetBreakIter()->getScriptType( pTNd->GetTxt(), nPos );
}
else
- nScript = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
+ nScript = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
- if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nPos, nRet, FALSE, FALSE ))
+ if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nPos, nRet, sal_False, sal_False ))
nRet |= lcl_SetScriptFlags( nScript );
}
}
else if ( pBreakIt->GetBreakIter().is() )
{
- ULONG nEndIdx = pEnd->nNode.GetIndex();
+ sal_uLong nEndIdx = pEnd->nNode.GetIndex();
SwNodeIndex aIdx( pStt->nNode );
for( ; aIdx.GetIndex() <= nEndIdx; aIdx++ )
if( aIdx.GetNode().IsTxtNode() )
@@ -555,7 +555,7 @@ USHORT SwEditShell::GetScriptType() const
if( nEndPos > rTxt.Len() )
nEndPos = rTxt.Len();
- USHORT nScript;
+ sal_uInt16 nScript;
while( nChg < nEndPos )
{
nScript = pScriptInfo ?
@@ -563,7 +563,7 @@ USHORT SwEditShell::GetScriptType() const
pBreakIt->GetBreakIter()->getScriptType(
rTxt, nChg );
- if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nChg, nRet, TRUE,
+ if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nChg, nRet, sal_True,
0 == nChg && rTxt.Len() == nEndPos ) )
nRet |= lcl_SetScriptFlags( nScript );
@@ -600,12 +600,12 @@ USHORT SwEditShell::GetScriptType() const
}
-USHORT SwEditShell::GetCurLang() const
+sal_uInt16 SwEditShell::GetCurLang() const
{
const SwPaM* pCrsr = GetCrsr();
const SwPosition& rPos = *pCrsr->GetPoint();
const SwTxtNode* pTNd = rPos.nNode.GetNode().GetTxtNode();
- USHORT nLang;
+ sal_uInt16 nLang;
if( pTNd )
{
//JP 24.9.2001: if exist no selection, then get the language before
@@ -620,14 +620,14 @@ USHORT SwEditShell::GetCurLang() const
return nLang;
}
-USHORT SwEditShell::GetScalingOfSelectedText() const
+sal_uInt16 SwEditShell::GetScalingOfSelectedText() const
{
const SwPaM* pCrsr = GetCrsr();
const SwPosition* pStt = pCrsr->Start();
const SwTxtNode* pTNd = pStt->nNode.GetNode().GetTxtNode();
ASSERT( pTNd, "no textnode available" );
- USHORT nScaleWidth;
+ sal_uInt16 nScaleWidth;
if( pTNd )
{
xub_StrLen nStt = pStt->nContent.GetIndex(), nEnd;
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index a996ed802a42..16de81fc64bd 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -49,7 +49,7 @@
* Loeschen
************************************************************/
-void SwEditShell::DeleteSel( SwPaM& rPam, BOOL* pUndo )
+void SwEditShell::DeleteSel( SwPaM& rPam, sal_Bool* pUndo )
{
// nur bei Selektion
if( !rPam.HasMark() || *rPam.GetPoint() == *rPam.GetMark())
@@ -63,13 +63,13 @@ void SwEditShell::DeleteSel( SwPaM& rPam, BOOL* pUndo )
// selektierten Boxen suchen in den Inhalt loeschen
if( rPam.GetNode()->FindTableNode() &&
rPam.GetNode()->StartOfSectionNode() !=
- rPam.GetNode(FALSE)->StartOfSectionNode() )
+ rPam.GetNode(sal_False)->StartOfSectionNode() )
{
// in Tabellen das Undo gruppieren
if( pUndo && !*pUndo )
{
GetDoc()->StartUndo( UNDO_START, NULL );
- *pUndo = TRUE;
+ *pUndo = sal_True;
}
SwPaM aDelPam( *rPam.Start() );
const SwPosition* pEndSelPos = rPam.End();
@@ -123,7 +123,7 @@ long SwEditShell::Delete()
{
StartAllAction();
- BOOL bUndo = GetCrsr()->GetNext() != GetCrsr();
+ sal_Bool bUndo = GetCrsr()->GetNext() != GetCrsr();
if( bUndo ) // mehr als eine Selection ?
{
SwRewriter aRewriter;
@@ -159,7 +159,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
{
SwPosition * pPos = 0;
boost::shared_ptr<SwPosition> pInsertPos;
- USHORT nMove = 0;
+ sal_uInt16 nMove = 0;
FOREACHPAM_START(this)
if( !pPos )
@@ -180,7 +180,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
if( nMove )
{
SwCursor aCrsr( *pPos, 0, false);
- if( aCrsr.UpDown( FALSE, nMove, 0, 0 ) )
+ if( aCrsr.UpDown( sal_False, nMove, 0, 0 ) )
{
pInsertPos.reset( new SwPosition( *aCrsr.GetPoint() ) );
aInsertList.push_back( pInsertPos );
@@ -194,14 +194,14 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
// Check if a selection would be copied into itself
if( pDestShell->GetDoc() == GetDoc() &&
*PCURCRSR->Start() <= *pTmp && *pTmp < *PCURCRSR->End() )
- return FALSE;
+ return sal_False;
FOREACHPAM_END()
}
pDestShell->StartAllAction();
SwPosition *pPos = 0;
- BOOL bRet = FALSE;
- BOOL bFirstMove = TRUE;
+ sal_Bool bRet = sal_False;
+ sal_Bool bFirstMove = sal_True;
SwNodeIndex aSttNdIdx( pDestShell->GetDoc()->GetNodes() );
xub_StrLen nSttCntIdx = 0;
// For block selection this list is filled with the insert positions
@@ -243,7 +243,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
// Anfangs-Position vom neuen Bereich merken
aSttNdIdx = pPos->nNode.GetIndex()-1;
nSttCntIdx = pPos->nContent.GetIndex();
- bFirstMove = FALSE;
+ bFirstMove = sal_False;
}
const bool bSuccess( GetDoc()->CopyRange( *PCURCRSR, *pPos, false ) );
@@ -253,7 +253,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
SwPaM aInsertPaM(*pPos, SwPosition(aSttNdIdx));
pDestShell->GetDoc()->MakeUniqueNumRules(aInsertPaM);
- bRet = TRUE;
+ bRet = sal_True;
FOREACHPAM_END()
@@ -281,8 +281,8 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
ASSERT( pCmp->GetPoint()->nContent.GetIdxReg()
== pCmp->GetCntntNode(), "Point im falschen Node" );
ASSERT( pCmp->GetMark()->nContent.GetIdxReg()
- == pCmp->GetCntntNode(FALSE), "Mark im falschen Node" );
- BOOL bTst = *pCmp->GetPoint() == *pCmp->GetMark();
+ == pCmp->GetCntntNode(sal_False), "Mark im falschen Node" );
+ sal_Bool bTst = *pCmp->GetPoint() == *pCmp->GetMark();
(void) bTst;
} while( pDestShell->GetCrsr() != ( pCmp = (SwPaM*)pCmp->GetNext() ) );
}
@@ -304,11 +304,11 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
// ein ( nicht \& )
// z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
// --> "xx\t<Tab>..zzz..&"
-BOOL SwEditShell::Replace( const String& rNewStr, BOOL bRegExpRplc )
+sal_Bool SwEditShell::Replace( const String& rNewStr, sal_Bool bRegExpRplc )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !HasReadonlySel() )
{
StartAllAction();
@@ -332,9 +332,9 @@ BOOL SwEditShell::Replace( const String& rNewStr, BOOL bRegExpRplc )
// Special-Methode fuer JOE's- Wizzards
-BOOL SwEditShell::DelFullPara()
+sal_Bool SwEditShell::DelFullPara()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsTableMode() )
{
SwPaM* pCrsr = GetCrsr();
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index c3dc53f1ba26..2f491e0babf6 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -56,13 +56,13 @@ SwTxtFmtColl& SwEditShell::GetDfltTxtFmtColl() const
}
-USHORT SwEditShell::GetTxtFmtCollCount() const
+sal_uInt16 SwEditShell::GetTxtFmtCollCount() const
{
return GetDoc()->GetTxtFmtColls()->Count();
}
-SwTxtFmtColl& SwEditShell::GetTxtFmtColl( USHORT nFmtColl) const
+SwTxtFmtColl& SwEditShell::GetTxtFmtColl( sal_uInt16 nFmtColl) const
{
return *((*(GetDoc()->GetTxtFmtColls()))[nFmtColl]);
}
@@ -101,14 +101,14 @@ SwTxtFmtColl* SwEditShell::MakeTxtFmtColl(const String& rFmtCollName,
pParent = &GetTxtFmtColl(0);
if ( (pColl=GetDoc()->MakeTxtFmtColl(rFmtCollName, pParent)) == 0 )
{
- ASSERT( FALSE, "MakeTxtFmtColl failed" )
+ ASSERT( sal_False, "MakeTxtFmtColl failed" )
}
return pColl;
}
-void SwEditShell::FillByEx(SwTxtFmtColl* pColl, BOOL bReset)
+void SwEditShell::FillByEx(SwTxtFmtColl* pColl, sal_Bool bReset)
{
if( bReset )
{
@@ -130,10 +130,10 @@ void SwEditShell::FillByEx(SwTxtFmtColl* pColl, BOOL bReset)
// AutoNumRules NICHT in die Vorlagen uebernehmen
const SfxPoolItem* pItem;
const SwNumRule* pRule = 0;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE ) ||
- SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC,FALSE ) ||
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False ) ||
+ SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC,sal_False ) ||
( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_NUMRULE,
- FALSE, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
+ sal_False, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() )) &&
pRule && pRule->IsAutoRule() )
)
@@ -143,7 +143,7 @@ void SwEditShell::FillByEx(SwTxtFmtColl* pColl, BOOL bReset)
aSet.ClearItem( RES_PAGEDESC );
if( pRule || (SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_NUMRULE,
- FALSE, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
+ sal_False, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() )) &&
pRule && pRule->IsAutoRule() ))
aSet.ClearItem( RES_PARATR_NUMRULE );
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index aa84aa480121..a0e99e7a57e5 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -52,10 +52,10 @@
wenn 0 alle zaehlen
--------------------------------------------------------------------*/
-USHORT SwEditShell::GetFldTypeCount(USHORT nResId, BOOL bUsed ) const
+sal_uInt16 SwEditShell::GetFldTypeCount(sal_uInt16 nResId, sal_Bool bUsed ) const
{
const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
+ const sal_uInt16 nSize = pFldTypes->Count();
if(nResId == USHRT_MAX)
{
@@ -63,8 +63,8 @@ USHORT SwEditShell::GetFldTypeCount(USHORT nResId, BOOL bUsed ) const
return nSize;
else
{
- USHORT nUsed = 0;
- for ( USHORT i = 0; i < nSize; i++ )
+ sal_uInt16 nUsed = 0;
+ for ( sal_uInt16 i = 0; i < nSize; i++ )
{
if(IsUsed(*(*pFldTypes)[i]))
nUsed++;
@@ -74,8 +74,8 @@ USHORT SwEditShell::GetFldTypeCount(USHORT nResId, BOOL bUsed ) const
}
// Alle Typen mit gleicher ResId
- USHORT nIdx = 0;
- for(USHORT i = 0; i < nSize; ++i)
+ sal_uInt16 nIdx = 0;
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{ // Gleiche ResId -> Index erhoehen
SwFieldType& rFldType = *((*pFldTypes)[i]);
if(rFldType.Which() == nResId)
@@ -88,10 +88,10 @@ USHORT SwEditShell::GetFldTypeCount(USHORT nResId, BOOL bUsed ) const
Beschreibung: Feldtypen zu einer ResId finden
wenn 0 alle finden
--------------------------------------------------------------------*/
-SwFieldType* SwEditShell::GetFldType(USHORT nFld, USHORT nResId, BOOL bUsed ) const
+SwFieldType* SwEditShell::GetFldType(sal_uInt16 nFld, sal_uInt16 nResId, sal_Bool bUsed ) const
{
const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
+ const sal_uInt16 nSize = pFldTypes->Count();
if(nResId == USHRT_MAX && nFld < nSize)
{
@@ -99,7 +99,7 @@ SwFieldType* SwEditShell::GetFldType(USHORT nFld, USHORT nResId, BOOL bUsed ) co
return (*pFldTypes)[nFld];
else
{
- USHORT i, nUsed = 0;
+ sal_uInt16 i, nUsed = 0;
for ( i = 0; i < nSize; i++ )
{
if(IsUsed(*(*pFldTypes)[i]))
@@ -113,8 +113,8 @@ SwFieldType* SwEditShell::GetFldType(USHORT nFld, USHORT nResId, BOOL bUsed ) co
}
}
- USHORT nIdx = 0;
- for(USHORT i = 0; i < nSize; ++i)
+ sal_uInt16 nIdx = 0;
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{ // Gleiche ResId -> Index erhoehen
SwFieldType* pFldType = (*pFldTypes)[i];
if(pFldType->Which() == nResId)
@@ -133,7 +133,7 @@ SwFieldType* SwEditShell::GetFldType(USHORT nFld, USHORT nResId, BOOL bUsed ) co
/*--------------------------------------------------------------------
Beschreibung: Den ersten Typen mit ResId und Namen finden
--------------------------------------------------------------------*/
-SwFieldType* SwEditShell::GetFldType(USHORT nResId, const String& rName) const
+SwFieldType* SwEditShell::GetFldType(sal_uInt16 nResId, const String& rName) const
{
return GetDoc()->GetFldType( nResId, rName, false );
}
@@ -141,7 +141,7 @@ SwFieldType* SwEditShell::GetFldType(USHORT nResId, const String& rName) const
/*--------------------------------------------------------------------
Beschreibung: Feldtypen loeschen
--------------------------------------------------------------------*/
-void SwEditShell::RemoveFldType(USHORT nFld, USHORT nResId)
+void SwEditShell::RemoveFldType(sal_uInt16 nFld, sal_uInt16 nResId)
{
if( USHRT_MAX == nResId )
{
@@ -150,9 +150,9 @@ void SwEditShell::RemoveFldType(USHORT nFld, USHORT nResId)
}
const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
- USHORT nIdx = 0;
- for( USHORT i = 0; i < nSize; ++i )
+ const sal_uInt16 nSize = pFldTypes->Count();
+ sal_uInt16 nIdx = 0;
+ for( sal_uInt16 i = 0; i < nSize; ++i )
// Gleiche ResId -> Index erhoehen
if( (*pFldTypes)[i]->Which() == nResId &&
nIdx++ == nFld )
@@ -165,15 +165,15 @@ void SwEditShell::RemoveFldType(USHORT nFld, USHORT nResId)
/*--------------------------------------------------------------------
Beschreibung: FieldType ueber Name loeschen
--------------------------------------------------------------------*/
-void SwEditShell::RemoveFldType(USHORT nResId, const String& rStr)
+void SwEditShell::RemoveFldType(sal_uInt16 nResId, const String& rStr)
{
const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
+ const sal_uInt16 nSize = pFldTypes->Count();
const CharClass& rCC = GetAppCharClass();
String aTmp( rCC.lower( rStr ));
- for(USHORT i = 0; i < nSize; ++i)
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{
// Gleiche ResId -> Index erhoehen
SwFieldType* pFldType = (*pFldTypes)[i];
@@ -200,7 +200,7 @@ void SwEditShell::FieldToText( SwFieldType* pType )
Push();
SwPaM* pPaM = GetCrsr();
- BOOL bDDEFld = RES_DDEFLD == pType->Which();
+ sal_Bool bDDEFld = RES_DDEFLD == pType->Which();
// Modify-Object gefunden, trage alle Felder ins Array ein
SwClientIter aIter( *pType );
SwClient * pLast = aIter.GoStart();
@@ -240,7 +240,7 @@ void SwEditShell::FieldToText( SwFieldType* pType )
} while( 0 != ( pLast = aIter++ ));
- Pop( FALSE );
+ Pop( sal_False );
EndAllAction();
EndUndo( UNDO_DELETE );
}
@@ -366,7 +366,7 @@ void SwEditShell::UpdateFlds( SwField &rFld )
// Cursor-Position.
SwMsgPoolItem* pMsgHnt = 0;
SwRefMarkFldUpdate aRefMkHt( GetOut() );
- USHORT nFldWhich = rFld.GetTyp()->Which();
+ sal_uInt16 nFldWhich = rFld.GetTyp()->Which();
if( RES_GETREFFLD == nFldWhich )
pMsgHnt = &aRefMkHt;
@@ -387,14 +387,14 @@ void SwEditShell::UpdateFlds( SwField &rFld )
pTxtFld = lcl_FindInputFld( GetDoc(), rFld);
if (pTxtFld != 0)
- GetDoc()->UpdateFld(pTxtFld, rFld, pMsgHnt, TRUE); // #111840#
+ GetDoc()->UpdateFld(pTxtFld, rFld, pMsgHnt, sal_True); // #111840#
}
- // bOkay (statt return wg. EndAllAction) wird FALSE,
+ // bOkay (statt return wg. EndAllAction) wird sal_False,
// 1) wenn nur ein Pam mehr als ein Feld enthaelt oder
// 2) bei gemischten Feldtypen
- BOOL bOkay = TRUE;
- BOOL bTblSelBreak = FALSE;
+ sal_Bool bOkay = sal_True;
+ sal_Bool bTblSelBreak = sal_False;
SwMsgPoolItem aHint( RES_TXTATR_FIELD ); // Such-Hint
FOREACHPAM_START(this) // fuer jeden PaM
@@ -417,11 +417,11 @@ void SwEditShell::UpdateFlds( SwField &rFld )
// Suche nach SwTxtFld ...
while( bOkay
&& pCurStt->nContent != pCurEnd->nContent
- && aPam.Find( aHint, FALSE, fnMoveForward, &aCurPam ) )
+ && aPam.Find( aHint, sal_False, fnMoveForward, &aCurPam ) )
{
// wenn nur ein Pam mehr als ein Feld enthaelt ...
if( aPam.Start()->nContent != pCurStt->nContent )
- bOkay = FALSE;
+ bOkay = sal_False;
if( 0 != (pTxtFld = GetDocTxtFld( pCurStt )) )
{
@@ -431,10 +431,10 @@ void SwEditShell::UpdateFlds( SwField &rFld )
// bei gemischten Feldtypen
if( pCurFld->GetTyp()->Which() !=
rFld.GetTyp()->Which() )
- bOkay = FALSE;
+ bOkay = sal_False;
bTblSelBreak = GetDoc()->UpdateFld(pTxtFld, rFld,
- pMsgHnt, FALSE); // #111840#
+ pMsgHnt, sal_False); // #111840#
}
// Der Suchbereich wird um den gefundenen Bereich
// verkuerzt.
@@ -485,7 +485,7 @@ void SwEditShell::ChangeDBFields( const SvStringsDtor& rOldNames,
/*--------------------------------------------------------------------
Beschreibung: Alle Expression-Felder erneuern
--------------------------------------------------------------------*/
-void SwEditShell::UpdateExpFlds(BOOL bCloseDB)
+void SwEditShell::UpdateExpFlds(sal_Bool bCloseDB)
{
SET_CURR_SHELL( this );
StartAllAction();
@@ -524,30 +524,30 @@ void SwEditShell::SetFldUpdateFlags( SwFldUpdateFlags eFlags )
getIDocumentSettingAccess()->setFieldUpdateFlags( eFlags );
}
-SwFldUpdateFlags SwEditShell::GetFldUpdateFlags(BOOL bDocSettings) const
+SwFldUpdateFlags SwEditShell::GetFldUpdateFlags(sal_Bool bDocSettings) const
{
return getIDocumentSettingAccess()->getFieldUpdateFlags( !bDocSettings );
}
-void SwEditShell::SetFixFields( BOOL bOnlyTimeDate,
+void SwEditShell::SetFixFields( sal_Bool bOnlyTimeDate,
const DateTime* pNewDateTime )
{
SET_CURR_SHELL( this );
- BOOL bUnLockView = !IsViewLocked();
- LockView( TRUE );
+ sal_Bool bUnLockView = !IsViewLocked();
+ LockView( sal_True );
StartAllAction();
GetDoc()->SetFixFields( bOnlyTimeDate, pNewDateTime );
EndAllAction();
if( bUnLockView )
- LockView( FALSE );
+ LockView( sal_False );
}
-void SwEditShell::SetLabelDoc( BOOL bFlag )
+void SwEditShell::SetLabelDoc( sal_Bool bFlag )
{
GetDoc()->set(IDocumentSettingAccess::LABEL_DOCUMENT, bFlag );
}
-BOOL SwEditShell::IsLabelDoc() const
+sal_Bool SwEditShell::IsLabelDoc() const
{
return getIDocumentSettingAccess()->get(IDocumentSettingAccess::LABEL_DOCUMENT);
}
@@ -561,14 +561,14 @@ void SwEditShell::ChangeAuthorityData(const SwAuthEntry* pNewData)
/* -----------------------------03.08.2001 12:04------------------------------
---------------------------------------------------------------------------*/
-BOOL SwEditShell::IsAnyDatabaseFieldInDoc()const
+sal_Bool SwEditShell::IsAnyDatabaseFieldInDoc()const
{
const SwFldTypes * pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
- for(USHORT i = 0; i < nSize; ++i)
+ const sal_uInt16 nSize = pFldTypes->Count();
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{
SwFieldType& rFldType = *((*pFldTypes)[i]);
- USHORT nWhich = rFldType.Which();
+ sal_uInt16 nWhich = rFldType.Which();
if(IsUsed(rFldType))
{
switch(nWhich)
@@ -583,7 +583,7 @@ BOOL SwEditShell::IsAnyDatabaseFieldInDoc()const
while(pFld)
{
if(pFld->IsFldInDoc())
- return TRUE;
+ return sal_True;
pFld = (SwFmtFld*)aIter.Next();
}
}
@@ -591,5 +591,5 @@ BOOL SwEditShell::IsAnyDatabaseFieldInDoc()const
}
}
}
- return FALSE;
+ return sal_False;
}
diff --git a/sw/source/core/edit/edfldexp.cxx b/sw/source/core/edit/edfldexp.cxx
index 1bc78a5a7482..6359c982507e 100644
--- a/sw/source/core/edit/edfldexp.cxx
+++ b/sw/source/core/edit/edfldexp.cxx
@@ -49,21 +49,21 @@ using ::rtl::OUString;
/* -----------------28.11.2002 17:53-----------------
*
* --------------------------------------------------*/
-BOOL SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
+sal_Bool SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
{
const SwFldTypes * pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
+ const sal_uInt16 nSize = pFldTypes->Count();
uno::Reference< lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
if( !xMgr.is() )
- return FALSE;
+ return sal_False;
uno::Reference<uno::XInterface> xInstance = xMgr->createInstance( OUString::createFromAscii( "com.sun.star.sdb.DatabaseContext" ));
uno::Reference<container::XNameAccess> xDBContext(xInstance, uno::UNO_QUERY) ;
if(!xDBContext.is())
- return FALSE;
- for(USHORT i = 0; i < nSize; ++i)
+ return sal_False;
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{
SwFieldType& rFldType = *((*pFldTypes)[i]);
- USHORT nWhich = rFldType.Which();
+ sal_uInt16 nWhich = rFldType.Which();
if(IsUsed(rFldType))
{
switch(nWhich)
@@ -85,7 +85,7 @@ BOOL SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
catch(uno::Exception const &)
{
rUsedDataSource = rData.sDataSource;
- return FALSE;
+ return sal_False;
}
}
pFld = (SwFmtFld*)aIter.Next();
@@ -95,7 +95,7 @@ BOOL SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
}
}
}
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx
index a23f6ae784ae..225a1df48c74 100644
--- a/sw/source/core/edit/edfmt.cxx
+++ b/sw/source/core/edit/edfmt.cxx
@@ -48,13 +48,13 @@
// OPT: inline
-USHORT SwEditShell::GetCharFmtCount() const
+sal_uInt16 SwEditShell::GetCharFmtCount() const
{
return GetDoc()->GetCharFmts()->Count();
}
-SwCharFmt& SwEditShell::GetCharFmt(USHORT nFmt) const
+SwCharFmt& SwEditShell::GetCharFmt(sal_uInt16 nFmt) const
{
return *((*(GetDoc()->GetCharFmts()))[nFmt]);
}
@@ -67,14 +67,14 @@ SwCharFmt* SwEditShell::GetCurCharFmt() const
RES_TXTATR_CHARFMT );
const SfxPoolItem* pItem;
if( GetCurAttr( aSet ) && SFX_ITEM_SET ==
- aSet.GetItemState( RES_TXTATR_CHARFMT, FALSE, &pItem ) )
+ aSet.GetItemState( RES_TXTATR_CHARFMT, sal_False, &pItem ) )
pFmt = ((SwFmtCharFmt*)pItem)->GetCharFmt();
return pFmt;
}
-void SwEditShell::FillByEx(SwCharFmt* pCharFmt, BOOL bReset)
+void SwEditShell::FillByEx(SwCharFmt* pCharFmt, sal_Bool bReset)
{
if ( bReset )
{
@@ -128,12 +128,12 @@ void SwEditShell::FillByEx(SwCharFmt* pCharFmt, BOOL bReset)
}
// Frm
-USHORT SwEditShell::GetTblFrmFmtCount(BOOL bUsed) const
+sal_uInt16 SwEditShell::GetTblFrmFmtCount(sal_Bool bUsed) const
{
return GetDoc()->GetTblFrmFmtCount(bUsed);
}
-SwFrmFmt& SwEditShell::GetTblFrmFmt(USHORT nFmt, BOOL bUsed ) const
+SwFrmFmt& SwEditShell::GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed ) const
{
return GetDoc()->GetTblFrmFmt(nFmt, bUsed );
}
@@ -157,31 +157,31 @@ SwCharFmt* SwEditShell::MakeCharFmt( const String& rName,
// inlines im Product
-SwTxtFmtColl* SwEditShell::GetTxtCollFromPool( USHORT nId )
+SwTxtFmtColl* SwEditShell::GetTxtCollFromPool( sal_uInt16 nId )
{
return GetDoc()->GetTxtCollFromPool( nId );
}
// return das geforderte automatische Format - Basis-Klasse !
-SwFmt* SwEditShell::GetFmtFromPool( USHORT nId )
+SwFmt* SwEditShell::GetFmtFromPool( sal_uInt16 nId )
{
return GetDoc()->GetFmtFromPool( nId );
}
-SwPageDesc* SwEditShell::GetPageDescFromPool( USHORT nId )
+SwPageDesc* SwEditShell::GetPageDescFromPool( sal_uInt16 nId )
{
return GetDoc()->GetPageDescFromPool( nId );
}
-BOOL SwEditShell::IsUsed( const SwModify& rModify ) const
+sal_Bool SwEditShell::IsUsed( const SwModify& rModify ) const
{
return pDoc->IsUsed( rModify );
}
-const SwFlyFrmFmt* SwEditShell::FindFlyByName( const String& rName, BYTE nNdTyp ) const
+const SwFlyFrmFmt* SwEditShell::FindFlyByName( const String& rName, sal_uInt8 nNdTyp ) const
{
return pDoc->FindFlyByName(rName, nNdTyp);
}
diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx
index 6f884f244326..b39fa2724f73 100644
--- a/sw/source/core/edit/edglbldc.cxx
+++ b/sw/source/core/edit/edglbldc.cxx
@@ -43,12 +43,12 @@
SV_IMPL_OP_PTRARR_SORT( SwGlblDocContents, SwGlblDocContentPtr )
-BOOL SwEditShell::IsGlobalDoc() const
+sal_Bool SwEditShell::IsGlobalDoc() const
{
return getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
}
-void SwEditShell::SetGlblDocSaveLinks( BOOL bFlag )
+void SwEditShell::SetGlblDocSaveLinks( sal_Bool bFlag )
{
getIDocumentSettingAccess()->set(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS, bFlag);
if( !GetDoc()->IsModified() ) // Bug 57028
@@ -56,12 +56,12 @@ void SwEditShell::SetGlblDocSaveLinks( BOOL bFlag )
GetDoc()->SetModified();
}
-BOOL SwEditShell::IsGlblDocSaveLinks() const
+sal_Bool SwEditShell::IsGlblDocSaveLinks() const
{
return getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
}
-USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
+sal_uInt16 SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
{
if( rArr.Count() )
rArr.DeleteAndDestroy( 0, rArr.Count() );
@@ -72,7 +72,7 @@ USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
// dann alle gelinkten Bereiche auf der obersten Ebene
SwDoc* pMyDoc = GetDoc();
const SwSectionFmts& rSectFmts = pMyDoc->GetSections();
- USHORT n;
+ sal_uInt16 n;
for( n = rSectFmts.Count(); n; )
{
@@ -99,7 +99,7 @@ USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
// und als letztes die Dummies (sonstiger Text) einfuegen
SwNode* pNd;
- ULONG nSttIdx = pMyDoc->GetNodes().GetEndOfExtras().GetIndex() + 2;
+ sal_uLong nSttIdx = pMyDoc->GetNodes().GetEndOfExtras().GetIndex() + 2;
for( n = 0; n < rArr.Count(); ++n )
{
const SwGlblDocContent& rNew = *rArr[ n ];
@@ -125,7 +125,7 @@ USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
// sollte man das Ende auch noch setzen??
if( rArr.Count() )
{
- ULONG nNdEnd = pMyDoc->GetNodes().GetEndOfContent().GetIndex();
+ sal_uLong nNdEnd = pMyDoc->GetNodes().GetEndOfContent().GetIndex();
for( ; nSttIdx < nNdEnd; ++nSttIdx )
if( ( pNd = pMyDoc->GetNodes()[ nSttIdx ])->IsCntntNode()
|| pNd->IsSectionNode() || pNd->IsTableNode() )
@@ -145,11 +145,11 @@ USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
return rArr.Count();
}
-BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
+sal_Bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
SwSectionData & rNew)
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -161,14 +161,14 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
SwPosition& rPos = *pCrsr->GetPoint();
rPos.nNode = rInsPos.GetDocPos();
- BOOL bEndUndo = FALSE;
+ sal_Bool bEndUndo = sal_False;
SwDoc* pMyDoc = GetDoc();
SwTxtNode* pTxtNd = pMyDoc->GetNodes()[ rPos.nNode ]->GetTxtNode();
if( pTxtNd )
rPos.nContent.Assign( pTxtNd, 0 );
else
{
- bEndUndo = TRUE;
+ bEndUndo = sal_True;
pMyDoc->StartUndo( UNDO_START, NULL );
rPos.nNode--;
pMyDoc->AppendTxtNode( rPos );
@@ -181,14 +181,14 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
pMyDoc->EndUndo( UNDO_END, NULL );
EndAllAction();
- return TRUE;
+ return sal_True;
}
-BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
+sal_Bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
const SwTOXBase& rTOX )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -200,7 +200,7 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
SwPosition& rPos = *pCrsr->GetPoint();
rPos.nNode = rInsPos.GetDocPos();
- BOOL bEndUndo = FALSE;
+ sal_Bool bEndUndo = sal_False;
SwDoc* pMyDoc = GetDoc();
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
if( pTxtNd && pTxtNd->GetTxt().Len() && rPos.nNode.GetIndex() + 1 !=
@@ -208,7 +208,7 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
rPos.nContent.Assign( pTxtNd, 0 );
else
{
- bEndUndo = TRUE;
+ bEndUndo = sal_True;
pMyDoc->StartUndo( UNDO_START, NULL );
rPos.nNode--;
pMyDoc->AppendTxtNode( rPos );
@@ -220,13 +220,13 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
pMyDoc->EndUndo( UNDO_END, NULL );
EndAllAction();
- return TRUE;
+ return sal_True;
}
-BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos )
+sal_Bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -242,14 +242,14 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos )
SwDoc* pMyDoc = GetDoc();
pMyDoc->AppendTxtNode( rPos );
EndAllAction();
- return TRUE;
+ return sal_True;
}
-BOOL SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
- USHORT nDelPos )
+sal_Bool SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
+ sal_uInt16 nDelPos )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -263,7 +263,7 @@ BOOL SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
SwDoc* pMyDoc = GetDoc();
const SwGlblDocContent& rDelPos = *rArr[ nDelPos ];
- ULONG nDelIdx = rDelPos.GetDocPos();
+ sal_uLong nDelIdx = rDelPos.GetDocPos();
if( 1 == rArr.Count() )
{
// ein Node muss aber da bleiben!
@@ -293,32 +293,32 @@ BOOL SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
case GLBLDOC_TOXBASE:
{
SwTOXBaseSection* pTOX = (SwTOXBaseSection*)rDelPos.GetTOX();
- pMyDoc->DeleteTOX( *pTOX, TRUE );
+ pMyDoc->DeleteTOX( *pTOX, sal_True );
}
break;
case GLBLDOC_SECTION:
{
SwSectionFmt* pSectFmt = (SwSectionFmt*)rDelPos.GetSection()->GetFmt();
- pMyDoc->DelSectionFmt( pSectFmt, TRUE );
+ pMyDoc->DelSectionFmt( pSectFmt, sal_True );
}
break;
}
EndUndo( UNDO_END );
EndAllAction();
- return TRUE;
+ return sal_True;
}
-BOOL SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr ,
- USHORT nFromPos, USHORT nToPos,
- USHORT nInsPos )
+sal_Bool SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr ,
+ sal_uInt16 nFromPos, sal_uInt16 nToPos,
+ sal_uInt16 nInsPos )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) ||
nFromPos >= rArr.Count() || nToPos > rArr.Count() ||
nInsPos > rArr.Count() || nFromPos >= nToPos ||
( nFromPos <= nInsPos && nInsPos <= nToPos ) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -349,10 +349,10 @@ BOOL SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr ,
return bRet;
}
-BOOL SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos )
+sal_Bool SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
SttCrsrMove();
@@ -372,10 +372,10 @@ BOOL SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos )
rCrsrPos.nContent.Assign( pCNd, 0 );
EndCrsrMove();
- return TRUE;
+ return sal_True;
}
-SwGlblDocContent::SwGlblDocContent( ULONG nPos )
+SwGlblDocContent::SwGlblDocContent( sal_uLong nPos )
{
eType = GLBLDOC_UNKNOWN;
PTR.pTOX = 0;
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index 50709990f0ff..56996558b306 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -64,8 +64,8 @@ void SwEditShell::InsertGlossary( SwTextBlocks& rGlossary, const String& rStr )
******************************************************************************/
-USHORT SwEditShell::MakeGlossary( SwTextBlocks& rBlks, const String& rName, const String& rShortName,
- BOOL bSaveRelFile, const String* pOnlyTxt )
+sal_uInt16 SwEditShell::MakeGlossary( SwTextBlocks& rBlks, const String& rName, const String& rShortName,
+ sal_Bool bSaveRelFile, const String* pOnlyTxt )
{
SwDoc* pGDoc = rBlks.GetDoc();
@@ -77,7 +77,7 @@ USHORT SwEditShell::MakeGlossary( SwTextBlocks& rBlks, const String& rName, cons
}
rBlks.SetBaseURL( sBase );
- USHORT nRet;
+ sal_uInt16 nRet;
if( pOnlyTxt )
nRet = rBlks.PutText( rShortName, rName, *pOnlyTxt );
@@ -92,17 +92,17 @@ USHORT SwEditShell::MakeGlossary( SwTextBlocks& rBlks, const String& rName, cons
nRet = rBlks.PutDoc();
}
else
- nRet = (USHORT) -1;
+ nRet = (sal_uInt16) -1;
}
return nRet;
}
-USHORT SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
+sal_uInt16 SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
const String& rName,
const String& rShortName,
- BOOL bSaveRelFile,
- BOOL bOnlyTxt )
+ sal_Bool bSaveRelFile,
+ sal_Bool bOnlyTxt )
{
StartAllAction();
@@ -116,7 +116,7 @@ USHORT SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
sBase = aURL.GetMainURL( INetURLObject::NO_DECODE );
}
rBlock.SetBaseURL( sBase );
- USHORT nRet = USHRT_MAX;
+ sal_uInt16 nRet = USHRT_MAX;
if( bOnlyTxt )
{
@@ -179,7 +179,7 @@ USHORT SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
******************************************************************************/
-BOOL SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
+sal_Bool SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
{
ASSERT( pInsDoc, "kein Ins.Dokument" );
@@ -196,7 +196,7 @@ BOOL SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
(*pSttNd)--;
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SET_CURR_SHELL( this );
pInsDoc->LockExpFlds();
@@ -215,22 +215,22 @@ BOOL SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
->GetSttNd()->FindTableNode() ))
{
// teste ob der TabellenName kopiert werden kann
- BOOL bCpyTblNm = aBoxes.Count() == pTblNd->GetTable().GetTabSortBoxes().Count();
+ sal_Bool bCpyTblNm = aBoxes.Count() == pTblNd->GetTable().GetTabSortBoxes().Count();
if( bCpyTblNm )
{
const String& rTblName = pTblNd->GetTable().GetFrmFmt()->GetName();
const SwFrmFmts& rTblFmts = *pInsDoc->GetTblFrmFmts();
- for( USHORT n = rTblFmts.Count(); n; )
+ for( sal_uInt16 n = rTblFmts.Count(); n; )
if( rTblFmts[ --n ]->GetName() == rTblName )
{
- bCpyTblNm = FALSE;
+ bCpyTblNm = sal_False;
break;
}
}
- bRet = pInsDoc->InsCopyOfTbl( aPos, aBoxes, 0, bCpyTblNm, FALSE );
+ bRet = pInsDoc->InsCopyOfTbl( aPos, aBoxes, 0, bCpyTblNm, sal_False );
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
else
{
@@ -276,13 +276,13 @@ BOOL SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
/*------------------------------------------------------------------------
Beschreibung: Text innerhalb der Selektion erfragen
- Returnwert: liefert FALSE, wenn der selektierte Bereich
+ Returnwert: liefert sal_False, wenn der selektierte Bereich
zu gross ist, um in den Stringpuffer kopiert zu werden.
------------------------------------------------------------------------*/
-BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
+sal_Bool SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
GetCrsr(); // ggfs. alle Cursor erzeugen lassen
if( IsSelOnePara() )
{
@@ -304,7 +304,7 @@ BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
RTL_CONSTASCII_STRINGPARAM( "\015\012" ));
#endif
}
- bRet = TRUE;
+ bRet = sal_True;
}
else if( IsSelection() )
{
@@ -320,18 +320,18 @@ BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
{
// Selektierte Bereiche in ein ASCII Dokument schreiben
SwWriter aWriter( aStream, *this);
- xWrt->SetShowProgress( FALSE );
+ xWrt->SetShowProgress( sal_False );
switch( nHndlParaBrk )
{
case GETSELTXT_PARABRK_TO_BLANK:
- xWrt->bASCII_ParaAsBlanc = TRUE;
- xWrt->bASCII_NoLastLineEnd = TRUE;
+ xWrt->bASCII_ParaAsBlanc = sal_True;
+ xWrt->bASCII_NoLastLineEnd = sal_True;
break;
case GETSELTXT_PARABRK_TO_ONLYCR:
- xWrt->bASCII_ParaAsCR = TRUE;
- xWrt->bASCII_NoLastLineEnd = TRUE;
+ xWrt->bASCII_ParaAsCR = sal_True;
+ xWrt->bASCII_NoLastLineEnd = sal_True;
break;
}
@@ -339,7 +339,7 @@ BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
SwAsciiOptions aAsciiOpt( xWrt->GetAsciiOptions() );
aAsciiOpt.SetCharSet( RTL_TEXTENCODING_UCS2 );
xWrt->SetAsciiOptions( aAsciiOpt );
- xWrt->bUCS2_WithStartChar = FALSE;
+ xWrt->bUCS2_WithStartChar = sal_False;
long lLen;
if( !IsError( aWriter.Write( xWrt ) ) &&
@@ -364,7 +364,7 @@ BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
}
}
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 7a143a2d29d9..1698e4eb45bd 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -78,7 +78,7 @@ SV_IMPL_PTRARR(SwGetINetAttrs, SwGetINetAttr*)
******************************************************************************/
-void SwEditShell::Insert( sal_Unicode c, BOOL bOnlyCurrCrsr )
+void SwEditShell::Insert( sal_Unicode c, sal_Bool bOnlyCurrCrsr )
{
StartAllAction();
FOREACHPAM_START(this)
@@ -128,7 +128,7 @@ void SwEditShell::Insert2(const String &rStr, const bool bForceExpandHints )
// calculate cursor bidi level
SwCursor* pTmpCrsr = _GetCrsr();
- const BOOL bDoNotSetBidiLevel = ! pTmpCrsr ||
+ const sal_Bool bDoNotSetBidiLevel = ! pTmpCrsr ||
( 0 != dynamic_cast<SwUnoCrsr*>(pTmpCrsr) );
if ( ! bDoNotSetBidiLevel )
@@ -145,7 +145,7 @@ void SwEditShell::Insert2(const String &rStr, const bool bForceExpandHints )
SwScriptInfo* pSI = SwScriptInfo::GetScriptInfo( ((SwTxtNode&)rNode),
sal_True );
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
if ( ! pSI )
{
// seems to be an empty paragraph.
@@ -169,7 +169,7 @@ void SwEditShell::Insert2(const String &rStr, const bool bForceExpandHints )
}
}
- SetInFrontOfLabel( FALSE ); // #i27615#
+ SetInFrontOfLabel( sal_False ); // #i27615#
EndAllAction();
}
@@ -186,7 +186,7 @@ void SwEditShell::Overwrite(const String &rStr)
FOREACHPAM_START(this)
if( !GetDoc()->Overwrite(*PCURCRSR, rStr ) )
{
- ASSERT( FALSE, "Doc->Overwrite(Str) failed." )
+ ASSERT( sal_False, "Doc->Overwrite(Str) failed." )
}
SaveTblBoxCntnt( PCURCRSR->GetPoint() );
FOREACHPAM_END()
@@ -198,7 +198,7 @@ void SwEditShell::Overwrite(const String &rStr)
* long SwEditShell::SplitNode()
******************************************************************************/
-long SwEditShell::SplitNode( BOOL bAutoFormat, BOOL bCheckTableStart )
+long SwEditShell::SplitNode( sal_Bool bAutoFormat, sal_Bool bCheckTableStart )
{
StartAllAction();
GetDoc()->StartUndo(UNDO_EMPTY, NULL);
@@ -265,7 +265,7 @@ SwGrfNode * SwEditShell::_GetGrfNode() const
******************************************************************************/
// --> OD 2005-02-09 #119353# - robust
-const Graphic* SwEditShell::GetGraphic( BOOL bWait ) const
+const Graphic* SwEditShell::GetGraphic( sal_Bool bWait ) const
{
SwGrfNode* pGrfNode = _GetGrfNode();
// --> OD 2005-02-09 #119353# - robust
@@ -274,7 +274,7 @@ const Graphic* SwEditShell::GetGraphic( BOOL bWait ) const
{
pGrf = &(pGrfNode->GetGrf());
// --> OD 2007-03-01 #i73788#
- // no load of linked graphic, if its not needed now (bWait = FALSE).
+ // no load of linked graphic, if its not needed now (bWait = sal_False).
if ( bWait )
{
if( pGrf->IsSwapOut() ||
@@ -304,7 +304,7 @@ const Graphic* SwEditShell::GetGraphic( BOOL bWait ) const
// <--
}
-BOOL SwEditShell::IsGrfSwapOut( BOOL bOnlyLinked ) const
+sal_Bool SwEditShell::IsGrfSwapOut( sal_Bool bOnlyLinked ) const
{
SwGrfNode *pGrfNode = _GetGrfNode();
return pGrfNode &&
@@ -323,10 +323,10 @@ const GraphicObject* SwEditShell::GetGraphicObj() const
// <--
}
-USHORT SwEditShell::GetGraphicType() const
+sal_uInt16 SwEditShell::GetGraphicType() const
{
SwGrfNode *pGrfNode = _GetGrfNode();
- return static_cast<USHORT>(pGrfNode ? pGrfNode->GetGrfObj().GetType() : GRAPHIC_NONE);
+ return static_cast<sal_uInt16>(pGrfNode ? pGrfNode->GetGrfObj().GetType() : GRAPHIC_NONE);
}
/******************************************************************************
@@ -335,7 +335,7 @@ USHORT SwEditShell::GetGraphicType() const
* oder auf die gleiche Graphic zeigt)
******************************************************************************/
-BOOL SwEditShell::GetGrfSize(Size& rSz) const
+sal_Bool SwEditShell::GetGrfSize(Size& rSz) const
{
SwNoTxtNode* pNoTxtNd;
SwPaM* pCurrentCrsr = GetCrsr();
@@ -344,9 +344,9 @@ BOOL SwEditShell::GetGrfSize(Size& rSz) const
&& 0 != ( pNoTxtNd = pCurrentCrsr->GetNode()->GetNoTxtNode() ) )
{
rSz = pNoTxtNd->GetTwipSize();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/******************************************************************************
@@ -436,7 +436,7 @@ void SwEditShell::ClearAutomaticContour()
if( pNd->HasAutomaticContour() )
{
StartAllAction();
- pNd->SetContour( NULL, FALSE );
+ pNd->SetContour( NULL, sal_False );
SwFlyFrm *pFly = (SwFlyFrm*)pNd->GetFrm()->GetUpper();
const SwFmtSurround &rSur = pFly->GetFmt()->GetSurround();
pFly->GetFmt()->SwModify::Modify( (SwFmtSurround*)&rSur,
@@ -469,7 +469,7 @@ svt::EmbeddedObjectRef& SwEditShell::GetOLEObject() const
}
-BOOL SwEditShell::HasOLEObj( const String &rName ) const
+sal_Bool SwEditShell::HasOLEObj( const String &rName ) const
{
SwStartNode *pStNd;
SwNodeIndex aIdx( *GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
@@ -480,11 +480,11 @@ BOOL SwEditShell::HasOLEObj( const String &rName ) const
if( rNd.IsOLENode() &&
rName == ((SwOLENode&)rNd).GetChartTblName() &&
((SwOLENode&)rNd).GetFrm() )
- return TRUE;
+ return sal_True;
aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 );
}
- return FALSE;
+ return sal_False;
}
@@ -544,7 +544,7 @@ const SwFmtRefMark* SwEditShell::GetRefMark( const String& rName ) const
}
// returne die Namen aller im Doc gesetzten Referenzen
-USHORT SwEditShell::GetRefMarks( SvStringsDtor* pStrings ) const
+sal_uInt16 SwEditShell::GetRefMarks( SvStringsDtor* pStrings ) const
{
return GetDoc()->GetRefMarks( pStrings );
}
@@ -554,7 +554,7 @@ USHORT SwEditShell::GetRefMarks( SvStringsDtor* pStrings ) const
******************************************************************************/
-String SwEditShell::GetDropTxt( const USHORT nChars ) const
+String SwEditShell::GetDropTxt( const sal_uInt16 nChars ) const
{
/**
* pb: made changes for #i74939#
@@ -568,7 +568,7 @@ String SwEditShell::GetDropTxt( const USHORT nChars ) const
{
// if a multi selection exists, search for the first line
// -> it is the cursor with the lowest index
- ULONG nIndex = pCrsr->GetMark()->nNode.GetIndex();
+ sal_uLong nIndex = pCrsr->GetMark()->nNode.GetIndex();
bool bPrev = true;
SwPaM* pLast = pCrsr;
SwPaM* pTemp = pCrsr;
@@ -579,7 +579,7 @@ String SwEditShell::GetDropTxt( const USHORT nChars ) const
if ( bPrev )
{
pTemp = pPrev2;
- ULONG nTemp = pPrev2->GetMark()->nNode.GetIndex();
+ sal_uLong nTemp = pPrev2->GetMark()->nNode.GetIndex();
if ( nTemp < nIndex )
{
nIndex = nTemp;
@@ -612,7 +612,7 @@ void SwEditShell::ReplaceDropTxt( const String &rStr )
SwPaM aPam( rNd, rStr.Len(), rNd, 0 );
if( !GetDoc()->Overwrite( aPam, rStr ) )
{
- ASSERT( FALSE, "Doc->Overwrite(Str) failed." );
+ ASSERT( sal_False, "Doc->Overwrite(Str) failed." );
}
EndAllAction();
@@ -646,7 +646,7 @@ String SwEditShell::Calculate()
rCC.toLower( aStr );
sal_Unicode ch;
- BOOL bValidFlds = FALSE;
+ sal_Bool bValidFlds = sal_False;
xub_StrLen nPos = 0;
while( nPos < aStr.Len() )
@@ -674,7 +674,7 @@ String SwEditShell::Calculate()
GetDoc()->FldsToCalc( aCalc,
pStart->nNode.GetIndex(),
pStart->nContent.GetIndex() );
- bValidFlds = TRUE;
+ bValidFlds = sal_True;
}
(( aFormel += '(' ) +=
aCalc.GetStrResult( aCalc.VarLook( sVar )
@@ -724,9 +724,9 @@ Graphic SwEditShell::GetIMapGraphic() const
GRAPHIC_DEFAULT == rGrf.GetType() ) )
{
#ifdef DBG_UTIL
- ASSERT( ((SwGrfNode*)pNd)->SwapIn( TRUE ) || !TRUE, "Grafik konnte nicht geladen werden" );
+ ASSERT( ((SwGrfNode*)pNd)->SwapIn( sal_True ) || !sal_True, "Grafik konnte nicht geladen werden" );
#else
- ((SwGrfNode*)pNd)->SwapIn( TRUE );
+ ((SwGrfNode*)pNd)->SwapIn( sal_True );
#endif
}
aRet = rGrf;
@@ -746,14 +746,14 @@ Graphic SwEditShell::GetIMapGraphic() const
}
-BOOL SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, BOOL bKeepSelection )
+sal_Bool SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, sal_Bool bKeepSelection )
{
// URL und Hinweistext (direkt oder via Selektion) notwendig
if( !rFmt.GetValue().Len() || ( !rStr.Len() && !HasSelection() ) )
- return FALSE;
+ return sal_False;
StartAllAction();
GetDoc()->StartUndo( UNDO_UI_INSERT_URLTXT, NULL);
- BOOL bInsTxt = TRUE;
+ sal_Bool bInsTxt = sal_True;
if( rStr.Len() )
{
@@ -761,33 +761,33 @@ BOOL SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, BOOL
if( pCrsr->HasMark() && *pCrsr->GetPoint() != *pCrsr->GetMark() )
{
// Selection vorhanden, MehrfachSelektion?
- BOOL bDelTxt = TRUE;
+ sal_Bool bDelTxt = sal_True;
if( pCrsr->GetNext() == pCrsr )
{
// einfach Selection -> Text ueberpruefen
String sTxt( GetSelTxt() );
sTxt.EraseTrailingChars();
if( sTxt == rStr )
- bDelTxt = bInsTxt = FALSE;
+ bDelTxt = bInsTxt = sal_False;
}
else if( rFmt.GetValue() == rStr ) // Name und URL gleich?
- bDelTxt = bInsTxt = FALSE;
+ bDelTxt = bInsTxt = sal_False;
if( bDelTxt )
Delete();
}
else if( pCrsr->GetNext() != pCrsr && rFmt.GetValue() == rStr )
- bInsTxt = FALSE;
+ bInsTxt = sal_False;
if( bInsTxt )
{
Insert2( rStr );
SetMark();
- ExtendSelection( FALSE, rStr.Len() );
+ ExtendSelection( sal_False, rStr.Len() );
}
}
else
- bInsTxt = FALSE;
+ bInsTxt = sal_False;
SetAttr( rFmt );
if (bInsTxt && !IsCrsrPtAtEnd())
@@ -798,18 +798,18 @@ BOOL SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, BOOL
DontExpandFmt();
GetDoc()->EndUndo( UNDO_UI_INSERT_URLTXT, NULL );
EndAllAction();
- return TRUE;
+ return sal_True;
}
-USHORT SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr )
+sal_uInt16 SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr )
{
if( rArr.Count() )
rArr.DeleteAndDestroy( 0, rArr.Count() );
const SwTxtNode* pTxtNd;
const SwCharFmts* pFmts = GetDoc()->GetCharFmts();
- for( USHORT n = pFmts->Count(); 1 < n; )
+ for( sal_uInt16 n = pFmts->Count(); 1 < n; )
{
SwClientIter aIter( *(*pFmts)[ --n ] );
@@ -838,9 +838,9 @@ USHORT SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr )
// ist der Cursor in eine INetAttribut, dann wird das komplett
// geloescht; inclusive des Hinweistextes (wird beim Drag&Drop gebraucht)
-BOOL SwEditShell::DelINetAttrWithText()
+sal_Bool SwEditShell::DelINetAttrWithText()
{
- BOOL bRet = SelectTxtAttr( RES_TXTATR_INETFMT, FALSE );
+ sal_Bool bRet = SelectTxtAttr( RES_TXTATR_INETFMT, sal_False );
if( bRet )
DeleteSel( *GetCrsr() );
return bRet;
@@ -848,12 +848,12 @@ BOOL SwEditShell::DelINetAttrWithText()
// setzen an den Textzeichenattributen das DontExpand-Flag
-BOOL SwEditShell::DontExpandFmt()
+sal_Bool SwEditShell::DontExpandFmt()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsTableMode() && GetDoc()->DontExpandFmt( *GetCrsr()->GetPoint() ))
{
- bRet = TRUE;
+ bRet = sal_True;
CallChgLnk();
}
return bRet;
@@ -864,17 +864,17 @@ SvNumberFormatter* SwEditShell::GetNumberFormatter()
return GetDoc()->GetNumberFormatter();
}
-BOOL SwEditShell::RemoveInvisibleContent()
+sal_Bool SwEditShell::RemoveInvisibleContent()
{
StartAllAction();
- BOOL bRet = GetDoc()->RemoveInvisibleContent();
+ sal_Bool bRet = GetDoc()->RemoveInvisibleContent();
EndAllAction();
return bRet;
}
-BOOL SwEditShell::ConvertFieldsToText()
+sal_Bool SwEditShell::ConvertFieldsToText()
{
StartAllAction();
- BOOL bRet = GetDoc()->ConvertFieldsToText();
+ sal_Bool bRet = GetDoc()->ConvertFieldsToText();
EndAllAction();
return bRet;
}
@@ -891,8 +891,8 @@ void SwEditShell::SetNumberingRestart()
else
MakeFindRange(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, pCrsr); //extra content
SwPosition* pSttPos = pCrsr->Start(), *pEndPos = pCrsr->End();
- ULONG nCurrNd = pSttPos->nNode.GetIndex();
- ULONG nEndNd = pEndPos->nNode.GetIndex();
+ sal_uLong nCurrNd = pSttPos->nNode.GetIndex();
+ sal_uLong nEndNd = pEndPos->nNode.GetIndex();
if( nCurrNd <= nEndNd )
{
SwCntntFrm* pCntFrm;
@@ -922,7 +922,7 @@ void SwEditShell::SetNumberingRestart()
pTxtNd->IsCountedInList() &&
!pTxtNd->IsListRestart() &&
pTxtNd->GetNum()->GetNumber() ==
- pNumRule->Get( static_cast<USHORT>(pTxtNd->GetActualListLevel()) ).GetStart() )
+ pNumRule->Get( static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()) ).GetStart() )
{
//now set a the start value as attribute
SwPosition aCurrentNode(*pNd);
@@ -949,20 +949,20 @@ void SwEditShell::SetNumberingRestart()
}
- Pop(FALSE);
+ Pop(sal_False);
EndAllAction();
}
-USHORT SwEditShell::GetLineCount( BOOL bActPos )
+sal_uInt16 SwEditShell::GetLineCount( sal_Bool bActPos )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
CalcLayout();
SwPaM* pPam = GetCrsr();
SwNodeIndex& rPtIdx = pPam->GetPoint()->nNode;
SwNodeIndex aStart( rPtIdx );
SwCntntNode* pCNd;
SwCntntFrm *pCntFrm = 0;
- ULONG nTmpPos;
+ sal_uLong nTmpPos;
if( !bActPos )
aStart = 0;
@@ -981,7 +981,7 @@ USHORT SwEditShell::GetLineCount( BOOL bActPos )
pTmp = pCNd->FindFootnoteStartNode();
else
{ // Footer/Header
- const USHORT nTyp = FRM_HEADER | FRM_FOOTER;
+ const sal_uInt16 nTyp = FRM_HEADER | FRM_FOOTER;
SwFrm* pFrm = pCntFrm;
while( pFrm && !(pFrm->GetType() & nTyp) )
pFrm = pFrm->GetUpper();
@@ -998,7 +998,7 @@ USHORT SwEditShell::GetLineCount( BOOL bActPos )
}
while( 0 != ( pCNd = GetDoc()->GetNodes().GoNextSection(
- &aStart, TRUE, FALSE )) && ( !bActPos || aStart <= rPtIdx ) )
+ &aStart, sal_True, sal_False )) && ( !bActPos || aStart <= rPtIdx ) )
{
if( 0 != ( pCntFrm = pCNd->GetFrm() ) && pCntFrm->IsTxtFrm() )
{
@@ -1068,12 +1068,12 @@ void SwEditShell::SetLineNumberInfo(const SwLineNumberInfo& rInfo)
EndAllAction();
}
-USHORT SwEditShell::GetLinkUpdMode(BOOL bDocSettings) const
+sal_uInt16 SwEditShell::GetLinkUpdMode(sal_Bool bDocSettings) const
{
return getIDocumentSettingAccess()->getLinkUpdateMode( !bDocSettings );
}
-void SwEditShell::SetLinkUpdMode( USHORT nMode )
+void SwEditShell::SetLinkUpdMode( sal_uInt16 nMode )
{
getIDocumentSettingAccess()->setLinkUpdateMode( nMode );
}
@@ -1089,7 +1089,7 @@ SwExtTextInput* SwEditShell::CreateExtTextInput(LanguageType eInputLanguage)
return pRet;
}
-String SwEditShell::DeleteExtTextInput( SwExtTextInput* pDel, BOOL bInsText )
+String SwEditShell::DeleteExtTextInput( SwExtTextInput* pDel, sal_Bool bInsText )
{
if( !pDel )
{
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index c9ab4a591383..8f0ca257b77a 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -125,8 +125,8 @@ public:
// the content positions of each portion need to be saved
struct SpellContentPosition
{
- USHORT nLeft;
- USHORT nRight;
+ sal_uInt16 nLeft;
+ sal_uInt16 nRight;
};
typedef std::vector<SpellContentPosition> SpellContentPositions;
class SwSpellIter : public SwLinguIter
@@ -717,7 +717,7 @@ bool SwEditShell::HasLastSentenceGotGrammarChecked() const
* SwEditShell::HasConvIter
*************************************************************************/
-BOOL SwEditShell::HasConvIter() const
+sal_Bool SwEditShell::HasConvIter() const
{
return 0 != pConvIter;
}
@@ -726,7 +726,7 @@ BOOL SwEditShell::HasConvIter() const
* SwEditShell::HasHyphIter
*************************************************************************/
-BOOL SwEditShell::HasHyphIter() const
+sal_Bool SwEditShell::HasHyphIter() const
{
return 0 != pHyphIter;
}
@@ -738,7 +738,7 @@ BOOL SwEditShell::HasHyphIter() const
void SwEditShell::SetLinguRange( SwDocPositions eStart, SwDocPositions eEnd )
{
SwPaM *pCrsr = GetCrsr();
- MakeFindRange( static_cast<USHORT>(eStart), static_cast<USHORT>(eEnd), pCrsr );
+ MakeFindRange( static_cast<sal_uInt16>(eStart), static_cast<sal_uInt16>(eEnd), pCrsr );
if( *pCrsr->GetPoint() > *pCrsr->GetMark() )
pCrsr->Exchange();
}
@@ -1053,7 +1053,7 @@ uno::Reference< XSpellAlternatives >
Sequence< PropertyValue > aPropVals(1);
PropertyValue &rVal = aPropVals.getArray()[0];
rVal.Name = C2U( UPN_MAX_NUMBER_OF_SUGGESTIONS );
- rVal.Value <<= (INT16) 7;
+ rVal.Value <<= (sal_Int16) 7;
xSpellAlt = xSpell->spell( aWord, eActLang, aPropVals );
}
@@ -1067,7 +1067,7 @@ uno::Reference< XSpellAlternatives >
xub_StrLen nLineStart = GetCrsr()->GetPoint()->nContent.GetIndex();
RightMargin();
xub_StrLen nLineEnd = GetCrsr()->GetPoint()->nContent.GetIndex();
- Pop(FALSE);
+ Pop(sal_False);
// make sure the selection build later from the
// data below does not include footnotes and other
@@ -1098,16 +1098,16 @@ uno::Reference< XSpellAlternatives >
rContent = nWordStart;
SwRect aStartRect;
SwCrsrMoveState aState;
- aState.bRealWidth = TRUE;
+ aState.bRealWidth = sal_True;
SwCntntNode* pCntntNode = pCrsr->GetCntntNode();
- SwCntntFrm *pCntntFrame = pCntntNode->GetFrm(pPt, pCrsr->GetPoint(), FALSE);
+ SwCntntFrm *pCntntFrame = pCntntNode->GetFrm(pPt, pCrsr->GetPoint(), sal_False);
pCntntFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState );
rContent = nWordEnd;
SwRect aEndRect;
pCntntFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState );
rSelectRect = aStartRect.Union( aEndRect );
- Pop(FALSE);
+ Pop(sal_False);
}
}
}
@@ -1207,7 +1207,7 @@ bool SwEditShell::GetGrammarCorrection(
xub_StrLen nLineStart = GetCrsr()->GetPoint()->nContent.GetIndex();
RightMargin();
xub_StrLen nLineEnd = GetCrsr()->GetPoint()->nContent.GetIndex();
- Pop(FALSE);
+ Pop(sal_False);
#if OSL_DEBUG_LEVEL > 1
// pNode->GetGrammarCheck()->Invalidate( 0, STRING_LEN );
@@ -1242,16 +1242,16 @@ bool SwEditShell::GetGrammarCorrection(
rContent = nWordStart;
SwRect aStartRect;
SwCrsrMoveState aState;
- aState.bRealWidth = TRUE;
+ aState.bRealWidth = sal_True;
SwCntntNode* pCntntNode = pCrsr->GetCntntNode();
- SwCntntFrm *pCntntFrame = pCntntNode->GetFrm(pPt, pCrsr->GetPoint(), FALSE);
+ SwCntntFrm *pCntntFrame = pCntntNode->GetFrm(pPt, pCrsr->GetPoint(), sal_False);
pCntntFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState );
rContent = nWordEnd;
SwRect aEndRect;
pCntntFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState );
rSelectRect = aStartRect.Union( aEndRect );
- Pop(FALSE);
+ Pop(sal_False);
}
}
}
@@ -1378,8 +1378,8 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
pCrsr->SetMark();
pCrsr->GetPoint()->nContent = aCurrentOldPosition->nLeft;
pCrsr->GetMark()->nContent = aCurrentOldPosition->nRight;
- USHORT nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage );
- USHORT nLangWhichId = RES_CHRATR_LANGUAGE;
+ sal_uInt16 nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage );
+ sal_uInt16 nLangWhichId = RES_CHRATR_LANGUAGE;
switch(nScriptType)
{
case SCRIPTTYPE_ASIAN : nLangWhichId = RES_CHRATR_CJK_LANGUAGE; break;
@@ -1427,8 +1427,8 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
while(aCurrentNewPortion != rNewPortions.end())
{
//set the language attribute
- USHORT nScriptType = GetScriptType();
- USHORT nLangWhichId = RES_CHRATR_LANGUAGE;
+ sal_uInt16 nScriptType = GetScriptType();
+ sal_uInt16 nLangWhichId = RES_CHRATR_LANGUAGE;
switch(nScriptType)
{
case SCRIPTTYPE_ASIAN : nLangWhichId = RES_CHRATR_CJK_LANGUAGE; break;
@@ -1451,7 +1451,7 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
// restore cursor to the end of the sentence
// (will work also if the sentence length has changed,
// since cursors get updated automatically!)
- Pop( FALSE );
+ Pop( sal_False );
// collapse cursor to the end of the modified sentence
*pCrsr->Start() = *pCrsr->End();
@@ -1482,7 +1482,7 @@ SpellContentPositions lcl_CollectDeletedRedlines(SwEditShell* pSh)
const SwPosition* pStartPos = pCrsr->Start();
const SwTxtNode* pTxtNode = pCrsr->GetNode()->GetTxtNode();
- USHORT nAct = pDoc->GetRedlinePos( *pTxtNode, USHRT_MAX );
+ sal_uInt16 nAct = pDoc->GetRedlinePos( *pTxtNode, USHRT_MAX );
const xub_StrLen nStartIndex = pStartPos->nContent.GetIndex();
for ( ; nAct < pDoc->GetRedlineTbl().Count(); nAct++ )
{
@@ -1624,7 +1624,7 @@ bool SwSpellIter::SpellSentence(::svx::SpellPortions& rPortions, bool bIsGrammar
//the cursor has to be collapsed on the left to go to the start of the sentence - if sentence ends inside of the error
pCrsr->DeleteMark();
pCrsr->SetMark();
- BOOL bStartSent = 0 != pMySh->GoStartSentence();
+ sal_Bool bStartSent = 0 != pMySh->GoStartSentence();
SpellContentPositions aDeletedRedlines = lcl_CollectDeletedRedlines(pMySh);
if(bStartSent)
{
@@ -1763,8 +1763,8 @@ void SwSpellIter::ToSentenceStart()
-----------------------------------------------------------------------*/
LanguageType lcl_GetLanguage(SwEditShell& rSh)
{
- USHORT nScriptType = rSh.GetScriptType();
- USHORT nLangWhichId = RES_CHRATR_LANGUAGE;
+ sal_uInt16 nScriptType = rSh.GetScriptType();
+ sal_uInt16 nLangWhichId = RES_CHRATR_LANGUAGE;
switch(nScriptType)
{
@@ -1881,9 +1881,9 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > xAlt,
{
const SwTxtAttr* pTxtAttr = pTxtNode->GetTxtAttrForCharAt(
pCrsr->GetMark()->nContent.GetIndex() );
- const USHORT nWhich = pTxtAttr
+ const sal_uInt16 nWhich = pTxtAttr
? pTxtAttr->Which()
- : static_cast<USHORT>(RES_TXTATR_END);
+ : static_cast<sal_uInt16>(RES_TXTATR_END);
switch (nWhich)
{
case RES_TXTATR_FIELD:
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index ea1088f36f69..c680173d2d72 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -56,7 +56,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
if( aRg.nEnd < aRg.nStart )
{ aRg.nStart = aRg.nEnd; aRg.nEnd = rIdx1.GetIndex(); }
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
const SwPamRange* pTmp;
if( Count() && Seek_Entry( aRg, &nPos )) // suche Insert Position
{
@@ -70,9 +70,9 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
return; // ende, weil schon alle zusammengefasst waren
}
- BOOL bEnde;
+ sal_Bool bEnde;
do {
- bEnde = TRUE;
+ bEnde = sal_True;
// mit dem Vorgaenger zusammenfassen ??
if( nPos > 0 )
@@ -81,7 +81,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
|| pTmp->nEnd+1 == aRg.nStart )
{
aRg.nStart = pTmp->nStart;
- bEnde = FALSE;
+ bEnde = sal_False;
Remove( --nPos, 1 ); // zusammenfassen
}
// SSelection im Bereich ??
@@ -95,7 +95,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
pTmp->nStart == aRg.nEnd+1 )
{
aRg.nEnd = pTmp->nEnd;
- bEnde = FALSE;
+ bEnde = sal_False;
Remove( nPos, 1 ); // zusammenfassen
}
@@ -110,7 +110,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
-SwPaM& SwPamRanges::SetPam( USHORT nArrPos, SwPaM& rPam )
+SwPaM& SwPamRanges::SetPam( sal_uInt16 nArrPos, SwPaM& rPam )
{
ASSERT_ID( nArrPos < Count(), ERR_VAR_IDX );
const SwPamRange& rTmp = *(GetData() + nArrPos );
@@ -145,9 +145,9 @@ const SwNumRule* SwEditShell::GetOutlineNumRule() const
// Absaetze ohne Numerierung, aber mit Einzuegen
-BOOL SwEditShell::NoNum()
+sal_Bool SwEditShell::NoNum()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
StartAllAction();
SwPaM* pCrsr = GetCrsr();
@@ -156,7 +156,7 @@ BOOL SwEditShell::NoNum()
GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->NoNum( aRangeArr.SetPam( n, aPam ));
GetDoc()->EndUndo( UNDO_END, NULL );
}
@@ -169,9 +169,9 @@ BOOL SwEditShell::NoNum()
// Loeschen, Splitten der Aufzaehlungsliste
// -> #i29560#
-BOOL SwEditShell::HasNumber() const
+sal_Bool SwEditShell::HasNumber() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
const SwTxtNode * pTxtNd =
GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode();
@@ -186,7 +186,7 @@ BOOL SwEditShell::HasNumber() const
pTxtNd->GetNumRule() == GetDoc()->GetOutlineNumRule() &&
!pTxtNd->IsCountedInList() )
{
- bResult = FALSE;
+ bResult = sal_False;
}
// <--
}
@@ -194,9 +194,9 @@ BOOL SwEditShell::HasNumber() const
return bResult;
}
-BOOL SwEditShell::HasBullet() const
+sal_Bool SwEditShell::HasBullet() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
const SwTxtNode * pTxtNd =
GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode();
@@ -220,7 +220,7 @@ void SwEditShell::DelNumRules()
GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
{
GetDoc()->DelNumRules( aRangeArr.SetPam( n, aPam ) );
}
@@ -235,7 +235,7 @@ void SwEditShell::DelNumRules()
// --> OD 2005-10-24 #126346# - cursor can not be anymore in
// front of a label, because numbering/bullet is deleted.
- SetInFrontOfLabel( FALSE );
+ SetInFrontOfLabel( sal_False );
// <--
GetDoc()->SetModified();
@@ -245,11 +245,11 @@ void SwEditShell::DelNumRules()
// Hoch-/Runterstufen
-BOOL SwEditShell::NumUpDown( BOOL bDown )
+sal_Bool SwEditShell::NumUpDown( sal_Bool bDown )
{
StartAllAction();
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() == pCrsr ) // keine Mehrfachselektion ?
bRet = GetDoc()->NumUpDown( *pCrsr, bDown );
@@ -258,7 +258,7 @@ BOOL SwEditShell::NumUpDown( BOOL bDown )
GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->NumUpDown( aRangeArr.SetPam( n, aPam ), bDown );
GetDoc()->EndUndo( UNDO_END, NULL );
}
@@ -275,9 +275,9 @@ BOOL SwEditShell::NumUpDown( BOOL bDown )
return bRet;
}
// -> #i23726#
-BOOL SwEditShell::IsFirstOfNumRule() const
+sal_Bool SwEditShell::IsFirstOfNumRule() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwPaM * pCrsr = GetCrsr();
if (pCrsr->GetNext() == pCrsr)
@@ -288,9 +288,9 @@ BOOL SwEditShell::IsFirstOfNumRule() const
return bResult;
}
-BOOL SwEditShell::IsFirstOfNumRule(const SwPaM & rPaM) const
+sal_Bool SwEditShell::IsFirstOfNumRule(const SwPaM & rPaM) const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwPosition aPos(*rPaM.GetPoint());
bResult = GetDoc()->IsFirstOfNumRule(aPos);
@@ -346,7 +346,7 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos)
// nLevel = nReferenceLevel;
SwNumRule aRule(*pCurNumRule);
-// aRule.ChangeIndent(nIndent, nLevel, nReferenceLevel, FALSE);
+// aRule.ChangeIndent(nIndent, nLevel, nReferenceLevel, sal_False);
if ( IsFirstOfNumRule() )
{
aRule.SetIndentOfFirstListLevelAndChangeOthers( nIndent );
@@ -354,7 +354,7 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos)
else if ( pTxtNode->GetActualListLevel() >= 0 )
{
aRule.SetIndent( nIndent,
- static_cast<USHORT>(pTxtNode->GetActualListLevel()) );
+ static_cast<sal_uInt16>(pTxtNode->GetActualListLevel()) );
}
// <--
@@ -370,7 +370,7 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos)
}
// <- #i23725#
-BOOL SwEditShell::MoveParagraph( long nOffset )
+sal_Bool SwEditShell::MoveParagraph( long nOffset )
{
StartAllAction();
@@ -382,7 +382,7 @@ BOOL SwEditShell::MoveParagraph( long nOffset )
pCrsr->DeleteMark();
}
- BOOL bRet = GetDoc()->MoveParagraph( *pCrsr, nOffset );
+ sal_Bool bRet = GetDoc()->MoveParagraph( *pCrsr, nOffset );
GetDoc()->SetModified();
EndAllAction();
@@ -409,11 +409,11 @@ void SwEditShell::GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower
aCrsr.SetMark();
if( pCrsr->HasMark() )
*aCrsr.GetPoint() = *pCrsr->End();
- GetDoc()->GotoNextNum( *aCrsr.GetPoint(), FALSE,
+ GetDoc()->GotoNextNum( *aCrsr.GetPoint(), sal_False,
&rUpper, &rLower );
}
-BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
+sal_Bool SwEditShell::MoveNumParas( sal_Bool bUpperLower, sal_Bool bUpperLeft )
{
StartAllAction();
@@ -425,9 +425,9 @@ BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
if( pCrsr->HasMark() )
*aCrsr.GetPoint() = *pCrsr->End();
- BOOL bRet = FALSE;
- BYTE nUpperLevel, nLowerLevel;
- if( GetDoc()->GotoNextNum( *aCrsr.GetPoint(), FALSE,
+ sal_Bool bRet = sal_False;
+ sal_uInt8 nUpperLevel, nLowerLevel;
+ if( GetDoc()->GotoNextNum( *aCrsr.GetPoint(), sal_False,
&nUpperLevel, &nLowerLevel ))
{
if( bUpperLower )
@@ -439,12 +439,12 @@ BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
if( bUpperLeft ) // verschiebe nach oben
{
SwPosition aPos( *aCrsr.GetMark() );
- if( GetDoc()->GotoPrevNum( aPos, FALSE ) )
+ if( GetDoc()->GotoPrevNum( aPos, sal_False ) )
nOffset = aPos.nNode.GetIndex() -
aCrsr.GetMark()->nNode.GetIndex();
else
{
- ULONG nStt = aPos.nNode.GetIndex(), nIdx = nStt - 1;
+ sal_uLong nStt = aPos.nNode.GetIndex(), nIdx = nStt - 1;
while( nIdx && (
( pNd = GetDoc()->GetNodes()[ nIdx ])->IsSectionNode() ||
( pNd->IsEndNode() && pNd->StartOfSectionNode()->IsSectionNode())))
@@ -455,11 +455,11 @@ BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
}
else // verschiebe nach unten
{
- const SwNumRule* pOrig = aCrsr.GetNode(FALSE)->GetTxtNode()->GetNumRule();
+ const SwNumRule* pOrig = aCrsr.GetNode(sal_False)->GetTxtNode()->GetNumRule();
if( aCrsr.GetNode()->IsTxtNode() &&
pOrig == aCrsr.GetNode()->GetTxtNode()->GetNumRule() )
{
- ULONG nStt = aCrsr.GetPoint()->nNode.GetIndex(), nIdx = nStt+1;
+ sal_uLong nStt = aCrsr.GetPoint()->nNode.GetIndex(), nIdx = nStt+1;
while (nIdx < GetDoc()->GetNodes().Count()-1)
{
@@ -507,11 +507,11 @@ BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
return bRet;
}
-BOOL SwEditShell::OutlineUpDown( short nOffset )
+sal_Bool SwEditShell::OutlineUpDown( short nOffset )
{
StartAllAction();
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() == pCrsr ) // keine Mehrfachselektion ?
bRet = GetDoc()->OutlineUpDown( *pCrsr, nOffset );
@@ -520,7 +520,7 @@ BOOL SwEditShell::OutlineUpDown( short nOffset )
GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->OutlineUpDown(
aRangeArr.SetPam( n, aPam ), nOffset );
GetDoc()->EndUndo( UNDO_END, NULL );
@@ -531,25 +531,25 @@ BOOL SwEditShell::OutlineUpDown( short nOffset )
}
-BOOL SwEditShell::MoveOutlinePara( short nOffset )
+sal_Bool SwEditShell::MoveOutlinePara( short nOffset )
{
StartAllAction();
- BOOL bRet = GetDoc()->MoveOutlinePara( *GetCrsr(), nOffset );
+ sal_Bool bRet = GetDoc()->MoveOutlinePara( *GetCrsr(), nOffset );
EndAllAction();
return bRet;
}
// Outlines and SubOutline are ReadOnly?
-BOOL SwEditShell::IsProtectedOutlinePara() const
+sal_Bool SwEditShell::IsProtectedOutlinePara() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwNode& rNd = GetCrsr()->Start()->nNode.GetNode();
if( rNd.IsTxtNode() )
{
const SwOutlineNodes& rOutlNd = GetDoc()->GetNodes().GetOutLineNds();
SwNodePtr pNd = (SwNodePtr)&rNd;
- BOOL bFirst = TRUE;
- USHORT nPos;
+ sal_Bool bFirst = sal_True;
+ sal_uInt16 nPos;
int nLvl(0);
if( !rOutlNd.Seek_Entry( pNd, &nPos ) && nPos )
--nPos;
@@ -559,7 +559,7 @@ BOOL SwEditShell::IsProtectedOutlinePara() const
SwNodePtr pTmpNd = rOutlNd[ nPos ];
// --> OD 2008-04-02 #refactorlists#
-// BYTE nTmpLvl = GetRealLevel( pTmpNd->GetTxtNode()->
+// sal_uInt8 nTmpLvl = GetRealLevel( pTmpNd->GetTxtNode()->
// GetTxtColl()->GetOutlineLevel() );
// int nTmpLvl = pTmpNd->GetTxtNode()->GetOutlineLevel();//#outline level,zhaojianwei
int nTmpLvl = pTmpNd->GetTxtNode()->GetAttrOutlineLevel();
@@ -570,14 +570,14 @@ BOOL SwEditShell::IsProtectedOutlinePara() const
if( bFirst )
{
nLvl = nTmpLvl;
- bFirst = FALSE;
+ bFirst = sal_False;
}
else if( nLvl >= nTmpLvl )
break;
if( pTmpNd->IsProtect() )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -598,7 +598,7 @@ BOOL SwEditShell::IsProtectedOutlinePara() const
* 2) outline must not be within table
* 3) if bCopy is set, outline must not be write protected
*/
-BOOL lcl_IsOutlineMoveAndCopyable( const SwDoc* pDoc, USHORT nIdx, bool bCopy )
+sal_Bool lcl_IsOutlineMoveAndCopyable( const SwDoc* pDoc, sal_uInt16 nIdx, bool bCopy )
{
const SwNodes& rNds = pDoc->GetNodes();
const SwNode* pNd = rNds.GetOutLineNds()[ nIdx ];
@@ -607,20 +607,20 @@ BOOL lcl_IsOutlineMoveAndCopyable( const SwDoc* pDoc, USHORT nIdx, bool bCopy )
( bCopy || !pNd->IsProtect() ); // 3) write
}
-BOOL SwEditShell::IsOutlineMovable( USHORT nIdx ) const
+sal_Bool SwEditShell::IsOutlineMovable( sal_uInt16 nIdx ) const
{
return lcl_IsOutlineMoveAndCopyable( GetDoc(), nIdx, false );
}
-BOOL SwEditShell::IsOutlineCopyable( USHORT nIdx ) const
+sal_Bool SwEditShell::IsOutlineCopyable( sal_uInt16 nIdx ) const
{
return lcl_IsOutlineMoveAndCopyable( GetDoc(), nIdx, true );
}
-BOOL SwEditShell::NumOrNoNum( BOOL bNumOn, BOOL bChkStart ) // #115901#
+sal_Bool SwEditShell::NumOrNoNum( sal_Bool bNumOn, sal_Bool bChkStart ) // #115901#
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() == pCrsr && !pCrsr->HasMark() &&
( !bChkStart || !pCrsr->GetPoint()->nContent.GetIndex()) )
@@ -633,10 +633,10 @@ BOOL SwEditShell::NumOrNoNum( BOOL bNumOn, BOOL bChkStart ) // #115901#
return bRet;
}
-BOOL SwEditShell::IsNoNum( BOOL bChkStart ) const
+sal_Bool SwEditShell::IsNoNum( sal_Bool bChkStart ) const
{
// ein Backspace im Absatz ohne Nummer wird zum Delete
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwPaM* pCrsr = GetCrsr();
if (pCrsr->GetNext() == pCrsr && !pCrsr->HasMark() &&
@@ -654,11 +654,11 @@ BOOL SwEditShell::IsNoNum( BOOL bChkStart ) const
}
// --> OD 2008-02-29 #refactorlists# - removed <pHasChilds>
-BYTE SwEditShell::GetNumLevel() const
+sal_uInt8 SwEditShell::GetNumLevel() const
{
// gebe die akt. Ebene zurueck, auf der sich der Point vom Cursor befindet
- //BYTE nLevel = NO_NUMBERING; //#outline level,zhaojianwei
- BYTE nLevel = MAXLEVEL; //end,zhaojianwei
+ //sal_uInt8 nLevel = NO_NUMBERING; //#outline level,zhaojianwei
+ sal_uInt8 nLevel = MAXLEVEL; //end,zhaojianwei
SwPaM* pCrsr = GetCrsr();
const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
@@ -676,7 +676,7 @@ BYTE SwEditShell::GetNumLevel() const
const int nListLevelOfTxtNode( pTxtNd->GetActualListLevel() );
if ( nListLevelOfTxtNode >= 0 )
{
- nLevel = static_cast<BYTE>( nListLevelOfTxtNode );
+ nLevel = static_cast<sal_uInt8>( nListLevelOfTxtNode );
}
// <--
}
@@ -704,7 +704,7 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
{
aRangeArr.SetPam( n, aPam );
// --> OD 2008-02-08 #newlistlevelattrs#
@@ -734,7 +734,7 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
EndAllAction();
}
-String SwEditShell::GetUniqueNumRuleName( const String* pChkStr, BOOL bAutoNum ) const
+String SwEditShell::GetUniqueNumRuleName( const String* pChkStr, sal_Bool bAutoNum ) const
{
return GetDoc()->GetUniqueNumRuleName( pChkStr, bAutoNum );
}
@@ -746,15 +746,15 @@ void SwEditShell::ChgNumRuleFmts( const SwNumRule& rRule )
EndAllAction();
}
-BOOL SwEditShell::ReplaceNumRule( const String& rOldRule, const String& rNewRule )
+sal_Bool SwEditShell::ReplaceNumRule( const String& rOldRule, const String& rNewRule )
{
StartAllAction();
- BOOL bRet = GetDoc()->ReplaceNumRule( *GetCrsr()->GetPoint(), rOldRule, rNewRule );
+ sal_Bool bRet = GetDoc()->ReplaceNumRule( *GetCrsr()->GetPoint(), rOldRule, rNewRule );
EndAllAction();
return bRet;
}
-void SwEditShell::SetNumRuleStart( BOOL bFlag )
+void SwEditShell::SetNumRuleStart( sal_Bool bFlag )
{
StartAllAction();
@@ -764,7 +764,7 @@ void SwEditShell::SetNumRuleStart( BOOL bFlag )
GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
GetDoc()->SetNumRuleStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), bFlag );
GetDoc()->EndUndo( UNDO_END, NULL );
}
@@ -774,16 +774,16 @@ void SwEditShell::SetNumRuleStart( BOOL bFlag )
EndAllAction();
}
-BOOL SwEditShell::IsNumRuleStart() const
+sal_Bool SwEditShell::IsNumRuleStart() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
const SwTxtNode* pTxtNd = GetCrsr()->GetNode()->GetTxtNode();
if( pTxtNd )
- bResult = pTxtNd->IsListRestart() ? TRUE : FALSE;
+ bResult = pTxtNd->IsListRestart() ? sal_True : sal_False;
return bResult;
}
-void SwEditShell::SetNodeNumStart( USHORT nStt )
+void SwEditShell::SetNodeNumStart( sal_uInt16 nStt )
{
StartAllAction();
@@ -793,7 +793,7 @@ void SwEditShell::SetNodeNumStart( USHORT nStt )
GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
GetDoc()->SetNodeNumStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), nStt );
GetDoc()->EndUndo( UNDO_END, NULL );
}
@@ -803,7 +803,7 @@ void SwEditShell::SetNodeNumStart( USHORT nStt )
EndAllAction();
}
-USHORT SwEditShell::GetNodeNumStart() const
+sal_uInt16 SwEditShell::GetNodeNumStart() const
{
const SwTxtNode* pTxtNd = GetCrsr()->GetNode()->GetTxtNode();
// --> OD 2008-02-28 #refactorlists#
@@ -812,7 +812,7 @@ USHORT SwEditShell::GetNodeNumStart() const
// return USHRT_MAX, if no list restart value is found.
if ( pTxtNd && pTxtNd->HasAttrListRestartValue() )
{
- return static_cast<USHORT>(pTxtNd->GetAttrListRestartValue());
+ return static_cast<sal_uInt16>(pTxtNd->GetAttrListRestartValue());
}
return USHRT_MAX;
// <--
diff --git a/sw/source/core/edit/edredln.cxx b/sw/source/core/edit/edredln.cxx
index b78dfb761ebe..0dd6b9b3ec79 100644
--- a/sw/source/core/edit/edredln.cxx
+++ b/sw/source/core/edit/edredln.cxx
@@ -39,12 +39,12 @@
#include "frmtool.hxx"
-USHORT SwEditShell::GetRedlineMode() const
+sal_uInt16 SwEditShell::GetRedlineMode() const
{
return GetDoc()->GetRedlineMode();
}
-void SwEditShell::SetRedlineMode( USHORT eMode )
+void SwEditShell::SetRedlineMode( sal_uInt16 eMode )
{
if( eMode != GetDoc()->GetRedlineMode() )
{
@@ -55,17 +55,17 @@ void SwEditShell::SetRedlineMode( USHORT eMode )
}
}
-BOOL SwEditShell::IsRedlineOn() const
+sal_Bool SwEditShell::IsRedlineOn() const
{
return GetDoc()->IsRedlineOn();
}
-USHORT SwEditShell::GetRedlineCount() const
+sal_uInt16 SwEditShell::GetRedlineCount() const
{
return GetDoc()->GetRedlineTbl().Count();
}
-const SwRedline& SwEditShell::GetRedline( USHORT nPos ) const
+const SwRedline& SwEditShell::GetRedline( sal_uInt16 nPos ) const
{
return *GetDoc()->GetRedlineTbl()[ nPos ];
}
@@ -82,22 +82,22 @@ void lcl_InvalidateAll( ViewShell* pSh )
} while ( pSh != pStop );
}
-BOOL SwEditShell::AcceptRedline( USHORT nPos )
+sal_Bool SwEditShell::AcceptRedline( sal_uInt16 nPos )
{
SET_CURR_SHELL( this );
StartAllAction();
- BOOL bRet = GetDoc()->AcceptRedline( nPos, true );
+ sal_Bool bRet = GetDoc()->AcceptRedline( nPos, true );
if( !nPos && !::IsExtraData( GetDoc() ) )
lcl_InvalidateAll( this );
EndAllAction();
return bRet;
}
-BOOL SwEditShell::RejectRedline( USHORT nPos )
+sal_Bool SwEditShell::RejectRedline( sal_uInt16 nPos )
{
SET_CURR_SHELL( this );
StartAllAction();
- BOOL bRet = GetDoc()->RejectRedline( nPos, true );
+ sal_Bool bRet = GetDoc()->RejectRedline( nPos, true );
if( !nPos && !::IsExtraData( GetDoc() ) )
lcl_InvalidateAll( this );
EndAllAction();
@@ -105,9 +105,9 @@ BOOL SwEditShell::RejectRedline( USHORT nPos )
}
// Kommentar am Redline setzen
-BOOL SwEditShell::SetRedlineComment( const String& rS )
+sal_Bool SwEditShell::SetRedlineComment( const String& rS )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
FOREACHPAM_START(this)
bRet = bRet || GetDoc()->SetRedlineComment( *PCURCRSR, rS );
FOREACHPAM_END()
@@ -136,11 +136,11 @@ void SwEditShell::UpdateRedlineAttr()
// suche das Redline zu diesem Data und returne die Pos im Array
// USHRT_MAX wird returnt, falls nicht vorhanden
-USHORT SwEditShell::FindRedlineOfData( const SwRedlineData& rData ) const
+sal_uInt16 SwEditShell::FindRedlineOfData( const SwRedlineData& rData ) const
{
const SwRedlineTbl& rTbl = GetDoc()->GetRedlineTbl();
- for( USHORT i = 0, nCnt = rTbl.Count(); i < nCnt; ++i )
+ for( sal_uInt16 i = 0, nCnt = rTbl.Count(); i < nCnt; ++i )
if( &rTbl[ i ]->GetRedlineData() == &rData )
return i;
return USHRT_MAX;
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index a936002df9a2..f66d828c25ba 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -67,17 +67,17 @@ SwEditShell::InsertSection(
}
-BOOL SwEditShell::IsInsRegionAvailable() const
+sal_Bool SwEditShell::IsInsRegionAvailable() const
{
if( IsTableMode() )
- return FALSE;
+ return sal_False;
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr )
- return FALSE;
+ return sal_False;
if( pCrsr->HasMark() )
return 0 != GetDoc()->IsInsRegionAvailable( *pCrsr );
- return TRUE;
+ return sal_True;
}
@@ -95,7 +95,7 @@ const SwSection* SwEditShell::GetCurrSection() const
* Bereich innerhalb der Fussnote sein.
* --------------------------------------------------*/
-const SwSection* SwEditShell::GetAnySection( BOOL bOutOfTab, const Point* pPt ) const
+const SwSection* SwEditShell::GetAnySection( sal_Bool bOutOfTab, const Point* pPt ) const
{
SwFrm *pFrm;
if ( pPt )
@@ -107,7 +107,7 @@ const SwSection* SwEditShell::GetAnySection( BOOL bOutOfTab, const Point* pPt )
pFrm = pNd->GetFrm( pPt );
}
else
- pFrm = GetCurrFrm( FALSE );
+ pFrm = GetCurrFrm( sal_False );
if( bOutOfTab && pFrm )
pFrm = pFrm->FindTabFrm();
@@ -125,17 +125,17 @@ const SwSection* SwEditShell::GetAnySection( BOOL bOutOfTab, const Point* pPt )
return NULL;
}
-USHORT SwEditShell::GetSectionFmtCount() const
+sal_uInt16 SwEditShell::GetSectionFmtCount() const
{
return GetDoc()->GetSections().Count();
}
-BOOL SwEditShell::IsAnySectionInDoc( BOOL bChkReadOnly, BOOL bChkHidden, BOOL bChkTOX ) const
+sal_Bool SwEditShell::IsAnySectionInDoc( sal_Bool bChkReadOnly, sal_Bool bChkHidden, sal_Bool bChkTOX ) const
{
const SwSectionFmts& rFmts = GetDoc()->GetSections();
- USHORT nCnt = rFmts.Count();
- USHORT n;
+ sal_uInt16 nCnt = rFmts.Count();
+ sal_uInt16 n;
for( n = 0; n < nCnt; ++n )
{
@@ -156,19 +156,19 @@ BOOL SwEditShell::IsAnySectionInDoc( BOOL bChkReadOnly, BOOL bChkHidden, BOOL bC
return n != nCnt;
}
-USHORT SwEditShell::GetSectionFmtPos( const SwSectionFmt& rFmt ) const
+sal_uInt16 SwEditShell::GetSectionFmtPos( const SwSectionFmt& rFmt ) const
{
SwSectionFmt* pFmt = (SwSectionFmt*)&rFmt;
return GetDoc()->GetSections().GetPos( pFmt );
}
-const SwSectionFmt& SwEditShell::GetSectionFmt( USHORT nFmt ) const
+const SwSectionFmt& SwEditShell::GetSectionFmt( sal_uInt16 nFmt ) const
{
return *GetDoc()->GetSections()[ nFmt ];
}
-void SwEditShell::DelSectionFmt( USHORT nFmt )
+void SwEditShell::DelSectionFmt( sal_uInt16 nFmt )
{
StartAllAction();
GetDoc()->DelSectionFmt( GetDoc()->GetSections()[ nFmt ] );
@@ -251,7 +251,7 @@ void SwEditShell::_SetSectionAttr( SwSectionFmt& rSectFmt,
const SfxItemSet& rSet )
{
StartAllAction();
- if(SFX_ITEM_SET == rSet.GetItemState(RES_CNTNT, FALSE))
+ if(SFX_ITEM_SET == rSet.GetItemState(RES_CNTNT, sal_False))
{
SfxItemSet aSet(rSet);
aSet.ClearItem(RES_CNTNT);
@@ -268,9 +268,9 @@ void SwEditShell::_SetSectionAttr( SwSectionFmt& rSectFmt,
// search inside the cursor selection for full selected sections.
// if any part of section in the selection return 0.
// if more than one in the selection return the count
-USHORT SwEditShell::GetFullSelectedSectionCount() const
+sal_uInt16 SwEditShell::GetFullSelectedSectionCount() const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
FOREACHPAM_START(this)
const SwPosition* pStt = PCURCRSR->Start(),
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index 76a37e4e8627..3fb7da8e1198 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -67,14 +67,14 @@ using namespace ::com::sun::star::uno;
extern void ClearFEShellTabCols();
const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTblOpts,
- USHORT nRows, USHORT nCols,
+ sal_uInt16 nRows, sal_uInt16 nCols,
sal_Int16 eAdj,
const SwTableAutoFmt* pTAFmt )
{
StartAllAction();
SwPosition* pPos = GetCrsr()->GetPoint();
- BOOL bEndUndo = 0 != pPos->nContent.GetIndex();
+ sal_Bool bEndUndo = 0 != pPos->nContent.GetIndex();
if( bEndUndo )
{
StartUndo( UNDO_START );
@@ -87,7 +87,7 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTblOpts
const SwTable *pTable = GetDoc()->InsertTable( rInsTblOpts, *pPos,
nRows, nCols,
eAdj, pTAFmt,
- 0, TRUE );
+ 0, sal_True );
if( bEndUndo )
EndUndo( UNDO_END );
@@ -95,13 +95,13 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTblOpts
return *pTable;
}
-BOOL SwEditShell::TextToTable( const SwInsertTableOptions& rInsTblOpts,
+sal_Bool SwEditShell::TextToTable( const SwInsertTableOptions& rInsTblOpts,
sal_Unicode cCh,
sal_Int16 eAdj,
const SwTableAutoFmt* pTAFmt )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
- BOOL bRet = FALSE;
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
+ sal_Bool bRet = sal_False;
StartAllAction();
FOREACHPAM_START(this)
if( PCURCRSR->HasMark() )
@@ -112,10 +112,10 @@ BOOL SwEditShell::TextToTable( const SwInsertTableOptions& rInsTblOpts,
return bRet;
}
-BOOL SwEditShell::TableToText( sal_Unicode cCh )
+sal_Bool SwEditShell::TableToText( sal_Unicode cCh )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
- BOOL bRet = FALSE;
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
+ sal_Bool bRet = sal_False;
SwPaM* pCrsr = GetCrsr();
const SwTableNode* pTblNd =
GetDoc()->IsIdxInTbl( pCrsr->GetPoint()->nNode );
@@ -156,23 +156,23 @@ BOOL SwEditShell::TableToText( sal_Unicode cCh )
return bRet;
}
-BOOL SwEditShell::IsTextToTableAvailable() const
+sal_Bool SwEditShell::IsTextToTableAvailable() const
{
- BOOL bOnlyText = FALSE;
+ sal_Bool bOnlyText = sal_False;
FOREACHPAM_START(this)
if( PCURCRSR->HasMark() && *PCURCRSR->GetPoint() != *PCURCRSR->GetMark() )
{
- bOnlyText = TRUE;
+ bOnlyText = sal_True;
// pruefe ob in der Selection eine Tabelle liegt
- ULONG nStt = PCURCRSR->GetMark()->nNode.GetIndex(),
+ sal_uLong nStt = PCURCRSR->GetMark()->nNode.GetIndex(),
nEnd = PCURCRSR->GetPoint()->nNode.GetIndex();
- if( nStt > nEnd ) { ULONG n = nStt; nStt = nEnd; nEnd = n; }
+ if( nStt > nEnd ) { sal_uLong n = nStt; nStt = nEnd; nEnd = n; }
for( ; nStt <= nEnd; ++nStt )
if( !GetDoc()->GetNodes()[ nStt ]->IsTxtNode() )
{
- bOnlyText = FALSE;
+ bOnlyText = sal_False;
break;
}
@@ -186,14 +186,14 @@ BOOL SwEditShell::IsTextToTableAvailable() const
void SwEditShell::InsertDDETable( const SwInsertTableOptions& rInsTblOpts,
SwDDEFieldType* pDDEType,
- USHORT nRows, USHORT nCols,
+ sal_uInt16 nRows, sal_uInt16 nCols,
sal_Int16 eAdj )
{
SwPosition* pPos = GetCrsr()->GetPoint();
StartAllAction();
- BOOL bEndUndo = 0 != pPos->nContent.GetIndex();
+ sal_Bool bEndUndo = 0 != pPos->nContent.GetIndex();
if( bEndUndo )
{
StartUndo( UNDO_START );
@@ -264,7 +264,7 @@ void SwEditShell::SetTblChgMode( TblChgMode eMode )
}
}
-BOOL SwEditShell::GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const
+sal_Bool SwEditShell::GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const
{
SwSelBoxes aBoxes;
if( IsTableMode() )
@@ -281,10 +281,10 @@ BOOL SwEditShell::GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const
SwTableBox *pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
aBoxes.Insert( pBox );
}
- } while( FALSE );
+ } while( sal_False );
}
- for( USHORT n = 0; n < aBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n )
{
const SwTableBox* pSelBox = aBoxes[ n ];
const SwTableBoxFmt* pTblFmt = (SwTableBoxFmt*)pSelBox->GetFrmFmt();
@@ -323,7 +323,7 @@ void SwEditShell::SetTblBoxFormulaAttrs( const SfxItemSet& rSet )
SwTableBox *pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
aBoxes.Insert( pBox );
}
- } while( FALSE );
+ } while( sal_False );
}
// beim setzen einer Formel keine Ueberpruefung mehr vornehmen!
@@ -332,16 +332,16 @@ void SwEditShell::SetTblBoxFormulaAttrs( const SfxItemSet& rSet )
StartAllAction();
GetDoc()->StartUndo( UNDO_START, NULL );
- for( USHORT n = 0; n < aBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n )
GetDoc()->SetTblBoxFormulaAttrs( *aBoxes[ n ], rSet );
GetDoc()->EndUndo( UNDO_END, NULL );
EndAllAction();
}
-BOOL SwEditShell::IsTableBoxTextFormat() const
+sal_Bool SwEditShell::IsTableBoxTextFormat() const
{
if( IsTableMode() )
- return FALSE;
+ return sal_False;
SwTableBox *pBox = 0;
{
@@ -354,25 +354,25 @@ BOOL SwEditShell::IsTableBoxTextFormat() const
}
if( !pBox )
- return FALSE;
+ return sal_False;
sal_uInt32 nFmt;
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetAttrSet().GetItemState(
- RES_BOXATR_FORMAT, TRUE, &pItem ))
+ RES_BOXATR_FORMAT, sal_True, &pItem ))
{
nFmt = ((SwTblBoxNumFormat*)pItem)->GetValue();
return GetDoc()->GetNumberFormatter()->IsTextFormat( nFmt ) ||
NUMBERFORMAT_TEXT == nFmt;
}
- ULONG nNd = pBox->IsValidNumTxtNd();
+ sal_uLong nNd = pBox->IsValidNumTxtNd();
if( ULONG_MAX == nNd )
- return TRUE;
+ return sal_True;
const String& rTxt = GetDoc()->GetNodes()[ nNd ]->GetTxtNode()->GetTxt();
if( !rTxt.Len() )
- return FALSE;
+ return sal_False;
double fVal;
return !GetDoc()->GetNumberFormatter()->IsNumberFormat( rTxt, nFmt, fVal );
@@ -393,23 +393,23 @@ String SwEditShell::GetTableBoxText() const
pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
}
- ULONG nNd;
+ sal_uLong nNd;
if( pBox && ULONG_MAX != ( nNd = pBox->IsValidNumTxtNd() ) )
sRet = GetDoc()->GetNodes()[ nNd ]->GetTxtNode()->GetTxt();
}
return sRet;
}
-BOOL SwEditShell::SplitTable( USHORT eMode )
+sal_Bool SwEditShell::SplitTable( sal_uInt16 eMode )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwPaM *pCrsr = GetCrsr();
if( pCrsr->GetNode()->FindTableNode() )
{
StartAllAction();
GetDoc()->StartUndo(UNDO_EMPTY, NULL);
- bRet = GetDoc()->SplitTable( *pCrsr->GetPoint(), eMode, TRUE );
+ bRet = GetDoc()->SplitTable( *pCrsr->GetPoint(), eMode, sal_True );
GetDoc()->EndUndo(UNDO_EMPTY, NULL);
ClearFEShellTabCols();
@@ -418,9 +418,9 @@ BOOL SwEditShell::SplitTable( USHORT eMode )
return bRet;
}
-BOOL SwEditShell::MergeTable( BOOL bWithPrev, USHORT nMode )
+sal_Bool SwEditShell::MergeTable( sal_Bool bWithPrev, sal_uInt16 nMode )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwPaM *pCrsr = GetCrsr();
if( pCrsr->GetNode()->FindTableNode() )
{
@@ -436,14 +436,14 @@ BOOL SwEditShell::MergeTable( BOOL bWithPrev, USHORT nMode )
return bRet;
}
-BOOL SwEditShell::CanMergeTable( BOOL bWithPrev, BOOL* pChkNxtPrv ) const
+sal_Bool SwEditShell::CanMergeTable( sal_Bool bWithPrev, sal_Bool* pChkNxtPrv ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwPaM *pCrsr = GetCrsr();
const SwTableNode* pTblNd = pCrsr->GetNode()->FindTableNode();
if( pTblNd && !pTblNd->GetTable().ISA( SwDDETable ))
{
- BOOL bNew = pTblNd->GetTable().IsNewModel();
+ sal_Bool bNew = pTblNd->GetTable().IsNewModel();
const SwNodes& rNds = GetDoc()->GetNodes();
if( pChkNxtPrv )
{
@@ -453,13 +453,13 @@ BOOL SwEditShell::CanMergeTable( BOOL bWithPrev, BOOL* pChkNxtPrv ) const
// --> FME 2004-09-17 #117418# Consider table in table case
pChkNd->EndOfSectionIndex() == pTblNd->GetIndex() - 1 )
// <--
- *pChkNxtPrv = TRUE, bRet = TRUE; // mit Prev ist moeglich
+ *pChkNxtPrv = sal_True, bRet = sal_True; // mit Prev ist moeglich
else
{
pChkNd = rNds[ pTblNd->EndOfSectionIndex() + 1 ]->GetTableNode();
if( pChkNd && !pChkNd->GetTable().ISA( SwDDETable ) &&
bNew == pChkNd->GetTable().IsNewModel() )
- *pChkNxtPrv = FALSE, bRet = TRUE; // mit Next ist moeglich
+ *pChkNxtPrv = sal_False, bRet = sal_True; // mit Next ist moeglich
}
}
else
@@ -485,7 +485,7 @@ BOOL SwEditShell::CanMergeTable( BOOL bWithPrev, BOOL* pChkNxtPrv ) const
}
// setze das InsertDB als Tabelle Undo auf:
-void SwEditShell::AppendUndoForInsertFromDB( BOOL bIsTable )
+void SwEditShell::AppendUndoForInsertFromDB( sal_Bool bIsTable )
{
GetDoc()->AppendUndoForInsertFromDB( *GetCrsr(), bIsTable );
}
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index b1188588fe4d..882b5b5b7bb0 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -73,7 +73,7 @@ using namespace ::com::sun::star::util;
void SwEditShell::Insert(const SwTOXMark& rMark)
{
- BOOL bInsAtPos = rMark.IsAlternativeText();
+ sal_Bool bInsAtPos = rMark.IsAlternativeText();
StartAllAction();
FOREACHPAM_START(this)
@@ -111,7 +111,7 @@ void SwEditShell::DeleteTOXMark( SwTOXMark* pMark )
Beschreibung: Alle Verzeichnismarkierungen am SPoint zusammensuchen
--------------------------------------------------------------------*/
-USHORT SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const
+sal_uInt16 SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const
{
return GetDoc()->GetCurTOXMark( *GetCrsr()->Start(), rMarks );
}
@@ -119,7 +119,7 @@ USHORT SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const
/* -----------------01.09.99 16:05-------------------
--------------------------------------------------*/
-BOOL SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const
+sal_Bool SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const
{
ASSERT( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
const SwTOXBaseSection& rTOXSect = (const SwTOXBaseSection&)rTOXBase;
@@ -128,7 +128,7 @@ BOOL SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const
/* -----------------18.10.99 15:53-------------------
--------------------------------------------------*/
-void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, BOOL bReadonly)
+void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, sal_Bool bReadonly)
{
ASSERT( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
const SwTOXBaseSection& rTOXSect = (const SwTOXBaseSection&)rTOXBase;
@@ -143,7 +143,7 @@ void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, BOOL bReadonly)
/* -----------------02.09.99 07:47-------------------
--------------------------------------------------*/
-const SwTOXBase* SwEditShell::GetDefaultTOXBase( TOXTypes eTyp, BOOL bCreate )
+const SwTOXBase* SwEditShell::GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate )
{
return GetDoc()->GetDefaultTOXBase( eTyp, bCreate );
}
@@ -170,7 +170,7 @@ void SwEditShell::InsertTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
// Einfuegen des Verzeichnisses
const SwTOXBaseSection* pTOX = pDoc->InsertTableOf(
- *GetCrsr()->GetPoint(), rTOX, pSet, TRUE );
+ *GetCrsr()->GetPoint(), rTOX, pSet, sal_True );
ASSERT(pTOX, "Kein aktuelles Verzeichnis");
// Formatierung anstossen
@@ -191,9 +191,9 @@ void SwEditShell::InsertTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
Beschreibung: Verzeichnisinhalt erneuern
--------------------------------------------------------------------*/
-BOOL SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
+sal_Bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ASSERT( rTOX.ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
SwTOXBaseSection* pTOX = (SwTOXBaseSection*)&rTOX;
@@ -204,7 +204,7 @@ BOOL SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
SwDoc* pMyDoc = GetDoc();
SwDocShell* pDocSh = pMyDoc->GetDocShell();
- BOOL bInIndex = pTOX == GetCurTOX();
+ sal_Bool bInIndex = pTOX == GetCurTOX();
SET_CURR_SHELL( this );
StartAllAction();
@@ -244,7 +244,7 @@ const SwTOXBase* SwEditShell::GetCurTOX() const
return GetDoc()->GetCurTOX( *GetCrsr()->GetPoint() );
}
-BOOL SwEditShell::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
+sal_Bool SwEditShell::DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes )
{
return GetDoc()->DeleteTOX( (SwTOXBase&)rTOXBase, bDelNodes );
}
@@ -253,7 +253,7 @@ BOOL SwEditShell::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
Beschreibung: Typen der Verzeichnisse verwalten
--------------------------------------------------------------------*/
-const SwTOXType* SwEditShell::GetTOXType(TOXTypes eTyp, USHORT nId) const
+const SwTOXType* SwEditShell::GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const
{
return pDoc->GetTOXType(eTyp, nId);
}
@@ -262,17 +262,17 @@ const SwTOXType* SwEditShell::GetTOXType(TOXTypes eTyp, USHORT nId) const
Beschreibung: Schluessel fuer Stichwortverzeichnisse verwalten
--------------------------------------------------------------------*/
-USHORT SwEditShell::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
+sal_uInt16 SwEditShell::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
{
return GetDoc()->GetTOIKeys( eTyp, rArr );
}
-USHORT SwEditShell::GetTOXCount() const
+sal_uInt16 SwEditShell::GetTOXCount() const
{
const SwSectionFmts& rFmts = GetDoc()->GetSections();
- USHORT nRet = 0;
- for( USHORT n = rFmts.Count(); n; )
+ sal_uInt16 nRet = 0;
+ for( sal_uInt16 n = rFmts.Count(); n; )
{
const SwSection* pSect = rFmts[ --n ]->GetSection();
if( TOX_CONTENT_SECTION == pSect->GetType() &&
@@ -283,10 +283,10 @@ USHORT SwEditShell::GetTOXCount() const
}
-const SwTOXBase* SwEditShell::GetTOX( USHORT nPos ) const
+const SwTOXBase* SwEditShell::GetTOX( sal_uInt16 nPos ) const
{
const SwSectionFmts& rFmts = GetDoc()->GetSections();
- for( USHORT n = 0, nCnt = 0; n < rFmts.Count(); ++n )
+ for( sal_uInt16 n = 0, nCnt = 0; n < rFmts.Count(); ++n )
{
const SwSection* pSect = rFmts[ n ]->GetSection();
if( TOX_CONTENT_SECTION == pSect->GetType() &&
@@ -302,13 +302,13 @@ const SwTOXBase* SwEditShell::GetTOX( USHORT nPos ) const
// nach einlesen einer Datei alle Verzeichnisse updaten
-void SwEditShell::SetUpdateTOX( BOOL bFlag )
+void SwEditShell::SetUpdateTOX( sal_Bool bFlag )
{
GetDoc()->SetUpdateTOX( bFlag );
}
-BOOL SwEditShell::IsUpdateTOX() const
+sal_Bool SwEditShell::IsUpdateTOX() const
{
return GetDoc()->IsUpdateTOX();
}
@@ -333,8 +333,8 @@ void SwEditShell::SetTOIAutoMarkURL(const String& rSet)
void SwEditShell::ApplyAutoMark()
{
StartAllAction();
- BOOL bDoesUndo = DoesUndo();
- DoUndo(FALSE);
+ sal_Bool bDoesUndo = DoesUndo();
+ DoUndo(sal_False);
//1. remove all automatic generated index entries if AutoMarkURL has a
// length and the file exists
//2. load file
@@ -356,7 +356,7 @@ void SwEditShell::ApplyAutoMark()
}
//2.
- SfxMedium aMedium( sAutoMarkURL, STREAM_STD_READ, TRUE );
+ SfxMedium aMedium( sAutoMarkURL, STREAM_STD_READ, sal_True );
SvStream& rStrm = *aMedium.GetInStream();
const String sZero('0');
Push();
@@ -367,16 +367,16 @@ void SwEditShell::ApplyAutoMark()
//
//SearchAlgorithms eSrchType = SearchAlgorithms_ABSOLUTE;
//OUString aSrchStr = rText;
- BOOL bCaseSensitive = TRUE;
- BOOL bWordOnly = FALSE;
- BOOL bSrchInSel = FALSE;
- BOOL bLEV_Relaxed = TRUE;
- INT32 nLEV_Other = 2; // -> changedChars;
- INT32 nLEV_Longer = 3; //! -> deletedChars;
- INT32 nLEV_Shorter = 1; //! -> insertedChars;
- INT32 nTransliterationFlags = 0;
+ sal_Bool bCaseSensitive = sal_True;
+ sal_Bool bWordOnly = sal_False;
+ sal_Bool bSrchInSel = sal_False;
+ sal_Bool bLEV_Relaxed = sal_True;
+ sal_Int32 nLEV_Other = 2; // -> changedChars;
+ sal_Int32 nLEV_Longer = 3; //! -> deletedChars;
+ sal_Int32 nLEV_Shorter = 1; //! -> insertedChars;
+ sal_Int32 nTransliterationFlags = 0;
//
- INT32 nSrchFlags = 0;
+ sal_Int32 nSrchFlags = 0;
if (!bCaseSensitive)
{
nSrchFlags |= SearchFlags::ALL_IGNORE_CASE;
@@ -445,13 +445,13 @@ void SwEditShell::ApplyAutoMark()
aSearchOpt.searchString = sToSelect;
KillPams();
- BOOL bCancel;
+ sal_Bool bCancel;
// todo/mba: assuming that notes shouldn't be searched
- BOOL bSearchInNotes = FALSE;
- ULONG nRet = Find( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END, bCancel,
+ sal_Bool bSearchInNotes = sal_False;
+ sal_uLong nRet = Find( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END, bCancel,
(FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY),
- FALSE );
+ sal_False );
if(nRet)
{
@@ -464,8 +464,8 @@ void SwEditShell::ApplyAutoMark()
}
if(sAlternative.Len())
pTmpMark->SetAlternativeText(sAlternative);
- pTmpMark->SetMainEntry(FALSE);
- pTmpMark->SetAutoGenerated(TRUE);
+ pTmpMark->SetMainEntry(sal_False);
+ pTmpMark->SetAutoGenerated(sal_True);
//4.
SwEditShell::Insert(*pTmpMark);
}
@@ -473,7 +473,7 @@ void SwEditShell::ApplyAutoMark()
}
}
KillPams();
- Pop(FALSE);
+ Pop(sal_False);
}
DoUndo(bDoesUndo);
EndAllAction();
diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx
index a27b09f5d4ff..aa4d6c43f6a9 100644
--- a/sw/source/core/edit/edundo.cxx
+++ b/sw/source/core/edit/edundo.cxx
@@ -48,15 +48,15 @@ void lcl_SelectSdrMarkList( SwEditShell* pShell,
const SdrMarkList* pSdrMarkList );
-BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt )
+sal_Bool SwEditShell::Undo( SwUndoId nUndoId, sal_uInt16 nCnt )
{
SET_CURR_SHELL( this );
// #105332# current undo state was not saved
- BOOL bRet = FALSE;
- BOOL bSaveDoesUndo = GetDoc()->DoesUndo();
+ sal_Bool bRet = sal_False;
+ sal_Bool bSaveDoesUndo = GetDoc()->DoesUndo();
- GetDoc()->DoUndo( FALSE );
+ GetDoc()->DoUndo( sal_False );
StartAllAction();
{
// eigentlich muesste ja nur der aktuelle Cursor berarbeitet
@@ -70,7 +70,7 @@ BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt )
// JP 02.04.98: Cursor merken - beim Auto-Format/-Korrektur
// soll dieser wieder an die Position
SwUndoId nLastUndoId = GetDoc()->GetUndoIds(NULL, NULL);
- BOOL bRestoreCrsr = 1 == nCnt && ( UNDO_AUTOFORMAT == nLastUndoId ||
+ sal_Bool bRestoreCrsr = 1 == nCnt && ( UNDO_AUTOFORMAT == nLastUndoId ||
UNDO_AUTOCORRECT == nLastUndoId );
Push();
@@ -98,7 +98,7 @@ BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt )
CreateCrsr();
aUndoIter.pAktPam = GetCrsr();
}
- } while( TRUE );
+ } while( sal_True );
}
Pop( !bRestoreCrsr );
@@ -114,9 +114,9 @@ BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt )
{
Point aPt;
SwFlyFrm* pFly = ((SwFlyFrmFmt*)aUndoIter.pSelFmt)->GetFrm(
- &aPt, FALSE );
+ &aPt, sal_False );
if( pFly )
- ((SwFEShell*)this)->SelectFlyFrm( *pFly, TRUE );
+ ((SwFEShell*)this)->SelectFlyFrm( *pFly, sal_True );
}
}
else if( aUndoIter.pMarkList )
@@ -134,21 +134,21 @@ BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt )
}
EndAllAction();
- // #105332# undo state was not restored but set to FALSE everytime
+ // #105332# undo state was not restored but set to sal_False everytime
GetDoc()->DoUndo( bSaveDoesUndo );
return bRet;
}
-USHORT SwEditShell::Redo( USHORT nCnt )
+sal_uInt16 SwEditShell::Redo( sal_uInt16 nCnt )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// #105332# undo state was not saved
- BOOL bSaveDoesUndo = GetDoc()->DoesUndo();
+ sal_Bool bSaveDoesUndo = GetDoc()->DoesUndo();
- GetDoc()->DoUndo( FALSE );
+ GetDoc()->DoUndo( sal_False );
StartAllAction();
{
@@ -183,7 +183,7 @@ USHORT SwEditShell::Redo( USHORT nCnt )
CreateCrsr();
aUndoIter.pAktPam = GetCrsr();
}
- } while( TRUE );
+ } while( sal_True );
}
if( aUndoIter.IsUpdateAttr() )
@@ -200,9 +200,9 @@ USHORT SwEditShell::Redo( USHORT nCnt )
{
Point aPt;
SwFlyFrm* pFly = ((SwFlyFrmFmt*)aUndoIter.pSelFmt)->GetFrm(
- &aPt, FALSE );
+ &aPt, sal_False );
if( pFly )
- ((SwFEShell*)this)->SelectFlyFrm( *pFly, TRUE );
+ ((SwFEShell*)this)->SelectFlyFrm( *pFly, sal_True );
}
}
else if( aUndoIter.pMarkList )
@@ -221,17 +221,17 @@ USHORT SwEditShell::Redo( USHORT nCnt )
EndAllAction();
- // #105332# undo state was not restored but set FALSE everytime
+ // #105332# undo state was not restored but set sal_False everytime
GetDoc()->DoUndo( bSaveDoesUndo );
return bRet;
}
-USHORT SwEditShell::Repeat( USHORT nCount )
+sal_uInt16 SwEditShell::Repeat( sal_uInt16 nCount )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
StartAllAction();
SwUndoIter aUndoIter( GetCrsr(), UNDO_EMPTY );
@@ -243,13 +243,13 @@ USHORT SwEditShell::Repeat( USHORT nCount )
// abfragen/setzen der Anzahl von wiederherstellbaren Undo-Actions
-USHORT SwEditShell::GetUndoActionCount()
+sal_uInt16 SwEditShell::GetUndoActionCount()
{
return SwDoc::GetUndoActionCount();
}
-void SwEditShell::SetUndoActionCount( USHORT nNew )
+void SwEditShell::SetUndoActionCount( sal_uInt16 nNew )
{
SwDoc::SetUndoActionCount( nNew );
}
@@ -266,7 +266,7 @@ void lcl_SelectSdrMarkList( SwEditShell* pShell,
if( pShell->ISA( SwFEShell ) )
{
SwFEShell* pFEShell = static_cast<SwFEShell*>( pShell );
- for( USHORT i = 0; i < pSdrMarkList->GetMarkCount(); ++i )
+ for( sal_uInt16 i = 0; i < pSdrMarkList->GetMarkCount(); ++i )
pFEShell->SelectObj( Point(),
(i==0) ? 0 : SW_ADD_SELECT,
pSdrMarkList->GetMark( i )->GetMarkedSdrObj() );
diff --git a/sw/source/core/except/dbgloop.cxx b/sw/source/core/except/dbgloop.cxx
index c48c9e5d53bb..0cf08c601422 100644
--- a/sw/source/core/except/dbgloop.cxx
+++ b/sw/source/core/except/dbgloop.cxx
@@ -49,7 +49,7 @@ void DbgLoopStack::Reset()
{
nPtr = 0;
pDbg = 0;
- for( USHORT i = 0; i < DBG_MAX_STACK; ++i )
+ for( sal_uInt16 i = 0; i < DBG_MAX_STACK; ++i )
aCount[i] = 0;
}
@@ -103,7 +103,7 @@ void DbgLoopStack::Pop()
void DbgLoopStack::Print( SvStream &rOS ) const
{
rOS << "POS: " << nPtr << '\n';
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < DBG_MAX_STACK; ++i )
rOS << i << " ";
rOS << '\n';
@@ -121,7 +121,7 @@ void DbgLoopStack::Print( SvStream &rOS ) const
#include <stdlib.h>
-void AssertFail( const char *pErr, const char *pFile, USHORT nLine )
+void AssertFail( const char *pErr, const char *pFile, sal_uInt16 nLine )
{
cout << pErr << '\n';
PrintLoopStack( cout );
@@ -137,12 +137,12 @@ public:
void Test::Run() const
{
cout << "---" << '\n';
- for( USHORT i = 0; i < 10; ++i )
+ for( sal_uInt16 i = 0; i < 10; ++i )
{
cout << "i" << i;
DBG_LOOP;
PrintLoopStack( cout );
- for( USHORT j = 0; j < 10; ++j )
+ for( sal_uInt16 j = 0; j < 10; ++j )
{
cout << " j" << j;
DBG_LOOP;
diff --git a/sw/source/core/except/errhdl.cxx b/sw/source/core/except/errhdl.cxx
index 03b5ebf45422..3e2a2dfd0966 100644
--- a/sw/source/core/except/errhdl.cxx
+++ b/sw/source/core/except/errhdl.cxx
@@ -44,8 +44,8 @@
#define CVBREAK
#endif
-BOOL bAssertFail = FALSE; // ist gerade eine Assertbox oben ?
-BOOL bAssert = FALSE; // TRUE, wenn mal ein ASSERT kam.
+sal_Bool bAssertFail = sal_False; // ist gerade eine Assertbox oben ?
+sal_Bool bAssert = sal_False; // sal_True, wenn mal ein ASSERT kam.
/*------------------------------------------------------------------------
Ausgabe einer Fehlermeldung inkl. Bedingung, Dateiname und Zeilennummer
@@ -54,18 +54,18 @@ BOOL bAssert = FALSE; // TRUE, wenn mal ein ASSERT kam.
Parameter:
char *pError Fehlermeldung
char *pFileName Filename in dem der Fehler auftrat
- USHORT nLine Zeilennummer in dem der Fehler auftrat
+ sal_uInt16 nLine Zeilennummer in dem der Fehler auftrat
------------------------------------------------------------------------*/
-void AssertFail( const sal_Char* pError, const sal_Char* pFileName, USHORT nLine )
+void AssertFail( const sal_Char* pError, const sal_Char* pFileName, sal_uInt16 nLine )
{
CVBREAK;
// NOTE4("ASSERT: %s at %d: %s\n", pFileName, nLine, pError);
- bAssert = TRUE;
+ bAssert = sal_True;
if( !bAssertFail && GetpApp() && GetpApp()->IsInMain() )
{
- bAssertFail = TRUE;
+ bAssertFail = sal_True;
ByteString aErr;
aErr = "Assertion failed\n==================\nFILE : ";
aErr += pFileName;
@@ -75,7 +75,7 @@ void AssertFail( const sal_Char* pError, const sal_Char* pFileName, USHORT nLine
aErr += pError;
ByteString aTmp( getenv( "SW_NOBEEP" ) );
- if ( aTmp != "TRUE" )
+ if ( aTmp != "sal_True" )
Sound::Beep(SOUND_ERROR);
#if defined( UNX ) && !defined( DBG_UTIL )
@@ -83,7 +83,7 @@ void AssertFail( const sal_Char* pError, const sal_Char* pFileName, USHORT nLine
#else
DbgError( aErr.GetBuffer() );
#endif
- bAssertFail = FALSE;
+ bAssertFail = sal_False;
}
else
{
@@ -100,12 +100,12 @@ void AssertFail( const sal_Char* pError, const sal_Char* pFileName, USHORT nLine
wo der Fehler auftrat.
Die Funktion wird durch das ASSERT Makro gerufen!
Parameter:
- USHORT nErrorId Id fuer Fehlermeldung
+ sal_uInt16 nErrorId Id fuer Fehlermeldung
char *pFileName Filename in dem der Fehler auftrat
- USHORT nLine Zeilennummer in dem der Fehler auftrat
+ sal_uInt16 nLine Zeilennummer in dem der Fehler auftrat
------------------------------------------------------------------------*/
-void AssertFail( USHORT nErrorId, const sal_Char* pFileName, USHORT nLine )
+void AssertFail( sal_uInt16 nErrorId, const sal_Char* pFileName, sal_uInt16 nLine )
{
// Umsetzung der ErrorId in eine Fehlermeldung
static const sal_Char
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 630f8dc18e34..8242d2325015 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -83,16 +83,16 @@ SV_IMPL_PTRARR( SortKeyArr, TOXSortKeyPtr )
SwAuthEntry::SwAuthEntry(const SwAuthEntry& rCopy)
: nRefCount(0)
{
- for(USHORT i = 0; i < AUTH_FIELD_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
aAuthFields[i] = rCopy.aAuthFields[i];
}
// --------------------------------------------------------
-BOOL SwAuthEntry::operator==(const SwAuthEntry& rComp)
+sal_Bool SwAuthEntry::operator==(const SwAuthEntry& rComp)
{
- for(USHORT i = 0; i < AUTH_FIELD_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
if(aAuthFields[i] != rComp.aAuthFields[i])
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// --------------------------------------------------------
@@ -107,8 +107,8 @@ SwAuthorityFieldType::SwAuthorityFieldType(SwDoc* pDoc)
m_pSortKeyArr(new SortKeyArr(3, 3)),
m_cPrefix('['),
m_cSuffix(']'),
- m_bIsSequence(FALSE),
- m_bSortByDocument(TRUE),
+ m_bIsSequence(sal_False),
+ m_bSortByDocument(sal_True),
m_eLanguage((LanguageType)::GetAppLanguage())
{
}
@@ -125,7 +125,7 @@ SwAuthorityFieldType::SwAuthorityFieldType( const SwAuthorityFieldType& rFType)
m_eLanguage(rFType.m_eLanguage),
m_sSortAlgorithm(rFType.m_sSortAlgorithm)
{
- for(USHORT i = 0; i < rFType.m_pSortKeyArr->Count(); i++)
+ for(sal_uInt16 i = 0; i < rFType.m_pSortKeyArr->Count(); i++)
m_pSortKeyArr->Insert((*rFType.m_pSortKeyArr)[i], i);
}
@@ -153,16 +153,16 @@ SwFieldType* SwAuthorityFieldType::Copy() const
void SwAuthorityFieldType::RemoveField(long nHandle)
{
#ifdef DBG_UTIL
- BOOL bRemoved = FALSE;
+ sal_Bool bRemoved = sal_False;
#endif
- for(USHORT j = 0; j < m_pDataArr->Count(); j++)
+ for(sal_uInt16 j = 0; j < m_pDataArr->Count(); j++)
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
long nRet = (long)(void*)pTemp;
if(nRet == nHandle)
{
#ifdef DBG_UTIL
- bRemoved = TRUE;
+ bRemoved = sal_True;
#endif
pTemp->RemoveRef();
if(!pTemp->GetRefCount())
@@ -185,11 +185,11 @@ long SwAuthorityFieldType::AddField(const String& rFieldContents)
{
long nRet = 0;
SwAuthEntry* pEntry = new SwAuthEntry;
- for( USHORT i = 0; i < AUTH_FIELD_END; ++i )
+ for( sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i )
pEntry->SetAuthorField( (ToxAuthorityField)i,
rFieldContents.GetToken( i, TOX_STYLE_DELIMITER ));
- for(USHORT j = 0; j < m_pDataArr->Count() && pEntry; j++)
+ for(sal_uInt16 j = 0; j < m_pDataArr->Count() && pEntry; j++)
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
if(*pTemp == *pEntry)
@@ -213,16 +213,16 @@ long SwAuthorityFieldType::AddField(const String& rFieldContents)
/* -----------------17.09.99 14:18-------------------
--------------------------------------------------*/
-BOOL SwAuthorityFieldType::AddField(long nHandle)
+sal_Bool SwAuthorityFieldType::AddField(long nHandle)
{
- BOOL bRet = FALSE;
- for( USHORT j = 0; j < m_pDataArr->Count(); j++ )
+ sal_Bool bRet = sal_False;
+ for( sal_uInt16 j = 0; j < m_pDataArr->Count(); j++ )
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
long nTmp = (long)(void*)pTemp;
if( nTmp == nHandle )
{
- bRet = TRUE;
+ bRet = sal_True;
pTemp->AddRef();
//re-generate positions of the fields
DelSequenceArray();
@@ -238,7 +238,7 @@ BOOL SwAuthorityFieldType::AddField(long nHandle)
const SwAuthEntry* SwAuthorityFieldType::GetEntryByHandle(long nHandle) const
{
const SwAuthEntry* pRet = 0;
- for(USHORT j = 0; j < m_pDataArr->Count(); j++)
+ for(sal_uInt16 j = 0; j < m_pDataArr->Count(); j++)
{
const SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
long nTmp = (long)(void*)pTemp;
@@ -257,7 +257,7 @@ const SwAuthEntry* SwAuthorityFieldType::GetEntryByHandle(long nHandle) const
void SwAuthorityFieldType::GetAllEntryIdentifiers(
SvStringsDtor& rToFill )const
{
- for(USHORT j = 0; j < m_pDataArr->Count(); j++)
+ for(sal_uInt16 j = 0; j < m_pDataArr->Count(); j++)
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
rToFill.Insert( new String( pTemp->GetAuthorField(
@@ -271,7 +271,7 @@ const SwAuthEntry* SwAuthorityFieldType::GetEntryByIdentifier(
const String& rIdentifier)const
{
const SwAuthEntry* pRet = 0;
- for( USHORT j = 0; j < m_pDataArr->Count(); ++j )
+ for( sal_uInt16 j = 0; j < m_pDataArr->Count(); ++j )
{
const SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
if( rIdentifier == pTemp->GetAuthorField( AUTH_FIELD_IDENTIFIER ))
@@ -288,13 +288,13 @@ const SwAuthEntry* SwAuthorityFieldType::GetEntryByIdentifier(
bool SwAuthorityFieldType::ChangeEntryContent(const SwAuthEntry* pNewEntry)
{
bool bChanged = false;
- for( USHORT j = 0; j < m_pDataArr->Count(); ++j )
+ for( sal_uInt16 j = 0; j < m_pDataArr->Count(); ++j )
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
if(pTemp->GetAuthorField(AUTH_FIELD_IDENTIFIER) ==
pNewEntry->GetAuthorField(AUTH_FIELD_IDENTIFIER))
{
- for(USHORT i = 0; i < AUTH_FIELD_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
pTemp->SetAuthorField((ToxAuthorityField) i,
pNewEntry->GetAuthorField((ToxAuthorityField)i));
bChanged = true;
@@ -307,9 +307,9 @@ bool SwAuthorityFieldType::ChangeEntryContent(const SwAuthEntry* pNewEntry)
Description: appends a new entry (if new) and returns the array position
-----------------------------------------------------------------------*/
-USHORT SwAuthorityFieldType::AppendField( const SwAuthEntry& rInsert )
+sal_uInt16 SwAuthorityFieldType::AppendField( const SwAuthEntry& rInsert )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
for( nRet = 0; nRet < m_pDataArr->Count(); ++nRet )
{
SwAuthEntry* pTemp = m_pDataArr->GetObject( nRet );
@@ -330,7 +330,7 @@ USHORT SwAuthorityFieldType::AppendField( const SwAuthEntry& rInsert )
/*-- 11.10.99 08:49:24---------------------------------------------------
-----------------------------------------------------------------------*/
-long SwAuthorityFieldType::GetHandle(USHORT nPos)
+long SwAuthorityFieldType::GetHandle(sal_uInt16 nPos)
{
long nRet = 0;
if( nPos < m_pDataArr->Count() )
@@ -343,7 +343,7 @@ long SwAuthorityFieldType::GetHandle(USHORT nPos)
/* -----------------19.10.99 13:46-------------------
--------------------------------------------------*/
-USHORT SwAuthorityFieldType::GetSequencePos(long nHandle)
+sal_uInt16 SwAuthorityFieldType::GetSequencePos(long nHandle)
{
//find the field in a sorted array of handles,
#ifdef DBG_UTIL
@@ -417,7 +417,7 @@ USHORT SwAuthorityFieldType::GetSequencePos(long nHandle)
}
}
- for(USHORT i = 0; i < aSortArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < aSortArr.Count(); i++)
{
const SwTOXSortTabBase& rBase = *aSortArr[i];
SwFmtFld& rFmtFld = ((SwTOXAuthority&)rBase).GetFldFmt();
@@ -427,8 +427,8 @@ USHORT SwAuthorityFieldType::GetSequencePos(long nHandle)
aSortArr.DeleteAndDestroy(0, aSortArr.Count());
}
//find nHandle
- USHORT nRet = 0;
- for(USHORT i = 0; i < m_pSequArr->Count(); i++)
+ sal_uInt16 nRet = 0;
+ for(sal_uInt16 i = 0; i < m_pSequArr->Count(); i++)
{
if((*m_pSequArr)[i] == nHandle)
{
@@ -442,7 +442,7 @@ USHORT SwAuthorityFieldType::GetSequencePos(long nHandle)
/* -----------------------------15.11.00 17:33--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwAuthorityFieldType::QueryValue( Any& rVal, USHORT nWhichId ) const
+sal_Bool SwAuthorityFieldType::QueryValue( Any& rVal, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -494,14 +494,14 @@ BOOL SwAuthorityFieldType::QueryValue( Any& rVal, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/* -----------------------------15.11.00 17:33--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwAuthorityFieldType::PutValue( const Any& rAny, USHORT nWhichId )
+sal_Bool SwAuthorityFieldType::PutValue( const Any& rAny, sal_uInt16 nWhichId )
{
- sal_Bool bRet = TRUE;
+ sal_Bool bRet = sal_True;
String sTmp;
switch( nWhichId )
{
@@ -554,7 +554,7 @@ BOOL SwAuthorityFieldType::PutValue( const Any& rAny, USHORT nWhichId )
if(nVal >= 0 && nVal < AUTH_FIELD_END)
pSortKey->eField = (ToxAuthorityField) nVal;
else
- bRet = FALSE;
+ bRet = sal_False;
}
else if(pValue[j].Name.equalsAsciiL(SW_PROP_NAME(UNO_NAME_IS_SORT_ASCENDING)))
{
@@ -583,14 +583,14 @@ void SwAuthorityFieldType::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
/* -----------------20.10.99 13:38-------------------
--------------------------------------------------*/
-USHORT SwAuthorityFieldType::GetSortKeyCount() const
+sal_uInt16 SwAuthorityFieldType::GetSortKeyCount() const
{
return m_pSortKeyArr->Count();
}
/* -----------------20.10.99 13:38-------------------
--------------------------------------------------*/
-const SwTOXSortKey* SwAuthorityFieldType::GetSortKey(USHORT nIdx) const
+const SwTOXSortKey* SwAuthorityFieldType::GetSortKey(sal_uInt16 nIdx) const
{
SwTOXSortKey* pRet = 0;
if(m_pSortKeyArr->Count() > nIdx)
@@ -601,11 +601,11 @@ const SwTOXSortKey* SwAuthorityFieldType::GetSortKey(USHORT nIdx) const
/* -----------------20.10.99 13:38-------------------
--------------------------------------------------*/
-void SwAuthorityFieldType::SetSortKeys(USHORT nKeyCount, SwTOXSortKey aKeys[])
+void SwAuthorityFieldType::SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey aKeys[])
{
m_pSortKeyArr->DeleteAndDestroy(0, m_pSortKeyArr->Count());
- USHORT nArrIdx = 0;
- for(USHORT i = 0; i < nKeyCount; i++)
+ sal_uInt16 nArrIdx = 0;
+ for(sal_uInt16 i = 0; i < nKeyCount; i++)
if(aKeys[i].eField < AUTH_FIELD_END)
m_pSortKeyArr->Insert(new SwTOXSortKey(aKeys[i]), nArrIdx++);
}
@@ -742,13 +742,13 @@ const char* aFieldNames[] =
/* -----------------------------16.11.00 12:27--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwAuthorityField::QueryValue( Any& rAny, USHORT /*nWhichId*/ ) const
+sal_Bool SwAuthorityField::QueryValue( Any& rAny, sal_uInt16 /*nWhichId*/ ) const
{
if(!GetTyp())
- return FALSE;
+ return sal_False;
const SwAuthEntry* pAuthEntry = ((SwAuthorityFieldType*)GetTyp())->GetEntryByHandle(m_nHandle);
if(!pAuthEntry)
- return FALSE;
+ return sal_False;
Sequence <PropertyValue> aRet(AUTH_FIELD_END);
PropertyValue* pValues = aRet.getArray();
for(sal_Int16 i = 0; i < AUTH_FIELD_END; i++)
@@ -761,7 +761,7 @@ BOOL SwAuthorityField::QueryValue( Any& rAny, USHORT /*nWhichId*/ ) const
pValues[i].Value <<= OUString(rField);
}
rAny <<= aRet;
- return FALSE;
+ return sal_False;
}
/* -----------------------------15.11.00 17:33--------------------------------
@@ -774,14 +774,14 @@ sal_Int16 lcl_Find(const OUString& rFieldName)
return -1;
}
//----------------------------------------------------------------------------
-BOOL SwAuthorityField::PutValue( const Any& rAny, USHORT /*nWhichId*/ )
+sal_Bool SwAuthorityField::PutValue( const Any& rAny, sal_uInt16 /*nWhichId*/ )
{
if(!GetTyp() || !((SwAuthorityFieldType*)GetTyp())->GetEntryByHandle(m_nHandle))
- return FALSE;
+ return sal_False;
Sequence <PropertyValue> aParam;
if(!(rAny >>= aParam))
- return FALSE;
+ return sal_False;
String sToSet;
sToSet.Fill(AUTH_FIELD_ISBN, TOX_STYLE_DELIMITER);
@@ -807,7 +807,7 @@ BOOL SwAuthorityField::PutValue( const Any& rAny, USHORT /*nWhichId*/ )
((SwAuthorityFieldType*)GetTyp())->RemoveField(m_nHandle);
m_nHandle = ((SwAuthorityFieldType*)GetTyp())->AddField(sToSet);
- return FALSE;
+ return sal_False;
}
/* -----------------11.10.99 09:43-------------------
@@ -820,7 +820,7 @@ SwFieldType* SwAuthorityField::ChgTyp( SwFieldType* pFldTyp )
{
const SwAuthEntry* pEntry = pSrcTyp->GetEntryByHandle( m_nHandle );
- USHORT nHdlPos = pDstTyp->AppendField( *pEntry );
+ sal_uInt16 nHdlPos = pDstTyp->AppendField( *pEntry );
pSrcTyp->RemoveField( m_nHandle );
m_nHandle = pDstTyp->GetHandle( nHdlPos );
pDstTyp->AddField( m_nHandle );
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 36b981b90752..422285dee10f 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -54,13 +54,13 @@
const sal_Unicode cRelTrenner = ',';
const sal_Unicode cRelKennung = ''; // CTRL-R
-const USHORT cMAXSTACKSIZE = 50;
+const sal_uInt16 cMAXSTACKSIZE = 50;
const SwFrm* lcl_GetBoxFrm( const SwTableBox& rBox );
long lcl_GetLongBoxNum( String& rStr );
const SwTableBox* lcl_RelToBox( const SwTable&, const SwTableBox*, const String& );
String lcl_BoxNmToRel( const SwTable&, const SwTableNode&,
- const String& , const String& , BOOL );
+ const String& , const String& , sal_Bool );
/*************************************************************************
@@ -110,7 +110,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == GetFrmFmt()->GetItemState(
- RES_BOXATR_FORMULA, FALSE, &pItem ) )
+ RES_BOXATR_FORMULA, sal_False, &pItem ) )
{
rCalcPara.rCalc.SetCalcError( CALC_NOERR ); // wieder zuruecksetzen
if( !((SwTblBoxFormula*)pItem)->IsValid() )
@@ -137,7 +137,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
break;
}
else if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
- RES_BOXATR_VALUE, FALSE, &pItem ) )
+ RES_BOXATR_VALUE, sal_False, &pItem ) )
{
rCalcPara.rCalc.SetCalcError( CALC_NOERR ); // wieder zuruecksetzen
nRet = ((SwTblBoxValue*)pItem)->GetValue();
@@ -235,7 +235,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
}
// ?? sonst ist das ein Fehler
- } while( FALSE );
+ } while( sal_False );
if( !rCalcPara.IsStackOverFlow() )
{
@@ -266,15 +266,15 @@ SwTblCalcPara::~SwTblCalcPara()
delete pBoxStk;
}
-BOOL SwTblCalcPara::CalcWithStackOverflow()
+sal_Bool SwTblCalcPara::CalcWithStackOverflow()
{
// falls ein StackUeberlauf erkannt wurde, sollte mit
// der letzten Box noch mal aufgesetzt werden. Irgend
// ein Weg sollte dann
- USHORT nSaveMaxSize = nMaxSize;
+ sal_uInt16 nSaveMaxSize = nMaxSize;
nMaxSize = cMAXSTACKSIZE - 5;
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
SwTableBoxes aStackOverFlows;
do {
SwTableBox* pBox = (SwTableBox*)pLastTblBox;
@@ -291,7 +291,7 @@ BOOL SwTblCalcPara::CalcWithStackOverflow()
// falls Rekursionen erkannt wurden
nStackCnt = 0;
rCalc.SetCalcError( CALC_NOERR );
- pBoxStk->Remove( USHORT(0), pBoxStk->Count() );
+ pBoxStk->Remove( sal_uInt16(0), pBoxStk->Count() );
while( !rCalc.IsCalcError() && nCnt )
{
@@ -311,7 +311,7 @@ SwTableFormula::SwTableFormula( const String& rFormel )
: sFormel( rFormel )
{
eNmType = EXTRNL_NAME;
- bValidValue = FALSE;
+ bValidValue = sal_False;
}
SwTableFormula::~SwTableFormula()
@@ -353,7 +353,7 @@ void SwTableFormula::_MakeFormel( const SwTable& rTbl, String& rNewStr,
rNewStr += '(';
bool bDelim = false;
- for( USHORT n = 0; n < aBoxes.Count() &&
+ for( sal_uInt16 n = 0; n < aBoxes.Count() &&
!pCalcPara->rCalc.IsCalcError(); ++n )
{
const SwTableBox* pTblBox = aBoxes[n];
@@ -363,7 +363,7 @@ void SwTableFormula::_MakeFormel( const SwTable& rTbl, String& rNewStr,
rNewStr += cListDelim;
bDelim = true;
rNewStr += pCalcPara->rCalc.GetStrResult(
- pTblBox->GetValue( *pCalcPara ), FALSE );
+ pTblBox->GetValue( *pCalcPara ), sal_False );
}
}
rNewStr += ')';
@@ -375,7 +375,7 @@ void SwTableFormula::_MakeFormel( const SwTable& rTbl, String& rNewStr,
if ( pSttBox->getRowSpan() >= 1 )
{
rNewStr += pCalcPara->rCalc.GetStrResult(
- pSttBox->GetValue( *pCalcPara ), FALSE );
+ pSttBox->GetValue( *pCalcPara ), sal_False );
}
}
else
@@ -611,7 +611,7 @@ String SwTableFormula::ScanString( FnScanFormel fnFormel, const SwTable& rTbl,
void* pPara ) const
{
String aStr;
- USHORT nFml = 0, nStt = 0, nEnd = 0, nTrenner;
+ sal_uInt16 nFml = 0, nStt = 0, nEnd = 0, nTrenner;
do {
// falls der Formel ein Name vorangestellt ist, diese Tabelle
@@ -691,7 +691,7 @@ String SwTableFormula::ScanString( FnScanFormel fnFormel, const SwTable& rTbl,
}
nFml = nEnd+1;
- } while( TRUE );
+ } while( sal_True );
return aStr;
}
@@ -699,7 +699,7 @@ const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, const String& rNm ) const
{
const SwFrmFmts& rTblFmts = *rDoc.GetTblFrmFmts();
const SwTable* pTmpTbl, *pRet = 0;
- for( USHORT nFmtCnt = rTblFmts.Count(); nFmtCnt; )
+ for( sal_uInt16 nFmtCnt = rTblFmts.Count(); nFmtCnt; )
{
SwFrmFmt* pFmt = rTblFmts[ --nFmtCnt ];
// falls wir von Sw3Writer gerufen werden, dann ist dem
@@ -729,7 +729,7 @@ const SwFrm* lcl_GetBoxFrm( const SwTableBox& rBox )
// oder besser ueber die Box den Frame suchen
SwClientIter aIter( *pBox->GetFrmFmt() );
- ULONG nMinPos = ULONG_MAX;
+ sal_uLong nMinPos = ULONG_MAX;
const SwFrm* pFnd = 0;
for( SwFrm* pF = (SwFrm*)aIter.First( TYPE( SwCellFrm )); pF;
pF = (SwFrm*)aIter.Next() )
@@ -742,12 +742,12 @@ const SwFrm* lcl_GetBoxFrm( const SwTableBox& rBox )
SwCntntNode* pCNd = aIdx.GetNodes().GoNext( &aIdx );
ASSERT( pCNd, "Box hat keinen TextNode" );
Point aPt; // den im Layout 1. Frame returnen - Tab.Kopfzeile !!
- return pCNd->GetFrm( &aPt, NULL, FALSE );
+ return pCNd->GetFrm( &aPt, NULL, sal_False );
}
long lcl_GetLongBoxNum( String& rStr )
{
- USHORT nPos;
+ sal_uInt16 nPos;
long nRet;
if( STRING_NOTFOUND == ( nPos = rStr.Search( cRelTrenner ) ))
{
@@ -790,8 +790,8 @@ const SwTableBox* lcl_RelToBox( const SwTable& rTbl,
pBox = pLine->GetUpper();
pLine = pBox->GetUpper();
}
- USHORT nSttBox = pLine->GetTabBoxes().GetPos( pBox );
- USHORT nSttLine = rTbl.GetTabLines().GetPos( pLine );
+ sal_uInt16 nSttBox = pLine->GetTabBoxes().GetPos( pBox );
+ sal_uInt16 nSttLine = rTbl.GetTabLines().GetPos( pLine );
long nBoxOffset = lcl_GetLongBoxNum( sGetName ) + nSttBox;
long nLineOffset = lcl_GetLongBoxNum( sGetName ) + nSttLine;
@@ -803,13 +803,13 @@ const SwTableBox* lcl_RelToBox( const SwTable& rTbl,
if( nLineOffset >= long(pLines->Count()) )
return 0;
- pLine = (*pLines)[ USHORT(nLineOffset) ];
+ pLine = (*pLines)[ sal_uInt16(nLineOffset) ];
// dann suche die Box
pBoxes = &pLine->GetTabBoxes();
if( nBoxOffset >= long(pBoxes->Count()) )
return 0;
- pBox = (*pBoxes)[ USHORT(nBoxOffset) ];
+ pBox = (*pBoxes)[ sal_uInt16(nBoxOffset) ];
while( sGetName.Len() )
{
@@ -850,7 +850,7 @@ const SwTableBox* lcl_RelToBox( const SwTable& rTbl,
String lcl_BoxNmToRel( const SwTable& rTbl, const SwTableNode& rTblNd,
const String& rRefBoxNm, const String& rGetStr,
- BOOL bExtrnlNm )
+ sal_Bool bExtrnlNm )
{
String sCpy( rRefBoxNm );
String sTmp( rGetStr );
@@ -867,8 +867,8 @@ String lcl_BoxNmToRel( const SwTable& rTbl, const SwTableNode& rTblNd,
// die externe Darstellung bei:
if( &rTbl == &rTblNd.GetTable() )
{
- long nBox = SwTable::_GetBoxNum( sTmp, TRUE );
- nBox -= SwTable::_GetBoxNum( sCpy, TRUE );
+ long nBox = SwTable::_GetBoxNum( sTmp, sal_True );
+ nBox -= SwTable::_GetBoxNum( sCpy, sal_True );
long nLine = SwTable::_GetBoxNum( sTmp );
nLine -= SwTable::_GetBoxNum( sCpy );
@@ -892,11 +892,11 @@ String lcl_BoxNmToRel( const SwTable& rTbl, const SwTableNode& rTblNd,
return sTmp;
}
-USHORT SwTableFormula::GetBoxesOfFormula( const SwTable& rTbl,
+sal_uInt16 SwTableFormula::GetBoxesOfFormula( const SwTable& rTbl,
SwSelBoxes& rBoxes )
{
if( rBoxes.Count() )
- rBoxes.Remove( USHORT(0), rBoxes.Count() );
+ rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
BoxNmToPtr( &rTbl );
ScanString( &SwTableFormula::_GetFmlBoxes, rTbl, &rBoxes );
@@ -980,7 +980,7 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
break;
// dann mal die Tabellenkoepfe raus:
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
pLine = rBoxes[n]->GetUpper();
while( pLine->GetUpper() )
@@ -989,7 +989,7 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
if( pTbl->IsHeadline( *pLine ) )
rBoxes.Remove( n--, 1 );
}
- } while( FALSE );
+ } while( sal_False );
}
}
@@ -997,7 +997,7 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
void SwTableFormula::_HasValidBoxes( const SwTable& rTbl, String& ,
String& rFirstBox, String* pLastBox, void* pPara ) const
{
- BOOL* pBValid = (BOOL*)pPara;
+ sal_Bool* pBValid = (sal_Bool*)pPara;
if( *pBValid ) // einmal falsch, immer falsch
{
SwTableBox* pSttBox = 0, *pEndBox = 0;
@@ -1038,13 +1038,13 @@ void SwTableFormula::_HasValidBoxes( const SwTable& rTbl, String& ,
if( ( pLastBox &&
( !pEndBox || !rTbl.GetTabSortBoxes().Seek_Entry( pEndBox ) ) ) ||
( !pSttBox || !rTbl.GetTabSortBoxes().Seek_Entry( pSttBox ) ) )
- *pBValid = FALSE;
+ *pBValid = sal_False;
}
}
-BOOL SwTableFormula::HasValidBoxes() const
+sal_Bool SwTableFormula::HasValidBoxes() const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
const SwNode* pNd = GetNodeOfFormula();
if( pNd && 0 != ( pNd = pNd->FindTableNode() ) )
ScanString( &SwTableFormula::_HasValidBoxes,
@@ -1053,9 +1053,9 @@ BOOL SwTableFormula::HasValidBoxes() const
}
-USHORT SwTableFormula::GetLnPosInTbl( const SwTable& rTbl, const SwTableBox* pBox )
+sal_uInt16 SwTableFormula::GetLnPosInTbl( const SwTable& rTbl, const SwTableBox* pBox )
{
- USHORT nRet = USHRT_MAX;
+ sal_uInt16 nRet = USHRT_MAX;
if( pBox )
{
const SwTableLine* pLn = pBox->GetUpper();
@@ -1079,8 +1079,8 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
String* pTblNmBox = pLastBox ? pLastBox : &rFirstBox;
- USHORT nLastBoxLen = pTblNmBox->Len();
- USHORT nTrenner = pTblNmBox->Search( '.' );
+ sal_uInt16 nLastBoxLen = pTblNmBox->Len();
+ sal_uInt16 nTrenner = pTblNmBox->Search( '.' );
if( STRING_NOTFOUND != nTrenner &&
// falls im Namen schon die Punkte enthalten sind,
// treten diese immer paarig auf!!! (A1.1.1 !!)
@@ -1101,13 +1101,13 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
if( rTblUpd.pTbl != &rTbl ) // es ist nicht die akt.
(rNewStr += rTblUpd.pTbl->GetFrmFmt()->GetName() )
+= '.'; // den neuen Tabellen Namen setzen
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
}
else if( pFnd != rTblUpd.pTbl ||
( rTblUpd.pTbl != &rTbl && &rTbl != rTblUpd.DATA.pDelTbl))
(rNewStr += sTblNm ) += '.'; // den Tabellen Namen behalten
else
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
}
else
(rNewStr += sTblNm ) += '.'; // den Tabellen Namen behalten
@@ -1152,12 +1152,12 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
if( TBL_SPLITTBL == rTblUpd.eFlags )
{
// wo liegen die Boxen, in der "alten" oder in der neuen Tabelle?
- BOOL bInNewTbl = FALSE;
+ sal_Bool bInNewTbl = sal_False;
if( pLastBox )
{
// das ist die "erste" Box in der Selektion. Die bestimmt ob die
// Formel in der alten oder neuen Tabelle steht.
- USHORT nEndLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pEndBox ),
+ sal_uInt16 nEndLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pEndBox ),
nSttLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pSttBox );
if( USHRT_MAX != nSttLnPos && USHRT_MAX != nEndLnPos &&
@@ -1172,7 +1172,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
{
// das ist aufjedenfall eine ungueltige Formel, also fuers
// Undo auf Modified setzen
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
if( pEndBox )
bInNewTbl = USHRT_MAX != nEndLnPos &&
rTblUpd.nSplitLine <= nEndLnPos &&
@@ -1181,7 +1181,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
}
else
{
- USHORT nSttLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pSttBox );
+ sal_uInt16 nSttLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pSttBox );
// dann landet das Teil in der neuen Tabelle?
bInNewTbl = USHRT_MAX != nSttLnPos &&
rTblUpd.nSplitLine <= nSttLnPos &&
@@ -1193,7 +1193,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
{
if( !bInNewTbl )
{
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
( rNewStr += rTblUpd.pTbl->GetFrmFmt()->GetName() ) += '.';
}
else if( sTblNm.Len() )
@@ -1201,7 +1201,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
}
else if( bInNewTbl )
{
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
( rNewStr += *rTblUpd.DATA.pNewTblNm ) += '.';
}
else if( sTblNm.Len() )
diff --git a/sw/source/core/fields/chpfld.cxx b/sw/source/core/fields/chpfld.cxx
index bfc14af1a7aa..837ae47d9174 100644
--- a/sw/source/core/fields/chpfld.cxx
+++ b/sw/source/core/fields/chpfld.cxx
@@ -152,17 +152,17 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
do {
if( pONd && pONd->GetTxtColl() )
{
- BYTE nPrevLvl = nLevel;
+ sal_uInt8 nPrevLvl = nLevel;
// --> OD 2008-04-02 #refactorlists#
// nLevel = GetRealLevel( pONd->GetTxtColl()->
// GetOutlineLevel() );
//ASSERT( pONd->GetOutlineLevel() >= 0 && pONd->GetOutlineLevel() < MAXLEVEL, //#outline level,zhaojianwei
// "<SwChapterField::ChangeExpansion(..)> - outline node with inconsistent outline level. Serious defect -> please inform OD." );
- //nLevel = static_cast<BYTE>(pONd->GetOutlineLevel());
+ //nLevel = static_cast<sal_uInt8>(pONd->GetOutlineLevel());
ASSERT( pONd->GetAttrOutlineLevel() >= 0 && pONd->GetAttrOutlineLevel() <= MAXLEVEL,
"<SwChapterField::ChangeExpansion(..)> - outline node with inconsistent outline level. Serious defect -> please inform OD." );
- nLevel = static_cast<BYTE>(pONd->GetAttrOutlineLevel()); //<-end,zhaojianwei
+ nLevel = static_cast<sal_uInt8>(pONd->GetAttrOutlineLevel()); //<-end,zhaojianwei
// <--
if( nPrevLvl < nLevel )
@@ -197,7 +197,7 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
SwNumRule* pRule( pTxtNd->GetNumRule() );
if ( pTxtNd->IsCountedInList() && pRule )
{
- const SwNumFmt& rNFmt = pRule->Get( static_cast<USHORT>(pTxtNd->GetActualListLevel()) );
+ const SwNumFmt& rNFmt = pRule->Get( static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()) );
sPost = rNFmt.GetSuffix();
sPre = rNFmt.GetPrefix();
}
@@ -229,7 +229,7 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
/*-----------------05.03.98 16:19-------------------
--------------------------------------------------*/
-BOOL SwChapterField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwChapterField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -265,9 +265,9 @@ BOOL SwChapterField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 16:19-------------------
--------------------------------------------------*/
-BOOL SwChapterField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwChapterField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_BYTE1:
@@ -277,7 +277,7 @@ BOOL SwChapterField::PutValue( const uno::Any& rAny, USHORT nWhichId )
if(nTmp >= 0 && nTmp < MAXLEVEL)
nLevel = nTmp;
else
- bRet = FALSE;
+ bRet = sal_False;
break;
}
@@ -303,7 +303,7 @@ BOOL SwChapterField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index ec3f5200ba67..a78c2a57d44a 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -62,7 +62,7 @@ String lcl_DBTrennConv(const String& aContent)
{
String sTmp(aContent);
sal_Unicode* pStr = sTmp.GetBufferAccess();
- for( USHORT i = sTmp.Len(); i; --i, ++pStr )
+ for( sal_uInt16 i = sTmp.Len(); i; --i, ++pStr )
if( DB_DELIM == *pStr )
*pStr = '.';
return sTmp;
@@ -113,7 +113,7 @@ void SwDBFieldType::ReleaseRef()
if (--nRefCnt <= 0)
{
- USHORT nPos = GetDoc()->GetFldTypes()->GetPos(this);
+ sal_uInt16 nPos = GetDoc()->GetFldTypes()->GetPos(this);
if (nPos != USHRT_MAX)
{
@@ -126,7 +126,7 @@ void SwDBFieldType::ReleaseRef()
/* -----------------24.02.99 14:51-------------------
*
* --------------------------------------------------*/
-BOOL SwDBFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDBFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -145,12 +145,12 @@ BOOL SwDBFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/* -----------------24.02.99 14:51-------------------
*
* --------------------------------------------------*/
-BOOL SwDBFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -190,18 +190,18 @@ BOOL SwDBFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
Beschreibung: SwDBField
--------------------------------------------------------------------*/
-SwDBField::SwDBField(SwDBFieldType* pTyp, ULONG nFmt)
+SwDBField::SwDBField(SwDBFieldType* pTyp, sal_uLong nFmt)
: SwValueField(pTyp, nFmt),
nSubType(0),
- bIsInBodyTxt(TRUE),
- bValidValue(FALSE),
- bInitialized(FALSE)
+ bIsInBodyTxt(sal_True),
+ bValidValue(sal_False),
+ bInitialized(sal_False)
{
if (GetTyp())
((SwDBFieldType*)GetTyp())->AddRef();
@@ -297,7 +297,7 @@ String SwDBField::GetFieldName() const
//------------------------------------------------------------------------------
-void SwDBField::ChgValue( double d, BOOL bVal )
+void SwDBField::ChgValue( double d, sal_Bool bVal )
{
bValidValue = bVal;
SetValue(d);
@@ -329,7 +329,7 @@ void SwDBField::Evaluate()
SwNewDBMgr* pMgr = GetDoc()->GetNewDBMgr();
// erstmal loeschen
- bValidValue = FALSE;
+ bValidValue = sal_False;
double nValue = DBL_MAX;
const SwDBData& aTmpData = GetDBData();
@@ -358,7 +358,7 @@ void SwDBField::Evaluate()
if (*pDocFormatter->GetNullDate() != aStandard)
nValue += (aStandard - *pDocFormatter->GetNullDate());
}
- bValidValue = TRUE;
+ bValidValue = sal_True;
SetValue(nValue);
aContent = ((SwValueFieldType*)GetTyp())->ExpandValue(nValue, GetFormat(), GetLanguage());
}
@@ -373,15 +373,15 @@ void SwDBField::Evaluate()
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
if (nFmt && nFmt != SAL_MAX_UINT32 && !pFormatter->IsTextFormat(nFmt))
- bValidValue = TRUE; // Wegen Bug #60339 nicht mehr bei allen Strings
+ bValidValue = sal_True; // Wegen Bug #60339 nicht mehr bei allen Strings
}
else
{
- // Bei Strings TRUE wenn Laenge > 0 sonst FALSE
+ // Bei Strings sal_True wenn Laenge > 0 sonst sal_False
SetValue(aContent.Len() ? 1 : 0);
}
}
- bInitialized = TRUE;
+ bInitialized = sal_True;
}
/*--------------------------------------------------------------------
@@ -397,7 +397,7 @@ const String& SwDBField::GetPar1() const
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwDBField::GetSubType() const
+sal_uInt16 SwDBField::GetSubType() const
{
return nSubType;
}
@@ -406,7 +406,7 @@ USHORT SwDBField::GetSubType() const
Beschreibung:
--------------------------------------------------------------------*/
-void SwDBField::SetSubType(USHORT nType)
+void SwDBField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
@@ -414,13 +414,13 @@ void SwDBField::SetSubType(USHORT nType)
/*-----------------06.03.98 16:15-------------------
--------------------------------------------------*/
-BOOL SwDBField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDBField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
case FIELD_PROP_BOOL1:
{
- BOOL bTemp = 0 == (GetSubType()&nsSwExtendedSubType::SUB_OWN_FMT);
+ sal_Bool bTemp = 0 == (GetSubType()&nsSwExtendedSubType::SUB_OWN_FMT);
rAny.setValue(&bTemp, ::getBooleanCppuType());
}
break;
@@ -442,13 +442,13 @@ BOOL SwDBField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*-----------------06.03.98 16:15-------------------
--------------------------------------------------*/
-BOOL SwDBField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDBField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -460,10 +460,10 @@ BOOL SwDBField::PutValue( const uno::Any& rAny, USHORT nWhichId )
break;
case FIELD_PROP_BOOL2:
{
- USHORT nSubTyp = GetSubType();
+ sal_uInt16 nSubTyp = GetSubType();
sal_Bool bVisible = sal_False;
if(!(rAny >>= bVisible))
- return FALSE;
+ return sal_False;
if(bVisible)
nSubTyp &= ~nsSwExtendedSubType::SUB_INVISIBLE;
else
@@ -504,14 +504,14 @@ BOOL SwDBField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
Beschreibung: Basisklasse fuer alle weiteren Datenbankfelder
--------------------------------------------------------------------*/
-SwDBNameInfField::SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, ULONG nFmt) :
+SwDBNameInfField::SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, sal_uLong nFmt) :
SwField(pTyp, nFmt),
aDBData(rDBData),
nSubType(0)
@@ -554,7 +554,7 @@ String SwDBNameInfField::GetFieldName() const
/*-----------------06.03.98 16:55-------------------
--------------------------------------------------*/
-BOOL SwDBNameInfField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDBNameInfField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -576,12 +576,12 @@ BOOL SwDBNameInfField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*-----------------06.03.98 16:55-------------------
--------------------------------------------------*/
-BOOL SwDBNameInfField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDBNameInfField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -596,10 +596,10 @@ BOOL SwDBNameInfField::PutValue( const uno::Any& rAny, USHORT nWhichId )
break;
case FIELD_PROP_BOOL2:
{
- USHORT nSubTyp = GetSubType();
+ sal_uInt16 nSubTyp = GetSubType();
sal_Bool bVisible = sal_False;
if(!(rAny >>= bVisible))
- return FALSE;
+ return sal_False;
if(bVisible)
nSubTyp &= ~nsSwExtendedSubType::SUB_INVISIBLE;
else
@@ -610,19 +610,19 @@ BOOL SwDBNameInfField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/* -----------------4/10/2003 15:03------------------
--------------------------------------------------*/
-USHORT SwDBNameInfField::GetSubType() const
+sal_uInt16 SwDBNameInfField::GetSubType() const
{
return nSubType;
}
/* -----------------4/10/2003 15:03------------------
--------------------------------------------------*/
-void SwDBNameInfField::SetSubType(USHORT nType)
+void SwDBNameInfField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
@@ -651,7 +651,7 @@ SwDBNextSetField::SwDBNextSetField(SwDBNextSetFieldType* pTyp,
const String& rCond,
const String& ,
const SwDBData& rDBData) :
- SwDBNameInfField(pTyp, rDBData), aCond(rCond), bCondValid(TRUE)
+ SwDBNameInfField(pTyp, rDBData), aCond(rCond), bCondValid(sal_True)
{}
//------------------------------------------------------------------------------
@@ -699,9 +699,9 @@ void SwDBNextSetField::SetPar1(const String& rStr)
/*-----------------06.03.98 16:16-------------------
--------------------------------------------------*/
-BOOL SwDBNextSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDBNextSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_PAR3:
@@ -715,9 +715,9 @@ BOOL SwDBNextSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------06.03.98 16:16-------------------
--------------------------------------------------*/
-BOOL SwDBNextSetField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDBNextSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_PAR3:
@@ -772,7 +772,7 @@ SwDBNumSetField::SwDBNumSetField(SwDBNumSetFieldType* pTyp,
SwDBNameInfField(pTyp, rDBData),
aCond(rCond),
aPar2(rDBNum),
- bCondValid(TRUE)
+ bCondValid(sal_True)
{}
//------------------------------------------------------------------------------
@@ -801,7 +801,7 @@ void SwDBNumSetField::Evaluate(SwDoc* pDoc)
if( bCondValid && pMgr && pMgr->IsInMerge() &&
pMgr->IsDataSourceOpen(aTmpData.sDataSource, aTmpData.sCommand, sal_True))
{ // Bedingug OK -> aktuellen Set einstellen
- pMgr->ToRecordId(Max((USHORT)aPar2.ToInt32(), USHORT(1))-1);
+ pMgr->ToRecordId(Max((sal_uInt16)aPar2.ToInt32(), sal_uInt16(1))-1);
}
}
@@ -835,9 +835,9 @@ void SwDBNumSetField::SetPar2(const String& rStr)
/*-----------------06.03.98 16:16-------------------
--------------------------------------------------*/
-BOOL SwDBNumSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDBNumSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_PAR3:
@@ -854,9 +854,9 @@ BOOL SwDBNumSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------06.03.98 16:16-------------------
--------------------------------------------------*/
-BOOL SwDBNumSetField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDBNumSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_PAR3:
@@ -886,7 +886,7 @@ SwDBNameFieldType::SwDBNameFieldType(SwDoc* pDocument)
}
//------------------------------------------------------------------------------
-String SwDBNameFieldType::Expand(ULONG ) const
+String SwDBNameFieldType::Expand(sal_uLong ) const
{
const SwDBData aData = pDoc->GetDBData();
String sRet(aData.sDataSource);
@@ -908,7 +908,7 @@ SwFieldType* SwDBNameFieldType::Copy() const
Beschreibung: Name der angedockten DB
--------------------------------------------------------------------*/
-SwDBNameField::SwDBNameField(SwDBNameFieldType* pTyp, const SwDBData& rDBData, ULONG nFmt)
+SwDBNameField::SwDBNameField(SwDBNameFieldType* pTyp, const SwDBData& rDBData, sal_uLong nFmt)
: SwDBNameInfField(pTyp, rDBData, nFmt)
{}
@@ -936,14 +936,14 @@ SwField* SwDBNameField::Copy() const
/*-----------------06.03.98 16:16-------------------
--------------------------------------------------*/
-BOOL SwDBNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDBNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
return SwDBNameInfField::QueryValue(rAny, nWhichId );
}
/*-----------------06.03.98 16:16-------------------
--------------------------------------------------*/
-BOOL SwDBNameField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDBNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
return SwDBNameInfField::PutValue(rAny, nWhichId );
}
@@ -972,7 +972,7 @@ SwFieldType* SwDBSetNumberFieldType::Copy() const
SwDBSetNumberField::SwDBSetNumberField(SwDBSetNumberFieldType* pTyp,
const SwDBData& rDBData,
- ULONG nFmt)
+ sal_uLong nFmt)
: SwDBNameInfField(pTyp, rDBData, nFmt), nNumber(0)
{}
@@ -983,7 +983,7 @@ String SwDBSetNumberField::Expand() const
if(0 !=(GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE) || nNumber == 0)
return aEmptyStr;
else
- return FormatNumber((USHORT)nNumber, GetFormat());
+ return FormatNumber((sal_uInt16)nNumber, GetFormat());
//return(nNumber == 0 ? aEmptyStr : FormatNumber(nNumber, GetFormat()));
}
@@ -1015,9 +1015,9 @@ SwField* SwDBSetNumberField::Copy() const
/*-----------------06.03.98 16:15-------------------
--------------------------------------------------*/
-BOOL SwDBSetNumberField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDBSetNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_USHORT1:
@@ -1034,16 +1034,16 @@ BOOL SwDBSetNumberField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------06.03.98 16:15-------------------
--------------------------------------------------*/
-BOOL SwDBSetNumberField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDBSetNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_USHORT1:
{
sal_Int16 nSet = 0;
rAny >>= nSet;
- if(nSet < (INT16) SVX_NUMBER_NONE )
+ if(nSet < (sal_Int16) SVX_NUMBER_NONE )
SetFormat(nSet);
else {
//exception(wrong_value)
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index c9811352b062..643efc626eb7 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -58,7 +58,7 @@ class SwIntrnlRefLink : public SwBaseLink
{
SwDDEFieldType& rFldType;
public:
- SwIntrnlRefLink( SwDDEFieldType& rType, USHORT nUpdateType, USHORT nFmt )
+ SwIntrnlRefLink( SwDDEFieldType& rType, sal_uInt16 nUpdateType, sal_uInt16 nFmt )
: SwBaseLink( nUpdateType, nFmt ),
rFldType( rType )
{}
@@ -68,7 +68,7 @@ public:
const uno::Any & rValue );
virtual const SwNode* GetAnchor() const;
- virtual BOOL IsInRange( ULONG nSttNd, ULONG nEndNd, xub_StrLen nStt = 0,
+ virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, xub_StrLen nStt = 0,
xub_StrLen nEnd = STRING_NOTFOUND ) const;
};
@@ -95,7 +95,7 @@ void SwIntrnlRefLink::DataChanged( const String& rMimeType,
if( n && 0x0d == sStr.GetChar( n-1 ) )
--n;
- BOOL bDel = n != sStr.Len();
+ sal_Bool bDel = n != sStr.Len();
if( bDel )
sStr.Erase( n );
@@ -121,7 +121,7 @@ void SwIntrnlRefLink::DataChanged( const String& rMimeType,
// dann suchen wir uns mal alle Felder. Wird kein gueltiges
// gefunden, dann Disconnecten wir uns!
SwMsgPoolItem aUpdateDDE( RES_UPDATEDDETBL );
- int bCallModify = FALSE;
+ int bCallModify = sal_False;
rFldType.LockModify();
SwClientIter aIter( rFldType );
@@ -140,7 +140,7 @@ void SwIntrnlRefLink::DataChanged( const String& rMimeType,
pSh->StartAction();
}
pLast->Modify( 0, &aUpdateDDE );
- bCallModify = TRUE;
+ bCallModify = sal_True;
}
} while( 0 != ( pLast = aIter++ ));
@@ -208,7 +208,7 @@ const SwNode* SwIntrnlRefLink::GetAnchor() const
return pNd;
}
-BOOL SwIntrnlRefLink::IsInRange( ULONG nSttNd, ULONG nEndNd,
+sal_Bool SwIntrnlRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd,
xub_StrLen nStt, xub_StrLen nEnd ) const
{
// hier sollte irgend ein Anchor aus dem normalen Nodes-Array reichen
@@ -227,7 +227,7 @@ BOOL SwIntrnlRefLink::IsInRange( ULONG nSttNd, ULONG nEndNd,
if( pTblNd->GetNodes().IsDocNodes() &&
nSttNd < pTblNd->EndOfSectionIndex() &&
nEndNd > pTblNd->GetIndex() )
- return TRUE;
+ return sal_True;
}
else if( ((SwFmtFld*)pLast)->GetTxtFld() )
{
@@ -235,24 +235,24 @@ BOOL SwIntrnlRefLink::IsInRange( ULONG nSttNd, ULONG nEndNd,
const SwTxtNode* pNd = pTFld->GetpTxtNode();
if( pNd && pNds == &pNd->GetNodes() )
{
- ULONG nNdPos = pNd->GetIndex();
+ sal_uLong nNdPos = pNd->GetIndex();
if( nSttNd <= nNdPos && nNdPos <= nEndNd &&
( nNdPos != nSttNd || *pTFld->GetStart() >= nStt ) &&
( nNdPos != nEndNd || *pTFld->GetStart() < nEnd ))
- return TRUE;
+ return sal_True;
}
}
} while( 0 != ( pLast = aIter++ ));
- return FALSE;
+ return sal_False;
}
SwDDEFieldType::SwDDEFieldType(const String& rName,
- const String& rCmd, USHORT nUpdateType )
+ const String& rCmd, sal_uInt16 nUpdateType )
: SwFieldType( RES_DDEFLD ),
aName( rName ), pDoc( 0 ), nRefCnt( 0 )
{
- bCRLFFlag = bDeleted = FALSE;
+ bCRLFFlag = bDeleted = sal_False;
refLink = new SwIntrnlRefLink( *this, nUpdateType, FORMAT_STRING );
SetCmd( rCmd );
}
@@ -331,9 +331,9 @@ void SwDDEFieldType::_RefCntChgd()
/* -----------------------------28.08.00 16:23--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwDDEFieldType::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
+sal_Bool SwDDEFieldType::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
{
- BYTE nPart = 0;
+ sal_uInt8 nPart = 0;
switch( nWhichId )
{
case FIELD_PROP_PAR2: nPart = 3; break;
@@ -341,7 +341,7 @@ BOOL SwDDEFieldType::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
case FIELD_PROP_SUBTYPE: nPart = 1; break;
case FIELD_PROP_BOOL1:
{
- sal_Bool bSet = GetType() == sfx2::LINKUPDATE_ALWAYS ? TRUE : FALSE;
+ sal_Bool bSet = GetType() == sfx2::LINKUPDATE_ALWAYS ? sal_True : sal_False;
rVal.setValue(&bSet, ::getBooleanCppuType());
}
break;
@@ -353,21 +353,21 @@ BOOL SwDDEFieldType::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
}
if( nPart )
rVal <<= OUString(GetCmd().GetToken(nPart-1, sfx2::cTokenSeperator));
- return TRUE;
+ return sal_True;
}
/* -----------------------------28.08.00 16:23--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwDDEFieldType::PutValue( const uno::Any& rVal, USHORT nWhichId )
+sal_Bool SwDDEFieldType::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
{
- BYTE nPart = 0;
+ sal_uInt8 nPart = 0;
switch( nWhichId )
{
case FIELD_PROP_PAR2: nPart = 3; break;
case FIELD_PROP_PAR4: nPart = 2; break;
case FIELD_PROP_SUBTYPE: nPart = 1; break;
case FIELD_PROP_BOOL1:
- SetType( static_cast<USHORT>(*(sal_Bool*)rVal.getValue() ?
+ SetType( static_cast<sal_uInt16>(*(sal_Bool*)rVal.getValue() ?
sfx2::LINKUPDATE_ALWAYS :
sfx2::LINKUPDATE_ONCALL ) );
break;
@@ -389,7 +389,7 @@ BOOL SwDDEFieldType::PutValue( const uno::Any& rVal, USHORT nWhichId )
sCmd.SetToken( nPart-1, sfx2::cTokenSeperator, ::GetString( rVal, sTmp ) );
SetCmd( sCmd );
}
- return TRUE;
+ return sal_True;
}
/* ---------------------------------------------------------------------------
diff --git a/sw/source/core/fields/ddetbl.cxx b/sw/source/core/fields/ddetbl.cxx
index c10a8b18c5cb..05d8f4ff50a3 100644
--- a/sw/source/core/fields/ddetbl.cxx
+++ b/sw/source/core/fields/ddetbl.cxx
@@ -46,13 +46,13 @@ TYPEINIT1( SwDDETable, SwTable );
// Constructor movet alle Lines/Boxen aus der SwTable zu sich.
// Die SwTable ist danach Leer und muss geloescht werden.
SwDDETable::SwDDETable( SwTable& rTable, SwDDEFieldType* pDDEType,
- BOOL bUpdate )
+ sal_Bool bUpdate )
: SwTable( rTable ), aDepend( this, pDDEType )
{
// Kopiere/move die Daten der Tabelle
aSortCntBoxes.Insert( &rTable.GetTabSortBoxes(), 0,
rTable.GetTabSortBoxes().Count() ); // move die Inh. Boxen
- rTable.GetTabSortBoxes().Remove( (USHORT)0, rTable.GetTabSortBoxes().Count() );
+ rTable.GetTabSortBoxes().Remove( (sal_uInt16)0, rTable.GetTabSortBoxes().Count() );
aLines.Insert( &rTable.GetTabLines(),0 ); // move die Lines
rTable.GetTabLines().Remove( 0, rTable.GetTabLines().Count() );
@@ -116,11 +116,11 @@ void SwDDETable::ChangeContent()
String aExpand = pDDEType->GetExpansion();
aExpand.EraseAllChars( '\r' );
- for( USHORT n = 0; n < aLines.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aLines.Count(); ++n )
{
String aLine = aExpand.GetToken( n, '\n' );
SwTableLine* pLine = aLines[ n ];
- for( USHORT i = 0; i < pLine->GetTabBoxes().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pLine->GetTabBoxes().Count(); ++i )
{
SwTableBox* pBox = pLine->GetTabBoxes()[ i ];
ASSERT( pBox->GetSttIdx(), "keine InhaltsBox" );
@@ -149,7 +149,7 @@ SwDDEFieldType* SwDDETable::GetDDEFldType()
return (SwDDEFieldType*)aDepend.GetRegisteredIn();
}
-BOOL SwDDETable::NoDDETable()
+sal_Bool SwDDETable::NoDDETable()
{
// suche den TabellenNode
ASSERT( GetFrmFmt(), "Kein FrameFormat" );
@@ -157,11 +157,11 @@ BOOL SwDDETable::NoDDETable()
// Stehen wir im richtigen NodesArray (Wegen UNDO)
if( !aLines.Count() )
- return FALSE;
+ return sal_False;
ASSERT( GetTabSortBoxes().Count(), "Tabelle ohne Inhalt?" );
SwNode* pNd = (SwNode*)GetTabSortBoxes()[0]->GetSttNd();
if( !pNd->GetNodes().IsDocNodes() )
- return FALSE;
+ return sal_False;
SwTableNode* pTblNd = pNd->FindTableNode();
ASSERT( pTblNd, "wo steht denn die Tabelle ?");
@@ -171,7 +171,7 @@ BOOL SwDDETable::NoDDETable()
// Kopiere/move die Daten der Tabelle
pNewTbl->GetTabSortBoxes().Insert( &GetTabSortBoxes(), 0,
GetTabSortBoxes().Count() ); // move die Inh. Boxen
- GetTabSortBoxes().Remove( (USHORT)0, GetTabSortBoxes().Count() );
+ GetTabSortBoxes().Remove( (sal_uInt16)0, GetTabSortBoxes().Count() );
pNewTbl->GetTabLines().Insert( &GetTabLines(),0 ); // move die Lines
GetTabLines().Remove( 0, GetTabLines().Count() );
@@ -181,7 +181,7 @@ BOOL SwDDETable::NoDDETable()
pTblNd->SetNewTable( pNewTbl ); // setze die Tabelle
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index f6b727987cd3..9f0e252a6421 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -252,7 +252,7 @@ sal_uInt16 SwPageNumberField::GetSubType() const
/*-----------------05.03.98 10:25-------------------
--------------------------------------------------*/
-BOOL SwPageNumberField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwPageNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -285,9 +285,9 @@ BOOL SwPageNumberField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 10:25-------------------
--------------------------------------------------*/
-BOOL SwPageNumberField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwPageNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
sal_Int16 nSet = 0;
switch( nWhichId )
{
@@ -319,7 +319,7 @@ BOOL SwPageNumberField::PutValue( const uno::Any& rAny, USHORT nWhichId )
nSubType = PG_NEXT;
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case FIELD_PROP_PAR1:
@@ -340,7 +340,7 @@ SwAuthorFieldType::SwAuthorFieldType()
{
}
-String SwAuthorFieldType::Expand(ULONG nFmt) const
+String SwAuthorFieldType::Expand(sal_uLong nFmt) const
{
String sRet;
SvtUserOptions& rOpt = SW_MOD()->GetUserOptions();
@@ -386,7 +386,7 @@ SwField* SwAuthorField::Copy() const
/*-----------------05.03.98 11:15-------------------
--------------------------------------------------*/
-BOOL SwAuthorField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwAuthorField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
sal_Bool bVal;
switch( nWhichId )
@@ -413,7 +413,7 @@ BOOL SwAuthorField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 11:15-------------------
--------------------------------------------------*/
-BOOL SwAuthorField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwAuthorField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -448,7 +448,7 @@ SwFileNameFieldType::SwFileNameFieldType(SwDoc *pDocument)
pDoc = pDocument;
}
-String SwFileNameFieldType::Expand(ULONG nFmt) const
+String SwFileNameFieldType::Expand(sal_uLong nFmt) const
{
String aRet;
const SwDocShell* pDShell = pDoc->GetDocShell();
@@ -532,7 +532,7 @@ SwField* SwFileNameField::Copy() const
/*-----------------05.03.98 08:59-------------------
--------------------------------------------------*/
-BOOL SwFileNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwFileNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -558,7 +558,7 @@ BOOL SwFileNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
case FIELD_PROP_BOOL2:
{
- BOOL bVal = IsFixed();
+ sal_Bool bVal = IsFixed();
rAny.setValue(&bVal, ::getBooleanCppuType());
}
break;
@@ -574,7 +574,7 @@ BOOL SwFileNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 09:01-------------------
--------------------------------------------------*/
-BOOL SwFileNameField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwFileNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -585,7 +585,7 @@ BOOL SwFileNameField::PutValue( const uno::Any& rAny, USHORT nWhichId )
// here only a int16
sal_Int32 nType = 0;
rAny >>= nType;
- BOOL bFixed = IsFixed();
+ sal_Bool bFixed = IsFixed();
switch( nType )
{
case text::FilenameDisplayFormat::PATH:
@@ -631,7 +631,7 @@ SwTemplNameFieldType::SwTemplNameFieldType(SwDoc *pDocument)
pDoc = pDocument;
}
-String SwTemplNameFieldType::Expand(ULONG nFmt) const
+String SwTemplNameFieldType::Expand(sal_uLong nFmt) const
{
ASSERT( nFmt < FF_END, "Expand: kein guelt. Fmt!" );
@@ -708,7 +708,7 @@ SwField* SwTemplNameField::Copy() const
/*-----------------05.03.98 08:59-------------------
--------------------------------------------------*/
-BOOL SwTemplNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwTemplNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch ( nWhichId )
{
@@ -736,7 +736,7 @@ BOOL SwTemplNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 09:01-------------------
--------------------------------------------------*/
-BOOL SwTemplNameField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwTemplNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch ( nWhichId )
{
@@ -863,7 +863,7 @@ void SwDocStatField::ChangeExpansion( const SwFrm* pFrm )
/*-----------------05.03.98 11:38-------------------
--------------------------------------------------*/
-BOOL SwDocStatField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDocStatField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch ( nWhichId )
{
@@ -878,9 +878,9 @@ BOOL SwDocStatField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 11:38-------------------
--------------------------------------------------*/
-BOOL SwDocStatField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDocStatField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch ( nWhichId )
{
case FIELD_PROP_USHORT2:
@@ -892,7 +892,7 @@ BOOL SwDocStatField::PutValue( const uno::Any& rAny, USHORT nWhichId )
nSet != SVX_NUM_BITMAP)
{
SetFormat(nSet);
- bRet = TRUE;
+ bRet = sal_True;
}
}
break;
@@ -921,7 +921,7 @@ SwFieldType* SwDocInfoFieldType::Copy() const
return pTyp;
}
-void lcl_GetLocalDataWrapper( ULONG nLang,
+void lcl_GetLocalDataWrapper( sal_uLong nLang,
const LocaleDataWrapper **ppAppLocalData,
const LocaleDataWrapper **ppLocalData )
{
@@ -1261,7 +1261,7 @@ void SwDocInfoField::SetLanguage(sal_uInt16 nLng)
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-BOOL SwDocInfoField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwDocInfoField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1311,7 +1311,7 @@ BOOL SwDocInfoField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-BOOL SwDocInfoField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwDocInfoField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
sal_Int32 nValue = 0;
switch( nWhichId )
@@ -1606,7 +1606,7 @@ sal_uInt16 SwHiddenTxtField::GetSubType() const
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-BOOL SwHiddenTxtField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwHiddenTxtField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
const String* pOut = 0;
switch( nWhichId )
@@ -1639,7 +1639,7 @@ BOOL SwHiddenTxtField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-BOOL SwHiddenTxtField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwHiddenTxtField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -1660,7 +1660,7 @@ BOOL SwHiddenTxtField::PutValue( const uno::Any& rAny, USHORT nWhichId )
break;
case FIELD_PROP_PAR4:
::GetString( rAny, aContent);
- bValid = TRUE;
+ bValid = sal_True;
break;
default:
DBG_ERROR("illegal property");
@@ -1746,7 +1746,7 @@ SwField* SwHiddenParaField::Copy() const
/*-----------------05.03.98 13:25-------------------
--------------------------------------------------*/
-BOOL SwHiddenParaField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwHiddenParaField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch ( nWhichId )
{
@@ -1768,7 +1768,7 @@ BOOL SwHiddenParaField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 13:25-------------------
--------------------------------------------------*/
-BOOL SwHiddenParaField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwHiddenParaField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch ( nWhichId )
{
@@ -1911,7 +1911,7 @@ sal_uInt32 SwPostItField::GetNumberOfParagraphs() const
/*-----------------05.03.98 13:42-------------------
--------------------------------------------------*/
-BOOL SwPostItField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1975,7 +1975,7 @@ BOOL SwPostItField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 13:42-------------------
--------------------------------------------------*/
-BOOL SwPostItField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwPostItField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2006,7 +2006,7 @@ BOOL SwPostItField::PutValue( const uno::Any& rAny, USHORT nWhichId )
{
util::DateTime aDateTimeValue;
if(!(rAny >>= aDateTimeValue))
- return FALSE;
+ return sal_False;
aDateTime.Set100Sec(aDateTimeValue.HundredthSeconds);
aDateTime.SetSec(aDateTimeValue.Seconds);
aDateTime.SetMin(aDateTimeValue.Minutes);
@@ -2119,7 +2119,7 @@ void SwExtUserField::SetSubType(sal_uInt16 nSub)
/*-----------------05.03.98 14:14-------------------
--------------------------------------------------*/
-BOOL SwExtUserField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwExtUserField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2147,7 +2147,7 @@ BOOL SwExtUserField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 14:14-------------------
--------------------------------------------------*/
-BOOL SwExtUserField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwExtUserField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2239,7 +2239,7 @@ void SwRefPageSetField::SetPar2(const String& rStr)
/*-----------------05.03.98 14:52-------------------
--------------------------------------------------*/
-BOOL SwRefPageSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwRefPageSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2257,7 +2257,7 @@ BOOL SwRefPageSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 14:52-------------------
--------------------------------------------------*/
-BOOL SwRefPageSetField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwRefPageSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2510,7 +2510,7 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm,
/*-----------------05.03.98 14:52-------------------
--------------------------------------------------*/
-BOOL SwRefPageGetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwRefPageGetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2528,7 +2528,7 @@ BOOL SwRefPageGetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 14:52-------------------
--------------------------------------------------*/
-BOOL SwRefPageGetField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwRefPageGetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2646,7 +2646,7 @@ void SwJumpEditField::SetPar2(const String& rStr)
/*-----------------05.03.98 15:00-------------------
--------------------------------------------------*/
-BOOL SwJumpEditField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwJumpEditField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2680,7 +2680,7 @@ BOOL SwJumpEditField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------05.03.98 15:00-------------------
--------------------------------------------------*/
-BOOL SwJumpEditField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwJumpEditField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2758,8 +2758,8 @@ void SwCombinedCharField::SetPar1(const String& rStr)
sCharacters = rStr.Copy( 0, MAX_COMBINED_CHARACTERS );
}
-BOOL SwCombinedCharField::QueryValue( uno::Any& rAny,
- USHORT nWhichId ) const
+sal_Bool SwCombinedCharField::QueryValue( uno::Any& rAny,
+ sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2772,8 +2772,8 @@ BOOL SwCombinedCharField::QueryValue( uno::Any& rAny,
return sal_True;
}
-BOOL SwCombinedCharField::PutValue( const uno::Any& rAny,
- USHORT nWhichId )
+sal_Bool SwCombinedCharField::PutValue( const uno::Any& rAny,
+ sal_uInt16 nWhichId )
{
switch( nWhichId )
{
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index e55c8598cf90..190d894d66f2 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -71,7 +71,7 @@ using ::rtl::OUString;
SV_IMPL_PTRARR( _SwSeqFldList, _SeqFldLstElem* )
//-----------------------------------------------------------------------------
-sal_Int16 lcl_SubTypeToAPI(USHORT nSubType)
+sal_Int16 lcl_SubTypeToAPI(sal_uInt16 nSubType)
{
sal_Int16 nRet = 0;
switch(nSubType)
@@ -104,7 +104,7 @@ sal_Int32 lcl_APIToSubType(const uno::Any& rAny)
//-----------------------------------------------------------------------------
-void ReplacePoint( String& rTmpName, BOOL bWithCommandType )
+void ReplacePoint( String& rTmpName, sal_Bool bWithCommandType )
{
// replace first and last (if bWithCommandType: last two) dot Ersten und letzten Punkt ersetzen, da in Tabellennamen Punkte erlaubt sind
// since table names may contain dots
@@ -248,7 +248,7 @@ const SwTxtNode* GetBodyTxtNode( const SwDoc& rDoc, SwPosition& rPos,
{
Point aPt( pLayout->Frm().Pos() );
aPt.Y()++; // aus dem Header raus
- pCntFrm = pPgFrm->GetCntntPos( aPt, FALSE, TRUE, FALSE );
+ pCntFrm = pPgFrm->GetCntntPos( aPt, sal_False, sal_True, sal_False );
pTxtNode = GetFirstTxtNode( rDoc, rPos, pCntFrm, aPt );
}
}
@@ -288,9 +288,9 @@ void SwGetExpFieldType::Modify( SfxPoolItem*, SfxPoolItem* pNew )
--------------------------------------------------------------------*/
SwGetExpField::SwGetExpField(SwGetExpFieldType* pTyp, const String& rFormel,
- USHORT nSub, ULONG nFmt)
+ sal_uInt16 nSub, sal_uLong nFmt)
: SwFormulaField( pTyp, nFmt, 0.0 ),
- bIsInBodyTxt( TRUE ),
+ bIsInBodyTxt( sal_True ),
nSubType(nSub),
bLateInitialization( false )
{
@@ -308,7 +308,7 @@ String SwGetExpField::Expand() const
String SwGetExpField::GetFieldName() const
{
String aStr( SwFieldType::GetTypeStr(
- static_cast<USHORT>(((nsSwGetSetExpType::GSE_FORMULA & nSubType) != 0)
+ static_cast<sal_uInt16>(((nsSwGetSetExpType::GSE_FORMULA & nSubType) != 0)
? TYP_FORMELFLD
: TYP_GETFLD ) ));
aStr += ' ';
@@ -369,7 +369,7 @@ void SwGetExpField::ChangeExpansion( const SwFrm& rFrm, const SwTxtFld& rFld )
if(GetSubType() & nsSwGetSetExpType::GSE_STRING)
{
SwHash** ppHashTbl;
- USHORT nSize;
+ sal_uInt16 nSize;
rDoc.FldsToExpand( ppHashTbl, nSize, aEndFld );
LookString( ppHashTbl, nSize, GetFormula(), sExpand );
::DeleteHashTable( ppHashTbl, nSize ); // HashTabelle loeschen
@@ -399,17 +399,17 @@ void SwGetExpField::SetPar2(const String& rStr)
SetFormula(rStr);
}
-USHORT SwGetExpField::GetSubType() const
+sal_uInt16 SwGetExpField::GetSubType() const
{
return nSubType;
}
-void SwGetExpField::SetSubType(USHORT nType)
+void SwGetExpField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
-void SwGetExpField::SetLanguage(USHORT nLng)
+void SwGetExpField::SetLanguage(sal_uInt16 nLng)
{
if (nSubType & nsSwExtendedSubType::SUB_CMD)
SwField::SetLanguage(nLng);
@@ -420,7 +420,7 @@ void SwGetExpField::SetLanguage(USHORT nLng)
/*-----------------07.03.98 16:08-------------------
--------------------------------------------------*/
-BOOL SwGetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwGetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -444,7 +444,7 @@ BOOL SwGetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
break;
case FIELD_PROP_BOOL2:
{
- BOOL bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
+ sal_Bool bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -454,12 +454,12 @@ BOOL SwGetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
return SwField::QueryValue(rAny, nWhichId);
}
- return TRUE;
+ return sal_True;
}
/*-----------------07.03.98 16:08-------------------
--------------------------------------------------*/
-BOOL SwGetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
sal_Int32 nTmp = 0;
String sTmp;
@@ -474,7 +474,7 @@ BOOL SwGetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
break;
case FIELD_PROP_USHORT1:
rAny >>= nTmp;
- nSubType = static_cast<USHORT>(nTmp);
+ nSubType = static_cast<sal_uInt16>(nTmp);
break;
case FIELD_PROP_PAR1:
SetFormula( ::GetString( rAny, sTmp ));
@@ -482,7 +482,7 @@ BOOL SwGetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
case FIELD_PROP_SUBTYPE:
nTmp = lcl_APIToSubType(rAny);
if( nTmp >=0 )
- SetSubType( static_cast<USHORT>((GetSubType() & 0xff00) | nTmp));
+ SetSubType( static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp));
break;
case FIELD_PROP_BOOL2:
if(*(sal_Bool*) rAny.getValue())
@@ -496,23 +496,23 @@ BOOL SwGetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
return SwField::PutValue(rAny, nWhichId);
}
- return TRUE;
+ return sal_True;
}
/*-----------------JP: 17.06.93 -------------------
Set-Expression-Type
--------------------------------------------------*/
-SwSetExpFieldType::SwSetExpFieldType( SwDoc* pDc, const String& rName, USHORT nTyp )
+SwSetExpFieldType::SwSetExpFieldType( SwDoc* pDc, const String& rName, sal_uInt16 nTyp )
: SwValueFieldType( pDc, RES_SETEXPFLD ),
sName( rName ),
pOutlChgNd( 0 ),
sDelim( String::CreateFromAscii( "." ) ),
nType(nTyp), nLevel( UCHAR_MAX ),
- bDeleted( FALSE )
+ bDeleted( sal_False )
{
if( ( nsSwGetSetExpType::GSE_SEQ | nsSwGetSetExpType::GSE_STRING ) & nType )
- EnableFormat(FALSE); // Numberformatter nicht einsetzen
+ EnableFormat(sal_False); // Numberformatter nicht einsetzen
}
SwFieldType* SwSetExpFieldType::Copy() const
@@ -535,7 +535,7 @@ void SwSetExpFieldType::Modify( SfxPoolItem*, SfxPoolItem* )
return; // nicht weiter expandieren
}
-void SwSetExpFieldType::SetSeqFormat(ULONG nFmt)
+void SwSetExpFieldType::SetSeqFormat(sal_uLong nFmt)
{
SwClientIter aIter(*this);
for( SwFmtFld* pFld = (SwFmtFld*)aIter.First( TYPE(SwFmtFld) );
@@ -543,7 +543,7 @@ void SwSetExpFieldType::SetSeqFormat(ULONG nFmt)
pFld->GetFld()->ChangeFormat( nFmt );
}
-ULONG SwSetExpFieldType::GetSeqFormat()
+sal_uLong SwSetExpFieldType::GetSeqFormat()
{
if( !GetDepends() )
return SVX_NUM_ARABIC;
@@ -552,15 +552,15 @@ ULONG SwSetExpFieldType::GetSeqFormat()
return pFld->GetFormat();
}
-USHORT SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rFld )
+sal_uInt16 SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rFld )
{
if( !GetDepends() || !(nsSwGetSetExpType::GSE_SEQ & nType) )
return USHRT_MAX;
-extern void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
+extern void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
SvUShorts aArr( 64 );
- USHORT n;
+ sal_uInt16 n;
// dann testmal, ob die Nummer schon vergeben ist oder ob eine neue
// bestimmt werden muss.
@@ -575,7 +575,7 @@ extern void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
// teste erstmal ob die Nummer schon vorhanden ist:
- USHORT nNum = rFld.GetSeqNumber();
+ sal_uInt16 nNum = rFld.GetSeqNumber();
if( USHRT_MAX != nNum )
{
for( n = 0; n < aArr.Count(); ++n )
@@ -597,7 +597,7 @@ extern void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
return n;
}
-USHORT SwSetExpFieldType::GetSeqFldList( SwSeqFldList& rList )
+sal_uInt16 SwSetExpFieldType::GetSeqFldList( SwSeqFldList& rList )
{
if( rList.Count() )
rList.Remove( 0, rList.Count() );
@@ -635,7 +635,7 @@ void SwSetExpFieldType::SetChapter( SwSetExpField& rFld, const SwNode& rNd )
const SwNodeNum & aNum = *(pTxtNd->GetNum());
// nur die Nummer besorgen, ohne Pre-/Post-fixstrings
- String sNumber( pRule->MakeNumString(aNum, FALSE ));
+ String sNumber( pRule->MakeNumString(aNum, sal_False ));
if( sNumber.Len() )
rFld.ChgExpStr( ( sNumber += sDelim ) += rFld.GetExpStr() );
@@ -652,7 +652,7 @@ void SwSetExpFieldType::SetChapter( SwSetExpField& rFld, const SwNode& rNd )
/* -----------------24.03.99 09:44-------------------
*
* --------------------------------------------------*/
-BOOL SwSetExpFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -674,10 +674,10 @@ BOOL SwSetExpFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
-BOOL SwSetExpFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -685,7 +685,7 @@ BOOL SwSetExpFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
{
sal_Int32 nSet = lcl_APIToSubType(rAny);
if(nSet >=0)
- SetType(static_cast<USHORT>(nSet));
+ SetType(static_cast<sal_uInt16>(nSet));
}
break;
case FIELD_PROP_PAR2:
@@ -711,10 +711,10 @@ BOOL SwSetExpFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
-BOOL SwSeqFldList::InsertSort( _SeqFldLstElem* pNew )
+sal_Bool SwSeqFldList::InsertSort( _SeqFldLstElem* pNew )
{
sal_Unicode* p = pNew->sDlgEntry.GetBufferAccess();
while( *p )
@@ -724,16 +724,16 @@ BOOL SwSeqFldList::InsertSort( _SeqFldLstElem* pNew )
++p;
}
- USHORT nPos;
- BOOL bRet = SeekEntry( *pNew, &nPos );
+ sal_uInt16 nPos;
+ sal_Bool bRet = SeekEntry( *pNew, &nPos );
if( !bRet )
C40_INSERT( _SeqFldLstElem, pNew, nPos );
return bRet;
}
-BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
+sal_Bool SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, sal_uInt16* pP )
{
- USHORT nO = Count(), nM, nU = 0;
+ sal_uInt16 nO = Count(), nM, nU = 0;
if( nO > 0 )
{
CollatorWrapper & rCaseColl = ::GetAppCaseCollator(),
@@ -745,7 +745,7 @@ BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
const String& rTmp2 = rNew.sDlgEntry;
xub_StrLen nFndPos2 = 0;
String sNum2( rTmp2.GetToken( 0, ' ', nFndPos2 ));
- BOOL bIsNum2IsNumeric = rCC.isAsciiNumeric( sNum2 );
+ sal_Bool bIsNum2IsNumeric = rCC.isAsciiNumeric( sNum2 );
sal_Int32 nNum2 = bIsNum2IsNumeric ? sNum2.ToInt32() : 0;
nO--;
@@ -774,7 +774,7 @@ BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
if( 0 == nCmp )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( 0 < nCmp )
nU = nM + 1;
@@ -785,7 +785,7 @@ BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -793,13 +793,13 @@ BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
--------------------------------------------------------------------*/
SwSetExpField::SwSetExpField(SwSetExpFieldType* pTyp, const String& rFormel,
- ULONG nFmt)
+ sal_uLong nFmt)
: SwFormulaField( pTyp, nFmt, 0.0 ), nSeqNo( USHRT_MAX ),
nSubType(0)
{
SetFormula(rFormel);
// SubType ignorieren !!!
- bInput = FALSE;
+ bInput = sal_False;
if( IsSequenceFld() )
{
SwValueField::SetValue(1.0);
@@ -842,7 +842,7 @@ String SwSetExpField::GetFieldName() const
? TYP_SETINPFLD
: TYP_SETFLD );
- String aStr( SwFieldType::GetTypeStr( static_cast<USHORT>(nStrType) ) );
+ String aStr( SwFieldType::GetTypeStr( static_cast<sal_uInt16>(nStrType) ) );
aStr += ' ';
aStr += GetTyp()->GetName();
@@ -871,7 +871,7 @@ SwField* SwSetExpField::Copy() const
return pTmp;
}
-void SwSetExpField::SetSubType(USHORT nSub)
+void SwSetExpField::SetSubType(sal_uInt16 nSub)
{
((SwSetExpFieldType*)GetTyp())->SetType(nSub & 0xff);
nSubType = nSub & 0xff00;
@@ -879,7 +879,7 @@ void SwSetExpField::SetSubType(USHORT nSub)
DBG_ASSERT( (nSub & 0xff) != 3, "SubType ist illegal!" );
}
-USHORT SwSetExpField::GetSubType() const
+sal_uInt16 SwSetExpField::GetSubType() const
{
return ((SwSetExpFieldType*)GetTyp())->GetType() | nSubType;
}
@@ -889,7 +889,7 @@ void SwSetExpField::SetValue( const double& rAny )
SwValueField::SetValue(rAny);
if( IsSequenceFld() )
- sExpand = FormatNumber( (USHORT)GetValue(), GetFormat() );
+ sExpand = FormatNumber( (sal_uInt16)GetValue(), GetFormat() );
else
sExpand = ((SwValueFieldType*)GetTyp())->ExpandValue( rAny,
GetFormat(), GetLanguage());
@@ -917,9 +917,9 @@ xub_StrLen SwGetExpField::GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc
if(sNodeText.Len())
{
//now check if sNodeText starts with a non-alphanumeric character plus a blank
- USHORT nSrcpt = pBreakIt->GetRealScriptOfText( sNodeText, 0 );
+ sal_uInt16 nSrcpt = pBreakIt->GetRealScriptOfText( sNodeText, 0 );
- static USHORT nIds[] =
+ static sal_uInt16 nIds[] =
{
RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
RES_CHRATR_FONT, RES_CHRATR_FONT,
@@ -939,7 +939,7 @@ xub_StrLen SwGetExpField::GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc
GetWhichOfScript( RES_CHRATR_LANGUAGE, nSrcpt )) ).GetLanguage();
CharClass aCC( SvxCreateLocale( eLang ));
sal_Unicode c0 = sNodeText.GetChar(0);
- BOOL bIsAlphaNum = aCC.isAlphaNumeric( sNodeText, 0 );
+ sal_Bool bIsAlphaNum = aCC.isAlphaNumeric( sNodeText, 0 );
if( !bIsAlphaNum ||
(c0 == ' ' || c0 == '\t'))
{
@@ -966,7 +966,7 @@ const String& SwSetExpField::GetPar1() const
String SwSetExpField::GetPar2() const
{
- USHORT nType = ((SwSetExpFieldType*)GetTyp())->GetType();
+ sal_uInt16 nType = ((SwSetExpFieldType*)GetTyp())->GetType();
if (nType & nsSwGetSetExpType::GSE_STRING)
return GetFormula();
@@ -975,7 +975,7 @@ String SwSetExpField::GetPar2() const
void SwSetExpField::SetPar2(const String& rStr)
{
- USHORT nType = ((SwSetExpFieldType*)GetTyp())->GetType();
+ sal_uInt16 nType = ((SwSetExpFieldType*)GetTyp())->GetType();
if( !(nType & nsSwGetSetExpType::GSE_SEQ) || rStr.Len() )
{
@@ -1006,7 +1006,7 @@ SwFieldType* SwInputFieldType::Copy() const
--------------------------------------------------------------------*/
SwInputField::SwInputField(SwInputFieldType* pTyp, const String& rContent,
- const String& rPrompt, USHORT nSub, ULONG nFmt) :
+ const String& rPrompt, sal_uInt16 nSub, sal_uLong nFmt) :
SwField(pTyp, nFmt), aContent(rContent), aPText(rPrompt), nSubType(nSub)
{
}
@@ -1055,7 +1055,7 @@ String SwInputField::Expand() const
/*-----------------06.03.98 11:12-------------------
--------------------------------------------------*/
-BOOL SwInputField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1074,12 +1074,12 @@ BOOL SwInputField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*-----------------06.03.98 11:12-------------------
--------------------------------------------------*/
-BOOL SwInputField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -1098,7 +1098,7 @@ BOOL SwInputField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
Beschreibung: Bedingung setzen
@@ -1148,24 +1148,24 @@ String SwInputField::GetToolTip() const
return aToolTip;
}
-BOOL SwInputField::isFormField() const
+sal_Bool SwInputField::isFormField() const
{
return aHelp.Len() > 0 || aToolTip.Len() > 0;
}
-USHORT SwInputField::GetSubType() const
+sal_uInt16 SwInputField::GetSubType() const
{
return nSubType;
}
-void SwInputField::SetSubType(USHORT nSub)
+void SwInputField::SetSubType(sal_uInt16 nSub)
{
nSubType = nSub;
}
/*-----------------05.03.98 17:22-------------------
--------------------------------------------------*/
-BOOL SwSetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1192,7 +1192,7 @@ BOOL SwSetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
//I18N - if the formula contains only "TypeName+1"
//and it's one of the initially created sequence fields
//then the localized names has to be replaced by a programmatic name
- OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), TRUE);
+ OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), sal_True);
rAny <<= OUString( sMyFormula );
}
break;
@@ -1211,13 +1211,13 @@ BOOL SwSetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
break;
case FIELD_PROP_BOOL3:
{
- BOOL bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
+ sal_Bool bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
case FIELD_PROP_BOOL1:
{
- BOOL bTmp = GetInputFlag();
+ sal_Bool bTmp = GetInputFlag();
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -1227,12 +1227,12 @@ BOOL SwSetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
return SwField::QueryValue(rAny, nWhichId);
}
- return TRUE;
+ return sal_True;
}
/*-----------------05.03.98 17:22-------------------
--------------------------------------------------*/
-BOOL SwSetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
sal_Int32 nTmp32 = 0;
sal_Int16 nTmp16 = 0;
@@ -1275,7 +1275,7 @@ BOOL SwSetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
//I18N - if the formula contains only "TypeName+1"
//and it's one of the initially created sequence fields
//then the localized names has to be replaced by a programmatic name
- OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, uTmp, FALSE);
+ OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, uTmp, sal_False);
SetFormula( sMyFormula );
}
break;
@@ -1289,7 +1289,7 @@ BOOL SwSetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
case FIELD_PROP_SUBTYPE:
nTmp32 = lcl_APIToSubType(rAny);
if(nTmp32 >= 0)
- SetSubType(static_cast<USHORT>((GetSubType() & 0xff00) | nTmp32));
+ SetSubType(static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp32));
break;
case FIELD_PROP_PAR3:
::GetString( rAny, aPText );
@@ -1309,7 +1309,7 @@ BOOL SwSetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
return SwField::PutValue(rAny, nWhichId);
}
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index 6ffe675c760a..47c6a0e4be12 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -57,7 +57,7 @@
using namespace ::com::sun::star;
using namespace nsSwDocInfoSubType;
-USHORT lcl_GetLanguageOfFormat( USHORT nLng, ULONG nFmt,
+sal_uInt16 lcl_GetLanguageOfFormat( sal_uInt16 nLng, sal_uLong nFmt,
const SvNumberFormatter& rFormatter )
{
if( nLng == LANGUAGE_NONE ) // wegen Bug #60010
@@ -85,7 +85,7 @@ SvStringsDtor* SwFieldType::pFldNames = 0;
DBG_NAME(SwFieldType)
- USHORT __FAR_DATA aTypeTab[] = {
+ sal_uInt16 __FAR_DATA aTypeTab[] = {
/* RES_DBFLD */ TYP_DBFLD,
/* RES_USERFLD */ TYP_USERFLD,
/* RES_FILENAMEFLD */ TYP_FILENAMEFLD,
@@ -131,7 +131,7 @@ DBG_NAME(SwFieldType)
-const String& SwFieldType::GetTypeStr(USHORT nTypeId)
+const String& SwFieldType::GetTypeStr(sal_uInt16 nTypeId)
{
if( !pFldNames )
_GetFldName();
@@ -148,7 +148,7 @@ const String& SwFieldType::GetTypeStr(USHORT nTypeId)
jedes Dokument einmalig ist.
--------------------------------------------------*/
-SwFieldType::SwFieldType( USHORT nWhichId )
+SwFieldType::SwFieldType( sal_uInt16 nWhichId )
: SwModify(0),
nWhich( nWhichId )
{
@@ -169,13 +169,13 @@ const String& SwFieldType::GetName() const
return aEmptyStr;
}
-BOOL SwFieldType::QueryValue( uno::Any&, USHORT ) const
+sal_Bool SwFieldType::QueryValue( uno::Any&, sal_uInt16 ) const
{
- return FALSE;
+ return sal_False;
}
-BOOL SwFieldType::PutValue( const uno::Any& , USHORT )
+sal_Bool SwFieldType::PutValue( const uno::Any& , sal_uInt16 )
{
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -184,9 +184,9 @@ BOOL SwFieldType::PutValue( const uno::Any& , USHORT )
Felder sind n-mal vorhanden, Feldtypen nur einmal
--------------------------------------------------------------------*/
-SwField::SwField(SwFieldType* pTyp, sal_uInt32 nFmt, USHORT nLng) :
+SwField::SwField(SwFieldType* pTyp, sal_uInt32 nFmt, sal_uInt16 nLng) :
nLang(nLng),
- bIsAutomaticLanguage(TRUE),
+ bIsAutomaticLanguage(sal_True),
nFormat(nFmt)
{
ASSERT( pTyp, "SwField: ungueltiger SwFieldType" );
@@ -202,7 +202,7 @@ SwField::~SwField()
--------------------------------------------------------------------*/
#ifdef DBG_UTIL
-USHORT SwField::Which() const
+sal_uInt16 SwField::Which() const
{
ASSERT(pType, "Kein Typ vorhanden");
return pType->Which();
@@ -213,20 +213,20 @@ USHORT SwField::Which() const
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwField::GetTypeId() const
+sal_uInt16 SwField::GetTypeId() const
{
- USHORT nRet;
+ sal_uInt16 nRet;
switch( pType->Which() )
{
case RES_DATETIMEFLD:
if (GetSubType() & FIXEDFLD)
- nRet = static_cast<USHORT>(GetSubType() & DATEFLD ? TYP_FIXDATEFLD : TYP_FIXTIMEFLD);
+ nRet = static_cast<sal_uInt16>(GetSubType() & DATEFLD ? TYP_FIXDATEFLD : TYP_FIXTIMEFLD);
else
- nRet = static_cast<USHORT>(GetSubType() & DATEFLD ? TYP_DATEFLD : TYP_TIMEFLD);
+ nRet = static_cast<sal_uInt16>(GetSubType() & DATEFLD ? TYP_DATEFLD : TYP_TIMEFLD);
break;
case RES_GETEXPFLD:
- nRet = static_cast<USHORT>(nsSwGetSetExpType::GSE_FORMULA & GetSubType() ? TYP_FORMELFLD : TYP_GETFLD);
+ nRet = static_cast<sal_uInt16>(nsSwGetSetExpType::GSE_FORMULA & GetSubType() ? TYP_FORMELFLD : TYP_GETFLD);
break;
case RES_HIDDENTXTFLD:
@@ -265,10 +265,10 @@ USHORT SwField::GetTypeId() const
String SwField::GetFieldName() const
{
- USHORT nTypeId = GetTypeId();
+ sal_uInt16 nTypeId = GetTypeId();
if (RES_DATETIMEFLD == GetTyp()->Which())
{
- nTypeId = static_cast<USHORT>(
+ nTypeId = static_cast<sal_uInt16>(
((GetSubType() & DATEFLD) != 0) ? TYP_DATEFLD : TYP_TIMEFLD);
}
String sRet = SwFieldType::GetTypeStr( nTypeId );
@@ -305,39 +305,39 @@ void SwField::SetPar1(const String& )
void SwField::SetPar2(const String& )
{}
-USHORT SwField::GetSubType() const
+sal_uInt16 SwField::GetSubType() const
{
// ASSERT(0, "Sorry Not implemented");
return 0;
}
-void SwField::SetSubType(USHORT )
+void SwField::SetSubType(sal_uInt16 )
{
// ASSERT(0, "Sorry Not implemented");
}
-BOOL SwField::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
+sal_Bool SwField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
case FIELD_PROP_BOOL4:
{
- BOOL bFixed = !bIsAutomaticLanguage;
+ sal_Bool bFixed = !bIsAutomaticLanguage;
rVal.setValue(&bFixed, ::getCppuBooleanType());
}
break;
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
-BOOL SwField::PutValue( const uno::Any& rVal, USHORT nWhichId )
+sal_Bool SwField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
case FIELD_PROP_BOOL4:
{
- BOOL bFixed = FALSE;
+ sal_Bool bFixed = sal_False;
if(rVal >>= bFixed)
bIsAutomaticLanguage = !bFixed;
}
@@ -345,7 +345,7 @@ BOOL SwField::PutValue( const uno::Any& rVal, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
@@ -366,9 +366,9 @@ SwFieldType* SwField::ChgTyp( SwFieldType* pNewType )
}
// hat das Feld eine Action auf dem ClickHandler ? (z.B. INetFelder,..)
-BOOL SwField::HasClickHdl() const
+sal_Bool SwField::HasClickHdl() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch( pType->Which() )
{
case RES_INTERNETFLD:
@@ -377,7 +377,7 @@ BOOL SwField::HasClickHdl() const
case RES_MACROFLD:
case RES_INPUTFLD:
case RES_DROPDOWN :
- bRet = TRUE;
+ bRet = sal_True;
break;
case RES_SETEXPFLD:
@@ -387,7 +387,7 @@ BOOL SwField::HasClickHdl() const
return bRet;
}
-void SwField::SetLanguage(USHORT nLng)
+void SwField::SetLanguage(sal_uInt16 nLng)
{
nLang = nLng;
}
@@ -397,14 +397,14 @@ void SwField::ChangeFormat(sal_uInt32 n)
nFormat = n;
}
-BOOL SwField::IsFixed() const
+sal_Bool SwField::IsFixed() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch( pType->Which() )
{
case RES_FIXDATEFLD:
case RES_FIXTIMEFLD:
- bRet = TRUE;
+ bRet = sal_True;
break;
case RES_DATETIMEFLD:
@@ -449,7 +449,7 @@ SwField * SwField::CopyField() const
Beschreibung: Numerierung expandieren
--------------------------------------------------------------------*/
-String FormatNumber(USHORT nNum, sal_uInt32 nFormat)
+String FormatNumber(sal_uInt16 nNum, sal_uInt32 nFormat)
{
if(SVX_NUM_PAGEDESC == nFormat)
return String::CreateFromInt32( nNum );
@@ -465,10 +465,10 @@ String FormatNumber(USHORT nNum, sal_uInt32 nFormat)
Beschreibung: CTOR SwValueFieldType
--------------------------------------------------------------------*/
-SwValueFieldType::SwValueFieldType( SwDoc* pDocPtr, USHORT nWhichId )
+SwValueFieldType::SwValueFieldType( SwDoc* pDocPtr, sal_uInt16 nWhichId )
: SwFieldType(nWhichId),
pDoc(pDocPtr),
- bUseFormat(TRUE)
+ bUseFormat(sal_True)
{
}
@@ -484,7 +484,7 @@ SwValueFieldType::SwValueFieldType( const SwValueFieldType& rTyp )
--------------------------------------------------------------------*/
String SwValueFieldType::ExpandValue( const double& rVal,
- sal_uInt32 nFmt, USHORT nLng) const
+ sal_uInt32 nFmt, sal_uInt16 nLng) const
{
if (rVal >= DBL_MAX) // FehlerString fuer Calculator
return ViewShell::GetShellRes()->aCalc_Error;
@@ -494,7 +494,7 @@ String SwValueFieldType::ExpandValue( const double& rVal,
Color* pCol = 0;
// wegen Bug #60010
- USHORT nFmtLng = ::lcl_GetLanguageOfFormat( nLng, nFmt, *pFormatter );
+ sal_uInt16 nFmtLng = ::lcl_GetLanguageOfFormat( nLng, nFmt, *pFormatter );
if( nFmt < SV_COUNTRY_LANGUAGE_OFFSET && LANGUAGE_SYSTEM != nFmtLng )
{
@@ -553,7 +553,7 @@ void SwValueFieldType::DoubleToString( String &rValue, const double &rVal,
--------------------------------------------------------------------*/
void SwValueFieldType::DoubleToString( String &rValue, const double &rVal,
- USHORT nLng ) const
+ sal_uInt16 nLng ) const
{
SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter();
@@ -571,7 +571,7 @@ void SwValueFieldType::DoubleToString( String &rValue, const double &rVal,
--------------------------------------------------------------------*/
SwValueField::SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt,
- USHORT nLng, const double fVal )
+ sal_uInt16 nLng, const double fVal )
: SwField(pFldType, nFmt, nLng),
fValue(fVal)
{
@@ -616,7 +616,7 @@ SwFieldType* SwValueField::ChgTyp( SwFieldType* pNewType )
sal_uInt32 SwValueField::GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFmt)
{
const SvNumberformat* pEntry = pFormatter->GetEntry(nFmt);
- USHORT nLng = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
+ sal_uInt16 nLng = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
if (pEntry && nLng != pEntry->GetLanguage())
{
@@ -647,7 +647,7 @@ sal_uInt32 SwValueField::GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt
Beschreibung: Sprache im Format anpassen
--------------------------------------------------------------------*/
-void SwValueField::SetLanguage( USHORT nLng )
+void SwValueField::SetLanguage( sal_uInt16 nLng )
{
if( IsAutomaticLanguage() &&
((SwValueFieldType *)GetTyp())->UseFormat() &&
@@ -655,7 +655,7 @@ void SwValueField::SetLanguage( USHORT nLng )
{
// wegen Bug #60010
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
- USHORT nFmtLng = ::lcl_GetLanguageOfFormat( nLng, GetFormat(),
+ sal_uInt16 nFmtLng = ::lcl_GetLanguageOfFormat( nLng, GetFormat(),
*pFormatter );
if( (GetFormat() >= SV_COUNTRY_LANGUAGE_OFFSET ||
@@ -735,7 +735,7 @@ void SwFormulaField::SetFormula(const String& rStr)
{
sFormula = rStr;
- ULONG nFmt(GetFormat());
+ sal_uLong nFmt(GetFormat());
if( nFmt && SAL_MAX_UINT32 != nFmt )
{
diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx
index f932a1110820..253477f118e0 100644
--- a/sw/source/core/fields/flddat.cxx
+++ b/sw/source/core/fields/flddat.cxx
@@ -60,7 +60,7 @@ SwFieldType* SwDateTimeFieldType::Copy() const
Beschreibung: Datum/Zeit-Feld
--------------------------------------------------------------------*/
-SwDateTimeField::SwDateTimeField(SwDateTimeFieldType* pInitType, USHORT nSub, ULONG nFmt, USHORT nLng)
+SwDateTimeField::SwDateTimeField(SwDateTimeFieldType* pInitType, sal_uInt16 nSub, sal_uLong nFmt, sal_uInt16 nLng)
: SwValueField(pInitType, nFmt, nLng, 0.0),
nSubType(nSub),
nOffset(0)
@@ -123,7 +123,7 @@ SwField* SwDateTimeField::Copy() const
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwDateTimeField::GetSubType() const
+sal_uInt16 SwDateTimeField::GetSubType() const
{
return nSubType;
}
@@ -132,7 +132,7 @@ USHORT SwDateTimeField::GetSubType() const
Beschreibung:
--------------------------------------------------------------------*/
-void SwDateTimeField::SetSubType(USHORT nType)
+void SwDateTimeField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
@@ -196,7 +196,7 @@ double SwDateTimeField::GetValue() const
Beschreibung:
--------------------------------------------------------------------*/
-Date SwDateTimeField::GetDate(BOOL bUseOffset) const
+Date SwDateTimeField::GetDate(sal_Bool bUseOffset) const
{
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
Date* pNullDate = pFormatter->GetNullDate();
@@ -215,7 +215,7 @@ Date SwDateTimeField::GetDate(BOOL bUseOffset) const
Beschreibung:
--------------------------------------------------------------------*/
-Time SwDateTimeField::GetTime(BOOL bUseOffset) const
+Time SwDateTimeField::GetTime(sal_Bool bUseOffset) const
{
double fDummy;
double fFract = modf(GetValue(), &fDummy);
@@ -229,19 +229,19 @@ Time SwDateTimeField::GetTime(BOOL bUseOffset) const
/*-----------------04.03.98 11:05-------------------
--------------------------------------------------*/
-BOOL SwDateTimeField::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
+sal_Bool SwDateTimeField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
case FIELD_PROP_BOOL1:
{
- BOOL bTmp = IsFixed();
+ sal_Bool bTmp = IsFixed();
rVal.setValue(&bTmp, ::getCppuBooleanType());
}
break;
case FIELD_PROP_BOOL2:
{
- BOOL bTmp = IsDate();
+ sal_Bool bTmp = IsDate();
rVal.setValue(&bTmp, ::getCppuBooleanType());
}
break;
@@ -269,12 +269,12 @@ BOOL SwDateTimeField::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
default:
return SwField::QueryValue(rVal, nWhichId);
}
- return TRUE;
+ return sal_True;
}
/*-----------------04.03.98 11:05-------------------
--------------------------------------------------*/
-BOOL SwDateTimeField::PutValue( const uno::Any& rVal, USHORT nWhichId )
+sal_Bool SwDateTimeField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
{
sal_Int32 nTmp = 0;
switch( nWhichId )
@@ -301,7 +301,7 @@ BOOL SwDateTimeField::PutValue( const uno::Any& rVal, USHORT nWhichId )
{
util::DateTime aDateTimeValue;
if(!(rVal >>= aDateTimeValue))
- return FALSE;
+ return sal_False;
DateTime aDateTime;
aDateTime.Set100Sec(aDateTimeValue.HundredthSeconds);
aDateTime.SetSec(aDateTimeValue.Seconds);
@@ -316,6 +316,6 @@ BOOL SwDateTimeField::PutValue( const uno::Any& rVal, USHORT nWhichId )
default:
return SwField::PutValue(rVal, nWhichId);
}
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/fields/flddropdown.cxx b/sw/source/core/fields/flddropdown.cxx
index 15b35c7999de..44e625edfccb 100644
--- a/sw/source/core/fields/flddropdown.cxx
+++ b/sw/source/core/fields/flddropdown.cxx
@@ -172,7 +172,7 @@ const String & SwDropDownField::GetToolTip() const
return aToolTip;
}
-BOOL SwDropDownField::SetSelectedItem(const String & rItem)
+sal_Bool SwDropDownField::SetSelectedItem(const String & rItem)
{
vector<String>::const_iterator aIt =
std::find(aValues.begin(), aValues.end(), rItem);
@@ -200,7 +200,7 @@ void SwDropDownField::SetToolTip(const String & rToolTip)
aToolTip = rToolTip;
}
-BOOL SwDropDownField::QueryValue(::uno::Any &rVal, USHORT nWhich) const
+sal_Bool SwDropDownField::QueryValue(::uno::Any &rVal, sal_uInt16 nWhich) const
{
nWhich &= ~CONVERT_TWIPS;
switch( nWhich )
@@ -228,8 +228,8 @@ BOOL SwDropDownField::QueryValue(::uno::Any &rVal, USHORT nWhich) const
return sal_True;
}
-BOOL SwDropDownField::PutValue(const uno::Any &rVal,
- USHORT nWhich)
+sal_Bool SwDropDownField::PutValue(const uno::Any &rVal,
+ sal_uInt16 nWhich)
{
switch( nWhich )
{
diff --git a/sw/source/core/fields/fldlst.cxx b/sw/source/core/fields/fldlst.cxx
index abf688cbbf5f..2777dc82e9b4 100644
--- a/sw/source/core/fields/fldlst.cxx
+++ b/sw/source/core/fields/fldlst.cxx
@@ -45,21 +45,21 @@
Beschreibung: Sortieren der Input-Eintraege
--------------------------------------------------------------------*/
-SwInputFieldList::SwInputFieldList( SwEditShell* pShell, BOOL bBuildTmpLst )
+SwInputFieldList::SwInputFieldList( SwEditShell* pShell, sal_Bool bBuildTmpLst )
: pSh(pShell)
{
// Hier die Liste aller Eingabefelder sortiert erstellen
pSrtLst = new _SetGetExpFlds();
const SwFldTypes& rFldTypes = *pSh->GetDoc()->GetFldTypes();
- const USHORT nSize = rFldTypes.Count();
+ const sal_uInt16 nSize = rFldTypes.Count();
// Alle Typen abklappern
- for(USHORT i=0; i < nSize; ++i)
+ for(sal_uInt16 i=0; i < nSize; ++i)
{
SwFieldType* pFldType = (SwFieldType*)rFldTypes[ i ];
- USHORT nType = pFldType->Which();
+ sal_uInt16 nType = pFldType->Which();
if( RES_SETEXPFLD == nType || RES_INPUTFLD == nType || RES_DROPDOWN == nType )
{
@@ -105,13 +105,13 @@ SwInputFieldList::~SwInputFieldList()
Beschreibung: Felder aus der Liste in sortierter Reihenfolge
--------------------------------------------------------------------*/
-USHORT SwInputFieldList::Count() const
+sal_uInt16 SwInputFieldList::Count() const
{
return pSrtLst->Count();
}
-SwField* SwInputFieldList::GetField(USHORT nId)
+SwField* SwInputFieldList::GetField(sal_uInt16 nId)
{
const SwTxtFld* pTxtFld = (*pSrtLst)[ nId ]->GetFld();
ASSERT( pTxtFld, "kein TextFld" );
@@ -130,14 +130,14 @@ void SwInputFieldList::PushCrsr()
void SwInputFieldList::PopCrsr()
{
- pSh->Pop(FALSE);
+ pSh->Pop(sal_False);
}
/*--------------------------------------------------------------------
Beschreibung: Position eines Feldes ansteuern
--------------------------------------------------------------------*/
-void SwInputFieldList::GotoFieldPos(USHORT nId)
+void SwInputFieldList::GotoFieldPos(sal_uInt16 nId)
{
pSh->StartAllAction();
(*pSrtLst)[ nId ]->GetPosOfContent( *pSh->GetCrsr()->GetPoint() );
@@ -147,17 +147,17 @@ void SwInputFieldList::GotoFieldPos(USHORT nId)
// vergleiche TmpLst mit akt Feldern. Alle neue kommen in die SortLst
// damit sie geupdatet werden koennen. Returnt die Anzahl.
// (Fuer Textbausteine: nur seine Input-Felder aktualisieren)
-USHORT SwInputFieldList::BuildSortLst()
+sal_uInt16 SwInputFieldList::BuildSortLst()
{
const SwFldTypes& rFldTypes = *pSh->GetDoc()->GetFldTypes();
- USHORT nSize = rFldTypes.Count();
+ sal_uInt16 nSize = rFldTypes.Count();
// Alle Typen abklappern
- for( USHORT i = 0; i < nSize; ++i )
+ for( sal_uInt16 i = 0; i < nSize; ++i )
{
SwFieldType* pFldType = (SwFieldType*)rFldTypes[ i ];
- USHORT nType = pFldType->Which();
+ sal_uInt16 nType = pFldType->Which();
if( RES_SETEXPFLD == nType || RES_INPUTFLD == nType )
{
@@ -178,7 +178,7 @@ USHORT SwInputFieldList::BuildSortLst()
VoidPtr pTmp = (VoidPtr)pTxtFld;
// nicht in der TempListe vorhanden, also in die SortListe
// aufnehemen
- USHORT nFndPos = aTmpLst.GetPos( pTmp );
+ sal_uInt16 nFndPos = aTmpLst.GetPos( pTmp );
if( USHRT_MAX == nFndPos )
{
SwNodeIndex aIdx( rTxtNode );
@@ -207,7 +207,7 @@ void SwInputFieldList::RemoveUnselectedFlds()
FOREACHPAM_START(pSh)
{
- for (USHORT i = 0; i < Count();)
+ for (sal_uInt16 i = 0; i < Count();)
{
_SetGetExpFld* pFld = (*pSrtLst)[i];
SwPosition aPos(*PCURCRSR->GetPoint());
diff --git a/sw/source/core/fields/macrofld.cxx b/sw/source/core/fields/macrofld.cxx
index f77bcf1fd457..17926457ea3f 100644
--- a/sw/source/core/fields/macrofld.cxx
+++ b/sw/source/core/fields/macrofld.cxx
@@ -63,7 +63,7 @@ SwFieldType* SwMacroFieldType::Copy() const
SwMacroField::SwMacroField(SwMacroFieldType* pInitType,
const String& rLibAndName, const String& rTxt) :
- SwField(pInitType), aMacro(rLibAndName), aText(rTxt), bIsScriptURL(FALSE)
+ SwField(pInitType), aMacro(rLibAndName), aText(rTxt), bIsScriptURL(sal_False)
{
bIsScriptURL = isScriptURL(aMacro);
}
@@ -96,9 +96,9 @@ String SwMacroField::GetLibName() const
if (aMacro.Len())
{
- USHORT nPos = aMacro.Len();
+ sal_uInt16 nPos = aMacro.Len();
- for (USHORT i = 0; i < 3 && nPos > 0; i++)
+ for (sal_uInt16 i = 0; i < 3 && nPos > 0; i++)
while (aMacro.GetChar(--nPos) != '.' && nPos > 0) ;
return aMacro.Copy(0, nPos );
@@ -118,9 +118,9 @@ String SwMacroField::GetMacroName() const
}
else
{
- USHORT nPos = aMacro.Len();
+ sal_uInt16 nPos = aMacro.Len();
- for (USHORT i = 0; i < 3 && nPos > 0; i++)
+ for (sal_uInt16 i = 0; i < 3 && nPos > 0; i++)
while (aMacro.GetChar(--nPos) != '.' && nPos > 0) ;
return aMacro.Copy( ++nPos );
@@ -175,7 +175,7 @@ String SwMacroField::GetPar2() const
/*-----------------05.03.98 13:38-------------------
--------------------------------------------------*/
-BOOL SwMacroField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwMacroField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -194,12 +194,12 @@ BOOL SwMacroField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*-----------------05.03.98 13:38-------------------
--------------------------------------------------*/
-BOOL SwMacroField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwMacroField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
String sTmp;
switch( nWhichId )
@@ -221,7 +221,7 @@ BOOL SwMacroField::PutValue( const uno::Any& rAny, USHORT nWhichId )
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
// create an internally used macro name from the library and macro name parts
@@ -237,7 +237,7 @@ void SwMacroField::CreateMacroString(
rMacro += rMacroName;
}
-BOOL SwMacroField::isScriptURL( const String& str )
+sal_Bool SwMacroField::isScriptURL( const String& str )
{
uno::Reference< lang::XMultiServiceFactory > xSMgr =
::comphelper::getProcessServiceFactory();
@@ -254,8 +254,8 @@ BOOL SwMacroField::isScriptURL( const String& str )
if ( xUrl.is() )
{
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 1af598eb4e46..ef64ce19420c 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -76,7 +76,7 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::lang;
using ::rtl::OUString;
-extern void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
+extern void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
void lcl_GetLayTree( const SwFrm* pFrm, SvPtrarr& rArr )
{
@@ -102,11 +102,11 @@ void lcl_GetLayTree( const SwFrm* pFrm, SvPtrarr& rArr )
}
-BOOL IsFrameBehind( const SwTxtNode& rMyNd, USHORT nMySttPos,
- const SwTxtNode& rBehindNd, USHORT nSttPos )
+sal_Bool IsFrameBehind( const SwTxtNode& rMyNd, sal_uInt16 nMySttPos,
+ const SwTxtNode& rBehindNd, sal_uInt16 nSttPos )
{
- const SwTxtFrm *pMyFrm = (SwTxtFrm*)rMyNd.GetFrm(0,0,FALSE),
- *pFrm = (SwTxtFrm*)rBehindNd.GetFrm(0,0,FALSE);
+ const SwTxtFrm *pMyFrm = (SwTxtFrm*)rMyNd.GetFrm(0,0,sal_False),
+ *pFrm = (SwTxtFrm*)rBehindNd.GetFrm(0,0,sal_False);
while( pFrm && !pFrm->IsInside( nSttPos ) )
pFrm = (SwTxtFrm*)pFrm->GetFollow();
@@ -114,15 +114,15 @@ BOOL IsFrameBehind( const SwTxtNode& rMyNd, USHORT nMySttPos,
pMyFrm = (SwTxtFrm*)pMyFrm->GetFollow();
if( !pFrm || !pMyFrm || pFrm == pMyFrm )
- return FALSE;
+ return sal_False;
SvPtrarr aRefArr( 10, 10 ), aArr( 10, 10 );
::lcl_GetLayTree( pFrm, aRefArr );
::lcl_GetLayTree( pMyFrm, aArr );
- USHORT nRefCnt = aRefArr.Count() - 1, nCnt = aArr.Count() - 1;
- BOOL bVert = FALSE;
- BOOL bR2L = FALSE;
+ sal_uInt16 nRefCnt = aRefArr.Count() - 1, nCnt = aArr.Count() - 1;
+ sal_Bool bVert = sal_False;
+ sal_Bool bR2L = sal_False;
// solange bis ein Frame ungleich ist ?
while( nRefCnt && nCnt && aRefArr[ nRefCnt ] == aArr[ nCnt ] )
@@ -146,7 +146,7 @@ BOOL IsFrameBehind( const SwTxtNode& rMyNd, USHORT nMySttPos,
const SwFrm* pFldFrm = (const SwFrm*)aArr[ nCnt ];
// unterschiedliche Frames, dann ueberpruefe deren Y-/X-Position
- BOOL bRefIsLower = FALSE;
+ sal_Bool bRefIsLower = sal_False;
if( ( FRM_COLUMN | FRM_CELL ) & pFldFrm->GetType() ||
( FRM_COLUMN | FRM_CELL ) & pRefFrm->GetType() )
{
@@ -211,8 +211,8 @@ BOOL IsFrameBehind( const SwTxtNode& rMyNd, USHORT nMySttPos,
SwGetRefField::SwGetRefField( SwGetRefFieldType* pFldType,
- const String& rSetRef, USHORT nSubTyp,
- USHORT nSeqenceNo, ULONG nFmt )
+ const String& rSetRef, sal_uInt16 nSubTyp,
+ sal_uInt16 nSeqenceNo, sal_uLong nFmt )
: SwField( pFldType, nFmt ),
sSetRefName( rSetRef ),
nSubType( nSubTyp ),
@@ -229,12 +229,12 @@ String SwGetRefField::GetDescription() const
return SW_RES(STR_REFERENCE);
}
-USHORT SwGetRefField::GetSubType() const
+sal_uInt16 SwGetRefField::GetSubType() const
{
return nSubType;
}
-void SwGetRefField::SetSubType( USHORT n )
+void SwGetRefField::SetSubType( sal_uInt16 n )
{
nSubType = n;
}
@@ -255,7 +255,7 @@ bool SwGetRefField::IsRefToNumItemCrossRefBookmark() const
const SwTxtNode* SwGetRefField::GetReferencedTxtNode() const
{
SwDoc* pDoc = dynamic_cast<SwGetRefFieldType*>(GetTyp())->GetDoc();
- USHORT nDummy = USHRT_MAX;
+ sal_uInt16 nDummy = USHRT_MAX;
return SwGetRefFieldType::FindAnchor( pDoc, sSetRefName, nSubType, nSeqNo, &nDummy );
}
// <--
@@ -288,8 +288,8 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
sTxt.Erase();
SwDoc* pDoc = ((SwGetRefFieldType*)GetTyp())->GetDoc();
- USHORT nStt = USHRT_MAX;
- USHORT nEnd = USHRT_MAX;
+ sal_uInt16 nStt = USHRT_MAX;
+ sal_uInt16 nEnd = USHRT_MAX;
SwTxtNode* pTxtNd = SwGetRefFieldType::FindAnchor( pDoc, sSetRefName,
nSubType, nSeqNo, &nStt, &nEnd );
if ( !pTxtNd )
@@ -356,7 +356,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
case REF_ENDNOTE:
{
// die Nummer oder den NumString besorgen
- USHORT n, nFtnCnt = pDoc->GetFtnIdxs().Count();
+ sal_uInt16 n, nFtnCnt = pDoc->GetFtnIdxs().Count();
SwTxtFtn* pFtnIdx;
for( n = 0; n < nFtnCnt; ++n )
if( nSeqNo == (pFtnIdx = pDoc->GetFtnIdxs()[ n ])->GetSeqRefNo() )
@@ -392,14 +392,14 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
case REF_PAGE:
case REF_PAGE_PGDESC:
{
- const SwTxtFrm* pFrm = (SwTxtFrm*)pTxtNd->GetFrm(0,0,FALSE),
+ const SwTxtFrm* pFrm = (SwTxtFrm*)pTxtNd->GetFrm(0,0,sal_False),
*pSave = pFrm;
while( pFrm && !pFrm->IsInside( nStt ) )
pFrm = (SwTxtFrm*)pFrm->GetFollow();
if( pFrm || 0 != ( pFrm = pSave ))
{
- USHORT nPageNo = pFrm->GetVirtPageNum();
+ sal_uInt16 nPageNo = pFrm->GetVirtPageNum();
const SwPageFrm *pPage;
if( REF_PAGE_PGDESC == GetFormat() &&
0 != ( pPage = pFrm->FindPageFrm() ) &&
@@ -420,7 +420,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
SwChapterFieldType aFldTyp;
SwChapterField aFld( &aFldTyp, 0 );
aFld.SetLevel( MAXLEVEL - 1 );
- aFld.ChangeExpansion( pFrm, pTxtNd, TRUE );
+ aFld.ChangeExpansion( pFrm, pTxtNd, sal_True );
sTxt = aFld.GetNumber();
}
}
@@ -580,7 +580,7 @@ String SwGetRefField::GetPar2() const
/*-----------------06.03.98 13:34-------------------
--------------------------------------------------*/
-BOOL SwGetRefField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -649,12 +649,12 @@ BOOL SwGetRefField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*-----------------06.03.98 13:34-------------------
--------------------------------------------------*/
-BOOL SwGetRefField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwGetRefField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
String sTmp;
switch( nWhichId )
@@ -678,7 +678,7 @@ BOOL SwGetRefField::PutValue( const uno::Any& rAny, USHORT nWhichId )
case ReferenceFieldPart::NUMBER_NO_CONTEXT: nPart = REF_NUMBER_NO_CONTEXT; break;
case ReferenceFieldPart::NUMBER_FULL_CONTEXT: nPart = REF_NUMBER_FULL_CONTEXT; break;
// <--
- default: return FALSE;
+ default: return sal_False;
}
SetFormat(nPart);
}
@@ -726,7 +726,7 @@ BOOL SwGetRefField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/* -----------------------------11.01.2002 12:50------------------------------
@@ -741,7 +741,7 @@ void SwGetRefField::ConvertProgrammaticToUIName()
if(!pDoc->GetFldType(RES_SETEXPFLD, rPar1, false))
{
sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromProgName( rPar1, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
- USHORT nResId = USHRT_MAX;
+ sal_uInt16 nResId = USHRT_MAX;
switch( nPoolId )
{
case RES_POOLCOLL_LABEL_ABB:
@@ -809,8 +809,8 @@ void SwGetRefFieldType::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const String& rRefMark,
- USHORT nSubType, USHORT nSeqNo,
- USHORT* pStt, USHORT* pEnd )
+ sal_uInt16 nSubType, sal_uInt16 nSeqNo,
+ sal_uInt16* pStt, sal_uInt16* pEnd )
{
ASSERT( pStt, "warum wird keine StartPos abgefragt?" );
@@ -894,7 +894,7 @@ SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const String& rRefMark,
case REF_FOOTNOTE:
case REF_ENDNOTE:
{
- USHORT n, nFtnCnt = pDoc->GetFtnIdxs().Count();
+ sal_uInt16 n, nFtnCnt = pDoc->GetFtnIdxs().Count();
SwTxtFtn* pFtnIdx;
for( n = 0; n < nFtnCnt; ++n )
if( nSeqNo == (pFtnIdx = pDoc->GetFtnIdxs()[ n ])->GetSeqRefNo() )
@@ -924,24 +924,24 @@ struct _RefIdsMap
String aName;
SvUShortsSort aIds, aDstIds, aIdsMap;
SvUShorts aMap;
- BOOL bInit;
+ sal_Bool bInit;
_RefIdsMap( const String& rName )
: aName( rName ), aIds( 16, 16 ), aIdsMap( 16, 16 ), aMap( 16, 16 ),
- bInit( FALSE )
+ bInit( sal_False )
{}
void Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
- BOOL bField = TRUE );
+ sal_Bool bField = sal_True );
- BOOL IsInit() const { return bInit; }
+ sal_Bool IsInit() const { return bInit; }
};
SV_DECL_PTRARR_DEL( _RefIdsMaps, _RefIdsMap*, 5, 5 )
SV_IMPL_PTRARR( _RefIdsMaps, _RefIdsMap* )
void _RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
- BOOL bField )
+ sal_Bool bField )
{
if( !bInit )
@@ -973,19 +973,19 @@ void _RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
}
else
{
- USHORT n;
+ sal_uInt16 n;
for( n = rDestDoc.GetFtnIdxs().Count(); n; )
aIds.Insert( rDestDoc.GetFtnIdxs()[ --n ]->GetSeqRefNo() );
for( n = rDoc.GetFtnIdxs().Count(); n; )
aDstIds.Insert( rDoc.GetFtnIdxs()[ --n ]->GetSeqRefNo() );
}
- bInit = TRUE;
+ bInit = sal_True;
}
// dann teste mal, ob die Nummer schon vergeben ist
// oder ob eine neue bestimmt werden muss.
- USHORT nPos, nSeqNo = rFld.GetSeqNo();
+ sal_uInt16 nPos, nSeqNo = rFld.GetSeqNo();
if( aIds.Seek_Entry( nSeqNo ) && aDstIds.Seek_Entry( nSeqNo ))
{
// ist schon vergeben, also muss eine neue
@@ -994,7 +994,7 @@ void _RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
rFld.SetSeqNo( aMap[ nPos ] );
else
{
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < aIds.Count(); ++n )
if( n != aIds[ n ] )
@@ -1024,7 +1024,7 @@ void _RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
else
{
SwTxtFtn* pFtnIdx;
- for( USHORT i = 0, nCnt = rDoc.GetFtnIdxs().Count(); i < nCnt; ++i )
+ for( sal_uInt16 i = 0, nCnt = rDoc.GetFtnIdxs().Count(); i < nCnt; ++i )
if( nSeqNo == (pFtnIdx = rDoc.GetFtnIdxs()[ i ])->GetSeqRefNo() )
{
pFtnIdx->SetSeqNo( n );
@@ -1063,7 +1063,7 @@ void SwGetRefFieldType::MergeWithOtherDoc( SwDoc& rDestDoc )
case REF_SEQUENCEFLD:
{
_RefIdsMap* pMap = 0;
- for( USHORT n = aFldMap.Count(); n; )
+ for( sal_uInt16 n = aFldMap.Count(); n; )
if( aFldMap[ --n ]->aName == rRefFld.GetSetRefName() )
{
pMap = aFldMap[ n ];
@@ -1075,13 +1075,13 @@ void SwGetRefFieldType::MergeWithOtherDoc( SwDoc& rDestDoc )
aFldMap.C40_INSERT( _RefIdsMap, pMap, aFldMap.Count() );
}
- pMap->Check( *pDoc, rDestDoc, rRefFld, TRUE );
+ pMap->Check( *pDoc, rDestDoc, rRefFld, sal_True );
}
break;
case REF_FOOTNOTE:
case REF_ENDNOTE:
- aFntMap.Check( *pDoc, rDestDoc, rRefFld, FALSE );
+ aFntMap.Check( *pDoc, rDestDoc, rRefFld, sal_False );
break;
}
}
diff --git a/sw/source/core/fields/scrptfld.cxx b/sw/source/core/fields/scrptfld.cxx
index f9d8258edcec..22c6ba695a05 100644
--- a/sw/source/core/fields/scrptfld.cxx
+++ b/sw/source/core/fields/scrptfld.cxx
@@ -60,7 +60,7 @@ SwFieldType* SwScriptFieldType::Copy() const
SwScriptField::SwScriptField( SwScriptFieldType* pInitType,
const String& rType, const String& rCode,
- BOOL bURL )
+ sal_Bool bURL )
: SwField( pInitType ), sType( rType ), sCode( rCode ), bCodeURL( bURL )
{
}
@@ -111,7 +111,7 @@ String SwScriptField::GetPar2() const
/*-----------------05.03.98 15:00-------------------
--------------------------------------------------*/
-BOOL SwScriptField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwScriptField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -127,12 +127,12 @@ BOOL SwScriptField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
/*-----------------05.03.98 15:00-------------------
--------------------------------------------------*/
-BOOL SwScriptField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwScriptField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -148,6 +148,6 @@ BOOL SwScriptField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
DBG_ERROR("illegal property");
}
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx
index abaacf8abc9e..5d6500ec3646 100644
--- a/sw/source/core/fields/tblcalc.cxx
+++ b/sw/source/core/fields/tblcalc.cxx
@@ -71,7 +71,7 @@ void SwTblField::CalcField( SwTblCalcPara& rCalcPara )
SwTblField::SwTblField( SwTblFieldType* pInitType, const String& rFormel,
- USHORT nType, ULONG nFmt )
+ sal_uInt16 nType, sal_uLong nFmt )
: SwValueField( pInitType, nFmt ), SwTableFormula( rFormel ),
sExpand( '0' ), nSubType(nType)
{
@@ -153,12 +153,12 @@ String SwTblField::Expand() const
return aStr;
}
-USHORT SwTblField::GetSubType() const
+sal_uInt16 SwTblField::GetSubType() const
{
return nSubType;
}
-void SwTblField::SetSubType(USHORT nType)
+void SwTblField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
@@ -190,14 +190,14 @@ void SwTblField::SetPar2(const String& rStr)
/*-----------------04.03.98 10:33-------------------
--------------------------------------------------*/
-BOOL SwTblField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwTblField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch ( nWhichId )
{
case FIELD_PROP_PAR2:
{
- USHORT nOldSubType = nSubType;
+ sal_uInt16 nOldSubType = nSubType;
SwTblField* pThis = (SwTblField*)this;
pThis->nSubType |= nsSwExtendedSubType::SUB_CMD;
rAny <<= rtl::OUString( Expand() );
@@ -206,7 +206,7 @@ BOOL SwTblField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
break;
case FIELD_PROP_BOOL1:
{
- BOOL bFormula = 0 != (nsSwExtendedSubType::SUB_CMD & nSubType);
+ sal_Bool bFormula = 0 != (nsSwExtendedSubType::SUB_CMD & nSubType);
rAny.setValue(&bFormula, ::getBooleanCppuType());
}
break;
@@ -224,9 +224,9 @@ BOOL SwTblField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------04.03.98 10:33-------------------
--------------------------------------------------*/
-BOOL SwTblField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwTblField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
String sTmp;
switch ( nWhichId )
{
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index ccb10ca03ee1..bbc8719fd2f6 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -129,19 +129,19 @@ void SwUserField::SetSubType(sal_uInt16 nSub)
/*-----------------09.03.98 08:04-------------------
--------------------------------------------------*/
-BOOL SwUserField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwUserField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
case FIELD_PROP_BOOL2:
{
- BOOL bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
+ sal_Bool bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
case FIELD_PROP_BOOL1:
{
- BOOL bTmp = 0 == (nSubType & nsSwExtendedSubType::SUB_INVISIBLE);
+ sal_Bool bTmp = 0 == (nSubType & nsSwExtendedSubType::SUB_INVISIBLE);
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -156,7 +156,7 @@ BOOL SwUserField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------09.03.98 08:04-------------------
--------------------------------------------------*/
-sal_Bool SwUserField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwUserField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -309,7 +309,7 @@ void SwUserFieldType::SetContent( const String& rStr, sal_uInt32 nFmt )
/*-----------------04.03.98 17:05-------------------
--------------------------------------------------*/
-BOOL SwUserFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+sal_Bool SwUserFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -321,7 +321,7 @@ BOOL SwUserFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
break;
case FIELD_PROP_BOOL1:
{
- BOOL bExpression = 0 != (nsSwGetSetExpType::GSE_EXPR&nType);
+ sal_Bool bExpression = 0 != (nsSwGetSetExpType::GSE_EXPR&nType);
rAny.setValue(&bExpression, ::getBooleanCppuType());
}
break;
@@ -333,7 +333,7 @@ BOOL SwUserFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
/*-----------------04.03.98 17:05-------------------
--------------------------------------------------*/
-BOOL SwUserFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
+sal_Bool SwUserFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 79a2b64433d9..e0ac3b203a56 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -100,11 +100,11 @@ using namespace ::com::sun::star;
|
|*************************************************************************/
-BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
+sal_Bool SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
{
ASSERT( pClpDoc, "kein Clipboard-Dokument" );
- pClpDoc->DoUndo( FALSE ); // immer auf FALSE !!
+ pClpDoc->DoUndo( sal_False ); // immer auf sal_False !!
// steht noch Inhalt im ClpDocument, dann muss dieser geloescht werden
SwNodeIndex aSttIdx( pClpDoc->GetNodes().GetEndOfExtras(), 2 );
@@ -120,7 +120,7 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
}
// stehen noch FlyFrames rum, loesche auch diese
- for( USHORT n = 0; n < pClpDoc->GetSpzFrmFmts()->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pClpDoc->GetSpzFrmFmts()->Count(); ++n )
{
SwFlyFrmFmt* pFly = (SwFlyFrmFmt*)(*pClpDoc->GetSpzFrmFmts())[n];
pClpDoc->DelLayoutFmt( pFly );
@@ -133,12 +133,12 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
if( pNewClpTxt )
{
pTxtNd->InsertText( *pNewClpTxt, SwIndex( pTxtNd ) );
- return TRUE; // das wars.
+ return sal_True; // das wars.
}
pClpDoc->LockExpFlds();
pClpDoc->SetRedlineMode_intern( nsRedlineMode_t::REDLINE_DELETE_REDLINES );
- BOOL bRet;
+ sal_Bool bRet;
// soll ein FlyFrame kopiert werden ?
if( IsFrmSelected() )
@@ -167,7 +167,7 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
SwSpzFrmFmts& rSpzFrmFmts = *(SwSpzFrmFmts*)pClpDoc->GetSpzFrmFmts();
if( rSpzFrmFmts[ 0 ] != pFlyFmt )
{
- USHORT nPos = rSpzFrmFmts.GetPos( pFlyFmt );
+ sal_uInt16 nPos = rSpzFrmFmts.GetPos( pFlyFmt );
ASSERT( nPos != USHRT_MAX, "Fly steht nicht im Spz-Array" );
rSpzFrmFmts.Remove( nPos );
@@ -191,13 +191,13 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
pTxtNd->EraseText( rIdx, 1 );
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
else if ( IsObjSelected() )
{
SwPosition aPos( aSttIdx, SwIndex( pTxtNd, 0 ));
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
@@ -211,7 +211,7 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
aSet.Put( aAnchor );
SdrObject *const pNew =
- pClpDoc->CloneSdrObj( *pObj, FALSE, TRUE );
+ pClpDoc->CloneSdrObj( *pObj, sal_False, sal_True );
SwPaM aTemp(aPos);
pClpDoc->Insert(aTemp, *pNew, &aSet, NULL);
@@ -232,7 +232,7 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
pClpDoc->CopyLayoutFmt( *pFmt, aAnchor, true, true );
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
else
bRet = _CopySelToDoc( pClpDoc, 0 ); // kopiere die Selectionen
@@ -261,17 +261,17 @@ const Point &lcl_FindBasePos( const SwFrm *pFrm, const Point &rPt )
return pFrm->Frm().Pos();
}
-BOOL lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly,
+sal_Bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly,
const Point& rInsPt, SwFEShell& rDestShell, SwFmtAnchor& rAnchor,
- Point& rNewPos, BOOL bCheckFlyRecur )
+ Point& rNewPos, sal_Bool bCheckFlyRecur )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
rAnchor.SetAnchor( &rPos );
- SwCntntFrm* pTmpFrm = rNd.GetCntntNode()->GetFrm( &rInsPt, 0, FALSE );
+ SwCntntFrm* pTmpFrm = rNd.GetCntntNode()->GetFrm( &rInsPt, 0, sal_False );
SwFlyFrm *pTmpFly = pTmpFrm->FindFlyFrm();
if( pTmpFly && bCheckFlyRecur && pFly->IsUpperOf( *pTmpFly ) )
{
- bRet = FALSE;
+ bRet = sal_False;
}
else if ( FLY_AT_FLY == rAnchor.GetAnchorId() )
{
@@ -295,15 +295,15 @@ BOOL lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly,
return bRet;
}
-BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
- const Point& rInsPt, BOOL bIsMove, BOOL bSelectInsert )
+sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
+ const Point& rInsPt, sal_Bool bIsMove, sal_Bool bSelectInsert )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
//Die Liste muss kopiert werden, weil unten die neuen Objekte
//selektiert werden.
const SdrMarkList aMrkList( Imp()->GetDrawView()->GetMarkedObjectList() );
- ULONG nMarkCount = aMrkList.GetMarkCount();
+ sal_uLong nMarkCount = aMrkList.GetMarkCount();
if( !pDestShell->Imp()->GetDrawView() )
// sollte mal eine erzeugt werden
pDestShell->MakeDrawView();
@@ -317,7 +317,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
SwDoc* pDestDoc = pDestShell->GetDoc();
Size aSiz( rInsPt.X() - rSttPt.X(), rInsPt.Y() - rSttPt.Y() );
- for( USHORT i = 0; i < nMarkCount; ++i )
+ for( sal_uInt16 i = 0; i < nMarkCount; ++i )
{
SdrObject *pObj = aMrkList.GetMark( i )->GetMarkedSdrObj();
@@ -325,7 +325,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
SwFrmFmt *pFmt = pContact->GetFmt();
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
- BOOL bInsWithFmt = TRUE;
+ sal_Bool bInsWithFmt = sal_True;
if( pDestDrwView->IsGroupEntered() )
{
@@ -336,10 +336,10 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
{
SdrObject* pNew = pDestDoc->CloneSdrObj( *pObj, bIsMove &&
- GetDoc() == pDestDoc, FALSE );
+ GetDoc() == pDestDoc, sal_False );
pNew->NbcMove( aSiz );
pDestDrwView->InsertObjectAtView( pNew, *pDestPgView );
- bInsWithFmt = FALSE;
+ bInsWithFmt = sal_False;
}
}
@@ -364,21 +364,21 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
GetLayout()->GetCrsrOfst( &aPos, aPt, &aState );
const SwNode *pNd;
if( (pNd = &aPos.nNode.GetNode())->IsNoTxtNode() )
- bRet = FALSE;
+ bRet = sal_False;
else
bRet = ::lcl_SetAnchor( aPos, *pNd, 0, rInsPt,
- *pDestShell, aAnchor, aNewAnch, FALSE );
+ *pDestShell, aAnchor, aNewAnch, sal_False );
}
else
{
SwPaM *pCrsr = pDestShell->GetCrsr();
if( pCrsr->GetNode()->IsNoTxtNode() )
- bRet = FALSE;
+ bRet = sal_False;
else
bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(),
*pCrsr->GetNode(), 0, rInsPt,
*pDestShell, aAnchor,
- aNewAnch, FALSE );
+ aNewAnch, sal_False );
}
}
else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() )
@@ -398,7 +398,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
SfxItemSet aSet( pDestDoc->GetAttrPool(),aFrmFmtSetRange);
aSet.Put( aAnchor );
SdrObject* pNew = pDestDoc->CloneSdrObj( *pObj, bIsMove &&
- GetDoc() == pDestDoc, TRUE );
+ GetDoc() == pDestDoc, sal_True );
pFmt = pDestDoc->Insert( *pDestShell->GetCrsr(),
*pNew, &aSet, NULL );
}
@@ -440,8 +440,8 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
const SdrMarkList aList( pSrcDrwView->GetMarkedObjectList() );
pSrcDrwView->UnmarkAll();
- ULONG nMrkCnt = aMrkList.GetMarkCount();
- USHORT i;
+ sal_uLong nMrkCnt = aMrkList.GetMarkCount();
+ sal_uInt16 i;
for ( i = 0; i < nMrkCnt; ++i )
{
SdrObject *pObj = aMrkList.GetMark( i )->GetMarkedSdrObj();
@@ -462,10 +462,10 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
return bRet;
}
-BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
- const Point& rInsPt, BOOL bIsMove, BOOL bSelectInsert )
+sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
+ const Point& rInsPt, sal_Bool bIsMove, sal_Bool bSelectInsert )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ASSERT( pDestShell, "Copy ohne DestShell." );
ASSERT( this == pDestShell || !pDestShell->IsObjSelected(),
@@ -477,10 +477,10 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
pDestShell->GetDoc()->LockExpFlds();
// Referenzen sollen verschoben werden.
- BOOL bCopyIsMove = pDoc->IsCopyIsMove();
+ sal_Bool bCopyIsMove = pDoc->IsCopyIsMove();
if( bIsMove )
// am Doc ein Flag setzen, damit in den TextNodes
- pDoc->SetCopyIsMove( TRUE );
+ pDoc->SetCopyIsMove( sal_True );
RedlineMode_t eOldRedlMode = pDestShell->GetDoc()->GetRedlineMode();
pDestShell->GetDoc()->SetRedlineMode_intern( (RedlineMode_t)(eOldRedlMode | nsRedlineMode_t::REDLINE_DELETE_REDLINES));
@@ -496,7 +496,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
SwFlyFrm* pFly = FindFlyFrm();
SwFrmFmt* pFlyFmt = pFly->GetFmt();
SwFmtAnchor aAnchor( pFlyFmt->GetAnchor() );
- bRet = TRUE;
+ bRet = sal_True;
Point aNewAnch;
if ((FLY_AT_PARA == aAnchor.GetAnchorId()) ||
@@ -515,25 +515,25 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
GetLayout()->GetCrsrOfst( &aPos, aPt, &aState );
const SwNode *pNd;
if( (pNd = &aPos.nNode.GetNode())->IsNoTxtNode() )
- bRet = FALSE;
+ bRet = sal_False;
else
{ //Nicht in sich selbst kopieren
const SwNodeIndex *pTmp = pFlyFmt->GetCntnt().GetCntntIdx();
if ( aPos.nNode > *pTmp && aPos.nNode <
pTmp->GetNode().EndOfSectionIndex() )
{
- bRet = FALSE;
+ bRet = sal_False;
}
else
bRet = ::lcl_SetAnchor( aPos, *pNd, pFly, rInsPt,
- *pDestShell, aAnchor, aNewAnch, TRUE );
+ *pDestShell, aAnchor, aNewAnch, sal_True );
}
}
else
{
const SwPaM *pCrsr = pDestShell->GetCrsr();
if( pCrsr->GetNode()->IsNoTxtNode() )
- bRet = FALSE;
+ bRet = sal_False;
else
bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(), *pCrsr->GetNode(),
pFly, rInsPt, *pDestShell, aAnchor,
@@ -575,12 +575,12 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
// kopiert wird
if( bSelectInsert )
{
- SwFlyFrm* pFlyFrm = ((SwFlyFrmFmt*)pFlyFmt)->GetFrm( &aPt, FALSE );
+ SwFlyFrm* pFlyFrm = ((SwFlyFrmFmt*)pFlyFmt)->GetFrm( &aPt, sal_False );
if( pFlyFrm )
{
//JP 12.05.98: sollte das nicht im SelectFlyFrm stehen???
pDestShell->Imp()->GetDrawView()->UnmarkAll();
- pDestShell->SelectFlyFrm( *pFlyFrm, TRUE );
+ pDestShell->SelectFlyFrm( *pFlyFrm, sal_True );
}
}
@@ -612,12 +612,12 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
Point aPt( rInsPt );
GetLayout()->GetCrsrOfst( pDstPos, aPt );
if( !pDstPos->nNode.GetNode().IsNoTxtNode() )
- bRet = TRUE;
+ bRet = sal_True;
}
else if( !pDestShell->GetCrsr()->GetNode()->IsNoTxtNode() )
{
pDstPos = new SwPosition( *pDestShell->GetCrsr()->GetPoint() );
- bRet = TRUE;
+ bRet = sal_True;
}
if( bRet )
@@ -648,7 +648,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
}
else
{
- bRet = TRUE;
+ bRet = sal_True;
if( this == pDestShell )
{
// gleiche Shell? Dann erfrage die Position an der
@@ -659,7 +659,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
bRet = !aPos.nNode.GetNode().IsNoTxtNode();
}
else if( pDestShell->GetCrsr()->GetNode()->IsNoTxtNode() )
- bRet = FALSE;
+ bRet = sal_False;
if( bRet )
bRet = 0 != SwEditShell::Copy( pDestShell );
@@ -673,7 +673,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
{
// alte Actions beenden; die Tabellen-Frames werden angelegt und
// eine SSelection kann erzeugt werden
- USHORT nActCnt;
+ sal_uInt16 nActCnt;
for( nActCnt = 0; pDestShell->ActionPend(); ++nActCnt )
pDestShell->EndAllAction();
@@ -703,11 +703,11 @@ namespace {
typedef std::pair< PaMPtr, PositionPtr > Insertion;
}
-BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
+sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
{
SET_CURR_SHELL( this );
ASSERT( pClpDoc, "kein Clipboard-Dokument" );
- const USHORT nStartPageNumber = GetPhyPageNum();
+ const sal_uInt16 nStartPageNumber = GetPhyPageNum();
// dann bis zum Ende vom Nodes Array
SwNodeIndex aIdx( pClpDoc->GetNodes().GetEndOfExtras(), 2 );
SwPaM aCpyPam( aIdx ); //DocStart
@@ -731,7 +731,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
aCpyPam.SetMark();
aCpyPam.Move( fnMoveForward, fnGoDoc );
- BOOL bRet = TRUE, bDelTbl = TRUE;
+ sal_Bool bRet = sal_True, bDelTbl = sal_True;
StartAllAction();
GetDoc()->StartUndo( UNDO_INSGLOSSARY, NULL );
GetDoc()->LockExpFlds();
@@ -768,7 +768,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
SwPosition aStartPos( *pStartCursor->GetPoint() );
SwPosition aInsertPos( aStartPos ); // first insertion position
bool bCompletePara = false;
- USHORT nMove = 0;
+ sal_uInt16 nMove = 0;
while( nCount )
{
--nCount;
@@ -786,7 +786,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
SwCursor aCrsr( aStartPos, 0, false);
// Check if we find another insert position by moving
// down the last given position
- if( aCrsr.UpDown( FALSE, ++nMove, 0, 0 ) )
+ if( aCrsr.UpDown( sal_False, ++nMove, 0, 0 ) )
aInsertPos = *aCrsr.GetPoint();
else // if there is no paragraph we have to create it
bCompletePara = nCount > 0;
@@ -854,7 +854,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
{
SwPosition aDestPos( *PCURCRSR->GetPoint() );
- BOOL bParkTblCrsr = FALSE;
+ sal_Bool bParkTblCrsr = sal_False;
const SwStartNode* pSttNd = PCURCRSR->GetNode()->FindTableBoxStartNode();
// TABLE IN TABLE: Tabelle in Tabelle kopieren
@@ -864,7 +864,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
{
GetTblSel( *this, aBoxes );
ParkTblCrsr();
- bParkTblCrsr = TRUE;
+ bParkTblCrsr = sal_True;
}
else if( !PCURCRSR->HasMark() && PCURCRSR->GetNext() == PCURCRSR &&
( !pSrcNd->GetTable().IsTblComplex() ||
@@ -890,7 +890,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
}
bRet = GetDoc()->InsCopyOfTbl( aDestPos, aBoxes, &pSrcNd->GetTable(),
- FALSE, FALSE );
+ sal_False, sal_False );
if( bParkTblCrsr )
GetCrsr();
@@ -917,9 +917,9 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
if( !Imp()->GetDrawView() )
MakeDrawView();
- for ( USHORT i = 0; i < pClpDoc->GetSpzFrmFmts()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pClpDoc->GetSpzFrmFmts()->Count(); ++i )
{
- BOOL bInsWithFmt = TRUE;
+ sal_Bool bInsWithFmt = sal_True;
const SwFrmFmt& rCpyFmt = *(*pClpDoc->GetSpzFrmFmts())[i];
if( Imp()->GetDrawView()->IsGroupEntered() &&
@@ -930,7 +930,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
if( pSdrObj )
{
SdrObject* pNew = GetDoc()->CloneSdrObj( *pSdrObj,
- FALSE, FALSE );
+ sal_False, sal_False );
// Insert object sets any anchor position to 0.
// Therefore we calculate the absolute position here
@@ -965,7 +965,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
pNew->NbcSetAnchorPos( aGrpAnchor );
pNew->SetSnapRect( aSnapRect );
- bInsWithFmt = FALSE;
+ bInsWithFmt = sal_False;
}
}
@@ -993,7 +993,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
{
Point aPt;
lcl_SetAnchor( *PCURCRSR->GetPoint(), *PCURCRSR->GetNode(),
- 0, aPt, *this, aAnchor, aPt, FALSE );
+ 0, aPt, *this, aAnchor, aPt, sal_False );
}
SwFrmFmt * pNew = GetDoc()->CopyLayoutFmt( rCpyFmt, aAnchor, true, true );
@@ -1004,9 +1004,9 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
{
const Point aPt( GetCrsrDocPos() );
SwFlyFrm* pFlyFrm = ((SwFlyFrmFmt*)pNew)->
- GetFrm( &aPt, FALSE );
+ GetFrm( &aPt, sal_False );
if( pFlyFrm )
- SelectFlyFrm( *pFlyFrm, TRUE );
+ SelectFlyFrm( *pFlyFrm, sal_True );
// immer nur den ersten Fly-Frame nehmen; die anderen
// wurden ueber Fly in Fly ins ClipBoard kopiert !
break;
@@ -1042,7 +1042,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
if( bDelTbl && IsTableMode() )
{
SwEditShell::Delete();
- bDelTbl = FALSE;
+ bDelTbl = sal_False;
}
SwPosition& rInsPos = *PCURCRSR->GetPoint();
@@ -1090,9 +1090,9 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
if( !Imp()->GetDrawView() )
MakeDrawView();
- for ( USHORT i = 0; i < pClpDoc->GetSpzFrmFmts()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pClpDoc->GetSpzFrmFmts()->Count(); ++i )
{
- BOOL bInsWithFmt = TRUE;
+ sal_Bool bInsWithFmt = sal_True;
const SwFrmFmt& rCpyFmt = *(*pClpDoc->GetSpzFrmFmts())[i];
if( bInsWithFmt )
{
@@ -1119,7 +1119,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
{
// alte Actions beenden; die Tabellen-Frames werden angelegt und
// eine Selection kann erzeugt werden
- USHORT nActCnt;
+ sal_uInt16 nActCnt;
for( nActCnt = 0; ActionPend(); ++nActCnt )
EndAllAction();
@@ -1136,25 +1136,25 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
/*-- 14.06.2004 13:31:17---------------------------------------------------
-----------------------------------------------------------------------*/
-BOOL SwFEShell::PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPage)
+sal_Bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage)
{
Push();
if(!GotoPage(nStartPage))
{
Pop(sal_False);
- return FALSE;
+ return sal_False;
}
MovePage( fnPageCurr, fnPageStart );
SwPaM aCpyPam( *GetCrsr()->GetPoint() );
String sStartingPageDesc = GetPageDesc( GetCurPageDesc()).GetName();
- SwPageDesc* pDesc = rToFill.FindPageDescByName( sStartingPageDesc, TRUE );
+ SwPageDesc* pDesc = rToFill.FindPageDescByName( sStartingPageDesc, sal_True );
if( pDesc )
rToFill.ChgCurPageDesc( *pDesc );
if(!GotoPage(nEndPage))
{
Pop(sal_False);
- return FALSE;
+ return sal_False;
}
//if the page starts with a table a paragraph has to be inserted before
SwNode* pTableNode = aCpyPam.GetNode()->FindTableNode();
@@ -1201,7 +1201,7 @@ BOOL SwFEShell::PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPa
if( !rToFill.Imp()->GetDrawView() )
rToFill.MakeDrawView();
- for ( USHORT i = 0; i < GetDoc()->GetSpzFrmFmts()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < GetDoc()->GetSpzFrmFmts()->Count(); ++i )
{
const SwFrmFmt& rCpyFmt = *(*GetDoc()->GetSpzFrmFmts())[i];
SwFmtAnchor aAnchor( rCpyFmt.GetAnchor() );
@@ -1220,14 +1220,14 @@ BOOL SwFEShell::PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPa
Pop(sal_False);
EndAllAction();
- return TRUE;
+ return sal_True;
}
-BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const
+sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const
{
ASSERT( Imp()->HasDrawView(), "GetDrawObjGraphic without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- BOOL bConvert = TRUE;
+ sal_Bool bConvert = sal_True;
if( rMrkList.GetMarkCount() )
{
if( rMrkList.GetMarkCount() == 1 &&
@@ -1246,7 +1246,7 @@ BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const
if( GRAPHIC_BITMAP != aGrf.GetType() )
{
rGrf = aGrf;
- bConvert = FALSE;
+ bConvert = sal_False;
}
else if( GetWin() )
{
@@ -1255,7 +1255,7 @@ BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const
GetGrfSize( aSz );
VirtualDevice aVirtDev;
- aVirtDev.EnableOutput( FALSE );
+ aVirtDev.EnableOutput( sal_False );
MapMode aTmp( GetWin()->GetMapMode() );
aTmp.SetOrigin( aPt );
@@ -1273,7 +1273,7 @@ BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const
else if( GRAPHIC_BITMAP == aGrf.GetType() )
{
rGrf = aGrf;
- bConvert = FALSE;
+ bConvert = sal_False;
}
else
{
@@ -1293,7 +1293,7 @@ BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const
else
{
rGrf = aGrf;
- bConvert = FALSE;
+ bConvert = sal_False;
}
}
}
@@ -1347,7 +1347,7 @@ void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SdrModel* _pModel )
}
}
// <--
-void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt )
+void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt )
{
SET_CURR_SHELL( this );
StartAllAction();
@@ -1462,7 +1462,7 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt )
pFmt = GetDoc()->Insert( *GetCrsr(), *pNewObj, &aFrmSet, NULL );
}
else
- pView->ReplaceObjectAtView( pOldObj, *Imp()->GetPageView(), pNewObj, TRUE );
+ pView->ReplaceObjectAtView( pOldObj, *Imp()->GetPageView(), pNewObj, sal_True );
}
break;
@@ -1470,7 +1470,7 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt )
{
SfxItemSet aSet( GetAttrPool() );
aSet.Put(pClpObj->GetMergedItemSet());
- pView->SetAttributes( aSet, FALSE );
+ pView->SetAttributes( aSet, sal_False );
}
break;
@@ -1484,7 +1484,7 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt )
if( SW_PASTESDR_INSERT == nAction )
{
- GetDoc()->SetNoDrawUndoObj( TRUE );
+ GetDoc()->SetNoDrawUndoObj( sal_True );
sal_Bool bDesignMode = pView->IsDesignMode();
if( !bDesignMode )
@@ -1497,11 +1497,11 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt )
// <--
pView->Paste( *pModel, aPos );
- ULONG nCnt = pView->GetMarkedObjectList().GetMarkCount();
+ sal_uLong nCnt = pView->GetMarkedObjectList().GetMarkCount();
if( nCnt )
{
const Point aNull( 0, 0 );
- for( ULONG i=0; i < nCnt; ++i )
+ for( sal_uLong i=0; i < nCnt; ++i )
{
SdrObject *pObj = pView->GetMarkedObjectList().GetMark(i)->GetMarkedSdrObj();
pObj->ImpSetAnchorPos( aNull );
@@ -1525,20 +1525,20 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt )
if( !bDesignMode )
pView->SetDesignMode( sal_False );
}
- GetDoc()->SetNoDrawUndoObj( FALSE );
+ GetDoc()->SetNoDrawUndoObj( sal_False );
}
EndUndo();
EndAllAction();
delete pModel;
}
-BOOL SwFEShell::Paste( const Graphic &rGrf )
+sal_Bool SwFEShell::Paste( const Graphic &rGrf )
{
SET_CURR_SHELL( this );
SdrObject* pObj;
SdrView *pView = Imp()->GetDrawView();
- BOOL bRet = 1 == pView->GetMarkedObjectList().GetMarkCount() &&
+ sal_Bool bRet = 1 == pView->GetMarkedObjectList().GetMarkCount() &&
(pObj = pView->GetMarkedObjectList().GetMark( 0 )->GetMarkedSdrObj())->IsClosedObj() &&
!pObj->ISA( SdrOle2Obj );
@@ -1548,7 +1548,7 @@ BOOL SwFEShell::Paste( const Graphic &rGrf )
SfxItemSet aSet( GetAttrPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP );
aSet.Put( XFillStyleItem( XFILL_BITMAP ));
aSet.Put( XFillBitmapItem( aEmptyStr, aXOBitmap ));
- pView->SetAttributes( aSet, FALSE );
+ pView->SetAttributes( aSet, sal_False );
}
return bRet;
}
diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx
index fe73c36016a0..e2b322212224 100644
--- a/sw/source/core/frmedt/fedesc.cxx
+++ b/sw/source/core/frmedt/fedesc.cxx
@@ -51,7 +51,7 @@
|*
|*************************************************************************/
-USHORT SwFEShell::GetPageDescCnt() const
+sal_uInt16 SwFEShell::GetPageDescCnt() const
{
return GetDoc()->GetPageDescCnt();
}
@@ -70,10 +70,10 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
#ifdef DBG_UTIL
//Die SS veraendert keinen PageDesc, sondern setzt nur das Attribut.
//Der Pagedesc muss im Dokument vorhanden sein!
- BOOL bFound = FALSE;
- for ( USHORT nTst = 0; nTst < GetPageDescCnt(); ++nTst )
+ sal_Bool bFound = sal_False;
+ for ( sal_uInt16 nTst = 0; nTst < GetPageDescCnt(); ++nTst )
if ( &rDesc == &GetPageDesc( nTst ) )
- bFound = TRUE;
+ bFound = sal_True;
ASSERT( bFound, "ChgCurPageDesc mit ungueltigem Descriptor." );
#endif
@@ -81,7 +81,7 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
SwPageFrm *pPage = GetCurrFrm()->FindPageFrm();
const SwFrm *pFlow = 0;
- USHORT nPageNmOffset = 0;
+ sal_uInt16 nPageNmOffset = 0;
ASSERT( !GetCrsr()->HasMark(), "ChgCurPageDesc nur ohne Selektion!");
@@ -138,7 +138,7 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
|*
|*************************************************************************/
-void SwFEShell::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
+void SwFEShell::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
{
StartAllAction();
SET_CURR_SHELL( this );
@@ -162,19 +162,19 @@ void SwFEShell::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
|
|*************************************************************************/
-const SwPageDesc& SwFEShell::GetPageDesc( USHORT i ) const
+const SwPageDesc& SwFEShell::GetPageDesc( sal_uInt16 i ) const
{
return const_cast<const SwDoc *>(GetDoc())->GetPageDesc( i );
}
SwPageDesc* SwFEShell::FindPageDescByName( const String& rName,
- BOOL bGetFromPool,
- USHORT* pPos )
+ sal_Bool bGetFromPool,
+ sal_uInt16* pPos )
{
SwPageDesc* pDesc = GetDoc()->FindPageDescByName( rName, pPos );
if( !pDesc && bGetFromPool )
{
- USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
+ sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
if( USHRT_MAX != nPoolId &&
0 != (pDesc = GetDoc()->GetPageDescFromPool( nPoolId ))
&& pPos )
@@ -184,7 +184,7 @@ SwPageDesc* SwFEShell::FindPageDescByName( const String& rName,
return pDesc;
}
-USHORT SwFEShell::GetMousePageDesc( const Point &rPt ) const
+sal_uInt16 SwFEShell::GetMousePageDesc( const Point &rPt ) const
{
if( GetLayout() )
{
@@ -195,7 +195,7 @@ USHORT SwFEShell::GetMousePageDesc( const Point &rPt ) const
while( pPage->GetNext() && rPt.Y() > pPage->Frm().Bottom() )
pPage = static_cast<const SwPageFrm*>( pPage->GetNext() );
SwDoc *pMyDoc = GetDoc();
- for ( USHORT i = 0; i < GetDoc()->GetPageDescCnt(); ++i )
+ for ( sal_uInt16 i = 0; i < GetDoc()->GetPageDescCnt(); ++i )
{
if ( pPage->GetPageDesc() == &const_cast<const SwDoc *>(pMyDoc)
->GetPageDesc(i) )
@@ -206,7 +206,7 @@ USHORT SwFEShell::GetMousePageDesc( const Point &rPt ) const
return 0;
}
-USHORT SwFEShell::GetCurPageDesc( const BOOL bCalcFrm ) const
+sal_uInt16 SwFEShell::GetCurPageDesc( const sal_Bool bCalcFrm ) const
{
const SwFrm *pFrm = GetCurrFrm( bCalcFrm );
if ( pFrm )
@@ -215,7 +215,7 @@ USHORT SwFEShell::GetCurPageDesc( const BOOL bCalcFrm ) const
if ( pPage )
{
SwDoc *pMyDoc = GetDoc();
- for ( USHORT i = 0; i < GetDoc()->GetPageDescCnt(); ++i )
+ for ( sal_uInt16 i = 0; i < GetDoc()->GetPageDescCnt(); ++i )
{
if ( pPage->GetPageDesc() == &const_cast<const SwDoc *>(pMyDoc)
->GetPageDesc(i) )
@@ -238,14 +238,14 @@ const SwPageDesc* SwFEShell::GetSelectedPageDescs() const
FOREACHPAM_START(this)
if( 0 != (pCNd = PCURCRSR->GetCntntNode() ) &&
- 0 != ( pPtFrm = pCNd->GetFrm( &aNulPt, 0, FALSE )) )
+ 0 != ( pPtFrm = pCNd->GetFrm( &aNulPt, 0, sal_False )) )
pPtFrm = pPtFrm->FindPageFrm();
else
pPtFrm = 0;
if( PCURCRSR->HasMark() &&
- 0 != (pCNd = PCURCRSR->GetCntntNode( FALSE ) ) &&
- 0 != ( pMkFrm = pCNd->GetFrm( &aNulPt, 0, FALSE )) )
+ 0 != (pCNd = PCURCRSR->GetCntntNode( sal_False ) ) &&
+ 0 != ( pMkFrm = pCNd->GetFrm( &aNulPt, 0, sal_False )) )
pMkFrm = pMkFrm->FindPageFrm();
else
pMkFrm = pPtFrm;
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index e4d4f2e9b399..145f0e5d93dd 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -123,10 +123,10 @@ sal_Bool lcl_SetNewFlyPos( const SwNode& rNode, SwFmtAnchor& rAnchor,
return bRet;
}
-BOOL lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm,
+sal_Bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm,
SfxItemSet& rSet )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SwFmtAnchor aNewAnch( (SwFmtAnchor&)rSet.Get( RES_ANCHOR ) );
RndStdIds nNew = aNewAnch.GetAnchorId();
const SwFrm *pNewAnch;
@@ -146,7 +146,7 @@ BOOL lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm,
pNewAnch = ::FindAnchor( pFrm, aTmpPnt );
if( pNewAnch->IsProtected() )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
@@ -491,7 +491,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
SwPosition aPos( GetDoc()->GetNodes().GetEndOfExtras() );
Point aTmpPnt( rAbsPos );
GetLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState );
- pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->GetFrm(0,&aPos,FALSE );
+ pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->GetFrm(0,&aPos,sal_False );
}
const SwFrm *pNewAnch;
if( pTxtFrm )
@@ -617,7 +617,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
//TODO: That doesn't seem to be intended
if( Color(COL_TRANSPARENT) != GetOut()->GetLineColor() )
{
- ASSERT( FALSE, "Hey, Joe: Where's my Null Pen?" );
+ ASSERT( sal_False, "Hey, Joe: Where's my Null Pen?" );
GetOut()->SetLineColor( Color(COL_TRANSPARENT) );
}
#endif
@@ -787,7 +787,7 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali
/* #109161# If called from a shell try to propagate an
existing adjust item from rPos to the content node of the
new frame. */
- pRet = GetDoc()->MakeFlySection( eRndId, &rPos, &rSet, pParent, TRUE );
+ pRet = GetDoc()->MakeFlySection( eRndId, &rPos, &rSet, pParent, sal_True );
if( pRet )
{
@@ -1458,7 +1458,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
{
// search for a sequence field:
const SfxPoolItem* pItem;
- for( USHORT n = 0, nEnd = pHts->Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = pHts->Count(); n < nEnd; ++n )
if( RES_TXTATR_FIELD == ( pItem =
&(*pHts)[ n ]->GetAttr())->Which() &&
TYP_SEQFLD == ((SwFmtFld*)pItem)->GetFld()->GetTypeId() )
@@ -1640,8 +1640,8 @@ const SwFrmFmt* SwFEShell::IsURLGrfAtPos( const Point& rPt, String* pURL,
const SwFmtURL &rURL = pFly->GetFmt()->GetURL();
if( rURL.GetURL().Len() || rURL.GetMap() )
{
- BOOL bSetTargetFrameName = pTargetFrameName != 0;
- BOOL bSetDescription = pDescription != 0;
+ sal_Bool bSetTargetFrameName = pTargetFrameName != 0;
+ sal_Bool bSetDescription = pDescription != 0;
if ( rURL.GetMap() )
{
IMapObject *pObject = pFly->GetFmt()->GetIMapObject( rPt, pFly );
@@ -1968,13 +1968,13 @@ sal_Bool SwFEShell::ReplaceSdrObj( const String& rGrfName, const String& rFltNam
return bRet;
}
-static USHORT SwFmtGetPageNum(const SwFlyFrmFmt * pFmt)
+static sal_uInt16 SwFmtGetPageNum(const SwFlyFrmFmt * pFmt)
{
ASSERT(pFmt != NULL, "invalid argument");
SwFlyFrm * pFrm = pFmt->GetFrm();
- USHORT aResult;
+ sal_uInt16 aResult;
if (pFrm != NULL)
aResult = pFrm->GetPhyPageNum();
@@ -1988,7 +1988,7 @@ static USHORT SwFmtGetPageNum(const SwFlyFrmFmt * pFmt)
void SwFEShell::GetConnectableFrmFmts(SwFrmFmt & rFmt,
const String & rReference,
- BOOL bSuccessors,
+ sal_Bool bSuccessors,
::std::vector< String > & aPrevPageVec,
::std::vector< String > & aThisPageVec,
::std::vector< String > & aNextPageVec,
@@ -2048,7 +2048,7 @@ void SwFEShell::GetConnectableFrmFmts(SwFrmFmt & rFmt,
aRestVec.clear();
/* number of page rFmt resides on */
- USHORT nPageNum = SwFmtGetPageNum((SwFlyFrmFmt *) &rFmt);
+ sal_uInt16 nPageNum = SwFmtGetPageNum((SwFlyFrmFmt *) &rFmt);
::std::vector< const SwFrmFmt * >::const_iterator aIt;
@@ -2060,7 +2060,7 @@ void SwFEShell::GetConnectableFrmFmts(SwFrmFmt & rFmt,
itself */
if (aString != rReference && aString != rFmt.GetName())
{
- USHORT nNum1 =
+ sal_uInt16 nNum1 =
SwFmtGetPageNum((SwFlyFrmFmt *) *aIt);
if (nNum1 == nPageNum -1)
@@ -2213,7 +2213,7 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO
}
catch ( uno::Exception& )
{
- ASSERT( FALSE , "Baseline could not be retrieved from Starmath!" );
+ ASSERT( sal_False , "Baseline could not be retrieved from Starmath!" );
}
}
}
diff --git a/sw/source/core/frmedt/feflyole.cxx b/sw/source/core/frmedt/feflyole.cxx
index 070a031e83d3..96373fffb57b 100644
--- a/sw/source/core/frmedt/feflyole.cxx
+++ b/sw/source/core/frmedt/feflyole.cxx
@@ -68,9 +68,9 @@ SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject >
if ( !pFly )
{
//Kein Fly oder der falsche selektiert. Ergo muessen wir leider suchen.
- BOOL bExist = FALSE;
+ sal_Bool bExist = sal_False;
SwStartNode *pStNd;
- ULONG nSttIdx = GetNodes().GetEndOfAutotext().StartOfSectionIndex() + 1,
+ sal_uLong nSttIdx = GetNodes().GetEndOfAutotext().StartOfSectionIndex() + 1,
nEndIdx = GetNodes().GetEndOfAutotext().GetIndex();
while( nSttIdx < nEndIdx &&
0 != (pStNd = GetNodes()[ nSttIdx ]->GetStartNode()) )
@@ -79,7 +79,7 @@ SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject >
if ( pNd->IsOLENode() &&
((SwOLENode*)pNd)->GetOLEObj().GetOleRef() == xObj )
{
- bExist = TRUE;
+ bExist = sal_True;
SwFrm *pFrm = ((SwOLENode*)pNd)->GetFrm();
if ( pFrm )
pFly = pFrm->FindFlyFrm();
@@ -122,13 +122,13 @@ void SwFEShell::MakeObjVisible( const uno::Reference < embed::XEmbeddedObject >&
}
}
-BOOL SwFEShell::FinishOLEObj() // Server wird beendet
+sal_Bool SwFEShell::FinishOLEObj() // Server wird beendet
{
SfxInPlaceClient* pIPClient = GetSfxViewShell()->GetIPClient();
if ( !pIPClient )
- return FALSE;
+ return sal_False;
- BOOL bRet = pIPClient->IsObjectInPlaceActive();
+ sal_Bool bRet = pIPClient->IsObjectInPlaceActive();
if( bRet )
{
uno::Reference < embed::XEmbeddedObject > xObj = pIPClient->GetObject();
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 0f8a61134595..eb2f5062b773 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -98,7 +98,7 @@
using namespace com::sun::star;
//Tattergrenze fuer Drawing-SS
-#define MINMOVE ((USHORT)GetOut()->PixelToLogic(Size(Imp()->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width())
+#define MINMOVE ((sal_uInt16)GetOut()->PixelToLogic(Size(Imp()->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width())
SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, ViewShell *pSh )
{
@@ -122,12 +122,12 @@ void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrm* pOldSelFly)
{
// dann das evt. gesetzte Macro rufen
pSh->GetFlyMacroLnk().Call( (void*)pFlyFmt );
-extern BOOL bNoInterrupt; // in swapp.cxx
+extern sal_Bool bNoInterrupt; // in swapp.cxx
// wir in dem Makro ein Dialog gestartet, dann kommt das
// MouseButtonUp zu diesem und nicht zu uns. Dadurch ist
// Flag bei uns immer gesetzt und schaltet nie die auf die
// entsp. Shell um !!!!!!!
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
}
else if( !pFlyFmt || RES_DRAWFRMFMT == pFlyFmt->Which() )
{
@@ -136,7 +136,7 @@ extern BOOL bNoInterrupt; // in swapp.cxx
pSh->KillPams();
pSh->ClearMark();
// <--
- pSh->SetCrsr( pSh->Imp()->GetDrawView()->GetAllMarkedRect().TopLeft(), TRUE);
+ pSh->SetCrsr( pSh->Imp()->GetDrawView()->GetAllMarkedRect().TopLeft(), sal_True);
}
}
@@ -149,7 +149,7 @@ extern BOOL bNoInterrupt; // in swapp.cxx
|*
*************************************************************************/
-BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
+sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj )
{
SwDrawView *pDView = Imp()->GetDrawView();
if(!pDView)
@@ -160,16 +160,16 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
//durchkommen
const SdrMarkList &rMrkList = pDView->GetMarkedObjectList();
- const BOOL bHadSelection = rMrkList.GetMarkCount() ? TRUE : FALSE;
- const BOOL bAddSelect = 0 != (SW_ADD_SELECT & nFlag);
- const BOOL bEnterGroup = 0 != (SW_ENTER_GROUP & nFlag);
+ const sal_Bool bHadSelection = rMrkList.GetMarkCount() ? sal_True : sal_False;
+ const sal_Bool bAddSelect = 0 != (SW_ADD_SELECT & nFlag);
+ const sal_Bool bEnterGroup = 0 != (SW_ENTER_GROUP & nFlag);
SwFlyFrm* pOldSelFly = 0;
const Point aOldPos( pDView->GetAllMarkedRect().TopLeft() );
if( bHadSelection )
{
//Unmark rufen wenn !bAddSelect oder wenn ein Fly selektiert ist.
- BOOL bUnmark = !bAddSelect;
+ sal_Bool bUnmark = !bAddSelect;
if ( rMrkList.GetMarkCount() == 1 )
{
@@ -177,7 +177,7 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
pOldSelFly = ::GetFlyFromMarked( &rMrkList, this );
if ( pOldSelFly )
{
- const USHORT nType = GetCntType();
+ const sal_uInt16 nType = GetCntType();
if( nType != CNT_TXT || (SW_LEAVE_FRAME & nFlag) ||
( pOldSelFly->GetFmt()->GetProtect().IsCntntProtected()
&& !IsReadOnlyAvailable() ))
@@ -189,18 +189,18 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
//linke obere Ecke gesetzt.
Point aPt( pOldSelFly->Frm().Pos() );
aPt.X() -= 1;
- BOOL bUnLockView = !IsViewLocked();
- LockView( TRUE );
- SetCrsr( aPt, TRUE );
+ sal_Bool bUnLockView = !IsViewLocked();
+ LockView( sal_True );
+ SetCrsr( aPt, sal_True );
if( bUnLockView )
- LockView( FALSE );
+ LockView( sal_False );
}
if ( nType & CNT_GRF &&
((SwNoTxtFrm*)pOldSelFly->Lower())->HasAnimation() )
{
GetWin()->Invalidate( pOldSelFly->Frm().SVRect() );
}
- bUnmark = TRUE;
+ bUnmark = sal_True;
}
}
if ( bUnmark )
@@ -222,16 +222,16 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
pDView->MarkObj( rPt, MINMOVE, bAddSelect, bEnterGroup );
}
- const BOOL bRet = 0 != rMrkList.GetMarkCount();
+ const sal_Bool bRet = 0 != rMrkList.GetMarkCount();
if ( rMrkList.GetMarkCount() > 1 )
{
//Ganz dumm ist es, wenn Zeichenobjekte Selektiert waren und
//nun ein Fly hinzuselektiert wird.
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pTmpObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
- BOOL bForget = pTmpObj->ISA(SwVirtFlyDrawObj);
+ sal_Bool bForget = pTmpObj->ISA(SwVirtFlyDrawObj);
if( bForget )
{
pDView->UnmarkAll();
@@ -253,7 +253,7 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
}
}
else if ( !pOldSelFly && bHadSelection )
- SetCrsr( aOldPos, TRUE);
+ SetCrsr( aOldPos, sal_True);
if( bRet || !bHadSelection )
CallChgLnk();
@@ -267,7 +267,7 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
/*************************************************************************
|*
-|* sal_Bool SwFEShell::MoveAnchor( USHORT nDir )
+|* sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir )
|*
|* Created AMA 05/28/2002
|* Last modify AMA 05/30/2002
@@ -294,7 +294,7 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
( aPt1.Y() == aPt2.Y() && ( aPt1.X() < aPt2.X() || \
( aPt1.X() == aPt2.X() && bOld ) ) ) )
-sal_Bool SwFEShell::MoveAnchor( USHORT nDir )
+sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir )
{
const SdrMarkList* pMrkList;
if( !Imp()->GetDrawView() ||
@@ -429,7 +429,7 @@ sal_Bool SwFEShell::MoveAnchor( USHORT nDir )
Point aCenter( pOld->Frm().Left() + pOld->Frm().Width()/2,
pOld->Frm().Top() + pOld->Frm().Height()/2 );
Point aBest;
- for( i = 0; (USHORT)i<pPage->GetSortedObjs()->Count(); ++i )
+ for( i = 0; (sal_uInt16)i<pPage->GetSortedObjs()->Count(); ++i )
{
SwAnchoredObject* pAnchObj =
(*pPage->GetSortedObjs())[i];
@@ -556,9 +556,9 @@ const SdrMarkList* SwFEShell::_GetMarkList() const
return pMarkList;
}
-USHORT SwFEShell::GetSelFrmType() const
+sal_uInt16 SwFEShell::GetSelFrmType() const
{
- USHORT eType;
+ sal_uInt16 eType;
// get marked frame list, and check if anything is selected
const SdrMarkList* pMarkList = _GetMarkList();
@@ -636,7 +636,7 @@ void SwFEShell::ScrollTo( const Point &rPt )
|*
*************************************************************************/
-void SwFEShell::SetDragMode( UINT16 eDragMode )
+void SwFEShell::SetDragMode( sal_uInt16 eDragMode )
{
if ( Imp()->HasDrawView() )
Imp()->GetDrawView()->SetDragMode( (SdrDragMode)eDragMode );
@@ -651,7 +651,7 @@ void SwFEShell::SetDragMode( UINT16 eDragMode )
|*
*************************************************************************/
-long SwFEShell::BeginDrag( const Point* pPt, BOOL )
+long SwFEShell::BeginDrag( const Point* pPt, sal_Bool )
{
SdrView *pView = Imp()->GetDrawView();
if ( pView && pView->AreObjectsMarked() )
@@ -673,7 +673,7 @@ long SwFEShell::BeginDrag( const Point* pPt, BOOL )
|*
*************************************************************************/
-long SwFEShell::Drag( const Point *pPt, BOOL )
+long SwFEShell::Drag( const Point *pPt, sal_Bool )
{
ASSERT( Imp()->HasDrawView(), "Drag without DrawView?" );
if ( Imp()->GetDrawView()->IsDragObj() )
@@ -696,7 +696,7 @@ long SwFEShell::Drag( const Point *pPt, BOOL )
|*
*************************************************************************/
-long SwFEShell::EndDrag( const Point *, BOOL )
+long SwFEShell::EndDrag( const Point *, sal_Bool )
{
ASSERT( Imp()->HasDrawView(), "EndDrag without DrawView?" );
SdrView *pView = Imp()->GetDrawView();
@@ -722,8 +722,8 @@ long SwFEShell::EndDrag( const Point *, BOOL )
pView->EndDragObj();
// JP 18.08.95: DrawUndo-Action auf FlyFrames werden nicht gespeichert
// Die Fly aendern das Flag
- GetDoc()->SetNoDrawUndoObj( FALSE );
- ChgAnchor( 0, TRUE );
+ GetDoc()->SetNoDrawUndoObj( sal_False );
+ ChgAnchor( 0, sal_True );
EndUndo( UNDO_END );
@@ -825,10 +825,10 @@ void lcl_NotifyNeighbours( const SdrMarkList *pLst )
//3. Rahmen die dem Rahmen ausweichen bzw. wichen muessen benachrichtigt werden.
//4. Auch Zeichenobjekte koennen Rahmen verdraengen
- for( USHORT j = 0; j < pLst->GetMarkCount(); ++j )
+ for( sal_uInt16 j = 0; j < pLst->GetMarkCount(); ++j )
{
SwPageFrm *pPage;
- BOOL bCheckNeighbours = FALSE;
+ sal_Bool bCheckNeighbours = sal_False;
sal_Int16 aHori = text::HoriOrientation::NONE;
SwRect aRect;
SdrObject *pO = pLst->GetMark( 0 )->GetMarkedSdrObj();
@@ -841,7 +841,7 @@ void lcl_NotifyNeighbours( const SdrMarkList *pLst )
if( text::HoriOrientation::NONE != aHori && text::HoriOrientation::CENTER != aHori &&
pFly->IsFlyAtCntFrm() )
{
- bCheckNeighbours = TRUE;
+ bCheckNeighbours = sal_True;
pFly->InvalidatePos();
pFly->Frm().Pos().Y() += 1;
}
@@ -897,7 +897,7 @@ void lcl_NotifyNeighbours( const SdrMarkList *pLst )
}
}
-void SwFEShell::SelectionToTop( BOOL bTop )
+void SwFEShell::SelectionToTop( sal_Bool bTop )
{
ASSERT( Imp()->HasDrawView(), "SelectionToTop without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
@@ -917,7 +917,7 @@ void SwFEShell::SelectionToTop( BOOL bTop )
EndAllAction();
}
-void SwFEShell::SelectionToBottom( BOOL bBottom )
+void SwFEShell::SelectionToBottom( sal_Bool bBottom )
{
ASSERT( Imp()->HasDrawView(), "SelectionToBottom without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
@@ -954,7 +954,7 @@ short SwFEShell::GetLayerId() const
if ( Imp()->HasDrawView() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( nRet == SHRT_MAX )
@@ -991,7 +991,7 @@ void SwFEShell::ChangeOpaque( SdrLayerID nLayerId )
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
const IDocumentDrawModelAccess* pIDDMA = getIDocumentDrawModelAccess();
// OD 25.06.2003 #108784# - correct type of <nControls>
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
// OD 21.08.2003 #i18447# - no change of layer for controls
@@ -1040,18 +1040,18 @@ void SwFEShell::SelectionToHell()
|*
*************************************************************************/
-USHORT SwFEShell::IsObjSelected() const
+sal_uInt16 SwFEShell::IsObjSelected() const
{
if ( IsFrmSelected() || !Imp()->HasDrawView() )
return 0;
else
- return USHORT( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() );
+ return sal_uInt16( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() );
}
-BOOL SwFEShell::IsFrmSelected() const
+sal_Bool SwFEShell::IsFrmSelected() const
{
if ( !Imp()->HasDrawView() )
- return FALSE;
+ return sal_False;
else
return 0 != ::GetFlyFromMarked( &Imp()->GetDrawView()->GetMarkedObjectList(),
(ViewShell*)this );
@@ -1112,7 +1112,7 @@ void SwFEShell::EndTextEdit()
DelSelectedObj();
if ( aSave.GetMarkCount() )
{
- for ( USHORT i = 0; i < aSave.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aSave.GetMarkCount(); ++i )
pView->MarkObj( aSave.GetMark( i )->GetMarkedSdrObj(),
Imp()->GetPageView() );
}
@@ -1174,7 +1174,7 @@ bool SwFEShell::IsObjSelectable( const Point& rPt )
{
SdrObject* pObj;
SdrPageView* pPV;
- USHORT nOld = pDView->GetHitTolerancePixel();
+ sal_uInt16 nOld = pDView->GetHitTolerancePixel();
pDView->SetHitTolerancePixel( pDView->GetMarkHdlSizePixel()/2 );
bRet = 0 != pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMARKABLE );
@@ -1297,18 +1297,18 @@ sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt)
* Beinhaltet das Objekt ein Control oder Gruppen,
* die nur aus Controls bestehen
* --------------------------------------------------*/
-BOOL lcl_IsControlGroup( const SdrObject *pObj )
+sal_Bool lcl_IsControlGroup( const SdrObject *pObj )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if(pObj->ISA(SdrUnoObj))
- bRet = TRUE;
+ bRet = sal_True;
else if( pObj->ISA( SdrObjGroup ) )
{
- bRet = TRUE;
+ bRet = sal_True;
const SdrObjList *pLst = ((SdrObjGroup*)pObj)->GetSubList();
- for ( USHORT i = 0; i < pLst->GetObjCount(); ++i )
+ for ( sal_uInt16 i = 0; i < pLst->GetObjCount(); ++i )
if( !::lcl_IsControlGroup( pLst->GetObj( i ) ) )
- return FALSE;
+ return sal_False;
}
return bRet;
}
@@ -1333,7 +1333,7 @@ namespace
};
}
-const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType, BOOL bFlat, const ::svx::ISdrObjectFilter* pFilter )
+const SdrObject* SwFEShell::GetBestObject( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType, sal_Bool bFlat, const ::svx::ISdrObjectFilter* pFilter )
{
if( !Imp()->HasDrawView() )
return NULL;
@@ -1346,12 +1346,12 @@ const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT /*GOTOOBJ_...*/ eT
Point aTopPos( nTmp, nTmp );
Point aCurPos;
Point aPos;
- BOOL bNoDraw = 0 == (GOTOOBJ_DRAW_ANY & eType);
- BOOL bNoFly = 0 == (GOTOOBJ_FLY_ANY & eType);
+ sal_Bool bNoDraw = 0 == (GOTOOBJ_DRAW_ANY & eType);
+ sal_Bool bNoFly = 0 == (GOTOOBJ_FLY_ANY & eType);
if( !bNoFly && bNoDraw )
{
- SwFlyFrm *pFly = GetCurrFrm( FALSE )->FindFlyFrm();
+ SwFlyFrm *pFly = GetCurrFrm( sal_False )->FindFlyFrm();
if( pFly )
pBest = pFly->GetVirtDrawObj();
}
@@ -1404,7 +1404,7 @@ const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT /*GOTOOBJ_...*/ eT
while ( aObjIter.IsMore() )
{
SdrObject* pObj = aObjIter.Next();
- BOOL bFlyFrm = pObj->ISA(SwVirtFlyDrawObj);
+ sal_Bool bFlyFrm = pObj->ISA(SwVirtFlyDrawObj);
if( ( bNoFly && bFlyFrm ) ||
( bNoDraw && !bFlyFrm ) ||
( eType == GOTOOBJ_DRAW_SIMPLE && lcl_IsControlGroup( pObj ) ) ||
@@ -1510,14 +1510,14 @@ const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT /*GOTOOBJ_...*/ eT
return pBest;
}
-BOOL SwFEShell::GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType )
+sal_Bool SwFEShell::GotoObj( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType )
{
const SdrObject* pBest = GetBestObject( bNext, eType );
if ( !pBest )
- return FALSE;
+ return sal_False;
- BOOL bFlyFrm = pBest->ISA(SwVirtFlyDrawObj);
+ sal_Bool bFlyFrm = pBest->ISA(SwVirtFlyDrawObj);
if( bFlyFrm )
{
SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pBest;
@@ -1533,7 +1533,7 @@ BOOL SwFEShell::GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType )
MakeVisible( pBest->GetCurrentBoundRect() );
}
CallChgLnk();
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1545,9 +1545,9 @@ BOOL SwFEShell::GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType )
|*
*************************************************************************/
-BOOL SwFEShell::BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos )
+sal_Bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !Imp()->HasDrawView() )
Imp()->MakeDrawView();
@@ -1569,10 +1569,10 @@ BOOL SwFEShell::BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Poin
return bRet;
}
-BOOL SwFEShell::BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, UINT32 eObjInventor,
+sal_Bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sal_uInt32 eObjInventor,
const Point &rPos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !Imp()->HasDrawView() )
Imp()->MakeDrawView();
@@ -1616,34 +1616,34 @@ void SwFEShell::MoveCreate( const Point &rPos )
|*
*************************************************************************/
-BOOL SwFEShell::EndCreate( UINT16 eSdrCreateCmd )
+sal_Bool SwFEShell::EndCreate( sal_uInt16 eSdrCreateCmd )
{
// JP 18.08.95: Damit das Undo-Object aus der DrawEngine nicht bei uns
// gespeichert wird, (wir erzeugen ein eigenes Undo-Object!) hier kurz
// das Undo abschalten
ASSERT( Imp()->HasDrawView(), "EndCreate without DrawView?" );
if( !Imp()->GetDrawView()->IsGroupEntered() )
- GetDoc()->SetNoDrawUndoObj( TRUE );
- BOOL bCreate = Imp()->GetDrawView()->EndCreateObj(
+ GetDoc()->SetNoDrawUndoObj( sal_True );
+ sal_Bool bCreate = Imp()->GetDrawView()->EndCreateObj(
SdrCreateCmd( eSdrCreateCmd ) );
- GetDoc()->SetNoDrawUndoObj( FALSE );
+ GetDoc()->SetNoDrawUndoObj( sal_False );
if ( !bCreate )
{
::FrameNotify( this, FLY_DRAG_END );
- return FALSE;
+ return sal_False;
}
if ( (SdrCreateCmd)eSdrCreateCmd == SDRCREATE_NEXTPOINT )
{
::FrameNotify( this, FLY_DRAG );
- return TRUE;
+ return sal_True;
}
return ImpEndCreate();
}
-BOOL SwFEShell::ImpEndCreate()
+sal_Bool SwFEShell::ImpEndCreate()
{
ASSERT( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() == 1,
"Neues Object nicht selektiert." );
@@ -1657,7 +1657,7 @@ BOOL SwFEShell::ImpEndCreate()
Imp()->GetDrawView()->DeleteMarked();
Imp()->GetDrawView()->UnmarkAll();
::FrameNotify( this, FLY_DRAG_END );
- return FALSE;
+ return sal_False;
}
if( rSdrObj.GetUpGroup() )
@@ -1668,7 +1668,7 @@ BOOL SwFEShell::ImpEndCreate()
rSdrObj.NbcSetRelativePos( aTmpPos - aNewAnchor );
rSdrObj.NbcSetAnchorPos( aNewAnchor );
::FrameNotify( this, FLY_DRAG );
- return TRUE;
+ return sal_True;
}
LockPaint();
@@ -1681,14 +1681,14 @@ BOOL SwFEShell::ImpEndCreate()
//Fremde Identifier sollen in den Default laufen.
//Ueberschneidungen sind moeglich!!
- UINT16 nIdent = SdrInventor == rSdrObj.GetObjInventor()
+ sal_uInt16 nIdent = SdrInventor == rSdrObj.GetObjInventor()
? rSdrObj.GetObjIdentifier()
: 0xFFFF;
//Default fuer Controls ist Zeichengebunden, Absatzgebunden sonst.
SwFmtAnchor aAnch;
const SwFrm *pAnch = 0;
- BOOL bCharBound = FALSE;
+ sal_Bool bCharBound = sal_False;
if( rSdrObj.ISA( SdrUnoObj ) )
{
SwPosition aPos( GetDoc()->GetNodes() );
@@ -1704,7 +1704,7 @@ BOOL SwFEShell::ImpEndCreate()
pAnch->GetCharRect( aTmp, aPos );
//Der Crsr darf nicht zu weit entfernt sein.
- bCharBound = TRUE;
+ bCharBound = sal_True;
Rectangle aRect( aTmp.SVRect() );
aRect.Left() -= MM50*2;
aRect.Top() -= MM50*2;
@@ -1712,7 +1712,7 @@ BOOL SwFEShell::ImpEndCreate()
aRect.Bottom()+= MM50*2;
if( !aRect.IsOver( rBound ) && !::GetHtmlMode( GetDoc()->GetDocShell() ))
- bCharBound = FALSE;
+ bCharBound = sal_False;
//Bindung in Kopf-/Fusszeilen ist ebenfalls nicht erlaubt.
if( bCharBound )
@@ -1747,7 +1747,7 @@ BOOL SwFEShell::ImpEndCreate()
// die naechste nicht READONLY Position suchen?
bAtPage = true;
- pAnch = aPos.nNode.GetNode().GetCntntNode()->GetFrm( &aPoint, 0, FALSE );
+ pAnch = aPos.nNode.GetNode().GetCntntNode()->GetFrm( &aPoint, 0, sal_False );
if( !bAtPage )
{
@@ -1852,29 +1852,29 @@ BOOL SwFEShell::ImpEndCreate()
//Erzeugtes Object wegwerfen, so kann der Fly am elegentesten
//ueber vorhandene SS erzeugt werden.
- GetDoc()->SetNoDrawUndoObj( TRUE ); // siehe oben
+ GetDoc()->SetNoDrawUndoObj( sal_True ); // siehe oben
// --> OD 2005-08-08 #i52858# - method name changed
SdrPage *pPg = getIDocumentDrawModelAccess()->GetOrCreateDrawModel()->GetPage( 0 );
// <--
if( !pPg )
{
SdrModel* pTmpSdrModel = getIDocumentDrawModelAccess()->GetDrawModel();
- pPg = pTmpSdrModel->AllocPage( FALSE );
+ pPg = pTmpSdrModel->AllocPage( sal_False );
pTmpSdrModel->InsertPage( pPg );
}
pPg->RecalcObjOrdNums();
SdrObject* pRemovedObject = pPg->RemoveObject( rSdrObj.GetOrdNumDirect() );
SdrObject::Free( pRemovedObject );
- GetDoc()->SetNoDrawUndoObj( FALSE );
+ GetDoc()->SetNoDrawUndoObj( sal_False );
SwFlyFrm* pFlyFrm;
- if( NewFlyFrm( aSet, TRUE ) &&
+ if( NewFlyFrm( aSet, sal_True ) &&
::GetHtmlMode( GetDoc()->GetDocShell() ) &&
0 != ( pFlyFrm = FindFlyFrm() ))
{
SfxItemSet aHtmlSet( GetDoc()->GetAttrPool(), RES_VERT_ORIENT, RES_HORI_ORIENT );
//Horizontale Ausrichtung:
- const BOOL bLeftFrm = aFlyRect.Left() <
+ const sal_Bool bLeftFrm = aFlyRect.Left() <
pAnch->Frm().Left() + pAnch->Prt().Left(),
bLeftPrt = aFlyRect.Left() + aFlyRect.Width() <
pAnch->Frm().Left() + pAnch->Prt().Width()/2;
@@ -1885,7 +1885,7 @@ BOOL SwFEShell::ImpEndCreate()
}
else
{
- const BOOL bRightFrm = aFlyRect.Left() >
+ const sal_Bool bRightFrm = aFlyRect.Left() >
pAnch->Frm().Left() + pAnch->Prt().Width();
aHori.SetHoriOrient( text::HoriOrientation::RIGHT );
aHori.SetRelationOrient( bRightFrm ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA );
@@ -1966,12 +1966,12 @@ BOOL SwFEShell::ImpEndCreate()
if ( pMarkObj )
{
Imp()->GetDrawView()->MarkObj( pMarkObj, Imp()->GetPageView(),
- FALSE, FALSE );
+ sal_False, sal_False );
}
else
{
Imp()->GetDrawView()->MarkObj( &rSdrObj, Imp()->GetPageView(),
- FALSE, FALSE );
+ sal_False, sal_False );
}
}
}
@@ -1981,7 +1981,7 @@ BOOL SwFEShell::ImpEndCreate()
KillPams();
EndAllActionAndCall();
UnlockPaint();
- return TRUE;
+ return sal_True;
}
@@ -2010,9 +2010,9 @@ void SwFEShell::BreakCreate()
|*
*************************************************************************/
-BOOL SwFEShell::IsDrawCreate() const
+sal_Bool SwFEShell::IsDrawCreate() const
{
- return Imp()->HasDrawView() ? Imp()->GetDrawView()->IsCreateObj() : FALSE;
+ return Imp()->HasDrawView() ? Imp()->GetDrawView()->IsCreateObj() : sal_False;
}
/*************************************************************************
@@ -2024,7 +2024,7 @@ BOOL SwFEShell::IsDrawCreate() const
|*
*************************************************************************/
-BOOL SwFEShell::BeginMark( const Point &rPos )
+sal_Bool SwFEShell::BeginMark( const Point &rPos )
{
if ( !Imp()->HasDrawView() )
Imp()->MakeDrawView();
@@ -2039,7 +2039,7 @@ BOOL SwFEShell::BeginMark( const Point &rPos )
return pDView->BegMarkObj( rPos );
}
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -2079,9 +2079,9 @@ void SwFEShell::MoveMark( const Point &rPos )
|*
*************************************************************************/
-BOOL SwFEShell::EndMark()
+sal_Bool SwFEShell::EndMark()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ASSERT( Imp()->HasDrawView(), "EndMark without DrawView?" );
if (Imp()->GetDrawView()->IsMarkObj())
@@ -2090,7 +2090,7 @@ BOOL SwFEShell::EndMark()
if ( bRet )
{
- BOOL bShowHdl = FALSE;
+ sal_Bool bShowHdl = sal_False;
SwDrawView* pDView = Imp()->GetDrawView();
//Rahmen werden auf diese Art nicht Selektiert, es sein denn es
//ist nur ein Rahmen.
@@ -2098,7 +2098,7 @@ BOOL SwFEShell::EndMark()
SwFlyFrm* pOldSelFly = ::GetFlyFromMarked( &rMrkList, this );
if ( rMrkList.GetMarkCount() > 1 )
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if( pObj->ISA(SwVirtFlyDrawObj) )
@@ -2106,7 +2106,7 @@ BOOL SwFEShell::EndMark()
if ( !bShowHdl )
{
//HMHpDView->HideMarkHdl();
- bShowHdl = TRUE;
+ bShowHdl = sal_True;
}
rMrkList.DeleteMark( i );
--i; //keinen auslassen.
@@ -2123,7 +2123,7 @@ BOOL SwFEShell::EndMark()
if ( rMrkList.GetMarkCount() )
::lcl_GrabCursor(this, pOldSelFly);
else
- bRet = FALSE;
+ bRet = sal_False;
}
if ( bRet )
::FrameNotify( this, FLY_DRAG_START );
@@ -2168,7 +2168,7 @@ short SwFEShell::GetAnchorId() const
if ( Imp()->HasDrawView() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( pObj->ISA(SwVirtFlyDrawObj) )
@@ -2201,7 +2201,7 @@ short SwFEShell::GetAnchorId() const
|*
*************************************************************************/
-void SwFEShell::ChgAnchor( int eAnchorId, BOOL bSameOnly, BOOL bPosCorr )
+void SwFEShell::ChgAnchor( int eAnchorId, sal_Bool bSameOnly, sal_Bool bPosCorr )
{
ASSERT( Imp()->HasDrawView(), "ChgAnchor without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
@@ -2310,12 +2310,12 @@ Point SwFEShell::GetObjAbsPos() const
|*
*************************************************************************/
-BOOL SwFEShell::IsGroupSelected()
+sal_Bool SwFEShell::IsGroupSelected()
{
if ( IsObjSelected() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
// OD 30.06.2003 #108784# - consider 'virtual' drawing objects.
@@ -2327,11 +2327,11 @@ BOOL SwFEShell::IsGroupSelected()
FLY_AS_CHAR != ((SwDrawContact*)GetUserCall(pObj))->
GetFmt()->GetAnchor().GetAnchorId() )
{
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
// OD 27.06.2003 #108784# - change return type.
@@ -2347,7 +2347,7 @@ bool SwFEShell::IsGroupAllowed() const
const SdrObject* pUpGroup = 0L;
const SwFrm* pHeaderFooterFrm = 0L;
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; bIsGroupAllowed && i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; bIsGroupAllowed && i < rMrkList.GetMarkCount(); ++i )
{
const SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( i )
@@ -2471,7 +2471,7 @@ void SwFEShell::UnGroupSelection()
|*
*************************************************************************/
-void SwFEShell::MirrorSelection( BOOL bHorizontal )
+void SwFEShell::MirrorSelection( sal_Bool bHorizontal )
{
SdrView *pView = Imp()->GetDrawView();
if ( IsObjSelected() && pView->IsMirrorAllowed() )
@@ -2485,10 +2485,10 @@ void SwFEShell::MirrorSelection( BOOL bHorizontal )
// springe zum benannten Rahmen (Grafik/OLE)
-BOOL SwFEShell::GotoFly( const String& rName, FlyCntType eType, BOOL bSelFrm )
+sal_Bool SwFEShell::GotoFly( const String& rName, FlyCntType eType, sal_Bool bSelFrm )
{
- BOOL bRet = FALSE;
-static BYTE __READONLY_DATA aChkArr[ 4 ] = {
+ sal_Bool bRet = sal_False;
+static sal_uInt8 __READONLY_DATA aChkArr[ 4 ] = {
/* FLYCNTTYPE_ALL */ 0,
/* FLYCNTTYPE_FRM */ ND_TEXTNODE,
/* FLYCNTTYPE_GRF */ ND_GRFNODE,
@@ -2531,19 +2531,19 @@ static BYTE __READONLY_DATA aChkArr[ 4 ] = {
GetCrsrDocPos() = rChrRect.Pos();
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-USHORT SwFEShell::GetFlyCount( FlyCntType eType ) const
+sal_uInt16 SwFEShell::GetFlyCount( FlyCntType eType ) const
{
return GetDoc()->GetFlyCount(eType);
}
-const SwFrmFmt* SwFEShell::GetFlyNum(USHORT nIdx, FlyCntType eType ) const
+const SwFrmFmt* SwFEShell::GetFlyNum(sal_uInt16 nIdx, FlyCntType eType ) const
{
return GetDoc()->GetFlyNum(nIdx, eType );
}
@@ -2562,14 +2562,14 @@ void SwFEShell::MakeSelVisible()
//Welcher Schutz ist am selektierten Objekt gesetzt?
-BYTE SwFEShell::IsSelObjProtected( USHORT eType ) const
+sal_uInt8 SwFEShell::IsSelObjProtected( sal_uInt16 eType ) const
{
int nChk = 0;
const bool bParent = (eType & FLYPROTECT_PARENT);
if( Imp()->HasDrawView() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for( ULONG i = rMrkList.GetMarkCount(); i; )
+ for( sal_uLong i = rMrkList.GetMarkCount(); i; )
{
SdrObject *pObj = rMrkList.GetMark( --i )->GetMarkedSdrObj();
if( !bParent )
@@ -2608,7 +2608,7 @@ BYTE SwFEShell::IsSelObjProtected( USHORT eType ) const
}
nChk &= eType;
if( nChk == eType )
- return static_cast<BYTE>(eType);
+ return static_cast<sal_uInt8>(eType);
}
const SwFrm* pAnch;
if( pObj->ISA(SwVirtFlyDrawObj) )
@@ -2619,19 +2619,19 @@ BYTE SwFEShell::IsSelObjProtected( USHORT eType ) const
pAnch = pTmp ? pTmp->GetAnchorFrm( pObj ) : NULL;
}
if( pAnch && pAnch->IsProtected() )
- return static_cast<BYTE>(eType);
+ return static_cast<sal_uInt8>(eType);
}
}
- return static_cast<BYTE>(nChk);
+ return static_cast<sal_uInt8>(nChk);
}
-BOOL SwFEShell::GetObjAttr( SfxItemSet &rSet ) const
+sal_Bool SwFEShell::GetObjAttr( SfxItemSet &rSet ) const
{
if ( !IsObjSelected() )
- return FALSE;
+ return sal_False;
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
@@ -2646,23 +2646,23 @@ BOOL SwFEShell::GetObjAttr( SfxItemSet &rSet ) const
}
// <--
}
- return TRUE;
+ return sal_True;
}
-BOOL SwFEShell::SetObjAttr( const SfxItemSet& rSet )
+sal_Bool SwFEShell::SetObjAttr( const SfxItemSet& rSet )
{
SET_CURR_SHELL( this );
if ( !rSet.Count() )
{ ASSERT( !this, "SetObjAttr, empty set." );
- return FALSE;
+ return sal_False;
}
StartAllAction();
StartUndo( UNDO_INSATTR );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
@@ -2672,15 +2672,15 @@ BOOL SwFEShell::SetObjAttr( const SfxItemSet& rSet )
EndUndo( UNDO_INSATTR );
EndAllActionAndCall();
GetDoc()->SetModified();
- return TRUE;
+ return sal_True;
}
-BOOL SwFEShell::IsAlignPossible() const
+sal_Bool SwFEShell::IsAlignPossible() const
{
- USHORT nCnt;
+ sal_uInt16 nCnt;
if ( 0 < (nCnt = IsObjSelected()) )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( nCnt == 1 )
{
SdrObject *pO = Imp()->GetDrawView()->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
@@ -2691,7 +2691,7 @@ BOOL SwFEShell::IsAlignPossible() const
if ( bRet )
return Imp()->GetDrawView()->IsAlignPossible();
}
- return FALSE;
+ return sal_False;
}
@@ -2701,7 +2701,7 @@ void SwFEShell::CheckUnboundObjects()
SET_CURR_SHELL( this );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( !GetUserCall(pObj) )
@@ -2722,14 +2722,14 @@ void SwFEShell::CheckUnboundObjects()
//Fremde Identifier sollen in den Default laufen.
//Ueberschneidungen sind moeglich!!
- UINT16 nIdent =
+ sal_uInt16 nIdent =
Imp()->GetDrawView()->GetCurrentObjInventor() == SdrInventor ?
Imp()->GetDrawView()->GetCurrentObjIdentifier() : 0xFFFF;
SwFmtAnchor aAnch;
const SwFrm *pAnch = 0;
{
- pAnch = ::FindAnchor( pPage, aPt, TRUE );
+ pAnch = ::FindAnchor( pPage, aPt, sal_True );
SwPosition aPos( *((SwCntntFrm*)pAnch)->GetNode() );
aAnch.SetType( FLY_AT_PARA );
aAnch.SetAnchor( &aPos );
@@ -2789,7 +2789,7 @@ int SwFEShell::Chainable( SwRect &rRect, const SwFrmFmt &rSource,
SdrObject* pObj;
SdrPageView* pPView;
SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView();
- const USHORT nOld = pDView->GetHitTolerancePixel();
+ const sal_uInt16 nOld = pDView->GetHitTolerancePixel();
pDView->SetHitTolerancePixel( 0 );
if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SDRSEARCH_PICKMARKABLE ) &&
pObj->ISA(SwVirtFlyDrawObj) )
@@ -2824,7 +2824,7 @@ int SwFEShell::Chain( SwFrmFmt &rSource, const Point &rPt )
SdrObject* pObj;
SdrPageView* pPView;
SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView();
- const USHORT nOld = pDView->GetHitTolerancePixel();
+ const sal_uInt16 nOld = pDView->GetHitTolerancePixel();
pDView->SetHitTolerancePixel( 0 );
pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SDRSEARCH_PICKMARKABLE );
pDView->SetHitTolerancePixel( nOld );
@@ -2862,15 +2862,15 @@ void SwFEShell::HideChainMarker()
void SwFEShell::SetChainMarker()
{
- BOOL bDelFrom = TRUE,
- bDelTo = TRUE;
+ sal_Bool bDelFrom = sal_True,
+ bDelTo = sal_True;
if ( IsFrmSelected() )
{
SwFlyFrm *pFly = FindFlyFrm();
if ( pFly->GetPrevLink() )
{
- bDelFrom = FALSE;
+ bDelFrom = sal_False;
const SwFrm *pPre = pFly->GetPrevLink();
Point aStart( pPre->Frm().Right(), pPre->Frm().Bottom());
@@ -2883,7 +2883,7 @@ void SwFEShell::SetChainMarker()
}
if ( pFly->GetNextLink() )
{
- bDelTo = FALSE;
+ bDelTo = sal_False;
const SwFlyFrm *pNxt = pFly->GetNextLink();
Point aStart( pFly->Frm().Right(), pFly->Frm().Bottom());
@@ -2941,8 +2941,8 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const
/* -----------------------------2002/06/24 15:07------------------------------
---------------------------------------------------------------------------*/
-void SwFEShell::CreateDefaultShape( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect,
- USHORT nSlotId)
+void SwFEShell::CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect,
+ sal_uInt16 nSlotId)
{
SdrView* pDrawView = GetDrawView();
SdrModel* pDrawModel = pDrawView->GetModel();
@@ -3070,7 +3070,7 @@ void SwFEShell::CreateDefaultShape( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, cons
}
else if(pObj->ISA(SdrCaptionObj))
{
- BOOL bVerticalText = ( SID_DRAW_TEXT_VERTICAL == nSlotId ||
+ sal_Bool bVerticalText = ( SID_DRAW_TEXT_VERTICAL == nSlotId ||
SID_DRAW_CAPTION_VERTICAL == nSlotId );
((SdrTextObj*)pObj)->SetVerticalWriting(bVerticalText);
if(bVerticalText)
@@ -3098,8 +3098,8 @@ void SwFEShell::CreateDefaultShape( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, cons
if(bVertical)
{
SfxItemSet aSet(pDrawModel->GetItemPool());
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP));
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
pText->SetMergedItemSet(aSet);
@@ -3108,12 +3108,12 @@ void SwFEShell::CreateDefaultShape( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, cons
if(bMarquee)
{
SfxItemSet aSet(pDrawModel->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
- aSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
- aSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( sal_False ) );
aSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) );
aSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
aSet.Put( SdrTextAniCountItem( 1 ) );
- aSet.Put( SdrTextAniAmountItem( (INT16)GetWin()->PixelToLogic(Size(2,1)).Width()) );
+ aSet.Put( SdrTextAniAmountItem( (sal_Int16)GetWin()->PixelToLogic(Size(2,1)).Width()) );
pObj->SetMergedItemSetAndBroadcast(aSet);
}
}
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index ad2e077e5d7c..c94602e66177 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -80,8 +80,8 @@ using namespace ::com::sun::star;
//siehe auch swtable.cxx
#define COLFUZZY 20L
-inline BOOL IsSame( long nA, long nB ) { return Abs(nA-nB) <= COLFUZZY; }
-inline BOOL IsNear( long nA, long nB, long nTolerance ) { return Abs( nA - nB ) <= nTolerance; }
+inline sal_Bool IsSame( long nA, long nB ) { return Abs(nA-nB) <= COLFUZZY; }
+inline sal_Bool IsNear( long nA, long nB, long nTolerance ) { return Abs( nA - nB ) <= nTolerance; }
// table column cache
SwTabCols *pLastCols = 0;
@@ -100,17 +100,17 @@ class TblWait
{
SwWait *pWait;
public:
- TblWait( USHORT nCnt, SwFrm *pFrm, SwDocShell &rDocShell, USHORT nCnt2 = 0);
+ TblWait( sal_uInt16 nCnt, SwFrm *pFrm, SwDocShell &rDocShell, sal_uInt16 nCnt2 = 0);
~TblWait() { delete pWait; }
};
-TblWait::TblWait( USHORT nCnt, SwFrm *pFrm, SwDocShell &rDocShell, USHORT nCnt2):
+TblWait::TblWait( sal_uInt16 nCnt, SwFrm *pFrm, SwDocShell &rDocShell, sal_uInt16 nCnt2):
pWait( 0 )
{
- BOOL bWait = 20 < nCnt || 20 < nCnt2 || (pFrm &&
+ sal_Bool bWait = 20 < nCnt || 20 < nCnt2 || (pFrm &&
20 < pFrm->ImplFindTabFrm()->GetTable()->GetTabLines().Count());
if( bWait )
- pWait = new SwWait( rDocShell, TRUE );
+ pWait = new SwWait( rDocShell, sal_True );
}
@@ -205,18 +205,18 @@ void SwFEShell::ParkCursorInTab()
#* Datum : MA 03. May. 93
#* Update : MA 19. Apr. 95
#***********************************************************************/
-BOOL SwFEShell::InsertRow( USHORT nCnt, BOOL bBehind )
+sal_Bool SwFEShell::InsertRow( sal_uInt16 nCnt, sal_Bool bBehind )
{
// pruefe ob vom aktuellen Crsr der Point/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
SET_CURR_SHELL( this );
@@ -228,7 +228,7 @@ BOOL SwFEShell::InsertRow( USHORT nCnt, BOOL bBehind )
TblWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.Count() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( aBoxes.Count() )
bRet = GetDoc()->InsertRow( aBoxes, nCnt, bBehind );
@@ -236,18 +236,18 @@ BOOL SwFEShell::InsertRow( USHORT nCnt, BOOL bBehind )
return bRet;
}
-BOOL SwFEShell::InsertCol( USHORT nCnt, BOOL bBehind )
+sal_Bool SwFEShell::InsertCol( sal_uInt16 nCnt, sal_Bool bBehind )
{
// pruefe ob vom aktuellen Crsr der Point/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
SET_CURR_SHELL( this );
@@ -256,7 +256,7 @@ BOOL SwFEShell::InsertCol( USHORT nCnt, BOOL bBehind )
{
ErrorHandler::HandleError( ERR_TBLINSCOL_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
StartAllAction();
@@ -266,7 +266,7 @@ BOOL SwFEShell::InsertCol( USHORT nCnt, BOOL bBehind )
TblWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.Count() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aBoxes.Count() )
bRet = GetDoc()->InsertCol( aBoxes, nCnt, bBehind );
@@ -284,11 +284,11 @@ BOOL SwFEShell::InsertCol( USHORT nCnt, BOOL bBehind )
/**
Determines if the current cursor is in the last row of the table.
*/
-BOOL SwFEShell::IsLastCellInRow() const
+sal_Bool SwFEShell::IsLastCellInRow() const
{
SwTabCols aTabCols;
GetTabCols( aTabCols );
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
if (IsTableRightToLeft())
/* If the table is right-to-left the last row is the most left one. */
@@ -300,25 +300,25 @@ BOOL SwFEShell::IsLastCellInRow() const
return bResult;
}
-BOOL SwFEShell::DeleteCol()
+sal_Bool SwFEShell::DeleteCol()
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
SET_CURR_SHELL( this );
StartAllAction();
// lasse ueber das Layout die Boxen suchen
- BOOL bRet;
+ sal_Bool bRet;
SwSelBoxes aBoxes;
GetTblSel( *this, aBoxes, nsSwTblSearchType::TBLSEARCH_COL );
if ( aBoxes.Count() )
@@ -340,31 +340,31 @@ BOOL SwFEShell::DeleteCol()
}
else
- bRet = FALSE;
+ bRet = sal_False;
EndAllActionAndCall();
return bRet;
}
-BOOL SwFEShell::DeleteRow()
+sal_Bool SwFEShell::DeleteRow()
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
SET_CURR_SHELL( this );
StartAllAction();
// lasse ueber das Layout die Boxen suchen
- BOOL bRet;
+ sal_Bool bRet;
SwSelBoxes aBoxes;
GetTblSel( *this, aBoxes, nsSwTblSearchType::TBLSEARCH_ROW );
@@ -390,7 +390,7 @@ BOOL SwFEShell::DeleteRow()
if( !aFndBox.GetLines().Count() )
{
EndAllActionAndCall();
- return FALSE;
+ return sal_False;
}
KillPams();
@@ -416,7 +416,7 @@ BOOL SwFEShell::DeleteRow()
pDelBox = pLn->GetTabBoxes()[ pLn->GetTabBoxes().Count() - 1 ];
}
SwTableBox* pNextBox = pDelLine->FindNextBox( pTblNd->GetTable(),
- pDelBox, TRUE );
+ pDelBox, sal_True );
while( pNextBox &&
pNextBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
pNextBox = pNextBox->FindNextBox( pTblNd->GetTable(), pNextBox );
@@ -428,13 +428,13 @@ BOOL SwFEShell::DeleteRow()
while( !pDelBox->GetSttNd() )
pDelBox = pDelBox->GetTabLines()[0]->GetTabBoxes()[0];
pNextBox = pDelLine->FindPreviousBox( pTblNd->GetTable(),
- pDelBox, TRUE );
+ pDelBox, sal_True );
while( pNextBox &&
pNextBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
pNextBox = pNextBox->FindPreviousBox( pTblNd->GetTable(), pNextBox );
}
- ULONG nIdx;
+ sal_uLong nIdx;
if( pNextBox ) // dann den Cursor hier hinein
nIdx = pNextBox->GetSttIdx() + 1;
else // ansonsten hinter die Tabelle
@@ -461,7 +461,7 @@ BOOL SwFEShell::DeleteRow()
EndUndo(UNDO_ROW_DELETE);
}
else
- bRet = FALSE;
+ bRet = sal_False;
EndAllActionAndCall();
return bRet;
@@ -474,10 +474,10 @@ BOOL SwFEShell::DeleteRow()
#* Update : MA 19. Apr. 95
#***********************************************************************/
-USHORT SwFEShell::MergeTab()
+sal_uInt16 SwFEShell::MergeTab()
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
- USHORT nRet = TBLMERGE_NOSELECTION;
+ sal_uInt16 nRet = TBLMERGE_NOSELECTION;
if( IsTableMode() )
{
SwShellTableCrsr* pTableCrsr = GetTableCrsr();
@@ -505,18 +505,18 @@ USHORT SwFEShell::MergeTab()
return nRet;
}
-BOOL SwFEShell::SplitTab( BOOL bVert, USHORT nCnt, BOOL bSameHeight )
+sal_Bool SwFEShell::SplitTab( sal_Bool bVert, sal_uInt16 nCnt, sal_Bool bSameHeight )
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
SET_CURR_SHELL( this );
@@ -525,11 +525,11 @@ BOOL SwFEShell::SplitTab( BOOL bVert, USHORT nCnt, BOOL bSameHeight )
{
ErrorHandler::HandleError( ERR_TBLSPLIT_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
StartAllAction();
// lasse ueber das Layout die Boxen suchen
- BOOL bRet;
+ sal_Bool bRet;
SwSelBoxes aBoxes;
GetTblSel( *this, aBoxes );
if( aBoxes.Count() )
@@ -543,7 +543,7 @@ BOOL SwFEShell::SplitTab( BOOL bVert, USHORT nCnt, BOOL bSameHeight )
DELETEZ( pLastRows );
}
else
- bRet = FALSE;
+ bRet = sal_False;
EndAllActionAndCall();
return bRet;
}
@@ -561,16 +561,16 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const
if ( pLastCols )
{
//Paar Kleinigkeiten muessen wir schon noch sicherstellen
- BOOL bDel = TRUE;
+ sal_Bool bDel = sal_True;
if ( pColumnCacheLastTable == pTab->GetTable() )
{
- bDel = FALSE;
+ bDel = sal_False;
SWRECTFN( pTab )
const SwPageFrm* pPage = pTab->FindPageFrm();
- const ULONG nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() -
+ const sal_uLong nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() -
(pPage->Frm().*fnRect->fnGetLeft)();
- const ULONG nRightMax = (pTab->Frm().*fnRect->fnGetRight)() -
+ const sal_uLong nRightMax = (pTab->Frm().*fnRect->fnGetRight)() -
(pPage->Frm().*fnRect->fnGetLeft)();
if ( pColumnCacheLastTabFrm != pTab )
@@ -590,25 +590,25 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const
pColumnCacheLastTabFrm = pTab;
}
else
- bDel = TRUE;
+ bDel = sal_True;
}
if ( !bDel &&
- pLastCols->GetLeftMin () == (USHORT)nLeftMin &&
- pLastCols->GetLeft () == (USHORT)(pTab->Prt().*fnRect->fnGetLeft)() &&
- pLastCols->GetRight () == (USHORT)(pTab->Prt().*fnRect->fnGetRight)()&&
- pLastCols->GetRightMax() == (USHORT)nRightMax - pLastCols->GetLeftMin() )
+ pLastCols->GetLeftMin () == (sal_uInt16)nLeftMin &&
+ pLastCols->GetLeft () == (sal_uInt16)(pTab->Prt().*fnRect->fnGetLeft)() &&
+ pLastCols->GetRight () == (sal_uInt16)(pTab->Prt().*fnRect->fnGetRight)()&&
+ pLastCols->GetRightMax() == (sal_uInt16)nRightMax - pLastCols->GetLeftMin() )
{
if ( pColumnCacheLastCellFrm != pBox )
{
pTab->GetTable()->GetTabCols( *pLastCols,
- ((SwCellFrm*)pBox)->GetTabBox(), TRUE);
+ ((SwCellFrm*)pBox)->GetTabBox(), sal_True);
pColumnCacheLastCellFrm = pBox;
}
rToFill = *pLastCols;
}
else
- bDel = TRUE;
+ bDel = sal_True;
}
if ( bDel )
DELETEZ(pLastCols);
@@ -625,7 +625,7 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const
#if OSL_DEBUG_LEVEL > 1
SwTabColsEntry aEntry;
- for ( USHORT i = 0; i < rToFill.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rToFill.Count(); ++i )
{
aEntry = rToFill.GetEntry( i );
(void)aEntry;
@@ -645,10 +645,10 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const
if ( pLastRows )
{
//Paar Kleinigkeiten muessen wir schon noch sicherstellen
- BOOL bDel = TRUE;
+ sal_Bool bDel = sal_True;
if ( pRowCacheLastTable == pTab->GetTable() )
{
- bDel = FALSE;
+ bDel = sal_False;
SWRECTFN( pTab )
const SwPageFrm* pPage = pTab->FindPageFrm();
const long nLeftMin = ( bVert ?
@@ -660,7 +660,7 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const
if ( pRowCacheLastTabFrm != pTab ||
pRowCacheLastCellFrm != pBox )
- bDel = TRUE;
+ bDel = sal_True;
if ( !bDel &&
pLastRows->GetLeftMin () == nLeftMin &&
@@ -671,7 +671,7 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const
rToFill = *pLastRows;
}
else
- bDel = TRUE;
+ bDel = sal_True;
}
if ( bDel )
DELETEZ(pLastRows);
@@ -693,7 +693,7 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const
#* Datum : MA 03. May. 93
#* Update : MA 18. May. 93
#***********************************************************************/
-void SwFEShell::SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly )
+void SwFEShell::SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly )
{
SwFrm *pBox = GetCurrFrm();
if( !pBox || !pBox->IsInTab() )
@@ -739,7 +739,7 @@ void SwFEShell::GetTabRows( SwTabCols &rToFill ) const
/*-- 19.01.2004 08:56:44---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwFEShell::SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly )
+void SwFEShell::SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly )
{
SwFrm *pBox = GetCurrFrm();
if( !pBox || !pBox->IsInTab() )
@@ -767,7 +767,7 @@ void SwFEShell::GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const
/*-- 19.01.2004 08:59:45---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const Point &rPt )
+void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const Point &rPt )
{
const SwFrm *pBox = GetBox( rPt );
if( pBox )
@@ -822,12 +822,12 @@ void SwFEShell::GetRowHeight( SwFmtFrmSize *& rpSz ) const
GetDoc()->GetRowHeight( *getShellCrsr( false ), rpSz );
}
-BOOL SwFEShell::BalanceRowHeight( BOOL bTstOnly )
+sal_Bool SwFEShell::BalanceRowHeight( sal_Bool bTstOnly )
{
SET_CURR_SHELL( this );
if( !bTstOnly )
StartAllAction();
- BOOL bRet = GetDoc()->BalanceRowHeight( *getShellCrsr( false ), bTstOnly );
+ sal_Bool bRet = GetDoc()->BalanceRowHeight( *getShellCrsr( false ), bTstOnly );
if( !bTstOnly )
EndAllActionAndCall();
return bRet;
@@ -847,7 +847,7 @@ void SwFEShell::SetRowBackground( const SvxBrushItem &rNew )
/******************************************************************************
* SwTwips SwFEShell::GetRowBackground() const
******************************************************************************/
-BOOL SwFEShell::GetRowBackground( SvxBrushItem &rToFill ) const
+sal_Bool SwFEShell::GetRowBackground( SvxBrushItem &rToFill ) const
{
return GetDoc()->GetRowBackground( *getShellCrsr( false ), rToFill );
}
@@ -867,7 +867,7 @@ void SwFEShell::SetTabBorders( const SfxItemSet& rSet )
EndAllActionAndCall();
}
-void SwFEShell::SetTabLineStyle( const Color* pColor, BOOL bSetLine,
+void SwFEShell::SetTabLineStyle( const Color* pColor, sal_Bool bSetLine,
const SvxBorderLine* pBorderLine )
{
SET_CURR_SHELL( this );
@@ -897,7 +897,7 @@ void SwFEShell::SetBoxBackground( const SvxBrushItem &rNew )
EndAllActionAndCall();
}
-BOOL SwFEShell::GetBoxBackground( SvxBrushItem &rToFill ) const
+sal_Bool SwFEShell::GetBoxBackground( SvxBrushItem &rToFill ) const
{
return GetDoc()->GetBoxAttr( *getShellCrsr( false ), rToFill );
}
@@ -916,7 +916,7 @@ void SwFEShell::SetBoxDirection( const SvxFrameDirectionItem& rNew )
EndAllActionAndCall();
}
-BOOL SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const
+sal_Bool SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const
{
return GetDoc()->GetBoxAttr( *getShellCrsr( false ), rToFill );
}
@@ -927,7 +927,7 @@ BOOL SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const
#* Datum : MA 18. Dec. 96
#* Update : JP 29.04.98
#***********************************************************************/
-void SwFEShell::SetBoxAlign( USHORT nAlign )
+void SwFEShell::SetBoxAlign( sal_uInt16 nAlign )
{
SET_CURR_SHELL( this );
StartAllAction();
@@ -935,7 +935,7 @@ void SwFEShell::SetBoxAlign( USHORT nAlign )
EndAllActionAndCall();
}
-USHORT SwFEShell::GetBoxAlign() const
+sal_uInt16 SwFEShell::GetBoxAlign() const
{
return GetDoc()->GetBoxAlign( *getShellCrsr( false ) );
}
@@ -973,7 +973,7 @@ void SwFEShell::GetTabBackground( SvxBrushItem &rToFill ) const
#* Datum : MA 18. May. 93
#* Update : MA 20. Jul. 93
#***********************************************************************/
-BOOL SwFEShell::HasWholeTabSelection() const
+sal_Bool SwFEShell::HasWholeTabSelection() const
{
//Ist die ganze Tabelle Selektiert?
if ( IsTableMode() )
@@ -989,24 +989,24 @@ BOOL SwFEShell::HasWholeTabSelection() const
== pTblNd->EndOfSectionIndex() );
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SwFEShell::HasBoxSelection() const
+sal_Bool SwFEShell::HasBoxSelection() const
{
if(!IsCrsrInTbl())
- return FALSE;
+ return sal_False;
//Ist die ganze Tabelle Selektiert?
if( IsTableMode() )
- return TRUE;
+ return sal_True;
SwPaM* pPam = GetCrsr();
// leere Boxen gelten auch ohne Selektion als selektiert
// if( !pPam->HasMark() )
-// return FALSE;
- BOOL bChg = FALSE;
+// return sal_False;
+ sal_Bool bChg = sal_False;
if( pPam->GetPoint() == pPam->End())
{
- bChg = TRUE;
+ bChg = sal_True;
pPam->Exchange();
}
SwNode* pNd;
@@ -1027,12 +1027,12 @@ BOOL SwFEShell::HasBoxSelection() const
{
if( bChg )
pPam->Exchange();
- return TRUE;
+ return sal_True;
}
}
if( bChg )
pPam->Exchange();
- return FALSE;
+ return sal_False;
}
/***********************************************************************
@@ -1044,7 +1044,7 @@ BOOL SwFEShell::HasBoxSelection() const
void SwFEShell::ProtectCells()
{
SvxProtectItem aProt( RES_PROTECT );
- aProt.SetCntntProtect( TRUE );
+ aProt.SetCntntProtect( sal_True );
SET_CURR_SHELL( this );
StartAllAction();
@@ -1096,16 +1096,16 @@ void SwFEShell::UnProtectTbls()
EndAllActionAndCall();
}
-BOOL SwFEShell::HasTblAnyProtection( const String* pTblName,
- BOOL* pFullTblProtection )
+sal_Bool SwFEShell::HasTblAnyProtection( const String* pTblName,
+ sal_Bool* pFullTblProtection )
{
return GetDoc()->HasTblAnyProtection( GetCrsr()->GetPoint(), pTblName,
pFullTblProtection );
}
-BOOL SwFEShell::CanUnProtectCells() const
+sal_Bool SwFEShell::CanUnProtectCells() const
{
- BOOL bUnProtectAvailable = FALSE;
+ sal_Bool bUnProtectAvailable = sal_False;
const SwTableNode *pTblNd = IsCrsrInTbl();
if( pTblNd && !pTblNd->IsProtect() )
{
@@ -1134,7 +1134,7 @@ BOOL SwFEShell::CanUnProtectCells() const
#* Class : SwFEShell
#* Methoden : GetRowsToRepeat(), SetRowsToRepeat()
#***********************************************************************/
-USHORT SwFEShell::GetRowsToRepeat() const
+sal_uInt16 SwFEShell::GetRowsToRepeat() const
{
const SwFrm *pFrm = GetCurrFrm();
const SwTabFrm *pTab = pFrm ? pFrm->FindTabFrm() : 0;
@@ -1143,13 +1143,13 @@ USHORT SwFEShell::GetRowsToRepeat() const
return 0;
}
-void SwFEShell::SetRowsToRepeat( USHORT nSet )
+void SwFEShell::SetRowsToRepeat( sal_uInt16 nSet )
{
SwFrm *pFrm = GetCurrFrm();
SwTabFrm *pTab = pFrm ? pFrm->FindTabFrm() : 0;
if( pTab && pTab->GetTable()->GetRowsToRepeat() != nSet )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
SET_CURR_SHELL( this );
StartAllAction();
GetDoc()->SetRowsToRepeat( *pTab->GetTable(), nSet );
@@ -1159,15 +1159,15 @@ void SwFEShell::SetRowsToRepeat( USHORT nSet )
/*-- 30.06.2004 08:46:35---------------------------------------------------
returns the number of rows consecutively selected from top
-----------------------------------------------------------------------*/
-USHORT lcl_GetRowNumber( const SwPosition& rPos )
+sal_uInt16 lcl_GetRowNumber( const SwPosition& rPos )
{
- USHORT nRet = USHRT_MAX;
+ sal_uInt16 nRet = USHRT_MAX;
Point aTmpPt;
const SwCntntNode *pNd;
const SwCntntFrm *pFrm;
if( 0 != ( pNd = rPos.nNode.GetNode().GetCntntNode() ))
- pFrm = pNd->GetFrm( &aTmpPt, &rPos, FALSE );
+ pFrm = pNd->GetFrm( &aTmpPt, &rPos, sal_False );
else
pFrm = 0;
@@ -1180,7 +1180,7 @@ USHORT lcl_GetRowNumber( const SwPosition& rPos )
const SwTabFrm* pTabFrm = (const SwTabFrm*)pRow->GetUpper();
const SwTableLine* pTabLine = static_cast<const SwRowFrm*>(pRow)->GetTabLine();
- USHORT nI = 0;
+ sal_uInt16 nI = 0;
while ( nI < pTabFrm->GetTable()->GetTabLines().Count() )
{
if ( pTabFrm->GetTable()->GetTabLines()[ nI ] == pTabLine )
@@ -1194,11 +1194,11 @@ USHORT lcl_GetRowNumber( const SwPosition& rPos )
return nRet;
}
-USHORT SwFEShell::GetRowSelectionFromTop() const
+sal_uInt16 SwFEShell::GetRowSelectionFromTop() const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
const SwPaM* pPaM = IsTableMode() ? GetTableCrsr() : _GetCrsr();
- const USHORT nPtLine = lcl_GetRowNumber( *pPaM->GetPoint() );
+ const sal_uInt16 nPtLine = lcl_GetRowNumber( *pPaM->GetPoint() );
if ( !IsTableMode() )
{
@@ -1206,7 +1206,7 @@ USHORT SwFEShell::GetRowSelectionFromTop() const
}
else
{
- const USHORT nMkLine = lcl_GetRowNumber( *pPaM->GetMark() );
+ const sal_uInt16 nMkLine = lcl_GetRowNumber( *pPaM->GetMark() );
if ( ( nPtLine == 0 && nMkLine != USHRT_MAX ) ||
( nMkLine == 0 && nPtLine != USHRT_MAX ) )
@@ -1227,9 +1227,9 @@ USHORT SwFEShell::GetRowSelectionFromTop() const
* returns true if the current frame is localed inside a table headline OR
* inside the first line of a table!!!
*/
-BOOL SwFEShell::CheckHeadline( bool bRepeat ) const
+sal_Bool SwFEShell::CheckHeadline( bool bRepeat ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !IsTableMode() )
{
SwFrm *pFrm = GetCurrFrm(); // DONE MULTIIHEADER
@@ -1257,7 +1257,7 @@ BOOL SwFEShell::CheckHeadline( bool bRepeat ) const
#* Update : MA 27. Jul. 95
#***********************************************************************/
-void SwFEShell::AdjustCellWidth( BOOL bBalance )
+void SwFEShell::AdjustCellWidth( sal_Bool bBalance )
{
SET_CURR_SHELL( this );
StartAllAction();
@@ -1270,14 +1270,14 @@ void SwFEShell::AdjustCellWidth( BOOL bBalance )
EndAllActionAndCall();
}
-BOOL SwFEShell::IsAdjustCellWidthAllowed( BOOL bBalance ) const
+sal_Bool SwFEShell::IsAdjustCellWidthAllowed( sal_Bool bBalance ) const
{
//Es muss mindestens eine Zelle mit Inhalt in der Selektion enthalten
//sein.
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
SwSelBoxes aBoxes;
::GetTblSelCrs( *this, aBoxes );
@@ -1294,7 +1294,7 @@ BOOL SwFEShell::IsAdjustCellWidthAllowed( BOOL bBalance ) const
aBoxes.Insert( pBox );
}
- for ( USHORT i = 0; i < aBoxes.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aBoxes.Count(); ++i )
{
SwTableBox *pBox = aBoxes[i];
if ( pBox->GetSttNd() )
@@ -1307,21 +1307,21 @@ BOOL SwFEShell::IsAdjustCellWidthAllowed( BOOL bBalance ) const
while ( pCNd )
{
if ( pCNd->GetTxt().Len() )
- return TRUE;
+ return sal_True;
++aIdx;
pCNd = GetDoc()->GetNodes()[ aIdx ]->GetTxtNode();
}
}
}
- return FALSE;
+ return sal_False;
}
// AutoFormat fuer die Tabelle/TabellenSelection
-BOOL SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew )
+sal_Bool SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew )
{
SwTableNode *pTblNd = (SwTableNode*)IsCrsrInTbl();
if( !pTblNd || pTblNd->GetTable().IsTblComplex() )
- return FALSE;
+ return sal_False;
SwSelBoxes aBoxes;
@@ -1334,14 +1334,14 @@ BOOL SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew )
else
{
const SwTableSortBoxes& rTBoxes = pTblNd->GetTable().GetTabSortBoxes();
- for( USHORT n = 0; n < rTBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTBoxes.Count(); ++n )
{
SwTableBox* pBox = rTBoxes[ n ];
aBoxes.Insert( pBox );
}
}
- BOOL bRet;
+ sal_Bool bRet;
if( aBoxes.Count() )
{
SET_CURR_SHELL( this );
@@ -1352,15 +1352,15 @@ BOOL SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew )
EndAllActionAndCall();
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
-BOOL SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet )
+sal_Bool SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet )
{
const SwTableNode *pTblNd = IsCrsrInTbl();
if( !pTblNd || pTblNd->GetTable().IsTblComplex() )
- return FALSE;
+ return sal_False;
SwSelBoxes aBoxes;
@@ -1373,7 +1373,7 @@ BOOL SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet )
else
{
const SwTableSortBoxes& rTBoxes = pTblNd->GetTable().GetTabSortBoxes();
- for( USHORT n = 0; n < rTBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTBoxes.Count(); ++n )
{
SwTableBox* pBox = rTBoxes[ n ];
aBoxes.Insert( pBox );
@@ -1389,25 +1389,25 @@ BOOL SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet )
#* Datum : MA 03. May. 93
#* Update : MA 19. Apr. 95
#***********************************************************************/
-BOOL SwFEShell::DeleteTblSel()
+sal_Bool SwFEShell::DeleteTblSel()
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
SET_CURR_SHELL( this );
StartAllAction();
// lasse ueber das Layout die Boxen suchen
- BOOL bRet;
+ sal_Bool bRet;
SwSelBoxes aBoxes;
GetTblSelCrs( *this, aBoxes );
if( aBoxes.Count() )
@@ -1427,7 +1427,7 @@ BOOL SwFEShell::DeleteTblSel()
DELETEZ( pLastRows );
}
else
- bRet = FALSE;
+ bRet = sal_False;
EndAllActionAndCall();
return bRet;
}
@@ -1440,10 +1440,10 @@ BOOL SwFEShell::DeleteTblSel()
|* Letzte Aenderung MA 21. May. 95
|
|*************************************************************************/
-USHORT SwFEShell::GetCurTabColNum() const
+sal_uInt16 SwFEShell::GetCurTabColNum() const
{
//!!!GetCurMouseTabColNum() mitpflegen!!!!
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
SwFrm *pFrm = GetCurrFrm();
ASSERT( pFrm, "Crsr geparkt?" );
@@ -1472,7 +1472,7 @@ USHORT SwFEShell::GetCurTabColNum() const
if ( !::IsSame( nX, nRight ) )
{
nX = nRight - nX + aTabCols.GetLeft();
- for ( USHORT i = 0; i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i )
if ( ::IsSame( nX, aTabCols[i] ) )
{
nRet = i + 1;
@@ -1489,7 +1489,7 @@ USHORT SwFEShell::GetCurTabColNum() const
if ( !::IsSame( nX, nLeft + aTabCols.GetLeft() ) )
{
- for ( USHORT i = 0; i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i )
if ( ::IsSame( nX, nLeft + aTabCols[i] ) )
{
nRet = i + 1;
@@ -1756,7 +1756,7 @@ const SwFrm* SwFEShell::GetBox( const Point &rPt, bool* pbRow, bool* pbCol ) con
//Erst die Flys checken.
if ( pPage->GetSortedObjs() )
{
- for ( USHORT i = 0; !pFrm && i < pPage->GetSortedObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; !pFrm && i < pPage->GetSortedObjs()->Count(); ++i )
{
SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
if ( pObj->ISA(SwFlyFrm) )
@@ -1915,7 +1915,7 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag
bool pbCol[2] = { 0, 0 };
// pEnd is set during dragging.
- for ( USHORT i = 0; i < ( pEnd ? 2 : 1 ); ++i )
+ for ( sal_uInt16 i = 0; i < ( pEnd ? 2 : 1 ); ++i )
{
const SwCellFrm* pFrm =
static_cast<const SwCellFrm*>(GetBox( paPt[i], &pbRow[i], &pbCol[i] ) );
@@ -1967,7 +1967,7 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag
*pCrsr->GetPoint() = *ppPos[0];
pCrsr->GetPtPos() = paPt[0];
- if ( !pCrsr->IsInProtectTable( FALSE, TRUE ) )
+ if ( !pCrsr->IsInProtectTable( sal_False, sal_True ) )
{
bool bNewSelection = true;
@@ -1981,7 +1981,7 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag
*pCrsr->GetPoint() = *ppPos[1];
pCrsr->GetPtPos() = paPt[1];
- if ( pCrsr->IsInProtectTable( FALSE, FALSE ) )
+ if ( pCrsr->IsInProtectTable( sal_False, sal_False ) )
{
pCrsr->RestoreSavePos();
bNewSelection = false;
@@ -2030,9 +2030,9 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag
|* Last change AMA 12. Jun. 02
|
|*************************************************************************/
-BYTE SwFEShell::WhichMouseTabCol( const Point &rPt ) const
+sal_uInt8 SwFEShell::WhichMouseTabCol( const Point &rPt ) const
{
- BYTE nRet = SW_TABCOL_NONE;
+ sal_uInt8 nRet = SW_TABCOL_NONE;
bool bRow = false;
bool bCol = false;
bool bSelect = false;
@@ -2122,9 +2122,9 @@ SwTxtNode * SwFEShell::GetNumRuleNodeAtPos( const Point &rPt)
return pResult;
}
-BOOL SwFEShell::IsNumLabel( const Point &rPt, int nMaxOffset )
+sal_Bool SwFEShell::IsNumLabel( const Point &rPt, int nMaxOffset )
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwContentAtPos aCntntAtPos
(SwContentAtPos::SW_NUMLABEL);
@@ -2133,7 +2133,7 @@ BOOL SwFEShell::IsNumLabel( const Point &rPt, int nMaxOffset )
{
if ((nMaxOffset >= 0 && aCntntAtPos.nDist <= nMaxOffset) ||
(nMaxOffset < 0))
- bResult = TRUE;
+ bResult = sal_True;
}
return bResult;
@@ -2184,7 +2184,7 @@ void SwFEShell::GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const
_GetTabCols( rToFill, pBox );
}
-void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
+void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly,
const Point &rPt )
{
const SwFrm *pBox = GetBox( rPt );
@@ -2205,16 +2205,16 @@ void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
|* Letzte Aenderung MA 04. Jul. 95
|
|*************************************************************************/
-USHORT SwFEShell::GetCurMouseColNum( const Point &rPt,
+sal_uInt16 SwFEShell::GetCurMouseColNum( const Point &rPt,
SwGetCurColNumPara* pPara ) const
{
return _GetCurColNum( GetBox( rPt ), pPara );
}
-USHORT SwFEShell::GetCurMouseTabColNum( const Point &rPt ) const
+sal_uInt16 SwFEShell::GetCurMouseTabColNum( const Point &rPt ) const
{
//!!!GetCurTabColNum() mitpflegen!!!!
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
const SwFrm *pFrm = GetBox( rPt );
ASSERT( pFrm, "Table not found" );
@@ -2230,7 +2230,7 @@ USHORT SwFEShell::GetCurMouseTabColNum( const Point &rPt ) const
if ( !::IsSame( nX, nLeft + aTabCols.GetLeft() ) )
{
- for ( USHORT i = 0; i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i )
if ( ::IsSame( nX, nLeft + aTabCols[i] ) )
{
nRet = i + 1;
@@ -2308,18 +2308,18 @@ bool lcl_GoTableRow( SwCrsrShell* pShell, bool bUp )
}
// aender eine Zellenbreite/-Hoehe/Spaltenbreite/Zeilenhoehe
-BOOL SwFEShell::SetColRowWidthHeight( USHORT eType, USHORT nDiff )
+sal_Bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff )
{
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
if( nsTblChgWidthHeightType::WH_FLAG_INSDEL & eType &&
pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
SET_CURR_SHELL( this );
@@ -2349,7 +2349,7 @@ BOOL SwFEShell::SetColRowWidthHeight( USHORT eType, USHORT nDiff )
if( (eType & (nsTblChgWidthHeightType::WH_FLAG_BIGGER | nsTblChgWidthHeightType::WH_FLAG_INSDEL)) ==
(nsTblChgWidthHeightType::WH_FLAG_BIGGER | nsTblChgWidthHeightType::WH_FLAG_INSDEL) )
{
- nDiff = USHORT((pFrm->Frm().*fnRect->fnGetWidth)());
+ nDiff = sal_uInt16((pFrm->Frm().*fnRect->fnGetWidth)());
// we must move the cursor outside the current cell before
// deleting the cells.
@@ -2379,7 +2379,7 @@ BOOL SwFEShell::SetColRowWidthHeight( USHORT eType, USHORT nDiff )
nLogDiff /= nPrtWidth;
/** The cells are destroyed in here */
- BOOL bRet = GetDoc()->SetColRowWidthHeight(
+ sal_Bool bRet = GetDoc()->SetColRowWidthHeight(
*(SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox(),
eType, nDiff, nLogDiff );
@@ -2415,44 +2415,44 @@ BOOL SwFEShell::SetColRowWidthHeight( USHORT eType, USHORT nDiff )
return bRet;
}
-BOOL lcl_IsFormulaSelBoxes( const SwTable& rTbl, const SwTblBoxFormula& rFml,
+sal_Bool lcl_IsFormulaSelBoxes( const SwTable& rTbl, const SwTblBoxFormula& rFml,
SwCellFrms& rCells )
{
SwTblBoxFormula aTmp( rFml );
SwSelBoxes aBoxes;
- for( USHORT nSelBoxes = aTmp.GetBoxesOfFormula( rTbl,aBoxes ); nSelBoxes; )
+ for( sal_uInt16 nSelBoxes = aTmp.GetBoxesOfFormula( rTbl,aBoxes ); nSelBoxes; )
{
SwTableBox* pBox = aBoxes[ --nSelBoxes ];
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < rCells.Count(); ++i )
if( rCells[ i ]->GetTabBox() == pBox )
break; // gefunden
if( i == rCells.Count() )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// erfrage die Formel fuer die Autosumme
-BOOL SwFEShell::GetAutoSum( String& rFml ) const
+sal_Bool SwFEShell::GetAutoSum( String& rFml ) const
{
SwFrm *pFrm = GetCurrFrm();
SwTabFrm *pTab = pFrm ? pFrm->ImplFindTabFrm() : 0;
if( !pTab )
- return FALSE;
+ return sal_False;
rFml = String::CreateFromAscii( sCalc_Sum );
SwCellFrms aCells;
if( ::GetAutoSumSel( *this, aCells ))
{
- USHORT nW = 0, nInsPos = 0;
- for( USHORT n = aCells.Count(); n; )
+ sal_uInt16 nW = 0, nInsPos = 0;
+ for( sal_uInt16 n = aCells.Count(); n; )
{
SwCellFrm* pCFrm = aCells[ --n ];
- USHORT nBoxW = pCFrm->GetTabBox()->IsFormulaOrValueBox();
+ sal_uInt16 nBoxW = pCFrm->GetTabBox()->IsFormulaOrValueBox();
if( !nBoxW )
break;
@@ -2471,7 +2471,7 @@ BOOL SwFEShell::GetAutoSum( String& rFml ) const
{
nW = RES_BOXATR_VALUE;
// alle vorhierigen Leere wieder mit aufnehmen !
- for( USHORT i = aCells.Count(); n+1 < i; )
+ for( sal_uInt16 i = aCells.Count(); n+1 < i; )
{
String sTmp( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "|<" )) );
@@ -2509,7 +2509,7 @@ BOOL SwFEShell::GetAutoSum( String& rFml ) const
nW = RES_BOXATR_VALUE;
rFml.Erase( nInsPos );
// alle vorhierigen Leere wieder mit aufnehmen !
- for( USHORT i = aCells.Count(); n+1 < i; )
+ for( sal_uInt16 i = aCells.Count(); n+1 < i; )
{
String sTmp( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "|<" )) );
@@ -2544,7 +2544,7 @@ BOOL SwFEShell::GetAutoSum( String& rFml ) const
// TabellenSelektion erzeugen??
SwTblBoxFormula aTmp( rFml );
SwSelBoxes aBoxes;
- for( USHORT nSelBoxes = aTmp.GetBoxesOfFormula( rTbl,aBoxes );
+ for( sal_uInt16 nSelBoxes = aTmp.GetBoxesOfFormula( rTbl,aBoxes );
nSelBoxes; )
{
}
@@ -2552,16 +2552,16 @@ BOOL SwFEShell::GetAutoSum( String& rFml ) const
}
}
- return TRUE;
+ return sal_True;
}
/* -----------------------------22.08.2002 12:50------------------------------
---------------------------------------------------------------------------*/
-BOOL SwFEShell::IsTableRightToLeft() const
+sal_Bool SwFEShell::IsTableRightToLeft() const
{
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
return pFrm->ImplFindTabFrm()->IsRightToLeft();
}
@@ -2569,22 +2569,22 @@ BOOL SwFEShell::IsTableRightToLeft() const
/* -----------------------------22.08.2002 12:50------------------------------
---------------------------------------------------------------------------*/
-BOOL SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const
+sal_Bool SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const
{
SwFrm *pFrm = (SwFrm *)GetBox( rPt );
const SwTabFrm* pTabFrm = pFrm ? pFrm->ImplFindTabFrm() : 0;
ASSERT( pTabFrm, "Table not found" );
- return pTabFrm ? pTabFrm->IsRightToLeft() : FALSE;
+ return pTabFrm ? pTabFrm->IsRightToLeft() : sal_False;
}
/* -----------------------------11.02.2004 12:50------------------------------
---------------------------------------------------------------------------*/
-BOOL SwFEShell::IsTableVertical() const
+sal_Bool SwFEShell::IsTableVertical() const
{
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
return pFrm->ImplFindTabFrm()->IsVertical();
}
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 02baddd201bd..965d7c4ffe87 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -101,7 +101,7 @@ void SwFEShell::EndAllActionAndCall()
#* Update : MA 02. May. 95
#***********************************************************************/
-Point SwFEShell::GetCntntPos( const Point& rPoint, BOOL bNext ) const
+Point SwFEShell::GetCntntPos( const Point& rPoint, sal_Bool bNext ) const
{
SET_CURR_SHELL( (ViewShell*)this );
return GetLayout()->GetNextPrevCntntPos( rPoint, bNext );
@@ -133,10 +133,10 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
if( !pFrm )
return GetLayout()->Frm();
- BOOL bFrm = TRUE;
+ sal_Bool bFrm = sal_True;
switch ( eType )
{
- case RECT_PAGE_PRT: bFrm = FALSE; /* no break */
+ case RECT_PAGE_PRT: bFrm = sal_False; /* no break */
case RECT_PAGE : pFrm = pFrm->FindPageFrm();
break;
@@ -145,7 +145,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
pFrm->Calc();
break;
- case RECT_FLY_PRT_EMBEDDED: bFrm = FALSE; /* no break */
+ case RECT_FLY_PRT_EMBEDDED: bFrm = sal_False; /* no break */
case RECT_FLY_EMBEDDED: pFrm = xObj.is() ? FindFlyFrm( xObj )
: pFrm->IsFlyFrm()
? pFrm
@@ -156,22 +156,22 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
case RECT_OUTTABSECTION : if( pFrm->IsInTab() )
pFrm = pFrm->FindTabFrm();
else {
- ASSERT( FALSE, "Missing Table" );
+ ASSERT( sal_False, "Missing Table" );
}
/* KEIN BREAK */
case RECT_SECTION_PRT:
case RECT_SECTION: if( pFrm->IsInSct() )
pFrm = pFrm->FindSctFrm();
else {
- ASSERT( FALSE, "Missing section" );
+ ASSERT( sal_False, "Missing section" );
}
if( RECT_OUTTABSECTION_PRT == eType ||
RECT_SECTION_PRT == eType )
- bFrm = FALSE;
+ bFrm = sal_False;
break;
- case RECT_HEADERFOOTER_PRT: bFrm = FALSE; /* no break */
+ case RECT_HEADERFOOTER_PRT: bFrm = sal_False; /* no break */
case RECT_HEADERFOOTER: if( 0 == (pFrm = pFrm->FindFooterOrHeader()) )
return GetLayout()->Frm();
break;
@@ -184,7 +184,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
}
-USHORT SwFEShell::GetPageNumber( const Point &rPoint ) const
+sal_uInt16 SwFEShell::GetPageNumber( const Point &rPoint ) const
{
const SwFrm *pPage = GetLayout()->Lower();
while ( pPage && !pPage->Frm().IsInside( rPoint ) )
@@ -196,13 +196,13 @@ USHORT SwFEShell::GetPageNumber( const Point &rPoint ) const
}
-BOOL SwFEShell::GetPageNumber( long nYPos, BOOL bAtCrsrPos, USHORT& rPhyNum, USHORT& rVirtNum, String &rDisplay) const
+sal_Bool SwFEShell::GetPageNumber( long nYPos, sal_Bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, String &rDisplay) const
{
const SwFrm *pPage;
if ( bAtCrsrPos ) //Seite vom Crsr besorgen
{
- pPage = GetCurrFrm( FALSE );
+ pPage = GetCurrFrm( sal_False );
if ( pPage )
pPage = pPage->FindPageFrm();
}
@@ -241,7 +241,7 @@ BOOL SwFEShell::GetPageNumber( long nYPos, BOOL bAtCrsrPos, USHORT& rPhyNum, USH
bool SwFEShell::IsDirectlyInSection() const
{
- SwFrm* pFrm = GetCurrFrm( FALSE );
+ SwFrm* pFrm = GetCurrFrm( sal_False );
return pFrm && pFrm->GetUpper() && pFrm->GetUpper()->IsSctFrm();
}
@@ -254,9 +254,9 @@ bool SwFEShell::IsDirectlyInSection() const
|*
*************************************************************************/
-USHORT SwFEShell::GetFrmType( const Point *pPt, BOOL bStopAtFly ) const
+sal_uInt16 SwFEShell::GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const
{
- USHORT nReturn = FRMTYPE_NONE;
+ sal_uInt16 nReturn = FRMTYPE_NONE;
const SwFrm *pFrm;
if ( pPt )
{
@@ -267,7 +267,7 @@ USHORT SwFEShell::GetFrmType( const Point *pPt, BOOL bStopAtFly ) const
pFrm = pNd->GetFrm( pPt );
}
else
- pFrm = GetCurrFrm( FALSE );
+ pFrm = GetCurrFrm( sal_False );
while ( pFrm )
{
switch ( pFrm->GetType() )
@@ -330,7 +330,7 @@ USHORT SwFEShell::GetFrmType( const Point *pPt, BOOL bStopAtFly ) const
|*
*************************************************************************/
-void SwFEShell::ShGetFcs( BOOL bUpdate )
+void SwFEShell::ShGetFcs( sal_Bool bUpdate )
{
::SetShell( this );
SwCrsrShell::ShGetFcs( bUpdate );
@@ -365,7 +365,7 @@ void SwFEShell::ShLooseFcs()
|*
*************************************************************************/
-USHORT SwFEShell::GetPhyPageNum()
+sal_uInt16 SwFEShell::GetPhyPageNum()
{
SwFrm *pFrm = GetCurrFrm();
if ( pFrm )
@@ -373,7 +373,7 @@ USHORT SwFEShell::GetPhyPageNum()
return 0;
}
-USHORT SwFEShell::GetVirtPageNum( const BOOL bCalcFrm )
+sal_uInt16 SwFEShell::GetVirtPageNum( const sal_Bool bCalcFrm )
{
SwFrm *pFrm = GetCurrFrm( bCalcFrm );
if ( pFrm )
@@ -386,14 +386,14 @@ USHORT SwFEShell::GetVirtPageNum( const BOOL bCalcFrm )
|* void lcl_SetAPageOffset()
|* void SwFEShell::SetNewPageOffset()
|* void SwFEShell::SetPageOffset()
-|* USHORT SwFEShell::GetPageOffset() const
+|* sal_uInt16 SwFEShell::GetPageOffset() const
|*
|* Ersterstellung OK 07.07.93 08:20
|* Letzte Aenderung MA 30. Mar. 95
|*
*************************************************************************/
-void lcl_SetAPageOffset( USHORT nOffset, SwPageFrm* pPage, SwFEShell* pThis )
+void lcl_SetAPageOffset( sal_uInt16 nOffset, SwPageFrm* pPage, SwFEShell* pThis )
{
pThis->StartAllAction();
ASSERT( pPage->FindFirstBodyCntnt(),
@@ -402,7 +402,7 @@ void lcl_SetAPageOffset( USHORT nOffset, SwPageFrm* pPage, SwFEShell* pThis )
SwFmtPageDesc aDesc( pPage->GetPageDesc() );
aDesc.SetNumOffset( nOffset );
- SwFrm *pFrm = pThis->GetCurrFrm( FALSE );
+ SwFrm *pFrm = pThis->GetCurrFrm( sal_False );
if ( pFrm->IsInTab() )
pThis->GetDoc()->SetAttr( aDesc, *pFrm->FindTabFrm()->GetFmt() );
else
@@ -413,16 +413,16 @@ void lcl_SetAPageOffset( USHORT nOffset, SwPageFrm* pPage, SwFEShell* pThis )
pThis->EndAllAction();
}
-void SwFEShell::SetNewPageOffset( USHORT nOffset )
+void SwFEShell::SetNewPageOffset( sal_uInt16 nOffset )
{
- GetLayout()->SetVirtPageNum( TRUE );
- const SwPageFrm *pPage = GetCurrFrm( FALSE )->FindPageFrm();
+ GetLayout()->SetVirtPageNum( sal_True );
+ const SwPageFrm *pPage = GetCurrFrm( sal_False )->FindPageFrm();
lcl_SetAPageOffset( nOffset, (SwPageFrm*)pPage, this );
}
-void SwFEShell::SetPageOffset( USHORT nOffset )
+void SwFEShell::SetPageOffset( sal_uInt16 nOffset )
{
- const SwPageFrm *pPage = GetCurrFrm( FALSE )->FindPageFrm();
+ const SwPageFrm *pPage = GetCurrFrm( sal_False )->FindPageFrm();
const SwRootFrm* pLayout = GetLayout();
while ( pPage )
{
@@ -434,7 +434,7 @@ void SwFEShell::SetPageOffset( USHORT nOffset )
const SwFmtPageDesc& rPgDesc = pFlow->GetAttrSet()->GetPageDesc();
if ( rPgDesc.GetNumOffset() )
{
- pLayout->SetVirtPageNum( TRUE );
+ pLayout->SetVirtPageNum( sal_True );
lcl_SetAPageOffset( nOffset, (SwPageFrm*)pPage, this );
break;
}
@@ -443,7 +443,7 @@ void SwFEShell::SetPageOffset( USHORT nOffset )
}
}
-USHORT SwFEShell::GetPageOffset() const
+sal_uInt16 SwFEShell::GetPageOffset() const
{
const SwPageFrm *pPage = GetCurrFrm()->FindPageFrm();
while ( pPage )
@@ -453,7 +453,7 @@ USHORT SwFEShell::GetPageOffset() const
{
if ( pFlow->IsInTab() )
pFlow = pFlow->FindTabFrm();
- const USHORT nOffset = pFlow->GetAttrSet()->GetPageDesc().GetNumOffset();
+ const sal_uInt16 nOffset = pFlow->GetAttrSet()->GetPageDesc().GetNumOffset();
if ( nOffset )
return nOffset;
}
@@ -473,18 +473,18 @@ USHORT SwFEShell::GetPageOffset() const
void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
const String& rNumberSeparator,
- const BOOL bBefore, const USHORT nId,
+ const sal_Bool bBefore, const sal_uInt16 nId,
const String& rCharacterStyle,
- const BOOL bCpyBrd )
+ const sal_Bool bCpyBrd )
{
//NodeIndex der CrsrPosition besorgen, den Rest kann das Dokument
//selbst erledigen.
- SwCntntFrm *pCnt = LTYPE_DRAW==eType ? 0 : GetCurrFrm( FALSE );
+ SwCntntFrm *pCnt = LTYPE_DRAW==eType ? 0 : GetCurrFrm( sal_False );
if( LTYPE_DRAW==eType || pCnt )
{
StartAllAction();
- ULONG nIdx = 0;
+ sal_uLong nIdx = 0;
SwFlyFrmFmt* pFlyFmt = 0;
switch( eType )
{
@@ -518,7 +518,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
// local list to perform the corresponding action for each object
std::vector<SdrObject*> aDrawObjs;
{
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject* pDrawObj = rMrkList.GetMark(i)->GetMarkedSdrObj();
aDrawObjs.push_back( pDrawObj );
@@ -554,7 +554,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
SwFlyFrm* pFrm;
const Point aPt( GetCrsrDocPos() );
if( pFlyFmt && 0 != ( pFrm = pFlyFmt->GetFrm( &aPt )))
- SelectFlyFrm( *pFrm, TRUE );
+ SelectFlyFrm( *pFrm, sal_True );
EndAllActionAndCall();
}
@@ -568,19 +568,19 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
#* Update : ??
#***********************************************************************/
-BOOL SwFEShell::Sort(const SwSortOptions& rOpt)
+sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt)
{
if( !HasSelection() )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
- BOOL bRet;
+ sal_Bool bRet;
StartAllAction();
if(IsTableMode())
{
// Tabelle sortieren
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
- SwFrm *pFrm = GetCurrFrm( FALSE );
+ SwFrm *pFrm = GetCurrFrm( sal_False );
ASSERT( pFrm->FindTabFrm(), "Crsr nicht in Tabelle." );
// lasse ueber das Layout die Boxen suchen
@@ -611,7 +611,7 @@ BOOL SwFEShell::Sort(const SwSortOptions& rOpt)
SwPosition* pEnd = pPam->End();
SwNodeIndex aPrevIdx( pStart->nNode, -1 );
- ULONG nOffset = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
+ sal_uLong nOffset = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
xub_StrLen nCntStt = pStart->nContent.GetIndex();
// Das Sortieren
@@ -647,10 +647,10 @@ BOOL SwFEShell::Sort(const SwSortOptions& rOpt)
|
|*************************************************************************/
-USHORT SwFEShell::_GetCurColNum( const SwFrm *pFrm,
+sal_uInt16 SwFEShell::_GetCurColNum( const SwFrm *pFrm,
SwGetCurColNumPara* pPara ) const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
while ( pFrm )
{
pFrm = pFrm->GetUpper();
@@ -690,15 +690,15 @@ USHORT SwFEShell::_GetCurColNum( const SwFrm *pFrm,
return nRet;
}
-USHORT SwFEShell::GetCurColNum( SwGetCurColNumPara* pPara ) const
+sal_uInt16 SwFEShell::GetCurColNum( SwGetCurColNumPara* pPara ) const
{
ASSERT( GetCurrFrm(), "Crsr geparkt?" );
return _GetCurColNum( GetCurrFrm(), pPara );
}
-USHORT SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const
+sal_uInt16 SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
SwFrm* pFrm = GetCurrFrm();
ASSERT( pFrm, "Crsr geparkt?" );
if( pFrm )
@@ -714,13 +714,13 @@ USHORT SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const
SwFEShell::SwFEShell( SwDoc& rDoc, Window *pWindow, const SwViewOption *pOptions )
: SwEditShell( rDoc, pWindow, pOptions ),
- pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( FALSE )
+ pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( sal_False )
{
}
SwFEShell::SwFEShell( SwEditShell& rShell, Window *pWindow )
: SwEditShell( rShell, pWindow ),
- pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( FALSE )
+ pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( sal_False )
{
}
@@ -772,8 +772,8 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
_bMirror = _bMirror && !pPage->OnRightPage();
Point aPos;
- BOOL bVertic = FALSE;
- BOOL bRTL = FALSE;
+ sal_Bool bVertic = sal_False;
+ sal_Bool bRTL = sal_False;
if ((FLY_AT_PAGE == _nAnchorId) || (FLY_AT_FLY == _nAnchorId)) // LAYER_IMPL
{
@@ -800,7 +800,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
if( bVert )
{
- bVertic = TRUE;
+ bVertic = sal_True;
_bMirror = false; // no mirroring in vertical environment
switch ( _eHoriRelOrient )
{
@@ -1100,7 +1100,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
0;
if( bVert )
{
- bVertic = TRUE;
+ bVertic = sal_True;
_bMirror = false;
switch ( _eHoriRelOrient )
@@ -1239,10 +1239,10 @@ Size SwFEShell::GetGraphicDefaultSize() const
/* -----------------------------12.08.2002 12:51------------------------------
---------------------------------------------------------------------------*/
-BOOL SwFEShell::IsFrmVertical(BOOL bEnvironment, BOOL& bRTL) const
+sal_Bool SwFEShell::IsFrmVertical(sal_Bool bEnvironment, sal_Bool& bRTL) const
{
- BOOL bVert = FALSE;
- bRTL = FALSE;
+ sal_Bool bVert = sal_False;
+ bRTL = sal_False;
if ( Imp()->HasDrawView() )
{
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index deefc2205b67..3353e8d2f9ac 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -75,11 +75,11 @@
_SV_IMPL_SORTAR_ALG( SwSelBoxes, SwTableBoxPtr )
-BOOL SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, USHORT* pFndPos ) const
+sal_Bool SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, sal_uInt16* pFndPos ) const
{
- ULONG nIdx = rSrch->GetSttIdx();
+ sal_uLong nIdx = rSrch->GetSttIdx();
- USHORT nO = Count(), nM, nU = 0;
+ sal_uInt16 nO = Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
@@ -90,7 +90,7 @@ BOOL SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, USHORT* pFndPos ) const
{
if( pFndPos )
*pFndPos = nM;
- return TRUE;
+ return sal_True;
}
else if( (*this)[ nM ]->GetSttIdx() < nIdx )
nU = nM + 1;
@@ -98,7 +98,7 @@ BOOL SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, USHORT* pFndPos ) const
{
if( pFndPos )
*pFndPos = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
@@ -106,7 +106,7 @@ BOOL SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, USHORT* pFndPos ) const
}
if( pFndPos )
*pFndPos = nU;
- return FALSE;
+ return sal_False;
}
@@ -116,21 +116,21 @@ struct _CmpLPt
{
Point aPos;
const SwTableBox* pSelBox;
- BOOL bVert;
+ sal_Bool bVert;
- _CmpLPt( const Point& rPt, const SwTableBox* pBox, BOOL bVertical );
+ _CmpLPt( const Point& rPt, const SwTableBox* pBox, sal_Bool bVertical );
- BOOL operator==( const _CmpLPt& rCmp ) const
- { return X() == rCmp.X() && Y() == rCmp.Y() ? TRUE : FALSE; }
+ sal_Bool operator==( const _CmpLPt& rCmp ) const
+ { return X() == rCmp.X() && Y() == rCmp.Y() ? sal_True : sal_False; }
- BOOL operator<( const _CmpLPt& rCmp ) const
+ sal_Bool operator<( const _CmpLPt& rCmp ) const
{
if ( bVert )
return X() > rCmp.X() || ( X() == rCmp.X() && Y() < rCmp.Y() )
- ? TRUE : FALSE;
+ ? sal_True : sal_False;
else
return Y() < rCmp.Y() || ( Y() == rCmp.Y() && X() < rCmp.X() )
- ? TRUE : FALSE;
+ ? sal_True : sal_False;
}
long X() const { return aPos.X(); }
@@ -181,7 +181,7 @@ const SwLayoutFrm *lcl_FindNextCellFrm( const SwLayoutFrm *pLay )
void GetTblSelCrs( const SwCrsrShell &rShell, SwSelBoxes& rBoxes )
{
if( rBoxes.Count() )
- rBoxes.Remove( USHORT(0), rBoxes.Count() );
+ rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
if( rShell.IsTableMode() && ((SwCrsrShell&)rShell).UpdateTblSelBoxes())
rBoxes.Insert( &rShell.GetTableCrsr()->GetBoxes() );
}
@@ -189,7 +189,7 @@ void GetTblSelCrs( const SwCrsrShell &rShell, SwSelBoxes& rBoxes )
void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes )
{
if( rBoxes.Count() )
- rBoxes.Remove( USHORT(0), rBoxes.Count() );
+ rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
if( rTblCrsr.IsChgd() || !rTblCrsr.GetBoxesCount() )
{
@@ -215,7 +215,7 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
const SwTblSearchType eSearchType )
{
//Start- und Endzelle besorgen und den naechsten fragen.
- ASSERT( rCrsr.GetCntntNode() && rCrsr.GetCntntNode( FALSE ),
+ ASSERT( rCrsr.GetCntntNode() && rCrsr.GetCntntNode( sal_False ),
"Tabselection nicht auf Cnt." );
// Zeilen-Selektion:
@@ -243,31 +243,31 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
const SwTable& rTbl = pTblNd->GetTable();
const SwTableLines& rLines = rTbl.GetTabLines();
- const SwNode* pMarkNode = rCrsr.GetNode( FALSE );
- const ULONG nMarkSectionStart = pMarkNode->StartOfSectionIndex();
+ const SwNode* pMarkNode = rCrsr.GetNode( sal_False );
+ const sal_uLong nMarkSectionStart = pMarkNode->StartOfSectionIndex();
const SwTableBox* pMarkBox = rTbl.GetTblBox( nMarkSectionStart );
ASSERT( pMarkBox, "Point in table, mark outside?" )
const SwTableLine* pLine = pMarkBox ? pMarkBox->GetUpper() : 0;
- USHORT nSttPos = rLines.GetPos( pLine );
+ sal_uInt16 nSttPos = rLines.GetPos( pLine );
ASSERT( USHRT_MAX != nSttPos, "Wo ist meine Zeile in der Tabelle?" );
- pLine = rTbl.GetTblBox( rCrsr.GetNode( TRUE )->StartOfSectionIndex() )->GetUpper();
- USHORT nEndPos = rLines.GetPos( pLine );
+ pLine = rTbl.GetTblBox( rCrsr.GetNode( sal_True )->StartOfSectionIndex() )->GetUpper();
+ sal_uInt16 nEndPos = rLines.GetPos( pLine );
ASSERT( USHRT_MAX != nEndPos, "Wo ist meine Zeile in der Tabelle?" );
// pb: #i20193# if tableintable then nSttPos == nEndPos == USHRT_MAX
if ( nSttPos != USHRT_MAX && nEndPos != USHRT_MAX )
{
if( nEndPos < nSttPos ) // vertauschen
{
- USHORT nTmp = nSttPos; nSttPos = nEndPos; nEndPos = nTmp;
+ sal_uInt16 nTmp = nSttPos; nSttPos = nEndPos; nEndPos = nTmp;
}
int bChkProtected = nsSwTblSearchType::TBLSEARCH_PROTECT & eSearchType;
for( ; nSttPos <= nEndPos; ++nSttPos )
{
pLine = rLines[ nSttPos ];
- for( USHORT n = pLine->GetTabBoxes().Count(); n ; )
+ for( sal_uInt16 n = pLine->GetTabBoxes().Count(); n ; )
{
SwTableBox* pBox = pLine->GetTabBoxes()[ --n ];
// Zellenschutzt beachten ??
@@ -290,7 +290,7 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
const SwCntntNode *pCntNd = rCrsr.GetCntntNode();
const SwLayoutFrm *pStart = pCntNd ?
pCntNd->GetFrm( &aPtPos )->GetUpper() : 0;
- pCntNd = rCrsr.GetCntntNode(FALSE);
+ pCntNd = rCrsr.GetCntntNode(sal_False);
const SwLayoutFrm *pEnd = pCntNd ?
pCntNd->GetFrm( &aMkPos )->GetUpper() : 0;
if( pStart && pEnd )
@@ -312,14 +312,14 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
int bChkProtected = nsSwTblSearchType::TBLSEARCH_PROTECT & eSearchType;
- BOOL bTblIsValid;
+ sal_Bool bTblIsValid;
// --> FME 2006-01-25 #i55421# Reduced value 10
int nLoopMax = 10; //JP 28.06.99: max 100 loops - Bug 67292
// <--
- USHORT i;
+ sal_uInt16 i;
do {
- bTblIsValid = TRUE;
+ bTblIsValid = sal_True;
//Zuerst lassen wir uns die Tabellen und die Rechtecke heraussuchen.
SwSelUnions aUnions;
@@ -341,7 +341,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
const SwTabFrm *pTable = pUnion->GetTable();
if( !pTable->IsValid() && nLoopMax )
{
- bTblIsValid = FALSE;
+ bTblIsValid = sal_False;
break;
}
@@ -354,7 +354,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
{
if( !pRow->IsValid() && nLoopMax )
{
- bTblIsValid = FALSE;
+ bTblIsValid = sal_False;
break;
}
@@ -366,7 +366,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
{
if( !pCell->IsValid() && nLoopMax )
{
- bTblIsValid = FALSE;
+ bTblIsValid = sal_False;
break;
}
@@ -476,24 +476,24 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
rBoxes.Remove( i, rBoxes.Count() );
--nLoopMax;
- } while( TRUE );
+ } while( sal_True );
ASSERT( nLoopMax, "das Layout der Tabelle wurde nicht valide!" );
}
-BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
+sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
SwChartLines* pGetCLines )
{
const SwTableNode* pTNd = rSttNd.FindTableNode();
if( !pTNd )
- return FALSE;
+ return sal_False;
Point aNullPos;
SwNodeIndex aIdx( rSttNd );
const SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode();
if( !pCNd )
- pCNd = aIdx.GetNodes().GoNextSection( &aIdx, FALSE, FALSE );
+ pCNd = aIdx.GetNodes().GoNextSection( &aIdx, sal_False, sal_False );
// #109394# if table is invisible, return
// (layout needed for forming table selection further down, so we can't
@@ -502,7 +502,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
// invisible - e.g. in a hidden section
// Robust: check, if content was found (e.g. empty table cells)
if ( !pCNd || pCNd->GetFrm() == NULL )
- return FALSE;
+ return sal_False;
const SwLayoutFrm *pStart = pCNd ? pCNd->GetFrm( &aNullPos )->GetUpper() : 0;
ASSERT( pStart, "ohne Frame geht gar nichts" );
@@ -510,29 +510,29 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
aIdx = rEndNd;
pCNd = aIdx.GetNode().GetCntntNode();
if( !pCNd )
- pCNd = aIdx.GetNodes().GoNextSection( &aIdx, FALSE, FALSE );
+ pCNd = aIdx.GetNodes().GoNextSection( &aIdx, sal_False, sal_False );
// OD 07.11.2003 #i22135# - Robust: check, if content was found and if it's visible
if ( !pCNd || pCNd->GetFrm() == NULL )
{
- return FALSE;
+ return sal_False;
}
const SwLayoutFrm *pEnd = pCNd ? pCNd->GetFrm( &aNullPos )->GetUpper() : 0;
ASSERT( pEnd, "ohne Frame geht gar nichts" );
- BOOL bTblIsValid, bValidChartSel;
+ sal_Bool bTblIsValid, bValidChartSel;
// --> FME 2006-01-25 #i55421# Reduced value 10
int nLoopMax = 10; //JP 28.06.99: max 100 loops - Bug 67292
// <--
- USHORT i = 0;
+ sal_uInt16 i = 0;
do {
- bTblIsValid = TRUE;
- bValidChartSel = TRUE;
+ bTblIsValid = sal_True;
+ bValidChartSel = sal_True;
- USHORT nRowCells = USHRT_MAX;
+ sal_uInt16 nRowCells = USHRT_MAX;
//Zuerst lassen wir uns die Tabellen und die Rechtecke heraussuchen.
SwSelUnions aUnions;
@@ -550,7 +550,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
if( !pTable->IsValid() && nLoopMax )
{
- bTblIsValid = FALSE;
+ bTblIsValid = sal_False;
break;
}
@@ -565,7 +565,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
{
if( !pRow->IsValid() && nLoopMax )
{
- bTblIsValid = FALSE;
+ bTblIsValid = sal_False;
break;
}
@@ -578,7 +578,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
{
if( !pCell->IsValid() && nLoopMax )
{
- bTblIsValid = FALSE;
+ bTblIsValid = sal_False;
break;
}
@@ -620,7 +620,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
_Sort_CellFrm( *(SwCellFrm*)pCell) );
else
{
- bValidChartSel = FALSE;
+ bValidChartSel = sal_False;
break;
}
}
@@ -659,7 +659,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
nRowCells = nCellCnt;
else if( nRowCells != nCellCnt )
{
- bValidChartSel = FALSE;
+ bValidChartSel = sal_False;
break;
}
}
@@ -682,7 +682,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
}
else
{
- bValidChartSel = FALSE;
+ bValidChartSel = sal_False;
break;
}
}
@@ -691,7 +691,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
if( USHRT_MAX == nRowCells )
nRowCells = nCellCnt;
else if( nRowCells != nCellCnt )
- bValidChartSel = FALSE;
+ bValidChartSel = sal_False;
}
if( bValidChartSel && pGetCLines )
@@ -704,7 +704,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos )
{
pBoxes = new SwChartBoxes( 255 < nRowCells
- ? 255 : (BYTE)nRowCells);
+ ? 255 : (sal_uInt8)nRowCells);
pGetCLines->C40_INSERT( SwChartBoxes, pBoxes, pGetCLines->Count() );
nYPos = (rCF.pFrm->Frm().*fnRect->fnGetTop)();
}
@@ -733,7 +733,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
--nLoopMax;
if( pGetCLines )
pGetCLines->DeleteAndDestroy( 0, pGetCLines->Count() );
- } while( TRUE );
+ } while( sal_True );
ASSERT( nLoopMax, "das Layout der Tabelle wurde nicht valide!" );
@@ -744,7 +744,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
}
-BOOL IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell )
+sal_Bool IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell )
{
ASSERT( pCell->IsCellFrm(), "Frame ohne Gazelle" );
@@ -754,7 +754,7 @@ BOOL IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell )
(( rUnion.Top() <= pCell->Frm().Top()+20 &&
rUnion.Bottom() > pCell->Frm().Top() ) ||
( rUnion.Top() >= pCell->Frm().Top() &&
- rUnion.Bottom() < pCell->Frm().Bottom() )) ? TRUE : FALSE );
+ rUnion.Bottom() < pCell->Frm().Bottom() )) ? sal_True : sal_False );
return (
rUnion.Top() <= pCell->Frm().Top() &&
@@ -764,10 +764,10 @@ BOOL IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell )
rUnion.Right() > pCell->Frm().Left() ) ||
( rUnion.Left() >= pCell->Frm().Left() &&
- rUnion.Right() < pCell->Frm().Right() )) ? TRUE : FALSE );
+ rUnion.Right() < pCell->Frm().Right() )) ? sal_True : sal_False );
}
-BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
+sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
{
SwShellCrsr* pCrsr = rShell.pCurCrsr;
if ( rShell.IsTableMode() )
@@ -775,7 +775,7 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
const SwLayoutFrm *pStart = pCrsr->GetCntntNode()->GetFrm(
&pCrsr->GetPtPos() )->GetUpper(),
- *pEnd = pCrsr->GetCntntNode(FALSE)->GetFrm(
+ *pEnd = pCrsr->GetCntntNode(sal_False)->GetFrm(
&pCrsr->GetMkPos() )->GetUpper();
const SwLayoutFrm* pSttCell = pStart;
@@ -788,8 +788,8 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
// default erstmal nach oben testen, dann nach links
::MakeSelUnions( aUnions, pStart, pEnd, nsSwTblSearchType::TBLSEARCH_COL );
- BOOL bTstRow = TRUE, bFound = FALSE;
- USHORT i;
+ sal_Bool bTstRow = sal_True, bFound = sal_False;
+ sal_uInt16 i;
// 1. teste ob die darueber liegende Box Value/Formel enhaelt:
for( i = 0; i < aUnions.Count(); ++i )
@@ -813,8 +813,8 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
{
if( pCell == pSttCell )
{
- USHORT nWhichId = 0;
- for( USHORT n = rBoxes.Count(); n; )
+ sal_uInt16 nWhichId = 0;
+ for( sal_uInt16 n = rBoxes.Count(); n; )
if( USHRT_MAX != ( nWhichId = rBoxes[ --n ]
->GetTabBox()->IsFormulaOrValueBox() ))
break;
@@ -822,7 +822,7 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
// alle Boxen zusammen, nicht mehr die Zeile
// pruefen, wenn eine Formel oder Value gefunden wurde
bTstRow = 0 == nWhichId || USHRT_MAX == nWhichId;
- bFound = TRUE;
+ bFound = sal_True;
break;
}
@@ -856,7 +856,7 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
// 2. teste ob die links liegende Box Value/Formel enhaelt:
if( bTstRow )
{
- bFound = FALSE;
+ bFound = sal_False;
rBoxes.Remove( 0, rBoxes.Count() );
aUnions.DeleteAndDestroy( 0, aUnions.Count() );
@@ -882,8 +882,8 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
{
if( pCell == pSttCell )
{
- USHORT nWhichId = 0;
- for( USHORT n = rBoxes.Count(); n; )
+ sal_uInt16 nWhichId = 0;
+ for( sal_uInt16 n = rBoxes.Count(); n; )
if( USHRT_MAX != ( nWhichId = rBoxes[ --n ]
->GetTabBox()->IsFormulaOrValueBox() ))
break;
@@ -891,7 +891,7 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
// alle Boxen zusammen, nicht mehr die Zeile
// pruefen, wenn eine Formel oder Value gefunden wurde
bFound = 0 != nWhichId && USHRT_MAX != nWhichId;
- bTstRow = FALSE;
+ bTstRow = sal_False;
break;
}
@@ -925,25 +925,25 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
return bFound;
}
-BOOL HasProtectedCells( const SwSelBoxes& rBoxes )
+sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes )
{
- BOOL bRet = FALSE;
- for( USHORT n = 0, nCnt = rBoxes.Count(); n < nCnt; ++n )
+ sal_Bool bRet = sal_False;
+ for( sal_uInt16 n = 0, nCnt = rBoxes.Count(); n < nCnt; ++n )
if( rBoxes[ n ]->GetFrmFmt()->GetProtect().IsCntntProtected() )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
return bRet;
}
-_CmpLPt::_CmpLPt( const Point& rPt, const SwTableBox* pBox, BOOL bVertical )
+_CmpLPt::_CmpLPt( const Point& rPt, const SwTableBox* pBox, sal_Bool bVertical )
: aPos( rPt ), pSelBox( pBox ), bVert( bVertical )
{}
void lcl_InsTblBox( SwTableNode* pTblNd, SwDoc* pDoc, SwTableBox* pBox,
- USHORT nInsPos, USHORT nCnt = 1 )
+ sal_uInt16 nInsPos, sal_uInt16 nCnt = 1 )
{
ASSERT( pBox->GetSttNd(), "Box ohne Start-Node" );
SwCntntNode* pCNd = pDoc->GetNodes()[ pBox->GetSttIdx() + 1 ]
@@ -961,25 +961,25 @@ void lcl_InsTblBox( SwTableNode* pTblNd, SwDoc* pDoc, SwTableBox* pBox,
nInsPos, nCnt );
}
-BOOL IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam )
+sal_Bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam )
{
rPam.GetPoint()->nNode = *rBox.GetSttNd()->EndOfSectionNode();
rPam.Move( fnMoveBackward, fnGoCntnt );
rPam.SetMark();
rPam.GetPoint()->nNode = *rBox.GetSttNd();
rPam.Move( fnMoveForward, fnGoCntnt );
- BOOL bRet = *rPam.GetMark() == *rPam.GetPoint()
+ sal_Bool bRet = *rPam.GetMark() == *rPam.GetPoint()
&& ( rBox.GetSttNd()->GetIndex() + 1 == rPam.GetPoint()->nNode.GetIndex() );
if( bRet )
{
// dann teste mal auf absatzgebundenen Flys
const SwSpzFrmFmts& rFmts = *rPam.GetDoc()->GetSpzFrmFmts();
- ULONG nSttIdx = rPam.GetPoint()->nNode.GetIndex(),
+ sal_uLong nSttIdx = rPam.GetPoint()->nNode.GetIndex(),
nEndIdx = rBox.GetSttNd()->EndOfSectionIndex(),
nIdx;
- for( USHORT n = 0; n < rFmts.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFmts.Count(); ++n )
{
const SwFmtAnchor& rAnchor = rFmts[n]->GetAnchor();
const SwPosition* pAPos = rAnchor.GetCntntAnchor();
@@ -989,7 +989,7 @@ BOOL IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam )
nSttIdx <= ( nIdx = pAPos->nNode.GetIndex() ) &&
nIdx < nEndIdx )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -1002,10 +1002,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwTableBox** ppMergeBox, SwUndoTblMerge* pUndo )
{
if( rBoxes.Count() )
- rBoxes.Remove( USHORT(0), rBoxes.Count() );
+ rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
//Zuerst lassen wir uns die Tabellen und die Rechtecke heraussuchen.
- ASSERT( rPam.GetCntntNode() && rPam.GetCntntNode( FALSE ),
+ ASSERT( rPam.GetCntntNode() && rPam.GetCntntNode( sal_False ),
"Tabselection nicht auf Cnt." );
//JP 24.09.96: Merge mit wiederholenden TabellenHeadline funktioniert nicht
@@ -1015,7 +1015,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
Point aPt( 0, 0 );
const SwLayoutFrm *pStart = rPam.GetCntntNode()->GetFrm(
&aPt )->GetUpper(),
- *pEnd = rPam.GetCntntNode(FALSE)->GetFrm(
+ *pEnd = rPam.GetCntntNode(sal_False)->GetFrm(
&aPt )->GetUpper();
SwSelUnions aUnions;
@@ -1034,7 +1034,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
SWRECTFN( pStart->GetUpper() )
- for ( USHORT i = 0; i < aUnions.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
{
const SwTabFrm *pTabFrm = aUnions[i]->GetTable();
@@ -1066,7 +1066,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
{
if( ( rUnion.Right() + COLFUZZY ) < pCell->Frm().Right() )
{
- USHORT nInsPos = pBox->GetUpper()->
+ sal_uInt16 nInsPos = pBox->GetUpper()->
GetTabBoxes().C40_GETPOS( SwTableBox, pBox )+1;
lcl_InsTblBox( pTblNd, pDoc, pBox, nInsPos );
pBox->ClaimFrmFmt();
@@ -1110,7 +1110,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
else if( ( rUnion.Left() - COLFUZZY ) >= pCell->Frm().Left() &&
( rUnion.Right() + COLFUZZY ) < pCell->Frm().Right() )
{
- USHORT nInsPos = pBox->GetUpper()->GetTabBoxes().
+ sal_uInt16 nInsPos = pBox->GetUpper()->GetTabBoxes().
C40_GETPOS( SwTableBox, pBox )+1;
lcl_InsTblBox( pTblNd, pDoc, pBox, nInsPos, 2 );
pBox->ClaimFrmFmt();
@@ -1130,7 +1130,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetAttrSet()
- .GetItemState( RES_BOX, FALSE, &pItem ))
+ .GetItemState( RES_BOX, sal_False, &pItem ))
{
SvxBoxItem aBox( *(SvxBoxItem*)pItem );
aBox.SetLine( 0, BOX_LINE_RIGHT );
@@ -1169,7 +1169,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
{
// dann muss eine neue Box einfuegt und die
// Breiten angepasst werden
- USHORT nInsPos = pBox->GetUpper()->GetTabBoxes().
+ sal_uInt16 nInsPos = pBox->GetUpper()->GetTabBoxes().
C40_GETPOS( SwTableBox, pBox )+1;
lcl_InsTblBox( pTblNd, pDoc, pBox, nInsPos, 1 );
@@ -1226,7 +1226,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// 1. Loesung: gehe ueber das Array und
// alle auf der gleichen Y-Ebene werden mit Blanks getrennt
// alle anderen werden als Absaetze getrennt.
- BOOL bCalcWidth = TRUE;
+ sal_Bool bCalcWidth = sal_True;
const SwTableBox* pFirstBox = aPosArr[ 0 ].pSelBox;
// JP 27.03.98: Optimierung - falls die Boxen einer Line leer sind,
@@ -1238,8 +1238,8 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
#if defined( DEL_ONLY_EMPTY_LINES )
nWidth = pFirstBox->GetFrmFmt()->GetFrmSize().GetWidth();
- BOOL bEmptyLine = TRUE;
- USHORT n, nSttPos = 0;
+ sal_Bool bEmptyLine = sal_True;
+ sal_uInt16 n, nSttPos = 0;
for( n = 0; n < aPosArr.Count(); ++n )
{
@@ -1247,14 +1247,14 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
if( n && aPosArr[ n - 1 ].Y() == rPt.Y() ) // gleiche Ebene ?
{
if( bEmptyLine && !IsEmptyBox( *rPt.pSelBox, aPam ))
- bEmptyLine = FALSE;
+ bEmptyLine = sal_False;
if( bCalcWidth )
nWidth += rPt.pSelBox->GetFrmFmt()->GetFrmSize().GetWidth();
}
else
{
if( bCalcWidth && n )
- bCalcWidth = FALSE; // eine Zeile fertig
+ bCalcWidth = sal_False; // eine Zeile fertig
if( bEmptyLine && nSttPos < n )
{
@@ -1262,7 +1262,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// nicht mit Blanks aufgefuellt und als Absatz
// eingefuegt werden.
if( pUndo )
- for( USHORT i = nSttPos; i < n; ++i )
+ for( sal_uInt16 i = nSttPos; i < n; ++i )
pUndo->SaveCollection( *aPosArr[ i ].pSelBox );
aPosArr.Remove( nSttPos, n - nSttPos );
@@ -1277,21 +1277,21 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
if( bEmptyLine && nSttPos < n )
{
if( pUndo )
- for( USHORT i = nSttPos; i < n; ++i )
+ for( sal_uInt16 i = nSttPos; i < n; ++i )
pUndo->SaveCollection( *aPosArr[ i ].pSelBox );
aPosArr.Remove( nSttPos, n - nSttPos );
}
#elsif defined( DEL_EMPTY_BOXES_AT_START_AND_END )
nWidth = pFirstBox->GetFrmFmt()->GetFrmSize().GetWidth();
- USHORT n, nSttPos = 0, nSEndPos = 0, nESttPos = 0;
+ sal_uInt16 n, nSttPos = 0, nSEndPos = 0, nESttPos = 0;
for( n = 0; n < aPosArr.Count(); ++n )
{
const _CmpLPt& rPt = aPosArr[ n ];
if( n && aPosArr[ n - 1 ].Y() == rPt.Y() ) // gleiche Ebene ?
{
- BOOL bEmptyBox = IsEmptyBox( *rPt.pSelBox, aPam );
+ sal_Bool bEmptyBox = IsEmptyBox( *rPt.pSelBox, aPam );
if( bEmptyBox )
{
if( nSEndPos == n ) // der Anfang ist leer
@@ -1306,7 +1306,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
else
{
if( bCalcWidth && n )
- bCalcWidth = FALSE; // eine Zeile fertig
+ bCalcWidth = sal_False; // eine Zeile fertig
// zuerst die vom Anfang
if( nSttPos < nSEndPos )
@@ -1314,10 +1314,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// dann ist der vorder Teil der Line leer und braucht
// nicht mit Blanks aufgefuellt werden.
if( pUndo )
- for( USHORT i = nSttPos; i < nSEndPos; ++i )
+ for( sal_uInt16 i = nSttPos; i < nSEndPos; ++i )
pUndo->SaveCollection( *aPosArr[ i ].pSelBox );
- USHORT nCnt = nSEndPos - nSttPos;
+ sal_uInt16 nCnt = nSEndPos - nSttPos;
aPosArr.Remove( nSttPos, nCnt );
nESttPos -= nCnt;
n -= nCnt;
@@ -1328,10 +1328,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// dann ist der vorder Teil der Line leer und braucht
// nicht mit Blanks aufgefuellt werden.
if( pUndo )
- for( USHORT i = nESttPos; i < n; ++i )
+ for( sal_uInt16 i = nESttPos; i < n; ++i )
pUndo->SaveCollection( *aPosArr[ i ].pSelBox );
- USHORT nCnt = n - nESttPos;
+ sal_uInt16 nCnt = n - nESttPos;
aPosArr.Remove( nESttPos, nCnt );
n -= nCnt;
}
@@ -1350,10 +1350,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// dann ist der vorder Teil der Line leer und braucht
// nicht mit Blanks aufgefuellt werden.
if( pUndo )
- for( USHORT i = nSttPos; i < nSEndPos; ++i )
+ for( sal_uInt16 i = nSttPos; i < nSEndPos; ++i )
pUndo->SaveCollection( *aPosArr[ i ].pSelBox );
- USHORT nCnt = nSEndPos - nSttPos;
+ sal_uInt16 nCnt = nSEndPos - nSttPos;
aPosArr.Remove( nSttPos, nCnt );
nESttPos -= nCnt;
n -= nCnt;
@@ -1363,10 +1363,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// dann ist der vorder Teil der Line leer und braucht
// nicht mit Blanks aufgefuellt werden.
if( pUndo )
- for( USHORT i = nESttPos; i < n; ++i )
+ for( sal_uInt16 i = nESttPos; i < n; ++i )
pUndo->SaveCollection( *aPosArr[ i ].pSelBox );
- USHORT nCnt = n - nESttPos;
+ sal_uInt16 nCnt = n - nESttPos;
aPosArr.Remove( nESttPos, nCnt );
}
#else
@@ -1379,7 +1379,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
aPosArr[ 0 ].Y() ) :
0;
- for( USHORT n = 0; n < aPosArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aPosArr.Count(); ++n )
{
const _CmpLPt& rPt = aPosArr[ n ];
if( bCalcWidth )
@@ -1387,7 +1387,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
if( nY == ( bVert ? rPt.X() : rPt.Y() ) ) // gleiche Ebene ?
nWidth += rPt.pSelBox->GetFrmFmt()->GetFrmSize().GetWidth();
else
- bCalcWidth = FALSE; // eine Zeile fertig
+ bCalcWidth = sal_False; // eine Zeile fertig
}
if( IsEmptyBox( *rPt.pSelBox, aPam ) )
@@ -1406,7 +1406,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
{
SwTableBox* pTmpBox = rBoxes[0];
SwTableLine* pInsLine = pTmpBox->GetUpper();
- USHORT nInsPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pTmpBox );
+ sal_uInt16 nInsPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pTmpBox );
lcl_InsTblBox( pTblNd, pDoc, pTmpBox, nInsPos );
(*ppMergeBox) = pInsLine->GetTabBoxes()[ nInsPos ];
@@ -1437,23 +1437,23 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwPaM aPam( aInsPos );
- for( USHORT n = 0; n < aPosArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aPosArr.Count(); ++n )
{
const _CmpLPt& rPt = aPosArr[ n ];
aPam.GetPoint()->nNode.Assign( *rPt.pSelBox->GetSttNd()->
EndOfSectionNode(), -1 );
SwCntntNode* pCNd = aPam.GetCntntNode();
- USHORT nL = pCNd ? pCNd->Len() : 0;
+ sal_uInt16 nL = pCNd ? pCNd->Len() : 0;
aPam.GetPoint()->nContent.Assign( pCNd, nL );
SwNodeIndex aSttNdIdx( *rPt.pSelBox->GetSttNd(), 1 );
// ein Node muss in der Box erhalten bleiben (sonst wird beim
// Move die gesamte Section geloescht)
if( pUndo )
- pDoc->DoUndo( FALSE );
+ pDoc->DoUndo( sal_False );
pDoc->AppendTxtNode( *aPam.GetPoint() );
if( pUndo )
- pDoc->DoUndo( TRUE );
+ pDoc->DoUndo( sal_True );
SwNodeRange aRg( aSttNdIdx, aPam.GetPoint()->nNode );
rInsPosNd++;
if( pUndo )
@@ -1466,7 +1466,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// wo steht jetzt aInsPos ??
if( bCalcWidth )
- bCalcWidth = FALSE; // eine Zeile fertig
+ bCalcWidth = sal_False; // eine Zeile fertig
// den initialen TextNode ueberspringen
rInsPosNd.Assign( pDoc->GetNodes(),
@@ -1492,32 +1492,32 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
}
-static BOOL lcl_CheckCol( const _FndBox*& rpFndBox, void* pPara );
+static sal_Bool lcl_CheckCol( const _FndBox*& rpFndBox, void* pPara );
-static BOOL lcl_CheckRow( const _FndLine*& rpFndLine, void* pPara )
+static sal_Bool lcl_CheckRow( const _FndLine*& rpFndLine, void* pPara )
{
((_FndLine*)rpFndLine)->GetBoxes().ForEach( &lcl_CheckCol, pPara );
- return *(BOOL*)pPara;
+ return *(sal_Bool*)pPara;
}
-static BOOL lcl_CheckCol( const _FndBox*& rpFndBox, void* pPara )
+static sal_Bool lcl_CheckCol( const _FndBox*& rpFndBox, void* pPara )
{
if( !rpFndBox->GetBox()->GetSttNd() )
{
if( rpFndBox->GetLines().Count() !=
rpFndBox->GetBox()->GetTabLines().Count() )
- *((BOOL*)pPara) = FALSE;
+ *((sal_Bool*)pPara) = sal_False;
else
((_FndBox*)rpFndBox)->GetLines().ForEach( &lcl_CheckRow, pPara );
}
// Box geschuetzt ??
else if( rpFndBox->GetBox()->GetFrmFmt()->GetProtect().IsCntntProtected() )
- *((BOOL*)pPara) = FALSE;
- return *(BOOL*)pPara;
+ *((sal_Bool*)pPara) = sal_False;
+ return *(sal_Bool*)pPara;
}
-USHORT CheckMergeSel( const SwPaM& rPam )
+sal_uInt16 CheckMergeSel( const SwPaM& rPam )
{
SwSelBoxes aBoxes;
//JP 24.09.96: Merge mit wiederholenden TabellenHeadline funktioniert nicht
@@ -1526,15 +1526,15 @@ USHORT CheckMergeSel( const SwPaM& rPam )
Point aPt;
const SwLayoutFrm *pStart = rPam.GetCntntNode()->GetFrm(
&aPt )->GetUpper(),
- *pEnd = rPam.GetCntntNode(FALSE)->GetFrm(
+ *pEnd = rPam.GetCntntNode(sal_False)->GetFrm(
&aPt )->GetUpper();
GetTblSel( pStart, pEnd, aBoxes, 0 );
return CheckMergeSel( aBoxes );
}
-USHORT CheckMergeSel( const SwSelBoxes& rBoxes )
+sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes )
{
- USHORT eRet = TBLMERGE_NOSELECTION;
+ sal_uInt16 eRet = TBLMERGE_NOSELECTION;
if( rBoxes.Count() )
{
eRet = TBLMERGE_OK;
@@ -1546,7 +1546,7 @@ USHORT CheckMergeSel( const SwSelBoxes& rBoxes )
&_FndLineCopyCol, &aPara );
if( aFndBox.GetLines().Count() )
{
- BOOL bMergeSelOk = TRUE;
+ sal_Bool bMergeSelOk = sal_True;
_FndBox* pFndBox = &aFndBox;
_FndLine* pFndLine = 0;
while( pFndBox && 1 == pFndBox->GetLines().Count() )
@@ -1651,7 +1651,7 @@ void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart,
aEndArr.Insert( p, 0 );
}
- for( USHORT n = 0; n < aEndArr.Count() && n < aSttArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aEndArr.Count() && n < aSttArr.Count(); ++n )
if( aSttArr[ n ] != aEndArr[ n ] )
{
// first unequal line or box - all odds are
@@ -1876,14 +1876,14 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
const SwTabFrm *pEndTable = pEnd->FindTabFrm();
if( !pTable || !pEndTable )
return;
- BOOL bExchange = FALSE;
+ sal_Bool bExchange = sal_False;
if ( pTable != pEndTable )
{
if ( !pTable->IsAnFollow( pEndTable ) )
{
ASSERT( pEndTable->IsAnFollow( pTable ), "Tabkette verknotet." );
- bExchange = TRUE;
+ bExchange = sal_True;
}
}
else
@@ -1895,10 +1895,10 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
{
if( (pStart->Frm().*fnRect->fnGetLeft)() >
(pEnd->Frm().*fnRect->fnGetLeft)() )
- bExchange = TRUE;
+ bExchange = sal_True;
}
else if( bVert == ( nSttTop < nEndTop ) )
- bExchange = TRUE;
+ bExchange = sal_True;
}
if ( bExchange )
{
@@ -2056,7 +2056,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
}
}
-BOOL CheckSplitCells( const SwCrsrShell& rShell, USHORT nDiv,
+sal_Bool CheckSplitCells( const SwCrsrShell& rShell, sal_uInt16 nDiv,
const SwTblSearchType eSearchType )
{
if( !rShell.IsTableMode() )
@@ -2065,13 +2065,13 @@ BOOL CheckSplitCells( const SwCrsrShell& rShell, USHORT nDiv,
return CheckSplitCells( *rShell.getShellCrsr(false), nDiv, eSearchType );
}
-BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv,
+sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv,
const SwTblSearchType eSearchType )
{
if( 1 >= nDiv )
- return FALSE;
+ return sal_False;
- USHORT nMinValue = nDiv * MINLAY;
+ sal_uInt16 nMinValue = nDiv * MINLAY;
//Start- und Endzelle besorgen und den naechsten fragen.
Point aPtPos, aMkPos;
@@ -2083,7 +2083,7 @@ BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv,
}
const SwLayoutFrm *pStart = rCrsr.GetCntntNode()->GetFrm(
&aPtPos )->GetUpper(),
- *pEnd = rCrsr.GetCntntNode(FALSE)->GetFrm(
+ *pEnd = rCrsr.GetCntntNode(sal_False)->GetFrm(
&aMkPos )->GetUpper();
SWRECTFN( pStart->GetUpper() )
@@ -2094,7 +2094,7 @@ BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv,
::MakeSelUnions( aUnions, pStart, pEnd, eSearchType );
//Jetzt zu jedem Eintrag die Boxen herausfischen und uebertragen.
- for ( USHORT i = 0; i < aUnions.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
{
SwSelUnion *pUnion = aUnions[i];
const SwTabFrm *pTable = pUnion->GetTable();
@@ -2116,7 +2116,7 @@ BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv,
if( ::IsFrmInTblSel( pUnion->GetUnion(), pCell ) )
{
if( (pCell->Frm().*fnRect->fnGetWidth)() < nMinValue )
- return FALSE;
+ return sal_False;
}
if ( pCell->GetNext() )
@@ -2132,7 +2132,7 @@ BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv,
pRow = (const SwLayoutFrm*)pRow->GetNext();
}
}
- return TRUE;
+ return sal_True;
}
// -------------------------------------------------------------------
@@ -2159,7 +2159,7 @@ void lcl_InsertRow( SwTableLine &rLine, SwLayoutFrm *pUpper, SwFrm *pSibling )
}
-BOOL _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara )
+sal_Bool _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara )
{
_FndPara* pFndPara = (_FndPara*)pPara;
_FndBox* pFndBox = new _FndBox( (SwTableBox*)rpBox, pFndPara->pFndLine );
@@ -2170,25 +2170,25 @@ BOOL _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara )
if( !pFndBox->GetLines().Count() )
{
delete pFndBox;
- return TRUE;
+ return sal_True;
}
}
else
{
SwTableBoxPtr pSrch = (SwTableBoxPtr)rpBox;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( !pFndPara->rBoxes.Seek_Entry( pSrch, &nFndPos ))
{
delete pFndBox;
- return TRUE;
+ return sal_True;
}
}
pFndPara->pFndLine->GetBoxes().C40_INSERT( _FndBox, pFndBox,
pFndPara->pFndLine->GetBoxes().Count() );
- return TRUE;
+ return sal_True;
}
-BOOL _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara )
+sal_Bool _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara )
{
_FndPara* pFndPara = (_FndPara*)pPara;
_FndLine* pFndLine = new _FndLine( (SwTableLine*)rpLine, pFndPara->pFndBox );
@@ -2201,7 +2201,7 @@ BOOL _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara )
}
else
delete pFndLine;
- return TRUE;
+ return sal_True;
}
void _FndBox::SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable )
@@ -2213,15 +2213,15 @@ void _FndBox::SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable )
//Line im Array der SwTable. Damit die 0 fuer 'keine Line' verwand werden
//kann werden die Positionen um 1 nach oben versetzt!
- USHORT nStPos = USHRT_MAX;
- USHORT nEndPos= 0;
+ sal_uInt16 nStPos = USHRT_MAX;
+ sal_uInt16 nEndPos= 0;
- for ( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
SwTableLine *pLine = rBoxes[i]->GetUpper();
while ( pLine->GetUpper() )
pLine = pLine->GetUpper()->GetUpper();
- const USHORT nPos = rTable.GetTabLines().GetPos(
+ const sal_uInt16 nPos = rTable.GetTabLines().GetPos(
(const SwTableLine*&)pLine ) + 1;
ASSERT( nPos != USHRT_MAX, "TableLine not found." );
@@ -2251,7 +2251,7 @@ void _FndBox::SetTableLines( const SwTable &rTable )
return;
SwTableLine* pTmpLine = GetLines()[0]->GetLine();
- USHORT nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pTmpLine );
+ sal_uInt16 nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pTmpLine );
ASSERT( USHRT_MAX != nPos, "Line steht nicht in der Tabelle" );
if( nPos )
pLineBefore = rTable.GetTabLines()[ nPos - 1 ];
@@ -2265,7 +2265,7 @@ void _FndBox::SetTableLines( const SwTable &rTable )
inline void UnsetFollow( SwFlowFrm *pTab )
{
- pTab->bIsFollow = FALSE;
+ pTab->bIsFollow = sal_False;
}
void _FndBox::DelFrms( SwTable &rTable )
@@ -2276,8 +2276,8 @@ void _FndBox::DelFrms( SwTable &rTable )
//Wird ein Master vernichtet, so muss der Follow Master werden.
//Ein TabFrm muss immer uebrigbleiben.
- USHORT nStPos = 0;
- USHORT nEndPos= rTable.GetTabLines().Count() - 1;
+ sal_uInt16 nStPos = 0;
+ sal_uInt16 nEndPos= rTable.GetTabLines().Count() - 1;
if( rTable.IsNewModel() && pLineBefore )
rTable.CheckRowSpan( pLineBefore, true );
if ( pLineBefore )
@@ -2297,7 +2297,7 @@ void _FndBox::DelFrms( SwTable &rTable )
--nEndPos;
}
- for ( USHORT i = nStPos; i <= nEndPos; ++i)
+ for ( sal_uInt16 i = nStPos; i <= nEndPos; ++i)
{
SwFrmFmt *pFmt = rTable.GetTabLines()[i]->GetFrmFmt();
SwClientIter aIter( *pFmt );
@@ -2309,12 +2309,12 @@ void _FndBox::DelFrms( SwTable &rTable )
if ( pFrm &&
((SwRowFrm*)pFrm)->GetTabLine() == rTable.GetTabLines()[i] )
{
- BOOL bDel = TRUE;
+ sal_Bool bDel = sal_True;
SwTabFrm *pUp = !pFrm->GetPrev() && !pFrm->GetNext() ?
(SwTabFrm*)pFrm->GetUpper() : 0;
if ( !pUp )
{
- const USHORT nRepeat =
+ const sal_uInt16 nRepeat =
((SwTabFrm*)pFrm->GetUpper())->GetTable()->GetRowsToRepeat();
if ( nRepeat > 0 &&
((SwTabFrm*)pFrm->GetUpper())->IsFollow() )
@@ -2348,7 +2348,7 @@ void _FndBox::DelFrms( SwTable &rTable )
// flag from pUp to pPrev. pUp may still have the
// flag set although there is not more follow flow
// line associated with pUp.
- pPrev->SetFollowFlowLine( FALSE );
+ pPrev->SetFollowFlowLine( sal_False );
// <--
}
else if ( pFollow )
@@ -2374,7 +2374,7 @@ void _FndBox::DelFrms( SwTable &rTable )
}
}
delete pUp;
- bDel = FALSE;//Die Row wird mit in den Abgrund
+ bDel = sal_False;//Die Row wird mit in den Abgrund
//gerissen.
}
}
@@ -2388,7 +2388,7 @@ void _FndBox::DelFrms( SwTable &rTable )
// We do not delete the follow flow line,
// this will be done automatically in the
// next turn.
- ((SwTabFrm*)pTabFrm)->SetFollowFlowLine( FALSE );
+ ((SwTabFrm*)pTabFrm)->SetFollowFlowLine( sal_False );
}
pFrm->Cut();
@@ -2400,7 +2400,7 @@ void _FndBox::DelFrms( SwTable &rTable )
}
}
-BOOL lcl_IsLineOfTblFrm( const SwTabFrm& rTable, const SwFrm& rChk )
+sal_Bool lcl_IsLineOfTblFrm( const SwTabFrm& rTable, const SwFrm& rChk )
{
const SwTabFrm* pTblFrm = rChk.FindTabFrm();
if( pTblFrm->IsFollow() )
@@ -2426,8 +2426,8 @@ void lcl_UpdateRepeatedHeadlines( SwTabFrm& rTabFrm, bool bCalcLowers )
// Insert fresh set of headlines:
pLower = (SwRowFrm*)rTabFrm.Lower();
SwTable& rTable = *rTabFrm.GetTable();
- const USHORT nRepeat = rTable.GetRowsToRepeat();
- for ( USHORT nIdx = 0; nIdx < nRepeat; ++nIdx )
+ const sal_uInt16 nRepeat = rTable.GetRowsToRepeat();
+ for ( sal_uInt16 nIdx = 0; nIdx < nRepeat; ++nIdx )
{
SwRowFrm* pHeadline = new SwRowFrm(
*rTable.GetTabLines()[ nIdx ] );
@@ -2446,8 +2446,8 @@ void _FndBox::MakeFrms( SwTable &rTable )
//wieder neu erzeugt werden.
//Und Zwar fuer alle Auspraegungen der Tabelle (mehrere z.B. im Kopf/Fuss).
- USHORT nStPos = 0;
- USHORT nEndPos= rTable.GetTabLines().Count() - 1;
+ sal_uInt16 nStPos = 0;
+ sal_uInt16 nEndPos= rTable.GetTabLines().Count() - 1;
if ( pLineBefore )
{
nStPos = rTable.GetTabLines().GetPos(
@@ -2477,7 +2477,7 @@ void _FndBox::MakeFrms( SwTable &rTable )
i >= 0 && !pSibling; --i )
{
SwTableLine *pLine = pLineBehind ? pLineBehind :
- rTable.GetTabLines()[static_cast<USHORT>(i)];
+ rTable.GetTabLines()[static_cast<sal_uInt16>(i)];
SwClientIter aIter( *pLine->GetFrmFmt() );
pSibling = (SwFrm*)aIter.First( TYPE(SwFrm) );
while ( pSibling && (
@@ -2503,8 +2503,8 @@ void _FndBox::MakeFrms( SwTable &rTable )
// ???? oder das der Letzte Follow der Tabelle ????
pUpperFrm = pTable;
- for ( i = nStPos; (USHORT)i <= nEndPos; ++i )
- ::lcl_InsertRow( *rTable.GetTabLines()[static_cast<USHORT>(i)],
+ for ( i = nStPos; (sal_uInt16)i <= nEndPos; ++i )
+ ::lcl_InsertRow( *rTable.GetTabLines()[static_cast<sal_uInt16>(i)],
(SwLayoutFrm*)pUpperFrm, pSibling );
if ( pUpperFrm->IsTabFrm() )
((SwTabFrm*)pUpperFrm)->SetCalcLowers();
@@ -2517,23 +2517,23 @@ void _FndBox::MakeFrms( SwTable &rTable )
}
}
-void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber,
- const BOOL bBehind )
+void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber,
+ const sal_Bool bBehind )
{
//Frms fuer neu eingefuege Zeilen erzeugen.
- //bBehind == TRUE: vor pLineBehind
- // == FALSE: hinter pLineBefore
- const USHORT nBfPos = pLineBefore ?
+ //bBehind == sal_True: vor pLineBehind
+ // == sal_False: hinter pLineBefore
+ const sal_uInt16 nBfPos = pLineBefore ?
rTable.GetTabLines().GetPos( (const SwTableLine*&)pLineBefore ) :
USHRT_MAX;
- const USHORT nBhPos = pLineBehind ?
+ const sal_uInt16 nBhPos = pLineBehind ?
rTable.GetTabLines().GetPos( (const SwTableLine*&)pLineBehind ) :
USHRT_MAX;
//nNumber: wie oft ist eingefuegt worden.
//nCnt: wieviele sind nNumber mal eingefuegt worden.
- const USHORT nCnt =
+ const sal_uInt16 nCnt =
((nBhPos != USHRT_MAX ? nBhPos : rTable.GetTabLines().Count()) -
(nBfPos != USHRT_MAX ? nBfPos + 1 : 0)) / (nNumber + 1);
@@ -2574,10 +2574,10 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber,
pTable = pTable->GetFollow();
pUpperFrm = pTable;
}
- const USHORT nMax = nBhPos != USHRT_MAX ?
+ const sal_uInt16 nMax = nBhPos != USHRT_MAX ?
nBhPos : rTable.GetTabLines().Count();
- USHORT i = nBfPos != USHRT_MAX ? nBfPos + 1 + nCnt : nCnt;
+ sal_uInt16 i = nBfPos != USHRT_MAX ? nBfPos + 1 + nCnt : nCnt;
for ( ; i < nMax; ++i )
::lcl_InsertRow( *rTable.GetTabLines()[i], pUpperFrm, pSibling );
@@ -2586,7 +2586,7 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber,
}
else //davor einfuegen
{
- USHORT i;
+ sal_uInt16 i;
// We are looking for the frame that is behind the row frame
// that should be inserted.
@@ -2622,7 +2622,7 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber,
if ( pLineBefore )
pSibling = pSibling->GetNext();
- USHORT nMax = nBhPos != USHRT_MAX ?
+ sal_uInt16 nMax = nBhPos != USHRT_MAX ?
nBhPos - nCnt :
rTable.GetTabLines().Count() - nCnt;
@@ -2638,7 +2638,7 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber,
//Die Headlines mussen ggf. auch verarbeitet werden. Um gut arbeitenden
//Code nicht zu zerfasern wird hier nochmals iteriert.
- const USHORT nRowsToRepeat = rTable.GetRowsToRepeat();
+ const sal_uInt16 nRowsToRepeat = rTable.GetRowsToRepeat();
if ( nRowsToRepeat > 0 &&
( ( !bBehind && ( nBfPos == USHRT_MAX || nBfPos + 1 < nRowsToRepeat ) ) ||
( bBehind && ( ( nBfPos == USHRT_MAX && nRowsToRepeat > 1 ) || nBfPos + 2 < nRowsToRepeat ) ) ) )
@@ -2660,14 +2660,14 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber,
}
}
-BOOL _FndBox::AreLinesToRestore( const SwTable &rTable ) const
+sal_Bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const
{
//Lohnt es sich MakeFrms zu rufen?
if ( !pLineBefore && !pLineBehind && rTable.GetTabLines().Count() )
- return TRUE;
+ return sal_True;
- USHORT nBfPos;
+ sal_uInt16 nBfPos;
if(pLineBefore)
{
const SwTableLine* rLBefore = (const SwTableLine*)pLineBefore;
@@ -2676,7 +2676,7 @@ BOOL _FndBox::AreLinesToRestore( const SwTable &rTable ) const
else
nBfPos = USHRT_MAX;
- USHORT nBhPos;
+ sal_uInt16 nBhPos;
if(pLineBehind)
{
const SwTableLine* rLBehind = (const SwTableLine*)pLineBehind;
@@ -2687,8 +2687,8 @@ BOOL _FndBox::AreLinesToRestore( const SwTable &rTable ) const
if ( nBfPos == nBhPos ) //Duerfte eigentlich nie vorkommen.
{
- ASSERT( FALSE, "Table, Loeschen auf keinem Bereich !?!" );
- return FALSE;
+ ASSERT( sal_False, "Table, Loeschen auf keinem Bereich !?!" );
+ return sal_False;
}
if ( rTable.GetRowsToRepeat() > 0 )
@@ -2709,19 +2709,19 @@ BOOL _FndBox::AreLinesToRestore( const SwTable &rTable ) const
// Some adjacent lines at the beginning of the table have been deleted:
if ( nBfPos == USHRT_MAX && nBhPos == 0 )
- return FALSE;
+ return sal_False;
// Some adjacent lines at the end of the table have been deleted:
if ( nBhPos == USHRT_MAX && nBfPos == (rTable.GetTabLines().Count() - 1) )
- return FALSE;
+ return sal_False;
// Some adjacent lines in the middle of the table have been deleted:
if ( nBfPos != USHRT_MAX && nBhPos != USHRT_MAX && (nBfPos + 1) == nBhPos )
- return FALSE;
+ return sal_False;
// The structure of the deleted lines is more complex due to split lines.
// A call of MakeFrms() is necessary.
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/graphic/grfatr.cxx b/sw/source/core/graphic/grfatr.cxx
index 8e4e9f77aba8..85c9a028e5af 100644
--- a/sw/source/core/graphic/grfatr.cxx
+++ b/sw/source/core/graphic/grfatr.cxx
@@ -79,19 +79,19 @@ int SwMirrorGrf::operator==( const SfxPoolItem& rItem) const
((SwMirrorGrf&)rItem).IsGrfToggle() == IsGrfToggle();
}
-BOOL lcl_IsHoriOnEvenPages(int nEnum, BOOL bToggle)
+sal_Bool lcl_IsHoriOnEvenPages(int nEnum, sal_Bool bToggle)
{
- BOOL bEnum = nEnum == RES_MIRROR_GRAPH_VERT ||
+ sal_Bool bEnum = nEnum == RES_MIRROR_GRAPH_VERT ||
nEnum == RES_MIRROR_GRAPH_BOTH;
return bEnum != bToggle;
}
-BOOL lcl_IsHoriOnOddPages(int nEnum)
+sal_Bool lcl_IsHoriOnOddPages(int nEnum)
{
- BOOL bEnum = nEnum == RES_MIRROR_GRAPH_VERT ||
+ sal_Bool bEnum = nEnum == RES_MIRROR_GRAPH_VERT ||
nEnum == RES_MIRROR_GRAPH_BOTH;
return bEnum;
}
-BOOL SwMirrorGrf::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SwMirrorGrf::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
sal_Bool bRet = sal_True,
bVal;
@@ -117,7 +117,7 @@ BOOL SwMirrorGrf::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-BOOL SwMirrorGrf::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SwMirrorGrf::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bRet = sal_True;
sal_Bool bVal = *(sal_Bool*)rVal.getValue();
@@ -128,17 +128,17 @@ BOOL SwMirrorGrf::PutValue( const uno::Any& rVal, BYTE nMemberId )
case MID_MIRROR_HORZ_EVEN_PAGES:
case MID_MIRROR_HORZ_ODD_PAGES:
{
- BOOL bIsVert = GetValue() == RES_MIRROR_GRAPH_HOR ||
+ sal_Bool bIsVert = GetValue() == RES_MIRROR_GRAPH_HOR ||
GetValue() == RES_MIRROR_GRAPH_BOTH;
- BOOL bOnOddPages = nMemberId == MID_MIRROR_HORZ_EVEN_PAGES ?
+ sal_Bool bOnOddPages = nMemberId == MID_MIRROR_HORZ_EVEN_PAGES ?
lcl_IsHoriOnOddPages(GetValue()) : bVal;
- BOOL bOnEvenPages = nMemberId == MID_MIRROR_HORZ_ODD_PAGES ?
+ sal_Bool bOnEvenPages = nMemberId == MID_MIRROR_HORZ_ODD_PAGES ?
lcl_IsHoriOnEvenPages(GetValue(), IsGrfToggle()) : bVal;
MirrorGraph nEnum = bOnOddPages ?
bIsVert ? RES_MIRROR_GRAPH_BOTH : RES_MIRROR_GRAPH_VERT :
bIsVert ? RES_MIRROR_GRAPH_HOR : RES_MIRROR_GRAPH_DONT;
- BOOL bToggle = bOnOddPages != bOnEvenPages;
- SetValue(static_cast<USHORT>(nEnum));
+ sal_Bool bToggle = bOnOddPages != bOnEvenPages;
+ SetValue(static_cast<sal_uInt16>(nEnum));
SetGrfToggle( bToggle );
}
break;
@@ -198,28 +198,28 @@ int SwRotationGrf::operator==( const SfxPoolItem& rCmp ) const
}
-BOOL SwRotationGrf::QueryValue( uno::Any& rVal, BYTE ) const
+sal_Bool SwRotationGrf::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
// SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w)
// where we still want this to be a sal_Int16
rVal <<= (sal_Int16)GetValue();
- return TRUE;
+ return sal_True;
}
-BOOL SwRotationGrf::PutValue( const uno::Any& rVal, BYTE )
+sal_Bool SwRotationGrf::PutValue( const uno::Any& rVal, sal_uInt8 )
{
// SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w)
// where we still want this to be a sal_Int16
sal_Int16 nValue = 0;
if (rVal >>= nValue)
{
- // UINT16 argument needed
- SetValue( (UINT16) nValue );
- return TRUE;
+ // sal_uInt16 argument needed
+ SetValue( (sal_uInt16) nValue );
+ return sal_True;
}
DBG_ERROR( "SwRotationGrf::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
// ------------------------------------------------------------------
@@ -270,13 +270,13 @@ int SwGammaGrf::operator==( const SfxPoolItem& rCmp ) const
nValue == ((SwGammaGrf&)rCmp).GetValue();
}
-BOOL SwGammaGrf::QueryValue( uno::Any& rVal, BYTE ) const
+sal_Bool SwGammaGrf::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
rVal <<= nValue;
return sal_True;
}
-BOOL SwGammaGrf::PutValue( const uno::Any& rVal, BYTE )
+sal_Bool SwGammaGrf::PutValue( const uno::Any& rVal, sal_uInt8 )
{
return rVal >>= nValue;
}
@@ -295,24 +295,24 @@ SfxPoolItem* SwTransparencyGrf::Clone( SfxItemPool * ) const
return new SwTransparencyGrf( *this );
}
// ------------------------------------------------------------------
-BOOL SwTransparencyGrf::QueryValue( uno::Any& rVal,
- BYTE ) const
+sal_Bool SwTransparencyGrf::QueryValue( uno::Any& rVal,
+ sal_uInt8 ) const
{
DBG_ASSERT(ISA(SfxByteItem),"Put/QueryValue should be removed!");
sal_Int16 nRet = GetValue();
DBG_ASSERT( 0 <= nRet && nRet <= 100, "value out of range" );
rVal <<= nRet;
- return TRUE;
+ return sal_True;
}
// ------------------------------------------------------------------
-BOOL SwTransparencyGrf::PutValue( const uno::Any& rVal,
- BYTE )
+sal_Bool SwTransparencyGrf::PutValue( const uno::Any& rVal,
+ sal_uInt8 )
{
//temporary conversion until this is a SfxInt16Item!
DBG_ASSERT(ISA(SfxByteItem),"Put/QueryValue should be removed!");
sal_Int16 nVal = 0;
if(!(rVal >>= nVal) || nVal < -100 || nVal > 100)
- return FALSE;
+ return sal_False;
if(nVal < 0)
{
// for compatibility with old documents
@@ -322,8 +322,8 @@ BOOL SwTransparencyGrf::PutValue( const uno::Any& rVal,
nVal += 128;
}
DBG_ASSERT( 0 <= nVal && nVal <= 100, "value out of range" );
- SetValue(static_cast<BYTE>(nVal));
- return TRUE;
+ SetValue(static_cast<sal_uInt8>(nVal));
+ return sal_True;
}
// ------------------------------------------------------------------
@@ -333,7 +333,7 @@ SfxPoolItem* SwDrawModeGrf::Clone( SfxItemPool * ) const
return new SwDrawModeGrf( *this );
}
-USHORT SwDrawModeGrf::GetValueCount() const
+sal_uInt16 SwDrawModeGrf::GetValueCount() const
{
// GRAPHICDRAWMODE_STANDARD = 0,
// GRAPHICDRAWMODE_GREYS = 1,
@@ -342,24 +342,24 @@ USHORT SwDrawModeGrf::GetValueCount() const
return GRAPHICDRAWMODE_WATERMARK + 1;
}
-BOOL SwDrawModeGrf::QueryValue( uno::Any& rVal,
- BYTE ) const
+sal_Bool SwDrawModeGrf::QueryValue( uno::Any& rVal,
+ sal_uInt8 ) const
{
drawing::ColorMode eRet = (drawing::ColorMode)GetEnumValue();
rVal <<= eRet;
- return TRUE;
+ return sal_True;
}
-BOOL SwDrawModeGrf::PutValue( const uno::Any& rVal,
- BYTE )
+sal_Bool SwDrawModeGrf::PutValue( const uno::Any& rVal,
+ sal_uInt8 )
{
sal_Int32 eVal = SWUnoHelper::GetEnumAsInt32( rVal );
if(eVal >= 0 && eVal <= GRAPHICDRAWMODE_WATERMARK)
{
- SetEnumValue((USHORT)eVal);
- return TRUE;
+ SetEnumValue((sal_uInt16)eVal);
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index bcbdc826dd66..1f8dc1ee488b 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -84,10 +84,10 @@ SwGrfNode::SwGrfNode(
{
aGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) );
bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel = bLoadLowResGrf =
- bFrameInPaint = bScaleImageMap = FALSE;
+ bFrameInPaint = bScaleImageMap = sal_False;
- bGrafikArrived = TRUE;
- ReRead(rGrfName,rFltName, pGraphic, 0, FALSE);
+ bGrafikArrived = sal_True;
+ ReRead(rGrfName,rFltName, pGraphic, 0, sal_False);
}
SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
@@ -104,8 +104,8 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
if( rGrfObj.HasUserData() && rGrfObj.IsSwappedOut() )
aGrfObj.SetSwapState();
bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel= bLoadLowResGrf =
- bFrameInPaint = bScaleImageMap = FALSE;
- bGrafikArrived = TRUE;
+ bFrameInPaint = bScaleImageMap = sal_False;
+ bGrafikArrived = sal_True;
}
// Konstruktor fuer den SW/G-Reader. Dieser ctor wird verwendet,
@@ -128,8 +128,8 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
aGrfObj.SetGraphic( aGrf, rGrfName );
bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel = bLoadLowResGrf =
- bFrameInPaint = bScaleImageMap = FALSE;
- bGrafikArrived = TRUE;
+ bFrameInPaint = bScaleImageMap = sal_False;
+ bGrafikArrived = sal_True;
InsertLink( rGrfName, rFltName );
if( IsLinkedFile() )
@@ -144,12 +144,12 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
}
}
-BOOL SwGrfNode::ReRead(
+sal_Bool SwGrfNode::ReRead(
const String& rGrfName, const String& rFltName,
const Graphic* pGraphic, const GraphicObject* pGrfObj,
- BOOL bNewGrf )
+ sal_Bool bNewGrf )
{
- BOOL bReadGrf = FALSE, bSetTwipSize = TRUE;
+ sal_Bool bReadGrf = sal_False, bSetTwipSize = sal_True;
ASSERT( pGraphic || pGrfObj || rGrfName.Len(),
"GraphicNode without a name, Graphic or GraphicObject" );
@@ -166,7 +166,7 @@ BOOL SwGrfNode::ReRead(
String sCmd( rGrfName );
if( rFltName.Len() )
{
- USHORT nNewType;
+ sal_uInt16 nNewType;
if( rFltName.EqualsAscii( "DDE" ))
nNewType = OBJECT_CLIENT_DDE;
else
@@ -193,7 +193,7 @@ BOOL SwGrfNode::ReRead(
if( pGraphic )
{
aGrfObj.SetGraphic( *pGraphic, rGrfName );
- bReadGrf = TRUE;
+ bReadGrf = sal_True;
}
else if( pGrfObj )
{
@@ -201,7 +201,7 @@ BOOL SwGrfNode::ReRead(
if( pGrfObj->HasUserData() && pGrfObj->IsSwappedOut() )
aGrfObj.SetSwapState();
aGrfObj.SetLink( rGrfName );
- bReadGrf = TRUE;
+ bReadGrf = sal_True;
}
else
{
@@ -228,7 +228,7 @@ BOOL SwGrfNode::ReRead(
((SwBaseLink*)&refLink)->SwapIn();
}
}
- bSetTwipSize = FALSE;
+ bSetTwipSize = sal_False;
}
}
else if( pGraphic && !rGrfName.Len() )
@@ -238,7 +238,7 @@ BOOL SwGrfNode::ReRead(
DelStreamName();
aGrfObj.SetGraphic( *pGraphic );
- bReadGrf = TRUE;
+ bReadGrf = sal_True;
}
else if( pGrfObj && !rGrfName.Len() )
{
@@ -249,12 +249,12 @@ BOOL SwGrfNode::ReRead(
aGrfObj = *pGrfObj;
if( pGrfObj->HasUserData() && pGrfObj->IsSwappedOut() )
aGrfObj.SetSwapState();
- bReadGrf = TRUE;
+ bReadGrf = sal_True;
}
// Import einer Grafik:
// Ist die Grafik bereits geladen?
else if( !bNewGrf && GRAPHIC_NONE != aGrfObj.GetType() )
- return TRUE;
+ return sal_True;
else
{
@@ -269,7 +269,7 @@ BOOL SwGrfNode::ReRead(
if( pGraphic )
{
aGrfObj.SetGraphic( *pGraphic, rGrfName );
- bReadGrf = TRUE;
+ bReadGrf = sal_True;
// Verbindung herstellen ohne ein Update; Grafik haben wir!
((SwBaseLink*)&refLink)->Connect();
}
@@ -277,7 +277,7 @@ BOOL SwGrfNode::ReRead(
{
aGrfObj = *pGrfObj;
aGrfObj.SetLink( rGrfName );
- bReadGrf = TRUE;
+ bReadGrf = sal_True;
// Verbindung herstellen ohne ein Update; Grafik haben wir!
((SwBaseLink*)&refLink)->Connect();
}
@@ -364,7 +364,7 @@ SwGrfNode * SwNodes::MakeGrfNode( const SwNodeIndex & rWhere,
const Graphic* pGraphic,
SwGrfFmtColl* pGrfColl,
SwAttrSet* pAutoAttr,
- BOOL bDelayed )
+ sal_Bool bDelayed )
{
ASSERT( pGrfColl, "MakeGrfNode: Formatpointer ist 0." );
SwGrfNode *pNode;
@@ -395,7 +395,7 @@ Size SwGrfNode::GetTwipSize() const
-BOOL SwGrfNode::ImportGraphic( SvStream& rStrm )
+sal_Bool SwGrfNode::ImportGraphic( SvStream& rStrm )
{
Graphic aGraphic;
if( !GraphicFilter::GetGraphicFilter()->ImportGraphic( aGraphic, String(), rStrm ) )
@@ -404,10 +404,10 @@ BOOL SwGrfNode::ImportGraphic( SvStream& rStrm )
aGrfObj.SetGraphic( aGraphic );
aGrfObj.SetUserData( aUserData );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// Returnwert:
@@ -415,13 +415,13 @@ BOOL SwGrfNode::ImportGraphic( SvStream& rStrm )
// 0 : nicht geladen
// 1 : Einlesen erfolgreich
-short SwGrfNode::SwapIn( BOOL bWaitForData )
+short SwGrfNode::SwapIn( sal_Bool bWaitForData )
{
if( bInSwapIn ) // nicht rekuriv!!
return !aGrfObj.IsSwappedOut();
short nRet = 0;
- bInSwapIn = TRUE;
+ bInSwapIn = sal_True;
SwBaseLink* pLink = (SwBaseLink*)(::sfx2::SvBaseLink*) refLink;
if( pLink )
@@ -500,7 +500,7 @@ short SwGrfNode::SwapIn( BOOL bWaitForData )
if( !nGrfSize.Width() && !nGrfSize.Height() )
SetTwipSize( ::GetGraphicSizeTwip( aGrfObj.GetGraphic(), 0 ) );
}
- bInSwapIn = FALSE;
+ bInSwapIn = sal_False;
return nRet;
}
@@ -528,12 +528,12 @@ short SwGrfNode::SwapOut()
}
-BOOL SwGrfNode::GetFileFilterNms( String* pFileNm, String* pFilterNm ) const
+sal_Bool SwGrfNode::GetFileFilterNms( String* pFileNm, String* pFilterNm ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( refLink.Is() && refLink->GetLinkManager() )
{
- USHORT nType = refLink->GetObjType();
+ sal_uInt16 nType = refLink->GetObjType();
if( OBJECT_CLIENT_GRF == nType )
bRet = refLink->GetLinkManager()->GetDisplayNames(
refLink, 0, pFileNm, 0, pFilterNm );
@@ -547,7 +547,7 @@ BOOL SwGrfNode::GetFileFilterNms( String* pFileNm, String* pFilterNm ) const
( *pFileNm += sTopic ) += sfx2::cTokenSeperator;
*pFileNm += sItem;
pFilterNm->AssignAscii( RTL_CONSTASCII_STRINGPARAM( "DDE" ));
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -558,18 +558,18 @@ BOOL SwGrfNode::GetFileFilterNms( String* pFileNm, String* pFilterNm ) const
// Eine Grafik Undo-faehig machen. Falls sie sich bereits in
// einem Storage befindet, muss sie geladen werden.
-BOOL SwGrfNode::SavePersistentData()
+sal_Bool SwGrfNode::SavePersistentData()
{
if( refLink.Is() )
{
ASSERT( !bInSwapIn, "SavePersistentData: stehe noch im SwapIn" );
GetDoc()->GetLinkManager().Remove( refLink );
- return TRUE;
+ return sal_True;
}
// Erst mal reinswappen, falls sie im Storage ist
if( HasStreamName() && !SwapIn() )
- return FALSE;
+ return sal_False;
// --> OD 2005-04-19 #i44367#
// Do not delete graphic file in storage, because the graphic file could
@@ -586,11 +586,11 @@ BOOL SwGrfNode::SavePersistentData()
// <--
// Und in TempFile rausswappen
- return (BOOL) SwapOut();
+ return (sal_Bool) SwapOut();
}
-BOOL SwGrfNode::RestorePersistentData()
+sal_Bool SwGrfNode::RestorePersistentData()
{
if( refLink.Is() )
{
@@ -600,7 +600,7 @@ BOOL SwGrfNode::RestorePersistentData()
if( getIDocumentLayoutAccess()->GetRootFrm() )
refLink->Update();
}
- return TRUE;
+ return sal_True;
}
@@ -614,7 +614,7 @@ void SwGrfNode::InsertLink( const String& rGrfName, const String& rFltName )
refLink->SetVisible( pIDLA->IsVisibleLinks() );
if( rFltName.EqualsAscii( "DDE" ))
{
- USHORT nTmp = 0;
+ sal_uInt16 nTmp = 0;
String sApp, sTopic, sItem;
sApp = rGrfName.GetToken( 0, sfx2::cTokenSeperator, nTmp );
sTopic = rGrfName.GetToken( 0, sfx2::cTokenSeperator, nTmp );
@@ -624,7 +624,7 @@ void SwGrfNode::InsertLink( const String& rGrfName, const String& rFltName )
}
else
{
- BOOL bSync = rFltName.EqualsAscii( "SYNCHRON" );
+ sal_Bool bSync = rFltName.EqualsAscii( "SYNCHRON" );
refLink->SetSynchron( bSync );
refLink->SetContentType( SOT_FORMATSTR_ID_SVXB );
@@ -644,11 +644,11 @@ void SwGrfNode::ReleaseLink()
// erst die Grafik reinswappen!
// if( aGraphic.IsSwapOut() || !refLink->IsSynchron() )
{
- bInSwapIn = TRUE;
+ bInSwapIn = sal_True;
SwBaseLink* pLink = (SwBaseLink*)(::sfx2::SvBaseLink*) refLink;
//TODO pLink->setInputStream(getInputStream());
- pLink->SwapIn( TRUE, TRUE );
- bInSwapIn = FALSE;
+ pLink->SwapIn( sal_True, sal_True );
+ bInSwapIn = sal_False;
}
getIDocumentLinksAdministration()->GetLinkManager().Remove( refLink );
refLink.Clear();
@@ -666,7 +666,7 @@ void SwGrfNode::SetTwipSize( const Size& rSz )
ScaleImageMap();
// Image-Map nicht noch einmal skalieren
- SetScaleImageMap( FALSE );
+ SetScaleImageMap( sal_False );
}
}
@@ -685,7 +685,7 @@ void SwGrfNode::ScaleImageMap()
if ( !aURL.GetMap() )
return;
- BOOL bScale = FALSE;
+ sal_Bool bScale = sal_False;
Fraction aScaleX( 1, 1 );
Fraction aScaleY( 1, 1 );
@@ -704,7 +704,7 @@ void SwGrfNode::ScaleImageMap()
if( nGrfSize.Width() != nWidth )
{
aScaleX = Fraction( nGrfSize.Width(), nWidth );
- bScale = TRUE;
+ bScale = sal_True;
}
}
if( !rFrmSize.GetHeightPercent() )
@@ -719,7 +719,7 @@ void SwGrfNode::ScaleImageMap()
if( nGrfSize.Height() != nHeight )
{
aScaleY = Fraction( nGrfSize.Height(), nHeight );
- bScale = TRUE;
+ bScale = sal_True;
}
}
@@ -965,9 +965,9 @@ IMPL_LINK( SwGrfNode, SwapGraphic, GraphicObject*, pGrfObj )
// then make it by your self
if( !bInSwapIn )
{
- BOOL bIsModifyLocked = IsModifyLocked();
+ sal_Bool bIsModifyLocked = IsModifyLocked();
LockModify();
- SwapIn( FALSE );
+ SwapIn( sal_False );
if( !bIsModifyLocked )
UnlockModify();
}
@@ -1032,7 +1032,7 @@ void DelAllGrfCacheEntries( SwDoc* pDoc )
const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks();
SwGrfNode* pGrfNd;
String sFileNm;
- for( USHORT n = rLnks.Count(); n; )
+ for( sal_uInt16 n = rLnks.Count(); n; )
{
::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]);
if( pLnk && OBJECT_CLIENT_GRF == pLnk->GetObjType() &&
@@ -1055,7 +1055,7 @@ GraphicAttr& SwGrfNode::GetGraphicAttr( GraphicAttr& rGA,
rGA.SetDrawMode( (GraphicDrawMode)rSet.GetDrawModeGrf().GetValue() );
const SwMirrorGrf & rMirror = rSet.GetMirrorGrf();
- ULONG nMirror = BMP_MIRROR_NONE;
+ sal_uLong nMirror = BMP_MIRROR_NONE;
if( rMirror.IsGrfToggle() && pFrm && !pFrm->FindPageFrm()->OnRightPage() )
{
switch( rMirror.GetValue() )
@@ -1096,15 +1096,15 @@ GraphicAttr& SwGrfNode::GetGraphicAttr( GraphicAttr& rGA,
rGA.SetInvert( rSet.GetInvertGrf().GetValue() );
const sal_uInt16 nTrans = rSet.GetTransparencyGrf().GetValue();
- rGA.SetTransparency( (BYTE) FRound(
- Min( nTrans, (USHORT) 100 ) * 2.55 ) );
+ rGA.SetTransparency( (sal_uInt8) FRound(
+ Min( nTrans, (sal_uInt16) 100 ) * 2.55 ) );
return rGA;
}
-BOOL SwGrfNode::IsTransparent() const
+sal_Bool SwGrfNode::IsTransparent() const
{
- BOOL bRet = aGrfObj.IsTransparent();
+ sal_Bool bRet = aGrfObj.IsTransparent();
if( !bRet ) // ask the attribut
bRet = 0 != GetSwAttrSet().GetTransparencyGrf().GetValue();
@@ -1112,9 +1112,9 @@ BOOL SwGrfNode::IsTransparent() const
}
-BOOL SwGrfNode::IsSelected() const
+sal_Bool SwGrfNode::IsSelected() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwEditShell* pESh = GetDoc()->GetEditShell();
if( pESh )
{
@@ -1124,7 +1124,7 @@ BOOL SwGrfNode::IsSelected() const
if( pV->ISA( SwEditShell ) && pN == &((SwCrsrShell*)pV)
->GetCrsr()->GetPoint()->nNode.GetNode() )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
diff --git a/sw/source/core/inc/GetMetricVal.hxx b/sw/source/core/inc/GetMetricVal.hxx
index f738ff9cdffc..0d897cfa395a 100644
--- a/sw/source/core/inc/GetMetricVal.hxx
+++ b/sw/source/core/inc/GetMetricVal.hxx
@@ -33,14 +33,14 @@
#define CM_05 1 // 0.5 centimeter or 1/4 inch
#define CM_01 2 // 0.1 centimeter or 1/20 inch
-inline USHORT GetMetricVal( int n )
+inline sal_uInt16 GetMetricVal( int n )
{
#ifdef USE_MEASUREMENT
- USHORT nVal = MEASURE_METRIC == SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
+ sal_uInt16 nVal = MEASURE_METRIC == SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? 567 // 1 cm
: 770; // 1/2 Inch
#else
- USHORT nVal = 567; // 1 cm
+ sal_uInt16 nVal = 567; // 1 cm
#endif
if( CM_01 == n )
diff --git a/sw/source/core/inc/SwPortionHandler.hxx b/sw/source/core/inc/SwPortionHandler.hxx
index 50a45e2ab0f3..11888f67a8ae 100644
--- a/sw/source/core/inc/SwPortionHandler.hxx
+++ b/sw/source/core/inc/SwPortionHandler.hxx
@@ -60,8 +60,8 @@ public:
* model string.
*/
virtual void Text(
- USHORT nLength, /// length of this portion in the model string
- USHORT nType /// type of this portion
+ sal_uInt16 nLength, /// length of this portion in the model string
+ sal_uInt16 nType /// type of this portion
) = 0;
/** special portion. This method is called for every non-text
@@ -70,9 +70,9 @@ public:
* the text which is displayed, and the type of the portion.
*/
virtual void Special(
- USHORT nLength, /// length of this portion in the model string
+ sal_uInt16 nLength, /// length of this portion in the model string
const String& rText, /// text which is painted on-screen
- USHORT nType /// type of this portion
+ sal_uInt16 nType /// type of this portion
) = 0;
/** line break. This method is called whenever a line break in the
@@ -89,7 +89,7 @@ public:
* Skip() between portions is not allowed.
*/
virtual void Skip(
- USHORT nLength /// number of 'model string' characters to be skipped
+ sal_uInt16 nLength /// number of 'model string' characters to be skipped
) = 0;
/** end of paragraph. This method is to be called when all the
diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx b/sw/source/core/inc/SwXMLTextBlocks.hxx
index bf88111742b3..8e487a21fc85 100644
--- a/sw/source/core/inc/SwXMLTextBlocks.hxx
+++ b/sw/source/core/inc/SwXMLTextBlocks.hxx
@@ -42,10 +42,10 @@ class SwImpBlocks;
class SwXMLTextBlocks : public SwImpBlocks
{
protected:
- BOOL bAutocorrBlock;
- BOOL bBlock;
+ sal_Bool bAutocorrBlock;
+ sal_Bool bBlock;
SfxObjectShellRef xDocShellRef;
- USHORT nFlags;
+ sal_uInt16 nFlags;
String aPackageName;
SfxMediumRef xMedium;
@@ -60,50 +60,50 @@ public:
short nCurBlk;
SwXMLTextBlocks( const String& rFile );
SwXMLTextBlocks( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFile );
- void AddName( const String&, const String&, const String&, BOOL bOnlyTxt = FALSE );
- virtual void AddName( const String&, const String&, BOOL bOnlyTxt = FALSE );
+ void AddName( const String&, const String&, const String&, sal_Bool bOnlyTxt = sal_False );
+ virtual void AddName( const String&, const String&, sal_Bool bOnlyTxt = sal_False );
void GeneratePackageName ( const String& rShort, String& rPackageName );
virtual ~SwXMLTextBlocks();
- //virtual BOOL IsOld() const;
- virtual ULONG Delete( USHORT );
- virtual ULONG Rename( USHORT, const String&, const String& );
- virtual ULONG CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong);
+ //virtual sal_Bool IsOld() const;
+ virtual sal_uLong Delete( sal_uInt16 );
+ virtual sal_uLong Rename( sal_uInt16, const String&, const String& );
+ virtual sal_uLong CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong);
virtual void ClearDoc();
- virtual ULONG GetDoc( USHORT );
- virtual ULONG BeginPutDoc( const String&, const String& );
- virtual ULONG PutDoc();
- virtual ULONG GetText( USHORT, String& );
- virtual ULONG PutText( const String&, const String&, const String& );
- virtual ULONG MakeBlockList();
+ virtual sal_uLong GetDoc( sal_uInt16 );
+ virtual sal_uLong BeginPutDoc( const String&, const String& );
+ virtual sal_uLong PutDoc();
+ virtual sal_uLong GetText( sal_uInt16, String& );
+ virtual sal_uLong PutText( const String&, const String&, const String& );
+ virtual sal_uLong MakeBlockList();
virtual short GetFileType ( void ) const;
- virtual ULONG OpenFile( BOOL bReadOnly = TRUE );
+ virtual sal_uLong OpenFile( sal_Bool bReadOnly = sal_True );
virtual void CloseFile();
- static BOOL IsFileUCBStorage( const String & rFileName);
+ static sal_Bool IsFileUCBStorage( const String & rFileName);
// Methods for the new Autocorrecter
- ULONG GetText( const String& rShort, String& );
+ sal_uLong GetText( const String& rShort, String& );
- virtual BOOL IsOnlyTextBlock( const String& rShort ) const;
- virtual BOOL IsOnlyTextBlock( USHORT nIdx ) const;
- virtual void SetIsTextOnly( const String& rShort, BOOL bNewValue );
- virtual void SetIsTextOnly( USHORT nIdx, BOOL bNewValue );
+ virtual sal_Bool IsOnlyTextBlock( const String& rShort ) const;
+ virtual sal_Bool IsOnlyTextBlock( sal_uInt16 nIdx ) const;
+ virtual void SetIsTextOnly( const String& rShort, sal_Bool bNewValue );
+ virtual void SetIsTextOnly( sal_uInt16 nIdx, sal_Bool bNewValue );
- virtual ULONG GetMacroTable( USHORT, SvxMacroTableDtor& rMacroTbl,
+ virtual sal_uLong GetMacroTable( sal_uInt16, SvxMacroTableDtor& rMacroTbl,
sal_Bool bFileAlreadyOpen = sal_False );
- virtual ULONG SetMacroTable( USHORT nIdx,
+ virtual sal_uLong SetMacroTable( sal_uInt16 nIdx,
const SvxMacroTableDtor& rMacroTable,
sal_Bool bFileAlreadyOpen = sal_False );
- virtual BOOL PutMuchEntries( BOOL bOn );
+ virtual sal_Bool PutMuchEntries( sal_Bool bOn );
public:
SwDoc* GetDoc() const { return pDoc; }
//void SetDoc( SwDoc * pNewDoc);
- ULONG StartPutBlock( const String& rShort, const String& rPackageName );
- ULONG PutBlock( SwPaM& rPaM, const String& rLong );
- ULONG GetBlockText( const String& rShort, String& rText );
- ULONG PutBlockText( const String& rShort, const String& rName, const String& rText, const String& rPackageName );
+ sal_uLong StartPutBlock( const String& rShort, const String& rPackageName );
+ sal_uLong PutBlock( SwPaM& rPaM, const String& rLong );
+ sal_uLong GetBlockText( const String& rShort, String& rText );
+ sal_uLong PutBlockText( const String& rShort, const String& rName, const String& rText, const String& rPackageName );
void MakeBlockText( const String& rText );
};
diff --git a/sw/source/core/inc/acorrect.hxx b/sw/source/core/inc/acorrect.hxx
index bc2d2d4cb1f3..dcfaa441351b 100644
--- a/sw/source/core/inc/acorrect.hxx
+++ b/sw/source/core/inc/acorrect.hxx
@@ -65,25 +65,25 @@ public:
SwAutoCorrDoc( SwEditShell& rEditShell, SwPaM& rPam, sal_Unicode cIns = 0 );
~SwAutoCorrDoc();
- virtual BOOL Delete( xub_StrLen nStt, xub_StrLen nEnd );
- virtual BOOL Insert( xub_StrLen nPos, const String& rTxt );
- virtual BOOL Replace( xub_StrLen nPos, const String& rTxt );
+ virtual sal_Bool Delete( xub_StrLen nStt, xub_StrLen nEnd );
+ virtual sal_Bool Insert( xub_StrLen nPos, const String& rTxt );
+ virtual sal_Bool Replace( xub_StrLen nPos, const String& rTxt );
- virtual BOOL SetAttr( xub_StrLen nStt, xub_StrLen nEnd, USHORT nSlotId,
+ virtual sal_Bool SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nSlotId,
SfxPoolItem& );
- virtual BOOL SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL );
+ virtual sal_Bool SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL );
// returne den Text eines vorherigen Absatzes.
// Dieser darf nicht leer sein!
// Gibt es diesen nicht oder gibt es davor nur Leere, dann returne 0
// Das Flag gibt an:
- // TRUE: den, vor der normalen Einfuegeposition (TRUE)
- // FALSE: den, in den das korrigierte Wort eingfuegt wurde.
+ // sal_True: den, vor der normalen Einfuegeposition (sal_True)
+ // sal_False: den, in den das korrigierte Wort eingfuegt wurde.
// (Muss nicht der gleiche Absatz sein!!!!)
- virtual const String* GetPrevPara( BOOL bAtNormalPos );
+ virtual const String* GetPrevPara( sal_Bool bAtNormalPos );
- virtual BOOL ChgAutoCorrWord( xub_StrLen& rSttPos, xub_StrLen nEndPos,
+ virtual sal_Bool ChgAutoCorrWord( xub_StrLen& rSttPos, xub_StrLen nEndPos,
SvxAutoCorrect& rACorrect,
const String** ppPara );
@@ -92,30 +92,30 @@ public:
// - FnCptlSttSntnc
// gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten
// aufgenommen werden.
- virtual void SaveCpltSttWord( ULONG nFlag, xub_StrLen nPos,
+ virtual void SaveCpltSttWord( sal_uLong nFlag, xub_StrLen nPos,
const String& rExceptWord, sal_Unicode cChar );
- virtual LanguageType GetLanguage( xub_StrLen nPos, BOOL bPrevPara ) const;
+ virtual LanguageType GetLanguage( xub_StrLen nPos, sal_Bool bPrevPara ) const;
};
class SwAutoCorrExceptWord
{
String sWord;
- ULONG nFlags, nNode;
+ sal_uLong nFlags, nNode;
xub_StrLen nCntnt;
sal_Unicode cChar;
LanguageType eLanguage;
- BOOL bDeleted;
+ sal_Bool bDeleted;
public:
- SwAutoCorrExceptWord( ULONG nAFlags, ULONG nNd, xub_StrLen nContent,
+ SwAutoCorrExceptWord( sal_uLong nAFlags, sal_uLong nNd, xub_StrLen nContent,
const String& rWord, sal_Unicode cChr,
LanguageType eLang )
: sWord(rWord), nFlags(nAFlags), nNode(nNd), nCntnt(nContent),
- cChar(cChr), eLanguage(eLang), bDeleted(FALSE)
+ cChar(cChr), eLanguage(eLang), bDeleted(sal_False)
{}
- BOOL IsDeleted() const { return bDeleted; }
+ sal_Bool IsDeleted() const { return bDeleted; }
void CheckChar( const SwPosition& rPos, sal_Unicode cChar );
- BOOL CheckDelChar( const SwPosition& rPos );
+ sal_Bool CheckDelChar( const SwPosition& rPos );
};
diff --git a/sw/source/core/inc/anchoredobjectposition.hxx b/sw/source/core/inc/anchoredobjectposition.hxx
index 581225061553..966b1a43f428 100644
--- a/sw/source/core/inc/anchoredobjectposition.hxx
+++ b/sw/source/core/inc/anchoredobjectposition.hxx
@@ -444,7 +444,7 @@ namespace objectpositioning
bool _DrawAsideFly( const SwFlyFrm* _pFly,
const SwRect& _rObjRect,
const SwFrm* _pObjContext,
- const ULONG _nObjIndex,
+ const sal_uLong _nObjIndex,
const bool _bEvenPage,
const sal_Int16 _eHoriOrient,
const sal_Int16 _eRelOrient
diff --git a/sw/source/core/inc/blink.hxx b/sw/source/core/inc/blink.hxx
index 8f8b086fef3b..11f11d6d188a 100644
--- a/sw/source/core/inc/blink.hxx
+++ b/sw/source/core/inc/blink.hxx
@@ -41,9 +41,9 @@ class SwBlinkPortion
Point aPos;
const SwLinePortion *pPor;
const SwRootFrm *pFrm;
- USHORT nDir;
+ sal_uInt16 nDir;
public:
- SwBlinkPortion( const SwLinePortion* pPortion, USHORT nDirection )
+ SwBlinkPortion( const SwLinePortion* pPortion, sal_uInt16 nDirection )
{ pPor = pPortion; nDir = nDirection; }
SwBlinkPortion( const SwBlinkPortion* pBlink, const SwLinePortion* pPort )
{ pPor = pPort; pFrm = pBlink->pFrm; aPos = pBlink->aPos; nDir = pBlink->nDir; }
@@ -52,10 +52,10 @@ public:
void SetRootFrm( const SwRootFrm* pNew ){ pFrm = pNew; }
const SwRootFrm* GetRootFrm() const{ return pFrm; }
const SwLinePortion *GetPortion() const{ return pPor; }
- USHORT GetDirection() const { return nDir; }
- BOOL operator<( const SwBlinkPortion& rBlinkPortion ) const
+ sal_uInt16 GetDirection() const { return nDir; }
+ sal_Bool operator<( const SwBlinkPortion& rBlinkPortion ) const
{ return (long)pPor < (long)rBlinkPortion.pPor; }
- BOOL operator==( const SwBlinkPortion& rBlinkPortion ) const
+ sal_Bool operator==( const SwBlinkPortion& rBlinkPortion ) const
{ return (long)pPor == (long)rBlinkPortion.pPor; }
};
@@ -66,7 +66,7 @@ class SwBlink
{
SwBlinkList aList;
AutoTimer aTimer;
- BOOL bVisible;
+ sal_Bool bVisible;
public:
SwBlink();
~SwBlink();
@@ -74,11 +74,11 @@ public:
DECL_LINK( Blinker, Timer * );
void Insert( const Point& rPoint, const SwLinePortion* pPor,
- const SwTxtFrm *pTxtFrm, USHORT nDir );
+ const SwTxtFrm *pTxtFrm, sal_uInt16 nDir );
void Replace( const SwLinePortion* pOld, const SwLinePortion* pNew );
void Delete( const SwLinePortion* pPor );
void FrmDelete( const SwRootFrm* pRoot );
- inline BOOL IsVisible() const { return bVisible ; }
+ inline sal_Bool IsVisible() const { return bVisible ; }
};
// Blink-Manager, globale Variable, in Blink.Cxx angelegt
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index 8b45aa5e2d8d..1a5b24b58fa1 100644
--- a/sw/source/core/inc/cellfrm.hxx
+++ b/sw/source/core/inc/cellfrm.hxx
@@ -46,11 +46,11 @@ public:
SwCellFrm( const SwTableBox &, bool bInsertContent = true );
~SwCellFrm();
- virtual BOOL GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const;
+ virtual sal_Bool GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual void Paint( SwRect const&,
SwPrintData const*const pPrintData = NULL ) const;
- virtual void CheckDirection( BOOL bVert );
+ virtual void CheckDirection( sal_Bool bVert );
// --> OD 2010-02-17 #i103961#
virtual void Cut();
diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx
index 6d915bc72a8b..431f93912140 100644
--- a/sw/source/core/inc/cntfrm.hxx
+++ b/sw/source/core/inc/cntfrm.hxx
@@ -37,7 +37,7 @@ class SwAttrSetChg;
class SwTxtFrm;
//Implementiert in cntfrm.cxx, wird von cntfrm.cxx und crsrsh.cxx angezogen
-extern BOOL GetFrmInPage( const SwCntntFrm*, SwWhichPage, SwPosPage, SwPaM* );
+extern sal_Bool GetFrmInPage( const SwCntntFrm*, SwWhichPage, SwPosPage, SwPaM* );
class SwCntntFrm: public SwFrm, public SwFlowFrm
{
@@ -46,27 +46,27 @@ class SwCntntFrm: public SwFrm, public SwFlowFrm
// --> OD 2007-11-26 #b6614158#
// parameter <bObjsInNewUpper>, indicating that objects are existing in
// remaining area of new upper
- BOOL _WouldFit( SwTwips nSpace,
+ sal_Bool _WouldFit( SwTwips nSpace,
SwLayoutFrm *pNewUpper,
- BOOL bTstMove,
+ sal_Bool bTstMove,
const bool bObjsInNewUpper );
// <--
virtual void MakeAll();
- void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, BYTE &,
+ void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, sal_uInt8 &,
SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
- virtual BOOL ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL& );
+ virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool& );
const SwCntntFrm* ImplGetNextCntntFrm( bool bFwd ) const;
protected:
- BOOL MakePrtArea( const SwBorderAttrs & );
+ sal_Bool MakePrtArea( const SwBorderAttrs & );
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
SwCntntFrm( SwCntntNode * const );
@@ -79,32 +79,32 @@ public:
inline SwCntntNode *GetNode();
inline const SwCntntNode *GetNode() const;
- USHORT GetSectionLevel();
+ sal_uInt16 GetSectionLevel();
inline const SwCntntFrm *GetFollow() const;
inline SwCntntFrm *GetFollow();
SwTxtFrm* FindMaster() const;
//Layoutabhaengiges Cursortravelling
- virtual BOOL LeftMargin( SwPaM * ) const;
- virtual BOOL RightMargin( SwPaM *, BOOL bAPI = FALSE ) const;
- virtual BOOL UnitUp( SwPaM *, const SwTwips nOffset = 0,
- BOOL bSetInReadOnly = FALSE ) const;
- virtual BOOL UnitDown( SwPaM *, const SwTwips nOffset = 0,
- BOOL bSetInReadOnly = FALSE ) const;
- inline BOOL StartNextPage( SwPaM * ) const;
- inline BOOL StartPrevPage( SwPaM * ) const;
- inline BOOL StartCurrPage( SwPaM * ) const;
- inline BOOL EndCurrPage( SwPaM * ) const;
- inline BOOL EndNextPage( SwPaM * ) const;
- inline BOOL EndPrevPage( SwPaM * ) const;
+ virtual sal_Bool LeftMargin( SwPaM * ) const;
+ virtual sal_Bool RightMargin( SwPaM *, sal_Bool bAPI = sal_False ) const;
+ virtual sal_Bool UnitUp( SwPaM *, const SwTwips nOffset = 0,
+ sal_Bool bSetInReadOnly = sal_False ) const;
+ virtual sal_Bool UnitDown( SwPaM *, const SwTwips nOffset = 0,
+ sal_Bool bSetInReadOnly = sal_False ) const;
+ inline sal_Bool StartNextPage( SwPaM * ) const;
+ inline sal_Bool StartPrevPage( SwPaM * ) const;
+ inline sal_Bool StartCurrPage( SwPaM * ) const;
+ inline sal_Bool EndCurrPage( SwPaM * ) const;
+ inline sal_Bool EndNextPage( SwPaM * ) const;
+ inline sal_Bool EndPrevPage( SwPaM * ) const;
// nMaxHeight is the required height
// bSplit indicates, that the paragraph has to be split
// bTst indicates, that we are currently doing a test formatting
virtual sal_Bool WouldFit( SwTwips &nMaxHeight, sal_Bool &bSplit, sal_Bool bTst );
- BOOL MoveFtnCntFwd( BOOL, SwFtnBossFrm* );//von MoveFwd gerufen bei Ftn-Inhalt
+ sal_Bool MoveFtnCntFwd( sal_Bool, SwFtnBossFrm* );//von MoveFwd gerufen bei Ftn-Inhalt
inline SwCntntFrm* GetNextCntntFrm() const;
inline SwCntntFrm* GetPrevCntntFrm() const;
diff --git a/sw/source/core/inc/dbg_lay.hxx b/sw/source/core/inc/dbg_lay.hxx
index 1edb60f2cba9..3885d9d7dda5 100644
--- a/sw/source/core/inc/dbg_lay.hxx
+++ b/sw/source/core/inc/dbg_lay.hxx
@@ -73,27 +73,27 @@ class SwImplEnterLeave;
class SwProtocol
{
- static ULONG nRecord;
+ static sal_uLong nRecord;
static SwImplProtocol* pImpl;
- static BOOL Start() { return 0 != ( PROT_INIT & nRecord ); }
+ static sal_Bool Start() { return 0 != ( PROT_INIT & nRecord ); }
public:
- static ULONG Record() { return nRecord; }
- static void SetRecord( ULONG nNew ) { nRecord = nNew; }
- static BOOL Record( ULONG nFunc ) { return 0 != (( nFunc | PROT_INIT ) & nRecord); }
- static void Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAction, void* pParam );
+ static sal_uLong Record() { return nRecord; }
+ static void SetRecord( sal_uLong nNew ) { nRecord = nNew; }
+ static sal_Bool Record( sal_uLong nFunc ) { return 0 != (( nFunc | PROT_INIT ) & nRecord); }
+ static void Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAction, void* pParam );
static void Init();
static void Stop();
- static void SnapShot( const SwFrm* pFrm, ULONG nFlags );
- static void GetVar( const USHORT nNo, long& rVar );
+ static void SnapShot( const SwFrm* pFrm, sal_uLong nFlags );
+ static void GetVar( const sal_uInt16 nNo, long& rVar );
};
class SwEnterLeave
{
SwImplEnterLeave* pImpl;
- void Ctor( const SwFrm* pFrm, ULONG nFunc, ULONG nAct, void* pPar );
+ void Ctor( const SwFrm* pFrm, sal_uLong nFunc, sal_uLong nAct, void* pPar );
void Dtor();
public:
- SwEnterLeave( const SwFrm* pFrm, ULONG nFunc, ULONG nAct, void* pPar )
+ SwEnterLeave( const SwFrm* pFrm, sal_uLong nFunc, sal_uLong nAct, void* pPar )
{ if( SwProtocol::Record( nFunc ) ) Ctor( pFrm, nFunc, nAct, pPar ); else pImpl = NULL; }
~SwEnterLeave() { if( pImpl ) Dtor(); }
};
diff --git a/sw/source/core/inc/dbgloop.hxx b/sw/source/core/inc/dbgloop.hxx
index a89761a57c46..bfa17b466828 100644
--- a/sw/source/core/inc/dbgloop.hxx
+++ b/sw/source/core/inc/dbgloop.hxx
@@ -39,8 +39,8 @@ class SvStream;
class DbgLoopStack
{
- USHORT aCount[DBG_MAX_STACK];
- USHORT nPtr;
+ sal_uInt16 aCount[DBG_MAX_STACK];
+ sal_uInt16 nPtr;
const void *pDbg;
void Reset();
public:
diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx
index 47e8fb700809..23216709a50a 100644
--- a/sw/source/core/inc/dflyobj.hxx
+++ b/sw/source/core/inc/dflyobj.hxx
@@ -32,12 +32,12 @@ class SwFlyFrm;
class SwFrmFmt;
class SdrObjMacroHitRec;
-const UINT32 SWGInventor = UINT32('S')*0x00000001+
- UINT32('W')*0x00000100+
- UINT32('G')*0x00010000;
+const sal_uInt32 SWGInventor = sal_uInt32('S')*0x00000001+
+ sal_uInt32('W')*0x00000100+
+ sal_uInt32('G')*0x00010000;
-const UINT16 SwFlyDrawObjIdentifier = 0x0001;
-const UINT16 SwDrawFirst = 0x0001;
+const sal_uInt16 SwFlyDrawObjIdentifier = 0x0001;
+const sal_uInt16 SwDrawFirst = 0x0001;
//---------------------------------------
//SwFlyDrawObj, Die DrawObjekte fuer Flys.
@@ -60,9 +60,9 @@ public:
//Damit eine Instanz dieser Klasse beim laden erzeugt werden kann
//(per Factory).
- virtual UINT32 GetObjInventor() const;
- virtual UINT16 GetObjIdentifier() const;
- virtual UINT16 GetObjVersion() const;
+ virtual sal_uInt32 GetObjInventor() const;
+ virtual sal_uInt16 GetObjIdentifier() const;
+ virtual sal_uInt16 GetObjVersion() const;
};
//---------------------------------------
diff --git a/sw/source/core/inc/docfld.hxx b/sw/source/core/inc/docfld.hxx
index a8740639f603..dbce10e51db0 100644
--- a/sw/source/core/inc/docfld.hxx
+++ b/sw/source/core/inc/docfld.hxx
@@ -47,7 +47,7 @@ struct SwPosition;
// Update an den Expression Feldern
class _SetGetExpFld
{
- ULONG nNode;
+ sal_uLong nNode;
xub_StrLen nCntnt;
union {
const SwTxtFld* pTxtFld;
@@ -84,11 +84,11 @@ public:
_SetGetExpFld( const SwFlyFrmFmt& rFlyFmt, const SwPosition* pPos = 0 );
- BOOL operator==( const _SetGetExpFld& rFld ) const
+ sal_Bool operator==( const _SetGetExpFld& rFld ) const
{ return nNode == rFld.nNode && nCntnt == rFld.nCntnt &&
( !CNTNT.pTxtFld || !rFld.CNTNT.pTxtFld ||
CNTNT.pTxtFld == rFld.CNTNT.pTxtFld ); }
- BOOL operator<( const _SetGetExpFld& rFld ) const;
+ sal_Bool operator<( const _SetGetExpFld& rFld ) const;
const SwTxtFld* GetFld() const
{ return TEXTFIELD == eSetGetExpFldType ? CNTNT.pTxtFld : 0; }
@@ -103,7 +103,7 @@ public:
const SwFlyFrmFmt* GetFlyFmt() const
{ return FLYFRAME == eSetGetExpFldType ? CNTNT.pFlyFmt : 0; }
- ULONG GetNode() const { return nNode; }
+ sal_uLong GetNode() const { return nNode; }
xub_StrLen GetCntnt() const { return nCntnt; }
const void* GetPointer() const { return CNTNT.pTxtFld; }
@@ -138,8 +138,8 @@ struct SwCalcFldType : public SwHash
// Suche nach dem String, der unter dem Namen in der HashTabelle abgelegt
// wurde
-void LookString( SwHash** ppTbl, USHORT nSize, const String& rName,
- String& rRet, USHORT* pPos = 0 );
+void LookString( SwHash** ppTbl, sal_uInt16 nSize, const String& rName,
+ String& rRet, sal_uInt16* pPos = 0 );
// --------
@@ -157,14 +157,14 @@ class SwDocUpdtFld
long nFldUpdtPos; // ab dieser Position mit Update starten
SwCntntNode* pCNode; // der TxtNode zur UpdatePos.
- ULONG nNodes; // sollte die NodesAnzahl unterschiedlich sein
- BYTE nFldLstGetMode;
+ sal_uLong nNodes; // sollte die NodesAnzahl unterschiedlich sein
+ sal_uInt8 nFldLstGetMode;
- BOOL bInUpdateFlds : 1; // zur Zeit laeuft ein UpdateFlds,
- BOOL bFldsDirty : 1; // irgendwelche Felder sind ungueltig
+ sal_Bool bInUpdateFlds : 1; // zur Zeit laeuft ein UpdateFlds,
+ sal_Bool bFldsDirty : 1; // irgendwelche Felder sind ungueltig
void _MakeFldList( SwDoc& pDoc, int eGetMode );
- void GetBodyNode( const SwTxtFld& , USHORT nFldWhich );
+ void GetBodyNode( const SwTxtFld& , sal_uInt16 nFldWhich );
void GetBodyNode( const SwSectionNode&);
public:
SwDocUpdtFld();
@@ -174,16 +174,16 @@ public:
void MakeFldList( SwDoc& rDoc, int bAll, int eGetMode );
- void InsDelFldInFldLst( BOOL bIns, const SwTxtFld& rFld );
+ void InsDelFldInFldLst( sal_Bool bIns, const SwTxtFld& rFld );
void InsertFldType( const SwFieldType& rType );
void RemoveFldType( const SwFieldType& rType );
- BOOL IsInUpdateFlds() const { return bInUpdateFlds; }
- void SetInUpdateFlds( BOOL b ) { bInUpdateFlds = b; }
+ sal_Bool IsInUpdateFlds() const { return bInUpdateFlds; }
+ void SetInUpdateFlds( sal_Bool b ) { bInUpdateFlds = b; }
- BOOL IsFieldsDirty() const { return bFldsDirty; }
- void SetFieldsDirty( BOOL b ) { bFldsDirty = b; }
+ sal_Bool IsFieldsDirty() const { return bFldsDirty; }
+ void SetFieldsDirty( sal_Bool b ) { bFldsDirty = b; }
SwHash** GetFldTypeTable() const { return (SwHash**)aFldTypeTable; }
};
diff --git a/sw/source/core/inc/docsort.hxx b/sw/source/core/inc/docsort.hxx
index 984166322b71..5d87e37e9219 100644
--- a/sw/source/core/inc/docsort.hxx
+++ b/sw/source/core/inc/docsort.hxx
@@ -62,11 +62,11 @@ SV_DECL_PTRARR(SwMovedBoxes, SwMovedBoxPtr, 10, 10 )
--------------------------------------------------------------------*/
void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox,
- USHORT nS, USHORT nT, SwMovedBoxes& rMovedList, SwUndoSort* pUD=0);
+ sal_uInt16 nS, sal_uInt16 nT, SwMovedBoxes& rMovedList, SwUndoSort* pUD=0);
void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox,
- USHORT nS, USHORT nT, SwMovedBoxes& rMovedList, SwUndoSort* pUD=0);
+ sal_uInt16 nS, sal_uInt16 nT, SwMovedBoxes& rMovedList, SwUndoSort* pUD=0);
void MoveCell(SwDoc* pDoc, const SwTableBox* pSource,
- const SwTableBox* pTar, BOOL bMovedBefore, SwUndoSort* pUD=0);
+ const SwTableBox* pTar, sal_Bool bMovedBefore, SwUndoSort* pUD=0);
/*-------------------------------------------------------------------
Beschreibung: Elemente zum Sortieren von Text und Tabellen-Inhalt
@@ -87,11 +87,11 @@ struct SwSortElement
virtual ~SwSortElement();
- virtual String GetKey(USHORT nKey ) const = 0;
- virtual double GetValue(USHORT nKey ) const;
+ virtual String GetKey(sal_uInt16 nKey ) const = 0;
+ virtual double GetValue(sal_uInt16 nKey ) const;
- BOOL operator==(const SwSortElement& );
- BOOL operator<(const SwSortElement& );
+ sal_Bool operator==(const SwSortElement& );
+ sal_Bool operator<(const SwSortElement& );
double StrToDouble(const String& rStr) const;
};
@@ -103,13 +103,13 @@ struct SwSortElement
struct SwSortTxtElement : public SwSortElement
{
// fuer Text
- ULONG nOrg;
+ sal_uLong nOrg;
SwNodeIndex aPos;
SwSortTxtElement( const SwNodeIndex& rPos );
virtual ~SwSortTxtElement();
- virtual String GetKey( USHORT nKey ) const;
+ virtual String GetKey( sal_uInt16 nKey ) const;
};
/*--------------------------------------------------------------------
@@ -118,13 +118,13 @@ struct SwSortTxtElement : public SwSortElement
struct SwSortBoxElement : public SwSortElement
{
- USHORT nRow;
+ sal_uInt16 nRow;
- SwSortBoxElement( USHORT nRC );
+ SwSortBoxElement( sal_uInt16 nRC );
virtual ~SwSortBoxElement();
- virtual String GetKey( USHORT nKey ) const;
- virtual double GetValue( USHORT nKey ) const;
+ virtual String GetKey( sal_uInt16 nKey ) const;
+ virtual double GetValue( sal_uInt16 nKey ) const;
};
@@ -139,38 +139,38 @@ public:
FlatFndBox(SwDoc* pDocPtr, const _FndBox& rBox);
~FlatFndBox();
- BOOL IsSymmetric() const { return bSym; }
- USHORT GetRows() const { return nRows; }
- USHORT GetCols() const { return nCols; }
+ sal_Bool IsSymmetric() const { return bSym; }
+ sal_uInt16 GetRows() const { return nRows; }
+ sal_uInt16 GetCols() const { return nCols; }
- const _FndBox* GetBox(USHORT nCol, USHORT nRow) const;
+ const _FndBox* GetBox(sal_uInt16 nCol, sal_uInt16 nRow) const;
- inline BOOL HasItemSets() const;
- const SfxItemSet* GetItemSet(USHORT nCol, USHORT nRow) const;
+ inline sal_Bool HasItemSets() const;
+ const SfxItemSet* GetItemSet(sal_uInt16 nCol, sal_uInt16 nRow) const;
private:
- BOOL CheckLineSymmetry(const _FndBox& rBox);
- BOOL CheckBoxSymmetry(const _FndLine& rLn);
- USHORT GetColCount(const _FndBox& rBox);
- USHORT GetRowCount(const _FndBox& rBox);
- void FillFlat(const _FndBox&, BOOL bLastBox=FALSE);
+ sal_Bool CheckLineSymmetry(const _FndBox& rBox);
+ sal_Bool CheckBoxSymmetry(const _FndLine& rLn);
+ sal_uInt16 GetColCount(const _FndBox& rBox);
+ sal_uInt16 GetRowCount(const _FndBox& rBox);
+ void FillFlat(const _FndBox&, sal_Bool bLastBox=sal_False);
SwDoc* pDoc;
const _FndBox& rBoxRef;
_FndBoxPtr* pArr;
SfxItemSet** ppItemSets;
- USHORT nRows;
- USHORT nCols;
+ sal_uInt16 nRows;
+ sal_uInt16 nCols;
- USHORT nRow;
- USHORT nCol;
+ sal_uInt16 nRow;
+ sal_uInt16 nCol;
- BOOL bSym;
+ sal_Bool bSym;
};
-inline BOOL FlatFndBox::HasItemSets() const { return 0 != ppItemSets; }
+inline sal_Bool FlatFndBox::HasItemSets() const { return 0 != ppItemSets; }
#endif // _NDSORT_HXX
diff --git a/sw/source/core/inc/doctxm.hxx b/sw/source/core/inc/doctxm.hxx
index cb03e0531000..5e3adfb1fd3d 100644
--- a/sw/source/core/inc/doctxm.hxx
+++ b/sw/source/core/inc/doctxm.hxx
@@ -74,8 +74,8 @@ class SwTOXBaseSection : public SwTOXBase, public SwSection
// Textrumpf generieren
// OD 18.03.2003 #106329# - add parameter <_TOXSectNdIdx> and <_pDefaultPageDesc>
- void GenerateText( USHORT nArrayIdx,
- USHORT nCount,
+ void GenerateText( sal_uInt16 nArrayIdx,
+ sal_uInt16 nCount,
SvStringsDtor&,
const sal_uInt32 _nTOXSectNdIdx,
const SwPageDesc* _pDefaultPageDesc );
@@ -89,11 +89,11 @@ class SwTOXBaseSection : public SwTOXBase, public SwSection
// Bereich fuer Stichwort einfuegen suchen
Range GetKeyRange( const String& rStr, const String& rStrReading,
- const SwTOXSortTabBase& rNew, USHORT nLevel,
+ const SwTOXSortTabBase& rNew, sal_uInt16 nLevel,
const Range& rRange );
// returne die TextCollection ueber den Namen / aus Format-Pool
- SwTxtFmtColl* GetTxtFmtColl( USHORT nLevel );
+ SwTxtFmtColl* GetTxtFmtColl( sal_uInt16 nLevel );
public:
SwTOXBaseSection(SwTOXBase const& rBase, SwSectionFmt & rFmt);
@@ -107,7 +107,7 @@ public:
void UpdatePageNum(); // Seitennummern einfuegen
TYPEINFO(); // fuers rtti
- BOOL SetPosAtStartEnd( SwPosition& rPos, BOOL bAtStart = TRUE ) const;
+ sal_Bool SetPosAtStartEnd( SwPosition& rPos, sal_Bool bAtStart = sal_True ) const;
};
/* -----------------02.09.99 07:52-------------------
diff --git a/sw/source/core/inc/drawdev.hxx b/sw/source/core/inc/drawdev.hxx
index 714208a4b6c9..7b851403355b 100644
--- a/sw/source/core/inc/drawdev.hxx
+++ b/sw/source/core/inc/drawdev.hxx
@@ -53,21 +53,21 @@ public:
// Ausgabemethoden
inline void DrawText( const Point& rStart, const String& rTxt,
- const USHORT nIdx = 0,
- const USHORT nLen = STRING_LEN );
- inline void DrawStretchText( const Point& rStart, USHORT nWidth,
+ const sal_uInt16 nIdx = 0,
+ const sal_uInt16 nLen = STRING_LEN );
+ inline void DrawStretchText( const Point& rStart, sal_uInt16 nWidth,
const String& rTxt,
- const USHORT nIdx = 0,
- const USHORT nLen = STRING_LEN );
+ const sal_uInt16 nIdx = 0,
+ const sal_uInt16 nLen = STRING_LEN );
inline void DrawTextArray( const Point& rStart,
const String& rTxt,
long *pKernArray = 0,
- const USHORT nIdx = 0,
- const USHORT nLen = STRING_LEN);
+ const sal_uInt16 nIdx = 0,
+ const sal_uInt16 nLen = STRING_LEN);
inline void DrawLine( const Point& rStart, const Point& rEnd );
inline void DrawRect( const SwRect& rRect,
- const USHORT nHorzRount = 0,
- const USHORT nVertRound = 0 );
+ const sal_uInt16 nHorzRount = 0,
+ const sal_uInt16 nVertRound = 0 );
inline const Point *GetOrigin() const {return pPos; }
};
@@ -77,7 +77,7 @@ public:
*************************************************************************/
inline void SwDrawDev::DrawText( const Point& rStart, const String& rTxt,
- const USHORT nIdx, const USHORT nLen )
+ const sal_uInt16 nIdx, const sal_uInt16 nLen )
{
if( !pPos )
pOut->DrawText( rStart, rTxt, nIdx, nLen );
@@ -89,8 +89,8 @@ inline void SwDrawDev::DrawText( const Point& rStart, const String& rTxt,
* SwDrawDev::DrawStretchText
*************************************************************************/
-inline void SwDrawDev::DrawStretchText( const Point& rStart, USHORT nWidth,
- const String& rTxt, const USHORT nIdx, const USHORT nLen )
+inline void SwDrawDev::DrawStretchText( const Point& rStart, sal_uInt16 nWidth,
+ const String& rTxt, const sal_uInt16 nIdx, const sal_uInt16 nLen )
{
if( !pPos )
pOut->DrawStretchText( rStart, nWidth, rTxt, nIdx, nLen );
@@ -103,7 +103,7 @@ inline void SwDrawDev::DrawStretchText( const Point& rStart, USHORT nWidth,
*************************************************************************/
inline void SwDrawDev::DrawTextArray( const Point& rStart, const String& rTxt,
- long *pKernArray, const USHORT nIdx, const USHORT nLen )
+ long *pKernArray, const sal_uInt16 nIdx, const sal_uInt16 nLen )
{
if( !pPos )
pOut->DrawTextArray( rStart, rTxt, pKernArray, nIdx, nLen );
@@ -128,7 +128,7 @@ inline void SwDrawDev::DrawLine( const Point& rStart, const Point& rEnd )
*************************************************************************/
inline void SwDrawDev::DrawRect( const SwRect& rRect,
- const USHORT nHorzRound, const USHORT nVertRound )
+ const sal_uInt16 nHorzRound, const sal_uInt16 nVertRound )
{
SwRect aRect( rRect );
if( pPos )
diff --git a/sw/source/core/inc/drawfont.hxx b/sw/source/core/inc/drawfont.hxx
index ab25e5435aa7..ba16257d3189 100644
--- a/sw/source/core/inc/drawfont.hxx
+++ b/sw/source/core/inc/drawfont.hxx
@@ -69,25 +69,25 @@ class SwDrawTextInfo
xub_StrLen nIdx;
xub_StrLen nLen;
xub_StrLen nOfst;
- USHORT nWidth;
- USHORT nAscent;
- USHORT nCompress;
+ sal_uInt16 nWidth;
+ sal_uInt16 nAscent;
+ sal_uInt16 nCompress;
long nSperren;
long nSpace;
long nKern;
xub_StrLen nNumberOfBlanks;
- BYTE nCursorBidiLevel;
- BOOL bBullet : 1;
- BOOL bUpper : 1; // Fuer Kapitaelchen: Grossbuchstaben-Flag
- BOOL bDrawSpace : 1; // Fuer Kapitaelchen: Unter/Durchstreichung
- BOOL bGreyWave : 1; // Graue Wellenlinie beim extended TextInput
- BOOL bSpaceStop : 1; // For underlining we need to know, if a portion
+ sal_uInt8 nCursorBidiLevel;
+ sal_Bool bBullet : 1;
+ sal_Bool bUpper : 1; // Fuer Kapitaelchen: Grossbuchstaben-Flag
+ sal_Bool bDrawSpace : 1; // Fuer Kapitaelchen: Unter/Durchstreichung
+ sal_Bool bGreyWave : 1; // Graue Wellenlinie beim extended TextInput
+ sal_Bool bSpaceStop : 1; // For underlining we need to know, if a portion
// is right in front of a hole portion or a
// fix margin portion.
- BOOL bSnapToGrid : 1; // Does paragraph snap to grid?
- BOOL bIgnoreFrmRTL : 1; // Paint text as if text has LTR direction, used for
+ sal_Bool bSnapToGrid : 1; // Does paragraph snap to grid?
+ sal_Bool bIgnoreFrmRTL : 1; // Paint text as if text has LTR direction, used for
// line numbering
- BOOL bPosMatchesBounds :1; // GetCrsrOfst should not return the next
+ sal_Bool bPosMatchesBounds :1; // GetCrsrOfst should not return the next
// position if screen position is inside second
// half of bound rect, used for Accessibility
@@ -95,27 +95,27 @@ class SwDrawTextInfo
public:
#ifdef DBG_UTIL
- BOOL bPos : 1; // These flags should control, that the appropriate
- BOOL bWrong : 1; // Set-function has been called before calling
- BOOL bGrammarCheck : 1; // the Get-function of a member
- BOOL bSize : 1;
- BOOL bFnt : 1;
- BOOL bHyph : 1;
- BOOL bLeft : 1;
- BOOL bRight : 1;
- BOOL bKana : 1;
- BOOL bOfst : 1;
- BOOL bAscent: 1;
- BOOL bSperr : 1;
- BOOL bSpace : 1;
- BOOL bNumberOfBlanks : 1;
- BOOL bUppr : 1;
- BOOL bDrawSp: 1;
+ sal_Bool bPos : 1; // These flags should control, that the appropriate
+ sal_Bool bWrong : 1; // Set-function has been called before calling
+ sal_Bool bGrammarCheck : 1; // the Get-function of a member
+ sal_Bool bSize : 1;
+ sal_Bool bFnt : 1;
+ sal_Bool bHyph : 1;
+ sal_Bool bLeft : 1;
+ sal_Bool bRight : 1;
+ sal_Bool bKana : 1;
+ sal_Bool bOfst : 1;
+ sal_Bool bAscent: 1;
+ sal_Bool bSperr : 1;
+ sal_Bool bSpace : 1;
+ sal_Bool bNumberOfBlanks : 1;
+ sal_Bool bUppr : 1;
+ sal_Bool bDrawSp: 1;
#endif
SwDrawTextInfo( ViewShell *pS, OutputDevice &rO, const SwScriptInfo* pSI,
const XubString &rSt, xub_StrLen nI, xub_StrLen nL,
- USHORT nW = 0, BOOL bB = FALSE )
+ sal_uInt16 nW = 0, sal_Bool bB = sal_False )
{
pFrm = NULL;
pSh = pS;
@@ -131,11 +131,11 @@ public:
nCursorBidiLevel = 0;
bBullet = bB;
pUnderFnt = 0;
- bGreyWave = FALSE;
- bSpaceStop = FALSE;
- bSnapToGrid = FALSE;
- bIgnoreFrmRTL = FALSE;
- bPosMatchesBounds = FALSE;
+ bGreyWave = sal_False;
+ bSpaceStop = sal_False;
+ bSnapToGrid = sal_False;
+ bIgnoreFrmRTL = sal_False;
+ bPosMatchesBounds = sal_False;
// These values are initialized but, they have to be
// set explicitly via their Set-function before they may
@@ -154,15 +154,15 @@ public:
nAscent = 0;
nSperren = 0;
nSpace = 0;
- bUpper = FALSE;
- bDrawSpace = FALSE;
+ bUpper = sal_False;
+ bDrawSpace = sal_False;
#ifdef DBG_UTIL
// these flags control, whether the matching member variables have
// been set by using the Set-function before they may be accessed
// by their Get-function:
bPos = bWrong = bGrammarCheck = bSize = bFnt = bAscent = bSpace = bNumberOfBlanks = bUppr =
- bDrawSp = bLeft = bRight = bKana = bOfst = bHyph = bSperr = FALSE;
+ bDrawSp = bLeft = bRight = bKana = bOfst = bHyph = bSperr = sal_False;
#endif
}
@@ -286,18 +286,18 @@ public:
return nKanaDiff;
}
- USHORT GetWidth() const
+ sal_uInt16 GetWidth() const
{
return nWidth;
}
- USHORT GetAscent() const
+ sal_uInt16 GetAscent() const
{
ASSERT( bAscent, "DrawTextInfo: Undefined Ascent" );
return nAscent;
}
- USHORT GetKanaComp() const
+ sal_uInt16 GetKanaComp() const
{
return nCompress;
}
@@ -325,49 +325,49 @@ public:
return nNumberOfBlanks;
}
- BYTE GetCursorBidiLevel() const
+ sal_uInt8 GetCursorBidiLevel() const
{
return nCursorBidiLevel;
}
- BOOL GetBullet() const
+ sal_Bool GetBullet() const
{
return bBullet;
}
- BOOL GetUpper() const
+ sal_Bool GetUpper() const
{
ASSERT( bUppr, "DrawTextInfo: Undefined Upperflag" );
return bUpper;
}
- BOOL GetDrawSpace() const
+ sal_Bool GetDrawSpace() const
{
ASSERT( bDrawSp, "DrawTextInfo: Undefined DrawSpaceflag" );
return bDrawSpace;
}
- BOOL GetGreyWave() const
+ sal_Bool GetGreyWave() const
{
return bGreyWave;
}
- BOOL IsSpaceStop() const
+ sal_Bool IsSpaceStop() const
{
return bSpaceStop;
}
- BOOL SnapToGrid() const
+ sal_Bool SnapToGrid() const
{
return bSnapToGrid;
}
- BOOL IsIgnoreFrmRTL() const
+ sal_Bool IsIgnoreFrmRTL() const
{
return bIgnoreFrmRTL;
}
- BOOL IsPosMatchesBounds() const
+ sal_Bool IsPosMatchesBounds() const
{
return bPosMatchesBounds;
}
@@ -381,7 +381,7 @@ public:
{
pPos = &rNew;
#ifdef DBG_UTIL
- bPos = TRUE;
+ bPos = sal_True;
#endif
}
@@ -389,7 +389,7 @@ public:
{
pHyphPos = pNew;
#ifdef DBG_UTIL
- bHyph = TRUE;
+ bHyph = sal_True;
#endif
}
@@ -402,7 +402,7 @@ public:
{
pWrong = pNew;
#ifdef DBG_UTIL
- bWrong = TRUE;
+ bWrong = sal_True;
#endif
}
@@ -410,7 +410,7 @@ public:
{
pGrammarCheck = pNew;
#ifdef DBG_UTIL
- bGrammarCheck = TRUE;
+ bGrammarCheck = sal_True;
#endif
}
@@ -423,7 +423,7 @@ public:
{
pSize = &rNew;
#ifdef DBG_UTIL
- bSize = TRUE;
+ bSize = sal_True;
#endif
}
@@ -431,7 +431,7 @@ public:
{
pFnt = pNew;
#ifdef DBG_UTIL
- bFnt = TRUE;
+ bFnt = sal_True;
#endif
}
@@ -449,7 +449,7 @@ public:
{
nOfst = nNew;
#ifdef DBG_UTIL
- bOfst = TRUE;
+ bOfst = sal_True;
#endif
}
@@ -457,7 +457,7 @@ public:
{
nLeft = nNew;
#ifdef DBG_UTIL
- bLeft = TRUE;
+ bLeft = sal_True;
#endif
}
@@ -465,7 +465,7 @@ public:
{
nRight = nNew;
#ifdef DBG_UTIL
- bRight = TRUE;
+ bRight = sal_True;
#endif
}
@@ -473,20 +473,20 @@ public:
{
nKanaDiff = nNew;
#ifdef DBG_UTIL
- bKana = TRUE;
+ bKana = sal_True;
#endif
}
- void SetWidth( USHORT nNew )
+ void SetWidth( sal_uInt16 nNew )
{
nWidth = nNew;
}
- void SetAscent( USHORT nNew )
+ void SetAscent( sal_uInt16 nNew )
{
nAscent = nNew;
#ifdef DBG_UTIL
- bAscent = TRUE;
+ bAscent = sal_True;
#endif
}
@@ -508,20 +508,20 @@ public:
nSperren = 0;
}
#ifdef DBG_UTIL
- bSpace = TRUE;
- bSperr = TRUE;
+ bSpace = sal_True;
+ bSperr = sal_True;
#endif
}
void SetNumberOfBlanks( xub_StrLen nNew )
{
#ifdef DBG_UTIL
- bNumberOfBlanks = TRUE;
+ bNumberOfBlanks = sal_True;
#endif
nNumberOfBlanks = nNew;
}
- void SetCursorBidiLevel( BYTE nNew )
+ void SetCursorBidiLevel( sal_uInt8 nNew )
{
nCursorBidiLevel = nNew;
}
@@ -531,7 +531,7 @@ public:
nCompress = nNew;
}
- void SetBullet( BOOL bNew )
+ void SetBullet( sal_Bool bNew )
{
bBullet = bNew;
}
@@ -541,48 +541,48 @@ public:
pUnderFnt = pULFnt;
}
- void SetUpper( BOOL bNew )
+ void SetUpper( sal_Bool bNew )
{
bUpper = bNew;
#ifdef DBG_UTIL
- bUppr = TRUE;
+ bUppr = sal_True;
#endif
}
- void SetDrawSpace( BOOL bNew )
+ void SetDrawSpace( sal_Bool bNew )
{
bDrawSpace = bNew;
#ifdef DBG_UTIL
- bDrawSp = TRUE;
+ bDrawSp = sal_True;
#endif
}
- void SetGreyWave( BOOL bNew )
+ void SetGreyWave( sal_Bool bNew )
{
bGreyWave = bNew;
}
- void SetSpaceStop( BOOL bNew )
+ void SetSpaceStop( sal_Bool bNew )
{
bSpaceStop = bNew;
}
- void SetSnapToGrid( BOOL bNew )
+ void SetSnapToGrid( sal_Bool bNew )
{
bSnapToGrid = bNew;
}
- void SetIgnoreFrmRTL( BOOL bNew )
+ void SetIgnoreFrmRTL( sal_Bool bNew )
{
bIgnoreFrmRTL = bNew;
}
- void SetPosMatchesBounds( BOOL bNew )
+ void SetPosMatchesBounds( sal_Bool bNew )
{
bPosMatchesBounds = bNew;
}
- void Shift( USHORT nDir );
+ void Shift( sal_uInt16 nDir );
// sets a new color at the output device if necessary
// if a font is passed as argument, the change if made to the font
diff --git a/sw/source/core/inc/dview.hxx b/sw/source/core/inc/dview.hxx
index 0414ebd41be3..60021d8fef84 100644
--- a/sw/source/core/inc/dview.hxx
+++ b/sw/source/core/inc/dview.hxx
@@ -89,7 +89,7 @@ protected:
// overloaded to allow extra handling when picking SwVirtFlyDrawObj's
using FmFormView::CheckSingleSdrObjectHit;
- virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const;
+ virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const;
public:
SwDrawView( SwViewImp &rI, SdrModel *pMd, OutputDevice* pOutDev=NULL );
@@ -103,9 +103,9 @@ public:
// Overload to resue edit background color in active text edit view (OutlinerView)
virtual void ModelHasChanged();
- virtual void ObjOrderChanged( SdrObject* pObj, ULONG nOldPos,
- ULONG nNewPos );
- virtual BOOL TakeDragLimit(SdrDragMode eMode, Rectangle& rRect) const;
+ virtual void ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
+ sal_uLong nNewPos );
+ virtual sal_Bool TakeDragLimit(SdrDragMode eMode, Rectangle& rRect) const;
virtual void MakeVisible( const Rectangle&, Window &rWin );
virtual void CheckPossibilities();
diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx
index 634a1fbb53a1..d1290c66e989 100644
--- a/sw/source/core/inc/flowfrm.hxx
+++ b/sw/source/core/inc/flowfrm.hxx
@@ -82,12 +82,12 @@ class SwFlowFrm
//Hilfsfunktionen fuer MoveSubTree()
static SwLayoutFrm *CutTree( SwFrm* );
- static BOOL PasteTree( SwFrm *, SwLayoutFrm *, SwFrm *, SwFrm* );
+ static sal_Bool PasteTree( SwFrm *, SwLayoutFrm *, SwFrm *, SwFrm* );
//Wird fuer das Zusammenspiel von _GetPrevxxx und MoveBwd gebraucht, damit
//mehrere Blaetter gleichzeitig uebersprungen werden koennen.
//Wird auch vom MoveBwd des TabFrm ausgewertet!
- static BOOL bMoveBwdJump;
+ static sal_Bool bMoveBwdJump;
/** helper method to determine previous frame for calculation of the
upper space
@@ -125,37 +125,37 @@ protected:
SwFlowFrm *pFollow;
- BOOL bIsFollow :1; //Ist's ein Follow
- BOOL bLockJoin :1; //Join (und damit deleten) verboten wenn TRUE!
- BOOL bUndersized:1; // wir sind kleiner als gewuenscht
- BOOL bFtnAtEnd :1; // For sectionfrms only: footnotes at the end of section
- BOOL bEndnAtEnd :1; // " " " : endnotes at the end of section
- BOOL bCntntLock :1; // " " " : content locked
- BOOL bOwnFtnNum :1; // " " " : special numbering of footnotes
- BOOL bFtnLock :1; // " " " : ftn, don't leave this section bwd
- BOOL bFlyLock :1; // Stop positioning of at-character flyframes
+ sal_Bool bIsFollow :1; //Ist's ein Follow
+ sal_Bool bLockJoin :1; //Join (und damit deleten) verboten wenn sal_True!
+ sal_Bool bUndersized:1; // wir sind kleiner als gewuenscht
+ sal_Bool bFtnAtEnd :1; // For sectionfrms only: footnotes at the end of section
+ sal_Bool bEndnAtEnd :1; // " " " : endnotes at the end of section
+ sal_Bool bCntntLock :1; // " " " : content locked
+ sal_Bool bOwnFtnNum :1; // " " " : special numbering of footnotes
+ sal_Bool bFtnLock :1; // " " " : ftn, don't leave this section bwd
+ sal_Bool bFlyLock :1; // Stop positioning of at-character flyframes
//Prueft ob Vorwaertsfluss noch Sinn macht Endloswanderschaften (unterbinden)
- inline BOOL IsFwdMoveAllowed();
+ inline sal_Bool IsFwdMoveAllowed();
// --> OD 2005-03-08 #i44049# - method <CalcCntnt(..)> has to check this property.
friend void CalcCntnt( SwLayoutFrm *pLay, bool bNoColl, bool bNoCalcFollow );
// <--
- BOOL IsKeepFwdMoveAllowed(); //Wie oben, Move fuer Keep.
+ sal_Bool IsKeepFwdMoveAllowed(); //Wie oben, Move fuer Keep.
//Prueft ob ein Obj das Umlauf wuenscht ueberlappt.
//eine Null bedeutet, kein Objekt ueberlappt,
// 1 heisst, Objekte, die am FlowFrm selbst verankert sind, ueberlappen
// 2 heisst, Objekte, die woanders verankert sind, ueberlappen
// 3 heistt, beiderlei verankerte Objekte ueberlappen
- BYTE BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect );
+ sal_uInt8 BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect );
- void LockJoin() { bLockJoin = TRUE; }
- void UnlockJoin() { bLockJoin = FALSE; }
+ void LockJoin() { bLockJoin = sal_True; }
+ void UnlockJoin() { bLockJoin = sal_False; }
- BOOL CheckMoveFwd( BOOL &rbMakePage, BOOL bKeep, BOOL bMovedBwd );
- BOOL MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways = FALSE );
- virtual BOOL ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL bHead, BOOL &rReformat )=0;
- BOOL MoveBwd( BOOL &rbReformat );
+ sal_Bool CheckMoveFwd( sal_Bool &rbMakePage, sal_Bool bKeep, sal_Bool bMovedBwd );
+ sal_Bool MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool bMoveAlways = sal_False );
+ virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool bHead, sal_Bool &rReformat )=0;
+ sal_Bool MoveBwd( sal_Bool &rbReformat );
public:
SwFlowFrm( SwFrm &rFrm );
@@ -163,48 +163,48 @@ public:
const SwFrm *GetFrm() const { return &rThis; }
SwFrm *GetFrm() { return &rThis; }
- static BOOL IsMoveBwdJump() { return bMoveBwdJump; }
- static void SetMoveBwdJump( BOOL bNew ){ bMoveBwdJump = bNew; }
+ static sal_Bool IsMoveBwdJump() { return bMoveBwdJump; }
+ static void SetMoveBwdJump( sal_Bool bNew ){ bMoveBwdJump = bNew; }
- inline void SetUndersized( const BOOL bNew ) { bUndersized = bNew; }
- inline BOOL IsUndersized() const { return bUndersized; }
+ inline void SetUndersized( const sal_Bool bNew ) { bUndersized = bNew; }
+ inline sal_Bool IsUndersized() const { return bUndersized; }
- BOOL IsPrevObjMove() const;
+ sal_Bool IsPrevObjMove() const;
//Die Kette mit minimalen Operationen und Benachrichtigungen unter den
//neuen Parent Moven.
void MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling = 0 );
- BOOL HasFollow() const { return pFollow ? TRUE : FALSE; }
- BOOL IsFollow() const { return bIsFollow; }
- inline void _SetIsFollow( BOOL bSet ) { bIsFollow = bSet; }
+ sal_Bool HasFollow() const { return pFollow ? sal_True : sal_False; }
+ sal_Bool IsFollow() const { return bIsFollow; }
+ inline void _SetIsFollow( sal_Bool bSet ) { bIsFollow = bSet; }
const SwFlowFrm *GetFollow() const { return pFollow; }
SwFlowFrm *GetFollow() { return pFollow; }
- BOOL IsAnFollow( const SwFlowFrm *pFlow ) const;
+ sal_Bool IsAnFollow( const SwFlowFrm *pFlow ) const;
inline void SetFollow( SwFlowFrm *pNew ) { pFollow = pNew; }
sal_Bool IsJoinLocked() const { return bLockJoin; }
sal_Bool IsAnyJoinLocked() const { return bLockJoin || HasLockedFollow(); }
- BOOL IsFtnAtEnd() const { return bFtnAtEnd; }
- BOOL IsEndnAtEnd() const { return bEndnAtEnd; }
- BOOL IsAnyNoteAtEnd() const { return bFtnAtEnd || bEndnAtEnd; }
- BOOL AreNotesAtEnd() const { return bFtnAtEnd && bEndnAtEnd; }
+ sal_Bool IsFtnAtEnd() const { return bFtnAtEnd; }
+ sal_Bool IsEndnAtEnd() const { return bEndnAtEnd; }
+ sal_Bool IsAnyNoteAtEnd() const { return bFtnAtEnd || bEndnAtEnd; }
+ sal_Bool AreNotesAtEnd() const { return bFtnAtEnd && bEndnAtEnd; }
- BOOL IsPageBreak( BOOL bAct ) const;
- BOOL IsColBreak( BOOL bAct ) const;
+ sal_Bool IsPageBreak( sal_Bool bAct ) const;
+ sal_Bool IsColBreak( sal_Bool bAct ) const;
//Ist ein Keep zu beruecksichtigen (Breaks!)
- BOOL IsKeep( const SwAttrSet& rAttrs, bool bBreakCheck = false ) const;
+ sal_Bool IsKeep( const SwAttrSet& rAttrs, bool bBreakCheck = false ) const;
sal_Bool HasLockedFollow() const;
- BOOL HasParaSpaceAtPages( BOOL bSct ) const;
+ sal_Bool HasParaSpaceAtPages( sal_Bool bSct ) const;
/** method to determine the upper space hold by the frame
OD 2004-03-12 #i11860# - add 3rd parameter <_bConsiderGrid> to get
the upper space with and without considering the page grid
- (default value: <TRUE>)
+ (default value: <sal_True>)
@author ?
*/
@@ -249,14 +249,14 @@ public:
void CheckKeep();
- void SetFtnLock( BOOL bNew ){ bFtnLock = bNew; }
- BOOL IsFtnLock() const { return bFtnLock; }
- void SetFlyLock( BOOL bNew ){ bFlyLock = bNew; }
- BOOL IsFlyLock() const { return bFlyLock; }
- void SetOwnFtnNum( BOOL bNew ){ bOwnFtnNum = bNew; }
- BOOL IsOwnFtnNum() const { return bOwnFtnNum; }
- void SetCntntLock( BOOL bNew ){ bCntntLock = bNew; }
- BOOL IsCntntLocked() const { return bCntntLock; }
+ void SetFtnLock( sal_Bool bNew ){ bFtnLock = bNew; }
+ sal_Bool IsFtnLock() const { return bFtnLock; }
+ void SetFlyLock( sal_Bool bNew ){ bFlyLock = bNew; }
+ sal_Bool IsFlyLock() const { return bFlyLock; }
+ void SetOwnFtnNum( sal_Bool bNew ){ bOwnFtnNum = bNew; }
+ sal_Bool IsOwnFtnNum() const { return bOwnFtnNum; }
+ void SetCntntLock( sal_Bool bNew ){ bCntntLock = bNew; }
+ sal_Bool IsCntntLocked() const { return bCntntLock; }
//casten einen Frm auf einen FlowFrm - wenns denn einer ist, sonst 0
//Diese Methoden muessen fuer neue Ableitungen geaendert werden!
@@ -264,7 +264,7 @@ public:
static const SwFlowFrm *CastFlowFrm( const SwFrm *pFrm );
};
-inline BOOL SwFlowFrm::IsFwdMoveAllowed()
+inline sal_Bool SwFlowFrm::IsFwdMoveAllowed()
{
return rThis.GetIndPrev() != 0;
}
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index 83cc6a4c93e9..d171bd0b0a26 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -47,25 +47,25 @@ class PolyPolygon;
//fuer Ankerwechsel benoetigt.
//implementiert in layout/flycnt.cxx
const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
- const BOOL bBody = FALSE );
+ const sal_Bool bBody = sal_False );
// berechnet das Rechteck, in dem das Objekt bewegt bzw. resized werden darf
-BOOL CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, BOOL bMove = TRUE );
+sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove = sal_True );
//allg. Basisklasse fuer alle Freifliegenden Rahmen
// OD 2004-03-22 #i26791# - inherit also from <SwAnchoredFlyFrm>
class SwFlyFrm : public SwLayoutFrm, public SwAnchoredObject
{
//darf Locken. Definiert in frmtool.cxx
- friend void AppendObjs ( const SwSpzFrmFmts *, ULONG, SwFrm *, SwPageFrm * );
+ friend void AppendObjs ( const SwSpzFrmFmts *, sal_uLong, SwFrm *, SwPageFrm * );
friend void AppendAllObjs( const SwSpzFrmFmts * );
friend void Notify( SwFlyFrm *, SwPageFrm *pOld, const SwRect &rOld,
const SwRect* pOldPrt );
- void InitDrawObj( BOOL bNotify ); //Wird von den CToren gerufen.
+ void InitDrawObj( sal_Bool bNotify ); //Wird von den CToren gerufen.
void FinitDrawObj(); //Wird vom CTor gerufen.
- void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, BYTE &,
+ void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, sal_uInt8 &,
SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
using SwLayoutFrm::CalcRel;
@@ -79,7 +79,7 @@ protected:
// Point aRelPos; //Die Relative Position zum Master
private:
- BOOL bLocked :1; //Cntnt-gebundene Flys muessen derart blockiert werden
+ sal_Bool bLocked :1; //Cntnt-gebundene Flys muessen derart blockiert werden
//koennen, dass sie nicht Formatiert werden; :MakeAll
//returnt dann sofort. Dies ist bei Seitenwechseln
//waehrend der Formatierung notwendig.
@@ -87,31 +87,31 @@ private:
//sonst der Anker formatiert wird obwohl die Root noch
//nicht korrekt an der Shell haengt und weil sonst
//initial zuviel Formatiert wuerde.
- BOOL bNotifyBack:1; //TRUE wenn am Ende eines MakeAll() der Background
+ sal_Bool bNotifyBack:1; //sal_True wenn am Ende eines MakeAll() der Background
//vom NotifyDTor benachrichtigt werden muss.
protected:
- BOOL bInvalid :1; //Pos, PrtArea od. SSize wurden Invalidiert, sie werden
+ sal_Bool bInvalid :1; //Pos, PrtArea od. SSize wurden Invalidiert, sie werden
//gleich wieder Validiert, denn sie muessen _immer_
//gueltig sein. Damit in LayAction korrekt gearbeitet
//werden kann muss hier festgehalten werden, dass sie
//invalidiert wurden. Ausnahmen bestaetigen die Regelt!
- BOOL bMinHeight:1; //TRUE wenn die vom Attribut vorgegebene Hoehe eine
+ sal_Bool bMinHeight:1; //sal_True wenn die vom Attribut vorgegebene Hoehe eine
//eine Minimalhoehe ist (der Frm also bei Bedarf
//darueberhinaus wachsen kann).
- BOOL bHeightClipped :1; //TRUE wenn der Fly nicht die Pos/Size anhand der Attrs
- BOOL bWidthClipped :1; //formatieren konnte, weil z.B. nicht genug Raum vorh.
+ sal_Bool bHeightClipped :1; //sal_True wenn der Fly nicht die Pos/Size anhand der Attrs
+ sal_Bool bWidthClipped :1; //formatieren konnte, weil z.B. nicht genug Raum vorh.
//war.
- BOOL bFormatHeightOnly :1; //Damit nach einer Anpassung der Breite
+ sal_Bool bFormatHeightOnly :1; //Damit nach einer Anpassung der Breite
//(CheckClip) nur das Format aufgerufen wird;
//nicht aber die Breite anhand der Attribute
//wieder bestimmt wird.
- BOOL bInCnt :1; // FLY_AS_CHAR, anchored as character
- BOOL bAtCnt :1; // FLY_AT_PARA, anchored at paragraph
- BOOL bLayout :1; // FLY_AT_PAGE, FLY_AT_FLY, at page or at frame
- BOOL bAutoPosition :1; // FLY_AT_CHAR, anchored at character
- BOOL bNoShrink :1; // temporary forbud of shrinking to avoid loops
- BOOL bLockDeleteContent :1; // If the flag is set, the content of the
+ sal_Bool bInCnt :1; // FLY_AS_CHAR, anchored as character
+ sal_Bool bAtCnt :1; // FLY_AT_PARA, anchored at paragraph
+ sal_Bool bLayout :1; // FLY_AT_PAGE, FLY_AT_FLY, at page or at frame
+ sal_Bool bAutoPosition :1; // FLY_AT_CHAR, anchored at character
+ sal_Bool bNoShrink :1; // temporary forbud of shrinking to avoid loops
+ sal_Bool bLockDeleteContent :1; // If the flag is set, the content of the
// fly frame is not deleted if moved to
// invisible layer.
@@ -122,11 +122,11 @@ protected:
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
void MakePrtArea( const SwBorderAttrs &rAttrs );
- void Lock() { bLocked = TRUE; }
- void Unlock() { bLocked = FALSE; }
+ void Lock() { bLocked = sal_True; }
+ void Unlock() { bLocked = sal_False; }
- void SetMinHeight() { bMinHeight = TRUE; }
- void ResetMinHeight(){ bMinHeight = FALSE; }
+ void SetMinHeight() { bMinHeight = sal_True; }
+ void ResetMinHeight(){ bMinHeight = sal_False; }
Size CalcRel( const SwFmtFrmSize &rSz ) const;
SwTwips CalcAutoWidth() const;
@@ -157,24 +157,24 @@ public:
virtual ~SwFlyFrm();
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
// erfrage vom Client Informationen
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
virtual void Paint( SwRect const&,
SwPrintData const*const pPrintData = NULL ) const;
virtual Size ChgSize( const Size& aNewSize );
- virtual BOOL GetCrsrOfst( SwPosition *, Point&,
+ virtual sal_Bool GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
- virtual void CheckDirection( BOOL bVert );
+ virtual void CheckDirection( sal_Bool bVert );
virtual void Cut();
#ifdef DBG_UTIL
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
#endif
- SwTwips _Shrink( SwTwips, BOOL bTst );
- SwTwips _Grow ( SwTwips, BOOL bTst );
+ SwTwips _Shrink( SwTwips, sal_Bool bTst );
+ SwTwips _Grow ( SwTwips, sal_Bool bTst );
void _Invalidate( SwPageFrm *pPage = 0 );
- BOOL FrmSizeChg( const SwFmtFrmSize & );
+ sal_Bool FrmSizeChg( const SwFmtFrmSize & );
SwFlyFrm *GetPrevLink() const { return pPrevLink; }
SwFlyFrm *GetNextLink() const { return pNextLink; }
@@ -190,33 +190,33 @@ public:
void NotifyDrawObj();
void ChgRelPos( const Point &rAbsPos );
- BOOL IsInvalid() const { return bInvalid; }
- void Invalidate() const { ((SwFlyFrm*)this)->bInvalid = TRUE; }
- void Validate() const { ((SwFlyFrm*)this)->bInvalid = FALSE; }
-
- BOOL IsMinHeight() const { return bMinHeight; }
- BOOL IsLocked() const { return bLocked; }
- BOOL IsAutoPos() const { return bAutoPosition; }
- BOOL IsFlyInCntFrm() const { return bInCnt; }
- BOOL IsFlyFreeFrm() const { return bAtCnt || bLayout; }
- BOOL IsFlyLayFrm() const { return bLayout; }
- BOOL IsFlyAtCntFrm() const { return bAtCnt; }
-
- BOOL IsNotifyBack() const { return bNotifyBack; }
- void SetNotifyBack() { bNotifyBack = TRUE; }
- void ResetNotifyBack() { bNotifyBack = FALSE; }
- BOOL IsNoShrink() const { return bNoShrink; }
- void SetNoShrink( BOOL bNew ) { bNoShrink = bNew; }
- BOOL IsLockDeleteContent() const { return bLockDeleteContent; }
- void SetLockDeleteContent( BOOL bNew ) { bLockDeleteContent = bNew; }
-
-
- BOOL IsClipped() const { return bHeightClipped || bWidthClipped; }
- BOOL IsHeightClipped() const { return bHeightClipped; }
- BOOL IsWidthClipped() const { return bWidthClipped; }
-
- BOOL IsLowerOf( const SwLayoutFrm* pUpper ) const;
- inline BOOL IsUpperOf( const SwFlyFrm& _rLower ) const
+ sal_Bool IsInvalid() const { return bInvalid; }
+ void Invalidate() const { ((SwFlyFrm*)this)->bInvalid = sal_True; }
+ void Validate() const { ((SwFlyFrm*)this)->bInvalid = sal_False; }
+
+ sal_Bool IsMinHeight() const { return bMinHeight; }
+ sal_Bool IsLocked() const { return bLocked; }
+ sal_Bool IsAutoPos() const { return bAutoPosition; }
+ sal_Bool IsFlyInCntFrm() const { return bInCnt; }
+ sal_Bool IsFlyFreeFrm() const { return bAtCnt || bLayout; }
+ sal_Bool IsFlyLayFrm() const { return bLayout; }
+ sal_Bool IsFlyAtCntFrm() const { return bAtCnt; }
+
+ sal_Bool IsNotifyBack() const { return bNotifyBack; }
+ void SetNotifyBack() { bNotifyBack = sal_True; }
+ void ResetNotifyBack() { bNotifyBack = sal_False; }
+ sal_Bool IsNoShrink() const { return bNoShrink; }
+ void SetNoShrink( sal_Bool bNew ) { bNoShrink = bNew; }
+ sal_Bool IsLockDeleteContent() const { return bLockDeleteContent; }
+ void SetLockDeleteContent( sal_Bool bNew ) { bLockDeleteContent = bNew; }
+
+
+ sal_Bool IsClipped() const { return bHeightClipped || bWidthClipped; }
+ sal_Bool IsHeightClipped() const { return bHeightClipped; }
+ sal_Bool IsWidthClipped() const { return bWidthClipped; }
+
+ sal_Bool IsLowerOf( const SwLayoutFrm* pUpper ) const;
+ inline sal_Bool IsUpperOf( const SwFlyFrm& _rLower ) const
{
return _rLower.IsLowerOf( this );
}
@@ -225,12 +225,12 @@ public:
// OD 16.04.2003 #i13147# - add parameter <_bForPaint> to avoid load of
// the graphic during paint. Default value: sal_False
- BOOL GetContour( PolyPolygon& rContour,
+ sal_Bool GetContour( PolyPolygon& rContour,
const sal_Bool _bForPaint = sal_False ) const;
//Auf dieser Shell painten (PreView, Print-Flag usw. rekursiv beachten)?.
- static BOOL IsPaint( SdrObject *pObj, const ViewShell *pSh );
+ static sal_Bool IsPaint( SdrObject *pObj, const ViewShell *pSh );
/** SwFlyFrm::IsBackgroundTransparent - for feature #99657#
diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 105d1f117f9e..079272eb6db1 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -186,8 +186,8 @@ class SwFlyInCntFrm : public SwFlyFrm
Point aRef; //Relativ zu diesem Point wird die AbsPos berechnet.
long nLine; //Zeilenhoehe, Ref.Y() - nLine == Zeilenanfang.
- BOOL bInvalidLayout :1;
- BOOL bInvalidCntnt :1;
+ sal_Bool bInvalidLayout :1;
+ sal_Bool bInvalidCntnt :1;
protected:
virtual void NotifyBackground( SwPageFrm *pPage,
@@ -214,9 +214,9 @@ public:
inline void InvalidateCntnt() const;
inline void ValidateLayout() const;
inline void ValidateCntnt() const;
- BOOL IsInvalid() const { return (bInvalidLayout || bInvalidCntnt); }
- BOOL IsInvalidLayout() const { return bInvalidLayout; }
- BOOL IsInvalidCntnt() const { return bInvalidCntnt; }
+ sal_Bool IsInvalid() const { return (bInvalidLayout || bInvalidCntnt); }
+ sal_Bool IsInvalidLayout() const { return bInvalidLayout; }
+ sal_Bool IsInvalidCntnt() const { return bInvalidCntnt; }
//BP 26.11.93: vgl. tabfrm.hxx, gilt bestimmt aber fuer andere auch...
@@ -241,19 +241,19 @@ public:
inline void SwFlyInCntFrm::InvalidateLayout() const
{
- ((SwFlyInCntFrm*)this)->bInvalidLayout = TRUE;
+ ((SwFlyInCntFrm*)this)->bInvalidLayout = sal_True;
}
inline void SwFlyInCntFrm::InvalidateCntnt() const
{
- ((SwFlyInCntFrm*)this)->bInvalidCntnt = TRUE;
+ ((SwFlyInCntFrm*)this)->bInvalidCntnt = sal_True;
}
inline void SwFlyInCntFrm::ValidateLayout() const
{
- ((SwFlyInCntFrm*)this)->bInvalidLayout = FALSE;
+ ((SwFlyInCntFrm*)this)->bInvalidLayout = sal_False;
}
inline void SwFlyInCntFrm::ValidateCntnt() const
{
- ((SwFlyInCntFrm*)this)->bInvalidCntnt = FALSE;
+ ((SwFlyInCntFrm*)this)->bInvalidCntnt = sal_False;
}
#endif
diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx
index f49a69b5e992..c95fc3f0a8bc 100644
--- a/sw/source/core/inc/fntcache.hxx
+++ b/sw/source/core/inc/fntcache.hxx
@@ -66,7 +66,7 @@ public:
// Font-Cache, globale Variable, in txtinit.Cxx angelegt/zerstoert
extern SwFntCache *pFntCache;
extern SwFntObj *pLastFont;
-extern BYTE *pMagicNo;
+extern sal_uInt8 *pMagicNo;
extern Color *pWaveCol;
/*************************************************************************
@@ -83,16 +83,16 @@ class SwFntObj : public SwCacheObj
Font *pScrFont;
Font *pPrtFont;
OutputDevice* pPrinter;
- USHORT nGuessedLeading;
- USHORT nExtLeading;
- USHORT nScrAscent;
- USHORT nPrtAscent;
- USHORT nScrHeight;
- USHORT nPrtHeight;
- USHORT nPropWidth;
- USHORT nZoom;
- BOOL bSymbol : 1;
- BOOL bPaintBlank : 1;
+ sal_uInt16 nGuessedLeading;
+ sal_uInt16 nExtLeading;
+ sal_uInt16 nScrAscent;
+ sal_uInt16 nPrtAscent;
+ sal_uInt16 nScrHeight;
+ sal_uInt16 nPrtHeight;
+ sal_uInt16 nPropWidth;
+ sal_uInt16 nZoom;
+ sal_Bool bSymbol : 1;
+ sal_Bool bPaintBlank : 1;
static long nPixWidth;
static MapMode *pPixMap;
@@ -100,8 +100,8 @@ class SwFntObj : public SwCacheObj
// SMARTTAGS
void calcLinePos(SwDrawTextInfo& rInf, Point& aStart, Point& aEnd, xub_StrLen nStart,
- xub_StrLen nWrLen, xub_StrLen nCnt, const BOOL bSwitchH2V, const BOOL bSwitchL2R,
- long nHalfSpace, long* pKernArray, const BOOL bBidiPor);
+ xub_StrLen nWrLen, xub_StrLen nCnt, const sal_Bool bSwitchH2V, const sal_Bool bSwitchL2R,
+ long nHalfSpace, long* pKernArray, const sal_Bool bBidiPor);
public:
DECL_FIXEDMEMPOOL_NEWDEL(SwFntObj)
@@ -115,20 +115,20 @@ public:
inline Font *GetFont() { return &aFont; }
inline const Font *GetFont() const { return &aFont; }
- inline USHORT GetGuessedLeading() const { return nGuessedLeading; }
- inline USHORT GetExtLeading() const { return nExtLeading; }
+ inline sal_uInt16 GetGuessedLeading() const { return nGuessedLeading; }
+ inline sal_uInt16 GetExtLeading() const { return nExtLeading; }
- USHORT GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut );
- USHORT GetFontHeight( const ViewShell *pSh, const OutputDevice& rOut );
- USHORT GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut );
+ sal_uInt16 GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut );
+ sal_uInt16 GetFontHeight( const ViewShell *pSh, const OutputDevice& rOut );
+ sal_uInt16 GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut );
void GuessLeading( const ViewShell& rSh, const FontMetric& rMet );
void SetDevFont( const ViewShell *pSh, OutputDevice& rOut );
inline OutputDevice* GetPrt() const { return pPrinter; }
- inline USHORT GetZoom() const { return nZoom; }
- inline USHORT GetPropWidth() const { return nPropWidth; }
- inline BOOL IsSymbol() const { return bSymbol; }
+ inline sal_uInt16 GetZoom() const { return nZoom; }
+ inline sal_uInt16 GetPropWidth() const { return nPropWidth; }
+ inline sal_Bool IsSymbol() const { return bSymbol; }
void DrawText( SwDrawTextInfo &rInf );
Size GetTextSize( SwDrawTextInfo &rInf );
@@ -150,9 +150,9 @@ protected:
virtual SwCacheObj *NewObj( );
public:
- SwFntAccess( const void * &rMagic, USHORT &rIndex, const void *pOwner,
+ SwFntAccess( const void * &rMagic, sal_uInt16 &rIndex, const void *pOwner,
ViewShell *pShell,
- BOOL bCheck = FALSE );
+ sal_Bool bCheck = sal_False );
inline SwFntObj* Get() { return (SwFntObj*) SwCacheAccess::Get(); };
};
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 9837f3fe3e55..9b3599ac977f 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -136,8 +136,8 @@ class SwAnchoredObject;
class SwFrm;
typedef long (SwFrm:: *SwFrmGet)() const;
-typedef BOOL (SwFrm:: *SwFrmMax)( long );
-typedef void (SwFrm:: *SwFrmMakePos)( const SwFrm*, const SwFrm*, BOOL );
+typedef sal_Bool (SwFrm:: *SwFrmMax)( long );
+typedef void (SwFrm:: *SwFrmMakePos)( const SwFrm*, const SwFrm*, sal_Bool );
typedef long (*SwOperator)( long, long );
typedef void (SwFrm:: *SwFrmSet)( long, long );
@@ -344,9 +344,9 @@ class SwFrm: public SwClient
SwCntntFrm* _FindPrevCnt( const bool _bInSameFtn = false );
- void _UpdateAttrFrm( SfxPoolItem*, SfxPoolItem*, BYTE & );
+ void _UpdateAttrFrm( SfxPoolItem*, SfxPoolItem*, sal_uInt8 & );
SwFrm* _GetIndNext();
- void SetDirFlags( BOOL bVert );
+ void SetDirFlags( sal_Bool bVert );
SwFrm( SwFrm & ); //Kopieren ist nicht erlaubt.
@@ -358,49 +358,49 @@ protected:
SwRect aFrm; //Absolute Dokumentposition und groesse des Frm
SwRect aPrt; //Position der PrtArea rel zum Frm und groesse der PrtArea
- USHORT bFlag01: 1;
- USHORT bFlag02: 1;
- USHORT bFlag03: 1;
- USHORT bFlag04: 1;
- USHORT bFlag05: 1;
- USHORT bReverse: 1; // Next line above/at the right side instead
+ sal_uInt16 bFlag01: 1;
+ sal_uInt16 bFlag02: 1;
+ sal_uInt16 bFlag03: 1;
+ sal_uInt16 bFlag04: 1;
+ sal_uInt16 bFlag05: 1;
+ sal_uInt16 bReverse: 1; // Next line above/at the right side instead
// under/at the left side of the previous line.
- USHORT bInvalidR2L: 1;
- USHORT bDerivedR2L: 1;
- USHORT bRightToLeft: 1;
- USHORT bInvalidVert: 1;
- USHORT bDerivedVert: 1;
- USHORT bVertical: 1;
- USHORT nType: 4; //Who am I?
-
- BOOL bValidPos: 1;
- BOOL bValidPrtArea: 1;
- BOOL bValidSize: 1;
- BOOL bValidLineNum: 1;
- BOOL bFixSize: 1;
- BOOL bUnUsed1: 1;
- BOOL bCompletePaint: 1; //Frame wird ganz gepaintet wenn TRUE, auch
+ sal_uInt16 bInvalidR2L: 1;
+ sal_uInt16 bDerivedR2L: 1;
+ sal_uInt16 bRightToLeft: 1;
+ sal_uInt16 bInvalidVert: 1;
+ sal_uInt16 bDerivedVert: 1;
+ sal_uInt16 bVertical: 1;
+ sal_uInt16 nType: 4; //Who am I?
+
+ sal_Bool bValidPos: 1;
+ sal_Bool bValidPrtArea: 1;
+ sal_Bool bValidSize: 1;
+ sal_Bool bValidLineNum: 1;
+ sal_Bool bFixSize: 1;
+ sal_Bool bUnUsed1: 1;
+ sal_Bool bCompletePaint: 1; //Frame wird ganz gepaintet wenn sal_True, auch
//wenn der Inhalt nur teilw. veraendert ist;
- //Bei CntntFrms wird ausschliesslich wenn TRUE
+ //Bei CntntFrms wird ausschliesslich wenn sal_True
//der Border (von Action) gemalt.
- BOOL bRetouche: 1; //Der Frame ist fuer Retusche verantwortlich
- //wenn TRUE.
+ sal_Bool bRetouche: 1; //Der Frame ist fuer Retusche verantwortlich
+ //wenn sal_True.
public:
- BOOL bUnUsed2: 1;
+ sal_Bool bUnUsed2: 1;
protected:
- BOOL bInfInvalid: 1; //InfoFlags sind Invalid.
- BOOL bInfBody: 1; //Frm steht im DokumentBody.
- BOOL bInfTab: 1; //Frm steht in einer Tabelle.
- BOOL bInfFly: 1; //Frm steht in einem Fly.
- BOOL bInfFtn: 1; //Frm steht in einer Fussnote.
- BOOL bInfSct: 1; //Frm steht in einem Bereich.
- BOOL bColLocked: 1; //Grow/Shrink sperren bei spaltigen Section-
+ sal_Bool bInfInvalid: 1; //InfoFlags sind Invalid.
+ sal_Bool bInfBody: 1; //Frm steht im DokumentBody.
+ sal_Bool bInfTab: 1; //Frm steht in einer Tabelle.
+ sal_Bool bInfFly: 1; //Frm steht in einem Fly.
+ sal_Bool bInfFtn: 1; //Frm steht in einer Fussnote.
+ sal_Bool bInfSct: 1; //Frm steht in einem Bereich.
+ sal_Bool bColLocked: 1; //Grow/Shrink sperren bei spaltigen Section-
//oder Fly-Frames, wird im Format gesetzt
- void ColLock() { bColLocked = TRUE; }
- void ColUnlock() { bColLocked = FALSE; }
+ void ColLock() { bColLocked = sal_True; }
+ void ColUnlock() { bColLocked = sal_False; }
- SwPageFrm *InsertPage( SwPageFrm *pSibling, BOOL bFtn );
+ SwPageFrm *InsertPage( SwPageFrm *pSibling, sal_Bool bFtn );
void PrepareMake();
void OptPrepareMake();
void MakePos();
@@ -412,19 +412,19 @@ protected:
// <--
virtual void MakeAll() = 0;
//Adjustierung der Frames einer Seite
- SwTwips AdjustNeighbourhood( SwTwips nDiff, BOOL bTst = FALSE );
+ SwTwips AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst = sal_False );
//Aendern nur die Framesize, nicht die PrtArea-SSize
- virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE ) = 0;
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE ) = 0;
+ virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False ) = 0;
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False ) = 0;
SwModify *GetDep() { return pRegisteredIn; }
const SwModify *GetDep() const { return pRegisteredIn; }
SwFrm( SwModify* );
- void CheckDir( UINT16 nDir, BOOL bVert, BOOL bOnlyBiDi, BOOL bBrowse );
+ void CheckDir( sal_uInt16 nDir, sal_Bool bVert, sal_Bool bOnlyBiDi, sal_Bool bBrowse );
/** enumeration for the different invalidations
@@ -449,7 +449,7 @@ protected:
OD 2004-05-19 #i28701#
Method has *only* to contain actions, which has to be performed on
- *every* assignment of the corresponding flag to <FALSE>.
+ *every* assignment of the corresponding flag to <sal_False>.
@author OD
*/
@@ -461,15 +461,15 @@ protected:
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
- USHORT GetType() const { return 0x1 << nType; }
+ sal_uInt16 GetType() const { return 0x1 << nType; }
static SwCache &GetCache() { return *pCache; }
static SwCache *GetCachePtr() { return pCache; }
static void SetCache( SwCache *pNew ) { pCache = pNew; }
//Aendern die PrtArea-SSize und die FrmSize.
- SwTwips Shrink( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
- SwTwips Grow ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ SwTwips Shrink( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
+ SwTwips Grow ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
//Wir brauchen unterschiedliche Methoden (wg. Performance) fuer das
//Einfuegenin den Layout Baum:
@@ -486,7 +486,7 @@ public:
//For internal use only; wer es anders macht wird
//in einen Sack gesteckt und muss zwei Tage drin hocken bleiben.
//Fuert Spezialbehandlung fuer _Get[Next|Prev]Leaf() durch (Tabellen).
- SwLayoutFrm *GetLeaf( MakePageType eMakePage, BOOL bFwd );
+ SwLayoutFrm *GetLeaf( MakePageType eMakePage, sal_Bool bFwd );
SwLayoutFrm *GetNextLeaf ( MakePageType eMakePage );
SwLayoutFrm *GetNextFtnLeaf( MakePageType eMakePage );
SwLayoutFrm *GetNextSctLeaf( MakePageType eMakePage );
@@ -495,10 +495,10 @@ public:
SwLayoutFrm *GetPrevFtnLeaf( MakePageType eMakeFtn = MAKEPAGE_FTN );
SwLayoutFrm *GetPrevSctLeaf( MakePageType eMakeFtn = MAKEPAGE_FTN );
SwLayoutFrm *GetPrevCellLeaf( MakePageType eMakeFtn = MAKEPAGE_FTN );
- const SwLayoutFrm *GetLeaf ( MakePageType eMakePage, BOOL bFwd,
+ const SwLayoutFrm *GetLeaf ( MakePageType eMakePage, sal_Bool bFwd,
const SwFrm *pAnch ) const;
- BOOL WrongPageDesc( SwPageFrm* pNew );
+ sal_Bool WrongPageDesc( SwPageFrm* pNew );
// --> OD 2004-07-02 #i28701# - new methods to append/remove drawing objects
void AppendDrawObj( SwAnchoredObject& _rNewObj );
@@ -517,37 +517,37 @@ public:
virtual void PaintBorder( const SwRect&, const SwPageFrm *pPage,
const SwBorderAttrs & ) const;
void PaintBaBo( const SwRect&, const SwPageFrm *pPage = 0,
- const BOOL bLowerBorder = FALSE ) const;
+ const sal_Bool bLowerBorder = sal_False ) const;
void PaintBackground( const SwRect&, const SwPageFrm *pPage,
const SwBorderAttrs &,
- const BOOL bLowerMode = FALSE,
- const BOOL bLowerBorder = FALSE ) const;
+ const sal_Bool bLowerMode = sal_False,
+ const sal_Bool bLowerBorder = sal_False ) const;
void PaintBorderLine( const SwRect&, const SwRect&, const SwPageFrm*,
const Color *pColor ) const;
//Retouche, nicht im Bereich des uebergebenen Rect!
void Retouche( const SwPageFrm *pPage, const SwRect &rRect ) const;
- BOOL GetBackgroundBrush( const SvxBrushItem*& rpBrush,
+ sal_Bool GetBackgroundBrush( const SvxBrushItem*& rpBrush,
const Color*& rpColor,
SwRect &rOrigRect,
- BOOL bLowerMode ) const;
+ sal_Bool bLowerMode ) const;
inline void SetCompletePaint() const;
inline void ResetCompletePaint() const;
- inline BOOL IsCompletePaint() const { return bCompletePaint; }
+ inline sal_Bool IsCompletePaint() const { return bCompletePaint; }
inline void SetRetouche() const;
inline void ResetRetouche() const;
- inline BOOL IsRetouche() const { return bRetouche; }
+ inline sal_Bool IsRetouche() const { return bRetouche; }
void SetInfFlags(); //Setzen der InfoFlags
- inline void InvalidateInfFlags() { bInfInvalid = TRUE; }
- inline BOOL IsInDocBody() const; //Benutzen die InfoFlags.
- inline BOOL IsInFtn() const; //ggf. werden die Flags ermittelt.
- inline BOOL IsInTab() const;
- inline BOOL IsInFly() const;
- inline BOOL IsInSct() const;
+ inline void InvalidateInfFlags() { bInfInvalid = sal_True; }
+ inline sal_Bool IsInDocBody() const; //Benutzen die InfoFlags.
+ inline sal_Bool IsInFtn() const; //ggf. werden die Flags ermittelt.
+ inline sal_Bool IsInTab() const;
+ inline sal_Bool IsInFly() const;
+ inline sal_Bool IsInSct() const;
// If frame is inside a split table row, this function returns
// the corresponding row frame in the follow table.
@@ -559,18 +559,18 @@ public:
bool IsInBalancedSection() const;
- inline BOOL IsReverse() const { return bReverse; }
- inline void SetReverse( BOOL bNew ){ bReverse = bNew ? 1 : 0; }
- inline BOOL IsVertical() const;
- inline BOOL GetVerticalFlag() const;
- inline void SetVertical( BOOL bNew ){ bVertical = bNew ? 1 : 0; }
- inline void SetDerivedVert( BOOL bNew ){ bDerivedVert = bNew ? 1 : 0; }
- inline void SetInvalidVert( BOOL bNew) { bInvalidVert = bNew ? 1 : 0; }
- inline BOOL IsRightToLeft() const;
- inline BOOL GetRightToLeftFlag() const;
- inline void SetRightToLeft( BOOL bNew ){ bRightToLeft = bNew ? 1 : 0; }
- inline void SetDerivedR2L( BOOL bNew ) { bDerivedR2L = bNew ? 1 : 0; }
- inline void SetInvalidR2L( BOOL bNew ) { bInvalidR2L = bNew ? 1 : 0; }
+ inline sal_Bool IsReverse() const { return bReverse; }
+ inline void SetReverse( sal_Bool bNew ){ bReverse = bNew ? 1 : 0; }
+ inline sal_Bool IsVertical() const;
+ inline sal_Bool GetVerticalFlag() const;
+ inline void SetVertical( sal_Bool bNew ){ bVertical = bNew ? 1 : 0; }
+ inline void SetDerivedVert( sal_Bool bNew ){ bDerivedVert = bNew ? 1 : 0; }
+ inline void SetInvalidVert( sal_Bool bNew) { bInvalidVert = bNew ? 1 : 0; }
+ inline sal_Bool IsRightToLeft() const;
+ inline sal_Bool GetRightToLeftFlag() const;
+ inline void SetRightToLeft( sal_Bool bNew ){ bRightToLeft = bNew ? 1 : 0; }
+ inline void SetDerivedR2L( sal_Bool bNew ) { bDerivedR2L = bNew ? 1 : 0; }
+ inline void SetInvalidR2L( sal_Bool bNew ) { bInvalidR2L = bNew ? 1 : 0; }
void CheckDirChange();
// returns upper left frame position for LTR and
// upper right frame position for Asian / RTL frames
@@ -579,7 +579,7 @@ public:
/** determine, if frame is moveable in given environment
OD 08.08.2003 #110978#
- method replaced 'old' method <BOOL IsMoveable() const>.
+ method replaced 'old' method <sal_Bool IsMoveable() const>.
Determines, if frame is moveable in given environment. if no environment
is given (parameter _pLayoutFrm == 0L), the movability in the actual
environment (<this->GetUpper()) is checked.
@@ -592,31 +592,31 @@ public:
@return boolean, indicating, if frame is moveable in given environment
*/
-// BOOL IsMoveable() const;
+// sal_Bool IsMoveable() const;
bool IsMoveable( const SwLayoutFrm* _pLayoutFrm = 0L ) const;
//Ist es fuer den (Txt)Frm in der aktuellen Umgebung erlaubt eine
//Fussnote einzufuegen (nicht z.B. in wiederholten TabellenHeadlines).
- BOOL IsFtnAllowed() const;
+ sal_Bool IsFtnAllowed() const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
- virtual void CheckDirection( BOOL bVert );
+ virtual void CheckDirection( sal_Bool bVert );
void ReinitializeFrmSizeAttrFlags();
const SwAttrSet *GetAttrSet() const;
- inline BOOL HasFixSize() const { return bFixSize; }
- inline void SetFixSize( BOOL bNew ) { bFixSize = bNew; }
+ inline sal_Bool HasFixSize() const { return bFixSize; }
+ inline void SetFixSize( sal_Bool bNew ) { bFixSize = bNew; }
//Kann 0 liefern, pruefen auch ob die Shell zum richtigen Dokument
//gehoert. Impl in frmsh.hxx
ViewShell *GetShell() const;
//Prueft alle Seiten ab der Uebergebenen und korrigiert ggf.
- static void CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields = TRUE );
+ static void CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields = sal_True );
//Koennen 0 liefern, einmal const einmal nicht
SwFrm *GetNext() { return pNext; }
@@ -625,7 +625,7 @@ public:
SwRootFrm *FindRootFrm();
SwPageFrm *FindPageFrm();
SwFrm *FindColFrm();
- SwFtnBossFrm *FindFtnBossFrm( BOOL bFootnotes = FALSE );
+ SwFtnBossFrm *FindFtnBossFrm( sal_Bool bFootnotes = sal_False );
SwTabFrm *ImplFindTabFrm();
SwFtnFrm *ImplFindFtnFrm();
SwFlyFrm *ImplFindFlyFrm();
@@ -646,7 +646,7 @@ public:
inline SwFrm *FindPrev();
inline const SwPageFrm *FindPageFrm() const;
inline const SwRootFrm *FindRootFrm() const;
- inline const SwFtnBossFrm *FindFtnBossFrm( BOOL bFtn = FALSE ) const;
+ inline const SwFtnBossFrm *FindFtnBossFrm( sal_Bool bFtn = sal_False ) const;
inline const SwFrm *FindColFrm() const;
inline const SwFrm *FindFooterOrHeader() const;
inline const SwTabFrm *FindTabFrm() const;
@@ -698,10 +698,10 @@ public:
{ return ( pNext || !IsInSct() ) ? pNext : _GetIndNext(); }
const SwFrm* GetIndNext() const { return ((SwFrm*)this)->GetIndNext(); }
- USHORT GetPhyPageNum() const; //Seitennummer ohne Offset
- USHORT GetVirtPageNum() const; //Seitenummer mit Offset
- BOOL OnRightPage() const { return 0 != GetPhyPageNum() % 2; };
- BOOL WannaRightPage() const;
+ sal_uInt16 GetPhyPageNum() const; //Seitennummer ohne Offset
+ sal_uInt16 GetVirtPageNum() const; //Seitenummer mit Offset
+ sal_Bool OnRightPage() const { return 0 != GetPhyPageNum() % 2; };
+ sal_Bool WannaRightPage() const;
inline const SwLayoutFrm *GetPrevLayoutLeaf() const;
@@ -722,7 +722,7 @@ public:
const SwRect PaintArea() const;
// The UnionFrm is the union of frm- and prt-area, normally identical
// to the frm-area except the case of negative prt-margins.
- const SwRect UnionFrm( BOOL bBorder = FALSE ) const;
+ const SwRect UnionFrm( sal_Bool bBorder = sal_False ) const;
//Der Zugriff auf die Member wird hier ausnahmsweiste gestattet,
//dies soll aber nicht dazu dienen die Werte wahllos zu veraendern;
@@ -736,13 +736,13 @@ public:
virtual void Cut() = 0;
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) = 0;
- void ValidateLineNum() { bValidLineNum = TRUE; }
+ void ValidateLineNum() { bValidLineNum = sal_True; }
- BOOL GetValidPosFlag() const { return bValidPos; }
- BOOL GetValidPrtAreaFlag()const { return bValidPrtArea; }
- BOOL GetValidSizeFlag() const { return bValidSize; }
- BOOL GetValidLineNumFlag()const { return bValidLineNum; }
- BOOL IsValid() const { return bValidPos && bValidSize && bValidPrtArea; }
+ sal_Bool GetValidPosFlag() const { return bValidPos; }
+ sal_Bool GetValidPrtAreaFlag()const { return bValidPrtArea; }
+ sal_Bool GetValidSizeFlag() const { return bValidSize; }
+ sal_Bool GetValidLineNumFlag()const { return bValidLineNum; }
+ sal_Bool IsValid() const { return bValidPos && bValidSize && bValidPrtArea; }
//Invalideren nur den Frm
// OD 2004-05-19 #i28701# - add call to method <_ActionOnInvalidation(..)>
@@ -755,7 +755,7 @@ public:
{
if ( bValidSize && _InvalidationAllowed( INVALID_SIZE ) )
{
- bValidSize = FALSE;
+ bValidSize = sal_False;
_ActionOnInvalidation( INVALID_SIZE );
}
}
@@ -763,7 +763,7 @@ public:
{
if ( bValidPrtArea && _InvalidationAllowed( INVALID_PRTAREA ) )
{
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
_ActionOnInvalidation( INVALID_PRTAREA );
}
}
@@ -771,7 +771,7 @@ public:
{
if ( bValidPos && _InvalidationAllowed( INVALID_POS ) )
{
- bValidPos = FALSE;
+ bValidPos = sal_False;
_ActionOnInvalidation( INVALID_POS );
}
}
@@ -779,7 +779,7 @@ public:
{
if ( bValidLineNum && _InvalidationAllowed( INVALID_LINENUM ) )
{
- bValidLineNum = FALSE;
+ bValidLineNum = sal_False;
_ActionOnInvalidation( INVALID_LINENUM );
}
}
@@ -788,7 +788,7 @@ public:
if ( ( bValidSize || bValidPrtArea || bValidPos ) &&
_InvalidationAllowed( INVALID_ALL ) )
{
- bValidSize = bValidPrtArea = bValidPos = FALSE;
+ bValidSize = bValidPrtArea = bValidPos = sal_False;
_ActionOnInvalidation( INVALID_ALL );
}
}
@@ -804,8 +804,8 @@ public:
void ImplInvalidatePos();
void ImplInvalidateLineNum();
- inline void InvalidateNextPos( BOOL bNoFtn = FALSE );
- void ImplInvalidateNextPos( BOOL bNoFtn = FALSE );
+ inline void InvalidateNextPos( sal_Bool bNoFtn = sal_False );
+ void ImplInvalidateNextPos( sal_Bool bNoFtn = sal_False );
/** method to invalidate printing area of next frame
@@ -819,9 +819,9 @@ public:
virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const;
- virtual BOOL GetCrsrOfst( SwPosition *, Point&,
+ virtual sal_Bool GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
- virtual BOOL GetCharRect( SwRect &, const SwPosition&,
+ virtual sal_Bool GetCharRect( SwRect &, const SwPosition&,
SwCrsrMoveState* = 0 ) const;
virtual void Paint( SwRect const&,
SwPrintData const*const pPrintData = NULL ) const;
@@ -830,43 +830,43 @@ public:
// Wer den void* falsch Casted ist selbst schuld!
// Auf jedenfall muss der void* auf 0 geprueft werden.
virtual void Prepare( const PrepareHint ePrep = PREP_CLEAR,
- const void *pVoid = 0, BOOL bNotify = TRUE );
-
- //TRUE wenn's die richtige Klasse ist, FALSE sonst
- inline BOOL IsLayoutFrm() const;
- inline BOOL IsRootFrm() const;
- inline BOOL IsPageFrm() const;
- inline BOOL IsColumnFrm() const;
- inline BOOL IsFtnBossFrm() const; // Fussnotenbosse sind PageFrms und ColumnFrms
- inline BOOL IsHeaderFrm() const;
- inline BOOL IsFooterFrm() const;
- inline BOOL IsFtnContFrm() const;
- inline BOOL IsFtnFrm() const;
- inline BOOL IsBodyFrm() const;
- inline BOOL IsColBodyFrm() const; // in layfrm.hxx implementiert, BodyFrm unterhalb ColumnFrm
- inline BOOL IsPageBodyFrm() const; // in layfrm.hxx implementiert, BodyFrm unterhalb PageFrm
- inline BOOL IsFlyFrm() const;
- inline BOOL IsSctFrm() const;
- inline BOOL IsTabFrm() const;
- inline BOOL IsRowFrm() const;
- inline BOOL IsCellFrm() const;
- inline BOOL IsCntntFrm() const;
- inline BOOL IsTxtFrm() const;
- inline BOOL IsNoTxtFrm() const;
- inline BOOL IsFlowFrm() const; //Frms deren PrtArea von den Nachbarn
+ const void *pVoid = 0, sal_Bool bNotify = sal_True );
+
+ //sal_True wenn's die richtige Klasse ist, sal_False sonst
+ inline sal_Bool IsLayoutFrm() const;
+ inline sal_Bool IsRootFrm() const;
+ inline sal_Bool IsPageFrm() const;
+ inline sal_Bool IsColumnFrm() const;
+ inline sal_Bool IsFtnBossFrm() const; // Fussnotenbosse sind PageFrms und ColumnFrms
+ inline sal_Bool IsHeaderFrm() const;
+ inline sal_Bool IsFooterFrm() const;
+ inline sal_Bool IsFtnContFrm() const;
+ inline sal_Bool IsFtnFrm() const;
+ inline sal_Bool IsBodyFrm() const;
+ inline sal_Bool IsColBodyFrm() const; // in layfrm.hxx implementiert, BodyFrm unterhalb ColumnFrm
+ inline sal_Bool IsPageBodyFrm() const; // in layfrm.hxx implementiert, BodyFrm unterhalb PageFrm
+ inline sal_Bool IsFlyFrm() const;
+ inline sal_Bool IsSctFrm() const;
+ inline sal_Bool IsTabFrm() const;
+ inline sal_Bool IsRowFrm() const;
+ inline sal_Bool IsCellFrm() const;
+ inline sal_Bool IsCntntFrm() const;
+ inline sal_Bool IsTxtFrm() const;
+ inline sal_Bool IsNoTxtFrm() const;
+ inline sal_Bool IsFlowFrm() const; //Frms deren PrtArea von den Nachbarn
//abhaengen und die halt im Inhaltsfluss
//stehen.
- inline BOOL IsRetoucheFrm() const; //Frms die Retouchefaehig sind bzw. die
+ inline sal_Bool IsRetoucheFrm() const; //Frms die Retouchefaehig sind bzw. die
//u.U. hinter sich Retouchieren muessen.
- inline BOOL IsAccessibleFrm() const;
+ inline sal_Bool IsAccessibleFrm() const;
void PrepareCrsr(); //Die CrsrShell darf.
//Ist der Frm (bzw. die Section in der er steht) geschuetzt?
//Auch Fly in Fly in ... und Fussnoten
- BOOL IsProtected() const;
+ sal_Bool IsProtected() const;
- BOOL IsColLocked() const { return bColLocked; }
+ sal_Bool IsColLocked() const { return bColLocked; }
virtual ~SwFrm();
@@ -887,16 +887,16 @@ public:
long GetPrtBottom() const;
long GetPrtRight() const;
long GetPrtTop() const;
- BOOL SetMinLeft( long );
- BOOL SetMaxBottom( long );
- BOOL SetMaxRight( long );
- BOOL SetMinTop( long );
- void MakeBelowPos( const SwFrm*, const SwFrm*, BOOL );
- void MakeUpperPos( const SwFrm*, const SwFrm*, BOOL );
- void MakeLeftPos( const SwFrm*, const SwFrm*, BOOL );
- void MakeRightPos( const SwFrm*, const SwFrm*, BOOL );
- inline BOOL IsNeighbourFrm() const
- { return GetType() & FRM_NEIGHBOUR ? TRUE : FALSE; }
+ sal_Bool SetMinLeft( long );
+ sal_Bool SetMaxBottom( long );
+ sal_Bool SetMaxRight( long );
+ sal_Bool SetMinTop( long );
+ void MakeBelowPos( const SwFrm*, const SwFrm*, sal_Bool );
+ void MakeUpperPos( const SwFrm*, const SwFrm*, sal_Bool );
+ void MakeLeftPos( const SwFrm*, const SwFrm*, sal_Bool );
+ void MakeRightPos( const SwFrm*, const SwFrm*, sal_Bool );
+ inline sal_Bool IsNeighbourFrm() const
+ { return GetType() & FRM_NEIGHBOUR ? sal_True : sal_False; }
// --> OD 2006-05-10 #i65250#
inline sal_uInt32 GetFrmId() const { return mnFrmId; }
@@ -911,76 +911,76 @@ public:
bool IsInCoveredCell() const;
// FME 2007-08-30 #i81146# new loop control
- void ValidateThisAndAllLowers( const USHORT nStage );
+ void ValidateThisAndAllLowers( const sal_uInt16 nStage );
};
-inline BOOL SwFrm::IsInDocBody() const
+inline sal_Bool SwFrm::IsInDocBody() const
{
if ( bInfInvalid )
((SwFrm*)this)->SetInfFlags();
return bInfBody;
}
-inline BOOL SwFrm::IsInFtn() const
+inline sal_Bool SwFrm::IsInFtn() const
{
if ( bInfInvalid )
((SwFrm*)this)->SetInfFlags();
return bInfFtn;
}
-inline BOOL SwFrm::IsInTab() const
+inline sal_Bool SwFrm::IsInTab() const
{
if ( bInfInvalid )
((SwFrm*)this)->SetInfFlags();
return bInfTab;
}
-inline BOOL SwFrm::IsInFly() const
+inline sal_Bool SwFrm::IsInFly() const
{
if ( bInfInvalid )
((SwFrm*)this)->SetInfFlags();
return bInfFly;
}
-inline BOOL SwFrm::IsInSct() const
+inline sal_Bool SwFrm::IsInSct() const
{
if ( bInfInvalid )
((SwFrm*)this)->SetInfFlags();
return bInfSct;
}
-BOOL SwFrm::IsVertical() const
+sal_Bool SwFrm::IsVertical() const
{
if( bInvalidVert )
- ((SwFrm*)this)->SetDirFlags( TRUE );
+ ((SwFrm*)this)->SetDirFlags( sal_True );
return bVertical != 0;
}
-BOOL SwFrm::GetVerticalFlag() const
+sal_Bool SwFrm::GetVerticalFlag() const
{
return bVertical != 0;
}
-inline BOOL SwFrm::IsRightToLeft() const
+inline sal_Bool SwFrm::IsRightToLeft() const
{
if( bInvalidR2L )
- ((SwFrm*)this)->SetDirFlags( FALSE );
+ ((SwFrm*)this)->SetDirFlags( sal_False );
return bRightToLeft != 0;
}
-BOOL SwFrm::GetRightToLeftFlag() const
+sal_Bool SwFrm::GetRightToLeftFlag() const
{
return bRightToLeft != 0;
}
inline void SwFrm::SetCompletePaint() const
{
- ((SwFrm*)this)->bCompletePaint = TRUE;
+ ((SwFrm*)this)->bCompletePaint = sal_True;
}
inline void SwFrm::ResetCompletePaint() const
{
- ((SwFrm*)this)->bCompletePaint = FALSE;
+ ((SwFrm*)this)->bCompletePaint = sal_False;
}
inline void SwFrm::SetRetouche() const
{
- ((SwFrm*)this)->bRetouche = TRUE;
+ ((SwFrm*)this)->bRetouche = sal_True;
}
inline void SwFrm::ResetRetouche() const
{
- ((SwFrm*)this)->bRetouche = FALSE;
+ ((SwFrm*)this)->bRetouche = sal_False;
}
inline SwLayoutFrm *SwFrm::GetNextLayoutLeaf()
@@ -1030,14 +1030,14 @@ inline void SwFrm::InvalidateAll()
{
if ( bValidPrtArea && bValidSize && bValidPos )
ImplInvalidatePos();
- bValidPrtArea = bValidSize = bValidPos = FALSE;
+ bValidPrtArea = bValidSize = bValidPos = sal_False;
// OD 2004-05-19 #i28701#
_ActionOnInvalidation( INVALID_ALL );
}
}
-inline void SwFrm::InvalidateNextPos( BOOL bNoFtn )
+inline void SwFrm::InvalidateNextPos( sal_Bool bNoFtn )
{
if ( pNext && !pNext->IsSctFrm() )
pNext->InvalidatePos();
@@ -1091,7 +1091,7 @@ inline SwTabFrm *SwFrm::FindTabFrm()
{
return IsInTab() ? ImplFindTabFrm() : 0;
}
-inline const SwFtnBossFrm *SwFrm::FindFtnBossFrm( BOOL bFtn ) const
+inline const SwFtnBossFrm *SwFrm::FindFtnBossFrm( sal_Bool bFtn ) const
{
return ((SwFrm*)this)->FindFtnBossFrm( bFtn );
}
@@ -1172,88 +1172,88 @@ inline const SwFrm *SwFrm::FindPrev() const
}
-inline BOOL SwFrm::IsLayoutFrm() const
+inline sal_Bool SwFrm::IsLayoutFrm() const
{
- return GetType() & FRM_LAYOUT ? TRUE : FALSE;
+ return GetType() & FRM_LAYOUT ? sal_True : sal_False;
}
-inline BOOL SwFrm::IsRootFrm() const
+inline sal_Bool SwFrm::IsRootFrm() const
{
return nType == FRMC_ROOT;
}
-inline BOOL SwFrm::IsPageFrm() const
+inline sal_Bool SwFrm::IsPageFrm() const
{
return nType == FRMC_PAGE;
}
-inline BOOL SwFrm::IsColumnFrm() const
+inline sal_Bool SwFrm::IsColumnFrm() const
{
return nType == FRMC_COLUMN;
}
-inline BOOL SwFrm::IsFtnBossFrm() const
+inline sal_Bool SwFrm::IsFtnBossFrm() const
{
- return GetType() & FRM_FTNBOSS ? TRUE : FALSE;
+ return GetType() & FRM_FTNBOSS ? sal_True : sal_False;
}
-inline BOOL SwFrm::IsHeaderFrm() const
+inline sal_Bool SwFrm::IsHeaderFrm() const
{
return nType == FRMC_HEADER;
}
-inline BOOL SwFrm::IsFooterFrm() const
+inline sal_Bool SwFrm::IsFooterFrm() const
{
return nType == FRMC_FOOTER;
}
-inline BOOL SwFrm::IsFtnContFrm() const
+inline sal_Bool SwFrm::IsFtnContFrm() const
{
return nType == FRMC_FTNCONT;
}
-inline BOOL SwFrm::IsFtnFrm() const
+inline sal_Bool SwFrm::IsFtnFrm() const
{
return nType == FRMC_FTN;
}
-inline BOOL SwFrm::IsBodyFrm() const
+inline sal_Bool SwFrm::IsBodyFrm() const
{
return nType == FRMC_BODY;
}
-inline BOOL SwFrm::IsFlyFrm() const
+inline sal_Bool SwFrm::IsFlyFrm() const
{
return nType == FRMC_FLY;
}
-inline BOOL SwFrm::IsSctFrm() const
+inline sal_Bool SwFrm::IsSctFrm() const
{
return nType == FRMC_SECTION;
}
-inline BOOL SwFrm::IsTabFrm() const
+inline sal_Bool SwFrm::IsTabFrm() const
{
return nType == FRMC_TAB;
}
-inline BOOL SwFrm::IsRowFrm() const
+inline sal_Bool SwFrm::IsRowFrm() const
{
return nType == FRMC_ROW;
}
-inline BOOL SwFrm::IsCellFrm() const
+inline sal_Bool SwFrm::IsCellFrm() const
{
return nType == FRMC_CELL;
}
-inline BOOL SwFrm::IsCntntFrm() const
+inline sal_Bool SwFrm::IsCntntFrm() const
{
- return GetType() & FRM_CNTNT ? TRUE : FALSE;
+ return GetType() & FRM_CNTNT ? sal_True : sal_False;
}
-inline BOOL SwFrm::IsTxtFrm() const
+inline sal_Bool SwFrm::IsTxtFrm() const
{
return nType == FRMC_TXT;
}
-inline BOOL SwFrm::IsNoTxtFrm() const
+inline sal_Bool SwFrm::IsNoTxtFrm() const
{
return nType == FRMC_NOTXT;
}
-inline BOOL SwFrm::IsFlowFrm() const
+inline sal_Bool SwFrm::IsFlowFrm() const
{
- return GetType() & 0xCA00 ? TRUE : FALSE; //TabFrm, CntntFrm, SectionFrm
+ return GetType() & 0xCA00 ? sal_True : sal_False; //TabFrm, CntntFrm, SectionFrm
}
-inline BOOL SwFrm::IsRetoucheFrm() const
+inline sal_Bool SwFrm::IsRetoucheFrm() const
{
- return GetType() & 0xCA40 ? TRUE : FALSE; //TabFrm, CntntFrm, SectionFrm, Ftnfrm
+ return GetType() & 0xCA40 ? sal_True : sal_False; //TabFrm, CntntFrm, SectionFrm, Ftnfrm
}
-inline BOOL SwFrm::IsAccessibleFrm() const
+inline sal_Bool SwFrm::IsAccessibleFrm() const
{
- return GetType() & FRM_ACCESSIBLE ? TRUE : FALSE;
+ return GetType() & FRM_ACCESSIBLE ? sal_True : sal_False;
}
#endif
diff --git a/sw/source/core/inc/frminf.hxx b/sw/source/core/inc/frminf.hxx
index a39490a9b663..347592a8c5f4 100644
--- a/sw/source/core/inc/frminf.hxx
+++ b/sw/source/core/inc/frminf.hxx
@@ -49,22 +49,22 @@ public:
inline SwTxtFrmInfo( const SwTxtFrm *pTxtFrm ) : pFrm(pTxtFrm) { }
// Passt der Absatz in eine Zeile?
- BOOL IsOneLine() const;
+ sal_Bool IsOneLine() const;
// Ist die Zeile zu X% gefuellt?
- BOOL IsFilled( const BYTE nPercent ) const;
+ sal_Bool IsFilled( const sal_uInt8 nPercent ) const;
// Wo beginnt der Text (ohne whitespaces)? (rel. im Frame !!)
SwTwips GetLineStart() const;
//returne die mittel Position des n. Charakters
- SwTwips GetCharPos( xub_StrLen nChar, BOOL bCenter = TRUE ) const;
+ SwTwips GetCharPos( xub_StrLen nChar, sal_Bool bCenter = sal_True ) const;
// Sammelt die whitespaces am Zeilenbeginn und -ende im Pam
- void GetSpaces( SwPaM &rPam, BOOL bWithLineBreak ) const;
+ void GetSpaces( SwPaM &rPam, sal_Bool bWithLineBreak ) const;
// Ist an der ersten Textposition ein Bullet/Symbol etc?
- BOOL IsBullet( xub_StrLen nTxtPos ) const;
+ sal_Bool IsBullet( xub_StrLen nTxtPos ) const;
// Ermittelt Erstzeileneinzug
SwTwips GetFirstIndent() const;
@@ -75,7 +75,7 @@ public:
{ pFrm = pNew; return *this; }
// liegt eine Gegenueberstellung vor? (returnt Pos im Frame)
- USHORT GetBigIndent( xub_StrLen& rFndPos,
+ sal_uInt16 GetBigIndent( xub_StrLen& rFndPos,
const SwTxtFrm *pNextFrm = 0 ) const;
};
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 94befc1dca59..473e30549c66 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -67,7 +67,7 @@ struct SwFindRowSpanCacheObj;
// OD 05.08.2002 #99657# - add 6th parameter to indicate that method should
// consider background transparency, saved in the color of the brush item
void MA_FASTCALL DrawGraphic( const SvxBrushItem *, OutputDevice *,
- const SwRect &rOrg, const SwRect &rOut, const BYTE nGrfNum = GRFNUM_NO,
+ const SwRect &rOrg, const SwRect &rOut, const sal_uInt8 nGrfNum = GRFNUM_NO,
const sal_Bool bConsiderBackgroundTransparency = sal_False );
// OD 24.01.2003 #106593# - method to align rectangle
@@ -84,14 +84,14 @@ void SwAlignGrfRect( SwRect *pGrfRect, const OutputDevice &rOut );
SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, ViewShell *pSh );
//Nicht gleich die math.lib anziehen.
-ULONG MA_FASTCALL SqRt( BigInt nX );
+sal_uLong MA_FASTCALL SqRt( BigInt nX );
SwFrm *SaveCntnt( SwLayoutFrm *pLay, SwFrm *pStart );
void RestoreCntnt( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bGrow );
//CntntNodes besorgen, CntntFrms erzeugen und in den LayFrm haengen.
-void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, ULONG nIndex,
- BOOL bPages = FALSE, ULONG nEndIndex = 0,
+void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, sal_uLong nIndex,
+ sal_Bool bPages = sal_False, sal_uLong nEndIndex = 0,
SwFrm *pPrv = 0 );
//Erzeugen der Frames fuer einen bestimmten Bereich, verwendet _InsertCnt
@@ -99,10 +99,10 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
const SwNodeIndex &rEndIdx );
//Um z.B. fuer Tabelleheadlines das Erzeugen der Flys in _InsertCnt zu unterbinden.
-extern BOOL bDontCreateObjects;
+extern sal_Bool bDontCreateObjects;
//Fuer FlyCnts, siehe SwFlyAtCntFrm::MakeAll()
-extern BOOL bSetCompletePaintOnInvalidate;
+extern sal_Bool bSetCompletePaintOnInvalidate;
//Fuer Tabelleneinstellung per Tastatur.
long MA_FASTCALL CalcRowRstHeight( SwLayoutFrm *pRow );
@@ -110,7 +110,7 @@ long MA_FASTCALL CalcHeightWidthFlys( const SwFrm *pFrm ); //MA_FLY_HEIGHT
//Neue Seite einsetzen
SwPageFrm * MA_FASTCALL InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper,
- BOOL bOdd, BOOL bInsertEmpty, BOOL bFtn,
+ sal_Bool bOdd, sal_Bool bInsertEmpty, sal_Bool bFtn,
SwFrm *pSibling );
//Flys bei der Seite anmelden.
@@ -124,26 +124,26 @@ void Notify_Background( const SdrObject* pObj,
SwPageFrm* pPage,
const SwRect& rRect,
const PrepareHint eHint,
- const BOOL bInva );
+ const sal_Bool bInva );
const SwFrm* GetVirtualUpper( const SwFrm* pFrm, const Point& rPos );
-BOOL Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj );
+sal_Bool Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj );
-const SwFrm *FindKontext( const SwFrm *pFrm, USHORT nAdditionalKontextTyp );
+const SwFrm *FindKontext( const SwFrm *pFrm, sal_uInt16 nAdditionalKontextTyp );
-BOOL IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm );
+sal_Bool IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm );
const SwFrm * MA_FASTCALL FindPage( const SwRect &rRect, const SwFrm *pPage );
// JP 07.05.98: wird von SwCntntNode::GetFrm und von SwFlyFrm::GetFrm
// gerufen
-SwFrm* GetFrmOfModify( SwModify const&, USHORT const nFrmType, const Point* = 0,
+SwFrm* GetFrmOfModify( SwModify const&, sal_uInt16 const nFrmType, const Point* = 0,
const SwPosition *pPos = 0,
- const BOOL bCalcFrm = FALSE );
+ const sal_Bool bCalcFrm = sal_False );
//Sollen ExtraDaten (Reline-Strich, Zeilennummern) gepaintet werden?
-BOOL IsExtraData( const SwDoc *pDoc );
+sal_Bool IsExtraData( const SwDoc *pDoc );
// OD 14.03.2003 #i11760# - method declaration <CalcCntnt(..)>
void CalcCntnt( SwLayoutFrm *pLay,
@@ -162,9 +162,9 @@ protected:
const SwRect aPrt;
SwTwips mnFlyAnchorOfst;
SwTwips mnFlyAnchorOfstNoWrap;
- BOOL bHadFollow;
- BOOL bInvaKeep;
- BOOL bValidSize;
+ sal_Bool bHadFollow;
+ sal_Bool bInvaKeep;
+ sal_Bool bValidSize;
protected:
// --> OD 2005-07-29 #i49383#
bool mbFrmDeleted;
@@ -176,7 +176,7 @@ public:
const SwRect &Frm() const { return aFrm; }
const SwRect &Prt() const { return aPrt; }
- void SetInvaKeep() { bInvaKeep = TRUE; }
+ void SetInvaKeep() { bInvaKeep = sal_True; }
// --> OD 2005-07-29 #i49383#
void FrmDeleted()
{
@@ -187,15 +187,15 @@ public:
class SwLayNotify : public SwFrmNotify
{
- BOOL bLowersComplete;
+ sal_Bool bLowersComplete;
SwLayoutFrm *GetLay() { return (SwLayoutFrm*)pFrm; }
public:
SwLayNotify( SwLayoutFrm *pLayFrm );
~SwLayNotify();
- void SetLowersComplete( BOOL b ) { bLowersComplete = b; }
- BOOL IsLowersComplete() { return bLowersComplete; }
+ void SetLowersComplete( sal_Bool b ) { bLowersComplete = b; }
+ sal_Bool IsLowersComplete() { return bLowersComplete; }
};
class SwFlyNotify : public SwLayNotify
@@ -259,36 +259,36 @@ class SwBorderAttrs : public SwCacheObj
const SvxShadowItem &rShadow;
const Size aFrmSize; //Die FrmSize
- BOOL bBorderDist :1; //Ist's ein Frm der auch ohne Linie
+ sal_Bool bBorderDist :1; //Ist's ein Frm der auch ohne Linie
//einen Abstand haben kann?
//Mit den Folgenden Bools werden die gecache'ten Werte fuer UNgueltig
//erklaert - bis sie einmal berechnet wurden.
- BOOL bTopLine :1;
- BOOL bBottomLine :1;
- BOOL bLeftLine :1;
- BOOL bRightLine :1;
- BOOL bTop :1;
- BOOL bBottom :1;
- BOOL bLine :1;
-
- BOOL bIsLine :1; //Umrandung an mind. einer Kante?
-
- BOOL bCacheGetLine :1; //GetTopLine(), GetBottomLine() cachen?
- BOOL bCachedGetTopLine :1; //GetTopLine() gecached?
- BOOL bCachedGetBottomLine :1; //GetBottomLine() gecached?
+ sal_Bool bTopLine :1;
+ sal_Bool bBottomLine :1;
+ sal_Bool bLeftLine :1;
+ sal_Bool bRightLine :1;
+ sal_Bool bTop :1;
+ sal_Bool bBottom :1;
+ sal_Bool bLine :1;
+
+ sal_Bool bIsLine :1; //Umrandung an mind. einer Kante?
+
+ sal_Bool bCacheGetLine :1; //GetTopLine(), GetBottomLine() cachen?
+ sal_Bool bCachedGetTopLine :1; //GetTopLine() gecached?
+ sal_Bool bCachedGetBottomLine :1; //GetBottomLine() gecached?
// OD 21.05.2003 #108789# - booleans indicating, if values <bJoinedWithPrev>
// and <bJoinedWithNext> are cached and valid.
// Caching depends on value of <bCacheGetLine>.
- mutable BOOL bCachedJoinedWithPrev :1;
- mutable BOOL bCachedJoinedWithNext :1;
+ mutable sal_Bool bCachedJoinedWithPrev :1;
+ mutable sal_Bool bCachedJoinedWithNext :1;
// OD 21.05.2003 #108789# - booleans indicating, if borders are joined
// with previous/next frame.
- BOOL bJoinedWithPrev :1;
- BOOL bJoinedWithNext :1;
+ sal_Bool bJoinedWithPrev :1;
+ sal_Bool bJoinedWithNext :1;
//Die gecache'ten Werte, undefiniert bis sie einmal berechnet wurden.
- USHORT nTopLine,
+ sal_uInt16 nTopLine,
nBottomLine,
nLeftLine,
nRightLine,
@@ -327,12 +327,12 @@ class SwBorderAttrs : public SwCacheObj
// OD 21.05.2003 #108789# - internal helper method for methods
// <_CalcJoinedWithPrev> and <_CalcJoinedWithNext>.
- BOOL _JoinWithCmp( const SwFrm& _rCallerFrm,
+ sal_Bool _JoinWithCmp( const SwFrm& _rCallerFrm,
const SwFrm& _rCmpFrm ) const;
//Rechte und linke Linie sowie LRSpace gleich?
// OD 21.05.2003 #108789# - change name of 1st parameter - "rAttrs" -> "rCmpAttrs".
- BOOL CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
+ sal_Bool CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
const SwFrm *pCaller,
const SwFrm *pCmp ) const;
@@ -348,37 +348,37 @@ public:
inline const SvxBoxItem &GetBox() const { return rBox; }
inline const SvxShadowItem &GetShadow() const { return rShadow; }
- inline USHORT CalcTopLine() const;
- inline USHORT CalcBottomLine() const;
- inline USHORT CalcLeftLine() const;
- inline USHORT CalcRightLine() const;
- inline USHORT CalcTop() const;
- inline USHORT CalcBottom() const;
+ inline sal_uInt16 CalcTopLine() const;
+ inline sal_uInt16 CalcBottomLine() const;
+ inline sal_uInt16 CalcLeftLine() const;
+ inline sal_uInt16 CalcRightLine() const;
+ inline sal_uInt16 CalcTop() const;
+ inline sal_uInt16 CalcBottom() const;
long CalcLeft( const SwFrm *pCaller ) const;
long CalcRight( const SwFrm *pCaller ) const;
- inline BOOL IsLine() const;
+ inline sal_Bool IsLine() const;
inline const Size &GetSize() const { return aFrmSize; }
- inline BOOL IsBorderDist() const { return bBorderDist; }
+ inline sal_Bool IsBorderDist() const { return bBorderDist; }
//Sollen obere bzw. untere Umrandung fuer den Frm ausgewertet werden?
// OD 2004-02-26 #i25029# - add optional 2nd parameter <_pPrevFrm>
// If set, its value is taken for testing, if borders/shadow have to joined
// with previous frame.
- inline USHORT GetTopLine ( const SwFrm& _rFrm,
+ inline sal_uInt16 GetTopLine ( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm = 0L ) const;
- inline USHORT GetBottomLine( const SwFrm& _rFrm ) const;
- inline void SetGetCacheLine( BOOL bNew ) const;
+ inline sal_uInt16 GetBottomLine( const SwFrm& _rFrm ) const;
+ inline void SetGetCacheLine( sal_Bool bNew ) const;
// OD 21.05.2003 #108789# - accessors for cached values <bJoinedWithPrev>
// and <bJoinedWithPrev>
// OD 2004-02-26 #i25029# - add optional 2nd parameter <_pPrevFrm>
// If set, its value is taken for testing, if borders/shadow have to joined
// with previous frame.
- BOOL JoinedWithPrev( const SwFrm& _rFrm,
+ sal_Bool JoinedWithPrev( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm = 0L ) const;
- BOOL JoinedWithNext( const SwFrm& _rFrm ) const;
+ sal_Bool JoinedWithNext( const SwFrm& _rFrm ) const;
};
class SwBorderAttrAccess : public SwCacheAccess
@@ -402,9 +402,9 @@ class SwOrderIter
{
const SwPageFrm *pPage;
const SdrObject *pCurrent;
- const BOOL bFlysOnly;
+ const sal_Bool bFlysOnly;
public:
- SwOrderIter( const SwPageFrm *pPage, BOOL bFlysOnly = TRUE );
+ SwOrderIter( const SwPageFrm *pPage, sal_Bool bFlysOnly = sal_True );
void Current( const SdrObject *pNew ) { pCurrent = pNew; }
const SdrObject *Current() const { return pCurrent; }
@@ -418,22 +418,22 @@ public:
class StackHack
{
- static BYTE nCnt;
- static BOOL bLocked;
+ static sal_uInt8 nCnt;
+ static sal_Bool bLocked;
public:
StackHack()
{
if ( ++StackHack::nCnt > 50 )
- StackHack::bLocked = TRUE;
+ StackHack::bLocked = sal_True;
}
~StackHack()
{
if ( --StackHack::nCnt < 5 )
- StackHack::bLocked = FALSE;
+ StackHack::bLocked = sal_False;
}
- static BOOL IsLocked() { return StackHack::bLocked; }
- static BYTE Count() { return StackHack::nCnt; }
+ static sal_Bool IsLocked() { return StackHack::bLocked; }
+ static sal_uInt8 Count() { return StackHack::nCnt; }
};
@@ -441,7 +441,7 @@ public:
// OD 2004-02-26 #i25029# - add optional 2nd parameter <_pPrevFrm>
// If set, its value is taken for testing, if borders/shadow have to joined
// with previous frame.
-inline USHORT SwBorderAttrs::GetTopLine ( const SwFrm& _rFrm,
+inline sal_uInt16 SwBorderAttrs::GetTopLine ( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm ) const
{
if ( !bCachedGetTopLine || _pPrevFrm )
@@ -450,60 +450,60 @@ inline USHORT SwBorderAttrs::GetTopLine ( const SwFrm& _rFrm,
}
return nGetTopLine;
}
-inline USHORT SwBorderAttrs::GetBottomLine( const SwFrm& _rFrm ) const
+inline sal_uInt16 SwBorderAttrs::GetBottomLine( const SwFrm& _rFrm ) const
{
if ( !bCachedGetBottomLine )
const_cast<SwBorderAttrs*>(this)->_GetBottomLine( _rFrm );
return nGetBottomLine;
}
-inline void SwBorderAttrs::SetGetCacheLine( BOOL bNew ) const
+inline void SwBorderAttrs::SetGetCacheLine( sal_Bool bNew ) const
{
((SwBorderAttrs*)this)->bCacheGetLine = bNew;
((SwBorderAttrs*)this)->bCachedGetBottomLine =
- ((SwBorderAttrs*)this)->bCachedGetTopLine = FALSE;
+ ((SwBorderAttrs*)this)->bCachedGetTopLine = sal_False;
// OD 21.05.2003 #108789# - invalidate cache for values <bJoinedWithPrev>
// and <bJoinedWithNext>.
- bCachedJoinedWithPrev = FALSE;
- bCachedJoinedWithNext = FALSE;
+ bCachedJoinedWithPrev = sal_False;
+ bCachedJoinedWithNext = sal_False;
}
-inline USHORT SwBorderAttrs::CalcTopLine() const
+inline sal_uInt16 SwBorderAttrs::CalcTopLine() const
{
if ( bTopLine )
((SwBorderAttrs*)this)->_CalcTopLine();
return nTopLine;
}
-inline USHORT SwBorderAttrs::CalcBottomLine() const
+inline sal_uInt16 SwBorderAttrs::CalcBottomLine() const
{
if ( bBottomLine )
((SwBorderAttrs*)this)->_CalcBottomLine();
return nBottomLine;
}
-inline USHORT SwBorderAttrs::CalcLeftLine() const
+inline sal_uInt16 SwBorderAttrs::CalcLeftLine() const
{
if ( bLeftLine )
((SwBorderAttrs*)this)->_CalcLeftLine();
return nLeftLine;
}
-inline USHORT SwBorderAttrs::CalcRightLine() const
+inline sal_uInt16 SwBorderAttrs::CalcRightLine() const
{
if ( bRightLine )
((SwBorderAttrs*)this)->_CalcRightLine();
return nRightLine;
}
-inline USHORT SwBorderAttrs::CalcTop() const
+inline sal_uInt16 SwBorderAttrs::CalcTop() const
{
if ( bTop )
((SwBorderAttrs*)this)->_CalcTop();
return nTop;
}
-inline USHORT SwBorderAttrs::CalcBottom() const
+inline sal_uInt16 SwBorderAttrs::CalcBottom() const
{
if ( bBottom )
((SwBorderAttrs*)this)->_CalcBottom();
return nBottom;
}
-inline BOOL SwBorderAttrs::IsLine() const
+inline sal_Bool SwBorderAttrs::IsLine() const
{
if ( bLine )
((SwBorderAttrs*)this)->_IsLine();
diff --git a/sw/source/core/inc/ftnboss.hxx b/sw/source/core/inc/ftnboss.hxx
index 8b9ea8348395..6c13fa75bff3 100644
--- a/sw/source/core/inc/ftnboss.hxx
+++ b/sw/source/core/inc/ftnboss.hxx
@@ -64,7 +64,7 @@ class SwFtnBossFrm: public SwLayoutFrm
SwFtnContFrm *MakeFtnCont();
SwFtnFrm *FindFirstFtn();
- BYTE _NeighbourhoodAdjustment( const SwFrm* pFrm ) const;
+ sal_uInt8 _NeighbourhoodAdjustment( const SwFrm* pFrm ) const;
protected:
void InsertFtn( SwFtnFrm * );
@@ -78,16 +78,16 @@ public:
//Fussnotenschnittstelle
void AppendFtn( SwCntntFrm *, SwTxtFtn * );
- void RemoveFtn( const SwCntntFrm *, const SwTxtFtn *, BOOL bPrep = TRUE );
+ void RemoveFtn( const SwCntntFrm *, const SwTxtFtn *, sal_Bool bPrep = sal_True );
static SwFtnFrm *FindFtn( const SwCntntFrm *, const SwTxtFtn * );
SwFtnContFrm *FindFtnCont();
inline const SwFtnContFrm *FindFtnCont() const;
const SwFtnFrm *FindFirstFtn( SwCntntFrm* ) const;
- SwFtnContFrm *FindNearestFtnCont( BOOL bDontLeave = FALSE );
+ SwFtnContFrm *FindNearestFtnCont( sal_Bool bDontLeave = sal_False );
void ChangeFtnRef( const SwCntntFrm *pOld, const SwTxtFtn *,
SwCntntFrm *pNew );
- void RearrangeFtns( const SwTwips nDeadLine, const BOOL bLock = FALSE,
+ void RearrangeFtns( const SwTwips nDeadLine, const sal_Bool bLock = sal_False,
const SwTxtFtn *pAttr = 0 );
//SS damit der Textformatierer Temporaer die Fussnotenhoehe begrenzen
@@ -117,11 +117,11 @@ public:
SwFtnBossFrm* _pOld,
SvPtrarr& _rFtnArr,
const sal_Bool _bCollectOnlyPreviousFtns = sal_False );
- void _MoveFtns( SvPtrarr &rFtnArr, BOOL bCalc = FALSE );
+ void _MoveFtns( SvPtrarr &rFtnArr, sal_Bool bCalc = sal_False );
void MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest,
SwTxtFtn *pAttr );
// Sollte AdjustNeighbourhood gerufen werden (oder Grow/Shrink)?
- BYTE NeighbourhoodAdjustment( const SwFrm* pFrm ) const
+ sal_uInt8 NeighbourhoodAdjustment( const SwFrm* pFrm ) const
{ return IsPageFrm() ? NA_ONLY_ADJUST : _NeighbourhoodAdjustment( pFrm ); }
};
diff --git a/sw/source/core/inc/ftnfrm.hxx b/sw/source/core/inc/ftnfrm.hxx
index f8db9fabdf2d..afd97b4ce6e7 100644
--- a/sw/source/core/inc/ftnfrm.hxx
+++ b/sw/source/core/inc/ftnfrm.hxx
@@ -47,8 +47,8 @@ public:
const SwFtnFrm* FindFootNote() const;
- virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
virtual void PaintBorder( const SwRect &, const SwPageFrm *pPage,
const SwBorderAttrs & ) const;
@@ -66,15 +66,15 @@ class SwFtnFrm: public SwLayoutFrm
SwCntntFrm *pRef; //In diesem CntntFrm steht die Fussnotenref.
SwTxtFtn *pAttr; //Fussnotenattribut (zum wiedererkennen)
- BOOL bBackMoveLocked : 1; //Absaetze in dieser Fussnote duerfen derzeit
+ sal_Bool bBackMoveLocked : 1; //Absaetze in dieser Fussnote duerfen derzeit
//nicht rueckwaerts fliessen.
// --> OD 2005-05-18 #i49383# - control unlock of position of lower anchored objects.
bool mbUnlockPosOfLowerObjs : 1;
// <--
#ifdef DBG_UTIL
protected:
- virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
#endif
@@ -84,7 +84,7 @@ public:
virtual void Cut();
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
- BOOL operator<( const SwTxtFtn* pTxtFtn ) const;
+ sal_Bool operator<( const SwTxtFtn* pTxtFtn ) const;
#ifndef DBG_UTIL
const SwCntntFrm *GetRef() const { return pRef; }
@@ -113,13 +113,13 @@ public:
void InvalidateNxtFtnCnts( SwPageFrm* pPage );
- void LockBackMove() { bBackMoveLocked = TRUE; }
- void UnlockBackMove() { bBackMoveLocked = FALSE;}
- BOOL IsBackMoveLocked() { return bBackMoveLocked; }
+ void LockBackMove() { bBackMoveLocked = sal_True; }
+ void UnlockBackMove() { bBackMoveLocked = sal_False;}
+ sal_Bool IsBackMoveLocked() { return bBackMoveLocked; }
// Verhindert, dass der letzte Inhalt den SwFtnFrm mitloescht (Cut())
- inline void ColLock() { bColLocked = TRUE; }
- inline void ColUnlock() { bColLocked = FALSE; }
+ inline void ColLock() { bColLocked = sal_True; }
+ inline void ColUnlock() { bColLocked = sal_False; }
// --> OD 2005-05-18 #i49383#
inline void UnlockPosOfLowerObjs()
diff --git a/sw/source/core/inc/hffrm.hxx b/sw/source/core/inc/hffrm.hxx
index ff25552abc27..425719e62afa 100644
--- a/sw/source/core/inc/hffrm.hxx
+++ b/sw/source/core/inc/hffrm.hxx
@@ -37,14 +37,14 @@ class SwHeadFootFrm : public SwLayoutFrm
protected:
void FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs);
void FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs);
- inline BOOL GetEatSpacing() const; // in hffrm.cxx
+ inline sal_Bool GetEatSpacing() const; // in hffrm.cxx
public:
- SwHeadFootFrm(SwFrmFmt * pFrm, USHORT aType);
+ SwHeadFootFrm(SwFrmFmt * pFrm, sal_uInt16 aType);
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
virtual SwTwips GrowFrm( SwTwips,
- BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
virtual SwTwips ShrinkFrm( SwTwips,
- BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
};
class SwHeaderFrm: public SwHeadFootFrm
diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx
index 2186ccac0d2d..749d5d424fe3 100644
--- a/sw/source/core/inc/layact.hxx
+++ b/sw/source/core/inc/layact.hxx
@@ -71,36 +71,36 @@ class SwLayAction
//Wenn ein Absatz - oder was auch immer - bei der Formatierung mehr
//als eine Seite rueckwaerts floss traegt er seine neue Seitennummer
//hier ein. Die Steuerung der InternalAction kann dann geeignet reagieren.
- USHORT nPreInvaPage;
+ sal_uInt16 nPreInvaPage;
- ULONG nStartTicks; //Startzeitpunkt der Aktion, vergeht zu viel Zeit kann
+ sal_uLong nStartTicks; //Startzeitpunkt der Aktion, vergeht zu viel Zeit kann
//der WaitCrsr per CheckWaitCrsr() eingeschaltet werden.
- USHORT nInputType; //Bei welchem Input soll die Verarbeitung abgebrochen
+ sal_uInt16 nInputType; //Bei welchem Input soll die Verarbeitung abgebrochen
//werden?
- USHORT nEndPage; //StatBar Steuerung.
- USHORT nCheckPageNum; //CheckPageDesc() wurde verzoegert wenn != USHRT_MAX
+ sal_uInt16 nEndPage; //StatBar Steuerung.
+ sal_uInt16 nCheckPageNum; //CheckPageDesc() wurde verzoegert wenn != USHRT_MAX
//ab dieser Seite Checken.
- BOOL bPaint; //Painten oder nur Formatieren?
- BOOL bComplete; //Alles bis zum sichtbaren Bereich Formatieren oder
+ sal_Bool bPaint; //Painten oder nur Formatieren?
+ sal_Bool bComplete; //Alles bis zum sichtbaren Bereich Formatieren oder
//oder nur den sichtbaren Bereich?
- BOOL bCalcLayout; //Vollstaendige Reformatierung?
- BOOL bAgain; //Zur automatisch wiederholten Action wenn Seiten
+ sal_Bool bCalcLayout; //Vollstaendige Reformatierung?
+ sal_Bool bAgain; //Zur automatisch wiederholten Action wenn Seiten
//geloscht werden.
- BOOL bNextCycle; //Wiederaufsetzen bei der ersten Ungueltigen Seite.
- BOOL bInput; //Zum Abbrechen der Verarbeitung wenn ein Input anliegt.
- BOOL bIdle; //True wenn die Layaction vom Idler ausgeloest wurde.
- BOOL bReschedule; //Soll das Reschedule - abhaengig vom Progress -
+ sal_Bool bNextCycle; //Wiederaufsetzen bei der ersten Ungueltigen Seite.
+ sal_Bool bInput; //Zum Abbrechen der Verarbeitung wenn ein Input anliegt.
+ sal_Bool bIdle; //True wenn die Layaction vom Idler ausgeloest wurde.
+ sal_Bool bReschedule; //Soll das Reschedule - abhaengig vom Progress -
//gerufen werden?
- BOOL bCheckPages; //CheckPageDescs() ausfuehren oder verzoegern.
- BOOL bUpdateExpFlds;//Wird gesetzt wenn nach dem Formatierien noch eine
+ sal_Bool bCheckPages; //CheckPageDescs() ausfuehren oder verzoegern.
+ sal_Bool bUpdateExpFlds;//Wird gesetzt wenn nach dem Formatierien noch eine
//Runde fuer den ExpFld laufen muss.
- BOOL bBrowseActionStop; //Action fruehzeitig beenden (per bInput) und den
+ sal_Bool bBrowseActionStop; //Action fruehzeitig beenden (per bInput) und den
//Rest dem Idler ueberlassen.
- BOOL bWaitAllowed; //Wartecursor erlaubt?
- BOOL bPaintExtraData; //Anzeige von Zeilennumerierung o. ae. eingeschaltet?
- BOOL bActionInProgress; // wird in Action() anfangs gesetzt und zum Schluss geloescht
+ sal_Bool bWaitAllowed; //Wartecursor erlaubt?
+ sal_Bool bPaintExtraData; //Anzeige von Zeilennumerierung o. ae. eingeschaltet?
+ sal_Bool bActionInProgress; // wird in Action() anfangs gesetzt und zum Schluss geloescht
// OD 14.04.2003 #106346# - new flag for content formatting on interrupt.
sal_Bool mbFormatCntntOnInterrupt;
@@ -109,28 +109,28 @@ class SwLayAction
void PaintCntnt( const SwCntntFrm *, const SwPageFrm *,
const SwRect &rOldRect, long nOldBottom );
- BOOL PaintWithoutFlys( const SwRect &, const SwCntntFrm *,
+ sal_Bool PaintWithoutFlys( const SwRect &, const SwCntntFrm *,
const SwPageFrm * );
- inline BOOL _PaintCntnt( const SwCntntFrm *, const SwPageFrm *,
+ inline sal_Bool _PaintCntnt( const SwCntntFrm *, const SwPageFrm *,
const SwRect & );
- BOOL FormatLayout( SwLayoutFrm *, BOOL bAddRect = TRUE );
- BOOL FormatLayoutTab( SwTabFrm *, BOOL bAddRect = TRUE );
- BOOL FormatCntnt( const SwPageFrm* pPage );
+ sal_Bool FormatLayout( SwLayoutFrm *, sal_Bool bAddRect = sal_True );
+ sal_Bool FormatLayoutTab( SwTabFrm *, sal_Bool bAddRect = sal_True );
+ sal_Bool FormatCntnt( const SwPageFrm* pPage );
void _FormatCntnt( const SwCntntFrm* pCntnt,
const SwPageFrm* pPage );
- BOOL IsShortCut( SwPageFrm *& );
+ sal_Bool IsShortCut( SwPageFrm *& );
- BOOL TurboAction();
- BOOL _TurboAction( const SwCntntFrm * );
+ sal_Bool TurboAction();
+ sal_Bool _TurboAction( const SwCntntFrm * );
void InternalAction();
SwPageFrm *CheckFirstVisPage( SwPageFrm *pPage );
- BOOL RemoveEmptyBrowserPages();
+ sal_Bool RemoveEmptyBrowserPages();
inline void CheckIdleEnd();
- inline ULONG GetStartTicks() { return nStartTicks; }
+ inline sal_uLong GetStartTicks() { return nStartTicks; }
#endif
@@ -139,63 +139,63 @@ public:
~SwLayAction();
#ifdef _LAYACT_CXX
- void SetIdle ( BOOL bNew ) { bIdle = bNew; }
- void SetCheckPages ( BOOL bNew ) { bCheckPages = bNew; }
- void SetBrowseActionStop(BOOL bNew ) { bBrowseActionStop = bNew; }
- void SetNextCycle ( BOOL bNew ) { bNextCycle = bNew; }
-
- BOOL IsWaitAllowed() const { return bWaitAllowed; }
- BOOL IsNextCycle() const { return bNextCycle; }
- BOOL IsInput() const { return bInput; }
- BOOL IsWait() const { return 0 != pWait; }
- BOOL IsPaint() const { return bPaint; }
- BOOL IsIdle() const { return bIdle; }
- BOOL IsReschedule() const { return bReschedule; }
- BOOL IsPaintExtraData() const { return bPaintExtraData;}
- BOOL IsStopPrt() const;
- BOOL IsInterrupt() const { return IsInput() || IsStopPrt(); }
-
- USHORT GetInputType() const { return nInputType; }
+ void SetIdle ( sal_Bool bNew ) { bIdle = bNew; }
+ void SetCheckPages ( sal_Bool bNew ) { bCheckPages = bNew; }
+ void SetBrowseActionStop(sal_Bool bNew ) { bBrowseActionStop = bNew; }
+ void SetNextCycle ( sal_Bool bNew ) { bNextCycle = bNew; }
+
+ sal_Bool IsWaitAllowed() const { return bWaitAllowed; }
+ sal_Bool IsNextCycle() const { return bNextCycle; }
+ sal_Bool IsInput() const { return bInput; }
+ sal_Bool IsWait() const { return 0 != pWait; }
+ sal_Bool IsPaint() const { return bPaint; }
+ sal_Bool IsIdle() const { return bIdle; }
+ sal_Bool IsReschedule() const { return bReschedule; }
+ sal_Bool IsPaintExtraData() const { return bPaintExtraData;}
+ sal_Bool IsStopPrt() const;
+ sal_Bool IsInterrupt() const { return IsInput() || IsStopPrt(); }
+
+ sal_uInt16 GetInputType() const { return nInputType; }
#endif
//Einstellen der Action auf das gewuenschte Verhalten.
- void SetPaint ( BOOL bNew ) { bPaint = bNew; }
- void SetComplete ( BOOL bNew ) { bComplete = bNew; }
- void SetStatBar ( BOOL bNew );
- void SetInputType ( USHORT nNew ) { nInputType = nNew; }
- void SetCalcLayout ( BOOL bNew ) { bCalcLayout = bNew; }
- void SetReschedule ( BOOL bNew ) { bReschedule = bNew; }
- void SetWaitAllowed ( BOOL bNew ) { bWaitAllowed = bNew; }
-
- void SetAgain() { bAgain = TRUE; }
- void SetUpdateExpFlds() {bUpdateExpFlds = TRUE; }
+ void SetPaint ( sal_Bool bNew ) { bPaint = bNew; }
+ void SetComplete ( sal_Bool bNew ) { bComplete = bNew; }
+ void SetStatBar ( sal_Bool bNew );
+ void SetInputType ( sal_uInt16 nNew ) { nInputType = nNew; }
+ void SetCalcLayout ( sal_Bool bNew ) { bCalcLayout = bNew; }
+ void SetReschedule ( sal_Bool bNew ) { bReschedule = bNew; }
+ void SetWaitAllowed ( sal_Bool bNew ) { bWaitAllowed = bNew; }
+
+ void SetAgain() { bAgain = sal_True; }
+ void SetUpdateExpFlds() {bUpdateExpFlds = sal_True; }
void SetProgress(SfxProgress * _pProgress = NULL)
{ pProgress = _pProgress; }
- inline void SetCheckPageNum( USHORT nNew );
- inline void SetCheckPageNumDirect( USHORT nNew ) { nCheckPageNum = nNew; }
+ inline void SetCheckPageNum( sal_uInt16 nNew );
+ inline void SetCheckPageNumDirect( sal_uInt16 nNew ) { nCheckPageNum = nNew; }
void Action(); //Jetzt gehts loos...
void Reset(); //Zurueck auf CTor-Defaults.
- BOOL IsAgain() const { return bAgain; }
- BOOL IsComplete() const { return bComplete; }
- BOOL IsExpFlds() const { return bUpdateExpFlds; }
- BOOL IsCalcLayout() const { return bCalcLayout; }
- BOOL IsCheckPages() const { return bCheckPages; }
- BOOL IsBrowseActionStop() const { return bBrowseActionStop; }
- BOOL IsActionInProgress() const { return bActionInProgress; }
+ sal_Bool IsAgain() const { return bAgain; }
+ sal_Bool IsComplete() const { return bComplete; }
+ sal_Bool IsExpFlds() const { return bUpdateExpFlds; }
+ sal_Bool IsCalcLayout() const { return bCalcLayout; }
+ sal_Bool IsCheckPages() const { return bCheckPages; }
+ sal_Bool IsBrowseActionStop() const { return bBrowseActionStop; }
+ sal_Bool IsActionInProgress() const { return bActionInProgress; }
- USHORT GetCheckPageNum() const { return nCheckPageNum; }
+ sal_uInt16 GetCheckPageNum() const { return nCheckPageNum; }
//Auch andere sollen den Wartecrsr einschalten koennen.
void CheckWaitCrsr();
// --> OD 2004-06-09 #i28701# - method is now public;
// delete 2nd parameter, because its not used;
- BOOL FormatLayoutFly( SwFlyFrm * );
+ sal_Bool FormatLayoutFly( SwFlyFrm * );
// --> OD 2004-06-09 #i28701# - method is now public
- BOOL _FormatFlyCntnt( const SwFlyFrm * );
+ sal_Bool _FormatFlyCntnt( const SwFlyFrm * );
};
@@ -206,11 +206,11 @@ class SwLayIdle
SwViewImp *pImp; // Hier Meldet sich der Idler an und ab.
SwCntntNode *pCntntNode; // Hier wird die aktuelle Cursorposition
xub_StrLen nTxtPos; // zwischengespeichert.
- BOOL bPageValid; // Konnte die Seite alles validiert werden?
- BOOL bAllValid; // Konnte alles validiert werden?
+ sal_Bool bPageValid; // Konnte die Seite alles validiert werden?
+ sal_Bool bAllValid; // Konnte alles validiert werden?
#ifdef DBG_UTIL
- BOOL bIndicator;
+ sal_Bool bIndicator;
#endif
#ifdef _LAYACT_CXX
@@ -220,8 +220,8 @@ class SwLayIdle
#endif
enum IdleJobType{ ONLINE_SPELLING, AUTOCOMPLETE_WORDS, WORD_COUNT, SMART_TAGS }; // SMARTTAGS
- BOOL _DoIdleJob( const SwCntntFrm*, IdleJobType );
- BOOL DoIdleJob( IdleJobType, BOOL bVisAreaOnly );
+ sal_Bool _DoIdleJob( const SwCntntFrm*, IdleJobType );
+ sal_Bool DoIdleJob( IdleJobType, sal_Bool bVisAreaOnly );
#endif
@@ -230,7 +230,7 @@ public:
~SwLayIdle();
};
-inline void SwLayAction::SetCheckPageNum( USHORT nNew )
+inline void SwLayAction::SetCheckPageNum( sal_uInt16 nNew )
{
if ( nNew < nCheckPageNum )
nCheckPageNum = nNew;
diff --git a/sw/source/core/inc/laycache.hxx b/sw/source/core/inc/laycache.hxx
index 2376a5fbb480..0f14067d0bda 100644
--- a/sw/source/core/inc/laycache.hxx
+++ b/sw/source/core/inc/laycache.hxx
@@ -51,7 +51,7 @@ class SvStream;
class SwLayoutCache
{
SwLayCacheImpl *pImpl;
- USHORT nLockCount;
+ sal_uInt16 nLockCount;
public:
SwLayoutCache() : pImpl( NULL ), nLockCount( 0 ) {}
~SwLayoutCache();
@@ -61,7 +61,7 @@ public:
void ClearImpl();
sal_Bool IsLocked() const { return nLockCount > 0; }
- USHORT& GetLockCount() { return nLockCount; }
+ sal_uInt16& GetLockCount() { return nLockCount; }
SwLayCacheImpl *LockImpl()
{ if( nLockCount & 0x8000 ) return NULL;
if ( pImpl )
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index f1366dd0a11b..3f437e083a7c 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -60,10 +60,10 @@ protected:
SwFrm *pLower;
- virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
- long CalcRel( const SwFmtFrmSize &rSz, BOOL bWidth ) const;
+ long CalcRel( const SwFmtFrmSize &rSz, sal_Bool bWidth ) const;
public:
// --> OD 2004-06-29 #i28701#
@@ -76,10 +76,10 @@ public:
//Proportionale Groessenanpassung der untergeordneten.
void ChgLowersProp( const Size& rOldSize );
- void AdjustColumns( const SwFmtCol *pCol, BOOL bAdjustAttributes );
+ void AdjustColumns( const SwFmtCol *pCol, sal_Bool bAdjustAttributes );
void ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
- const BOOL bChgFtn = FALSE );
+ const sal_Bool bChgFtn = sal_False );
//Painted die Column-Trennlinien fuer die innenliegenden Columns.
@@ -88,7 +88,7 @@ public:
virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const;
- virtual BOOL GetCrsrOfst( SwPosition *, Point&,
+ virtual sal_Bool GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
virtual void Cut();
@@ -96,11 +96,11 @@ public:
//sucht den dichtesten Cntnt zum SPoint, wird bei Seiten, Flys und Cells
//benutzt wenn GetCrsrOfst versagt hat.
- const SwCntntFrm* GetCntntPos( Point &rPoint, const BOOL bDontLeave,
- const BOOL bBodyOnly = FALSE,
- const BOOL bCalc = FALSE,
+ const SwCntntFrm* GetCntntPos( Point &rPoint, const sal_Bool bDontLeave,
+ const sal_Bool bBodyOnly = sal_False,
+ const sal_Bool bCalc = sal_False,
const SwCrsrMoveState *pCMS = 0,
- const BOOL bDefaultExpand = TRUE ) const;
+ const sal_Bool bDefaultExpand = sal_True ) const;
SwLayoutFrm( SwFrmFmt* );
~SwLayoutFrm();
@@ -122,17 +122,17 @@ public:
const SwFrm *ContainsAny( const bool _bInvestigateFtnForSections = false ) const;
inline SwFrm *ContainsAny( const bool _bInvestigateFtnForSections = false );
// <--
- BOOL IsAnLower( const SwFrm * ) const;
+ sal_Bool IsAnLower( const SwFrm * ) const;
virtual const SwFrmFmt *GetFmt() const;
virtual SwFrmFmt *GetFmt();
void SetFrmFmt( SwFrmFmt* );
//Verschieben der Ftns aller Lower - ab dem StartCntnt.
- //TRUE wenn mindestens eine Ftn verschoben wurde.
+ //sal_True wenn mindestens eine Ftn verschoben wurde.
//Ruft das Update der Seitennummer wenn bFtnNums gesetzt ist.
- BOOL MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
- SwFtnBossFrm *pNewBoss, const BOOL bFtnNums );
+ sal_Bool MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
+ SwFtnBossFrm *pNewBoss, const sal_Bool bFtnNums );
// --> OD 2004-07-01 #i28701# - change purpose of method and its name
// --> OD 2005-03-11 #i44016# - add parameter <_bUnlockPosOfObjs> to
@@ -192,12 +192,12 @@ inline SwFrm* SwLayoutFrm::ContainsAny( const bool _bInvestigateFtnForSections )
// <--
// Diese SwFrm-inlines sind hier, damit frame.hxx nicht layfrm.hxx includen muss
-inline BOOL SwFrm::IsColBodyFrm() const
+inline sal_Bool SwFrm::IsColBodyFrm() const
{
return nType == FRMC_BODY && GetUpper()->IsColumnFrm();
}
-inline BOOL SwFrm::IsPageBodyFrm() const
+inline sal_Bool SwFrm::IsPageBodyFrm() const
{
return nType == FRMC_BODY && GetUpper()->IsPageFrm();
}
diff --git a/sw/source/core/inc/layouter.hxx b/sw/source/core/inc/layouter.hxx
index 4429e716578f..db506d302642 100644
--- a/sw/source/core/inc/layouter.hxx
+++ b/sw/source/core/inc/layouter.hxx
@@ -66,7 +66,7 @@ class SwLayouter
SwEndnoter* pEndnoter;
SwLooping* pLooping;
void _CollectEndnotes( SwSectionFrm* pSect );
- BOOL StartLooping( SwPageFrm* pPage );
+ sal_Bool StartLooping( SwPageFrm* pPage );
// --> OD 2004-06-23 #i28701#
SwMovedFwdFrmsByObjPos* mpMovedFwdFrms;
@@ -126,15 +126,15 @@ public:
~SwLayouter();
void InsertEndnotes( SwSectionFrm* pSect );
void CollectEndnote( SwFtnFrm* pFtn );
- BOOL HasEndnotes() const;
+ sal_Bool HasEndnotes() const;
- void LoopControl( SwPageFrm* pPage, BYTE nLoop );
+ void LoopControl( SwPageFrm* pPage, sal_uInt8 nLoop );
void EndLoopControl();
void LoopingLouieLight( const SwDoc& rDoc, const SwTxtFrm& rFrm );
static void CollectEndnotes( SwDoc* pDoc, SwSectionFrm* pSect );
- static BOOL Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFtnFrm* pFtn );
- static BOOL StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage );
+ static sal_Bool Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFtnFrm* pFtn );
+ static sal_Bool StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage );
// --> OD 2004-06-23 #i28701#
static void ClearMovedFwdFrms( const SwDoc& _rDoc );
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index 67434e14928a..9269606f2031 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -74,8 +74,8 @@ namespace sw { namespace mark
bool m_bSavePos;
bool m_bSaveOtherPos;
IDocumentMarkAccess::MarkType m_eOrigBkmType;
- ULONG m_nNode1;
- ULONG m_nNode2;
+ sal_uLong m_nNode1;
+ sal_uLong m_nNode2;
xub_StrLen m_nCntnt1;
xub_StrLen m_nCntnt2;
::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndo;
@@ -90,11 +90,11 @@ void _DelBookmarks(const SwNodeIndex& rStt,
::std::vector< ::sw::mark::SaveBookmark> * SaveBkmk =0,
const SwIndex* pSttIdx =0,
const SwIndex* pEndIdx =0);
-void _SaveCntntIdx( SwDoc* pDoc, ULONG nNode, xub_StrLen nCntnt,
- SvULongs& rSaveArr, BYTE nSaveFly = 0 );
+void _SaveCntntIdx( SwDoc* pDoc, sal_uLong nNode, xub_StrLen nCntnt,
+ SvULongs& rSaveArr, sal_uInt8 nSaveFly = 0 );
void _RestoreCntntIdx( SwDoc* pDoc, SvULongs& rSaveArr,
- ULONG nNode, xub_StrLen nOffset = 0,
- BOOL bAuto = FALSE );
+ sal_uLong nNode, xub_StrLen nOffset = 0,
+ sal_Bool bAuto = sal_False );
void _RestoreCntntIdx( SvULongs& rSaveArr, const SwNode& rNd,
xub_StrLen nLen, xub_StrLen nCorrLen );
@@ -103,11 +103,11 @@ void _RestoreCntntIdx( SvULongs& rSaveArr, const SwNode& rNd,
* location. */
struct _SaveFly
{
- ULONG nNdDiff; /// relative node difference
+ sal_uLong nNdDiff; /// relative node difference
SwFrmFmt* pFrmFmt; /// the fly's frame format
sal_Bool bInsertPosition; /// if true, anchor _at_ insert position
- _SaveFly( ULONG nNodeDiff, SwFrmFmt* pFmt, sal_Bool bInsert )
+ _SaveFly( sal_uLong nNodeDiff, SwFrmFmt* pFmt, sal_Bool bInsert )
: nNdDiff( nNodeDiff ), pFrmFmt( pFmt ), bInsertPosition( bInsert )
{ }
};
@@ -129,16 +129,16 @@ class SwDataChanged
const SwPaM* pPam;
const SwPosition* pPos;
SwDoc* pDoc;
- ULONG nNode;
+ sal_uLong nNode;
xub_StrLen nCntnt;
- USHORT nType; // Insert/Move/Delete/... (UndoIds)
+ sal_uInt16 nType; // Insert/Move/Delete/... (UndoIds)
public:
- SwDataChanged( const SwPaM& rPam, USHORT nType );
- SwDataChanged( SwDoc* pDoc, const SwPosition& rPos, USHORT nType );
+ SwDataChanged( const SwPaM& rPam, sal_uInt16 nType );
+ SwDataChanged( SwDoc* pDoc, const SwPosition& rPos, sal_uInt16 nType );
~SwDataChanged();
- ULONG GetNode() const { return nNode; }
+ sal_uLong GetNode() const { return nNode; }
xub_StrLen GetCntnt() const { return nCntnt; }
};
@@ -164,18 +164,18 @@ class _ZSortFly
{
const SwFrmFmt* pFmt;
const SwFmtAnchor* pAnchor;
- UINT32 nOrdNum;
+ sal_uInt32 nOrdNum;
public:
_ZSortFly( const SwFrmFmt* pFrmFmt, const SwFmtAnchor* pFlyAnchor,
- UINT32 nArrOrdNum );
+ sal_uInt32 nArrOrdNum );
_ZSortFly& operator=( const _ZSortFly& rCpy )
{
pFmt = rCpy.pFmt, pAnchor = rCpy.pAnchor, nOrdNum = rCpy.nOrdNum;
return *this;
}
- int operator==( const _ZSortFly& ) const { return FALSE; }
+ int operator==( const _ZSortFly& ) const { return sal_False; }
int operator<( const _ZSortFly& rCmp ) const
{ return nOrdNum < rCmp.nOrdNum; }
diff --git a/sw/source/core/inc/node2lay.hxx b/sw/source/core/inc/node2lay.hxx
index 6743458f91dc..c70a084c1b85 100644
--- a/sw/source/core/inc/node2lay.hxx
+++ b/sw/source/core/inc/node2lay.hxx
@@ -67,15 +67,15 @@ public:
SwNode2Layout( const SwNode& rNd );
// Dieser Ctor ist fuer das Einfuegen vor oder hinter rNd gedacht,
// nIdx ist der Index des einzufuegenden Nodes
- SwNode2Layout( const SwNode& rNd, ULONG nIdx );
+ SwNode2Layout( const SwNode& rNd, sal_uLong nIdx );
~SwNode2Layout();
SwFrm* NextFrm();
SwLayoutFrm* UpperFrm( SwFrm* &rpFrm, const SwNode& rNode );
- void RestoreUpperFrms( SwNodes& rNds, ULONG nStt, ULONG nEnd );
+ void RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd );
SwFrm *GetFrm( const Point* pDocPos = 0,
const SwPosition *pPos = 0,
- const BOOL bCalcFrm = TRUE ) const;
+ const sal_Bool bCalcFrm = sal_True ) const;
};
#endif
diff --git a/sw/source/core/inc/noteurl.hxx b/sw/source/core/inc/noteurl.hxx
index bf23966d1a3d..647e46511991 100644
--- a/sw/source/core/inc/noteurl.hxx
+++ b/sw/source/core/inc/noteurl.hxx
@@ -48,7 +48,7 @@ public:
const String& GetURL() const { return aURL; }
const String& GetTarget() const { return aTarget; }
const SwRect& GetRect() const { return aRect; }
- BOOL operator==( const SwURLNote& rSwURLNote ) const
+ sal_Bool operator==( const SwURLNote& rSwURLNote ) const
{ return aRect == rSwURLNote.aRect; }
};
@@ -60,10 +60,10 @@ class SwNoteURL
SwURLNoteList aList;
public:
SwNoteURL() {}
- USHORT Count() const { return aList.Count(); }
+ sal_uInt16 Count() const { return aList.Count(); }
void InsertURLNote( const String& rURL, const String& rTarget,
const SwRect& rRect );
- const SwURLNote& GetURLNote( USHORT nPos ) const
+ const SwURLNote& GetURLNote( sal_uInt16 nPos ) const
{ return *aList.GetObject( nPos ); }
void FillImageMap( ImageMap* pMap, const Point& rPos, const MapMode& rMap );
};
diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx
index d5fae730fd61..97ebb7d72400 100644
--- a/sw/source/core/inc/notxtfrm.hxx
+++ b/sw/source/core/inc/notxtfrm.hxx
@@ -58,21 +58,21 @@ public:
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual void Paint( SwRect const&,
SwPrintData const*const pPrintData = NULL ) const;
- virtual BOOL GetCharRect( SwRect &, const SwPosition&,
+ virtual sal_Bool GetCharRect( SwRect &, const SwPosition&,
SwCrsrMoveState* = 0) const;
- BOOL GetCrsrOfst(SwPosition* pPos, Point& aPoint,
+ sal_Bool GetCrsrOfst(SwPosition* pPos, Point& aPoint,
SwCrsrMoveState* = 0) const;
const Size &GetGrfSize() const { return GetSize(); }
- void GetGrfArea( SwRect &rRect, SwRect * = 0, BOOL bMirror = TRUE ) const;
+ void GetGrfArea( SwRect &rRect, SwRect * = 0, sal_Bool bMirror = sal_True ) const;
- BOOL IsTransparent() const;
+ sal_Bool IsTransparent() const;
void StopAnimation( OutputDevice* = 0 ) const;
- BOOL HasAnimation() const;
+ sal_Bool HasAnimation() const;
// Routinen fuer den Grafik-Cache
- USHORT GetWeight() { return nWeight; }
+ sal_uInt16 GetWeight() { return nWeight; }
};
#endif
diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx
index bc2fef9b8be4..994701980a3f 100644
--- a/sw/source/core/inc/pagefrm.hxx
+++ b/sw/source/core/inc/pagefrm.hxx
@@ -68,21 +68,21 @@ class SwPageFrm: public SwFtnBossFrm
SwPageDesc *pDesc; //PageDesc der die Seite beschreibt.
- USHORT nPhyPageNum; //Physikalische Seitennummer.
-
- BOOL bInvalidCntnt :1;
- BOOL bInvalidLayout :1;
- BOOL bInvalidFlyCntnt :1;
- BOOL bInvalidFlyLayout :1;
- BOOL bInvalidFlyInCnt :1;
- BOOL bFtnPage :1; //Diese Seite ist fuer Dokumentende-Fussnoten.
- BOOL bEmptyPage :1; //Dies ist eine explizite Leerseite
- BOOL bEndNotePage :1; //'Fussnotenseite' fuer Endnoten
- BOOL bInvalidSpelling :1; //Das Online-Spelling ist gefordert
- BOOL bInvalidSmartTags :1; //checking for smarttags is needed // SMARTTAGS
- BOOL bInvalidAutoCmplWrds :1; //Auto-Complete Wordliste aktualisieren
- BOOL bInvalidWordCount :1;
- BOOL bHasGrid :1; // Grid for Asian layout
+ sal_uInt16 nPhyPageNum; //Physikalische Seitennummer.
+
+ sal_Bool bInvalidCntnt :1;
+ sal_Bool bInvalidLayout :1;
+ sal_Bool bInvalidFlyCntnt :1;
+ sal_Bool bInvalidFlyLayout :1;
+ sal_Bool bInvalidFlyInCnt :1;
+ sal_Bool bFtnPage :1; //Diese Seite ist fuer Dokumentende-Fussnoten.
+ sal_Bool bEmptyPage :1; //Dies ist eine explizite Leerseite
+ sal_Bool bEndNotePage :1; //'Fussnotenseite' fuer Endnoten
+ sal_Bool bInvalidSpelling :1; //Das Online-Spelling ist gefordert
+ sal_Bool bInvalidSmartTags :1; //checking for smarttags is needed // SMARTTAGS
+ sal_Bool bInvalidAutoCmplWrds :1; //Auto-Complete Wordliste aktualisieren
+ sal_Bool bInvalidWordCount :1;
+ sal_Bool bHasGrid :1; // Grid for Asian layout
// OD 2004-05-17 #i28701# - boolean, indicating that layout of page frame
// is in progress.
@@ -92,7 +92,7 @@ class SwPageFrm: public SwFtnBossFrm
static const sal_Int8 mnBorderPxWidth;
static const sal_Int8 mnShadowPxWidth;
- void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, BYTE &,
+ void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, sal_uInt8 &,
SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
// Anpassen der max. Fussnotenhoehen in den einzelnen Spalten
@@ -228,13 +228,13 @@ public:
//Spezialisiertes GetCntntPos() fuer Felder in Rahmen.
void GetCntntPosition( const Point &rPt, SwPosition &rPos ) const;
- BOOL IsEmptyPage() const { return bEmptyPage; } //explizite Leerseite.
+ sal_Bool IsEmptyPage() const { return bEmptyPage; } //explizite Leerseite.
void UpdateFtnNum();
//Immer nach dem Paste rufen. Erzeugt die Seitengeb. Rahmen und Formatiert
//generischen Inhalt.
- void PreparePage( BOOL bFtn );
+ void PreparePage( sal_Bool bFtn );
//Schickt an alle ContentFrames ein Prepare wg. geaenderter Registervorlage
void PrepareRegisterChg();
@@ -249,18 +249,18 @@ public:
void PlaceFly( SwFlyFrm* pFly, SwFlyFrmFmt* pFmt );
// <--
- virtual BOOL GetCrsrOfst( SwPosition *, Point&,
+ virtual sal_Bool GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
// erfrage vom Client Informationen
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
virtual void Cut();
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
- virtual void CheckDirection( BOOL bVert );
- void CheckGrid( BOOL bInvalidate );
+ virtual void CheckDirection( sal_Bool bVert );
+ void CheckGrid( sal_Bool bInvalidate );
void PaintGrid( OutputDevice* pOut, SwRect &rRect ) const;
- BOOL HasGrid() const { return bHasGrid; }
+ sal_Bool HasGrid() const { return bHasGrid; }
//Zeilennummern usw malen
void RefreshExtraData( const SwRect & ) const;
@@ -269,13 +269,13 @@ public:
void RefreshSubsidiary( const SwRect& ) const;
//Fussnotenschnittstelle
- BOOL IsFtnPage() const { return bFtnPage; }
- BOOL IsEndNotePage() const { return bEndNotePage; }
- void SetFtnPage( BOOL b ) { bFtnPage = b; }
- void SetEndNotePage( BOOL b ) { bEndNotePage = b; }
+ sal_Bool IsFtnPage() const { return bFtnPage; }
+ sal_Bool IsEndNotePage() const { return bEndNotePage; }
+ void SetFtnPage( sal_Bool b ) { bFtnPage = b; }
+ void SetEndNotePage( sal_Bool b ) { bEndNotePage = b; }
- inline USHORT GetPhyPageNum() const { return nPhyPageNum;}
- inline void SetPhyPageNum( USHORT nNum ) { nPhyPageNum = nNum;}
+ inline sal_uInt16 GetPhyPageNum() const { return nPhyPageNum;}
+ inline void SetPhyPageNum( sal_uInt16 nNum ) { nPhyPageNum = nNum;}
inline void DecrPhyPageNum() { --nPhyPageNum; }
inline void IncrPhyPageNum() { ++nPhyPageNum; }
@@ -299,17 +299,17 @@ public:
inline void ValidateSmartTags() const; // SMARTTAGS
inline void ValidateAutoCompleteWords() const;
inline void ValidateWordCount() const;
- inline BOOL IsInvalid() const;
- inline BOOL IsInvalidFly() const;
- BOOL IsInvalidFlyLayout() const { return bInvalidFlyLayout; }
- BOOL IsInvalidFlyCntnt() const { return bInvalidFlyCntnt; }
- BOOL IsInvalidFlyInCnt() const { return bInvalidFlyInCnt; }
- BOOL IsInvalidLayout() const { return bInvalidLayout; }
- BOOL IsInvalidCntnt() const { return (bInvalidCntnt || bInvalidFlyInCnt); }
- BOOL IsInvalidSpelling() const { return bInvalidSpelling; }
- BOOL IsInvalidSmartTags() const { return bInvalidSmartTags; } // SMARTTAGS
- BOOL IsInvalidAutoCompleteWords() const { return bInvalidAutoCmplWrds; }
- BOOL IsInvalidWordCount() const { return bInvalidWordCount; }
+ inline sal_Bool IsInvalid() const;
+ inline sal_Bool IsInvalidFly() const;
+ sal_Bool IsInvalidFlyLayout() const { return bInvalidFlyLayout; }
+ sal_Bool IsInvalidFlyCntnt() const { return bInvalidFlyCntnt; }
+ sal_Bool IsInvalidFlyInCnt() const { return bInvalidFlyInCnt; }
+ sal_Bool IsInvalidLayout() const { return bInvalidLayout; }
+ sal_Bool IsInvalidCntnt() const { return (bInvalidCntnt || bInvalidFlyInCnt); }
+ sal_Bool IsInvalidSpelling() const { return bInvalidSpelling; }
+ sal_Bool IsInvalidSmartTags() const { return bInvalidSmartTags; } // SMARTTAGS
+ sal_Bool IsInvalidAutoCompleteWords() const { return bInvalidAutoCmplWrds; }
+ sal_Bool IsInvalidWordCount() const { return bInvalidWordCount; }
/** SwPageFrm::GetDrawBackgrdColor - for #102450#
@@ -387,7 +387,7 @@ public:
SwRect& _orBorderAndShadowBoundRect,
const bool bRightSidebar );
- static void PaintNotesSidebar(const SwRect& _rPageRect, ViewShell* _pViewShell, USHORT nPageNum, bool bRight);
+ static void PaintNotesSidebar(const SwRect& _rPageRect, ViewShell* _pViewShell, sal_uInt16 nPageNum, bool bRight);
static void PaintNotesSidebarArrows(const Point &aMiddleFirst, const Point &aMiddleSecond, ViewShell* _pViewShell, const Color aColorUp, const Color aColorDown);
/**
mod #6i193#
@@ -447,84 +447,84 @@ inline const SwCntntFrm *SwPageFrm::FindLastBodyCntnt() const
}
inline void SwPageFrm::InvalidateFlyLayout() const
{
- ((SwPageFrm*)this)->bInvalidFlyLayout = TRUE;
+ ((SwPageFrm*)this)->bInvalidFlyLayout = sal_True;
}
inline void SwPageFrm::InvalidateFlyCntnt() const
{
- ((SwPageFrm*)this)->bInvalidFlyCntnt = TRUE;
+ ((SwPageFrm*)this)->bInvalidFlyCntnt = sal_True;
}
inline void SwPageFrm::InvalidateFlyInCnt() const
{
- ((SwPageFrm*)this)->bInvalidFlyInCnt = TRUE;
+ ((SwPageFrm*)this)->bInvalidFlyInCnt = sal_True;
}
inline void SwPageFrm::InvalidateLayout() const
{
- ((SwPageFrm*)this)->bInvalidLayout = TRUE;
+ ((SwPageFrm*)this)->bInvalidLayout = sal_True;
}
inline void SwPageFrm::InvalidateCntnt() const
{
- ((SwPageFrm*)this)->bInvalidCntnt = TRUE;
+ ((SwPageFrm*)this)->bInvalidCntnt = sal_True;
}
inline void SwPageFrm::InvalidateSpelling() const
{
- ((SwPageFrm*)this)->bInvalidSpelling = TRUE;
+ ((SwPageFrm*)this)->bInvalidSpelling = sal_True;
}
// SMARTTAGS
inline void SwPageFrm::InvalidateSmartTags() const
{
- ((SwPageFrm*)this)->bInvalidSmartTags = TRUE;
+ ((SwPageFrm*)this)->bInvalidSmartTags = sal_True;
}
inline void SwPageFrm::InvalidateAutoCompleteWords() const
{
- ((SwPageFrm*)this)->bInvalidAutoCmplWrds = TRUE;
+ ((SwPageFrm*)this)->bInvalidAutoCmplWrds = sal_True;
}
inline void SwPageFrm::InvalidateWordCount() const
{
- ((SwPageFrm*)this)->bInvalidWordCount = TRUE;
+ ((SwPageFrm*)this)->bInvalidWordCount = sal_True;
}
inline void SwPageFrm::ValidateFlyLayout() const
{
- ((SwPageFrm*)this)->bInvalidFlyLayout = FALSE;
+ ((SwPageFrm*)this)->bInvalidFlyLayout = sal_False;
}
inline void SwPageFrm::ValidateFlyCntnt() const
{
- ((SwPageFrm*)this)->bInvalidFlyCntnt = FALSE;
+ ((SwPageFrm*)this)->bInvalidFlyCntnt = sal_False;
}
inline void SwPageFrm::ValidateFlyInCnt() const
{
- ((SwPageFrm*)this)->bInvalidFlyInCnt = FALSE;
+ ((SwPageFrm*)this)->bInvalidFlyInCnt = sal_False;
}
inline void SwPageFrm::ValidateLayout() const
{
- ((SwPageFrm*)this)->bInvalidLayout = FALSE;
+ ((SwPageFrm*)this)->bInvalidLayout = sal_False;
}
inline void SwPageFrm::ValidateCntnt() const
{
- ((SwPageFrm*)this)->bInvalidCntnt = FALSE;
+ ((SwPageFrm*)this)->bInvalidCntnt = sal_False;
}
inline void SwPageFrm::ValidateSpelling() const
{
- ((SwPageFrm*)this)->bInvalidSpelling = FALSE;
+ ((SwPageFrm*)this)->bInvalidSpelling = sal_False;
}
// SMARTTAGS
inline void SwPageFrm::ValidateSmartTags() const
{
- ((SwPageFrm*)this)->bInvalidSmartTags = FALSE;
+ ((SwPageFrm*)this)->bInvalidSmartTags = sal_False;
}
inline void SwPageFrm::ValidateAutoCompleteWords() const
{
- ((SwPageFrm*)this)->bInvalidAutoCmplWrds = FALSE;
+ ((SwPageFrm*)this)->bInvalidAutoCmplWrds = sal_False;
}
inline void SwPageFrm::ValidateWordCount() const
{
- ((SwPageFrm*)this)->bInvalidWordCount = FALSE;
+ ((SwPageFrm*)this)->bInvalidWordCount = sal_False;
}
-inline BOOL SwPageFrm::IsInvalid() const
+inline sal_Bool SwPageFrm::IsInvalid() const
{
return (bInvalidCntnt || bInvalidLayout || bInvalidFlyInCnt);
}
-inline BOOL SwPageFrm::IsInvalidFly() const
+inline sal_Bool SwPageFrm::IsInvalidFly() const
{
return bInvalidFlyLayout || bInvalidFlyCntnt;
}
diff --git a/sw/source/core/inc/pamtyp.hxx b/sw/source/core/inc/pamtyp.hxx
index e549011f18af..9ca795584eb1 100644
--- a/sw/source/core/inc/pamtyp.hxx
+++ b/sw/source/core/inc/pamtyp.hxx
@@ -44,39 +44,39 @@ void GoStartDoc( SwPosition*);
void GoEndDoc( SwPosition*);
void GoStartSection( SwPosition*);
void GoEndSection( SwPosition*);
-BOOL GoInDoc( SwPaM&, SwMoveFn);
-BOOL GoInSection( SwPaM&, SwMoveFn);
-BOOL GoInNode( SwPaM&, SwMoveFn);
-BOOL GoInCntnt( SwPaM&, SwMoveFn);
-BOOL GoInCntntCells( SwPaM&, SwMoveFn);
-BOOL GoInCntntSkipHidden( SwPaM&, SwMoveFn);
-BOOL GoInCntntCellsSkipHidden( SwPaM&, SwMoveFn);
-const SwTxtAttr* GetFrwrdTxtHint( const SwpHints&, USHORT&, xub_StrLen );
-const SwTxtAttr* GetBkwrdTxtHint( const SwpHints&, USHORT&, xub_StrLen );
-
-BOOL GoNext(SwNode* pNd, SwIndex * pIdx, USHORT nMode );
-BOOL GoPrevious(SwNode* pNd, SwIndex * pIdx, USHORT nMode );
-SW_DLLPUBLIC SwCntntNode* GoNextNds( SwNodeIndex * pIdx, BOOL );
-SwCntntNode* GoPreviousNds( SwNodeIndex * pIdx, BOOL );
+sal_Bool GoInDoc( SwPaM&, SwMoveFn);
+sal_Bool GoInSection( SwPaM&, SwMoveFn);
+sal_Bool GoInNode( SwPaM&, SwMoveFn);
+sal_Bool GoInCntnt( SwPaM&, SwMoveFn);
+sal_Bool GoInCntntCells( SwPaM&, SwMoveFn);
+sal_Bool GoInCntntSkipHidden( SwPaM&, SwMoveFn);
+sal_Bool GoInCntntCellsSkipHidden( SwPaM&, SwMoveFn);
+const SwTxtAttr* GetFrwrdTxtHint( const SwpHints&, sal_uInt16&, xub_StrLen );
+const SwTxtAttr* GetBkwrdTxtHint( const SwpHints&, sal_uInt16&, xub_StrLen );
+
+sal_Bool GoNext(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode );
+sal_Bool GoPrevious(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode );
+SW_DLLPUBLIC SwCntntNode* GoNextNds( SwNodeIndex * pIdx, sal_Bool );
+SwCntntNode* GoPreviousNds( SwNodeIndex * pIdx, sal_Bool );
// --------- Funktionsdefinitionen fuer die SwCrsrShell --------------
-BOOL GoPrevPara( SwPaM&, SwPosPara);
-BOOL GoCurrPara( SwPaM&, SwPosPara);
-BOOL GoNextPara( SwPaM&, SwPosPara);
-BOOL GoPrevSection( SwPaM&, SwPosSection);
-BOOL GoCurrSection( SwPaM&, SwPosSection);
-BOOL GoNextSection( SwPaM&, SwPosSection);
+sal_Bool GoPrevPara( SwPaM&, SwPosPara);
+sal_Bool GoCurrPara( SwPaM&, SwPosPara);
+sal_Bool GoNextPara( SwPaM&, SwPosPara);
+sal_Bool GoPrevSection( SwPaM&, SwPosSection);
+sal_Bool GoCurrSection( SwPaM&, SwPosSection);
+sal_Bool GoNextSection( SwPaM&, SwPosSection);
// ------------ Typedefiniton fuer Funktionen ----------------------
-typedef BOOL (*GoNd)( SwNode*, SwIndex*, USHORT );
-typedef SwCntntNode* (*GoNds)( SwNodeIndex*, BOOL );
+typedef sal_Bool (*GoNd)( SwNode*, SwIndex*, sal_uInt16 );
+typedef SwCntntNode* (*GoNds)( SwNodeIndex*, sal_Bool );
typedef void (*GoDoc)( SwPosition* );
typedef void (*GoSection)( SwPosition* );
-typedef BOOL (SwPosition:: *CmpOp)( const SwPosition& ) const;
-typedef const SwTxtAttr* (*GetHint)( const SwpHints&, USHORT&, xub_StrLen );
+typedef sal_Bool (SwPosition:: *CmpOp)( const SwPosition& ) const;
+typedef const SwTxtAttr* (*GetHint)( const SwpHints&, sal_uInt16&, xub_StrLen );
typedef int (utl::TextSearch:: *SearchTxt)( const String&, xub_StrLen*,
xub_StrLen*, ::com::sun::star::util::SearchResult* );
typedef void (SwNodes:: *MvSection)( SwNodeIndex * ) const;
@@ -95,7 +95,7 @@ struct SwMoveFnCollection
};
// --------- Funktionsdefinitionen fuers Suchen --------------
-SwCntntNode* GetNode( SwPaM&, BOOL&, SwMoveFn, BOOL bInReadOnly = FALSE );
+SwCntntNode* GetNode( SwPaM&, sal_Bool&, SwMoveFn, sal_Bool bInReadOnly = sal_False );
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index f43a2362ee98..ea976a77765f 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -79,7 +79,7 @@ class SwRootFrm: public SwLayoutFrm
// for pages located at the outer borders
SwRect maPagesArea; // the area covered by the pages
long mnViewWidth; // the current page layout bases on this view width
- USHORT mnColumns; // the current page layout bases on this number of columns
+ sal_uInt16 mnColumns; // the current page layout bases on this number of columns
bool mbBookMode; // the current page layout is in book view
bool mbSidebarChanged; // the notes sidebar state has changed
// <--
@@ -87,19 +87,19 @@ class SwRootFrm: public SwLayoutFrm
bool mbNeedGrammarCheck; // true when sth needs to be checked (not necessarily started yet!)
static SwLayVout *pVout;
- static BOOL bInPaint; //Schutz gegen doppelte Paints.
- static BOOL bNoVirDev; //Bei SystemPaints kein virt. Device
-
- BOOL bCheckSuperfluous :1; //Leere Seiten suchen?
- BOOL bIdleFormat :1; //Idle-Formatierer anwerfen?
- BOOL bBrowseWidthValid :1; //Ist nBrowseWidth gueltig?
- BOOL bDummy2 :1; //Unbenutzt
- BOOL bTurboAllowed :1;
- BOOL bAssertFlyPages :1; //Ggf. weitere Seiten fuer Flys einfuegen?
- BOOL bDummy :1; //Unbenutzt
- BOOL bIsVirtPageNum :1; //gibt es eine virtuelle Seitennummer ?
- BOOL bIsNewLayout :1; //Layout geladen oder neu erzeugt.
- BOOL bCallbackActionEnabled:1; //Keine Action in Benachrichtung erwuenscht
+ static sal_Bool bInPaint; //Schutz gegen doppelte Paints.
+ static sal_Bool bNoVirDev; //Bei SystemPaints kein virt. Device
+
+ sal_Bool bCheckSuperfluous :1; //Leere Seiten suchen?
+ sal_Bool bIdleFormat :1; //Idle-Formatierer anwerfen?
+ sal_Bool bBrowseWidthValid :1; //Ist nBrowseWidth gueltig?
+ sal_Bool bDummy2 :1; //Unbenutzt
+ sal_Bool bTurboAllowed :1;
+ sal_Bool bAssertFlyPages :1; //Ggf. weitere Seiten fuer Flys einfuegen?
+ sal_Bool bDummy :1; //Unbenutzt
+ sal_Bool bIsVirtPageNum :1; //gibt es eine virtuelle Seitennummer ?
+ sal_Bool bIsNewLayout :1; //Layout geladen oder neu erzeugt.
+ sal_Bool bCallbackActionEnabled:1; //Keine Action in Benachrichtung erwuenscht
//siehe dcontact.cxx, ::Changed()
//Fuer den BrowseMode. nBrowseWidth ist die Aeussere Kante des am weitesten
@@ -148,7 +148,7 @@ class SwRootFrm: public SwLayoutFrm
SwDestroyList* pDestroy;
- USHORT nPhyPageNums; //Anzahl der Seiten.
+ sal_uInt16 nPhyPageNums; //Anzahl der Seiten.
sal_uInt16 nAccessibleShells; // Number of accessible shells
void ImplCalcBrowseWidth();
@@ -167,9 +167,9 @@ public:
static void RemoveMasterObjs( SdrPage *pPg );
//Virtuelles Device ausgeben (z.B. wenn Animationen ins Spiel kommen)
- static BOOL FlushVout();
+ static sal_Bool FlushVout();
//Clipping sparen, wenn im Vout eh genau das Cliprechteck ausgegeben wird
- static BOOL HasSameRect( const SwRect& rRect );
+ static sal_Bool HasSameRect( const SwRect& rRect );
SwRootFrm( SwFrmFmt*, ViewShell* );
~SwRootFrm();
@@ -183,7 +183,7 @@ public:
//Der ChangeLinkd der CrsrShell (UI-Benachrichtigung) wird im EndAllAction
//automatisch gecallt.
void StartAllAction();
- void EndAllAction( BOOL bVirDev = FALSE );
+ void EndAllAction( sal_Bool bVirDev = sal_False );
// fuer bestimmte UNO-Aktionen (Tabellencursor) ist es notwendig, dass alle Actions
// kurzfristig zurueckgesetzt werden. Dazu muss sich jede ViewShell ihren alten Action-zaehler
@@ -195,13 +195,13 @@ public:
SdrPage* GetDrawPage() { return pDrawPage; }
void SetDrawPage( SdrPage* pNew ){ pDrawPage = pNew; }
- virtual BOOL GetCrsrOfst( SwPosition *, Point&,
+ virtual sal_Bool GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
virtual void Paint( SwRect const&,
SwPrintData const*const pPrintData = NULL ) const;
- virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
#ifdef DBG_UTIL
virtual void Cut();
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
@@ -209,28 +209,28 @@ public:
virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const;
- Point GetNextPrevCntntPos( const Point &rPoint, BOOL bNext ) const;
+ Point GetNextPrevCntntPos( const Point &rPoint, sal_Bool bNext ) const;
virtual Size ChgSize( const Size& aNewSize );
- void SetIdleFlags() { bIdleFormat = TRUE; }
- BOOL IsIdleFormat() const { return bIdleFormat; }
- void ResetIdleFormat() { bIdleFormat = FALSE; }
+ void SetIdleFlags() { bIdleFormat = sal_True; }
+ sal_Bool IsIdleFormat() const { return bIdleFormat; }
+ void ResetIdleFormat() { bIdleFormat = sal_False; }
bool IsNeedGrammarCheck() const { return mbNeedGrammarCheck; }
void SetNeedGrammarCheck( bool bVal ) { mbNeedGrammarCheck = bVal; }
//Sorgt dafuer, dass alle gewuenschten Seitengebunden Flys eine Seite finden
- void SetAssertFlyPages() { bAssertFlyPages = TRUE; }
+ void SetAssertFlyPages() { bAssertFlyPages = sal_True; }
void AssertFlyPages();
- BOOL IsAssertFlyPages() { return bAssertFlyPages; }
+ sal_Bool IsAssertFlyPages() { return bAssertFlyPages; }
//Stellt sicher, dass ab der uebergebenen Seite auf allen Seiten die
//Seitengebundenen Rahmen auf der richtigen Seite (Seitennummer) stehen.
void AssertPageFlys( SwPageFrm * );
//Saemtlichen Inhalt invalidieren, Size oder PrtArea
- void InvalidateAllCntnt( BYTE nInvalidate = INV_SIZE );
+ void InvalidateAllCntnt( sal_uInt8 nInvalidate = INV_SIZE );
/** method to invalidate/re-calculate the position of all floating
screen objects (Writer fly frames and drawing objects), which are
@@ -243,21 +243,21 @@ public:
void InvalidateAllObjPos();
//Ueberfluessige Seiten entfernen.
- void SetSuperfluous() { bCheckSuperfluous = TRUE; }
- BOOL IsSuperfluous() const { return bCheckSuperfluous; }
+ void SetSuperfluous() { bCheckSuperfluous = sal_True; }
+ sal_Bool IsSuperfluous() const { return bCheckSuperfluous; }
void RemoveSuperfluous();
//abfragen/setzen der aktuellen Seite und der Gesamtzahl der Seiten.
//Es wird soweit wie notwendig Formatiert.
- USHORT GetCurrPage( const SwPaM* ) const;
- USHORT SetCurrPage( SwCursor*, USHORT nPageNum );
- Point GetPagePos( USHORT nPageNum ) const;
- USHORT GetPageNum() const { return nPhyPageNums; }
+ sal_uInt16 GetCurrPage( const SwPaM* ) const;
+ sal_uInt16 SetCurrPage( SwCursor*, sal_uInt16 nPageNum );
+ Point GetPagePos( sal_uInt16 nPageNum ) const;
+ sal_uInt16 GetPageNum() const { return nPhyPageNums; }
void DecrPhyPageNums() { --nPhyPageNums; }
void IncrPhyPageNums() { ++nPhyPageNums; }
- BOOL IsVirtPageNum() const { return bIsVirtPageNum; }
- inline void SetVirtPageNum( const BOOL bOf ) const;
- BOOL IsDummyPage( USHORT nPageNum ) const;
+ sal_Bool IsVirtPageNum() const { return bIsVirtPageNum; }
+ inline void SetVirtPageNum( const sal_Bool bOf ) const;
+ sal_Bool IsDummyPage( sal_uInt16 nPageNum ) const;
// Point rPt: The point that should be used to find the page
// Size pSize: If given, we return the (first) page that overlaps with the
@@ -267,16 +267,16 @@ public:
const SwPageFrm* GetPageAtPos( const Point& rPt, const Size* pSize = 0, bool bExtend = false ) const;
//Der Crsr moechte die zu selektierenden Bereiche wissen.
- void CalcFrmRects( SwShellCrsr&, BOOL bIsTblSel );
+ void CalcFrmRects( SwShellCrsr&, sal_Bool bIsTblSel );
// Calculates the cells included from the current selection
// false: There was no result because of an invalid layout
// true: Everything worked fine.
bool MakeTblCrsrs( SwTableCursor& );
- void DisallowTurbo() const { ((SwRootFrm*)this)->bTurboAllowed = FALSE; }
- void ResetTurboFlag() const { ((SwRootFrm*)this)->bTurboAllowed = TRUE; }
- BOOL IsTurboAllowed() const { return bTurboAllowed; }
+ void DisallowTurbo() const { ((SwRootFrm*)this)->bTurboAllowed = sal_False; }
+ void ResetTurboFlag() const { ((SwRootFrm*)this)->bTurboAllowed = sal_True; }
+ sal_Bool IsTurboAllowed() const { return bTurboAllowed; }
void SetTurbo( const SwCntntFrm *pCntnt ) { pTurbo = pCntnt; }
void ResetTurbo() { pTurbo = 0; }
const SwCntntFrm *GetTurbo() { return pTurbo; }
@@ -285,27 +285,27 @@ public:
void UpdateFtnNums(); //nur bei Seitenweiser Nummerierung!
//Alle Fussnoten (nicht etwa die Referenzen) entfernen.
- void RemoveFtns( SwPageFrm *pPage = 0, BOOL bPageOnly = FALSE,
- BOOL bEndNotes = FALSE );
- void CheckFtnPageDescs( BOOL bEndNote );
+ void RemoveFtns( SwPageFrm *pPage = 0, sal_Bool bPageOnly = sal_False,
+ sal_Bool bEndNotes = sal_False );
+ void CheckFtnPageDescs( sal_Bool bEndNote );
const SwPageFrm *GetLastPage() const { return pLastPage; }
SwPageFrm *GetLastPage() { return pLastPage; }
- static BOOL IsInPaint() { return bInPaint; }
+ static sal_Bool IsInPaint() { return bInPaint; }
- static void SetNoVirDev( const BOOL bNew ) { bNoVirDev = bNew; }
+ static void SetNoVirDev( const sal_Bool bNew ) { bNoVirDev = bNew; }
inline long GetBrowseWidth() const;
- void SetBrowseWidth( long n ) { bBrowseWidthValid = TRUE; nBrowseWidth = n;}
+ void SetBrowseWidth( long n ) { bBrowseWidthValid = sal_True; nBrowseWidth = n;}
inline void InvalidateBrowseWidth();
#ifdef LONG_TABLE_HACK
void HackPrepareLongTblPaint( int nMode );
#endif
- BOOL IsNewLayout() const { return bIsNewLayout; }
- void ResetNewLayout() { bIsNewLayout = FALSE;}
+ sal_Bool IsNewLayout() const { return bIsNewLayout; }
+ void ResetNewLayout() { bIsNewLayout = sal_False;}
// Hier werden leere SwSectionFrms zur Zerstoerung angemeldet
// und spaeter zerstoert oder wieder abgemeldet
@@ -314,12 +314,12 @@ public:
void RemoveFromList( SwSectionFrm* pSct ) { if( pDestroy ) _RemoveFromList( pSct ); }
#ifdef DBG_UTIL
// Wird zur Zeit nur fuer ASSERTs benutzt:
- BOOL IsInDelList( SwSectionFrm* pSct ) const; // Ist der SectionFrm in der Liste enthalten?
+ sal_Bool IsInDelList( SwSectionFrm* pSct ) const; // Ist der SectionFrm in der Liste enthalten?
#endif
- void SetCallbackActionEnabled( BOOL b ) { bCallbackActionEnabled = b; }
- BOOL IsCallbackActionEnabled() const { return bCallbackActionEnabled; }
+ void SetCallbackActionEnabled( sal_Bool b ) { bCallbackActionEnabled = b; }
+ sal_Bool IsCallbackActionEnabled() const { return bCallbackActionEnabled; }
sal_Bool IsAnyShellAccessible() const { return nAccessibleShells > 0; }
void AddAccessibleShell() { ++nAccessibleShells; }
@@ -362,7 +362,7 @@ inline void SwRootFrm::InvalidateBrowseWidth()
ImplInvalidateBrowseWidth();
}
-inline void SwRootFrm::SetVirtPageNum( const BOOL bOf) const
+inline void SwRootFrm::SetVirtPageNum( const sal_Bool bOf) const
{
((SwRootFrm*)this)->bIsVirtPageNum = bOf;
}
diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx
index 7f772e10913f..2869e45bf540 100644
--- a/sw/source/core/inc/rowfrm.hxx
+++ b/sw/source/core/inc/rowfrm.hxx
@@ -38,15 +38,15 @@ class SwRowFrm: public SwLayoutFrm
{
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
//Aendern nur die Framesize, nicht die PrtArea-SSize
- virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
const SwTableLine *pTabLine;
SwRowFrm* pFollowRow;
// --> collapsing borders FME 2005-05-27 #i29550#
- USHORT mnTopMarginForLowers;
- USHORT mnBottomMarginForLowers;
- USHORT mnBottomLineSize;
+ sal_uInt16 mnTopMarginForLowers;
+ sal_uInt16 mnBottomMarginForLowers;
+ sal_uInt16 mnBottomLineSize;
// <-- collapsing
bool bIsFollowFlowRow;
bool bIsRepeatedHeadline;
@@ -72,7 +72,7 @@ public:
//Passt die Zellen auf die aktuelle Hoehe an, invalidiert die Zellen
//wenn die Direction nicht der Hoehe entspricht.
- void AdjustCells( const SwTwips nHeight, const BOOL bHeight );
+ void AdjustCells( const SwTwips nHeight, const sal_Bool bHeight );
//
//
@@ -80,12 +80,12 @@ public:
void SetFollowRow( SwRowFrm* pNew ) { pFollowRow = pNew; }
// --> collapsing borders FME 2005-05-27 #i29550#
- USHORT GetTopMarginForLowers() const { return mnTopMarginForLowers; }
- void SetTopMarginForLowers( USHORT nNew ) { mnTopMarginForLowers = nNew; }
- USHORT GetBottomMarginForLowers() const { return mnBottomMarginForLowers; }
- void SetBottomMarginForLowers( USHORT nNew ) { mnBottomMarginForLowers = nNew; }
- USHORT GetBottomLineSize() const { return mnBottomLineSize; }
- void SetBottomLineSize( USHORT nNew ) { mnBottomLineSize = nNew; }
+ sal_uInt16 GetTopMarginForLowers() const { return mnTopMarginForLowers; }
+ void SetTopMarginForLowers( sal_uInt16 nNew ) { mnTopMarginForLowers = nNew; }
+ sal_uInt16 GetBottomMarginForLowers() const { return mnBottomMarginForLowers; }
+ void SetBottomMarginForLowers( sal_uInt16 nNew ) { mnBottomMarginForLowers = nNew; }
+ sal_uInt16 GetBottomLineSize() const { return mnBottomLineSize; }
+ void SetBottomLineSize( sal_uInt16 nNew ) { mnBottomLineSize = nNew; }
// <-- collapsing
bool IsRepeatedHeadline() const { return bIsRepeatedHeadline; }
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index a470571f845f..60c6877d4fb3 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -65,20 +65,20 @@ class SwScanner
xub_StrLen nBegin;
xub_StrLen nLen;
LanguageType aCurrLang;
- USHORT nWordType;
- BOOL bClip;
+ sal_uInt16 nWordType;
+ sal_Bool bClip;
public:
SwScanner( const SwTxtNode& rNd, const String& rTxt, const LanguageType* pLang,
const ModelToViewHelper::ConversionMap* pConvMap,
- USHORT nWordType,
- xub_StrLen nStart, xub_StrLen nEnde, BOOL bClip = FALSE );
+ sal_uInt16 nWordType,
+ xub_StrLen nStart, xub_StrLen nEnde, sal_Bool bClip = sal_False );
// This next word function tries to find the language for the next word
// It should currently _not_ be used for spell checking, and works only for
// ! bReverse
- BOOL NextWord();
+ sal_Bool NextWord();
const XubString& GetWord() const { return aWord; }
@@ -111,7 +111,7 @@ private:
SvXub_StrLens aHiddenChg;
SvBytes aCompType;
xub_StrLen nInvalidityPos;
- BYTE nDefaultDir;
+ sal_uInt8 nDefaultDir;
void UpdateBidiInfo( const String& rTxt );
@@ -136,16 +136,16 @@ public:
inline xub_StrLen GetInvalidity() const { return nInvalidityPos; };
// get default direction for paragraph
- inline BYTE GetDefaultDir() const { return nDefaultDir; };
+ inline sal_uInt8 GetDefaultDir() const { return nDefaultDir; };
// array operations, nCnt refers to array position
inline size_t CountScriptChg() const;
inline xub_StrLen GetScriptChg( const size_t nCnt ) const;
- inline BYTE GetScriptType( const USHORT nCnt ) const;
+ inline sal_uInt8 GetScriptType( const sal_uInt16 nCnt ) const;
inline size_t CountDirChg() const;
inline xub_StrLen GetDirChg( const size_t nCnt ) const;
- inline BYTE GetDirType( const size_t nCnt ) const;
+ inline sal_uInt8 GetDirType( const size_t nCnt ) const;
inline size_t CountKashida() const;
inline xub_StrLen GetKashida( const size_t nCnt ) const;
@@ -153,7 +153,7 @@ public:
inline size_t CountCompChg() const;
inline xub_StrLen GetCompStart( const size_t nCnt ) const;
inline xub_StrLen GetCompLen( const size_t nCnt ) const;
- inline BYTE GetCompType( const size_t nCnt ) const;
+ inline sal_uInt8 GetCompType( const size_t nCnt ) const;
inline size_t CountHiddenChg() const;
inline xub_StrLen GetHiddenChg( const size_t nCnt ) const;
@@ -162,18 +162,18 @@ public:
// "high" level operations, nPos refers to string position
xub_StrLen NextScriptChg( const xub_StrLen nPos ) const;
- BYTE ScriptType( const xub_StrLen nPos ) const;
+ sal_uInt8 ScriptType( const xub_StrLen nPos ) const;
// Returns the position of the next direction level change.
// If bLevel is set, the position of the next level which is smaller
// than the level at position nPos is returned. This is required to
// obtain the end of a SwBidiPortion
xub_StrLen NextDirChg( const xub_StrLen nPos,
- const BYTE* pLevel = 0 ) const;
- BYTE DirType( const xub_StrLen nPos ) const;
+ const sal_uInt8* pLevel = 0 ) const;
+ sal_uInt8 DirType( const xub_StrLen nPos ) const;
#if OSL_DEBUG_LEVEL > 1
- BYTE CompType( const xub_StrLen nPos ) const;
+ sal_uInt8 CompType( const xub_StrLen nPos ) const;
#endif
//
@@ -226,7 +226,7 @@ public:
@param bDel
If set, the hidden ranges will be deleted from the text node.
*/
- static USHORT MaskHiddenRanges( const SwTxtNode& rNode, XubString& rText,
+ static sal_uInt16 MaskHiddenRanges( const SwTxtNode& rNode, XubString& rText,
const xub_StrLen nStt, const xub_StrLen nEnd,
const xub_Unicode cChar );
@@ -245,11 +245,11 @@ public:
// examines the range [ nStart, nStart + nEnd ] if there are kanas
// returns start index of kana entry in array, otherwise USHRT_MAX
- USHORT HasKana( xub_StrLen nStart, const xub_StrLen nEnd ) const;
+ sal_uInt16 HasKana( xub_StrLen nStart, const xub_StrLen nEnd ) const;
// modifies the kerning array according to a given compress value
long Compress( sal_Int32* pKernArray, xub_StrLen nIdx, xub_StrLen nLen,
- const USHORT nCompress, const USHORT nFontHeight,
+ const sal_uInt16 nCompress, const sal_uInt16 nFontHeight,
Point* pPoint = NULL ) const;
/** Performes a kashida justification on the kerning array
@@ -268,7 +268,7 @@ public:
The value which has to be added to a kashida opportunity.
@return The number of kashida opportunities in the given range
*/
- USHORT KashidaJustify( sal_Int32* pKernArray, sal_Int32* pScrArray,
+ sal_uInt16 KashidaJustify( sal_Int32* pKernArray, sal_Int32* pScrArray,
xub_StrLen nStt, xub_StrLen nLen,
long nSpaceAdd = 0) const;
@@ -293,7 +293,7 @@ public:
pKashidaPositions: buffer to reveive the char indices of the
kashida opportunties relative to the paragraph
*/
- USHORT GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen,
+ sal_uInt16 GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen,
xub_StrLen* pKashidaPosition );
@@ -340,7 +340,7 @@ public:
The value which has to be added to the cells.
@return The number of extra spaces in the given range
*/
- static USHORT ThaiJustify( const XubString& rTxt, sal_Int32* pKernArray,
+ static sal_uInt16 ThaiJustify( const XubString& rTxt, sal_Int32* pKernArray,
sal_Int32* pScrArray, xub_StrLen nIdx,
xub_StrLen nLen, xub_StrLen nNumberOfBlanks = 0,
long nSpaceAdd = 0 );
@@ -348,7 +348,7 @@ public:
static SwScriptInfo* GetScriptInfo( const SwTxtNode& rNode,
sal_Bool bAllowInvalid = sal_False );
- static BYTE WhichFont( xub_StrLen nIdx, const String* pTxt, const SwScriptInfo* pSI );
+ static sal_uInt8 WhichFont( xub_StrLen nIdx, const String* pTxt, const SwScriptInfo* pSI );
};
inline void SwScriptInfo::SetInvalidity( const xub_StrLen nPos )
@@ -362,7 +362,7 @@ inline xub_StrLen SwScriptInfo::GetScriptChg( const size_t nCnt ) const
ASSERT( nCnt < aScriptChg.size(),"No ScriptChange today!");
return aScriptChg[ nCnt ];
}
-inline BYTE SwScriptInfo::GetScriptType( const xub_StrLen nCnt ) const
+inline sal_uInt8 SwScriptInfo::GetScriptType( const xub_StrLen nCnt ) const
{
ASSERT( nCnt < aScriptType.size(),"No ScriptType today!");
return aScriptType[ nCnt ];
@@ -374,7 +374,7 @@ inline xub_StrLen SwScriptInfo::GetDirChg( const size_t nCnt ) const
ASSERT( nCnt < aDirChg.size(),"No DirChange today!");
return aDirChg[ nCnt ];
}
-inline BYTE SwScriptInfo::GetDirType( const size_t nCnt ) const
+inline sal_uInt8 SwScriptInfo::GetDirType( const size_t nCnt ) const
{
ASSERT( nCnt < aDirType.size(),"No DirType today!");
return aDirType[ nCnt ];
@@ -399,7 +399,7 @@ inline xub_StrLen SwScriptInfo::GetCompLen( const size_t nCnt ) const
return aCompLen[ nCnt ];
}
-inline BYTE SwScriptInfo::GetCompType( const size_t nCnt ) const
+inline sal_uInt8 SwScriptInfo::GetCompType( const size_t nCnt ) const
{
ASSERT( nCnt < aCompType.size(),"No CompressionType today!");
return aCompType[ nCnt ];
diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx
index 3f677ec51932..27169fe0e97f 100644
--- a/sw/source/core/inc/sectfrm.hxx
+++ b/sw/source/core/inc/sectfrm.hxx
@@ -45,27 +45,27 @@ class SwSectionFrm: public SwLayoutFrm, public SwFlowFrm
{
SwSection* pSection;
- void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, BYTE &,
+ void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, sal_uInt8 &,
SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
- void _Cut( BOOL bRemove );
+ void _Cut( sal_Bool bRemove );
// Is there a FtnContainer?
// An empty sectionfrm without FtnCont is superfluous
- BOOL IsSuperfluous() const { return !ContainsAny() && !ContainsFtnCont(); }
+ sal_Bool IsSuperfluous() const { return !ContainsAny() && !ContainsFtnCont(); }
void CalcFtnAtEndFlag();
void CalcEndAtEndFlag();
const SwSectionFmt* _GetEndSectFmt() const;
- BOOL IsEndnoteAtMyEnd() const;
+ sal_Bool IsEndnoteAtMyEnd() const;
protected:
virtual void MakeAll();
- virtual BOOL ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL bHead, BOOL &rReformat );
+ virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool bHead, sal_Bool &rReformat );
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
public:
SwSectionFrm( SwSection & ); //Inhalt wird nicht erzeugt!
- SwSectionFrm( SwSectionFrm &, BOOL bMaster );//_Nur_ zum Erzeugen von Master/Follows
+ SwSectionFrm( SwSectionFrm &, sal_Bool bMaster );//_Nur_ zum Erzeugen von Master/Follows
~SwSectionFrm();
void Init();
- virtual void CheckDirection( BOOL bVert );
+ virtual void CheckDirection( sal_Bool bVert );
virtual void Cut();
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
@@ -75,53 +75,53 @@ public:
inline SwSectionFrm *GetFollow();
SwSectionFrm* FindMaster() const;
- SwCntntFrm *FindLastCntnt( BYTE nMode = 0 );
- inline const SwCntntFrm *FindLastCntnt( BYTE nMode = 0 ) const;
+ SwCntntFrm *FindLastCntnt( sal_uInt8 nMode = 0 );
+ inline const SwCntntFrm *FindLastCntnt( sal_uInt8 nMode = 0 ) const;
inline SwSection* GetSection() { return pSection; }
inline const SwSection* GetSection() const { return pSection; }
- inline void ColLock() { bColLocked = TRUE; }
- inline void ColUnlock() { bColLocked = FALSE; }
+ inline void ColLock() { bColLocked = sal_True; }
+ inline void ColUnlock() { bColLocked = sal_False; }
void CalcFtnCntnt();
void SimpleFormat();
- BOOL IsDescendantFrom( const SwSectionFmt* pSect ) const;
- BOOL HasToBreak( const SwFrm* pFrm ) const;
+ sal_Bool IsDescendantFrom( const SwSectionFmt* pSect ) const;
+ sal_Bool HasToBreak( const SwFrm* pFrm ) const;
void MergeNext( SwSectionFrm* pNxt );
//Zerlegt den pFrm umgebenden SectionFrm in zwei Teile,
//pFrm an den Anfang des 2. Teils
- BOOL SplitSect( SwFrm* pFrm, BOOL bApres );
- void DelEmpty( BOOL bRemove ); // wie Cut(), Follow-Verkettung wird aber mitgepflegt
- BOOL IsToIgnore() const // Keine Groesse, kein Inhalt, muss ignoriert werden
+ sal_Bool SplitSect( SwFrm* pFrm, sal_Bool bApres );
+ void DelEmpty( sal_Bool bRemove ); // wie Cut(), Follow-Verkettung wird aber mitgepflegt
+ sal_Bool IsToIgnore() const // Keine Groesse, kein Inhalt, muss ignoriert werden
{ return !Frm().Height() && !ContainsCntnt(); }
SwFtnContFrm* ContainsFtnCont( const SwFtnContFrm* pCont = NULL ) const;
- BOOL Growable() const;
- SwTwips _Shrink( SwTwips, BOOL bTst );
- SwTwips _Grow ( SwTwips, BOOL bTst );
+ sal_Bool Growable() const;
+ SwTwips _Shrink( SwTwips, sal_Bool bTst );
+ SwTwips _Grow ( SwTwips, sal_Bool bTst );
// A sectionfrm has to maximize, if he has a follow or a ftncontainer at
// the end of the page. A superfluous follow will be ignored,
// if bCheckFollow is set.
- BOOL ToMaximize( BOOL bCheckFollow ) const;
- inline BOOL _ToMaximize() const
- { if( !pSection ) return FALSE; return ToMaximize( FALSE ); }
- BOOL MoveAllowed( const SwFrm* ) const;
- BOOL CalcMinDiff( SwTwips& rMinDiff ) const;
- // Uebergibt man kein bOverSize bzw. FALSE, so ist der Returnwert
+ sal_Bool ToMaximize( sal_Bool bCheckFollow ) const;
+ inline sal_Bool _ToMaximize() const
+ { if( !pSection ) return sal_False; return ToMaximize( sal_False ); }
+ sal_Bool MoveAllowed( const SwFrm* ) const;
+ sal_Bool CalcMinDiff( SwTwips& rMinDiff ) const;
+ // Uebergibt man kein bOverSize bzw. sal_False, so ist der Returnwert
// >0 fuer Undersized-Frames, ==0 sonst.
- // Uebergibt man TRUE, so kann es auch einen negativen Returnwert geben,
+ // Uebergibt man sal_True, so kann es auch einen negativen Returnwert geben,
// wenn der SectionFrm nicht vollstaendig ausgefuellt ist, was z.B. bei
// SectionFrm mit Follow meist vorkommt. Benoetigt wird dies im
// FormatWidthCols, um "Luft" aus den Spalten zu lassen.
- long Undersize( BOOL bOverSize = FALSE );
+ long Undersize( sal_Bool bOverSize = sal_False );
// Groesse an die Umgebung anpassen
- void _CheckClipping( BOOL bGrow, BOOL bMaximize );
+ void _CheckClipping( sal_Bool bGrow, sal_Bool bMaximize );
void InvalidateFtnPos();
void CollectEndnotes( SwLayouter* pLayouter );
const SwSectionFmt* GetEndSectFmt() const
{ if( IsEndnAtEnd() ) return _GetEndSectFmt(); return NULL; }
- static void MoveCntntAndDelete( SwSectionFrm* pDel, BOOL bSave );
+ static void MoveCntntAndDelete( SwSectionFrm* pDel, sal_Bool bSave );
bool IsBalancedSection() const;
@@ -139,7 +139,7 @@ inline SwSectionFrm *SwSectionFrm::GetFollow()
{
return (SwSectionFrm*)SwFlowFrm::GetFollow();
}
-inline const SwCntntFrm *SwSectionFrm::FindLastCntnt( BYTE nMode ) const
+inline const SwCntntFrm *SwSectionFrm::FindLastCntnt( sal_uInt8 nMode ) const
{
return ((SwSectionFrm*)this)->FindLastCntnt( nMode );
}
diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx
index 300929642f7a..c5d2b9240b22 100644
--- a/sw/source/core/inc/swblocks.hxx
+++ b/sw/source/core/inc/swblocks.hxx
@@ -46,15 +46,15 @@ class SwBlockName
{
friend class SwImpBlocks;
friend class Sw2TextBlocks;
- USHORT nHashS, nHashL; // Hash-Codes zum Checken
+ sal_uInt16 nHashS, nHashL; // Hash-Codes zum Checken
long nPos; // Dateiposition (SW2-Format)
public:
String aShort; // Short name
String aLong; // Long name
String aPackageName; // Package name
- BOOL bIsOnlyTxtFlagInit : 1; // ist das Flag gueltig?
- BOOL bIsOnlyTxt : 1; // unformatted text
- BOOL bInPutMuchBlocks : 1; // put serveral block entries
+ sal_Bool bIsOnlyTxtFlagInit : 1; // ist das Flag gueltig?
+ sal_Bool bIsOnlyTxt : 1; // unformatted text
+ sal_Bool bInPutMuchBlocks : 1; // put serveral block entries
SwBlockName( const String& rShort, const String& rLong, long n );
SwBlockName( const String& rShort, const String& rLong, const String& rPackageName );
@@ -80,12 +80,12 @@ protected:
Date aDateModified; // fuers abgleichen bei den Aktionen
Time aTimeModified;
SwDoc* pDoc; // Austauschdokument
- USHORT nCur; // aktueller Index
- BOOL bReadOnly : 1;
- BOOL bInPutMuchBlocks : 1; // put serveral block entries
- BOOL bInfoChanged : 1; // any Info of TextBlock is changed
+ sal_uInt16 nCur; // aktueller Index
+ sal_Bool bReadOnly : 1;
+ sal_Bool bInPutMuchBlocks : 1; // put serveral block entries
+ sal_Bool bInfoChanged : 1; // any Info of TextBlock is changed
- SwImpBlocks( const String&, BOOL = FALSE );
+ SwImpBlocks( const String&, sal_Bool = sal_False );
virtual ~SwImpBlocks();
static short GetFileType( const String& );
@@ -98,63 +98,63 @@ protected:
virtual void ClearDoc(); // Doc-Inhalt loeschen
SwPaM* MakePaM(); // PaM ueber Doc aufspannen
- virtual void AddName( const String&, const String&, BOOL bOnlyTxt = FALSE );
- BOOL IsFileChanged() const;
+ virtual void AddName( const String&, const String&, sal_Bool bOnlyTxt = sal_False );
+ sal_Bool IsFileChanged() const;
void Touch();
public:
- static USHORT Hash( const String& ); // Hashcode fuer Blocknamen
- USHORT GetCount() const; // Anzahl Textbausteine ermitteln
- USHORT GetIndex( const String& ) const; // Index fuer Kurznamen ermitteln
- USHORT GetLongIndex( const String& ) const; //Index fuer Langnamen ermitteln
- const String& GetShortName( USHORT ) const; // Kurzname fuer Index zurueck
- const String& GetLongName( USHORT ) const; // Langname fuer Index zurueck
- const String& GetPackageName( USHORT ) const; // Langname fuer Index zurueck
+ static sal_uInt16 Hash( const String& ); // Hashcode fuer Blocknamen
+ sal_uInt16 GetCount() const; // Anzahl Textbausteine ermitteln
+ sal_uInt16 GetIndex( const String& ) const; // Index fuer Kurznamen ermitteln
+ sal_uInt16 GetLongIndex( const String& ) const; //Index fuer Langnamen ermitteln
+ const String& GetShortName( sal_uInt16 ) const; // Kurzname fuer Index zurueck
+ const String& GetLongName( sal_uInt16 ) const; // Langname fuer Index zurueck
+ const String& GetPackageName( sal_uInt16 ) const; // Langname fuer Index zurueck
const String& GetFileName() const {return aFile;} // phys. Dateinamen liefern
void SetName( const String& rName ) // logic name
- { aName = rName; bInfoChanged = TRUE; }
+ { aName = rName; bInfoChanged = sal_True; }
const String & GetName( void )
{ return aName; }
const String& GetBaseURL() const { return sBaseURL;}
void SetBaseURL( const String& rURL ) { sBaseURL = rURL; }
- virtual ULONG Delete( USHORT ) = 0;
- virtual ULONG Rename( USHORT, const String&, const String& ) = 0;
- virtual ULONG CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong) = 0;
- virtual ULONG GetDoc( USHORT ) = 0;
- virtual ULONG GetDocForConversion( USHORT );
- virtual ULONG BeginPutDoc( const String&, const String& ) = 0;
- virtual ULONG PutDoc() = 0;
- virtual ULONG GetText( USHORT, String& ) = 0;
- virtual ULONG PutText( const String&, const String&, const String& ) = 0;
- virtual ULONG MakeBlockList() = 0;
-
- virtual ULONG OpenFile( BOOL bReadOnly = TRUE ) = 0;
+ virtual sal_uLong Delete( sal_uInt16 ) = 0;
+ virtual sal_uLong Rename( sal_uInt16, const String&, const String& ) = 0;
+ virtual sal_uLong CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong) = 0;
+ virtual sal_uLong GetDoc( sal_uInt16 ) = 0;
+ virtual sal_uLong GetDocForConversion( sal_uInt16 );
+ virtual sal_uLong BeginPutDoc( const String&, const String& ) = 0;
+ virtual sal_uLong PutDoc() = 0;
+ virtual sal_uLong GetText( sal_uInt16, String& ) = 0;
+ virtual sal_uLong PutText( const String&, const String&, const String& ) = 0;
+ virtual sal_uLong MakeBlockList() = 0;
+
+ virtual sal_uLong OpenFile( sal_Bool bReadOnly = sal_True ) = 0;
virtual void CloseFile() = 0;
- virtual BOOL IsOnlyTextBlock( const String& rShort ) const;
+ virtual sal_Bool IsOnlyTextBlock( const String& rShort ) const;
- virtual ULONG GetMacroTable( USHORT nIdx, SvxMacroTableDtor& rMacroTbl,
+ virtual sal_uLong GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTbl,
sal_Bool bFileAlreadyOpen = sal_False );
- virtual ULONG SetMacroTable( USHORT nIdx,
+ virtual sal_uLong SetMacroTable( sal_uInt16 nIdx,
const SvxMacroTableDtor& rMacroTbl,
sal_Bool bFileAlreadyOpen = sal_False );
- virtual BOOL PutMuchEntries( BOOL bOn );
+ virtual sal_Bool PutMuchEntries( sal_Bool bOn );
};
/*
class Sw3Persist : public SvPersist
{
virtual void FillClass( SvGlobalName * pClassName,
- ULONG * pClipFormat,
+ sal_uLong * pClipFormat,
String * pAppName,
String * pLongUserName,
String * pUserName,
sal_Int32 nFileFormat=SOFFICE_FILEFORMAT_CURRENT ) const;
- virtual BOOL Save();
- virtual BOOL SaveCompleted( SvStorage * );
+ virtual sal_Bool Save();
+ virtual sal_Bool SaveCompleted( SvStorage * );
public:
Sw3Persist();
};
@@ -171,25 +171,25 @@ class Sw2TextBlocks : public SwImpBlocks
long nDocSize; // Laenge des Doc-Records
long nStart; // Beginn des CONTENTS-Records
long nSize; // Laenge des CONTENTS-Records
- USHORT nNamedFmts; // benannte Formate
- USHORT nColls; // Text-Collections
- USHORT nBlks; // Anzahl Elemente im CONTENTS-Record
+ sal_uInt16 nNamedFmts; // benannte Formate
+ sal_uInt16 nColls; // Text-Collections
+ sal_uInt16 nBlks; // Anzahl Elemente im CONTENTS-Record
public:
Sw2TextBlocks( const String& );
virtual ~Sw2TextBlocks();
- virtual ULONG Delete( USHORT );
- virtual ULONG Rename( USHORT, const String&, const String& );
- virtual ULONG CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong);
- virtual ULONG GetDoc( USHORT );
- virtual ULONG BeginPutDoc( const String&, const String& );
- virtual ULONG PutDoc();
- virtual ULONG GetText( USHORT, String& );
- virtual ULONG PutText( const String&, const String&, const String& );
- virtual ULONG MakeBlockList();
+ virtual sal_uLong Delete( sal_uInt16 );
+ virtual sal_uLong Rename( sal_uInt16, const String&, const String& );
+ virtual sal_uLong CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong);
+ virtual sal_uLong GetDoc( sal_uInt16 );
+ virtual sal_uLong BeginPutDoc( const String&, const String& );
+ virtual sal_uLong PutDoc();
+ virtual sal_uLong GetText( sal_uInt16, String& );
+ virtual sal_uLong PutText( const String&, const String&, const String& );
+ virtual sal_uLong MakeBlockList();
virtual short GetFileType( ) const;
- ULONG LoadDoc();
+ sal_uLong LoadDoc();
- virtual ULONG OpenFile( BOOL bReadOnly = TRUE );
+ virtual sal_uLong OpenFile( sal_Bool bReadOnly = sal_True );
virtual void CloseFile();
void StatLineStartPercent(); // zum Anzeigen des Prozessbars
@@ -202,37 +202,37 @@ class Sw3TextBlocks : public SwImpBlocks
{
Sw3Io* pIo3;
Sw3IoImp* pImp;
- BOOL bAutocorrBlock;
+ sal_Bool bAutocorrBlock;
public:
Sw3TextBlocks( const String& );
Sw3TextBlocks( SvStorage& );
virtual ~Sw3TextBlocks();
- virtual ULONG Delete( USHORT );
- virtual ULONG Rename( USHORT, const String&, const String& );
- virtual ULONG CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong);
- virtual ULONG GetDoc( USHORT );
- virtual ULONG GetDocForConversion( USHORT );
- virtual ULONG BeginPutDoc( const String&, const String& );
- virtual ULONG PutDoc();
+ virtual sal_uLong Delete( sal_uInt16 );
+ virtual sal_uLong Rename( sal_uInt16, const String&, const String& );
+ virtual sal_uLong CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong);
+ virtual sal_uLong GetDoc( sal_uInt16 );
+ virtual sal_uLong GetDocForConversion( sal_uInt16 );
+ virtual sal_uLong BeginPutDoc( const String&, const String& );
+ virtual sal_uLong PutDoc();
virtual void SetDoc( SwDoc * pNewDoc);
- virtual ULONG GetText( USHORT, String& );
- virtual ULONG PutText( const String&, const String&, const String& );
- virtual ULONG MakeBlockList();
+ virtual sal_uLong GetText( sal_uInt16, String& );
+ virtual sal_uLong PutText( const String&, const String&, const String& );
+ virtual sal_uLong MakeBlockList();
virtual short GetFileType( ) const;
- virtual ULONG OpenFile( BOOL bReadOnly = TRUE );
+ virtual sal_uLong OpenFile( sal_Bool bReadOnly = sal_True );
virtual void CloseFile();
// Methoden fuer die neue Autokorrektur
- ULONG GetText( const String& rShort, String& );
+ sal_uLong GetText( const String& rShort, String& );
SwDoc* GetDoc() const { return pDoc; }
- virtual BOOL IsOnlyTextBlock( const String& rShort ) const;
+ virtual sal_Bool IsOnlyTextBlock( const String& rShort ) const;
- virtual ULONG GetMacroTable( USHORT, SvxMacroTableDtor& rMacroTbl,
+ virtual sal_uLong GetMacroTable( sal_uInt16, SvxMacroTableDtor& rMacroTbl,
sal_Bool bFileAlreadyOpen = sal_False );
- virtual ULONG SetMacroTable( USHORT nIdx,
+ virtual sal_uLong SetMacroTable( sal_uInt16 nIdx,
const SvxMacroTableDtor& rMacroTbl,
sal_Bool bFileAlreadyOpen = sal_False );
diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx
index 90803b515080..b23ccb0f834a 100644
--- a/sw/source/core/inc/swcache.hxx
+++ b/sw/source/core/inc/swcache.hxx
@@ -83,10 +83,10 @@ class SwCache : public SwCacheObjArr
SwCacheObj *pFirst; //der virtuelle erste.
SwCacheObj *pLast;
- const USHORT nMax; //Mehr sollen nicht aufgenommen werden,
+ const sal_uInt16 nMax; //Mehr sollen nicht aufgenommen werden,
//der Cache kann aber dynamisch um jeweils
//nMax vergroessert werden.
- USHORT nCurMax; //Mehr werden nicht aufgenommen.
+ sal_uInt16 nCurMax; //Mehr werden nicht aufgenommen.
void DeleteObj( SwCacheObj *pObj );
@@ -112,34 +112,34 @@ class SwCache : public SwCacheObjArr
public:
- //nur BYTE hineinstecken!!!
+ //nur sal_uInt8 hineinstecken!!!
#ifdef DBG_UTIL
- SwCache( const USHORT nInitSize, const USHORT nGrowSize,
+ SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize,
const ByteString &rNm );
~SwCache();
#else
- SwCache( const USHORT nInitSize, const USHORT nGrowSize );
+ SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize );
#endif
- void Flush( const BYTE nPercent = 100 );
+ void Flush( const sal_uInt8 nPercent = 100 );
- //bToTop == FALSE -> Keine LRU-Umsortierung!
- SwCacheObj *Get( const void *pOwner, const BOOL bToTop = TRUE );
- SwCacheObj *Get( const void *pOwner, const USHORT nIndex,
- const BOOL bToTop = TRUE );
+ //bToTop == sal_False -> Keine LRU-Umsortierung!
+ SwCacheObj *Get( const void *pOwner, const sal_Bool bToTop = sal_True );
+ SwCacheObj *Get( const void *pOwner, const sal_uInt16 nIndex,
+ const sal_Bool bToTop = sal_True );
void ToTop( SwCacheObj *pObj );
- BOOL Insert( SwCacheObj *pNew );
+ sal_Bool Insert( SwCacheObj *pNew );
void Delete( const void *pOwner );
-// void Delete( const void *pOwner, const USHORT nIndex );
+// void Delete( const void *pOwner, const sal_uInt16 nIndex );
- void SetLRUOfst( const USHORT nOfst ); //nOfst sagt wieviele unangetastet
+ void SetLRUOfst( const sal_uInt16 nOfst ); //nOfst sagt wieviele unangetastet
//bleiben sollen.
void ResetLRUOfst() { pFirst = pRealFirst; }
- inline void IncreaseMax( const USHORT nAdd );
- inline void DecreaseMax( const USHORT nSub );
- USHORT GetCurMax() const { return nCurMax; }
+ inline void IncreaseMax( const sal_uInt16 nAdd );
+ inline void DecreaseMax( const sal_uInt16 nSub );
+ sal_uInt16 GetCurMax() const { return nCurMax; }
inline SwCacheObj *First() { return pRealFirst; }
inline SwCacheObj *Last() { return pLast; }
inline SwCacheObj *Next( SwCacheObj *pCacheObj);
@@ -150,7 +150,7 @@ class SwSaveSetLRUOfst
{
SwCache &rCache;
public:
- SwSaveSetLRUOfst( SwCache &rC, const USHORT nOfst )
+ SwSaveSetLRUOfst( SwCache &rC, const sal_uInt16 nOfst )
: rCache( rC ) { rCache.SetLRUOfst( nOfst ); }
~SwSaveSetLRUOfst() { rCache.ResetLRUOfst(); }
@@ -166,16 +166,16 @@ class SwCacheObj
SwCacheObj *pNext; //Fuer die LRU-Verkettung.
SwCacheObj *pPrev;
- USHORT nCachePos; //Position im Cache-Array.
+ sal_uInt16 nCachePos; //Position im Cache-Array.
- BYTE nLock;
+ sal_uInt8 nLock;
inline SwCacheObj *GetNext() { return pNext; }
inline SwCacheObj *GetPrev() { return pPrev; }
inline void SetNext( SwCacheObj *pNew ) { pNext = pNew; }
inline void SetPrev( SwCacheObj *pNew ) { pPrev = pNew; }
- inline void SetCachePos( const USHORT nNew ) { nCachePos = nNew; }
+ inline void SetCachePos( const sal_uInt16 nNew ) { nCachePos = nNew; }
protected:
const void *pOwner;
@@ -187,12 +187,12 @@ public:
virtual ~SwCacheObj();
inline const void *GetOwner() const { return pOwner; }
- inline BOOL IsOwner( const void *pNew ) const;
+ inline sal_Bool IsOwner( const void *pNew ) const;
- inline USHORT GetCachePos() const { return nCachePos; }
+ inline sal_uInt16 GetCachePos() const { return nCachePos; }
inline void Invalidate() { pOwner = 0; }
- inline BOOL IsLocked() const { return 0 != nLock; }
+ inline sal_Bool IsLocked() const { return 0 != nLock; }
#ifndef DBG_UTIL
inline void Lock() { ++nLock; }
@@ -230,36 +230,36 @@ protected:
inline SwCacheObj *Get();
- inline SwCacheAccess( SwCache &rCache, const void *pOwner, BOOL bSeek = TRUE );
- inline SwCacheAccess( SwCache &rCache, const void *pOwner, const USHORT nIndex );
+ inline SwCacheAccess( SwCache &rCache, const void *pOwner, sal_Bool bSeek = sal_True );
+ inline SwCacheAccess( SwCache &rCache, const void *pOwner, const sal_uInt16 nIndex );
public:
virtual ~SwCacheAccess();
- virtual BOOL IsAvailable() const;
+ virtual sal_Bool IsAvailable() const;
//Abkuerzung fuer diejenigen, die wissen, das die Ableitung das IsAvailable
//nicht ueberladen haben.
- BOOL IsAvail() const { return pObj != 0; }
+ sal_Bool IsAvail() const { return pObj != 0; }
};
-inline void SwCache::IncreaseMax( const USHORT nAdd )
+inline void SwCache::IncreaseMax( const sal_uInt16 nAdd )
{
- nCurMax = nCurMax + sal::static_int_cast< USHORT >(nAdd);
+ nCurMax = nCurMax + sal::static_int_cast< sal_uInt16 >(nAdd);
#ifdef DBG_UTIL
++nIncreaseMax;
#endif
}
-inline void SwCache::DecreaseMax( const USHORT nSub )
+inline void SwCache::DecreaseMax( const sal_uInt16 nSub )
{
if ( nCurMax > nSub )
- nCurMax = nCurMax - sal::static_int_cast< USHORT >(nSub);
+ nCurMax = nCurMax - sal::static_int_cast< sal_uInt16 >(nSub);
#ifdef DBG_UTIL
++nDecreaseMax;
#endif
}
-inline BOOL SwCacheObj::IsOwner( const void *pNew ) const
+inline sal_Bool SwCacheObj::IsOwner( const void *pNew ) const
{
return pOwner && pOwner == pNew;
}
@@ -272,7 +272,7 @@ inline SwCacheObj *SwCache::Next( SwCacheObj *pCacheObj)
return NULL;
}
-inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn, BOOL bSeek ) :
+inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn, sal_Bool bSeek ) :
rCache( rC ),
pObj( 0 ),
pOwner( pOwn )
@@ -282,7 +282,7 @@ inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn, BOOL bSeek )
}
inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn,
- const USHORT nIndex ) :
+ const sal_uInt16 nIndex ) :
rCache( rC ),
pObj( 0 ),
pOwner( pOwn )
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 201c64149e05..631abab76b38 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -55,33 +55,33 @@ class SwSubFont : public SvxFont
friend class SwFont;
const void *pMagic; // "MagicNumber" innerhalb des Fontcaches
Size aSize; // Fremde kriegen nur diese Size zu sehen
- USHORT nFntIndex; // Index im Fontcache
- USHORT nOrgHeight; // Hoehe inkl. Escapement/Proportion
- USHORT nOrgAscent; // Ascent inkl. Escapement/Proportion
- USHORT nPropWidth; // proportional width
+ sal_uInt16 nFntIndex; // Index im Fontcache
+ sal_uInt16 nOrgHeight; // Hoehe inkl. Escapement/Proportion
+ sal_uInt16 nOrgAscent; // Ascent inkl. Escapement/Proportion
+ sal_uInt16 nPropWidth; // proportional width
inline SwSubFont() : aSize(0,0)
{ pMagic = NULL; nFntIndex = nOrgHeight = nOrgAscent = 0; nPropWidth =100; }
- USHORT CalcEscAscent( const USHORT nOldAscent ) const;
- USHORT CalcEscHeight( const USHORT nOldHeight,
- const USHORT nOldAscent ) const;
+ sal_uInt16 CalcEscAscent( const sal_uInt16 nOldAscent ) const;
+ sal_uInt16 CalcEscHeight( const sal_uInt16 nOldHeight,
+ const sal_uInt16 nOldAscent ) const;
void CalcEsc( SwDrawTextInfo& rInf, Point& rPos );
inline void CopyMagic( const SwSubFont& rFnt )
{ pMagic = rFnt.pMagic; nFntIndex = rFnt.nFntIndex; }
- BOOL operator==( const SwFont &rFnt ) const;
+ sal_Bool operator==( const SwFont &rFnt ) const;
SwSubFont& operator=( const SwSubFont &rFont );
short _CheckKerning( );
- BOOL ChgFnt( ViewShell *pSh, OutputDevice& rOut );
- BOOL IsSymbol( ViewShell *pSh );
- USHORT GetAscent( ViewShell *pSh, const OutputDevice& rOut );
- USHORT GetHeight( ViewShell *pSh, const OutputDevice& rOut );
+ sal_Bool ChgFnt( ViewShell *pSh, OutputDevice& rOut );
+ sal_Bool IsSymbol( ViewShell *pSh );
+ sal_uInt16 GetAscent( ViewShell *pSh, const OutputDevice& rOut );
+ sal_uInt16 GetHeight( ViewShell *pSh, const OutputDevice& rOut );
Size _GetTxtSize( SwDrawTextInfo& rInf );
Size GetCapitalSize( SwDrawTextInfo& rInf );
- void _DrawText( SwDrawTextInfo &rInf, const BOOL bGrey );
+ void _DrawText( SwDrawTextInfo &rInf, const sal_Bool bGrey );
void DrawCapital( SwDrawTextInfo &rInf );
void DrawStretchCapital( SwDrawTextInfo &rInf );
void DoOnCapitals( SwDoCapitals &rDo );
@@ -98,17 +98,17 @@ class SwSubFont : public SvxFont
inline void SetOverline( const FontUnderline eOverline );
inline void SetStrikeout( const FontStrikeout eStrikeout );
inline void SetItalic( const FontItalic eItalic );
- inline void SetOutline( const BOOL bOutline );
- inline void SetVertical( const USHORT nDir, const BOOL bVertFormat );
- inline void SetShadow( const BOOL bShadow );
- inline void SetAutoKern( const BYTE nAutoKern );
- inline void SetWordLineMode( const BOOL bWordLineMode );
+ inline void SetOutline( const sal_Bool bOutline );
+ inline void SetVertical( const sal_uInt16 nDir, const sal_Bool bVertFormat );
+ inline void SetShadow( const sal_Bool bShadow );
+ inline void SetAutoKern( const sal_uInt8 nAutoKern );
+ inline void SetWordLineMode( const sal_Bool bWordLineMode );
inline void SetEmphasisMark( const FontEmphasisMark eValue );
inline void SetRelief( const FontRelief eNew );
// Methoden fuer die Hoch-/Tiefstellung
inline void SetEscapement( const short nNewEsc );
- inline void SetProportion( const BYTE nNewPropr );
+ inline void SetProportion( const sal_uInt8 nNewPropr );
inline void SetFamily( const FontFamily eFamily );
inline void SetName( const XubString& rName );
@@ -118,10 +118,10 @@ class SwSubFont : public SvxFont
inline void SetLanguage( LanguageType eNewLang );
inline short CheckKerning()
{ return GetFixKerning() >= 0 ? GetFixKerning() : _CheckKerning( ); }
- inline void SetPropWidth( const USHORT nNew )
+ inline void SetPropWidth( const sal_uInt16 nNew )
{ pMagic = 0; nPropWidth = nNew; }
public:
- USHORT GetPropWidth() const { return nPropWidth; }
+ sal_uInt16 GetPropWidth() const { return nPropWidth; }
};
#define SW_LATIN 0
@@ -136,23 +136,23 @@ class SwFont
Color* pBackColor; // background color (i.e. at character styles)
Color aUnderColor; // color of the underlining
Color aOverColor; // color of the overlining
- BYTE nToxCnt; // Zaehlt die Schachtelungstiefe der Tox
- BYTE nRefCnt; // Zaehlt die Schachtelungstiefe der Refs
- BYTE m_nMetaCount; // count META/METAFIELD
- BYTE nActual; // actual font (Latin, CJK or CTL)
+ sal_uInt8 nToxCnt; // Zaehlt die Schachtelungstiefe der Tox
+ sal_uInt8 nRefCnt; // Zaehlt die Schachtelungstiefe der Refs
+ sal_uInt8 m_nMetaCount; // count META/METAFIELD
+ sal_uInt8 nActual; // actual font (Latin, CJK or CTL)
// Schalter fuer die Font-Extensions
- BOOL bNoHyph :1; // SwTxtNoHyphenHere: keine Trennstelle
- BOOL bBlink :1; // blinkender Font
- BOOL bPaintBlank :1; // Blanks nicht mit DrawRect
- BOOL bFntChg :1;
- BOOL bOrgChg :1; // nOrgHeight/Ascent sind invalid
- BOOL bURL :1;
- BOOL bPaintWrong :1; // Flag fuer Rechtschreibfehler
- BOOL bGreyWave :1; // Fuers extended TextInput: Graue Wellenlinie
- BOOL bNoColReplace :1; // Replacement without colormanipulation
-
- BOOL operator==( const SwFont &rFnt ) const;
+ sal_Bool bNoHyph :1; // SwTxtNoHyphenHere: keine Trennstelle
+ sal_Bool bBlink :1; // blinkender Font
+ sal_Bool bPaintBlank :1; // Blanks nicht mit DrawRect
+ sal_Bool bFntChg :1;
+ sal_Bool bOrgChg :1; // nOrgHeight/Ascent sind invalid
+ sal_Bool bURL :1;
+ sal_Bool bPaintWrong :1; // Flag fuer Rechtschreibfehler
+ sal_Bool bGreyWave :1; // Fuers extended TextInput: Graue Wellenlinie
+ sal_Bool bNoColReplace :1; // Replacement without colormanipulation
+
+ sal_Bool operator==( const SwFont &rFnt ) const;
protected:
inline SwFont() { pBackColor = NULL; nActual = SW_LATIN; }
@@ -168,35 +168,35 @@ public:
SwFont& operator=( const SwFont &rFont );
- inline BYTE GetActual() const { return nActual; }
- inline void SetActual( BYTE nNew );
+ inline sal_uInt8 GetActual() const { return nActual; }
+ inline void SetActual( sal_uInt8 nNew );
inline const SvxFont& GetActualFont() const { return aSub[nActual]; }
// holt sich eine MagicNumber ueber SwFntAccess
- void GoMagic( ViewShell *pSh, BYTE nWhich );
+ void GoMagic( ViewShell *pSh, sal_uInt8 nWhich );
// set background color
void SetBackColor( Color* pNewColor );
inline const Color* GetBackColor() const{ return pBackColor; }
- inline void ChkMagic( ViewShell *pSh, BYTE nWhich )
+ inline void ChkMagic( ViewShell *pSh, sal_uInt8 nWhich )
{ if( !aSub[ nWhich ].pMagic ) GoMagic( pSh, nWhich ); }
// uebernimmt die MagicNumber eines (hoffentlich ident.) Kollegen
- inline void CopyMagic( const SwFont* pFnt, BYTE nWhich )
+ inline void CopyMagic( const SwFont* pFnt, sal_uInt8 nWhich )
{ aSub[nWhich].CopyMagic( pFnt->aSub[nWhich] ); }
- inline void GetMagic( const void* &rMagic, USHORT &rIdx, BYTE nWhich )
+ inline void GetMagic( const void* &rMagic, sal_uInt16 &rIdx, sal_uInt8 nWhich )
{ rMagic = aSub[nWhich].pMagic; rIdx = aSub[nWhich].nFntIndex; }
- inline void SetMagic( const void* pNew, const USHORT nIdx, BYTE nWhich )
+ inline void SetMagic( const void* pNew, const sal_uInt16 nIdx, sal_uInt8 nWhich )
{ aSub[nWhich].pMagic = pNew; aSub[nWhich].nFntIndex = nIdx; }
- inline BOOL DifferentMagic( const SwFont* pFnt, BYTE nWhich )
+ inline sal_Bool DifferentMagic( const SwFont* pFnt, sal_uInt8 nWhich )
{ return aSub[nWhich].pMagic != pFnt->aSub[nWhich].pMagic ||
!aSub[nWhich].pMagic || !pFnt->aSub[nWhich].pMagic; }
- inline const Size &GetSize( BYTE nWhich ) const
+ inline const Size &GetSize( sal_uInt8 nWhich ) const
{ return aSub[nWhich].aSize; }
- inline BOOL IsFntChg() const { return bFntChg; }
- inline void SetFntChg( const BOOL bNew ) { bFntChg = bNew; }
+ inline sal_Bool IsFntChg() const { return bFntChg; }
+ inline void SetFntChg( const sal_Bool bNew ) { bFntChg = bNew; }
- // die gekapselten SV-Font-Methoden (setzen bFntChg auf TRUE)
+ // die gekapselten SV-Font-Methoden (setzen bFntChg auf sal_True)
inline void SetColor( const Color& rColor );
inline void SetFillColor( const Color& rColor );
inline void SetAlign( const FontAlign eAlign );
@@ -205,67 +205,67 @@ public:
inline void SetOverline( const FontUnderline eOverline );
inline void SetOverColor( const Color &rColor ) { aOverColor = rColor; }
inline void SetStrikeout( const FontStrikeout eStrikeout );
- inline void SetOutline( const BOOL bOutline );
- void SetVertical( USHORT nDir, const BOOL nVertLayout = FALSE );
- inline void SetShadow( const BOOL bShadow );
- inline void SetAutoKern( BYTE nAutoKern );
- inline void SetTransparent( const BOOL bTrans );
- inline void SetWordLineMode( const BOOL bWordLineMode );
+ inline void SetOutline( const sal_Bool bOutline );
+ void SetVertical( sal_uInt16 nDir, const sal_Bool nVertLayout = sal_False );
+ inline void SetShadow( const sal_Bool bShadow );
+ inline void SetAutoKern( sal_uInt8 nAutoKern );
+ inline void SetTransparent( const sal_Bool bTrans );
+ inline void SetWordLineMode( const sal_Bool bWordLineMode );
inline void SetFixKerning( const short nNewKern );
inline void SetCaseMap( const SvxCaseMap eNew );
inline void SetEmphasisMark( const FontEmphasisMark eValue );
// Methoden fuer die Hoch-/Tiefstellung
inline void SetEscapement( const short nNewEsc );
- inline void SetProportion( const BYTE nNewPropr );
-
- inline void SetPropWidth( const USHORT nNew );
-
- inline void SetFamily( const FontFamily eFamily, const BYTE nWhich );
- inline void SetName( const XubString& rName, const BYTE nWhich );
- inline void SetStyleName( const XubString& rStyleName, const BYTE nWhich );
- inline void SetSize( const Size& rSize, const BYTE nWhich );
- inline void SetWeight( const FontWeight eWeight, const BYTE nWhich );
- inline void SetItalic( const FontItalic eItalic, const BYTE nWhich );
- inline void SetLanguage( LanguageType eNewLang, const BYTE nWhich );
- inline void SetCharSet( const CharSet eCharSet, const BYTE nWhich );
- inline void SetPitch( const FontPitch ePitch, const BYTE nWhich );
+ inline void SetProportion( const sal_uInt8 nNewPropr );
+
+ inline void SetPropWidth( const sal_uInt16 nNew );
+
+ inline void SetFamily( const FontFamily eFamily, const sal_uInt8 nWhich );
+ inline void SetName( const XubString& rName, const sal_uInt8 nWhich );
+ inline void SetStyleName( const XubString& rStyleName, const sal_uInt8 nWhich );
+ inline void SetSize( const Size& rSize, const sal_uInt8 nWhich );
+ inline void SetWeight( const FontWeight eWeight, const sal_uInt8 nWhich );
+ inline void SetItalic( const FontItalic eItalic, const sal_uInt8 nWhich );
+ inline void SetLanguage( LanguageType eNewLang, const sal_uInt8 nWhich );
+ inline void SetCharSet( const CharSet eCharSet, const sal_uInt8 nWhich );
+ inline void SetPitch( const FontPitch ePitch, const sal_uInt8 nWhich );
inline void SetRelief( const FontRelief eNew );
// Get/Set-Methoden fuer die aktuelle Einstellung
- inline void SetNoHyph( const BOOL bNew );
- inline BOOL IsNoHyph() const { return bNoHyph; }
- inline void SetBlink( const BOOL bBlink );
- inline BOOL IsBlink() const { return bBlink; }
- inline BYTE &GetTox() { return nToxCnt; }
- inline BYTE GetTox() const { return nToxCnt; }
- inline BOOL IsTox() const { return ( 0 != nToxCnt ); }
- inline BYTE &GetRef() { return nRefCnt; }
- inline BYTE GetRef() const { return nRefCnt; }
- inline BOOL IsRef() const { return ( 0 != nRefCnt ); }
- inline BYTE &GetMeta() { return m_nMetaCount; }
- inline BYTE GetMeta() const { return m_nMetaCount; }
+ inline void SetNoHyph( const sal_Bool bNew );
+ inline sal_Bool IsNoHyph() const { return bNoHyph; }
+ inline void SetBlink( const sal_Bool bBlink );
+ inline sal_Bool IsBlink() const { return bBlink; }
+ inline sal_uInt8 &GetTox() { return nToxCnt; }
+ inline sal_uInt8 GetTox() const { return nToxCnt; }
+ inline sal_Bool IsTox() const { return ( 0 != nToxCnt ); }
+ inline sal_uInt8 &GetRef() { return nRefCnt; }
+ inline sal_uInt8 GetRef() const { return nRefCnt; }
+ inline sal_Bool IsRef() const { return ( 0 != nRefCnt ); }
+ inline sal_uInt8 &GetMeta() { return m_nMetaCount; }
+ inline sal_uInt8 GetMeta() const { return m_nMetaCount; }
inline bool IsMeta() const { return (0 != m_nMetaCount); }
- inline void SetURL( const BOOL bURL );
- inline BOOL IsURL() const { return bURL; }
- inline void SetGreyWave( const BOOL bNew );
- inline BOOL IsGreyWave() const { return bGreyWave; }
- inline void SetNoCol( const BOOL bNew );
- inline BOOL IsNoCol() const { return bNoColReplace; }
-
- inline void SetPaintBlank( const BOOL bNew );
- inline BOOL IsPaintBlank() const { return bPaintBlank; }
- inline void SetPaintWrong( const BOOL bNew );
- inline BOOL IsPaintWrong() const { return bPaintWrong; }
+ inline void SetURL( const sal_Bool bURL );
+ inline sal_Bool IsURL() const { return bURL; }
+ inline void SetGreyWave( const sal_Bool bNew );
+ inline sal_Bool IsGreyWave() const { return bGreyWave; }
+ inline void SetNoCol( const sal_Bool bNew );
+ inline sal_Bool IsNoCol() const { return bNoColReplace; }
+
+ inline void SetPaintBlank( const sal_Bool bNew );
+ inline sal_Bool IsPaintBlank() const { return bPaintBlank; }
+ inline void SetPaintWrong( const sal_Bool bNew );
+ inline sal_Bool IsPaintWrong() const { return bPaintWrong; }
// Setzen der Basisklasse Font fuer SwTxtCharFmt
void SetDiffFnt( const SfxItemSet* pSet,
const IDocumentSettingAccess* pIDocumentSettingAccess );
- inline const SvxFont &GetFnt( const BYTE nWhich ) const
+ inline const SvxFont &GetFnt( const sal_uInt8 nWhich ) const
{ return aSub[nWhich]; };
- BOOL IsSymbol( ViewShell *pSh )
+ sal_Bool IsSymbol( ViewShell *pSh )
{ return aSub[nActual].IsSymbol( pSh ); }
FontUnderline GetUnderline() const { return aSub[nActual].GetUnderline(); }
const Color& GetUnderColor() const { return aUnderColor; }
@@ -274,13 +274,13 @@ public:
short GetFixKerning() const { return aSub[nActual].GetFixKerning(); }
FontStrikeout GetStrikeout() const { return aSub[nActual].GetStrikeout(); }
const Color& GetColor() const { return aSub[nActual].GetColor(); }
- BOOL IsShadow() const { return aSub[nActual].IsShadow(); }
- BOOL IsWordLineMode() const { return aSub[nActual].IsWordLineMode(); }
- BOOL IsOutline() const { return aSub[nActual].IsOutline(); }
- BOOL IsKerning() const { return aSub[nActual].IsKerning(); }
+ sal_Bool IsShadow() const { return aSub[nActual].IsShadow(); }
+ sal_Bool IsWordLineMode() const { return aSub[nActual].IsWordLineMode(); }
+ sal_Bool IsOutline() const { return aSub[nActual].IsOutline(); }
+ sal_Bool IsKerning() const { return aSub[nActual].IsKerning(); }
short GetEscapement() const { return aSub[nActual].GetEscapement(); }
SvxCaseMap GetCaseMap() const { return aSub[nActual].GetCaseMap(); }
- BYTE GetPropr() const { return aSub[nActual].GetPropr(); }
+ sal_uInt8 GetPropr() const { return aSub[nActual].GetPropr(); }
FontItalic GetItalic() const { return aSub[nActual].GetItalic(); }
LanguageType GetLanguage() const { return aSub[nActual].GetLanguage(); }
FontAlign GetAlign() const { return aSub[nActual].GetAlign(); }
@@ -293,28 +293,28 @@ public:
FontWeight GetWeight() const { return aSub[nActual].GetWeight(); }
FontEmphasisMark GetEmphasisMark() const
{ return aSub[nActual].GetEmphasisMark(); }
- USHORT GetPropWidth() const { return aSub[nActual].GetPropWidth(); }
- USHORT GetOrientation( const BOOL nVertLayout = FALSE ) const;
+ sal_uInt16 GetPropWidth() const { return aSub[nActual].GetPropWidth(); }
+ sal_uInt16 GetOrientation( const sal_Bool nVertLayout = sal_False ) const;
- inline const XubString& GetName( const BYTE nWhich ) const
+ inline const XubString& GetName( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetName(); }
- inline LanguageType GetLanguage( const BYTE nWhich ) const
+ inline LanguageType GetLanguage( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetLanguage(); }
- inline const XubString& GetStyleName( const BYTE nWhich ) const
+ inline const XubString& GetStyleName( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetStyleName(); }
- inline FontFamily GetFamily( const BYTE nWhich ) const
+ inline FontFamily GetFamily( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetFamily(); }
- inline FontItalic GetItalic( const BYTE nWhich ) const
+ inline FontItalic GetItalic( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetItalic(); }
- inline FontPitch GetPitch( const BYTE nWhich ) const
+ inline FontPitch GetPitch( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetPitch(); }
- inline rtl_TextEncoding GetCharSet( const BYTE nWhich ) const
+ inline rtl_TextEncoding GetCharSet( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetCharSet(); }
- inline long GetHeight( const BYTE nWhich ) const
+ inline long GetHeight( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetSize().Height(); }
- inline FontWeight GetWeight( const BYTE nWhich ) const
+ inline FontWeight GetWeight( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetWeight(); }
- inline FontEmphasisMark GetEmphasisMark( const BYTE nWhich ) const
+ inline FontEmphasisMark GetEmphasisMark( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetEmphasisMark(); }
// Macht den logischen Font im OutputDevice wirksam.
@@ -357,18 +357,18 @@ public:
inline short CheckKerning()
{ return aSub[nActual].CheckKerning(); }
- inline USHORT GetAscent( ViewShell *pSh, const OutputDevice& rOut )
+ inline sal_uInt16 GetAscent( ViewShell *pSh, const OutputDevice& rOut )
{ return aSub[nActual].GetAscent( pSh, rOut ); }
- inline USHORT GetHeight( ViewShell *pSh, const OutputDevice& rOut )
+ inline sal_uInt16 GetHeight( ViewShell *pSh, const OutputDevice& rOut )
{ return aSub[nActual].GetHeight( pSh, rOut ); }
inline void Invalidate()
- { bFntChg = bOrgChg = TRUE; }
+ { bFntChg = bOrgChg = sal_True; }
};
inline void SwFont::SetColor( const Color& rColor )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetColor( rColor );
aSub[1].SetColor( rColor );
aSub[2].SetColor( rColor );
@@ -391,7 +391,7 @@ inline void SwSubFont::SetFillColor( const Color& rColor )
inline void SwFont::SetFillColor( const Color& rColor )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetFillColor( rColor );
aSub[1].SetFillColor( rColor );
aSub[2].SetFillColor( rColor );
@@ -404,9 +404,9 @@ inline void SwSubFont::SetFamily( const FontFamily eFamily )
Font::SetFamily( eFamily );
}
-inline void SwFont::SetFamily( const FontFamily eFamily, const BYTE nWhich )
+inline void SwFont::SetFamily( const FontFamily eFamily, const sal_uInt8 nWhich )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[nWhich].SetFamily( eFamily );
}
@@ -417,9 +417,9 @@ inline void SwSubFont::SetName( const XubString& rName )
Font::SetName( rName );
}
-inline void SwFont::SetName( const XubString& rName, const BYTE nWhich )
+inline void SwFont::SetName( const XubString& rName, const sal_uInt8 nWhich )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[nWhich].SetName( rName );
}
@@ -430,9 +430,9 @@ inline void SwSubFont::SetStyleName( const XubString& rStyleName )
Font::SetStyleName( rStyleName );
}
-inline void SwFont::SetStyleName( const XubString& rStyle, const BYTE nWhich )
+inline void SwFont::SetStyleName( const XubString& rStyle, const sal_uInt8 nWhich )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[nWhich].SetStyleName( rStyle );
}
@@ -443,9 +443,9 @@ inline void SwSubFont::SetCharSet( const CharSet eCharSet )
Font::SetCharSet( eCharSet );
}
-inline void SwFont::SetCharSet( const CharSet eCharSet, const BYTE nWhich )
+inline void SwFont::SetCharSet( const CharSet eCharSet, const sal_uInt8 nWhich )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[nWhich].SetCharSet( eCharSet );
}
@@ -457,9 +457,9 @@ inline void SwSubFont::SetPitch( const FontPitch ePitch )
}
// gekapselte SV-Font-Methode
-inline void SwFont::SetPitch( const FontPitch ePitch, const BYTE nWhich )
+inline void SwFont::SetPitch( const FontPitch ePitch, const sal_uInt8 nWhich )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[nWhich].SetPitch( ePitch );
}
@@ -472,7 +472,7 @@ inline void SwSubFont::SetAlign( const FontAlign eAlign )
inline void SwFont::SetAlign( const FontAlign eAlign )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetAlign( eAlign );
aSub[1].SetAlign( eAlign );
aSub[2].SetAlign( eAlign );
@@ -485,9 +485,9 @@ inline void SwSubFont::SetWeight( const FontWeight eWeight )
Font::SetWeight( eWeight );
}
-inline void SwFont::SetWeight( const FontWeight eWeight, const BYTE nWhich )
+inline void SwFont::SetWeight( const FontWeight eWeight, const sal_uInt8 nWhich )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[nWhich].SetWeight( eWeight );
}
@@ -500,7 +500,7 @@ inline void SwSubFont::SetUnderline( const FontUnderline eUnderline )
inline void SwFont::SetUnderline( const FontUnderline eUnderline )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetUnderline( eUnderline );
aSub[1].SetUnderline( eUnderline );
aSub[2].SetUnderline( eUnderline );
@@ -515,7 +515,7 @@ inline void SwSubFont::SetOverline( const FontUnderline eOverline )
inline void SwFont::SetOverline( const FontUnderline eOverline )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetOverline( eOverline );
aSub[1].SetOverline( eOverline );
aSub[2].SetOverline( eOverline );
@@ -530,7 +530,7 @@ inline void SwSubFont::SetStrikeout( const FontStrikeout eStrikeout )
inline void SwFont::SetStrikeout( const FontStrikeout eStrikeout )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetStrikeout( eStrikeout );
aSub[1].SetStrikeout( eStrikeout );
aSub[2].SetStrikeout( eStrikeout );
@@ -543,52 +543,52 @@ inline void SwSubFont::SetItalic( const FontItalic eItalic )
Font::SetItalic( eItalic );
}
-inline void SwFont::SetItalic( const FontItalic eItalic, const BYTE nWhich )
+inline void SwFont::SetItalic( const FontItalic eItalic, const sal_uInt8 nWhich )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[nWhich].SetItalic( eItalic );
}
// gekapselte SV-Font-Methode
-inline void SwSubFont::SetOutline( const BOOL bOutline )
+inline void SwSubFont::SetOutline( const sal_Bool bOutline )
{
pMagic = 0;
Font::SetOutline( bOutline );
}
-inline void SwFont::SetOutline( const BOOL bOutline )
+inline void SwFont::SetOutline( const sal_Bool bOutline )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetOutline( bOutline );
aSub[1].SetOutline( bOutline );
aSub[2].SetOutline( bOutline );
}
// gekapselte SV-Font-Methode
-inline void SwSubFont::SetShadow( const BOOL bShadow )
+inline void SwSubFont::SetShadow( const sal_Bool bShadow )
{
pMagic = 0;
Font::SetShadow( bShadow );
}
-inline void SwFont::SetShadow( const BOOL bShadow )
+inline void SwFont::SetShadow( const sal_Bool bShadow )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetShadow( bShadow );
aSub[1].SetShadow( bShadow );
aSub[2].SetShadow( bShadow );
}
// gekapselte SV-Font-Methode
-inline void SwSubFont::SetAutoKern( const BYTE nAutoKern )
+inline void SwSubFont::SetAutoKern( const sal_uInt8 nAutoKern )
{
pMagic = 0;
Font::SetKerning( nAutoKern );
}
-inline void SwFont::SetAutoKern( BYTE nAutoKern )
+inline void SwFont::SetAutoKern( sal_uInt8 nAutoKern )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[1].SetAutoKern( nAutoKern );
if( nAutoKern )
nAutoKern = KERNING_FONTSPECIFIC;
@@ -596,7 +596,7 @@ inline void SwFont::SetAutoKern( BYTE nAutoKern )
aSub[2].SetAutoKern( nAutoKern );
}
-inline void SwFont::SetTransparent( const BOOL bTrans )
+inline void SwFont::SetTransparent( const sal_Bool bTrans )
{
aSub[0].SetTransparent( bTrans );
aSub[1].SetTransparent( bTrans );
@@ -618,15 +618,15 @@ inline void SwFont::SetCaseMap( const SvxCaseMap eNew )
}
// gekapselte SV-Font-Methode
-inline void SwSubFont::SetWordLineMode( const BOOL bWordLineMode )
+inline void SwSubFont::SetWordLineMode( const sal_Bool bWordLineMode )
{
pMagic = 0;
Font::SetWordLineMode( bWordLineMode );
}
-inline void SwFont::SetWordLineMode( const BOOL bWordLineMode )
+inline void SwFont::SetWordLineMode( const sal_Bool bWordLineMode )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetWordLineMode( bWordLineMode );
aSub[1].SetWordLineMode( bWordLineMode );
aSub[2].SetWordLineMode( bWordLineMode );
@@ -640,17 +640,17 @@ inline void SwSubFont::SetEmphasisMark( const FontEmphasisMark eValue )
inline void SwFont::SetEmphasisMark( const FontEmphasisMark eValue )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetEmphasisMark( eValue );
aSub[1].SetEmphasisMark( eValue );
aSub[2].SetEmphasisMark( eValue );
}
-inline void SwFont::SetPropWidth( const USHORT nNew )
+inline void SwFont::SetPropWidth( const sal_uInt16 nNew )
{
if( nNew != aSub[0].GetPropWidth() )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetPropWidth( nNew );
aSub[1].SetPropWidth( nNew );
aSub[2].SetPropWidth( nNew );
@@ -668,7 +668,7 @@ inline void SwFont::SetRelief( const FontRelief eNew )
{
if( eNew != aSub[0].GetRelief() )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetRelief( eNew );
aSub[1].SetRelief( eNew );
aSub[2].SetRelief( eNew );
@@ -690,27 +690,27 @@ inline void SwSubFont::SetSize( const Size& rSize )
pMagic = 0;
}
-inline void SwFont::SetSize( const Size& rSize, const BYTE nWhich )
+inline void SwFont::SetSize( const Size& rSize, const sal_uInt8 nWhich )
{
if( aSub[nWhich].aSize != rSize )
{
aSub[nWhich].SetSize( rSize );
- bFntChg = TRUE;
- bOrgChg = TRUE;
+ bFntChg = sal_True;
+ bOrgChg = sal_True;
}
}
-inline void SwFont::SetActual( BYTE nNew )
+inline void SwFont::SetActual( sal_uInt8 nNew )
{
if ( nActual != nNew )
{
- bFntChg = TRUE;
- bOrgChg = TRUE;
+ bFntChg = sal_True;
+ bOrgChg = sal_True;
nActual = nNew;
}
}
-inline void SwSubFont::SetProportion( const BYTE nNewPropr )
+inline void SwSubFont::SetProportion( const sal_uInt8 nNewPropr )
{
pMagic = 0;
Font::SetSize( Size( (long) aSize.Width() * nNewPropr / 100L,
@@ -718,12 +718,12 @@ inline void SwSubFont::SetProportion( const BYTE nNewPropr )
SvxFont::SetPropr( nNewPropr );
}
-inline void SwFont::SetProportion( const BYTE nNewPropr )
+inline void SwFont::SetProportion( const sal_uInt8 nNewPropr )
{
if( nNewPropr != aSub[0].GetPropr() )
{
- bFntChg = TRUE;
- bOrgChg = TRUE;
+ bFntChg = sal_True;
+ bOrgChg = sal_True;
aSub[0].SetProportion( nNewPropr );
aSub[1].SetProportion( nNewPropr );
@@ -743,8 +743,8 @@ inline void SwFont::SetEscapement( const short nNewEsc )
{
// these have to be set, otherwise nOrgHeight and nOrgAscent will not
// be calculated
- bFntChg = TRUE;
- bOrgChg = TRUE;
+ bFntChg = sal_True;
+ bOrgChg = sal_True;
aSub[0].SetEscapement( nNewEsc );
aSub[1].SetEscapement( nNewEsc );
@@ -759,7 +759,7 @@ inline void SwSubFont::SetLanguage( LanguageType eNewLang )
SvxFont::SetLanguage( eNewLang );
}
-inline void SwFont::SetLanguage( const LanguageType eNewLang, const BYTE nWhich )
+inline void SwFont::SetLanguage( const LanguageType eNewLang, const sal_uInt8 nWhich )
{
aSub[nWhich].SetLanguage( eNewLang );
if( SW_CJK == nWhich )
@@ -770,42 +770,42 @@ inline void SwFont::SetLanguage( const LanguageType eNewLang, const BYTE nWhich
}
}
-inline void SwFont::SetPaintBlank( const BOOL bNew )
+inline void SwFont::SetPaintBlank( const sal_Bool bNew )
{
bPaintBlank = bNew;
}
-inline void SwFont::SetPaintWrong( const BOOL bNew )
+inline void SwFont::SetPaintWrong( const sal_Bool bNew )
{
bPaintWrong = bNew;
}
-inline void SwFont::SetNoHyph( const BOOL bNew )
+inline void SwFont::SetNoHyph( const sal_Bool bNew )
{
bNoHyph = bNew;
}
-inline void SwFont::SetBlink( const BOOL bNew )
+inline void SwFont::SetBlink( const sal_Bool bNew )
{
bBlink = bNew;
}
-inline void SwFont::SetURL( const BOOL bNew )
+inline void SwFont::SetURL( const sal_Bool bNew )
{
bURL = bNew;
}
-inline void SwFont::SetGreyWave( const BOOL bNew )
+inline void SwFont::SetGreyWave( const sal_Bool bNew )
{
bGreyWave = bNew;
}
-inline void SwFont::SetNoCol( const BOOL bNew )
+inline void SwFont::SetNoCol( const sal_Bool bNew )
{
bNoColReplace = bNew;
}
-inline void SwSubFont::SetVertical( const USHORT nDir, const BOOL bVertFormat )
+inline void SwSubFont::SetVertical( const sal_uInt16 nDir, const sal_Bool bVertFormat )
{
pMagic = 0;
Font::SetVertical( bVertFormat );
@@ -852,12 +852,12 @@ public:
class SvStatistics
{
public:
- USHORT nGetTextSize;
- USHORT nDrawText;
- USHORT nGetStretchTextSize;
- USHORT nDrawStretchText;
- USHORT nChangeFont;
- USHORT nGetFontMetric;
+ sal_uInt16 nGetTextSize;
+ sal_uInt16 nDrawText;
+ sal_uInt16 nGetStretchTextSize;
+ sal_uInt16 nDrawStretchText;
+ sal_uInt16 nChangeFont;
+ sal_uInt16 nGetFontMetric;
inline void Reset()
{
@@ -868,7 +868,7 @@ public:
inline SvStatistics() { Reset(); }
inline void PrintOn( SvStream &rOS ) const; //$ ostream
- inline BOOL IsEmpty() const
+ inline sal_Bool IsEmpty() const
{
return !( nGetTextSize || nDrawText ||
nDrawStretchText || nChangeFont || nGetFontMetric );
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index c12685ab3058..a93ddf24ebf3 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -43,45 +43,45 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
//Fuert Spezialbehandlung fuer _Get[Next|Prev]Leaf() durch.
using SwFrm::GetLeaf;
- SwLayoutFrm *GetLeaf( MakePageType eMakePage, BOOL bFwd );
+ SwLayoutFrm *GetLeaf( MakePageType eMakePage, sal_Bool bFwd );
SwTable* pTable;
- BOOL bComplete :1; //Eintrage als Repaint ohne das CompletePaint
+ sal_Bool bComplete :1; //Eintrage als Repaint ohne das CompletePaint
//der Basisklasse gesetzt werden muss. Damit
//sollen unertraegliche Tabellen-Repaints
//vermieden werden.
- BOOL bCalcLowers :1; //Im MakeAll auf jedenfall auch fuer Stabilitaet
+ sal_Bool bCalcLowers :1; //Im MakeAll auf jedenfall auch fuer Stabilitaet
//des Inhaltes sorgen.
- BOOL bLowersFormatted :1;//Kommunikation zwischen MakeAll und Layact
- BOOL bLockBackMove :1; //BackMove-Test hat der Master erledigt.
- BOOL bResizeHTMLTable :1; //Resize des HTMLTableLayout rufen im MakeAll
+ sal_Bool bLowersFormatted :1;//Kommunikation zwischen MakeAll und Layact
+ sal_Bool bLockBackMove :1; //BackMove-Test hat der Master erledigt.
+ sal_Bool bResizeHTMLTable :1; //Resize des HTMLTableLayout rufen im MakeAll
//Zur Optimierung, damit dies nicht im
//CntntFrm::Grow gerufen werden muss, denn dann
//wird es ggf. fuer jede Zelle gerufen #47483#
- BOOL bONECalcLowers :1; //Primaer fuer die StarONE-SS. Beim MakeAll werden
+ sal_Bool bONECalcLowers :1; //Primaer fuer die StarONE-SS. Beim MakeAll werden
//die Cntnts auf jedenfall per Calc() formatiert.
//es finden keine zusaetzlichen Invalidierungen
//statt und dieser Weg kann auch kaum garantien
//geben.
- BOOL bHasFollowFlowLine :1; // Means that the first line in the follow
+ sal_Bool bHasFollowFlowLine :1; // Means that the first line in the follow
// is indented to contain content from a broken
// cell
- BOOL bIsRebuildLastLine :1; // Means that currently the last line of the
+ sal_Bool bIsRebuildLastLine :1; // Means that currently the last line of the
// TabFrame is rebuilded. In this case we
// do not want any notification to the master
// table
- BOOL bRestrictTableGrowth :1; // Usually, the table may grow infinite,
+ sal_Bool bRestrictTableGrowth :1; // Usually, the table may grow infinite,
// because the table can be split in
// SwTabFrm::MakeAll. In MakeAll, this
// flag is set to indicate that the table
// may only grow inside its upper. This
// is necessary, in order to let the text
// flow into the FollowFlowLine
- BOOL bRemoveFollowFlowLinePending :1;
+ sal_Bool bRemoveFollowFlowLinePending :1;
// --> OD 2004-10-04 #i26945#
- BOOL bConsiderObjsForMinCellHeight :1; // Usually, the floating screen objects
+ sal_Bool bConsiderObjsForMinCellHeight :1; // Usually, the floating screen objects
// are considered on the calculation
// for the minimal cell height.
// For splitting table rows algorithm
@@ -91,10 +91,10 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
// last table row.
// <--
// --> OD 2004-10-15 #i26945#
- BOOL bObjsDoesFit :1; // For splitting table rows algorithm, this boolean
+ sal_Bool bObjsDoesFit :1; // For splitting table rows algorithm, this boolean
// indicates, if the floating screen objects fits
// <--
- BOOL bDummy4 :1;
+ sal_Bool bDummy4 :1;
//Split() spaltet den Frm an der angegebenen Stelle, es wird ein
//Follow erzeugt und aufgebaut und direkt hinter this gepastet.
@@ -102,16 +102,16 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
bool Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKeep );
bool Join();
- void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, BYTE &,
+ void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, sal_uInt8 &,
SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
- virtual BOOL ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL bHead, BOOL &rReformat );
+ virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool bHead, sal_Bool &rReformat );
protected:
virtual void MakeAll();
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
//Aendert nur die Framesize, nicht die PrtArea-SSize
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
public:
SwTabFrm( SwTable & ); //Immer nach dem erzeugen _und_ pasten das
//Regist Flys rufen!
@@ -128,10 +128,10 @@ public:
SwTabFrm* FindMaster( bool bFirstMaster = false ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual BOOL GetInfo( SfxPoolItem &rHnt ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem &rHnt ) const;
virtual void Paint( SwRect const&,
SwPrintData const*const pPrintData = NULL ) const;
- virtual void CheckDirection( BOOL bVert );
+ virtual void CheckDirection( sal_Bool bVert );
virtual void Cut();
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
@@ -145,48 +145,48 @@ public:
const SwTable *GetTable() const { return pTable; }
SwTable *GetTable() { return pTable; }
- BOOL IsComplete() { return bComplete; }
- void SetComplete() { bComplete = TRUE; }
- void ResetComplete() { bComplete = FALSE; }
+ sal_Bool IsComplete() { return bComplete; }
+ void SetComplete() { bComplete = sal_True; }
+ void ResetComplete() { bComplete = sal_False; }
- BOOL IsLowersFormatted() const { return bLowersFormatted; }
- void SetLowersFormatted( BOOL b ) { bLowersFormatted = b; }
+ sal_Bool IsLowersFormatted() const { return bLowersFormatted; }
+ void SetLowersFormatted( sal_Bool b ) { bLowersFormatted = b; }
- void SetCalcLowers() { bCalcLowers = TRUE; } //Sparsam einsetzen!
- void SetResizeHTMLTable() { bResizeHTMLTable = TRUE; } //dito
- void SetONECalcLowers() { bONECalcLowers = TRUE; }
+ void SetCalcLowers() { bCalcLowers = sal_True; } //Sparsam einsetzen!
+ void SetResizeHTMLTable() { bResizeHTMLTable = sal_True; } //dito
+ void SetONECalcLowers() { bONECalcLowers = sal_True; }
//
// Start: New stuff for breaking table rows
//
- BOOL HasFollowFlowLine() const { return bHasFollowFlowLine; }
- void SetFollowFlowLine( BOOL bNew ) { bHasFollowFlowLine = bNew; }
+ sal_Bool HasFollowFlowLine() const { return bHasFollowFlowLine; }
+ void SetFollowFlowLine( sal_Bool bNew ) { bHasFollowFlowLine = bNew; }
- BOOL IsRebuildLastLine() const { return bIsRebuildLastLine; }
- void SetRebuildLastLine( BOOL bNew ) { bIsRebuildLastLine = bNew; }
+ sal_Bool IsRebuildLastLine() const { return bIsRebuildLastLine; }
+ void SetRebuildLastLine( sal_Bool bNew ) { bIsRebuildLastLine = bNew; }
- BOOL IsRestrictTableGrowth() const { return bRestrictTableGrowth; }
- void SetRestrictTableGrowth( BOOL bNew ) { bRestrictTableGrowth = bNew; }
+ sal_Bool IsRestrictTableGrowth() const { return bRestrictTableGrowth; }
+ void SetRestrictTableGrowth( sal_Bool bNew ) { bRestrictTableGrowth = bNew; }
- BOOL IsRemoveFollowFlowLinePending() const { return bRemoveFollowFlowLinePending; }
- void SetRemoveFollowFlowLinePending( BOOL bNew ) { bRemoveFollowFlowLinePending = bNew; }
+ sal_Bool IsRemoveFollowFlowLinePending() const { return bRemoveFollowFlowLinePending; }
+ void SetRemoveFollowFlowLinePending( sal_Bool bNew ) { bRemoveFollowFlowLinePending = bNew; }
// --> OD 2004-10-04 #i26945#
- BOOL IsConsiderObjsForMinCellHeight() const
+ sal_Bool IsConsiderObjsForMinCellHeight() const
{
return bConsiderObjsForMinCellHeight;
}
- void SetConsiderObjsForMinCellHeight( BOOL _bNewConsiderObjsForMinCellHeight )
+ void SetConsiderObjsForMinCellHeight( sal_Bool _bNewConsiderObjsForMinCellHeight )
{
bConsiderObjsForMinCellHeight = _bNewConsiderObjsForMinCellHeight;
}
// <--
// --> OD 2004-10-04 #i26945#
- BOOL DoesObjsFit() const
+ sal_Bool DoesObjsFit() const
{
return bObjsDoesFit;
}
- void SetDoesObjsFit( BOOL _bNewObjsDoesFit )
+ void SetDoesObjsFit( sal_Bool _bNewObjsDoesFit )
{
bObjsDoesFit = _bNewObjsDoesFit;
}
@@ -197,7 +197,7 @@ public:
// End: New stuff for breaking table rows
//
- BOOL CalcFlyOffsets( SwTwips& rUpper, long& rLeftOffset,
+ sal_Bool CalcFlyOffsets( SwTwips& rUpper, long& rLeftOffset,
long& rRightOffset ) const;
SwTwips CalcHeightOfFirstContentLine() const;
@@ -211,7 +211,7 @@ public:
bool IsCollapsingBorders() const;
// used for collapsing border lines:
- USHORT GetBottomLineSize() const;
+ sal_uInt16 GetBottomLineSize() const;
// <-- collapsing
DECL_FIXEDMEMPOOL_NEWDEL(SwTabFrm)
diff --git a/sw/source/core/inc/tblrwcl.hxx b/sw/source/core/inc/tblrwcl.hxx
index 6100ee41a422..866e82274de9 100644
--- a/sw/source/core/inc/tblrwcl.hxx
+++ b/sw/source/core/inc/tblrwcl.hxx
@@ -50,20 +50,20 @@ class SwShareBoxFmts;
class SwFmtFrmSize;
// Funktions Deklarationen:
-BOOL lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara );
-BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara );
+sal_Bool lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara );
+sal_Bool lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara );
-BOOL lcl_MergeGCBox( const SwTableBox*& rpBox, void* pPara );
-BOOL lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara );
+sal_Bool lcl_MergeGCBox( const SwTableBox*& rpBox, void* pPara );
+sal_Bool lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara );
-BOOL lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara );
-BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara );
+sal_Bool lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara );
+sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara );
-BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara );
-BOOL lcl_CopyLineToDoc( const _FndLine*& rpFndLn, void* pPara );
+sal_Bool lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara );
+sal_Bool lcl_CopyLineToDoc( const _FndLine*& rpFndLn, void* pPara );
-BOOL lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* pPara );
-BOOL lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* pPara );
+sal_Bool lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* pPara );
+sal_Bool lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* pPara );
#ifdef DBG_UTIL
@@ -72,10 +72,10 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize );
void _InsTblBox( SwDoc* pDoc, SwTableNode* pTblNd,
SwTableLine* pLine, SwTableBoxFmt* pBoxFrmFmt,
- SwTableBox* pBox, USHORT nInsPos, USHORT nCnt = 1 );
+ SwTableBox* pBox, sal_uInt16 nInsPos, sal_uInt16 nCnt = 1 );
SW_DLLPUBLIC void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo = 0,
- BOOL bCalcNewSize = TRUE, const BOOL bCorrBorder = TRUE,
+ sal_Bool bCalcNewSize = sal_True, const sal_Bool bCorrBorder = sal_True,
SwShareBoxFmts* pShareFmts = 0 );
// Klasse fuers SplitTable
@@ -88,15 +88,15 @@ class SwCollectTblLineBoxes
SvUShorts aPosArr;
SwSelBoxes_SAR aBoxes;
SwHistory* pHst;
- USHORT nMode, nWidth;
- BOOL bGetFromTop : 1;
- BOOL bGetValues : 1;
+ sal_uInt16 nMode, nWidth;
+ sal_Bool bGetFromTop : 1;
+ sal_Bool bGetValues : 1;
public:
- SwCollectTblLineBoxes( BOOL bTop, USHORT nMd = 0, SwHistory* pHist=0 )
+ SwCollectTblLineBoxes( sal_Bool bTop, sal_uInt16 nMd = 0, SwHistory* pHist=0 )
: aPosArr( 16, 16 ), aBoxes( 16, 16 ),
pHst( pHist ), nMode( nMd ), nWidth( 0 ),
- bGetFromTop( bTop ), bGetValues( TRUE )
+ bGetFromTop( bTop ), bGetValues( sal_True )
{}
@@ -104,8 +104,8 @@ public:
const SwTableBox* GetBoxOfPos( const SwTableBox& rBox );
void AddToUndoHistory( const SwCntntNode& rNd );
- USHORT Count() const { return aBoxes.Count(); }
- const SwTableBox& GetBox( USHORT nPos, USHORT* pWidth = 0 ) const
+ sal_uInt16 Count() const { return aBoxes.Count(); }
+ const SwTableBox& GetBox( sal_uInt16 nPos, sal_uInt16* pWidth = 0 ) const
{
// hier wird die EndPos der Spalte benoetigt!
if( pWidth )
@@ -114,68 +114,68 @@ public:
return *aBoxes[ nPos ];
}
- BOOL IsGetFromTop() const { return bGetFromTop; }
- BOOL IsGetValues() const { return bGetValues; }
+ sal_Bool IsGetFromTop() const { return bGetFromTop; }
+ sal_Bool IsGetValues() const { return bGetValues; }
- USHORT GetMode() const { return nMode; }
- void SetValues( BOOL bFlag ) { bGetValues = FALSE; nWidth = 0;
+ sal_uInt16 GetMode() const { return nMode; }
+ void SetValues( sal_Bool bFlag ) { bGetValues = sal_False; nWidth = 0;
bGetFromTop = bFlag; }
- BOOL Resize( USHORT nOffset, USHORT nWidth );
+ sal_Bool Resize( sal_uInt16 nOffset, sal_uInt16 nWidth );
};
-BOOL lcl_Box_CollectBox( const SwTableBox*& rpBox, void* pPara );
-BOOL lcl_Line_CollectBox( const SwTableLine*& rpLine, void* pPara );
+sal_Bool lcl_Box_CollectBox( const SwTableBox*& rpBox, void* pPara );
+sal_Bool lcl_Line_CollectBox( const SwTableLine*& rpLine, void* pPara );
-BOOL lcl_BoxSetSplitBoxFmts( const SwTableBox*& rpBox, void* pPara );
+sal_Bool lcl_BoxSetSplitBoxFmts( const SwTableBox*& rpBox, void* pPara );
// This structure is needed by Undo to restore row span attributes
// when a table has been splitted into two tables
struct SwSaveRowSpan
{
- USHORT mnSplitLine; // the line number where the table has been splitted
+ sal_uInt16 mnSplitLine; // the line number where the table has been splitted
std::vector< long > mnRowSpans; // the row span attributes in this line
- SwSaveRowSpan( SwTableBoxes& rBoxes, USHORT nSplitLn );
+ SwSaveRowSpan( SwTableBoxes& rBoxes, sal_uInt16 nSplitLn );
};
struct _SwGCLineBorder
{
const SwTableLines* pLines;
SwShareBoxFmts* pShareFmts;
- USHORT nLinePos;
+ sal_uInt16 nLinePos;
_SwGCLineBorder( const SwTable& rTable )
: pLines( &rTable.GetTabLines() ), pShareFmts(0), nLinePos( 0 ) {}
_SwGCLineBorder( const SwTableBox& rBox )
: pLines( &rBox.GetTabLines() ), pShareFmts(0), nLinePos( 0 ) {}
- BOOL IsLastLine() const { return nLinePos + 1 >= pLines->Count(); }
+ sal_Bool IsLastLine() const { return nLinePos + 1 >= pLines->Count(); }
};
class _SwGCBorder_BoxBrd
{
const SvxBorderLine* pBrdLn;
- BOOL bAnyBorderFnd;
+ sal_Bool bAnyBorderFnd;
public:
- _SwGCBorder_BoxBrd() : pBrdLn( 0 ), bAnyBorderFnd( FALSE ) {}
+ _SwGCBorder_BoxBrd() : pBrdLn( 0 ), bAnyBorderFnd( sal_False ) {}
void SetBorder( const SvxBorderLine& rBorderLine )
- { pBrdLn = &rBorderLine; bAnyBorderFnd = FALSE; }
+ { pBrdLn = &rBorderLine; bAnyBorderFnd = sal_False; }
// checke, ob die linke Border dieselbe wie die gesetzte ist
- // returnt FALSE falls gar keine Border gesetzt ist
- BOOL CheckLeftBorderOfFormat( const SwFrmFmt& rFmt );
+ // returnt sal_False falls gar keine Border gesetzt ist
+ sal_Bool CheckLeftBorderOfFormat( const SwFrmFmt& rFmt );
- BOOL IsAnyBorderFound() const { return bAnyBorderFnd; }
+ sal_Bool IsAnyBorderFound() const { return bAnyBorderFnd; }
};
-BOOL lcl_GC_Line_Border( const SwTableLine*& , void* pPara );
-BOOL lcl_GC_Box_Border( const SwTableBox*& , void* pPara );
+sal_Bool lcl_GC_Line_Border( const SwTableLine*& , void* pPara );
+sal_Bool lcl_GC_Box_Border( const SwTableBox*& , void* pPara );
-BOOL lcl_GCBorder_ChkBoxBrd_L( const SwTableLine*& , void* pPara );
-BOOL lcl_GCBorder_ChkBoxBrd_B( const SwTableBox*& , void* pPara );
+sal_Bool lcl_GCBorder_ChkBoxBrd_L( const SwTableLine*& , void* pPara );
+sal_Bool lcl_GCBorder_ChkBoxBrd_B( const SwTableBox*& , void* pPara );
-BOOL lcl_GCBorder_GetLastBox_L( const SwTableLine*& , void* pPara );
-BOOL lcl_GCBorder_GetLastBox_B( const SwTableBox*& , void* pPara );
+sal_Bool lcl_GCBorder_GetLastBox_L( const SwTableLine*& , void* pPara );
+sal_Bool lcl_GCBorder_GetLastBox_B( const SwTableBox*& , void* pPara );
class SwShareBoxFmt
@@ -193,8 +193,8 @@ public:
SwFrmFmt* GetFormat( long nWidth ) const;
SwFrmFmt* GetFormat( const SfxPoolItem& rItem ) const;
void AddFormat( const SwFrmFmt& rFmt );
- // returnt TRUE, wenn geloescht werden kann
- BOOL RemoveFormat( const SwFrmFmt& rFmt );
+ // returnt sal_True, wenn geloescht werden kann
+ sal_Bool RemoveFormat( const SwFrmFmt& rFmt );
};
@@ -203,7 +203,7 @@ SV_DECL_PTRARR_DEL( _SwShareBoxFmts, SwShareBoxFmt*, 8, 8 )
class SwShareBoxFmts
{
_SwShareBoxFmts aShareArr;
- BOOL Seek_Entry( const SwFrmFmt& rFmt, USHORT* pPos ) const;
+ sal_Bool Seek_Entry( const SwFrmFmt& rFmt, sal_uInt16* pPos ) const;
void ChangeFrmFmt( SwTableBox* pBox, SwTableLine* pLn, SwFrmFmt& rFmt );
diff --git a/sw/source/core/inc/toxhlp.hxx b/sw/source/core/inc/toxhlp.hxx
index 16dd42596995..01188e1d8c7e 100644
--- a/sw/source/core/inc/toxhlp.hxx
+++ b/sw/source/core/inc/toxhlp.hxx
@@ -59,7 +59,7 @@ public:
String GetIndexKey( const String& rTxt, const String& rTxtReading,
const STAR_NMSPC::lang::Locale& rLocale ) const;
- String GetFollowingText( BOOL bMorePages ) const;
+ String GetFollowingText( sal_Bool bMorePages ) const;
STAR_NMSPC::uno::Sequence< ::rtl::OUString >
GetAlgorithmList( const STAR_NMSPC::lang::Locale& rLcl ) const;
diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx
index e82f5dc71253..4d5e41fe8b71 100644
--- a/sw/source/core/inc/txmsrt.hxx
+++ b/sw/source/core/inc/txmsrt.hxx
@@ -55,10 +55,10 @@ struct SwTOXSource
{
const SwCntntNode* pNd;
xub_StrLen nPos;
- BOOL bMainEntry;
+ sal_Bool bMainEntry;
- SwTOXSource() : pNd(0), nPos(0), bMainEntry(FALSE) {}
- SwTOXSource( const SwCntntNode* pNode, xub_StrLen n, BOOL bMain )
+ SwTOXSource() : pNd(0), nPos(0), bMainEntry(sal_False) {}
+ SwTOXSource( const SwCntntNode* pNode, xub_StrLen n, sal_Bool bMain )
: pNd(pNode), nPos(n), bMainEntry(bMain)
{}
};
@@ -71,12 +71,12 @@ class SwTOXInternational
CharClass* pCharClass;
LanguageType eLang;
String sSortAlgorithm;
- USHORT nOptions;
+ sal_uInt16 nOptions;
void Init();
public:
- SwTOXInternational( LanguageType nLang, USHORT nOptions,
+ SwTOXInternational( LanguageType nLang, sal_uInt16 nOptions,
const String& rSortAlgorithm );
SwTOXInternational( const SwTOXInternational& );
~SwTOXInternational();
@@ -86,7 +86,7 @@ public:
const String& rTxt2, const String& rTxtReading2,
const ::com::sun::star::lang::Locale& rLocale2 ) const;
- inline BOOL IsEqual( const String& rTxt1, const String& rTxtReading1,
+ inline sal_Bool IsEqual( const String& rTxt1, const String& rTxtReading1,
const ::com::sun::star::lang::Locale& rLocale1,
const String& rTxt2, const String& rTxtReading2,
const ::com::sun::star::lang::Locale& rLocale2 ) const
@@ -95,7 +95,7 @@ public:
rTxt2, rTxtReading2, rLocale2 );
}
- inline BOOL IsLess( const String& rTxt1, const String& rTxtReading1,
+ inline sal_Bool IsLess( const String& rTxt1, const String& rTxtReading1,
const ::com::sun::star::lang::Locale& rLocale1,
const String& rTxt2, const String& rTxtReading2,
const ::com::sun::star::lang::Locale& rLocale2 ) const
@@ -107,10 +107,10 @@ public:
String GetIndexKey( const String& rTxt, const String& rTxtReading,
const ::com::sun::star::lang::Locale& rLcl ) const;
- String GetFollowingText( BOOL bMorePages ) const;
+ String GetFollowingText( sal_Bool bMorePages ) const;
String ToUpper( const String& rStr, xub_StrLen nPos ) const;
- inline BOOL IsNumeric( const String& rStr ) const;
+ inline sal_Bool IsNumeric( const String& rStr ) const;
};
/*--------------------------------------------------------------------
@@ -124,10 +124,10 @@ struct SwTOXSortTabBase
const SwTxtNode* pTOXNd;
const SwTxtTOXMark* pTxtMark;
const SwTOXInternational* pTOXIntl;
- ULONG nPos;
+ sal_uLong nPos;
xub_StrLen nCntPos;
- USHORT nType;
- static USHORT nOpt;
+ sal_uInt16 nType;
+ static sal_uInt16 nOpt;
SwTOXSortTabBase( TOXSortType nType,
const SwCntntNode* pTOXSrc,
@@ -136,13 +136,13 @@ struct SwTOXSortTabBase
const ::com::sun::star::lang::Locale* pLocale = NULL );
virtual ~SwTOXSortTabBase() {}
- USHORT GetType() const { return nType; }
- USHORT GetOptions() const { return nOpt; }
+ sal_uInt16 GetType() const { return nType; }
+ sal_uInt16 GetOptions() const { return nOpt; }
- virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0) const;
- virtual USHORT GetLevel() const = 0;
- virtual BOOL operator==( const SwTOXSortTabBase& );
- virtual BOOL operator<( const SwTOXSortTabBase& );
+ virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 nAuthField = 0) const;
+ virtual sal_uInt16 GetLevel() const = 0;
+ virtual sal_Bool operator==( const SwTOXSortTabBase& );
+ virtual sal_Bool operator<( const SwTOXSortTabBase& );
virtual String GetURL() const;
@@ -150,7 +150,7 @@ struct SwTOXSortTabBase
inline const ::com::sun::star::lang::Locale& GetLocale() const;
private:
- BOOL bValidTxt;
+ sal_Bool bValidTxt;
String sSortTxt;
String sSortTxtReading;
@@ -164,7 +164,7 @@ inline void SwTOXSortTabBase::GetTxt( String& rSortTxt,
{
SwTOXSortTabBase* pThis = (SwTOXSortTabBase*)this;
pThis->GetText_Impl( pThis->sSortTxt, pThis->sSortTxtReading );
- pThis->bValidTxt = TRUE;
+ pThis->bValidTxt = sal_True;
}
rSortTxt = sSortTxt;
@@ -182,40 +182,40 @@ inline const ::com::sun::star::lang::Locale& SwTOXSortTabBase::GetLocale() const
struct SwTOXIndex : public SwTOXSortTabBase
{
- SwTOXIndex( const SwTxtNode&, const SwTxtTOXMark*, USHORT nOptions, BYTE nKeyLevel,
+ SwTOXIndex( const SwTxtNode&, const SwTxtTOXMark*, sal_uInt16 nOptions, sal_uInt8 nKeyLevel,
const SwTOXInternational& rIntl,
const ::com::sun::star::lang::Locale& rLocale );
virtual ~SwTOXIndex() {}
- virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0 ) const;
- virtual USHORT GetLevel() const;
- virtual BOOL operator==( const SwTOXSortTabBase& );
- virtual BOOL operator<( const SwTOXSortTabBase& );
+ virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 nAuthField = 0 ) const;
+ virtual sal_uInt16 GetLevel() const;
+ virtual sal_Bool operator==( const SwTOXSortTabBase& );
+ virtual sal_Bool operator<( const SwTOXSortTabBase& );
private:
virtual void GetText_Impl( String&, String& ) const;
- BYTE nKeyLevel;
+ sal_uInt8 nKeyLevel;
};
struct SwTOXCustom : public SwTOXSortTabBase
{
- SwTOXCustom( const String& rKey, const String& rReading, USHORT nLevel,
+ SwTOXCustom( const String& rKey, const String& rReading, sal_uInt16 nLevel,
const SwTOXInternational& rIntl,
const ::com::sun::star::lang::Locale& rLocale );
virtual ~SwTOXCustom() {}
- virtual USHORT GetLevel() const;
- virtual BOOL operator==( const SwTOXSortTabBase& );
- virtual BOOL operator<( const SwTOXSortTabBase& );
+ virtual sal_uInt16 GetLevel() const;
+ virtual sal_Bool operator==( const SwTOXSortTabBase& );
+ virtual sal_Bool operator<( const SwTOXSortTabBase& );
private:
virtual void GetText_Impl( String&, String& ) const;
String aKey;
String sReading;
- USHORT nLev;
+ sal_uInt16 nLev;
};
/*--------------------------------------------------------------------
@@ -228,8 +228,8 @@ struct SwTOXContent : public SwTOXSortTabBase
const SwTOXInternational& rIntl );
virtual ~SwTOXContent() {}
- virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0 ) const;
- virtual USHORT GetLevel() const;
+ virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 nAuthField = 0 ) const;
+ virtual sal_uInt16 GetLevel() const;
private:
virtual void GetText_Impl( String&, String& ) const;
@@ -237,21 +237,21 @@ private:
struct SwTOXPara : public SwTOXSortTabBase
{
- SwTOXPara( const SwCntntNode&, SwTOXElement, USHORT nLevel = FORM_ALPHA_DELIMITTER );
+ SwTOXPara( const SwCntntNode&, SwTOXElement, sal_uInt16 nLevel = FORM_ALPHA_DELIMITTER );
virtual ~SwTOXPara() {}
void SetStartIndex( xub_StrLen nSet) { nStartIndex = nSet;}
void SetEndIndex( xub_StrLen nSet ) { nEndIndex = nSet;}
- virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0 ) const;
- virtual USHORT GetLevel() const;
+ virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 nAuthField = 0 ) const;
+ virtual sal_uInt16 GetLevel() const;
virtual String GetURL() const;
private:
virtual void GetText_Impl( String&, String& ) const;
SwTOXElement eType;
- USHORT m_nLevel;
+ sal_uInt16 m_nLevel;
xub_StrLen nStartIndex;
xub_StrLen nEndIndex;
};
@@ -261,22 +261,22 @@ struct SwTOXTable : public SwTOXSortTabBase
SwTOXTable( const SwCntntNode& rNd );
virtual ~SwTOXTable() {}
- void SetLevel(USHORT nSet){nLevel = nSet;}
+ void SetLevel(sal_uInt16 nSet){nLevel = nSet;}
- virtual USHORT GetLevel() const;
+ virtual sal_uInt16 GetLevel() const;
virtual String GetURL() const;
private:
virtual void GetText_Impl( String&, String& ) const;
- USHORT nLevel;
+ sal_uInt16 nLevel;
};
struct SwTOXAuthority : public SwTOXSortTabBase
{
private:
SwFmtFld& m_rField;
- virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0 ) const;
+ virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 nAuthField = 0 ) const;
virtual void GetText_Impl( String&, String& ) const;
public:
@@ -285,9 +285,9 @@ public:
SwFmtFld& GetFldFmt() {return m_rField;}
- virtual BOOL operator==( const SwTOXSortTabBase& );
- virtual BOOL operator<( const SwTOXSortTabBase& );
- virtual USHORT GetLevel() const;
+ virtual sal_Bool operator==( const SwTOXSortTabBase& );
+ virtual sal_Bool operator<( const SwTOXSortTabBase& );
+ virtual sal_uInt16 GetLevel() const;
};
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 0e7db85e64ac..3cc1cbfc03b9 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -66,14 +66,14 @@ class SwTxtFrm: public SwCntntFrm
friend class SwTestFormat;
friend class WidowsAndOrphans;
friend class SwTxtFrmLocker; // duerfen Lock()/Unlock()
- friend sal_Bool lcl_ChangeOffset( SwTxtFrm* pFrm, USHORT nNew );
+ friend sal_Bool lcl_ChangeOffset( SwTxtFrm* pFrm, sal_uInt16 nNew );
static SwCache *pTxtCache; //Pointer auf den Line-Cache
static long nMinPrtLine; //Diese Linie darf beim Drucken nicht
//unterschritten werden, Hack fuer Tabellenzellen ueber mehrere Seiten
- ULONG nAllLines :24;//Anzahl der Zeilen fuer das Paint (inkl. nThisLines)
- ULONG nThisLines :8; //Anzahl der Zeilen dieses Frames
+ sal_uLong nAllLines :24;//Anzahl der Zeilen fuer das Paint (inkl. nThisLines)
+ sal_uLong nThisLines :8; //Anzahl der Zeilen dieses Frames
// The x position for flys anchored at this paragraph.
// These values are calculated in SwTxtFrm::CalcBaseOfstForFly()
@@ -95,7 +95,7 @@ class SwTxtFrm: public SwCntntFrm
xub_StrLen nOfst; //nOfst gibt den Offset im Cntnt (Anzahl Zeichen) an.
- USHORT nCacheIdx; //Index in den Cache, USHRT_MAX wenn definitiv
+ sal_uInt16 nCacheIdx; //Index in den Cache, USHRT_MAX wenn definitiv
//kein passendes Objekt im Cache steht.
//Teilt den Master ab und erzeugt einen Follow oder passt die
@@ -116,7 +116,7 @@ class SwTxtFrm: public SwCntntFrm
// wertet in Format() die Preps aus.
sal_Bool CalcPreps();
- void PrepWidows( const USHORT nNeed, sal_Bool bNotify = sal_True );
+ void PrepWidows( const sal_uInt16 nNeed, sal_Bool bNotify = sal_True );
void _InvalidateRange( const SwCharRange &, const long = 0);
inline void InvalidateRange( const SwCharRange &, const long = 0);
@@ -236,11 +236,11 @@ public:
void Init();
// Wird von FormatSpelling( ) gerufen
- SwRect _AutoSpell( const SwCntntNode*, const SwViewOption&, USHORT );
+ SwRect _AutoSpell( const SwCntntNode*, const SwViewOption&, sal_uInt16 );
// is called from the FormatSpelling( ) method
- SwRect SmartTagScan( SwCntntNode* , USHORT );
+ SwRect SmartTagScan( SwCntntNode* , sal_uInt16 );
// Wird vom CollectAutoCmplWords gerufen
- void CollectAutoCmplWrds( SwCntntNode* , USHORT );
+ void CollectAutoCmplWrds( SwCntntNode* , sal_uInt16 );
// Returns the screen position of rPos. The values are relative to the upper
// left position of the page frame.
@@ -314,16 +314,16 @@ public:
// Prepares the cursor position for a visual cursor move (BiDi).
// The behaviour is different for insert and overwrite cursors
- void PrepareVisualMove( xub_StrLen& nPos, BYTE& nCrsrLevel,
+ void PrepareVisualMove( xub_StrLen& nPos, sal_uInt8& nCrsrLevel,
sal_Bool& bRight, sal_Bool bInsertCrsr );
// Methoden zur Verwaltung von FolgeFrames
SwCntntFrm *SplitFrm( const xub_StrLen nTxtPos );
SwCntntFrm *JoinFrm();
- inline USHORT GetOfst() const { return nOfst; }
- void _SetOfst( const USHORT nNewOfst );
- inline void SetOfst ( const USHORT nNewOfst );
- inline void ManipOfst ( const USHORT nNewOfst ){ nOfst = nNewOfst; }
+ inline sal_uInt16 GetOfst() const { return nOfst; }
+ void _SetOfst( const sal_uInt16 nNewOfst );
+ inline void SetOfst ( const sal_uInt16 nNewOfst );
+ inline void ManipOfst ( const sal_uInt16 nNewOfst ){ nOfst = nNewOfst; }
SwTxtFrm *GetFrmAtPos ( const SwPosition &rPos);
inline const SwTxtFrm *GetFrmAtPos ( const SwPosition &rPos) const;
// OD 07.10.2003 #110978# - return <reference> instead of <pointer>
@@ -444,10 +444,10 @@ public:
inline SwTwips GetRightMargin() const;
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
- virtual void CheckDirection( BOOL bVert );
+ virtual void CheckDirection( sal_Bool bVert );
// Liefert die Summe der Zeilenhoehen in pLine zurueck.
- USHORT GetParHeight() const;
+ sal_uInt16 GetParHeight() const;
// Liefert die Resthoehe zurueck
inline SwTwips GetRstHeight() const;
@@ -484,8 +484,8 @@ public:
static long GetMinPrtLine() { return nMinPrtLine; }
static void SetMinPrtLine( long nNew ) { nMinPrtLine = nNew; }
- inline USHORT GetCacheIdx() const { return nCacheIdx; }
- inline void SetCacheIdx( const USHORT nNew ) { nCacheIdx = nNew; }
+ inline sal_uInt16 GetCacheIdx() const { return nCacheIdx; }
+ inline void SetCacheIdx( const sal_uInt16 nNew ) { nCacheIdx = nNew; }
//Entfert die Line-Informationen aus dem Cache.
void ClearPara();
@@ -523,23 +523,23 @@ public:
long GetLineSpace( const bool _bNoPropLineSpacing = false ) const;
// liefert die erste Zeilenhoehe zurueck
- USHORT FirstLineHeight() const;
+ sal_uInt16 FirstLineHeight() const;
// Haengt FlyInCntFrm um, wenn nEnd > Index >= nStart ist.
- void MoveFlyInCnt( SwTxtFrm *pNew, USHORT nStart, USHORT nEnd );
+ void MoveFlyInCnt( SwTxtFrm *pNew, sal_uInt16 nStart, sal_uInt16 nEnd );
// Berechnet die Position von FlyInCntFrms
- USHORT CalcFlyPos( SwFrmFmt* pSearch );
+ sal_uInt16 CalcFlyPos( SwFrmFmt* pSearch );
// Ermittelt die Startposition und Schrittweite des Registers
- sal_Bool FillRegister( SwTwips& rRegStart, USHORT& rRegDiff );
+ sal_Bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
- USHORT GetLineCount( USHORT nPos ); //Ermittelt die Zeilenanzahl
+ sal_uInt16 GetLineCount( sal_uInt16 nPos ); //Ermittelt die Zeilenanzahl
//Fuer die Anzeige der Zeilennummern.
- ULONG GetAllLines() const { return nAllLines; }
- ULONG GetThisLines() const { return nThisLines;}
+ sal_uLong GetAllLines() const { return nAllLines; }
+ sal_uLong GetThisLines() const { return nThisLines;}
void RecalcAllLines();
// Stoppt Animationen innerhalb von Numerierungen
diff --git a/sw/source/core/inc/txttypes.hxx b/sw/source/core/inc/txttypes.hxx
index 559ed95a69d4..f9026574245e 100644
--- a/sw/source/core/inc/txttypes.hxx
+++ b/sw/source/core/inc/txttypes.hxx
@@ -31,10 +31,10 @@
// Ueberpruefte USHORTs, z.B. Indizes auf Arrays oder garantiert kleine
// Integerwerte, auch von aussen vorgegebene
-#define MSHORT USHORT
+#define MSHORT sal_uInt16
#define MSHRT_MAX USHRT_MAX
// Koordinaten: Breite, Hoehe und Offsets in X-/Y-Richtung sowie Ascent etc.
-#define KSHORT USHORT
+#define KSHORT sal_uInt16
#define KSHRT_MAX USHRT_MAX
// Portiontypen
diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx
index 1f5c74612a81..52ac418b3861 100755
--- a/sw/source/core/inc/unometa.hxx
+++ b/sw/source/core/inc/unometa.hxx
@@ -84,7 +84,7 @@ protected:
virtual void SAL_CALL AttachImpl(
const ::com::sun::star::uno::Reference<
::com::sun::star::text::XTextRange > & xTextRange,
- const USHORT nWhich)
+ const sal_uInt16 nWhich)
throw (::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index 6d48f11812c1..3959a815eaa2 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -90,17 +90,17 @@ class SwViewImp
mutable const SdrObject * pSdrObjCached;
mutable String sSdrObjCachedComment;
- BOOL bFirstPageInvalid :1; //Pointer auf erste Seite ungueltig?
+ sal_Bool bFirstPageInvalid :1; //Pointer auf erste Seite ungueltig?
- //BOOL bResetXorVisibility:1; //StartAction/EndAction
+ //sal_Bool bResetXorVisibility:1; //StartAction/EndAction
//HMHBOOL bShowHdlPaint :1; //LockPaint/UnlockPaint
- BOOL bResetHdlHiddenPaint:1;// -- "" --
+ sal_Bool bResetHdlHiddenPaint:1;// -- "" --
- BOOL bSmoothUpdate :1; //Meber fuer SmoothScroll
- BOOL bStopSmooth :1;
- BOOL bStopPrt :1; // Stop Printing
+ sal_Bool bSmoothUpdate :1; //Meber fuer SmoothScroll
+ sal_Bool bStopSmooth :1;
+ sal_Bool bStopPrt :1; // Stop Printing
- USHORT nRestoreActions ; //Die Anzahl der zu restaurierenden Actions (UNO)
+ sal_uInt16 nRestoreActions ; //Die Anzahl der zu restaurierenden Actions (UNO)
SwRect aSmoothRect;
// OD 12.12.2002 #103492#
@@ -116,16 +116,16 @@ class SwViewImp
/**
Returns if printer shall be stopped.
- @retval TRUE The printer shall be stopped.
- @retval FALSE else
+ @retval sal_True The printer shall be stopped.
+ @retval sal_False else
*/
- BOOL IsStopPrt() { return bStopPrt; }
+ sal_Bool IsStopPrt() { return bStopPrt; }
/**
Resets signal for stopping printing.
*/
- void ResetStopPrt() { bStopPrt = FALSE; }
+ void ResetStopPrt() { bStopPrt = sal_False; }
void SetFirstVisPage(); //Neue Ermittlung der ersten sichtbaren Seite
@@ -192,14 +192,14 @@ public:
//Verwaltung zur ersten sichtbaren Seite
inline const SwPageFrm *GetFirstVisPage() const;
inline SwPageFrm *GetFirstVisPage();
- void SetFirstVisPageInvalid() { bFirstPageInvalid = TRUE; }
+ void SetFirstVisPageInvalid() { bFirstPageInvalid = sal_True; }
- BOOL AddPaintRect( const SwRect &rRect );
+ sal_Bool AddPaintRect( const SwRect &rRect );
SwRegionRects *GetRegion() { return pRegion; }
void DelRegion();
// neues Interface fuer StarView Drawing
- inline BOOL HasDrawView() const { return 0 != pDrawView; }
+ inline sal_Bool HasDrawView() const { return 0 != pDrawView; }
SwDrawView* GetDrawView() { return pDrawView; }
const SwDrawView* GetDrawView() const { return pDrawView; }
SdrPageView*GetPageView() { return pSdrPageView; }
@@ -227,12 +227,12 @@ public:
//DECL_LINK( PaintDispatcher, SdrPaintProcRec * );
// Interface Drawing
- BOOL IsDragPossible( const Point &rPoint );
+ sal_Bool IsDragPossible( const Point &rPoint );
void NotifySizeChg( const Size &rNewSz );
//SS Fuer die Lay- bzw. IdleAction und verwandtes
- BOOL IsAction() const { return pLayAct != 0; }
- BOOL IsIdleAction() const { return pIdleAct != 0; }
+ sal_Bool IsAction() const { return pLayAct != 0; }
+ sal_Bool IsIdleAction() const { return pIdleAct != 0; }
SwLayAction &GetLayAction() { return *pLayAct; }
const SwLayAction &GetLayAction() const { return *pLayAct; }
SwLayIdle &GetIdleAction() { return *pIdleAct;}
@@ -241,13 +241,13 @@ public:
//Wenn eine Aktion laueft wird diese gebeten zu pruefen ob es
//an der zeit ist den WaitCrsr einzuschalten.
void CheckWaitCrsr();
- BOOL IsCalcLayoutProgress() const; //Fragt die LayAction wenn vorhanden.
- //TRUE wenn eine LayAction laeuft, dort wird dann auch das Flag fuer
+ sal_Bool IsCalcLayoutProgress() const; //Fragt die LayAction wenn vorhanden.
+ //sal_True wenn eine LayAction laeuft, dort wird dann auch das Flag fuer
//ExpressionFields gesetzt.
- BOOL IsUpdateExpFlds();
+ sal_Bool IsUpdateExpFlds();
- void SetRestoreActions(USHORT nSet){nRestoreActions = nSet;}
- USHORT GetRestoreActions() const{return nRestoreActions;}
+ void SetRestoreActions(sal_uInt16 nSet){nRestoreActions = nSet;}
+ sal_uInt16 GetRestoreActions() const{return nRestoreActions;}
// OD 12.12.2002 #103492#
void InitPagePreviewLayout();
diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx
index 2f8c8047c96e..7067d63a7adf 100644
--- a/sw/source/core/inc/wrong.hxx
+++ b/sw/source/core/inc/wrong.hxx
@@ -79,8 +79,8 @@ class SwWrongList
{ if( rPos >= nStart ) rPos += nStart - nEnd; }
void _Invalidate( xub_StrLen nBegin, xub_StrLen nEnd );
- void Insert(USHORT nWhere, std::vector<SwWrongArea>::iterator startPos, std::vector<SwWrongArea>::iterator endPos);
- void Remove( USHORT nIdx, USHORT nLen );
+ void Insert(sal_uInt16 nWhere, std::vector<SwWrongArea>::iterator startPos, std::vector<SwWrongArea>::iterator endPos);
+ void Remove( sal_uInt16 nIdx, sal_uInt16 nLen );
// forbidden and not implemented
SwWrongList& operator= (const SwWrongList &);
@@ -96,15 +96,15 @@ public:
inline WrongListType GetWrongListType() const { return meType; }
inline xub_StrLen GetBeginInv() const { return nBeginInvalid; }
inline xub_StrLen GetEndInv() const { return nEndInvalid; }
- inline BOOL InsideInvalid( xub_StrLen nChk ) const
+ inline sal_Bool InsideInvalid( xub_StrLen nChk ) const
{ return nChk >= nBeginInvalid && nChk <= nEndInvalid; }
void SetInvalid( xub_StrLen nBegin, xub_StrLen nEnd );
inline void Validate(){ nBeginInvalid = STRING_LEN; }
void Invalidate( xub_StrLen nBegin, xub_StrLen nEnd );
- BOOL InvalidateWrong();
- BOOL Fresh( xub_StrLen &rStart, xub_StrLen &rEnd, xub_StrLen nPos,
- xub_StrLen nLen, USHORT nIndex, xub_StrLen nCursorPos );
- USHORT GetWrongPos( xub_StrLen nValue ) const;
+ sal_Bool InvalidateWrong();
+ sal_Bool Fresh( xub_StrLen &rStart, xub_StrLen &rEnd, xub_StrLen nPos,
+ xub_StrLen nLen, sal_uInt16 nIndex, xub_StrLen nCursorPos );
+ sal_uInt16 GetWrongPos( xub_StrLen nValue ) const;
sal_Bool Check( xub_StrLen &rChk, xub_StrLen &rLn ) const;
sal_Bool InWrongWord( xub_StrLen &rChk, xub_StrLen &rLn ) const;
@@ -120,21 +120,21 @@ public:
// the other wrong list has to be inserted.
void JoinList( SwWrongList* pNext, xub_StrLen nInsertPos );
- inline xub_StrLen Len( USHORT nIdx ) const
+ inline xub_StrLen Len( sal_uInt16 nIdx ) const
{
return nIdx < maList.size() ? maList[nIdx].mnLen : 0;
}
- inline xub_StrLen Pos( USHORT nIdx ) const
+ inline xub_StrLen Pos( sal_uInt16 nIdx ) const
{
return nIdx < maList.size() ? maList[nIdx].mnPos : 0;
}
- inline USHORT Count() const { return (USHORT)maList.size(); }
+ inline sal_uInt16 Count() const { return (sal_uInt16)maList.size(); }
inline void Insert( const rtl::OUString& rType,
com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > xPropertyBag,
- xub_StrLen nNewPos, xub_StrLen nNewLen, USHORT nWhere )
+ xub_StrLen nNewPos, xub_StrLen nNewLen, sal_uInt16 nWhere )
{
std::vector<SwWrongArea>::iterator i = maList.begin();
if ( nWhere >= maList.size() )
@@ -148,14 +148,14 @@ public:
com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > xPropertyBag,
xub_StrLen nNewPos, xub_StrLen nNewLen );
- inline SwWrongList* SubList( USHORT nIdx ) const
+ inline SwWrongList* SubList( sal_uInt16 nIdx ) const
{
return nIdx < maList.size() ? maList[nIdx].mpSubList : 0;
}
- void InsertSubList( xub_StrLen nNewPos, xub_StrLen nNewLen, USHORT nWhere, SwWrongList* pSubList );
+ void InsertSubList( xub_StrLen nNewPos, xub_StrLen nNewLen, sal_uInt16 nWhere, SwWrongList* pSubList );
- inline const SwWrongArea* GetElement( USHORT nIdx ) const
+ inline const SwWrongArea* GetElement( sal_uInt16 nIdx ) const
{
return nIdx < maList.size() ? &maList[nIdx] : 0;
}
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 5c6ee5f03623..301c4a8372ec 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -878,7 +878,7 @@ void SwAnchoredDrawObject::NotifyBackground( SwPageFrm* _pPageFrm,
const SwRect& _rRect,
PrepareHint _eHint )
{
- ::Notify_Background( GetDrawObj(), _pPageFrm, _rRect, _eHint, TRUE );
+ ::Notify_Background( GetDrawObj(), _pPageFrm, _rRect, _eHint, sal_True );
}
/** method to assure that anchored object is registered at the correct
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 37ec80632153..9a1a2906866b 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -298,7 +298,7 @@ SfxPoolItem* SwFmtFrmSize::Clone( SfxItemPool* ) const
/* -----------------24.04.98 11:36-------------------
*
* --------------------------------------------------*/
-BOOL SwFmtFrmSize::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SwFmtFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -320,13 +320,13 @@ BOOL SwFmtFrmSize::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
break;
case MID_FRMSIZE_IS_SYNC_HEIGHT_TO_WIDTH:
{
- BOOL bTmp = 0xFF == GetHeightPercent();
+ sal_Bool bTmp = 0xFF == GetHeightPercent();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
case MID_FRMSIZE_IS_SYNC_WIDTH_TO_HEIGHT:
{
- BOOL bTmp = 0xFF == GetWidthPercent();
+ sal_Bool bTmp = 0xFF == GetWidthPercent();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -345,7 +345,7 @@ BOOL SwFmtFrmSize::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
break;
case MID_FRMSIZE_IS_AUTO_HEIGHT:
{
- BOOL bTmp = ATT_FIX_SIZE != GetHeightSizeType();
+ sal_Bool bTmp = ATT_FIX_SIZE != GetHeightSizeType();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -359,7 +359,7 @@ BOOL SwFmtFrmSize::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
/* -----------------24.04.98 11:36-------------------
*
* --------------------------------------------------*/
-BOOL SwFmtFrmSize::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -391,7 +391,7 @@ BOOL SwFmtFrmSize::PutValue( const uno::Any& rVal, BYTE nMemberId )
sal_Int16 nSet = 0;
rVal >>= nSet;
if(nSet >= 0 && nSet <= 0xfe)
- SetHeightPercent((BYTE)nSet);
+ SetHeightPercent((sal_uInt8)nSet);
else
bRet = sal_False;
}
@@ -401,7 +401,7 @@ BOOL SwFmtFrmSize::PutValue( const uno::Any& rVal, BYTE nMemberId )
sal_Int16 nSet = 0;
rVal >>= nSet;
if(nSet >= 0 && nSet <= 0xfe)
- SetWidthPercent((BYTE)nSet);
+ SetWidthPercent((sal_uInt8)nSet);
else
bRet = sal_False;
}
@@ -704,7 +704,7 @@ void SwFmtPageDesc::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
}
-BOOL SwFmtPageDesc::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SwFmtPageDesc::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -735,7 +735,7 @@ BOOL SwFmtPageDesc::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-BOOL SwFmtPageDesc::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SwFmtPageDesc::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1010,7 +1010,7 @@ void SwFmtCol::Calc( sal_uInt16 nGutterWidth, sal_uInt16 nAct )
}
}
-BOOL SwFmtCol::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SwFmtCol::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1026,7 +1026,7 @@ BOOL SwFmtCol::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return sal_True;
}
-BOOL SwFmtCol::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SwFmtCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1054,10 +1054,10 @@ BOOL SwFmtCol::PutValue( const uno::Any& rVal, BYTE nMemberId )
for(sal_uInt16 i = 0; i < nCount; i++)
{
SwColumn* pCol = new SwColumn;
- pCol->SetWishWidth( static_cast<USHORT>(pArray[i].Width) );
- nWidthSum = static_cast<USHORT>(nWidthSum + pArray[i].Width);
- pCol->SetLeft ( static_cast<USHORT>(MM100_TO_TWIP(pArray[i].LeftMargin)) );
- pCol->SetRight( static_cast<USHORT>(MM100_TO_TWIP(pArray[i].RightMargin)) );
+ pCol->SetWishWidth( static_cast<sal_uInt16>(pArray[i].Width) );
+ nWidthSum = static_cast<sal_uInt16>(nWidthSum + pArray[i].Width);
+ pCol->SetLeft ( static_cast<sal_uInt16>(MM100_TO_TWIP(pArray[i].LeftMargin)) );
+ pCol->SetRight( static_cast<sal_uInt16>(MM100_TO_TWIP(pArray[i].RightMargin)) );
aColumns.Insert(pCol, i);
}
bRet = sal_True;
@@ -1131,7 +1131,7 @@ sal_uInt16 SwFmtSurround::GetValueCount() const
}
-BOOL SwFmtSurround::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SwFmtSurround::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1143,19 +1143,19 @@ BOOL SwFmtSurround::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
break;
case MID_SURROUND_ANCHORONLY:
{
- BOOL bTmp = IsAnchorOnly();
+ sal_Bool bTmp = IsAnchorOnly();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
case MID_SURROUND_CONTOUR:
{
- BOOL bTmp = IsContour();
+ sal_Bool bTmp = IsContour();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
case MID_SURROUND_CONTOUROUTSIDE:
{
- BOOL bTmp = IsOutside();
+ sal_Bool bTmp = IsOutside();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -1166,7 +1166,7 @@ BOOL SwFmtSurround::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-BOOL SwFmtSurround::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SwFmtSurround::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1177,7 +1177,7 @@ BOOL SwFmtSurround::PutValue( const uno::Any& rVal, BYTE nMemberId )
{
sal_Int32 eVal = SWUnoHelper::GetEnumAsInt32( rVal );
if( eVal >= 0 && eVal < (sal_Int16)SURROUND_END )
- SetValue( static_cast<USHORT>(eVal) );
+ SetValue( static_cast<sal_uInt16>(eVal) );
else {
//exception
;
@@ -1225,7 +1225,7 @@ SfxPoolItem* SwFmtVertOrient::Clone( SfxItemPool* ) const
return new SwFmtVertOrient( nYPos, eOrient, eRelation );
}
-BOOL SwFmtVertOrient::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SwFmtVertOrient::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1264,7 +1264,7 @@ BOOL SwFmtVertOrient::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-BOOL SwFmtVertOrient::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SwFmtVertOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -1339,7 +1339,7 @@ SfxPoolItem* SwFmtHoriOrient::Clone( SfxItemPool* ) const
return new SwFmtHoriOrient( nXPos, eOrient, eRelation, bPosToggle );
}
-BOOL SwFmtHoriOrient::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SwFmtHoriOrient::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1375,7 +1375,7 @@ BOOL SwFmtHoriOrient::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
break;
case MID_HORIORIENT_PAGETOGGLE:
{
- BOOL bTmp = IsPosToggle();
+ sal_Bool bTmp = IsPosToggle();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -1386,7 +1386,7 @@ BOOL SwFmtHoriOrient::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-BOOL SwFmtHoriOrient::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -1524,7 +1524,7 @@ sal_uInt32 SwFmtAnchor::GetOrder() const
/*-----------------16.02.98 15:21-------------------
--------------------------------------------------*/
-BOOL SwFmtAnchor::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SwFmtAnchor::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1578,7 +1578,7 @@ BOOL SwFmtAnchor::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-BOOL SwFmtAnchor::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SwFmtAnchor::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1711,7 +1711,7 @@ void SwFmtURL::SetMap( const ImageMap *pM )
}
extern const SvEventDescription* lcl_GetSupportedMacroItems();
-BOOL SwFmtURL::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SwFmtURL::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1751,7 +1751,7 @@ BOOL SwFmtURL::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
break;
case MID_URL_SERVERMAP:
{
- BOOL bTmp = IsServerMap();
+ sal_Bool bTmp = IsServerMap();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -1762,7 +1762,7 @@ BOOL SwFmtURL::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-BOOL SwFmtURL::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SwFmtURL::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1802,7 +1802,7 @@ BOOL SwFmtURL::PutValue( const uno::Any& rVal, BYTE nMemberId )
bRet = SvUnoImageMap_fillImageMap( xCont, *pMap );
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case MID_URL_SERVERMAP:
@@ -1873,7 +1873,7 @@ int SwFmtFtnEndAtTxtEnd::operator==( const SfxPoolItem& rItem ) const
sSuffix == rAttr.sSuffix;
}
-BOOL SwFmtFtnEndAtTxtEnd::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SwFmtFtnEndAtTxtEnd::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -1900,14 +1900,14 @@ BOOL SwFmtFtnEndAtTxtEnd::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
case MID_NUM_TYPE : rVal <<= aFmt.GetNumberingType(); break;
case MID_PREFIX : rVal <<= OUString(sPrefix); break;
case MID_SUFFIX : rVal <<= OUString(sSuffix); break;
- default: return FALSE;
+ default: return sal_False;
}
- return TRUE;
+ return sal_True;
}
-BOOL SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
{
@@ -1936,7 +1936,7 @@ BOOL SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, BYTE nMemberId )
if(nVal >= 0)
nOffset = nVal;
else
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case MID_OWN_NUM :
@@ -1958,7 +1958,7 @@ BOOL SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, BYTE nMemberId )
SVX_NUM_CHARS_LOWER_LETTER_N == nVal ))
aFmt.SetNumberingType(nVal);
else
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case MID_PREFIX :
@@ -1973,7 +1973,7 @@ BOOL SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, BYTE nMemberId )
sSuffix = sVal;
}
break;
- default: bRet = FALSE;
+ default: bRet = sal_False;
}
return bRet;
}
@@ -2039,7 +2039,7 @@ void SwFmtChain::SetNext( SwFlyFrmFmt *pFmt )
((SwModify*)aNext.GetRegisteredIn())->Remove( &aNext );
}
-BOOL SwFmtChain::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SwFmtChain::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -2092,7 +2092,7 @@ SfxPoolItem* SwFmtLineNumber::Clone( SfxItemPool* ) const
return new SwFmtLineNumber( *this );
}
-BOOL SwFmtLineNumber::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SwFmtLineNumber::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -2101,7 +2101,7 @@ BOOL SwFmtLineNumber::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
{
case MID_LINENUMBER_COUNT:
{
- BOOL bTmp = IsCount();
+ sal_Bool bTmp = IsCount();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -2115,7 +2115,7 @@ BOOL SwFmtLineNumber::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-BOOL SwFmtLineNumber::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SwFmtLineNumber::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -2195,9 +2195,9 @@ SwTextGridItem& SwTextGridItem::operator=( const SwTextGridItem& rCpy )
return *this;
}
-BOOL SwTextGridItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SwTextGridItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nMemberId & ~CONVERT_TWIPS )
{
@@ -2245,7 +2245,7 @@ BOOL SwTextGridItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
break;
default:
DBG_ERROR("unknown SwTextGrid value");
- bRet = FALSE;
+ bRet = sal_False;
break;
}
break;
@@ -2260,16 +2260,16 @@ BOOL SwTextGridItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
break;
default:
DBG_ERROR("Unknown SwTextGridItem member");
- bRet = FALSE;
+ bRet = sal_False;
break;
}
return bRet;
}
-BOOL SwTextGridItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SwTextGridItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nMemberId & ~CONVERT_TWIPS )
{
case MID_GRID_COLOR:
@@ -2287,7 +2287,7 @@ BOOL SwTextGridItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
if( bRet && (nTmp >= 0) )
SetLines( (sal_uInt16)nTmp );
else
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case MID_GRID_RUBY_BELOW:
@@ -2310,13 +2310,13 @@ BOOL SwTextGridItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
nTmp = MM100_TO_TWIP( nTmp );
if( bRet && (nTmp >= 0) && ( nTmp <= USHRT_MAX) )
if( (nMemberId & ~CONVERT_TWIPS) == MID_GRID_BASEHEIGHT )
- SetBaseHeight( (USHORT)nTmp );
+ SetBaseHeight( (sal_uInt16)nTmp );
else if( (nMemberId & ~CONVERT_TWIPS) == MID_GRID_BASEWIDTH )
- SetBaseWidth( (USHORT)nTmp );
+ SetBaseWidth( (sal_uInt16)nTmp );
else
- SetRubyHeight( (USHORT)nTmp );
+ SetRubyHeight( (sal_uInt16)nTmp );
else
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case MID_GRID_TYPE:
@@ -2337,7 +2337,7 @@ BOOL SwTextGridItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
SetGridType( GRID_LINES_CHARS );
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -2354,13 +2354,13 @@ BOOL SwTextGridItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
}
default:
DBG_ERROR("Unknown SwTextGridItem member");
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
-void SwTextGridItem::SwitchPaperMode(BOOL bNew)
+void SwTextGridItem::SwitchPaperMode(sal_Bool bNew)
{
if( bNew == bSquaredMode )
{
@@ -2811,7 +2811,7 @@ void SwFlyFrmFmt::MakeFrms()
pFrm;
pFrm = (SwFrm*)aIter.Next() )
{
- BOOL bAdd = !pFrm->IsCntntFrm() ||
+ sal_Bool bAdd = !pFrm->IsCntntFrm() ||
!((SwCntntFrm*)pFrm)->IsFollow();
if ( FLY_AT_FLY == aAnchorAttr.GetAnchorId() && !pFrm->IsFlyFrm() )
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 5cd97d1a1d26..0f4a60c3fa5b 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -78,7 +78,7 @@
|*************************************************************************/
-BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & )
+sal_Bool SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool & )
{
if ( (SwFlowFrm::IsMoveBwdJump() || !IsPrevObjMove()))
{
@@ -103,12 +103,12 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & )
//von Leerseiten), so muss in jedemfall gemoved werden - sonst wuerde,
//falls der Frm nicht in das Blatt passt, nicht mehr auf die
//dazwischenliegenden Blaetter geachtet werden.
- BYTE nMoveAnyway = 0;
+ sal_uInt8 nMoveAnyway = 0;
SwPageFrm * const pNewPage = pNewUpper->FindPageFrm();
SwPageFrm *pOldPage = FindPageFrm();
if ( SwFlowFrm::IsMoveBwdJump() )
- return TRUE;
+ return sal_True;
if( IsInFtn() && IsInSct() )
{
@@ -121,7 +121,7 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & )
pSect = pSect->GetUpper()->FindSctFrm();
ASSERT( pSect, "Escaping footnote" );
if( pSect != pMySect )
- return FALSE;
+ return sal_False;
}
}
SWRECTFN( this )
@@ -187,7 +187,7 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & )
( pNewUpper->IsColBodyFrm() &&
!pNewUpper->GetUpper()->GetPrev() &&
!pNewUpper->GetUpper()->GetNext() ) ) ) )
- nSpace += pNewUpper->Grow( LONG_MAX, TRUE );
+ nSpace += pNewUpper->Grow( LONG_MAX, sal_True );
if ( nMoveAnyway < 3 )
{
@@ -204,7 +204,7 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & )
// dabei ist sogar die Breite egal, da ein TestFormat in der neuen Umgebung
// vorgenommen wird.
// --> OD 2007-11-26 #b6614158#
- const BYTE nBwdMoveNecessaryResult =
+ const sal_uInt8 nBwdMoveNecessaryResult =
BwdMoveNecessary( pNewPage, aRect);
const bool bObjsInNewUpper( nBwdMoveNecessaryResult == 2 ||
nBwdMoveNecessaryResult == 3 );
@@ -220,21 +220,21 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & )
!(pNewUpper->Prt().*fnRectX->fnGetWidth)() &&
( pNewUpper->GetUpper()->GetPrev() ||
pNewUpper->GetUpper()->GetNext() ) )
- return TRUE;
+ return sal_True;
else
- return FALSE; // Kein Platz, dann ist es sinnlos, zurueckzufliessen
+ return sal_False; // Kein Platz, dann ist es sinnlos, zurueckzufliessen
}
else
{
// OD 2004-05-26 #i25904# - check for space left in new upper
if ( nSpace )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
}
}
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
@@ -294,10 +294,10 @@ void SwFrm::PrepareMake()
if ( !GetUpper() )
return;
- const BOOL bCnt = IsCntntFrm();
- const BOOL bTab = IsTabFrm();
- BOOL bNoSect = IsInSct();
- BOOL bOldTabLock = FALSE, bFoll = FALSE;
+ const sal_Bool bCnt = IsCntntFrm();
+ const sal_Bool bTab = IsTabFrm();
+ sal_Bool bNoSect = IsInSct();
+ sal_Bool bOldTabLock = sal_False, bFoll = sal_False;
SwFlowFrm* pThis = bCnt ? (SwCntntFrm*)this : NULL;
if ( bTab )
@@ -311,9 +311,9 @@ void SwFrm::PrepareMake()
{
pThis = (SwSectionFrm*)this;
bFoll = pThis->IsFollow();
- bNoSect = FALSE;
+ bNoSect = sal_False;
}
- else if ( bCnt && TRUE == (bFoll = pThis->IsFollow()) &&
+ else if ( bCnt && sal_True == (bFoll = pThis->IsFollow()) &&
GetPrev() )
{
//Wenn der Master gereade ein CalcFollow ruft braucht die Kette
@@ -426,11 +426,11 @@ void SwFrm::PrepareCrsr()
if ( !GetUpper() )
return;
- const BOOL bCnt = IsCntntFrm();
- const BOOL bTab = IsTabFrm();
- BOOL bNoSect = IsInSct();
+ const sal_Bool bCnt = IsCntntFrm();
+ const sal_Bool bTab = IsTabFrm();
+ sal_Bool bNoSect = IsInSct();
- BOOL bOldTabLock = FALSE, bFoll;
+ sal_Bool bOldTabLock = sal_False, bFoll;
SwFlowFrm* pThis = bCnt ? (SwCntntFrm*)this : NULL;
if ( bTab )
@@ -442,7 +442,7 @@ void SwFrm::PrepareCrsr()
else if( IsSctFrm() )
{
pThis = (SwSectionFrm*)this;
- bNoSect = FALSE;
+ bNoSect = sal_False;
}
bFoll = pThis && pThis->IsFollow();
@@ -504,7 +504,7 @@ void SwFrm::PrepareCrsr()
// Hier wird GetPrev() zurueckgegeben, allerdings werden
// dabei leere SectionFrms ueberlesen
-SwFrm* lcl_Prev( SwFrm* pFrm, BOOL bSectPrv = TRUE )
+SwFrm* lcl_Prev( SwFrm* pFrm, sal_Bool bSectPrv = sal_True )
{
SwFrm* pRet = pFrm->GetPrev();
if( !pRet && pFrm->GetUpper() && pFrm->GetUpper()->IsSctFrm() &&
@@ -530,8 +530,8 @@ void SwFrm::MakePos()
{
if ( !bValidPos )
{
- bValidPos = TRUE;
- BOOL bUseUpper = FALSE;
+ bValidPos = sal_True;
+ sal_Bool bUseUpper = sal_False;
SwFrm* pPrv = lcl_Prev( this );
if ( pPrv &&
( !pPrv->IsCntntFrm() ||
@@ -548,19 +548,19 @@ void SwFrm::MakePos()
}
else if ( pPrv->Frm().Top() == 0 )
{
- bUseUpper = TRUE;
+ bUseUpper = sal_True;
}
}
- pPrv = lcl_Prev( this, FALSE );
- USHORT nMyType = GetType();
+ pPrv = lcl_Prev( this, sal_False );
+ sal_uInt16 nMyType = GetType();
SWRECTFN( ( IsCellFrm() && GetUpper() ? GetUpper() : this ) )
if ( !bUseUpper && pPrv )
{
aFrm.Pos( pPrv->Frm().Pos() );
if( FRM_NEIGHBOUR & nMyType )
{
- BOOL bR2L = IsRightToLeft();
+ sal_Bool bR2L = IsRightToLeft();
if( bR2L )
(aFrm.*fnRect->fnSetPosX)( (aFrm.*fnRect->fnGetLeft)() -
(aFrm.*fnRect->fnGetWidth)() );
@@ -604,13 +604,13 @@ void SwFrm::MakePos()
GetUpper()->Calc();
}
// <--
- pPrv = lcl_Prev( this, FALSE );
+ pPrv = lcl_Prev( this, sal_False );
if ( !bUseUpper && pPrv )
{
aFrm.Pos( pPrv->Frm().Pos() );
if( FRM_NEIGHBOUR & nMyType )
{
- BOOL bR2L = IsRightToLeft();
+ sal_Bool bR2L = IsRightToLeft();
if( bR2L )
(aFrm.*fnRect->fnSetPosX)( (aFrm.*fnRect->fnGetLeft)() -
(aFrm.*fnRect->fnGetWidth)() );
@@ -653,7 +653,7 @@ void SwFrm::MakePos()
aFrm.Pos().X() = aFrm.Pos().Y() = 0;
if( IsBodyFrm() && bVert && !bReverse && GetUpper() )
aFrm.Pos().X() += GetUpper()->Prt().Width() - aFrm.Width();
- bValidPos = TRUE;
+ bValidPos = sal_True;
}
}
@@ -671,7 +671,7 @@ void lcl_CheckObjects( SwSortedObjs* pSortedObjs, SwFrm* pFrm, long& rBot )
//Und dann kann es natuerlich noch Absatzgebundene
//Rahmen geben, die unterhalb ihres Absatzes stehen.
long nMax = 0;
- for ( USHORT i = 0; i < pSortedObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pSortedObjs->Count(); ++i )
{
// --> OD 2004-07-01 #i28701# - consider changed type of <SwSortedObjs>
// entries.
@@ -712,7 +712,7 @@ void SwPageFrm::MakeAll()
if ( !bValidPos )
{
// PAGES01
- bValidPos = TRUE; // positioning of the pages is taken care of by the root frame
+ bValidPos = sal_True; // positioning of the pages is taken care of by the root frame
}
if ( !bValidSize || !bValidPrtArea )
@@ -722,7 +722,7 @@ void SwPageFrm::MakeAll()
Frm().Width( 0 ); Prt().Width( 0 );
Frm().Height( 0 ); Prt().Height( 0 );
Prt().Left( 0 ); Prt().Top( 0 );
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
}
else
{
@@ -829,7 +829,7 @@ void SwPageFrm::MakeAll()
Prt().Width( Frm().Width() - ( Prt().Left()
+ pAttrs->CalcRightLine() + aBorder.Width() ) );
Prt().Height( Frm().Height() - (nTop + nBottom) );
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
}
else
{ //FixSize einstellen, bei Seiten nicht vom Upper sondern vom
@@ -872,7 +872,7 @@ void SwLayoutFrm::MakeAll()
//uebernimmt im DTor die Benachrichtigung
const SwLayNotify aNotify( this );
- BOOL bVert = IsVertical();
+ sal_Bool bVert = IsVertical();
SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : fnRectVert;
SwBorderAttrAccess *pAccess = 0;
@@ -889,7 +889,7 @@ void SwLayoutFrm::MakeAll()
if ( IsLeaveUpperAllowed() )
{
if ( !bValidSize )
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
}
else
{
@@ -897,7 +897,7 @@ void SwLayoutFrm::MakeAll()
{
//FixSize einstellen, die VarSize wird von Format() nach
//Berechnung der PrtArea eingestellt.
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
SwTwips nPrtWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)();
if( bVert && ( IsBodyFrm() || IsFtnContFrm() ) )
@@ -926,7 +926,7 @@ void SwLayoutFrm::MakeAll()
// Don't leave your upper
const SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
if( (Frm().*fnRect->fnOverStep)( nDeadLine ) )
- bValidSize = FALSE;
+ bValidSize = sal_False;
}
}
}
@@ -953,16 +953,16 @@ void SwLayoutFrm::MakeAll()
|*
|*************************************************************************/
-BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
+sal_Bool SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
{
- BOOL bSizeChgd = FALSE;
+ sal_Bool bSizeChgd = sal_False;
if ( !bValidPrtArea )
{
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
SWRECTFN( this )
- const BOOL bTxtFrm = IsTxtFrm();
+ const sal_Bool bTxtFrm = IsTxtFrm();
SwTwips nUpper = 0;
if ( bTxtFrm && ((SwTxtFrm*)this)->IsHiddenNow() )
{
@@ -997,13 +997,13 @@ BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
//geben kann (RootFrm::ImplCalcBrowseWidth())
long nMinWidth = 0;
- for (USHORT i = 0; GetDrawObjs() && i < GetDrawObjs()->Count();++i)
+ for (sal_uInt16 i = 0; GetDrawObjs() && i < GetDrawObjs()->Count();++i)
{
// --> OD 2004-07-01 #i28701# - consider changed type of
// <SwSortedObjs> entries
SwAnchoredObject* pObj = (*GetDrawObjs())[i];
const SwFrmFmt& rFmt = pObj->GetFrmFmt();
- const BOOL bFly = pObj->ISA(SwFlyFrm);
+ const sal_Bool bFly = pObj->ISA(SwFlyFrm);
if ((bFly && (WEIT_WECH == pObj->GetObjRect().Width()))
|| rFmt.GetFrmSize().GetWidthPercent())
{
@@ -1080,7 +1080,7 @@ BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
GrowFrm( nUpper );
else
ShrinkFrm( -nUpper );
- bSizeChgd = TRUE;
+ bSizeChgd = sal_True;
}
}
return bSizeChgd;
@@ -1104,8 +1104,8 @@ inline void ValidateSz( SwFrm *pFrm )
{
if ( pFrm )
{
- pFrm->bValidSize = TRUE;
- pFrm->bValidPrtArea = TRUE;
+ pFrm->bValidSize = sal_True;
+ pFrm->bValidPrtArea = sal_True;
}
}
@@ -1126,7 +1126,7 @@ void SwCntntFrm::MakeAll()
if ( ((SwTxtFrm*)this)->IsLocked() )
{
- ASSERT( FALSE, "Format fuer gelockten TxtFrm." );
+ ASSERT( sal_False, "Format fuer gelockten TxtFrm." );
return;
}
@@ -1155,31 +1155,31 @@ void SwCntntFrm::MakeAll()
//uebernimmt im DTor die Benachrichtigung
SwCntntNotify *pNotify = new SwCntntNotify( this );
- BOOL bMakePage = TRUE; //solange TRUE kann eine neue Seite
+ sal_Bool bMakePage = sal_True; //solange sal_True kann eine neue Seite
//angelegt werden (genau einmal)
- BOOL bMovedBwd = FALSE; //Wird TRUE wenn der Frame zurueckfliesst
- BOOL bMovedFwd = FALSE; //solange FALSE kann der Frm zurueck-
+ sal_Bool bMovedBwd = sal_False; //Wird sal_True wenn der Frame zurueckfliesst
+ sal_Bool bMovedFwd = sal_False; //solange sal_False kann der Frm zurueck-
//fliessen (solange, bis er einmal
//vorwaerts ge'moved wurde).
- BOOL bFormatted = FALSE; //Fuer die Witwen und Waisen Regelung
+ sal_Bool bFormatted = sal_False; //Fuer die Witwen und Waisen Regelung
//wird der letzte CntntFrm einer Kette
//u.U. zum Formatieren angeregt, dies
//braucht nur einmal zu passieren.
//Immer wenn der Frm gemoved wird muss
//das Flag zurueckgesetzt werden.
- BOOL bMustFit = FALSE; //Wenn einmal die Notbremse gezogen wurde,
+ sal_Bool bMustFit = sal_False; //Wenn einmal die Notbremse gezogen wurde,
//werden keine anderen Prepares mehr
//abgesetzt.
- BOOL bFitPromise = FALSE; //Wenn ein Absatz nicht passte, mit WouldFit
+ sal_Bool bFitPromise = sal_False; //Wenn ein Absatz nicht passte, mit WouldFit
//aber verspricht, dass er sich passend
//einstellt wird dieses Flag gesetzt.
//Wenn er dann sein Versprechen nicht haelt,
//kann kontrolliert verfahren werden.
- BOOL bMoveable;
- const BOOL bFly = IsInFly();
- const BOOL bTab = IsInTab();
- const BOOL bFtn = IsInFtn();
- const BOOL bSct = IsInSct();
+ sal_Bool bMoveable;
+ const sal_Bool bFly = IsInFly();
+ const sal_Bool bTab = IsInTab();
+ const sal_Bool bFtn = IsInFtn();
+ const sal_Bool bSct = IsInSct();
Point aOldFrmPos; //Damit bei Turnarounds jew. mit der
Point aOldPrtPos; //letzten Pos verglichen und geprueft
//werden kann, ob ein Prepare sinnvoll ist.
@@ -1193,7 +1193,7 @@ void SwCntntFrm::MakeAll()
pNotify->SetBordersJoinedWithPrev();
}
- const BOOL bKeep = IsKeep( rAttrs.GetAttrSet() );
+ const sal_Bool bKeep = IsKeep( rAttrs.GetAttrSet() );
SwSaveFtnHeight *pSaveFtn = 0;
if ( bFtn )
@@ -1238,8 +1238,8 @@ void SwCntntFrm::MakeAll()
GetUpper()->GetUpper()->IsCellFrm() ) ) &&
IsMoveable() )
{
- bMovedFwd = TRUE;
- MoveFwd( bMakePage, FALSE );
+ bMovedFwd = sal_True;
+ MoveFwd( bMakePage, sal_False );
}
// <--
}
@@ -1249,7 +1249,7 @@ void SwCntntFrm::MakeAll()
//gleich verschoben werden.
if ( lcl_Prev( this ) && ((SwTxtFrm*)this)->IsFollow() && IsMoveable() )
{
- bMovedFwd = TRUE;
+ bMovedFwd = sal_True;
// OD 2004-03-02 #106629# - If follow frame is in table, it's master
// will be the last in the current table cell. Thus, invalidate the
// printing area of the master,
@@ -1257,7 +1257,7 @@ void SwCntntFrm::MakeAll()
{
lcl_Prev( this )->InvalidatePrt();
}
- MoveFwd( bMakePage, FALSE );
+ MoveFwd( bMakePage, sal_False );
}
// OD 08.11.2002 #104840# - check footnote content for forward move.
@@ -1276,8 +1276,8 @@ void SwCntntFrm::MakeAll()
pFtnBossOfFtn != pFtnBossOfRef &&
pFtnBossOfFtn->IsBefore( pFtnBossOfRef ) )
{
- bMovedFwd = TRUE;
- MoveFwd( bMakePage, FALSE );
+ bMovedFwd = sal_True;
+ MoveFwd( bMakePage, sal_False );
}
}
}
@@ -1290,13 +1290,13 @@ void SwCntntFrm::MakeAll()
SwRect aOldFrm_StopFormat( Frm() );
SwRect aOldPrt_StopFormat( Prt() );
// <--
- if ( TRUE == (bMoveable = IsMoveable()) )
+ if ( sal_True == (bMoveable = IsMoveable()) )
{
SwFrm *pPre = GetIndPrev();
if ( CheckMoveFwd( bMakePage, bKeep, bMovedBwd ) )
{
SWREFRESHFN( this )
- bMovedFwd = TRUE;
+ bMovedFwd = sal_True;
if ( bMovedBwd )
{
//Beim zurueckfliessen wurde der Upper angeregt sich
@@ -1326,7 +1326,7 @@ void SwCntntFrm::MakeAll()
// - current frame width is 0.
// - current printing area width is 0.
// - frame width is adjusted to a value greater than 0.
- // - printing area flag is TRUE.
+ // - printing area flag is sal_True.
// Thus, it's assured that the printing area is adjusted, if the
// frame area width changes its width from 0 to something greater
// than 0.
@@ -1338,7 +1338,7 @@ void SwCntntFrm::MakeAll()
(Frm().*fnRect->fnGetWidth)() == 0 &&
(Prt().*fnRect->fnGetWidth)() == 0 )
{
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
}
(Frm().*fnRect->fnSetWidth)( nNewFrmWidth );
@@ -1374,7 +1374,7 @@ void SwCntntFrm::MakeAll()
if ( !bNoPrepAdjustFrm )
{
Prepare( PREP_ADJUST_FRM );
- bValidSize = FALSE;
+ bValidSize = sal_False;
}
// <--
}
@@ -1388,32 +1388,32 @@ void SwCntntFrm::MakeAll()
//- Er muss mit der Unterkante der PrtArea des Upper ueberlappen.
if ( !bMustFit )
{
- BOOL bWidow = TRUE;
+ sal_Bool bWidow = sal_True;
const SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
if ( bMoveable && !bFormatted && ( GetFollow() ||
( (Frm().*fnRect->fnOverStep)( nDeadLine ) ) ) )
{
- Prepare( PREP_WIDOWS_ORPHANS, 0, FALSE );
- bValidSize = bWidow = FALSE;
+ Prepare( PREP_WIDOWS_ORPHANS, 0, sal_False );
+ bValidSize = bWidow = sal_False;
}
if( (Frm().*fnRect->fnGetPos)() != aOldFrmPos ||
(Prt().*fnRect->fnGetPos)() != aOldPrtPos )
{
// In diesem Prepare erfolgt ggf. ein _InvalidateSize().
- // bValidSize wird FALSE und das Format() wird gerufen.
- Prepare( PREP_POS_CHGD, (const void*)&bFormatted, FALSE );
+ // bValidSize wird sal_False und das Format() wird gerufen.
+ Prepare( PREP_POS_CHGD, (const void*)&bFormatted, sal_False );
if ( bWidow && GetFollow() )
- { Prepare( PREP_WIDOWS_ORPHANS, 0, FALSE );
- bValidSize = FALSE;
+ { Prepare( PREP_WIDOWS_ORPHANS, 0, sal_False );
+ bValidSize = sal_False;
}
}
}
if ( !bValidSize )
{
- bValidSize = bFormatted = TRUE;
+ bValidSize = bFormatted = sal_True;
++nFormatCount;
if( nFormatCount > STOP_FLY_FORMAT )
- SetFlyLock( TRUE );
+ SetFlyLock( sal_True );
// --> OD 2006-09-25 #b6448963# - loop prevention
// No format any longer, if <cnStopFormat> consequetive formats
// without change occur.
@@ -1442,10 +1442,10 @@ void SwCntntFrm::MakeAll()
)
{
SwFrm* pOldUpper = GetUpper();
- MoveFwd( TRUE, FALSE );
+ MoveFwd( sal_True, sal_False );
if ( GetUpper() != pOldUpper )
{
- bMovedFwd = TRUE;
+ bMovedFwd = sal_True;
SWREFRESHFN( this )
continue;
}
@@ -1455,7 +1455,7 @@ void SwCntntFrm::MakeAll()
//ich zurueckfliessen kann (wenn ich mich ueberhaupt bewegen soll).
//Damit es keine Oszillation gibt, darf ich nicht gerade vorwaerts
//geflossen sein.
- BOOL bDummy;
+ sal_Bool bDummy;
if ( !lcl_Prev( this ) &&
!bMovedFwd &&
( bMoveable || ( bFly && !bTab ) ) &&
@@ -1463,13 +1463,13 @@ void SwCntntFrm::MakeAll()
&& MoveBwd( bDummy ) )
{
SWREFRESHFN( this )
- bMovedBwd = TRUE;
- bFormatted = FALSE;
+ bMovedBwd = sal_True;
+ bFormatted = sal_False;
if ( bKeep && bMoveable )
{
- if( CheckMoveFwd( bMakePage, FALSE, bMovedBwd ) )
+ if( CheckMoveFwd( bMakePage, sal_False, bMovedBwd ) )
{
- bMovedFwd = TRUE;
+ bMovedFwd = sal_True;
bMoveable = IsMoveable();
SWREFRESHFN( this )
}
@@ -1477,7 +1477,7 @@ void SwCntntFrm::MakeAll()
MakePos();
if( aOldPos != (Frm().*fnRect->fnGetPos)() )
{
- Prepare( PREP_POS_CHGD, (const void*)&bFormatted, FALSE );
+ Prepare( PREP_POS_CHGD, (const void*)&bFormatted, sal_False );
if ( !bValidSize )
{
(Frm().*fnRect->fnSetWidth)( (GetUpper()->
@@ -1487,11 +1487,11 @@ void SwCntntFrm::MakeAll()
const long nOldW = (Prt().*fnRect->fnGetWidth)();
MakePrtArea( rAttrs );
if( nOldW != (Prt().*fnRect->fnGetWidth)() )
- Prepare( PREP_FIXSIZE_CHG, 0, FALSE );
+ Prepare( PREP_FIXSIZE_CHG, 0, sal_False );
}
if( GetFollow() )
- Prepare( PREP_WIDOWS_ORPHANS, 0, FALSE );
- bValidSize = bFormatted = TRUE;
+ Prepare( PREP_WIDOWS_ORPHANS, 0, sal_False );
+ bValidSize = bFormatted = sal_True;
Format();
}
}
@@ -1519,10 +1519,10 @@ void SwCntntFrm::MakeAll()
{
SwSectionFrm* pNxtSct = pNxt->FindSctFrm();
if( pNxtSct && pSct->IsAnFollow( pNxtSct ) )
- bValidPos = FALSE;
+ bValidPos = sal_False;
}
else
- bValidPos = FALSE;
+ bValidPos = sal_False;
}
}
}
@@ -1544,7 +1544,7 @@ void SwCntntFrm::MakeAll()
!GetDrawObjs() )
// <--
{
- bValidPos = FALSE;
+ bValidPos = sal_False;
MakePos();
aOldFrmPos = (Frm().*fnRect->fnGetPos)();
aOldPrtPos = (Prt().*fnRect->fnGetPos)();
@@ -1599,8 +1599,8 @@ void SwCntntFrm::MakeAll()
}
if ( pNxt )
{
- const BOOL bMoveFwdInvalid = 0 != GetIndNext();
- const BOOL bNxtNew =
+ const sal_Bool bMoveFwdInvalid = 0 != GetIndNext();
+ const sal_Bool bNxtNew =
( 0 == (pNxt->Prt().*fnRect->fnGetHeight)() ) &&
(!pNxt->IsTxtFrm() ||!((SwTxtFrm*)pNxt)->IsHiddenNow());
@@ -1612,7 +1612,7 @@ void SwCntntFrm::MakeAll()
{
if( bMovedFwd )
pNotify->SetInvaKeep();
- bMovedFwd = FALSE;
+ bMovedFwd = sal_False;
}
}
}
@@ -1648,8 +1648,8 @@ void SwCntntFrm::MakeAll()
//Wenn ich nicht passe und nicht Spaltbar (WouldFit()) bin, so schicke
//ich meinem TxtFrmanteil die Nachricht, dass eben falls moeglich
//trotz des Attributes 'nicht aufspalten' aufgespalten werden muss.
- BOOL bMoveOrFit = FALSE;
- BOOL bDontMoveMe = !GetIndPrev();
+ sal_Bool bMoveOrFit = sal_False;
+ sal_Bool bDontMoveMe = !GetIndPrev();
if( bDontMoveMe && IsInSct() )
{
SwFtnBossFrm* pBoss = FindFtnBossFrm();
@@ -1658,10 +1658,10 @@ void SwCntntFrm::MakeAll()
}
// Finally, we are able to split table rows. Therefore, bDontMoveMe
- // can be set to FALSE:
+ // can be set to sal_False:
if( bDontMoveMe && IsInTab() &&
0 != const_cast<SwCntntFrm*>(this)->GetNextCellLeaf( MAKEPAGE_NONE ) )
- bDontMoveMe = FALSE;
+ bDontMoveMe = sal_False;
if ( bDontMoveMe && (Frm().*fnRect->fnGetHeight)() >
(GetUpper()->Prt().*fnRect->fnGetHeight)() )
@@ -1670,12 +1670,12 @@ void SwCntntFrm::MakeAll()
{
SwTwips nTmp = (GetUpper()->Prt().*fnRect->fnGetHeight)() -
(Prt().*fnRect->fnGetTop)();
- BOOL bSplit = !IsFwdMoveAllowed();
+ sal_Bool bSplit = !IsFwdMoveAllowed();
if ( nTmp > 0 && WouldFit( nTmp, bSplit, sal_False ) )
{
- Prepare( PREP_WIDOWS_ORPHANS, 0, FALSE );
- bValidSize = FALSE;
- bFitPromise = TRUE;
+ Prepare( PREP_WIDOWS_ORPHANS, 0, sal_False );
+ bValidSize = sal_False;
+ bFitPromise = sal_True;
continue;
}
/* -----------------19.02.99 12:58-------------------
@@ -1691,12 +1691,12 @@ void SwCntntFrm::MakeAll()
else if ( !bFtn && bMoveable &&
( !bFly || !FindFlyFrm()->IsColLocked() ) &&
( !bSct || !FindSctFrm()->IsColLocked() ) )
- bMoveOrFit = TRUE;
+ bMoveOrFit = sal_True;
}
#ifdef DBG_UTIL
else
{
- ASSERT( FALSE, "+TxtFrm hat WouldFit-Versprechen nicht eingehalten." );
+ ASSERT( sal_False, "+TxtFrm hat WouldFit-Versprechen nicht eingehalten." );
}
#endif
}
@@ -1715,13 +1715,13 @@ void SwCntntFrm::MakeAll()
pOldUp->GetUpper()->GetUpper()->IsSctFrm() &&
( pPre || pOldUp->GetUpper()->GetPrev() ) &&
((SwSectionFrm*)pOldUp->GetUpper()->GetUpper())->MoveAllowed(this) )
- bMovedFwd = FALSE;
+ bMovedFwd = sal_False;
const sal_Bool bCheckForGrownBody = pOldUp->IsBodyFrm();
const long nOldBodyHeight = (pOldUp->Frm().*fnRect->fnGetHeight)();
- if ( !bMovedFwd && !MoveFwd( bMakePage, FALSE ) )
- bMakePage = FALSE;
+ if ( !bMovedFwd && !MoveFwd( bMakePage, sal_False ) )
+ bMakePage = sal_False;
SWREFRESHFN( this )
// If MoveFwd moves the paragraph to the next page, a following
@@ -1732,19 +1732,19 @@ void SwCntntFrm::MakeAll()
// Therefore we only check for growing body frames.
if ( bCheckForGrownBody && ! bMovedBwd && pOldUp != GetUpper() &&
(pOldUp->Frm().*fnRect->fnGetHeight)() > nOldBodyHeight )
- bMovedFwd = FALSE;
+ bMovedFwd = sal_False;
else
- bMovedFwd = TRUE;
+ bMovedFwd = sal_True;
- bFormatted = FALSE;
+ bFormatted = sal_False;
if ( bMoveOrFit && GetUpper() == pOldUp )
{
// FME 2007-08-30 #i81146# new loop control
if ( nConsequetiveFormatsWithoutChange <= cnStopFormat )
{
- Prepare( PREP_MUST_FIT, 0, FALSE );
- bValidSize = FALSE;
- bMustFit = TRUE;
+ Prepare( PREP_MUST_FIT, 0, sal_False );
+ bValidSize = sal_False;
+ bMustFit = sal_True;
continue;
}
@@ -1793,7 +1793,7 @@ void SwCntntFrm::MakeAll()
pNotify->SetInvalidatePrevPrtArea();
}
delete pNotify;
- SetFlyLock( FALSE );
+ SetFlyLock( sal_False );
}
/*************************************************************************
@@ -1814,10 +1814,10 @@ void MakeNxt( SwFrm *pFrm, SwFrm *pNxt )
//Der erste Versuch, der Abbruch mit pFrm = 0 wenn !Valid,
//fuehrt leider zu dem Problem, dass das Keep dann u.U. nicht mehr
//korrekt beachtet wird (27417)
- const BOOL bOldPos = pFrm->GetValidPosFlag();
- const BOOL bOldSz = pFrm->GetValidSizeFlag();
- const BOOL bOldPrt = pFrm->GetValidPrtAreaFlag();
- pFrm->bValidPos = pFrm->bValidPrtArea = pFrm->bValidSize = TRUE;
+ const sal_Bool bOldPos = pFrm->GetValidPosFlag();
+ const sal_Bool bOldSz = pFrm->GetValidSizeFlag();
+ const sal_Bool bOldPrt = pFrm->GetValidPrtAreaFlag();
+ pFrm->bValidPos = pFrm->bValidPrtArea = pFrm->bValidSize = sal_True;
//fix(29272): Nicht MakeAll rufen, dort wird evtl. pFrm wieder invalidert
//und kommt rekursiv wieder herein.
@@ -1859,7 +1859,7 @@ void MakeNxt( SwFrm *pFrm, SwFrm *pNxt )
// Diese Routine ueberprueft, ob zwischen dem FtnBoss von pFrm und dem
// von pNxt keine anderen FtnBosse liegen
-BOOL lcl_IsNextFtnBoss( const SwFrm *pFrm, const SwFrm* pNxt )
+sal_Bool lcl_IsNextFtnBoss( const SwFrm *pFrm, const SwFrm* pNxt )
{
ASSERT( pFrm && pNxt, "lcl_IsNextFtnBoss: No Frames?" );
pFrm = pFrm->FindFtnBossFrm();
@@ -1875,9 +1875,9 @@ BOOL lcl_IsNextFtnBoss( const SwFrm *pFrm, const SwFrm* pNxt )
}
// --> OD 2007-11-26 #b6614158#
-BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
+sal_Bool SwCntntFrm::_WouldFit( SwTwips nSpace,
SwLayoutFrm *pNewUpper,
- BOOL bTstMove,
+ sal_Bool bTstMove,
const bool bObjsInNewUpper )
// <--
{
@@ -1889,12 +1889,12 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
if ( IsInFtn() )
{
if( !lcl_IsNextFtnBoss( pNewUpper, this ) )
- return TRUE;
+ return sal_True;
pFtnFrm = FindFtnFrm();
}
- BOOL bRet;
- BOOL bSplit = !pNewUpper->Lower();
+ sal_Bool bRet;
+ sal_Bool bSplit = !pNewUpper->Lower();
SwCntntFrm *pFrm = this;
const SwFrm *pTmpPrev = pNewUpper->Lower();
if( pTmpPrev && pTmpPrev->IsFtnFrm() )
@@ -1906,7 +1906,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
// --> FME 2005-03-31 #b6236853# #i46181#
SwTwips nSecondCheck = 0;
SwTwips nOldSpace = nSpace;
- BOOL bOldSplit = bSplit;
+ sal_Bool bOldSplit = bSplit;
// <--
if ( bTstMove || IsInFly() || ( IsInSct() &&
@@ -1939,7 +1939,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
)
)
{
- bTstMove = TRUE;
+ bTstMove = sal_True;
bRet = ((SwTxtFrm*)pFrm)->TestFormat( pTmpPrev, nSpace, bSplit );
}
else
@@ -2007,7 +2007,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
if ( nSpace < 0 )
{
- bRet = FALSE;
+ bRet = sal_False;
// --> FME 2005-03-31 #b6236853# #i46181#
if ( nSecondCheck > 0 )
@@ -2024,8 +2024,8 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
const bool bSecondRet = nOldSpace >= 0 && pFrm->WouldFit( nOldSpace, bOldSplit, sal_False );
if ( bSecondRet && bOldSplit && nOldSpace >= 0 )
{
- bRet = TRUE;
- bSplit = TRUE;
+ bRet = sal_True;
+ bSplit = sal_True;
}
}
// <--
@@ -2039,7 +2039,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
nSpace -= rAttrs.GetULSpace().GetLower();
if ( nSpace < 0 )
{
- bRet = FALSE;
+ bRet = sal_False;
}
}
@@ -2053,11 +2053,11 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
}
// OD 11.04.2003 #108824# - If last follow frame of <this> text
// frame isn't valid, a formatting of the next content frame
- // doesn't makes sense. Thus, return TRUE.
+ // doesn't makes sense. Thus, return sal_True.
if ( IsAnFollow( pFrm ) && !pFrm->IsValid() )
{
ASSERT( false, "Only a warning for task 108824:/n<SwCntntFrm::_WouldFit(..) - follow not valid!" );
- return TRUE;
+ return sal_True;
}
}
SwFrm *pNxt;
@@ -2072,7 +2072,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
if ( bTstMove &&
( pNxt->GetDrawObjs() || bObjsInNewUpper ) )
{
- return TRUE;
+ return sal_True;
}
// <--
diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index f64752a18708..854012ca9e57 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -47,7 +47,7 @@
#include "sectfrm.hxx" // wg. FtnAtEnd-Flag
// ftnfrm.cxx:
-void lcl_RemoveFtns( SwFtnBossFrm* pBoss, BOOL bPageOnly, BOOL bEndNotes );
+void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes );
/*************************************************************************
@@ -89,20 +89,20 @@ SwColumnFrm::~SwColumnFrm()
|*
|*************************************************************************/
-void MA_FASTCALL lcl_RemoveColumns( SwLayoutFrm *pCont, USHORT nCnt )
+void MA_FASTCALL lcl_RemoveColumns( SwLayoutFrm *pCont, sal_uInt16 nCnt )
{
ASSERT( pCont && pCont->Lower() && pCont->Lower()->IsColumnFrm(),
"Keine Spalten zu entfernen." );
SwColumnFrm *pColumn = (SwColumnFrm*)pCont->Lower();
- ::lcl_RemoveFtns( pColumn, TRUE, TRUE );
+ ::lcl_RemoveFtns( pColumn, sal_True, sal_True );
while ( pColumn->GetNext() )
{
ASSERT( pColumn->GetNext()->IsColumnFrm(),
"Nachbar von ColFrm kein ColFrm." );
pColumn = (SwColumnFrm*)pColumn->GetNext();
}
- for ( USHORT i = 0; i < nCnt; ++i )
+ for ( sal_uInt16 i = 0; i < nCnt; ++i )
{
SwColumnFrm *pTmp = (SwColumnFrm*)pColumn->GetPrev();
pColumn->Cut();
@@ -111,7 +111,7 @@ void MA_FASTCALL lcl_RemoveColumns( SwLayoutFrm *pCont, USHORT nCnt )
}
}
-SwLayoutFrm * MA_FASTCALL lcl_FindColumns( SwLayoutFrm *pLay, USHORT nCount )
+SwLayoutFrm * MA_FASTCALL lcl_FindColumns( SwLayoutFrm *pLay, sal_uInt16 nCount )
{
SwFrm *pCol = pLay->Lower();
if ( pLay->IsPageFrm() )
@@ -120,7 +120,7 @@ SwLayoutFrm * MA_FASTCALL lcl_FindColumns( SwLayoutFrm *pLay, USHORT nCount )
if ( pCol && pCol->IsColumnFrm() )
{
SwFrm *pTmp = pCol;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; pTmp; pTmp = pTmp->GetNext(), ++i )
/* do nothing */;
return i == nCount ? (SwLayoutFrm*)pCol : 0;
@@ -129,10 +129,10 @@ SwLayoutFrm * MA_FASTCALL lcl_FindColumns( SwLayoutFrm *pLay, USHORT nCount )
}
-static BOOL lcl_AddColumns( SwLayoutFrm *pCont, USHORT nCount )
+static sal_Bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount )
{
SwDoc *pDoc = pCont->GetFmt()->GetDoc();
- const BOOL bMod = pDoc->IsModified();
+ const sal_Bool bMod = pDoc->IsModified();
//Format sollen soweit moeglich geshared werden. Wenn es also schon einen
//Nachbarn mit den selben Spalteneinstellungen gibt, so koennen die
@@ -146,7 +146,7 @@ static BOOL lcl_AddColumns( SwLayoutFrm *pCont, USHORT nCount )
SwClientIter aIter( *pAttrOwner->GetFmt() );
SwLayoutFrm *pNeighbour = (SwLayoutFrm*)aIter.First( TYPE(SwLayoutFrm) );
- USHORT nAdd = 0;
+ sal_uInt16 nAdd = 0;
SwFrm *pCol = pCont->Lower();
if ( pCol && pCol->IsColumnFrm() )
for ( nAdd = 1; pCol; pCol = pCol->GetNext(), ++nAdd )
@@ -160,19 +160,19 @@ static BOOL lcl_AddColumns( SwLayoutFrm *pCont, USHORT nCount )
pNeighbour = (SwLayoutFrm*)aIter.Next();
}
- BOOL bRet;
+ sal_Bool bRet;
SwTwips nMax = pCont->IsPageBodyFrm() ?
pCont->FindPageFrm()->GetMaxFtnHeight() : LONG_MAX;
if ( pNeighbourCol )
{
- bRet = FALSE;
+ bRet = sal_False;
SwFrm *pTmp = pCont->Lower();
while ( pTmp )
{
pTmp = pTmp->GetNext();
pNeighbourCol = (SwLayoutFrm*)pNeighbourCol->GetNext();
}
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
SwColumnFrm *pTmpCol = new SwColumnFrm( pNeighbourCol->GetFmt() );
pTmpCol->SetMaxFtnHeight( nMax );
@@ -182,8 +182,8 @@ static BOOL lcl_AddColumns( SwLayoutFrm *pCont, USHORT nCount )
}
else
{
- bRet = TRUE;
- for ( USHORT i = 0; i < nCount; ++i )
+ bRet = sal_True;
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
SwFrmFmt *pFmt = pDoc->MakeFrmFmt( aEmptyStr, pDoc->GetDfltFrmFmt());
SwColumnFrm *pTmp = new SwColumnFrm( pFmt );
@@ -206,7 +206,7 @@ static BOOL lcl_AddColumns( SwLayoutFrm *pCont, USHORT nCount )
* --------------------------------------------------*/
void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
- const BOOL bChgFtn )
+ const sal_Bool bChgFtn )
{
if ( rOld.GetNumCols() <= 1 && rNew.GetNumCols() <= 1 && !bChgFtn )
return;
@@ -219,7 +219,7 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
}
// <--
- USHORT nNewNum, nOldNum = 1;
+ sal_uInt16 nNewNum, nOldNum = 1;
if( Lower() && Lower()->IsColumnFrm() )
{
SwFrm* pCol = Lower();
@@ -229,14 +229,14 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
nNewNum = rNew.GetNumCols();
if( !nNewNum )
++nNewNum;
- BOOL bAtEnd;
+ sal_Bool bAtEnd;
if( IsSctFrm() )
bAtEnd = ((SwSectionFrm*)this)->IsAnyNoteAtEnd();
else
- bAtEnd = FALSE;
+ bAtEnd = sal_False;
//Einstellung der Spaltenbreiten ist nur bei neuen Formaten notwendig.
- BOOL bAdjustAttributes = nOldNum != rOld.GetNumCols();
+ sal_Bool bAdjustAttributes = nOldNum != rOld.GetNumCols();
//Wenn die Spaltenanzahl unterschiedlich ist, wird der Inhalt
//gesichert und restored.
@@ -248,7 +248,7 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
// SaveCntnt wuerde auch den Inhalt der Fussnotencontainer aufsaugen
// und im normalen Textfluss unterbringen.
if( IsPageBodyFrm() )
- pDoc->GetRootFrm()->RemoveFtns( (SwPageFrm*)GetUpper(), TRUE, FALSE );
+ pDoc->GetRootFrm()->RemoveFtns( (SwPageFrm*)GetUpper(), sal_True, sal_False );
pSave = ::SaveCntnt( this );
//Wenn Spalten existieren, jetzt aber eine Spaltenanzahl von
@@ -276,11 +276,11 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
if ( nOldNum > nNewNum )
{
::lcl_RemoveColumns( this, nOldNum - nNewNum );
- bAdjustAttributes = TRUE;
+ bAdjustAttributes = sal_True;
}
else if( nOldNum < nNewNum )
{
- USHORT nAdd = nNewNum - nOldNum;
+ sal_uInt16 nAdd = nNewNum - nOldNum;
bAdjustAttributes = lcl_AddColumns( this, nAdd );
}
}
@@ -290,14 +290,14 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
if ( rOld.GetLineWidth() != rNew.GetLineWidth() ||
rOld.GetWishWidth() != rNew.GetWishWidth() ||
rOld.IsOrtho() != rNew.IsOrtho() )
- bAdjustAttributes = TRUE;
+ bAdjustAttributes = sal_True;
else
{
- USHORT nCount = Min( rNew.GetColumns().Count(), rOld.GetColumns().Count() );
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = Min( rNew.GetColumns().Count(), rOld.GetColumns().Count() );
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
if ( !(*rOld.GetColumns()[i] == *rNew.GetColumns()[i]) )
{
- bAdjustAttributes = TRUE;
+ bAdjustAttributes = sal_True;
break;
}
}
@@ -327,7 +327,7 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
|*
|*************************************************************************/
-void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, BOOL bAdjustAttributes )
+void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttributes )
{
if( !Lower()->GetNext() )
{
@@ -335,7 +335,7 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, BOOL bAdjustAttributes )
return;
}
- const BOOL bVert = IsVertical();
+ const sal_Bool bVert = IsVertical();
SwRectFn fnRect = bVert ? fnRectVert : fnRectHori;
//Ist ein Pointer da, oder sollen wir die Attribute einstellen,
@@ -360,26 +360,26 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, BOOL bAdjustAttributes )
//Die Breiten werden mitgezaehlt, damit wir dem letzten den Rest geben
//koennen.
SwTwips nAvail = (Prt().*fnRect->fnGetWidth)();
- const BOOL bLine = pAttr->GetLineAdj() != COLADJ_NONE;
- const USHORT nMin = bLine ? USHORT( 20 + ( pAttr->GetLineWidth() / 2) ) : 0;
+ const sal_Bool bLine = pAttr->GetLineAdj() != COLADJ_NONE;
+ const sal_uInt16 nMin = bLine ? sal_uInt16( 20 + ( pAttr->GetLineWidth() / 2) ) : 0;
- const BOOL bR2L = IsRightToLeft();
+ const sal_Bool bR2L = IsRightToLeft();
SwFrm *pCol = bR2L ? GetLastLower() : Lower();
// --> FME 2004-07-16 #i27399#
// bOrtho means we have to adjust the column frames manually. Otherwise
// we may use the values returned by CalcColWidth:
- const BOOL bOrtho = pAttr->IsOrtho() && pAttr->GetNumCols() > 0;
+ const sal_Bool bOrtho = pAttr->IsOrtho() && pAttr->GetNumCols() > 0;
long nGutter = 0;
// <--
- for ( USHORT i = 0; i < pAttr->GetNumCols(); ++i )
+ for ( sal_uInt16 i = 0; i < pAttr->GetNumCols(); ++i )
{
if( !bOrtho )
{
const SwTwips nWidth = i == (pAttr->GetNumCols() - 1) ?
nAvail :
- pAttr->CalcColWidth( i, USHORT( (Prt().*fnRect->fnGetWidth)() ) );
+ pAttr->CalcColWidth( i, sal_uInt16( (Prt().*fnRect->fnGetWidth)() ) );
const Size aColSz = bVert ?
Size( Prt().Width(), nWidth ) :
@@ -407,8 +407,8 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, BOOL bAdjustAttributes )
//Beruecksichtigung finden. Ueberall wo zwei Spalten aufeinanderstossen
//wird jeweils rechts bzw. links ein Sicherheitsabstand von 20 plus
//der halben Penbreite einkalkuliert.
- const USHORT nLeft = pC->GetLeft();
- const USHORT nRight = pC->GetRight();
+ const sal_uInt16 nLeft = pC->GetLeft();
+ const sal_uInt16 nRight = pC->GetRight();
aLR.SetLeft ( nLeft );
aLR.SetRight( nRight );
@@ -450,7 +450,7 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, BOOL bAdjustAttributes )
{
long nInnerWidth = ( nAvail - nGutter ) / pAttr->GetNumCols();
pCol = Lower();
- for( USHORT i = 0; i < pAttr->GetNumCols(); pCol = pCol->GetNext(), ++i )
+ for( sal_uInt16 i = 0; i < pAttr->GetNumCols(); pCol = pCol->GetNext(), ++i )
{
SwTwips nWidth;
if ( i == pAttr->GetNumCols() - 1 )
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index 901050414774..82bce24fc8ee 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -133,13 +133,13 @@
// OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
-ULONG SwProtocol::nRecord = 0;
+sal_uLong SwProtocol::nRecord = 0;
SwImplProtocol* SwProtocol::pImpl = NULL;
-ULONG lcl_GetFrameId( const SwFrm* pFrm )
+sal_uLong lcl_GetFrameId( const SwFrm* pFrm )
{
#ifdef DBG_UTIL
- static BOOL bFrameId = FALSE;
+ static sal_Bool bFrameId = sal_False;
if( bFrameId )
return pFrm->GetFrmId();
#endif
@@ -154,28 +154,28 @@ class SwImplProtocol
SvUShortsSort *pFrmIds; // welche FrmIds sollen aufgezeichnet werden ( NULL == alle )
SvLongs *pVar; // Variables
ByteString aLayer; // Einrueckung der Ausgabe (" " pro Start/End)
- USHORT nTypes; // welche Typen sollen aufgezeichnet werden
- USHORT nLineCount; // Ausgegebene Zeilen
- USHORT nMaxLines; // Maximal auszugebende Zeilen
- BYTE nInitFile; // Bereich (FrmId,FrmType,Record) beim Einlesen der INI-Datei
- BYTE nTestMode; // Special fuer Testformatierung, es wird ggf. nur
+ sal_uInt16 nTypes; // welche Typen sollen aufgezeichnet werden
+ sal_uInt16 nLineCount; // Ausgegebene Zeilen
+ sal_uInt16 nMaxLines; // Maximal auszugebende Zeilen
+ sal_uInt8 nInitFile; // Bereich (FrmId,FrmType,Record) beim Einlesen der INI-Datei
+ sal_uInt8 nTestMode; // Special fuer Testformatierung, es wird ggf. nur
// innerhalb einer Testformatierung aufgezeichnet.
- void _Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, void* pParam );
- BOOL NewStream();
+ void _Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam );
+ sal_Bool NewStream();
void CheckLine( ByteString& rLine );
- void SectFunc( ByteString &rOut, const SwFrm* pFrm, ULONG nAct, void* pParam );
+ void SectFunc( ByteString &rOut, const SwFrm* pFrm, sal_uLong nAct, void* pParam );
public:
SwImplProtocol();
~SwImplProtocol();
// Aufzeichnen
- void Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, void* pParam )
+ void Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam )
{ if( pStream ) _Record( pFrm, nFunction, nAct, pParam ); }
- BOOL InsertFrm( USHORT nFrmId ); // FrmId aufnehmen zum Aufzeichnen
- BOOL DeleteFrm( USHORT nFrmId ); // FrmId entfernen, diesen nicht mehr Aufzeichnen
+ sal_Bool InsertFrm( sal_uInt16 nFrmId ); // FrmId aufnehmen zum Aufzeichnen
+ sal_Bool DeleteFrm( sal_uInt16 nFrmId ); // FrmId entfernen, diesen nicht mehr Aufzeichnen
void FileInit(); // Auslesen der INI-Datei
void ChkStream() { if( !pStream ) NewStream(); }
- void SnapShot( const SwFrm* pFrm, ULONG nFlags );
- void GetVar( const USHORT nNo, long& rVar )
+ void SnapShot( const SwFrm* pFrm, sal_uLong nFlags );
+ void GetVar( const sal_uInt16 nNo, long& rVar )
{ if( pVar && nNo < pVar->Count() ) rVar = (*pVar)[ nNo ]; }
};
@@ -198,10 +198,10 @@ class SwImplEnterLeave
{
protected:
const SwFrm* pFrm; // Der Frame,
- ULONG nFunction, nAction; // die Funktion, ggf. die Aktion
+ sal_uLong nFunction, nAction; // die Funktion, ggf. die Aktion
void* pParam; // und weitere Parameter
public:
- SwImplEnterLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
+ SwImplEnterLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
: pFrm( pF ), nFunction( nFunct ), nAction( nAct ), pParam( pPar ) {}
virtual void Enter(); // Ausgabe beim Eintritt
virtual void Leave(); // Ausgabe beim Verlassen
@@ -211,16 +211,16 @@ class SwSizeEnterLeave : public SwImplEnterLeave
{
long nFrmHeight;
public:
- SwSizeEnterLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
+ SwSizeEnterLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrmHeight( pF->Frm().Height() ) {}
virtual void Leave(); // Ausgabe der Groessenaenderung
};
class SwUpperEnterLeave : public SwImplEnterLeave
{
- USHORT nFrmId;
+ sal_uInt16 nFrmId;
public:
- SwUpperEnterLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
+ SwUpperEnterLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrmId( 0 ) {}
virtual void Enter(); // Ausgabe
virtual void Leave(); // Ausgabe der FrmId des Uppers
@@ -230,17 +230,17 @@ class SwFrmChangesLeave : public SwImplEnterLeave
{
SwRect aFrm;
public:
- SwFrmChangesLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
+ SwFrmChangesLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ), aFrm( pF->Frm() ) {}
virtual void Enter(); // keine Ausgabe
virtual void Leave(); // Ausgabe bei Aenderung der Frm-Area
};
-void SwProtocol::Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, void* pParam )
+void SwProtocol::Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam )
{
if( Start() )
{ // Hier landen wir, wenn im Debugger SwProtocol::nRecord mit PROT_INIT(0x1) oderiert wurde
- BOOL bFinit = FALSE; // Dies bietet im Debugger die Moeglichkeit,
+ sal_Bool bFinit = sal_False; // Dies bietet im Debugger die Moeglichkeit,
if( bFinit ) // die Aufzeichnung dieser Action zu beenden
{
nRecord &= ~nFunction; // Diese Funktion nicht mehr aufzeichnen
@@ -289,13 +289,13 @@ void SwProtocol::Stop()
// Creates a more or less detailed snapshot of the layout structur
-void SwProtocol::SnapShot( const SwFrm* pFrm, ULONG nFlags )
+void SwProtocol::SnapShot( const SwFrm* pFrm, sal_uLong nFlags )
{
if( pImpl )
pImpl->SnapShot( pFrm, nFlags );
}
-void SwProtocol::GetVar( const USHORT nNo, long& rVar )
+void SwProtocol::GetVar( const sal_uInt16 nNo, long& rVar )
{
if( pImpl )
pImpl->GetVar( nNo, rVar );
@@ -308,7 +308,7 @@ SwImplProtocol::SwImplProtocol()
NewStream();
}
-BOOL SwImplProtocol::NewStream()
+sal_Bool SwImplProtocol::NewStream()
{
XubString aName( "dbg_lay.out", RTL_TEXTENCODING_MS_1252 );
nLineCount = 0;
@@ -382,26 +382,26 @@ void SwImplProtocol::CheckLine( ByteString& rLine )
nInitFile = 0; // Nanu: Unbekannter Bereich?
rLine.Erase( 0, aTmp.Len() + 1 );
}
- USHORT nToks = rLine.GetTokenCount( ' ' ); // Blanks (oder Tabs) sind die Trenner
- for( USHORT i=0; i < nToks; ++i )
+ sal_uInt16 nToks = rLine.GetTokenCount( ' ' ); // Blanks (oder Tabs) sind die Trenner
+ for( sal_uInt16 i=0; i < nToks; ++i )
{
ByteString aTok = rLine.GetToken( i, ' ' );
- BOOL bNo = FALSE;
+ sal_Bool bNo = sal_False;
if( '!' == aTok.GetChar(0) )
{
- bNo = TRUE; // Diese(n) Funktion/Typ entfernen
+ bNo = sal_True; // Diese(n) Funktion/Typ entfernen
aTok.Erase( 0, 1 );
}
if( aTok.Len() )
{
- ULONG nVal;
+ sal_uLong nVal;
sscanf( aTok.GetBuffer(), "%li", &nVal );
switch ( nInitFile )
{
- case 1: InsertFrm( USHORT( nVal ) ); // FrmId aufnehmen
+ case 1: InsertFrm( sal_uInt16( nVal ) ); // FrmId aufnehmen
break;
case 2: {
- USHORT nNew = (USHORT)nVal;
+ sal_uInt16 nNew = (sal_uInt16)nVal;
if( bNo )
nTypes &= ~nNew; // Typ entfernen
else
@@ -409,7 +409,7 @@ void SwImplProtocol::CheckLine( ByteString& rLine )
}
break;
case 3: {
- ULONG nOld = SwProtocol::Record();
+ sal_uLong nOld = SwProtocol::Record();
if( bNo )
nOld &= ~nVal; // Funktion entfernen
else
@@ -418,14 +418,14 @@ void SwImplProtocol::CheckLine( ByteString& rLine )
}
break;
case 4: {
- BYTE nNew = (BYTE)nVal;
+ sal_uInt8 nNew = (sal_uInt8)nVal;
if( bNo )
nTestMode &= ~nNew; // TestMode zuruecksetzen
else
nTestMode |= nNew; // TestMode setzen
}
break;
- case 5: nMaxLines = (USHORT)nVal;
+ case 5: nMaxLines = (sal_uInt16)nVal;
break;
case 6: pVar->Insert( (long)nVal, pVar->Count() );
break;
@@ -471,7 +471,7 @@ void SwImplProtocol::FileInit()
* lcl_Start sorgt fuer Einrueckung um zwei Blanks bei ACT_START
* und nimmt diese bei ACT_END wieder zurueck.
* --------------------------------------------------*/
-void lcl_Start( ByteString& rOut, ByteString& rLay, ULONG nAction )
+void lcl_Start( ByteString& rOut, ByteString& rLay, sal_uLong nAction )
{
if( nAction == ACT_START )
{
@@ -560,12 +560,12 @@ void lcl_FrameType( ByteString& rOut, const SwFrm* pFrm )
* ob die FrmId und der FrameType zu den aufzuzeichnenden gehoeren.
* --------------------------------------------------*/
-void SwImplProtocol::_Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, void* pParam )
+void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam )
{
- USHORT nSpecial = 0;
+ sal_uInt16 nSpecial = 0;
if( nSpecial ) // Debugger-Manipulationsmoeglichkeit
{
- USHORT nId = USHORT(lcl_GetFrameId( pFrm ));
+ sal_uInt16 nId = sal_uInt16(lcl_GetFrameId( pFrm ));
switch ( nSpecial )
{
case 1: InsertFrm( nId ); break;
@@ -578,7 +578,7 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, vo
if( !pStream && !NewStream() )
return; // Immer noch kein Stream
- if( pFrmIds && !pFrmIds->Seek_Entry( USHORT(lcl_GetFrameId( pFrm )) ) )
+ if( pFrmIds && !pFrmIds->Seek_Entry( sal_uInt16(lcl_GetFrameId( pFrm )) ) )
return; // gehoert nicht zu den gewuenschten FrmIds
if( !(pFrm->GetType() & nTypes) )
@@ -586,7 +586,7 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, vo
if( 1 == nTestMode && nFunction != PROT_TESTFORMAT )
return; // Wir sollen nur innerhalb einer Testformatierung aufzeichnen
- BOOL bTmp = FALSE;
+ sal_Bool bTmp = sal_False;
ByteString aOut = aLayer;
aOut += ByteString::CreateFromInt64( lcl_GetFrameId( pFrm ) );
aOut += ' ';
@@ -600,13 +600,13 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, vo
if( nAct == ACT_START )
lcl_Flags( aOut, pFrm );
break;
- case PROT_MOVE_FWD: bTmp = TRUE; // NoBreak
+ case PROT_MOVE_FWD: bTmp = sal_True; // NoBreak
case PROT_MOVE_BWD: aOut += ( nFunction == bTmp ) ? "Fwd" : "Bwd";
lcl_Start( aOut, aLayer, nAct );
if( pParam )
{
aOut += ' ';
- aOut += ByteString::CreateFromInt32( *((USHORT*)pParam) );
+ aOut += ByteString::CreateFromInt32( *((sal_uInt16*)pParam) );
}
break;
case PROT_GROW_TST: if( ACT_START != nAct )
@@ -618,7 +618,7 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, vo
aOut += "TestShrink";
break;
case PROT_ADJUSTN :
- case PROT_SHRINK: bTmp = TRUE; // NoBreak
+ case PROT_SHRINK: bTmp = sal_True; // NoBreak
case PROT_GROW: aOut += !bTmp ? "Grow" :
( nFunction == PROT_SHRINK ? "Shrink" : "AdjustNgbhd" );
lcl_Start( aOut, aLayer, nAct );
@@ -651,7 +651,7 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, vo
break;
case PROT_SECTION: SectFunc( aOut, pFrm, nAct, pParam );
break;
- case PROT_CUT: bTmp = TRUE; // NoBreak
+ case PROT_CUT: bTmp = sal_True; // NoBreak
case PROT_PASTE: aOut += bTmp ? "Cut from " : "Paste to ";
aOut += ByteString::CreateFromInt64( lcl_GetFrameId( (SwFrm*)pParam ) );
break;
@@ -707,20 +707,20 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, vo
* hier werden die Ausgaben rund um SectionFrms abgehandelt.
* --------------------------------------------------*/
-void SwImplProtocol::SectFunc( ByteString &rOut, const SwFrm* , ULONG nAct, void* pParam )
+void SwImplProtocol::SectFunc( ByteString &rOut, const SwFrm* , sal_uLong nAct, void* pParam )
{
- BOOL bTmp = FALSE;
+ sal_Bool bTmp = sal_False;
switch( nAct )
{
case ACT_MERGE: rOut += "Merge Section ";
rOut += ByteString::CreateFromInt64( lcl_GetFrameId( (SwFrm*)pParam ) );
break;
- case ACT_CREATE_MASTER: bTmp = TRUE; // NoBreak
+ case ACT_CREATE_MASTER: bTmp = sal_True; // NoBreak
case ACT_CREATE_FOLLOW: rOut += "Create Section ";
rOut += bTmp ? "Master to " : "Follow from ";
rOut += ByteString::CreateFromInt64( lcl_GetFrameId( (SwFrm*)pParam ) );
break;
- case ACT_DEL_MASTER: bTmp = TRUE; // NoBreak
+ case ACT_DEL_MASTER: bTmp = sal_True; // NoBreak
case ACT_DEL_FOLLOW: rOut += "Delete Section ";
rOut += bTmp ? "Master to " : "Follow from ";
rOut += ByteString::CreateFromInt64( lcl_GetFrameId( (SwFrm*)pParam ) );
@@ -734,34 +734,34 @@ void SwImplProtocol::SectFunc( ByteString &rOut, const SwFrm* , ULONG nAct, void
* pFrmIds angelegt wird, werden nur noch die enthaltenen FrmIds aufgezeichnet.
* --------------------------------------------------*/
-BOOL SwImplProtocol::InsertFrm( USHORT nId )
+sal_Bool SwImplProtocol::InsertFrm( sal_uInt16 nId )
{
if( !pFrmIds )
pFrmIds = new SvUShortsSort(5,5);
if( pFrmIds->Seek_Entry( nId ) )
- return FALSE;
+ return sal_False;
pFrmIds->Insert( nId );
- return TRUE;
+ return sal_True;
}
/* -----------------11.01.99 11:52-------------------
* SwImplProtocol::DeleteFrm(..) entfernt eine FrmId aus dem pFrmIds-Array,
* so dass diese Frame nicht mehr aufgezeichnet wird.
* --------------------------------------------------*/
-BOOL SwImplProtocol::DeleteFrm( USHORT nId )
+sal_Bool SwImplProtocol::DeleteFrm( sal_uInt16 nId )
{
- USHORT nPos;
+ sal_uInt16 nPos;
if( !pFrmIds || !pFrmIds->Seek_Entry( nId, &nPos ) )
- return FALSE;
+ return sal_False;
pFrmIds->Remove( nPos );
- return TRUE;
+ return sal_True;
}
/*-----------------20.9.2001 10:29------------------
* SwProtocol::SnapShot(..)
* creates a snapshot of the given frame and its content.
* --------------------------------------------------*/
-void SwImplProtocol::SnapShot( const SwFrm* pFrm, ULONG nFlags )
+void SwImplProtocol::SnapShot( const SwFrm* pFrm, sal_uLong nFlags )
{
while( pFrm )
{
@@ -770,7 +770,7 @@ void SwImplProtocol::SnapShot( const SwFrm* pFrm, ULONG nFlags )
{
aLayer += "[ ";
const SwSortedObjs &rObjs = *pFrm->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
if ( pObj->ISA(SwFlyFrm) )
@@ -797,7 +797,7 @@ void SwImplProtocol::SnapShot( const SwFrm* pFrm, ULONG nFlags )
* Die Aufgabe ist es abhaengig von der Funktion das richtige SwImplEnterLeave-Objekt
* zu erzeugen, alles weitere geschieht dann in dessen Ctor/Dtor.
* --------------------------------------------------*/
-void SwEnterLeave::Ctor( const SwFrm* pFrm, ULONG nFunc, ULONG nAct, void* pPar )
+void SwEnterLeave::Ctor( const SwFrm* pFrm, sal_uLong nFunc, sal_uLong nAct, void* pPar )
{
switch( nFunc )
{
@@ -845,13 +845,13 @@ void SwSizeEnterLeave::Leave()
void SwUpperEnterLeave::Enter()
{
- nFrmId = pFrm->GetUpper() ? USHORT(lcl_GetFrameId( pFrm->GetUpper() )) : 0;
+ nFrmId = pFrm->GetUpper() ? sal_uInt16(lcl_GetFrameId( pFrm->GetUpper() )) : 0;
SwProtocol::Record( pFrm, nFunction, ACT_START, &nFrmId );
}
void SwUpperEnterLeave::Leave()
{
- nFrmId = pFrm->GetUpper() ? USHORT(lcl_GetFrameId( pFrm->GetUpper() )) : 0;
+ nFrmId = pFrm->GetUpper() ? sal_uInt16(lcl_GetFrameId( pFrm->GetUpper() )) : 0;
SwProtocol::Record( pFrm, nFunction, ACT_END, &nFrmId );
}
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index e52fc31fb0b5..dfdc9dc04c53 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -238,19 +238,19 @@ SwFrm* SwFrm::GetLower()
|* Letzte Aenderung MA 18. Mar. 93
|*
|*************************************************************************/
-BOOL SwLayoutFrm::IsAnLower( const SwFrm *pAssumed ) const
+sal_Bool SwLayoutFrm::IsAnLower( const SwFrm *pAssumed ) const
{
const SwFrm *pUp = pAssumed;
while ( pUp )
{
if ( pUp == this )
- return TRUE;
+ return sal_True;
if ( pUp->IsFlyFrm() )
pUp = ((SwFlyFrm*)pUp)->GetAnchorFrm();
else
pUp = pUp->GetUpper();
}
- return FALSE;
+ return sal_False;
}
/** method to check relative position of layout frame to
@@ -422,10 +422,10 @@ const SwCntntFrm* SwCntntFrm::ImplGetNextCntntFrm( bool bFwd ) const
const SwFrm *pFrm = this;
// #100926#
SwCntntFrm *pCntntFrm = 0;
- BOOL bGoingUp = FALSE;
+ sal_Bool bGoingUp = sal_False;
do {
const SwFrm *p = 0;
- BOOL bGoingFwdOrBwd = FALSE, bGoingDown = FALSE;
+ sal_Bool bGoingFwdOrBwd = sal_False, bGoingDown = sal_False;
bGoingDown = ( !bGoingUp && ( 0 != ( p = lcl_GetLower( pFrm, true ) ) ) );
if ( !bGoingDown )
@@ -505,7 +505,7 @@ SwPageFrm* SwFrm::FindPageFrm()
return (SwPageFrm*)pRet;
}
-SwFtnBossFrm* SwFrm::FindFtnBossFrm( BOOL bFootnotes )
+SwFtnBossFrm* SwFrm::FindFtnBossFrm( sal_Bool bFootnotes )
{
SwFrm *pRet = this;
// Innerhalb einer Tabelle gibt es keine Fussnotenbosse, auch spaltige
@@ -533,7 +533,7 @@ SwFtnBossFrm* SwFrm::FindFtnBossFrm( BOOL bFootnotes )
SwSectionFrm* pSct = pRet->FindSctFrm();
ASSERT( pSct, "FindFtnBossFrm: Single column outside section?" );
if( !pSct->IsFtnAtEnd() )
- return pSct->FindFtnBossFrm( TRUE );
+ return pSct->FindFtnBossFrm( sal_True );
}
return (SwFtnBossFrm*)pRet;
}
@@ -644,7 +644,7 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b
}
ASSERT( GetPageNum() <= maPageRects.size(), "number of pages differes from page rect array size" )
- USHORT nPageIdx = 0;
+ sal_uInt16 nPageIdx = 0;
while ( pPage && !pRet )
{
@@ -706,12 +706,12 @@ const SwAttrSet* SwFrm::GetAttrSet() const
SwFrm* lcl_NextFrm( SwFrm* pFrm )
{
SwFrm *pRet = 0;
- BOOL bGoingUp = FALSE;
+ sal_Bool bGoingUp = sal_False;
do {
SwFrm *p = 0;
- BOOL bGoingFwd = FALSE;
- BOOL bGoingDown = (!bGoingUp && ( 0 != (p = pFrm->IsLayoutFrm() ? ((SwLayoutFrm*)pFrm)->Lower() : 0)));
+ sal_Bool bGoingFwd = sal_False;
+ sal_Bool bGoingDown = (!bGoingUp && ( 0 != (p = pFrm->IsLayoutFrm() ? ((SwLayoutFrm*)pFrm)->Lower() : 0)));
if( !bGoingDown )
{
@@ -734,7 +734,7 @@ SwFrm* lcl_NextFrm( SwFrm* pFrm )
SwFrm *SwFrm::_FindNext()
{
- BOOL bIgnoreTab = FALSE;
+ sal_Bool bIgnoreTab = sal_False;
SwFrm *pThis = this;
if ( IsTabFrm() )
@@ -748,7 +748,7 @@ SwFrm *SwFrm::_FindNext()
pThis = ((SwTabFrm*)this)->FindLastCntnt();
if ( !pThis )
pThis = this;
- bIgnoreTab = TRUE;
+ bIgnoreTab = sal_True;
}
else if ( IsSctFrm() )
{
@@ -777,7 +777,7 @@ SwFrm *SwFrm::_FindNext()
return NULL;
SwFrm* pRet = NULL;
- const BOOL bFtn = pThis->IsInFtn();
+ const sal_Bool bFtn = pThis->IsInFtn();
if ( !bIgnoreTab && pThis->IsInTab() )
{
SwLayoutFrm *pUp = pThis->GetUpper();
@@ -798,7 +798,7 @@ SwFrm *SwFrm::_FindNext()
}
else
{
- const BOOL bBody = pThis->IsInDocBody();
+ const sal_Bool bBody = pThis->IsInDocBody();
SwFrm *pNxtCnt = lcl_NextFrm( pThis );
if ( pNxtCnt )
{
@@ -897,8 +897,8 @@ SwCntntFrm *SwFrm::_FindNextCnt( const bool _bInSameFtn )
if ( pThis->IsCntntFrm() )
{
- const BOOL bBody = pThis->IsInDocBody();
- const BOOL bFtn = pThis->IsInFtn();
+ const sal_Bool bBody = pThis->IsInDocBody();
+ const sal_Bool bFtn = pThis->IsInFtn();
SwCntntFrm *pNxtCnt = ((SwCntntFrm*)pThis)->GetNextCntntFrm();
if ( pNxtCnt )
{
@@ -1122,7 +1122,7 @@ SwCntntFrm* SwFrm::_FindPrevCnt( const bool _bInSameFtn )
SwFrm *SwFrm::_FindPrev()
{
- BOOL bIgnoreTab = FALSE;
+ sal_Bool bIgnoreTab = sal_False;
SwFrm *pThis = this;
if ( IsTabFrm() )
@@ -1134,7 +1134,7 @@ SwFrm *SwFrm::_FindPrev()
return ((SwTabFrm*)this)->FindMaster();
else
pThis = ((SwTabFrm*)this)->ContainsCntnt();
- bIgnoreTab = TRUE;
+ bIgnoreTab = sal_True;
}
if ( pThis && pThis->IsCntntFrm() )
@@ -1154,8 +1154,8 @@ SwFrm *SwFrm::_FindPrev()
else
{
SwFrm* pRet;
- const BOOL bBody = pThis->IsInDocBody();
- const BOOL bFtn = bBody ? FALSE : pThis->IsInFtn();
+ const sal_Bool bBody = pThis->IsInDocBody();
+ const sal_Bool bFtn = bBody ? sal_False : pThis->IsInFtn();
if ( bBody || bFtn )
{
while ( pPrvCnt )
@@ -1197,7 +1197,7 @@ SwFrm *SwFrm::_FindPrev()
return 0;
}
-void SwFrm::ImplInvalidateNextPos( BOOL bNoFtn )
+void SwFrm::ImplInvalidateNextPos( sal_Bool bNoFtn )
{
SwFrm *pFrm;
if ( 0 != (pFrm = _FindNext()) )
@@ -1295,25 +1295,25 @@ void SwFrm::InvalidateNextPrtArea()
/*************************************************************************
|*
|* lcl_IsInColSect()
-|* liefert nur TRUE, wenn der Frame _direkt_ in einem spaltigen Bereich steht,
+|* liefert nur sal_True, wenn der Frame _direkt_ in einem spaltigen Bereich steht,
|* nicht etwa, wenn er in einer Tabelle steht, die in einem spaltigen Bereich ist.
|*
|*************************************************************************/
-BOOL lcl_IsInColSct( const SwFrm *pUp )
+sal_Bool lcl_IsInColSct( const SwFrm *pUp )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while( pUp )
{
if( pUp->IsColumnFrm() )
- bRet = TRUE;
+ bRet = sal_True;
else if( pUp->IsSctFrm() )
return bRet;
else if( pUp->IsTabFrm() )
- return FALSE;
+ return sal_False;
pUp = pUp->GetUpper();
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1327,7 +1327,7 @@ BOOL lcl_IsInColSct( const SwFrm *pUp )
/** determine, if frame is moveable in given environment
OD 08.08.2003 #110978#
- method replaced 'old' method <BOOL IsMoveable() const>.
+ method replaced 'old' method <sal_Bool IsMoveable() const>.
Determines, if frame is moveable in given environment. if no environment
is given (parameter _pLayoutFrm == 0L), the movability in the actual
environment (<this->GetUpper()) is checked.
@@ -1410,26 +1410,26 @@ void SwFrm::SetInfFlags()
if ( !IsFlyFrm() && !GetUpper() ) //noch nicht gepastet, keine Informationen
return; //lieferbar
- bInfInvalid = bInfBody = bInfTab = bInfFly = bInfFtn = bInfSct = FALSE;
+ bInfInvalid = bInfBody = bInfTab = bInfFly = bInfFtn = bInfSct = sal_False;
SwFrm *pFrm = this;
if( IsFtnContFrm() )
- bInfFtn = TRUE;
+ bInfFtn = sal_True;
do
{ // bInfBody wird nur am Seitenbody, nicht im ColumnBody gesetzt
if ( pFrm->IsBodyFrm() && !bInfFtn && pFrm->GetUpper()
&& pFrm->GetUpper()->IsPageFrm() )
- bInfBody = TRUE;
+ bInfBody = sal_True;
else if ( pFrm->IsTabFrm() || pFrm->IsCellFrm() )
{
- bInfTab = TRUE;
+ bInfTab = sal_True;
}
else if ( pFrm->IsFlyFrm() )
- bInfFly = TRUE;
+ bInfFly = sal_True;
else if ( pFrm->IsSctFrm() )
- bInfSct = TRUE;
+ bInfSct = sal_True;
else if ( pFrm->IsFtnFrm() )
- bInfFtn = TRUE;
+ bInfFtn = sal_True;
pFrm = pFrm->GetUpper();
@@ -1437,13 +1437,13 @@ void SwFrm::SetInfFlags()
}
/*-----------------22.8.2001 14:30------------------
- * SwFrm::SetDirFlags( BOOL )
+ * SwFrm::SetDirFlags( sal_Bool )
* actualizes the vertical or the righttoleft-flags.
* If the property is derived, it's from the upper or (for fly frames) from
* the anchor. Otherwise we've to call a virtual method to check the property.
* --------------------------------------------------*/
-void SwFrm::SetDirFlags( BOOL bVert )
+void SwFrm::SetDirFlags( sal_Bool bVert )
{
if( bVert )
{
@@ -1461,7 +1461,7 @@ void SwFrm::SetDirFlags( BOOL bVert )
bVertical = pAsk->IsVertical() ? 1 : 0;
bReverse = pAsk->IsReverse() ? 1 : 0;
if ( !pAsk->bInvalidVert )
- bInvalidVert = FALSE;
+ bInvalidVert = sal_False;
}
}
else
@@ -1469,7 +1469,7 @@ void SwFrm::SetDirFlags( BOOL bVert )
}
else
{
- BOOL bInv = 0;
+ sal_Bool bInv = 0;
if( !bDerivedR2L ) // CheckDirection is able to set bDerivedR2L!
CheckDirection( bVert );
if( bDerivedR2L )
@@ -1664,7 +1664,7 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren
{
const SwTable* pTable = pTableFrm->GetTable();
- USHORT nMax = USHRT_MAX;
+ sal_uInt16 nMax = USHRT_MAX;
if ( bCurrentTableOnly )
{
const SwFrm* pCurrentRow = GetUpper();
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index d0015b12114d..f5edaf5bbab4 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -71,7 +71,7 @@
#include <fmtfollowtextflow.hxx>
// <--
-BOOL SwFlowFrm::bMoveBwdJump = FALSE;
+sal_Bool SwFlowFrm::bMoveBwdJump = sal_False;
/*************************************************************************
@@ -89,14 +89,14 @@ SwFlowFrm::SwFlowFrm( SwFrm &rFrm ) :
pFollow( 0 )
{
bLockJoin = bIsFollow = bCntntLock = bOwnFtnNum =
- bFtnLock = bFlyLock = FALSE;
+ bFtnLock = bFlyLock = sal_False;
}
/*************************************************************************
|*
|* SwFlowFrm::IsFollowLocked()
-|* return TRUE if any follow has the JoinLocked flag
+|* return sal_True if any follow has the JoinLocked flag
|*
|*************************************************************************/
@@ -122,24 +122,24 @@ sal_Bool SwFlowFrm::HasLockedFollow() const
|*************************************************************************/
-BOOL SwFlowFrm::IsKeepFwdMoveAllowed()
+sal_Bool SwFlowFrm::IsKeepFwdMoveAllowed()
{
//Wenn der Vorgaenger das KeepAttribut traegt und auch dessen
//Vorgaenger usw. bis zum ersten der Kette und fuer diesen das
- //IsFwdMoveAllowed ein FALSE liefert, so ist das Moven eben nicht erlaubt.
+ //IsFwdMoveAllowed ein sal_False liefert, so ist das Moven eben nicht erlaubt.
SwFrm *pFrm = &rThis;
if ( !pFrm->IsInFtn() )
do
{ if ( pFrm->GetAttrSet()->GetKeep().GetValue() )
pFrm = pFrm->GetIndPrev();
else
- return TRUE;
+ return sal_True;
} while ( pFrm );
//Siehe IsFwdMoveAllowed()
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( pFrm && pFrm->GetIndPrev() )
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
@@ -168,8 +168,8 @@ void SwFlowFrm::CheckKeep()
return;
}
SwFrm* pTmp;
- BOOL bKeep;
- while ( TRUE == (bKeep = pPre->GetAttrSet()->GetKeep().GetValue()) &&
+ sal_Bool bKeep;
+ while ( sal_True == (bKeep = pPre->GetAttrSet()->GetKeep().GetValue()) &&
0 != ( pTmp = pPre->GetIndPrev() ) )
{
if( pTmp->IsSctFrm() )
@@ -195,7 +195,7 @@ void SwFlowFrm::CheckKeep()
|*
|*************************************************************************/
-BOOL SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep ) const
+sal_Bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep ) const
{
// 1. The keep attribute is ignored inside footnotes
// 2. For compatibility reasons, the keep attribute is
@@ -203,7 +203,7 @@ BOOL SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
// 3. If bBreakCheck is set to true, this function only checks
// if there are any break after attributes set at rAttrs
// or break before attributes set for the next content (or next table)
- BOOL bKeep = bCheckIfLastRowShouldKeep ||
+ sal_Bool bKeep = bCheckIfLastRowShouldKeep ||
( !rThis.IsInFtn() &&
( !rThis.IsInTab() || rThis.IsTabFrm() ) &&
rAttrs.GetKeep().GetValue() );
@@ -221,7 +221,7 @@ BOOL SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
case SVX_BREAK_PAGE_AFTER:
case SVX_BREAK_PAGE_BOTH:
{
- bKeep = FALSE;
+ bKeep = sal_False;
}
default: break;
}
@@ -248,7 +248,7 @@ BOOL SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
pNextSection = pNextSectionFrm->GetSection();
if ( pThisSection != pNextSection )
- bKeep = FALSE;
+ bKeep = sal_False;
}
// <--
@@ -269,14 +269,14 @@ BOOL SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
ASSERT( pSet, "No AttrSet to check keep attribute" )
if ( pSet->GetPageDesc().GetPageDesc() )
- bKeep = FALSE;
+ bKeep = sal_False;
else switch ( pSet->GetBreak().GetBreak() )
{
case SVX_BREAK_COLUMN_BEFORE:
case SVX_BREAK_COLUMN_BOTH:
case SVX_BREAK_PAGE_BEFORE:
case SVX_BREAK_PAGE_BOTH:
- bKeep = FALSE;
+ bKeep = sal_False;
default: break;
}
}
@@ -296,7 +296,7 @@ BOOL SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
|*************************************************************************/
-BYTE SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect )
+sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect )
{
// Der return-Wert entscheidet mit,
// ob auf Zurueckgeflossen werden muss, (3)
@@ -316,7 +316,7 @@ BYTE SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect )
//#32639# Wenn das Objekt bei mir verankert ist kann ich es
//vernachlaessigen, weil es hoechstwahrscheinlich (!?) mitfliesst,
//eine TestFormatierung ist dann allerdings nicht erlaubt!
- BYTE nRet = 0;
+ sal_uInt8 nRet = 0;
SwFlowFrm *pTmp = this;
do
{ // Wenn an uns oder einem Follow Objekte haengen, so
@@ -331,8 +331,8 @@ BYTE SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect )
{
// --> OD 2004-07-01 #i28701# - new type <SwSortedObjs>
const SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- ULONG nIndex = ULONG_MAX;
- for ( USHORT i = 0; nRet < 3 && i < rObjs.Count(); ++i )
+ sal_uLong nIndex = ULONG_MAX;
+ for ( sal_uInt16 i = 0; nRet < 3 && i < rObjs.Count(); ++i )
{
// --> OD 2004-07-01 #i28701# - consider changed type of
// <SwSortedObjs> entries.
@@ -366,7 +366,7 @@ BYTE SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect )
if ( rFmt.GetAnchor().GetAnchorId() == FLY_AT_PARA )
{
// Den Index des anderen erhalten wir immer ueber das Ankerattr.
- ULONG nTmpIndex = rFmt.GetAnchor().GetCntntAnchor()->nNode.GetIndex();
+ sal_uLong nTmpIndex = rFmt.GetAnchor().GetCntntAnchor()->nNode.GetIndex();
// Jetzt wird noch ueberprueft, ob der aktuelle Absatz vor dem
// Anker des verdraengenden Objekts im Text steht, dann wird
// nicht ausgewichen.
@@ -456,7 +456,7 @@ SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart )
}
else
{
- BOOL bUnlock = !((SwFtnFrm*)pLay)->IsBackMoveLocked();
+ sal_Bool bUnlock = !((SwFtnFrm*)pLay)->IsBackMoveLocked();
((SwFtnFrm*)pLay)->LockBackMove();
pLay->InvalidateSize();
pLay->Calc();
@@ -483,11 +483,11 @@ SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart )
-BOOL SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
+sal_Bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
SwFrm *pOldParent )
{
- //returnt TRUE wenn in der Kette ein LayoutFrm steht.
- BOOL bRet = FALSE;
+ //returnt sal_True wenn in der Kette ein LayoutFrm steht.
+ sal_Bool bRet = sal_False;
//Die mit pStart beginnende Kette wird vor den Sibling unter den Parent
//gehaengt. Fuer geeignete Invalidierung wird ebenfalls gesorgt.
@@ -560,7 +560,7 @@ BOOL SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
((SwTxtFrm*)pFloat)->Init(); //Ich bin sein Freund.
}
else
- bRet = TRUE;
+ bRet = sal_True;
nGrowVal += (pFloat->Frm().*fnRect->fnGetHeight)();
if ( pFloat->GetNext() )
@@ -606,7 +606,7 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
//Sparsamer benachrichtigen wenn eine Action laeuft.
ViewShell *pSh = rThis.GetShell();
const SwViewImp *pImp = pSh ? pSh->Imp() : 0;
- const BOOL bComplete = pImp && pImp->IsAction() && pImp->GetLayAction().IsComplete();
+ const sal_Bool bComplete = pImp && pImp->IsAction() && pImp->GetLayAction().IsComplete();
if ( !bComplete )
{
@@ -632,7 +632,7 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
SwPageFrm *pOldPage = rThis.FindPageFrm();
SwLayoutFrm *pOldParent = CutTree( &rThis );
- const BOOL bInvaLay = PasteTree( &rThis, pParent, pSibling, pOldParent );
+ const sal_Bool bInvaLay = PasteTree( &rThis, pParent, pSibling, pOldParent );
// Wenn durch das Cut&Paste ein leerer SectionFrm entstanden ist, sollte
// dieser automatisch verschwinden.
@@ -645,7 +645,7 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
!pSct->ContainsAny( true ) ) )
// <--
{
- pSct->DelEmpty( FALSE );
+ pSct->DelEmpty( sal_False );
}
// In einem spaltigen Bereich rufen wir lieber kein Calc "von unten"
@@ -655,11 +655,11 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
else if( rThis.GetUpper()->IsSctFrm() )
{
SwSectionFrm* pTmpSct = (SwSectionFrm*)rThis.GetUpper();
- BOOL bOld = pTmpSct->IsCntntLocked();
- pTmpSct->SetCntntLock( TRUE );
+ sal_Bool bOld = pTmpSct->IsCntntLocked();
+ pTmpSct->SetCntntLock( sal_True );
pTmpSct->Calc();
if( !bOld )
- pTmpSct->SetCntntLock( FALSE );
+ pTmpSct->SetCntntLock( sal_False );
}
SwPageFrm *pPage = rThis.FindPageFrm();
@@ -692,15 +692,15 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
|*************************************************************************/
-BOOL SwFlowFrm::IsAnFollow( const SwFlowFrm *pAssumed ) const
+sal_Bool SwFlowFrm::IsAnFollow( const SwFlowFrm *pAssumed ) const
{
const SwFlowFrm *pFoll = this;
do
{ if ( pAssumed == pFoll )
- return TRUE;
+ return sal_True;
pFoll = pFoll->GetFollow();
} while ( pFoll );
- return FALSE;
+ return sal_False;
}
@@ -729,7 +729,7 @@ SwTxtFrm* SwCntntFrm::FindMaster() const
pCnt = pCnt->GetPrevCntntFrm();
}
- ASSERT( FALSE, "Follow ist lost in Space." );
+ ASSERT( sal_False, "Follow ist lost in Space." );
return 0;
}
@@ -753,7 +753,7 @@ SwSectionFrm* SwSectionFrm::FindMaster() const
pLast = aIter++;
}
- ASSERT( FALSE, "Follow ist lost in Space." );
+ ASSERT( sal_False, "Follow ist lost in Space." );
return 0;
}
@@ -799,7 +799,7 @@ SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const
pLast = aIter++;
}
- ASSERT( FALSE, "Follow ist lost in Space." );
+ ASSERT( sal_False, "Follow ist lost in Space." );
return 0;
}
@@ -817,7 +817,7 @@ SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const
|*************************************************************************/
-const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd,
+const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd,
const SwFrm *pAnch ) const
{
//Ohne Fluss kein genuss...
@@ -825,7 +825,7 @@ const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd,
return 0;
const SwFrm *pLeaf = this;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
do
{ pLeaf = ((SwFrm*)pLeaf)->GetLeaf( eMakePage, bFwd );
@@ -836,7 +836,7 @@ const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd,
if ( pAnch->IsInDocBody() == pLeaf->IsInDocBody() &&
pAnch->IsInFtn() == pLeaf->IsInFtn() )
{
- bFound = TRUE;
+ bFound = sal_True;
}
}
} while ( !bFound && pLeaf );
@@ -856,7 +856,7 @@ const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd,
|*************************************************************************/
-SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd )
+SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd )
{
if ( IsInFtn() )
return bFwd ? GetNextFtnLeaf( eMakePage ) : GetPrevFtnLeaf( eMakePage );
@@ -900,7 +900,7 @@ SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd )
-BOOL SwFrm::WrongPageDesc( SwPageFrm* pNew )
+sal_Bool SwFrm::WrongPageDesc( SwPageFrm* pNew )
{
//Jetzt wirds leider etwas kompliziert:
//Ich bringe ich evtl. selbst
@@ -930,7 +930,7 @@ BOOL SwFrm::WrongPageDesc( SwPageFrm* pNew )
//Mein Pagedesc zaehlt nicht, wenn ich ein Follow bin!
SwPageDesc *pDesc = 0;
- USHORT nTmp = 0;
+ sal_uInt16 nTmp = 0;
SwFlowFrm *pFlow = SwFlowFrm::CastFlowFrm( this );
if ( !pFlow || !pFlow->IsFollow() )
{
@@ -949,7 +949,7 @@ BOOL SwFrm::WrongPageDesc( SwPageFrm* pNew )
//Bringt der Cntnt einen Pagedesc mit oder muss zaehlt die
//virtuelle Seitennummer des neuen Layoutleafs?
// Bei Follows zaehlt der PageDesc nicht
- const BOOL bOdd = nTmp ? ( nTmp % 2 ? TRUE : FALSE )
+ const sal_Bool bOdd = nTmp ? ( nTmp % 2 ? sal_True : sal_False )
: pNew->OnRightPage();
if ( !pDesc )
pDesc = pNew->FindPageDesc();
@@ -985,7 +985,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
ASSERT( !IsInFtn(), "GetNextLeaf(), don't call me for Ftn." );
ASSERT( !IsInSct(), "GetNextLeaf(), don't call me for Sections." );
- const BOOL bBody = IsInDocBody(); //Wenn ich aus dem DocBody komme
+ const sal_Bool bBody = IsInDocBody(); //Wenn ich aus dem DocBody komme
//Will ich auch im Body landen.
// Bei Flys macht es keinen Sinn, Seiten einzufuegen, wir wollen lediglich
@@ -1009,9 +1009,9 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
SwLayoutFrm *pOldLayLeaf = 0; //Damit bei neu erzeugten Seiten
//nicht wieder vom Anfang gesucht
//wird.
- BOOL bNewPg = FALSE; //nur einmal eine neue Seite einfuegen.
+ sal_Bool bNewPg = sal_False; //nur einmal eine neue Seite einfuegen.
- while ( TRUE )
+ while ( sal_True )
{
if ( pLayLeaf )
{
@@ -1061,7 +1061,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
SwFtnFrm *pFtn = (SwFtnFrm*)pCont->Lower();
if( pFtn && pFtn->GetRef() )
{
- const USHORT nRefNum = pNew->GetPhyPageNum();
+ const sal_uInt16 nRefNum = pNew->GetPhyPageNum();
if( pFtn->GetRef()->GetPhyPageNum() < nRefNum )
break;
}
@@ -1070,7 +1070,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
//muss eine neue eingefuegt werden.
if ( eMakePage == MAKEPAGE_INSERT )
{
- bNewPg = TRUE;
+ bNewPg = sal_True;
SwPageFrm *pPg = pOldLayLeaf ?
pOldLayLeaf->FindPageFrm() : 0;
@@ -1081,7 +1081,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
if ( !pPg || pPg == pNew )
pPg = FindPageFrm();
- InsertPage( pPg, FALSE );
+ InsertPage( pPg, sal_False );
pLayLeaf = GetNextLayoutLeaf();
pOldLayLeaf = 0;
continue;
@@ -1100,7 +1100,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
{
InsertPage(
pOldLayLeaf ? pOldLayLeaf->FindPageFrm() : FindPageFrm(),
- FALSE );
+ sal_False );
//und nochmal das ganze
pLayLeaf = pOldLayLeaf ? pOldLayLeaf : GetNextLayoutLeaf();
@@ -1128,9 +1128,9 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType )
{
ASSERT( !IsInFtn(), "GetPrevLeaf(), don't call me for Ftn." );
- const BOOL bBody = IsInDocBody(); //Wenn ich aus dem DocBody komme
+ const sal_Bool bBody = IsInDocBody(); //Wenn ich aus dem DocBody komme
//will ich auch im Body landen.
- const BOOL bFly = IsInFly();
+ const sal_Bool bFly = IsInFly();
SwLayoutFrm *pLayLeaf = GetPrevLayoutLeaf();
SwLayoutFrm *pPrevLeaf = 0;
@@ -1147,7 +1147,7 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType )
pPrevLeaf = pLayLeaf;
pLayLeaf = pLayLeaf->GetPrevLayoutLeaf();
if ( pLayLeaf )
- SwFlowFrm::SetMoveBwdJump( TRUE );
+ SwFlowFrm::SetMoveBwdJump( sal_True );
}
else if ( bFly )
break; //Cntnts in Flys sollte jedes Layout-Blatt recht sein.
@@ -1167,14 +1167,14 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType )
|*************************************************************************/
-BOOL SwFlowFrm::IsPrevObjMove() const
+sal_Bool SwFlowFrm::IsPrevObjMove() const
{
- //TRUE der FlowFrm soll auf einen Rahmen des Vorgaengers Ruecksicht nehmen
+ //sal_True der FlowFrm soll auf einen Rahmen des Vorgaengers Ruecksicht nehmen
// und fuer diesen ggf. Umbrechen.
//!!!!!!!!!!!Hack!!!!!!!!!!!
if ( rThis.GetUpper()->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- return FALSE;
+ return sal_False;
SwFrm *pPre = rThis.FindPrev();
@@ -1182,7 +1182,7 @@ BOOL SwFlowFrm::IsPrevObjMove() const
{
ASSERT( SwFlowFrm::CastFlowFrm( pPre ), "new flowfrm?" );
if( SwFlowFrm::CastFlowFrm( pPre )->IsAnFollow( this ) )
- return FALSE;
+ return sal_False;
SwLayoutFrm* pPreUp = pPre->GetUpper();
// Wenn der Upper ein SectionFrm oder die Spalte eines SectionFrms ist,
// duerfen wir aus diesem durchaus heraushaengen,
@@ -1198,7 +1198,7 @@ BOOL SwFlowFrm::IsPrevObjMove() const
// --> OD 2004-10-15 #i26945# - re-factoring:
// use <GetVertPosOrientFrm()> to determine, if object has followed the
// text flow to the next layout frame
- for ( USHORT i = 0; i < pPre->GetDrawObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pPre->GetDrawObjs()->Count(); ++i )
{
// --> OD 2004-07-01 #i28701# - consider changed type of
// <SwSortedObjs> entries.
@@ -1216,23 +1216,23 @@ BOOL SwFlowFrm::IsPrevObjMove() const
pPreUp != pVertPosOrientFrm &&
!pPreUp->IsAnLower( pVertPosOrientFrm ) )
{
- return TRUE;
+ return sal_True;
}
}
}
// <--
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
|*
-|* BOOL SwFlowFrm::IsPageBreak()
+|* sal_Bool SwFlowFrm::IsPageBreak()
|*
|* Beschreibung Wenn vor dem Frm ein harter Seitenumbruch steht UND
-|* es einen Vorgaenger auf der gleichen Seite gibt, wird TRUE
-|* zurueckgeliefert (es muss ein PageBreak erzeugt werden) FALSE sonst.
-|* Wenn in bAct TRUE uebergeben wird, gibt die Funktion dann TRUE
+|* es einen Vorgaenger auf der gleichen Seite gibt, wird sal_True
+|* zurueckgeliefert (es muss ein PageBreak erzeugt werden) sal_False sonst.
+|* Wenn in bAct sal_True uebergeben wird, gibt die Funktion dann sal_True
|* zurueck, wenn ein PageBreak besteht.
|* Fuer Follows wird der harte Seitenumbruch natuerlich nicht
|* ausgewertet.
@@ -1249,7 +1249,7 @@ BOOL SwFlowFrm::IsPrevObjMove() const
|*************************************************************************/
-BOOL SwFlowFrm::IsPageBreak( BOOL bAct ) const
+sal_Bool SwFlowFrm::IsPageBreak( sal_Bool bAct ) const
{
if ( !IsFollow() && rThis.IsInDocBody() &&
( !rThis.IsInTab() || ( rThis.IsTabFrm() && !rThis.GetUpper()->IsInTab() ) ) && // i66968
@@ -1268,37 +1268,37 @@ BOOL SwFlowFrm::IsPageBreak( BOOL bAct ) const
ASSERT( pPrev->IsInDocBody(), "IsPageBreak: Not in DocBody?" );
if ( bAct )
{ if ( rThis.FindPageFrm() == pPrev->FindPageFrm() )
- return FALSE;
+ return sal_False;
}
else
{ if ( rThis.FindPageFrm() != pPrev->FindPageFrm() )
- return FALSE;
+ return sal_False;
}
const SvxBreak eBreak = pSet->GetBreak().GetBreak();
if ( eBreak == SVX_BREAK_PAGE_BEFORE || eBreak == SVX_BREAK_PAGE_BOTH )
- return TRUE;
+ return sal_True;
else
{
const SvxBreak &ePrB = pPrev->GetAttrSet()->GetBreak().GetBreak();
if ( ePrB == SVX_BREAK_PAGE_AFTER ||
ePrB == SVX_BREAK_PAGE_BOTH ||
pSet->GetPageDesc().GetPageDesc() )
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
|*
-|* BOOL SwFlowFrm::IsColBreak()
+|* sal_Bool SwFlowFrm::IsColBreak()
|*
|* Beschreibung Wenn vor dem Frm ein harter Spaltenumbruch steht UND
-|* es einen Vorgaenger in der gleichen Spalte gibt, wird TRUE
-|* zurueckgeliefert (es muss ein PageBreak erzeugt werden) FALSE sonst.
-|* Wenn in bAct TRUE uebergeben wird, gibt die Funktion dann TRUE
+|* es einen Vorgaenger in der gleichen Spalte gibt, wird sal_True
+|* zurueckgeliefert (es muss ein PageBreak erzeugt werden) sal_False sonst.
+|* Wenn in bAct sal_True uebergeben wird, gibt die Funktion dann sal_True
|* zurueck, wenn ein ColBreak besteht.
|* Fuer Follows wird der harte Spaltenumbruch natuerlich nicht
|* ausgewertet.
@@ -1312,7 +1312,7 @@ BOOL SwFlowFrm::IsPageBreak( BOOL bAct ) const
|*
|*************************************************************************/
-BOOL SwFlowFrm::IsColBreak( BOOL bAct ) const
+sal_Bool SwFlowFrm::IsColBreak( sal_Bool bAct ) const
{
if ( !IsFollow() && (rThis.IsMoveable() || bAct) )
{
@@ -1329,31 +1329,31 @@ BOOL SwFlowFrm::IsColBreak( BOOL bAct ) const
{
if ( bAct )
{ if ( pCol == pPrev->FindColFrm() )
- return FALSE;
+ return sal_False;
}
else
{ if ( pCol != pPrev->FindColFrm() )
- return FALSE;
+ return sal_False;
}
const SvxBreak eBreak = rThis.GetAttrSet()->GetBreak().GetBreak();
if ( eBreak == SVX_BREAK_COLUMN_BEFORE ||
eBreak == SVX_BREAK_COLUMN_BOTH )
- return TRUE;
+ return sal_True;
else
{
const SvxBreak &ePrB = pPrev->GetAttrSet()->GetBreak().GetBreak();
if ( ePrB == SVX_BREAK_COLUMN_AFTER ||
ePrB == SVX_BREAK_COLUMN_BOTH )
- return TRUE;
+ return sal_True;
}
}
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SwFlowFrm::HasParaSpaceAtPages( BOOL bSct ) const
+sal_Bool SwFlowFrm::HasParaSpaceAtPages( sal_Bool bSct ) const
{
if( rThis.IsInSct() )
{
@@ -1363,26 +1363,26 @@ BOOL SwFlowFrm::HasParaSpaceAtPages( BOOL bSct ) const
if( pTmp->IsCellFrm() || pTmp->IsFlyFrm() ||
pTmp->IsFooterFrm() || pTmp->IsHeaderFrm() ||
( pTmp->IsFtnFrm() && !((SwFtnFrm*)pTmp)->GetMaster() ) )
- return TRUE;
+ return sal_True;
if( pTmp->IsPageFrm() )
- return ( pTmp->GetPrev() && !IsPageBreak(TRUE) ) ? FALSE : TRUE;
+ return ( pTmp->GetPrev() && !IsPageBreak(sal_True) ) ? sal_False : sal_True;
if( pTmp->IsColumnFrm() && pTmp->GetPrev() )
- return IsColBreak( TRUE );
+ return IsColBreak( sal_True );
if( pTmp->IsSctFrm() && ( !bSct || pTmp->GetPrev() ) )
- return FALSE;
+ return sal_False;
pTmp = pTmp->GetUpper();
}
- ASSERT( FALSE, "HasParaSpaceAtPages: Where's my page?" );
- return FALSE;
+ ASSERT( sal_False, "HasParaSpaceAtPages: Where's my page?" );
+ return sal_False;
}
if( !rThis.IsInDocBody() || ( rThis.IsInTab() && !rThis.IsTabFrm()) ||
- IsPageBreak( TRUE ) || ( rThis.FindColFrm() && IsColBreak( TRUE ) ) )
- return TRUE;
+ IsPageBreak( sal_True ) || ( rThis.FindColFrm() && IsColBreak( sal_True ) ) )
+ return sal_True;
const SwFrm* pTmp = rThis.FindColFrm();
if( pTmp )
{
if( pTmp->GetPrev() )
- return FALSE;
+ return sal_False;
}
else
pTmp = &rThis;
@@ -1842,7 +1842,7 @@ SwTwips SwFlowFrm::CalcAddLowerSpaceAsLastInTableCell(
/*************************************************************************
|*
-|* BOOL SwFlowFrm::CheckMoveFwd()
+|* sal_Bool SwFlowFrm::CheckMoveFwd()
|*
|* Beschreibung Moved den Frm vorwaerts wenn es durch die aktuellen
|* Bedingungen und Attribute notwendig erscheint.
@@ -1852,7 +1852,7 @@ SwTwips SwFlowFrm::CalcAddLowerSpaceAsLastInTableCell(
|*************************************************************************/
-BOOL SwFlowFrm::CheckMoveFwd( BOOL &rbMakePage, BOOL bKeep, BOOL )
+sal_Bool SwFlowFrm::CheckMoveFwd( sal_Bool &rbMakePage, sal_Bool bKeep, sal_Bool )
{
const SwFrm* pNxt = rThis.GetIndNext();
@@ -1875,61 +1875,61 @@ BOOL SwFlowFrm::CheckMoveFwd( BOOL &rbMakePage, BOOL bKeep, BOOL )
}
if( pNxt && pNxt->GetValidPosFlag() )
{
- BOOL bMove = FALSE;
+ sal_Bool bMove = sal_False;
const SwSectionFrm *pSct = rThis.FindSctFrm();
if( pSct && !pSct->GetValidSizeFlag() )
{
const SwSectionFrm* pNxtSct = pNxt->FindSctFrm();
if( pNxtSct && pSct->IsAnFollow( pNxtSct ) )
- bMove = TRUE;
+ bMove = sal_True;
}
else
- bMove = TRUE;
+ bMove = sal_True;
if( bMove )
{
//Keep together with the following frame
- MoveFwd( rbMakePage, FALSE );
- return TRUE;
+ MoveFwd( rbMakePage, sal_False );
+ return sal_True;
}
}
}
- BOOL bMovedFwd = FALSE;
+ sal_Bool bMovedFwd = sal_False;
if ( rThis.GetIndPrev() )
{
if ( IsPrevObjMove() ) //Auf Objekte des Prev Ruecksicht nehmen?
{
- bMovedFwd = TRUE;
- if ( !MoveFwd( rbMakePage, FALSE ) )
- rbMakePage = FALSE;
+ bMovedFwd = sal_True;
+ if ( !MoveFwd( rbMakePage, sal_False ) )
+ rbMakePage = sal_False;
}
else
{
- if ( IsPageBreak( FALSE ) )
+ if ( IsPageBreak( sal_False ) )
{
- while ( MoveFwd( rbMakePage, TRUE ) )
+ while ( MoveFwd( rbMakePage, sal_True ) )
/* do nothing */;
- rbMakePage = FALSE;
- bMovedFwd = TRUE;
+ rbMakePage = sal_False;
+ bMovedFwd = sal_True;
}
- else if ( IsColBreak ( FALSE ) )
+ else if ( IsColBreak ( sal_False ) )
{
const SwPageFrm *pPage = rThis.FindPageFrm();
SwFrm *pCol = rThis.FindColFrm();
do
- { MoveFwd( rbMakePage, FALSE );
+ { MoveFwd( rbMakePage, sal_False );
SwFrm *pTmp = rThis.FindColFrm();
if( pTmp != pCol )
{
- bMovedFwd = TRUE;
+ bMovedFwd = sal_True;
pCol = pTmp;
}
else
break;
- } while ( IsColBreak( FALSE ) );
+ } while ( IsColBreak( sal_False ) );
if ( pPage != rThis.FindPageFrm() )
- rbMakePage = FALSE;
+ rbMakePage = sal_False;
}
}
}
@@ -1938,7 +1938,7 @@ BOOL SwFlowFrm::CheckMoveFwd( BOOL &rbMakePage, BOOL bKeep, BOOL )
/*************************************************************************
|*
-|* BOOL SwFlowFrm::MoveFwd()
+|* sal_Bool SwFlowFrm::MoveFwd()
|*
|* Beschreibung Returnwert sagt, ob der Frm die Seite gewechselt hat.
|* Ersterstellung MA 05. Dec. 96
@@ -1947,7 +1947,7 @@ BOOL SwFlowFrm::CheckMoveFwd( BOOL &rbMakePage, BOOL bKeep, BOOL )
|*************************************************************************/
-BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
+sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool bMoveAlways )
{
//!!!!MoveFtnCntFwd muss ggf. mitgepflegt werden.
SwFtnBossFrm *pOldBoss = rThis.FindFtnBossFrm();
@@ -1956,7 +1956,7 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
if( !IsFwdMoveAllowed() && !bMoveAlways )
{
- BOOL bNoFwd = TRUE;
+ sal_Bool bNoFwd = sal_True;
if( rThis.IsInSct() )
{
SwFtnBossFrm* pBoss = rThis.FindFtnBossFrm();
@@ -1976,7 +1976,7 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
// Have a look at our main competitor: We don't move inside row span cells:
( !rThis.GetUpper()->IsCellFrm() || !rThis.GetUpper()->IsLeaveUpperAllowed() ) )*/
{
- bNoFwd = FALSE;
+ bNoFwd = sal_False;
}
if( bNoFwd )
@@ -1984,17 +1984,17 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
//Fuer PageBreak ist das Moven erlaubt, wenn der Frm nicht
//bereits der erste der Seite ist.
if ( !bPageBreak )
- return FALSE;
+ return sal_False;
const SwFrm *pCol = rThis.FindColFrm();
if ( !pCol || !pCol->GetPrev() )
- return FALSE;
+ return sal_False;
}
}
- BOOL bSamePage = TRUE;
+ sal_Bool bSamePage = sal_True;
SwLayoutFrm *pNewUpper =
- rThis.GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, TRUE );
+ rThis.GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, sal_True );
if ( pNewUpper )
{
@@ -2006,7 +2006,7 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
// Wenn unser NewUpper in einem SectionFrm liegt, muessen wir
// verhindern, dass sich dieser im Calc selbst zerstoert
SwSectionFrm* pSect = pNewUpper->FindSctFrm();
- BOOL bUnlock = FALSE;
+ sal_Bool bUnlock = sal_False;
if( pSect )
{
// Wenn wir nur innerhalb unseres SectionFrms die Spalte wechseln,
@@ -2026,13 +2026,13 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
pNewUpper->Calc();
SwFtnBossFrm *pNewBoss = pNewUpper->FindFtnBossFrm();
- BOOL bBossChg = pNewBoss != pOldBoss;
- pNewBoss = pNewBoss->FindFtnBossFrm( TRUE );
- pOldBoss = pOldBoss->FindFtnBossFrm( TRUE );
+ sal_Bool bBossChg = pNewBoss != pOldBoss;
+ pNewBoss = pNewBoss->FindFtnBossFrm( sal_True );
+ pOldBoss = pOldBoss->FindFtnBossFrm( sal_True );
SwPageFrm* pNewPage = pOldPage;
// First, we move the footnotes.
- BOOL bFtnMoved = FALSE;
+ sal_Bool bFtnMoved = sal_False;
// --> FME 2004-07-15 #i26831#
// If pSect has just been created, the printing area of pSect has
@@ -2062,7 +2062,7 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
(SwLayoutFrm*)((SwTxtFrm*)pStart)->FindBodyFrm() : 0 ) : 0;
if( pBody )
bFtnMoved = pBody->MoveLowerFtns( pStart, pOldBoss, pNewBoss,
- FALSE);
+ sal_False);
}
// Bei SectionFrms ist es moeglich, dass wir selbst durch pNewUpper->Calc()
// bewegt wurden, z. B. in den pNewUpper.
@@ -2110,7 +2110,7 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
if( bBossChg )
{
- rThis.Prepare( PREP_BOSS_CHGD, 0, FALSE );
+ rThis.Prepare( PREP_BOSS_CHGD, 0, sal_False );
if( !bSamePage )
{
ViewShell *pSh = rThis.GetShell();
@@ -2133,7 +2133,7 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
( rThis.GetAttrSet()->GetPageDesc().GetPageDesc() ||
pOldPage->GetPageDesc()->GetFollow() != pNewPage->GetPageDesc() ) )
{
- SwFrm::CheckPageDescs( pNewPage, FALSE );
+ SwFrm::CheckPageDescs( pNewPage, sal_False );
}
// <--
}
@@ -2144,7 +2144,7 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
/*************************************************************************
|*
-|* BOOL SwFlowFrm::MoveBwd()
+|* sal_Bool SwFlowFrm::MoveBwd()
|*
|* Beschreibung Returnwert sagt, ob der Frm die Seite wechseln soll.
|* Sollte von abgeleiteten Klassen gerufen werden.
@@ -2154,13 +2154,13 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
|*
|*************************************************************************/
-BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
+sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat )
{
- SwFlowFrm::SetMoveBwdJump( FALSE );
+ SwFlowFrm::SetMoveBwdJump( sal_False );
SwFtnFrm* pFtn = rThis.FindFtnFrm();
if ( pFtn && pFtn->IsBackMoveLocked() )
- return FALSE;
+ return sal_False;
// --> OD 2004-11-29 #115759# - text frames, which are directly inside
// tables aren't allowed to move backward.
@@ -2171,7 +2171,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
{
if ( pUpperFrm->IsTabFrm() )
{
- return FALSE;
+ return sal_False;
}
else if ( pUpperFrm->IsColumnFrm() && pUpperFrm->IsInSct() )
{
@@ -2185,7 +2185,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
SwFtnBossFrm * pOldBoss = rThis.FindFtnBossFrm();
SwPageFrm * const pOldPage = pOldBoss->FindPageFrm();
SwLayoutFrm *pNewUpper = 0;
- BOOL bCheckPageDescs = FALSE;
+ sal_Bool bCheckPageDescs = sal_False;
bool bCheckPageDescOfNextPage = false;
if ( pFtn )
@@ -2211,16 +2211,16 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
ASSERT( pRef, "MoveBwd: Endnote for an empty section?" );
if( !bEndnote )
- pOldBoss = pOldBoss->FindFtnBossFrm( TRUE );
+ pOldBoss = pOldBoss->FindFtnBossFrm( sal_True );
SwFtnBossFrm *pRefBoss = pRef->FindFtnBossFrm( !bEndnote );
if ( pOldBoss != pRefBoss &&
// OD 08.11.2002 #104840# - use <SwLayoutFrm::IsBefore(..)>
( !bEndnote ||
pRefBoss->IsBefore( pOldBoss ) )
)
- pNewUpper = rThis.GetLeaf( MAKEPAGE_FTN, FALSE );
+ pNewUpper = rThis.GetLeaf( MAKEPAGE_FTN, sal_False );
}
- else if ( IsPageBreak( TRUE ) ) //PageBreak zu beachten?
+ else if ( IsPageBreak( sal_True ) ) //PageBreak zu beachten?
{
//Wenn auf der vorhergehenden Seite kein Frm im Body steht,
//so ist das Zurueckfliessen trotz Pagebreak sinnvoll
@@ -2242,7 +2242,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
nDiff -= 1;
if ( nDiff > 1 )
{
- pNewUpper = rThis.GetLeaf( MAKEPAGE_NONE, FALSE );
+ pNewUpper = rThis.GetLeaf( MAKEPAGE_NONE, sal_False );
// --> OD 2006-05-08 #i53139#
// Now <pNewUpper> is a previous layout frame, which contains
// content. But the new upper layout frame has to be the next one.
@@ -2267,7 +2267,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
// returns new upper on page 2.
if ( pNewUpper->Lower() )
{
- SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, TRUE );
+ SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, sal_True );
if ( pNewNextUpper &&
pNewNextUpper != rThis.GetUpper() &&
pNewNextUpper->GetType() == pNewUpper->GetType() &&
@@ -2283,19 +2283,19 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
}
// <--
- bCheckPageDescs = TRUE;
+ bCheckPageDescs = sal_True;
}
}
}
}
- else if ( IsColBreak( TRUE ) )
+ else if ( IsColBreak( sal_True ) )
{
//Wenn in der vorhergehenden Spalte kein CntntFrm steht, so ist
//das Zurueckfliessen trotz ColumnBreak sinnvoll
//(sonst: leere Spalte).
if( rThis.IsInSct() )
{
- pNewUpper = rThis.GetLeaf( MAKEPAGE_NONE, FALSE );
+ pNewUpper = rThis.GetLeaf( MAKEPAGE_NONE, sal_False );
if( pNewUpper && !SwFlowFrm::IsMoveBwdJump() &&
( pNewUpper->ContainsCntnt() ||
( ( !pNewUpper->IsColBodyFrm() ||
@@ -2320,7 +2320,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
// --> OD 2006-07-05 #136538# - another correction of fix for i53139
// Beside type check, check also, if proposed new next upper
// frame is inside the same frame types.
- SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NOSECTION, TRUE );
+ SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NOSECTION, sal_True );
if ( pNewNextUpper &&
pNewNextUpper->GetType() == pNewUpper->GetType() &&
pNewNextUpper->IsInDocBody() == pNewUpper->IsInDocBody() &&
@@ -2337,16 +2337,16 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
else
{
const SwFrm *pCol = rThis.FindColFrm();
- BOOL bGoOn = TRUE;
- BOOL bJump = FALSE;
+ sal_Bool bGoOn = sal_True;
+ sal_Bool bJump = sal_False;
do
{
if ( pCol->GetPrev() )
pCol = pCol->GetPrev();
else
{
- bGoOn = FALSE;
- pCol = rThis.GetLeaf( MAKEPAGE_NONE, FALSE );
+ bGoOn = sal_False;
+ pCol = rThis.GetLeaf( MAKEPAGE_NONE, sal_False );
}
if ( pCol )
{
@@ -2356,7 +2356,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
(SwLayoutFrm*)pCol;
if ( pColBody->ContainsCntnt() )
{
- bGoOn = FALSE; // Hier gibt's Inhalt, wir akzeptieren diese
+ bGoOn = sal_False; // Hier gibt's Inhalt, wir akzeptieren diese
// nur, wenn GetLeaf() das MoveBwdJump-Flag gesetzt hat.
if( SwFlowFrm::IsMoveBwdJump() )
{
@@ -2375,7 +2375,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
// --> OD 2006-11-02 #i71065#
// Check that the proposed new next upper layout
// frame isn't the current one.
- SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, TRUE );
+ SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, sal_True );
if ( pNewNextUpper &&
pNewNextUpper != rThis.GetUpper() &&
pNewNextUpper->GetType() == pNewUpper->GetType() &&
@@ -2393,18 +2393,18 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
else
{
if( pNewUpper ) // Wir hatten schon eine leere Spalte, haben
- bJump = TRUE; // also eine uebersprungen
+ bJump = sal_True; // also eine uebersprungen
pNewUpper = pColBody; // Diese leere Spalte kommt in Frage,
// trotzdem weitersuchen
}
}
} while( bGoOn );
if( bJump )
- SwFlowFrm::SetMoveBwdJump( TRUE );
+ SwFlowFrm::SetMoveBwdJump( sal_True );
}
}
else //Keine Breaks also kann ich zurueckfliessen
- pNewUpper = rThis.GetLeaf( MAKEPAGE_NONE, FALSE );
+ pNewUpper = rThis.GetLeaf( MAKEPAGE_NONE, sal_False );
// --> OD 2004-06-23 #i27801# - no move backward of 'master' text frame,
// if - due to its object positioning - it isn't allowed to be on the new page frame
@@ -2483,7 +2483,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
SwFrm *pFrm = pNewUpper->Lower();
while ( pFrm->GetNext() )
pFrm = pFrm->GetNext();
- pNewUpper = pFrm->GetLeaf( MAKEPAGE_INSERT, TRUE );
+ pNewUpper = pFrm->GetLeaf( MAKEPAGE_INSERT, sal_True );
if( pNewUpper == rThis.GetUpper() ) //Landen wir wieder an der gleichen Stelle?
pNewUpper = NULL; //dann eruebrigt sich das Moven
}
@@ -2492,7 +2492,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
}
// <--
}
- if ( pNewUpper && !ShouldBwdMoved( pNewUpper, TRUE, rbReformat ) )
+ if ( pNewUpper && !ShouldBwdMoved( pNewUpper, sal_True, rbReformat ) )
{
if( !pNewUpper->Lower() )
{
@@ -2510,9 +2510,9 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
!pSectFrm->ContainsCntnt() && !pSectFrm->ContainsAny( true ) )
// <--
{
- pSectFrm->DelEmpty( TRUE );
+ pSectFrm->DelEmpty( sal_True );
delete pSectFrm;
- rThis.bValidPos = TRUE;
+ rThis.bValidPos = sal_True;
}
}
}
@@ -2567,7 +2567,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
( !rThis.IsSctFrm() && rThis.IsInSct() )
? MAKEPAGE_NOSECTION
: MAKEPAGE_NONE,
- TRUE );
+ sal_True );
// --> OD 2007-01-10 #i73194# - make code robust
ASSERT( pNextNewUpper, "<SwFlowFrm::MoveBwd(..)> - missing next new upper" );
if ( pNextNewUpper &&
@@ -2625,7 +2625,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
pNewUpper = (SwSectionFrm*)pTmp;
else
{
- pSct = new SwSectionFrm( *pSct, TRUE );
+ pSct = new SwSectionFrm( *pSct, sal_True );
pSct->Paste( pNewUpper );
pSct->Init();
pNewUpper = pSct;
@@ -2633,8 +2633,8 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
}
}
}
- BOOL bUnlock = FALSE;
- BOOL bFollow = FALSE;
+ sal_Bool bUnlock = sal_False;
+ sal_Bool bFollow = sal_False;
//Section locken, sonst kann sie bei Fluss des einzigen Cntnt etwa
//von zweiter in die erste Spalte zerstoert werden.
SwSectionFrm* pSect = pNewUpper->FindSctFrm();
@@ -2673,7 +2673,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
SwPageFrm *pNewPage = rThis.FindPageFrm();
if( pNewPage != pOldPage )
{
- rThis.Prepare( PREP_BOSS_CHGD, (const void*)pOldPage, FALSE );
+ rThis.Prepare( PREP_BOSS_CHGD, (const void*)pOldPage, sal_False );
ViewShell *pSh = rThis.GetShell();
if ( pSh && !pSh->Imp()->IsUpdateExpFlds() )
pSh->GetDoc()->SetNewFldLst(true); //Wird von CalcLayout() hinterher eledigt!
@@ -2691,12 +2691,12 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
SwPageFrm* pStartPage = bCheckPageDescOfNextPage ?
pNewPage :
(SwPageFrm*)pNewPage->GetNext();
- SwFrm::CheckPageDescs( pStartPage, FALSE);
+ SwFrm::CheckPageDescs( pStartPage, sal_False);
}
else if ( rThis.GetAttrSet()->GetPageDesc().GetPageDesc() )
{
//Erste Seite wird etwa durch Ausblenden eines Bereiches leer
- SwFrm::CheckPageDescs( (SwPageFrm*)pNewPage, FALSE);
+ SwFrm::CheckPageDescs( (SwPageFrm*)pNewPage, sal_False);
}
}
}
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index d71db56cf10f..38ce56f902d4 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -122,30 +122,30 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
// aRelPos(),
pPrevLink( 0 ),
pNextLink( 0 ),
- bInCnt( FALSE ),
- bAtCnt( FALSE ),
- bLayout( FALSE ),
- bAutoPosition( FALSE ),
- bNoShrink( FALSE ),
- bLockDeleteContent( FALSE )
+ bInCnt( sal_False ),
+ bAtCnt( sal_False ),
+ bLayout( sal_False ),
+ bAutoPosition( sal_False ),
+ bNoShrink( sal_False ),
+ bLockDeleteContent( sal_False )
{
nType = FRMC_FLY;
- bInvalid = bNotifyBack = TRUE;
+ bInvalid = bNotifyBack = sal_True;
bLocked = bMinHeight =
- bHeightClipped = bWidthClipped = bFormatHeightOnly = FALSE;
+ bHeightClipped = bWidthClipped = bFormatHeightOnly = sal_False;
//Grosseneinstellung, Fixe groesse ist immer die Breite
const SwFmtFrmSize &rFrmSize = pFmt->GetFrmSize();
- BOOL bVert = FALSE;
- UINT16 nDir =
+ sal_Bool bVert = sal_False;
+ sal_uInt16 nDir =
((SvxFrameDirectionItem&)pFmt->GetFmtAttr( RES_FRAMEDIR )).GetValue();
if( FRMDIR_ENVIRONMENT == nDir )
{
bDerivedVert = 1;
bDerivedR2L = 1;
if( pAnch && pAnch->IsVertical() )
- bVert = TRUE;
+ bVert = sal_True;
}
else
{
@@ -170,16 +170,16 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
//Hoehe Fix oder Variabel oder was?
if ( rFrmSize.GetHeightSizeType() == ATT_MIN_SIZE )
- bMinHeight = TRUE;
+ bMinHeight = sal_True;
else if ( rFrmSize.GetHeightSizeType() == ATT_FIX_SIZE )
- bFixSize = TRUE;
+ bFixSize = sal_True;
// OD 2004-02-12 #110582#-2 - insert columns, if necessary
InsertColumns();
//Erst das Init, dann den Inhalt, denn zum Inhalt koennen widerum
//Objekte/Rahmen gehoeren die dann angemeldet werden.
- InitDrawObj( FALSE );
+ InitDrawObj( sal_False );
// OD 2004-01-19 #110582#
Chain( pAnch );
@@ -231,7 +231,7 @@ void SwFlyFrm::InsertCnt()
{
const SwFmtCntnt& rCntnt = GetFmt()->GetCntnt();
ASSERT( rCntnt.GetCntntIdx(), ":-( no content prepared." );
- ULONG nIndex = rCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nIndex = rCntnt.GetCntntIdx()->GetIndex();
// Lower() bedeutet SwColumnFrm, eingefuegt werden muss der Inhalt dann in den (Column)BodyFrm
::_InsertCnt( Lower() ? (SwLayoutFrm*)((SwLayoutFrm*)Lower())->Lower() : (SwLayoutFrm*)this,
GetFmt()->GetDoc(), nIndex );
@@ -239,8 +239,8 @@ void SwFlyFrm::InsertCnt()
//NoTxt haben immer eine FixHeight.
if ( Lower() && Lower()->IsNoTxtFrm() )
{
- bFixSize = TRUE;
- bMinHeight = FALSE;
+ bFixSize = sal_True;
+ bMinHeight = sal_False;
}
}
}
@@ -382,7 +382,7 @@ void SwFlyFrm::DeleteCnt()
|* Letzte Aenderung MA 30. Nov. 95
|*
|*************************************************************************/
-void SwFlyFrm::InitDrawObj( BOOL bNotify )
+void SwFlyFrm::InitDrawObj( sal_Bool bNotify )
{
//ContactObject aus dem Format suchen. Wenn bereits eines existiert, so
//braucht nur eine neue Ref erzeugt werden, anderfalls ist es jetzt an
@@ -563,7 +563,7 @@ void SwFlyFrm::UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
//Der Follow muss mit seinem eigenen Inhalt versorgt werden.
const SwFmtCntnt &rCntnt = pFollow->GetFmt()->GetCntnt();
ASSERT( rCntnt.GetCntntIdx(), ":-( Kein Inhalt vorbereitet." );
- ULONG nIndex = rCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nIndex = rCntnt.GetCntntIdx()->GetIndex();
// Lower() bedeutet SwColumnFrm, dieser beinhaltet wieder einen SwBodyFrm
::_InsertCnt( pFollow->Lower() ? (SwLayoutFrm*)((SwLayoutFrm*)pFollow->Lower())->Lower()
: (SwLayoutFrm*)pFollow,
@@ -663,23 +663,23 @@ SwFrm *SwFlyFrm::FindLastLower()
|*
|*************************************************************************/
-BOOL SwFlyFrm::FrmSizeChg( const SwFmtFrmSize &rFrmSize )
+sal_Bool SwFlyFrm::FrmSizeChg( const SwFmtFrmSize &rFrmSize )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTwips nDiffHeight = Frm().Height();
if ( rFrmSize.GetHeightSizeType() == ATT_VAR_SIZE )
- bFixSize = bMinHeight = FALSE;
+ bFixSize = bMinHeight = sal_False;
else
{
if ( rFrmSize.GetHeightSizeType() == ATT_FIX_SIZE )
{
- bFixSize = TRUE;
- bMinHeight = FALSE;
+ bFixSize = sal_True;
+ bMinHeight = sal_False;
}
else if ( rFrmSize.GetHeightSizeType() == ATT_MIN_SIZE )
{
- bFixSize = FALSE;
- bMinHeight = TRUE;
+ bFixSize = sal_False;
+ bMinHeight = sal_True;
}
nDiffHeight -= rFrmSize.GetHeight();
}
@@ -702,13 +702,13 @@ BOOL SwFlyFrm::FrmSizeChg( const SwFmtFrmSize &rFrmSize )
aPrt.Width ( aPrt.Width() - nDiffWidth );
ChgLowersProp( aOldSz );
::Notify( this, FindPageFrm(), aOld );
- bValidPos = FALSE;
- bRet = TRUE;
+ bValidPos = sal_False;
+ bRet = sal_True;
}
else if ( Lower()->IsNoTxtFrm() )
{
- bFixSize = TRUE;
- bMinHeight = FALSE;
+ bFixSize = sal_True;
+ bMinHeight = sal_False;
}
}
return bRet;
@@ -725,7 +725,7 @@ BOOL SwFlyFrm::FrmSizeChg( const SwFmtFrmSize &rFrmSize )
void SwFlyFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
- BYTE nInvFlags = 0;
+ sal_uInt8 nInvFlags = 0;
if( pNew && RES_ATTRSET_CHG == pNew->Which() )
{
@@ -733,7 +733,7 @@ void SwFlyFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() );
SwAttrSetChg aOldSet( *(SwAttrSetChg*)pOld );
SwAttrSetChg aNewSet( *(SwAttrSetChg*)pNew );
- while( TRUE )
+ while( sal_True )
{
_UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
@@ -792,11 +792,11 @@ void SwFlyFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
- BYTE &rInvFlags,
+ sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
- BOOL bClear = TRUE;
- const USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_Bool bClear = sal_True;
+ const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
ViewShell *pSh = GetShell();
switch( nWhich )
{
@@ -891,7 +891,7 @@ void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
SwFmtCol aCol;
if ( Lower() && Lower()->IsColumnFrm() )
{
- USHORT nCol = 0;
+ sal_uInt16 nCol = 0;
SwFrm *pTmp = Lower();
do
{ ++nCol;
@@ -928,7 +928,7 @@ void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
if ( pSh )
pSh->InvalidateWindows( Frm() );
const IDocumentDrawModelAccess* pIDDMA = GetFmt()->getIDocumentDrawModelAccess();
- const BYTE nId = GetFmt()->GetOpaque().GetValue() ?
+ const sal_uInt8 nId = GetFmt()->GetOpaque().GetValue() ?
pIDDMA->GetHeavenId() :
pIDDMA->GetHellId();
GetVirtDrawObj()->SetLayer( nId );
@@ -988,8 +988,8 @@ void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
break;
case RES_FRAMEDIR :
- SetDerivedVert( FALSE );
- SetDerivedR2L( FALSE );
+ SetDerivedVert( sal_False );
+ SetDerivedR2L( sal_False );
CheckDirChange();
break;
@@ -999,7 +999,7 @@ void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
pSh->InvalidateWindows( Frm() );
const IDocumentDrawModelAccess* pIDDMA = GetFmt()->getIDocumentDrawModelAccess();
- const BYTE nId = ((SvxOpaqueItem*)pNew)->GetValue() ?
+ const sal_uInt8 nId = ((SvxOpaqueItem*)pNew)->GetValue() ?
pIDDMA->GetHeavenId() :
pIDDMA->GetHellId();
GetVirtDrawObj()->SetLayer( nId );
@@ -1077,7 +1077,7 @@ void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
}
default:
- bClear = FALSE;
+ bClear = sal_False;
}
if ( bClear )
{
@@ -1104,11 +1104,11 @@ void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
*************************************************************************/
// erfrage vom Modify Informationen
-BOOL SwFlyFrm::GetInfo( SfxPoolItem & rInfo ) const
+sal_Bool SwFlyFrm::GetInfo( SfxPoolItem & rInfo ) const
{
if( RES_AUTOFMT_DOCNODE == rInfo.Which() )
- return FALSE; // es gibt einen FlyFrm also wird er benutzt
- return TRUE; // weiter suchen
+ return sal_False; // es gibt einen FlyFrm also wird er benutzt
+ return sal_True; // weiter suchen
}
/*************************************************************************
@@ -1123,7 +1123,7 @@ BOOL SwFlyFrm::GetInfo( SfxPoolItem & rInfo ) const
void SwFlyFrm::_Invalidate( SwPageFrm *pPage )
{
InvalidatePage( pPage );
- bNotifyBack = bInvalid = TRUE;
+ bNotifyBack = bInvalid = sal_True;
SwFlyFrm *pFrm;
if ( GetAnchorFrm() && 0 != (pFrm = AnchorFrm()->FindFlyFrm()) )
@@ -1237,13 +1237,13 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
{
aHori.SetHoriOrient( text::HoriOrientation::NONE );
aHori.SetRelationOrient( text::RelOrientation::PAGE_FRAME );
- aHori.SetPosToggle( FALSE );
+ aHori.SetPosToggle( sal_False );
}
else if ( eAnchorType == FLY_AT_FLY )
{
aHori.SetHoriOrient( text::HoriOrientation::NONE );
aHori.SetRelationOrient( text::RelOrientation::FRAME );
- aHori.SetPosToggle( FALSE );
+ aHori.SetPosToggle( sal_False );
}
// <--
else if ( IsFlyAtCntFrm() || text::HoriOrientation::NONE != aHori.GetHoriOrient() )
@@ -1268,7 +1268,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
}
else
aHori.SetRelationOrient( text::RelOrientation::FRAME );
- aHori.SetPosToggle( FALSE );
+ aHori.SetPosToggle( sal_False );
}
aHori.SetPos( nTmpX );
aSet.Put( aHori );
@@ -1307,9 +1307,9 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
//Breite der Spalten pruefen und ggf. einstellen.
if ( Lower() && Lower()->IsColumnFrm() )
- AdjustColumns( 0, FALSE );
+ AdjustColumns( 0, sal_False );
- bValidSize = TRUE;
+ bValidSize = sal_True;
const SwTwips nUL = pAttrs->CalcTopLine() + pAttrs->CalcBottomLine();
const SwTwips nLR = pAttrs->CalcLeftLine() + pAttrs->CalcRightLine();
@@ -1364,7 +1364,7 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
SwTwips nTop = (Frm().*fnRect->fnGetTop)();
SwTwips nBorder = (Frm().*fnRect->fnGetHeight)() -
(Prt().*fnRect->fnGetHeight)();
- for ( USHORT i = 0; i < nCnt; ++i )
+ for ( sal_uInt16 i = 0; i < nCnt; ++i )
{
SwAnchoredObject* pAnchoredObj = (*GetDrawObjs())[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -1405,11 +1405,11 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
InvalidateObjRectWithSpaces();
}
// <--
- bValidSize = TRUE;
+ bValidSize = sal_True;
}
else
{
- bValidSize = TRUE; //Fixe Frms formatieren sich nicht.
+ bValidSize = sal_True; //Fixe Frms formatieren sich nicht.
//Flys stellen ihre Groesse anhand des Attr ein.
SwTwips nNewSize = bVert ? aRelSize.Width() : aRelSize.Height();
nNewSize -= nUL;
@@ -1472,19 +1472,19 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
// problems in method <SwCntntFrm::_WouldFit(..)>,
// which assumes that the follows are formatted.
// Thus, <bNoCalcFollow> no longer used by <FormatWidthCols(..)>.
-//void CalcCntnt( SwLayoutFrm *pLay, BOOL bNoColl )
+//void CalcCntnt( SwLayoutFrm *pLay, sal_Bool bNoColl )
void CalcCntnt( SwLayoutFrm *pLay,
bool bNoColl,
bool bNoCalcFollow )
{
SwSectionFrm* pSect;
- BOOL bCollect = FALSE;
+ sal_Bool bCollect = sal_False;
if( pLay->IsSctFrm() )
{
pSect = (SwSectionFrm*)pLay;
if( pSect->IsEndnAtEnd() && !bNoColl )
{
- bCollect = TRUE;
+ bCollect = sal_True;
SwLayouter::CollectEndnotes( pLay->GetFmt()->GetDoc(), pSect );
}
pSect->CalcFtnCntnt();
@@ -1505,8 +1505,8 @@ void CalcCntnt( SwLayoutFrm *pLay,
if( bCollect )
pLay->GetFmt()->GetDoc()->GetLayouter()->
InsertEndnotes( pSect );
- BOOL bLock = pSect->IsFtnLock();
- pSect->SetFtnLock( TRUE );
+ sal_Bool bLock = pSect->IsFtnLock();
+ pSect->SetFtnLock( sal_True );
pSect->CalcFtnCntnt();
pSect->CalcFtnCntnt();
pSect->SetFtnLock( bLock );
@@ -1527,8 +1527,8 @@ void CalcCntnt( SwLayoutFrm *pLay,
SwAnchoredObject* pAgainObj2 = 0;
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns = 0;
- const USHORT nLoopControlMax = 20;
+ sal_uInt16 nLoopControlRuns = 0;
+ const sal_uInt16 nLoopControlMax = 20;
const SwFrm* pLoopControlCond = 0;
SwFrm* pLast;
@@ -1545,14 +1545,14 @@ void CalcCntnt( SwLayoutFrm *pLay,
if ( pFrm->IsTabFrm() )
{
- ((SwTabFrm*)pFrm)->bCalcLowers = TRUE;
+ ((SwTabFrm*)pFrm)->bCalcLowers = sal_True;
// OD 26.08.2003 #i18103# - lock move backward of follow table,
// if no section content is formatted or follow table belongs
// to the section, which content is formatted.
if ( ((SwTabFrm*)pFrm)->IsFollow() &&
( !pSect || pSect == pFrm->FindSctFrm() ) )
{
- ((SwTabFrm*)pFrm)->bLockBackMove = TRUE;
+ ((SwTabFrm*)pFrm)->bLockBackMove = sal_True;
}
}
@@ -1597,7 +1597,7 @@ void CalcCntnt( SwLayoutFrm *pLay,
bool bAgain = false;
SwPageFrm* pPageFrm = pFrm->FindPageFrm();
sal_uInt32 nCnt = pFrm->GetDrawObjs()->Count();
- for ( USHORT i = 0; i < nCnt; ++i )
+ for ( sal_uInt16 i = 0; i < nCnt; ++i )
{
// --> OD 2004-07-01 #i28701#
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
@@ -1727,7 +1727,7 @@ void CalcCntnt( SwLayoutFrm *pLay,
if ( pFrm->IsTabFrm() )
{
if ( ((SwTabFrm*)pFrm)->IsFollow() )
- ((SwTabFrm*)pFrm)->bLockBackMove = FALSE;
+ ((SwTabFrm*)pFrm)->bLockBackMove = sal_False;
}
pFrm = bPrevInvalid ? pTmpPrev : pFrm->FindNext();
@@ -1778,14 +1778,14 @@ void CalcCntnt( SwLayoutFrm *pLay,
if( bCollect )
{
pFrm = pLay->ContainsAny();
- bCollect = FALSE;
+ bCollect = sal_False;
if( pFrm )
continue;
}
}
break;
}
- while( TRUE );
+ while( sal_True );
}
/*************************************************************************
@@ -1802,7 +1802,7 @@ void SwFlyFrm::MakeObjPos()
{
if ( !bValidPos )
{
- bValidPos = TRUE;
+ bValidPos = sal_True;
// OD 29.10.2003 #113049# - use new class to position object
GetAnchorFrm()->Calc();
@@ -1837,7 +1837,7 @@ void SwFlyFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
if ( !bValidPrtArea )
{
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
// OD 31.07.2003 #110978# - consider vertical layout
SWRECTFN( this )
@@ -1857,7 +1857,7 @@ void SwFlyFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
|*
|*************************************************************************/
-SwTwips SwFlyFrm::_Grow( SwTwips nDist, BOOL bTst )
+SwTwips SwFlyFrm::_Grow( SwTwips nDist, sal_Bool bTst )
{
SWRECTFN( this )
if ( Lower() && !IsColLocked() && !HasFixSize() )
@@ -1886,7 +1886,7 @@ SwTwips SwFlyFrm::_Grow( SwTwips nDist, BOOL bTst )
{
const SwRect aOld( GetObjRectWithSpaces() );
_InvalidateSize();
- const BOOL bOldLock = bLocked;
+ const sal_Bool bOldLock = bLocked;
Unlock();
if ( IsFlyFreeFrm() )
{
@@ -1896,16 +1896,16 @@ SwTwips SwFlyFrm::_Grow( SwTwips nDist, BOOL bTst )
// Writer fly frames - inner Writer fly frames format its
// anchor, which grows/shrinks the outer Writer fly frame.
// Note: position will be invalidated below.
- bValidPos = TRUE;
+ bValidPos = sal_True;
// --> OD 2005-10-10 #i55416#
// Suppress format of width for autowidth frame, because the
// format of the width would call <SwTxtFrm::CalcFitToContent()>
// for the lower frame, which initiated this grow.
- const BOOL bOldFormatHeightOnly = bFormatHeightOnly;
+ const sal_Bool bOldFormatHeightOnly = bFormatHeightOnly;
const SwFmtFrmSize& rFrmSz = GetFmt()->GetFrmSize();
if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE )
{
- bFormatHeightOnly = TRUE;
+ bFormatHeightOnly = sal_True;
}
// <--
static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( true );
@@ -1935,7 +1935,7 @@ SwTwips SwFlyFrm::_Grow( SwTwips nDist, BOOL bTst )
return 0L;
}
-SwTwips SwFlyFrm::_Shrink( SwTwips nDist, BOOL bTst )
+SwTwips SwFlyFrm::_Shrink( SwTwips nDist, sal_Bool bTst )
{
if( Lower() && !IsColLocked() && !HasFixSize() && !IsNoShrink() )
{
@@ -1985,7 +1985,7 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, BOOL bTst )
{
const SwRect aOld( GetObjRectWithSpaces() );
_InvalidateSize();
- const BOOL bOldLocked = bLocked;
+ const sal_Bool bOldLocked = bLocked;
Unlock();
if ( IsFlyFreeFrm() )
{
@@ -1995,16 +1995,16 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, BOOL bTst )
// Writer fly frames - inner Writer fly frames format its
// anchor, which grows/shrinks the outer Writer fly frame.
// Note: position will be invalidated below.
- bValidPos = TRUE;
+ bValidPos = sal_True;
// --> OD 2005-10-10 #i55416#
// Suppress format of width for autowidth frame, because the
// format of the width would call <SwTxtFrm::CalcFitToContent()>
// for the lower frame, which initiated this shrink.
- const BOOL bOldFormatHeightOnly = bFormatHeightOnly;
+ const sal_Bool bOldFormatHeightOnly = bFormatHeightOnly;
const SwFmtFrmSize& rFrmSz = GetFmt()->GetFrmSize();
if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE )
{
- bFormatHeightOnly = TRUE;
+ bFormatHeightOnly = sal_True;
}
// <--
static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( true );
@@ -2061,7 +2061,7 @@ Size SwFlyFrm::ChgSize( const Size& aNewSize )
static_cast<SwNoTxtFrm*>(Lower())->GetNode()->GetOLENode() )
{
SwRect aClipRect;
- ::CalcClipRect( GetVirtDrawObj(), aClipRect, FALSE );
+ ::CalcClipRect( GetVirtDrawObj(), aClipRect, sal_False );
if ( aAdjustedNewSize.Width() > aClipRect.Width() )
{
aAdjustedNewSize.setWidth( aClipRect.Width() );
@@ -2101,19 +2101,19 @@ Size SwFlyFrm::ChgSize( const Size& aNewSize )
|*
|*************************************************************************/
-BOOL SwFlyFrm::IsLowerOf( const SwLayoutFrm* pUpperFrm ) const
+sal_Bool SwFlyFrm::IsLowerOf( const SwLayoutFrm* pUpperFrm ) const
{
ASSERT( GetAnchorFrm(), "8-( Fly is lost in Space." );
const SwFrm* pFrm = GetAnchorFrm();
do
{
if ( pFrm == pUpperFrm )
- return TRUE;
+ return sal_True;
pFrm = pFrm->IsFlyFrm()
? ((const SwFlyFrm*)pFrm)->GetAnchorFrm()
: pFrm->GetUpper();
} while ( pFrm );
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -2164,7 +2164,7 @@ void SwFrm::AppendFly( SwFlyFrm *pNew )
SwPageFrm *pTmp = pRoot->GetLastPage();
if ( pTmp->GetPhyPageNum() > 30 )
{
- for ( USHORT i = 0; i < 10; ++i )
+ for ( sal_uInt16 i = 0; i < 10; ++i )
{
pTmp = (SwPageFrm*)pTmp->GetPrev();
if( pTmp->GetPhyPageNum() <= pPage->GetPhyPageNum() )
@@ -2660,10 +2660,10 @@ SwTwips SwFlyFrm::CalcAutoWidth() const
|*************************************************************************/
/// OD 16.04.2003 #i13147# - If called for paint and the <SwNoTxtFrm> contains
/// a graphic, load of intrinsic graphic has to be avoided.
-BOOL SwFlyFrm::GetContour( PolyPolygon& rContour,
+sal_Bool SwFlyFrm::GetContour( PolyPolygon& rContour,
const sal_Bool _bForPaint ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( GetFmt()->GetSurround().IsContour() && Lower() &&
Lower()->IsNoTxtFrm() )
{
@@ -2689,7 +2689,7 @@ BOOL SwFlyFrm::GetContour( PolyPolygon& rContour,
if( !pNd->HasContour() )
{
// OD 16.04.2003 #i13147# - no <CreateContour> for a graphic
- // during paint. Thus, return (value of <bRet> should be <FALSE>).
+ // during paint. Thus, return (value of <bRet> should be <sal_False>).
if ( pGrfNd && _bForPaint )
{
ASSERT( false, "SwFlyFrm::GetContour() - No Contour found at <SwNoTxtNode> during paint." );
@@ -2703,7 +2703,7 @@ BOOL SwFlyFrm::GetContour( PolyPolygon& rContour,
SwRect aClip;
SwRect aOrig;
Lower()->Calc();
- ((SwNoTxtFrm*)Lower())->GetGrfArea( aClip, &aOrig, FALSE );
+ ((SwNoTxtFrm*)Lower())->GetGrfArea( aClip, &aOrig, sal_False );
// OD 16.04.2003 #i13147# - copy method code <SvxContourDlg::ScaleContour(..)>
// in order to avoid that graphic has to be loaded for contour scale.
//SvxContourDlg::ScaleContour( rContour, aGrf, MAP_TWIP, aOrig.SSize() );
@@ -2716,7 +2716,7 @@ BOOL SwFlyFrm::GetContour( PolyPolygon& rContour,
double fScaleY;
Size aOrgSize;
Point aNewPoint;
- BOOL bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL;
+ sal_Bool bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL;
if ( bPixelMap )
aOrgSize = pOutDev->PixelToLogic( aGrfSize, aDispMap );
@@ -2728,11 +2728,11 @@ BOOL SwFlyFrm::GetContour( PolyPolygon& rContour,
fScaleX = (double) aOrig.Width() / aOrgSize.Width();
fScaleY = (double) aOrig.Height() / aOrgSize.Height();
- for ( USHORT j = 0, nPolyCount = rContour.Count(); j < nPolyCount; j++ )
+ for ( sal_uInt16 j = 0, nPolyCount = rContour.Count(); j < nPolyCount; j++ )
{
Polygon& rPoly = rContour[ j ];
- for ( USHORT i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
{
if ( bPixelMap )
aNewPoint = pOutDev->PixelToLogic( rPoly[ i ], aDispMap );
@@ -2756,7 +2756,7 @@ BOOL SwFlyFrm::GetContour( PolyPolygon& rContour,
aClip.Height( 1 );
rContour.Clip( aClip.SVRect() );
rContour.Optimize(POLY_OPTIMIZE_CLOSE);
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 4d9b654fb79c..6a2621beaaa9 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -86,7 +86,7 @@ using namespace ::com::sun::star;
SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
SwFlyFreeFrm( pFmt, pAnch )
{
- bAtCnt = TRUE;
+ bAtCnt = sal_True;
bAutoPosition = (FLY_AT_CHAR == pFmt->GetAnchor().GetAnchorId());
}
@@ -104,11 +104,11 @@ TYPEINIT1(SwFlyAtCntFrm,SwFlyFreeFrm);
void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
- USHORT nWhich = pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
const SwFmtAnchor *pAnch = 0;
if( RES_ATTRSET_CHG == nWhich && SFX_ITEM_SET ==
- ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, FALSE,
+ ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, sal_False,
(const SfxPoolItem**)&pAnch ))
; // Beim GetItemState wird der AnkerPointer gesetzt !
@@ -132,7 +132,7 @@ void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
SwCntntFrm *pCntnt = (SwCntntFrm*)GetAnchorFrm();
AnchorFrm()->RemoveFly( this );
- const BOOL bBodyFtn = (pCntnt->IsInDocBody() || pCntnt->IsInFtn());
+ const sal_Bool bBodyFtn = (pCntnt->IsInDocBody() || pCntnt->IsInFtn());
//Den neuen Anker anhand des NodeIdx suchen, am alten und
//neuen NodeIdx kann auch erkannt werden, in welche Richtung
@@ -194,7 +194,7 @@ void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
if ( !pCntnt )
{
SwCntntNode *pNode = aNewIdx.GetNode().GetCntntNode();
- pCntnt = pNode->GetFrm( &pOldAnchor->Frm().Pos(), 0, FALSE );
+ pCntnt = pNode->GetFrm( &pOldAnchor->Frm().Pos(), 0, sal_False );
ASSERT( pCntnt, "Neuen Anker nicht gefunden" );
}
//Flys haengen niemals an einem Follow sondern immer am
@@ -269,7 +269,7 @@ public:
SwOszControl( const SwFlyFrm *pFrm );
~SwOszControl();
bool ChkOsz();
- static BOOL IsInProgress( const SwFlyFrm *pFly );
+ static sal_Bool IsInProgress( const SwFlyFrm *pFly );
};
const SwFlyFrm *SwOszControl::pStk1 = 0;
const SwFlyFrm *SwOszControl::pStk2 = 0;
@@ -318,19 +318,19 @@ SwOszControl::~SwOszControl()
// <--
}
-BOOL SwOszControl::IsInProgress( const SwFlyFrm *pFly )
+sal_Bool SwOszControl::IsInProgress( const SwFlyFrm *pFly )
{
if ( SwOszControl::pStk1 && !pFly->IsLowerOf( SwOszControl::pStk1 ) )
- return TRUE;
+ return sal_True;
if ( SwOszControl::pStk2 && !pFly->IsLowerOf( SwOszControl::pStk2 ) )
- return TRUE;
+ return sal_True;
if ( SwOszControl::pStk3 && !pFly->IsLowerOf( SwOszControl::pStk3 ) )
- return TRUE;
+ return sal_True;
if ( SwOszControl::pStk4 && !pFly->IsLowerOf( SwOszControl::pStk4 ) )
- return TRUE;
+ return sal_True;
if ( SwOszControl::pStk5 && !pFly->IsLowerOf( SwOszControl::pStk5 ) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
bool SwOszControl::ChkOsz()
@@ -387,7 +387,7 @@ void SwFlyAtCntFrm::MakeAll()
// --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
if( GetPageFrm() )
{
- bSetCompletePaintOnInvalidate = TRUE;
+ bSetCompletePaintOnInvalidate = sal_True;
{
SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
const SwFmtFrmSize &rFrmSz = GetFmt()->GetFrmSize();
@@ -421,7 +421,7 @@ void SwFlyAtCntFrm::MakeAll()
if( pFooter && !pFooter->IsFooterFrm() )
pFooter = NULL;
bool bOsz = false;
- BOOL bExtra = Lower() && Lower()->IsColumnFrm();
+ sal_Bool bExtra = Lower() && Lower()->IsColumnFrm();
// --> OD 2004-08-25 #i3317# - boolean, to apply temporarly the
// 'straightforward positioning process' for the frame due to its
// overlapping with a previous column.
@@ -548,7 +548,7 @@ void SwFlyAtCntFrm::MakeAll()
// Spalten hinterlaesst, so drehen wir lieber hier eine weitere
// Runde und formatieren unseren Inhalt via FormatWidthCols nochmal.
_InvalidateSize();
- bExtra = FALSE; // Sicherhaltshalber gibt es nur eine Ehrenrunde.
+ bExtra = sal_False; // Sicherhaltshalber gibt es nur eine Ehrenrunde.
}
} while ( !IsValid() && !bOsz &&
// --> OD 2004-08-25 #i3317#
@@ -595,7 +595,7 @@ void SwFlyAtCntFrm::MakeAll()
// <--
}
// <--
- bSetCompletePaintOnInvalidate = FALSE;
+ bSetCompletePaintOnInvalidate = sal_False;
}
}
}
@@ -632,10 +632,10 @@ public:
SwDistance() { nMain = nSub = 0; }
SwDistance& operator=( const SwDistance &rTwo )
{ nMain = rTwo.nMain; nSub = rTwo.nSub; return *this; }
- BOOL operator<( const SwDistance& rTwo )
+ sal_Bool operator<( const SwDistance& rTwo )
{ return nMain < rTwo.nMain || ( nMain == rTwo.nMain && nSub &&
rTwo.nSub && nSub < rTwo.nSub ); }
- BOOL operator<=( const SwDistance& rTwo )
+ sal_Bool operator<=( const SwDistance& rTwo )
{ return nMain < rTwo.nMain || ( nMain == rTwo.nMain && ( !nSub ||
!rTwo.nSub || nSub <= rTwo.nSub ) ); }
};
@@ -691,7 +691,7 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
{
// OD 26.09.2003 - <rPt> point is left of environment of given content frame
// OD: seems not to be correct for vertical layout!?
- const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, FALSE, pCnt );
+ const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, sal_False, pCnt );
if( !pLay ||
(bVert && (pLay->Frm().Top() + pLay->Prt().Bottom()) <rPt.Y())||
(!bVert && (pLay->Frm().Left() + pLay->Prt().Right())<rPt.X()) )
@@ -717,10 +717,10 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
// <--
const SwFrm *pPre = pCnt;
- const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, TRUE, pCnt );
+ const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, sal_True, pCnt );
SwTwips nFrmTop = 0;
SwTwips nPrtHeight = 0;
- BOOL bSct = FALSE;
+ sal_Bool bSct = sal_False;
const SwSectionFrm *pSect = pUp->FindSctFrm();
if( pSect )
{
@@ -729,7 +729,7 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
}
if( pSect && !pSect->IsAnLower( pLay ) )
{
- bSct = FALSE;
+ bSct = sal_False;
const SwSectionFrm* pNxtSect = pLay ? pLay->FindSctFrm() : 0;
if( pSect->IsAnFollow( pNxtSect ) )
{
@@ -801,13 +801,13 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
else
rRet.nMain += nPrtHeight;
pPre = pLay;
- pLay = pLay->GetLeaf( MAKEPAGE_NONE, TRUE, pCnt );
+ pLay = pLay->GetLeaf( MAKEPAGE_NONE, sal_True, pCnt );
if( pSect && !pSect->IsAnLower( pLay ) )
{ // If we're leaving a SwSectionFrm, the next Leaf-Frm
// is the part of the upper below the SectionFrm.
const SwSectionFrm* pNxtSect = pLay ?
pLay->FindSctFrm() : NULL;
- bSct = FALSE;
+ bSct = sal_False;
if( pSect->IsAnFollow( pNxtSect ) )
{
pSect = pNxtSect;
@@ -884,9 +884,9 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
return 0;
}
-ULONG MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
+sal_uLong MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
const SwCntntFrm *& rpCnt,
- const BOOL bBody, const BOOL bFtn )
+ const sal_Bool bBody, const sal_Bool bFtn )
{
//Sucht unterhalb von pLay den dichtesten Cnt zum Point. Der Bezugspunkt
//der Cntnts ist immer die linke obere Ecke.
@@ -897,8 +897,8 @@ ULONG MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
#endif
rpCnt = 0;
- ULONG nDistance = ULONG_MAX;
- ULONG nNearest = ULONG_MAX;
+ sal_uLong nDistance = ULONG_MAX;
+ sal_uLong nNearest = ULONG_MAX;
const SwCntntFrm *pCnt = pLay->ContainsCntnt();
while ( pCnt && (bBody != pCnt->IsInDocBody() || bFtn != pCnt->IsInFtn()))
@@ -920,7 +920,7 @@ ULONG MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
Min( pCnt->Frm().Top(), rPt.Y() );
BigInt dX1( dX ), dY1( dY );
dX1 *= dX1; dY1 *= dY1;
- const ULONG nDiff = ::SqRt( dX1 + dY1 );
+ const sal_uLong nDiff = ::SqRt( dX1 + dY1 );
if ( pCnt->Frm().Top() <= rPt.Y() )
{
if ( nDiff < nDistance )
@@ -949,7 +949,7 @@ ULONG MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
}
const SwCntntFrm * MA_FASTCALL lcl_FindCnt( const Point &rPt, const SwCntntFrm *pCnt,
- const BOOL bBody, const BOOL bFtn )
+ const sal_Bool bBody, const sal_Bool bFtn )
{
//Sucht ausgehen von pCnt denjenigen CntntFrm, dessen linke obere
//Ecke am dichtesten am Point liegt.
@@ -963,7 +963,7 @@ const SwCntntFrm * MA_FASTCALL lcl_FindCnt( const Point &rPt, const SwCntntFrm *
//des Point sitzt.
const SwCntntFrm *pRet, *pNew;
const SwLayoutFrm *pLay = pCnt->FindPageFrm();
- ULONG nDist;
+ sal_uLong nDist;
nDist = ::lcl_FindCntDiff( rPt, pLay, pNew, bBody, bFtn );
if ( pNew )
@@ -973,16 +973,16 @@ const SwCntntFrm * MA_FASTCALL lcl_FindCnt( const Point &rPt, const SwCntntFrm *
nDist = ULONG_MAX;
}
const SwCntntFrm *pNearest = pRet;
- ULONG nNearest = nDist;
+ sal_uLong nNearest = nDist;
if ( pLay )
{
const SwLayoutFrm *pPge = pLay;
- ULONG nOldNew = ULONG_MAX;
- for ( USHORT i = 0; pPge->GetPrev() && (i < 3); ++i )
+ sal_uLong nOldNew = ULONG_MAX;
+ for ( sal_uInt16 i = 0; pPge->GetPrev() && (i < 3); ++i )
{
pPge = (SwLayoutFrm*)pPge->GetPrev();
- const ULONG nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFtn );
+ const sal_uLong nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFtn );
if ( nNew < nDist )
{
if ( pNew->Frm().Top() <= rPt.Y() )
@@ -1004,10 +1004,10 @@ const SwCntntFrm * MA_FASTCALL lcl_FindCnt( const Point &rPt, const SwCntntFrm *
}
pPge = pLay;
nOldNew = ULONG_MAX;
- for ( USHORT j = 0; pPge->GetNext() && (j < 3); ++j )
+ for ( sal_uInt16 j = 0; pPge->GetNext() && (j < 3); ++j )
{
pPge = (SwLayoutFrm*)pPge->GetNext();
- const ULONG nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFtn );
+ const sal_uLong nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFtn );
if ( nNew < nDist )
{
if ( pNew->Frm().Top() <= rPt.Y() )
@@ -1049,7 +1049,7 @@ void lcl_PointToPrt( Point &rPoint, const SwFrm *pFrm )
}
const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
- const BOOL bBodyOnly )
+ const sal_Bool bBodyOnly )
{
//Zu der angegebenen DokumentPosition wird der dichteste Cnt im
//Textfluss gesucht. AusgangsFrm ist der uebergebene Anker.
@@ -1067,14 +1067,14 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
SwRect aTmpRect( aTmp, Size(0,0) );
pTmpLay = (SwLayoutFrm*)::FindPage( aTmpRect, pTmpLay->Lower() );
}
- pCnt = pTmpLay->GetCntntPos( aTmp, FALSE, bBodyOnly );
+ pCnt = pTmpLay->GetCntntPos( aTmp, sal_False, bBodyOnly );
}
//Beim Suchen darauf achten, dass die Bereiche sinnvoll erhalten
//bleiben. D.h. in diesem Fall nicht in Header/Footer hinein und
//nicht aus Header/Footer hinaus.
- const BOOL bBody = pCnt->IsInDocBody() || bBodyOnly;
- const BOOL bFtn = !bBodyOnly && pCnt->IsInFtn();
+ const sal_Bool bBody = pCnt->IsInDocBody() || bBodyOnly;
+ const sal_Bool bFtn = !bBodyOnly && pCnt->IsInFtn();
Point aNew( rNew );
if ( bBody )
@@ -1096,7 +1096,7 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
//So gibt es kein Problem mit Spalten.
Point aTmp( aNew );
const SwCntntFrm *pTmp = pCnt->FindPageFrm()->
- GetCntntPos( aTmp, FALSE, TRUE, FALSE );
+ GetCntntPos( aTmp, sal_False, sal_True, sal_False );
if ( pTmp && pTmp->Frm().IsInside( aNew ) )
return pTmp;
}
@@ -1110,7 +1110,7 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
SwDistance nUp, nUpLst;
::lcl_CalcDownDist( nUp, aNew, pUpFrm );
SwDistance nDown = nUp;
- BOOL bNegAllowed = TRUE;//Einmal aus dem negativen Bereich heraus lassen.
+ sal_Bool bNegAllowed = sal_True;//Einmal aus dem negativen Bereich heraus lassen.
do
{
pUpLst = pUpFrm; nUpLst = nUp;
@@ -1138,7 +1138,7 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
nUp.nMain = LONG_MAX;
if ( nUp.nMain >= 0 && LONG_MAX != nUp.nMain )
{
- bNegAllowed = FALSE;
+ bNegAllowed = sal_False;
if ( nUpLst.nMain < 0 ) //nicht den falschen erwischen, wenn der Wert
//gerade von negativ auf positiv gekippt ist.
{ pUpLst = pUpFrm;
@@ -1336,7 +1336,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
const SwFmtSurround& rSurround = pFmt->GetSurround();
- const BOOL bWrapThrough =
+ const sal_Bool bWrapThrough =
rSurround.GetSurround() == SURROUND_THROUGHT;
SwTwips nBaseOfstForFly = 0;
const SwFrm* pTmpFrm = pFrm ? pFrm : pCnt;
@@ -1425,7 +1425,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
if ( pOldPage != FindPageFrm() )
::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PREP_FLY_LEAVE,
- FALSE );
+ sal_False );
}
// OD 2004-08-12 #i32795# - Note: method no longer used in <flyincnt.cxx>
@@ -1438,9 +1438,9 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
// if( pFlow && pFlow->IsAnyJoinLocked() )
// return;
-// USHORT nCnt = 0;
+// sal_uInt16 nCnt = 0;
-// BOOL bContinue = FALSE;
+// sal_Bool bContinue = sal_False;
// do
// {
// if ( ++nCnt == 10 )
@@ -1449,7 +1449,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
// break;
// }
-// const BOOL bSetComplete = !pFrm->IsValid();
+// const sal_Bool bSetComplete = !pFrm->IsValid();
// const SwRect aOldFrm( pFrm->Frm() );
// const SwRect aOldPrt( pFrm->Prt() );
@@ -1480,7 +1480,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
// (((SwFlyFrm*)pUp)->IsFlyAtCntFrm() &&
// SwOszControl::IsInProgress( (const SwFlyFrm*)pUp )) )
// {
-// bContinue = FALSE;
+// bContinue = sal_False;
// }
// }
// } while ( bContinue );
@@ -1522,7 +1522,7 @@ void SwFlyAtCntFrm::MakeObjPos()
}
// OD 2004-03-24 #i26791# - validate position flag here.
- bValidPos = TRUE;
+ bValidPos = sal_True;
// --> OD 2004-10-22 #i35911# - no calculation of new position, if
// anchored object is marked that it clears its environment and its
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index 99f9ed7e30ba..1ff29c582696 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -55,7 +55,7 @@ void DeepCalc( const SwFrm *pFrm );
SwFlyInCntFrm::SwFlyInCntFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
SwFlyFrm( pFmt, pAnch )
{
- bInCnt = bInvalidLayout = bInvalidCntnt = TRUE;
+ bInCnt = bInvalidLayout = bInvalidCntnt = sal_True;
SwTwips nRel = pFmt->GetVertOrient().GetPos();
// OD 2004-05-27 #i26791# - member <aRelPos> moved to <SwAnchoredObject>
Point aRelPos;
@@ -108,8 +108,8 @@ void SwFlyInCntFrm::SetRefPoint( const Point& rPoint,
if( pNotify )
{
InvalidatePage();
- bValidPos = FALSE;
- bInvalid = TRUE;
+ bValidPos = sal_False;
+ bInvalid = sal_True;
Calc();
delete pNotify;
}
@@ -125,14 +125,14 @@ void SwFlyInCntFrm::SetRefPoint( const Point& rPoint,
|*************************************************************************/
void SwFlyInCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
- BOOL bCallPrepare = FALSE;
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_Bool bCallPrepare = sal_False;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
if( RES_ATTRSET_CHG == nWhich )
{
if( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->
- GetItemState( RES_SURROUND, FALSE ) ||
+ GetItemState( RES_SURROUND, sal_False ) ||
SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->
- GetItemState( RES_FRMMACRO, FALSE ) )
+ GetItemState( RES_FRMMACRO, sal_False ) )
{
SwAttrSetChg aOld( *(SwAttrSetChg*)pOld );
SwAttrSetChg aNew( *(SwAttrSetChg*)pNew );
@@ -144,19 +144,19 @@ void SwFlyInCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
if( aNew.Count() )
{
SwFlyFrm::Modify( &aOld, &aNew );
- bCallPrepare = TRUE;
+ bCallPrepare = sal_True;
}
}
else if( ((SwAttrSetChg*)pNew)->GetChgSet()->Count())
{
SwFlyFrm::Modify( pOld, pNew );
- bCallPrepare = TRUE;
+ bCallPrepare = sal_True;
}
}
else if( nWhich != RES_SURROUND && RES_FRMMACRO != nWhich )
{
SwFlyFrm::Modify( pOld, pNew );
- bCallPrepare = TRUE;
+ bCallPrepare = sal_True;
}
if ( bCallPrepare && GetAnchorFrm() )
@@ -202,7 +202,7 @@ void SwFlyInCntFrm::MakeObjPos()
{
if ( !bValidPos )
{
- bValidPos = TRUE;
+ bValidPos = sal_True;
SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
const SwFmtVertOrient &rVert = pFmt->GetVertOrient();
//Und ggf. noch die aktuellen Werte im Format updaten, dabei darf
@@ -305,14 +305,14 @@ void SwFlyInCntFrm::MakeAll()
const SwBorderAttrs &rAttrs = *aAccess.Get();
if ( IsClipped() )
- bValidSize = bHeightClipped = bWidthClipped = FALSE;
+ bValidSize = bHeightClipped = bWidthClipped = sal_False;
while ( !bValidPos || !bValidSize || !bValidPrtArea )
{
//Nur einstellen wenn das Flag gesetzt ist!!
if ( !bValidSize )
{
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
/*
// This is also done in the Format function, so I think
// this code is not necessary anymore:
@@ -350,8 +350,8 @@ void SwFlyInCntFrm::MakeAll()
Frm().Width() > pFrm->Prt().Width() )
{
Frm().Width( pFrm->Prt().Width() );
- bValidPrtArea = FALSE;
- bWidthClipped = TRUE;
+ bValidPrtArea = sal_False;
+ bWidthClipped = sal_True;
}
}
// <--
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 63d067c175b4..4a240b9d256d 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -134,7 +134,7 @@ TYPEINIT1(SwFlyFreeFrm,SwFlyFrm);
void SwFlyFreeFrm::NotifyBackground( SwPageFrm *pPageFrm,
const SwRect& rRect, PrepareHint eHint )
{
- ::Notify_Background( GetVirtDrawObj(), pPageFrm, rRect, eHint, TRUE );
+ ::Notify_Background( GetVirtDrawObj(), pPageFrm, rRect, eHint, sal_True );
}
/*************************************************************************
@@ -174,7 +174,7 @@ void SwFlyFreeFrm::MakeAll()
if ( IsClipped() )
{
- bValidSize = bHeightClipped = bWidthClipped = FALSE;
+ bValidSize = bHeightClipped = bWidthClipped = sal_False;
// --> OD 2004-11-03 #114798# - no invalidation of position,
// if anchored object is anchored inside a Writer fly frame,
// its position is already locked, and it follows the text flow.
@@ -186,14 +186,14 @@ void SwFlyFreeFrm::MakeAll()
GetFrmFmt().GetFollowTextFlow().GetValue() ) )
// <--
{
- bValidPos = FALSE;
+ bValidPos = sal_False;
}
// <--
}
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns = 0;
- const USHORT nLoopControlMax = 10;
+ sal_uInt16 nLoopControlRuns = 0;
+ const sal_uInt16 nLoopControlMax = 10;
while ( !bValidPos || !bValidSize || !bValidPrtArea || bFormatHeightOnly )
{
@@ -208,7 +208,7 @@ void SwFlyFreeFrm::MakeAll()
//Nur einstellen wenn das Flag gesetzt ist!!
if ( !bValidSize )
{
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
/*
// This is also done in the Format function, so I think
// this code is not necessary anymore:
@@ -221,7 +221,7 @@ void SwFlyFreeFrm::MakeAll()
if( nDiff )
{
(aFrm.*fnRect->fnAddRight)( nDiff );
- bValidPos = FALSE;
+ bValidPos = sal_False;
}
*/
}
@@ -231,9 +231,9 @@ void SwFlyFreeFrm::MakeAll()
if ( !bValidSize || bFormatHeightOnly )
{
- bValidSize = FALSE;
+ bValidSize = sal_False;
Format( &rAttrs );
- bFormatHeightOnly = FALSE;
+ bFormatHeightOnly = sal_False;
}
if ( !bValidPos )
@@ -242,7 +242,7 @@ void SwFlyFreeFrm::MakeAll()
// OD 2004-03-23 #i26791# - use new method <MakeObjPos()>
// --> OD 2004-11-15 #i34753# - no positioning, if requested.
if ( IsNoMakePos() )
- bValidPos = TRUE;
+ bValidPos = sal_True;
else
// OD 2004-03-23 #i26791# - use new method <MakeObjPos()>
MakeObjPos();
@@ -251,10 +251,10 @@ void SwFlyFreeFrm::MakeAll()
{
if( !bValidPos && GetAnchorFrm()->IsInSct() &&
!GetAnchorFrm()->FindSctFrm()->IsValid() )
- bValidPos = TRUE;
+ bValidPos = sal_True;
}
else
- bValidSize = FALSE;
+ bValidSize = sal_False;
}
}
@@ -341,8 +341,8 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
const SwVirtFlyDrawObj *pObj = GetVirtDrawObj();
SwRect aClip, aTmpStretch;
- ::CalcClipRect( pObj, aClip, TRUE );
- ::CalcClipRect( pObj, aTmpStretch, FALSE );
+ ::CalcClipRect( pObj, aClip, sal_True );
+ ::CalcClipRect( pObj, aTmpStretch, sal_False );
aClip._Intersection( aTmpStretch );
const long nBot = Frm().Top() + Frm().Height();
@@ -350,11 +350,11 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
const long nClipBot = aClip.Top() + aClip.Height();
const long nClipRig = aClip.Left() + aClip.Width();
- const BOOL bBot = nBot > nClipBot;
- const BOOL bRig = nRig > nClipRig;
+ const sal_Bool bBot = nBot > nClipBot;
+ const sal_Bool bRig = nRig > nClipRig;
if ( bBot || bRig )
{
- BOOL bAgain = FALSE;
+ sal_Bool bAgain = sal_False;
// --> OD 2004-11-12 #i37068# - no move, if it's requested
if ( bBot && !IsNoMoveOnCheckClip() &&
!GetDrawObjs() && !GetAnchorFrm()->IsInTab() )
@@ -370,8 +370,8 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
const long nOld = Frm().Top();
Frm().Pos().Y() = Max( aClip.Top(), nClipBot - Frm().Height() );
if ( Frm().Top() != nOld )
- bAgain = TRUE;
- bHeightClipped = TRUE;
+ bAgain = sal_True;
+ bHeightClipped = sal_True;
}
}
if ( bRig )
@@ -386,12 +386,12 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
if( rH.GetHoriOrient() == text::HoriOrientation::LEFT )
Frm().Pos().X() = nOld;
else
- bAgain = TRUE;
+ bAgain = sal_True;
}
- bWidthClipped = TRUE;
+ bWidthClipped = sal_True;
}
if ( bAgain )
- bValidSize = FALSE;
+ bValidSize = sal_False;
else
{
//Wenn wir hier ankommen ragt der Frm in unerlaubte Bereiche
@@ -412,7 +412,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
nDiff -= aFrmRect.Top(); //nDiff ist die verfuegbare Strecke.
nDiff = aFrmRect.Height() - nDiff;
aFrmRect.Height( aFrmRect.Height() - nDiff );
- bHeightClipped = TRUE;
+ bHeightClipped = sal_True;
}
if ( bRig )
{
@@ -420,7 +420,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
nDiff -= aFrmRect.Left();//nDiff ist die verfuegbare Strecke.
nDiff = aFrmRect.Width() - nDiff;
aFrmRect.Width( aFrmRect.Width() - nDiff );
- bWidthClipped = TRUE;
+ bWidthClipped = sal_True;
}
// OD 06.08.2003 #i17297#, #111066#, #111070# - no proportional
@@ -454,14 +454,14 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
{
aFrmRect.Height( aFrmRect.Width() * aOldSize.Height() /
aOldSize.Width() );
- bHeightClipped = TRUE;
+ bHeightClipped = sal_True;
}
//Hoehe angepasst? - Breite dann proportional verkleinern
else if( aFrmRect.Height() != aOldSize.Height() )
{
aFrmRect.Width( aFrmRect.Height() * aOldSize.Width() /
aOldSize.Height() );
- bWidthClipped = TRUE;
+ bWidthClipped = sal_True;
}
// OD 07.08.2003 #i17297#, #111066#, #111070# - reactivate change
@@ -510,7 +510,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
::CalcCntnt( this );
ColUnlock();
if ( !bValidSize && !bWidthClipped )
- bFormatHeightOnly = bValidSize = TRUE;
+ bFormatHeightOnly = bValidSize = sal_True;
}
else
{
@@ -551,7 +551,7 @@ bool SwFlyFreeFrm::IsFormatPossible() const
SwFlyLayFrm::SwFlyLayFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
SwFlyFreeFrm( pFmt, pAnch )
{
- bLayout = TRUE;
+ bLayout = sal_True;
}
// --> OD 2004-06-29 #i28701#
@@ -568,11 +568,11 @@ TYPEINIT1(SwFlyLayFrm,SwFlyFreeFrm);
void SwFlyLayFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
- USHORT nWhich = pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
SwFmtAnchor *pAnch = 0;
if( RES_ATTRSET_CHG == nWhich && SFX_ITEM_SET ==
- ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, FALSE,
+ ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, sal_False,
(const SfxPoolItem**)&pAnch ))
; // Beim GetItemState wird der AnkerPointer gesetzt !
@@ -599,10 +599,10 @@ void SwFlyLayFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
if ( FLY_AT_PAGE == pAnch->GetAnchorId() )
{
- USHORT nPgNum = pAnch->GetPageNum();
+ sal_uInt16 nPgNum = pAnch->GetPageNum();
SwRootFrm *pRoot = FindRootFrm();
SwPageFrm *pTmpPage = (SwPageFrm*)pRoot->Lower();
- for ( USHORT i = 1; (i <= nPgNum) && pTmpPage; ++i,
+ for ( sal_uInt16 i = 1; (i <= nPgNum) && pTmpPage; ++i,
pTmpPage = (SwPageFrm*)pTmpPage->GetNext() )
{
if ( i == nPgNum )
@@ -622,7 +622,7 @@ void SwFlyLayFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
SwNodeIndex aIdx( pAnch->GetCntntAnchor()->nNode );
SwCntntFrm *pCntnt = GetFmt()->GetDoc()->GetNodes().GoNext( &aIdx )->
- GetCntntNode()->GetFrm( 0, 0, FALSE );
+ GetCntntNode()->GetFrm( 0, 0, sal_False );
if( pCntnt )
{
SwFlyFrm *pTmp = pCntnt->FindFlyFrm();
@@ -673,7 +673,7 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
const SwFlyFrm* pFly = pNew->GetAnchorFrm()->FindFlyFrm();
if ( pFly && pObj->GetOrdNum() < pFly->GetVirtDrawObj()->GetOrdNum() )
{
- UINT32 nNewNum = pFly->GetVirtDrawObj()->GetOrdNumDirect();
+ sal_uInt32 nNewNum = pFly->GetVirtDrawObj()->GetOrdNumDirect();
if ( pObj->GetPage() )
pObj->GetPage()->SetObjectOrdNum( pObj->GetOrdNumDirect(), nNewNum);
else
@@ -725,7 +725,7 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
if ( pNew->GetDrawObjs() )
{
SwSortedObjs &rObjs = *pNew->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pTmpObj = rObjs[i];
if ( pTmpObj->ISA(SwFlyFrm) )
@@ -764,7 +764,7 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
{
- const UINT32 nOrdNum = pToRemove->GetVirtDrawObj()->GetOrdNum();
+ const sal_uInt32 nOrdNum = pToRemove->GetVirtDrawObj()->GetOrdNum();
FindRootFrm()->GetDrawPage()->RemoveObject( nOrdNum );
pToRemove->GetVirtDrawObj()->ReferencedObj().SetOrdNum( nOrdNum );
@@ -944,7 +944,7 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
if ( pFlyFrm &&
_rNewObj.GetDrawObj()->GetOrdNum() < pFlyFrm->GetVirtDrawObj()->GetOrdNum() )
{
- UINT32 nNewNum = pFlyFrm->GetVirtDrawObj()->GetOrdNumDirect();
+ sal_uInt32 nNewNum = pFlyFrm->GetVirtDrawObj()->GetOrdNumDirect();
if ( _rNewObj.GetDrawObj()->GetPage() )
_rNewObj.DrawObj()->GetPage()->SetObjectOrdNum(
_rNewObj.GetDrawObj()->GetOrdNumDirect(), nNewNum);
@@ -1063,9 +1063,9 @@ void SwPageFrm::PlaceFly( SwFlyFrm* pFly, SwFlyFrmFmt* pFmt )
// --> OD 2004-07-06 #i28701# - if document compatibility option 'Consider
// wrapping style influence on object positioning' is ON, the clip area
// corresponds to the one as the object doesn't follows the text flow.
-BOOL CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, BOOL bMove )
+sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( pSdrObj->ISA(SwVirtFlyDrawObj) )
{
const SwFlyFrm* pFly = ((const SwVirtFlyDrawObj*)pSdrObj)->GetFlyFrm();
@@ -1189,7 +1189,7 @@ BOOL CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, BOOL bMove )
SWRECTFN( pClip )
const SwLayoutFrm *pUp = pClip->GetUpper();
const SwFrm *pCell = pUp->IsCellFrm() ? pUp : 0;
- USHORT nType = bMove ? FRM_ROOT | FRM_FLY | FRM_HEADER |
+ sal_uInt16 nType = bMove ? FRM_ROOT | FRM_FLY | FRM_HEADER |
FRM_FOOTER | FRM_FTN
: FRM_BODY | FRM_FLY | FRM_HEADER |
FRM_FOOTER | FRM_CELL| FRM_FTN;
@@ -1384,7 +1384,7 @@ BOOL CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, BOOL bMove )
}
else
{
- bRet = FALSE;
+ bRet = sal_False;
}
}
}
diff --git a/sw/source/core/layout/flypos.cxx b/sw/source/core/layout/flypos.cxx
index c724ad8779db..8d3b517c2efc 100644
--- a/sw/source/core/layout/flypos.cxx
+++ b/sw/source/core/layout/flypos.cxx
@@ -49,10 +49,10 @@
SV_IMPL_OP_PTRARR_SORT( SwPosFlyFrms, SwPosFlyFrmPtr )
SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrmFmt* pFmt,
- USHORT nArrPos )
+ sal_uInt16 nArrPos )
: pFrmFmt( pFmt ), pNdIdx( (SwNodeIndex*) &rIdx )
{
- BOOL bFnd = FALSE;
+ sal_Bool bFnd = sal_False;
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
if (FLY_AT_PAGE == rAnchor.GetAnchorId())
{
@@ -66,14 +66,14 @@ SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrmFmt* pFmt,
// Schauen, ob es ein SdrObject dafuer gibt
if( aIter.First( TYPE( SwFlyFrm) ) )
nOrdNum = ((SwFlyFrm*)aIter())->GetVirtDrawObj()->GetOrdNum(),
- bFnd = TRUE;
+ bFnd = sal_True;
}
else if( RES_DRAWFRMFMT == pFmt->Which() )
{
// Schauen, ob es ein SdrObject dafuer gibt
if( aIter.First( TYPE(SwDrawContact) ) )
nOrdNum = ((SwDrawContact*)aIter())->GetMaster()->GetOrdNum(),
- bFnd = TRUE;
+ bFnd = sal_True;
}
}
@@ -93,12 +93,12 @@ SwPosFlyFrm::~SwPosFlyFrm()
}
}
-BOOL SwPosFlyFrm::operator==( const SwPosFlyFrm& )
+sal_Bool SwPosFlyFrm::operator==( const SwPosFlyFrm& )
{
- return FALSE; // FlyFrames koennen auf der gleichen Position stehen
+ return sal_False; // FlyFrames koennen auf der gleichen Position stehen
}
-BOOL SwPosFlyFrm::operator<( const SwPosFlyFrm& rPosFly )
+sal_Bool SwPosFlyFrm::operator<( const SwPosFlyFrm& rPosFly )
{
if( pNdIdx->GetIndex() == rPosFly.pNdIdx->GetIndex() )
{
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 661f68603603..3d820e7a1e69 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -92,17 +92,17 @@
// <--
// ftnfrm.cxx:
-void lcl_RemoveFtns( SwFtnBossFrm* pBoss, BOOL bPageOnly, BOOL bEndNotes );
+void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes );
using namespace ::com::sun::star;
-BOOL bObjsDirect = TRUE;
-BOOL bDontCreateObjects = FALSE;
-BOOL bSetCompletePaintOnInvalidate = FALSE;
+sal_Bool bObjsDirect = sal_True;
+sal_Bool bDontCreateObjects = sal_False;
+sal_Bool bSetCompletePaintOnInvalidate = sal_False;
-BYTE StackHack::nCnt = 0;
-BOOL StackHack::bLocked = FALSE;
+sal_uInt8 StackHack::nCnt = 0;
+sal_Bool StackHack::bLocked = sal_False;
@@ -119,7 +119,7 @@ SwFrmNotify::SwFrmNotify( SwFrm *pF ) :
pFrm( pF ),
aFrm( pF->Frm() ),
aPrt( pF->Prt() ),
- bInvaKeep( FALSE ),
+ bInvaKeep( sal_False ),
bValidSize( pF->GetValidSizeFlag() ),
// --> OD 2005-07-29 #i49383#
mbFrmDeleted( false )
@@ -137,8 +137,8 @@ SwFrmNotify::SwFrmNotify( SwFrm *pF ) :
}
bHadFollow = pF->IsCntntFrm() ?
- (((SwCntntFrm*)pF)->GetFollow() ? TRUE : FALSE) :
- FALSE;
+ (((SwCntntFrm*)pF)->GetFollow() ? sal_True : sal_False) :
+ sal_False;
}
/*************************************************************************
@@ -160,12 +160,12 @@ SwFrmNotify::~SwFrmNotify()
// <--
SWRECTFN( pFrm )
- const BOOL bAbsP = POS_DIFF( aFrm, pFrm->Frm() );
- const BOOL bChgWidth =
+ const sal_Bool bAbsP = POS_DIFF( aFrm, pFrm->Frm() );
+ const sal_Bool bChgWidth =
(aFrm.*fnRect->fnGetWidth)() != (pFrm->Frm().*fnRect->fnGetWidth)();
- const BOOL bChgHeight =
+ const sal_Bool bChgHeight =
(aFrm.*fnRect->fnGetHeight)()!=(pFrm->Frm().*fnRect->fnGetHeight)();
- const BOOL bChgFlyBasePos = pFrm->IsTxtFrm() &&
+ const sal_Bool bChgFlyBasePos = pFrm->IsTxtFrm() &&
( ( mnFlyAnchorOfst != ((SwTxtFrm*)pFrm)->GetBaseOfstForFly( sal_True ) ) ||
( mnFlyAnchorOfstNoWrap != ((SwTxtFrm*)pFrm)->GetBaseOfstForFly( sal_False ) ) );
@@ -248,9 +248,9 @@ SwFrmNotify::~SwFrmNotify()
}
//Fuer Hintergrundgrafiken muss bei Groessenaenderungen ein Repaint her.
- const BOOL bPrtWidth =
+ const sal_Bool bPrtWidth =
(aPrt.*fnRect->fnGetWidth)() != (pFrm->Prt().*fnRect->fnGetWidth)();
- const BOOL bPrtHeight =
+ const sal_Bool bPrtHeight =
(aPrt.*fnRect->fnGetHeight)()!=(pFrm->Prt().*fnRect->fnGetHeight)();
if ( bPrtWidth || bPrtHeight )
{
@@ -269,7 +269,7 @@ SwFrmNotify::~SwFrmNotify()
}
}
- const BOOL bPrtP = POS_DIFF( aPrt, pFrm->Prt() );
+ const sal_Bool bPrtP = POS_DIFF( aPrt, pFrm->Prt() );
if ( bAbsP || bPrtP || bChgWidth || bChgHeight ||
bPrtWidth || bPrtHeight || bChgFlyBasePos )
{
@@ -468,7 +468,7 @@ SwFrmNotify::~SwFrmNotify()
SwLayNotify::SwLayNotify( SwLayoutFrm *pLayFrm ) :
SwFrmNotify( pLayFrm ),
- bLowersComplete( FALSE )
+ bLowersComplete( sal_False )
{
}
@@ -521,22 +521,22 @@ SwLayNotify::~SwLayNotify()
SwLayoutFrm *pLay = GetLay();
SWRECTFN( pLay )
- BOOL bNotify = FALSE;
+ sal_Bool bNotify = sal_False;
if ( pLay->Prt().SSize() != aPrt.SSize() )
{
if ( !IsLowersComplete() )
{
- BOOL bInvaPercent;
+ sal_Bool bInvaPercent;
if ( pLay->IsRowFrm() )
{
- bInvaPercent = TRUE;
+ bInvaPercent = sal_True;
long nNew = (pLay->Prt().*fnRect->fnGetHeight)();
if( nNew != (aPrt.*fnRect->fnGetHeight)() )
- ((SwRowFrm*)pLay)->AdjustCells( nNew, TRUE);
+ ((SwRowFrm*)pLay)->AdjustCells( nNew, sal_True);
if( (pLay->Prt().*fnRect->fnGetWidth)()
!= (aPrt.*fnRect->fnGetWidth)() )
- ((SwRowFrm*)pLay)->AdjustCells( 0, FALSE );
+ ((SwRowFrm*)pLay)->AdjustCells( 0, sal_False );
}
else
{
@@ -546,7 +546,7 @@ SwLayNotify::~SwLayNotify()
//3. Wenn der Fly eine feste Hoehe hat und die Spalten in der
// Hoehe danebenliegen.
//4. niemals bei SectionFrms.
- BOOL bLow;
+ sal_Bool bLow;
if( pLay->IsFlyFrm() )
{
if ( pLay->Lower() )
@@ -556,7 +556,7 @@ SwLayNotify::~SwLayNotify()
!= (pLay->Prt().*fnRect->fnGetHeight)();
}
else
- bLow = FALSE;
+ bLow = sal_False;
}
else if( pLay->IsSctFrm() )
{
@@ -568,12 +568,12 @@ SwLayNotify::~SwLayNotify()
bLow = pLay->Prt().Width() != aPrt.Width();
}
else
- bLow = FALSE;
+ bLow = sal_False;
}
else if( pLay->IsFooterFrm() && !pLay->HasFixSize() )
bLow = pLay->Prt().Width() != aPrt.Width();
else
- bLow = TRUE;
+ bLow = sal_True;
bInvaPercent = bLow;
if ( bLow )
{
@@ -599,7 +599,7 @@ SwLayNotify::~SwLayNotify()
}
}
}
- bNotify = TRUE;
+ bNotify = sal_True;
//TEUER!! aber wie macht man es geschickter?
if( bInvaPercent )
pLay->InvaPercentLowers( pLay->Prt().Height() - aPrt.Height() );
@@ -616,9 +616,9 @@ SwLayNotify::~SwLayNotify()
}
//Lower benachrichtigen wenn sich die Position veraendert hat.
- const BOOL bPrtPos = POS_DIFF( aPrt, pLay->Prt() );
- const BOOL bPos = bPrtPos || POS_DIFF( aFrm, pLay->Frm() );
- const BOOL bSize = pLay->Frm().SSize() != aFrm.SSize();
+ const sal_Bool bPrtPos = POS_DIFF( aPrt, pLay->Prt() );
+ const sal_Bool bPos = bPrtPos || POS_DIFF( aFrm, pLay->Frm() );
+ const sal_Bool bSize = pLay->Frm().SSize() != aFrm.SSize();
if ( bPos && pLay->Lower() && !IsLowersComplete() )
pLay->Lower()->InvalidatePos();
@@ -939,7 +939,7 @@ SwCntntNotify::~SwCntntNotify()
}
}
- BOOL bFirst = (aFrm.*fnRect->fnGetWidth)() == 0;
+ sal_Bool bFirst = (aFrm.*fnRect->fnGetWidth)() == 0;
if ( pCnt->IsNoTxtFrm() )
{
@@ -986,7 +986,7 @@ SwCntntNotify::~SwCntntNotify()
if ( pFESh && pNd->IsOLESizeInvalid() )
{
- pNd->SetOLESizeInvalid( FALSE );
+ pNd->SetOLESizeInvalid( sal_False );
//TODO/LATER: needs OnDocumentPrinterChanged
//xObj->OnDocumentPrinterChanged( pNd->GetDoc()->getPrinter( false ) );
pFESh->CalcAndSetScale( xObj );//Client erzeugen lassen.
@@ -1023,7 +1023,7 @@ SwCntntNotify::~SwCntntNotify()
SwNodeIndex *pIdx = 0;
SwSpzFrmFmts *pTbl = pDoc->GetSpzFrmFmts();
- for ( USHORT i = 0; i < pTbl->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pTbl->Count(); ++i )
{
if ( !pPage )
pPage = pCnt->FindPageFrm();
@@ -1036,7 +1036,7 @@ SwCntntNotify::~SwCntntNotify()
continue; //#60878# nicht etwa zeichengebundene.
}
- BOOL bCheckPos = FALSE;
+ sal_Bool bCheckPos = sal_False;
if ( rAnch.GetCntntAnchor() )
{
if ( !pIdx )
@@ -1045,7 +1045,7 @@ SwCntntNotify::~SwCntntNotify()
}
if ( rAnch.GetCntntAnchor()->nNode == *pIdx )
{
- bCheckPos = TRUE;
+ bCheckPos = sal_True;
if (FLY_AT_PAGE == rAnch.GetAnchorId())
{
ASSERT( false, "<SwCntntNotify::~SwCntntNotify()> - to page anchored object with content position. Please inform OD." );
@@ -1118,10 +1118,10 @@ SwCntntNotify::~SwCntntNotify()
|*
|*************************************************************************/
-void AppendObjs( const SwSpzFrmFmts *pTbl, ULONG nIndex,
+void AppendObjs( const SwSpzFrmFmts *pTbl, sal_uLong nIndex,
SwFrm *pFrm, SwPageFrm *pPage )
{
- for ( USHORT i = 0; i < pTbl->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pTbl->Count(); ++i )
{
SwFrmFmt *pFmt = (SwFrmFmt*)(*pTbl)[i];
const SwFmtAnchor &rAnch = pFmt->GetAnchor();
@@ -1196,7 +1196,7 @@ void AppendObjs( const SwSpzFrmFmts *pTbl, ULONG nIndex,
}
}
-BOOL MA_FASTCALL lcl_ObjConnected( SwFrmFmt *pFmt )
+sal_Bool MA_FASTCALL lcl_ObjConnected( SwFrmFmt *pFmt )
{
SwClientIter aIter( *pFmt );
if ( RES_FLYFRMFMT == pFmt->Which() )
@@ -1207,7 +1207,7 @@ BOOL MA_FASTCALL lcl_ObjConnected( SwFrmFmt *pFmt )
if ( 0 != (pContact = (SwDrawContact*)aIter.First( TYPE(SwDrawContact))))
return pContact->GetAnchorFrm() != 0;
}
- return FALSE;
+ return sal_False;
}
/** helper method to determine, if a <SwFrmFmt>, which has an object connected,
@@ -1245,24 +1245,24 @@ void AppendAllObjs( const SwSpzFrmFmts *pTbl )
SwSpzFrmFmts aCpy( 255, 255 );
aCpy.Insert( pTbl, 0 );
- USHORT nOldCnt = USHRT_MAX;
+ sal_uInt16 nOldCnt = USHRT_MAX;
while ( aCpy.Count() && aCpy.Count() != nOldCnt )
{
nOldCnt = aCpy.Count();
for ( int i = 0; i < int(aCpy.Count()); ++i )
{
- SwFrmFmt *pFmt = (SwFrmFmt*)aCpy[ USHORT(i) ];
+ SwFrmFmt *pFmt = (SwFrmFmt*)aCpy[ sal_uInt16(i) ];
const SwFmtAnchor &rAnch = pFmt->GetAnchor();
- BOOL bRemove = FALSE;
+ sal_Bool bRemove = sal_False;
if ((rAnch.GetAnchorId() == FLY_AT_PAGE) ||
(rAnch.GetAnchorId() == FLY_AS_CHAR))
{
//Seitengebunde sind bereits verankert, zeichengebundene
//will ich hier nicht.
- bRemove = TRUE;
+ bRemove = sal_True;
}
- else if ( FALSE == (bRemove = ::lcl_ObjConnected( pFmt )) ||
+ else if ( sal_False == (bRemove = ::lcl_ObjConnected( pFmt )) ||
::lcl_InHeaderOrFooter( *pFmt ) )
{
// OD 23.06.2003 #108784# - correction: for objects in header
@@ -1276,7 +1276,7 @@ void AppendAllObjs( const SwSpzFrmFmts *pTbl )
}
if ( bRemove )
{
- aCpy.Remove( USHORT(i) );
+ aCpy.Remove( sal_uInt16(i) );
--i;
}
}
@@ -1304,16 +1304,16 @@ void lcl_SetPos( SwFrm& _rNewFrm,
}
void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
- ULONG nIndex, BOOL bPages, ULONG nEndIndex,
+ sal_uLong nIndex, sal_Bool bPages, sal_uLong nEndIndex,
SwFrm *pPrv )
{
pDoc->BlockIdling();
SwRootFrm* pLayout = pDoc->GetRootFrm();
- const BOOL bOldCallbackActionEnabled = pLayout ? pLayout->IsCallbackActionEnabled() : sal_False;
+ const sal_Bool bOldCallbackActionEnabled = pLayout ? pLayout->IsCallbackActionEnabled() : sal_False;
if(pLayout)
- pLayout->SetCallbackActionEnabled( FALSE );
+ pLayout->SetCallbackActionEnabled( sal_False );
- //Bei der Erzeugung des Layouts wird bPages mit TRUE uebergeben. Dann
+ //Bei der Erzeugung des Layouts wird bPages mit sal_True uebergeben. Dann
//werden schon mal alle x Absaetze neue Seiten angelegt. Bei umbruechen
//und/oder Pagedescriptorwechseln werden gleich die entsprechenden Seiten
//angelegt.
@@ -1327,17 +1327,17 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
//Wenn in der DocStatistik eine brauchebare Seitenzahl angegeben ist
//(wird beim Schreiben gepflegt), so wird von dieser Seitenanzahl
//ausgegengen.
- const BOOL bStartPercent = bPages && !nEndIndex;
+ const sal_Bool bStartPercent = bPages && !nEndIndex;
SwPageFrm *pPage = pLay->FindPageFrm();
const SwSpzFrmFmts *pTbl = pDoc->GetSpzFrmFmts();
SwFrm *pFrm = 0;
- BOOL bBreakAfter = FALSE;
+ sal_Bool bBreakAfter = sal_False;
SwActualSection *pActualSection = 0;
SwLayHelper *pPageMaker;
- //Wenn das Layout erzeugt wird (bPages == TRUE) steuern wir den Progress
+ //Wenn das Layout erzeugt wird (bPages == sal_True) steuern wir den Progress
//an. Flys und DrawObjekte werden dann nicht gleich verbunden, dies
//passiert erst am Ende der Funktion.
if ( bPages )
@@ -1348,9 +1348,9 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
pActualSection, bBreakAfter, nIndex, 0 == nEndIndex );
if( bStartPercent )
{
- const ULONG nPageCount = pPageMaker->CalcPageCount();
+ const sal_uLong nPageCount = pPageMaker->CalcPageCount();
if( nPageCount )
- bObjsDirect = FALSE;
+ bObjsDirect = sal_False;
}
}
else
@@ -1384,7 +1384,7 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
//the SwActualSection class has a member, which points to an upper(section).
//When the "inner" section finishs, the upper will used instead.
- while( TRUE )
+ while( sal_True )
{
SwNode *pNd = pDoc->GetNodes()[nIndex];
if ( pNd->IsCntntNode() )
@@ -1523,7 +1523,7 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
if( pPrv->IsSctFrm() )
pPrv = ((SwSectionFrm*)pPrv)->ContainsCntnt();
if( pPrv && pPrv->IsTxtFrm() )
- ((SwTxtFrm*)pPrv)->Prepare( PREP_QUOVADIS, 0, FALSE );
+ ((SwTxtFrm*)pPrv)->Prepare( PREP_QUOVADIS, 0, sal_False );
}
}
// --> OD 2005-12-01 #i27138#
@@ -1627,7 +1627,7 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
if( ! pOuterSectionFrm->IsColLocked() &&
! pOuterSectionFrm->ContainsCntnt() )
{
- pOuterSectionFrm->DelEmpty( TRUE );
+ pOuterSectionFrm->DelEmpty( sal_True );
delete pOuterSectionFrm;
}
pActualSection->SetSectionFrm( (SwSectionFrm*)pFrm );
@@ -1683,7 +1683,7 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
{
if ( !bDontCreateObjects )
AppendAllObjs( pTbl );
- bObjsDirect = TRUE;
+ bObjsDirect = sal_True;
}
if( pPageMaker )
@@ -1710,29 +1710,29 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
const SwNodeIndex &rEndIdx )
{
- bObjsDirect = FALSE;
+ bObjsDirect = sal_False;
SwNodeIndex aTmp( rSttIdx );
- ULONG nEndIdx = rEndIdx.GetIndex();
+ sal_uLong nEndIdx = rEndIdx.GetIndex();
SwNode* pNd = pDoc->GetNodes().FindPrvNxtFrmNode( aTmp,
pDoc->GetNodes()[ nEndIdx-1 ]);
if ( pNd )
{
- BOOL bApres = aTmp < rSttIdx;
+ sal_Bool bApres = aTmp < rSttIdx;
SwNode2Layout aNode2Layout( *pNd, rSttIdx.GetIndex() );
SwFrm* pFrm;
while( 0 != (pFrm = aNode2Layout.NextFrm()) )
{
SwLayoutFrm *pUpper = pFrm->GetUpper();
SwFtnFrm* pFtnFrm = pUpper->FindFtnFrm();
- BOOL bOldLock, bOldFtn;
+ sal_Bool bOldLock, bOldFtn;
if( pFtnFrm )
{
bOldFtn = pFtnFrm->IsColLocked();
pFtnFrm->ColLock();
}
else
- bOldFtn = TRUE;
+ bOldFtn = sal_True;
SwSectionFrm* pSct = pUpper->FindSctFrm();
// Es sind innerhalb von Fussnoten nur die Bereiche interessant,
// die in den Fussnoten liegen, nicht etwa die (spaltigen) Bereiche,
@@ -1746,14 +1746,14 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
pSct->ColLock();
}
else
- bOldLock = TRUE;
+ bOldLock = sal_True;
// Wenn pFrm sich nicht bewegen kann, koennen wir auch niemanden
// auf die naechste Seite schieben. Innerhalb eines Rahmens auch
// nicht ( in der 1. Spalte eines Rahmens waere pFrm Moveable()! )
// Auch in spaltigen Bereichen in Tabellen waere pFrm Moveable.
- BOOL bMoveNext = nEndIdx - rSttIdx.GetIndex() > 120;
- BOOL bAllowMove = !pFrm->IsInFly() && pFrm->IsMoveable() &&
+ sal_Bool bMoveNext = nEndIdx - rSttIdx.GetIndex() > 120;
+ sal_Bool bAllowMove = !pFrm->IsInFly() && pFrm->IsMoveable() &&
(!pFrm->IsInTab() || pFrm->IsTabFrm() );
if ( bMoveNext && bAllowMove )
{
@@ -1842,12 +1842,12 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
if( pTmp )
{
SwFrm* pOldUp = pTmp->GetFrm()->GetUpper();
- // MoveFwd==TRUE bedeutet, dass wir auf der gleichen
+ // MoveFwd==sal_True bedeutet, dass wir auf der gleichen
// Seite geblieben sind, wir wollen aber die Seite wechseln,
// sofern dies moeglich ist
- BOOL bTmpOldLock = pTmp->IsJoinLocked();
+ sal_Bool bTmpOldLock = pTmp->IsJoinLocked();
pTmp->LockJoin();
- while( pTmp->MoveFwd( TRUE, FALSE, TRUE ) )
+ while( pTmp->MoveFwd( sal_True, sal_False, sal_True ) )
{
if( pOldUp == pTmp->GetFrm()->GetUpper() )
break;
@@ -1861,7 +1861,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
}
else
{
- BOOL bSplit;
+ sal_Bool bSplit;
SwFrm* pPrv = bApres ? pFrm : pFrm->GetPrev();
// Wenn in einen SectionFrm ein anderer eingefuegt wird,
// muss dieser aufgebrochen werden
@@ -1876,8 +1876,8 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
}
}
else
- bSplit = FALSE;
- ::_InsertCnt( pUpper, pDoc, rSttIdx.GetIndex(), FALSE,
+ bSplit = sal_False;
+ ::_InsertCnt( pUpper, pDoc, rSttIdx.GetIndex(), sal_False,
nEndIdx, pPrv );
// OD 23.06.2003 #108784# - correction: append objects doesn't
// depend on value of <bAllowMove>
@@ -1900,7 +1900,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
}
SwPageFrm *pPage = pUpper->FindPageFrm();
- SwFrm::CheckPageDescs( pPage, FALSE );
+ SwFrm::CheckPageDescs( pPage, sal_False );
if( !bOldFtn )
pFtnFrm->ColUnlock();
if( !bOldLock )
@@ -1911,7 +1911,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
// und damit ruhig zerstoert werden.
if( !pSct->ContainsCntnt() )
{
- pSct->DelEmpty( TRUE );
+ pSct->DelEmpty( sal_True );
pDoc->GetRootFrm()->RemoveFromList( pSct );
delete pSct;
}
@@ -1919,7 +1919,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
}
}
- bObjsDirect = TRUE;
+ bObjsDirect = sal_True;
}
@@ -1958,20 +1958,20 @@ SwBorderAttrs::SwBorderAttrs( const SwModify *pMod, const SwFrm *pConstructor )
//Muessen alle einmal berechnet werden:
bTopLine = bBottomLine = bLeftLine = bRightLine =
- bTop = bBottom = bLine = TRUE;
+ bTop = bBottom = bLine = sal_True;
- bCacheGetLine = bCachedGetTopLine = bCachedGetBottomLine = FALSE;
+ bCacheGetLine = bCachedGetTopLine = bCachedGetBottomLine = sal_False;
// OD 21.05.2003 #108789# - init cache status for values <bJoinedWithPrev>
// and <bJoinedWithNext>, which aren't initialized by default.
- bCachedJoinedWithPrev = FALSE;
- bCachedJoinedWithNext = FALSE;
+ bCachedJoinedWithPrev = sal_False;
+ bCachedJoinedWithNext = sal_False;
bBorderDist = 0 != (pConstructor->GetType() & (FRM_CELL));
}
SwBorderAttrs::~SwBorderAttrs()
{
- ((SwModify*)pOwner)->SetInCache( FALSE );
+ ((SwModify*)pOwner)->SetInCache( sal_False );
}
/*************************************************************************
@@ -1991,13 +1991,13 @@ SwBorderAttrs::~SwBorderAttrs()
void SwBorderAttrs::_CalcTop()
{
nTop = CalcTopLine() + rUL.GetUpper();
- bTop = FALSE;
+ bTop = sal_False;
}
void SwBorderAttrs::_CalcBottom()
{
nBottom = CalcBottomLine() + rUL.GetLower();
- bBottom = FALSE;
+ bBottom = sal_False;
}
long SwBorderAttrs::CalcRight( const SwFrm* pCaller ) const
@@ -2077,7 +2077,7 @@ void SwBorderAttrs::_CalcTopLine()
? rBox.GetDistance (BOX_LINE_TOP)
: rBox.CalcLineSpace(BOX_LINE_TOP);
nTopLine = nTopLine + rShadow.CalcShadowSpace(SHADOW_TOP);
- bTopLine = FALSE;
+ bTopLine = sal_False;
}
void SwBorderAttrs::_CalcBottomLine()
@@ -2086,7 +2086,7 @@ void SwBorderAttrs::_CalcBottomLine()
? rBox.GetDistance (BOX_LINE_BOTTOM)
: rBox.CalcLineSpace(BOX_LINE_BOTTOM);
nBottomLine = nBottomLine + rShadow.CalcShadowSpace(SHADOW_BOTTOM);
- bBottomLine = FALSE;
+ bBottomLine = sal_False;
}
void SwBorderAttrs::_CalcLeftLine()
@@ -2095,7 +2095,7 @@ void SwBorderAttrs::_CalcLeftLine()
? rBox.GetDistance (BOX_LINE_LEFT)
: rBox.CalcLineSpace(BOX_LINE_LEFT);
nLeftLine = nLeftLine + rShadow.CalcShadowSpace(SHADOW_LEFT);
- bLeftLine = FALSE;
+ bLeftLine = sal_False;
}
void SwBorderAttrs::_CalcRightLine()
@@ -2104,7 +2104,7 @@ void SwBorderAttrs::_CalcRightLine()
? rBox.GetDistance (BOX_LINE_RIGHT)
: rBox.CalcLineSpace(BOX_LINE_RIGHT);
nRightLine = nRightLine + rShadow.CalcShadowSpace(SHADOW_RIGHT);
- bRightLine = FALSE;
+ bRightLine = sal_False;
}
/*************************************************************************
@@ -2120,7 +2120,7 @@ void SwBorderAttrs::_IsLine()
{
bIsLine = rBox.GetTop() || rBox.GetBottom() ||
rBox.GetLeft()|| rBox.GetRight();
- bLine = FALSE;
+ bLine = sal_False;
}
/*************************************************************************
@@ -2154,7 +2154,7 @@ inline int CmpLines( const SvxBorderLine *pL1, const SvxBorderLine *pL2 )
// OD 21.05.2003 #108789# - compare <CalcRight()> and <rCmpAttrs.CalcRight()>
// instead of only the right LR-spacing, because R2L-layout has to be
// considered.
-BOOL SwBorderAttrs::CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
+sal_Bool SwBorderAttrs::CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
const SwFrm *pCaller,
const SwFrm *pCmp ) const
{
@@ -2165,10 +2165,10 @@ BOOL SwBorderAttrs::CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
CalcRight( pCaller ) == rCmpAttrs.CalcRight( pCmp ) );
}
-BOOL SwBorderAttrs::_JoinWithCmp( const SwFrm& _rCallerFrm,
+sal_Bool SwBorderAttrs::_JoinWithCmp( const SwFrm& _rCallerFrm,
const SwFrm& _rCmpFrm ) const
{
- BOOL bReturnVal = FALSE;
+ sal_Bool bReturnVal = sal_False;
SwBorderAttrAccess aCmpAccess( SwFrm::GetCache(), &_rCmpFrm );
const SwBorderAttrs &rCmpAttrs = *aCmpAccess.Get();
@@ -2178,7 +2178,7 @@ BOOL SwBorderAttrs::_JoinWithCmp( const SwFrm& _rCallerFrm,
CmpLeftRight( rCmpAttrs, &_rCallerFrm, &_rCmpFrm )
)
{
- bReturnVal = TRUE;
+ bReturnVal = sal_True;
}
return bReturnVal;
@@ -2191,7 +2191,7 @@ void SwBorderAttrs::_CalcJoinedWithPrev( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm )
{
// set default
- bJoinedWithPrev = FALSE;
+ bJoinedWithPrev = sal_False;
if ( _rFrm.IsTxtFrm() )
{
@@ -2225,7 +2225,7 @@ void SwBorderAttrs::_CalcJoinedWithPrev( const SwFrm& _rFrm,
void SwBorderAttrs::_CalcJoinedWithNext( const SwFrm& _rFrm )
{
// set default
- bJoinedWithNext = FALSE;
+ bJoinedWithNext = sal_False;
if ( _rFrm.IsTxtFrm() )
{
@@ -2253,7 +2253,7 @@ void SwBorderAttrs::_CalcJoinedWithNext( const SwFrm& _rFrm )
// OD 21.05.2003 #108789# - accessor for cached values <bJoinedWithPrev>
// OD 2004-02-26 #i25029# - add 2nd parameter <_pPrevFrm>, which is passed to
// method <_CalcJoindWithPrev(..)>.
-BOOL SwBorderAttrs::JoinedWithPrev( const SwFrm& _rFrm,
+sal_Bool SwBorderAttrs::JoinedWithPrev( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm ) const
{
if ( !bCachedJoinedWithPrev || _pPrevFrm )
@@ -2265,7 +2265,7 @@ BOOL SwBorderAttrs::JoinedWithPrev( const SwFrm& _rFrm,
return bJoinedWithPrev;
}
-BOOL SwBorderAttrs::JoinedWithNext( const SwFrm& _rFrm ) const
+sal_Bool SwBorderAttrs::JoinedWithNext( const SwFrm& _rFrm ) const
{
if ( !bCachedJoinedWithNext )
{
@@ -2280,7 +2280,7 @@ BOOL SwBorderAttrs::JoinedWithNext( const SwFrm& _rFrm ) const
void SwBorderAttrs::_GetTopLine( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm )
{
- USHORT nRet = CalcTopLine();
+ sal_uInt16 nRet = CalcTopLine();
// OD 21.05.2003 #108789# - use new method <JoinWithPrev()>
// OD 2004-02-26 #i25029# - add 2nd parameter
@@ -2296,7 +2296,7 @@ void SwBorderAttrs::_GetTopLine( const SwFrm& _rFrm,
void SwBorderAttrs::_GetBottomLine( const SwFrm& _rFrm )
{
- USHORT nRet = CalcBottomLine();
+ sal_uInt16 nRet = CalcBottomLine();
// OD 21.05.2003 #108789# - use new method <JoinWithPrev()>
if ( JoinedWithNext( _rFrm ) )
@@ -2322,7 +2322,7 @@ SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrm *pFrm ) :
SwCacheAccess( rCach, (pFrm->IsCntntFrm() ?
(void*)((SwCntntFrm*)pFrm)->GetNode() :
(void*)((SwLayoutFrm*)pFrm)->GetFmt()),
- (BOOL)(pFrm->IsCntntFrm() ?
+ (sal_Bool)(pFrm->IsCntntFrm() ?
((SwModify*)((SwCntntFrm*)pFrm)->GetNode())->IsInCache() :
((SwModify*)((SwLayoutFrm*)pFrm)->GetFmt())->IsInCache()) ),
pConstructor( pFrm )
@@ -2340,7 +2340,7 @@ SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrm *pFrm ) :
SwCacheObj *SwBorderAttrAccess::NewObj()
{
- ((SwModify*)pOwner)->SetInCache( TRUE );
+ ((SwModify*)pOwner)->SetInCache( sal_True );
return new SwBorderAttrs( (SwModify*)pOwner, pConstructor );
}
@@ -2358,7 +2358,7 @@ SwBorderAttrs *SwBorderAttrAccess::Get()
|*
|*************************************************************************/
-SwOrderIter::SwOrderIter( const SwPageFrm *pPg, BOOL bFlys ) :
+SwOrderIter::SwOrderIter( const SwPageFrm *pPg, sal_Bool bFlys ) :
pPage( pPg ),
pCurrent( 0 ),
bFlysOnly( bFlys )
@@ -2379,17 +2379,17 @@ const SdrObject *SwOrderIter::Top()
pCurrent = 0;
if ( pPage->GetSortedObjs() )
{
- UINT32 nTopOrd = 0;
+ sal_uInt32 nTopOrd = 0;
const SwSortedObjs *pObjs = pPage->GetSortedObjs();
if ( pObjs->Count() )
{
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen!
- for ( USHORT i = 0; i < pObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) )
continue;
- UINT32 nTmp = pObj->GetOrdNumDirect();
+ sal_uInt32 nTmp = pObj->GetOrdNumDirect();
if ( nTmp >= nTopOrd )
{
nTopOrd = nTmp;
@@ -2415,17 +2415,17 @@ const SdrObject *SwOrderIter::Bottom()
pCurrent = 0;
if ( pPage->GetSortedObjs() )
{
- UINT32 nBotOrd = USHRT_MAX;
+ sal_uInt32 nBotOrd = USHRT_MAX;
const SwSortedObjs *pObjs = pPage->GetSortedObjs();
if ( pObjs->Count() )
{
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen!
- for ( USHORT i = 0; i < pObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) )
continue;
- UINT32 nTmp = pObj->GetOrdNumDirect();
+ sal_uInt32 nTmp = pObj->GetOrdNumDirect();
if ( nTmp < nBotOrd )
{
nBotOrd = nTmp;
@@ -2448,21 +2448,21 @@ const SdrObject *SwOrderIter::Bottom()
const SdrObject *SwOrderIter::Next()
{
- const UINT32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0;
+ const sal_uInt32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0;
pCurrent = 0;
if ( pPage->GetSortedObjs() )
{
- UINT32 nOrd = USHRT_MAX;
+ sal_uInt32 nOrd = USHRT_MAX;
const SwSortedObjs *pObjs = pPage->GetSortedObjs();
if ( pObjs->Count() )
{
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen!
- for ( USHORT i = 0; i < pObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) )
continue;
- UINT32 nTmp = pObj->GetOrdNumDirect();
+ sal_uInt32 nTmp = pObj->GetOrdNumDirect();
if ( nTmp > nCurOrd && nTmp < nOrd )
{
nOrd = nTmp;
@@ -2485,21 +2485,21 @@ const SdrObject *SwOrderIter::Next()
const SdrObject *SwOrderIter::Prev()
{
- const UINT32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0;
+ const sal_uInt32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0;
pCurrent = 0;
if ( pPage->GetSortedObjs() )
{
- UINT32 nOrd = 0;
+ sal_uInt32 nOrd = 0;
const SwSortedObjs *pObjs = pPage->GetSortedObjs();
if ( pObjs->Count() )
{
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen!
- for ( USHORT i = 0; i < pObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) )
continue;
- UINT32 nTmp = pObj->GetOrdNumDirect();
+ sal_uInt32 nTmp = pObj->GetOrdNumDirect();
if ( nTmp < nCurOrd && nTmp >= nOrd )
{
nOrd = nTmp;
@@ -2539,7 +2539,7 @@ void MA_FASTCALL lcl_RemoveObjsFromPage( SwFrm* _pFrm )
{
ASSERT( _pFrm->GetDrawObjs(), "Keine DrawObjs fuer lcl_RemoveFlysFromPage." );
SwSortedObjs &rObjs = *_pFrm->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
// --> OD 2004-11-29 #115759# - reset member, at which the anchored
@@ -2593,7 +2593,7 @@ void MA_FASTCALL lcl_RemoveObjsFromPage( SwFrm* _pFrm )
SwFrm *SaveCntnt( SwLayoutFrm *pLay, SwFrm *pStart )
{
if( pLay->IsSctFrm() && pLay->Lower() && pLay->Lower()->IsColumnFrm() )
- lcl_RemoveFtns( (SwColumnFrm*)pLay->Lower(), TRUE, TRUE );
+ lcl_RemoveFtns( (SwColumnFrm*)pLay->Lower(), sal_True, sal_True );
SwFrm *pSav;
if ( 0 == (pSav = pLay->ContainsAny()) )
@@ -2628,7 +2628,7 @@ SwFrm *SaveCntnt( SwLayoutFrm *pLay, SwFrm *pStart )
SwFrm *pFloat = pSav;
if( !pStart )
pStart = pSav;
- BOOL bGo = pStart == pSav;
+ sal_Bool bGo = pStart == pSav;
do
{
if( bGo )
@@ -2667,7 +2667,7 @@ SwFrm *SaveCntnt( SwLayoutFrm *pLay, SwFrm *pStart )
pFloat = pFloat->GetNext();
if( !bGo && pFloat == pStart )
{
- bGo = TRUE;
+ bGo = sal_True;
pFloat->pPrev->pNext = NULL;
pFloat->pPrev = NULL;
}
@@ -2707,7 +2707,7 @@ void MA_FASTCALL lcl_AddObjsToPage( SwFrm* _pFrm, SwPageFrm* _pPage )
{
ASSERT( _pFrm->GetDrawObjs(), "Keine DrawObjs fuer lcl_AddFlysToPage." );
SwSortedObjs &rObjs = *_pFrm->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
@@ -2859,7 +2859,7 @@ void RestoreCntnt( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bGro
|*
|*************************************************************************/
-ULONG MA_FASTCALL SqRt( BigInt nX )
+sal_uLong MA_FASTCALL SqRt( BigInt nX )
{
BigInt nErg = 1;
@@ -2872,7 +2872,7 @@ ULONG MA_FASTCALL SqRt( BigInt nX )
nOldErg = nErg;
}
}
- return nErg >= BigInt(SAL_MAX_UINT32) ? ULONG_MAX : (ULONG)nErg;
+ return nErg >= BigInt(SAL_MAX_UINT32) ? ULONG_MAX : (sal_uLong)nErg;
}
/*************************************************************************
@@ -2885,7 +2885,7 @@ ULONG MA_FASTCALL SqRt( BigInt nX )
|*************************************************************************/
SwPageFrm * MA_FASTCALL InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper,
- BOOL bOdd, BOOL bInsertEmpty, BOOL bFtn,
+ sal_Bool bOdd, sal_Bool bInsertEmpty, sal_Bool bFtn,
SwFrm *pSibling )
{
SwPageFrm *pRet;
@@ -2930,7 +2930,7 @@ SwPageFrm * MA_FASTCALL InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper,
void MA_FASTCALL lcl_Regist( SwPageFrm *pPage, const SwFrm *pAnch )
{
SwSortedObjs *pObjs = (SwSortedObjs*)pAnch->GetDrawObjs();
- for ( USHORT i = 0; i < pObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
SwAnchoredObject* pObj = (*pObjs)[i];
if ( pObj->ISA(SwFlyFrm) )
@@ -3127,7 +3127,7 @@ void MA_FASTCALL lcl_NotifyCntnt( const SdrObject *pThis, SwCntntFrm *pCnt,
if ( pCnt->GetDrawObjs() )
{
const SwSortedObjs &rObjs = *pCnt->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
if ( pObj->ISA(SwFlyFrm) )
@@ -3152,7 +3152,7 @@ void Notify_Background( const SdrObject* pObj,
SwPageFrm* pPage,
const SwRect& rRect,
const PrepareHint eHint,
- const BOOL bInva )
+ const sal_Bool bInva )
{
//Wenn der Frm gerade erstmalig sinnvoll positioniert wurde, braucht der
@@ -3257,7 +3257,7 @@ void Notify_Background( const SdrObject* pObj,
{
pObj->GetOrdNum();
const SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -3370,7 +3370,7 @@ const SwFrm* GetVirtualUpper( const SwFrm* pFrm, const Point& rPos )
|*
|*************************************************************************/
-BOOL Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj )
+sal_Bool Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj )
{
Point aPos;
const SwFrm* pFrm;
@@ -3389,7 +3389,7 @@ BOOL Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj )
pFrm = GetVirtualUpper( pFrm, aPos );
do
{ if ( pFrm == pCurrFrm )
- return TRUE;
+ return sal_True;
if( pFrm->IsFlyFrm() )
{
aPos = pFrm->Frm().Pos();
@@ -3398,14 +3398,14 @@ BOOL Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj )
else
pFrm = pFrm->GetUpper();
} while ( pFrm );
- return FALSE;
+ return sal_False;
}
-const SwFrm *FindKontext( const SwFrm *pFrm, USHORT nAdditionalKontextTyp )
+const SwFrm *FindKontext( const SwFrm *pFrm, sal_uInt16 nAdditionalKontextTyp )
{
//Liefert die Umgebung des Frm in die kein Fly aus einer anderen
//Umgebung hineinragen kann.
- const USHORT nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT |
+ const sal_uInt16 nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT |
FRM_FTN | FRM_FLY |
FRM_TAB | FRM_ROW | FRM_CELL |
nAdditionalKontextTyp;
@@ -3417,20 +3417,20 @@ const SwFrm *FindKontext( const SwFrm *pFrm, USHORT nAdditionalKontextTyp )
return pFrm;
}
-BOOL IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm )
+sal_Bool IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm )
{
const SwFrm *pKontext = FindKontext( pInnerFrm, 0 );
- const USHORT nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT |
+ const sal_uInt16 nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT |
FRM_FTN | FRM_FLY |
FRM_TAB | FRM_ROW | FRM_CELL;
do
{ if ( pFrm->GetType() & nTyp )
{
if( pFrm == pKontext )
- return TRUE;
+ return sal_True;
if( pFrm->IsCellFrm() )
- return FALSE;
+ return sal_False;
}
if( pFrm->IsFlyFrm() )
{
@@ -3441,7 +3441,7 @@ BOOL IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm )
pFrm = pFrm->GetUpper();
} while( pFrm );
- return FALSE;
+ return sal_False;
}
@@ -3516,8 +3516,8 @@ const SwFrm* MA_FASTCALL FindPage( const SwRect &rRect, const SwFrm *pPage )
return pPage;
}
-SwFrm* GetFrmOfModify( SwModify const& rMod, USHORT const nFrmType,
- const Point* pPoint, const SwPosition *pPos, const BOOL bCalcFrm )
+SwFrm* GetFrmOfModify( SwModify const& rMod, sal_uInt16 const nFrmType,
+ const Point* pPoint, const SwPosition *pPos, const sal_Bool bCalcFrm )
{
SwFrm *pMinFrm = 0, *pTmpFrm;
SwRect aCalcRect;
@@ -3617,7 +3617,7 @@ SwFrm* GetFrmOfModify( SwModify const& rMod, USHORT const nFrmType,
return pMinFrm;
}
-BOOL IsExtraData( const SwDoc *pDoc )
+sal_Bool IsExtraData( const SwDoc *pDoc )
{
const SwLineNumberInfo &rInf = pDoc->GetLineNumberInfo();
return rInf.IsPaintLineNumbers() ||
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 3dc03053a23f..aacb9dcadd66 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -65,14 +65,14 @@
#define ENDNOTE 0x80000000
-ULONG MA_FASTCALL lcl_FindFtnPos( const SwDoc *pDoc, const SwTxtFtn *pAttr )
+sal_uLong MA_FASTCALL lcl_FindFtnPos( const SwDoc *pDoc, const SwTxtFtn *pAttr )
{
const SwFtnIdxs &rFtnIdxs = pDoc->GetFtnIdxs();
#ifdef MA_DEBUG
//Wenn das Array nicht stimmt haben wir ein Problem, denn viele
//Ftn-Functions bauen auf dem Array auf.
- for ( USHORT k = 0; k+1 < rFtnIdxs.Count(); ++k )
+ for ( sal_uInt16 k = 0; k+1 < rFtnIdxs.Count(); ++k )
{
SwIndex aIdx1(&pDoc->GetNodes());
SwIndex aIdx2(&pDoc->GetNodes());
@@ -92,19 +92,19 @@ ULONG MA_FASTCALL lcl_FindFtnPos( const SwDoc *pDoc, const SwTxtFtn *pAttr )
}
#endif
- USHORT nRet;
+ sal_uInt16 nRet;
SwTxtFtnPtr pBla = (SwTxtFtn*)pAttr;
if ( rFtnIdxs.Seek_Entry( pBla, &nRet ) )
{
if( pAttr->GetFtn().IsEndNote() )
- return ULONG(nRet) + ENDNOTE;
+ return sal_uLong(nRet) + ENDNOTE;
return nRet;
}
ASSERT( !pDoc, "FtnPos not found." );
return 0;
}
-BOOL SwFtnFrm::operator<( const SwTxtFtn* pTxtFtn ) const
+sal_Bool SwFtnFrm::operator<( const SwTxtFtn* pTxtFtn ) const
{
const SwDoc* pDoc = GetFmt()->GetDoc();
ASSERT( pDoc, "SwFtnFrm: Missing doc!" );
@@ -114,25 +114,25 @@ BOOL SwFtnFrm::operator<( const SwTxtFtn* pTxtFtn ) const
/*************************************************************************
|*
-|* BOOL lcl_NextFtnBoss( SwFtnBossFrm* pBoss, SwPageFrm* pPage)
+|* sal_Bool lcl_NextFtnBoss( SwFtnBossFrm* pBoss, SwPageFrm* pPage)
|* setzt pBoss auf den naechsten SwFtnBossFrm, das kann entweder eine Spalte
|* oder eine Seite (ohne Spalten) sein. Wenn die Seite dabei gewechselt wird
-|* enthaelt pPage die neue Seite und die Funktion liefert TRUE.
+|* enthaelt pPage die neue Seite und die Funktion liefert sal_True.
|*
|* Ersterstellung AMA 06. Nov. 98
|* Letzte Aenderung AMA 06. Nov. 98
|*
|*************************************************************************/
-BOOL lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage,
- BOOL bDontLeave )
+sal_Bool lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage,
+ sal_Bool bDontLeave )
{
if( rpBoss->IsColumnFrm() )
{
if( rpBoss->GetNext() )
{
rpBoss = (SwFtnBossFrm*)rpBoss->GetNext(); //naechste Spalte
- return FALSE;
+ return sal_False;
}
if( rpBoss->IsInSct() )
{
@@ -150,7 +150,7 @@ BOOL lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage,
{
rpPage = NULL;
rpBoss = NULL;
- return FALSE;
+ return sal_False;
}
}
}
@@ -162,12 +162,12 @@ BOOL lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage,
if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() )
rpBoss = (SwFtnBossFrm*)pBody->Lower(); // erste Spalte
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
|*
-|* USHORT lcl_ColumnNum( SwFrm* pBoss )
+|* sal_uInt16 lcl_ColumnNum( SwFrm* pBoss )
|* liefert die Spaltennummer, wenn pBoss eine Spalte ist,
|* sonst eine Null (bei Seiten).
|*
@@ -176,9 +176,9 @@ BOOL lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage,
|*
|*************************************************************************/
-USHORT lcl_ColumnNum( const SwFrm* pBoss )
+sal_uInt16 lcl_ColumnNum( const SwFrm* pBoss )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if( !pBoss->IsColumnFrm() )
return 0;
const SwFrm* pCol;
@@ -273,18 +273,18 @@ void SwFtnContFrm::Format( const SwBorderAttrs * )
SWRECTFN( this )
if ( !bValidPrtArea )
{
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
(Prt().*fnRect->fnSetTop)( nBorder );
(Prt().*fnRect->fnSetWidth)( (Frm().*fnRect->fnGetWidth)() );
(Prt().*fnRect->fnSetHeight)((Frm().*fnRect->fnGetHeight)() - nBorder );
if( (Prt().*fnRect->fnGetHeight)() < 0 && !pPage->IsFtnPage() )
- bValidSize = FALSE;
+ bValidSize = sal_False;
}
if ( !bValidSize )
{
if ( pPage->IsFtnPage() && !GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- Grow( LONG_MAX, FALSE );
+ Grow( LONG_MAX, sal_False );
else
{
//Die Groesse in der VarSize wird durch den Inhalt plus den
@@ -333,7 +333,7 @@ void SwFtnContFrm::Format( const SwBorderAttrs * )
}
}
}
- bValidSize = TRUE;
+ bValidSize = sal_True;
}
}
/*************************************************************************
@@ -345,7 +345,7 @@ void SwFtnContFrm::Format( const SwBorderAttrs * )
|*
|*************************************************************************/
-SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL )
+SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
{
//Keine Pruefung ob FixSize oder nicht, die FtnContainer sind immer bis
//zur Maximalhoehe variabel.
@@ -373,7 +373,7 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL )
// In a section, which has to maximize, a footnotecontainer is allowed
// to grow, when the section can't grow anymore.
if( !bTst && !pSect->IsColLocked() &&
- pSect->ToMaximize( FALSE ) && pSect->Growable() )
+ pSect->ToMaximize( sal_False ) && pSect->Growable() )
{
pSect->InvalidateSize();
return 0;
@@ -428,7 +428,7 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL )
nReal = 0;
if ( nGrow > 0 )
{
- BYTE nAdjust = pBoss->NeighbourhoodAdjustment( this );
+ sal_uInt8 nAdjust = pBoss->NeighbourhoodAdjustment( this );
if( NA_ONLY_ADJUST == nAdjust )
nReal = AdjustNeighbourhood( nGrow, bTst );
else
@@ -480,7 +480,7 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL )
}
-SwTwips SwFtnContFrm::ShrinkFrm( SwTwips nDiff, BOOL bTst, BOOL bInfo )
+SwTwips SwFtnContFrm::ShrinkFrm( SwTwips nDiff, sal_Bool bTst, sal_Bool bInfo )
{
SwPageFrm *pPage = FindPageFrm();
if ( pPage &&
@@ -517,7 +517,7 @@ SwFtnFrm::SwFtnFrm( SwFrmFmt *pFmt, SwCntntFrm *pCnt, SwTxtFtn *pAt ):
pMaster( 0 ),
pRef( pCnt ),
pAttr( pAt ),
- bBackMoveLocked( FALSE ),
+ bBackMoveLocked( sal_False ),
// --> OD 2005-08-11 #i49383#
mbUnlockPosOfLowerObjs( true )
// <--
@@ -561,10 +561,10 @@ void SwFtnFrm::InvalidateNxtFtnCnts( SwPageFrm *pPage )
#ifdef DBG_UTIL
-SwTwips SwFtnFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwFtnFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
#if OSL_DEBUG_LEVEL > 1
- static USHORT nNum = USHRT_MAX;
+ static sal_uInt16 nNum = USHRT_MAX;
SwTxtFtn* pTxtFtn = GetAttr();
if ( pTxtFtn->GetFtn().GetNumber() == nNum )
{
@@ -577,10 +577,10 @@ SwTwips SwFtnFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
}
-SwTwips SwFtnFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwFtnFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
#if OSL_DEBUG_LEVEL > 1
- static USHORT nNum = USHRT_MAX;
+ static sal_uInt16 nNum = USHRT_MAX;
if( nNum != USHRT_MAX )
{
SwTxtFtn* pTxtFtn = GetAttr();
@@ -644,7 +644,7 @@ void SwFtnFrm::Cut()
delete pUp;
// Wenn der letzte Fussnotencontainer aus einem spaltigen Bereich verschwindet,
// so kann dieser, falls er keinen Follow besitzt, zusammenschrumpfen.
- if( pSect && !pSect->ToMaximize( FALSE ) && !pSect->IsColLocked() )
+ if( pSect && !pSect->ToMaximize( sal_False ) && !pSect->IsColLocked() )
pSect->_InvalidateSize();
}
else
@@ -731,7 +731,7 @@ void SwFtnFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
|*
|* Beschreibung Liefert das naechste LayoutBlatt in den das
|* Frame gemoved werden kann.
-|* Neue Seiten werden nur dann erzeugt, wenn der Parameter TRUE ist.
+|* Neue Seiten werden nur dann erzeugt, wenn der Parameter sal_True ist.
|* Ersterstellung MA 16. Nov. 92
|* Letzte Aenderung AMA 09. Nov. 98
|*
@@ -861,13 +861,13 @@ SwLayoutFrm *SwFrm::GetPrevFtnLeaf( MakePageType eMakeFtn )
pTmpRef = pFtn->GetRef();
SwFtnBossFrm* pStop = pTmpRef->FindFtnBossFrm( !bEndn );
- const USHORT nNum = pStop->GetPhyPageNum();
+ const sal_uInt16 nNum = pStop->GetPhyPageNum();
//Wenn die Fussnoten am Dokumentende angezeigt werden, so verlassen wir
//die Entsprechenden Seiten nicht.
//Selbiges gilt analog fuer die Endnotenseiten.
- const BOOL bEndNote = pOldPage->IsEndNotePage();
- const BOOL bFtnEndDoc = pOldPage->IsFtnPage();
+ const sal_Bool bEndNote = pOldPage->IsEndNotePage();
+ const sal_Bool bFtnEndDoc = pOldPage->IsFtnPage();
SwFtnBossFrm* pNxtBoss = pOldBoss;
SwSectionFrm *pSect = pNxtBoss->GetUpper()->IsSctFrm() ?
(SwSectionFrm*)pNxtBoss->GetUpper() : 0;
@@ -936,22 +936,22 @@ SwLayoutFrm *SwFrm::GetPrevFtnLeaf( MakePageType eMakeFtn )
if ( pRet )
{
const SwFtnBossFrm* pNewBoss = pRet->FindFtnBossFrm();
- BOOL bJump = FALSE;
+ sal_Bool bJump = sal_False;
if( pOldBoss->IsColumnFrm() && pOldBoss->GetPrev() ) // es gibt eine vorherige Spalte
bJump = pOldBoss->GetPrev() != (SwFrm*)pNewBoss; // sind wir darin gelandet?
else if( pNewBoss->IsColumnFrm() && pNewBoss->GetNext() )
- bJump = TRUE; // es gibt hinter dem neuen Boss noch eine Spalte, die aber nicht
+ bJump = sal_True; // es gibt hinter dem neuen Boss noch eine Spalte, die aber nicht
// der alte Boss sein kann, das haben wir ja bereits geprueft.
else // hier landen wir nur, wenn neuer und alter Boss entweder Seiten oder letzte (neu)
{ // bzw. erste (alt) Spalten einer Seite sind. In diesem Fall muss noch geprueft
// werden, ob Seiten ueberspringen wurden.
- USHORT nDiff = pOldPage->GetPhyPageNum() - pRet->FindPageFrm()->GetPhyPageNum();
+ sal_uInt16 nDiff = pOldPage->GetPhyPageNum() - pRet->FindPageFrm()->GetPhyPageNum();
if ( nDiff > 2 ||
(nDiff > 1 && !((SwPageFrm*)pOldPage->GetPrev())->IsEmptyPage()) )
- bJump = TRUE;
+ bJump = sal_True;
}
if( bJump )
- SwFlowFrm::SetMoveBwdJump( TRUE );
+ SwFlowFrm::SetMoveBwdJump( sal_True );
}
return pRet;
}
@@ -966,10 +966,10 @@ SwLayoutFrm *SwFrm::GetPrevFtnLeaf( MakePageType eMakeFtn )
|*************************************************************************/
-BOOL SwFrm::IsFtnAllowed() const
+sal_Bool SwFrm::IsFtnAllowed() const
{
if ( !IsInDocBody() )
- return FALSE;
+ return sal_False;
if ( IsInTab() )
{
@@ -978,7 +978,7 @@ BOOL SwFrm::IsFtnAllowed() const
if ( pTab->IsFollow() )
return !pTab->IsInHeadline( *this );
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1015,7 +1015,7 @@ void SwRootFrm::UpdateFtnNums()
|*
|*************************************************************************/
-void lcl_RemoveFtns( SwFtnBossFrm* pBoss, BOOL bPageOnly, BOOL bEndNotes )
+void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes )
{
do
{
@@ -1069,7 +1069,7 @@ void lcl_RemoveFtns( SwFtnBossFrm* pBoss, BOOL bPageOnly, BOOL bEndNotes )
} while( pBoss );
}
-void SwRootFrm::RemoveFtns( SwPageFrm *pPage, BOOL bPageOnly, BOOL bEndNotes )
+void SwRootFrm::RemoveFtns( SwPageFrm *pPage, sal_Bool bPageOnly, sal_Bool bEndNotes )
{
if ( !pPage )
pPage = (SwPageFrm*)Lower();
@@ -1111,7 +1111,7 @@ void SwRootFrm::RemoveFtns( SwPageFrm *pPage, BOOL bPageOnly, BOOL bEndNotes )
|*
|*************************************************************************/
-void SwRootFrm::CheckFtnPageDescs( BOOL bEndNote )
+void SwRootFrm::CheckFtnPageDescs( sal_Bool bEndNote )
{
SwPageFrm *pPage = (SwPageFrm*)Lower();
while ( pPage && !pPage->IsFtnPage() )
@@ -1119,7 +1119,7 @@ void SwRootFrm::CheckFtnPageDescs( BOOL bEndNote )
while ( pPage && pPage->IsEndNotePage() != bEndNote )
pPage = (SwPageFrm*)pPage->GetNext();
if ( pPage )
- SwFrm::CheckPageDescs( pPage, FALSE );
+ SwFrm::CheckPageDescs( pPage, sal_False );
}
@@ -1193,7 +1193,7 @@ SwFtnContFrm *SwFtnBossFrm::FindFtnCont()
|*
|*************************************************************************/
-SwFtnContFrm *SwFtnBossFrm::FindNearestFtnCont( BOOL bDontLeave )
+SwFtnContFrm *SwFtnBossFrm::FindNearestFtnCont( sal_Bool bDontLeave )
{
SwFtnContFrm *pCont = 0;
if ( GetFmt()->GetDoc()->GetFtnIdxs().Count() )
@@ -1203,10 +1203,10 @@ SwFtnContFrm *SwFtnBossFrm::FindNearestFtnCont( BOOL bDontLeave )
{
SwPageFrm *pPage = FindPageFrm();
SwFtnBossFrm* pBoss = this;
- BOOL bEndNote = pPage->IsEndNotePage();
+ sal_Bool bEndNote = pPage->IsEndNotePage();
do
{
- BOOL bChgPage = lcl_NextFtnBoss( pBoss, pPage, bDontLeave );
+ sal_Bool bChgPage = lcl_NextFtnBoss( pBoss, pPage, bDontLeave );
// Haben wir noch einen Boss gefunden? Bei einem Seitenwechsel muss
// zudem noch das EndNotenFlag uebereinstimmen
if( pBoss && ( !bChgPage || pPage->IsEndNotePage() == bEndNote ) )
@@ -1240,9 +1240,9 @@ SwFtnFrm *SwFtnBossFrm::FindFirstFtn()
//von der aktuellen Spalte (bzw. einspaltigen Seite) referenziert wird.
SwFtnFrm *pRet = (SwFtnFrm*)pCont->Lower();
- const USHORT nRefNum = FindPageFrm()->GetPhyPageNum();
- const USHORT nRefCol = lcl_ColumnNum( this );
- USHORT nPgNum, nColNum; //Seitennummer, Spaltennummer
+ const sal_uInt16 nRefNum = FindPageFrm()->GetPhyPageNum();
+ const sal_uInt16 nRefCol = lcl_ColumnNum( this );
+ sal_uInt16 nPgNum, nColNum; //Seitennummer, Spaltennummer
SwFtnBossFrm* pBoss;
SwPageFrm* pPage;
if( pRet )
@@ -1250,7 +1250,7 @@ SwFtnFrm *SwFtnBossFrm::FindFirstFtn()
pBoss = pRet->GetRef()->FindFtnBossFrm();
ASSERT( pBoss, "FindFirstFtn: No boss found" );
if( !pBoss )
- return FALSE; // ?There must be a bug, but no GPF
+ return sal_False; // ?There must be a bug, but no GPF
pPage = pBoss->FindPageFrm();
nPgNum = pPage->GetPhyPageNum();
if ( nPgNum == nRefNum )
@@ -1279,7 +1279,7 @@ SwFtnFrm *SwFtnBossFrm::FindFirstFtn()
{
pBoss = pRet->FindFtnBossFrm();
pPage = pBoss->FindPageFrm();
- lcl_NextFtnBoss( pBoss, pPage, FALSE ); // naechster FtnBoss
+ lcl_NextFtnBoss( pBoss, pPage, sal_False ); // naechster FtnBoss
pCont = pBoss ? pBoss->FindNearestFtnCont() : 0;
if ( pCont )
pNxt = (SwFtnFrm*)pCont->Lower();
@@ -1323,8 +1323,8 @@ const SwFtnFrm *SwFtnBossFrm::FindFirstFtn( SwCntntFrm *pCnt ) const
const SwFtnFrm *pRet = ((SwFtnBossFrm*)this)->FindFirstFtn();
if ( pRet )
{
- const USHORT nColNum = lcl_ColumnNum( this ); //Spaltennummer
- const USHORT nPageNum = GetPhyPageNum();
+ const sal_uInt16 nColNum = lcl_ColumnNum( this ); //Spaltennummer
+ const sal_uInt16 nPageNum = GetPhyPageNum();
while ( pRet && (pRet->GetRef() != pCnt) )
{
while ( pRet->GetFollow() )
@@ -1335,7 +1335,7 @@ const SwFtnFrm *SwFtnBossFrm::FindFirstFtn( SwCntntFrm *pCnt ) const
else
{ SwFtnBossFrm *pBoss = (SwFtnBossFrm*)pRet->FindFtnBossFrm();
SwPageFrm *pPage = pBoss->FindPageFrm();
- lcl_NextFtnBoss( pBoss, pPage, FALSE ); // naechster FtnBoss
+ lcl_NextFtnBoss( pBoss, pPage, sal_False ); // naechster FtnBoss
SwFtnContFrm *pCont = pBoss ? pBoss->FindNearestFtnCont() : 0;
pRet = pCont ? (SwFtnFrm*)pCont->Lower() : 0;
}
@@ -1371,7 +1371,7 @@ void SwFtnBossFrm::ResetFtn( const SwFtnFrm *pCheck )
SwCntntNode *pNd = aIdx.GetNode().GetCntntNode();
if ( !pNd )
pNd = pCheck->GetFmt()->GetDoc()->
- GetNodes().GoNextSection( &aIdx, TRUE, FALSE );
+ GetNodes().GoNextSection( &aIdx, sal_True, sal_False );
SwClientIter aIter( *pNd );
SwClient* pLast = aIter.GoStart();
while( pLast )
@@ -1414,7 +1414,7 @@ void SwFtnBossFrm::ResetFtn( const SwFtnFrm *pCheck )
void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
{
#if (OSL_DEBUG_LEVEL > 1) && defined(DBG_UTIL)
- static USHORT nStop = 0;
+ static sal_uInt16 nStop = 0;
if ( nStop == pNew->GetFrmId() )
{
int bla = 5;
@@ -1432,7 +1432,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
ResetFtn( pNew );
SwFtnFrm *pSibling = FindFirstFtn();
- BOOL bDontLeave = FALSE;
+ sal_Bool bDontLeave = sal_False;
// Ok, a sibling has been found, but is the sibling in an acceptable
// environment?
@@ -1479,10 +1479,10 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
//Damit die Position herausgefunden werden kann.
SwDoc *pDoc = GetFmt()->GetDoc();
- const ULONG nStPos = ::lcl_FindFtnPos( pDoc, pNew->GetAttr() );
+ const sal_uLong nStPos = ::lcl_FindFtnPos( pDoc, pNew->GetAttr() );
- ULONG nCmpPos = 0;
- ULONG nLastPos = 0;
+ sal_uLong nCmpPos = 0;
+ sal_uLong nLastPos = 0;
SwFtnContFrm *pParent = 0;
if( pSibling )
{
@@ -1553,8 +1553,8 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
{
pNxtB = pSibling->FindFtnBossFrm();
SwPageFrm *pSibPage = pNxtB->FindPageFrm();
- BOOL bEndNote = pSibPage->IsEndNotePage();
- BOOL bChgPage = lcl_NextFtnBoss( pNxtB, pSibPage, bDontLeave );
+ sal_Bool bEndNote = pSibPage->IsEndNotePage();
+ sal_Bool bChgPage = lcl_NextFtnBoss( pNxtB, pSibPage, bDontLeave );
// Bei Seitenwechsel muss das EndNoteFlag ueberprueft werden.
SwFtnContFrm *pCont = pNxtB && ( !bChgPage ||
pSibPage->IsEndNotePage() == bEndNote )
@@ -1598,9 +1598,9 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
//dann der Vorgaenger.
SwFtnBossFrm* pBoss = pNew->GetRef()->FindFtnBossFrm(
!pNew->GetAttr()->GetFtn().IsEndNote() );
- USHORT nRefNum = pBoss->GetPhyPageNum(); // Die Seiten- und
- USHORT nRefCol = lcl_ColumnNum( pBoss ); // Spaltennummer der neuen Fussnote
- BOOL bEnd = FALSE;
+ sal_uInt16 nRefNum = pBoss->GetPhyPageNum(); // Die Seiten- und
+ sal_uInt16 nRefCol = lcl_ColumnNum( pBoss ); // Spaltennummer der neuen Fussnote
+ sal_Bool bEnd = sal_False;
SwFtnFrm *pLastSib = 0;
while ( pSibling && !bEnd && (nCmpPos <= nStPos) )
{
@@ -1615,20 +1615,20 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
{
pBoss = pSibling->GetRef()->FindFtnBossFrm( !pSibling->
GetAttr()->GetFtn().IsEndNote() );
- USHORT nTmpRef;
+ sal_uInt16 nTmpRef;
if( nStPos >= ENDNOTE ||
(nTmpRef = pBoss->GetPhyPageNum()) < nRefNum ||
( nTmpRef == nRefNum && lcl_ColumnNum( pBoss ) <= nRefCol ))
pSibling = pFoll;
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
else
{
SwFtnBossFrm* pNxtB = pSibling->FindFtnBossFrm();
SwPageFrm *pSibPage = pNxtB->FindPageFrm();
- BOOL bEndNote = pSibPage->IsEndNotePage();
- BOOL bChgPage = lcl_NextFtnBoss( pNxtB, pSibPage, bDontLeave );
+ sal_Bool bEndNote = pSibPage->IsEndNotePage();
+ sal_Bool bChgPage = lcl_NextFtnBoss( pNxtB, pSibPage, bDontLeave );
// Bei Seitenwechsel muss das EndNoteFlag ueberprueft werden.
SwFtnContFrm *pCont = pNxtB && ( !bChgPage ||
pSibPage->IsEndNotePage() == bEndNote )
@@ -1636,7 +1636,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
if ( pCont )
pSibling = (SwFtnFrm*)pCont->Lower();
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
if ( !bEnd && pSibling )
nCmpPos = ::lcl_FindFtnPos( pDoc, pSibling->GetAttr() );
@@ -1645,7 +1645,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
if ( (nLastPos < nCmpPos) && (nCmpPos > nStPos) )
{
pSibling = pLastSib;
- bEnd = TRUE;
+ bEnd = sal_True;
}
}
}
@@ -1666,7 +1666,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
{
if( ENDNOTE > nCmpPos || nStPos >= ENDNOTE )
{
- ASSERT( FALSE, "InsertFtn: Master expected II" );
+ ASSERT( sal_False, "InsertFtn: Master expected II" );
do
pSibling = pSibling->GetMaster();
while ( pSibling->GetMaster() );
@@ -1704,11 +1704,11 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
SwFtnBossFrm *pBoss = this;
SwPageFrm *pPage = FindPageFrm();
SwPageFrm *pMyPage = pPage;
- BOOL bChgPage = FALSE;
- BOOL bEnd = FALSE;
+ sal_Bool bChgPage = sal_False;
+ sal_Bool bEnd = sal_False;
if ( pAttr->GetFtn().IsEndNote() )
{
- bEnd = TRUE;
+ bEnd = sal_True;
if( GetUpper()->IsSctFrm() &&
((SwSectionFrm*)GetUpper())->IsEndnAtEnd() )
{
@@ -1725,15 +1725,15 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
while ( pPage->GetNext() && !pPage->IsEndNotePage() )
{
pPage = (SwPageFrm*)pPage->GetNext();
- bChgPage = TRUE;
+ bChgPage = sal_True;
}
if ( !pPage->IsEndNotePage() )
{
SwPageDesc *pDesc = pDoc->GetEndNoteInfo().GetPageDesc( *pDoc );
pPage = ::InsertNewPage( *pDesc, pPage->GetUpper(),
- !pPage->OnRightPage(), FALSE, TRUE, 0 );
- pPage->SetEndNotePage( TRUE );
- bChgPage = TRUE;
+ !pPage->OnRightPage(), sal_False, sal_True, 0 );
+ pPage->SetEndNotePage( sal_True );
+ bChgPage = sal_True;
}
else
{
@@ -1741,7 +1741,7 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
//suchen. Damit stellen wir sicher das wir auch bei hunderten
//Fussnoten noch in endlicher Zeit fertig werden.
SwPageFrm *pNxt = (SwPageFrm*)pPage->GetNext();
- const ULONG nStPos = ::lcl_FindFtnPos( pDoc, pAttr );
+ const sal_uLong nStPos = ::lcl_FindFtnPos( pDoc, pAttr );
while ( pNxt && pNxt->IsEndNotePage() )
{
SwFtnContFrm *pCont = pNxt->FindFtnCont();
@@ -1768,15 +1768,15 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
!((SwPageFrm*)pPage->GetNext())->IsEndNotePage() )
{
pPage = (SwPageFrm*)pPage->GetNext();
- bChgPage = TRUE;
+ bChgPage = sal_True;
}
if ( !pPage->IsFtnPage() )
{
SwPageDesc *pDesc = pDoc->GetFtnInfo().GetPageDesc( *pDoc );
pPage = ::InsertNewPage( *pDesc, pPage->GetUpper(),
- !pPage->OnRightPage(), FALSE, TRUE, pPage->GetNext() );
- bChgPage = TRUE;
+ !pPage->OnRightPage(), sal_False, sal_True, pPage->GetNext() );
+ bChgPage = sal_True;
}
else
{
@@ -1784,7 +1784,7 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
//suchen. Damit stellen wir sicher das wir auch bei hunderten
//Fussnoten noch in endlicher Zeit fertig werden.
SwPageFrm *pNxt = (SwPageFrm*)pPage->GetNext();
- const ULONG nStPos = ::lcl_FindFtnPos( pDoc, pAttr );
+ const sal_uLong nStPos = ::lcl_FindFtnPos( pDoc, pAttr );
while ( pNxt && pNxt->IsFtnPage() && !pNxt->IsEndNotePage() )
{
SwFtnContFrm *pCont = pNxt->FindFtnCont();
@@ -1932,7 +1932,7 @@ SwFtnFrm *SwFtnBossFrm::FindFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr )
SwCntntNode *pNd = aIdx.GetNode().GetCntntNode();
if ( !pNd )
pNd = pRef->GetAttrSet()->GetDoc()->
- GetNodes().GoNextSection( &aIdx, TRUE, FALSE );
+ GetNodes().GoNextSection( &aIdx, sal_True, sal_False );
if ( !pNd )
return 0;
SwClientIter aIter( *pNd );
@@ -1976,7 +1976,7 @@ SwFtnFrm *SwFtnBossFrm::FindFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr )
void SwFtnBossFrm::RemoveFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr,
- BOOL bPrep )
+ sal_Bool bPrep )
{
SwFtnFrm *pFtn = FindFtn( pRef, pAttr );
if( pFtn )
@@ -2140,7 +2140,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
while ( _pFtn->GetMaster() )
_pFtn = _pFtn->GetMaster();
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
while ( _pFtn )
{
@@ -2157,7 +2157,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
SwPageFrm* pPage = pBoss->FindPageFrm();
do
{
- lcl_NextFtnBoss( pBoss, pPage, FALSE );
+ lcl_NextFtnBoss( pBoss, pPage, sal_False );
if( pBoss )
{
SwLayoutFrm* pCont = pBoss->FindFtnCont();
@@ -2182,7 +2182,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
}
if ( pNxtFtn == _pFtn )
{
- ASSERT( FALSE, "_CollectFtn: Devil's circle" );
+ ASSERT( sal_False, "_CollectFtn: Devil's circle" );
pNxtFtn = 0;
}
@@ -2233,7 +2233,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
}
_pFtn->Cut();
FtnInArr( _rFtnArr, _pFtn );
- bFound = TRUE;
+ bFound = sal_True;
}
else
{
@@ -2260,27 +2260,27 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
|*************************************************************************/
-void SwFtnBossFrm::_MoveFtns( SvPtrarr &rFtnArr, BOOL bCalc )
+void SwFtnBossFrm::_MoveFtns( SvPtrarr &rFtnArr, sal_Bool bCalc )
{
//Alle Fussnoten die von pRef referenziert werden muessen von der
//aktuellen Position, die sich durch die alte Spalte/Seite ergab, auf eine
//neue Position, bestimmt durch die neue Spalte/Seite, gemoved werden.
- const USHORT nMyNum = FindPageFrm()->GetPhyPageNum();
- const USHORT nMyCol = lcl_ColumnNum( this );
+ const sal_uInt16 nMyNum = FindPageFrm()->GetPhyPageNum();
+ const sal_uInt16 nMyCol = lcl_ColumnNum( this );
SWRECTFN( this )
// --> OD 2004-06-11 #i21478# - keep last inserted footnote in order to
// format the content of the following one.
SwFtnFrm* pLastInsertedFtn = 0L;
- for ( USHORT i = 0; i < rFtnArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rFtnArr.Count(); ++i )
{
SwFtnFrm *pFtn = (SwFtnFrm*)rFtnArr[i];
- SwFtnBossFrm* pRefBoss = pFtn->GetRef()->FindFtnBossFrm( TRUE );
+ SwFtnBossFrm* pRefBoss = pFtn->GetRef()->FindFtnBossFrm( sal_True );
if( pRefBoss != this )
{
- const USHORT nRefNum = pRefBoss->FindPageFrm()->GetPhyPageNum();
- const USHORT nRefCol = lcl_ColumnNum( this );
+ const sal_uInt16 nRefNum = pRefBoss->FindPageFrm()->GetPhyPageNum();
+ const sal_uInt16 nRefCol = lcl_ColumnNum( this );
if( nRefNum < nMyNum || ( nRefNum == nMyNum && nRefCol <= nMyCol ) )
pRefBoss = this;
}
@@ -2321,7 +2321,7 @@ void SwFtnBossFrm::_MoveFtns( SvPtrarr &rFtnArr, BOOL bCalc )
{
SwTxtFtn *pAttr = pFtn->GetAttr();
pCnt = pFtn->ContainsAny();
- BOOL bUnlock = !pFtn->IsBackMoveLocked();
+ sal_Bool bUnlock = !pFtn->IsBackMoveLocked();
pFtn->LockBackMove();
// --> OD 2005-05-18 #i49383# - disable unlock of position of
@@ -2415,7 +2415,7 @@ void SwFtnBossFrm::_MoveFtns( SvPtrarr &rFtnArr, BOOL bCalc )
SwTxtFtn* pAttr = pNextFtn->GetAttr();
SwFrm* pCnt = pNextFtn->ContainsAny();
- BOOL bUnlock = !pNextFtn->IsBackMoveLocked();
+ sal_Bool bUnlock = !pNextFtn->IsBackMoveLocked();
pNextFtn->LockBackMove();
// --> OD 2005-05-18 #i49383# - disable unlock of position of
// lower objects during format of footnote content.
@@ -2486,14 +2486,14 @@ void SwFtnBossFrm::MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest,
|| pAttr->GetFtn().IsEndNote() )
return;
- ASSERT( this == pSrc->FindFtnBossFrm( TRUE ),
+ ASSERT( this == pSrc->FindFtnBossFrm( sal_True ),
"SwPageFrm::MoveFtns: source frame isn't on that FtnBoss" );
SwFtnFrm *pFtn = FindFirstFtn();
if( pFtn )
{
ChangeFtnRef( pSrc, pAttr, pDest );
- SwFtnBossFrm *pDestBoss = pDest->FindFtnBossFrm( TRUE );
+ SwFtnBossFrm *pDestBoss = pDest->FindFtnBossFrm( sal_True );
ASSERT( pDestBoss, "+SwPageFrm::MoveFtns: no destination boss" );
if( pDestBoss ) // robust
{
@@ -2501,7 +2501,7 @@ void SwFtnBossFrm::MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest,
pDestBoss->_CollectFtns( pDest, pFtn, aFtnArr );
if ( aFtnArr.Count() )
{
- pDestBoss->_MoveFtns( aFtnArr, TRUE );
+ pDestBoss->_MoveFtns( aFtnArr, sal_True );
SwPageFrm* pSrcPage = FindPageFrm();
SwPageFrm* pDestPage = pDestBoss->FindPageFrm();
// Nur beim Seitenwechsel FtnNum Updaten
@@ -2526,7 +2526,7 @@ void SwFtnBossFrm::MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest,
|*************************************************************************/
-void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const BOOL bLock,
+void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const sal_Bool bLock,
const SwTxtFtn *pAttr )
{
//Alle Fussnoten der Spalte/Seite dergestalt anformatieren,
@@ -2540,7 +2540,7 @@ void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const BOOL bLock,
SwFrm* pCntnt = pFirst->ContainsAny();
if( pCntnt )
{
- BOOL bUnlock = !pFirst->IsBackMoveLocked();
+ sal_Bool bUnlock = !pFirst->IsBackMoveLocked();
pFirst->LockBackMove();
pFirst->Calc();
pCntnt->Calc();
@@ -2557,12 +2557,12 @@ void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const BOOL bLock,
pFtn = FindFirstFtn();
}
SwDoc *pDoc = GetFmt()->GetDoc();
- const ULONG nFtnPos = pAttr ? ::lcl_FindFtnPos( pDoc, pAttr ) : 0;
+ const sal_uLong nFtnPos = pAttr ? ::lcl_FindFtnPos( pDoc, pAttr ) : 0;
SwFrm *pCnt = pFtn ? pFtn->ContainsAny() : 0;
if ( pCnt )
{
- BOOL bMore = TRUE;
- BOOL bStart = pAttr == 0; // wenn kein Attribut uebergeben wird, alle bearbeiten
+ sal_Bool bMore = sal_True;
+ sal_Bool bStart = pAttr == 0; // wenn kein Attribut uebergeben wird, alle bearbeiten
// --> OD 2005-05-18 #i49383# - disable unlock of position of
// lower objects during format of footnote and footnote content.
SwFtnFrm* pLastFtnFrm( 0L );
@@ -2637,7 +2637,7 @@ void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const BOOL bLock,
}
if ( bLock )
{
- BOOL bUnlock = !pFtnFrm->IsBackMoveLocked();
+ sal_Bool bUnlock = !pFtnFrm->IsBackMoveLocked();
pFtnFrm->LockBackMove();
pFtnFrm->Calc();
pCnt->Calc();
@@ -2712,10 +2712,10 @@ void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const BOOL bLock,
SwFtnFrm* pFtnFrm = pCnt->FindFtnFrm();
if( pFtnFrm->GetRef()->FindFtnBossFrm(
pFtnFrm->GetAttr()->GetFtn().IsEndNote() ) != this )
- bMore = FALSE;
+ bMore = sal_False;
}
else
- bMore = FALSE;
+ bMore = sal_False;
}
if( pDel )
{
@@ -2729,7 +2729,7 @@ void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const BOOL bLock,
if ( pAttr &&
(::lcl_FindFtnPos( pDoc,
pCnt->FindFtnFrm()->GetAttr()) > nFtnPos ) )
- bMore = FALSE;
+ bMore = sal_False;
}
} while ( bMore );
// --> OD 2005-05-18 #i49383#
@@ -2780,13 +2780,13 @@ void SwPageFrm::UpdateFtnNum()
return;
SwCntntFrm* pCntnt = pBody->ContainsCntnt();
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
while( pCntnt && pCntnt->FindPageFrm() == this )
{
if( ((SwTxtFrm*)pCntnt)->HasFtn() )
{
- SwFtnBossFrm* pBoss = pCntnt->FindFtnBossFrm( TRUE );
+ SwFtnBossFrm* pBoss = pCntnt->FindFtnBossFrm( sal_True );
if( pBoss->GetUpper()->IsSctFrm() &&
((SwSectionFrm*)pBoss->GetUpper())->IsOwnFtnNum() )
pCntnt = ((SwSectionFrm*)pBoss->GetUpper())->FindLastCntnt();
@@ -2805,10 +2805,10 @@ void SwPageFrm::UpdateFtnNum()
pFtn = (SwFtnFrm*)pFtn->GetNext();
else
{
- SwFtnBossFrm* pTmpBoss = pFtn->FindFtnBossFrm( TRUE );
+ SwFtnBossFrm* pTmpBoss = pFtn->FindFtnBossFrm( sal_True );
SwPageFrm* pPage = pTmpBoss->FindPageFrm();
pFtn = NULL;
- lcl_NextFtnBoss( pTmpBoss, pPage, FALSE );
+ lcl_NextFtnBoss( pTmpBoss, pPage, sal_False );
if( pTmpBoss )
{
SwFtnContFrm *pCont = pTmpBoss->FindNearestFtnCont();
@@ -2851,9 +2851,9 @@ void SwFtnBossFrm::SetFtnDeadLine( const SwTwips nDeadLine )
nMaxFtnHeight = -(pBody->Frm().*fnRect->fnBottomDist)( nDeadLine );
if ( GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- nMaxFtnHeight += pBody->Grow( LONG_MAX, TRUE );
+ nMaxFtnHeight += pBody->Grow( LONG_MAX, sal_True );
if ( IsInSct() )
- nMaxFtnHeight += FindSctFrm()->Grow( LONG_MAX, TRUE );
+ nMaxFtnHeight += FindSctFrm()->Grow( LONG_MAX, sal_True );
if ( nMaxFtnHeight < 0 )
nMaxFtnHeight = 0;
@@ -2955,9 +2955,9 @@ SwTwips SwFtnBossFrm::GetVarSpace() const
|*
|*************************************************************************/
-BYTE SwFtnBossFrm::_NeighbourhoodAdjustment( const SwFrm* ) const
+sal_uInt8 SwFtnBossFrm::_NeighbourhoodAdjustment( const SwFrm* ) const
{
- BYTE nRet = NA_ONLY_ADJUST;
+ sal_uInt8 nRet = NA_ONLY_ADJUST;
if( GetUpper() && !GetUpper()->IsPageBodyFrm() )
{
// Spaltige Rahmen erfordern Grow/Shrink
@@ -3016,22 +3016,22 @@ void SwPageFrm::SetColMaxFtnHeight()
|*************************************************************************/
-BOOL SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
- SwFtnBossFrm *pNewBoss, const BOOL bFtnNums )
+sal_Bool SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
+ SwFtnBossFrm *pNewBoss, const sal_Bool bFtnNums )
{
SwDoc *pDoc = GetFmt()->GetDoc();
if ( !pDoc->GetFtnIdxs().Count() )
- return FALSE;
+ return sal_False;
if( pDoc->GetFtnInfo().ePos == FTNPOS_CHAPTER &&
( !IsInSct() || !FindSctFrm()->IsFtnAtEnd() ) )
- return TRUE;
+ return sal_True;
if ( !pNewBoss )
- pNewBoss = FindFtnBossFrm( TRUE );
+ pNewBoss = FindFtnBossFrm( sal_True );
if ( pNewBoss == pOldBoss )
- return FALSE;
+ return sal_False;
- BOOL bMoved = FALSE;
+ sal_Bool bMoved = sal_False;
if( !pStart )
pStart = ContainsCntnt();
@@ -3060,8 +3060,8 @@ BOOL SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
!= ( pNewChief = pNewBoss->FindSctFrm() ) )
{
pFtnArr = new SvPtrarr( 5, 5 );
- pOldChief = pOldBoss->FindFtnBossFrm( TRUE );
- pNewChief = pNewBoss->FindFtnBossFrm( TRUE );
+ pOldChief = pOldBoss->FindFtnBossFrm( sal_True );
+ pNewChief = pNewBoss->FindFtnBossFrm( sal_True );
while( pOldChief->IsAnLower( pStart ) )
{
if ( ((SwTxtFrm*)pStart)->HasFtn() )
@@ -3081,13 +3081,13 @@ BOOL SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
if ( aFtnArr.Count() || pFtnArr )
{
if( aFtnArr.Count() )
- pNewBoss->_MoveFtns( aFtnArr, TRUE );
+ pNewBoss->_MoveFtns( aFtnArr, sal_True );
if( pFtnArr )
{
- ((SwFtnBossFrm*)pNewChief)->_MoveFtns( *pFtnArr, TRUE );
+ ((SwFtnBossFrm*)pNewChief)->_MoveFtns( *pFtnArr, sal_True );
delete pFtnArr;
}
- bMoved = TRUE;
+ bMoved = sal_True;
// Nur bei einem Seitenwechsel muss die FtnNum neu berechnet werden
if ( bFtnNums )
@@ -3114,7 +3114,7 @@ BOOL SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
|*************************************************************************/
-BOOL SwCntntFrm::MoveFtnCntFwd( BOOL bMakePage, SwFtnBossFrm *pOldBoss )
+sal_Bool SwCntntFrm::MoveFtnCntFwd( sal_Bool bMakePage, SwFtnBossFrm *pOldBoss )
{
ASSERT( IsInFtn(), "Keine Ftn." );
SwLayoutFrm *pFtn = FindFtnFrm();
@@ -3127,7 +3127,7 @@ BOOL SwCntntFrm::MoveFtnCntFwd( BOOL bMakePage, SwFtnBossFrm *pOldBoss )
{
SwLayoutFrm* pBody = pOldBoss->FindBodyCont();
if( !pBody || !pBody->Lower() )
- return TRUE;
+ return sal_True;
}
//fix(9538): Wenn die Ftn noch Nachbarn hinter sich hat, so muessen
@@ -3144,21 +3144,21 @@ BOOL SwCntntFrm::MoveFtnCntFwd( BOOL bMakePage, SwFtnBossFrm *pOldBoss )
{ pLst = pNxt;
SwCntntFrm *pCnt = pNxt->ContainsCntnt();
if( pCnt )
- pCnt->MoveFtnCntFwd( TRUE, pOldBoss );
+ pCnt->MoveFtnCntFwd( sal_True, pOldBoss );
pNxt = (SwLayoutFrm*)pFtn->GetNext();
}
}
- BOOL bSamePage = TRUE;
+ sal_Bool bSamePage = sal_True;
SwLayoutFrm *pNewUpper =
- GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, TRUE );
+ GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, sal_True );
if ( pNewUpper )
{
- BOOL bSameBoss = TRUE;
+ sal_Bool bSameBoss = sal_True;
SwFtnBossFrm * const pNewBoss = pNewUpper->FindFtnBossFrm();
//Wechseln wir die Spalte/Seite?
- if ( FALSE == ( bSameBoss = pNewBoss == pOldBoss ) )
+ if ( sal_False == ( bSameBoss = pNewBoss == pOldBoss ) )
{
bSamePage = pOldBoss->FindPageFrm() == pNewBoss->FindPageFrm(); // Seitenwechsel?
pNewUpper->Calc();
@@ -3211,7 +3211,7 @@ BOOL SwCntntFrm::MoveFtnCntFwd( BOOL bMakePage, SwFtnBossFrm *pOldBoss )
pNewUp = (SwSectionFrm*)pTmpFtn->Lower();
else
{
- pNewUp = new SwSectionFrm( *pSect, FALSE );
+ pNewUp = new SwSectionFrm( *pSect, sal_False );
pNewUp->InsertBefore( pTmpFtn, pTmpFtn->Lower() );
static_cast<SwSectionFrm*>(pNewUp)->Init();
pNewUp->Frm().Pos() = pTmpFtn->Frm().Pos();
@@ -3315,7 +3315,7 @@ SwCntntFrm* SwFtnFrm::GetRefFromAttr()
ASSERT( pAttr, "invalid Attribute" );
SwTxtNode& rTNd = (SwTxtNode&)pAttr->GetTxtNode();
SwPosition aPos( rTNd, SwIndex( &rTNd, *pAttr->GetStart() ));
- SwCntntFrm* pCFrm = rTNd.GetFrm( 0, &aPos, FALSE );
+ SwCntntFrm* pCFrm = rTNd.GetFrm( 0, &aPos, sal_False );
return pCFrm;
}
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index 79348f01d1e2..57790fbb3eb3 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -50,7 +50,7 @@
#include <objectformatter.hxx>
// <--
-extern BOOL bObjsDirect; //frmtool.cxx
+extern sal_Bool bObjsDirect; //frmtool.cxx
static SwTwips lcl_GetFrmMinHeight(const SwLayoutFrm & rFrm)
{
@@ -78,7 +78,7 @@ static SwTwips lcl_CalcContentHeight(SwLayoutFrm & frm)
SwFrm* pFrm = frm.Lower();
SwTwips nRemaining = 0;
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
pFrm = frm.Lower();
while ( pFrm )
{
@@ -117,20 +117,20 @@ static void lcl_LayoutFrmEnsureMinHeight(SwLayoutFrm & rFrm,
}
}
-SwHeadFootFrm::SwHeadFootFrm( SwFrmFmt * pFmt, USHORT nTypeIn)
+SwHeadFootFrm::SwHeadFootFrm( SwFrmFmt * pFmt, sal_uInt16 nTypeIn)
: SwLayoutFrm(pFmt)
{
nType = nTypeIn;
- SetDerivedVert( FALSE );
+ SetDerivedVert( sal_False );
const SwFmtCntnt &rCnt = pFmt->GetCntnt();
ASSERT( rCnt.GetCntntIdx(), "Kein Inhalt fuer Header." );
//Fuer Header Footer die Objekte gleich erzeugen lassen.
- BOOL bOld = bObjsDirect;
- bObjsDirect = TRUE;
- ULONG nIndex = rCnt.GetCntntIdx()->GetIndex();
+ sal_Bool bOld = bObjsDirect;
+ bObjsDirect = sal_True;
+ sal_uLong nIndex = rCnt.GetCntntIdx()->GetIndex();
::_InsertCnt( this, pFmt->GetDoc(), ++nIndex );
bObjsDirect = bOld;
}
@@ -232,7 +232,7 @@ void SwHeadFootFrm::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
}
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
}
void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
@@ -241,7 +241,7 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
{
if( !IsColLocked() )
{
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
const SwTwips nBorder = nUL;
SwTwips nMinHeight = lcl_GetFrmMinHeight(*this);
@@ -397,11 +397,11 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
Prt().SSize().Height() = Frm().Height() - nBorder;
}
}
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
} while( nRemaining<=nMaxHeight && nOldHeight!=Prt().Height() );
ColUnlock();
}
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
}
else //if ( GetType() & 0x0018 )
{
@@ -409,7 +409,7 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
{
if ( Frm().Height() != pAttrs->GetSize().Height() )
ChgSize( Size( Frm().Width(), pAttrs->GetSize().Height()));
- bValidSize = TRUE;
+ bValidSize = sal_True;
MakePos();
} while ( !bValidSize );
}
@@ -440,7 +440,7 @@ void SwHeadFootFrm::Format(const SwBorderAttrs * pAttrs)
}
}
-SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SwTwips nResult;
@@ -542,7 +542,7 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
return nResult;
}
-SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SwTwips nResult;
@@ -658,15 +658,15 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
return nResult;
}
-BOOL SwHeadFootFrm::GetEatSpacing() const
+sal_Bool SwHeadFootFrm::GetEatSpacing() const
{
const SwFrmFmt * pFmt = GetFmt();
ASSERT(pFmt, "SwHeadFootFrm: no format?");
if (pFmt->GetHeaderAndFooterEatSpacing().GetValue())
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
@@ -710,7 +710,7 @@ void SwPageFrm::PrepareHeader()
const SwFmtHeader &rH = ((SwFrmFmt*)pRegisteredIn)->GetHeader();
- const BOOL bOn = !((SwFrmFmt*)pRegisteredIn)->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bOn = !((SwFrmFmt*)pRegisteredIn)->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
if ( bOn && rH.IsActive() )
{ //Header einsetzen, vorher entfernen falls vorhanden.
@@ -760,7 +760,7 @@ void SwPageFrm::PrepareFooter()
while ( pLay->GetNext() )
pLay = (SwLayoutFrm*)pLay->GetNext();
- const BOOL bOn = !((SwFrmFmt*)pRegisteredIn)->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bOn = !((SwFrmFmt*)pRegisteredIn)->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
if ( bOn && rF.IsActive() )
{ //Footer einsetzen, vorher entfernen falls vorhanden.
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 589569b3fb6b..762c1caa3d84 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -160,7 +160,7 @@ static void BreakPoint()
} \
}
-inline ULONG Ticks()
+inline sal_uLong Ticks()
{
return 1000 * clock() / CLOCKS_PER_SEC;
}
@@ -171,7 +171,7 @@ void SwLayAction::CheckWaitCrsr()
if ( !IsWait() && IsWaitAllowed() && IsPaint() &&
((Ticks() - GetStartTicks()) >= CLOCKS_PER_SEC/2) )
{
- pWait = new SwWait( *pRoot->GetFmt()->GetDoc()->GetDocShell(), TRUE );
+ pWait = new SwWait( *pRoot->GetFmt()->GetDoc()->GetDocShell(), sal_True );
}
}
@@ -198,7 +198,7 @@ inline void SwLayAction::CheckIdleEnd()
|* Letzte Aenderung MA 06. Aug. 95
|*
|*************************************************************************/
-void SwLayAction::SetStatBar( BOOL bNew )
+void SwLayAction::SetStatBar( sal_Bool bNew )
{
if ( bNew )
{
@@ -221,13 +221,13 @@ void SwLayAction::SetStatBar( BOOL bNew )
|* Letzte Aenderung MA 10. Sep. 96
|*
|*************************************************************************/
-BOOL SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwCntntFrm *pCnt,
+sal_Bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwCntntFrm *pCnt,
const SwPageFrm *pPage )
{
SwRegionRects aTmp( rRect );
const SwSortedObjs &rObjs = *pPage->GetSortedObjs();
const SwFlyFrm *pSelfFly = pCnt->FindFlyFrm();
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < rObjs.Count() && aTmp.Count(); ++i )
{
@@ -264,7 +264,7 @@ BOOL SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwCntntFrm *pCnt,
}
else
{
- const BOOL bLowerOfSelf = pFly->IsLowerOf( pSelfFly );
+ const sal_Bool bLowerOfSelf = pFly->IsLowerOf( pSelfFly );
if ( !bLowerOfSelf && !pFly->GetFmt()->GetOpaque().GetValue() )
//Aus anderem Layer interessieren uns nur nicht transparente
//oder innenliegende
@@ -297,14 +297,14 @@ BOOL SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwCntntFrm *pCnt,
aTmp -= pFly->Frm();
}
- BOOL bRetPaint = FALSE;
+ sal_Bool bRetPaint = sal_False;
const SwRect *pData = aTmp.GetData();
for ( i = 0; i < aTmp.Count(); ++pData, ++i )
bRetPaint |= pImp->GetShell()->AddPaintRect( *pData );
return bRetPaint;
}
-inline BOOL SwLayAction::_PaintCntnt( const SwCntntFrm *pCntnt,
+inline sal_Bool SwLayAction::_PaintCntnt( const SwCntntFrm *pCntnt,
const SwPageFrm *pPage,
const SwRect &rRect )
{
@@ -315,7 +315,7 @@ inline BOOL SwLayAction::_PaintCntnt( const SwCntntFrm *pCntnt,
else
return pImp->GetShell()->AddPaintRect( rRect );
}
- return FALSE;
+ return sal_False;
}
void SwLayAction::PaintCntnt( const SwCntntFrm *pCnt,
@@ -341,7 +341,7 @@ void SwLayAction::PaintCntnt( const SwCntntFrm *pCnt,
if( bHeightDiff )
{
// OD 05.11.2002 #94454# - consider whole potential paint area.
- //SwRect aDrawRect( pCnt->UnionFrm( TRUE ) );
+ //SwRect aDrawRect( pCnt->UnionFrm( sal_True ) );
SwRect aDrawRect( pCnt->PaintArea() );
if( nOldHeight > nNewHeight )
nOldBottom = (pCnt->*fnRect->fnGetPrtBottom)();
@@ -390,9 +390,9 @@ SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewImp *pI ) :
nCheckPageNum( USHRT_MAX )
{
bPaintExtraData = ::IsExtraData( pImp->GetShell()->GetDoc() );
- bPaint = bComplete = bWaitAllowed = bCheckPages = TRUE;
+ bPaint = bComplete = bWaitAllowed = bCheckPages = sal_True;
bInput = bAgain = bNextCycle = bCalcLayout = bIdle = bReschedule =
- bUpdateExpFlds = bBrowseActionStop = bActionInProgress = FALSE;
+ bUpdateExpFlds = bBrowseActionStop = bActionInProgress = sal_False;
// OD 14.04.2003 #106346# - init new flag <mbFormatCntntOnInterrupt>.
mbFormatCntntOnInterrupt = sal_False;
@@ -419,9 +419,9 @@ void SwLayAction::Reset()
nStartTicks = Ticks();
nInputType = 0;
nEndPage = nPreInvaPage = nCheckPageNum = USHRT_MAX;
- bPaint = bComplete = bWaitAllowed = bCheckPages = TRUE;
+ bPaint = bComplete = bWaitAllowed = bCheckPages = sal_True;
bInput = bAgain = bNextCycle = bCalcLayout = bIdle = bReschedule =
- bUpdateExpFlds = bBrowseActionStop = FALSE;
+ bUpdateExpFlds = bBrowseActionStop = sal_False;
}
/*************************************************************************
@@ -433,11 +433,11 @@ void SwLayAction::Reset()
|*
|*************************************************************************/
-BOOL SwLayAction::RemoveEmptyBrowserPages()
+sal_Bool SwLayAction::RemoveEmptyBrowserPages()
{
//Beim umschalten vom normalen in den Browsermodus bleiben u.U. einige
//unangenehm lange stehen. Diese beseiten wir mal schnell.
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( pRoot->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
{
SwPageFrm *pPage = (SwPageFrm*)pRoot->Lower();
@@ -448,7 +448,7 @@ BOOL SwLayAction::RemoveEmptyBrowserPages()
pPage = (SwPageFrm*)pPage->GetNext();
else
{
- bRet = TRUE;
+ bRet = sal_True;
SwPageFrm *pDel = pPage;
pPage = (SwPageFrm*)pPage->GetNext();
pDel->Cut();
@@ -470,14 +470,14 @@ BOOL SwLayAction::RemoveEmptyBrowserPages()
|*************************************************************************/
void SwLayAction::Action()
{
- bActionInProgress = TRUE;
+ bActionInProgress = sal_True;
//TurboMode? Disqualifiziert fuer Idle-Format.
if ( IsPaint() && !IsIdle() && TurboAction() )
{
delete pWait, pWait = 0;
pRoot->ResetTurboFlag();
- bActionInProgress = FALSE;
+ bActionInProgress = sal_False;
pRoot->DeleteEmptySct();
return;
}
@@ -491,13 +491,13 @@ void SwLayAction::Action()
pRoot->DisallowTurbo();
if ( IsCalcLayout() )
- SetCheckPages( FALSE );
+ SetCheckPages( sal_False );
InternalAction();
bAgain |= RemoveEmptyBrowserPages();
while ( IsAgain() )
{
- bAgain = bNextCycle = FALSE;
+ bAgain = bNextCycle = sal_False;
InternalAction();
bAgain |= RemoveEmptyBrowserPages();
}
@@ -509,20 +509,20 @@ void SwLayAction::Action()
pRoot->ResetTurboFlag();
pRoot->ResetTurbo();
- SetCheckPages( TRUE );
+ SetCheckPages( sal_True );
- bActionInProgress = FALSE;
+ bActionInProgress = sal_False;
}
SwPageFrm* SwLayAction::CheckFirstVisPage( SwPageFrm *pPage )
{
SwCntntFrm *pCnt = pPage->FindFirstBodyCntnt();
SwCntntFrm *pChk = pCnt;
- BOOL bPageChgd = FALSE;
+ sal_Bool bPageChgd = sal_False;
while ( pCnt && pCnt->IsFollow() )
pCnt = static_cast<SwCntntFrm*>(pCnt)->FindMaster();
if ( pCnt && pChk != pCnt )
- { bPageChgd = TRUE;
+ { bPageChgd = sal_True;
pPage = pCnt->FindPageFrm();
}
@@ -609,14 +609,14 @@ void SwLayAction::InternalAction()
//Cntnt's
if ( !IsComplete() )
pPage = CheckFirstVisPage( pPage );
- USHORT nFirstPageNum = pPage->GetPhyPageNum();
+ sal_uInt16 nFirstPageNum = pPage->GetPhyPageNum();
while ( pPage && !pPage->IsInvalid() && !pPage->IsInvalidFly() )
pPage = (SwPageFrm*)pPage->GetNext();
IDocumentLayoutAccess *pLayoutAccess = pRoot->GetFmt()->getIDocumentLayoutAccess();
- BOOL bNoLoop = pPage ? SwLayouter::StartLoopControl( pRoot->GetFmt()->GetDoc(), pPage ) : FALSE;
- USHORT nPercentPageNum = 0;
+ sal_Bool bNoLoop = pPage ? SwLayouter::StartLoopControl( pRoot->GetFmt()->GetDoc(), pPage ) : sal_False;
+ sal_uInt16 nPercentPageNum = 0;
while ( (pPage && !IsInterrupt()) || nCheckPageNum != USHRT_MAX )
{
if ( !pPage && nCheckPageNum != USHRT_MAX &&
@@ -634,9 +634,9 @@ void SwLayAction::InternalAction()
}
SwPageFrm *pTmp = pPage->GetPrev() ?
(SwPageFrm*)pPage->GetPrev() : pPage;
- SetCheckPages( TRUE );
+ SetCheckPages( sal_True );
SwFrm::CheckPageDescs( pPage );
- SetCheckPages( FALSE );
+ SetCheckPages( sal_False );
nCheckPageNum = USHRT_MAX;
pPage = pTmp;
continue;
@@ -660,7 +660,7 @@ void SwLayAction::InternalAction()
pRoot->AssertFlyPages();
if ( pRoot->IsSuperfluous() )
{
- BOOL bOld = IsAgain();
+ sal_Bool bOld = IsAgain();
pRoot->RemoveSuperfluous();
bAgain = bOld;
}
@@ -711,8 +711,8 @@ void SwLayAction::InternalAction()
XCHECKPAGE;
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns_1 = 0;
- const USHORT nLoopControlMax = 20;
+ sal_uInt16 nLoopControlRuns_1 = 0;
+ const sal_uInt16 nLoopControlMax = 20;
while ( !IsNextCycle() && pPage->IsInvalidLayout() )
{
@@ -750,7 +750,7 @@ void SwLayAction::InternalAction()
pPage->InvalidateFlyCntnt();
// <--
if ( IsBrowseActionStop() )
- bInput = TRUE;
+ bInput = sal_True;
}
}
if( bNoLoop )
@@ -771,7 +771,7 @@ void SwLayAction::InternalAction()
}
if ( !IsInterrupt() )
{
- SetNextCycle( FALSE );
+ SetNextCycle( sal_False );
if ( nPreInvaPage != USHRT_MAX )
{
@@ -819,7 +819,7 @@ void SwLayAction::InternalAction()
pRoot->AssertFlyPages();
if ( pRoot->IsSuperfluous() )
{
- BOOL bOld = IsAgain();
+ sal_Bool bOld = IsAgain();
pRoot->RemoveSuperfluous();
bAgain = bOld;
}
@@ -879,8 +879,8 @@ void SwLayAction::InternalAction()
XCHECKPAGE;
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns_2 = 0;
- const USHORT nLoopControlMax = 20;
+ sal_uInt16 nLoopControlRuns_2 = 0;
+ const sal_uInt16 nLoopControlMax = 20;
// OD 14.04.2003 #106346# - special case: interrupt content formatting
// --> OD 2004-07-08 #i28701# - conditions, introduced by #106346#,
@@ -906,7 +906,7 @@ void SwLayAction::InternalAction()
// <--
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns_3 = 0;
+ sal_uInt16 nLoopControlRuns_3 = 0;
while ( pPg->IsInvalidLayout() )
{
@@ -982,13 +982,13 @@ void SwLayAction::InternalAction()
|* Letzte Aenderung MA 15. Aug. 93
|*
|*************************************************************************/
-BOOL SwLayAction::_TurboAction( const SwCntntFrm *pCnt )
+sal_Bool SwLayAction::_TurboAction( const SwCntntFrm *pCnt )
{
const SwPageFrm *pPage = 0;
if ( !pCnt->IsValid() || pCnt->IsCompletePaint() || pCnt->IsRetouche() )
{
- const SwRect aOldRect( pCnt->UnionFrm( TRUE ) );
+ const SwRect aOldRect( pCnt->UnionFrm( sal_True ) );
const long nOldBottom = pCnt->Frm().Top() + pCnt->Prt().Bottom();
pCnt->Calc();
if ( pCnt->Frm().Bottom() < aOldRect.Bottom() )
@@ -999,7 +999,7 @@ BOOL SwLayAction::_TurboAction( const SwCntntFrm *pCnt )
if ( !pCnt->GetValidLineNumFlag() && pCnt->IsTxtFrm() )
{
- const ULONG nAllLines = ((SwTxtFrm*)pCnt)->GetAllLines();
+ const sal_uLong nAllLines = ((SwTxtFrm*)pCnt)->GetAllLines();
((SwTxtFrm*)pCnt)->RecalcAllLines();
if ( nAllLines != ((SwTxtFrm*)pCnt)->GetAllLines() )
{
@@ -1017,11 +1017,11 @@ BOOL SwLayAction::_TurboAction( const SwCntntFrm *pCnt )
if ( pNxt )
pNxt->InvalidatePage();
}
- return FALSE;
+ return sal_False;
}
if ( pPage->IsInvalidLayout() || (IS_FLYS && IS_INVAFLY) )
- return FALSE;
+ return sal_False;
}
if ( !pPage )
pPage = pCnt->FindPageFrm();
@@ -1031,29 +1031,29 @@ BOOL SwLayAction::_TurboAction( const SwCntntFrm *pCnt )
!SwObjectFormatter::FormatObjsAtFrm( *(const_cast<SwCntntFrm*>(pCnt)),
*pPage, this ) )
{
- return FALSE;
+ return sal_False;
}
if ( pPage->IsInvalidCntnt() )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
-BOOL SwLayAction::TurboAction()
+sal_Bool SwLayAction::TurboAction()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( pRoot->GetTurbo() )
{
if ( !_TurboAction( pRoot->GetTurbo() ) )
{
CheckIdleEnd();
- bRet = FALSE;
+ bRet = sal_False;
}
pRoot->ResetTurbo();
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
/*************************************************************************
@@ -1123,7 +1123,7 @@ static const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBotto
if ( pCnt->GetDrawObjs() )
{
const SwSortedObjs &rObjs = *pCnt->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
const SwAnchoredObject* pObj = rObjs[i];
if ( pObj->ISA(SwFlyFrm) )
@@ -1159,7 +1159,7 @@ static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage,
{
ASSERT( _pPage->GetSortedObjs(), "FindFirstInvaObj, no Objs" )
- for ( USHORT i = 0; i < _pPage->GetSortedObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < _pPage->GetSortedObjs()->Count(); ++i )
{
const SwAnchoredObject* pObj = (*_pPage->GetSortedObjs())[i];
if ( pObj->ISA(SwFlyFrm) )
@@ -1188,10 +1188,10 @@ static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage,
}
// <--
-BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
+sal_Bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
{
- BOOL bRet = FALSE;
- const BOOL bBrowse = pRoot->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ sal_Bool bRet = sal_False;
+ const sal_Bool bBrowse = pRoot->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
//Wenn die Seite nicht Gueltig ist wird sie schnell formatiert, sonst
//gibts nix als Aerger.
@@ -1202,7 +1202,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
/// OD 15.10.2002 #103517# - format complete page
/// Thus, loop on all lowers of the page <prPage>, instead of only
/// format its first lower.
- /// NOTE: In online layout (bBrowse == TRUE) a page can contain
+ /// NOTE: In online layout (bBrowse == sal_True) a page can contain
/// a header frame and/or a footer frame beside the body frame.
prPage->Calc();
SwFrm* pPageLowerFrm = prPage->Lower();
@@ -1215,7 +1215,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
else
FormatLayout( prPage );
if ( IsAgain() )
- return FALSE;
+ return sal_False;
}
@@ -1223,7 +1223,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
if ( (prPage->Frm().Top() >= rVis.Bottom()) ||
(prPage->Frm().Left()>= rVis.Right()) )
{
- bRet = TRUE;
+ bRet = sal_True;
//Jetzt wird es ein bischen unangenehm: Der erste CntntFrm dieser Seite
//im Bodytext muss Formatiert werden, wenn er dabei die Seite
@@ -1256,7 +1256,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
}
if ( pCntnt )
{
- BOOL bTstCnt = TRUE;
+ sal_Bool bTstCnt = sal_True;
if ( bBrowse )
{
//Der Cnt davor schon nicht mehr sichtbar?
@@ -1270,7 +1270,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
(pLst->Frm().Top() >= rVis.Bottom() ||
pLst->Frm().Left()>= rVis.Right()) )
{
- bTstCnt = FALSE;
+ bTstCnt = sal_False;
}
}
@@ -1289,7 +1289,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
pSct->Calc();
pSct->SetCompletePaint();
if ( IsAgain() )
- return FALSE;
+ return sal_False;
// --> OD 2004-06-04 #i27756#
bPageChg = pCntnt->FindPageFrm() != p2ndPage &&
prPage->GetPrev();
@@ -1301,7 +1301,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
pCntnt->Calc();
pCntnt->SetCompletePaint();
if ( IsAgain() )
- return FALSE;
+ return sal_False;
// --> OD 2004-06-04 #i27756#
bPageChg = pCntnt->FindPageFrm() != p2ndPage &&
prPage->GetPrev();
@@ -1315,7 +1315,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
pTab->Calc();
pTab->SetCompletePaint();
if ( IsAgain() )
- return FALSE;
+ return sal_False;
// --> OD 2004-06-04 #i27756#
bPageChg = pCntnt->FindPageFrm() != p2ndPage &&
prPage->GetPrev();
@@ -1330,7 +1330,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
pSct->Calc();
pSct->SetCompletePaint();
if ( IsAgain() )
- return FALSE;
+ return sal_False;
// --> OD 2004-06-04 #i27756#
bPageChg = pCntnt->FindPageFrm() != p2ndPage &&
prPage->GetPrev();
@@ -1340,7 +1340,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
// --> OD 2004-06-04 #i27756#
if ( bPageChg )
{
- bRet = FALSE;
+ bRet = sal_False;
const SwPageFrm* pTmp = pCntnt->FindPageFrm();
if ( pTmp->GetPhyPageNum() < prPage->GetPhyPageNum() &&
pTmp->IsInvalid() )
@@ -1367,7 +1367,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
SwAnchoredObject* pObj = (*pObjs)[i];
if ( pObj->GetAnchorFrmContainingAnchPos() == pCntnt )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -1387,22 +1387,22 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
0 != (pObj = lcl_FindFirstInvaObj( prPage, nBottom )) &&
pObj->GetObjRect().Top() <= nBottom )
{
- return FALSE;
+ return sal_False;
}
const SwFrm* pFrm( 0L );
if ( prPage->IsInvalidLayout() &&
0 != (pFrm = lcl_FindFirstInvaLay( prPage, nBottom )) &&
pFrm->Frm().Top() <= nBottom )
{
- return FALSE;
+ return sal_False;
}
if ( (prPage->IsInvalidCntnt() || prPage->IsInvalidFlyInCnt()) &&
0 != (pFrm = lcl_FindFirstInvaCntnt( prPage, nBottom, 0 )) &&
pFrm->Frm().Top() <= nBottom )
{
- return FALSE;
+ return sal_False;
}
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -1416,14 +1416,14 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
|*
|*************************************************************************/
// OD 15.11.2002 #105155# - introduce support for vertical layout
-BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
+sal_Bool SwLayAction::FormatLayout( SwLayoutFrm *pLay, sal_Bool bAddRect )
{
ASSERT( !IsAgain(), "Ungueltige Seite beachten." );
if ( IsAgain() )
- return FALSE;
+ return sal_False;
- BOOL bChanged = FALSE;
- BOOL bAlreadyPainted = FALSE;
+ sal_Bool bChanged = sal_False;
+ sal_Bool bAlreadyPainted = sal_False;
// OD 11.11.2002 #104414# - remember frame at complete paint
SwRect aFrmAtCompletePaint;
@@ -1435,9 +1435,9 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
SwRect aOldRect( pLay->Frm() );
pLay->Calc();
if ( aOldRect != pLay->Frm() )
- bChanged = TRUE;
+ bChanged = sal_True;
- BOOL bNoPaint = FALSE;
+ sal_Bool bNoPaint = sal_False;
if ( pLay->IsPageBodyFrm() &&
pLay->Frm().Pos() == aOldRect.Pos() &&
pLay->Lower() &&
@@ -1450,7 +1450,7 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
if ( !( pLay->IsCompletePaint() &&
pLay->FindPageFrm()->FindFtnCont() ) )
{
- bNoPaint = TRUE;
+ bNoPaint = sal_True;
}
}
@@ -1500,11 +1500,11 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
if ( pLay->IsCompletePaint() )
{
pImp->GetShell()->AddPaintRect( aPaint );
- bAddRect = FALSE;
+ bAddRect = sal_False;
}
else
{
- USHORT i;
+ sal_uInt16 i;
SwRegionRects aRegion( aOldRect );
aRegion -= aPaint;
@@ -1522,7 +1522,7 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
else
{
pImp->GetShell()->AddPaintRect( aPaint );
- bAlreadyPainted = TRUE;
+ bAlreadyPainted = sal_True;
// OD 11.11.2002 #104414# - remember frame at complete paint
aFrmAtCompletePaint = pLay->Frm();
}
@@ -1585,12 +1585,12 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
}
if( bAlreadyPainted )
- bAddRect = FALSE;
+ bAddRect = sal_False;
CheckWaitCrsr();
if ( IsAgain() )
- return FALSE;
+ return sal_False;
//Jetzt noch diejenigen Lowers versorgen die LayoutFrm's sind
@@ -1598,7 +1598,7 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
return bChanged;
SwFrm *pLow = pLay->Lower();
- BOOL bTabChanged = FALSE;
+ sal_Bool bTabChanged = sal_False;
while ( pLow && pLow->GetUpper() == pLay )
{
if ( pLow->IsLayoutFrm() )
@@ -1615,7 +1615,7 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
pLow->OptCalc();
if ( IsAgain() )
- return FALSE;
+ return sal_False;
pLow = pLow->GetNext();
}
// OD 11.11.2002 #104414# - add complete frame area as paint area, if frame
@@ -1631,14 +1631,14 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
return bChanged || bTabChanged;
}
-BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
+sal_Bool SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
{
ASSERT( !IsAgain(), "Ungueltige Seite beachten." );
if ( IsAgain() )
- return FALSE;
+ return sal_False;
- BOOL bChanged = false;
- BOOL bAddRect = true;
+ sal_Bool bChanged = false;
+ sal_Bool bAddRect = true;
if ( !pFly->IsValid() || pFly->IsCompletePaint() || pFly->IsInvalid() )
{
@@ -1660,10 +1660,10 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
}
if ( IsAgain() )
- return FALSE;
+ return sal_False;
//Jetzt noch diejenigen Lowers versorgen die LayoutFrm's sind
- BOOL bTabChanged = false;
+ sal_Bool bTabChanged = false;
SwFrm *pLow = pFly->Lower();
while ( pLow )
{
@@ -1681,17 +1681,17 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
// OD 31.10.2002 #104100#
// Implement vertical layout support
-BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
+sal_Bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, sal_Bool bAddRect )
{
ASSERT( !IsAgain(), "8-) Ungueltige Seite beachten." );
if ( IsAgain() || !pTab->Lower() )
- return FALSE;
+ return sal_False;
IDocumentTimerAccess *pTimerAccess = pRoot->GetFmt()->getIDocumentTimerAccess();
pTimerAccess->BlockIdling();
- BOOL bChanged = FALSE;
- BOOL bPainted = FALSE;
+ sal_Bool bChanged = sal_False;
+ sal_Bool bPainted = sal_False;
const SwPageFrm *pOldPage = pTab->FindPageFrm();
@@ -1708,11 +1708,11 @@ BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
}
const SwRect aOldRect( pTab->Frm() );
- pTab->SetLowersFormatted( FALSE );
+ pTab->SetLowersFormatted( sal_False );
pTab->Calc();
if ( aOldRect != pTab->Frm() )
{
- bChanged = TRUE;
+ bChanged = sal_True;
}
const SwRect aPaintFrm = pTab->PaintArea();
@@ -1763,8 +1763,8 @@ BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
else if ( pTab->IsCompletePaint() )
{
pImp->GetShell()->AddPaintRect( aPaintFrm );
- bAddRect = FALSE;
- bPainted = TRUE;
+ bAddRect = sal_False;
+ bPainted = sal_True;
}
if ( pTab->IsRetouche() && !pTab->GetNext() )
@@ -1777,7 +1777,7 @@ BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
}
}
else
- bAddRect = FALSE;
+ bAddRect = sal_False;
if ( pTab->IsCompletePaint() && !pOptTab )
pOptTab = pTab;
@@ -1802,16 +1802,16 @@ BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
//Heftige Abkuerzung!
if ( pTab->IsLowersFormatted() &&
(bPainted || !pImp->GetShell()->VisArea().IsOver( pTab->Frm())) )
- return FALSE;
+ return sal_False;
//Jetzt noch die Lowers versorgen
if ( IsAgain() )
- return FALSE;
+ return sal_False;
// OD 20.10.2003 #112464# - for savety reasons:
// check page number before formatting lowers.
if ( pOldPage->GetPhyPageNum() > (pTab->FindPageFrm()->GetPhyPageNum() + 1) )
- SetNextCycle( TRUE );
+ SetNextCycle( sal_True );
// OD 20.10.2003 #112464# - format lowers, only if table frame is valid
if ( pTab->IsValid() )
@@ -1821,7 +1821,7 @@ BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
{
bChanged |= FormatLayout( (SwLayoutFrm*)pLow, bAddRect );
if ( IsAgain() )
- return FALSE;
+ return sal_False;
pLow = (SwLayoutFrm*)pLow->GetNext();
}
}
@@ -1837,28 +1837,28 @@ BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
|* Letzte Aenderung MA 16. Nov. 95
|*
|*************************************************************************/
-BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
+sal_Bool SwLayAction::FormatCntnt( const SwPageFrm *pPage )
{
const SwCntntFrm *pCntnt = pPage->ContainsCntnt();
- const BOOL bBrowse = pRoot->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bBrowse = pRoot->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
while ( pCntnt && pPage->IsAnLower( pCntnt ) )
{
//Wenn der Cntnt sich eh nicht veraendert koennen wir ein paar
//Abkuerzungen nutzen.
- const BOOL bFull = !pCntnt->IsValid() || pCntnt->IsCompletePaint() ||
+ const sal_Bool bFull = !pCntnt->IsValid() || pCntnt->IsCompletePaint() ||
pCntnt->IsRetouche() || pCntnt->GetDrawObjs();
if ( bFull )
{
//Damit wir nacher nicht suchen muessen.
- const BOOL bNxtCnt = IsCalcLayout() && !pCntnt->GetFollow();
+ const sal_Bool bNxtCnt = IsCalcLayout() && !pCntnt->GetFollow();
const SwCntntFrm *pCntntNext = bNxtCnt ? pCntnt->GetNextCntntFrm() : 0;
const SwCntntFrm *pCntntPrev = pCntnt->GetPrev() ? pCntnt->GetPrevCntntFrm() : 0;
const SwLayoutFrm*pOldUpper = pCntnt->GetUpper();
const SwTabFrm *pTab = pCntnt->FindTabFrm();
- const BOOL bInValid = !pCntnt->IsValid() || pCntnt->IsCompletePaint();
- const BOOL bOldPaint = IsPaint();
+ const sal_Bool bInValid = !pCntnt->IsValid() || pCntnt->IsCompletePaint();
+ const sal_Bool bOldPaint = IsPaint();
bPaint = bOldPaint && !(pTab && pTab == pOptTab);
_FormatCntnt( pCntnt, pPage );
// --> OD 2004-11-05 #i26945# - reset <bPaint> before format objects
@@ -1878,12 +1878,12 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
*(pCntnt->FindPageFrm()), this ) )
// <--
{
- return FALSE;
+ return sal_False;
}
if ( !pCntnt->GetValidLineNumFlag() && pCntnt->IsTxtFrm() )
{
- const ULONG nAllLines = ((SwTxtFrm*)pCntnt)->GetAllLines();
+ const sal_uLong nAllLines = ((SwTxtFrm*)pCntnt)->GetAllLines();
((SwTxtFrm*)pCntnt)->RecalcAllLines();
if ( IsPaintExtraData() && IsPaint() &&
nAllLines != ((SwTxtFrm*)pCntnt)->GetAllLines() )
@@ -1891,7 +1891,7 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
}
if ( IsAgain() )
- return FALSE;
+ return sal_False;
//Wenn Layout oder Flys wieder Invalid sind breche ich die Verarbeitung
//vorlaeufig ab - allerdings nicht fuer die BrowseView, denn dort wird
@@ -1907,11 +1907,11 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
// OD 07.05.2003 #109435# - consider interrupt formatting
( IS_FLYS && IS_INVAFLY && !mbFormatCntntOnInterrupt )
)
- return FALSE;
+ return sal_False;
}
if ( pOldUpper != pCntnt->GetUpper() )
{
- const USHORT nCurNum = pCntnt->FindPageFrm()->GetPhyPageNum();
+ const sal_uInt16 nCurNum = pCntnt->FindPageFrm()->GetPhyPageNum();
if ( nCurNum < pPage->GetPhyPageNum() )
nPreInvaPage = nCurNum;
@@ -1919,11 +1919,11 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
//fangen wir nocheinmal von vorn an damit wir nichts auslassen.
if ( !IsCalcLayout() && pPage->GetPhyPageNum() > nCurNum+1 )
{
- SetNextCycle( TRUE );
+ SetNextCycle( sal_True );
// OD 07.05.2003 #109435# - consider interrupt formatting
if ( !mbFormatCntntOnInterrupt )
{
- return FALSE;
+ return sal_False;
}
}
}
@@ -1932,7 +1932,7 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
//So werden einerseits Vorgaenger erwischt, die jetzt f?r Retouche
//verantwortlich sind, andererseits werden die Fusszeilen
//auch angefasst.
- BOOL bSetCntnt = TRUE;
+ sal_Bool bSetCntnt = sal_True;
if ( pCntntPrev )
{
if ( !pCntntPrev->IsValid() && pPage->IsAnLower( pCntntPrev ) )
@@ -1941,7 +1941,7 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
pPage->GetPhyPageNum() < pCntnt->FindPageFrm()->GetPhyPageNum() )
{
pCntnt = pCntntPrev;
- bSetCntnt = FALSE;
+ bSetCntnt = sal_False;
}
}
if ( bSetCntnt )
@@ -1958,11 +1958,11 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
!lcl_FindFirstInvaObj( pPage, nBottom )) &&
(!pPage->IsInvalidLayout() ||
!lcl_FindFirstInvaLay( pPage, nBottom )))
- SetBrowseActionStop( TRUE );
+ SetBrowseActionStop( sal_True );
// OD 14.04.2003 #106346# - consider interrupt formatting.
if ( !mbFormatCntntOnInterrupt )
{
- return FALSE;
+ return sal_False;
}
}
}
@@ -1975,7 +1975,7 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
{
if ( !pCntnt->GetValidLineNumFlag() && pCntnt->IsTxtFrm() )
{
- const ULONG nAllLines = ((SwTxtFrm*)pCntnt)->GetAllLines();
+ const sal_uLong nAllLines = ((SwTxtFrm*)pCntnt)->GetAllLines();
((SwTxtFrm*)pCntnt)->RecalcAllLines();
if ( IsPaintExtraData() && IsPaint() &&
nAllLines != ((SwTxtFrm*)pCntnt)->GetAllLines() )
@@ -1991,7 +1991,7 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
CheckIdleEnd();
// OD 14.04.2003 #106346# - consider interrupt formatting.
if ( IsInterrupt() && !mbFormatCntntOnInterrupt )
- return FALSE;
+ return sal_False;
}
if ( bBrowse && !IsIdle() && !IsCalcLayout() && !IsComplete() &&
pCntnt->Frm().Top() > pImp->GetShell()->VisArea().Bottom())
@@ -2005,11 +2005,11 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
!lcl_FindFirstInvaObj( pPage, nBottom )) &&
(!pPage->IsInvalidLayout() ||
!lcl_FindFirstInvaLay( pPage, nBottom )))
- SetBrowseActionStop( TRUE );
+ SetBrowseActionStop( sal_True );
// OD 14.04.2003 #106346# - consider interrupt formatting.
if ( !mbFormatCntntOnInterrupt )
{
- return FALSE;
+ return sal_False;
}
}
}
@@ -2024,8 +2024,8 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
|*
|* SwLayAction::_FormatCntnt()
|*
-|* Beschreibung Returnt TRUE wenn der Absatz verarbeitet wurde,
-|* FALSE wenn es nichts zu verarbeiten gab.
+|* Beschreibung Returnt sal_True wenn der Absatz verarbeitet wurde,
+|* sal_False wenn es nichts zu verarbeiten gab.
|* Ersterstellung MA 07. Dec. 92
|* Letzte Aenderung MA 11. Mar. 98
|*
@@ -2034,7 +2034,7 @@ void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt,
const SwPageFrm *pPage )
{
//wird sind hier evtl. nur angekommen, weil der Cntnt DrawObjekte haelt.
- const BOOL bDrawObjsOnly = pCntnt->IsValid() && !pCntnt->IsCompletePaint() &&
+ const sal_Bool bDrawObjsOnly = pCntnt->IsValid() && !pCntnt->IsCompletePaint() &&
!pCntnt->IsRetouche();
SWRECTFN( pCntnt )
if ( !bDrawObjsOnly && IsPaint() )
@@ -2065,13 +2065,13 @@ void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt,
|* SwLayAction::_FormatFlyCntnt()
|*
|* Beschreibung:
-|* - Returnt TRUE wenn alle Cntnts des Flys vollstaendig verarbeitet
-|* wurden. FALSE wenn vorzeitig unterbrochen wurde.
+|* - Returnt sal_True wenn alle Cntnts des Flys vollstaendig verarbeitet
+|* wurden. sal_False wenn vorzeitig unterbrochen wurde.
|* Ersterstellung MA 02. Dec. 92
|* Letzte Aenderung MA 24. Jun. 96
|*
|*************************************************************************/
-BOOL SwLayAction::_FormatFlyCntnt( const SwFlyFrm *pFly )
+sal_Bool SwLayAction::_FormatFlyCntnt( const SwFlyFrm *pFly )
{
const SwCntntFrm *pCntnt = pFly->ContainsCntnt();
@@ -2098,7 +2098,7 @@ BOOL SwLayAction::_FormatFlyCntnt( const SwFlyFrm *pFly )
if ( !pCntnt->GetValidLineNumFlag() && pCntnt->IsTxtFrm() )
{
- const ULONG nAllLines = ((SwTxtFrm*)pCntnt)->GetAllLines();
+ const sal_uLong nAllLines = ((SwTxtFrm*)pCntnt)->GetAllLines();
((SwTxtFrm*)pCntnt)->RecalcAllLines();
if ( IsPaintExtraData() && IsPaint() &&
nAllLines != ((SwTxtFrm*)pCntnt)->GetAllLines() )
@@ -2106,7 +2106,7 @@ BOOL SwLayAction::_FormatFlyCntnt( const SwFlyFrm *pFly )
}
if ( IsAgain() )
- return FALSE;
+ return sal_False;
//wenn eine Eingabe anliegt breche ich die Verarbeitung ab.
if ( !pFly->IsFlyInCntFrm() )
@@ -2114,7 +2114,7 @@ BOOL SwLayAction::_FormatFlyCntnt( const SwFlyFrm *pFly )
CheckIdleEnd();
// OD 14.04.2003 #106346# - consider interrupt formatting.
if ( IsInterrupt() && !mbFormatCntntOnInterrupt )
- return FALSE;
+ return sal_False;
}
pCntnt = pCntnt->GetNextCntntFrm();
}
@@ -2123,9 +2123,9 @@ BOOL SwLayAction::_FormatFlyCntnt( const SwFlyFrm *pFly )
return !(IsInterrupt() && !mbFormatCntntOnInterrupt);
}
-BOOL SwLayAction::IsStopPrt() const
+sal_Bool SwLayAction::IsStopPrt() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
if (pImp != NULL && pProgress != NULL)
bResult = pImp->IsStopPrt();
@@ -2141,12 +2141,12 @@ BOOL SwLayAction::IsStopPrt() const
|* Letzte Aenderung AMA 01. Feb. 96
|*
|*************************************************************************/
-BOOL SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
+sal_Bool SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
{
ASSERT( pCnt->IsTxtFrm(), "NoTxt neighbour of Txt" );
// robust against misuse by e.g. #i52542#
if( !pCnt->IsTxtFrm() )
- return FALSE;
+ return sal_False;
const SwTxtNode* pTxtNode = pCnt->GetNode()->GetTxtNode();
@@ -2187,17 +2187,17 @@ BOOL SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
SwRect aRepaint( ((SwTxtFrm*)pCnt)->_AutoSpell( pCntntNode, *pSh->GetViewOptions(), nTxtPos ) );
bPageValid = bPageValid && !pTxtNode->IsWrongDirty();
if( !bPageValid )
- bAllValid = FALSE;
+ bAllValid = sal_False;
if ( aRepaint.HasArea() )
pImp->GetShell()->InvalidateWindows( aRepaint );
if ( Application::AnyInput( INPUT_MOUSEANDKEYBOARD|INPUT_OTHER|INPUT_PAINT ) )
- return TRUE;
+ return sal_True;
break;
}
case AUTOCOMPLETE_WORDS :
((SwTxtFrm*)pCnt)->CollectAutoCmplWrds( pCntntNode, nTxtPos );
if ( Application::AnyInput( INPUT_ANY ) )
- return TRUE;
+ return sal_True;
break;
case WORD_COUNT :
{
@@ -2205,7 +2205,7 @@ BOOL SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
SwDocStat aStat;
pTxtNode->CountWords( aStat, 0, nEnd );
if ( Application::AnyInput( INPUT_ANY ) )
- return TRUE;
+ return sal_True;
break;
}
case SMART_TAGS : // SMARTTAGS
@@ -2213,11 +2213,11 @@ BOOL SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
const SwRect aRepaint( ((SwTxtFrm*)pCnt)->SmartTagScan( pCntntNode, nTxtPos ) );
bPageValid = bPageValid && !pTxtNode->IsSmartTagDirty();
if( !bPageValid )
- bAllValid = FALSE;
+ bAllValid = sal_False;
if ( aRepaint.HasArea() )
pImp->GetShell()->InvalidateWindows( aRepaint );
if ( Application::AnyInput( INPUT_MOUSEANDKEYBOARD|INPUT_OTHER|INPUT_PAINT ) )
- return TRUE;
+ return sal_True;
break;
}
}
@@ -2227,7 +2227,7 @@ BOOL SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
if ( pCnt->GetDrawObjs() )
{
const SwSortedObjs &rObjs = *pCnt->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
if ( pObj->ISA(SwFlyFrm) )
@@ -2241,7 +2241,7 @@ BOOL SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
if ( pC->IsTxtFrm() )
{
if ( _DoIdleJob( pC, eJob ) )
- return TRUE;
+ return sal_True;
}
pC = pC->GetNextCntntFrm();
}
@@ -2249,10 +2249,10 @@ BOOL SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
}
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SwLayIdle::DoIdleJob( IdleJobType eJob, BOOL bVisAreaOnly )
+sal_Bool SwLayIdle::DoIdleJob( IdleJobType eJob, sal_Bool bVisAreaOnly )
{
//Spellchecken aller Inhalte der Seiten. Entweder nur der sichtbaren
//Seiten oder eben aller.
@@ -2264,22 +2264,22 @@ BOOL SwLayIdle::DoIdleJob( IdleJobType eJob, BOOL bVisAreaOnly )
{
case ONLINE_SPELLING :
if( !pViewOptions->IsOnlineSpell() )
- return FALSE;
+ return sal_False;
break;
case AUTOCOMPLETE_WORDS :
if( !pViewOptions->IsAutoCompleteWords() ||
pDoc->GetAutoCompleteWords().IsLockWordLstLocked())
- return FALSE;
+ return sal_False;
break;
case WORD_COUNT :
if ( !pViewShell->getIDocumentStatistics()->GetDocStat().bModified )
- return FALSE;
+ return sal_False;
break;
case SMART_TAGS :
if ( pDoc->GetDocShell()->IsHelpDocument() ||
pDoc->isXForms() ||
!SwSmartTagMgr::Get().IsSmartTagsEnabled() )
- return FALSE;
+ return sal_False;
break;
default: ASSERT( false, "Unknown idle job type" )
}
@@ -2295,17 +2295,17 @@ BOOL SwLayIdle::DoIdleJob( IdleJobType eJob, BOOL bVisAreaOnly )
while ( pPage )
{
- bPageValid = TRUE;
+ bPageValid = sal_True;
const SwCntntFrm *pCnt = pPage->ContainsCntnt();
while( pCnt && pPage->IsAnLower( pCnt ) )
{
if ( _DoIdleJob( pCnt, eJob ) )
- return TRUE;
+ return sal_True;
pCnt = pCnt->GetNextCntntFrm();
}
if ( pPage->GetSortedObjs() )
{
- for ( USHORT i = 0; pPage->GetSortedObjs() &&
+ for ( sal_uInt16 i = 0; pPage->GetSortedObjs() &&
i < pPage->GetSortedObjs()->Count(); ++i )
{
const SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
@@ -2318,7 +2318,7 @@ BOOL SwLayIdle::DoIdleJob( IdleJobType eJob, BOOL bVisAreaOnly )
if ( pC->IsTxtFrm() )
{
if ( _DoIdleJob( pC, eJob ) )
- return TRUE;
+ return sal_True;
}
pC = pC->GetNextCntntFrm();
}
@@ -2342,7 +2342,7 @@ BOOL SwLayIdle::DoIdleJob( IdleJobType eJob, BOOL bVisAreaOnly )
!pPage->Frm().IsOver( pImp->GetShell()->VisArea()))
break;
}
- return FALSE;
+ return sal_False;
}
@@ -2361,7 +2361,7 @@ void SwLayIdle::ShowIdle( ColorData eColorData )
{
if ( !bIndicator )
{
- bIndicator = TRUE;
+ bIndicator = sal_True;
Window *pWin = pImp->GetShell()->GetWin();
if ( pWin )
{
@@ -2397,7 +2397,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
pImp( pI )
#ifdef DBG_UTIL
#if OSL_DEBUG_LEVEL > 1
- , bIndicator( FALSE )
+ , bIndicator( sal_False )
#endif
#endif
{
@@ -2405,13 +2405,13 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
SHOW_IDLE( COL_LIGHTRED );
- pImp->GetShell()->EnableSmooth( FALSE );
+ pImp->GetShell()->EnableSmooth( sal_False );
//Zuerst den Sichtbaren Bereich Spellchecken, nur wenn dort nichts
//zu tun war wird das IdleFormat angestossen.
- if ( !DoIdleJob( SMART_TAGS, TRUE ) &&
- !DoIdleJob( ONLINE_SPELLING, TRUE ) &&
- !DoIdleJob( AUTOCOMPLETE_WORDS, TRUE ) ) // SMARTTAGS
+ if ( !DoIdleJob( SMART_TAGS, sal_True ) &&
+ !DoIdleJob( ONLINE_SPELLING, sal_True ) &&
+ !DoIdleJob( AUTOCOMPLETE_WORDS, sal_True ) ) // SMARTTAGS
{
//Formatieren und ggf. Repaint-Rechtecke an der ViewShell vormerken.
//Dabei muessen kuenstliche Actions laufen, damit es z.B. bei
@@ -2422,11 +2422,11 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
ViewShell *pSh = pImp->GetShell();
do
{ ++pSh->nStartAction;
- BOOL bVis = FALSE;
+ sal_Bool bVis = sal_False;
if ( pSh->ISA(SwCrsrShell) )
{
#ifdef SW_CRSR_TIMER
- ((SwCrsrShell*)pSh)->ChgCrsrTimerFlag( FALSE );
+ ((SwCrsrShell*)pSh)->ChgCrsrTimerFlag( sal_False );
#endif
bVis = ((SwCrsrShell*)pSh)->GetCharRect().IsOver(pSh->VisArea());
}
@@ -2436,20 +2436,20 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
SwLayAction aAction( pRoot, pImp );
aAction.SetInputType( INPUT_ANY );
- aAction.SetIdle( TRUE );
- aAction.SetWaitAllowed( FALSE );
+ aAction.SetIdle( sal_True );
+ aAction.SetWaitAllowed( sal_False );
aAction.Action();
//Weitere Start-/EndActions nur auf wenn irgendwo Paints aufgelaufen
//sind oder wenn sich die Sichtbarkeit des CharRects veraendert hat.
- BOOL bActions = FALSE;
- USHORT nBoolIdx = 0;
+ sal_Bool bActions = sal_False;
+ sal_uInt16 nBoolIdx = 0;
do
{
--pSh->nStartAction;
if ( pSh->Imp()->GetRegion() )
- bActions = TRUE;
+ bActions = sal_True;
else
{
SwRect aTmp( pSh->VisArea() );
@@ -2481,7 +2481,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
nBoolIdx = 0;
do
{
- BOOL bCrsrShell = pSh->IsA( TYPE(SwCrsrShell) );
+ sal_Bool bCrsrShell = pSh->IsA( TYPE(SwCrsrShell) );
if ( bCrsrShell )
((SwCrsrShell*)pSh)->SttCrsrMove();
@@ -2493,20 +2493,20 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
//deren Loesung unverhaeltnissmaessig aufwendig waere.
//fix(18176):
SwViewImp *pViewImp = pSh->Imp();
- BOOL bUnlock = FALSE;
+ sal_Bool bUnlock = sal_False;
if ( pViewImp->GetRegion() )
{
pViewImp->DelRegion();
//Fuer Repaint mit virtuellem Device sorgen.
pSh->LockPaint();
- bUnlock = TRUE;
+ bUnlock = sal_True;
}
if ( bCrsrShell )
//Wenn der Crsr sichbar war wieder sichbar machen, sonst
- //EndCrsrMove mit TRUE fuer IdleEnd.
- ((SwCrsrShell*)pSh)->EndCrsrMove( TRUE^aBools[nBoolIdx] );
+ //EndCrsrMove mit sal_True fuer IdleEnd.
+ ((SwCrsrShell*)pSh)->EndCrsrMove( sal_True^aBools[nBoolIdx] );
// else
// pSh->EndAction();
if( bUnlock )
@@ -2519,11 +2519,11 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
// paint the selection! -> Set the focus flag at
// CrsrShell and it dont paint the selection.
((SwCrsrShell*)pSh)->ShLooseFcs();
- pSh->UnlockPaint( TRUE );
- ((SwCrsrShell*)pSh)->ShGetFcs( FALSE );
+ pSh->UnlockPaint( sal_True );
+ ((SwCrsrShell*)pSh)->ShGetFcs( sal_False );
}
else
- pSh->UnlockPaint( TRUE );
+ pSh->UnlockPaint( sal_True );
}
pSh = (ViewShell*)pSh->GetNext();
@@ -2534,20 +2534,20 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
if ( !aAction.IsInterrupt() )
{
- if ( !DoIdleJob( WORD_COUNT, FALSE ) )
- if ( !DoIdleJob( SMART_TAGS, FALSE ) )
- if ( !DoIdleJob( ONLINE_SPELLING, FALSE ) )
- DoIdleJob( AUTOCOMPLETE_WORDS, FALSE ); // SMARTTAGS
+ if ( !DoIdleJob( WORD_COUNT, sal_False ) )
+ if ( !DoIdleJob( SMART_TAGS, sal_False ) )
+ if ( !DoIdleJob( ONLINE_SPELLING, sal_False ) )
+ DoIdleJob( AUTOCOMPLETE_WORDS, sal_False ); // SMARTTAGS
}
bool bInValid = false;
const SwViewOption& rVOpt = *pImp->GetShell()->GetViewOptions();
const ViewShell* pViewShell = pImp->GetShell();
// See conditions in DoIdleJob()
- const BOOL bSpell = rVOpt.IsOnlineSpell();
- const BOOL bACmplWrd = rVOpt.IsAutoCompleteWords();
- const BOOL bWordCount = pViewShell->getIDocumentStatistics()->GetDocStat().bModified;
- const BOOL bSmartTags = !pViewShell->GetDoc()->GetDocShell()->IsHelpDocument() &&
+ const sal_Bool bSpell = rVOpt.IsOnlineSpell();
+ const sal_Bool bACmplWrd = rVOpt.IsAutoCompleteWords();
+ const sal_Bool bWordCount = pViewShell->getIDocumentStatistics()->GetDocStat().bModified;
+ const sal_Bool bSmartTags = !pViewShell->GetDoc()->GetDocShell()->IsHelpDocument() &&
!pViewShell->GetDoc()->isXForms() &&
SwSmartTagMgr::Get().IsSmartTagsEnabled(); // SMARTTAGS
@@ -2574,7 +2574,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
}
}
- pImp->GetShell()->EnableSmooth( TRUE );
+ pImp->GetShell()->EnableSmooth( sal_True );
if( pImp->IsAccessible() )
pImp->FireAccessibleEvents();
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index a85ee7091ff1..c8a6a5b3d5ef 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -98,18 +98,18 @@ void SwLayoutCache::Read( SvStream &rStream )
//-----------------------------------------------------------------------------
-void SwLayCacheImpl::Insert( USHORT nType, ULONG nIndex, xub_StrLen nOffset )
+void SwLayCacheImpl::Insert( sal_uInt16 nType, sal_uLong nIndex, xub_StrLen nOffset )
{
aType.Insert( nType, aType.Count() );
SvULongs::Insert( nIndex, SvULongs::Count() );
aOffset.push_back( nOffset );
}
-BOOL SwLayCacheImpl::Read( SvStream& rStream )
+sal_Bool SwLayCacheImpl::Read( SvStream& rStream )
{
- SwLayCacheIoImpl aIo( rStream, FALSE );
+ SwLayCacheIoImpl aIo( rStream, sal_False );
if( aIo.GetMajorVersion() > SW_LAYCACHE_IO_VERSION_MAJOR )
- return FALSE;
+ return sal_False;
// Due to an evil bug in the layout cache (#102759#), we cannot trust the
// sizes of fly frames which have been written using the "old" layout cache.
@@ -117,8 +117,8 @@ BOOL SwLayCacheImpl::Read( SvStream& rStream )
// height of fly frames
bUseFlyCache = aIo.GetMinorVersion() >= 1;
- BYTE cFlags;
- UINT32 nIndex, nOffset;
+ sal_uInt8 cFlags;
+ sal_uInt32 nIndex, nOffset;
aIo.OpenRec( SW_LAYCACHE_IO_REC_PAGES );
aIo.OpenFlagRec();
@@ -154,7 +154,7 @@ BOOL SwLayCacheImpl::Read( SvStream& rStream )
aIo.OpenFlagRec();
aIo.CloseFlagRec();
long nX, nY, nW, nH;
- USHORT nPgNum;
+ sal_uInt16 nPgNum;
aIo.GetStream() >> nPgNum >> nIndex
>> nX >> nY >> nW >> nH;
SwFlyCache* pFly = new SwFlyCache( nPgNum, nIndex, nX, nY, nW, nH );
@@ -188,10 +188,10 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
{
if( rDoc.GetRootFrm() ) // the layout itself ..
{
- SwLayCacheIoImpl aIo( rStream, TRUE );
+ SwLayCacheIoImpl aIo( rStream, sal_True );
// We want to save the relative index, so we need the index
// of the first content
- ULONG nStartOfContent = rDoc.GetNodes().GetEndOfContent().
+ sal_uLong nStartOfContent = rDoc.GetNodes().GetEndOfContent().
StartOfSectionNode()->GetIndex();
// The first page..
SwPageFrm* pPage = (SwPageFrm*)rDoc.GetRootFrm()->Lower();
@@ -214,12 +214,12 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
{
if( pTmp->IsTxtFrm() )
{
- ULONG nNdIdx = ((SwTxtFrm*)pTmp)->GetNode()->GetIndex();
+ sal_uLong nNdIdx = ((SwTxtFrm*)pTmp)->GetNode()->GetIndex();
if( nNdIdx > nStartOfContent )
{
/* Open Paragraph Record */
aIo.OpenRec( SW_LAYCACHE_IO_REC_PARA );
- BOOL bFollow = ((SwTxtFrm*)pTmp)->IsFollow();
+ sal_Bool bFollow = ((SwTxtFrm*)pTmp)->IsFollow();
aIo.OpenFlagRec( bFollow ? 0x01 : 0x00,
bFollow ? 8 : 4 );
nNdIdx -= nStartOfContent;
@@ -234,7 +234,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
else if( pTmp->IsTabFrm() )
{
SwTabFrm* pTab = (SwTabFrm*)pTmp;
- ULONG nOfst = STRING_LEN;
+ sal_uLong nOfst = STRING_LEN;
if( pTab->IsFollow() )
{
// If the table is a follow, we have to look for the
@@ -256,7 +256,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
}
do
{
- ULONG nNdIdx =
+ sal_uLong nNdIdx =
pTab->GetTable()->GetTableNode()->GetIndex();
if( nNdIdx > nStartOfContent )
{
@@ -306,7 +306,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
if( pPage->GetSortedObjs() )
{
SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -320,7 +320,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
if( pC )
{
sal_uInt32 nOrdNum = pAnchoredObj->GetDrawObj()->GetOrdNum();
- USHORT nPageNum = pPage->GetPhyPageNum();
+ sal_uInt16 nPageNum = pPage->GetPhyPageNum();
/* Open Fly Record */
aIo.OpenRec( SW_LAYCACHE_IO_REC_FLY );
aIo.OpenFlagRec( 0, 0 );
@@ -350,8 +350,8 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
sal_Bool bRet = sal_True;
if( pImpl && rDoc.GetRootFrm() )
{
- USHORT nIndex = 0;
- ULONG nStartOfContent = rDoc.GetNodes().GetEndOfContent().
+ sal_uInt16 nIndex = 0;
+ sal_uLong nStartOfContent = rDoc.GetNodes().GetEndOfContent().
StartOfSectionNode()->GetIndex();
SwPageFrm* pPage = (SwPageFrm*)rDoc.GetRootFrm()->Lower();
if( pPage )
@@ -372,10 +372,10 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
{
if( pTmp->IsTxtFrm() )
{
- ULONG nNdIdx = ((SwTxtFrm*)pTmp)->GetNode()->GetIndex();
+ sal_uLong nNdIdx = ((SwTxtFrm*)pTmp)->GetNode()->GetIndex();
if( nNdIdx > nStartOfContent )
{
- BOOL bFollow = ((SwTxtFrm*)pTmp)->IsFollow();
+ sal_Bool bFollow = ((SwTxtFrm*)pTmp)->IsFollow();
nNdIdx -= nStartOfContent;
if( pImpl->GetBreakIndex( nIndex ) != nNdIdx ||
SW_LAYCACHE_IO_REC_PARA !=
@@ -392,7 +392,7 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
else if( pTmp->IsTabFrm() )
{
SwTabFrm* pTab = (SwTabFrm*)pTmp;
- ULONG nOfst = STRING_LEN;
+ sal_uLong nOfst = STRING_LEN;
if( pTab->IsFollow() )
{
nOfst = 0;
@@ -411,7 +411,7 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
}
do
{
- ULONG nNdIdx =
+ sal_uLong nNdIdx =
pTab->GetTable()->GetTableNode()->GetIndex();
if( nNdIdx > nStartOfContent )
{
@@ -506,8 +506,8 @@ SwActualSection::SwActualSection( SwActualSection *pUp,
* --------------------------------------------------*/
SwLayHelper::SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg,
- SwLayoutFrm* &rpL, SwActualSection* &rpA, BOOL &rB,
- ULONG nNodeIndex, BOOL bCache )
+ SwLayoutFrm* &rpL, SwActualSection* &rpA, sal_Bool &rB,
+ sal_uLong nNodeIndex, sal_Bool bCache )
: rpFrm( rpF ), rpPrv( rpP ), rpPage( rpPg ), rpLay( rpL ),
rpActualSection( rpA ), rbBreakAfter(rB), pDoc(pD), nMaxParaPerPage( 25 ),
nParagraphCnt( bCache ? 0 : USHRT_MAX ), bFirst( bCache )
@@ -551,9 +551,9 @@ SwLayHelper::~SwLayHelper()
* otherwise it estimates the page count.
* --------------------------------------------------*/
-ULONG SwLayHelper::CalcPageCount()
+sal_uLong SwLayHelper::CalcPageCount()
{
- ULONG nPgCount;
+ sal_uLong nPgCount;
SwLayCacheImpl *pCache = pDoc->GetLayoutCache() ?
pDoc->GetLayoutCache()->LockImpl() : NULL;
if( pCache )
@@ -566,11 +566,11 @@ ULONG SwLayHelper::CalcPageCount()
nPgCount = pDoc->GetDocStat().nPage;
if ( nPgCount <= 10 ) // no page insertion for less than 10 pages
nPgCount = 0;
- ULONG nNdCount = pDoc->GetDocStat().nPara;
+ sal_uLong nNdCount = pDoc->GetDocStat().nPara;
if ( nNdCount <= 1 )
{
//Estimates the number of paragraphs.
- ULONG nTmp = pDoc->GetNodes().GetEndOfContent().GetIndex() -
+ sal_uLong nTmp = pDoc->GetNodes().GetEndOfContent().GetIndex() -
pDoc->GetNodes().GetEndOfExtras().GetIndex();
//Tables have a little overhead..
nTmp -= pDoc->GetTblFrmFmts()->Count() * 25;
@@ -586,12 +586,12 @@ ULONG SwLayHelper::CalcPageCount()
nMaxParaPerPage = nNdCount / nPgCount;
else
{
- nMaxParaPerPage = Max( ULONG(20),
- ULONG(20 + nNdCount / 1000 * 3) );
+ nMaxParaPerPage = Max( sal_uLong(20),
+ sal_uLong(20 + nNdCount / 1000 * 3) );
#ifdef PM2
- const ULONG nMax = 49;
+ const sal_uLong nMax = 49;
#else
- const ULONG nMax = 53;
+ const sal_uLong nMax = 53;
#endif
nMaxParaPerPage = Min( nMaxParaPerPage, nMax );
nPgCount = nNdCount / nMaxParaPerPage;
@@ -607,7 +607,7 @@ ULONG SwLayHelper::CalcPageCount()
/*-----------------23.5.2001 16:44------------------
* SwLayHelper::CheckInsertPage()
- * inserts a page and return TRUE, if
+ * inserts a page and return sal_True, if
* - the break after flag is set
* - the actual content wants a break before
* - the maximum count of paragraph/rows is reached
@@ -616,9 +616,9 @@ ULONG SwLayHelper::CalcPageCount()
* wants a break after.
* --------------------------------------------------*/
-BOOL SwLayHelper::CheckInsertPage()
+sal_Bool SwLayHelper::CheckInsertPage()
{
- BOOL bEnd = 0 == rpPage->GetNext();
+ sal_Bool bEnd = 0 == rpPage->GetNext();
const SwAttrSet* pAttr = rpFrm->GetAttrSet();
const SvxFmtBreakItem& rBrk = pAttr->GetBreak();
const SwFmtPageDesc& rDesc = pAttr->GetPageDesc();
@@ -630,7 +630,7 @@ BOOL SwLayHelper::CheckInsertPage()
rDesc.GetPageDesc();
// <--
- BOOL bBrk = nParagraphCnt > nMaxParaPerPage || rbBreakAfter;
+ sal_Bool bBrk = nParagraphCnt > nMaxParaPerPage || rbBreakAfter;
rbBreakAfter = rBrk.GetBreak() == SVX_BREAK_PAGE_AFTER ||
rBrk.GetBreak() == SVX_BREAK_PAGE_BOTH;
if ( !bBrk )
@@ -639,23 +639,23 @@ BOOL SwLayHelper::CheckInsertPage()
if ( bBrk || pDesc )
{
- USHORT nPgNum = 0;
+ sal_uInt16 nPgNum = 0;
if ( !pDesc )
pDesc = rpPage->GetPageDesc()->GetFollow();
else
{
if ( 0 != (nPgNum = rDesc.GetNumOffset()) )
- ((SwRootFrm*)rpPage->GetUpper())->SetVirtPageNum(TRUE);
+ ((SwRootFrm*)rpPage->GetUpper())->SetVirtPageNum(sal_True);
}
- BOOL bNextPageOdd = !rpPage->OnRightPage();
- BOOL bInsertEmpty = FALSE;
+ sal_Bool bNextPageOdd = !rpPage->OnRightPage();
+ sal_Bool bInsertEmpty = sal_False;
if( nPgNum && bNextPageOdd != ( ( nPgNum % 2 ) != 0 ) )
{
bNextPageOdd = !bNextPageOdd;
- bInsertEmpty = TRUE;
+ bInsertEmpty = sal_True;
}
::InsertNewPage( (SwPageDesc&)*pDesc, rpPage->GetUpper(),
- bNextPageOdd, bInsertEmpty, FALSE, rpPage->GetNext() );
+ bNextPageOdd, bInsertEmpty, sal_False, rpPage->GetNext() );
if ( bEnd )
{
ASSERT( rpPage->GetNext(), "Keine neue Seite?" );
@@ -676,9 +676,9 @@ BOOL SwLayHelper::CheckInsertPage()
rpLay = rpPage->FindBodyCont();
while( rpLay->Lower() )
rpLay = (SwLayoutFrm*)rpLay->Lower();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// --> OD 2006-03-22 #b6375613#
@@ -687,7 +687,7 @@ bool lcl_HasTextFrmAnchoredObjs( SwTxtFrm* p_pTxtFrm )
bool bHasTextFrmAnchoredObjs( false );
const SwSpzFrmFmts* pSpzFrmFmts = p_pTxtFrm->GetTxtNode()->GetDoc()->GetSpzFrmFmts();
- for ( USHORT i = 0; i < pSpzFrmFmts->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pSpzFrmFmts->Count(); ++i )
{
SwFrmFmt *pFmt = (SwFrmFmt*)(*pSpzFrmFmts)[i];
const SwFmtAnchor &rAnch = pFmt->GetAnchor();
@@ -755,13 +755,13 @@ void lcl_ApplyWorkaroundForB6375613( SwFrm* p_pFirstFrmOnNewPage )
* one page, in this case the needed count of pages will inserted.
* --------------------------------------------------*/
-BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
+sal_Bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
{
- BOOL bRet = FALSE;
- BOOL bLongTab = FALSE;
- ULONG nMaxRowPerPage( 0 );
+ sal_Bool bRet = sal_False;
+ sal_Bool bLongTab = sal_False;
+ sal_uLong nMaxRowPerPage( 0 );
nNodeIndex -= nStartOfContent;
- USHORT nRows( 0 );
+ sal_uInt16 nRows( 0 );
if( rpFrm->IsTabFrm() )
{
//Inside a table counts every row as a paragraph
@@ -790,15 +790,15 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
if( pTmp->GetNext() )
pTmp = pTmp->GetNext();
pTmp = ((SwRowFrm*)pTmp)->Lower();
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
do
{
++nCnt;
pTmp = pTmp->GetNext();
} while( pTmp );
- nMaxRowPerPage = Max( ULONG(2), nMaxParaPerPage / nCnt );
+ nMaxRowPerPage = Max( sal_uLong(2), nMaxParaPerPage / nCnt );
}
- bLongTab = TRUE;
+ bLongTab = sal_True;
}
}
else
@@ -808,9 +808,9 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
( pImpl->GetBreakOfst( nIndex ) < STRING_LEN ||
( ++nIndex < pImpl->Count() &&
pImpl->GetBreakIndex( nIndex ) == nNodeIndex ) ) )
- bFirst = FALSE;
+ bFirst = sal_False;
#if OSL_DEBUG_LEVEL > 1
- ULONG nBreakIndex = ( pImpl && nIndex < pImpl->Count() ) ?
+ sal_uLong nBreakIndex = ( pImpl && nIndex < pImpl->Count() ) ?
pImpl->GetBreakIndex(nIndex) : 0xffff;
(void)nBreakIndex;
#endif
@@ -819,18 +819,18 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
( rpFrm->IsTabFrm() && bLongTab )
)
{
- ULONG nRowCount = 0;
+ sal_uLong nRowCount = 0;
do
{
if( pImpl || bLongTab )
{
#if OSL_DEBUG_LEVEL > 1
- ULONG nBrkIndex = ( pImpl && nIndex < pImpl->Count() ) ?
+ sal_uLong nBrkIndex = ( pImpl && nIndex < pImpl->Count() ) ?
pImpl->GetBreakIndex(nIndex) : 0xffff;
(void)nBrkIndex;
#endif
xub_StrLen nOfst = STRING_LEN;
- USHORT nType = SW_LAYCACHE_IO_REC_PAGES;
+ sal_uInt16 nType = SW_LAYCACHE_IO_REC_PAGES;
if( bLongTab )
{
rbBreakAfter = sal_True;
@@ -853,7 +853,7 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
if( nOfst < STRING_LEN )
{
sal_Bool bSplit = sal_False;
- USHORT nRepeat( 0 );
+ sal_uInt16 nRepeat( 0 );
if( !bLongTab && rpFrm->IsTxtFrm() &&
SW_LAYCACHE_IO_REC_PARA == nType &&
nOfst<((SwTxtFrm*)rpFrm)->GetTxtNode()->GetTxt().Len() )
@@ -884,10 +884,10 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
SwFrm *pPrv;
if( nRepeat > 0 )
{
- bDontCreateObjects = TRUE; //frmtool
+ bDontCreateObjects = sal_True; //frmtool
// Insert new headlines:
- USHORT nRowIdx = 0;
+ sal_uInt16 nRowIdx = 0;
SwRowFrm* pHeadline = 0;
while( nRowIdx < nRepeat )
{
@@ -901,7 +901,7 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
++nRowIdx;
}
- bDontCreateObjects = FALSE;
+ bDontCreateObjects = sal_False;
pPrv = pHeadline;
nRows = nRows + nRepeat;
}
@@ -949,7 +949,7 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
if( rpPrv && rpPrv->IsTxtFrm() && !rpPrv->GetValidSizeFlag() )
rpPrv->Frm().Height( rpPrv->GetUpper()->Prt().Height() );
- bRet = TRUE;
+ bRet = sal_True;
rpPrv = 0;
nParagraphCnt = 0;
@@ -967,7 +967,7 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
else
{
pSct = new SwSectionFrm(
- *rpActualSection->GetSectionFrm(), FALSE );
+ *rpActualSection->GetSectionFrm(), sal_False );
rpActualSection->GetSectionFrm()->SimpleFormat();
bInit = true;
}
@@ -986,7 +986,7 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
} while( bLongTab || ( pImpl && nIndex < pImpl->Count() &&
(*pImpl)[ nIndex ] == nNodeIndex ) );
}
- bFirst = FALSE;
+ bFirst = sal_False;
return bRet;
}
@@ -1017,12 +1017,12 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
{
if( !pImpl || !pPage )
return;
- USHORT nFlyCount = pImpl->GetFlyCount();
+ sal_uInt16 nFlyCount = pImpl->GetFlyCount();
// Any text frames at the page, fly cache avaiable?
if( pPage->GetSortedObjs() && nFlyIdx < nFlyCount )
{
SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- USHORT nPgNum = pPage->GetPhyPageNum();
+ sal_uInt16 nPgNum = pPage->GetPhyPageNum();
/*
@@ -1035,7 +1035,7 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
// be used to identify the objects.
//
- for ( USHORT i = 0; i < rObjs.Count(); ++i ) // check objects
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i ) // check objects
{
SdrObject *pO = rObjs[i];
if ( pO->ISA(SwVirtFlyDrawObj) ) // a text frame?
@@ -1047,7 +1047,7 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
const SwContact *pC = (SwContact*)GetUserCall(pO);
if( pC )
{
- ULONG nOrdNum = pO->GetOrdNum(); // the Id
+ sal_uLong nOrdNum = pO->GetOrdNum(); // the Id
SwFlyCache* pFlyC;
while( nFlyIdx < nFlyCount && ( pFlyC = pImpl->
GetFlyCache(nFlyIdx) )->nPageNum < nPgNum)
@@ -1055,7 +1055,7 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
if( nFlyIdx < nFlyCount &&
pFlyC->nPageNum == nPgNum )
{
- USHORT nIdx = nFlyIdx;
+ sal_uInt16 nIdx = nFlyIdx;
while( nIdx < nFlyCount && ( pFlyC = pImpl->
GetFlyCache( nIdx ) )->nPageNum == nPgNum &&
pFlyC->nOrdNum != nOrdNum )
@@ -1089,7 +1089,7 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
// sort cached objects on this page by ordnum
std::set< const SwFlyCache*, FlyCacheCompare > aFlyCacheSet;
- USHORT nIdx = nFlyIdx;
+ sal_uInt16 nIdx = nFlyIdx;
while( nIdx < nFlyCount && ( pFlyC = pImpl->
GetFlyCache( nIdx ) )->nPageNum == nPgNum )
@@ -1100,7 +1100,7 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
// sort objects on this page by ordnum
std::set< const SdrObject*, SdrObjectCompare > aFlySet;
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pAnchoredObj->ISA(SwFlyFrm) ) // a text frame?
@@ -1160,21 +1160,21 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
* the rpPage parameter to the right page, if possible.
* --------------------------------------------------*/
-BOOL SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly )
+sal_Bool SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly )
{
if( !pFly->GetAnchorFrm() || !pFly->GetVirtDrawObj() ||
pFly->GetAnchorFrm()->FindFooterOrHeader() )
- return FALSE;
- BOOL bRet = FALSE;
+ return sal_False;
+ sal_Bool bRet = sal_False;
SwDoc* pDoc = rpPage->GetFmt()->GetDoc();
SwLayCacheImpl *pCache = pDoc->GetLayoutCache() ?
pDoc->GetLayoutCache()->LockImpl() : NULL;
if( pCache )
{
- USHORT nPgNum = rpPage->GetPhyPageNum();
- USHORT nIdx = 0;
- USHORT nCnt = pCache->GetFlyCount();
- ULONG nOrdNum = pFly->GetVirtDrawObj()->GetOrdNum();
+ sal_uInt16 nPgNum = rpPage->GetPhyPageNum();
+ sal_uInt16 nIdx = 0;
+ sal_uInt16 nCnt = pCache->GetFlyCount();
+ sal_uLong nOrdNum = pFly->GetVirtDrawObj()->GetOrdNum();
SwFlyCache* pFlyC = 0;
// skip fly frames from pages before the current page
@@ -1209,7 +1209,7 @@ BOOL SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly )
pFly->Frm().Width( pFlyC->Width() );
pFly->Frm().Height( pFlyC->Height() );
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
pDoc->GetLayoutCache()->UnlockImpl();
@@ -1219,12 +1219,12 @@ BOOL SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly )
// -----------------------------------------------------------------------------
-SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, BOOL bWrtMd ) :
+SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, sal_Bool bWrtMd ) :
pStream( &rStrm ),
nMajorVersion(SW_LAYCACHE_IO_VERSION_MAJOR),
nMinorVersion(SW_LAYCACHE_IO_VERSION_MINOR),
bWriteMode( bWrtMd ),
- bError( FALSE )
+ bError( sal_False )
{
if( bWriteMode )
*pStream << nMajorVersion
@@ -1235,23 +1235,23 @@ SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, BOOL bWrtMd ) :
>> nMinorVersion;
}
-BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
+sal_Bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType )
{
- BOOL bRes = TRUE;
+ sal_Bool bRes = sal_True;
size_t nLvl = aRecTypes.size();
ASSERT( nLvl == aRecSizes.Count(), "OpenRec: Level" );
- UINT32 nPos = pStream->Tell();
+ sal_uInt32 nPos = pStream->Tell();
if( bWriteMode )
{
aRecTypes.push_back( cType );
aRecSizes.Insert( nPos, nLvl );
- *pStream << (UINT32) 0;
+ *pStream << (sal_uInt32) 0;
}
else
{
- UINT32 nVal;
+ sal_uInt32 nVal;
*pStream >> nVal;
- BYTE cRecTyp = (BYTE)nVal;
+ sal_uInt8 cRecTyp = (sal_uInt8)nVal;
aRecTypes.push_back( cRecTyp );
sal_uInt32 nSize = nVal >> 8;
aRecSizes.Insert( nPos + nSize, nLvl );
@@ -1264,7 +1264,7 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
aRecTypes.back() = 0;
aRecSizes[nLvl] = pStream->Tell();
bRes = sal_False;
- bError = TRUE;
+ bError = sal_True;
}
}
return bRes;
@@ -1272,39 +1272,39 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
// Close record
-BOOL SwLayCacheIoImpl::CloseRec( BYTE )
+sal_Bool SwLayCacheIoImpl::CloseRec( sal_uInt8 )
{
- BOOL bRes = TRUE;
+ sal_Bool bRes = sal_True;
size_t nLvl = aRecTypes.size();
ASSERT( nLvl == aRecSizes.Count(), "CloseRec: wrong Level" );
ASSERT( nLvl, "CloseRec: no levels" );
if( nLvl )
{
nLvl--;
- UINT32 nPos = pStream->Tell();
+ sal_uInt32 nPos = pStream->Tell();
if( bWriteMode )
{
- UINT32 nBgn = aRecSizes[nLvl];
+ sal_uInt32 nBgn = aRecSizes[nLvl];
pStream->Seek( nBgn );
- UINT32 nSize = nPos - nBgn;
- UINT32 nVal = ( nSize << 8 ) | aRecTypes.back();
+ sal_uInt32 nSize = nPos - nBgn;
+ sal_uInt32 nVal = ( nSize << 8 ) | aRecTypes.back();
*pStream << nVal;
pStream->Seek( nPos );
if( pStream->GetError() != SVSTREAM_OK )
- bRes = FALSE;
+ bRes = sal_False;
}
else
{
- UINT32 n = aRecSizes[nLvl];
+ sal_uInt32 n = aRecSizes[nLvl];
ASSERT( n >= nPos, "CloseRec: to much data read" );
if( n != nPos )
{
pStream->Seek( n );
if( n < nPos )
- bRes = FALSE;
+ bRes = sal_False;
}
if( pStream->GetErrorCode() != SVSTREAM_OK )
- bRes = FALSE;
+ bRes = sal_False;
}
aRecTypes.pop_back();
@@ -1312,19 +1312,19 @@ BOOL SwLayCacheIoImpl::CloseRec( BYTE )
}
if( !bRes )
- bError = TRUE;
+ bError = sal_True;
return bRes;
}
-UINT32 SwLayCacheIoImpl::BytesLeft()
+sal_uInt32 SwLayCacheIoImpl::BytesLeft()
{
- UINT16 nLvl = aRecSizes.Count();
- UINT32 n = 0;
+ sal_uInt16 nLvl = aRecSizes.Count();
+ sal_uInt32 n = 0;
if( !bError && nLvl )
{
- UINT32 nEndPos = aRecSizes[ nLvl-1 ];
- UINT32 nPos = pStream->Tell();
+ sal_uInt32 nEndPos = aRecSizes[ nLvl-1 ];
+ sal_uInt32 nPos = pStream->Tell();
if( nEndPos > nPos )
n = nEndPos - nPos;
}
@@ -1332,18 +1332,18 @@ UINT32 SwLayCacheIoImpl::BytesLeft()
return n;
}
-BYTE SwLayCacheIoImpl::Peek()
+sal_uInt8 SwLayCacheIoImpl::Peek()
{
- BYTE c = 0;
+ sal_uInt8 c = 0;
if( !bError )
{
- UINT32 nPos = pStream->Tell();
+ sal_uInt32 nPos = pStream->Tell();
*pStream >> c;
pStream->Seek( nPos );
if( pStream->GetErrorCode() != SVSTREAM_OK )
{
c = 0;
- bError = TRUE;
+ bError = sal_True;
}
}
return c;
@@ -1351,27 +1351,27 @@ BYTE SwLayCacheIoImpl::Peek()
void SwLayCacheIoImpl::SkipRec()
{
- BYTE c = Peek();
+ sal_uInt8 c = Peek();
OpenRec( c );
pStream->Seek( aRecSizes[aRecSizes.Count()-1] );
CloseRec( c );
}
-BYTE SwLayCacheIoImpl::OpenFlagRec()
+sal_uInt8 SwLayCacheIoImpl::OpenFlagRec()
{
ASSERT( !bWriteMode, "OpenFlagRec illegal in write mode" );
- BYTE cFlags;
+ sal_uInt8 cFlags;
*pStream >> cFlags;
nFlagRecEnd = pStream->Tell() + ( cFlags & 0x0F );
return (cFlags >> 4);
}
-void SwLayCacheIoImpl::OpenFlagRec( BYTE nFlags, BYTE nLen )
+void SwLayCacheIoImpl::OpenFlagRec( sal_uInt8 nFlags, sal_uInt8 nLen )
{
ASSERT( bWriteMode, "OpenFlagRec illegal in read mode" );
ASSERT( (nFlags & 0xF0) == 0, "illegal flags set" );
ASSERT( nLen < 16, "wrong flag record length" );
- BYTE cFlags = (nFlags << 4) + nLen;
+ sal_uInt8 cFlags = (nFlags << 4) + nLen;
*pStream << cFlags;
nFlagRecEnd = pStream->Tell() + nLen;
}
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index 8eb958f5bfae..48aeefa68e1f 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -68,18 +68,18 @@ class SwLayCacheImpl : public SvULongs
SvUShorts aType;
SwPageFlyCache aFlyCache;
sal_Bool bUseFlyCache;
- void Insert( USHORT nType, ULONG nIndex, xub_StrLen nOffset );
+ void Insert( sal_uInt16 nType, sal_uLong nIndex, xub_StrLen nOffset );
public:
SwLayCacheImpl() : SvULongs( 20, 10 ), aType( 20, 10 ) {}
- BOOL Read( SvStream& rStream );
+ sal_Bool Read( SvStream& rStream );
- ULONG GetBreakIndex( USHORT nIdx ) const { return GetObject( nIdx ); }
+ sal_uLong GetBreakIndex( sal_uInt16 nIdx ) const { return GetObject( nIdx ); }
xub_StrLen GetBreakOfst( size_t nIdx ) const { return aOffset[ nIdx ]; }
- USHORT GetBreakType( USHORT nIdx ) const { return aType[ nIdx ]; }
+ sal_uInt16 GetBreakType( sal_uInt16 nIdx ) const { return aType[ nIdx ]; }
- USHORT GetFlyCount() const { return aFlyCache.Count(); }
- SwFlyCache *GetFlyCache( USHORT nIdx ) const { return aFlyCache[ nIdx ]; }
+ sal_uInt16 GetFlyCount() const { return aFlyCache.Count(); }
+ SwFlyCache *GetFlyCache( sal_uInt16 nIdx ) const { return aFlyCache[ nIdx ]; }
sal_Bool IsUseFlyCache() const { return bUseFlyCache; }
};
@@ -119,26 +119,26 @@ class SwLayHelper
SwPageFrm* &rpPage;
SwLayoutFrm* &rpLay;
SwActualSection* &rpActualSection;
- BOOL &rbBreakAfter;
+ sal_Bool &rbBreakAfter;
SwDoc* pDoc;
SwLayCacheImpl* pImpl;
- ULONG nMaxParaPerPage;
- ULONG nParagraphCnt;
- ULONG nStartOfContent;
- USHORT nIndex; // the index in the page break array
- USHORT nFlyIdx; // the index in the fly cache array
- BOOL bFirst : 1;
+ sal_uLong nMaxParaPerPage;
+ sal_uLong nParagraphCnt;
+ sal_uLong nStartOfContent;
+ sal_uInt16 nIndex; // the index in the page break array
+ sal_uInt16 nFlyIdx; // the index in the fly cache array
+ sal_Bool bFirst : 1;
void _CheckFlyCache( SwPageFrm* pPage );
public:
SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg,
- SwLayoutFrm* &rpL, SwActualSection* &rpA, BOOL &rBrk,
- ULONG nNodeIndex, BOOL bCache );
+ SwLayoutFrm* &rpL, SwActualSection* &rpA, sal_Bool &rBrk,
+ sal_uLong nNodeIndex, sal_Bool bCache );
~SwLayHelper();
- ULONG CalcPageCount();
- BOOL CheckInsert( ULONG nNodeIndex );
+ sal_uLong CalcPageCount();
+ sal_Bool CheckInsert( sal_uLong nNodeIndex );
- BOOL BreakPage( xub_StrLen& rOffs, ULONG nNodeIndex );
- BOOL CheckInsertPage();
+ sal_Bool BreakPage( xub_StrLen& rOffs, sal_uLong nNodeIndex );
+ sal_Bool CheckInsertPage();
// Look for fresh text frames at this (new) page and set them to the right
// position, if they are in the fly cache.
@@ -147,7 +147,7 @@ public:
// Look for this text frame and set it to the right position,
// if it's in the fly cache.
- static BOOL CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly );
+ static sal_Bool CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly );
};
/*************************************************************************
@@ -171,33 +171,33 @@ class SwLayCacheIoImpl
SvStream *pStream;
- ULONG nFlagRecEnd;
+ sal_uLong nFlagRecEnd;
- USHORT nMajorVersion;
- USHORT nMinorVersion;
+ sal_uInt16 nMajorVersion;
+ sal_uInt16 nMinorVersion;
- BOOL bWriteMode : 1;
- BOOL bError : 1;
+ sal_Bool bWriteMode : 1;
+ sal_Bool bError : 1;
public:
- SwLayCacheIoImpl( SvStream& rStrm, BOOL bWrtMd );
+ SwLayCacheIoImpl( SvStream& rStrm, sal_Bool bWrtMd );
// Get input or output stream
SvStream& GetStream() const { return *pStream; }
// Open a record of type "nType"
- BOOL OpenRec( BYTE nType );
+ sal_Bool OpenRec( sal_uInt8 nType );
// Close a record of type "nType". This skips any unread data that
// remains in the record.
- BOOL CloseRec( BYTE nType );
+ sal_Bool CloseRec( sal_uInt8 nType );
// Return the number of bytes contained in the current record that
// haven't been read by now.
- UINT32 BytesLeft();
+ sal_uInt32 BytesLeft();
// Return the current record's type
- BYTE Peek();
+ sal_uInt8 Peek();
// Skip the current record
void SkipRec();
@@ -205,27 +205,27 @@ public:
// Open a flag record for reading. The uppermost four bits are flags,
// while the lowermost are the flag record's size. Flag records cannot
// be nested.
- BYTE OpenFlagRec();
+ sal_uInt8 OpenFlagRec();
// Open flag record for writing;
- void OpenFlagRec( BYTE nFlags, BYTE nLen );
+ void OpenFlagRec( sal_uInt8 nFlags, sal_uInt8 nLen );
// Close a flag record. Any bytes left are skipped.
void CloseFlagRec();
- BOOL HasError() const { return bError; }
+ sal_Bool HasError() const { return bError; }
- USHORT GetMajorVersion() const { return nMajorVersion; }
- USHORT GetMinorVersion() const { return nMinorVersion; }
+ sal_uInt16 GetMajorVersion() const { return nMajorVersion; }
+ sal_uInt16 GetMinorVersion() const { return nMinorVersion; }
};
// Stored information about text frames:
class SwFlyCache : public SwRect // position and size
{
public:
- ULONG nOrdNum; // Id to recognize text frames
- USHORT nPageNum; // page number
- SwFlyCache( USHORT nP, ULONG nO, long nXL, long nYL, long nWL, long nHL ) :
+ sal_uLong nOrdNum; // Id to recognize text frames
+ sal_uInt16 nPageNum; // page number
+ SwFlyCache( sal_uInt16 nP, sal_uLong nO, long nXL, long nYL, long nWL, long nHL ) :
SwRect( nXL, nYL, nWL, nHL ), nOrdNum( nO ), nPageNum( nP ){}
};
diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx
index 036e14db3f71..17d0dd4356bc 100644
--- a/sw/source/core/layout/layouter.cxx
+++ b/sw/source/core/layout/layouter.cxx
@@ -50,10 +50,10 @@
class SwLooping
{
- USHORT nMinPage;
- USHORT nMaxPage;
- USHORT nCount;
- USHORT mnLoopControlStage;
+ sal_uInt16 nMinPage;
+ sal_uInt16 nMaxPage;
+ sal_uInt16 nCount;
+ sal_uInt16 mnLoopControlStage;
public:
SwLooping( SwPageFrm* pPage );
void Control( SwPageFrm* pPage );
@@ -74,7 +74,7 @@ public:
void CollectEndnote( SwFtnFrm* pFtn );
const SwSectionFrm* GetSect() { return pSect; }
void InsertEndnotes();
- BOOL HasEndnotes() const { return pEndArr && pEndArr->Count(); }
+ sal_Bool HasEndnotes() const { return pEndArr && pEndArr->Count(); }
};
void SwEndnoter::CollectEndnotes( SwSectionFrm* pSct )
@@ -122,7 +122,7 @@ void SwEndnoter::CollectEndnote( SwFtnFrm* pFtn )
}
else if( pEndArr )
{
- for ( USHORT i = 0; i < pEndArr->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pEndArr->Count(); ++i )
{
SwFtnFrm *pEndFtn = (SwFtnFrm*)((*pEndArr)[i]);
if( pEndFtn->GetAttr() == pFtn->GetAttr() )
@@ -179,7 +179,7 @@ void SwLooping::Control( SwPageFrm* pPage )
{
if( !pPage )
return;
- USHORT nNew = pPage->GetPhyPageNum();
+ sal_uInt16 nNew = pPage->GetPhyPageNum();
if( nNew > nMaxPage )
nMaxPage = nNew;
if( nNew < nMinPage )
@@ -200,7 +200,7 @@ void SwLooping::Control( SwPageFrm* pPage )
{
#ifdef DBG_UTIL
#if OSL_DEBUG_LEVEL > 1
- static BOOL bNoLouie = FALSE;
+ static sal_Bool bNoLouie = sal_False;
if( bNoLouie )
return;
#endif
@@ -266,7 +266,7 @@ void SwLayouter::_CollectEndnotes( SwSectionFrm* pSect )
pEndnoter->CollectEndnotes( pSect );
}
-BOOL SwLayouter::HasEndnotes() const
+sal_Bool SwLayouter::HasEndnotes() const
{
return pEndnoter->HasEndnotes();
}
@@ -283,7 +283,7 @@ void SwLayouter::InsertEndnotes( SwSectionFrm* pSect )
pEndnoter->InsertEndnotes();
}
-void SwLayouter::LoopControl( SwPageFrm* pPage, BYTE )
+void SwLayouter::LoopControl( SwPageFrm* pPage, sal_uInt8 )
{
ASSERT( pLooping, "Looping: Lost control" );
pLooping->Control( pPage );
@@ -300,12 +300,12 @@ void SwLayouter::LoopingLouieLight( const SwDoc& rDoc, const SwTxtFrm& rFrm )
}
}
-BOOL SwLayouter::StartLooping( SwPageFrm* pPage )
+sal_Bool SwLayouter::StartLooping( SwPageFrm* pPage )
{
if( pLooping )
- return FALSE;
+ return sal_False;
pLooping = new SwLooping( pPage );
- return TRUE;
+ return sal_True;
}
void SwLayouter::EndLoopControl()
@@ -322,10 +322,10 @@ void SwLayouter::CollectEndnotes( SwDoc* pDoc, SwSectionFrm* pSect )
pDoc->GetLayouter()->_CollectEndnotes( pSect );
}
-BOOL SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFtnFrm* pFtn )
+sal_Bool SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFtnFrm* pFtn )
{
if( !pDoc->GetLayouter() )
- return FALSE;
+ return sal_False;
SwLayouter *pLayouter = pDoc->GetLayouter();
if( pLayouter->pEndnoter && pLayouter->pEndnoter->GetSect() && pSect &&
( pLayouter->pEndnoter->GetSect()->IsAnFollow( pSect ) ||
@@ -333,12 +333,12 @@ BOOL SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFtnFrm* pFtn )
{
if( pFtn )
pLayouter->CollectEndnote( pFtn );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwLayouter::StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage )
+sal_Bool SwLayouter::StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage )
{
ASSERT( pDoc, "No doc, no fun" );
if( !pDoc->GetLayouter() )
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 1f9c92220bfa..512998248fe1 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -57,8 +57,8 @@
#include <viewopt.hxx>
SwLayVout *SwRootFrm::pVout = 0;
-BOOL SwRootFrm::bInPaint = FALSE;
-BOOL SwRootFrm::bNoVirDev = FALSE;
+sal_Bool SwRootFrm::bInPaint = sal_False;
+sal_Bool SwRootFrm::bNoVirDev = sal_False;
SwCache *SwFrm::pCache = 0;
@@ -321,7 +321,7 @@ void _FrmFinit()
{
#ifdef DBG_UTIL
// im Chache duerfen nur noch 0-Pointer stehen
- for( USHORT n = SwFrm::GetCachePtr()->Count(); n; )
+ for( sal_uInt16 n = SwFrm::GetCachePtr()->Count(); n; )
if( (*SwFrm::GetCachePtr())[ --n ] )
{
SwCacheObj* pObj = (*SwFrm::GetCachePtr())[ n ];
@@ -394,7 +394,7 @@ void SwRootFrm::DeRegisterShell( ViewShell *pSh )
pWaitingCurrShell = 0;
//Referenzen entfernen.
- for ( USHORT i = 0; i < pCurrShells->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pCurrShells->Count(); ++i )
{
CurrShell *pC = (*pCurrShells)[i];
if (pC->pPrev == pSh)
@@ -444,8 +444,8 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
nAccessibleShells( 0 )
{
nType = FRMC_ROOT;
- bIdleFormat = bTurboAllowed = bAssertFlyPages = bIsNewLayout = TRUE;
- bCheckSuperfluous = bBrowseWidthValid = FALSE;
+ bIdleFormat = bTurboAllowed = bAssertFlyPages = bIsNewLayout = sal_True;
+ bCheckSuperfluous = bBrowseWidthValid = sal_False;
InitCurrShells( this );
@@ -455,7 +455,7 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
const IDocumentSettingAccess *pSettingAccess = pFmt->getIDocumentSettingAccess();
pTimerAccess->StopIdling();
pLayoutAccess->SetRootFrm( this ); //Fuer das Erzeugen der Flys durch MakeFrms()
- bCallbackActionEnabled = FALSE; //vor Verlassen auf TRUE setzen!
+ bCallbackActionEnabled = sal_False; //vor Verlassen auf sal_True setzen!
SdrModel *pMd = pFmt->getIDocumentDrawModelAccess()->GetDrawModel();
@@ -472,7 +472,7 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
SwDoc* pDoc = pFmt->GetDoc();
SwNodeIndex aIndex( *pDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
- SwCntntNode *pNode = pDoc->GetNodes().GoNextSection( &aIndex, TRUE, FALSE );
+ SwCntntNode *pNode = pDoc->GetNodes().GoNextSection( &aIndex, sal_True, sal_False );
// --> FME 2005-05-25 #123067# pNode = 0 can really happen:
SwTableNode *pTblNd= pNode ? pNode->FindTableNode() : 0;
// <--
@@ -480,7 +480,7 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
//PageDesc besorgen (entweder vom FrmFmt des ersten Node oder den
//initialen.)
SwPageDesc *pDesc = 0;
- USHORT nPgNum = 1;
+ sal_uInt16 nPgNum = 1;
if ( pTblNd )
{
@@ -497,14 +497,14 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
bIsVirtPageNum = 0 != ( nPgNum = rDesc.GetNumOffset() );
}
else
- bIsVirtPageNum = FALSE;
+ bIsVirtPageNum = sal_False;
if ( !pDesc )
pDesc = (SwPageDesc*)
&const_cast<const SwDoc *>(pDoc)->GetPageDesc( 0 );
- const BOOL bOdd = !nPgNum || 0 != ( nPgNum % 2 );
+ const sal_Bool bOdd = !nPgNum || 0 != ( nPgNum % 2 );
//Eine Seite erzeugen und in das Layout stellen
- SwPageFrm *pPage = ::InsertNewPage( *pDesc, this, bOdd, FALSE, FALSE, 0 );
+ SwPageFrm *pPage = ::InsertNewPage( *pDesc, this, bOdd, sal_False, sal_False, 0 );
//Erstes Blatt im Bodytext-Bereich suchen.
SwLayoutFrm *pLay = pPage->FindBodyCont();
@@ -512,7 +512,7 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
pLay = (SwLayoutFrm*)pLay->Lower();
SwNodeIndex aTmp( *pDoc->GetNodes().GetEndOfContent().StartOfSectionNode(), 1 );
- ::_InsertCnt( pLay, pDoc, aTmp.GetIndex(), TRUE );
+ ::_InsertCnt( pLay, pDoc, aTmp.GetIndex(), sal_True );
//Noch nicht ersetzte Master aus der Liste entfernen.
RemoveMasterObjs( pDrawPage );
if( pSettingAccess->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
@@ -527,7 +527,7 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
// <---
pTimerAccess->StartIdling();
- bCallbackActionEnabled = TRUE;
+ bCallbackActionEnabled = sal_True;
ViewShell *pViewSh = GetCurrShell();
if (pViewSh)
@@ -547,7 +547,7 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
SwRootFrm::~SwRootFrm()
{
- bTurboAllowed = FALSE;
+ bTurboAllowed = sal_False;
pTurbo = 0;
if(pBlink)
pBlink->FrmDelete( this );
@@ -555,7 +555,7 @@ SwRootFrm::~SwRootFrm()
delete pDestroy;
//Referenzen entfernen.
- for ( USHORT i = 0; i < pCurrShells->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pCurrShells->Count(); ++i )
(*pCurrShells)[i]->pRoot = 0;
delete pCurrShells;
@@ -576,7 +576,7 @@ SwRootFrm::~SwRootFrm()
void SwRootFrm::RemoveMasterObjs( SdrPage *pPg )
{
//Alle Masterobjekte aus der Page entfernen. Nicht loeschen!!
- for( ULONG i = pPg ? pPg->GetObjCount() : 0; i; )
+ for( sal_uLong i = pPg ? pPg->GetObjCount() : 0; i; )
{
SdrObject* pObj = pPg->GetObj( --i );
if( pObj->ISA(SwFlyDrawObj ) )
diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx
index a8b7503c6042..36b3c186d68a 100644
--- a/sw/source/core/layout/objectformatter.cxx
+++ b/sw/source/core/layout/objectformatter.cxx
@@ -357,8 +357,8 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
// <--
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns = 0;
- const USHORT nLoopControlMax = 15;
+ sal_uInt16 nLoopControlRuns = 0;
+ const sal_uInt16 nLoopControlMax = 15;
do {
if ( mpLayAction )
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 626627a3c993..d17940a1fec3 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -136,13 +136,13 @@ void SwBodyFrm::Format( const SwBorderAttrs * )
Frm().Width( nWidth );
}
- BOOL bNoGrid = TRUE;
+ sal_Bool bNoGrid = sal_True;
if( GetUpper()->IsPageFrm() && ((SwPageFrm*)GetUpper())->HasGrid() )
{
GETGRID( ((SwPageFrm*)GetUpper()) )
if( pGrid )
{
- bNoGrid = FALSE;
+ bNoGrid = sal_False;
long nSum = pGrid->GetBaseHeight() + pGrid->GetRubyHeight();
SWRECTFN( this )
long nSize = (Frm().*fnRect->fnGetWidth)();
@@ -185,7 +185,7 @@ void SwBodyFrm::Format( const SwBorderAttrs * )
Prt().Height( Frm().Height() );
Prt().Width( Frm().Width() );
}
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
}
/*************************************************************************
@@ -204,22 +204,22 @@ SwPageFrm::SwPageFrm( SwFrmFmt *pFmt, SwPageDesc *pPgDsc ) :
// OD 2004-05-17 #i28701#
mbLayoutInProgress( false )
{
- SetDerivedVert( FALSE );
- SetDerivedR2L( FALSE );
+ SetDerivedVert( sal_False );
+ SetDerivedR2L( sal_False );
if( pDesc )
{
- bHasGrid = TRUE;
+ bHasGrid = sal_True;
GETGRID( this )
if( !pGrid )
- bHasGrid = FALSE;
+ bHasGrid = sal_False;
}
else
- bHasGrid = FALSE;
+ bHasGrid = sal_False;
SetMaxFtnHeight( pPgDsc->GetFtnInfo().GetHeight() ?
pPgDsc->GetFtnInfo().GetHeight() : LONG_MAX ),
nType = FRMC_PAGE;
- bInvalidLayout = bInvalidCntnt = bInvalidSpelling = bInvalidSmartTags = bInvalidAutoCmplWrds = bInvalidWordCount = TRUE;
- bInvalidFlyLayout = bInvalidFlyCntnt = bInvalidFlyInCnt = bFtnPage = bEndNotePage = FALSE;
+ bInvalidLayout = bInvalidCntnt = bInvalidSpelling = bInvalidSmartTags = bInvalidAutoCmplWrds = bInvalidWordCount = sal_True;
+ bInvalidFlyLayout = bInvalidFlyCntnt = bInvalidFlyInCnt = bFtnPage = bEndNotePage = sal_False;
const bool bBrowseMode = pFmt->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
if ( bBrowseMode )
@@ -237,9 +237,9 @@ SwPageFrm::SwPageFrm( SwFrmFmt *pFmt, SwPageDesc *pPgDsc ) :
//Body-Bereich erzeugen und einsetzen, aber nur wenn ich nicht gerade
//eine Leerseite bin.
SwDoc *pDoc = pFmt->GetDoc();
- if ( FALSE == (bEmptyPage = pFmt == pDoc->GetEmptyPageFmt()) )
+ if ( sal_False == (bEmptyPage = pFmt == pDoc->GetEmptyPageFmt()) )
{
- bEmptyPage = FALSE;
+ bEmptyPage = sal_False;
Calc(); //Damit die PrtArea stimmt.
SwBodyFrm *pBodyFrm = new SwBodyFrm( pDoc->GetDfltFrmFmt() );
pBodyFrm->ChgSize( Prt().SSize() );
@@ -276,7 +276,7 @@ SwPageFrm::~SwPageFrm()
//Objekte koennen (warum auch immer) auch an Seiten verankert sein,
//die vor Ihren Ankern stehen. Dann wuerde auf bereits freigegebenen
//Speicher zugegriffen.
- for ( USHORT i = 0; i < pSortedObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pSortedObjs->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pSortedObjs)[i];
pAnchoredObj->SetPageFrm( 0L );
@@ -310,10 +310,10 @@ SwPageFrm::~SwPageFrm()
}
-void SwPageFrm::CheckGrid( BOOL bInvalidate )
+void SwPageFrm::CheckGrid( sal_Bool bInvalidate )
{
- BOOL bOld = bHasGrid;
- bHasGrid = TRUE;
+ sal_Bool bOld = bHasGrid;
+ bHasGrid = sal_True;
GETGRID( this )
bHasGrid = 0 != pGrid;
if( bInvalidate || bOld != bHasGrid )
@@ -334,9 +334,9 @@ void SwPageFrm::CheckGrid( BOOL bInvalidate )
}
-void SwPageFrm::CheckDirection( BOOL bVert )
+void SwPageFrm::CheckDirection( sal_Bool bVert )
{
- UINT16 nDir =
+ sal_uInt16 nDir =
((SvxFrameDirectionItem&)GetFmt()->GetFmtAttr( RES_FRAMEDIR )).GetValue();
if( bVert )
{
@@ -394,7 +394,7 @@ void MA_FASTCALL lcl_MakeObjs( const SwSpzFrmFmts &rTbl, SwPageFrm *pPage )
//Die Formate stehen in der SpzTbl (vom Dokument).
//Flys werden angelegt, DrawObjekte werden bei der Seite angemeldet.
- for ( USHORT i = 0; i < rTbl.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rTbl.Count(); ++i )
{
SdrObject *pSdrObj;
SwFrmFmt *pFmt = rTbl[i];
@@ -414,11 +414,11 @@ void MA_FASTCALL lcl_MakeObjs( const SwSpzFrmFmts &rTbl, SwPageFrm *pPage )
}
//Wird ein Rahmen oder ein SdrObject beschrieben?
- BOOL bSdrObj = RES_DRAWFRMFMT == pFmt->Which();
+ sal_Bool bSdrObj = RES_DRAWFRMFMT == pFmt->Which();
pSdrObj = 0;
if ( bSdrObj && 0 == (pSdrObj = pFmt->FindSdrObject()) )
{
- ASSERT( FALSE, "DrawObject not found." );
+ ASSERT( sal_False, "DrawObject not found." );
pFmt->GetDoc()->DelFrmFmt( pFmt );
--i;
continue;
@@ -473,7 +473,7 @@ void MA_FASTCALL lcl_MakeObjs( const SwSpzFrmFmts &rTbl, SwPageFrm *pPage )
}
}
-void SwPageFrm::PreparePage( BOOL bFtn )
+void SwPageFrm::PreparePage( sal_Bool bFtn )
{
SetFtnPage( bFtn );
@@ -535,7 +535,7 @@ void SwPageFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
ViewShell *pSh = GetShell();
if ( pSh )
pSh->SetFirstVisPageInvalid();
- BYTE nInvFlags = 0;
+ sal_uInt8 nInvFlags = 0;
if( pNew && RES_ATTRSET_CHG == pNew->Which() )
{
@@ -543,7 +543,7 @@ void SwPageFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() );
SwAttrSetChg aOldSet( *(SwAttrSetChg*)pOld );
SwAttrSetChg aNewSet( *(SwAttrSetChg*)pNew );
- while( TRUE )
+ while( sal_True )
{
_UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
@@ -578,11 +578,11 @@ void SwPageFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
void SwPageFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
- BYTE &rInvFlags,
+ sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
- BOOL bClear = TRUE;
- const USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_Bool bClear = sal_True;
+ const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
switch( nWhich )
{
case RES_FMT_CHG:
@@ -624,7 +624,7 @@ void SwPageFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
const SwRect aOldPageFrmRect( Frm() );
if ( GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
{
- bValidSize = FALSE;
+ bValidSize = sal_False;
// OD 28.10.2002 #97265# - Don't call <SwPageFrm::MakeAll()>
// Calculation of the page is not necessary, because its size is
// is invalidated here and further invalidation is done in the
@@ -694,14 +694,14 @@ void SwPageFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
SetMaxFtnHeight( LONG_MAX );
SetColMaxFtnHeight();
//Hier wird die Seite ggf. zerstoert!
- ((SwRootFrm*)GetUpper())->RemoveFtns( 0, FALSE, TRUE );
+ ((SwRootFrm*)GetUpper())->RemoveFtns( 0, sal_False, sal_True );
break;
case RES_FRAMEDIR :
CheckDirChange();
break;
default:
- bClear = FALSE;
+ bClear = sal_False;
}
if ( bClear )
{
@@ -727,14 +727,14 @@ void SwPageFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
|*
*************************************************************************/
// erfrage vom Modify Informationen
-BOOL SwPageFrm::GetInfo( SfxPoolItem & rInfo ) const
+sal_Bool SwPageFrm::GetInfo( SfxPoolItem & rInfo ) const
{
if( RES_AUTOFMT_DOCNODE == rInfo.Which() )
{
// es gibt einen PageFrm also wird er benutzt
- return FALSE;
+ return sal_False;
}
- return TRUE; // weiter suchen
+ return sal_True; // weiter suchen
}
/*************************************************************************
@@ -842,8 +842,8 @@ SwPageDesc *SwPageFrm::FindPageDesc()
//Wenn der RootFrm seine Groesse aendert muss benachrichtigt werden.
void AdjustSizeChgNotify( SwRootFrm *pRoot )
{
- const BOOL bOld = pRoot->IsSuperfluous();
- pRoot->bCheckSuperfluous = FALSE;
+ const sal_Bool bOld = pRoot->IsSuperfluous();
+ pRoot->bCheckSuperfluous = sal_False;
ViewShell *pSh = pRoot->GetCurrShell();
if ( pSh )
{
@@ -887,7 +887,7 @@ void SwPageFrm::Cut()
if ( GetSortedObjs() )
{
for ( int i = 0; GetSortedObjs() &&
- (USHORT)i < GetSortedObjs()->Count(); ++i )
+ (sal_uInt16)i < GetSortedObjs()->Count(); ++i )
{
// --> OD 2004-06-29 #i28701#
SwAnchoredObject* pAnchoredObj = (*GetSortedObjs())[i];
@@ -1000,7 +1000,7 @@ void lcl_PrepFlyInCntRegister( SwCntntFrm *pFrm )
pFrm->Prepare( PREP_REGISTER );
if( pFrm->GetDrawObjs() )
{
- for( USHORT i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
{
// --> OD 2004-06-29 #i28701#
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
@@ -1031,7 +1031,7 @@ void SwPageFrm::PrepareRegisterChg()
}
if( GetSortedObjs() )
{
- for( USHORT i = 0; i < GetSortedObjs()->Count(); ++i )
+ for( sal_uInt16 i = 0; i < GetSortedObjs()->Count(); ++i )
{
// --> OD 2004-06-29 #i28701#
SwAnchoredObject* pAnchoredObj = (*GetSortedObjs())[i];
@@ -1062,7 +1062,7 @@ void SwPageFrm::PrepareRegisterChg()
|* Letzte Aenderung MA 18. Apr. 96
|*
|*************************************************************************/
-void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
+void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields )
{
ASSERT( pStart, "Keine Startpage." );
@@ -1081,7 +1081,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
SwRootFrm *pRoot = (SwRootFrm*)pStart->GetUpper();
SwDoc* pDoc = pStart->GetFmt()->GetDoc();
- const BOOL bFtns = 0 != pDoc->GetFtnIdxs().Count();
+ const sal_Bool bFtns = 0 != pDoc->GetFtnIdxs().Count();
SwPageFrm *pPage = pStart;
if( pPage->GetPrev() && ((SwPageFrm*)pPage->GetPrev())->IsEmptyPage() )
@@ -1090,9 +1090,9 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
{
//gewuenschten PageDesc und FrmFmt festellen.
SwPageDesc *pDesc = pPage->FindPageDesc();
- BOOL bCheckEmpty = pPage->IsEmptyPage();
- BOOL bActOdd = pPage->OnRightPage();
- BOOL bOdd = pPage->WannaRightPage();
+ sal_Bool bCheckEmpty = pPage->IsEmptyPage();
+ sal_Bool bActOdd = pPage->OnRightPage();
+ sal_Bool bOdd = pPage->WannaRightPage();
SwFrmFmt *pFmtWish = bOdd ? pDesc->GetRightFmt()
: pDesc->GetLeftFmt();
@@ -1159,7 +1159,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
pDesc = ((SwPageFrm*)pPage->GetPrev())->GetPageDesc();
SwPageFrm *pTmp = new SwPageFrm( pDoc->GetEmptyPageFmt(),pDesc);
pTmp->Paste( pRoot, pPage );
- pTmp->PreparePage( FALSE );
+ pTmp->PreparePage( sal_False );
pPage = pTmp;
}
else if ( pPage->GetPageDesc() != pDesc ) //4.
@@ -1194,7 +1194,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
#ifdef DBG_UTIL
else
{
- ASSERT( FALSE, "CheckPageDescs, missing solution" );
+ ASSERT( sal_False, "CheckPageDescs, missing solution" );
}
#endif
}
@@ -1239,7 +1239,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
//1. Keine zwei EmptyPages hintereinander.
//2. Alle PageDescs richtig?
- BOOL bEmpty = FALSE;
+ sal_Bool bEmpty = sal_False;
SwPageFrm *pPg = pStart;
while ( pPg )
{
@@ -1247,13 +1247,13 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
{
if ( bEmpty )
{
- ASSERT( FALSE, "Doppelte Leerseiten." );
+ ASSERT( sal_False, "Doppelte Leerseiten." );
break; //Einmal reicht.
}
- bEmpty = TRUE;
+ bEmpty = sal_True;
}
else
- bEmpty = FALSE;
+ bEmpty = sal_False;
//MA 21. Jun. 95: Kann zu testzwecken 'rein, ist aber bei zyklen durchaus
//moeglich: Ein paar Seiten, auf der ersten 'erste Seite' anwenden,
@@ -1276,7 +1276,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
|* Letzte Aenderung MA 27. Jul. 93
|*
|*************************************************************************/
-SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn )
+SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, sal_Bool bFtn )
{
SwRootFrm *pRoot = (SwRootFrm*)pPrevPage->GetUpper();
SwPageFrm *pSibling = (SwPageFrm*)pRoot->GetLower();
@@ -1284,8 +1284,8 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn )
pSibling = (SwPageFrm*)pPrevPage->GetNext();
//Rechte (ungerade) oder linke (gerade) Seite einfuegen?
- BOOL bNextOdd = !pPrevPage->OnRightPage();
- BOOL bWishedOdd = bNextOdd;
+ sal_Bool bNextOdd = !pPrevPage->OnRightPage();
+ sal_Bool bWishedOdd = bNextOdd;
//Welcher PageDesc gilt?
//Bei CntntFrm der aus dem Format wenn einer angegeben ist,
@@ -1296,9 +1296,9 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn )
pDesc = rDesc.GetPageDesc();
if ( rDesc.GetNumOffset() )
{
- bWishedOdd = rDesc.GetNumOffset() % 2 ? TRUE : FALSE;
+ bWishedOdd = rDesc.GetNumOffset() % 2 ? sal_True : sal_False;
//Die Gelegenheit nutzen wir um das Flag an der Root zu pflegen.
- pRoot->SetVirtPageNum( TRUE );
+ pRoot->SetVirtPageNum( sal_True );
}
}
if ( !pDesc )
@@ -1310,7 +1310,7 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn )
SwDoc *pDoc = pPrevPage->GetFmt()->GetDoc();
SwFrmFmt *pFmt;
- BOOL bCheckPages = FALSE;
+ sal_Bool bCheckPages = sal_False;
//Wenn ich kein FrmFmt fuer die Seite gefunden habe, muss ich eben eine
//Leerseite einfuegen.
if( bWishedOdd != bNextOdd )
@@ -1327,12 +1327,12 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn )
SwPageFrm *pDel = pSibling;
pSibling = (SwPageFrm*)pSibling->GetNext();
if ( pDoc->GetFtnIdxs().Count() )
- pRoot->RemoveFtns( pDel, TRUE );
+ pRoot->RemoveFtns( pDel, sal_True );
pDel->Cut();
delete pDel;
}
else
- bCheckPages = TRUE;
+ bCheckPages = sal_True;
}
pFmt = bWishedOdd ? pDesc->GetRightFmt() : pDesc->GetLeftFmt();
ASSERT( pFmt, "Descriptor without format." );
@@ -1347,23 +1347,23 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn )
SwPageFrm *pDel = pSibling;
pSibling = (SwPageFrm*)pSibling->GetNext();
if ( pDoc->GetFtnIdxs().Count() )
- pRoot->RemoveFtns( pDel, TRUE );
+ pRoot->RemoveFtns( pDel, sal_True );
pDel->Cut();
delete pDel;
}
else
- bCheckPages = TRUE;
+ bCheckPages = sal_True;
if ( pSibling )
{
if ( bCheckPages )
{
- CheckPageDescs( pSibling, FALSE );
+ CheckPageDescs( pSibling, sal_False );
ViewShell *pSh = GetShell();
SwViewImp *pImp = pSh ? pSh->Imp() : 0;
if ( pImp && pImp->IsAction() && !pImp->GetLayAction().IsCheckPages() )
{
- const USHORT nNum = pImp->GetLayAction().GetCheckPageNum();
+ const sal_uInt16 nNum = pImp->GetLayAction().GetCheckPageNum();
if ( nNum == pPrevPage->GetPhyPageNum() + 1 )
pImp->GetLayAction().SetCheckPageNumDirect(
pSibling->GetPhyPageNum() );
@@ -1415,7 +1415,7 @@ sw::sidebarwindows::SidebarPosition SwPageFrm::SidebarPosition() const
|*
|*************************************************************************/
-SwTwips SwRootFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL )
+SwTwips SwRootFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
{
if ( !bTst )
Frm().SSize().Height() += nDist;
@@ -1429,7 +1429,7 @@ SwTwips SwRootFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL )
|* Letzte Aenderung MA 05. May. 94
|*
|*************************************************************************/
-SwTwips SwRootFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL )
+SwTwips SwRootFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
{
ASSERT( nDist >= 0, "nDist < 0." );
ASSERT( nDist <= Frm().Height(), "nDist > als aktuelle Groesse." );
@@ -1462,7 +1462,7 @@ void SwRootFrm::RemoveSuperfluous()
{
if ( !IsSuperfluous() )
return;
- bCheckSuperfluous = FALSE;
+ bCheckSuperfluous = sal_False;
SwPageFrm *pPage = GetLastPage();
long nDocPos = LONG_MAX;
@@ -1481,7 +1481,7 @@ void SwRootFrm::RemoveSuperfluous()
// header/footer are supported now.
bool bOnlySuperfluosObjs = true;
SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- for ( USHORT i = 0; bOnlySuperfluosObjs && i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; bOnlySuperfluosObjs && i < rObjs.Count(); ++i )
{
// --> OD 2004-06-29 #i28701#
SwAnchoredObject* pAnchoredObj = rObjs[i];
@@ -1531,7 +1531,7 @@ void SwRootFrm::RemoveSuperfluous()
SwPageFrm *pEmpty = pPage;
pPage = (SwPageFrm*)pPage->GetPrev();
if ( GetFmt()->GetDoc()->GetFtnIdxs().Count() )
- RemoveFtns( pEmpty, TRUE );
+ RemoveFtns( pEmpty, sal_True );
pEmpty->Cut();
delete pEmpty;
nDocPos = pPage ? pPage->Frm().Top() : 0;
@@ -1563,14 +1563,14 @@ void SwRootFrm::AssertFlyPages()
{
if ( !IsAssertFlyPages() )
return;
- bAssertFlyPages = FALSE;
+ bAssertFlyPages = sal_False;
SwDoc *pDoc = GetFmt()->GetDoc();
const SwSpzFrmFmts *pTbl = pDoc->GetSpzFrmFmts();
//Auf welche Seite will der 'letzte' Fly?
- USHORT nMaxPg = 0;
- USHORT i;
+ sal_uInt16 nMaxPg = 0;
+ sal_uInt16 i;
for ( i = 0; i < pTbl->Count(); ++i )
{
@@ -1590,7 +1590,7 @@ void SwRootFrm::AssertFlyPages()
{
//Die Seiten werden ausgehend von der letzten Seite konsequent
//nach den Regeln der PageDescs weitergefuehrt.
- BOOL bOdd = pPage->GetPhyPageNum() % 2 ? TRUE : FALSE;
+ sal_Bool bOdd = pPage->GetPhyPageNum() % 2 ? sal_True : sal_False;
SwPageDesc *pDesc = pPage->GetPageDesc();
SwFrm *pSibling = pPage->GetNext();
for ( i = pPage->GetPhyPageNum(); i < nMaxPg; ++i )
@@ -1601,16 +1601,16 @@ void SwRootFrm::AssertFlyPages()
//der naechsten Seite aufgenommen!
pPage = new SwPageFrm( pDoc->GetEmptyPageFmt(), pDesc );
pPage->Paste( this, pSibling );
- pPage->PreparePage( FALSE );
- bOdd = bOdd ? FALSE : TRUE;
+ pPage->PreparePage( sal_False );
+ bOdd = bOdd ? sal_False : sal_True;
++i;
}
pPage = new
SwPageFrm( (bOdd ? pDesc->GetRightFmt() :
pDesc->GetLeftFmt()), pDesc );
pPage->Paste( this, pSibling );
- pPage->PreparePage( FALSE );
- bOdd = bOdd ? FALSE : TRUE;
+ pPage->PreparePage( sal_False );
+ bOdd = bOdd ? sal_False : sal_True;
pDesc = pDesc->GetFollow();
}
//Jetzt koennen die Endnotenseiten natuerlich wieder krumm sein;
@@ -1627,7 +1627,7 @@ void SwRootFrm::AssertFlyPages()
bOdd = pPage->OnRightPage();
if ( pPage->GetFmt() !=
(bOdd ? pTmpDesc->GetRightFmt() : pTmpDesc->GetLeftFmt()) )
- RemoveFtns( pPage, FALSE, TRUE );
+ RemoveFtns( pPage, sal_False, sal_True );
}
}
}
@@ -1653,13 +1653,13 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage )
{
pPage->GetSortedObjs();
for ( int i = 0;
- pPage->GetSortedObjs() && USHORT(i) < pPage->GetSortedObjs()->Count();
+ pPage->GetSortedObjs() && sal_uInt16(i) < pPage->GetSortedObjs()->Count();
++i)
{
// --> OD 2004-06-29 #i28701#
SwFrmFmt& rFmt = (*pPage->GetSortedObjs())[i]->GetFrmFmt();
const SwFmtAnchor &rAnch = rFmt.GetAnchor();
- const USHORT nPg = rAnch.GetPageNum();
+ const sal_uInt16 nPg = rAnch.GetPageNum();
if ((rAnch.GetAnchorId() == FLY_AT_PAGE) &&
nPg != pPage->GetPhyPageNum() )
{
@@ -1701,7 +1701,7 @@ Size SwRootFrm::ChgSize( const Size& aNewSize )
{
Frm().SSize() = aNewSize;
_InvalidatePrt();
- bFixSize = FALSE;
+ bFixSize = sal_False;
return Frm().SSize();
}
@@ -1716,17 +1716,17 @@ Size SwRootFrm::ChgSize( const Size& aNewSize )
void SwRootFrm::MakeAll()
{
if ( !bValidPos )
- { bValidPos = TRUE;
+ { bValidPos = sal_True;
aFrm.Pos().X() = aFrm.Pos().Y() = DOCUMENTBORDER;
}
if ( !bValidPrtArea )
- { bValidPrtArea = TRUE;
+ { bValidPrtArea = sal_True;
aPrt.Pos().X() = aPrt.Pos().Y() = 0;
aPrt.SSize( aFrm.SSize() );
}
if ( !bValidSize )
//SSize wird von den Seiten (Cut/Paste) eingestellt.
- bValidSize = TRUE;
+ bValidSize = sal_True;
}
/*************************************************************************
@@ -1739,7 +1739,7 @@ void SwRootFrm::MakeAll()
|*************************************************************************/
void SwRootFrm::ImplInvalidateBrowseWidth()
{
- bBrowseWidthValid = FALSE;
+ bBrowseWidthValid = sal_False;
SwFrm *pPg = Lower();
while ( pPg )
{
@@ -1775,7 +1775,7 @@ void SwRootFrm::ImplCalcBrowseWidth()
if ( !pFrm )
return;
- bBrowseWidthValid = TRUE;
+ bBrowseWidthValid = sal_True;
ViewShell *pSh = GetShell();
nBrowseWidth = pSh
? MINLAY + 2 * pSh->GetOut()->
@@ -1821,12 +1821,12 @@ void SwRootFrm::ImplCalcBrowseWidth()
}
else if ( pFrm->GetDrawObjs() )
{
- for ( USHORT i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
{
// --> OD 2004-06-29 #i28701#
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
const SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
- const BOOL bFly = pAnchoredObj->ISA(SwFlyFrm);
+ const sal_Bool bFly = pAnchoredObj->ISA(SwFlyFrm);
if ((bFly && (WEIT_WECH == pAnchoredObj->GetObjRect().Width()))
|| rFmt.GetFrmSize().GetWidthPercent())
{
@@ -1906,13 +1906,13 @@ void SwRootFrm::StartAllAction()
} while ( pSh != GetCurrShell() );
}
-void SwRootFrm::EndAllAction( BOOL bVirDev )
+void SwRootFrm::EndAllAction( sal_Bool bVirDev )
{
ViewShell *pSh = GetCurrShell();
if ( pSh )
do
{
- const BOOL bOldEndActionByVirDev = pSh->IsEndActionByVirDev();
+ const sal_Bool bOldEndActionByVirDev = pSh->IsEndActionByVirDev();
pSh->SetEndActionByVirDev( bVirDev );
if ( pSh->ISA( SwCrsrShell ) )
{
@@ -1941,9 +1941,9 @@ void SwRootFrm::UnoRemoveAllActions()
if ( !pSh->IsInEndAction() )
{
DBG_ASSERT(!pSh->GetRestoreActions(), "Restore action count is already set!");
- BOOL bCrsr = pSh->ISA( SwCrsrShell );
- BOOL bFE = pSh->ISA( SwFEShell );
- USHORT nRestore = 0;
+ sal_Bool bCrsr = pSh->ISA( SwCrsrShell );
+ sal_Bool bFE = pSh->ISA( SwFEShell );
+ sal_uInt16 nRestore = 0;
while( pSh->ActionCount() )
{
if( bCrsr )
@@ -1960,7 +1960,7 @@ void SwRootFrm::UnoRemoveAllActions()
pSh->SetRestoreActions(nRestore);
}
// <--
- pSh->LockView(TRUE);
+ pSh->LockView(sal_True);
pSh = (ViewShell*)pSh->GetNext();
} while ( pSh != GetCurrShell() );
@@ -1972,7 +1972,7 @@ void SwRootFrm::UnoRestoreAllActions()
if ( pSh )
do
{
- USHORT nActions = pSh->GetRestoreActions();
+ sal_uInt16 nActions = pSh->GetRestoreActions();
while( nActions-- )
{
if ( pSh->ISA( SwCrsrShell ) )
@@ -1981,7 +1981,7 @@ void SwRootFrm::UnoRestoreAllActions()
pSh->StartAction();
}
pSh->SetRestoreActions(0);
- pSh->LockView(FALSE);
+ pSh->LockView(sal_False);
pSh = (ViewShell*)pSh->GetNext();
} while ( pSh != GetCurrShell() );
@@ -2000,7 +2000,7 @@ void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point& rOffset )
else
pSortedObj = pFrm->GetDrawObjs();
- for ( USHORT i = 0; pSortedObj && i < pSortedObj->Count(); ++i)
+ for ( sal_uInt16 i = 0; pSortedObj && i < pSortedObj->Count(); ++i)
{
SwAnchoredObject* pAnchoredObj = (*pSortedObj)[i];
@@ -2128,7 +2128,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
{
ASSERT( pViewOpt, "CheckViewLayout required ViewOptions" )
- const USHORT nColumns = pViewOpt->GetViewLayoutColumns();
+ const sal_uInt16 nColumns = pViewOpt->GetViewLayoutColumns();
const bool bBookMode = pViewOpt->IsViewLayoutBookMode();
if ( nColumns == mnColumns && bBookMode == mbBookMode && pVisArea->Width() == mnViewWidth && !mbSidebarChanged )
@@ -2148,8 +2148,8 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
Calc();
- const BOOL bOldCallbackActionEnabled = IsCallbackActionEnabled();
- SetCallbackActionEnabled( FALSE );
+ const sal_Bool bOldCallbackActionEnabled = IsCallbackActionEnabled();
+ SetCallbackActionEnabled( sal_False );
maPageRects.clear();
@@ -2175,7 +2175,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
SwTwips nMinPageLeft = TWIPS_MAX;
SwTwips nMaxPageRight = 0;
SwPageFrm* pStartOfRow = pPageFrm;
- USHORT nNumberOfPagesInRow = mbBookMode ? 1 : 0; // in book view, start with right page
+ sal_uInt16 nNumberOfPagesInRow = mbBookMode ? 1 : 0; // in book view, start with right page
bool bFirstRow = true;
bool bPageChanged = false;
@@ -2254,8 +2254,8 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
pLastPageInCurrentRow = static_cast<const SwPageFrm*>(pLastPageInCurrentRow->GetPrev());
// check how many times the last page would still fit into the remaining space:
- USHORT nNumberOfVirtualPages = 0;
- const USHORT nMaxNumberOfVirtualPages = mnColumns > 0 ? mnColumns - nNumberOfPagesInRow : USHRT_MAX;
+ sal_uInt16 nNumberOfVirtualPages = 0;
+ const sal_uInt16 nMaxNumberOfVirtualPages = mnColumns > 0 ? mnColumns - nNumberOfPagesInRow : USHRT_MAX;
SwTwips nRemain = nWidthRemain;
SwTwips nVirtualPagesWidth = 0;
SwTwips nLastPageWidth = pLastPageInCurrentRow->Frm().Width() + nSidebarWidth;
@@ -2454,7 +2454,7 @@ bool SwRootFrm::IsLeftToRightViewLayout() const
// <--
}
-/*const SwRect SwRootFrm::GetExtendedPageArea( USHORT nPageNumber ) const
+/*const SwRect SwRootFrm::GetExtendedPageArea( sal_uInt16 nPageNumber ) const
{
SwRect aRet;
ASSERT( nPageNumber < maPageRects.size(), "No extended page area available" )
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index b838c8163837..71eaebf14893 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -72,7 +72,7 @@ SwPageDesc::SwPageDesc( const String& rName, SwFrmFmt *pFmt, SwDoc *pDc ) :
nRegHeight( 0 ),
nRegAscent( 0 ),
eUse( (UseOnPage)(nsUseOnPage::PD_ALL | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE) ),
- bLandscape( FALSE ),
+ bLandscape( sal_False ),
aFtnInfo()
{
}
@@ -174,16 +174,16 @@ void SwPageDesc::ResetAllAttr( sal_Bool bLeft )
// erfrage vom Modify Informationen
-BOOL SwPageDesc::GetInfo( SfxPoolItem & rInfo ) const
+sal_Bool SwPageDesc::GetInfo( SfxPoolItem & rInfo ) const
{
// if( RES_AUTOFMT_DOCNODE == rInfo.Which() )
// {
// dann weiter zum Format
if( !aMaster.GetInfo( rInfo ) )
- return FALSE; // gefunden
+ return sal_False; // gefunden
return aLeft.GetInfo( rInfo );
// }
-// return TRUE; // weiter suchen
+// return sal_True; // weiter suchen
}
/*************************************************************************
@@ -290,7 +290,7 @@ void SwPageDesc::RegisterChange()
void SwPageDesc::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
- const USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
SwModify::Modify( pOld, pNew );
if ( (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich)
@@ -303,7 +303,7 @@ void SwPageDesc::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
static const SwFrm* lcl_GetFrmOfNode( const SwNode& rNd )
{
SwModify* pMod;
- USHORT nFrmType = FRM_CNTNT;
+ sal_uInt16 nFrmType = FRM_CNTNT;
if( rNd.IsCntntNode() )
{
@@ -318,7 +318,7 @@ static const SwFrm* lcl_GetFrmOfNode( const SwNode& rNd )
pMod = 0;
Point aNullPt;
- return pMod ? ::GetFrmOfModify( *pMod, nFrmType, &aNullPt, 0, FALSE )
+ return pMod ? ::GetFrmOfModify( *pMod, nFrmType, &aNullPt, 0, sal_False )
: 0;
}
@@ -332,7 +332,7 @@ const SwPageDesc* SwPageDesc::GetPageDescOfNode(const SwNode& rNd)
}
const SwFrmFmt* SwPageDesc::GetPageFmtOfNode( const SwNode& rNd,
- BOOL bCheckForThisPgDc ) const
+ sal_Bool bCheckForThisPgDc ) const
{
// welches PageDescFormat ist fuer diesen Node gueltig?
const SwFrmFmt* pRet;
@@ -358,9 +358,9 @@ const SwFrmFmt* SwPageDesc::GetPageFmtOfNode( const SwNode& rNd,
return pRet;
}
-BOOL SwPageDesc::IsFollowNextPageOfNode( const SwNode& rNd ) const
+sal_Bool SwPageDesc::IsFollowNextPageOfNode( const SwNode& rNd ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( GetFollow() && this != GetFollow() )
{
const SwFrm* pChkFrm = lcl_GetFrmOfNode( rNd );
@@ -369,7 +369,7 @@ BOOL SwPageDesc::IsFollowNextPageOfNode( const SwNode& rNd ) const
( !pChkFrm->GetNext() || GetFollow() ==
((SwPageFrm*)pChkFrm->GetNext())->GetPageDesc() ))
// die Seite gefunden, auf die der Follow verweist
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -445,7 +445,7 @@ SwPageFtnInfo &SwPageFtnInfo::operator=( const SwPageFtnInfo& rCpy )
-BOOL SwPageFtnInfo::operator==( const SwPageFtnInfo& rCmp ) const
+sal_Bool SwPageFtnInfo::operator==( const SwPageFtnInfo& rCmp ) const
{
return ( nMaxHeight == rCmp.GetHeight() &&
nLineWidth == rCmp.nLineWidth &&
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 6a6b0b9c9a0c..fa767ec36958 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -148,43 +148,43 @@ class SwLineRect : public SwRect
{
const Color *pColor;
const SwTabFrm *pTab;
- BYTE nSubColor; //Hilfslinien einfaerben
- BOOL bPainted; //schon gepaintet?
- BYTE nLock; //Um die Linien zum Hell-Layer abzugrenzen.
+ sal_uInt8 nSubColor; //Hilfslinien einfaerben
+ sal_Bool bPainted; //schon gepaintet?
+ sal_uInt8 nLock; //Um die Linien zum Hell-Layer abzugrenzen.
public:
SwLineRect( const SwRect &rRect, const Color *pCol,
- const SwTabFrm *pT , const BYTE nSCol );
+ const SwTabFrm *pT , const sal_uInt8 nSCol );
const Color *GetColor() const { return pColor;}
const SwTabFrm *GetTab() const { return pTab; }
- void SetPainted() { bPainted = TRUE; }
- void Lock( BOOL bLock ) { if ( bLock )
+ void SetPainted() { bPainted = sal_True; }
+ void Lock( sal_Bool bLock ) { if ( bLock )
++nLock;
else if ( nLock )
--nLock;
}
- BOOL IsPainted() const { return bPainted; }
- BOOL IsLocked() const { return nLock != 0; }
- BYTE GetSubColor() const { return nSubColor;}
+ sal_Bool IsPainted() const { return bPainted; }
+ sal_Bool IsLocked() const { return nLock != 0; }
+ sal_uInt8 GetSubColor() const { return nSubColor;}
- BOOL MakeUnion( const SwRect &rRect );
+ sal_Bool MakeUnion( const SwRect &rRect );
};
SV_DECL_VARARR( SwLRects, SwLineRect, 100, 100 )
class SwLineRects : public SwLRects
{
- USHORT nLastCount; //unuetze Durchlaeufe im PaintLines verhindern.
+ sal_uInt16 nLastCount; //unuetze Durchlaeufe im PaintLines verhindern.
public:
SwLineRects() : nLastCount( 0 ) {}
void AddLineRect( const SwRect& rRect, const Color *pColor,
- const SwTabFrm *pTab, const BYTE nSCol );
+ const SwTabFrm *pTab, const sal_uInt8 nSCol );
void ConnectEdges( OutputDevice *pOut );
void PaintLines ( OutputDevice *pOut );
- void LockLines( BOOL bLock );
+ void LockLines( sal_Bool bLock );
/// OD 13.08.2002 - correct type of function
- USHORT Free() const { return nFree; }
+ sal_uInt16 Free() const { return nFree; }
};
class SwSubsRects : public SwLineRects
@@ -193,7 +193,7 @@ class SwSubsRects : public SwLineRects
public:
void PaintSubsidiary( OutputDevice *pOut, const SwLineRects *pRects );
- inline void Ins( const SwRect &rRect, const BYTE nSCol );
+ inline void Ins( const SwRect &rRect, const sal_uInt8 nSCol );
};
//----------------- End Klassen Umrandungen ----------------------
@@ -202,11 +202,11 @@ static ViewShell *pGlobalShell = 0;
//Wenn durchsichtige FlyInCnts im PaintBackground gepainted werden so soll der
//Hintergrund nicht mehr retouchiert werden.
-//static BOOL bLockFlyBackground = FALSE;
+//static sal_Bool bLockFlyBackground = sal_False;
//Wenn vom Fly ein Metafile abgezogen wird, so soll nur der FlyInhalt und vor
//nur hintergrund vom FlyInhalt gepaintet werden.
-static BOOL bFlyMetafile = FALSE;
+static sal_Bool bFlyMetafile = sal_False;
static OutputDevice *pFlyMetafileOut = 0;
//Die Retouche fuer Durchsichtige Flys wird vom Hintergrund der Flys
@@ -233,7 +233,7 @@ static double aEdgeScale = 0.5;
//In pSubsLines werden Hilfslinien gesammelt und zusammengefasst. Diese
//werden vor der Ausgabe mit pLines abgeglichen, so dass moeglichst keine
//Umrandungen von den Hilfslinen verdeckt werden.
-//bTablines ist waerend des Paints einer Tabelle TRUE.
+//bTablines ist waerend des Paints einer Tabelle sal_True.
static SwLineRects *pLines = 0;
static SwSubsRects *pSubsLines = 0;
// OD 18.11.2002 #99672# - global variable for sub-lines of body, header, footer,
@@ -245,7 +245,7 @@ static SfxProgress *pProgress = 0;
static SwFlyFrm *pFlyOnlyDraw = 0;
//Damit die Flys auch fuer den Hack richtig gepaintet werden koennen.
-static BOOL bTableHack = FALSE;
+static sal_Bool bTableHack = sal_False;
//Um das teure Ermitteln der RetoucheColor zu optimieren
Color aGlobalRetoucheColor;
@@ -310,7 +310,7 @@ void SwCalcPixStatics( OutputDevice *pOut )
//Zum Sichern der statics, damit das Paint (quasi) reentrant wird.
class SwSavePaintStatics
{
- BOOL bSFlyMetafile,
+ sal_Bool bSFlyMetafile,
bSPageOnly;
ViewShell *pSGlobalShell;
OutputDevice *pSFlyMetafileOut;
@@ -360,7 +360,7 @@ SwSavePaintStatics::SwSavePaintStatics() :
aSScaleX ( aScaleX ),
aSScaleY ( aScaleY )
{
- bFlyMetafile = FALSE;
+ bFlyMetafile = sal_False;
pFlyMetafileOut = 0;
pRetoucheFly = 0;
pRetoucheFly2 = 0;
@@ -409,17 +409,17 @@ SV_IMPL_VARARR( SwLRects, SwLineRect );
SwLineRect::SwLineRect( const SwRect &rRect, const Color *pCol,
- const SwTabFrm *pT, const BYTE nSCol ) :
+ const SwTabFrm *pT, const sal_uInt8 nSCol ) :
SwRect( rRect ),
pColor( pCol ),
pTab( pT ),
nSubColor( nSCol ),
- bPainted( FALSE ),
+ bPainted( sal_False ),
nLock( 0 )
{
}
-BOOL SwLineRect::MakeUnion( const SwRect &rRect )
+sal_Bool SwLineRect::MakeUnion( const SwRect &rRect )
{
//Es wurde bereits ausserhalb geprueft, ob die Rechtecke die gleiche
//Ausrichtung (horizontal bzw. vertikal), Farbe usw. besitzen.
@@ -434,7 +434,7 @@ BOOL SwLineRect::MakeUnion( const SwRect &rRect )
{
Bottom( Max( Bottom(), rRect.Bottom() ) );
Top ( Min( Top(), rRect.Top() ) );
- return TRUE;
+ return sal_True;
}
}
}
@@ -449,19 +449,19 @@ BOOL SwLineRect::MakeUnion( const SwRect &rRect )
{
Right( Max( Right(), rRect.Right() ) );
Left ( Min( Left(), rRect.Left() ) );
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol,
- const SwTabFrm *pTab, const BYTE nSCol )
+ const SwTabFrm *pTab, const sal_uInt8 nSCol )
{
//Rueckwaerts durch, weil Linien die zusammengefasst werden koennen i.d.R.
//im gleichen Kontext gepaintet werden.
- for ( USHORT i = Count(); i ; )
+ for ( sal_uInt16 i = Count(); i ; )
{
SwLineRect &rLRect = operator[](--i);
//Pruefen von Ausrichtung, Farbe, Tabelle.
@@ -493,13 +493,13 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
for ( int i = 0; i < (int)Count(); ++i )
{
- SwLineRect &rL1 = operator[](USHORT(i));
+ SwLineRect &rL1 = operator[](sal_uInt16(i));
if ( !rL1.GetTab() || rL1.IsPainted() || rL1.IsLocked() )
continue;
aCheck.Remove( 0, aCheck.Count() );
- const BOOL bVert = rL1.Height() > rL1.Width();
+ const sal_Bool bVert = rL1.Height() > rL1.Width();
long nL1a, nL1b, nL1c, nL1d;
if ( bVert )
@@ -514,7 +514,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
}
//Alle moeglicherweise mit i1 zu verbindenden Linien einsammeln.
- for ( USHORT i2 = 0; i2 < Count(); ++i2 )
+ for ( sal_uInt16 i2 = 0; i2 < Count(); ++i2 )
{
SwLineRect &rL2 = operator[](i2);
if ( rL2.GetTab() != rL1.GetTab() ||
@@ -547,14 +547,14 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
if ( aCheck.Count() < 2 )
continue;
- BOOL bRemove = FALSE;
+ sal_Bool bRemove = sal_False;
//Fuer jede Linie jede alle folgenden checken.
- for ( USHORT k = 0; !bRemove && k < aCheck.Count(); ++k )
+ for ( sal_uInt16 k = 0; !bRemove && k < aCheck.Count(); ++k )
{
SwLineRect &rR1 = (SwLineRect&)*(SwLineRect*)aCheck[k];
- for ( USHORT k2 = k+1; !bRemove && k2 < aCheck.Count(); ++k2 )
+ for ( sal_uInt16 k2 = k+1; !bRemove && k2 < aCheck.Count(); ++k2 )
{
SwLineRect &rR2 = (SwLineRect&)*(SwLineRect*)aCheck[k2];
if ( bVert )
@@ -581,7 +581,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
aIns.Bottom( pLA->Bottom() );
if ( !rL1.IsInside( aIns ) )
continue;
- const USHORT nTmpFree = Free();
+ const sal_uInt16 nTmpFree = Free();
Insert( SwLineRect( aIns, rL1.GetColor(),
rL1.GetTab(), SUBCOL_TAB ), Count() );
if ( !nTmpFree )
@@ -595,7 +595,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
if ( rL1.Bottom() > pLB->Bottom() )
rL1.Top( pLB->Top() ); //i1 nach oben verlaengern
else
- bRemove = TRUE; //abbrechen, i1 entfernen
+ bRemove = sal_True; //abbrechen, i1 entfernen
}
}
else
@@ -622,7 +622,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
aIns.Right( pLA->Right() );
if ( !rL1.IsInside( aIns ) )
continue;
- const USHORT nTmpFree = Free();
+ const sal_uInt16 nTmpFree = Free();
Insert( SwLineRect( aIns, rL1.GetColor(),
rL1.GetTab(), SUBCOL_TAB ), Count() );
if ( !nTmpFree )
@@ -635,20 +635,20 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
if ( rL1.Right() > pLB->Right() )
rL1.Left( pLB->Left() );
else
- bRemove = TRUE;
+ bRemove = sal_True;
}
}
}
}
if ( bRemove )
{
- Remove( static_cast<USHORT>(i), 1 );
+ Remove( static_cast<sal_uInt16>(i), 1 );
--i; //keinen auslassen!
}
}
}
-inline void SwSubsRects::Ins( const SwRect &rRect, const BYTE nSCol )
+inline void SwSubsRects::Ins( const SwRect &rRect, const sal_uInt8 nSCol )
{
//Linien die kuerzer als die breiteste Linienbreite sind werden
//nicht aufgenommen.
@@ -660,7 +660,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
{
//Alle Hilfslinien, die sich mit irgendwelchen Umrandungen decken werden
//entfernt bzw. zerstueckelt..
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
// OD 18.11.2002 #99672# - get a copy instead of a reference, because
// an <insert> may destroy the object due to a necessary array resize.
@@ -684,7 +684,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
aSubsRect.Top ( aSubsRect.Top() - (nPixelSzH+nHalfPixelSzH) );
aSubsRect.Bottom( aSubsRect.Bottom() + (nPixelSzH+nHalfPixelSzH) );
}
- for ( USHORT k = 0; k < rRects.Count(); ++k )
+ for ( sal_uInt16 k = 0; k < rRects.Count(); ++k )
{
SwLineRect &rLine = rRects[k];
@@ -756,9 +756,9 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
}
}
-void SwLineRects::LockLines( BOOL bLock )
+void SwLineRects::LockLines( sal_Bool bLock )
{
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
operator[](i).Lock( bLock );
}
@@ -779,9 +779,9 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
ConnectEdges( pOut );
const Color *pLast = 0;
- BOOL bPaint2nd = FALSE;
- USHORT nMinCount = Count();
- USHORT i;
+ sal_Bool bPaint2nd = sal_False;
+ sal_uInt16 nMinCount = Count();
+ sal_uInt16 i;
for ( i = 0; i < Count(); ++i )
{
@@ -797,7 +797,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
}
//Jetzt malen oder erst in der zweiten Runde?
- BOOL bPaint = TRUE;
+ sal_Bool bPaint = sal_True;
if ( rLRect.GetTab() )
{
if ( rLRect.Height() > rLRect.Width() )
@@ -809,7 +809,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
nTRight = rLRect.GetTab()->Frm().Left() + rLRect.GetTab()->Prt().Right();
if ( (nTLeft >= nLLeft && nTLeft <= nLRight) ||
(nTRight>= nLLeft && nTRight<= nLRight) )
- bPaint = FALSE;
+ bPaint = sal_False;
}
else
{ //Waagerechte Kante, ueberlappt sie mit der Tabellenkante?
@@ -819,7 +819,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
nTBottom = rLRect.GetTab()->Frm().Top() + rLRect.GetTab()->Prt().Bottom();
if ( (nTTop >= nLTop && nTTop <= nLBottom) ||
(nTBottom >= nLTop && nTBottom <= nLBottom) )
- bPaint = FALSE;
+ bPaint = sal_False;
}
}
if ( bPaint )
@@ -828,7 +828,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
{
pLast = rLRect.GetColor();
- ULONG nOldDrawMode = pOut->GetDrawMode();
+ sal_uLong nOldDrawMode = pOut->GetDrawMode();
if( pGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
pOut->SetDrawMode( 0 );
@@ -841,7 +841,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
rLRect.SetPainted();
}
else
- bPaint2nd = TRUE;
+ bPaint2nd = sal_True;
}
if ( bPaint2nd )
for ( i = 0; i < Count(); ++i )
@@ -860,7 +860,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
{
pLast = rLRect.GetColor();
- ULONG nOldDrawMode = pOut->GetDrawMode();
+ sal_uLong nOldDrawMode = pOut->GetDrawMode();
if( pGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
@@ -889,12 +889,12 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
// <--
//Alle Hilfslinien, die sich fast decken entfernen (Tabellen)
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
SwLineRect &rLi = operator[](i);
const bool bVerticalSubs = rLi.Height() > rLi.Width();
- for ( USHORT k = i+1; k < Count(); ++k )
+ for ( sal_uInt16 k = i+1; k < Count(); ++k )
{
SwLineRect &rLk = operator[](k);
if ( rLi.SSize() == rLk.SSize() )
@@ -946,14 +946,14 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
// mode in order to get fill color set at output device.
// Recover draw mode after draw of lines.
// Necessary for the subsidiary lines painted by the fly frames.
- ULONG nOldDrawMode = pOut->GetDrawMode();
+ sal_uLong nOldDrawMode = pOut->GetDrawMode();
if( pGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
pOut->SetDrawMode( 0 );
}
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
SwLineRect &rLRect = operator[](i);
// OD 19.12.2002 #106318# - add condition <!rLRect.IsLocked()>
@@ -1190,7 +1190,7 @@ long MA_FASTCALL lcl_MinWidthDist( const long nDist )
//Ermittelt PrtArea plus Umrandung plus Schatten.
void MA_FASTCALL lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm,
const SwBorderAttrs &rAttrs,
- const BOOL bShadow )
+ const sal_Bool bShadow )
{
// OD 23.01.2003 #106386# - special handling for cell frames.
// The printing area of a cell frame is completely enclosed in the frame area
@@ -1216,7 +1216,7 @@ void MA_FASTCALL lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm,
{
SwRectFn fnRect = pFrm->IsVertical() ? fnRectVert : fnRectHori;
const SvxBoxItem &rBox = rAttrs.GetBox();
- const BOOL bTop = 0 != (pFrm->*fnRect->fnGetTopMargin)();
+ const sal_Bool bTop = 0 != (pFrm->*fnRect->fnGetTopMargin)();
if ( bTop )
{
SwTwips nDiff = rBox.GetTop() ?
@@ -1229,7 +1229,7 @@ void MA_FASTCALL lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm,
(rRect.*fnRect->fnSubTop)( nDiff );
}
- const BOOL bBottom = 0 != (pFrm->*fnRect->fnGetBottomMargin)();
+ const sal_Bool bBottom = 0 != (pFrm->*fnRect->fnGetBottomMargin)();
if ( bBottom )
{
SwTwips nDiff = 0;
@@ -1313,7 +1313,7 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
if ( !pRetoucheFly )
pRetoucheFly = pRetoucheFly2;
- for ( USHORT j = 0; (j < rObjs.Count()) && rRegion.Count(); ++j )
+ for ( sal_uInt16 j = 0; (j < rObjs.Count()) && rRegion.Count(); ++j )
{
const SwAnchoredObject* pAnchoredObj = rObjs[j];
const SdrObject* pSdrObj = pAnchoredObj->GetDrawObj();
@@ -1335,8 +1335,8 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
pGlobalShell->IsPreView()))
continue;
- const BOOL bLowerOfSelf = pSelfFly && pFly->IsLowerOf( pSelfFly ) ?
- TRUE : FALSE;
+ const sal_Bool bLowerOfSelf = pSelfFly && pFly->IsLowerOf( pSelfFly ) ?
+ sal_True : sal_False;
//Bei zeichengebundenem Fly nur diejenigen betrachten, in denen er
//nicht selbst verankert ist.
@@ -1361,7 +1361,7 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
}
#endif
- BOOL bStopOnHell = TRUE;
+ sal_Bool bStopOnHell = sal_True;
if ( pSelfFly )
{
const SdrObject *pTmp = pSelfFly->GetVirtDrawObj();
@@ -1377,7 +1377,7 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
//Aus anderem Layer interessieren uns nur nicht transparente
//oder innenliegende
continue;
- bStopOnHell = FALSE;
+ bStopOnHell = sal_False;
}
}
if ( pRetoucheFly )
@@ -1395,14 +1395,14 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
//Aus anderem Layer interessieren uns nur nicht transparente
//oder innenliegende
continue;
- bStopOnHell = FALSE;
+ bStopOnHell = sal_False;
}
}
//Wenn der Inhalt des Fly Transparent ist, wird er nicht abgezogen, es sei denn
//er steht im Hell-Layer (#31941#)
const IDocumentDrawModelAccess* pIDDMA = pFly->GetFmt()->getIDocumentDrawModelAccess();
- BOOL bHell = pSdrObj->GetLayer() == pIDDMA->GetHellId();
+ sal_Bool bHell = pSdrObj->GetLayer() == pIDDMA->GetHellId();
if ( (bStopOnHell && bHell) ||
/// OD 05.08.2002 - change internal order of condition
/// first check "!bHell", then "..->Lower()" and "..->IsNoTxtFrm()"
@@ -1440,7 +1440,7 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
SwRect aRect;
SwBorderAttrAccess aAccess( SwFrm::GetCache(), (SwFrm*)pFly );
const SwBorderAttrs &rAttrs = *aAccess.Get();
- ::lcl_CalcBorderRect( aRect, pFly, rAttrs, TRUE );
+ ::lcl_CalcBorderRect( aRect, pFly, rAttrs, sal_True );
rRegion -= aRect;
continue;
}
@@ -1461,7 +1461,7 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
SwRect aRect;
SwBorderAttrAccess aAccess( SwFrm::GetCache(), (SwFrm*)pFly );
const SwBorderAttrs &rAttrs = *aAccess.Get();
- ::lcl_CalcBorderRect( aRect, pFly, rAttrs, TRUE );
+ ::lcl_CalcBorderRect( aRect, pFly, rAttrs, sal_True );
rRegion -= aRect;
}
else
@@ -1476,7 +1476,7 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
}
// --> OD 2008-05-16 #i84659# - no longer needed
-//inline BOOL IsShortCut( const SwRect &rRect, const SwRect &rFrmRect )
+//inline sal_Bool IsShortCut( const SwRect &rRect, const SwRect &rFrmRect )
//{
// //Wenn der Frm vollstaendig rechts neben bzw. unter dem
// //Rect sitzt ist's genug mit Painten.
@@ -1599,7 +1599,7 @@ inline void lcl_DrawGraphicBackgrd( const SvxBrushItem& _rBackgrdBrush,
/// OD 25.09.2002 #99739# - pixel-align coordinations for drawing graphic.
/// OD 17.10.2002 #103876# - outsource code for drawing background of the graphic
/// with a background color in method <lcl_DrawGraphicBackgrd>
-/// Also, change type of <bGrfNum> and <bClip> from <BOOL> to <bool>.
+/// Also, change type of <bGrfNum> and <bClip> from <sal_Bool> to <bool>.
void lcl_DrawGraphic( const SvxBrushItem& rBrush, OutputDevice *pOut,
ViewShell &rSh, const SwRect &rGrf, const SwRect &rOut,
bool bClip, bool bGrfNum,
@@ -1613,7 +1613,7 @@ void lcl_DrawGraphic( const SvxBrushItem& rBrush, OutputDevice *pOut,
SwRect aAlignedGrfRect = rGrf;
::SwAlignRect( aAlignedGrfRect, &rSh );
- /// OD 17.10.2002 #103876# - change type from <BOOL> to <bool>.
+ /// OD 17.10.2002 #103876# - change type from <sal_Bool> to <bool>.
const bool bNotInside = bClip && !rOut.IsInside( aAlignedGrfRect );
if ( bNotInside )
{
@@ -1642,13 +1642,13 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush,
OutputDevice *pOutDev,
const SwRect &rOrg,
const SwRect &rOut,
- const BYTE nGrfNum,
+ const sal_uInt8 nGrfNum,
const sal_Bool bConsiderBackgroundTransparency )
/// OD 05.08.2002 #99657# - add 6th parameter to indicate that method should
/// consider background transparency, saved in the color of the brush item
{
ViewShell &rSh = *pGlobalShell;
- /// OD 17.10.2002 #103876# - change type from <BOOL> to <bool>
+ /// OD 17.10.2002 #103876# - change type from <sal_Bool> to <bool>
bool bReplaceGrfNum = GRFNUM_REPLACE == nGrfNum;
bool bGrfNum = GRFNUM_NO != nGrfNum;
Size aGrfSize;
@@ -1685,8 +1685,8 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush,
SwRect aGrf;
aGrf.SSize( aGrfSize );
- BOOL bDraw = TRUE;
- BOOL bRetouche = TRUE;
+ sal_Bool bDraw = sal_True;
+ sal_Bool bRetouche = sal_True;
switch ( ePos )
{
case GPOS_LT:
@@ -1805,12 +1805,12 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush,
pOutDev->Pop();
// set <bDraw> and <bRetouche> to false, indicating that background
// graphic and background are already drawn.
- bDraw = bRetouche = FALSE;
+ bDraw = bRetouche = sal_False;
}
break;
case GPOS_NONE:
- bDraw = FALSE;
+ bDraw = sal_False;
break;
default: ASSERT( !pOutDev, "new Graphic position?" );
@@ -1881,7 +1881,7 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush,
// --> OD 2008-06-02 #i75614#
// reset draw mode in high contrast mode in order to get fill color set
- const ULONG nOldDrawMode = pOutDev->GetDrawMode();
+ const sal_uLong nOldDrawMode = pOutDev->GetDrawMode();
if ( pGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
@@ -1952,7 +1952,7 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush,
else
bGrfBackgrdAlreadyDrawn = true;
/// loop rectangles of background region, which has to be drawn
- for( USHORT i = 0; i < aRegion.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
{
pOutDev->DrawRect( aRegion[i].SVRect() );
}
@@ -2242,7 +2242,7 @@ void SwTabFrmPainter::PaintLines( OutputDevice& rDev, const SwRect& rRect ) cons
// high contrast mode:
// overrides the color of non-subsidiary lines.
const Color* pHCColor = 0;
- ULONG nOldDrawMode = rDev.GetDrawMode();
+ sal_uLong nOldDrawMode = rDev.GetDrawMode();
if( pGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
@@ -2729,7 +2729,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
PROTOCOL( this, PROT_FILE_INIT, 0, 0)
- BOOL bResetRootPaint = FALSE;
+ sal_Bool bResetRootPaint = sal_False;
ViewShell *pSh = pCurrShell;
if ( pSh->GetWin() )
@@ -2745,7 +2745,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
}
}
else
- SwRootFrm::bInPaint = bResetRootPaint = TRUE;
+ SwRootFrm::bInPaint = bResetRootPaint = sal_True;
SwSavePaintStatics *pStatics = 0;
if ( pGlobalShell )
@@ -2786,9 +2786,9 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
{
((SwRootFrm*)this)->ResetTurbo();
SwLayAction aAction( (SwRootFrm*)this, pSh->Imp() );
- aAction.SetPaint( FALSE );
- aAction.SetComplete( FALSE );
- aAction.SetReschedule( pProgress ? TRUE : FALSE );
+ aAction.SetPaint( sal_False );
+ aAction.SetComplete( sal_False );
+ aAction.SetReschedule( pProgress ? sal_True : sal_False );
aAction.Action();
((SwRootFrm*)this)->ResetTurboFlag();
if ( !pSh->ActionPend() )
@@ -2798,7 +2798,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
SwRect aRect( rRect );
aRect.Intersection( pSh->VisArea() );
- const BOOL bExtraData = ::IsExtraData( GetFmt()->GetDoc() );
+ const sal_Bool bExtraData = ::IsExtraData( GetFmt()->GetDoc() );
pLines = new SwLineRects; //Sammler fuer Umrandungen.
@@ -2807,7 +2807,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
// of the document. Dangerous! We better set this flag to
// avoid the reformat.
const sal_Bool bOldAction = IsCallbackActionEnabled();
- ((SwRootFrm*)this)->SetCallbackActionEnabled( FALSE );
+ ((SwRootFrm*)this)->SetCallbackActionEnabled( sal_False );
const SwPageFrm *pPage = pSh->Imp()->GetFirstVisPage();
@@ -2914,18 +2914,18 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
/// calls, paint <hell> or <heaven>
const Color aPageBackgrdColor = pPage->GetDrawBackgrdColor();
- pPage->PaintBaBo( aPaintRect, pPage, TRUE );
+ pPage->PaintBaBo( aPaintRect, pPage, sal_True );
if ( pSh->Imp()->HasDrawView() )
{
- pLines->LockLines( TRUE );
+ pLines->LockLines( sal_True );
// OD 29.08.2002 #102450# - add 3rd parameter
// OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
const IDocumentDrawModelAccess* pIDDMA = pSh->getIDocumentDrawModelAccess();
pSh->Imp()->PaintLayer( pIDDMA->GetHellId(), pPrintData, aPaintRect,
&aPageBackgrdColor, (pPage->IsRightToLeft() ? true : false) );
pLines->PaintLines( pSh->GetOut() );
- pLines->LockLines( FALSE );
+ pLines->LockLines( sal_False );
}
if( pSh->GetWin() )
@@ -3066,7 +3066,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
#endif
if ( bResetRootPaint )
- SwRootFrm::bInPaint = FALSE;
+ SwRootFrm::bInPaint = sal_False;
if ( pStatics )
delete pStatics;
else
@@ -3097,16 +3097,16 @@ void SwRootFrm::HackPrepareLongTblPaint( int nMode )
pLines = new SwLineRects;
ASSERT( !pGlobalShell, "old GlobalShell lost" );
pGlobalShell = GetShell();
- bTableHack = TRUE;
+ bTableHack = sal_True;
break;
- case HACK_TABLEMODE_LOCKLINES : pLines->LockLines( TRUE ); break;
+ case HACK_TABLEMODE_LOCKLINES : pLines->LockLines( sal_True ); break;
case HACK_TABLEMODE_PAINTLINES : pLines->PaintLines( GetShell()->GetOut() );
break;
- case HACK_TABLEMODE_UNLOCKLINES: pLines->LockLines( FALSE ); break;
+ case HACK_TABLEMODE_UNLOCKLINES: pLines->LockLines( sal_False ); break;
case HACK_TABLEMODE_EXIT : pLines->PaintLines( GetShell()->GetOut() );
DELETEZ( pLines );
pGlobalShell = 0;
- bTableHack = FALSE;
+ bTableHack = sal_False;
break;
}
}
@@ -3140,14 +3140,14 @@ class SwShortCut
long nLimit;
public:
SwShortCut( const SwFrm& rFrm, const SwRect& rRect );
- BOOL Stop( const SwRect& rRect ) const
+ sal_Bool Stop( const SwRect& rRect ) const
{ return (rRect.*fnCheck)( nLimit ) > 0; }
};
SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect )
{
- BOOL bVert = rFrm.IsVertical();
- BOOL bR2L = rFrm.IsRightToLeft();
+ sal_Bool bVert = rFrm.IsVertical();
+ sal_Bool bR2L = rFrm.IsRightToLeft();
if( rFrm.IsNeighbourFrm() && bVert == bR2L )
{
if( bVert )
@@ -3187,8 +3187,8 @@ void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
return;
SwShortCut aShortCut( *pFrm, rRect );
- BOOL bCnt;
- if ( TRUE == (bCnt = pFrm->IsCntntFrm()) )
+ sal_Bool bCnt;
+ if ( sal_True == (bCnt = pFrm->IsCntntFrm()) )
pFrm->Calc();
if ( pFrm->IsFtnContFrm() )
@@ -3198,7 +3198,7 @@ void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
}
const SwPageFrm *pPage = 0;
- const BOOL bWin = pGlobalShell->GetWin() ? TRUE : FALSE;
+ const sal_Bool bWin = pGlobalShell->GetWin() ? sal_True : sal_False;
while ( IsAnLower( pFrm ) )
{
@@ -3251,7 +3251,7 @@ void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
pGlobalShell->InvalidateWindows( aPaintRect );
pFrm = pFrm->GetNext();
- if ( pFrm && (TRUE == (bCnt = pFrm->IsCntntFrm())) )
+ if ( pFrm && (sal_True == (bCnt = pFrm->IsCntntFrm())) )
pFrm->Calc();
continue;
}
@@ -3282,7 +3282,7 @@ void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
::lcl_EmergencyFormatFtnCont( (SwFtnContFrm*)pFrm->GetNext() );
pFrm = pFrm->GetNext();
- if ( pFrm && (TRUE == (bCnt = pFrm->IsCntntFrm())) )
+ if ( pFrm && (sal_True == (bCnt = pFrm->IsCntntFrm())) )
pFrm->Calc();
}
}
@@ -3367,15 +3367,15 @@ sal_Bool SwFlyFrm::IsShadowTransparent() const
|*
|*************************************************************************/
-BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
+sal_Bool SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
{
SdrObjUserCall *pUserCall;
if ( 0 == ( pUserCall = GetUserCall(pObj) ) )
- return TRUE;
+ return sal_True;
//Attributabhaengig nicht fuer Drucker oder PreView painten
- BOOL bPaint = pFlyOnlyDraw ||
+ sal_Bool bPaint = pFlyOnlyDraw ||
((SwContact*)pUserCall)->GetFmt()->GetPrint().GetValue();
if ( !bPaint )
bPaint = pSh->GetWin() && !pSh->IsPreView();
@@ -3388,7 +3388,7 @@ BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
{
SwFlyFrm *pFly = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm();
if ( pFlyOnlyDraw && pFlyOnlyDraw == pFly )
- return TRUE;
+ return sal_True;
//Die Anzeige eines Zwischenstadiums vermeiden, Flys die nicht mit
//der Seite auf der sie verankert sind ueberlappen werden auch
@@ -3450,10 +3450,10 @@ BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
bPaint = SwFlyFrm::IsPaint( pAnch->FindFlyFrm()->GetVirtDrawObj(),
pSh );
else if ( pFlyOnlyDraw )
- bPaint = FALSE;
+ bPaint = sal_False;
}
else
- bPaint = FALSE;
+ bPaint = sal_False;
}
return bPaint;
}
@@ -3485,7 +3485,7 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
//wegen der Ueberlappung von Rahmen und Zeichenobjekten muessen die
//Flys ihre Umrandung (und die der Innenliegenden) direkt ausgeben.
//z.B. #33066#
- pLines->LockLines(TRUE);
+ pLines->LockLines(sal_True);
SwRect aRect( rRect );
aRect._Intersection( Frm() );
@@ -3566,7 +3566,7 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
const SwBorderAttrs &rAttrs = *aAccess.Get();
SwRect aPaintRect( aRect );
aPaintRect._Intersection( pParentFlyFrm->Frm() );
- pParentFlyFrm->PaintBackground( aPaintRect, pPage, rAttrs, FALSE, FALSE );
+ pParentFlyFrm->PaintBackground( aPaintRect, pPage, rAttrs, sal_False, sal_False );
pRetoucheFly2 = pOldRet;
}
@@ -3624,13 +3624,13 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
pOut->SetClipRegion( aPoly );
}
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
- PaintBackground( aRegion[i], pPage, rAttrs, FALSE, TRUE );
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
+ PaintBackground( aRegion[i], pPage, rAttrs, sal_False, sal_True );
pOut->Pop();
}
else
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
- PaintBackground( aRegion[i], pPage, rAttrs, FALSE, TRUE );
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
+ PaintBackground( aRegion[i], pPage, rAttrs, sal_False, sal_True );
}
pOut->Pop();
@@ -3647,7 +3647,7 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
if ( pSubsLines )
{
// Lock already existing subsidiary lines
- pSubsLines->LockLines( TRUE );
+ pSubsLines->LockLines( sal_True );
bSubsLineRectsCreated = false;
}
else
@@ -3661,7 +3661,7 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
if ( pSpecSubsLines )
{
// Lock already existing special subsidiary lines
- pSpecSubsLines->LockLines( TRUE );
+ pSpecSubsLines->LockLines( sal_True );
bSpecSubsLineRectsCreated = false;
}
else
@@ -3677,14 +3677,14 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
pSubsLines->PaintSubsidiary( pOut, pLines );
if ( !bSubsLineRectsCreated )
// unlock subsidiary lines
- pSubsLines->LockLines( FALSE );
+ pSubsLines->LockLines( sal_False );
else
// delete created subsidiary lines container
DELETEZ( pSubsLines );
if ( !bSpecSubsLineRectsCreated )
// unlock special subsidiary lines
- pSpecSubsLines->LockLines( FALSE );
+ pSpecSubsLines->LockLines( sal_False );
else
{
// delete created special subsidiary lines container
@@ -3699,7 +3699,7 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
// OD 19.12.2002 #106318# - first paint lines added by fly frame paint
// and then unlock other lines.
pLines->PaintLines( pOut );
- pLines->LockLines( FALSE );
+ pLines->LockLines( sal_False );
pOut->Pop();
@@ -3729,7 +3729,7 @@ void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
if ( rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE )
{
SwRect aRect;
- ::lcl_CalcBorderRect( aRect, this, rAttrs, TRUE );
+ ::lcl_CalcBorderRect( aRect, this, rAttrs, sal_True );
PaintShadow( rRect, aRect, rAttrs );
}
@@ -3779,9 +3779,9 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
SwRects aRegion( 2, 2 );
SwRect aOut( rOutRect );
- const BOOL bCnt = IsCntntFrm();
- const BOOL bTop = !bCnt || rAttrs.GetTopLine ( *(this) ) ? TRUE : FALSE;
- const BOOL bBottom = !bCnt || rAttrs.GetBottomLine( *(this) ) ? TRUE : FALSE;
+ const sal_Bool bCnt = IsCntntFrm();
+ const sal_Bool bTop = !bCnt || rAttrs.GetTopLine ( *(this) ) ? sal_True : sal_False;
+ const sal_Bool bBottom = !bCnt || rAttrs.GetBottomLine( *(this) ) ? sal_True : sal_False;
SvxShadowLocation eLoc = rShadow.GetLocation();
@@ -3929,7 +3929,7 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
OutputDevice *pOut = pGlobalShell->GetOut();
- ULONG nOldDrawMode = pOut->GetDrawMode();
+ sal_uLong nOldDrawMode = pOut->GetDrawMode();
Color aShadowColor( rShadow.GetColor() );
if( aRegion.Count() && pGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
@@ -3947,7 +3947,7 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
pOut->SetDrawMode( nOldDrawMode );
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
{
SwRect &rOut = aRegion[i];
aOut = rOut;
@@ -3989,7 +3989,7 @@ void SwFrm::PaintBorderLine( const SwRect& rRect,
aOut._Intersection( rRect );
const SwTabFrm *pTab = IsCellFrm() ? FindTabFrm() : 0;
- BYTE nSubCol = ( IsCellFrm() || IsRowFrm() ) ? SUBCOL_TAB :
+ sal_uInt8 nSubCol = ( IsCellFrm() || IsRowFrm() ) ? SUBCOL_TAB :
( IsInSct() ? SUBCOL_SECT :
( IsInFly() ? SUBCOL_FLY : SUBCOL_PAGE ) );
if( pColor && pGlobalShell->GetWin() &&
@@ -4002,7 +4002,7 @@ void SwFrm::PaintBorderLine( const SwRect& rRect,
{
SwRegionRects aRegion( aOut, 4, 1 );
::lcl_SubtractFlys( this, pPage, aOut, aRegion );
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
pLines->AddLineRect( aRegion[i], pColor, pTab, nSubCol );
}
else
@@ -4032,7 +4032,7 @@ void MA_FASTCALL lcl_SubTopBottom( SwRect& _iorRect,
const SwRectFn& _rRectFn,
const sal_Bool _bPrtOutputDev )
{
- const BOOL bCnt = _rFrm.IsCntntFrm();
+ const sal_Bool bCnt = _rFrm.IsCntntFrm();
if ( _rBox.GetTop() && _rBox.GetTop()->GetInWidth() &&
( !bCnt || _rAttrs.GetTopLine( _rFrm ) )
)
@@ -4196,7 +4196,7 @@ void lcl_PaintLeftRightLine( const sal_Bool _bLeft,
(aRect.*_rRectFn->fnGetWidth)() );
}
- const BOOL bCnt = _rFrm.IsCntntFrm();
+ const sal_Bool bCnt = _rFrm.IsCntntFrm();
if ( bCnt )
{
@@ -4729,8 +4729,8 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
if ( !pPage )
pPage = FindPageFrm();
- ::lcl_CalcBorderRect( aRect, this, rAttrs, TRUE );
- rAttrs.SetGetCacheLine( TRUE );
+ ::lcl_CalcBorderRect( aRect, this, rAttrs, sal_True );
+ rAttrs.SetGetCacheLine( sal_True );
if ( bShadow )
PaintShadow( rRect, aRect, rAttrs );
// OD 27.09.2002 #103636# - suspend drawing of border
@@ -4790,7 +4790,7 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
}
}
}
- rAttrs.SetGetCacheLine( FALSE );
+ rAttrs.SetGetCacheLine( sal_False );
}
}
/*************************************************************************
@@ -4943,8 +4943,8 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
aInter.Intersection( rRect );
if( aInter.HasArea() )
{
- BOOL bGrid = pGrid->GetRubyTextBelow();
- BOOL bCell = GRID_LINES_CHARS == pGrid->GetGridType();
+ sal_Bool bGrid = pGrid->GetRubyTextBelow();
+ sal_Bool bCell = GRID_LINES_CHARS == pGrid->GetGridType();
long nGrid = pGrid->GetBaseHeight();
const SwDoc* pDoc = GetFmt()->GetDoc();
long nGridWidth = GETGRIDWIDTH(pGrid,pDoc); //for textgrid refactor
@@ -4966,9 +4966,9 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
if( nX < aInter.Top() )
nX += nGrid;
SwTwips nGridBottom = aGrid.Top() + aGrid.Height();
- BOOL bLeft = aGrid.Top() >= aInter.Top();
- BOOL bRight = nGridBottom <= nBottom;
- BOOL bBorder = bLeft || bRight;
+ sal_Bool bLeft = aGrid.Top() >= aInter.Top();
+ sal_Bool bRight = nGridBottom <= nBottom;
+ sal_Bool bBorder = bLeft || bRight;
while( nY > nRight )
{
aTmp.Pos().X() = nY;
@@ -5097,9 +5097,9 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
if( nX < aInter.Left() )
nX += nGridWidth;
SwTwips nGridRight = aGrid.Left() + aGrid.Width();
- BOOL bLeft = aGrid.Left() >= aInter.Left();
- BOOL bRight = nGridRight <= nRight;
- BOOL bBorder = bLeft || bRight;
+ sal_Bool bLeft = aGrid.Left() >= aInter.Left();
+ sal_Bool bRight = nGridRight <= nRight;
+ sal_Bool bBorder = bLeft || bRight;
while( nY < aInter.Top() )
{
aTmp.Pos().Y() = nY;
@@ -5258,7 +5258,7 @@ void SwPageFrm::PaintMarginArea( const SwRect& _rOutputRect,
OutputDevice *pOut = _pViewShell->GetOut();
if ( pOut->GetFillColor() != aGlobalRetoucheColor )
pOut->SetFillColor( aGlobalRetoucheColor );
- for ( USHORT i = 0; i < aPgRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aPgRegion.Count(); ++i )
{
if ( 1 < aPgRegion.Count() )
{
@@ -5419,7 +5419,7 @@ const sal_Int8 SwPageFrm::mnShadowPxWidth = 2;
//mod #i6193# paint sidebar for notes
//IMPORTANT: if you change the rects here, also change SwPostItMgr::ScrollbarHit
-/*static*/void SwPageFrm::PaintNotesSidebar(const SwRect& _rPageRect, ViewShell* _pViewShell, USHORT nPageNum, bool bRight)
+/*static*/void SwPageFrm::PaintNotesSidebar(const SwRect& _rPageRect, ViewShell* _pViewShell, sal_uInt16 nPageNum, bool bRight)
{
//TOOD: cut out scrollbar area and arrows out of sidepane rect, otherwise it could flicker when pressing arrow buttons
if (!_pViewShell )
@@ -5596,7 +5596,7 @@ const sal_Int8 SwPageFrm::mnShadowPxWidth = 2;
|*************************************************************************/
void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
- const BOOL bLowerBorder ) const
+ const sal_Bool bLowerBorder ) const
{
if ( !pPage )
pPage = FindPageFrm();
@@ -5633,7 +5633,7 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
// paint background
{
- PaintBackground( rRect, pPage, rAttrs, FALSE, bLowerBorder );
+ PaintBackground( rRect, pPage, rAttrs, sal_False, bLowerBorder );
}
pOut->Pop();
@@ -5652,8 +5652,8 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
/// calling <PaintBaBo> at the page or at the fly frame its anchored
void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
const SwBorderAttrs & rAttrs,
- const BOOL bLowerMode,
- const BOOL bLowerBorder ) const
+ const sal_Bool bLowerMode,
+ const sal_Bool bLowerBorder ) const
{
// OD 20.01.2003 #i1837# - no paint of table background, if corresponding
// option is *not* set.
@@ -5679,10 +5679,10 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
SvxBrushItem* pTmpBackBrush = 0;
const Color* pCol;
SwRect aOrigBackRect;
- const BOOL bPageFrm = IsPageFrm();
- BOOL bLowMode = TRUE;
+ const sal_Bool bPageFrm = IsPageFrm();
+ sal_Bool bLowMode = sal_True;
- BOOL bBack = GetBackgroundBrush( pItem, pCol, aOrigBackRect, bLowerMode );
+ sal_Bool bBack = GetBackgroundBrush( pItem, pCol, aOrigBackRect, bLowerMode );
//- Ausgabe wenn ein eigener Hintergrund mitgebracht wird.
bool bNoFlyBackground = !bFlyMetafile && !bBack && IsFlyFrm();
if ( bNoFlyBackground )
@@ -5696,7 +5696,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
}
// If still no background found for the fly frame, initialize the
// background brush <pItem> with global retouche color and set <bBack>
- // to TRUE, that fly frame will paint its background using this color.
+ // to sal_True, that fly frame will paint its background using this color.
if ( !bBack )
{
// OD 10.01.2003 #i6467# - on print output, pdf output and
@@ -5722,13 +5722,13 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
SwRect aPaintRect( Frm() );
if( IsTxtFrm() || IsSctFrm() )
- aPaintRect = UnionFrm( TRUE );
+ aPaintRect = UnionFrm( sal_True );
if ( aPaintRect.IsOver( rRect ) )
{
if ( bBack || bPageFrm || !bLowerMode )
{
- const BOOL bBrowse = pSh->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bBrowse = pSh->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
SwRect aRect;
if ( (bPageFrm && bBrowse) ||
@@ -5739,7 +5739,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
}
else
{
- ::lcl_CalcBorderRect( aRect, this, rAttrs, FALSE );
+ ::lcl_CalcBorderRect( aRect, this, rAttrs, sal_False );
if ( (IsTxtFrm() || IsTabFrm()) && GetPrev() )
{
if ( GetPrev()->GetAttrSet()->GetBackground() ==
@@ -5771,7 +5771,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
/// --> Status Quo: background transparency have to be
/// considered for fly frames
const sal_Bool bConsiderBackgroundTransparency = IsFlyFrm();
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
{
if ( 1 < aRegion.Count() )
{
@@ -5792,7 +5792,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
}
}
else
- bLowMode = bLowerMode ? TRUE : FALSE;
+ bLowMode = bLowerMode ? sal_True : sal_False;
}
/// OD 05.09.2002 #102912#
@@ -5855,13 +5855,13 @@ void SwPageFrm::RefreshSubsidiary( const SwRect &rRect ) const
{
//Beim Paint ueber die Root wird das Array von dort gesteuert.
//Anderfalls kuemmern wir uns selbst darum.
- BOOL bDelSubs = FALSE;
+ sal_Bool bDelSubs = sal_False;
if ( !pSubsLines )
{
pSubsLines = new SwSubsRects;
// OD 20.12.2002 #106318# - create container for special subsidiary lines
pSpecSubsLines = new SwSubsRects;
- bDelSubs = TRUE;
+ bDelSubs = sal_True;
}
RefreshLaySubsidiary( this, aRect );
@@ -5891,19 +5891,19 @@ void SwPageFrm::RefreshSubsidiary( const SwRect &rRect ) const
void SwLayoutFrm::RefreshLaySubsidiary( const SwPageFrm *pPage,
const SwRect &rRect ) const
{
- const BOOL bNoLowerColumn = !Lower() || !Lower()->IsColumnFrm();
- const BOOL bSubsOpt = IS_SUBS;
- const BOOL bSubsTable = ((GetType() & (FRM_ROW | FRM_CELL)) && IS_SUBS_TABLE);
- const BOOL bSubsOther = (GetType() & (FRM_HEADER | FRM_FOOTER | FRM_FTN )) && bSubsOpt;
- const BOOL bSubsSect = IsSctFrm() &&
+ const sal_Bool bNoLowerColumn = !Lower() || !Lower()->IsColumnFrm();
+ const sal_Bool bSubsOpt = IS_SUBS;
+ const sal_Bool bSubsTable = ((GetType() & (FRM_ROW | FRM_CELL)) && IS_SUBS_TABLE);
+ const sal_Bool bSubsOther = (GetType() & (FRM_HEADER | FRM_FOOTER | FRM_FTN )) && bSubsOpt;
+ const sal_Bool bSubsSect = IsSctFrm() &&
bNoLowerColumn &&
IS_SUBS_SECTION;
- const BOOL bSubsFly = IS_SUBS_FLYS &&
+ const sal_Bool bSubsFly = IS_SUBS_FLYS &&
(GetType() & FRM_FLY) &&
bNoLowerColumn &&
(!Lower() || !Lower()->IsNoTxtFrm() ||
!((SwNoTxtFrm*)Lower())->HasAnimation());
- BOOL bSubsBody = FALSE;
+ sal_Bool bSubsBody = sal_False;
if ( GetType() & FRM_BODY )
{
if ( IsPageBodyFrm() )
@@ -5982,7 +5982,7 @@ void MA_FASTCALL lcl_RefreshLine( const SwLayoutFrm *pLay,
const SwPageFrm *pPage,
const Point &rP1,
const Point &rP2,
- const BYTE nSubColor,
+ const sal_uInt8 nSubColor,
SwLineRects* _pSubsLines )
{
//In welche Richtung gehts? Kann nur Horizontal oder Vertikal sein.
@@ -6144,20 +6144,20 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
const Point aRB( nRight, nBottom );
const Point aLB( aOut.Left(), nBottom );
- BYTE nSubColor = ( bCell || IsRowFrm() ) ? SUBCOL_TAB :
+ sal_uInt8 nSubColor = ( bCell || IsRowFrm() ) ? SUBCOL_TAB :
( IsInSct() ? SUBCOL_SECT :
( IsInFly() ? SUBCOL_FLY : SUBCOL_PAGE ) );
// OD 05.11.2002 #102406# - body frames are responsible for page/column breaks.
- BOOL bBreak = FALSE;
+ sal_Bool bBreak = sal_False;
if ( IsBodyFrm() )
{
const SwCntntFrm *pCnt = ContainsCntnt();
if ( pCnt )
{
// OD 05.11.2002 #102406# - adjust setting of <bBreak>.
- bBreak = pCnt->IsPageBreak( TRUE ) ||
- ( IsColBodyFrm() && pCnt->IsColBreak( TRUE ) );
+ bBreak = pCnt->IsPageBreak( sal_True ) ||
+ ( IsColBodyFrm() && pCnt->IsColBreak( sal_True ) );
}
}
@@ -6251,7 +6251,7 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
void SwPageFrm::RefreshExtraData( const SwRect &rRect ) const
{
const SwLineNumberInfo &rInfo = GetFmt()->GetDoc()->GetLineNumberInfo();
- BOOL bLineInFly = (rInfo.IsPaintLineNumbers() && rInfo.IsCountInFlys())
+ sal_Bool bLineInFly = (rInfo.IsPaintLineNumbers() && rInfo.IsCountInFlys())
|| (sal_Int16)SW_MOD()->GetRedlineMarkPos() != text::HoriOrientation::NONE;
SwRect aRect( rRect );
@@ -6261,7 +6261,7 @@ void SwPageFrm::RefreshExtraData( const SwRect &rRect ) const
SwLayoutFrm::RefreshExtraData( aRect );
if ( bLineInFly && GetSortedObjs() )
- for ( USHORT i = 0; i < GetSortedObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < GetSortedObjs()->Count(); ++i )
{
const SwAnchoredObject* pAnchoredObj = (*GetSortedObjs())[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -6279,7 +6279,7 @@ void SwLayoutFrm::RefreshExtraData( const SwRect &rRect ) const
{
const SwLineNumberInfo &rInfo = GetFmt()->GetDoc()->GetLineNumberInfo();
- BOOL bLineInBody = rInfo.IsPaintLineNumbers(),
+ sal_Bool bLineInBody = rInfo.IsPaintLineNumbers(),
bLineInFly = bLineInBody && rInfo.IsCountInFlys(),
bRedLine = (sal_Int16)SW_MOD()->GetRedlineMarkPos()!=text::HoriOrientation::NONE;
@@ -6355,7 +6355,7 @@ const Font& SwPageFrm::GetEmptyPageFont()
pEmptyPgFont->SetName( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "Helvetica" )) );
pEmptyPgFont->SetFamily( FAMILY_SWISS );
- pEmptyPgFont->SetTransparent( TRUE );
+ pEmptyPgFont->SetTransparent( sal_True );
pEmptyPgFont->SetColor( COL_GRAY );
}
@@ -6399,11 +6399,11 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pSh->GetOut() );
// <--
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
{
SwRect &rRetouche = aRegion[i];
- GetUpper()->PaintBaBo( rRetouche, pPage, TRUE );
+ GetUpper()->PaintBaBo( rRetouche, pPage, sal_True );
//Hoelle und Himmel muessen auch refreshed werden.
//Um Rekursionen zu vermeiden muss mein Retouche Flag zuerst
@@ -6457,7 +6457,7 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
Beschreibung Liefert die Backgroundbrush fuer den Bereich des
des Frm. Die Brush wird entweder von ihm selbst oder von einem
Upper vorgegeben, die erste Brush wird benutzt.
- Ist fuer keinen Frm eine Brush angegeben, so wird FALSE zurueck-
+ Ist fuer keinen Frm eine Brush angegeben, so wird sal_False zurueck-
geliefert.
Ersterstellung MA 23. Dec. 92
Letzte Aenderung MA 04. Feb. 97
@@ -6484,10 +6484,10 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
@return true, if a background brush for the frame is found
*/
-BOOL SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
+sal_Bool SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
const Color*& rpCol,
SwRect &rOrigRect,
- BOOL bLowerMode ) const
+ sal_Bool bLowerMode ) const
{
const SwFrm *pFrm = this;
ViewShell *pSh = GetShell();
@@ -6496,7 +6496,7 @@ BOOL SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
rpCol = NULL;
do
{ if ( pFrm->IsPageFrm() && !pOpt->IsPageBack() )
- return FALSE;
+ return sal_False;
const SvxBrushItem &rBack = pFrm->GetAttrSet()->GetBackground();
if( pFrm->IsSctFrm() )
@@ -6554,7 +6554,7 @@ BOOL SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
{
SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFrm );
const SwBorderAttrs &rAttrs = *aAccess.Get();
- ::lcl_CalcBorderRect( rOrigRect, pFrm, rAttrs, FALSE );
+ ::lcl_CalcBorderRect( rOrigRect, pFrm, rAttrs, sal_False );
}
else
{
@@ -6562,12 +6562,12 @@ BOOL SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
rOrigRect += pFrm->Frm().Pos();
}
}
- return TRUE;
+ return sal_True;
}
if ( bLowerMode )
/// Do not try to get background brush from parent (anchor/upper)
- return FALSE;
+ return sal_False;
/// get parent frame - anchor or upper - for next loop
if ( pFrm->IsFlyFrm() )
@@ -6579,7 +6579,7 @@ BOOL SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
} while ( pFrm );
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -6592,7 +6592,7 @@ BOOL SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
|*************************************************************************/
void SetOutDevAndWin( ViewShell *pSh, OutputDevice *pO,
- Window *pW, USHORT nZoom )
+ Window *pW, sal_uInt16 nZoom )
{
pSh->pOut = pO;
pSh->pWin = pW;
@@ -6616,8 +6616,8 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
ViewShell *pOldGlobal = pGlobalShell;
pGlobalShell = pSh;
- BOOL bNoteURL = pMap &&
- SFX_ITEM_SET != GetAttrSet().GetItemState( RES_URL, TRUE );
+ sal_Bool bNoteURL = pMap &&
+ SFX_ITEM_SET != GetAttrSet().GetItemState( RES_URL, sal_True );
if( bNoteURL )
{
ASSERT( !pNoteURL, "MakeGraphic: pNoteURL already used? " );
@@ -6627,7 +6627,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
OutputDevice *pOld = pSh->GetOut();
VirtualDevice aDev( *pOld );
- aDev.EnableOutput( FALSE );
+ aDev.EnableOutput( sal_False );
GDIMetaFile aMet;
MapMode aMap( pOld->GetMapMode().GetMapUnit() );
@@ -6656,9 +6656,9 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
pSh->DLPrePaint2(aRepaintRegion);
Window *pWin = pSh->GetWin();
- USHORT nZoom = pSh->GetViewOptions()->GetZoom();
+ sal_uInt16 nZoom = pSh->GetViewOptions()->GetZoom();
::SetOutDevAndWin( pSh, &aDev, 0, 100 );
- bFlyMetafile = TRUE;
+ bFlyMetafile = sal_True;
pFlyMetafileOut = pWin;
SwViewImp *pImp = pSh->Imp();
@@ -6688,7 +6688,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
pFlyOnlyDraw = 0;
pFlyMetafileOut = 0;
- bFlyMetafile = FALSE;
+ bFlyMetafile = sal_False;
::SetOutDevAndWin( pSh, pOld, pWin, nZoom );
// #i92711# end Pre/PostPaint encapsulation when pOut is back and content is painted
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 7a1a51deb8eb..da6ed20bf45d 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -85,14 +85,14 @@ SwSectionFrm::SwSectionFrm( SwSection &rSect ) :
CalcEndAtEndFlag();
}
-SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, BOOL bMaster ) :
+SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, sal_Bool bMaster ) :
SwLayoutFrm( rSect.GetFmt() ),
SwFlowFrm( (SwFrm&)*this ),
pSection( rSect.GetSection() )
{
bFtnAtEnd = rSect.IsFtnAtEnd();
bEndnAtEnd = rSect.IsEndnAtEnd();
- bLockJoin = FALSE;
+ bLockJoin = sal_False;
nType = FRMC_SECTION;
PROTOCOL( this, PROT_SECTION, bMaster ? ACT_CREATE_MASTER : ACT_CREATE_FOLLOW, &rSect )
@@ -103,15 +103,15 @@ SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, BOOL bMaster ) :
{
SwSectionFrm* pMaster = rSect.FindMaster();
pMaster->SetFollow( this );
- bIsFollow = TRUE;
+ bIsFollow = sal_True;
}
else
- rSect.bIsFollow = TRUE;
+ rSect.bIsFollow = sal_True;
SetFollow( &rSect );
}
else
{
- bIsFollow = TRUE;
+ bIsFollow = sal_True;
SetFollow( rSect.GetFollow() );
rSect.SetFollow( this );
if( !GetFollow() )
@@ -172,7 +172,7 @@ SwSectionFrm::~SwSectionFrm()
else if( HasFollow() )
{
PROTOCOL( this, PROT_SECTION, ACT_DEL_MASTER, GetFollow() )
- GetFollow()->bIsFollow = FALSE;
+ GetFollow()->bIsFollow = sal_False;
}
}
}
@@ -186,7 +186,7 @@ SwSectionFrm::~SwSectionFrm()
|* Letzte Aenderung AMA 17. Dec. 97
|*
|*************************************************************************/
-void SwSectionFrm::DelEmpty( BOOL bRemove )
+void SwSectionFrm::DelEmpty( sal_Bool bRemove )
{
if( IsColLocked() )
{
@@ -223,10 +223,10 @@ void SwSectionFrm::DelEmpty( BOOL bRemove )
// freigeben, deshalb wird die Size des Masters invalidiert.
if( !GetFollow() && !pMaster->IsColLocked() )
pMaster->InvalidateSize();
- bIsFollow = FALSE;
+ bIsFollow = sal_False;
}
else if( HasFollow() )
- GetFollow()->bIsFollow = FALSE;
+ GetFollow()->bIsFollow = sal_False;
pFollow = NULL;
if( pUp )
{
@@ -256,10 +256,10 @@ void SwSectionFrm::DelEmpty( BOOL bRemove )
|*************************************************************************/
void SwSectionFrm::Cut()
{
- _Cut( TRUE );
+ _Cut( sal_True );
}
-void SwSectionFrm::_Cut( BOOL bRemove )
+void SwSectionFrm::_Cut( sal_Bool bRemove )
{
ASSERT( GetUpper(), "Cut ohne Upper()." );
@@ -408,10 +408,10 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
InsertGroupBefore( pParent, pSibling, pSect );
pSect->Init();
- (pSect->*fnRect->fnMakePos)( pSect->GetUpper(), pSect->GetPrev(), TRUE);
+ (pSect->*fnRect->fnMakePos)( pSect->GetUpper(), pSect->GetPrev(), sal_True);
if( !((SwLayoutFrm*)pParent)->Lower() )
{
- SwSectionFrm::MoveCntntAndDelete( (SwSectionFrm*)pParent, FALSE );
+ SwSectionFrm::MoveCntntAndDelete( (SwSectionFrm*)pParent, sal_False );
pParent = this;
}
}
@@ -460,24 +460,24 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
|*
|*************************************************************************/
-BOOL SwSectionFrm::HasToBreak( const SwFrm* pFrm ) const
+sal_Bool SwSectionFrm::HasToBreak( const SwFrm* pFrm ) const
{
if( !pFrm->IsSctFrm() )
- return FALSE;
+ return sal_False;
SwSectionFmt *pTmp = (SwSectionFmt*)GetFmt();
// if( !pTmp->GetSect().GetValue() )
-// return FALSE;
+// return sal_False;
const SwFrmFmt *pOtherFmt = ((SwSectionFrm*)pFrm)->GetFmt();
do
{
pTmp = pTmp->GetParent();
if( !pTmp )
- return FALSE;
+ return sal_False;
if( pTmp == pOtherFmt )
- return TRUE;
- } while( TRUE ); // ( pTmp->GetSect().GetValue() );
+ return sal_True;
+ } while( sal_True ); // ( pTmp->GetSect().GetValue() );
}
/*************************************************************************
@@ -522,7 +522,7 @@ void SwSectionFrm::MergeNext( SwSectionFrm* pNxt )
}
SetFollow( pNxt->GetFollow() );
pNxt->SetFollow( NULL );
- pNxt->bIsFollow = FALSE;
+ pNxt->bIsFollow = sal_False;
pNxt->Cut();
delete pNxt;
InvalidateSize();
@@ -544,15 +544,15 @@ void SwSectionFrm::MergeNext( SwSectionFrm* pNxt )
|*
|*************************************************************************/
-BOOL SwSectionFrm::SplitSect( SwFrm* pFrm, BOOL bApres )
+sal_Bool SwSectionFrm::SplitSect( SwFrm* pFrm, sal_Bool bApres )
{
ASSERT( pFrm, "SplitSect: Why?" );
SwFrm* pOther = bApres ? pFrm->FindNext() : pFrm->FindPrev();
if( !pOther )
- return FALSE;
+ return sal_False;
SwSectionFrm* pSect = pOther->FindSctFrm();
if( pSect != this )
- return FALSE;
+ return sal_False;
// Den Inhalt zur Seite stellen
SwFrm* pSav = ::SaveCntnt( this, bApres ? pOther : pFrm );
ASSERT( pSav, "SplitSect: What's on?" );
@@ -562,7 +562,7 @@ BOOL SwSectionFrm::SplitSect( SwFrm* pFrm, BOOL bApres )
pNew->InsertBehind( pSect->GetUpper(), pSect );
pNew->Init();
SWRECTFN( this )
- (pNew->*fnRect->fnMakePos)( NULL, pSect, TRUE );
+ (pNew->*fnRect->fnMakePos)( NULL, pSect, sal_True );
// OD 25.03.2003 #108339# - restore content:
// determine layout frame for restoring content after the initialization
// of the section frame. In the section initialization the columns are
@@ -580,9 +580,9 @@ BOOL SwSectionFrm::SplitSect( SwFrm* pFrm, BOOL bApres )
pNew->SetFollow( GetFollow() );
SetFollow( NULL );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -602,7 +602,7 @@ BOOL SwSectionFrm::SplitSect( SwFrm* pFrm, BOOL bApres )
// Wenn ein mehrspaltiger Bereich aufgehoben wird, muessen die ContentFrms
// invalidiert werden
-void lcl_InvalidateInfFlags( SwFrm* pFrm, BOOL bInva )
+void lcl_InvalidateInfFlags( SwFrm* pFrm, sal_Bool bInva )
{
while ( pFrm )
{
@@ -614,7 +614,7 @@ void lcl_InvalidateInfFlags( SwFrm* pFrm, BOOL bInva )
pFrm->_InvalidatePrt();
}
if( pFrm->IsLayoutFrm() )
- lcl_InvalidateInfFlags( ((SwLayoutFrm*)pFrm)->GetLower(), FALSE );
+ lcl_InvalidateInfFlags( ((SwLayoutFrm*)pFrm)->GetLower(), sal_False );
pFrm = pFrm->GetNext();
}
}
@@ -639,10 +639,10 @@ SwCntntFrm* lcl_GetNextCntntFrm( const SwLayoutFrm* pLay, bool bFwd )
// #100926#
const SwFrm* pFrm = pLay;
SwCntntFrm *pCntntFrm = 0;
- BOOL bGoingUp = TRUE;
+ sal_Bool bGoingUp = sal_True;
do {
const SwFrm *p = 0;
- BOOL bGoingFwdOrBwd = FALSE, bGoingDown = FALSE;
+ sal_Bool bGoingFwdOrBwd = sal_False, bGoingDown = sal_False;
bGoingDown = !bGoingUp && ( 0 != ( p = pFrm->IsLayoutFrm() ? ((SwLayoutFrm*)pFrm)->Lower() : 0 ) );
if ( !bGoingDown )
@@ -674,9 +674,9 @@ SwCntntFrm* lcl_GetNextCntntFrm( const SwLayoutFrm* pLay, bool bFwd )
? pLayFrm->GetNextLayoutLeaf() \
: pLayFrm )
-void SwSectionFrm::MoveCntntAndDelete( SwSectionFrm* pDel, BOOL bSave )
+void SwSectionFrm::MoveCntntAndDelete( SwSectionFrm* pDel, sal_Bool bSave )
{
- BOOL bSize = pDel->Lower() && pDel->Lower()->IsColumnFrm();
+ sal_Bool bSize = pDel->Lower() && pDel->Lower()->IsColumnFrm();
SwFrm* pPrv = pDel->GetPrev();
SwLayoutFrm* pUp = pDel->GetUpper();
// OD 27.03.2003 #i12711# - initialize local pointer variables.
@@ -713,13 +713,13 @@ void SwSectionFrm::MoveCntntAndDelete( SwSectionFrm* pDel, BOOL bSave )
// Jetzt wird der Inhalt beseite gestellt und der Frame zerstoert
SwFrm *pSave = bSave ? ::SaveCntnt( pDel ) : NULL;
- BOOL bOldFtn = TRUE;
+ sal_Bool bOldFtn = sal_True;
if( pSave && pUp->IsFtnFrm() )
{
bOldFtn = ((SwFtnFrm*)pUp)->IsColLocked();
((SwFtnFrm*)pUp)->ColLock();
}
- pDel->DelEmpty( TRUE );
+ pDel->DelEmpty( sal_True );
delete pDel;
if( pParent )
{ // Hier wird die geeignete Einfuegeposition gesucht
@@ -756,7 +756,7 @@ void SwSectionFrm::MoveCntntAndDelete( SwSectionFrm* pDel, BOOL bSave )
pPrvSct->InsertBehind( pUp, pPrv );
pPrvSct->Init();
SWRECTFN( pUp )
- (pPrvSct->*fnRect->fnMakePos)( pUp, pPrv, TRUE );
+ (pPrvSct->*fnRect->fnMakePos)( pUp, pPrv, sal_True );
pUp = FIRSTLEAF( pPrvSct );
pPrv = NULL;
}
@@ -792,10 +792,10 @@ void SwSectionFrm::MakeAll()
if( GetUpper() )
{
SWRECTFN( GetUpper() )
- (this->*fnRect->fnMakePos)( GetUpper(), GetPrev(), FALSE );
+ (this->*fnRect->fnMakePos)( GetUpper(), GetPrev(), sal_False );
}
}
- bValidSize = bValidPos = bValidPrtArea = TRUE;
+ bValidSize = bValidPos = bValidPrtArea = sal_True;
return;
}
LockJoin(); //Ich lass mich nicht unterwegs vernichten.
@@ -824,8 +824,8 @@ void SwSectionFrm::MakeAll()
// Ein Bereich mit Follow nimmt allen Platz bis zur Unterkante des Uppers
// in Anspruch. Bewegt er sich, so kann seine Groesse zu- oder abnehmen...
- if( !bValidPos && ToMaximize( FALSE ) )
- bValidSize = FALSE;
+ if( !bValidPos && ToMaximize( sal_False ) )
+ bValidSize = sal_False;
#if OSL_DEBUG_LEVEL > 1
const SwFmtCol &rCol = GetFmt()->GetCol();
@@ -834,13 +834,13 @@ void SwSectionFrm::MakeAll()
SwLayoutFrm::MakeAll();
UnlockJoin();
if( pSection && IsSuperfluous() )
- DelEmpty( FALSE );
+ DelEmpty( sal_False );
}
-BOOL SwSectionFrm::ShouldBwdMoved( SwLayoutFrm *, BOOL , BOOL & )
+sal_Bool SwSectionFrm::ShouldBwdMoved( SwLayoutFrm *, sal_Bool , sal_Bool & )
{
- ASSERT( FALSE, "Hups, wo ist meine Tarnkappe?" );
- return FALSE;
+ ASSERT( sal_False, "Hups, wo ist meine Tarnkappe?" );
+ return sal_False;
}
const SwSectionFmt* SwSectionFrm::_GetEndSectFmt() const
@@ -857,7 +857,7 @@ const SwSectionFmt* SwSectionFrm::_GetEndSectFmt() const
}
void lcl_FindCntntFrm( SwCntntFrm* &rpCntntFrm, SwFtnFrm* &rpFtnFrm,
- SwFrm* pFrm, BOOL &rbChkFtn )
+ SwFrm* pFrm, sal_Bool &rbChkFtn )
{
if( pFrm )
{
@@ -886,7 +886,7 @@ void lcl_FindCntntFrm( SwCntntFrm* &rpCntntFrm, SwFtnFrm* &rpFtnFrm,
}
}
-SwCntntFrm *SwSectionFrm::FindLastCntnt( BYTE nMode )
+SwCntntFrm *SwSectionFrm::FindLastCntnt( sal_uInt8 nMode )
{
SwCntntFrm *pRet = NULL;
SwFtnFrm *pFtnFrm = NULL;
@@ -907,9 +907,9 @@ SwCntntFrm *SwSectionFrm::FindLastCntnt( BYTE nMode )
pSect = (SwSectionFrm*)pTmp;
else
break;
- } while( TRUE );
+ } while( sal_True );
}
- BOOL bFtnFound = nMode == FINDMODE_ENDNOTE;
+ sal_Bool bFtnFound = nMode == FINDMODE_ENDNOTE;
do
{
lcl_FindCntntFrm( pRet, pFtnFrm, pSect->Lower(), bFtnFound );
@@ -923,16 +923,16 @@ SwCntntFrm *SwSectionFrm::FindLastCntnt( BYTE nMode )
return pRet;
}
-BOOL SwSectionFrm::CalcMinDiff( SwTwips& rMinDiff ) const
+sal_Bool SwSectionFrm::CalcMinDiff( SwTwips& rMinDiff ) const
{
- if( ToMaximize( TRUE ) )
+ if( ToMaximize( sal_True ) )
{
SWRECTFN( this )
rMinDiff = (GetUpper()->*fnRect->fnGetPrtBottom)();
rMinDiff = (Frm().*fnRect->fnBottomDist)( rMinDiff );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -949,7 +949,7 @@ BOOL SwSectionFrm::CalcMinDiff( SwTwips& rMinDiff ) const
*
*************************************************************************/
-SwFtnFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, BOOL &rbEmpty,
+SwFtnFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, sal_Bool &rbEmpty,
SwLayouter *pLayouter )
{
// if rEmpty is set, the rpSect is already searched
@@ -991,16 +991,16 @@ SwFtnFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, BOOL &rbEmpty,
}
rpSect = pSect;
pSect = pLayouter ? pSect->GetFollow() : NULL;
- rbEmpty = TRUE;
+ rbEmpty = sal_True;
}
return NULL;
}
-void lcl_ColumnRefresh( SwSectionFrm* pSect, BOOL bFollow )
+void lcl_ColumnRefresh( SwSectionFrm* pSect, sal_Bool bFollow )
{
while( pSect )
{
- BOOL bOldLock = pSect->IsColLocked();
+ sal_Bool bOldLock = pSect->IsColLocked();
pSect->ColLock();
if( pSect->Lower() && pSect->Lower()->IsColumnFrm() )
{
@@ -1031,19 +1031,19 @@ void SwSectionFrm::CollectEndnotes( SwLayouter* pLayouter )
SwSectionFrm* pSect = this;
SwFtnFrm* pFtn;
- BOOL bEmpty = FALSE;
+ sal_Bool bEmpty = sal_False;
// pSect is the last sectionfrm without endnotes or the this-pointer
// the first sectionfrm with endnotes may be destroyed, when the endnotes
// is cutted
while( 0 != (pFtn = lcl_FindEndnote( pSect, bEmpty, pLayouter )) )
pLayouter->CollectEndnote( pFtn );
if( pLayouter->HasEndnotes() )
- lcl_ColumnRefresh( this, TRUE );
+ lcl_ColumnRefresh( this, sal_True );
}
/*************************************************************************
|*
-|* SwSectionFrm::_CheckClipping( BOOL bGrow, BOOL bMaximize )
+|* SwSectionFrm::_CheckClipping( sal_Bool bGrow, sal_Bool bMaximize )
|*
|* Beschreibung: Passt die Groesse an die Umgebung an.
|* Wer einen Follow oder Fussnoten besitzt, soll bis zur Unterkante
@@ -1056,7 +1056,7 @@ void SwSectionFrm::CollectEndnotes( SwLayouter* pLayouter )
/// OD 18.09.2002 #100522#
/// perform calculation of content, only if height has changed.
-void SwSectionFrm::_CheckClipping( BOOL bGrow, BOOL bMaximize )
+void SwSectionFrm::_CheckClipping( sal_Bool bGrow, sal_Bool bMaximize )
{
SWRECTFN( this )
long nDiff;
@@ -1087,7 +1087,7 @@ void SwSectionFrm::_CheckClipping( BOOL bGrow, BOOL bMaximize )
if( !bCalc && !bGrow && IsAnyNoteAtEnd() && !IsInFtn() )
{
SwSectionFrm *pSect = this;
- BOOL bEmpty = FALSE;
+ sal_Bool bEmpty = sal_False;
SwLayoutFrm* pFtn = IsEndnAtEnd() ?
lcl_FindEndnote( pSect, bEmpty, NULL ) : NULL;
if( pFtn )
@@ -1135,7 +1135,7 @@ void SwSectionFrm::_CheckClipping( BOOL bGrow, BOOL bMaximize )
{
if( Lower()->IsColumnFrm() )
{
- lcl_ColumnRefresh( this, FALSE );
+ lcl_ColumnRefresh( this, sal_False );
::CalcCntnt( this );
}
else
@@ -1161,8 +1161,8 @@ void SwSectionFrm::SimpleFormat()
// assure notifications on position changes.
const SwLayNotify aNotify( this );
// <--
- (this->*fnRect->fnMakePos)( GetUpper(), GetPrev(), FALSE );
- bValidPos = TRUE;
+ (this->*fnRect->fnMakePos)( GetUpper(), GetPrev(), sal_False );
+ bValidPos = sal_True;
}
SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
// OD 22.10.2002 #97265# - call always method <lcl_ColumnRefresh(..)>, in
@@ -1176,7 +1176,7 @@ void SwSectionFrm::SimpleFormat()
nTop = nHeight;
(this->*fnRect->fnSetYMargins)( nTop, 0 );
}
- lcl_ColumnRefresh( this, FALSE );
+ lcl_ColumnRefresh( this, sal_False );
UnlockJoin();
}
@@ -1334,14 +1334,14 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
{
ASSERT( GetFmt()->GetDoc()->GetRootFrm()->IsInDelList( this ),
"SectionFrm without Section" );
- bValidSize = bValidPos = bValidPrtArea = TRUE;
+ bValidSize = bValidPos = bValidPrtArea = sal_True;
return;
}
SWRECTFN( this )
if ( !bValidPrtArea )
{
PROTOCOL( this, PROT_PRTAREA, 0, 0 )
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
SwTwips nUpper = CalcUpperSpace();
// #109700# LRSpace for sections
@@ -1350,7 +1350,7 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
if( nUpper != (this->*fnRect->fnGetTopMargin)() )
{
- bValidSize = FALSE;
+ bValidSize = sal_False;
SwFrm* pOwn = ContainsAny();
if( pOwn )
pOwn->_InvalidatePos();
@@ -1362,16 +1362,16 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
{
PROTOCOL_ENTER( this, PROT_SIZE, 0, 0 )
const long nOldHeight = (Frm().*fnRect->fnGetHeight)();
- BOOL bOldLock = IsColLocked();
+ sal_Bool bOldLock = IsColLocked();
ColLock();
- bValidSize = TRUE;
+ bValidSize = sal_True;
//die Groesse wird nur dann vom Inhalt bestimmt, wenn der SectFrm
//keinen Follow hat. Anderfalls fuellt er immer den Upper bis
//zur Unterkante aus. Fuer den Textfluss ist nicht er, sondern sein
//Inhalt selbst verantwortlich.
- BOOL bMaximize = ToMaximize( FALSE );
+ sal_Bool bMaximize = ToMaximize( sal_False );
// OD 2004-05-17 #i28701# - If the wrapping style has to be considered
// on object positioning, an extra formatting has to be performed
@@ -1394,7 +1394,7 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
// which still have a width of 0.
const sal_Bool bHasColumns = Lower() && Lower()->IsColumnFrm();
if ( bHasColumns && Lower()->GetNext() )
- AdjustColumns( 0, FALSE );
+ AdjustColumns( 0, sal_False );
if( GetUpper() )
{
@@ -1410,8 +1410,8 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
// Thus, set <..IsBrowseMode()> as parameter <bGrow> on calling
// method <_CheckClipping(..)>.
_CheckClipping( GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE), bMaximize );
- bMaximize = ToMaximize( FALSE );
- bValidSize = TRUE;
+ bMaximize = ToMaximize( sal_False );
+ bValidSize = sal_True;
}
//Breite der Spalten pruefen und ggf. einstellen.
@@ -1440,11 +1440,11 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
// <--
{
SwFrm* pOld = GetFollow();
- GetFollow()->DelEmpty( FALSE );
+ GetFollow()->DelEmpty( sal_False );
if( pOld == GetFollow() )
break;
}
- bMaximize = ToMaximize( FALSE );
+ bMaximize = ToMaximize( sal_False );
nRemaining += (pFrm->Frm().*fnRect->fnGetHeight)();
}
else
@@ -1478,7 +1478,7 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
long nTmpDiff = (*fnRect->fnYDiff)( nBottom, nDeadLine );
if( nTmpDiff > 0 )
{
- nTmpDiff = GetUpper()->Grow( nTmpDiff, TRUE );
+ nTmpDiff = GetUpper()->Grow( nTmpDiff, sal_True );
nDeadLine = (*fnRect->fnYInc)( nDeadLine, nTmpDiff );
nTmpDiff = (*fnRect->fnYDiff)( nBottom, nDeadLine );
if( nTmpDiff > 0 )
@@ -1512,13 +1512,13 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
pFrm = ((SwLayoutFrm*)pFrm)->Lower();
CalcFtnCntnt();
}
- BOOL bUnderSz = FALSE;
+ sal_Bool bUnderSz = sal_False;
while( pFrm )
{
if( pFrm->IsTxtFrm() && ((SwTxtFrm*)pFrm)->IsUndersized() )
{
pFrm->Prepare( PREP_ADJUST_FRM );
- bUnderSz = TRUE;
+ bUnderSz = sal_True;
}
pFrm = pFrm->GetNext();
}
@@ -1531,7 +1531,7 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
//Unterkante des Uppers nicht ueberschreiten. Fuer Sections mit
//Follows die Unterkante auch nicht unterschreiten.
if ( GetUpper() )
- _CheckClipping( TRUE, bMaximize );
+ _CheckClipping( sal_True, bMaximize );
if( !bOldLock )
ColUnlock();
long nDiff = nOldHeight - (Frm().*fnRect->fnGetHeight)();
@@ -1543,7 +1543,7 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
GetUpper()->Shrink( nDiff );
}
if( IsUndersized() )
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
}
}
@@ -1553,7 +1553,7 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
|*
|* Beschreibung Liefert das naechste Layoutblatt in das der Frame
|* gemoved werden kann.
-|* Neue Seiten werden nur dann erzeugt, wenn der Parameter TRUE ist.
+|* Neue Seiten werden nur dann erzeugt, wenn der Parameter sal_True ist.
|* Ersterstellung AMA 07. Jan. 98
|* Letzte Aenderung AMA 07. Jan. 98
|*
@@ -1582,7 +1582,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
//GetLeaf gerufen wird.
// SwSectionFrm *pSect = GetUpper()->FindSctFrm();
SwSectionFrm *pSect = FindSctFrm();
- BOOL bWrongPage = FALSE;
+ sal_Bool bWrongPage = sal_False;
ASSERT( pSect, "GetNextSctLeaf: Missing SectionFrm" );
// Hier eine Abkuerzung fuer Bereiche mit Follows,
@@ -1595,7 +1595,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
{
SwPageFrm *pPg = pSect->GetFollow()->FindPageFrm();
if( WrongPageDesc( pPg ) )
- bWrongPage = TRUE;
+ bWrongPage = sal_True;
else
return FIRSTLEAF( pSect->GetFollow() );
}
@@ -1623,7 +1623,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
SwPageFrm* pNxtPg = pUp->IsPageFrm() ?
(SwPageFrm*)pUp : pUp->FindPageFrm();
if( WrongPageDesc( pNxtPg ) )
- bWrongPage = TRUE;
+ bWrongPage = sal_True;
else
return FIRSTLEAF( pSect->GetFollow() );
}
@@ -1632,8 +1632,8 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
}
// Immer im gleichen Bereich landen: Body wieder in Body etc.
- const BOOL bBody = IsInDocBody();
- const BOOL bFtnPage = FindPageFrm()->IsFtnPage();
+ const sal_Bool bBody = IsInDocBody();
+ const sal_Bool bFtnPage = FindPageFrm()->IsFtnPage();
SwLayoutFrm *pLayLeaf;
// Eine Abkuerzung fuer TabFrms, damit nicht alle Zellen abgehuehnert werden
@@ -1658,7 +1658,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
//nicht wieder vom Anfang gesucht
//wird.
- while( TRUE )
+ while( sal_True )
{
if( pLayLeaf )
{
@@ -1689,7 +1689,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
if( bWrongPage )
break; // there's a column between me and my right page
pLayLeaf = 0;
- bWrongPage = TRUE;
+ bWrongPage = sal_True;
pOldLayLeaf = 0;
continue;
}
@@ -1701,7 +1701,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
( eMakePage == MAKEPAGE_APPEND || eMakePage == MAKEPAGE_INSERT ) )
{
InsertPage(pOldLayLeaf ? pOldLayLeaf->FindPageFrm() : FindPageFrm(),
- FALSE );
+ sal_False );
//und nochmal das ganze
pLayLeaf = pOldLayLeaf ? pOldLayLeaf : GetNextLayoutLeaf();
continue;
@@ -1727,11 +1727,11 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
return pLayLeaf;
else
{
- pNew = new SwSectionFrm( *pSect, FALSE );
+ pNew = new SwSectionFrm( *pSect, sal_False );
pNew->InsertBefore( pLayLeaf, pLayLeaf->Lower() );
pNew->Init();
SWRECTFN( pNew )
- (pNew->*fnRect->fnMakePos)( pLayLeaf, NULL, TRUE );
+ (pNew->*fnRect->fnMakePos)( pLayLeaf, NULL, sal_True );
// Wenn unser Bereichsframe einen Nachfolger hat, so muss dieser
// umgehaengt werden hinter den neuen Follow der Bereichsframes.
@@ -1765,13 +1765,13 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
}
if( pNxtCntnt )
{
- SwFtnBossFrm* pOldBoss = pSect->FindFtnBossFrm( TRUE );
- if( pOldBoss == pNxtCntnt->FindFtnBossFrm( TRUE ) )
+ SwFtnBossFrm* pOldBoss = pSect->FindFtnBossFrm( sal_True );
+ if( pOldBoss == pNxtCntnt->FindFtnBossFrm( sal_True ) )
{
SwSaveFtnHeight aHeight( pOldBoss,
pOldBoss->Frm().Top() + pOldBoss->Frm().Height() );
pSect->GetUpper()->MoveLowerFtns( pNxtCntnt, pOldBoss,
- pLayLeaf->FindFtnBossFrm( TRUE ), FALSE );
+ pLayLeaf->FindFtnBossFrm( sal_True ), sal_False );
}
}
((SwFlowFrm*)pNxt)->MoveSubTree( pLayLeaf, pNew->GetNext() );
@@ -1809,7 +1809,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
pCol = GetUpper()->GetUpper();
else
pCol = NULL;
- BOOL bJump = FALSE;
+ sal_Bool bJump = sal_False;
if( pCol )
{
if( pCol->GetPrev() )
@@ -1821,10 +1821,10 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
if( ((SwLayoutFrm*)pCol->Lower())->Lower() )
{
if( bJump ) // Haben wir eine leere Spalte uebersprungen?
- SwFlowFrm::SetMoveBwdJump( TRUE );
+ SwFlowFrm::SetMoveBwdJump( sal_True );
return (SwLayoutFrm*)pCol->Lower(); // Der Spaltenbody
}
- bJump = TRUE;
+ bJump = sal_True;
} while( pCol->GetPrev() );
// Hier landen wir, wenn alle Spalten leer sind,
@@ -1836,7 +1836,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
}
if( bJump ) // Haben wir eine leere Spalte uebersprungen?
- SwFlowFrm::SetMoveBwdJump( TRUE );
+ SwFlowFrm::SetMoveBwdJump( sal_True );
// Innerhalb von Bereichen in Tabellen oder Bereichen in Kopf/Fusszeilen kann
// nur ein Spaltenwechsel erfolgen, eine der oberen Abkuerzungen haette
@@ -1875,8 +1875,8 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
}
}
- const BOOL bBody = IsInDocBody();
- const BOOL bFly = IsInFly();
+ const sal_Bool bBody = IsInDocBody();
+ const sal_Bool bFly = IsInFly();
SwLayoutFrm *pLayLeaf = GetPrevLayoutLeaf();
SwLayoutFrm *pPrevLeaf = 0;
@@ -1914,7 +1914,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
pPrevLeaf = pLayLeaf;
pLayLeaf = pLayLeaf->GetPrevLayoutLeaf();
if ( pLayLeaf )
- SwFlowFrm::SetMoveBwdJump( TRUE );
+ SwFlowFrm::SetMoveBwdJump( sal_True );
}
else if ( bFly )
break; //Cntnts in Flys sollte jedes Layout-Blatt recht sein. Warum?
@@ -1947,11 +1947,11 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
}
if( !pNew )
{
- pNew = new SwSectionFrm( *pSect, TRUE );
+ pNew = new SwSectionFrm( *pSect, sal_True );
pNew->InsertBefore( pLayLeaf, NULL );
pNew->Init();
SWRECTFN( pNew )
- (pNew->*fnRect->fnMakePos)( pLayLeaf, pNew->GetPrev(), TRUE );
+ (pNew->*fnRect->fnMakePos)( pLayLeaf, pNew->GetPrev(), sal_True );
pLayLeaf = FIRSTLEAF( pNew );
if( !pNew->Lower() ) // einspaltige Bereiche formatieren
@@ -1980,7 +1980,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
if( pLayLeaf != pTmpLay )
{
pLayLeaf = pTmpLay;
- SwFlowFrm::SetMoveBwdJump( TRUE );
+ SwFlowFrm::SetMoveBwdJump( sal_True );
}
}
}
@@ -2008,14 +2008,14 @@ SwTwips lcl_DeadLine( const SwFrm* pFrm )
// SwSectionFrm::Growable(..) prueft, ob der SectionFrm noch wachsen kann,
// ggf. muss die Umgebung gefragt werden
-BOOL SwSectionFrm::Growable() const
+sal_Bool SwSectionFrm::Growable() const
{
SWRECTFN( this )
if( (*fnRect->fnYDiff)( lcl_DeadLine( this ),
(Frm().*fnRect->fnGetBottom)() ) > 0 )
- return TRUE;
+ return sal_True;
- return ( GetUpper() && ((SwFrm*)GetUpper())->Grow( LONG_MAX, TRUE ) );
+ return ( GetUpper() && ((SwFrm*)GetUpper())->Grow( LONG_MAX, sal_True ) );
}
/*************************************************************************
@@ -2027,7 +2027,7 @@ BOOL SwSectionFrm::Growable() const
|*
|*************************************************************************/
-SwTwips SwSectionFrm::_Grow( SwTwips nDist, BOOL bTst )
+SwTwips SwSectionFrm::_Grow( SwTwips nDist, sal_Bool bTst )
{
if ( !IsColLocked() && !HasFixSize() )
{
@@ -2039,7 +2039,7 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, BOOL bTst )
if ( nDist <= 0L )
return 0L;
- BOOL bInCalcCntnt = GetUpper() && IsInFly() && FindFlyFrm()->IsLocked();
+ sal_Bool bInCalcCntnt = GetUpper() && IsInFly() && FindFlyFrm()->IsLocked();
// OD 2004-03-15 #116561# - allow grow in online layout
if ( !Lower() || !Lower()->IsColumnFrm() || !Lower()->GetNext() ||
GetSection()->GetFmt()->GetBalancedColumns().GetValue() ||
@@ -2056,7 +2056,7 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, BOOL bTst )
}
SwTwips nSpace = nGrow;
if( !bInCalcCntnt && nGrow < nDist && GetUpper() )
- nGrow += GetUpper()->Grow( LONG_MAX, TRUE );
+ nGrow += GetUpper()->Grow( LONG_MAX, sal_True );
if( nGrow > nDist )
nGrow = nDist;
@@ -2076,7 +2076,7 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, BOOL bTst )
if( bInCalcCntnt )
_InvalidateSize();
else if( nSpace < nGrow && nDist != nSpace + GetUpper()->
- Grow( nGrow - nSpace, FALSE ) )
+ Grow( nGrow - nSpace, sal_False ) )
InvalidateSize();
else
{
@@ -2141,11 +2141,11 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, BOOL bTst )
return 0L;
}
-SwTwips SwSectionFrm::_Shrink( SwTwips nDist, BOOL bTst )
+SwTwips SwSectionFrm::_Shrink( SwTwips nDist, sal_Bool bTst )
{
if ( Lower() && !IsColLocked() && !HasFixSize() )
{
- if( ToMaximize( FALSE ) )
+ if( ToMaximize( sal_False ) )
{
if( !bTst )
InvalidateSize();
@@ -2245,12 +2245,12 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, BOOL bTst )
|*
|*************************************************************************/
-BOOL SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const
+sal_Bool SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const
{
// Gibt es einen Follow oder ist der Frame nicht in der letzten Spalte?
if( HasFollow() || ( pFrm->GetUpper()->IsColBodyFrm() &&
pFrm->GetUpper()->GetUpper()->GetNext() ) )
- return TRUE;
+ return sal_True;
if( pFrm->IsInFtn() )
{
if( IsInFtn() )
@@ -2258,11 +2258,11 @@ BOOL SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const
if( GetUpper()->IsInSct() )
{
if( Growable() )
- return FALSE;
+ return sal_False;
return GetUpper()->FindSctFrm()->MoveAllowed( this );
}
else
- return TRUE;
+ return sal_True;
}
// The content of footnote inside a columned sectionfrm is moveable
// except in the last column
@@ -2272,30 +2272,30 @@ BOOL SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const
// The first paragraph in the first footnote in the first column
// in the sectionfrm at the top of the page is not moveable,
// if the columnbody is empty.
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pLay->GetIndPrev() || pFrm->GetIndPrev() ||
pFrm->FindFtnFrm()->GetPrev() )
- bRet = TRUE;
+ bRet = sal_True;
else
{
SwLayoutFrm* pBody = ((SwColumnFrm*)pLay)->FindBodyCont();
if( pBody && pBody->Lower() )
- bRet = TRUE;
+ bRet = sal_True;
}
if( bRet && ( IsFtnAtEnd() || !Growable() ) )
- return TRUE;
+ return sal_True;
}
}
// Oder kann der Bereich noch wachsen?
if( !IsColLocked() && Growable() )
- return FALSE;
+ return sal_False;
// Jetzt muss untersucht werden, ob es ein Layoutblatt gibt, in dem
// ein Bereichsfollow erzeugt werden kann.
if( IsInTab() || ( !IsInDocBody() && FindFooterOrHeader() ) )
- return FALSE; // In Tabellen/Kopf/Fusszeilen geht es nicht
+ return sal_False; // In Tabellen/Kopf/Fusszeilen geht es nicht
if( IsInFly() ) // Bei spaltigen oder verketteten Rahmen
return 0 != ((SwFrm*)GetUpper())->GetNextLeaf( MAKEPAGE_NONE );
- return TRUE;
+ return sal_True;
}
/** Called for a frame inside a section with no direct previous frame (or only
@@ -2369,25 +2369,25 @@ SwFrm* SwFrm::_GetIndNext()
return NULL;
}
-BOOL SwSectionFrm::IsDescendantFrom( const SwSectionFmt* pFmt ) const
+sal_Bool SwSectionFrm::IsDescendantFrom( const SwSectionFmt* pFmt ) const
{
if( !pSection || !pFmt )
- return FALSE;
+ return sal_False;
const SwSectionFmt *pMyFmt = pSection->GetFmt();
while( pFmt != pMyFmt )
{
if( pMyFmt->GetRegisteredIn()->ISA( SwSectionFmt ) )
pMyFmt = (SwSectionFmt*)pMyFmt->GetRegisteredIn();
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void SwSectionFrm::CalcFtnAtEndFlag()
{
SwSectionFmt *pFmt = GetSection()->GetFmt();
- USHORT nVal = pFmt->GetFtnAtTxtEnd( FALSE ).GetValue();
+ sal_uInt16 nVal = pFmt->GetFtnAtTxtEnd( sal_False ).GetValue();
bFtnAtEnd = FTNEND_ATPGORDOCEND != nVal;
bOwnFtnNum = FTNEND_ATTXTEND_OWNNUMSEQ == nVal ||
FTNEND_ATTXTEND_OWNNUMANDFMT == nVal;
@@ -2397,32 +2397,32 @@ void SwSectionFrm::CalcFtnAtEndFlag()
pFmt = (SwSectionFmt*)pFmt->GetRegisteredIn();
else
break;
- nVal = pFmt->GetFtnAtTxtEnd( FALSE ).GetValue();
+ nVal = pFmt->GetFtnAtTxtEnd( sal_False ).GetValue();
if( FTNEND_ATPGORDOCEND != nVal )
{
- bFtnAtEnd = TRUE;
+ bFtnAtEnd = sal_True;
bOwnFtnNum = bOwnFtnNum ||FTNEND_ATTXTEND_OWNNUMSEQ == nVal ||
FTNEND_ATTXTEND_OWNNUMANDFMT == nVal;
}
}
}
-BOOL SwSectionFrm::IsEndnoteAtMyEnd() const
+sal_Bool SwSectionFrm::IsEndnoteAtMyEnd() const
{
- return pSection->GetFmt()->GetEndAtTxtEnd( FALSE ).IsAtEnd();
+ return pSection->GetFmt()->GetEndAtTxtEnd( sal_False ).IsAtEnd();
}
void SwSectionFrm::CalcEndAtEndFlag()
{
SwSectionFmt *pFmt = GetSection()->GetFmt();
- bEndnAtEnd = pFmt->GetEndAtTxtEnd( FALSE ).IsAtEnd();
+ bEndnAtEnd = pFmt->GetEndAtTxtEnd( sal_False ).IsAtEnd();
while( !bEndnAtEnd )
{
if( pFmt->GetRegisteredIn()->ISA( SwSectionFmt ) )
pFmt = (SwSectionFmt*)pFmt->GetRegisteredIn();
else
break;
- bEndnAtEnd = pFmt->GetEndAtTxtEnd( FALSE ).IsAtEnd();
+ bEndnAtEnd = pFmt->GetEndAtTxtEnd( sal_False ).IsAtEnd();
}
}
@@ -2437,7 +2437,7 @@ void SwSectionFrm::CalcEndAtEndFlag()
void SwSectionFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
- BYTE nInvFlags = 0;
+ sal_uInt8 nInvFlags = 0;
if( pNew && RES_ATTRSET_CHG == pNew->Which() )
{
@@ -2445,7 +2445,7 @@ void SwSectionFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() );
SwAttrSetChg aOldSet( *(SwAttrSetChg*)pOld );
SwAttrSetChg aNewSet( *(SwAttrSetChg*)pNew );
- while( TRUE )
+ while( sal_True )
{
_UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
@@ -2471,11 +2471,11 @@ void SwSectionFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
- BYTE &rInvFlags,
+ sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
- BOOL bClear = TRUE;
- const USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_Bool bClear = sal_True;
+ const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
switch( nWhich )
{ // Mehrspaltigkeit in Fussnoten unterdruecken...
case RES_FMT_CHG:
@@ -2490,7 +2490,7 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
SwFmtCol aCol;
if ( Lower() && Lower()->IsColumnFrm() )
{
- USHORT nCol = 0;
+ sal_uInt16 nCol = 0;
SwFrm *pTmp = Lower();
do
{ ++nCol;
@@ -2498,9 +2498,9 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
} while ( pTmp );
aCol.Init( nCol, 0, 1000 );
}
- BOOL bChgFtn = IsFtnAtEnd();
- BOOL bChgEndn = IsEndnAtEnd();
- BOOL bChgMyEndn = IsEndnoteAtMyEnd();
+ sal_Bool bChgFtn = IsFtnAtEnd();
+ sal_Bool bChgEndn = IsEndnAtEnd();
+ sal_Bool bChgMyEndn = IsEndnoteAtMyEnd();
CalcFtnAtEndFlag();
CalcEndAtEndFlag();
bChgFtn = ( bChgFtn != IsFtnAtEnd() ) ||
@@ -2510,7 +2510,7 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
rInvFlags |= 0x10;
}
rInvFlags |= 0x01;
- bClear = FALSE;
+ bClear = sal_False;
}
break;
@@ -2525,12 +2525,12 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
case RES_FTN_AT_TXTEND:
if( !IsInFtn() )
{
- BOOL bOld = IsFtnAtEnd();
+ sal_Bool bOld = IsFtnAtEnd();
CalcFtnAtEndFlag();
if( bOld != IsFtnAtEnd() )
{
const SwFmtCol& rNewCol = GetFmt()->GetCol();
- ChgColumns( rNewCol, rNewCol, TRUE );
+ ChgColumns( rNewCol, rNewCol, sal_True );
rInvFlags |= 0x01;
}
}
@@ -2539,13 +2539,13 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
case RES_END_AT_TXTEND:
if( !IsInFtn() )
{
- BOOL bOld = IsEndnAtEnd();
- BOOL bMyOld = IsEndnoteAtMyEnd();
+ sal_Bool bOld = IsEndnAtEnd();
+ sal_Bool bMyOld = IsEndnoteAtMyEnd();
CalcEndAtEndFlag();
if( bOld != IsEndnAtEnd() || bMyOld != IsEndnoteAtMyEnd())
{
const SwFmtCol& rNewCol = GetFmt()->GetCol();
- ChgColumns( rNewCol, rNewCol, TRUE );
+ ChgColumns( rNewCol, rNewCol, sal_True );
rInvFlags |= 0x01;
}
}
@@ -2568,7 +2568,7 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
break;
default:
- bClear = FALSE;
+ bClear = sal_False;
}
if ( bClear )
{
@@ -2589,28 +2589,28 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
* page causes a maximal Size of the sectionframe.
* --------------------------------------------------*/
-BOOL SwSectionFrm::ToMaximize( BOOL bCheckFollow ) const
+sal_Bool SwSectionFrm::ToMaximize( sal_Bool bCheckFollow ) const
{
if( HasFollow() )
{
if( !bCheckFollow ) // Don't check superfluous follows
- return TRUE;
+ return sal_True;
const SwSectionFrm* pFoll = GetFollow();
while( pFoll && pFoll->IsSuperfluous() )
pFoll = pFoll->GetFollow();
if( pFoll )
- return TRUE;
+ return sal_True;
}
if( IsFtnAtEnd() )
- return FALSE;
+ return sal_False;
const SwFtnContFrm* pCont = ContainsFtnCont();
if( !IsEndnAtEnd() )
return 0 != pCont;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while( pCont && !bRet )
{
if( pCont->FindFootNote() )
- bRet = TRUE;
+ bRet = sal_True;
else
pCont = ContainsFtnCont( pCont );
}
@@ -2618,7 +2618,7 @@ BOOL SwSectionFrm::ToMaximize( BOOL bCheckFollow ) const
}
/*-----------------09.06.99 15:07-------------------
- * BOOL SwSectionFrm::ContainsFtnCont()
+ * sal_Bool SwSectionFrm::ContainsFtnCont()
* checks every Column for FtnContFrms.
* --------------------------------------------------*/
@@ -2668,13 +2668,13 @@ void SwSectionFrm::InvalidateFtnPos()
* Das Undersized-Flag wird ggf. korrigiert.
* --------------------------------------------------*/
-long SwSectionFrm::Undersize( BOOL bOverSize )
+long SwSectionFrm::Undersize( sal_Bool bOverSize )
{
- bUndersized = FALSE;
+ bUndersized = sal_False;
SWRECTFN( this )
long nRet = InnerHeight() - (Prt().*fnRect->fnGetHeight)();
if( nRet > 0 )
- bUndersized = TRUE;
+ bUndersized = sal_True;
else if( !bOverSize )
nRet = 0;
return nRet;
@@ -2733,7 +2733,7 @@ void SwRootFrm::InsertEmptySct( SwSectionFrm* pDel )
{
if( !pDestroy )
pDestroy = new SwDestroyList;
- USHORT nPos;
+ sal_uInt16 nPos;
if( !pDestroy->Seek_Entry( pDel, &nPos ) )
pDestroy->Insert( pDel );
}
@@ -2744,7 +2744,7 @@ void SwRootFrm::_DeleteEmptySct()
while( pDestroy->Count() )
{
SwSectionFrm* pSect = (*pDestroy)[0];
- pDestroy->Remove( USHORT(0) );
+ pDestroy->Remove( sal_uInt16(0) );
ASSERT( !pSect->IsColLocked() && !pSect->IsJoinLocked(),
"DeleteEmptySct: Locked SectionFrm" );
if( !pSect->Frm().HasArea() && !pSect->ContainsCntnt() )
@@ -2773,16 +2773,16 @@ void SwRootFrm::_DeleteEmptySct()
void SwRootFrm::_RemoveFromList( SwSectionFrm* pSct )
{
ASSERT( pDestroy, "Where's my list?" );
- USHORT nPos;
+ sal_uInt16 nPos;
if( pDestroy->Seek_Entry( pSct, &nPos ) )
pDestroy->Remove( nPos );
}
#ifdef DBG_UTIL
-BOOL SwRootFrm::IsInDelList( SwSectionFrm* pSct ) const
+sal_Bool SwRootFrm::IsInDelList( SwSectionFrm* pSct ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
return ( pDestroy && pDestroy->Seek_Entry( pSct, &nPos ) );
}
diff --git a/sw/source/core/layout/softpagebreak.cxx b/sw/source/core/layout/softpagebreak.cxx
index 4d487a2506ad..898581d3d870 100644
--- a/sw/source/core/layout/softpagebreak.cxx
+++ b/sw/source/core/layout/softpagebreak.cxx
@@ -99,7 +99,7 @@ void SwTxtNode::fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const
}
}
else // No soft page break if there's a "hard" page break attribute
- if( pFirst2 == pFrm && !pFrm->IsPageBreak( TRUE ) )
+ if( pFirst2 == pFrm && !pFrm->IsPageBreak( sal_True ) )
rBreak.insert( pFrm->GetOfst() );
}
}
@@ -125,7 +125,7 @@ bool SwTableLine::hasSoftPageBreak() const
// master table frames with "hard" page break attribute
if( pTab->GetIndPrev() || pTab->FindFooterOrHeader()
|| pTab->IsInFly() || pTab->GetUpper()->IsInTab() ||
- ( !pTab->IsFollow() && pTab->IsPageBreak( TRUE ) ) )
+ ( !pTab->IsFollow() && pTab->IsPageBreak( sal_True ) ) )
return false;
const SwPageFrm* pPage = pTab->FindPageFrm();
// No soft page break at the first page of the document
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index c0cef39294b8..fd0a0ce1f838 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -76,55 +76,55 @@ long SwFrm::GetPrtRight() const
long SwFrm::GetPrtTop() const
{ return Frm().Top() + Prt().Top(); }
-BOOL SwFrm::SetMinLeft( long nDeadline )
+sal_Bool SwFrm::SetMinLeft( long nDeadline )
{
SwTwips nDiff = nDeadline - Frm().Left();
if( nDiff > 0 )
{
Frm().Left( nDeadline );
Prt().Width( Prt().Width() - nDiff );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwFrm::SetMaxBottom( long nDeadline )
+sal_Bool SwFrm::SetMaxBottom( long nDeadline )
{
SwTwips nDiff = Frm().Top() + Frm().Height() - nDeadline;
if( nDiff > 0 )
{
Frm().Height( Frm().Height() - nDiff );
Prt().Height( Prt().Height() - nDiff );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwFrm::SetMinTop( long nDeadline )
+sal_Bool SwFrm::SetMinTop( long nDeadline )
{
SwTwips nDiff = nDeadline - Frm().Top();
if( nDiff > 0 )
{
Frm().Top( nDeadline );
Prt().Height( Prt().Height() - nDiff );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwFrm::SetMaxRight( long nDeadline )
+sal_Bool SwFrm::SetMaxRight( long nDeadline )
{
SwTwips nDiff = Frm().Left() + Frm().Width() - nDeadline;
if( nDiff > 0 )
{
Frm().Width( Frm().Width() - nDiff );
Prt().Width( Prt().Width() - nDiff );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-void SwFrm::MakeBelowPos( const SwFrm* pUp, const SwFrm* pPrv, BOOL bNotify )
+void SwFrm::MakeBelowPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
{
if( pPrv )
{
@@ -140,7 +140,7 @@ void SwFrm::MakeBelowPos( const SwFrm* pUp, const SwFrm* pPrv, BOOL bNotify )
aFrm.Pos().Y() += 1;
}
-void SwFrm::MakeUpperPos( const SwFrm* pUp, const SwFrm* pPrv, BOOL bNotify )
+void SwFrm::MakeUpperPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
{
if( pPrv )
{
@@ -157,7 +157,7 @@ void SwFrm::MakeUpperPos( const SwFrm* pUp, const SwFrm* pPrv, BOOL bNotify )
aFrm.Pos().Y() -= 1;
}
-void SwFrm::MakeLeftPos( const SwFrm* pUp, const SwFrm* pPrv, BOOL bNotify )
+void SwFrm::MakeLeftPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
{
if( pPrv )
{
@@ -174,7 +174,7 @@ void SwFrm::MakeLeftPos( const SwFrm* pUp, const SwFrm* pPrv, BOOL bNotify )
aFrm.Pos().X() -= 1;
}
-void SwFrm::MakeRightPos( const SwFrm* pUp, const SwFrm* pPrv, BOOL bNotify )
+void SwFrm::MakeRightPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
{
if( pPrv )
{
@@ -214,7 +214,7 @@ void SwFrm::SetRightLeftMargins( long nRight, long nLeft)
Prt().Width( Frm().Width() - nLeft - nRight );
}
-const USHORT nMinVertCellHeight = 1135;
+const sal_uInt16 nMinVertCellHeight = 1135;
/*-----------------11.9.2001 11:11------------------
* SwFrm::CheckDirChange(..)
@@ -224,12 +224,12 @@ const USHORT nMinVertCellHeight = 1135;
void SwFrm::CheckDirChange()
{
- BOOL bOldVert = GetVerticalFlag();
- BOOL bOldRev = IsReverse();
- BOOL bOldR2L = GetRightToLeftFlag();
- SetInvalidVert( TRUE );
- SetInvalidR2L( TRUE );
- BOOL bChg = bOldR2L != IsRightToLeft();
+ sal_Bool bOldVert = GetVerticalFlag();
+ sal_Bool bOldRev = IsReverse();
+ sal_Bool bOldR2L = GetRightToLeftFlag();
+ SetInvalidVert( sal_True );
+ SetInvalidR2L( sal_True );
+ sal_Bool bChg = bOldR2L != IsRightToLeft();
if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev )
{
InvalidateAll();
@@ -280,7 +280,7 @@ void SwFrm::CheckDirChange()
pFrm = pFrm->GetNext();
}
if( pCol )
- pBody->AdjustColumns( pCol, TRUE );
+ pBody->AdjustColumns( pCol, sal_True );
}
else if( IsTxtFrm() )
((SwTxtFrm*)this)->Prepare( PREP_CLEAR );
@@ -476,8 +476,8 @@ SwCntntFrm::~SwCntntFrm()
{
SwTxtNode *pTxtNd = ((SwTxtFrm*)this)->GetTxtNode();
const SwFtnIdxs &rFtnIdxs = pCNd->GetDoc()->GetFtnIdxs();
- USHORT nPos;
- ULONG nIndex = pCNd->GetIndex();
+ sal_uInt16 nPos;
+ sal_uLong nIndex = pCNd->GetIndex();
rFtnIdxs.SeekEntry( *pTxtNd, &nPos );
SwTxtFtn* pTxtFtn;
if( nPos < rFtnIdxs.Count() )
@@ -611,13 +611,13 @@ const SwRect SwFrm::PaintArea() const
// NEW TABLES
// Cell frames may not leave their upper:
SwRect aRect = IsRowFrm() ? GetUpper()->Frm() : Frm();
- const BOOL bVert = IsVertical();
+ const sal_Bool bVert = IsVertical();
SwRectFn fnRect = bVert ? fnRectVert : fnRectHori;
long nRight = (aRect.*fnRect->fnGetRight)();
long nLeft = (aRect.*fnRect->fnGetLeft)();
const SwFrm* pTmp = this;
- BOOL bLeft = TRUE;
- BOOL bRight = TRUE;
+ sal_Bool bLeft = sal_True;
+ sal_Bool bRight = sal_True;
long nRowSpan = 0;
while( pTmp )
{
@@ -647,25 +647,25 @@ const SwRect SwFrm::PaintArea() const
nRight = nTmpRight;
if( pTmp->IsPageFrm() || pTmp->IsFlyFrm() || pTmp->IsRootFrm() )
break;
- bLeft = FALSE;
- bRight = FALSE;
+ bLeft = sal_False;
+ bRight = sal_False;
}
else if( pTmp->IsColumnFrm() ) // nobody enters neightbour columns
{
- BOOL bR2L = pTmp->IsRightToLeft();
+ sal_Bool bR2L = pTmp->IsRightToLeft();
// the first column has _no_ influence to the left range
if( bR2L ? pTmp->GetNext() : pTmp->GetPrev() )
{
if( bLeft || nLeft < nTmpLeft )
nLeft = nTmpLeft;
- bLeft = FALSE;
+ bLeft = sal_False;
}
// the last column has _no_ influence to the right range
if( bR2L ? pTmp->GetPrev() : pTmp->GetNext() )
{
if( bRight || nTmpRight < nRight )
nRight = nTmpRight;
- bRight = FALSE;
+ bRight = sal_False;
}
}
else if( bVert && pTmp->IsBodyFrm() )
@@ -679,14 +679,14 @@ const SwRect SwFrm::PaintArea() const
if( pTmp->GetPrev() && ( bLeft || nLeft < nTmpLeft ) )
{
nLeft = nTmpLeft;
- bLeft = FALSE;
+ bLeft = sal_False;
}
if( pTmp->GetNext() &&
( pTmp->GetNext()->IsFooterFrm() || pTmp->GetNext()->GetNext() )
&& ( bRight || nTmpRight < nRight ) )
{
nRight = nTmpRight;
- bRight = FALSE;
+ bRight = sal_False;
}
}
pTmp = pTmp->GetUpper();
@@ -708,9 +708,9 @@ const SwRect SwFrm::PaintArea() const
|*
|*************************************************************************/
-const SwRect SwFrm::UnionFrm( BOOL bBorder ) const
+const SwRect SwFrm::UnionFrm( sal_Bool bBorder ) const
{
- BOOL bVert = IsVertical();
+ sal_Bool bVert = IsVertical();
SwRectFn fnRect = bVert ? fnRectVert : fnRectHori;
long nLeft = (Frm().*fnRect->fnGetLeft)();
long nWidth = (Frm().*fnRect->fnGetWidth)();
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index b747c4e7aaff..f0d67a191ded 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -81,7 +81,7 @@
#include <layouter.hxx>
// <--
-extern void AppendObjs( const SwSpzFrmFmts *pTbl, ULONG nIndex,
+extern void AppendObjs( const SwSpzFrmFmts *pTbl, sal_uLong nIndex,
SwFrm *pFrm, SwPageFrm *pPage );
using namespace ::com::sun::star;
@@ -102,18 +102,18 @@ SwTabFrm::SwTabFrm( SwTable &rTab ):
{
bComplete = bCalcLowers = bONECalcLowers = bLowersFormatted = bLockBackMove =
bResizeHTMLTable = bHasFollowFlowLine = bIsRebuildLastLine =
- bRestrictTableGrowth = bRemoveFollowFlowLinePending = FALSE;
+ bRestrictTableGrowth = bRemoveFollowFlowLinePending = sal_False;
// --> OD 2004-10-04 #i26945#
- bConsiderObjsForMinCellHeight = TRUE;
- bObjsDoesFit = TRUE;
+ bConsiderObjsForMinCellHeight = sal_True;
+ bObjsDoesFit = sal_True;
// <--
- bFixSize = FALSE; //Nicht nochmal auf die Importfilter hereinfallen.
+ bFixSize = sal_False; //Nicht nochmal auf die Importfilter hereinfallen.
nType = FRMC_TAB;
//Gleich die Zeilen erzeugen und einfuegen.
const SwTableLines &rLines = rTab.GetTabLines();
SwFrm *pTmpPrev = 0;
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
{
SwRowFrm *pNew = new SwRowFrm( *rLines[i] );
if( pNew->Lower() )
@@ -132,15 +132,15 @@ SwTabFrm::SwTabFrm( SwTabFrm &rTab ) :
SwFlowFrm( (SwFrm&)*this ),
pTable( rTab.GetTable() )
{
- bIsFollow = TRUE;
+ bIsFollow = sal_True;
bLockJoin = bComplete = bONECalcLowers = bCalcLowers = bLowersFormatted = bLockBackMove =
bResizeHTMLTable = bHasFollowFlowLine = bIsRebuildLastLine =
- bRestrictTableGrowth = bRemoveFollowFlowLinePending = FALSE;
+ bRestrictTableGrowth = bRemoveFollowFlowLinePending = sal_False;
// --> OD 2004-10-04 #i26945#
- bConsiderObjsForMinCellHeight = TRUE;
- bObjsDoesFit = TRUE;
+ bConsiderObjsForMinCellHeight = sal_True;
+ bObjsDoesFit = sal_True;
// <--
- bFixSize = FALSE; //Nicht nochmal auf die Importfilter hereinfallen.
+ bFixSize = sal_False; //Nicht nochmal auf die Importfilter hereinfallen.
nType = FRMC_TAB;
SetFollow( rTab.GetFollow() );
@@ -220,10 +220,10 @@ void MA_FASTCALL SwInvalidateAll( SwFrm *pFrm, long nBottom );
bool MA_FASTCALL lcl_CalcLowers( SwLayoutFrm *pLay, const SwLayoutFrm* pDontLeave,
long nBottom, bool bSkipRowSpanCells );
void MA_FASTCALL lcl_RecalcRow( SwRowFrm& rRow, long nBottom );
-BOOL lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, BOOL bInva );
+sal_Bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, sal_Bool bInva );
// --> OD 2004-10-15 #i26945# - add parameter <_bOnlyRowsAndCells> to control
// that only row and cell frames are formatted.
-BOOL MA_FASTCALL lcl_InnerCalcLayout( SwFrm *pFrm,
+sal_Bool MA_FASTCALL lcl_InnerCalcLayout( SwFrm *pFrm,
long nBottom,
bool _bOnlyRowsAndCells = false );
// <--
@@ -232,7 +232,7 @@ BOOL MA_FASTCALL lcl_InnerCalcLayout( SwFrm *pFrm,
// control, if floating screen objects have to be considered for the minimal
// cell height.
SwTwips MA_FASTCALL lcl_CalcMinRowHeight( const SwRowFrm *pRow,
- const BOOL _bConsiderObjs );
+ const sal_Bool _bConsiderObjs );
// <--
SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrm&, const SwBorderAttrs& );
@@ -273,7 +273,7 @@ SwRowFrm* lcl_InsertNewFollowFlowLine( SwTabFrm& rTab, const SwFrm& rTmpRow, boo
ASSERT( rTmpRow.IsRowFrm(), "No row frame to copy for FollowFlowLine" )
const SwRowFrm& rRow = (SwRowFrm&)rTmpRow;
- rTab.SetFollowFlowLine( TRUE );
+ rTab.SetFollowFlowLine( sal_True );
SwRowFrm *pFollowFlowLine = new SwRowFrm(*rRow.GetTabLine(), false );
pFollowFlowLine->SetRowSpanLine( bRowSpanLine );
SwFrm* pFirstRow = rTab.GetFollow()->GetFirstNonHeadlineRow();
@@ -311,7 +311,7 @@ void lcl_InvalidateLowerObjs( SwLayoutFrm& _rLayoutFrm,
}
if ( pLowerFrm->GetDrawObjs() )
{
- for ( USHORT i = 0; i < pLowerFrm->GetDrawObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pLowerFrm->GetDrawObjs()->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pLowerFrm->GetDrawObjs())[i];
@@ -504,9 +504,9 @@ void lcl_MoveFootnotes( SwTabFrm& rSource, SwTabFrm& rDest, SwLayoutFrm& rRowFrm
{
if ( 0 != rSource.GetFmt()->GetDoc()->GetFtnIdxs().Count() )
{
- SwFtnBossFrm* pOldBoss = rSource.FindFtnBossFrm( TRUE );
- SwFtnBossFrm* pNewBoss = rDest.FindFtnBossFrm( TRUE );
- rRowFrm.MoveLowerFtns( 0, pOldBoss, pNewBoss, TRUE );
+ SwFtnBossFrm* pOldBoss = rSource.FindFtnBossFrm( sal_True );
+ SwFtnBossFrm* pNewBoss = rDest.FindFtnBossFrm( sal_True );
+ rRowFrm.MoveLowerFtns( 0, pOldBoss, pNewBoss, sal_True );
}
}
@@ -690,9 +690,9 @@ bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine,
//
// Here the recalculation process starts:
//
- rTab.SetRebuildLastLine( TRUE );
+ rTab.SetRebuildLastLine( sal_True );
// --> OD 2004-10-15 #i26945#
- rTab.SetDoesObjsFit( TRUE );
+ rTab.SetDoesObjsFit( sal_True );
// <--
SWRECTFN( rTab.GetUpper() )
@@ -705,9 +705,9 @@ bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine,
//
// --> OD 2004-10-04 #i26945# - Do *not* consider floating screen objects
// for the minimal cell height.
- rTab.SetConsiderObjsForMinCellHeight( FALSE );
+ rTab.SetConsiderObjsForMinCellHeight( sal_False );
::lcl_ShrinkCellsAndAllContent( rLastLine );
- rTab.SetConsiderObjsForMinCellHeight( TRUE );
+ rTab.SetConsiderObjsForMinCellHeight( sal_True );
// <--
//
@@ -863,9 +863,9 @@ bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine,
::SwInvalidateAll( &rLastLine, LONG_MAX );
}
- rTab.SetRebuildLastLine( FALSE );
+ rTab.SetRebuildLastLine( sal_False );
// --> OD 2004-10-15 #i26945#
- rTab.SetDoesObjsFit( TRUE );
+ rTab.SetDoesObjsFit( sal_True );
// <--
return bRet;
@@ -950,7 +950,7 @@ bool SwTabFrm::RemoveFollowFlowLine()
// We have to reset the flag here, because lcl_MoveRowContent
// calls a GrowFrm(), which has a different bahavior if
// this flag is set.
- SetFollowFlowLine( FALSE );
+ SetFollowFlowLine( sal_False );
// --> FME 2007-07-19 #140081# Make code robust.
if ( !pFollowFlowLine || !pLastLine )
@@ -1073,8 +1073,8 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
if( !pRow )
return bRet;
- const USHORT nRepeat = GetTable()->GetRowsToRepeat();
- USHORT nRowCount = 0; // pRow currently points to the first row
+ const sal_uInt16 nRepeat = GetTable()->GetRowsToRepeat();
+ sal_uInt16 nRowCount = 0; // pRow currently points to the first row
SwTwips nRemainingSpaceForLastRow =
(*fnRect->fnYDiff)( nCutPos, (Frm().*fnRect->fnGetTop)() );
@@ -1245,16 +1245,16 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
//
// Build follow table if not already done:
//
- BOOL bNewFollow;
+ sal_Bool bNewFollow;
SwTabFrm *pFoll;
if ( GetFollow() )
{
pFoll = GetFollow();
- bNewFollow = FALSE;
+ bNewFollow = sal_False;
}
else
{
- bNewFollow = TRUE;
+ bNewFollow = sal_True;
pFoll = new SwTabFrm( *this );
//
@@ -1275,18 +1275,18 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
for ( nRowCount = 0; nRowCount < nRepeat; ++nRowCount )
{
// Insert new headlines:
- bDontCreateObjects = TRUE; //frmtool
+ bDontCreateObjects = sal_True; //frmtool
SwRowFrm* pHeadline = new SwRowFrm(
*GetTable()->GetTabLines()[ nRowCount ] );
pHeadline->SetRepeatedHeadline( true );
- bDontCreateObjects = FALSE;
+ bDontCreateObjects = sal_False;
pHeadline->InsertBefore( pFoll, 0 );
SwPageFrm *pPage = pHeadline->FindPageFrm();
const SwSpzFrmFmts *pTbl = GetFmt()->GetDoc()->GetSpzFrmFmts();
if( pTbl->Count() )
{
- ULONG nIndex;
+ sal_uLong nIndex;
SwCntntFrm* pFrm = pHeadline->ContainsCntnt();
while( pFrm )
{
@@ -1458,7 +1458,7 @@ bool SwTabFrm::Join()
void MA_FASTCALL SwInvalidatePositions( SwFrm *pFrm, long nBottom )
{
// LONG_MAX == nBottom means we have to calculate all
- BOOL bAll = LONG_MAX == nBottom;
+ sal_Bool bAll = LONG_MAX == nBottom;
SWRECTFN( pFrm )
do
{ pFrm->_InvalidatePos();
@@ -1484,7 +1484,7 @@ void MA_FASTCALL SwInvalidatePositions( SwFrm *pFrm, long nBottom )
void MA_FASTCALL SwInvalidateAll( SwFrm *pFrm, long nBottom )
{
// LONG_MAX == nBottom means we have to calculate all
- BOOL bAll = LONG_MAX == nBottom;
+ sal_Bool bAll = LONG_MAX == nBottom;
SWRECTFN( pFrm )
do
{
@@ -1545,17 +1545,17 @@ bool MA_FASTCALL lcl_CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeav
long nBottom, bool bSkipRowSpanCells )
{
if ( !pLay )
- return TRUE;
+ return sal_True;
// LONG_MAX == nBottom means we have to calculate all
bool bAll = LONG_MAX == nBottom;
- bool bRet = FALSE;
+ bool bRet = sal_False;
SwCntntFrm *pCnt = pLay->ContainsCntnt();
SWRECTFN( pLay )
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns = 0;
- const USHORT nLoopControlMax = 10;
+ sal_uInt16 nLoopControlRuns = 0;
+ const sal_uInt16 nLoopControlMax = 10;
const SwModify* pLoopControlCond = 0;
while ( pCnt && pDontLeave->IsAnLower( pCnt ) )
@@ -1635,13 +1635,13 @@ bool MA_FASTCALL lcl_CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeav
// --> OD 2004-10-15 #i26945# - add parameter <_bOnlyRowsAndCells> to control
// that only row and cell frames are formatted.
-BOOL MA_FASTCALL lcl_InnerCalcLayout( SwFrm *pFrm,
+sal_Bool MA_FASTCALL lcl_InnerCalcLayout( SwFrm *pFrm,
long nBottom,
bool _bOnlyRowsAndCells )
{
// LONG_MAX == nBottom means we have to calculate all
- BOOL bAll = LONG_MAX == nBottom;
- BOOL bRet = FALSE;
+ sal_Bool bAll = LONG_MAX == nBottom;
+ sal_Bool bRet = sal_False;
const SwFrm* pOldUp = pFrm->GetUpper();
SWRECTFN( pFrm )
do
@@ -1693,16 +1693,16 @@ void MA_FASTCALL lcl_RecalcRow( SwRowFrm& rRow, long nBottom )
// <--
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns_1 = 0;
- USHORT nLoopControlStage_1 = 0;
- const USHORT nLoopControlMax = 10;
+ sal_uInt16 nLoopControlRuns_1 = 0;
+ sal_uInt16 nLoopControlStage_1 = 0;
+ const sal_uInt16 nLoopControlMax = 10;
bool bCheck = true;
do
{
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns_2 = 0;
- USHORT nLoopControlStage_2 = 0;
+ sal_uInt16 nLoopControlRuns_2 = 0;
+ sal_uInt16 nLoopControlStage_2 = 0;
while( lcl_InnerCalcLayout( &rRow, nBottom ) )
{
@@ -1789,7 +1789,7 @@ void MA_FASTCALL lcl_RecalcTable( SwTabFrm& rTab,
if ( !pFirstRow )
{
pFirstRow = (SwLayoutFrm*)rTab.Lower();
- rNotify.SetLowersComplete( TRUE );
+ rNotify.SetLowersComplete( sal_True );
}
::SwInvalidatePositions( pFirstRow, LONG_MAX );
lcl_RecalcRow( static_cast<SwRowFrm&>(*pFirstRow), LONG_MAX );
@@ -1907,7 +1907,7 @@ void SwTabFrm::MakeAll()
SwLayNotify aNotify( this ); //uebernimmt im DTor die Benachrichtigung
// If pos is invalid, we have to call a SetInvaKeep at aNotify.
// Otherwise the keep atribute would not work in front of a table.
- const BOOL bOldValidPos = GetValidPosFlag();
+ const sal_Bool bOldValidPos = GetValidPosFlag();
//Wenn mein direkter Nachbar gleichzeitig mein Follow ist
//verleibe ich mir das Teil ein.
@@ -1931,29 +1931,29 @@ void SwTabFrm::MakeAll()
{
if ( RemoveFollowFlowLine() )
Join();
- SetRemoveFollowFlowLinePending( FALSE );
+ SetRemoveFollowFlowLinePending( sal_False );
}
if ( bResizeHTMLTable ) //Optimiertes Zusammenspiel mit Grow/Shrink des Inhaltes
{
- bResizeHTMLTable = FALSE;
+ bResizeHTMLTable = sal_False;
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
if ( pLayout )
bCalcLowers = pLayout->Resize(
- pLayout->GetBrowseWidthByTabFrm( *this ), FALSE );
+ pLayout->GetBrowseWidthByTabFrm( *this ), sal_False );
}
- BOOL bMakePage = TRUE; //solange TRUE kann eine neue Seite
+ sal_Bool bMakePage = sal_True; //solange sal_True kann eine neue Seite
//angelegt werden (genau einmal)
- BOOL bMovedBwd = FALSE; //Wird TRUE wenn der Frame zurueckfliesst
- BOOL bMovedFwd = FALSE; //solange FALSE kann der Frm zurueck-
+ sal_Bool bMovedBwd = sal_False; //Wird sal_True wenn der Frame zurueckfliesst
+ sal_Bool bMovedFwd = sal_False; //solange sal_False kann der Frm zurueck-
//fliessen (solange, bis er einmal
//vorwaerts ge'moved wurde).
- BOOL bSplit = FALSE; //Wird TRUE wenn der Frm gesplittet wurde.
- const BOOL bFtnsInDoc = 0 != GetFmt()->GetDoc()->GetFtnIdxs().Count();
- BOOL bMoveable;
- const BOOL bFly = IsInFly();
+ sal_Bool bSplit = sal_False; //Wird sal_True wenn der Frm gesplittet wurde.
+ const sal_Bool bFtnsInDoc = 0 != GetFmt()->GetDoc()->GetFtnIdxs().Count();
+ sal_Bool bMoveable;
+ const sal_Bool bFly = IsInFly();
SwBorderAttrAccess *pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
const SwBorderAttrs *pAttrs = pAccess->Get();
@@ -1967,7 +1967,7 @@ void SwTabFrm::MakeAll()
( !GetFmt()->GetLayoutSplit().GetValue() || bKeep );
// The number of repeated headlines
- const USHORT nRepeat = GetTable()->GetRowsToRepeat();
+ const sal_uInt16 nRepeat = GetTable()->GetRowsToRepeat();
// This flag indicates that we are allowed to try to split the
// table rows.
@@ -2027,9 +2027,9 @@ void SwTabFrm::MakeAll()
SwFrm *pPre = GetPrev();
if ( pPre && pPre->IsTabFrm() && ((SwTabFrm*)pPre)->GetFollow() == this)
{
- if ( !MoveFwd( bMakePage, FALSE ) )
- bMakePage = FALSE;
- bMovedFwd = TRUE;
+ if ( !MoveFwd( bMakePage, sal_False ) )
+ bMakePage = sal_False;
+ bMovedFwd = sal_True;
}
}
@@ -2037,15 +2037,15 @@ void SwTabFrm::MakeAll()
SWRECTFN( this )
while ( !bValidPos || !bValidSize || !bValidPrtArea )
{
- if ( TRUE == (bMoveable = IsMoveable()) )
+ if ( sal_True == (bMoveable = IsMoveable()) )
if ( CheckMoveFwd( bMakePage, bKeep && KEEPTAB, bMovedBwd ) )
{
- bMovedFwd = TRUE;
- bCalcLowers = TRUE;
+ bMovedFwd = sal_True;
+ bCalcLowers = sal_True;
// --> OD 2009-08-12 #i99267#
// reset <bSplit> after forward move to assure that follows
// can be joined, if further space is available.
- bSplit = FALSE;
+ bSplit = sal_False;
// <--
}
@@ -2061,19 +2061,19 @@ void SwTabFrm::MakeAll()
{
delete pAccess;
bCalcLowers |= pLayout->Resize(
- pLayout->GetBrowseWidthByTabFrm( *this ), FALSE );
+ pLayout->GetBrowseWidthByTabFrm( *this ), sal_False );
pAccess = new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
}
- bValidPrtArea = FALSE;
- aNotify.SetLowersComplete( FALSE );
+ bValidPrtArea = sal_False;
+ aNotify.SetLowersComplete( sal_False );
}
SwFrm *pPre;
if ( bKeep || (0 != (pPre = FindPrev()) &&
pPre->GetAttrSet()->GetKeep().GetValue()) )
{
- bCalcLowers = TRUE;
+ bCalcLowers = sal_True;
}
}
@@ -2102,13 +2102,13 @@ void SwTabFrm::MakeAll()
{
delete pAccess;
bCalcLowers |= pLayout->Resize(
- pLayout->GetBrowseWidthByTabFrm( *this ), FALSE );
-// GetFmt()->GetDoc()->GetDocShell()->IsReadOnly() ? FALSE : TRUE );
+ pLayout->GetBrowseWidthByTabFrm( *this ), sal_False );
+// GetFmt()->GetDoc()->GetDocShell()->IsReadOnly() ? sal_False : sal_True );
pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
}
if ( aOldPrtPos != (Prt().*fnRect->fnGetPos)() )
- aNotify.SetLowersComplete( FALSE );
+ aNotify.SetLowersComplete( sal_False );
}
//Wenn ich der erste einer Kette bin koennte ich mal sehen ob
@@ -2127,20 +2127,20 @@ void SwTabFrm::MakeAll()
if( pFrm && n1StLineHeight >(pFrm->Frm().*fnRect->fnGetHeight )() )
{
SwTabFrm *pMaster = (SwTabFrm*)FindMaster();
- BOOL bDummy;
- if ( ShouldBwdMoved( pMaster->GetUpper(), FALSE, bDummy ) )
+ sal_Bool bDummy;
+ if ( ShouldBwdMoved( pMaster->GetUpper(), sal_False, bDummy ) )
pMaster->InvalidatePos();
}
}
- SwFtnBossFrm *pOldBoss = bFtnsInDoc ? FindFtnBossFrm( TRUE ) : 0;
- BOOL bReformat;
+ SwFtnBossFrm *pOldBoss = bFtnsInDoc ? FindFtnBossFrm( sal_True ) : 0;
+ sal_Bool bReformat;
if ( MoveBwd( bReformat ) )
{
SWREFRESHFN( this )
- bMovedBwd = TRUE;
- aNotify.SetLowersComplete( FALSE );
+ bMovedBwd = sal_True;
+ aNotify.SetLowersComplete( sal_False );
if ( bFtnsInDoc )
- MoveLowerFtns( 0, pOldBoss, 0, TRUE );
+ MoveLowerFtns( 0, pOldBoss, 0, sal_True );
if ( bReformat || bKeep )
{
long nOldTop = (Frm().*fnRect->fnGetTop)();
@@ -2154,18 +2154,18 @@ void SwTabFrm::MakeAll()
delete pAccess;
bCalcLowers |= pHTMLLayout->Resize(
pHTMLLayout->GetBrowseWidthByTabFrm( *this ),
- FALSE );
+ sal_False );
pAccess= new SwBorderAttrAccess(
SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
}
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
Format( pAttrs );
}
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = TRUE;
+ bLowersFormatted = sal_True;
if ( bKeep && KEEPTAB )
{
// --> OD 2005-09-28 #b6329202#
@@ -2182,11 +2182,11 @@ void SwTabFrm::MakeAll()
// {
// pNxt->Calc();
// if ( !GetNext() )
-// bValidPos = FALSE;
+// bValidPos = sal_False;
// }
if ( 0 != lcl_FormatNextCntntForKeep( this ) && !GetNext() )
{
- bValidPos = FALSE;
+ bValidPos = sal_False;
}
// <--
}
@@ -2233,13 +2233,13 @@ void SwTabFrm::MakeAll()
// at least one further row of an existing follow.
if ( !bSplit && GetFollow() )
{
- BOOL bDummy;
- if ( GetFollow()->ShouldBwdMoved( GetUpper(), FALSE, bDummy ) )
+ sal_Bool bDummy;
+ if ( GetFollow()->ShouldBwdMoved( GetUpper(), sal_False, bDummy ) )
{
SwFrm *pTmp = GetUpper();
SwTwips nDeadLine = (pTmp->*fnRect->fnGetPrtBottom)();
if ( bBrowseMode )
- nDeadLine += pTmp->Grow( LONG_MAX, TRUE );
+ nDeadLine += pTmp->Grow( LONG_MAX, sal_True );
if( (Frm().*fnRect->fnBottomDist)( nDeadLine ) > 0 )
{
//
@@ -2253,9 +2253,9 @@ void SwTabFrm::MakeAll()
if ( pLastLine )
{
::SwInvalidateAll( pLastLine, LONG_MAX );
- SetRebuildLastLine( TRUE );
+ SetRebuildLastLine( sal_True );
lcl_RecalcRow( static_cast<SwRowFrm&>(*pLastLine), LONG_MAX );
- SetRebuildLastLine( FALSE );
+ SetRebuildLastLine( sal_False );
}
SwFrm* pRow = GetFollow()->GetFirstNonHeadlineRow();
@@ -2286,11 +2286,11 @@ void SwTabFrm::MakeAll()
while ( pRowToMove && nRowsToMove-- > 0 )
{
- const BOOL bMoveFtns = bFtnsInDoc && !GetFollow()->IsJoinLocked();
+ const sal_Bool bMoveFtns = bFtnsInDoc && !GetFollow()->IsJoinLocked();
SwFtnBossFrm *pOldBoss = 0;
if ( bMoveFtns )
- pOldBoss = pRowToMove->FindFtnBossFrm( TRUE );
+ pOldBoss = pRowToMove->FindFtnBossFrm( sal_True );
SwFrm* pNextRow = pRowToMove->GetNext();
@@ -2306,7 +2306,7 @@ void SwTabFrm::MakeAll()
//Die Fussnoten verschieben!
if ( bMoveFtns )
if ( ((SwLayoutFrm*)pRowToMove)->MoveLowerFtns(
- 0, pOldBoss, FindFtnBossFrm( TRUE ), TRUE ) )
+ 0, pOldBoss, FindFtnBossFrm( sal_True ), sal_True ) )
GetUpper()->Calc();
pRowToMove = pNextRow;
@@ -2364,7 +2364,7 @@ void SwTabFrm::MakeAll()
// In this case we do a magic trick:
if ( !bKeep && !GetNext() && pTmpNxt && pTmpNxt->IsValid() )
{
- bValidPos = FALSE;
+ bValidPos = sal_False;
bLastRowHasToMoveToFollow = true;
}
}
@@ -2375,13 +2375,13 @@ void SwTabFrm::MakeAll()
if ( bCalcLowers )
{
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = TRUE;
- bCalcLowers = FALSE;
+ bLowersFormatted = sal_True;
+ bCalcLowers = sal_False;
}
else if ( bONECalcLowers )
{
lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX );
- bONECalcLowers = FALSE;
+ bONECalcLowers = sal_False;
}
}
continue;
@@ -2399,13 +2399,13 @@ void SwTabFrm::MakeAll()
if ( bCalcLowers && IsValid() )
{
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = TRUE;
- bCalcLowers = FALSE;
+ bLowersFormatted = sal_True;
+ bCalcLowers = sal_False;
}
else if ( bONECalcLowers )
{
lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX );
- bONECalcLowers = FALSE;
+ bONECalcLowers = sal_False;
}
// It does not make sense to cut off the last line if we are
@@ -2418,8 +2418,8 @@ void SwTabFrm::MakeAll()
if ( bCalcLowers && IsValid() )
{
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = TRUE;
- bCalcLowers = FALSE;
+ bLowersFormatted = sal_True;
+ bCalcLowers = sal_False;
if( !IsValid() )
continue;
}
@@ -2458,11 +2458,11 @@ void SwTabFrm::MakeAll()
SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
if( IsInSct() || GetUpper()->IsInTab() ) // TABLE IN TABLE)
nDeadLine = (*fnRect->fnYInc)( nDeadLine,
- GetUpper()->Grow( LONG_MAX, TRUE ) );
+ GetUpper()->Grow( LONG_MAX, sal_True ) );
::lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), nDeadLine );
- bLowersFormatted = TRUE;
- aNotify.SetLowersComplete( TRUE );
+ bLowersFormatted = sal_True;
+ aNotify.SetLowersComplete( sal_True );
// One more check if its really necessary to split the table.
// 1. The table either has to exceed the deadline or
@@ -2489,7 +2489,7 @@ void SwTabFrm::MakeAll()
}
// <--
- USHORT nMinNumOfLines = nRepeat;
+ sal_uInt16 nMinNumOfLines = nRepeat;
if ( bTableRowKeep )
{
@@ -2519,8 +2519,8 @@ void SwTabFrm::MakeAll()
// if we do not have an (in)direkt Prev, we split anyway.
if( (*fnRect->fnYDiff)(nDeadLine, nBreakLine) >=0 || !pIndPrev )
{
- aNotify.SetLowersComplete( FALSE );
- bSplit = TRUE;
+ aNotify.SetLowersComplete( sal_False );
+ bSplit = sal_True;
//
// An existing follow flow line has to be removed.
@@ -2556,7 +2556,7 @@ void SwTabFrm::MakeAll()
if ( bSplitError && bTryToSplit ) // no restart if we did not try to split: i72847, i79426
{
lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX );
- bValidPos = FALSE;
+ bValidPos = sal_False;
bTryToSplit = false;
continue;
}
@@ -2581,7 +2581,7 @@ void SwTabFrm::MakeAll()
// <--
SWRECTFNX( GetFollow() )
- static BYTE nStack = 0;
+ static sal_uInt8 nStack = 0;
if ( !StackHack::IsLocked() && nStack < 4 )
{
++nStack;
@@ -2593,7 +2593,7 @@ void SwTabFrm::MakeAll()
pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
- ((SwTabFrm*)GetFollow())->SetLowersFormatted(FALSE);
+ ((SwTabFrm*)GetFollow())->SetLowersFormatted(sal_False);
// --> OD 2005-03-30 #i43913# - lock follow table
// to avoid its formatting during the format of
// its content.
@@ -2637,7 +2637,7 @@ void SwTabFrm::MakeAll()
--nStack;
}
else if ( GetFollow() == GetNext() )
- ((SwTabFrm*)GetFollow())->MoveFwd( TRUE, FALSE );
+ ((SwTabFrm*)GetFollow())->MoveFwd( sal_True, sal_False );
}
continue;
}
@@ -2651,15 +2651,15 @@ void SwTabFrm::MakeAll()
GetUpper()->GetUpper()->GetUpper()->IsSctFrm() &&
( GetUpper()->GetUpper()->GetPrev() || GetIndPrev() ) &&
((SwSectionFrm*)GetUpper()->GetUpper()->GetUpper())->MoveAllowed(this) )
- bMovedFwd = FALSE;
+ bMovedFwd = sal_False;
// --> FME 2004-06-09 #i29771# Reset bTryToSplit flag on change of upper
const SwFrm* pOldUpper = GetUpper();
// <--
//Mal sehen ob ich irgenwo Platz finde...
- if ( !bMovedFwd && !MoveFwd( bMakePage, FALSE ) )
- bMakePage = FALSE;
+ if ( !bMovedFwd && !MoveFwd( bMakePage, sal_False ) )
+ bMakePage = sal_False;
// --> FME 2004-06-09 #i29771# Reset bSplitError flag on change of upper
if ( GetUpper() != pOldUpper )
@@ -2670,8 +2670,8 @@ void SwTabFrm::MakeAll()
// <--
SWREFRESHFN( this )
- bMovedFwd = bCalcLowers = TRUE;
- aNotify.SetLowersComplete( FALSE );
+ bMovedFwd = bCalcLowers = sal_True;
+ aNotify.SetLowersComplete( sal_False );
if ( IsFollow() )
{ //Um Oszillationen zu vermeiden sollte kein ungueltiger Master
//zurueckbleiben.
@@ -2679,7 +2679,7 @@ void SwTabFrm::MakeAll()
if ( pTab->GetUpper() )
pTab->GetUpper()->Calc();
pTab->Calc();
- pTab->SetLowersFormatted( FALSE );
+ pTab->SetLowersFormatted( sal_False );
}
//Wenn mein direkter Nachbar jetzt gleichzeitig mein Follow ist
@@ -2708,8 +2708,8 @@ void SwTabFrm::MakeAll()
if ( nDistToUpperPrtBottom >= 0 || bTryToSplit )
{
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = TRUE;
- bCalcLowers = FALSE;
+ bLowersFormatted = sal_True;
+ bCalcLowers = sal_False;
}
#if OSL_DEBUG_LEVEL > 1
else
@@ -2731,7 +2731,7 @@ void SwTabFrm::MakeAll()
pPre->InvalidatePos();
}
- bCalcLowers = bONECalcLowers = FALSE;
+ bCalcLowers = bONECalcLowers = sal_False;
delete pAccess;
UnlockJoin();
if ( bMovedFwd || bMovedBwd || !bOldValidPos )
@@ -2748,11 +2748,11 @@ void SwTabFrm::MakeAll()
|* Letzte Aenderung
|*
|*************************************************************************/
-BOOL SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
+sal_Bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
long& rLeftOffset,
long& rRightOffset ) const
{
- BOOL bInvalidatePrtArea = FALSE;
+ sal_Bool bInvalidatePrtArea = sal_False;
const SwPageFrm *pPage = FindPageFrm();
const SwFlyFrm* pMyFly = FindFlyFrm();
@@ -2774,7 +2774,7 @@ BOOL SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
long nYDiff = (*fnRect->fnYDiff)( (Prt().*fnRect->fnGetTop)(), rUpper );
if( nYDiff > 0 )
(aRect.*fnRect->fnAddBottom)( -nYDiff );
- for ( USHORT i = 0; i < pPage->GetSortedObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pPage->GetSortedObjs()->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pPage->GetSortedObjs())[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -2867,7 +2867,7 @@ BOOL SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
long nBottom = (aFlyRect.*fnRect->fnGetBottom)();
if( (*fnRect->fnYDiff)( nPrtPos, nBottom ) < 0 )
nPrtPos = nBottom;
- bInvalidatePrtArea = TRUE;
+ bInvalidatePrtArea = sal_True;
}
if ( (SURROUND_RIGHT == rSur.GetSurround() ||
SURROUND_PARALLEL == rSur.GetSurround())&&
@@ -2877,7 +2877,7 @@ BOOL SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
(aFlyRect.*fnRect->fnGetRight)(),
(pFly->GetAnchorFrm()->Frm().*fnRect->fnGetLeft)() );
rLeftOffset = Max( rLeftOffset, nWidth );
- bInvalidatePrtArea = TRUE;
+ bInvalidatePrtArea = sal_True;
}
if ( (SURROUND_LEFT == rSur.GetSurround() ||
SURROUND_PARALLEL == rSur.GetSurround())&&
@@ -2887,7 +2887,7 @@ BOOL SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
(pFly->GetAnchorFrm()->Frm().*fnRect->fnGetRight)(),
(aFlyRect.*fnRect->fnGetLeft)() );
rRightOffset = Max( rRightOffset, nWidth );
- bInvalidatePrtArea = TRUE;
+ bInvalidatePrtArea = sal_True;
}
}
}
@@ -2935,7 +2935,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
long nTmpRight = -1000000,
nLeftOffset = 0;
if( CalcFlyOffsets( nUpper, nLeftOffset, nTmpRight ) )
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
long nRightOffset = Max( 0L, nTmpRight );
SwTwips nLower = pAttrs->CalcBottomLine();
@@ -2945,7 +2945,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
// <-- collapsing
if ( !bValidPrtArea )
- { bValidPrtArea = TRUE;
+ { bValidPrtArea = sal_True;
//Die Breite der PrtArea wird vom FrmFmt vorgegeben, die Raender
//sind entsprechend einzustellen.
@@ -2967,9 +2967,9 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
//bezieht sie sich in der BrowseView auf die Bildschirmbreite.
const SwFmtFrmSize &rSz = GetFmt()->GetFrmSize();
// OD 14.03.2003 #i9040# - adjust variable name.
- const SwTwips nWishedTableWidth = CalcRel( rSz, TRUE );
+ const SwTwips nWishedTableWidth = CalcRel( rSz, sal_True );
- BOOL bCheckBrowseWidth = FALSE;
+ sal_Bool bCheckBrowseWidth = sal_False;
// OD 14.03.2003 #i9040# - insert new variables for left/right spacing.
SwTwips nLeftSpacing = 0;
@@ -3058,7 +3058,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
//Nur die fuer die Umrandung benoetigten Freiraeume
//werden beruecksichtigt.
//Die Attributwerte von LRSpace werden bewusst missachtet!
- bCheckBrowseWidth = TRUE;
+ bCheckBrowseWidth = sal_True;
nLeftSpacing = nLeftLine + nLeftOffset;
nRightSpacing = nRightLine + nRightOffset;
break;
@@ -3095,7 +3095,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
{
//Linker Rand und die Breite zaehlen (Word-Spezialitaet)
// OD 10.03.2003 #i9040# - no width alignment in online mode.
- //bCheckBrowseWidth = TRUE;
+ //bCheckBrowseWidth = sal_True;
nLeftSpacing = pAttrs->CalcLeft( this );
if( nLeftOffset )
{
@@ -3115,7 +3115,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
}
break;
default:
- ASSERT( FALSE, "Ungueltige orientation fuer Table." );
+ ASSERT( sal_False, "Ungueltige orientation fuer Table." );
}
// --> OD 2004-07-15 #i26250# - extend bottom printing area, if table
@@ -3148,12 +3148,12 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
}
if ( nOldHeight != (Prt().*fnRect->fnGetHeight)() )
- bValidSize = FALSE;
+ bValidSize = sal_False;
}
if ( !bValidSize )
{
- bValidSize = TRUE;
+ bValidSize = sal_True;
//Die Groesse wird durch den Inhalt plus den Raendern bestimmt.
SwTwips nRemaining = 0, nDiff;
@@ -3181,7 +3181,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
|* Letzte Aenderung MA 23. Sep. 96
|*
|*************************************************************************/
-SwTwips SwTabFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwTabFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SWRECTFN( this )
SwTwips nHeight =(Frm().*fnRect->fnGetHeight)();
@@ -3270,8 +3270,8 @@ SwTwips SwTabFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
|*************************************************************************/
void SwTabFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
- BYTE nInvFlags = 0;
- BOOL bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
+ sal_uInt8 nInvFlags = 0;
+ sal_Bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
if( bAttrSetChg )
{
@@ -3279,7 +3279,7 @@ void SwTabFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() );
SwAttrSetChg aOldSet( *(SwAttrSetChg*)pOld );
SwAttrSetChg aNewSet( *(SwAttrSetChg*)pNew );
- while( TRUE )
+ while( sal_True )
{
_UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
@@ -3334,11 +3334,11 @@ void SwTabFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
void SwTabFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
- BYTE &rInvFlags,
+ sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
- BOOL bClear = TRUE;
- const USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_Bool bClear = sal_True;
+ const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
switch( nWhich )
{
case RES_TBLHEADLINECHG:
@@ -3353,13 +3353,13 @@ void SwTabFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
}
// insert new headlines
- const USHORT nNewRepeat = GetTable()->GetRowsToRepeat();
- for ( USHORT nIdx = 0; nIdx < nNewRepeat; ++nIdx )
+ const sal_uInt16 nNewRepeat = GetTable()->GetRowsToRepeat();
+ for ( sal_uInt16 nIdx = 0; nIdx < nNewRepeat; ++nIdx )
{
- bDontCreateObjects = TRUE; //frmtool
+ bDontCreateObjects = sal_True; //frmtool
SwRowFrm* pHeadline = new SwRowFrm( *GetTable()->GetTabLines()[ nIdx ] );
pHeadline->SetRepeatedHeadline( true );
- bDontCreateObjects = FALSE;
+ bDontCreateObjects = sal_False;
pHeadline->Paste( this, pLowerRow );
}
}
@@ -3379,7 +3379,7 @@ void SwTabFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
if ( !GetPrev() )
CheckPageDescs( pPage );
if ( pPage && GetFmt()->GetPageDesc().GetNumOffset() )
- ((SwRootFrm*)pPage->GetUpper())->SetVirtPageNum( TRUE );
+ ((SwRootFrm*)pPage->GetUpper())->SetVirtPageNum( sal_True );
SwDocPosUpdate aMsgHnt( pPage->Frm().Top() );
GetFmt()->GetDoc()->UpdatePageFlds( &aMsgHnt );
}
@@ -3406,7 +3406,7 @@ void SwTabFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
/* kein Break hier */
default:
- bClear = FALSE;
+ bClear = sal_False;
}
if ( bClear )
{
@@ -3430,7 +3430,7 @@ void SwTabFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
|* Letzte Aenderung MA 26. Jun. 98
|*
|*************************************************************************/
-BOOL SwTabFrm::GetInfo( SfxPoolItem &rHnt ) const
+sal_Bool SwTabFrm::GetInfo( SfxPoolItem &rHnt ) const
{
if ( RES_VIRTPAGENUM_INFO == rHnt.Which() && IsInDocBody() && !IsFollow() )
{
@@ -3443,7 +3443,7 @@ BOOL SwTabFrm::GetInfo( SfxPoolItem &rHnt ) const
//Das sollte er sein (kann allenfalls temporaer anders sein,
// sollte uns das beunruhigen?)
rInfo.SetInfo( pPage, this );
- return FALSE;
+ return sal_False;
}
if ( pPage->GetPhyPageNum() < rInfo.GetOrigPage()->GetPhyPageNum() &&
(!rInfo.GetPage() || pPage->GetPhyPageNum() > rInfo.GetPage()->GetPhyPageNum()))
@@ -3453,7 +3453,7 @@ BOOL SwTabFrm::GetInfo( SfxPoolItem &rHnt ) const
}
}
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -3542,7 +3542,7 @@ SwCntntFrm *SwTabFrm::FindLastCntnt()
|* Letzte Aenderung MA 25. Apr. 95
|*
|*************************************************************************/
-SwLayoutFrm *SwTabFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd )
+SwLayoutFrm *SwTabFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd )
{
SwLayoutFrm *pRet;
if ( bFwd )
@@ -3567,9 +3567,9 @@ SwLayoutFrm *SwTabFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd )
|* Letzte Aenderung MA 04. Mar. 97
|*
|*************************************************************************/
-BOOL SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL &rReformat )
+sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &rReformat )
{
- rReformat = FALSE;
+ rReformat = sal_False;
if ( (SwFlowFrm::IsMoveBwdJump() || !IsPrevObjMove()) )
{
//Das zurueckfliessen von Frm's ist leider etwas Zeitintensiv.
@@ -3591,7 +3591,7 @@ BOOL SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL &rReformat )
SwPageFrm *pOldPage = FindPageFrm(),
*pNewPage = pNewUpper->FindPageFrm();
- BOOL bMoveAnyway = FALSE;
+ sal_Bool bMoveAnyway = sal_False;
SwTwips nSpace = 0;
SWRECTFN( this )
@@ -3603,7 +3603,7 @@ BOOL SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL &rReformat )
long nNewWidth = (pNewUpper->Prt().*fnRectX->fnGetWidth)();
if( Abs( nNewWidth - nOldWidth ) < 2 )
{
- if( FALSE ==
+ if( sal_False ==
( bMoveAnyway = BwdMoveNecessary( pOldPage, Frm() ) > 1 ) )
{
SwRect aRect( pNewUpper->Prt() );
@@ -3630,17 +3630,17 @@ BOOL SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL &rReformat )
// <--
if ( GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- nSpace += pNewUpper->Grow( LONG_MAX, TRUE );
+ nSpace += pNewUpper->Grow( LONG_MAX, sal_True );
}
}
else if( !bLockBackMove )
- bMoveAnyway = TRUE;
+ bMoveAnyway = sal_True;
}
else if( !bLockBackMove )
- bMoveAnyway = TRUE;
+ bMoveAnyway = sal_True;
if ( bMoveAnyway )
- return rReformat = TRUE;
+ return rReformat = sal_True;
else if ( !bLockBackMove && nSpace > 0 )
{
// --> OD 2004-10-05 #i26945# - check, if follow flow line
@@ -3652,7 +3652,7 @@ BOOL SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL &rReformat )
*(pFirstRow->GetFmt()->GetDoc()),
*(pFirstRow) ) )
{
- return FALSE;
+ return sal_False;
}
// <--
SwTwips nTmpHeight = CalcHeightOfFirstContentLine();
@@ -3666,7 +3666,7 @@ BOOL SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL &rReformat )
// <--
}
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -3748,7 +3748,7 @@ void SwTabFrm::Cut()
{
if ( pUp->GetUpper() )
{
- pSct->DelEmpty( FALSE );
+ pSct->DelEmpty( sal_False );
pSct->_InvalidateSize();
}
}
@@ -3830,7 +3830,7 @@ void SwTabFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
(!pDesc && pPage->GetPageDesc() !=
&(const_cast<const SwDoc *>(GetFmt()->GetDoc())
->GetPageDesc(0))) )
- CheckPageDescs( pPage, TRUE );
+ CheckPageDescs( pPage, sal_True );
}
}
}
@@ -3843,7 +3843,7 @@ void SwTabFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
|* Last Change AMA 01/10/02
|*
|*************************************************************************/
-void SwTabFrm::Prepare( const PrepareHint eHint, const void *, BOOL )
+void SwTabFrm::Prepare( const PrepareHint eHint, const void *, sal_Bool )
{
if( PREP_BOSS_CHGD == eHint )
CheckDirChange();
@@ -3877,7 +3877,7 @@ SwRowFrm::SwRowFrm( const SwTableLine &rLine, bool bInsertContent ):
//Gleich die Boxen erzeugen und einfuegen.
const SwTableBoxes &rBoxes = rLine.GetTabBoxes();
SwFrm *pTmpPrev = 0;
- for ( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
SwCellFrm *pNew = new SwCellFrm( *rBoxes[i], bInsertContent );
pNew->InsertBehind( this, pTmpPrev );
@@ -3919,15 +3919,15 @@ void SwRowFrm::RegistFlys( SwPageFrm *pPage )
|*************************************************************************/
void SwRowFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
- BOOL bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
+ sal_Bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
const SfxPoolItem *pItem = 0;
if( bAttrSetChg )
{
const SwAttrSet* pChgSet = ((SwAttrSetChg*)pNew)->GetChgSet();
- pChgSet->GetItemState( RES_FRM_SIZE, FALSE, &pItem);
+ pChgSet->GetItemState( RES_FRM_SIZE, sal_False, &pItem);
if ( !pItem )
- pChgSet->GetItemState( RES_ROW_SPLIT, FALSE, &pItem);
+ pChgSet->GetItemState( RES_ROW_SPLIT, sal_False, &pItem);
}
else if ( RES_FRM_SIZE == pNew->Which() || RES_ROW_SPLIT == pNew->Which() )
pItem = pNew;
@@ -3967,7 +3967,7 @@ void SwRowFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
void SwRowFrm::MakeAll()
{
if ( !GetNext() )
- bValidSize = FALSE;
+ bValidSize = sal_False;
SwLayoutFrm::MakeAll();
}
@@ -4017,7 +4017,7 @@ long MA_FASTCALL CalcHeightWidthFlys( const SwFrm *pFrm )
if ( pObjs )
// <--
{
- for ( USHORT i = 0; i < pObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
const SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
// --> OD 2004-10-08 #i26945# - if <pTmp> is follow, the
@@ -4120,7 +4120,7 @@ SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrm& rCell, const SwBorderAttr
// control, if floating screen objects have to be considered for the minimal
// cell height.
SwTwips MA_FASTCALL lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell,
- const BOOL _bConsiderObjs,
+ const sal_Bool _bConsiderObjs,
const SwBorderAttrs *pAttrs = 0 )
{
SWRECTFN( _pCell )
@@ -4179,7 +4179,7 @@ SwTwips MA_FASTCALL lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell,
// --> OD 2004-10-04 #i26945# - add parameter <_bConsiderObjs> in order to control,
// if floating screen objects have to be considered for the minimal cell height
SwTwips MA_FASTCALL lcl_CalcMinRowHeight( const SwRowFrm* _pRow,
- const BOOL _bConsiderObjs )
+ const sal_Bool _bConsiderObjs )
{
SWRECTFN( _pRow )
@@ -4236,13 +4236,13 @@ SwTwips MA_FASTCALL lcl_CalcMinRowHeight( const SwRowFrm* _pRow,
// --> collapsing borders FME 2005-05-27 #i29550#
// Calculate the maximum of (TopLineSize + TopLineDist) over all lowers:
-USHORT lcl_GetTopSpace( const SwRowFrm& rRow )
+sal_uInt16 lcl_GetTopSpace( const SwRowFrm& rRow )
{
- USHORT nTopSpace = 0;
+ sal_uInt16 nTopSpace = 0;
for ( SwCellFrm* pCurrLower = (SwCellFrm*)rRow.Lower(); pCurrLower;
pCurrLower = (SwCellFrm*)pCurrLower->GetNext() )
{
- USHORT nTmpTopSpace = 0;
+ sal_uInt16 nTmpTopSpace = 0;
if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() )
nTmpTopSpace = lcl_GetTopSpace( *(SwRowFrm*)pCurrLower->Lower() );
else
@@ -4257,13 +4257,13 @@ USHORT lcl_GetTopSpace( const SwRowFrm& rRow )
}
// Calculate the maximum of TopLineDist over all lowers:
-USHORT lcl_GetTopLineDist( const SwRowFrm& rRow )
+sal_uInt16 lcl_GetTopLineDist( const SwRowFrm& rRow )
{
- USHORT nTopLineDist = 0;
+ sal_uInt16 nTopLineDist = 0;
for ( SwCellFrm* pCurrLower = (SwCellFrm*)rRow.Lower(); pCurrLower;
pCurrLower = (SwCellFrm*)pCurrLower->GetNext() )
{
- USHORT nTmpTopLineDist = 0;
+ sal_uInt16 nTmpTopLineDist = 0;
if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() )
nTmpTopLineDist = lcl_GetTopLineDist( *(SwRowFrm*)pCurrLower->Lower() );
else
@@ -4278,13 +4278,13 @@ USHORT lcl_GetTopLineDist( const SwRowFrm& rRow )
}
// Calculate the maximum of BottomLineSize over all lowers:
-USHORT lcl_GetBottomLineSize( const SwRowFrm& rRow )
+sal_uInt16 lcl_GetBottomLineSize( const SwRowFrm& rRow )
{
- USHORT nBottomLineSize = 0;
+ sal_uInt16 nBottomLineSize = 0;
for ( SwCellFrm* pCurrLower = (SwCellFrm*)rRow.Lower(); pCurrLower;
pCurrLower = (SwCellFrm*)pCurrLower->GetNext() )
{
- USHORT nTmpBottomLineSize = 0;
+ sal_uInt16 nTmpBottomLineSize = 0;
if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() )
{
const SwFrm* pRow = pCurrLower->GetLastLower();
@@ -4303,13 +4303,13 @@ USHORT lcl_GetBottomLineSize( const SwRowFrm& rRow )
}
// Calculate the maximum of BottomLineDist over all lowers:
-USHORT lcl_GetBottomLineDist( const SwRowFrm& rRow )
+sal_uInt16 lcl_GetBottomLineDist( const SwRowFrm& rRow )
{
- USHORT nBottomLineDist = 0;
+ sal_uInt16 nBottomLineDist = 0;
for ( SwCellFrm* pCurrLower = (SwCellFrm*)rRow.Lower(); pCurrLower;
pCurrLower = (SwCellFrm*)pCurrLower->GetNext() )
{
- USHORT nTmpBottomLineDist = 0;
+ sal_uInt16 nTmpBottomLineDist = 0;
if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() )
{
const SwFrm* pRow = pCurrLower->GetLastLower();
@@ -4333,13 +4333,13 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
SWRECTFN( this )
ASSERT( pAttrs, "SwRowFrm::Format ohne Attrs." );
- const BOOL bFix = bFixSize;
+ const sal_Bool bFix = bFixSize;
if ( !bValidPrtArea )
{
//RowFrms haben keine Umrandung usw. also entspricht die PrtArea immer
//dem Frm.
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
aPrt.Left( 0 );
aPrt.Top( 0 );
aPrt.Width ( aFrm.Width() );
@@ -4350,10 +4350,10 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
SwTabFrm* pTabFrm = FindTabFrm();
if ( pTabFrm->IsCollapsingBorders() )
{
- const USHORT nTopSpace = lcl_GetTopSpace( *this );
- const USHORT nTopLineDist = lcl_GetTopLineDist( *this );
- const USHORT nBottomLineSize = lcl_GetBottomLineSize( *this );
- const USHORT nBottomLineDist = lcl_GetBottomLineDist( *this );
+ const sal_uInt16 nTopSpace = lcl_GetTopSpace( *this );
+ const sal_uInt16 nTopLineDist = lcl_GetTopLineDist( *this );
+ const sal_uInt16 nBottomLineSize = lcl_GetBottomLineSize( *this );
+ const sal_uInt16 nBottomLineDist = lcl_GetBottomLineDist( *this );
const SwRowFrm* pPreviousRow = 0;
@@ -4370,7 +4370,7 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
while ( pTmpRow && !pPrevTabLine )
{
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
const SwTableLines& rLines = pTmpRow->GetTabLine()->GetUpper() ?
pTmpRow->GetTabLine()->GetUpper()->GetTabLines() :
pTable->GetTabLines();
@@ -4418,10 +4418,10 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
}
// <--
- USHORT nTopPrtMargin = nTopSpace;
+ sal_uInt16 nTopPrtMargin = nTopSpace;
if ( pPreviousRow )
{
- const USHORT nTmpPrtMargin = pPreviousRow->GetBottomLineSize() + nTopLineDist;
+ const sal_uInt16 nTmpPrtMargin = pPreviousRow->GetBottomLineSize() + nTopLineDist;
if ( nTmpPrtMargin > nTopPrtMargin )
nTopPrtMargin = nTmpPrtMargin;
}
@@ -4455,7 +4455,7 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
while ( !bValidSize )
{
- bValidSize = TRUE;
+ bValidSize = sal_True;
#ifdef DBG_UTIL
if ( HasFixSize() )
@@ -4473,9 +4473,9 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
// <--
if ( nDiff )
{
- bFixSize = FALSE;
+ bFixSize = sal_False;
if ( nDiff > 0 )
- Shrink( nDiff, FALSE, TRUE );
+ Shrink( nDiff, sal_False, sal_True );
else if ( nDiff < 0 )
Grow( -nDiff );
bFixSize = bFix;
@@ -4494,10 +4494,10 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
} while ( pSibling );
if ( nDiff > 0 )
{
- bFixSize = FALSE;
+ bFixSize = sal_False;
Grow( nDiff );
bFixSize = bFix;
- bValidSize = TRUE;
+ bValidSize = sal_True;
}
}
}
@@ -4510,7 +4510,7 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
|* Letzte Aenderung MA 16. Dec. 96
|*
|*************************************************************************/
-void SwRowFrm::AdjustCells( const SwTwips nHeight, const BOOL bHeight )
+void SwRowFrm::AdjustCells( const SwTwips nHeight, const sal_Bool bHeight )
{
SwFrm *pFrm = Lower();
if ( bHeight )
@@ -4658,7 +4658,7 @@ void SwRowFrm::Cut()
|*************************************************************************/
-SwTwips SwRowFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwRowFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SwTwips nReal = 0;
@@ -4695,7 +4695,7 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
}
if ( bRestrictTableGrowth )
- pTab->SetRestrictTableGrowth( TRUE );
+ pTab->SetRestrictTableGrowth( sal_True );
else
{
// Ok, this looks like a hack, indeed, it is a hack.
@@ -4704,19 +4704,19 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
// be allowed to grow. In fact, setting bRestrictTableGrowth
// to 'false' does not work, because the surrounding RowFrm
// would set this to 'true'.
- pTab->SetFollowFlowLine( FALSE );
+ pTab->SetFollowFlowLine( sal_False );
}
nReal += SwLayoutFrm::GrowFrm( nDist, bTst, bInfo);
- pTab->SetRestrictTableGrowth( FALSE );
+ pTab->SetRestrictTableGrowth( sal_False );
pTab->SetFollowFlowLine( bHasFollowFlowLine );
//Hoehe der Zellen auf den neuesten Stand bringen.
if ( !bTst )
{
SWRECTFNX( this )
- AdjustCells( (Prt().*fnRectX->fnGetHeight)() + nReal, TRUE );
+ AdjustCells( (Prt().*fnRectX->fnGetHeight)() + nReal, sal_True );
if ( nReal )
SetCompletePaint();
}
@@ -4732,18 +4732,18 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
|* Letzte Aenderung MA 20. Jun. 96
|*
|*************************************************************************/
-SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SWRECTFN( this )
if( HasFixSize() )
{
- AdjustCells( (Prt().*fnRect->fnGetHeight)(), TRUE );
+ AdjustCells( (Prt().*fnRect->fnGetHeight)(), sal_True );
return 0L;
}
- //bInfo wird ggf. vom SwRowFrm::Format auf TRUE gesetzt, hier muss dann
+ //bInfo wird ggf. vom SwRowFrm::Format auf sal_True gesetzt, hier muss dann
//entsprechend reagiert werden
- const BOOL bShrinkAnyway = bInfo;
+ const sal_Bool bShrinkAnyway = bInfo;
//Nur soweit Shrinken, wie es der Inhalt der groessten Zelle zulaesst.
SwTwips nRealDist = nDist;
@@ -4818,7 +4818,7 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
pMasterTab->InvalidatePos();
}
}
- AdjustCells( (Prt().*fnRect->fnGetHeight)() - nReal, TRUE );
+ AdjustCells( (Prt().*fnRect->fnGetHeight)() - nReal, sal_True );
}
return nReal;
}
@@ -4889,14 +4889,14 @@ SwCellFrm::SwCellFrm( const SwTableBox &rBox, bool bInsertContent ) :
//angelegt.
if ( rBox.GetSttIdx() )
{
- ULONG nIndex = rBox.GetSttIdx();
+ sal_uLong nIndex = rBox.GetSttIdx();
::_InsertCnt( this, rBox.GetFrmFmt()->GetDoc(), ++nIndex );
}
else
{
const SwTableLines &rLines = rBox.GetTabLines();
SwFrm *pTmpPrev = 0;
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
{
SwRowFrm *pNew = new SwRowFrm( *rLines[i], bInsertContent );
pNew->InsertBehind( this, pTmpPrev );
@@ -4933,9 +4933,9 @@ SwCellFrm::~SwCellFrm()
|* Letzte Aenderung MA 29. Jan. 98
|*
|*************************************************************************/
-BOOL lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, BOOL bInva )
+sal_Bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, sal_Bool bInva )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwFrm *pFrm = pLay->Lower();
SWRECTFN( pLay )
while ( pFrm )
@@ -4943,7 +4943,7 @@ BOOL lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, BOOL bInva )
long nFrmTop = (pFrm->Frm().*fnRect->fnGetTop)();
if( nFrmTop != lYStart )
{
- bRet = TRUE;
+ bRet = sal_True;
const long lDiff = (*fnRect->fnYDiff)( lYStart, nFrmTop );
const long lDiffX = lYStart - nFrmTop;
(pFrm->Frm().*fnRect->fnSubTop)( -lDiff );
@@ -4959,7 +4959,7 @@ BOOL lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, BOOL bInva )
+ lDiffX, bInva );
if ( pFrm->GetDrawObjs() )
{
- for ( USHORT i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
// --> OD 2004-10-08 #i26945# - check, if anchored object
@@ -5174,7 +5174,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
if ( !bValidPrtArea )
{
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
//Position einstellen.
if ( Lower() )
@@ -5209,7 +5209,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
// <--
if ( !bValidSize )
{
- bValidSize = TRUE;
+ bValidSize = sal_True;
//Die VarSize der CellFrms ist immer die Breite.
//Tatsaechlich ist die Breite jedoch nicht Variabel, sie wird durch das
@@ -5243,7 +5243,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
const SwTableBox* pTmpBox = 0;
SwTwips nSumWidth = 0;
- USHORT i = 0;
+ sal_uInt16 i = 0;
do
{
pTmpBox = rBoxes[ i++ ];
@@ -5307,7 +5307,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
//Wieder validieren wenn kein Wachstum stattgefunden hat.
//Invalidiert wird durch AdjustCells von der Row.
if ( !Grow( nDiffHeight ) )
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
}
else
{
@@ -5315,7 +5315,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
//geshrinkt wurde; das kann abgelehnt werden, weil alle
//nebeneinanderliegenden Zellen gleichgross sein muessen.
if ( !Shrink( -nDiffHeight ) )
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
}
}
}
@@ -5342,7 +5342,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
ASSERT( !this, "VAlign an Zelle ohne Inhalt" );
return;
}
- BOOL bVertDir = TRUE;
+ sal_Bool bVertDir = sal_True;
// --> OD 2005-03-30 #i43913# - no vertical alignment, if wrapping
// style influence is considered on object positioning and
// an object is anchored inside the cell.
@@ -5352,7 +5352,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
if ( pPg->GetSortedObjs() )
{
SwRect aRect( Prt() ); aRect += Frm().Pos();
- for ( USHORT i = 0; i < pPg->GetSortedObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pPg->GetSortedObjs()->Count(); ++i )
{
const SwAnchoredObject* pAnchoredObj = (*pPg->GetSortedObjs())[i];
SwRect aTmp( pAnchoredObj->GetObjRect() );
@@ -5385,7 +5385,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
!rAnchoredObjFrmFmt.GetFollowTextFlow().GetValue() )
// <--
{
- bVertDir = FALSE;
+ bVertDir = sal_False;
break;
}
}
@@ -5423,7 +5423,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
if ( Lower()->IsCntntFrm() )
{
const long lYStart = (this->*fnRect->fnGetPrtTop)();
- lcl_ArrangeLowers( this, lYStart, TRUE );
+ lcl_ArrangeLowers( this, lYStart, sal_True );
}
}
}
@@ -5439,24 +5439,24 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
void SwCellFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
- BOOL bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
+ sal_Bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
const SfxPoolItem *pItem = 0;
if( bAttrSetChg )
- ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_VERT_ORIENT, FALSE, &pItem);
+ ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_VERT_ORIENT, sal_False, &pItem);
else if ( RES_VERT_ORIENT == pNew->Which() )
pItem = pNew;
if ( pItem )
{
- BOOL bInva = TRUE;
+ sal_Bool bInva = sal_True;
if ( text::VertOrientation::NONE == ((SwFmtVertOrient*)pItem)->GetVertOrient() &&
// OD 04.11.2003 #112910#
Lower() && Lower()->IsCntntFrm() )
{
SWRECTFN( this )
const long lYStart = (this->*fnRect->fnGetPrtTop)();
- bInva = lcl_ArrangeLowers( this, lYStart, FALSE );
+ bInva = lcl_ArrangeLowers( this, lYStart, sal_False );
}
if ( bInva )
{
@@ -5466,7 +5466,7 @@ void SwCellFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
if ( ( bAttrSetChg &&
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_PROTECT, FALSE ) ) ||
+ SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_PROTECT, sal_False ) ) ||
RES_PROTECT == pNew->Which() )
{
ViewShell *pSh = GetShell();
@@ -5475,15 +5475,15 @@ void SwCellFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
if ( bAttrSetChg &&
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_FRAMEDIR, FALSE, &pItem ) )
+ SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_FRAMEDIR, sal_False, &pItem ) )
{
- SetDerivedVert( FALSE );
+ SetDerivedVert( sal_False );
CheckDirChange();
}
// --> collapsing borders FME 2005-05-27 #i29550#
if ( bAttrSetChg &&
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_BOX, FALSE, &pItem ) )
+ SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_BOX, sal_False, &pItem ) )
{
SwFrm* pTmpUpper = GetUpper();
while ( pTmpUpper->GetUpper() && !pTmpUpper->GetUpper()->IsTabFrm() )
@@ -5584,7 +5584,7 @@ SwRowFrm* SwTabFrm::GetFirstNonHeadlineRow() const
}
else
{
- USHORT nRepeat = GetTable()->GetRowsToRepeat();
+ sal_uInt16 nRepeat = GetTable()->GetRowsToRepeat();
while ( pRet && nRepeat > 0 )
{
pRet = (SwRowFrm*)pRet->GetNext();
@@ -5601,7 +5601,7 @@ SwRowFrm* SwTabFrm::GetFirstNonHeadlineRow() const
*/
bool SwTable::IsHeadline( const SwTableLine& rLine ) const
{
- for ( USHORT i = 0; i < GetRowsToRepeat(); ++i )
+ for ( sal_uInt16 i = 0; i < GetRowsToRepeat(); ++i )
if ( GetTabLines()[ i ] == &rLine )
return true;
@@ -5615,7 +5615,7 @@ bool SwTabFrm::IsLayoutSplitAllowed() const
// --> collapsing borders FME 2005-05-27 #i29550#
-USHORT SwTabFrm::GetBottomLineSize() const
+sal_uInt16 SwTabFrm::GetBottomLineSize() const
{
ASSERT( IsCollapsingBorders(),
"BottomLineSize only required for collapsing borders" )
@@ -5813,7 +5813,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
pFirstRow = static_cast<SwRowFrm*>(pFirstRow->GetNext());
// Calculate the height of the headlines:
- const USHORT nRepeat = GetTable()->GetRowsToRepeat();
+ const sal_uInt16 nRepeat = GetTable()->GetRowsToRepeat();
SwTwips nRepeatHeight = nRepeat ? lcl_GetHeightOfRows( GetLower(), nRepeat ) : 0;
// Calculate the height of the keeping lines
@@ -5821,7 +5821,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
SwTwips nKeepHeight = nRepeatHeight;
if ( GetFmt()->GetDoc()->get(IDocumentSettingAccess::TABLE_ROW_KEEP) )
{
- USHORT nKeepRows = nRepeat;
+ sal_uInt16 nKeepRows = nRepeat;
// Check how many rows want to keep together
while ( pFirstRow && pFirstRow->ShouldRowKeepWithNext() )
@@ -5870,7 +5870,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
{
if ( 1 == pLower2->GetTabBox()->getRowSpan() )
{
- const SwTwips nCellHeight = lcl_CalcMinCellHeight( pLower2, TRUE );
+ const SwTwips nCellHeight = lcl_CalcMinCellHeight( pLower2, sal_True );
nMaxHeight = Max( nCellHeight, nMaxHeight );
}
pLower2 = static_cast<const SwCellFrm*>(pLower2->GetNext());
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 8c54ed8623a6..4606d1de5b14 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -77,14 +77,14 @@ public:
//public:
// SwCrsrOszControl() : pStk1( 0 ), pStk2( 0 ) {}; // ; <- ????
- BOOL ChkOsz( const SwFlyFrm *pFly )
+ sal_Bool ChkOsz( const SwFlyFrm *pFly )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( pFly != pStk1 && pFly != pStk2 )
{
pStk1 = pStk2;
pStk2 = pFly;
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
@@ -112,10 +112,10 @@ static SwCrsrOszControl aOszCtrl = { 0, 0, 0 };
|* Letzte Aenderung MA 23. May. 95
|*
|*************************************************************************/
-BOOL SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
+sal_Bool SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
SwCrsrMoveState* pCMS ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwFrm *pFrm = Lower();
while ( !bRet && pFrm )
{
@@ -130,11 +130,11 @@ BOOL SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
if ( aPaintRect.IsInside( rPoint ) &&
( bCntntCheck || pFrm->GetCrsrOfst( pPos, rPoint, pCMS ) ) )
- bRet = TRUE;
+ bRet = sal_True;
else
pFrm = pFrm->GetNext();
if ( pCMS && pCMS->bStop )
- return FALSE;
+ return sal_False;
}
return bRet;
}
@@ -150,10 +150,10 @@ BOOL SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
|*
|*************************************************************************/
-BOOL SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
+sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
SwCrsrMoveState* pCMS ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
Point aPoint( rPoint );
// check, if we have to adjust the point
@@ -178,16 +178,16 @@ BOOL SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
static_cast<const SwVirtFlyDrawObj*>(aIter());
const SwFlyFrm* pFly = pObj ? pObj->GetFlyFrm() : 0;
if ( pFly &&
- ( ( pCMS ? pCMS->bSetInReadOnly : FALSE ) ||
+ ( ( pCMS ? pCMS->bSetInReadOnly : sal_False ) ||
!pFly->IsProtected() ) &&
pFly->GetCrsrOfst( pPos, aPoint, pCMS ) )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
if ( pCMS && pCMS->bStop )
- return FALSE;
+ return sal_False;
aIter.Prev();
}
}
@@ -198,17 +198,17 @@ BOOL SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
//wir den StartPoint und fangen nochmal eine Seite vor der
//aktuellen an. Mit Flys ist es dann allerdings vorbei.
if ( SwLayoutFrm::GetCrsrOfst( pPos, aPoint, pCMS ) )
- bRet = TRUE;
+ bRet = sal_True;
else
{
if ( pCMS && (pCMS->bStop || pCMS->bExactOnly) )
{
- ((SwCrsrMoveState*)pCMS)->bStop = TRUE;
- return FALSE;
+ ((SwCrsrMoveState*)pCMS)->bStop = sal_True;
+ return sal_False;
}
- const SwCntntFrm *pCnt = GetCntntPos( aPoint, FALSE, FALSE, FALSE, pCMS, FALSE );
+ const SwCntntFrm *pCnt = GetCntntPos( aPoint, sal_False, sal_False, sal_False, pCMS, sal_False );
if ( pCMS && pCMS->bStop )
- return FALSE;
+ return sal_False;
ASSERT( pCnt, "Crsr is gone to a Black hole" );
if( pCMS && pCMS->pFill && pCnt->IsTxtFrm() )
@@ -221,7 +221,7 @@ BOOL SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
// Set point to pCnt, delete mark
// this may happen, if pCnt is hidden
*pPos = SwPosition( *pCnt->GetNode(), SwIndex( (SwTxtNode*)pCnt->GetNode(), 0 ) );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -256,7 +256,7 @@ bool SwPageFrm::FillSelection( SwSelectionList& rList, const SwRect& rRect ) con
if( GetSortedObjs() )
{
const SwSortedObjs &rObjs = *GetSortedObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
const SwAnchoredObject* pAnchoredObj = rObjs[i];
if( !pAnchoredObj->ISA(SwFlyFrm) )
@@ -294,19 +294,19 @@ bool SwRootFrm::FillSelection( SwSelectionList& aSelList, const SwRect& rRect) c
|*
|* Beschreibung: Reicht Primaer den Aufruf an die erste Seite weiter.
|* Wenn der 'reingereichte Point veraendert wird,
-|* so wird FALSE zurueckgegeben.
+|* so wird sal_False zurueckgegeben.
|* Ersterstellung MA 01. Jun. 92
|* Letzte Aenderung MA 30. Nov. 94
|*
|*************************************************************************/
-BOOL SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
+sal_Bool SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
SwCrsrMoveState* pCMS ) const
{
sal_Bool bOldAction = IsCallbackActionEnabled();
- ((SwRootFrm*)this)->SetCallbackActionEnabled( FALSE );
+ ((SwRootFrm*)this)->SetCallbackActionEnabled( sal_False );
ASSERT( (Lower() && Lower()->IsPageFrm()), "Keinen PageFrm gefunden." );
if( pCMS && pCMS->pFill )
- ((SwCrsrMoveState*)pCMS)->bFillRet = FALSE;
+ ((SwCrsrMoveState*)pCMS)->bFillRet = sal_False;
Point aOldPoint = rPoint;
// PAGES01
@@ -335,7 +335,7 @@ BOOL SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
if( pCMS )
{
if( pCMS->bStop )
- return FALSE;
+ return sal_False;
if( pCMS->pFill )
return pCMS->bFillRet;
}
@@ -354,24 +354,24 @@ BOOL SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
|* Letzte Aenderung MA 23. May. 95
|*
|*************************************************************************/
-BOOL SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
+sal_Bool SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
SwCrsrMoveState* pCMS ) const
{
// cell frame does not necessarily have a lower (split table cell)
if ( !Lower() )
- return FALSE;
+ return sal_False;
- if ( !(pCMS?pCMS->bSetInReadOnly:FALSE) &&
+ if ( !(pCMS?pCMS->bSetInReadOnly:sal_False) &&
GetFmt()->GetProtect().IsCntntProtected() )
- return FALSE;
+ return sal_False;
if ( pCMS && pCMS->eState == MV_TBLSEL )
{
const SwTabFrm *pTab = FindTabFrm();
if ( pTab->IsFollow() && pTab->IsInHeadline( *this ) )
{
- ((SwCrsrMoveState*)pCMS)->bStop = TRUE;
- return FALSE;
+ ((SwCrsrMoveState*)pCMS)->bStop = sal_True;
+ return sal_False;
}
}
@@ -382,7 +382,7 @@ BOOL SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
else
{
Calc();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwFrm *pFrm = Lower();
while ( pFrm && !bRet )
@@ -392,14 +392,14 @@ BOOL SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
{
bRet = pFrm->GetCrsrOfst( pPos, rPoint, pCMS );
if ( pCMS && pCMS->bStop )
- return FALSE;
+ return sal_False;
}
pFrm = pFrm->GetNext();
}
if ( !bRet )
{
Point *pPoint = pCMS && pCMS->pFill ? new Point( rPoint ) : NULL;
- const SwCntntFrm *pCnt = GetCntntPos( rPoint, TRUE );
+ const SwCntntFrm *pCnt = GetCntntPos( rPoint, sal_True );
if( pPoint && pCnt->IsTxtFrm() )
{
pCnt->GetCrsrOfst( pPos, *pPoint, pCMS );
@@ -409,11 +409,11 @@ BOOL SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
pCnt->GetCrsrOfst( pPos, rPoint, pCMS );
delete pPoint;
}
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -434,7 +434,7 @@ BOOL SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
//GetCrsrOfst entscheidet sich bei einer Rekursion fuer denjenigen der
//am weitesten oben liegt.
-BOOL SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
+sal_Bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
SwCrsrMoveState* pCMS ) const
{
aOszCtrl.Entry( this );
@@ -445,14 +445,14 @@ BOOL SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
//innerhalb des aktuellen befindet, so wird fuer diesen das
//GetCrsrOfst gerufen.
Calc();
- BOOL bInside = Frm().IsInside( rPoint ) && Lower(),
- bRet = FALSE;
+ sal_Bool bInside = Frm().IsInside( rPoint ) && Lower(),
+ bRet = sal_False;
//Wenn der Frm eine Grafik enthaelt, aber nur Text gewuenscht ist, so
//nimmt er den Crsr grundsaetzlich nicht an.
if ( bInside && pCMS && pCMS->eState == MV_SETONLYTEXT &&
(!Lower() || Lower()->IsNoTxtFrm()) )
- bInside = FALSE;
+ bInside = sal_False;
const SwPageFrm *pPage = FindPageFrm();
if ( bInside && pPage && pPage->GetSortedObjs() )
@@ -467,10 +467,10 @@ BOOL SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
Frm().IsInside( pFly->Frm() ) )
{
if ( aOszCtrl.ChkOsz( pFly ) ||
- TRUE == (bRet = pFly->GetCrsrOfst( pPos, rPoint, pCMS )))
+ sal_True == (bRet = pFly->GetCrsrOfst( pPos, rPoint, pCMS )))
break;
if ( pCMS && pCMS->bStop )
- return FALSE;
+ return sal_False;
}
aIter.Next();
}
@@ -486,7 +486,7 @@ BOOL SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
{
bRet = pFrm->GetCrsrOfst( pPos, rPoint, pCMS );
if ( pCMS && pCMS->bStop )
- return FALSE;
+ return sal_False;
}
pFrm = pFrm->GetNext();
}
@@ -494,9 +494,9 @@ BOOL SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
{
Point *pPoint = pCMS && pCMS->pFill ? new Point( rPoint ) : NULL;
const SwCntntFrm *pCnt = GetCntntPos(
- rPoint, TRUE, FALSE, FALSE, pCMS );
+ rPoint, sal_True, sal_False, sal_False, pCMS );
if ( pCMS && pCMS->bStop )
- return FALSE;
+ return sal_False;
if( pPoint && pCnt->IsTxtFrm() )
{
pCnt->GetCrsrOfst( pPos, *pPoint, pCMS );
@@ -505,7 +505,7 @@ BOOL SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
else
pCnt->GetCrsrOfst( pPos, rPoint, pCMS );
delete pPoint;
- bRet = TRUE;
+ bRet = sal_True;
}
}
aOszCtrl.Exit( this );
@@ -519,22 +519,22 @@ BOOL SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
|* Letzte Aenderung MA 06. Sep. 93
|*
|*************************************************************************/
-BOOL SwCntntFrm::LeftMargin(SwPaM *pPam) const
+sal_Bool SwCntntFrm::LeftMargin(SwPaM *pPam) const
{
if( pPam->GetNode() != (SwCntntNode*)GetNode() )
- return FALSE;
+ return sal_False;
((SwCntntNode*)GetNode())->
MakeStartIndex((SwIndex *) &pPam->GetPoint()->nContent);
- return TRUE;
+ return sal_True;
}
-BOOL SwCntntFrm::RightMargin(SwPaM *pPam, BOOL) const
+sal_Bool SwCntntFrm::RightMargin(SwPaM *pPam, sal_Bool) const
{
if( pPam->GetNode() != (SwCntntNode*)GetNode() )
- return FALSE;
+ return sal_False;
((SwCntntNode*)GetNode())->
MakeEndIndex((SwIndex *) &pPam->GetPoint()->nContent);
- return TRUE;
+ return sal_True;
}
const SwCntntFrm *lcl_GetNxtCnt( const SwCntntFrm* pCnt )
@@ -550,7 +550,7 @@ const SwCntntFrm *lcl_GetPrvCnt( const SwCntntFrm* pCnt )
typedef const SwCntntFrm *(*GetNxtPrvCnt)( const SwCntntFrm* );
//Frame in wiederholter Headline?
-BOOL lcl_IsInRepeatedHeadline( const SwFrm *pFrm,
+sal_Bool lcl_IsInRepeatedHeadline( const SwFrm *pFrm,
const SwTabFrm** ppTFrm = 0 )
{
const SwTabFrm *pTab = pFrm->FindTabFrm();
@@ -566,13 +566,13 @@ BOOL lcl_IsInRepeatedHeadline( const SwFrm *pFrm,
// FME: Skip follow flow cells
const SwCntntFrm * MA_FASTCALL lcl_MissProtectedFrames( const SwCntntFrm *pCnt,
GetNxtPrvCnt fnNxtPrv,
- BOOL bMissHeadline,
- BOOL bInReadOnly,
- BOOL bMissFollowFlowLine )
+ sal_Bool bMissHeadline,
+ sal_Bool bInReadOnly,
+ sal_Bool bMissFollowFlowLine )
{
if ( pCnt && pCnt->IsInTab() )
{
- BOOL bProtect = TRUE;
+ sal_Bool bProtect = sal_True;
while ( pCnt && bProtect )
{
const SwLayoutFrm *pCell = pCnt->GetUpper();
@@ -583,7 +583,7 @@ const SwCntntFrm * MA_FASTCALL lcl_MissProtectedFrames( const SwCntntFrm *pCnt,
( !bMissHeadline || !lcl_IsInRepeatedHeadline( pCell ) ) &&
( !bMissFollowFlowLine || !pCell->IsInFollowFlowRow() ) &&
!pCell->IsCoveredCell() ) )
- bProtect = FALSE;
+ bProtect = sal_False;
else
pCnt = (*fnNxtPrv)( pCnt );
}
@@ -595,8 +595,8 @@ const SwCntntFrm * MA_FASTCALL lcl_MissProtectedFrames( const SwCntntFrm *pCnt,
return pCnt;
}
-BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
- GetNxtPrvCnt fnNxtPrv, BOOL bInReadOnly )
+sal_Bool MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
+ GetNxtPrvCnt fnNxtPrv, sal_Bool bInReadOnly )
{
ASSERT( pPam->GetNode() == (SwCntntNode*)pStart->GetNode(),
"lcl_UpDown arbeitet nicht fuer andere." );
@@ -606,10 +606,10 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
//Wenn gerade eine Tabellenselection laeuft muss ein bischen getricktst
//werden: Beim hochlaufen an den Anfang der Zelle gehen, beim runterlaufen
//an das Ende der Zelle gehen.
- BOOL bTblSel = false;
+ sal_Bool bTblSel = false;
if ( pStart->IsInTab() &&
- pPam->GetNode( TRUE )->StartOfSectionNode() !=
- pPam->GetNode( FALSE )->StartOfSectionNode() )
+ pPam->GetNode( sal_True )->StartOfSectionNode() !=
+ pPam->GetNode( sal_False )->StartOfSectionNode() )
{
bTblSel = true;
const SwLayoutFrm *pCell = pStart->GetUpper();
@@ -642,13 +642,13 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
}
pCnt = (*fnNxtPrv)( pCnt ? pCnt : pStart );
- pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, TRUE, bInReadOnly, bTblSel );
+ pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, sal_True, bInReadOnly, bTblSel );
const SwTabFrm *pStTab = pStart->FindTabFrm();
const SwTabFrm *pTable = 0;
- const BOOL bTab = pStTab || (pCnt && pCnt->IsInTab()) ? TRUE : FALSE;
- BOOL bEnd = bTab ? FALSE : TRUE;
+ const sal_Bool bTab = pStTab || (pCnt && pCnt->IsInTab()) ? sal_True : sal_False;
+ sal_Bool bEnd = bTab ? sal_False : sal_True;
const SwFrm* pVertRefFrm = pStart;
if ( bTblSel && pStTab )
@@ -723,7 +723,7 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
(pCnt->IsTxtFrm() && ((SwTxtFrm*)pCnt)->IsHiddenNow())))
{
pCnt = (*fnNxtPrv)( pCnt );
- pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, TRUE, bInReadOnly, bTblSel );
+ pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, sal_True, bInReadOnly, bTblSel );
}
}
@@ -735,7 +735,7 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
(pCnt->IsTxtFrm() && ((SwTxtFrm*)pCnt)->IsHiddenNow())))
{
pCnt = (*fnNxtPrv)( pCnt );
- pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, TRUE, bInReadOnly, bTblSel );
+ pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, sal_True, bInReadOnly, bTblSel );
}
}
@@ -746,7 +746,7 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
if ( pCnt && pCnt->IsTxtFrm() && ((SwTxtFrm*)pCnt)->IsHiddenNow() )
{
pCnt = (*fnNxtPrv)( pCnt );
- pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, TRUE, bInReadOnly, bTblSel );
+ pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, sal_True, bInReadOnly, bTblSel );
}
}
@@ -757,11 +757,11 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
const SwFrm *pUp = pStart->GetUpper(); //Head/Foot
while ( pUp && pUp->GetUpper() && !(pUp->GetType() & 0x0018 ) )
pUp = pUp->GetUpper();
- BOOL bSame = FALSE;
+ sal_Bool bSame = sal_False;
const SwFrm *pCntUp = pCnt->GetUpper();
while ( pCntUp && !bSame )
{ if ( pUp == pCntUp )
- bSame = TRUE;
+ bSame = sal_True;
else
pCntUp = pCntUp->GetUpper();
}
@@ -770,18 +770,18 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
else if ( pCnt && pCnt->IsTxtFrm() && ((SwTxtFrm*)pCnt)->IsHiddenNow() ) // i73332
{
pCnt = (*fnNxtPrv)( pCnt );
- pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, TRUE, bInReadOnly, bTblSel );
+ pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, sal_True, bInReadOnly, bTblSel );
}
}
if ( bTab )
{
if ( !pCnt )
- bEnd = TRUE;
+ bEnd = sal_True;
else
{ const SwTabFrm *pTab = pCnt->FindTabFrm();
if( !pTab )
- bEnd = TRUE;
+ bEnd = sal_True;
else
{
if ( pTab != pTable )
@@ -828,7 +828,7 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
if ( pCell && pCell->Frm().IsInside( aInsideCell ) )
{
- bEnd = TRUE;
+ bEnd = sal_True;
//Jetzt noch schnell den richtigen Cntnt in der Zelle
//greifen.
if ( !pCnt->Frm().IsInside( aInsideCnt ) )
@@ -840,13 +840,13 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
}
}
else if ( pCnt->Frm().IsInside( aInsideCnt ) )
- bEnd = TRUE;
+ bEnd = sal_True;
}
}
if ( !bEnd )
{
pCnt = (*fnNxtPrv)( pCnt );
- pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, TRUE, bInReadOnly, bTblSel );
+ pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, sal_True, bInReadOnly, bTblSel );
}
}
@@ -861,17 +861,17 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
pCNd->MakeEndIndex( (SwIndex*)&pPam->GetPoint()->nContent );
else
pCNd->MakeStartIndex( (SwIndex*)&pPam->GetPoint()->nContent );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwCntntFrm::UnitUp( SwPaM* pPam, const SwTwips, BOOL bInReadOnly ) const
+sal_Bool SwCntntFrm::UnitUp( SwPaM* pPam, const SwTwips, sal_Bool bInReadOnly ) const
{
return ::lcl_UpDown( pPam, this, lcl_GetPrvCnt, bInReadOnly );
}
-BOOL SwCntntFrm::UnitDown( SwPaM* pPam, const SwTwips, BOOL bInReadOnly ) const
+sal_Bool SwCntntFrm::UnitDown( SwPaM* pPam, const SwTwips, sal_Bool bInReadOnly ) const
{
return ::lcl_UpDown( pPam, this, lcl_GetNxtCnt, bInReadOnly );
}
@@ -889,13 +889,13 @@ BOOL SwCntntFrm::UnitDown( SwPaM* pPam, const SwTwips, BOOL bInReadOnly ) const
|* Letzte Aenderung MA 09. Oct. 97
|*
|*************************************************************************/
-USHORT SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const
+sal_uInt16 SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const
{
ASSERT( pActualCrsr, "Welche Seite soll's denn sein?" );
const SwFrm *pActFrm = GetFmt()->GetDoc()->GetNodes()[pActualCrsr->GetPoint()->nNode]->
GetCntntNode()->GetFrm( 0,
pActualCrsr->GetPoint(),
- FALSE );
+ sal_False );
return pActFrm->FindPageFrm()->GetPhyPageNum();
}
@@ -913,12 +913,12 @@ USHORT SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const
|* Letzte Aenderung MA 09. Oct. 97
|*
|*************************************************************************/
-USHORT SwRootFrm::SetCurrPage( SwCursor* pToSet, USHORT nPageNum )
+sal_uInt16 SwRootFrm::SetCurrPage( SwCursor* pToSet, sal_uInt16 nPageNum )
{
ASSERT( Lower() && Lower()->IsPageFrm(), "Keine Seite vorhanden." );
SwPageFrm *pPage = (SwPageFrm*)Lower();
- BOOL bEnd =FALSE;
+ sal_Bool bEnd =sal_False;
while ( !bEnd && pPage->GetPhyPageNum() != nPageNum )
{ if ( pPage->GetNext() )
pPage = (SwPageFrm*)pPage->GetNext();
@@ -937,7 +937,7 @@ USHORT SwRootFrm::SetCurrPage( SwCursor* pToSet, USHORT nPageNum )
if ( pPage->GetNext() )
pPage = (SwPageFrm*)pPage->GetNext();
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
}
//pPage zeigt jetzt auf die 'gewuenschte' Seite. Jetzt muss noch der
@@ -1036,18 +1036,18 @@ SwWhichPage fnPageNext = GetNextFrm;
//den Parameter fnPosPage) in der
//aktuellen/vorhergehenden/folgenden Seite (gesteuert durch den
//Parameter fnWhichPage).
-BOOL GetFrmInPage( const SwCntntFrm *pCnt, SwWhichPage fnWhichPage,
+sal_Bool GetFrmInPage( const SwCntntFrm *pCnt, SwWhichPage fnWhichPage,
SwPosPage fnPosPage, SwPaM *pPam )
{
//Erstmal die gewuenschte Seite besorgen, anfangs die aktuelle, dann
//die die per fnWichPage gewuenscht wurde
const SwLayoutFrm *pLayoutFrm = pCnt->FindPageFrm();
if ( !pLayoutFrm || (0 == (pLayoutFrm = (*fnWhichPage)(pLayoutFrm))) )
- return FALSE;
+ return sal_False;
//Jetzt den gewuenschen CntntFrm unterhalb der Seite
if( 0 == (pCnt = (*fnPosPage)(pLayoutFrm)) )
- return FALSE;
+ return sal_False;
else
{
// repeated headlines in tables
@@ -1067,7 +1067,7 @@ BOOL GetFrmInPage( const SwCntntFrm *pCnt, SwWhichPage fnWhichPage,
// of the next row
pCnt = pRow->ContainsCntnt();
if ( ! pCnt )
- return FALSE;
+ return sal_False;
}
}
}
@@ -1082,7 +1082,7 @@ BOOL GetFrmInPage( const SwCntntFrm *pCnt, SwWhichPage fnWhichPage,
nIdx = pCnt->GetFollow() ?
((SwTxtFrm*)pCnt)->GetFollow()->GetOfst()-1 : pCNd->Len();
pPam->GetPoint()->nContent.Assign( pCNd, nIdx );
- return TRUE;
+ return sal_True;
}
}
@@ -1101,7 +1101,7 @@ BOOL GetFrmInPage( const SwCntntFrm *pCnt, SwWhichPage fnWhichPage,
|* Letzte Aenderung MA 09. Jan. 97
|*
|*************************************************************************/
-ULONG CalcDiff( const Point &rPt1, const Point &rPt2 )
+sal_uLong CalcDiff( const Point &rPt1, const Point &rPt2 )
{
//Jetzt die Entfernung zwischen den beiden Punkten berechnen.
//'Delta' X^2 + 'Delta'Y^2 = 'Entfernung'^2
@@ -1140,11 +1140,11 @@ const SwLayoutFrm* lcl_Inside( const SwCntntFrm *pCnt, Point& rPt )
}
const SwCntntFrm *SwLayoutFrm::GetCntntPos( Point& rPoint,
- const BOOL bDontLeave,
- const BOOL bBodyOnly,
- const BOOL bCalc,
+ const sal_Bool bDontLeave,
+ const sal_Bool bBodyOnly,
+ const sal_Bool bCalc,
const SwCrsrMoveState *pCMS,
- const BOOL bDefaultExpand ) const
+ const sal_Bool bDefaultExpand ) const
{
//Ersten CntntFrm ermitteln.
const SwLayoutFrm *pStart = (!bDontLeave && bDefaultExpand && GetPrev()) ?
@@ -1160,11 +1160,11 @@ const SwCntntFrm *SwLayoutFrm::GetCntntPos( Point& rPoint,
const SwCntntFrm *pActual= pCntnt;
const SwLayoutFrm *pInside = NULL;
- USHORT nMaxPage = GetPhyPageNum() + (bDefaultExpand ? 1 : 0);
+ sal_uInt16 nMaxPage = GetPhyPageNum() + (bDefaultExpand ? 1 : 0);
Point aPoint = rPoint;
- ULONG nDistance = ULONG_MAX;
+ sal_uLong nDistance = ULONG_MAX;
- while ( TRUE ) //Sicherheitsschleifchen, damit immer einer gefunden wird.
+ while ( sal_True ) //Sicherheitsschleifchen, damit immer einer gefunden wird.
{
while ( pCntnt &&
((!bDontLeave || IsAnLower( pCntnt )) &&
@@ -1176,8 +1176,8 @@ const SwCntntFrm *SwLayoutFrm::GetCntntPos( Point& rPoint,
//Wenn der Cntnt in einem geschuetzen Bereich (Zelle, Ftn, Section)
//liegt, wird der nachste Cntnt der nicht geschuetzt ist gesucht.
const SwCntntFrm *pComp = pCntnt;
- pCntnt = ::lcl_MissProtectedFrames( pCntnt, lcl_GetNxtCnt, FALSE,
- pCMS ? pCMS->bSetInReadOnly : FALSE, FALSE );
+ pCntnt = ::lcl_MissProtectedFrames( pCntnt, lcl_GetNxtCnt, sal_False,
+ pCMS ? pCMS->bSetInReadOnly : sal_False, sal_False );
if ( pComp != pCntnt )
continue;
@@ -1215,13 +1215,13 @@ const SwCntntFrm *SwLayoutFrm::GetCntntPos( Point& rPoint,
if( !pInside || ( pInside->IsAnLower( pCntnt ) &&
( !pCntnt->IsInFtn() || pInside->IsFtnContFrm() ) ) )
{
- const ULONG nDiff = ::CalcDiff( aCntntPoint, rPoint );
- BOOL bBetter = nDiff < nDistance; // Dichter dran
+ const sal_uLong nDiff = ::CalcDiff( aCntntPoint, rPoint );
+ sal_Bool bBetter = nDiff < nDistance; // Dichter dran
if( !pInside )
{
pInside = lcl_Inside( pCntnt, rPoint );
if( pInside ) // Im "richtigen" Seitenteil
- bBetter = TRUE;
+ bBetter = sal_True;
}
if( bBetter )
{
@@ -1296,7 +1296,7 @@ const SwCntntFrm *SwLayoutFrm::GetCntntPos( Point& rPoint,
const SwTabFrm *pTab = pActual->FindTabFrm();
if ( pTab->IsFollow() && pTab->IsInHeadline( *pActual ) )
{
- ((SwCrsrMoveState*)pCMS)->bStop = TRUE;
+ ((SwCrsrMoveState*)pCMS)->bStop = sal_True;
return 0;
}
}
@@ -1374,7 +1374,7 @@ void SwPageFrm::GetCntntPosition( const Point &rPt, SwPosition &rPos ) const
const SwCntntFrm *pAct = pCntnt;
Point aAct = rPt;
- ULONG nDist = ULONG_MAX;
+ sal_uLong nDist = ULONG_MAX;
while ( pCntnt )
{
@@ -1401,7 +1401,7 @@ void SwPageFrm::GetCntntPosition( const Point &rPt, SwPosition &rPos ) const
else if ( aCntFrm.Right() < rPt.X() )
aPoint.X() = aCntFrm.Right();
- const ULONG nDiff = ::CalcDiff( aPoint, rPt );
+ const sal_uLong nDiff = ::CalcDiff( aPoint, rPt );
if ( nDiff < nDist )
{
aAct = aPoint;
@@ -1460,14 +1460,14 @@ class DisableCallbackAction
{
private:
SwRootFrm& mrRootFrm;
- BOOL mbOldCallbackActionState;
+ sal_Bool mbOldCallbackActionState;
public:
DisableCallbackAction( const SwRootFrm& _rRootFrm ) :
mrRootFrm( const_cast<SwRootFrm&>(_rRootFrm) ),
mbOldCallbackActionState( _rRootFrm.IsCallbackActionEnabled() )
{
- mrRootFrm.SetCallbackActionEnabled( FALSE );
+ mrRootFrm.SetCallbackActionEnabled( sal_False );
}
~DisableCallbackAction()
@@ -1479,7 +1479,7 @@ class DisableCallbackAction
//!!!!! Es wird nur der vertikal naechstliegende gesucht.
//JP 11.10.2001: only in tables we try to find the right column - Bug 72294
-Point SwRootFrm::GetNextPrevCntntPos( const Point& rPoint, BOOL bNext ) const
+Point SwRootFrm::GetNextPrevCntntPos( const Point& rPoint, sal_Bool bNext ) const
{
// --> OD 2005-05-25 #123110# - disable creation of an action by a callback
// event during processing of this method. Needed because formatting is
@@ -1567,7 +1567,7 @@ Point SwRootFrm::GetNextPrevCntntPos( const Point& rPoint, BOOL bNext ) const
|*
|* Beschreibung: Liefert die absolute Dokumentpositon der gewuenschten
|* Seite.
-|* Formatiert wird nur soweit notwendig und nur dann wenn bFormat=TRUE
+|* Formatiert wird nur soweit notwendig und nur dann wenn bFormat=sal_True
|* Liefert Null, wenn die Operation nicht moeglich ist.
|* Die Pos ist die der letzten Seite, wenn die Seitenzahl zu gross
|* gewaehlt wurde.
@@ -1575,12 +1575,12 @@ Point SwRootFrm::GetNextPrevCntntPos( const Point& rPoint, BOOL bNext ) const
|* Letzte Aenderung MA 09. Oct. 97
|*
|*************************************************************************/
-Point SwRootFrm::GetPagePos( USHORT nPageNum ) const
+Point SwRootFrm::GetPagePos( sal_uInt16 nPageNum ) const
{
ASSERT( Lower() && Lower()->IsPageFrm(), "Keine Seite vorhanden." );
const SwPageFrm *pPage = (const SwPageFrm*)Lower();
- while ( TRUE )
+ while ( sal_True )
{
if ( pPage->GetPhyPageNum() >= nPageNum || !pPage->GetNext() )
break;
@@ -1615,20 +1615,20 @@ SwPageFrm* SwRootFrm::GetPageByPageNum( sal_uInt16 _nPageNum ) const
/*************************************************************************
|*
-|* SwRootFrm::IsDummyPage(USHORT)
+|* SwRootFrm::IsDummyPage(sal_uInt16)
|*
-|* Description: Returns TRUE, when the given physical pagenumber does't exist
+|* Description: Returns sal_True, when the given physical pagenumber does't exist
|* or this page is an empty page.
|*************************************************************************/
-BOOL SwRootFrm::IsDummyPage( USHORT nPageNum ) const
+sal_Bool SwRootFrm::IsDummyPage( sal_uInt16 nPageNum ) const
{
if( !Lower() || !nPageNum || nPageNum > GetPageNum() )
- return TRUE;
+ return sal_True;
const SwPageFrm *pPage = (const SwPageFrm*)Lower();
while( pPage && nPageNum < pPage->GetPhyPageNum() )
pPage = (const SwPageFrm*)pPage->GetNext();
- return pPage ? pPage->IsEmptyPage() : TRUE;
+ return pPage ? pPage->IsEmptyPage() : sal_True;
}
@@ -1644,7 +1644,7 @@ BOOL SwRootFrm::IsDummyPage( USHORT nPageNum ) const
|* Letzte Aenderung MA 06. Nov. 97
|*
|*************************************************************************/
-BOOL SwFrm::IsProtected() const
+sal_Bool SwFrm::IsProtected() const
{
if (this->IsCntntFrm() && ((SwCntntFrm*)this)->GetNode())
{
@@ -1652,7 +1652,7 @@ BOOL SwFrm::IsProtected() const
bool isFormProtected=pDoc->get(IDocumentSettingAccess::PROTECT_FORM );
if (isFormProtected)
{
- return FALSE; // TODO a hack for now, well deal with it laster, I we return true here we have a "double" locking
+ return sal_False; // TODO a hack for now, well deal with it laster, I we return true here we have a "double" locking
}
}
//Der Frm kann in Rahmen, Zellen oder Bereichen geschuetzt sein.
@@ -1664,16 +1664,16 @@ BOOL SwFrm::IsProtected() const
{
if ( ((SwCntntFrm*)pFrm)->GetNode() &&
((SwCntntFrm*)pFrm)->GetNode()->IsInProtectSect() )
- return TRUE;
+ return sal_True;
}
else
{
if ( ((SwLayoutFrm*)pFrm)->GetFmt() &&
((SwLayoutFrm*)pFrm)->GetFmt()->
GetProtect().IsCntntProtected() )
- return TRUE;
+ return sal_True;
if ( pFrm->IsCoveredCell() )
- return TRUE;
+ return sal_True;
}
if ( pFrm->IsFlyFrm() )
{
@@ -1686,7 +1686,7 @@ BOOL SwFrm::IsProtected() const
{ pMaster = pMaster->GetPrevLink();
} while ( pMaster->GetPrevLink() );
if ( pMaster->IsProtected() )
- return TRUE;
+ return sal_True;
}
pFrm = ((SwFlyFrm*)pFrm)->GetAnchorFrm();
}
@@ -1697,7 +1697,7 @@ BOOL SwFrm::IsProtected() const
} while ( pFrm );
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1709,7 +1709,7 @@ BOOL SwFrm::IsProtected() const
|* Letzte Aenderung MA 30. Nov. 94
|*
|*************************************************************************/
-USHORT SwFrm::GetPhyPageNum() const
+sal_uInt16 SwFrm::GetPhyPageNum() const
{
const SwPageFrm *pPage = FindPageFrm();
return pPage ? pPage->GetPhyPageNum() : 0;
@@ -1729,15 +1729,15 @@ USHORT SwFrm::GetPhyPageNum() const
* but a previous empty page don't count.
* --------------------------------------------------*/
-BOOL SwFrm::WannaRightPage() const
+sal_Bool SwFrm::WannaRightPage() const
{
const SwPageFrm *pPage = FindPageFrm();
if ( !pPage || !pPage->GetUpper() )
- return TRUE;
+ return sal_True;
const SwFrm *pFlow = pPage->FindFirstBodyCntnt();
SwPageDesc *pDesc = 0;
- USHORT nPgNum = 0;
+ sal_uInt16 nPgNum = 0;
if ( pFlow )
{
if ( pFlow->IsInTab() )
@@ -1764,9 +1764,9 @@ BOOL SwFrm::WannaRightPage() const
}
}
ASSERT( pDesc, "No pagedescriptor" );
- BOOL bOdd;
+ sal_Bool bOdd;
if( nPgNum )
- bOdd = nPgNum % 2 ? TRUE : FALSE;
+ bOdd = nPgNum % 2 ? sal_True : sal_False;
else
{
bOdd = pPage->OnRightPage();
@@ -1776,9 +1776,9 @@ BOOL SwFrm::WannaRightPage() const
if( !pPage->IsEmptyPage() )
{
if( !pDesc->GetRightFmt() )
- bOdd = FALSE;
+ bOdd = sal_False;
else if( !pDesc->GetLeftFmt() )
- bOdd = TRUE;
+ bOdd = sal_True;
}
return bOdd;
}
@@ -1792,13 +1792,13 @@ BOOL SwFrm::WannaRightPage() const
|* Letzte Aenderung MA 30. Nov. 94
|*
|*************************************************************************/
-USHORT SwFrm::GetVirtPageNum() const
+sal_uInt16 SwFrm::GetVirtPageNum() const
{
const SwPageFrm *pPage = FindPageFrm();
if ( !pPage || !pPage->GetUpper() )
return 0;
- USHORT nPhyPage = pPage->GetPhyPageNum();
+ sal_uInt16 nPhyPage = pPage->GetPhyPageNum();
if ( !((SwRootFrm*)pPage->GetUpper())->IsVirtPageNum() )
return nPhyPage;
@@ -1854,7 +1854,7 @@ USHORT SwFrm::GetVirtPageNum() const
bool SwRootFrm::MakeTblCrsrs( SwTableCursor& rTblCrsr )
{
//Union-Rects und Tabellen (Follows) der Selektion besorgen.
- ASSERT( rTblCrsr.GetCntntNode() && rTblCrsr.GetCntntNode( FALSE ),
+ ASSERT( rTblCrsr.GetCntntNode() && rTblCrsr.GetCntntNode( sal_False ),
"Tabselection nicht auf Cnt." );
bool bRet = false;
@@ -1876,10 +1876,10 @@ bool SwRootFrm::MakeTblCrsrs( SwTableCursor& rTblCrsr )
// --> FME 2008-01-14 #151012# Made code robust here:
const SwCntntNode* pTmpStartNode = rTblCrsr.GetCntntNode();
- const SwCntntNode* pTmpEndNode = rTblCrsr.GetCntntNode(FALSE);
+ const SwCntntNode* pTmpEndNode = rTblCrsr.GetCntntNode(sal_False);
- const SwFrm* pTmpStartFrm = pTmpStartNode ? pTmpStartNode->GetFrm( &aPtPt, 0, FALSE ) : 0;
- const SwFrm* pTmpEndFrm = pTmpEndNode ? pTmpEndNode->GetFrm( &aMkPt, 0, FALSE ) : 0;
+ const SwFrm* pTmpStartFrm = pTmpStartNode ? pTmpStartNode->GetFrm( &aPtPt, 0, sal_False ) : 0;
+ const SwFrm* pTmpEndFrm = pTmpEndNode ? pTmpEndNode->GetFrm( &aMkPt, 0, sal_False ) : 0;
const SwLayoutFrm* pStart = pTmpStartFrm ? pTmpStartFrm->GetUpper() : 0;
const SwLayoutFrm* pEnd = pTmpEndFrm ? pTmpEndFrm->GetUpper() : 0;
@@ -1897,9 +1897,9 @@ bool SwRootFrm::MakeTblCrsrs( SwTableCursor& rTblCrsr )
SwSelBoxes aNew;
- const BOOL bReadOnlyAvailable = rTblCrsr.IsReadOnlyAvailable();
+ const sal_Bool bReadOnlyAvailable = rTblCrsr.IsReadOnlyAvailable();
- for ( USHORT i = 0; i < aUnions.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
{
SwSelUnion *pUnion = aUnions[i];
const SwTabFrm *pTable = pUnion->GetTable();
@@ -2009,7 +2009,7 @@ inline void Sub( SwRegionRects& rRegion, const SwRect& rRect )
rRegion -= rRect;
}
-void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
+void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
{
const SwNodes &rNds = GetFmt()->GetDoc()->GetNodes();
SwPosition *pStartPos = rCrsr.Start(),
@@ -2084,7 +2084,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
// nicht erlaubt ist Header/Footer/TableHeadline ueber 2 Seiten
do { // middle check loop
const SwLayoutFrm* pSttLFrm = pStartFrm->GetUpper();
- const USHORT cHdFtTblHd = FRM_HEADER | FRM_FOOTER | FRM_TAB;
+ const sal_uInt16 cHdFtTblHd = FRM_HEADER | FRM_FOOTER | FRM_TAB;
while( pSttLFrm &&
! (cHdFtTblHd & pSttLFrm->GetType() ))
pSttLFrm = pSttLFrm->GetUpper();
@@ -2136,7 +2136,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
}
break;
}
- } while( FALSE );
+ } while( sal_False );
SwCrsrMoveState aTmpState( MV_NONE );
aTmpState.b2Lines = sal_True;
@@ -2160,8 +2160,8 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
if( pStartFrm != pEndFrm )
aEndFrm.Intersection( pEndFrm->PaintArea() );
SWRECTFN( pStartFrm )
- const BOOL bR2L = pStartFrm->IsRightToLeft();
- const BOOL bEndR2L = pEndFrm->IsRightToLeft();
+ const sal_Bool bR2L = pStartFrm->IsRightToLeft();
+ const sal_Bool bEndR2L = pEndFrm->IsRightToLeft();
// If there's no doubleline portion involved or start and end are both
// in the same doubleline portion, all works fine, but otherwise
@@ -2505,7 +2505,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
}
//Now the frames between, if there are any
- BOOL bBody = pStartFrm->IsInDocBody();
+ sal_Bool bBody = pStartFrm->IsInDocBody();
const SwTableBox* pCellBox = pStartFrm->GetUpper()->IsCellFrm() ?
((SwCellFrm*)pStartFrm->GetUpper())->GetTabBox() : 0;
const SwCntntFrm *pCntnt = pStartFrm->GetNextCntntFrm();
@@ -2582,7 +2582,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
Sub( aRegion, aSubRect );
}
-// aRegion.Compress( FALSE );
+// aRegion.Compress( sal_False );
aRegion.Invert();
delete pSt2Pos;
delete pEnd2Pos;
@@ -2601,7 +2601,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
if ( pPage->GetSortedObjs() )
{
const SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( !pAnchoredObj->ISA(SwFlyFrm) )
@@ -2616,16 +2616,16 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
if ( aSortObjs.Contains( *pAnchoredObj ) )
continue;
- BOOL bSub = TRUE;
- const UINT32 nPos = pObj->GetOrdNum();
- for ( USHORT k = 0; bSub && k < aSortObjs.Count(); ++k )
+ sal_Bool bSub = sal_True;
+ const sal_uInt32 nPos = pObj->GetOrdNum();
+ for ( sal_uInt16 k = 0; bSub && k < aSortObjs.Count(); ++k )
{
ASSERT( aSortObjs[k]->ISA(SwFlyFrm),
"<SwRootFrm::CalcFrmRects(..)> - object in <aSortObjs> of unexcepted type" );
const SwFlyFrm* pTmp = static_cast<SwFlyFrm*>(aSortObjs[k]);
do
{ if ( nPos < pTmp->GetVirtDrawObj()->GetOrdNumDirect() )
- bSub = FALSE;
+ bSub = sal_False;
else
pTmp = pTmp->GetAnchorFrm()->FindFlyFrm();
} while ( bSub && pTmp );
diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx
index 4b9a9417480a..1f6bd97479bd 100644
--- a/sw/source/core/layout/unusedf.cxx
+++ b/sw/source/core/layout/unusedf.cxx
@@ -36,18 +36,18 @@
void SwFrm::Format( const SwBorderAttrs * )
{
- ASSERT( FALSE, "Format() der Basisklasse gerufen." );
+ ASSERT( sal_False, "Format() der Basisklasse gerufen." );
}
void SwFrm::Paint(SwRect const&, SwPrintData const*const) const
{
- ASSERT( FALSE, "Paint() der Basisklasse gerufen." );
+ ASSERT( sal_False, "Paint() der Basisklasse gerufen." );
}
sal_Bool SwCntntFrm::WouldFit( SwTwips &, sal_Bool&, sal_Bool )
{
- ASSERT( FALSE, "WouldFit des CntntFrm gerufen." );
- return FALSE;
+ ASSERT( sal_False, "WouldFit des CntntFrm gerufen." );
+ return sal_False;
}
bool SwFrm::FillSelection( SwSelectionList& , const SwRect& ) const
@@ -56,36 +56,36 @@ bool SwFrm::FillSelection( SwSelectionList& , const SwRect& ) const
return false;
}
-BOOL SwFrm::GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* ) const
+sal_Bool SwFrm::GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* ) const
{
- ASSERT( FALSE, "GetCrsrOfst der Basisklasse, hi!" );
- return FALSE;
+ ASSERT( sal_False, "GetCrsrOfst der Basisklasse, hi!" );
+ return sal_False;
}
#ifdef DBG_UTIL
void SwRootFrm::Cut()
{
- ASSERT( FALSE, "Cut() des RootFrm gerufen." );
+ ASSERT( sal_False, "Cut() des RootFrm gerufen." );
}
void SwRootFrm::Paste( SwFrm *, SwFrm * )
{
- ASSERT( FALSE, "Paste() des RootFrm gerufen." );
+ ASSERT( sal_False, "Paste() des RootFrm gerufen." );
}
void SwFlyFrm::Paste( SwFrm *, SwFrm * )
{
- ASSERT( FALSE, "Paste() des FlyFrm gerufen." );
+ ASSERT( sal_False, "Paste() des FlyFrm gerufen." );
}
#endif
-BOOL SwFrm::GetCharRect( SwRect&, const SwPosition&,
+sal_Bool SwFrm::GetCharRect( SwRect&, const SwPosition&,
SwCrsrMoveState* ) const
{
- ASSERT( FALSE, "GetCharRect() der Basis gerufen." );
- return FALSE;
+ ASSERT( sal_False, "GetCharRect() der Basis gerufen." );
+ return sal_False;
}
diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx
index 1c8338c73a85..f1d909fd2f83 100644
--- a/sw/source/core/layout/virtoutp.cxx
+++ b/sw/source/core/layout/virtoutp.cxx
@@ -74,21 +74,21 @@ inline DbgRect::DbgRect( OutputDevice *pOutDev, const Rectangle &rRect,
* dieser wird in _FrmInit angelegt und in _FrmFinit zerstoert.
* */
-BOOL SwRootFrm::FlushVout()
+sal_Bool SwRootFrm::FlushVout()
{
if( SwRootFrm::pVout->IsFlushable() )
{
SwRootFrm::pVout->_Flush();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwRootFrm::HasSameRect( const SwRect& rRect )
+sal_Bool SwRootFrm::HasSameRect( const SwRect& rRect )
{
if( SwRootFrm::pVout->IsFlushable() )
return ( rRect == SwRootFrm::pVout->GetOrgRect() );
- return FALSE;
+ return sal_False;
}
/** method to set mapping/pixel offset for virtual output device
@@ -138,14 +138,14 @@ void SetMappingForVirtDev( const Point& _rNewOrigin,
*************************************************************************/
// rSize muss in Pixel-Koordinaten vorliegen!
-BOOL SwLayVout::DoesFit( const Size &rNew )
+sal_Bool SwLayVout::DoesFit( const Size &rNew )
{
if( rNew.Height() > VIRTUALHEIGHT )
- return FALSE;
+ return sal_False;
if( rNew.Width() <= 0 || rNew.Height() <= 0 )
- return FALSE;
+ return sal_False;
if( rNew.Width() <= aSize.Width() )
- return TRUE;
+ return sal_True;
if( !pVirDev )
{
pVirDev = new VirtualDevice();
@@ -165,10 +165,10 @@ BOOL SwLayVout::DoesFit( const Size &rNew )
delete pVirDev;
pVirDev = NULL;
aSize.Width() = 0;
- return FALSE;
+ return sal_False;
}
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -179,7 +179,7 @@ BOOL SwLayVout::DoesFit( const Size &rNew )
/// output is used.
/// <aRect> contains the rectangle that represents the area the virtual
/// output device is used for and that is flushed at the end.
-void SwLayVout::Enter( ViewShell *pShell, SwRect &rRect, BOOL bOn )
+void SwLayVout::Enter( ViewShell *pShell, SwRect &rRect, sal_Bool bOn )
{
Flush();
diff --git a/sw/source/core/layout/virtoutp.hxx b/sw/source/core/layout/virtoutp.hxx
index 8183b3edbe26..deb2b20538a1 100644
--- a/sw/source/core/layout/virtoutp.hxx
+++ b/sw/source/core/layout/virtoutp.hxx
@@ -49,22 +49,22 @@ private:
SwRect aRect;
SwRect aOrgRect;
Size aSize;
- USHORT nCount;
+ sal_uInt16 nCount;
- BOOL DoesFit( const Size &rOut );
+ sal_Bool DoesFit( const Size &rOut );
public:
SwLayVout() : pSh(0), pOut(0), pVirDev(0), aSize(0, VIRTUALHEIGHT), nCount(0) {}
~SwLayVout() { delete pVirDev; }
/// OD 27.09.2002 #103636# - change 2nd parameter <rRect> - no longer <const>
- void Enter( ViewShell *pShell, SwRect &rRect, BOOL bOn );
+ void Enter( ViewShell *pShell, SwRect &rRect, sal_Bool bOn );
void Leave() { --nCount; Flush(); }
void SetOrgRect( SwRect &rRect ) { aOrgRect = rRect; }
const SwRect& GetOrgRect() const { return aOrgRect; }
- BOOL IsFlushable() { return 0 != pOut; }
+ sal_Bool IsFlushable() { return 0 != pOut; }
void _Flush();
void Flush() { if( pOut ) _Flush(); }
};
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 31d27d0152a0..9909b6147d83 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -96,11 +96,11 @@ SwFrm::SwFrm( SwModify *pMod ) :
pNext( 0 ),
pPrev( 0 ),
pDrawObjs( 0 )
- , bInfBody( FALSE )
- , bInfTab ( FALSE )
- , bInfFly ( FALSE )
- , bInfFtn ( FALSE )
- , bInfSct ( FALSE )
+ , bInfBody( sal_False )
+ , bInfTab ( sal_False )
+ , bInfFly ( sal_False )
+ , bInfFtn ( sal_False )
+ , bInfSct ( sal_False )
{
#ifdef DBG_UTIL
bFlag01 = bFlag02 = bFlag03 = bFlag04 = bFlag05 = 0;
@@ -110,8 +110,8 @@ SwFrm::SwFrm( SwModify *pMod ) :
bInvalidR2L = bInvalidVert = 1;
bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = 0;
bValidPos = bValidPrtArea = bValidSize = bValidLineNum = bRetouche =
- bFixSize = bColLocked = FALSE;
- bCompletePaint = bInfInvalid = TRUE;
+ bFixSize = bColLocked = sal_False;
+ bCompletePaint = bInfInvalid = sal_True;
}
@@ -124,7 +124,7 @@ ViewShell * SwFrm::GetShell() const
}
-void SwFrm::CheckDir( UINT16 nDir, BOOL bVert, BOOL bOnlyBiDi, BOOL bBrowse )
+void SwFrm::CheckDir( sal_uInt16 nDir, sal_Bool bVert, sal_Bool bOnlyBiDi, sal_Bool bBrowse )
{
if( FRMDIR_ENVIRONMENT == nDir || ( bVert && bOnlyBiDi ) )
{
@@ -152,7 +152,7 @@ void SwFrm::CheckDir( UINT16 nDir, BOOL bVert, BOOL bOnlyBiDi, BOOL bBrowse )
}
}
-void SwFrm::CheckDirection( BOOL bVert )
+void SwFrm::CheckDirection( sal_Bool bVert )
{
if( bVert )
{
@@ -169,7 +169,7 @@ void SwFrm::CheckDirection( BOOL bVert )
}
}
-void SwSectionFrm::CheckDirection( BOOL bVert )
+void SwSectionFrm::CheckDirection( sal_Bool bVert )
{
const SwFrmFmt* pFmt = GetFmt();
if( pFmt )
@@ -180,7 +180,7 @@ void SwSectionFrm::CheckDirection( BOOL bVert )
SwFrm::CheckDirection( bVert );
}
-void SwFlyFrm::CheckDirection( BOOL bVert )
+void SwFlyFrm::CheckDirection( sal_Bool bVert )
{
const SwFrmFmt* pFmt = GetFmt();
if( pFmt )
@@ -191,7 +191,7 @@ void SwFlyFrm::CheckDirection( BOOL bVert )
SwFrm::CheckDirection( bVert );
}
-void SwTabFrm::CheckDirection( BOOL bVert )
+void SwTabFrm::CheckDirection( sal_Bool bVert )
{
const SwFrmFmt* pFmt = GetFmt();
if( pFmt )
@@ -202,7 +202,7 @@ void SwTabFrm::CheckDirection( BOOL bVert )
SwFrm::CheckDirection( bVert );
}
-void SwCellFrm::CheckDirection( BOOL bVert )
+void SwCellFrm::CheckDirection( sal_Bool bVert )
{
const SwFrmFmt* pFmt = GetFmt();
const SfxPoolItem* pItem;
@@ -210,7 +210,7 @@ void SwCellFrm::CheckDirection( BOOL bVert )
// using it. Otherwise the dynamic pool default is used, which may be set
// to LTR in case of OOo 1.0 documents.
// <--
- if( pFmt && SFX_ITEM_SET == pFmt->GetItemState( RES_FRAMEDIR, TRUE, &pItem ) )
+ if( pFmt && SFX_ITEM_SET == pFmt->GetItemState( RES_FRAMEDIR, sal_True, &pItem ) )
{
const SvxFrameDirectionItem* pFrmDirItem = static_cast<const SvxFrameDirectionItem*>(pItem);
CheckDir( pFrmDirItem->GetValue(), bVert, sal_False,
@@ -220,7 +220,7 @@ void SwCellFrm::CheckDirection( BOOL bVert )
SwFrm::CheckDirection( bVert );
}
-void SwTxtFrm::CheckDirection( BOOL bVert )
+void SwTxtFrm::CheckDirection( sal_Bool bVert )
{
CheckDir( GetTxtNode()->GetSwAttrSet().GetFrmDir().GetValue(), bVert,
sal_True,
@@ -237,13 +237,13 @@ void SwTxtFrm::CheckDirection( BOOL bVert )
|*************************************************************************/
void SwFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
- BYTE nInvFlags = 0;
+ sal_uInt8 nInvFlags = 0;
if( pNew && RES_ATTRSET_CHG == pNew->Which() )
{
SfxItemIter aNIter( *((SwAttrSetChg*)pNew)->GetChgSet() );
SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() );
- while( TRUE )
+ while( sal_True )
{
_UpdateAttrFrm( (SfxPoolItem*)aOIter.GetCurItem(),
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags );
@@ -285,9 +285,9 @@ void SwFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
void SwFrm::_UpdateAttrFrm( SfxPoolItem *pOld, SfxPoolItem *pNew,
- BYTE &rInvFlags )
+ sal_uInt8 &rInvFlags )
{
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
switch( nWhich )
{
case RES_BOX:
@@ -324,19 +324,19 @@ void SwFrm::_UpdateAttrFrm( SfxPoolItem *pOld, SfxPoolItem *pNew,
{
if ( IsRowFrm() )
{
- BOOL bInFollowFlowRow = 0 != IsInFollowFlowRow();
+ sal_Bool bInFollowFlowRow = 0 != IsInFollowFlowRow();
if ( bInFollowFlowRow || 0 != IsInSplitTableRow() )
{
SwTabFrm* pTab = FindTabFrm();
if ( bInFollowFlowRow )
pTab = pTab->FindMaster();
- pTab->SetRemoveFollowFlowLinePending( TRUE );
+ pTab->SetRemoveFollowFlowLinePending( sal_True );
}
}
break;
}
case RES_COL:
- ASSERT( FALSE, "Spalten fuer neuen FrmTyp?" );
+ ASSERT( sal_False, "Spalten fuer neuen FrmTyp?" );
break;
default:
@@ -351,7 +351,7 @@ void SwFrm::_UpdateAttrFrm( SfxPoolItem *pOld, SfxPoolItem *pNew,
|* Letzte Aenderung MA 26. Jun. 96
|*
|*************************************************************************/
-void SwFrm::Prepare( const PrepareHint, const void *, BOOL )
+void SwFrm::Prepare( const PrepareHint, const void *, sal_Bool )
{
/* Do nothing */
}
@@ -471,7 +471,7 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const
{
const SwTxtNode *pTxtNode = pTxtFrm->GetTxtNode();
if (pTxtNode && pTxtNode->IsGrammarCheckDirty())
- pRoot->SetNeedGrammarCheck( TRUE );
+ pRoot->SetNeedGrammarCheck( sal_True );
}
}
}
@@ -486,7 +486,7 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const
|*************************************************************************/
Size SwFrm::ChgSize( const Size& aNewSize )
{
- bFixSize = TRUE;
+ bFixSize = sal_True;
const Size aOldSize( Frm().SSize() );
if ( aNewSize == aOldSize )
return aOldSize;
@@ -826,7 +826,7 @@ void SwCntntFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if( pNxt->IsSctFrm() )
pNxt = ((SwSectionFrm*)pNxt)->ContainsCntnt();
if( pNxt && pNxt->IsTxtFrm() && pNxt->IsInFtn() )
- pNxt->Prepare( PREP_FTN, 0, FALSE );
+ pNxt->Prepare( PREP_FTN, 0, sal_False );
}
if ( Frm().Height() )
@@ -864,7 +864,7 @@ void SwCntntFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if( pFrm && pFrm->IsSctFrm() )
pFrm = ((SwSectionFrm*)pFrm)->ContainsAny();
if( pFrm )
- pFrm->Prepare( PREP_QUOVADIS, 0, FALSE );
+ pFrm->Prepare( PREP_QUOVADIS, 0, sal_False );
if( !GetNext() )
{
pFrm = FindFtnFrm()->GetNext();
@@ -914,7 +914,7 @@ void SwCntntFrm::Cut()
{
pFrm->_InvalidatePrt();
if( IsInFtn() )
- pFrm->Prepare( PREP_QUOVADIS, 0, FALSE );
+ pFrm->Prepare( PREP_QUOVADIS, 0, sal_False );
}
// --> OD 2004-07-15 #i26250# - invalidate printing area of previous
// table frame.
@@ -958,7 +958,7 @@ void SwCntntFrm::Cut()
}
}
if( pFrm && IsInFtn() )
- pFrm->Prepare( PREP_ERGOSUM, 0, FALSE );
+ pFrm->Prepare( PREP_ERGOSUM, 0, sal_False );
if( IsInSct() && !GetPrev() )
{
SwSectionFrm* pSct = FindSctFrm();
@@ -1008,7 +1008,7 @@ void SwCntntFrm::Cut()
if ( pMasterTab )
{
pMasterTab->_InvalidatePos();
- pMasterTab->SetRemoveFollowFlowLinePending( TRUE );
+ pMasterTab->SetRemoveFollowFlowLinePending( sal_True );
}
}
// <--
@@ -1060,7 +1060,7 @@ void SwCntntFrm::Cut()
( pUp->IsFtnFrm() && pUp->IsColLocked() ) )
// <--
{
- pSct->DelEmpty( FALSE );
+ pSct->DelEmpty( sal_False );
// Wenn ein gelockter Bereich nicht geloescht werden darf,
// so ist zumindest seine Groesse durch das Entfernen seines
// letzten Contents ungueltig geworden.
@@ -1068,7 +1068,7 @@ void SwCntntFrm::Cut()
}
else
{
- pSct->DelEmpty( TRUE );
+ pSct->DelEmpty( sal_True );
delete pSct;
}
}
@@ -1154,7 +1154,7 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if( pFrm->IsSctFrm() )
pFrm = ((SwSectionFrm*)pFrm)->ContainsAny();
if( pFrm )
- pFrm->Prepare( PREP_ERGOSUM, 0, FALSE );
+ pFrm->Prepare( PREP_ERGOSUM, 0, sal_False );
}
}
if ( IsInFtn() && 0 != ( pFrm = GetIndPrev() ) )
@@ -1162,7 +1162,7 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if( pFrm->IsSctFrm() )
pFrm = ((SwSectionFrm*)pFrm)->ContainsAny();
if( pFrm )
- pFrm->Prepare( PREP_QUOVADIS, 0, FALSE );
+ pFrm->Prepare( PREP_QUOVADIS, 0, sal_False );
}
}
@@ -1170,7 +1170,7 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
{
// AdjustNeighbourhood wird jetzt auch in Spalten aufgerufen,
// die sich nicht in Rahmen befinden
- BYTE nAdjust = GetUpper()->IsFtnBossFrm() ?
+ sal_uInt8 nAdjust = GetUpper()->IsFtnBossFrm() ?
((SwFtnBossFrm*)GetUpper())->NeighbourhoodAdjustment( this )
: NA_GROW_SHRINK;
SwTwips nGrow = (Frm().*fnRect->fnGetHeight)();
@@ -1218,7 +1218,7 @@ void SwLayoutFrm::Cut()
{
if( pUp->IsFtnBossFrm() )
{
- BYTE nAdjust= ((SwFtnBossFrm*)pUp)->NeighbourhoodAdjustment( this );
+ sal_uInt8 nAdjust= ((SwFtnBossFrm*)pUp)->NeighbourhoodAdjustment( this );
if( NA_ONLY_ADJUST == nAdjust )
AdjustNeighbourhood( -nShrink );
else
@@ -1262,7 +1262,7 @@ void SwLayoutFrm::Cut()
|* Letzte Aenderung MA 05. May. 94
|*
|*************************************************************************/
-SwTwips SwFrm::Grow( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwFrm::Grow( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
ASSERT( nDist >= 0, "Negatives Wachstum?" );
@@ -1314,7 +1314,7 @@ SwTwips SwFrm::Grow( SwTwips nDist, BOOL bTst, BOOL bInfo )
|* Letzte Aenderung MA 05. May. 94
|*
|*************************************************************************/
-SwTwips SwFrm::Shrink( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwFrm::Shrink( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
ASSERT( nDist >= 0, "Negative Verkleinerung?" );
@@ -1385,14 +1385,14 @@ SwTwips SwFrm::Shrink( SwTwips nDist, BOOL bTst, BOOL bInfo )
|* Letzte Aenderung AMA 02. Nov. 98
|*
|*************************************************************************/
-SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst )
+SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst )
{
PROTOCOL_ENTER( this, PROT_ADJUSTN, 0, &nDiff );
if ( !nDiff || !GetUpper()->IsFtnBossFrm() ) // nur innerhalb von Seiten/Spalten
return 0L;
- BOOL bBrowse = GetUpper()->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ sal_Bool bBrowse = GetUpper()->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
//Der (Page)Body veraendert sich nur im BrowseMode, aber nicht wenn er
//Spalten enthaelt.
@@ -1513,7 +1513,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst )
//Anpassung von Frm und Prt sorgen wird.
const long nOldFrmHeight = Frm().Height();
const long nOldPrtHeight = Prt().Height();
- const BOOL bOldComplete = IsCompletePaint();
+ const sal_Bool bOldComplete = IsCompletePaint();
if ( IsBodyFrm() )
Prt().SSize().Height() = nOldFrmHeight;
@@ -1555,13 +1555,13 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst )
SwFtnContFrm* pCont = (SwFtnContFrm*)GetNext();
SwTwips nMinH = 0;
SwFtnFrm* pFtn = (SwFtnFrm*)pCont->Lower();
- BOOL bFtn = FALSE;
+ sal_Bool bFtn = sal_False;
while( pFtn )
{
if( !pFtn->GetAttr()->GetFtn().IsEndNote() )
{
nMinH += (pFtn->Frm().*fnRect->fnGetHeight)();
- bFtn = TRUE;
+ bFtn = sal_True;
}
pFtn = (SwFtnFrm*)pFtn->GetNext();
}
@@ -1583,7 +1583,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst )
}
else
{
- const BOOL bFtnPage = pBoss->IsPageFrm() && ((SwPageFrm*)pBoss)->IsFtnPage();
+ const sal_Bool bFtnPage = pBoss->IsPageFrm() && ((SwPageFrm*)pBoss)->IsFtnPage();
if ( bFtnPage && !IsFtnContFrm() )
pFrm = (SwFrm*)pBoss->FindFtnCont();
if ( !pFrm )
@@ -1651,7 +1651,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst )
{
const SwSortedObjs &rObjs = *pBoss->GetDrawObjs();
ASSERT( pBoss->IsPageFrm(), "Header/Footer out of page?" );
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -1717,7 +1717,7 @@ void SwFrm::ImplInvalidateSize()
{
if ( _InvalidationAllowed( INVALID_SIZE ) )
{
- bValidSize = FALSE;
+ bValidSize = sal_False;
if ( IsFlyFrm() )
((SwFlyFrm*)this)->_Invalidate();
else
@@ -1732,7 +1732,7 @@ void SwFrm::ImplInvalidatePrt()
{
if ( _InvalidationAllowed( INVALID_PRTAREA ) )
{
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
if ( IsFlyFrm() )
((SwFlyFrm*)this)->_Invalidate();
else
@@ -1747,7 +1747,7 @@ void SwFrm::ImplInvalidatePos()
{
if ( _InvalidationAllowed( INVALID_POS ) )
{
- bValidPos = FALSE;
+ bValidPos = sal_False;
if ( IsFlyFrm() )
{
((SwFlyFrm*)this)->_Invalidate();
@@ -1766,7 +1766,7 @@ void SwFrm::ImplInvalidateLineNum()
{
if ( _InvalidationAllowed( INVALID_LINENUM ) )
{
- bValidLineNum = FALSE;
+ bValidLineNum = sal_False;
ASSERT( IsTxtFrm(), "line numbers are implemented for text only" );
InvalidatePage();
@@ -1789,7 +1789,7 @@ void SwFrm::ReinitializeFrmSizeAttrFlags()
if ( ATT_VAR_SIZE == rFmtSize.GetHeightSizeType() ||
ATT_MIN_SIZE == rFmtSize.GetHeightSizeType())
{
- bFixSize = FALSE;
+ bFixSize = sal_False;
if ( GetType() & (FRM_HEADER | FRM_FOOTER | FRM_ROW) )
{
SwFrm *pFrm = ((SwLayoutFrm*)this)->Lower();
@@ -1828,7 +1828,7 @@ void SwFrm::ReinitializeFrmSizeAttrFlags()
*
* FME 2007-08-30 #i81146# new loop control
|*************************************************************************/
-void SwFrm::ValidateThisAndAllLowers( const USHORT nStage )
+void SwFrm::ValidateThisAndAllLowers( const sal_uInt16 nStage )
{
// Stage 0: Only validate frames. Do not process any objects.
// Stage 1: Only validate fly frames and all of their contents.
@@ -1839,9 +1839,9 @@ void SwFrm::ValidateThisAndAllLowers( const USHORT nStage )
if ( !bOnlyObject || ISA(SwFlyFrm) )
{
- bValidSize = TRUE;
- bValidPrtArea = TRUE;
- bValidPos = TRUE;
+ bValidSize = sal_True;
+ bValidPrtArea = sal_True;
+ bValidPos = sal_True;
}
if ( bIncludeObjects )
@@ -1880,7 +1880,7 @@ void SwFrm::ValidateThisAndAllLowers( const USHORT nStage )
|* Letzte Aenderung MA 25. Mar. 99
|*
|*************************************************************************/
-SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SWRECTFN( this )
@@ -1889,8 +1889,8 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
nDist > (LONG_MAX - nFrmHeight ) )
nDist = LONG_MAX - nFrmHeight;
- const BOOL bBrowse = GetUpper()->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- const USHORT nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse mit Body
+ const sal_Bool bBrowse = GetUpper()->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse mit Body
if( !(GetUpper()->GetType() & nTmpType) && GetUpper()->HasFixSize() )
{
if ( !bTst )
@@ -1992,7 +1992,7 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
|* Letzte Aenderung MA 05. May. 94
|*
|*************************************************************************/
-SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SWRECTFN( this )
ASSERT( nDist >= 0, "nDist < 0" );
@@ -2062,7 +2062,7 @@ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
const SwSortedObjs* pSorted = pPage ? pPage->GetSortedObjs() : 0;
if( pSorted )
{
- for ( USHORT i = 0; i < pSorted->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pSorted->Count(); ++i )
{
const SwAnchoredObject* pAnchoredObj = (*pSorted)[i];
const SwRect aBound( pAnchoredObj->GetObjRectWithSpaces() );
@@ -2117,7 +2117,7 @@ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
|*************************************************************************/
void SwCntntFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
- BYTE nInvFlags = 0;
+ sal_uInt8 nInvFlags = 0;
if( pNew && RES_ATTRSET_CHG == pNew->Which() )
{
@@ -2125,7 +2125,7 @@ void SwCntntFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() );
SwAttrSetChg aOldSet( *(SwAttrSetChg*)pOld );
SwAttrSetChg aNewSet( *(SwAttrSetChg*)pNew );
- while( TRUE )
+ while( sal_True )
{
_UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
@@ -2189,11 +2189,11 @@ void SwCntntFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
void SwCntntFrm::_UpdateAttr( SfxPoolItem* pOld, SfxPoolItem* pNew,
- BYTE &rInvFlags,
+ sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
- BOOL bClear = TRUE;
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_Bool bClear = sal_True;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
switch ( nWhich )
{
case RES_FMT_CHG:
@@ -2208,7 +2208,7 @@ void SwCntntFrm::_UpdateAttr( SfxPoolItem* pOld, SfxPoolItem* pNew,
if ( !GetPrev() )
CheckPageDescs( pPage );
if ( pPage && GetAttrSet()->GetPageDesc().GetNumOffset() )
- ((SwRootFrm*)pPage->GetUpper())->SetVirtPageNum( TRUE );
+ ((SwRootFrm*)pPage->GetUpper())->SetVirtPageNum( sal_True );
SwDocPosUpdate aMsgHnt( pPage->Frm().Top() );
pPage->GetFmt()->GetDoc()->UpdatePageFlds( &aMsgHnt );
}
@@ -2323,7 +2323,7 @@ void SwCntntFrm::_UpdateAttr( SfxPoolItem* pOld, SfxPoolItem* pNew,
/* no break here */
default:
- bClear = FALSE;
+ bClear = sal_False;
}
if ( bClear )
{
@@ -2353,7 +2353,7 @@ SwLayoutFrm::SwLayoutFrm( SwFrmFmt* pFmt ):
{
const SwFmtFrmSize &rFmtSize = pFmt->GetFrmSize();
if ( rFmtSize.GetHeightSizeType() == ATT_FIX_SIZE )
- bFixSize = TRUE;
+ bFixSize = sal_True;
}
// --> OD 2004-06-29 #i28701#
@@ -2409,10 +2409,10 @@ SwTwips SwLayoutFrm::InnerHeight() const
|* Letzte Aenderung MA 23. Sep. 96
|*
|*************************************************************************/
-SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
- const BOOL bBrowse = GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- const USHORT nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse mit Body
+ const sal_Bool bBrowse = GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse mit Body
if( !(GetType() & nTmpType) && HasFixSize() )
return 0;
@@ -2439,7 +2439,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
SwRect aOldFrm( Frm() );
sal_Bool bMoveAccFrm = sal_False;
- BOOL bChgPos = IsVertical() && !IsReverse();
+ sal_Bool bChgPos = IsVertical() && !IsReverse();
if ( !bTst )
{
(Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist );
@@ -2453,7 +2453,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
{
if ( GetUpper() )
{ // AdjustNeighbourhood jetzt auch in Spalten (aber nicht in Rahmen)
- BYTE nAdjust = GetUpper()->IsFtnBossFrm() ?
+ sal_uInt8 nAdjust = GetUpper()->IsFtnBossFrm() ?
((SwFtnBossFrm*)GetUpper())->NeighbourhoodAdjustment( this )
: NA_GROW_SHRINK;
if( NA_ONLY_ADJUST == nAdjust )
@@ -2575,10 +2575,10 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
|* Letzte Aenderung MA 25. Mar. 99
|*
|*************************************************************************/
-SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
- const BOOL bBrowse = GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- const USHORT nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse mit Body
+ const sal_Bool bBrowse = GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse mit Body
if( !(GetType() & nTmpType) && HasFixSize() )
return 0;
@@ -2589,7 +2589,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
nDist = nFrmHeight;
SwTwips nMin = 0;
- BOOL bChgPos = IsVertical() && !IsReverse();
+ sal_Bool bChgPos = IsVertical() && !IsReverse();
if ( Lower() )
{
if( !Lower()->IsNeighbourFrm() )
@@ -2620,7 +2620,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
bMoveAccFrm = sal_True;
}
- BYTE nAdjust = GetUpper() && GetUpper()->IsFtnBossFrm() ?
+ sal_uInt8 nAdjust = GetUpper() && GetUpper()->IsFtnBossFrm() ?
((SwFtnBossFrm*)GetUpper())->NeighbourhoodAdjustment( this )
: NA_GROW_SHRINK;
@@ -2729,7 +2729,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
{ // Wenn wir sowieso schon in einer anderen Spalte/Seite sitzen
// als der Frame mit der Referenz, dann brauchen wir nicht
// auch noch seinen Master zu invalidieren.
- SwFrm *pTmp = pCnt->FindFtnBossFrm(TRUE) == FindFtnBossFrm(TRUE)
+ SwFrm *pTmp = pCnt->FindFtnBossFrm(sal_True) == FindFtnBossFrm(sal_True)
? pCnt->FindMaster()->GetFrm() : pCnt;
pTmp->Prepare( PREP_ADJUST_FRM );
pTmp->InvalidateSize();
@@ -2797,7 +2797,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
pLowerFrm = pLowerFrm->GetNext();
else
break;
- } while( TRUE );
+ } while( sal_True );
// If found last lower is a section frame containing no section
// (section frame isn't valid and will be deleted in the future),
// travel backwards.
@@ -2810,7 +2810,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// contains invalid section frames.
if( pLowerFrm->IsSctFrm() )
pLowerFrm = ((SwSectionFrm*)pLowerFrm)->GetSection() &&
- !((SwSectionFrm*)pLowerFrm)->ToMaximize( FALSE ) ?
+ !((SwSectionFrm*)pLowerFrm)->ToMaximize( sal_False ) ?
((SwSectionFrm*)pLowerFrm)->FindLastCntnt() : NULL;
// continue with found last lower, probably the last content of a section
@@ -2841,7 +2841,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
pLowerFrm->InvalidatePage( pPage );
if( !pLowerFrm->IsFlowFrm() ||
!SwFlowFrm::CastFlowFrm( pLowerFrm )->HasFollow() )
- pLowerFrm->InvalidateNextPos( TRUE );
+ pLowerFrm->InvalidateNextPos( sal_True );
if ( pLowerFrm->IsTxtFrm() )
((SwCntntFrm*)pLowerFrm)->Prepare( PREP_ADJUST_FRM );
}
@@ -2922,7 +2922,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// In vertical layout these are neighbour frames (cell and column frames),
// header frames and footer frames.
// In horizontal layout these are all frames, which aren't neighbour frames.
- const USHORT nFixWidth = bVert ? (FRM_NEIGHBOUR | FRM_HEADFOOT)
+ const sal_uInt16 nFixWidth = bVert ? (FRM_NEIGHBOUR | FRM_HEADFOOT)
: ~FRM_NEIGHBOUR;
// Declare const unsigned short <nFixHeight> and init it this frame types
@@ -2930,7 +2930,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// In vertical layout these are all frames, which aren't neighbour frames,
// header frames, footer frames, body frames or foot note container frames.
// In horizontal layout these are neighbour frames.
- const USHORT nFixHeight= bVert ? ~(FRM_NEIGHBOUR | FRM_HEADFOOT | FRM_BODYFTNC)
+ const sal_uInt16 nFixHeight= bVert ? ~(FRM_NEIGHBOUR | FRM_HEADFOOT | FRM_BODYFTNC)
: FRM_NEIGHBOUR;
// Travel through all lowers using <GetNext()>
@@ -2948,7 +2948,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
{
// If lower isn't a table, row, cell or section frame, adjust its
// frame size.
- const USHORT nLowerType = pLowerFrm->GetType();
+ const sal_uInt16 nLowerType = pLowerFrm->GetType();
if ( !(nLowerType & (FRM_TAB|FRM_ROW|FRM_CELL|FRM_SECTION)) )
{
if ( bWidthChgd )
@@ -3163,16 +3163,16 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
if ( bValidPrtArea && bValidSize )
return;
- const USHORT nLeft = (USHORT)pAttrs->CalcLeft( this );
- const USHORT nUpper = pAttrs->CalcTop();
+ const sal_uInt16 nLeft = (sal_uInt16)pAttrs->CalcLeft( this );
+ const sal_uInt16 nUpper = pAttrs->CalcTop();
- const USHORT nRight = (USHORT)((SwBorderAttrs*)pAttrs)->CalcRight( this );
- const USHORT nLower = pAttrs->CalcBottom();
- BOOL bVert = IsVertical() && !IsPageFrm();
+ const sal_uInt16 nRight = (sal_uInt16)((SwBorderAttrs*)pAttrs)->CalcRight( this );
+ const sal_uInt16 nLower = pAttrs->CalcBottom();
+ sal_Bool bVert = IsVertical() && !IsPageFrm();
SwRectFn fnRect = bVert ? fnRectVert : fnRectHori;
if ( !bValidPrtArea )
{
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
(this->*fnRect->fnSetXMargins)( nLeft, nRight );
(this->*fnRect->fnSetYMargins)( nUpper, nLower );
}
@@ -3185,7 +3185,7 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
const SwFmtFrmSize &rSz = GetFmt()->GetFrmSize();
SwTwips nMinHeight = rSz.GetHeightSizeType() == ATT_MIN_SIZE ? rSz.GetHeight() : 0;
do
- { bValidSize = TRUE;
+ { bValidSize = sal_True;
//Die Groesse in der VarSize wird durch den Inhalt plus den
//Raendern bestimmt.
@@ -3222,7 +3222,7 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
if( (this->*fnRect->fnSetLimit)( nLimit ) &&
nOldLeft == (Frm().*fnRect->fnGetLeft)() &&
nOldTop == (Frm().*fnRect->fnGetTop)() )
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
}
} while ( !bValidSize );
}
@@ -3231,12 +3231,12 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
do
{ if ( Frm().Height() != pAttrs->GetSize().Height() )
ChgSize( Size( Frm().Width(), pAttrs->GetSize().Height()));
- bValidSize = TRUE;
+ bValidSize = sal_True;
MakePos();
} while ( !bValidSize );
}
else
- bValidSize = TRUE;
+ bValidSize = sal_True;
}
}
@@ -3251,7 +3251,7 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff )
{
ASSERT( pFrm->GetDrawObjs(), "Can't find any Objects" );
- for ( USHORT i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -3260,7 +3260,7 @@ static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff )
const SwFmtFrmSize &rSz = pFly->GetFmt()->GetFrmSize();
if ( rSz.GetWidthPercent() || rSz.GetHeightPercent() )
{
- BOOL bNotify = TRUE;
+ sal_Bool bNotify = sal_True;
// If we've a fly with more than 90% relative height...
if( rSz.GetHeightPercent() > 90 && pFly->GetAnchorFrm() &&
rSz.GetHeightPercent() != 0xFF && nDiff )
@@ -3275,7 +3275,7 @@ static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff )
( nDiff + pRel->Prt().Height() )*9 &&
pFly->GetFmt()->GetSurround().GetSurround() !=
SURROUND_THROUGHT )
- bNotify = FALSE;
+ bNotify = sal_False;
}
if( bNotify )
pFly->InvalidateSize();
@@ -3321,7 +3321,7 @@ void SwLayoutFrm::InvaPercentLowers( SwTwips nDiff )
|* Letzte Aenderung MA 10. Oct. 96
|*
|*************************************************************************/
-long SwLayoutFrm::CalcRel( const SwFmtFrmSize &rSz, BOOL ) const
+long SwLayoutFrm::CalcRel( const SwFmtFrmSize &rSz, sal_Bool ) const
{
long nRet = rSz.GetWidth(),
nPercent = rSz.GetWidthPercent();
@@ -3380,7 +3380,7 @@ long MA_FASTCALL lcl_CalcMinColDiff( SwLayoutFrm *pLayFrm )
return nDiff ? nDiff : nFirstDiff ? nFirstDiff : 240;
}
-BOOL lcl_IsFlyHeightClipped( SwLayoutFrm *pLay )
+sal_Bool lcl_IsFlyHeightClipped( SwLayoutFrm *pLay )
{
SwFrm *pFrm = pLay->ContainsCntnt();
while ( pFrm )
@@ -3391,7 +3391,7 @@ BOOL lcl_IsFlyHeightClipped( SwLayoutFrm *pLay )
if ( pFrm->GetDrawObjs() )
{
sal_uInt32 nCnt = pFrm->GetDrawObjs()->Count();
- for ( USHORT i = 0; i < nCnt; ++i )
+ for ( sal_uInt16 i = 0; i < nCnt; ++i )
{
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -3399,13 +3399,13 @@ BOOL lcl_IsFlyHeightClipped( SwLayoutFrm *pLay )
SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
if ( pFly->IsHeightClipped() &&
( !pFly->IsFlyFreeFrm() || pFly->GetPageFrm() ) )
- return TRUE;
+ return sal_True;
}
}
}
pFrm = pFrm->FindNextCnt();
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -3430,10 +3430,10 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
//3. Weiter mit 1. bis zur Stabilitaet.
const SwFmtCol &rCol = rAttrs.GetAttrSet().GetCol();
- const USHORT nNumCols = rCol.GetNumCols();
+ const sal_uInt16 nNumCols = rCol.GetNumCols();
- BOOL bEnd = FALSE;
- BOOL bBackLock = FALSE;
+ sal_Bool bEnd = sal_False;
+ sal_Bool bBackLock = sal_False;
SwViewImp *pImp = GetShell() ? GetShell()->Imp() : 0;
{
// Zugrunde liegender Algorithmus
@@ -3467,14 +3467,14 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
long nMinimum = nMinHeight;
long nMaximum;
- BOOL bNoBalance = FALSE;
+ sal_Bool bNoBalance = sal_False;
SWRECTFN( this )
if( IsSctFrm() )
{
nMaximum = (Frm().*fnRect->fnGetHeight)() - nBorder +
(Frm().*fnRect->fnBottomDist)(
(GetUpper()->*fnRect->fnGetPrtBottom)() );
- nMaximum += GetUpper()->Grow( LONG_MAX, TRUE );
+ nMaximum += GetUpper()->Grow( LONG_MAX, sal_True );
if( nMaximum < nMinimum )
{
if( nMaximum < 0 )
@@ -3509,8 +3509,8 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
SwFrm* pFtnAny = pFtnCont->ContainsAny();
if( pFtnAny && pFtnAny->IsValid() )
{
- bBackLock = TRUE;
- ((SwSectionFrm*)this)->SetFtnLock( TRUE );
+ bBackLock = sal_True;
+ ((SwSectionFrm*)this)->SetFtnLock( sal_True );
}
}
}
@@ -3542,7 +3542,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
if ( pImp )
pImp->CheckWaitCrsr();
- bValidSize = TRUE;
+ bValidSize = sal_True;
//Erstmal die Spalten formatieren, das entlastet den
//Stack ein wenig.
//Bei der Gelegenheit stellen wir auch gleich mal die
@@ -3555,7 +3555,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
AdjustColumns( &rCol, sal_False );
// <--
- for ( USHORT i = 0; i < nNumCols; ++i )
+ for ( sal_uInt16 i = 0; i < nNumCols; ++i )
{
pCol->Calc();
// ColumnFrms besitzen jetzt einen BodyFrm, der auch kalkuliert werden will
@@ -3570,7 +3570,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
pCol = (SwLayoutFrm*)Lower();
ASSERT( pCol && pCol->GetNext(), ":-( Spalten auf Urlaub?");
// bMinDiff wird gesetzt, wenn es keine leere Spalte gibt
- BOOL bMinDiff = TRUE;
+ sal_Bool bMinDiff = sal_True;
// OD 28.03.2003 #108446# - check for all column content and all columns
while ( bMinDiff && pCol )
{
@@ -3584,7 +3584,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
SwTwips nMaxFree = 0;
SwTwips nAllFree = LONG_MAX;
// bFoundLower wird gesetzt, wenn es mind. eine nichtleere Spalte gibt
- BOOL bFoundLower = FALSE;
+ sal_Bool bFoundLower = sal_False;
while( pCol )
{
SwLayoutFrm* pLay = (SwLayoutFrm*)pCol->Lower();
@@ -3592,7 +3592,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
(pLay->Prt().*fnRect->fnGetHeight)();
if( pLay->Lower() )
{
- bFoundLower = TRUE;
+ bFoundLower = sal_True;
nInnerHeight += pLay->InnerHeight();
}
else if( nInnerHeight < 0 )
@@ -3600,7 +3600,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
if( pLay->GetNext() )
{
- bFoundLower = TRUE;
+ bFoundLower = sal_True;
pLay = (SwLayoutFrm*)pLay->GetNext();
ASSERT( pLay->IsFtnContFrm(),"FtnContainer exspected" );
nInnerHeight += pLay->InnerHeight();
@@ -3761,10 +3761,10 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
}
}
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
else
- bEnd = TRUE;
+ bEnd = sal_True;
} while ( !bEnd || !bValidSize );
}
@@ -3773,10 +3773,10 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
::CalcCntnt( this, true );
if( IsSctFrm() )
{
- // OD 14.03.2003 #i11760# - adjust 2nd parameter - TRUE --> true
+ // OD 14.03.2003 #i11760# - adjust 2nd parameter - sal_True --> true
::CalcCntnt( this, true );
if( bBackLock )
- ((SwSectionFrm*)this)->SetFtnLock( FALSE );
+ ((SwSectionFrm*)this)->SetFtnLock( sal_False );
}
}
@@ -3790,7 +3790,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
|*
|*************************************************************************/
-SwCntntFrm* lcl_InvalidateSection( SwFrm *pCnt, BYTE nInv )
+SwCntntFrm* lcl_InvalidateSection( SwFrm *pCnt, sal_uInt8 nInv )
{
SwSectionFrm* pSect = pCnt->FindSctFrm();
// Wenn unser CntntFrm in einer Tabelle oder Fussnote steht, sind nur
@@ -3813,7 +3813,7 @@ SwCntntFrm* lcl_InvalidateSection( SwFrm *pCnt, BYTE nInv )
return pRet;
}
-SwCntntFrm* lcl_InvalidateTable( SwTabFrm *pTable, BYTE nInv )
+SwCntntFrm* lcl_InvalidateTable( SwTabFrm *pTable, sal_uInt8 nInv )
{
if( ( nInv & INV_SECTION ) && pTable->IsInSct() )
lcl_InvalidateSection( pTable, nInv );
@@ -3826,9 +3826,9 @@ SwCntntFrm* lcl_InvalidateTable( SwTabFrm *pTable, BYTE nInv )
return pTable->FindLastCntnt();
}
-void lcl_InvalidateAllCntnt( SwCntntFrm *pCnt, BYTE nInv );
+void lcl_InvalidateAllCntnt( SwCntntFrm *pCnt, sal_uInt8 nInv );
-void lcl_InvalidateCntnt( SwCntntFrm *pCnt, BYTE nInv )
+void lcl_InvalidateCntnt( SwCntntFrm *pCnt, sal_uInt8 nInv )
{
SwCntntFrm *pLastTabCnt = NULL;
SwCntntFrm *pLastSctCnt = NULL;
@@ -3879,7 +3879,7 @@ void lcl_InvalidateCntnt( SwCntntFrm *pCnt, BYTE nInv )
}
if( nInv & INV_SIZE )
- pCnt->Prepare( PREP_CLEAR, 0, FALSE );
+ pCnt->Prepare( PREP_CLEAR, 0, sal_False );
if( nInv & INV_POS )
pCnt->_InvalidatePos();
if( nInv & INV_PRTAREA )
@@ -3892,10 +3892,10 @@ void lcl_InvalidateCntnt( SwCntntFrm *pCnt, BYTE nInv )
}
}
-void lcl_InvalidateAllCntnt( SwCntntFrm *pCnt, BYTE nInv )
+void lcl_InvalidateAllCntnt( SwCntntFrm *pCnt, sal_uInt8 nInv )
{
SwSortedObjs &rObjs = *pCnt->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -3911,7 +3911,7 @@ void lcl_InvalidateAllCntnt( SwCntntFrm *pCnt, BYTE nInv )
}
}
-void SwRootFrm::InvalidateAllCntnt( BYTE nInv )
+void SwRootFrm::InvalidateAllCntnt( sal_uInt8 nInv )
{
// Erst werden alle Seitengebundenen FlyFrms abgearbeitet.
SwPageFrm *pPage = (SwPageFrm*)Lower();
@@ -3927,7 +3927,7 @@ void SwRootFrm::InvalidateAllCntnt( BYTE nInv )
if ( pPage->GetSortedObjs() )
{
const SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
index 71b8f1b38e18..cf3017426f31 100644
--- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
@@ -953,11 +953,11 @@ SwTwips SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside(
}
SwRect aTmpObjRect( aTmpPos, aObjBoundRect.SSize() );
- const UINT32 nObjOrdNum = GetObject().GetOrdNum();
+ const sal_uInt32 nObjOrdNum = GetObject().GetOrdNum();
const SwPageFrm* pObjPage = rFlyAtCntFrm.FindPageFrm();
const SwFrm* pObjContext = ::FindKontext( &rAnchorTxtFrm, FRM_COLUMN );
- ULONG nObjIndex = rAnchorTxtFrm.GetTxtNode()->GetIndex();
- SwOrderIter aIter( pObjPage, TRUE );
+ sal_uLong nObjIndex = rAnchorTxtFrm.GetTxtNode()->GetIndex();
+ SwOrderIter aIter( pObjPage, sal_True );
const SwFlyFrm* pFly = ((SwVirtFlyDrawObj*)aIter.Bottom())->GetFlyFrm();
while ( pFly && nObjOrdNum > pFly->GetVirtDrawObj()->GetOrdNumDirect() )
{
@@ -1053,7 +1053,7 @@ SwTwips SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside(
bool SwAnchoredObjectPosition::_DrawAsideFly( const SwFlyFrm* _pFly,
const SwRect& _rObjRect,
const SwFrm* _pObjContext,
- const ULONG _nObjIndex,
+ const sal_uLong _nObjIndex,
const bool _bEvenPage,
const sal_Int16 _eHoriOrient,
const sal_Int16 _eRelOrient
@@ -1068,7 +1068,7 @@ bool SwAnchoredObjectPosition::_DrawAsideFly( const SwFlyFrm* _pFly,
(_rObjRect.*fnRect->fnBottomDist)( (_pFly->Frm().*fnRect->fnGetTop)() ) < 0 &&
::FindKontext( _pFly->GetAnchorFrm(), FRM_COLUMN ) == _pObjContext )
{
- ULONG nOtherIndex =
+ sal_uLong nOtherIndex =
static_cast<const SwTxtFrm*>(_pFly->GetAnchorFrm())->GetTxtNode()->GetIndex();
if( _nObjIndex >= nOtherIndex )
{
@@ -1111,11 +1111,11 @@ bool SwAnchoredObjectPosition::_Minor( sal_Int16 _eRelOrient1,
// draw aside order for left horizontal position
//! one array entry for each value in text::RelOrientation
- static USHORT __READONLY_DATA aLeft[ 10 ] =
+ static sal_uInt16 __READONLY_DATA aLeft[ 10 ] =
{ 5, 6, 0, 1, 8, 4, 7, 2, 3, 9 };
// draw aside order for right horizontal position
//! one array entry for each value in text::RelOrientation
- static USHORT __READONLY_DATA aRight[ 10 ] =
+ static sal_uInt16 __READONLY_DATA aRight[ 10 ] =
{ 5, 6, 0, 8, 1, 7, 4, 2, 3, 9 };
// decide depending on given order, which frame has to draw aside another frame
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
index 209ceb3c20e0..aa8fdfe888b8 100644
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
@@ -119,13 +119,13 @@ bool lcl_DoesVertPosFits( const SwTwips _nRelPosY,
{
SwSectionFrm* pSctFrm =
const_cast<SwSectionFrm*>(_pUpperOfOrientFrm->FindSctFrm());
- bVertPosFits = pSctFrm->GetUpper()->Grow( _nRelPosY - _nAvail, TRUE ) > 0;
+ bVertPosFits = pSctFrm->GetUpper()->Grow( _nRelPosY - _nAvail, sal_True ) > 0;
// Note: do not provide a layout frame for a grow.
}
else
{
bVertPosFits = const_cast<SwLayoutFrm*>(_pUpperOfOrientFrm)->
- Grow( _nRelPosY - _nAvail, TRUE ) > 0;
+ Grow( _nRelPosY - _nAvail, sal_True ) > 0;
if ( bVertPosFits )
_orpLayoutFrmToGrow = const_cast<SwLayoutFrm*>(_pUpperOfOrientFrm);
}
@@ -135,7 +135,7 @@ bool lcl_DoesVertPosFits( const SwTwips _nRelPosY,
// --> OD 2005-06-08 #i45085# - check, if upper frame would grow the
// excepted amount of twips.
const SwTwips nTwipsGrown = const_cast<SwLayoutFrm*>(_pUpperOfOrientFrm)->
- Grow( _nRelPosY - _nAvail, TRUE ) > 0;
+ Grow( _nRelPosY - _nAvail, sal_True ) > 0;
bVertPosFits = ( nTwipsGrown == ( _nRelPosY - _nAvail ) );
// <--
if ( bVertPosFits )
@@ -668,7 +668,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
eMakePage = MAKEPAGE_NOSECTION;
const SwLayoutFrm* pTmp =
- pUpperOfOrientFrm->GetLeaf( eMakePage, TRUE, &rAnchorTxtFrm );
+ pUpperOfOrientFrm->GetLeaf( eMakePage, sal_True, &rAnchorTxtFrm );
if ( pTmp &&
( !bInSct ||
pUpperOfOrientFrm->FindSctFrm()->IsAnFollow( pTmp->FindSctFrm() ) ) )
@@ -817,7 +817,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
!pOrientFrm->GetIndPrev() )
{
const_cast<SwTabFrm*>(pOrientFrm->FindTabFrm())
- ->SetDoesObjsFit( FALSE );
+ ->SetDoesObjsFit( sal_False );
}
else
{
@@ -854,7 +854,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
pOrientFrm == &rAnchorTxtFrm && !pOrientFrm->GetIndPrev() )
{
const_cast<SwTabFrm*>(pOrientFrm->FindTabFrm())
- ->SetDoesObjsFit( FALSE );
+ ->SetDoesObjsFit( sal_False );
}
}
}
@@ -892,7 +892,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
( bInSct
? MAKEPAGE_NOSECTION
: ( bInFtn ? MAKEPAGE_NONE : MAKEPAGE_APPEND ) ),
- TRUE, &rAnchorTxtFrm );
+ sal_True, &rAnchorTxtFrm );
// OD 06.10.2003 #110978# - correction:
// If anchor is in footnote and proposed next layout environment
// isn't a footnote frame, object can't follow the text flow
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 1cd0fdd02830..4ade385982f7 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -91,7 +91,7 @@ public:
virtual void Commit();
void Load();
- void SetInUnload( BOOL bFlag ) { bInUnload = bFlag; }
+ void SetInUnload( sal_Bool bFlag ) { bInUnload = bFlag; }
using SvPtrarr::Count;
void InsertObj( SwOLEObj& rObj );
@@ -99,7 +99,7 @@ public:
void RemovePtr( SwOLEObj* pObj )
{
- USHORT nPos = SvPtrarr::GetPos( pObj );
+ sal_uInt16 nPos = SvPtrarr::GetPos( pObj );
if( USHRT_MAX != nPos )
SvPtrarr::Remove( nPos );
}
@@ -187,7 +187,7 @@ SwEmbedObjectLink::SwEmbedObjectLink(SwOLENode* pNode):
::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SOT_FORMATSTR_ID_SVXB ),
pOleNode(pNode)
{
- SetSynchron( FALSE );
+ SetSynchron( sal_False );
}
// -----------------------------------------------------------------------------
@@ -252,7 +252,7 @@ SwOLENode::SwOLENode( const SwNodeIndex &rWhere,
SwNoTxtNode( rWhere, ND_OLENODE, pGrfColl, pAutoAttr ),
aOLEObj( xObj ),
pGraphic(0),
- bOLESizeInvalid( FALSE ),
+ bOLESizeInvalid( sal_False ),
mpObjectLink( NULL )
{
aOLEObj.SetNode( this );
@@ -266,7 +266,7 @@ SwOLENode::SwOLENode( const SwNodeIndex &rWhere,
SwNoTxtNode( rWhere, ND_OLENODE, pGrfColl, pAutoAttr ),
aOLEObj( rString, nAspect ),
pGraphic(0),
- bOLESizeInvalid( FALSE ),
+ bOLESizeInvalid( sal_False ),
mpObjectLink( NULL )
{
aOLEObj.SetNode( this );
@@ -293,13 +293,13 @@ Graphic* SwOLENode::GetHCGraphic()
SwCntntNode *SwOLENode::SplitCntntNode( const SwPosition & )
{
// OLE-Objecte vervielfaeltigen ??
- ASSERT( FALSE, "OleNode: can't split." );
+ ASSERT( sal_False, "OleNode: can't split." );
return this;
}
// Laden eines in den Undo-Bereich verschobenen OLE-Objekts
-BOOL SwOLENode::RestorePersistentData()
+sal_Bool SwOLENode::RestorePersistentData()
{
DBG_ASSERT( aOLEObj.GetOleRef().is(), "No object to restore!" );
if ( aOLEObj.xOLERef.is() )
@@ -335,11 +335,11 @@ BOOL SwOLENode::RestorePersistentData()
}
}
- return TRUE;
+ return sal_True;
}
// OLE object is transported into UNDO area
-BOOL SwOLENode::SavePersistentData()
+sal_Bool SwOLENode::SavePersistentData()
{
if( aOLEObj.xOLERef.is() )
{
@@ -379,7 +379,7 @@ BOOL SwOLENode::SavePersistentData()
DisconnectFileLink_Impl();
- return TRUE;
+ return sal_True;
}
@@ -469,32 +469,32 @@ SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
pOLENd->SetContour( HasContour(), HasAutomaticContour() );
pOLENd->SetAspect( GetAspect() ); // the replacement image must be already copied
- pOLENd->SetOLESizeInvalid( TRUE );
+ pOLENd->SetOLESizeInvalid( sal_True );
pDoc->SetOLEPrtNotifyPending();
return pOLENd;
}
-BOOL SwOLENode::IsInGlobalDocSection() const
+sal_Bool SwOLENode::IsInGlobalDocSection() const
{
// suche den "Body Anchor"
- ULONG nEndExtraIdx = GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndExtraIdx = GetNodes().GetEndOfExtras().GetIndex();
const SwNode* pAnchorNd = this;
do {
SwFrmFmt* pFlyFmt = pAnchorNd->GetFlyFmt();
if( !pFlyFmt )
- return FALSE;
+ return sal_False;
const SwFmtAnchor& rAnchor = pFlyFmt->GetAnchor();
if( !rAnchor.GetCntntAnchor() )
- return FALSE;
+ return sal_False;
pAnchorNd = &rAnchor.GetCntntAnchor()->nNode.GetNode();
} while( pAnchorNd->GetIndex() < nEndExtraIdx );
const SwSectionNode* pSectNd = pAnchorNd->FindSectionNode();
if( !pSectNd )
- return FALSE;
+ return sal_False;
while( pSectNd )
{
@@ -509,9 +509,9 @@ BOOL SwOLENode::IsInGlobalDocSection() const
pSectNd->GetIndex() > nEndExtraIdx;
}
-BOOL SwOLENode::IsOLEObjectDeleted() const
+sal_Bool SwOLENode::IsOLEObjectDeleted() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aOLEObj.xOLERef.is() )
{
SfxObjectShell* p = GetDoc()->GetPersist();
@@ -662,7 +662,7 @@ SwOLEObj::SwOLEObj( const svt::EmbeddedObjectRef& xObj ) :
pListener( 0 ),
xOLERef( xObj )
{
- xOLERef.Lock( TRUE );
+ xOLERef.Lock( sal_True );
if ( xObj.is() )
{
pListener = new SwOLEListener_Impl( this );
@@ -677,7 +677,7 @@ SwOLEObj::SwOLEObj( const String &rString, sal_Int64 nAspect ) :
pListener( 0 ),
aName( rString )
{
- xOLERef.Lock( TRUE );
+ xOLERef.Lock( sal_True );
xOLERef.SetViewAspect( nAspect );
}
@@ -717,7 +717,7 @@ SwOLEObj::~SwOLEObj()
// unlock object so that object can be closed in RemoveEmbeddedObject
// successful closing of the object will automatically clear the reference then
- xOLERef.Lock(FALSE);
+ xOLERef.Lock(sal_False);
// Always remove object from conteiner it is connected to
try
@@ -776,7 +776,7 @@ void SwOLEObj::SetNode( SwOLENode* pNode )
}
}
-BOOL SwOLEObj::IsOleRef() const
+sal_Bool SwOLEObj::IsOleRef() const
{
return xOLERef.is();
}
@@ -839,9 +839,9 @@ svt::EmbeddedObjectRef& SwOLEObj::GetObject()
return xOLERef;
}
-BOOL SwOLEObj::UnloadObject()
+sal_Bool SwOLEObj::UnloadObject()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
//Nicht notwendig im Doc DTor (MM)
//ASSERT( pOLERef && pOLERef->Is() && 1 < (*pOLERef)->GetRefCount(),
// "Falscher RefCount fuers Unload" );
@@ -854,14 +854,14 @@ BOOL SwOLEObj::UnloadObject()
return bRet;
}
-BOOL SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > xObj, const SwDoc* pDoc, sal_Int64 nAspect )
+sal_Bool SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > xObj, const SwDoc* pDoc, sal_Int64 nAspect )
{
if ( !pDoc )
- return FALSE;
+ return sal_False;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
sal_Int32 nState = xObj.is() ? xObj->getCurrentState() : embed::EmbedStates::LOADED;
- BOOL bIsActive = ( nState != embed::EmbedStates::LOADED && nState != embed::EmbedStates::RUNNING );
+ sal_Bool bIsActive = ( nState != embed::EmbedStates::LOADED && nState != embed::EmbedStates::RUNNING );
sal_Int64 nMiscStatus = xObj->getStatus( nAspect );
if( nState != embed::EmbedStates::LOADED && !pDoc->IsInDtor() && !bIsActive &&
@@ -891,11 +891,11 @@ BOOL SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > xObj, cons
}
catch ( uno::Exception& )
{
- bRet = FALSE;
+ bRet = sal_False;
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
}
@@ -965,8 +965,8 @@ void SwOLELRUCache::Load()
if( nVal < nLRU_InitSize )
{
// size of cache has been changed
- USHORT nCount = SvPtrarr::Count();
- USHORT nPos = nCount;
+ sal_uInt16 nCount = SvPtrarr::Count();
+ sal_uInt16 nPos = nCount;
// try to remove the last entries until new maximum size is reached
while( nCount > nVal )
@@ -980,14 +980,14 @@ void SwOLELRUCache::Load()
}
}
- nLRU_InitSize = (USHORT)nVal;
+ nLRU_InitSize = (sal_uInt16)nVal;
}
}
void SwOLELRUCache::InsertObj( SwOLEObj& rObj )
{
SwOLEObj* pObj = &rObj;
- USHORT nPos = SvPtrarr::GetPos( pObj );
+ sal_uInt16 nPos = SvPtrarr::GetPos( pObj );
if( nPos )
{
// object is currently not the first in cache
@@ -997,7 +997,7 @@ void SwOLELRUCache::InsertObj( SwOLEObj& rObj )
SvPtrarr::Insert( pObj, 0 );
// try to remove objects if necessary (of course not the freshly inserted one at nPos=0)
- USHORT nCount = SvPtrarr::Count();
+ sal_uInt16 nCount = SvPtrarr::Count();
nPos = nCount-1;
while( nPos && nCount > nLRU_InitSize )
{
@@ -1010,7 +1010,7 @@ void SwOLELRUCache::InsertObj( SwOLEObj& rObj )
void SwOLELRUCache::RemoveObj( SwOLEObj& rObj )
{
- USHORT nPos = SvPtrarr::GetPos( &rObj );
+ sal_uInt16 nPos = SvPtrarr::GetPos( &rObj );
if ( nPos != 0xFFFF )
SvPtrarr::Remove( nPos );
if( !Count() )
diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx
index 0509c14f5733..bff9983e4ede 100644
--- a/sw/source/core/para/paratr.cxx
+++ b/sw/source/core/para/paratr.cxx
@@ -199,7 +199,7 @@ sal_Bool SwFmtDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
sal_Int8 nTemp = 0;
rVal >>= nTemp;
if(nTemp >=1 && nTemp < 0x7f)
- nLines = (BYTE)nTemp;
+ nLines = (sal_uInt8)nTemp;
}
break;
case MID_DROPCAP_COUNT :
@@ -207,7 +207,7 @@ sal_Bool SwFmtDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
sal_Int16 nTemp = 0;
rVal >>= nTemp;
if(nTemp >=1 && nTemp < 0x7f)
- nChars = (BYTE)nTemp;
+ nChars = (sal_uInt8)nTemp;
}
break;
case MID_DROPCAP_DISTANCE :
@@ -267,21 +267,21 @@ int SwNumRuleItem::operator==( const SfxPoolItem& rAttr ) const
/* -----------------------------27.06.00 11:05--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNumRuleItem::QueryValue( uno::Any& rVal, BYTE ) const
+sal_Bool SwNumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
rtl::OUString sRet = SwStyleNameMapper::GetProgName(GetValue(), nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
rVal <<= sRet;
- return TRUE;
+ return sal_True;
}
/* -----------------------------27.06.00 11:05--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNumRuleItem::PutValue( const uno::Any& rVal, BYTE )
+sal_Bool SwNumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 )
{
rtl::OUString uName;
rVal >>= uName;
SetValue(SwStyleNameMapper::GetUIName(uName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE));
- return TRUE;
+ return sal_True;
}
/* -----------------19.05.2003 10:44-----------------
diff --git a/sw/source/core/sw3io/sw3convert.cxx b/sw/source/core/sw3io/sw3convert.cxx
index 3d3b9e552a5e..af9350427b51 100644
--- a/sw/source/core/sw3io/sw3convert.cxx
+++ b/sw/source/core/sw3io/sw3convert.cxx
@@ -94,7 +94,7 @@ using namespace nsSwDocInfoSubType;
struct OldFormats
{
NfIndexTableOffset eFormatIdx;
- USHORT nOldFormat;
+ sal_uInt16 nOldFormat;
};
static OldFormats aOldDateFmt40[] =
@@ -213,9 +213,9 @@ static OldFormats aOldGetSetExpFmt30[] =
{ NF_NUMERIC_START, 0 } // Tabellenende
};
-SW_DLLPUBLIC void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich,
- USHORT& rSubType, ULONG &rFmt,
- USHORT nVersion )
+SW_DLLPUBLIC void sw3io_ConvertFromOldField( SwDoc& rDoc, sal_uInt16& rWhich,
+ sal_uInt16& rSubType, sal_uLong &rFmt,
+ sal_uInt16 nVersion )
{
const OldFormats *pOldFmt = 0L;
@@ -278,10 +278,10 @@ SW_DLLPUBLIC void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich,
// uns voruebergehend mal im Subtyp, sofern es
// ueberhaupt als entsprechendes Format in Frage kommt.
if( RES_SETEXPFLD==rWhich &&
- /*rFmt >= (USHORT)SVX_NUM_CHARS_UPPER_LETTER && always true*/
- rFmt <= (USHORT)SVX_NUM_BITMAP )
+ /*rFmt >= (sal_uInt16)SVX_NUM_CHARS_UPPER_LETTER && always true*/
+ rFmt <= (sal_uInt16)SVX_NUM_BITMAP )
{
- rSubType = (USHORT)rFmt;
+ rSubType = (sal_uInt16)rFmt;
}
pOldFmt = nVersion<SWG_INETBROWSER ? aOldGetSetExpFmt30
: aOldGetSetExpFmt40;
@@ -306,7 +306,7 @@ SW_DLLPUBLIC void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich,
if( pOldFmt )
{
SvNumberFormatter *pFormatter = rDoc.GetNumberFormatter();
- USHORT i = 0;
+ sal_uInt16 i = 0;
while( pOldFmt[i].eFormatIdx != NF_NUMERIC_START ||
pOldFmt[i].nOldFormat)
@@ -320,11 +320,11 @@ SW_DLLPUBLIC void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich,
}
}
}
-SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, USHORT& rWhich,
- ULONG& rFmt, ULONG nFFVersion )
+SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, sal_uInt16& rWhich,
+ sal_uLong& rFmt, sal_uLong nFFVersion )
{
const OldFormats *pOldFmt = 0L;
- ULONG nOldFmt = rFmt;
+ sal_uLong nOldFmt = rFmt;
switch( rWhich )
{
@@ -343,7 +343,7 @@ SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, USHORT& rWhich,
case RES_DATETIMEFLD:
if( SOFFICE_FILEFORMAT_40 >= nFFVersion )
{
- USHORT nSubType = ((SwDateTimeField*) pFld)->GetSubType();
+ sal_uInt16 nSubType = ((SwDateTimeField*) pFld)->GetSubType();
switch( nSubType )
{
case DATEFLD: rWhich = RES_DATEFLD; break;
@@ -372,7 +372,7 @@ SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, USHORT& rWhich,
case RES_USERFLD:
if( SOFFICE_FILEFORMAT_40 >= nFFVersion )
{
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
if (nSubType & nsSwExtendedSubType::SUB_INVISIBLE)
rFmt = VVF_INVISIBLE;
@@ -408,7 +408,7 @@ SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, USHORT& rWhich,
if( pOldFmt && nOldFmt )
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
SvNumberFormatter *pFormatter = ((SwValueField*)pFld)->GetDoc()->GetNumberFormatter();
const SvNumberformat* pEntry = pFormatter->GetEntry( nOldFmt );
@@ -418,7 +418,7 @@ SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, USHORT& rWhich,
while( pOldFmt[i].eFormatIdx != NF_NUMERIC_START ||
pOldFmt[i].nOldFormat )
{
- ULONG nKey = pFormatter->GetFormatIndex(
+ sal_uLong nKey = pFormatter->GetFormatIndex(
pOldFmt[i].eFormatIdx, pEntry->GetLanguage() );
if( nOldFmt == nKey )
diff --git a/sw/source/core/sw3io/swacorr.cxx b/sw/source/core/sw3io/swacorr.cxx
index be0fdf0ac441..6c9a4c52a111 100644
--- a/sw/source/core/sw3io/swacorr.cxx
+++ b/sw/source/core/sw3io/swacorr.cxx
@@ -52,9 +52,9 @@ TYPEINIT1( SwAutoCorrect, SvxAutoCorrect );
// koennen aus der Wortliste herausgeholt werden!)
// rShort ist der Stream-Name - gecryptet!
-BOOL SwAutoCorrect::GetLongText( const uno::Reference < embed::XStorage >& rStg, const String& rFileName, const String& rShort, String& rLong )
+sal_Bool SwAutoCorrect::GetLongText( const uno::Reference < embed::XStorage >& rStg, const String& rFileName, const String& rShort, String& rLong )
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if (rStg.is())
{
// mba: relative URLs don't make sense here
@@ -69,14 +69,14 @@ BOOL SwAutoCorrect::GetLongText( const uno::Reference < embed::XStorage >& rStg,
// - Text mit Attributierung (kann nur der SWG - SWG-Format!)
// rShort ist der Stream-Name - gecryptet!
-BOOL SwAutoCorrect::PutText( const uno::Reference < embed::XStorage >& rStg, const String& rFileName, const String& rShort,
+sal_Bool SwAutoCorrect::PutText( const uno::Reference < embed::XStorage >& rStg, const String& rFileName, const String& rShort,
SfxObjectShell& rObjSh, String& rLong )
{
if( !rObjSh.IsA( TYPE(SwDocShell) ) )
- return FALSE;
+ return sal_False;
SwDocShell& rDShell = (SwDocShell&)rObjSh;
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
// mba: relative URLs don't make sense here
SwXMLTextBlocks aBlk( rStg, rFileName );
@@ -87,7 +87,7 @@ BOOL SwAutoCorrect::PutText( const uno::Reference < embed::XStorage >& rStg, co
{
((SwEditShell*)rDShell.GetWrtShell())->_CopySelToDoc( pDoc );
nRet = aBlk.PutDoc();
- aBlk.AddName ( rShort, rShort, FALSE );
+ aBlk.AddName ( rShort, rShort, sal_False );
if( !IsError( nRet ) )
nRet = aBlk.GetText( rShort, rLong );
}
diff --git a/sw/source/core/swg/SwXMLBlockListContext.cxx b/sw/source/core/swg/SwXMLBlockListContext.cxx
index 1fb2659c9a2d..b8c5fb58aefc 100644
--- a/sw/source/core/swg/SwXMLBlockListContext.cxx
+++ b/sw/source/core/swg/SwXMLBlockListContext.cxx
@@ -96,7 +96,7 @@ SwXMLBlockContext::SwXMLBlockContext(
{
static const CharClass & rCC = GetAppCharClass();
String aShort, aLong, aPackageName;
- BOOL bTextOnly = FALSE;
+ sal_Bool bTextOnly = sal_False;
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for (sal_Int16 i=0; i < nAttrCount; i++)
@@ -122,7 +122,7 @@ SwXMLBlockContext::SwXMLBlockContext(
else if ( IsXMLToken ( aLocalName, XML_UNFORMATTED_TEXT ) )
{
if ( IsXMLToken ( rAttrValue, XML_TRUE ) )
- bTextOnly = TRUE;
+ bTextOnly = sal_True;
}
}
}
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx
index 358b00e12ca1..713438da72c8 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -72,16 +72,16 @@ void SwXMLTextBlocks::ResetBlockMode ( )
}
SwXMLTextBlocks::SwXMLTextBlocks( const String& rFile )
-: SwImpBlocks( rFile ), bAutocorrBlock( FALSE ), nFlags ( 0 )
+: SwImpBlocks( rFile ), bAutocorrBlock( sal_False ), nFlags ( 0 )
{
SwDocShell* pDocSh = new SwDocShell ( SFX_CREATE_MODE_INTERNAL );
if( !pDocSh->DoInitNew( 0 ) )
return;
- bReadOnly = TRUE;
+ bReadOnly = sal_True;
pDoc = pDocSh->GetDoc();
xDocShellRef = pDocSh;
pDoc->SetOle2Link( Link() );
- pDoc->DoUndo( FALSE ); // always FALSE
+ pDoc->DoUndo( sal_False ); // always sal_False
pDoc->acquire();
uno::Reference< embed::XStorage > refStg;
if( !aDateModified.GetDate() || !aTimeModified.GetTime() )
@@ -89,7 +89,7 @@ SwXMLTextBlocks::SwXMLTextBlocks( const String& rFile )
try
{
refStg = comphelper::OStorageHelper::GetStorageFromURL( rFile, embed::ElementModes::READWRITE );
- bReadOnly = FALSE;
+ bReadOnly = sal_False;
}
catch( const uno::Exception& )
{
@@ -109,27 +109,27 @@ SwXMLTextBlocks::SwXMLTextBlocks( const String& rFile )
InitBlockMode ( refStg );
ReadInfo();
ResetBlockMode ();
- bInfoChanged = FALSE;
+ bInfoChanged = sal_False;
}
SwXMLTextBlocks::SwXMLTextBlocks( const uno::Reference < embed::XStorage >& rStg, const String& rName )
: SwImpBlocks( rName )
-, bAutocorrBlock( TRUE )
+, bAutocorrBlock( sal_True )
, nFlags ( 0 )
{
SwDocShell* pDocSh = new SwDocShell ( SFX_CREATE_MODE_INTERNAL );
if( !pDocSh->DoInitNew( 0 ) )
return;
- bReadOnly = FALSE;
+ bReadOnly = sal_False;
pDoc = pDocSh->GetDoc();
xDocShellRef = pDocSh;
pDoc->SetOle2Link( Link() );
- pDoc->DoUndo( FALSE );
+ pDoc->DoUndo( sal_False );
pDoc->acquire();
InitBlockMode ( rStg );
ReadInfo();
- bInfoChanged = FALSE;
+ bInfoChanged = sal_False;
}
SwXMLTextBlocks::~SwXMLTextBlocks()
@@ -153,35 +153,35 @@ void SwXMLTextBlocks::ClearDoc()
pDoc->ClearDoc();
pDocShell->ClearEmbeddedObjects();
}
-void SwXMLTextBlocks::AddName( const String& rShort, const String& rLong, BOOL bOnlyTxt )
+void SwXMLTextBlocks::AddName( const String& rShort, const String& rLong, sal_Bool bOnlyTxt )
{
- USHORT nIdx = GetIndex( rShort );
+ sal_uInt16 nIdx = GetIndex( rShort );
SwBlockName* pNew = NULL;
- if( nIdx != (USHORT) -1 )
+ if( nIdx != (sal_uInt16) -1 )
aNames.DeleteAndDestroy( nIdx );
GeneratePackageName( rShort, aPackageName );
pNew = new SwBlockName( rShort, rLong, aPackageName );
- pNew->bIsOnlyTxtFlagInit = TRUE;
+ pNew->bIsOnlyTxtFlagInit = sal_True;
pNew->bIsOnlyTxt = bOnlyTxt;
aNames.C40_PTR_INSERT( SwBlockName, pNew );
- bInfoChanged = TRUE;
+ bInfoChanged = sal_True;
}
void SwXMLTextBlocks::AddName( const String& rShort, const String& rLong,
- const String& rPackageName, BOOL bOnlyTxt )
+ const String& rPackageName, sal_Bool bOnlyTxt )
{
- USHORT nIdx = GetIndex( rShort );
- if( nIdx != (USHORT) -1 )
+ sal_uInt16 nIdx = GetIndex( rShort );
+ if( nIdx != (sal_uInt16) -1 )
aNames.DeleteAndDestroy( nIdx );
SwBlockName* pNew = new SwBlockName( rShort, rLong, rPackageName );
- pNew->bIsOnlyTxtFlagInit = TRUE;
+ pNew->bIsOnlyTxtFlagInit = sal_True;
pNew->bIsOnlyTxt = bOnlyTxt;
aNames.C40_PTR_INSERT( SwBlockName, pNew );
- bInfoChanged = TRUE;
+ bInfoChanged = sal_True;
}
-ULONG SwXMLTextBlocks::Delete( USHORT n )
+sal_uLong SwXMLTextBlocks::Delete( sal_uInt16 n )
{
String aPckName (aNames[ n ]->aPackageName);
uno::Reference < container::XNameAccess > xAccess( xBlkRoot, uno::UNO_QUERY );
@@ -204,7 +204,7 @@ ULONG SwXMLTextBlocks::Delete( USHORT n )
return 0;
}
-ULONG SwXMLTextBlocks::Rename( USHORT nIdx, const String& rNewShort, const String& )
+sal_uLong SwXMLTextBlocks::Rename( sal_uInt16 nIdx, const String& rNewShort, const String& )
{
DBG_ASSERT( xBlkRoot.is(), "No storage set" );
if(!xBlkRoot.is())
@@ -245,17 +245,17 @@ ULONG SwXMLTextBlocks::Rename( USHORT nIdx, const String& rNewShort, const Strin
return 0;
}
-ULONG SwXMLTextBlocks::CopyBlock( SwImpBlocks& rDestImp, String& rShort,
+sal_uLong SwXMLTextBlocks::CopyBlock( SwImpBlocks& rDestImp, String& rShort,
const String& rLong)
{
- ULONG nError = 0;
- OpenFile(TRUE);
- rDestImp.OpenFile(FALSE);
+ sal_uLong nError = 0;
+ OpenFile(sal_True);
+ rDestImp.OpenFile(sal_False);
String aGroup( rShort );
- BOOL bTextOnly = IsOnlyTextBlock ( rShort ) ;//pImp->pBlkRoot->IsStream( aGroup );
- USHORT nIndex = GetIndex ( rShort );
+ sal_Bool bTextOnly = IsOnlyTextBlock ( rShort ) ;//pImp->pBlkRoot->IsStream( aGroup );
+ sal_uInt16 nIndex = GetIndex ( rShort );
String sDestShortName( GetPackageName (nIndex) );
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
DBG_ASSERT( xBlkRoot.is(), "No storage set" );
if(!xBlkRoot.is())
@@ -319,7 +319,7 @@ ULONG SwXMLTextBlocks::CopyBlock( SwImpBlocks& rDestImp, String& rShort,
}
-ULONG SwXMLTextBlocks::StartPutBlock( const String& rShort, const String& rPackageName )
+sal_uLong SwXMLTextBlocks::StartPutBlock( const String& rShort, const String& rPackageName )
{
DBG_ASSERT( xBlkRoot.is(), "No storage set" );
if(!xBlkRoot.is())
@@ -346,20 +346,20 @@ ULONG SwXMLTextBlocks::StartPutBlock( const String& rShort, const String& rPacka
}
return 0;
}
-ULONG SwXMLTextBlocks::BeginPutDoc( const String& rShort, const String& rLong )
+sal_uLong SwXMLTextBlocks::BeginPutDoc( const String& rShort, const String& rLong )
{
// In der Basisklasse ablegen!
aShort = rShort;
aLong = rLong;
GeneratePackageName( rShort, aPackageName );
- SetIsTextOnly( rShort, FALSE);
+ SetIsTextOnly( rShort, sal_False);
return StartPutBlock (rShort, aPackageName);
}
-ULONG SwXMLTextBlocks::PutBlock( SwPaM& , const String& )
+sal_uLong SwXMLTextBlocks::PutBlock( SwPaM& , const String& )
{
- ULONG nRes = 0;
- USHORT nCommitFlags = nFlags & (SWXML_CONVBLOCK|SWXML_NOROOTCOMMIT);
+ sal_uLong nRes = 0;
+ sal_uInt16 nCommitFlags = nFlags & (SWXML_CONVBLOCK|SWXML_NOROOTCOMMIT);
nFlags |= nCommitFlags;
@@ -433,7 +433,7 @@ ULONG SwXMLTextBlocks::PutBlock( SwPaM& , const String& )
//TODO/LATER: error handling
/*
- ULONG nErr = xBlkRoot->GetError();
+ sal_uLong nErr = xBlkRoot->GetError();
if( nErr == SVSTREAM_DISK_FULL )
nRes = ERR_W4W_WRITE_FULL;
else if( nErr != SVSTREAM_OK )
@@ -443,34 +443,34 @@ ULONG SwXMLTextBlocks::PutBlock( SwPaM& , const String& )
return 0;
}
-ULONG SwXMLTextBlocks::PutDoc()
+sal_uLong SwXMLTextBlocks::PutDoc()
{
SwPaM* pPaM = MakePaM();
- ULONG nErr = PutBlock(*pPaM, aLong);
+ sal_uLong nErr = PutBlock(*pPaM, aLong);
delete pPaM;
return nErr;
}
-ULONG SwXMLTextBlocks::GetText( USHORT nIdx, String& rText )
+sal_uLong SwXMLTextBlocks::GetText( sal_uInt16 nIdx, String& rText )
{
return GetBlockText( aNames[ nIdx ]->aShort, rText );
}
-ULONG SwXMLTextBlocks::GetText( const String& rShort, String& rText )
+sal_uLong SwXMLTextBlocks::GetText( const String& rShort, String& rText )
{
return GetBlockText( rShort, rText );
}
-ULONG SwXMLTextBlocks::MakeBlockList()
+sal_uLong SwXMLTextBlocks::MakeBlockList()
{
WriteInfo();
return 0;
}
-BOOL SwXMLTextBlocks::PutMuchEntries( BOOL bOn )
+sal_Bool SwXMLTextBlocks::PutMuchEntries( sal_Bool bOn )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( bOn )
{
if( bInPutMuchBlocks )
@@ -479,11 +479,11 @@ BOOL SwXMLTextBlocks::PutMuchEntries( BOOL bOn )
}
else if( !IsFileChanged() )
{
- bRet = 0 == OpenFile( FALSE );
+ bRet = 0 == OpenFile( sal_False );
if( bRet )
{
nFlags |= SWXML_NOROOTCOMMIT;
- bInPutMuchBlocks = TRUE;
+ bInPutMuchBlocks = sal_True;
}
}
}
@@ -500,8 +500,8 @@ BOOL SwXMLTextBlocks::PutMuchEntries( BOOL bOn )
MakeBlockList();
CloseFile();
Touch();
- bInPutMuchBlocks = FALSE;
- bRet = TRUE;
+ bInPutMuchBlocks = sal_False;
+ bRet = sal_True;
}
catch (uno::Exception&)
{
@@ -511,11 +511,11 @@ BOOL SwXMLTextBlocks::PutMuchEntries( BOOL bOn )
return bRet;
}
-ULONG SwXMLTextBlocks::OpenFile( BOOL bRdOnly )
+sal_uLong SwXMLTextBlocks::OpenFile( sal_Bool bRdOnly )
{
if( bAutocorrBlock )
return 0;
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
try
{
uno::Reference < embed::XStorage > refStg = comphelper::OStorageHelper::GetStorageFromURL( aFile,
@@ -541,34 +541,34 @@ void SwXMLTextBlocks::CloseFile()
}
}
-void SwXMLTextBlocks::SetIsTextOnly( const String& rShort, BOOL bNewValue )
+void SwXMLTextBlocks::SetIsTextOnly( const String& rShort, sal_Bool bNewValue )
{
- USHORT nIdx = GetIndex ( rShort );
- if (nIdx != (USHORT) -1 && nIdx != USHRT_MAX)
+ sal_uInt16 nIdx = GetIndex ( rShort );
+ if (nIdx != (sal_uInt16) -1 && nIdx != USHRT_MAX)
aNames[nIdx]->bIsOnlyTxt = bNewValue;
}
-void SwXMLTextBlocks::SetIsTextOnly( USHORT nIdx, BOOL bNewValue )
+void SwXMLTextBlocks::SetIsTextOnly( sal_uInt16 nIdx, sal_Bool bNewValue )
{
aNames[nIdx]->bIsOnlyTxt = bNewValue;
}
-BOOL SwXMLTextBlocks::IsOnlyTextBlock( const String& rShort ) const
+sal_Bool SwXMLTextBlocks::IsOnlyTextBlock( const String& rShort ) const
{
- USHORT nIdx = GetIndex ( rShort );
- BOOL bRet = FALSE;
- if (nIdx != (USHORT) -1 && nIdx != USHRT_MAX)
+ sal_uInt16 nIdx = GetIndex ( rShort );
+ sal_Bool bRet = sal_False;
+ if (nIdx != (sal_uInt16) -1 && nIdx != USHRT_MAX)
{
bRet = aNames[nIdx]->bIsOnlyTxt;
}
return bRet;
}
-BOOL SwXMLTextBlocks::IsOnlyTextBlock( USHORT nIdx ) const
+sal_Bool SwXMLTextBlocks::IsOnlyTextBlock( sal_uInt16 nIdx ) const
{
return aNames[nIdx]->bIsOnlyTxt;
}
-BOOL SwXMLTextBlocks::IsFileUCBStorage( const String & rFileName)
+sal_Bool SwXMLTextBlocks::IsFileUCBStorage( const String & rFileName)
{
String aName( rFileName );
INetURLObject aObj( aName );
@@ -581,7 +581,7 @@ BOOL SwXMLTextBlocks::IsFileUCBStorage( const String & rFileName)
}
SvStream * pStm = ::utl::UcbStreamHelper::CreateStream( aName, STREAM_STD_READ );
- BOOL bRet = UCBStorage::IsStorageFile( pStm );
+ sal_Bool bRet = UCBStorage::IsStorageFile( pStm );
delete pStm;
return bRet;
}
@@ -607,14 +607,14 @@ void SwXMLTextBlocks::GeneratePackageName ( const String& rShort, String& rPacka
}
}
-ULONG SwXMLTextBlocks::PutText( const String& rShort, const String& rName,
+sal_uLong SwXMLTextBlocks::PutText( const String& rShort, const String& rName,
const String& rText )
{
- ULONG nRes = 0;
+ sal_uLong nRes = 0;
aShort = rShort;
aLong = rName;
aCur = rText;
- SetIsTextOnly( aShort, TRUE );
+ SetIsTextOnly( aShort, sal_True );
GeneratePackageName( rShort, aPackageName );
ClearDoc();
nRes = PutBlockText( rShort, rName, rText, aPackageName );
diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx
index f46a0b642db8..0aab2addfd7d 100644
--- a/sw/source/core/swg/SwXMLTextBlocks1.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx
@@ -65,7 +65,7 @@ using ::xmloff::token::XML_BLOCK_LIST;
using ::xmloff::token::XML_UNFORMATTED_TEXT;
using ::xmloff::token::GetXMLToken;
-ULONG SwXMLTextBlocks::GetDoc( USHORT nIdx )
+sal_uLong SwXMLTextBlocks::GetDoc( sal_uInt16 nIdx )
{
String aFolderName ( GetPackageName ( nIdx ) );
@@ -159,7 +159,7 @@ ULONG SwXMLTextBlocks::GetDoc( USHORT nIdx )
// re throw ?
}
- bInfoChanged = FALSE;
+ bInfoChanged = sal_False;
MakeBlockText(aCur);
}
catch( uno::Exception& )
@@ -180,7 +180,7 @@ const struct SvEventDescription aAutotextEvents[] =
{ 0, NULL }
};
-ULONG SwXMLTextBlocks::GetMacroTable( USHORT nIdx,
+sal_uLong SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx,
SvxMacroTableDtor& rMacroTbl,
sal_Bool bFileAlreadyOpen )
{
@@ -190,13 +190,13 @@ ULONG SwXMLTextBlocks::GetMacroTable( USHORT nIdx,
aLong = aNames[ nIdx ]->aLong;
aPackageName = aNames[ nIdx ]->aPackageName;
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
// open stream in proper sub-storage
if( !bFileAlreadyOpen )
{
CloseFile();
- nRet = OpenFile ( TRUE );
+ nRet = OpenFile ( sal_True );
}
if ( 0 == nRet )
{
@@ -315,9 +315,9 @@ ULONG SwXMLTextBlocks::GetMacroTable( USHORT nIdx,
}
-ULONG SwXMLTextBlocks::GetBlockText( const String& rShort, String& rText )
+sal_uLong SwXMLTextBlocks::GetBlockText( const String& rShort, String& rText )
{
- ULONG n = 0;
+ sal_uLong n = 0;
sal_Bool bTextOnly = sal_True;
String aFolderName;
GeneratePackageName ( rShort, aFolderName );
@@ -394,7 +394,7 @@ ULONG SwXMLTextBlocks::GetBlockText( const String& rShort, String& rText )
return n;
}
-ULONG SwXMLTextBlocks::PutBlockText( const String& rShort, const String& ,
+sal_uLong SwXMLTextBlocks::PutBlockText( const String& rShort, const String& ,
const String& rText, const String& rPackageName )
{
GetIndex ( rShort );
@@ -420,7 +420,7 @@ ULONG SwXMLTextBlocks::PutBlockText( const String& rShort, const String& ,
uno::Reference < XInterface > xWriter (xServiceFactory->createInstance(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer"))));
DBG_ASSERT(xWriter.is(),"com.sun.star.xml.sax.Writer service missing");
- ULONG nRes = 0;
+ sal_uLong nRes = 0;
try
{
@@ -467,8 +467,8 @@ ULONG SwXMLTextBlocks::PutBlockText( const String& rShort, const String& ,
//TODO/LATER: error handling
/*
- ULONG nErr = xBlkRoot->GetError();
- ULONG nRes = 0;
+ sal_uLong nErr = xBlkRoot->GetError();
+ sal_uLong nRes = 0;
if( nErr == SVSTREAM_DISK_FULL )
nRes = ERR_W4W_WRITE_FULL;
else if( nErr != SVSTREAM_OK )
@@ -547,7 +547,7 @@ void SwXMLTextBlocks::ReadInfo( void )
}
void SwXMLTextBlocks::WriteInfo( void )
{
- if ( xBlkRoot.is() || 0 == OpenFile ( FALSE ) )
+ if ( xBlkRoot.is() || 0 == OpenFile ( sal_False ) )
{
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
@@ -602,13 +602,13 @@ void SwXMLTextBlocks::WriteInfo( void )
{
}
- bInfoChanged = FALSE;
+ bInfoChanged = sal_False;
return;
}
}
-ULONG SwXMLTextBlocks::SetMacroTable(
- USHORT nIdx,
+sal_uLong SwXMLTextBlocks::SetMacroTable(
+ sal_uInt16 nIdx,
const SvxMacroTableDtor& rMacroTbl,
sal_Bool bFileAlreadyOpen )
{
@@ -618,7 +618,7 @@ ULONG SwXMLTextBlocks::SetMacroTable(
aPackageName = aNames[ nIdx ]->aPackageName;
// start XML autotext event export
- ULONG nRes = 0;
+ sal_uLong nRes = 0;
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
@@ -638,7 +638,7 @@ ULONG SwXMLTextBlocks::SetMacroTable(
if( !bFileAlreadyOpen )
{
CloseFile(); // close (it may be open in read-only-mode)
- nRes = OpenFile ( FALSE );
+ nRes = OpenFile ( sal_False );
}
if ( 0 == nRes )
diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx
index 4329e7345384..3c0409b764cc 100644
--- a/sw/source/core/swg/swblocks.cxx
+++ b/sw/source/core/swg/swblocks.cxx
@@ -63,9 +63,9 @@ SV_IMPL_OP_PTRARR_SORT( SwBlockNames, SwBlockName* );
// Hash-Code errechnen (muss nicht eindeutig sein)
-USHORT SwImpBlocks::Hash( const String& r )
+sal_uInt16 SwImpBlocks::Hash( const String& r )
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
xub_StrLen nLen = r.Len();
if( nLen > 8 )
nLen = 8;
@@ -78,14 +78,14 @@ USHORT SwImpBlocks::Hash( const String& r )
SwBlockName::SwBlockName( const String& rShort, const String& rLong, long n )
: nPos( n ), aShort( rShort ), aLong( rLong ), aPackageName (rShort),
- bIsOnlyTxtFlagInit( FALSE ), bIsOnlyTxt( FALSE )
+ bIsOnlyTxtFlagInit( sal_False ), bIsOnlyTxt( sal_False )
{
nHashS = SwImpBlocks::Hash( rShort );
nHashL = SwImpBlocks::Hash( rLong );
}
SwBlockName::SwBlockName( const String& rShort, const String& rLong, const String& rPackageName)
: nPos( 0 ), aShort( rShort ), aLong( rLong ), aPackageName (rPackageName),
- bIsOnlyTxtFlagInit( FALSE ), bIsOnlyTxt( FALSE )
+ bIsOnlyTxtFlagInit( sal_False ), bIsOnlyTxt( sal_False )
{
nHashS = SwImpBlocks::Hash( rShort );
nHashL = SwImpBlocks::Hash( rLong );
@@ -107,9 +107,9 @@ short SwImpBlocks::GetFileType( const String& rFile )
}
-SwImpBlocks::SwImpBlocks( const String& rFile, BOOL )
- : aFile( rFile ), pDoc( 0 ), nCur( (USHORT)-1 ),
- bReadOnly( TRUE ), bInPutMuchBlocks( FALSE )
+SwImpBlocks::SwImpBlocks( const String& rFile, sal_Bool )
+ : aFile( rFile ), pDoc( 0 ), nCur( (sal_uInt16)-1 ),
+ bReadOnly( sal_True ), bInPutMuchBlocks( sal_False )
{
FStatHelper::GetModifiedDateTimeOfFile( rFile,
&aDateModified, &aTimeModified );
@@ -130,7 +130,7 @@ void SwImpBlocks::ClearDoc()
pDoc->ClearDoc();
}
-ULONG SwImpBlocks::GetDocForConversion( USHORT n )
+sal_uLong SwImpBlocks::GetDocForConversion( sal_uInt16 n )
{
return GetDoc( n );
}
@@ -147,42 +147,42 @@ SwPaM* SwImpBlocks::MakePaM()
}
-USHORT SwImpBlocks::GetCount() const
+sal_uInt16 SwImpBlocks::GetCount() const
{
return aNames.Count();
}
// Case Insensitive
-USHORT SwImpBlocks::GetIndex( const String& rShort ) const
+sal_uInt16 SwImpBlocks::GetIndex( const String& rShort ) const
{
String s( GetAppCharClass().upper( rShort ) );
- USHORT nHash = Hash( s );
- for( USHORT i = 0; i < aNames.Count(); i++ )
+ sal_uInt16 nHash = Hash( s );
+ for( sal_uInt16 i = 0; i < aNames.Count(); i++ )
{
SwBlockName* pName = aNames[ i ];
if( pName->nHashS == nHash
&& pName->aShort == s )
return i;
}
- return (USHORT) -1;
+ return (sal_uInt16) -1;
}
-USHORT SwImpBlocks::GetLongIndex( const String& rLong ) const
+sal_uInt16 SwImpBlocks::GetLongIndex( const String& rLong ) const
{
- USHORT nHash = Hash( rLong );
- for( USHORT i = 0; i < aNames.Count(); i++ )
+ sal_uInt16 nHash = Hash( rLong );
+ for( sal_uInt16 i = 0; i < aNames.Count(); i++ )
{
SwBlockName* pName = aNames[ i ];
if( pName->nHashL == nHash
&& pName->aLong == rLong )
return i;
}
- return (USHORT) -1;
+ return (sal_uInt16) -1;
}
-const String& SwImpBlocks::GetShortName( USHORT n ) const
+const String& SwImpBlocks::GetShortName( sal_uInt16 n ) const
{
if( n < aNames.Count() )
return aNames[ n ]->aShort;
@@ -190,14 +190,14 @@ const String& SwImpBlocks::GetShortName( USHORT n ) const
}
-const String& SwImpBlocks::GetLongName( USHORT n ) const
+const String& SwImpBlocks::GetLongName( sal_uInt16 n ) const
{
if( n < aNames.Count() )
return aNames[ n ]->aLong;
return aEmptyStr;
}
-const String& SwImpBlocks::GetPackageName( USHORT n ) const
+const String& SwImpBlocks::GetPackageName( sal_uInt16 n ) const
{
if( n < aNames.Count() )
return aNames[ n ]->aPackageName;
@@ -205,20 +205,20 @@ const String& SwImpBlocks::GetPackageName( USHORT n ) const
}
void SwImpBlocks::AddName( const String& rShort, const String& rLong,
- BOOL bOnlyTxt )
+ sal_Bool bOnlyTxt )
{
- USHORT nIdx = GetIndex( rShort );
- if( nIdx != (USHORT) -1 )
+ sal_uInt16 nIdx = GetIndex( rShort );
+ if( nIdx != (sal_uInt16) -1 )
aNames.DeleteAndDestroy( nIdx );
SwBlockName* pNew = new SwBlockName( rShort, rLong, 0L );
- pNew->bIsOnlyTxtFlagInit = TRUE;
+ pNew->bIsOnlyTxtFlagInit = sal_True;
pNew->bIsOnlyTxt = bOnlyTxt;
aNames.C40_PTR_INSERT( SwBlockName, pNew );
}
-BOOL SwImpBlocks::IsFileChanged() const
+sal_Bool SwImpBlocks::IsFileChanged() const
{
Date aTempDateModified( aDateModified );
Time aTempTimeModified( aTimeModified );
@@ -235,25 +235,25 @@ void SwImpBlocks::Touch()
&aDateModified, &aTimeModified );
}
-BOOL SwImpBlocks::IsOnlyTextBlock( const String& ) const
+sal_Bool SwImpBlocks::IsOnlyTextBlock( const String& ) const
{
- return FALSE;
+ return sal_False;
}
-ULONG SwImpBlocks::GetMacroTable( USHORT, SvxMacroTableDtor&, sal_Bool )
+sal_uLong SwImpBlocks::GetMacroTable( sal_uInt16, SvxMacroTableDtor&, sal_Bool )
{
return 0;
}
-ULONG SwImpBlocks::SetMacroTable( USHORT ,
+sal_uLong SwImpBlocks::SetMacroTable( sal_uInt16 ,
const SvxMacroTableDtor& , sal_Bool )
{
return 0;
}
-BOOL SwImpBlocks::PutMuchEntries( BOOL )
+sal_Bool SwImpBlocks::PutMuchEntries( sal_Bool )
{
- return FALSE;
+ return sal_False;
}
////////////////////////////////////////////////////////////////////////////
@@ -293,20 +293,20 @@ void SwTextBlocks::SetName( const String& r )
}
-BOOL SwTextBlocks::IsOld() const
+sal_Bool SwTextBlocks::IsOld() const
{
if (pImp)
{
short nType = pImp->GetFileType();
if (SWBLK_SW3 == nType || SWBLK_SW2 == nType )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*
-ULONG SwTextBlocks::ConvertToNew()
+sal_uLong SwTextBlocks::ConvertToNew()
{
// Wir nehmen die aktuelle Datei, benennen diese in .BAK um
// und kreieren den neuen Storage
@@ -318,7 +318,7 @@ ULONG SwTextBlocks::ConvertToNew()
Sw3TextBlocks *pThree = NULL;
SwImpBlocks *pOld = NULL;
- pImp->nCur = (USHORT) -1;
+ pImp->nCur = (sal_uInt16) -1;
String aName( pImp->aFile );
delete pImp; pImp = NULL;
// Jetzt wird umbenannt
@@ -329,7 +329,7 @@ ULONG SwTextBlocks::ConvertToNew()
String aOld( aOldFull.GetMainURL( INetURLObject::NO_DECODE ) );
String aNew( aNewFull.GetMainURL( INetURLObject::NO_DECODE ) );
- BOOL bError = !SWUnoHelper::UCB_CopyFile( aNew, aOld, TRUE );
+ sal_Bool bError = !SWUnoHelper::UCB_CopyFile( aNew, aOld, sal_True );
if( bError )
{
if (nType == SWBLK_SW2)
@@ -360,23 +360,23 @@ ULONG SwTextBlocks::ConvertToNew()
}
else
{
- nErr = pThree->OpenFile ( TRUE );
+ nErr = pThree->OpenFile ( sal_True );
// Within this call, Sw3IoImp::SetDoc calls RemoveLink
// on the old document, and deletes it if the
// ref count is now zero
pThree->SetDoc ( pNew->pDoc );
pOld->pDoc->AddLink();
}
- if( !nErr && 0 == ( nErr = pNew->OpenFile( FALSE )) )
+ if( !nErr && 0 == ( nErr = pNew->OpenFile( sal_False )) )
{
- nErr = pNew->SetConvertMode( TRUE );
+ nErr = pNew->SetConvertMode( sal_True );
// jetzt werden die Bausteine einfach umkopiert!
if( !nErr )
{
if (SWBLK_SW2 == nType)
pTwo->StatLineStartPercent();
- USHORT nCount = pOld->GetCount();
- for( USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = pOld->GetCount();
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
pNew->ClearDoc();
String aShort( pOld->GetShortName( i ) );
@@ -418,7 +418,7 @@ ULONG SwTextBlocks::ConvertToNew()
::EndProgress( pOld->pDoc->GetDocShell() );
}
if( !nErr )
- nErr = pNew->SetConvertMode( FALSE );
+ nErr = pNew->SetConvertMode( sal_False );
}
if ( SWBLK_SW3 == nType )
{
@@ -441,7 +441,7 @@ ULONG SwTextBlocks::ConvertToNew()
{
delete pOld; delete pNew;
SWUnoHelper::UCB_DeleteFile( aNew );
- SWUnoHelper::UCB_CopyFile( aOld, aNew, TRUE );
+ SWUnoHelper::UCB_CopyFile( aOld, aNew, sal_True );
if ( SWBLK_SW2 == nType )
pImp = new Sw2TextBlocks( aOld );
else
@@ -455,25 +455,25 @@ ULONG SwTextBlocks::ConvertToNew()
} */
-USHORT SwTextBlocks::GetCount() const
+sal_uInt16 SwTextBlocks::GetCount() const
{
return pImp ? pImp->GetCount() : 0;
}
-USHORT SwTextBlocks::GetIndex( const String& r ) const
+sal_uInt16 SwTextBlocks::GetIndex( const String& r ) const
{
- return pImp ? pImp->GetIndex( r ) : (USHORT) -1;
+ return pImp ? pImp->GetIndex( r ) : (sal_uInt16) -1;
}
-USHORT SwTextBlocks::GetLongIndex( const String& r ) const
+sal_uInt16 SwTextBlocks::GetLongIndex( const String& r ) const
{
- return pImp ? (USHORT)(pImp->GetLongIndex( r )) : (USHORT) -1;
+ return pImp ? (sal_uInt16)(pImp->GetLongIndex( r )) : (sal_uInt16) -1;
}
-const String& SwTextBlocks::GetShortName( USHORT n ) const
+const String& SwTextBlocks::GetShortName( sal_uInt16 n ) const
{
if( pImp )
return pImp->GetShortName( n );
@@ -481,7 +481,7 @@ const String& SwTextBlocks::GetShortName( USHORT n ) const
}
-const String& SwTextBlocks::GetLongName( USHORT n ) const
+const String& SwTextBlocks::GetLongName( sal_uInt16 n ) const
{
if( pImp )
return pImp->GetLongName( n );
@@ -489,34 +489,34 @@ const String& SwTextBlocks::GetLongName( USHORT n ) const
}
-BOOL SwTextBlocks::Delete( USHORT n )
+sal_Bool SwTextBlocks::Delete( sal_uInt16 n )
{
if( pImp && !pImp->bInPutMuchBlocks )
{
if( pImp->IsFileChanged() )
nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
- else if( 0 == (nErr = pImp->OpenFile( FALSE ) ))
+ else if( 0 == (nErr = pImp->OpenFile( sal_False ) ))
{
nErr = pImp->Delete( n );
if( !nErr )
pImp->aNames.DeleteAndDestroy( n );
if( n == pImp->nCur )
- pImp->nCur = (USHORT) -1;
+ pImp->nCur = (sal_uInt16) -1;
if( !nErr )
nErr = pImp->MakeBlockList();
}
pImp->CloseFile();
pImp->Touch();
- return BOOL( nErr == 0 );
+ return sal_Bool( nErr == 0 );
}
- return FALSE;
+ return sal_False;
}
-USHORT SwTextBlocks::Rename( USHORT n, const String* s, const String* l )
+sal_uInt16 SwTextBlocks::Rename( sal_uInt16 n, const String* s, const String* l )
{
- USHORT nIdx = (USHORT)-1;
+ sal_uInt16 nIdx = (sal_uInt16)-1;
if( pImp && !pImp->bInPutMuchBlocks )
{
pImp->nCur = nIdx;
@@ -528,19 +528,19 @@ USHORT SwTextBlocks::Rename( USHORT n, const String* s, const String* l )
if( !aNew.Len() )
{
ASSERT( !this, "Kein Kurzname in Rename angegeben" );
- nErr = ERR_SWG_INTERNAL_ERROR; return (USHORT) -1;
+ nErr = ERR_SWG_INTERNAL_ERROR; return (sal_uInt16) -1;
}
if( pImp->IsFileChanged() )
nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
- else if( 0 == ( nErr = pImp->OpenFile( FALSE )))
+ else if( 0 == ( nErr = pImp->OpenFile( sal_False )))
{
// Vorher den neuen Eintrag in die Liste setzen!
GetAppCharClass().toUpper( aNew );
nErr = pImp->Rename( n, aNew, aLong );
if( !nErr )
{
- BOOL bOnlyTxt = pImp->aNames[ n ]->bIsOnlyTxt;
+ sal_Bool bOnlyTxt = pImp->aNames[ n ]->bIsOnlyTxt;
pImp->aNames.DeleteAndDestroy( n );
pImp->AddName( aNew, aLong, bOnlyTxt );
nErr = pImp->MakeBlockList();
@@ -554,15 +554,15 @@ USHORT SwTextBlocks::Rename( USHORT n, const String* s, const String* l )
return nIdx;
}
-ULONG SwTextBlocks::CopyBlock( SwTextBlocks& rSource, String& rSrcShort,
+sal_uLong SwTextBlocks::CopyBlock( SwTextBlocks& rSource, String& rSrcShort,
const String& rLong )
{
- BOOL bIsOld = FALSE;
+ sal_Bool bIsOld = sal_False;
if (rSource.pImp)
{
short nType = rSource.pImp->GetFileType();
if (SWBLK_SW2 == nType || SWBLK_SW3 == nType )
- bIsOld = TRUE;
+ bIsOld = sal_True;
}
if( bIsOld ) //rSource.IsOld() )
nErr = ERR_SWG_OLD_GLOSSARY;
@@ -573,29 +573,29 @@ ULONG SwTextBlocks::CopyBlock( SwTextBlocks& rSource, String& rSrcShort,
return nErr;
}
-BOOL SwTextBlocks::BeginGetDoc( USHORT n )
+sal_Bool SwTextBlocks::BeginGetDoc( sal_uInt16 n )
{
if( pImp && !pImp->bInPutMuchBlocks )
{
// diese Optimierierung darf es nicht mehr geben. OLE-Objecte muessen auf
// ihre SubStorages zugreifem koennen!
// if( n == pImp->nCur )
-// return TRUE;
+// return sal_True;
if( pImp->IsFileChanged() )
nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
- else if( 0 == ( nErr = pImp->OpenFile( TRUE )))
+ else if( 0 == ( nErr = pImp->OpenFile( sal_True )))
{
pImp->ClearDoc();
nErr = pImp->GetDoc( n );
if( nErr )
- pImp->nCur = (USHORT)-1;
+ pImp->nCur = (sal_uInt16)-1;
else
pImp->nCur = n;
}
- return BOOL( nErr == 0 );
+ return sal_Bool( nErr == 0 );
}
- return FALSE;
+ return sal_False;
}
@@ -606,17 +606,17 @@ void SwTextBlocks::EndGetDoc()
}
-BOOL SwTextBlocks::BeginPutDoc( const String& s, const String& l )
+sal_Bool SwTextBlocks::BeginPutDoc( const String& s, const String& l )
{
if( pImp )
{
- BOOL bOk = pImp->bInPutMuchBlocks;
+ sal_Bool bOk = pImp->bInPutMuchBlocks;
if( !bOk )
{
if( pImp->IsFileChanged() )
nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
else
- nErr = pImp->OpenFile( FALSE );
+ nErr = pImp->OpenFile( sal_False );
bOk = 0 == nErr;
}
if( bOk )
@@ -632,16 +632,16 @@ BOOL SwTextBlocks::BeginPutDoc( const String& s, const String& l )
}
-USHORT SwTextBlocks::PutDoc()
+sal_uInt16 SwTextBlocks::PutDoc()
{
- USHORT nIdx = (USHORT)-1;
+ sal_uInt16 nIdx = (sal_uInt16)-1;
if( pImp )
{
nErr = pImp->PutDoc();
if( !nErr )
{
pImp->nCur = GetIndex( pImp->aShort );
- if( pImp->nCur != (USHORT) -1 )
+ if( pImp->nCur != (sal_uInt16) -1 )
pImp->aNames[ pImp->nCur ]->aLong = pImp->aLong;
else
{
@@ -661,19 +661,19 @@ USHORT SwTextBlocks::PutDoc()
return nIdx;
}
-USHORT SwTextBlocks::PutText( const String& rShort, const String& rName,
+sal_uInt16 SwTextBlocks::PutText( const String& rShort, const String& rName,
const String& rTxt )
{
- USHORT nIdx = (USHORT) -1;
+ sal_uInt16 nIdx = (sal_uInt16) -1;
if( pImp )
{
- BOOL bOk = pImp->bInPutMuchBlocks;
+ sal_Bool bOk = pImp->bInPutMuchBlocks;
if( !bOk )
{
if( pImp->IsFileChanged() )
nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
else
- nErr = pImp->OpenFile( FALSE );
+ nErr = pImp->OpenFile( sal_False );
bOk = 0 == nErr;
}
if( bOk )
@@ -681,15 +681,15 @@ USHORT SwTextBlocks::PutText( const String& rShort, const String& rName,
String aNew( rShort );
GetAppCharClass().toUpper( aNew );
nErr = pImp->PutText( aNew, rName, rTxt );
- pImp->nCur = (USHORT) -1;
+ pImp->nCur = (sal_uInt16) -1;
if( !nErr )
{
nIdx = GetIndex( pImp->aShort );
- if( nIdx != (USHORT) -1 )
+ if( nIdx != (sal_uInt16) -1 )
pImp->aNames[ nIdx ]->aLong = rName;
else
{
- pImp->AddName( pImp->aShort, rName, TRUE );
+ pImp->AddName( pImp->aShort, rName, sal_True );
nIdx = pImp->GetIndex( pImp->aShort );
}
if( !pImp->bInPutMuchBlocks )
@@ -718,7 +718,7 @@ void SwTextBlocks::ClearDoc()
{
if( pImp )
pImp->ClearDoc();
- pImp->nCur = (USHORT) -1;
+ pImp->nCur = (sal_uInt16) -1;
}
@@ -728,22 +728,22 @@ const String& SwTextBlocks::GetFileName() const
}
-BOOL SwTextBlocks::IsReadOnly() const
+sal_Bool SwTextBlocks::IsReadOnly() const
{
return pImp->bReadOnly;
}
-BOOL SwTextBlocks::IsOnlyTextBlock( USHORT nIdx ) const
+sal_Bool SwTextBlocks::IsOnlyTextBlock( sal_uInt16 nIdx ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pImp && !pImp->bInPutMuchBlocks )
{
SwBlockName* pBlkNm = pImp->aNames[ nIdx ];
if( !pBlkNm->bIsOnlyTxtFlagInit &&
- !pImp->IsFileChanged() && !pImp->OpenFile( TRUE ) )
+ !pImp->IsFileChanged() && !pImp->OpenFile( sal_True ) )
{
pBlkNm->bIsOnlyTxt = pImp->IsOnlyTextBlock( pBlkNm->aShort );
- pBlkNm->bIsOnlyTxtFlagInit = TRUE;
+ pBlkNm->bIsOnlyTxtFlagInit = sal_True;
pImp->CloseFile();
}
bRet = pBlkNm->bIsOnlyTxt;
@@ -751,9 +751,9 @@ BOOL SwTextBlocks::IsOnlyTextBlock( USHORT nIdx ) const
return bRet;
}
-BOOL SwTextBlocks::IsOnlyTextBlock( const String& rShort ) const
+sal_Bool SwTextBlocks::IsOnlyTextBlock( const String& rShort ) const
{
- USHORT nIdx = pImp->GetIndex( rShort );
+ sal_uInt16 nIdx = pImp->GetIndex( rShort );
if( USHRT_MAX != nIdx )
{
if( pImp->aNames[ nIdx ]->bIsOnlyTxtFlagInit )
@@ -762,38 +762,38 @@ BOOL SwTextBlocks::IsOnlyTextBlock( const String& rShort ) const
}
ASSERT( !this, "ungueltiger Name" );
- return FALSE;
+ return sal_False;
}
-BOOL SwTextBlocks::GetMacroTable( USHORT nIdx, SvxMacroTableDtor& rMacroTbl )
+sal_Bool SwTextBlocks::GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTbl )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( pImp && !pImp->bInPutMuchBlocks )
bRet = ( 0 == pImp->GetMacroTable( nIdx, rMacroTbl ) );
return bRet;
}
-BOOL SwTextBlocks::SetMacroTable( USHORT nIdx,
+sal_Bool SwTextBlocks::SetMacroTable( sal_uInt16 nIdx,
const SvxMacroTableDtor& rMacroTbl )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( pImp && !pImp->bInPutMuchBlocks )
bRet = ( 0 == pImp->SetMacroTable( nIdx, rMacroTbl ) );
return bRet;
}
-BOOL SwTextBlocks::StartPutMuchBlockEntries()
+sal_Bool SwTextBlocks::StartPutMuchBlockEntries()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsOld() && pImp )
- bRet = pImp->PutMuchEntries( TRUE );
+ bRet = pImp->PutMuchEntries( sal_True );
return bRet;
}
void SwTextBlocks::EndPutMuchBlockEntries()
{
if( pImp )
- pImp->PutMuchEntries( FALSE );
+ pImp->PutMuchEntries( sal_False );
}
/*-- 20.09.2004 10:25:33---------------------------------------------------
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index de76b856cda7..d0cda1e923c4 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -91,18 +91,18 @@ the boxes to remove
@param pUndo
the undo object to notify, maybe empty
-@return TRUE for compatibility reasons with OldMerge(..)
+@return sal_True for compatibility reasons with OldMerge(..)
*/
-BOOL SwTable::NewMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
+sal_Bool SwTable::NewMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
const SwSelBoxes& rMerged, SwTableBox*, SwUndoTblMerge* pUndo )
{
if( pUndo )
pUndo->SetSelBoxes( rBoxes );
- DeleteSel( pDoc, rBoxes, &rMerged, 0, TRUE, TRUE );
+ DeleteSel( pDoc, rBoxes, &rMerged, 0, sal_True, sal_True );
CHECK_TABLE( *this )
- return TRUE;
+ return sal_True;
}
/** lcl_CheckMinMax helps evaluating (horizontal) min/max of boxes
@@ -128,7 +128,7 @@ if bSet is true, rMin and rMax will be set to the left and right border of the b
*/
-void lcl_CheckMinMax( long& rMin, long& rMax, const SwTableLine& rLine, USHORT nCheck, bool bSet )
+void lcl_CheckMinMax( long& rMin, long& rMax, const SwTableLine& rLine, sal_uInt16 nCheck, bool bSet )
{
++nCheck;
if( rLine.GetTabBoxes().Count() < nCheck )
@@ -139,7 +139,7 @@ void lcl_CheckMinMax( long& rMin, long& rMax, const SwTableLine& rLine, USHORT n
long nNew = 0; // will be the right border of the current box
long nWidth = 0; // the width of the current box
- for( USHORT nCurrBox = 0; nCurrBox < nCheck; ++nCurrBox )
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCheck; ++nCurrBox )
{
SwTableBox* pBox = rLine.GetTabBoxes()[nCurrBox];
ASSERT( pBox, "Missing table box" );
@@ -172,8 +172,8 @@ long lcl_Box2LeftBorder( const SwTableBox& rBox )
return 0;
long nLeft = 0;
const SwTableLine &rLine = *rBox.GetUpper();
- USHORT nCount = rLine.GetTabBoxes().Count();
- for( USHORT nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
+ sal_uInt16 nCount = rLine.GetTabBoxes().Count();
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = rLine.GetTabBoxes()[nCurrBox];
ASSERT( pBox, "Missing table box" );
@@ -206,8 +206,8 @@ SwTableBox* lcl_LeftBorder2Box( long nLeft, const SwTableLine* pLine )
if( !pLine )
return 0;
long nCurrLeft = 0;
- USHORT nCount = pLine->GetTabBoxes().Count();
- for( USHORT nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
+ sal_uInt16 nCount = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
ASSERT( pBox, "Missing table box" );
@@ -252,7 +252,7 @@ false is also needed for deleted rows
*/
void lcl_ChangeRowSpan( const SwTable& rTable, const long nDiff,
- USHORT nRowIdx, const bool bSingle )
+ sal_uInt16 nRowIdx, const bool bSingle )
{
if( !nDiff || nRowIdx >= rTable.GetTabLines().Count() )
return;
@@ -270,8 +270,8 @@ void lcl_ChangeRowSpan( const SwTable& rTable, const long nDiff,
bGoOn = false; // will be set to true if we found a non-master cell
// which has to be manipulated => we have to chekc the previous row, too.
const SwTableLine* pLine = rTable.GetTabLines()[ nRowIdx ];
- USHORT nBoxCount = pLine->GetTabBoxes().Count();
- for( USHORT nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
+ sal_uInt16 nBoxCount = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
{
long nRowSpan = pLine->GetTabBoxes()[nCurrBox]->getRowSpan();
long nAbsSpan = nRowSpan > 0 ? nRowSpan : -nRowSpan;
@@ -333,16 +333,16 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
if( !pStartNd || !pEndNd || pStartNd == pEndNd )
return 0;
- USHORT nLines = aLines.Count();
- USHORT nTop = 0, nBottom = 0;
+ sal_uInt16 nLines = aLines.Count();
+ sal_uInt16 nTop = 0, nBottom = 0;
long nMin = 0, nMax = 0;
int nFound = 0;
- for( USHORT nRow = 0; nFound < 2 && nRow < nLines; ++nRow )
+ for( sal_uInt16 nRow = 0; nFound < 2 && nRow < nLines; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
ASSERT( pLine, "Missing table line" );
- USHORT nCols = pLine->GetTabBoxes().Count();
- for( USHORT nCol = 0; nCol < nCols; ++nCol )
+ sal_uInt16 nCols = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCol];
ASSERT( pBox, "Missing table box" );
@@ -372,12 +372,12 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
SwBoxSelection* pRet = new SwBoxSelection();
std::list< std::pair< SwTableBox*, long > > aNewWidthList;
- USHORT nCheckBottom = nBottom;
+ sal_uInt16 nCheckBottom = nBottom;
long nLeftSpan = 0;
long nRightSpan = 0;
long nLeftSpanCnt = 0;
long nRightSpanCnt = 0;
- for( USHORT nRow = nTop; nRow <= nBottom && bOkay; ++nRow )
+ for( sal_uInt16 nRow = nTop; nRow <= nBottom && bOkay; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
ASSERT( pLine, "Missing table line" );
@@ -385,8 +385,8 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
long nLeft = 0;
long nRight = 0;
long nRowSpan = 1;
- USHORT nCount = pLine->GetTabBoxes().Count();
- for( USHORT nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
+ sal_uInt16 nCount = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
ASSERT( pBox, "Missing table box" );
@@ -448,9 +448,9 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
break;
}
if( nRowSpan > 1 && nRow + nRowSpan - 1 > nBottom )
- nBottom = nRow + (USHORT)nRowSpan - 1;
+ nBottom = nRow + (sal_uInt16)nRowSpan - 1;
if( nRowSpan < -1 && nRow - nRowSpan - 1 > nBottom )
- nBottom = (USHORT)(nRow - nRowSpan - 1);
+ nBottom = (sal_uInt16)(nRow - nRowSpan - 1);
if( nRightSpanCnt && nRight == nMax )
bOkay = false;
}
@@ -485,9 +485,9 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
{
long nTmpSpan = pInnerBox->getRowSpan();
if( nTmpSpan > 1 )
- nBottom += (USHORT)nTmpSpan - 1;
+ nBottom += (sal_uInt16)nTmpSpan - 1;
else if( nTmpSpan < -1 )
- nBottom = (USHORT)( nBottom - nTmpSpan - 1 );
+ nBottom = (sal_uInt16)( nBottom - nTmpSpan - 1 );
}
SwTableBox* pOuterBox = pLeftBox;
do
@@ -497,7 +497,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
long nOutSpan = pOuterBox->getRowSpan();
if( nOutSpan != 1 )
{
- USHORT nCheck = nRow;
+ sal_uInt16 nCheck = nRow;
if( nOutSpan < 0 )
{
const SwTableBox& rBox =
@@ -535,7 +535,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
nRightSpanCnt = nOutSpan;
}
}
- nCheck += (USHORT)nOutSpan - 1;
+ nCheck += (sal_uInt16)nOutSpan - 1;
if( nCheck > nCheckBottom )
nCheckBottom = nCheck;
}
@@ -610,19 +610,19 @@ void lcl_InvalidateCellFrm( const SwTableBox& rBox )
when a selection of cells is given and returns the average cell widths
*/
-long lcl_InsertPosition( SwTable &rTable, std::vector<USHORT>& rInsPos,
- const SwSelBoxes& rBoxes, BOOL bBehind )
+long lcl_InsertPosition( SwTable &rTable, std::vector<sal_uInt16>& rInsPos,
+ const SwSelBoxes& rBoxes, sal_Bool bBehind )
{
sal_Int32 nAddWidth = 0;
long nCount = 0;
- for( USHORT j = 0; j < rBoxes.Count(); ++j )
+ for( sal_uInt16 j = 0; j < rBoxes.Count(); ++j )
{
SwTableBox *pBox = rBoxes[j];
SwTableLine* pLine = pBox->GetUpper();
long nWidth = rBoxes[j]->GetFrmFmt()->GetFrmSize().GetWidth();
nAddWidth += nWidth;
- USHORT nCurrBox = pLine->GetTabBoxes().C40_GETPOS(SwTableBox, pBox );
- USHORT nCurrLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pLine );
+ sal_uInt16 nCurrBox = pLine->GetTabBoxes().C40_GETPOS(SwTableBox, pBox );
+ sal_uInt16 nCurrLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pLine );
ASSERT( nCurrLine != USHRT_MAX, "Time to say Good-Bye.." );
if( rInsPos[ nCurrLine ] == USHRT_MAX )
{
@@ -656,18 +656,18 @@ insertion behind (true) or before (false) the selected boxes
*/
-BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
- USHORT nCnt, BOOL bBehind )
+sal_Bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt, sal_Bool bBehind )
{
if( !aLines.Count() || !nCnt )
- return FALSE;
+ return sal_False;
CHECK_TABLE( *this )
long nNewBoxWidth = 0;
- std::vector< USHORT > aInsPos( aLines.Count(), USHRT_MAX );
+ std::vector< sal_uInt16 > aInsPos( aLines.Count(), USHRT_MAX );
{ // Calculation of the insert positions and the width of the new boxes
sal_uInt64 nTableWidth = 0;
- for( USHORT i = 0; i < aLines[0]->GetTabBoxes().Count(); ++i )
+ for( sal_uInt16 i = 0; i < aLines[0]->GetTabBoxes().Count(); ++i )
nTableWidth += aLines[0]->GetTabBoxes()[i]->GetFrmFmt()->GetFrmSize().GetWidth();
// Fill the vector of insert positions and the (average) width to insert
@@ -682,12 +682,12 @@ BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
nAddWidth *= nCnt; // we have to insert nCnt boxes per line
sal_uInt64 nResultingWidth = nAddWidth + nTableWidth;
if( !nResultingWidth )
- return FALSE;
+ return sal_False;
nAddWidth = (nAddWidth * nTableWidth) / nResultingWidth;
nNewBoxWidth = long( nAddWidth / nCnt ); // Rounding
nAddWidth = nNewBoxWidth * nCnt; // Rounding
if( !nAddWidth || nAddWidth >= nTableWidth )
- return FALSE;
+ return sal_False;
AdjustWidths( static_cast< long >(nTableWidth), static_cast< long >(nTableWidth - nAddWidth) );
}
@@ -698,13 +698,13 @@ BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
SwTableNode* pTblNd = GetTableNode();
std::vector<SwTableBoxFmt*> aInsFormat( nCnt, 0 );
- USHORT nLastLine = USHRT_MAX;
+ sal_uInt16 nLastLine = USHRT_MAX;
long nLastRowSpan = 1;
- for( USHORT i = 0; i < aLines.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aLines.Count(); ++i )
{
SwTableLine* pLine = aLines[ i ];
- USHORT nInsPos = aInsPos[i];
+ sal_uInt16 nInsPos = aInsPos[i];
ASSERT( nInsPos != USHRT_MAX, "Didn't found insert position" );
SwTableBox* pBox = pLine->GetTabBoxes()[ nInsPos ];
if( bBehind )
@@ -721,10 +721,10 @@ BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
while( nLastLine < i )
{
SwTableLine* pTmpLine = aLines[ nLastLine ];
- USHORT nTmpPos = aInsPos[nLastLine];
+ sal_uInt16 nTmpPos = aInsPos[nLastLine];
if( bBehind )
++nTmpPos;
- for( USHORT j = 0; j < nCnt; ++j )
+ for( sal_uInt16 j = 0; j < nCnt; ++j )
pTmpLine->GetTabBoxes()[nTmpPos+j]->setRowSpan( nDiff );
if( nDiff > 0 )
nDiff = -nDiff;
@@ -749,7 +749,7 @@ BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pNoRightBorder = new SvxBoxItem( aSelBoxItem );
pNoRightBorder->SetLine( 0, BOX_LINE_RIGHT );
}
- for( USHORT j = 0; j < nCnt; ++j )
+ for( sal_uInt16 j = 0; j < nCnt; ++j )
{
SwTableBox *pCurrBox = pLine->GetTabBoxes()[nInsPos+j];
if( bNewSpan )
@@ -780,14 +780,14 @@ BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
{
const SwTableBoxes &rTabBoxes = aLines[0]->GetTabBoxes();
long nNewWidth = 0;
- for( USHORT i = 0; i < rTabBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rTabBoxes.Count(); ++i )
nNewWidth += rTabBoxes[i]->GetFrmFmt()->GetFrmSize().GetWidth();
ASSERT( nNewWidth > 0, "Very small" );
}
#endif
CHECK_TABLE( *this )
- return TRUE;
+ return sal_True;
}
/** SwTable::PrepareMerge(..) some preparation for the coming Merge(..)
@@ -847,7 +847,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwPosition aInsPos( *pMergeBox->GetSttNd()->EndOfSectionNode() );
SwPaM aChkPam( aInsPos );
// The number of lines in the selection rectangle: nLineCount
- const USHORT nLineCount = USHORT(pSel->aBoxes.size());
+ const sal_uInt16 nLineCount = sal_uInt16(pSel->aBoxes.size());
// BTW: nLineCount is the rowspan of the new master cell
long nRowSpan = nLineCount;
// We will need the first and last line of the selection
@@ -855,13 +855,13 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwTableLine* pFirstLn = 0;
SwTableLine* pLastLn = 0;
// Iteration over the lines of the selection...
- for( USHORT nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
+ for( sal_uInt16 nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
{
// The selected boxes in the current line
const SwSelBoxes* pBoxes = pSel->aBoxes[ nCurrLine ];
- USHORT nColCount = pBoxes->Count();
+ sal_uInt16 nColCount = pBoxes->Count();
// Iteration over the selected cell in the current row
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = (*pBoxes)[nCurrCol];
rMerged.Insert( pBox );
@@ -894,14 +894,14 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwPaM aPam( aInsPos );
aPam.GetPoint()->nNode.Assign( *pBox->GetSttNd()->EndOfSectionNode(), -1 );
SwCntntNode* pCNd = aPam.GetCntntNode();
- USHORT nL = pCNd ? pCNd->Len() : 0;
+ sal_uInt16 nL = pCNd ? pCNd->Len() : 0;
aPam.GetPoint()->nContent.Assign( pCNd, nL );
SwNodeIndex aSttNdIdx( *pBox->GetSttNd(), 1 );
if( pUndo )
- pDoc->DoUndo( FALSE );
+ pDoc->DoUndo( sal_False );
pDoc->AppendTxtNode( *aPam.GetPoint() );
if( pUndo )
- pDoc->DoUndo( TRUE );
+ pDoc->DoUndo( sal_True );
SwNodeRange aRg( aSttNdIdx, aPam.GetPoint()->nNode );
if( pUndo )
pUndo->MoveBoxCntnt( pDoc, aRg, rInsPosNd );
@@ -929,11 +929,11 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
// pNewFmt will be set to the new master box and the overlapped cells
SwFrmFmt* pNewFmt = pMergeBox->ClaimFrmFmt();
pNewFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, pSel->mnMergeWidth, 0 ) );
- for( USHORT nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
+ for( sal_uInt16 nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
{
const SwSelBoxes* pBoxes = pSel->aBoxes[ nCurrLine ];
- USHORT nColCount = pBoxes->Count();
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ sal_uInt16 nColCount = pBoxes->Count();
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = (*pBoxes)[nCurrCol];
if( nCurrCol )
@@ -979,15 +979,15 @@ void SwTable::_FindSuperfluousRows( SwSelBoxes& rBoxes,
pFirstLn = rBoxes[0]->GetUpper();
pLastLn = rBoxes[ rBoxes.Count() - 1 ]->GetUpper();
}
- USHORT nFirstLn = GetTabLines().C40_GETPOS(SwTableLine, pFirstLn );
- USHORT nLastLn = GetTabLines().C40_GETPOS(SwTableLine, pLastLn );
- for( USHORT nRow = nFirstLn; nRow <= nLastLn; ++nRow )
+ sal_uInt16 nFirstLn = GetTabLines().C40_GETPOS(SwTableLine, pFirstLn );
+ sal_uInt16 nLastLn = GetTabLines().C40_GETPOS(SwTableLine, pLastLn );
+ for( sal_uInt16 nRow = nFirstLn; nRow <= nLastLn; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
ASSERT( pLine, "Missing table line" );
- USHORT nCols = pLine->GetTabBoxes().Count();
+ sal_uInt16 nCols = pLine->GetTabBoxes().Count();
bool bSuperfl = true;
- for( USHORT nCol = 0; nCol < nCols; ++nCol )
+ for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
{
SwTableBox *pBox = pLine->GetTabBoxes()[nCol];
if( pBox->getRowSpan() > 0 &&
@@ -999,7 +999,7 @@ void SwTable::_FindSuperfluousRows( SwSelBoxes& rBoxes,
}
if( bSuperfl )
{
- for( USHORT nCol = 0; nCol < nCols; ++nCol )
+ for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCol];
rBoxes.Insert( pBox );
@@ -1012,7 +1012,7 @@ void SwTable::_FindSuperfluousRows( SwSelBoxes& rBoxes,
overlaps the given cell, it maybe the cell itself.
*/
-SwTableBox& SwTableBox::FindStartOfRowSpan( const SwTable& rTable, USHORT nMaxStep )
+SwTableBox& SwTableBox::FindStartOfRowSpan( const SwTable& rTable, sal_uInt16 nMaxStep )
{
if( getRowSpan() > 0 || !nMaxStep )
return *this;
@@ -1020,7 +1020,7 @@ SwTableBox& SwTableBox::FindStartOfRowSpan( const SwTable& rTable, USHORT nMaxSt
long nLeftBorder = lcl_Box2LeftBorder( *this );
SwTableBox* pBox = this;
const SwTableLine* pMyUpper = GetUpper();
- USHORT nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper );
+ sal_uInt16 nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper );
if( nLine && nLine < rTable.GetTabLines().Count() )
{
SwTableBox* pNext;
@@ -1039,7 +1039,7 @@ SwTableBox& SwTableBox::FindStartOfRowSpan( const SwTable& rTable, USHORT nMaxSt
any. Otherwise the cell itself will returned.
*/
-SwTableBox& SwTableBox::FindEndOfRowSpan( const SwTable& rTable, USHORT nMaxStep )
+SwTableBox& SwTableBox::FindEndOfRowSpan( const SwTable& rTable, sal_uInt16 nMaxStep )
{
long nAbsSpan = getRowSpan();
if( nAbsSpan < 0 )
@@ -1048,9 +1048,9 @@ SwTableBox& SwTableBox::FindEndOfRowSpan( const SwTable& rTable, USHORT nMaxStep
return *this;
if( nMaxStep > --nAbsSpan )
- nMaxStep = (USHORT)nAbsSpan;
+ nMaxStep = (sal_uInt16)nAbsSpan;
const SwTableLine* pMyUpper = GetUpper();
- USHORT nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper );
+ sal_uInt16 nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper );
nMaxStep = nLine + nMaxStep;
if( nMaxStep >= rTable.GetTabLines().Count() )
nMaxStep = rTable.GetTabLines().Count() - 1;
@@ -1074,9 +1074,9 @@ void lcl_getAllMergedBoxes( const SwTable& rTable, SwSelBoxes& rBoxes, SwTableBo
if( pBox->getRowSpan() == 1 )
return;
const SwTableLine* pMyUpper = pBox->GetUpper();
- USHORT nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper );
+ sal_uInt16 nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper );
long nLeftBorder = lcl_Box2LeftBorder( *pBox );
- USHORT nCount = rTable.GetTabLines().Count();
+ sal_uInt16 nCount = rTable.GetTabLines().Count();
while( ++nLine < nCount && pBox && pBox->getRowSpan() != -1 )
{
pBox = lcl_LeftBorder2Box( nLeftBorder, rTable.GetTabLines()[nLine] );
@@ -1089,22 +1089,22 @@ void lcl_getAllMergedBoxes( const SwTable& rTable, SwSelBoxes& rBoxes, SwTableBo
and its overlapped cells to split them into several pieces.
*/
-void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, USHORT nCnt,
- BOOL bSameHeight )
+void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, sal_uInt16 nCnt,
+ sal_Bool bSameHeight )
{
SwSelBoxes aBoxes;
lcl_getAllMergedBoxes( rTable, aBoxes, rBox );
- USHORT nCount = aBoxes.Count();
+ sal_uInt16 nCount = aBoxes.Count();
if( nCount < 2 )
return;
if( nCnt > nCount )
nCnt = nCount;
- USHORT *pSplitIdx = new USHORT[ nCnt ];
+ sal_uInt16 *pSplitIdx = new sal_uInt16[ nCnt ];
if( bSameHeight )
{
SwTwips *pHeights = new SwTwips[ nCount ];
SwTwips nHeight = 0;
- for( USHORT i = 0; i < nCount; ++i )
+ for( sal_uInt16 i = 0; i < nCount; ++i )
{
SwTableLine* pLine = aBoxes[ i ]->GetUpper();
SwFrmFmt *pRowFmt = pLine->GetFrmFmt();
@@ -1112,8 +1112,8 @@ void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, USHORT nCnt,
nHeight += pHeights[ i ];
}
SwTwips nSumH = 0;
- USHORT nIdx = 0;
- for( USHORT i = 1; i <= nCnt; ++i )
+ sal_uInt16 nIdx = 0;
+ for( sal_uInt16 i = 1; i <= nCnt; ++i )
{
SwTwips nSplit = ( i * nHeight ) / nCnt;
while( nSumH < nSplit && nIdx < nCount )
@@ -1125,12 +1125,12 @@ void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, USHORT nCnt,
else
{
for( long i = 1; i <= nCnt; ++i )
- pSplitIdx[ i - 1 ] = (USHORT)( ( i * nCount ) / nCnt );
+ pSplitIdx[ i - 1 ] = (sal_uInt16)( ( i * nCount ) / nCnt );
}
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
for( long i = 0; i < nCnt; ++i )
{
- USHORT nNextIdx = pSplitIdx[ i ];
+ sal_uInt16 nNextIdx = pSplitIdx[ i ];
aBoxes[ nIdx ]->setRowSpan( nNextIdx - nIdx );
lcl_InvalidateCellFrm( *aBoxes[ nIdx ] );
while( ++nIdx < nNextIdx )
@@ -1144,8 +1144,8 @@ void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, USHORT nCnt,
void lcl_FillSelBoxes( SwSelBoxes &rBoxes, SwTableLine &rLine )
{
- USHORT nBoxCount = rLine.GetTabBoxes().Count();
- USHORT nCurrBox;
+ sal_uInt16 nBoxCount = rLine.GetTabBoxes().Count();
+ sal_uInt16 nCurrBox;
for( nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
rBoxes.Insert( rLine.GetTabBoxes()[nCurrBox] );
}
@@ -1154,7 +1154,7 @@ void lcl_FillSelBoxes( SwSelBoxes &rBoxes, SwTableLine &rLine )
overlapped cells only. This is a preparation for an upcoming split.
*/
-void SwTable::InsertSpannedRow( SwDoc* pDoc, USHORT nRowIdx, USHORT nCnt )
+void SwTable::InsertSpannedRow( SwDoc* pDoc, sal_uInt16 nRowIdx, sal_uInt16 nCnt )
{
CHECK_TABLE( *this )
ASSERT( nCnt && nRowIdx < GetTabLines().Count(), "Wrong call of InsertSpannedRow" );
@@ -1171,12 +1171,12 @@ void SwTable::InsertSpannedRow( SwDoc* pDoc, USHORT nRowIdx, USHORT nCnt )
aFSz.SetHeight( nNewHeight );
pFrmFmt->SetFmtAttr( aFSz );
}
- _InsertRow( pDoc, aBoxes, nCnt, TRUE );
- USHORT nBoxCount = rLine.GetTabBoxes().Count();
- for( USHORT n = 0; n < nCnt; ++n )
+ _InsertRow( pDoc, aBoxes, nCnt, sal_True );
+ sal_uInt16 nBoxCount = rLine.GetTabBoxes().Count();
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
SwTableLine *pNewLine = GetTabLines()[ nRowIdx + nCnt - n ];
- for( USHORT nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
{
long nRowSpan = rLine.GetTabBoxes()[nCurrBox]->getRowSpan();
if( nRowSpan > 0 )
@@ -1188,7 +1188,7 @@ void SwTable::InsertSpannedRow( SwDoc* pDoc, USHORT nRowIdx, USHORT nCnt )
CHECK_TABLE( *this )
}
-typedef std::pair< USHORT, USHORT > SwLineOffset;
+typedef std::pair< sal_uInt16, sal_uInt16 > SwLineOffset;
typedef std::list< SwLineOffset > SwLineOffsetArray;
/******************************************************************************
@@ -1205,24 +1205,24 @@ Output
******************************************************************************/
void lcl_SophisticatedFillLineIndices( SwLineOffsetArray &rArr,
- const SwTable& rTable, const SwSelBoxes& rBoxes, USHORT nCnt )
+ const SwTable& rTable, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
{
std::list< SwLineOffset > aBoxes;
SwLineOffset aLnOfs( USHRT_MAX, USHRT_MAX );
- for( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{ // Collect all end line indices and the row spans
const SwTableBox &rBox = rBoxes[ i ]->FindStartOfRowSpan( rTable );
ASSERT( rBox.getRowSpan() > 0, "Didn't I say 'StartOfRowSpan' ??" )
if( nCnt > rBox.getRowSpan() )
{
const SwTableLine *pLine = rBox.GetUpper();
- const USHORT nEnd = USHORT( rBox.getRowSpan() +
+ const sal_uInt16 nEnd = sal_uInt16( rBox.getRowSpan() +
rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine ) );
// The next if statement is a small optimization
if( aLnOfs.first != nEnd || aLnOfs.second != rBox.getRowSpan() )
{
aLnOfs.first = nEnd; // ok, this is the line behind the box
- aLnOfs.second = USHORT( rBox.getRowSpan() ); // the row span
+ aLnOfs.second = sal_uInt16( rBox.getRowSpan() ); // the row span
aBoxes.insert( aBoxes.end(), aLnOfs );
}
}
@@ -1230,7 +1230,7 @@ void lcl_SophisticatedFillLineIndices( SwLineOffsetArray &rArr,
// As I said, I noted the line index _behind_ the last line of the boxes
// in the resulting array the index has to be _on_ the line
// nSum is to evaluate the wished value
- USHORT nSum = 1;
+ sal_uInt16 nSum = 1;
while( aBoxes.size() )
{
// I. step:
@@ -1299,22 +1299,22 @@ typedef std::set< SwTwips > SwSplitLines;
to be splitted to fulfill the requested "split same height"
*/
-USHORT lcl_CalculateSplitLineHeights( SwSplitLines &rCurr, SwSplitLines &rNew,
- const SwTable& rTable, const SwSelBoxes& rBoxes, USHORT nCnt )
+sal_uInt16 lcl_CalculateSplitLineHeights( SwSplitLines &rCurr, SwSplitLines &rNew,
+ const SwTable& rTable, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
{
if( nCnt < 2 )
return 0;
std::list< SwLineOffset > aBoxes;
SwLineOffset aLnOfs( USHRT_MAX, USHRT_MAX );
- USHORT nFirst = USHRT_MAX; // becomes the index of the first line
- USHORT nLast = 0; // becomes the index of the last line of the splitting
- for( USHORT i = 0; i < rBoxes.Count(); ++i )
+ sal_uInt16 nFirst = USHRT_MAX; // becomes the index of the first line
+ sal_uInt16 nLast = 0; // becomes the index of the last line of the splitting
+ for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{ // Collect all pairs (start+end) of line indices to split
const SwTableBox &rBox = rBoxes[ i ]->FindStartOfRowSpan( rTable );
ASSERT( rBox.getRowSpan() > 0, "Didn't I say 'StartOfRowSpan' ??" )
const SwTableLine *pLine = rBox.GetUpper();
- const USHORT nStart = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine );
- const USHORT nEnd = USHORT( rBox.getRowSpan() + nStart - 1 );
+ const sal_uInt16 nStart = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine );
+ const sal_uInt16 nEnd = sal_uInt16( rBox.getRowSpan() + nStart - 1 );
// The next if statement is a small optimization
if( aLnOfs.first != nStart || aLnOfs.second != nEnd )
{
@@ -1332,7 +1332,7 @@ USHORT lcl_CalculateSplitLineHeights( SwSplitLines &rCurr, SwSplitLines &rNew,
return 0;
SwTwips nHeight = 0;
SwTwips* pLines = new SwTwips[ nLast + 1 - nFirst ];
- for( USHORT i = nFirst; i <= nLast; ++i )
+ for( sal_uInt16 i = nFirst; i <= nLast; ++i )
{
bool bLayoutAvailable = false;
nHeight += rTable.GetTabLines()[ i ]->GetTableLineHeight( bLayoutAvailable );
@@ -1345,7 +1345,7 @@ USHORT lcl_CalculateSplitLineHeights( SwSplitLines &rCurr, SwSplitLines &rNew,
SwTwips nBase = pSplit->first <= nFirst ? 0 :
pLines[ pSplit->first - nFirst - 1 ];
SwTwips nDiff = pLines[ pSplit->second - nFirst ] - nBase;
- for( USHORT i = 1; i < nCnt; ++i )
+ for( sal_uInt16 i = 1; i < nCnt; ++i )
{
SwTwips nSplit = nBase + ( i * nDiff ) / nCnt;
rNew.insert( nSplit );
@@ -1360,16 +1360,16 @@ USHORT lcl_CalculateSplitLineHeights( SwSplitLines &rCurr, SwSplitLines &rNew,
the box selection.
*/
-USHORT lcl_LineIndex( const SwTable& rTable, const SwSelBoxes& rBoxes,
+sal_uInt16 lcl_LineIndex( const SwTable& rTable, const SwSelBoxes& rBoxes,
bool bBehind )
{
- USHORT nDirect = USHRT_MAX;
- USHORT nSpan = USHRT_MAX;
- for( USHORT i = 0; i < rBoxes.Count(); ++i )
+ sal_uInt16 nDirect = USHRT_MAX;
+ sal_uInt16 nSpan = USHRT_MAX;
+ for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
SwTableBox *pBox = rBoxes[i];
const SwTableLine* pLine = rBoxes[i]->GetUpper();
- USHORT nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine );
+ sal_uInt16 nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine );
if( USHRT_MAX != nPos )
{
if( bBehind )
@@ -1381,7 +1381,7 @@ USHORT lcl_LineIndex( const SwTable& rTable, const SwSelBoxes& rBoxes,
nSpan = 0;
else if( nSpan )
{
- USHORT nEndOfRowSpan = (USHORT)(nPos + nRowSpan - 1);
+ sal_uInt16 nEndOfRowSpan = (sal_uInt16)(nPos + nRowSpan - 1);
if( nEndOfRowSpan > nSpan || nSpan == USHRT_MAX )
nSpan = nEndOfRowSpan;
}
@@ -1398,8 +1398,8 @@ USHORT lcl_LineIndex( const SwTable& rTable, const SwSelBoxes& rBoxes,
/** SwTable::NewSplitRow(..) splits all selected boxes horizontally.
*/
-BOOL SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
- BOOL bSameHeight )
+sal_Bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt,
+ sal_Bool bSameHeight )
{
CHECK_TABLE( *this )
++nCnt;
@@ -1410,7 +1410,7 @@ BOOL SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
{
SwSplitLines aRowLines;
SwSplitLines aSplitLines;
- USHORT nFirst = lcl_CalculateSplitLineHeights( aRowLines, aSplitLines,
+ sal_uInt16 nFirst = lcl_CalculateSplitLineHeights( aRowLines, aSplitLines,
*this, rBoxes, nCnt );
aFndBox.DelFrms( *this );
SwTwips nLast = 0;
@@ -1447,7 +1447,7 @@ BOOL SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
else
{
aFndBox.DelFrms( *this );
- bSameHeight = FALSE;
+ bSameHeight = sal_False;
}
if( !bSameHeight )
{
@@ -1461,15 +1461,15 @@ BOOL SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
}
}
- std::set< USHORT> aIndices;
- for( USHORT i = 0; i < rBoxes.Count(); ++i )
+ std::set< sal_uInt16> aIndices;
+ for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
ASSERT( rBoxes[i]->getRowSpan() != 1, "Forgot to split?" )
if( rBoxes[i]->getRowSpan() > 1 )
aIndices.insert( i );
}
- std::set< USHORT >::iterator pCurrBox = aIndices.begin();
+ std::set< sal_uInt16 >::iterator pCurrBox = aIndices.begin();
while( pCurrBox != aIndices.end() )
lcl_UnMerge( *this, *rBoxes[*pCurrBox++], nCnt, bSameHeight );
@@ -1477,21 +1477,21 @@ BOOL SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
//Layout updaten
aFndBox.MakeFrms( *this );
- return TRUE;
+ return sal_True;
}
/** SwTable::InsertRow(..) inserts one or more rows before or behind the selected
boxes.
*/
-BOOL SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
- USHORT nCnt, BOOL bBehind )
+sal_Bool SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt, sal_Bool bBehind )
{
bool bRet = false;
if( IsNewModel() )
{
CHECK_TABLE( *this )
- USHORT nRowIdx = lcl_LineIndex( *this, rBoxes, bBehind );
+ sal_uInt16 nRowIdx = lcl_LineIndex( *this, rBoxes, bBehind );
if( nRowIdx < USHRT_MAX )
{
_FndBox aFndBox( 0, 0 );
@@ -1504,12 +1504,12 @@ BOOL SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
SwSelBoxes aLineBoxes;
lcl_FillSelBoxes( aLineBoxes, *pLine );
_InsertRow( pDoc, aLineBoxes, nCnt, bBehind );
- USHORT nBoxCount = pLine->GetTabBoxes().Count();
- USHORT nOfs = bBehind ? 0 : 1;
- for( USHORT n = 0; n < nCnt; ++n )
+ sal_uInt16 nBoxCount = pLine->GetTabBoxes().Count();
+ sal_uInt16 nOfs = bBehind ? 0 : 1;
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
SwTableLine *pNewLine = GetTabLines()[ nRowIdx+nCnt-n-nOfs];
- for( USHORT nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
{
long nRowSpan = pLine->GetTabBoxes()[nCurrBox]->getRowSpan();
if( bBehind )
@@ -1552,7 +1552,7 @@ void SwTable::PrepareDelBoxes( const SwSelBoxes& rBoxes )
{
if( IsNewModel() )
{
- for( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
SwTableBox* pBox = rBoxes[i];
long nRowSpan = pBox->getRowSpan();
@@ -1560,7 +1560,7 @@ void SwTable::PrepareDelBoxes( const SwSelBoxes& rBoxes )
{
long nLeft = lcl_Box2LeftBorder( *pBox );
SwTableLine *pLine = pBox->GetUpper();
- USHORT nLinePos = GetTabLines().C40_GETPOS(SwTableLine, pLine);
+ sal_uInt16 nLinePos = GetTabLines().C40_GETPOS(SwTableLine, pLine);
ASSERT( nLinePos < USHRT_MAX, "Box/table mismatch" )
if( nRowSpan > 1 )
{
@@ -1612,8 +1612,8 @@ void lcl_SearchSelBox( const SwTable &rTable, SwSelBoxes& rBoxes, long nMin, lon
long nLeft = 0;
long nRight = 0;
long nMid = ( nMax + nMin )/ 2;
- USHORT nCount = rLine.GetTabBoxes().Count();
- for( USHORT nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
+ sal_uInt16 nCount = rLine.GetTabBoxes().Count();
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = rLine.GetTabBoxes()[nCurrBox];
ASSERT( pBox, "Missing table box" );
@@ -1633,7 +1633,7 @@ void lcl_SearchSelBox( const SwTable &rTable, SwSelBoxes& rBoxes, long nMin, lon
( !bChkProtected ||
!pBox->GetFrmFmt()->GetProtect().IsCntntProtected() ) )
{
- USHORT nOldCnt = rBoxes.Count();
+ sal_uInt16 nOldCnt = rBoxes.Count();
rBoxes.Insert( pBox );
if( bColumn && nRowSpan != 1 && nOldCnt < rBoxes.Count() )
{
@@ -1676,13 +1676,13 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
if( rBoxes.Count() )
{
// aKeepBoxes.Insert( &rBoxes );
- rBoxes.Remove( USHORT(0), rBoxes.Count() );
+ rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
}
// Looking for start and end of the selection given by SwNode-pointer
- USHORT nLines = aLines.Count();
+ sal_uInt16 nLines = aLines.Count();
// nTop becomes the line number of the upper box
// nBottom becomes the line number of the lower box
- USHORT nTop = 0, nBottom = 0;
+ sal_uInt16 nTop = 0, nBottom = 0;
// nUpperMin becomes the left border value of the upper box
// nUpperMax becomes the right border of the upper box
// nLowerMin and nLowerMax the borders of the lower box
@@ -1691,12 +1691,12 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
// nFound will incremented if a box is found
// 0 => no box found; 1 => the upper box has been found; 2 => both found
int nFound = 0;
- for( USHORT nRow = 0; nFound < 2 && nRow < nLines; ++nRow )
+ for( sal_uInt16 nRow = 0; nFound < 2 && nRow < nLines; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
ASSERT( pLine, "Missing table line" );
- USHORT nCols = pLine->GetTabBoxes().Count();
- for( USHORT nCol = 0; nCol < nCols; ++nCol )
+ sal_uInt16 nCols = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCol];
ASSERT( pBox, "Missing table box" );
@@ -1736,12 +1736,12 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
// Selection of a row is quiet easy:
// every (unprotected) box between start and end line
// with a positive row span will be collected
- for( USHORT nRow = nTop; nRow <= nBottom; ++nRow )
+ for( sal_uInt16 nRow = nTop; nRow <= nBottom; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
ASSERT( pLine, "Missing table line" );
- USHORT nCount = pLine->GetTabBoxes().Count();
- for( USHORT nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
+ sal_uInt16 nCount = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
ASSERT( pBox, "Missing table box" );
@@ -1780,7 +1780,7 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
const bool bColumn = eSearch == SEARCH_COL;
if( bColumn )
{
- for( USHORT i = 0; i < nTop; ++i )
+ for( sal_uInt16 i = 0; i < nTop; ++i )
lcl_SearchSelBox( *this, rBoxes, nUpperMin, nUpperMax,
*aLines[i], bChkProtected, bColumn );
}
@@ -1788,7 +1788,7 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
{
long nMin = nUpperMin < nLowerMin ? nUpperMin : nLowerMin;
long nMax = nUpperMax < nLowerMax ? nLowerMax : nUpperMax;
- for( USHORT i = nTop; i <= nBottom; ++i )
+ for( sal_uInt16 i = nTop; i <= nBottom; ++i )
lcl_SearchSelBox( *this, rBoxes, nMin, nMax, *aLines[i],
bChkProtected, bColumn );
}
@@ -1796,7 +1796,7 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
{
long nInnerMin = nUpperMin < nLowerMin ? nLowerMin : nUpperMin;
long nInnerMax = nUpperMax < nLowerMax ? nUpperMax : nLowerMax;
- for( USHORT i = nTop + 1; i < nBottom; ++i )
+ for( sal_uInt16 i = nTop + 1; i < nBottom; ++i )
lcl_SearchSelBox( *this, rBoxes, nInnerMin, nInnerMax, *aLines[i],
bChkProtected, bColumn );
}
@@ -1813,10 +1813,10 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
long nMin = nUpperMin < nLowerMin ? nUpperMin : nLowerMin;
long nMax = nUpperMax < nLowerMax ? nLowerMax : nUpperMax;
SwSelBoxes aCandidates;
- for( USHORT i = nTop; i <= nBottom; ++i )
+ for( sal_uInt16 i = nTop; i <= nBottom; ++i )
lcl_SearchSelBox( *this, aCandidates, nMin, nMax, *aLines[i],
bChkProtected, bColumn );
- USHORT nOld = 0, nNew = 0;
+ sal_uInt16 nOld = 0, nNew = 0;
while ( nOld < aKeepBoxes.Count() && nNew < aCandidates.Count() )
{
const SwTableBox* pPOld = *( aKeepBoxes.GetData() + nOld );
@@ -1835,7 +1835,7 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
} */
if( bColumn )
{
- for( USHORT i = nBottom + 1; i < nLines; ++i )
+ for( sal_uInt16 i = nBottom + 1; i < nLines; ++i )
lcl_SearchSelBox( *this, rBoxes, nLowerMin, nLowerMax, *aLines[i],
bChkProtected, true );
}
@@ -1853,15 +1853,15 @@ void SwTable::ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax
if( !aLines.Count() || !rBoxes.Count() )
return;
- USHORT nLineCnt = aLines.Count();
- USHORT nBoxCnt = rBoxes.Count();
- USHORT nBox = 0;
- for( USHORT nRow = 0; nRow < nLineCnt && nBox < nBoxCnt; ++nRow )
+ sal_uInt16 nLineCnt = aLines.Count();
+ sal_uInt16 nBoxCnt = rBoxes.Count();
+ sal_uInt16 nBox = 0;
+ for( sal_uInt16 nRow = 0; nRow < nLineCnt && nBox < nBoxCnt; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
ASSERT( pLine, "Missing table line" );
- USHORT nCols = pLine->GetTabBoxes().Count();
- for( USHORT nCol = 0; nCol < nCols; ++nCol )
+ sal_uInt16 nCols = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCol];
ASSERT( pBox, "Missing table box" );
@@ -1874,13 +1874,13 @@ void SwTable::ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax
}
}
nBox = 0;
- for( USHORT nRow = 0; nRow < nLineCnt; ++nRow )
+ for( sal_uInt16 nRow = 0; nRow < nLineCnt; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
- USHORT nCols = pLine->GetTabBoxes().Count();
+ sal_uInt16 nCols = pLine->GetTabBoxes().Count();
long nLeft = 0;
long nRight = 0;
- for( USHORT nCurrBox = 0; nCurrBox < nCols; ++nCurrBox )
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCols; ++nCurrBox )
{
nLeft = nRight;
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
@@ -1903,14 +1903,14 @@ void SwTable::PrepareDeleteCol( long nMin, long nMax )
const SwTwips nTabSize = GetFrmFmt()->GetFrmSize().GetWidth();
if( nTabSize == nMax )
nMid = nMax;
- USHORT nLineCnt = aLines.Count();
- for( USHORT nRow = 0; nRow < nLineCnt; ++nRow )
+ sal_uInt16 nLineCnt = aLines.Count();
+ for( sal_uInt16 nRow = 0; nRow < nLineCnt; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
- USHORT nCols = pLine->GetTabBoxes().Count();
+ sal_uInt16 nCols = pLine->GetTabBoxes().Count();
long nLeft = 0;
long nRight = 0;
- for( USHORT nCurrBox = 0; nCurrBox < nCols; ++nCurrBox )
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCols; ++nCurrBox )
{
nLeft = nRight;
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
@@ -1948,7 +1948,7 @@ void SwTable::PrepareDeleteCol( long nMin, long nMax )
void SwTable::ExpandSelection( SwSelBoxes& rBoxes ) const
{
- for( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
SwTableBox *pBox = rBoxes[i];
long nRowSpan = pBox->getRowSpan();
@@ -1968,7 +1968,7 @@ void SwTable::ExpandSelection( SwSelBoxes& rBoxes ) const
void SwTable::CheckRowSpan( SwTableLinePtr &rpLine, bool bUp ) const
{
ASSERT( IsNewModel(), "Don't call me for old tables" );
- USHORT nLineIdx = GetTabLines().C40_GETPOS( SwTableLine, rpLine );
+ sal_uInt16 nLineIdx = GetTabLines().C40_GETPOS( SwTableLine, rpLine );
ASSERT( nLineIdx < GetTabLines().Count(), "Start line out of range" );
bool bChange = true;
if( bUp )
@@ -1977,8 +1977,8 @@ void SwTable::CheckRowSpan( SwTableLinePtr &rpLine, bool bUp ) const
{
bChange = false;
rpLine = GetTabLines()[ nLineIdx ];
- USHORT nCols = rpLine->GetTabBoxes().Count();
- for( USHORT nCol = 0; !bChange && nCol < nCols; ++nCol )
+ sal_uInt16 nCols = rpLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCol = 0; !bChange && nCol < nCols; ++nCol )
{
SwTableBox* pBox = rpLine->GetTabBoxes()[nCol];
if( pBox->getRowSpan() > 1 || pBox->getRowSpan() < -1 )
@@ -1998,13 +1998,13 @@ void SwTable::CheckRowSpan( SwTableLinePtr &rpLine, bool bUp ) const
}
else
{
- USHORT nMaxLine = GetTabLines().Count();
+ sal_uInt16 nMaxLine = GetTabLines().Count();
while( bChange )
{
bChange = false;
rpLine = GetTabLines()[ nLineIdx ];
- USHORT nCols = rpLine->GetTabBoxes().Count();
- for( USHORT nCol = 0; !bChange && nCol < nCols; ++nCol )
+ sal_uInt16 nCols = rpLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCol = 0; !bChange && nCol < nCols; ++nCol )
{
SwTableBox* pBox = rpLine->GetTabBoxes()[nCol];
if( pBox->getRowSpan() < 0 )
@@ -2027,14 +2027,14 @@ void SwTable::CheckRowSpan( SwTableLinePtr &rpLine, bool bUp ) const
// In a top line no negative row span is allowed, so these have to be corrected.
// If there has been at least one correction, all values are stored
// and can be used by undo of table split
-SwSaveRowSpan::SwSaveRowSpan( SwTableBoxes& rBoxes, USHORT nSplitLn )
+SwSaveRowSpan::SwSaveRowSpan( SwTableBoxes& rBoxes, sal_uInt16 nSplitLn )
: mnSplitLine( nSplitLn )
{
bool bDontSave = true; // nothing changed, nothing to save
- USHORT nColCount = rBoxes.Count();
+ sal_uInt16 nColCount = rBoxes.Count();
ASSERT( nColCount, "Empty Table Line" )
mnRowSpans.resize( nColCount );
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = rBoxes[nCurrCol];
ASSERT( pBox, "Missing Table Box" );
@@ -2057,17 +2057,17 @@ void SwTable::RestoreRowSpan( const SwSaveRowSpan& rSave )
{
if( !IsNewModel() ) // for new model only
return;
- USHORT nLineCount = GetTabLines().Count();
+ sal_uInt16 nLineCount = GetTabLines().Count();
ASSERT( rSave.mnSplitLine < nLineCount, "Restore behind last line?" )
if( rSave.mnSplitLine < nLineCount )
{
SwTableLine* pLine = GetTabLines()[rSave.mnSplitLine];
- USHORT nColCount = pLine->GetTabBoxes().Count();
+ sal_uInt16 nColCount = pLine->GetTabBoxes().Count();
ASSERT( nColCount, "Empty Table Line" )
ASSERT( nColCount == rSave.mnRowSpans.size(), "Wrong row span store" )
if( nColCount == rSave.mnRowSpans.size() )
{
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrCol];
ASSERT( pBox, "Missing Table Box" );
@@ -2078,7 +2078,7 @@ void SwTable::RestoreRowSpan( const SwSaveRowSpan& rSave )
ASSERT( rSave.mnRowSpans[ nCurrCol ] < 0, "Pardon me?!" )
pBox->setRowSpan( -nRowSp );
- USHORT nLine = rSave.mnSplitLine;
+ sal_uInt16 nLine = rSave.mnSplitLine;
if( nLine )
{
long nLeftBorder = lcl_Box2LeftBorder( *pBox );
@@ -2107,7 +2107,7 @@ void SwTable::RestoreRowSpan( const SwSaveRowSpan& rSave )
}
}
-SwSaveRowSpan* SwTable::CleanUpTopRowSpan( USHORT nSplitLine )
+SwSaveRowSpan* SwTable::CleanUpTopRowSpan( sal_uInt16 nSplitLine )
{
SwSaveRowSpan* pRet = 0;
if( !IsNewModel() )
@@ -2121,15 +2121,15 @@ SwSaveRowSpan* SwTable::CleanUpTopRowSpan( USHORT nSplitLine )
return pRet;
}
-void SwTable::CleanUpBottomRowSpan( USHORT nDelLines )
+void SwTable::CleanUpBottomRowSpan( sal_uInt16 nDelLines )
{
if( !IsNewModel() )
return;
- USHORT nLastLine = GetTabLines().Count()-1;
+ sal_uInt16 nLastLine = GetTabLines().Count()-1;
SwTableLine* pLine = GetTabLines()[nLastLine];
- USHORT nColCount = pLine->GetTabBoxes().Count();
+ sal_uInt16 nColCount = pLine->GetTabBoxes().Count();
ASSERT( nColCount, "Empty Table Line" )
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrCol];
ASSERT( pBox, "Missing Table Box" );
@@ -2157,19 +2157,19 @@ void SwTable::CheckConsistency() const
{
if( !IsNewModel() )
return;
- USHORT nLineCount = GetTabLines().Count();
+ sal_uInt16 nLineCount = GetTabLines().Count();
const SwTwips nTabSize = GetFrmFmt()->GetFrmSize().GetWidth();
SwTwips nLineWidth = 0;
std::list< RowSpanCheck > aRowSpanCells;
std::list< RowSpanCheck >::iterator aIter = aRowSpanCells.end();
- for( USHORT nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
+ for( sal_uInt16 nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
{
SwTwips nWidth = 0;
SwTableLine* pLine = GetTabLines()[nCurrLine];
ASSERT( pLine, "Missing Table Line" )
- USHORT nColCount = pLine->GetTabBoxes().Count();
+ sal_uInt16 nColCount = pLine->GetTabBoxes().Count();
ASSERT( nColCount, "Empty Table Line" )
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrCol];
ASSERT( pBox, "Missing Table Box" );
@@ -2236,10 +2236,10 @@ private:
{
const SwTableBox* mpKeyBox;
const SwTableBox* mpCacheBox;
- USHORT mnSteps;
+ sal_uInt16 mnSteps;
bool mbStart;
- SwFindRowSpanCacheObj( const SwTableBox& rKeyBox, const SwTableBox& rCacheBox, USHORT nSteps, bool bStart ) :
+ SwFindRowSpanCacheObj( const SwTableBox& rKeyBox, const SwTableBox& rCacheBox, sal_uInt16 nSteps, bool bStart ) :
mpKeyBox( &rKeyBox ), mpCacheBox( &rCacheBox ), mnSteps( nSteps ), mbStart( bStart ) {}
};
@@ -2251,8 +2251,8 @@ private:
public:
static SwFindRowSpanCache& getSwFindRowSpanCache();
- const SwTableBox* FindCachedStartEndOfRowSpan( const SwTableBox& rKeyBox, USHORT nSteps, bool bStart );
- void SetCachedStartEndOfRowSpan( const SwTableBox& rKeyBox, const SwTableBox& rCacheBox, USHORT nSteps, bool bStart );
+ const SwTableBox* FindCachedStartEndOfRowSpan( const SwTableBox& rKeyBox, sal_uInt16 nSteps, bool bStart );
+ void SetCachedStartEndOfRowSpan( const SwTableBox& rKeyBox, const SwTableBox& rCacheBox, sal_uInt16 nSteps, bool bStart );
void SetUseCache( bool bNew );
};
@@ -2273,7 +2273,7 @@ void SwFindRowSpanCache::SetUseCache( bool bNew )
}
const SwTableBox* SwFindRowSpanCache::FindCachedStartEndOfRowSpan( const SwTableBox& rKeyBox,
- USHORT nSteps,
+ sal_uInt16 nSteps,
bool bStart )
{
static nCallCount = 0;
@@ -2304,7 +2304,7 @@ const int FindBoxCacheSize = 2;
void SwFindRowSpanCache::SetCachedStartEndOfRowSpan( const SwTableBox& rKeyBox,
const SwTableBox& rCacheBox,
- USHORT nSteps,
+ sal_uInt16 nSteps,
bool bStart )
{
if ( !mbUseCache ) return;
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 48b3b5f335fb..8f4c95d44c0a 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -101,7 +101,7 @@ SV_IMPL_REF( SwServerObject )
#define COLFUZZY 20
void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol,
- BOOL bChgAlign,ULONG nNdPos );
+ sal_Bool bChgAlign,sal_uLong nNdPos );
//----------------------------------
class SwTableBox_Impl
@@ -218,7 +218,7 @@ String& lcl_DelTabsAtSttEnd( String& rTxt )
void _InsTblBox( SwDoc* pDoc, SwTableNode* pTblNd,
SwTableLine* pLine, SwTableBoxFmt* pBoxFrmFmt,
SwTableBox* pBox,
- USHORT nInsPos, USHORT nCnt )
+ sal_uInt16 nInsPos, sal_uInt16 nCnt )
{
ASSERT( pBox->GetSttNd(), "Box ohne Start-Node" );
SwNodeIndex aIdx( *pBox->GetSttNd(), +1 );
@@ -255,7 +255,7 @@ void _InsTblBox( SwDoc* pDoc, SwTableNode* pTblNd,
if( nRowSpan != 1 )
{
SwTableBoxes& rTblBoxes = pLine->GetTabBoxes();
- for( USHORT i = 0; i < nCnt; ++i )
+ for( sal_uInt16 i = 0; i < nCnt; ++i )
{
pBox = rTblBoxes[ i + nInsPos ];
pBox->setRowSpan( nRowSpan );
@@ -277,8 +277,8 @@ SwTable::SwTable( SwTableFmt* pFmt )
pTableNode( 0 ),
nGrfsThatResize( 0 ),
nRowsToRepeat( 1 ),
- bModifyLocked( FALSE ),
- bNewModel( TRUE )
+ bModifyLocked( sal_False ),
+ bNewModel( sal_True )
{
// default Wert aus den Optionen setzen
eTblChgMode = (TblChgMode)GetTblChgDefaultMode();
@@ -291,14 +291,14 @@ SwTable::SwTable( const SwTable& rTable )
eTblChgMode( rTable.eTblChgMode ),
nGrfsThatResize( 0 ),
nRowsToRepeat( rTable.GetRowsToRepeat() ),
- bModifyLocked( FALSE ),
+ bModifyLocked( sal_False ),
bNewModel( rTable.bNewModel )
{
}
void DelBoxNode( SwTableSortBoxes& rSortCntBoxes )
{
- for( USHORT n = 0; n < rSortCntBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rSortCntBoxes.Count(); ++n )
rSortCntBoxes[ n ]->pSttNd = 0;
}
@@ -327,7 +327,7 @@ SwTable::~SwTable()
//JP: reicht leider nicht, es muessen die Pointer auf den StartNode
// der Section geloescht werden
DelBoxNode( aSortCntBoxes );
- aSortCntBoxes.Remove( (USHORT)0, aSortCntBoxes.Count() );
+ aSortCntBoxes.Remove( (sal_uInt16)0, aSortCntBoxes.Count() );
delete pHTMLLayout;
}
@@ -342,7 +342,7 @@ SwTable::~SwTable()
|*************************************************************************/
inline void FmtInArr( SvPtrarr& rFmtArr, SwFmt* pBoxFmt )
{
- BOOL bRet = USHRT_MAX != rFmtArr.GetPos( (VoidPtr)pBoxFmt );
+ sal_Bool bRet = USHRT_MAX != rFmtArr.GetPos( (VoidPtr)pBoxFmt );
if( !bRet )
rFmtArr.Insert( (VoidPtr)pBoxFmt, rFmtArr.Count() );
}
@@ -353,11 +353,11 @@ void lcl_ModifyBoxes( SwTableBoxes &rBoxes, const long nOld,
void lcl_ModifyLines( SwTableLines &rLines, const long nOld,
const long nNew, SvPtrarr& rFmtArr, const bool bCheckSum )
{
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
::lcl_ModifyBoxes( rLines[i]->GetTabBoxes(), nOld, nNew, rFmtArr );
if( bCheckSum )
{
- for( USHORT i = 0; i < rFmtArr.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rFmtArr.Count(); ++i )
{
SwFmt* pFmt = (SwFmt*)rFmtArr[i];
sal_uInt64 nBox = pFmt->GetFrmSize().GetWidth();
@@ -376,7 +376,7 @@ void lcl_ModifyBoxes( SwTableBoxes &rBoxes, const long nOld,
{
sal_uInt64 nSum = 0; // To avoid rounding errors we summarize all box widths
sal_uInt64 nOriginalSum = 0; // Sum of original widths
- for ( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
SwTableBox &rBox = *rBoxes[i];
if ( rBox.GetTabLines().Count() )
@@ -418,13 +418,13 @@ void lcl_ModifyBoxes( SwTableBoxes &rBoxes, const long nOld,
void SwTable::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
// fange SSize Aenderungen ab, um die Lines/Boxen anzupassen
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
const SwFmtFrmSize* pNewSize = 0, *pOldSize = 0;
if( RES_ATTRSET_CHG == nWhich )
{
if( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_FRM_SIZE, FALSE, (const SfxPoolItem**)&pNewSize ))
+ RES_FRM_SIZE, sal_False, (const SfxPoolItem**)&pNewSize ))
pOldSize = &((SwAttrSetChg*)pOld)->GetChgSet()->GetFrmSize();
}
else if( RES_FRM_SIZE == nWhich )
@@ -449,7 +449,7 @@ void SwTable::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
void SwTable::AdjustWidths( const long nOld, const long nNew )
{
- SvPtrarr aFmtArr( (BYTE)aLines[0]->GetTabBoxes().Count(), 1 );
+ SvPtrarr aFmtArr( (sal_uInt8)aLines[0]->GetTabBoxes().Count(), 1 );
::lcl_ModifyLines( aLines, nOld, nNew, aFmtArr, true );
}
@@ -461,20 +461,20 @@ void SwTable::AdjustWidths( const long nOld, const long nNew )
|* Letzte Aenderung MA 30. Nov. 95
|*
|*************************************************************************/
-void lcl_RefreshHidden( SwTabCols &rToFill, USHORT nPos )
+void lcl_RefreshHidden( SwTabCols &rToFill, sal_uInt16 nPos )
{
- for ( USHORT i = 0; i < rToFill.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rToFill.Count(); ++i )
{
if ( Abs((long)(nPos - rToFill[i])) <= COLFUZZY )
{
- rToFill.SetHidden( i, FALSE );
+ rToFill.SetHidden( i, sal_False );
break;
}
}
}
void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox,
- const SwFrmFmt *pTabFmt, const BOOL bHidden,
+ const SwFrmFmt *pTabFmt, const sal_Bool bHidden,
const FASTBOOL bRefreshHidden )
{
const long nWish = pTabFmt->GetFrmSize().GetWidth();
@@ -482,32 +482,32 @@ void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox,
//Der Wert fuer die linke Kante der Box errechnet sich aus den
//Breiten der vorhergehenden Boxen.
- USHORT nPos = 0;
- USHORT nSum = 0;
- USHORT nLeftMin = 0;
- USHORT nRightMax = 0;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nSum = 0;
+ sal_uInt16 nLeftMin = 0;
+ sal_uInt16 nRightMax = 0;
const SwTableBox *pCur = pBox;
const SwTableLine *pLine = pBox->GetUpper();
while ( pLine )
{ const SwTableBoxes &rBoxes = pLine->GetTabBoxes();
- for ( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
SwTwips nWidth = rBoxes[i]->GetFrmFmt()->GetFrmSize().GetWidth();
- nSum = (USHORT)(nSum + nWidth);
+ nSum = (sal_uInt16)(nSum + nWidth);
sal_uInt64 nTmp = nSum;
nTmp *= nAct;
nTmp /= nWish;
if (rBoxes[i] != pCur)
{
if ( pLine == pBox->GetUpper() || 0 == nLeftMin )
- nLeftMin = (USHORT)(nTmp - nPos);
- nPos = (USHORT)nTmp;
+ nLeftMin = (sal_uInt16)(nTmp - nPos);
+ nPos = (sal_uInt16)nTmp;
}
else
{
- nSum = (USHORT)(nSum - nWidth);
+ nSum = (sal_uInt16)(nSum - nWidth);
if ( 0 == nRightMax )
- nRightMax = (USHORT)(nTmp - nPos);
+ nRightMax = (sal_uInt16)(nTmp - nPos);
break;
}
}
@@ -515,18 +515,18 @@ void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox,
pLine = pCur ? pCur->GetUpper() : 0;
}
- BOOL bInsert = !bRefreshHidden;
- for ( USHORT j = 0; bInsert && (j < rToFill.Count()); ++j )
+ sal_Bool bInsert = !bRefreshHidden;
+ for ( sal_uInt16 j = 0; bInsert && (j < rToFill.Count()); ++j )
{
long nCmp = rToFill[j];
if ( (nPos >= ((nCmp >= COLFUZZY) ? nCmp - COLFUZZY : nCmp)) &&
(nPos <= (nCmp + COLFUZZY)) )
{
- bInsert = FALSE; //Hat ihn schon.
+ bInsert = sal_False; //Hat ihn schon.
}
else if ( nPos < nCmp )
{
- bInsert = FALSE;
+ bInsert = sal_False;
rToFill.Insert( nPos, bHidden, j );
}
}
@@ -544,7 +544,7 @@ void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox,
// check if nPos is entry:
bool bFoundPos = false;
bool bFoundMax = false;
- for ( USHORT j = 0; !(bFoundPos && bFoundMax ) && j < rToFill.Count(); ++j )
+ for ( sal_uInt16 j = 0; !(bFoundPos && bFoundMax ) && j < rToFill.Count(); ++j )
{
SwTabColsEntry& rEntry = rToFill.GetEntry( j );
long nCmp = rToFill[j];
@@ -583,26 +583,26 @@ void lcl_ProcessBoxGet( const SwTableBox *pBox, SwTabCols &rToFill,
if ( pBox->GetTabLines().Count() )
{
const SwTableLines &rLines = pBox->GetTabLines();
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
{ const SwTableBoxes &rBoxes = rLines[i]->GetTabBoxes();
- for ( USHORT j = 0; j < rBoxes.Count(); ++j )
+ for ( sal_uInt16 j = 0; j < rBoxes.Count(); ++j )
::lcl_ProcessBoxGet( rBoxes[j], rToFill, pTabFmt, bRefreshHidden);
}
}
else
- ::lcl_SortedTabColInsert( rToFill, pBox, pTabFmt, FALSE, bRefreshHidden );
+ ::lcl_SortedTabColInsert( rToFill, pBox, pTabFmt, sal_False, bRefreshHidden );
}
void lcl_ProcessLineGet( const SwTableLine *pLine, SwTabCols &rToFill,
const SwFrmFmt *pTabFmt )
{
- for ( USHORT i = 0; i < pLine->GetTabBoxes().Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pLine->GetTabBoxes().Count(); ++i )
{
const SwTableBox *pBox = pLine->GetTabBoxes()[i];
if ( pBox->GetSttNd() )
- ::lcl_SortedTabColInsert( rToFill, pBox, pTabFmt, TRUE, FALSE );
+ ::lcl_SortedTabColInsert( rToFill, pBox, pTabFmt, sal_True, sal_False );
else
- for ( USHORT j = 0; j < pBox->GetTabLines().Count(); ++j )
+ for ( sal_uInt16 j = 0; j < pBox->GetTabLines().Count(); ++j )
::lcl_ProcessLineGet( pBox->GetTabLines()[j], rToFill, pTabFmt );
}
}
@@ -614,14 +614,14 @@ void lcl_ProcessLineGet( const SwTableLine *pLine, SwTabCols &rToFill,
#endif
void SwTable::GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
- BOOL bRefreshHidden, BOOL bCurRowOnly ) const
+ sal_Bool bRefreshHidden, sal_Bool bCurRowOnly ) const
{
//MA 30. Nov. 95: Opt: wenn bHidden gesetzt ist, wird nur das Hidden
//Array aktualisiert.
if ( bRefreshHidden )
{
//Korrekturen entfernen
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < rToFill.Count(); ++i )
{
SwTabColsEntry& rEntry = rToFill.GetEntry( i );
@@ -632,7 +632,7 @@ void SwTable::GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
//Alle sind hidden, dann die sichtbaren eintragen.
for ( i = 0; i < rToFill.Count(); ++i )
- rToFill.SetHidden( i, TRUE );
+ rToFill.SetHidden( i, sal_True );
}
else
{
@@ -662,7 +662,7 @@ void SwTable::GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
//1.
const SwTableBoxes &rBoxes = pStart->GetUpper()->GetTabBoxes();
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < rBoxes.Count(); ++i )
::lcl_ProcessBoxGet( rBoxes[i], rToFill, pTabFmt, bRefreshHidden );
@@ -672,9 +672,9 @@ void SwTable::GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
while ( pLine )
{
const SwTableBoxes &rBoxes2 = pLine->GetTabBoxes();
- for ( USHORT k = 0; k < rBoxes2.Count(); ++k )
+ for ( sal_uInt16 k = 0; k < rBoxes2.Count(); ++k )
::lcl_SortedTabColInsert( rToFill, rBoxes2[k],
- pTabFmt, FALSE, bRefreshHidden );
+ pTabFmt, sal_False, bRefreshHidden );
pLine = pLine->GetUpper() ? pLine->GetUpper()->GetUpper() : 0;
}
@@ -728,9 +728,9 @@ struct Parm
Parm( const SwTabCols &rN, const SwTabCols &rO ) :
rNew( rN ), rOld( rO ), aBoxArr( 10, 1 ) {}
};
-inline BOOL BoxInArr( SvPtrarr& rArr, SwTableBox* pBox )
+inline sal_Bool BoxInArr( SvPtrarr& rArr, SwTableBox* pBox )
{
- BOOL bRet = USHRT_MAX != rArr.GetPos( (VoidPtr)pBox );
+ sal_Bool bRet = USHRT_MAX != rArr.GetPos( (VoidPtr)pBox );
if( !bRet )
rArr.Insert( (VoidPtr)pBox, rArr.Count() );
return bRet;
@@ -742,7 +742,7 @@ void lcl_ProcessLine( SwTableLine *pLine, Parm &rParm )
{
SwTableBoxes &rBoxes = pLine->GetTabBoxes();
for ( int i = rBoxes.Count()-1; i >= 0; --i )
- ::lcl_ProcessBoxSet( rBoxes[ static_cast< USHORT >(i) ], rParm );
+ ::lcl_ProcessBoxSet( rBoxes[ static_cast< sal_uInt16 >(i) ], rParm );
}
void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
@@ -750,7 +750,7 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
if ( pBox->GetTabLines().Count() )
{ SwTableLines &rLines = pBox->GetTabLines();
for ( int i = rLines.Count()-1; i >= 0; --i )
- lcl_ProcessLine( rLines[ static_cast< USHORT >(i) ], rParm );
+ lcl_ProcessLine( rLines[ static_cast< sal_uInt16 >(i) ], rParm );
}
else
{
@@ -771,13 +771,13 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
while ( pLine )
{ const SwTableBoxes &rBoxes = pLine->GetTabBoxes();
- for ( USHORT i = 0; (i < rBoxes.Count()) && (rBoxes[i] != pCur); ++i)
+ for ( sal_uInt16 i = 0; (i < rBoxes.Count()) && (rBoxes[i] != pCur); ++i)
{
sal_uInt64 nWidth = rBoxes[i]->GetFrmFmt()->
GetFrmSize().GetWidth();
nWidth *= nOldAct;
nWidth /= rParm.nOldWish;
- nLeft += (USHORT)nWidth;
+ nLeft += (sal_uInt16)nWidth;
}
pCur = pLine->GetUpper();
pLine = pCur ? pCur->GetUpper() : 0;
@@ -791,9 +791,9 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
nWidth *= nOldAct;
nWidth /= rParm.nOldWish;
long nRight = nLeft + (long)nWidth;
- USHORT nLeftPos = USHRT_MAX,
+ sal_uInt16 nLeftPos = USHRT_MAX,
nRightPos = USHRT_MAX;
- for ( USHORT i = 0; i < rParm.rOld.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rParm.rOld.Count(); ++i )
{
if ( nLeft >= (rParm.rOld[i] - COLFUZZY) &&
nLeft <= (rParm.rOld[i] + COLFUZZY) )
@@ -819,8 +819,8 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
nWidth /= rParm.nOldWish;
long nTmp = (long)nWidth;
nTmp += rParm.rOld.GetLeft();
- USHORT nLeftPos = USHRT_MAX;
- for ( USHORT i = 0; i < rParm.rOld.Count() &&
+ sal_uInt16 nLeftPos = USHRT_MAX;
+ for ( sal_uInt16 i = 0; i < rParm.rOld.Count() &&
nLeftPos == USHRT_MAX; ++i )
{
if ( nTmp >= (rParm.rOld[i] - COLFUZZY) &&
@@ -841,7 +841,7 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
if( pBox->getRowSpan() == 1 )
{
SwTableBoxes& rTblBoxes = pBox->GetUpper()->GetTabBoxes();
- USHORT nPos = rTblBoxes.C40_GETPOS( SwTableBox, pBox );
+ sal_uInt16 nPos = rTblBoxes.C40_GETPOS( SwTableBox, pBox );
if( nPos && rTblBoxes[ nPos - 1 ]->getRowSpan() != 1 )
nLeftDiff = 0;
if( nPos + 1 < rTblBoxes.Count() &&
@@ -899,15 +899,15 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
}
void lcl_ProcessBoxPtr( SwTableBox *pBox, SvPtrarr &rBoxArr,
- BOOL bBefore )
+ sal_Bool bBefore )
{
if ( pBox->GetTabLines().Count() )
{
const SwTableLines &rLines = pBox->GetTabLines();
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
{
const SwTableBoxes &rBoxes = rLines[i]->GetTabBoxes();
- for ( USHORT j = 0; j < rBoxes.Count(); ++j )
+ for ( sal_uInt16 j = 0; j < rBoxes.Count(); ++j )
::lcl_ProcessBoxPtr( rBoxes[j], rBoxArr, bBefore );
}
}
@@ -921,7 +921,7 @@ void lcl_AdjustBox( SwTableBox *pBox, const long nDiff, Parm &rParm );
void lcl_AdjustLines( SwTableLines &rLines, const long nDiff, Parm &rParm )
{
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
{
SwTableBox *pBox = rLines[i]->GetTabBoxes()
[rLines[i]->GetTabBoxes().Count()-1];
@@ -944,7 +944,7 @@ void lcl_AdjustBox( SwTableBox *pBox, const long nDiff, Parm &rParm )
}
void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
- const SwTableBox *pStart, BOOL bCurRowOnly )
+ const SwTableBox *pStart, sal_Bool bCurRowOnly )
{
CHECK_TABLE( *this )
@@ -985,8 +985,8 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
SwFmtHoriOrient aOri( pFmt->GetHoriOrient() );
if(text::HoriOrientation::NONE != aOri.GetHoriOrient())
{
- const BOOL bLeftDist = rNew.GetLeft() != nShLeft;
- const BOOL bRightDist = rNew.GetRight() + nShRight != rNew.GetRightMax();
+ const sal_Bool bLeftDist = rNew.GetLeft() != nShLeft;
+ const sal_Bool bRightDist = rNew.GetRight() + nShRight != rNew.GetRightMax();
if(!bLeftDist && !bRightDist)
aOri.SetHoriOrient( text::HoriOrientation::FULL );
else if(!bRightDist && rNew.GetLeft() > nShLeft )
@@ -1050,8 +1050,8 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
//entsprechenden Boxen in einem PtrArray vorzumerken.
const SwTableBoxes &rBoxes = pStart->GetUpper()->GetTabBoxes();
- for ( USHORT i = 0; i < rBoxes.Count(); ++i )
- ::lcl_ProcessBoxPtr( rBoxes[i], aParm.aBoxArr, FALSE );
+ for ( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
+ ::lcl_ProcessBoxPtr( rBoxes[i], aParm.aBoxArr, sal_False );
const SwTableLine *pLine = pStart->GetUpper()->GetUpper() ?
pStart->GetUpper()->GetUpper()->GetUpper() : 0;
@@ -1059,13 +1059,13 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
while ( pLine )
{
const SwTableBoxes &rBoxes2 = pLine->GetTabBoxes();
- BOOL bBefore = TRUE;
- for ( USHORT i = 0; i < rBoxes2.Count(); ++i )
+ sal_Bool bBefore = sal_True;
+ for ( sal_uInt16 i = 0; i < rBoxes2.Count(); ++i )
{
if ( rBoxes2[i] != pExcl )
::lcl_ProcessBoxPtr( rBoxes2[i], aParm.aBoxArr, bBefore );
else
- bBefore = FALSE;
+ bBefore = sal_False;
}
pExcl = pLine->GetUpper();
pLine = pLine->GetUpper() ? pLine->GetUpper()->GetUpper() : 0;
@@ -1075,7 +1075,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
//verarbeitet zu werden.
for ( int j = aParm.aBoxArr.Count()-1; j >= 0; --j )
{
- SwTableBox *pBox = (SwTableBox*)aParm.aBoxArr[ static_cast< USHORT >(j)];
+ SwTableBox *pBox = (SwTableBox*)aParm.aBoxArr[ static_cast< sal_uInt16 >(j)];
::lcl_ProcessBoxSet( pBox, aParm );
}
}
@@ -1087,7 +1087,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
//gearbeitet werden!
SwTableLines &rLines = GetTabLines();
for ( int i = rLines.Count()-1; i >= 0; --i )
- ::lcl_ProcessLine( rLines[ static_cast< USHORT >(i) ], aParm );
+ ::lcl_ProcessLine( rLines[ static_cast< sal_uInt16 >(i) ], aParm );
}
}
@@ -1097,23 +1097,23 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
extern void _CheckBoxWidth( const SwTableLine&, SwTwips );
// checke doch mal ob die Tabellen korrekte Breiten haben
SwTwips nSize = GetFrmFmt()->GetFrmSize().GetWidth();
- for( USHORT n = 0; n < aLines.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aLines.Count(); ++n )
_CheckBoxWidth( *aLines[ n ], nSize );
}
#endif
}
-typedef std::pair<USHORT, USHORT> ColChange;
+typedef std::pair<sal_uInt16, sal_uInt16> ColChange;
typedef std::list< ColChange > ChangeList;
static void lcl_AdjustWidthsInLine( SwTableLine* pLine, ChangeList& rOldNew,
- Parm& rParm, USHORT nColFuzzy )
+ Parm& rParm, sal_uInt16 nColFuzzy )
{
ChangeList::iterator pCurr = rOldNew.begin();
if( pCurr == rOldNew.end() )
return;
- USHORT nCount = pLine->GetTabBoxes().Count();
- USHORT i = 0;
+ sal_uInt16 nCount = pLine->GetTabBoxes().Count();
+ sal_uInt16 i = 0;
SwTwips nBorder = 0;
SwTwips nRest = 0;
while( i < nCount )
@@ -1156,7 +1156,7 @@ static void lcl_AdjustWidthsInLine( SwTableLine* pLine, ChangeList& rOldNew,
}
}
-static void lcl_CalcNewWidths( std::list<USHORT> &rSpanPos, ChangeList& rChanges,
+static void lcl_CalcNewWidths( std::list<sal_uInt16> &rSpanPos, ChangeList& rChanges,
SwTableLine* pLine, long nWish, long nWidth, bool bTop )
{
if( !rChanges.size() )
@@ -1169,17 +1169,17 @@ static void lcl_CalcNewWidths( std::list<USHORT> &rSpanPos, ChangeList& rChanges
rChanges.clear();
return;
}
- std::list<USHORT> aNewSpanPos;
+ std::list<sal_uInt16> aNewSpanPos;
ChangeList aNewChanges;
ChangeList::iterator pCurr = rChanges.begin();
aNewChanges.push_back( *pCurr ); // Nullposition
- std::list<USHORT>::iterator pSpan = rSpanPos.begin();
- USHORT nCurr = 0;
- USHORT nOrgSum = 0;
+ std::list<sal_uInt16>::iterator pSpan = rSpanPos.begin();
+ sal_uInt16 nCurr = 0;
+ sal_uInt16 nOrgSum = 0;
bool bRowSpan = false;
- USHORT nRowSpanCount = 0;
- USHORT nCount = pLine->GetTabBoxes().Count();
- for( USHORT nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
+ sal_uInt16 nRowSpanCount = 0;
+ sal_uInt16 nCount = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
SwTwips nCurrWidth = pBox->GetFrmFmt()->GetFrmSize().GetWidth();
@@ -1189,17 +1189,17 @@ static void lcl_CalcNewWidths( std::list<USHORT> &rSpanPos, ChangeList& rChanges
if( bRowSpan || bCurrRowSpan )
aNewSpanPos.push_back( nRowSpanCount );
bRowSpan = bCurrRowSpan;
- nOrgSum = (USHORT)(nOrgSum + nCurrWidth);
+ nOrgSum = (sal_uInt16)(nOrgSum + nCurrWidth);
sal_uInt64 nSum = nOrgSum;
nSum *= nWidth;
nSum /= nWish;
nSum *= nWish;
nSum /= nWidth;
- USHORT nPos = (USHORT)nSum;
+ sal_uInt16 nPos = (sal_uInt16)nSum;
while( pCurr != rChanges.end() && pCurr->first < nPos )
{
#ifdef DBG_UTIL
- USHORT nTemp = pCurr->first;
+ sal_uInt16 nTemp = pCurr->first;
nTemp = pCurr->second;
#endif
++nCurr;
@@ -1248,7 +1248,7 @@ static void lcl_CalcNewWidths( std::list<USHORT> &rSpanPos, ChangeList& rChanges
nTmp *= pLeftMove->second - pLast->second;
nTmp /= pLeftMove->first - pLast->first;
nTmp += pLast->second;
- pCurr->second = (USHORT)nTmp;
+ pCurr->second = (sal_uInt16)nTmp;
}
}
pLast = pCurr;
@@ -1272,7 +1272,7 @@ static void lcl_CalcNewWidths( std::list<USHORT> &rSpanPos, ChangeList& rChanges
nTmp *= pNext->second - pLast->second;
nTmp /= pNext->first - pLast->first;
nTmp += pLast->second;
- pCurr->second = (USHORT)nTmp;
+ pCurr->second = (sal_uInt16)nTmp;
}
++pCurr;
}
@@ -1290,13 +1290,13 @@ static void lcl_CalcNewWidths( std::list<USHORT> &rSpanPos, ChangeList& rChanges
while( pCopy != aNewChanges.end() )
rChanges.push_back( *pCopy++ );
rSpanPos.clear();
- std::list<USHORT>::iterator pSpCopy = aNewSpanPos.begin();
+ std::list<sal_uInt16>::iterator pSpCopy = aNewSpanPos.begin();
while( pSpCopy != aNewSpanPos.end() )
rSpanPos.push_back( *pSpCopy++ );
}
void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
- const SwTabCols &rOld, const SwTableBox *pStart, BOOL bCurRowOnly )
+ const SwTabCols &rOld, const SwTableBox *pStart, sal_Bool bCurRowOnly )
{
#ifdef DBG_UTIL
static int nCallCount = 0;
@@ -1308,7 +1308,7 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
const long nOldWidth = rParm.rOld.GetRight() - rParm.rOld.GetLeft();
if( nNewWidth < 1 || nOldWidth < 1 )
return;
- for( USHORT i = 0; i <= rOld.Count(); ++i )
+ for( sal_uInt16 i = 0; i <= rOld.Count(); ++i )
{
sal_uInt64 nNewPos;
sal_uInt64 nOldPos;
@@ -1328,7 +1328,7 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
nOldPos /= nOldWidth;
if( nOldPos != nNewPos && nNewPos > 0 && nOldPos > 0 )
{
- ColChange aChg( (USHORT)nOldPos, (USHORT)nNewPos );
+ ColChange aChg( (sal_uInt16)nOldPos, (sal_uInt16)nNewPos );
aOldNew.push_back( aChg );
}
}
@@ -1340,18 +1340,18 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
if( bCurRowOnly )
{
const SwTableLine* pCurrLine = pStart->GetUpper();
- USHORT nCurr = rLines.C40_GETPOS( SwTableLine, pCurrLine );
+ sal_uInt16 nCurr = rLines.C40_GETPOS( SwTableLine, pCurrLine );
if( nCurr >= USHRT_MAX )
return;
ColChange aChg( 0, 0 );
aOldNew.push_front( aChg );
- std::list<USHORT> aRowSpanPos;
+ std::list<sal_uInt16> aRowSpanPos;
if( nCurr )
{
ChangeList aCopy;
ChangeList::iterator pCop = aOldNew.begin();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while( pCop != aOldNew.end() )
{
aCopy.push_back( *pCop );
@@ -1361,7 +1361,7 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
lcl_CalcNewWidths( aRowSpanPos, aCopy, rLines[nCurr],
rParm.nOldWish, nOldWidth, true );
bool bGoOn = aRowSpanPos.size() > 0;
- USHORT j = nCurr;
+ sal_uInt16 j = nCurr;
while( bGoOn )
{
lcl_CalcNewWidths( aRowSpanPos, aCopy, rLines[--j],
@@ -1375,7 +1375,7 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
{
ChangeList aCopy;
ChangeList::iterator pCop = aOldNew.begin();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while( pCop != aOldNew.end() )
{
aCopy.push_back( *pCop );
@@ -1385,7 +1385,7 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
lcl_CalcNewWidths( aRowSpanPos, aCopy, rLines[nCurr],
rParm.nOldWish, nOldWidth, false );
bool bGoOn = aRowSpanPos.size() > 0;
- USHORT j = nCurr;
+ sal_uInt16 j = nCurr;
while( bGoOn )
{
lcl_CalcNewWidths( aRowSpanPos, aCopy, rLines[++j],
@@ -1396,7 +1396,7 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
}
::lcl_AdjustWidthsInLine( rLines[nCurr], aOldNew, rParm, 1 );
}
- else for( USHORT i = 0; i < rLines.Count(); ++i )
+ else for( sal_uInt16 i = 0; i < rLines.Count(); ++i )
::lcl_AdjustWidthsInLine( rLines[i], aOldNew, rParm, COLFUZZY );
CHECK_TABLE( *this )
}
@@ -1412,31 +1412,31 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
|*
|*************************************************************************/
-BOOL IsValidRowName( const String& rStr )
+sal_Bool IsValidRowName( const String& rStr )
{
- BOOL bIsValid = TRUE;
+ sal_Bool bIsValid = sal_True;
xub_StrLen nLen = rStr.Len();
for (xub_StrLen i = 0; i < nLen && bIsValid; ++i)
{
const sal_Unicode cChar = rStr.GetChar(i);
if (cChar < '0' || cChar > '9')
- bIsValid = FALSE;
+ bIsValid = sal_False;
}
return bIsValid;
}
// --> OD 2007-08-03 #i80314#
// add 3rd parameter and its handling
-USHORT SwTable::_GetBoxNum( String& rStr, BOOL bFirstPart,
+sal_uInt16 SwTable::_GetBoxNum( String& rStr, sal_Bool bFirstPart,
const bool bPerformValidCheck )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
xub_StrLen nPos = 0;
- if( bFirstPart ) // TRUE == column; FALSE == row
+ if( bFirstPart ) // sal_True == column; sal_False == row
{
// die 1. ist mit Buchstaben addressiert!
sal_Unicode cChar;
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
while( 0 != ( cChar = rStr.GetChar( nPos )) &&
( (cChar >= 'A' && cChar <= 'Z') ||
(cChar >= 'a' && cChar <= 'z') ) )
@@ -1444,7 +1444,7 @@ USHORT SwTable::_GetBoxNum( String& rStr, BOOL bFirstPart,
if( (cChar -= 'A') >= 26 )
cChar -= 'a' - '[';
if( bFirst )
- bFirst = FALSE;
+ bFirst = sal_False;
else
++nRet;
nRet = nRet * 52 + cChar;
@@ -1457,7 +1457,7 @@ USHORT SwTable::_GetBoxNum( String& rStr, BOOL bFirstPart,
nRet = 0;
if ( !bPerformValidCheck || IsValidRowName( rStr ) )
{
- nRet = static_cast<USHORT>(rStr.ToInt32());
+ nRet = static_cast<sal_uInt16>(rStr.ToInt32());
}
rStr.Erase();
}
@@ -1467,7 +1467,7 @@ USHORT SwTable::_GetBoxNum( String& rStr, BOOL bFirstPart,
String aTxt( rStr.Copy( 0, nPos ) );
if ( !bPerformValidCheck || IsValidRowName( aTxt ) )
{
- nRet = static_cast<USHORT>(aTxt.ToInt32());
+ nRet = static_cast<sal_uInt16>(aTxt.ToInt32());
}
rStr.Erase( 0, nPos+1 );
}
@@ -1485,7 +1485,7 @@ const SwTableBox* SwTable::GetTblBox( const String& rName,
const SwTableLines* pLines;
const SwTableBoxes* pBoxes;
- USHORT nLine, nBox;
+ sal_uInt16 nLine, nBox;
String aNm( rName );
while( aNm.Len() )
{
@@ -1500,7 +1500,7 @@ const SwTableBox* SwTable::GetTblBox( const String& rName,
--nBox;
}
- nLine = SwTable::_GetBoxNum( aNm, FALSE, bPerformValidCheck );
+ nLine = SwTable::_GetBoxNum( aNm, sal_False, bPerformValidCheck );
// bestimme die Line
if( !nLine || nLine > pLines->Count() )
@@ -1518,7 +1518,7 @@ const SwTableBox* SwTable::GetTblBox( const String& rName,
// Box ist ??
if( pBox && !pBox->GetSttNd() )
{
- ASSERT( FALSE, "Box ohne Inhalt, suche die naechste !!" );
+ ASSERT( sal_False, "Box ohne Inhalt, suche die naechste !!" );
// "herunterfallen lassen" bis zur ersten Box
while( pBox->GetTabLines().Count() )
pBox = pBox->GetTabLines()[0]->GetTabBoxes()[0];
@@ -1526,7 +1526,7 @@ const SwTableBox* SwTable::GetTblBox( const String& rName,
return pBox;
}
-SwTableBox* SwTable::GetTblBox( ULONG nSttIdx )
+SwTableBox* SwTable::GetTblBox( sal_uLong nSttIdx )
{
//MA: Zur Optimierung nicht immer umstaendlich das ganze SortArray abhuenern.
//OS: #102675# converting text to table tries und certain conditions
@@ -1535,7 +1535,7 @@ SwTableBox* SwTable::GetTblBox( ULONG nSttIdx )
return 0;
SwTableBox* pRet = 0;
SwNodes& rNds = GetFrmFmt()->GetDoc()->GetNodes();
- ULONG nIndex = nSttIdx + 1;
+ sal_uLong nIndex = nSttIdx + 1;
SwCntntNode* pCNd = 0;
SwTableNode* pTblNd = 0;
@@ -1571,22 +1571,22 @@ SwTableBox* SwTable::GetTblBox( ULONG nSttIdx )
//Falls es das Layout noch nicht gibt oder sonstwie etwas schieft geht.
if ( !pRet )
{
- for( USHORT n = aSortCntBoxes.Count(); n; )
+ for( sal_uInt16 n = aSortCntBoxes.Count(); n; )
if( aSortCntBoxes[ --n ]->GetSttIdx() == nSttIdx )
return aSortCntBoxes[ n ];
}
return pRet;
}
-BOOL SwTable::IsTblComplex() const
+sal_Bool SwTable::IsTblComplex() const
{
- // returnt TRUE wenn sich in der Tabelle Verschachtelungen befinden
+ // returnt sal_True wenn sich in der Tabelle Verschachtelungen befinden
// steht eine Box nicht in der obersten Line, da wurde gesplittet/
// gemergt und die Struktur ist komplexer.
- for( USHORT n = 0; n < aSortCntBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aSortCntBoxes.Count(); ++n )
if( aSortCntBoxes[ n ]->GetUpper()->GetUpper() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
@@ -1599,10 +1599,10 @@ BOOL SwTable::IsTblComplex() const
|* Letzte Aenderung MA 09. Mar. 93
|*
|*************************************************************************/
-SwTableLine::SwTableLine( SwTableLineFmt *pFmt, USHORT nBoxes,
+SwTableLine::SwTableLine( SwTableLineFmt *pFmt, sal_uInt16 nBoxes,
SwTableBox *pUp )
: SwClient( pFmt ),
- aBoxes( (BYTE)nBoxes, 1 ),
+ aBoxes( (sal_uInt8)nBoxes, 1 ),
pUpper( pUp )
{
}
@@ -1690,7 +1690,7 @@ void SwTableLine::ChgFrmFmt( SwTableLineFmt *pNewFmt )
if ( bInFirstNonHeadlineRow || bInFollowFlowRow )
pTab = pTab->FindMaster();
- pTab->SetRemoveFollowFlowLinePending( TRUE );
+ pTab->SetRemoveFollowFlowLinePending( sal_True );
pTab->InvalidatePos();
}
// <--
@@ -1752,9 +1752,9 @@ SwTwips SwTableLine::GetTableLineHeight( bool& bLayoutAvailable ) const
|* Letzte Aenderung MA 04. May. 93
|*
|*************************************************************************/
-SwTableBox::SwTableBox( SwTableBoxFmt* pFmt, USHORT nLines, SwTableLine *pUp )
+SwTableBox::SwTableBox( SwTableBoxFmt* pFmt, sal_uInt16 nLines, SwTableLine *pUp )
: SwClient( 0 ),
- aLines( (BYTE)nLines, 1 ),
+ aLines( (sal_uInt8)nLines, 1 ),
pSttNd( 0 ),
pUpper( pUp ),
pImpl( 0 )
@@ -1829,8 +1829,8 @@ SwTableBoxFmt* SwTableBox::CheckBoxFmt( SwTableBoxFmt* pFmt )
{
// sollte das Format eine Formel oder einen Value tragen, dann muss die
// Box alleine am Format haengen. Ggfs. muss ein neues angelegt werden.
- if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, FALSE ) ||
- SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA, FALSE ) )
+ if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, sal_False ) ||
+ SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA, sal_False ) )
{
SwClient* pOther = SwClientIter( *pFmt ).First( TYPE( SwTableBox ));
if( pOther )
@@ -1909,7 +1909,7 @@ void SwTableBox::ChgFrmFmt( SwTableBoxFmt* pNewFmt )
pCell->InvalidateSize();
pCell->_InvalidatePrt();
pCell->SetCompletePaint();
- pCell->SetDerivedVert( FALSE );
+ pCell->SetDerivedVert( sal_False );
pCell->CheckDirChange();
// --> FME 2005-04-15 #i47489#
@@ -1944,10 +1944,10 @@ void SwTableBox::ChgFrmFmt( SwTableBoxFmt* pNewFmt )
|* Letzte Aenderung JP 30. Jun. 93
|*
|*************************************************************************/
-void lcl_GetTblBoxColStr( USHORT nCol, String& rNm )
+void lcl_GetTblBoxColStr( sal_uInt16 nCol, String& rNm )
{
- const USHORT coDiff = 52; // 'A'-'Z' 'a' - 'z'
- USHORT nCalc;
+ const sal_uInt16 coDiff = 52; // 'A'-'Z' 'a' - 'z'
+ sal_uInt16 nCalc;
do {
nCalc = nCol % coDiff;
@@ -1972,7 +1972,7 @@ String SwTableBox::GetName() const
}
const SwTable& rTbl = pSttNd->FindTableNode()->GetTable();
- USHORT nPos;
+ sal_uInt16 nPos;
String sNm, sTmp;
const SwTableBox* pBox = this;
do {
@@ -1998,10 +1998,10 @@ String SwTableBox::GetName() const
return sNm;
}
-BOOL SwTableBox::IsInHeadline( const SwTable* pTbl ) const
+sal_Bool SwTableBox::IsInHeadline( const SwTable* pTbl ) const
{
if( !GetUpper() ) // sollte nur beim Merge vorkommen.
- return FALSE;
+ return sal_False;
if( !pTbl )
pTbl = &pSttNd->FindTableNode()->GetTable();
@@ -2016,14 +2016,14 @@ BOOL SwTableBox::IsInHeadline( const SwTable* pTbl ) const
#ifdef DBG_UTIL
-ULONG SwTableBox::GetSttIdx() const
+sal_uLong SwTableBox::GetSttIdx() const
{
return pSttNd ? pSttNd->GetIndex() : 0;
}
#endif
// erfrage vom Client Informationen
-BOOL SwTable::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwTable::GetInfo( SfxPoolItem& rInfo ) const
{
switch( rInfo.Which() )
{
@@ -2038,7 +2038,7 @@ BOOL SwTable::GetInfo( SfxPoolItem& rInfo ) const
((SwAutoFmtGetDocNode&)rInfo).pCntntNode =
GetFrmFmt()->GetDoc()->GetNodes().GoNext( &aIdx );
}
- return FALSE;
+ return sal_False;
}
break;
}
@@ -2056,9 +2056,9 @@ BOOL SwTable::GetInfo( SfxPoolItem& rInfo ) const
((SwPtrMsgPoolItem&)rInfo).pObject =
SwClientIter( *GetFrmFmt() ).First( TYPE(SwFrm) );
}
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
SwTable * SwTable::FindTable( SwFrmFmt const*const pFmt )
@@ -2091,13 +2091,13 @@ void SwTable::SetHTMLTableLayout( SwHTMLTableLayout *p )
}
void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol,
- BOOL bChgAlign )
+ sal_Bool bChgAlign )
{
- ULONG nNdPos = rBox.IsValidNumTxtNd( TRUE );
+ sal_uLong nNdPos = rBox.IsValidNumTxtNd( sal_True );
ChgTextToNum( rBox,rTxt,pCol,bChgAlign,nNdPos);
}
void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol,
- BOOL bChgAlign,ULONG nNdPos )
+ sal_Bool bChgAlign,sal_uLong nNdPos )
{
if( ULONG_MAX != nNdPos )
@@ -2121,7 +2121,7 @@ void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol,
// Farbe umsetzen oder "Benutzer Farbe" sichern
if( !pTNd->GetpSwAttrSet() || SFX_ITEM_SET != pTNd->GetpSwAttrSet()->
- GetItemState( RES_CHRATR_COLOR, FALSE, &pItem ))
+ GetItemState( RES_CHRATR_COLOR, sal_False, &pItem ))
pItem = 0;
const Color* pOldNumFmtColor = rBox.GetSaveNumFmtColor();
@@ -2178,7 +2178,7 @@ void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol,
// zuruecksetzen, damit sie wieder aufgespannt werden
{
SwIndex aResetIdx( aIdx, n );
- pTNd->DontExpandFmt( aResetIdx, FALSE, FALSE );
+ pTNd->DontExpandFmt( aResetIdx, sal_False, sal_False );
}
if( !pDoc->IsIgnoreRedline() && pDoc->GetRedlineTbl().Count() )
@@ -2202,7 +2202,7 @@ void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol,
// vertikale Ausrichtung umsetzen
if( bChgAlign &&
( SFX_ITEM_SET != rBox.GetFrmFmt()->GetItemState(
- RES_VERT_ORIENT, TRUE, &pItem ) ||
+ RES_VERT_ORIENT, sal_True, &pItem ) ||
text::VertOrientation::TOP == ((SwFmtVertOrient*)pItem)->GetVertOrient() ))
{
rBox.GetFrmFmt()->SetFmtAttr( SwFmtVertOrient( 0, text::VertOrientation::BOTTOM ));
@@ -2210,14 +2210,14 @@ void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol,
}
}
-void ChgNumToText( SwTableBox& rBox, ULONG nFmt )
+void ChgNumToText( SwTableBox& rBox, sal_uLong nFmt )
{
- ULONG nNdPos = rBox.IsValidNumTxtNd( FALSE );
+ sal_uLong nNdPos = rBox.IsValidNumTxtNd( sal_False );
if( ULONG_MAX != nNdPos )
{
SwDoc* pDoc = rBox.GetFrmFmt()->GetDoc();
SwTxtNode* pTNd = pDoc->GetNodes()[ nNdPos ]->GetTxtNode();
- BOOL bChgAlign = pDoc->IsInsTblAlignNum();
+ sal_Bool bChgAlign = pDoc->IsInsTblAlignNum();
const SfxPoolItem* pItem;
Color* pCol = 0;
@@ -2232,7 +2232,7 @@ void ChgNumToText( SwTableBox& rBox, ULONG nFmt )
SwIndex aIdx( pTNd, sTxt.Len() );
//JP 06.04.99: Bug 64321 - DontExpand-Flags vorm Austauschen
// zuruecksetzen, damit sie wieder aufgespannt werden
- pTNd->DontExpandFmt( aIdx, FALSE, FALSE );
+ pTNd->DontExpandFmt( aIdx, sal_False, sal_False );
aIdx = 0;
pTNd->EraseText( aIdx, STRING_LEN,
IDocumentContentOperations::INS_EMPTYEXPAND );
@@ -2245,7 +2245,7 @@ void ChgNumToText( SwTableBox& rBox, ULONG nFmt )
// Ausrichtung umsetzen
if( bChgAlign && pAttrSet && SFX_ITEM_SET == pAttrSet->GetItemState(
- RES_PARATR_ADJUST, FALSE, &pItem ) &&
+ RES_PARATR_ADJUST, sal_False, &pItem ) &&
SVX_ADJUST_RIGHT == ((SvxAdjustItem*)pItem)->GetAdjust() )
{
pTNd->SetAttr( SvxAdjustItem( SVX_ADJUST_LEFT, RES_PARATR_ADJUST ) );
@@ -2253,7 +2253,7 @@ void ChgNumToText( SwTableBox& rBox, ULONG nFmt )
// Farbe umsetzen oder "Benutzer Farbe" sichern
if( !pAttrSet || SFX_ITEM_SET != pAttrSet->
- GetItemState( RES_CHRATR_COLOR, FALSE, &pItem ))
+ GetItemState( RES_CHRATR_COLOR, sal_False, &pItem ))
pItem = 0;
const Color* pOldNumFmtColor = rBox.GetSaveNumFmtColor();
@@ -2294,7 +2294,7 @@ void ChgNumToText( SwTableBox& rBox, ULONG nFmt )
// vertikale Ausrichtung umsetzen
if( bChgAlign &&
SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState(
- RES_VERT_ORIENT, FALSE, &pItem ) &&
+ RES_VERT_ORIENT, sal_False, &pItem ) &&
text::VertOrientation::BOTTOM == ((SwFmtVertOrient*)pItem)->GetVertOrient() )
{
rBox.GetFrmFmt()->SetFmtAttr( SwFmtVertOrient( 0, text::VertOrientation::TOP ));
@@ -2311,7 +2311,7 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
const SwTblBoxFormula *pNewFml = 0;
const SwTblBoxValue *pNewVal = 0;
double aOldValue = 0;
- ULONG nOldFmt = NUMBERFORMAT_TEXT;
+ sal_uLong nOldFmt = NUMBERFORMAT_TEXT;
switch( pNew ? pNew->Which() : 0 )
{
@@ -2319,13 +2319,13 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
const SfxItemSet& rSet = *((SwAttrSetChg*)pNew)->GetChgSet();
if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT,
- FALSE, (const SfxPoolItem**)&pNewFmt ) )
+ sal_False, (const SfxPoolItem**)&pNewFmt ) )
nOldFmt = ((SwTblBoxNumFormat&)((SwAttrSetChg*)pOld)->
GetChgSet()->Get( RES_BOXATR_FORMAT )).GetValue();
- rSet.GetItemState( RES_BOXATR_FORMULA, FALSE,
+ rSet.GetItemState( RES_BOXATR_FORMULA, sal_False,
(const SfxPoolItem**)&pNewFml );
if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_VALUE,
- FALSE, (const SfxPoolItem**)&pNewVal ) )
+ sal_False, (const SfxPoolItem**)&pNewVal ) )
aOldValue = ((SwTblBoxValue&)((SwAttrSetChg*)pOld)->
GetChgSet()->Get( RES_BOXATR_VALUE )).GetValue();
}
@@ -2350,9 +2350,9 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
GetDoc()->SetFieldsDirty(true, NULL, 0);
- if( SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMAT, FALSE ) ||
- SFX_ITEM_SET == GetItemState( RES_BOXATR_VALUE, FALSE ) ||
- SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMULA, FALSE ) )
+ if( SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMAT, sal_False ) ||
+ SFX_ITEM_SET == GetItemState( RES_BOXATR_VALUE, sal_False ) ||
+ SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMULA, sal_False ) )
{
// die Box holen
SwClientIter aIter( *this );
@@ -2361,19 +2361,19 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
ASSERT( !aIter.Next(), "keine Box oder mehrere am Format" );
- ULONG nNewFmt;
+ sal_uLong nNewFmt;
if( pNewFmt )
{
nNewFmt = pNewFmt->GetValue();
// neu Formatieren
// ist es neuer oder wurde der akt. entfernt?
- if( SFX_ITEM_SET != GetItemState( RES_BOXATR_VALUE, FALSE ))
+ if( SFX_ITEM_SET != GetItemState( RES_BOXATR_VALUE, sal_False ))
pNewFmt = 0;
}
else
{
// das akt. Item besorgen
- GetItemState( RES_BOXATR_FORMAT, FALSE,
+ GetItemState( RES_BOXATR_FORMAT, sal_False,
(const SfxPoolItem**)&pNewFmt );
nOldFmt = GetTblBoxNumFmt().GetValue();
nNewFmt = pNewFmt ? pNewFmt->GetValue() : nOldFmt;
@@ -2385,7 +2385,7 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
if( NUMBERFORMAT_TEXT != nNewFmt )
{
if( SFX_ITEM_SET == GetItemState(
- RES_BOXATR_VALUE, FALSE ))
+ RES_BOXATR_VALUE, sal_False ))
nOldFmt = NUMBERFORMAT_TEXT;
else
nNewFmt = NUMBERFORMAT_TEXT;
@@ -2407,26 +2407,26 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// - vertikale Ausrichtung auf OEBN, wenn UNTEN gesetzt ist
SvNumberFormatter* pNumFmtr = GetDoc()->GetNumberFormatter();
- BOOL bNewIsTxtFmt = pNumFmtr->IsTextFormat( nNewFmt ) ||
+ sal_Bool bNewIsTxtFmt = pNumFmtr->IsTextFormat( nNewFmt ) ||
NUMBERFORMAT_TEXT == nNewFmt;
if( (!bNewIsTxtFmt && nOldFmt != nNewFmt) || pNewFml )
{
- BOOL bChgTxt = TRUE;
+ sal_Bool bChgTxt = sal_True;
double fVal = 0;
if( !pNewVal && SFX_ITEM_SET != GetItemState(
- RES_BOXATR_VALUE, FALSE, (const SfxPoolItem**)&pNewVal ))
+ RES_BOXATR_VALUE, sal_False, (const SfxPoolItem**)&pNewVal ))
{
// es wurde noch nie ein Wert gesetzt, dann versuche
// doch mal den Inhalt auszuwerten
- ULONG nNdPos = pBox->IsValidNumTxtNd( TRUE );
+ sal_uLong nNdPos = pBox->IsValidNumTxtNd( sal_True );
if( ULONG_MAX != nNdPos )
{
sal_uInt32 nTmpFmtIdx = nNewFmt;
String aTxt( GetDoc()->GetNodes()[ nNdPos ]
->GetTxtNode()->GetRedlineTxt());
if( !aTxt.Len() )
- bChgTxt = FALSE;
+ bChgTxt = sal_False;
else
{
//JP 15.09.98: Bug 55741 - Tabs beibehalten
@@ -2434,7 +2434,7 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// JP 22.04.98: Bug 49659 -
// Sonderbehandlung fuer Prozent
- BOOL bIsNumFmt = FALSE;
+ sal_Bool bIsNumFmt = sal_False;
if( NUMBERFORMAT_PERCENT ==
pNumFmtr->GetType( nNewFmt ))
{
@@ -2508,11 +2508,11 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
SwFrmFmt::Modify( pOld, pNew );
}
-BOOL SwTableBox::HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
- BOOL& rIsEmptyTxtNd ) const
+sal_Bool SwTableBox::HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
+ sal_Bool& rIsEmptyTxtNd ) const
{
- BOOL bRet = FALSE;
- ULONG nNdPos = IsValidNumTxtNd( TRUE );
+ sal_Bool bRet = sal_False;
+ sal_uLong nNdPos = IsValidNumTxtNd( sal_True );
if( ULONG_MAX != nNdPos )
{
String aTxt( pSttNd->GetNodes()[ nNdPos ]->GetTxtNode()->
@@ -2524,7 +2524,7 @@ BOOL SwTableBox::HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
rFmtIndex = ((SwTblBoxNumFormat*)pItem)->GetValue();
// JP 22.04.98: Bug 49659 - Sonderbehandlung fuer Prozent
@@ -2547,7 +2547,7 @@ BOOL SwTableBox::HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
// denn der Numberformater erkennt aus "123.--DM" kein Zahlenformat!
if( !bRet && rFmtIndex && !pNumFmtr->IsTextFormat( rFmtIndex ) &&
SFX_ITEM_SET == GetFrmFmt()->GetItemState( RES_BOXATR_VALUE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
Color* pCol;
String sNewTxt;
@@ -2558,29 +2558,29 @@ BOOL SwTableBox::HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
*/
}
else
- rIsEmptyTxtNd = FALSE;
+ rIsEmptyTxtNd = sal_False;
return bRet;
}
-BOOL SwTableBox::IsNumberChanged() const
+sal_Bool SwTableBox::IsNumberChanged() const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
- if( SFX_ITEM_SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA, FALSE ))
+ if( SFX_ITEM_SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA, sal_False ))
{
const SwTblBoxNumFormat *pNumFmt;
const SwTblBoxValue *pValue;
- if( SFX_ITEM_SET != GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, FALSE,
+ if( SFX_ITEM_SET != GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, sal_False,
(const SfxPoolItem**)&pValue ))
pValue = 0;
- if( SFX_ITEM_SET != GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT, FALSE,
+ if( SFX_ITEM_SET != GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT, sal_False,
(const SfxPoolItem**)&pNumFmt ))
pNumFmt = 0;
- ULONG nNdPos;
+ sal_uLong nNdPos;
if( pNumFmt && pValue &&
- ULONG_MAX != ( nNdPos = IsValidNumTxtNd( TRUE ) ) )
+ ULONG_MAX != ( nNdPos = IsValidNumTxtNd( sal_True ) ) )
{
String sNewTxt, sOldTxt( pSttNd->GetNodes()[ nNdPos ]->
GetTxtNode()->GetRedlineTxt() );
@@ -2599,14 +2599,14 @@ BOOL SwTableBox::IsNumberChanged() const
return bRet;
}
-ULONG SwTableBox::IsValidNumTxtNd( BOOL bCheckAttr ) const
+sal_uLong SwTableBox::IsValidNumTxtNd( sal_Bool bCheckAttr ) const
{
- ULONG nPos = ULONG_MAX;
+ sal_uLong nPos = ULONG_MAX;
if( pSttNd )
{
SwNodeIndex aIdx( *pSttNd );
- ULONG nIndex = aIdx.GetIndex();
- const ULONG nIndexEnd = pSttNd->GetNodes()[ nIndex ]->EndOfSectionIndex();
+ sal_uLong nIndex = aIdx.GetIndex();
+ const sal_uLong nIndexEnd = pSttNd->GetNodes()[ nIndex ]->EndOfSectionIndex();
const SwTxtNode *pTextNode = 0;
while( ++nIndex < nIndexEnd )
{
@@ -2640,7 +2640,7 @@ ULONG SwTableBox::IsValidNumTxtNd( BOOL bCheckAttr ) const
// Flys/Felder/..
if( pHts )
{
- for( USHORT n = 0; n < pHts->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pHts->Count(); ++n )
{
const SwTxtAttr* pAttr = (*pHts)[ n ];
if( RES_TXTATR_NOEND_BEGIN <= pAttr->Which() ||
@@ -2669,14 +2669,14 @@ ULONG SwTableBox::IsValidNumTxtNd( BOOL bCheckAttr ) const
}
// ist das eine FormelBox oder eine Box mit numerischen Inhalt (AutoSum)
-USHORT SwTableBox::IsFormulaOrValueBox() const
+sal_uInt16 SwTableBox::IsFormulaOrValueBox() const
{
- USHORT nWhich = 0;
+ sal_uInt16 nWhich = 0;
const SwTxtNode* pTNd;
SwFrmFmt* pFmt = GetFrmFmt();
- if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA, FALSE ))
+ if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA, sal_False ))
nWhich = RES_BOXATR_FORMULA;
- else if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, FALSE ) &&
+ else if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, sal_False ) &&
!pFmt->GetDoc()->GetNumberFormatter()->IsTextFormat(
pFmt->GetTblBoxNumFmt().GetValue() ))
nWhich = RES_BOXATR_VALUE;
@@ -2692,15 +2692,15 @@ void SwTableBox::ActualiseValueBox()
{
const SfxPoolItem *pFmtItem, *pValItem;
SwFrmFmt* pFmt = GetFrmFmt();
- if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMAT, TRUE, &pFmtItem )
- && SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, TRUE, &pValItem ))
+ if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMAT, sal_True, &pFmtItem )
+ && SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, sal_True, &pValItem ))
{
- const ULONG nFmtId = ((SwTblBoxNumFormat*)pFmtItem)->GetValue();
- ULONG nNdPos = ULONG_MAX;
+ const sal_uLong nFmtId = ((SwTblBoxNumFormat*)pFmtItem)->GetValue();
+ sal_uLong nNdPos = ULONG_MAX;
SvNumberFormatter* pNumFmtr = pFmt->GetDoc()->GetNumberFormatter();
if( !pNumFmtr->IsTextFormat( nFmtId ) &&
- ULONG_MAX != (nNdPos = IsValidNumTxtNd( TRUE )) )
+ ULONG_MAX != (nNdPos = IsValidNumTxtNd( sal_True )) )
{
double fVal = ((SwTblBoxValue*)pValItem)->GetValue();
Color* pCol = 0;
@@ -2709,7 +2709,7 @@ void SwTableBox::ActualiseValueBox()
const String& rTxt = pSttNd->GetNodes()[ nNdPos ]->GetTxtNode()->GetTxt();
if( rTxt != sNewTxt )
- ChgTextToNum( *this, sNewTxt, pCol, FALSE ,nNdPos);
+ ChgTextToNum( *this, sNewTxt, pCol, sal_False ,nNdPos);
}
}
}
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 09c13b8fb250..7d777089fb7f 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -101,7 +101,7 @@ LanguageType SwEnhancedPDFExportHelper::eLanguageDefault = 0;
#ifdef DBG_UTIL
-static std::vector< USHORT > aStructStack;
+static std::vector< sal_uInt16 > aStructStack;
void lcl_DBGCheckStack()
{
@@ -118,8 +118,8 @@ void lcl_DBGCheckStack()
* Formula = 35 Form = 36 Continued frame = 99
*/
- USHORT nElement;
- std::vector< USHORT >::iterator aIter;
+ sal_uInt16 nElement;
+ std::vector< sal_uInt16 >::iterator aIter;
for ( aIter = aStructStack.begin(); aIter != aStructStack.end(); ++aIter )
{
nElement = *aIter;
@@ -435,7 +435,7 @@ void SwTaggedPDFHelper::BeginTag( vcl::PDFWriter::StructElement eType, const Str
++nEndStructureElement;
#ifdef DBG_UTIL
- aStructStack.push_back( static_cast<USHORT>(eType) );
+ aStructStack.push_back( static_cast<sal_uInt16>(eType) );
#endif
// Store the id of the current structure element if
@@ -1016,7 +1016,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
if ( CheckReopenTag() )
return;
- USHORT nPDFType = USHRT_MAX;
+ sal_uInt16 nPDFType = USHRT_MAX;
String aPDFType;
switch ( pFrm->GetType() )
@@ -1114,7 +1114,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
// This is the default. If the paragraph could not be mapped to
// any of the standard pdf tags, we write a user defined tag
// <stylename> with role = P
- nPDFType = static_cast<USHORT>(vcl::PDFWriter::Paragraph);
+ nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::Paragraph);
aPDFType = sStyleName;
//
@@ -1122,7 +1122,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
//
if ( sStyleName == aQuotations )
{
- nPDFType = static_cast<USHORT>(vcl::PDFWriter::BlockQuote);
+ nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::BlockQuote);
aPDFType = aBlockQuoteString;
}
@@ -1131,7 +1131,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
//
else if ( sStyleName == aCaption)
{
- nPDFType = static_cast<USHORT>(vcl::PDFWriter::Caption);
+ nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::Caption);
aPDFType = aCaptionString;
}
@@ -1140,7 +1140,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
//
else if ( sParentStyleName == aCaption)
{
- nPDFType = static_cast<USHORT>(vcl::PDFWriter::Caption);
+ nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::Caption);
aPDFType = sStyleName.Append(aCaptionString);
}
@@ -1149,7 +1149,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
//
else if ( sStyleName == aHeading )
{
- nPDFType = static_cast<USHORT>(vcl::PDFWriter::Heading);
+ nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::Heading);
aPDFType = aHString;
}
@@ -1162,7 +1162,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
int nRealLevel = pTxtNd->GetAttrOutlineLevel()-1; //<-end,zhaojianwei
nRealLevel = nRealLevel > 5 ? 5 : nRealLevel;
- nPDFType = static_cast<USHORT>(vcl::PDFWriter::H1 + nRealLevel);
+ nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::H1 + nRealLevel);
switch(nRealLevel)
{
case 0 :
@@ -1375,7 +1375,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
if ( lcl_IsInNonStructEnv( *pFrm ) )
return;
- USHORT nPDFType = USHRT_MAX;
+ sal_uInt16 nPDFType = USHRT_MAX;
String aPDFType;
switch ( pPor->GetWhichPor() )
@@ -1427,7 +1427,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
else
{
const LanguageType nCurrentLanguage = rInf.GetFont()->GetLanguage();
- const USHORT nFont = rInf.GetFont()->GetActual();
+ const sal_uInt16 nFont = rInf.GetFont()->GetActual();
const LanguageType nDefaultLang = SwEnhancedPDFExportHelper::GetDefaultLanguage();
if ( UNDERLINE_NONE != rInf.GetFont()->GetUnderline() ||
@@ -1529,8 +1529,8 @@ SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper( SwEditShell& rSh,
aStructStack.clear();
#endif
- const BYTE nScript = (BYTE)GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
- USHORT nLangRes = RES_CHRATR_LANGUAGE;
+ const sal_uInt8 nScript = (sal_uInt8)GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
+ sal_uInt16 nLangRes = RES_CHRATR_LANGUAGE;
if ( i18n::ScriptType::ASIAN == nScript )
nLangRes = RES_CHRATR_CJK_LANGUAGE;
@@ -1578,8 +1578,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
SwDoc* pDoc = mrSh.GetDoc();
mrSh.SwCrsrShell::Push();
mrSh.SwCrsrShell::ClearMark();
- const BOOL bOldLockView = mrSh.IsViewLocked();
- mrSh.LockView( TRUE );
+ const sal_Bool bOldLockView = mrSh.IsViewLocked();
+ mrSh.LockView( sal_True );
if ( !mbEditEngineOnly )
{
@@ -1622,7 +1622,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
SvNumberFormatter* pNumFormatter = pDoc->GetNumberFormatter();
const Date aDateDiff( pField->GetDate() -
*pNumFormatter->GetNullDate() );
- const ULONG nFormat =
+ const sal_uLong nFormat =
pNumFormatter->GetStandardFormat( NUMBERFORMAT_DATE, pField->GetLanguage() );
String sDate;
Color* pColor;
@@ -1717,8 +1717,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// <--
// Create links for all selected rectangles:
- const USHORT nNumOfRects = aTmp.Count();
- for ( USHORT i = 0; i < nNumOfRects; ++i )
+ const sal_uInt16 nNumOfRects = aTmp.Count();
+ for ( sal_uInt16 i = 0; i < nNumOfRects; ++i )
{
// Link Rectangle
const SwRect& rLinkRect( aTmp[ i ] );
@@ -1764,7 +1764,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
const SwFrmFmt* pFrmFmt = (*pTbl)[n];
const SfxPoolItem* pItem;
if ( RES_DRAWFRMFMT != pFrmFmt->Which() &&
- SFX_ITEM_SET == pFrmFmt->GetAttrSet().GetItemState( RES_URL, TRUE, &pItem ) )
+ SFX_ITEM_SET == pFrmFmt->GetAttrSet().GetItemState( RES_URL, sal_True, &pItem ) )
{
String aURL( static_cast<const SwFmtURL*>(pItem)->GetURL() );
const bool bIntern = '#' == aURL.GetChar( 0 );
@@ -1881,8 +1881,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// <--
// Create links for all selected rectangles:
- const USHORT nNumOfRects = aTmp.Count();
- for ( USHORT i = 0; i < nNumOfRects; ++i )
+ const sal_uInt16 nNumOfRects = aTmp.Count();
+ for ( sal_uInt16 i = 0; i < nNumOfRects; ++i )
{
// Link rectangle
const SwRect& rLinkRect( aTmp[ i ] );
@@ -1922,8 +1922,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
//
// FOOTNOTES
//
- const USHORT nFtnCount = pDoc->GetFtnIdxs().Count();
- for ( USHORT nIdx = 0; nIdx < nFtnCount; ++nIdx )
+ const sal_uInt16 nFtnCount = pDoc->GetFtnIdxs().Count();
+ for ( sal_uInt16 nIdx = 0; nIdx < nFtnCount; ++nIdx )
{
// Set cursor to text node that contains the footnote:
const SwTxtFtn* pTxtFtn = pDoc->GetFtnIdxs()[ nIdx ];
@@ -2124,7 +2124,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// Restore view, cursor, and outdev:
mrSh.LockView( bOldLockView );
- mrSh.SwCrsrShell::Pop( FALSE );
+ mrSh.SwCrsrShell::Pop( sal_False );
mrOut.Pop();
}
diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx
index 62df7e0499db..f5b8f87fe25c 100644
--- a/sw/source/core/text/atrhndl.hxx
+++ b/sw/source/core/text/atrhndl.hxx
@@ -38,7 +38,7 @@ class SwAttrSet;
class IDocumentSettingAccess;
class ViewShell;
class SfxPoolItem;
-extern const BYTE StackPos[];
+extern const sal_uInt8 StackPos[];
/*************************************************************************
* class SwAttrHandler
@@ -62,8 +62,8 @@ private:
private:
SwTxtAttr* pInitialArray[ INITIAL_NUM_ATTR ];
SwTxtAttr** pArray;
- USHORT nCount; // number of elements on stack
- USHORT nSize; // number of positions in Array
+ sal_uInt16 nCount; // number of elements on stack
+ sal_uInt16 nSize; // number of positions in Array
public:
// Ctor, Dtor
@@ -78,7 +78,7 @@ private:
inline void Push( const SwTxtAttr& rAttr ) { Insert( rAttr, nCount ); };
// insert at specified position, take care for not inserting behind
// the value returned by Count()
- void Insert( const SwTxtAttr& rAttr, const USHORT nPos );
+ void Insert( const SwTxtAttr& rAttr, const sal_uInt16 nPos );
// remove specified attribute
void Remove( const SwTxtAttr& rAttr );
@@ -87,11 +87,11 @@ private:
const SwTxtAttr* Top() const;
// number of elements on stack
- inline USHORT Count() const { return nCount; };
+ inline sal_uInt16 Count() const { return nCount; };
// returns position of rAttr on Stack if found, otherwise USHRT_MAX
// can be used for Remove of an attribute
- USHORT Pos( const SwTxtAttr& rAttr ) const;
+ sal_uInt16 Pos( const SwTxtAttr& rAttr ) const;
};
SwAttrStack aAttrStack[ NUM_ATTRIBUTE_STACKS ]; // stack collection
@@ -114,7 +114,7 @@ private:
sal_Bool Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem );
// apply top attribute on stack to font
- void ActivateTop( SwFont& rFnt, USHORT nStackPos );
+ void ActivateTop( SwFont& rFnt, sal_uInt16 nStackPos );
public:
// Ctor
@@ -141,21 +141,21 @@ public:
void Pop( const SwTxtAttr& rAttr );
// apply script dependent attributes
-// void ChangeScript( SwFont& rFnt, const BYTE nScr );
+// void ChangeScript( SwFont& rFnt, const sal_uInt8 nScr );
// returns the default value for stack nStack
- inline const SfxPoolItem& GetDefault( const USHORT nAttribID ) const;
+ inline const SfxPoolItem& GetDefault( const sal_uInt16 nAttribID ) const;
// do not call these if you only used the small init function
inline void ResetFont( SwFont& rFnt ) const;
inline const SwFont* GetFont() const;
void GetDefaultAscentAndHeight(ViewShell* pShell,
OutputDevice& rOut,
- USHORT& nAscent,
- USHORT& nHeight) const;
+ sal_uInt16& nAscent,
+ sal_uInt16& nHeight) const;
};
-inline const SfxPoolItem& SwAttrHandler::GetDefault( const USHORT nAttribID ) const
+inline const SfxPoolItem& SwAttrHandler::GetDefault( const sal_uInt16 nAttribID ) const
{
ASSERT( nAttribID < RES_TXTATR_END,
"this attrib does not ex."
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index e4518a26eb0d..63f3c22151b3 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -81,8 +81,8 @@
* Also adjust NUM_ATTRIBUTE_STACKS in atrhndl.hxx.
*************************************************************************/
-const BYTE StackPos[ static_cast<USHORT>(RES_TXTATR_WITHEND_END) -
- static_cast<USHORT>(RES_CHRATR_BEGIN) + 1 ] =
+const sal_uInt8 StackPos[ static_cast<sal_uInt16>(RES_TXTATR_WITHEND_END) -
+ static_cast<sal_uInt16>(RES_CHRATR_BEGIN) + 1 ] =
{
0, // // 0
1, // RES_CHRATR_CASEMAP = RES_CHRATR_BEGIN // 1
@@ -173,7 +173,7 @@ const SfxItemSet* GetItemSet( const SfxPoolItem& rAttr )
* extracts pool item of type nWhich from rAttr
*************************************************************************/
-const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, USHORT nWhich )
+const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, sal_uInt16 nWhich )
{
if ( RES_TXTATR_INETFMT == rAttr.Which() ||
RES_TXTATR_CHARFMT == rAttr.Which() ||
@@ -184,7 +184,7 @@ const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, USHORT nWhich )
bool bInParent = RES_TXTATR_AUTOFMT != rAttr.Which();
const SfxPoolItem* pItem;
- BOOL bRet = SFX_ITEM_SET == pSet->GetItemState( nWhich, bInParent, &pItem );
+ sal_Bool bRet = SFX_ITEM_SET == pSet->GetItemState( nWhich, bInParent, &pItem );
return bRet ? pItem : 0;
}
@@ -197,13 +197,13 @@ const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, USHORT nWhich )
* checks if item is included in character/inet/auto style
*************************************************************************/
-BOOL IsItemIncluded( const USHORT nWhich, const SwTxtAttr *pAttr )
+sal_Bool IsItemIncluded( const sal_uInt16 nWhich, const SwTxtAttr *pAttr )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SfxItemSet* pItemSet = CharFmt::GetItemSet( pAttr->GetAttr() );
if ( pItemSet )
- bRet = SFX_ITEM_SET == pItemSet->GetItemState( nWhich, TRUE );
+ bRet = SFX_ITEM_SET == pItemSet->GetItemState( nWhich, sal_True );
return bRet;
}
@@ -248,7 +248,7 @@ bool lcl_ChgHyperLinkColor( const SwTxtAttr& rAttr,
rInetAttr.SetVisited( false );
const SwCharFmt* pTmpFmt = ((SwTxtINetFmt&)rAttr).GetCharFmt();
const SfxPoolItem* pItem;
- pTmpFmt->GetItemState( RES_CHRATR_COLOR, TRUE, &pItem );
+ pTmpFmt->GetItemState( RES_CHRATR_COLOR, sal_True, &pItem );
*pColor = ((SvxColorItem*)pItem)->GetValue();
rInetAttr.SetVisited( true );
}
@@ -304,7 +304,7 @@ inline SwAttrHandler::SwAttrStack::SwAttrStack()
* SwAttrHandler::SwAttrStack::Insert()
*************************************************************************/
-void SwAttrHandler::SwAttrStack::Insert( const SwTxtAttr& rAttr, const USHORT nPos )
+void SwAttrHandler::SwAttrStack::Insert( const SwTxtAttr& rAttr, const sal_uInt16 nPos )
{
// do we still have enough space?
if ( nCount >= nSize )
@@ -349,7 +349,7 @@ void SwAttrHandler::SwAttrStack::Insert( const SwTxtAttr& rAttr, const USHORT nP
void SwAttrHandler::SwAttrStack::Remove( const SwTxtAttr& rAttr )
{
- USHORT nPos = Pos( rAttr );
+ sal_uInt16 nPos = Pos( rAttr );
if ( nPos < nCount )
{
memmove( pArray + nPos, pArray + nPos + 1,
@@ -372,13 +372,13 @@ const SwTxtAttr* SwAttrHandler::SwAttrStack::Top() const
* SwAttrHandler::SwAttrStack::Pos()
*************************************************************************/
-USHORT SwAttrHandler::SwAttrStack::Pos( const SwTxtAttr& rAttr ) const
+sal_uInt16 SwAttrHandler::SwAttrStack::Pos( const SwTxtAttr& rAttr ) const
{
if ( ! nCount )
// empty stack
return USHRT_MAX;
- for ( USHORT nIdx = nCount; nIdx > 0; )
+ for ( sal_uInt16 nIdx = nCount; nIdx > 0; )
{
if ( &rAttr == pArray[ --nIdx ] )
return nIdx;
@@ -414,8 +414,8 @@ void SwAttrHandler::Init( const SwAttrSet& rAttrSet,
mpIDocumentSettingAccess = &rIDocumentSettingAcces;
mpShell = pSh;
- for ( USHORT i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++ )
- pDefaultArray[ StackPos[ i ] ] = &rAttrSet.Get( i, TRUE );
+ for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++ )
+ pDefaultArray[ StackPos[ i ] ] = &rAttrSet.Get( i, sal_True );
}
void SwAttrHandler::Init( const SfxPoolItem** pPoolItem, const SwAttrSet* pAS,
@@ -436,9 +436,9 @@ void SwAttrHandler::Init( const SfxPoolItem** pPoolItem, const SwAttrSet* pAS,
if ( pAS && pAS->Count() )
{
SfxItemIter aIter( *pAS );
- USHORT nWhich;
+ sal_uInt16 nWhich;
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
nWhich = pItem->Which();
if (isCHRATR(nWhich))
@@ -462,7 +462,7 @@ void SwAttrHandler::Init( const SfxPoolItem** pPoolItem, const SwAttrSet* pAS,
void SwAttrHandler::Reset( )
{
- for ( USHORT i = 0; i < NUM_ATTRIBUTE_STACKS; i++ )
+ for ( sal_uInt16 i = 0; i < NUM_ATTRIBUTE_STACKS; i++ )
aAttrStack[ i ].Reset();
}
@@ -481,10 +481,10 @@ void SwAttrHandler::PushAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
const SfxItemSet* pSet = CharFmt::GetItemSet( rAttr.GetAttr() );
if ( !pSet ) return;
- for ( USHORT i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
+ for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
{
const SfxPoolItem* pItem;
- BOOL bRet = SFX_ITEM_SET == pSet->GetItemState( i, rAttr.Which() != RES_TXTATR_AUTOFMT, &pItem );
+ sal_Bool bRet = SFX_ITEM_SET == pSet->GetItemState( i, rAttr.Which() != RES_TXTATR_AUTOFMT, &pItem );
if ( bRet )
{
@@ -527,7 +527,7 @@ sal_Bool SwAttrHandler::Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem )
if ( RES_TXTATR_WITHEND_END <= rItem.Which() )
return sal_False;
- USHORT nStack = StackPos[ rItem.Which() ];
+ sal_uInt16 nStack = StackPos[ rItem.Which() ];
// attributes originating from redlining have highest priority
// second priority are hyperlink attributes, which have a color replacement
@@ -540,7 +540,7 @@ sal_Bool SwAttrHandler::Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem )
return sal_True;
}
- USHORT nPos = aAttrStack[ nStack ].Count();
+ sal_uInt16 nPos = aAttrStack[ nStack ].Count();
ASSERT( nPos, "empty stack?" );
aAttrStack[ nStack ].Insert( rAttr, nPos - 1 );
return sal_False;
@@ -564,14 +564,14 @@ void SwAttrHandler::PopAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
const SfxItemSet* pSet = CharFmt::GetItemSet( rAttr.GetAttr() );
if ( !pSet ) return;
- for ( USHORT i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
+ for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
{
const SfxPoolItem* pItem;
- BOOL bRet = SFX_ITEM_SET == pSet->GetItemState( i, RES_TXTATR_AUTOFMT != rAttr.Which(), &pItem );
+ sal_Bool bRet = SFX_ITEM_SET == pSet->GetItemState( i, RES_TXTATR_AUTOFMT != rAttr.Which(), &pItem );
if ( bRet )
{
// we remove rAttr from the appropriate stack
- USHORT nStackPos = StackPos[ i ];
+ sal_uInt16 nStackPos = StackPos[ i ];
aAttrStack[ nStackPos ].Remove( rAttr );
// reset font according to attribute on top of stack
// or default value
@@ -610,12 +610,12 @@ void SwAttrHandler::Pop( const SwTxtAttr& rAttr )
/*************************************************************************
* SwAttrHandler::ActivateTop()
*************************************************************************/
-void SwAttrHandler::ActivateTop( SwFont& rFnt, const USHORT nAttr )
+void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr )
{
ASSERT( nAttr < RES_TXTATR_WITHEND_END,
"I cannot activate this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
- const USHORT nStackPos = StackPos[ nAttr ];
+ const sal_uInt16 nStackPos = StackPos[ nAttr ];
const SwTxtAttr* pTopAt = aAttrStack[ nStackPos ].Top();
if ( pTopAt )
{
@@ -656,7 +656,7 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const USHORT nAttr )
{
// ruby stack has no more attributes
// check, if an rotation attribute has to be applied
- USHORT nTwoLineStack = StackPos[ RES_CHRATR_TWO_LINES ];
+ sal_uInt16 nTwoLineStack = StackPos[ RES_CHRATR_TWO_LINES ];
sal_Bool bTwoLineAct = sal_False;
const SfxPoolItem* pTwoLineItem = 0;
const SwTxtAttr* pTwoLineAttr = aAttrStack[ nTwoLineStack ].Top();
@@ -674,7 +674,7 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const USHORT nAttr )
return;
// eventually, an rotate attribute has to be activated
- USHORT nRotateStack = StackPos[ RES_CHRATR_ROTATE ];
+ sal_uInt16 nRotateStack = StackPos[ RES_CHRATR_ROTATE ];
const SfxPoolItem* pRotateItem = 0;
const SwTxtAttr* pRotateAttr = aAttrStack[ nRotateStack ].Top();
@@ -744,7 +744,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, sal_Bool bPu
break;
case RES_CHRATR_UNDERLINE :
{
- const USHORT nStackPos = StackPos[ RES_CHRATR_HIDDEN ];
+ const sal_uInt16 nStackPos = StackPos[ RES_CHRATR_HIDDEN ];
const SwTxtAttr* pTopAt = aAttrStack[ nStackPos ].Top();
const SfxPoolItem* pTmpItem = pTopAt ?
@@ -856,7 +856,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, sal_Bool bPu
if ( bRuby )
break;
- USHORT nTwoLineStack = StackPos[ RES_CHRATR_TWO_LINES ];
+ sal_uInt16 nTwoLineStack = StackPos[ RES_CHRATR_TWO_LINES ];
sal_Bool bTwoLineAct = sal_False;
const SfxPoolItem* pTwoLineItem = 0;
const SwTxtAttr* pTwoLineAttr = aAttrStack[ nTwoLineStack ].Top();
@@ -898,7 +898,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, sal_Bool bPu
if ( bRuby )
break;
- USHORT nRotateStack = StackPos[ RES_CHRATR_ROTATE ];
+ sal_uInt16 nRotateStack = StackPos[ RES_CHRATR_ROTATE ];
const SfxPoolItem* pRotateItem = 0;
const SwTxtAttr* pRotateAttr = aAttrStack[ nRotateStack ].Top();
@@ -942,7 +942,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, sal_Bool bPu
// Takes the default font and calculated the ascent and height
void SwAttrHandler::GetDefaultAscentAndHeight( ViewShell* pShell, OutputDevice& rOut,
- USHORT& nAscent, USHORT& nHeight ) const
+ sal_uInt16& nAscent, sal_uInt16& nHeight ) const
{
ASSERT( pFnt, "No font available for GetDefaultAscentAndHeight" )
diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx
index 717bf0170179..611f167bbea2 100644
--- a/sw/source/core/text/blink.cxx
+++ b/sw/source/core/text/blink.cxx
@@ -136,7 +136,7 @@ IMPL_LINK( SwBlink, Blinker, Timer *, EMPTYARG )
}
void SwBlink::Insert( const Point& rPoint, const SwLinePortion* pPor,
- const SwTxtFrm *pTxtFrm, USHORT nDir )
+ const SwTxtFrm *pTxtFrm, sal_uInt16 nDir )
{
SwBlinkPortion *pBlinkPor = new SwBlinkPortion( pPor, nDir );
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index aeddb97d3f83..37fb9fbc5747 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -79,7 +79,7 @@ using namespace ::com::sun::star;
*************************************************************************/
SwTxtFrm *GetAdjFrmAtPos( SwTxtFrm *pFrm, const SwPosition &rPos,
- const sal_Bool bRightMargin, const sal_Bool bNoScroll = TRUE )
+ const sal_Bool bRightMargin, const sal_Bool bNoScroll = sal_True )
{
// 8810: vgl. 1170, RightMargin in der letzten Masterzeile...
const xub_StrLen nOffset = rPos.nContent.GetIndex();
@@ -437,7 +437,7 @@ sal_Bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
SwTxtSizeInfo aInf( pFrm );
SwTxtCursor aLine( pFrm, &aInf );
SwCrsrMoveState aTmpState( MV_SETONLYTEXT );
- aTmpState.bRealHeight = TRUE;
+ aTmpState.bRealHeight = sal_True;
if( aLine.GetCharRect( &rOrig, nOffset, &aTmpState, nMaxY ) )
{
if( aTmpState.aRealHeight.X() >= 0 )
@@ -885,7 +885,7 @@ sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
// siehe Kommentar in SwTxtFrm::GetCrsrOfst()
#ifdef DBG_UTIL
- const ULONG nOldNode = pPam->GetPoint()->nNode.GetIndex();
+ const sal_uLong nOldNode = pPam->GetPoint()->nNode.GetIndex();
#endif
// Der Node soll nicht gewechselt werden
xub_StrLen nTmpOfst = aLine.GetCrsrOfst( pPam->GetPoint(),
@@ -954,7 +954,7 @@ sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
// current position
void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, xub_StrLen nIdx,
xub_StrLen& nPos, sal_Bool& bRight,
- BYTE& nCrsrLevel, BYTE nDefaultDir )
+ sal_uInt8& nCrsrLevel, sal_uInt8 nDefaultDir )
{
const SwLinePortion* pPor = rCurrLine.GetFirstPortion();
const SwLinePortion* pLast = 0;
@@ -1009,7 +1009,7 @@ void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, xub_StrLen nIdx,
const SwLineLayout& rLine = ((SwMultiPortion*)pPor)->GetRoot();
xub_StrLen nTmpPos = nPos - nIdx;
sal_Bool bTmpForward = ! bRight;
- BYTE nTmpCrsrLevel = nCrsrLevel;
+ sal_uInt8 nTmpCrsrLevel = nCrsrLevel;
lcl_VisualMoveRecursion( rLine, 0, nTmpPos, bTmpForward,
nTmpCrsrLevel, nDefaultDir + 1 );
@@ -1068,7 +1068,7 @@ void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, xub_StrLen nIdx,
const SwLineLayout& rLine = ((SwMultiPortion*)pPor)->GetRoot();
xub_StrLen nTmpPos = nPos - nIdx;
sal_Bool bTmpForward = ! bRight;
- BYTE nTmpCrsrLevel = nCrsrLevel;
+ sal_uInt8 nTmpCrsrLevel = nCrsrLevel;
lcl_VisualMoveRecursion( rLine, 0, nTmpPos, bTmpForward,
nTmpCrsrLevel, nDefaultDir + 1 );
@@ -1097,7 +1097,7 @@ void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, xub_StrLen nIdx,
}
}
-void SwTxtFrm::PrepareVisualMove( xub_StrLen& nPos, BYTE& nCrsrLevel,
+void SwTxtFrm::PrepareVisualMove( xub_StrLen& nPos, sal_uInt8& nCrsrLevel,
sal_Bool& bForward, sal_Bool bInsertCrsr )
{
if( IsEmpty() || IsHiddenNow() )
@@ -1133,7 +1133,7 @@ void SwTxtFrm::PrepareVisualMove( xub_StrLen& nPos, BYTE& nCrsrLevel,
return;
}
- const BYTE nDefaultDir = static_cast<BYTE>(IsRightToLeft() ? UBIDI_RTL : UBIDI_LTR);
+ const sal_uInt8 nDefaultDir = static_cast<sal_uInt8>(IsRightToLeft() ? UBIDI_RTL : UBIDI_LTR);
const sal_Bool bVisualRight = ( nDefaultDir == UBIDI_LTR && bForward ) ||
( nDefaultDir == UBIDI_RTL && ! bForward );
@@ -1252,7 +1252,7 @@ sal_Bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
aCharBox.SSize().Width() /= 2;
#ifdef DBG_UTIL
// siehe Kommentar in SwTxtFrm::GetCrsrOfst()
- const ULONG nOldNode = pPam->GetPoint()->nNode.GetIndex();
+ const sal_uLong nOldNode = pPam->GetPoint()->nNode.GetIndex();
#endif
if ( pNextLine && ! bFirstOfDouble )
aLine.NextLine();
@@ -1471,7 +1471,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
nFirst = 0;
}
else if( nDist < nFirst )
- nFirst = nFirst - (USHORT)nDist;
+ nFirst = nFirst - (sal_uInt16)nDist;
else
nFirst = 0;
nDist = Max( nDist, long( GetLineSpace() ) );
@@ -1481,7 +1481,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
if( nDiff > 0 )
{
nDiff /= nDist;
- rFill.Fill().nParaCnt = static_cast<USHORT>(nDiff + 1);
+ rFill.Fill().nParaCnt = static_cast<sal_uInt16>(nDiff + 1);
rFill.nLineWidth = 0;
rFill.bInner = sal_False;
rFill.bEmpty = sal_True;
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index f70caa7ea710..27473ccac4fc 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -641,7 +641,7 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
{
SwFtnBossFrm *pFtnBoss = 0;
SwFtnBossFrm *pEndBoss = 0;
- for ( USHORT i = 0; i < pHints->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pHints->Count(); ++i )
{
const SwTxtAttr *pHt = (*pHints)[i];
if( RES_TXTATR_FTN==pHt->Which() && *pHt->GetStart()>=nStart )
@@ -674,7 +674,7 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
#endif
pFoll->MoveFlyInCnt( this, nStart, STRING_LEN );
- pFoll->SetFtn( FALSE );
+ pFoll->SetFtn( sal_False );
// --> OD 2005-12-01 #i27138#
// notify accessibility paragraphs objects about changed CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for current next paragraph will change
@@ -741,7 +741,7 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const xub_StrLen nTxtPos )
{
SwFtnBossFrm *pFtnBoss = 0;
SwFtnBossFrm *pEndBoss = 0;
- for ( USHORT i = 0; i < pHints->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pHints->Count(); ++i )
{
const SwTxtAttr *pHt = (*pHints)[i];
if( RES_TXTATR_FTN==pHt->Which() && *pHt->GetStart()>=nTxtPos )
@@ -1150,7 +1150,7 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
// FME 16.07.2003 #i16930# - removed this code because it did not
// work correctly. In SwCntntFrm::MakeAll, the frame did not move to the
// next page, instead the print area was recalculated and
- // Prepare( PREP_POS_CHGD, (const void*)&bFormatted, FALSE ) invalidated
+ // Prepare( PREP_POS_CHGD, (const void*)&bFormatted, sal_False ) invalidated
// the other flags => loop
// OD 04.04.2003 #108446# - handle special case:
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 9babcdde2b79..369109efb918 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -94,7 +94,7 @@ class SwExtraPainter
const SwLineNumberInfo &rLineInf;
SwTwips nX;
SwTwips nRedX;
- ULONG nLineNr;
+ sal_uLong nLineNr;
MSHORT nDivider;
sal_Bool bGoLeft;
sal_Bool bLineNum;
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 4c9ad8022157..9c341c3838ea 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -78,13 +78,13 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
ASSERT( nPorHeight, "+SwTxtGuess::Guess: no height" );
- USHORT nMinSize;
- USHORT nMaxSizeDiff;
+ sal_uInt16 nMinSize;
+ sal_uInt16 nMaxSizeDiff;
const SwScriptInfo& rSI =
((SwParaPortion*)rInf.GetParaPortion())->GetScriptInfo();
- USHORT nMaxComp = ( SW_CJK == rInf.GetFont()->GetActual() ) &&
+ sal_uInt16 nMaxComp = ( SW_CJK == rInf.GetFont()->GetActual() ) &&
rSI.CountCompChg() &&
! rInf.IsMulti() &&
! rPor.InFldGrp() &&
@@ -150,7 +150,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// save maximum width for later use
if ( nMaxSizeDiff )
- rInf.SetMaxWidthDiff( (ULONG)&rPor, nMaxSizeDiff );
+ rInf.SetMaxWidthDiff( (sal_uLong)&rPor, nMaxSizeDiff );
return sal_True;
}
@@ -201,7 +201,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// save maximum width for later use
if ( nMaxSizeDiff )
- rInf.SetMaxWidthDiff( (ULONG)&rPor, nMaxSizeDiff );
+ rInf.SetMaxWidthDiff( (sal_uLong)&rPor, nMaxSizeDiff );
return sal_True;
}
@@ -327,7 +327,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// we have to check the script type of the last "real" character
if ( nLangIndex < rInf.GetIdx() )
{
- USHORT nScript = pBreakIt->GetRealScriptOfText( rInf.GetTxt(),
+ sal_uInt16 nScript = pBreakIt->GetRealScriptOfText( rInf.GetTxt(),
nLangIndex );
ASSERT( nScript, "Script is not between 1 and 4" );
@@ -394,10 +394,10 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// e.g., Schiff-fahrt, referes to the word after hyphenation
const String aHyphenatedWord = xHyphWord->getHyphenatedWord();
// e.g., Schif-fahrt: 5, referes to our string
- const USHORT nHyphenationPos = xHyphWord->getHyphenationPos();
+ const sal_uInt16 nHyphenationPos = xHyphWord->getHyphenationPos();
(void)nHyphenationPos;
// e.g., Schiff-fahrt: 6, referes to the word after hyphenation
- const USHORT nHyphenPos = xHyphWord->getHyphenPos();
+ const sal_uInt16 nHyphenPos = xHyphWord->getHyphenPos();
(void)nHyphenPos;
#endif
@@ -504,7 +504,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// save maximum width for later use
if ( nMaxSizeDiff )
- rInf.SetMaxWidthDiff( (ULONG)&rPor, nMaxSizeDiff );
+ rInf.SetMaxWidthDiff( (sal_uLong)&rPor, nMaxSizeDiff );
nBreakWidth = nItalic + nMinSize;
}
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 1fe2c363d70e..c8300820a8f2 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -180,7 +180,7 @@ void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet,
pRuler->Insert( aListTabStop );
// remove default tab stops, which are before the inserted list tab stop
- for ( USHORT i = 0; i < pRuler->Count(); i++ )
+ for ( sal_uInt16 i = 0; i < pRuler->Count(); i++ )
{
if ( (*pRuler)[i].GetTabPos() < nListTabStopPosition &&
(*pRuler)[i].GetAdjustment() == SVX_TAB_ADJUST_DEFAULT )
@@ -195,7 +195,7 @@ void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet,
if ( !rTxtNode.getIDocumentSettingAccess()->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT) )
{
// remove default tab stop at position 0
- for ( USHORT i = 0; i < pRuler->Count(); i++ )
+ for ( sal_uInt16 i = 0; i < pRuler->Count(); i++ )
{
if ( (*pRuler)[i].GetTabPos() == 0 &&
(*pRuler)[i].GetAdjustment() == SVX_TAB_ADJUST_DEFAULT )
@@ -453,7 +453,7 @@ SwPosSize SwTxtSizeInfo::GetTxtSize( OutputDevice* pOutDev,
const XubString& rTxt,
const xub_StrLen nIndex,
const xub_StrLen nLength,
- const USHORT nComp ) const
+ const sal_uInt16 nComp ) const
{
SwDrawTextInfo aDrawInf( pVsh, *pOutDev, pSI, rTxt, nIndex, nLength );
aDrawInf.SetFrm( pFrm );
@@ -475,7 +475,7 @@ SwPosSize SwTxtSizeInfo::GetTxtSize() const
// in some cases, compression is not allowed or surpressed for
// performance reasons
- USHORT nComp =( SW_CJK == GetFont()->GetActual() &&
+ sal_uInt16 nComp =( SW_CJK == GetFont()->GetActual() &&
rSI.CountCompChg() &&
! IsMulti() ) ?
GetKanaComp() :
@@ -494,8 +494,8 @@ SwPosSize SwTxtSizeInfo::GetTxtSize() const
*************************************************************************/
void SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIndex,
- const xub_StrLen nLength, const USHORT nComp,
- USHORT& nMinSize, USHORT& nMaxSizeDiff ) const
+ const xub_StrLen nLength, const sal_uInt16 nComp,
+ sal_uInt16& nMinSize, sal_uInt16& nMaxSizeDiff ) const
{
SwDrawTextInfo aDrawInf( pVsh, *pOut, pSI, *pTxt, nIndex, nLength );
aDrawInf.SetFrm( pFrm );
@@ -503,7 +503,7 @@ void SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIndex
aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp );
SwPosSize aSize = pFnt->_GetTxtSize( aDrawInf );
- nMaxSizeDiff = (USHORT)aDrawInf.GetKanaDiff();
+ nMaxSizeDiff = (sal_uInt16)aDrawInf.GetKanaDiff();
nMinSize = aSize.Width();
}
@@ -513,7 +513,7 @@ void SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIndex
xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
const xub_StrLen nMaxLen,
- const USHORT nComp ) const
+ const sal_uInt16 nComp ) const
{
const SwScriptInfo& rScriptInfo =
( (SwParaPortion*)GetParaPortion() )->GetScriptInfo();
@@ -536,7 +536,7 @@ xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
const xub_StrLen nMaxLen,
- const USHORT nComp,
+ const sal_uInt16 nComp,
xub_StrLen& rExtraCharPos ) const
{
const SwScriptInfo& rScriptInfo =
@@ -624,7 +624,7 @@ sal_Bool lcl_IsDarkBackground( const SwTxtPaintInfo& rInf )
/// OD 21.08.2002 #99657#
/// There is a background color, if there is a background brush and
/// its color is *not* "no fill"/"auto fill".
- if( rInf.GetTxtFrm()->GetBackgroundBrush( pItem, pCol, aOrigBackRect, FALSE ) )
+ if( rInf.GetTxtFrm()->GetBackgroundBrush( pItem, pCol, aOrigBackRect, sal_False ) )
{
if ( !pCol )
pCol = &pItem->GetColor();
@@ -698,7 +698,7 @@ void SwTxtPaintInfo::_DrawText( const XubString &rText, const SwLinePortion &rPo
// in some cases, kana compression is not allowed or surpressed for
// performance reasons
- USHORT nComp = 0;
+ sal_uInt16 nComp = 0;
if ( ! IsMulti() )
nComp = GetKanaComp();
@@ -818,8 +818,8 @@ void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor,
}
// Adjust x coordinate if we are inside a bidi portion
- const BOOL bFrmDir = GetTxtFrm()->IsRightToLeft();
- BOOL bCounterDir = ( ! bFrmDir && DIR_RIGHT2LEFT == GetDirection() ) ||
+ const sal_Bool bFrmDir = GetTxtFrm()->IsRightToLeft();
+ sal_Bool bCounterDir = ( ! bFrmDir && DIR_RIGHT2LEFT == GetDirection() ) ||
( bFrmDir && DIR_LEFT2RIGHT == GetDirection() );
if ( bCounterDir )
@@ -863,7 +863,7 @@ void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor,
static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rPor,
SwRect& rRect, const Color* pCol, sal_Unicode cChar,
- BYTE nOptions )
+ sal_uInt8 nOptions )
{
sal_Bool bCenter = 0 != ( nOptions & DRAW_SPECIAL_OPTIONS_CENTER );
sal_Bool bRotate = 0 != ( nOptions & DRAW_SPECIAL_OPTIONS_ROTATE );
@@ -904,7 +904,7 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
((SwTxtPaintInfo&)rInf).SetFont( pFnt );
// The maximum width depends on the current orientation
- const USHORT nDir = pFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
+ const sal_uInt16 nDir = pFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
SwTwips nMaxWidth = 0;
switch ( nDir )
{
@@ -929,7 +929,7 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
const SwTwips nOldWidth = aFontSize.Width();
// new height for font
- const BYTE nAct = pFnt->GetActual();
+ const sal_uInt8 nAct = pFnt->GetActual();
aFontSize.Height() = ( 100 * pFnt->GetSize( nAct ).Height() ) / nFactor;
aFontSize.Width() = ( 100 * pFnt->GetSize( nAct).Width() ) / nFactor;
@@ -970,8 +970,8 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
Point aTmpPos( nX, nY );
((SwTxtPaintInfo&)rInf).SetPos( aTmpPos );
- USHORT nOldWidth = rPor.Width();
- ((SwLinePortion&)rPor).Width( (USHORT)aFontSize.Width() );
+ sal_uInt16 nOldWidth = rPor.Width();
+ ((SwLinePortion&)rPor).Width( (sal_uInt16)aFontSize.Width() );
rInf.DrawText( aTmp, rPor );
((SwLinePortion&)rPor).Width( nOldWidth );
((SwTxtPaintInfo&)rInf).SetFont( (SwFont*)pOldFnt );
@@ -1016,7 +1016,7 @@ void SwTxtPaintInfo::DrawTab( const SwLinePortion &rPor ) const
const sal_Unicode cChar = GetTxtFrm()->IsRightToLeft() ?
CHAR_TAB_RTL : CHAR_TAB;
- const BYTE nOptions = DRAW_SPECIAL_OPTIONS_CENTER |
+ const sal_uInt8 nOptions = DRAW_SPECIAL_OPTIONS_CENTER |
DRAW_SPECIAL_OPTIONS_ROTATE;
lcl_DrawSpecial( *this, rPor, aRect, 0, cChar, nOptions );
}
@@ -1040,7 +1040,7 @@ void SwTxtPaintInfo::DrawLineBreak( const SwLinePortion &rPor ) const
{
const sal_Unicode cChar = GetTxtFrm()->IsRightToLeft() ?
CHAR_LINEBREAK_RTL : CHAR_LINEBREAK;
- const BYTE nOptions = 0;
+ const sal_uInt8 nOptions = 0;
lcl_DrawSpecial( *this, rPor, aRect, 0, cChar, nOptions );
}
@@ -1082,7 +1082,7 @@ void SwTxtPaintInfo::DrawRedArrow( const SwLinePortion &rPor ) const
if( aRect.HasArea() )
{
- const BYTE nOptions = 0;
+ const sal_uInt8 nOptions = 0;
lcl_DrawSpecial( *this, rPor, aRect, &aCol, cChar, nOptions );
}
}
@@ -1099,9 +1099,9 @@ void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, sal_Bool bScript ) const
Size aSize;
Point aTmp;
- const USHORT nPostItsWidth = pOpt->GetPostItsWidth( GetOut() );
- const USHORT nFontHeight = pFnt->GetHeight( pVsh, *GetOut() );
- const USHORT nFontAscent = pFnt->GetAscent( pVsh, *GetOut() );
+ const sal_uInt16 nPostItsWidth = pOpt->GetPostItsWidth( GetOut() );
+ const sal_uInt16 nFontHeight = pFnt->GetHeight( pVsh, *GetOut() );
+ const sal_uInt16 nFontAscent = pFnt->GetAscent( pVsh, *GetOut() );
switch ( pFnt->GetOrientation( GetTxtFrm()->IsVertical() ) )
{
@@ -1339,9 +1339,9 @@ void SwTxtPaintInfo::_NotifyURL( const SwLinePortion &rPor ) const
*************************************************************************/
static void lcl_InitHyphValues( PropertyValues &rVals,
- INT16 nMinLeading, INT16 nMinTrailing )
+ sal_Int16 nMinLeading, sal_Int16 nMinTrailing )
{
- INT32 nLen = rVals.getLength();
+ sal_Int32 nLen = rVals.getLength();
if (0 == nLen) // yet to be initialized?
{
@@ -1396,8 +1396,8 @@ sal_Bool SwTxtFormatInfo::InitHyph( const sal_Bool bAutoHyphen )
nHyphStart = nHyphWrdStart = STRING_LEN;
nHyphWrdLen = 0;
- const INT16 nMinimalLeading = Max(rAttr.GetMinLead(), sal_uInt8(2));
- const INT16 nMinimalTrailing = rAttr.GetMinTrail();
+ const sal_Int16 nMinimalLeading = Max(rAttr.GetMinLead(), sal_uInt8(2));
+ const sal_Int16 nMinimalTrailing = rAttr.GetMinTrail();
lcl_InitHyphValues( aHyphVals, nMinimalLeading, nMinimalTrailing);
}
return bAuto;
@@ -1558,23 +1558,23 @@ SwTxtFormatInfo::SwTxtFormatInfo( const SwTxtFormatInfo& rInf,
nMinLeading = 0;
nMinTrailing = 0;
nMinWordLength = 0;
- bFull = FALSE;
- bFtnDone = TRUE;
- bErgoDone = TRUE;
- bNumDone = TRUE;
- bArrowDone = TRUE;
- bStop = FALSE;
- bNewLine = TRUE;
- bShift = FALSE;
- bUnderFlow = FALSE;
- bInterHyph = FALSE;
- bAutoHyph = FALSE;
- bDropInit = FALSE;
+ bFull = sal_False;
+ bFtnDone = sal_True;
+ bErgoDone = sal_True;
+ bNumDone = sal_True;
+ bArrowDone = sal_True;
+ bStop = sal_False;
+ bNewLine = sal_True;
+ bShift = sal_False;
+ bUnderFlow = sal_False;
+ bInterHyph = sal_False;
+ bAutoHyph = sal_False;
+ bDropInit = sal_False;
bQuick = rInf.bQuick;
- bNoEndHyph = FALSE;
- bNoMidHyph = FALSE;
- bIgnoreFly = FALSE;
- bFakeLineStart = FALSE;
+ bNoEndHyph = sal_False;
+ bNoMidHyph = sal_False;
+ bIgnoreFly = sal_False;
+ bFakeLineStart = sal_False;
cTabDecimal = 0;
cHookChar = 0;
@@ -1718,15 +1718,15 @@ xub_StrLen SwTxtFormatInfo::ScanPortionEnd( const xub_StrLen nStart,
return i;
}
-BOOL SwTxtFormatInfo::LastKernPortion()
+sal_Bool SwTxtFormatInfo::LastKernPortion()
{
if( GetLast() )
{
if( GetLast()->IsKernPortion() )
- return TRUE;
+ return sal_True;
if( GetLast()->Width() || ( GetLast()->GetLen() &&
!GetLast()->IsHolePortion() ) )
- return FALSE;
+ return sal_False;
}
SwLinePortion* pPor = GetRoot();
SwLinePortion *pKern = NULL;
@@ -1741,9 +1741,9 @@ BOOL SwTxtFormatInfo::LastKernPortion()
if( pKern )
{
SetLast( pKern );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1782,7 +1782,7 @@ SwTxtSlot::SwTxtSlot( const SwTxtSizeInfo *pNew, const SwLinePortion *pPor,
pOldSmartTagList = static_cast<SwTxtPaintInfo*>(pInf)->GetSmartTags();
if ( pOldSmartTagList )
{
- const USHORT nPos = pOldSmartTagList->GetWrongPos(nIdx);
+ const sal_uInt16 nPos = pOldSmartTagList->GetWrongPos(nIdx);
const xub_StrLen nListPos = pOldSmartTagList->Pos(nPos);
if( nListPos == nIdx )
((SwTxtPaintInfo*)pInf)->SetSmartTags( pOldSmartTagList->SubList( nPos ) );
@@ -1798,7 +1798,7 @@ SwTxtSlot::SwTxtSlot( const SwTxtSizeInfo *pNew, const SwLinePortion *pPor,
pOldGrammarCheckList = static_cast<SwTxtPaintInfo*>(pInf)->GetGrammarCheckList();
if ( pOldGrammarCheckList )
{
- const USHORT nPos = pOldGrammarCheckList->GetWrongPos(nIdx);
+ const sal_uInt16 nPos = pOldGrammarCheckList->GetWrongPos(nIdx);
const xub_StrLen nListPos = pOldGrammarCheckList->Pos(nPos);
if( nListPos == nIdx )
((SwTxtPaintInfo*)pInf)->SetGrammarCheckList( pOldGrammarCheckList->SubList( nPos ) );
@@ -1903,7 +1903,7 @@ SwFontSave::~SwFontSave()
SwDefFontSave::SwDefFontSave( const SwTxtSizeInfo &rInf )
: pFnt( ((SwTxtSizeInfo&)rInf).GetFont() )
{
- const BOOL bTmpAlter = pFnt->GetFixKerning() ||
+ const sal_Bool bTmpAlter = pFnt->GetFixKerning() ||
( RTL_TEXTENCODING_SYMBOL == pFnt->GetCharSet(pFnt->GetActual()) )
;
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 382c58a6f5c6..065e38a0e563 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -98,7 +98,7 @@ class SwLineInfo
SvxTabStopItem* pRuler;
const SvxLineSpacingItem *pSpace;
- USHORT nVertAlign;
+ sal_uInt16 nVertAlign;
KSHORT nDefTabStop;
// --> OD 2008-02-04 #newlistlevelattrs#
bool bListTabStopIncluded;
@@ -125,14 +125,14 @@ public:
{ ( (SwLineInfo*)this )->nDefTabStop = nNew; }
// vertical alignment
- inline USHORT GetVertAlign() const { return nVertAlign; }
+ inline sal_uInt16 GetVertAlign() const { return nVertAlign; }
inline sal_Bool HasSpecialAlign( sal_Bool bVert ) const
{ return bVert ?
( SvxParaVertAlignItem::BASELINE != nVertAlign ) :
( SvxParaVertAlignItem::BASELINE != nVertAlign &&
SvxParaVertAlignItem::AUTOMATIC != nVertAlign ); }
- USHORT NumberOfTabStops() const;
+ sal_uInt16 NumberOfTabStops() const;
// --> OD 2008-02-04 #newlistlevelattrs#
inline bool IsListTabStopIncluded() const
@@ -202,7 +202,7 @@ protected:
const SwViewOption *pOpt;
const XubString *pTxt;
xub_StrLen nIdx, nLen;
- USHORT nKanaIdx;
+ sal_uInt16 nKanaIdx;
sal_Bool bOnWin : 1;
sal_Bool bNotEOL : 1;
sal_Bool bURLNotify : 1;
@@ -302,13 +302,13 @@ public:
//
SwPosSize GetTxtSize( OutputDevice* pOut, const SwScriptInfo* pSI,
const XubString& rTxt, const xub_StrLen nIdx,
- const xub_StrLen nLen, const USHORT nComp ) const;
+ const xub_StrLen nLen, const sal_uInt16 nComp ) const;
SwPosSize GetTxtSize() const;
void GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIdx,
- const xub_StrLen nLen, const USHORT nComp,
- USHORT& nMinSize, USHORT& nMaxSizeDiff ) const;
+ const xub_StrLen nLen, const sal_uInt16 nComp,
+ sal_uInt16& nMinSize, sal_uInt16& nMaxSizeDiff ) const;
inline SwPosSize GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIdx,
- const xub_StrLen nLen, const USHORT nComp ) const;
+ const xub_StrLen nLen, const sal_uInt16 nComp ) const;
inline SwPosSize GetTxtSize( const XubString &rTxt ) const;
//
@@ -316,10 +316,10 @@ public:
//
xub_StrLen GetTxtBreak( const long nLineWidth,
const xub_StrLen nMaxLen,
- const USHORT nComp ) const;
+ const sal_uInt16 nComp ) const;
xub_StrLen GetTxtBreak( const long nLineWidth,
const xub_StrLen nMaxLen,
- const USHORT nComp,
+ const sal_uInt16 nComp,
xub_StrLen& rExtraCharPos ) const;
inline KSHORT GetAscent() const;
@@ -351,13 +351,13 @@ public:
// space among compressed kanas.
// During formatting, the maximum values of compressable portions are
// stored in aMaxWidth and discarded after a line has been formatted.
- inline void SetMaxWidthDiff( ULONG nKey, USHORT nVal )
+ inline void SetMaxWidthDiff( sal_uLong nKey, sal_uInt16 nVal )
{
aMaxWidth.Insert( nKey, nVal );
};
- inline USHORT GetMaxWidthDiff( ULONG nKey )
+ inline sal_uInt16 GetMaxWidthDiff( sal_uLong nKey )
{
- return (USHORT)aMaxWidth.Get( nKey );
+ return (sal_uInt16)aMaxWidth.Get( nKey );
};
inline void ResetMaxWidthDiff()
{
@@ -377,7 +377,7 @@ public:
inline void IncKanaIdx() { ++nKanaIdx; }
inline void SetKanaComp( SvUShorts *pNew ){ pKanaComp = pNew; }
inline SvUShorts* GetpKanaComp() const { return pKanaComp; }
- inline USHORT GetKanaComp() const
+ inline sal_uInt16 GetKanaComp() const
{ return ( pKanaComp && nKanaIdx < pKanaComp->Count() )
? (*pKanaComp)[nKanaIdx] : 0; }
@@ -542,7 +542,7 @@ class SwTxtFormatInfo : public SwTxtPaintInfo
xub_StrLen nHyphWrdLen; // gefundene Wort-Laenge
xub_StrLen nLineStart; // aktueller Zeilenbeginn im rTxt
xub_StrLen nUnderScorePos; // enlarge repaint if underscore has been found
- // --> FME 2004-11-25 #i34348# Changed type from USHORT to SwTwips
+ // --> FME 2004-11-25 #i34348# Changed type from sal_uInt16 to SwTwips
SwTwips nLeft; // linker Rand
SwTwips nRight; // rechter Rand
SwTwips nFirst; // EZE
@@ -553,9 +553,9 @@ class SwTxtFormatInfo : public SwTxtPaintInfo
KSHORT nLineNettoHeight; // line height without spacing
KSHORT nForcedLeftMargin; // Verschiebung des linken Rands wg. Rahmen
- INT16 nMinLeading; // minimum number of chars before hyphenation point
- INT16 nMinTrailing; // minimum number of chars after hyphenation point
- INT16 nMinWordLength; // minimum length of word to be hyphenated
+ sal_Int16 nMinLeading; // minimum number of chars before hyphenation point
+ sal_Int16 nMinTrailing; // minimum number of chars after hyphenation point
+ sal_Int16 nMinWordLength; // minimum length of word to be hyphenated
sal_Bool bFull : 1; // Zeile ist voll
sal_Bool bFtnDone : 1; // Ftn bereits formatiert
@@ -723,7 +723,7 @@ public:
// ruft HyphenateWord() des Hyphenators
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenatedWord >
- HyphWord( const String &rTxt, const USHORT nMinTrail );
+ HyphWord( const String &rTxt, const sal_uInt16 nMinTrail );
const com::sun::star::beans::PropertyValues &
GetHyphValues() const;
@@ -737,7 +737,7 @@ public:
void Reset( const SwTxtFrm *pFrame); // , const sal_Bool bAll );
// Sets the last SwKernPortion as pLast, if it is followed by empty portions
- BOOL LastKernPortion();
+ sal_Bool LastKernPortion();
// Sucht ab nIdx bis nEnd nach Tabs, TabDec, TXTATR und BRK.
// Return: gefundene Position, setzt ggf. cHookChar
@@ -831,7 +831,7 @@ inline SwPosSize SwTxtSizeInfo::GetTxtSize( const XubString &rTxt ) const
inline SwPosSize SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI,
const xub_StrLen nNewIdx,
const xub_StrLen nNewLen,
- const USHORT nCompress ) const
+ const sal_uInt16 nCompress ) const
{
return GetTxtSize( pOut, pSI, *pTxt, nNewIdx, nNewLen, nCompress );
}
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index b8e361bcae6c..a262b411a4f9 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -176,7 +176,7 @@ bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTxtSizeInfo& rInf, SwTxtIte
}
else
{
- ULONG nOldLayout = rInf.GetOut()->GetLayoutMode();
+ sal_uLong nOldLayout = rInf.GetOut()->GetLayoutMode();
rInf.GetOut()->SetLayoutMode ( nOldLayout | TEXT_LAYOUT_BIDI_RTL );
nKashidasDropped = rInf.GetOut()->ValidateKashidas ( rInf.GetTxt(), nIdx, nNext - nIdx,
nKashidasInAttr, pKashidaPos + nKashidaIdx,
@@ -429,7 +429,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
SvUShorts *pNewKana = new SvUShorts;
pCurrent->SetKanaComp( pNewKana );
- const USHORT nNull = 0;
+ const sal_uInt16 nNull = 0;
MSHORT nKanaIdx = 0;
long nKanaDiffSum = 0;
SwTwips nRepaintOfst = 0;
@@ -448,11 +448,11 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
{
// get maximum portion width from info structure, calculated
// during text formatting
- USHORT nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (ULONG)pPos );
+ sal_uInt16 nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (sal_uLong)pPos );
// check, if information is stored under other key
if ( !nMaxWidthDiff && pPos == pCurrent->GetFirstPortion() )
- nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (ULONG)pCurrent );
+ nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (sal_uLong)pCurrent );
// calculate difference between portion width and max. width
nKanaDiffSum += nMaxWidthDiff;
@@ -467,7 +467,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
if ( nKanaIdx == pCurrent->GetKanaComp().Count() )
pCurrent->GetKanaComp().Insert( nNull, nKanaIdx );
- USHORT nRest;
+ sal_uInt16 nRest;
if ( pPos->InTabGrp() )
{
@@ -492,7 +492,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
if( nKanaDiffSum )
{
- ULONG nCompress = ( 10000 * nRest ) / nKanaDiffSum;
+ sal_uLong nCompress = ( 10000 * nRest ) / nKanaDiffSum;
if ( nCompress >= 10000 )
// kanas can be expanded to 100%, and there is still
@@ -502,7 +502,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
else
nCompress = 10000 - nCompress;
- ( pCurrent->GetKanaComp() )[ nKanaIdx ] = (USHORT)nCompress;
+ ( pCurrent->GetKanaComp() )[ nKanaIdx ] = (sal_uInt16)nCompress;
nKanaDiffSum = 0;
}
@@ -515,7 +515,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
// set portion width
nKanaIdx = 0;
- USHORT nCompress = ( pCurrent->GetKanaComp() )[ nKanaIdx ];
+ sal_uInt16 nCompress = ( pCurrent->GetKanaComp() )[ nKanaIdx ];
pPos = pCurrent->GetPortion();
long nDecompress = 0;
nKanaDiffSum = 0;
@@ -524,15 +524,15 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
{
if ( pPos->InTxtGrp() )
{
- const USHORT nMinWidth = pPos->Width();
+ const sal_uInt16 nMinWidth = pPos->Width();
// get maximum portion width from info structure, calculated
// during text formatting
- USHORT nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (ULONG)pPos );
+ sal_uInt16 nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (sal_uLong)pPos );
// check, if information is stored under other key
if ( !nMaxWidthDiff && pPos == pCurrent->GetFirstPortion() )
- nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (ULONG)pCurrent );
+ nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (sal_uLong)pCurrent );
nKanaDiffSum += nMaxWidthDiff;
pPos->Width( nMinWidth +
( ( 10000 - nCompress ) * nMaxWidthDiff ) / 10000 );
@@ -546,7 +546,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
nKanaDiffSum /= 10000;
}
- pPos->Width( static_cast<USHORT>(pPos->Width() - nDecompress) );
+ pPos->Width( static_cast<sal_uInt16>(pPos->Width() - nDecompress) );
if ( pPos->InTabGrp() )
// set fix width to width
@@ -573,8 +573,8 @@ SwMarginPortion *SwTxtAdjuster::CalcRightMargin( SwLineLayout *pCurrent,
SwTwips nReal )
{
long nRealWidth;
- const USHORT nRealHeight = GetLineHeight();
- const USHORT nLineHeight = pCurrent->Height();
+ const sal_uInt16 nRealHeight = GetLineHeight();
+ const sal_uInt16 nLineHeight = pCurrent->Height();
KSHORT nPrtWidth = pCurrent->PrtWidth();
SwLinePortion *pLast = pCurrent->FindLastPortion();
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index c4ec51b5ecb4..83e49dc14584 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -331,7 +331,7 @@ xub_StrLen SwAttrIter::GetNextAttr( ) const
if (m_pTxtNode!=NULL) {
//TODO maybe use hints like FieldHints for this instead of looking at the text...
int l=(nNext<m_pTxtNode->Len()?nNext:m_pTxtNode->Len());
- USHORT p=nPos;
+ sal_uInt16 p=nPos;
const sal_Unicode *txt=m_pTxtNode->GetTxt().GetBuffer();
while(p<l && txt[p]!=CH_TXT_ATR_FIELDSTART && txt[p]!=CH_TXT_ATR_FIELDEND && txt[p]!=CH_TXT_ATR_FORMELEMENT) p++;
if ((p<l && p>nPos) || nNext<=p)
@@ -361,14 +361,14 @@ class SwMinMaxArgs
public:
OutputDevice* pOut;
ViewShell* pSh;
- ULONG &rMin;
- ULONG &rMax;
- ULONG &rAbsMin;
+ sal_uLong &rMin;
+ sal_uLong &rMax;
+ sal_uLong &rAbsMin;
long nRowWidth;
long nWordWidth;
long nWordAdd;
xub_StrLen nNoLineBreak;
- SwMinMaxArgs( OutputDevice* pOutI, ViewShell* pShI, ULONG& rMinI, ULONG &rMaxI, ULONG &rAbsI )
+ SwMinMaxArgs( OutputDevice* pOutI, ViewShell* pShI, sal_uLong& rMinI, sal_uLong &rMaxI, sal_uLong &rAbsI )
: pOut( pOutI ), pSh( pShI ), rMin( rMinI ), rMax( rMaxI ), rAbsMin( rAbsI )
{ nRowWidth = nWordWidth = nWordAdd = 0; nNoLineBreak = STRING_LEN; }
void Minimum( long nNew ) { if( (long)rMin < nNew ) rMin = nNew; }
@@ -389,7 +389,7 @@ sal_Bool lcl_MinMaxString( SwMinMaxArgs& rArg, SwFont* pFnt, const XubString &rT
bClear = CH_BLANK == rTxt.GetChar( nStop );
Boundary aBndry( pBreakIt->GetBreakIter()->getWordBoundary( rTxt, nIdx,
pBreakIt->GetLocale( eLang ),
- WordType::DICTIONARY_WORD, TRUE ) );
+ WordType::DICTIONARY_WORD, sal_True ) );
nStop = (xub_StrLen)aBndry.endPos;
if( nIdx <= aBndry.startPos && nIdx && nIdx-1 != rArg.nNoLineBreak )
rArg.NewWord();
@@ -443,13 +443,13 @@ sal_Bool SwTxtNode::IsSymbol( const xub_StrLen nBegin ) const
class SwMinMaxNodeArgs
{
public:
- ULONG nMaxWidth; // Summe aller Rahmenbreite
+ sal_uLong nMaxWidth; // Summe aller Rahmenbreite
long nMinWidth; // Breitester Rahmen
long nLeftRest; // noch nicht von Rahmen ueberdeckter Platz im l. Rand
long nRightRest; // noch nicht von Rahmen ueberdeckter Platz im r. Rand
long nLeftDiff; // Min/Max-Differenz des Rahmens im linken Rand
long nRightDiff; // Min/Max-Differenz des Rahmens im rechten Rand
- ULONG nIndx; // Indexnummer des Nodes
+ sal_uLong nIndx; // Indexnummer des Nodes
void Minimum( long nNew ) { if( nNew > nMinWidth ) nMinWidth = nNew; }
};
@@ -483,7 +483,7 @@ sal_Bool lcl_MinMaxNode( const SwFrmFmtPtr& rpNd, void* pArgs )
// Enthaelt der Rahmen zu Beginn oder am Ende eine Tabelle?
const SwNodes& rNodes = static_cast<SwFrmFmt*>(rpNd)->GetDoc()->GetNodes();
const SwFmtCntnt& rFlyCntnt = ((SwFrmFmt*)rpNd)->GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
SwTableNode* pTblNd = rNodes[nStt+1]->GetTableNode();
if( !pTblNd )
{
@@ -589,8 +589,8 @@ sal_Bool lcl_MinMaxNode( const SwFrmFmtPtr& rpNd, void* pArgs )
// changing this method very likely requires changing of
// "GetScalingOfSelectedText"
-void SwTxtNode::GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax,
- ULONG& rAbsMin, OutputDevice* pOut ) const
+void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax,
+ sal_uLong& rAbsMin, OutputDevice* pOut ) const
{
ViewShell* pSh = 0;
GetDoc()->GetEditShell( &pSh );
@@ -827,7 +827,7 @@ void SwTxtNode::GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax,
* changing this method very likely requires changing of "GetMinMaxSize"
*************************************************************************/
-USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
+sal_uInt16 SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
const
{
ViewShell* pSh = NULL;
@@ -895,8 +895,8 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
xub_StrLen nIdx = nStt;
- ULONG nWidth = 0;
- ULONG nProWidth = 0;
+ sal_uLong nWidth = 0;
+ sal_uLong nProWidth = 0;
while( nIdx < nEnd )
{
@@ -1027,7 +1027,7 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
SwTxtIter aLine( pFrm, &aInf );
aLine.CharToLine( nStt );
pOut->SetMapMode( aOldMap );
- return (USHORT)( nWidth ?
+ return (sal_uInt16)( nWidth ?
( ( 100 * aLine.GetCurr()->Height() ) / nWidth ) : 0 );
}
// no frame or no paragraph, we take the height of the character
@@ -1037,13 +1037,13 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
pOut->SetMapMode( aOldMap );
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, GetTxt(), nStt, 1 );
- return (USHORT)
+ return (sal_uInt16)
( nWidth ? ((100 * aIter.GetFnt()->_GetTxtSize( aDrawInf ).Height()) / nWidth ) : 0 );
}
-USHORT SwTxtNode::GetWidthOfLeadingTabs() const
+sal_uInt16 SwTxtNode::GetWidthOfLeadingTabs() const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
xub_StrLen nIdx = 0;
sal_Unicode cCh;
@@ -1072,7 +1072,7 @@ USHORT SwTxtNode::GetWidthOfLeadingTabs() const
SWRECTFN( pFrm )
SwRect aRect;
pFrm->GetCharRect( aRect, aPos );
- nRet = (USHORT)
+ nRet = (sal_uInt16)
( pFrm->IsRightToLeft() ?
(pFrm->*fnRect->fnGetPrtRight)() - (aRect.*fnRect->fnGetRight)() :
(aRect.*fnRect->fnGetLeft)() - (pFrm->*fnRect->fnGetPrtLeft)() );
diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx
index 5a8854c8c075..372c6083b73f 100644
--- a/sw/source/core/text/itratr.hxx
+++ b/sw/source/core/text/itratr.hxx
@@ -67,7 +67,7 @@ private:
MSHORT nChgCnt;
SwRedlineItr *pRedln;
xub_StrLen nStartIndex, nEndIndex, nPos;
- BYTE nPropFont;
+ sal_uInt8 nPropFont;
void SeekFwd( const xub_StrLen nPos );
inline void SetFnt( SwFont* pNew ) { pFnt = pNew; }
const void* aMagicNo[ SW_SCRIPTS ];
@@ -118,8 +118,8 @@ public:
inline SwFont *GetFnt() { return pFnt; }
inline const SwFont *GetFnt() const { return pFnt; }
- inline BYTE GetPropFont() const { return nPropFont; }
- inline void SetPropFont( const BYTE nNew ) { nPropFont = nNew; }
+ inline sal_uInt8 GetPropFont() const { return nPropFont; }
+ inline void SetPropFont( const sal_uInt8 nNew ) { nPropFont = nNew; }
inline SwAttrHandler& GetAttrHandler() { return aAttrHandler; }
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 34c0a9843986..67569418f0bb 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -81,9 +81,9 @@ void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig,
if ( rPor.InFldGrp() && ((SwFldPortion&)rPor).GetExp().Len() )
{
- const USHORT nCharOfst = rCMS.pSpecialPos->nCharOfst;
- USHORT nFldIdx = 0;
- USHORT nFldLen = 0;
+ const sal_uInt16 nCharOfst = rCMS.pSpecialPos->nCharOfst;
+ sal_uInt16 nFldIdx = 0;
+ sal_uInt16 nFldLen = 0;
const XubString* pString = 0;
const SwLinePortion* pPor = &rPor;
@@ -107,10 +107,10 @@ void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig,
rOrig.Pos().X() += pPor->Width();
pPor = pPor->GetPortion();
- } while ( TRUE );
+ } while ( sal_True );
ASSERT( nCharOfst >= nFldIdx, "Request of position inside field failed" )
- USHORT nLen = nCharOfst - nFldIdx + 1;
+ sal_uInt16 nLen = nCharOfst - nFldIdx + 1;
if ( pString )
{
@@ -155,7 +155,7 @@ namespace {
if ( rTxtNode.AreListLevelIndentsApplicable() )
{
const SwNumFmt& rNumFmt =
- rTxtNode.GetNumRule()->Get( static_cast<USHORT>(rTxtNode.GetActualListLevel()) );
+ rTxtNode.GetNumRule()->Get( static_cast<sal_uInt16>(rTxtNode.GetActualListLevel()) );
if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
bRet = true;
@@ -350,7 +350,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
nFirst = nRight - 1;
}
const SvxAdjustItem& rAdjust = pFrm->GetTxtNode()->GetSwAttrSet().GetAdjust();
- nAdjust = static_cast<USHORT>(rAdjust.GetAdjust());
+ nAdjust = static_cast<sal_uInt16>(rAdjust.GetAdjust());
// left is left and right is right
if ( pFrm->IsRightToLeft() )
@@ -646,7 +646,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
// For common portions (including BidiPortions) we want to add
// the portion width to nX. For MultiPortions, nExtra = 0,
// therefore we go to the 'else' branch and start a recursion.
- const BYTE nExtra = pPor->IsMultiPortion() &&
+ const sal_uInt8 nExtra = pPor->IsMultiPortion() &&
! ((SwMultiPortion*)pPor)->IsBidi() &&
! bWidth ? 0 : 1;
if ( aInf.GetIdx() + pPor->GetLen() < nOfst + nExtra )
@@ -758,7 +758,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
// of the multi-portion.
xub_StrLen nOldStart = nStart;
SwTwips nOldY = nY;
- BYTE nOldProp = GetPropFont();
+ sal_uInt8 nOldProp = GetPropFont();
nStart = aInf.GetIdx();
SwLineLayout* pOldCurr = pCurr;
pCurr = &((SwMultiPortion*)pPor)->GetRoot();
@@ -767,14 +767,14 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
GETGRID( GetTxtFrm()->FindPageFrm() )
const sal_Bool bHasGrid = pGrid && GetInfo().SnapToGrid();
- const USHORT nRubyHeight = bHasGrid ?
+ const sal_uInt16 nRubyHeight = bHasGrid ?
pGrid->GetRubyHeight() : 0;
if( nStart + pCurr->GetLen() <= nOfst && GetNext() &&
( ! ((SwMultiPortion*)pPor)->IsRuby() ||
((SwMultiPortion*)pPor)->OnTop() ) )
{
- USHORT nOffset;
+ sal_uInt16 nOffset;
// in grid mode we may only add the height of the
// ruby line if ruby line is on top
if ( bHasGrid &&
@@ -796,8 +796,8 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
// temporarily set the inner line height to the
// outer line height because that value is needed
// for the adjustment inside the recursion
- const USHORT nOldRubyHeight = pCurr->Height();
- const USHORT nOldRubyRealHeight = pCurr->GetRealHeight();
+ const sal_uInt16 nOldRubyHeight = pCurr->Height();
+ const sal_uInt16 nOldRubyRealHeight = pCurr->GetRealHeight();
const sal_Bool bChgHeight =
((SwMultiPortion*)pPor)->IsRuby() && bHasGrid;
@@ -1073,7 +1073,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
if( nTmpHeight < pOrig->Height() )
{
nTmpAscent = nPorAscent;
- nTmpHeight = USHORT( pOrig->Height() );
+ nTmpHeight = sal_uInt16( pOrig->Height() );
}
}
if( bWidth && pPor->PrtWidth() && pPor->GetLen() &&
@@ -1133,7 +1133,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
// the bidi portion
if ( pLastBidiPor )
{
- const BYTE nPortionLevel = pLastBidiPor->GetLevel();
+ const sal_uInt8 nPortionLevel = pLastBidiPor->GetLevel();
if ( pCMS->nCursorBidiLevel >= nPortionLevel )
{
@@ -1160,7 +1160,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
}
else
{
- const BYTE nPortionLevel = ((SwBidiPortion*)pPor)->GetLevel();
+ const sal_uInt8 nPortionLevel = ((SwBidiPortion*)pPor)->GetLevel();
if ( pCMS->nCursorBidiLevel >= nPortionLevel )
{
@@ -1206,7 +1206,7 @@ sal_Bool SwTxtCursor::GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
if ( bSpecialPos )
{
- const BYTE nExtendRange = pCMS->pSpecialPos->nExtendRange;
+ const sal_uInt8 nExtendRange = pCMS->pSpecialPos->nExtendRange;
ASSERT( ! pCMS->pSpecialPos->nLineOfst || SP_EXTEND_RANGE_BEFORE != nExtendRange,
"LineOffset AND Number Portion?" )
@@ -1216,7 +1216,7 @@ sal_Bool SwTxtCursor::GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
++nFindOfst;
// skip lines for fields which cover more than one line
- for ( USHORT i = 0; i < pCMS->pSpecialPos->nLineOfst; i++ )
+ for ( sal_uInt16 i = 0; i < pCMS->pSpecialPos->nLineOfst; i++ )
Next();
}
@@ -1335,7 +1335,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if ( pPor->InSpaceGrp() && nSpaceAdd )
{
((SwTxtSizeInfo&)GetInfo()).SetIdx( nCurrStart );
- nWidth = nWidth + USHORT( pPor->CalcSpacing( nSpaceAdd, GetInfo() ) );
+ nWidth = nWidth + sal_uInt16( pPor->CalcSpacing( nSpaceAdd, GetInfo() ) );
}
if( ( pPor->InFixMargGrp() && ! pPor->IsMarginPortion() ) ||
( pPor->IsMultiPortion() && ((SwMultiPortion*)pPor)->HasTabulator() )
@@ -1379,7 +1379,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if ( pPor->InSpaceGrp() && nSpaceAdd )
{
((SwTxtSizeInfo&)GetInfo()).SetIdx( nCurrStart );
- nWidth = nWidth + USHORT( pPor->CalcSpacing( nSpaceAdd, GetInfo() ) );
+ nWidth = nWidth + sal_uInt16( pPor->CalcSpacing( nSpaceAdd, GetInfo() ) );
}
if( ( pPor->InFixMargGrp() && ! pPor->IsMarginPortion() ) ||
@@ -1584,7 +1584,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
SwLayoutModeModifier aLayoutModeModifier( *GetInfo().GetOut() );
if ( ((SwMultiPortion*)pPor)->IsBidi() )
{
- const BYTE nBidiLevel = ((SwBidiPortion*)pPor)->GetLevel();
+ const sal_uInt8 nBidiLevel = ((SwBidiPortion*)pPor)->GetLevel();
aLayoutModeModifier.Modify( nBidiLevel % 2 );
}
@@ -1600,7 +1600,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if( ((SwMultiPortion*)pPor)->HasBrackets() )
{
- USHORT nPreWidth = ((SwDoubleLinePortion*)pPor)->PreWidth();
+ sal_uInt16 nPreWidth = ((SwDoubleLinePortion*)pPor)->PreWidth();
if ( nX > nPreWidth )
nX = nX - nPreWidth;
else
@@ -1612,7 +1612,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
}
if( pPor->InTxtGrp() )
{
- BYTE nOldProp;
+ sal_uInt8 nOldProp;
if( GetPropFont() )
{
((SwFont*)GetFnt())->SetProportion( GetPropFont() );
@@ -1871,7 +1871,7 @@ bool SwTxtFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) c
if( GetDrawObjs() )
{
const SwSortedObjs &rObjs = *GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
const SwAnchoredObject* pAnchoredObj = rObjs[i];
if( !pAnchoredObj->ISA(SwFlyFrm) )
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 8ce4f6523ba0..66251e83e618 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -282,7 +282,7 @@ SwLinePortion *SwTxtFormatter::UnderFlow( SwTxtFormatInfo &rInf )
// line width is adjusted, so that pPor does not fit to current
// line anymore
- rInf.Width( (USHORT)(rInf.X() + (pPor->Width() ? pPor->Width() - 1 : 0)) );
+ rInf.Width( (sal_uInt16)(rInf.X() + (pPor->Width() ? pPor->Width() - 1 : 0)) );
rInf.SetLen( pPor->GetLen() );
rInf.SetFull( sal_False );
if( pFly )
@@ -419,7 +419,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
GRID_LINES_CHARS == pGrid->GetGridType();
const SwDoc *pDoc = rInf.GetTxtFrm()->GetNode()->GetDoc();
- const USHORT nGridWidth = bHasGrid ?
+ const sal_uInt16 nGridWidth = bHasGrid ?
GETGRIDWIDTH(pGrid,pDoc) : 0; //for textgrid refactor
// used for grid mode only:
@@ -447,9 +447,9 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
rInf.GetLast() && rInf.GetLast()->InTxtGrp() &&
rInf.GetLast()->Width() && !rInf.GetLast()->InNumberGrp() )
{
- BYTE nNxtActual = rInf.GetFont()->GetActual();
- BYTE nLstActual = nNxtActual;
- USHORT nLstHeight = (USHORT)rInf.GetFont()->GetHeight();
+ sal_uInt8 nNxtActual = rInf.GetFont()->GetActual();
+ sal_uInt8 nLstActual = nNxtActual;
+ sal_uInt16 nLstHeight = (sal_uInt16)rInf.GetFont()->GetHeight();
sal_Bool bAllowBefore = sal_False;
sal_Bool bAllowBehind = sal_False;
const CharClass& rCC = GetAppCharClass();
@@ -487,7 +487,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
if ( pTmpFnt )
{
nLstActual = pTmpFnt->GetActual();
- nLstHeight = (USHORT)pTmpFnt->GetHeight();
+ nLstHeight = (sal_uInt16)pTmpFnt->GetHeight();
}
}
}
@@ -541,14 +541,14 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
const SwTwips nOfst = nStartX - nGridOrigin;
if ( nOfst )
{
- const ULONG i = ( nOfst > 0 ) ?
+ const sal_uLong i = ( nOfst > 0 ) ?
( ( nOfst - 1 ) / nGridWidth + 1 ) :
0;
const SwTwips nKernWidth = i * nGridWidth - nOfst;
const SwTwips nRestWidth = rInf.Width() - rInf.X();
if ( nKernWidth <= nRestWidth )
- pGridKernPortion->Width( (USHORT)nKernWidth );
+ pGridKernPortion->Width( (sal_uInt16)nKernWidth );
}
if ( pGridKernPortion != pPor )
@@ -631,7 +631,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
if( nTmp == pScriptInfo->NextScriptChg( nTmp - 1 ) &&
nTmp != rInf.GetTxt().Len() )
{
- USHORT nDist = (USHORT)(rInf.GetFont()->GetHeight()/5);
+ sal_uInt16 nDist = (sal_uInt16)(rInf.GetFont()->GetHeight()/5);
if( nDist )
{
@@ -657,8 +657,8 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
xub_StrLen nTmp = rInf.GetIdx() + pPor->GetLen();
const SwTwips nRestWidth = rInf.Width() - rInf.X() - pPor->Width();
- const BYTE nCurrScript = pFnt->GetActual(); // pScriptInfo->ScriptType( rInf.GetIdx() );
- const BYTE nNextScript = nTmp >= rInf.GetTxt().Len() ?
+ const sal_uInt8 nCurrScript = pFnt->GetActual(); // pScriptInfo->ScriptType( rInf.GetIdx() );
+ const sal_uInt8 nNextScript = nTmp >= rInf.GetTxt().Len() ?
SW_CJK :
SwScriptInfo::WhichFont( nTmp, 0, pScriptInfo );
@@ -673,20 +673,20 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
// calculate size
SwLinePortion* pTmpPor = pGridKernPortion->GetPortion();
- USHORT nSumWidth = pPor->Width();
+ sal_uInt16 nSumWidth = pPor->Width();
while ( pTmpPor )
{
nSumWidth = nSumWidth + pTmpPor->Width();
pTmpPor = pTmpPor->GetPortion();
}
- const USHORT i = nSumWidth ?
+ const sal_uInt16 i = nSumWidth ?
( nSumWidth - 1 ) / nGridWidth + 1 :
0;
const SwTwips nTmpWidth = i * nGridWidth;
const SwTwips nKernWidth = Min( (SwTwips)(nTmpWidth - nSumWidth),
nRestWidth );
- const USHORT nKernWidth_1 = (USHORT)(nKernWidth / 2);
+ const sal_uInt16 nKernWidth_1 = (sal_uInt16)(nKernWidth / 2);
ASSERT( nKernWidth <= nRestWidth,
"Not enough space left for adjusting non-asian text in grid mode" )
@@ -957,7 +957,7 @@ SwTxtPortion *SwTxtFormatter::NewTxtPortion( SwTxtFormatInfo &rInf )
KSHORT( pPor->GetAscent() ) ) / 8;
if ( !nExpect )
nExpect = 1;
- nExpect = (USHORT)(rInf.GetIdx() + ((rInf.Width() - rInf.X()) / nExpect));
+ nExpect = (sal_uInt16)(rInf.GetIdx() + ((rInf.Width() - rInf.X()) / nExpect));
if( nExpect > rInf.GetIdx() && nNextChg > nExpect )
nNextChg = Min( nExpect, rInf.GetTxt().Len() );
@@ -1350,7 +1350,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
POR_TABDECIMAL == pLastTabPortion->GetWhichPor() )
{
ASSERT( rInf.X() >= pLastTabPortion->Fix(), "Decimal tab stop position cannot be calculated" )
- const USHORT nWidthOfPortionsUpToDecimalPosition = (USHORT)(rInf.X() - pLastTabPortion->Fix() );
+ const sal_uInt16 nWidthOfPortionsUpToDecimalPosition = (sal_uInt16)(rInf.X() - pLastTabPortion->Fix() );
static_cast<SwTabDecimalPortion*>(pLastTabPortion)->SetWidthOfPortionsUpToDecimalPosition( nWidthOfPortionsUpToDecimalPosition );
rInf.SetTabDecimal( 0 );
}
@@ -1414,7 +1414,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
const SwAttrSet& rSet = pInfo->GetAnchorCharFmt((SwDoc&)*pDoc)->GetAttrSet();
const SfxPoolItem* pItem;
- USHORT nDir = 0;
+ sal_uInt16 nDir = 0;
if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_ROTATE,
sal_True, &pItem ))
nDir = ((SvxCharRotateItem*)pItem)->GetValue();
@@ -1434,7 +1434,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
if ( pNumFnt )
{
- USHORT nDir = pNumFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
+ sal_uInt16 nDir = pNumFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
if ( 0 != nDir )
{
delete pPor;
@@ -1524,7 +1524,7 @@ xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen nStartPos )
pFlyStart = new SvLongs;
SwLinePortion* pPor = pCurr->GetFirstPortion();
long nPOfst = 0;
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
while ( pPor )
{
@@ -1696,12 +1696,12 @@ void SwTxtFormatter::CalcRealHeight( sal_Bool bNewLine )
GETGRID( pFrm->FindPageFrm() )
if ( pGrid && GetInfo().SnapToGrid() )
{
- const USHORT nGridWidth = pGrid->GetBaseHeight();
- const USHORT nRubyHeight = pGrid->GetRubyHeight();
+ const sal_uInt16 nGridWidth = pGrid->GetBaseHeight();
+ const sal_uInt16 nRubyHeight = pGrid->GetRubyHeight();
const sal_Bool bRubyTop = ! pGrid->GetRubyTextBelow();
nLineHeight = nGridWidth + nRubyHeight;
- USHORT nLineDist = nLineHeight;
+ sal_uInt16 nLineDist = nLineHeight;
while ( pCurr->Height() > nLineHeight )
nLineHeight = nLineHeight + nLineDist;
@@ -1720,13 +1720,13 @@ void SwTxtFormatter::CalcRealHeight( sal_Bool bNewLine )
if ( ! IsParaLine() && pSpace &&
SVX_INTER_LINE_SPACE_PROP == pSpace->GetInterLineSpaceRule() )
{
- ULONG nTmp = pSpace->GetPropLineSpace();
+ sal_uLong nTmp = pSpace->GetPropLineSpace();
if( nTmp < 100 )
nTmp = 100;
nTmp *= nLineHeight;
- nLineHeight = (USHORT)(nTmp / 100);
+ nLineHeight = (sal_uInt16)(nTmp / 100);
}
pCurr->SetRealHeight( nLineHeight );
@@ -1831,7 +1831,7 @@ void SwTxtFormatter::FeedInf( SwTxtFormatInfo &rInf ) const
rInf.SetIdx( nStart );
// Handle overflows:
- // --> FME 2004-11-25 #i34348# Changed type from USHORT to SwTwips
+ // --> FME 2004-11-25 #i34348# Changed type from sal_uInt16 to SwTwips
SwTwips nTmpLeft = Left();
SwTwips nTmpRight = Right();
SwTwips nTmpFirst = FirstLeft();
@@ -2079,9 +2079,9 @@ long SwTxtFormatter::CalcOptRepaint( xub_StrLen nOldLineEnd,
// if anything has changed, we carefully have to adjust the right
// repaint position
long nPOfst = 0;
- USHORT nCnt = 0;
- USHORT nX = 0;
- USHORT nIdx = GetInfo().GetLineStart();
+ sal_uInt16 nCnt = 0;
+ sal_uInt16 nX = 0;
+ sal_uInt16 nIdx = GetInfo().GetLineStart();
SwLinePortion* pPor = pCurr->GetFirstPortion();
while ( pPor )
@@ -2115,7 +2115,7 @@ bool lcl_BuildHiddenPortion( const SwTxtSizeInfo& rInf, xub_StrLen &rPos )
// Only if hidden text should not be shown:
// if ( rInf.GetVsh() && rInf.GetVsh()->GetWin() && rInf.GetOpt().IsShowHiddenChar() )
const bool bShowInDocView = rInf.GetVsh() && rInf.GetVsh()->GetWin() && rInf.GetOpt().IsShowHiddenChar();
- const bool bShowForPrinting = rInf.GetOpt().IsShowHiddenChar( TRUE ) && rInf.GetOpt().IsPrinting();
+ const bool bShowForPrinting = rInf.GetOpt().IsShowHiddenChar( sal_True ) && rInf.GetOpt().IsPrinting();
if (bShowInDocView || bShowForPrinting)
return false;
diff --git a/sw/source/core/text/itrform2.hxx b/sw/source/core/text/itrform2.hxx
index 0e3522883bc1..a082538ed4d3 100644
--- a/sw/source/core/text/itrform2.hxx
+++ b/sw/source/core/text/itrform2.hxx
@@ -57,7 +57,7 @@ class SwTxtFormatter : public SwTxtPainter
sal_Bool bChanges : 1; // Flag, fuer die Berechnung des Repaint-Rechtecks
sal_Bool bTruncLines : 1; // Flag, Repaint-Rechtecks ggf. erweitern
sal_Bool bUnclipped : 1; // Flag, ob Repaint groesser als feste Zeilenhoehe
- USHORT m_nHintEndIndex; // HACK for TryNewNoLengthPortion
+ sal_uInt16 m_nHintEndIndex; // HACK for TryNewNoLengthPortion
SwLinePortion *NewPortion( SwTxtFormatInfo &rInf );
SwTxtPortion *NewTxtPortion( SwTxtFormatInfo &rInf );
SwLinePortion *NewExtraPortion( SwTxtFormatInfo &rInf );
@@ -77,7 +77,7 @@ class SwTxtFormatter : public SwTxtPainter
// Das Herzstueck der Formatierung
void BuildPortions( SwTxtFormatInfo &rInf );
- BOOL BuildMultiPortion( SwTxtFormatInfo &rInf, SwMultiPortion& rMulti );
+ sal_Bool BuildMultiPortion( SwTxtFormatInfo &rInf, SwMultiPortion& rMulti );
// Berechnung des emulierten rechten Rands
void CalcFlyWidth( SwTxtFormatInfo &rInf );
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 50dbe9fdc451..8c9405a9a483 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -173,8 +173,8 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
const sal_Bool bUnderSz )
{
#if OSL_DEBUG_LEVEL > 1
-// USHORT nFntHeight = GetInfo().GetFont()->GetHeight( GetInfo().GetVsh(), GetInfo().GetOut() );
-// USHORT nFntAscent = GetInfo().GetFont()->GetAscent( GetInfo().GetVsh(), GetInfo().GetOut() );
+// sal_uInt16 nFntHeight = GetInfo().GetFont()->GetHeight( GetInfo().GetVsh(), GetInfo().GetOut() );
+// sal_uInt16 nFntAscent = GetInfo().GetFont()->GetAscent( GetInfo().GetVsh(), GetInfo().GetOut() );
#endif
// Adjustierung ggf. nachholen
@@ -618,11 +618,11 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
rScriptInfo );
xub_StrLen nTmpIdx = nIndx;
- ULONG nSumWidth = 0;
- ULONG nSumHeight = 0;
- ULONG nBold = 0;
- USHORT nMaxBaseLineOfst = 0;
- USHORT nNumberOfPortions = 0;
+ sal_uLong nSumWidth = 0;
+ sal_uLong nSumHeight = 0;
+ sal_uLong nBold = 0;
+ sal_uInt16 nMaxBaseLineOfst = 0;
+ sal_uInt16 nNumberOfPortions = 0;
while( nTmpIdx <= nUnderEnd && pPor )
{
@@ -641,13 +641,13 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
if ( !aIter.GetFnt()->GetEscapement() )
{
nSumWidth += pPor->Width();
- const ULONG nFontHeight = aIter.GetFnt()->GetHeight();
+ const sal_uLong nFontHeight = aIter.GetFnt()->GetHeight();
// If we do not have a common baseline we take the baseline
// and the font of the lowest portion.
if ( nAdjustBaseLine )
{
- USHORT nTmpBaseLineOfst = AdjustBaseLine( *pCurr, pPor );
+ sal_uInt16 nTmpBaseLineOfst = AdjustBaseLine( *pCurr, pPor );
if ( nMaxBaseLineOfst < nTmpBaseLineOfst )
{
nMaxBaseLineOfst = nTmpBaseLineOfst;
@@ -671,14 +671,14 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
// resulting height
if ( nNumberOfPortions > 1 && nSumWidth )
{
- const ULONG nNewFontHeight = nAdjustBaseLine ?
+ const sal_uLong nNewFontHeight = nAdjustBaseLine ?
nSumHeight :
nSumHeight / nSumWidth;
pUnderlineFnt = new SwFont( *GetInfo().GetFont() );
// font height
- const BYTE nActual = pUnderlineFnt->GetActual();
+ const sal_uInt8 nActual = pUnderlineFnt->GetActual();
pUnderlineFnt->SetSize( Size( pUnderlineFnt->GetSize( nActual ).Width(),
nNewFontHeight ), nActual );
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx
index 9ea46606945a..798faee0d58d 100644
--- a/sw/source/core/text/itrtxt.cxx
+++ b/sw/source/core/text/itrtxt.cxx
@@ -303,9 +303,9 @@ const SwLineLayout *SwTxtCursor::CharCrsrToLine( const xub_StrLen nPosition )
* SwTxtCrsr::AdjustBaseLine()
*************************************************************************/
-USHORT SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
+sal_uInt16 SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
const SwLinePortion* pPor,
- USHORT nPorHeight, USHORT nPorAscent,
+ sal_uInt16 nPorHeight, sal_uInt16 nPorAscent,
const sal_Bool bAutoToCentered ) const
{
if ( pPor )
@@ -314,14 +314,14 @@ USHORT SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
nPorAscent = pPor->GetAscent();
}
- USHORT nOfst = rLine.GetRealHeight() - rLine.Height();
+ sal_uInt16 nOfst = rLine.GetRealHeight() - rLine.Height();
GETGRID( pFrm->FindPageFrm() )
const sal_Bool bHasGrid = pGrid && GetInfo().SnapToGrid();
if ( bHasGrid )
{
- const USHORT nRubyHeight = pGrid->GetRubyHeight();
+ const sal_uInt16 nRubyHeight = pGrid->GetRubyHeight();
const sal_Bool bRubyTop = ! pGrid->GetRubyTextBelow();
if ( GetInfo().IsMulti() )
@@ -341,8 +341,8 @@ USHORT SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
// centered inside the whole line.
//for text refactor
- const USHORT nLineNetto = rLine.Height() - nRubyHeight;
- //const USHORT nLineNetto = ( nPorHeight > nGridWidth ) ?
+ const sal_uInt16 nLineNetto = rLine.Height() - nRubyHeight;
+ //const sal_uInt16 nLineNetto = ( nPorHeight > nGridWidth ) ?
// rLine.Height() - nRubyHeight :
// nGridWidth;
nOfst += ( nLineNetto - nPorHeight ) / 2;
@@ -445,13 +445,13 @@ void SwTxtIter::TruncLines( sal_Bool bNoteFollow )
SwpHints* pTmpHints = GetTxtFrm()->GetTxtNode()->GetpSwpHints();
// examine hints in range nEnd - (nEnd + nRangeChar)
- for( USHORT i = 0; i < pTmpHints->Count(); i++ )
+ for( sal_uInt16 i = 0; i < pTmpHints->Count(); i++ )
{
const SwTxtAttr* pHt = pTmpHints->GetTextHint( i );
if( RES_TXTATR_FLYCNT == pHt->Which() )
{
// check, if hint is in our range
- const USHORT nTmpPos = *pHt->GetStart();
+ const sal_uInt16 nTmpPos = *pHt->GetStart();
if ( nEnd <= nTmpPos && nTmpPos < nRangeEnd )
pFollow->_InvalidateRange(
SwCharRange( nTmpPos, nTmpPos ), 0 );
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index 2ea324539f32..aa129aef9888 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -278,8 +278,8 @@ public:
// calculates baseline for portion rPor
// bAutoToCentered indicates, if AUTOMATIC mode means CENTERED or BASELINE
- USHORT AdjustBaseLine( const SwLineLayout& rLine, const SwLinePortion* pPor,
- USHORT nPorHeight = 0, USHORT nAscent = 0,
+ sal_uInt16 AdjustBaseLine( const SwLineLayout& rLine, const SwLinePortion* pPor,
+ sal_uInt16 nPorHeight = 0, sal_uInt16 nAscent = 0,
const sal_Bool bAutoToCentered = sal_False ) const;
static inline void SetRightMargin( const sal_Bool bNew ){ bRightMargin = bNew; }
diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx
index c4cb9089381c..452a2b394d65 100644
--- a/sw/source/core/text/pordrop.hxx
+++ b/sw/source/core/text/pordrop.hxx
@@ -49,7 +49,7 @@ class SwDropPortionPart
SwDropPortionPart* pFollow;
SwFont* pFnt;
xub_StrLen nLen;
- USHORT nWidth;
+ sal_uInt16 nWidth;
public:
SwDropPortionPart( SwFont& rFont, const xub_StrLen nL )
@@ -60,8 +60,8 @@ public:
inline void SetFollow( SwDropPortionPart* pNew ) { pFollow = pNew; };
inline SwFont& GetFont() const { return *pFnt; }
inline xub_StrLen GetLen() const { return nLen; }
- inline USHORT GetWidth() const { return nWidth; }
- inline void SetWidth( USHORT nNew ) { nWidth = nNew; }
+ inline sal_uInt16 GetWidth() const { return nWidth; }
+ inline void SetWidth( sal_uInt16 nNew ) { nWidth = nNew; }
};
/*************************************************************************
diff --git a/sw/source/core/text/porexp.hxx b/sw/source/core/text/porexp.hxx
index 6cecd542c764..214c9f336eb3 100644
--- a/sw/source/core/text/porexp.hxx
+++ b/sw/source/core/text/porexp.hxx
@@ -58,14 +58,14 @@ public:
class SwBlankPortion : public SwExpandPortion
{
xub_Unicode cChar;
- BOOL bMulti; // For multiportion brackets
+ sal_Bool bMulti; // For multiportion brackets
public:
- inline SwBlankPortion( xub_Unicode cCh, BOOL bMult = sal_False )
+ inline SwBlankPortion( xub_Unicode cCh, sal_Bool bMult = sal_False )
: cChar( cCh ), bMulti( bMult )
{ cChar = cCh; SetLen(1); SetWhichPor( POR_BLANK ); }
- BOOL IsMulti() const { return bMulti; }
- void SetMulti( BOOL bNew ) { bMulti = bNew; }
+ sal_Bool IsMulti() const { return bMulti; }
+ void SetMulti( sal_Bool bNew ) { bMulti = bNew; }
virtual SwLinePortion *Compress();
virtual sal_Bool GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const;
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 59edb6fa59c9..1057ed7899b6 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -222,8 +222,8 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
String aTxt;
if( GetExpTxt( rInf, aTxt ) && aTxt.Len() && pBreakIt->GetBreakIter().is() )
{
- BYTE nActual = pFnt ? pFnt->GetActual() : rInf.GetFont()->GetActual();
- USHORT nScript;
+ sal_uInt8 nActual = pFnt ? pFnt->GetActual() : rInf.GetFont()->GetActual();
+ sal_uInt16 nScript;
{
nScript = pBreakIt->GetBreakIter()->getScriptType( aTxt, 0 );
xub_StrLen nChg = 0;
@@ -243,7 +243,7 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
nNextScriptChg = aTxt.Len();
}
- BYTE nTmp;
+ sal_uInt8 nTmp;
switch ( nScript ) {
case i18n::ScriptType::LATIN : nTmp = SW_LATIN; break;
case i18n::ScriptType::ASIAN : nTmp = SW_CJK; break;
@@ -254,8 +254,8 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
// #i16354# Change script type for RTL text to CTL.
const SwScriptInfo& rSI = rInf.GetParaPortion()->GetScriptInfo();
// --> OD 2009-01-29 #i98418#
-// const BYTE nFldDir = IsNumberPortion() ?
- const BYTE nFldDir = ( IsNumberPortion() || IsFtnNumPortion() ) ?
+// const sal_uInt8 nFldDir = IsNumberPortion() ?
+ const sal_uInt8 nFldDir = ( IsNumberPortion() || IsFtnNumPortion() ) ?
rSI.GetDefaultDir() :
rSI.DirType( IsFollow() ? rInf.GetIdx() - 1 : rInf.GetIdx() );
// <--
@@ -700,8 +700,8 @@ void SwNumberPortion::Paint( const SwTxtPaintInfo &rInf ) const
// calculate the width of the number portion, including follows
const KSHORT nOldWidth = Width();
- USHORT nSumWidth = 0;
- USHORT nOffset = 0;
+ sal_uInt16 nSumWidth = 0;
+ sal_uInt16 nOffset = 0;
const SwLinePortion* pTmp = this;
while ( pTmp && pTmp->InNumberGrp() )
@@ -864,7 +864,7 @@ SwGrfNumPortion::SwGrfNumPortion(
nYPos = 0;
eOrient = text::VertOrientation::TOP;
}
- Width( static_cast<USHORT>(rGrfSize.Width() + 2 * GRFNUM_SECURE) );
+ Width( static_cast<sal_uInt16>(rGrfSize.Width() + 2 * GRFNUM_SECURE) );
nFixWidth = Width();
nGrfHeight = rGrfSize.Height() + 2 * GRFNUM_SECURE;
Height( KSHORT(nGrfHeight) );
@@ -901,7 +901,7 @@ sal_Bool SwGrfNumPortion::Format( SwTxtFormatInfo &rInf )
const sal_Bool bFull = rInf.Width() < rInf.X() + Width();
const sal_Bool bFly = rInf.GetFly() ||
( rInf.GetLast() && rInf.GetLast()->IsFlyPortion() );
- SetAscent( static_cast<USHORT>(GetRelPos() > 0 ? GetRelPos() : 0) );
+ SetAscent( static_cast<sal_uInt16>(GetRelPos() > 0 ? GetRelPos() : 0) );
if( GetAscent() > Height() )
Height( GetAscent() );
@@ -1139,10 +1139,10 @@ SwCombinedPortion::SwCombinedPortion( const XubString &rTxt )
// the arrays of width and position are filled by the format function
if( pBreakIt->GetBreakIter().is() )
{
- BYTE nScr = SW_SCRIPTS;
- for( USHORT i = 0; i < rTxt.Len(); ++i )
+ sal_uInt8 nScr = SW_SCRIPTS;
+ for( sal_uInt16 i = 0; i < rTxt.Len(); ++i )
{
- USHORT nScript = pBreakIt->GetBreakIter()->getScriptType( rTxt, i );
+ sal_uInt16 nScript = pBreakIt->GetBreakIter()->getScriptType( rTxt, i );
switch ( nScript ) {
case i18n::ScriptType::LATIN : nScr = SW_LATIN; break;
case i18n::ScriptType::ASIAN : nScr = SW_CJK; break;
@@ -1153,7 +1153,7 @@ SwCombinedPortion::SwCombinedPortion( const XubString &rTxt )
}
else
{
- for( USHORT i = 0; i < 6; aScrType[i++] = 0 )
+ for( sal_uInt16 i = 0; i < 6; aScrType[i++] = 0 )
; // nothing
}
memset( &aWidth, 0, sizeof(aWidth) );
@@ -1175,19 +1175,19 @@ void SwCombinedPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( rInf.OnWin() && pPortion && !pPortion->Width() )
pPortion->PrePaint( rInf, this );
- USHORT nCount = aExpand.Len();
+ sal_uInt16 nCount = aExpand.Len();
if( !nCount )
return;
ASSERT( nCount < 7, "Too much combined characters" );
// the first character of the second row
- USHORT nTop = ( nCount + 1 ) / 2;
+ sal_uInt16 nTop = ( nCount + 1 ) / 2;
SwFont aTmpFont( *rInf.GetFont() );
aTmpFont.SetProportion( nProportion ); // a smaller font
SwFontSave aFontSave( rInf, &aTmpFont );
- USHORT i = 0;
+ sal_uInt16 i = 0;
Point aOldPos = rInf.GetPos();
Point aOutPos( aOldPos.X(), aOldPos.Y() - nUpPos );// Y of the first row
while( i < nCount )
@@ -1195,7 +1195,7 @@ void SwCombinedPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( i == nTop ) // change the row
aOutPos.Y() = aOldPos.Y() + nLowPos; // Y of the second row
aOutPos.X() = aOldPos.X() + aPos[i]; // X position
- const BYTE nAct = aScrType[i]; // script type
+ const sal_uInt8 nAct = aScrType[i]; // script type
aTmpFont.SetActual( nAct );
// if there're more than 4 characters to display, we choose fonts
// with 2/3 of the original font width.
@@ -1223,7 +1223,7 @@ void SwCombinedPortion::Paint( const SwTxtPaintInfo &rInf ) const
sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
{
- USHORT nCount = aExpand.Len();
+ sal_uInt16 nCount = aExpand.Len();
if( !nCount )
{
Width( 0 );
@@ -1233,7 +1233,7 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
ASSERT( nCount < 7, "Too much combined characters" );
// If there are leading "weak"-scripttyped characters in this portion,
// they get the actual scripttype.
- USHORT i = 0;
+ sal_uInt16 i = 0;
while( i < nCount && SW_SCRIPTS == aScrType[i] )
aScrType[i++] = rInf.GetFont()->GetActual();
if( nCount > 4 )
@@ -1247,22 +1247,22 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
{
rInf.GetOut()->SetFont( rInf.GetFont()->GetFnt( aScrType[i] ) );
aWidth[ aScrType[i] ] =
- static_cast<USHORT>(2 * rInf.GetOut()->GetFontMetric().GetSize().Width() / 3);
+ static_cast<sal_uInt16>(2 * rInf.GetOut()->GetFontMetric().GetSize().Width() / 3);
}
++i;
}
}
- USHORT nTop = ( nCount + 1 ) / 2; // the first character of the second line
+ sal_uInt16 nTop = ( nCount + 1 ) / 2; // the first character of the second line
ViewShell *pSh = rInf.GetTxtFrm()->GetShell();
SwFont aTmpFont( *rInf.GetFont() );
SwFontSave aFontSave( rInf, &aTmpFont );
nProportion = 55;
// In nMainAscent/Descent we store the ascent and descent
// of the original surrounding font
- USHORT nMaxDescent, nMaxAscent, nMaxWidth;
- USHORT nMainDescent = rInf.GetFont()->GetHeight( pSh, *rInf.GetOut() );
- const USHORT nMainAscent = rInf.GetFont()->GetAscent( pSh, *rInf.GetOut() );
+ sal_uInt16 nMaxDescent, nMaxAscent, nMaxWidth;
+ sal_uInt16 nMainDescent = rInf.GetFont()->GetHeight( pSh, *rInf.GetOut() );
+ const sal_uInt16 nMainAscent = rInf.GetFont()->GetAscent( pSh, *rInf.GetOut() );
nMainDescent = nMainDescent - nMainAscent;
// we start with a 50% font, but if we notice that the combined portion
// becomes bigger than the surrounding font, we check 45% and maybe 40%.
@@ -1284,7 +1284,7 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
// local nMaxAscent, nMaxDescent and nMaxWidth variables.
while( i < nCount )
{
- BYTE nScrp = aScrType[i];
+ sal_uInt8 nScrp = aScrType[i];
aTmpFont.SetActual( nScrp );
if( aWidth[ nScrp ] )
{
@@ -1295,8 +1295,8 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
SwDrawTextInfo aDrawInf( pSh, *rInf.GetOut(), 0, aExpand, i, 1 );
Size aSize = aTmpFont._GetTxtSize( aDrawInf );
- USHORT nAsc = aTmpFont.GetAscent( pSh, *rInf.GetOut() );
- aPos[ i ] = (USHORT)aSize.Width();
+ sal_uInt16 nAsc = aTmpFont.GetAscent( pSh, *rInf.GetOut() );
+ aPos[ i ] = (sal_uInt16)aSize.Width();
if( i == nTop ) // enter the second line
{
nLowPos = nMaxDescent;
@@ -1311,7 +1311,7 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
if( nAsc > nMaxAscent )
nMaxAscent = nAsc;
if( aSize.Height() - nAsc > nMaxDescent )
- nMaxDescent = static_cast<USHORT>(aSize.Height() - nAsc);
+ nMaxDescent = static_cast<sal_uInt16>(aSize.Height() - nAsc);
}
// for one or two characters we double the width of the portion
if( nCount < 3 )
@@ -1340,8 +1340,8 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
Height( nMainAscent + nMainDescent );
// We calculate the x positions of the characters in both lines..
- USHORT nTopDiff = 0;
- USHORT nBotDiff = 0;
+ sal_uInt16 nTopDiff = 0;
+ sal_uInt16 nBotDiff = 0;
if( nMaxWidth > Width() )
{
nTopDiff = ( nMaxWidth - Width() ) / 2;
@@ -1370,7 +1370,7 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
{
if( rInf.GetLineStart() == rInf.GetIdx() && (!rInf.GetLast()->InFldGrp()
|| !((SwFldPortion*)rInf.GetLast())->IsFollow() ) )
- Width( (USHORT)( rInf.Width() - rInf.X() ) );
+ Width( (sal_uInt16)( rInf.Width() - rInf.X() ) );
else
{
Truncate();
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index ad71ce0c6a47..aa0cb4f1be14 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -249,12 +249,12 @@ public:
class SwCombinedPortion : public SwFldPortion
{
- USHORT aPos[6]; // up to six X positions
- USHORT aWidth[3]; // one width for every scripttype
- BYTE aScrType[6]; // scripttype of every character
- USHORT nUpPos; // the Y position of the upper baseline
- USHORT nLowPos; // the Y position of the lower baseline
- BYTE nProportion; // relative font height
+ sal_uInt16 aPos[6]; // up to six X positions
+ sal_uInt16 aWidth[3]; // one width for every scripttype
+ sal_uInt8 aScrType[6]; // scripttype of every character
+ sal_uInt16 nUpPos; // the Y position of the upper baseline
+ sal_uInt16 nLowPos; // the Y position of the lower baseline
+ sal_uInt8 nProportion; // relative font height
public:
SwCombinedPortion( const XubString &rExpand );
virtual void Paint( const SwTxtPaintInfo &rInf ) const;
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index 0cad374e97e2..976f4fbeadbc 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -75,7 +75,7 @@ sal_Bool SwFlyPortion::Format( SwTxtFormatInfo &rInf )
// Der Glue wird aufgespannt.
rInf.GetLast()->FormatEOL( rInf );
- PrtWidth( static_cast<USHORT>(Fix() - rInf.X() + PrtWidth()) );
+ PrtWidth( static_cast<sal_uInt16>(Fix() - rInf.X() + PrtWidth()) );
if( !Width() )
{
ASSERT( Width(), "+SwFlyPortion::Format: a fly is a fly is a fly" );
@@ -98,7 +98,7 @@ sal_Bool SwFlyPortion::Format( SwTxtFormatInfo &rInf )
SetLen( 1 );
}
- const USHORT nNewWidth = static_cast<USHORT>(rInf.X() + PrtWidth());
+ const sal_uInt16 nNewWidth = static_cast<sal_uInt16>(rInf.X() + PrtWidth());
if( rInf.Width() <= nNewWidth )
{
Truncate();
@@ -128,7 +128,7 @@ sal_Bool SwFlyCntPortion::Format( SwTxtFormatInfo &rInf )
// KerningPortions at beginning of line, e.g., for grid layout
// must be considered.
const SwLinePortion* pLastPor = rInf.GetLast();
- const USHORT nLeft = ( pLastPor &&
+ const sal_uInt16 nLeft = ( pLastPor &&
( pLastPor->IsKernPortion() ||
pLastPor->IsErgoSumPortion() ) ) ?
pLastPor->Width() :
@@ -208,7 +208,7 @@ xub_StrLen SwTxtFrm::CalcFlyPos( SwFrmFmt* pSearch )
if( !pHints )
return STRING_LEN;
SwTxtAttr* pFound = NULL;
- for ( USHORT i = 0; i < pHints->Count(); i++)
+ for ( sal_uInt16 i = 0; i < pHints->Count(); i++)
{
SwTxtAttr *pHt = pHints->GetTextHint( i );
if( RES_TXTATR_FLYCNT == pHt->Which() )
@@ -407,14 +407,14 @@ void SwFlyCntPortion::SetBase( const SwTxtFrm& rFrm, const Point &rBase,
SwTwips nRelPos = aObjPositioning.GetRelPosY();
if ( nRelPos < 0 )
{
- nAscent = static_cast<USHORT>(-nRelPos);
+ nAscent = static_cast<sal_uInt16>(-nRelPos);
if( nAscent > Height() )
Height( nAscent );
}
else
{
nAscent = 0;
- Height( Height() + static_cast<USHORT>(nRelPos) );
+ Height( Height() + static_cast<sal_uInt16>(nRelPos) );
}
}
else
diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx
index 5590b6f972d3..fef27b065278 100644
--- a/sw/source/core/text/porftn.hxx
+++ b/sw/source/core/text/porftn.hxx
@@ -43,7 +43,7 @@ class SwFtnPortion : public SwFldPortion
KSHORT nOrigHeight;
// --> OD 2009-01-29 #i98418#
bool mbPreferredScriptTypeSet;
- BYTE mnPreferredScriptType;
+ sal_uInt8 mnPreferredScriptType;
// <--
public:
SwFtnPortion( const XubString &rExpand, SwTxtFrm *pFrm, SwTxtFtn *pFtn,
@@ -56,7 +56,7 @@ public:
virtual sal_Bool Format( SwTxtFormatInfo &rInf );
// --> OD 2009-01-29 #i98418#
- void SetPreferredScriptType( BYTE nPreferredScriptType );
+ void SetPreferredScriptType( sal_uInt8 nPreferredScriptType );
// <--
const SwTxtFtn* GetTxtFtn() const { return pFtn; };
diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index 983f5aded904..28207fb8b936 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -215,7 +215,7 @@ SwMarginPortion::SwMarginPortion( const KSHORT nFixedWidth )
void SwMarginPortion::AdjustRight( const SwLineLayout *pCurr )
{
SwGluePortion *pRight = 0;
- BOOL bNoMove = 0 != pCurr->GetpKanaComp();
+ sal_Bool bNoMove = 0 != pCurr->GetpKanaComp();
while( pRight != this )
{
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 84732637628c..ff90b8a3ed5c 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -644,8 +644,8 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
// --> FME 2006-03-01 #i3952#
if ( bHasBlankPortion && bHasOnlyBlankPortions )
{
- USHORT nTmpAscent = GetAscent();
- USHORT nTmpHeight = Height();
+ sal_uInt16 nTmpAscent = GetAscent();
+ sal_uInt16 nTmpHeight = Height();
rLine.GetAttrHandler().GetDefaultAscentAndHeight( rInf.GetVsh(), *rInf.GetOut(), nTmpAscent, nTmpHeight );
SetAscent( nTmpAscent );
Height( nTmpHeight );
@@ -758,10 +758,10 @@ SwScriptInfo::~SwScriptInfo()
* Converts i18n Script Type (LATIN, ASIAN, COMPLEX, WEAK) to
* Sw Script Types (SW_LATIN, SW_CJK, SW_CTL), used to identify the font
*************************************************************************/
-BYTE SwScriptInfo::WhichFont( xub_StrLen nIdx, const String* pTxt, const SwScriptInfo* pSI )
+sal_uInt8 SwScriptInfo::WhichFont( xub_StrLen nIdx, const String* pTxt, const SwScriptInfo* pSI )
{
ASSERT( pTxt || pSI,"How should I determine the script type?" );
- USHORT nScript;
+ sal_uInt16 nScript;
// First we try to use our SwScriptInfo
if ( pSI )
@@ -806,7 +806,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
CalcHiddenRanges( rNode, aHiddenMulti );
aHiddenChg.clear();
- USHORT i = 0;
+ sal_uInt16 i = 0;
for( i = 0; i < aHiddenMulti.GetRangeCount(); ++i )
{
const Range& rRange = aHiddenMulti.GetRange( i );
@@ -827,16 +827,16 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
nInvalidityPos = STRING_LEN;
// this is the default direction
- nDefaultDir = static_cast<BYTE>(bRTL ? UBIDI_RTL : UBIDI_LTR);
+ nDefaultDir = static_cast<sal_uInt8>(bRTL ? UBIDI_RTL : UBIDI_LTR);
// counter for script info arrays
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
// counter for compression information arrays
- USHORT nCntComp = 0;
+ sal_uInt16 nCntComp = 0;
// counter for kashida array
- USHORT nCntKash = 0;
+ sal_uInt16 nCntKash = 0;
- BYTE nScript = i18n::ScriptType::LATIN;
+ sal_uInt8 nScript = i18n::ScriptType::LATIN;
// compression type
const SwCharCompressType aCompEnum = rNode.getIDocumentSettingAccess()->getCharacterCompressionType();
@@ -907,7 +907,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// If we are at the start of a group, we do not trust nScript,
// we better get nScript from the breakiterator:
if ( nChg == nGrpStart )
- nScript = (BYTE)pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
+ nScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
//
// INVALID DATA FROM THE SCRIPT INFO ARRAYS HAS TO BE DELETED:
@@ -919,7 +919,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
aScriptType.erase( aScriptType.begin() + nCnt, aScriptType.begin() + (nCnt + nScriptRemove) );
// get the start of the last compression group
- USHORT nLastCompression = nChg;
+ sal_uInt16 nLastCompression = nChg;
if( nCntComp )
{
--nCntComp;
@@ -938,7 +938,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
aCompType.erase( aCompType.begin() + nCntComp, aCompType.end() );
// get the start of the last kashida group
- USHORT nLastKashida = nChg;
+ sal_uInt16 nLastKashida = nChg;
if( nCntKash && i18n::ScriptType::COMPLEX == nScript )
{
--nCntKash;
@@ -965,7 +965,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
if( nEnd > rTxt.Len() )
nEnd = rTxt.Len();
- nScript = (BYTE)GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
+ nScript = (sal_uInt8)GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
ASSERT( i18n::ScriptType::LATIN == nScript ||
i18n::ScriptType::ASIAN == nScript ||
@@ -974,9 +974,9 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
nChg = nEnd;
// Get next script type or set to weak in order to exit
- BYTE nNextScript = ( nEnd < rTxt.Len() ) ?
- (BYTE)pBreakIt->GetBreakIter()->getScriptType( rTxt, nEnd ) :
- (BYTE)WEAK;
+ sal_uInt8 nNextScript = ( nEnd < rTxt.Len() ) ?
+ (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( rTxt, nEnd ) :
+ (sal_uInt8)WEAK;
if ( nScript != nNextScript )
{
@@ -1051,9 +1051,9 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
if ( CHARCOMPRESS_NONE != aCompEnum &&
i18n::ScriptType::ASIAN == nScript )
{
- BYTE ePrevState = NONE;
- BYTE eState;
- USHORT nPrevChg = nLastCompression;
+ sal_uInt8 ePrevState = NONE;
+ sal_uInt8 eState;
+ sal_uInt16 nPrevChg = nLastCompression;
while ( nLastCompression < nChg )
{
@@ -1076,7 +1076,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
eState = SPECIAL_RIGHT;
break;
default:
- eState = static_cast<BYTE>( ( 0x3040 <= cChar && 0x3100 > cChar ) ? KANA : NONE );
+ eState = static_cast<sal_uInt8>( ( 0x3040 <= cChar && 0x3100 > cChar ) ? KANA : NONE );
}
// insert range of compressable characters
@@ -1089,7 +1089,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
ePrevState != KANA )
{
aCompChg.insert( aCompChg.begin() + nCntComp, nPrevChg );
- BYTE nTmpType = ePrevState;
+ sal_uInt8 nTmpType = ePrevState;
aCompType.insert( aCompType.begin() + nCntComp, nTmpType );
aCompLen.insert( aCompLen.begin() + nCntComp, nLastCompression - nPrevChg );
nCntComp++;
@@ -1111,7 +1111,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
ePrevState != KANA )
{
aCompChg.insert( aCompChg.begin() + nCntComp, nPrevChg );
- BYTE nTmpType = ePrevState;
+ sal_uInt8 nTmpType = ePrevState;
aCompType.insert( aCompType.begin() + nCntComp, nTmpType );
aCompLen.insert( aCompLen.begin() + nCntComp, nLastCompression - nPrevChg );
nCntComp++;
@@ -1136,7 +1136,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
xub_Unicode cCh;
xub_Unicode cPrevCh = 0;
- USHORT nPriorityLevel = 7; // 0..6 = level found
+ sal_uInt16 nPriorityLevel = 7; // 0..6 = level found
// 7 not found
xub_StrLen nWordLen = rWord.Len();
@@ -1288,7 +1288,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
}
if ( nChg < rTxt.Len() )
- nScript = (BYTE)pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
+ nScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
nLastCompression = nChg;
nLastKashida = nChg;
@@ -1335,7 +1335,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// 2. Text in embedded LTR runs that does not have any strong LTR characters (numbers!)
for ( size_t nDirIdx = 0; nDirIdx < aDirChg.size(); ++nDirIdx )
{
- const BYTE nCurrDirType = GetDirType( nDirIdx );
+ const sal_uInt8 nCurrDirType = GetDirType( nDirIdx );
// nStart ist start of RTL run:
const xub_StrLen nStart = nDirIdx > 0 ? GetDirChg( nDirIdx - 1 ) : 0;
// nEnd is end of RTL run:
@@ -1355,7 +1355,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
++nScriptIdx;
const xub_StrLen nStartPosOfGroup = nScriptIdx ? GetScriptChg( nScriptIdx - 1 ) : 0;
- const BYTE nScriptTypeOfGroup = GetScriptType( nScriptIdx );
+ const sal_uInt8 nScriptTypeOfGroup = GetScriptType( nScriptIdx );
ASSERT( nStartPosOfGroup <= nStart && GetScriptChg( nScriptIdx ) > nStart,
"Script override with CTL font trouble" )
@@ -1382,8 +1382,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
aScriptType.insert( aScriptType.begin() + nScriptIdx, i18n::ScriptType::COMPLEX );
#if OSL_DEBUG_LEVEL > 1
- BYTE nScriptType;
- BYTE nLastScriptType = i18n::ScriptType::WEAK;
+ sal_uInt8 nScriptType;
+ sal_uInt8 nLastScriptType = i18n::ScriptType::WEAK;
xub_StrLen nScriptChg;
xub_StrLen nLastScriptChg = 0;
(void) nLastScriptChg;
@@ -1425,11 +1425,11 @@ void SwScriptInfo::UpdateBidiInfo( const String& rTxt )
UBiDiLevel nCurrDir;
// counter for direction information arrays
- for ( USHORT nIdx = 0; nIdx < nCount; ++nIdx )
+ for ( sal_uInt16 nIdx = 0; nIdx < nCount; ++nIdx )
{
ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir );
- aDirChg.push_back( (USHORT)nEnd );
- aDirType.push_back( (BYTE)nCurrDir );
+ aDirChg.push_back( (sal_uInt16)nEnd );
+ aDirType.push_back( (sal_uInt8)nCurrDir );
nStart = nEnd;
}
@@ -1450,8 +1450,8 @@ void SwScriptInfo::UpdateBidiInfo( const String& rTxt )
xub_StrLen SwScriptInfo::NextScriptChg( const xub_StrLen nPos ) const
{
- USHORT nEnd = CountScriptChg();
- for( USHORT nX = 0; nX < nEnd; ++nX )
+ sal_uInt16 nEnd = CountScriptChg();
+ for( sal_uInt16 nX = 0; nX < nEnd; ++nX )
{
if( nPos < GetScriptChg( nX ) )
return GetScriptChg( nX );
@@ -1465,25 +1465,25 @@ xub_StrLen SwScriptInfo::NextScriptChg( const xub_StrLen nPos ) const
* returns the script of the character at the input position
*************************************************************************/
-BYTE SwScriptInfo::ScriptType( const xub_StrLen nPos ) const
+sal_uInt8 SwScriptInfo::ScriptType( const xub_StrLen nPos ) const
{
- USHORT nEnd = CountScriptChg();
- for( USHORT nX = 0; nX < nEnd; ++nX )
+ sal_uInt16 nEnd = CountScriptChg();
+ for( sal_uInt16 nX = 0; nX < nEnd; ++nX )
{
if( nPos < GetScriptChg( nX ) )
return GetScriptType( nX );
}
// the default is the application language script
- return (BYTE)GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
+ return (sal_uInt8)GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
}
xub_StrLen SwScriptInfo::NextDirChg( const xub_StrLen nPos,
- const BYTE* pLevel ) const
+ const sal_uInt8* pLevel ) const
{
- BYTE nCurrDir = pLevel ? *pLevel : 62;
- USHORT nEnd = CountDirChg();
- for( USHORT nX = 0; nX < nEnd; ++nX )
+ sal_uInt8 nCurrDir = pLevel ? *pLevel : 62;
+ sal_uInt16 nEnd = CountDirChg();
+ for( sal_uInt16 nX = 0; nX < nEnd; ++nX )
{
if( nPos < GetDirChg( nX ) &&
( nX + 1 == nEnd || GetDirType( nX + 1 ) <= nCurrDir ) )
@@ -1493,10 +1493,10 @@ xub_StrLen SwScriptInfo::NextDirChg( const xub_StrLen nPos,
return STRING_LEN;
}
-BYTE SwScriptInfo::DirType( const xub_StrLen nPos ) const
+sal_uInt8 SwScriptInfo::DirType( const xub_StrLen nPos ) const
{
- USHORT nEnd = CountDirChg();
- for( USHORT nX = 0; nX < nEnd; ++nX )
+ sal_uInt16 nEnd = CountDirChg();
+ for( sal_uInt16 nX = 0; nX < nEnd; ++nX )
{
if( nPos < GetDirChg( nX ) )
return GetDirType( nX );
@@ -1510,7 +1510,7 @@ BYTE SwScriptInfo::DirType( const xub_StrLen nPos ) const
* Takes a string and replaced the hidden ranges with cChar.
**************************************************************************/
-USHORT SwScriptInfo::MaskHiddenRanges( const SwTxtNode& rNode, XubString& rText,
+sal_uInt16 SwScriptInfo::MaskHiddenRanges( const SwTxtNode& rNode, XubString& rText,
const xub_StrLen nStt, const xub_StrLen nEnd,
const xub_Unicode cChar )
{
@@ -1519,7 +1519,7 @@ USHORT SwScriptInfo::MaskHiddenRanges( const SwTxtNode& rNode, XubString& rText,
PositionList aList;
xub_StrLen nHiddenStart;
xub_StrLen nHiddenEnd;
- USHORT nNumOfHiddenChars = 0;
+ sal_uInt16 nNumOfHiddenChars = 0;
GetBoundsOfHiddenRange( rNode, 0, nHiddenStart, nHiddenEnd, &aList );
PositionList::const_reverse_iterator rFirst( aList.end() );
PositionList::const_reverse_iterator rLast( aList.begin() );
@@ -1624,7 +1624,7 @@ bool SwScriptInfo::GetBoundsOfHiddenRange( const SwTxtNode& rNode, xub_StrLen nP
Range aRange( 0, rNode.GetTxt().Len() ? rNode.GetTxt().Len() - 1 : 0 );
MultiSelection aHiddenMulti( aRange );
SwScriptInfo::CalcHiddenRanges( rNode, aHiddenMulti );
- for( USHORT i = 0; i < aHiddenMulti.GetRangeCount(); ++i )
+ for( sal_uInt16 i = 0; i < aHiddenMulti.GetRangeCount(); ++i )
{
const Range& rRange = aHiddenMulti.GetRange( i );
const xub_StrLen nHiddenStart = (xub_StrLen)rRange.Min();
@@ -1642,7 +1642,7 @@ bool SwScriptInfo::GetBoundsOfHiddenRange( const SwTxtNode& rNode, xub_StrLen nP
if ( pList )
{
- for( USHORT i = 0; i < aHiddenMulti.GetRangeCount(); ++i )
+ for( sal_uInt16 i = 0; i < aHiddenMulti.GetRangeCount(); ++i )
{
const Range& rRange = aHiddenMulti.GetRange( i );
pList->push_back( (xub_StrLen)rRange.Min() );
@@ -1667,8 +1667,8 @@ bool SwScriptInfo::GetBoundsOfHiddenRange( xub_StrLen nPos, xub_StrLen& rnStartP
rnStartPos = STRING_LEN;
rnEndPos = 0;
- USHORT nEnd = CountHiddenChg();
- for( USHORT nX = 0; nX < nEnd; ++nX )
+ sal_uInt16 nEnd = CountHiddenChg();
+ for( sal_uInt16 nX = 0; nX < nEnd; ++nX )
{
const xub_StrLen nHiddenStart = GetHiddenChg( nX++ );
const xub_StrLen nHiddenEnd = GetHiddenChg( nX );
@@ -1685,7 +1685,7 @@ bool SwScriptInfo::GetBoundsOfHiddenRange( xub_StrLen nPos, xub_StrLen& rnStartP
if ( pList )
{
- for( USHORT nX = 0; nX < nEnd; ++nX )
+ for( sal_uInt16 nX = 0; nX < nEnd; ++nX )
{
pList->push_back( GetHiddenChg( nX++ ) );
pList->push_back( GetHiddenChg( nX ) );
@@ -1714,10 +1714,10 @@ bool SwScriptInfo::IsInHiddenRange( const SwTxtNode& rNode, xub_StrLen nPos )
* returns the type of the compressed character
*************************************************************************/
-BYTE SwScriptInfo::CompType( const xub_StrLen nPos ) const
+sal_uInt8 SwScriptInfo::CompType( const xub_StrLen nPos ) const
{
- USHORT nEnd = CountCompChg();
- for( USHORT nX = 0; nX < nEnd; ++nX )
+ sal_uInt16 nEnd = CountCompChg();
+ for( sal_uInt16 nX = 0; nX < nEnd; ++nX )
{
xub_StrLen nChg = GetCompStart( nX );
@@ -1737,12 +1737,12 @@ BYTE SwScriptInfo::CompType( const xub_StrLen nPos ) const
* betwenn nStart and nEnd
*************************************************************************/
-USHORT SwScriptInfo::HasKana( xub_StrLen nStart, const xub_StrLen nLen ) const
+sal_uInt16 SwScriptInfo::HasKana( xub_StrLen nStart, const xub_StrLen nLen ) const
{
- USHORT nCnt = CountCompChg();
+ sal_uInt16 nCnt = CountCompChg();
xub_StrLen nEnd = nStart + nLen;
- for( USHORT nX = 0; nX < nCnt; ++nX )
+ for( sal_uInt16 nX = 0; nX < nCnt; ++nX )
{
xub_StrLen nKanaStart = GetCompStart( nX );
xub_StrLen nKanaEnd = nKanaStart + GetCompLen( nX );
@@ -1762,26 +1762,26 @@ USHORT SwScriptInfo::HasKana( xub_StrLen nStart, const xub_StrLen nLen ) const
*************************************************************************/
long SwScriptInfo::Compress( sal_Int32* pKernArray, xub_StrLen nIdx, xub_StrLen nLen,
- const USHORT nCompress, const USHORT nFontHeight,
+ const sal_uInt16 nCompress, const sal_uInt16 nFontHeight,
Point* pPoint ) const
{
ASSERT( nCompress, "Compression without compression?!" );
ASSERT( nLen, "Compression without text?!" );
- USHORT nCompCount = CountCompChg();
+ sal_uInt16 nCompCount = CountCompChg();
// In asian typography, there are full width and half width characters.
// Full width punctuation characters can be compressed by 50 %
// to determine this, we compare the font width with 75 % of its height
- USHORT nMinWidth = ( 3 * nFontHeight ) / 4;
+ sal_uInt16 nMinWidth = ( 3 * nFontHeight ) / 4;
- USHORT nCompIdx = HasKana( nIdx, nLen );
+ sal_uInt16 nCompIdx = HasKana( nIdx, nLen );
if ( USHRT_MAX == nCompIdx )
return 0;
xub_StrLen nChg = GetCompStart( nCompIdx );
xub_StrLen nCompLen = GetCompLen( nCompIdx );
- USHORT nI = 0;
+ sal_uInt16 nI = 0;
nLen = nLen + nIdx;
if( nChg > nIdx )
@@ -1799,7 +1799,7 @@ long SwScriptInfo::Compress( sal_Int32* pKernArray, xub_StrLen nIdx, xub_StrLen
long nLast = nI ? pKernArray[ nI - 1 ] : 0;
do
{
- USHORT nType = GetCompType( nCompIdx );
+ sal_uInt16 nType = GetCompType( nCompIdx );
#if OSL_DEBUG_LEVEL > 1
ASSERT( nType == CompType( nIdx ), "Gimme the right type!" );
#endif
@@ -1882,7 +1882,7 @@ long SwScriptInfo::Compress( sal_Int32* pKernArray, xub_StrLen nIdx, xub_StrLen
// total number of kashida positions, or the number of kashida positions after some positions
// have been dropped, depending on the state of the aKashidaInvalid array.
-USHORT SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
+sal_uInt16 SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
sal_Int32* pScrArray,
xub_StrLen nStt,
xub_StrLen nLen,
@@ -1895,7 +1895,7 @@ USHORT SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
// evaluate kashida informatin in collected in SwScriptInfo
- USHORT nCntKash = 0;
+ sal_uInt16 nCntKash = 0;
while( nCntKash < CountKashida() )
{
if ( nStt <= GetKashida( nCntKash ) )
@@ -1906,7 +1906,7 @@ USHORT SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
const xub_StrLen nEnd = nStt + nLen;
- USHORT nCntKashEnd = nCntKash;
+ sal_uInt16 nCntKashEnd = nCntKash;
while ( nCntKashEnd < CountKashida() )
{
if ( nEnd <= GetKashida( nCntKashEnd ) )
@@ -1915,8 +1915,8 @@ USHORT SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
nCntKashEnd++;
}
- USHORT nActualKashCount = nCntKashEnd - nCntKash;
- for ( USHORT i = nCntKash; i < nCntKashEnd; ++i )
+ sal_uInt16 nActualKashCount = nCntKashEnd - nCntKash;
+ for ( sal_uInt16 i = nCntKash; i < nCntKashEnd; ++i )
{
if ( nActualKashCount && !IsKashidaValid ( i ) )
--nActualKashCount;
@@ -1938,7 +1938,7 @@ USHORT SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
while ( nIdx < nEnd )
{
- USHORT nArrayPos = nIdx - nStt;
+ sal_uInt16 nArrayPos = nIdx - nStt;
// next kashida position
++nCntKash;
@@ -1949,7 +1949,7 @@ USHORT SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
if ( nIdx > nEnd )
nIdx = nEnd;
- const USHORT nArrayEnd = nIdx - nStt;
+ const sal_uInt16 nArrayEnd = nIdx - nStt;
while ( nArrayPos < nArrayEnd )
{
@@ -2049,7 +2049,7 @@ void SwScriptInfo::ClearKashidaInvalid ( xub_StrLen nKashPos )
bool SwScriptInfo::MarkOrClearKashidaInvalid ( xub_StrLen nStt, xub_StrLen nLen, bool bMark, xub_StrLen nMarkCount )
{
- USHORT nCntKash = 0;
+ sal_uInt16 nCntKash = 0;
while( nCntKash < CountKashida() )
{
if ( nStt <= GetKashida( nCntKash ) )
@@ -2095,10 +2095,10 @@ void SwScriptInfo::MarkKashidaInvalid ( xub_StrLen nKashPos )
* SwScriptInfo::GetKashidaPositions()
*************************************************************************/
// retrieve the kashida positions in the given text range
-USHORT SwScriptInfo::GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen,
+sal_uInt16 SwScriptInfo::GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen,
xub_StrLen* pKashidaPosition )
{
- USHORT nCntKash = 0;
+ sal_uInt16 nCntKash = 0;
while( nCntKash < CountKashida() )
{
if ( nStt <= GetKashida( nCntKash ) )
@@ -2109,7 +2109,7 @@ USHORT SwScriptInfo::GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen,
const xub_StrLen nEnd = nStt + nLen;
- USHORT nCntKashEnd = nCntKash;
+ sal_uInt16 nCntKashEnd = nCntKash;
while ( nCntKashEnd < CountKashida() )
{
if ( nEnd <= GetKashida( nCntKashEnd ) )
@@ -2170,7 +2170,7 @@ bool SwScriptInfo::MarkKashidasInvalid ( xub_StrLen nCnt, xub_StrLen* pKashidaPo
{
ASSERT( pKashidaPositions && nCnt > 0, "Where are kashidas?" )
- USHORT nCntKash = 0;
+ sal_uInt16 nCntKash = 0;
xub_StrLen nKashidaPosIdx = 0;
while ( nCntKash < CountKashida() && nKashidaPosIdx < nCnt )
@@ -2196,7 +2196,7 @@ bool SwScriptInfo::MarkKashidasInvalid ( xub_StrLen nCnt, xub_StrLen* pKashidaPo
* SwScriptInfo::ThaiJustify()
*************************************************************************/
-USHORT SwScriptInfo::ThaiJustify( const XubString& rTxt, sal_Int32* pKernArray,
+sal_uInt16 SwScriptInfo::ThaiJustify( const XubString& rTxt, sal_Int32* pKernArray,
sal_Int32* pScrArray, xub_StrLen nStt,
xub_StrLen nLen, xub_StrLen nNumberOfBlanks,
long nSpaceAdd )
@@ -2207,9 +2207,9 @@ USHORT SwScriptInfo::ThaiJustify( const XubString& rTxt, sal_Int32* pKernArray,
SPACING_PRECISION_FACTOR;
long nSpaceSum = 0;
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
- for ( USHORT nI = 0; nI < nLen; ++nI )
+ for ( sal_uInt16 nI = 0; nI < nLen; ++nI )
{
const xub_Unicode cCh = rTxt.GetChar( nStt + nI );
@@ -2341,7 +2341,7 @@ void SwLineLayout::Init( SwLinePortion* pNextPortion )
SwTwips SwLineLayout::_GetHangingMargin() const
{
SwLinePortion* pPor = GetPortion();
- BOOL bFound = sal_False;
+ sal_Bool bFound = sal_False;
SwTwips nDiff = 0;
while( pPor)
{
@@ -2391,7 +2391,7 @@ SwTwips SwTxtFrm::HangingMargin() const
void SwScriptInfo::CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHiddenMulti )
{
const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET == rNode.GetSwAttrSet().GetItemState( RES_CHRATR_HIDDEN, TRUE, &pItem ) &&
+ if( SFX_ITEM_SET == rNode.GetSwAttrSet().GetItemState( RES_CHRATR_HIDDEN, sal_True, &pItem ) &&
((SvxCharHiddenItem*)pItem)->GetValue() )
{
rHiddenMulti.SelectAll();
@@ -2426,7 +2426,7 @@ void SwScriptInfo::CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHi
const IDocumentRedlineAccess& rIDRA = *rNode.getIDocumentRedlineAccess();
if ( rHiddenMulti.GetRangeCount() && IDocumentRedlineAccess::IsShowChanges( rIDRA.GetRedlineMode() ) )
{
- USHORT nAct = rIDRA.GetRedlinePos( rNode, USHRT_MAX );
+ sal_uInt16 nAct = rIDRA.GetRedlinePos( rNode, USHRT_MAX );
for ( ; nAct < rIDRA.GetRedlineTbl().Count(); nAct++ )
{
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index f8a7deb9fe29..9dc56001c125 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -194,15 +194,15 @@ public:
void InitSpaceAdd(); // Creates pLLSpaceAdd if necessary
void CreateSpaceAdd( const long nInit = 0 );
inline void FinishSpaceAdd() { delete pLLSpaceAdd; pLLSpaceAdd = NULL; }
- inline USHORT GetLLSpaceAddCount() const { return sal::static_int_cast< USHORT >(pLLSpaceAdd->size()); }
- inline void SetLLSpaceAdd( long nNew, USHORT nIdx )
+ inline sal_uInt16 GetLLSpaceAddCount() const { return sal::static_int_cast< sal_uInt16 >(pLLSpaceAdd->size()); }
+ inline void SetLLSpaceAdd( long nNew, sal_uInt16 nIdx )
{
if ( nIdx == GetLLSpaceAddCount() )
pLLSpaceAdd->push_back( nNew );
else
(*pLLSpaceAdd)[ nIdx ] = nNew;
}
- inline long GetLLSpaceAdd( USHORT nIdx ) { return (*pLLSpaceAdd)[ nIdx ]; }
+ inline long GetLLSpaceAdd( sal_uInt16 nIdx ) { return (*pLLSpaceAdd)[ nIdx ]; }
inline void RemoveFirstLLSpaceAdd() { pLLSpaceAdd->erase( pLLSpaceAdd->begin() ); }
inline std::vector<long>* GetpLLSpaceAdd() const { return pLLSpaceAdd; }
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index 862b5ce13024..1de04c82b43c 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -117,18 +117,18 @@ void SwLinePortion::PrePaint( const SwTxtPaintInfo& rInf,
return;
const KSHORT nHalfView = nViewWidth / 2;
- USHORT nLastWidth = pLast->Width();
+ sal_uInt16 nLastWidth = pLast->Width();
if ( pLast->InSpaceGrp() && rInf.GetSpaceAdd() )
- nLastWidth = nLastWidth + (USHORT)pLast->CalcSpacing( rInf.GetSpaceAdd(), rInf );
+ nLastWidth = nLastWidth + (sal_uInt16)pLast->CalcSpacing( rInf.GetSpaceAdd(), rInf );
KSHORT nPos;
SwTxtPaintInfo aInf( rInf );
- const BOOL bBidiPor = ( rInf.GetTxtFrm()->IsRightToLeft() ) !=
+ const sal_Bool bBidiPor = ( rInf.GetTxtFrm()->IsRightToLeft() ) !=
( 0 != ( TEXT_LAYOUT_BIDI_RTL & rInf.GetOut()->GetLayoutMode() ) );
- USHORT nDir = bBidiPor ?
+ sal_uInt16 nDir = bBidiPor ?
1800 :
rInf.GetFont()->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
@@ -332,7 +332,7 @@ sal_Bool SwLinePortion::Format( SwTxtFormatInfo &rInf )
const SwLinePortion *pLast = rInf.GetLast();
Height( pLast->Height() );
SetAscent( pLast->GetAscent() );
- const KSHORT nNewWidth = static_cast<USHORT>(rInf.X() + PrtWidth());
+ const KSHORT nNewWidth = static_cast<sal_uInt16>(rInf.X() + PrtWidth());
// Nur Portions mit echter Breite koennen ein sal_True zurueckliefern
// Notizen beispielsweise setzen niemals bFull==sal_True
if( rInf.Width() <= nNewWidth && PrtWidth() && ! IsKernPortion() )
@@ -361,9 +361,9 @@ void SwLinePortion::FormatEOL( SwTxtFormatInfo & )
void SwLinePortion::Move( SwTxtPaintInfo &rInf )
{
- BOOL bB2T = rInf.GetDirection() == DIR_BOTTOM2TOP;
- const BOOL bFrmDir = rInf.GetTxtFrm()->IsRightToLeft();
- BOOL bCounterDir = ( ! bFrmDir && DIR_RIGHT2LEFT == rInf.GetDirection() ) ||
+ sal_Bool bB2T = rInf.GetDirection() == DIR_BOTTOM2TOP;
+ const sal_Bool bFrmDir = rInf.GetTxtFrm()->IsRightToLeft();
+ sal_Bool bCounterDir = ( ! bFrmDir && DIR_RIGHT2LEFT == rInf.GetDirection() ) ||
( bFrmDir && DIR_LEFT2RIGHT == rInf.GetDirection() );
if ( InSpaceGrp() && rInf.GetSpaceAdd() )
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 35f45f20d4c7..368f0782b144 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -79,7 +79,7 @@ SwMultiPortion::~SwMultiPortion()
void SwMultiPortion::Paint( const SwTxtPaintInfo & ) const
{
- ASSERT( FALSE,
+ ASSERT( sal_False,
"Don't try SwMultiPortion::Paint, try SwTxtPainter::PaintMultiPortion" );
}
@@ -212,7 +212,7 @@ SwRotatedPortion::SwRotatedPortion( const SwMultiCreator& rCreate,
* SwBidiPortion::SwBidiPortion(..)
* --------------------------------------------------*/
-SwBidiPortion::SwBidiPortion( xub_StrLen nEnd, BYTE nLv )
+SwBidiPortion::SwBidiPortion( xub_StrLen nEnd, sal_uInt8 nLv )
: SwMultiPortion( nEnd ), nLevel( nLv )
{
SetBidi();
@@ -329,7 +329,7 @@ SwDoubleLinePortion::SwDoubleLinePortion( const SwMultiCreator& rCreate,
pBracket->cPre = 0;
pBracket->cPost = 0;
}
- BYTE nTmp = SW_SCRIPTS;
+ sal_uInt8 nTmp = SW_SCRIPTS;
if( pBracket->cPre > 255 )
{
String aTxt( pBracket->cPre );
@@ -386,7 +386,7 @@ void SwDoubleLinePortion::PaintBracket( SwTxtPaintInfo &rInf,
aBlank.Height( pBracket->nHeight );
{
SwFont* pTmpFnt = new SwFont( *rInf.GetFont() );
- BYTE nAct = bOpen ? pBracket->nPreScript : pBracket->nPostScript;
+ sal_uInt8 nAct = bOpen ? pBracket->nPreScript : pBracket->nPostScript;
if( SW_SCRIPTS > nAct )
pTmpFnt->SetActual( nAct );
pTmpFnt->SetProportion( 100 );
@@ -433,7 +433,7 @@ void SwDoubleLinePortion::FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWi
if( pBracket->cPre )
{
String aStr( pBracket->cPre );
- BYTE nActualScr = pTmpFnt->GetActual();
+ sal_uInt8 nActualScr = pTmpFnt->GetActual();
if( SW_SCRIPTS > pBracket->nPreScript )
pTmpFnt->SetActual( pBracket->nPreScript );
SwFontSave aSave( rInf, pTmpFnt );
@@ -713,11 +713,11 @@ void SwRubyPortion::_Adjust( SwTxtFormatInfo &rInf )
}
KSHORT nLeft = 0; // the space in front of the first letter
KSHORT nRight = 0; // the space at the end of the last letter
- USHORT nSub = 0;
+ sal_uInt16 nSub = 0;
switch ( nAdjustment )
{
- case 1: nRight = static_cast<USHORT>(nLineDiff / 2); // no break
- case 2: nLeft = static_cast<USHORT>(nLineDiff - nRight); break;
+ case 1: nRight = static_cast<sal_uInt16>(nLineDiff / 2); // no break
+ case 2: nLeft = static_cast<sal_uInt16>(nLineDiff - nRight); break;
case 3: nSub = 1; // no break
case 4:
{
@@ -743,8 +743,8 @@ void SwRubyPortion::_Adjust( SwTxtFormatInfo &rInf )
}
if( nLineDiff > 1 )
{
- nRight = static_cast<USHORT>(nLineDiff / 2);
- nLeft = static_cast<USHORT>(nLineDiff - nRight);
+ nRight = static_cast<sal_uInt16>(nLineDiff / 2);
+ nLeft = static_cast<sal_uInt16>(nLineDiff - nRight);
}
break;
}
@@ -824,7 +824,7 @@ void SwRubyPortion::CalcRubyOffset()
* lcl_Has2Lines(..)
* is a little help function for GetMultiCreator(..)
* It extracts the 2-line-format from a 2-line-attribute or a character style.
- * The rValue is set to TRUE, if the 2-line-attribute's value is set and
+ * The rValue is set to sal_True, if the 2-line-attribute's value is set and
* no 2-line-format reference is passed. If there is a 2-line-format reference,
* then the rValue is set only, if the 2-line-attribute's value is set _and_
* the 2-line-formats has the same brackets.
@@ -853,7 +853,7 @@ sal_Bool lcl_Has2Lines( const SwTxtAttr& rAttr, const SvxTwoLinesItem* &rpRef,
* lcl_HasRotation(..)
* is a little help function for GetMultiCreator(..)
* It extracts the charrotation from a charrotate-attribute or a character style.
- * The rValue is set to TRUE, if the charrotate-attribute's value is set and
+ * The rValue is set to sal_True, if the charrotate-attribute's value is set and
* no charrotate-format reference is passed.
* If there is a charrotate-format reference, then the rValue is set only,
* if the charrotate-attribute's value is set _and_ identical
@@ -884,7 +884,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
SwScriptInfo& rSI = ((SwParaPortion*)GetParaPortion())->GetScriptInfo();
// get the last embedding level
- BYTE nCurrLevel;
+ sal_uInt8 nCurrLevel;
if ( pMulti )
{
ASSERT( pMulti->IsBidi(), "Nested MultiPortion is not BidiPortion" )
@@ -896,7 +896,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
nCurrLevel = GetTxtFrm()->IsRightToLeft() ? 1 : 0;
// check if there is a field at rPos:
- BYTE nNextLevel = nCurrLevel;
+ sal_uInt8 nNextLevel = nCurrLevel;
sal_Bool bFldBidi = sal_False;
if ( CH_TXTATR_BREAKWORD == GetChar( rPos ) )
@@ -942,7 +942,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
const SvxCharRotateItem* pRotate = NULL;
const SfxPoolItem* pRotItem;
if( SFX_ITEM_SET == pFrm->GetTxtNode()->GetSwAttrSet().
- GetItemState( RES_CHRATR_ROTATE, TRUE, &pRotItem ) &&
+ GetItemState( RES_CHRATR_ROTATE, sal_True, &pRotItem ) &&
((SvxCharRotateItem*)pRotItem)->GetValue() )
pRotate = (SvxCharRotateItem*)pRotItem;
else
@@ -950,7 +950,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
const SvxTwoLinesItem* p2Lines = NULL;
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pFrm->GetTxtNode()->GetSwAttrSet().
- GetItemState( RES_CHRATR_TWO_LINES, TRUE, &pItem ) &&
+ GetItemState( RES_CHRATR_TWO_LINES, sal_True, &pItem ) &&
((SvxTwoLinesItem*)pItem)->GetValue() )
p2Lines = (SvxTwoLinesItem*)pItem;
else
@@ -962,10 +962,10 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
const SwTxtAttr *pRuby = NULL;
sal_Bool bTwo = sal_False;
sal_Bool bRot = sal_False;
- USHORT n2Lines = USHRT_MAX;
- USHORT nRotate = USHRT_MAX;
- USHORT nCount = pHints ? pHints->Count() : 0;
- USHORT i;
+ sal_uInt16 n2Lines = USHRT_MAX;
+ sal_uInt16 nRotate = USHRT_MAX;
+ sal_uInt16 nCount = pHints ? pHints->Count() : 0;
+ sal_uInt16 i;
for( i = 0; i < nCount; ++i )
{
const SwTxtAttr *pTmp = (*pHints)[i];
@@ -1065,14 +1065,14 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
continue;
if( rPos < *pTmp->GetStart() )
{
- // If bOn is FALSE and the next attribute starts later than rPos
+ // If bOn is sal_False and the next attribute starts later than rPos
// the winner attribute is interrupted at rPos.
// If the start of the next atribute is behind the end of
// the last attribute on the aEnd-stack, this is the endposition
// on the stack is the end of the 2-line portion.
if( !bOn || aEnd.back() < *pTmp->GetStart() )
break;
- // At this moment, bOn is TRUE and the next attribute starts
+ // At this moment, bOn is sal_True and the next attribute starts
// behind rPos, so we could move rPos to the next startpoint
rPos = *pTmp->GetStart();
// We clean up the aEnd-stack, endpositions equal to rPos are
@@ -1083,7 +1083,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
aEnd.pop_back();
}
// If the endstack is empty, we simulate an attribute with
- // state TRUE and endposition rPos
+ // state sal_True and endposition rPos
if( aEnd.empty() )
{
aEnd.push_front( rPos );
@@ -1366,8 +1366,8 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
{
GETGRID( pFrm->FindPageFrm() )
const sal_Bool bHasGrid = pGrid && GetInfo().SnapToGrid();
- USHORT nGridWidth = 0;
- USHORT nRubyHeight = 0;
+ sal_uInt16 nGridWidth = 0;
+ sal_uInt16 nRubyHeight = 0;
sal_Bool bRubyTop = sal_False;
if ( bHasGrid )
@@ -1380,7 +1380,7 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
// do not allow grid mode for first line in ruby portion
const sal_Bool bRubyInGrid = bHasGrid && rMulti.IsRuby();
- const USHORT nOldHeight = rMulti.Height();
+ const sal_uInt16 nOldHeight = rMulti.Height();
const sal_Bool bOldGridModeAllowed = GetInfo().SnapToGrid();
if ( bRubyInGrid )
@@ -1390,9 +1390,9 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
}
SwLayoutModeModifier aLayoutModeModifier( *GetInfo().GetOut() );
- BYTE nEnvDir = 0;
- BYTE nThisDir = 0;
- BYTE nFrmDir = 0;
+ sal_uInt8 nEnvDir = 0;
+ sal_uInt8 nThisDir = 0;
+ sal_uInt8 nFrmDir = 0;
if ( rMulti.IsBidi() )
{
// these values are needed for the calculation of the x coordinate
@@ -1511,7 +1511,7 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
{
if( rMulti.HasRotation() )
{
- const USHORT nAdjustment = ( pLay->Height() - pPor->Height() ) / 2 +
+ const sal_uInt16 nAdjustment = ( pLay->Height() - pPor->Height() ) / 2 +
pPor->GetAscent();
if( rMulti.IsRevers() )
GetInfo().X( nOfst - nAdjustment );
@@ -1744,7 +1744,7 @@ void lcl_TruncateMultiPortion( SwMultiPortion& rMulti, SwTxtFormatInfo& rInf,
* SwTxtFrm::_Format with multiple BuildPortions
*---------------------------------------------------------------------------*/
-BOOL SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
+sal_Bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
SwMultiPortion& rMulti )
{
SwTwips nMaxWidth = rInf.Width();
@@ -1868,13 +1868,13 @@ BOOL SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
SwLinePortion *pNextFirst = NULL;
SwLinePortion *pNextSecond = NULL;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
GETGRID( pFrm->FindPageFrm() )
const sal_Bool bHasGrid = pGrid && GRID_LINES_CHARS == pGrid->GetGridType();
- USHORT nGridWidth = 0;
- USHORT nRubyHeight = 0;
+ sal_uInt16 nGridWidth = 0;
+ sal_uInt16 nRubyHeight = 0;
sal_Bool bRubyTop = sal_False;
if ( bHasGrid )
@@ -1888,7 +1888,7 @@ BOOL SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
{
pCurr = &rMulti.GetRoot();
nStart = nStartIdx;
- bRet = FALSE;
+ bRet = sal_False;
FormatReset( aInf );
aInf.X( nTmpX );
aInf.Width( KSHORT(nActWidth) );
@@ -2016,7 +2016,7 @@ BOOL SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
}
delete pNextFirst;
pNextFirst = NULL;
- } while ( TRUE );
+ } while ( sal_True );
pMulti = pOldMulti;
@@ -2358,7 +2358,7 @@ SwLinePortion* SwTxtFormatter::MakeRestPortion( const SwLineLayout* pLine,
SwTxtCursorSave::SwTxtCursorSave( SwTxtCursor* pTxtCursor,
SwMultiPortion* pMulti,
SwTwips nY,
- USHORT& nX,
+ sal_uInt16& nX,
xub_StrLen nCurrStart,
long nSpaceAdd )
{
@@ -2377,7 +2377,7 @@ SwTxtCursorSave::SwTxtCursorSave( SwTxtCursor* pTxtCursor,
{
bSpaceChg = pMulti->ChgSpaceAdd( pTxtCursor->pCurr, nSpaceAdd );
- USHORT nSpaceCnt;
+ sal_uInt16 nSpaceCnt;
if ( pMulti->IsDouble() )
{
pTxtCursor->SetPropFont( 50 );
@@ -2392,7 +2392,7 @@ SwTxtCursorSave::SwTxtCursorSave( SwTxtCursor* pTxtCursor,
}
if( nSpaceAdd > 0 && !pMulti->HasTabulator() )
- pTxtCursor->pCurr->Width( static_cast<USHORT>(nWidth + nSpaceAdd * nSpaceCnt / SPACING_PRECISION_FACTOR ) );
+ pTxtCursor->pCurr->Width( static_cast<sal_uInt16>(nWidth + nSpaceAdd * nSpaceCnt / SPACING_PRECISION_FACTOR ) );
// For a BidiPortion we have to calculate the offset from the
// end of the portion
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index a1e89f838b54..b292f1163e1d 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -56,8 +56,8 @@ struct SwMultiCreator
{
const SwTxtAttr* pAttr;
const SfxPoolItem* pItem;
- BYTE nId;
- BYTE nLevel;
+ sal_uInt8 nId;
+ sal_uInt8 nLevel;
};
/*-----------------25.10.00 16:19-------------------
@@ -74,8 +74,8 @@ struct SwBracket
KSHORT nPostWidth; // Width of the closing bracket
sal_Unicode cPre; // Initial character, e.g. '('
sal_Unicode cPost; // Final character, e.g. ')'
- BYTE nPreScript; // Script of the initial character
- BYTE nPostScript; // Script of the final character
+ sal_uInt8 nPreScript; // Script of the initial character
+ sal_uInt8 nPostScript; // Script of the final character
};
/*-----------------16.10.00 12:45-------------------
@@ -147,7 +147,7 @@ public:
inline sal_Bool HasRotation() const { return 0 != (1 & nDirection); }
inline sal_Bool IsRevers() const { return 0 != (2 & nDirection); }
inline sal_uInt8 GetDirection() const { return nDirection; }
- inline USHORT GetFontRotation() const
+ inline sal_uInt16 GetFontRotation() const
{ return ( HasRotation() ? ( IsRevers() ? 2700 : 900 ) : 0 ); }
// Accessibility: pass information about this portion to the PortionHandler
@@ -194,7 +194,7 @@ public:
class SwRubyPortion : public SwMultiPortion
{
xub_StrLen nRubyOffset;
- USHORT nAdjustment;
+ sal_uInt16 nAdjustment;
void _Adjust( SwTxtFormatInfo &rInf);
public:
SwRubyPortion( const SwRubyPortion& rRuby, xub_StrLen nEnd );
@@ -207,7 +207,7 @@ public:
void CalcRubyOffset();
inline void Adjust( SwTxtFormatInfo &rInf )
{ if(nAdjustment && GetRoot().GetNext()) _Adjust(rInf); }
- inline USHORT GetAdjustment() const { return nAdjustment; }
+ inline sal_uInt16 GetAdjustment() const { return nAdjustment; }
inline xub_StrLen GetRubyOffset() const { return nRubyOffset; }
};
@@ -222,12 +222,12 @@ public:
class SwBidiPortion : public SwMultiPortion
{
- BYTE nLevel;
+ sal_uInt8 nLevel;
public:
- SwBidiPortion( xub_StrLen nEnd, BYTE nLv );
+ SwBidiPortion( xub_StrLen nEnd, sal_uInt8 nLv );
- inline BYTE GetLevel() const { return nLevel; }
+ inline sal_uInt8 GetLevel() const { return nLevel; }
// Get number of blanks for justified alignment
xub_StrLen GetSpaceCnt( const SwTxtSizeInfo &rInf ) const;
// Calculates extra spacing based on number of blanks
@@ -244,11 +244,11 @@ class SwTxtCursorSave
SwLineLayout* pCurr;
SwTwips nWidth;
xub_StrLen nStart;
- BYTE nOldProp;
+ sal_uInt8 nOldProp;
sal_Bool bSpaceChg;
public:
SwTxtCursorSave( SwTxtCursor* pTxtCursor, SwMultiPortion* pMulti,
- SwTwips nY, USHORT& nX, xub_StrLen nCurrStart, long nSpaceAdd );
+ SwTwips nY, sal_uInt16& nX, xub_StrLen nCurrStart, long nSpaceAdd );
~SwTxtCursorSave();
};
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 3bc8e566b335..52acbe4e2e95 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -211,7 +211,7 @@ SwArrowPortion::SwArrowPortion( const SwLinePortion &rPortion ) :
SwArrowPortion::SwArrowPortion( const SwTxtPaintInfo &rInf )
: bLeft( sal_False )
{
- Height( (USHORT)(rInf.GetTxtFrm()->Prt().Height()) );
+ Height( (sal_uInt16)(rInf.GetTxtFrm()->Prt().Height()) );
aPos.X() = rInf.GetTxtFrm()->Frm().Left() +
rInf.GetTxtFrm()->Prt().Right();
aPos.Y() = rInf.GetTxtFrm()->Frm().Top() +
@@ -521,7 +521,7 @@ void SwControlCharPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
SwFont aTmpFont( *rInf.GetFont() );
aTmpFont.SetEscapement( CHAR_ZWSP == mcChar ? DFLT_ESC_AUTO_SUB : -25 );
- const USHORT nProp = 40;
+ const sal_uInt16 nProp = 40;
aTmpFont.SetProportion( nProp ); // a smaller font
SwFontSave aFontSave( rInf, &aTmpFont );
diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx
index f94410bb4213..1eaaa442b9b0 100644
--- a/sw/source/core/text/porrst.hxx
+++ b/sw/source/core/text/porrst.hxx
@@ -156,8 +156,8 @@ class SwControlCharPortion : public SwLinePortion
{
private:
- mutable USHORT mnViewWidth; // used to cache a calculated value
- mutable USHORT mnHalfCharWidth; // used to cache a calculated value
+ mutable sal_uInt16 mnViewWidth; // used to cache a calculated value
+ mutable sal_uInt16 mnHalfCharWidth; // used to cache a calculated value
sal_Unicode mcChar;
public:
diff --git a/sw/source/core/text/portab.hxx b/sw/source/core/text/portab.hxx
index a2f10803c894..00b061230a46 100644
--- a/sw/source/core/text/portab.hxx
+++ b/sw/source/core/text/portab.hxx
@@ -107,7 +107,7 @@ class SwTabDecimalPortion : public SwTabPortion
* following the tab stop up to the decimal position. This value is
* evaluated during pLastTab->FormatEOL. FME 2006-01-06 #127428#.
*/
- USHORT mnWidthOfPortionsUpTpDecimalPosition;
+ sal_uInt16 mnWidthOfPortionsUpTpDecimalPosition;
public:
inline SwTabDecimalPortion( const KSHORT nTabPosVal, const xub_Unicode cTab,
@@ -119,11 +119,11 @@ public:
inline xub_Unicode GetTabDecimal() const { return mcTab; }
- inline void SetWidthOfPortionsUpToDecimalPosition( USHORT nNew )
+ inline void SetWidthOfPortionsUpToDecimalPosition( sal_uInt16 nNew )
{
mnWidthOfPortionsUpTpDecimalPosition = nNew;
}
- inline USHORT GetWidthOfPortionsUpToDecimalPosition() const
+ inline sal_uInt16 GetWidthOfPortionsUpToDecimalPosition() const
{
return mnWidthOfPortionsUpTpDecimalPosition;
}
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index a849cbe42f40..f123f6c42c6b 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -68,7 +68,7 @@ using namespace ::com::sun::star::i18n::ScriptType;
* (for justified alignment).
*************************************************************************/
-USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
+sal_uInt16 lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
const SwLinePortion& rPor )
{
xub_StrLen nPos, nEnd;
@@ -88,8 +88,8 @@ USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
pSI = &((SwParaPortion*)rInf.GetParaPortion())->GetScriptInfo();
}
- USHORT nCnt = 0;
- BYTE nScript = 0;
+ sal_uInt16 nCnt = 0;
+ sal_uInt8 nScript = 0;
// If portion consists of Asian characters and language is not
// Korean, we add extra space to each character.
@@ -97,7 +97,7 @@ USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
if ( pSI )
nScript = pSI->ScriptType( nPos );
else if ( pBreakIt->GetBreakIter().is() )
- nScript = (BYTE)pBreakIt->GetBreakIter()->getScriptType( *pStr, nPos );
+ nScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( *pStr, nPos );
// Note: rInf.GetIdx() can differ from nPos,
// e.g., when rPor is a field portion. nPos referes to the string passed
@@ -135,7 +135,7 @@ USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
{
if ( SwScriptInfo::IsArabicText( *pStr, nPos, nEnd - nPos ) && pSI->CountKashida() )
{
- const USHORT nKashRes = pSI->KashidaJustify( 0, 0, nPos, nEnd - nPos );
+ const sal_uInt16 nKashRes = pSI->KashidaJustify( 0, 0, nPos, nEnd - nPos );
// i60591: need to check result of KashidaJustify
// determine if kashida justification is applicable
if( nKashRes != STRING_LEN )
@@ -192,7 +192,7 @@ USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
nPos = rInf.GetIdx() + rPor.GetLen();
if ( nPos < rInf.GetTxt().Len() )
{
- BYTE nNextScript = 0;
+ sal_uInt8 nNextScript = 0;
const SwLinePortion* pPor = rPor.GetPortion();
if ( pPor && pPor->IsKernPortion() )
pPor = pPor->GetPortion();
@@ -210,10 +210,10 @@ USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
pPor->GetExpTxt( rInf, aStr );
((SwTxtSizeInfo &)rInf).SetOnWin( bOldOnWin );
- nNextScript = (BYTE)pBreakIt->GetBreakIter()->getScriptType( aStr, 0 );
+ nNextScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( aStr, 0 );
}
else
- nNextScript = (BYTE)pBreakIt->GetBreakIter()->getScriptType( rInf.GetTxt(), nPos );
+ nNextScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( rInf.GetTxt(), nPos );
if( ASIAN == nNextScript )
{
@@ -523,7 +523,7 @@ void SwTxtPortion::FormatEOL( SwTxtFormatInfo &rInf )
{
// calculate number of blanks
xub_StrLen nX = rInf.GetIdx() - 1;
- USHORT nHoleLen = 1;
+ sal_uInt16 nHoleLen = 1;
while( nX && nHoleLen < GetLen() && CH_BLANK == rInf.GetChar( --nX ) )
nHoleLen++;
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index d789121de4b8..2de77f4f9d21 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -112,13 +112,13 @@ void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, S
pFnt->SetActual( SwScriptInfo::WhichFont( 0, 0, pScriptInfo ) );
xub_StrLen nChg = 0;
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
do
{
nChg = pScriptInfo->GetScriptChg( nCnt );
- USHORT nScript = pScriptInfo->GetScriptType( nCnt++ );
- BYTE nTmp = 4;
+ sal_uInt16 nScript = pScriptInfo->GetScriptType( nCnt++ );
+ sal_uInt8 nTmp = 4;
switch ( nScript ) {
case i18n::ScriptType::ASIAN :
if( !aMagicNo[SW_CJK] ) nTmp = SW_CJK; break;
diff --git a/sw/source/core/text/redlnitr.hxx b/sw/source/core/text/redlnitr.hxx
index 466cd5a9ad02..c288d427e92c 100644
--- a/sw/source/core/text/redlnitr.hxx
+++ b/sw/source/core/text/redlnitr.hxx
@@ -76,7 +76,7 @@ class SwRedlineItr
SwAttrHandler& rAttrHandler;
SfxItemSet *pSet;
SwExtend *pExt;
- ULONG nNdIdx;
+ sal_uLong nNdIdx;
xub_StrLen nFirst;
xub_StrLen nAct;
xub_StrLen nStart;
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 3e67e1037dfe..19d888153542 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -63,7 +63,7 @@ using namespace ::com::sun::star;
*************************************************************************/
sal_Bool lcl_IsDropFlyInter( const SwTxtFormatInfo &rInf,
- USHORT nWidth, USHORT nHeight )
+ sal_uInt16 nWidth, sal_uInt16 nHeight )
{
const SwTxtFly *pTxtFly = rInf.GetTxtFly();
if( pTxtFly && pTxtFly->IsOn() )
@@ -168,7 +168,7 @@ MSHORT SwTxtNode::GetDropLen( MSHORT nWishLen ) const
{
// find first word
const SwAttrSet& rAttrSet = GetSwAttrSet();
- const USHORT nTxtScript = pBreakIt->GetRealScriptOfText( GetTxt(), 0 );
+ const sal_uInt16 nTxtScript = pBreakIt->GetRealScriptOfText( GetTxt(), 0 );
LanguageType eLanguage;
@@ -270,7 +270,7 @@ bool SwTxtNode::GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescen
if (rFontHeight==0 && rDropHeight==0 && rDropDescent==0)
{
- const USHORT nLines = rDrop.GetLines();
+ const sal_uInt16 nLines = rDrop.GetLines();
const SvxFontHeightItem& rItem = (SvxFontHeightItem&)rSet.Get( RES_CHRATR_FONTSIZE );
rFontHeight = rItem.GetHeight();
@@ -433,7 +433,7 @@ sal_Bool SwDropPortion::FormatTxt( SwTxtFormatInfo &rInf )
SwPosSize SwDropPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
{
- USHORT nMyX = 0;
+ sal_uInt16 nMyX = 0;
xub_StrLen nIdx = 0;
const SwDropPortionPart* pCurrPart = GetPart();
@@ -725,7 +725,7 @@ class SwDropCapCache
{
long aMagicNo[ DROP_CACHE_SIZE ];
XubString aTxt[ DROP_CACHE_SIZE ];
- USHORT aFactor[ DROP_CACHE_SIZE ];
+ sal_uInt16 aFactor[ DROP_CACHE_SIZE ];
KSHORT aWishedHeight[ DROP_CACHE_SIZE ];
short aDescent[ DROP_CACHE_SIZE ];
MSHORT nIndex;
@@ -817,7 +817,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
aTxt[ nTmpIdx ] = aStr;
aWishedHeight[ nTmpIdx ] = KSHORT(nWishedHeight);
// save initial scaling factor
- aFactor[ nTmpIdx ] = (USHORT)nFactor;
+ aFactor[ nTmpIdx ] = (sal_uInt16)nFactor;
}
sal_Bool bGrow = ( pDrop->GetLen() != 0 );
@@ -853,11 +853,11 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
SwFont& rFnt = pCurrPart->GetFont();
// Get height including proportion
- const USHORT nCurrHeight =
- (USHORT)rFnt.GetHeight( rFnt.GetActual() );
+ const sal_uInt16 nCurrHeight =
+ (sal_uInt16)rFnt.GetHeight( rFnt.GetActual() );
// Get without proportion
- const BYTE nOldProp = rFnt.GetPropr();
+ const sal_uInt8 nOldProp = rFnt.GetPropr();
rFnt.SetProportion( 100 );
Size aOldSize = Size( 0, rFnt.GetHeight( rFnt.GetActual() ) );
@@ -950,7 +950,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
else
{
if ( bUseCache )
- aFactor[ nTmpIdx ] = (USHORT)nFactor;
+ aFactor[ nTmpIdx ] = (sal_uInt16)nFactor;
nMin = nFactor;
}
@@ -994,7 +994,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
SwFont& rFnt = pCurrPart->GetFont();
Size aNewSize( 0, ( nFactor * rFnt.GetHeight( rFnt.GetActual() ) ) / 1000 );
- const BYTE nOldProp = rFnt.GetPropr();
+ const sal_uInt8 nOldProp = rFnt.GetPropr();
rFnt.SetProportion( 100 );
rFnt.SetSize( aNewSize, rFnt.GetActual() );
rFnt.SetProportion( nOldProp );
@@ -1011,7 +1011,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
sal_Bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
{
sal_Bool bFull = sal_False;
- Fix( (USHORT)rInf.X() );
+ Fix( (sal_uInt16)rInf.X() );
SwLayoutModeModifier aLayoutModeModifier( *rInf.GetOut() );
aLayoutModeModifier.SetAuto();
@@ -1047,7 +1047,7 @@ sal_Bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
Width();
// set values
- pCurrPart->SetWidth( (USHORT)nTmpWidth );
+ pCurrPart->SetWidth( (sal_uInt16)nTmpWidth );
// Move
rInf.SetIdx( rInf.GetIdx() + pCurrPart->GetLen() );
@@ -1055,7 +1055,7 @@ sal_Bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
pCurrPart = pCurrPart->GetFollow();
}
- Width( (USHORT)(rInf.X() - nOldX) );
+ Width( (sal_uInt16)(rInf.X() - nOldX) );
}
// reset my length
@@ -1093,7 +1093,7 @@ sal_Bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
else
{
const KSHORT nWant = Width() + GetDistance();
- const KSHORT nRest = (USHORT)(rInf.Width() - rInf.X());
+ const KSHORT nRest = (sal_uInt16)(rInf.Width() - rInf.X());
if( ( nWant > nRest ) ||
lcl_IsDropFlyInter( rInf, Width() + GetDistance(), nDropHeight ) )
nDistance = 0;
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 514ac96d3d46..b91436a72832 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -446,7 +446,7 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
// hat ein "gueltige" Nummer ?
if( pTxtNd->IsNumbered() && pTxtNd->IsCountedInList())
{
- const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<USHORT>(pTxtNd->GetActualListLevel()) );
+ const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()) );
const sal_Bool bLeft = SVX_ADJUST_LEFT == rNumFmt.GetNumAdjust();
const sal_Bool bCenter = SVX_ADJUST_CENTER == rNumFmt.GetNumAdjust();
// --> OD 2008-01-23 #newlistlevelattrs#
@@ -519,7 +519,7 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
if ( pFmtFnt )
{
- const BYTE nAct = pNumFnt->GetActual();
+ const sal_uInt8 nAct = pNumFnt->GetActual();
pNumFnt->SetFamily( pFmtFnt->GetFamily(), nAct );
pNumFnt->SetName( pFmtFnt->GetName(), nAct );
pNumFnt->SetStyleName( pFmtFnt->GetStyleName(), nAct );
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index df915fc7192b..68283e988ca1 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -546,7 +546,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
if( bForced )
{
pCurr->SetForcedLeftMargin( sal_True );
- rInf.ForcedLeftMargin( (USHORT)aInter.Width() );
+ rInf.ForcedLeftMargin( (sal_uInt16)aInter.Width() );
}
if( bFullLine )
@@ -619,7 +619,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
(pPageFrm->*fnRect->fnGetPrtLeft)();
const SwDoc *pDoc = rInf.GetTxtFrm()->GetNode()->GetDoc();
- const USHORT nGridWidth = GETGRIDWIDTH( pGrid, pDoc); //for textgrid refactor
+ const sal_uInt16 nGridWidth = GETGRIDWIDTH( pGrid, pDoc); //for textgrid refactor
SwTwips nStartX = GetLeftMargin();
if ( bVert )
@@ -632,11 +632,11 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
const SwTwips nOfst = nStartX - nGridOrigin;
const SwTwips nTmpWidth = rInf.Width() + nOfst;
- const ULONG i = nTmpWidth / nGridWidth + 1;
+ const sal_uLong i = nTmpWidth / nGridWidth + 1;
const long nNewWidth = ( i - 1 ) * nGridWidth - nOfst;
if ( nNewWidth > 0 )
- rInf.Width( (USHORT)nNewWidth );
+ rInf.Width( (sal_uInt16)nNewWidth );
else
rInf.Width( 0 );
}
@@ -687,7 +687,7 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
pFly->GetRefPoint().Y() );
if ( bUseFlyAscent )
- nAscent = static_cast<USHORT>( Abs( int( bTxtFrmVertical ?
+ nAscent = static_cast<sal_uInt16>( Abs( int( bTxtFrmVertical ?
pFly->GetRelPos().X() :
pFly->GetRelPos().Y() ) ) );
@@ -951,7 +951,7 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
sal_Bool bOpaque = sal_False;
// --> OD 2006-08-15 #i68520#
- const UINT32 nCurrOrd = mpCurrAnchoredObj
+ const sal_uInt32 nCurrOrd = mpCurrAnchoredObj
? mpCurrAnchoredObj->GetDrawObj()->GetOrdNum()
: SAL_MAX_UINT32;
// <--
@@ -1146,8 +1146,8 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
// #102344# Ignore connectors which have one or more connections
if(pNew && pNew->ISA(SdrEdgeObj))
{
- if(((SdrEdgeObj*)pNew)->GetConnectedNode(TRUE)
- || ((SdrEdgeObj*)pNew)->GetConnectedNode(FALSE))
+ if(((SdrEdgeObj*)pNew)->GetConnectedNode(sal_True)
+ || ((SdrEdgeObj*)pNew)->GetConnectedNode(sal_False))
{
return sal_False;
}
@@ -1167,7 +1167,7 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
if ( bInFooterOrHeader )
{
SwFmtVertOrient aVert( rFrmFmt.GetVertOrient() );
- BOOL bVertPrt = aVert.GetRelationOrient() == text::RelOrientation::PRINT_AREA ||
+ sal_Bool bVertPrt = aVert.GetRelationOrient() == text::RelOrientation::PRINT_AREA ||
aVert.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA;
if( bVertPrt )
return sal_False;
@@ -1337,7 +1337,7 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
// Compare indices:
// Den Index des anderen erhalten wir immer ueber das Ankerattr.
- ULONG nTmpIndex = rNewA.GetCntntAnchor()->nNode.GetIndex();
+ sal_uLong nTmpIndex = rNewA.GetCntntAnchor()->nNode.GetIndex();
// Jetzt wird noch ueberprueft, ob der aktuelle Absatz vor dem
// Anker des verdraengenden Objekts im Text steht, dann wird
// nicht ausgewichen.
@@ -1796,7 +1796,7 @@ const SwRect SwContourCache::ContourRect( const SwFmt* pFmt,
pSdrObj[ 0 ] = pObj; // Wg. #37347 darf das Object erst nach dem
// GetContour() eingetragen werden.
pTextRanger[ 0 ] = new TextRanger( aPolyPolygon, pPolyPolygon, 20,
- (USHORT)rLRSpace.GetLeft(), (USHORT)rLRSpace.GetRight(),
+ (sal_uInt16)rLRSpace.GetLeft(), (sal_uInt16)rLRSpace.GetRight(),
pFmt->GetSurround().IsOutside(), sal_False, pFrm->IsVertical() );
pTextRanger[ 0 ]->SetUpper( rULSpace.GetUpper() );
pTextRanger[ 0 ]->SetLower( rULSpace.GetLower() );
@@ -1932,7 +1932,7 @@ void SwContourCache::ShowContour( OutputDevice* pOut, const SdrObject* pObj,
void SwTxtFly::ShowContour( OutputDevice* pOut )
{
MSHORT nFlyCount;
- if( bOn && ( 0 != ( nFlyCount = static_cast<USHORT>(GetAnchoredObjList()->size() ) ) ) )
+ if( bOn && ( 0 != ( nFlyCount = static_cast<sal_uInt16>(GetAnchoredObjList()->size() ) ) ) )
{
Color aRedColor( COL_LIGHTRED );
Color aGreenColor( COL_LIGHTGREEN );
diff --git a/sw/source/core/text/txtfly.hxx b/sw/source/core/text/txtfly.hxx
index 8c128c52c015..6bfb4e9afa0e 100644
--- a/sw/source/core/text/txtfly.hxx
+++ b/sw/source/core/text/txtfly.hxx
@@ -125,7 +125,7 @@ class SwTxtFly
long nMinBottom;
long nNextTop; // Hier wird die Oberkante des "naechsten" Rahmens gespeichert
- ULONG nIndex;
+ sal_uLong nIndex;
sal_Bool bOn : 1;
sal_Bool bLeftSide : 1;
sal_Bool bTopRule: 1;
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 0861f98b2ddf..125f3f52908f 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -280,7 +280,7 @@ void SwLayoutModeModifier::Modify( sal_Bool bChgToRTL )
void SwLayoutModeModifier::SetAuto()
{
- const ULONG nNewLayoutMode = nOldLayoutMode & ~TEXT_LAYOUT_BIDI_STRONG;
+ const sal_uLong nNewLayoutMode = nOldLayoutMode & ~TEXT_LAYOUT_BIDI_STRONG;
((OutputDevice&)rOut).SetLayoutMode( nNewLayoutMode );
}
@@ -445,9 +445,9 @@ void SwTxtFrm::HideFootnotes( xub_StrLen nStart, xub_StrLen nEnd )
const SwpHints *pHints = GetTxtNode()->GetpSwpHints();
if( pHints )
{
- const USHORT nSize = pHints->Count();
+ const sal_uInt16 nSize = pHints->Count();
SwPageFrm *pPage = 0;
- for ( USHORT i = 0; i < nSize; ++i )
+ for ( sal_uInt16 i = 0; i < nSize; ++i )
{
const SwTxtAttr *pHt = (*pHints)[i];
if ( pHt->Which() == RES_TXTATR_FTN )
@@ -844,13 +844,13 @@ void lcl_SetWrong( SwTxtFrm& rFrm, xub_StrLen nPos, long nCnt, bool bMove )
if ( !pTxtNode->GetWrong() && !pTxtNode->IsWrongDirty() )
{
pTxtNode->SetWrong( new SwWrongList( WRONGLIST_SPELL ) );
- pTxtNode->GetWrong()->SetInvalid( nPos, nPos + (USHORT)( nCnt > 0 ? nCnt : 1 ) );
+ pTxtNode->GetWrong()->SetInvalid( nPos, nPos + (sal_uInt16)( nCnt > 0 ? nCnt : 1 ) );
}
if ( !pTxtNode->GetSmartTags() && !pTxtNode->IsSmartTagDirty() )
{
// SMARTTAGS
pTxtNode->SetSmartTags( new SwWrongList( WRONGLIST_SMARTTAG ) );
- pTxtNode->GetSmartTags()->SetInvalid( nPos, nPos + (USHORT)( nCnt > 0 ? nCnt : 1 ) );
+ pTxtNode->GetSmartTags()->SetInvalid( nPos, nPos + (sal_uInt16)( nCnt > 0 ? nCnt : 1 ) );
}
pTxtNode->SetWrongDirty( true );
pTxtNode->SetGrammarCheckDirty( true );
@@ -863,7 +863,7 @@ void lcl_SetWrong( SwTxtFrm& rFrm, xub_StrLen nPos, long nCnt, bool bMove )
SwRootFrm *pRootFrm = rFrm.FindRootFrm();
if (pRootFrm)
{
- pRootFrm->SetNeedGrammarCheck( TRUE );
+ pRootFrm->SetNeedGrammarCheck( sal_True );
}
SwPageFrm *pPage = rFrm.FindPageFrm();
@@ -1487,7 +1487,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
switch ( ePrep )
{
case PREP_BOSS_CHGD:
- SetInvalidVert( TRUE ); // Test
+ SetInvalidVert( sal_True ); // Test
case PREP_WIDOWS_ORPHANS:
case PREP_WIDOWS:
case PREP_FTN_GONE : return;
@@ -1533,7 +1533,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
if( !HasPara() && PREP_MUST_FIT != ePrep )
{
- SetInvalidVert( TRUE ); // Test
+ SetInvalidVert( sal_True ); // Test
ASSERT( !IsLocked(), "SwTxtFrm::Prepare: three of a perfect pair" );
if ( bNotify )
InvalidateSize();
@@ -1613,9 +1613,9 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
{
// Test
{
- SetInvalidVert( FALSE );
- BOOL bOld = IsVertical();
- SetInvalidVert( TRUE );
+ SetInvalidVert( sal_False );
+ sal_Bool bOld = IsVertical();
+ SetInvalidVert( sal_True );
if( bOld != IsVertical() )
InvalidateRange( SwCharRange( GetOfst(), STRING_LEN ) );
}
@@ -1640,10 +1640,10 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
SwpHints *pHints = GetTxtNode()->GetpSwpHints();
if( pHints )
{
- const USHORT nSize = pHints->Count();
+ const sal_uInt16 nSize = pHints->Count();
const xub_StrLen nEnd = GetFollow() ?
GetFollow()->GetOfst() : STRING_LEN;
- for ( USHORT i = 0; i < nSize; ++i )
+ for ( sal_uInt16 i = 0; i < nSize; ++i )
{
const SwTxtAttr *pHt = (*pHints)[i];
const xub_StrLen nStart = *pHt->GetStart();
@@ -2197,7 +2197,7 @@ void SwTxtFrm::CalcAdditionalFirstLineOffset()
pTxtNode->GetNumRule() )
{
const SwNumFmt& rNumFmt =
- pTxtNode->GetNumRule()->Get( static_cast<USHORT>(pTxtNode->GetActualListLevel()) );
+ pTxtNode->GetNumRule()->Get( static_cast<sal_uInt16>(pTxtNode->GetActualListLevel()) );
if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
// keep current paragraph portion and apply dummy paragraph portion
@@ -2497,7 +2497,7 @@ void SwTxtFrm::ChgThisLines()
{
//not necassary to format here (GerFormatted etc.), because we have to come from there!
- ULONG nNew = 0;
+ sal_uLong nNew = 0;
const SwLineNumberInfo &rInf = GetNode()->getIDocumentLineNumberAccess()->GetLineNumberInfo();
if ( GetTxt().Len() && HasPara() )
{
@@ -2506,7 +2506,7 @@ void SwTxtFrm::ChgThisLines()
if ( rInf.IsCountBlankLines() )
{
aLine.Bottom();
- nNew = (ULONG)aLine.GetLineNr();
+ nNew = (sal_uLong)aLine.GetLineNr();
}
else
{
@@ -2558,9 +2558,9 @@ void SwTxtFrm::RecalcAllLines()
if ( !IsInTab() )
{
- const ULONG nOld = GetAllLines();
+ const sal_uLong nOld = GetAllLines();
const SwFmtLineNumber &rLineNum = pAttrSet->GetLineNumber();
- ULONG nNewNum;
+ sal_uLong nNewNum;
const bool bRestart = GetTxtNode()->getIDocumentLineNumberAccess()->GetLineNumberInfo().IsRestartEachPage();
if ( !IsFollow() && rLineNum.GetStartValue() && rLineNum.IsCount() )
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 2b655847ad05..d6a0ce1dc6d0 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -115,7 +115,7 @@ void SwTxtFrm::CalcFtnFlag( xub_StrLen nStop )//Fuer den Test von SplitFrm
if( !pHints )
return;
- const USHORT nSize = pHints->Count();
+ const sal_uInt16 nSize = pHints->Count();
#ifndef DBG_UTIL
const xub_StrLen nEnd = GetFollow() ? GetFollow()->GetOfst() : STRING_LEN;
@@ -124,7 +124,7 @@ void SwTxtFrm::CalcFtnFlag( xub_StrLen nStop )//Fuer den Test von SplitFrm
: GetFollow() ? GetFollow()->GetOfst() : STRING_LEN;
#endif
- for ( USHORT i = 0; i < nSize; ++i )
+ for ( sal_uInt16 i = 0; i < nSize; ++i )
{
const SwTxtAttr *pHt = (*pHints)[i];
if ( pHt->Which() == RES_TXTATR_FTN )
@@ -225,7 +225,7 @@ SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
ASSERT( pTabFrm && pRow &&
pRow->GetUpper()->IsTabFrm(), "Upper of row should be tab" )
- const BOOL bDontSplit = !pTabFrm->IsFollow() &&
+ const sal_Bool bDontSplit = !pTabFrm->IsFollow() &&
!pTabFrm->IsLayoutSplitAllowed();
SwTwips nMin = 0;
@@ -261,7 +261,7 @@ SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
if ( pStartFrm->GetDrawObjs() )
{
const SwSortedObjs &rObjs = *pStartFrm->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
SwRect aRect( pAnchoredObj->GetObjRect() );
@@ -449,7 +449,7 @@ void SwTxtFrm::RemoveFtn( const xub_StrLen nStart, const xub_StrLen nLen )
return;
sal_Bool bRollBack = nLen != STRING_LEN;
- USHORT nSize = pHints->Count();
+ sal_uInt16 nSize = pHints->Count();
xub_StrLen nEnd;
SwTxtFrm* pSource;
if( bRollBack )
@@ -473,7 +473,7 @@ void SwTxtFrm::RemoveFtn( const xub_StrLen nStart, const xub_StrLen nLen )
SwFtnBossFrm *pEndBoss = 0;
sal_Bool bFtnEndDoc
= FTNPOS_CHAPTER == GetNode()->GetDoc()->GetFtnInfo().ePos;
- for ( USHORT i = nSize; i; )
+ for ( sal_uInt16 i = nSize; i; )
{
SwTxtAttr *pHt = pHints->GetTextHint(--i);
if ( RES_TXTATR_FTN != pHt->Which() )
@@ -1159,7 +1159,7 @@ xub_StrLen SwTxtFormatter::FormatQuoVadis( const xub_StrLen nOffset )
pQuo->SetAscent( rInf.GetAscent() );
pQuo->Height( rInf.GetTxtHeight() );
pQuo->Format( rInf );
- USHORT nQuoWidth = pQuo->Width();
+ sal_uInt16 nQuoWidth = pQuo->Width();
SwLinePortion* pCurrPor = pQuo;
while ( rInf.GetRest() )
@@ -1238,12 +1238,12 @@ xub_StrLen SwTxtFormatter::FormatQuoVadis( const xub_StrLen nOffset )
if( nDiff < 0 )
{
nLastLeft = pQuo->GetAscent();
- nQuoWidth = (USHORT)(-nDiff + nLastLeft);
+ nQuoWidth = (sal_uInt16)(-nDiff + nLastLeft);
}
else
{
nQuoWidth = 0;
- nLastLeft = USHORT(( pQuo->GetAscent() + nDiff ) / 2);
+ nLastLeft = sal_uInt16(( pQuo->GetAscent() + nDiff ) / 2);
}
break;
}
@@ -1330,7 +1330,7 @@ public:
SwFtnSave( const SwTxtSizeInfo &rInf,
const SwTxtFtn *pTxtFtn,
const bool bApplyGivenScriptType,
- const BYTE nGivenScriptType );
+ const sal_uInt8 nGivenScriptType );
~SwFtnSave();
};
@@ -1341,7 +1341,7 @@ public:
SwFtnSave::SwFtnSave( const SwTxtSizeInfo &rInf,
const SwTxtFtn* pTxtFtn,
const bool bApplyGivenScriptType,
- const BYTE nGivenScriptType )
+ const sal_uInt8 nGivenScriptType )
: pInf( &((SwTxtSizeInfo&)rInf) )
, pFnt( 0 )
, pOld( 0 )
@@ -1499,7 +1499,7 @@ SwPosSize SwFtnPortion::GetTxtSize( const SwTxtSizeInfo &rInfo ) const
}
// --> OD 2009-01-29 #i98418#
-void SwFtnPortion::SetPreferredScriptType( BYTE nPreferredScriptType )
+void SwFtnPortion::SetPreferredScriptType( sal_uInt8 nPreferredScriptType )
{
mbPreferredScriptTypeSet = true;
mnPreferredScriptType = nPreferredScriptType;
@@ -1539,7 +1539,7 @@ sal_Bool SwQuoVadisPortion::Format( SwTxtFormatInfo &rInf )
SetLen( 0 );
if( bFull )
// dritter Versuch, es langt: jetzt wird gestaucht:
- Width( USHORT(rInf.Width() - rInf.X()) );
+ Width( sal_uInt16(rInf.Width() - rInf.X()) );
// 8317: keine mehrzeiligen Felder bei QuoVadis und ErgoSum
if( rInf.GetRest() )
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 69b4bef4135a..ab1e9e96b3d3 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -666,7 +666,7 @@ sal_Bool SwSoftHyphPortion::GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTx
void SwSoftHyphPortion::HandlePortion( SwPortionHandler& rPH ) const
{
const String aString( '-' );
- const USHORT nWhich = ! Width() ?
+ const sal_uInt16 nWhich = ! Width() ?
POR_SOFTHYPH_COMP :
GetWhichPor();
rPH.Special( GetLen(), aString, nWhich );
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index a86589b64851..4a715ba3b27b 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -76,7 +76,7 @@ const SvxTabStop *SwLineInfo::GetTabStop( const SwTwips nSearchPos,
* SwLineInfo::NumberOfTabStops()
*************************************************************************/
-USHORT SwLineInfo::NumberOfTabStops() const
+sal_uInt16 SwLineInfo::NumberOfTabStops() const
{
return pRuler->Count();
}
@@ -377,14 +377,14 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
ASSERT( rInf.X() <= GetTabPos(), "SwTabPortion::PreFormat: rush hour" );
// Hier lassen wir uns nieder...
- Fix( static_cast<USHORT>(rInf.X()) );
+ Fix( static_cast<sal_uInt16>(rInf.X()) );
const bool bTabCompat = rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT);
// Die Mindestbreite eines Tabs ist immer mindestens ein Blank
// --> FME 2004-11-25 #i37686# In compatibility mode, the minimum width
// should be 1, even for non-left tab stops.
- USHORT nMinimumTabWidth = 1;
+ sal_uInt16 nMinimumTabWidth = 1;
// <--
if ( !bTabCompat )
{
@@ -414,7 +414,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
rInf.Width() <= rInf.X() + PrtWidth();
// #95477# Rotated tab stops get the width of one blank
- const USHORT nDir = rInf.GetFont()->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
+ const sal_uInt16 nDir = rInf.GetFont()->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
if( ! bFull && 0 == nDir )
{
@@ -433,7 +433,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
}
case POR_TABLEFT:
{
- PrtWidth( static_cast<USHORT>(GetTabPos() - rInf.X()) );
+ PrtWidth( static_cast<sal_uInt16>(GetTabPos() - rInf.X()) );
bFull = rInf.Width() <= rInf.X() + PrtWidth();
// In tabulator compatibility mode, we reset the bFull flag
@@ -460,7 +460,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
!rInf.GetFly() )
// <--
{
- PrtWidth( static_cast<USHORT>(rInf.Width() - rInf.X()) );
+ PrtWidth( static_cast<sal_uInt16>(rInf.Width() - rInf.X()) );
SetFixWidth( PrtWidth() );
}
else
diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx
index be69b19263e3..d5a45beb41d1 100644
--- a/sw/source/core/text/widorp.cxx
+++ b/sw/source/core/text/widorp.cxx
@@ -486,7 +486,7 @@ sal_Bool WidowsAndOrphans::FindWidows( SwTxtFrm *pFrame, SwTxtMargin &rLine )
// --> FME 2008-09-16 #i91421#
if ( !pMaster->GetIndPrev() )
{
- ULONG nLines = pMaster->GetThisLines();
+ sal_uLong nLines = pMaster->GetThisLines();
if(nLines == 0 && pMaster->HasPara())
{
const SwParaPortion *pMasterPara = pMaster->GetPara();
diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx
index 6029b6c84aeb..152ed79b0cef 100644
--- a/sw/source/core/text/wrong.cxx
+++ b/sw/source/core/text/wrong.cxx
@@ -470,7 +470,7 @@ void SwWrongList::JoinList( SwWrongList* pNext, xub_StrLen nInsertPos )
}
if( pNext )
{
- USHORT nCnt = Count();
+ sal_uInt16 nCnt = Count();
pNext->Move( 0, nInsertPos );
Insert(nCnt, pNext->maList.begin(), pNext->maList.end());
@@ -498,7 +498,7 @@ void SwWrongList::JoinList( SwWrongList* pNext, xub_StrLen nInsertPos )
}
-void SwWrongList::InsertSubList( xub_StrLen nNewPos, xub_StrLen nNewLen, USHORT nWhere, SwWrongList* pSubList )
+void SwWrongList::InsertSubList( xub_StrLen nNewPos, xub_StrLen nNewLen, sal_uInt16 nWhere, SwWrongList* pSubList )
{
if (pSubList)
{
@@ -514,7 +514,7 @@ void SwWrongList::InsertSubList( xub_StrLen nNewPos, xub_StrLen nNewLen, USHORT
// New functions: Necessary because SwWrongList has been changed to use std::vector
-void SwWrongList::Insert(USHORT nWhere, std::vector<SwWrongArea>::iterator startPos, std::vector<SwWrongArea>::iterator endPos)
+void SwWrongList::Insert(sal_uInt16 nWhere, std::vector<SwWrongArea>::iterator startPos, std::vector<SwWrongArea>::iterator endPos)
{
std::vector<SwWrongArea>::iterator i = maList.begin();
if ( nWhere >= maList.size() )
@@ -532,14 +532,14 @@ void SwWrongList::Insert(USHORT nWhere, std::vector<SwWrongArea>::iterator start
}
}
-void SwWrongList::Remove(USHORT nIdx, USHORT nLen )
+void SwWrongList::Remove(sal_uInt16 nIdx, sal_uInt16 nLen )
{
if ( nIdx >= maList.size() ) return;
std::vector<SwWrongArea>::iterator i1 = maList.begin();
i1 += nIdx;
std::vector<SwWrongArea>::iterator i2 = i1;
- if ( nIdx + nLen >= static_cast<USHORT>(maList.size()) )
+ if ( nIdx + nLen >= static_cast<sal_uInt16>(maList.size()) )
i2 = maList.end(); // robust
else
i2 += nLen;
@@ -565,8 +565,8 @@ void SwWrongList::Remove(USHORT nIdx, USHORT nLen )
}
void SwWrongList::RemoveEntry( xub_StrLen nBegin, xub_StrLen nEnd ) {
- USHORT nDelPos = 0;
- USHORT nDel = 0;
+ sal_uInt16 nDelPos = 0;
+ sal_uInt16 nDel = 0;
std::vector<SwWrongArea>::iterator aIter = maList.begin();
while( aIter != maList.end() && (*aIter).mnPos < nBegin )
{
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index bc3565216ae0..47c03a776797 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -66,16 +66,16 @@ const sal_Char* SwForm::aFormEntryTxt = "<ET>";
const sal_Char* SwForm::aFormChapterMark= "<C>";
const sal_Char* SwForm::aFormText = "<X>";
const sal_Char* SwForm::aFormAuth = "<A>";
-BYTE SwForm::nFormTabLen = 3;
-BYTE SwForm::nFormEntryLen = 3;
-BYTE SwForm::nFormPageNumsLen = 3;
-BYTE SwForm::nFormLinkSttLen = 4;
-BYTE SwForm::nFormLinkEndLen = 4;
-BYTE SwForm::nFormEntryNumLen = 4;
-BYTE SwForm::nFormEntryTxtLen = 4;
-BYTE SwForm::nFormChapterMarkLen = 3;
-BYTE SwForm::nFormTextLen = 3;
-BYTE SwForm::nFormAuthLen = 5;
+sal_uInt8 SwForm::nFormTabLen = 3;
+sal_uInt8 SwForm::nFormEntryLen = 3;
+sal_uInt8 SwForm::nFormPageNumsLen = 3;
+sal_uInt8 SwForm::nFormLinkSttLen = 4;
+sal_uInt8 SwForm::nFormLinkEndLen = 4;
+sal_uInt8 SwForm::nFormEntryNumLen = 4;
+sal_uInt8 SwForm::nFormEntryTxtLen = 4;
+sal_uInt8 SwForm::nFormChapterMarkLen = 3;
+sal_uInt8 SwForm::nFormTextLen = 3;
+sal_uInt8 SwForm::nFormAuthLen = 5;
SV_IMPL_PTRARR(SwTOXMarks, SwTOXMark*)
@@ -86,11 +86,11 @@ TYPEINIT2( SwTOXMark, SfxPoolItem, SwClient ); // fuers rtti
--------------------------------------------------*/
struct PatternIni
{
- USHORT n1;
- USHORT n2;
- USHORT n3;
- USHORT n4;
- USHORT n5;
+ sal_uInt16 n1;
+ sal_uInt16 n2;
+ sal_uInt16 n3;
+ sal_uInt16 n4;
+ sal_uInt16 n5;
};
const PatternIni aPatternIni[] =
{
@@ -130,13 +130,13 @@ const PatternIni aPatternIni[] =
--------------------------------------------------*/
// -> #i21237#
-SwFormTokens lcl_GetAuthPattern(USHORT nTypeId)
+SwFormTokens lcl_GetAuthPattern(sal_uInt16 nTypeId)
{
SwFormTokens aRet; // #i21237#
PatternIni aIni = aPatternIni[nTypeId];
- USHORT nVals[5];
+ sal_uInt16 nVals[5];
nVals[0] = aIni.n1;
nVals[1] = aIni.n2;
nVals[2] = aIni.n3;
@@ -152,7 +152,7 @@ SwFormTokens lcl_GetAuthPattern(USHORT nTypeId)
SwFormToken aTextToken( TOKEN_TEXT );
aTextToken.sText = String::CreateFromAscii( ", " );
- for(USHORT i = 0; i < 5 ; i++)
+ for(sal_uInt16 i = 0; i < 5 ; i++)
{
if(nVals[i] == USHRT_MAX)
break;
@@ -180,8 +180,8 @@ SwTOXMark::SwTOXMark()
, SwModify( 0 )
,
pTxtAttr( 0 ),
- bAutoGenerated(FALSE),
- bMainEntry(FALSE)
+ bAutoGenerated(sal_False),
+ bMainEntry(sal_False)
{
}
@@ -191,8 +191,8 @@ SwTOXMark::SwTOXMark( const SwTOXType* pTyp )
, SwModify( const_cast<SwTOXType*>(pTyp) )
,
pTxtAttr( 0 ), nLevel( 0 ),
- bAutoGenerated(FALSE),
- bMainEntry(FALSE)
+ bAutoGenerated(sal_False),
+ bMainEntry(sal_False)
{
}
@@ -292,18 +292,18 @@ SwTOXType::SwTOXType(const SwTOXType& rCopy)
SwForm::SwForm( TOXTypes eTyp ) // #i21237#
: eType( eTyp ), nFormMaxLevel( SwForm::GetFormMaxLevel( eTyp )),
// nFirstTabPos( lNumIndent ),
- bCommaSeparated(FALSE)
+ bCommaSeparated(sal_False)
{
//bHasFirstTabPos =
- bGenerateTabPos = FALSE;
- bIsRelTabPos = TRUE;
+ bGenerateTabPos = sal_False;
+ bIsRelTabPos = sal_True;
// Inhaltsverzeichnis hat entsprechend Anzahl Headlines + Ueberschrift
// Benutzer hat 10 Ebenen + Ueberschrift
// Stichwort hat 3 Ebenen + Ueberschrift + Trenner
// indexes of tables, objects illustrations and authorities consist of a heading and one level
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
switch( eType )
{
case TOX_INDEX: nPoolId = STR_POOLCOLL_TOX_IDXH; break;
@@ -345,7 +345,7 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237#
if(TOX_INDEX == eType)
{
- for( USHORT i = 1; i < 5; ++i )
+ for( sal_uInt16 i = 1; i < 5; ++i )
{
if(1 == i)
{
@@ -364,7 +364,7 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237#
}
}
else
- for( USHORT i = 1; i < GetFormMax(); ++i, ++nPoolId ) // Nr 0 ist der Titel
+ for( sal_uInt16 i = 1; i < GetFormMax(); ++i, ++nPoolId ) // Nr 0 ist der Titel
{
if(TOX_AUTHORITIES == eType)
SetPattern(i, lcl_GetAuthPattern(i));
@@ -398,7 +398,7 @@ SwForm& SwForm::operator=(const SwForm& rForm)
bGenerateTabPos = rForm.bGenerateTabPos;
bIsRelTabPos = rForm.bIsRelTabPos;
bCommaSeparated = rForm.bCommaSeparated;
- for(USHORT i=0; i < nFormMaxLevel; ++i)
+ for(sal_uInt16 i=0; i < nFormMaxLevel; ++i)
{
aPattern[i] = rForm.aPattern[i];
aTemplate[i] = rForm.aTemplate[i];
@@ -406,9 +406,9 @@ SwForm& SwForm::operator=(const SwForm& rForm)
return *this;
}
-USHORT SwForm::GetFormMaxLevel( TOXTypes eTOXType )
+sal_uInt16 SwForm::GetFormMaxLevel( TOXTypes eTOXType )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
switch( eTOXType )
{
case TOX_INDEX: nRet = 5; break;
@@ -429,34 +429,34 @@ bool operator == (const SwFormToken & rToken, FormTokenType eType)
}
//-----------------------------------------------------------------------------
-void SwForm::AdjustTabStops(SwDoc& rDoc, BOOL bInsertNewTapStops) // #i21237#
+void SwForm::AdjustTabStops(SwDoc& rDoc, sal_Bool bInsertNewTapStops) // #i21237#
{
- for(USHORT nLevel = 1; nLevel < GetFormMax(); nLevel++)
+ for(sal_uInt16 nLevel = 1; nLevel < GetFormMax(); nLevel++)
{
const String& sTemplateName = GetTemplate(nLevel);
SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( sTemplateName );
if( !pColl )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName
( sTemplateName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); // #i21237#
if( USHRT_MAX != nId )
pColl = rDoc.GetTxtCollFromPool( nId );
}
const SvxTabStopItem* pTabStops = 0;
- USHORT nTabCount = 0;
+ sal_uInt16 nTabCount = 0;
if( pColl &&
- 0 != ( pTabStops = &pColl->GetTabStops(FALSE) ) &&
+ 0 != ( pTabStops = &pColl->GetTabStops(sal_False) ) &&
0 != ( nTabCount = pTabStops->Count() ) )
{
// #i21237#
SwFormTokens aCurrentPattern = GetPattern(nLevel);
SwFormTokens::iterator aIt = aCurrentPattern.begin();
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
- for(USHORT nTab = 0; nTab < nTabCount; ++nTab)
+ for(sal_uInt16 nTab = 0; nTab < nTabCount; ++nTab)
{
const SvxTabStop& rTab = (*pTabStops)[nTab];
@@ -467,9 +467,9 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, BOOL bInsertNewTapStops) // #i21237#
{
if ( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() )
{
- bChanged = TRUE;
+ bChanged = sal_True;
SwFormToken aToken(TOKEN_TAB_STOP);
- aToken.bWithTab = FALSE;
+ aToken.bWithTab = sal_False;
aToken.nTabStopPosition = rTab.GetTabPos();
aToken.eTabAlign = rTab.GetAdjustment();
aToken.cTabFillChar = rTab.GetFill();
@@ -484,7 +484,7 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, BOOL bInsertNewTapStops) // #i21237#
(TOKEN_TAB_STOP));
if ( aIt != aCurrentPattern.end() )
{
- bChanged = TRUE;
+ bChanged = sal_True;
aIt->nTabStopPosition = rTab.GetTabPos();
aIt->eTabAlign = nTab == nTabCount - 1 &&
SVX_TAB_ADJUST_RIGHT == rTab.GetAdjustment() ?
@@ -510,7 +510,7 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, BOOL bInsertNewTapStops) // #i21237#
SwTOXBase::SwTOXBase(const SwTOXType* pTyp, const SwForm& rForm,
- USHORT nCreaType, const String& rTitle )
+ sal_uInt16 nCreaType, const String& rTitle )
: SwClient((SwModify*)pTyp),
aForm(rForm),
aTitle(rTitle),
@@ -518,10 +518,10 @@ SwTOXBase::SwTOXBase(const SwTOXType* pTyp, const SwForm& rForm,
nCreateType(nCreaType),
nOLEOptions(0),
eCaptionDisplay(CAPTION_COMPLETE),
- bProtected( TRUE ),
- bFromChapter(FALSE),
- bFromObjectNames(FALSE),
- bLevelFromChapter(FALSE)
+ bProtected( sal_True ),
+ bFromChapter(sal_False),
+ bFromObjectNames(sal_False),
+ bLevelFromChapter(sal_False)
{
aData.nOptions = 0;
}
@@ -540,15 +540,15 @@ SwTOXBase& SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource )
{
// type not in pDoc, so create it now
const SwTOXTypes& rTypes = pDoc->GetTOXTypes();
- BOOL bFound = FALSE;
- for( USHORT n = rTypes.Count(); n; )
+ sal_Bool bFound = sal_False;
+ for( sal_uInt16 n = rTypes.Count(); n; )
{
const SwTOXType* pCmp = rTypes[ --n ];
if( pCmp->GetType() == pType->GetType() &&
pCmp->GetTypeName() == pType->GetTypeName() )
{
pType = (SwTOXType*)pCmp;
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -571,7 +571,7 @@ SwTOXBase& SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource )
eLanguage = rSource.eLanguage;
sSortAlgorithm = rSource.sSortAlgorithm;
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
aStyleNames[i] = rSource.aStyleNames[i];
// its the same data type!
@@ -608,7 +608,7 @@ SwTOXBase & SwTOXBase::operator = (const SwTOXBase & rSource)
aName = rSource.aName;
aTitle = rSource.aTitle;
sMainEntryCharStyle = rSource.sMainEntryCharStyle;
- for(USHORT nLevel = 0; nLevel < MAXLEVEL; nLevel++)
+ for(sal_uInt16 nLevel = 0; nLevel < MAXLEVEL; nLevel++)
aStyleNames[nLevel] = rSource.aStyleNames[nLevel];
sSequenceName = rSource.sSequenceName;
eLanguage = rSource.eLanguage;
@@ -660,7 +660,7 @@ String SwFormToken::GetString() const
{
String sRet;
- BOOL bAppend = TRUE;
+ sal_Bool bAppend = sal_True;
switch( eTokenType )
{
case TOKEN_ENTRY_NO:
@@ -739,7 +739,7 @@ String SwFormToken::GetString() const
sRet += TOX_STYLE_DELIMITER;
}
else
- bAppend = FALSE;
+ bAppend = sal_False;
}
else if(TOKEN_ENTRY_NO == eTokenType)
{
@@ -796,16 +796,16 @@ SwFormToken SwFormTokensHelper::BuildToken( const String & sPattern,
eRet.sCharStyleName = sToken.GetToken( 0, ',');
String sTmp( sToken.GetToken( 1, ',' ));
if( sTmp.Len() )
- eRet.nPoolId = static_cast<USHORT>(sTmp.ToInt32());
+ eRet.nPoolId = static_cast<sal_uInt16>(sTmp.ToInt32());
switch( eTokenType )
{
//i53420
case TOKEN_ENTRY_NO:
if( (sTmp = sToken.GetToken( 2, ',' ) ).Len() )
- eRet.nChapterFormat = static_cast<USHORT>(sTmp.ToInt32());
+ eRet.nChapterFormat = static_cast<sal_uInt16>(sTmp.ToInt32());
if( (sTmp = sToken.GetToken( 3, ',' ) ).Len() )
- eRet.nOutlineLevel = static_cast<USHORT>(sTmp.ToInt32()); //the maximum outline level to examine
+ eRet.nOutlineLevel = static_cast<sal_uInt16>(sTmp.ToInt32()); //the maximum outline level to examine
break;
case TOKEN_TEXT:
@@ -840,15 +840,15 @@ SwFormToken SwFormTokensHelper::BuildToken( const String & sPattern,
case TOKEN_CHAPTER_INFO:
if( (sTmp = sToken.GetToken( 2, ',' ) ).Len() )
- eRet.nChapterFormat = static_cast<USHORT>(sTmp.ToInt32()); //SwChapterFormat;
+ eRet.nChapterFormat = static_cast<sal_uInt16>(sTmp.ToInt32()); //SwChapterFormat;
//i53420
if( (sTmp = sToken.GetToken( 3, ',' ) ).Len() )
- eRet.nOutlineLevel = static_cast<USHORT>(sTmp.ToInt32()); //the maximum outline level to examine
+ eRet.nOutlineLevel = static_cast<sal_uInt16>(sTmp.ToInt32()); //the maximum outline level to examine
break;
case TOKEN_AUTHORITY:
- eRet.nAuthorityField = static_cast<USHORT>(sAuthFieldEnum.ToInt32());
+ eRet.nAuthorityField = static_cast<sal_uInt16>(sAuthFieldEnum.ToInt32());
break;
default: break;
}
@@ -859,7 +859,7 @@ String SwFormTokensHelper::SearchNextToken( const String & sPattern,
xub_StrLen nStt ) const
{
//it's not so easy - it doesn't work if the text part contains a '>'
- //USHORT nTokenEnd = sPattern.Search('>');
+ //sal_uInt16 nTokenEnd = sPattern.Search('>');
String aResult;
@@ -894,8 +894,8 @@ FormTokenType SwFormTokensHelper::GetTokenType(const String & sToken,
static struct
{
const sal_Char* pNm;
- USHORT nLen;
- USHORT nOffset;
+ sal_uInt16 nLen;
+ sal_uInt16 nOffset;
FormTokenType eToken;
} __READONLY_DATA aTokenArr[] = {
{ SwForm::aFormTab, SwForm::nFormEntryLen, 1, TOKEN_TAB_STOP },
@@ -932,13 +932,13 @@ FormTokenType SwFormTokensHelper::GetTokenType(const String & sToken,
// <- #i21237#
-void SwForm::SetPattern(USHORT nLevel, const SwFormTokens& rTokens)
+void SwForm::SetPattern(sal_uInt16 nLevel, const SwFormTokens& rTokens)
{
ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
aPattern[nLevel] = rTokens;
}
-void SwForm::SetPattern(USHORT nLevel, const String & rStr)
+void SwForm::SetPattern(sal_uInt16 nLevel, const String & rStr)
{
ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
@@ -946,7 +946,7 @@ void SwForm::SetPattern(USHORT nLevel, const String & rStr)
aPattern[nLevel] = aHelper.GetTokens();
}
-const SwFormTokens& SwForm::GetPattern(USHORT nLevel) const
+const SwFormTokens& SwForm::GetPattern(sal_uInt16 nLevel) const
{
ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
return aPattern[nLevel];
diff --git a/sw/source/core/tox/toxhlp.cxx b/sw/source/core/tox/toxhlp.cxx
index f119bf5a5540..be86709adcd2 100644
--- a/sw/source/core/tox/toxhlp.cxx
+++ b/sw/source/core/tox/toxhlp.cxx
@@ -99,7 +99,7 @@ String IndexEntrySupplierWrapper::GetIndexKey( const String& rTxt,
return sRet;
}
-String IndexEntrySupplierWrapper::GetFollowingText( BOOL bMorePages ) const
+String IndexEntrySupplierWrapper::GetFollowingText( sal_Bool bMorePages ) const
{
String sRet;
try {
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index ba3145c1139b..121c79848e2d 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -54,7 +54,7 @@
#include <comcore.hrc>
#include <numrule.hxx>
-extern BOOL IsFrameBehind( const SwTxtNode& rMyNd, xub_StrLen nMySttPos,
+extern sal_Bool IsFrameBehind( const SwTxtNode& rMyNd, xub_StrLen nMySttPos,
const SwTxtNode& rBehindNd, xub_StrLen nSttPos );
using namespace ::com::sun::star;
@@ -64,12 +64,12 @@ using ::rtl::OUString;
Beschreibung: Strings initialisieren
--------------------------------------------------------------------*/
-USHORT SwTOXSortTabBase::nOpt = 0;
+sal_uInt16 SwTOXSortTabBase::nOpt = 0;
SV_IMPL_VARARR( SwTOXSources, SwTOXSource )
-SwTOXInternational::SwTOXInternational( LanguageType nLang, USHORT nOpt,
+SwTOXInternational::SwTOXInternational( LanguageType nLang, sal_uInt16 nOpt,
const String& rSortAlgorithm ) :
eLang( nLang ),
sSortAlgorithm(rSortAlgorithm),
@@ -119,7 +119,7 @@ String SwTOXInternational::ToUpper( const String& rStr, xub_StrLen nPos ) const
{
return pCharClass->toUpper( rStr, nPos, 1 );
}
-inline BOOL SwTOXInternational::IsNumeric( const String& rStr ) const
+inline sal_Bool SwTOXInternational::IsNumeric( const String& rStr ) const
{
return pCharClass->isNumeric( rStr );
}
@@ -139,7 +139,7 @@ String SwTOXInternational::GetIndexKey( const String& rTxt, const String& rTxtRe
return pIndexWrapper->GetIndexKey( rTxt, rTxtReading, rLocale );
}
-String SwTOXInternational::GetFollowingText( BOOL bMorePages ) const
+String SwTOXInternational::GetFollowingText( sal_Bool bMorePages ) const
{
return pIndexWrapper->GetFollowingText( bMorePages );
}
@@ -154,7 +154,7 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwCntntNode* pNd,
const SwTOXInternational* pInter,
const lang::Locale* pLocale )
: pTOXNd( 0 ), pTxtMark( pMark ), pTOXIntl( pInter ),
- nPos( 0 ), nCntPos( 0 ), nType( static_cast<USHORT>(nTyp) ), bValidTxt( FALSE )
+ nPos( 0 ), nCntPos( 0 ), nType( static_cast<sal_uInt16>(nTyp) ), bValidTxt( sal_False )
{
if ( pLocale )
aLocale = *pLocale;
@@ -165,7 +165,7 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwCntntNode* pNd,
if( pTxtMark )
n = *pTxtMark->GetStart();
SwTOXSource aTmp( pNd, n,
- pTxtMark ? pTxtMark->GetTOXMark().IsMainEntry() : FALSE );
+ pTxtMark ? pTxtMark->GetTOXMark().IsMainEntry() : sal_False );
aTOXSources.Insert( aTmp, aTOXSources.Count() );
nPos = pNd->GetIndex();
@@ -181,7 +181,7 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwCntntNode* pNd,
{
// dann die "Anker" (Body) Position holen.
Point aPt;
- const SwCntntFrm* pFrm = pNd->GetFrm( &aPt, 0, FALSE );
+ const SwCntntFrm* pFrm = pNd->GetFrm( &aPt, 0, sal_False );
if( pFrm )
{
SwPosition aPos( *pNd );
@@ -211,7 +211,7 @@ String SwTOXSortTabBase::GetURL() const
}
void SwTOXSortTabBase::FillText( SwTxtNode& rNd, const SwIndex& rInsPos,
- USHORT ) const
+ sal_uInt16 ) const
{
String sMyTxt;
String sMyTxtReading;
@@ -221,9 +221,9 @@ void SwTOXSortTabBase::FillText( SwTxtNode& rNd, const SwIndex& rInsPos,
rNd.InsertText( sMyTxt, rInsPos );
}
-BOOL SwTOXSortTabBase::operator==( const SwTOXSortTabBase& rCmp )
+sal_Bool SwTOXSortTabBase::operator==( const SwTOXSortTabBase& rCmp )
{
- BOOL bRet = nPos == rCmp.nPos && nCntPos == rCmp.nCntPos &&
+ sal_Bool bRet = nPos == rCmp.nPos && nCntPos == rCmp.nCntPos &&
(!aTOXSources[0].pNd || !rCmp.aTOXSources[0].pNd ||
aTOXSources[0].pNd == rCmp.aTOXSources[0].pNd );
@@ -255,15 +255,15 @@ BOOL SwTOXSortTabBase::operator==( const SwTOXSortTabBase& rCmp )
return bRet;
}
-BOOL SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
+sal_Bool SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
{
if( nPos < rCmp.nPos )
- return TRUE;
+ return sal_True;
if( nPos == rCmp.nPos )
{
if( nCntPos < rCmp.nCntPos )
- return TRUE;
+ return sal_True;
if( nCntPos == rCmp.nCntPos )
{
@@ -275,7 +275,7 @@ BOOL SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
if( TOX_SORT_CONTENT == nType && pTxtMark && rCmp.pTxtMark )
{
if( *pTxtMark->GetStart() < *rCmp.pTxtMark->GetStart() )
- return TRUE;
+ return sal_True;
if( *pTxtMark->GetStart() == *rCmp.pTxtMark->GetStart() )
{
@@ -297,7 +297,7 @@ BOOL SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
sOtherTxt, sOtherTxtReading, rCmp.GetLocale() );
if( pEnd && !pEndCmp )
- return TRUE;
+ return sal_True;
}
}
}
@@ -307,7 +307,7 @@ BOOL SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
*(SwTxtNode*)pFirst, nCntPos );
}
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -316,8 +316,8 @@ BOOL SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
SwTOXIndex::SwTOXIndex( const SwTxtNode& rNd,
- const SwTxtTOXMark* pMark, USHORT nOptions,
- BYTE nKyLevel,
+ const SwTxtTOXMark* pMark, sal_uInt16 nOptions,
+ sal_uInt8 nKyLevel,
const SwTOXInternational& rIntl,
const lang::Locale& rLocale )
: SwTOXSortTabBase( TOX_SORT_INDEX, &rNd, pMark, &rIntl, &rLocale ),
@@ -332,13 +332,13 @@ SwTOXIndex::SwTOXIndex( const SwTxtNode& rNd,
//
-BOOL SwTOXIndex::operator==( const SwTOXSortTabBase& rCmpBase )
+sal_Bool SwTOXIndex::operator==( const SwTOXSortTabBase& rCmpBase )
{
SwTOXIndex& rCmp = (SwTOXIndex&)rCmpBase;
// In Abhaengigkeit von den Optionen Grosskleinschreibung beachten
if(GetLevel() != rCmp.GetLevel() || nKeyLevel != rCmp.nKeyLevel)
- return FALSE;
+ return sal_False;
ASSERT(pTxtMark, "pTxtMark == 0, Kein Stichwort");
@@ -350,7 +350,7 @@ BOOL SwTOXIndex::operator==( const SwTOXSortTabBase& rCmpBase )
String sOtherTxtReading;
rCmp.GetTxt( sOtherTxt, sOtherTxtReading );
- BOOL bRet = pTOXIntl->IsEqual( sMyTxt, sMyTxtReading, GetLocale(),
+ sal_Bool bRet = pTOXIntl->IsEqual( sMyTxt, sMyTxtReading, GetLocale(),
sOtherTxt, sOtherTxtReading, rCmp.GetLocale() );
// Wenn nicht zusammengefasst wird muss die Pos aus gewertet werden
@@ -366,7 +366,7 @@ BOOL SwTOXIndex::operator==( const SwTOXSortTabBase& rCmpBase )
//
-BOOL SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase )
+sal_Bool SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase )
{
SwTOXIndex& rCmp = (SwTOXIndex&)rCmpBase;
@@ -380,7 +380,7 @@ BOOL SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase )
String sOtherTxtReading;
rCmp.GetTxt( sOtherTxt, sOtherTxtReading );
- BOOL bRet = GetLevel() == rCmp.GetLevel() &&
+ sal_Bool bRet = GetLevel() == rCmp.GetLevel() &&
pTOXIntl->IsLess( sMyTxt, sMyTxtReading, GetLocale(),
sOtherTxt, sOtherTxtReading, rCmp.GetLocale() );
@@ -434,7 +434,7 @@ void SwTOXIndex::GetText_Impl( String& rTxt, String& rTxtReading ) const
}
}
-void SwTOXIndex::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT ) const
+void SwTOXIndex::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 ) const
{
const xub_StrLen* pEnd = pTxtMark->GetEnd();
String sTmp;
@@ -459,11 +459,11 @@ void SwTOXIndex::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT ) cons
-USHORT SwTOXIndex::GetLevel() const
+sal_uInt16 SwTOXIndex::GetLevel() const
{
ASSERT(pTxtMark, "pTxtMark == 0, Kein Stichwort");
- USHORT nForm = FORM_PRIMARY_KEY;
+ sal_uInt16 nForm = FORM_PRIMARY_KEY;
if( 0 == (GetOptions() & nsSwTOIOptions::TOI_KEY_AS_ENTRY)&&
pTxtMark->GetTOXMark().GetPrimaryKey().Len() )
@@ -481,7 +481,7 @@ USHORT SwTOXIndex::GetLevel() const
SwTOXCustom::SwTOXCustom(const String& rStr, const String& rReading,
- USHORT nLevel,
+ sal_uInt16 nLevel,
const SwTOXInternational& rIntl,
const lang::Locale& rLocale )
: SwTOXSortTabBase( TOX_SORT_CUSTOM, 0, 0, &rIntl, &rLocale ),
@@ -490,7 +490,7 @@ SwTOXCustom::SwTOXCustom(const String& rStr, const String& rReading,
}
-BOOL SwTOXCustom::operator==(const SwTOXSortTabBase& rCmpBase)
+sal_Bool SwTOXCustom::operator==(const SwTOXSortTabBase& rCmpBase)
{
String sMyTxt;
String sMyTxtReading;
@@ -506,7 +506,7 @@ BOOL SwTOXCustom::operator==(const SwTOXSortTabBase& rCmpBase)
}
-BOOL SwTOXCustom::operator < (const SwTOXSortTabBase& rCmpBase)
+sal_Bool SwTOXCustom::operator < (const SwTOXSortTabBase& rCmpBase)
{
String sMyTxt;
String sMyTxtReading;
@@ -522,7 +522,7 @@ BOOL SwTOXCustom::operator < (const SwTOXSortTabBase& rCmpBase)
}
-USHORT SwTOXCustom::GetLevel() const
+sal_uInt16 SwTOXCustom::GetLevel() const
{
return nLev;
}
@@ -566,7 +566,7 @@ void SwTOXContent::GetText_Impl( String& rTxt, String& rTxtReading ) const
rTxt = pTxtMark->GetTOXMark().GetAlternativeText();
}
-void SwTOXContent::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT ) const
+void SwTOXContent::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 ) const
{
const xub_StrLen* pEnd = pTxtMark->GetEnd();
if( pEnd && !pTxtMark->GetTOXMark().IsAlternativeText() )
@@ -586,7 +586,7 @@ void SwTOXContent::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT ) co
//
-USHORT SwTOXContent::GetLevel() const
+sal_uInt16 SwTOXContent::GetLevel() const
{
return pTxtMark->GetTOXMark().GetLevel();
}
@@ -600,7 +600,7 @@ USHORT SwTOXContent::GetLevel() const
// sondern muss die vom "Henkel" sein !!
-SwTOXPara::SwTOXPara( const SwCntntNode& rNd, SwTOXElement eT, USHORT nLevel )
+SwTOXPara::SwTOXPara( const SwCntntNode& rNd, SwTOXElement eT, sal_uInt16 nLevel )
: SwTOXSortTabBase( TOX_SORT_PARA, &rNd, 0, 0 ),
eType( eT ),
m_nLevel(nLevel),
@@ -644,7 +644,7 @@ void SwTOXPara::GetText_Impl( String& rTxt, String& ) const
else
{
ASSERT( !this, "Grafik/Object ohne Namen" )
- USHORT nId = nsSwTOXElement::TOX_OLE == eType
+ sal_uInt16 nId = nsSwTOXElement::TOX_OLE == eType
? STR_OBJECT_DEFNAME
: nsSwTOXElement::TOX_GRAPHIC == eType
? STR_GRAPHIC_DEFNAME
@@ -657,7 +657,7 @@ void SwTOXPara::GetText_Impl( String& rTxt, String& ) const
}
}
-void SwTOXPara::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT ) const
+void SwTOXPara::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 ) const
{
if( nsSwTOXElement::TOX_TEMPLATE == eType || nsSwTOXElement::TOX_SEQUENCE == eType || nsSwTOXElement::TOX_OUTLINELEVEL == eType)
{
@@ -672,7 +672,7 @@ void SwTOXPara::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT ) const
*/
pSrc->GetExpandTxt( rNd, &rInsPos, nStt,
nEndIndex == STRING_LEN ? STRING_LEN : nEndIndex - nStt,
- FALSE, FALSE, TRUE );
+ sal_False, sal_False, sal_True );
}
else
{
@@ -684,19 +684,19 @@ void SwTOXPara::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT ) const
}
-USHORT SwTOXPara::GetLevel() const
+sal_uInt16 SwTOXPara::GetLevel() const
{
- USHORT nRet = m_nLevel;
+ sal_uInt16 nRet = m_nLevel;
const SwCntntNode* pNd = aTOXSources[0].pNd;
if( nsSwTOXElement::TOX_OUTLINELEVEL == eType && pNd->GetTxtNode() )
{
- //USHORT nTmp = ((SwTxtNode*)pNd)->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
+ //sal_uInt16 nTmp = ((SwTxtNode*)pNd)->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
//if(nTmp < NO_NUMBERING)
// nRet = nTmp + 1;
const int nTmp = ((SwTxtNode*)pNd)->GetAttrOutlineLevel();//#outline level,zhaojianwei????
if(nTmp != 0 )
- nRet = static_cast<USHORT>(nTmp);
+ nRet = static_cast<sal_uInt16>(nTmp);
}
return nRet;
}
@@ -722,7 +722,7 @@ String SwTOXPara::GetURL() const
// if( pRule )
// {
// // dann noch die rel. Nummer davor setzen
-// const USHORT nCurrLevel = static_cast<USHORT>(pTxtNd->GetActualListLevel());
+// const sal_uInt16 nCurrLevel = static_cast<sal_uInt16>(pTxtNd->GetActualListLevel());
// if(nCurrLevel <= MAXLEVEL)
// {
// // --> OD 2005-11-02 #i51089 - TUNING#
@@ -731,7 +731,7 @@ String SwTOXPara::GetURL() const
// SwNumberTree::tNumberVector aNumVector =
// pTxtNd->GetNumberVector();
-// for( USHORT n = 0; n <= nCurrLevel; ++n )
+// for( sal_uInt16 n = 0; n <= nCurrLevel; ++n )
// {
// int nNum = aNumVector[ n ];
// nNum -= ( pRule->Get( n ).GetStart() - 1 );
@@ -813,7 +813,7 @@ void SwTOXTable::GetText_Impl( String& rTxt, String& ) const
}
}
-USHORT SwTOXTable::GetLevel() const
+sal_uInt16 SwTOXTable::GetLevel() const
{
return nLevel;
}
@@ -847,15 +847,15 @@ SwTOXAuthority::SwTOXAuthority( const SwCntntNode& rNd,
nCntPos = *rField.GetTxtFld()->GetStart();
}
-USHORT SwTOXAuthority::GetLevel() const
+sal_uInt16 SwTOXAuthority::GetLevel() const
{
String sText(((SwAuthorityField*)m_rField.GetFld())->
GetFieldText(AUTH_FIELD_AUTHORITY_TYPE));
//#i18655# the level '0' is the heading level therefor the values are incremented here
- USHORT nRet = 1;
+ sal_uInt16 nRet = 1;
if( pTOXIntl->IsNumeric( sText ) )
{
- nRet = (USHORT)sText.ToInt32();
+ nRet = (sal_uInt16)sText.ToInt32();
nRet++;
}
//illegal values are also set to 'ARTICLE' as non-numeric values are
@@ -880,7 +880,7 @@ void SwTOXAuthority::GetText_Impl( String& rTxt, String& ) const
--------------------------------------------------*/
void SwTOXAuthority::FillText( SwTxtNode& rNd,
- const SwIndex& rInsPos, USHORT nAuthField ) const
+ const SwIndex& rInsPos, sal_uInt16 nAuthField ) const
{
SwAuthorityField* pField = (SwAuthorityField*)m_rField.GetFld();
String sText;
@@ -897,7 +897,7 @@ void SwTOXAuthority::FillText( SwTxtNode& rNd,
}
else if(AUTH_FIELD_AUTHORITY_TYPE == nAuthField)
{
- USHORT nLevel = GetLevel();
+ sal_uInt16 nLevel = GetLevel();
if(nLevel)
sText = SwAuthorityFieldType::GetAuthTypeName((ToxAuthorityType) --nLevel);
}
@@ -908,7 +908,7 @@ void SwTOXAuthority::FillText( SwTxtNode& rNd,
/* -----------------14.10.99 09:35-------------------
--------------------------------------------------*/
-BOOL SwTOXAuthority::operator==( const SwTOXSortTabBase& rCmp)
+sal_Bool SwTOXAuthority::operator==( const SwTOXSortTabBase& rCmp)
{
return nType == rCmp.nType &&
((SwAuthorityField*)m_rField.GetFld())->GetHandle() ==
@@ -917,9 +917,9 @@ BOOL SwTOXAuthority::operator==( const SwTOXSortTabBase& rCmp)
/* -----------------21.10.99 09:52-------------------
--------------------------------------------------*/
-BOOL SwTOXAuthority::operator<( const SwTOXSortTabBase& rBase)
+sal_Bool SwTOXAuthority::operator<( const SwTOXSortTabBase& rBase)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwAuthorityField* pField = (SwAuthorityField*)m_rField.GetFld();
SwAuthorityFieldType* pType = (SwAuthorityFieldType*)
pField->GetTyp();
@@ -931,7 +931,7 @@ BOOL SwTOXAuthority::operator<( const SwTOXSortTabBase& rBase)
((SwTOXAuthority&)rBase).m_rField.GetFld();
- for(USHORT i = 0; i < pType->GetSortKeyCount(); i++)
+ for(sal_uInt16 i = 0; i < pType->GetSortKeyCount(); i++)
{
const SwTOXSortKey* pKey = pType->GetSortKey(i);
String sMyTxt = pField->GetFieldText(pKey->eField);
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index be01f06cd472..b4119504f71f 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -101,7 +101,7 @@ SwFmtFld::~SwFmtFld()
// bei einige FeldTypen muessen wir den FeldTypen noch loeschen
if( pType && pType->IsLastDepend() )
{
- BOOL bDel = FALSE;
+ sal_Bool bDel = sal_False;
switch( pType->Which() )
{
case RES_USERFLD:
@@ -222,27 +222,27 @@ void SwFmtFld::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
pTxtAttr->Expand();
}
-BOOL SwFmtFld::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwFmtFld::GetInfo( SfxPoolItem& rInfo ) const
{
const SwTxtNode* pTxtNd;
if( RES_AUTOFMT_DOCNODE != rInfo.Which() ||
!pTxtAttr || 0 == ( pTxtNd = pTxtAttr->GetpTxtNode() ) ||
&pTxtNd->GetNodes() != ((SwAutoFmtGetDocNode&)rInfo).pNodes )
- return TRUE;
+ return sal_True;
((SwAutoFmtGetDocNode&)rInfo).pCntntNode = pTxtNd;
- return FALSE;
+ return sal_False;
}
-BOOL SwFmtFld::IsFldInDoc() const
+sal_Bool SwFmtFld::IsFldInDoc() const
{
const SwTxtNode* pTxtNd;
return pTxtAttr && 0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
pTxtNd->GetNodes().IsDocNodes();
}
-BOOL SwFmtFld::IsProtect() const
+sal_Bool SwFmtFld::IsProtect() const
{
const SwTxtNode* pTxtNd;
return pTxtAttr && 0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
@@ -299,7 +299,7 @@ void SwTxtFld::Expand() const
if( aNewExpand == m_aExpand )
{
// Bei Seitennummernfeldern
- const USHORT nWhich = pFld->GetTyp()->Which();
+ const sal_uInt16 nWhich = pFld->GetTyp()->Which();
if( RES_CHAPTERFLD != nWhich && RES_PAGENUMBERFLD != nWhich &&
RES_REFPAGEGETFLD != nWhich &&
// --> FME 2005-05-23 #122919# Page count fields to not use aExpand
@@ -339,7 +339,7 @@ void SwTxtFld::CopyFld( SwTxtFld *pDest ) const
IDocumentFieldsAccess* pDestIDFA = pDest->m_pTxtNode->getIDocumentFieldsAccess();
SwFmtFld& rFmtFld = (SwFmtFld&)pDest->GetFld();
- const USHORT nFldWhich = rFmtFld.GetFld()->GetTyp()->Which();
+ const sal_uInt16 nFldWhich = rFmtFld.GetFld()->GetTyp()->Which();
if( pIDFA != pDestIDFA )
{
diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx
index 02da2c32be8a..bddda1ca0527 100644
--- a/sw/source/core/txtnode/atrflyin.cxx
+++ b/sw/source/core/txtnode/atrflyin.cxx
@@ -118,8 +118,8 @@ void SwTxtFlyCnt::CopyFlyFmt( SwDoc* pDoc )
// und der Inhalt dupliziert.
// fuers kopieren vom Attribut das Undo immer abschalten
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
SwFmtAnchor aAnchor( pFmt->GetAnchor() );
if ((FLY_AT_PAGE != aAnchor.GetAnchorId()) &&
(pDoc != pFmt->GetDoc())) // different documents?
@@ -194,13 +194,13 @@ void SwTxtFlyCnt::SetAnchor( const SwTxtNode *pNode )
if( pDoc != pFmt->GetDoc() )
{
// fuers kopieren vom Attribut das Undo immer abschalten
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
SwFrmFmt* pNew = pDoc->CopyLayoutFmt( *pFmt, aAnchor, false, false );
pDoc->DoUndo( bUndo );
bUndo = pFmt->GetDoc()->DoesUndo();
- pFmt->GetDoc()->DoUndo( FALSE );
+ pFmt->GetDoc()->DoUndo( sal_False );
pFmt->GetDoc()->DelLayoutFmt( pFmt );
pFmt->GetDoc()->DoUndo( bUndo );
((SwFmtFlyCnt&)GetFlyCnt()).SetFlyFmt( pNew );
diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx
index 45f6c5da2baf..5a4888da552e 100644
--- a/sw/source/core/txtnode/atrftn.cxx
+++ b/sw/source/core/txtnode/atrftn.cxx
@@ -118,14 +118,14 @@ void SwFmtFtn::GetFtnText( XubString& rStr ) const
}
// returnt den anzuzeigenden String der Fuss-/Endnote
-XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, BOOL bInclStrings ) const
+XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrings ) const
{
XubString sRet( GetNumStr() );
if( !sRet.Len() )
{
// dann ist die Nummer von Interesse, also ueber die Info diese
// besorgen.
- BOOL bMakeNum = TRUE;
+ sal_Bool bMakeNum = sal_True;
const SwSectionNode* pSectNd = pTxtAttr
? SwUpdFtnEndNtAtEnd::FindSectNdWithEndAttr( *pTxtAttr )
: 0;
@@ -135,12 +135,12 @@ XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, BOOL bInclStrings ) const
const SwFmtFtnEndAtTxtEnd& rFtnEnd = (SwFmtFtnEndAtTxtEnd&)
pSectNd->GetSection().GetFmt()->GetFmtAttr(
IsEndNote() ?
- static_cast<USHORT>(RES_END_AT_TXTEND) :
- static_cast<USHORT>(RES_FTN_AT_TXTEND) );
+ static_cast<sal_uInt16>(RES_END_AT_TXTEND) :
+ static_cast<sal_uInt16>(RES_FTN_AT_TXTEND) );
if( FTNEND_ATTXTEND_OWNNUMANDFMT == rFtnEnd.GetValue() )
{
- bMakeNum = FALSE;
+ bMakeNum = sal_False;
sRet = rFtnEnd.GetSwNumType().GetNumStr( GetNumber() );
if( bInclStrings )
{
@@ -190,7 +190,7 @@ SwTxtFtn::~SwTxtFtn()
-void SwTxtFtn::SetStartNode( const SwNodeIndex *pNewNode, BOOL bDelNode )
+void SwTxtFtn::SetStartNode( const SwNodeIndex *pNewNode, sal_Bool bDelNode )
{
if( pNewNode )
{
@@ -243,7 +243,7 @@ void SwTxtFtn::SetStartNode( const SwNodeIndex *pNewNode, BOOL bDelNode )
DELETEZ( m_pStartNode );
// loesche die Fussnote noch aus dem Array am Dokument
- for( USHORT n = 0; n < pDoc->GetFtnIdxs().Count(); ++n )
+ for( sal_uInt16 n = 0; n < pDoc->GetFtnIdxs().Count(); ++n )
if( this == pDoc->GetFtnIdxs()[n] )
{
pDoc->GetFtnIdxs().Remove( n );
@@ -259,7 +259,7 @@ void SwTxtFtn::SetStartNode( const SwNodeIndex *pNewNode, BOOL bDelNode )
}
-void SwTxtFtn::SetNumber( const USHORT nNewNum, const XubString* pStr )
+void SwTxtFtn::SetNumber( const sal_uInt16 nNewNum, const XubString* pStr )
{
SwFmtFtn& rFtn = (SwFmtFtn&)GetFtn();
if( pStr && pStr->Len() )
@@ -277,8 +277,8 @@ void SwTxtFtn::SetNumber( const USHORT nNewNum, const XubString* pStr )
{
// must iterate over all TxtNodes because of footnotes on other pages
SwNode* pNd;
- ULONG nSttIdx = m_pStartNode->GetIndex() + 1;
- ULONG nEndIdx = m_pStartNode->GetNode().EndOfSectionIndex();
+ sal_uLong nSttIdx = m_pStartNode->GetIndex() + 1;
+ sal_uLong nEndIdx = m_pStartNode->GetNode().EndOfSectionIndex();
for( ; nSttIdx < nEndIdx; ++nSttIdx )
{
// Es koennen ja auch Grafiken in der Fussnote stehen ...
@@ -311,9 +311,9 @@ void SwTxtFtn::CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const
// nDestLen contains number of CntntNodes in rDest _before_ copy.
SwNodeIndex aStart( *(rDest.GetStartNode()) );
SwNodeIndex aEnd( *aStart.GetNode().EndOfSectionNode() );
- ULONG nDestLen = aEnd.GetIndex() - aStart.GetIndex() - 1;
+ sal_uLong nDestLen = aEnd.GetIndex() - aStart.GetIndex() - 1;
- m_pTxtNode->GetDoc()->CopyWithFlyInFly( aRg, 0, aEnd, TRUE );
+ m_pTxtNode->GetDoc()->CopyWithFlyInFly( aRg, 0, aEnd, sal_True );
// in case the destination section was not empty, delete the old nodes
// before: Src: SxxxE, Dst: SnE
@@ -340,7 +340,7 @@ void SwTxtFtn::MakeNewTextSection( SwNodes& rNodes )
// Nun verpassen wir dem TxtNode noch die Fussnotenvorlage.
SwTxtFmtColl *pFmtColl;
const SwEndNoteInfo* pInfo;
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
if( GetFtn().IsEndNote() )
{
@@ -369,7 +369,7 @@ void SwTxtFtn::DelFrms()
if ( !m_pTxtNode )
return;
- BOOL bFrmFnd = FALSE;
+ sal_Bool bFrmFnd = sal_False;
{
SwClientIter aIter( *m_pTxtNode );
for( SwCntntFrm* pFnd = (SwCntntFrm*)aIter.First( TYPE( SwCntntFrm ));
@@ -379,7 +379,7 @@ void SwTxtFtn::DelFrms()
if( pPage )
{
pPage->RemoveFtn( pFnd, this );
- bFrmFnd = TRUE;
+ bFrmFnd = sal_True;
}
}
}
@@ -424,7 +424,7 @@ void SwTxtFtn::DelFrms()
}
-USHORT SwTxtFtn::SetSeqRefNo()
+sal_uInt16 SwTxtFtn::SetSeqRefNo()
{
if( !m_pTxtNode )
return USHRT_MAX;
@@ -433,9 +433,9 @@ USHORT SwTxtFtn::SetSeqRefNo()
if( pDoc->IsInReading() )
return USHRT_MAX;
- USHORT n, nFtnCnt = pDoc->GetFtnIdxs().Count();
+ sal_uInt16 n, nFtnCnt = pDoc->GetFtnIdxs().Count();
- const BYTE nTmp = 255 < nFtnCnt ? 255 : static_cast<BYTE>(nFtnCnt);
+ const sal_uInt8 nTmp = 255 < nFtnCnt ? 255 : static_cast<sal_uInt8>(nFtnCnt);
SvUShortsSort aArr( nTmp, nTmp );
// dann testmal, ob die Nummer schon vergeben ist oder ob eine neue
@@ -481,9 +481,9 @@ USHORT SwTxtFtn::SetSeqRefNo()
void SwTxtFtn::SetUniqueSeqRefNo( SwDoc& rDoc )
{
- USHORT n, nStt = 0, nFtnCnt = rDoc.GetFtnIdxs().Count();
+ sal_uInt16 n, nStt = 0, nFtnCnt = rDoc.GetFtnIdxs().Count();
- const BYTE nTmp = 255 < nFtnCnt ? 255 : static_cast<BYTE>(nFtnCnt);
+ const sal_uInt8 nTmp = 255 < nFtnCnt ? 255 : static_cast<sal_uInt8>(nFtnCnt);
SvUShortsSort aArr( nTmp, nTmp );
// dann alle Nummern zusammensammeln die schon existieren
diff --git a/sw/source/core/txtnode/atrtox.cxx b/sw/source/core/txtnode/atrtox.cxx
index c02478fe1014..8c64e4b2bd29 100644
--- a/sw/source/core/txtnode/atrtox.cxx
+++ b/sw/source/core/txtnode/atrtox.cxx
@@ -68,13 +68,13 @@ void SwTxtTOXMark::CopyTOXMark( SwDoc* pDoc )
{
SwTOXMark& rTOX = (SwTOXMark&)GetTOXMark();
TOXTypes eType = rTOX.GetTOXType()->GetType();
- USHORT nCount = pDoc->GetTOXTypeCount( eType );
+ sal_uInt16 nCount = pDoc->GetTOXTypeCount( eType );
const SwTOXType* pType = 0;
const XubString& rNm = rTOX.GetTOXType()->GetTypeName();
// kein entsprechender Verzeichnistyp vorhanden -> anlegen
// sonst verwenden
- for(USHORT i=0; i < nCount; ++i)
+ for(sal_uInt16 i=0; i < nCount; ++i)
{
const SwTOXType* pSrcType = pDoc->GetTOXType(eType, i);
if(pSrcType->GetTypeName() == rNm )
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index 245ec916fd4a..236a0bab3d72 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -123,22 +123,22 @@ void SwFmtCharFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// weiterleiten an das TextAttribut
-BOOL SwFmtCharFmt::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwFmtCharFmt::GetInfo( SfxPoolItem& rInfo ) const
{
- return pTxtAttr ? pTxtAttr->GetInfo( rInfo ) : FALSE;
+ return pTxtAttr ? pTxtAttr->GetInfo( rInfo ) : sal_False;
}
-BOOL SwFmtCharFmt::QueryValue( uno::Any& rVal, BYTE ) const
+sal_Bool SwFmtCharFmt::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
String sCharFmtName;
if(GetCharFmt())
SwStyleNameMapper::FillProgName(GetCharFmt()->GetName(), sCharFmtName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True );
rVal <<= OUString( sCharFmtName );
- return TRUE;
+ return sal_True;
}
-BOOL SwFmtCharFmt::PutValue( const uno::Any& , BYTE )
+sal_Bool SwFmtCharFmt::PutValue( const uno::Any& , sal_uInt8 )
{
DBG_ERROR("Zeichenvorlage kann mit PutValue nicht gesetzt werden!");
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -150,7 +150,7 @@ BOOL SwFmtCharFmt::PutValue( const uno::Any& , BYTE )
|*
*************************************************************************/
-SwFmtAutoFmt::SwFmtAutoFmt( USHORT nInitWhich )
+SwFmtAutoFmt::SwFmtAutoFmt( sal_uInt16 nInitWhich )
: SfxPoolItem( nInitWhich )
{
}
@@ -175,17 +175,17 @@ SfxPoolItem* SwFmtAutoFmt::Clone( SfxItemPool* ) const
return new SwFmtAutoFmt( *this );
}
-BOOL SwFmtAutoFmt::QueryValue( uno::Any& rVal, BYTE ) const
+sal_Bool SwFmtAutoFmt::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
String sCharFmtName = StylePool::nameOf( mpHandle );
rVal <<= OUString( sCharFmtName );
- return TRUE;
+ return sal_True;
}
-BOOL SwFmtAutoFmt::PutValue( const uno::Any& , BYTE )
+sal_Bool SwFmtAutoFmt::PutValue( const uno::Any& , sal_uInt8 )
{
//the format is not renameable via API
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -242,7 +242,7 @@ SwFmtINetFmt::~SwFmtINetFmt()
int SwFmtINetFmt::operator==( const SfxPoolItem& rAttr ) const
{
ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
- BOOL bRet = SfxPoolItem::operator==( (SfxPoolItem&) rAttr )
+ sal_Bool bRet = SfxPoolItem::operator==( (SfxPoolItem&) rAttr )
&& aURL == ((SwFmtINetFmt&)rAttr).aURL
&& aName == ((SwFmtINetFmt&)rAttr).aName
&& aTargetFrame == ((SwFmtINetFmt&)rAttr).aTargetFrame
@@ -252,7 +252,7 @@ int SwFmtINetFmt::operator==( const SfxPoolItem& rAttr ) const
&& nVisitedId == ((SwFmtINetFmt&)rAttr).nVisitedId;
if( !bRet )
- return FALSE;
+ return sal_False;
const SvxMacroTableDtor* pOther = ((SwFmtINetFmt&)rAttr).pMacroTbl;
if( !pMacroTbl )
@@ -265,19 +265,19 @@ int SwFmtINetFmt::operator==( const SfxPoolItem& rAttr ) const
// Anzahl unterschiedlich => auf jeden Fall ungleich
if( rOwn.Count() != rOther.Count() )
- return FALSE;
+ return sal_False;
// einzeln vergleichen; 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;
}
@@ -304,7 +304,7 @@ void SwFmtINetFmt::SetMacroTbl( const SvxMacroTableDtor* pNewTbl )
-void SwFmtINetFmt::SetMacro( USHORT nEvent, const SvxMacro& rMacro )
+void SwFmtINetFmt::SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro )
{
if( !pMacroTbl )
pMacroTbl = new SvxMacroTableDtor;
@@ -321,7 +321,7 @@ void SwFmtINetFmt::SetMacro( USHORT nEvent, const SvxMacro& rMacro )
-const SvxMacro* SwFmtINetFmt::GetMacro( USHORT nEvent ) const
+const SvxMacro* SwFmtINetFmt::GetMacro( sal_uInt16 nEvent ) const
{
const SvxMacro* pRet = 0;
if( pMacroTbl && pMacroTbl->IsKeyValid( nEvent ) )
@@ -331,9 +331,9 @@ const SvxMacro* SwFmtINetFmt::GetMacro( USHORT nEvent ) const
-BOOL SwFmtINetFmt::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SwFmtINetFmt::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
XubString sVal;
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -379,9 +379,9 @@ BOOL SwFmtINetFmt::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
rVal <<= OUString(sVal);
return bRet;
}
-BOOL SwFmtINetFmt::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SwFmtINetFmt::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
nMemberId &= ~CONVERT_TWIPS;
// all properties except HyperlinkEvents are of type string, hence
@@ -403,14 +403,14 @@ BOOL SwFmtINetFmt::PutValue( const uno::Any& rVal, BYTE nMemberId )
else
{
// wrong type!
- bRet = FALSE;
+ bRet = sal_False;
}
}
else
{
// all string properties:
if(rVal.getValueType() != ::getCppuType((rtl::OUString*)0))
- return FALSE;
+ return sal_False;
XubString sVal = *(rtl::OUString*)rVal.getValue();
switch(nMemberId)
{
@@ -441,7 +441,7 @@ BOOL SwFmtINetFmt::PutValue( const uno::Any& rVal, BYTE nMemberId )
}
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
}
return bRet;
@@ -503,10 +503,10 @@ SfxPoolItem* SwFmtRuby::Clone( SfxItemPool* ) const
return new SwFmtRuby( *this );
}
-BOOL SwFmtRuby::QueryValue( uno::Any& rVal,
- BYTE nMemberId ) const
+sal_Bool SwFmtRuby::QueryValue( uno::Any& rVal,
+ sal_uInt8 nMemberId ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
nMemberId &= ~CONVERT_TWIPS;
switch( nMemberId )
{
@@ -526,14 +526,14 @@ BOOL SwFmtRuby::QueryValue( uno::Any& rVal,
}
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
-BOOL SwFmtRuby::PutValue( const uno::Any& rVal,
- BYTE nMemberId )
+sal_Bool SwFmtRuby::PutValue( const uno::Any& rVal,
+ sal_uInt8 nMemberId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
nMemberId &= ~CONVERT_TWIPS;
switch( nMemberId )
{
@@ -573,7 +573,7 @@ BOOL SwFmtRuby::PutValue( const uno::Any& rVal,
}
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
@@ -583,12 +583,12 @@ BOOL SwFmtRuby::PutValue( const uno::Any& rVal,
class SwFmtMeta
************************************************************************/
-SwFmtMeta * SwFmtMeta::CreatePoolDefault(const USHORT i_nWhich)
+SwFmtMeta * SwFmtMeta::CreatePoolDefault(const sal_uInt16 i_nWhich)
{
return new SwFmtMeta(i_nWhich);
}
-SwFmtMeta::SwFmtMeta(const USHORT i_nWhich)
+SwFmtMeta::SwFmtMeta(const sal_uInt16 i_nWhich)
: SfxPoolItem( i_nWhich )
, m_pMeta()
, m_pTxtAttr( 0 )
@@ -598,7 +598,7 @@ SwFmtMeta::SwFmtMeta(const USHORT i_nWhich)
}
SwFmtMeta::SwFmtMeta( ::boost::shared_ptr< ::sw::Meta > const & i_pMeta,
- const USHORT i_nWhich )
+ const sal_uInt16 i_nWhich )
: SfxPoolItem( i_nWhich )
, m_pMeta( i_pMeta )
, m_pTxtAttr( 0 )
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 77b969433ed7..755e8bf1026e 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -80,7 +80,7 @@ SwFntCache *pFntCache = NULL;
// Letzter Font, der durch ChgFntCache eingestellt wurde.
SwFntObj *pLastFont = NULL;
// Die "MagicNumber", die den Fonts zur Identifizierung verpasst wird
-BYTE* pMagicNo = NULL;
+sal_uInt8* pMagicNo = NULL;
Color *pWaveCol = 0;
@@ -88,8 +88,8 @@ long SwFntObj::nPixWidth;
MapMode* SwFntObj::pPixMap = NULL;
OutputDevice* SwFntObj::pPixOut = NULL;
-extern USHORT UnMapDirection( USHORT nDir, const BOOL bVertFormat );
-USHORT GetDefaultFontHeight( SwDrawTextInfo &rInf )
+extern sal_uInt16 UnMapDirection( sal_uInt16 nDir, const sal_Bool bVertFormat );
+sal_uInt16 GetDefaultFontHeight( SwDrawTextInfo &rInf )
{
SwDocShell* pDocShell = rInf.GetShell()->GetDoc()->GetDocShell();
SfxStyleSheetBasePool* pBasePool = pDocShell->GetStyleSheetPool();
@@ -99,7 +99,7 @@ USHORT GetDefaultFontHeight( SwDrawTextInfo &rInf )
SfxStyleSheetBase* pStyle = pBasePool->Find( aString, (SfxStyleFamily)SFX_STYLE_FAMILY_PARA );
SfxItemSet& aTmpSet = pStyle->GetItemSet();
SvxFontHeightItem &aDefaultFontItem = (SvxFontHeightItem&)aTmpSet.Get(RES_CHRATR_CJK_FONTSIZE);
- return (USHORT)aDefaultFontItem.GetHeight();
+ return (sal_uInt16)aDefaultFontItem.GetHeight();
}
@@ -212,15 +212,15 @@ struct CalcLinePosData
SwDrawTextInfo& rInf;
Font& rFont;
xub_StrLen nCnt;
- const BOOL bSwitchH2V;
- const BOOL bSwitchL2R;
+ const sal_Bool bSwitchH2V;
+ const sal_Bool bSwitchL2R;
long nHalfSpace;
sal_Int32* pKernArray;
- const BOOL bBidiPor;
+ const sal_Bool bBidiPor;
CalcLinePosData( SwDrawTextInfo& _rInf, Font& _rFont,
- xub_StrLen _nCnt, const BOOL _bSwitchH2V, const BOOL _bSwitchL2R,
- long _nHalfSpace, sal_Int32* _pKernArray, const BOOL _bBidiPor) :
+ xub_StrLen _nCnt, const sal_Bool _bSwitchH2V, const sal_Bool _bSwitchL2R,
+ long _nHalfSpace, sal_Int32* _pKernArray, const sal_Bool _bBidiPor) :
rInf( _rInf ),
rFont( _rFont ),
nCnt( _nCnt ),
@@ -256,10 +256,10 @@ void lcl_calcLinePos( const CalcLinePosData &rData,
}
// determine start, end and length of wave line
- sal_Int32 nKernStart = nStart ? rData.pKernArray[ USHORT( nStart - 1 ) ] : 0;
- sal_Int32 nKernEnd = rData.pKernArray[ USHORT( nEnd - 1 ) ];
+ sal_Int32 nKernStart = nStart ? rData.pKernArray[ sal_uInt16( nStart - 1 ) ] : 0;
+ sal_Int32 nKernEnd = rData.pKernArray[ sal_uInt16( nEnd - 1 ) ];
- USHORT nDir = rData.bBidiPor ? 1800 :
+ sal_uInt16 nDir = rData.bBidiPor ? 1800 :
UnMapDirection( rData.rFont.GetOrientation(), rData.bSwitchH2V );
switch ( nDir )
@@ -301,7 +301,7 @@ void lcl_calcLinePos( const CalcLinePosData &rData,
/*************************************************************************
*
- * USHORT SwFntObj::GetFontAscent( const OutputDevice& rOut )
+ * sal_uInt16 SwFntObj::GetFontAscent( const OutputDevice& rOut )
*
* Ersterstellung AMA 7. Nov. 94
* Letzte Aenderung AMA 7. Nov. 94
@@ -311,9 +311,9 @@ void lcl_calcLinePos( const CalcLinePosData &rData,
* erzeugt werden.
*************************************************************************/
-USHORT SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut )
+sal_uInt16 SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
const OutputDevice& rRefDev = pSh ? pSh->GetRefDev() : rOut;
if ( pSh && lcl_IsFontAdjustNecessary( rOut, rRefDev ) )
@@ -330,7 +330,7 @@ USHORT SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut )
const Font aOldFnt( rRefDev.GetFont() );
((OutputDevice&)rRefDev).SetFont( *pPrtFont );
const FontMetric aOutMet( rRefDev.GetFontMetric() );
- nPrtAscent = (USHORT) aOutMet.GetAscent();
+ nPrtAscent = (sal_uInt16) aOutMet.GetAscent();
( (OutputDevice&)rRefDev).SetFont( aOldFnt );
}
@@ -348,7 +348,7 @@ USHORT SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut )
/*************************************************************************
*
- * USHORT SwFntObj::GetFontHeight( const OutputDevice* pOut )
+ * sal_uInt16 SwFntObj::GetFontHeight( const OutputDevice* pOut )
*
* Ersterstellung AMA 7. Nov. 94
* Letzte Aenderung AMA 7. Nov. 94
@@ -358,9 +358,9 @@ USHORT SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut )
* erzeugt werden.
*************************************************************************/
-USHORT SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rOut )
+sal_uInt16 SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rOut )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
const OutputDevice& rRefDev = pSh ? pSh->GetRefDev() : rOut;
if ( pSh && lcl_IsFontAdjustNecessary( rOut, rRefDev ) )
@@ -376,12 +376,12 @@ USHORT SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rOut )
CreatePrtFont( rOut );
const Font aOldFnt( rRefDev.GetFont() );
((OutputDevice&)rRefDev).SetFont( *pPrtFont );
- nPrtHeight = static_cast<USHORT>(rRefDev.GetTextHeight());
+ nPrtHeight = static_cast<sal_uInt16>(rRefDev.GetTextHeight());
#if OSL_DEBUG_LEVEL > 1
// Check if vcl did not change the meading of GetTextHeight
const FontMetric aOutMet( rRefDev.GetFontMetric() );
- long nTmpPrtHeight = (USHORT)aOutMet.GetAscent() + aOutMet.GetDescent();
+ long nTmpPrtHeight = (sal_uInt16)aOutMet.GetAscent() + aOutMet.GetDescent();
(void) nTmpPrtHeight;
// #i106098#: do not compare with == here due to rounding error
ASSERT( abs(nTmpPrtHeight - nPrtHeight) < 3,
@@ -398,9 +398,9 @@ USHORT SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rOut )
return nRet;
}
-USHORT SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut )
+sal_uInt16 SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if ( pSh )
{
@@ -412,7 +412,7 @@ USHORT SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut
((OutputDevice&)rOut).SetFont( aOldFnt );
bSymbol = RTL_TEXTENCODING_SYMBOL == aMet.GetCharSet();
GuessLeading( *pSh, aMet );
- nExtLeading = static_cast<USHORT>(aMet.GetExtLeading());
+ nExtLeading = static_cast<sal_uInt16>(aMet.GetExtLeading());
}
const IDocumentSettingAccess& rIDSA = *pSh->getIDocumentSettingAccess();
@@ -490,7 +490,7 @@ void SwFntObj::CreateScrFont( const ViewShell& rSh, const OutputDevice& rOut )
GuessLeading( rSh, aMet );
if ( USHRT_MAX == nExtLeading )
- nExtLeading = static_cast<USHORT>(aMet.GetExtLeading());
+ nExtLeading = static_cast<sal_uInt16>(aMet.GetExtLeading());
// reset the original reference device font
pPrt->SetFont( aOldPrtFnt );
@@ -528,9 +528,9 @@ void SwFntObj::CreateScrFont( const ViewShell& rSh, const OutputDevice& rOut )
nZoom = USHRT_MAX - 1;
}
- nScrAscent = (USHORT)pOut->GetFontMetric().GetAscent();
+ nScrAscent = (sal_uInt16)pOut->GetFontMetric().GetAscent();
if ( USHRT_MAX == nScrHeight )
- nScrHeight = (USHORT)pOut->GetTextHeight();
+ nScrHeight = (sal_uInt16)pOut->GetTextHeight();
// reset original output device font
pOut->SetFont( aOldOutFont );
@@ -563,7 +563,7 @@ void SwFntObj::GuessLeading( const ViewShell&
const Font aOldFnt( pWin->GetFont() );
pWin->SetFont( *pPrtFont );
const FontMetric aWinMet( pWin->GetFontMetric() );
- const USHORT nWinHeight = USHORT( aWinMet.GetSize().Height() );
+ const sal_uInt16 nWinHeight = sal_uInt16( aWinMet.GetSize().Height() );
if( pPrtFont->GetName().Search( aWinMet.GetName() ) < USHRT_MAX )
{
// Wenn das Leading auf dem Window auch 0 ist, dann
@@ -577,11 +577,11 @@ void SwFntObj::GuessLeading( const ViewShell&
if( nTmpLeading < 0 )
nGuessedLeading = 0;
else
- nGuessedLeading = USHORT(nTmpLeading);
+ nGuessedLeading = sal_uInt16(nTmpLeading);
}
else
{
- nGuessedLeading = USHORT(nTmpLeading);
+ nGuessedLeading = sal_uInt16(nTmpLeading);
// Manta-Hack #50153#:
// Wer beim Leading luegt, luegt moeglicherweise auch beim
// Ascent/Descent, deshalb wird hier ggf. der Font ein wenig
@@ -592,7 +592,7 @@ void SwFntObj::GuessLeading( const ViewShell&
{
ASSERT( nPrtAscent < USHRT_MAX, "GuessLeading: PrtAscent-Fault" );
if ( nPrtAscent < USHRT_MAX )
- nPrtAscent = nPrtAscent + (USHORT)(( 2 * nDiff ) / 5);
+ nPrtAscent = nPrtAscent + (sal_uInt16)(( 2 * nDiff ) / 5);
}
}
}
@@ -664,7 +664,7 @@ void SwFntObj::SetDevFont( const ViewShell *pSh, OutputDevice& rOut )
*
*************************************************************************/
-BYTE lcl_WhichPunctuation( xub_Unicode cChar )
+sal_uInt8 lcl_WhichPunctuation( xub_Unicode cChar )
{
if ( ( cChar < 0x3001 || cChar > 0x3002 ) &&
( cChar < 0x3008 || cChar > 0x3011 ) &&
@@ -744,7 +744,7 @@ static void lcl_DrawLineForWrongListData(
rInf.GetOut().Push();
const Color aCol( rInf.GetOut().GetLineColor() );
- const BOOL bColSave = aCol != aLineColor;
+ const sal_Bool bColSave = aCol != aLineColor;
if (bColSave)
rInf.GetOut().SetLineColor( aLineColor );
@@ -803,7 +803,7 @@ static void lcl_DrawLineForWrongListData(
else // draw wavy lines for spell or grammar errors
{
// get wavy line type to use
- USHORT nWave =
+ sal_uInt16 nWave =
WRONG_SHOW_MEDIUM < nHght ? WAVE_NORMAL :
( WRONG_SHOW_SMALL < nHght ? WAVE_SMALL : WAVE_FLAT );
@@ -835,9 +835,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
const IDocumentSettingAccess* pIDSA = rInf.GetShell()->getIDocumentSettingAccess();
// true if pOut is the printer and the printer has been used for formatting
- const BOOL bPrt = OUTDEV_PRINTER == rInf.GetOut().GetOutDevType() &&
+ const sal_Bool bPrt = OUTDEV_PRINTER == rInf.GetOut().GetOutDevType() &&
OUTDEV_PRINTER == rRefDev.GetOutDevType();
- const BOOL bBrowse = ( pWin &&
+ const sal_Bool bBrowse = ( pWin &&
pIDSA->get(IDocumentSettingAccess::BROWSE_MODE) &&
!rInf.GetShell()->GetViewOptions()->IsPrtFormat() &&
!rInf.GetBullet() &&
@@ -849,10 +849,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// bDirectPrint indicates that we can enter the branch which calls
// the DrawText functions instead of calling the DrawTextArray functions
- const BOOL bDirectPrint = bPrt || bBrowse;
+ const sal_Bool bDirectPrint = bPrt || bBrowse;
// Condition for output font / refdev font adjustment
- const BOOL bUseScrFont =
+ const sal_Bool bUseScrFont =
lcl_IsFontAdjustNecessary( rInf.GetOut(), rRefDev );
Font* pTmpFont = bUseScrFont ? pScrFont : pPrtFont;
@@ -874,7 +874,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
#ifdef DBG_UTIL
- const BOOL bNoAdjust = bPrt ||
+ const sal_Bool bNoAdjust = bPrt ||
( pWin &&
pIDSA->get(IDocumentSettingAccess::BROWSE_MODE) &&
!rInf.GetShell()->GetViewOptions()->IsPrtFormat() );
@@ -948,11 +948,11 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// wird die graue Wellenlinie des ExtendedAttributSets zunaechst
// in der Fontfarbe erscheinen.
- const BOOL bSwitchH2V = rInf.GetFrm() && rInf.GetFrm()->IsVertical();
- const BOOL bSwitchL2R = rInf.GetFrm() && rInf.GetFrm()->IsRightToLeft() &&
+ const sal_Bool bSwitchH2V = rInf.GetFrm() && rInf.GetFrm()->IsVertical();
+ const sal_Bool bSwitchL2R = rInf.GetFrm() && rInf.GetFrm()->IsRightToLeft() &&
! rInf.IsIgnoreFrmRTL();
- const ULONG nMode = rInf.GetOut().GetLayoutMode();
- const BOOL bBidiPor = ( bSwitchL2R !=
+ const sal_uLong nMode = rInf.GetOut().GetLayoutMode();
+ const sal_Bool bBidiPor = ( bSwitchL2R !=
( 0 != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
// be sure to have the correct layout mode at the printer
@@ -998,9 +998,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars())
{
//for textgrid refactor
- //const USHORT nGridWidth = pGrid->GetBaseHeight();
+ //const sal_uInt16 nGridWidth = pGrid->GetBaseHeight();
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
- const USHORT nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
+ const sal_uInt16 nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
sal_Int32* pKernArray = new sal_Int32[rInf.GetLen()];
if ( pPrinter )
@@ -1012,7 +1012,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
long nWidthPerChar = pKernArray[ rInf.GetLen() - 1 ] / rInf.GetLen();
- const ULONG i = nWidthPerChar ?
+ const sal_uLong i = nWidthPerChar ?
( nWidthPerChar - 1 ) / nGridWidth + 1:
1;
@@ -1020,13 +1020,13 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// position of first character, we take the printer position
long nCharWidth = pKernArray[ 0 ];
- ULONG nHalfWidth = nWidthPerChar / 2;
+ sal_uLong nHalfWidth = nWidthPerChar / 2;
long nNextFix;
// punctuation characters are not centered
xub_Unicode cChar = rInf.GetText().GetChar( rInf.GetIdx() );
- BYTE nType = lcl_WhichPunctuation( cChar );
+ sal_uInt8 nType = lcl_WhichPunctuation( cChar );
switch ( nType )
{
case SwScriptInfo::NONE :
@@ -1088,7 +1088,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() )
{
- const USHORT nDefaultFontHeight = GetDefaultFontHeight( rInf );
+ const sal_uInt16 nDefaultFontHeight = GetDefaultFontHeight( rInf );
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
long nGridWidthAdd = GETGRIDWIDTH(pGrid, pDoc);
@@ -1114,14 +1114,14 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( rInf.GetFont() && rInf.GetLen() )
{
const SwScriptInfo* pSI = rInf.GetScriptInfo();
- const BYTE nActual = rInf.GetFont()->GetActual();
+ const sal_uInt8 nActual = rInf.GetFont()->GetActual();
///Kana Compression
if( SW_CJK == nActual && rInf.GetKanaComp() &&
pSI && pSI->CountCompChg() &&
lcl_IsMonoSpaceFont( *(rInf.GetpOut()) ) )
{
pSI->Compress( pKernArray,rInf.GetIdx(), rInf.GetLen(),
- rInf.GetKanaComp(), (USHORT)aFont.GetSize().Height(),&aPos );
+ rInf.GetKanaComp(), (sal_uInt16)aFont.GetSize().Height(),&aPos );
bSpecialJust = sal_True;
}
///Asian Justification
@@ -1131,7 +1131,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( LANGUAGE_KOREAN != aLang && LANGUAGE_KOREAN_JOHAB != aLang)
{
long nSpaceSum = nSpaceAdd;
- for ( USHORT nI = 0; nI < rInf.GetLen(); ++nI )
+ for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
{
pKernArray[ nI ] += nSpaceSum;
nSpaceSum += nSpaceAdd;
@@ -1229,7 +1229,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( bDirectPrint )
{
const Fraction aTmp( 1, 1 );
- BOOL bStretch = rInf.GetWidth() && ( rInf.GetLen() > 1 ) && bPrt
+ sal_Bool bStretch = rInf.GetWidth() && ( rInf.GetLen() > 1 ) && bPrt
&& ( aTmp != rInf.GetOut().GetMapMode().GetScaleX() );
if ( bSwitchL2R )
@@ -1286,7 +1286,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( rInf.GetFont() && rInf.GetLen() )
{
const SwScriptInfo* pSI = rInf.GetScriptInfo();
- const BYTE nActual = rInf.GetFont()->GetActual();
+ const sal_uInt8 nActual = rInf.GetFont()->GetActual();
// Kana Compression
if ( SW_CJK == nActual && rInf.GetKanaComp() &&
@@ -1295,7 +1295,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
pSI->Compress( pKernArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (USHORT)aFont.GetSize().Height(), &aPos );
+ (sal_uInt16)aFont.GetSize().Height(), &aPos );
bSpecialJust = sal_True;
}
@@ -1307,7 +1307,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( LANGUAGE_KOREAN != aLang && LANGUAGE_KOREAN_JOHAB != aLang )
{
long nSpaceSum = nSpaceAdd;
- for ( USHORT nI = 0; nI < rInf.GetLen(); ++nI )
+ for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
{
pKernArray[ nI ] += nSpaceSum;
nSpaceSum += nSpaceAdd;
@@ -1439,7 +1439,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
pTmpFont->SetColor( aSaveColor );
}
- rInf.GetOut().DrawStretchText( aPos, (USHORT)nTmpWidth,
+ rInf.GetOut().DrawStretchText( aPos, (sal_uInt16)nTmpWidth,
rInf.GetText(), rInf.GetIdx(), rInf.GetLen() );
}
else
@@ -1455,9 +1455,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
const String* pStr = &rInf.GetText();
String aStr( aEmptyStr );
- BOOL bBullet = rInf.GetBullet();
+ sal_Bool bBullet = rInf.GetBullet();
if( bSymbol )
- bBullet = FALSE;
+ bBullet = sal_False;
sal_Int32 *pKernArray = new sal_Int32[ rInf.GetLen() ];
CreateScrFont( *rInf.GetShell(), rInf.GetOut() );
long nScrPos;
@@ -1482,7 +1482,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
}
else
{
-// BOOL bRestore = FALSE;
+// sal_Bool bRestore = sal_False;
// MapMode aOld( rInf.GetOut().GetMapMode() );
// if( rInf.GetZoom().GetNumerator() &&
// rInf.GetZoom() != aOld.GetScaleX() )
@@ -1491,7 +1491,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// aNew.SetScaleX( rInf.GetZoom() );
// aNew.SetScaleY( rInf.GetZoom() );
// rInf.GetOut().SetMapMode( aNew );
-// bRestore = TRUE;
+// bRestore = sal_True;
// }
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
rInf.GetIdx(), rInf.GetLen() );
@@ -1507,7 +1507,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( rInf.GetFont() && rInf.GetLen() )
{
- const BYTE nActual = rInf.GetFont()->GetActual();
+ const sal_uInt8 nActual = rInf.GetFont()->GetActual();
const SwScriptInfo* pSI = rInf.GetScriptInfo();
// Kana Compression
@@ -1518,10 +1518,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
Point aTmpPos( aPos );
pSI->Compress( pScrArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (USHORT)aFont.GetSize().Height(), &aTmpPos );
+ (sal_uInt16)aFont.GetSize().Height(), &aTmpPos );
pSI->Compress( pKernArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (USHORT)aFont.GetSize().Height(), &aPos );
+ (sal_uInt16)aFont.GetSize().Height(), &aPos );
}
// Asian Justification
@@ -1532,7 +1532,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( LANGUAGE_KOREAN != aLang && LANGUAGE_KOREAN_JOHAB != aLang )
{
long nSpaceSum = nSpaceAdd;
- for ( USHORT nI = 0; nI < rInf.GetLen(); ++nI )
+ for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
{
pKernArray[ nI ] += nSpaceSum;
pScrArray[ nI ] += nSpaceSum;
@@ -1633,12 +1633,12 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
xub_Unicode nCh;
// Bei Pairkerning waechst der Printereinfluss auf die Positionierung
- USHORT nMul = 3;
+ sal_uInt16 nMul = 3;
if ( pPrtFont->GetKerning() )
nMul = 1;
- const USHORT nDiv = nMul+1;
+ const sal_uInt16 nDiv = nMul+1;
// In nSpaceSum wird der durch Blocksatz auf die Spaces verteilte
// Zwischenraum aufsummiert.
@@ -1733,19 +1733,19 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( rInf.GetOut().GetConnectMetaFile() )
rInf.GetOut().Push();
- USHORT nWave =
+ sal_uInt16 nWave =
WRONG_SHOW_MEDIUM < nHght ? WAVE_NORMAL :
( WRONG_SHOW_SMALL < nHght ? WAVE_SMALL :
WAVE_FLAT );
Color aCol( rInf.GetOut().GetLineColor() );
- BOOL bColSave = aCol != *pWaveCol;
+ sal_Bool bColSave = aCol != *pWaveCol;
if ( bColSave )
rInf.GetOut().SetLineColor( *pWaveCol );
Point aEnd;
- long nKernVal = pKernArray[ USHORT( rInf.GetLen() - 1 ) ];
+ long nKernVal = pKernArray[ sal_uInt16( rInf.GetLen() - 1 ) ];
- USHORT nDir = bBidiPor ?
+ sal_uInt16 nDir = bBidiPor ?
1800 :
UnMapDirection(
GetFont()->GetOrientation(),
@@ -1878,7 +1878,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
/*************************************************************************
*
* Size SwFntObj::GetTextSize( const OutputDevice *pOut, const String &rTxt,
- * const USHORT nIdx, const USHORT nLen, const short nKern = 0 );
+ * const sal_uInt16 nIdx, const sal_uInt16 nLen, const short nKern = 0 );
*
* Ersterstellung AMA 16. Dez. 94
* Letzte Aenderung AMA 16. Dez. 94
@@ -1907,7 +1907,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars() )
{
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
- const USHORT nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
+ const sal_uInt16 nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
OutputDevice* pOutDev;
@@ -1931,7 +1931,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
long nWidthPerChar = aTxtSize.Width() / nLn;
- const ULONG i = nWidthPerChar ?
+ const sal_uLong i = nWidthPerChar ?
( nWidthPerChar - 1 ) / nGridWidth + 1:
1;
@@ -1948,7 +1948,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
GETGRID( rInf.GetFrm()->FindPageFrm() )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() )
{
- const USHORT nDefaultFontHeight = GetDefaultFontHeight( rInf );
+ const sal_uInt16 nDefaultFontHeight = GetDefaultFontHeight( rInf );
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
long nGridWidthAdd = GETGRIDWIDTH(pGrid, pDoc);
@@ -1977,7 +1977,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
}
}
- const BOOL bCompress = rInf.GetKanaComp() && nLn &&
+ const sal_Bool bCompress = rInf.GetKanaComp() && nLn &&
rInf.GetFont() &&
SW_CJK == rInf.GetFont()->GetActual() &&
rInf.GetScriptInfo() &&
@@ -2006,7 +2006,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
if( bCompress )
rInf.SetKanaDiff( rInf.GetScriptInfo()->Compress( pKernArray,
rInf.GetIdx(), nLn, rInf.GetKanaComp(),
- (USHORT)aFont.GetSize().Height() ) );
+ (sal_uInt16)aFont.GetSize().Height() ) );
else
rInf.SetKanaDiff( 0 );
@@ -2029,10 +2029,10 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
xub_Unicode nCh;
// Bei Pairkerning waechst der Printereinfluss auf die Positionierung
- USHORT nMul = 3;
+ sal_uInt16 nMul = 3;
if ( pPrtFont->GetKerning() )
nMul = 1;
- const USHORT nDiv = nMul+1;
+ const sal_uInt16 nDiv = nMul+1;
for( xub_StrLen i=1; i<nCnt; i++ )
{
nCh = rInf.GetText().GetChar( rInf.GetIdx() + i );
@@ -2070,7 +2070,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
rInf.GetIdx(), nLn );
rInf.SetKanaDiff( rInf.GetScriptInfo()->Compress( pKernArray,
rInf.GetIdx(), nLn, rInf.GetKanaComp(),
- (USHORT) aFont.GetSize().Height() ) );
+ (sal_uInt16) aFont.GetSize().Height() ) );
aTxtSize.Width() = pKernArray[ nLn - 1 ];
delete[] pKernArray;
}
@@ -2121,7 +2121,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
const SwScriptInfo* pSI = rInf.GetScriptInfo();
if ( rInf.GetFont() && rInf.GetLen() )
{
- const BYTE nActual = rInf.GetFont()->GetActual();
+ const sal_uInt8 nActual = rInf.GetFont()->GetActual();
// Kana Compression
if ( SW_CJK == nActual && rInf.GetKanaComp() &&
@@ -2130,7 +2130,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
{
pSI->Compress( pKernArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (USHORT) aFont.GetSize().Height() );
+ (sal_uInt16) aFont.GetSize().Height() );
}
// Asian Justification
@@ -2141,7 +2141,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
if ( LANGUAGE_KOREAN != aLang && LANGUAGE_KOREAN_JOHAB != aLang )
{
long nSpaceSum = nSpaceAdd;
- for ( USHORT nI = 0; nI < rInf.GetLen(); ++nI )
+ for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
{
pKernArray[ nI ] += nSpaceSum;
nSpaceSum += nSpaceAdd;
@@ -2195,17 +2195,17 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars() )
{
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
- const USHORT nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
+ const sal_uInt16 nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
long nWidthPerChar = pKernArray[ rInf.GetLen() - 1 ] / rInf.GetLen();
- ULONG i = nWidthPerChar ?
+ sal_uLong i = nWidthPerChar ?
( nWidthPerChar - 1 ) / nGridWidth + 1:
1;
nWidthPerChar = i * nGridWidth;
- nCnt = (USHORT)(rInf.GetOfst() / nWidthPerChar);
+ nCnt = (sal_uInt16)(rInf.GetOfst() / nWidthPerChar);
if ( 2 * ( rInf.GetOfst() - nCnt * nWidthPerChar ) > nWidthPerChar )
++nCnt;
@@ -2222,7 +2222,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() )
{
- const USHORT nDefaultFontHeight = GetDefaultFontHeight( rInf );
+ const sal_uInt16 nDefaultFontHeight = GetDefaultFontHeight( rInf );
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
long nGridWidthAdd = GETGRIDWIDTH(pGrid, pDoc);
@@ -2314,8 +2314,8 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
|*************************************************************************/
SwFntAccess::SwFntAccess( const void* &rMagic,
- USHORT &rIndex, const void *pOwn, ViewShell *pSh,
- BOOL bCheck ) :
+ sal_uInt16 &rIndex, const void *pOwn, ViewShell *pSh,
+ sal_Bool bCheck ) :
SwCacheAccess( *pFntCache, rMagic, rIndex ),
pShell( pSh )
{
@@ -2332,12 +2332,12 @@ SwFntAccess::SwFntAccess( const void* &rMagic,
}
else
// Hier ist der Font nicht bekannt, muss also gesucht werden.
- bCheck = FALSE;
+ bCheck = sal_False;
{
OutputDevice* pOut = 0;
- USHORT nZoom = USHRT_MAX;
+ sal_uInt16 nZoom = USHRT_MAX;
// Get the reference device
if ( pSh )
@@ -2433,7 +2433,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
{
ChgFnt( rInf.GetShell(), rInf.GetOut() );
- const BOOL bCompress = rInf.GetKanaComp() && rInf.GetLen() &&
+ const sal_Bool bCompress = rInf.GetKanaComp() && rInf.GetLen() &&
SW_CJK == GetActual() &&
rInf.GetScriptInfo() &&
rInf.GetScriptInfo()->CountCompChg() &&
@@ -2442,10 +2442,10 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
ASSERT( !bCompress || ( rInf.GetScriptInfo() && rInf.GetScriptInfo()->
CountCompChg()), "Compression without info" );
- USHORT nTxtBreak = 0;
+ sal_uInt16 nTxtBreak = 0;
long nKern = 0;
- USHORT nLn = ( rInf.GetLen() == STRING_LEN ? rInf.GetText().Len()
+ sal_uInt16 nLn = ( rInf.GetLen() == STRING_LEN ? rInf.GetText().Len()
: rInf.GetLen() );
if ( rInf.GetFrm() && nLn && rInf.SnapToGrid() &&
@@ -2455,7 +2455,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars() )
{
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
- const USHORT nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
+ const sal_uInt16 nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
sal_Int32* pKernArray = new sal_Int32[rInf.GetLen()];
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
@@ -2463,7 +2463,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
long nWidthPerChar = pKernArray[ rInf.GetLen() - 1 ] / rInf.GetLen();
- const ULONG i = nWidthPerChar ?
+ const sal_uLong i = nWidthPerChar ?
( nWidthPerChar - 1 ) / nGridWidth + 1:
1;
@@ -2488,7 +2488,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
GETGRID( rInf.GetFrm()->FindPageFrm() )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() )
{
- const USHORT nDefaultFontHeight = GetDefaultFontHeight( rInf );
+ const sal_uInt16 nDefaultFontHeight = GetDefaultFontHeight( rInf );
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
long nGridWidthAdd = GETGRIDWIDTH(pGrid, pDoc);
@@ -2593,7 +2593,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
rInf.GetIdx(), nLn );
if( rInf.GetScriptInfo()->Compress( pKernArray, rInf.GetIdx(), nLn,
- rInf.GetKanaComp(), (USHORT)GetHeight( nActual ) ) )
+ rInf.GetKanaComp(), (sal_uInt16)GetHeight( nActual ) ) )
{
long nKernAdd = nKern;
xub_StrLen nTmpBreak = nTxtBreak;
@@ -2660,7 +2660,7 @@ sal_Bool SwDrawTextInfo::ApplyAutoColor( Font* pFont )
/// OD 21.08.2002 #99657#
/// There is a user defined setting for the background, if there
/// is a background brush and its color is *not* "no fill"/"auto fill".
- if( GetFrm()->GetBackgroundBrush( pItem, pCol, aOrigBackRect, FALSE ) )
+ if( GetFrm()->GetBackgroundBrush( pItem, pCol, aOrigBackRect, sal_False ) )
{
if ( !pCol )
{
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index e38b26ecb9f7..69426bcffa34 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -180,7 +180,7 @@ Size SwSubFont::GetCapitalSize( SwDrawTextInfo& rInf )
Point aPos;
rInf.SetPos( aPos );
rInf.SetSpace( 0 );
- rInf.SetDrawSpace( FALSE );
+ rInf.SetDrawSpace( sal_False );
SwDoGetCapitalSize aDo( rInf );
DoOnCapitals( aDo );
Size aTxtSize( aDo.GetSize() );
@@ -271,13 +271,13 @@ xub_StrLen SwFont::GetCapitalBreak( ViewShell* pSh, const OutputDevice* pOut,
// Start:
Point aPos( 0, 0 );
SwDrawTextInfo aInfo(pSh, *(OutputDevice*)pOut, pScript, rTxt, nIdx, nLen,
- 0, FALSE);
+ 0, sal_False);
aInfo.SetPos( aPos );
aInfo.SetSpace( 0 );
aInfo.SetWrong( NULL );
aInfo.SetGrammarCheck( NULL );
aInfo.SetSmartTags( NULL ); // SMARTTAGS
- aInfo.SetDrawSpace( FALSE );
+ aInfo.SetDrawSpace( sal_False );
aInfo.SetKern( CheckKerning() );
aInfo.SetKanaComp( pScript ? 0 : 100 );
aInfo.SetFont( this );
@@ -314,14 +314,14 @@ void SwDoDrawCapital::Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont )
void SwDoDrawCapital::Do()
{
SV_STAT( nDrawText );
- USHORT nOrgWidth = rInf.GetWidth();
- rInf.SetWidth( USHORT(rInf.GetSize().Width()) );
+ sal_uInt16 nOrgWidth = rInf.GetWidth();
+ rInf.SetWidth( sal_uInt16(rInf.GetSize().Width()) );
if ( rInf.GetUpper() )
pUpperFnt->DrawText( rInf );
else
{
- BOOL bOldBullet = rInf.GetBullet();
- rInf.SetBullet( FALSE );
+ sal_Bool bOldBullet = rInf.GetBullet();
+ rInf.SetBullet( sal_False );
pLowerFnt->DrawText( rInf );
rInf.SetBullet( bOldBullet );
}
@@ -342,15 +342,15 @@ void SwDoDrawCapital::DrawSpace( Point &rPos )
long nDiff = rInf.GetPos().X() - rPos.X();
Point aPos( rPos );
- const BOOL bSwitchL2R = rInf.GetFrm()->IsRightToLeft() &&
+ const sal_Bool bSwitchL2R = rInf.GetFrm()->IsRightToLeft() &&
! rInf.IsIgnoreFrmRTL();
if ( bSwitchL2R )
rInf.GetFrm()->SwitchLTRtoRTL( aPos );
- const ULONG nMode = rInf.GetpOut()->GetLayoutMode();
- const BOOL bBidiPor = ( bSwitchL2R !=
+ const sal_uLong nMode = rInf.GetpOut()->GetLayoutMode();
+ const sal_Bool bBidiPor = ( bSwitchL2R !=
( 0 != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
if ( bBidiPor )
@@ -393,9 +393,9 @@ protected:
SwFntObj *pUpperFnt;
SwFntObj *pLowerFnt;
xub_StrLen nCrsr;
- USHORT nOfst;
+ sal_uInt16 nOfst;
public:
- SwDoCapitalCrsrOfst( SwDrawTextInfo &rInfo, const USHORT nOfs ) :
+ SwDoCapitalCrsrOfst( SwDrawTextInfo &rInfo, const sal_uInt16 nOfs ) :
SwDoCapitals( rInfo ), nCrsr( 0 ), nOfst( nOfs )
{ }
virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont );
@@ -417,7 +417,7 @@ void SwDoCapitalCrsrOfst::Do()
{
if ( nOfst > rInf.GetSize().Width() )
{
- nOfst = nOfst - USHORT(rInf.GetSize().Width());
+ nOfst = nOfst - sal_uInt16(rInf.GetSize().Width());
nCrsr = nCrsr + rInf.GetLen();
}
else
@@ -426,7 +426,7 @@ void SwDoCapitalCrsrOfst::Do()
rInf.GetScriptInfo(),
rInf.GetText(),
rInf.GetIdx(),
- rInf.GetLen(), 0, FALSE );
+ rInf.GetLen(), 0, sal_False );
aDrawInf.SetOfst( nOfst );
aDrawInf.SetKern( rInf.GetKern() );
aDrawInf.SetKanaComp( rInf.GetKanaComp() );
@@ -459,7 +459,7 @@ xub_StrLen SwSubFont::GetCapitalCrsrOfst( SwDrawTextInfo& rInf )
SwDoCapitalCrsrOfst aDo( rInf, rInf.GetOfst() );
Point aPos;
rInf.SetPos( aPos );
- rInf.SetDrawSpace( FALSE );
+ rInf.SetDrawSpace( sal_False );
DoOnCapitals( aDo );
rInf.SetKern( nOldKern );
return aDo.GetCrsr();
@@ -472,12 +472,12 @@ xub_StrLen SwSubFont::GetCapitalCrsrOfst( SwDrawTextInfo& rInf )
class SwDoDrawStretchCapital : public SwDoDrawCapital
{
const xub_StrLen nStrLen;
- const USHORT nCapWidth;
- const USHORT nOrgWidth;
+ const sal_uInt16 nCapWidth;
+ const sal_uInt16 nOrgWidth;
public:
virtual void Do();
- SwDoDrawStretchCapital( SwDrawTextInfo &rInfo, const USHORT nCapitalWidth )
+ SwDoDrawStretchCapital( SwDrawTextInfo &rInfo, const sal_uInt16 nCapitalWidth )
: SwDoDrawCapital( rInfo ),
nStrLen( rInfo.GetLen() ),
nCapWidth( nCapitalWidth ),
@@ -492,7 +492,7 @@ public:
void SwDoDrawStretchCapital::Do()
{
SV_STAT( nDrawStretchText );
- USHORT nPartWidth = USHORT(rInf.GetSize().Width());
+ sal_uInt16 nPartWidth = sal_uInt16(rInf.GetSize().Width());
if( rInf.GetLen() )
{
@@ -504,13 +504,13 @@ void SwDoDrawStretchCapital::Do()
nDiff /= (long) nStrLen;
nDiff += nPartWidth;
if( 0 < nDiff )
- nPartWidth = USHORT(nDiff);
+ nPartWidth = sal_uInt16(nDiff);
}
rInf.ApplyAutoColor();
Point aPos( rInf.GetPos() );
- const BOOL bSwitchL2R = rInf.GetFrm()->IsRightToLeft() &&
+ const sal_Bool bSwitchL2R = rInf.GetFrm()->IsRightToLeft() &&
! rInf.IsIgnoreFrmRTL();
if ( bSwitchL2R )
@@ -543,7 +543,7 @@ void SwSubFont::DrawStretchCapital( SwDrawTextInfo &rInf )
rInf.SetLen( rInf.GetText().Len() );
const Point& rOldPos = rInf.GetPos();
- const USHORT nCapWidth = (USHORT)( GetCapitalSize( rInf ).Width() );
+ const sal_uInt16 nCapWidth = (sal_uInt16)( GetCapitalSize( rInf ).Width() );
rInf.SetPos( rOldPos );
rInf.SetDrawSpace( GetUnderline() != UNDERLINE_NONE ||
@@ -569,7 +569,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
Size aPartSize;
long nKana = 0;
const XubString aTxt( CalcCaseMap( rDo.GetInf().GetText() ) );
- xub_StrLen nMaxPos = Min( USHORT(rDo.GetInf().GetText().Len()
+ xub_StrLen nMaxPos = Min( sal_uInt16(rDo.GetInf().GetText().Len()
- rDo.GetInf().GetIdx()), rDo.GetInf().GetLen() );
rDo.GetInf().SetLen( nMaxPos );
@@ -596,14 +596,14 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
SwFntObj *pSpaceFont = NULL;
const void *pMagic2 = NULL;
- USHORT nIndex2 = 0;
+ sal_uInt16 nIndex2 = 0;
SwSubFont aFont( *this );
Point aStartPos( rDo.GetInf().GetPos() );
- const BOOL bTextLines = aFont.GetUnderline() != UNDERLINE_NONE
+ const sal_Bool bTextLines = aFont.GetUnderline() != UNDERLINE_NONE
|| aFont.GetOverline() != UNDERLINE_NONE
|| aFont.GetStrikeout() != STRIKEOUT_NONE;
- const BOOL bWordWise = bTextLines && aFont.IsWordLineMode() &&
+ const sal_Bool bWordWise = bTextLines && aFont.IsWordLineMode() &&
rDo.GetInf().GetDrawSpace();
const long nTmpKern = rDo.GetInf().GetKern();
@@ -611,7 +611,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
{
if ( bWordWise )
{
- aFont.SetWordLineMode( FALSE );
+ aFont.SetWordLineMode( sal_False );
pSpaceFontAccess = new SwFntAccess( pMagic2, nIndex2, &aFont,
rDo.GetInf().GetShell() );
pSpaceFont = pSpaceFontAccess->Get();
@@ -633,7 +633,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
pBigFont = pLastFont;
// Hier entsteht der Kleinbuchstabenfont:
- aFont.SetProportion( BYTE( (aFont.GetPropr()*KAPITAELCHENPROP) / 100L) );
+ aFont.SetProportion( sal_uInt8( (aFont.GetPropr()*KAPITAELCHENPROP) / 100L) );
pMagic2 = NULL;
nIndex2 = 0;
SwFntAccess *pSmallFontAccess = new SwFntAccess( pMagic2, nIndex2, &aFont,
@@ -689,7 +689,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
rDo.GetInf().SetLen( nPos - nOldPos );
}
- rDo.GetInf().SetUpper( FALSE );
+ rDo.GetInf().SetUpper( sal_False );
rDo.GetInf().SetOut( *pOutSize );
aPartSize = pSmallFont->GetTextSize( rDo.GetInf() );
nKana += rDo.GetInf().GetKanaDiff();
@@ -715,7 +715,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
do
{
- rDo.GetInf().SetUpper( TRUE );
+ rDo.GetInf().SetUpper( sal_True );
pLastFont = pBigFont;
pLastFont->SetDevFont( rDo.GetInf().GetShell(), rDo.GetOut() );
xub_StrLen nTmp;
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index c4c78fd6d59d..70cd84706ca8 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -50,7 +50,7 @@ void DumpHints( const SwpHtStart &rHtStart,
#ifdef DBG_UTIL
aDbstream << "DumpHints:" << endl;
(aDbstream << "\tStarts:" ).WriteNumber(rHtStart.Count()) << endl;
- for( USHORT i = 0; i < rHtStart.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rHtStart.Count(); ++i )
{
const SwTxtAttr *pHt = rHtStart[i];
((((aDbstream << '\t').WriteNumber( i )<< " [").WriteNumber( pHt->Which() )
@@ -81,7 +81,7 @@ inline void DumpHints(const SwpHtStart &, const SwpHtEnd &) { }
* inline IsEqual()
*************************************************************************/
-inline BOOL IsEqual( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
+inline sal_Bool IsEqual( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
{
return (long)(&rHt1) == (long)(&rHt2);
}
@@ -97,7 +97,7 @@ inline BOOL IsEqual( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
// Sortierreihenfolge: Start, Ende (umgekehrt!), Which-Wert (umgekehrt!),
// als letztes die Adresse selbst
-static BOOL lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
+static sal_Bool lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
{
if ( *rHt1.GetStart() == *rHt2.GetStart() )
{
@@ -105,14 +105,14 @@ static BOOL lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
const xub_StrLen nHt2 = *rHt2.GetAnyEnd();
if ( nHt1 == nHt2 )
{
- const USHORT nWhich1 = rHt1.Which();
- const USHORT nWhich2 = rHt2.Which();
+ const sal_uInt16 nWhich1 = rHt1.Which();
+ const sal_uInt16 nWhich2 = rHt2.Which();
if ( nWhich1 == nWhich2 )
{
if ( RES_TXTATR_CHARFMT == nWhich1 )
{
- const USHORT nS1 = static_cast<const SwTxtCharFmt&>(rHt1).GetSortNumber();
- const USHORT nS2 = static_cast<const SwTxtCharFmt&>(rHt2).GetSortNumber();
+ const sal_uInt16 nS1 = static_cast<const SwTxtCharFmt&>(rHt1).GetSortNumber();
+ const sal_uInt16 nS2 = static_cast<const SwTxtCharFmt&>(rHt2).GetSortNumber();
ASSERT( nS1 != nS2, "AUTOSTYLES: lcl_IsLessStart trouble" )
if ( nS1 != nS2 ) // robust
return nS1 < nS2;
@@ -133,7 +133,7 @@ static BOOL lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
*************************************************************************/
// Zuerst nach Ende danach nach Ptr
-static BOOL lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
+static sal_Bool lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
{
const xub_StrLen nHt1 = *rHt1.GetAnyEnd();
const xub_StrLen nHt2 = *rHt2.GetAnyEnd();
@@ -141,14 +141,14 @@ static BOOL lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
{
if ( *rHt1.GetStart() == *rHt2.GetStart() )
{
- const USHORT nWhich1 = rHt1.Which();
- const USHORT nWhich2 = rHt2.Which();
+ const sal_uInt16 nWhich1 = rHt1.Which();
+ const sal_uInt16 nWhich2 = rHt2.Which();
if ( nWhich1 == nWhich2 )
{
if ( RES_TXTATR_CHARFMT == nWhich1 )
{
- const USHORT nS1 = static_cast<const SwTxtCharFmt&>(rHt1).GetSortNumber();
- const USHORT nS2 = static_cast<const SwTxtCharFmt&>(rHt2).GetSortNumber();
+ const sal_uInt16 nS1 = static_cast<const SwTxtCharFmt&>(rHt1).GetSortNumber();
+ const sal_uInt16 nS2 = static_cast<const SwTxtCharFmt&>(rHt2).GetSortNumber();
ASSERT( nS1 != nS2, "AUTOSTYLES: lcl_IsLessEnd trouble" )
if ( nS1 != nS2 ) // robust
return nS1 > nS2;
@@ -169,9 +169,9 @@ static BOOL lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
* SwpHtStart::Seek_Entry()
*************************************************************************/
-BOOL SwpHtStart::Seek_Entry( const SwTxtAttr *pElement, USHORT *pPos ) const
+sal_Bool SwpHtStart::Seek_Entry( const SwTxtAttr *pElement, sal_uInt16 *pPos ) const
{
- USHORT nOben = Count(), nMitte, nUnten = 0;
+ sal_uInt16 nOben = Count(), nMitte, nUnten = 0;
if( nOben > 0 )
{
nOben--;
@@ -182,7 +182,7 @@ BOOL SwpHtStart::Seek_Entry( const SwTxtAttr *pElement, USHORT *pPos ) const
if( IsEqual( *pMitte, *pElement ) )
{
*pPos = nMitte;
- return TRUE;
+ return sal_True;
}
else
if( lcl_IsLessStart( *pMitte, *pElement ) )
@@ -191,23 +191,23 @@ BOOL SwpHtStart::Seek_Entry( const SwTxtAttr *pElement, USHORT *pPos ) const
if( nMitte == 0 )
{
*pPos = nUnten;
- return FALSE;
+ return sal_False;
}
else
nOben = nMitte - 1;
}
}
*pPos = nUnten;
- return FALSE;
+ return sal_False;
}
/*************************************************************************
* SwpHtEnd::Seek_Entry()
*************************************************************************/
-BOOL SwpHtEnd::Seek_Entry( const SwTxtAttr *pElement, USHORT *pPos ) const
+sal_Bool SwpHtEnd::Seek_Entry( const SwTxtAttr *pElement, sal_uInt16 *pPos ) const
{
- USHORT nOben = Count(), nMitte, nUnten = 0;
+ sal_uInt16 nOben = Count(), nMitte, nUnten = 0;
if( nOben > 0 )
{
nOben--;
@@ -218,7 +218,7 @@ BOOL SwpHtEnd::Seek_Entry( const SwTxtAttr *pElement, USHORT *pPos ) const
if( IsEqual( *pMitte, *pElement ) )
{
*pPos = nMitte;
- return TRUE;
+ return sal_True;
}
else
if( lcl_IsLessEnd( *pMitte, *pElement ) )
@@ -227,14 +227,14 @@ BOOL SwpHtEnd::Seek_Entry( const SwTxtAttr *pElement, USHORT *pPos ) const
if( nMitte == 0 )
{
*pPos = nUnten;
- return FALSE;
+ return sal_False;
}
else
nOben = nMitte - 1;
}
}
*pPos = nUnten;
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -245,7 +245,7 @@ void SwpHintsArray::Insert( const SwTxtAttr *pHt )
{
Resort();
#ifdef DBG_UTIL
- USHORT nPos;
+ sal_uInt16 nPos;
ASSERT(!m_HintStarts.Seek_Entry( pHt, &nPos ),
"Insert: hint already in HtStart");
ASSERT(!m_HintEnds.Seek_Entry( pHt, &nPos ),
@@ -261,7 +261,7 @@ void SwpHintsArray::Insert( const SwTxtAttr *pHt )
#endif
}
-void SwpHintsArray::DeleteAtPos( const USHORT nPos )
+void SwpHintsArray::DeleteAtPos( const sal_uInt16 nPos )
{
// optimization: nPos is the position in the Starts array
const SwTxtAttr *pHt = m_HintStarts[ nPos ];
@@ -269,7 +269,7 @@ void SwpHintsArray::DeleteAtPos( const USHORT nPos )
Resort();
- USHORT nEndPos;
+ sal_uInt16 nEndPos;
m_HintEnds.Seek_Entry( pHt, &nEndPos );
m_HintEnds.Remove( nEndPos );
#ifdef DBG_UTIL
@@ -306,7 +306,7 @@ bool SwpHintsArray::Check() const
const SwTxtAttr *pLastStart = 0;
const SwTxtAttr *pLastEnd = 0;
- for( USHORT i = 0; i < Count(); ++i )
+ for( sal_uInt16 i = 0; i < Count(); ++i )
{
// --- Start-Kontrolle ---
@@ -358,7 +358,7 @@ bool SwpHintsArray::Check() const
CHECK_ERR( STRING_LEN != nIdx, "HintsCheck: no GetEndOf" );
// 7a) character attributes in array?
- USHORT nWhich = pHt->Which();
+ sal_uInt16 nWhich = pHt->Which();
CHECK_ERR( !isCHRATR(nWhich),
"HintsCheck: Character attribute in start array" );
@@ -390,7 +390,7 @@ bool SwpHintsArray::Check() const
// 9) nesting portion check
if (pHtThis->IsNesting())
{
- for ( USHORT j = 0; j < Count(); ++j )
+ for ( sal_uInt16 j = 0; j < Count(); ++j )
{
SwTxtAttr const * const pOther( m_HintStarts[j] );
if ( pOther->IsNesting() && (i != j) )
@@ -408,7 +408,7 @@ bool SwpHintsArray::Check() const
// 10) dummy char check (unfortunately cannot check SwTxtNode::m_Text)
if (pHtThis->HasDummyChar())
{
- for ( USHORT j = 0; j < i; ++j )
+ for ( sal_uInt16 j = 0; j < i; ++j )
{
SwTxtAttr const * const pOther( m_HintStarts[j] );
if (pOther->HasDummyChar())
@@ -438,7 +438,7 @@ bool SwpHintsArray::Resort()
{
bool bResort = false;
const SwTxtAttr *pLast = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < m_HintStarts.Count(); ++i )
{
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index d6a6dfb045ac..5fbeecb5f1d9 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -196,7 +196,7 @@ SwTxtNode *SwNodes::MakeTxtNode( const SwNodeIndex & rWhere,
{
if( pNd->StartOfSectionNode()->GetSectionNode()->GetSection().IsHiddenFlag())
{
- if( !GoPrevSection( &aTmp, TRUE, FALSE ) ||
+ if( !GoPrevSection( &aTmp, sal_True, sal_False ) ||
aTmp.GetNode().FindTableNode() !=
pNode->FindTableNode() )
return pNode; // schade, das wars
@@ -220,7 +220,7 @@ SwTxtNode *SwNodes::MakeTxtNode( const SwNodeIndex & rWhere,
return pNode;
break;
}
- } while( TRUE );
+ } while( sal_True );
}
// --------------------
@@ -283,7 +283,7 @@ SwTxtNode::~SwTxtNode()
SwpHints* pTmpHints = m_pSwpHints;
m_pSwpHints = 0;
- for( USHORT j = pTmpHints->Count(); j; )
+ for( sal_uInt16 j = pTmpHints->Count(); j; )
// erst muss das Attribut aus dem Array entfernt werden,
// denn sonst wuerde es sich selbst loeschen (Felder) !!!!
DestroyAttr( pTmpHints->GetTextHint( --j ) );
@@ -332,7 +332,7 @@ void lcl_ChangeFtnRef( SwTxtNode &rNode )
// of node <rNode> in order to invalidate position of its first content.
// Thus, in its <MakeAll()> it will checked its position relative to its reference.
SwFtnFrm* pFirstFtnOfNode = 0;
- for( USHORT j = pSwpHints->Count(); j; )
+ for( sal_uInt16 j = pSwpHints->Count(); j; )
{
pHt = pSwpHints->GetTextHint(--j);
if (RES_TXTATR_FTN == pHt->Which())
@@ -350,7 +350,7 @@ void lcl_ChangeFtnRef( SwTxtNode &rNode )
SwCntntNode *pNd = aIdx.GetNode().GetCntntNode();
if ( !pNd )
pNd = pFrm->GetAttrSet()->GetDoc()->
- GetNodes().GoNextSection( &aIdx, TRUE, FALSE );
+ GetNodes().GoNextSection( &aIdx, sal_True, sal_False );
if ( !pNd )
continue;
SwClientIter aIter( *pNd );
@@ -370,7 +370,7 @@ void lcl_ChangeFtnRef( SwTxtNode &rNode )
{
pFtn->SetRef( pFrm );
pFtn = pFtn->GetFollow();
- ((SwTxtFrm*)pFrm)->SetFtn( TRUE );
+ ((SwTxtFrm*)pFrm)->SetFtn( sal_True );
}
}
#ifdef DBG_UTIL
@@ -402,7 +402,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
const xub_StrLen nSplitPos = rPos.nContent.GetIndex();
const xub_StrLen nTxtLen = m_Text.Len();
SwTxtNode* const pNode =
- _MakeNewTxtNode( rPos.nNode, FALSE, nSplitPos==nTxtLen );
+ _MakeNewTxtNode( rPos.nNode, sal_False, nSplitPos==nTxtLen );
// the first paragraph gets the XmlId,
// _except_ if it is empty and the second is not empty
@@ -495,7 +495,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
// Attribute loeschen
if ( HasHints() )
{
- for ( USHORT j = m_pSwpHints->Count(); j; )
+ for ( sal_uInt16 j = m_pSwpHints->Count(); j; )
{
SwTxtAttr* const pHt = m_pSwpHints->GetTextHint( --j );
if ( RES_TXTATR_FLYCNT == pHt ->Which() )
@@ -537,7 +537,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
UnlockModify(); // Benachrichtigungen wieder freischalten
@@ -593,7 +593,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
// Attribute loeschen
if ( HasHints() )
{
- for ( USHORT j = m_pSwpHints->Count(); j; )
+ for ( sal_uInt16 j = m_pSwpHints->Count(); j; )
{
SwTxtAttr* const pHt = m_pSwpHints->GetTextHint( --j );
const xub_StrLen* const pEnd = pHt->GetEnd();
@@ -640,7 +640,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
//muesten. #56977# #55001# #56135#
const SfxPoolItem *pItem;
if( GetDepends() && SFX_ITEM_SET == pNode->GetSwAttrSet().
- GetItemState( RES_PAGEDESC, TRUE, &pItem ) )
+ GetItemState( RES_PAGEDESC, sal_True, &pItem ) )
{
pNode->Modify( (SfxPoolItem*)pItem, (SfxPoolItem*)pItem );
}
@@ -651,7 +651,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
void SwTxtNode::MoveTxtAttr_To_AttrSet()
{
ASSERT( m_pSwpHints, "MoveTxtAttr_To_AttrSet without SwpHints?" );
- for ( USHORT i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
+ for ( sal_uInt16 i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
{
SwTxtAttr *pHt = m_pSwpHints->GetTextHint(i);
@@ -757,7 +757,7 @@ SwCntntNode *SwTxtNode::JoinNext()
if( pTxtNode->HasAnyIndex() )
{
// alle Crsr/StkCrsr/UnoCrsr aus dem Loeschbereich verschieben
- pDoc->CorrAbs( aIdx, SwPosition( *this ), nOldLen, TRUE );
+ pDoc->CorrAbs( aIdx, SwPosition( *this ), nOldLen, sal_True );
}
rNds.Delete(aIdx);
SetWrong( pList, false );
@@ -766,7 +766,7 @@ SwCntntNode *SwTxtNode::JoinNext()
InvalidateNumRule();
}
else {
- ASSERT( FALSE, "kein TxtNode." );
+ ASSERT( sal_False, "kein TxtNode." );
}
return this;
@@ -852,7 +852,7 @@ SwCntntNode *SwTxtNode::JoinPrev()
if( pTxtNode->HasAnyIndex() )
{
// alle Crsr/StkCrsr/UnoCrsr aus dem Loeschbereich verschieben
- pDoc->CorrAbs( aIdx, SwPosition( *this ), nLen, TRUE );
+ pDoc->CorrAbs( aIdx, SwPosition( *this ), nLen, sal_True );
}
rNds.Delete(aIdx);
SetWrong( pList, false );
@@ -861,7 +861,7 @@ SwCntntNode *SwTxtNode::JoinPrev()
InvalidateNumRule();
}
else {
- ASSERT( FALSE, "kein TxtNode." );
+ ASSERT( sal_False, "kein TxtNode." );
}
return this;
@@ -894,7 +894,7 @@ void SwTxtNode::NewAttrSet( SwAttrPool& rPool )
void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
const bool bNegative, const bool bDelete )
{
- SetAutoCompleteWordDirty( TRUE );
+ SetAutoCompleteWordDirty( sal_True );
::std::auto_ptr<TmpHints> pCollector;
const xub_StrLen nChangePos = rPos.GetIndex();
@@ -904,7 +904,7 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
if ( bNegative )
{
const xub_StrLen nChangeEnd = nChangePos + nChangeLen;
- for ( USHORT n = 0; n < m_pSwpHints->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < m_pSwpHints->Count(); ++n )
{
SwTxtAttr * const pHint = m_pSwpHints->GetTextHint(n);
xub_StrLen * const pStart = pHint->GetStart();
@@ -943,13 +943,13 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
{
bool bNoExp = false;
bool bResort = false;
- const USHORT coArrSz = static_cast<USHORT>(RES_TXTATR_WITHEND_END) -
- static_cast<USHORT>(RES_CHRATR_BEGIN);
+ const sal_uInt16 coArrSz = static_cast<sal_uInt16>(RES_TXTATR_WITHEND_END) -
+ static_cast<sal_uInt16>(RES_CHRATR_BEGIN);
- BOOL aDontExp[ coArrSz ];
- memset( &aDontExp, 0, coArrSz * sizeof(BOOL) );
+ sal_Bool aDontExp[ coArrSz ];
+ memset( &aDontExp, 0, coArrSz * sizeof(sal_Bool) );
- for ( USHORT n = 0; n < m_pSwpHints->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < m_pSwpHints->Count(); ++n )
{
SwTxtAttr * const pHint = m_pSwpHints->GetTextHint(n);
xub_StrLen * const pStart = pHint->GetStart();
@@ -970,13 +970,13 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
}
else // *pEnd == nChangePos
{
- USHORT nWhPos;
- const USHORT nWhich = pHint->Which();
+ sal_uInt16 nWhPos;
+ const sal_uInt16 nWhich = pHint->Which();
ASSERT(!isCHRATR(nWhich), "Update: char attr hint?");
if (isCHRATR(nWhich) || isTXTATR_WITHEND(nWhich))
{
- nWhPos = static_cast<USHORT>(nWhich -
+ nWhPos = static_cast<sal_uInt16>(nWhich -
RES_CHRATR_BEGIN);
}
else
@@ -992,13 +992,13 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
if ( pHint->IsCharFmtAttr() )
{
bNoExp = true;
- aDontExp[ static_cast<USHORT>(RES_TXTATR_CHARFMT) - static_cast<USHORT>(RES_CHRATR_BEGIN) ]
- = TRUE;
- aDontExp[ static_cast<USHORT>(RES_TXTATR_INETFMT) - static_cast<USHORT>(RES_CHRATR_BEGIN) ]
- = TRUE;
+ aDontExp[ static_cast<sal_uInt16>(RES_TXTATR_CHARFMT) - static_cast<sal_uInt16>(RES_CHRATR_BEGIN) ]
+ = sal_True;
+ aDontExp[ static_cast<sal_uInt16>(RES_TXTATR_INETFMT) - static_cast<sal_uInt16>(RES_CHRATR_BEGIN) ]
+ = sal_True;
}
else
- aDontExp[ nWhPos ] = TRUE;
+ aDontExp[ nWhPos ] = sal_True;
}
else if( bNoExp )
{
@@ -1006,8 +1006,8 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
{
pCollector.reset( new TmpHints );
}
- USHORT nCollCnt = pCollector->Count();
- for( USHORT i = 0; i < nCollCnt; ++i )
+ sal_uInt16 nCollCnt = pCollector->Count();
+ for( sal_uInt16 i = 0; i < nCollCnt; ++i )
{
SwTxtAttr *pTmp = (*pCollector)[ i ];
if( nWhich == pTmp->Which() )
@@ -1041,7 +1041,7 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
if ( !bNegative && !bDelete )
{
const SwRedlineTbl& rTbl = GetDoc()->GetRedlineTbl();
- for ( USHORT i = 0; i < rTbl.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rTbl.Count(); ++i )
{
SwRedline *const pRedl = rTbl[ i ];
if ( pRedl->HasMark() )
@@ -1106,8 +1106,8 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
if ( pCollector.get() )
{
- const USHORT nCount = pCollector->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ const sal_uInt16 nCount = pCollector->Count();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
m_pSwpHints->TryInsertHint( (*pCollector)[ i ], *this );
}
@@ -1123,8 +1123,8 @@ void SwTxtNode::_ChgTxtCollUpdateNum( const SwTxtFmtColl *pOldColl,
ASSERT( pDoc, "Kein Doc?" );
// erfrage die OutlineLevel und update gegebenenfalls das Nodes-Array,
// falls sich die Level geaendert haben !
- //const BYTE nOldLevel = pOldColl ? pOldColl->GetOutlineLevel():NO_NUMBERING;//#outline level,removed by zhaojianwei
- //const BYTE nNewLevel = pNewColl ? pNewColl->GetOutlineLevel():NO_NUMBERING;//<-end,zhaojianwei
+ //const sal_uInt8 nOldLevel = pOldColl ? pOldColl->GetOutlineLevel():NO_NUMBERING;//#outline level,removed by zhaojianwei
+ //const sal_uInt8 nNewLevel = pNewColl ? pNewColl->GetOutlineLevel():NO_NUMBERING;//<-end,zhaojianwei
const int nOldLevel = pOldColl && pOldColl->IsAssignedToListLevelOfOutlineStyle() ?
pOldColl->GetAssignedOutlineStyleLevel() : MAXLEVEL;
const int nNewLevel = pNewColl && pNewColl->IsAssignedToListLevelOfOutlineStyle() ?
@@ -1166,8 +1166,8 @@ void SwTxtNode::_ChgTxtCollUpdateNum( const SwTxtFmtColl *pOldColl,
// Wenn man sich genau am Ende einer Text- bzw. INetvorlage befindet,
// bekommt diese das DontExpand-Flag verpasst
-BOOL SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag,
- BOOL bFmtToTxtAttributes )
+sal_Bool SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag,
+ sal_Bool bFmtToTxtAttributes )
{
const xub_StrLen nIdx = rIdx.GetIndex();
if ( bFmtToTxtAttributes && nIdx == m_Text.Len() )
@@ -1175,11 +1175,11 @@ BOOL SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag,
FmtToTxtAttr( this );
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( HasHints() )
{
- const USHORT nEndCnt = m_pSwpHints->GetEndCount();
- USHORT nPos = nEndCnt;
+ const sal_uInt16 nEndCnt = m_pSwpHints->GetEndCount();
+ sal_uInt16 nPos = nEndCnt;
while( nPos )
{
SwTxtAttr *pTmp = m_pSwpHints->GetEnd( --nPos );
@@ -1191,7 +1191,7 @@ BOOL SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag,
else if( bFlag != pTmp->DontExpand() && !pTmp->IsLockExpandFlag()
&& *pEnd > *pTmp->GetStart())
{
- bRet = TRUE;
+ bRet = sal_True;
m_pSwpHints->NoteInHistory( pTmp );
pTmp->SetDontExpand( bFlag );
}
@@ -1223,7 +1223,7 @@ lcl_GetTxtAttrs(
xub_StrLen const nIndex, RES_TXTATR const nWhich,
enum SwTxtNode::GetTxtAttrMode const eMode)
{
- USHORT const nSize = (pSwpHints) ? pSwpHints->Count() : 0;
+ sal_uInt16 const nSize = (pSwpHints) ? pSwpHints->Count() : 0;
xub_StrLen nPreviousIndex(0); // index of last hint with nWhich
bool (*pMatchFunc)(xub_StrLen const, xub_StrLen const, xub_StrLen const)=0;
switch (eMode)
@@ -1234,7 +1234,7 @@ lcl_GetTxtAttrs(
default: OSL_ASSERT(false);
}
- for( USHORT i = 0; i < nSize; ++i )
+ for( sal_uInt16 i = 0; i < nSize; ++i )
{
SwTxtAttr *const pHint = pSwpHints->GetTextHint(i);
xub_StrLen const nHintStart( *(pHint->GetStart()) );
@@ -1314,8 +1314,8 @@ SwCharFmt* lcl_FindCharFmt( const SwCharFmts* pCharFmts, const XubString& rName
if( rName.Len() )
{
SwCharFmt* pFmt;
- USHORT nArrLen = pCharFmts->Count();
- for( USHORT i = 1; i < nArrLen; i++ )
+ sal_uInt16 nArrLen = pCharFmts->Count();
+ for( sal_uInt16 i = 1; i < nArrLen; i++ )
{
pFmt = (*pCharFmts)[ i ];
if( pFmt->GetName().CompareTo( rName ) == COMPARE_EQUAL )
@@ -1325,7 +1325,7 @@ SwCharFmt* lcl_FindCharFmt( const SwCharFmts* pCharFmts, const XubString& rName
return NULL;
}
-void lcl_CopyHint( const USHORT nWhich, const SwTxtAttr * const pHt,
+void lcl_CopyHint( const sal_uInt16 nWhich, const SwTxtAttr * const pHt,
SwTxtAttr *const pNewHt, SwDoc *const pOtherDoc, SwTxtNode *const pDest )
{
ASSERT( nWhich == pHt->Which(), "Falsche Hint-Id" );
@@ -1464,7 +1464,7 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const xub_StrLen nTxtStartIdx,
SwDoc* const pOtherDoc = (pDest->GetDoc() != GetDoc()) ?
pDest->GetDoc() : 0;
- for ( USHORT i = 0; i < m_pSwpHints->Count(); i++ )
+ for ( sal_uInt16 i = 0; i < m_pSwpHints->Count(); i++ )
{
SwTxtAttr *const pHt = m_pSwpHints->GetTextHint(i);
xub_StrLen const nAttrStartIdx = *pHt->GetStart();
@@ -1478,7 +1478,7 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const xub_StrLen nTxtStartIdx,
( *pEndIdx == nTxtStartIdx &&
nAttrStartIdx == nTxtStartIdx ) ) )
{
- USHORT const nWhich = pHt->Which();
+ sal_uInt16 const nWhich = pHt->Which();
if ( RES_TXTATR_REFMARK != nWhich )
{
// attribute in the area => copy
@@ -1638,7 +1638,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
// 2. Attribute kopieren
// durch das Attribute-Array, bis der Anfang des Geltungsbereiches
// des Attributs hinter dem zu kopierenden Bereich liegt
- const USHORT nSize = m_pSwpHints ? m_pSwpHints->Count() : 0;
+ const sal_uInt16 nSize = m_pSwpHints ? m_pSwpHints->Count() : 0;
// wird in sich selbst kopiert, dann kann beim Einfuegen ein
// Attribut geloescht werden. Darum erst ins Tmp-Array kopieren und
@@ -1648,9 +1648,9 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
// Del-Array fuer alle RefMarks ohne Ausdehnung
SwpHts aRefMrkArr;
- USHORT nDeletedDummyChars(0);
+ sal_uInt16 nDeletedDummyChars(0);
//Achtung: kann ungueltig sein!!
- for (USHORT n = 0; ( n < nSize ); ++n)
+ for (sal_uInt16 n = 0; ( n < nSize ); ++n)
{
const xub_StrLen nAttrStartIdx = *(*m_pSwpHints)[n]->GetStart();
if (!( nAttrStartIdx < nEnd))
@@ -1658,7 +1658,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(n);
const xub_StrLen * const pEndIdx = pHt->GetEnd();
- const USHORT nWhich = pHt->Which();
+ const sal_uInt16 nWhich = pHt->Which();
// JP 26.04.94: REFMARK's werden nie kopiert. Hat das Refmark aber
// keinen Bereich umspannt, so steht im Text ein 255
@@ -1748,14 +1748,14 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
// nur falls im Array Attribute stehen (kann nur beim Kopieren
// sich selbst passieren!!)
- for ( USHORT i = 0; i < aArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aArr.Count(); ++i )
{
InsertHint( aArr[ i ], nsSetAttrMode::SETATTR_NOTXTATRCHR );
}
if( pDest->GetpSwpHints() )
{
- for ( USHORT i = 0; i < aRefMrkArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aRefMrkArr.Count(); ++i )
{
SwTxtAttr * const pNewHt = aRefMrkArr[i];
if( pNewHt->GetEnd() )
@@ -1779,7 +1779,7 @@ void SwTxtNode::InsertText( const XubString & rStr, const SwIndex & rIdx,
const IDocumentContentOperations::InsertFlags nMode )
{
ASSERT( rIdx <= m_Text.Len(), "SwTxtNode::InsertText: invalid index." );
- ASSERT( (ULONG)m_Text.Len() + (ULONG)rStr.Len() <= STRING_LEN,
+ ASSERT( (sal_uLong)m_Text.Len() + (sal_uLong)rStr.Len() <= STRING_LEN,
"SwTxtNode::InsertText: node text with insertion > STRING_LEN." );
xub_StrLen aPos = rIdx.GetIndex();
@@ -1789,10 +1789,10 @@ void SwTxtNode::InsertText( const XubString & rStr, const SwIndex & rIdx,
if ( !nLen ) return;
- BOOL bOldExpFlg = IsIgnoreDontExpand();
+ sal_Bool bOldExpFlg = IsIgnoreDontExpand();
if (nMode & IDocumentContentOperations::INS_FORCEHINTEXPAND)
{
- SetIgnoreDontExpand( TRUE );
+ SetIgnoreDontExpand( sal_True );
}
Update( rIdx, nLen ); // text content changed!
@@ -1804,11 +1804,11 @@ void SwTxtNode::InsertText( const XubString & rStr, const SwIndex & rIdx,
// analog zu Insert(char) in txtedt.cxx:
// 1) bei bHintExp leere Hints an rIdx.GetIndex suchen und aufspannen
- // 2) bei bHintExp == FALSE mitgezogene Feldattribute zuruecksetzen
+ // 2) bei bHintExp == sal_False mitgezogene Feldattribute zuruecksetzen
if ( HasHints() )
{
- for ( USHORT i = 0; i < m_pSwpHints->Count() &&
+ for ( sal_uInt16 i = 0; i < m_pSwpHints->Count() &&
rIdx >= *(*m_pSwpHints)[i]->GetStart(); ++i )
{
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint( i );
@@ -1834,7 +1834,7 @@ void SwTxtNode::InsertText( const XubString & rStr, const SwIndex & rIdx,
&& (*pEndIdx == *pHt->GetStart()) )
{
*pHt->GetStart() = *pHt->GetStart() - nLen;
- const USHORT nAktLen = m_pSwpHints->Count();
+ const sal_uInt16 nAktLen = m_pSwpHints->Count();
m_pSwpHints->DeleteAtPos(i);
InsertHint( pHt/* AUTOSTYLES:, nsSetAttrMode::SETATTR_NOHINTADJUST*/ );
if ( nAktLen > m_pSwpHints->Count() && i )
@@ -1952,7 +1952,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
// 2. Attribute verschieben
// durch das Attribute-Array, bis der Anfang des Geltungsbereiches
// des Attributs hinter dem zu verschiebenden Bereich liegt
- USHORT nAttrCnt = 0;
+ sal_uInt16 nAttrCnt = 0;
while ( m_pSwpHints && nAttrCnt < m_pSwpHints->Count() )
{
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(nAttrCnt);
@@ -1960,7 +1960,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
if (!( nAttrStartIdx < nEnd ))
break;
const xub_StrLen * const pEndIdx = pHt->GetEnd();
- const USHORT nWhich = pHt->Which();
+ const sal_uInt16 nWhich = pHt->Which();
SwTxtAttr *pNewHt = 0;
if(nAttrStartIdx < nTxtStartIdx)
@@ -2014,7 +2014,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
if( bUpdate )
{
// Update aller Indizies
- Update( rDestStart, nLen, FALSE, TRUE );
+ Update( rDestStart, nLen, sal_False, sal_True );
}
#ifdef CUTNOEXPAND
else
@@ -2023,7 +2023,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
{
// check if there was the end of an attribute at the insertion
// position: if it is not a field, it must be expanded
- for ( USHORT n = 0; n < m_pSwpHints->Count(); n++ )
+ for ( sal_uInt16 n = 0; n < m_pSwpHints->Count(); n++ )
{
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(n);
const xub_StrLen * const pEndIdx = pHt->GetEnd();
@@ -2036,7 +2036,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
#endif
CHECK_SWPHINTS(this);
- Update( rStart, nLen, TRUE, TRUE );
+ Update( rStart, nLen, sal_True, sal_True );
CHECK_SWPHINTS(this);
@@ -2050,7 +2050,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
nDestStart = nDestStart - nLen;
}
- for ( USHORT n = 0; n < aArr.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aArr.Count(); ++n )
{
SwTxtAttr *const pNewHt = aArr[n];
*pNewHt->GetStart() = nDestStart + *pNewHt->GetStart();
@@ -2073,7 +2073,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
if( bUpdate )
{
// Update aller Indizies
- pDest->Update( rDestStart, nLen, FALSE, TRUE);
+ pDest->Update( rDestStart, nLen, sal_False, sal_True);
}
#ifdef CUTNOEXPAND
else
@@ -2082,7 +2082,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
{
// check if there was the end of an attribute at the insertion
// position: if it is not a field, it must be expanded
- for ( USHORT n = 0; n < pDest->m_pSwpHints->Count(); n++ )
+ for ( sal_uInt16 n = 0; n < pDest->m_pSwpHints->Count(); n++ )
{
SwTxtAttr * const pHt = pDest->m_pSwpHints->GetTextHint(n);
const xub_StrLen * const pEndIdx = pHt->GetEnd();
@@ -2130,7 +2130,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
// 2. Attribute verschieben
// durch das Attribute-Array, bis der Anfang des Geltungsbereiches
// des Attributs hinter dem zu verschiebenden Bereich liegt
- USHORT nAttrCnt = 0;
+ sal_uInt16 nAttrCnt = 0;
while ( m_pSwpHints && (nAttrCnt < m_pSwpHints->Count()) )
{
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(nAttrCnt);
@@ -2138,7 +2138,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
if (!( nAttrStartIdx < nEnd ))
break;
const xub_StrLen * const pEndIdx = pHt->GetEnd();
- const USHORT nWhich = pHt->Which();
+ const sal_uInt16 nWhich = pHt->Which();
SwTxtAttr *pNewHt = 0;
// if the hint has a dummy character, then it must not be split!
@@ -2237,9 +2237,9 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
++nAttrCnt;
}
}
- Update( rStart, nLen, TRUE, TRUE );
+ Update( rStart, nLen, sal_True, sal_True );
- for ( USHORT n = 0; n < aArr.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aArr.Count(); ++n )
{
SwTxtAttr * const pHt = aArr[ n ];
*pHt->GetStart() = *pHt->GetEnd() = rStart.GetIndex();
@@ -2248,7 +2248,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
}
else
{
- Update( rStart, nLen, TRUE, TRUE );
+ Update( rStart, nLen, sal_True, sal_True );
}
CHECK_SWPHINTS(this);
@@ -2280,7 +2280,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
* die im Bereich liegen und nicht am Ende des Bereiches liegen
*/
- for ( USHORT i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
+ for ( sal_uInt16 i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
{
SwTxtAttr *pHt = m_pSwpHints->GetTextHint(i);
@@ -2293,7 +2293,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
break; // hints are sorted by end, so break here
const xub_StrLen* pHtEndIdx = pHt->GetEnd();
- const USHORT nWhich = pHt->Which();
+ const sal_uInt16 nWhich = pHt->Which();
if( !pHtEndIdx )
{
@@ -2350,7 +2350,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
TryDeleteSwpHints();
- Update( rIdx, nCnt, TRUE );
+ Update( rIdx, nCnt, sal_True );
if( 1 == nCnt )
{
@@ -2389,12 +2389,12 @@ void SwTxtNode::GCAttr()
return;
bool bChanged = false;
- USHORT nMin = m_Text.Len(),
+ sal_uInt16 nMin = m_Text.Len(),
nMax = 0;
- BOOL bAll = nMin != 0; // Bei leeren Absaetzen werden nur die
+ sal_Bool bAll = nMin != 0; // Bei leeren Absaetzen werden nur die
// INet-Formate entfernt.
- for ( USHORT i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
+ for ( sal_uInt16 i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
{
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(i);
@@ -2427,7 +2427,7 @@ void SwTxtNode::GCAttr()
}
// #i23726#
-SwNumRule* SwTxtNode::_GetNumRule(BOOL bInParent) const
+SwNumRule* SwTxtNode::_GetNumRule(sal_Bool bInParent) const
{
SwNumRule* pRet = 0;
@@ -2449,12 +2449,12 @@ SwNumRule* SwTxtNode::_GetNumRule(BOOL bInParent) const
if ( pRet && pRet == GetDoc()->GetOutlineNumRule() &&
( !HasSwAttrSet() ||
SFX_ITEM_SET !=
- GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, FALSE ) ) )
+ GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, sal_False ) ) )
{
SwTxtFmtColl* pColl = GetTxtColl();
if ( pColl )
{
- const SwNumRuleItem& rDirectItem = pColl->GetNumRule( FALSE );
+ const SwNumRuleItem& rDirectItem = pColl->GetNumRule( sal_False );
if ( rDirectItem.GetValue().Len() == 0 )
{
pRet = 0L;
@@ -2481,7 +2481,7 @@ SwNumRule* SwTxtNode::_GetNumRule(BOOL bInParent) const
// if ( HasSwAttrSet() ) // does text node has hard attributes ?
// {
// if ( SFX_ITEM_SET !=
-// GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem ) )
+// GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ) )
// {
// pItem = 0L;
// }
@@ -2510,7 +2510,7 @@ SwNumRule* SwTxtNode::_GetNumRule(BOOL bInParent) const
// if (pColl)
// {
-// const SwNumRuleItem & rItem = pColl->GetNumRule(TRUE);
+// const SwNumRuleItem & rItem = pColl->GetNumRule(sal_True);
// pRet = const_cast<SwDoc *>(GetDoc())->
// FindNumRulePtrWithPool(rItem.GetValue());
@@ -2522,7 +2522,7 @@ SwNumRule* SwTxtNode::_GetNumRule(BOOL bInParent) const
// // the outline numbering rule.
// if ( pRet && pRet == GetDoc()->GetOutlineNumRule() )
// {
-// const SwNumRuleItem& rDirectItem = pColl->GetNumRule(FALSE);
+// const SwNumRuleItem& rDirectItem = pColl->GetNumRule(sal_False);
// SwNumRule* pNumRuleAtParaStyle = const_cast<SwDoc*>(GetDoc())->
// FindNumRulePtrWithPool(rDirectItem.GetValue());
// if ( !pNumRuleAtParaStyle )
@@ -2543,7 +2543,7 @@ SwNumRule* SwTxtNode::_GetNumRule(BOOL bInParent) const
return pRet;
}
-SwNumRule* SwTxtNode::GetNumRule(BOOL bInParent) const
+SwNumRule* SwTxtNode::GetNumRule(sal_Bool bInParent) const
{
SwNumRule * pRet = _GetNumRule(bInParent);
@@ -2566,9 +2566,9 @@ void SwTxtNode::NumRuleChgd()
if( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
// Sending "noop" modify in order to cause invalidations of registered
// <SwTxtFrm> instances to get the list style change respectively the change
@@ -2581,13 +2581,13 @@ void SwTxtNode::NumRuleChgd()
}
// -> #i27615#
-BOOL SwTxtNode::IsNumbered() const
+sal_Bool SwTxtNode::IsNumbered() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if ( pRule && IsCountedInList() )
- bResult = TRUE;
+ bResult = sal_True;
return bResult;
}
@@ -2608,8 +2608,8 @@ bool SwTxtNode::HasMarkedLabel() const
// <--
// <- #i27615#
-SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, BOOL bNext,
- BOOL bChgFollow )
+SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, sal_Bool bNext,
+ sal_Bool bChgFollow )
{
/* hartes PageBreak/PageDesc/ColumnBreak aus AUTO-Set ignorieren */
SwAttrSet* pNewAttrSet = 0;
@@ -2625,38 +2625,38 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, BOOL bNext,
pTmpSet = pNewAttrSet;
// PageBreaks/PageDesc/ColBreak rausschmeissen.
- BOOL bRemoveFromCache = FALSE;
- std::vector<USHORT> aClearWhichIds;
+ sal_Bool bRemoveFromCache = sal_False;
+ std::vector<sal_uInt16> aClearWhichIds;
if ( bNext )
bRemoveFromCache = ( 0 != pNewAttrSet->ClearItem( RES_PAGEDESC ) );
else
aClearWhichIds.push_back( RES_PAGEDESC );
- if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_BREAK, FALSE ) )
+ if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_BREAK, sal_False ) )
{
if ( bNext )
pNewAttrSet->ClearItem( RES_BREAK );
else
aClearWhichIds.push_back( RES_BREAK );
- bRemoveFromCache = TRUE;
+ bRemoveFromCache = sal_True;
}
- if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_KEEP, FALSE ) )
+ if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_KEEP, sal_False ) )
{
if ( bNext )
pNewAttrSet->ClearItem( RES_KEEP );
else
aClearWhichIds.push_back( RES_KEEP );
- bRemoveFromCache = TRUE;
+ bRemoveFromCache = sal_True;
}
- if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_PARATR_SPLIT, FALSE ) )
+ if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_PARATR_SPLIT, sal_False ) )
{
if ( bNext )
pNewAttrSet->ClearItem( RES_PARATR_SPLIT );
else
aClearWhichIds.push_back( RES_PARATR_SPLIT );
- bRemoveFromCache = TRUE;
+ bRemoveFromCache = sal_True;
}
- if(SFX_ITEM_SET == pTmpSet->GetItemState(RES_PARATR_NUMRULE, FALSE))
+ if(SFX_ITEM_SET == pTmpSet->GetItemState(RES_PARATR_NUMRULE, sal_False))
{
SwNumRule * pRule = GetNumRule();
@@ -2673,7 +2673,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, BOOL bNext,
bClearHardSetNumRuleWhenFmtCollChanges = true;
// <--
}
- bRemoveFromCache = TRUE;
+ bRemoveFromCache = sal_True;
}
}
@@ -2683,7 +2683,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, BOOL bNext,
if( !bNext && bRemoveFromCache && IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
}
SwNodes& rNds = GetNodes();
@@ -2725,12 +2725,12 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, BOOL bNext,
// --> OD 2007-07-10 #i75353#
if ( bClearHardSetNumRuleWhenFmtCollChanges )
{
- std::vector<USHORT> aClearWhichIds;
+ std::vector<sal_uInt16> aClearWhichIds;
aClearWhichIds.push_back( RES_PARATR_NUMRULE );
if ( ClearItemsFromAttrSet( aClearWhichIds ) != 0 && IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
}
// <--
@@ -2745,7 +2745,7 @@ SwCntntNode* SwTxtNode::AppendNode( const SwPosition & rPos )
{
// Position hinter dem eingefuegt wird
SwNodeIndex aIdx( rPos.nNode, 1 );
- SwTxtNode* pNew = _MakeNewTxtNode( aIdx, TRUE );
+ SwTxtNode* pNew = _MakeNewTxtNode( aIdx, sal_True );
// --> OD 2008-05-14 #refactorlists#
// reset list attributes at appended text node
@@ -2780,7 +2780,7 @@ SwTxtAttr * SwTxtNode::GetTxtAttrForCharAt( const xub_StrLen nIndex,
{
if ( HasHints() )
{
- for ( USHORT i = 0; i < m_pSwpHints->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < m_pSwpHints->Count(); ++i )
{
SwTxtAttr * const pHint = m_pSwpHints->GetTextHint(i);
const xub_StrLen nStartPos = *pHint->GetStart();
@@ -2799,14 +2799,14 @@ SwTxtAttr * SwTxtNode::GetTxtAttrForCharAt( const xub_StrLen nIndex,
}
// -> #i29560#
-BOOL SwTxtNode::HasNumber() const
+sal_Bool SwTxtNode::HasNumber() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if ( pRule )
{
- SwNumFmt aFmt(pRule->Get( static_cast<USHORT>(GetActualListLevel())));
+ SwNumFmt aFmt(pRule->Get( static_cast<sal_uInt16>(GetActualListLevel())));
// #i40041#
bResult = aFmt.IsEnumeration() &&
@@ -2816,14 +2816,14 @@ BOOL SwTxtNode::HasNumber() const
return bResult;
}
-BOOL SwTxtNode::HasBullet() const
+sal_Bool SwTxtNode::HasBullet() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if ( pRule )
{
- SwNumFmt aFmt(pRule->Get( static_cast<USHORT>(GetActualListLevel())));
+ SwNumFmt aFmt(pRule->Get( static_cast<sal_uInt16>(GetActualListLevel())));
bResult = aFmt.IsItemize();
}
@@ -2846,14 +2846,14 @@ XubString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, cons
IsCountedInList() )
{
SvxNumberType const& rNumberType(
- pRule->Get( static_cast<USHORT>(GetActualListLevel()) ) );
+ pRule->Get( static_cast<sal_uInt16>(GetActualListLevel()) ) );
if (rNumberType.IsTxtFmt() ||
// #b6432095#
(style::NumberingType::NUMBER_NONE == rNumberType.GetNumberingType()))
{
return pRule->MakeNumString( GetNum()->GetNumberVector(),
- _bInclPrefixAndSuffixStrings ? TRUE : FALSE,
- FALSE,
+ _bInclPrefixAndSuffixStrings ? sal_True : sal_False,
+ sal_False,
_nRestrictToThisLevel );
}
}
@@ -2861,13 +2861,13 @@ XubString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, cons
return aEmptyStr;
}
-long SwTxtNode::GetLeftMarginWithNum( BOOL bTxtLeft ) const
+long SwTxtNode::GetLeftMarginWithNum( sal_Bool bTxtLeft ) const
{
long nRet = 0;
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if( pRule )
{
- const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(GetActualListLevel()));
+ const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(GetActualListLevel()));
// --> OD 2008-01-16 #newlistlevelattrs#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -2906,9 +2906,9 @@ long SwTxtNode::GetLeftMarginWithNum( BOOL bTxtLeft ) const
return nRet;
}
-BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
+sal_Bool SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
{
- BOOL bRet( FALSE );
+ sal_Bool bRet( sal_False );
// --> OD 2009-09-08 #i95907#, #b6879723#
rFLOffset = 0;
// <--
@@ -2920,10 +2920,10 @@ BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
if ( IsCountedInList() )
{
// --> OD 2008-01-16 #newlistlevelattrs#
- const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(GetActualListLevel()));
+ const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(GetActualListLevel()));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
- rFLOffset = pRule->Get( static_cast<USHORT>(GetActualListLevel() )).GetFirstLineOffset();
+ rFLOffset = pRule->Get( static_cast<sal_uInt16>(GetActualListLevel() )).GetFirstLineOffset();
if (!getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING))
{
@@ -2935,7 +2935,7 @@ BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
{
if ( AreListLevelIndentsApplicable() )
{
- rFLOffset = static_cast<USHORT>(rFmt.GetFirstLineIndent());
+ rFLOffset = static_cast<sal_uInt16>(rFmt.GetFirstLineIndent());
}
else if (!getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING))
{
@@ -2946,7 +2946,7 @@ BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
// <--
}
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -2964,7 +2964,7 @@ SwTwips SwTxtNode::GetAdditionalIndentForStartingNewList() const
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if ( pRule )
{
- const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(GetActualListLevel()));
+ const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(GetActualListLevel()));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nAdditionalIndent = GetSwAttrSet().GetLRSpace().GetLeft();
@@ -3009,7 +3009,7 @@ void SwTxtNode::ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpac
const SwNumRule* pRule = GetNumRule();
if ( pRule && GetActualListLevel() >= 0 )
{
- const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(GetActualListLevel()));
+ const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(GetActualListLevel()));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
SvxLRSpaceItem aLR( RES_LR_SPACE );
@@ -3029,7 +3029,7 @@ long SwTxtNode::GetLeftMarginForTabCalculation() const
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0;
if( pRule )
{
- const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(GetActualListLevel()));
+ const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(GetActualListLevel()));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
if ( AreListLevelIndentsApplicable() )
@@ -3049,7 +3049,7 @@ long SwTxtNode::GetLeftMarginForTabCalculation() const
// <--
void SwTxtNode::Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
- xub_StrLen nEndPos, BOOL bExpandFlds ) const
+ xub_StrLen nEndPos, sal_Bool bExpandFlds ) const
{
if( GetpSwpHints() )
{
@@ -3127,7 +3127,7 @@ XubString SwTxtNode::GetExpandTxt( const xub_StrLen nIdx,
{
XubString aTxt( GetTxt().Copy( nIdx, nLen ) );
xub_StrLen nTxtStt = nIdx;
- Replace0xFF( aTxt, nTxtStt, aTxt.Len(), TRUE );
+ Replace0xFF( aTxt, nTxtStt, aTxt.Len(), sal_True );
if( bWithNum )
{
XubString aListLabelStr = GetNumString();
@@ -3158,12 +3158,12 @@ XubString SwTxtNode::GetExpandTxt( const xub_StrLen nIdx,
}
// <--
-BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
- xub_StrLen nIdx, xub_StrLen nLen, BOOL bWithNum,
- BOOL bWithFtn, BOOL bReplaceTabsWithSpaces ) const
+sal_Bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
+ xub_StrLen nIdx, xub_StrLen nLen, sal_Bool bWithNum,
+ sal_Bool bWithFtn, sal_Bool bReplaceTabsWithSpaces ) const
{
if( &rDestNd == this )
- return FALSE;
+ return sal_False;
SwIndex aDestIdx( &rDestNd, rDestNd.GetTxt().Len() );
if( pDestIdx )
@@ -3177,7 +3177,7 @@ BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
// mask hidden characters
const xub_Unicode cChar = CH_TXTATR_BREAKWORD;
- USHORT nHiddenChrs =
+ sal_uInt16 nHiddenChrs =
SwScriptInfo::MaskHiddenRanges( *this, sTmpText, 0, sTmpText.Len(), cChar );
sTmpText = sTmpText.Copy( nIdx, nLen );
@@ -3188,11 +3188,11 @@ BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
if ( HasHints() )
{
xub_StrLen nInsPos = nDestStt - nIdx;
- for ( USHORT i = 0; i < m_pSwpHints->Count(); i++ )
+ for ( sal_uInt16 i = 0; i < m_pSwpHints->Count(); i++ )
{
const SwTxtAttr* pHt = (*m_pSwpHints)[i];
const xub_StrLen nAttrStartIdx = *pHt->GetStart();
- const USHORT nWhich = pHt->Which();
+ const sal_uInt16 nWhich = pHt->Which();
if (nIdx + nLen <= nAttrStartIdx)
break; // ueber das Textende
@@ -3299,7 +3299,7 @@ BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
}
}
- return TRUE;
+ return sal_True;
}
const ModelToViewHelper::ConversionMap*
@@ -3312,7 +3312,7 @@ const ModelToViewHelper::ConversionMap*
const SwpHints* pSwpHints2 = GetpSwpHints();
xub_StrLen nPos = 0;
- for ( USHORT i = 0; pSwpHints2 && i < pSwpHints2->Count(); ++i )
+ for ( sal_uInt16 i = 0; pSwpHints2 && i < pSwpHints2->Count(); ++i )
{
const SwTxtAttr* pAttr = (*pSwpHints2)[i];
if ( RES_TXTATR_FIELD == pAttr->Which() )
@@ -3343,15 +3343,15 @@ const ModelToViewHelper::ConversionMap*
}
XubString SwTxtNode::GetRedlineTxt( xub_StrLen nIdx, xub_StrLen nLen,
- BOOL bExpandFlds, BOOL bWithNum ) const
+ sal_Bool bExpandFlds, sal_Bool bWithNum ) const
{
SvUShorts aRedlArr;
const SwDoc* pDoc = GetDoc();
- USHORT nRedlPos = pDoc->GetRedlinePos( *this, nsRedlineType_t::REDLINE_DELETE );
+ sal_uInt16 nRedlPos = pDoc->GetRedlinePos( *this, nsRedlineType_t::REDLINE_DELETE );
if( USHRT_MAX != nRedlPos )
{
// es existiert fuer den Node irgendein Redline-Delete-Object
- const ULONG nNdIdx = GetIndex();
+ const sal_uLong nNdIdx = GetIndex();
for( ; nRedlPos < pDoc->GetRedlineTbl().Count() ; ++nRedlPos )
{
const SwRedline* pTmp = pDoc->GetRedlineTbl()[ nRedlPos ];
@@ -3390,7 +3390,7 @@ XubString SwTxtNode::GetRedlineTxt( xub_StrLen nIdx, xub_StrLen nLen,
XubString aTxt( GetTxt().Copy( nIdx, nLen ) );
xub_StrLen nTxtStt = nIdx, nIdxEnd = nIdx + aTxt.Len();
- for( USHORT n = 0; n < aRedlArr.Count(); n += 2 )
+ for( sal_uInt16 n = 0; n < aRedlArr.Count(); n += 2 )
{
xub_StrLen nStt = aRedlArr[ n ], nEnd = aRedlArr[ n+1 ];
if( ( nIdx <= nStt && nStt <= nIdxEnd ) ||
@@ -3446,8 +3446,8 @@ void SwTxtNode::ReplaceText( const SwIndex& rStart, const xub_StrLen nDelLen,
}
}
- BOOL bOldExpFlg = IsIgnoreDontExpand();
- SetIgnoreDontExpand( TRUE );
+ sal_Bool bOldExpFlg = IsIgnoreDontExpand();
+ SetIgnoreDontExpand( sal_True );
if( nLen && rText.Len() )
{
@@ -3495,7 +3495,7 @@ namespace {
const SfxPoolItem* pOldValue,
const SfxPoolItem* pNewValue )
{
- const USHORT nWhich = pOldValue ? pOldValue->Which() :
+ const sal_uInt16 nWhich = pOldValue ? pOldValue->Which() :
pNewValue ? pNewValue->Which() : 0 ;
bool bNumRuleSet = false;
bool bParagraphStyleChanged = false;
@@ -3545,7 +3545,7 @@ namespace {
// --> OD 2008-12-19 #i70748#
// The former list style set at the paragraph can not be
// retrieved from the change set.
-// if ( dynamic_cast<const SwAttrSetChg*>(pOldValue)->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem ) ==
+// if ( dynamic_cast<const SwAttrSetChg*>(pOldValue)->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ) ==
// SFX_ITEM_SET )
// {
// sOldNumRule = dynamic_cast<const SwNumRuleItem*>(pItem)->GetValue();
@@ -3557,7 +3557,7 @@ namespace {
sOldNumRule = pFormerNumRuleAtTxtNode->GetName();
}
// <--
- if ( dynamic_cast<const SwAttrSetChg*>(pNewValue)->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem ) ==
+ if ( dynamic_cast<const SwAttrSetChg*>(pNewValue)->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ) ==
SFX_ITEM_SET )
{
// --> OD 2008-11-19 #i70748#
@@ -3685,7 +3685,7 @@ namespace {
false );
// <--
// --> OD 2008-11-19 #i70748#
- if ( dynamic_cast<const SfxUInt16Item &>(rTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, FALSE )).GetValue() > 0 )
+ if ( dynamic_cast<const SfxUInt16Item &>(rTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, sal_False )).GetValue() > 0 )
{
rTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr();
}
@@ -3851,7 +3851,7 @@ void SwTxtNode::SetAttrOutlineLevel(int nLevel)
if ( 0 <= nLevel && nLevel <= MAXLEVEL )
{
SetAttr( SfxUInt16Item( RES_PARATR_OUTLINELEVEL,
- static_cast<UINT16>(nLevel) ) );
+ static_cast<sal_uInt16>(nLevel) ) );
}
}
//<-end
@@ -3893,7 +3893,7 @@ void SwTxtNode::SetAttrListLevel( int nLevel )
}
SfxInt16Item aNewListLevelItem( RES_PARATR_LIST_LEVEL,
- static_cast<INT16>(nLevel) );
+ static_cast<sal_Int16>(nLevel) );
SetAttr( aNewListLevelItem );
}
// <--
@@ -3901,7 +3901,7 @@ void SwTxtNode::SetAttrListLevel( int nLevel )
bool SwTxtNode::HasAttrListLevel() const
{
return GetpSwAttrSet() &&
- GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_LEVEL, FALSE ) == SFX_ITEM_SET;
+ GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_LEVEL, sal_False ) == SFX_ITEM_SET;
}
// <--
// --> OD 2008-02-27 #refactorlists#
@@ -3935,7 +3935,7 @@ void SwTxtNode::SetListRestart( bool bRestart )
else
{
SfxBoolItem aNewIsRestartItem( RES_PARATR_LIST_ISRESTART,
- TRUE );
+ sal_True );
SetAttr( aNewIsRestartItem );
}
}
@@ -3966,7 +3966,7 @@ bool SwTxtNode::HasVisibleNumberingOrBullet() const
// --> OD 2008-03-19 #i87154#
// Correction of #newlistlevelattrs#:
// The numbering type has to be checked for bullet lists.
- const SwNumFmt& rFmt = pRule->Get( static_cast<USHORT>(GetActualListLevel() ));
+ const SwNumFmt& rFmt = pRule->Get( static_cast<sal_uInt16>(GetActualListLevel() ));
if ( SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType() ||
pRule->MakeNumString( *(GetNum()) ).Len() > 0 )
{
@@ -3995,7 +3995,7 @@ void SwTxtNode::SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNumber
else
{
SfxInt16Item aNewListRestartValueItem( RES_PARATR_LIST_RESTARTVALUE,
- static_cast<INT16>(nNumber) );
+ static_cast<sal_Int16>(nNumber) );
SetAttr( aNewListRestartValueItem );
}
}
@@ -4006,7 +4006,7 @@ void SwTxtNode::SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNumber
bool SwTxtNode::HasAttrListRestartValue() const
{
return GetpSwAttrSet() &&
- GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_RESTARTVALUE, FALSE ) == SFX_ITEM_SET;
+ GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_RESTARTVALUE, sal_False ) == SFX_ITEM_SET;
}
// <--
SwNumberTree::tSwNumTreeNumber SwTxtNode::GetAttrListRestartValue() const
@@ -4035,7 +4035,7 @@ SwNumberTree::tSwNumTreeNumber SwTxtNode::GetActualListStartValue() const
if ( pRule )
{
const SwNumFmt* pFmt =
- pRule->GetNumFmt( static_cast<USHORT>(GetAttrListLevel()) );
+ pRule->GetNumFmt( static_cast<sal_uInt16>(GetAttrListLevel()) );
if ( pFmt )
{
nListRestartValue = pFmt->GetStart();
@@ -4074,7 +4074,7 @@ void SwTxtNode::SetCountedInList( bool bCounted )
}
else
{
- SfxBoolItem aIsCountedInListItem( RES_PARATR_LIST_ISCOUNTED, FALSE );
+ SfxBoolItem aIsCountedInListItem( RES_PARATR_LIST_ISCOUNTED, sal_False );
SetAttr( aIsCountedInListItem );
}
}
@@ -4226,13 +4226,13 @@ bool SwTxtNode::AreListLevelIndentsApplicable() const
bAreListLevelIndentsApplicable = false;
}
else if ( HasSwAttrSet() &&
- GetpSwAttrSet()->GetItemState( RES_LR_SPACE, FALSE ) == SFX_ITEM_SET )
+ GetpSwAttrSet()->GetItemState( RES_LR_SPACE, sal_False ) == SFX_ITEM_SET )
{
// paragraph has hard-set indent attributes
bAreListLevelIndentsApplicable = false;
}
else if ( HasSwAttrSet() &&
- GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET )
+ GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET )
{
// list style is directly applied to paragraph and paragraph has no
// hard-set indent attributes
@@ -4247,14 +4247,14 @@ bool SwTxtNode::AreListLevelIndentsApplicable() const
const SwTxtFmtColl* pColl = GetTxtColl();
while ( pColl )
{
- if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, FALSE ) == SFX_ITEM_SET )
+ if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, sal_False ) == SFX_ITEM_SET )
{
// indent attributes found in the paragraph style hierarchy.
bAreListLevelIndentsApplicable = false;
break;
}
- if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET )
+ if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET )
{
// paragraph style with the list style found and until now no
// indent attributes are found in the paragraph style hierarchy.
@@ -4290,7 +4290,7 @@ bool SwTxtNode::GetListTabStopPosition( long& nListTabStopPosition ) const
const SwNumRule* pNumRule = GetNum() ? GetNum()->GetNumRule() : 0;
if ( pNumRule && HasVisibleNumberingOrBullet() && GetActualListLevel() >= 0 )
{
- const SwNumFmt& rFmt = pNumRule->Get( static_cast<USHORT>(GetActualListLevel()) );
+ const SwNumFmt& rFmt = pNumRule->Get( static_cast<sal_uInt16>(GetActualListLevel()) );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT &&
rFmt.GetLabelFollowedBy() == SvxNumberFormat::LISTTAB )
{
@@ -4333,7 +4333,7 @@ XubString SwTxtNode::GetLabelFollowedBy() const
const SwNumRule* pNumRule = GetNum() ? GetNum()->GetNumRule() : 0;
if ( pNumRule && HasVisibleNumberingOrBullet() && GetActualListLevel() >= 0 )
{
- const SwNumFmt& rFmt = pNumRule->Get( static_cast<USHORT>(GetActualListLevel()) );
+ const SwNumFmt& rFmt = pNumRule->Get( static_cast<sal_uInt16>(GetActualListLevel()) );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
switch ( rFmt.GetLabelFollowedBy() )
@@ -4506,7 +4506,7 @@ namespace {
const SfxBoolItem& aListIsRestartItem =
dynamic_cast<const SfxBoolItem&>(pItem);
if ( aListIsRestartItem.GetValue() !=
- (mrTxtNode.IsListRestart() ? TRUE : FALSE) )
+ (mrTxtNode.IsListRestart() ? sal_True : sal_False) )
{
mbUpdateListRestart = true;
}
@@ -4532,7 +4532,7 @@ namespace {
const SfxBoolItem& aIsCountedInListItem =
dynamic_cast<const SfxBoolItem&>(pItem);
if ( aIsCountedInListItem.GetValue() !=
- (mrTxtNode.IsCountedInList() ? TRUE : FALSE) )
+ (mrTxtNode.IsCountedInList() ? sal_True : sal_False) )
{
mbUpdateListCount = true;
}
@@ -4569,7 +4569,7 @@ namespace {
{
const SfxPoolItem* pItem = 0;
// handle RES_PARATR_NUMRULE
- if ( rItemSet.GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ) == SFX_ITEM_SET )
{
mrTxtNode.RemoveFromList();
@@ -4585,7 +4585,7 @@ namespace {
}
// handle RES_PARATR_LIST_ID
- if ( rItemSet.GetItemState( RES_PARATR_LIST_ID, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_ID, sal_False, &pItem ) == SFX_ITEM_SET )
{
const SfxStringItem* pListIdItem =
dynamic_cast<const SfxStringItem*>(pItem);
@@ -4602,7 +4602,7 @@ namespace {
}
// handle RES_PARATR_LIST_LEVEL
- if ( rItemSet.GetItemState( RES_PARATR_LIST_LEVEL, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_LEVEL, sal_False, &pItem ) == SFX_ITEM_SET )
{
const SfxInt16Item* pListLevelItem =
dynamic_cast<const SfxInt16Item*>(pItem);
@@ -4613,19 +4613,19 @@ namespace {
}
// handle RES_PARATR_LIST_ISRESTART
- if ( rItemSet.GetItemState( RES_PARATR_LIST_ISRESTART, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_ISRESTART, sal_False, &pItem ) == SFX_ITEM_SET )
{
const SfxBoolItem* pListIsRestartItem =
dynamic_cast<const SfxBoolItem*>(pItem);
if ( pListIsRestartItem->GetValue() !=
- (mrTxtNode.IsListRestart() ? TRUE : FALSE) )
+ (mrTxtNode.IsListRestart() ? sal_True : sal_False) )
{
mbUpdateListRestart = true;
}
}
// handle RES_PARATR_LIST_RESTARTVALUE
- if ( rItemSet.GetItemState( RES_PARATR_LIST_RESTARTVALUE, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_RESTARTVALUE, sal_False, &pItem ) == SFX_ITEM_SET )
{
const SfxInt16Item* pListRestartValueItem =
dynamic_cast<const SfxInt16Item*>(pItem);
@@ -4637,12 +4637,12 @@ namespace {
}
// handle RES_PARATR_LIST_ISCOUNTED
- if ( rItemSet.GetItemState( RES_PARATR_LIST_ISCOUNTED, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_ISCOUNTED, sal_False, &pItem ) == SFX_ITEM_SET )
{
const SfxBoolItem* pIsCountedInListItem =
dynamic_cast<const SfxBoolItem*>(pItem);
if ( pIsCountedInListItem->GetValue() !=
- (mrTxtNode.IsCountedInList() ? TRUE : FALSE) )
+ (mrTxtNode.IsCountedInList() ? sal_True : sal_False) )
{
mbUpdateListCount = true;
}
@@ -4650,7 +4650,7 @@ namespace {
// --> OD 2008-11-19 #i70748#
// handle RES_PARATR_OUTLINELEVEL
- if ( rItemSet.GetItemState( RES_PARATR_OUTLINELEVEL, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_OUTLINELEVEL, sal_False, &pItem ) == SFX_ITEM_SET )
{
const SfxUInt16Item* pOutlineLevelItem =
dynamic_cast<const SfxUInt16Item*>(pItem);
@@ -4704,7 +4704,7 @@ namespace {
{
const SfxPoolItem* pItem = 0;
if ( mrTxtNode.GetSwAttrSet().GetItemState( RES_PARATR_NUMRULE,
- TRUE, &pItem )
+ sal_True, &pItem )
!= SFX_ITEM_SET )
{
mrTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr();
@@ -4716,28 +4716,28 @@ namespace {
// End of class <HandleSetAttrAtTxtNode>
}
-BOOL SwTxtNode::SetAttr( const SfxPoolItem& pItem )
+sal_Bool SwTxtNode::SetAttr( const SfxPoolItem& pItem )
{
const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr );
mbInSetOrResetAttr = true;
HandleSetAttrAtTxtNode aHandleSetAttr( *this, pItem );
- BOOL bRet = SwCntntNode::SetAttr( pItem );
+ sal_Bool bRet = SwCntntNode::SetAttr( pItem );
mbInSetOrResetAttr = bOldIsSetOrResetAttr;
return bRet;
}
-BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet )
+sal_Bool SwTxtNode::SetAttr( const SfxItemSet& rSet )
{
const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr );
mbInSetOrResetAttr = true;
HandleSetAttrAtTxtNode aHandleSetAttr( *this, rSet );
- BOOL bRet = SwCntntNode::SetAttr( rSet );
+ sal_Bool bRet = SwCntntNode::SetAttr( rSet );
mbInSetOrResetAttr = bOldIsSetOrResetAttr;
@@ -4765,8 +4765,8 @@ namespace {
{
public:
HandleResetAttrAtTxtNode( SwTxtNode& rTxtNode,
- const USHORT nWhich1,
- const USHORT nWhich2 );
+ const sal_uInt16 nWhich1,
+ const sal_uInt16 nWhich2 );
HandleResetAttrAtTxtNode( SwTxtNode& rTxtNode,
const SvUShorts& rWhichArr );
HandleResetAttrAtTxtNode( SwTxtNode& rTxtNode );
@@ -4782,8 +4782,8 @@ namespace {
};
HandleResetAttrAtTxtNode::HandleResetAttrAtTxtNode( SwTxtNode& rTxtNode,
- const USHORT nWhich1,
- const USHORT nWhich2 )
+ const sal_uInt16 nWhich1,
+ const sal_uInt16 nWhich2 )
: mrTxtNode( rTxtNode ),
mbListStyleOrIdReset( false ),
mbUpdateListLevel( false ),
@@ -4802,7 +4802,7 @@ namespace {
else if ( nWhich1 <= RES_PARATR_LIST_ID && RES_PARATR_LIST_ID <= nWhich2 )
{
bRemoveFromList = mrTxtNode.GetpSwAttrSet() &&
- mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, FALSE ) == SFX_ITEM_SET;
+ mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, sal_False ) == SFX_ITEM_SET;
// --> OD 2008-10-20 #i92898#
mbListStyleOrIdReset = true;
// <--
@@ -4847,7 +4847,7 @@ namespace {
else if ( nWhich1 == RES_PARATR_LIST_ID )
{
bRemoveFromList = mrTxtNode.GetpSwAttrSet() &&
- mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, FALSE ) == SFX_ITEM_SET;
+ mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, sal_False ) == SFX_ITEM_SET;
// --> OD 2008-10-20 #i92898#
mbListStyleOrIdReset = true;
// <--
@@ -4894,8 +4894,8 @@ namespace {
{
bool bRemoveFromList( false );
{
- const USHORT nEnd = rWhichArr.Count();
- for ( USHORT n = 0; n < nEnd; ++n )
+ const sal_uInt16 nEnd = rWhichArr.Count();
+ for ( sal_uInt16 n = 0; n < nEnd; ++n )
{
// RES_PARATR_NUMRULE and RES_PARATR_LIST_ID
if ( rWhichArr[ n ] == RES_PARATR_NUMRULE )
@@ -4908,7 +4908,7 @@ namespace {
{
bRemoveFromList = bRemoveFromList ||
( mrTxtNode.GetpSwAttrSet() &&
- mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, FALSE ) == SFX_ITEM_SET );
+ mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, sal_False ) == SFX_ITEM_SET );
// --> OD 2008-10-20 #i92898#
mbListStyleOrIdReset = true;
// <--
@@ -4995,7 +4995,7 @@ namespace {
// --> OD 2008-11-19 #i70748#
// --> OD 2010-05-12 #i105562#
else if ( mrTxtNode.GetpSwAttrSet() &&
- dynamic_cast<const SfxUInt16Item &>(mrTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, FALSE )).GetValue() > 0 )
+ dynamic_cast<const SfxUInt16Item &>(mrTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, sal_False )).GetValue() > 0 )
{
mrTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr();
}
@@ -5027,42 +5027,42 @@ namespace {
// End of class <HandleResetAttrAtTxtNode>
}
-BOOL SwTxtNode::ResetAttr( USHORT nWhich1, USHORT nWhich2 )
+sal_Bool SwTxtNode::ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
{
const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr );
mbInSetOrResetAttr = true;
HandleResetAttrAtTxtNode aHandleResetAttr( *this, nWhich1, nWhich2 );
- BOOL bRet = SwCntntNode::ResetAttr( nWhich1, nWhich2 );
+ sal_Bool bRet = SwCntntNode::ResetAttr( nWhich1, nWhich2 );
mbInSetOrResetAttr = bOldIsSetOrResetAttr;
return bRet;
}
-BOOL SwTxtNode::ResetAttr( const SvUShorts& rWhichArr )
+sal_Bool SwTxtNode::ResetAttr( const SvUShorts& rWhichArr )
{
const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr );
mbInSetOrResetAttr = true;
HandleResetAttrAtTxtNode aHandleResetAttr( *this, rWhichArr );
- BOOL bRet = SwCntntNode::ResetAttr( rWhichArr );
+ sal_Bool bRet = SwCntntNode::ResetAttr( rWhichArr );
mbInSetOrResetAttr = bOldIsSetOrResetAttr;
return bRet;
}
-USHORT SwTxtNode::ResetAllAttr()
+sal_uInt16 SwTxtNode::ResetAllAttr()
{
const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr );
mbInSetOrResetAttr = true;
HandleResetAttrAtTxtNode aHandleResetAttr( *this );
- USHORT nRet = SwCntntNode::ResetAllAttr();
+ sal_uInt16 nRet = SwCntntNode::ResetAllAttr();
mbInSetOrResetAttr = bOldIsSetOrResetAttr;
diff --git a/sw/source/core/txtnode/swfntcch.cxx b/sw/source/core/txtnode/swfntcch.cxx
index 202e6d48f763..9c294ac03936 100644
--- a/sw/source/core/txtnode/swfntcch.cxx
+++ b/sw/source/core/txtnode/swfntcch.cxx
@@ -35,7 +35,7 @@
#include "swfont.hxx"
// aus atrstck.cxx
-extern const BYTE StackPos[];
+extern const sal_uInt8 StackPos[];
// globale Variablen, werden in SwFntCch.Hxx bekanntgegeben
// Der FontCache wird in TxtInit.Cxx _TXTINIT erzeugt und in _TXTEXIT geloescht
@@ -56,8 +56,8 @@ SwFontObj::SwFontObj( const void *pOwn, ViewShell *pSh ) :
{
aSwFont.GoMagic( pSh, aSwFont.GetActual() );
const SwAttrSet& rAttrSet = ((SwTxtFmtColl *)pOwn)->GetAttrSet();
- for (USHORT i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
- pDefaultArray[ StackPos[ i ] ] = &rAttrSet.Get( i, TRUE );
+ for (sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
+ pDefaultArray[ StackPos[ i ] ] = &rAttrSet.Get( i, sal_True );
}
SwFontObj::~SwFontObj()
@@ -87,7 +87,7 @@ SwFontObj *SwFontAccess::Get( )
SwCacheObj *SwFontAccess::NewObj( )
{
- ((SwTxtFmtColl*)pOwner)->SetInSwFntCache( TRUE );
+ ((SwTxtFmtColl*)pOwner)->SetInSwFntCache( sal_True );
return new SwFontObj( pOwner, pShell );
}
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 02c21242a220..24f5c097f7d4 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -100,12 +100,12 @@ void SwFont::SetBackColor( Color* pNewColor )
{
delete pBackColor;
pBackColor = pNewColor;
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
}
// maps directions for vertical layout
-USHORT MapDirection( USHORT nDir, const BOOL bVertFormat )
+sal_uInt16 MapDirection( sal_uInt16 nDir, const sal_Bool bVertFormat )
{
if ( bVertFormat )
{
@@ -132,7 +132,7 @@ USHORT MapDirection( USHORT nDir, const BOOL bVertFormat )
// maps the absolute direction set at the font to its logical conterpart
// in the rotated environment
-USHORT UnMapDirection( USHORT nDir, const BOOL bVertFormat )
+sal_uInt16 UnMapDirection( sal_uInt16 nDir, const sal_Bool bVertFormat )
{
if ( bVertFormat )
{
@@ -157,19 +157,19 @@ USHORT UnMapDirection( USHORT nDir, const BOOL bVertFormat )
return nDir;
}
-USHORT SwFont::GetOrientation( const BOOL bVertFormat ) const
+sal_uInt16 SwFont::GetOrientation( const sal_Bool bVertFormat ) const
{
return UnMapDirection( aSub[nActual].GetOrientation(), bVertFormat );
}
-void SwFont::SetVertical( USHORT nDir, const BOOL bVertFormat )
+void SwFont::SetVertical( sal_uInt16 nDir, const sal_Bool bVertFormat )
{
// map direction if frame has vertical layout
nDir = MapDirection( nDir, bVertFormat );
if( nDir != aSub[0].GetOrientation() )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetVertical( nDir, bVertFormat );
aSub[1].SetVertical( nDir, bVertFormat || nDir > 1000 );
aSub[2].SetVertical( nDir, bVertFormat );
@@ -205,11 +205,11 @@ void SwFont::SetVertical( USHORT nDir, const BOOL bVertFormat )
*************************************************************************/
/*************************************************************************
- * SwSubFont::CalcEscAscent( const USHORT nOldAscent )
+ * SwSubFont::CalcEscAscent( const sal_uInt16 nOldAscent )
*************************************************************************/
// nEsc ist der Prozentwert
-USHORT SwSubFont::CalcEscAscent( const USHORT nOldAscent ) const
+sal_uInt16 SwSubFont::CalcEscAscent( const sal_uInt16 nOldAscent ) const
{
if( DFLT_ESC_AUTO_SUPER != GetEscapement() &&
DFLT_ESC_AUTO_SUB != GetEscapement() )
@@ -217,7 +217,7 @@ USHORT SwSubFont::CalcEscAscent( const USHORT nOldAscent ) const
const long nAscent = nOldAscent +
( (long) nOrgHeight * GetEscapement() ) / 100L;
if ( nAscent>0 )
- return ( Max( USHORT (nAscent), nOrgAscent ));
+ return ( Max( sal_uInt16 (nAscent), nOrgAscent ));
}
return nOrgAscent;
}
@@ -236,7 +236,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_FONT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
const SvxFontItem *pFont = (const SvxFontItem *)pItem;
aSub[SW_LATIN].SetFamily( pFont->GetFamily() );
@@ -246,7 +246,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_LATIN].Font::SetCharSet( pFont->GetCharSet() );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_FONTSIZE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
const SvxFontHeightItem *pHeight = (const SvxFontHeightItem *)pItem;
aSub[SW_LATIN].SvxFont::SetPropr( 100 );
@@ -256,17 +256,17 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_LATIN].SetSize( aTmpSize );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_POSTURE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_LATIN].Font::SetItalic( ((SvxPostureItem*)pItem)->GetPosture() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_WEIGHT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_LATIN].Font::SetWeight( ((SvxWeightItem*)pItem)->GetWeight() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_LANGUAGE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_LATIN].SetLanguage( ((SvxLanguageItem*)pItem)->GetLanguage() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
const SvxFontItem *pFont = (const SvxFontItem *)pItem;
aSub[SW_CJK].SetFamily( pFont->GetFamily() );
@@ -276,7 +276,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_CJK].Font::SetCharSet( pFont->GetCharSet() );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONTSIZE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
const SvxFontHeightItem *pHeight = (const SvxFontHeightItem *)pItem;
aSub[SW_CJK].SvxFont::SetPropr( 100 );
@@ -286,13 +286,13 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_CJK].SetSize( aTmpSize );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_POSTURE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_CJK].Font::SetItalic( ((SvxPostureItem*)pItem)->GetPosture() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_WEIGHT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_CJK].Font::SetWeight( ((SvxWeightItem*)pItem)->GetWeight() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_LANGUAGE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
LanguageType eNewLang = ((SvxLanguageItem*)pItem)->GetLanguage();
aSub[SW_CJK].SetLanguage( eNewLang );
@@ -302,7 +302,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
const SvxFontItem *pFont = (const SvxFontItem *)pItem;
aSub[SW_CTL].SetFamily( pFont->GetFamily() );
@@ -312,7 +312,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_CTL].Font::SetCharSet( pFont->GetCharSet() );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONTSIZE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
const SvxFontHeightItem *pHeight = (const SvxFontHeightItem *)pItem;
aSub[SW_CTL].SvxFont::SetPropr( 100 );
@@ -322,53 +322,53 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_CTL].SetSize( aTmpSize );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_POSTURE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_CTL].Font::SetItalic( ((SvxPostureItem*)pItem)->GetPosture() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_WEIGHT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_CTL].Font::SetWeight( ((SvxWeightItem*)pItem)->GetWeight() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_LANGUAGE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_CTL].SetLanguage( ((SvxLanguageItem*)pItem)->GetLanguage() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_UNDERLINE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
SetUnderline( ((SvxUnderlineItem*)pItem)->GetLineStyle() );
SetUnderColor( ((SvxUnderlineItem*)pItem)->GetColor() );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_OVERLINE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
SetOverline( ((SvxOverlineItem*)pItem)->GetLineStyle() );
SetOverColor( ((SvxOverlineItem*)pItem)->GetColor() );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CROSSEDOUT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetStrikeout( ((SvxCrossedOutItem*)pItem)->GetStrikeout() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_COLOR,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetColor( ((SvxColorItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_EMPHASIS_MARK,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetEmphasisMark( ((SvxEmphasisMarkItem*)pItem)->GetEmphasisMark() );
- SetTransparent( TRUE );
+ SetTransparent( sal_True );
SetAlign( ALIGN_BASELINE );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CONTOUR,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetOutline( ((SvxContourItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetShadow( ((SvxShadowedItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_RELIEF,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetRelief( (FontRelief)((SvxCharReliefItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetPropWidth(((SvxShadowedItem*)pItem)->GetValue() ? 50 : 100 );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_AUTOKERN,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
if( ((SvxAutoKernItem*)pItem)->GetValue() )
{
@@ -381,11 +381,11 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
SetAutoKern( 0 );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_WORDLINEMODE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetWordLineMode( ((SvxWordLineModeItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_ESCAPEMENT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
const SvxEscapementItem *pEsc = (const SvxEscapementItem *)pItem;
SetEscapement( pEsc->GetEsc() );
@@ -393,39 +393,39 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
SetProportion( pEsc->GetProp() );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CASEMAP,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetCaseMap( ((SvxCaseMapItem*)pItem)->GetCaseMap() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_KERNING,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetFixKerning( ((SvxKerningItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_NOHYPHEN,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetNoHyph( ((SvxNoHyphenItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BLINK,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetBlink( ((SvxBlinkItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_ROTATE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetVertical( ((SvxCharRotateItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
- TRUE, &pItem ))
+ sal_True, &pItem ))
pBackColor = new Color( ((SvxBrushItem*)pItem)->GetColor() );
else
pBackColor = NULL;
const SfxPoolItem* pTwoLinesItem = 0;
if( SFX_ITEM_SET ==
- pAttrSet->GetItemState( RES_CHRATR_TWO_LINES, TRUE, &pTwoLinesItem ))
+ pAttrSet->GetItemState( RES_CHRATR_TWO_LINES, sal_True, &pTwoLinesItem ))
if ( ((SvxTwoLinesItem*)pTwoLinesItem)->GetValue() )
SetVertical( 0 );
}
else
{
Invalidate();
- bNoHyph = FALSE;
- bBlink = FALSE;
+ bNoHyph = sal_False;
+ bBlink = sal_False;
}
- bPaintBlank = FALSE;
- bPaintWrong = FALSE;
+ bPaintBlank = sal_False;
+ bPaintWrong = sal_False;
ASSERT( aSub[SW_LATIN].IsTransparent(), "SwFont: Transparent revolution" );
}
@@ -448,7 +448,7 @@ SwFont::SwFont( const SwFont &rFont )
bFntChg = rFont.bFntChg;
bOrgChg = rFont.bOrgChg;
bPaintBlank = rFont.bPaintBlank;
- bPaintWrong = FALSE;
+ bPaintWrong = sal_False;
bURL = rFont.bURL;
bGreyWave = rFont.bGreyWave;
bNoColReplace = rFont.bNoColReplace;
@@ -463,14 +463,14 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
nToxCnt = 0;
nRefCnt = 0;
m_nMetaCount = 0;
- bPaintBlank = FALSE;
- bPaintWrong = FALSE;
- bURL = FALSE;
- bGreyWave = FALSE;
- bNoColReplace = FALSE;
+ bPaintBlank = sal_False;
+ bPaintWrong = sal_False;
+ bURL = sal_False;
+ bGreyWave = sal_False;
+ bNoColReplace = sal_False;
bNoHyph = pAttrSet->GetNoHyphenHere().GetValue();
bBlink = pAttrSet->GetBlink().GetValue();
- bOrgChg = TRUE;
+ bOrgChg = sal_True;
{
const SvxFontItem& rFont = pAttrSet->GetFont();
aSub[SW_LATIN].SetFamily( rFont.GetFamily() );
@@ -534,7 +534,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
SetEmphasisMark( pAttrSet->GetEmphasisMark().GetEmphasisMark() );
SetStrikeout( pAttrSet->GetCrossedOut().GetStrikeout() );
SetColor( pAttrSet->GetColor().GetValue() );
- SetTransparent( TRUE );
+ SetTransparent( sal_True );
SetAlign( ALIGN_BASELINE );
SetOutline( pAttrSet->GetContour().GetValue() );
SetShadow( pAttrSet->GetShadowed().GetValue() );
@@ -558,7 +558,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
SetFixKerning( pAttrSet->GetKerning().GetValue() );
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
- TRUE, &pItem ))
+ sal_True, &pItem ))
pBackColor = new Color( ((SvxBrushItem*)pItem)->GetColor() );
else
pBackColor = NULL;
@@ -597,7 +597,7 @@ SwFont& SwFont::operator=( const SwFont &rFont )
bFntChg = rFont.bFntChg;
bOrgChg = rFont.bOrgChg;
bPaintBlank = rFont.bPaintBlank;
- bPaintWrong = FALSE;
+ bPaintWrong = sal_False;
bURL = rFont.bURL;
bGreyWave = rFont.bGreyWave;
bNoColReplace = rFont.bNoColReplace;
@@ -610,19 +610,19 @@ SwFont& SwFont::operator=( const SwFont &rFont )
* SwFont::GoMagic()
*************************************************************************/
-void SwFont::GoMagic( ViewShell *pSh, BYTE nWhich )
+void SwFont::GoMagic( ViewShell *pSh, sal_uInt8 nWhich )
{
SwFntAccess aFntAccess( aSub[nWhich].pMagic, aSub[nWhich].nFntIndex,
- &aSub[nWhich], pSh, TRUE );
+ &aSub[nWhich], pSh, sal_True );
}
/*************************************************************************
* SwSubFont::IsSymbol()
*************************************************************************/
-BOOL SwSubFont::IsSymbol( ViewShell *pSh )
+sal_Bool SwSubFont::IsSymbol( ViewShell *pSh )
{
- SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh, FALSE );
+ SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh, sal_False );
return aFntAccess.Get()->IsSymbol();
}
@@ -630,11 +630,11 @@ BOOL SwSubFont::IsSymbol( ViewShell *pSh )
* SwSubFont::ChgFnt()
*************************************************************************/
-BOOL SwSubFont::ChgFnt( ViewShell *pSh, OutputDevice& rOut )
+sal_Bool SwSubFont::ChgFnt( ViewShell *pSh, OutputDevice& rOut )
{
if ( pLastFont )
pLastFont->Unlock();
- SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh, TRUE );
+ SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh, sal_True );
SV_STAT( nChangeFont );
pLastFont = aFntAccess.Get();
@@ -655,7 +655,7 @@ void SwFont::ChgPhysFnt( ViewShell *pSh, OutputDevice& rOut )
{
if( bOrgChg && aSub[nActual].IsEsc() )
{
- const BYTE nOldProp = aSub[nActual].GetPropr();
+ const sal_uInt8 nOldProp = aSub[nActual].GetPropr();
SetProportion( 100 );
ChgFnt( pSh, rOut );
SwFntAccess aFntAccess( aSub[nActual].pMagic, aSub[nActual].nFntIndex,
@@ -663,7 +663,7 @@ void SwFont::ChgPhysFnt( ViewShell *pSh, OutputDevice& rOut )
aSub[nActual].nOrgHeight = aFntAccess.Get()->GetFontHeight( pSh, rOut );
aSub[nActual].nOrgAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut );
SetProportion( nOldProp );
- bOrgChg = FALSE;
+ bOrgChg = sal_False;
}
if( bFntChg )
@@ -685,16 +685,16 @@ void SwFont::ChgPhysFnt( ViewShell *pSh, OutputDevice& rOut )
* T2_height-T2_ascent - (Esc * T1_height)
*************************************************************************/
-USHORT SwSubFont::CalcEscHeight( const USHORT nOldHeight,
- const USHORT nOldAscent ) const
+sal_uInt16 SwSubFont::CalcEscHeight( const sal_uInt16 nOldHeight,
+ const sal_uInt16 nOldAscent ) const
{
if( DFLT_ESC_AUTO_SUPER != GetEscapement() &&
DFLT_ESC_AUTO_SUB != GetEscapement() )
{
long nDescent = nOldHeight - nOldAscent -
( (long) nOrgHeight * GetEscapement() ) / 100L;
- const USHORT nDesc = ( nDescent>0 ) ? Max ( USHORT(nDescent),
- USHORT(nOrgHeight - nOrgAscent) ) : nOrgHeight - nOrgAscent;
+ const sal_uInt16 nDesc = ( nDescent>0 ) ? Max ( sal_uInt16(nDescent),
+ sal_uInt16(nOrgHeight - nOrgAscent) ) : nOrgHeight - nOrgAscent;
return ( nDesc + CalcEscAscent( nOldAscent ) );
}
return nOrgHeight;
@@ -713,9 +713,9 @@ short SwSubFont::_CheckKerning( )
* SwSubFont::GetAscent()
*************************************************************************/
-USHORT SwSubFont::GetAscent( ViewShell *pSh, const OutputDevice& rOut )
+sal_uInt16 SwSubFont::GetAscent( ViewShell *pSh, const OutputDevice& rOut )
{
- USHORT nAscent;
+ sal_uInt16 nAscent;
SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh );
nAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut );
if( GetEscapement() )
@@ -727,14 +727,14 @@ USHORT SwSubFont::GetAscent( ViewShell *pSh, const OutputDevice& rOut )
* SwSubFont::GetHeight()
*************************************************************************/
-USHORT SwSubFont::GetHeight( ViewShell *pSh, const OutputDevice& rOut )
+sal_uInt16 SwSubFont::GetHeight( ViewShell *pSh, const OutputDevice& rOut )
{
SV_STAT( nGetTextSize );
SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh );
- const USHORT nHeight = aFntAccess.Get()->GetFontHeight( pSh, rOut );
+ const sal_uInt16 nHeight = aFntAccess.Get()->GetFontHeight( pSh, rOut );
if ( GetEscapement() )
{
- const USHORT nAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut );
+ const sal_uInt16 nAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut );
return CalcEscHeight( nHeight, nAscent ); // + nLeading;
}
return nHeight; // + nLeading;
@@ -807,10 +807,10 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf )
// hochgestellt, muss seine effektive Hoehe melden.
if( GetEscapement() )
{
- const USHORT nAscent = pLastFont->GetFontAscent( rInf.GetShell(),
+ const sal_uInt16 nAscent = pLastFont->GetFontAscent( rInf.GetShell(),
rInf.GetOut() );
aTxtSize.Height() =
- (long)CalcEscHeight( (USHORT)aTxtSize.Height(), nAscent);
+ (long)CalcEscHeight( (sal_uInt16)aTxtSize.Height(), nAscent);
}
}
@@ -846,7 +846,7 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf )
* SwSubFont::_DrawText()
*************************************************************************/
-void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const BOOL bGrey )
+void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const sal_Bool bGrey )
{
rInf.SetGreyWave( bGrey );
xub_StrLen nLn = rInf.GetText().Len();
@@ -958,7 +958,7 @@ static sal_Char __READONLY_DATA sDoubleSpace[] = " ";
nSpace *= rInf.GetSpace() / SPACING_PRECISION_FACTOR;
}
- rInf.SetWidth( USHORT(aFontSize.Width() + nSpace) );
+ rInf.SetWidth( sal_uInt16(aFontSize.Width() + nSpace) );
rInf.SetText( aStr );
rInf.SetIdx( 0 );
rInf.SetLen( 2 );
@@ -1105,7 +1105,7 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos )
{
long nOfst;
- USHORT nDir = UnMapDirection(
+ sal_uInt16 nDir = UnMapDirection(
GetOrientation(), rInf.GetFrm() && rInf.GetFrm()->IsVertical() );
switch ( GetEscapement() )
@@ -1167,12 +1167,12 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos )
}
// used during painting of small capitals
-void SwDrawTextInfo::Shift( USHORT nDir )
+void SwDrawTextInfo::Shift( sal_uInt16 nDir )
{
ASSERT( bPos, "DrawTextInfo: Undefined Position" );
ASSERT( bSize, "DrawTextInfo: Undefined Width" );
- const BOOL bBidiPor = ( GetFrm() && GetFrm()->IsRightToLeft() ) !=
+ const sal_Bool bBidiPor = ( GetFrm() && GetFrm()->IsRightToLeft() ) !=
( 0 != ( TEXT_LAYOUT_BIDI_RTL & GetpOut()->GetLayoutMode() ) );
nDir = bBidiPor ?
@@ -1219,7 +1219,7 @@ long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess,
const OutputDevice &rOut, sal_Int16 nScript)
{
SwFont aFont(&rSet, &rIDocumentSettingAccess);
- BYTE nActual;
+ sal_uInt8 nActual;
switch (nScript)
{
default:
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 4d56942ecef4..76d8c53268fc 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -167,7 +167,7 @@ bool isNestedAny(const xub_StrLen nStart1, const xub_StrLen nEnd1,
}
static
-bool isSelfNestable(const USHORT nWhich)
+bool isSelfNestable(const sal_uInt16 nWhich)
{
if ((RES_TXTATR_INETFMT == nWhich) ||
(RES_TXTATR_CJK_RUBY == nWhich))
@@ -178,7 +178,7 @@ bool isSelfNestable(const USHORT nWhich)
}
static
-bool isSplittable(const USHORT nWhich)
+bool isSplittable(const sal_uInt16 nWhich)
{
if ((RES_TXTATR_INETFMT == nWhich) ||
(RES_TXTATR_CJK_RUBY == nWhich))
@@ -194,7 +194,7 @@ enum Split_t { FAIL, SPLIT_NEW, SPLIT_OTHER };
hint is inserted, and what kind of existing hint overlaps.
*/
static Split_t
-splitPolicy(const USHORT nWhichNew, const USHORT nWhichOther)
+splitPolicy(const sal_uInt16 nWhichNew, const sal_uInt16 nWhichOther)
{
if (!isSplittable(nWhichOther))
{
@@ -364,7 +364,7 @@ bool
SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
{
// INVARIANT: the nestable hints in the array are properly nested
- const USHORT nNewWhich( rNewHint.Which() );
+ const sal_uInt16 nNewWhich( rNewHint.Which() );
const xub_StrLen nNewStart( *rNewHint.GetStart() );
const xub_StrLen nNewEnd ( *rNewHint.GetEnd() );
//??? const bool bNoLengthAttribute( nNewStart == nNewEnd );
@@ -383,13 +383,13 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
SplitNew.push_back(& rNewHint);
// pass 1: split the inserted hint into fragments if necessary
- for ( USHORT i = 0; i < GetEndCount(); ++i )
+ for ( sal_uInt16 i = 0; i < GetEndCount(); ++i )
{
SwTxtAttr * const pOther = GetEnd(i);
if (pOther->IsNesting())
{
- const USHORT nOtherWhich( pOther->Which() );
+ const sal_uInt16 nOtherWhich( pOther->Which() );
const xub_StrLen nOtherStart( *(pOther)->GetStart() );
const xub_StrLen nOtherEnd ( *(pOther)->GetEnd() );
if (isOverlap(nNewStart, nNewEnd, nOtherStart, nOtherEnd ))
@@ -592,7 +592,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
const SetAttrMode nMode )
{
- const USHORT nWhich = rNewHint.Which();
+ const sal_uInt16 nWhich = rNewHint.Which();
const xub_StrLen nThisStart = *rNewHint.GetStart();
const xub_StrLen nThisEnd = *rNewHint.GetEnd();
@@ -611,7 +611,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
//
if ( !bNoLengthAttribute ) // nothing to do for no length attributes
{
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
SwTxtAttr* pOther = GetTextHint(i);
@@ -677,7 +677,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
if ( !bNoLengthAttribute ) // nothing to do for no length attributes
{
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
const SwTxtAttr* pOther = GetTextHint(i);
@@ -710,7 +710,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
aInsDelHints.clear();
// Get all hints that are in [nPorStart, nPorEnd[:
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
SwTxtAttr *pOther = GetTextHint(i);
@@ -736,7 +736,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
// pNewHint can be inserted after calculating the sort value.
// This should ensure, that pNewHint comes behind the already present
// character style
- USHORT nCharStyleCount = 0;
+ sal_uInt16 nCharStyleCount = 0;
aIter = aInsDelHints.begin();
while ( aIter != aInsDelHints.end() )
{
@@ -777,7 +777,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
aCharAutoFmtSetRange);
SfxItemIter aItemIter( *pOldStyle );
const SfxPoolItem* pItem = aItemIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
if ( !CharFmt::IsItemIncluded( pItem->Which(), &rNewHint ) )
{
@@ -857,7 +857,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
do
{
const SfxPoolItem* pTmpItem = 0;
- if ( SFX_ITEM_SET == rWholeParaAttrSet.GetItemState( pItem->Which(), FALSE, &pTmpItem ) &&
+ if ( SFX_ITEM_SET == rWholeParaAttrSet.GetItemState( pItem->Which(), sal_False, &pTmpItem ) &&
pTmpItem == pItem )
{
// Do not clear item if the attribute is set in a character format:
@@ -895,14 +895,14 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
do
{
const SfxPoolItem* pTmpItem = 0;
- if ( SFX_ITEM_SET == rWholeParaAttrSet.GetItemState( pItem->Which(), FALSE, &pTmpItem ) &&
+ if ( SFX_ITEM_SET == rWholeParaAttrSet.GetItemState( pItem->Which(), sal_False, &pTmpItem ) &&
pTmpItem == pItem )
{
// Do not clear item if the attribute is set in a character format:
if ( !pCurrentCharFmt || 0 == CharFmt::GetItem( *pCurrentCharFmt, pItem->Which() ) )
{
if ( !pNewSet )
- pNewSet = pNewStyle->Clone( TRUE );
+ pNewSet = pNewStyle->Clone( sal_True );
pNewSet->ClearItem( pItem->Which() );
}
}
@@ -1015,7 +1015,7 @@ SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr,
// different from rDoc's pool, we have to correct this:
const StylePool::SfxItemSet_Pointer_t pAutoStyle = static_cast<const SwFmtAutoFmt&>(rAttr).GetStyleHandle();
::std::auto_ptr<const SfxItemSet> pNewSet(
- pAutoStyle->SfxItemSet::Clone( TRUE, &rDoc.GetAttrPool() ));
+ pAutoStyle->SfxItemSet::Clone( sal_True, &rDoc.GetAttrPool() ));
SwTxtAttr* pNew = MakeTxtAttr( rDoc, *pNewSet, nStt, nEnd );
return pNew;
}
@@ -1106,7 +1106,7 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr )
{
// einige Sachen muessen vorm Loeschen der "Format-Attribute" erfolgen
SwDoc* pDoc = GetDoc();
- USHORT nDelMsg = 0;
+ sal_uInt16 nDelMsg = 0;
switch( pAttr->Which() )
{
case RES_TXTATR_FLYCNT:
@@ -1154,7 +1154,7 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr )
case RES_DBNUMSETFLD:
case RES_DBNEXTSETFLD:
if( !pDoc->IsNewFldLst() && GetNodes().IsDocNodes() )
- pDoc->InsDelFldInFldLst( FALSE, *(SwTxtFld*)pAttr );
+ pDoc->InsDelFldInFldLst( sal_False, *(SwTxtFld*)pAttr );
break;
case RES_DDEFLD:
if( GetNodes().IsDocNodes() &&
@@ -1230,7 +1230,7 @@ SwTxtNode::InsertItem( SfxPoolItem& rAttr,
// take ownership of pAttr; if insertion fails, delete pAttr
bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
{
- BOOL bHiddenPara = FALSE;
+ sal_Bool bHiddenPara = sal_False;
ASSERT( pAttr && *pAttr->GetStart() <= Len(), "StartIdx out of bounds!" );
ASSERT( !pAttr->GetEnd() || (*pAttr->GetEnd() <= Len()),
@@ -1249,7 +1249,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
const bool bDummyChar( pAttr->HasDummyChar() );
if (bDummyChar)
{
- USHORT nInsMode = nMode;
+ sal_uInt16 nInsMode = nMode;
switch( pAttr->Which() )
{
case RES_TXTATR_FLYCNT:
@@ -1265,7 +1265,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// des Zeichens. Sonst muesste das immer ausserhalb
// erfolgen (Fehleranfaellig !)
const SwFmtAnchor* pAnchor = 0;
- pFmt->GetItemState( RES_ANCHOR, FALSE,
+ pFmt->GetItemState( RES_ANCHOR, sal_False,
(const SfxPoolItem**)&pAnchor );
SwIndex aIdx( this, *pAttr->GetStart() );
@@ -1316,11 +1316,11 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
m_Text.Erase( *pAttr->GetStart(), 1 );
// Indizies Updaten
SwIndex aTmpIdx( this, *pAttr->GetStart() );
- Update( aTmpIdx, 1, TRUE );
+ Update( aTmpIdx, 1, sal_True );
}
// Format loeschen nicht ins Undo aufnehmen!!
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
DestroyAttr( pAttr );
pDoc->DoUndo( bUndo );
return false;
@@ -1354,14 +1354,14 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
m_Text.Erase( *pAttr->GetStart(), 1 );
// Indizies Updaten
SwIndex aTmpIdx( this, *pAttr->GetStart() );
- Update( aTmpIdx, 1, TRUE );
+ Update( aTmpIdx, 1, sal_True );
}
DestroyAttr( pAttr );
return false;
}
// wird eine neue Fussnote eingefuegt ??
- BOOL bNewFtn = 0 == ((SwTxtFtn*)pAttr)->GetStartNode();
+ sal_Bool bNewFtn = 0 == ((SwTxtFtn*)pAttr)->GetStartNode();
if( bNewFtn )
{
((SwTxtFtn*)pAttr)->MakeNewTextSection( GetNodes() );
@@ -1373,9 +1373,9 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
else if ( !GetpSwpHints() || !GetpSwpHints()->IsInSplitNode() )
{
// loesche alle Frames der Section, auf die der StartNode zeigt
- ULONG nSttIdx =
+ sal_uLong nSttIdx =
((SwTxtFtn*)pAttr)->GetStartNode()->GetIndex();
- ULONG nEndIdx = rNodes[ nSttIdx++ ]->EndOfSectionIndex();
+ sal_uLong nEndIdx = rNodes[ nSttIdx++ ]->EndOfSectionIndex();
SwCntntNode* pCNd;
for( ; nSttIdx < nEndIdx; ++nSttIdx )
if( 0 != ( pCNd = rNodes[ nSttIdx ]->GetCntntNode() ))
@@ -1398,7 +1398,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
if( !bNewFtn )
{
// eine alte Ftn wird umgehaengt (z.B. SplitNode)
- for( USHORT n = 0; n < pDoc->GetFtnIdxs().Count(); ++n )
+ for( sal_uInt16 n = 0; n < pDoc->GetFtnIdxs().Count(); ++n )
if( pAttr == pDoc->GetFtnIdxs()[n] )
{
// neuen Index zuweisen, dafuer aus dem SortArray
@@ -1421,7 +1421,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
if( StartOfSectionIndex() > rNodes.GetEndOfRedlines().GetIndex() )
{
#ifdef DBG_UTIL
- const BOOL bSuccess =
+ const sal_Bool bSuccess =
#endif
pDoc->GetFtnIdxs().Insert( pTxtFtn );
#ifdef DBG_UTIL
@@ -1440,7 +1440,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// anwerfen
if( RES_HIDDENPARAFLD ==
pAttr->GetFld().GetFld()->GetTyp()->Which() )
- bHiddenPara = TRUE;
+ bHiddenPara = sal_True;
}
break;
@@ -1530,13 +1530,13 @@ void SwTxtNode::DeleteAttribute( SwTxtAttr * const pAttr )
*************************************************************************/
//FIXME: this does NOT respect SORT NUMBER (for CHARFMT)!
-void SwTxtNode::DeleteAttributes( const USHORT nWhich,
+void SwTxtNode::DeleteAttributes( const sal_uInt16 nWhich,
const xub_StrLen nStart, const xub_StrLen nEnd )
{
if ( !HasHints() )
return;
- for ( USHORT nPos = 0; m_pSwpHints && nPos < m_pSwpHints->Count(); nPos++ )
+ for ( sal_uInt16 nPos = 0; m_pSwpHints && nPos < m_pSwpHints->Count(); nPos++ )
{
SwTxtAttr * const pTxtHt = m_pSwpHints->GetTextHint( nPos );
const xub_StrLen nHintStart = *(pTxtHt->GetStart());
@@ -1556,7 +1556,7 @@ void SwTxtNode::DeleteAttributes( const USHORT nWhich,
// Check if character format contains hidden attribute:
const SwCharFmt* pFmt = pTxtHt->GetCharFmt().GetCharFmt();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, sal_True, &pItem ) )
SetCalcHiddenCharFlags();
}
// --> FME 2007-03-16 #i75430# Recalc hidden flags if necessary
@@ -1613,11 +1613,11 @@ void SwTxtNode::DelSoftHyph( const xub_StrLen nStt, const xub_StrLen nEnd )
// setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt,
// dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr)
-BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
+sal_Bool SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
xub_StrLen nEnd, const SetAttrMode nMode )
{
if( !rSet.Count() )
- return FALSE;
+ return sal_False;
// teil die Sets auf (fuer Selektion in Nodes)
const SfxItemSet* pSet = &rSet;
@@ -1629,14 +1629,14 @@ BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
{
// sind am Node schon Zeichenvorlagen gesetzt, muss man diese Attribute
// (rSet) immer als TextAttribute setzen, damit sie angezeigt werden.
- int bHasCharFmts = FALSE;
+ int bHasCharFmts = sal_False;
if ( HasHints() )
{
- for ( USHORT n = 0; n < m_pSwpHints->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < m_pSwpHints->Count(); ++n )
{
if ( (*m_pSwpHints)[ n ]->IsCharFmtAttr() )
{
- bHasCharFmts = TRUE;
+ bHasCharFmts = sal_True;
break;
}
}
@@ -1649,18 +1649,18 @@ BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
// we want to set them at the paragraph:
if( aTxtSet.Count() != rSet.Count() )
{
- BOOL bRet = SetAttr( rSet );
+ sal_Bool bRet = SetAttr( rSet );
if( !aTxtSet.Count() )
return bRet;
}
// check for auto style:
const SfxPoolItem* pItem;
- const bool bAutoStyle = SFX_ITEM_SET == aTxtSet.GetItemState( RES_TXTATR_AUTOFMT, FALSE, &pItem );
+ const bool bAutoStyle = SFX_ITEM_SET == aTxtSet.GetItemState( RES_TXTATR_AUTOFMT, sal_False, &pItem );
if ( bAutoStyle )
{
boost::shared_ptr<SfxItemSet> pAutoStyleSet = static_cast<const SwFmtAutoFmt*>(pItem)->GetStyleHandle();
- BOOL bRet = SetAttr( *pAutoStyleSet );
+ sal_Bool bRet = SetAttr( *pAutoStyleSet );
if( 1 == aTxtSet.Count() )
return bRet;
}
@@ -1674,7 +1674,7 @@ BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
SfxItemSet aCharSet( *rSet.GetPool(), aCharAutoFmtSetRange );
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
SfxItemIter aIter( *pSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
@@ -1682,7 +1682,7 @@ BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
{
if ( pItem && (reinterpret_cast<SfxPoolItem*>(-1) != pItem))
{
- const USHORT nWhich = pItem->Which();
+ const sal_uInt16 nWhich = pItem->Which();
ASSERT( isCHRATR(nWhich) || isTXTATR(nWhich),
"SwTxtNode::SetAttr(): unknown attribute" );
if ( isCHRATR(nWhich) || isTXTATR(nWhich) )
@@ -1740,7 +1740,7 @@ BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
TryDeleteSwpHints();
- return nCount ? TRUE : FALSE;
+ return nCount ? sal_True : sal_False;
}
void lcl_MergeAttr( SfxItemSet& rSet, const SfxPoolItem& rAttr )
@@ -1751,12 +1751,12 @@ void lcl_MergeAttr( SfxItemSet& rSet, const SfxPoolItem& rAttr )
if ( !pCFSet )
return;
SfxWhichIter aIter( *pCFSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
if( ( nWhich < RES_CHRATR_END ||
RES_TXTATR_UNKNOWN_CONTAINER == nWhich ) &&
- ( SFX_ITEM_SET == pCFSet->GetItemState( nWhich, TRUE ) ) )
+ ( SFX_ITEM_SET == pCFSet->GetItemState( nWhich, sal_True ) ) )
rSet.Put( pCFSet->Get( nWhich ) );
nWhich = aIter.NextWhich();
}
@@ -1776,12 +1776,12 @@ void lcl_MergeAttr_ExpandChrFmt( SfxItemSet& rSet, const SfxPoolItem& rAttr )
if ( pCFSet )
{
SfxWhichIter aIter( *pCFSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
if( ( nWhich < RES_CHRATR_END ||
( RES_TXTATR_AUTOFMT == rAttr.Which() && RES_TXTATR_UNKNOWN_CONTAINER == nWhich ) ) &&
- ( SFX_ITEM_SET == pCFSet->GetItemState( nWhich, TRUE ) ) )
+ ( SFX_ITEM_SET == pCFSet->GetItemState( nWhich, sal_True ) ) )
rSet.Put( pCFSet->Get( nWhich ) );
nWhich = aIter.NextWhich();
}
@@ -1819,7 +1819,7 @@ void lcl_MergeListLevelIndentAsLRSpaceItem( const SwTxtNode& rTxtNode,
const SwNumRule* pRule = rTxtNode.GetNumRule();
if ( pRule && rTxtNode.GetActualListLevel() >= 0 )
{
- const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(rTxtNode.GetActualListLevel()));
+ const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(rTxtNode.GetActualListLevel()));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
SvxLRSpaceItem aLR( RES_LR_SPACE );
@@ -1833,8 +1833,8 @@ void lcl_MergeListLevelIndentAsLRSpaceItem( const SwTxtNode& rTxtNode,
// erfrage die Attribute vom TextNode ueber den Bereich
// --> OD 2008-01-16 #newlistlevelattrs#
-BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
- BOOL bOnlyTxtAttr, BOOL bGetFromChrFmt,
+sal_Bool SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
+ sal_Bool bOnlyTxtAttr, sal_Bool bGetFromChrFmt,
const bool bMergeIndentValuesOfNumRule ) const
{
if( HasHints() )
@@ -1868,11 +1868,11 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
// <--
}
- const USHORT nSize = m_pSwpHints->Count();
+ const sal_uInt16 nSize = m_pSwpHints->Count();
if( nStt == nEnd ) // kein Bereich:
{
- for (USHORT n = 0; n < nSize; ++n)
+ for (sal_uInt16 n = 0; n < nSize; ++n)
{
const SwTxtAttr* pHt = (*m_pSwpHints)[n];
const xub_StrLen nAttrStart = *pHt->GetStart();
@@ -1897,10 +1897,10 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
::std::auto_ptr< std::vector< SwPoolItemEndPair > > pAttrArr;
// <--
- const USHORT coArrSz = static_cast<USHORT>(RES_TXTATR_WITHEND_END) -
- static_cast<USHORT>(RES_CHRATR_BEGIN);
+ const sal_uInt16 coArrSz = static_cast<sal_uInt16>(RES_TXTATR_WITHEND_END) -
+ static_cast<sal_uInt16>(RES_CHRATR_BEGIN);
- for (USHORT n = 0; n < nSize; ++n)
+ for (sal_uInt16 n = 0; n < nSize; ++n)
{
const SwTxtAttr* pHt = (*m_pSwpHints)[n];
const xub_StrLen nAttrStart = *pHt->GetStart();
@@ -1911,7 +1911,7 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
if ( ! pAttrEnd ) // no attributes without end
continue;
- BOOL bChkInvalid = FALSE;
+ sal_Bool bChkInvalid = sal_False;
if( nAttrStart <= nStt ) // vor oder genau Start
{
if( *pAttrEnd <= nStt ) // liegt davor
@@ -1922,11 +1922,11 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
else
// else if( pHt->GetAttr() != aFmtSet.Get( pHt->Which() ) )
// uneindeutig
- bChkInvalid = TRUE;
+ bChkInvalid = sal_True;
}
else if( nAttrStart < nEnd // reicht in den Bereich
)// && pHt->GetAttr() != aFmtSet.Get( pHt->Which() ) )
- bChkInvalid = TRUE;
+ bChkInvalid = sal_True;
if( bChkInvalid )
{
@@ -1946,11 +1946,11 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
else
pItem = &pHt->GetAttr();
- const USHORT nHintEnd = *pAttrEnd;
+ const sal_uInt16 nHintEnd = *pAttrEnd;
while ( pItem )
{
- const USHORT nHintWhich = pItem->Which();
+ const sal_uInt16 nHintWhich = pItem->Which();
ASSERT(!isUNKNOWNATR(nHintWhich),
"SwTxtNode::GetAttr(): unkonwn attribute?");
@@ -2017,13 +2017,13 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
if ( pAttrArr.get() )
{
- for (USHORT n = 0; n < coArrSz; ++n)
+ for (sal_uInt16 n = 0; n < coArrSz; ++n)
{
const SwPoolItemEndPair& rItemPair = (*pAttrArr)[ n ];
if( (0 != rItemPair.mpItem) && ((SfxPoolItem*)-1 != rItemPair.mpItem) )
{
- const USHORT nWh =
- static_cast<USHORT>(n + RES_CHRATR_BEGIN);
+ const sal_uInt16 nWh =
+ static_cast<sal_uInt16>(n + RES_CHRATR_BEGIN);
if( nEnd <= rItemPair.mnEndPos ) // hinter oder genau Ende
{
@@ -2057,14 +2057,14 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
// <--
}
- return rSet.Count() ? TRUE : FALSE;
+ return rSet.Count() ? sal_True : sal_False;
}
namespace
{
-typedef std::pair<USHORT, USHORT> AttrSpan_t;
+typedef std::pair<sal_uInt16, sal_uInt16> AttrSpan_t;
typedef std::multimap<AttrSpan_t, const SwTxtAttr*> AttrSpanMap_t;
@@ -2103,7 +2103,7 @@ struct RemovePresentAttrs
const SfxPoolItem* pItem(aIter.GetCurItem());
while (true)
{
- const USHORT nWhich(pItem->Which());
+ const sal_uInt16 nWhich(pItem->Which());
if (CharFmt::IsItemIncluded(nWhich, pAutoStyle))
{
m_rAttrSet.ClearItem(nWhich);
@@ -2129,15 +2129,15 @@ private:
that tries to access the pointer has to check if it's non-null!
*/
void
-lcl_CollectHintSpans(const SwpHints& i_rHints, const USHORT nLength,
+lcl_CollectHintSpans(const SwpHints& i_rHints, const sal_uInt16 nLength,
AttrSpanMap_t& o_rSpanMap)
{
- USHORT nLastEnd(0);
+ sal_uInt16 nLastEnd(0);
- for (USHORT i(0); i != i_rHints.Count(); ++i)
+ for (sal_uInt16 i(0); i != i_rHints.Count(); ++i)
{
const SwTxtAttr* const pHint(i_rHints[i]);
- const USHORT nWhich(pHint->Which());
+ const sal_uInt16 nWhich(pHint->Which());
if (nWhich == RES_TXTATR_CHARFMT || nWhich == RES_TXTATR_AUTOFMT)
{
const AttrSpan_t aSpan(*pHint->GetStart(), *pHint->GetEnd());
@@ -2164,7 +2164,7 @@ lcl_CollectHintSpans(const SwpHints& i_rHints, const USHORT nLength,
void
-lcl_FillWhichIds(const SfxItemSet& i_rAttrSet, std::vector<USHORT>& o_rClearIds)
+lcl_FillWhichIds(const SfxItemSet& i_rAttrSet, std::vector<sal_uInt16>& o_rClearIds)
{
o_rClearIds.reserve(i_rAttrSet.Count());
SfxItemIter aIter(i_rAttrSet);
@@ -2185,7 +2185,7 @@ struct SfxItemSetClearer
{
SfxItemSet & m_rItemSet;
SfxItemSetClearer(SfxItemSet & rItemSet) : m_rItemSet(rItemSet) { }
- void operator()(USHORT const nWhich) { m_rItemSet.ClearItem(nWhich); }
+ void operator()(sal_uInt16 const nWhich) { m_rItemSet.ClearItem(nWhich); }
};
}
@@ -2253,7 +2253,7 @@ SwTxtNode::impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet)
}
// 3. Clear items from the node
- std::vector<USHORT> aClearedIds;
+ std::vector<sal_uInt16> aClearedIds;
lcl_FillWhichIds(i_rAttrSet, aClearedIds);
ClearItemsFromAttrSet(aClearedIds);
}
@@ -2289,18 +2289,18 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd )
pNd->GetOrCreateSwpHints();
- std::vector<USHORT> aProcessedIds;
+ std::vector<sal_uInt16> aProcessedIds;
if( aThisSet.Count() )
{
SfxItemIter aIter( aThisSet );
const SfxPoolItem* pItem = aIter.GetCurItem(), *pNdItem = 0;
SfxItemSet aConvertSet( GetDoc()->GetAttrPool(), aCharFmtSetRange );
- std::vector<USHORT> aClearWhichIds;
+ std::vector<sal_uInt16> aClearWhichIds;
while( true )
{
- if( SFX_ITEM_SET == aNdSet.GetItemState( pItem->Which(), FALSE, &pNdItem ) )
+ if( SFX_ITEM_SET == aNdSet.GetItemState( pItem->Which(), sal_False, &pNdItem ) )
{
if (*pItem == *pNdItem) // 4
{
@@ -2356,9 +2356,9 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd )
void SwpHints::CalcFlags()
{
m_bDDEFields = m_bFootnote = false;
- const USHORT nSize = Count();
+ const sal_uInt16 nSize = Count();
const SwTxtAttr* pAttr;
- for( USHORT nPos = 0; nPos < nSize; ++nPos )
+ for( sal_uInt16 nPos = 0; nPos < nSize; ++nPos )
{
switch( ( pAttr = (*this)[ nPos ])->Which() )
{
@@ -2391,13 +2391,13 @@ bool SwpHints::CalcHiddenParaField()
m_bCalcHiddenParaField = false;
bool bOldHasHiddenParaField = m_bHasHiddenParaField;
bool bNewHasHiddenParaField = false;
- const USHORT nSize = Count();
+ const sal_uInt16 nSize = Count();
const SwTxtAttr *pTxtHt;
- for( USHORT nPos = 0; nPos < nSize; ++nPos )
+ for( sal_uInt16 nPos = 0; nPos < nSize; ++nPos )
{
pTxtHt = (*this)[ nPos ];
- const USHORT nWhich = pTxtHt->Which();
+ const sal_uInt16 nWhich = pTxtHt->Which();
if( RES_TXTATR_FIELD == nWhich )
{
@@ -2446,7 +2446,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
typedef std::multimap< int, SwTxtAttr* > PortionMap;
PortionMap aPortionMap;
xub_StrLen nLastPorStart = STRING_LEN;
- USHORT i = 0;
+ sal_uInt16 i = 0;
int nKey = 0;
// get portions by start position:
@@ -2477,8 +2477,8 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
PortionMap::iterator aIter2 = aRange2.first;
bool bMerge = true;
- const USHORT nAttributesInPor1 = static_cast<USHORT>(std::distance( aRange1.first, aRange1.second ));
- const USHORT nAttributesInPor2 = static_cast<USHORT>(std::distance( aRange2.first, aRange2.second ));
+ const sal_uInt16 nAttributesInPor1 = static_cast<sal_uInt16>(std::distance( aRange1.first, aRange1.second ));
+ const sal_uInt16 nAttributesInPor2 = static_cast<sal_uInt16>(std::distance( aRange2.first, aRange2.second ));
if ( nAttributesInPor1 == nAttributesInPor2 && nAttributesInPor1 != 0 )
{
@@ -2509,7 +2509,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
SwTxtAttr* p2 = (*aIter2).second;
nNewPortionEnd = *p2->GetEnd();
- const USHORT nCountBeforeDelete = Count();
+ const sal_uInt16 nCountBeforeDelete = Count();
Delete( p2 );
// robust: check if deletion actually took place before destroying attribute:
@@ -2550,9 +2550,9 @@ void lcl_CheckSortNumber( const SwpHints& rHints, SwTxtCharFmt& rNewCharFmt )
{
const xub_StrLen nHtStart = *rNewCharFmt.GetStart();
const xub_StrLen nHtEnd = *rNewCharFmt.GetEnd();
- USHORT nSortNumber = 0;
+ sal_uInt16 nSortNumber = 0;
- for ( USHORT i = 0; i < rHints.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rHints.Count(); ++i )
{
const SwTxtAttr* pOtherHt = rHints[i];
@@ -2567,7 +2567,7 @@ void lcl_CheckSortNumber( const SwpHints& rHints, SwTxtCharFmt& rNewCharFmt )
if ( nOtherStart == nHtStart && nOtherEnd == nHtEnd )
{
- const USHORT nOtherSortNum = static_cast<const SwTxtCharFmt*>(pOtherHt)->GetSortNumber();
+ const sal_uInt16 nOtherSortNum = static_cast<const SwTxtCharFmt*>(pOtherHt)->GetSortNumber();
nSortNumber = nOtherSortNum + 1;
}
}
@@ -2604,7 +2604,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
// Wir koennen also auf die while-Schleife verzichten
xub_StrLen *pHtEnd = pHint->GetEnd();
- USHORT nWhich = pHint->Which();
+ sal_uInt16 nWhich = pHint->Which();
switch( nWhich )
{
@@ -2613,7 +2613,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
// Check if character format contains hidden attribute:
const SwCharFmt* pFmt = pHint->GetCharFmt().GetCharFmt();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, sal_True, &pItem ) )
rNode.SetCalcHiddenCharFlags();
((SwTxtCharFmt*)pHint)->ChgTxtNode( &rNode );
@@ -2634,7 +2634,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
break;
case RES_TXTATR_FIELD:
{
- BOOL bDelFirst = 0 != ((SwTxtFld*)pHint)->GetpTxtNode();
+ sal_Bool bDelFirst = 0 != ((SwTxtFld*)pHint)->GetpTxtNode();
((SwTxtFld*)pHint)->ChgTxtNode( &rNode );
SwDoc* pDoc = rNode.GetDoc();
const SwField* pFld = ((SwTxtFld*)pHint)->GetFld().GetFld();
@@ -2653,9 +2653,9 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
case RES_DBNEXTSETFLD:
{
if( bDelFirst )
- pDoc->InsDelFldInFldLst( FALSE, *(SwTxtFld*)pHint );
+ pDoc->InsDelFldInFldLst( sal_False, *(SwTxtFld*)pHint );
if( rNode.GetNodes().IsDocNodes() )
- pDoc->InsDelFldInFldLst( TRUE, *(SwTxtFld*)pHint );
+ pDoc->InsDelFldInFldLst( sal_True, *(SwTxtFld*)pHint );
}
break;
case RES_DDEFLD:
@@ -2668,7 +2668,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
// gehts ins normale Nodes-Array?
if( rNode.GetNodes().IsDocNodes() )
{
- BOOL bInsFldType = FALSE;
+ sal_Bool bInsFldType = sal_False;
switch( pFld->GetTyp()->Which() )
{
case RES_SETEXPFLD:
@@ -2719,7 +2719,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
// search for a reference with the same name
SwTxtAttr* pTmpHt;
xub_StrLen *pTmpHtEnd, *pTmpHintEnd;
- for( USHORT n = 0, nEnd = Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = Count(); n < nEnd; ++n )
{
if (RES_TXTATR_REFMARK == (pTmpHt = GetTextHint(n))->Which() &&
pHint->GetAttr() == pTmpHt->GetAttr() &&
@@ -2729,18 +2729,18 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
SwComparePosition eCmp = ::ComparePosition(
*pTmpHt->GetStart(), *pTmpHtEnd,
*pHint->GetStart(), *pTmpHintEnd );
- BOOL bDelOld = TRUE, bChgStart = FALSE, bChgEnd = FALSE;
+ sal_Bool bDelOld = sal_True, bChgStart = sal_False, bChgEnd = sal_False;
switch( eCmp )
{
case POS_BEFORE:
- case POS_BEHIND: bDelOld = FALSE; break;
+ case POS_BEHIND: bDelOld = sal_False; break;
- case POS_OUTSIDE: bChgStart = bChgEnd = TRUE; break;
+ case POS_OUTSIDE: bChgStart = bChgEnd = sal_True; break;
case POS_COLLIDE_END:
- case POS_OVERLAP_BEFORE: bChgStart = TRUE; break;
+ case POS_OVERLAP_BEFORE: bChgStart = sal_True; break;
case POS_COLLIDE_START:
- case POS_OVERLAP_BEHIND: bChgEnd = TRUE; break;
+ case POS_OVERLAP_BEHIND: bChgEnd = sal_True; break;
default: break;
}
@@ -2778,7 +2778,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
}
if( nsSetAttrMode::SETATTR_DONTEXPAND & nMode )
- pHint->SetDontExpand( TRUE );
+ pHint->SetDontExpand( sal_True );
// SwTxtAttrs ohne Ende werden sonderbehandelt:
// Sie werden natuerlich in das Array insertet, aber sie werden nicht
@@ -2894,7 +2894,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
* SwpHints::DeleteAtPos()
*************************************************************************/
-void SwpHints::DeleteAtPos( const USHORT nPos )
+void SwpHints::DeleteAtPos( const sal_uInt16 nPos )
{
SwTxtAttr *pHint = GetTextHint(nPos);
// ChainDelete( pHint );
@@ -2932,7 +2932,7 @@ void SwpHints::DeleteAtPos( const USHORT nPos )
void SwpHints::Delete( SwTxtAttr* pTxtHt )
{
// Attr 2.0: SwpHintsArr::Delete( pTxtHt );
- const USHORT nPos = GetStartOf( pTxtHt );
+ const sal_uInt16 nPos = GetStartOf( pTxtHt );
ASSERT( USHRT_MAX != nPos, "Attribut nicht im Attribut-Array!" );
if( USHRT_MAX != nPos )
DeleteAtPos( nPos );
@@ -2942,7 +2942,7 @@ void SwTxtNode::ClearSwpHintsArr( bool bDelFields )
{
if ( HasHints() )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( nPos < m_pSwpHints->Count() )
{
SwTxtAttr* pDel = m_pSwpHints->GetTextHint( nPos );
@@ -2973,10 +2973,10 @@ void SwTxtNode::ClearSwpHintsArr( bool bDelFields )
}
}
-USHORT SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
- USHORT nScript ) const
+sal_uInt16 SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
+ sal_uInt16 nScript ) const
{
- USHORT nRet = LANGUAGE_DONTKNOW;
+ sal_uInt16 nRet = LANGUAGE_DONTKNOW;
if ( ! nScript )
{
@@ -2984,13 +2984,13 @@ USHORT SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
}
// --> FME 2008-09-29 #i91465# hennerdrewes: Consider nScript if pSwpHints == 0
- const USHORT nWhichId = GetWhichOfScript( RES_CHRATR_LANGUAGE, nScript );
+ const sal_uInt16 nWhichId = GetWhichOfScript( RES_CHRATR_LANGUAGE, nScript );
// <--
if ( HasHints() )
{
const xub_StrLen nEnd = nBegin + nLen;
- for ( USHORT i = 0, nSize = m_pSwpHints->Count(); i < nSize; ++i )
+ for ( sal_uInt16 i = 0, nSize = m_pSwpHints->Count(); i < nSize; ++i )
{
// ist der Attribut-Anfang schon groesser als der Idx ?
const SwTxtAttr *pHt = m_pSwpHints->operator[](i);
@@ -2998,7 +2998,7 @@ USHORT SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
if( nEnd < nAttrStart )
break;
- const USHORT nWhich = pHt->Which();
+ const sal_uInt16 nWhich = pHt->Which();
if( nWhichId == nWhich ||
( ( pHt->IsCharFmtAttr() || RES_TXTATR_AUTOFMT == nWhich ) && CharFmt::IsItemIncluded( nWhichId, pHt ) ) )
@@ -3015,7 +3015,7 @@ USHORT SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
( nAttrStart == *pEndIdx || !nBegin ))) )
{
const SfxPoolItem* pItem = CharFmt::GetItem( *pHt, nWhichId );
- USHORT nLng = ((SvxLanguageItem*)pItem)->GetLanguage();
+ sal_uInt16 nLng = ((SvxLanguageItem*)pItem)->GetLanguage();
// Umfasst das Attribut den Bereich komplett?
if( nAttrStart <= nBegin && nEnd <= *pEndIdx )
@@ -3030,7 +3030,7 @@ USHORT SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
{
nRet = ((SvxLanguageItem&)GetSwAttrSet().Get( nWhichId )).GetLanguage();
if( LANGUAGE_DONTKNOW == nRet )
- nRet = static_cast<USHORT>(GetAppLanguage());
+ nRet = static_cast<sal_uInt16>(GetAppLanguage());
}
return nRet;
}
diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx
index 48ce2462cf2b..7511dee4009a 100644
--- a/sw/source/core/txtnode/txatritr.cxx
+++ b/sw/source/core/txtnode/txatritr.cxx
@@ -107,7 +107,7 @@ sal_Bool SwScriptIterator::Next()
// --------------------------------------------------------------------
-SwTxtAttrIterator::SwTxtAttrIterator( const SwTxtNode& rTNd, USHORT nWhchId,
+SwTxtAttrIterator::SwTxtAttrIterator( const SwTxtNode& rTNd, sal_uInt16 nWhchId,
xub_StrLen nStt,
sal_Bool bUseGetWhichOfScript )
: aSIter( rTNd.GetTxt(), nStt ), rTxtNd( rTNd ),
@@ -127,7 +127,7 @@ sal_Bool SwTxtAttrIterator::Next()
{
do {
const SwTxtAttr* pHt = (SwTxtAttr*)aStack[ 0 ];
- USHORT nEndPos = *pHt->GetEnd();
+ sal_uInt16 nEndPos = *pHt->GetEnd();
if( nChgPos >= nEndPos )
aStack.Remove( 0 );
else
@@ -142,7 +142,7 @@ sal_Bool SwTxtAttrIterator::Next()
if( aStack.Count() )
{
const SwTxtAttr* pHt = (SwTxtAttr*)aStack[ 0 ];
- USHORT nEndPos = *pHt->GetEnd();
+ sal_uInt16 nEndPos = *pHt->GetEnd();
if( nChgPos >= nEndPos )
{
nChgPos = nEndPos;
@@ -171,7 +171,7 @@ sal_Bool SwTxtAttrIterator::Next()
void SwTxtAttrIterator::AddToStack( const SwTxtAttr& rAttr )
{
void* pAdd = (void*)&rAttr;
- USHORT nIns = 0, nEndPos = *rAttr.GetEnd();
+ sal_uInt16 nIns = 0, nEndPos = *rAttr.GetEnd();
for( ; nIns < aStack.Count(); ++nIns )
if( *((SwTxtAttr*)aStack[ nIns ] )->GetEnd() > nEndPos )
break;
@@ -181,7 +181,7 @@ void SwTxtAttrIterator::AddToStack( const SwTxtAttr& rAttr )
void SwTxtAttrIterator::SearchNextChg()
{
- USHORT nWh = 0;
+ sal_uInt16 nWh = 0;
if( nChgPos == aSIter.GetScriptChgPos() )
{
aSIter.Next();
@@ -217,8 +217,8 @@ void SwTxtAttrIterator::SearchNextChg()
for( ; nAttrPos < pHts->Count(); ++nAttrPos )
{
const SwTxtAttr* pHt = (*pHts)[ nAttrPos ];
- const USHORT* pEnd = pHt->GetEnd();
- const USHORT nHtStt = *pHt->GetStart();
+ const sal_uInt16* pEnd = pHt->GetEnd();
+ const sal_uInt16 nHtStt = *pHt->GetStart();
if( nHtStt < nStt && ( !pEnd || *pEnd <= nStt ))
continue;
diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx
index 5499eeab4439..f6dcfc520eae 100644
--- a/sw/source/core/txtnode/txtatr2.cxx
+++ b/sw/source/core/txtnode/txtatr2.cxx
@@ -60,7 +60,7 @@ SwTxtCharFmt::SwTxtCharFmt( SwFmtCharFmt& rAttr,
, m_nSortNumber( 0 )
{
rAttr.pTxtAttr = this;
- SetCharFmtAttr( TRUE );
+ SetCharFmtAttr( sal_True );
}
SwTxtCharFmt::~SwTxtCharFmt( )
@@ -69,7 +69,7 @@ SwTxtCharFmt::~SwTxtCharFmt( )
void SwTxtCharFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
ASSERT( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich)
|| (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich),
"SwTxtCharFmt::Modify(): unknown Modify");
@@ -82,16 +82,16 @@ void SwTxtCharFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
// erfrage vom Modify Informationen
-BOOL SwTxtCharFmt::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwTxtCharFmt::GetInfo( SfxPoolItem& rInfo ) const
{
if ( RES_AUTOFMT_DOCNODE != rInfo.Which() || !m_pTxtNode ||
&m_pTxtNode->GetNodes() != static_cast<SwAutoFmtGetDocNode&>(rInfo).pNodes )
{
- return TRUE;
+ return sal_True;
}
static_cast<SwAutoFmtGetDocNode&>(rInfo).pCntntNode = m_pTxtNode;
- return FALSE;
+ return sal_False;
}
@@ -149,17 +149,17 @@ SwCharFmt* SwTxtINetFmt::GetCharFmt()
SetVisited( pDoc->IsVisitedURL( rFmt.GetValue() ) );
SetVisitedValid( true );
}
- USHORT nId;
+ sal_uInt16 nId;
const String& rStr = IsVisited() ? rFmt.GetVisitedFmt()
: rFmt.GetINetFmt();
if( rStr.Len() )
nId = IsVisited() ? rFmt.GetVisitedFmtId() : rFmt.GetINetFmtId();
else
- nId = static_cast<USHORT>(IsVisited() ? RES_POOLCHR_INET_VISIT : RES_POOLCHR_INET_NORMAL);
+ nId = static_cast<sal_uInt16>(IsVisited() ? RES_POOLCHR_INET_VISIT : RES_POOLCHR_INET_NORMAL);
// JP 10.02.2000, Bug 72806: dont modify the doc for getting the
// correct charstyle.
- BOOL bResetMod = !pDoc->IsModified();
+ sal_Bool bResetMod = !pDoc->IsModified();
Link aOle2Lnk;
if( bResetMod )
{
@@ -188,7 +188,7 @@ SwCharFmt* SwTxtINetFmt::GetCharFmt()
void SwTxtINetFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
ASSERT( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich)
|| (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich),
"SwTxtINetFmt::Modify(): unknown Modify");
@@ -201,19 +201,19 @@ void SwTxtINetFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
// erfrage vom Modify Informationen
-BOOL SwTxtINetFmt::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwTxtINetFmt::GetInfo( SfxPoolItem& rInfo ) const
{
if ( RES_AUTOFMT_DOCNODE != rInfo.Which() || !m_pTxtNode ||
&m_pTxtNode->GetNodes() != static_cast<SwAutoFmtGetDocNode&>(rInfo).pNodes )
{
- return TRUE;
+ return sal_True;
}
static_cast<SwAutoFmtGetDocNode&>(rInfo).pCntntNode = m_pTxtNode;
- return FALSE;
+ return sal_False;
}
-BOOL SwTxtINetFmt::IsProtect( ) const
+sal_Bool SwTxtINetFmt::IsProtect( ) const
{
return m_pTxtNode && m_pTxtNode->IsProtect();
}
@@ -237,7 +237,7 @@ SwTxtRuby::~SwTxtRuby()
void SwTxtRuby::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
ASSERT( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich)
|| (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich),
"SwTxtRuby::Modify(): unknown Modify");
@@ -249,16 +249,16 @@ void SwTxtRuby::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
}
}
-BOOL SwTxtRuby::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwTxtRuby::GetInfo( SfxPoolItem& rInfo ) const
{
if( RES_AUTOFMT_DOCNODE != rInfo.Which() || !m_pTxtNode ||
&m_pTxtNode->GetNodes() != static_cast<SwAutoFmtGetDocNode&>(rInfo).pNodes )
{
- return TRUE;
+ return sal_True;
}
static_cast<SwAutoFmtGetDocNode&>(rInfo).pCntntNode = m_pTxtNode;
- return FALSE;
+ return sal_False;
}
SwCharFmt* SwTxtRuby::GetCharFmt()
@@ -270,13 +270,13 @@ SwCharFmt* SwTxtRuby::GetCharFmt()
{
const SwDoc* pDoc = GetTxtNode().GetDoc();
const String& rStr = rFmt.GetCharFmtName();
- USHORT nId = RES_POOLCHR_RUBYTEXT;
+ sal_uInt16 nId = RES_POOLCHR_RUBYTEXT;
if ( rStr.Len() )
nId = rFmt.GetCharFmtId();
// JP 10.02.2000, Bug 72806: dont modify the doc for getting the
// correct charstyle.
- BOOL bResetMod = !pDoc->IsModified();
+ sal_Bool bResetMod = !pDoc->IsModified();
Link aOle2Lnk;
if( bResetMod )
{
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 0630dbd722b6..eb81f8adf5f0 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -120,14 +120,14 @@ bool lcl_IsSkippableWhiteSpace( xub_Unicode cCh )
* only for deleted redlines
*/
-USHORT lcl_MaskRedlines( const SwTxtNode& rNode, XubString& rText,
+sal_uInt16 lcl_MaskRedlines( const SwTxtNode& rNode, XubString& rText,
const xub_StrLen nStt, const xub_StrLen nEnd,
const xub_Unicode cChar )
{
- USHORT nNumOfMaskedRedlines = 0;
+ sal_uInt16 nNumOfMaskedRedlines = 0;
const SwDoc& rDoc = *rNode.GetDoc();
- USHORT nAct = rDoc.GetRedlinePos( rNode, USHRT_MAX );
+ sal_uInt16 nAct = rDoc.GetRedlinePos( rNode, USHRT_MAX );
for ( ; nAct < rDoc.GetRedlineTbl().Count(); nAct++ )
{
@@ -165,13 +165,13 @@ USHORT lcl_MaskRedlines( const SwTxtNode& rNode, XubString& rText,
* Used for spell checking. Deleted redlines and hidden characters are masked
*/
-USHORT lcl_MaskRedlinesAndHiddenText( const SwTxtNode& rNode, XubString& rText,
+sal_uInt16 lcl_MaskRedlinesAndHiddenText( const SwTxtNode& rNode, XubString& rText,
const xub_StrLen nStt, const xub_StrLen nEnd,
const xub_Unicode cChar = CH_TXTATR_INWORD,
bool bCheckShowHiddenChar = true )
{
- USHORT nRedlinesMasked = 0;
- USHORT nHiddenCharsMasked = 0;
+ sal_uInt16 nRedlinesMasked = 0;
+ sal_uInt16 nHiddenCharsMasked = 0;
const SwDoc& rDoc = *rNode.GetDoc();
const bool bShowChg = 0 != IDocumentRedlineAccess::IsShowChanges( rDoc.GetRedlineMode() );
@@ -267,13 +267,13 @@ static SwRect lcl_CalculateRepaintRect( SwTxtFrm& rTxtFrm, xub_StrLen nChgStart,
delete pSt2Pos;
}
- BOOL bSameFrame = TRUE;
+ sal_Bool bSameFrame = sal_True;
if( rTxtFrm.HasFollow() )
{
if( pEndFrm != pStartFrm )
{
- bSameFrame = FALSE;
+ bSameFrame = sal_False;
SwRect aStFrm( pStartFrm->PaintArea() );
{
SWRECTFN( pStartFrm )
@@ -289,7 +289,7 @@ static SwRect lcl_CalculateRepaintRect( SwTxtFrm& rTxtFrm, xub_StrLen nChgStart,
(aRect.*fnRect->fnSetRight)( (aStFrm.*fnRect->fnGetRight)() );
}
aRect.Union( aTmp );
- while( TRUE )
+ while( sal_True )
{
pStartFrm = pStartFrm->GetFollow();
if( pStartFrm == pEndFrm )
@@ -324,7 +324,7 @@ static SwRect lcl_CalculateRepaintRect( SwTxtFrm& rTxtFrm, xub_StrLen nChgStart,
static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
const SfxItemSet* pSet1,
- USHORT nWhichId,
+ sal_uInt16 nWhichId,
const SfxItemSet& rSet2,
boost::shared_ptr<SfxItemSet>& pStyleHandle )
{
@@ -335,9 +335,9 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
if ( !pSet1 )
{
ASSERT( nWhichId, "lcl_HaveCommonAttributes not used correctly" )
- if ( SFX_ITEM_SET == rSet2.GetItemState( nWhichId, FALSE ) )
+ if ( SFX_ITEM_SET == rSet2.GetItemState( nWhichId, sal_False ) )
{
- pNewSet = rSet2.Clone( TRUE );
+ pNewSet = rSet2.Clone( sal_True );
pNewSet->ClearItem( nWhichId );
}
}
@@ -345,12 +345,12 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
{
SfxItemIter aIter( *pSet1 );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
- if ( SFX_ITEM_SET == rSet2.GetItemState( pItem->Which(), FALSE ) )
+ if ( SFX_ITEM_SET == rSet2.GetItemState( pItem->Which(), sal_False ) )
{
if ( !pNewSet )
- pNewSet = rSet2.Clone( TRUE );
+ pNewSet = rSet2.Clone( sal_True );
pNewSet->ClearItem( pItem->Which() );
}
@@ -372,12 +372,12 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
return bRet;
}
-inline BOOL InRange(xub_StrLen nIdx, xub_StrLen nStart, xub_StrLen nEnd) {
+inline sal_Bool InRange(xub_StrLen nIdx, xub_StrLen nStart, xub_StrLen nEnd) {
return ((nIdx >=nStart) && (nIdx <= nEnd));
}
/*
- * void SwTxtNode::RstAttr(const SwIndex &rIdx, USHORT nLen)
+ * void SwTxtNode::RstAttr(const SwIndex &rIdx, sal_uInt16 nLen)
*
* Deletes all attributes, starting at position rIdx, for length nLen.
*/
@@ -397,26 +397,26 @@ inline BOOL InRange(xub_StrLen nIdx, xub_StrLen nStart, xub_StrLen nEnd) {
* -> nothing to do
*/
-void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
- const SfxItemSet* pSet, BOOL bInclRefToxMark )
+void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, sal_uInt16 nWhich,
+ const SfxItemSet* pSet, sal_Bool bInclRefToxMark )
{
// Attribute?
if ( !GetpSwpHints() )
return;
- USHORT i = 0;
+ sal_uInt16 i = 0;
xub_StrLen nStt = rIdx.GetIndex();
xub_StrLen nEnd = nStt + nLen;
xub_StrLen nAttrStart;
SwTxtAttr *pHt;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
// nMin and nMax initialized to maximum / minimum (inverse)
xub_StrLen nMin = m_Text.Len();
xub_StrLen nMax = nStt;
- const BOOL bNoLen = !nMin;
+ const sal_Bool bNoLen = !nMin;
// We have to remember the "new" attributes, which have
// been introduced by splitting surrounding attributes (case 4).
@@ -445,7 +445,7 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
// 1. case: We want to reset only the attributes listed in pSet:
if ( pSet )
{
- bSkipAttr = SFX_ITEM_SET != pSet->GetItemState( pHt->Which(), FALSE );
+ bSkipAttr = SFX_ITEM_SET != pSet->GetItemState( pHt->Which(), sal_False );
if ( bSkipAttr && RES_TXTATR_AUTOFMT == pHt->Which() )
{
// if the current attribute is an autostyle, we have to check if the autostyle
@@ -527,7 +527,7 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
{
m_pSwpHints->NoteInHistory( pHt );
*pHt->GetStart() = nEnd;
- m_pSwpHints->NoteInHistory( pHt, TRUE );
+ m_pSwpHints->NoteInHistory( pHt, sal_True );
if ( pStyleHandle.get() && nAttrStart < nEnd )
{
@@ -536,7 +536,7 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
InsertHint( pNew, nsSetAttrMode::SETATTR_NOHINTADJUST );
}
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
@@ -549,13 +549,13 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
nMin = nAttrStart;
if ( nMax < *pAttrEnd )
nMax = *pAttrEnd;
- bChanged = TRUE;
+ bChanged = sal_True;
const xub_StrLen nAttrEnd = *pAttrEnd;
m_pSwpHints->NoteInHistory( pHt );
*pAttrEnd = nStt;
- m_pSwpHints->NoteInHistory( pHt, TRUE );
+ m_pSwpHints->NoteInHistory( pHt, sal_True );
if ( pStyleHandle.get() )
{
@@ -571,11 +571,11 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
nMin = nAttrStart;
if ( nMax < *pAttrEnd )
nMax = *pAttrEnd;
- bChanged = TRUE;
+ bChanged = sal_True;
xub_StrLen nTmpEnd = *pAttrEnd;
m_pSwpHints->NoteInHistory( pHt );
*pAttrEnd = nStt;
- m_pSwpHints->NoteInHistory( pHt, TRUE );
+ m_pSwpHints->NoteInHistory( pHt, sal_True );
if ( pStyleHandle.get() && nStt < nEnd )
{
@@ -650,13 +650,13 @@ XubString SwTxtNode::GetCurWord( xub_StrLen nPos ) const
sal_Int16 nWordType = WordType::DICTIONARY_WORD;
lang::Locale aLocale( pBreakIt->GetLocale( GetLang( nPos ) ) );
#ifdef DEBUG
- BOOL bBegin = rxBreak->isBeginWord( m_Text, nPos, aLocale, nWordType );
- BOOL bEnd = rxBreak->isEndWord ( m_Text, nPos, aLocale, nWordType );
+ sal_Bool bBegin = rxBreak->isBeginWord( m_Text, nPos, aLocale, nWordType );
+ sal_Bool bEnd = rxBreak->isEndWord ( m_Text, nPos, aLocale, nWordType );
(void)bBegin;
(void)bEnd;
#endif
aBndry =
- rxBreak->getWordBoundary( m_Text, nPos, aLocale, nWordType, TRUE );
+ rxBreak->getWordBoundary( m_Text, nPos, aLocale, nWordType, sal_True );
// if no word was found use previous word (if any)
if (aBndry.startPos == aBndry.endPos)
@@ -676,7 +676,7 @@ XubString SwTxtNode::GetCurWord( xub_StrLen nPos ) const
SwScanner::SwScanner( const SwTxtNode& rNd, const String& rTxt, const LanguageType* pLang,
const ModelToViewHelper::ConversionMap* pConvMap,
- USHORT nType, xub_StrLen nStart, xub_StrLen nEnde, BOOL bClp )
+ sal_uInt16 nType, xub_StrLen nStart, xub_StrLen nEnde, sal_Bool bClp )
: rNode( rNd ), rText( rTxt), pLanguage( pLang ), pConversionMap( pConvMap ), nLen( 0 ), nWordType( nType ), bClip( bClp )
{
ASSERT( rText.Len(), "SwScanner: EmptyString" );
@@ -695,7 +695,7 @@ SwScanner::SwScanner( const SwTxtNode& rNd, const String& rTxt, const LanguageTy
}
}
-BOOL SwScanner::NextWord()
+sal_Bool SwScanner::NextWord()
{
nBegin = nBegin + nLen;
Boundary aBound;
@@ -712,7 +712,7 @@ BOOL SwScanner::NextWord()
{
if ( !pLanguage )
{
- const USHORT nNextScriptType = pBreakIt->GetBreakIter()->getScriptType( rText, nBegin );
+ const sal_uInt16 nNextScriptType = pBreakIt->GetBreakIter()->getScriptType( rText, nBegin );
ModelToViewHelper::ModelPosition aModelBeginPos = ModelToViewHelper::ConvertToModelPosition( pConversionMap, nBegin );
const xub_StrLen nBeginModelPos = (xub_StrLen)aModelBeginPos.mnPos;
aCurrLang = rNode.GetLang( nBeginModelPos, 1, nNextScriptType );
@@ -731,7 +731,7 @@ BOOL SwScanner::NextWord()
}
if ( nBegin >= rText.Len() || nBegin >= nEndPos )
- return FALSE;
+ return sal_False;
// get the word boundaries
aBound = pBreakIt->GetBreakIter()->getWordBoundary( rText, nBegin,
@@ -739,7 +739,7 @@ BOOL SwScanner::NextWord()
//no word boundaries could be found
if(aBound.endPos == aBound.startPos)
- return FALSE;
+ return sal_False;
//if a word before is found it has to be searched for the next
if(aBound.endPos == nBegin)
@@ -756,7 +756,7 @@ BOOL SwScanner::NextWord()
ASSERT( aBound.endPos >= nBegin, "Unexpected aBound result" )
// restrict boundaries to script boundaries and nEndPos
- const USHORT nCurrScript =
+ const sal_uInt16 nCurrScript =
pBreakIt->GetBreakIter()->getScriptType( rText, nBegin );
XubString aTmpWord = rText.Copy( nBegin, static_cast<xub_StrLen>(aBound.endPos - nBegin) );
@@ -781,7 +781,7 @@ BOOL SwScanner::NextWord()
}
else
{
- const USHORT nCurrScript =
+ const sal_uInt16 nCurrScript =
pBreakIt->GetBreakIter()->getScriptType( rText, aBound.startPos );
XubString aTmpWord = rText.Copy( static_cast<xub_StrLen>(aBound.startPos),
static_cast<xub_StrLen>(aBound.endPos - aBound.startPos) );
@@ -802,15 +802,15 @@ BOOL SwScanner::NextWord()
}
if( ! nLen )
- return FALSE;
+ return sal_False;
aWord = rText.Copy( nBegin, nLen );
- return TRUE;
+ return sal_True;
}
-USHORT SwTxtNode::Spell(SwSpellArgs* pArgs)
+sal_uInt16 SwTxtNode::Spell(SwSpellArgs* pArgs)
{
// Die Aehnlichkeiten zu SwTxtFrm::_AutoSpell sind beabsichtigt ...
// ACHTUNG: Ev. Bugs in beiden Routinen fixen!
@@ -939,8 +939,8 @@ USHORT SwTxtNode::Spell(SwSpellArgs* pArgs)
void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM,
- LanguageType nLang, USHORT nLangWhichId,
- const Font *pFont, USHORT nFontWhichId )
+ LanguageType nLang, sal_uInt16 nLangWhichId,
+ const Font *pFont, sal_uInt16 nFontWhichId )
{
sal_uInt16 aRanges[] = {
nLangWhichId, nLangWhichId,
@@ -974,7 +974,7 @@ void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM,
}
-USHORT SwTxtNode::Convert( SwConversionArgs &rArgs )
+sal_uInt16 SwTxtNode::Convert( SwConversionArgs &rArgs )
{
// get range of text within node to be converted
// (either all the text or the the text within the selection
@@ -1105,7 +1105,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV
{
SwRect aRect;
#if OSL_DEBUG_LEVEL > 1
- static BOOL bStop = FALSE;
+ static sal_Bool bStop = sal_False;
if ( bStop )
return aRect;
#endif
@@ -1160,7 +1160,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV
Boundary aBound =
pBreakIt->GetBreakIter()->getWordBoundary( pNode->GetTxt(), nBegin,
pBreakIt->GetLocale( eActLang ),
- WordType::DICTIONARY_WORD, TRUE );
+ WordType::DICTIONARY_WORD, sal_True );
nBegin = xub_StrLen(aBound.startPos);
}
@@ -1174,7 +1174,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV
nInsertPos++;
}
- BOOL bFresh = nBegin < nEnd;
+ sal_Bool bFresh = nBegin < nEnd;
if( nBegin < nEnd )
{
@@ -1200,8 +1200,8 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV
// within the word
LanguageType eActLang = aScanner.GetCurrentLanguage();
- BOOL bSpell = TRUE;
- bSpell = xSpell.is() ? xSpell->hasLanguage( eActLang ) : FALSE;
+ sal_Bool bSpell = sal_True;
+ bSpell = xSpell.is() ? xSpell->hasLanguage( eActLang ) : sal_False;
if( bSpell && rWord.Len() > 0 )
{
// check for: bAlter => xHyphWord.is()
@@ -1320,16 +1320,16 @@ SwRect SwTxtFrm::SmartTagScan( SwCntntNode* /*pActNode*/, xub_StrLen /*nActPos*/
}
}
- const USHORT nNumberOfEntries = pSmartTagList ? pSmartTagList->Count() : 0;
- USHORT nNumberOfRemovedEntries = 0;
- USHORT nNumberOfInsertedEntries = 0;
+ const sal_uInt16 nNumberOfEntries = pSmartTagList ? pSmartTagList->Count() : 0;
+ sal_uInt16 nNumberOfRemovedEntries = 0;
+ sal_uInt16 nNumberOfInsertedEntries = 0;
// clear smart tag list between nBegin and nEnd:
if ( 0 != nNumberOfEntries )
{
xub_StrLen nChgStart = STRING_LEN;
xub_StrLen nChgEnd = 0;
- const USHORT nCurrentIndex = pSmartTagList->GetWrongPos( nBegin );
+ const sal_uInt16 nCurrentIndex = pSmartTagList->GetWrongPos( nBegin );
pSmartTagList->Fresh( nChgStart, nChgEnd, nBegin, nEnd - nBegin, nCurrentIndex, STRING_LEN );
nNumberOfRemovedEntries = nNumberOfEntries - pSmartTagList->Count();
}
@@ -1370,7 +1370,7 @@ SwRect SwTxtFrm::SmartTagScan( SwCntntNode* /*pActNode*/, xub_StrLen /*nActPos*/
pSmartTagList = pNode->GetSmartTags();
- const USHORT nNumberOfEntriesAfterRecognize = pSmartTagList ? pSmartTagList->Count() : 0;
+ const sal_uInt16 nNumberOfEntriesAfterRecognize = pSmartTagList ? pSmartTagList->Count() : 0;
nNumberOfInsertedEntries = nNumberOfEntriesAfterRecognize - ( nNumberOfEntries - nNumberOfRemovedEntries );
}
@@ -1389,7 +1389,7 @@ SwRect SwTxtFrm::SmartTagScan( SwCntntNode* /*pActNode*/, xub_StrLen /*nActPos*/
// Calculate repaint area:
//
#if OSL_DEBUG_LEVEL > 1
- const USHORT nNumberOfEntriesAfterRecognize2 = pSmartTagList->Count();
+ const sal_uInt16 nNumberOfEntriesAfterRecognize2 = pSmartTagList->Count();
(void) nNumberOfEntriesAfterRecognize2;
#endif
if ( nBegin < nEnd && ( 0 != nNumberOfRemovedEntries ||
@@ -1418,12 +1418,12 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
xub_StrLen nBegin = 0;
xub_StrLen nEnd = pNode->GetTxt().Len();
xub_StrLen nLen;
- BOOL bACWDirty = FALSE, bAnyWrd = FALSE;
+ sal_Bool bACWDirty = sal_False, bAnyWrd = sal_False;
if( nBegin < nEnd )
{
- USHORT nCnt = 200;
+ sal_uInt16 nCnt = 200;
SwScanner aScanner( *pNode, pNode->GetTxt(), 0, 0,
WordType::DICTIONARY_WORD, nBegin, nEnd );
while( aScanner.NextWord() )
@@ -1438,10 +1438,10 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
{
if( rACW.GetMinWordLen() <= rWord.Len() )
rACW.InsertWord( rWord, *pDoc );
- bAnyWrd = TRUE;
+ bAnyWrd = sal_True;
}
else
- bACWDirty = TRUE;
+ bACWDirty = sal_True;
}
if( !--nCnt )
{
@@ -1453,7 +1453,7 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
}
if( bAnyWrd && !bACWDirty )
- pNode->SetAutoCompleteWordDirty( FALSE );
+ pNode->SetAutoCompleteWordDirty( sal_False );
}
@@ -1462,15 +1462,15 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
*************************************************************************/
// Findet den TxtFrm und sucht dessen CalcHyph
-BOOL SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
+sal_Bool SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
{
// Abkuerzung: am Absatz ist keine Sprache eingestellt:
- if ( LANGUAGE_NONE == USHORT( GetSwAttrSet().GetLanguage().GetLanguage() )
+ if ( LANGUAGE_NONE == sal_uInt16( GetSwAttrSet().GetLanguage().GetLanguage() )
&& USHRT_MAX == GetLang( 0, m_Text.Len() ) )
{
if( !rHyphInf.IsCheck() )
- rHyphInf.SetNoLang( TRUE );
- return FALSE;
+ rHyphInf.SetNoLang( sal_True );
+ return sal_False;
}
if( pLinguNode != this )
@@ -1489,7 +1489,7 @@ BOOL SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
#if OSL_DEBUG_LEVEL > 1
ASSERT( pFrm, "!SwTxtNode::Hyphenate: can't find any frame" );
#endif
- return FALSE;
+ return sal_False;
}
while( pFrm )
@@ -1500,7 +1500,7 @@ BOOL SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
// (7821, 7662, 7408); vgl. layact.cxx,
// SwLayAction::_TurboAction(), if( !pCnt->IsValid() ...
pFrm->SetCompletePaint();
- return TRUE;
+ return sal_True;
}
pFrm = (SwTxtFrm*)(pFrm->GetFollow());
if( pFrm )
@@ -1509,7 +1509,7 @@ BOOL SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
rHyphInf.nStart = pFrm->GetOfst();
}
}
- return FALSE;
+ return sal_False;
}
#ifdef LINGU_STATISTIK
@@ -1524,7 +1524,7 @@ void SwLinguStatistik::Flush()
return ;
static char *pLogName = 0;
- const BOOL bFirstOpen = pLogName ? FALSE : TRUE;
+ const sal_Bool bFirstOpen = pLogName ? sal_False : sal_True;
if( bFirstOpen )
{
char *pPath = getenv( "TEMP" );
@@ -1628,12 +1628,12 @@ void SwTxtNode::TransliterateText(
GetTxt(), nStt,
pBreakIt->GetLocale( GetLang( nStt ) ),
nWordType,
- TRUE /*prefer forward direction*/);
+ sal_True /*prefer forward direction*/);
aEndBndry = pBreakIt->GetBreakIter()->getWordBoundary(
GetTxt(), nEnd,
pBreakIt->GetLocale( GetLang( nEnd ) ),
nWordType,
- FALSE /*prefer backward direction*/);
+ sal_False /*prefer backward direction*/);
// prevent backtracking to the previous word if selection is at word boundary
if (aSttBndry.endPos <= nStt)
@@ -1850,7 +1850,7 @@ void SwTxtNode::ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen,
while( nI + nCnt < nTLen && nOff == pOffsets[ nI + nCnt ] )
++nCnt;
- Update( SwIndex( this, nMyOff ), nCnt, FALSE );
+ Update( SwIndex( this, nMyOff ), nCnt, sal_False );
nMyOff = nOff;
//nMyOff -= nCnt;
nI += nCnt - 1;
@@ -1858,13 +1858,13 @@ void SwTxtNode::ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen,
else if( nOff > nMyOff )
{
// something is deleted
- Update( SwIndex( this, nMyOff+1 ), nOff - nMyOff, TRUE );
+ Update( SwIndex( this, nMyOff+1 ), nOff - nMyOff, sal_True );
nMyOff = nOff;
}
}
if( nMyOff < nLen )
// something is deleted at the end
- Update( SwIndex( this, nMyOff ), nLen - nMyOff, TRUE );
+ Update( SwIndex( this, nMyOff ), nLen - nMyOff, sal_True );
// notify the layout!
SwDelTxt aDelHint( nPos, nTLen );
@@ -1883,8 +1883,8 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
if ( !IsHidden() )
{
++rStat.nPara;
- ULONG nTmpWords = 0;
- ULONG nTmpChars = 0;
+ sal_uLong nTmpWords = 0;
+ sal_uLong nTmpChars = 0;
// Shortcut: Whole paragraph should be considered and cached values
// are valid:
@@ -1900,7 +1900,7 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
// fills the deleted redlines and hidden ranges with cChar:
const xub_Unicode cChar(' ');
- const USHORT nNumOfMaskedChars =
+ const sal_uInt16 nNumOfMaskedChars =
lcl_MaskRedlinesAndHiddenText( *this, rCastStr, nStt, nEnd, cChar, false );
// expand fields
@@ -1989,8 +1989,8 @@ struct SwParaIdleData_Impl
SwWrongList* pWrong; // for spell checking
SwGrammarMarkUp* pGrammarCheck; // for grammar checking / proof reading
SwWrongList* pSmartTags;
- ULONG nNumberOfWords;
- ULONG nNumberOfChars;
+ sal_uLong nNumberOfWords;
+ sal_uLong nNumberOfChars;
bool bWordCountDirty : 1;
bool bWrongDirty : 1; // Ist das Wrong-Feld auf invalid?
bool bGrammarCheckDirty : 1;
@@ -2088,25 +2088,25 @@ SwWrongList* SwTxtNode::GetSmartTags()
return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->pSmartTags : 0;
}
-void SwTxtNode::SetParaNumberOfWords( ULONG nNew ) const
+void SwTxtNode::SetParaNumberOfWords( sal_uLong nNew ) const
{
if ( m_pParaIdleData_Impl )
{
m_pParaIdleData_Impl->nNumberOfWords = nNew;
}
}
-ULONG SwTxtNode::GetParaNumberOfWords() const
+sal_uLong SwTxtNode::GetParaNumberOfWords() const
{
return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->nNumberOfWords : 0;
}
-void SwTxtNode::SetParaNumberOfChars( ULONG nNew ) const
+void SwTxtNode::SetParaNumberOfChars( sal_uLong nNew ) const
{
if ( m_pParaIdleData_Impl )
{
m_pParaIdleData_Impl->nNumberOfChars = nNew;
}
}
-ULONG SwTxtNode::GetParaNumberOfChars() const
+sal_uLong SwTxtNode::GetParaNumberOfChars() const
{
return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->nNumberOfChars : 0;
}
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx
index 8a3c6c507c93..52ee35815997 100644
--- a/sw/source/core/undo/SwUndoField.cxx
+++ b/sw/source/core/undo/SwUndoField.cxx
@@ -65,7 +65,7 @@ SwPosition SwUndoField::GetPosition()
SwUndoFieldFromDoc::SwUndoFieldFromDoc(const SwPosition & rPos,
const SwField & rOldField,
const SwField & rNewField,
- SwMsgPoolItem * _pHnt, BOOL _bUpdate, SwUndoId _nId)
+ SwMsgPoolItem * _pHnt, sal_Bool _bUpdate, SwUndoId _nId)
: SwUndoField(rPos,_nId)
, pOldField(rOldField.CopyField())
, pNewField(rNewField.CopyField())
@@ -90,9 +90,9 @@ void SwUndoFieldFromDoc::Undo( SwUndoIter& )
if (pField)
{
- BOOL bUndo = pDoc->DoesUndo();
+ sal_Bool bUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
+ pDoc->DoUndo(sal_False);
pDoc->UpdateFld(pTxtFld, *pOldField, pHnt, bUpdate);
pDoc->DoUndo(bUndo);
}
@@ -105,9 +105,9 @@ void SwUndoFieldFromDoc::Redo( SwUndoIter& )
if (pField)
{
- BOOL bUndo = pDoc->DoesUndo();
+ sal_Bool bUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
+ pDoc->DoUndo(sal_False);
pDoc->UpdateFld(pTxtFld, *pNewField, pHnt, bUpdate);
SwFmtFld* pDstFmtFld = (SwFmtFld*)&pTxtFld->GetFld();
@@ -124,7 +124,7 @@ void SwUndoFieldFromDoc::Repeat(SwUndoIter & rIt)
SwUndoFieldFromAPI::SwUndoFieldFromAPI(const SwPosition & rPos,
const Any & rOldVal, const Any & rNewVal,
- USHORT _nWhich)
+ sal_uInt16 _nWhich)
: SwUndoField(rPos), aOldVal(rOldVal), aNewVal(rNewVal), nWhich(_nWhich)
{
}
diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx
index f3b2fe4d1a25..dffdf3cc8b02 100644
--- a/sw/source/core/undo/SwUndoFmt.cxx
+++ b/sw/source/core/undo/SwUndoFmt.cxx
@@ -44,7 +44,7 @@
SwUndoFmtCreate::SwUndoFmtCreate
(SwUndoId nUndoId, SwFmt * _pNew, SwFmt * _pDerivedFrom, SwDoc * _pDoc)
: SwUndo(nUndoId), pNew(_pNew),
- pDoc(_pDoc), pNewSet(NULL), nId(0), bAuto(FALSE)
+ pDoc(_pDoc), pNewSet(NULL), nId(0), bAuto(sal_False)
{
if (_pDerivedFrom)
sDerivedFrom = _pDerivedFrom->GetName();
@@ -70,9 +70,9 @@ void SwUndoFmtCreate::Undo(SwUndoIter &)
nId = pNew->GetPoolFmtId() & COLL_GET_RANGE_BITS;
bAuto = pNew->IsAuto();
- BOOL bDoesUndo = pDoc->DoesUndo();
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
+ pDoc->DoUndo(sal_False);
Delete();
pDoc->DoUndo(bDoesUndo);
}
@@ -81,9 +81,9 @@ void SwUndoFmtCreate::Undo(SwUndoIter &)
void SwUndoFmtCreate::Redo(SwUndoIter &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
+ pDoc->DoUndo(sal_False);
SwFmt * pDerivedFrom = Find(sDerivedFrom);
SwFmt * pFmt = Create(pDerivedFrom);
@@ -132,9 +132,9 @@ SwUndoFmtDelete::~SwUndoFmtDelete()
void SwUndoFmtDelete::Undo(SwUndoIter &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
+ pDoc->DoUndo(sal_False);
SwFmt * pDerivedFrom = Find(sDerivedFrom);
@@ -159,9 +159,9 @@ void SwUndoFmtDelete::Redo(SwUndoIter &)
if (pOld)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
+ pDoc->DoUndo(sal_False);
Delete(pOld);
pDoc->DoUndo(bDoesUndo);
}
@@ -196,10 +196,10 @@ void SwUndoRenameFmt::Undo(SwUndoIter &)
if (pFmt)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
- pDoc->RenameFmt(*pFmt, sOldName, TRUE);
+ pDoc->DoUndo(sal_False);
+ pDoc->RenameFmt(*pFmt, sOldName, sal_True);
pDoc->DoUndo(bDoesUndo);
}
}
@@ -210,10 +210,10 @@ void SwUndoRenameFmt::Redo(SwUndoIter &)
if (pFmt)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
- pDoc->RenameFmt(*pFmt, sNewName, TRUE);
+ pDoc->DoUndo(sal_False);
+ pDoc->RenameFmt(*pFmt, sNewName, sal_True);
pDoc->DoUndo(bDoesUndo);
}
}
@@ -237,12 +237,12 @@ SwUndoTxtFmtCollCreate::SwUndoTxtFmtCollCreate
SwFmt * SwUndoTxtFmtCollCreate::Create(SwFmt * pDerivedFrom)
{
- return pDoc->MakeTxtFmtColl(sNewName, (SwTxtFmtColl *)pDerivedFrom, TRUE);
+ return pDoc->MakeTxtFmtColl(sNewName, (SwTxtFmtColl *)pDerivedFrom, sal_True);
}
void SwUndoTxtFmtCollCreate::Delete()
{
- pDoc->DelTxtFmtColl((SwTxtFmtColl *) pNew, TRUE);
+ pDoc->DelTxtFmtColl((SwTxtFmtColl *) pNew, sal_True);
}
SwFmt * SwUndoTxtFmtCollCreate::Find(const String & rName) const
@@ -258,12 +258,12 @@ SwUndoTxtFmtCollDelete::SwUndoTxtFmtCollDelete(SwTxtFmtColl * _pOld,
SwFmt * SwUndoTxtFmtCollDelete::Create(SwFmt * pDerivedFrom)
{
- return pDoc->MakeTxtFmtColl(sOldName, (SwTxtFmtColl *) pDerivedFrom, TRUE);
+ return pDoc->MakeTxtFmtColl(sOldName, (SwTxtFmtColl *) pDerivedFrom, sal_True);
}
void SwUndoTxtFmtCollDelete::Delete(SwFmt * pOld)
{
- pDoc->DelTxtFmtColl((SwTxtFmtColl *) pOld, TRUE);
+ pDoc->DelTxtFmtColl((SwTxtFmtColl *) pOld, sal_True);
}
SwFmt * SwUndoTxtFmtCollDelete::Find(const String & rName) const
@@ -292,12 +292,12 @@ SwUndoCharFmtCreate::SwUndoCharFmtCreate(SwCharFmt * pNewFmt,
SwFmt * SwUndoCharFmtCreate::Create(SwFmt * pDerivedFrom)
{
- return pDoc->MakeCharFmt(sNewName, (SwCharFmt *) pDerivedFrom, TRUE);
+ return pDoc->MakeCharFmt(sNewName, (SwCharFmt *) pDerivedFrom, sal_True);
}
void SwUndoCharFmtCreate::Delete()
{
- pDoc->DelCharFmt((SwCharFmt *) pNew, TRUE);
+ pDoc->DelCharFmt((SwCharFmt *) pNew, sal_True);
}
SwFmt * SwUndoCharFmtCreate::Find(const String & rName) const
@@ -312,12 +312,12 @@ SwUndoCharFmtDelete::SwUndoCharFmtDelete(SwCharFmt * pOld, SwDoc * pDocument)
SwFmt * SwUndoCharFmtDelete::Create(SwFmt * pDerivedFrom)
{
- return pDoc->MakeCharFmt(sOldName, (SwCharFmt *) pDerivedFrom, TRUE);
+ return pDoc->MakeCharFmt(sOldName, (SwCharFmt *) pDerivedFrom, sal_True);
}
void SwUndoCharFmtDelete::Delete(SwFmt * pFmt)
{
- pDoc->DelCharFmt((SwCharFmt *) pFmt, TRUE);
+ pDoc->DelCharFmt((SwCharFmt *) pFmt, sal_True);
}
SwFmt * SwUndoCharFmtDelete::Find(const String & rName) const
@@ -347,12 +347,12 @@ SwUndoFrmFmtCreate::SwUndoFrmFmtCreate(SwFrmFmt * pNewFmt,
SwFmt * SwUndoFrmFmtCreate::Create(SwFmt * pDerivedFrom)
{
- return pDoc->MakeFrmFmt(sNewName, (SwFrmFmt *) pDerivedFrom, TRUE, bAuto);
+ return pDoc->MakeFrmFmt(sNewName, (SwFrmFmt *) pDerivedFrom, sal_True, bAuto);
}
void SwUndoFrmFmtCreate::Delete()
{
- pDoc->DelFrmFmt((SwFrmFmt *) pNew, TRUE);
+ pDoc->DelFrmFmt((SwFrmFmt *) pNew, sal_True);
}
SwFmt * SwUndoFrmFmtCreate::Find(const String & rName) const
@@ -367,12 +367,12 @@ SwUndoFrmFmtDelete::SwUndoFrmFmtDelete(SwFrmFmt * pOld, SwDoc * pDocument)
SwFmt * SwUndoFrmFmtDelete::Create(SwFmt * pDerivedFrom)
{
- return pDoc->MakeFrmFmt(sOldName, (SwFrmFmt *) pDerivedFrom, TRUE);
+ return pDoc->MakeFrmFmt(sOldName, (SwFrmFmt *) pDerivedFrom, sal_True);
}
void SwUndoFrmFmtDelete::Delete(SwFmt * pFmt)
{
- pDoc->DelFrmFmt((SwFrmFmt *) pFmt, TRUE);
+ pDoc->DelFrmFmt((SwFrmFmt *) pFmt, sal_True);
}
SwFmt * SwUndoFrmFmtDelete::Find(const String & rName) const
@@ -401,9 +401,9 @@ SwUndoNumruleCreate::SwUndoNumruleCreate(const SwNumRule * _pNew,
void SwUndoNumruleCreate::Undo(SwUndoIter &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
+ pDoc->DoUndo(sal_False);
if (! bInitialized)
{
@@ -411,16 +411,16 @@ void SwUndoNumruleCreate::Undo(SwUndoIter &)
bInitialized = true;
}
- pDoc->DelNumRule(aNew.GetName(), TRUE);
+ pDoc->DelNumRule(aNew.GetName(), sal_True);
pDoc->DoUndo(bDoesUndo);
}
void SwUndoNumruleCreate::Redo(SwUndoIter &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
- pDoc->MakeNumRule(aNew.GetName(), &aNew, TRUE);
+ pDoc->DoUndo(sal_False);
+ pDoc->MakeNumRule(aNew.GetName(), &aNew, sal_True);
pDoc->DoUndo(bDoesUndo);
}
@@ -447,19 +447,19 @@ SwUndoNumruleDelete::SwUndoNumruleDelete(const SwNumRule & rRule,
void SwUndoNumruleDelete::Undo(SwUndoIter &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
- pDoc->MakeNumRule(aOld.GetName(), &aOld, TRUE);
+ pDoc->DoUndo(sal_False);
+ pDoc->MakeNumRule(aOld.GetName(), &aOld, sal_True);
pDoc->DoUndo(bDoesUndo);
}
void SwUndoNumruleDelete::Redo(SwUndoIter &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
- pDoc->DelNumRule(aOld.GetName(), TRUE);
+ pDoc->DoUndo(sal_False);
+ pDoc->DelNumRule(aOld.GetName(), sal_True);
pDoc->DoUndo(bDoesUndo);
}
@@ -482,19 +482,19 @@ SwUndoNumruleRename::SwUndoNumruleRename(const String & _aOldName,
void SwUndoNumruleRename::Undo(SwUndoIter &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
- pDoc->RenameNumRule(aNewName, aOldName, TRUE);
+ pDoc->DoUndo(sal_False);
+ pDoc->RenameNumRule(aNewName, aOldName, sal_True);
pDoc->DoUndo(bDoesUndo);
}
void SwUndoNumruleRename::Redo(SwUndoIter &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
- pDoc->RenameNumRule(aOldName, aNewName, TRUE);
+ pDoc->DoUndo(sal_False);
+ pDoc->RenameNumRule(aOldName, aNewName, sal_True);
pDoc->DoUndo(bDoesUndo);
}
diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx
index 9a395375eabe..0360b246f342 100644
--- a/sw/source/core/undo/SwUndoPageDesc.cxx
+++ b/sw/source/core/undo/SwUndoPageDesc.cxx
@@ -48,10 +48,10 @@
// Pure debug help function to have a quick look at the header/footer attributes.
void DebugHeaderFooterContent( const SwPageDesc& rPageDesc )
{
- ULONG nHeaderMaster = ULONG_MAX;
- ULONG nHeaderLeft = ULONG_MAX;
- ULONG nFooterMaster = ULONG_MAX;
- ULONG nFooterLeft = ULONG_MAX;
+ sal_uLong nHeaderMaster = ULONG_MAX;
+ sal_uLong nHeaderLeft = ULONG_MAX;
+ sal_uLong nFooterMaster = ULONG_MAX;
+ sal_uLong nFooterLeft = ULONG_MAX;
int nHeaderCount = 0;
int nLeftHeaderCount = 0;
int nFooterCount = 0;
@@ -235,7 +235,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
// Let the destination page descrition point to the source node position,
// from now on this descriptor is responsible for the content nodes!
const SfxPoolItem* pItem;
- rDest.GetMaster().GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem );
+ rDest.GetMaster().GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem );
SfxPoolItem *pNewItem = pItem->Clone();
SwFrmFmt* pNewFmt = ((SwFmtHeader*)pNewItem)->GetHeaderFmt();
#ifdef DEBUG
@@ -249,7 +249,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
// Let the source page description point to zero node position,
// it loses the responsible and can be destroyed without removing the content nodes.
- rSource.GetMaster().GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem );
+ rSource.GetMaster().GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem );
pNewItem = pItem->Clone();
pNewFmt = ((SwFmtHeader*)pNewItem)->GetHeaderFmt();
pNewFmt->SetFmtAttr( SwFmtCntnt() );
@@ -259,7 +259,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
{
// Same procedure for unshared header..
const SwFmtHeader& rSourceLeftHead = rSource.GetLeft().GetHeader();
- rDest.GetLeft().GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem );
+ rDest.GetLeft().GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem );
pNewItem = pItem->Clone();
pNewFmt = ((SwFmtHeader*)pNewItem)->GetHeaderFmt();
#ifdef DEBUG
@@ -270,7 +270,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
#endif
pNewFmt->SetFmtAttr( rSourceLeftHead.GetHeaderFmt()->GetCntnt() );
delete pNewItem;
- rSource.GetLeft().GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem );
+ rSource.GetLeft().GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem );
pNewItem = pItem->Clone();
pNewFmt = ((SwFmtHeader*)pNewItem)->GetHeaderFmt();
pNewFmt->SetFmtAttr( SwFmtCntnt() );
@@ -283,7 +283,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
if( rDestFoot.IsActive() )
{
const SfxPoolItem* pItem;
- rDest.GetMaster().GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem );
+ rDest.GetMaster().GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem );
SfxPoolItem *pNewItem = pItem->Clone();
SwFrmFmt *pNewFmt = ((SwFmtFooter*)pNewItem)->GetFooterFmt();
pNewFmt->SetFmtAttr( rSourceFoot.GetFooterFmt()->GetCntnt() );
@@ -295,7 +295,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
const SwFmtCntnt& rFooterDestCntnt = rDestFoot.GetFooterFmt()->GetCntnt();
(void)rFooterDestCntnt;
#endif
- rSource.GetMaster().GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem );
+ rSource.GetMaster().GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem );
pNewItem = pItem->Clone();
pNewFmt = ((SwFmtFooter*)pNewItem)->GetFooterFmt();
pNewFmt->SetFmtAttr( SwFmtCntnt() );
@@ -311,12 +311,12 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
(void)rFooterSourceCntnt2;
(void)rFooterDestCntnt2;
#endif
- rDest.GetLeft().GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem );
+ rDest.GetLeft().GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem );
pNewItem = pItem->Clone();
pNewFmt = ((SwFmtFooter*)pNewItem)->GetFooterFmt();
pNewFmt->SetFmtAttr( rSourceLeftFoot.GetFooterFmt()->GetCntnt() );
delete pNewItem;
- rSource.GetLeft().GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem );
+ rSource.GetLeft().GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem );
pNewItem = pItem->Clone();
pNewFmt = ((SwFmtFooter*)pNewItem)->GetFooterFmt();
pNewFmt->SetFmtAttr( SwFmtCntnt() );
@@ -327,9 +327,9 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
void SwUndoPageDesc::Undo(SwUndoIter &)
{
- BOOL bUndo = pDoc->DoesUndo();
+ sal_Bool bUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
+ pDoc->DoUndo(sal_False);
// Move (header/footer)content node responsibility from new page descriptor to old one again.
if( bExchange )
@@ -340,9 +340,9 @@ void SwUndoPageDesc::Undo(SwUndoIter &)
void SwUndoPageDesc::Redo(SwUndoIter &)
{
- BOOL bUndo = pDoc->DoesUndo();
+ sal_Bool bUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
+ pDoc->DoUndo(sal_False);
// Move (header/footer)content node responsibility from old page descriptor to new one again.
if( bExchange )
@@ -381,9 +381,9 @@ SwUndoPageDescCreate::~SwUndoPageDescCreate()
void SwUndoPageDescCreate::Undo(SwUndoIter &)
{
- BOOL bUndo = pDoc->DoesUndo();
+ sal_Bool bUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
+ pDoc->DoUndo(sal_False);
// -> #116530#
if (pDesc)
@@ -393,19 +393,19 @@ void SwUndoPageDescCreate::Undo(SwUndoIter &)
}
// <- #116530#
- pDoc->DelPageDesc(aNew.GetName(), TRUE);
+ pDoc->DelPageDesc(aNew.GetName(), sal_True);
pDoc->DoUndo(bUndo);
}
void SwUndoPageDescCreate::Redo(SwUndoIter &)
{
- BOOL bUndo = pDoc->DoesUndo();
+ sal_Bool bUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
+ pDoc->DoUndo(sal_False);
SwPageDesc aPageDesc = aNew;
- pDoc->MakePageDesc(aNew.GetName(), &aPageDesc, FALSE, TRUE); // #116530#
+ pDoc->MakePageDesc(aNew.GetName(), &aPageDesc, sal_False, sal_True); // #116530#
pDoc->DoUndo(bUndo);
}
@@ -441,21 +441,21 @@ SwUndoPageDescDelete::~SwUndoPageDescDelete()
void SwUndoPageDescDelete::Undo(SwUndoIter &)
{
- BOOL bUndo = pDoc->DoesUndo();
+ sal_Bool bUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
+ pDoc->DoUndo(sal_False);
SwPageDesc aPageDesc = aOld;
- pDoc->MakePageDesc(aOld.GetName(), &aPageDesc, FALSE, TRUE); // #116530#
+ pDoc->MakePageDesc(aOld.GetName(), &aPageDesc, sal_False, sal_True); // #116530#
pDoc->DoUndo(bUndo);
}
void SwUndoPageDescDelete::Redo(SwUndoIter &)
{
- BOOL bUndo = pDoc->DoesUndo();
+ sal_Bool bUndo = pDoc->DoesUndo();
- pDoc->DoUndo(FALSE);
- pDoc->DelPageDesc(aOld.GetName(), TRUE); // #116530#
+ pDoc->DoUndo(sal_False);
+ pDoc->DelPageDesc(aOld.GetName(), sal_True); // #116530#
pDoc->DoUndo(bUndo);
}
diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx
index 85adbd1c7138..71b4f0926e7c 100644
--- a/sw/source/core/undo/docundo.cxx
+++ b/sw/source/core/undo/docundo.cxx
@@ -46,7 +46,7 @@
using namespace ::com::sun::star;
-USHORT SwDoc::nUndoActions = UNDO_ACTION_COUNT; // anzahl von Undo-Action
+sal_uInt16 SwDoc::nUndoActions = UNDO_ACTION_COUNT; // anzahl von Undo-Action
// the undo array should never grow beyond this limit:
#define UNDO_ACTION_LIMIT (USHRT_MAX - 1000)
@@ -60,11 +60,11 @@ SV_IMPL_PTRARR( SwUndoIds, SwUndoIdAndNamePtr )
class UndoArrStatus : public WorkWindow
{
- USHORT nUndo, nUndoNds;
+ sal_uInt16 nUndo, nUndoNds;
virtual void Paint( const Rectangle& );
public:
UndoArrStatus();
- void Set( USHORT, USHORT );
+ void Set( sal_uInt16, sal_uInt16 );
};
static UndoArrStatus* pUndoMsgWin = 0;
@@ -78,7 +78,7 @@ UndoArrStatus::UndoArrStatus()
}
-void UndoArrStatus::Set( USHORT n1, USHORT n2 )
+void UndoArrStatus::Set( sal_uInt16 n1, sal_uInt16 n2 )
{
nUndo = n1; nUndoNds = n2;
Invalidate();
@@ -197,14 +197,14 @@ void SwDoc::AppendUndo( SwUndo* pUndo )
// - AttrHistory Grenze: USHRT_MAX - 1000
// (defined in UNDO_ACTION_LIMIT at the top of this file)
- USHORT nEnde = UNDO_ACTION_LIMIT;
+ sal_uInt16 nEnde = UNDO_ACTION_LIMIT;
// nur zum Testen der neuen DOC-Member
#ifdef DBG_UTIL
{
SwUndoId nId = UNDO_EMPTY;
- USHORT nUndosCnt = 0, nSttEndCnt = 0;
- for( USHORT nCnt = 0; nCnt < nUndoPos; ++nCnt )
+ sal_uInt16 nUndosCnt = 0, nSttEndCnt = 0;
+ for( sal_uInt16 nCnt = 0; nCnt < nUndoPos; ++nCnt )
{
if( UNDO_START == ( nId = (*pUndos)[ nCnt ]->GetId()) )
++nSttEndCnt;
@@ -225,7 +225,7 @@ void SwDoc::AppendUndo( SwUndo* pUndo )
DelUndoObj( nUndoCnt - SwDoc::nUndoActions );
else
{
- USHORT nUndosCnt = nUndoCnt;
+ sal_uInt16 nUndosCnt = nUndoCnt;
// immer 1/10 loeschen bis der "Ausloeser" behoben ist
while( aUndoNodes.Count() && nEnde < aUndoNodes.Count() )
DelUndoObj( nUndosCnt / 10 );
@@ -242,7 +242,7 @@ void SwDoc::ClearRedo()
{
// setze UndoCnt auf den neuen Wert
SwUndo* pUndo;
- for( USHORT nCnt = pUndos->Count(); nUndoPos < nCnt; --nUndoCnt )
+ for( sal_uInt16 nCnt = pUndos->Count(); nUndoPos < nCnt; --nUndoCnt )
// Klammerung ueberspringen
if( UNDO_END == (pUndo = (*pUndos)[ --nCnt ])->GetId() )
nCnt = nCnt - ((SwUndoEnd*)pUndo)->GetSttOffset();
@@ -259,11 +259,11 @@ void SwDoc::DelAllUndoObj()
{
ClearRedo();
- DoUndo( FALSE );
+ DoUndo( sal_False );
// Offene Undo-Klammerungen erhalten !!
SwUndo* pUndo;
- USHORT nSize = pUndos->Count();
+ sal_uInt16 nSize = pUndos->Count();
while( nSize )
if( UNDO_START != ( pUndo = (*pUndos)[ --nSize ] )->GetId() ||
((SwUndoStart*)pUndo)->GetEndOffset() )
@@ -279,26 +279,26 @@ void SwDoc::DelAllUndoObj()
nUndoCnt = nUndoSttEnd = nUndoPos = 0;
*/
nUndoSavePos = USHRT_MAX;
- DoUndo( TRUE );
+ DoUndo( sal_True );
}
// loescht alle UndoObjecte vom Anfang bis zum angegebenen Ende
-BOOL SwDoc::DelUndoObj( USHORT nEnde )
+sal_Bool SwDoc::DelUndoObj( sal_uInt16 nEnde )
{
if( !nEnde ) // sollte mal 0 uebergeben werden,
{
if( !pUndos->Count() )
- return FALSE;
+ return sal_False;
++nEnde; // dann korrigiere es auf 1
}
- DoUndo( FALSE );
+ DoUndo( sal_False );
// pruefe erstmal, wo das Ende steht
SwUndoId nId = UNDO_EMPTY;
- USHORT nSttEndCnt = 0;
- USHORT nCnt;
+ sal_uInt16 nSttEndCnt = 0;
+ sal_uInt16 nCnt;
for( nCnt = 0; nEnde && nCnt < nUndoPos; ++nCnt )
{
@@ -324,8 +324,8 @@ BOOL SwDoc::DelUndoObj( USHORT nEnde )
pUndos->DeleteAndDestroy( --nSttEndCnt, 1 );
nUndoPos = pUndos->Count();
- DoUndo( TRUE );
- return TRUE;
+ DoUndo( sal_True );
+ return sal_True;
}
/**************** UNDO ******************/
@@ -345,7 +345,7 @@ SwUndoNoModifiedPosition SwDoc::getUndoNoModifiedPosition() const
bool SwDoc::HasUndoId(SwUndoId eId) const
{
- USHORT nSize = nUndoPos;
+ sal_uInt16 nSize = nUndoPos;
SwUndo * pUndo;
while( nSize-- )
if( ( pUndo = (*pUndos)[nSize])->GetId() == eId ||
@@ -354,10 +354,10 @@ bool SwDoc::HasUndoId(SwUndoId eId) const
|| ( UNDO_END == pUndo->GetId() &&
((SwUndoEnd*)pUndo)->GetUserId() == eId ) )
{
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -365,13 +365,13 @@ bool SwDoc::Undo( SwUndoIter& rUndoIter )
{
if ( (rUndoIter.GetId()!=0) && (!HasUndoId(rUndoIter.GetId())) )
{
- rUndoIter.bWeiter = FALSE;
- return FALSE;
+ rUndoIter.bWeiter = sal_False;
+ return sal_False;
}
if( !nUndoPos )
{
- rUndoIter.bWeiter = FALSE;
- return FALSE;
+ rUndoIter.bWeiter = sal_False;
+ return sal_False;
}
SwUndo *pUndo = (*pUndos)[ --nUndoPos ];
@@ -408,7 +408,7 @@ bool SwDoc::Undo( SwUndoIter& rUndoIter )
if( UNDO_REPLACE == nAktId && ((SwUndoReplace*)pUndo)->nAktPos )
{
++nUndoPos;
- return TRUE;
+ return sal_True;
}
// Objekt aus History entfernen und zerstoeren
@@ -427,7 +427,7 @@ bool SwDoc::Undo( SwUndoIter& rUndoIter )
if( nUndoSavePos == nUndoPos )
ResetModified();
- return TRUE;
+ return sal_True;
}
@@ -456,7 +456,7 @@ SwUndoId SwDoc::StartUndo( SwUndoId eUndoId, const SwRewriter * pRewriter )
SwUndoId SwDoc::EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter)
{
- USHORT nSize = nUndoPos;
+ sal_uInt16 nSize = nUndoPos;
if( !mbUndo || !nSize-- )
return UNDO_EMPTY;
@@ -477,7 +477,7 @@ SwUndoId SwDoc::EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter)
if( nUndoPos != pUndos->Count() )
{
// setze UndoCnt auf den neuen Wert
- for( USHORT nCnt = pUndos->Count(); nUndoPos < nCnt; --nUndoCnt )
+ for( sal_uInt16 nCnt = pUndos->Count(); nUndoPos < nCnt; --nUndoCnt )
// Klammerung ueberspringen
if( UNDO_END == (pUndo = (*pUndos)[ --nCnt ])->GetId() )
nCnt = nCnt - ((SwUndoEnd*)pUndo)->GetSttOffset();
@@ -505,7 +505,7 @@ SwUndoId SwDoc::EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter)
nUndoCnt = 0;
// setze UndoCnt auf den neuen Wert
SwUndo* pTmpUndo;
- for( USHORT nCnt = 0; nCnt < pUndos->Count(); ++nCnt, ++nUndoCnt )
+ for( sal_uInt16 nCnt = 0; nCnt < pUndos->Count(); ++nCnt, ++nUndoCnt )
// Klammerung ueberspringen
if( UNDO_START == (pTmpUndo = (*pUndos)[ nCnt ])->GetId() )
nCnt = nCnt + ((SwUndoStart*)pTmpUndo)->GetEndOffset();
@@ -530,8 +530,8 @@ SwUndoId SwDoc::EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter)
DelUndoObj( nUndoCnt - SwDoc::nUndoActions );
else
{
- USHORT nEnde = USHRT_MAX - 1000;
- USHORT nUndosCnt = nUndoCnt;
+ sal_uInt16 nEnde = USHRT_MAX - 1000;
+ sal_uInt16 nUndosCnt = nUndoCnt;
// immer 1/10 loeschen bis der "Ausloeser" behoben ist
while( aUndoNodes.Count() && nEnde < aUndoNodes.Count() )
DelUndoObj( nUndosCnt / 10 );
@@ -550,7 +550,7 @@ SwUndoId SwDoc::EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter)
// nur zum Testen der Start/End-Verpointerung vom Start/End Undo
#ifdef DBG_UTIL
{
- USHORT nEndCnt = 1, nCnt = pUndos->Count();
+ sal_uInt16 nEndCnt = 1, nCnt = pUndos->Count();
SwUndoId nTmpId = UNDO_EMPTY;
while( nCnt )
{
@@ -684,7 +684,7 @@ SwUndoIdAndName * lcl_GetUndoIdAndName(const SwUndos & rUndos, sal_uInt16 nPos )
do
{
nTmpPos--;
- pTmpUndo = rUndos[ static_cast<USHORT>(nTmpPos) ];
+ pTmpUndo = rUndos[ static_cast<sal_uInt16>(nTmpPos) ];
if (pTmpUndo->GetEffectiveId() > UNDO_END)
nSubstitute = nTmpPos;
@@ -693,7 +693,7 @@ SwUndoIdAndName * lcl_GetUndoIdAndName(const SwUndos & rUndos, sal_uInt16 nPos )
if (nSubstitute >= 0)
{
- SwUndo * pSubUndo = rUndos[ static_cast<USHORT>(nSubstitute) ];
+ SwUndo * pSubUndo = rUndos[ static_cast<sal_uInt16>(nSubstitute) ];
nId = pSubUndo->GetEffectiveId();
sStr = pSubUndo->GetComment();
}
@@ -728,7 +728,7 @@ SwUndoIdAndName * lcl_GetUndoIdAndName(const SwUndos & rUndos, sal_uInt16 nPos )
do
{
nTmpPos--;
- pTmpUndo = rUndos[ static_cast<USHORT>(nTmpPos) ];
+ pTmpUndo = rUndos[ static_cast<sal_uInt16>(nTmpPos) ];
if (pTmpUndo->GetEffectiveId() > UNDO_END)
nSubstitute = nTmpPos;
@@ -737,7 +737,7 @@ SwUndoIdAndName * lcl_GetUndoIdAndName(const SwUndos & rUndos, sal_uInt16 nPos )
if (nSubstitute >= 0)
{
- SwUndo * pSubUndo = rUndos[ static_cast<USHORT>(nSubstitute) ];
+ SwUndo * pSubUndo = rUndos[ static_cast<sal_uInt16>(nSubstitute) ];
nId = pSubUndo->GetEffectiveId();
sStr = pSubUndo->GetComment();
}
@@ -764,7 +764,7 @@ SwUndoId SwDoc::GetUndoIds( String* pStr, SwUndoIds *pUndoIds) const
while (nTmpPos >= 0)
{
- SwUndo * pUndo = (*pUndos)[ static_cast<USHORT>(nTmpPos) ];
+ SwUndo * pUndo = (*pUndos)[ static_cast<sal_uInt16>(nTmpPos) ];
SwUndoIdAndName * pIdAndName = lcl_GetUndoIdAndName( *pUndos, static_cast<sal_uInt16>(nTmpPos) );
@@ -808,13 +808,13 @@ bool SwDoc::Redo( SwUndoIter& rUndoIter )
{
if( rUndoIter.GetId() && !HasUndoId( rUndoIter.GetId() ) )
{
- rUndoIter.bWeiter = FALSE;
- return FALSE;
+ rUndoIter.bWeiter = sal_False;
+ return sal_False;
}
if( nUndoPos == pUndos->Count() )
{
- rUndoIter.bWeiter = FALSE;
- return FALSE;
+ rUndoIter.bWeiter = sal_False;
+ return sal_False;
}
SwUndo *pUndo = (*pUndos)[ nUndoPos++ ];
@@ -840,11 +840,11 @@ bool SwDoc::Redo( SwUndoIter& rUndoIter )
USHRT_MAX != ((SwUndoReplace*)pUndo)->nAktPos )
{
--nUndoPos;
- return TRUE;
+ return sal_True;
}
if( rUndoIter.bWeiter && nUndoPos >= pUndos->Count() )
- rUndoIter.bWeiter = FALSE;
+ rUndoIter.bWeiter = sal_False;
// ist die History leer und wurde nicht wegen Speichermangel
// verworfen, so kann das Dokument als unveraendert gelten
@@ -852,7 +852,7 @@ bool SwDoc::Redo( SwUndoIter& rUndoIter )
ResetModified();
else
SetModified();
- return TRUE;
+ return sal_True;
}
@@ -916,14 +916,14 @@ bool SwDoc::Repeat( SwUndoIter& rUndoIter, sal_uInt16 nRepeatCnt )
{
if( rUndoIter.GetId() && !HasUndoId( rUndoIter.GetId() ) )
{
- rUndoIter.bWeiter = FALSE;
- return FALSE;
+ rUndoIter.bWeiter = sal_False;
+ return sal_False;
}
- USHORT nSize = nUndoPos;
+ sal_uInt16 nSize = nUndoPos;
if( !nSize )
{
- rUndoIter.bWeiter = FALSE;
- return FALSE;
+ rUndoIter.bWeiter = sal_False;
+ return sal_False;
}
// dann suche jetzt ueber die End/Start-Gruppen die gueltige Repeat-Aktion
@@ -931,8 +931,8 @@ bool SwDoc::Repeat( SwUndoIter& rUndoIter, sal_uInt16 nRepeatCnt )
if( UNDO_END == pUndo->GetId() )
nSize = nSize - ((SwUndoEnd*)pUndo)->GetSttOffset();
- USHORT nEndCnt = nUndoPos;
- BOOL bOneUndo = nSize + 1 == nUndoPos;
+ sal_uInt16 nEndCnt = nUndoPos;
+ sal_Bool bOneUndo = nSize + 1 == nUndoPos;
SwPaM* pTmpCrsr = rUndoIter.pAktPam;
SwUndoId nId = UNDO_EMPTY;
@@ -950,10 +950,10 @@ bool SwDoc::Repeat( SwUndoIter& rUndoIter, sal_uInt16 nRepeatCnt )
StartUndo( nId, NULL );
}
do { // dann durchlaufe mal den gesamten Ring
- for( USHORT nRptCnt = nRepeatCnt; nRptCnt > 0; --nRptCnt )
+ for( sal_uInt16 nRptCnt = nRepeatCnt; nRptCnt > 0; --nRptCnt )
{
rUndoIter.pLastUndoObj = 0;
- for( USHORT nCnt = nSize; nCnt < nEndCnt; ++nCnt )
+ for( sal_uInt16 nCnt = nSize; nCnt < nEndCnt; ++nCnt )
(*pUndos)[ nCnt ]->Repeat( rUndoIter ); // Repeat ausfuehren
}
} while( pTmpCrsr !=
@@ -961,7 +961,7 @@ bool SwDoc::Repeat( SwUndoIter& rUndoIter, sal_uInt16 nRepeatCnt )
if( pTmpCrsr != pTmpCrsr->GetNext() || !bOneUndo )
EndUndo( nId, NULL );
- return TRUE;
+ return sal_True;
}
// liefert die Id der letzten Repeatfaehigen Aktion zurueck oder 0
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index d9a0cc8514a4..f289e70883b6 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -77,7 +77,7 @@ String SwHistoryHint::GetDescription() const
}
-SwHistorySetFmt::SwHistorySetFmt( const SfxPoolItem* pFmtHt, ULONG nNd )
+SwHistorySetFmt::SwHistorySetFmt( const SfxPoolItem* pFmtHt, sal_uLong nNd )
: SwHistoryHint( HSTRY_SETFMTHNT )
, m_pAttr( pFmtHt->Clone() )
, m_nNodeIndex( nNd )
@@ -121,7 +121,7 @@ String SwHistorySetFmt::GetDescription() const
{
String aResult ;
- USHORT nWhich = m_pAttr->Which();
+ sal_uInt16 nWhich = m_pAttr->Which();
switch (nWhich)
{
case RES_BREAK:
@@ -188,7 +188,7 @@ SwHistorySetFmt::~SwHistorySetFmt()
// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
-SwHistoryResetFmt::SwHistoryResetFmt(const SfxPoolItem* pFmtHt, ULONG nNodeIdx)
+SwHistoryResetFmt::SwHistoryResetFmt(const SfxPoolItem* pFmtHt, sal_uLong nNodeIdx)
// <--
: SwHistoryHint( HSTRY_RESETFMTHNT )
, m_nNodeIndex( nNodeIdx )
@@ -212,7 +212,7 @@ void SwHistoryResetFmt::SetInDoc( SwDoc* pDoc, bool )
}
-SwHistorySetTxt::SwHistorySetTxt( SwTxtAttr* pTxtHt, ULONG nNodePos )
+SwHistorySetTxt::SwHistorySetTxt( SwTxtAttr* pTxtHt, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_SETTXTHNT )
, m_nNodeIndex( nNodePos )
, m_nStart( *pTxtHt->GetStart() )
@@ -224,7 +224,7 @@ SwHistorySetTxt::SwHistorySetTxt( SwTxtAttr* pTxtHt, ULONG nNodePos )
// ein bisschen kompliziert, aber ist Ok so: erst vom default
// eine Kopie und dann die Werte aus dem Text Attribut zuweisen
- USHORT nWhich = pTxtHt->Which();
+ sal_uInt16 nWhich = pTxtHt->Which();
if ( RES_TXTATR_CHARFMT == nWhich )
{
m_pAttr.reset( new SwFmtCharFmt( pTxtHt->GetCharFmt().GetCharFmt() ) );
@@ -266,7 +266,7 @@ void SwHistorySetTxt::SetInDoc( SwDoc* pDoc, bool )
}
-SwHistorySetTxtFld::SwHistorySetTxtFld( SwTxtFld* pTxtFld, ULONG nNodePos )
+SwHistorySetTxtFld::SwHistorySetTxtFld( SwTxtFld* pTxtFld, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_SETTXTFLDHNT )
, m_pFldType( 0 )
, m_pFld( new SwFmtFld( *pTxtFld->GetFld().GetFld() ) )
@@ -328,7 +328,7 @@ void SwHistorySetTxtFld::SetInDoc( SwDoc* pDoc, bool )
-SwHistorySetRefMark::SwHistorySetRefMark( SwTxtRefMark* pTxtHt, ULONG nNodePos )
+SwHistorySetRefMark::SwHistorySetRefMark( SwTxtRefMark* pTxtHt, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_SETREFMARKHNT )
, m_RefName( pTxtHt->GetRefMark().GetRefName() )
, m_nNodeIndex( nNodePos )
@@ -357,7 +357,7 @@ void SwHistorySetRefMark::SetInDoc( SwDoc* pDoc, bool )
}
-SwHistorySetTOXMark::SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, ULONG nNodePos )
+SwHistorySetTOXMark::SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_SETTOXMARKHNT )
, m_TOXMark( pTxtHt->GetTOXMark() )
, m_TOXName( m_TOXMark.GetTOXType()->GetTypeName() )
@@ -378,9 +378,9 @@ void SwHistorySetTOXMark::SetInDoc( SwDoc* pDoc, bool )
return;
// search for respective TOX type
- USHORT nCnt = pDoc->GetTOXTypeCount( m_eTOXTypes );
+ sal_uInt16 nCnt = pDoc->GetTOXTypeCount( m_eTOXTypes );
SwTOXType* pToxType = 0;
- for ( USHORT n = 0; n < nCnt; ++n )
+ for ( sal_uInt16 n = 0; n < nCnt; ++n )
{
pToxType = const_cast<SwTOXType*>(pDoc->GetTOXType( m_eTOXTypes, n ));
if ( pToxType->GetTypeName() == m_TOXName )
@@ -415,8 +415,8 @@ int SwHistorySetTOXMark::IsEqual( const SwTOXMark& rCmp ) const
}
-SwHistoryResetTxt::SwHistoryResetTxt( USHORT nWhich,
- xub_StrLen nAttrStart, xub_StrLen nAttrEnd, ULONG nNodePos )
+SwHistoryResetTxt::SwHistoryResetTxt( sal_uInt16 nWhich,
+ xub_StrLen nAttrStart, xub_StrLen nAttrEnd, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_RESETTXTHNT )
, m_nNodeIndex( nNodePos ), m_nStart( nAttrStart ), m_nEnd( nAttrEnd )
, m_nAttr( nWhich )
@@ -435,7 +435,7 @@ void SwHistoryResetTxt::SetInDoc( SwDoc* pDoc, bool )
}
-SwHistorySetFootnote::SwHistorySetFootnote( SwTxtFtn* pTxtFtn, ULONG nNodePos )
+SwHistorySetFootnote::SwHistorySetFootnote( SwTxtFtn* pTxtFtn, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_SETFTNHNT )
, m_pUndo( new SwUndoSaveSection )
, m_FootnoteNumber( pTxtFtn->GetFtn().GetNumStr() )
@@ -454,7 +454,7 @@ SwHistorySetFootnote::SwHistorySetFootnote( SwTxtFtn* pTxtFtn, ULONG nNodePos )
//Pointer auf StartNode der FtnSection merken und erstmal den Pointer im
//Attribut zuruecksetzen -> Damit werden automatisch die Frms vernichtet.
SwNodeIndex aSttIdx( *pTxtFtn->GetStartNode() );
- pTxtFtn->SetStartNode( 0, FALSE );
+ pTxtFtn->SetStartNode( 0, sal_False );
m_pUndo->SaveSection( pDoc, aSttIdx );
m_nNodeIndex = pSaveNd->GetIndex();
@@ -529,8 +529,8 @@ void SwHistorySetFootnote::SetInDoc( SwDoc* pDoc, bool )
}
-SwHistoryChangeFmtColl::SwHistoryChangeFmtColl( SwFmtColl* pFmtColl, ULONG nNd,
- BYTE nNodeWhich )
+SwHistoryChangeFmtColl::SwHistoryChangeFmtColl( SwFmtColl* pFmtColl, sal_uLong nNd,
+ sal_uInt8 nNodeWhich )
: SwHistoryHint( HSTRY_CHGFMTCOLL )
, m_pColl( pFmtColl )
, m_nNodeIndex( nNd )
@@ -569,7 +569,7 @@ SwHistoryTxtFlyCnt::SwHistoryTxtFlyCnt( SwFrmFmt* const pFlyFmt )
, m_pUndo( new SwUndoDelLayFmt( pFlyFmt ) )
{
ASSERT( pFlyFmt, "SwHistoryTxtFlyCnt: no Format" );
- m_pUndo->ChgShowSel( FALSE );
+ m_pUndo->ChgShowSel( sal_False );
}
@@ -718,7 +718,7 @@ const ::rtl::OUString& SwHistoryBookmark::GetName() const
SwHistorySetAttrSet::SwHistorySetAttrSet( const SfxItemSet& rSet,
- ULONG nNodePos, const SvUShortsSort& rSetArr )
+ sal_uLong nNodePos, const SvUShortsSort& rSetArr )
: SwHistoryHint( HSTRY_SETATTRSET )
, m_OldSet( rSet )
, m_ResetArray( 0, 4 )
@@ -788,13 +788,13 @@ SwHistorySetAttrSet::SwHistorySetAttrSet( const SfxItemSet& rSet,
break;
pItem = aIter.NextItem();
pOrigItem = aOrigIter.NextItem();
- } while( TRUE );
+ } while( sal_True );
}
void SwHistorySetAttrSet::SetInDoc( SwDoc* pDoc, bool )
{
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
SwNode * pNode = pDoc->GetNodes()[ m_nNodeIndex ];
if ( pNode->IsCntntNode() )
@@ -823,17 +823,17 @@ void SwHistorySetAttrSet::SetInDoc( SwDoc* pDoc, bool )
SwHistoryResetAttrSet::SwHistoryResetAttrSet( const SfxItemSet& rSet,
- ULONG nNodePos, xub_StrLen nAttrStt, xub_StrLen nAttrEnd )
+ sal_uLong nNodePos, xub_StrLen nAttrStt, xub_StrLen nAttrEnd )
: SwHistoryHint( HSTRY_RESETATTRSET )
, m_nNodeIndex( nNodePos ), m_nStart( nAttrStt ), m_nEnd( nAttrEnd )
- , m_Array( (BYTE)rSet.Count() )
+ , m_Array( (sal_uInt8)rSet.Count() )
{
SfxItemIter aIter( rSet );
bool bAutoStyle = false;
- while( TRUE )
+ while( sal_True )
{
- const USHORT nWhich = aIter.GetCurItem()->Which();
+ const sal_uInt16 nWhich = aIter.GetCurItem()->Which();
#ifndef PRODUCT
switch (nWhich)
@@ -879,19 +879,19 @@ SwHistoryResetAttrSet::SwHistoryResetAttrSet( const SfxItemSet& rSet,
void SwHistoryResetAttrSet::SetInDoc( SwDoc* pDoc, bool )
{
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
SwCntntNode * pCntntNd = pDoc->GetNodes()[ m_nNodeIndex ]->GetCntntNode();
ASSERT( pCntntNd, "SwHistoryResetAttrSet: no CntntNode" );
if (pCntntNd)
{
- const USHORT* pArr = m_Array.GetData();
+ const sal_uInt16* pArr = m_Array.GetData();
if ( USHRT_MAX == m_nEnd && USHRT_MAX == m_nStart )
{
// no area: use ContentNode
- for ( USHORT n = m_Array.Count(); n; --n, ++pArr )
+ for ( sal_uInt16 n = m_Array.Count(); n; --n, ++pArr )
{
pCntntNd->ResetAttr( *pArr );
}
@@ -899,7 +899,7 @@ void SwHistoryResetAttrSet::SetInDoc( SwDoc* pDoc, bool )
else
{
// area: use TextNode
- for ( USHORT n = m_Array.Count(); n; --n, ++pArr )
+ for ( sal_uInt16 n = m_Array.Count(); n; --n, ++pArr )
{
static_cast<SwTxtNode*>(pCntntNd)->
DeleteAttributes( *pArr, m_nStart, m_nEnd );
@@ -927,10 +927,10 @@ SwHistoryChangeFlyAnchor::SwHistoryChangeFlyAnchor( SwFrmFmt& rFmt )
void SwHistoryChangeFlyAnchor::SetInDoc( SwDoc* pDoc, bool )
{
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
- USHORT nPos = pDoc->GetSpzFrmFmts()->GetPos( &m_rFmt );
+ sal_uInt16 nPos = pDoc->GetSpzFrmFmts()->GetPos( &m_rFmt );
if ( USHRT_MAX != nPos ) // Format does still exist
{
SwFmtAnchor aTmp( m_rFmt.GetAnchor() );
@@ -949,7 +949,7 @@ void SwHistoryChangeFlyAnchor::SetInDoc( SwDoc* pDoc, bool )
aTmp.SetAnchor( &aPos );
// so the Layout does not get confused
- if ( !pCNd || !pCNd->GetFrm( 0, 0, FALSE ) )
+ if ( !pCNd || !pCNd->GetFrm( 0, 0, sal_False ) )
{
m_rFmt.DelFrms();
}
@@ -1026,8 +1026,8 @@ void SwHistoryChangeCharFmt::SetInDoc(SwDoc * pDoc, bool )
/* */
-SwHistory::SwHistory( USHORT nInitSz, USHORT nGrowSz )
- : m_SwpHstry( (BYTE)nInitSz, (BYTE)nGrowSz )
+SwHistory::SwHistory( sal_uInt16 nInitSz, sal_uInt16 nGrowSz )
+ : m_SwpHstry( (sal_uInt8)nInitSz, (sal_uInt8)nGrowSz )
, m_nEndDiff( 0 )
{}
@@ -1050,12 +1050,12 @@ SwHistory::~SwHistory()
// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
void SwHistory::Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue,
- ULONG nNodeIdx )
+ sal_uLong nNodeIdx )
// <--
{
ASSERT( !m_nEndDiff, "History was not deleted after REDO" );
- USHORT nWhich = pNewValue->Which();
+ sal_uInt16 nWhich = pNewValue->Which();
if( (nWhich >= POOLATTR_END) || (nWhich == RES_TXTATR_FIELD) )
return;
@@ -1073,12 +1073,12 @@ void SwHistory::Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue,
}
-void SwHistory::Add( SwTxtAttr* pHint, ULONG nNodeIdx, bool bNewAttr )
+void SwHistory::Add( SwTxtAttr* pHint, sal_uLong nNodeIdx, bool bNewAttr )
{
ASSERT( !m_nEndDiff, "History was not deleted after REDO" );
SwHistoryHint * pHt;
- USHORT nAttrWhich = pHint->Which();
+ sal_uInt16 nAttrWhich = pHint->Which();
if( !bNewAttr )
{
@@ -1118,7 +1118,7 @@ void SwHistory::Add( SwTxtAttr* pHint, ULONG nNodeIdx, bool bNewAttr )
}
-void SwHistory::Add( SwFmtColl* pColl, ULONG nNodeIdx, BYTE nWhichNd )
+void SwHistory::Add( SwFmtColl* pColl, sal_uLong nNodeIdx, sal_uInt8 nWhichNd )
{
ASSERT( !m_nEndDiff, "History was not deleted after REDO" );
@@ -1143,19 +1143,19 @@ void SwHistory::Add( SwFrmFmt& rFmt )
m_SwpHstry.Insert( pHt, Count() );
}
-void SwHistory::Add( SwFlyFrmFmt& rFmt, USHORT& rSetPos )
+void SwHistory::Add( SwFlyFrmFmt& rFmt, sal_uInt16& rSetPos )
{
ASSERT( !m_nEndDiff, "History was not deleted after REDO" );
SwHistoryHint * pHint;
- const USHORT nWh = rFmt.Which();
+ const sal_uInt16 nWh = rFmt.Which();
if( RES_FLYFRMFMT == nWh || RES_DRAWFRMFMT == nWh )
{
pHint = new SwHistoryTxtFlyCnt( &rFmt );
m_SwpHstry.Insert( pHint, Count() );
const SwFmtChain* pChainItem;
- if( SFX_ITEM_SET == rFmt.GetItemState( RES_CHAIN, FALSE,
+ if( SFX_ITEM_SET == rFmt.GetItemState( RES_CHAIN, sal_False,
(const SfxPoolItem**)&pChainItem ))
{
if( pChainItem->GetNext() || pChainItem->GetPrev() )
@@ -1196,7 +1196,7 @@ void SwHistory::Add(const SfxItemSet & rSet, const SwCharFmt & rFmt)
/*************************************************************************
|*
-|* BOOL SwHistory::Rollback()
+|* sal_Bool SwHistory::Rollback()
|*
|* Beschreibung Dokument 1.0
|* Ersterstellung JP 18.02.91
@@ -1205,13 +1205,13 @@ void SwHistory::Add(const SfxItemSet & rSet, const SwCharFmt & rFmt)
*************************************************************************/
-bool SwHistory::Rollback( SwDoc* pDoc, USHORT nStart )
+bool SwHistory::Rollback( SwDoc* pDoc, sal_uInt16 nStart )
{
if ( !Count() )
return false;
SwHistoryHint * pHHt;
- USHORT i;
+ sal_uInt16 i;
for ( i = Count(); i > nStart ; )
{
pHHt = m_SwpHstry[ --i ];
@@ -1225,9 +1225,9 @@ bool SwHistory::Rollback( SwDoc* pDoc, USHORT nStart )
-bool SwHistory::TmpRollback( SwDoc* pDoc, USHORT nStart, bool bToFirst )
+bool SwHistory::TmpRollback( SwDoc* pDoc, sal_uInt16 nStart, bool bToFirst )
{
- USHORT nEnd = Count() - m_nEndDiff;
+ sal_uInt16 nEnd = Count() - m_nEndDiff;
if ( !Count() || !nEnd || nStart >= nEnd )
return false;
@@ -1252,9 +1252,9 @@ bool SwHistory::TmpRollback( SwDoc* pDoc, USHORT nStart, bool bToFirst )
}
-void SwHistory::Delete( USHORT nStart )
+void SwHistory::Delete( sal_uInt16 nStart )
{
- for ( USHORT n = Count(); n > nStart; )
+ for ( sal_uInt16 n = Count(); n > nStart; )
{
m_SwpHstry.DeleteAndDestroy( --n, 1 );
}
@@ -1262,16 +1262,16 @@ void SwHistory::Delete( USHORT nStart )
}
-USHORT SwHistory::SetTmpEnd( USHORT nNewTmpEnd )
+sal_uInt16 SwHistory::SetTmpEnd( sal_uInt16 nNewTmpEnd )
{
ASSERT( nNewTmpEnd <= Count(), "SwHistory::SetTmpEnd: out of bounds" );
- USHORT nOld = Count() - m_nEndDiff;
+ sal_uInt16 nOld = Count() - m_nEndDiff;
m_nEndDiff = Count() - nNewTmpEnd;
// for every SwHistoryFlyCnt, call the Redo of its UndoObject.
// this saves the formats of the flys!
- for ( USHORT n = nOld; n < nNewTmpEnd; n++ )
+ for ( sal_uInt16 n = nOld; n < nNewTmpEnd; n++ )
{
if ( HSTRY_FLYCNT == (*this)[ n ]->Which() )
{
@@ -1283,7 +1283,7 @@ USHORT SwHistory::SetTmpEnd( USHORT nNewTmpEnd )
return nOld;
}
-void SwHistory::CopyFmtAttr( const SfxItemSet& rSet, ULONG nNodeIdx )
+void SwHistory::CopyFmtAttr( const SfxItemSet& rSet, sal_uLong nNodeIdx )
{
if( rSet.Count() )
{
@@ -1297,11 +1297,11 @@ void SwHistory::CopyFmtAttr( const SfxItemSet& rSet, ULONG nNodeIdx )
if( aIter.IsAtEnd() )
break;
aIter.NextItem();
- } while( TRUE );
+ } while( sal_True );
}
}
-void SwHistory::CopyAttr( SwpHints* pHts, ULONG nNodeIdx,
+void SwHistory::CopyAttr( SwpHints* pHts, sal_uLong nNodeIdx,
xub_StrLen nStart, xub_StrLen nEnd, bool bFields )
{
if( !pHts )
@@ -1311,7 +1311,7 @@ void SwHistory::CopyAttr( SwpHints* pHts, ULONG nNodeIdx,
SwTxtAttr* pHt;
xub_StrLen nAttrStt;
const xub_StrLen * pEndIdx;
- for( USHORT n = 0; n < pHts->Count(); n++ )
+ for( sal_uInt16 n = 0; n < pHts->Count(); n++ )
{
// BP: nAttrStt muss auch bei !pEndIdx gesetzt werden
pHt = pHts->GetTextHint(n);
@@ -1322,17 +1322,17 @@ void SwHistory::CopyAttr( SwpHints* pHts, ULONG nNodeIdx,
break;
// Flys und Ftn nie kopieren !!
- BOOL bNextAttr = FALSE;
+ sal_Bool bNextAttr = sal_False;
switch( pHt->Which() )
{
case RES_TXTATR_FIELD:
// keine Felder, .. kopieren ??
if( !bFields )
- bNextAttr = TRUE;
+ bNextAttr = sal_True;
break;
case RES_TXTATR_FLYCNT:
case RES_TXTATR_FTN:
- bNextAttr = TRUE;
+ bNextAttr = sal_True;
break;
}
@@ -1516,8 +1516,8 @@ void SwRegHistory::_MakeSetWhichIds()
if( pSet && pSet->Count() )
{
SfxItemIter aIter( *pSet );
- USHORT nW = aIter.FirstItem()->Which();
- while( TRUE )
+ sal_uInt16 nW = aIter.FirstItem()->Which();
+ while( sal_True )
{
m_WhichIdSet.Insert( nW );
if( aIter.IsAtEnd() )
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index e3b54c59b142..8dd7e629aad3 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -142,7 +142,7 @@ SwUndoFmtAttr::SwUndoFmtAttr( const SfxPoolItem& rItem, SwFmt& rChgFmt,
bool bSaveDrawPt )
: SwUndo( UNDO_INSFMTATTR )
, m_pFmt( &rChgFmt )
- , m_pOldSet( m_pFmt->GetAttrSet().Clone( FALSE ) )
+ , m_pOldSet( m_pFmt->GetAttrSet().Clone( sal_False ) )
, m_nNodeIndex( 0 )
, m_nFmtWhich( rChgFmt.Which() )
, m_bSaveDrawPt( bSaveDrawPt )
@@ -154,7 +154,7 @@ SwUndoFmtAttr::SwUndoFmtAttr( const SfxPoolItem& rItem, SwFmt& rChgFmt,
void SwUndoFmtAttr::Init()
{
// treat change of anchor specially
- if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, FALSE ))
+ if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, sal_False ))
{
SaveFlyAnchor( m_bSaveDrawPt );
}
@@ -206,7 +206,7 @@ void SwUndoFmtAttr::Undo( SwUndoIter& rUndoIter)
// restored, all other attributes are also restored.
// Thus, keep track of its restoration
bool bAnchorAttrRestored( false );
- if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, FALSE ))
+ if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, sal_False ))
{
bAnchorAttrRestored = RestoreFlyAnchor( rUndoIter );
if ( bAnchorAttrRestored )
@@ -249,7 +249,7 @@ bool SwUndoFmtAttr::IsFmtInDoc( SwDoc* pDoc )
{
// search for the Format in the Document; if it does not exist any more,
// the attribute is not restored!
- USHORT nPos = USHRT_MAX;
+ sal_uInt16 nPos = USHRT_MAX;
switch ( m_nFmtWhich )
{
case RES_TXTFMTCOLL:
@@ -451,7 +451,7 @@ void SwUndoFmtAttr::SaveFlyAnchor( bool bSvDrwPt )
*/ }
const SwFmtAnchor& rAnchor =
- static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, FALSE ) );
+ static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, sal_False ) );
if( !rAnchor.GetCntntAnchor() )
return;
@@ -482,7 +482,7 @@ bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter )
SwDoc* pDoc = &rIter.GetDoc();
SwFlyFrmFmt* pFrmFmt = static_cast<SwFlyFrmFmt*>(m_pFmt);
const SwFmtAnchor& rAnchor =
- static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, FALSE ) );
+ static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, sal_False ) );
SwFmtAnchor aNewAnchor( rAnchor.GetAnchorId() );
if (FLY_AT_PAGE != rAnchor.GetAnchorId())
@@ -633,14 +633,14 @@ bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter )
// --> OD 2008-02-12 #newlistlevelattrs#
SwUndoFmtResetAttr::SwUndoFmtResetAttr( SwFmt& rChangedFormat,
- const USHORT nWhichId )
+ const sal_uInt16 nWhichId )
: SwUndo( UNDO_RESETATTR )
, m_pChangedFormat( &rChangedFormat )
, m_nWhichId( nWhichId )
, m_pOldItem( 0 )
{
const SfxPoolItem* pItem = 0;
- if (rChangedFormat.GetItemState( nWhichId, FALSE, &pItem ) == SFX_ITEM_SET)
+ if (rChangedFormat.GetItemState( nWhichId, sal_False, &pItem ) == SFX_ITEM_SET)
{
m_pOldItem.reset( pItem->Clone() );
}
@@ -669,14 +669,14 @@ void SwUndoFmtResetAttr::Redo( SwUndoIter& )
// -----------------------------------------------------
-SwUndoResetAttr::SwUndoResetAttr( const SwPaM& rRange, USHORT nFmtId )
+SwUndoResetAttr::SwUndoResetAttr( const SwPaM& rRange, sal_uInt16 nFmtId )
: SwUndo( UNDO_RESETATTR ), SwUndRng( rRange )
, m_pHistory( new SwHistory )
, m_nFormatId( nFmtId )
{
}
-SwUndoResetAttr::SwUndoResetAttr( const SwPosition& rPos, USHORT nFmtId )
+SwUndoResetAttr::SwUndoResetAttr( const SwPosition& rPos, sal_uInt16 nFmtId )
: SwUndo( UNDO_RESETATTR )
, m_pHistory( new SwHistory )
, m_nFormatId( nFmtId )
@@ -703,7 +703,7 @@ void SwUndoResetAttr::Undo( SwUndoIter& rUndoIter )
if( pTNd )
{
SwIndex aIdx( pTNd, nSttCntnt );
- pTNd->DontExpandFmt( aIdx, FALSE );
+ pTNd->DontExpandFmt( aIdx, sal_False );
}
}
@@ -725,10 +725,10 @@ void SwUndoResetAttr::Redo( SwUndoIter& rUndoIter )
rUndoIter.GetDoc().RstTxtAttrs( *rUndoIter.pAktPam );
break;
case RES_TXTFMTCOLL:
- rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, FALSE, pIdArr );
+ rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, sal_False, pIdArr );
break;
case RES_CONDTXTFMTCOLL:
- rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, TRUE, pIdArr );
+ rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, sal_True, pIdArr );
break;
case RES_TXTATR_TOXMARK:
@@ -739,7 +739,7 @@ void SwUndoResetAttr::Redo( SwUndoIter& rUndoIter )
SwPosition aPos( aIdx, SwIndex( aIdx.GetNode().GetCntntNode(),
nSttCntnt ));
- USHORT nCnt = rDoc.GetCurTOXMark( aPos, aArr );
+ sal_uInt16 nCnt = rDoc.GetCurTOXMark( aPos, aArr );
if( nCnt )
{
if( 1 < nCnt )
@@ -790,10 +790,10 @@ void SwUndoResetAttr::Repeat( SwUndoIter& rUndoIter )
rUndoIter.GetDoc().RstTxtAttrs( *rUndoIter.pAktPam );
break;
case RES_TXTFMTCOLL:
- rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, FALSE, pIdArr );
+ rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, sal_False, pIdArr );
break;
case RES_CONDTXTFMTCOLL:
- rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, TRUE, pIdArr );
+ rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, sal_True, pIdArr );
break;
}
rUndoIter.pLastUndoObj = this;
@@ -841,7 +841,7 @@ SwUndoAttr::~SwUndoAttr()
{
}
-void SwUndoAttr::SaveRedlineData( const SwPaM& rPam, BOOL bIsCntnt )
+void SwUndoAttr::SaveRedlineData( const SwPaM& rPam, sal_Bool bIsCntnt )
{
SwDoc* pDoc = rPam.GetDoc();
if ( pDoc->IsRedlineOn() )
@@ -944,7 +944,7 @@ void SwUndoAttr::Repeat( SwUndoIter& rUndoIter )
// RefMarks are not repeat capable
- if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_REFMARK, FALSE ) )
+ if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_REFMARK, sal_False ) )
{
rUndoIter.GetDoc().InsertItemSet( *rUndoIter.pAktPam,
m_AttrSet, m_nInsertFlags );
@@ -1002,15 +1002,15 @@ void SwUndoAttr::Redo( SwUndoIter& rUndoIter )
void SwUndoAttr::RemoveIdx( SwDoc& rDoc )
{
- if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_FTN, FALSE ))
+ if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_FTN, sal_False ))
return ;
SwHistoryHint* pHstHnt;
SwNodes& rNds = rDoc.GetNodes();
- for ( USHORT n = 0; n < m_pHistory->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < m_pHistory->Count(); ++n )
{
xub_StrLen nCntnt = 0;
- ULONG nNode = 0;
+ sal_uLong nNode = 0;
pHstHnt = (*m_pHistory)[ n ];
switch ( pHstHnt->Which() )
{
@@ -1034,7 +1034,7 @@ void SwUndoAttr::RemoveIdx( SwDoc& rDoc )
if ( STRING_MAXLEN != nCntnt )
{
const SvUShorts& rArr = pHistoryHint->GetArr();
- for ( USHORT i = rArr.Count(); i; )
+ for ( sal_uInt16 i = rArr.Count(); i; )
{
if ( RES_TXTATR_FTN == rArr[ --i ] )
{
@@ -1077,7 +1077,7 @@ SwUndoDefaultAttr::SwUndoDefaultAttr( const SfxItemSet& rSet )
, m_pTabStop( 0 )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_TABSTOP, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_TABSTOP, sal_False, &pItem ) )
{
// store separately, because it may change!
m_pTabStop.reset( static_cast<SvxTabStopItem*>(pItem->Clone()) );
@@ -1128,7 +1128,7 @@ void SwUndoDefaultAttr::Redo( SwUndoIter& rUndoIter)
// -----------------------------------------------------
SwUndoMoveLeftMargin::SwUndoMoveLeftMargin(
- const SwPaM& rPam, BOOL bFlag, BOOL bMod )
+ const SwPaM& rPam, sal_Bool bFlag, sal_Bool bMod )
: SwUndo( bFlag ? UNDO_INC_LEFTMARGIN : UNDO_DEC_LEFTMARGIN )
, SwUndRng( rPam )
, m_pHistory( new SwHistory )
@@ -1143,8 +1143,8 @@ SwUndoMoveLeftMargin::~SwUndoMoveLeftMargin()
void SwUndoMoveLeftMargin::Undo( SwUndoIter& rIter )
{
SwDoc* pDoc = &rIter.GetDoc();
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
// restore old values
m_pHistory->TmpRollback( pDoc, 0 );
@@ -1174,7 +1174,7 @@ void SwUndoMoveLeftMargin::Repeat( SwUndoIter& rIter )
SwUndoChangeFootNote::SwUndoChangeFootNote(
const SwPaM& rRange, const String& rTxt,
- USHORT nNum, bool bIsEndNote )
+ sal_uInt16 nNum, bool bIsEndNote )
: SwUndo( UNDO_CHGFTN ), SwUndRng( rRange )
, m_pHistory( new SwHistory() )
, m_Text( rTxt )
@@ -1192,8 +1192,8 @@ void SwUndoChangeFootNote::Undo( SwUndoIter& rIter )
SwDoc& rDoc = rIter.GetDoc();
SetPaM( rIter );
- BOOL bUndo = rDoc.DoesUndo();
- rDoc.DoUndo( FALSE );
+ sal_Bool bUndo = rDoc.DoesUndo();
+ rDoc.DoUndo( sal_False );
m_pHistory->TmpRollback( &rDoc, 0 );
m_pHistory->SetTmpEnd( m_pHistory->Count() );
@@ -1294,7 +1294,7 @@ void SwUndoDontExpandFmt::Undo( SwUndoIter& rIter )
SwPosition& rPos = *pPam->GetPoint();
rPos.nNode = m_nNodeIndex;
rPos.nContent.Assign( rPos.nNode.GetNode().GetCntntNode(), m_nContentIndex);
- pDoc->DontExpandFmt( rPos, FALSE );
+ pDoc->DontExpandFmt( rPos, sal_False );
}
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index ef39a4e18950..9c7b5c76e17c 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -68,13 +68,13 @@ inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
if the anchor frame has be moved via _MoveNodes(..) and DelFrms(..)
*/
-void lcl_MakeAutoFrms( const SwSpzFrmFmts& rSpzArr, ULONG nMovedIndex )
+void lcl_MakeAutoFrms( const SwSpzFrmFmts& rSpzArr, sal_uLong nMovedIndex )
{
if( rSpzArr.Count() )
{
SwFlyFrmFmt* pFmt;
const SwFmtAnchor* pAnchor;
- for( USHORT n = 0; n < rSpzArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rSpzArr.Count(); ++n )
{
pFmt = (SwFlyFrmFmt*)rSpzArr[n];
pAnchor = &pFmt->GetAnchor();
@@ -110,12 +110,12 @@ section and the end paragraph not. Then we have to move the paragraph into this
record this in nSectDiff.
*/
-SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
+SwUndoDelete::SwUndoDelete( SwPaM& rPam, sal_Bool bFullPara, sal_Bool bCalledByTblCpy )
: SwUndo(UNDO_DELETE), SwUndRng( rPam ),
pMvStt( 0 ), pSttStr(0), pEndStr(0), pRedlData(0), pRedlSaveData(0),
nNode(0), nNdDiff(0), nSectDiff(0), nReplaceDummy(0), nSetPos(0),
- bGroup( FALSE ), bBackSp( FALSE ), bJoinNext( FALSE ), bTblDelLastNd( FALSE ),
- bDelFullPara( bFullPara ), bResetPgDesc( FALSE ), bResetPgBrk( FALSE ),
+ bGroup( sal_False ), bBackSp( sal_False ), bJoinNext( sal_False ), bTblDelLastNd( sal_False ),
+ bDelFullPara( bFullPara ), bResetPgDesc( sal_False ), bResetPgBrk( sal_False ),
bFromTableCopy( bCalledByTblCpy )
{
bDelFullPara = bFullPara; // This is set e.g. if an empty paragraph before a table is deleted
@@ -147,8 +147,8 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
DelCntntIndex( *rPam.GetMark(), *rPam.GetPoint(),
DelCntntType(nsDelCntntType::DELCNT_ALL | nsDelCntntType::DELCNT_CHKNOCNTNT) );
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
_DelBookmarks(pStt->nNode, pEnd->nNode);
pDoc->DoUndo( bDoesUndo );
}
@@ -172,8 +172,8 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
: pEnd->nNode.GetNode().GetTxtNode();
}
- BOOL bMoveNds = *pStt == *pEnd // noch ein Bereich vorhanden ??
- ? FALSE
+ sal_Bool bMoveNds = *pStt == *pEnd // noch ein Bereich vorhanden ??
+ ? sal_False
: ( SaveCntnt( pStt, pEnd, pSttTxtNd, pEndTxtNd ) || bFromTableCopy );
if( pSttTxtNd && pEndTxtNd && pSttTxtNd != pEndTxtNd )
@@ -193,11 +193,11 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
{
SwRegHistory aRegHist( *pEndTxtNd, pHistory );
if( SFX_ITEM_SET == pEndTxtNd->GetpSwAttrSet()->GetItemState(
- RES_BREAK, FALSE ) )
+ RES_BREAK, sal_False ) )
pEndTxtNd->ResetAttr( RES_BREAK );
if( pEndTxtNd->HasSwAttrSet() &&
SFX_ITEM_SET == pEndTxtNd->GetpSwAttrSet()->GetItemState(
- RES_PAGEDESC, FALSE ) )
+ RES_PAGEDESC, sal_False ) )
pEndTxtNd->ResetAttr( RES_PAGEDESC );
}
}
@@ -253,10 +253,10 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
++nReplaceDummy;
SwNodeRange aMvRg( *pEndTxtNd, 0, *pEndTxtNd, 1 );
SwPosition aSplitPos( *pEndTxtNd );
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
pDoc->SplitNode( aSplitPos, false );
- rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aEnd, TRUE );
+ rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aEnd, sal_True );
pDoc->DoUndo( bDoesUndo );
aRg.aEnd--;
}
@@ -279,10 +279,10 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
{
SwNodeRange aMvRg( *pSttTxtNd, 0, *pSttTxtNd, 1 );
SwPosition aSplitPos( *pSttTxtNd );
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
pDoc->SplitNode( aSplitPos, false );
- rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aStart, TRUE );
+ rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aStart, sal_True );
pDoc->DoUndo( bDoesUndo );
aRg.aStart--;
}
@@ -319,12 +319,12 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
if( bJoinNext )
{
SwNodeRange aMvRg( *pEndTxtNd, 0, *pEndTxtNd, 1 );
- rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aStart, TRUE );
+ rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aStart, sal_True );
}
else
{
SwNodeRange aMvRg( *pSttTxtNd, 0, *pSttTxtNd, 1 );
- rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aEnd, TRUE );
+ rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aEnd, sal_True );
}
}
}
@@ -357,14 +357,14 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
DELETEZ( pHistory );
}
-BOOL SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
+sal_Bool SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
SwTxtNode* pSttTxtNd, SwTxtNode* pEndTxtNd )
{
- ULONG nNdIdx = pStt->nNode.GetIndex();
+ sal_uLong nNdIdx = pStt->nNode.GetIndex();
// 1 - kopiere den Anfang in den Start-String
if( pSttTxtNd )
{
- BOOL bOneNode = nSttNode == nEndNode;
+ sal_Bool bOneNode = nSttNode == nEndNode;
xub_StrLen nLen = bOneNode ? nEndCntnt - nSttCntnt
: pSttTxtNd->GetTxt().Len() - nSttCntnt;
SwRegHistory aRHst( *pSttTxtNd, pHistory );
@@ -397,7 +397,7 @@ BOOL SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
}
if( bOneNode )
- return FALSE; // keine Nodes mehr verschieben
+ return sal_False; // keine Nodes mehr verschieben
}
@@ -435,21 +435,21 @@ BOOL SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
// sind es nur zwei Nodes, dann ist schon alles erledigt.
if( ( pSttTxtNd || pEndTxtNd ) && nSttNode + 1 == nEndNode )
- return FALSE; // keine Nodes mehr verschieben
+ return sal_False; // keine Nodes mehr verschieben
- return TRUE; // verschiebe die dazwischen liegenden Nodes
+ return sal_True; // verschiebe die dazwischen liegenden Nodes
}
-BOOL SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
+sal_Bool SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
{
// ist das Undo groesser als 1 Node ? (sprich: Start und EndString)
- if( pSttStr ? !pSttStr->Len() || pEndStr : TRUE )
- return FALSE;
+ if( pSttStr ? !pSttStr->Len() || pEndStr : sal_True )
+ return sal_False;
// es kann nur das Loeschen von einzelnen char's zusammengefasst werden
if( nSttNode != nEndNode || ( !bGroup && nSttCntnt+1 != nEndCntnt ))
- return FALSE;
+ return sal_False;
const SwPosition *pStt = rDelPam.Start(),
*pEnd = rDelPam.GetPoint() == pStt
@@ -459,26 +459,26 @@ BOOL SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
if( pStt->nNode != pEnd->nNode ||
pStt->nContent.GetIndex()+1 != pEnd->nContent.GetIndex() ||
pEnd->nNode != nSttNode )
- return FALSE;
+ return sal_False;
// untercheide zwischen BackSpace und Delete. Es muss dann das
// Undo-Array unterschiedlich aufgebaut werden !!
if( pEnd->nContent == nSttCntnt )
{
- if( bGroup && !bBackSp ) return FALSE;
- bBackSp = TRUE;
+ if( bGroup && !bBackSp ) return sal_False;
+ bBackSp = sal_True;
}
else if( pStt->nContent == nSttCntnt )
{
- if( bGroup && bBackSp ) return FALSE;
- bBackSp = FALSE;
+ if( bGroup && bBackSp ) return sal_False;
+ bBackSp = sal_False;
}
else
- return FALSE;
+ return sal_False;
// sind die beiden Nodes (Nodes-/Undo-Array) ueberhaupt TextNodes?
SwTxtNode * pDelTxtNd = pStt->nNode.GetNode().GetTxtNode();
- if( !pDelTxtNd ) return FALSE;
+ if( !pDelTxtNd ) return sal_False;
xub_StrLen nUChrPos = bBackSp ? 0 : pSttStr->Len()-1;
sal_Unicode cDelChar = pDelTxtNd->GetTxt().GetChar( pStt->nContent.GetIndex() );
@@ -486,19 +486,19 @@ BOOL SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
if( ( CH_TXTATR_BREAKWORD == cDelChar || CH_TXTATR_INWORD == cDelChar ) ||
rCC.isLetterNumeric( String( cDelChar ), 0 ) !=
rCC.isLetterNumeric( *pSttStr, nUChrPos ) )
- return FALSE;
+ return sal_False;
{
SwRedlineSaveDatas* pTmpSav = new SwRedlineSaveDatas;
- if( !FillSaveData( rDelPam, *pTmpSav, FALSE ))
+ if( !FillSaveData( rDelPam, *pTmpSav, sal_False ))
delete pTmpSav, pTmpSav = 0;
- BOOL bOk = ( !pRedlSaveData && !pTmpSav ) ||
+ sal_Bool bOk = ( !pRedlSaveData && !pTmpSav ) ||
( pRedlSaveData && pTmpSav &&
SwUndo::CanRedlineGroup( *pRedlSaveData, *pTmpSav, bBackSp ));
delete pTmpSav;
if( !bOk )
- return FALSE;
+ return sal_False;
pDoc->DeleteRedline( rDelPam, false, USHRT_MAX );
}
@@ -515,8 +515,8 @@ BOOL SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
pSttStr->Insert( cDelChar, nUChrPos );
pDelTxtNd->EraseText( pStt->nContent, 1 );
- bGroup = TRUE;
- return TRUE;
+ bGroup = sal_True;
+ return sal_True;
}
@@ -541,7 +541,7 @@ static SwRewriter lcl_RewriterFromHistory(SwHistory & rHistory)
bool bDone = false;
- for ( USHORT n = 0; n < rHistory.Count(); n++)
+ for ( sal_uInt16 n = 0; n < rHistory.Count(); n++)
{
String aDescr = rHistory[n]->GetDescription();
@@ -623,14 +623,14 @@ SwRewriter SwUndoDelete::GetRewriter() const
}
// Every object, anchored "AtCntnt" will be reanchored at rPos
-void lcl_ReAnchorAtCntntFlyFrames( const SwSpzFrmFmts& rSpzArr, SwPosition &rPos, ULONG nOldIdx )
+void lcl_ReAnchorAtCntntFlyFrames( const SwSpzFrmFmts& rSpzArr, SwPosition &rPos, sal_uLong nOldIdx )
{
if( rSpzArr.Count() )
{
SwFlyFrmFmt* pFmt;
const SwFmtAnchor* pAnchor;
const SwPosition* pAPos;
- for( USHORT n = 0; n < rSpzArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rSpzArr.Count(); ++n )
{
pFmt = (SwFlyFrmFmt*)rSpzArr[n];
pAnchor = &pFmt->GetAnchor();
@@ -651,10 +651,10 @@ void lcl_ReAnchorAtCntntFlyFrames( const SwSpzFrmFmts& rSpzArr, SwPosition &rPos
void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
{
SwDoc* pDoc = &rUndoIter.GetDoc();
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
- ULONG nCalcStt = nSttNode - nNdDiff;
+ sal_uLong nCalcStt = nSttNode - nNdDiff;
if( nSectDiff && bBackSp )
nCalcStt += nSectDiff;
@@ -687,7 +687,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
pInsNd = 0; // Node nicht loeschen !!
SwNodes* pUNds = (SwNodes*)pDoc->GetUndoNds();
- BOOL bNodeMove = 0 != nNode;
+ sal_Bool bNodeMove = 0 != nNode;
if( pEndStr )
{
@@ -702,7 +702,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
if( pSttStr && !bFromTableCopy )
{
- ULONG nOldIdx = aPos.nNode.GetIndex();
+ sal_uLong nOldIdx = aPos.nNode.GetIndex();
pDoc->SplitNode( aPos, false );
// After the split all objects are anchored at the first paragraph,
// but the pHistory of the fly frame formats relies on anchoring at
@@ -726,7 +726,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
{
if( nSttCntnt < pNd->GetTxt().Len() )
{
- ULONG nOldIdx = aPos.nNode.GetIndex();
+ sal_uLong nOldIdx = aPos.nNode.GetIndex();
pDoc->SplitNode( aPos, false );
if( bBackSp )
lcl_ReAnchorAtCntntFlyFrames( *pDoc->GetSpzFrmFmts(), aPos, nOldIdx );
@@ -738,7 +738,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
SwNode* pMovedNode = NULL;
if( nSectDiff )
{
- ULONG nMoveIndex = aPos.nNode.GetIndex();
+ sal_uLong nMoveIndex = aPos.nNode.GetIndex();
int nDiff = 0;
if( bJoinNext )
{
@@ -755,7 +755,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
aPos.nNode--;
if( !bJoinNext )
pMovedNode = &aPos.nNode.GetNode();
- pDoc->GetNodes()._MoveNodes( aRg, pDoc->GetNodes(), aMvIdx, TRUE );
+ pDoc->GetNodes()._MoveNodes( aRg, pDoc->GetNodes(), aMvIdx, sal_True );
aPos.nNode++;
}
@@ -767,7 +767,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
if( nReplaceDummy )
{
- ULONG nMoveIndex;
+ sal_uLong nMoveIndex;
if( bJoinNext )
{
nMoveIndex = nEndNode - nNdDiff;
@@ -781,7 +781,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
SwNodeIndex aMvIdx( pDoc->GetNodes(), nMoveIndex );
SwNodeRange aRg( aPos.nNode, 0, aPos.nNode, 1 );
pMovedNode = &aPos.nNode.GetNode();
- pDoc->GetNodes()._MoveNodes( aRg, pDoc->GetNodes(), aMvIdx, TRUE );
+ pDoc->GetNodes()._MoveNodes( aRg, pDoc->GetNodes(), aMvIdx, sal_True );
pDoc->GetNodes().Delete( aMvIdx, 1 );
}
}
@@ -838,8 +838,8 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
if( bResetPgDesc || bResetPgBrk )
{
- USHORT nStt = static_cast<USHORT>( bResetPgDesc ? RES_PAGEDESC : RES_BREAK );
- USHORT nEnd = static_cast<USHORT>( bResetPgBrk ? RES_BREAK : RES_PAGEDESC );
+ sal_uInt16 nStt = static_cast<sal_uInt16>( bResetPgDesc ? RES_PAGEDESC : RES_BREAK );
+ sal_uInt16 nEnd = static_cast<sal_uInt16>( bResetPgBrk ? RES_BREAK : RES_PAGEDESC );
SwNode* pNode = pDoc->GetNodes()[ nEndNode + 1 ];
if( pNode->IsCntntNode() )
@@ -855,12 +855,12 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
SetSaveData( *pDoc, *pRedlSaveData );
pDoc->DoUndo( bUndo ); // Undo wieder einschalten
- SetPaM( rUndoIter, TRUE );
+ SetPaM( rUndoIter, sal_True );
}
void SwUndoDelete::Redo( SwUndoIter& rUndoIter )
{
- rUndoIter.SetUpdateAttr( TRUE );
+ rUndoIter.SetUpdateAttr( sal_True );
SwPaM& rPam = *rUndoIter.pAktPam;
SwDoc& rDoc = *rPam.GetDoc();
@@ -869,7 +869,7 @@ void SwUndoDelete::Redo( SwUndoIter& rUndoIter )
if( pRedlSaveData )
{
- bool bSuccess = FillSaveData(rPam, *pRedlSaveData, TRUE);
+ bool bSuccess = FillSaveData(rPam, *pRedlSaveData, sal_True);
OSL_ENSURE(bSuccess,
"SwUndoDelete::Redo: used to have redline data, but now none?");
if (!bSuccess)
@@ -881,7 +881,7 @@ void SwUndoDelete::Redo( SwUndoIter& rUndoIter )
if( !bDelFullPara )
{
SwUndRng aTmpRng( rPam );
- RemoveIdxFromRange( rPam, FALSE );
+ RemoveIdxFromRange( rPam, sal_False );
aTmpRng.SetPaM( rPam );
if( !bJoinNext ) // Dann Selektion von unten nach oben
@@ -947,11 +947,11 @@ void SwUndoDelete::Redo( SwUndoIter& rUndoIter )
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
}
pTblNd->DelFrms();
@@ -988,8 +988,8 @@ void SwUndoDelete::Repeat( SwUndoIter& rUndoIter )
SwPaM& rPam = *rUndoIter.pAktPam;
SwDoc& rDoc = *rPam.GetDoc();
- BOOL bGroupUndo = rDoc.DoesGroupUndo();
- rDoc.DoGroupUndo( FALSE );
+ sal_Bool bGroupUndo = rDoc.DoesGroupUndo();
+ rDoc.DoGroupUndo( sal_False );
if( !rPam.HasMark() )
{
rPam.SetMark();
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 1a71a705b2fb..6d637ad00315 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -59,14 +59,14 @@ class SwRedlineSaveData : public SwUndRng, public SwRedlineData,
public:
SwRedlineSaveData( SwComparePosition eCmpPos,
const SwPosition& rSttPos, const SwPosition& rEndPos,
- SwRedline& rRedl, BOOL bCopyNext );
+ SwRedline& rRedl, sal_Bool bCopyNext );
~SwRedlineSaveData();
void RedlineToDoc( SwPaM& rPam );
SwNodeIndex* GetMvSttIdx() const
{ return SwUndoSaveSection::GetMvSttIdx(); }
#ifdef DBG_UTIL
- USHORT nRedlineCount;
+ sal_uInt16 nRedlineCount;
#endif
};
@@ -76,8 +76,8 @@ SV_IMPL_PTRARR( SwRedlineSaveDatas, SwRedlineSaveDataPtr )
SwUndoIter::SwUndoIter( SwPaM* pPam, SwUndoId nId )
{
nUndoId = nId;
- bWeiter = nId ? TRUE : FALSE;
- bUpdateAttr = FALSE;
+ bWeiter = nId ? sal_True : sal_False;
+ bUpdateAttr = sal_False;
pAktPam = pPam;
nEndCnt = 0;
pSelFmt = 0;
@@ -87,7 +87,7 @@ inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
//------------------------------------------------------------
-// Diese Klasse speichert den Pam als USHORT's und kann diese wieder zu
+// Diese Klasse speichert den Pam als sal_uInt16's und kann diese wieder zu
// einem PaM zusammensetzen
SwUndRng::SwUndRng()
@@ -119,7 +119,7 @@ void SwUndRng::SetValues( const SwPaM& rPam )
nSttCntnt = pStt->nContent.GetIndex();
}
-void SwUndRng::SetPaM( SwPaM & rPam, BOOL bCorrToCntnt ) const
+void SwUndRng::SetPaM( SwPaM & rPam, sal_Bool bCorrToCntnt ) const
{
rPam.DeleteMark();
rPam.GetPoint()->nNode = nSttNode;
@@ -147,7 +147,7 @@ void SwUndRng::SetPaM( SwPaM & rPam, BOOL bCorrToCntnt ) const
rPam.GetPoint()->nContent.Assign( 0, 0 );
}
-void SwUndRng::SetPaM( SwUndoIter& rIter, BOOL bCorrToCntnt ) const
+void SwUndRng::SetPaM( SwUndoIter& rIter, sal_Bool bCorrToCntnt ) const
{
if( rIter.pAktPam )
SetPaM( *rIter.pAktPam, bCorrToCntnt );
@@ -156,17 +156,17 @@ void SwUndRng::SetPaM( SwUndoIter& rIter, BOOL bCorrToCntnt ) const
//------------------------------------------------------------
-void SwUndo::RemoveIdxFromSection( SwDoc& rDoc, ULONG nSttIdx,
- ULONG* pEndIdx )
+void SwUndo::RemoveIdxFromSection( SwDoc& rDoc, sal_uLong nSttIdx,
+ sal_uLong* pEndIdx )
{
SwNodeIndex aIdx( rDoc.GetNodes(), nSttIdx );
SwNodeIndex aEndIdx( rDoc.GetNodes(), pEndIdx ? *pEndIdx
: aIdx.GetNode().EndOfSectionIndex() );
SwPosition aPos( rDoc.GetNodes().GetEndOfPostIts() );
- rDoc.CorrAbs( aIdx, aEndIdx, aPos, TRUE );
+ rDoc.CorrAbs( aIdx, aEndIdx, aPos, sal_True );
}
-void SwUndo::RemoveIdxFromRange( SwPaM& rPam, BOOL bMoveNext )
+void SwUndo::RemoveIdxFromRange( SwPaM& rPam, sal_Bool bMoveNext )
{
const SwPosition* pEnd = rPam.End();
if( bMoveNext )
@@ -187,13 +187,13 @@ void SwUndo::RemoveIdxFromRange( SwPaM& rPam, BOOL bMoveNext )
}
}
- rPam.GetDoc()->CorrAbs( aStt, aEnd, *rPam.GetPoint(), TRUE );
+ rPam.GetDoc()->CorrAbs( aStt, aEnd, *rPam.GetPoint(), sal_True );
}
else
- rPam.GetDoc()->CorrAbs( rPam, *pEnd, TRUE );
+ rPam.GetDoc()->CorrAbs( rPam, *pEnd, sal_True );
}
-void SwUndo::RemoveIdxRel( ULONG nIdx, const SwPosition& rPos )
+void SwUndo::RemoveIdxRel( sal_uLong nIdx, const SwPosition& rPos )
{
// nur die Crsr verschieben; die Bookmarks/TOXMarks/.. werden vom
// entsp. JoinNext/JoinPrev erledigt!
@@ -286,11 +286,11 @@ SwUndoSaveCntnt::~SwUndoSaveCntnt()
// aufgerufen. Dann soll die gesamte Section verschoben werden.
void SwUndoSaveCntnt::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx,
- SwIndex* pCntIdx, ULONG* pEndNdIdx, xub_StrLen* pEndCntIdx )
+ SwIndex* pCntIdx, sal_uLong* pEndNdIdx, xub_StrLen* pEndCntIdx )
{
SwDoc& rDoc = *rPaM.GetDoc();
- BOOL bUndo = rDoc.DoesUndo();
- rDoc.DoUndo( FALSE );
+ sal_Bool bUndo = rDoc.DoesUndo();
+ rDoc.DoUndo( sal_False );
SwNoTxtNode* pCpyNd = rPaM.GetNode()->GetNoTxtNode();
@@ -314,14 +314,14 @@ void SwUndoSaveCntnt::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx,
else
aPos.nNode.GetNode().GetCntntNode()->MakeEndIndex( &aPos.nContent );
- // als USHORT merken; die Indizies verschieben sich !!
- ULONG nTmpMvNode = aPos.nNode.GetIndex();
+ // als sal_uInt16 merken; die Indizies verschieben sich !!
+ sal_uLong nTmpMvNode = aPos.nNode.GetIndex();
xub_StrLen nTmpMvCntnt = aPos.nContent.GetIndex();
if( pCpyNd || pEndNdIdx )
{
SwNodeRange aRg( pStt->nNode, 0, pEnd->nNode, 1 );
- rDoc.GetNodes()._MoveNodes( aRg, rNds, aPos.nNode, FALSE );
+ rDoc.GetNodes()._MoveNodes( aRg, rNds, aPos.nNode, sal_False );
aPos.nContent = 0;
aPos.nNode--;
}
@@ -375,17 +375,17 @@ void SwUndoSaveCntnt::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx,
rDoc.DoUndo( bUndo );
}
-void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, ULONG nNodeIdx,
+void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx,
xub_StrLen nCntIdx, SwPosition& rInsPos,
- ULONG* pEndNdIdx, xub_StrLen* pEndCntIdx )
+ sal_uLong* pEndNdIdx, xub_StrLen* pEndCntIdx )
{
// jetzt kommt das wiederherstellen
SwNodes& rNds = (SwNodes&)*rDoc.GetUndoNds();
if( nNodeIdx == rNds.GetEndOfPostIts().GetIndex() )
return; // nichts gespeichert
- BOOL bUndo = rDoc.DoesUndo();
- rDoc.DoUndo( FALSE );
+ sal_Bool bUndo = rDoc.DoesUndo();
+ rDoc.DoUndo( sal_False );
SwPaM aPaM( rInsPos );
if( pEndNdIdx ) // dann hole aus diesem den Bereich
@@ -438,7 +438,7 @@ void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, ULONG nNodeIdx,
}
else {
- ASSERT( FALSE, "was ist es denn nun?" );
+ ASSERT( sal_False, "was ist es denn nun?" );
}
rDoc.DoUndo( bUndo );
@@ -449,21 +449,21 @@ void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, ULONG nNodeIdx,
// Point liegt dann vor dem manipuliertem Bereich !!)
// Das Flag gibt an, ob noch vorm Point Inhalt steht.
-BOOL SwUndoSaveCntnt::MovePtBackward( SwPaM& rPam )
+sal_Bool SwUndoSaveCntnt::MovePtBackward( SwPaM& rPam )
{
rPam.SetMark();
if( rPam.Move( fnMoveBackward ))
- return TRUE;
+ return sal_True;
// gibt es nach vorne keinen Inhalt mehr, so setze den Point einfach
// auf die vorherige Position (Node und Content, damit der Content
// abgemeldet wird !!)
rPam.GetPoint()->nNode--;
rPam.GetPoint()->nContent.Assign( 0, 0 );
- return FALSE;
+ return sal_False;
}
-void SwUndoSaveCntnt::MovePtForward( SwPaM& rPam, BOOL bMvBkwrd )
+void SwUndoSaveCntnt::MovePtForward( SwPaM& rPam, sal_Bool bMvBkwrd )
{
// gab es noch Inhalt vor der Position ?
if( bMvBkwrd )
@@ -501,8 +501,8 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
SwDoc* pDoc = rMark.nNode.GetNode().GetDoc();
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bDoesUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
// 1. Fussnoten
if( nsDelCntntType::DELCNT_FTN & nDelCntntType )
@@ -511,7 +511,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
if( rFtnArr.Count() )
{
const SwNode* pFtnNd;
- USHORT nPos;
+ sal_uInt16 nPos;
rFtnArr.SeekEntry( pStt->nNode, &nPos );
SwTxtFtn* pSrch;
@@ -574,14 +574,14 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
// 2. Flys
if( nsDelCntntType::DELCNT_FLY & nDelCntntType )
{
- USHORT nChainInsPos = pHistory ? pHistory->Count() : 0;
+ sal_uInt16 nChainInsPos = pHistory ? pHistory->Count() : 0;
const SwSpzFrmFmts& rSpzArr = *pDoc->GetSpzFrmFmts();
if( rSpzArr.Count() )
{
- const BOOL bDelFwrd = rMark.nNode.GetIndex() <= rPoint.nNode.GetIndex();
+ const sal_Bool bDelFwrd = rMark.nNode.GetIndex() <= rPoint.nNode.GetIndex();
SwFlyFrmFmt* pFmt;
const SwFmtAnchor* pAnchor;
- USHORT n = rSpzArr.Count();
+ sal_uInt16 n = rSpzArr.Count();
const SwPosition* pAPos;
while( n && rSpzArr.Count() )
@@ -714,7 +714,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
if( pMarkAccess->getMarksCount() )
{
- for( USHORT n = 0; n < pMarkAccess->getMarksCount(); ++n )
+ for( sal_uInt16 n = 0; n < pMarkAccess->getMarksCount(); ++n )
{
// --> OD 2007-10-17 #i81002#
bool bSavePos = false;
@@ -853,7 +853,7 @@ void SwUndoSaveSection::SaveSection( SwDoc* , const SwNodeRange& rRange )
DelCntntIndex( *aPam.GetMark(), *aPam.GetPoint() );
pRedlSaveData = new SwRedlineSaveDatas;
- if( !SwUndo::FillSaveData( aPam, *pRedlSaveData, TRUE, TRUE ))
+ if( !SwUndo::FillSaveData( aPam, *pRedlSaveData, sal_True, sal_True ))
delete pRedlSaveData, pRedlSaveData = 0;
nStartPos = rRange.aStart.GetIndex();
@@ -861,22 +861,22 @@ void SwUndoSaveSection::SaveSection( SwDoc* , const SwNodeRange& rRange )
aPam.GetPoint()->nNode--;
aPam.GetMark()->nNode++;
- SwCntntNode* pCNd = aPam.GetCntntNode( FALSE );
+ SwCntntNode* pCNd = aPam.GetCntntNode( sal_False );
if( pCNd )
aPam.GetMark()->nContent.Assign( pCNd, 0 );
- if( 0 != ( pCNd = aPam.GetCntntNode( TRUE )) )
+ if( 0 != ( pCNd = aPam.GetCntntNode( sal_True )) )
aPam.GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
// Positionen als SwIndex merken, damit im DTOR dieser Bereich
// entfernt werden kann !!
- ULONG nEnd;
+ sal_uLong nEnd;
pMvStt = new SwNodeIndex( rRange.aStart );
MoveToUndoNds( aPam, pMvStt, 0, &nEnd, 0 );
nMvLen = nEnd - pMvStt->GetIndex() + 1;
}
void SwUndoSaveSection::RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx,
- USHORT nSectType )
+ sal_uInt16 nSectType )
{
if( ULONG_MAX != nStartPos ) // gab es ueberhaupt Inhalt ?
{
@@ -901,7 +901,7 @@ void SwUndoSaveSection::RestoreSection( SwDoc* pDoc, const SwNodeIndex& rInsPos
if( ULONG_MAX != nStartPos ) // gab es ueberhaupt Inhalt ?
{
SwPosition aInsPos( rInsPos );
- ULONG nEnd = pMvStt->GetIndex() + nMvLen - 1;
+ sal_uLong nEnd = pMvStt->GetIndex() + nMvLen - 1;
MoveFromUndoNds( *pDoc, pMvStt->GetIndex(), 0, aInsPos, &nEnd, 0 );
// Indizies wieder zerstoren, Inhalt ist aus dem UndoNodes-Array
@@ -927,19 +927,19 @@ void SwUndoStart::Undo( SwUndoIter& rUndoIter )
{
if( !( --rUndoIter.nEndCnt ) && rUndoIter.bWeiter &&
( rUndoIter.GetId() ? ( rUndoIter.GetId() == nUserId ||
- ( UNDO_END == rUndoIter.GetId() && UNDO_START == GetId() )) : TRUE ))
- rUndoIter.bWeiter = FALSE;
+ ( UNDO_END == rUndoIter.GetId() && UNDO_START == GetId() )) : sal_True ))
+ rUndoIter.bWeiter = sal_False;
}
void SwUndoStart::Redo( SwUndoIter& rUndoIter )
{
- rUndoIter.bWeiter = TRUE;
+ rUndoIter.bWeiter = sal_True;
++rUndoIter.nEndCnt;
}
void SwUndoStart::Repeat( SwUndoIter& rUndoIter )
{
- rUndoIter.bWeiter = FALSE;
+ rUndoIter.bWeiter = sal_False;
}
String SwUndoStart::GetComment() const
@@ -986,7 +986,7 @@ SwUndoEnd::SwUndoEnd( SwUndoId nInitId )
void SwUndoEnd::Undo( SwUndoIter& rUndoIter )
{
if( rUndoIter.GetId() == GetId() || !rUndoIter.GetId() )
- rUndoIter.bWeiter = TRUE;
+ rUndoIter.bWeiter = sal_True;
if( rUndoIter.bWeiter )
++rUndoIter.nEndCnt;
}
@@ -995,13 +995,13 @@ void SwUndoEnd::Redo( SwUndoIter& rUndoIter )
{
if( !( --rUndoIter.nEndCnt ) && rUndoIter.bWeiter &&
( rUndoIter.GetId() ? ( rUndoIter.GetId() == nUserId ||
- ( UNDO_END == rUndoIter.GetId() && UNDO_START == GetId() )) : TRUE ))
- rUndoIter.bWeiter = FALSE;
+ ( UNDO_END == rUndoIter.GetId() && UNDO_START == GetId() )) : sal_True ))
+ rUndoIter.bWeiter = sal_False;
}
void SwUndoEnd::Repeat( SwUndoIter& rUndoIter )
{
- rUndoIter.bWeiter = FALSE;
+ rUndoIter.bWeiter = sal_False;
}
String SwUndoEnd::GetComment() const
@@ -1045,7 +1045,7 @@ SwRedlineSaveData::SwRedlineSaveData( SwComparePosition eCmpPos,
const SwPosition& rSttPos,
const SwPosition& rEndPos,
SwRedline& rRedl,
- BOOL bCopyNext )
+ sal_Bool bCopyNext )
: SwUndRng( rRedl ),
SwRedlineData( rRedl.GetRedlineData(), bCopyNext )
{
@@ -1129,8 +1129,8 @@ void SwRedlineSaveData::RedlineToDoc( SwPaM& rPam )
rDoc.SetRedlineMode_intern( eOld );
}
-BOOL SwUndo::FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
- BOOL bDelRange, BOOL bCopyNext )
+sal_Bool SwUndo::FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
+ sal_Bool bDelRange, sal_Bool bCopyNext )
{
if( rSData.Count() )
rSData.DeleteAndDestroy( 0, rSData.Count() );
@@ -1138,7 +1138,7 @@ BOOL SwUndo::FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
SwRedlineSaveData* pNewData;
const SwPosition *pStt = rRange.Start(), *pEnd = rRange.End();
const SwRedlineTbl& rTbl = rRange.GetDoc()->GetRedlineTbl();
- USHORT n = 0;
+ sal_uInt16 n = 0;
rRange.GetDoc()->GetRedline( *pStt, &n );
for( ; n < rTbl.Count(); ++n )
{
@@ -1159,7 +1159,7 @@ BOOL SwUndo::FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
return 0 != rSData.Count();
}
-BOOL SwUndo::FillSaveDataForFmt( const SwPaM& rRange, SwRedlineSaveDatas& rSData )
+sal_Bool SwUndo::FillSaveDataForFmt( const SwPaM& rRange, SwRedlineSaveDatas& rSData )
{
if( rSData.Count() )
rSData.DeleteAndDestroy( 0, rSData.Count() );
@@ -1167,7 +1167,7 @@ BOOL SwUndo::FillSaveDataForFmt( const SwPaM& rRange, SwRedlineSaveDatas& rSData
SwRedlineSaveData* pNewData;
const SwPosition *pStt = rRange.Start(), *pEnd = rRange.End();
const SwRedlineTbl& rTbl = rRange.GetDoc()->GetRedlineTbl();
- USHORT n = 0;
+ sal_uInt16 n = 0;
rRange.GetDoc()->GetRedline( *pStt, &n );
for( ; n < rTbl.Count(); ++n )
{
@@ -1181,7 +1181,7 @@ BOOL SwUndo::FillSaveDataForFmt( const SwPaM& rRange, SwRedlineSaveDatas& rSData
POS_COLLIDE_END != eCmpPos && POS_COLLIDE_START != eCmpPos )
{
pNewData = new SwRedlineSaveData( eCmpPos, *pStt, *pEnd,
- *pRedl, TRUE );
+ *pRedl, sal_True );
rSData.Insert( pNewData, rSData.Count() );
}
@@ -1197,7 +1197,7 @@ void SwUndo::SetSaveData( SwDoc& rDoc, const SwRedlineSaveDatas& rSData )
rDoc.SetRedlineMode_intern( (RedlineMode_t)(( eOld & ~nsRedlineMode_t::REDLINE_IGNORE) | nsRedlineMode_t::REDLINE_ON ));
SwPaM aPam( rDoc.GetNodes().GetEndOfContent() );
- for( USHORT n = rSData.Count(); n; )
+ for( sal_uInt16 n = rSData.Count(); n; )
rSData[ --n ]->RedlineToDoc( aPam );
// check redline count against count saved in RedlineSaveData object
@@ -1208,23 +1208,23 @@ void SwUndo::SetSaveData( SwDoc& rDoc, const SwRedlineSaveDatas& rSData )
rDoc.SetRedlineMode_intern( eOld );
}
-BOOL SwUndo::HasHiddenRedlines( const SwRedlineSaveDatas& rSData )
+sal_Bool SwUndo::HasHiddenRedlines( const SwRedlineSaveDatas& rSData )
{
- for( USHORT n = rSData.Count(); n; )
+ for( sal_uInt16 n = rSData.Count(); n; )
if( rSData[ --n ]->GetMvSttIdx() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
-BOOL SwUndo::CanRedlineGroup( SwRedlineSaveDatas& rCurr,
- const SwRedlineSaveDatas& rCheck, BOOL bCurrIsEnd )
+sal_Bool SwUndo::CanRedlineGroup( SwRedlineSaveDatas& rCurr,
+ const SwRedlineSaveDatas& rCheck, sal_Bool bCurrIsEnd )
{
- BOOL bRet = FALSE;
- USHORT n;
+ sal_Bool bRet = sal_False;
+ sal_uInt16 n;
if( rCurr.Count() == rCheck.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
for( n = 0; n < rCurr.Count(); ++n )
{
const SwRedlineSaveData& rSet = *rCurr[ n ];
@@ -1235,7 +1235,7 @@ BOOL SwUndo::CanRedlineGroup( SwRedlineSaveDatas& rCurr,
: rSet.nEndCntnt != rGet.nSttCntnt ) ||
!rGet.CanCombine( rSet ) )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index a0ba635549ac..334c098ec087 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -65,7 +65,7 @@ SwUndoFlyBase::~SwUndoFlyBase()
delete pFrmFmt;
}
-void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm )
+void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, sal_Bool bShowSelFrm )
{
SwDoc* pDoc = &rUndoIter.GetDoc();
@@ -92,7 +92,7 @@ void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm )
if (FLY_AT_PAGE == nRndId)
{
- aAnchor.SetPageNum( (USHORT)nNdPgPos );
+ aAnchor.SetPageNum( (sal_uInt16)nNdPgPos );
}
else
{
@@ -157,12 +157,12 @@ void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm )
case FLY_AT_PAGE:
break;
}
- bDelFmt = FALSE;
+ bDelFmt = sal_False;
}
void SwUndoFlyBase::DelFly( SwDoc* pDoc )
{
- bDelFmt = TRUE; // im DTOR das Format loeschen
+ bDelFmt = sal_True; // im DTOR das Format loeschen
pFrmFmt->DelFrms(); // Frms vernichten.
// alle Uno-Objecte sollten sich jetzt abmelden
@@ -194,7 +194,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
const SwPosition* pPos = rAnchor.GetCntntAnchor();
// die Positionen im Nodes-Array haben sich verschoben
- nRndId = static_cast<USHORT>(rAnchor.GetAnchorId());
+ nRndId = static_cast<sal_uInt16>(rAnchor.GetAnchorId());
if (FLY_AS_CHAR == nRndId)
{
nNdPgPos = pPos->nNode.GetIndex();
@@ -236,14 +236,14 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
// ----- Undo-InsertFly ------
-SwUndoInsLayFmt::SwUndoInsLayFmt( SwFrmFmt* pFormat, ULONG nNodeIdx, xub_StrLen nCntIdx )
+SwUndoInsLayFmt::SwUndoInsLayFmt( SwFrmFmt* pFormat, sal_uLong nNodeIdx, xub_StrLen nCntIdx )
: SwUndoFlyBase( pFormat, RES_DRAWFRMFMT == pFormat->Which() ?
UNDO_INSDRAWFMT : UNDO_INSLAYFMT ),
mnCrsrSaveIndexPara( nNodeIdx ), mnCrsrSaveIndexPos( nCntIdx )
{
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
- nRndId = static_cast<USHORT>(rAnchor.GetAnchorId());
- bDelFmt = FALSE;
+ nRndId = static_cast<sal_uInt16>(rAnchor.GetAnchorId());
+ bDelFmt = sal_False;
switch( nRndId )
{
case FLY_AT_PAGE:
@@ -262,7 +262,7 @@ SwUndoInsLayFmt::SwUndoInsLayFmt( SwFrmFmt* pFormat, ULONG nNodeIdx, xub_StrLen
}
break;
default:
- ASSERT( FALSE, "Was denn fuer ein FlyFrame?" );
+ ASSERT( sal_False, "Was denn fuer ein FlyFrame?" );
}
}
@@ -285,7 +285,7 @@ void SwUndoInsLayFmt::Undo( SwUndoIter& rUndoIter )
SwNodeIndex aEndIdx( rUndoIter.GetDoc().GetNodes(), aIdx.GetNode().EndOfSectionIndex() );
SwIndex aIndex( pNode, mnCrsrSaveIndexPos );
SwPosition aPos( *pNode, aIndex );
- rUndoIter.GetDoc().CorrAbs( aIdx, aEndIdx, aPos, TRUE );
+ rUndoIter.GetDoc().CorrAbs( aIdx, aEndIdx, aPos, sal_True );
bRemoveIdx = false;
}
}
@@ -342,7 +342,7 @@ void SwUndoInsLayFmt::Repeat( SwUndoIter& rUndoIter )
rUndoIter.pAktPam ));
}
else {
- ASSERT( FALSE, "was fuer ein Anker ist es denn nun?" );
+ ASSERT( sal_False, "was fuer ein Anker ist es denn nun?" );
}
SwFrmFmt* pFlyFmt = pDoc->CopyLayoutFmt( *pFrmFmt, aAnchor, true, true );
@@ -386,7 +386,7 @@ String SwUndoInsLayFmt::GetComment() const
// ----- Undo-DeleteFly ------
SwUndoDelLayFmt::SwUndoDelLayFmt( SwFrmFmt* pFormat )
- : SwUndoFlyBase( pFormat, UNDO_DELLAYFMT ), bShowSelFrm( TRUE )
+ : SwUndoFlyBase( pFormat, UNDO_DELLAYFMT ), bShowSelFrm( sal_True )
{
SwDoc* pDoc = pFormat->GetDoc();
DelFly( pDoc );
@@ -466,7 +466,7 @@ SwUndoSetFlyFmt::SwUndoSetFlyFmt( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFrmFmt )
rFlyFmt.GetAttrSet().GetRanges() )),
nOldNode( 0 ), nNewNode( 0 ),
nOldCntnt( 0 ), nNewCntnt( 0 ),
- nOldAnchorTyp( 0 ), nNewAnchorTyp( 0 ), bAnchorChgd( FALSE )
+ nOldAnchorTyp( 0 ), nNewAnchorTyp( 0 ), bAnchorChgd( sal_False )
{
}
@@ -487,7 +487,7 @@ SwUndoSetFlyFmt::~SwUndoSetFlyFmt()
}
void SwUndoSetFlyFmt::GetAnchor( SwFmtAnchor& rAnchor,
- ULONG nNode, xub_StrLen nCntnt )
+ sal_uLong nNode, xub_StrLen nCntnt )
{
RndStdIds nAnchorTyp = rAnchor.GetAnchorId();
if (FLY_AT_PAGE != nAnchorTyp)
@@ -630,7 +630,7 @@ void SwUndoSetFlyFmt::Redo( SwUndoIter& rIter )
}
}
-void SwUndoSetFlyFmt::PutAttr( USHORT nWhich, const SfxPoolItem* pItem )
+void SwUndoSetFlyFmt::PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem )
{
if( pItem && pItem != GetDfltAttr( nWhich ) )
{
@@ -640,10 +640,10 @@ void SwUndoSetFlyFmt::PutAttr( USHORT nWhich, const SfxPoolItem* pItem )
// nur den 1. Ankerwechsel vermerken
ASSERT( !bAnchorChgd, "mehrfacher Ankerwechsel nicht erlaubt!" );
- bAnchorChgd = TRUE;
+ bAnchorChgd = sal_True;
const SwFmtAnchor* pAnchor = (SwFmtAnchor*)pItem;
- switch( nOldAnchorTyp = static_cast<USHORT>(pAnchor->GetAnchorId()) )
+ switch( nOldAnchorTyp = static_cast<sal_uInt16>(pAnchor->GetAnchorId()) )
{
case FLY_AS_CHAR:
case FLY_AT_CHAR:
@@ -658,7 +658,7 @@ void SwUndoSetFlyFmt::PutAttr( USHORT nWhich, const SfxPoolItem* pItem )
}
pAnchor = (SwFmtAnchor*)&pFrmFmt->GetAnchor();
- switch( nNewAnchorTyp = static_cast<USHORT>(pAnchor->GetAnchorId()) )
+ switch( nNewAnchorTyp = static_cast<sal_uInt16>(pAnchor->GetAnchorId()) )
{
case FLY_AS_CHAR:
case FLY_AT_CHAR:
@@ -683,7 +683,7 @@ void SwUndoSetFlyFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* )
{
if( pOld )
{
- USHORT nWhich = pOld->Which();
+ sal_uInt16 nWhich = pOld->Which();
if( nWhich < POOLATTR_END )
PutAttr( nWhich, pOld );
diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx
index 980496cfd518..38a2baf020db 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -57,7 +57,7 @@ struct SwUndoGroupObjImpl
{
SwDrawFrmFmt* pFmt;
SdrObject* pObj;
- ULONG nNodeIdx;
+ sal_uLong nNodeIdx;
// OD 2004-04-15 #i26791# - keeping the anchor and the relative position
// of drawing objects no longer needed
@@ -71,7 +71,7 @@ inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
IMPL_LINK( SwDoc, AddDrawUndo, SdrUndoAction *, pUndo )
{
#if OSL_DEBUG_LEVEL > 1
- USHORT nId = pUndo->GetId();
+ sal_uInt16 nId = pUndo->GetId();
(void)nId;
String sComment( pUndo->GetComment() );
#endif
@@ -131,7 +131,7 @@ void lcl_SendRemoveToUno( SwFmt& rFmt )
rFmt.Modify( &aMsgHint, &aMsgHint );
}
-void lcl_SaveAnchor( SwFrmFmt* pFmt, ULONG& rNodePos )
+void lcl_SaveAnchor( SwFrmFmt* pFmt, sal_uLong& rNodePos )
{
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
@@ -169,7 +169,7 @@ void lcl_SaveAnchor( SwFrmFmt* pFmt, ULONG& rNodePos )
}
}
-void lcl_RestoreAnchor( SwFrmFmt* pFmt, ULONG& rNodePos )
+void lcl_RestoreAnchor( SwFrmFmt* pFmt, sal_uLong& rNodePos )
{
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
@@ -202,8 +202,8 @@ void lcl_RestoreAnchor( SwFrmFmt* pFmt, ULONG& rNodePos )
}
}
-SwUndoDrawGroup::SwUndoDrawGroup( USHORT nCnt )
- : SwUndo( UNDO_DRAWGROUP ), nSize( nCnt + 1 ), bDelFmt( TRUE )
+SwUndoDrawGroup::SwUndoDrawGroup( sal_uInt16 nCnt )
+ : SwUndo( UNDO_DRAWGROUP ), nSize( nCnt + 1 ), bDelFmt( sal_True )
{
pObjArr = new SwUndoGroupObjImpl[ nSize ];
}
@@ -213,7 +213,7 @@ SwUndoDrawGroup::~SwUndoDrawGroup()
if( bDelFmt )
{
SwUndoGroupObjImpl* pTmp = pObjArr + 1;
- for( USHORT n = 1; n < nSize; ++n, ++pTmp )
+ for( sal_uInt16 n = 1; n < nSize; ++n, ++pTmp )
delete pTmp->pFmt;
}
else
@@ -224,7 +224,7 @@ SwUndoDrawGroup::~SwUndoDrawGroup()
void SwUndoDrawGroup::Undo( SwUndoIter& )
{
- bDelFmt = FALSE;
+ bDelFmt = sal_False;
// das Group-Object sichern
SwDrawFrmFmt* pFmt = pObjArr->pFmt;
@@ -246,7 +246,7 @@ void SwUndoDrawGroup::Undo( SwUndoIter& )
SwSpzFrmFmts& rFlyFmts = *(SwSpzFrmFmts*)pDoc->GetSpzFrmFmts();
rFlyFmts.Remove( rFlyFmts.GetPos( pFmt ));
- for( USHORT n = 1; n < nSize; ++n )
+ for( sal_uInt16 n = 1; n < nSize; ++n )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + n );
@@ -275,14 +275,14 @@ void SwUndoDrawGroup::Undo( SwUndoIter& )
void SwUndoDrawGroup::Redo( SwUndoIter& )
{
- bDelFmt = TRUE;
+ bDelFmt = sal_True;
// aus dem Array austragen
SwDoc* pDoc = pObjArr->pFmt->GetDoc();
SwSpzFrmFmts& rFlyFmts = *(SwSpzFrmFmts*)pDoc->GetSpzFrmFmts();
SdrObject* pObj;
- for( USHORT n = 1; n < nSize; ++n )
+ for( sal_uInt16 n = 1; n < nSize; ++n )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + n );
@@ -323,7 +323,7 @@ void SwUndoDrawGroup::Redo( SwUndoIter& )
// <--
}
-void SwUndoDrawGroup::AddObj( USHORT nPos, SwDrawFrmFmt* pFmt, SdrObject* pObj )
+void SwUndoDrawGroup::AddObj( sal_uInt16 nPos, SwDrawFrmFmt* pFmt, SdrObject* pObj )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + nPos + 1 );
rSave.pObj = pObj;
@@ -348,9 +348,9 @@ void SwUndoDrawGroup::SetGroupFmt( SwDrawFrmFmt* pFmt )
// ------------------------------
SwUndoDrawUnGroup::SwUndoDrawUnGroup( SdrObjGroup* pObj )
- : SwUndo( UNDO_DRAWUNGROUP ), bDelFmt( FALSE )
+ : SwUndo( UNDO_DRAWUNGROUP ), bDelFmt( sal_False )
{
- nSize = (USHORT)pObj->GetSubList()->GetObjCount() + 1;
+ nSize = (sal_uInt16)pObj->GetSubList()->GetObjCount() + 1;
pObjArr = new SwUndoGroupObjImpl[ nSize ];
SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
@@ -378,7 +378,7 @@ SwUndoDrawUnGroup::~SwUndoDrawUnGroup()
if( bDelFmt )
{
SwUndoGroupObjImpl* pTmp = pObjArr + 1;
- for( USHORT n = 1; n < nSize; ++n, ++pTmp )
+ for( sal_uInt16 n = 1; n < nSize; ++n, ++pTmp )
delete pTmp->pFmt;
}
else
@@ -389,13 +389,13 @@ SwUndoDrawUnGroup::~SwUndoDrawUnGroup()
void SwUndoDrawUnGroup::Undo( SwUndoIter& rIter )
{
- bDelFmt = TRUE;
+ bDelFmt = sal_True;
// aus dem Array austragen
SwDoc* pDoc = &rIter.GetDoc();
SwSpzFrmFmts& rFlyFmts = *(SwSpzFrmFmts*)pDoc->GetSpzFrmFmts();
- for( USHORT n = 1; n < nSize; ++n )
+ for( sal_uInt16 n = 1; n < nSize; ++n )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + n );
@@ -441,7 +441,7 @@ void SwUndoDrawUnGroup::Undo( SwUndoIter& rIter )
void SwUndoDrawUnGroup::Redo( SwUndoIter& )
{
- bDelFmt = FALSE;
+ bDelFmt = sal_False;
// das Group-Object sichern
SwDrawFrmFmt* pFmt = pObjArr->pFmt;
@@ -462,7 +462,7 @@ void SwUndoDrawUnGroup::Redo( SwUndoIter& )
SwSpzFrmFmts& rFlyFmts = *(SwSpzFrmFmts*)pDoc->GetSpzFrmFmts();
rFlyFmts.Remove( rFlyFmts.GetPos( pFmt ));
- for( USHORT n = 1; n < nSize; ++n )
+ for( sal_uInt16 n = 1; n < nSize; ++n )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + n );
@@ -491,7 +491,7 @@ void SwUndoDrawUnGroup::Redo( SwUndoIter& )
}
}
-void SwUndoDrawUnGroup::AddObj( USHORT nPos, SwDrawFrmFmt* pFmt )
+void SwUndoDrawUnGroup::AddObj( sal_uInt16 nPos, SwDrawFrmFmt* pFmt )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + nPos + 1 );
rSave.pFmt = pFmt;
@@ -551,8 +551,8 @@ void SwUndoDrawUnGroupConnectToLayout::AddFmtAndObj( SwDrawFrmFmt* pDrawFrmFmt,
//-------------------------------------
-SwUndoDrawDelete::SwUndoDrawDelete( USHORT nCnt )
- : SwUndo( UNDO_DRAWDELETE ), nSize( nCnt ), bDelFmt( TRUE )
+SwUndoDrawDelete::SwUndoDrawDelete( sal_uInt16 nCnt )
+ : SwUndo( UNDO_DRAWDELETE ), nSize( nCnt ), bDelFmt( sal_True )
{
pObjArr = new SwUndoGroupObjImpl[ nSize ];
pMarkLst = new SdrMarkList();
@@ -563,7 +563,7 @@ SwUndoDrawDelete::~SwUndoDrawDelete()
if( bDelFmt )
{
SwUndoGroupObjImpl* pTmp = pObjArr;
- for( USHORT n = 0; n < pMarkLst->GetMarkCount(); ++n, ++pTmp )
+ for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n, ++pTmp )
delete pTmp->pFmt;
}
delete [] pObjArr;
@@ -572,9 +572,9 @@ SwUndoDrawDelete::~SwUndoDrawDelete()
void SwUndoDrawDelete::Undo( SwUndoIter &rIter )
{
- bDelFmt = FALSE;
+ bDelFmt = sal_False;
SwSpzFrmFmts& rFlyFmts = *rIter.GetDoc().GetSpzFrmFmts();
- for( USHORT n = 0; n < pMarkLst->GetMarkCount(); ++n )
+ for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + n );
::lcl_RestoreAnchor( rSave.pFmt, rSave.nNodeIdx );
@@ -601,9 +601,9 @@ void SwUndoDrawDelete::Undo( SwUndoIter &rIter )
void SwUndoDrawDelete::Redo( SwUndoIter &rIter )
{
- bDelFmt = TRUE;
+ bDelFmt = sal_True;
SwSpzFrmFmts& rFlyFmts = *rIter.GetDoc().GetSpzFrmFmts();
- for( USHORT n = 0; n < pMarkLst->GetMarkCount(); ++n )
+ for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + n );
SdrObject *pObj = rSave.pObj;
@@ -621,7 +621,7 @@ void SwUndoDrawDelete::Redo( SwUndoIter &rIter )
}
}
-void SwUndoDrawDelete::AddObj( USHORT , SwDrawFrmFmt* pFmt,
+void SwUndoDrawDelete::AddObj( sal_uInt16 , SwDrawFrmFmt* pFmt,
const SdrMark& rMark )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + pMarkLst->GetMarkCount() );
diff --git a/sw/source/core/undo/unfmco.cxx b/sw/source/core/undo/unfmco.cxx
index e67ec2e9d8c2..e761a1a32bd6 100644
--- a/sw/source/core/undo/unfmco.cxx
+++ b/sw/source/core/undo/unfmco.cxx
@@ -101,7 +101,7 @@ void SwUndoFmtColl::Repeat( SwUndoIter& rUndoIter )
// es kann nur eine TextFmtColl auf einen Bereich angewendet werden,
// also erfrage auch nur in dem Array
- USHORT nPos = rUndoIter.GetDoc().GetTxtFmtColls()->GetPos(
+ sal_uInt16 nPos = rUndoIter.GetDoc().GetTxtFmtColls()->GetPos(
(SwTxtFmtColl*)pFmtColl );
// ist das Format ueberhaupt noch vorhanden?
if( USHRT_MAX != nPos )
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index dd95d06a34b1..f11a2dc3d76d 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -64,16 +64,16 @@ using namespace ::com::sun::star;
class _UnReplaceData : private SwUndoSaveCntnt
{
String m_sOld, m_sIns;
- ULONG m_nSttNd, m_nEndNd, m_nOffset;
+ sal_uLong m_nSttNd, m_nEndNd, m_nOffset;
xub_StrLen m_nSttCnt, m_nEndCnt, m_nSetPos, m_nSelEnd;
- BOOL m_bSplitNext : 1;
- BOOL m_bRegExp : 1;
+ sal_Bool m_bSplitNext : 1;
+ sal_Bool m_bRegExp : 1;
// metadata references for paragraph and following para (if m_bSplitNext)
::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart;
::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd;
public:
- _UnReplaceData( const SwPaM& rPam, const String& rIns, BOOL bRegExp );
+ _UnReplaceData( const SwPaM& rPam, const String& rIns, sal_Bool bRegExp );
~_UnReplaceData();
void Undo( SwUndoIter& rIter );
@@ -141,10 +141,10 @@ void SwUndoInsert::Init(const SwNodeIndex & rNd)
SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd, xub_StrLen nCnt,
xub_StrLen nL,
const IDocumentContentOperations::InsertFlags nInsertFlags,
- BOOL bWDelim )
+ sal_Bool bWDelim )
: SwUndo(UNDO_TYPING), pPos( 0 ), pTxt( 0 ), pRedlData( 0 ),
nNode( rNd.GetIndex() ), nCntnt(nCnt), nLen(nL),
- bIsWordDelim( bWDelim ), bIsAppend( FALSE )
+ bIsWordDelim( bWDelim ), bIsAppend( sal_False )
, m_nInsertFlags(nInsertFlags)
{
Init(rNd);
@@ -154,7 +154,7 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd, xub_StrLen nCnt,
SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd )
: SwUndo(UNDO_SPLITNODE), pPos( 0 ), pTxt( 0 ),
pRedlData( 0 ), nNode( rNd.GetIndex() ), nCntnt(0), nLen(1),
- bIsWordDelim( FALSE ), bIsAppend( TRUE )
+ bIsWordDelim( sal_False ), bIsAppend( sal_True )
, m_nInsertFlags(IDocumentContentOperations::INS_EMPTYEXPAND)
{
Init(rNd);
@@ -164,7 +164,7 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd )
// werden kann. Wenn ja, dann aender die Laenge und die InsPos.
// Dann wird von SwDoc::Insert kein neues Object in die Undoliste gestellt.
-BOOL SwUndoInsert::CanGrouping( sal_Unicode cIns )
+sal_Bool SwUndoInsert::CanGrouping( sal_Unicode cIns )
{
if( !bIsAppend && bIsWordDelim ==
!GetAppCharClass().isLetterNumeric( String( cIns )) )
@@ -175,14 +175,14 @@ BOOL SwUndoInsert::CanGrouping( sal_Unicode cIns )
if (pUndoTxt)
pUndoTxt->Insert(cIns);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwUndoInsert::CanGrouping( const SwPosition& rPos )
+sal_Bool SwUndoInsert::CanGrouping( const SwPosition& rPos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nNode == rPos.nNode.GetIndex() &&
nCntnt == rPos.nContent.GetIndex() )
{
@@ -191,7 +191,7 @@ BOOL SwUndoInsert::CanGrouping( const SwPosition& rPos )
if( ( ~nsRedlineMode_t::REDLINE_SHOW_MASK & rDoc.GetRedlineMode() ) ==
( ~nsRedlineMode_t::REDLINE_SHOW_MASK & GetRedlineMode() ) )
{
- bRet = TRUE;
+ bRet = sal_True;
// dann war oder ist noch Redline an:
// pruefe, ob an der InsPosition ein anderer Redline
@@ -203,7 +203,7 @@ BOOL SwUndoInsert::CanGrouping( const SwPosition& rPos )
SwRedlineData aRData( nsRedlineType_t::REDLINE_INSERT, rDoc.GetRedlineAuthor() );
const SwIndexReg* pIReg = rPos.nContent.GetIdxReg();
SwIndex* pIdx;
- for( USHORT i = 0; i < rTbl.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rTbl.Count(); ++i )
{
SwRedline* pRedl = rTbl[ i ];
if( pIReg == (pIdx = &pRedl->End()->nContent)->GetIdxReg() &&
@@ -212,7 +212,7 @@ BOOL SwUndoInsert::CanGrouping( const SwPosition& rPos )
if( !pRedl->HasMark() || !pRedlData ||
*pRedl != *pRedlData || *pRedl != aRData )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -271,7 +271,7 @@ void SwUndoInsert::Undo( SwUndoIter& rUndoIter )
}
else
{
- ULONG nNd = nNode;
+ sal_uLong nNd = nNode;
xub_StrLen nCnt = nCntnt;
if( nLen )
{
@@ -287,7 +287,7 @@ void SwUndoInsert::Undo( SwUndoIter& rUndoIter )
aPaM.GetPoint()->nContent -= nLen;
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ))
pTmpDoc->DeleteRedline( aPaM, true, USHRT_MAX );
- RemoveIdxFromRange( aPaM, FALSE );
+ RemoveIdxFromRange( aPaM, sal_False );
pTxt = new String( pTxtNode->GetTxt().Copy(nCntnt-nLen, nLen) );
pTxtNode->EraseText( aPaM.GetPoint()->nContent, nLen );
}
@@ -296,7 +296,7 @@ void SwUndoInsert::Undo( SwUndoIter& rUndoIter )
aPaM.Move(fnMoveBackward);
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ))
pTmpDoc->DeleteRedline( aPaM, true, USHRT_MAX );
- RemoveIdxFromRange( aPaM, FALSE );
+ RemoveIdxFromRange( aPaM, sal_False );
}
nNd = aPaM.GetPoint()->nNode.GetIndex();
@@ -361,7 +361,7 @@ void SwUndoInsert::Redo( SwUndoIter& rUndoIter )
if( nLen )
{
- BOOL bMvBkwrd = MovePtBackward( *pPam );
+ sal_Bool bMvBkwrd = MovePtBackward( *pPam );
if( pTxt )
{
@@ -374,7 +374,7 @@ void SwUndoInsert::Redo( SwUndoIter& rUndoIter )
else
{
// Inhalt wieder einfuegen. (erst pPos abmelden !!)
- ULONG nMvNd = pPos->nNode.GetIndex();
+ sal_uLong nMvNd = pPos->nNode.GetIndex();
xub_StrLen nMvCnt = pPos->nContent.GetIndex();
DELETEZ( pPos );
MoveFromUndoNds( *pTmpDoc, nMvNd, nMvCnt, *pPam->GetMark() );
@@ -430,8 +430,8 @@ void SwUndoInsert::Repeat( SwUndoIter& rUndoIter )
else
{
String aTxt( ((SwTxtNode*)pCNd)->GetTxt() );
- BOOL bGroupUndo = rDoc.DoesGroupUndo();
- rDoc.DoGroupUndo( FALSE );
+ sal_Bool bGroupUndo = rDoc.DoesGroupUndo();
+ rDoc.DoGroupUndo( sal_False );
rDoc.InsertString( *rUndoIter.pAktPam,
aTxt.Copy( nCntnt - nLen, nLen ) );
rDoc.DoGroupUndo( bGroupUndo );
@@ -524,7 +524,7 @@ void SwUndoReplace::Undo( SwUndoIter& rUndoIter )
nAktPos = aArr.Count();
rUndoIter.pLastUndoObj = this;
bOldIterFlag = rUndoIter.bWeiter;
- rUndoIter.bWeiter = TRUE;
+ rUndoIter.bWeiter = sal_True;
}
aArr[ --nAktPos ]->Undo( rUndoIter );
@@ -543,7 +543,7 @@ void SwUndoReplace::Redo( SwUndoIter& rUndoIter )
ASSERT( !nAktPos, "Redo ohne vorheriges Undo??" );
rUndoIter.pLastUndoObj = this;
bOldIterFlag = rUndoIter.bWeiter;
- rUndoIter.bWeiter = TRUE;
+ rUndoIter.bWeiter = sal_True;
}
aArr[ nAktPos ]->Redo( rUndoIter );
@@ -603,7 +603,7 @@ SwRewriter SwUndoReplace::GetRewriter() const
}
void SwUndoReplace::AddEntry( const SwPaM& rPam, const String& rInsert,
- BOOL bRegExp )
+ sal_Bool bRegExp )
{
_UnReplaceData* pNew = new _UnReplaceData( rPam, rInsert, bRegExp );
aArr.C40_INSERT(_UnReplaceData, pNew, aArr.Count() );
@@ -616,7 +616,7 @@ void SwUndoReplace::SetEntryEnd( const SwPaM& rPam )
}
_UnReplaceData::_UnReplaceData( const SwPaM& rPam, const String& rIns,
- BOOL bRgExp )
+ sal_Bool bRgExp )
: m_sIns( rIns ), m_nOffset( 0 )
{
m_bRegExp = bRgExp;
@@ -638,7 +638,7 @@ _UnReplaceData::_UnReplaceData( const SwPaM& rPam, const String& rIns,
m_nSetPos = pHistory->Count();
- ULONG nNewPos = pStt->nNode.GetIndex();
+ sal_uLong nNewPos = pStt->nNode.GetIndex();
m_nOffset = m_nSttNd - nNewPos;
if ( pNd->GetpSwpHints() )
@@ -654,7 +654,7 @@ _UnReplaceData::_UnReplaceData( const SwPaM& rPam, const String& rIns,
pHistory->Add( pNd->GetTxtColl(), nNewPos, ND_TEXTNODE );
SwTxtNode* pNext = pEnd->nNode.GetNode().GetTxtNode();
- ULONG nTmp = pNext->GetIndex();
+ sal_uLong nTmp = pNext->GetIndex();
pHistory->CopyAttr( pNext->GetpSwpHints(), nTmp, 0,
pNext->GetTxt().Len(), true );
if( pNext->HasSwAttrSet() )
@@ -765,8 +765,8 @@ void _UnReplaceData::Undo( SwUndoIter& rIter )
void _UnReplaceData::Redo( SwUndoIter& rIter )
{
SwDoc& rDoc = rIter.GetDoc();
- BOOL bUndo = rDoc.DoesUndo();
- rDoc.DoUndo( FALSE );
+ sal_Bool bUndo = rDoc.DoesUndo();
+ rDoc.DoUndo( sal_False );
SwPaM& rPam = *rIter.pAktPam;
rPam.DeleteMark();
@@ -849,18 +849,18 @@ void SwUndoReRead::SetAndSave( SwUndoIter& rIter )
Graphic* pOldGrf = pGrf;
String* pOldNm = pNm;
String* pOldFltr = pFltr;
- USHORT nOldMirr = nMirr;
+ sal_uInt16 nOldMirr = nMirr;
SaveGraphicData( *pGrfNd );
if( pOldNm )
{
- pGrfNd->ReRead( *pOldNm, pFltr ? *pFltr : aEmptyStr, 0, 0, TRUE );
+ pGrfNd->ReRead( *pOldNm, pFltr ? *pFltr : aEmptyStr, 0, 0, sal_True );
delete pOldNm;
delete pOldFltr;
}
else
{
- pGrfNd->ReRead( aEmptyStr, aEmptyStr, pOldGrf, 0, TRUE );
+ pGrfNd->ReRead( aEmptyStr, aEmptyStr, pOldGrf, 0, sal_True );
delete pOldGrf;
}
@@ -894,7 +894,7 @@ void SwUndoReRead::SaveGraphicData( const SwGrfNode& rGrfNd )
}
else
{
- ((SwGrfNode&)rGrfNd).SwapIn( TRUE );
+ ((SwGrfNode&)rGrfNd).SwapIn( sal_True );
pGrf = new Graphic( rGrfNd.GetGrf() );
pNm = pFltr = 0;
}
@@ -907,10 +907,10 @@ SwUndoInsertLabel::SwUndoInsertLabel( const SwLabelType eTyp,
const String &rTxt,
const String& rSeparator,
const String& rNumberSeparator,
- const BOOL bBef,
- const USHORT nInitId,
+ const sal_Bool bBef,
+ const sal_uInt16 nInitId,
const String& rCharacterStyle,
- const BOOL bCpyBorder )
+ const sal_Bool bCpyBorder )
: SwUndo( UNDO_INSERTLABEL ),
sText( rTxt ),
sSeparator( rSeparator ),
@@ -922,7 +922,7 @@ SwUndoInsertLabel::SwUndoInsertLabel( const SwLabelType eTyp,
bBefore( bBef ),
bCpyBrd( bCpyBorder )
{
- bUndoKeep = FALSE;
+ bUndoKeep = sal_False;
OBJECT.pUndoFly = 0;
OBJECT.pUndoAttr = 0;
}
@@ -973,7 +973,7 @@ void SwUndoInsertLabel::Undo( SwUndoIter& rIter )
aPam.GetPoint()->nNode = NODE.nNode;
aPam.SetMark();
aPam.GetPoint()->nNode = NODE.nNode + 1;
- NODE.pUndoInsNd = new SwUndoDelete( aPam, TRUE );
+ NODE.pUndoInsNd = new SwUndoDelete( aPam, sal_True );
}
}
@@ -1012,7 +1012,7 @@ void SwUndoInsertLabel::Redo( SwUndoIter& rIter )
SwTableNode *pNd = rDoc.GetNodes()[
rDoc.GetNodes()[NODE.nNode-1]->StartOfSectionIndex()]->GetTableNode();
if ( pNd )
- pNd->GetTable().GetFrmFmt()->SetFmtAttr( SvxFmtKeepItem(TRUE, RES_KEEP) );
+ pNd->GetTable().GetFrmFmt()->SetFmtAttr( SvxFmtKeepItem(sal_True, RES_KEEP) );
}
NODE.pUndoInsNd->Undo( rIter );
delete NODE.pUndoInsNd, NODE.pUndoInsNd = 0;
@@ -1024,7 +1024,7 @@ void SwUndoInsertLabel::Repeat( SwUndoIter& rIter )
SwDoc& rDoc = rIter.GetDoc();
const SwPosition& rPos = *rIter.pAktPam->GetPoint();
- ULONG nIdx = 0;
+ sal_uLong nIdx = 0;
SwCntntNode* pCNd = rPos.nNode.GetNode().GetCntntNode();
if( pCNd )
@@ -1090,7 +1090,7 @@ void SwUndoInsertLabel::SetFlys( SwFrmFmt& rOldFly, SfxItemSet& rChgSet,
}
}
-void SwUndoInsertLabel::SetDrawObj( BYTE nLId )
+void SwUndoInsertLabel::SetDrawObj( sal_uInt8 nLId )
{
if( LTYPE_DRAW == eType )
{
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index 4c5fbca4085c..364f75c5a745 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -47,7 +47,7 @@ SwUndoMove::SwUndoMove( const SwPaM& rRange, const SwPosition& rMvPos )
nMvDestCntnt( rMvPos.nContent.GetIndex() ),
bMoveRedlines( false )
{
- bMoveRange = bJoinNext = bJoinPrev = FALSE;
+ bMoveRange = bJoinNext = bJoinPrev = sal_False;
// StartNode vorm loeschen von Fussnoten besorgen!
SwDoc* pDoc = rRange.GetDoc();
@@ -106,8 +106,8 @@ SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg,
nMvDestNode( rMvPos.GetIndex() ),
bMoveRedlines( false )
{
- bMoveRange = TRUE;
- bJoinNext = bJoinPrev = FALSE;
+ bMoveRange = sal_True;
+ bJoinNext = bJoinPrev = sal_False;
nSttCntnt = nEndCntnt = nMvDestCntnt = STRING_MAXLEN;
@@ -117,7 +117,7 @@ SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg,
// DelFtn( rRange );
// wird aus dem CntntBereich in den Sonderbereich verschoben ?
- ULONG nCntntStt = pDoc->GetNodes().GetEndOfAutotext().GetIndex();
+ sal_uLong nCntntStt = pDoc->GetNodes().GetEndOfAutotext().GetIndex();
if( nMvDestNode < nCntntStt && rRg.aStart.GetIndex() > nCntntStt )
{
// loesche alle Fussnoten. Diese sind dort nicht erwuenscht.
@@ -142,7 +142,7 @@ SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg,
void SwUndoMove::SetDestRange( const SwPaM& rRange,
const SwPosition& rInsPos,
- BOOL bJoin, BOOL bCorrPam )
+ sal_Bool bJoin, sal_Bool bCorrPam )
{
const SwPosition *pStt = rRange.Start(),
*pEnd = rRange.GetPoint() == pStt
@@ -190,8 +190,8 @@ void SwUndoMove::SetDestRange( const SwNodeIndex& rStt,
void SwUndoMove::Undo( SwUndoIter& rUndoIter )
{
SwDoc* pDoc = &rUndoIter.GetDoc();
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
// Block, damit aus diesem gesprungen werden kann
do {
@@ -217,7 +217,7 @@ void SwUndoMove::Undo( SwUndoIter& rUndoIter )
// #i17764# if redlines are to be moved, we may not remove them before
// pDoc->Move gets a chance to handle them
if( ! bMoveRedlines )
- RemoveIdxFromRange( aPam, FALSE );
+ RemoveIdxFromRange( aPam, sal_False );
SwPosition aPos( *pDoc->GetNodes()[ nInsPosNode] );
SwCntntNode* pCNd = aPos.nNode.GetNode().GetCntntNode();
@@ -238,7 +238,7 @@ void SwUndoMove::Undo( SwUndoIter& rUndoIter )
aPam.Exchange();
aPam.DeleteMark();
-// pDoc->ResetAttr( aPam, FALSE );
+// pDoc->ResetAttr( aPam, sal_False );
if( aPam.GetNode()->IsCntntNode() )
aPam.GetNode()->GetCntntNode()->ResetAllAttr();
// der Pam wird jetzt aufgegeben.
@@ -266,7 +266,7 @@ void SwUndoMove::Undo( SwUndoIter& rUndoIter )
pTxtNd->JoinNext();
}
- } while( FALSE );
+ } while( sal_False );
if( pHistory )
{
@@ -308,10 +308,10 @@ void SwUndoMove::Redo( SwUndoIter& rUndoIter )
nMvDestCntnt ));
DelFtn( aPam );
- RemoveIdxFromRange( aPam, FALSE );
+ RemoveIdxFromRange( aPam, sal_False );
aIdx = aPam.Start()->nNode;
- BOOL bJoinTxt = aIdx.GetNode().IsTxtNode();
+ sal_Bool bJoinTxt = aIdx.GetNode().IsTxtNode();
aIdx--;
rDoc.MoveRange( aPam, aMvPos,
@@ -341,7 +341,7 @@ void SwUndoMove::DelFtn( const SwPaM& rRange )
{
// wird aus dem CntntBereich in den Sonderbereich verschoben ?
SwDoc* pDoc = rRange.GetDoc();
- ULONG nCntntStt = pDoc->GetNodes().GetEndOfAutotext().GetIndex();
+ sal_uLong nCntntStt = pDoc->GetNodes().GetEndOfAutotext().GetIndex();
if( nMvDestNode < nCntntStt &&
rRange.GetPoint()->nNode.GetIndex() >= nCntntStt )
{
diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index 8cf782e85b53..f6706bbc4666 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -93,8 +93,8 @@ void SwUndoInsNum::Undo( SwUndoIter& rUndoIter )
if( nSttNode )
SetPaM( rUndoIter );
- BOOL bUndo = rDoc.DoesUndo();
- rDoc.DoUndo( FALSE );
+ sal_Bool bUndo = rDoc.DoesUndo();
+ rDoc.DoUndo( sal_False );
if( pOldNumRule )
rDoc.ChgNumRuleFmts( *pOldNumRule );
@@ -104,7 +104,7 @@ void SwUndoInsNum::Undo( SwUndoIter& rUndoIter )
SwTxtNode* pNd;
if( ULONG_MAX != nSttSet &&
0 != ( pNd = rDoc.GetNodes()[ nSttSet ]->GetTxtNode() ))
- pNd->SetListRestart( TRUE );
+ pNd->SetListRestart( sal_True );
else
pNd = 0;
@@ -202,7 +202,7 @@ void SwUndoInsNum::SaveOldNumRule( const SwNumRule& rOld )
SwUndoDelNum::SwUndoDelNum( const SwPaM& rPam )
: SwUndo( UNDO_DELNUM ), SwUndRng( rPam ),
- aNodeIdx( BYTE( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode ))
+ aNodeIdx( sal_uInt8( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode ))
{
pHistory = new SwHistory;
}
@@ -219,13 +219,13 @@ void SwUndoDelNum::Undo( SwUndoIter& rUndoIter )
SwDoc& rDoc = rUndoIter.GetDoc();
SetPaM( rUndoIter );
- BOOL bUndo = rDoc.DoesUndo();
- rDoc.DoUndo( FALSE );
+ sal_Bool bUndo = rDoc.DoesUndo();
+ rDoc.DoUndo( sal_False );
pHistory->TmpRollback( &rDoc, 0 );
pHistory->SetTmpEnd( pHistory->Count() );
- for( USHORT n = 0; n < aNodeIdx.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aNodeIdx.Count(); ++n )
{
SwTxtNode* pNd = rDoc.GetNodes()[ aNodeIdx[ n ] ]->GetTxtNode();
ASSERT( pNd, "Where is TextNode gone?" );
@@ -253,14 +253,14 @@ void SwUndoDelNum::Repeat( SwUndoIter& rUndoIter )
rUndoIter.GetDoc().DelNumRules( *rUndoIter.pAktPam );
}
-void SwUndoDelNum::AddNode( const SwTxtNode& rNd, BOOL )
+void SwUndoDelNum::AddNode( const SwTxtNode& rNd, sal_Bool )
{
if( rNd.GetNumRule() )
{
- USHORT nIns = aNodeIdx.Count();
+ sal_uInt16 nIns = aNodeIdx.Count();
aNodeIdx.Insert( rNd.GetIndex(), nIns );
- aLevels.insert( aLevels.begin() + nIns, static_cast<BYTE>(rNd.GetActualListLevel()) );
+ aLevels.insert( aLevels.begin() + nIns, static_cast<sal_uInt8>(rNd.GetActualListLevel()) );
}
}
@@ -268,7 +268,7 @@ void SwUndoDelNum::AddNode( const SwTxtNode& rNd, BOOL )
/* */
-SwUndoMoveNum::SwUndoMoveNum( const SwPaM& rPam, long nOff, BOOL bIsOutlMv )
+SwUndoMoveNum::SwUndoMoveNum( const SwPaM& rPam, long nOff, sal_Bool bIsOutlMv )
: SwUndo( bIsOutlMv ? UNDO_OUTLINE_UD : UNDO_MOVENUM ),
SwUndRng( rPam ),
nNewStt( 0 ), nOffset( nOff )
@@ -280,7 +280,7 @@ SwUndoMoveNum::SwUndoMoveNum( const SwPaM& rPam, long nOff, BOOL bIsOutlMv )
void SwUndoMoveNum::Undo( SwUndoIter& rUndoIter )
{
- ULONG nTmpStt = nSttNode, nTmpEnd = nEndNode;
+ sal_uLong nTmpStt = nSttNode, nTmpEnd = nEndNode;
if( nEndNode || USHRT_MAX != nEndCntnt ) // Bereich ?
{
@@ -293,7 +293,7 @@ void SwUndoMoveNum::Undo( SwUndoIter& rUndoIter )
//JP 22.06.95: wird wollen die Bookmarks/Verzeichnisse behalten, oder?
// SetPaM( rUndoIter );
-// RemoveIdxFromRange( *rUndoIter.pAktPam, TRUE );
+// RemoveIdxFromRange( *rUndoIter.pAktPam, sal_True );
SetPaM( rUndoIter );
rUndoIter.GetDoc().MoveParagraph( *rUndoIter.pAktPam, -nOffset,
@@ -307,7 +307,7 @@ void SwUndoMoveNum::Redo( SwUndoIter& rUndoIter )
{
//JP 22.06.95: wird wollen die Bookmarks/Verzeichnisse behalten, oder?
// SetPaM( rUndoIter );
-// RemoveIdxFromRange( *rUndoIter.pAktPam, TRUE );
+// RemoveIdxFromRange( *rUndoIter.pAktPam, sal_True );
SetPaM( rUndoIter );
rUndoIter.GetDoc().MoveParagraph( *rUndoIter.pAktPam, nOffset,
@@ -321,7 +321,7 @@ void SwUndoMoveNum::Repeat( SwUndoIter& rUndoIter )
rUndoIter.GetDoc().MoveOutlinePara( *rUndoIter.pAktPam,
0 < nOffset ? 1 : -1 );
else
- rUndoIter.GetDoc().MoveParagraph( *rUndoIter.pAktPam, nOffset, FALSE );
+ rUndoIter.GetDoc().MoveParagraph( *rUndoIter.pAktPam, nOffset, sal_False );
}
/* */
@@ -358,8 +358,8 @@ void SwUndoNumUpDown::Repeat( SwUndoIter& rUndoIter )
/* */
// #115901#
-SwUndoNumOrNoNum::SwUndoNumOrNoNum( const SwNodeIndex& rIdx, BOOL bOldNum,
- BOOL bNewNum)
+SwUndoNumOrNoNum::SwUndoNumOrNoNum( const SwNodeIndex& rIdx, sal_Bool bOldNum,
+ sal_Bool bNewNum)
: SwUndo( UNDO_NUMORNONUM ), nIdx( rIdx.GetIndex() ), mbNewNum(bNewNum),
mbOldNum(bOldNum)
{
@@ -395,25 +395,25 @@ void SwUndoNumOrNoNum::Repeat( SwUndoIter& rUndoIter )
if (mbOldNum && ! mbNewNum)
rUndoIter.GetDoc().NumOrNoNum( rUndoIter.pAktPam->GetPoint()->nNode,
- FALSE);
+ sal_False);
else if ( ! mbOldNum && mbNewNum )
rUndoIter.GetDoc().NumOrNoNum( rUndoIter.pAktPam->GetPoint()->nNode,
- TRUE);
+ sal_True);
}
/* */
-SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, BOOL bFlg )
+SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_Bool bFlg )
: SwUndo( UNDO_SETNUMRULESTART ),
nIdx( rPos.nNode.GetIndex() ), nOldStt( USHRT_MAX ),
- nNewStt( USHRT_MAX ), bSetSttValue( FALSE ), bFlag( bFlg )
+ nNewStt( USHRT_MAX ), bSetSttValue( sal_False ), bFlag( bFlg )
{
}
-SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, USHORT nStt )
+SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_uInt16 nStt )
: SwUndo( UNDO_SETNUMRULESTART ),
nIdx( rPos.nNode.GetIndex() ),
- nOldStt( USHRT_MAX ), nNewStt( nStt ), bSetSttValue( TRUE )
+ nOldStt( USHRT_MAX ), nNewStt( nStt ), bSetSttValue( sal_True )
{
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
if ( pTxtNd )
@@ -421,7 +421,7 @@ SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, USHORT nStt )
// --> OD 2008-02-28 #refactorlists#
if ( pTxtNd->HasAttrListRestartValue() )
{
- nOldStt = static_cast<USHORT>(pTxtNd->GetAttrListRestartValue());
+ nOldStt = static_cast<sal_uInt16>(pTxtNd->GetAttrListRestartValue());
}
else
{
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index 91549c84a57e..f14ac8b756e8 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -68,14 +68,14 @@ inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
sal_Unicode cIns )
: SwUndo(UNDO_OVERWRITE),
- pRedlSaveData( 0 ), bGroup( FALSE )
+ pRedlSaveData( 0 ), bGroup( sal_False )
{
if( !pDoc->IsIgnoreRedline() && pDoc->GetRedlineTbl().Count() )
{
SwPaM aPam( rPos.nNode, rPos.nContent.GetIndex(),
rPos.nNode, rPos.nContent.GetIndex()+1 );
pRedlSaveData = new SwRedlineSaveDatas;
- if( !FillSaveData( aPam, *pRedlSaveData, FALSE ))
+ if( !FillSaveData( aPam, *pRedlSaveData, sal_False ))
delete pRedlSaveData, pRedlSaveData = 0;
}
@@ -85,7 +85,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
ASSERT( pTxtNd, "Overwrite nicht im TextNode?" );
- bInsChar = TRUE;
+ bInsChar = sal_True;
xub_StrLen nTxtNdLen = pTxtNd->GetTxt().Len();
if( nSttCntnt < nTxtNdLen ) // kein reines Einfuegen ?
{
@@ -96,11 +96,11 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
pHistory->CopyAttr( pTxtNd->GetpSwpHints(), nSttNode, 0,
nTxtNdLen, false );
rPos.nContent++;
- bInsChar = FALSE;
+ bInsChar = sal_False;
}
- BOOL bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
- pTxtNd->SetIgnoreDontExpand( TRUE );
+ sal_Bool bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
+ pTxtNd->SetIgnoreDontExpand( sal_True );
pTxtNd->InsertText( cIns, rPos.nContent,
IDocumentContentOperations::INS_EMPTYEXPAND );
@@ -121,7 +121,7 @@ SwUndoOverwrite::~SwUndoOverwrite()
delete pRedlSaveData;
}
-BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
+sal_Bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
sal_Unicode cIns )
{
/// ?? was ist mit nur eingefuegten Charaktern ???
@@ -129,14 +129,14 @@ BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
// es kann nur das Loeschen von einzelnen char's zusammengefasst werden
if( rPos.nNode != nSttNode || !aInsStr.Len() ||
( !bGroup && aInsStr.Len() != 1 ))
- return FALSE;
+ return sal_False;
// ist der Node ueberhaupt ein TextNode?
SwTxtNode * pDelTxtNd = rPos.nNode.GetNode().GetTxtNode();
if( !pDelTxtNd ||
( pDelTxtNd->GetTxt().Len() != rPos.nContent.GetIndex() &&
rPos.nContent.GetIndex() != ( nSttCntnt + aInsStr.Len() )))
- return FALSE;
+ return sal_False;
CharClass& rCC = GetAppCharClass();
@@ -144,23 +144,23 @@ BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
if (( CH_TXTATR_BREAKWORD == cIns || CH_TXTATR_INWORD == cIns ) ||
rCC.isLetterNumeric( String( cIns ), 0 ) !=
rCC.isLetterNumeric( aInsStr, aInsStr.Len()-1 ) )
- return FALSE;
+ return sal_False;
{
SwRedlineSaveDatas* pTmpSav = new SwRedlineSaveDatas;
SwPaM aPam( rPos.nNode, rPos.nContent.GetIndex(),
rPos.nNode, rPos.nContent.GetIndex()+1 );
- if( !FillSaveData( aPam, *pTmpSav, FALSE ))
+ if( !FillSaveData( aPam, *pTmpSav, sal_False ))
delete pTmpSav, pTmpSav = 0;
- BOOL bOk = ( !pRedlSaveData && !pTmpSav ) ||
+ sal_Bool bOk = ( !pRedlSaveData && !pTmpSav ) ||
( pRedlSaveData && pTmpSav &&
SwUndo::CanRedlineGroup( *pRedlSaveData, *pTmpSav,
nSttCntnt > rPos.nContent.GetIndex() ));
delete pTmpSav;
if( !bOk )
- return FALSE;
+ return sal_False;
pDoc->DeleteRedline( aPam, false, USHRT_MAX );
}
@@ -175,11 +175,11 @@ BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
rPos.nContent++;
}
else
- bInsChar = TRUE;
+ bInsChar = sal_True;
}
- BOOL bOldExpFlg = pDelTxtNd->IsIgnoreDontExpand();
- pDelTxtNd->SetIgnoreDontExpand( TRUE );
+ sal_Bool bOldExpFlg = pDelTxtNd->IsIgnoreDontExpand();
+ pDelTxtNd->SetIgnoreDontExpand( sal_True );
pDelTxtNd->InsertText( cIns, rPos.nContent,
IDocumentContentOperations::INS_EMPTYEXPAND );
@@ -192,8 +192,8 @@ BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
}
pDelTxtNd->SetIgnoreDontExpand( bOldExpFlg );
- bGroup = TRUE;
- return TRUE;
+ bGroup = sal_True;
+ return sal_True;
}
@@ -233,8 +233,8 @@ void SwUndoOverwrite::Undo( SwUndoIter& rUndoIter )
String aTmpStr( '1' );
sal_Unicode* pTmpStr = aTmpStr.GetBufferAccess();
- BOOL bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
- pTxtNd->SetIgnoreDontExpand( TRUE );
+ sal_Bool bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
+ pTxtNd->SetIgnoreDontExpand( sal_True );
rIdx++;
for( xub_StrLen n = 0; n < aDelStr.Len(); n++ )
@@ -275,8 +275,8 @@ void SwUndoOverwrite::Repeat( SwUndoIter& rUndoIter )
SwDoc& rDoc = *pAktPam->GetDoc();
- BOOL bGroupUndo = rDoc.DoesGroupUndo();
- rDoc.DoGroupUndo( FALSE );
+ sal_Bool bGroupUndo = rDoc.DoesGroupUndo();
+ rDoc.DoGroupUndo( sal_False );
rDoc.Overwrite( *pAktPam, aInsStr.GetChar( 0 ));
rDoc.DoGroupUndo( bGroupUndo );
for( xub_StrLen n = 1; n < aInsStr.Len(); ++n )
@@ -305,8 +305,8 @@ void SwUndoOverwrite::Redo( SwUndoIter& rUndoIter )
}
rIdx.Assign( pTxtNd, aDelStr.Len() ? nSttCntnt+1 : nSttCntnt );
- BOOL bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
- pTxtNd->SetIgnoreDontExpand( TRUE );
+ sal_Bool bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
+ pTxtNd->SetIgnoreDontExpand( sal_True );
for( xub_StrLen n = 0; n < aInsStr.Len(); n++ )
{
@@ -355,10 +355,10 @@ struct _UndoTransliterate_Data
String sText;
SwHistory* pHistory;
Sequence< sal_Int32 >* pOffsets;
- ULONG nNdIdx;
+ sal_uLong nNdIdx;
xub_StrLen nStart, nLen;
- _UndoTransliterate_Data( ULONG nNd, xub_StrLen nStt, xub_StrLen nStrLen, const String& rTxt )
+ _UndoTransliterate_Data( sal_uLong nNd, xub_StrLen nStt, xub_StrLen nStrLen, const String& rTxt )
: sText( rTxt ), pHistory( 0 ), pOffsets( 0 ),
nNdIdx( nNd ), nStart( nStt ), nLen( nStrLen )
{}
@@ -383,8 +383,8 @@ SwUndoTransliterate::~SwUndoTransliterate()
void SwUndoTransliterate::Undo( SwUndoIter& rUndoIter )
{
SwDoc& rDoc = rUndoIter.GetDoc();
- BOOL bUndo = rDoc.DoesUndo();
- rDoc.DoUndo( FALSE );
+ sal_Bool bUndo = rDoc.DoesUndo();
+ rDoc.DoUndo( sal_False );
// since the changes were added to the vector from the end of the string/node towards
// the start, we need to revert them from the start towards the end now to keep the
@@ -394,12 +394,12 @@ void SwUndoTransliterate::Undo( SwUndoIter& rUndoIter )
aChanges[i]->SetChangeAtNode( rDoc );
rDoc.DoUndo( bUndo );
- SetPaM( rUndoIter, TRUE );
+ SetPaM( rUndoIter, sal_True );
}
void SwUndoTransliterate::Redo( SwUndoIter& rUndoIter )
{
-/* ??? */ rUndoIter.SetUpdateAttr( TRUE );
+/* ??? */ rUndoIter.SetUpdateAttr( sal_True );
SetPaM( *rUndoIter.pAktPam );
Repeat( rUndoIter );
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 7f76697c80a3..e1364e985ad0 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -41,8 +41,8 @@
#include <docary.hxx>
#include <sortopt.hxx>
-extern void lcl_JoinText( SwPaM& rPam, BOOL bJoinPrev );
-extern void lcl_GetJoinFlags( SwPaM& rPam, BOOL& rJoinTxt, BOOL& rJoinPrev );
+extern void lcl_JoinText( SwPaM& rPam, sal_Bool bJoinPrev );
+extern void lcl_GetJoinFlags( SwPaM& rPam, sal_Bool& rJoinTxt, sal_Bool& rJoinPrev );
//------------------------------------------------------------------
@@ -52,7 +52,7 @@ inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
: SwUndo( UNDO_REDLINE ), SwUndRng( rRange ),
pRedlData( 0 ), pRedlSaveData( 0 ), nUserId( nUsrId ),
- bHiddenRedlines( FALSE )
+ bHiddenRedlines( sal_False )
{
// Redline beachten
SwDoc& rDoc = *rRange.GetDoc();
@@ -70,10 +70,10 @@ SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
SetRedlineMode( rDoc.GetRedlineMode() );
}
- ULONG nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex();
pRedlSaveData = new SwRedlineSaveDatas;
- if( !FillSaveData( rRange, *pRedlSaveData, FALSE,
+ if( !FillSaveData( rRange, *pRedlSaveData, sal_False,
UNDO_REJECT_REDLINE != nUserId ))
delete pRedlSaveData, pRedlSaveData = 0;
else
@@ -104,7 +104,7 @@ void SwUndoRedline::Undo( SwUndoIter& rIter )
if( pRedlSaveData )
{
- ULONG nEndExtra = pDoc->GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndExtra = pDoc->GetNodes().GetEndOfExtras().GetIndex();
SetSaveData( *pDoc, *pRedlSaveData );
if( bHiddenRedlines )
{
@@ -114,7 +114,7 @@ void SwUndoRedline::Undo( SwUndoIter& rIter )
nSttNode += nEndExtra;
nEndNode += nEndExtra;
}
- SetPaM( *rIter.pAktPam, TRUE );
+ SetPaM( *rIter.pAktPam, sal_True );
}
}
@@ -128,8 +128,8 @@ void SwUndoRedline::Redo( SwUndoIter& rIter )
SetPaM( *rIter.pAktPam );
if( pRedlSaveData && bHiddenRedlines )
{
- ULONG nEndExtra = pDoc->GetNodes().GetEndOfExtras().GetIndex();
- FillSaveData( *rIter.pAktPam, *pRedlSaveData, FALSE,
+ sal_uLong nEndExtra = pDoc->GetNodes().GetEndOfExtras().GetIndex();
+ FillSaveData( *rIter.pAktPam, *pRedlSaveData, sal_False,
UNDO_REJECT_REDLINE != nUserId );
nEndExtra -= pDoc->GetNodes().GetEndOfExtras().GetIndex();
@@ -138,7 +138,7 @@ void SwUndoRedline::Redo( SwUndoIter& rIter )
}
_Redo( rIter );
- SetPaM( *rIter.pAktPam, TRUE );
+ SetPaM( *rIter.pAktPam, sal_True );
pDoc->SetRedlineMode_intern( eOld );
}
@@ -158,7 +158,7 @@ void SwUndoRedline::_Redo( SwUndoIter& rIter )
SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
: SwUndoRedline( nUsrId = (nUsrId ? nUsrId : UNDO_DELETE), rRange ),
- bCanGroup( FALSE ), bIsDelim( FALSE ), bIsBackspace( FALSE )
+ bCanGroup( sal_False ), bIsDelim( sal_False ), bIsBackspace( sal_False )
{
const SwTxtNode* pTNd;
if( UNDO_DELETE == nUserId &&
@@ -168,7 +168,7 @@ SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
sal_Unicode cCh = pTNd->GetTxt().GetChar( nSttCntnt );
if( CH_TXTATR_BREAKWORD != cCh && CH_TXTATR_INWORD != cCh )
{
- bCanGroup = TRUE;
+ bCanGroup = sal_True;
bIsDelim = !GetAppCharClass().isLetterNumeric( pTNd->GetTxt(),
nSttCntnt );
bIsBackspace = nSttCntnt == rRange.GetPoint()->nContent.GetIndex();
@@ -186,12 +186,12 @@ void SwUndoRedlineDelete::_Undo( SwUndoIter& rIter )
void SwUndoRedlineDelete::_Redo( SwUndoIter& rIter )
{
if( *rIter.pAktPam->GetPoint() != *rIter.pAktPam->GetMark() )
- rIter.GetDoc().AppendRedline( new SwRedline( *pRedlData, *rIter.pAktPam ), FALSE );
+ rIter.GetDoc().AppendRedline( new SwRedline( *pRedlData, *rIter.pAktPam ), sal_False );
}
-BOOL SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
+sal_Bool SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( UNDO_DELETE == nUserId && nUserId == rNext.nUserId &&
bCanGroup == rNext.bCanGroup &&
bIsDelim == rNext.bIsDelim &&
@@ -217,7 +217,7 @@ BOOL SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
nEndCntnt = rNext.nEndCntnt;
else
nSttCntnt = rNext.nSttCntnt;
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -248,7 +248,7 @@ void SwUndoRedlineSort::_Undo( SwUndoIter& rIter )
SwPosition* pEnd = rIter.pAktPam->End();
SwNodeIndex aPrevIdx( pStart->nNode, -1 );
- ULONG nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
+ sal_uLong nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
if( 0 == ( nsRedlineMode_t::REDLINE_SHOW_DELETE & rDoc.GetRedlineMode()) )
{
@@ -256,7 +256,7 @@ void SwUndoRedlineSort::_Undo( SwUndoIter& rIter )
// damit die Nodes wieder uebereinstimmen!
// das Geloeschte ist versteckt, also suche das INSERT
// Redline Object. Dahinter steht das Geloeschte
- USHORT nFnd = rDoc.GetRedlinePos(
+ sal_uInt16 nFnd = rDoc.GetRedlinePos(
*rDoc.GetNodes()[ nSttNode + 1 ],
nsRedlineType_t::REDLINE_INSERT );
ASSERT( USHRT_MAX != nFnd && nFnd+1 < rDoc.GetRedlineTbl().Count(),
@@ -301,7 +301,7 @@ void SwUndoRedlineSort::_Redo( SwUndoIter& rIter )
SwPosition* pEnd = pPam->End();
SwNodeIndex aPrevIdx( pStart->nNode, -1 );
- ULONG nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
+ sal_uLong nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
xub_StrLen nCntStt = pStart->nContent.GetIndex();
rIter.GetDoc().SortText( rPam, *pOpt );
@@ -377,7 +377,7 @@ void SwUndoRejectRedline::Repeat( SwUndoIter& rIter )
/* */
-SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, BOOL bIns )
+SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, sal_Bool bIns )
: SwUndo( UNDO_COMPAREDOC ), SwUndRng( rRg ), pRedlData( 0 ),
pUnDel( 0 ), pUnDel2( 0 ), pRedlSaveData( 0 ), bInsert( bIns )
{
@@ -404,7 +404,7 @@ SwUndoCompDoc::SwUndoCompDoc( const SwRedline& rRedl )
}
pRedlSaveData = new SwRedlineSaveDatas;
- if( !FillSaveData( rRedl, *pRedlSaveData, FALSE, TRUE ))
+ if( !FillSaveData( rRedl, *pRedlSaveData, sal_False, sal_True ))
delete pRedlSaveData, pRedlSaveData = 0;
}
@@ -434,8 +434,8 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter )
pDoc->SetRedlineMode_intern( eOld );
//per definition Point is end (in SwUndRng!)
- SwCntntNode* pCSttNd = pPam->GetCntntNode( FALSE );
- SwCntntNode* pCEndNd = pPam->GetCntntNode( TRUE );
+ SwCntntNode* pCSttNd = pPam->GetCntntNode( sal_False );
+ SwCntntNode* pCEndNd = pPam->GetCntntNode( sal_True );
// if start- and end-content is zero, then the doc-compare moves
// complete nodes into the current doc. And then the selection
@@ -444,10 +444,10 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter )
if( !nSttCntnt && !nEndCntnt )
pPam->Exchange();
- BOOL bJoinTxt, bJoinPrev;
+ sal_Bool bJoinTxt, bJoinPrev;
::lcl_GetJoinFlags( *pPam, bJoinTxt, bJoinPrev );
- pUnDel = new SwUndoDelete( *pPam, FALSE );
+ pUnDel = new SwUndoDelete( *pPam, sal_False );
if( bJoinTxt )
::lcl_JoinText( *pPam, bJoinPrev );
@@ -455,7 +455,7 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter )
if( pCSttNd && !pCEndNd)
{
// #112139# Do not step behind the end of content.
- SwNode * pTmp = pPam->GetNode(TRUE);
+ SwNode * pTmp = pPam->GetNode(sal_True);
if (pTmp)
{
SwNode * pEnd = pDoc->GetNodes().DocumentSectionEndNode(pTmp);
@@ -464,9 +464,9 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter )
{
pPam->SetMark();
pPam->GetPoint()->nNode++;
- pPam->GetBound( TRUE ).nContent.Assign( 0, 0 );
- pPam->GetBound( FALSE ).nContent.Assign( 0, 0 );
- pUnDel2 = new SwUndoDelete( *pPam, TRUE );
+ pPam->GetBound( sal_True ).nContent.Assign( 0, 0 );
+ pPam->GetBound( sal_False ).nContent.Assign( 0, 0 );
+ pUnDel2 = new SwUndoDelete( *pPam, sal_True );
}
}
}
@@ -481,7 +481,7 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter )
if( pRedlSaveData )
SetSaveData( *pDoc, *pRedlSaveData );
}
- SetPaM( rIter, TRUE );
+ SetPaM( rIter, sal_True );
}
}
@@ -537,7 +537,7 @@ void SwUndoCompDoc::Redo( SwUndoIter& rIter )
// pDoc->SetRedlineMode_intern( eOld );
}
- SetPaM( rIter, TRUE );
+ SetPaM( rIter, sal_True );
}
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index 98d0e41d4616..374f6b616e2c 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -58,7 +58,7 @@ SfxItemSet* lcl_GetAttrSet( const SwSection& rSect )
SfxItemSet* pAttr = 0;
if( rSect.GetFmt() )
{
- USHORT nCnt = 1;
+ sal_uInt16 nCnt = 1;
if( rSect.IsProtect() )
++nCnt;
@@ -240,7 +240,7 @@ void SwUndoInsSection::Repeat( SwUndoIter& rUndoIter )
}
-void SwUndoInsSection::Join( SwDoc& rDoc, ULONG nNode )
+void SwUndoInsSection::Join( SwDoc& rDoc, sal_uLong nNode )
{
SwNodeIndex aIdx( rDoc.GetNodes(), nNode );
SwTxtNode* pTxtNd = aIdx.GetNode().GetTxtNode();
@@ -294,8 +294,8 @@ private:
::std::auto_ptr<SwTOXBase> const m_pTOXBase; /// set iff section is TOX
::std::auto_ptr<SfxItemSet> const m_pAttrSet;
::boost::shared_ptr< ::sfx2::MetadatableUndo > const m_pMetadataUndo;
- ULONG const m_nStartNode;
- ULONG const m_nEndNode;
+ sal_uLong const m_nStartNode;
+ sal_uLong const m_nEndNode;
public:
SwUndoDelSection(
@@ -403,7 +403,7 @@ class SwUndoUpdateSection
private:
::std::auto_ptr<SwSectionData> m_pSectionData;
::std::auto_ptr<SfxItemSet> m_pAttrSet;
- ULONG const m_nStartNode;
+ sal_uLong const m_nStartNode;
bool const m_bOnlyAttrChanged;
public:
@@ -452,7 +452,7 @@ void SwUndoUpdateSection::Undo( SwUndoIter& rUndoIter )
// das Content- und Protect-Item muss bestehen bleiben
const SfxPoolItem* pItem;
m_pAttrSet->Put( pFmt->GetFmtAttr( RES_CNTNT ));
- if( SFX_ITEM_SET == pFmt->GetItemState( RES_PROTECT, TRUE, &pItem ))
+ if( SFX_ITEM_SET == pFmt->GetItemState( RES_PROTECT, sal_True, &pItem ))
{
m_pAttrSet->Put( *pItem );
}
diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx
index 44b73736e458..cb37a75f3464 100644
--- a/sw/source/core/undo/unsort.cxx
+++ b/sw/source/core/undo/unsort.cxx
@@ -70,8 +70,8 @@ SwUndoSort::SwUndoSort(const SwPaM& rRg, const SwSortOptions& rOpt)
}
-SwUndoSort::SwUndoSort( ULONG nStt, ULONG nEnd, const SwTableNode& rTblNd,
- const SwSortOptions& rOpt, BOOL bSaveTable )
+SwUndoSort::SwUndoSort( sal_uLong nStt, sal_uLong nEnd, const SwTableNode& rTblNd,
+ const SwSortOptions& rOpt, sal_Bool bSaveTable )
: SwUndo(UNDO_SORT_TBL), pUndoTblAttr( 0 ), pRedlData( 0 )
{
nSttNode = nStt;
@@ -116,7 +116,7 @@ void SwUndoSort::Undo( SwUndoIter& rIter)
const SwTable& rTbl = pTblNd->GetTable();
SwMovedBoxes aMovedList;
- for( USHORT i=0; i < aSortList.Count(); i++)
+ for( sal_uInt16 i=0; i < aSortList.Count(); i++)
{
const SwTableBox* pSource = rTbl.GetTblBox(
*aSortList[i]->SORT_TXT_TBL.TBL.pSource );
@@ -134,7 +134,7 @@ void SwUndoSort::Undo( SwUndoIter& rIter)
// Restore table frames:
// --> FME 2004-11-26 #i37739# A simple 'MakeFrms' after the node sorting
// does not work if the table is inside a frame and has no prev/next.
- const ULONG nIdx = pTblNd->GetIndex();
+ const sal_uLong nIdx = pTblNd->GetIndex();
aNode2Layout.RestoreUpperFrms( rDoc.GetNodes(), nIdx, nIdx + 1 );
// <--
}
@@ -146,11 +146,11 @@ void SwUndoSort::Undo( SwUndoIter& rIter)
// fuer die sorted Positions einen Index anlegen.
// JP 25.11.97: Die IndexList muss aber nach SourcePosition
// aufsteigend sortiert aufgebaut werden
- SwUndoSortList aIdxList( (BYTE)aSortList.Count() );
- USHORT i;
+ SwUndoSortList aIdxList( (sal_uInt8)aSortList.Count() );
+ sal_uInt16 i;
for( i = 0; i < aSortList.Count(); ++i)
- for( USHORT ii=0; ii < aSortList.Count(); ++ii )
+ for( sal_uInt16 ii=0; ii < aSortList.Count(); ++ii )
if( aSortList[ii]->SORT_TXT_TBL.TXT.nSource == nSttNode + i )
{
SwNodeIndex* pIdx = new SwNodeIndex( rDoc.GetNodes(),
@@ -168,7 +168,7 @@ void SwUndoSort::Undo( SwUndoIter& rIter)
}
// Indixes loeschen
aIdxList.DeleteAndDestroy(0, aIdxList.Count());
- SetPaM( rIter, TRUE );
+ SetPaM( rIter, sal_True );
}
}
@@ -193,7 +193,7 @@ void SwUndoSort::Redo( SwUndoIter& rIter)
const SwTable& rTbl = pTblNd->GetTable();
SwMovedBoxes aMovedList;
- for(USHORT i=0; i < aSortList.Count(); ++i)
+ for(sal_uInt16 i=0; i < aSortList.Count(); ++i)
{
const SwTableBox* pSource = rTbl.GetTblBox(
(const String&) *aSortList[i]->SORT_TXT_TBL.TBL.pSource );
@@ -213,7 +213,7 @@ void SwUndoSort::Redo( SwUndoIter& rIter)
// Restore table frames:
// --> FME 2004-11-26 #i37739# A simple 'MakeFrms' after the node sorting
// does not work if the table is inside a frame and has no prev/next.
- const ULONG nIdx = pTblNd->GetIndex();
+ const sal_uLong nIdx = pTblNd->GetIndex();
aNode2Layout.RestoreUpperFrms( rDoc.GetNodes(), nIdx, nIdx + 1 );
// <--
}
@@ -222,8 +222,8 @@ void SwUndoSort::Redo( SwUndoIter& rIter)
// Redo bei Text
RemoveIdx( *rIter.pAktPam );
- SwUndoSortList aIdxList( (BYTE)aSortList.Count() );
- USHORT i;
+ SwUndoSortList aIdxList( (sal_uInt8)aSortList.Count() );
+ sal_uInt16 i;
for( i = 0; i < aSortList.Count(); ++i)
{ // aktuelle Pos ist die Ausgangslage
@@ -241,7 +241,7 @@ void SwUndoSort::Redo( SwUndoIter& rIter)
}
// Indixes loeschen
aIdxList.DeleteAndDestroy(0, aIdxList.Count());
- SetPaM( rIter, TRUE );
+ SetPaM( rIter, sal_True );
const SwTxtNode* pTNd = rIter.pAktPam->GetNode()->GetTxtNode();
if( pTNd )
rIter.pAktPam->GetPoint()->nContent = pTNd->GetTxt().Len();
@@ -282,7 +282,7 @@ void SwUndoSort::RemoveIdx( SwPaM& rPam )
if( nLen >= nEndCntnt )
nLen = nEndCntnt;
rPam.GetPoint()->nContent.Assign(pCNd, nLen );
- RemoveIdxFromRange( rPam, TRUE );
+ RemoveIdxFromRange( rPam, sal_True );
}
@@ -293,7 +293,7 @@ void SwUndoSort::Insert( const String& rOrgPos, const String& rNewPos)
}
-void SwUndoSort::Insert( ULONG nOrgPos, ULONG nNewPos)
+void SwUndoSort::Insert( sal_uLong nOrgPos, sal_uLong nNewPos)
{
SwSortUndoElement* pEle = new SwSortUndoElement(nOrgPos, nNewPos);
aSortList.C40_INSERT( SwSortUndoElement, pEle, aSortList.Count() );
diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx
index 14aa18ed6e07..b7c12013416a 100644
--- a/sw/source/core/undo/unspnd.cxx
+++ b/sw/source/core/undo/unspnd.cxx
@@ -52,10 +52,10 @@ inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos,
- BOOL bChkTable )
+ sal_Bool bChkTable )
: SwUndo( UNDO_SPLITNODE ), pHistory( 0 ), pRedlData( 0 ), nNode( rPos.nNode.GetIndex() ),
nCntnt( rPos.nContent.GetIndex() ),
- bTblFlag( FALSE ), bChkTblStt( bChkTable )
+ bTblFlag( sal_False ), bChkTblStt( bChkTable )
{
SwTxtNode* pTxtNd = pDoc->GetNodes()[ rPos.nNode ]->GetTxtNode();
ASSERT( pTxtNd, "nur beim TextNode rufen!" );
@@ -108,11 +108,11 @@ void SwUndoSplitNode::Undo( SwUndoIter& rUndoIter )
if( pNdSet )
{
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pNdSet->GetItemState( RES_PAGEDESC, FALSE,
+ if( SFX_ITEM_SET == pNdSet->GetItemState( RES_PAGEDESC, sal_False,
&pItem ) )
pTableFmt->SetFmtAttr( *pItem );
- if( SFX_ITEM_SET == pNdSet->GetItemState( RES_BREAK, FALSE,
+ if( SFX_ITEM_SET == pNdSet->GetItemState( RES_BREAK, sal_False,
&pItem ) )
pTableFmt->SetFmtAttr( *pItem );
}
@@ -151,7 +151,7 @@ void SwUndoSplitNode::Undo( SwUndoIter& rUndoIter )
rPam.SetMark();
rPam.GetPoint()->nContent = pTNd->GetTxt().Len();
- pDoc->RstTxtAttrs( rPam, TRUE );
+ pDoc->RstTxtAttrs( rPam, sal_True );
pHistory->TmpRollback( pDoc, 0, false );
}
}
@@ -176,7 +176,7 @@ void SwUndoSplitNode::Repeat( SwUndoIter& rUndoIter )
void SwUndoSplitNode::Redo( SwUndoIter& rUndoIter )
{
SwPaM& rPam = *rUndoIter.pAktPam;
- ULONG nOldNode = rPam.GetPoint()->nNode.GetIndex();
+ sal_uLong nOldNode = rPam.GetPoint()->nNode.GetIndex();
rPam.GetPoint()->nNode = nNode;
SwTxtNode * pTNd = rPam.GetNode()->GetTxtNode();
if( pTNd ) // sollte eigentlich immer ein TextNode sein !!
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 9a654170187a..8cdadaa7dd81 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -98,7 +98,7 @@ SV_DECL_PTRARR_DEL( SwTblToTxtSaves, SwTblToTxtSavePtr, 0, 10 )
struct _UndoTblCpyTbl_Entry
{
- ULONG nBoxIdx, nOffset;
+ sal_uLong nBoxIdx, nOffset;
SfxItemSet* pBoxNumAttr;
SwUndo* pUndo;
@@ -123,25 +123,25 @@ class _SaveTable
const SwTable* pSwTable;
SfxItemSets aSets;
SwFrmFmts aFrmFmts;
- USHORT nLineCount;
- BOOL bModifyBox : 1;
- BOOL bSaveFormula : 1;
- BOOL bNewModel : 1;
+ sal_uInt16 nLineCount;
+ sal_Bool bModifyBox : 1;
+ sal_Bool bSaveFormula : 1;
+ sal_Bool bNewModel : 1;
public:
- _SaveTable( const SwTable& rTbl, USHORT nLnCnt = USHRT_MAX,
- BOOL bSaveFml = TRUE );
+ _SaveTable( const SwTable& rTbl, sal_uInt16 nLnCnt = USHRT_MAX,
+ sal_Bool bSaveFml = sal_True );
~_SaveTable();
- USHORT AddFmt( SwFrmFmt* pFmt, bool bIsLine );
- void NewFrmFmt( const SwClient* pLnBx, BOOL bIsLine, USHORT nFmtPos,
+ sal_uInt16 AddFmt( SwFrmFmt* pFmt, bool bIsLine );
+ void NewFrmFmt( const SwClient* pLnBx, sal_Bool bIsLine, sal_uInt16 nFmtPos,
SwFrmFmt* pOldFmt );
- void RestoreAttr( SwTable& rTbl, BOOL bModifyBox = FALSE );
+ void RestoreAttr( SwTable& rTbl, sal_Bool bModifyBox = sal_False );
void SaveCntntAttrs( SwDoc* pDoc );
- void CreateNew( SwTable& rTbl, BOOL bCreateFrms = TRUE,
- BOOL bRestoreChart = TRUE );
- BOOL IsNewModel() const { return bNewModel; }
+ void CreateNew( SwTable& rTbl, sal_Bool bCreateFrms = sal_True,
+ sal_Bool bRestoreChart = sal_True );
+ sal_Bool IsNewModel() const { return bNewModel; }
};
class _SaveLine
@@ -151,7 +151,7 @@ class _SaveLine
_SaveLine* pNext;
_SaveBox* pBox;
- USHORT nItemSet;
+ sal_uInt16 nItemSet;
public:
@@ -169,9 +169,9 @@ class _SaveBox
friend class _SaveLine;
_SaveBox* pNext;
- ULONG nSttNode;
+ sal_uLong nSttNode;
long nRowSpan;
- USHORT nItemSet;
+ sal_uInt16 nItemSet;
union
{
SfxItemSets* pCntntAttrs;
@@ -188,8 +188,8 @@ public:
void CreateNew( SwTable& rTbl, SwTableLine& rParent, _SaveTable& rSTbl );
};
-void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
-void InsertSort( SvULongs& rArr, ULONG nIdx, USHORT* pInsPos = 0 );
+void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
+void InsertSort( SvULongs& rArr, sal_uLong nIdx, sal_uInt16* pInsPos = 0 );
#if defined( JP_DEBUG ) && defined(DBG_UTIL)
#include "shellio.hxx"
@@ -210,15 +210,15 @@ So we need to remember not only the start node position but the end node positio
struct SwTblToTxtSave
{
- ULONG m_nSttNd;
- ULONG m_nEndNd;
+ sal_uLong m_nSttNd;
+ sal_uLong m_nEndNd;
xub_StrLen m_nCntnt;
SwHistory* m_pHstry;
// metadata references for first and last paragraph in cell
::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart;
::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd;
- SwTblToTxtSave( SwDoc& rDoc, ULONG nNd, ULONG nEndIdx, xub_StrLen nCntnt );
+ SwTblToTxtSave( SwDoc& rDoc, sal_uLong nNd, sal_uLong nEndIdx, xub_StrLen nCntnt );
~SwTblToTxtSave() { delete m_pHstry; }
};
@@ -228,7 +228,7 @@ SV_IMPL_PTRARR( SwUndoMoves, SwUndoMovePtr )
SV_IMPL_PTRARR( SwTblToTxtSaves, SwTblToTxtSavePtr )
SV_IMPL_PTRARR( _UndoTblCpyTbl_Entries, _UndoTblCpyTbl_EntryPtr )
-USHORT __FAR_DATA aSave_BoxCntntSet[] = {
+sal_uInt16 __FAR_DATA aSave_BoxCntntSet[] = {
RES_CHRATR_COLOR, RES_CHRATR_CROSSEDOUT,
RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
RES_CHRATR_POSTURE, RES_CHRATR_POSTURE,
@@ -238,8 +238,8 @@ USHORT __FAR_DATA aSave_BoxCntntSet[] = {
-SwUndoInsTbl::SwUndoInsTbl( const SwPosition& rPos, USHORT nCl, USHORT nRw,
- USHORT nAdj, const SwInsertTableOptions& rInsTblOpts,
+SwUndoInsTbl::SwUndoInsTbl( const SwPosition& rPos, sal_uInt16 nCl, sal_uInt16 nRw,
+ sal_uInt16 nAdj, const SwInsertTableOptions& rInsTblOpts,
const SwTableAutoFmt* pTAFmt,
const SvUShorts* pColArr,
const String & rName)
@@ -296,11 +296,11 @@ void SwUndoInsTbl::Undo( SwUndoIter& rUndoIter )
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
}
@@ -346,7 +346,7 @@ void SwUndoInsTbl::Redo( SwUndoIter& rUndoIter )
rDoc.GetRedlineTbl().Count() ))
{
SwPaM aPam( *pTblNode->EndOfSectionNode(), *pTblNode, 1 );
- SwCntntNode* pCNd = aPam.GetCntntNode( FALSE );
+ SwCntntNode* pCNd = aPam.GetCntntNode( sal_False );
if( pCNd )
aPam.GetMark()->nContent.Assign( pCNd, 0 );
@@ -384,7 +384,7 @@ SwRewriter SwUndoInsTbl::GetRewriter() const
// -----------------------------------------------------
-SwTblToTxtSave::SwTblToTxtSave( SwDoc& rDoc, ULONG nNd, ULONG nEndIdx, xub_StrLen nCnt )
+SwTblToTxtSave::SwTblToTxtSave( SwDoc& rDoc, sal_uLong nNd, sal_uLong nEndIdx, xub_StrLen nCnt )
: m_nSttNd( nNd ), m_nEndNd( nEndIdx), m_nCntnt( nCnt ), m_pHstry( 0 )
{
// Attributierung des gejointen Node merken.
@@ -427,11 +427,11 @@ SwUndoTblToTxt::SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh )
: SwUndo( UNDO_TABLETOTEXT ),
sTblNm( rTbl.GetFrmFmt()->GetName() ), pDDEFldType( 0 ), pHistory( 0 ),
nSttNd( 0 ), nEndNd( 0 ),
- nAdjust( static_cast<USHORT>(rTbl.GetFrmFmt()->GetHoriOrient().GetHoriOrient()) ),
+ nAdjust( static_cast<sal_uInt16>(rTbl.GetFrmFmt()->GetHoriOrient().GetHoriOrient()) ),
cTrenner( cCh ), nHdlnRpt( rTbl.GetRowsToRepeat() )
{
pTblSave = new _SaveTable( rTbl );
- pBoxSaves = new SwTblToTxtSaves( (BYTE)rTbl.GetTabSortBoxes().Count() );
+ pBoxSaves = new SwTblToTxtSaves( (sal_uInt8)rTbl.GetTabSortBoxes().Count() );
if( rTbl.IsA( TYPE( SwDDETable ) ) )
pDDEFldType = (SwDDEFieldType*)((SwDDETable&)rTbl).GetDDEFldType()->Copy();
@@ -440,10 +440,10 @@ SwUndoTblToTxt::SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh )
pHistory = new SwHistory;
const SwTableNode* pTblNd = rTbl.GetTableNode();
- ULONG nTblStt = pTblNd->GetIndex(), nTblEnd = pTblNd->EndOfSectionIndex();
+ sal_uLong nTblStt = pTblNd->GetIndex(), nTblEnd = pTblNd->EndOfSectionIndex();
const SwSpzFrmFmts& rFrmFmtTbl = *pTblNd->GetDoc()->GetSpzFrmFmts();
- for( USHORT n = 0; n < rFrmFmtTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFrmFmtTbl.Count(); ++n )
{
SwFrmFmt* pFmt = rFrmFmtTbl[ n ];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -505,20 +505,20 @@ void SwUndoTblToTxt::Undo( SwUndoIter& rUndoIter )
SwDDEFieldType* pNewType = (SwDDEFieldType*)rDoc.InsertFldType(
*pDDEFldType);
SwDDETable* pDDETbl = new SwDDETable( pTblNd->GetTable(), pNewType );
- pTblNd->SetNewTable( pDDETbl, FALSE ); // setze die DDE-Tabelle
+ pTblNd->SetNewTable( pDDETbl, sal_False ); // setze die DDE-Tabelle
delete pDDEFldType, pDDEFldType = 0;
}
if( bCheckNumFmt )
{
SwTableSortBoxes& rBxs = pTblNd->GetTable().GetTabSortBoxes();
- for( USHORT nBoxes = rBxs.Count(); nBoxes; )
- rDoc.ChkBoxNumFmt( *rBxs[ --nBoxes ], FALSE );
+ for( sal_uInt16 nBoxes = rBxs.Count(); nBoxes; )
+ rDoc.ChkBoxNumFmt( *rBxs[ --nBoxes ], sal_False );
}
if( pHistory )
{
- USHORT nTmpEnd = pHistory->GetTmpEnd();
+ sal_uInt16 nTmpEnd = pHistory->GetTmpEnd();
pHistory->TmpRollback( &rDoc, 0 );
pHistory->SetTmpEnd( nTmpEnd );
}
@@ -539,7 +539,7 @@ void SwUndoTblToTxt::Undo( SwUndoIter& rUndoIter )
}
// steht im untbl.cxx und darf nur vom Undoobject gerufen werden
-SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd,
+SwTableNode* SwNodes::UndoTableToText( sal_uLong nSttNd, sal_uLong nEndNd,
const SwTblToTxtSaves& rSavedData )
{
SwNodeIndex aSttIdx( *this, nSttNd );
@@ -554,7 +554,7 @@ SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd,
Delete all Frames attached to the nodes in that range. */
SwNode* pNd;
{
- ULONG n, nTmpEnd = aEndIdx.GetIndex();
+ sal_uLong n, nTmpEnd = aEndIdx.GetIndex();
for( n = pTblNd->GetIndex() + 1; n < nTmpEnd; ++n )
{
if( ( pNd = (*this)[ n ] )->IsCntntNode() )
@@ -572,7 +572,7 @@ SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd,
pTblNd->GetTable().GetTabLines().C40_INSERT( SwTableLine, pLine, 0 );
SvULongs aBkmkArr( 0, 4 );
- for( USHORT n = rSavedData.Count(); n; )
+ for( sal_uInt16 n = rSavedData.Count(); n; )
{
SwTblToTxtSave* pSave = rSavedData[ --n ];
// if the start node was merged with last from prev. cell,
@@ -616,7 +616,7 @@ SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd,
if( pSave->m_pHstry )
{
- USHORT nTmpEnd = pSave->m_pHstry->GetTmpEnd();
+ sal_uInt16 nTmpEnd = pSave->m_pHstry->GetTmpEnd();
pSave->m_pHstry->TmpRollback( GetDoc(), 0 );
pSave->m_pHstry->SetTmpEnd( nTmpEnd );
}
@@ -638,7 +638,7 @@ SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd,
pSttNd->pStartOfSection = pTblNd;
new SwEndNode( aEndIdx, *pSttNd );
- for( ULONG i = aSttIdx.GetIndex(); i < aEndIdx.GetIndex()-1; ++i )
+ for( sal_uLong i = aSttIdx.GetIndex(); i < aEndIdx.GetIndex()-1; ++i )
{
pNd = (*this)[ i ];
pNd->pStartOfSection = pSttNd;
@@ -680,7 +680,7 @@ void SwUndoTblToTxt::Redo( SwUndoIter& rUndoIter )
if( !pCNd && 0 == ( pCNd = rDoc.GetNodes().GoNext( &aSaveIdx ) ) &&
0 == ( pCNd = rDoc.GetNodes().GoPrevious( &aSaveIdx )) )
{
- ASSERT( FALSE, "wo steht denn nun der TextNode" );
+ ASSERT( sal_False, "wo steht denn nun der TextNode" );
}
pPam->GetPoint()->nNode = aSaveIdx;
@@ -713,7 +713,7 @@ void SwUndoTblToTxt::SetRange( const SwNodeRange& rRg )
nEndNd = rRg.aEnd.GetIndex();
}
-void SwUndoTblToTxt::AddBoxPos( SwDoc& rDoc, ULONG nNdIdx, ULONG nEndIdx, xub_StrLen nCntntIdx )
+void SwUndoTblToTxt::AddBoxPos( SwDoc& rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx, xub_StrLen nCntntIdx )
{
SwTblToTxtSave* pNew = new SwTblToTxtSave( rDoc, nNdIdx, nEndIdx, nCntntIdx );
pBoxSaves->Insert( pNew, pBoxSaves->Count() );
@@ -723,7 +723,7 @@ void SwUndoTblToTxt::AddBoxPos( SwDoc& rDoc, ULONG nNdIdx, ULONG nEndIdx, xub_St
SwUndoTxtToTbl::SwUndoTxtToTbl( const SwPaM& rRg,
const SwInsertTableOptions& rInsTblOpts,
- sal_Unicode cCh, USHORT nAdj,
+ sal_Unicode cCh, sal_uInt16 nAdj,
const SwTableAutoFmt* pAFmt )
: SwUndo( UNDO_TEXTTOTABLE ), SwUndRng( rRg ), aInsTblOpts( rInsTblOpts ),
pDelBoxes( 0 ), pAutoFmt( 0 ),
@@ -749,7 +749,7 @@ void SwUndoTxtToTbl::Undo( SwUndoIter& rUndoIter )
{
SwDoc& rDoc = rUndoIter.GetDoc();
- ULONG nTblNd = nSttNode;
+ sal_uLong nTblNd = nSttNode;
if( nSttCntnt )
++nTblNd; // Node wurde vorher gesplittet
SwNodeIndex aIdx( rDoc.GetNodes(), nTblNd );
@@ -769,11 +769,11 @@ void SwUndoTxtToTbl::Undo( SwUndoIter& rUndoIter )
if( pDelBoxes )
{
SwTable& rTbl = pTNd->GetTable();
- for( USHORT n = pDelBoxes->Count(); n; )
+ for( sal_uInt16 n = pDelBoxes->Count(); n; )
{
SwTableBox* pBox = rTbl.GetTblBox( (*pDelBoxes)[ --n ] );
if( pBox )
- ::_DeleteBox( rTbl, pBox, 0, FALSE, FALSE );
+ ::_DeleteBox( rTbl, pBox, 0, sal_False, sal_False );
else {
ASSERT( !this, "Wo ist die Box geblieben?" );
}
@@ -826,7 +826,7 @@ void SwUndoTxtToTbl::Undo( SwUndoIter& rUndoIter )
void SwUndoTxtToTbl::Redo( SwUndoIter& rUndoIter )
{
SetPaM( rUndoIter );
- RemoveIdxFromRange( *rUndoIter.pAktPam, FALSE );
+ RemoveIdxFromRange( *rUndoIter.pAktPam, sal_False );
SetPaM( rUndoIter );
const SwTable* pTable = rUndoIter.GetDoc().TextToTable(
@@ -861,8 +861,8 @@ SwHistory& SwUndoTxtToTbl::GetHistory()
// -----------------------------------------------------
-SwUndoTblHeadline::SwUndoTblHeadline( const SwTable& rTbl, USHORT nOldHdl,
- USHORT nNewHdl )
+SwUndoTblHeadline::SwUndoTblHeadline( const SwTable& rTbl, sal_uInt16 nOldHdl,
+ sal_uInt16 nNewHdl )
: SwUndo( UNDO_TABLEHEADLINE ),
nOldHeadline( nOldHdl ),
nNewHeadline( nNewHdl )
@@ -908,11 +908,11 @@ void SwUndoTblHeadline::Repeat( SwUndoIter& rUndoIter )
-_SaveTable::_SaveTable( const SwTable& rTbl, USHORT nLnCnt, BOOL bSaveFml )
+_SaveTable::_SaveTable( const SwTable& rTbl, sal_uInt16 nLnCnt, sal_Bool bSaveFml )
: aTblSet( *rTbl.GetFrmFmt()->GetAttrSet().GetPool(), aTableSetRange ),
pSwTable( &rTbl ), nLineCount( nLnCnt ), bSaveFormula( bSaveFml )
{
- bModifyBox = FALSE;
+ bModifyBox = sal_False;
bNewModel = rTbl.IsNewModel();
aTblSet.Put( rTbl.GetFrmFmt()->GetAttrSet() );
pLine = new _SaveLine( 0, *rTbl.GetTabLines()[ 0 ], *this );
@@ -920,7 +920,7 @@ _SaveTable::_SaveTable( const SwTable& rTbl, USHORT nLnCnt, BOOL bSaveFml )
_SaveLine* pLn = pLine;
if( USHRT_MAX == nLnCnt )
nLnCnt = rTbl.GetTabLines().Count();
- for( USHORT n = 1; n < nLnCnt; ++n )
+ for( sal_uInt16 n = 1; n < nLnCnt; ++n )
pLn = new _SaveLine( pLn, *rTbl.GetTabLines()[ n ], *this );
aFrmFmts.Remove( 0, aFrmFmts.Count() );
@@ -934,9 +934,9 @@ _SaveTable::~_SaveTable()
}
-USHORT _SaveTable::AddFmt( SwFrmFmt* pFmt, bool bIsLine )
+sal_uInt16 _SaveTable::AddFmt( SwFrmFmt* pFmt, bool bIsLine )
{
- USHORT nRet = aFrmFmts.GetPos( pFmt );
+ sal_uInt16 nRet = aFrmFmts.GetPos( pFmt );
if( USHRT_MAX == nRet )
{
// Kopie vom ItemSet anlegen
@@ -948,7 +948,7 @@ USHORT _SaveTable::AddFmt( SwFrmFmt* pFmt, bool bIsLine )
// errechnet werden!
//JP 30.07.98: Bug 54295 - Formeln immer im Klartext speichern
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BOXATR_FORMULA, TRUE, &pItem ))
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_BOXATR_FORMULA, sal_True, &pItem ))
{
pSet->ClearItem( RES_BOXATR_VALUE );
if( pSwTable && bSaveFormula )
@@ -967,9 +967,9 @@ USHORT _SaveTable::AddFmt( SwFrmFmt* pFmt, bool bIsLine )
}
-void _SaveTable::RestoreAttr( SwTable& rTbl, BOOL bMdfyBox )
+void _SaveTable::RestoreAttr( SwTable& rTbl, sal_Bool bMdfyBox )
{
- USHORT n;
+ sal_uInt16 n;
bModifyBox = bMdfyBox;
@@ -982,7 +982,7 @@ void _SaveTable::RestoreAttr( SwTable& rTbl, BOOL bMdfyBox )
if( pFmt->IsInCache() )
{
SwFrm::GetCache().Delete( pFmt );
- pFmt->SetInCache( FALSE );
+ pFmt->SetInCache( sal_False );
}
// zur Sicherheit alle Tableframes invalidieren
@@ -999,7 +999,7 @@ void _SaveTable::RestoreAttr( SwTable& rTbl, BOOL bMdfyBox )
for( n = aSets.Count(); n; --n )
aFrmFmts.Insert( pFmt, aFrmFmts.Count() );
- USHORT nLnCnt = nLineCount;
+ sal_uInt16 nLnCnt = nLineCount;
if( USHRT_MAX == nLnCnt )
nLnCnt = rTbl.GetTabLines().Count();
@@ -1016,7 +1016,7 @@ void _SaveTable::RestoreAttr( SwTable& rTbl, BOOL bMdfyBox )
}
aFrmFmts.Remove( 0, aFrmFmts.Count() );
- bModifyBox = FALSE;
+ bModifyBox = sal_False;
}
@@ -1026,10 +1026,10 @@ void _SaveTable::SaveCntntAttrs( SwDoc* pDoc )
}
-void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms,
- BOOL bRestoreChart )
+void _SaveTable::CreateNew( SwTable& rTbl, sal_Bool bCreateFrms,
+ sal_Bool bRestoreChart )
{
- USHORT n;
+ sal_uInt16 n;
_FndBox aTmpBox( 0, 0 );
//if( bRestoreChart )
@@ -1045,7 +1045,7 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms,
if( pFmt->IsInCache() )
{
SwFrm::GetCache().Delete( pFmt );
- pFmt->SetInCache( FALSE );
+ pFmt->SetInCache( sal_False );
}
// SwTableBox muss ein Format haben!!
@@ -1060,7 +1060,7 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms,
aFrmFmts.Remove( 0, aFrmFmts.Count() );
// die neuen Lines eintragen, die alten loeschen
- USHORT nOldLines = nLineCount;
+ sal_uInt16 nOldLines = nLineCount;
if( USHRT_MAX == nLineCount )
nOldLines = rTbl.GetTabLines().Count();
@@ -1076,8 +1076,8 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms,
// TL_CHART2: notify chart about boxes to be removed
const SwTableBoxes &rBoxes = pOld->GetTabBoxes();
- USHORT nBoxes = rBoxes.Count();
- for (USHORT k = 0; k < nBoxes; ++k)
+ sal_uInt16 nBoxes = rBoxes.Count();
+ for (sal_uInt16 k = 0; k < nBoxes; ++k)
{
SwTableBox *pBox = rBoxes[k];
if (pPCD)
@@ -1095,11 +1095,11 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms,
{
// remove remaining lines...
- for (USHORT k1 = 0; k1 < nOldLines - n; ++k1)
+ for (sal_uInt16 k1 = 0; k1 < nOldLines - n; ++k1)
{
const SwTableBoxes &rBoxes = rTbl.GetTabLines()[n + k1]->GetTabBoxes();
- USHORT nBoxes = rBoxes.Count();
- for (USHORT k2 = 0; k2 < nBoxes; ++k2)
+ sal_uInt16 nBoxes = rBoxes.Count();
+ for (sal_uInt16 k2 = 0; k2 < nBoxes; ++k2)
{
SwTableBox *pBox = rBoxes[k2];
// TL_CHART2: notify chart about boxes to be removed
@@ -1123,8 +1123,8 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms,
}
-void _SaveTable::NewFrmFmt( const SwClient* pLnBx, BOOL bIsLine,
- USHORT nFmtPos, SwFrmFmt* pOldFmt )
+void _SaveTable::NewFrmFmt( const SwClient* pLnBx, sal_Bool bIsLine,
+ sal_uInt16 nFmtPos, SwFrmFmt* pOldFmt )
{
SwDoc* pDoc = pOldFmt->GetDoc();
@@ -1151,7 +1151,7 @@ void _SaveTable::NewFrmFmt( const SwClient* pLnBx, BOOL bIsLine,
((SwFrm*)pLast)->ReinitializeFrmSizeAttrFlags();
if ( !bIsLine )
{
- ((SwCellFrm*)pLast)->SetDerivedVert( FALSE );
+ ((SwCellFrm*)pLast)->SetDerivedVert( sal_False );
((SwCellFrm*)pLast)->CheckDirChange();
}
}
@@ -1184,7 +1184,7 @@ _SaveLine::_SaveLine( _SaveLine* pPrev, const SwTableLine& rLine, _SaveTable& rS
pBox = new _SaveBox( 0, *rLine.GetTabBoxes()[ 0 ], rSTbl );
_SaveBox* pBx = pBox;
- for( USHORT n = 1; n < rLine.GetTabBoxes().Count(); ++n )
+ for( sal_uInt16 n = 1; n < rLine.GetTabBoxes().Count(); ++n )
pBx = new _SaveBox( pBx, *rLine.GetTabBoxes()[ n ], rSTbl );
}
@@ -1198,10 +1198,10 @@ _SaveLine::~_SaveLine()
void _SaveLine::RestoreAttr( SwTableLine& rLine, _SaveTable& rSTbl )
{
- rSTbl.NewFrmFmt( &rLine, TRUE, nItemSet, rLine.GetFrmFmt() );
+ rSTbl.NewFrmFmt( &rLine, sal_True, nItemSet, rLine.GetFrmFmt() );
_SaveBox* pBx = pBox;
- for( USHORT n = 0; n < rLine.GetTabBoxes().Count(); ++n, pBx = pBx->pNext )
+ for( sal_uInt16 n = 0; n < rLine.GetTabBoxes().Count(); ++n, pBx = pBx->pNext )
{
if( !pBx )
{
@@ -1270,7 +1270,7 @@ _SaveBox::_SaveBox( _SaveBox* pPrev, const SwTableBox& rBox, _SaveTable& rSTbl )
Ptrs.pLine = new _SaveLine( 0, *rBox.GetTabLines()[ 0 ], rSTbl );
_SaveLine* pLn = Ptrs.pLine;
- for( USHORT n = 1; n < rBox.GetTabLines().Count(); ++n )
+ for( sal_uInt16 n = 1; n < rBox.GetTabLines().Count(); ++n )
pLn = new _SaveLine( pLn, *rBox.GetTabLines()[ n ], rSTbl );
}
}
@@ -1288,7 +1288,7 @@ _SaveBox::~_SaveBox()
void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl )
{
- rSTbl.NewFrmFmt( &rBox, FALSE, nItemSet, rBox.GetFrmFmt() );
+ rSTbl.NewFrmFmt( &rBox, sal_False, nItemSet, rBox.GetFrmFmt() );
if( ULONG_MAX == nSttNode ) // keine EndBox
{
@@ -1299,7 +1299,7 @@ void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl )
else
{
_SaveLine* pLn = Ptrs.pLine;
- for( USHORT n = 0; n < rBox.GetTabLines().Count(); ++n, pLn = pLn->pNext )
+ for( sal_uInt16 n = 0; n < rBox.GetTabLines().Count(); ++n, pLn = pLn->pNext )
{
if( !pLn )
{
@@ -1316,9 +1316,9 @@ void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl )
if( Ptrs.pCntntAttrs )
{
SwNodes& rNds = rBox.GetFrmFmt()->GetDoc()->GetNodes();
- USHORT nSet = 0;
- ULONG nEnd = rBox.GetSttNd()->EndOfSectionIndex();
- for( ULONG n = nSttNode + 1; n < nEnd; ++n )
+ sal_uInt16 nSet = 0;
+ sal_uLong nEnd = rBox.GetSttNd()->EndOfSectionIndex();
+ for( sal_uLong n = nSttNode + 1; n < nEnd; ++n )
{
SwCntntNode* pCNd = rNds[ n ]->GetCntntNode();
if( pCNd )
@@ -1326,7 +1326,7 @@ void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl )
SfxItemSet* pSet = (*Ptrs.pCntntAttrs)[ nSet++ ];
if( pSet )
{
- USHORT *pRstAttr = aSave_BoxCntntSet;
+ sal_uInt16 *pRstAttr = aSave_BoxCntntSet;
while( *pRstAttr )
{
pCNd->ResetAttr( *pRstAttr, *(pRstAttr+1) );
@@ -1356,9 +1356,9 @@ void _SaveBox::SaveCntntAttrs( SwDoc* pDoc )
}
else
{
- ULONG nEnd = pDoc->GetNodes()[ nSttNode ]->EndOfSectionIndex();
- Ptrs.pCntntAttrs = new SfxItemSets( (BYTE)(nEnd - nSttNode - 1 ), 5 );
- for( ULONG n = nSttNode + 1; n < nEnd; ++n )
+ sal_uLong nEnd = pDoc->GetNodes()[ nSttNode ]->EndOfSectionIndex();
+ Ptrs.pCntntAttrs = new SfxItemSets( (sal_uInt8)(nEnd - nSttNode - 1 ), 5 );
+ for( sal_uLong n = nSttNode + 1; n < nEnd; ++n )
{
SwCntntNode* pCNd = pDoc->GetNodes()[ n ]->GetCntntNode();
if( pCNd )
@@ -1429,7 +1429,7 @@ void _SaveBox::CreateNew( SwTable& rTbl, SwTableLine& rParent, _SaveTable& rSTbl
// UndoObject fuer Attribut Aenderung an der Tabelle
-SwUndoAttrTbl::SwUndoAttrTbl( const SwTableNode& rTblNd, BOOL bClearTabCols )
+SwUndoAttrTbl::SwUndoAttrTbl( const SwTableNode& rTblNd, sal_Bool bClearTabCols )
: SwUndo( UNDO_TABLE_ATTR ),
nSttNode( rTblNd.GetIndex() )
{
@@ -1479,7 +1479,7 @@ SwUndoTblAutoFmt::SwUndoTblAutoFmt( const SwTableNode& rTblNd,
const SwTableAutoFmt& rAFmt )
: SwUndo( UNDO_TABLE_AUTOFMT ),
nSttNode( rTblNd.GetIndex() ), pUndos( 0 ),
- bSaveCntntAttr( FALSE )
+ bSaveCntntAttr( sal_False )
{
pSaveTbl = new _SaveTable( rTblNd.GetTable() );
@@ -1488,7 +1488,7 @@ SwUndoTblAutoFmt::SwUndoTblAutoFmt( const SwTableNode& rTblNd,
// dann auch noch ueber die ContentNodes der EndBoxen und
// und alle Absatz-Attribute zusammen sammeln
pSaveTbl->SaveCntntAttrs( (SwDoc*)rTblNd.GetDoc() );
- bSaveCntntAttr = TRUE;
+ bSaveCntntAttr = sal_True;
}
}
@@ -1508,7 +1508,7 @@ void SwUndoTblAutoFmt::SaveBoxCntnt( const SwTableBox& rBox )
}
-void SwUndoTblAutoFmt::UndoRedo( BOOL bUndo, SwUndoIter& rUndoIter )
+void SwUndoTblAutoFmt::UndoRedo( sal_Bool bUndo, SwUndoIter& rUndoIter )
{
SwDoc& rDoc = rUndoIter.GetDoc();
SwTableNode* pTblNd = rDoc.GetNodes()[ nSttNode ]->GetTableNode();
@@ -1521,7 +1521,7 @@ void SwUndoTblAutoFmt::UndoRedo( BOOL bUndo, SwUndoIter& rUndoIter )
pOrig->SaveCntntAttrs( &rDoc );
if( pUndos && bUndo )
- for( USHORT n = pUndos->Count(); n; )
+ for( sal_uInt16 n = pUndos->Count(); n; )
pUndos->GetObject( --n )->Undo( rUndoIter );
pSaveTbl->RestoreAttr( pTblNd->GetTable(), !bUndo );
@@ -1531,13 +1531,13 @@ void SwUndoTblAutoFmt::UndoRedo( BOOL bUndo, SwUndoIter& rUndoIter )
void SwUndoTblAutoFmt::Undo( SwUndoIter& rUndoIter )
{
- UndoRedo( TRUE, rUndoIter );
+ UndoRedo( sal_True, rUndoIter );
}
void SwUndoTblAutoFmt::Redo( SwUndoIter& rUndoIter )
{
- UndoRedo( FALSE, rUndoIter );
+ UndoRedo( sal_False, rUndoIter );
}
@@ -1548,9 +1548,9 @@ SwUndoTblNdsChg::SwUndoTblNdsChg( SwUndoId nAction,
const SwSelBoxes& rBoxes,
const SwTableNode& rTblNd,
long nMn, long nMx,
- USHORT nCnt, BOOL bFlg, BOOL bSmHght )
+ sal_uInt16 nCnt, sal_Bool bFlg, sal_Bool bSmHght )
: SwUndo( nAction ),
- aBoxes( rBoxes.Count() < 255 ? (BYTE)rBoxes.Count() : 255, 10 ),
+ aBoxes( rBoxes.Count() < 255 ? (sal_uInt8)rBoxes.Count() : 255, 10 ),
nMin( nMn ), nMax( nMx ),
nSttNode( rTblNd.GetIndex() ), nCurrBox( 0 ),
nCount( nCnt ), nRelDiff( 0 ), nAbsDiff( 0 ),
@@ -1564,7 +1564,7 @@ SwUndoTblNdsChg::SwUndoTblNdsChg( SwUndoId nAction,
pSaveTbl = new _SaveTable( rTbl );
// und die Selektion merken
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
aBoxes.Insert( rBoxes[n]->GetSttIdx(), n );
}
@@ -1573,13 +1573,13 @@ SwUndoTblNdsChg::SwUndoTblNdsChg( SwUndoId nAction,
const SwSelBoxes& rBoxes,
const SwTableNode& rTblNd )
: SwUndo( nAction ),
- aBoxes( rBoxes.Count() < 255 ? (BYTE)rBoxes.Count() : 255, 10 ),
+ aBoxes( rBoxes.Count() < 255 ? (sal_uInt8)rBoxes.Count() : 255, 10 ),
nMin( 0 ), nMax( 0 ),
nSttNode( rTblNd.GetIndex() ), nCurrBox( 0 ),
nCount( 0 ), nRelDiff( 0 ), nAbsDiff( 0 ),
nSetColType( USHRT_MAX ),
- bFlag( FALSE ),
- bSameHeight( FALSE )
+ bFlag( sal_False ),
+ bSameHeight( sal_False )
{
Ptrs.pNewSttNds = 0;
@@ -1587,7 +1587,7 @@ SwUndoTblNdsChg::SwUndoTblNdsChg( SwUndoId nAction,
pSaveTbl = new _SaveTable( rTbl );
// und die Selektion merken
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
aBoxes.Insert( rBoxes[n]->GetSttIdx(), n );
}
@@ -1596,7 +1596,7 @@ void SwUndoTblNdsChg::ReNewBoxes( const SwSelBoxes& rBoxes )
if( rBoxes.Count() != aBoxes.Count() )
{
aBoxes.Remove( 0, aBoxes.Count() );
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
aBoxes.Insert( rBoxes[n]->GetSttIdx(), n );
}
}
@@ -1616,11 +1616,11 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
{
const SwTable& rTbl = rTblNd.GetTable();
const SwTableSortBoxes& rTblBoxes = rTbl.GetTabSortBoxes();
- USHORT n;
- USHORT i;
+ sal_uInt16 n;
+ sal_uInt16 i;
ASSERT( ! IsDelBox(), "falsche Action" );
- Ptrs.pNewSttNds = new SvULongs( (BYTE)(rTblBoxes.Count() - rOld.Count()), 5 );
+ Ptrs.pNewSttNds = new SvULongs( (sal_uInt8)(rTblBoxes.Count() - rOld.Count()), 5 );
for( n = 0, i = 0; n < rOld.Count(); ++i )
{
@@ -1646,7 +1646,7 @@ SwTableLine* lcl_FindTableLine( const SwTable& rTable,
rBox.GetUpper()->GetUpper()->GetTabLines()
: rTable.GetTabLines();
const SwTableLine* pLine = rBox.GetUpper();
- USHORT nLineNo = rTableLines.C40_GETPOS( SwTableLine, pLine );
+ sal_uInt16 nLineNo = rTableLines.C40_GETPOS( SwTableLine, pLine );
pRet = rTableLines[nLineNo - 1];
return pRet;
@@ -1673,12 +1673,12 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
const SwTableSortBoxes& rTblBoxes = rTbl.GetTabSortBoxes();
ASSERT( ! IsDelBox(), "falsche Action" );
- Ptrs.pNewSttNds = new SvULongs( (BYTE)(rTblBoxes.Count() - rOld.Count()), 5 );
+ Ptrs.pNewSttNds = new SvULongs( (sal_uInt8)(rTblBoxes.Count() - rOld.Count()), 5 );
ASSERT( rTbl.IsNewModel() || rOld.Count() + nCount * rBoxes.Count() == rTblBoxes.Count(),
"unexpected boxes" );
ASSERT( rOld.Count() <= rTblBoxes.Count(), "more unexpected boxes" );
- for( USHORT n = 0, i = 0; i < rTblBoxes.Count(); ++i )
+ for( sal_uInt16 n = 0, i = 0; i < rTblBoxes.Count(); ++i )
{
if( ( n < rOld.Count() ) &&
( rOld[ n ] == rTblBoxes[ i ] ) )
@@ -1689,7 +1689,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
else
{
// new box found: insert (obey sort order)
- USHORT nInsPos;
+ sal_uInt16 nInsPos;
const SwTableBox* pBox = rTblBoxes[ i ];
InsertSort( *Ptrs.pNewSttNds, pBox->GetSttIdx(), &nInsPos );
@@ -1700,15 +1700,15 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
const SwTableBox* pSourceBox = NULL;
const SwTableBox* pCheckBox = NULL;
const SwTableLine* pBoxLine = pBox->GetUpper();
- USHORT nLineDiff = lcl_FindParentLines(rTbl,*pBox).C40_GETPOS(SwTableLine,pBoxLine);
- USHORT nLineNo = 0;
- for( USHORT j = 0; j < rBoxes.Count(); ++j )
+ sal_uInt16 nLineDiff = lcl_FindParentLines(rTbl,*pBox).C40_GETPOS(SwTableLine,pBoxLine);
+ sal_uInt16 nLineNo = 0;
+ for( sal_uInt16 j = 0; j < rBoxes.Count(); ++j )
{
pCheckBox = rBoxes[j];
if( pCheckBox->GetUpper()->GetUpper() == pBox->GetUpper()->GetUpper() )
{
const SwTableLine* pCheckLine = pCheckBox->GetUpper();
- USHORT nCheckLine = lcl_FindParentLines( rTbl, *pCheckBox ).
+ sal_uInt16 nCheckLine = lcl_FindParentLines( rTbl, *pCheckBox ).
C40_GETPOS( SwTableLine, pCheckLine );
if( ( !pSourceBox || nCheckLine > nLineNo ) && nCheckLine < nLineDiff )
{
@@ -1724,10 +1724,10 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
ASSERT( pSourceBox, "Splitted source box not found!" );
// find out how many nodes the source box used to have
// (to help determine bNodesMoved flag below)
- USHORT nNdsPos = 0;
+ sal_uInt16 nNdsPos = 0;
while( rBoxes[ nNdsPos ] != pSourceBox )
++nNdsPos;
- ULONG nNodes = rNodeCnts[ nNdsPos ];
+ sal_uLong nNodes = rNodeCnts[ nNdsPos ];
// When a new table cell is created, it either gets a new
// node, or it gets node(s) from elsewhere. The undo must
@@ -1741,7 +1741,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
// The bNodesMoved flag is stored in a seperate array
// which mirrors Ptrs.pNewSttNds, i.e. Ptrs.pNewSttNds[i]
// and aMvBoxes[i] belong together.
- BOOL bNodesMoved =
+ sal_Bool bNodesMoved =
( nNodes != ( pSourceBox->GetSttNd()->EndOfSectionIndex() -
pSourceBox->GetSttIdx() ) )
&& ( nNodes - 1 > nLineDiff );
@@ -1793,7 +1793,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
SwTableBoxes& rLnBoxes = pCpyBox->GetUpper()->GetTabBoxes();
// die Sections wieder herstellen
- for( USHORT n = Ptrs.pDelSects->Count(); n; )
+ for( sal_uInt16 n = Ptrs.pDelSects->Count(); n; )
{
SwUndoSaveSection* pSave = (*Ptrs.pDelSects)[ --n ];
pSave->RestoreSection( &rDoc, &aIdx, SwTableBoxStartNode );
@@ -1813,10 +1813,10 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
aTmp.Insert( Ptrs.pNewSttNds, 0 );
// von hinten anfangen
- for( USHORT n = aTmp.Count(); n; )
+ for( sal_uInt16 n = aTmp.Count(); n; )
{
// Box aus der Tabellen-Struktur entfernen
- ULONG nIdx = aTmp[ --n ];
+ sal_uLong nIdx = aTmp[ --n ];
SwTableBox* pBox = pTblNd->GetTable().GetTblBox( nIdx );
ASSERT( pBox, "Wo ist meine TabellenBox geblieben?" );
@@ -1833,8 +1833,8 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
SwNodeIndex aInsPos( *(pLine->GetTabBoxes()[0]->GetSttNd()), 2 );
// alle StartNode Indizies anpassen
- USHORT i = n;
- ULONG nSttIdx = aInsPos.GetIndex() - 2,
+ sal_uInt16 i = n;
+ sal_uLong nSttIdx = aInsPos.GetIndex() - 2,
nNdCnt = aRg.aEnd.GetIndex() - aRg.aStart.GetIndex();
while( i && aTmp[ --i ] > nSttIdx )
aTmp[ i ] += nNdCnt;
@@ -1842,7 +1842,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
// erst die Box loeschen
delete pBox;
// dann die Nodes verschieben,
- rDoc.GetNodes()._MoveNodes( aRg, rDoc.GetNodes(), aInsPos, FALSE );
+ rDoc.GetNodes()._MoveNodes( aRg, rDoc.GetNodes(), aInsPos, sal_False );
}
else
rDoc.DeleteSection( rDoc.GetNodes()[ nIdx ] );
@@ -1852,9 +1852,9 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
else
{
// Remove nodes from nodes array (backwards!)
- for( USHORT n = Ptrs.pNewSttNds->Count(); n; )
+ for( sal_uInt16 n = Ptrs.pNewSttNds->Count(); n; )
{
- ULONG nIdx = (*Ptrs.pNewSttNds)[ --n ];
+ sal_uLong nIdx = (*Ptrs.pNewSttNds)[ --n ];
SwTableBox* pBox = pTblNd->GetTable().GetTblBox( nIdx );
ASSERT( pBox, "Where's my table box?" );
// TL_CHART2: notify chart about box to be removed
@@ -1865,7 +1865,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
}
}
// Remove boxes from table structure
- for( USHORT n = 0; n < aDelBoxes.size(); ++n )
+ for( sal_uInt16 n = 0; n < aDelBoxes.size(); ++n )
{
SwTableBox* pCurrBox = aDelBoxes[n];
SwTableBoxes* pTBoxes = &pCurrBox->GetUpper()->GetTabBoxes();
@@ -1873,7 +1873,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
delete pCurrBox;
}
- pSaveTbl->CreateNew( pTblNd->GetTable(), TRUE, FALSE );
+ pSaveTbl->CreateNew( pTblNd->GetTable(), sal_True, sal_False );
// TL_CHART2: need to inform chart of probably changed cell names
rDoc.UpdateCharts( pTblNd->GetTable().GetFrmFmt()->GetName() );
@@ -1894,7 +1894,7 @@ void SwUndoTblNdsChg::Redo( SwUndoIter& rUndoIter )
CHECK_TABLE( pTblNd->GetTable() )
SwSelBoxes aSelBoxes;
- for( USHORT n = 0; n < aBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n )
{
SwTableBox* pBox = pTblNd->GetTable().GetTblBox( aBoxes[ n ] );
aSelBoxes.Insert( pBox );
@@ -1942,7 +1942,7 @@ void SwUndoTblNdsChg::Redo( SwUndoIter& rUndoIter )
SwTable &rTable = pTblNd->GetTable();
if( nMax > nMin && rTable.IsNewModel() )
rTable.PrepareDeleteCol( nMin, nMax );
- rTable.DeleteSel( &rDoc, aSelBoxes, 0, this, TRUE, TRUE );
+ rTable.DeleteSel( &rDoc, aSelBoxes, 0, this, sal_True, sal_True );
}
else
{
@@ -1956,7 +1956,7 @@ void SwUndoTblNdsChg::Redo( SwUndoIter& rUndoIter )
TblChgMode eOldMode = rTbl.GetTblChgMode();
rTbl.SetTblChgMode( (TblChgMode)nCount );
- rDoc.DoUndo( TRUE ); // wir brauchen die SaveSections!
+ rDoc.DoUndo( sal_True ); // wir brauchen die SaveSections!
SwUndoTblNdsChg* pUndo = 0;
switch( nSetColType & 0xff )
@@ -1984,7 +1984,7 @@ void SwUndoTblNdsChg::Redo( SwUndoIter& rUndoIter )
delete pUndo;
}
- rDoc.DoUndo( FALSE );
+ rDoc.DoUndo( sal_False );
rTbl.SetTblChgMode( eOldMode );
}
@@ -2048,7 +2048,7 @@ CHECKTABLE(pTblNd->GetTable())
SwSelBoxes aSelBoxes;
SwTxtFmtColl* pColl = rDoc.GetTxtCollFromPool( RES_POOLCOLL_STANDARD );
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < aBoxes.Count(); ++n )
{
@@ -2071,7 +2071,7 @@ CHECKTABLE(pTblNd->GetTable())
for( n = aNewSttNds.Count(); n; )
{
// Box aus der Tabellen-Struktur entfernen
- ULONG nIdx = aNewSttNds[ --n ];
+ sal_uLong nIdx = aNewSttNds[ --n ];
if( !nIdx && n )
{
@@ -2084,10 +2084,10 @@ CHECKTABLE(pTblNd->GetTable())
*pBox->GetSttNd()->EndOfSectionNode() ), pColl );
// das war der Trenner, -> die verschobenen herstellen
- for( USHORT i = pMoves->Count(); i; )
+ for( sal_uInt16 i = pMoves->Count(); i; )
{
SwTxtNode* pTxtNd = 0;
- USHORT nDelPos = 0;
+ sal_uInt16 nDelPos = 0;
SwUndoMove* pUndo = (*pMoves)[ --i ];
if( !pUndo->IsMoveRange() )
{
@@ -2144,7 +2144,7 @@ DUMPDOC( &rDoc, String( "d:\\tmp\\tab_") + String( aNewSttNds.Count() - i ) +
SwNodeIndex aTmpIdx( *pBox->GetSttNd() );
rDoc.CorrAbs( SwNodeIndex( aTmpIdx, 1 ),
SwNodeIndex( *aTmpIdx.GetNode().EndOfSectionNode() ),
- SwPosition( aTmpIdx, SwIndex( 0, 0 )), TRUE );
+ SwPosition( aTmpIdx, SwIndex( 0, 0 )), sal_True );
}
delete pBox;
@@ -2155,7 +2155,7 @@ DUMPDOC( &rDoc, "d:\\tmp\\tab_z.db" )
CHECKTABLE(pTblNd->GetTable())
- pSaveTbl->CreateNew( pTblNd->GetTable(), TRUE, FALSE );
+ pSaveTbl->CreateNew( pTblNd->GetTable(), sal_True, sal_False );
// TL_CHART2: need to inform chart of probably changed cell names
rDoc.UpdateCharts( pTblNd->GetTable().GetFrmFmt()->GetName() );
@@ -2210,11 +2210,11 @@ void SwUndoTblMerge::MoveBoxCntnt( SwDoc* pDoc, SwNodeRange& rRg, SwNodeIndex& r
void SwUndoTblMerge::SetSelBoxes( const SwSelBoxes& rBoxes )
{
// die Selektion merken
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
InsertSort( aBoxes, rBoxes[n]->GetSttIdx() );
// als Trennung fuers einfuegen neuer Boxen nach dem Verschieben!
- aNewSttNds.Insert( (ULONG)0, aNewSttNds.Count() );
+ aNewSttNds.Insert( (sal_uLong)0, aNewSttNds.Count() );
// The new table model does not delete overlapped cells (by row span),
// so the rBoxes array might be empty even some cells have been merged.
@@ -2245,7 +2245,7 @@ SwUndoTblNumFmt::SwUndoTblNumFmt( const SwTableBox& rBox,
: SwUndo( UNDO_TBLNUMFMT ),
pBoxSet( 0 ), pHistory( 0 ), nFmtIdx( NUMBERFORMAT_TEXT )
{
- bNewFmt = bNewFml = bNewValue = FALSE;
+ bNewFmt = bNewFml = bNewValue = sal_False;
nNode = rBox.GetSttIdx();
nNdPos = rBox.IsValidNumTxtNd( 0 == pNewSet );
@@ -2277,21 +2277,21 @@ SwUndoTblNumFmt::SwUndoTblNumFmt( const SwTableBox& rBox,
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_FORMAT,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
- bNewFmt = TRUE;
+ bNewFmt = sal_True;
nNewFmtIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
}
if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_FORMULA,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
- bNewFml = TRUE;
+ bNewFml = sal_True;
aNewFml = ((SwTblBoxFormula*)pItem)->GetFormula();
}
if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_VALUE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
- bNewValue = TRUE;
+ bNewValue = sal_True;
fNewNum = ((SwTblBoxValue*)pItem)->GetValue();
}
}
@@ -2353,7 +2353,7 @@ void SwUndoTblNumFmt::Undo( SwUndoIter& rIter )
if( pHistory )
{
- USHORT nTmpEnd = pHistory->GetTmpEnd();
+ sal_uInt16 nTmpEnd = pHistory->GetTmpEnd();
pHistory->TmpRollback( &rDoc, 0 );
pHistory->SetTmpEnd( nTmpEnd );
}
@@ -2534,10 +2534,10 @@ void SwUndoTblCpyTbl::Undo( SwUndoIter& rIter )
_DEBUG_REDLINE( &rDoc )
SwTableNode* pTblNd = 0;
- for( USHORT n = pArr->Count(); n; )
+ for( sal_uInt16 n = pArr->Count(); n; )
{
_UndoTblCpyTbl_Entry* pEntry = (*pArr)[ --n ];
- ULONG nSttPos = pEntry->nBoxIdx + pEntry->nOffset;
+ sal_uLong nSttPos = pEntry->nBoxIdx + pEntry->nOffset;
SwStartNode* pSNd = rDoc.GetNodes()[ nSttPos ]->StartOfSectionNode();
if( !pTblNd )
pTblNd = pSNd->FindTableNode();
@@ -2616,7 +2616,7 @@ void SwUndoTblCpyTbl::Undo( SwUndoIter& rIter )
else
*aPam.GetPoint() = SwPosition( aTmpIdx );
}
- pUndo = new SwUndoDelete( aPam, bDeleteCompleteParagraph, TRUE );
+ pUndo = new SwUndoDelete( aPam, bDeleteCompleteParagraph, sal_True );
}
else
{
@@ -2673,10 +2673,10 @@ void SwUndoTblCpyTbl::Redo( SwUndoIter& rIter )
pInsRowUndo->Redo( rIter );
SwTableNode* pTblNd = 0;
- for( USHORT n = 0; n < pArr->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pArr->Count(); ++n )
{
_UndoTblCpyTbl_Entry* pEntry = (*pArr)[ n ];
- ULONG nSttPos = pEntry->nBoxIdx + pEntry->nOffset;
+ sal_uLong nSttPos = pEntry->nBoxIdx + pEntry->nOffset;
SwStartNode* pSNd = rDoc.GetNodes()[ nSttPos ]->StartOfSectionNode();
if( !pTblNd )
pTblNd = pSNd->FindTableNode();
@@ -2688,7 +2688,7 @@ void SwUndoTblCpyTbl::Redo( SwUndoIter& rIter )
// b62341295: Redline for copying tables - Start.
rDoc.GetNodes().MakeTxtNode( aInsIdx, (SwTxtFmtColl*)rDoc.GetDfltTxtFmtColl() );
SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode());
- SwUndo* pUndo = IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) ? 0 : new SwUndoDelete( aPam, TRUE );
+ SwUndo* pUndo = IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) ? 0 : new SwUndoDelete( aPam, sal_True );
if( pEntry->pUndo )
{
pEntry->pUndo->Undo( rIter );
@@ -2743,7 +2743,7 @@ void SwUndoTblCpyTbl::Redo( SwUndoIter& rIter )
_DEBUG_REDLINE( &rDoc )
}
-void SwUndoTblCpyTbl::AddBoxBefore( const SwTableBox& rBox, BOOL bDelCntnt )
+void SwUndoTblCpyTbl::AddBoxBefore( const SwTableBox& rBox, sal_Bool bDelCntnt )
{
if( pArr->Count() && !bDelCntnt )
return;
@@ -2760,7 +2760,7 @@ void SwUndoTblCpyTbl::AddBoxBefore( const SwTableBox& rBox, BOOL bDelCntnt )
SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode() );
if( !pDoc->IsRedlineOn() )
- pEntry->pUndo = new SwUndoDelete( aPam, TRUE );
+ pEntry->pUndo = new SwUndoDelete( aPam, sal_True );
}
pEntry->pBoxNumAttr = new SfxItemSet( pDoc->GetAttrPool(),
@@ -2772,7 +2772,7 @@ void SwUndoTblCpyTbl::AddBoxBefore( const SwTableBox& rBox, BOOL bDelCntnt )
_DEBUG_REDLINE( pDoc )
}
-void SwUndoTblCpyTbl::AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx, BOOL bDelCntnt )
+void SwUndoTblCpyTbl::AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx, sal_Bool bDelCntnt )
{
_UndoTblCpyTbl_Entry* pEntry = (*pArr)[ pArr->Count() - 1 ];
@@ -2858,7 +2858,7 @@ SwUndo* SwUndoTblCpyTbl::PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox,
aCellEnd = SwPosition(
SwNodeIndex( *rBox.GetSttNd()->EndOfSectionNode() ));
SwPaM aTmpPam( aDeleteStart, aCellEnd );
- pUndo = new SwUndoDelete( aTmpPam, TRUE );
+ pUndo = new SwUndoDelete( aTmpPam, sal_True );
}
SwPosition aCellStart( SwNodeIndex( *rBox.GetSttNd(), 2 ) );
pTxt = aCellStart.nNode.GetNode().GetTxtNode();
@@ -2875,18 +2875,18 @@ SwUndo* SwUndoTblCpyTbl::PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox,
}
-BOOL SwUndoTblCpyTbl::InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes,
- USHORT nCnt )
+sal_Bool SwUndoTblCpyTbl::InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt )
{
SwTableNode* pTblNd = (SwTableNode*)rTbl.GetTabSortBoxes()[0]->
GetSttNd()->FindTableNode();
SwTableSortBoxes aTmpLst( 0, 5 );
pInsRowUndo = new SwUndoTblNdsChg( UNDO_TABLE_INSROW, rBoxes, *pTblNd,
- 0, 0, nCnt, TRUE, FALSE );
+ 0, 0, nCnt, sal_True, sal_False );
aTmpLst.Insert( &rTbl.GetTabSortBoxes(), 0, rTbl.GetTabSortBoxes().Count() );
- BOOL bRet = rTbl.InsertRow( rTbl.GetFrmFmt()->GetDoc(), rBoxes, nCnt, TRUE );
+ sal_Bool bRet = rTbl.InsertRow( rTbl.GetFrmFmt()->GetDoc(), rBoxes, nCnt, sal_True );
if( bRet )
pInsRowUndo->SaveNewBoxes( *pTblNd, aTmpLst );
else
@@ -2894,7 +2894,7 @@ BOOL SwUndoTblCpyTbl::InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes,
return bRet;
}
-BOOL SwUndoTblCpyTbl::IsEmpty() const
+sal_Bool SwUndoTblCpyTbl::IsEmpty() const
{
return !pInsRowUndo && !pArr->Count();
}
@@ -2924,16 +2924,16 @@ void SwUndoCpyTbl::Undo( SwUndoIter& rIter )
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
}
SwPaM aPam( *pTNd, *pTNd->EndOfSectionNode(), 0 , 1 );
- pDel = new SwUndoDelete( aPam, TRUE );
+ pDel = new SwUndoDelete( aPam, sal_True );
}
void SwUndoCpyTbl::Redo( SwUndoIter& rIter )
@@ -2946,7 +2946,7 @@ void SwUndoCpyTbl::Redo( SwUndoIter& rIter )
/* */
SwUndoSplitTbl::SwUndoSplitTbl( const SwTableNode& rTblNd,
- SwSaveRowSpan* pRowSp, USHORT eMode, BOOL bNewSize )
+ SwSaveRowSpan* pRowSp, sal_uInt16 eMode, sal_Bool bNewSize )
: SwUndo( UNDO_SPLIT_TABLE ),
nTblNode( rTblNd.GetIndex() ), nOffset( 0 ), mpSaveRowSpan( pRowSp ), pSavTbl( 0 ),
pHistory( 0 ), nMode( eMode ), nFmlEnd( 0 ), bCalcNewSize( bNewSize )
@@ -2958,7 +2958,7 @@ SwUndoSplitTbl::SwUndoSplitTbl( const SwTableNode& rTblNd,
// kein break;
case HEADLINE_BORDERCOPY:
case HEADLINE_BOXATTRCOPY:
- pSavTbl = new _SaveTable( rTblNd.GetTable(), 1, FALSE );
+ pSavTbl = new _SaveTable( rTblNd.GetTable(), 1, sal_False );
break;
}
}
@@ -3000,7 +3000,7 @@ void SwUndoSplitTbl::Undo( SwUndoIter& rIter )
case HEADLINE_BOXATTRCOPY:
case HEADLINE_BORDERCOPY:
{
- pSavTbl->CreateNew( rTbl, FALSE );
+ pSavTbl->CreateNew( rTbl, sal_False );
pSavTbl->RestoreAttr( rTbl );
}
break;
@@ -3010,11 +3010,11 @@ void SwUndoSplitTbl::Undo( SwUndoIter& rIter )
{
SwSelBoxes aSelBoxes;
SwTableBox* pBox = rTbl.GetTblBox( nTblNode + nOffset + 1 );
- rTbl.SelLineFromBox( pBox, aSelBoxes, TRUE );
+ rTbl.SelLineFromBox( pBox, aSelBoxes, sal_True );
_FndBox aTmpBox( 0, 0 );
aTmpBox.SetTableLines( aSelBoxes, rTbl );
aTmpBox.DelFrms( rTbl );
- rTbl.DeleteSel( pDoc, aSelBoxes, 0, 0, FALSE, FALSE );
+ rTbl.DeleteSel( pDoc, aSelBoxes, 0, 0, sal_False, sal_False );
}
break;
}
@@ -3069,7 +3069,7 @@ void SwUndoSplitTbl::SaveFormula( SwHistory& rHistory )
SwUndoMergeTbl::SwUndoMergeTbl( const SwTableNode& rTblNd,
const SwTableNode& rDelTblNd,
- BOOL bWithPrv, USHORT nMd )
+ sal_Bool bWithPrv, sal_uInt16 nMd )
: SwUndo( UNDO_MERGE_TABLE ), pSavTbl( 0 ),
pHistory( 0 ), nMode( nMd ), bWithPrev( bWithPrv )
{
@@ -3114,7 +3114,7 @@ void SwUndoMergeTbl::Undo( SwUndoIter& rIter )
aFndBox.DelFrms( *pTbl );
// ? TL_CHART2: notification or locking of controller required ?
- SwTableNode* pNew = pDoc->GetNodes().SplitTable( rIdx, TRUE, FALSE );
+ SwTableNode* pNew = pDoc->GetNodes().SplitTable( rIdx, sal_True, sal_False );
//Layout updaten
aFndBox.MakeFrms( *pTbl );
@@ -3130,7 +3130,7 @@ void SwUndoMergeTbl::Undo( SwUndoIter& rIter )
pTbl = &pNew->GetTable();
pTbl->GetFrmFmt()->SetName( aName );
-// pSavTbl->CreateNew( *pTbl, FALSE );
+// pSavTbl->CreateNew( *pTbl, sal_False );
pSavTbl->RestoreAttr( *pTbl );
@@ -3195,9 +3195,9 @@ void SwUndoMergeTbl::SaveFormula( SwHistory& rHistory )
/* */
-void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos )
+void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos )
{
- USHORT nO = rArr.Count(), nM, nU = 0;
+ sal_uInt16 nO = rArr.Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
@@ -3206,7 +3206,7 @@ void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos )
nM = nU + ( nO - nU ) / 2;
if( *(rArr.GetData() + nM) == nIdx )
{
- ASSERT( FALSE, "Index ist schon vorhanden, darf nie sein!" );
+ ASSERT( sal_False, "Index ist schon vorhanden, darf nie sein!" );
return;
}
if( *(rArr.GetData() + nM) < nIdx )
@@ -3222,9 +3222,9 @@ void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos )
*pInsPos = nU;
}
-void InsertSort( SvULongs& rArr, ULONG nIdx, USHORT* pInsPos )
+void InsertSort( SvULongs& rArr, sal_uLong nIdx, sal_uInt16* pInsPos )
{
- USHORT nO = rArr.Count(), nM, nU = 0;
+ sal_uInt16 nO = rArr.Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
@@ -3233,7 +3233,7 @@ void InsertSort( SvULongs& rArr, ULONG nIdx, USHORT* pInsPos )
nM = nU + ( nO - nU ) / 2;
if( *(rArr.GetData() + nM) == nIdx )
{
- ASSERT( FALSE, "Index ist schon vorhanden, darf nie sein!" );
+ ASSERT( sal_False, "Index ist schon vorhanden, darf nie sein!" );
return;
}
if( *(rArr.GetData() + nM) < nIdx )
@@ -3273,7 +3273,7 @@ void CheckTable( const SwTable& rTbl )
{
const SwNodes& rNds = rTbl.GetFrmFmt()->GetDoc()->GetNodes();
const SwTableSortBoxes& rSrtArr = pTblNd->GetTable().GetTabSortBoxes();
- for( USHORT n = 0; n < rSrtArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rSrtArr.Count(); ++n )
{
const SwTableBox* pBox = rSrtArr[ n ];
const SwNode* pNd = pBox->GetSttNd();
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index e9e7ce1e0e02..eb560b2585bc 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -46,7 +46,7 @@
SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam )
: SwUndo( nUndoId ), SwUndRng( rPam ),
pTxtFmtColl( 0 ), pLastNdColl(0), pFrmFmts( 0 ), pFlyUndos(0), pRedlData( 0 ),
- bSttWasTxtNd( TRUE ), nNdDiff( 0 ), pPos( 0 ), nSetPos( 0 )
+ bSttWasTxtNd( sal_True ), nNdDiff( 0 ), pPos( 0 ), nSetPos( 0 )
{
pHistory = new SwHistory;
SwDoc* pDoc = (SwDoc*)rPam.GetDoc();
@@ -62,8 +62,8 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam )
if( !nSttCntnt ) // dann werden Flys mitgenommen !!
{
- USHORT nArrLen = pDoc->GetSpzFrmFmts()->Count();
- for( USHORT n = 0; n < nArrLen; ++n )
+ sal_uInt16 nArrLen = pDoc->GetSpzFrmFmts()->Count();
+ for( sal_uInt16 n = 0; n < nArrLen; ++n )
{
SwFrmFmt* pFmt = (*pDoc->GetSpzFrmFmts())[n];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -89,8 +89,8 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam )
// setze den Destination-Bereich nach dem Einlesen.
-void SwUndoInserts::SetInsertRange( const SwPaM& rPam, BOOL bScanFlys,
- BOOL bSttIsTxtNd )
+void SwUndoInserts::SetInsertRange( const SwPaM& rPam, sal_Bool bScanFlys,
+ sal_Bool bSttIsTxtNd )
{
const SwPosition* pTmpPos = rPam.End();
nEndNode = pTmpPos->nNode.GetIndex();
@@ -108,7 +108,7 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, BOOL bScanFlys,
if( !bSttIsTxtNd ) // wird eine Tabellenselektion eingefuegt,
{
++nSttNode; // dann stimmt der CopyPam nicht ganz
- bSttWasTxtNd = FALSE;
+ bSttWasTxtNd = sal_False;
}
}
@@ -117,8 +117,8 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, BOOL bScanFlys,
// dann alle neuen Flys zusammen sammeln !!
SwDoc* pDoc = (SwDoc*)rPam.GetDoc();
pFlyUndos = new SwUndos();
- USHORT nFndPos, nArrLen = pDoc->GetSpzFrmFmts()->Count();
- for( USHORT n = 0; n < nArrLen; ++n )
+ sal_uInt16 nFndPos, nArrLen = pDoc->GetSpzFrmFmts()->Count();
+ for( sal_uInt16 n = 0; n < nArrLen; ++n )
{
SwFrmFmt* pFmt = (*pDoc->GetSpzFrmFmts())[n];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -176,15 +176,15 @@ void SwUndoInserts::Undo( SwUndoIter& rUndoIter )
SwPaM * pPam = rUndoIter.pAktPam;
SwDoc* pDoc = pPam->GetDoc();
SetPaM( rUndoIter );
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ))
pDoc->DeleteRedline( *pPam, true, USHRT_MAX );
// sind an Point/Mark 2 unterschiedliche TextNodes, dann muss ein
// JoinNext ausgefuehrt werden.
- BOOL bJoinNext = nSttNode != nEndNode &&
+ sal_Bool bJoinNext = nSttNode != nEndNode &&
pPam->GetMark()->nNode.GetNode().GetTxtNode() &&
pPam->GetPoint()->nNode.GetNode().GetTxtNode();
@@ -199,7 +199,7 @@ void SwUndoInserts::Undo( SwUndoIter& rUndoIter )
pLastNdColl = pTxtNd->GetTxtColl();
}
- RemoveIdxFromRange( *pPam, FALSE );
+ RemoveIdxFromRange( *pPam, sal_False );
SetPaM( rUndoIter );
// sind Fussnoten oder CntntFlyFrames im Text ??
@@ -220,8 +220,8 @@ void SwUndoInserts::Undo( SwUndoIter& rUndoIter )
if( pFlyUndos )
{
- ULONG nTmp = pPam->GetPoint()->nNode.GetIndex();
- for( USHORT n = pFlyUndos->Count(); n; )
+ sal_uLong nTmp = pPam->GetPoint()->nNode.GetIndex();
+ for( sal_uInt16 n = pFlyUndos->Count(); n; )
(*pFlyUndos)[ --n ]->Undo( rUndoIter );
nNdDiff += nTmp - pPam->GetPoint()->nNode.GetIndex();
}
@@ -293,10 +293,10 @@ void SwUndoInserts::Redo( SwUndoIter& rUndoIter )
// alte Anfangs-Position fuers Rollback zurueckholen
if( ( nSttNode != nEndNode || nSttCntnt != nEndCntnt ) && pPos )
{
- BOOL bMvBkwrd = MovePtBackward( *pPam );
+ sal_Bool bMvBkwrd = MovePtBackward( *pPam );
// Inhalt wieder einfuegen. (erst pPos abmelden !!)
- ULONG nMvNd = pPos->nNode.GetIndex();
+ sal_uLong nMvNd = pPos->nNode.GetIndex();
xub_StrLen nMvCnt = pPos->nContent.GetIndex();
DELETEZ( pPos );
MoveFromUndoNds( *pDoc, nMvNd, nMvCnt, *pPam->GetMark() );
@@ -322,7 +322,7 @@ void SwUndoInserts::Redo( SwUndoIter& rUndoIter )
}
if( pFlyUndos )
- for( USHORT n = pFlyUndos->Count(); n; )
+ for( sal_uInt16 n = pFlyUndos->Count(); n; )
(*pFlyUndos)[ --n ]->Redo( rUndoIter );
pHistory->Rollback( pDoc, nSetPos );
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx
index b0d0f9623e71..77e5e536a042 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -66,16 +66,16 @@ sal_Int32 GetEnumAsInt32( const UNO_NMSPC::Any& rVal )
catch( UNO_NMSPC::Exception & )
{
eVal = 0;
- ASSERT( FALSE, "can't get EnumAsInt32" );
+ ASSERT( sal_False, "can't get EnumAsInt32" );
}
return eVal;
}
// methods for UCB actions
-BOOL UCB_DeleteFile( const String& rURL )
+sal_Bool UCB_DeleteFile( const String& rURL )
{
- BOOL bRemoved;
+ sal_Bool bRemoved;
try
{
ucbhelper::Content aTempContent( rURL,
@@ -83,19 +83,19 @@ BOOL UCB_DeleteFile( const String& rURL )
aTempContent.executeCommand(
rtl::OUString::createFromAscii( "delete" ),
UNO_NMSPC::makeAny( sal_Bool( sal_True ) ) );
- bRemoved = TRUE;
+ bRemoved = sal_True;
}
catch( UNO_NMSPC::Exception& )
{
- bRemoved = FALSE;
- ASSERT( FALSE, "Exeception from executeCommand( delete )" );
+ bRemoved = sal_False;
+ ASSERT( sal_False, "Exeception from executeCommand( delete )" );
}
return bRemoved;
}
-BOOL UCB_CopyFile( const String& rURL, const String& rNewURL, BOOL bCopyIsMove )
+sal_Bool UCB_CopyFile( const String& rURL, const String& rNewURL, sal_Bool bCopyIsMove )
{
- BOOL bCopyCompleted = TRUE;
+ sal_Bool bCopyCompleted = sal_True;
try
{
INetURLObject aURL( rNewURL );
@@ -119,15 +119,15 @@ BOOL UCB_CopyFile( const String& rURL, const String& rNewURL, BOOL bCopyIsMove )
}
catch( UNO_NMSPC::Exception& )
{
- ASSERT( FALSE, "Exeception from executeCommand( transfer )" );
- bCopyCompleted = FALSE;
+ ASSERT( sal_False, "Exeception from executeCommand( transfer )" );
+ bCopyCompleted = sal_False;
}
return bCopyCompleted;
}
-BOOL UCB_IsCaseSensitiveFileName( const String& rURL )
+sal_Bool UCB_IsCaseSensitiveFileName( const String& rURL )
{
- BOOL bCaseSensitive;
+ sal_Bool bCaseSensitive;
try
{
STAR_REFERENCE( lang::XMultiServiceFactory ) xMSF =
@@ -152,15 +152,15 @@ BOOL UCB_IsCaseSensitiveFileName( const String& rURL )
}
catch( UNO_NMSPC::Exception& )
{
- bCaseSensitive = FALSE;
- ASSERT( FALSE, "Exeception from compareContentIds()" );
+ bCaseSensitive = sal_False;
+ ASSERT( sal_False, "Exeception from compareContentIds()" );
}
return bCaseSensitive;
}
-BOOL UCB_IsReadOnlyFileName( const String& rURL )
+sal_Bool UCB_IsReadOnlyFileName( const String& rURL )
{
- BOOL bIsReadOnly = FALSE;
+ sal_Bool bIsReadOnly = sal_False;
try
{
ucbhelper::Content aCnt( rURL, STAR_REFERENCE( ucb::XCommandEnvironment )());
@@ -171,14 +171,14 @@ BOOL UCB_IsReadOnlyFileName( const String& rURL )
}
catch( UNO_NMSPC::Exception& )
{
- bIsReadOnly = FALSE;
+ bIsReadOnly = sal_False;
}
return bIsReadOnly;
}
-BOOL UCB_IsFile( const String& rURL )
+sal_Bool UCB_IsFile( const String& rURL )
{
- BOOL bExists = FALSE;
+ sal_Bool bExists = sal_False;
try
{
::ucbhelper::Content aContent( rURL, STAR_REFERENCE( ucb::XCommandEnvironment )() );
@@ -190,9 +190,9 @@ BOOL UCB_IsFile( const String& rURL )
return bExists;
}
-BOOL UCB_IsDirectory( const String& rURL )
+sal_Bool UCB_IsDirectory( const String& rURL )
{
- BOOL bExists = FALSE;
+ sal_Bool bExists = sal_False;
try
{
::ucbhelper::Content aContent( rURL, STAR_REFERENCE( ucb::XCommandEnvironment )() );
@@ -209,17 +209,17 @@ BOOL UCB_IsDirectory( const String& rURL )
// pDateTime != 0 -> returns also the modified date/time of
// the files in a SvPtrarr -->
// !! objects must be deleted from the caller!!
-BOOL UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
+sal_Bool UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
const String* pExtension,
SvPtrarr* pDateTimeList )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
try
{
ucbhelper::Content aCnt( rURL, STAR_REFERENCE( ucb::XCommandEnvironment )());
STAR_REFERENCE( sdbc::XResultSet ) xResultSet;
- USHORT nSeqSize = pDateTimeList ? 2 : 1;
+ sal_uInt16 nSeqSize = pDateTimeList ? 2 : 1;
UNO_NMSPC::Sequence < rtl::OUString > aProps( nSeqSize );
rtl::OUString* pProps = aProps.getArray();
pProps[ 0 ] = rtl::OUString::createFromAscii( "Title" );
@@ -272,7 +272,7 @@ BOOL UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
} while( xResultSet->next() );
}
- bOk = TRUE;
+ bOk = sal_True;
}
catch( UNO_NMSPC::Exception& )
{
@@ -283,7 +283,7 @@ BOOL UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
catch( UNO_NMSPC::Exception& )
{
DBG_ERRORFILE( "Exception caught!" );
- bOk = FALSE;
+ bOk = sal_False;
}
return bOk;
}
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 703389a58f7e..331350a5d9f2 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -164,7 +164,7 @@ void SwChartLockController_Helper::LockUnlockAllCharts( sal_Bool bLock )
return;
const SwFrmFmts& rTblFmts = *pDoc->GetTblFrmFmts();
- for( USHORT n = 0; n < rTblFmts.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTblFmts.Count(); ++n )
{
SwTable* pTmpTbl;
const SwTableNode* pTblNd;
@@ -678,7 +678,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
String aChartTableName;
const SwNodes& rNodes = pDoc->GetNodes();
- for( ULONG nN = rNodes.Count(); nN--; )
+ for( sal_uLong nN = rNodes.Count(); nN--; )
{
SwNodePtr pNode = rNodes[nN];
if( !pNode )
@@ -1747,12 +1747,12 @@ void SwChartDataProvider::DisposeAllDataSequences( const SwTable *pTable )
void SwChartDataProvider::AddRowCols(
const SwTable &rTable,
const SwSelBoxes& rBoxes,
- USHORT nLines, BOOL bBehind )
+ sal_uInt16 nLines, sal_Bool bBehind )
{
if (rTable.IsTblComplex())
return;
- const USHORT nBoxes = rBoxes.Count();
+ const sal_uInt16 nBoxes = rBoxes.Count();
if (nBoxes < 1 || nLines < 1)
return;
@@ -1851,7 +1851,7 @@ rtl::OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const rtl::OUStri
// "Table1.A1:A4;Table1.C2:C5" the same table must be used in all ranges!
xub_StrLen nNumRanges = aRangeRepresentation.GetTokenCount( ';' );
SwTable* pFirstFoundTable = 0; // to check that only one table will be used
- for (USHORT i = 0; i < nNumRanges; ++i)
+ for (sal_uInt16 i = 0; i < nNumRanges; ++i)
{
String aRange( aRangeRepresentation.GetToken(i, ';') );
SwFrmFmt *pTblFmt = 0; // pointer to table format
@@ -1924,7 +1924,7 @@ rtl::OUString SAL_CALL SwChartDataProvider::convertRangeFromXML( const rtl::OUSt
// "Table1.$A$1:.$A$4 Table1.$C$2:.$C$5" the same table must be used in all ranges!
xub_StrLen nNumRanges = aXMLRange.GetTokenCount( ' ' );
rtl::OUString aFirstFoundTable; // to check that only one table will be used
- for (USHORT i = 0; i < nNumRanges; ++i)
+ for (sal_uInt16 i = 0; i < nNumRanges; ++i)
{
String aRange( aXMLRange.GetToken(i, ' ') );
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 0b8f938d307d..1d65ee99c812 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -903,12 +903,12 @@ SwXFrameEnumeration<T>::SwXFrameEnumeration(const SwDoc* const pDoc)
return;
// --> OD 2009-09-10 #i104937#
// const SwFrmFmt* const pFmtsEnd = (*pFmts)[pFmts->Count()];
- const USHORT nSize = pFmts->Count();
+ const sal_uInt16 nSize = pFmts->Count();
// <--
::std::insert_iterator<frmcontainer_t> pInserter = ::std::insert_iterator<frmcontainer_t>(m_aFrames, m_aFrames.begin());
// --> OD 2009-09-10 #i104937#
SwFrmFmt* pFmt( 0 );
- for( USHORT i = 0; i < nSize; ++i )
+ for( sal_uInt16 i = 0; i < nSize; ++i )
// for(SwFrmFmt* pFmt = (*pFmts)[0]; pFmt < pFmtsEnd; ++pFmt)
// <--
{
@@ -970,7 +970,7 @@ OUString SwXFrames::getImplementationName(void) throw( RuntimeException )
return C2U("SwXFrames");
}
-BOOL SwXFrames::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXFrames::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.TextFrames") == rServiceName;
}
@@ -1142,7 +1142,7 @@ OUString SwXTextFrames::getImplementationName(void) throw( RuntimeException )
/* -----------------------------06.04.00 12:44--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTextFrames::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXTextFrames::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.TextFrames") == rServiceName;
}
@@ -1185,7 +1185,7 @@ OUString SwXTextGraphicObjects::getImplementationName(void) throw( RuntimeExcept
/* -----------------------------06.04.00 12:44--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTextGraphicObjects::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXTextGraphicObjects::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.TextGraphicObjects") == rServiceName;
}
@@ -1226,7 +1226,7 @@ OUString SwXTextEmbeddedObjects::getImplementationName(void) throw( RuntimeExcep
/* -----------------------------06.04.00 12:44--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTextEmbeddedObjects::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXTextEmbeddedObjects::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.TextEmbeddedObjects") == rServiceName;
}
@@ -1268,7 +1268,7 @@ OUString SwXTextSections::getImplementationName(void) throw( RuntimeException )
/* -----------------------------06.04.00 12:44--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTextSections::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXTextSections::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.TextSections") == rServiceName;
}
@@ -1479,7 +1479,7 @@ OUString SwXBookmarks::getImplementationName(void) throw( RuntimeException )
return OUString::createFromAscii("SwXBookmarks");
}
-BOOL SwXBookmarks::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXBookmarks::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return OUString::createFromAscii("com.sun.star.text.Bookmarks") == rServiceName;
}
@@ -1617,7 +1617,7 @@ uno::Any SwXNumberingRulesCollection::getByIndex(sal_Int32 nIndex)
uno::Reference< XIndexReplace > xRef;
if ( nIndex < GetDoc()->GetNumRuleTbl().Count() )
{
- xRef = new SwXNumberingRules( *GetDoc()->GetNumRuleTbl()[ static_cast< USHORT >(nIndex) ] );
+ xRef = new SwXNumberingRules( *GetDoc()->GetNumRuleTbl()[ static_cast< sal_uInt16 >(nIndex) ] );
aRet.setValue(&xRef, ::getCppuType((uno::Reference<XIndexReplace>*)0));
}
@@ -1652,7 +1652,7 @@ OUString SwXFootnotes::getImplementationName(void) throw( RuntimeException )
/* -----------------------------06.04.00 12:44--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXFootnotes::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXFootnotes::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.Footnotes") == rServiceName;
}
@@ -1775,7 +1775,7 @@ OUString SwXReferenceMarks::getImplementationName(void) throw( RuntimeException
/* -----------------------------06.04.00 12:44--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXReferenceMarks::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXReferenceMarks::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.ReferenceMarks") == rServiceName;
}
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 92a33da130fe..1baf9bfe3e39 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -281,7 +281,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
*pAny <<= (sal_Int16)(pTxtNd->GetActualListLevel());
else if(rEntry.nWID == FN_UNO_IS_NUMBER)
{
- BOOL bIsNumber = pTxtNd->IsCountedInList();
+ sal_Bool bIsNumber = pTxtNd->IsCountedInList();
pAny->setValue(&bIsNumber, ::getBooleanCppuType());
}
// --> OD 2008-07-14 #i91601#
@@ -293,7 +293,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
// <--
else /*if(rEntry.nWID == UNO_NAME_PARA_IS_NUMBERING_RESTART)*/
{
- BOOL bIsRestart = pTxtNd->IsListRestart();
+ sal_Bool bIsRestart = pTxtNd->IsListRestart();
pAny->setValue(&bIsRestart, ::getBooleanCppuType());
}
}
@@ -531,26 +531,26 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
{
SwTxtNode* pTxtNode;
- if((pTxtNode = (SwTxtNode*)rPam.GetNode( TRUE )) == rPam.GetNode(FALSE) &&
+ if((pTxtNode = (SwTxtNode*)rPam.GetNode( sal_True )) == rPam.GetNode(sal_False) &&
pTxtNode->GetpSwpHints())
{
- USHORT nPaMStart = rPam.GetPoint()->nContent.GetIndex();
- USHORT nPaMEnd = rPam.GetMark() ? rPam.GetMark()->nContent.GetIndex() : nPaMStart;
+ sal_uInt16 nPaMStart = rPam.GetPoint()->nContent.GetIndex();
+ sal_uInt16 nPaMEnd = rPam.GetMark() ? rPam.GetMark()->nContent.GetIndex() : nPaMStart;
if(nPaMStart > nPaMEnd)
{
- USHORT nTmp = nPaMStart;
+ sal_uInt16 nTmp = nPaMStart;
nPaMStart = nPaMEnd;
nPaMEnd = nTmp;
}
Sequence< ::rtl::OUString> aCharStyles;
SwpHints* pHints = pTxtNode->GetpSwpHints();
- for(USHORT nAttr = 0; nAttr < pHints->GetStartCount(); nAttr++ )
+ for(sal_uInt16 nAttr = 0; nAttr < pHints->GetStartCount(); nAttr++ )
{
SwTxtAttr* pAttr = pHints->GetStart( nAttr );
if(pAttr->Which() != RES_TXTATR_CHARFMT)
continue;
- USHORT nAttrStart = *pAttr->GetStart();
- USHORT nAttrEnd = *pAttr->GetEnd();
+ sal_uInt16 nAttrStart = *pAttr->GetStart();
+ sal_uInt16 nAttrEnd = *pAttr->GetEnd();
//check if the attribute touches the selection
if( ( nAttrEnd > nPaMStart && nAttrStart < nPaMEnd ) ||
( !nAttrStart && !nAttrEnd && !nPaMStart && !nPaMEnd ) )
@@ -1072,7 +1072,7 @@ void makeRedline( SwPaM& rPaM,
comphelper::SequenceAsHashMap aPropMap( rRedlineProperties );
uno::Any aAuthorValue;
aAuthorValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii("RedlineAuthor"), aAuthorValue);
- USHORT nAuthor = 0;
+ sal_uInt16 nAuthor = 0;
::rtl::OUString sAuthor;
if( aAuthorValue >>= sAuthor )
nAuthor = pRedlineAccess->InsertRedlineAuthor(sAuthor);
@@ -1119,7 +1119,7 @@ SwAnyMapHelper::~SwAnyMapHelper()
/*-- 19.02.2009 09:27:26---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwAnyMapHelper::SetValue( USHORT nWhichId, USHORT nMemberId, const uno::Any& rAny )
+void SwAnyMapHelper::SetValue( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any& rAny )
{
sal_uInt32 nKey = (nWhichId << 16) + nMemberId;
AnyMapHelper_t::iterator aIt = find( nKey );
@@ -1133,7 +1133,7 @@ void SwAnyMapHelper::SetValue( USHORT nWhichId, USHORT nMemberId, const uno::Any
/*-- 19.02.2009 09:27:26---------------------------------------------------
-----------------------------------------------------------------------*/
-bool SwAnyMapHelper::FillValue( USHORT nWhichId, USHORT nMemberId, const uno::Any*& pAny )
+bool SwAnyMapHelper::FillValue( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any*& pAny )
{
bool bRet = false;
sal_uInt32 nKey = (nWhichId << 16) + nMemberId;
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index ab5d68910769..1248245d2c55 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -131,7 +131,7 @@ public:
pLRSpace(0),
bOpaque(sal_False),
// OD 2004-04-21 #i26791#
- mpFollowTextFlow( new SwFmtFollowTextFlow( FALSE ) ),
+ mpFollowTextFlow( new SwFmtFollowTextFlow( sal_False ) ),
// OD 2004-05-05 #i28701#
// --> OD 2004-10-18 #i35017# - constant name has changed
pWrapInfluenceOnObjPos( new SwFmtWrapInfluenceOnObjPos(
@@ -224,7 +224,7 @@ public:
SwFmtFollowTextFlow* GetFollowTextFlow( sal_Bool _bCreate = sal_False )
{
if ( _bCreate && !mpFollowTextFlow )
- mpFollowTextFlow = new SwFmtFollowTextFlow( FALSE );
+ mpFollowTextFlow = new SwFmtFollowTextFlow( sal_False );
return mpFollowTextFlow;
}
void RemoveFollowTextFlow()
@@ -445,12 +445,12 @@ namespace
SwXShapesEnumeration(SwXDrawPage* const pDrawPage);
//XEnumeration
- virtual BOOL SAL_CALL hasMoreElements(void) throw(uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasMoreElements(void) throw(uno::RuntimeException);
virtual uno::Any SAL_CALL nextElement(void) throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
//XServiceInfo
virtual OUString SAL_CALL getImplementationName(void) throw(uno::RuntimeException);
- virtual BOOL SAL_CALL supportsService(const OUString& ServiceName) throw(uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(uno::RuntimeException);
virtual uno::Sequence<OUString> SAL_CALL getSupportedServiceNames(void) throw(uno::RuntimeException);
};
}
@@ -468,7 +468,7 @@ SwXShapesEnumeration::SwXShapesEnumeration(SwXDrawPage* const pDrawPage)
}
}
-BOOL SwXShapesEnumeration::hasMoreElements(void) throw(uno::RuntimeException)
+sal_Bool SwXShapesEnumeration::hasMoreElements(void) throw(uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
return !m_aShapes.empty();
@@ -489,7 +489,7 @@ OUString SwXShapesEnumeration::getImplementationName(void) throw(uno::RuntimeExc
return C2U("SwXShapeEnumeration");
}
-BOOL SwXShapesEnumeration::supportsService(const OUString& ServiceName) throw(uno::RuntimeException)
+sal_Bool SwXShapesEnumeration::supportsService(const OUString& ServiceName) throw(uno::RuntimeException)
{
return C2U("com.sun.star.container.XEnumeration") == ServiceName;
}
@@ -517,7 +517,7 @@ rtl::OUString SwXDrawPage::getImplementationName(void) throw( uno::RuntimeExcept
/* -----------------------------06.04.00 13:14--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXDrawPage::supportsService(const rtl::OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXDrawPage::supportsService(const rtl::OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.drawing.GenericDrawPage") == rServiceName;
}
@@ -1888,7 +1888,7 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
else if(pFmt)
{
const SwAttrSet& rSet = pFmt->GetAttrSet();
- SfxItemState eItemState = rSet.GetItemState(pEntry->nWID, FALSE);
+ SfxItemState eItemState = rSet.GetItemState(pEntry->nWID, sal_False);
if(SFX_ITEM_SET == eItemState)
pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
diff --git a/sw/source/core/unocore/unoevent.cxx b/sw/source/core/unocore/unoevent.cxx
index 79dea2e958c8..333e132f4e6a 100644
--- a/sw/source/core/unocore/unoevent.cxx
+++ b/sw/source/core/unocore/unoevent.cxx
@@ -164,7 +164,7 @@ void SwHyperlinkEventDescriptor::copyMacrosFromINetFmt(
{
for(sal_Int16 i = 0; mpSupportedMacroItems[i].mnEvent != 0; i++)
{
- USHORT nEvent = mpSupportedMacroItems[i].mnEvent;
+ sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent;
const SvxMacro* aMacro = aFmt.GetMacro(nEvent);
if (NULL != aMacro)
replaceByName(nEvent, *aMacro);
@@ -176,7 +176,7 @@ void SwHyperlinkEventDescriptor::copyMacrosIntoINetFmt(
{
for(sal_Int16 i = 0; mpSupportedMacroItems[i].mnEvent != 0; i++)
{
- USHORT nEvent = mpSupportedMacroItems[i].mnEvent;
+ sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent;
if (hasByName(nEvent))
{
SvxMacro aMacro(sEmpty, sEmpty);
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index f63fee217e29..f0a62ea968ac 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -126,8 +126,8 @@ static const sal_uInt16 aDocInfoSubTypeFromService[] =
};
struct ServiceIdResId
{
- USHORT nResId;
- USHORT nServiceId;
+ sal_uInt16 nResId;
+ sal_uInt16 nServiceId;
};
static const ServiceIdResId aServiceToRes[] =
{
@@ -211,7 +211,7 @@ sal_uInt16 lcl_GetServiceForField( const SwField& rFld )
case RES_DOCINFOFLD:
{
- USHORT nSubType = rFld.GetSubType();
+ sal_uInt16 nSubType = rFld.GetSubType();
switch( (nSubType & 0xff))
{
case DI_CHANGE:
@@ -278,7 +278,7 @@ sal_uInt16 lcl_GetServiceForField( const SwField& rFld )
return nSrvId;
}
-sal_uInt16 lcl_GetPropMapIdForFieldType( USHORT nWhich )
+sal_uInt16 lcl_GetPropMapIdForFieldType( sal_uInt16 nWhich )
{
sal_uInt16 nId;
switch( nWhich )
@@ -294,9 +294,9 @@ sal_uInt16 lcl_GetPropMapIdForFieldType( USHORT nWhich )
}
-USHORT GetFieldTypeMId( const OUString& rProperty, const SwFieldType& rTyp )
+sal_uInt16 GetFieldTypeMId( const OUString& rProperty, const SwFieldType& rTyp )
{
- USHORT nId = lcl_GetPropMapIdForFieldType( rTyp.Which() );
+ sal_uInt16 nId = lcl_GetPropMapIdForFieldType( rTyp.Which() );
const SfxItemPropertySet* pSet = aSwMapProvider.GetPropertySet( nId );
if( !pSet )
nId = USHRT_MAX;
@@ -308,9 +308,9 @@ USHORT GetFieldTypeMId( const OUString& rProperty, const SwFieldType& rTyp )
return nId;
}
-USHORT lcl_GetPropertyMapOfService( USHORT nServiceId )
+sal_uInt16 lcl_GetPropertyMapOfService( sal_uInt16 nServiceId )
{
- USHORT nRet;
+ sal_uInt16 nRet;
switch ( nServiceId)
{
case SW_SERVICE_FIELDTYPE_DATETIME: nRet = PROPERTY_MAP_FLDTYP_DATETIME; break;
@@ -424,7 +424,7 @@ OUString SwXFieldMaster::getImplementationName(void) throw( uno::RuntimeExceptio
/* -----------------------------06.04.00 13:22--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXFieldMaster::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXFieldMaster::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
sal_Bool bRet = sal_False;
if(rServiceName.equalsAsciiL(
@@ -489,7 +489,7 @@ SwXFieldMaster::SwXFieldMaster(SwDoc* pDoc, sal_uInt16 nResId) :
m_bIsDescriptor(sal_True),
fParam1(0.),
nParam1(-1),
- bParam1(FALSE),
+ bParam1(sal_False),
nParam2(0)
{
pDoc->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
@@ -505,7 +505,7 @@ SwXFieldMaster::SwXFieldMaster(SwFieldType& rType, SwDoc* pDoc) :
m_bIsDescriptor(sal_False),
fParam1(0.),
nParam1(-1),
- bParam1(FALSE)
+ bParam1(sal_False)
{
}
@@ -569,7 +569,7 @@ void SwXFieldMaster::setPropertyValue( const OUString& rPropertyName,
// We just call PutValue (empty string is allowed).
// Thus the last property set will be used as Data Source.
- USHORT nMId = GetFieldTypeMId( rPropertyName, *pType );
+ sal_uInt16 nMId = GetFieldTypeMId( rPropertyName, *pType );
if( USHRT_MAX != nMId )
pType->PutValue( rValue, nMId );
else
@@ -612,7 +612,7 @@ void SwXFieldMaster::setPropertyValue( const OUString& rPropertyName,
case RES_DDEFLD :
{
SwDDEFieldType aType(sTypeName, sParam1,
- sal::static_int_cast< USHORT >(bParam1 ? sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL));
+ sal::static_int_cast< sal_uInt16 >(bParam1 ? sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL));
pType2 = m_pDoc->InsertFldType(aType);
}
break;
@@ -689,7 +689,7 @@ void SwXFieldMaster::setPropertyValue( const OUString& rPropertyName,
break;
case RES_DDEFLD:
{
- USHORT nPart = rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_TYPE)) ? 0 :
+ sal_uInt16 nPart = rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_TYPE)) ? 0 :
rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_FILE)) ? 1 :
rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_ELEMENT)) ? 2 :
rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_AUTOMATIC_UPDATE)) ? 3 : USHRT_MAX;
@@ -783,7 +783,7 @@ uno::Any SwXFieldMaster::getPropertyValue(const OUString& rPropertyName)
}
uno::Sequence<uno::Reference <text::XDependentTextField> > aRetSeq(aFldArr.Count());
uno::Reference<text::XDependentTextField>* pRetSeq = aRetSeq.getArray();
- for(USHORT i = 0; i < aFldArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < aFldArr.Count(); i++)
{
pFld = aFldArr.GetObject(i);
SwXTextField * pInsert = CreateSwXTextField(*GetDoc(), *pFld);
@@ -795,7 +795,7 @@ uno::Any SwXFieldMaster::getPropertyValue(const OUString& rPropertyName)
else if(pType)
{
//TODO: Properties fuer die uebrigen Feldtypen einbauen
- USHORT nMId = GetFieldTypeMId( rPropertyName, *pType );
+ sal_uInt16 nMId = GetFieldTypeMId( rPropertyName, *pType );
if( USHRT_MAX != nMId )
{
pType->QueryValue( aRet, nMId );
@@ -811,7 +811,7 @@ uno::Any SwXFieldMaster::getPropertyValue(const OUString& rPropertyName)
// a non-empty string.
INetURLObject aObj;
aObj.SetURL( aDataSource );
- BOOL bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ sal_Bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
if (bIsURL && rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DATA_BASE_URL)))
pStr = &aDataSource; // DataBaseURL
else if (!bIsURL && rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DATA_BASE_NAME)))
@@ -861,7 +861,7 @@ uno::Any SwXFieldMaster::getPropertyValue(const OUString& rPropertyName)
// a non-empty string.
INetURLObject aObj;
aObj.SetURL( sParam5 ); // SetSmartURL
- BOOL bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ sal_Bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
if (bIsURL && rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DATA_BASE_URL)))
pStr = &sParam5; // DataBaseURL
else if ( rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DATA_BASE_NAME)))
@@ -880,7 +880,7 @@ uno::Any SwXFieldMaster::getPropertyValue(const OUString& rPropertyName)
break;
case RES_DDEFLD:
{
- USHORT nPart = rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_TYPE)) ? 0 :
+ sal_uInt16 nPart = rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_TYPE)) ? 0 :
rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_FILE)) ? 1 :
rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_ELEMENT)) ? 2 :
rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_AUTOMATIC_UPDATE)) ? 3 : USHRT_MAX;
@@ -1005,11 +1005,11 @@ void SwXFieldMaster::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
const Programmatic2UIName_Impl* lcl_GetFieldNameTable()
{
- static BOOL bInitialized = FALSE;
+ static sal_Bool bInitialized = sal_False;
static Programmatic2UIName_Impl aFieldNames[5];
if(!bInitialized)
{
- bInitialized = TRUE;
+ bInitialized = sal_True;
int nName = 0;
aFieldNames[nName].sUIName = String (SW_RES(STR_POOLCOLL_LABEL_ABB ));
aFieldNames[nName++].sProgrammaticName = String (SW_RES(STR_POCO_PRGM_LABEL_ABB));
@@ -1411,7 +1411,7 @@ void SwXTextField::attachToRange(
pFld = new SwHiddenTxtField(((SwHiddenTxtFieldType*)pFldType),
m_pProps->sPar1,
m_pProps->sPar2, m_pProps->sPar3,
- static_cast< USHORT >(SW_SERVICE_FIELDTYPE_HIDDEN_TEXT == m_nServiceId ?
+ static_cast< sal_uInt16 >(SW_SERVICE_FIELDTYPE_HIDDEN_TEXT == m_nServiceId ?
TYP_HIDDENTXTFLD : TYP_CONDTXTFLD));
((SwHiddenTxtField*)pFld)->SetValue(m_pProps->bBool1);
uno::Any aVal; aVal <<= (OUString)m_pProps->sPar4;
@@ -1508,7 +1508,7 @@ void SwXTextField::attachToRange(
SwFieldType* pFldType = pDoc->GetFldType(RES_USERFLD, m_sTypeName, sal_True);
if(!pFldType)
throw uno::RuntimeException();
- USHORT nUserSubType = m_pProps->bBool1 ? nsSwExtendedSubType::SUB_INVISIBLE : 0;
+ sal_uInt16 nUserSubType = m_pProps->bBool1 ? nsSwExtendedSubType::SUB_INVISIBLE : 0;
if(m_pProps->bBool2)
nUserSubType |= nsSwExtendedSubType::SUB_CMD;
if(m_pProps->bFormatIsDefault &&
@@ -1708,7 +1708,7 @@ void SwXTextField::attachToRange(
SwFieldType* pFldType = pDoc->GetFldType(RES_INPUTFLD, m_sTypeName, sal_True);
if(!pFldType)
throw uno::RuntimeException();
- USHORT nInpSubType = sal::static_int_cast< USHORT >(SW_SERVICE_FIELDTYPE_INPUT_USER == m_nServiceId ? INP_USR : INP_TXT);
+ sal_uInt16 nInpSubType = sal::static_int_cast< sal_uInt16 >(SW_SERVICE_FIELDTYPE_INPUT_USER == m_nServiceId ? INP_USR : INP_TXT);
SwInputField * pTxtField =
new SwInputField((SwInputFieldType*)pFldType,
m_pProps->sPar1, m_pProps->sPar2,
@@ -1793,7 +1793,7 @@ void SwXTextField::attachToRange(
{
// create field
- USHORT nType = nsSwGetSetExpType::GSE_FORMULA;
+ sal_uInt16 nType = nsSwGetSetExpType::GSE_FORMULA;
if(m_pProps->bBool1)
{
nType |= nsSwExtendedSubType::SUB_CMD;
@@ -2024,7 +2024,7 @@ void SwXTextField::setPropertyValue(const OUString& rPropertyName, const uno::An
else if(m_pProps)
{
String* pStr = 0;
- BOOL* pBool = 0;
+ sal_Bool* pBool = 0;
switch(pEntry->nWID)
{
case FIELD_PROP_PAR1:
@@ -2512,7 +2512,7 @@ OUString SwXTextFieldMasters::getImplementationName(void) throw( uno::RuntimeExc
/* -----------------------------06.04.00 13:22--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTextFieldMasters::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXTextFieldMasters::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
"com.sun.star.text.TextFieldMasters" ));
@@ -2580,7 +2580,7 @@ sal_uInt16 lcl_GetIdByName( String& rName, String& rTypeName )
else if(rTypeName.EqualsAscii("DataBase"))
{
rName.Erase( 0, RTL_CONSTASCII_LENGTH( "DataBase." ));
- USHORT nDotCount = rName.GetTokenCount('.');
+ sal_uInt16 nDotCount = rName.GetTokenCount('.');
if( 2 <= nDotCount )
{
// #i51815#
@@ -2761,7 +2761,7 @@ OUString SwXTextFieldTypes::getImplementationName(void) throw( uno::RuntimeExcep
/* -----------------------------06.04.00 13:24--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTextFieldTypes::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXTextFieldTypes::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
"com.sun.star.text.TextFields" ));
@@ -2878,7 +2878,7 @@ OUString SwXFieldEnumeration::getImplementationName(void) throw( uno::RuntimeExc
/* -----------------------------06.04.00 13:25--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXFieldEnumeration::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXFieldEnumeration::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
"com.sun.star.text.FieldEnumeration" ));
@@ -2921,7 +2921,7 @@ SwXFieldEnumeration::SwXFieldEnumeration(SwDoc* pDc) :
const SwTxtFld *pTxtFld = pCurFldFmt->GetTxtFld();
// skip fields that are currently not in the document
// e.g. fields in undo or redo array
- BOOL bSkip = !pTxtFld ||
+ sal_Bool bSkip = !pTxtFld ||
!pTxtFld->GetpTxtNode()->GetNodes().IsDocNodes();
if (!bSkip)
pItems[ nFillPos++ ] = new SwXTextField(*pCurFldFmt, pDoc);
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index 2923b4e46317..00c02806d3b0 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -185,7 +185,7 @@ lang::Locale SAL_CALL SwXFlatParagraph::getLanguageOfText(::sal_Int32 nPos, ::sa
if (!mpTxtNode)
return SvxCreateLocale( LANGUAGE_NONE );
- const lang::Locale aLocale( SW_BREAKITER()->GetLocale( mpTxtNode->GetLang( static_cast<USHORT>(nPos), static_cast<USHORT>(nLen) ) ) );
+ const lang::Locale aLocale( SW_BREAKITER()->GetLocale( mpTxtNode->GetLang( static_cast<sal_uInt16>(nPos), static_cast<sal_uInt16>(nLen) ) ) );
return aLocale;
}
@@ -198,7 +198,7 @@ lang::Locale SAL_CALL SwXFlatParagraph::getPrimaryLanguageOfText(::sal_Int32 nPo
if (!mpTxtNode)
return SvxCreateLocale( LANGUAGE_NONE );
- const lang::Locale aLocale( SW_BREAKITER()->GetLocale( mpTxtNode->GetLang( static_cast<USHORT>(nPos), static_cast<USHORT>(nLen) ) ) );
+ const lang::Locale aLocale( SW_BREAKITER()->GetLocale( mpTxtNode->GetLang( static_cast<sal_uInt16>(nPos), static_cast<sal_uInt16>(nLen) ) ) );
return aLocale;
}
@@ -212,7 +212,7 @@ void SAL_CALL SwXFlatParagraph::changeText(::sal_Int32 nPos, ::sal_Int32 nLen, c
SwTxtNode* pOldTxtNode = mpTxtNode;
- SwPaM aPaM( *mpTxtNode, static_cast<USHORT>(nPos), *mpTxtNode, static_cast<USHORT>(nPos + nLen) );
+ SwPaM aPaM( *mpTxtNode, static_cast<sal_uInt16>(nPos), *mpTxtNode, static_cast<sal_uInt16>(nPos + nLen) );
UnoActionContext aAction( mpTxtNode->GetDoc() );
@@ -222,7 +222,7 @@ void SAL_CALL SwXFlatParagraph::changeText(::sal_Int32 nPos, ::sal_Int32 nLen, c
uno::Reference< beans::XPropertySet > xPropSet( xRange, uno::UNO_QUERY );
if ( xPropSet.is() )
{
- for ( USHORT i = 0; i < aAttributes.getLength(); ++i )
+ for ( sal_uInt16 i = 0; i < aAttributes.getLength(); ++i )
xPropSet->setPropertyValue( aAttributes[i].Name, aAttributes[i].Value );
}
@@ -242,7 +242,7 @@ void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 n
if ( !mpTxtNode )
return;
- SwPaM aPaM( *mpTxtNode, static_cast<USHORT>(nPos), *mpTxtNode, static_cast<USHORT>(nPos + nLen) );
+ SwPaM aPaM( *mpTxtNode, static_cast<sal_uInt16>(nPos), *mpTxtNode, static_cast<sal_uInt16>(nPos + nLen) );
UnoActionContext aAction( mpTxtNode->GetDoc() );
@@ -252,7 +252,7 @@ void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 n
uno::Reference< beans::XPropertySet > xPropSet( xRange, uno::UNO_QUERY );
if ( xPropSet.is() )
{
- for ( USHORT i = 0; i < aAttributes.getLength(); ++i )
+ for ( sal_uInt16 i = 0; i < aAttributes.getLength(); ++i )
xPropSet->setPropertyValue( aAttributes[i].Name, aAttributes[i].Value );
}
@@ -395,7 +395,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara()
else // non-automatic checking
{
const SwNodes& rNodes = mpDoc->GetNodes();
- const ULONG nMaxNodes = rNodes.Count();
+ const sal_uLong nMaxNodes = rNodes.Count();
while ( mnCurrentNode < mnEndNode && mnCurrentNode < nMaxNodes )
{
@@ -460,7 +460,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(co
SwTxtNode* pNextTxtNode = 0;
const SwNodes& rNodes = pCurrentNode->GetDoc()->GetNodes();
- for( ULONG nCurrentNode = pCurrentNode->GetIndex() + 1; nCurrentNode < rNodes.Count(); ++nCurrentNode )
+ for( sal_uLong nCurrentNode = pCurrentNode->GetIndex() + 1; nCurrentNode < rNodes.Count(); ++nCurrentNode )
{
SwNode* pNd = rNodes[ nCurrentNode ];
pNextTxtNode = dynamic_cast<SwTxtNode*>(pNd);
@@ -507,7 +507,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c
SwTxtNode* pPrevTxtNode = 0;
const SwNodes& rNodes = pCurrentNode->GetDoc()->GetNodes();
- for( ULONG nCurrentNode = pCurrentNode->GetIndex() - 1; nCurrentNode > 0; --nCurrentNode )
+ for( sal_uLong nCurrentNode = pCurrentNode->GetIndex() - 1; nCurrentNode > 0; --nCurrentNode )
{
SwNode* pNd = rNodes[ nCurrentNode ];
pPrevTxtNode = dynamic_cast<SwTxtNode*>(pNd);
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 3a3df506b457..1513d9960d96 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -143,8 +143,8 @@ class BaseFrameProperties_Impl
public:
virtual ~BaseFrameProperties_Impl();
- void SetProperty(USHORT nWID, BYTE nMemberId, const uno::Any& rVal);
- sal_Bool GetProperty(USHORT nWID, BYTE nMemberId, const uno::Any*& pAny );
+ void SetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any& rVal);
+ sal_Bool GetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any*& pAny );
// void GetProperty(const OUString &rPropertyName, const uno::Reference < beans::XPropertySet > &rxPropertySet, uno::Any& rAny );
// const SfxItemPropertyMap* GetMap() const {return _pMap;}
@@ -162,14 +162,14 @@ BaseFrameProperties_Impl::~BaseFrameProperties_Impl()
/* -----------------------------12.06.01 15:43--------------------------------
---------------------------------------------------------------------------*/
-void BaseFrameProperties_Impl::SetProperty(USHORT nWID, BYTE nMemberId, const uno::Any& rVal)
+void BaseFrameProperties_Impl::SetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any& rVal)
{
aAnyMap.SetValue( nWID, nMemberId, rVal );
}
/* -----------------------------12.06.01 15:43--------------------------------
---------------------------------------------------------------------------*/
-sal_Bool BaseFrameProperties_Impl::GetProperty(USHORT nWID, BYTE nMemberId, const uno::Any*& rpAny)
+sal_Bool BaseFrameProperties_Impl::GetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any*& rpAny)
{
return aAnyMap.FillValue( nWID, nMemberId, rpAny );
}
@@ -678,7 +678,7 @@ sal_Bool SwGraphicProperties_Impl::AnyToItemSet(
}
- static const :: USHORT nIDs[] =
+ static const :: sal_uInt16 nIDs[] =
{
RES_GRFATR_CROPGRF,
RES_GRFATR_ROTATION,
@@ -696,7 +696,7 @@ sal_Bool SwGraphicProperties_Impl::AnyToItemSet(
const ::uno::Any* pAny;
for(sal_Int16 nIndex = 0; nIDs[nIndex]; nIndex++)
{
- BYTE nMId = RES_GRFATR_CROPGRF == nIDs[nIndex] ? CONVERT_TWIPS : 0;
+ sal_uInt8 nMId = RES_GRFATR_CROPGRF == nIDs[nIndex] ? CONVERT_TWIPS : 0;
if(GetProperty(nIDs[nIndex], nMId, pAny ))
{
SfxPoolItem* pItem = ::GetDfltAttr( nIDs[nIndex] )->Clone();
@@ -730,10 +730,10 @@ sal_Bool SwOLEProperties_Impl::AnyToItemSet(
{
const ::uno::Any* pTemp;
if(!GetProperty(FN_UNO_CLSID, 0, pTemp) && !GetProperty(FN_UNO_STREAM_NAME, 0, pTemp) )
- return FALSE;
+ return sal_False;
SwFrameProperties_Impl::AnyToItemSet( pDoc, rFrmSet, rSet, rSizeFound);
//
- return TRUE;
+ return sal_True;
}
/******************************************************************
@@ -776,7 +776,7 @@ OUString SwXFrame::getImplementationName(void) throw( uno::RuntimeException )
/* -----------------------------06.04.00 14:20--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXFrame::supportsService(const :: OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXFrame::supportsService(const :: OUString& rServiceName) throw( uno::RuntimeException )
{
return !rServiceName.compareToAscii("com.sun.star.text.BaseFrame")||
!rServiceName.compareToAscii("com.sun.star.text.TextContent") ||
@@ -1038,17 +1038,17 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
pNoTxt->SetContour(0);
else if(aValue >>= aParam)
{
- PolyPolygon aPoly((USHORT)aParam.getLength());
+ PolyPolygon aPoly((sal_uInt16)aParam.getLength());
for(sal_Int32 i = 0; i < aParam.getLength(); i++)
{
const :: drawing::PointSequence* pPointSeq = aParam.getConstArray();
sal_Int32 nPoints = pPointSeq[i].getLength();
const :: awt::Point* pPoints = pPointSeq[i].getConstArray();
- Polygon aSet( (USHORT)nPoints );
+ Polygon aSet( (sal_uInt16)nPoints );
for(sal_Int32 j = 0; j < nPoints; j++)
{
Point aPoint(pPoints[j].X, pPoints[j].Y);
- aSet.SetPoint(aPoint, (USHORT)j);
+ aSet.SetPoint(aPoint, (sal_uInt16)j);
}
// Close polygon if it isn't closed already.
aSet.Optimize( POLY_OPTIMIZE_CLOSE );
@@ -1159,7 +1159,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
}
// <--
- pFmt->GetDoc()->SetFrmFmtToFly( *pFmt, *pFrmFmt, pSet, FALSE );
+ pFmt->GetDoc()->SetFrmFmtToFly( *pFmt, *pFrmFmt, pSet, sal_False );
delete pSet;
}
else
@@ -1515,12 +1515,12 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
{
drawing::PointSequenceSequence aPtSeq(aContour.Count());
drawing::PointSequence* pPSeq = aPtSeq.getArray();
- for(USHORT i = 0; i < aContour.Count(); i++)
+ for(sal_uInt16 i = 0; i < aContour.Count(); i++)
{
const Polygon& rPoly = aContour.GetObject(i);
pPSeq[i].realloc(rPoly.GetSize());
awt::Point* pPoints = pPSeq[i].getArray();
- for(USHORT j = 0; j < rPoly.GetSize(); j++)
+ for(sal_uInt16 j = 0; j < rPoly.GetSize(); j++)
{
const Point& rPoint = rPoly.GetPoint(j);
pPoints[j].X = rPoint.X();
@@ -1532,12 +1532,12 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
}
else if(pEntry->nWID == FN_UNO_IS_AUTOMATIC_CONTOUR )
{
- BOOL bValue = pNoTxt->HasAutomaticContour();
+ sal_Bool bValue = pNoTxt->HasAutomaticContour();
aAny.setValue( &bValue, ::getBooleanCppuType() );
}
else if(pEntry->nWID == FN_UNO_IS_PIXEL_CONTOUR )
{
- BOOL bValue = pNoTxt->IsPixelContour();
+ sal_Bool bValue = pNoTxt->IsPixelContour();
aAny.setValue( &bValue, ::getBooleanCppuType() );
}
else
@@ -1825,13 +1825,13 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates(
SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode();
SfxItemSet aSet(pNoTxt->GetSwAttrSet());
aSet.GetItemState(pEntry->nWID);
- if(SFX_ITEM_SET == aSet.GetItemState( pEntry->nWID, FALSE ))
+ if(SFX_ITEM_SET == aSet.GetItemState( pEntry->nWID, sal_False ))
pStates[i] = beans::PropertyState_DIRECT_VALUE;
}
}
else
{
- if(SFX_ITEM_SET == rFmtSet.GetItemState( pEntry->nWID, FALSE ))
+ if(SFX_ITEM_SET == rFmtSet.GetItemState( pEntry->nWID, sal_False ))
pStates[i] = beans::PropertyState_DIRECT_VALUE;
else
pStates[i] = beans::PropertyState_DEFAULT_VALUE;
@@ -1864,7 +1864,7 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName )
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "setPropertyToDefault: property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- BOOL bNextFrame;
+ sal_Bool bNextFrame;
if( pEntry->nWID &&
pEntry->nWID != FN_UNO_ANCHOR_TYPES &&
pEntry->nWID != FN_PARAM_LINK_DISPLAY_NAME)
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 94ee14450f08..7fc598921b72 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -562,7 +562,7 @@ throw (uno::RuntimeException)
{
vos::OGuard g(Application::GetSolarMutex());
- USHORT nObjectType = SW_SERVICE_TYPE_INDEX;
+ sal_uInt16 nObjectType = SW_SERVICE_TYPE_INDEX;
switch (m_pImpl->m_eTOXType)
{
// case TOX_INDEX: break;
@@ -990,8 +990,8 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
{
SwSections aSectArr;
pSectionFmt->GetChildSections(aSectArr,
- SORTSECT_NOT, FALSE);
- for(USHORT i = 0; i < aSectArr.Count(); i++)
+ SORTSECT_NOT, sal_False);
+ for(sal_uInt16 i = 0; i < aSectArr.Count(); i++)
{
SwSection* pSect = aSectArr[i];
if(pSect->GetType() == TOX_HEADER_SECTION)
@@ -1263,7 +1263,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
aXMarks(aMarks.Count());
uno::Reference<text::XDocumentIndexMark>* pxMarks =
aXMarks.getArray();
- for(USHORT i = 0; i < aMarks.Count(); i++)
+ for(sal_uInt16 i = 0; i < aMarks.Count(); i++)
{
pMark = aMarks.GetObject(i);
pxMarks[i] = SwXDocumentIndexMark::CreateXDocumentIndexMark(
@@ -2037,7 +2037,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
// n.b.: toxmarks must have either alternative text or an extent
if (bMark && rMark.GetAlternativeText().Len())
{
- rPam.Normalize(TRUE);
+ rPam.Normalize(sal_True);
rPam.DeleteMark();
bMark = false;
}
@@ -3293,7 +3293,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
if(SVX_TAB_ADJUST_END == aToken.eTabAlign)
{
pArr[1].Name = C2U("TabStopRightAligned");
- BOOL bTemp = sal_True;
+ sal_Bool bTemp = sal_True;
pArr[1].Value.setValue(&bTemp, ::getCppuBooleanType());
}
else
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index 765b1ae37485..dc797b93b782 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -2499,7 +2499,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
for( ; p->pName; ++p, ++i )
{
// set the name
- const SwPropNameLen& rPropNm = GetPropName( (USHORT)(long)p->pName );
+ const SwPropNameLen& rPropNm = GetPropName( (sal_uInt16)(long)p->pName );
p->pName = rPropNm.pName;
p->nNameLen = rPropNm.nNameLen;
// get the cppu type from the comphelper
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index f572b5f3e91c..5d651905728a 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -226,10 +226,10 @@ void SwUnoCursorHelper::GetTextFromPam(SwPaM & rPam, OUString & rBuffer)
SwAsciiOptions aOpt = xWrt->GetAsciiOptions();
aOpt.SetCharSet( RTL_TEXTENCODING_UNICODE );
xWrt->SetAsciiOptions( aOpt );
- xWrt->bUCS2_WithStartChar = FALSE;
+ xWrt->bUCS2_WithStartChar = sal_False;
// --> FME #i68522#
- const BOOL bOldShowProgress = xWrt->bShowProgress;
- xWrt->bShowProgress = FALSE;
+ const sal_Bool bOldShowProgress = xWrt->bShowProgress;
+ xWrt->bShowProgress = sal_False;
// <--
long lLen;
@@ -315,8 +315,8 @@ throw (lang::IllegalArgumentException)
if(pStyle.get())
{
SwFmtAutoFmt aFmt( (bPara)
- ? sal::static_int_cast< USHORT >(RES_AUTO_STYLE)
- : sal::static_int_cast< USHORT >(RES_TXTATR_AUTOFMT) );
+ ? sal::static_int_cast< sal_uInt16 >(RES_AUTO_STYLE)
+ : sal::static_int_cast< sal_uInt16 >(RES_TXTATR_AUTOFMT) );
aFmt.SetStyleHandle( pStyle );
rSet.Put(aFmt);
}
@@ -701,8 +701,8 @@ SwUnoCursorHelper::GetCurTxtFmtColl(SwPaM & rPaM, const bool bConditional)
SwPaM *pTmpCrsr = &rPaM;
do
{
- const ULONG nSttNd = pTmpCrsr->Start()->nNode.GetIndex();
- const ULONG nEndNd = pTmpCrsr->End()->nNode.GetIndex();
+ const sal_uLong nSttNd = pTmpCrsr->Start()->nNode.GetIndex();
+ const sal_uLong nEndNd = pTmpCrsr->End()->nNode.GetIndex();
if( nEndNd - nSttNd >= nMaxLookup )
{
@@ -711,7 +711,7 @@ SwUnoCursorHelper::GetCurTxtFmtColl(SwPaM & rPaM, const bool bConditional)
}
const SwNodes& rNds = rPaM.GetDoc()->GetNodes();
- for( ULONG n = nSttNd; n <= nEndNd; ++n )
+ for( sal_uLong n = nSttNd; n <= nEndNd; ++n )
{
SwTxtNode const*const pNd = rNds[ n ]->GetTxtNode();
if( pNd )
@@ -949,7 +949,7 @@ void SwXTextCursor::DeleteAndInsert(const ::rtl::OUString& rText,
SwUnoCursorHelper::SelectPam(*pUnoCrsr, true);
pCurrent->Left(rText.getLength(),
- CRSR_SKIP_CHARS, FALSE, FALSE);
+ CRSR_SKIP_CHARS, sal_False, sal_False);
}
pCurrent = static_cast<SwCursor *>(pCurrent->GetNext());
} while (pCurrent != pUnoCrsr);
@@ -1156,7 +1156,7 @@ throw (uno::RuntimeException)
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
SwUnoCursorHelper::SelectPam(rUnoCursor, Expand);
- sal_Bool bRet = rUnoCursor.Left( nCount, CRSR_SKIP_CHARS, FALSE, FALSE);
+ sal_Bool bRet = rUnoCursor.Left( nCount, CRSR_SKIP_CHARS, sal_False, sal_False);
if (CURSOR_META == m_pImpl->m_eType)
{
bRet = lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText,
@@ -1177,7 +1177,7 @@ throw (uno::RuntimeException)
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
SwUnoCursorHelper::SelectPam(rUnoCursor, Expand);
- sal_Bool bRet = rUnoCursor.Right(nCount, CRSR_SKIP_CHARS, FALSE, FALSE);
+ sal_Bool bRet = rUnoCursor.Right(nCount, CRSR_SKIP_CHARS, sal_False, sal_False);
if (CURSOR_META == m_pImpl->m_eType)
{
bRet = lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText,
@@ -1453,7 +1453,7 @@ SwXTextCursor::gotoNextWord(sal_Bool Expand) throw (uno::RuntimeException)
if (rUnoCursor.GetCntntNode() &&
(pPoint->nContent == rUnoCursor.GetCntntNode()->Len()))
{
- rUnoCursor.Right(1, CRSR_SKIP_CHARS, FALSE, FALSE);
+ rUnoCursor.Right(1, CRSR_SKIP_CHARS, sal_False, sal_False);
}
else
{
@@ -1499,14 +1499,14 @@ SwXTextCursor::gotoPreviousWord(sal_Bool Expand) throw (uno::RuntimeException)
// start of paragraph?
if (pPoint->nContent == 0)
{
- rUnoCursor.Left(1, CRSR_SKIP_CHARS, FALSE, FALSE);
+ rUnoCursor.Left(1, CRSR_SKIP_CHARS, sal_False, sal_False);
}
else
{
rUnoCursor.GoPrevWordWT( i18n::WordType::DICTIONARY_WORD );
if (pPoint->nContent == 0)
{
- rUnoCursor.Left(1, CRSR_SKIP_CHARS, FALSE, FALSE);
+ rUnoCursor.Left(1, CRSR_SKIP_CHARS, sal_False, sal_False);
}
}
@@ -2175,10 +2175,10 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
{
if (!pSetParent.get())
{
- pSetParent.reset( pSet->Clone( FALSE ) );
+ pSetParent.reset( pSet->Clone( sal_False ) );
// --> OD 2006-07-12 #i63870#
SwUnoCursorHelper::GetCrsrAttr(
- rPaM, *pSetParent, TRUE, FALSE );
+ rPaM, *pSetParent, sal_True, sal_False );
// <--
}
@@ -2216,7 +2216,7 @@ lcl_SelectParaAndReset( SwPaM &rPaM, SwDoc & rDoc,
// if we are reseting paragraph attributes, we need to select the full paragraph first
SwPosition aStart = *rPaM.Start();
SwPosition aEnd = *rPaM.End();
- ::std::auto_ptr< SwUnoCrsr > pTemp ( rDoc.CreateUnoCrsr(aStart, FALSE) );
+ ::std::auto_ptr< SwUnoCrsr > pTemp ( rDoc.CreateUnoCrsr(aStart, sal_False) );
if(!SwUnoCursorHelper::IsStartOfPara(*pTemp))
{
pTemp->MovePara(fnParaCurr, fnParaStart);
@@ -2514,7 +2514,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
// para specific attribut ranges
-static USHORT g_ParaResetableSetRange[] = {
+static sal_uInt16 g_ParaResetableSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
// --> OD 2008-02-25 #refactorlists#
@@ -2525,7 +2525,7 @@ static USHORT g_ParaResetableSetRange[] = {
};
// selection specific attribut ranges
-static USHORT g_ResetableSetRange[] = {
+static sal_uInt16 g_ResetableSetRange[] = {
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
@@ -2535,13 +2535,13 @@ static USHORT g_ResetableSetRange[] = {
};
static void
-lcl_EnumerateIds(USHORT const* pIdRange, SvUShortsSort & rWhichIds)
+lcl_EnumerateIds(sal_uInt16 const* pIdRange, SvUShortsSort & rWhichIds)
{
while (*pIdRange)
{
- const USHORT nStart = sal::static_int_cast<USHORT>(*pIdRange++);
- const USHORT nEnd = sal::static_int_cast<USHORT>(*pIdRange++);
- for (USHORT nId = nStart + 1; nId <= nEnd; ++nId)
+ const sal_uInt16 nStart = sal::static_int_cast<sal_uInt16>(*pIdRange++);
+ const sal_uInt16 nEnd = sal::static_int_cast<sal_uInt16>(*pIdRange++);
+ for (sal_uInt16 nId = nStart + 1; nId <= nEnd; ++nId)
{
rWhichIds.Insert( nId );
}
@@ -2820,17 +2820,17 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
SwSortKey* pKey1 = new SwSortKey;
pKey1->nColumnId = USHRT_MAX;
- pKey1->bIsNumeric = TRUE;
+ pKey1->bIsNumeric = sal_True;
pKey1->eSortOrder = SRT_ASCENDING;
SwSortKey* pKey2 = new SwSortKey;
pKey2->nColumnId = USHRT_MAX;
- pKey2->bIsNumeric = TRUE;
+ pKey2->bIsNumeric = sal_True;
pKey2->eSortOrder = SRT_ASCENDING;
SwSortKey* pKey3 = new SwSortKey;
pKey3->nColumnId = USHRT_MAX;
- pKey3->bIsNumeric = TRUE;
+ pKey3->bIsNumeric = sal_True;
pKey3->eSortOrder = SRT_ASCENDING;
SwSortKey* aKeys[3] = {pKey1, pKey2, pKey3};
@@ -3012,7 +3012,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
SvxLocaleToLanguage( pFields[i].CollatorLocale );
aKeys[i]->sSortType = pFields[i].CollatorAlgorithm;
aKeys[i]->nColumnId =
- static_cast<USHORT>(pFields[i].Field);
+ static_cast<sal_uInt16>(pFields[i].Field);
aKeys[i]->bIsNumeric = (pFields[i].FieldType ==
table::TableSortFieldType_NUMERIC);
aKeys[i]->eSortOrder = (pFields[i].IsAscending)
@@ -3078,7 +3078,7 @@ throw (uno::RuntimeException)
SwPosition & rEnd = *rUnoCursor.End();
SwNodeIndex aPrevIdx( rStart.nNode, -1 );
- const ULONG nOffset = rEnd.nNode.GetIndex() - rStart.nNode.GetIndex();
+ const sal_uLong nOffset = rEnd.nNode.GetIndex() - rStart.nNode.GetIndex();
const xub_StrLen nCntStt = rStart.nContent.GetIndex();
rUnoCursor.GetDoc()->SortText(rUnoCursor, aSortOpt);
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index d9334e97c841..76a42284309d 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -201,14 +201,14 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
const bool _bAtCharAnchoredObjs )
{
// _bAtCharAnchoredObjs:
- // <TRUE>: at-character anchored objects are collected
- // <FALSE>: at-paragraph anchored objects are collected
+ // <sal_True>: at-character anchored objects are collected
+ // <sal_False>: at-paragraph anchored objects are collected
// alle Rahmen, Grafiken und OLEs suchen, die an diesem Absatz
// gebunden sind
SwDoc* pDoc = rIdx.GetNode().GetDoc();
- USHORT nChkType = static_cast< USHORT >((_bAtCharAnchoredObjs)
+ sal_uInt16 nChkType = static_cast< sal_uInt16 >((_bAtCharAnchoredObjs)
? FLY_AT_CHAR : FLY_AT_PARA);
const SwCntntFrm* pCFrm;
const SwCntntNode* pCNd;
@@ -218,7 +218,7 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
{
const SwSortedObjs *pObjs = pCFrm->GetDrawObjs();
if( pObjs )
- for( USHORT i = 0; i < pObjs->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
@@ -240,8 +240,8 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
else
{
const SwSpzFrmFmts& rFmts = *pDoc->GetSpzFrmFmts();
- USHORT nSize = rFmts.Count();
- for ( USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = rFmts.Count();
+ for ( sal_uInt16 i = 0; i < nSize; i++)
{
const SwFrmFmt* pFmt = rFmts[ i ];
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
@@ -407,8 +407,8 @@ void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam,
{
SwPosition const & rStart( *pCurrent->Start() );
SwPosition const & rEnd( *pCurrent->End() );
- const ULONG nSttNd = rStart.nNode.GetIndex();
- const ULONG nEndNd = rEnd .nNode.GetIndex();
+ const sal_uLong nSttNd = rStart.nNode.GetIndex();
+ const sal_uLong nEndNd = rEnd .nNode.GetIndex();
if (nEndNd - nSttNd >= nMaxLookup)
{
@@ -419,7 +419,7 @@ void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam,
// the first node inserts the values into the get set
// all other nodes merge their values into the get set
- for (ULONG n = nSttNd; n <= nEndNd; ++n)
+ for (sal_uLong n = nSttNd; n <= nEndNd; ++n)
{
SwNode *const pNd = rPam.GetDoc()->GetNodes()[ n ];
switch (pNd->GetNodeType())
@@ -479,7 +479,7 @@ public:
/// embedded tables.
SwStartNode const*const m_pOwnStartNode;
SwTable const*const m_pOwnTable;
- const ULONG m_nEndIndex;
+ const sal_uLong m_nEndIndex;
sal_Int32 m_nFirstParaStart;
sal_Int32 m_nLastParaEnd;
bool m_bFirstParagraph;
@@ -935,7 +935,7 @@ throw (uno::RuntimeException)
m_pImpl->m_rDoc, aCursor, rText, bForceExpandHints);
SwUnoCursorHelper::SelectPam(aCursor, true);
- aCursor.Left(rText.getLength(), CRSR_SKIP_CHARS, FALSE, FALSE);
+ aCursor.Left(rText.getLength(), CRSR_SKIP_CHARS, sal_False, sal_False);
}
SetPositions(aCursor);
m_pImpl->m_rDoc.EndUndo(UNDO_INSERT, NULL);
@@ -1191,7 +1191,7 @@ lcl_IsStartNodeInFormat(const bool bHeader, SwStartNode *const pSttNode,
const SfxItemSet& rSet = pFrmFmt->GetAttrSet();
const SfxPoolItem* pItem;
if (SFX_ITEM_SET == rSet.GetItemState(
- static_cast<USHORT>(bHeader ? RES_HEADER : RES_FOOTER),
+ static_cast<sal_uInt16>(bHeader ? RES_HEADER : RES_FOOTER),
sal_True, &pItem))
{
SfxPoolItem *const pItemNonConst(const_cast<SfxPoolItem *>(pItem));
@@ -1360,7 +1360,7 @@ throw (uno::RuntimeException)
}
const SwPosition aPos(GetDoc()->GetNodes().GetEndOfContent());
const ::std::auto_ptr<SwUnoCrsr> pNewCrsr(
- m_pImpl->m_rDoc.CreateUnoCrsr(aPos, FALSE));
+ m_pImpl->m_rDoc.CreateUnoCrsr(aPos, sal_False));
if (!GetPositions(*pNewCrsr))
{
throw uno::RuntimeException();
@@ -1382,7 +1382,7 @@ SwXTextRange::createEnumeration() throw (uno::RuntimeException)
}
const SwPosition aPos(GetDoc()->GetNodes().GetEndOfContent());
::std::auto_ptr<SwUnoCrsr> pNewCrsr(
- m_pImpl->m_rDoc.CreateUnoCrsr(aPos, FALSE));
+ m_pImpl->m_rDoc.CreateUnoCrsr(aPos, sal_False));
if (!GetPositions(*pNewCrsr))
{
throw uno::RuntimeException();
@@ -1807,7 +1807,7 @@ void SwUnoCursorHelper::SetString(SwCursor & rCursor, const OUString& rString)
DBG_ASSERT( bSuccess, "DocInsertStringSplitCR" );
(void) bSuccess;
SwUnoCursorHelper::SelectPam(rCursor, true);
- rCursor.Left(rString.getLength(), CRSR_SKIP_CHARS, FALSE, FALSE);
+ rCursor.Left(rString.getLength(), CRSR_SKIP_CHARS, sal_False, sal_False);
}
pDoc->EndUndo(UNDO_INSERT, NULL);
}
@@ -1976,7 +1976,7 @@ SwXParaFrameEnumeration::SwXParaFrameEnumeration(
SwPosFlyFrms aFlyFrms;
//get all frames that are bound at paragraph or at character
rPaM.GetDoc()->GetAllFlyFmts(aFlyFrms, m_pImpl->GetCursor());
- for(USHORT i = 0; i < aFlyFrms.Count(); i++)
+ for(sal_uInt16 i = 0; i < aFlyFrms.Count(); i++)
{
SwPosFlyFrm* pPosFly = aFlyFrms[i];
SwFrmFmt *const pFrmFmt =
@@ -1996,7 +1996,7 @@ SwXParaFrameEnumeration::SwXParaFrameEnumeration(
lcl_FillFrame(*m_pImpl.get(), *m_pImpl->GetCursor(),
m_pImpl->m_Frames);
m_pImpl->GetCursor()->Right(
- 1, CRSR_SKIP_CHARS, FALSE, FALSE);
+ 1, CRSR_SKIP_CHARS, sal_False, sal_False);
}
while (*m_pImpl->GetCursor()->GetPoint() <
*m_pImpl->GetCursor()->GetMark());
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index 3b865d49bf09..0c26b7efc849 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -612,7 +612,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
//SwNode& rTxtNode = pUnoCrsr->GetPoint()->nNode.GetNode();
//const SwAttrSet& rAttrSet = ((SwTxtNode&)rTxtNode).GetSwAttrSet();
- //USHORT nAttrCount = rAttrSet.Count();
+ //sal_uInt16 nAttrCount = rAttrSet.Count();
const sal_Int32 nProps = rPropertyNames.getLength();
const OUString *pProp = rPropertyNames.getConstArray();
@@ -847,7 +847,7 @@ throw (uno::RuntimeException)
---------------------------------------------------------------------------*/
bool ::sw::GetDefaultTextContentValue(
- uno::Any& rAny, const OUString& rPropertyName, USHORT nWID)
+ uno::Any& rAny, const OUString& rPropertyName, sal_uInt16 nWID)
{
if(!nWID)
{
@@ -858,7 +858,7 @@ bool ::sw::GetDefaultTextContentValue(
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_TEXT_WRAP)))
nWID = FN_UNO_TEXT_WRAP;
else
- return FALSE;
+ return sal_False;
}
switch(nWID)
@@ -873,9 +873,9 @@ bool ::sw::GetDefaultTextContentValue(
}
break;
default:
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/*-- 11.12.98 08:12:50---------------------------------------------------
@@ -986,7 +986,7 @@ throw (beans::UnknownPropertyException)
break;
lcl_SwXParagraph_getPropertyStateDEFAULT:
default:
- if((*ppSet) && SFX_ITEM_SET == (*ppSet)->GetItemState(rEntry.nWID, FALSE))
+ if((*ppSet) && SFX_ITEM_SET == (*ppSet)->GetItemState(rEntry.nWID, sal_False))
eRet = beans::PropertyState_DIRECT_VALUE;
break;
}
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index 5b0eca4a40fa..6e68c8582d26 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -369,7 +369,7 @@ void SwXTextPortion::GetPropertyValue(
break;
case FN_UNO_IS_START:
{
- BOOL bStart = TRUE, bPut = TRUE;
+ sal_Bool bStart = sal_True, bPut = sal_True;
switch (m_ePortionType)
{
case PORTION_REFMARK_START:
@@ -386,10 +386,10 @@ void SwXTextPortion::GetPropertyValue(
case PORTION_REDLINE_END:
case PORTION_RUBY_END:
case PORTION_FIELD_END:
- bStart = FALSE;
+ bStart = sal_False;
break;
default:
- bPut = FALSE;
+ bPut = sal_False;
}
if(bPut)
rVal.setValue(&bStart, ::getBooleanCppuType());
@@ -411,7 +411,7 @@ void SwXTextPortion::GetPropertyValue(
break;
default:
beans::PropertyState eTemp;
- BOOL bDone = SwUnoCursorHelper::getCrsrPropertyValue(
+ sal_Bool bDone = SwUnoCursorHelper::getCrsrPropertyValue(
rEntry, *pUnoCrsr, &(rVal), eTemp );
if(!bDone)
{
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index bb184fd9b879..560fdc27a5b3 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -86,24 +86,24 @@ static void lcl_CreatePortions(
namespace
{
- static const BYTE BKM_TYPE_START = 0;
- static const BYTE BKM_TYPE_END = 1;
- static const BYTE BKM_TYPE_START_END = 2;
+ static const sal_uInt8 BKM_TYPE_START = 0;
+ static const sal_uInt8 BKM_TYPE_END = 1;
+ static const sal_uInt8 BKM_TYPE_START_END = 2;
struct SwXBookmarkPortion_Impl
{
Reference<XTextContent> xBookmark;
- BYTE nBkmType;
+ sal_uInt8 nBkmType;
const SwPosition aPosition;
SwXBookmarkPortion_Impl(uno::Reference<text::XTextContent> const& xMark,
- const BYTE nType, SwPosition const& rPosition)
+ const sal_uInt8 nType, SwPosition const& rPosition)
: xBookmark ( xMark )
, nBkmType ( nType )
, aPosition ( rPosition )
{
}
- ULONG getIndex ()
+ sal_uLong getIndex ()
{
return aPosition.nContent.GetIndex();
}
@@ -160,7 +160,7 @@ namespace
const SwPosition& rStartPos = pBkmk->GetMarkStart();
if(rStartPos.nNode == nOwnNode)
{
- const BYTE nType = hasOther ? BKM_TYPE_START : BKM_TYPE_START_END;
+ const sal_uInt8 nType = hasOther ? BKM_TYPE_START : BKM_TYPE_START_END;
rBkmArr.insert(SwXBookmarkPortion_ImplSharedPtr(
new SwXBookmarkPortion_Impl(
SwXBookmark::CreateXBookmark(rDoc, *pBkmk),
@@ -356,7 +356,7 @@ lcl_ExportFieldMark(
ASSERT(pUnoCrsr->End()->nContent.GetIndex() == start,
"hmm --- why is this different");
- pUnoCrsr->Right(1, CRSR_SKIP_CHARS, FALSE, FALSE);
+ pUnoCrsr->Right(1, CRSR_SKIP_CHARS, sal_False, sal_False);
if ( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
{
ASSERT(false, "cannot move cursor?");
@@ -523,7 +523,7 @@ lcl_ExportBookmark(
TextRangeList_t & rPortions,
Reference<XText> const& xParent,
const SwUnoCrsr * const pUnoCrsr,
- SwXBookmarkPortion_ImplList& rBkmArr, const ULONG nIndex)
+ SwXBookmarkPortion_ImplList& rBkmArr, const sal_uLong nIndex)
{
for ( SwXBookmarkPortion_ImplList::iterator aIter = rBkmArr.begin(), aEnd = rBkmArr.end();
aIter != aEnd; )
@@ -565,7 +565,7 @@ lcl_ExportSoftPageBreak(
TextRangeList_t & rPortions,
Reference<XText> const& xParent,
const SwUnoCrsr * const pUnoCrsr,
- SwSoftPageBreakList& rBreakArr, const ULONG nIndex)
+ SwSoftPageBreakList& rBreakArr, const sal_uLong nIndex)
{
for ( SwSoftPageBreakList::iterator aIter = rBreakArr.begin(),
aEnd = rBreakArr.end();
@@ -607,7 +607,7 @@ struct SwXRedlinePortion_Impl
{
}
- ULONG getRealIndex ()
+ sal_uLong getRealIndex ()
{
return m_bStart ? m_pRedline->Start()->nContent.GetIndex()
: m_pRedline->End() ->nContent.GetIndex();
@@ -664,7 +664,7 @@ lcl_ExportHints(
SwTxtAttr * const pAttr = pHints->GetEnd(nEndIndex);
if (nNextEnd == nCurrentIndex)
{
- const USHORT nWhich( pAttr->Which() );
+ const sal_uInt16 nWhich( pAttr->Which() );
switch (nWhich)
{
case RES_TXTATR_TOXMARK:
@@ -740,7 +740,7 @@ lcl_ExportHints(
nCurrentIndex >= (nNextStart = (*pHints->GetStart(nStartIndex)->GetStart())))
{
SwTxtAttr * const pAttr = pHints->GetStart(nStartIndex);
- USHORT nAttrWhich = pAttr->Which();
+ sal_uInt16 nAttrWhich = pAttr->Which();
if (nNextStart == nCurrentIndex)
{
switch( nAttrWhich )
@@ -748,7 +748,7 @@ lcl_ExportHints(
case RES_TXTATR_FIELD:
if(!bRightMoveForbidden)
{
- pUnoCrsr->Right(1,CRSR_SKIP_CHARS,FALSE,FALSE);
+ pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
break;
SwXTextPortion* pPortion;
@@ -762,7 +762,7 @@ lcl_ExportHints(
case RES_TXTATR_FLYCNT :
if(!bRightMoveForbidden)
{
- pUnoCrsr->Right(1,CRSR_SKIP_CHARS,FALSE,FALSE);
+ pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
break; // Robust #i81708 content in covered cells
pUnoCrsr->Exchange();
@@ -774,7 +774,7 @@ lcl_ExportHints(
{
if(!bRightMoveForbidden)
{
- pUnoCrsr->Right(1,CRSR_SKIP_CHARS,FALSE,FALSE);
+ pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
break;
SwXTextPortion* pPortion;
@@ -794,7 +794,7 @@ lcl_ExportHints(
{
if (bIsPoint)
{
- pUnoCrsr->Right(1,CRSR_SKIP_CHARS,FALSE,FALSE);
+ pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
}
Reference<XTextRange> xTmp =
(RES_TXTATR_REFMARK == nAttrWhich)
@@ -804,7 +804,7 @@ lcl_ExportHints(
xParent, pUnoCrsr, *pAttr, false);
if (bIsPoint) // consume CH_TXTATR!
{
- pUnoCrsr->Normalize(FALSE);
+ pUnoCrsr->Normalize(sal_False);
pUnoCrsr->DeleteMark();
xRef = xTmp;
}
@@ -829,7 +829,7 @@ lcl_ExportHints(
{
if (!bRightMoveForbidden)
{
- pUnoCrsr->Right(1,CRSR_SKIP_CHARS,FALSE,FALSE);
+ pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
o_rbCursorMoved = true;
// only if the end is included in selection!
if ((i_nEndPos < 0) ||
@@ -922,7 +922,7 @@ void lcl_MoveCursor( SwUnoCrsr * const pUnoCrsr,
if (nMovePos > nCurrentIndex)
{
// pUnoCrsr->Right(nMovePos - nCurrentIndex);
- pUnoCrsr->GetPoint()->nContent = static_cast<USHORT>(nMovePos);
+ pUnoCrsr->GetPoint()->nContent = static_cast<sal_uInt16>(nMovePos);
}
}
@@ -932,14 +932,14 @@ lcl_FillRedlineArray(SwDoc const & rDoc, SwUnoCrsr const & rUnoCrsr,
SwXRedlinePortion_ImplList& rRedArr )
{
const SwRedlineTbl& rRedTbl = rDoc.GetRedlineTbl();
- USHORT nRedTblCount = rRedTbl.Count();
+ sal_uInt16 nRedTblCount = rRedTbl.Count();
if ( nRedTblCount > 0 )
{
const SwPosition* pStart = rUnoCrsr.GetPoint();
const SwNodeIndex nOwnNode = pStart->nNode;
- for(USHORT nRed = 0; nRed < nRedTblCount; nRed++)
+ for(sal_uInt16 nRed = 0; nRed < nRedTblCount; nRed++)
{
const SwRedline* pRedline = rRedTbl[nRed];
const SwPosition* pRedStart = pRedline->Start();
@@ -973,7 +973,7 @@ lcl_ExportRedline(
TextRangeList_t & rPortions,
Reference<XText> const& xParent,
const SwUnoCrsr * const pUnoCrsr,
- SwXRedlinePortion_ImplList& rRedlineArr, const ULONG nIndex)
+ SwXRedlinePortion_ImplList& rRedlineArr, const sal_uLong nIndex)
{
// MTG: 23/11/05: We want this loop to iterate over all red lines in this
@@ -982,7 +982,7 @@ lcl_ExportRedline(
aIter != aEnd; )
{
SwXRedlinePortion_ImplSharedPtr pPtr = (*aIter );
- ULONG nRealIndex = pPtr->getRealIndex();
+ sal_uLong nRealIndex = pPtr->getRealIndex();
// MTG: 23/11/05: If there are elements before nIndex, remove them
if ( nIndex > nRealIndex )
rRedlineArr.erase ( aIter++ );
@@ -1010,7 +1010,7 @@ lcl_ExportBkmAndRedline(
SwXBookmarkPortion_ImplList& rBkmArr,
SwXRedlinePortion_ImplList& rRedlineArr,
SwSoftPageBreakList& rBreakArr,
- const ULONG nIndex)
+ const sal_uLong nIndex)
{
if (rBkmArr.size())
lcl_ExportBookmark(rPortions, xParent, pUnoCrsr, rBkmArr, nIndex);
@@ -1100,7 +1100,7 @@ lcl_CreatePortions(
GetTxt().Len()), "Incorrect start position" );
// ??? should this be i_nStartPos - current position ?
pUnoCrsr->Right(static_cast<xub_StrLen>(i_nStartPos),
- CRSR_SKIP_CHARS, FALSE, FALSE);
+ CRSR_SKIP_CHARS, sal_False, sal_False);
}
FieldMarks_t FieldMarks;
@@ -1122,7 +1122,7 @@ lcl_CreatePortions(
{
if (pUnoCrsr->HasMark())
{
- pUnoCrsr->Normalize(FALSE);
+ pUnoCrsr->Normalize(sal_False);
pUnoCrsr->DeleteMark();
}
diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx
index 049ccfe42ed7..9f2c9feeae1c 100644
--- a/sw/source/core/unocore/unoprnms.cxx
+++ b/sw/source/core/unocore/unoprnms.cxx
@@ -781,11 +781,11 @@ const SwPropNameTab aPropNameTab = {
/* 0739 UNO_NAME_NESTED_TEXT_CONTENT */ {MAP_CHAR_LEN("NestedTextContent")},
};
-const SwPropNameLen& SwGetPropName( USHORT nId )
+const SwPropNameLen& SwGetPropName( sal_uInt16 nId )
{
return GetPropName( nId );
}
-const SwPropNameLen& GetPropName( USHORT nId )
+const SwPropNameLen& GetPropName( sal_uInt16 nId )
{
DBG_ASSERT( SW_PROPNAME_BEGIN <= nId && nId < SW_PROPNAME_END,
"GetPropName(): Wrong index" );
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index 7f5efadada39..9e9d042c519d 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -218,7 +218,7 @@ sal_Bool SwXRedlineText::hasElements( ) throw(uno::RuntimeException)
---------------------------------------------------------------------------*/
SwXRedlinePortion::SwXRedlinePortion( const SwRedline* pRed,
const SwUnoCrsr* pPortionCrsr,
- uno::Reference< text::XText > xParent, BOOL bStart) :
+ uno::Reference< text::XText > xParent, sal_Bool bStart) :
SwXTextPortion(pPortionCrsr, xParent, bStart ? PORTION_REDLINE_START : PORTION_REDLINE_END),
// SwXText(pPortionCrsr->GetDoc(), CURSOR_REDLINE),
// SwXRedlineText(pPortionCrsr->GetDoc(), *pRed->GetContentIdx()),
@@ -328,8 +328,8 @@ void SwXRedlinePortion::Validate() throw( uno::RuntimeException )
//search for the redline
SwDoc* pDoc = pUnoCrsr->GetDoc();
const SwRedlineTbl& rRedTbl = pDoc->GetRedlineTbl();
- sal_Bool bFound = FALSE;
- for(USHORT nRed = 0; nRed < rRedTbl.Count() && !bFound; nRed++)
+ sal_Bool bFound = sal_False;
+ for(sal_uInt16 nRed = 0; nRed < rRedTbl.Count() && !bFound; nRed++)
bFound = pRedline == rRedTbl[nRed];
if(!bFound)
throw uno::RuntimeException();
@@ -555,14 +555,14 @@ uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
if(!pDoc)
throw uno::RuntimeException();
uno::Any aRet;
- BOOL bStart = rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_START));
+ sal_Bool bStart = rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_START));
if(bStart ||
rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_END)))
{
uno::Reference<XInterface> xRet;
SwNode* pNode = pRedline->GetNode();
if(!bStart && pRedline->HasMark())
- pNode = pRedline->GetNode(FALSE);
+ pNode = pRedline->GetNode(sal_False);
switch(pNode->GetNodeType())
{
case ND_SECTIONNODE:
diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx
index 91fbcfa0f5f7..774e9732e949 100644
--- a/sw/source/core/unocore/unoredlines.cxx
+++ b/sw/source/core/unocore/unoredlines.cxx
@@ -84,7 +84,7 @@ uno::Any SwXRedlines::getByIndex(sal_Int32 nIndex)
uno::Any aRet;
if(rRedTbl.Count() > nIndex && nIndex >= 0)
{
- uno::Reference <beans::XPropertySet> xRet = SwXRedlines::GetObject( *rRedTbl.GetObject((USHORT)nIndex), *GetDoc() );
+ uno::Reference <beans::XPropertySet> xRet = SwXRedlines::GetObject( *rRedTbl.GetObject((sal_uInt16)nIndex), *GetDoc() );
aRet <<= xRet;
}
else
@@ -130,11 +130,11 @@ OUString SwXRedlines::getImplementationName(void) throw( uno::RuntimeException )
/*-- 11.01.01 15:28:56---------------------------------------------------
-----------------------------------------------------------------------*/
-BOOL SwXRedlines::supportsService(const rtl::OUString& /*ServiceName*/)
+sal_Bool SwXRedlines::supportsService(const rtl::OUString& /*ServiceName*/)
throw( uno::RuntimeException )
{
DBG_ERROR("not implemented");
- return FALSE;
+ return sal_False;
}
/*-- 11.01.01 15:28:57---------------------------------------------------
@@ -181,7 +181,7 @@ SwXRedlineEnumeration::~SwXRedlineEnumeration()
/*-- 12.01.01 15:06:10---------------------------------------------------
-----------------------------------------------------------------------*/
-BOOL SwXRedlineEnumeration::hasMoreElements(void) throw( uno::RuntimeException )
+sal_Bool SwXRedlineEnumeration::hasMoreElements(void) throw( uno::RuntimeException )
{
if(!pDoc)
throw uno::RuntimeException();
@@ -213,9 +213,9 @@ rtl::OUString SwXRedlineEnumeration::getImplementationName(void) throw( uno::Run
/*-- 12.01.01 15:06:10---------------------------------------------------
-----------------------------------------------------------------------*/
-BOOL SwXRedlineEnumeration::supportsService(const rtl::OUString& /*ServiceName*/) throw( uno::RuntimeException )
+sal_Bool SwXRedlineEnumeration::supportsService(const rtl::OUString& /*ServiceName*/) throw( uno::RuntimeException )
{
- return FALSE;
+ return sal_False;
}
/*-- 12.01.01 15:06:11---------------------------------------------------
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 25ce3ec6c441..1bb59d0eee65 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -1068,7 +1068,7 @@ SwXMeta::dispose() throw (uno::RuntimeException)
void SAL_CALL
SwXMeta::AttachImpl(const uno::Reference< text::XTextRange > & i_xTextRange,
- const USHORT i_nWhich)
+ const sal_uInt16 i_nWhich)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
vos::OGuard g(Application::GetSolarMutex());
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 2810b500ea4b..18884219082d 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -450,7 +450,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
{
pRet->CreateLink(CREATE_CONNECT);
}
- pRet->SetUpdateType( static_cast< USHORT >(
+ pRet->SetUpdateType( static_cast< sal_uInt16 >(
(m_pImpl->m_pProps->m_bUpdateType) ?
sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL) );
}
@@ -560,7 +560,7 @@ lcl_UpdateLinkType(SwSection & rSection, bool const bLinkUpdateAlways = true)
{
rSection.CreateLink(CREATE_CONNECT);
}
- rSection.SetUpdateType( static_cast< USHORT >((bLinkUpdateAlways)
+ rSection.SetUpdateType( static_cast< sal_uInt16 >((bLinkUpdateAlways)
? sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL) );
}
}
@@ -1217,11 +1217,11 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
const SwRedlineTbl& rRedTbl =
pFmt->GetDoc()->GetRedlineTbl();
- for (USHORT nRed = 0; nRed < rRedTbl.Count(); nRed++)
+ for (sal_uInt16 nRed = 0; nRed < rRedTbl.Count(); nRed++)
{
const SwRedline* pRedline = rRedTbl[nRed];
- SwNode const*const pRedPointNode = pRedline->GetNode(TRUE);
- SwNode const*const pRedMarkNode = pRedline->GetNode(FALSE);
+ SwNode const*const pRedPointNode = pRedline->GetNode(sal_True);
+ SwNode const*const pRedMarkNode = pRedline->GetNode(sal_False);
if ((pRedPointNode == pSectNode) ||
(pRedMarkNode == pSectNode))
{
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index ab486b71ed04..b175cbc709d4 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -310,7 +310,7 @@ OUString SwXFootnoteProperties::getImplementationName(void) throw( RuntimeExcept
/* -----------------------------06.04.00 11:43--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXFootnoteProperties::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXFootnoteProperties::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.FootnoteSettings") == rServiceName;
}
@@ -381,7 +381,7 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons
break;
case WID_NUMBERING_TYPE :
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
if(nTmp >= 0 &&
(nTmp <= SVX_NUM_ARABIC ||
@@ -393,14 +393,14 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons
break;
case WID_START_AT:
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
aFtnInfo.nFtnOffset = nTmp;
}
break;
case WID_FOOTNOTE_COUNTING :
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
switch(nTmp)
{
@@ -645,7 +645,7 @@ OUString SwXEndnoteProperties::getImplementationName(void) throw( RuntimeExcepti
/* -----------------------------06.04.00 11:45--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXEndnoteProperties::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXEndnoteProperties::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.FootnoteSettings") == rServiceName;
}
@@ -717,14 +717,14 @@ void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const
break;
case WID_NUMBERING_TYPE :
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
aEndInfo.aFmt.SetNumberingType(nTmp);
}
break;
case WID_START_AT:
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
aEndInfo.nFtnOffset = nTmp;
}
@@ -900,7 +900,7 @@ OUString SwXLineNumberingProperties::getImplementationName(void) throw( RuntimeE
/* -----------------------------06.04.00 11:47--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXLineNumberingProperties::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXLineNumberingProperties::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.LineNumberingProperties") == rServiceName;
}
@@ -973,7 +973,7 @@ void SwXLineNumberingProperties::setPropertyValue(
case WID_NUMBERING_TYPE :
{
SvxNumberType aNumType(aInfo.GetNumType());
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
aNumType.SetNumberingType(nTmp);
aInfo.SetNumType(aNumType);
@@ -981,7 +981,7 @@ void SwXLineNumberingProperties::setPropertyValue(
break;
case WID_NUMBER_POSITION :
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
switch(nTmp)
{
@@ -1002,17 +1002,17 @@ void SwXLineNumberingProperties::setPropertyValue(
break;
case WID_DISTANCE :
{
- INT32 nVal = 0;
+ sal_Int32 nVal = 0;
aValue >>= nVal;
- INT32 nTmp = MM100_TO_TWIP(nVal);
+ sal_Int32 nTmp = MM100_TO_TWIP(nVal);
if (nTmp > USHRT_MAX)
nTmp = USHRT_MAX;
- aInfo.SetPosFromLeft( static_cast< USHORT >(nTmp) );
+ aInfo.SetPosFromLeft( static_cast< sal_uInt16 >(nTmp) );
}
break;
case WID_INTERVAL :
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
if( nTmp > 0)
aInfo.SetCountBy(nTmp);
@@ -1027,7 +1027,7 @@ void SwXLineNumberingProperties::setPropertyValue(
break;
case WID_SEPARATOR_INTERVAL:
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
if( nTmp >= 0)
aInfo.SetDividerCountBy(nTmp);
@@ -1237,7 +1237,7 @@ OUString SwXNumberingRules::getImplementationName(void) throw( RuntimeException
/* -----------------------------06.04.00 11:47--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXNumberingRules::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXNumberingRules::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.NumberingRules") == rServiceName;
}
@@ -1260,7 +1260,7 @@ SwXNumberingRules::SwXNumberingRules(const SwNumRule& rRule) :
pDocShell(0),
pNumRule(new SwNumRule(rRule)),
m_pPropertySet(GetNumberingRulesSet()),
- bOwnNumRuleCreated(TRUE)
+ bOwnNumRuleCreated(sal_True)
{
sal_uInt16 i;
@@ -1292,7 +1292,7 @@ SwXNumberingRules::SwXNumberingRules(SwDocShell& rDocSh) :
pDocShell(&rDocSh),
pNumRule(0),
m_pPropertySet(GetNumberingRulesSet()),
- bOwnNumRuleCreated(FALSE)
+ bOwnNumRuleCreated(sal_False)
{
pDocShell->GetDoc()->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
}
@@ -1304,7 +1304,7 @@ SwXNumberingRules::SwXNumberingRules(SwDoc& rDoc) :
pDocShell(0),
pNumRule(0),
m_pPropertySet(GetNumberingRulesSet()),
- bOwnNumRuleCreated(FALSE)
+ bOwnNumRuleCreated(sal_False)
{
rDoc.GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
sCreatedNumRuleName = rDoc.GetUniqueNumRuleName();
@@ -1312,7 +1312,7 @@ SwXNumberingRules::SwXNumberingRules(SwDoc& rDoc) :
sal_uInt16 nIndex =
#endif
// --> OD 2008-02-11 #newlistlevelattrs#
- rDoc.MakeNumRule( sCreatedNumRuleName, 0, FALSE,
+ rDoc.MakeNumRule( sCreatedNumRuleName, 0, sal_False,
// --> OD 2008-06-06 #i89178#
numfunc::GetDefaultPositionAndSpaceMode() );
// <--
@@ -1822,7 +1822,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
SvxBrushItem* pSetBrush = 0;
Size* pSetSize = 0;
SwFmtVertOrient* pSetVOrient = 0;
- BOOL bCharStyleNameSet = FALSE;
+ sal_Bool bCharStyleNameSet = sal_False;
for(sal_uInt16 i = 0; i < nPropNameCount && !bExcept && !bWrongArg; i++)
{
@@ -1850,7 +1850,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
sal_Int16 nSet = 0;
pData->aVal >>= nSet;
if(nSet >= 0 && MAXLEVEL >= nSet)
- aFmt.SetIncludeUpperLevels( static_cast< BYTE >(nSet) );
+ aFmt.SetIncludeUpperLevels( static_cast< sal_uInt8 >(nSet) );
}
break;
case 2: //"Prefix",
@@ -1869,7 +1869,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
break;
case 4: //"CharStyleName",
{
- bCharStyleNameSet = TRUE;
+ bCharStyleNameSet = sal_True;
OUString uTmp;
pData->aVal >>= uTmp;
String sCharFmtName;
@@ -1921,7 +1921,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
break;
case 5: //"StartWith",
{
- INT16 nVal = 0;
+ sal_Int16 nVal = 0;
pData->aVal >>= nVal;
aFmt.SetStart(nVal);
}
@@ -2282,13 +2282,13 @@ void SwXNumberingRules::setPropertyValue( const OUString& rPropertyName, const A
if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_AUTOMATIC)))
{
- BOOL bVal = *(sal_Bool*)rValue.getValue();
+ sal_Bool bVal = *(sal_Bool*)rValue.getValue();
if(!pCreatedRule)
pDocRule ? pDocRule->SetAutoRule(bVal) : pNumRule->SetAutoRule(bVal);
}
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_CONTINUOUS_NUMBERING)))
{
- BOOL bVal = *(sal_Bool*)rValue.getValue();
+ sal_Bool bVal = *(sal_Bool*)rValue.getValue();
pDocRule ? pDocRule->SetContinusNum(bVal) :
pCreatedRule ? pCreatedRule->SetContinusNum(bVal) : pNumRule->SetContinusNum(bVal);
}
@@ -2299,13 +2299,13 @@ void SwXNumberingRules::setPropertyValue( const OUString& rPropertyName, const A
}
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_ABSOLUTE_MARGINS)))
{
- BOOL bVal = *(sal_Bool*)rValue.getValue();
+ sal_Bool bVal = *(sal_Bool*)rValue.getValue();
pDocRule ? pDocRule->SetAbsSpaces(bVal) :
pCreatedRule ? pCreatedRule->SetAbsSpaces(bVal) : pNumRule->SetAbsSpaces(bVal);
}
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_NUMBERING_IS_OUTLINE)))
{
- BOOL bVal = *(sal_Bool*)rValue.getValue();
+ sal_Bool bVal = *(sal_Bool*)rValue.getValue();
SwNumRuleType eNumRuleType = bVal ? OUTLINE_RULE : NUM_RULE;
pDocRule ? pDocRule->SetRuleType(eNumRuleType) :
pCreatedRule ? pCreatedRule->SetRuleType(eNumRuleType) : pNumRule->SetRuleType(eNumRuleType);
@@ -2347,24 +2347,24 @@ Any SwXNumberingRules::getPropertyValue( const OUString& rPropertyName )
if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_AUTOMATIC)))
{
- BOOL bVal = pRule->IsAutoRule();
+ sal_Bool bVal = pRule->IsAutoRule();
aRet.setValue(&bVal, ::getBooleanCppuType());
}
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_CONTINUOUS_NUMBERING)))
{
- BOOL bVal = pRule->IsContinusNum();
+ sal_Bool bVal = pRule->IsContinusNum();
aRet.setValue(&bVal, ::getBooleanCppuType());
}
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_NAME)))
aRet <<= OUString(pRule->GetName());
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_ABSOLUTE_MARGINS)))
{
- BOOL bVal = pRule->IsAbsSpaces();
+ sal_Bool bVal = pRule->IsAbsSpaces();
aRet.setValue(&bVal, ::getBooleanCppuType());
}
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_NUMBERING_IS_OUTLINE)))
{
- BOOL bVal = pRule->IsOutlineRule();
+ sal_Bool bVal = pRule->IsOutlineRule();
aRet.setValue(&bVal, ::getBooleanCppuType());
}
// --> OD 2008-04-23 #refactorlists#
@@ -2466,7 +2466,7 @@ OUString SwXChapterNumbering::getImplementationName(void) throw( RuntimeExceptio
/* -----------------------------06.04.00 11:47--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXChapterNumbering::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXChapterNumbering::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
String sServiceName(rServiceName);
return sServiceName.EqualsAscii("com.sun.star.text.ChapterNumbering") ||
@@ -2510,7 +2510,7 @@ OUString SwXTextColumns::getImplementationName(void) throw( RuntimeException )
/* -----------------------------06.04.00 11:47--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTextColumns::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXTextColumns::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return C2U("com.sun.star.text.TextColumns") == rServiceName;
}
@@ -2550,7 +2550,7 @@ SwXTextColumns::SwXTextColumns(const SwFmtCol& rFmtCol) :
bIsAutomaticWidth(rFmtCol.IsOrtho()),
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_COLUMS))
{
- USHORT nItemGutterWidth = rFmtCol.GetGutterWidth();
+ sal_uInt16 nItemGutterWidth = rFmtCol.GetGutterWidth();
nAutoDistance = bIsAutomaticWidth ?
USHRT_MAX == nItemGutterWidth ? DEF_GUTTER_WIDTH : (sal_Int32)nItemGutterWidth
: 0;
diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx
index 27eadadc6633..0283773062ec 100644
--- a/sw/source/core/unocore/unosrch.cxx
+++ b/sw/source/core/unocore/unosrch.cxx
@@ -596,7 +596,7 @@ void SwXTextSearch::setPropertyValue(const OUString& rPropertyName, const uno::A
{
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw beans::PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- sal_Bool bVal = FALSE;
+ sal_Bool bVal = sal_False;
if(aValue.getValueType() == ::getBooleanCppuType())
bVal = *(sal_Bool*)aValue.getValue();
switch(pEntry->nWID)
@@ -770,7 +770,7 @@ OUString SwXTextSearch::getImplementationName(void) throw( uno::RuntimeException
/* -----------------------------19.04.00 14:43--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTextSearch::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXTextSearch::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.util.SearchDescriptor") == rServiceName ||
C2U("com.sun.star.util.ReplaceDescriptor") == rServiceName;
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 252be1efa9ba..1f20fe678344 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -207,7 +207,7 @@ OUString SwXStyleFamilies::getImplementationName(void) throw( uno::RuntimeExcept
/* -----------------------------06.04.00 11:24--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXStyleFamilies::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXStyleFamilies::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.style.StyleFamilies") == rServiceName;
}
@@ -441,7 +441,7 @@ void SwXStyleFamilies::loadStylesFromURL(const OUString& rURL,
aOpt.SetNumRules( bLoadStyleNumbering );
aOpt.SetMerge( !bLoadStyleOverwrite );
- ULONG nErr = pDocShell->LoadStylesFromFile( rURL, aOpt, TRUE );
+ sal_uLong nErr = pDocShell->LoadStylesFromFile( rURL, aOpt, sal_True );
if( nErr )
throw io::IOException();
}
@@ -485,7 +485,7 @@ OUString SwXStyleFamily::getImplementationName(void) throw( uno::RuntimeExceptio
/* -----------------------------06.04.00 11:24--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXStyleFamily::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXStyleFamily::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.style.StyleFamily") == rServiceName;
}
@@ -648,7 +648,7 @@ sal_Int32 lcl_GetCountOrName ( const SwDoc &rDoc, SfxStyleFamily eFamily, String
sal_uInt16 nBaseCount = RES_POOLNUMRULE_END - RES_POOLNUMRULE_BEGIN;
nIndex = nIndex - nBaseCount;
const SwNumRuleTbl& rNumTbl = rDoc.GetNumRuleTbl();
- for(USHORT i = 0; i < rNumTbl.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rNumTbl.Count(); ++i)
{
const SwNumRule& rRule = *rNumTbl[ i ];
if( rRule.IsAutoRule() )
@@ -1303,9 +1303,9 @@ OUString SwXStyle::getImplementationName(void) throw( uno::RuntimeException )
/* -----------------------------06.04.00 11:24--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXStyle::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXStyle::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
- BOOL bRet = C2U("com.sun.star.style.Style") == rServiceName;
+ sal_Bool bRet = C2U("com.sun.star.style.Style") == rServiceName;
if(!bRet && SFX_STYLE_FAMILY_CHAR == eFamily)
bRet = !rServiceName.compareToAscii("com.sun.star.style.CharacterStyle")||
!rServiceName.compareToAscii("com.sun.star.style.CharacterProperties")||
@@ -1370,7 +1370,7 @@ uno::Sequence< OUString > SwXStyle::getSupportedServiceNames(void) throw( uno::R
/*-- 17.12.98 08:26:49---------------------------------------------------
-----------------------------------------------------------------------*/
-SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, BOOL bConditional) :
+SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, sal_Bool bConditional) :
m_pDoc( pDoc ),
pBasePool(0),
eFamily(eFam),
@@ -1599,7 +1599,7 @@ void SwXStyle::setParentStyle(const OUString& rParentStyle)
if(pBasePool)
{
pBasePool->SetSearchMask(eFamily);
- BOOL bExcept = FALSE;
+ sal_Bool bExcept = sal_False;
SfxStyleSheetBase* pBase = pBasePool->Find(sStyleName);
if(pBase)
{
@@ -1612,7 +1612,7 @@ void SwXStyle::setParentStyle(const OUString& rParentStyle)
}
}
else
- bExcept = TRUE;
+ bExcept = sal_True;
if(bExcept)
throw uno::RuntimeException();
}
@@ -2026,7 +2026,7 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
break;
case FN_UNO_IS_AUTO_UPDATE:
{
- BOOL bAuto = *(sal_Bool*)rValue.getValue();
+ sal_Bool bAuto = *(sal_Bool*)rValue.getValue();
if(SFX_STYLE_FAMILY_PARA == eFamily)
rBase.mxNewBase->GetCollection()->SetAutoUpdateFmt(bAuto);
else if(SFX_STYLE_FAMILY_FRAME == eFamily)
@@ -2046,7 +2046,7 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
sal_Bool bFailed = sal_False;
SwCondCollItem aCondItem;
- for(USHORT i = 0; i < nLen; i++)
+ for(sal_uInt16 i = 0; i < nLen; i++)
{
OUString aTmp;
if ((pSeq[i].Value >>= aTmp))
@@ -2329,7 +2329,7 @@ uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
uno::Any aRet;
if(FN_UNO_IS_PHYSICAL == rEntry.nWID)
{
- BOOL bPhys = pBase != 0;
+ sal_Bool bPhys = pBase != 0;
if(pBase)
{
bPhys = ((SwDocStyleSheet*)pBase)->IsPhysical();
@@ -2337,7 +2337,7 @@ uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
if( bPhys && SFX_STYLE_FAMILY_CHAR == eFamily &&
((SwDocStyleSheet*)pBase)->GetCharFmt() &&
((SwDocStyleSheet*)pBase)->GetCharFmt()->IsDefault() )
- bPhys = FALSE;
+ bPhys = sal_False;
}
aRet.setValue(&bPhys, ::getBooleanCppuType());
}
@@ -2376,7 +2376,7 @@ uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
//case FN_UNO_DEFAULT_OUTLINE_LEVEL: //#outline level,removed by zahojianwei
//{
// DBG_ASSERT( SFX_STYLE_FAMILY_PARA == eFamily, "only paras" );
- // BYTE nLevel = rBase.mxNewBase->GetCollection()->GetOutlineLevel();
+ // sal_uInt8 nLevel = rBase.mxNewBase->GetCollection()->GetOutlineLevel();
// if( nLevel != NO_NUMBERING )
// aRet <<= static_cast<sal_Int8>( nLevel );
//}
@@ -2415,7 +2415,7 @@ uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
break;
case FN_UNO_IS_AUTO_UPDATE:
{
- BOOL bAuto = FALSE;
+ sal_Bool bAuto = sal_False;
if(SFX_STYLE_FAMILY_PARA == eFamily)
bAuto = rBase.mxNewBase->GetCollection()->IsAutoUpdateFmt();
else if(SFX_STYLE_FAMILY_FRAME == eFamily)
@@ -2439,7 +2439,7 @@ uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
SwFmt *pFmt = ((SwDocStyleSheet*)pBase)->GetCollection();
const CommandStruct *pCmds = SwCondCollItem::GetCmds();
- for (USHORT n = 0; n < COND_COMMAND_COUNT; ++n)
+ for (sal_uInt16 n = 0; n < COND_COMMAND_COUNT; ++n)
{
String aStyleName;
@@ -2795,7 +2795,7 @@ uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates(
|| rPropName.EqualsAscii("Footer", 0, 6)))
{
sal_uInt16 nResId = lcl_ConvertFNToRES(pEntry->nWID);
- BOOL bFooter = rPropName.EqualsAscii("Footer", 0, 6);
+ sal_Bool bFooter = rPropName.EqualsAscii("Footer", 0, 6);
const SvxSetItem* pSetItem;
if(SFX_ITEM_SET == aSet.GetItemState(
bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET,
@@ -3397,12 +3397,12 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
}
if(aBaseImpl.HasItemSet())
{
- BOOL bDoesUndo = GetDoc()->DoesUndo();
+ sal_Bool bDoesUndo = GetDoc()->DoesUndo();
if( bDoesUndo )
{
// Fix i64460: as long as Undo of page styles with header/footer causes trouble...
GetDoc()->DelAllUndoObj();
- GetDoc()->DoUndo( FALSE );
+ GetDoc()->DoUndo( sal_False );
}
aBaseImpl.mxNewBase->SetItemSet(aBaseImpl.GetItemSet());
GetDoc()->DoUndo( bDoesUndo );
@@ -3530,7 +3530,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
case FN_UNO_HEADER_ON:
{
//falls das SetItem nicht da ist, dann ist der Wert sal_False
- BOOL bRet = sal_False;
+ sal_Bool bRet = sal_False;
pRet[nProp].setValue(&bRet, ::getCppuBooleanType());
nRes = SID_ATTR_PAGE_ON;
}
@@ -3710,7 +3710,7 @@ void SwXPageStyle::setPropertyValue(const OUString& rPropertyName, const uno::An
}
SwXFrameStyle::SwXFrameStyle ( SwDoc *pDoc )
-: SwXStyle ( pDoc, SFX_STYLE_FAMILY_FRAME, FALSE)
+: SwXStyle ( pDoc, SFX_STYLE_FAMILY_FRAME, sal_False)
{
}
/* -----------------------------15.12.00 15:45--------------------------------
@@ -3907,7 +3907,7 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
{
if( !pDocShell )
throw uno::RuntimeException();
- const USHORT* pRange = 0;
+ const sal_uInt16* pRange = 0;
const SfxItemPropertySet* pPropSet = 0;
switch( eFamily )
{
@@ -3991,7 +3991,7 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAut
// special case for ruby auto styles:
if ( IStyleAccess::AUTO_STYLE_RUBY == eFam )
{
- std::set< std::pair< USHORT, USHORT > > aRubyMap;
+ std::set< std::pair< sal_uInt16, sal_uInt16 > > aRubyMap;
SwAttrPool& rAttrPool = pDoc->GetAttrPool();
sal_uInt32 nCount = rAttrPool.GetItemCount2( RES_TXTATR_CJK_RUBY );
@@ -4000,7 +4000,7 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAut
const SwFmtRuby* pItem = static_cast<const SwFmtRuby*>(rAttrPool.GetItem2( RES_TXTATR_CJK_RUBY, nI ));
if ( pItem && pItem->GetTxtRuby() )
{
- std::pair< USHORT, USHORT > aPair( pItem->GetPosition(), pItem->GetAdjustment() );
+ std::pair< sal_uInt16, sal_uInt16 > aPair( pItem->GetPosition(), pItem->GetAdjustment() );
if ( aRubyMap.find( aPair ) == aRubyMap.end() )
{
aRubyMap.insert( aPair );
@@ -4461,12 +4461,12 @@ uno::Sequence< beans::PropertyValue > SwXAutoStyle::getProperties() throw (uno::
PropertyEntryVector_t aPropVector = pMap->getPropertyEntries();
// struct compareWhichIds
// {
-// bool operator()(const USHORT w1, const USHORT w2) const
+// bool operator()(const sal_uInt16 w1, const sal_uInt16 w2) const
// {
// return w1 < w2;
// }
// };
-// typedef std::map<const USHORT, SfxItemPropertyNamedEntry, compareWhichIds> PropertyMap_t;
+// typedef std::map<const sal_uInt16, SfxItemPropertyNamedEntry, compareWhichIds> PropertyMap_t;
// PropertyMap_t aPropMap;
// aPropMap.reserve( aPropVector.size() );
// PropertyEntryVector_t::const_iterator aIt = aPropertyEntries.begin();
@@ -4482,7 +4482,7 @@ uno::Sequence< beans::PropertyValue > SwXAutoStyle::getProperties() throw (uno::
while ( pItem )
{
- const USHORT nWID = pItem->Which();
+ const sal_uInt16 nWID = pItem->Which();
// PropertyMap_t::const_iterator aMapIt = aPropMap[nWID];
// if( aMapIt != aPropMap.getEnd() )
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 856d5e0b44bb..7a8d9f175267 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -166,7 +166,7 @@ void lcl_SetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry* pE
sal_Int32 nRepeat = 0;
aValue >>= nRepeat;
if( nRepeat >= 0 && nRepeat < USHRT_MAX )
- pFmt->GetDoc()->SetRowsToRepeat( *pTable, (USHORT) nRepeat );
+ pFmt->GetDoc()->SetRowsToRepeat( *pTable, (sal_uInt16) nRepeat );
}
}
}
@@ -188,7 +188,7 @@ void lcl_SetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry* pE
sal_Int16 nSet = 0;
aValue >>= nSet;
if(nSet && nSet <=100)
- aSz.SetWidthPercent( (BYTE)nSet );
+ aSz.SetWidthPercent( (sal_uInt8)nSet );
}
else if(FN_TABLE_IS_RELATIVE_WIDTH == pEntry->nWID)
{
@@ -237,10 +237,10 @@ uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry
case FN_TABLE_HEADLINE_COUNT:
{
SwTable* pTable = SwTable::FindTable( pFmt );
- USHORT nRepeat = pTable->GetRowsToRepeat();
+ sal_uInt16 nRepeat = pTable->GetRowsToRepeat();
if(pEntry->nWID == FN_TABLE_HEADLINE_REPEAT)
{
- BOOL bTemp = nRepeat > 0;
+ sal_Bool bTemp = nRepeat > 0;
aRet.setValue(&bTemp, ::getCppuBooleanType());
}
else
@@ -258,7 +258,7 @@ uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry
rSz.QueryValue(aRet, MID_FRMSIZE_REL_WIDTH);
else
{
- BOOL bTemp = 0 != rSz.GetWidthPercent();
+ sal_Bool bTemp = 0 != rSz.GetWidthPercent();
aRet.setValue(&bTemp, ::getBooleanCppuType());
}
}
@@ -306,16 +306,16 @@ uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry
if(FN_UNO_REDLINE_NODE_END == pEntry->nWID)
pTblNode = pTblNode->EndOfSectionNode();
const SwRedlineTbl& rRedTbl = pFmt->GetDoc()->GetRedlineTbl();
- for(USHORT nRed = 0; nRed < rRedTbl.Count(); nRed++)
+ for(sal_uInt16 nRed = 0; nRed < rRedTbl.Count(); nRed++)
{
const SwRedline* pRedline = rRedTbl[nRed];
- const SwNode* pRedPointNode = pRedline->GetNode(TRUE);
- const SwNode* pRedMarkNode = pRedline->GetNode(FALSE);
+ const SwNode* pRedPointNode = pRedline->GetNode(sal_True);
+ const SwNode* pRedMarkNode = pRedline->GetNode(sal_False);
if(pRedPointNode == pTblNode || pRedMarkNode == pTblNode)
{
const SwNode* pStartOfRedline = SwNodeIndex(*pRedPointNode) <= SwNodeIndex(*pRedMarkNode) ?
pRedPointNode : pRedMarkNode;
- BOOL bIsStart = pStartOfRedline == pTblNode;
+ sal_Bool bIsStart = pStartOfRedline == pTblNode;
aRet <<= SwXRedlinePortion::CreateRedlineProperties(*pRedline, bIsStart);
break;
}
@@ -489,7 +489,7 @@ String lcl_GetCellName( sal_Int32 nColumn, sal_Int32 nRow )
String sCellName;
if (nColumn < 0 || nRow < 0)
return sCellName;
- lcl_GetTblBoxColStr( static_cast< USHORT >(nColumn), sCellName );
+ lcl_GetTblBoxColStr( static_cast< sal_uInt16 >(nColumn), sCellName );
sCellName += String::CreateFromInt32( nRow + 1 );
return sCellName;
}
@@ -727,7 +727,7 @@ inline rtl::OUString lcl_getString( SwXCell &rCell )
* non UNO function call to set string in SwXCell
* --------------------------------------------------*/
void lcl_setString( SwXCell &rCell, const rtl::OUString &rTxt,
- BOOL bKeepNumberFmt )
+ sal_Bool bKeepNumberFmt )
{
if(rCell.IsValid())
{
@@ -761,9 +761,9 @@ void lcl_setValue( SwXCell &rCell, double nVal )
if(rCell.IsValid())
{
// Der Text mu? zunaechst (vielleicht) geloescht werden
- ULONG nNdPos = rCell.pBox->IsValidNumTxtNd( sal_True );
+ sal_uLong nNdPos = rCell.pBox->IsValidNumTxtNd( sal_True );
if(ULONG_MAX != nNdPos)
- lcl_setString( rCell, OUString(), TRUE ); // TRUE == keep number format
+ lcl_setString( rCell, OUString(), sal_True ); // sal_True == keep number format
SwDoc* pDoc = rCell.GetDoc();
UnoActionContext aAction(pDoc);
SwFrmFmt* pBoxFmt = rCell.pBox->ClaimFrmFmt();
@@ -981,7 +981,7 @@ void SwXCell::setFormula(const OUString& rFormula) throw( uno::RuntimeException
// Der Text mu? zunaechst (vielleicht) geloescht werden
sal_uInt32 nNdPos = pBox->IsValidNumTxtNd( sal_True );
if(USHRT_MAX == nNdPos)
- lcl_setString( *this, OUString(), TRUE );
+ lcl_setString( *this, OUString(), sal_True );
String sFml(rFormula);
if( sFml.EraseLeadingChars().Len() && '=' == sFml.GetChar( 0 ) )
sFml.Erase( 0, 1 );
@@ -1357,7 +1357,7 @@ OUString SwXCell::getImplementationName(void) throw( uno::RuntimeException )
/* -----------------------------19.04.00 15:20--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXCell::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXCell::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
String sServiceName(rServiceName);
return sServiceName.EqualsAscii("com.sun.star.text.CellProperties");
@@ -1386,7 +1386,7 @@ OUString SwXTextTableRow::getImplementationName(void) throw( uno::RuntimeExcepti
/* -----------------------------19.04.00 15:20--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTextTableRow::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXTextTableRow::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.text.TextTableRow") == rServiceName;
}
@@ -1516,7 +1516,7 @@ uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName) throw(
const SwFmtFrmSize& rSize = pLn->GetFrmFmt()->GetFrmSize();
if(FN_UNO_ROW_AUTO_HEIGHT== pEntry->nWID)
{
- BOOL bTmp = ATT_VAR_SIZE == rSize.GetHeightSizeType();
+ sal_Bool bTmp = ATT_VAR_SIZE == rSize.GetHeightSizeType();
aRet.setValue(&bTmp, ::getCppuBooleanType());
}
else
@@ -1602,7 +1602,7 @@ OUString SwXTextTableCursor::getImplementationName(void) throw( uno::RuntimeExce
/* -----------------------------19.04.00 15:21--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTextTableCursor::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXTextTableCursor::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.text.TextTableCursor") == rServiceName;
}
@@ -1747,7 +1747,7 @@ sal_Bool SwXTextTableCursor::goLeft(sal_Int16 Count, sal_Bool Expand) throw( uno
{
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
lcl_CrsrSelect( pTblCrsr, Expand );
- bRet = pTblCrsr->Left( Count,CRSR_SKIP_CHARS, FALSE, FALSE);
+ bRet = pTblCrsr->Left( Count,CRSR_SKIP_CHARS, sal_False, sal_False);
}
return bRet;
}
@@ -1763,7 +1763,7 @@ sal_Bool SwXTextTableCursor::goRight(sal_Int16 Count, sal_Bool Expand) throw( un
{
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
lcl_CrsrSelect( pTblCrsr, Expand );
- bRet = pTblCrsr->Right( Count, CRSR_SKIP_CHARS, FALSE, FALSE);
+ bRet = pTblCrsr->Right( Count, CRSR_SKIP_CHARS, sal_False, sal_False);
}
return bRet;
}
@@ -1849,7 +1849,7 @@ sal_Bool SwXTextTableCursor::mergeRange(void) throw( uno::RuntimeException )
bRet = TBLMERGE_OK == pTblCrsr->GetDoc()->MergeTbl(*pTblCrsr);
if(bRet)
{
- USHORT nCount = pTblCrsr->GetBoxesCount();
+ sal_uInt16 nCount = pTblCrsr->GetBoxesCount();
while(nCount--)
pTblCrsr->DeleteBox(nCount);
}
@@ -1997,7 +1997,7 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName)
case FN_UNO_PARA_STYLE:
{
SwFmtColl *const pFmt =
- SwUnoCursorHelper::GetCurTxtFmtColl(*pUnoCrsr, FALSE);
+ SwUnoCursorHelper::GetCurTxtFmtColl(*pUnoCrsr, sal_False);
OUString sRet;
if(pFmt)
sRet = pFmt->GetName();
@@ -2071,8 +2071,8 @@ public:
SwTableProperties_Impl();
~SwTableProperties_Impl();
- void SetProperty(USHORT nWhichId, USHORT nMemberId, const uno::Any& aVal);
- sal_Bool GetProperty(USHORT nWhichId, USHORT nMemberId, const uno::Any*& rpAny);
+ void SetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any& aVal);
+ sal_Bool GetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any*& rpAny);
void ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc);
};
@@ -2092,7 +2092,7 @@ SwTableProperties_Impl::~SwTableProperties_Impl()
/* -----------------22.06.98 09:51-------------------
*
* --------------------------------------------------*/
-void SwTableProperties_Impl::SetProperty(USHORT nWhichId, USHORT nMemberId, const uno::Any& rVal)
+void SwTableProperties_Impl::SetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any& rVal)
{
aAnyMap.SetValue( nWhichId, nMemberId, rVal );
}
@@ -2100,7 +2100,7 @@ void SwTableProperties_Impl::SetProperty(USHORT nWhichId, USHORT nMemberId, cons
*
* --------------------------------------------------*/
-sal_Bool SwTableProperties_Impl::GetProperty(USHORT nWhichId, USHORT nMemberId, const uno::Any*& rpAny )
+sal_Bool SwTableProperties_Impl::GetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any*& rpAny )
{
return aAnyMap.FillValue( nWhichId, nMemberId, rpAny );
}
@@ -2172,7 +2172,7 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
const uno::Any* pPgNo;
if(GetProperty(RES_PAGEDESC, MID_PAGEDESC_PAGENUMOFFSET, pPgNo ))
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
(*pPgNo) >>= nTmp;
aDesc.SetNumOffset( nTmp );
}
@@ -2229,7 +2229,7 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
((SfxPoolItem&)aSz).PutValue(*pWidth, MID_FRMSIZE_WIDTH);
bPutSize = sal_True;
}
- sal_Bool bTemp = pSzRel ? *(sal_Bool*)pSzRel->getValue() : FALSE;
+ sal_Bool bTemp = pSzRel ? *(sal_Bool*)pSzRel->getValue() : sal_False;
if(pSzRel && bTemp && pRelWidth)
{
((SfxPoolItem&)aSz).PutValue(*pRelWidth, MID_FRMSIZE_REL_WIDTH|CONVERT_TWIPS);
@@ -2802,10 +2802,10 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXTextTable::getDataArray()
{
// check if table box value item is set
SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
- BOOL bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, FALSE ) == SFX_ITEM_SET;
+ sal_Bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, sal_False ) == SFX_ITEM_SET;
//const SfxPoolItem* pItem;
//SwDoc* pDoc = pXCell->GetDoc();
- //BOOL bIsText = (SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, sal_True, &pItem)
+ //sal_Bool bIsText = (SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, sal_True, &pItem)
// || pDoc->GetNumberFormatter()->IsTextFormat(((SwTblBoxNumFormat*)pItem)->GetValue())
// || ((SwTblBoxNumFormat*)pItem)->GetValue() == NUMBERFORMAT_TEXT);
@@ -2884,7 +2884,7 @@ void SAL_CALL SwXTextTable::setDataArray(
if( (rAny >>= d) )
lcl_setValue( *pXCell, d );
else
- lcl_setString( *pXCell, OUString(), TRUE );
+ lcl_setString( *pXCell, OUString(), sal_True );
}
}
@@ -3410,10 +3410,10 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
!aTableBorderDistances.IsBottomDistanceValid ))
break;
- USHORT nLeftDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.LeftDistance);
- USHORT nRightDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.RightDistance);
- USHORT nTopDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.TopDistance);
- USHORT nBottomDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.BottomDistance);
+ sal_uInt16 nLeftDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.LeftDistance);
+ sal_uInt16 nRightDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.RightDistance);
+ sal_uInt16 nTopDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.TopDistance);
+ sal_uInt16 nBottomDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.BottomDistance);
SwDoc* pDoc = pFmt->GetDoc();
SwTable* pTable = SwTable::FindTable( pFmt );
SwTableLines &rLines = pTable->GetTabLines();
@@ -3586,10 +3586,10 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
SwTable* pTable = SwTable::FindTable( pFmt );
const SwTableLines &rLines = pTable->GetTabLines();
bool bFirst = true;
- USHORT nLeftDistance = 0;
- USHORT nRightDistance = 0;
- USHORT nTopDistance = 0;
- USHORT nBottomDistance = 0;
+ sal_uInt16 nLeftDistance = 0;
+ sal_uInt16 nRightDistance = 0;
+ sal_uInt16 nTopDistance = 0;
+ sal_uInt16 nBottomDistance = 0;
for(sal_uInt16 i = 0; i < rLines.Count(); i++)
{
@@ -3650,7 +3650,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
}
break;
case FN_UNO_TABLE_COLUMN_RELATIVE_SUM:
- aRet <<= (INT16) UNO_TABLE_COLUMN_SUM;
+ aRet <<= (sal_Int16) UNO_TABLE_COLUMN_SUM;
break;
case RES_ANCHOR:
//AnchorType ist readonly und maybevoid und wird nicht geliefert
@@ -3923,7 +3923,7 @@ OUString SwXCellRange::getImplementationName(void) throw( uno::RuntimeException
/* -----------------------------19.04.00 15:21--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXCellRange::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXCellRange::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return
rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.text.CellRange" ) ) ||
@@ -4132,8 +4132,8 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
0);
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
- aBoxInfo.SetValid(0xff, FALSE);
- BYTE nValid = 0;
+ aBoxInfo.SetValid(0xff, sal_False);
+ sal_uInt8 nValid = 0;
switch(pEntry->nMemberId & ~CONVERT_TWIPS)
{
case LEFT_BORDER : nValid = VALID_LEFT; break;
@@ -4147,7 +4147,7 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName,
nValid = VALID_DISTANCE;
break;
}
- aBoxInfo.SetValid(nValid, TRUE);
+ aBoxInfo.SetValid(nValid, sal_True);
aSet.Put(aBoxInfo);
@@ -4253,7 +4253,7 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) throw( be
case FN_UNO_PARA_STYLE:
{
SwFmtColl *const pTmpFmt =
- SwUnoCursorHelper::GetCurTxtFmtColl(*pTblCrsr, FALSE);
+ SwUnoCursorHelper::GetCurTxtFmtColl(*pTblCrsr, sal_False);
OUString sRet;
if(pFmt)
sRet = pTmpFmt->GetName();
@@ -4391,8 +4391,8 @@ void SwXCellRange::GetDataSequence(
if (pAnyData)
{
// check if table box value item is set
- BOOL bIsNum = pBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, FALSE ) == SFX_ITEM_SET;
- //ULONG nNdPos = pBox->IsValidNumTxtNd( sal_True );
+ sal_Bool bIsNum = pBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, sal_False ) == SFX_ITEM_SET;
+ //sal_uLong nNdPos = pBox->IsValidNumTxtNd( sal_True );
if (!bIsNum/* && ULONG_MAX == nNdPos*/)
pAnyData[nDtaCnt++] <<= lcl_getString(*pXCell);
else
@@ -4514,10 +4514,10 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXCellRange::getDataArray()
{
// check if table box value item is set
SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
- BOOL bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, FALSE ) == SFX_ITEM_SET;
+ sal_Bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, sal_False ) == SFX_ITEM_SET;
//const SfxPoolItem* pItem;
//SwDoc* pDoc = pXCell->GetDoc();
- //BOOL bIsText = (SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, sal_True, &pItem)
+ //sal_Bool bIsText = (SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, sal_True, &pItem)
// || pDoc->GetNumberFormatter()->IsTextFormat(((SwTblBoxNumFormat*)pItem)->GetValue())
// || ((SwTblBoxNumFormat*)pItem)->GetValue() == NUMBERFORMAT_TEXT);
@@ -4593,7 +4593,7 @@ void SAL_CALL SwXCellRange::setDataArray(
if( (rAny >>= d) )
lcl_setValue( *pXCell, d );
else
- lcl_setString( *pXCell, OUString(), TRUE );
+ lcl_setString( *pXCell, OUString(), sal_True );
}
}
}
@@ -4959,7 +4959,7 @@ OUString SwXTableRows::getImplementationName(void) throw( uno::RuntimeException
/* -----------------------------19.04.00 15:22--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTableRows::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXTableRows::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.text.TableRows") == rServiceName;
}
@@ -5130,7 +5130,7 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( uno:
throw uno::RuntimeException();
else
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
SwTable* pTable = SwTable::FindTable( pFrmFmt );
if(!pTable->IsTblComplex())
{
@@ -5162,7 +5162,7 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( uno:
UnoActionContext aAction(pFrmFmt->GetDoc());
pFrmFmt->GetDoc()->DeleteRow(*pUnoCrsr);
delete pUnoCrsr;
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
{
// hier muessen die Actions aufgehoben werden
@@ -5200,7 +5200,7 @@ OUString SwXTableColumns::getImplementationName(void) throw( uno::RuntimeExcepti
/* -----------------------------19.04.00 15:23--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTableColumns::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXTableColumns::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.text.TableColumns") == rServiceName;
}
@@ -5262,7 +5262,7 @@ uno::Any SwXTableColumns::getByIndex(sal_Int32 nIndex)
throw uno::RuntimeException();
else
{
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
SwTable* pTable = SwTable::FindTable( pFrmFmt );
if(!pTable->IsTblComplex())
{
@@ -5363,7 +5363,7 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( u
throw uno::RuntimeException();
else
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
SwTable* pTable = SwTable::FindTable( pFrmFmt );
if(!pTable->IsTblComplex())
{
@@ -5395,7 +5395,7 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( u
UnoActionContext aAction(pFrmFmt->GetDoc());
pFrmFmt->GetDoc()->DeleteCol(*pUnoCrsr);
delete pUnoCrsr;
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
{
// hier muessen die Actions aufgehoben werden
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 3ddcfc1d2ed7..6a57be5ec67a 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -506,7 +506,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
SwCursor aCrsr(*aTmp.GetPoint(),0,false);
SwUnoCursorHelper::SelectPam(aCrsr, true);
- aCrsr.Left(1, CRSR_SKIP_CHARS, FALSE, FALSE);
+ aCrsr.Left(1, CRSR_SKIP_CHARS, sal_False, sal_False);
//hier muss der uebergebene PaM umgesetzt werden:
if (pRange)
{
@@ -1003,7 +1003,7 @@ SwXText::setString(const OUString& rString) throw (uno::RuntimeException)
//the inserting of nodes should only be done if really necessary
//to prevent #97924# (removes paragraph attributes when setting the text
//e.g. of a table cell
- BOOL bInsertNodes = FALSE;
+ sal_Bool bInsertNodes = sal_False;
SwNodeIndex aStartIdx(*pStartNode);
do
{
@@ -1012,7 +1012,7 @@ SwXText::setString(const OUString& rString) throw (uno::RuntimeException)
if(rCurrentNode.GetNodeType() == ND_SECTIONNODE
||rCurrentNode.GetNodeType() == ND_TABLENODE)
{
- bInsertNodes = TRUE;
+ bInsertNodes = sal_True;
break;
}
}
@@ -1229,12 +1229,12 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
case FN_UNO_REDLINE_NODE_END:
{
const SwRedlineTbl& rRedTbl = GetDoc()->GetRedlineTbl();
- const USHORT nRedTblCount = rRedTbl.Count();
+ const sal_uInt16 nRedTblCount = rRedTbl.Count();
if (nRedTblCount > 0)
{
SwStartNode const*const pStartNode = GetStartNode();
- const ULONG nOwnIndex = pStartNode->EndOfSectionIndex();
- for (USHORT nRed = 0; nRed < nRedTblCount; nRed++)
+ const sal_uLong nOwnIndex = pStartNode->EndOfSectionIndex();
+ for (sal_uInt16 nRed = 0; nRed < nRedTblCount; nRed++)
{
SwRedline const*const pRedline = rRedTbl[nRed];
SwPosition const*const pRedStart = pRedline->Start();
@@ -1242,7 +1242,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
if (nOwnIndex == nRedNode.GetIndex())
{
aRet <<= SwXRedlinePortion::CreateRedlineProperties(
- *pRedline, TRUE);
+ *pRedline, sal_True);
break;
}
}
@@ -1983,10 +1983,10 @@ void SwXText::Impl::ConvertCell(
else
{
// check the predecessor
- const ULONG nLastNodeIndex = rLastPaM.End()->nNode.GetIndex();
- const ULONG nStartCellNodeIndex =
+ const sal_uLong nLastNodeIndex = rLastPaM.End()->nNode.GetIndex();
+ const sal_uLong nStartCellNodeIndex =
aStartCellPam.Start()->nNode.GetIndex();
- const ULONG nLastNodeEndIndex = rLastPaM.End()->nNode.GetIndex();
+ const sal_uLong nLastNodeEndIndex = rLastPaM.End()->nNode.GetIndex();
if (nLastNodeIndex == nStartCellNodeIndex)
{
// same node as predecessor then equal nContent?
diff --git a/sw/source/core/unocore/unotextmarkup.cxx b/sw/source/core/unocore/unotextmarkup.cxx
index a02085f261b6..3181d7aadb66 100644
--- a/sw/source/core/unocore/unotextmarkup.cxx
+++ b/sw/source/core/unocore/unotextmarkup.cxx
@@ -144,7 +144,7 @@ void SAL_CALL SwXTextMarkup::commitTextMarkup(
{
nStart = aStartPos.mnSubPos;
const xub_StrLen nFieldPosModel = static_cast< xub_StrLen >(aStartPos.mnPos);
- const USHORT nInsertPos = pWList->GetWrongPos( nFieldPosModel );
+ const sal_uInt16 nInsertPos = pWList->GetWrongPos( nFieldPosModel );
SwWrongList* pSubList = pWList->SubList( nInsertPos );
if ( !pSubList )
@@ -173,7 +173,7 @@ void SAL_CALL SwXTextMarkup::commitTextMarkup(
if( bStartInField && nType != text::TextMarkupType::SENTENCE )
{
const xub_StrLen nFieldPosModel = static_cast< xub_StrLen >(aStartPos.mnPos);
- const USHORT nInsertPos = pWList->GetWrongPos( nFieldPosModel );
+ const sal_uInt16 nInsertPos = pWList->GetWrongPos( nFieldPosModel );
SwWrongList* pSubList = pWList->SubList( nInsertPos );
if ( !pSubList )
{
@@ -199,7 +199,7 @@ void SAL_CALL SwXTextMarkup::commitTextMarkup(
if( bEndInField && nType != text::TextMarkupType::SENTENCE )
{
const xub_StrLen nFieldPosModel = static_cast< xub_StrLen >(aEndPos.mnPos);
- const USHORT nInsertPos = pWList->GetWrongPos( nFieldPosModel );
+ const sal_uInt16 nInsertPos = pWList->GetWrongPos( nFieldPosModel );
SwWrongList* pSubList = pWList->SubList( nInsertPos );
if ( !pSubList )
{
@@ -254,7 +254,7 @@ void lcl_commitGrammarMarkUp(
{
nStart = aStartPos.mnSubPos;
const xub_StrLen nFieldPosModel = static_cast< xub_StrLen >(aStartPos.mnPos);
- const USHORT nInsertPos = pWList->GetWrongPos( nFieldPosModel );
+ const sal_uInt16 nInsertPos = pWList->GetWrongPos( nFieldPosModel );
SwGrammarMarkUp* pSubList = (SwGrammarMarkUp*)pWList->SubList( nInsertPos );
if ( !pSubList )
@@ -280,7 +280,7 @@ void lcl_commitGrammarMarkUp(
if( bStartInField && nType != text::TextMarkupType::SENTENCE )
{
const xub_StrLen nFieldPosModel = static_cast< xub_StrLen >(aStartPos.mnPos);
- const USHORT nInsertPos = pWList->GetWrongPos( nFieldPosModel );
+ const sal_uInt16 nInsertPos = pWList->GetWrongPos( nFieldPosModel );
SwGrammarMarkUp* pSubList = (SwGrammarMarkUp*)pWList->SubList( nInsertPos );
if ( !pSubList )
{
@@ -298,7 +298,7 @@ void lcl_commitGrammarMarkUp(
if( bEndInField && nType != text::TextMarkupType::SENTENCE )
{
const xub_StrLen nFieldPosModel = static_cast< xub_StrLen >(aEndPos.mnPos);
- const USHORT nInsertPos = pWList->GetWrongPos( nFieldPosModel );
+ const sal_uInt16 nInsertPos = pWList->GetWrongPos( nFieldPosModel );
SwGrammarMarkUp* pSubList = (SwGrammarMarkUp*)pWList->SubList( nInsertPos );
if ( !pSubList )
{
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index 6897e6065db0..b9d41ed36ecf 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -1086,7 +1086,7 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
// prepare paint
if ( maPrevwPages.size() > 0 )
{
- mrParentViewShell.Imp()->bFirstPageInvalid = FALSE;
+ mrParentViewShell.Imp()->bFirstPageInvalid = sal_False;
mrParentViewShell.Imp()->pFirstVisPage =
const_cast<SwPageFrm*>(maPrevwPages[0]->pPage);
}
@@ -1239,7 +1239,7 @@ void SwPagePreviewLayout::Repaint( const Rectangle _aInvalidCoreRect ) const
// prepare paint
if ( maPrevwPages.size() > 0 )
{
- mrParentViewShell.Imp()->bFirstPageInvalid = FALSE;
+ mrParentViewShell.Imp()->bFirstPageInvalid = sal_False;
mrParentViewShell.Imp()->pFirstVisPage =
const_cast<SwPageFrm*>(maPrevwPages[0]->pPage);
}
@@ -1534,7 +1534,7 @@ sal_uInt16 SwPagePreviewLayout::ConvertRelativeToAbsolutePageNum( sal_uInt16 _nR
const SwPageFrm* pTmpPage = static_cast<const SwPageFrm*>(mrLayoutRootFrm.Lower());
const SwPageFrm* pRet = 0;
- USHORT i = 0;
+ sal_uInt16 i = 0;
while( pTmpPage && i != _nRelPageNum )
{
if ( !pTmpPage->IsEmptyPage() )
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index b54922a1b8e7..7269f9eda907 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -91,7 +91,7 @@ void SwRenderData::CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt,
//!! Otherwise the grammar checker might process it and crash if we later on
//!! simply delete this document while he is still at it.
SwViewOption aViewOpt( *pViewOpt );
- aViewOpt.SetOnlineSpell( FALSE );
+ aViewOpt.SetOnlineSpell( sal_False );
m_pPostItShell = new ViewShell( *m_pPostItDoc, 0, &aViewOpt, pOutDev );
}
@@ -154,7 +154,7 @@ void SwRenderData::MakeSwPrtOptions(
// get default print options
const TypeId aSwWebDocShellTypeId = TYPE(SwWebDocShell);
- BOOL bWeb = pDocShell->IsA( aSwWebDocShellTypeId );
+ sal_Bool bWeb = pDocShell->IsA( aSwWebDocShellTypeId );
::sw::InitPrintOptionsFromApplication(rOptions, bWeb);
// get print options to use from provided properties
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 4c1f045f79be..c9581d26251f 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -71,7 +71,7 @@
|*************************************************************************/
//SwSaveHdl::SwSaveHdl( SwViewImp *pI ) :
// pImp( pI ),
-// bXorVis( FALSE )
+// bXorVis( sal_False )
//{
//if ( pImp->HasDrawView() )
//{
@@ -147,8 +147,8 @@ void SwViewImp::LockPaint()
}
else
{
- //HMHbShowHdlPaint = FALSE;
- bResetHdlHiddenPaint = FALSE;
+ //HMHbShowHdlPaint = sal_False;
+ bResetHdlHiddenPaint = sal_False;
}
}
@@ -188,7 +188,7 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
{
//change the draw mode in high contrast mode
OutputDevice* pOutDev = GetShell()->GetOut();
- ULONG nOldDrawMode = pOutDev->GetDrawMode();
+ sal_uLong nOldDrawMode = pOutDev->GetDrawMode();
if( GetShell()->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() &&
(!GetShell()->IsPreView()||SW_MOD()->GetAccessibilityOptions().GetIsForPagePreviews()))
@@ -259,23 +259,23 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
|*************************************************************************/
#define WIEDUWILLST 400
-BOOL SwViewImp::IsDragPossible( const Point &rPoint )
+sal_Bool SwViewImp::IsDragPossible( const Point &rPoint )
{
if ( !HasDrawView() )
- return FALSE;
+ return sal_False;
const SdrMarkList &rMrkList = GetDrawView()->GetMarkedObjectList();
if( !rMrkList.GetMarkCount() )
- return FALSE;
+ return sal_False;
SdrObject *pO = rMrkList.GetMark(rMrkList.GetMarkCount()-1)->GetMarkedSdrObj();
SwRect aRect;
- if( ::CalcClipRect( pO, aRect, FALSE ) )
+ if( ::CalcClipRect( pO, aRect, sal_False ) )
{
SwRect aTmp;
- ::CalcClipRect( pO, aTmp, TRUE );
+ ::CalcClipRect( pO, aTmp, sal_True );
aRect.Union( aTmp );
}
else
@@ -308,11 +308,11 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
//Begrenzung des Arbeitsbereiches.
const Rectangle aRect( Point( DOCUMENTBORDER, DOCUMENTBORDER ), rNewSz );
const Rectangle &rOldWork = GetDrawView()->GetWorkArea();
- BOOL bCheckDrawObjs = FALSE;
+ sal_Bool bCheckDrawObjs = sal_False;
if ( aRect != rOldWork )
{
if ( rOldWork.Bottom() > aRect.Bottom() || rOldWork.Right() > aRect.Right())
- bCheckDrawObjs = TRUE;
+ bCheckDrawObjs = sal_True;
GetDrawView()->SetWorkArea( aRect );
}
if ( !bCheckDrawObjs )
@@ -320,8 +320,8 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
ASSERT( pSh->getIDocumentDrawModelAccess()->GetDrawModel(), "NotifySizeChg without DrawModel" );
SdrPage* pPage = pSh->getIDocumentDrawModelAccess()->GetDrawModel()->GetPage( 0 );
- const ULONG nObjs = pPage->GetObjCount();
- for( ULONG nObj = 0; nObj < nObjs; ++nObj )
+ const sal_uLong nObjs = pPage->GetObjCount();
+ for( sal_uLong nObj = 0; nObj < nObjs; ++nObj )
{
SdrObject *pObj = pPage->GetObj( nObj );
if( !pObj->ISA(SwVirtFlyDrawObj) )
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index b2d91c48f598..b384d0763ef4 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -101,9 +101,9 @@ void SwViewImp::Init( const SwViewOption *pNewOpt )
pDrawView->SetWorkArea( pRoot->Frm().SVRect() );
if ( GetShell()->IsPreView() )
- pDrawView->SetAnimationEnabled( FALSE );
+ pDrawView->SetAnimationEnabled( sal_False );
- pDrawView->SetUseIncompatiblePathCreateInterface( FALSE );
+ pDrawView->SetUseIncompatiblePathCreateInterface( sal_False );
pDrawView->SetSolidMarkHdl(pNewOpt->IsSolidMarkHdl());
// it's a JOE interface !
@@ -136,8 +136,8 @@ SwViewImp::SwViewImp( ViewShell *pParent ) :
//bResetXorVisibility =
//HMHbShowHdlPaint =
bResetHdlHiddenPaint =
- bSmoothUpdate = bStopSmooth = bStopPrt = FALSE;
- bFirstPageInvalid = TRUE;
+ bSmoothUpdate = bStopSmooth = bStopPrt = sal_False;
+ bFirstPageInvalid = sal_True;
}
/******************************************************************************
@@ -191,16 +191,16 @@ void SwViewImp::DelRegion()
|*
******************************************************************************/
-BOOL SwViewImp::AddPaintRect( const SwRect &rRect )
+sal_Bool SwViewImp::AddPaintRect( const SwRect &rRect )
{
if ( rRect.IsOver( pSh->VisArea() ) )
{
if ( !pRegion )
pRegion = new SwRegionRects( pSh->VisArea() );
(*pRegion) -= rRect;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -228,11 +228,11 @@ void SwViewImp::CheckWaitCrsr()
|*
******************************************************************************/
-BOOL SwViewImp::IsCalcLayoutProgress() const
+sal_Bool SwViewImp::IsCalcLayoutProgress() const
{
if ( pLayAct )
return pLayAct->IsCalcLayout();
- return FALSE;
+ return sal_False;
}
/******************************************************************************
@@ -244,14 +244,14 @@ BOOL SwViewImp::IsCalcLayoutProgress() const
|*
******************************************************************************/
-BOOL SwViewImp::IsUpdateExpFlds()
+sal_Bool SwViewImp::IsUpdateExpFlds()
{
if ( pLayAct && pLayAct->IsCalcLayout() )
{
pLayAct->SetUpdateExpFlds();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -298,7 +298,7 @@ void SwViewImp::SetFirstVisPage()
}
pFirstVisPage = pPage ? pPage : (SwPageFrm*)pSh->GetLayout()->Lower();
}
- bFirstPageInvalid = FALSE;
+ bFirstPageInvalid = sal_False;
}
/******************************************************************************
@@ -613,7 +613,7 @@ void SwViewImp::FireAccessibleEvents()
IMPL_LINK(SwViewImp, SetStopPrt, void *, EMPTYARG)
{
- bStopPrt = TRUE;
+ bStopPrt = sal_True;
return 0;
}
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index 1119fc55d2a2..e2a8ec46567f 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -110,7 +110,7 @@ void ViewShell::PrintProspect(
std::pair< sal_Int32, sal_Int32 > rPagesToPrint =
rPrintData.GetRenderData().GetPagePairsForProspectPrinting()[ nRenderer ];
-// const USHORT nPageMax = static_cast< USHORT >(rPagesToPrint.first > rPagesToPrint.second ?
+// const sal_uInt16 nPageMax = static_cast< sal_uInt16 >(rPagesToPrint.first > rPagesToPrint.second ?
// rPagesToPrint.first : rPagesToPrint.second);
#if OSL_DEBUG_LEVEL > 1
DBG_ASSERT( rPagesToPrint.first == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.first ) == 1, "first Page not valid" );
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 0bbfc70d5a22..8d5d32d3a0b6 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -95,13 +95,13 @@
// #i74769#
#include <svx/sdrpaintwindow.hxx>
-BOOL ViewShell::bLstAct = FALSE;
+sal_Bool ViewShell::bLstAct = sal_False;
ShellResource *ViewShell::pShellRes = 0;
Window *ViewShell::pCareWindow = 0;
BitmapEx* ViewShell::pErrorBmp = NULL;
BitmapEx* ViewShell::pReplaceBmp = NULL;
-BOOL bInSizeNotify = FALSE;
+sal_Bool bInSizeNotify = sal_False;
DBG_NAME(LayoutIdle)
@@ -185,24 +185,24 @@ void ViewShell::DLPostPaint2(bool bPaintFormLayer)
|*
******************************************************************************/
-void ViewShell::ImplEndAction( const BOOL bIdleEnd )
+void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
{
//Fuer den Drucker gibt es hier nichts zu tun.
if ( !GetWin() || IsPreView() )
{
- bPaintWorks = TRUE;
+ bPaintWorks = sal_True;
UISizeNotify();
return;
}
- bInEndAction = TRUE;
+ bInEndAction = sal_True;
//Laeuft hiermit das EndAction der Letzten Shell im Ring?
- ViewShell::bLstAct = TRUE;
+ ViewShell::bLstAct = sal_True;
ViewShell *pSh = (ViewShell*)this->GetNext();
while ( pSh != this )
{ if ( pSh->ActionPend() )
- { ViewShell::bLstAct = FALSE;
+ { ViewShell::bLstAct = sal_False;
pSh = this;
}
else
@@ -218,14 +218,14 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
if ( Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea() )
Imp()->DelRegion();
- const BOOL bExtraData = ::IsExtraData( GetDoc() );
+ const sal_Bool bExtraData = ::IsExtraData( GetDoc() );
if ( !bIdleEnd )
{
SwLayAction aAction( GetLayout(), Imp() );
- aAction.SetComplete( FALSE );
+ aAction.SetComplete( sal_False );
if ( nLockPaint )
- aAction.SetPaint( FALSE );
+ aAction.SetPaint( sal_False );
aAction.SetInputType( INPUT_KEYBOARD );
aAction.Action();
}
@@ -242,7 +242,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
{
if ( !nLockPaint )
{
- BOOL bPaintsFromSystem = aInvalidRect.HasArea();
+ sal_Bool bPaintsFromSystem = aInvalidRect.HasArea();
GetWin()->Update();
if ( aInvalidRect.HasArea() )
{
@@ -250,9 +250,9 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
Imp()->AddPaintRect( aInvalidRect );
ResetInvalidRect();
- bPaintsFromSystem = TRUE;
+ bPaintsFromSystem = sal_True;
}
- bPaintWorks = TRUE;
+ bPaintWorks = sal_True;
SwRegionRects *pRegion = Imp()->GetRegion();
@@ -262,7 +262,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
// Mitte eine Selektion und mit einem anderen Cursor an linken
// rechten Rand springen. Ohne ShowCrsr verschwindet die
// Selektion
- BOOL bShowCrsr = pRegion && IsA( TYPE(SwCrsrShell) );
+ sal_Bool bShowCrsr = pRegion && IsA( TYPE(SwCrsrShell) );
if( bShowCrsr )
((SwCrsrShell*)this)->HideCrsrs();
@@ -283,7 +283,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
SwRect aRect( (*pRegion)[ pRegion->Count() - 1 ] );
pRegion->Remove( pRegion->Count() - 1 );
- BOOL bPaint = TRUE;
+ sal_Bool bPaint = sal_True;
if ( IsEndActionByVirDev() )
{
//virtuelles device erzeugen und einstellen.
@@ -292,7 +292,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
MapMode aMapMode( GetOut()->GetMapMode() );
pVout->SetMapMode( aMapMode );
- BOOL bSizeOK = TRUE;
+ sal_Bool bSizeOK = sal_True;
Rectangle aTmp1( aRect.SVRect() );
aTmp1 = GetOut()->LogicToPixel( aTmp1 );
@@ -314,7 +314,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
}
if ( bSizeOK )
{
- bPaint = FALSE;
+ bPaint = sal_False;
// --> OD 2007-07-26 #i79947#
// #i72754# start Pre/PostPaint encapsulation before pOut is changed to the buffering VDev
@@ -397,19 +397,19 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
Imp()->DelRegion();
}
if( bShowCrsr )
- ((SwCrsrShell*)this)->ShowCrsrs( TRUE );
+ ((SwCrsrShell*)this)->ShowCrsrs( sal_True );
}
else
{
Imp()->DelRegion();
- bPaintWorks = TRUE;
+ bPaintWorks = sal_True;
}
}
else
- bPaintWorks = TRUE;
+ bPaintWorks = sal_True;
- bInEndAction = FALSE;
- ViewShell::bLstAct = FALSE;
+ bInEndAction = sal_False;
+ ViewShell::bLstAct = sal_False;
Imp()->EndAction();
@@ -436,7 +436,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
void ViewShell::ImplStartAction()
{
- bPaintWorks = FALSE;
+ bPaintWorks = sal_False;
Imp()->StartAction();
}
@@ -453,12 +453,12 @@ void ViewShell::ImplStartAction()
void ViewShell::ImplLockPaint()
{
if ( GetWin() && GetWin()->IsVisible() )
- GetWin()->EnablePaint( FALSE ); //Auch die Controls abklemmen.
+ GetWin()->EnablePaint( sal_False ); //Auch die Controls abklemmen.
Imp()->LockPaint();
}
-void ViewShell::ImplUnlockPaint( BOOL bVirDev )
+void ViewShell::ImplUnlockPaint( sal_Bool bVirDev )
{
SET_CURR_SHELL( this );
if ( GetWin() && GetWin()->IsVisible() )
@@ -473,7 +473,7 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
aSize.Height()+= 20;
if( pVout->SetOutputSize( aSize ) )
{
- GetWin()->EnablePaint( TRUE );
+ GetWin()->EnablePaint( sal_True );
GetWin()->Validate();
Imp()->UnlockPaint();
@@ -497,7 +497,7 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
else
{
Imp()->UnlockPaint();
- GetWin()->EnablePaint( TRUE );
+ GetWin()->EnablePaint( sal_True );
GetWin()->Invalidate( INVALIDATE_CHILDREN );
}
delete pVout;
@@ -505,7 +505,7 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
else
{
Imp()->UnlockPaint();
- GetWin()->EnablePaint( TRUE );
+ GetWin()->EnablePaint( sal_True );
GetWin()->Invalidate( INVALIDATE_CHILDREN );
}
}
@@ -522,9 +522,9 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
|*
******************************************************************************/
-BOOL ViewShell::AddPaintRect( const SwRect & rRect )
+sal_Bool ViewShell::AddPaintRect( const SwRect & rRect )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ViewShell *pSh = this;
do
{
@@ -621,7 +621,7 @@ Window* ViewShell::CareChildWin(ViewShell& rVSh)
{
if(rVSh.pSfxViewShell)
{
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SfxViewFrame* pVFrame = rVSh.pSfxViewShell->GetViewFrame();
const SfxChildWindow* pChWin = pVFrame->GetChildWindow( nId );
Window *pWin = pChWin ? pChWin->GetWindow() : NULL;
@@ -640,7 +640,7 @@ Window* ViewShell::CareChildWin(ViewShell& rVSh)
|*
******************************************************************************/
-Point ViewShell::GetPagePos( USHORT nPageNum ) const
+Point ViewShell::GetPagePos( sal_uInt16 nPageNum ) const
{
return GetLayout()->GetPagePos( nPageNum );
}
@@ -654,14 +654,14 @@ Point ViewShell::GetPagePos( USHORT nPageNum ) const
|*
******************************************************************************/
-USHORT ViewShell::GetNumPages()
+sal_uInt16 ViewShell::GetNumPages()
{
//Es kann sein, das noch kein Layout existiert weil die Methode vom
//Root-Ctor gerufen wird.
return GetLayout() ? GetLayout()->GetPageNum() : 0;
}
-sal_Bool ViewShell::IsDummyPage( USHORT nPageNum ) const
+sal_Bool ViewShell::IsDummyPage( sal_uInt16 nPageNum ) const
{
return GetLayout() ? GetLayout()->IsDummyPage( nPageNum ) : 0;
}
@@ -678,11 +678,11 @@ sal_Bool ViewShell::IsDummyPage( USHORT nPageNum ) const
|*
*************************************************************************/
-void ViewShell::UpdateFlds(BOOL bCloseDB)
+void ViewShell::UpdateFlds(sal_Bool bCloseDB)
{
SET_CURR_SHELL( this );
- BOOL bCrsr = ISA(SwCrsrShell);
+ sal_Bool bCrsr = ISA(SwCrsrShell);
if ( bCrsr )
((SwCrsrShell*)this)->StartAction();
else
@@ -704,9 +704,9 @@ void ViewShell::UpdateAllCharts()
GetDoc()->UpdateAllCharts();
}
-BOOL ViewShell::HasCharts() const
+sal_Bool ViewShell::HasCharts() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwStartNode *pStNd;
SwNodeIndex aIdx( *GetDoc()->GetNodes().GetEndOfAutotext().
StartOfSectionNode(), 1 );
@@ -716,7 +716,7 @@ BOOL ViewShell::HasCharts() const
const SwOLENode *pNd = aIdx.GetNode().GetOLENode();
if( pNd && pNd->GetChartTblName().Len() )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -782,9 +782,9 @@ void ViewShell::LayoutIdle()
|*
*************************************************************************/
-void lcl_InvalidateAllCntnt( ViewShell& rSh, BYTE nInv )
+void lcl_InvalidateAllCntnt( ViewShell& rSh, sal_uInt8 nInv )
{
- BOOL bCrsr = rSh.ISA(SwCrsrShell);
+ sal_Bool bCrsr = rSh.ISA(SwCrsrShell);
if ( bCrsr )
((SwCrsrShell&)rSh).StartAction();
else
@@ -829,9 +829,9 @@ void ViewShell::SetParaSpaceMax( bool bNew )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if( pIDSA->get(IDocumentSettingAccess::PARA_SPACE_MAX) != bNew )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::PARA_SPACE_MAX, bNew );
- const BYTE nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -841,9 +841,9 @@ void ViewShell::SetParaSpaceMaxAtPages( bool bNew )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if( pIDSA->get(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES) != bNew )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES, bNew );
- const BYTE nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -853,9 +853,9 @@ void ViewShell::SetTabCompat( bool bNew )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if( pIDSA->get(IDocumentSettingAccess::TAB_COMPAT) != bNew )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::TAB_COMPAT, bNew );
- const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -865,12 +865,12 @@ void ViewShell::SetAddExtLeading( bool bNew )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::ADD_EXT_LEADING) != bNew )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::ADD_EXT_LEADING, bNew );
SdrModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
if ( pTmpDrawModel )
pTmpDrawModel->SetAddExtLeading( bNew );
- const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -880,7 +880,7 @@ void ViewShell::SetUseVirDev( bool bNewVirtual )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) != bNewVirtual )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
// this sets the flag at the document and calls PrtDataChanged
IDocumentDeviceAccess* pIDDA = getIDocumentDeviceAccess();
pIDDA->setReferenceDeviceType( bNewVirtual, true );
@@ -894,9 +894,9 @@ void ViewShell::SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS) != _bAddParaSpacingToTableCells )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS, _bAddParaSpacingToTableCells );
- const BYTE nInv = INV_PRTAREA;
+ const sal_uInt8 nInv = INV_PRTAREA;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -908,9 +908,9 @@ void ViewShell::SetUseFormerLineSpacing( bool _bUseFormerLineSpacing )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::OLD_LINE_SPACING) != _bUseFormerLineSpacing )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::OLD_LINE_SPACING, _bUseFormerLineSpacing );
- const BYTE nInv = INV_PRTAREA;
+ const sal_uInt8 nInv = INV_PRTAREA;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -921,7 +921,7 @@ void ViewShell::SetUseFormerObjectPositioning( bool _bUseFormerObjPos )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_FORMER_OBJECT_POS) != _bUseFormerObjPos )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::USE_FORMER_OBJECT_POS, _bUseFormerObjPos );
lcl_InvalidateAllObjPos( *this );
}
@@ -933,7 +933,7 @@ void ViewShell::SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION) != _bConsiderWrapOnObjPos )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION, _bConsiderWrapOnObjPos );
lcl_InvalidateAllObjPos( *this );
}
@@ -945,9 +945,9 @@ void ViewShell::SetUseFormerTextWrapping( bool _bUseFormerTextWrapping )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING) != _bUseFormerTextWrapping )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING, _bUseFormerTextWrapping );
- const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -959,9 +959,9 @@ void ViewShell::SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWit
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK) != _bDoNotJustifyLinesWithManualBreak )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, _bDoNotJustifyLinesWithManualBreak );
- const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -978,7 +978,7 @@ void ViewShell::SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWit
void ViewShell::Reformat()
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
// Wir gehen auf Nummer sicher:
// Wir muessen die alten Fontinformationen wegschmeissen,
@@ -1020,26 +1020,26 @@ void ViewShell::Reformat()
void ViewShell::CalcLayout()
{
SET_CURR_SHELL( this );
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
//Cache vorbereiten und restaurieren, damit er nicht versaut wird.
SwSaveSetLRUOfst aSaveLRU( *SwTxtFrm::GetTxtCache(),
SwTxtFrm::GetTxtCache()->GetCurMax() - 50 );
//Progress einschalten wenn noch keiner Lauft.
- const BOOL bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
+ const sal_Bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
if ( bEndProgress )
{
- USHORT nEndPage = GetLayout()->GetPageNum();
+ sal_uInt16 nEndPage = GetLayout()->GetPageNum();
nEndPage += nEndPage * 10 / 100;
::StartProgress( STR_STATSTR_REFORMAT, 0, nEndPage, GetDoc()->GetDocShell() );
}
SwLayAction aAction( GetLayout(), Imp() );
- aAction.SetPaint( FALSE );
- aAction.SetStatBar( TRUE );
- aAction.SetCalcLayout( TRUE );
- aAction.SetReschedule( TRUE );
+ aAction.SetPaint( sal_False );
+ aAction.SetStatBar( sal_True );
+ aAction.SetCalcLayout( sal_True );
+ aAction.SetReschedule( sal_True );
GetDoc()->LockExpFlds();
aAction.Action();
GetDoc()->UnlockExpFlds();
@@ -1049,9 +1049,9 @@ void ViewShell::CalcLayout()
if ( aAction.IsExpFlds() )
{
aAction.Reset();
- aAction.SetPaint( FALSE );
- aAction.SetStatBar( TRUE );
- aAction.SetReschedule( TRUE );
+ aAction.SetPaint( sal_False );
+ aAction.SetStatBar( sal_True );
+ aAction.SetReschedule( sal_True );
SwDocPosUpdate aMsgHnt( 0 );
GetDoc()->UpdatePageFlds( &aMsgHnt );
@@ -1097,18 +1097,18 @@ void ViewShell::SetFirstVisPageInvalid()
void ViewShell::SizeChgNotify()
{
if ( !pWin )
- bDocSizeChgd = TRUE;
+ bDocSizeChgd = sal_True;
else if( ActionPend() || Imp()->IsCalcLayoutProgress() || bPaintInProgress )
{
- bDocSizeChgd = TRUE;
+ bDocSizeChgd = sal_True;
if ( !Imp()->IsCalcLayoutProgress() && ISA( SwCrsrShell ) )
{
- const SwFrm *pCnt = ((SwCrsrShell*)this)->GetCurrFrm( FALSE );
+ const SwFrm *pCnt = ((SwCrsrShell*)this)->GetCurrFrm( sal_False );
const SwPageFrm *pPage;
if ( pCnt && 0 != (pPage = pCnt->FindPageFrm()) )
{
- USHORT nVirtNum = pPage->GetVirtPageNum();
+ sal_uInt16 nVirtNum = pPage->GetVirtPageNum();
const SvxNumberType& rNum = pPage->GetPageDesc()->GetNumType();
String sDisplay = rNum.GetNumStr( nVirtNum );
PageNumNotify( this, pCnt->GetPhyPageNum(), nVirtNum, sDisplay );
@@ -1117,7 +1117,7 @@ void ViewShell::SizeChgNotify()
}
else
{
- bDocSizeChgd = FALSE;
+ bDocSizeChgd = sal_False;
::SizeNotify( this, GetDocSize() );
}
}
@@ -1151,7 +1151,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
const SwFrm *pOldPage = Imp()->GetFirstVisPage();
const SwRect aPrevArea( VisArea() );
- const BOOL bFull = aPrevArea.IsEmpty();
+ const sal_Bool bFull = aPrevArea.IsEmpty();
aVisArea = rRect;
SetFirstVisPageInvalid();
@@ -1245,7 +1245,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
{
const long nOfst = GetOut()->PixelToLogic(
Size(Imp()->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width();
- for ( USHORT i = 0;
+ for ( sal_uInt16 i = 0;
i < pPage->GetSortedObjs()->Count(); ++i )
{
SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
@@ -1328,9 +1328,9 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
|*
******************************************************************************/
-BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
+sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
{
- const ULONG nColCnt = pOut->GetColorCount();
+ const sal_uLong nColCnt = pOut->GetColorCount();
long lMult = 1, lMax = LONG_MAX;
if ( nColCnt == 65536 )
{
@@ -1371,7 +1371,7 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
if(bSmoothScrollAllowed && bAllowedForSelection && bAllowedForMultipleCursors)
{
- Imp()->bStopSmooth = FALSE;
+ Imp()->bStopSmooth = sal_False;
const SwRect aOldVis( VisArea() );
@@ -1434,9 +1434,9 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
// SW paint stuff
PaintDesktop( aRect );
- ViewShell::bLstAct = TRUE;
+ ViewShell::bLstAct = sal_True;
GetLayout()->Paint( aRect );
- ViewShell::bLstAct = FALSE;
+ ViewShell::bLstAct = sal_False;
// end paint and destroy ObjectContact again
DLPostPaint2(true);
@@ -1529,9 +1529,9 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
Imp()->aSmoothRect.Top( VisArea().Bottom() + lScroll - aPixSz.Height());
}
- Imp()->bSmoothUpdate = TRUE;
+ Imp()->bSmoothUpdate = sal_True;
GetWin()->Update();
- Imp()->bSmoothUpdate = FALSE;
+ Imp()->bSmoothUpdate = sal_False;
if(!Imp()->bStopSmooth)
{
@@ -1619,7 +1619,7 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
if ( !Imp()->bStopSmooth )
--nLockPaint;
SetFirstVisPageInvalid();
- return TRUE;
+ return sal_True;
}
delete pVout;
}
@@ -1630,7 +1630,7 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
GetWin()->Scroll( lXDiff, lYDiff, *pRect, SCROLL_CHILDREN);
else
GetWin()->Scroll( lXDiff, lYDiff, SCROLL_CHILDREN);
- return FALSE;
+ return sal_False;
}
/******************************************************************************
@@ -1651,7 +1651,7 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
//Kann z.B. waehrend des Idle'ns zwischenzeitlich auftreten.
//Die Rechtecke neben den Seiten muessen wir leider auf jedenfall Painten,
//den diese werden spaeter beim VisPortChgd ausgespart.
- BOOL bBorderOnly = FALSE;
+ sal_Bool bBorderOnly = sal_False;
const SwRootFrm *pRoot = GetDoc()->GetRootFrm();
if ( rRect.Top() > pRoot->Frm().Bottom() )
{
@@ -1659,7 +1659,7 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
while ( pPg && pPg->GetNext() )
pPg = pPg->GetNext();
if ( !pPg || !pPg->Frm().IsOver( VisArea() ) )
- bBorderOnly = TRUE;
+ bBorderOnly = sal_True;
}
const bool bBookMode = GetViewOptions()->IsViewLayoutBookMode();
@@ -1732,7 +1732,7 @@ void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
GetOut()->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
GetOut()->SetLineColor();
- for ( USHORT i = 0; i < rRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rRegion.Count(); ++i )
{
const Rectangle aRectangle(rRegion[i].SVRect());
@@ -1786,20 +1786,20 @@ void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
|*
******************************************************************************/
-BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
+sal_Bool ViewShell::CheckInvalidForPaint( const SwRect &rRect )
{
if ( !GetWin() )
- return FALSE;
+ return sal_False;
const SwPageFrm *pPage = Imp()->GetFirstVisPage();
const SwTwips nBottom = VisArea().Bottom();
const SwTwips nRight = VisArea().Right();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while ( !bRet && pPage && !((pPage->Frm().Top() > nBottom) ||
(pPage->Frm().Left() > nRight)))
{
if ( pPage->IsInvalid() || pPage->IsInvalidFly() )
- bRet = TRUE;
+ bRet = sal_True;
pPage = (SwPageFrm*)pPage->GetNext();
}
@@ -1813,7 +1813,7 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
Imp()->DelRegion();
SwLayAction aAction( GetLayout(), Imp() );
- aAction.SetComplete( FALSE );
+ aAction.SetComplete( sal_False );
// We increment the action counter to avoid a recursive call of actions
// e.g. from a SwFEShell::RequestObjectResize(..) in bug 95829.
// A recursive call of actions is no good idea because the inner action
@@ -1828,11 +1828,11 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
{
//Nur dann interessant, wenn sich im sichtbaren Bereich etwas
//veraendert hat.
- BOOL bStop = TRUE;
- for ( USHORT i = 0; i < pRegion->Count(); ++i )
+ sal_Bool bStop = sal_True;
+ for ( sal_uInt16 i = 0; i < pRegion->Count(); ++i )
{
const SwRect &rTmp = (*pRegion)[i];
- if ( FALSE == (bStop = rTmp.IsOver( VisArea() )) )
+ if ( sal_False == (bStop = rTmp.IsOver( VisArea() )) )
break;
}
if ( bStop )
@@ -1847,24 +1847,24 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
//Erst Invert dann Compress, niemals andersherum!
pRegion->Invert();
pRegion->Compress();
- bRet = FALSE;
+ bRet = sal_False;
if ( pRegion->Count() )
{
SwRegionRects aRegion( rRect );
- for ( USHORT i = 0; i < pRegion->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pRegion->Count(); ++i )
{ const SwRect &rTmp = (*pRegion)[i];
if ( !rRect.IsInside( rTmp ) )
{
InvalidateWindows( rTmp );
if ( rTmp.IsOver( VisArea() ) )
{ aRegion -= rTmp;
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
if ( bRet )
{
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
GetWin()->Invalidate( aRegion[i].SVRect() );
if ( rRect != VisArea() )
@@ -1881,11 +1881,11 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
Imp()->DelRegion();
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
@@ -1907,7 +1907,7 @@ void ViewShell::Paint(const Rectangle &rRect)
{
SwRect aTmp( rRect );
if ( !Imp()->aSmoothRect.IsInside( aTmp ) )
- Imp()->bStopSmooth = TRUE;
+ Imp()->bStopSmooth = sal_True;
else
{
Imp()->aSmoothRect = aTmp;
@@ -1940,9 +1940,9 @@ void ViewShell::Paint(const Rectangle &rRect)
return;
}
- bPaintInProgress = TRUE;
+ bPaintInProgress = sal_True;
SET_CURR_SHELL( this );
- SwRootFrm::SetNoVirDev( TRUE );
+ SwRootFrm::SetNoVirDev( sal_True );
//Wir wollen nicht staendig hin und her Clippen, wir verlassen
//uns darauf, das sich alle auf das Rechteck beschraeken und
@@ -1959,9 +1959,9 @@ void ViewShell::Paint(const Rectangle &rRect)
//vernichten.
if ( aRect.IsInside( aInvalidRect ) )
ResetInvalidRect();
- ViewShell::bLstAct = TRUE;
+ ViewShell::bLstAct = sal_True;
GetLayout()->Paint( aRect );
- ViewShell::bLstAct = FALSE;
+ ViewShell::bLstAct = sal_False;
}
else
{
@@ -1983,9 +1983,9 @@ void ViewShell::Paint(const Rectangle &rRect)
//vernichten.
if ( aRect.IsInside( aInvalidRect ) )
ResetInvalidRect();
- ViewShell::bLstAct = TRUE;
+ ViewShell::bLstAct = sal_True;
GetLayout()->Paint( aRect );
- ViewShell::bLstAct = FALSE;
+ ViewShell::bLstAct = sal_False;
// --> OD 2009-08-12 #i101192#
// end Pre/PostPaint encapsulation
DLPostPaint2(true);
@@ -1994,8 +1994,8 @@ void ViewShell::Paint(const Rectangle &rRect)
//delete pSaveHdl;
}
- SwRootFrm::SetNoVirDev( FALSE );
- bPaintInProgress = FALSE;
+ SwRootFrm::SetNoVirDev( sal_False );
+ bPaintInProgress = sal_False;
UISizeNotify();
}
}
@@ -2050,7 +2050,7 @@ void ViewShell::SetBrowseBorder( const Size& rNew )
{
aBrowseBorder = rNew;
if ( aVisArea.HasArea() )
- CheckBrowseView( FALSE );
+ CheckBrowseView( sal_False );
}
}
@@ -2082,7 +2082,7 @@ sal_Int32 ViewShell::GetBrowseWidth() const
|*
******************************************************************************/
-void ViewShell::CheckBrowseView( BOOL bBrowseChgd )
+void ViewShell::CheckBrowseView( sal_Bool bBrowseChgd )
{
if ( !bBrowseChgd &&
!getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
@@ -2127,7 +2127,7 @@ void ViewShell::CheckBrowseView( BOOL bBrowseChgd )
// Wenn sich die Groessenverhaeltnise im BrowseModus aendern,
// muss die Position und PrtArea der Cntnt- und Tab-Frames invalidiert werden.
- BYTE nInv = INV_PRTAREA | INV_TABLE | INV_POS;
+ sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_POS;
// Beim BrowseModus-Wechsel benoetigen die CntntFrms
// wg. der Drucker/Bildschirmformatierung eine Size-Invalidierung
if( bBrowseChgd )
@@ -2257,13 +2257,13 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
SET_CURR_SHELL( this );
- BOOL bReformat = FALSE;
+ sal_Bool bReformat = sal_False;
if( pOpt->IsShowHiddenField() != rOpt.IsShowHiddenField() )
{
((SwHiddenTxtFieldType*)pDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
SetHiddenFlag( !rOpt.IsShowHiddenField() );
- bReformat = TRUE;
+ bReformat = sal_True;
}
if ( pOpt->IsShowHiddenPara() != rOpt.IsShowHiddenPara() )
{
@@ -2274,14 +2274,14 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
SwMsgPoolItem aHnt( RES_HIDDENPARA_PRINT );
pFldType->Modify( &aHnt, 0);
}
- bReformat = TRUE;
+ bReformat = sal_True;
}
if ( !bReformat && pOpt->IsShowHiddenChar() != rOpt.IsShowHiddenChar() )
{
bReformat = GetDoc()->ContainsHiddenChars();
}
- // bReformat wird TRUE, wenn ...
+ // bReformat wird sal_True, wenn ...
// - Feldnamen anzeigen oder nicht ...
// ( - SwEndPortion muessen _nicht_ mehr generiert werden. )
// - Das Window ist natuerlich was ganz anderes als der Drucker...
@@ -2299,12 +2299,12 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
// sondern der Bildschirm, muss bei Zoomfaktoraenderung neu formatiert
// werden.
if( getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- bReformat = TRUE;
+ bReformat = sal_True;
}
if ( getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
pOpt->IsPrtFormat() != rOpt.IsPrtFormat() )
- bReformat = TRUE;
+ bReformat = sal_True;
if ( HasDrawView() || rOpt.IsGridVisible() )
{
@@ -2340,7 +2340,7 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
pDView->SetMarkHdlSizePixel(rOpt.IsBigMarkHdl() ? 9 : 7);
}
- BOOL bOnlineSpellChgd = pOpt->IsOnlineSpell() != rOpt.IsOnlineSpell();
+ sal_Bool bOnlineSpellChgd = pOpt->IsOnlineSpell() != rOpt.IsOnlineSpell();
*pOpt = rOpt; // Erst jetzt werden die Options uebernommen.
pOpt->SetUIOptions(rOpt);
@@ -2360,7 +2360,7 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
if( bOnlineSpellChgd )
{
ViewShell *pSh = (ViewShell*)this->GetNext();
- BOOL bOnlineSpl = rOpt.IsOnlineSpell();
+ sal_Bool bOnlineSpl = rOpt.IsOnlineSpell();
while( pSh != this )
{ pSh->pOpt->SetOnlineSpell( bOnlineSpl );
Window *pTmpWin = pSh->GetWin();
@@ -2387,7 +2387,7 @@ void ViewShell::SetUIOptions( const SwViewOption &rOpt )
//the API-Flag of the view options is set but never reset
//it is required to set scroll bars in readonly documents
if(rOpt.IsStarOneSetting())
- pOpt->SetStarOneSetting(TRUE);
+ pOpt->SetStarOneSetting(sal_True);
pOpt->SetSymbolFont(rOpt.GetSymbolFont());
}
@@ -2401,7 +2401,7 @@ void ViewShell::SetUIOptions( const SwViewOption &rOpt )
|*
******************************************************************************/
-void ViewShell::SetReadonlyOption(BOOL bSet)
+void ViewShell::SetReadonlyOption(sal_Bool bSet)
{
//JP 01.02.99: bei ReadOnly Flag richtig abfragen und ggfs. neu
// formatieren; Bug 61335
@@ -2410,9 +2410,9 @@ void ViewShell::SetReadonlyOption(BOOL bSet)
if( bSet != pOpt->IsReadonly() )
{
// damit die Flags richtig erfragt werden koennen.
- pOpt->SetReadonly( FALSE );
+ pOpt->SetReadonly( sal_False );
- BOOL bReformat = pOpt->IsFldName();
+ sal_Bool bReformat = pOpt->IsFldName();
pOpt->SetReadonly( bSet );
@@ -2439,7 +2439,7 @@ void ViewShell::SetPDFExportOption(sal_Bool bSet)
{
if( bSet &&
getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- pOpt->SetPrtFormat( TRUE );
+ pOpt->SetPrtFormat( sal_True );
pOpt->SetPDFExport(bSet);
}
}
@@ -2462,7 +2462,7 @@ void ViewShell::SetReadonlySelectionOption(sal_Bool bSet)
|*
******************************************************************************/
-void ViewShell::SetPrtFormatOption( BOOL bSet )
+void ViewShell::SetPrtFormatOption( sal_Bool bSet )
{
pOpt->SetPrtFormat( bSet );
}
@@ -2481,26 +2481,26 @@ void ViewShell::UISizeNotify()
{
if ( bDocSizeChgd )
{
- bDocSizeChgd = FALSE;
- BOOL bOld = bInSizeNotify;
- bInSizeNotify = TRUE;
+ bDocSizeChgd = sal_False;
+ sal_Bool bOld = bInSizeNotify;
+ bInSizeNotify = sal_True;
::SizeNotify( this, GetDocSize() );
bInSizeNotify = bOld;
}
}
-void ViewShell::SetRestoreActions(USHORT nSet)
+void ViewShell::SetRestoreActions(sal_uInt16 nSet)
{
DBG_ASSERT(!GetRestoreActions()||!nSet, "mehrfaches Restore der Actions ?");
Imp()->SetRestoreActions(nSet);
}
-USHORT ViewShell::GetRestoreActions() const
+sal_uInt16 ViewShell::GetRestoreActions() const
{
return Imp()->GetRestoreActions();
}
-BOOL ViewShell::IsNewLayout() const
+sal_Bool ViewShell::IsNewLayout() const
{
return GetLayout()->IsNewLayout();
}
@@ -2672,7 +2672,7 @@ sal_Int32 ViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwR
const BitmapEx& ViewShell::GetReplacementBitmap( bool bIsErrorState )
{
BitmapEx** ppRet;
- USHORT nResId = 0, nHCResId = 0;
+ sal_uInt16 nResId = 0, nHCResId = 0;
if( bIsErrorState )
{
ppRet = &pErrorBmp;
@@ -2688,7 +2688,7 @@ const BitmapEx& ViewShell::GetReplacementBitmap( bool bIsErrorState )
if( !*ppRet )
{
- USHORT nBmpResId =
+ sal_uInt16 nBmpResId =
Application::GetSettings().GetStyleSettings().GetHighContrastMode()
? nHCResId : nResId;
*ppRet = new BitmapEx( SW_RES( nBmpResId ) );
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index adf37dd11f22..b371bf64c8b4 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -62,7 +62,7 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "ViewShell::Init" );
- bDocSizeChgd = FALSE;
+ bDocSizeChgd = sal_False;
// Wir gehen auf Nummer sicher:
// Wir muessen die alten Fontinformationen wegschmeissen,
@@ -99,7 +99,7 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
// bevor das Layout angelegt wird. Ansonsten muesste man
// nochmals durchformatieren!!
if( pDShell && pDShell->IsReadOnly() )
- pOpt->SetReadonly( TRUE );
+ pOpt->SetReadonly( sal_True );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "View::Init - before InitPrt" );
@@ -192,8 +192,8 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
mbInConstructor = true;
bPaintInProgress = bViewLocked = bInEndAction = bFrameView =
- bEndActionByVirDev = FALSE;
- bPaintWorks = bEnableSmooth = TRUE;
+ bEndActionByVirDev = sal_False;
+ bPaintWorks = bEnableSmooth = sal_True;
bPreView = 0 !=( VSHELLFLAG_ISPREVIEW & nFlags );
// --> OD 2005-02-11 #i38810# - Do not reset modified state of document,
@@ -272,9 +272,9 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
// <SwDrawContact::Changed> during contruction of <ViewShell> instance
mbInConstructor = true;
- bPaintWorks = bEnableSmooth = TRUE;
+ bPaintWorks = bEnableSmooth = sal_True;
bPaintInProgress = bViewLocked = bInEndAction = bFrameView =
- bEndActionByVirDev = FALSE;
+ bEndActionByVirDev = sal_False;
bPreView = 0 !=( VSHELLFLAG_ISPREVIEW & nFlags );
// OD 12.12.2002 #103492#
if ( bPreView )
@@ -283,7 +283,7 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
SET_CURR_SHELL( this );
pDoc->acquire();
- BOOL bModified = pDoc->IsModified();
+ sal_Bool bModified = pDoc->IsModified();
pOutput = pOut;
Init( rShell.GetViewOptions() ); //verstellt ggf. das Outdev (InitPrt())
@@ -320,7 +320,7 @@ ViewShell::~ViewShell()
{
{
SET_CURR_SHELL( this );
- bPaintWorks = FALSE;
+ bPaintWorks = sal_False;
// FME 2004-06-21 #i9684# Stopping the animated graphics is not
// necessary during printing or pdf export, because the animation
@@ -384,7 +384,7 @@ ViewShell::~ViewShell()
delete pAccOptions;
}
-BOOL ViewShell::HasDrawView() const
+sal_Bool ViewShell::HasDrawView() const
{
return Imp()->HasDrawView();
}
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 83e0289e6082..830a11a7bcb3 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -200,7 +200,7 @@ void SwPaintQueue::Remove( ViewShell *pSh )
* Aenderung :
******************************************************************************/
-void SetSwVisArea( ViewShell *pSh, const SwRect &rRect, BOOL /*bPDFExport*/ )
+void SetSwVisArea( ViewShell *pSh, const SwRect &rRect, sal_Bool /*bPDFExport*/ )
{
ASSERT( !pSh->GetWin(), "Drucken mit Window?" );
pSh->aVisArea = rRect;
@@ -254,15 +254,15 @@ void ViewShell::InitPrt( OutputDevice *pOutDev )
******************************************************************************/
-void ViewShell::ChgAllPageOrientation( USHORT eOri )
+void ViewShell::ChgAllPageOrientation( sal_uInt16 eOri )
{
ASSERT( nStartAction, "missing an Action" );
SET_CURR_SHELL( this );
- USHORT nAll = GetDoc()->GetPageDescCnt();
- BOOL bNewOri = Orientation(eOri) == ORIENTATION_PORTRAIT ? FALSE : TRUE;
+ sal_uInt16 nAll = GetDoc()->GetPageDescCnt();
+ sal_Bool bNewOri = Orientation(eOri) == ORIENTATION_PORTRAIT ? sal_False : sal_True;
- for( USHORT i = 0; i < nAll; ++ i )
+ for( sal_uInt16 i = 0; i < nAll; ++ i )
{
const SwPageDesc& rOld =
const_cast<const SwDoc *>(GetDoc())->GetPageDesc( i );
@@ -307,9 +307,9 @@ void ViewShell::ChgAllPageSize( Size &rSz )
SET_CURR_SHELL( this );
SwDoc* pMyDoc = GetDoc();
- USHORT nAll = pMyDoc->GetPageDescCnt();
+ sal_uInt16 nAll = pMyDoc->GetPageDescCnt();
- for( USHORT i = 0; i < nAll; ++i )
+ for( sal_uInt16 i = 0; i < nAll; ++i )
{
const SwPageDesc &rOld = const_cast<const SwDoc *>(pMyDoc)->GetPageDesc( i );
SwPageDesc aNew( rOld );
@@ -319,7 +319,7 @@ void ViewShell::ChgAllPageSize( Size &rSz )
GetDoc()->DoUndo( bDoesUndo );
SwFrmFmt& rPgFmt = aNew.GetMaster();
Size aSz( rSz );
- const BOOL bOri = aNew.GetLandscape();
+ const sal_Bool bOri = aNew.GetLandscape();
if( bOri ? aSz.Height() > aSz.Width()
: aSz.Height() < aSz.Width() )
{
@@ -336,27 +336,27 @@ void ViewShell::ChgAllPageSize( Size &rSz )
}
-void ViewShell::CalcPagesForPrint( USHORT nMax )
+void ViewShell::CalcPagesForPrint( sal_uInt16 nMax )
{
SET_CURR_SHELL( this );
SwRootFrm* pLayout = GetLayout();
- // ULONG nStatMax = pLayout->GetPageNum();
+ // sal_uLong nStatMax = pLayout->GetPageNum();
const SwFrm *pPage = pLayout->Lower();
SwLayAction aAction( pLayout, Imp() );
pLayout->StartAllAction();
- for ( USHORT i = 1; pPage && i <= nMax; pPage = pPage->GetNext(), ++i )
+ for ( sal_uInt16 i = 1; pPage && i <= nMax; pPage = pPage->GetNext(), ++i )
{
pPage->Calc();
SwRect aOldVis( VisArea() );
aVisArea = pPage->Frm();
Imp()->SetFirstVisPageInvalid();
aAction.Reset();
- aAction.SetPaint( FALSE );
- aAction.SetWaitAllowed( FALSE );
- aAction.SetReschedule( TRUE );
+ aAction.SetPaint( sal_False );
+ aAction.SetWaitAllowed( sal_False );
+ aAction.SetReschedule( sal_True );
aAction.Action();
@@ -387,7 +387,7 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
const SfxPoolItem* pCpyItem;
const SfxItemPool& rPool = GetAttrPool();
- for( USHORT nWh = POOLATTR_BEGIN; nWh < POOLATTR_END; ++nWh )
+ for( sal_uInt16 nWh = POOLATTR_BEGIN; nWh < POOLATTR_END; ++nWh )
if( 0 != ( pCpyItem = rPool.GetPoolDefaultItem( nWh ) ) )
pPrtDoc->GetAttrPool().SetPoolDefaultItem( *pCpyItem );
@@ -530,7 +530,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
//JP 01.02.99: das ReadOnly Flag wird NIE mitkopiert; Bug 61335
if( pOpt->IsReadonly() )
- pShell->pOpt->SetReadonly( TRUE );
+ pShell->pOpt->SetReadonly( sal_True );
// save options at draw view:
SwDrawViewSave aDrawViewSave( pShell->GetDrawView() );
@@ -621,7 +621,7 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
{
SET_CURR_SHELL( pSh );
pSh->PrepareForPrint( rOptions );
- pSh->SetPrtFormatOption( TRUE );
+ pSh->SetPrtFormatOption( sal_True );
SwRect aSwRect( rRect );
pSh->aVisArea = aSwRect;
@@ -629,7 +629,7 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
if ( pSh->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
pSh->GetNext() == pSh )
{
- pSh->CheckBrowseView( FALSE );
+ pSh->CheckBrowseView( sal_False );
pDoc->GetRootFrm()->Lower()->InvalidateSize();
}
@@ -664,7 +664,7 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
-BOOL ViewShell::IsAnyFieldInDoc() const
+sal_Bool ViewShell::IsAnyFieldInDoc() const
{
const SfxPoolItem* pItem;
sal_uInt32 nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
@@ -676,9 +676,9 @@ BOOL ViewShell::IsAnyFieldInDoc() const
//#i101026# mod: do not include postits in field check
const SwField* pFld = pFmtFld->GetFld();
if( pTxtFld && pTxtFld->GetTxtNode().GetNodes().IsDocNodes() && (pFld->Which() != RES_POSTITFLD))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -712,12 +712,12 @@ SwDrawViewSave::~SwDrawViewSave()
void ViewShell::PrepareForPrint( const SwPrintData &rOptions )
{
// Viewoptions fuer den Drucker setzen
- pOpt->SetGraphic ( TRUE == rOptions.bPrintGraphic );
- pOpt->SetTable ( TRUE == rOptions.bPrintTable );
- pOpt->SetDraw ( TRUE == rOptions.bPrintDraw );
- pOpt->SetControl ( TRUE == rOptions.bPrintControl );
- pOpt->SetPageBack( TRUE == rOptions.bPrintPageBackground );
- pOpt->SetBlackFont( TRUE == rOptions.bPrintBlackFont );
+ pOpt->SetGraphic ( sal_True == rOptions.bPrintGraphic );
+ pOpt->SetTable ( sal_True == rOptions.bPrintTable );
+ pOpt->SetDraw ( sal_True == rOptions.bPrintDraw );
+ pOpt->SetControl ( sal_True == rOptions.bPrintControl );
+ pOpt->SetPageBack( sal_True == rOptions.bPrintPageBackground );
+ pOpt->SetBlackFont( sal_True == rOptions.bPrintBlackFont );
if ( HasDrawView() )
{
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index 68e6525d991d..590a63ea915f 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -67,7 +67,7 @@ public:
void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); }
xub_StrLen WhereNext() const { return nAktSwPos; }
- BOOL OutAttr( xub_StrLen nSwPos );
+ sal_Bool OutAttr( xub_StrLen nSwPos );
};
@@ -88,7 +88,7 @@ xub_StrLen SwASC_AttrIter::SearchNext( xub_StrLen nStartPos )
// kann noch optimiert werden, wenn ausgenutzt wird, dass die TxtAttrs
// nach der Anfangsposition geordnet sind. Dann muessten
// allerdings noch 2 Indices gemerkt werden
- for ( USHORT i = 0; i < pTxtAttrs->Count(); i++ )
+ for ( sal_uInt16 i = 0; i < pTxtAttrs->Count(); i++ )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
if (pHt->HasDummyChar())
@@ -107,19 +107,19 @@ xub_StrLen SwASC_AttrIter::SearchNext( xub_StrLen nStartPos )
}
-BOOL SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
+sal_Bool SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwpHints* pTxtAttrs = rNd.GetpSwpHints();
if( pTxtAttrs )
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < pTxtAttrs->Count(); i++ )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
if ( pHt->HasDummyChar() && nSwPos == *pHt->GetStart() )
{
- bRet = TRUE;
+ bRet = sal_True;
String sOut;
switch( pHt->Which() )
{
@@ -163,7 +163,7 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
xub_StrLen nStrPos = rWrt.pCurPam->GetPoint()->nContent.GetIndex();
xub_StrLen nNodeEnde = rNd.Len(), nEnde = nNodeEnde;
- BOOL bLastNd = rWrt.pCurPam->GetPoint()->nNode == rWrt.pCurPam->GetMark()->nNode;
+ sal_Bool bLastNd = rWrt.pCurPam->GetPoint()->nNode == rWrt.pCurPam->GetMark()->nNode;
if( bLastNd )
nEnde = rWrt.pCurPam->GetMark()->nContent.GetIndex();
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index 282551474e36..d95e4ed5a428 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -65,10 +65,10 @@ class SwASCIIParser
const SwAsciiOptions& rOpt;
SfxItemSet* pItemSet;
long nFileSize;
- USHORT nScript;
+ sal_uInt16 nScript;
bool bNewDoc;
- ULONG ReadChars();
+ sal_uLong ReadChars();
void InsertText( const String& rStr );
public:
@@ -76,12 +76,12 @@ public:
int bReadNewDoc, const SwAsciiOptions& rOpts );
~SwASCIIParser();
- ULONG CallParser();
+ sal_uLong CallParser();
};
// Aufruf fuer die allg. Reader-Schnittstelle
-ULONG AsciiReader::Read( SwDoc &rDoc, const String&, SwPaM &rPam, const String & )
+sal_uLong AsciiReader::Read( SwDoc &rDoc, const String&, SwPaM &rPam, const String & )
{
if( !pStrm )
{
@@ -97,7 +97,7 @@ ULONG AsciiReader::Read( SwDoc &rDoc, const String&, SwPaM &rPam, const String &
SwASCIIParser* pParser = new SwASCIIParser( &rDoc, rPam, *pStrm,
!bInsertMode, aOpt.GetASCIIOpts() );
- ULONG nRet = pParser->CallParser();
+ sal_uLong nRet = pParser->CallParser();
delete pParser;
// after Read reset the options
@@ -159,7 +159,7 @@ SwASCIIParser::~SwASCIIParser()
// Aufruf des Parsers
-ULONG SwASCIIParser::CallParser()
+sal_uLong SwASCIIParser::CallParser()
{
rInput.Seek(STREAM_SEEK_TO_END);
rInput.ResetError();
@@ -190,7 +190,7 @@ ULONG SwASCIIParser::CallParser()
pDoc->SetTxtFmtColl(*pPam, pColl);
}
- ULONG nError = ReadChars();
+ sal_uLong nError = ReadChars();
if( pItemSet )
{
@@ -271,7 +271,7 @@ ULONG SwASCIIParser::CallParser()
return nError;
}
-ULONG SwASCIIParser::ReadChars()
+sal_uLong SwASCIIParser::ReadChars()
{
sal_Unicode *pStt = 0, *pEnd = 0, *pLastStt = 0;
long nReadCnt = 0, nLineLen = 0;
@@ -286,7 +286,7 @@ ULONG SwASCIIParser::ReadChars()
aEmpty.GetLanguage() == rOpt.GetLanguage() &&
aEmpty.GetParaFlags() == rOpt.GetParaFlags())
{
- ULONG nLen, nOrig;
+ sal_uLong nLen, nOrig;
nOrig = nLen = rInput.Read(pArr, ASC_BUFFLEN);
CharSet eCharSet;
bool bRet = SwIoSystem::IsDetectableText(pArr, nLen, &eCharSet, &bSwapUnicode);
@@ -323,7 +323,7 @@ ULONG SwASCIIParser::ReadChars()
}
String sWork;
- ULONG nArrOffset = 0;
+ sal_uLong nArrOffset = 0;
do {
if( pStt >= pEnd )
@@ -332,7 +332,7 @@ ULONG SwASCIIParser::ReadChars()
InsertText( String( pLastStt ));
// lese einen neuen Block ein
- ULONG lGCount;
+ sal_uLong lGCount;
if( SVSTREAM_OK != rInput.GetError() || 0 == (lGCount =
rInput.Read( pArr + nArrOffset,
ASC_BUFFLEN - nArrOffset )))
@@ -378,7 +378,7 @@ ULONG SwASCIIParser::ReadChars()
if( bSwapUnicode )
{
sal_Char* pF = pArr, *pN = pArr + 1;
- for( ULONG n = 0; n < lGCount; n += 2, pF += 2, pN += 2 )
+ for( sal_uLong n = 0; n < lGCount; n += 2, pF += 2, pN += 2 )
{
sal_Char c = *pF;
*pF = *pN;
diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx
index 92537c7b213b..ef8f58ebc462 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -99,7 +99,7 @@ SwASCWriter::SwASCWriter( const String& rFltNm )
SwASCWriter::~SwASCWriter() {}
-ULONG SwASCWriter::WriteStream()
+sal_uLong SwASCWriter::WriteStream()
{
sal_Char cLineEnd[ 3 ];
sal_Char* pCEnd = cLineEnd;
@@ -125,7 +125,7 @@ ULONG SwASCWriter::WriteStream()
SwPaM* pPam = pOrigPam;
- BOOL bWriteSttTag = bUCS2_WithStartChar &&
+ sal_Bool bWriteSttTag = bUCS2_WithStartChar &&
(RTL_TEXTENCODING_UCS2 == GetAsciiOptions().GetCharSet() ||
RTL_TEXTENCODING_UTF8 == GetAsciiOptions().GetCharSet());
@@ -134,7 +134,7 @@ ULONG SwASCWriter::WriteStream()
// gebe alle Bereich des Pams in das ASC-File aus.
do {
- BOOL bTstFly = TRUE;
+ sal_Bool bTstFly = sal_True;
while( pCurPam->GetPoint()->nNode.GetIndex() < pCurPam->GetMark()->nNode.GetIndex() ||
(pCurPam->GetPoint()->nNode.GetIndex() == pCurPam->GetMark()->nNode.GetIndex() &&
pCurPam->GetPoint()->nContent.GetIndex() <= pCurPam->GetMark()->nContent.GetIndex()) )
@@ -177,25 +177,25 @@ ULONG SwASCWriter::WriteStream()
switch(GetAsciiOptions().GetCharSet())
{
case RTL_TEXTENCODING_UTF8:
- Strm() << BYTE(0xEF) << BYTE(0xBB) <<
- BYTE(0xBF);
+ Strm() << sal_uInt8(0xEF) << sal_uInt8(0xBB) <<
+ sal_uInt8(0xBF);
break;
case RTL_TEXTENCODING_UCS2:
//Strm().StartWritingUnicodeText();
- Strm().SetEndianSwap(FALSE);
+ Strm().SetEndianSwap(sal_False);
#ifdef OSL_LITENDIAN
- Strm() << BYTE(0xFF) << BYTE(0xFE);
+ Strm() << sal_uInt8(0xFF) << sal_uInt8(0xFE);
#else
- Strm() << BYTE(0xFE) << BYTE(0xFF);
+ Strm() << sal_uInt8(0xFE) << sal_uInt8(0xFF);
#endif
break;
}
- bWriteSttTag = FALSE;
+ bWriteSttTag = sal_False;
}
Out( aASCNodeFnTab, *pNd, *this );
}
- bTstFly = FALSE; // eimal Testen reicht
+ bTstFly = sal_False; // eimal Testen reicht
}
if( !pCurPam->Move( fnMoveForward, fnGoNode ) )
diff --git a/sw/source/filter/ascii/wrtasc.hxx b/sw/source/filter/ascii/wrtasc.hxx
index cbf9fe8dbda5..e1758e9c406a 100644
--- a/sw/source/filter/ascii/wrtasc.hxx
+++ b/sw/source/filter/ascii/wrtasc.hxx
@@ -39,7 +39,7 @@ class SwASCWriter : public Writer
{
String sLineEnd;
- virtual ULONG WriteStream();
+ virtual sal_uLong WriteStream();
public:
SwASCWriter( const String& rFilterName );
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 6f4cca8993d2..ab9f74c31fba 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -1,1037 +1,1037 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sw.hxx"
-#define _SVSTDARR_STRINGS
-
-#include <string.h>
-#include <stdio.h> // sscanf
-#include <hintids.hxx>
-#include <i18npool/lang.h>
-#include <i18npool/mslangid.hxx>
-#include <vcl/msgbox.hxx>
-#include <svtools/parhtml.hxx>
-#include <svl/svstdarr.hxx>
-#include <sot/storage.hxx>
-#include <sot/clsids.hxx>
-#include <sfx2/app.hxx>
-#include <sfx2/docfilt.hxx>
-#include <sfx2/fcontnr.hxx>
-#include <sfx2/docfile.hxx>
-#include <editeng/lrspitem.hxx>
-#include <editeng/tstpitem.hxx>
-#include <doc.hxx>
-#include <docary.hxx>
-#include <pam.hxx>
-#include <shellio.hxx>
-#include <errhdl.hxx>
-#include <docsh.hxx>
-#include <wdocsh.hxx>
-#include <fltini.hxx>
-#include <hints.hxx>
-#include <frmatr.hxx>
-#include <fmtfsize.hxx>
-#include <swtable.hxx>
-#include <fmtcntnt.hxx>
-#include <editeng/boxitem.hxx>
-#include <frmatr.hxx>
-#include <frmfmt.hxx>
-#include <numrule.hxx>
-#include <ndtxt.hxx>
-#include <swfltopt.hxx>
-#include <swerror.h>
-#include <osl/module.hxx>
-#include <comphelper/processfactory.hxx>
-#include <comphelper/componentcontext.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/util/XMacroExpander.hpp>
-#include <rtl/uri.hxx>
-#include <tools/svlibrary.hxx>
-
-using namespace utl;
-using rtl::OUString;
-using namespace com::sun::star::uno;
-using namespace com::sun::star;
-
-SwRead ReadAscii = 0, /*ReadSwg = 0, ReadSw3 = 0,*/
- ReadHTML = 0, ReadXML = 0;
-
-Reader* GetRTFReader();
-Reader* GetWW8Reader();
-
-// Note: if editing, please don't forget to modify also the enum
-// ReaderWriterEnum and aFilterDetect in shellio.hxx
-SwReaderWriterEntry aReaderWriter[] =
-{
- SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, TRUE ),
- SwReaderWriterEntry( 0, &::GetASCWriter, FALSE ),
- SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, TRUE ),
- SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, TRUE ),
- SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, TRUE ),
- SwReaderWriterEntry( 0, &::GetHTMLWriter, TRUE ),
- SwReaderWriterEntry( 0, 0, TRUE ),
- SwReaderWriterEntry( &::GetWW8Reader, 0, TRUE ),
- SwReaderWriterEntry( 0, &::GetXMLWriter, TRUE ),
- SwReaderWriterEntry( 0, &::GetASCWriter, TRUE ),
- SwReaderWriterEntry( 0, &::GetASCWriter, TRUE )
-};
-
-Reader* SwReaderWriterEntry::GetReader()
-{
- if ( pReader )
- return pReader;
- else if ( fnGetReader )
- {
- pReader = (*fnGetReader)();
- return pReader;
- }
- return NULL;
-}
-
-void SwReaderWriterEntry::GetWriter( const String& rNm, const String& rBaseURL, WriterRef& xWrt ) const
-{
- if ( fnGetWriter )
- (*fnGetWriter)( rNm, rBaseURL, xWrt );
- else
- xWrt = WriterRef(0);
-}
-
-/*SwRead SwGetReaderSw3() // SW_DLLPUBLIC
-{
- return ReadSw3;
-}
-*/
-SwRead SwGetReaderXML() // SW_DLLPUBLIC
-{
- return ReadXML;
-}
-
-bool IsDocShellRegistered()
-{
- return 0 != SwDocShell::_GetInterface();
-}
-
-inline void _SetFltPtr( USHORT rPos, SwRead pReader )
-{
- aReaderWriter[ rPos ].pReader = pReader;
-}
-
-void _InitFilter()
-{
- _SetFltPtr( READER_WRITER_BAS, (ReadAscii = new AsciiReader) );
- _SetFltPtr( READER_WRITER_HTML, (ReadHTML = new HTMLReader) );
- _SetFltPtr( READER_WRITER_WW1, new WW1Reader );
- _SetFltPtr( READER_WRITER_XML, (ReadXML = new XMLReader) );
-
-#ifdef NEW_WW97_EXPORT
- aReaderWriter[ READER_WRITER_WW1 ].fnGetWriter = &::GetWW8Writer;
- aReaderWriter[ READER_WRITER_WW5 ].fnGetWriter = &::GetWW8Writer;
-#endif
-
- _SetFltPtr( READER_WRITER_TEXT_DLG, ReadAscii );
- _SetFltPtr( READER_WRITER_TEXT, ReadAscii );
-}
-
-void _FinitFilter()
-{
- // die Reader vernichten
- for( USHORT n = 0; n < MAXFILTER; ++n )
- {
- SwReaderWriterEntry& rEntry = aReaderWriter[n];
- if( rEntry.bDelReader && rEntry.pReader )
- delete rEntry.pReader, rEntry.pReader = NULL;
- }
-}
-
-
-/* */
-
-namespace SwReaderWriter {
-
-Reader* GetReader( ReaderWriterEnum eReader )
-{
- return aReaderWriter[eReader].GetReader();
-}
-
-void GetWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
-{
- for( USHORT n = 0; n < MAXFILTER; ++n )
- if( aFilterDetect[n].IsFilter( rFltName ) )
- {
- aReaderWriter[n].GetWriter( rFltName, rBaseURL, xRet );
- break;
- }
-}
-
-SwRead GetReader( const String& rFltName )
-{
- SwRead pRead = 0;
- for( USHORT n = 0; n < MAXFILTER; ++n )
- if( aFilterDetect[n].IsFilter( rFltName ) )
- {
- pRead = aReaderWriter[n].GetReader();
- // fuer einige Reader noch eine Sonderbehandlung:
- if ( pRead )
- pRead->SetFltName( rFltName );
- break;
- }
- return pRead;
-}
-
-} // namespace SwReaderWriter
-
-/* */
-
-/////////////// die Storage Reader/Writer ////////////////////////////////
-
-/*void GetSw3Writer( const String&, const String& rBaseURL, WriterRef& xRet )
-{
- DBG_ERROR( "Shouldn't happen!");
- xRet = new Sw3Writer;
-}
-*/
-
-ULONG StgReader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize )
-{
- ULONG nRet = ERR_SWG_READ_ERROR;
- ASSERT( pStg, "wo ist mein Storage?" );
- const SfxFilter* pFltr = SwIoSystem::GetFilterOfFormat( aFltName );
- if( pFltr )
- {
- rRef = pStg->OpenSotStream( SwIoSystem::GetSubStorageName( *pFltr ),
- STREAM_READ | STREAM_SHARE_DENYALL );
-
- if( rRef.Is() )
- {
- if( SVSTREAM_OK == rRef->GetError() )
- {
- USHORT nOld = rRef->GetBufferSize();
- rRef->SetBufferSize( rBuffSize );
- rBuffSize = nOld;
- nRet = 0;
- }
- else
- nRet = rRef->GetError();
- }
- }
- return nRet;
-}
-
-/* */
-/*
-ULONG Sw3Reader::Read( SwDoc &rDoc, SwPaM &rPam, const String & )
-{
- ULONG nRet;
- if( pStg && pIO )
- {
- // TRUE: Vorlagen ueberschreiben
- pIO->SetReadOptions( aOpt,TRUE );
- if( !bInsertMode )
- {
- // Im Laden-Modus darf der PaM-Content-Teil nicht
- // in den Textbereich zeigen (Nodes koennen geloescht werden)
- rPam.GetBound( TRUE ).nContent.Assign( 0, 0 );
- rPam.GetBound( FALSE ).nContent.Assign( 0, 0 );
- }
- nRet = pIO->Load( pStg, bInsertMode ? &rPam : 0 );
- aOpt.ResetAllFmtsOnly();
- pIO->SetReadOptions( aOpt, TRUE );
- }
- else
- {
- ASSERT( !this, "Sw3-Read ohne Storage und/oder IO-System" );
- nRet = ERR_SWG_READ_ERROR;
- }
- return nRet;
-}
-
- // read the sections of the document, which is equal to the medium.
- // returns the count of it
-USHORT Sw3Reader::GetSectionList( SfxMedium& rMedium,
- SvStrings& rStrings ) const
-{
- SvStorageRef aStg( rMedium.GetStorage() );
- const SfxFilter* pFlt = rMedium.GetFilter();
- ASSERT( pFlt && pFlt->GetVersion(),
- "Kein Filter oder Filter ohne FF-Version" );
- if( pFlt && pFlt->GetVersion() )
- aStg->SetVersion( (long)pFlt->GetVersion() );
-
- if( pIO )
- pIO->GetSectionList( &aStg, rStrings );
- return rStrings.Count();
- return 0;
-}
-*/
-
-/*ULONG Sw3Writer::WriteStorage()
-{
- ULONG nRet;
- if( pIO )
- {
- // der gleiche Storage -> Save, sonst SaveAs aufrufen
- if( !bSaveAs )
- nRet = pIO->Save( pOrigPam, bWriteAll );
- else
- nRet = pIO->SaveAs( pStg, pOrigPam, bWriteAll );
-
- pIO = 0; // nach dem Schreiben ist der Pointer ungueltig !!
- }
- else
- {
- ASSERT( !this, "Sw3-Writer ohne IO-System" )
- nRet = ERR_SWG_WRITE_ERROR;
- }
- return nRet;
-}
-
-ULONG Sw3Writer::WriteMedium( SfxMedium& )
-{
- DBG_ERROR( "Shouldn't be used currently!");
- return WriteStorage();
-}
-
-BOOL Sw3Writer::IsSw3Writer() const { return TRUE; }
-*/
-
-void Writer::SetPasswd( const String& ) {}
-
-
-void Writer::SetVersion( const String&, long ) {}
-
-
-BOOL Writer::IsStgWriter() const { return FALSE; }
-//BOOL Writer::IsSw3Writer() const { return FALSE; }
-
-BOOL StgWriter::IsStgWriter() const { return TRUE; }
-
-/* */
-
-
-
-BOOL SwReader::NeedsPasswd( const Reader& /*rOptions*/ )
-{
- BOOL bRes = FALSE;
- return bRes;
-}
-
-
-BOOL SwReader::CheckPasswd( const String& /*rPasswd*/, const Reader& /*rOptions*/ )
-{
- return TRUE;
-}
-
-
-/* */
-
-//-----------------------------------------------------------------------
-// Filter Flags lesen, wird von WW8 / W4W / EXCEL / LOTUS benutzt.
-//-----------------------------------------------------------------------
-
-/*
-<FilterFlags>
- <Excel_Lotus>
- <MinRow cfg:type="long">0</MinRow>
- <MaxRow cfg:type="long">0</MaxRow>
- <MinCol cfg:type="long">0</MinCol>
- <MaxCol cfg:type="long">0</MaxCol>
- </Excel_Lotus>
- <W4W>
- <W4WHD cfg:type="long">0</W4WHD>
- <W4WFT cfg:type="long">0</W4WFT>
- <W4W000 cfg:type="long">0</W4W000>
- </W4W>
- <WinWord>
- <WW1F cfg:type="long">0</WW1F>
- <WW cfg:type="long">0</WW>
- <WW8 cfg:type="long">0</WW8>
- <WWF cfg:type="long">0</WWF>
- <WWFA0 cfg:type="long">0</WWFA0>
- <WWFA1 cfg:type="long">0</WWFA1>
- <WWFA2 cfg:type="long">0</WWFA2>
- <WWFB0 cfg:type="long">0</WWFB0>
- <WWFB1 cfg:type="long">0</WWFB1>
- <WWFB2 cfg:type="long">0</WWFB2>
- <WWFLX cfg:type="long">0</WWFLX>
- <WWFLY cfg:type="long">0</WWFLY>
- <WWFT cfg:type="long">0</WWFT>
- <WWWR cfg:type="long">0</WWWR>
- </WinWord>
- <Writer>
- <SW3Imp cfg:type="long">0</SW3Imp>
- </Writer>
-</FilterFlags>
-*/
-
-#define FILTER_OPTION_ROOT String::CreateFromAscii( \
- RTL_CONSTASCII_STRINGPARAM( "Office.Writer/FilterFlags" ) )
-
-SwFilterOptions::SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames,
- sal_uInt32* pValues )
- : ConfigItem( FILTER_OPTION_ROOT )
-{
- GetValues( nCnt, ppNames, pValues );
-}
-
-void SwFilterOptions::GetValues( sal_uInt16 nCnt, const sal_Char** ppNames,
- sal_uInt32* pValues )
-{
- Sequence<OUString> aNames( nCnt );
- OUString* pNames = aNames.getArray();
- USHORT n;
-
- for( n = 0; n < nCnt; ++n )
- pNames[ n ] = OUString::createFromAscii( ppNames[ n ] );
- Sequence<Any> aValues = GetProperties( aNames );
-
- if( nCnt == aValues.getLength() )
- {
- const Any* pAnyValues = aValues.getConstArray();
- for( n = 0; n < nCnt; ++n )
- pValues[ n ] = pAnyValues[ n ].hasValue()
- ? *(sal_uInt32*)pAnyValues[ n ].getValue()
- : 0;
- }
- else
- for( n = 0; n < nCnt; ++n )
- pValues[ n ] = 0;
-}
-
-void SwFilterOptions::Commit() {}
-void SwFilterOptions::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
-
-/* */
-
-
-void StgReader::SetFltName( const String& rFltNm )
-{
- if( SW_STORAGE_READER & GetReaderType() )
- aFltName = rFltNm;
-}
-
-
-/* */
-
-SwRelNumRuleSpaces::SwRelNumRuleSpaces( SwDoc& rDoc, BOOL bNDoc )
- : bNewDoc( bNDoc )
-{
- pNumRuleTbl = new SwNumRuleTbl( 8, 8 );
- if( !bNDoc )
- pNumRuleTbl->Insert( &rDoc.GetNumRuleTbl(), 0 );
-}
-
-SwRelNumRuleSpaces::~SwRelNumRuleSpaces()
-{
- if( pNumRuleTbl )
- {
- pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
- delete pNumRuleTbl;
- }
-}
-
-void SwRelNumRuleSpaces::SetNumRelSpaces( SwDoc& rDoc )
-{
- const SwNumRuleTbl* pRuleTbl = NULL;
-
- if( !bNewDoc )
- {
- // jetzt alle schon vorhanden NumRules aus dem Array entfernen,
- // damit nur die neuen angepasst werden
- SwNumRuleTbl aNumRuleTbl;
- aNumRuleTbl.Insert( pNumRuleTbl, 0 );
- pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
- const SwNumRuleTbl& rRuleTbl = rDoc.GetNumRuleTbl();
- SwNumRule* pRule;
-
- for( USHORT n = 0; n < rRuleTbl.Count(); ++n )
- if( USHRT_MAX == aNumRuleTbl.GetPos( ( pRule = rRuleTbl[ n ] )))
- // war noch nicht vorhanden, also neu
- pNumRuleTbl->Insert( pRule, pNumRuleTbl->Count() );
-
- aNumRuleTbl.Remove( 0, aNumRuleTbl.Count() );
-
- pRuleTbl = pNumRuleTbl;
- }
- else
- {
- pRuleTbl = &rDoc.GetNumRuleTbl();
- }
-
- if( pRuleTbl )
- {
- for( USHORT n = pRuleTbl->Count(); n; )
- {
- SwNumRule* pRule = (*pRuleTbl)[ --n ];
- // Rule noch gueltig und am Doc vorhanden?
- if( USHRT_MAX != rDoc.GetNumRuleTbl().GetPos( pRule ))
- {
- // --> OD 2008-02-19 #refactorlists#
-// SwNumRuleInfo aUpd( pRule->GetName() );
-// aUpd.MakeList( rDoc );
-
-// // bei allen nmumerierten Absaetzen vom linken Rand
-// // den absoluten Wert des NumFormates abziehen
-// for( ULONG nUpdPos = 0; nUpdPos < aUpd.GetList().Count();
-// ++nUpdPos )
-// {
-// SwTxtNode* pNd = aUpd.GetList().GetObject( nUpdPos );
-// SetNumLSpace( *pNd, *pRule );
-// }
- SwNumRule::tTxtNodeList aTxtNodeList;
- pRule->GetTxtNodeList( aTxtNodeList );
- for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin();
- aIter != aTxtNodeList.end(); ++aIter )
- {
- SwTxtNode* pNd = *aIter;
- SetNumLSpace( *pNd, *pRule );
- }
- // <--
- }
- }
- }
-
- if( pNumRuleTbl )
- {
- pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
- delete pNumRuleTbl, pNumRuleTbl = 0;
- }
-
- if( bNewDoc )
- {
- SetOultineRelSpaces( SwNodeIndex( rDoc.GetNodes() ),
- SwNodeIndex( rDoc.GetNodes().GetEndOfContent()));
- }
-}
-
-void SwRelNumRuleSpaces::SetOultineRelSpaces( const SwNodeIndex& rStt,
- const SwNodeIndex& rEnd )
-{
- SwDoc* pDoc = rStt.GetNode().GetDoc();
- const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
- if( rOutlNds.Count() )
- {
- USHORT nPos;
- rOutlNds.Seek_Entry( &rStt.GetNode(), &nPos );
- for( ; nPos < rOutlNds.Count() &&
- rOutlNds[ nPos ]->GetIndex() < rEnd.GetIndex(); ++nPos )
- {
- SwTxtNode* pNd = rOutlNds[ nPos ]->GetTxtNode();
- if( pNd->IsOutline() && !pNd->GetNumRule() )
- SetNumLSpace( *pNd, *pDoc->GetOutlineNumRule() );
- }
- }
-}
-
-void SwRelNumRuleSpaces::SetNumLSpace( SwTxtNode& rNd, const SwNumRule& rRule )
-{
- BOOL bOutlineRule = OUTLINE_RULE == rRule.GetRuleType();
- // --> OD 2005-11-18 #128056#
- // correction of refactoring done by cws swnumtree:
- // - assure a correct level for retrieving numbering format.
-// BYTE nLvl = rNd.GetLevel();
- BYTE nLvl = 0;
- if ( rNd.GetActualListLevel() >= 0 && rNd.GetActualListLevel() < MAXLEVEL )
- {
- nLvl = static_cast< BYTE >(rNd.GetActualListLevel());
- }
- // <--
- const SwNumFmt& rFmt = rRule.Get( nLvl );
- const SvxLRSpaceItem& rLR = rNd.GetSwAttrSet().GetLRSpace();
-
- SvxLRSpaceItem aLR( rLR );
- aLR.SetTxtFirstLineOfst( 0 );
-
- // sagt der Node, das die Numerierung den Wert vorgibt?
- if( !bOutlineRule && rNd.IsSetNumLSpace() )
- aLR.SetTxtLeft( 0 );
- else
- {
- long nLeft = rFmt.GetAbsLSpace(), nParaLeft = rLR.GetTxtLeft();
- if( 0 < rLR.GetTxtFirstLineOfst() )
- nParaLeft += rLR.GetTxtFirstLineOfst();
- else if( nParaLeft >= nLeft )
- // #82963#/#82962#: set correct paragraph indent
- nParaLeft -= nLeft;
- else
- //#83154#, Don't think any of the older #80856# bugfix code is
- //relevent anymore.
- nParaLeft = rLR.GetTxtLeft()+rLR.GetTxtFirstLineOfst();
- aLR.SetTxtLeft( nParaLeft );
- }
-
- if( aLR.GetTxtLeft() != rLR.GetTxtLeft() )
- {
- //bevor rLR geloescht wird!
- long nOffset = rLR.GetTxtLeft() - aLR.GetTxtLeft();
- rNd.SetAttr( aLR );
-
- // Tabs anpassen !!
- const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(
- RES_PARATR_TABSTOP, TRUE, &pItem ))
- {
- SvxTabStopItem aTStop( *(SvxTabStopItem*)pItem );
- for( USHORT n = 0; n < aTStop.Count(); ++n )
- {
- SvxTabStop& rTab = (SvxTabStop&)aTStop[ n ];
- if( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() )
- {
- if( !rTab.GetTabPos() )
- {
- aTStop.Remove( n );
- --n;
- }
- else
- rTab.GetTabPos() += nOffset;
- }
- }
- rNd.SetAttr( aTStop );
- }
- }
-}
-
-/* */
-
-
-void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
- SwTwips nPageWidth)
-{
- const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET != rFlySet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ) ||
- MINFLY > ((SwFmtFrmSize*)pItem)->GetWidth() )
- {
- SwFmtFrmSize aSz((SwFmtFrmSize&)rFlySet.Get(RES_FRM_SIZE, TRUE));
- if (pItem)
- aSz = (SwFmtFrmSize&)(*pItem);
-
- SwTwips nWidth;
- // dann die Breite des Flys selbst bestimmen. Ist eine Tabelle
- // defininiert, dann benutze deren Breite, sonst die Breite der
- // Seite
- const SwTableNode* pTblNd = rAnchor.GetNode().FindTableNode();
- if( pTblNd )
- nWidth = pTblNd->GetTable().GetFrmFmt()->GetFrmSize().GetWidth();
- else
- nWidth = nPageWidth;
-
- const SwNodeIndex* pSttNd = ((SwFmtCntnt&)rFlySet.Get( RES_CNTNT )).
- GetCntntIdx();
- if( pSttNd )
- {
- BOOL bOnlyOneNode = TRUE;
- ULONG nMinFrm = 0;
- ULONG nMaxFrm = 0;
- SwTxtNode* pFirstTxtNd = 0;
- SwNodeIndex aIdx( *pSttNd, 1 );
- SwNodeIndex aEnd( *pSttNd->GetNode().EndOfSectionNode() );
- while( aIdx < aEnd )
- {
- SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode();
- if( pTxtNd )
- {
- if( !pFirstTxtNd )
- pFirstTxtNd = pTxtNd;
- else if( pFirstTxtNd != pTxtNd )
- {
- // forget it
- bOnlyOneNode = FALSE;
- break;
- }
-
- ULONG nAbsMinCnts;
- pTxtNd->GetMinMaxSize( aIdx.GetIndex(), nMinFrm,
- nMaxFrm, nAbsMinCnts );
- }
- aIdx++;
- }
-
- if( bOnlyOneNode )
- {
- if( nMinFrm < MINLAY && pFirstTxtNd )
- {
- // if the first node dont contained any content, then
- // insert one char in it calc again and delete once again
- SwIndex aNdIdx( pFirstTxtNd );
- pFirstTxtNd->InsertText( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "MM" )), aNdIdx );
- ULONG nAbsMinCnts;
- pFirstTxtNd->GetMinMaxSize( pFirstTxtNd->GetIndex(),
- nMinFrm, nMaxFrm, nAbsMinCnts );
- aNdIdx -= 2;
- pFirstTxtNd->EraseText( aNdIdx, 2 );
- }
-
- // Umrandung und Abstand zum Inhalt beachten
- const SvxBoxItem& rBoxItem = (SvxBoxItem&)rFlySet.Get( RES_BOX );
- USHORT nLine = BOX_LINE_LEFT;
- for( int i = 0; i < 2; ++i )
- {
- const SvxBorderLine* pLn = rBoxItem.GetLine( nLine );
- if( pLn )
- {
- USHORT nWidthTmp = pLn->GetOutWidth() + pLn->GetInWidth();
- nWidthTmp = nWidthTmp + rBoxItem.GetDistance( nLine );
- nMinFrm += nWidthTmp;
- nMaxFrm += nWidthTmp;
- }
- nLine = BOX_LINE_RIGHT;
- }
-
- // Mindestbreite fuer Inhalt einhalten
- if( nMinFrm < MINLAY )
- nMinFrm = MINLAY;
- if( nMaxFrm < MINLAY )
- nMaxFrm = MINLAY;
-
- if( nWidth > (USHORT)nMaxFrm )
- nWidth = nMaxFrm;
- else if( nWidth > (USHORT)nMinFrm )
- nWidth = nMinFrm;
- }
- }
-
- if( MINFLY > nWidth )
- nWidth = MINFLY;
-
- aSz.SetWidth( nWidth );
- if( MINFLY > aSz.GetHeight() )
- aSz.SetHeight( MINFLY );
- rFlySet.Put( aSz );
- }
- else if( MINFLY > ((SwFmtFrmSize*)pItem)->GetHeight() )
- {
- SwFmtFrmSize aSz( *(SwFmtFrmSize*)pItem );
- aSz.SetHeight( MINFLY );
- rFlySet.Put( aSz );
- }
-}
-
-/* */
-struct CharSetNameMap
-{
- rtl_TextEncoding eCode;
- const sal_Char* pName;
-};
-
-const CharSetNameMap *GetCharSetNameMap()
-{
- static const CharSetNameMap aMapArr[] =
- {
-# define IMPLENTRY(X) { RTL_TEXTENCODING_##X, "" #X "" }
- IMPLENTRY(DONTKNOW),
- IMPLENTRY(MS_1252),
- IMPLENTRY(APPLE_ROMAN),
- IMPLENTRY(IBM_437),
- IMPLENTRY(IBM_850),
- IMPLENTRY(IBM_860),
- IMPLENTRY(IBM_861),
- IMPLENTRY(IBM_863),
- IMPLENTRY(IBM_865),
- IMPLENTRY(SYMBOL),
- IMPLENTRY(ASCII_US),
- IMPLENTRY(ISO_8859_1),
- IMPLENTRY(ISO_8859_2),
- IMPLENTRY(ISO_8859_3),
- IMPLENTRY(ISO_8859_4),
- IMPLENTRY(ISO_8859_5),
- IMPLENTRY(ISO_8859_6),
- IMPLENTRY(ISO_8859_7),
- IMPLENTRY(ISO_8859_8),
- IMPLENTRY(ISO_8859_9),
- IMPLENTRY(ISO_8859_14),
- IMPLENTRY(ISO_8859_15),
- IMPLENTRY(IBM_737),
- IMPLENTRY(IBM_775),
- IMPLENTRY(IBM_852),
- IMPLENTRY(IBM_855),
- IMPLENTRY(IBM_857),
- IMPLENTRY(IBM_862),
- IMPLENTRY(IBM_864),
- IMPLENTRY(IBM_866),
- IMPLENTRY(IBM_869),
- IMPLENTRY(MS_874),
- IMPLENTRY(MS_1250),
- IMPLENTRY(MS_1251),
- IMPLENTRY(MS_1253),
- IMPLENTRY(MS_1254),
- IMPLENTRY(MS_1255),
- IMPLENTRY(MS_1256),
- IMPLENTRY(MS_1257),
- IMPLENTRY(MS_1258),
- IMPLENTRY(APPLE_ARABIC),
- IMPLENTRY(APPLE_CENTEURO),
- IMPLENTRY(APPLE_CROATIAN),
- IMPLENTRY(APPLE_CYRILLIC),
- IMPLENTRY(APPLE_DEVANAGARI),
- IMPLENTRY(APPLE_FARSI),
- IMPLENTRY(APPLE_GREEK),
- IMPLENTRY(APPLE_GUJARATI),
- IMPLENTRY(APPLE_GURMUKHI),
- IMPLENTRY(APPLE_HEBREW),
- IMPLENTRY(APPLE_ICELAND),
- IMPLENTRY(APPLE_ROMANIAN),
- IMPLENTRY(APPLE_THAI),
- IMPLENTRY(APPLE_TURKISH),
- IMPLENTRY(APPLE_UKRAINIAN),
- IMPLENTRY(APPLE_CHINSIMP),
- IMPLENTRY(APPLE_CHINTRAD),
- IMPLENTRY(APPLE_JAPANESE),
- IMPLENTRY(APPLE_KOREAN),
- IMPLENTRY(MS_932),
- IMPLENTRY(MS_936),
- IMPLENTRY(MS_949),
- IMPLENTRY(MS_950),
- IMPLENTRY(SHIFT_JIS),
- IMPLENTRY(GB_2312),
- IMPLENTRY(GBT_12345),
- IMPLENTRY(GBK),
- IMPLENTRY(BIG5),
- IMPLENTRY(EUC_JP),
- IMPLENTRY(EUC_CN),
- IMPLENTRY(EUC_TW),
- IMPLENTRY(ISO_2022_JP),
- IMPLENTRY(ISO_2022_CN),
- IMPLENTRY(KOI8_R),
- IMPLENTRY(KOI8_U),
- IMPLENTRY(UTF7),
- IMPLENTRY(UTF8),
- IMPLENTRY(ISO_8859_10),
- IMPLENTRY(ISO_8859_13),
- IMPLENTRY(EUC_KR),
- IMPLENTRY(ISO_2022_KR),
- IMPLENTRY(JIS_X_0201),
- IMPLENTRY(JIS_X_0208),
- IMPLENTRY(JIS_X_0212),
- IMPLENTRY(MS_1361),
- IMPLENTRY(GB_18030),
- IMPLENTRY(BIG5_HKSCS),
- IMPLENTRY(TIS_620),
- IMPLENTRY(PT154),
- IMPLENTRY(UCS4),
- IMPLENTRY(UCS2),
- IMPLENTRY(UNICODE),
- {0,0} //Last
- };
- return &aMapArr[0];
-}
-/*
- Get a rtl_TextEncoding from its name
- */
-rtl_TextEncoding CharSetFromName(const String& rChrSetStr)
-{
- const CharSetNameMap *pStart = GetCharSetNameMap();
- rtl_TextEncoding nRet = pStart->eCode;
-
- for(const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap)
- {
- if(rChrSetStr.EqualsIgnoreCaseAscii(pMap->pName))
- {
- nRet = pMap->eCode;
- break;
- }
- }
-
- ASSERT(nRet != pStart->eCode, "TXT: That was an unknown language!");
-
- return nRet;
-}
-
-
-/*
- Get the String name of an rtl_TextEncoding
- */
-String NameFromCharSet(rtl_TextEncoding nChrSet)
-{
- const CharSetNameMap *pStart = GetCharSetNameMap();
- const char *pRet = pStart->pName;
-
- for(const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap)
- {
- if (nChrSet == pMap->eCode)
- {
- pRet = pMap->pName;
- break;
- }
- }
-
- ASSERT(pRet != pStart->pName, "TXT: That was an unknown language!");
-
- return String::CreateFromAscii(pRet);
-}
-
-// for the automatic conversion (mail/news/...)
-// The user data contains the options for the ascii import/export filter.
-// The format is:
-// 1. CharSet - as ascii chars
-// 2. LineEnd - as CR/LR/CRLF
-// 3. Fontname
-// 4. Language
-// the delimetercharacter is ","
-//
-
-void SwAsciiOptions::ReadUserData( const String& rStr )
-{
- xub_StrLen nToken = 0;
- USHORT nCnt = 0;
- String sToken;
- do {
- if( 0 != (sToken = rStr.GetToken( 0, ',', nToken )).Len() )
- {
- switch( nCnt )
- {
- case 0: // CharSet
- eCharSet = CharSetFromName(sToken);
- break;
- case 1: // LineEnd
- if( sToken.EqualsIgnoreCaseAscii( "CRLF" ))
- eCRLF_Flag = LINEEND_CRLF;
- else if( sToken.EqualsIgnoreCaseAscii( "LF" ))
- eCRLF_Flag = LINEEND_LF;
- else
- eCRLF_Flag = LINEEND_CR;
- break;
- case 2: // fontname
- sFont = sToken;
- break;
- case 3: // Language
- nLanguage = MsLangId::convertIsoStringToLanguage( sToken );
- break;
- }
- }
- ++nCnt;
- } while( STRING_NOTFOUND != nToken );
-}
-
-void SwAsciiOptions::WriteUserData( String& rStr )
-{
- // 1. charset
- rStr = NameFromCharSet(eCharSet);
- rStr += ',';
-
- // 2. LineEnd
- switch(eCRLF_Flag)
- {
- case LINEEND_CRLF:
- rStr.AppendAscii( "CRLF" );
- break;
- case LINEEND_CR:
- rStr.AppendAscii( "CR" );
- break;
- case LINEEND_LF:
- rStr.AppendAscii( "LF" );
- break;
- }
- rStr += ',';
-
- // 3. Fontname
- rStr += sFont;
- rStr += ',';
-
- // 4. Language
- if (nLanguage)
- {
- rtl::OUString sTmp = MsLangId::convertLanguageToIsoString( nLanguage );
- rStr += (String)sTmp;
- }
- rStr += ',';
-}
-
-extern "C" { static void SAL_CALL thisModule() {} }
-
-static oslGenericFunction GetMswordLibSymbol( const char *pSymbol )
-{
- static ::osl::Module aModule;
- static sal_Bool bLoaded = sal_False;
- static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "msword" ) ) );
- if (!bLoaded)
- bLoaded = SvLibrary::LoadModule( aModule, aLibName, &thisModule );
- if (bLoaded)
- return aModule.getFunctionSymbol( ::rtl::OUString::createFromAscii( pSymbol ) );
- return NULL;
-}
-
-Reader* GetRTFReader()
-{
- FnGetReader pFunction = reinterpret_cast<FnGetReader>( GetMswordLibSymbol( "ImportRTF" ) );
-
- if ( pFunction )
- return (*pFunction)();
-
- return NULL;
-}
-
-void GetRTFWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
-{
- FnGetWriter pFunction = reinterpret_cast<FnGetWriter>( GetMswordLibSymbol( "ExportRTF" ) );
-
- if ( pFunction )
- (*pFunction)( rFltName, rBaseURL, xRet );
- else
- xRet = WriterRef(0);
-}
-
-Reader* GetWW8Reader()
-{
- FnGetReader pFunction = reinterpret_cast<FnGetReader>( GetMswordLibSymbol( "ImportDOC" ) );
-
- if ( pFunction )
- return (*pFunction)();
-
- return NULL;
-}
-
-void GetWW8Writer( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
-{
- FnGetWriter pFunction = reinterpret_cast<FnGetWriter>( GetMswordLibSymbol( "ExportDOC" ) );
-
- if ( pFunction )
- (*pFunction)( rFltName, rBaseURL, xRet );
- else
- xRet = WriterRef(0);
-}
-
-typedef ULONG ( __LOADONCALLAPI *SaveOrDel )( SfxObjectShell&, SotStorage&, BOOL, const String& );
-typedef ULONG ( __LOADONCALLAPI *GetSaveWarning )( SfxObjectShell& );
-
-ULONG SaveOrDelMSVBAStorage( SfxObjectShell& rDoc, SotStorage& rStor, BOOL bSaveInto, const String& rStorageName )
-{
- SaveOrDel pFunction = reinterpret_cast<SaveOrDel>( GetMswordLibSymbol( "SaveOrDelMSVBAStorage_ww8" ) );
- if( pFunction )
- return pFunction( rDoc, rStor, bSaveInto, rStorageName );
- return ERRCODE_NONE;
-}
-
-ULONG GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS )
-{
- GetSaveWarning pFunction = reinterpret_cast<GetSaveWarning>( GetMswordLibSymbol( "GetSaveWarningOfMSVBAStorage_ww8" ) );
- if( pFunction )
- return pFunction( rDocS );
- return ERRCODE_NONE;
-}
-
-
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+#define _SVSTDARR_STRINGS
+
+#include <string.h>
+#include <stdio.h> // sscanf
+#include <hintids.hxx>
+#include <i18npool/lang.h>
+#include <i18npool/mslangid.hxx>
+#include <vcl/msgbox.hxx>
+#include <svtools/parhtml.hxx>
+#include <svl/svstdarr.hxx>
+#include <sot/storage.hxx>
+#include <sot/clsids.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/docfilt.hxx>
+#include <sfx2/fcontnr.hxx>
+#include <sfx2/docfile.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/tstpitem.hxx>
+#include <doc.hxx>
+#include <docary.hxx>
+#include <pam.hxx>
+#include <shellio.hxx>
+#include <errhdl.hxx>
+#include <docsh.hxx>
+#include <wdocsh.hxx>
+#include <fltini.hxx>
+#include <hints.hxx>
+#include <frmatr.hxx>
+#include <fmtfsize.hxx>
+#include <swtable.hxx>
+#include <fmtcntnt.hxx>
+#include <editeng/boxitem.hxx>
+#include <frmatr.hxx>
+#include <frmfmt.hxx>
+#include <numrule.hxx>
+#include <ndtxt.hxx>
+#include <swfltopt.hxx>
+#include <swerror.h>
+#include <osl/module.hxx>
+#include <comphelper/processfactory.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/util/XMacroExpander.hpp>
+#include <rtl/uri.hxx>
+#include <tools/svlibrary.hxx>
+
+using namespace utl;
+using rtl::OUString;
+using namespace com::sun::star::uno;
+using namespace com::sun::star;
+
+SwRead ReadAscii = 0, /*ReadSwg = 0, ReadSw3 = 0,*/
+ ReadHTML = 0, ReadXML = 0;
+
+Reader* GetRTFReader();
+Reader* GetWW8Reader();
+
+// Note: if editing, please don't forget to modify also the enum
+// ReaderWriterEnum and aFilterDetect in shellio.hxx
+SwReaderWriterEntry aReaderWriter[] =
+{
+ SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, sal_True ),
+ SwReaderWriterEntry( 0, &::GetASCWriter, sal_False ),
+ SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, sal_True ),
+ SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, sal_True ),
+ SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, sal_True ),
+ SwReaderWriterEntry( 0, &::GetHTMLWriter, sal_True ),
+ SwReaderWriterEntry( 0, 0, sal_True ),
+ SwReaderWriterEntry( &::GetWW8Reader, 0, sal_True ),
+ SwReaderWriterEntry( 0, &::GetXMLWriter, sal_True ),
+ SwReaderWriterEntry( 0, &::GetASCWriter, sal_True ),
+ SwReaderWriterEntry( 0, &::GetASCWriter, sal_True )
+};
+
+Reader* SwReaderWriterEntry::GetReader()
+{
+ if ( pReader )
+ return pReader;
+ else if ( fnGetReader )
+ {
+ pReader = (*fnGetReader)();
+ return pReader;
+ }
+ return NULL;
+}
+
+void SwReaderWriterEntry::GetWriter( const String& rNm, const String& rBaseURL, WriterRef& xWrt ) const
+{
+ if ( fnGetWriter )
+ (*fnGetWriter)( rNm, rBaseURL, xWrt );
+ else
+ xWrt = WriterRef(0);
+}
+
+/*SwRead SwGetReaderSw3() // SW_DLLPUBLIC
+{
+ return ReadSw3;
+}
+*/
+SwRead SwGetReaderXML() // SW_DLLPUBLIC
+{
+ return ReadXML;
+}
+
+bool IsDocShellRegistered()
+{
+ return 0 != SwDocShell::_GetInterface();
+}
+
+inline void _SetFltPtr( sal_uInt16 rPos, SwRead pReader )
+{
+ aReaderWriter[ rPos ].pReader = pReader;
+}
+
+void _InitFilter()
+{
+ _SetFltPtr( READER_WRITER_BAS, (ReadAscii = new AsciiReader) );
+ _SetFltPtr( READER_WRITER_HTML, (ReadHTML = new HTMLReader) );
+ _SetFltPtr( READER_WRITER_WW1, new WW1Reader );
+ _SetFltPtr( READER_WRITER_XML, (ReadXML = new XMLReader) );
+
+#ifdef NEW_WW97_EXPORT
+ aReaderWriter[ READER_WRITER_WW1 ].fnGetWriter = &::GetWW8Writer;
+ aReaderWriter[ READER_WRITER_WW5 ].fnGetWriter = &::GetWW8Writer;
+#endif
+
+ _SetFltPtr( READER_WRITER_TEXT_DLG, ReadAscii );
+ _SetFltPtr( READER_WRITER_TEXT, ReadAscii );
+}
+
+void _FinitFilter()
+{
+ // die Reader vernichten
+ for( sal_uInt16 n = 0; n < MAXFILTER; ++n )
+ {
+ SwReaderWriterEntry& rEntry = aReaderWriter[n];
+ if( rEntry.bDelReader && rEntry.pReader )
+ delete rEntry.pReader, rEntry.pReader = NULL;
+ }
+}
+
+
+/* */
+
+namespace SwReaderWriter {
+
+Reader* GetReader( ReaderWriterEnum eReader )
+{
+ return aReaderWriter[eReader].GetReader();
+}
+
+void GetWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
+{
+ for( sal_uInt16 n = 0; n < MAXFILTER; ++n )
+ if( aFilterDetect[n].IsFilter( rFltName ) )
+ {
+ aReaderWriter[n].GetWriter( rFltName, rBaseURL, xRet );
+ break;
+ }
+}
+
+SwRead GetReader( const String& rFltName )
+{
+ SwRead pRead = 0;
+ for( sal_uInt16 n = 0; n < MAXFILTER; ++n )
+ if( aFilterDetect[n].IsFilter( rFltName ) )
+ {
+ pRead = aReaderWriter[n].GetReader();
+ // fuer einige Reader noch eine Sonderbehandlung:
+ if ( pRead )
+ pRead->SetFltName( rFltName );
+ break;
+ }
+ return pRead;
+}
+
+} // namespace SwReaderWriter
+
+/* */
+
+/////////////// die Storage Reader/Writer ////////////////////////////////
+
+/*void GetSw3Writer( const String&, const String& rBaseURL, WriterRef& xRet )
+{
+ DBG_ERROR( "Shouldn't happen!");
+ xRet = new Sw3Writer;
+}
+*/
+
+sal_uLong StgReader::OpenMainStream( SvStorageStreamRef& rRef, sal_uInt16& rBuffSize )
+{
+ sal_uLong nRet = ERR_SWG_READ_ERROR;
+ ASSERT( pStg, "wo ist mein Storage?" );
+ const SfxFilter* pFltr = SwIoSystem::GetFilterOfFormat( aFltName );
+ if( pFltr )
+ {
+ rRef = pStg->OpenSotStream( SwIoSystem::GetSubStorageName( *pFltr ),
+ STREAM_READ | STREAM_SHARE_DENYALL );
+
+ if( rRef.Is() )
+ {
+ if( SVSTREAM_OK == rRef->GetError() )
+ {
+ sal_uInt16 nOld = rRef->GetBufferSize();
+ rRef->SetBufferSize( rBuffSize );
+ rBuffSize = nOld;
+ nRet = 0;
+ }
+ else
+ nRet = rRef->GetError();
+ }
+ }
+ return nRet;
+}
+
+/* */
+/*
+sal_uLong Sw3Reader::Read( SwDoc &rDoc, SwPaM &rPam, const String & )
+{
+ sal_uLong nRet;
+ if( pStg && pIO )
+ {
+ // sal_True: Vorlagen ueberschreiben
+ pIO->SetReadOptions( aOpt,sal_True );
+ if( !bInsertMode )
+ {
+ // Im Laden-Modus darf der PaM-Content-Teil nicht
+ // in den Textbereich zeigen (Nodes koennen geloescht werden)
+ rPam.GetBound( sal_True ).nContent.Assign( 0, 0 );
+ rPam.GetBound( sal_False ).nContent.Assign( 0, 0 );
+ }
+ nRet = pIO->Load( pStg, bInsertMode ? &rPam : 0 );
+ aOpt.ResetAllFmtsOnly();
+ pIO->SetReadOptions( aOpt, sal_True );
+ }
+ else
+ {
+ ASSERT( !this, "Sw3-Read ohne Storage und/oder IO-System" );
+ nRet = ERR_SWG_READ_ERROR;
+ }
+ return nRet;
+}
+
+ // read the sections of the document, which is equal to the medium.
+ // returns the count of it
+sal_uInt16 Sw3Reader::GetSectionList( SfxMedium& rMedium,
+ SvStrings& rStrings ) const
+{
+ SvStorageRef aStg( rMedium.GetStorage() );
+ const SfxFilter* pFlt = rMedium.GetFilter();
+ ASSERT( pFlt && pFlt->GetVersion(),
+ "Kein Filter oder Filter ohne FF-Version" );
+ if( pFlt && pFlt->GetVersion() )
+ aStg->SetVersion( (long)pFlt->GetVersion() );
+
+ if( pIO )
+ pIO->GetSectionList( &aStg, rStrings );
+ return rStrings.Count();
+ return 0;
+}
+*/
+
+/*sal_uLong Sw3Writer::WriteStorage()
+{
+ sal_uLong nRet;
+ if( pIO )
+ {
+ // der gleiche Storage -> Save, sonst SaveAs aufrufen
+ if( !bSaveAs )
+ nRet = pIO->Save( pOrigPam, bWriteAll );
+ else
+ nRet = pIO->SaveAs( pStg, pOrigPam, bWriteAll );
+
+ pIO = 0; // nach dem Schreiben ist der Pointer ungueltig !!
+ }
+ else
+ {
+ ASSERT( !this, "Sw3-Writer ohne IO-System" )
+ nRet = ERR_SWG_WRITE_ERROR;
+ }
+ return nRet;
+}
+
+sal_uLong Sw3Writer::WriteMedium( SfxMedium& )
+{
+ DBG_ERROR( "Shouldn't be used currently!");
+ return WriteStorage();
+}
+
+sal_Bool Sw3Writer::IsSw3Writer() const { return sal_True; }
+*/
+
+void Writer::SetPasswd( const String& ) {}
+
+
+void Writer::SetVersion( const String&, long ) {}
+
+
+sal_Bool Writer::IsStgWriter() const { return sal_False; }
+//sal_Bool Writer::IsSw3Writer() const { return sal_False; }
+
+sal_Bool StgWriter::IsStgWriter() const { return sal_True; }
+
+/* */
+
+
+
+sal_Bool SwReader::NeedsPasswd( const Reader& /*rOptions*/ )
+{
+ sal_Bool bRes = sal_False;
+ return bRes;
+}
+
+
+sal_Bool SwReader::CheckPasswd( const String& /*rPasswd*/, const Reader& /*rOptions*/ )
+{
+ return sal_True;
+}
+
+
+/* */
+
+//-----------------------------------------------------------------------
+// Filter Flags lesen, wird von WW8 / W4W / EXCEL / LOTUS benutzt.
+//-----------------------------------------------------------------------
+
+/*
+<FilterFlags>
+ <Excel_Lotus>
+ <MinRow cfg:type="long">0</MinRow>
+ <MaxRow cfg:type="long">0</MaxRow>
+ <MinCol cfg:type="long">0</MinCol>
+ <MaxCol cfg:type="long">0</MaxCol>
+ </Excel_Lotus>
+ <W4W>
+ <W4WHD cfg:type="long">0</W4WHD>
+ <W4WFT cfg:type="long">0</W4WFT>
+ <W4W000 cfg:type="long">0</W4W000>
+ </W4W>
+ <WinWord>
+ <WW1F cfg:type="long">0</WW1F>
+ <WW cfg:type="long">0</WW>
+ <WW8 cfg:type="long">0</WW8>
+ <WWF cfg:type="long">0</WWF>
+ <WWFA0 cfg:type="long">0</WWFA0>
+ <WWFA1 cfg:type="long">0</WWFA1>
+ <WWFA2 cfg:type="long">0</WWFA2>
+ <WWFB0 cfg:type="long">0</WWFB0>
+ <WWFB1 cfg:type="long">0</WWFB1>
+ <WWFB2 cfg:type="long">0</WWFB2>
+ <WWFLX cfg:type="long">0</WWFLX>
+ <WWFLY cfg:type="long">0</WWFLY>
+ <WWFT cfg:type="long">0</WWFT>
+ <WWWR cfg:type="long">0</WWWR>
+ </WinWord>
+ <Writer>
+ <SW3Imp cfg:type="long">0</SW3Imp>
+ </Writer>
+</FilterFlags>
+*/
+
+#define FILTER_OPTION_ROOT String::CreateFromAscii( \
+ RTL_CONSTASCII_STRINGPARAM( "Office.Writer/FilterFlags" ) )
+
+SwFilterOptions::SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames,
+ sal_uInt32* pValues )
+ : ConfigItem( FILTER_OPTION_ROOT )
+{
+ GetValues( nCnt, ppNames, pValues );
+}
+
+void SwFilterOptions::GetValues( sal_uInt16 nCnt, const sal_Char** ppNames,
+ sal_uInt32* pValues )
+{
+ Sequence<OUString> aNames( nCnt );
+ OUString* pNames = aNames.getArray();
+ sal_uInt16 n;
+
+ for( n = 0; n < nCnt; ++n )
+ pNames[ n ] = OUString::createFromAscii( ppNames[ n ] );
+ Sequence<Any> aValues = GetProperties( aNames );
+
+ if( nCnt == aValues.getLength() )
+ {
+ const Any* pAnyValues = aValues.getConstArray();
+ for( n = 0; n < nCnt; ++n )
+ pValues[ n ] = pAnyValues[ n ].hasValue()
+ ? *(sal_uInt32*)pAnyValues[ n ].getValue()
+ : 0;
+ }
+ else
+ for( n = 0; n < nCnt; ++n )
+ pValues[ n ] = 0;
+}
+
+void SwFilterOptions::Commit() {}
+void SwFilterOptions::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
+/* */
+
+
+void StgReader::SetFltName( const String& rFltNm )
+{
+ if( SW_STORAGE_READER & GetReaderType() )
+ aFltName = rFltNm;
+}
+
+
+/* */
+
+SwRelNumRuleSpaces::SwRelNumRuleSpaces( SwDoc& rDoc, sal_Bool bNDoc )
+ : bNewDoc( bNDoc )
+{
+ pNumRuleTbl = new SwNumRuleTbl( 8, 8 );
+ if( !bNDoc )
+ pNumRuleTbl->Insert( &rDoc.GetNumRuleTbl(), 0 );
+}
+
+SwRelNumRuleSpaces::~SwRelNumRuleSpaces()
+{
+ if( pNumRuleTbl )
+ {
+ pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
+ delete pNumRuleTbl;
+ }
+}
+
+void SwRelNumRuleSpaces::SetNumRelSpaces( SwDoc& rDoc )
+{
+ const SwNumRuleTbl* pRuleTbl = NULL;
+
+ if( !bNewDoc )
+ {
+ // jetzt alle schon vorhanden NumRules aus dem Array entfernen,
+ // damit nur die neuen angepasst werden
+ SwNumRuleTbl aNumRuleTbl;
+ aNumRuleTbl.Insert( pNumRuleTbl, 0 );
+ pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
+ const SwNumRuleTbl& rRuleTbl = rDoc.GetNumRuleTbl();
+ SwNumRule* pRule;
+
+ for( sal_uInt16 n = 0; n < rRuleTbl.Count(); ++n )
+ if( USHRT_MAX == aNumRuleTbl.GetPos( ( pRule = rRuleTbl[ n ] )))
+ // war noch nicht vorhanden, also neu
+ pNumRuleTbl->Insert( pRule, pNumRuleTbl->Count() );
+
+ aNumRuleTbl.Remove( 0, aNumRuleTbl.Count() );
+
+ pRuleTbl = pNumRuleTbl;
+ }
+ else
+ {
+ pRuleTbl = &rDoc.GetNumRuleTbl();
+ }
+
+ if( pRuleTbl )
+ {
+ for( sal_uInt16 n = pRuleTbl->Count(); n; )
+ {
+ SwNumRule* pRule = (*pRuleTbl)[ --n ];
+ // Rule noch gueltig und am Doc vorhanden?
+ if( USHRT_MAX != rDoc.GetNumRuleTbl().GetPos( pRule ))
+ {
+ // --> OD 2008-02-19 #refactorlists#
+// SwNumRuleInfo aUpd( pRule->GetName() );
+// aUpd.MakeList( rDoc );
+
+// // bei allen nmumerierten Absaetzen vom linken Rand
+// // den absoluten Wert des NumFormates abziehen
+// for( sal_uLong nUpdPos = 0; nUpdPos < aUpd.GetList().Count();
+// ++nUpdPos )
+// {
+// SwTxtNode* pNd = aUpd.GetList().GetObject( nUpdPos );
+// SetNumLSpace( *pNd, *pRule );
+// }
+ SwNumRule::tTxtNodeList aTxtNodeList;
+ pRule->GetTxtNodeList( aTxtNodeList );
+ for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin();
+ aIter != aTxtNodeList.end(); ++aIter )
+ {
+ SwTxtNode* pNd = *aIter;
+ SetNumLSpace( *pNd, *pRule );
+ }
+ // <--
+ }
+ }
+ }
+
+ if( pNumRuleTbl )
+ {
+ pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
+ delete pNumRuleTbl, pNumRuleTbl = 0;
+ }
+
+ if( bNewDoc )
+ {
+ SetOultineRelSpaces( SwNodeIndex( rDoc.GetNodes() ),
+ SwNodeIndex( rDoc.GetNodes().GetEndOfContent()));
+ }
+}
+
+void SwRelNumRuleSpaces::SetOultineRelSpaces( const SwNodeIndex& rStt,
+ const SwNodeIndex& rEnd )
+{
+ SwDoc* pDoc = rStt.GetNode().GetDoc();
+ const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
+ if( rOutlNds.Count() )
+ {
+ sal_uInt16 nPos;
+ rOutlNds.Seek_Entry( &rStt.GetNode(), &nPos );
+ for( ; nPos < rOutlNds.Count() &&
+ rOutlNds[ nPos ]->GetIndex() < rEnd.GetIndex(); ++nPos )
+ {
+ SwTxtNode* pNd = rOutlNds[ nPos ]->GetTxtNode();
+ if( pNd->IsOutline() && !pNd->GetNumRule() )
+ SetNumLSpace( *pNd, *pDoc->GetOutlineNumRule() );
+ }
+ }
+}
+
+void SwRelNumRuleSpaces::SetNumLSpace( SwTxtNode& rNd, const SwNumRule& rRule )
+{
+ sal_Bool bOutlineRule = OUTLINE_RULE == rRule.GetRuleType();
+ // --> OD 2005-11-18 #128056#
+ // correction of refactoring done by cws swnumtree:
+ // - assure a correct level for retrieving numbering format.
+// sal_uInt8 nLvl = rNd.GetLevel();
+ sal_uInt8 nLvl = 0;
+ if ( rNd.GetActualListLevel() >= 0 && rNd.GetActualListLevel() < MAXLEVEL )
+ {
+ nLvl = static_cast< sal_uInt8 >(rNd.GetActualListLevel());
+ }
+ // <--
+ const SwNumFmt& rFmt = rRule.Get( nLvl );
+ const SvxLRSpaceItem& rLR = rNd.GetSwAttrSet().GetLRSpace();
+
+ SvxLRSpaceItem aLR( rLR );
+ aLR.SetTxtFirstLineOfst( 0 );
+
+ // sagt der Node, das die Numerierung den Wert vorgibt?
+ if( !bOutlineRule && rNd.IsSetNumLSpace() )
+ aLR.SetTxtLeft( 0 );
+ else
+ {
+ long nLeft = rFmt.GetAbsLSpace(), nParaLeft = rLR.GetTxtLeft();
+ if( 0 < rLR.GetTxtFirstLineOfst() )
+ nParaLeft += rLR.GetTxtFirstLineOfst();
+ else if( nParaLeft >= nLeft )
+ // #82963#/#82962#: set correct paragraph indent
+ nParaLeft -= nLeft;
+ else
+ //#83154#, Don't think any of the older #80856# bugfix code is
+ //relevent anymore.
+ nParaLeft = rLR.GetTxtLeft()+rLR.GetTxtFirstLineOfst();
+ aLR.SetTxtLeft( nParaLeft );
+ }
+
+ if( aLR.GetTxtLeft() != rLR.GetTxtLeft() )
+ {
+ //bevor rLR geloescht wird!
+ long nOffset = rLR.GetTxtLeft() - aLR.GetTxtLeft();
+ rNd.SetAttr( aLR );
+
+ // Tabs anpassen !!
+ const SfxPoolItem* pItem;
+ if( SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(
+ RES_PARATR_TABSTOP, sal_True, &pItem ))
+ {
+ SvxTabStopItem aTStop( *(SvxTabStopItem*)pItem );
+ for( sal_uInt16 n = 0; n < aTStop.Count(); ++n )
+ {
+ SvxTabStop& rTab = (SvxTabStop&)aTStop[ n ];
+ if( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() )
+ {
+ if( !rTab.GetTabPos() )
+ {
+ aTStop.Remove( n );
+ --n;
+ }
+ else
+ rTab.GetTabPos() += nOffset;
+ }
+ }
+ rNd.SetAttr( aTStop );
+ }
+ }
+}
+
+/* */
+
+
+void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
+ SwTwips nPageWidth)
+{
+ const SfxPoolItem* pItem = 0;
+ if( SFX_ITEM_SET != rFlySet.GetItemState( RES_FRM_SIZE, sal_True, &pItem ) ||
+ MINFLY > ((SwFmtFrmSize*)pItem)->GetWidth() )
+ {
+ SwFmtFrmSize aSz((SwFmtFrmSize&)rFlySet.Get(RES_FRM_SIZE, sal_True));
+ if (pItem)
+ aSz = (SwFmtFrmSize&)(*pItem);
+
+ SwTwips nWidth;
+ // dann die Breite des Flys selbst bestimmen. Ist eine Tabelle
+ // defininiert, dann benutze deren Breite, sonst die Breite der
+ // Seite
+ const SwTableNode* pTblNd = rAnchor.GetNode().FindTableNode();
+ if( pTblNd )
+ nWidth = pTblNd->GetTable().GetFrmFmt()->GetFrmSize().GetWidth();
+ else
+ nWidth = nPageWidth;
+
+ const SwNodeIndex* pSttNd = ((SwFmtCntnt&)rFlySet.Get( RES_CNTNT )).
+ GetCntntIdx();
+ if( pSttNd )
+ {
+ sal_Bool bOnlyOneNode = sal_True;
+ sal_uLong nMinFrm = 0;
+ sal_uLong nMaxFrm = 0;
+ SwTxtNode* pFirstTxtNd = 0;
+ SwNodeIndex aIdx( *pSttNd, 1 );
+ SwNodeIndex aEnd( *pSttNd->GetNode().EndOfSectionNode() );
+ while( aIdx < aEnd )
+ {
+ SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode();
+ if( pTxtNd )
+ {
+ if( !pFirstTxtNd )
+ pFirstTxtNd = pTxtNd;
+ else if( pFirstTxtNd != pTxtNd )
+ {
+ // forget it
+ bOnlyOneNode = sal_False;
+ break;
+ }
+
+ sal_uLong nAbsMinCnts;
+ pTxtNd->GetMinMaxSize( aIdx.GetIndex(), nMinFrm,
+ nMaxFrm, nAbsMinCnts );
+ }
+ aIdx++;
+ }
+
+ if( bOnlyOneNode )
+ {
+ if( nMinFrm < MINLAY && pFirstTxtNd )
+ {
+ // if the first node dont contained any content, then
+ // insert one char in it calc again and delete once again
+ SwIndex aNdIdx( pFirstTxtNd );
+ pFirstTxtNd->InsertText( String::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "MM" )), aNdIdx );
+ sal_uLong nAbsMinCnts;
+ pFirstTxtNd->GetMinMaxSize( pFirstTxtNd->GetIndex(),
+ nMinFrm, nMaxFrm, nAbsMinCnts );
+ aNdIdx -= 2;
+ pFirstTxtNd->EraseText( aNdIdx, 2 );
+ }
+
+ // Umrandung und Abstand zum Inhalt beachten
+ const SvxBoxItem& rBoxItem = (SvxBoxItem&)rFlySet.Get( RES_BOX );
+ sal_uInt16 nLine = BOX_LINE_LEFT;
+ for( int i = 0; i < 2; ++i )
+ {
+ const SvxBorderLine* pLn = rBoxItem.GetLine( nLine );
+ if( pLn )
+ {
+ sal_uInt16 nWidthTmp = pLn->GetOutWidth() + pLn->GetInWidth();
+ nWidthTmp = nWidthTmp + rBoxItem.GetDistance( nLine );
+ nMinFrm += nWidthTmp;
+ nMaxFrm += nWidthTmp;
+ }
+ nLine = BOX_LINE_RIGHT;
+ }
+
+ // Mindestbreite fuer Inhalt einhalten
+ if( nMinFrm < MINLAY )
+ nMinFrm = MINLAY;
+ if( nMaxFrm < MINLAY )
+ nMaxFrm = MINLAY;
+
+ if( nWidth > (sal_uInt16)nMaxFrm )
+ nWidth = nMaxFrm;
+ else if( nWidth > (sal_uInt16)nMinFrm )
+ nWidth = nMinFrm;
+ }
+ }
+
+ if( MINFLY > nWidth )
+ nWidth = MINFLY;
+
+ aSz.SetWidth( nWidth );
+ if( MINFLY > aSz.GetHeight() )
+ aSz.SetHeight( MINFLY );
+ rFlySet.Put( aSz );
+ }
+ else if( MINFLY > ((SwFmtFrmSize*)pItem)->GetHeight() )
+ {
+ SwFmtFrmSize aSz( *(SwFmtFrmSize*)pItem );
+ aSz.SetHeight( MINFLY );
+ rFlySet.Put( aSz );
+ }
+}
+
+/* */
+struct CharSetNameMap
+{
+ rtl_TextEncoding eCode;
+ const sal_Char* pName;
+};
+
+const CharSetNameMap *GetCharSetNameMap()
+{
+ static const CharSetNameMap aMapArr[] =
+ {
+# define IMPLENTRY(X) { RTL_TEXTENCODING_##X, "" #X "" }
+ IMPLENTRY(DONTKNOW),
+ IMPLENTRY(MS_1252),
+ IMPLENTRY(APPLE_ROMAN),
+ IMPLENTRY(IBM_437),
+ IMPLENTRY(IBM_850),
+ IMPLENTRY(IBM_860),
+ IMPLENTRY(IBM_861),
+ IMPLENTRY(IBM_863),
+ IMPLENTRY(IBM_865),
+ IMPLENTRY(SYMBOL),
+ IMPLENTRY(ASCII_US),
+ IMPLENTRY(ISO_8859_1),
+ IMPLENTRY(ISO_8859_2),
+ IMPLENTRY(ISO_8859_3),
+ IMPLENTRY(ISO_8859_4),
+ IMPLENTRY(ISO_8859_5),
+ IMPLENTRY(ISO_8859_6),
+ IMPLENTRY(ISO_8859_7),
+ IMPLENTRY(ISO_8859_8),
+ IMPLENTRY(ISO_8859_9),
+ IMPLENTRY(ISO_8859_14),
+ IMPLENTRY(ISO_8859_15),
+ IMPLENTRY(IBM_737),
+ IMPLENTRY(IBM_775),
+ IMPLENTRY(IBM_852),
+ IMPLENTRY(IBM_855),
+ IMPLENTRY(IBM_857),
+ IMPLENTRY(IBM_862),
+ IMPLENTRY(IBM_864),
+ IMPLENTRY(IBM_866),
+ IMPLENTRY(IBM_869),
+ IMPLENTRY(MS_874),
+ IMPLENTRY(MS_1250),
+ IMPLENTRY(MS_1251),
+ IMPLENTRY(MS_1253),
+ IMPLENTRY(MS_1254),
+ IMPLENTRY(MS_1255),
+ IMPLENTRY(MS_1256),
+ IMPLENTRY(MS_1257),
+ IMPLENTRY(MS_1258),
+ IMPLENTRY(APPLE_ARABIC),
+ IMPLENTRY(APPLE_CENTEURO),
+ IMPLENTRY(APPLE_CROATIAN),
+ IMPLENTRY(APPLE_CYRILLIC),
+ IMPLENTRY(APPLE_DEVANAGARI),
+ IMPLENTRY(APPLE_FARSI),
+ IMPLENTRY(APPLE_GREEK),
+ IMPLENTRY(APPLE_GUJARATI),
+ IMPLENTRY(APPLE_GURMUKHI),
+ IMPLENTRY(APPLE_HEBREW),
+ IMPLENTRY(APPLE_ICELAND),
+ IMPLENTRY(APPLE_ROMANIAN),
+ IMPLENTRY(APPLE_THAI),
+ IMPLENTRY(APPLE_TURKISH),
+ IMPLENTRY(APPLE_UKRAINIAN),
+ IMPLENTRY(APPLE_CHINSIMP),
+ IMPLENTRY(APPLE_CHINTRAD),
+ IMPLENTRY(APPLE_JAPANESE),
+ IMPLENTRY(APPLE_KOREAN),
+ IMPLENTRY(MS_932),
+ IMPLENTRY(MS_936),
+ IMPLENTRY(MS_949),
+ IMPLENTRY(MS_950),
+ IMPLENTRY(SHIFT_JIS),
+ IMPLENTRY(GB_2312),
+ IMPLENTRY(GBT_12345),
+ IMPLENTRY(GBK),
+ IMPLENTRY(BIG5),
+ IMPLENTRY(EUC_JP),
+ IMPLENTRY(EUC_CN),
+ IMPLENTRY(EUC_TW),
+ IMPLENTRY(ISO_2022_JP),
+ IMPLENTRY(ISO_2022_CN),
+ IMPLENTRY(KOI8_R),
+ IMPLENTRY(KOI8_U),
+ IMPLENTRY(UTF7),
+ IMPLENTRY(UTF8),
+ IMPLENTRY(ISO_8859_10),
+ IMPLENTRY(ISO_8859_13),
+ IMPLENTRY(EUC_KR),
+ IMPLENTRY(ISO_2022_KR),
+ IMPLENTRY(JIS_X_0201),
+ IMPLENTRY(JIS_X_0208),
+ IMPLENTRY(JIS_X_0212),
+ IMPLENTRY(MS_1361),
+ IMPLENTRY(GB_18030),
+ IMPLENTRY(BIG5_HKSCS),
+ IMPLENTRY(TIS_620),
+ IMPLENTRY(PT154),
+ IMPLENTRY(UCS4),
+ IMPLENTRY(UCS2),
+ IMPLENTRY(UNICODE),
+ {0,0} //Last
+ };
+ return &aMapArr[0];
+}
+/*
+ Get a rtl_TextEncoding from its name
+ */
+rtl_TextEncoding CharSetFromName(const String& rChrSetStr)
+{
+ const CharSetNameMap *pStart = GetCharSetNameMap();
+ rtl_TextEncoding nRet = pStart->eCode;
+
+ for(const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap)
+ {
+ if(rChrSetStr.EqualsIgnoreCaseAscii(pMap->pName))
+ {
+ nRet = pMap->eCode;
+ break;
+ }
+ }
+
+ ASSERT(nRet != pStart->eCode, "TXT: That was an unknown language!");
+
+ return nRet;
+}
+
+
+/*
+ Get the String name of an rtl_TextEncoding
+ */
+String NameFromCharSet(rtl_TextEncoding nChrSet)
+{
+ const CharSetNameMap *pStart = GetCharSetNameMap();
+ const char *pRet = pStart->pName;
+
+ for(const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap)
+ {
+ if (nChrSet == pMap->eCode)
+ {
+ pRet = pMap->pName;
+ break;
+ }
+ }
+
+ ASSERT(pRet != pStart->pName, "TXT: That was an unknown language!");
+
+ return String::CreateFromAscii(pRet);
+}
+
+// for the automatic conversion (mail/news/...)
+// The user data contains the options for the ascii import/export filter.
+// The format is:
+// 1. CharSet - as ascii chars
+// 2. LineEnd - as CR/LR/CRLF
+// 3. Fontname
+// 4. Language
+// the delimetercharacter is ","
+//
+
+void SwAsciiOptions::ReadUserData( const String& rStr )
+{
+ xub_StrLen nToken = 0;
+ sal_uInt16 nCnt = 0;
+ String sToken;
+ do {
+ if( 0 != (sToken = rStr.GetToken( 0, ',', nToken )).Len() )
+ {
+ switch( nCnt )
+ {
+ case 0: // CharSet
+ eCharSet = CharSetFromName(sToken);
+ break;
+ case 1: // LineEnd
+ if( sToken.EqualsIgnoreCaseAscii( "CRLF" ))
+ eCRLF_Flag = LINEEND_CRLF;
+ else if( sToken.EqualsIgnoreCaseAscii( "LF" ))
+ eCRLF_Flag = LINEEND_LF;
+ else
+ eCRLF_Flag = LINEEND_CR;
+ break;
+ case 2: // fontname
+ sFont = sToken;
+ break;
+ case 3: // Language
+ nLanguage = MsLangId::convertIsoStringToLanguage( sToken );
+ break;
+ }
+ }
+ ++nCnt;
+ } while( STRING_NOTFOUND != nToken );
+}
+
+void SwAsciiOptions::WriteUserData( String& rStr )
+{
+ // 1. charset
+ rStr = NameFromCharSet(eCharSet);
+ rStr += ',';
+
+ // 2. LineEnd
+ switch(eCRLF_Flag)
+ {
+ case LINEEND_CRLF:
+ rStr.AppendAscii( "CRLF" );
+ break;
+ case LINEEND_CR:
+ rStr.AppendAscii( "CR" );
+ break;
+ case LINEEND_LF:
+ rStr.AppendAscii( "LF" );
+ break;
+ }
+ rStr += ',';
+
+ // 3. Fontname
+ rStr += sFont;
+ rStr += ',';
+
+ // 4. Language
+ if (nLanguage)
+ {
+ rtl::OUString sTmp = MsLangId::convertLanguageToIsoString( nLanguage );
+ rStr += (String)sTmp;
+ }
+ rStr += ',';
+}
+
+extern "C" { static void SAL_CALL thisModule() {} }
+
+static oslGenericFunction GetMswordLibSymbol( const char *pSymbol )
+{
+ static ::osl::Module aModule;
+ static sal_Bool bLoaded = sal_False;
+ static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "msword" ) ) );
+ if (!bLoaded)
+ bLoaded = SvLibrary::LoadModule( aModule, aLibName, &thisModule );
+ if (bLoaded)
+ return aModule.getFunctionSymbol( ::rtl::OUString::createFromAscii( pSymbol ) );
+ return NULL;
+}
+
+Reader* GetRTFReader()
+{
+ FnGetReader pFunction = reinterpret_cast<FnGetReader>( GetMswordLibSymbol( "ImportRTF" ) );
+
+ if ( pFunction )
+ return (*pFunction)();
+
+ return NULL;
+}
+
+void GetRTFWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
+{
+ FnGetWriter pFunction = reinterpret_cast<FnGetWriter>( GetMswordLibSymbol( "ExportRTF" ) );
+
+ if ( pFunction )
+ (*pFunction)( rFltName, rBaseURL, xRet );
+ else
+ xRet = WriterRef(0);
+}
+
+Reader* GetWW8Reader()
+{
+ FnGetReader pFunction = reinterpret_cast<FnGetReader>( GetMswordLibSymbol( "ImportDOC" ) );
+
+ if ( pFunction )
+ return (*pFunction)();
+
+ return NULL;
+}
+
+void GetWW8Writer( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
+{
+ FnGetWriter pFunction = reinterpret_cast<FnGetWriter>( GetMswordLibSymbol( "ExportDOC" ) );
+
+ if ( pFunction )
+ (*pFunction)( rFltName, rBaseURL, xRet );
+ else
+ xRet = WriterRef(0);
+}
+
+typedef sal_uLong ( __LOADONCALLAPI *SaveOrDel )( SfxObjectShell&, SotStorage&, sal_Bool, const String& );
+typedef sal_uLong ( __LOADONCALLAPI *GetSaveWarning )( SfxObjectShell& );
+
+sal_uLong SaveOrDelMSVBAStorage( SfxObjectShell& rDoc, SotStorage& rStor, sal_Bool bSaveInto, const String& rStorageName )
+{
+ SaveOrDel pFunction = reinterpret_cast<SaveOrDel>( GetMswordLibSymbol( "SaveOrDelMSVBAStorage_ww8" ) );
+ if( pFunction )
+ return pFunction( rDoc, rStor, bSaveInto, rStorageName );
+ return ERRCODE_NONE;
+}
+
+sal_uLong GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS )
+{
+ GetSaveWarning pFunction = reinterpret_cast<GetSaveWarning>( GetMswordLibSymbol( "GetSaveWarningOfMSVBAStorage_ww8" ) );
+ if( pFunction )
+ return pFunction( rDocS );
+ return ERRCODE_NONE;
+}
+
+
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 8cf798b410d0..aaabab41895f 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -53,7 +53,7 @@ SwIoDetect aFilterDetect[] =
SwIoDetect( FILTER_TEXT, 4 )
};
-const sal_Char* SwIoDetect::IsReader(const sal_Char* pHeader, ULONG nLen_,
+const sal_Char* SwIoDetect::IsReader(const sal_Char* pHeader, sal_uLong nLen_,
const String & /*rFileName*/, const String& /*rUserData*/) const
{
// Filter erkennung
@@ -66,17 +66,17 @@ const sal_Char* SwIoDetect::IsReader(const sal_Char* pHeader, ULONG nLen_,
SVBT16 pnNext; // 0x8
SVBT16 fFlags;
- USHORT nFibGet() { return SVBT16ToShort(nFib); }
- USHORT wIdentGet() { return SVBT16ToShort(wIdent); }
- USHORT fFlagsGet() { return SVBT16ToShort(fFlags); }
+ sal_uInt16 nFibGet() { return SVBT16ToShort(nFib); }
+ sal_uInt16 wIdentGet() { return SVBT16ToShort(wIdent); }
+ sal_uInt16 fFlagsGet() { return SVBT16ToShort(fFlags); }
// SVBT16 fComplex :1;// 0004 when 1, file is in complex, fast-saved format.
- BOOL fComplexGet() { return static_cast< BOOL >((fFlagsGet() >> 2) & 1); }
+ sal_Bool fComplexGet() { return static_cast< sal_Bool >((fFlagsGet() >> 2) & 1); }
};
- int bRet = FALSE;
+ int bRet = sal_False;
rtl::OString aName( pName );
if ( sHTML == aName )
- bRet = HTMLParser::IsHTMLFormat( pHeader, TRUE, RTL_TEXTENCODING_DONTKNOW );
+ bRet = HTMLParser::IsHTMLFormat( pHeader, sal_True, RTL_TEXTENCODING_DONTKNOW );
else if ( FILTER_RTF == aName )
bRet = 0 == strncmp( "{\\rtf", pHeader, 5 );
else if ( sWW5 == aName )
@@ -138,16 +138,16 @@ const SfxFilter* SwIoSystem::GetFilterOfFormat(const String& rFmtNm,
if( pCnt || pFltCnt == &aCntSwWeb )
break;
pFltCnt = &aCntSwWeb;
- } while( TRUE );
+ } while( sal_True );
return 0;
}
-BOOL SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter)
+sal_Bool SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
try
{
- ULONG nStgFmtId = SotStorage::GetFormatID( rStg );
+ sal_uLong nStgFmtId = SotStorage::GetFormatID( rStg );
bRet = rStg->isStreamElement( ::rtl::OUString::createFromAscii("content.xml") );
if ( bRet )
bRet = ( nStgFmtId && ( rFilter.GetFormat() == nStgFmtId ) );
@@ -159,9 +159,9 @@ BOOL SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::s
return bRet;
}
-BOOL SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
+sal_Bool SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
{
- ULONG nStgFmtId = rStg.GetFormat();
+ sal_uLong nStgFmtId = rStg.GetFormat();
/*#i8409# We cannot trust the clipboard id anymore :-(*/
if( rFilter.GetUserData().EqualsAscii(FILTER_WW8) ||
rFilter.GetUserData().EqualsAscii(sWW6) )
@@ -169,7 +169,7 @@ BOOL SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
nStgFmtId = 0;
}
- BOOL bRet = SVSTREAM_OK == rStg.GetError() &&
+ sal_Bool bRet = SVSTREAM_OK == rStg.GetError() &&
( !nStgFmtId || rFilter.GetFormat() == nStgFmtId ) &&
( rStg.IsContained( SwIoSystem::GetSubStorageName( rFilter )) );
if( bRet )
@@ -188,7 +188,7 @@ BOOL SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
rStg.OpenSotStream(String::CreateFromAscii("WordDocument"),
STREAM_STD_READ | STREAM_NOCREATE );
xRef->Seek(10);
- BYTE nByte;
+ sal_uInt8 nByte;
*xRef >> nByte;
bRet = !(nByte & 1);
}
@@ -199,7 +199,7 @@ BOOL SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
return bRet;
}
-void TerminateBuffer(sal_Char *pBuffer, ULONG nBytesRead, ULONG nBufferLen)
+void TerminateBuffer(sal_Char *pBuffer, sal_uLong nBytesRead, sal_uLong nBufferLen)
{
ASSERT(nBytesRead <= nBufferLen - 2,
"what you read must be less than the max + null termination");
@@ -215,10 +215,10 @@ void TerminateBuffer(sal_Char *pBuffer, ULONG nBytesRead, ULONG nBufferLen)
/* Feststellen ob das File in dem entsprechenden Format vorliegt. */
/* Z.z werden nur unsere eigene Filter unterstuetzt */
-BOOL SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
+sal_Bool SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
const SfxFilter** ppFilter )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SfxFilterContainer aCntSw( String::CreateFromAscii( sSWRITER ) );
SfxFilterContainer aCntSwWeb( String::CreateFromAscii( sSWRITERWEB ) );
@@ -232,7 +232,7 @@ BOOL SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
{
SvStream* pStream = rMedium.GetInStream();
if ( pStream && SotStorage::IsStorageFile(pStream) )
- xStg = new SotStorage( pStream, FALSE );
+ xStg = new SotStorage( pStream, sal_False );
}
SfxFilterMatcher aMatcher( rFltContainer.GetName() );
@@ -257,11 +257,11 @@ BOOL SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
if( pStrm && !pStrm->GetError() )
{
sal_Char aBuffer[4098];
- const ULONG nMaxRead = sizeof(aBuffer) - 2;
- ULONG nBytesRead = pStrm->Read(aBuffer, nMaxRead);
+ const sal_uLong nMaxRead = sizeof(aBuffer) - 2;
+ sal_uLong nBytesRead = pStrm->Read(aBuffer, nMaxRead);
pStrm->Seek(STREAM_SEEK_TO_BEGIN);
TerminateBuffer(aBuffer, nBytesRead, sizeof(aBuffer));
- for (USHORT i = 0; i < MAXFILTER; ++i)
+ for (sal_uInt16 i = 0; i < MAXFILTER; ++i)
{
if (aFilterDetect[i].IsFilter(rFmtName))
{
@@ -309,20 +309,20 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
{
// package storage or OLEStorage based format
SotStorageRef xStg;
- BOOL bDeleteMedium = FALSE;
+ sal_Bool bDeleteMedium = sal_False;
if (!pMedium )
{
INetURLObject aObj;
aObj.SetSmartProtocol( INET_PROT_FILE );
aObj.SetSmartURL( rFileName );
- pMedium = new SfxMedium( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ, FALSE );
- bDeleteMedium = TRUE;
+ pMedium = new SfxMedium( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ, sal_False );
+ bDeleteMedium = sal_True;
}
// templates should not get precedence over "normal" filters (#i35508, #i33168)
const SfxFilter* pTemplateFilter = 0;
const SfxFilter* pOldFilter = pFCntnr->GetFilter4FilterName( rPrefFltName );
- BOOL bLookForTemplate = pOldFilter && pOldFilter->IsOwnTemplateFormat();
+ sal_Bool bLookForTemplate = pOldFilter && pOldFilter->IsOwnTemplateFormat();
if ( pMedium->IsStorage() )
{
com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStor = pMedium->GetStorage();
@@ -351,7 +351,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
{
SvStream* pStream = pMedium->GetInStream();
if ( pStream && SotStorage::IsStorageFile(pStream) )
- xStg = new SotStorage( pStream, FALSE );
+ xStg = new SotStorage( pStream, sal_False );
if( xStg.Is() && ( xStg->GetError() == SVSTREAM_OK ) )
{
@@ -380,14 +380,14 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
}
sal_Char aBuffer[4098];
- const ULONG nMaxRead = sizeof(aBuffer) - 2;
- ULONG nBytesRead = 0;
+ const sal_uLong nMaxRead = sizeof(aBuffer) - 2;
+ sal_uLong nBytesRead = 0;
if (pMedium)
{
SvStream* pIStrm = pMedium->GetInStream();
if( !pIStrm || SVSTREAM_OK != pIStrm->GetError() )
return 0;
- ULONG nCurrPos = pIStrm->Tell();
+ sal_uLong nCurrPos = pIStrm->Tell();
nBytesRead = pIStrm->Read(aBuffer, nMaxRead);
pIStrm->Seek( nCurrPos );
}
@@ -416,7 +416,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
{
const SfxFilter* pFilterTmp = 0;
const sal_Char* pNm;
- for( USHORT n = 0; n < MAXFILTER; ++n )
+ for( sal_uInt16 n = 0; n < MAXFILTER; ++n )
{
String sEmptyUserData;
pNm = aFilterDetect[n].IsReader(aBuffer, nBytesRead, rFileName, sEmptyUserData);
@@ -439,29 +439,29 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
return SwIoSystem::GetTextFilter( aBuffer, nBytesRead);
}
-bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
+bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, sal_uLong &rLen,
CharSet *pCharSet, bool *pSwap, LineEnd *pLineEnd, bool bEncodedFilter)
{
bool bSwap = false;
CharSet eCharSet = RTL_TEXTENCODING_DONTKNOW;
bool bLE = true;
- ULONG nHead=0;
+ sal_uLong nHead=0;
/*See if its a known unicode type*/
if (rLen >= 2)
{
- if (rLen > 2 && BYTE(pBuf[0]) == 0xEF && BYTE(pBuf[1]) == 0xBB &&
- BYTE(pBuf[2]) == 0xBF)
+ if (rLen > 2 && sal_uInt8(pBuf[0]) == 0xEF && sal_uInt8(pBuf[1]) == 0xBB &&
+ sal_uInt8(pBuf[2]) == 0xBF)
{
eCharSet = RTL_TEXTENCODING_UTF8;
nHead = 3;
}
- else if (BYTE(pBuf[0]) == 0xFE && BYTE(pBuf[1]) == 0xFF)
+ else if (sal_uInt8(pBuf[0]) == 0xFE && sal_uInt8(pBuf[1]) == 0xFF)
{
eCharSet = RTL_TEXTENCODING_UCS2;
bLE = false;
nHead = 2;
}
- else if (BYTE(pBuf[1]) == 0xFE && BYTE(pBuf[0]) == 0xFF)
+ else if (sal_uInt8(pBuf[1]) == 0xFE && sal_uInt8(pBuf[0]) == 0xFF)
{
eCharSet = RTL_TEXTENCODING_UCS2;
nHead = 2;
@@ -523,7 +523,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
sWork.ReleaseBufferAccess( static_cast< xub_StrLen >(nNewLen) );
pNewBuf = sWork.GetBufferAccess();
- for (ULONG nCnt = 0; nCnt < nNewLen; ++nCnt, ++pNewBuf)
+ for (sal_uLong nCnt = 0; nCnt < nNewLen; ++nCnt, ++pNewBuf)
{
switch (*pNewBuf)
{
@@ -540,7 +540,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
}
else
{
- for( ULONG nCnt = 0; nCnt < rLen; ++nCnt, ++pBuf )
+ for( sal_uLong nCnt = 0; nCnt < rLen; ++nCnt, ++pBuf )
{
switch (*pBuf)
{
@@ -560,7 +560,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
case 0x9:
break;
default:
- if (0x20 > (BYTE)*pBuf)
+ if (0x20 > (sal_uInt8)*pBuf)
bNoNormalChar = true;
break;
}
@@ -584,7 +584,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
return bEncodedFilter || (!bIsBareUnicode && eSysLE == eLineEnd);
}
-const SfxFilter* SwIoSystem::GetTextFilter( const sal_Char* pBuf, ULONG nLen)
+const SfxFilter* SwIoSystem::GetTextFilter( const sal_Char* pBuf, sal_uLong nLen)
{
bool bAuto = IsDetectableText(pBuf, nLen);
const sal_Char* pNm = bAuto ? FILTER_TEXT : FILTER_TEXT_DLG;
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 963c5c847500..1f742b2bf29b 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -70,7 +70,7 @@ using namespace ::com::sun::star;
//////////////////////////////////////////////////////////////////////////
-ULONG SwReader::Read( const Reader& rOptions )
+sal_uLong SwReader::Read( const Reader& rOptions )
{
// Variable uebertragen
Reader* po = (Reader*) &rOptions;
@@ -83,14 +83,14 @@ ULONG SwReader::Read( const Reader& rOptions )
if( 0 != (po->pMedium = pMedium ) &&
!po->SetStrmStgPtr() )
{
- po->SetReadUTF8( FALSE );
- po->SetBlockMode( FALSE );
- po->SetOrganizerMode( FALSE );
- po->SetIgnoreHTMLComments( FALSE );
+ po->SetReadUTF8( sal_False );
+ po->SetBlockMode( sal_False );
+ po->SetOrganizerMode( sal_False );
+ po->SetIgnoreHTMLComments( sal_False );
return ERR_SWG_FILE_FORMAT_ERROR;
}
- ULONG nError = 0L;
+ sal_uLong nError = 0L;
GetDoc();
@@ -130,15 +130,15 @@ ULONG SwReader::Read( const Reader& rOptions )
SwPaM *pEnd = pPam;
SwUndoInsDoc* pUndo = 0;
- BOOL bReadPageDescs = FALSE;
- BOOL bDocUndo = pDoc->DoesUndo();
- BOOL bSaveUndo = bDocUndo && pCrsr;
+ sal_Bool bReadPageDescs = sal_False;
+ sal_Bool bDocUndo = pDoc->DoesUndo();
+ sal_Bool bSaveUndo = bDocUndo && pCrsr;
if( bSaveUndo )
{
// das Einlesen von Seitenvorlagen ist nicht Undofaehig!
if( 0 != ( bReadPageDescs = po->aOpt.IsPageDescs() ) )
{
- bSaveUndo = FALSE;
+ bSaveUndo = sal_False;
pDoc->DelAllUndoObj();
}
else
@@ -147,7 +147,7 @@ ULONG SwReader::Read( const Reader& rOptions )
pDoc->StartUndo( UNDO_INSDOKUMENT, NULL );
}
}
- pDoc->DoUndo( FALSE );
+ pDoc->DoUndo( sal_False );
SwNodeIndex aSplitIdx( pDoc->GetNodes() );
@@ -157,9 +157,9 @@ ULONG SwReader::Read( const Reader& rOptions )
// Array von FlyFormaten
SwSpzFrmFmts aFlyFrmArr;
// only read templates? then ignore multi selection!
- BOOL bFmtsOnly = po->aOpt.IsFmtsOnly();
+ sal_Bool bFmtsOnly = po->aOpt.IsFmtsOnly();
- while( TRUE )
+ while( sal_True )
{
if( bSaveUndo )
pUndo = new SwUndoInsDoc( *pPam );
@@ -227,7 +227,7 @@ ULONG SwReader::Read( const Reader& rOptions )
// Suche alle neuen Fly's und speicher sie als einzelne Undo
// Objecte
- for( USHORT n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n )
{
SwFrmFmt* pFrmFmt = (*pDoc->GetSpzFrmFmts())[ n ];
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
@@ -291,7 +291,7 @@ ULONG SwReader::Read( const Reader& rOptions )
// seitengebundene Flys eingefuegt, dann schalte
// die Optimierungs-Flags vom SwDoc ab. Sonst
// werden die Flys nicht an der Position erzeugt.
- pDoc->SetLoaded( FALSE );
+ pDoc->SetLoaded( sal_False );
}
}
else
@@ -313,7 +313,7 @@ ULONG SwReader::Read( const Reader& rOptions )
if( bSaveUndo )
{
pDoc->SetRedlineMode_intern( eOld );
- pUndo->SetInsertRange( *pUndoPam, FALSE );
+ pUndo->SetInsertRange( *pUndoPam, sal_False );
pDoc->AppendUndo( pUndo );
pDoc->SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
}
@@ -349,7 +349,7 @@ ULONG SwReader::Read( const Reader& rOptions )
pDoc->SetAllUniqueFlyNames();
if( bReadPageDescs )
- pDoc->DoUndo( TRUE );
+ pDoc->DoUndo( sal_True );
else
{
pDoc->DoUndo( bDocUndo );
@@ -369,7 +369,7 @@ ULONG SwReader::Read( const Reader& rOptions )
// --> FME 2005-02-25 #i42634# Moved common code of SwReader::Read() and
// SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks():
// ATM still with Update
- pDoc->UpdateLinks( TRUE );
+ pDoc->UpdateLinks( sal_True );
// <--
// not insert: set the redline mode read from settings.xml
@@ -397,10 +397,10 @@ ULONG SwReader::Read( const Reader& rOptions )
// if( po == ReadSw3 ) // am Sw3-Reader noch den pIo-Pointer "loeschen"
// ((Sw3Reader*)po)->SetSw3Io( 0 );
- po->SetReadUTF8( FALSE );
- po->SetBlockMode( FALSE );
- po->SetOrganizerMode( FALSE );
- po->SetIgnoreHTMLComments( FALSE );
+ po->SetReadUTF8( sal_False );
+ po->SetBlockMode( sal_False );
+ po->SetOrganizerMode( sal_False );
+ po->SetIgnoreHTMLComments( sal_False );
return nError;
}
@@ -481,7 +481,7 @@ SwDoc* Reader::GetTemplateDoc()
if( !bHasAskTemplateName )
{
SetTemplateName( GetTemplateName() );
- bHasAskTemplateName = TRUE;
+ bHasAskTemplateName = sal_True;
}
if( !aTemplateNm.Len() )
@@ -492,7 +492,7 @@ SwDoc* Reader::GetTemplateDoc()
String aFileName = aTDir.GetMainURL( INetURLObject::NO_DECODE );
DBG_ASSERT( !aTDir.HasError(), "No absolute path for template name!" );
DateTime aCurrDateTime;
- BOOL bLoad = FALSE;
+ sal_Bool bLoad = sal_False;
// Wenn das Template schon mal geladen wurde, nur einmal pro
// Minute nachschauen, ob es geaendert wurde.
@@ -505,7 +505,7 @@ SwDoc* Reader::GetTemplateDoc()
&aTstDate, &aTstTime ) &&
( !pTemplate || aDStamp != aTstDate || aTStamp != aTstTime ))
{
- bLoad = TRUE;
+ bLoad = sal_True;
aDStamp = aTstDate;
aTStamp = aTstTime;
}
@@ -535,15 +535,15 @@ SwDoc* Reader::GetTemplateDoc()
{
pTemplate = pDocSh->GetDoc();
pTemplate->SetOle2Link( Link() );
- pTemplate->DoUndo( FALSE ); // always FALSE
+ pTemplate->DoUndo( sal_False ); // always sal_False
pTemplate->set(IDocumentSettingAccess::BROWSE_MODE, bTmplBrowseMode );
pTemplate->RemoveAllFmtLanguageDependencies();
- ReadXML->SetOrganizerMode( TRUE );
- SfxMedium aMedium( aFileName, FALSE );
+ ReadXML->SetOrganizerMode( sal_True );
+ SfxMedium aMedium( aFileName, sal_False );
SwReader aRdr( aMedium, aEmptyStr, pTemplate );
aRdr.Read( *ReadXML );
- ReadXML->SetOrganizerMode( FALSE );
+ ReadXML->SetOrganizerMode( sal_False );
pTemplate->acquire();
}
@@ -558,9 +558,9 @@ SwDoc* Reader::GetTemplateDoc()
return pTemplate;
}
-BOOL Reader::SetTemplate( SwDoc& rDoc )
+sal_Bool Reader::SetTemplate( SwDoc& rDoc )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
GetTemplateDoc();
if( pTemplate )
@@ -568,7 +568,7 @@ BOOL Reader::SetTemplate( SwDoc& rDoc )
rDoc.RemoveAllFmtLanguageDependencies();
rDoc.ReplaceStyles( *pTemplate );
rDoc.SetFixFields(false, NULL);
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -616,7 +616,7 @@ int Reader::SetStrmStgPtr()
if( SW_STORAGE_READER & GetReaderType() )
{
xStg = pMedium->GetStorage();
- return TRUE;
+ return sal_True;
}
}
else
@@ -630,12 +630,12 @@ int Reader::SetStrmStgPtr()
else if ( !(SW_STREAM_READER & GetReaderType()) )
{
pStrm = NULL;
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -666,9 +666,9 @@ void Reader::ResetFrmFmtAttrs( SfxItemSet &rFrmSet )
void Reader::ResetFrmFmts( SwDoc& rDoc )
{
- for (USHORT i=0; i<3; ++i)
+ for (sal_uInt16 i=0; i<3; ++i)
{
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
switch (i)
{
default:
@@ -695,51 +695,51 @@ void Reader::ResetFrmFmts( SwDoc& rDoc )
// read the sections of the document, which is equal to the medium.
// returns the count of it
-USHORT Reader::GetSectionList( SfxMedium&, SvStrings& ) const
+sal_uInt16 Reader::GetSectionList( SfxMedium&, SvStrings& ) const
{
return 0;
}
// ------------------------------------------------
-BOOL SwReader::HasGlossaries( const Reader& rOptions )
+sal_Bool SwReader::HasGlossaries( const Reader& rOptions )
{
// Variable uebertragen
Reader* po = (Reader*) &rOptions;
po->pStrm = pStrm;
po->pStg = pStg;
- po->bInsertMode = FALSE;
+ po->bInsertMode = sal_False;
// ist ein Medium angegeben, dann aus diesem die Streams besorgen
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !( 0 != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() ))
bRet = po->HasGlossaries();
return bRet;
}
-BOOL SwReader::ReadGlossaries( const Reader& rOptions,
- SwTextBlocks& rBlocks, BOOL bSaveRelFiles )
+sal_Bool SwReader::ReadGlossaries( const Reader& rOptions,
+ SwTextBlocks& rBlocks, sal_Bool bSaveRelFiles )
{
// Variable uebertragen
Reader* po = (Reader*) &rOptions;
po->pStrm = pStrm;
po->pStg = pStg;
- po->bInsertMode = FALSE;
+ po->bInsertMode = sal_False;
// ist ein Medium angegeben, dann aus diesem die Streams besorgen
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !( 0 != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() ))
bRet = po->ReadGlossaries( rBlocks, bSaveRelFiles );
return bRet;
}
-BOOL Reader::HasGlossaries() const
+sal_Bool Reader::HasGlossaries() const
{
- return FALSE;
+ return sal_False;
}
-BOOL Reader::ReadGlossaries( SwTextBlocks&, BOOL ) const
+sal_Bool Reader::ReadGlossaries( SwTextBlocks&, sal_Bool ) const
{
- return FALSE;
+ return sal_False;
}
// ------------------------------------------------
@@ -760,7 +760,7 @@ int StgReader::GetReaderType()
* Konstruktoren, Destruktoren sind inline (inc/shellio.hxx).
*/
-SwWriter::SwWriter(SvStream& rStrm, SwCrsrShell &rShell, BOOL bInWriteAll)
+SwWriter::SwWriter(SvStream& rStrm, SwCrsrShell &rShell, sal_Bool bInWriteAll)
: pStrm(&rStrm), pMedium(0), pOutPam(0), pShell(&rShell),
rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll)
{
@@ -772,7 +772,7 @@ SwWriter::SwWriter(SvStream& rStrm,SwDoc &rDocument)
{
}
-SwWriter::SwWriter(SvStream& rStrm, SwPaM& rPam, BOOL bInWriteAll)
+SwWriter::SwWriter(SvStream& rStrm, SwPaM& rPam, sal_Bool bInWriteAll)
: pStrm(&rStrm), pMedium(0), pOutPam(&rPam), pShell(0),
rDoc(*rPam.GetDoc()), bWriteAll(bInWriteAll)
{
@@ -783,7 +783,7 @@ SwWriter::SwWriter( const uno::Reference < embed::XStorage >& rStg, SwDoc &rDocu
{
}
-SwWriter::SwWriter(SfxMedium& rMedium, SwCrsrShell &rShell, BOOL bInWriteAll)
+SwWriter::SwWriter(SfxMedium& rMedium, SwCrsrShell &rShell, sal_Bool bInWriteAll)
: pStrm(0), pMedium(&rMedium), pOutPam(0), pShell(&rShell),
rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll)
{
@@ -795,13 +795,13 @@ SwWriter::SwWriter(SfxMedium& rMedium, SwDoc &rDocument)
{
}
-ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
+sal_uLong SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
{
// --> OD 2007-03-30 #i73788#
SwPauseThreadStarting aPauseThreadStarting;
// <--
- BOOL bHasMark = FALSE;
+ sal_Bool bHasMark = sal_False;
SwPaM * pPam;
SwDoc *pDoc = 0;
@@ -809,7 +809,7 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
if ( pShell && !bWriteAll && pShell->IsTableMode() )
{
- bWriteAll = TRUE;
+ bWriteAll = sal_True;
pDoc = new SwDoc;
pDoc->acquire();
pRefForDocSh = new SfxObjectShellRef();
@@ -840,7 +840,7 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
SwPaM *pEnd = pPam;
// Erste Runde: Nachsehen, ob eine Selektion besteht.
- while(TRUE)
+ while(sal_True)
{
bHasMark = bHasMark || pPam->HasMark();
pPam = (SwPaM *) pPam->GetNext();
@@ -854,9 +854,9 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
if( pShell )
{
pShell->Push();
- pShell->SttEndDoc(TRUE);
+ pShell->SttEndDoc(sal_True);
pShell->SetMark();
- pShell->SttEndDoc(FALSE);
+ pShell->SttEndDoc(sal_False);
}
else
{
@@ -913,19 +913,19 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
}
}
- BOOL bLockedView(FALSE);
+ sal_Bool bLockedView(sal_False);
SwEditShell* pESh = pOutDoc->GetEditShell();
if( pESh )
{
bLockedView = pESh->IsViewLocked();
- pESh->LockView( TRUE ); //lock visible section
+ pESh->LockView( sal_True ); //lock visible section
pESh->StartAllAction();
}
- BOOL bWasPurgeOle = pOutDoc->get(IDocumentSettingAccess::PURGE_OLE);
+ sal_Bool bWasPurgeOle = pOutDoc->get(IDocumentSettingAccess::PURGE_OLE);
pOutDoc->set(IDocumentSettingAccess::PURGE_OLE, false);
- ULONG nError = 0;
+ sal_uLong nError = 0;
if( pMedium )
nError = rxWriter->Write( *pPam, *pMedium, pRealFileName );
else if( pStg )
@@ -950,7 +950,7 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
if(!bHasMark)
{
if( pShell )
- pShell->Pop( FALSE );
+ pShell->Pop( sal_False );
else
delete pPam;
}
@@ -974,7 +974,7 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
delete pRefForDocSh;
if ( !pDoc->release() )
delete pDoc;
- bWriteAll = FALSE;
+ bWriteAll = sal_False;
}
return nError;
@@ -986,13 +986,13 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
// ----------------------------------------------------------------------
-BOOL SetHTMLTemplate( SwDoc & rDoc )
+sal_Bool SetHTMLTemplate( SwDoc & rDoc )
{
// Vorlagennamen von den Sfx-HTML-Filter besorgen!!!
if( !ReadHTML->GetTemplateDoc() )
ReadHTML->MakeHTMLDummyTemplateDoc();
- BOOL bRet = ReadHTML->SetTemplate( rDoc );
+ sal_Bool bRet = ReadHTML->SetTemplate( rDoc );
SwNodes& rNds = rDoc.GetNodes();
SwNodeIndex aIdx( rNds.GetEndOfExtras(), 1 );
diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx
index 39761ebbd810..a6ae6622a340 100644
--- a/sw/source/filter/html/SwAppletImpl.cxx
+++ b/sw/source/filter/html/SwAppletImpl.cxx
@@ -48,9 +48,9 @@ static char const sHTML_O_Object[] = "OBJECT";
}
-USHORT SwApplet_Impl::GetOptionType( const String& rName, BOOL bApplet )
+sal_uInt16 SwApplet_Impl::GetOptionType( const String& rName, sal_Bool bApplet )
{
- USHORT nType = bApplet ? SWHTML_OPTTYPE_PARAM : SWHTML_OPTTYPE_TAG;
+ sal_uInt16 nType = bApplet ? SWHTML_OPTTYPE_PARAM : SWHTML_OPTTYPE_TAG;
switch( rName.GetChar(0) )
{
@@ -124,13 +124,13 @@ USHORT SwApplet_Impl::GetOptionType( const String& rName, BOOL bApplet )
return nType;
}
-SwApplet_Impl::SwApplet_Impl( SfxItemPool& rPool, USHORT nWhich1, USHORT nWhich2 ) :
+SwApplet_Impl::SwApplet_Impl( SfxItemPool& rPool, sal_uInt16 nWhich1, sal_uInt16 nWhich2 ) :
aItemSet( rPool, nWhich1, nWhich2 )
{
}
void SwApplet_Impl::CreateApplet( const String& rCode, const String& rName,
- BOOL bMayScript, const String& rCodeBase,
+ sal_Bool bMayScript, const String& rCodeBase,
const String& rDocumentBaseURL )
{
comphelper::EmbeddedObjectContainer aCnt;
@@ -190,7 +190,7 @@ SwApplet_Impl::~SwApplet_Impl()
}
void SwApplet_Impl::FinishApplet()
{
- //xApplet->EnableSetModified( TRUE );
+ //xApplet->EnableSetModified( sal_True );
uno::Reference < beans::XPropertySet > xSet( xApplet->getComponent(), uno::UNO_QUERY );
if ( xSet.is() )
{
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 7edd84270886..63925788ee1a 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -151,10 +151,10 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
IDocumentStylePoolAccess /*SwDoc*/ *pDoc, SwDoc *pTemplate );
static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rFmt,
IDocumentStylePoolAccess /*SwDoc*/ *pDoc, SwDoc *pTemplate,
- USHORT nRefPoolId, BOOL bExtRef,
- BOOL bPseudo=TRUE );
+ sal_uInt16 nRefPoolId, sal_Bool bExtRef,
+ sal_Bool bPseudo=sal_True );
static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
- SwDoc *pDoc, USHORT nNotes, BOOL bEndNote );
+ SwDoc *pDoc, sal_uInt16 nNotes, sal_Bool bEndNote );
static void OutCSS1_SwFmtDropAttrs( SwHTMLWriter& rHWrt,
const SwFmtDrop& rDrop,
const SfxItemSet *pCharFmtItemSet=0 );
@@ -172,25 +172,25 @@ static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
const SvxLRSpaceItem *pLRSpace );
static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
const SfxItemSet& rItemSet,
- BOOL bDeep );
+ sal_Bool bDeep );
static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
- USHORT nMode, const String *pGrfName );
+ sal_uInt16 nMode, const String *pGrfName );
static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt );
static Writer& OutCSS1_SvxBox( Writer& rWrt, const SfxPoolItem& rHt );
static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
- USHORT nMode );
+ sal_uInt16 nMode );
static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt,
const SfxItemSet& rItemSet,
- BOOL bDeep );
+ sal_Bool bDeep );
static Writer& OutCSS1_SwFmtLayoutSplit( Writer& rWrt, const SfxPoolItem& rHt );
-static void ConvToHex( USHORT nHex, ByteString& rStr )
+static void ConvToHex( sal_uInt16 nHex, ByteString& rStr )
{
sal_Char aNToABuf[] = "00";
// Pointer an das Bufferende setzen
sal_Char *pStr = aNToABuf + (sizeof(aNToABuf)-1);
- for( BYTE n = 0; n < 2; ++n )
+ for( sal_uInt8 n = 0; n < 2; ++n )
{
*(--pStr) = (sal_Char)(nHex & 0xf ) + 48;
if( *pStr > '9' )
@@ -213,18 +213,18 @@ static void GetCSS1Color( const Color& rColor, ByteString& rStr )
class SwCSS1OutMode
{
SwHTMLWriter& rWrt;
- USHORT nOldMode;
+ sal_uInt16 nOldMode;
public:
- SwCSS1OutMode( SwHTMLWriter& rHWrt, USHORT nMode, BOOL bStartFirst=TRUE,
+ SwCSS1OutMode( SwHTMLWriter& rHWrt, sal_uInt16 nMode, sal_Bool bStartFirst=sal_True,
const String *pSelector=0 ) :
rWrt( rHWrt ),
nOldMode( rHWrt.nCSS1OutMode )
{
rWrt.nCSS1OutMode = nMode;
if( bStartFirst )
- rWrt.bFirstCSS1Property = TRUE;
+ rWrt.bFirstCSS1Property = sal_True;
if( pSelector )
rWrt.aCSS1Selector = *pSelector;
}
@@ -245,7 +245,7 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
if( bFirstCSS1Rule && (nCSS1OutMode & CSS1_OUTMODE_RULE_ON)!=0 )
{
- bFirstCSS1Rule = FALSE;
+ bFirstCSS1Rule = sal_False;
OutNewLine();
((((sOut += '<') += OOO_STRING_SVTOOLS_HTML_style) += ' ') += OOO_STRING_SVTOOLS_HTML_O_type) += "=\"text/css\">";
Strm() << sOut.GetBuffer();
@@ -268,7 +268,7 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
}
else
{
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_span, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_span, sal_False );
return;
}
break;
@@ -285,7 +285,7 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
((sOut = ' ') += OOO_STRING_SVTOOLS_HTML_O_style) += "=\"";
break;
}
- bFirstCSS1Property = FALSE;
+ bFirstCSS1Property = sal_False;
}
else
{
@@ -421,7 +421,7 @@ static void AddUnitPropertyValue( long nVal, FieldUnit eUnit, ByteString& rOut )
}
long nLongVal = 0;
- BOOL bOutLongVal = TRUE;
+ sal_Bool bOutLongVal = sal_True;
if( nVal > LONG_MAX / nMul )
{
// Zum Unrechnen der Einheit wird ein BigInt benoetigt
@@ -452,7 +452,7 @@ static void AddUnitPropertyValue( long nVal, FieldUnit eUnit, ByteString& rOut )
rOut += (int)((nBigVal / nBigFac) % nBig10 );
}
}
- bOutLongVal = FALSE;
+ bOutLongVal = sal_False;
}
#else
sal_Int64 nBigVal( nVal );
@@ -479,7 +479,7 @@ static void AddUnitPropertyValue( long nVal, FieldUnit eUnit, ByteString& rOut )
(nBigVal / (sal_Int64)nFac) % (sal_Int64)10 );
}
}
- bOutLongVal = FALSE;
+ bOutLongVal = sal_False;
}
#endif
}
@@ -516,7 +516,7 @@ void SwHTMLWriter::OutCSS1_UnitProperty( const sal_Char *pProp, long nVal )
}
void SwHTMLWriter::OutCSS1_PixelProperty( const sal_Char *pProp, long nVal,
- BOOL bVert )
+ sal_Bool bVert )
{
if( nVal && Application::GetDefaultDevice() )
{
@@ -533,7 +533,7 @@ void SwHTMLWriter::OutCSS1_PixelProperty( const sal_Char *pProp, long nVal,
}
void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet,
- BOOL bDeep )
+ sal_Bool bDeep )
{
// den ItemSet ausgeben, und zwar inklusive aller Attribute
Out_SfxItemSet( aCSS1AttrFnTab, *this, rItemSet, bDeep );
@@ -594,16 +594,16 @@ void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet,
}
}
-void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
+void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, sal_Bool bUsed )
{
- bFirstCSS1Rule = TRUE;
+ bFirstCSS1Rule = sal_True;
// Feature: PrintExt
if( IsHTMLMode(HTMLMODE_PRINT_EXT) )
{
const SwPageDesc *pFirstPageDesc = 0;
- USHORT nFirstRefPoolId = RES_POOLPAGE_HTML;
- bCSS1IgnoreFirstPageDesc = TRUE;
+ sal_uInt16 nFirstRefPoolId = RES_POOLPAGE_HTML;
+ bCSS1IgnoreFirstPageDesc = sal_True;
// Erstmal versuchen wir zu erraten, wie das Dokument so augebaut ist.
// Erlaubt sind nur die Vorlagen HTML, erste Seite, linke Seite und
@@ -634,7 +634,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
// Die Attributierung wird relativ zur HTML-Seitenvorlage
// aus der HTML-Vorlage exportiert.
OutCSS1_SwPageDesc( *this, *pPageDesc, pStylePoolAccess, pTemplate,
- RES_POOLPAGE_HTML, TRUE, FALSE );
+ RES_POOLPAGE_HTML, sal_True, sal_False );
nFirstRefPoolId = pFollow->GetPoolFmtId();
}
else if( (RES_POOLPAGE_LEFT == pPageDesc->GetPoolFmtId() &&
@@ -644,17 +644,17 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
{
// Das Dokument ist zweiseitig
OutCSS1_SwPageDesc( *this, *pPageDesc, pStylePoolAccess, pTemplate,
- RES_POOLPAGE_HTML, TRUE );
+ RES_POOLPAGE_HTML, sal_True );
OutCSS1_SwPageDesc( *this, *pFollow, pStylePoolAccess, pTemplate,
- RES_POOLPAGE_HTML, TRUE );
+ RES_POOLPAGE_HTML, sal_True );
nFirstRefPoolId = RES_POOLPAGE_RIGHT;
- bCSS1IgnoreFirstPageDesc = FALSE;
+ bCSS1IgnoreFirstPageDesc = sal_False;
}
// Alles andere bekommen wir nicht hin.
if( pFirstPageDesc )
OutCSS1_SwPageDesc( *this, *pFirstPageDesc, pStylePoolAccess, pTemplate,
- nFirstRefPoolId, FALSE );
+ nFirstRefPoolId, sal_False );
}
// /Feature: PrintExt
@@ -666,13 +666,13 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
// das Default-TextStyle wir nicht mit ausgegeben !!
// das 0-Style ist das Default, wird nie ausgegeben !!
- USHORT nArrLen = pDoc->GetTxtFmtColls()->Count();
- USHORT i;
+ sal_uInt16 nArrLen = pDoc->GetTxtFmtColls()->Count();
+ sal_uInt16 i;
for( i = 1; i < nArrLen; i++ )
{
const SwTxtFmtColl* pColl = (*pDoc->GetTxtFmtColls())[i];
- USHORT nPoolId = pColl->GetPoolFmtId();
+ sal_uInt16 nPoolId = pColl->GetPoolFmtId();
if( !bUsed || nPoolId == RES_POOLCOLL_TEXT ||
pDoc->IsUsed( *pColl ) )
OutCSS1_SwFmt( *this, *pColl, pDoc, pTemplate );
@@ -683,7 +683,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
for( i=1; i<nArrLen; i++ )
{
const SwCharFmt *pCFmt = (*pDoc->GetCharFmts())[i];
- USHORT nPoolId = pCFmt->GetPoolFmtId();
+ sal_uInt16 nPoolId = pCFmt->GetPoolFmtId();
if( !bUsed || nPoolId == RES_POOLCHR_INET_NORMAL ||
nPoolId == RES_POOLCHR_INET_VISIT ||
pDoc->IsUsed( *pCFmt ) )
@@ -692,7 +692,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
const SwFtnIdxs& rIdxs = pDoc->GetFtnIdxs();
nArrLen = rIdxs.Count();
- USHORT nEnd = 0, nFtn = 0;
+ sal_uInt16 nEnd = 0, nFtn = 0;
for( i=0; i < nArrLen; i++ )
{
if( rIdxs[i]->GetFtn().IsEndNote() )
@@ -700,8 +700,8 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
else
nFtn++;
}
- OutCSS1_SwFtnInfo( *this, pDoc->GetFtnInfo(), pDoc, nFtn, FALSE );
- OutCSS1_SwFtnInfo( *this, pDoc->GetEndNoteInfo(), pDoc, nEnd, TRUE );
+ OutCSS1_SwFtnInfo( *this, pDoc->GetFtnInfo(), pDoc, nFtn, sal_False );
+ OutCSS1_SwFtnInfo( *this, pDoc->GetEndNoteInfo(), pDoc, nEnd, sal_True );
if( !bFirstCSS1Rule )
{
@@ -710,11 +710,11 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
Strm() << "-->";
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_style, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_style, sal_False );
}
else
{
- bFirstCSS1Rule = FALSE;
+ bFirstCSS1Rule = sal_False;
}
nDfltTopMargin = 0;
@@ -725,25 +725,25 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
// wenn pPseudo gesetzt ist werden Styles-Sheets ausgegeben,
// sonst wird nur nach Token und Class fuer ein Format gesucht
-USHORT SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
- String& rClass, USHORT& rRefPoolId,
+sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
+ String& rClass, sal_uInt16& rRefPoolId,
String *pPseudo )
{
- USHORT nDeep = 0;
+ sal_uInt16 nDeep = 0;
rToken.Erase(); rClass.Erase();
rRefPoolId = 0;
if( pPseudo )
pPseudo->Erase();
- BOOL bChrFmt = RES_CHRFMT==pFmt->Which();
+ sal_Bool bChrFmt = RES_CHRFMT==pFmt->Which();
// Nach oben die Formate abklappern, bis man auf eine Standard-
// oder eine HTML-Tag-Vorlage trifft
const SwFmt *pPFmt = pFmt;
while( pPFmt && !pPFmt->IsDefault() )
{
- BOOL bStop = FALSE;
- USHORT nPoolId = pPFmt->GetPoolFmtId();
+ sal_Bool bStop = sal_False;
+ sal_uInt16 nPoolId = pPFmt->GetPoolFmtId();
if( USER_FMT & nPoolId )
{
// Benutzer-Vorlagen
@@ -785,7 +785,7 @@ USHORT SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
}
else if( !bChrFmt )
{
- USHORT nDefListLvl = GetDefListLvl( rNm, nPoolId );
+ sal_uInt16 nDefListLvl = GetDefListLvl( rNm, nPoolId );
// Die Vorlagen DD 1/DT 1 werden ausgegeben,
// aber keine von ihnen abgeleiteten Vorlagen,
// auch nicht DD 2/DT 2 etc.
@@ -794,7 +794,7 @@ USHORT SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
if( pPseudo &&
(nDeep || (nDefListLvl & 0x0fff) > 1) )
{
- bStop = TRUE;
+ bStop = sal_True;
}
else if( nDefListLvl & HTML_DLCOLL_DD )
{
@@ -1074,14 +1074,14 @@ USHORT SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
return nDeep;
}
-static USHORT GetCSS1Selector( const SwFmt *pFmt, String& rSelector,
- USHORT& rRefPoolId )
+static sal_uInt16 GetCSS1Selector( const SwFmt *pFmt, String& rSelector,
+ sal_uInt16& rRefPoolId )
{
ByteString aToken;
String aClass;
String aPseudo;
- USHORT nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass,
+ sal_uInt16 nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass,
rRefPoolId, &aPseudo );
if( nDeep )
{
@@ -1099,7 +1099,7 @@ static USHORT GetCSS1Selector( const SwFmt *pFmt, String& rSelector,
return nDeep;
}
-const SwFmt *SwHTMLWriter::GetTemplateFmt( USHORT nPoolFmtId,
+const SwFmt *SwHTMLWriter::GetTemplateFmt( sal_uInt16 nPoolFmtId,
IDocumentStylePoolAccess* pTemplate /*SwDoc *pTemplate*/)
{
const SwFmt *pRefFmt = 0;
@@ -1117,7 +1117,7 @@ const SwFmt *SwHTMLWriter::GetTemplateFmt( USHORT nPoolFmtId,
return pRefFmt;
}
-const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, USHORT nDeep )
+const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, sal_uInt16 nDeep )
{
ASSERT( nDeep != USHRT_MAX, "GetParent fuer HTML-Vorlage aufgerufen!" );
const SwFmt *pRefFmt = 0;
@@ -1127,7 +1127,7 @@ const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, USHORT nDeep )
// hier wird die HTML-Tag-Vorlage, von der die Vorlage abgeleitet
// ist als Referenz geholt
pRefFmt = &rFmt;
- for( USHORT i=nDeep; i>0; i-- )
+ for( sal_uInt16 i=nDeep; i>0; i-- )
pRefFmt = pRefFmt->DerivedFrom();
if( pRefFmt && pRefFmt->IsDefault() )
@@ -1137,7 +1137,7 @@ const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, USHORT nDeep )
return pRefFmt;
}
-BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 )
+sal_Bool lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 )
{
return ((const SvxFontItem &)r1).GetFamilyName() ==
((const SvxFontItem &)r2).GetFamilyName() &&
@@ -1147,8 +1147,8 @@ BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 )
void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
const SfxItemSet& rRefItemSet,
- BOOL bSetDefaults,
- BOOL bClearSame,
+ sal_Bool bSetDefaults,
+ sal_Bool bClearSame,
const SfxItemSet *pRefScriptItemSet )
{
ASSERT( bSetDefaults || bClearSame,
@@ -1158,13 +1158,13 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
// und mit dem Attr-Set der Vorlage vergleichen
SfxWhichIter aIter( rItemSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
const SfxPoolItem *pRefItem, *pItem;
- BOOL bItemSet = ( SFX_ITEM_SET ==
- rItemSet.GetItemState( nWhich, FALSE, &pItem) );
- BOOL bRefItemSet;
+ sal_Bool bItemSet = ( SFX_ITEM_SET ==
+ rItemSet.GetItemState( nWhich, sal_False, &pItem) );
+ sal_Bool bRefItemSet;
if( pRefScriptItemSet )
{
@@ -1186,18 +1186,18 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
case RES_CHRATR_CTL_POSTURE:
case RES_CHRATR_CTL_WEIGHT:
bRefItemSet = ( SFX_ITEM_SET ==
- pRefScriptItemSet->GetItemState( nWhich, TRUE, &pRefItem) );
+ pRefScriptItemSet->GetItemState( nWhich, sal_True, &pRefItem) );
break;
default:
bRefItemSet = ( SFX_ITEM_SET ==
- aRefItemSet.GetItemState( nWhich, FALSE, &pRefItem) );
+ aRefItemSet.GetItemState( nWhich, sal_False, &pRefItem) );
break;
}
}
else
{
bRefItemSet = ( SFX_ITEM_SET ==
- aRefItemSet.GetItemState( nWhich, FALSE, &pRefItem) );
+ aRefItemSet.GetItemState( nWhich, sal_False, &pRefItem) );
}
if( bItemSet )
@@ -1230,11 +1230,11 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
void SwHTMLWriter::PrepareFontList( const SvxFontItem& rFontItem,
String& rNames,
- sal_Unicode cQuote, BOOL bGeneric )
+ sal_Unicode cQuote, sal_Bool bGeneric )
{
rNames = aEmptyStr;
const String& rName = rFontItem.GetFamilyName();
- BOOL bContainsKeyword = FALSE;
+ sal_Bool bContainsKeyword = sal_False;
if( rName.Len() )
{
xub_StrLen nStrPos = 0;
@@ -1245,7 +1245,7 @@ void SwHTMLWriter::PrepareFontList( const SvxFontItem& rFontItem,
if( !aName.Len() )
continue;
- BOOL bIsKeyword = FALSE;
+ sal_Bool bIsKeyword = sal_False;
switch( aName.GetChar( 0 ) )
{
case 'c':
@@ -1424,8 +1424,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
// some class rule for the additional style dependen properties
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_NO_SCRIPT|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &rSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &rSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
SfxItemSet aScriptItemSet( *rItemSet.GetPool(),
@@ -1441,8 +1441,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, sal_False );
}
aNewSelector = aSelector;
@@ -1450,8 +1450,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CJK|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, sal_False );
}
aNewSelector = aSelector;
@@ -1459,8 +1459,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CTL|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, sal_False );
}
}
else
@@ -1473,8 +1473,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
aNewSelector = aSelector;
@@ -1482,8 +1482,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CJK|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
aNewSelector = aSelector;
@@ -1491,8 +1491,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CTL|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
}
}
@@ -1504,8 +1504,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
// script dependencies by now.
SwCSS1OutMode aMode( rHTMLWrt,
rHTMLWrt.nCSS1Script|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &rSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &rSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
return bScriptDependent;
@@ -1537,7 +1537,7 @@ static void OutCSS1DropCapRule(
// some class rule for the additional style dependen properties
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_NO_SCRIPT|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &rSelector );
+ sal_True, &rSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
@@ -1555,7 +1555,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet );
}
@@ -1564,7 +1564,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CJK|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet );
}
@@ -1573,7 +1573,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CTL|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet );
}
}
@@ -1587,7 +1587,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
@@ -1596,7 +1596,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CJK|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
@@ -1605,7 +1605,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CTL|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
}
@@ -1618,7 +1618,7 @@ static void OutCSS1DropCapRule(
// script dependencies by now.
SwCSS1OutMode aMode( rHTMLWrt,
rHTMLWrt.nCSS1Script|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &rSelector );
+ sal_True, &rSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
}
@@ -1628,11 +1628,11 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
- BOOL bCharFmt = FALSE;
+ sal_Bool bCharFmt = sal_False;
switch( rFmt.Which() )
{
case RES_CHRFMT:
- bCharFmt = TRUE;
+ bCharFmt = sal_True;
break;
case RES_TXTFMTCOLL:
@@ -1647,12 +1647,12 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// den Selector und die auszugebende Attr-Set-Tiefe ermitteln
String aSelector;
- USHORT nRefPoolId = 0;
- USHORT nDeep = GetCSS1Selector( &rFmt, aSelector, nRefPoolId );
+ sal_uInt16 nRefPoolId = 0;
+ sal_uInt16 nDeep = GetCSS1Selector( &rFmt, aSelector, nRefPoolId );
if( !nDeep )
return rWrt; // von keiner HTML-Vorlage abgeleitet
- USHORT nPoolFmtId = rFmt.GetPoolFmtId();
+ sal_uInt16 nPoolFmtId = rFmt.GetPoolFmtId();
// Den auszugebenden Attr-Set bestimmen. Hier muessen 3 Faelle
// unterschieden werden:
@@ -1674,11 +1674,11 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// (ausser fuer nDeep==1)
const SfxItemSet& rFmtItemSet = rFmt.GetAttrSet();
SfxItemSet aItemSet( *rFmtItemSet.GetPool(), rFmtItemSet.GetRanges() );
- aItemSet.Set( rFmtItemSet, TRUE ); // Was nDeep!=1 that is not working
+ aItemSet.Set( rFmtItemSet, sal_True ); // Was nDeep!=1 that is not working
// for script dependent items buts should
// not make a deifference for any other
- BOOL bSetDefaults = TRUE, bClearSame = TRUE;
+ sal_Bool bSetDefaults = sal_True, bClearSame = sal_True;
const SwFmt *pRefFmt = 0;
const SwFmt *pRefFmtScript = 0;
switch( nDeep )
@@ -1689,12 +1689,12 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
case CSS1_FMT_CMPREF:
pRefFmt = SwHTMLWriter::GetTemplateFmt( nRefPoolId, pDoc );
pRefFmtScript = SwHTMLWriter::GetTemplateFmt( nRefPoolId, pTemplate );
- bClearSame = FALSE;
+ bClearSame = sal_False;
break;
default:
pRefFmt = SwHTMLWriter::GetParentFmt( rFmt, nDeep );
pRefFmtScript = SwHTMLWriter::GetTemplateFmt( nRefPoolId, pTemplate );
- bSetDefaults = FALSE;
+ bSetDefaults = sal_False;
break;
}
@@ -1796,12 +1796,12 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
}
if( nPoolFmtId==RES_POOLCOLL_TEXT && !rHTMLWrt.bFirstCSS1Property )
- rHTMLWrt.bPoolCollTextModified = TRUE;
+ rHTMLWrt.bPoolCollTextModified = sal_True;
// Drop-Caps ausgeben
const SfxPoolItem *pItem;
if( rHTMLWrt.IsHTMLMode(HTMLMODE_DROPCAPS) &&
- SFX_ITEM_SET==aItemSet.GetItemState( RES_PARATR_DROP, FALSE, &pItem ))
+ SFX_ITEM_SET==aItemSet.GetItemState( RES_PARATR_DROP, sal_False, &pItem ))
{
String sOut( aSelector );
sOut.Append( ':');
@@ -1815,8 +1815,8 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
IDocumentStylePoolAccess/*SwDoc*/ *pDoc, SwDoc *pTemplate,
- USHORT nRefPoolId, BOOL bExtRef,
- BOOL bPseudo )
+ sal_uInt16 nRefPoolId, sal_Bool bExtRef,
+ sal_Bool bPseudo )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1846,12 +1846,12 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
}
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_RULE_ON|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aSelector );
+ sal_True, &aSelector );
// Die Groesse: Wenn sie sich nur durch das Landscape-Flag unterscheidet,
// wird nur Portrait oder Landscape exportiert. Sonst wird die Groesse
// exportiert.
- BOOL bRefLandscape = pRefPageDesc ? pRefPageDesc->GetLandscape() : FALSE;
+ sal_Bool bRefLandscape = pRefPageDesc ? pRefPageDesc->GetLandscape() : sal_False;
Size aRefSz;
const Size& rSz = rPageDesc.GetMaster().GetFrmSize().GetSize();
if( pRefPageDesc )
@@ -1895,16 +1895,16 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
const SwFrmFmt &rMaster = rPageDesc.GetMaster();
SfxItemSet aItemSet( *rMaster.GetAttrSet().GetPool(),
RES_LR_SPACE, RES_UL_SPACE );
- aItemSet.Set( rMaster.GetAttrSet(), TRUE );
+ aItemSet.Set( rMaster.GetAttrSet(), sal_True );
if( pRefPageDesc )
{
SwHTMLWriter::SubtractItemSet( aItemSet,
pRefPageDesc->GetMaster().GetAttrSet(),
- TRUE );
+ sal_True );
}
- OutCSS1_SvxULSpace_SvxLRSpace( rWrt, aItemSet, FALSE );
+ OutCSS1_SvxULSpace_SvxLRSpace( rWrt, aItemSet, sal_False );
// Wenn fuer einen Pseudo-Selektor keine Property ausgegeben wurde, muessen
// wir trotzdem etwas ausgeben, damit beim Import die entsprechende
@@ -1914,7 +1914,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
rHTMLWrt.OutNewLine();
ByteString sTmp( aSelector, rHTMLWrt.eDestEnc );
rWrt.Strm() << sTmp.GetBuffer() << " {";
- rHTMLWrt.bFirstCSS1Property = FALSE;
+ rHTMLWrt.bFirstCSS1Property = sal_False;
}
if( !rHTMLWrt.bFirstCSS1Property )
@@ -1924,7 +1924,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
}
static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
- SwDoc *pDoc, USHORT nNotes, BOOL bEndNote )
+ SwDoc *pDoc, sal_uInt16 nNotes, sal_Bool bEndNote )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1937,7 +1937,7 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
aSelector.AppendAscii( bEndNote ? OOO_STRING_SVTOOLS_HTML_sdendnote_anc
: OOO_STRING_SVTOOLS_HTML_sdfootnote_anc );
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aSelector );
+ sal_True, &aSelector );
rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_font_size,
sHTML_FTN_fontheight );
rHTMLWrt.Strm() << sCSS1_rule_end;
@@ -1948,7 +1948,7 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
{
const SfxItemSet& rFmtItemSet = pSymCharFmt->GetAttrSet();
SfxItemSet aItemSet( *rFmtItemSet.GetPool(), rFmtItemSet.GetRanges() );
- aItemSet.Set( rFmtItemSet, TRUE );
+ aItemSet.Set( rFmtItemSet, sal_True );
// Wenn es Fuss- bzw. Endnoten gibt, dann muessen alles Attribute
// ausgegeben werden, damit Netscape das Dokument richtig anzeigt.
@@ -1960,7 +1960,7 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
static_cast< sal_uInt16 >(bEndNote ? RES_POOLCHR_ENDNOTE : RES_POOLCHR_FOOTNOTE) );
if( pRefFmt )
SwHTMLWriter::SubtractItemSet( aItemSet, pRefFmt->GetAttrSet(),
- TRUE );
+ sal_True );
}
if( aItemSet.Count() )
{
@@ -1990,14 +1990,14 @@ Writer& OutCSS1_BodyTagStyleOpt( Writer& rWrt, const SfxItemSet& rItemSet,
// Export der Absatz-Vorlagen beruecksichtigt.
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False,
&pItem ) )
{
OutCSS1_SvxBrush( rWrt, *pItem, CSS1_BACKGROUND_PAGE,
&aEmbBGGrfName );
}
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, sal_False,
&pItem ))
{
OutCSS1_SvxBox( rWrt, *pItem );
@@ -2019,7 +2019,7 @@ Writer& OutCSS1_ParaTagStyleOpt( Writer& rWrt, const SfxItemSet& rItemSet )
SwCSS1OutMode aMode( rHTMLWrt, rHTMLWrt.nCSS1Script|CSS1_OUTMODE_STYLE_OPT |
CSS1_OUTMODE_ENCODE|CSS1_OUTMODE_PARA );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
return rWrt;
}
@@ -2073,7 +2073,7 @@ Writer& OutCSS1_TableBGStyleOpt( Writer& rWrt, const SfxPoolItem& rHt )
Writer& OutCSS1_NumBulListStyleOpt( Writer& rWrt, const SwNumRule& rNumRule,
- BYTE nLevel )
+ sal_uInt8 nLevel )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -2157,7 +2157,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
// top
long nXPos=0, nYPos=0;
- BOOL bOutXPos = FALSE, bOutYPos = FALSE;
+ sal_Bool bOutXPos = sal_False, bOutYPos = sal_False;
if( RES_DRAWFRMFMT == rFrmFmt.Which() )
{
ASSERT( pSdrObj, "Kein SdrObject uebergeben. Ineffizient" );
@@ -2170,7 +2170,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
nXPos = aPos.A();
nYPos = aPos.B();
}
- bOutXPos = bOutYPos = TRUE;
+ bOutXPos = bOutYPos = sal_True;
}
else
{
@@ -2191,7 +2191,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
nYPos -= aULItem.GetUpper();
if( nYPos < 0 )
{
- aULItem.SetUpper( (USHORT)(aULItem.GetUpper() + nYPos) );
+ aULItem.SetUpper( (sal_uInt16)(aULItem.GetUpper() + nYPos) );
nYPos = 0;
}
}
@@ -2207,7 +2207,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
nXPos -= aLRItem.GetLeft();
if( nXPos < 0 )
{
- aLRItem.SetLeft( (USHORT)(aLRItem.GetLeft() + nXPos) );
+ aLRItem.SetLeft( (sal_uInt16)(aLRItem.GetLeft() + nXPos) );
nXPos = 0;
}
}
@@ -2238,7 +2238,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
{
if( nFrmOpts & HTML_FRMOPT_S_PIXSIZE )
OutCSS1_PixelProperty( sCSS1_P_width, aTwipSz.Width(),
- FALSE );
+ sal_False );
else
OutCSS1_UnitProperty( sCSS1_P_width, aTwipSz.Width() );
}
@@ -2246,7 +2246,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
{
if( nFrmOpts & HTML_FRMOPT_S_PIXSIZE )
OutCSS1_PixelProperty( sCSS1_P_height, aTwipSz.Height(),
- TRUE );
+ sal_True );
else
OutCSS1_UnitProperty( sCSS1_P_height, aTwipSz.Height() );
}
@@ -2258,7 +2258,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
"Absolute Groesse wird exportiert" );
ASSERT( HTML_FRMOPT_ANYSIZE & nFrmOpts,
"Jede Groesse wird exportiert" );
- USHORT nMode = 0;
+ sal_uInt16 nMode = 0;
if( nFrmOpts & HTML_FRMOPT_S_WIDTH )
nMode |= CSS1_FRMSIZE_WIDTH;
if( nFrmOpts & HTML_FRMOPT_S_HEIGHT )
@@ -2277,9 +2277,9 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
{
const SvxLRSpaceItem *pLRItem = 0;
const SvxULSpaceItem *pULItem = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, TRUE ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, sal_True ) )
pLRItem = &aLRItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, TRUE ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, sal_True ) )
pULItem = &aULItem;
if( pLRItem || pULItem )
OutCSS1_SvxULSpace_SvxLRSpace( *this, pULItem, pLRItem );
@@ -2291,7 +2291,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
const SfxPoolItem* pItem;
if( nFrmOpts & HTML_FRMOPT_S_NOBORDER )
OutCSS1_SvxBox( *this, rFrmFmt.GetBox() );
- else if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, TRUE, &pItem ) )
+ else if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, sal_True, &pItem ) )
OutCSS1_SvxBox( *this, *pItem );
}
@@ -2300,7 +2300,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
OutCSS1_FrmFmtBackground( rFrmFmt );
if( pItemSet )
- OutCSS1_SfxItemSet( *pItemSet, FALSE );
+ OutCSS1_SfxItemSet( *pItemSet, sal_False );
if( !bFirstCSS1Property )
Strm() << '\"';
@@ -2314,13 +2314,13 @@ void SwHTMLWriter::OutCSS1_TableFrmFmtOptions( const SwFrmFmt& rFrmFmt )
const SfxPoolItem *pItem;
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ) )
+ if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ) )
OutCSS1_SvxBrush( *this, *pItem, CSS1_BACKGROUND_TABLE, 0 );
if( IsHTMLMode( HTMLMODE_PRINT_EXT ) )
- OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( *this, rItemSet, FALSE );
+ OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( *this, rItemSet, sal_False );
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_LAYOUT_SPLIT, FALSE, &pItem ) )
+ if( SFX_ITEM_SET==rItemSet.GetItemState( RES_LAYOUT_SPLIT, sal_False, &pItem ) )
OutCSS1_SwFmtLayoutSplit( *this, *pItem );
if( !bFirstCSS1Property )
@@ -2335,17 +2335,17 @@ void SwHTMLWriter::OutCSS1_SectionFmtOptions( const SwFrmFmt& rFrmFmt )
const SfxPoolItem *pItem;
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ) )
+ if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ) )
OutCSS1_SvxBrush( *this, *pItem, CSS1_BACKGROUND_SECTION, 0 );
if( !bFirstCSS1Property )
Strm() << '\"';
}
-static BOOL OutCSS1_FrmFmtBrush( SwHTMLWriter& rWrt,
+static sal_Bool OutCSS1_FrmFmtBrush( SwHTMLWriter& rWrt,
const SvxBrushItem& rBrushItem )
{
- BOOL bWritten = FALSE;
+ sal_Bool bWritten = sal_False;
/// OD 02.09.2002 #99657#
/// output brush of frame format, if its background color is not "no fill"/"auto fill"
/// or it has a background graphic.
@@ -2354,7 +2354,7 @@ static BOOL OutCSS1_FrmFmtBrush( SwHTMLWriter& rWrt,
0 != rBrushItem.GetGraphicPos() )
{
OutCSS1_SvxBrush( rWrt, rBrushItem, CSS1_BACKGROUND_FLY, 0 );
- bWritten = TRUE;
+ bWritten = sal_True;
}
return bWritten;
}
@@ -2461,7 +2461,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
const SvxBlinkItem *pBItem )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
- BOOL bNone = FALSE;
+ sal_Bool bNone = sal_False;
const sal_Char *pUStr = 0;
if( pUItem )
@@ -2469,7 +2469,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
switch( pUItem->GetLineStyle() )
{
case UNDERLINE_NONE:
- bNone = TRUE;
+ bNone = sal_True;
break;
case UNDERLINE_DONTKNOW:
break;
@@ -2492,7 +2492,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
switch( pOItem->GetLineStyle() )
{
case UNDERLINE_NONE:
- bNone = TRUE;
+ bNone = sal_True;
break;
case UNDERLINE_DONTKNOW:
break;
@@ -2515,7 +2515,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
switch( pCOItem->GetStrikeout() )
{
case STRIKEOUT_NONE:
- bNone = TRUE;
+ bNone = sal_True;
break;
case STRIKEOUT_DONTKNOW:
break;
@@ -2537,7 +2537,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
{
if( !pBItem->GetValue() )
{
- bNone = TRUE;
+ bNone = sal_True;
}
else if( !rHTMLWrt.IsCSS1Source( CSS1_OUTMODE_PARA ) )
{
@@ -2667,10 +2667,10 @@ static Writer& OutCSS1_SvxFont( Writer& rWrt, const SfxPoolItem& rHt )
String sOut;
// MS IE3b1 hat mit einfachen Haekchen Probleme
- USHORT nMode = rHTMLWrt.nCSS1OutMode & CSS1_OUTMODE_ANY_ON;
+ sal_uInt16 nMode = rHTMLWrt.nCSS1OutMode & CSS1_OUTMODE_ANY_ON;
sal_Unicode cQuote = nMode == CSS1_OUTMODE_RULE_ON ? '\"' : '\'';
SwHTMLWriter::PrepareFontList( ((const SvxFontItem&)rHt), sOut, cQuote,
- TRUE );
+ sal_True );
rHTMLWrt.OutCSS1_Property( sCSS1_P_font_family, sOut );
@@ -2696,11 +2696,11 @@ static Writer& OutCSS1_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt )
if( !rHTMLWrt.IsCSS1Script( nScript ) )
return rWrt;
- UINT32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight();
+ sal_uInt32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight();
if( rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT) )
{
// einen Hint nur dann ausgeben wenn es auch was bringt
- USHORT nSize = rHTMLWrt.GetHTMLFontSize( nHeight );
+ sal_uInt16 nSize = rHTMLWrt.GetHTMLFontSize( nHeight );
if( rHTMLWrt.aFontHeights[nSize-1] == nHeight )
return rWrt;
}
@@ -2759,7 +2759,7 @@ static Writer& OutCSS1_SvxKerning( Writer& rWrt, const SfxPoolItem& rHt )
if( !rHTMLWrt.IsHTMLMode(HTMLMODE_FULL_STYLES) )
return rWrt;
- INT16 nValue = ((const SvxKerningItem&)rHt).GetValue();
+ sal_Int16 nValue = ((const SvxKerningItem&)rHt).GetValue();
if( nValue )
{
ByteString sOut;
@@ -2911,8 +2911,8 @@ static Writer& OutCSS1_SvxLineSpacing( Writer& rWrt, const SfxPoolItem& rHt )
const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)rHt;
- USHORT nHeight = 0;
- USHORT nPrcHeight = 0;
+ sal_uInt16 nHeight = 0;
+ sal_uInt16 nPrcHeight = 0;
SvxLineSpace eLineSpace = rLSItem.GetLineSpaceRule();
switch( rLSItem.GetInterLineSpaceRule() )
{
@@ -3041,7 +3041,7 @@ static void OutCSS1_SwFmtDropAttrs( SwHTMLWriter& rHWrt,
rHWrt.OutCSS1_PropertyAscii( sCSS1_P_font_size, sOut );
// Abstand zum Text = rechter Rand
- USHORT nDistance = rDrop.GetDistance();
+ sal_uInt16 nDistance = rDrop.GetDistance();
if( nDistance > 0 )
rHWrt.OutCSS1_UnitProperty( sCSS1_P_margin_right, nDistance );
@@ -3074,14 +3074,14 @@ static Writer& OutCSS1_SwFmtDrop( Writer& rWrt, const SfxPoolItem& rHt )
}
else
{
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span, sal_False );
}
return rWrt;
}
static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
- USHORT nMode )
+ sal_uInt16 nMode )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -3090,7 +3090,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
if( nMode & CSS1_FRMSIZE_WIDTH )
{
- BYTE nPrcWidth = rFSItem.GetWidthPercent();
+ sal_uInt8 nPrcWidth = rFSItem.GetWidthPercent();
if( nPrcWidth )
{
(sOut = ByteString::CreateFromInt32( nPrcWidth) ) += '%';
@@ -3099,7 +3099,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
else if( nMode & CSS1_FRMSIZE_PIXEL )
{
rHTMLWrt.OutCSS1_PixelProperty( sCSS1_P_width,
- rFSItem.GetSize().Width(), FALSE );
+ rFSItem.GetSize().Width(), sal_False );
}
else
{
@@ -3110,7 +3110,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
if( nMode & CSS1_FRMSIZE_ANYHEIGHT )
{
- BOOL bOutHeight = FALSE;
+ sal_Bool bOutHeight = sal_False;
switch( rFSItem.GetHeightSizeType() )
{
case ATT_FIX_SIZE:
@@ -3129,7 +3129,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
if( bOutHeight )
{
- BYTE nPrcHeight = rFSItem.GetHeightPercent();
+ sal_uInt8 nPrcHeight = rFSItem.GetHeightPercent();
if( nPrcHeight )
{
(sOut = ByteString::CreateFromInt32( nPrcHeight ) ) += '%';
@@ -3139,7 +3139,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
{
rHTMLWrt.OutCSS1_PixelProperty( sCSS1_P_height,
rFSItem.GetSize().Width(),
- TRUE );
+ sal_True );
}
else
{
@@ -3239,7 +3239,7 @@ static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
const SfxItemSet& rItemSet,
- BOOL bDeep )
+ sal_Bool bDeep )
{
const SvxULSpaceItem *pULSpace = 0;
const SvxLRSpaceItem *pLRSpace = 0;
@@ -3325,7 +3325,7 @@ static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt,
static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt,
const SfxItemSet& rItemSet,
- BOOL bDeep )
+ sal_Bool bDeep )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
const SfxPoolItem *pItem;
@@ -3361,7 +3361,7 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt )
static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
- USHORT nMode, const String *pGrfName )
+ sal_uInt16 nMode, const String *pGrfName )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -3388,15 +3388,15 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
}
// Erstmal die Farbe holen
- BOOL bColor = FALSE;
+ sal_Bool bColor = sal_False;
/// OD 02.09.2002 #99657#
- /// set <bTransparent> to TRUE, if color is "no fill"/"auto fill"
- BOOL bTransparent = (rColor.GetColor() == COL_TRANSPARENT);
+ /// set <bTransparent> to sal_True, if color is "no fill"/"auto fill"
+ sal_Bool bTransparent = (rColor.GetColor() == COL_TRANSPARENT);
Color aColor;
if( !bTransparent )
{
aColor = rColor;
- bColor = TRUE;
+ bColor = sal_True;
}
// und jetzt eine Grafik
@@ -3412,7 +3412,7 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
const String* pTempFileName = rHTMLWrt.GetOrigFileName();
if( pTempFileName )
sGrfNm = *pTempFileName;
- USHORT nErr = XOutBitmap::WriteGraphic( *pGrf, sGrfNm,
+ sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, sGrfNm,
String::CreateFromAscii("JPG"),
XOUTBMP_USE_NATIVE_IF_POSSIBLE );
if( !nErr ) // fehlerhaft, da ist nichts auszugeben
@@ -3570,13 +3570,13 @@ static void OutCSS1_SvxBorderLine( SwHTMLWriter& rHTMLWrt,
return;
}
- BOOL bDouble = FALSE;
- INT32 nWidth = pLine->GetOutWidth();
+ sal_Bool bDouble = sal_False;
+ sal_Int32 nWidth = pLine->GetOutWidth();
if( pLine->GetInWidth() )
{
nWidth += pLine->GetDistance();
nWidth += pLine->GetInWidth();
- bDouble = TRUE;
+ bDouble = sal_True;
}
ByteString sOut;
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 6b7c99fa42f1..c057db76e72c 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -142,7 +142,7 @@ HTMLOutEvent __FAR_DATA aAnchorEventTable[] =
static Writer& OutHTML_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt );
-static Writer& OutHTML_HoriSpacer( Writer& rWrt, INT16 nSize )
+static Writer& OutHTML_HoriSpacer( Writer& rWrt, sal_Int16 nSize )
{
ASSERT( nSize>0, "horizontaler SPACER mit negativem Wert?" )
if( nSize <= 0 )
@@ -150,7 +150,7 @@ static Writer& OutHTML_HoriSpacer( Writer& rWrt, INT16 nSize )
if( Application::GetDefaultDevice() )
{
- nSize = (INT16)Application::GetDefaultDevice()
+ nSize = (sal_Int16)Application::GetDefaultDevice()
->LogicToPixel( Size(nSize,0), MapMode(MAP_TWIP) ).Width();
}
@@ -165,7 +165,7 @@ static Writer& OutHTML_HoriSpacer( Writer& rWrt, INT16 nSize )
return rWrt;
}
-USHORT SwHTMLWriter::GetDefListLvl( const String& rNm, USHORT nPoolId )
+sal_uInt16 SwHTMLWriter::GetDefListLvl( const String& rNm, sal_uInt16 nPoolId )
{
if( nPoolId == RES_POOLCOLL_HTML_DD )
{
@@ -180,18 +180,18 @@ USHORT SwHTMLWriter::GetDefListLvl( const String& rNm, USHORT nPoolId )
sDTDD += ' ';
if( COMPARE_EQUAL == sDTDD.CompareTo( rNm, sDTDD.Len() ) )
// DefinitionList - term
- return (USHORT)rNm.Copy( sDTDD.Len() ).ToInt32() | HTML_DLCOLL_DT;
+ return (sal_uInt16)rNm.Copy( sDTDD.Len() ).ToInt32() | HTML_DLCOLL_DT;
sDTDD.AssignAscii( OOO_STRING_SVTOOLS_HTML_dd );
sDTDD += ' ';
if( COMPARE_EQUAL == sDTDD.CompareTo( rNm, sDTDD.Len() ) )
// DefinitionList - definition
- return (USHORT)rNm.Copy( sDTDD.Len() ).ToInt32() | HTML_DLCOLL_DD;
+ return (sal_uInt16)rNm.Copy( sDTDD.Len() ).ToInt32() | HTML_DLCOLL_DD;
return 0;
}
-void SwHTMLWriter::OutAndSetDefList( USHORT nNewLvl )
+void SwHTMLWriter::OutAndSetDefList( sal_uInt16 nNewLvl )
{
// eventuell muss erst mal eine Liste aufgemacht werden
if( nDefListLvl < nNewLvl )
@@ -205,24 +205,24 @@ void SwHTMLWriter::OutAndSetDefList( USHORT nNewLvl )
ChangeParaToken( 0 );
// entsprechend dem Level-Unterschied schreiben!
- for( USHORT i=nDefListLvl; i<nNewLvl; i++ )
+ for( sal_uInt16 i=nDefListLvl; i<nNewLvl; i++ )
{
if( bLFPossible )
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_deflist, TRUE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_deflist, sal_True );
IncIndentLevel();
- bLFPossible = TRUE;
+ bLFPossible = sal_True;
}
}
else if( nDefListLvl > nNewLvl )
{
- for( USHORT i=nNewLvl ; i < nDefListLvl; i++ )
+ for( sal_uInt16 i=nNewLvl ; i < nDefListLvl; i++ )
{
DecIndentLevel();
if( bLFPossible )
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_deflist, FALSE );
- bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_deflist, sal_False );
+ bLFPossible = sal_True;
}
}
@@ -230,12 +230,12 @@ void SwHTMLWriter::OutAndSetDefList( USHORT nNewLvl )
}
-void SwHTMLWriter::ChangeParaToken( USHORT nNew )
+void SwHTMLWriter::ChangeParaToken( sal_uInt16 nNew )
{
if( nNew != nLastParaToken && HTML_PREFORMTXT_ON == nLastParaToken )
{
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_preformtxt, FALSE );
- bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_preformtxt, sal_False );
+ bLFPossible = sal_True;
}
nLastParaToken = nNew;
}
@@ -280,23 +280,23 @@ struct SwHTMLTxtCollOutputInfo
ByteString aToken; // auszugendens End-Token
SfxItemSet *pItemSet; // harte Attributierung
- BOOL bInNumBulList; // in einer Aufzaehlungs-Liste;
- BOOL bParaPossible; // ein </P> darf zusaetzlich ausgegeben werden
- BOOL bOutPara; // ein </P> soll ausgegeben werden
- BOOL bOutDiv; // write a </DIV>
+ sal_Bool bInNumBulList; // in einer Aufzaehlungs-Liste;
+ sal_Bool bParaPossible; // ein </P> darf zusaetzlich ausgegeben werden
+ sal_Bool bOutPara; // ein </P> soll ausgegeben werden
+ sal_Bool bOutDiv; // write a </DIV>
SwHTMLTxtCollOutputInfo() :
pItemSet( 0 ),
- bInNumBulList( FALSE ),
- bParaPossible( FALSE ),
- bOutPara( FALSE ),
- bOutDiv( FALSE )
+ bInNumBulList( sal_False ),
+ bParaPossible( sal_False ),
+ bOutPara( sal_False ),
+ bOutDiv( sal_False )
{}
~SwHTMLTxtCollOutputInfo();
- BOOL HasParaToken() const { return aToken.Len()==1 && aToken.GetChar(0)=='P'; }
- BOOL ShouldOutputToken() const { return bOutPara || !HasParaToken(); }
+ sal_Bool HasParaToken() const { return aToken.Len()==1 && aToken.GetChar(0)=='P'; }
+ sal_Bool ShouldOutputToken() const { return bOutPara || !HasParaToken(); }
};
SwHTMLTxtCollOutputInfo::~SwHTMLTxtCollOutputInfo()
@@ -318,8 +318,8 @@ struct SwHTMLFmtInfo
sal_Int32 nRightMargin; // Absatz-Vorlagen
short nFirstLineIndent;
- USHORT nTopMargin;
- USHORT nBottomMargin;
+ sal_uInt16 nTopMargin;
+ sal_uInt16 nBottomMargin;
sal_Bool bScriptDependent;
@@ -331,18 +331,18 @@ struct SwHTMLFmtInfo
// Konstruktor zum Erstellen der Format-Info
SwHTMLFmtInfo( const SwFmt *pFmt, SwDoc *pDoc, SwDoc *pTemlate,
- BOOL bOutStyles, LanguageType eDfltLang=LANGUAGE_DONTKNOW,
+ sal_Bool bOutStyles, LanguageType eDfltLang=LANGUAGE_DONTKNOW,
sal_uInt16 nScript=CSS1_OUTMODE_ANY_SCRIPT,
- BOOL bHardDrop=FALSE );
+ sal_Bool bHardDrop=sal_False );
~SwHTMLFmtInfo();
- friend BOOL operator==( const SwHTMLFmtInfo& rInfo1,
+ friend sal_Bool operator==( const SwHTMLFmtInfo& rInfo1,
const SwHTMLFmtInfo& rInfo2 )
{
return (long)rInfo1.pFmt == (long)rInfo2.pFmt;
}
- friend BOOL operator<( const SwHTMLFmtInfo& rInfo1,
+ friend sal_Bool operator<( const SwHTMLFmtInfo& rInfo1,
const SwHTMLFmtInfo& rInfo2 )
{
return (long)rInfo1.pFmt < (long)rInfo2.pFmt;
@@ -353,21 +353,21 @@ struct SwHTMLFmtInfo
SV_IMPL_OP_PTRARR_SORT( SwHTMLFmtInfos, SwHTMLFmtInfo* )
SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
- BOOL bOutStyles,
+ sal_Bool bOutStyles,
LanguageType eDfltLang,
- sal_uInt16 nCSS1Script, BOOL bHardDrop ) :
+ sal_uInt16 nCSS1Script, sal_Bool bHardDrop ) :
pFmt( pF ), pItemSet( 0 ), bScriptDependent( sal_False )
{
- USHORT nRefPoolId = 0;
+ sal_uInt16 nRefPoolId = 0;
// Den Selektor des Formats holen
- USHORT nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass,
+ sal_uInt16 nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass,
nRefPoolId );
ASSERT( nDeep ? aToken.Len()>0 : aToken.Len()==0,
"Hier stimmt doch was mit dem Token nicht!" );
ASSERT( nDeep ? nRefPoolId : !nRefPoolId,
"Hier stimmt doch was mit der Vergleichs-Vorlage nicht!" );
- BOOL bTxtColl = pFmt->Which() == RES_TXTFMTCOLL ||
+ sal_Bool bTxtColl = pFmt->Which() == RES_TXTFMTCOLL ||
pFmt->Which() == RES_CONDTXTFMTCOLL;
const SwFmt *pReferenceFmt = 0; // Vergleichs-Format
@@ -422,7 +422,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
// sollen ist harte Attributierung noetig. Fuer Vorlagen, die
// nicht von HTML-Tag-Vorlagen abgeleitet sind, gilt das immer
- pItemSet->Set( pFmt->GetAttrSet(), TRUE );
+ pItemSet->Set( pFmt->GetAttrSet(), sal_True );
if( pReferenceFmt )
SwHTMLWriter::SubtractItemSet( *pItemSet, pReferenceFmt->GetAttrSet(),
@@ -495,16 +495,16 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
{
const SfxPoolItem *pItem;
if( SFX_ITEM_SET==pFmt->GetAttrSet().GetItemState(
- RES_PARATR_DROP, TRUE, &pItem ) )
+ RES_PARATR_DROP, sal_True, &pItem ) )
{
- BOOL bPut = TRUE;
+ sal_Bool bPut = sal_True;
if( pTemplate )
{
pReferenceFmt = SwHTMLWriter::GetTemplateFmt( nRefPoolId, pTemplate );
const SfxPoolItem *pRefItem;
- BOOL bRefItemSet =
+ sal_Bool bRefItemSet =
SFX_ITEM_SET==pReferenceFmt->GetAttrSet().GetItemState(
- RES_PARATR_DROP, TRUE, &pRefItem );
+ RES_PARATR_DROP, sal_True, &pRefItem );
bPut = !bRefItemSet || *pItem!=*pRefItem;
}
if( bPut )
@@ -581,19 +581,19 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
SwHTMLWriter & rHWrt = (SwHTMLWriter&)rWrt;
// Erstmal ein par Flags ...
- USHORT nNewDefListLvl = 0;
- USHORT nNumStart = USHRT_MAX;
- BOOL bForceDL = FALSE;
- BOOL bDT = FALSE;
- rInfo.bInNumBulList = FALSE; // Wir sind in einer Liste?
- BOOL bNumbered = FALSE; // Der aktuelle Absatz ist numeriert
- BOOL bPara = FALSE; // das aktuelle Token ist <P>
- rInfo.bParaPossible = FALSE; // ein <P> darf zusaetzlich ausgegeben werden
- BOOL bNoEndTag = FALSE; // kein End-Tag ausgeben
-
- rHWrt.bNoAlign = FALSE; // kein ALIGN=... moeglich
- BOOL bNoStyle = FALSE; // kein STYLE=... moeglich
- BYTE nBulletGrfLvl = 255; // Die auszugebende Bullet-Grafik
+ sal_uInt16 nNewDefListLvl = 0;
+ sal_uInt16 nNumStart = USHRT_MAX;
+ sal_Bool bForceDL = sal_False;
+ sal_Bool bDT = sal_False;
+ rInfo.bInNumBulList = sal_False; // Wir sind in einer Liste?
+ sal_Bool bNumbered = sal_False; // Der aktuelle Absatz ist numeriert
+ sal_Bool bPara = sal_False; // das aktuelle Token ist <P>
+ rInfo.bParaPossible = sal_False; // ein <P> darf zusaetzlich ausgegeben werden
+ sal_Bool bNoEndTag = sal_False; // kein End-Tag ausgeben
+
+ rHWrt.bNoAlign = sal_False; // kein ALIGN=... moeglich
+ sal_Bool bNoStyle = sal_False; // kein STYLE=... moeglich
+ sal_uInt8 nBulletGrfLvl = 255; // Die auszugebende Bullet-Grafik
// Sind wir in einer Aufzaehlungs- oder Numerierungliste?
const SwTxtNode* pTxtNd = rWrt.pCurPam->GetNode()->GetTxtNode();
@@ -611,16 +611,16 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( aNumInfo.GetNumRule() )
{
- rInfo.bInNumBulList = TRUE;
+ rInfo.bInNumBulList = sal_True;
nNewDefListLvl = 0;
// ist der aktuelle Absatz numeriert?
bNumbered = aNumInfo.IsNumbered();
- BYTE nLvl = aNumInfo.GetLevel();
+ sal_uInt8 nLvl = aNumInfo.GetLevel();
ASSERT( pTxtNd->GetActualListLevel() == nLvl,
"Gemerkter Num-Level ist falsch" );
- ASSERT( bNumbered == static_cast< BOOL >(pTxtNd->IsCountedInList()),
+ ASSERT( bNumbered == static_cast< sal_Bool >(pTxtNd->IsCountedInList()),
"Gemerkter Numerierungs-Zustand ist falsch" );
if( bNumbered )
@@ -633,7 +633,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// indicates, that no additional restart value has to be written.
if ( pTxtNd->IsListRestart() )
{
- nNumStart = static_cast< USHORT >(pTxtNd->GetActualListStartValue());
+ nNumStart = static_cast< sal_uInt16 >(pTxtNd->GetActualListStartValue());
}
// <--
DBG_ASSERT( rHWrt.nLastParaToken == 0,
@@ -643,7 +643,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// Jetzt holen wir das Token und ggf. die Klasse
SwHTMLFmtInfo aFmtInfo( &rFmt );
- USHORT nArrayPos;
+ sal_uInt16 nArrayPos;
const SwHTMLFmtInfo *pFmtInfo;
if( rHWrt.aTxtCollInfos.Seek_Entry( &aFmtInfo, &nArrayPos ) )
{
@@ -662,8 +662,8 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
}
// Jetzt wird festgelegt, was aufgrund des Tokens so moeglich ist
- USHORT nToken = 0; // Token fuer Tag-Wechsel
- BOOL bOutNewLine = FALSE; // nur ein LF ausgeben?
+ sal_uInt16 nToken = 0; // Token fuer Tag-Wechsel
+ sal_Bool bOutNewLine = sal_False; // nur ein LF ausgeben?
if( pFmtInfo->aToken.Len() )
{
// Es ist eine HTML-Tag-Vorlage oder die Vorlage ist von einer
@@ -675,19 +675,19 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
{
case 'A': ASSERT( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_address),
"Doch kein ADDRESS?" );
- rInfo.bParaPossible = TRUE;
- rHWrt.bNoAlign = TRUE;
+ rInfo.bParaPossible = sal_True;
+ rHWrt.bNoAlign = sal_True;
break;
case 'B': ASSERT( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_blockquote),
"Doch kein BLOCKQUOTE?" );
- rInfo.bParaPossible = TRUE;
- rHWrt.bNoAlign = TRUE;
+ rInfo.bParaPossible = sal_True;
+ rHWrt.bNoAlign = sal_True;
break;
case 'P': if( rInfo.aToken.Len() == 1 )
{
- bPara = TRUE;
+ bPara = sal_True;
}
else
{
@@ -695,13 +695,13 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
"Doch kein PRE?" );
if( HTML_PREFORMTXT_ON == rHWrt.nLastParaToken )
{
- bOutNewLine = TRUE;
+ bOutNewLine = sal_True;
}
else
{
nToken = HTML_PREFORMTXT_ON;
- rHWrt.bNoAlign = TRUE;
- bNoEndTag = TRUE;
+ rHWrt.bNoAlign = sal_True;
+ bNoEndTag = sal_True;
}
}
break;
@@ -711,8 +711,8 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
"Doch kein DD/DT?" );
bDT = rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_dt);
rInfo.bParaPossible = !bDT;
- rHWrt.bNoAlign = TRUE;
- bForceDL = TRUE;
+ rHWrt.bNoAlign = sal_True;
+ bForceDL = sal_True;
break;
}
}
@@ -722,7 +722,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// diesem abgeleitet sind, werden als <P> exportiert
rInfo.aToken = OOO_STRING_SVTOOLS_HTML_parabreak;
- bPara = TRUE;
+ bPara = sal_True;
}
// Falls noetig, die harte Attributierung der Vorlage uebernehmen
@@ -766,8 +766,8 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
RES_UL_SPACE, RES_UL_SPACE );
rInfo.pItemSet->Put( aULSpaceItem );
}
- rHWrt.bOutHeader = FALSE;
- rHWrt.bOutFooter = FALSE;
+ rHWrt.bOutHeader = sal_False;
+ rHWrt.bOutFooter = sal_False;
}
if( bOutNewLine )
@@ -787,14 +787,14 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( rInfo.pItemSet &&
SFX_ITEM_SET == rInfo.pItemSet->GetItemState( RES_PARATR_ADJUST,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
pAdjItem = pItem;
}
// Unteren Absatz-Abstand beachten ? (nie im letzen Absatz von
// Tabellen)
- BOOL bUseParSpace = !rHWrt.bOutTable ||
+ sal_Bool bUseParSpace = !rHWrt.bOutTable ||
(rWrt.pCurPam->GetPoint()->nNode.GetIndex() !=
rWrt.pCurPam->GetMark()->nNode.GetIndex());
// Wenn Styles exportiert werden, wird aus eingerueckten Absaetzen
@@ -814,7 +814,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( nLeftMargin > 0 && rHWrt.nDefListMargin > 0 )
{
- nNewDefListLvl = static_cast< USHORT >((nLeftMargin + (rHWrt.nDefListMargin/2)) /
+ nNewDefListLvl = static_cast< sal_uInt16 >((nLeftMargin + (rHWrt.nDefListMargin/2)) /
rHWrt.nDefListMargin);
if( nNewDefListLvl == 0 && bForceDL && !bDT )
nNewDefListLvl = 1;
@@ -827,7 +827,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
nNewDefListLvl = (bForceDL&& !bDT) ? 1 : 0;
}
- BOOL bIsNextTxtNode =
+ sal_Bool bIsNextTxtNode =
rWrt.pDoc->GetNodes()[rWrt.pCurPam->GetPoint()->nNode.GetIndex()+1]
->IsTxtNode();
@@ -845,9 +845,9 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
{
// Absaetze ohne unteren Abstand als DT exportieren
nNewDefListLvl = 1;
- bDT = TRUE;
- rInfo.bParaPossible = FALSE;
- rHWrt.bNoAlign = TRUE;
+ bDT = sal_True;
+ rInfo.bParaPossible = sal_False;
+ rHWrt.bNoAlign = sal_True;
}
}
@@ -863,7 +863,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( bNumbered )
{
if( rHWrt.aBulletGrfs[nBulletGrfLvl].Len() )
- bNumbered = FALSE;
+ bNumbered = sal_False;
else
nBulletGrfLvl = 255;
}
@@ -918,12 +918,12 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( rHWrt.bLFPossible )
rHWrt.OutNewLine(); // Absatz-Tag in neue Zeile
- rInfo.bOutPara = FALSE;
+ rInfo.bOutPara = sal_False;
// das ist jetzt unser neues Token
rHWrt.ChangeParaToken( nToken );
- BOOL bHasParSpace = bUseParSpace && rULSpace.GetLower() > 0;
+ sal_Bool bHasParSpace = bUseParSpace && rULSpace.GetLower() > 0;
// ggf ein List-Item aufmachen
if( rInfo.bInNumBulList && bNumbered )
@@ -953,15 +953,15 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
sOut += OOO_STRING_SVTOOLS_HTML_division;
rWrt.Strm() << sOut.GetBuffer();
- rHWrt.bTxtAttr = FALSE;
- rHWrt.bOutOpts = TRUE;
+ rHWrt.bTxtAttr = sal_False;
+ rHWrt.bOutOpts = sal_True;
OutHTML_SvxAdjust( rWrt, *pAdjItem );
rWrt.Strm() << '>';
pAdjItem = 0;
- rHWrt.bNoAlign = FALSE;
- rInfo.bOutDiv = TRUE;
+ rHWrt.bNoAlign = sal_False;
+ rInfo.bOutDiv = sal_True;
rHWrt.IncIndentLevel();
- rHWrt.bLFPossible = TRUE;
+ rHWrt.bLFPossible = sal_True;
rHWrt.OutNewLine();
}
@@ -975,9 +975,9 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
{
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rInfo.aToken.GetBuffer() );
aToken = OOO_STRING_SVTOOLS_HTML_parabreak;
- bPara = TRUE;
- rHWrt.bNoAlign = FALSE;
- bNoStyle = FALSE;
+ bPara = sal_True;
+ rHWrt.bNoAlign = sal_False;
+ bNoStyle = sal_False;
}
LanguageType eLang = rInfo.pItemSet
@@ -1025,8 +1025,8 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
rHWrt.bCfgOutStyles )
{
// jetzt werden Optionen ausgegeben
- rHWrt.bTxtAttr = FALSE;
- rHWrt.bOutOpts = TRUE;
+ rHWrt.bTxtAttr = sal_False;
+ rHWrt.bOutOpts = sal_True;
ByteString sOut( '<' );
sOut += aToken;
@@ -1164,17 +1164,17 @@ void OutHTML_SwFmtOff( Writer& rWrt, const SwHTMLTxtCollOutputInfo& rInfo )
if( rInfo.ShouldOutputToken() )
{
if( rHWrt.bLFPossible )
- rHWrt.OutNewLine( TRUE );
+ rHWrt.OutNewLine( sal_True );
// fuer BLOCKQUOTE, ADDRESS und DD wird ggf noch ein
// Absatz-Token ausgegeben, wenn
// - keine Styles geschrieben werden, und
// - ein untere Abstand existiert
if( rInfo.bParaPossible && rInfo.bOutPara )
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_parabreak, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_parabreak, sal_False );
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rInfo.aToken.GetBuffer(),
- FALSE );
+ sal_False );
rHWrt.bLFPossible = !rInfo.aToken.Equals( OOO_STRING_SVTOOLS_HTML_dt ) &&
!rInfo.aToken.Equals( OOO_STRING_SVTOOLS_HTML_dd ) &&
!rInfo.aToken.Equals( OOO_STRING_SVTOOLS_HTML_li );
@@ -1184,8 +1184,8 @@ void OutHTML_SwFmtOff( Writer& rWrt, const SwHTMLTxtCollOutputInfo& rInfo )
rHWrt.DecIndentLevel();
if( rHWrt.bLFPossible )
rHWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_division, FALSE );
- rHWrt.bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_division, sal_False );
+ rHWrt.bLFPossible = sal_True;
}
// ggf. eine Aufzaehlung- oder Numerierungsliste beenden
@@ -1252,40 +1252,40 @@ class HTMLEndPosLst
// but the text length
// the script that is valif up to the position
// contained in aScriptChgList at the same index
- ::std::vector<USHORT> aScriptLst;
+ ::std::vector<sal_uInt16> aScriptLst;
SwDoc *pDoc; // das aktuelle Dokument
SwDoc* pTemplate; // die HTML-Vorlage (oder 0)
const Color* pDfltColor;// die Default-Vordergrund-Farbe
SvStringsSortDtor& rScriptTxtStyles; //
- ULONG nHTMLMode;
- BOOL bOutStyles : 1; // werden Styles exportiert
+ sal_uLong nHTMLMode;
+ sal_Bool bOutStyles : 1; // werden Styles exportiert
// die Position eines Items in der Start-/Ende-Liste suchen
- USHORT _FindStartPos( const HTMLSttEndPos *pPos ) const;
- USHORT _FindEndPos( const HTMLSttEndPos *pPos ) const;
+ sal_uInt16 _FindStartPos( const HTMLSttEndPos *pPos ) const;
+ sal_uInt16 _FindEndPos( const HTMLSttEndPos *pPos ) const;
// Eine SttEndPos in die Start- und Ende-Listen eintragen bzw. aus
// ihnen loeschen, wobei die Ende-Position bekannt ist
- void _InsertItem( HTMLSttEndPos *pPos, USHORT nEndPos );
- void _RemoveItem( USHORT nEndPos );
+ void _InsertItem( HTMLSttEndPos *pPos, sal_uInt16 nEndPos );
+ void _RemoveItem( sal_uInt16 nEndPos );
// die "Art" es Attributs ermitteln
HTMLOnOffState GetHTMLItemState( const SfxPoolItem& rItem );
// Existiert ein bestimmtes On-Tag-Item
- BOOL ExistsOnTagItem( USHORT nWhich, xub_StrLen nPos );
+ sal_Bool ExistsOnTagItem( sal_uInt16 nWhich, xub_StrLen nPos );
// Existiert ein Item zum ausschalten eines Attributs, das genauso
// exportiert wird wie das uebergebene Item im gleichen Bereich?
- BOOL ExistsOffTagItem( USHORT nWhich, xub_StrLen nStartPos,
+ sal_Bool ExistsOffTagItem( sal_uInt16 nWhich, xub_StrLen nStartPos,
xub_StrLen nEndPos );
// das Ende eines gesplitteten Items anpassen
- void FixSplittedItem( HTMLSttEndPos *pPos, USHORT nStartPos,
+ void FixSplittedItem( HTMLSttEndPos *pPos, sal_uInt16 nStartPos,
xub_StrLen nNewEnd );
// Ein Attribut in die Listen eintragen und ggf. aufteilen
@@ -1299,7 +1299,7 @@ class HTMLEndPosLst
// Insert without taking care of script
void InsertNoScript( const SfxPoolItem& rItem, xub_StrLen nStart,
xub_StrLen nEnd, SwHTMLFmtInfos& rFmtInfos,
- BOOL bParaAttrs=FALSE );
+ sal_Bool bParaAttrs=sal_False );
const SwHTMLFmtInfo *GetFmtInfo( const SwFmt& rFmt,
SwHTMLFmtInfos& rFmtInfos );
@@ -1307,16 +1307,16 @@ class HTMLEndPosLst
public:
HTMLEndPosLst( SwDoc *pDoc, SwDoc* pTemplate, const Color* pDfltColor,
- BOOL bOutStyles, ULONG nHTMLMode,
+ sal_Bool bOutStyles, sal_uLong nHTMLMode,
const String& rText, SvStringsSortDtor& rStyles );
~HTMLEndPosLst();
// Ein Attribut einfuegen
void Insert( const SfxPoolItem& rItem, xub_StrLen nStart, xub_StrLen nEnd,
- SwHTMLFmtInfos& rFmtInfos, BOOL bParaAttrs=FALSE );
+ SwHTMLFmtInfos& rFmtInfos, sal_Bool bParaAttrs=sal_False );
void Insert( const SfxItemSet& rItemSet, xub_StrLen nStart, xub_StrLen nEnd,
- SwHTMLFmtInfos& rFmtInfos, BOOL bDeep,
- BOOL bParaAttrs=FALSE );
+ SwHTMLFmtInfos& rFmtInfos, sal_Bool bDeep,
+ sal_Bool bParaAttrs=sal_False );
void Insert( const SwDrawFrmFmt& rFmt, xub_StrLen nPos,
SwHTMLFmtInfos& rFmtInfos );
@@ -1328,15 +1328,15 @@ public:
void OutEndAttrs( SwHTMLWriter& rHWrt, xub_StrLen nPos,
HTMLOutContext *pContext = 0 );
- USHORT Count() const { return aEndLst.Count(); }
+ sal_uInt16 Count() const { return aEndLst.Count(); }
- BOOL IsHTMLMode( ULONG nMode ) const { return (nHTMLMode & nMode) != 0; }
+ sal_Bool IsHTMLMode( sal_uLong nMode ) const { return (nHTMLMode & nMode) != 0; }
};
-USHORT HTMLEndPosLst::_FindStartPos( const HTMLSttEndPos *pPos ) const
+sal_uInt16 HTMLEndPosLst::_FindStartPos( const HTMLSttEndPos *pPos ) const
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aStartLst.Count() && aStartLst[i] != pPos; i++ )
;
@@ -1345,9 +1345,9 @@ USHORT HTMLEndPosLst::_FindStartPos( const HTMLSttEndPos *pPos ) const
return i==aStartLst.Count() ? USHRT_MAX : i;
}
-USHORT HTMLEndPosLst::_FindEndPos( const HTMLSttEndPos *pPos ) const
+sal_uInt16 HTMLEndPosLst::_FindEndPos( const HTMLSttEndPos *pPos ) const
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aEndLst.Count() && aEndLst[i] != pPos; i++ )
;
@@ -1358,12 +1358,12 @@ USHORT HTMLEndPosLst::_FindEndPos( const HTMLSttEndPos *pPos ) const
}
-void HTMLEndPosLst::_InsertItem( HTMLSttEndPos *pPos, USHORT nEndPos )
+void HTMLEndPosLst::_InsertItem( HTMLSttEndPos *pPos, sal_uInt16 nEndPos )
{
// In der Start-Liste das Attribut hinter allen vorher und an
// der gleichen Position gestarteten Attributen einfuegen
xub_StrLen nStart = pPos->GetStart();
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aStartLst.Count() &&
aStartLst[i]->GetStart() <= nStart; i++ )
@@ -1374,12 +1374,12 @@ void HTMLEndPosLst::_InsertItem( HTMLSttEndPos *pPos, USHORT nEndPos )
aEndLst.Insert( pPos, nEndPos );
}
-void HTMLEndPosLst::_RemoveItem( USHORT nEndPos )
+void HTMLEndPosLst::_RemoveItem( sal_uInt16 nEndPos )
{
HTMLSttEndPos *pPos = aEndLst[nEndPos];
// jetzt Suchen wir es in der Start-Liste
- USHORT nStartPos = _FindStartPos( pPos );
+ sal_uInt16 nStartPos = _FindStartPos( pPos );
if( nStartPos != USHRT_MAX )
aStartLst.Remove( nStartPos, 1 );
@@ -1538,9 +1538,9 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem )
return eState;
}
-BOOL HTMLEndPosLst::ExistsOnTagItem( USHORT nWhich, xub_StrLen nPos )
+sal_Bool HTMLEndPosLst::ExistsOnTagItem( sal_uInt16 nWhich, xub_StrLen nPos )
{
- for( USHORT i=0; i<aStartLst.Count(); i++ )
+ for( sal_uInt16 i=0; i<aStartLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aStartLst[i];
@@ -1558,25 +1558,25 @@ BOOL HTMLEndPosLst::ExistsOnTagItem( USHORT nWhich, xub_StrLen nPos )
HTML_ON_VALUE == GetHTMLItemState(*pItem) )
{
// ein On-Tag-Attibut wurde gefunden
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
-BOOL HTMLEndPosLst::ExistsOffTagItem( USHORT nWhich, xub_StrLen nStartPos,
+sal_Bool HTMLEndPosLst::ExistsOffTagItem( sal_uInt16 nWhich, xub_StrLen nStartPos,
xub_StrLen nEndPos )
{
if( nWhich != RES_CHRATR_CROSSEDOUT &&
nWhich != RES_CHRATR_UNDERLINE &&
nWhich != RES_CHRATR_BLINK )
{
- return FALSE;
+ return sal_False;
}
- for( USHORT i=0; i<aStartLst.Count(); i++ )
+ for( sal_uInt16 i=0; i<aStartLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aStartLst[i];
@@ -1591,7 +1591,7 @@ BOOL HTMLEndPosLst::ExistsOffTagItem( USHORT nWhich, xub_StrLen nStartPos,
// das Attribut beginnt vor oder an der aktuellen Position
// und endet hinter ihr
const SfxPoolItem *pItem = pTest->GetItem();
- USHORT nTstWhich = pItem->Which() ;
+ sal_uInt16 nTstWhich = pItem->Which() ;
if( (nTstWhich == RES_CHRATR_CROSSEDOUT ||
nTstWhich == RES_CHRATR_UNDERLINE ||
nTstWhich == RES_CHRATR_BLINK) &&
@@ -1599,22 +1599,22 @@ BOOL HTMLEndPosLst::ExistsOffTagItem( USHORT nWhich, xub_StrLen nStartPos,
{
// Ein Off-Tag-Attibut wurde gefunden, das genauso
// exportiert wird, wie das aktuelle Item
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
void HTMLEndPosLst::FixSplittedItem( HTMLSttEndPos *pPos, xub_StrLen nNewEnd,
- USHORT nStartPos )
+ sal_uInt16 nStartPos )
{
// die End-Position entsprechend fixen
pPos->SetEnd( nNewEnd );
// das Item aus der End-Liste entfernen
- USHORT nEndPos = _FindEndPos( pPos );
+ sal_uInt16 nEndPos = _FindEndPos( pPos );
if( nEndPos != USHRT_MAX )
aEndLst.Remove( nEndPos, 1 );
@@ -1626,7 +1626,7 @@ void HTMLEndPosLst::FixSplittedItem( HTMLSttEndPos *pPos, xub_StrLen nNewEnd,
aEndLst.Insert( pPos, nEndPos );
// jetzt noch die spaeter gestarteten Attribute anpassen
- for( USHORT i=nStartPos+1; i<aStartLst.Count(); i++ )
+ for( sal_uInt16 i=nStartPos+1; i<aStartLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aStartLst[i];
xub_StrLen nTestEnd = pTest->GetEnd();
@@ -1645,7 +1645,7 @@ void HTMLEndPosLst::FixSplittedItem( HTMLSttEndPos *pPos, xub_StrLen nNewEnd,
pTest->SetEnd( nNewEnd );
// das Attribut aus der End-Liste entfernen
- USHORT nEPos = _FindEndPos( pTest );
+ sal_uInt16 nEPos = _FindEndPos( pTest );
if( nEPos != USHRT_MAX )
aEndLst.Remove( nEPos, 1 );
@@ -1663,7 +1663,7 @@ void HTMLEndPosLst::FixSplittedItem( HTMLSttEndPos *pPos, xub_StrLen nNewEnd,
void HTMLEndPosLst::InsertItem( const SfxPoolItem& rItem, xub_StrLen nStart,
xub_StrLen nEnd )
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aEndLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aEndLst[i];
@@ -1697,12 +1697,12 @@ void HTMLEndPosLst::InsertItem( const SfxPoolItem& rItem, xub_StrLen nStart,
void HTMLEndPosLst::SplitItem( const SfxPoolItem& rItem, xub_StrLen nStart,
xub_StrLen nEnd )
{
- USHORT nWhich = rItem.Which();
+ sal_uInt16 nWhich = rItem.Which();
// erstmal muessen wir die alten Items anhand der Startliste suchen
// und die neuen Item-Bereiche festlegen
- for( USHORT i=0; i<aStartLst.Count(); i++ )
+ for( sal_uInt16 i=0; i<aStartLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aStartLst[i];
xub_StrLen nTestStart = pTest->GetStart();
@@ -1723,14 +1723,14 @@ void HTMLEndPosLst::SplitItem( const SfxPoolItem& rItem, xub_StrLen nStart,
if( pItem->Which() == nWhich &&
HTML_ON_VALUE == GetHTMLItemState( *pItem ) )
{
- BOOL bDelete = TRUE;
+ sal_Bool bDelete = sal_True;
if( nTestStart < nStart )
{
// der Start des neuen Attribut entspricht
// dem neuen Ende des Attribts
FixSplittedItem( pTest, nStart, i );
- bDelete = FALSE;
+ bDelete = sal_False;
}
else
{
@@ -1740,7 +1740,7 @@ void HTMLEndPosLst::SplitItem( const SfxPoolItem& rItem, xub_StrLen nStart,
aStartLst.Remove( i, 1 );
i--;
- USHORT nEndPos = _FindEndPos( pTest );
+ sal_uInt16 nEndPos = _FindEndPos( pTest );
if( nEndPos != USHRT_MAX )
aEndLst.Remove( nEndPos, 1 );
}
@@ -1763,7 +1763,7 @@ const SwHTMLFmtInfo *HTMLEndPosLst::GetFmtInfo( const SwFmt& rFmt,
{
const SwHTMLFmtInfo *pFmtInfo;
SwHTMLFmtInfo aFmtInfo( &rFmt );
- USHORT nPos;
+ sal_uInt16 nPos;
if( rFmtInfos.Seek_Entry( &aFmtInfo, &nPos ) )
{
pFmtInfo = rFmtInfos[nPos];
@@ -1782,8 +1782,8 @@ const SwHTMLFmtInfo *HTMLEndPosLst::GetFmtInfo( const SwFmt& rFmt,
}
HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl,
- const Color* pDfltCol, BOOL bStyles,
- ULONG nMode, const String& rText,
+ const Color* pDfltCol, sal_Bool bStyles,
+ sal_uLong nMode, const String& rText,
SvStringsSortDtor& rStyles ):
pDoc( pD ),
pTemplate( pTempl ),
@@ -1813,19 +1813,19 @@ HTMLEndPosLst::~HTMLEndPosLst()
void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
xub_StrLen nStart, xub_StrLen nEnd,
- SwHTMLFmtInfos& rFmtInfos, BOOL bParaAttrs )
+ SwHTMLFmtInfos& rFmtInfos, sal_Bool bParaAttrs )
{
// kein Bereich ?? dann nicht aufnehmen, wird nie wirksam !!
if( nStart != nEnd )
{
- BOOL bSet = FALSE, bSplit = FALSE;
+ sal_Bool bSet = sal_False, bSplit = sal_False;
switch( GetHTMLItemState(rItem) )
{
case HTML_ON_VALUE:
// das Attribut wird ausgegeben, wenn es nicht sowieso
// schon an ist
if( !ExistsOnTagItem( rItem.Which(), nStart ) )
- bSet = TRUE;
+ bSet = sal_True;
break;
case HTML_OFF_VALUE:
@@ -1834,14 +1834,14 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
// am ganzen Absatz gesetzt ist, weil es dann ja schon mit dem
// ABsatz-Tag ausgegeben wurde.
if( ExistsOnTagItem( rItem.Which(), nStart ) )
- bSplit = TRUE;
+ bSplit = sal_True;
bSet = bOutStyles && !bParaAttrs &&
!ExistsOffTagItem( rItem.Which(), nStart, nEnd );
break;
case HTML_REAL_VALUE:
// das Attribut kann immer ausgegeben werden
- bSet = TRUE;
+ bSet = sal_True;
break;
case HTML_STYLE_VALUE:
@@ -1873,7 +1873,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
if( pFmtInfo->pItemSet )
{
Insert( *pFmtInfo->pItemSet, nStart, nEnd,
- rFmtInfos, TRUE, bParaAttrs );
+ rFmtInfos, sal_True, bParaAttrs );
}
}
break;
@@ -1883,7 +1883,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
const SwFmtAutoFmt& rAutoFmt = (const SwFmtAutoFmt&)rItem;
const boost::shared_ptr<SfxItemSet> pSet = rAutoFmt.GetStyleHandle();
if( pSet.get() )
- Insert( *pSet.get(), nStart, nEnd, rFmtInfos, TRUE, bParaAttrs );
+ Insert( *pSet.get(), nStart, nEnd, rFmtInfos, sal_True, bParaAttrs );
}
break;
@@ -1914,12 +1914,12 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
if( pCharFmt )
{
Insert( pCharFmt->GetAttrSet(), nStart, nEnd,
- rFmtInfos, TRUE, bParaAttrs );
+ rFmtInfos, sal_True, bParaAttrs );
}
}
else
{
- bSet = TRUE;
+ bSet = sal_True;
}
}
break;
@@ -1936,7 +1936,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
void HTMLEndPosLst::Insert( const SfxPoolItem& rItem,
xub_StrLen nStart, xub_StrLen nEnd,
- SwHTMLFmtInfos& rFmtInfos, BOOL bParaAttrs )
+ SwHTMLFmtInfos& rFmtInfos, sal_Bool bParaAttrs )
{
sal_Bool bDependsOnScript = sal_False, bDependsOnAnyScript = sal_False;
sal_uInt16 nScript = i18n::ScriptType::LATIN;
@@ -2034,11 +2034,11 @@ void HTMLEndPosLst::Insert( const SfxPoolItem& rItem,
void HTMLEndPosLst::Insert( const SfxItemSet& rItemSet,
xub_StrLen nStart, xub_StrLen nEnd,
SwHTMLFmtInfos& rFmtInfos,
- BOOL bDeep, BOOL bParaAttrs )
+ sal_Bool bDeep, sal_Bool bParaAttrs )
{
SfxWhichIter aIter( rItemSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
const SfxPoolItem *pItem;
@@ -2067,10 +2067,10 @@ void HTMLEndPosLst::Insert( const SwDrawFrmFmt& rFmt, xub_StrLen nPos,
const SfxItemSet& rFmtItemSet = rFmt.GetAttrSet();
SfxItemSet aItemSet( *rFmtItemSet.GetPool(), RES_CHRATR_BEGIN,
RES_CHRATR_END );
- SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, pTextObj, TRUE );
- BOOL bOutStylesOld = bOutStyles;
- bOutStyles = FALSE;
- Insert( aItemSet, nPos, nPos+1, rFmtInfos, FALSE, FALSE );
+ SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, pTextObj, sal_True );
+ sal_Bool bOutStylesOld = bOutStyles;
+ bOutStyles = sal_False;
+ Insert( aItemSet, nPos, nPos+1, rFmtInfos, sal_False, sal_False );
bOutStyles = bOutStylesOld;
}
}
@@ -2099,10 +2099,10 @@ sal_uInt16 HTMLEndPosLst::GetScriptAtPos( xub_StrLen nPos ,
void HTMLEndPosLst::OutStartAttrs( SwHTMLWriter& rHWrt, xub_StrLen nPos,
HTMLOutContext *pContext )
{
- rHWrt.bTagOn = TRUE;
+ rHWrt.bTagOn = sal_True;
// die Attribute in der Start-Liste sind aufsteigend sortiert
- for( USHORT i=0; i< aStartLst.Count(); i++ )
+ for( sal_uInt16 i=0; i< aStartLst.Count(); i++ )
{
HTMLSttEndPos *pPos = aStartLst[i];
xub_StrLen nStart = pPos->GetStart();
@@ -2136,10 +2136,10 @@ void HTMLEndPosLst::OutStartAttrs( SwHTMLWriter& rHWrt, xub_StrLen nPos,
void HTMLEndPosLst::OutEndAttrs( SwHTMLWriter& rHWrt, xub_StrLen nPos,
HTMLOutContext *pContext )
{
- rHWrt.bTagOn = FALSE;
+ rHWrt.bTagOn = sal_False;
// die Attribute in der End-Liste sind aufsteigend sortiert
- USHORT i=0;
+ sal_uInt16 i=0;
while( i < aEndLst.Count() )
{
HTMLSttEndPos *pPos = aEndLst[i];
@@ -2183,7 +2183,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
// Besonderheit: leere Node und HR-Vorlage (horizontaler Strich)
// nur ein <HR> ausgeben
- USHORT nPoolId = pNd->GetAnyFmtColl().GetPoolFmtId();
+ sal_uInt16 nPoolId = pNd->GetAnyFmtColl().GetPoolFmtId();
if( !nEnde && (RES_POOLCOLL_HTML_HR==nPoolId ||
pNd->GetAnyFmtColl().GetName().EqualsAscii( OOO_STRING_SVTOOLS_HTML_horzrule) ) )
@@ -2200,7 +2200,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
if( rHTMLWrt.bLFPossible )
rHTMLWrt.OutNewLine(); // Absatz-Tag in eine neue Zeile
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
ByteString sOut( '<' );
sOut += OOO_STRING_SVTOOLS_HTML_horzrule;
@@ -2212,7 +2212,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
return rHTMLWrt;
}
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pItemSet->GetItemState( RES_LR_SPACE, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pItemSet->GetItemState( RES_LR_SPACE, sal_False, &pItem ))
{
sal_Int32 nLeft = ((SvxLRSpaceItem*)pItem)->GetLeft();
sal_Int32 nRight = ((SvxLRSpaceItem*)pItem)->GetRight();
@@ -2253,13 +2253,13 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
}
}
rWrt.Strm() << sOut.GetBuffer();
- if( SFX_ITEM_SET == pItemSet->GetItemState( RES_BOX, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pItemSet->GetItemState( RES_BOX, sal_False, &pItem ))
{
const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem;
const SvxBorderLine* pBorderLine = pBoxItem->GetBottom();
if( pBorderLine )
{
- USHORT nWidth = pBorderLine->GetOutWidth() +
+ sal_uInt16 nWidth = pBorderLine->GetOutWidth() +
pBorderLine->GetInWidth() +
pBorderLine->GetDistance();
((sOut = ' ') += OOO_STRING_SVTOOLS_HTML_O_size) += '=';
@@ -2298,14 +2298,14 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
const SfxPoolItem* pItem;
const SfxItemSet *pItemSet = pNd->GetpSwAttrSet();
if( pItemSet && pItemSet->Count() &&
- SFX_ITEM_SET == pItemSet->GetItemState( RES_CHRATR_FONTSIZE, FALSE, &pItem ) &&
+ SFX_ITEM_SET == pItemSet->GetItemState( RES_CHRATR_FONTSIZE, sal_False, &pItem ) &&
40 == ((const SvxFontHeightItem *)pItem)->GetHeight() )
{
// ... ausserdem ist die 2pt Schrift eingestellt ...
- ULONG nNdPos = rWrt.pCurPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNdPos = rWrt.pCurPam->GetPoint()->nNode.GetIndex();
const SwNode *pNextNd = rWrt.pDoc->GetNodes()[nNdPos+1];
const SwNode *pPrevNd = rWrt.pDoc->GetNodes()[nNdPos-1];
- BOOL bStdColl = nPoolId == RES_POOLCOLL_STANDARD;
+ sal_Bool bStdColl = nPoolId == RES_POOLCOLL_STANDARD;
if( ( bStdColl && (pNextNd->IsTableNode() ||
pNextNd->IsSectionNode()) ) ||
( !bStdColl && pNextNd->IsEndNode() &&
@@ -2319,7 +2319,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
// Alle an dem Node verankerten Rahmen ausgeben
rHTMLWrt.OutFlyFrm( rNode.GetIndex(), 0, HTML_POS_ANY );
- rHTMLWrt.bLFPossible = FALSE;
+ rHTMLWrt.bLFPossible = sal_False;
return rWrt;
}
@@ -2327,36 +2327,36 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
}
// PagePreaks uns PagDescs abfangen
- BOOL bPageBreakBehind = FALSE;
+ sal_Bool bPageBreakBehind = sal_False;
if( rHTMLWrt.bCfgFormFeed &&
!(rHTMLWrt.bOutTable || rHTMLWrt.bOutFlyFrame) &&
rHTMLWrt.pStartNdIdx->GetIndex() !=
rHTMLWrt.pCurPam->GetPoint()->nNode.GetIndex() )
{
- BOOL bPageBreakBefore = FALSE;
+ sal_Bool bPageBreakBefore = sal_False;
const SfxPoolItem* pItem;
const SfxItemSet* pItemSet = pNd->GetpSwAttrSet();
if( pItemSet )
{
if( SFX_ITEM_SET ==
- pItemSet->GetItemState( RES_PAGEDESC, TRUE, &pItem ) &&
+ pItemSet->GetItemState( RES_PAGEDESC, sal_True, &pItem ) &&
((SwFmtPageDesc *)pItem)->GetPageDesc() )
- bPageBreakBefore = TRUE;
+ bPageBreakBefore = sal_True;
else if( SFX_ITEM_SET ==
- pItemSet->GetItemState( RES_BREAK, TRUE, &pItem ) )
+ pItemSet->GetItemState( RES_BREAK, sal_True, &pItem ) )
{
switch( ((SvxFmtBreakItem *)pItem)->GetBreak() )
{
case SVX_BREAK_PAGE_BEFORE:
- bPageBreakBefore = TRUE;
+ bPageBreakBefore = sal_True;
break;
case SVX_BREAK_PAGE_AFTER:
- bPageBreakBehind = TRUE;
+ bPageBreakBehind = sal_True;
break;
case SVX_BREAK_PAGE_BOTH:
- bPageBreakBefore = TRUE;
- bPageBreakBehind = TRUE;
+ bPageBreakBefore = sal_True;
+ bPageBreakBehind = sal_True;
break;
default:
;
@@ -2372,7 +2372,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
rHTMLWrt.OutForm();
// An dem Node "verankerte" Seitenegebunde Rahmen ausgeben
- BOOL bFlysLeft = rHTMLWrt.OutFlyFrm( rNode.GetIndex(),
+ sal_Bool bFlysLeft = rHTMLWrt.OutFlyFrm( rNode.GetIndex(),
0, HTML_POS_PREFIX );
// An dem Node verankerte Rahmen ausgeben, die vor dem
// Absatz-Tag geschrieben werden sollen.
@@ -2384,12 +2384,12 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
nEnde = rHTMLWrt.pCurPam->GetMark()->nContent.GetIndex();
// gibt es harte Attribute, die als Optionen geschrieben werden muessen?
- rHTMLWrt.bTagOn = TRUE;
+ rHTMLWrt.bTagOn = sal_True;
// jetzt das Tag des Absatzes ausgeben
const SwFmt& rFmt = pNd->GetAnyFmtColl();
SwHTMLTxtCollOutputInfo aFmtInfo;
- BOOL bOldLFPossible = rHTMLWrt.bLFPossible;
+ sal_Bool bOldLFPossible = rHTMLWrt.bLFPossible;
OutHTML_SwFmt( rWrt, rFmt, pNd->GetpSwAttrSet(), aFmtInfo );
// Wenn vor dem Absatz-Tag keine neue Zeile aufgemacht wurde, dann
@@ -2400,7 +2400,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
// dann die Bookmarks (inkl. End-Tag)
- rHTMLWrt.bOutOpts = FALSE;
+ rHTMLWrt.bOutOpts = sal_False;
rHTMLWrt.OutBookmarks();
// jetzt ist noch mal eine gute Gelegenheit fuer ein LF, sofern es noch
@@ -2410,7 +2410,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
{
rHTMLWrt.OutNewLine();
}
- rHTMLWrt.bLFPossible = FALSE;
+ rHTMLWrt.bLFPossible = sal_False;
// Text, der aus einer Outline-Numerierung kommt ermitteln
xub_StrLen nOffset = 0;
@@ -2444,7 +2444,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
if( aFmtInfo.pItemSet )
{
aEndPosLst.Insert( *aFmtInfo.pItemSet, 0, nEnde + nOffset,
- rHTMLWrt.aChrFmtInfos, FALSE, TRUE );
+ rHTMLWrt.aChrFmtInfos, sal_False, sal_True );
}
@@ -2472,13 +2472,13 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
// erstmal den Start berichtigen. D.h. wird nur ein Teil vom Satz
// ausgegeben, so muessen auch da die Attribute stimmen!!
- rHTMLWrt.bTxtAttr = TRUE;
+ rHTMLWrt.bTxtAttr = sal_True;
- USHORT nAttrPos = 0;
+ sal_uInt16 nAttrPos = 0;
xub_StrLen nStrPos = rHTMLWrt.pCurPam->GetPoint()->nContent.GetIndex();
const SwTxtAttr * pHt = 0;
- USHORT nCntAttr = pNd->HasHints() ? pNd->GetSwpHints().Count() : 0;
+ sal_uInt16 nCntAttr = pNd->HasHints() ? pNd->GetSwpHints().Count() : 0;
if( nCntAttr && nStrPos > *( pHt = pNd->GetSwpHints()[ 0 ] )->GetStart() )
{
// Ok, es gibt vorher Attribute, die ausgegeben werden muessen
@@ -2525,9 +2525,9 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
aEndPosLst.OutStartAttrs( rHTMLWrt, nStrPos + nOffset );
}
- BOOL bWriteBreak = (HTML_PREFORMTXT_ON != rHTMLWrt.nLastParaToken);
+ sal_Bool bWriteBreak = (HTML_PREFORMTXT_ON != rHTMLWrt.nLastParaToken);
if( bWriteBreak && pNd->GetNumRule() )
- bWriteBreak = FALSE;
+ bWriteBreak = sal_False;
{
HTMLOutContext aContext( rHTMLWrt.eDestEnc );
@@ -2543,7 +2543,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
nStrPos, HTML_POS_INSIDE,
&aContext );
- BOOL bOutChar = TRUE;
+ sal_Bool bOutChar = sal_True;
const SwTxtAttr * pTxtHt = 0;
if( nAttrPos < nCntAttr && *pHt->GetStart() == nStrPos
&& nStrPos != nEnde )
@@ -2559,8 +2559,8 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
{
// Wenn erlaubt, wird das Ding als Spacer exportiert
- bOutChar = FALSE; // Space nicht ausgeben
- bWriteBreak = FALSE; // der Absatz ist aber auch nicht leer
+ bOutChar = sal_False; // Space nicht ausgeben
+ bWriteBreak = sal_False; // der Absatz ist aber auch nicht leer
HTMLOutFuncs::FlushToAscii( rWrt.Strm(), aContext );
OutHTML_HoriSpacer( rWrt,
((const SvxKerningItem&)pHt->GetAttr()).GetValue() );
@@ -2590,13 +2590,13 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
else
{
pTxtHt = pHt;
- USHORT nFldWhich;
+ sal_uInt16 nFldWhich;
if( RES_TXTATR_FIELD != pHt->Which() ||
( RES_POSTITFLD != (nFldWhich = ((const SwFmtFld&)pHt->GetAttr()).GetFld()->Which()) &&
RES_SCRIPTFLD != nFldWhich ) )
- bWriteBreak = FALSE;
+ bWriteBreak = sal_False;
}
- bOutChar = FALSE; // keine 255 ausgeben
+ bOutChar = sal_False; // keine 255 ausgeben
}
} while( ++nAttrPos < nCntAttr && nStrPos ==
*( pHt = pNd->GetSwpHints()[ nAttrPos ] )->GetStart() );
@@ -2627,7 +2627,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
HTMLOutFuncs::FlushToAscii( rWrt.Strm(), aContext );
Out( aHTMLAttrFnTab, pTxtHt->GetAttr(), rHTMLWrt );
rHTMLWrt.nCSS1Script = nCSS1Script;
- rHTMLWrt.bLFPossible = FALSE;
+ rHTMLWrt.bLFPossible = sal_False;
}
if( bOutChar )
@@ -2653,7 +2653,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
{
HTMLOutFuncs::FlushToAscii( rWrt.Strm(), aContext );
rHTMLWrt.OutNewLine();
- bOutChar = FALSE;
+ bOutChar = sal_False;
if( rHTMLWrt.nLastParaToken )
nPreSplitPos = nStrPos+1;
}
@@ -2689,11 +2689,11 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
nEnde, HTML_POS_INSIDE );
ASSERT( !bFlysLeft, "Es wurden nicht alle Rahmen gespeichert!" );
- rHTMLWrt.bTxtAttr = FALSE;
+ rHTMLWrt.bTxtAttr = sal_False;
if( bWriteBreak )
{
- BOOL bEndOfCell = rHTMLWrt.bOutTable &&
+ sal_Bool bEndOfCell = rHTMLWrt.bOutTable &&
rWrt.pCurPam->GetPoint()->nNode.GetIndex() ==
rWrt.pCurPam->GetMark()->nNode.GetIndex();
@@ -2713,7 +2713,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
if( rULSpace.GetLower() > 0 && !bEndOfCell &&
!rHTMLWrt.IsHTMLMode(HTMLMODE_NO_BR_AT_PAREND) )
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_linebreak );
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
}
}
@@ -2734,23 +2734,23 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
(((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_clear) += '=') += pStr;
HTMLOutFuncs::Out_AsciiTag( rHTMLWrt.Strm(), sOut.GetBuffer() );
- rHTMLWrt.bClearLeft = FALSE;
- rHTMLWrt.bClearRight = FALSE;
+ rHTMLWrt.bClearLeft = sal_False;
+ rHTMLWrt.bClearRight = sal_False;
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
}
// wenn ein LF nicht schon erlaubt ist wird es erlaubt, wenn der
// Absatz mit einem ' ' endet
if( !rHTMLWrt.bLFPossible && !rHTMLWrt.nLastParaToken &&
nEnde > 0 && ' ' == rStr.GetChar(nEnde-1) )
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
- rHTMLWrt.bTagOn = FALSE;
+ rHTMLWrt.bTagOn = sal_False;
OutHTML_SwFmtOff( rWrt, aFmtInfo );
// eventuell eine Form schliessen
- rHTMLWrt.OutForm( FALSE );
+ rHTMLWrt.OutForm( sal_False );
if( bPageBreakBehind )
rWrt.Strm() << '\f';
@@ -2816,7 +2816,7 @@ static Writer& OutHTML_SvxColor( Writer& rWrt, const SfxPoolItem& rHt )
HTMLOutFuncs::Out_Color( rWrt.Strm(), aColor, rHTMLWrt.eDestEnc ) << '>';
}
else
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font, sal_False );
return rWrt;
}
@@ -2860,7 +2860,7 @@ static Writer& OutHTML_SvxFont( Writer& rWrt, const SfxPoolItem& rHt )
<< "\">";
}
else
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font , FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font , sal_False );
return rWrt;
}
@@ -2876,8 +2876,8 @@ static Writer& OutHTML_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt )
ByteString sOut( '<' );
sOut += OOO_STRING_SVTOOLS_HTML_font;
- UINT32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight();
- USHORT nSize = rHTMLWrt.GetHTMLFontSize( nHeight );
+ sal_uInt32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight();
+ sal_uInt16 nSize = rHTMLWrt.GetHTMLFontSize( nHeight );
(((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_size) += '=')
+= ByteString::CreateFromInt32( nSize );
rWrt.Strm() << sOut.GetBuffer();
@@ -2893,7 +2893,7 @@ static Writer& OutHTML_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt )
}
else
{
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font, sal_False );
}
return rWrt;
@@ -2919,7 +2919,7 @@ static Writer& OutHTML_SvxLanguage( Writer& rWrt, const SfxPoolItem& rHt )
}
else
{
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span, sal_False );
}
return rWrt;
@@ -3030,14 +3030,14 @@ static Writer& OutHTML_SwFlyCnt( Writer& rWrt, const SfxPoolItem& rHt )
SwHTMLFrmType eType =
(SwHTMLFrmType)rHTMLWrt.GuessFrmType( rFmt, pSdrObj );
- BYTE nMode = aHTMLOutFrmAsCharTable[eType][rHTMLWrt.nExportMode];
+ sal_uInt8 nMode = aHTMLOutFrmAsCharTable[eType][rHTMLWrt.nExportMode];
rHTMLWrt.OutFrmFmt( nMode, rFmt, pSdrObj );
return rWrt;
}
// Das ist jetzt unser Blink-Item. Blinkend wird eingeschaltet, indem man
-// das Item auf TRUE setzt!
+// das Item auf sal_True setzt!
static Writer& OutHTML_SwBlink( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -3057,13 +3057,13 @@ static Writer& OutHTML_SwBlink( Writer& rWrt, const SfxPoolItem& rHt )
return rWrt;
}
-Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, BOOL bOn )
+Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, sal_Bool bOn )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
String aURL( rINetFmt.GetValue() );
const SvxMacroTableDtor *pMacTable = rINetFmt.GetMacroTbl();
- BOOL bEvents = pMacTable != 0 && pMacTable->Count() > 0;
+ sal_Bool bEvents = pMacTable != 0 && pMacTable->Count() > 0;
// Gibt es ueberhaupt etwas auszugeben?
if( !aURL.Len() && !bEvents && !rINetFmt.GetName().Len() )
@@ -3072,7 +3072,7 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, BOOL bOn )
// Tag aus? Dann nur ein </A> ausgeben.
if( !bOn )
{
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_anchor, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_anchor, sal_False );
return rWrt;
}
@@ -3084,7 +3084,7 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, BOOL bOn )
const SwCharFmt* pFmt = rWrt.pDoc->GetCharFmtFromPool(
RES_POOLCHR_INET_NORMAL );
SwHTMLFmtInfo aFmtInfo( pFmt );
- USHORT nPos;
+ sal_uInt16 nPos;
if( rHTMLWrt.aChrFmtInfos.Seek_Entry( &aFmtInfo, &nPos ) )
{
bScriptDependent = rHTMLWrt.aChrFmtInfos[nPos]->bScriptDependent;
@@ -3095,7 +3095,7 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, BOOL bOn )
const SwCharFmt* pFmt = rWrt.pDoc->GetCharFmtFromPool(
RES_POOLCHR_INET_VISIT );
SwHTMLFmtInfo aFmtInfo( pFmt );
- USHORT nPos;
+ sal_uInt16 nPos;
if( rHTMLWrt.aChrFmtInfos.Seek_Entry( &aFmtInfo, &nPos ) )
{
bScriptDependent = rHTMLWrt.aChrFmtInfos[nPos]->bScriptDependent;
@@ -3199,11 +3199,11 @@ static Writer& OutHTML_SwFmtINetFmt( Writer& rWrt, const SfxPoolItem& rHt )
{
SwFmtINetFmt *pINetFmt =
rHTMLWrt.aINetFmts[ rHTMLWrt.aINetFmts.Count()-1 ];
- OutHTML_INetFmt( rWrt, *pINetFmt, FALSE );
+ OutHTML_INetFmt( rWrt, *pINetFmt, sal_False );
}
// jetzt das neue aufmachen
- OutHTML_INetFmt( rWrt, rINetFmt, TRUE );
+ OutHTML_INetFmt( rWrt, rINetFmt, sal_True );
// und merken
const SwFmtINetFmt *pINetFmt = new SwFmtINetFmt( rINetFmt );
@@ -3213,7 +3213,7 @@ static Writer& OutHTML_SwFmtINetFmt( Writer& rWrt, const SfxPoolItem& rHt )
else
{
// das
- OutHTML_INetFmt( rWrt, rINetFmt, FALSE );
+ OutHTML_INetFmt( rWrt, rINetFmt, sal_False );
ASSERT( rHTMLWrt.aINetFmts.Count(), "da fehlt doch ein URL-Attribut" );
if( rHTMLWrt.aINetFmts.Count() )
@@ -3232,7 +3232,7 @@ static Writer& OutHTML_SwFmtINetFmt( Writer& rWrt, const SfxPoolItem& rHt )
// werden muss
SwFmtINetFmt *pINetFmt =
rHTMLWrt.aINetFmts[ rHTMLWrt.aINetFmts.Count()-1 ];
- OutHTML_INetFmt( rWrt, *pINetFmt, TRUE );
+ OutHTML_INetFmt( rWrt, *pINetFmt, sal_True );
}
}
@@ -3254,7 +3254,7 @@ static Writer& OutHTML_SwTxtCharFmt( Writer& rWrt, const SfxPoolItem& rHt )
}
SwHTMLFmtInfo aFmtInfo( pFmt );
- USHORT nPos;
+ sal_uInt16 nPos;
if( !rHTMLWrt.aChrFmtInfos.Seek_Entry( &aFmtInfo, &nPos ) )
return rWrt;
@@ -3303,7 +3303,7 @@ static Writer& OutHTML_SwTxtCharFmt( Writer& rWrt, const SfxPoolItem& rHt )
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(),
pFmtInfo->aToken.Len() ? pFmtInfo->aToken.GetBuffer()
: OOO_STRING_SVTOOLS_HTML_span,
- FALSE );
+ sal_False );
}
return rWrt;
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index 6a6bcc04b34c..27d31bada149 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -80,31 +80,31 @@ void SwHTMLParser::NewScript()
if( aScriptURL.Len() )
{
// Den Inhalt des Script-Tags ignorieren
- bIgnoreRawData = TRUE;
+ bIgnoreRawData = sal_True;
}
}
void SwHTMLParser::EndScript()
{
- BOOL bInsIntoBasic = FALSE,
- bInsSrcIntoFld = FALSE;
+ sal_Bool bInsIntoBasic = sal_False,
+ bInsSrcIntoFld = sal_False;
switch( eScriptLang )
{
case HTML_SL_STARBASIC:
- bInsIntoBasic = TRUE;
+ bInsIntoBasic = sal_True;
break;
default:
- bInsSrcIntoFld = TRUE;
+ bInsSrcIntoFld = sal_True;
break;
}
- bIgnoreRawData = FALSE;
+ bIgnoreRawData = sal_False;
aScriptSource.ConvertLineEnd();
// MIB 23.5.97: SGML-Kommentare brauchen nicht mehr entfernt zu werden,
// weil JS das jetzt selber kann.
-// RemoveSGMLComment( aScriptSource, TRUE );
+// RemoveSGMLComment( aScriptSource, sal_True );
// Ausser StarBasic und unbenutzem JavaScript jedes Script oder den
// Modulnamen in einem Feld merken merken
@@ -125,7 +125,7 @@ void SwHTMLParser::EndScript()
{
// Fuer JavaScript und StarBasic noch ein Basic-Modul anlegen
// Das Basic entfernt natuerlich weiterhin keine SGML-Kommentare
- RemoveSGMLComment( aScriptSource, TRUE );
+ RemoveSGMLComment( aScriptSource, sal_True );
// get library name
::rtl::OUString aLibName;
@@ -157,7 +157,7 @@ void SwHTMLParser::EndScript()
if( !aBasicModule.Len() )
{
// create module name
- BOOL bFound = TRUE;
+ sal_Bool bFound = sal_True;
while( bFound )
{
aBasicModule.AssignAscii( "Modul" );
@@ -294,13 +294,13 @@ void SwHTMLWriter::OutBasic()
// und jetzt alle StarBasic-Module und alle unbenutzen JavaSrript-Module
// ausgeben
- for( USHORT i=0; i<pBasicMan->GetLibCount(); i++ )
+ for( sal_uInt16 i=0; i<pBasicMan->GetLibCount(); i++ )
{
StarBASIC *pBasic = pBasicMan->GetLib( i );
const String& rLibName = pBasic->GetName();
SbxArray *pModules = pBasic->GetModules();
- for( USHORT j=0; j<pModules->Count(); j++ )
+ for( sal_uInt16 j=0; j<pModules->Count(); j++ )
{
const SbModule *pModule = PTR_CAST( SbModule, pModules->Get(j) );
ASSERT( pModule, "Wo ist das Modul?" );
@@ -356,7 +356,7 @@ void SwHTMLWriter::OutBasicBodyEvents()
uno::Reference < container::XNameReplace > xEvents = xSup->getEvents();
for ( sal_Int32 i=0; i<4; i++ )
{
- SvxMacro* pMacro = SfxEventConfiguration::ConvertToMacro( xEvents->getByName( ::rtl::OUString::createFromAscii(aEventNames[i]) ), pDocSh, TRUE );
+ SvxMacro* pMacro = SfxEventConfiguration::ConvertToMacro( xEvents->getByName( ::rtl::OUString::createFromAscii(aEventNames[i]) ), pDocSh, sal_True );
if ( pMacro )
pDocTable->Insert( aBodyEventTable[i].nEvent, pMacro );
}
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 9d05d833c2d2..5995d4eb2839 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -89,9 +89,9 @@ void lcl_swcss1_setEncoding( SwFmt& rFmt, rtl_TextEncoding eEnc );
// Implementierung des SwCSS1Parsers (eigentlich swcss1.cxx)
static struct SwCSS1ItemIds
{
- USHORT nFmtBreak;
- USHORT nFmtPageDesc;
- USHORT nFmtKeep;
+ sal_uInt16 nFmtBreak;
+ sal_uInt16 nFmtPageDesc;
+ sal_uInt16 nFmtKeep;
SwCSS1ItemIds() :
nFmtBreak( RES_BREAK ),
@@ -104,8 +104,8 @@ static struct SwCSS1ItemIds
void SwCSS1Parser::ChgPageDesc( const SwPageDesc *pPageDesc,
const SwPageDesc& rNewPageDesc )
{
- USHORT nPageDescs = pDoc->GetPageDescCnt();
- USHORT i;
+ sal_uInt16 nPageDescs = pDoc->GetPageDescCnt();
+ sal_uInt16 i;
for( i=0; i<nPageDescs; i++ )
if( pPageDesc == &(const_cast<const SwDoc *>(pDoc)->GetPageDesc(i)) )
{
@@ -116,22 +116,22 @@ void SwCSS1Parser::ChgPageDesc( const SwPageDesc *pPageDesc,
ASSERT( i<nPageDescs, "Seitenvorlage nicht gefunden" );
}
-SwCSS1Parser::SwCSS1Parser( SwDoc *pD, sal_uInt32 aFHeights[7], const String& rBaseURL, BOOL bNewDoc ) :
+SwCSS1Parser::SwCSS1Parser( SwDoc *pD, sal_uInt32 aFHeights[7], const String& rBaseURL, sal_Bool bNewDoc ) :
SvxCSS1Parser( pD->GetAttrPool(), rBaseURL, MM50/2,
- (USHORT*)&aItemIds, sizeof(aItemIds) / sizeof(USHORT) ),
+ (sal_uInt16*)&aItemIds, sizeof(aItemIds) / sizeof(sal_uInt16) ),
pDoc( pD ),
nDropCapCnt( 0 ),
bIsNewDoc( bNewDoc ),
- bBodyBGColorSet( FALSE ),
- bBodyBackgroundSet( FALSE ),
- bBodyTextSet( FALSE ),
- bBodyLinkSet( FALSE ),
- bBodyVLinkSet( FALSE ),
- bSetFirstPageDesc( FALSE ),
- bSetRightPageDesc( FALSE ),
- bTableHeaderTxtCollSet( FALSE ),
- bTableTxtCollSet( FALSE ),
- bLinkCharFmtsSet( FALSE )
+ bBodyBGColorSet( sal_False ),
+ bBodyBackgroundSet( sal_False ),
+ bBodyTextSet( sal_False ),
+ bBodyLinkSet( sal_False ),
+ bBodyVLinkSet( sal_False ),
+ bSetFirstPageDesc( sal_False ),
+ bSetRightPageDesc( sal_False ),
+ bTableHeaderTxtCollSet( sal_False ),
+ bTableTxtCollSet( sal_False ),
+ bLinkCharFmtsSet( sal_False )
{
aFontHeights[0] = aFHeights[0];
aFontHeights[1] = aFHeights[1];
@@ -150,29 +150,29 @@ SwCSS1Parser::~SwCSS1Parser()
/* */
// Feature: PrintExt
-BOOL SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet,
+sal_Bool SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet,
const SvxCSS1PropertyInfo& rPropInfo )
{
SvxBreak eBreak = SVX_BREAK_NONE;
- BOOL bKeep = FALSE;
- BOOL bSetKeep = FALSE, bSetBreak = FALSE, bSetPageDesc = FALSE;
+ sal_Bool bKeep = sal_False;
+ sal_Bool bSetKeep = sal_False, bSetBreak = sal_False, bSetPageDesc = sal_False;
const SwPageDesc *pPageDesc = 0;
switch( rPropInfo.ePageBreakBefore )
{
case SVX_CSS1_PBREAK_ALWAYS:
eBreak = SVX_BREAK_PAGE_BEFORE;
- bSetBreak = TRUE;
+ bSetBreak = sal_True;
break;
case SVX_CSS1_PBREAK_LEFT:
- pPageDesc = GetLeftPageDesc( TRUE );
- bSetPageDesc = TRUE;
+ pPageDesc = GetLeftPageDesc( sal_True );
+ bSetPageDesc = sal_True;
break;
case SVX_CSS1_PBREAK_RIGHT:
- pPageDesc = GetRightPageDesc( TRUE );
- bSetPageDesc = TRUE;
+ pPageDesc = GetRightPageDesc( sal_True );
+ bSetPageDesc = sal_True;
break;
case SVX_CSS1_PBREAK_AUTO:
- bSetBreak = bSetPageDesc = TRUE;
+ bSetBreak = bSetPageDesc = sal_True;
break;
// case SVX_CSS1_PBREAK_AVOID:
// Hier koennte man SvxKeepItem am Absatz davor einfuegen
@@ -187,13 +187,13 @@ BOOL SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet,
case SVX_CSS1_PBREAK_RIGHT:
// LEFT/RIGHT koennte man auch am Absatz davor setzen
eBreak = SVX_BREAK_PAGE_AFTER;
- bSetBreak = TRUE;
+ bSetBreak = sal_True;
break;
case SVX_CSS1_PBREAK_AUTO:
- bSetBreak = bSetKeep = bSetPageDesc = TRUE;
+ bSetBreak = bSetKeep = bSetPageDesc = sal_True;
break;
case SVX_CSS1_PBREAK_AVOID:
- bKeep = bSetKeep = TRUE;
+ bKeep = bSetKeep = sal_True;
break;
default:
;
@@ -213,11 +213,11 @@ BOOL SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet,
static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet )
{
const SfxPoolItem *pItem;
- static USHORT aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE };
- for( USHORT i=0; i<3; i++ )
+ for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], sal_False,
&pItem ) &&
((const SvxFontHeightItem *)pItem)->GetProp() != 100)
{
@@ -228,7 +228,7 @@ static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet )
pCharFmt->SetFmtAttr( rItemSet );
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ) )
{
// Ein Brush-Item mit RES_BACKGROUND muss noch in eines mit
// RES_CHRATR_BACKGROUND gewandelt werden
@@ -249,8 +249,8 @@ void SwCSS1Parser::SetLinkCharFmts()
if( pStyleEntry )
{
SfxItemSet& rItemSet = pStyleEntry->GetItemSet();
- BOOL bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
- FALSE));
+ sal_Bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
+ sal_False));
pUnvisited = GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL );
SetCharFmtAttrs( pUnvisited, rItemSet );
bBodyLinkSet |= bColorSet;
@@ -267,8 +267,8 @@ void SwCSS1Parser::SetLinkCharFmts()
if( pStyleEntry )
{
SfxItemSet& rItemSet = pStyleEntry->GetItemSet();
- BOOL bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
- FALSE));
+ sal_Bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
+ sal_False));
if( !pUnvisited )
pUnvisited = GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL );
SetCharFmtAttrs( pUnvisited, rItemSet );
@@ -282,15 +282,15 @@ void SwCSS1Parser::SetLinkCharFmts()
if( pStyleEntry )
{
SfxItemSet& rItemSet = pStyleEntry->GetItemSet();
- BOOL bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
- FALSE));
+ sal_Bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
+ sal_False));
if( !pVisited )
pVisited = GetCharFmtFromPool( RES_POOLCHR_INET_VISIT );
SetCharFmtAttrs( pVisited, rItemSet );
bBodyVLinkSet |= bColorSet;
}
- bLinkCharFmtsSet = TRUE;
+ bLinkCharFmtsSet = sal_True;
}
static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
@@ -305,8 +305,8 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
rPropInfo.bTextIndent) &&
(!rPropInfo.bLeftMargin || !rPropInfo.bRightMargin ||
!rPropInfo.bTextIndent) &&
- SFX_ITEM_SET == rCollItemSet.GetItemState(RES_LR_SPACE,TRUE,&pCollItem) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,FALSE,&pItem) )
+ SFX_ITEM_SET == rCollItemSet.GetItemState(RES_LR_SPACE,sal_True,&pCollItem) &&
+ SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,sal_False,&pItem) )
{
const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem;
@@ -324,9 +324,9 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
// oberer und unterer Rand
if( (rPropInfo.bTopMargin || rPropInfo.bBottomMargin) &&
(!rPropInfo.bTopMargin || !rPropInfo.bBottomMargin) &&
- SFX_ITEM_SET == rCollItemSet.GetItemState(RES_UL_SPACE,TRUE,
+ SFX_ITEM_SET == rCollItemSet.GetItemState(RES_UL_SPACE,sal_True,
&pCollItem) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,FALSE,&pItem) )
+ SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,sal_False,&pItem) )
{
const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem;
@@ -339,11 +339,11 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
rItemSet.Put( aULItem );
}
- static USHORT aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE };
- for( USHORT i=0; i<3; i++ )
+ for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], sal_False,
&pItem ) &&
((const SvxFontHeightItem *)pItem)->GetProp() != 100)
{
@@ -359,12 +359,12 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
pColl->SetFmtAttr( rItemSet );
}
-void SwCSS1Parser::SetTableTxtColl( BOOL bHeader )
+void SwCSS1Parser::SetTableTxtColl( sal_Bool bHeader )
{
ASSERT( !(bHeader ? bTableHeaderTxtCollSet : bTableTxtCollSet),
"Aufruf von SetTableTxtColl unnoetig" );
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
String sTag;
if( bHeader )
{
@@ -401,9 +401,9 @@ void SwCSS1Parser::SetTableTxtColl( BOOL bHeader )
}
if( bHeader )
- bTableHeaderTxtCollSet = TRUE;
+ bTableHeaderTxtCollSet = sal_True;
else
- bTableTxtCollSet = TRUE;
+ bTableTxtCollSet = sal_True;
}
void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
@@ -412,54 +412,54 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
SvxBrushItem aBrushItem( RES_BACKGROUND );
SvxBoxItem aBoxItem( RES_BOX );
SvxFrameDirectionItem aFrmDirItem(FRMDIR_ENVIRONMENT, RES_FRAMEDIR);
- BOOL bSetBrush = pBrush!=0, bSetBox = FALSE, bSetFrmDir = FALSE;
+ sal_Bool bSetBrush = pBrush!=0, bSetBox = sal_False, bSetFrmDir = sal_False;
if( pBrush )
aBrushItem = *pBrush;
if( pItemSet2 )
{
const SfxPoolItem *pItem = 0;
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BACKGROUND, FALSE,
+ if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BACKGROUND, sal_False,
&pItem ) )
{
// ein Hintergrund wird gesetzt
aBrushItem = *((const SvxBrushItem *)pItem);
pItemSet2->ClearItem( RES_BACKGROUND );
- bSetBrush = TRUE;
+ bSetBrush = sal_True;
}
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BOX, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BOX, sal_False, &pItem ) )
{
// eine Umrandung wird gesetzt
aBoxItem = *((const SvxBoxItem *)pItem);
pItemSet2->ClearItem( RES_BOX );
- bSetBox = TRUE;
+ bSetBox = sal_True;
}
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BOX, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BOX, sal_False, &pItem ) )
{
// eine Umrandung wird gesetzt
aBoxItem = *((const SvxBoxItem *)pItem);
pItemSet2->ClearItem( RES_BOX );
- bSetBox = TRUE;
+ bSetBox = sal_True;
}
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_FRAMEDIR, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_FRAMEDIR, sal_False, &pItem ) )
{
// eine Umrandung wird gesetzt
aFrmDirItem = *static_cast< const SvxFrameDirectionItem *>( pItem );
pItemSet2->ClearItem( RES_FRAMEDIR );
- bSetFrmDir = TRUE;
+ bSetFrmDir = sal_True;
}
}
if( bSetBrush || bSetBox || bSetFrmDir )
{
- static USHORT aPoolIds[] = { RES_POOLPAGE_HTML, RES_POOLPAGE_FIRST,
+ static sal_uInt16 aPoolIds[] = { RES_POOLPAGE_HTML, RES_POOLPAGE_FIRST,
RES_POOLPAGE_LEFT, RES_POOLPAGE_RIGHT };
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
{
- const SwPageDesc *pPageDesc = GetPageDesc( aPoolIds[i], FALSE );
+ const SwPageDesc *pPageDesc = GetPageDesc( aPoolIds[i], sal_False );
if( pPageDesc )
{
SwPageDesc aNewPageDesc( *pPageDesc );
@@ -489,15 +489,15 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
SwFrmFmt &rMaster = aNewPageDesc.GetMaster();
const SfxItemSet& rPageItemSet = rMaster.GetAttrSet();
const SfxPoolItem *pPageItem, *pItem;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
// linker, rechter Rand und Erstzeilen-Einzug
if( (rPropInfo.bLeftMargin || rPropInfo.bRightMargin) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,FALSE,&pItem) )
+ SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,sal_False,&pItem) )
{
if( (!rPropInfo.bLeftMargin || !rPropInfo.bRightMargin) &&
SFX_ITEM_SET == rPageItemSet.GetItemState(RES_LR_SPACE,
- TRUE,&pPageItem) )
+ sal_True,&pPageItem) )
{
const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem;
@@ -513,16 +513,16 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
{
rMaster.SetFmtAttr( *pItem );
}
- bChanged = TRUE;
+ bChanged = sal_True;
}
// oberer und unterer Rand
if( (rPropInfo.bTopMargin || rPropInfo.bBottomMargin) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,FALSE,&pItem) )
+ SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,sal_False,&pItem) )
{
if( (!rPropInfo.bTopMargin || !rPropInfo.bBottomMargin) &&
SFX_ITEM_SET == rPageItemSet.GetItemState(RES_UL_SPACE,
- TRUE,&pPageItem) )
+ sal_True,&pPageItem) )
{
const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem;
@@ -538,7 +538,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
{
rMaster.SetFmtAttr( *pItem );
}
- bChanged = TRUE;
+ bChanged = sal_True;
}
// die Groesse
@@ -548,7 +548,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
{
rMaster.SetFmtAttr( SwFmtFrmSize( ATT_FIX_SIZE, rPropInfo.nWidth,
rPropInfo.nHeight ) );
- bChanged = TRUE;
+ bChanged = sal_True;
}
else
{
@@ -557,7 +557,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
// wird das Landscape-Flag gesetzt und evtl. die Breite/Hoehe
// vertauscht.
SwFmtFrmSize aFrmSz( rMaster.GetFrmSize() );
- BOOL bLandscape = aNewPageDesc.GetLandscape();
+ sal_Bool bLandscape = aNewPageDesc.GetLandscape();
if( ( bLandscape &&
rPropInfo.eSizeType == SVX_CSS1_STYPE_PORTRAIT ) ||
( !bLandscape &&
@@ -568,18 +568,18 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
aFrmSz.SetWidth( nTmp );
rMaster.SetFmtAttr( aFrmSz );
aNewPageDesc.SetLandscape( !bLandscape );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
// Geht das wirklich?
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ) )
{
// eine Umrandung wird gesetzt
rMaster.SetFmtAttr( *pItem );
rItemSet.ClearItem( RES_BACKGROUND );
- bChanged = TRUE;
+ bChanged = sal_True;
}
if( bChanged )
@@ -674,7 +674,7 @@ static CSS1SelectorType GetTokenAndClass( const CSS1Selector *pSelector,
return eType;
}
-extern BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
+extern sal_Bool lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
static void RemoveScriptItems( SfxItemSet& rItemSet, sal_uInt16 nScript,
const SfxItemSet *pParentItemSet = 0 )
@@ -726,12 +726,12 @@ static void RemoveScriptItems( SfxItemSet& rItemSet, sal_uInt16 nScript,
}
}
-BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
+sal_Bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
SfxItemSet& rItemSet,
SvxCSS1PropertyInfo& rPropInfo )
{
if( !bIsNewDoc )
- return TRUE;
+ return sal_True;
CSS1SelectorType eSelType = pSelector->GetType();
const CSS1Selector *pNext = pSelector->GetNext();
@@ -775,7 +775,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( CSS1_SELTYPE_ELEMENT != eSelType &&
CSS1_SELTYPE_ELEM_CLASS != eSelType)
- return TRUE;
+ return sal_True;
// Token und Class zu dem Selektor holen
String aToken2, aClass;
@@ -796,7 +796,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( !pNext )
{
InsertTag( aToken2, rItemSet, rPropInfo );
- return FALSE;
+ return sal_False;
}
else if( pNext && CSS1_SELTYPE_PSEUDO == eNextType )
{
@@ -805,19 +805,19 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
String aPseudo( pNext->GetString() );
aPseudo.ToLowerAscii();
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
switch( aPseudo.GetChar( 0 ))
{
case 'l':
if( aPseudo.EqualsAscii(sCSS1_link) )
{
- bInsert = TRUE;
+ bInsert = sal_True;
}
break;
case 'v':
if( aPseudo.EqualsAscii(sCSS1_visited) )
{
- bInsert = TRUE;
+ bInsert = sal_True;
}
break;
}
@@ -835,7 +835,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
{
InsertTag( sTmp, rItemSet, rPropInfo );
}
- return FALSE;
+ return sal_False;
}
}
break;
@@ -847,7 +847,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
// Den Hintergrund muessen wir vor dem Setzen abfragen,
// denn in SetPageDescAttrs wird er geloescht.
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET==rItemSet.GetItemState(RES_BACKGROUND,FALSE,&pItem) )
+ if( SFX_ITEM_SET==rItemSet.GetItemState(RES_BACKGROUND,sal_False,&pItem) )
{
const SvxBrushItem *pBrushItem =
(const SvxBrushItem *)pItem;
@@ -855,9 +855,9 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
/// OD 02.09.2002 #99657#
/// Body has a background color, if it is not "no fill"/"auto fill"
if( pBrushItem->GetColor() != COL_TRANSPARENT )
- bBodyBGColorSet = TRUE;
+ bBodyBGColorSet = sal_True;
if( GPOS_NONE != pBrushItem->GetGraphicPos() )
- bBodyBackgroundSet = TRUE;
+ bBodyBackgroundSet = sal_True;
}
// Border and Padding
@@ -869,13 +869,13 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
// alle noch uebrigen Optionen koennen an der Standard-Vorlage
// gesetzt werden und gelten dann automatisch als defaults
- if( SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,FALSE) )
- bBodyTextSet = TRUE;
+ if( SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,sal_False) )
+ bBodyTextSet = sal_True;
SetTxtCollAttrs(
GetTxtCollFromPool( RES_POOLCOLL_STANDARD ),
rItemSet, rPropInfo, this );
- return FALSE;
+ return sal_False;
}
break;
}
@@ -884,7 +884,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
!pNext && aClass.Len() >= 9 &&
('s' == aClass.GetChar(0) || 'S' == aClass.GetChar(0)) )
{
- USHORT nPoolFmtId = 0;
+ sal_uInt16 nPoolFmtId = 0;
if( aClass.EqualsIgnoreCaseAscii(OOO_STRING_SVTOOLS_HTML_sdendnote_sym) )
nPoolFmtId = RES_POOLCHR_ENDNOTE;
else if( aClass.EqualsIgnoreCaseAscii(OOO_STRING_SVTOOLS_HTML_sdfootnote_sym) )
@@ -902,13 +902,13 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
SetCharFmtAttrs( GetCharFmtFromPool(nPoolFmtId),
aScriptItemSet);
}
- return FALSE;
+ return sal_False;
}
}
// Jetzt werden die Selektoren verarbeitet, die zu einer Absatz-Vorlage
// gehoehren
- USHORT nPoolCollId = 0;
+ sal_uInt16 nPoolCollId = 0;
switch( nToken2 )
{
case HTML_HEAD1_ON:
@@ -968,7 +968,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( CSS1_SELTYPE_ELEMENT==eSelType && !pNext )
{
InsertTag( aToken2, rItemSet, rPropInfo );
- return FALSE;
+ return sal_False;
}
else if( CSS1_SELTYPE_ELEMENT==eSelType && pNext &&
(CSS1_SELTYPE_ELEMENT==eNextType ||
@@ -985,7 +985,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( aClass.Len() || pNext )
{
- nPoolCollId = static_cast< USHORT >(
+ nPoolCollId = static_cast< sal_uInt16 >(
HTML_TABLEHEADER_ON == nToken2 ? RES_POOLCOLL_TABLE_HDLN
: RES_POOLCOLL_TABLE );
}
@@ -1006,7 +1006,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
InsertTag( sTmp, aScriptItemSet, rPropInfo );
}
- return FALSE;
+ return sal_False;
}
}
}
@@ -1049,7 +1049,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
const SfxPoolItem *pItem;
const SvxBoxItem *pBoxItem = 0;
if( SFX_ITEM_SET ==
- pColl->GetAttrSet().GetItemState(RES_BOX,TRUE,&pItem) )
+ pColl->GetAttrSet().GetItemState(RES_BOX,sal_True,&pItem) )
pBoxItem = (const SvxBoxItem *)pItem;
rPropInfo.SetBoxItem( rItemSet, MIN_BORDER_DIST, pBoxItem );
if( CSS1_SCRIPT_ALL == nScript && !pParentColl )
@@ -1114,18 +1114,18 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
}
}
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// Jetzt werden die Selektoten verarbeitet, die zu einer Zechenvorlage
// gehoehren. Zusammengesetzte gibt es hier allerdings nich nicht.
if( pNext )
- return TRUE;
+ return sal_True;
- SwCharFmt *pCFmt = GetChrFmt( static_cast< USHORT >(nToken2), aEmptyStr );
+ SwCharFmt *pCFmt = GetChrFmt( static_cast< sal_uInt16 >(nToken2), aEmptyStr );
if( pCFmt )
{
SwCharFmt *pParentCFmt = 0;
@@ -1139,7 +1139,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( !pCFmt )
{
pCFmt = pDoc->MakeCharFmt( aName, pParentCFmt );
- pCFmt->SetAuto( FALSE );
+ pCFmt->SetAuto( sal_False );
}
}
@@ -1154,13 +1154,13 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
pParentCFmt ? &pParentCFmt->GetAttrSet() : 0 );
SetCharFmtAttrs( pCFmt, aScriptItemSet );
}
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-sal_uInt32 SwCSS1Parser::GetFontHeight( USHORT nSize ) const
+sal_uInt32 SwCSS1Parser::GetFontHeight( sal_uInt16 nSize ) const
{
return aFontHeights[ nSize>6 ? 6 : nSize ];
}
@@ -1182,10 +1182,10 @@ const FontList *SwCSS1Parser::GetFontList() const
/* */
-SwCharFmt* SwCSS1Parser::GetChrFmt( USHORT nToken2, const String& rClass ) const
+SwCharFmt* SwCSS1Parser::GetChrFmt( sal_uInt16 nToken2, const String& rClass ) const
{
// die entsprechende Vorlage suchen
- USHORT nPoolId = 0;
+ sal_uInt16 nPoolId = 0;
const sal_Char* sName = 0;
switch( nToken2 )
{
@@ -1226,7 +1226,7 @@ SwCharFmt* SwCSS1Parser::GetChrFmt( USHORT nToken2, const String& rClass ) const
if( !pCFmt )
{
pCFmt = pDoc->MakeCharFmt( sCName, pDoc->GetDfltCharFmt() );
- pCFmt->SetAuto( FALSE );
+ pCFmt->SetAuto( sal_False );
}
}
@@ -1251,7 +1251,7 @@ SwCharFmt* SwCSS1Parser::GetChrFmt( USHORT nToken2, const String& rClass ) const
if( pClass )
{
pCFmt = pDoc->MakeCharFmt( aTmp, pCFmt );
- pCFmt->SetAuto( FALSE );
+ pCFmt->SetAuto( sal_False );
SfxItemSet aItemSet( pClass->GetItemSet() );
SetCharFmtAttrs( pCFmt, aItemSet );
}
@@ -1264,16 +1264,16 @@ SwCharFmt* SwCSS1Parser::GetChrFmt( USHORT nToken2, const String& rClass ) const
/* */
-SwTxtFmtColl *SwCSS1Parser::GetTxtCollFromPool( USHORT nPoolId ) const
+SwTxtFmtColl *SwCSS1Parser::GetTxtCollFromPool( sal_uInt16 nPoolId ) const
{
- USHORT nOldArrLen = pDoc->GetTxtFmtColls()->Count();
+ sal_uInt16 nOldArrLen = pDoc->GetTxtFmtColls()->Count();
SwTxtFmtColl *pColl = pDoc->GetTxtCollFromPool( nPoolId, false );
if( bIsNewDoc )
{
- USHORT nArrLen = pDoc->GetTxtFmtColls()->Count();
- for( USHORT i=nOldArrLen; i<nArrLen; i++ )
+ sal_uInt16 nArrLen = pDoc->GetTxtFmtColls()->Count();
+ for( sal_uInt16 i=nOldArrLen; i<nArrLen; i++ )
lcl_swcss1_setEncoding( *(*pDoc->GetTxtFmtColls())[i],
GetDfltEncoding() );
}
@@ -1281,17 +1281,17 @@ SwTxtFmtColl *SwCSS1Parser::GetTxtCollFromPool( USHORT nPoolId ) const
return pColl;
}
-SwCharFmt *SwCSS1Parser::GetCharFmtFromPool( USHORT nPoolId ) const
+SwCharFmt *SwCSS1Parser::GetCharFmtFromPool( sal_uInt16 nPoolId ) const
{
- USHORT nOldArrLen = pDoc->GetCharFmts()->Count();
+ sal_uInt16 nOldArrLen = pDoc->GetCharFmts()->Count();
SwCharFmt *pCharFmt = pDoc->GetCharFmtFromPool( nPoolId );
if( bIsNewDoc )
{
- USHORT nArrLen = pDoc->GetCharFmts()->Count();
+ sal_uInt16 nArrLen = pDoc->GetCharFmts()->Count();
- for( USHORT i=nOldArrLen; i<nArrLen; i++ )
+ for( sal_uInt16 i=nOldArrLen; i<nArrLen; i++ )
lcl_swcss1_setEncoding( *(*pDoc->GetCharFmts())[i],
GetDfltEncoding() );
}
@@ -1299,7 +1299,7 @@ SwCharFmt *SwCSS1Parser::GetCharFmtFromPool( USHORT nPoolId ) const
return pCharFmt;
}
-SwTxtFmtColl *SwCSS1Parser::GetTxtFmtColl( USHORT nTxtColl,
+SwTxtFmtColl *SwCSS1Parser::GetTxtFmtColl( sal_uInt16 nTxtColl,
const String& rClass )
{
SwTxtFmtColl* pColl = 0;
@@ -1366,7 +1366,7 @@ SwTxtFmtColl *SwCSS1Parser::GetTxtFmtColl( USHORT nTxtColl,
SfxItemSet aItemSet( pClass->GetItemSet() );
SvxCSS1PropertyInfo aPropInfo( pClass->GetPropertyInfo() );
aPropInfo.SetBoxItem( aItemSet, MIN_BORDER_DIST );
- BOOL bPositioned = MayBePositioned( pClass->GetPropertyInfo() );
+ sal_Bool bPositioned = MayBePositioned( pClass->GetPropertyInfo() );
if( bPositioned )
aItemSet.ClearItem( RES_BACKGROUND );
SetTxtCollAttrs( pColl, aItemSet, aPropInfo,
@@ -1387,9 +1387,9 @@ SwPageDesc *SwCSS1Parser::GetMasterPageDesc()
return pDoc->GetPageDescFromPool( RES_POOLPAGE_HTML, false );
}
-static SwPageDesc *FindPageDesc( SwDoc *pDoc, USHORT nPoolId, USHORT& rPage )
+static SwPageDesc *FindPageDesc( SwDoc *pDoc, sal_uInt16 nPoolId, sal_uInt16& rPage )
{
- USHORT nPageDescs = pDoc->GetPageDescCnt();
+ sal_uInt16 nPageDescs = pDoc->GetPageDescCnt();
for( rPage=0; rPage < nPageDescs &&
const_cast<const SwDoc *>(pDoc)->
GetPageDesc(rPage).GetPoolFmtId() != nPoolId; rPage++ )
@@ -1398,12 +1398,12 @@ static SwPageDesc *FindPageDesc( SwDoc *pDoc, USHORT nPoolId, USHORT& rPage )
return rPage < nPageDescs ? &pDoc->_GetPageDesc( rPage ) : 0;
}
-const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
+const SwPageDesc *SwCSS1Parser::GetPageDesc( sal_uInt16 nPoolId, sal_Bool bCreate )
{
if( RES_POOLPAGE_HTML == nPoolId )
return pDoc->GetPageDescFromPool( RES_POOLPAGE_HTML, false );
- USHORT nPage;
+ sal_uInt16 nPage;
const SwPageDesc *pPageDesc = FindPageDesc( pDoc, nPoolId, nPage );
if( !pPageDesc && bCreate )
{
@@ -1423,11 +1423,11 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
pPageDesc = FindPageDesc( pDoc, nPoolId, nPage );
ASSERT( pPageDesc==pNewPageDesc, "Seitenvorlage nicht gefunden" );
- pDoc->CopyPageDesc( *pMasterPageDesc, *pNewPageDesc, FALSE );
+ pDoc->CopyPageDesc( *pMasterPageDesc, *pNewPageDesc, sal_False );
// Die Vorlagen an ihren neuen Zweck anpassen.
const SwPageDesc *pFollow = 0;
- BOOL bSetFollowFollow = FALSE;
+ sal_Bool bSetFollowFollow = sal_False;
switch( nPoolId )
{
case RES_POOLPAGE_FIRST:
@@ -1442,7 +1442,7 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
// Wenn die linke Vorlage schon angelegt ist, passiert hier gar
// nichts. Sonst wird die linke Vorlage angelegt und sorgt auch
// fuer die richtige Verkettung mit der rechten Voralge.
- GetLeftPageDesc( TRUE );
+ GetLeftPageDesc( sal_True );
break;
case RES_POOLPAGE_LEFT:
@@ -1450,8 +1450,8 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
// Es findet aber keine Verkettung statt.
// Wenn schon eine erste Seitenvorlage existiert, wird die linke
// Vorlage die Folge-Vorlage der ersten Seite.
- pFollow = GetRightPageDesc( TRUE );
- bSetFollowFollow = TRUE;
+ pFollow = GetRightPageDesc( sal_True );
+ bSetFollowFollow = sal_True;
{
const SwPageDesc *pFirstPageDesc = GetFirstPageDesc();
if( pFirstPageDesc )
@@ -1484,8 +1484,8 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
}
-BOOL SwCSS1Parser::MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
- BOOL bAutoWidth )
+sal_Bool SwCSS1Parser::MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
+ sal_Bool bAutoWidth )
{
// abs-pos
// left/top none auto twip perc
@@ -1532,12 +1532,12 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
{
// die Anzahl der Zeilen entspricht in etwa einer %-Angabe
// fuer die Hoehe (was passiert mit absoluten Hoehen???)
- BYTE nLines = rDrop.GetLines();
+ sal_uInt8 nLines = rDrop.GetLines();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_CHRATR_FONTSIZE, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_CHRATR_FONTSIZE, sal_False, &pItem ) )
{
- USHORT nProp = ((const SvxFontHeightItem *)pItem)->GetProp();
- nLines = (BYTE)((nProp + 50) / 100);
+ sal_uInt16 nProp = ((const SvxFontHeightItem *)pItem)->GetProp();
+ nLines = (sal_uInt8)((nProp + 50) / 100);
if( nLines < 1 )
nLines = 1;
else if( nLines > MAX_DROPCAP_LINES )
@@ -1565,9 +1565,9 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
rDrop.GetLines() = nLines;
// ein rechter Rand wird der Abstand zum Text!
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, sal_False, &pItem ) )
{
- rDrop.GetDistance() = static_cast< USHORT >(
+ rDrop.GetDistance() = static_cast< sal_uInt16 >(
((const SvxLRSpaceItem *)pItem)->GetRight() );
rItemSet.ClearItem( RES_LR_SPACE );
}
@@ -1598,7 +1598,7 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
if( !pCFmt )
{
pCFmt = pDoc->MakeCharFmt( aName, pDoc->GetDfltCharFmt() );
- pCFmt->SetAuto( FALSE );
+ pCFmt->SetAuto( sal_False );
}
SetCharFmtAttrs( pCFmt, rItemSet );
@@ -1613,7 +1613,7 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
// CSS1-sezifisches des SwHTMLParsers
-_HTMLAttr **SwHTMLParser::GetAttrTabEntry( USHORT nWhich )
+_HTMLAttr **SwHTMLParser::GetAttrTabEntry( sal_uInt16 nWhich )
{
// den zu dem Item gehoehrenden Tabellen-Eintrag ermitteln ...
_HTMLAttr **ppAttr = 0;
@@ -1741,7 +1741,7 @@ void SwHTMLParser::NewStyle()
String sType;
const HTMLOptions *pOptions2 = GetOptions();
- for( USHORT i = pOptions2->Count(); i; )
+ for( sal_uInt16 i = pOptions2->Count(); i; )
{
const HTMLOption *pOption = (*pOptions2)[--i];
if( HTML_O_TYPE==pOption->GetToken() )
@@ -1754,7 +1754,7 @@ void SwHTMLParser::NewStyle()
void SwHTMLParser::EndStyle()
{
- bIgnoreRawData = FALSE;
+ bIgnoreRawData = sal_False;
if( aStyleSource.Len() )
{
@@ -1763,14 +1763,14 @@ void SwHTMLParser::EndStyle()
}
}
-BOOL SwHTMLParser::FileDownload( const String& rURL,
+sal_Bool SwHTMLParser::FileDownload( const String& rURL,
String& rStr )
{
// View wegschmeissen (wegen Reschedule)
ViewShell *pOldVSh = CallEndAction();
// Ein Medium anlegen
- SfxMedium aDLMedium( rURL, STREAM_READ | STREAM_SHARE_DENYWRITE, FALSE );
+ SfxMedium aDLMedium( rURL, STREAM_READ | STREAM_SHARE_DENYWRITE, sal_False );
// Medium registrieren, damit abgebrochen werden kann
if( pDoc->GetDocShell() )
@@ -1818,7 +1818,7 @@ BOOL SwHTMLParser::FileDownload( const String& rURL,
void SwHTMLParser::InsertLink()
{
- BOOL bFinishDownload = FALSE;
+ sal_Bool bFinishDownload = sal_False;
if( pPendStack )
{
ASSERT( ShouldFinishFileDownload(),
@@ -1829,14 +1829,14 @@ void SwHTMLParser::InsertLink()
pPendStack = pTmp;
ASSERT( !pPendStack, "Wo kommt der Pending-Stack her?" );
- bFinishDownload = TRUE;
+ bFinishDownload = sal_True;
}
else
{
String sRel, sHRef, sType;
const HTMLOptions *pOptions2 = GetOptions();
- for( USHORT i = pOptions2->Count(); i; )
+ for( sal_uInt16 i = pOptions2->Count(); i; )
{
const HTMLOption *pOption = (*pOptions2)[--i];
switch( pOption->GetToken() )
@@ -1865,7 +1865,7 @@ void SwHTMLParser::InsertLink()
{
// Der Style wurde synchron geladen und wir koennen
// es direkt aufrufen.
- bFinishDownload = TRUE;
+ bFinishDownload = sal_True;
}
else
{
@@ -1893,15 +1893,15 @@ void SwHTMLParser::InsertLink()
}
}
-BOOL SwCSS1Parser::ParseStyleSheet( const String& rIn )
+sal_Bool SwCSS1Parser::ParseStyleSheet( const String& rIn )
{
if( !SvxCSS1Parser::ParseStyleSheet( rIn ) )
- return FALSE;
+ return sal_False;
SwPageDesc *pMasterPageDesc =
pDoc->GetPageDescFromPool( RES_POOLPAGE_HTML, false );
- SvxCSS1MapEntry *pPageEntry = GetPage( aEmptyStr, FALSE );
+ SvxCSS1MapEntry *pPageEntry = GetPage( aEmptyStr, sal_False );
if( pPageEntry )
{
// @page (wirkt auf alle Seiten, die es schon gibt
@@ -1920,7 +1920,7 @@ BOOL SwCSS1Parser::ParseStyleSheet( const String& rIn )
pPageEntry->GetPropertyInfo() );
// if( pNamedPageDescs )
// {
-// for( USHORT i=0; i<pNamedPageDescs->Count(); i++ )
+// for( sal_uInt16 i=0; i<pNamedPageDescs->Count(); i++ )
// SetPageDescAttrs( (*pNamedPageDescs)[i],
// pPageEntry->GetItemSet(),
// pPageEntry->GetPropertyInfo() );
@@ -1928,29 +1928,29 @@ BOOL SwCSS1Parser::ParseStyleSheet( const String& rIn )
}
- pPageEntry = GetPage( String::CreateFromAscii(sCSS1_first), TRUE );
+ pPageEntry = GetPage( String::CreateFromAscii(sCSS1_first), sal_True );
if( pPageEntry )
{
- SetPageDescAttrs( GetFirstPageDesc(TRUE), pPageEntry->GetItemSet(),
+ SetPageDescAttrs( GetFirstPageDesc(sal_True), pPageEntry->GetItemSet(),
pPageEntry->GetPropertyInfo() );
- bSetFirstPageDesc = TRUE;
+ bSetFirstPageDesc = sal_True;
}
- pPageEntry = GetPage( String::CreateFromAscii(sCSS1_right), TRUE );
+ pPageEntry = GetPage( String::CreateFromAscii(sCSS1_right), sal_True );
if( pPageEntry )
{
- SetPageDescAttrs( GetRightPageDesc(TRUE), pPageEntry->GetItemSet(),
+ SetPageDescAttrs( GetRightPageDesc(sal_True), pPageEntry->GetItemSet(),
pPageEntry->GetPropertyInfo() );
- bSetRightPageDesc = TRUE;
+ bSetRightPageDesc = sal_True;
}
- pPageEntry = GetPage( String::CreateFromAscii(sCSS1_left), TRUE );
+ pPageEntry = GetPage( String::CreateFromAscii(sCSS1_left), sal_True );
if( pPageEntry )
- SetPageDescAttrs( GetLeftPageDesc(TRUE), pPageEntry->GetItemSet(),
+ SetPageDescAttrs( GetLeftPageDesc(sal_True), pPageEntry->GetItemSet(),
pPageEntry->GetPropertyInfo() );
// und jetzt noch die benannten Vorlagen
-// for( USHORT i=0; i < GetPageCount(); i++ )
+// for( sal_uInt16 i=0; i < GetPageCount(); i++ )
// {
// pPageEntry = GetPage( i );
// const String& rKey = pPageEntry->GetKey();
@@ -1959,7 +1959,7 @@ BOOL SwCSS1Parser::ParseStyleSheet( const String& rIn )
//
// String aName( rKey );
// GetpApp()->GetAppInternational().ToLower( aName );
-// USHORT nPage = pDoc->MakePageDesc( aName );
+// sal_uInt16 nPage = pDoc->MakePageDesc( aName );
// SwPageDesc *pPageDesc = &pDoc->_GetPageDesc( nPage );
//
// // Die neue Seitenvorlage entsteht aus dem Master durch kopieren.
@@ -1972,10 +1972,10 @@ BOOL SwCSS1Parser::ParseStyleSheet( const String& rIn )
// pNamedPageDescs->Insert( pPageDesc, pNamedPageDescs->Count() );
// }
- return TRUE;
+ return sal_True;
}
-BOOL SwHTMLParser::ParseStyleOptions( const String &rStyle,
+sal_Bool SwHTMLParser::ParseStyleOptions( const String &rStyle,
const String &rId,
const String &rClass,
SfxItemSet &rItemSet,
@@ -1983,7 +1983,7 @@ BOOL SwHTMLParser::ParseStyleOptions( const String &rStyle,
const String *pLang,
const String *pDir )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rClass.Len() )
{
@@ -1994,8 +1994,8 @@ BOOL SwHTMLParser::ParseStyleOptions( const String &rStyle,
{
pCSS1Parser->MergeStyles( pClass->GetItemSet(),
pClass->GetPropertyInfo(),
- rItemSet, rPropInfo, FALSE );
- bRet = TRUE;
+ rItemSet, rPropInfo, sal_False );
+ bRet = sal_True;
}
}
@@ -2007,13 +2007,13 @@ BOOL SwHTMLParser::ParseStyleOptions( const String &rStyle,
pId->GetPropertyInfo(),
rItemSet, rPropInfo, rClass.Len()!=0 );
rPropInfo.aId = rId;
- bRet = TRUE;
+ bRet = sal_True;
}
if( rStyle.Len() )
{
pCSS1Parser->ParseStyleOption( rStyle, rItemSet, rPropInfo );
- bRet = TRUE;
+ bRet = sal_True;
}
if( bRet )
@@ -2137,7 +2137,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
if( nCntnt )
pPam->Move( fnMoveForward );
- USHORT nLeftSpace = 0, nRightSpace = 0;
+ sal_uInt16 nLeftSpace = 0, nRightSpace = 0;
short nIndent = 0;
GetMarginsFromContextWithNumBul( nLeftSpace, nRightSpace, nIndent );
@@ -2165,15 +2165,15 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
void SwHTMLParser::SetVarSize( SfxItemSet & /*rItemSet*/,
SvxCSS1PropertyInfo &rPropInfo,
SfxItemSet &rFrmItemSet,
- SwTwips nDfltWidth, BYTE nDfltPrcWidth )
+ SwTwips nDfltWidth, sal_uInt8 nDfltPrcWidth )
{
SwFrmSize eSize = ATT_MIN_SIZE;
SwTwips nWidth = nDfltWidth, nHeight = MINFLY;
- BYTE nPrcWidth = nDfltPrcWidth, nPrcHeight = 0;
+ sal_uInt8 nPrcWidth = nDfltPrcWidth, nPrcHeight = 0;
switch( rPropInfo.eWidthType )
{
case SVX_CSS1_LTYPE_PERCENTAGE:
- nPrcWidth = rPropInfo.nWidth > 0 ? (BYTE)rPropInfo.nWidth : 1;
+ nPrcWidth = rPropInfo.nWidth > 0 ? (sal_uInt8)rPropInfo.nWidth : 1;
nWidth = MINFLY;
break;
case SVX_CSS1_LTYPE_TWIP:
@@ -2186,7 +2186,7 @@ void SwHTMLParser::SetVarSize( SfxItemSet & /*rItemSet*/,
switch( rPropInfo.eHeightType )
{
case SVX_CSS1_LTYPE_PERCENTAGE:
- nPrcHeight = rPropInfo.nHeight > 0 ? (BYTE)rPropInfo.nHeight : 1;
+ nPrcHeight = rPropInfo.nHeight > 0 ? (sal_uInt8)rPropInfo.nHeight : 1;
break;
case SVX_CSS1_LTYPE_TWIP:
// Netscape und MS-IE interpretieren die Hoehe regelwiedrig
@@ -2205,12 +2205,12 @@ void SwHTMLParser::SetVarSize( SfxItemSet & /*rItemSet*/,
void SwHTMLParser::SetFrmFmtAttrs( SfxItemSet &rItemSet,
SvxCSS1PropertyInfo & /*rPropInfo*/,
- USHORT nFlags,
+ sal_uInt16 nFlags,
SfxItemSet &rFrmItemSet )
{
const SfxPoolItem *pItem;
if( (nFlags & HTML_FF_BOX) != 0 &&
- SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, TRUE, &pItem ) )
+ SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, sal_True, &pItem ) )
{
if( (nFlags & HTML_FF_PADDING) == 0 )
{
@@ -2227,14 +2227,14 @@ void SwHTMLParser::SetFrmFmtAttrs( SfxItemSet &rItemSet,
}
if( (nFlags & HTML_FF_BACKGROUND) != 0 &&
- SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, TRUE, &pItem ) )
+ SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, sal_True, &pItem ) )
{
rFrmItemSet.Put( *pItem );
rItemSet.ClearItem( RES_BACKGROUND );
}
if( (nFlags & HTML_FF_DIRECTION) != 0 &&
- SFX_ITEM_SET==rItemSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem ) )
+ SFX_ITEM_SET==rItemSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem ) )
{
rFrmItemSet.Put( *pItem );
rItemSet.ClearItem( RES_FRAMEDIR );
@@ -2244,23 +2244,23 @@ void SwHTMLParser::SetFrmFmtAttrs( SfxItemSet &rItemSet,
/* */
-_HTMLAttrContext *SwHTMLParser::PopContext( USHORT nToken, USHORT nLimit,
- BOOL bRemove )
+_HTMLAttrContext *SwHTMLParser::PopContext( sal_uInt16 nToken, sal_uInt16 nLimit,
+ sal_Bool bRemove )
{
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
if( nPos <= nContextStMin )
return 0;
- BOOL bFound = 0==nToken;
+ sal_Bool bFound = 0==nToken;
if( nToken )
{
// Stack-Eintrag zu dem Token suchen
while( nPos > nContextStMin )
{
- USHORT nCntxtToken = aContexts[--nPos]->GetToken();
+ sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken();
if( nCntxtToken == nToken )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
else if( nCntxtToken == nLimit ) // 0 als Token kommt nicht vor
@@ -2285,16 +2285,16 @@ _HTMLAttrContext *SwHTMLParser::PopContext( USHORT nToken, USHORT nLimit,
return pCntxt;
}
-BOOL SwHTMLParser::GetMarginsFromContext( USHORT& nLeft,
- USHORT& nRight,
+sal_Bool SwHTMLParser::GetMarginsFromContext( sal_uInt16& nLeft,
+ sal_uInt16& nRight,
short& nIndent,
- BOOL bIgnoreTopContext ) const
+ sal_Bool bIgnoreTopContext ) const
{
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
if( bIgnoreTopContext )
{
if( !nPos )
- return FALSE;
+ return sal_False;
else
nPos--;
}
@@ -2305,22 +2305,22 @@ BOOL SwHTMLParser::GetMarginsFromContext( USHORT& nLeft,
if( pCntxt->IsLRSpaceChanged() )
{
pCntxt->GetMargins( nLeft, nRight, nIndent );
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SwHTMLParser::GetMarginsFromContextWithNumBul( USHORT& nLeft,
- USHORT& nRight,
+sal_Bool SwHTMLParser::GetMarginsFromContextWithNumBul( sal_uInt16& nLeft,
+ sal_uInt16& nRight,
short& nIndent ) const
{
- BOOL bRet = GetMarginsFromContext( nLeft, nRight, nIndent );
+ sal_Bool bRet = GetMarginsFromContext( nLeft, nRight, nIndent );
const SwHTMLNumRuleInfo& rInfo = ((SwHTMLParser*)this)->GetNumInfo();
if( rInfo.GetDepth() )
{
- BYTE nLevel = (BYTE)( (rInfo.GetDepth() <= MAXLEVEL ? rInfo.GetDepth()
+ sal_uInt8 nLevel = (sal_uInt8)( (rInfo.GetDepth() <= MAXLEVEL ? rInfo.GetDepth()
: MAXLEVEL) - 1 );
const SwNumFmt& rNumFmt = rInfo.GetNumRule()->Get(nLevel);
nLeft = nLeft + rNumFmt.GetAbsLSpace();
@@ -2330,13 +2330,13 @@ BOOL SwHTMLParser::GetMarginsFromContextWithNumBul( USHORT& nLeft,
return bRet;
}
-void SwHTMLParser::GetULSpaceFromContext( USHORT& nUpper,
- USHORT& nLower ) const
+void SwHTMLParser::GetULSpaceFromContext( sal_uInt16& nUpper,
+ sal_uInt16& nLower ) const
{
- USHORT nDfltColl = 0;
+ sal_uInt16 nDfltColl = 0;
String aDfltClass;
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
while( nPos > nContextStAttrMin )
{
const _HTMLAttrContext *pCntxt = aContexts[--nPos];
@@ -2363,10 +2363,10 @@ void SwHTMLParser::GetULSpaceFromContext( USHORT& nUpper,
nLower = rULSpace.GetLower();
}
-void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext, BOOL bRemove )
+void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext, sal_Bool bRemove )
{
_HTMLAttrs &rAttrs = pContext->GetAttrs();
- for( USHORT i=0; i<rAttrs.Count(); i++ )
+ for( sal_uInt16 i=0; i<rAttrs.Count(); i++ )
{
_HTMLAttr *pAttr = rAttrs[i];
@@ -2380,7 +2380,7 @@ void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext, BOOL bRemove )
pAttr->Invalidate();
else if( nChars > MAX_DROPCAP_CHARS )
nChars = MAX_DROPCAP_CHARS;
- ((SwFmtDrop&)pAttr->GetItem()).GetChars() = (BYTE)nChars;
+ ((SwFmtDrop&)pAttr->GetItem()).GetChars() = (sal_uInt8)nChars;
}
EndAttr( pAttr );
@@ -2398,7 +2398,7 @@ void SwHTMLParser::InsertParaAttrs( const SfxItemSet& rItemSet )
while( pItem )
{
// den zu dem Item gehoehrenden Tabellen-Eintrag ermitteln ...
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
_HTMLAttr **ppAttr = GetAttrTabEntry( nWhich );
if( ppAttr )
@@ -2407,7 +2407,7 @@ void SwHTMLParser::InsertParaAttrs( const SfxItemSet& rItemSet )
if( RES_PARATR_BEGIN > nWhich )
(*ppAttr)->SetLikePara();
aParaAttrs.Insert( *ppAttr, aParaAttrs.Count() );
- EndAttr( *ppAttr, 0, FALSE );
+ EndAttr( *ppAttr, 0, sal_False );
}
pItem = aIter.NextItem();
@@ -2420,12 +2420,12 @@ void lcl_swcss1_setEncoding( SwFmt& rFmt, rtl_TextEncoding eEnc )
return;
const SfxItemSet& rItemSet = rFmt.GetAttrSet();
- static USHORT aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
RES_CHRATR_CTL_FONT };
const SfxPoolItem *pItem;
- for( USHORT i=0; i<3; i++ )
+ for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], FALSE,&pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], sal_False,&pItem ) )
{
const SvxFontItem& rFont = *(const SvxFontItem *)pItem;
if( RTL_TEXTENCODING_SYMBOL != rFont.GetCharSet() )
@@ -2446,9 +2446,9 @@ void SwCSS1Parser::SetDfltEncoding( rtl_TextEncoding eEnc )
if( bIsNewDoc )
{
// Set new encoding as pool default
- static USHORT aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
RES_CHRATR_CTL_FONT };
- USHORT i;
+ sal_uInt16 i;
for( i=0; i<3; i++ )
{
const SvxFontItem& rDfltFont =
@@ -2462,7 +2462,7 @@ void SwCSS1Parser::SetDfltEncoding( rtl_TextEncoding eEnc )
}
// Change all paragraph styles that do specify a font.
- USHORT nArrLen = pDoc->GetTxtFmtColls()->Count();
+ sal_uInt16 nArrLen = pDoc->GetTxtFmtColls()->Count();
for( i=1; i<nArrLen; i++ )
lcl_swcss1_setEncoding( *(*pDoc->GetTxtFmtColls())[i], eEnc );
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index b3a62fe4d189..e60f6800cd58 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -62,28 +62,28 @@ class _HTMLAttrContext_SaveDoc
// wenn Attributierung nicht
// beibehalten werden soll.
- USHORT nContextStMin; // In Umgebung gueltige Stack-
+ sal_uInt16 nContextStMin; // In Umgebung gueltige Stack-
// Untergrenze, wenn der Stack
// geschuetzt werden soll.
- USHORT nContextStAttrMin; // In Umgebung gueltige Stack-
+ sal_uInt16 nContextStAttrMin; // In Umgebung gueltige Stack-
// Untergrenze, wenn die Attribute
// nicht beibehalten werden sollen.
- BOOL bStripTrailingPara : 1; // letzen Absatz entfernen?
- BOOL bKeepNumRules : 1; // Numerierung beibehalten?
- BOOL bPopStack : 1; // Stack-Elemente oberhalb des
+ sal_Bool bStripTrailingPara : 1; // letzen Absatz entfernen?
+ sal_Bool bKeepNumRules : 1; // Numerierung beibehalten?
+ sal_Bool bPopStack : 1; // Stack-Elemente oberhalb des
// zu schliessenden entfernen?
- BOOL bFixHeaderDist : 1;
- BOOL bFixFooterDist : 1;
+ sal_Bool bFixHeaderDist : 1;
+ sal_Bool bFixFooterDist : 1;
public:
_HTMLAttrContext_SaveDoc() :
pPos( 0 ), pAttrTab( 0 ),
nContextStMin( USHRT_MAX ), nContextStAttrMin( USHRT_MAX ),
- bStripTrailingPara( FALSE ), bKeepNumRules( FALSE ),
- bPopStack( FALSE ),
- bFixHeaderDist( FALSE ), bFixFooterDist( FALSE )
+ bStripTrailingPara( sal_False ), bKeepNumRules( sal_False ),
+ bPopStack( sal_False ),
+ bFixHeaderDist( sal_False ), bFixFooterDist( sal_False )
{}
~_HTMLAttrContext_SaveDoc() { delete pPos; delete pAttrTab; }
@@ -96,28 +96,28 @@ public:
void SetNumInfo( const SwHTMLNumRuleInfo& rInf ) { aNumRuleInfo.Set(rInf); }
const SwHTMLNumRuleInfo& GetNumInfo() const { return aNumRuleInfo; }
- _HTMLAttrTable *GetAttrTab( BOOL bCreate= FALSE );
+ _HTMLAttrTable *GetAttrTab( sal_Bool bCreate= sal_False );
- void SetContextStMin( USHORT nMin ) { nContextStMin = nMin; }
- USHORT GetContextStMin() const { return nContextStMin; }
+ void SetContextStMin( sal_uInt16 nMin ) { nContextStMin = nMin; }
+ sal_uInt16 GetContextStMin() const { return nContextStMin; }
- void SetContextStAttrMin( USHORT nMin ) { nContextStAttrMin = nMin; }
- USHORT GetContextStAttrMin() const { return nContextStAttrMin; }
+ void SetContextStAttrMin( sal_uInt16 nMin ) { nContextStAttrMin = nMin; }
+ sal_uInt16 GetContextStAttrMin() const { return nContextStAttrMin; }
- void SetStripTrailingPara( BOOL bSet ) { bStripTrailingPara = bSet; }
- BOOL GetStripTrailingPara() const { return bStripTrailingPara; }
+ void SetStripTrailingPara( sal_Bool bSet ) { bStripTrailingPara = bSet; }
+ sal_Bool GetStripTrailingPara() const { return bStripTrailingPara; }
- void SetKeepNumRules( BOOL bSet ) { bKeepNumRules = bSet; }
- BOOL GetKeepNumRules() const { return bKeepNumRules; }
+ void SetKeepNumRules( sal_Bool bSet ) { bKeepNumRules = bSet; }
+ sal_Bool GetKeepNumRules() const { return bKeepNumRules; }
- void SetFixHeaderDist( BOOL bSet ) { bFixHeaderDist = bSet; }
- BOOL GetFixHeaderDist() const { return bFixHeaderDist; }
+ void SetFixHeaderDist( sal_Bool bSet ) { bFixHeaderDist = bSet; }
+ sal_Bool GetFixHeaderDist() const { return bFixHeaderDist; }
- void SetFixFooterDist( BOOL bSet ) { bFixFooterDist = bSet; }
- BOOL GetFixFooterDist() const { return bFixFooterDist; }
+ void SetFixFooterDist( sal_Bool bSet ) { bFixFooterDist = bSet; }
+ sal_Bool GetFixFooterDist() const { return bFixFooterDist; }
};
-_HTMLAttrTable *_HTMLAttrContext_SaveDoc::GetAttrTab( BOOL bCreate )
+_HTMLAttrTable *_HTMLAttrContext_SaveDoc::GetAttrTab( sal_Bool bCreate )
{
if( !pAttrTab && bCreate )
{
@@ -129,7 +129,7 @@ _HTMLAttrTable *_HTMLAttrContext_SaveDoc::GetAttrTab( BOOL bCreate )
/* */
-_HTMLAttrContext_SaveDoc *_HTMLAttrContext::GetSaveDocContext( BOOL bCreate )
+_HTMLAttrContext_SaveDoc *_HTMLAttrContext::GetSaveDocContext( sal_Bool bCreate )
{
if( !pSaveDocContext && bCreate )
pSaveDocContext = new _HTMLAttrContext_SaveDoc;
@@ -160,12 +160,12 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
const SwNodeIndex& rNewSttPara = rNewPos.nNode;
xub_StrLen nNewSttCnt = rNewPos.nContent.GetIndex();
- BOOL bMoveBack = FALSE;
+ sal_Bool bMoveBack = sal_False;
// alle noch offenen Attribute beenden und hinter der Tabelle
// neu aufspannen
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; ++pTbl )
{
_HTMLAttr *pAttr = *pTbl;
@@ -174,7 +174,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
_HTMLAttr *pNext = pAttr->GetNext();
_HTMLAttr *pPrev = pAttr->GetPrev();
- USHORT nWhich = pAttr->pItem->Which();
+ sal_uInt16 nWhich = pAttr->pItem->Which();
if( !nOldEndCnt && RES_PARATR_BEGIN <= nWhich &&
pAttr->GetSttParaIdx() < pOldEndPara->GetIndex() )
{
@@ -208,7 +208,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
pNext->InsertPrev( pSetAttr );
else
{
- USHORT nTmp =
+ sal_uInt16 nTmp =
pSetAttr->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -222,7 +222,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
pNext->InsertPrev( pPrev );
else
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
}
@@ -244,10 +244,10 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
}
void SwHTMLParser::SaveDocContext( _HTMLAttrContext *pCntxt,
- USHORT nFlags,
+ sal_uInt16 nFlags,
const SwPosition *pNewPos )
{
- _HTMLAttrContext_SaveDoc *pSave = pCntxt->GetSaveDocContext( TRUE );
+ _HTMLAttrContext_SaveDoc *pSave = pCntxt->GetSaveDocContext( sal_True );
pSave->SetStripTrailingPara( (HTML_CNTXT_STRIP_PARA & nFlags) != 0 );
pSave->SetKeepNumRules( (HTML_CNTXT_KEEP_NUMRULE & nFlags) != 0 );
pSave->SetFixHeaderDist( (HTML_CNTXT_HEADER_DIST & nFlags) != 0 );
@@ -273,7 +273,7 @@ void SwHTMLParser::SaveDocContext( _HTMLAttrContext *pCntxt,
}
else
{
- _HTMLAttrTable *pSaveAttrTab = pSave->GetAttrTab( TRUE );
+ _HTMLAttrTable *pSaveAttrTab = pSave->GetAttrTab( sal_True );
SaveAttrTab( *pSaveAttrTab );
}
@@ -403,7 +403,7 @@ void SwHTMLParser::EndContext( _HTMLAttrContext *pContext )
void SwHTMLParser::ClearContext( _HTMLAttrContext *pContext )
{
_HTMLAttrs &rAttrs = pContext->GetAttrs();
- for( USHORT i=0; i<rAttrs.Count(); i++ )
+ for( sal_uInt16 i=0; i<rAttrs.Count(); i++ )
{
// einfaches Loeschen reicht hier nicht, weil das
// Attribut auch aus seiner Liste ausgetragen werden
@@ -435,11 +435,11 @@ void SwHTMLParser::ClearContext( _HTMLAttrContext *pContext )
/* */
-BOOL SwHTMLParser::DoPositioning( SfxItemSet &rItemSet,
+sal_Bool SwHTMLParser::DoPositioning( SfxItemSet &rItemSet,
SvxCSS1PropertyInfo &rPropInfo,
_HTMLAttrContext *pContext )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// Unter folgenden Umstaenden wird jetzt ein Rahmen aufgemacht:
// - das Tag wird absolut positioniert und left/top sind beide
@@ -470,20 +470,20 @@ BOOL SwHTMLParser::DoPositioning( SfxItemSet &rItemSet,
InsertFlyFrame( aFrmItemSet, pContext, rPropInfo.aId,
CONTEXT_FLAGS_ABSPOS );
- pContext->SetPopStack( TRUE );
+ pContext->SetPopStack( sal_True );
rPropInfo.aId.Erase();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-BOOL SwHTMLParser::CreateContainer( const String& rClass,
+sal_Bool SwHTMLParser::CreateContainer( const String& rClass,
SfxItemSet &rItemSet,
SvxCSS1PropertyInfo &rPropInfo,
_HTMLAttrContext *pContext )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rClass.EqualsIgnoreCaseAscii(sCSS1_class_abs_pos) &&
pCSS1Parser->MayBePositioned( rPropInfo ) )
{
@@ -495,13 +495,13 @@ BOOL SwHTMLParser::CreateContainer( const String& rClass,
SetAnchorAndAdjustment( text::VertOrientation::NONE, text::HoriOrientation::NONE,
rItemSet, rPropInfo, *pFrmItemSet );
Size aDummy(0,0);
- SetFixSize( aDummy, aDummy, FALSE, FALSE, rItemSet, rPropInfo,
+ SetFixSize( aDummy, aDummy, sal_False, sal_False, rItemSet, rPropInfo,
*pFrmItemSet );
SetSpace( aDummy, rItemSet, rPropInfo, *pFrmItemSet );
SetFrmFmtAttrs( rItemSet, rPropInfo, HTML_FF_BOX|HTML_FF_BACKGROUND|HTML_FF_DIRECTION,
*pFrmItemSet );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -512,7 +512,7 @@ BOOL SwHTMLParser::CreateContainer( const String& rClass,
void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
SvxCSS1PropertyInfo &rPropInfo,
_HTMLAttrContext *pContext,
- BOOL bCharLvl )
+ sal_Bool bCharLvl )
{
// Ein DropCap-Attribut basteln, wenn auf Zeichen-Ebene vor dem
// ersten Zeichen ein float: left vorkommt
@@ -566,16 +566,16 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
// die bisherigen Absatz-Abstaende holen (ohne die vom
// obersten Kontext, denn den veraendern wir ja gerade) ...
- USHORT nOldLeft = 0, nOldRight = 0;
+ sal_uInt16 nOldLeft = 0, nOldRight = 0;
short nOldIndent = 0;
- BOOL bIgnoreTop = aContexts.Count() > nContextStMin &&
+ sal_Bool bIgnoreTop = aContexts.Count() > nContextStMin &&
aContexts[aContexts.Count()-1] == pContext;
GetMarginsFromContext( nOldLeft, nOldRight, nOldIndent,
bIgnoreTop );
// und noch die aktuell gueltigen
- USHORT nLeft = nOldLeft, nRight = nOldRight;
+ sal_uInt16 nLeft = nOldLeft, nRight = nOldRight;
short nIndent = nOldIndent;
pContext->GetMargins( nLeft, nRight, nIndent );
@@ -594,7 +594,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
-rPropInfo.nLeftMargin > nOldLeft )
nLeft = 0;
else
- nLeft = nOldLeft + static_cast< USHORT >(rPropInfo.nLeftMargin);
+ nLeft = nOldLeft + static_cast< sal_uInt16 >(rPropInfo.nLeftMargin);
}
if( rPropInfo.bRightMargin )
{
@@ -605,7 +605,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
-rPropInfo.nRightMargin > nOldRight )
nRight = 0;
else
- nRight = nOldRight + static_cast< USHORT >(rPropInfo.nRightMargin);
+ nRight = nOldRight + static_cast< sal_uInt16 >(rPropInfo.nRightMargin);
}
if( rPropInfo.bTextIndent )
nIndent = pLRItem->GetTxtFirstLineOfst();
@@ -619,14 +619,14 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
aLRItem.SetTxtLeft( nLeft );
aLRItem.SetRight( nRight );
NewAttr( &aAttrTab.pLRSpace, aLRItem );
- EndAttr( aAttrTab.pLRSpace, 0, FALSE );
+ EndAttr( aAttrTab.pLRSpace, 0, sal_False );
}
break;
case RES_UL_SPACE:
if( !rPropInfo.bTopMargin || !rPropInfo.bBottomMargin )
{
- USHORT nUpper = 0, nLower = 0;
+ sal_uInt16 nUpper = 0, nLower = 0;
GetULSpaceFromContext( nUpper, nLower );
SvxULSpaceItem aULSpace( *((const SvxULSpaceItem *)pItem) );
if( !rPropInfo.bTopMargin )
@@ -729,15 +729,15 @@ void SwHTMLParser::InsertAttr( _HTMLAttr **ppAttr, const SfxPoolItem & rItem,
void SwHTMLParser::SplitPREListingXMP( _HTMLAttrContext *pCntxt )
{
// PRE/Listing/XMP soll beim beenden des Kontexts beendet werden.
- pCntxt->SetFinishPREListingXMP( TRUE );
+ pCntxt->SetFinishPREListingXMP( sal_True );
// Und die jetzt gueltigen Flags sollen wieder gesetzt werden.
if( IsReadPRE() )
- pCntxt->SetRestartPRE( TRUE );
+ pCntxt->SetRestartPRE( sal_True );
if( IsReadXMP() )
- pCntxt->SetRestartXMP( TRUE );
+ pCntxt->SetRestartXMP( sal_True );
if( IsReadListing() )
- pCntxt->SetRestartListing( TRUE );
+ pCntxt->SetRestartListing( sal_True );
// PRE/Listing/XMP wird auuserdem sofort beendet
FinishPREListingXMP();
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index 28fd4124bf05..1419f771fe71 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -205,9 +205,9 @@ static HTMLOptionEnum __FAR_DATA aHTMLFileNameFldFmtTable[] =
/* */
-USHORT SwHTMLParser::GetNumType( const String& rStr, USHORT nDfltType )
+sal_uInt16 SwHTMLParser::GetNumType( const String& rStr, sal_uInt16 nDfltType )
{
- USHORT nType = nDfltType;
+ sal_uInt16 nType = nDfltType;
const HTMLOptionEnum *pOptEnums = aHTMLPageNumFldFmtTable;
while( pOptEnums->pName )
if( !rStr.EqualsIgnoreCaseAscii( pOptEnums->pName ) )
@@ -224,14 +224,14 @@ USHORT SwHTMLParser::GetNumType( const String& rStr, USHORT nDfltType )
void SwHTMLParser::NewField()
{
- BOOL bKnownType = FALSE, bFixed = FALSE,
- bHasNumFmt = FALSE, bHasNumValue = FALSE;
- USHORT nType = 0;
+ sal_Bool bKnownType = sal_False, bFixed = sal_False,
+ bHasNumFmt = sal_False, bHasNumValue = sal_False;
+ sal_uInt16 nType = 0;
String aValue, aNumFmt, aNumValue, aName;
const HTMLOption *pSubOption=0, *pFmtOption=0;
const HTMLOptions *pHTMLOptions = GetOptions();
- USHORT i;
+ sal_uInt16 i;
for( i = pHTMLOptions->Count(); i; )
{
@@ -255,14 +255,14 @@ void SwHTMLParser::NewField()
break;
case HTML_O_SDNUM:
aNumFmt = pOption->GetString();
- bHasNumFmt = TRUE;
+ bHasNumFmt = sal_True;
break;
case HTML_O_SDVAL:
aNumValue = pOption->GetString();
- bHasNumValue = TRUE;
+ bHasNumValue = sal_True;
break;
case HTML_O_SDFIXED:
- bFixed = TRUE;
+ bFixed = sal_True;
break;
}
}
@@ -292,29 +292,29 @@ void SwHTMLParser::NewField()
const String& rCreated = xDocProps->getAuthor();
if( !rUser.Len() ||
(rChanged.Len() ? rUser != rChanged : rUser != rCreated) )
- bFixed = TRUE;
+ bFixed = sal_True;
}
}
- USHORT nWhich = nType;
+ sal_uInt16 nWhich = nType;
if( RES_DATEFLD==nType || RES_TIMEFLD==nType )
nWhich = RES_DATETIMEFLD;
SwFieldType* pType = pDoc->GetSysFldType( nWhich );
SwField *pFld = 0;
- BOOL bInsOnEndTag = FALSE;
+ sal_Bool bInsOnEndTag = sal_False;
switch( (RES_FIELDS)nType )
{
case RES_EXTUSERFLD:
if( pSubOption )
{
- USHORT nSub;
- ULONG nFmt = 0;
+ sal_uInt16 nSub;
+ sal_uLong nFmt = 0;
if( bFixed )
{
nFmt |= AF_FIXED;
- bInsOnEndTag = TRUE;
+ bInsOnEndTag = sal_True;
}
if( pSubOption->GetEnum( nSub, aHTMLExtUsrFldSubTable ) )
pFld = new SwExtUserField( (SwExtUserFieldType*)pType,
@@ -324,13 +324,13 @@ void SwHTMLParser::NewField()
case RES_AUTHORFLD:
{
- USHORT nFmt = AF_NAME;
+ sal_uInt16 nFmt = AF_NAME;
if( pFmtOption )
pFmtOption->GetEnum( nFmt, aHTMLAuthorFldFmtTable );
if( bFixed )
{
nFmt |= AF_FIXED;
- bInsOnEndTag = TRUE;
+ bInsOnEndTag = sal_True;
}
pFld = new SwAuthorField( (SwAuthorFieldType *)pType, nFmt );
@@ -340,10 +340,10 @@ void SwHTMLParser::NewField()
case RES_DATEFLD:
case RES_TIMEFLD:
{
- ULONG nNumFmt = 0;
- ULONG nTime = Time().GetTime(), nDate = Date().GetDate();
- USHORT nSub = 0;
- BOOL bValidFmt = FALSE;
+ sal_uLong nNumFmt = 0;
+ sal_uLong nTime = Time().GetTime(), nDate = Date().GetDate();
+ sal_uInt16 nSub = 0;
+ sal_Bool bValidFmt = sal_False;
HTMLNumFmtTblEntry * pFmtTbl;
if( RES_DATEFLD==nType )
@@ -351,14 +351,14 @@ void SwHTMLParser::NewField()
nSub = DATEFLD;
pFmtTbl = aHTMLDateFldFmtTable;
if( aValue.Len() )
- nDate = (ULONG)aValue.ToInt32();
+ nDate = (sal_uLong)aValue.ToInt32();
}
else
{
nSub = TIMEFLD;
pFmtTbl = aHTMLTimeFldFmtTable;
if( aValue.Len() )
- nTime = (ULONG)aValue.ToInt32();
+ nTime = (sal_uLong)aValue.ToInt32();
}
if( aValue.Len() )
nSub |= FIXEDFLD;
@@ -367,13 +367,13 @@ void SwHTMLParser::NewField()
if( pFmtOption )
{
const String& rFmt = pFmtOption->GetString();
- for( USHORT k = 0; pFmtTbl[k].pName; k++ )
+ for( sal_uInt16 k = 0; pFmtTbl[k].pName; k++ )
{
if( rFmt.EqualsIgnoreCaseAscii( pFmtTbl[k].pName ) )
{
nNumFmt = pFormatter->GetFormatIndex(
pFmtTbl[k].eFmt, LANGUAGE_SYSTEM);
- bValidFmt = TRUE;
+ bValidFmt = sal_True;
break;
}
}
@@ -393,7 +393,7 @@ void SwHTMLParser::NewField()
case RES_DATETIMEFLD:
if( bHasNumFmt )
{
- USHORT nSub = 0;
+ sal_uInt16 nSub = 0;
SvNumberFormatter *pFormatter = pDoc->GetNumberFormatter();
sal_uInt32 nNumFmt;
@@ -424,10 +424,10 @@ void SwHTMLParser::NewField()
case RES_PAGENUMBERFLD:
if( pSubOption )
{
- USHORT nSub;
+ sal_uInt16 nSub;
if( pSubOption->GetEnum( nSub, aHTMLPageNumFldSubTable ) )
{
- USHORT nFmt = SVX_NUM_PAGEDESC;
+ sal_uInt16 nFmt = SVX_NUM_PAGEDESC;
if( pFmtOption )
pFmtOption->GetEnum( nFmt, aHTMLPageNumFldFmtTable );
@@ -454,10 +454,10 @@ void SwHTMLParser::NewField()
case RES_DOCINFOFLD:
if( pSubOption )
{
- USHORT nSub;
+ sal_uInt16 nSub;
if( pSubOption->GetEnum( nSub, aHTMLDocInfoFldSubTable ) )
{
- USHORT nExtSub = 0;
+ sal_uInt16 nExtSub = 0;
if( DI_CREATE==(SwDocInfoSubType)nSub ||
DI_CHANGE==(SwDocInfoSubType)nSub )
{
@@ -478,7 +478,7 @@ void SwHTMLParser::NewField()
bFixed &= bHasNumValue;
}
else
- bHasNumValue = FALSE;
+ bHasNumValue = sal_False;
if( nSub >= DI_INFO1 && nSub <= DI_INFO4 && aName.Len() == 0 )
{
@@ -491,7 +491,7 @@ void SwHTMLParser::NewField()
if( bFixed )
{
nSub |= DI_SUB_FIXED;
- bInsOnEndTag = TRUE;
+ bInsOnEndTag = sal_True;
}
pFld = new SwDocInfoField( (SwDocInfoFieldType *)pType,
@@ -505,10 +505,10 @@ void SwHTMLParser::NewField()
case RES_DOCSTATFLD:
if( pSubOption )
{
- USHORT nSub;
+ sal_uInt16 nSub;
if( pSubOption->GetEnum( nSub, aHTMLDocStatFldSubTable ) )
{
- USHORT nFmt = SVX_NUM_ARABIC;
+ sal_uInt16 nFmt = SVX_NUM_ARABIC;
if( pFmtOption )
pFmtOption->GetEnum( nFmt, aHTMLPageNumFldFmtTable );
pFld = new SwDocStatField( (SwDocStatFieldType *)pType,
@@ -520,13 +520,13 @@ void SwHTMLParser::NewField()
case RES_FILENAMEFLD:
{
- USHORT nFmt = FF_NAME;
+ sal_uInt16 nFmt = FF_NAME;
if( pFmtOption )
pFmtOption->GetEnum( nFmt, aHTMLFileNameFldFmtTable );
if( bFixed )
{
nFmt |= FF_FIXED;
- bInsOnEndTag = TRUE;
+ bInsOnEndTag = sal_True;
}
pFld = new SwFileNameField( (SwFileNameFieldType *)pType, nFmt );
@@ -547,7 +547,7 @@ void SwHTMLParser::NewField()
pDoc->InsertPoolItem( *pPam, SwFmtFld(*pFld), 0 );
delete pFld;
}
- bInField = TRUE;
+ bInField = sal_True;
}
}
@@ -587,7 +587,7 @@ void SwHTMLParser::EndField()
pField = 0;
}
- bInField = FALSE;
+ bInField = sal_False;
aContents.Erase();
}
@@ -602,7 +602,7 @@ void SwHTMLParser::InsertFieldText()
void SwHTMLParser::InsertCommentText( const sal_Char *pTag )
{
- BOOL bEmpty = aContents.Len() == 0;
+ sal_Bool bEmpty = aContents.Len() == 0;
if( !bEmpty )
aContents += '\n';
@@ -632,14 +632,14 @@ void SwHTMLParser::InsertComment( const String& rComment, const sal_Char *pTag )
// weniger Probleme beim Formatieren (bug #40483#)
xub_StrLen nPos = pPam->GetPoint()->nContent.GetIndex();
SwTxtNode *pTxtNd = pPam->GetNode()->GetTxtNode();
- BOOL bMoveFwd = FALSE;
+ sal_Bool bMoveFwd = sal_False;
if( nPos>0 && pTxtNd && ' '==pTxtNd->GetTxt().GetChar(nPos-1) )
{
- bMoveFwd = TRUE;
+ bMoveFwd = sal_True;
- ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
xub_StrLen nIdx = pPam->GetPoint()->nContent.GetIndex();
- for( USHORT i = aSetAttrTab.Count(); i > 0; )
+ for( sal_uInt16 i = aSetAttrTab.Count(); i > 0; )
{
_HTMLAttr *pAttr = aSetAttrTab[--i];
if( pAttr->GetSttParaIdx() != nNodeIdx ||
@@ -650,7 +650,7 @@ void SwHTMLParser::InsertComment( const String& rComment, const sal_Char *pTag )
RES_SCRIPTFLD == ((const SwFmtFld *)pAttr->pItem)->GetFld()
->GetTyp()->Which() )
{
- bMoveFwd = FALSE;
+ bMoveFwd = sal_False;
break;
}
}
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index 6b905e450dee..177d39dc5d4b 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -47,7 +47,7 @@
using namespace nsSwDocInfoSubType;
-const sal_Char *SwHTMLWriter::GetNumFormat( USHORT nFmt )
+const sal_Char *SwHTMLWriter::GetNumFormat( sal_uInt16 nFmt )
{
const sal_Char *pFmtStr = 0;
@@ -70,24 +70,24 @@ const sal_Char *SwHTMLWriter::GetNumFormat( USHORT nFmt )
return pFmtStr;
}
-extern BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
+extern sal_Bool lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
const SwTxtNode& rTxtNd, xub_StrLen nFldPos )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFieldType* pFldTyp = pFld->GetTyp();
- USHORT nField = pFldTyp->Which();
- ULONG nFmt = pFld->GetFormat();
+ sal_uInt16 nField = pFldTyp->Which();
+ sal_uLong nFmt = pFld->GetFormat();
const sal_Char *pTypeStr=0, // TYPE
*pSubStr=0, // SUBTYPE
*pFmtStr=0; // FORMAT (SW)
String aValue; // VALUE (SW)
- BOOL bNumFmt=FALSE; // SDNUM (Number-Formatter-Format)
- BOOL bNumValue=FALSE; // SDVAL (Number-Formatter-Value)
+ sal_Bool bNumFmt=sal_False; // SDNUM (Number-Formatter-Format)
+ sal_Bool bNumValue=sal_False; // SDVAL (Number-Formatter-Value)
double dNumValue = 0.0; // SDVAL (Number-Formatter-Value)
- BOOL bFixed=FALSE; // SDFIXED
+ sal_Bool bFixed=sal_False; // SDFIXED
String aName; // NAME (CUSTOM)
switch( nField )
@@ -131,10 +131,10 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
case RES_DATETIMEFLD:
pTypeStr = OOO_STRING_SW_HTML_FT_datetime;
- bNumFmt = TRUE;
+ bNumFmt = sal_True;
if( ((SwDateTimeField*)pFld)->IsFixed() )
{
- bNumValue = TRUE;
+ bNumValue = sal_True;
dNumValue = ((SwDateTimeField*)pFld)->GetValue();
}
break;
@@ -171,9 +171,9 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
break;
case RES_DOCINFOFLD:
{
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
pTypeStr = OOO_STRING_SW_HTML_FT_docinfo;
- USHORT nExtSubType = nSubType & 0x0f00;
+ sal_uInt16 nExtSubType = nSubType & 0x0f00;
nSubType &= 0x00ff;
switch( nSubType )
@@ -201,11 +201,11 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
break;
case DI_SUB_TIME:
pFmtStr = OOO_STRING_SW_HTML_FF_time;
- bNumFmt = TRUE;
+ bNumFmt = sal_True;
break;
case DI_SUB_DATE:
pFmtStr = OOO_STRING_SW_HTML_FF_date;
- bNumFmt = TRUE;
+ bNumFmt = sal_True;
break;
}
}
@@ -218,13 +218,13 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
// Fixe Felder ohne Zahlenformate sollte es
// eigentlich nicht geben. ASSERT ist unten.
dNumValue = ((const SwDocInfoField*)pFld)->GetValue();
- bNumValue = TRUE;
+ bNumValue = sal_True;
}
else if( !nFmt )
{
// Nicht fixe Felder muessen kein Zahlenformat haben,
// wenn sie aus 4.0-Dokumenten stammen.
- bNumFmt = FALSE;
+ bNumFmt = sal_False;
}
}
}
@@ -233,7 +233,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
case RES_DOCSTATFLD:
{
pTypeStr = OOO_STRING_SW_HTML_FT_docstat;
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
switch( nSubType )
{
case DS_PAGE: pSubStr = OOO_STRING_SW_HTML_FS_page; break;
@@ -374,7 +374,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
case CSS1_OUTMODE_CTL: pWhichIds = aCTLWhichIds; break;
}
- rHTMLWrt.bTagOn = TRUE;
+ rHTMLWrt.bTagOn = sal_True;
const SfxPoolItem *aItems[5];
sal_uInt16 nItems = 0;
for( sal_uInt16 i=0; i<4; i++ )
@@ -395,7 +395,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
HTMLOutFuncs::Out_String( rWrt.Strm(), sExpand.Copy( nPos, nEndPos ),
rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- rHTMLWrt.bTagOn = FALSE;
+ rHTMLWrt.bTagOn = sal_False;
while( nItems )
Out( aHTMLAttrFnTab, *aItems[--nItems], rHTMLWrt );
@@ -417,7 +417,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
// Off-Tag ausgeben
if( pTypeStr )
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_sdfield, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_sdfield, sal_False );
return rWrt;
}
@@ -432,9 +432,9 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
if( RES_SETEXPFLD == pFldTyp->Which() &&
(nsSwGetSetExpType::GSE_STRING & pFld->GetSubType()) )
{
- int bOn = FALSE;
+ int bOn = sal_False;
if( pFldTyp->GetName().EqualsAscii("HTML_ON" ) )
- bOn = TRUE;
+ bOn = sal_True;
else if( !pFldTyp->GetName().EqualsAscii( "HTML_OFF" ) )
return rWrt;
@@ -453,7 +453,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
// Kommentare werden im ANSI-Zeichensetz, aber mit System-Zeilen-
// Umbruechen gesschrieben.
const String& rComment = pFld->GetPar2();
- BOOL bWritten = FALSE;
+ sal_Bool bWritten = sal_False;
if( (rComment.Len() >= 6 && '<' == rComment.GetChar(0) &&
'>' == rComment.GetChar(rComment.Len()-1) &&
@@ -469,7 +469,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
// characters not contained in the destination encoding are lost!
ByteString sTmp( sComment, ((SwHTMLWriter&)rWrt).eDestEnc );
rWrt.Strm() << sTmp.GetBuffer();
- bWritten = TRUE;
+ bWritten = sal_True;
}
else if( rComment.Len() >= 7 &&
'>' == rComment.GetChar(rComment.Len()-1) &&
@@ -485,7 +485,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
// lost!
ByteString sTmp( sComment, ((SwHTMLWriter&)rWrt).eDestEnc );
rWrt.Strm() << sTmp.GetBuffer();
- bWritten = TRUE;
+ bWritten = sal_True;
}
}
@@ -507,9 +507,9 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
- BOOL bURL = ((const SwScriptField *)pFld)->IsCodeURL();
+ sal_Bool bURL = ((const SwScriptField *)pFld)->IsCodeURL();
const String& rType = pFld->GetPar1();
String aContents, aURL;
if(bURL)
@@ -523,7 +523,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
aURL, 0, 0, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
}
else
{
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 24875b456565..9fcf12461db4 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -77,25 +77,25 @@ using namespace ::com::sun::star;
////////////////////////////////////////////////////////////
-const ULONG HTML_FRMOPTS_IMG_ALL =
+const sal_uLong HTML_FRMOPTS_IMG_ALL =
HTML_FRMOPT_ALT |
HTML_FRMOPT_SIZE |
HTML_FRMOPT_ANYSIZE |
HTML_FRMOPT_BORDER |
HTML_FRMOPT_NAME;
-const ULONG HTML_FRMOPTS_IMG_CNTNR =
+const sal_uLong HTML_FRMOPTS_IMG_CNTNR =
HTML_FRMOPTS_IMG_ALL |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_IMG =
+const sal_uLong HTML_FRMOPTS_IMG =
HTML_FRMOPTS_IMG_ALL |
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SPACE |
HTML_FRMOPT_BRCLEAR;
-const ULONG HTML_FRMOPTS_IMG_CSS1 =
+const sal_uLong HTML_FRMOPTS_IMG_CSS1 =
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SPACE;
-const ULONG HTML_FRMOPTS_DIV =
+const sal_uLong HTML_FRMOPTS_DIV =
HTML_FRMOPT_ID |
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SIZE |
@@ -107,22 +107,22 @@ const ULONG HTML_FRMOPTS_DIV =
HTML_FRMOPT_BRCLEAR |
HTML_FRMOPT_DIR;
-const ULONG HTML_FRMOPTS_MULTICOL =
+const sal_uLong HTML_FRMOPTS_MULTICOL =
HTML_FRMOPT_ID |
HTML_FRMOPT_WIDTH |
HTML_FRMOPT_ANYSIZE |
HTML_FRMOPT_ABSSIZE |
HTML_FRMOPT_DIR;
-const ULONG HTML_FRMOPTS_MULTICOL_CNTNR =
+const sal_uLong HTML_FRMOPTS_MULTICOL_CNTNR =
HTML_FRMOPTS_MULTICOL;
-const ULONG HTML_FRMOPTS_MULTICOL_CSS1 =
+const sal_uLong HTML_FRMOPTS_MULTICOL_CSS1 =
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SIZE |
HTML_FRMOPT_S_SPACE |
HTML_FRMOPT_S_BORDER|
HTML_FRMOPT_S_BACKGROUND;
-const ULONG HTML_FRMOPTS_SPACER =
+const sal_uLong HTML_FRMOPTS_SPACER =
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SIZE |
HTML_FRMOPT_ANYSIZE |
@@ -130,7 +130,7 @@ const ULONG HTML_FRMOPTS_SPACER =
HTML_FRMOPT_MARGINSIZE |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_CNTNR =
+const sal_uLong HTML_FRMOPTS_CNTNR =
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SPACE |
HTML_FRMOPT_S_WIDTH |
@@ -141,15 +141,15 @@ const ULONG HTML_FRMOPTS_CNTNR =
static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt );
static Writer& OutHTML_FrmFmtAsMulticol( Writer& rWrt, const SwFrmFmt& rFmt,
- BOOL bInCntnr );
+ sal_Bool bInCntnr );
static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFmt );
static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
- const SwFrmFmt& rFrmFmt, BOOL bSpan );
+ const SwFrmFmt& rFrmFmt, sal_Bool bSpan );
static Writer& OutHTML_FrmFmtAsImage( Writer& rWrt, const SwFrmFmt& rFmt,
- BOOL bInCntnr );
+ sal_Bool bInCntnr );
static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFmt,
- BOOL bInCntnr );
+ sal_Bool bInCntnr );
static Writer& OutHTML_FrmFmtAsMarquee( Writer& rWrt, const SwFrmFmt& rFrmFmt,
const SdrObject& rSdrObj );
@@ -176,7 +176,7 @@ static HTMLOutEvent __FAR_DATA aIMapEventTable[] =
SV_IMPL_OP_PTRARR_SORT( SwHTMLPosFlyFrms, SwHTMLPosFlyFrmPtr )
-USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
+sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
const SdrObject*& rpSdrObj )
{
SwHTMLFrmType eType;
@@ -212,7 +212,7 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
eType = HTML_FRMTYPE_TEXT;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
const SwNode* pNd = pDoc->GetNodes()[ nStt ];
if( pNd->IsGrfNode() )
@@ -227,12 +227,12 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
}
else
{
- ULONG nEnd = pDoc->GetNodes()[nStt-1]->EndOfSectionIndex();
+ sal_uLong nEnd = pDoc->GetNodes()[nStt-1]->EndOfSectionIndex();
const SfxPoolItem* pItem;
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
if( SFX_ITEM_SET == rItemSet.GetItemState( RES_COL,
- TRUE, &pItem ) &&
+ sal_True, &pItem ) &&
((const SwFmtCol *)pItem)->GetNumCols() > 1 )
{
// spaltiger Rahmen
@@ -241,7 +241,7 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
else if( pNd->IsTableNode() )
{
const SwTableNode *pTblNd = pNd->GetTableNode();
- ULONG nTblEnd = pTblNd->EndOfSectionIndex();
+ sal_uLong nTblEnd = pTblNd->EndOfSectionIndex();
if( nTblEnd+1 == nEnd )
{
@@ -258,17 +258,17 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
{
const SwTxtNode *pTxtNd = pNd->GetTxtNode();
- BOOL bEmpty = FALSE;
+ sal_Bool bEmpty = sal_False;
if( nStt==nEnd-1 && !pTxtNd->Len() )
{
// leerer Rahmen? Nur wenn kein Rahmen am
// Text- oder Start-Node verankert ist.
- bEmpty = TRUE;
+ bEmpty = sal_True;
if( pHTMLPosFlyFrms )
{
- for( USHORT i=0; i<pHTMLPosFlyFrms->Count(); i++ )
+ for( sal_uInt16 i=0; i<pHTMLPosFlyFrms->Count(); i++ )
{
- ULONG nIdx = (*pHTMLPosFlyFrms)[i]
+ sal_uLong nIdx = (*pHTMLPosFlyFrms)[i]
->GetNdIndex().GetIndex();
bEmpty = (nIdx != nStt) && (nIdx != nStt-1);
if( !bEmpty || nIdx > nStt )
@@ -284,7 +284,7 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
/// or its background color is not "no fill"/"auto fill".
if( GPOS_NONE != rBrush.GetGraphicPos() ||
rBrush.GetColor() != COL_TRANSPARENT )
- bEmpty = FALSE;
+ bEmpty = sal_False;
}
if( bEmpty )
{
@@ -305,7 +305,7 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
}
}
- return static_cast< USHORT >(eType);
+ return static_cast< sal_uInt16 >(eType);
}
void SwHTMLWriter::CollectFlyFrms()
@@ -313,11 +313,11 @@ void SwHTMLWriter::CollectFlyFrms()
ASSERT( HTML_CFG_MAX+1 == MAX_BROWSERS,
"number of browser configurations has changed" );
- BYTE nSz = (BYTE)Min( pDoc->GetSpzFrmFmts()->Count(), USHORT(255) );
+ sal_uInt8 nSz = (sal_uInt8)Min( pDoc->GetSpzFrmFmts()->Count(), sal_uInt16(255) );
SwPosFlyFrms aFlyPos( nSz, nSz );
- pDoc->GetAllFlyFmts( aFlyPos, bWriteAll ? 0 : pCurPam, TRUE );
+ pDoc->GetAllFlyFmts( aFlyPos, bWriteAll ? 0 : pCurPam, sal_True );
- for( USHORT i=0; i< aFlyPos.Count(); i++ )
+ for( sal_uInt16 i=0; i< aFlyPos.Count(); i++ )
{
const SwFrmFmt& rFrmFmt = aFlyPos[i]->GetFmt();
const SdrObject *pSdrObj = 0;
@@ -325,7 +325,7 @@ void SwHTMLWriter::CollectFlyFrms()
const SwCntntNode *pACNd;
SwHTMLFrmType eType = (SwHTMLFrmType)GuessFrmType( rFrmFmt, pSdrObj );
- BYTE nMode;
+ sal_uInt8 nMode;
const SwFmtAnchor& rAnchor = rFrmFmt.GetAnchor();
sal_Int16 eHoriRel = rFrmFmt.GetHoriOrient().GetRelationOrient();
switch( rAnchor.GetAnchorId() )
@@ -375,21 +375,21 @@ void SwHTMLWriter::CollectFlyFrms()
}
}
-BOOL SwHTMLWriter::OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx, BYTE nPos,
+sal_Bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, xub_StrLen nCntntIdx, sal_uInt8 nPos,
HTMLOutContext *pContext )
{
- BOOL bFlysLeft = FALSE; // Noch Flys an aktueller Node-Position da?
+ sal_Bool bFlysLeft = sal_False; // Noch Flys an aktueller Node-Position da?
// OutFlyFrm kan rekursiv aufgerufen werden. Deshalb muss man
// manchmal wieder von vorne anfangen, nachdem ein Fly ausgegeben
// wurde.
- BOOL bRestart = TRUE;
+ sal_Bool bRestart = sal_True;
while( pHTMLPosFlyFrms && bRestart )
{
- bFlysLeft = bRestart = FALSE;
+ bFlysLeft = bRestart = sal_False;
// suche nach dem Anfang der FlyFrames
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < pHTMLPosFlyFrms->Count() &&
(*pHTMLPosFlyFrms)[i]->GetNdIndex().GetIndex() < nNdIdx; i++ )
@@ -411,7 +411,7 @@ BOOL SwHTMLWriter::OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx, BYTE nPos,
{
delete pHTMLPosFlyFrms;
pHTMLPosFlyFrms = 0;
- bRestart = TRUE; // nicht wirklich, nur raus
+ bRestart = sal_True; // nicht wirklich, nur raus
// aus der Schleife
}
@@ -429,14 +429,14 @@ BOOL SwHTMLWriter::OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx, BYTE nPos,
case HTML_OUT_SPAN:
case HTML_OUT_MULTICOL:
case HTML_OUT_TBLNODE:
- bRestart = TRUE; // Hier wird's evtl rekursiv
+ bRestart = sal_True; // Hier wird's evtl rekursiv
break;
}
delete pPosFly;
}
else
{
- bFlysLeft = TRUE;
+ bFlysLeft = sal_True;
}
}
}
@@ -444,11 +444,11 @@ BOOL SwHTMLWriter::OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx, BYTE nPos,
return bFlysLeft;
}
-void SwHTMLWriter::OutFrmFmt( BYTE nMode, const SwFrmFmt& rFrmFmt,
+void SwHTMLWriter::OutFrmFmt( sal_uInt8 nMode, const SwFrmFmt& rFrmFmt,
const SdrObject *pSdrObject )
{
- BYTE nCntnrMode = SwHTMLPosFlyFrm::GetOutCntnr( nMode );
- BYTE nOutMode = SwHTMLPosFlyFrm::GetOutFn(nMode);
+ sal_uInt8 nCntnrMode = SwHTMLPosFlyFrm::GetOutCntnr( nMode );
+ sal_uInt8 nOutMode = SwHTMLPosFlyFrm::GetOutFn(nMode);
const sal_Char *pCntnrStr = 0;
if( HTML_CNTNR_NONE != nCntnrMode )
{
@@ -466,7 +466,7 @@ void SwHTMLWriter::OutFrmFmt( BYTE nMode, const SwFrmFmt& rFrmFmt,
Strm() << sOut.GetBuffer();
// Fuer Nicht-Zeichenobekte eine Breite ausgeben
- ULONG nFrmFlags = HTML_FRMOPTS_CNTNR;
+ sal_uLong nFrmFlags = HTML_FRMOPTS_CNTNR;
// Fuer spaltige Rahmen koennen wir auch noch den Hintergrund ausgeben.
if( HTML_OUT_MULTICOL == nOutMode )
@@ -480,7 +480,7 @@ void SwHTMLWriter::OutFrmFmt( BYTE nMode, const SwFrmFmt& rFrmFmt,
if( HTML_CNTNR_DIV == nCntnrMode )
{
IncIndentLevel();
- bLFPossible = TRUE;
+ bLFPossible = sal_True;
}
}
@@ -534,11 +534,11 @@ void SwHTMLWriter::OutFrmFmt( BYTE nMode, const SwFrmFmt& rFrmFmt,
DecIndentLevel();
if( bLFPossible )
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_division, FALSE );
- bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_division, sal_False );
+ bLFPossible = sal_True;
}
else if( HTML_CNTNR_SPAN == nCntnrMode )
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_span, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_span, sal_False );
}
@@ -604,7 +604,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
if( (nFrmOpts & HTML_FRMOPT_ALIGN) && !pStr &&
( (nFrmOpts & HTML_FRMOPT_S_ALIGN) == 0 ||
(FLY_AS_CHAR == eAnchorId) ) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, sal_True, &pItem ))
{
switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() )
{
@@ -627,7 +627,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
// HSPACE und VSPACE
Size aTwipSpc( 0, 0 );
if( (nFrmOpts & (HTML_FRMOPT_SPACE|HTML_FRMOPT_MARGINSIZE)) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, sal_True, &pItem ))
{
aTwipSpc.Width() =
( ((SvxLRSpaceItem*)pItem)->GetLeft() +
@@ -635,12 +635,12 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
nDfltLeftMargin = nDfltRightMargin = aTwipSpc.Width();
}
if( (nFrmOpts & (HTML_FRMOPT_SPACE|HTML_FRMOPT_MARGINSIZE)) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, sal_True, &pItem ))
{
aTwipSpc.Height() =
( ((SvxULSpaceItem*)pItem)->GetUpper() +
((SvxULSpaceItem*)pItem)->GetLower() ) / 2;
- nDfltTopMargin = nDfltBottomMargin = (USHORT)aTwipSpc.Height();
+ nDfltTopMargin = nDfltBottomMargin = (sal_uInt16)aTwipSpc.Height();
}
if( (nFrmOpts & HTML_FRMOPT_SPACE) &&
@@ -682,7 +682,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
}
if( !(nFrmOpts & HTML_FRMOPT_ABSSIZE) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, sal_True, &pItem ))
{
const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem;
@@ -695,13 +695,13 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
// WIDTH und/oder HEIGHT
// ATT_VAR_SIZE/ATT_MIN_SIZE nur ausgeben, wenn ANYSIZE gesezut ist
if( (nFrmOpts & HTML_FRMOPT_SIZE) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ) &&
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, sal_True, &pItem ) &&
( (nFrmOpts & HTML_FRMOPT_ANYSIZE) ||
ATT_FIX_SIZE == ((const SwFmtFrmSize *)pItem)->GetHeightSizeType()) )
{
const SwFmtFrmSize *pFSItem = (const SwFmtFrmSize *)pItem;
- BYTE nPrcWidth = pFSItem->GetWidthPercent();
- BYTE nPrcHeight = pFSItem->GetHeightPercent();
+ sal_uInt8 nPrcWidth = pFSItem->GetWidthPercent();
+ sal_uInt8 nPrcHeight = pFSItem->GetHeightPercent();
// Groesse des Objekts Twips ohne Raender
Size aTwipSz( (nPrcWidth ? 0
@@ -758,13 +758,13 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
if( (nFrmOpts & HTML_FRMOPT_BRCLEAR) &&
((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) ||
(FLY_AT_CHAR == rFrmFmt.GetAnchor().GetAnchorId())) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_SURROUND, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_SURROUND, sal_True, &pItem ))
{
const SwFmtSurround* pSurround = (const SwFmtSurround*)pItem;
sal_Int16 eHoriOri = rFrmFmt.GetHoriOrient().GetHoriOrient();
pStr = 0;
SwSurround eSurround = pSurround->GetSurround();
- BOOL bAnchorOnly = pSurround->IsAnchorOnly();
+ sal_Bool bAnchorOnly = pSurround->IsAnchorOnly();
switch( eHoriOri )
{
case text::HoriOrientation::RIGHT:
@@ -778,7 +778,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
case SURROUND_LEFT:
case SURROUND_PARALLEL:
if( bAnchorOnly )
- bClearRight = TRUE;
+ bClearRight = sal_True;
break;
default:
;
@@ -799,7 +799,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
case SURROUND_RIGHT:
case SURROUND_PARALLEL:
if( bAnchorOnly )
- bClearLeft = TRUE;
+ bClearLeft = sal_True;
break;
default:
;
@@ -832,7 +832,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
{
SwFmtINetFmt *pINetFmt =
rHTMLWrt.aINetFmts[ rHTMLWrt.aINetFmts.Count()-1 ];
- OutHTML_INetFmt( rWrt, *pINetFmt, FALSE );
+ OutHTML_INetFmt( rWrt, *pINetFmt, sal_False );
}
String aGrfNm( rGrfName );
@@ -847,7 +847,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// das URL-Attribut nur beruecksichtigen, wenn keine Image-Map
// uebergeben wurde
if( !pAltImgMap &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_URL, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_URL, sal_True, &pItem ))
{
pURLItem = (const SwFmtURL *)pItem;
}
@@ -873,17 +873,17 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
(aIMapName = aNameBase)
+= String::CreateFromInt32( rHTMLWrt.nImgMapCnt );
- BOOL bFound;
+ sal_Bool bFound;
do
{
- bFound = FALSE;
- for( USHORT i=0; i<rHTMLWrt.aImgMapNames.Count(); i++ )
+ bFound = sal_False;
+ for( sal_uInt16 i=0; i<rHTMLWrt.aImgMapNames.Count(); i++ )
{
// TODO: Unicode: Comparison is case insensitive for ASCII
// characters only now!
if( aIMapName.EqualsIgnoreCaseAscii(*rHTMLWrt.aImgMapNames[i]) )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -896,7 +896,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
} while( bFound );
- BOOL bScale = FALSE;
+ sal_Bool bScale = sal_False;
//Size aGrfSize( rNode.GetTwipSize() );
Fraction aScaleX( 1, 1 );
Fraction aScaleY( 1, 1 );
@@ -917,7 +917,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
if( rRealSize.Width() != nWidth )
{
aScaleX = Fraction( nWidth, rRealSize.Width() );
- bScale = TRUE;
+ bScale = sal_True;
}
}
if( !rFrmSize.GetHeightPercent() && rRealSize.Height() )
@@ -933,7 +933,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
if( rRealSize.Height() != nHeight )
{
aScaleY = Fraction( nHeight, rRealSize.Height() );
- bScale = TRUE;
+ bScale = sal_True;
}
}
@@ -948,7 +948,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
if( rHTMLWrt.bLFPossible )
{
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
rHTMLWrt.GetIndentString( aIndMap );
rHTMLWrt.GetIndentString( aIndArea, 1 );
#if defined(UNX)
@@ -985,7 +985,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// wenn meoglich vor der Grafik einen Zeilen-Umbruch ausgeben
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
// Attribute die ausserhelb der Grafik geschreiben werden muessen sammeln
ByteString sOut;
@@ -997,7 +997,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// URL -> <A>...<IMG ... >...</A>
const SvxMacroItem *pMacItem = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, TRUE, &pItem ))
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, sal_True, &pItem ))
pMacItem = (const SvxMacroItem *)pItem;
if( pURLItem || pMacItem )
@@ -1011,7 +1011,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
aName = pURLItem->GetName();
aTarget = pURLItem->GetTargetFrameName();
}
- BOOL bEvents = pMacItem && pMacItem->GetMacroTable().Count();
+ sal_Bool bEvents = pMacItem && pMacItem->GetMacroTable().Count();
if( aMapURL.Len() || aName.Len() || aTarget.Len() || bEvents )
{
@@ -1067,9 +1067,9 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
}
// Umrandung -> <FONT COLOR = ...>...<IMG ... >...</FONT>
- USHORT nBorderWidth = 0;
+ sal_uInt16 nBorderWidth = 0;
if( (nFrmOpts & HTML_FRMOPT_BORDER) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, sal_True, &pItem ))
{
Size aTwipBorder( 0, 0 );
const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem;
@@ -1121,7 +1121,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
aPixelBorder.Height() = 0;
nBorderWidth =
- (USHORT)(aPixelBorder.Width() + aPixelBorder.Height());
+ (sal_uInt16)(aPixelBorder.Width() + aPixelBorder.Height());
}
if( pColBorderLine )
@@ -1144,7 +1144,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// Events
sOut.Erase();
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, TRUE, &pItem ))
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, sal_True, &pItem ))
{
const SvxMacroTableDtor& rMacTable =
((const SvxMacroItem *)pItem)->GetMacroTable();
@@ -1190,7 +1190,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// werden muss
SwFmtINetFmt *pINetFmt =
rHTMLWrt.aINetFmts[ rHTMLWrt.aINetFmts.Count()-1 ];
- OutHTML_INetFmt( rWrt, *pINetFmt, TRUE );
+ OutHTML_INetFmt( rWrt, *pINetFmt, sal_True );
}
return rHTMLWrt;
@@ -1220,7 +1220,7 @@ Writer& OutHTML_BulletImage( Writer& rWrt,
// Grafik als (JPG-)File speichern
if( rHTMLWrt.GetOrigFileName() )
rGrfName = *rHTMLWrt.GetOrigFileName();
- USHORT nErr = XOutBitmap::WriteGraphic( *pGrf, rGrfName,
+ sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, rGrfName,
String::CreateFromAscii("JPG"),
(XOUTBMP_USE_GIF_IF_SENSIBLE |
XOUTBMP_USE_NATIVE_IF_POSSIBLE));
@@ -1324,11 +1324,11 @@ static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt )
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
- ULONG nEnd = rHTMLWrt.pDoc->GetNodes()[nStt-1]->EndOfSectionIndex();
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nEnd = rHTMLWrt.pDoc->GetNodes()[nStt-1]->EndOfSectionIndex();
String aCaption;
- BOOL bTopCaption = FALSE;
+ sal_Bool bTopCaption = sal_False;
// Nicht const, weil GetTable spater mal nicht const ist
SwNode *pNd = rHTMLWrt.pDoc->GetNodes()[ nStt ];
@@ -1337,13 +1337,13 @@ static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt )
if( !pTblNd && pTxtNd )
{
// Tabelle mit Ueberschrift
- bTopCaption = TRUE;
+ bTopCaption = sal_True;
pTblNd = rHTMLWrt.pDoc->GetNodes()[nStt+1]->GetTableNode();
}
ASSERT( pTblNd, "Rahmen enthaelt keine Tabelle" );
if( pTblNd )
{
- ULONG nTblEnd = pTblNd->EndOfSectionIndex();
+ sal_uLong nTblEnd = pTblNd->EndOfSectionIndex();
ASSERT( nTblEnd == nEnd - 1 ||
(nTblEnd == nEnd - 2 && !bTopCaption),
"Ungeuelter Rahmen-Inhalt fuer Tabelle" );
@@ -1368,7 +1368,7 @@ static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt )
static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
const SwFrmFmt& rFrmFmt,
- BOOL bInCntnr )
+ sal_Bool bInCntnr )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1387,18 +1387,18 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
const SwFmtCol& rFmtCol = rFrmFmt.GetCol();
// die Anzahl der Spalten als COLS ausgeben
- USHORT nCols = rFmtCol.GetNumCols();
+ sal_uInt16 nCols = rFmtCol.GetNumCols();
if( nCols )
(((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_cols) += '=')
+= ByteString::CreateFromInt32( nCols );
// die Gutter-Breite (Minimalwert) als GUTTER
- USHORT nGutter = rFmtCol.GetGutterWidth( TRUE );
+ sal_uInt16 nGutter = rFmtCol.GetGutterWidth( sal_True );
if( nGutter!=USHRT_MAX )
{
if( nGutter && Application::GetDefaultDevice() )
{
- nGutter = (USHORT)Application::GetDefaultDevice()
+ nGutter = (sal_uInt16)Application::GetDefaultDevice()
->LogicToPixel( Size(nGutter,0),
MapMode(MAP_TWIP) ).Width();
}
@@ -1409,7 +1409,7 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
rWrt.Strm() << sOut.GetBuffer();
// WIDTH
- ULONG nFrmFlags = bInCntnr ? HTML_FRMOPTS_MULTICOL_CNTNR
+ sal_uLong nFrmFlags = bInCntnr ? HTML_FRMOPTS_MULTICOL_CNTNR
: HTML_FRMOPTS_MULTICOL;
if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr )
nFrmFlags |= HTML_FRMOPTS_MULTICOL_CSS1;
@@ -1420,11 +1420,11 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
rWrt.Strm() << '>';
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
rHTMLWrt.IncIndentLevel(); // den Inhalt von Multicol einruecken;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode();
ASSERT( pSttNd, "Wo ist der Start-Node" );
@@ -1443,8 +1443,8 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
rHTMLWrt.DecIndentLevel(); // den Inhalt von Multicol einruecken;
if( rHTMLWrt.bLFPossible )
rHTMLWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_multicol, FALSE );
- rHTMLWrt.bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_multicol, sal_False );
+ rHTMLWrt.bLFPossible = sal_True;
return rWrt;
}
@@ -1455,7 +1455,7 @@ static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFrmFmt )
// wenn meoglich vor der Grafik einen Zeilen-Umbruch ausgeben
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
ByteString sOut('<');
((((sOut += OOO_STRING_SVTOOLS_HTML_spacer) += ' ') += OOO_STRING_SVTOOLS_HTML_O_type) += '=')
@@ -1475,7 +1475,7 @@ static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFrmFmt )
}
static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
- const SwFrmFmt& rFrmFmt, BOOL bSpan)
+ const SwFrmFmt& rFrmFmt, sal_Bool bSpan)
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1500,7 +1500,7 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
rWrt.Strm() << sOut.GetBuffer();
ByteString aEndTags;
- ULONG nFrmFlags = HTML_FRMOPTS_DIV;
+ sal_uLong nFrmFlags = HTML_FRMOPTS_DIV;
if( rHTMLWrt.IsHTMLMode( HTMLMODE_BORDER_NONE ) )
nFrmFlags |= HTML_FRMOPT_S_NOBORDER;
rHTMLWrt.OutFrmFmtOptions( rFrmFmt, aEmptyStr, aEndTags, nFrmFlags );
@@ -1508,10 +1508,10 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
rWrt.Strm() << '>';
rHTMLWrt.IncIndentLevel(); // den Inhalt einruecken
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
// Am Start-Node verankerte Rahmen-gebundene Rahmen ausgeben
rHTMLWrt.OutFlyFrm( nStt, 0, HTML_POS_ANY );
@@ -1532,7 +1532,7 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
rHTMLWrt.DecIndentLevel(); // den Inhalt von Multicol einruecken;
if( rHTMLWrt.bLFPossible )
rHTMLWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), pStr, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), pStr, sal_False );
if( aEndTags.Len() )
rWrt.Strm() << aEndTags.GetBuffer();
@@ -1541,7 +1541,7 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
}
static Writer & OutHTML_FrmFmtAsImage( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL /*bInCntnr*/ )
+ sal_Bool /*bInCntnr*/ )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1574,12 +1574,12 @@ static Writer & OutHTML_FrmFmtAsImage( Writer& rWrt, const SwFrmFmt& rFrmFmt,
static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL bInCntnr )
+ sal_Bool bInCntnr )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
SwGrfNode *pGrfNd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetGrfNode();
ASSERT( pGrfNd, "Grf-Node erwartet" );
if( !pGrfNd )
@@ -1593,9 +1593,9 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// Grafik als File-Referenz speichern (als JPEG-Grafik speichern)
if( rHTMLWrt.GetOrigFileName() )
aGrfNm = *rHTMLWrt.GetOrigFileName();
- pGrfNd->SwapIn( TRUE );
+ pGrfNd->SwapIn( sal_True );
- ULONG nFlags = XOUTBMP_USE_GIF_IF_SENSIBLE |
+ sal_uLong nFlags = XOUTBMP_USE_GIF_IF_SENSIBLE |
XOUTBMP_USE_NATIVE_IF_POSSIBLE;
switch( rMirror.GetValue() )
{
@@ -1611,7 +1611,7 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
aMM100Size = OutputDevice::LogicToLogic( rSize.GetSize(),
MapMode( MAP_TWIP ), MapMode( MAP_100TH_MM ));
- USHORT nErr = XOutBitmap::WriteGraphic( pGrfNd->GetGrf(), aGrfNm,
+ sal_uInt16 nErr = XOutBitmap::WriteGraphic( pGrfNd->GetGrf(), aGrfNm,
String::CreateFromAscii("JPG"), nFlags, &aMM100Size );
if( nErr ) // fehlerhaft, da ist nichts auszugeben
{
@@ -1629,7 +1629,7 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
rWrt.CopyLocalFileToINet( aGrfNm );
}
- ULONG nFrmFlags = bInCntnr ? HTML_FRMOPTS_IMG_CNTNR : HTML_FRMOPTS_IMG;
+ sal_uLong nFrmFlags = bInCntnr ? HTML_FRMOPTS_IMG_CNTNR : HTML_FRMOPTS_IMG;
if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr )
nFrmFlags |= HTML_FRMOPTS_IMG_CSS1;
OutHTML_Image( rWrt, rFrmFmt, aGrfNm, pGrfNd->GetTitle(),
@@ -1649,21 +1649,21 @@ static Writer& OutHTML_FrmFmtAsMarquee( Writer& rWrt, const SwFrmFmt& rFrmFmt,
const SfxItemSet& rFmtItemSet = rFrmFmt.GetAttrSet();
SfxItemSet aItemSet( *rFmtItemSet.GetPool(), RES_CHRATR_BEGIN,
RES_CHRATR_END );
- SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, &rSdrObj, TRUE );
- BOOL bCfgOutStylesOld = rHTMLWrt.bCfgOutStyles;
- rHTMLWrt.bCfgOutStyles = FALSE;
- rHTMLWrt.bTxtAttr = TRUE;
- rHTMLWrt.bTagOn = TRUE;
- Out_SfxItemSet( aHTMLAttrFnTab, rWrt, aItemSet, FALSE );
- rHTMLWrt.bTxtAttr = FALSE;
+ SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, &rSdrObj, sal_True );
+ sal_Bool bCfgOutStylesOld = rHTMLWrt.bCfgOutStyles;
+ rHTMLWrt.bCfgOutStyles = sal_False;
+ rHTMLWrt.bTxtAttr = sal_True;
+ rHTMLWrt.bTagOn = sal_True;
+ Out_SfxItemSet( aHTMLAttrFnTab, rWrt, aItemSet, sal_False );
+ rHTMLWrt.bTxtAttr = sal_False;
OutHTML_DrawFrmFmtAsMarquee( rHTMLWrt,
(const SwDrawFrmFmt &)rFrmFmt,
rSdrObj );
- rHTMLWrt.bTxtAttr = TRUE;
- rHTMLWrt.bTagOn = FALSE;
- Out_SfxItemSet( aHTMLAttrFnTab, rWrt, aItemSet, FALSE );
- rHTMLWrt.bTxtAttr = FALSE;
+ rHTMLWrt.bTxtAttr = sal_True;
+ rHTMLWrt.bTagOn = sal_False;
+ Out_SfxItemSet( aHTMLAttrFnTab, rWrt, aItemSet, sal_False );
+ rHTMLWrt.bTxtAttr = sal_False;
rHTMLWrt.bCfgOutStyles = bCfgOutStylesOld;
return rWrt;
@@ -1672,7 +1672,7 @@ static Writer& OutHTML_FrmFmtAsMarquee( Writer& rWrt, const SwFrmFmt& rFrmFmt,
//-----------------------------------------------------------------------
Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL bHeader )
+ sal_Bool bHeader )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1689,7 +1689,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// <DL> bzw. </DL> immer einer Absatz-Abstand entsteht, wird der
// ggf. abgezogen.
const SvxULSpaceItem& rULSpace = rFrmFmt.GetULSpace();
- USHORT nSize = bHeader ? rULSpace.GetLower() : rULSpace.GetUpper();
+ sal_uInt16 nSize = bHeader ? rULSpace.GetLower() : rULSpace.GetUpper();
rHTMLWrt.nHeaderFooterSpace = nSize;
ByteString aSpacer;
@@ -1697,7 +1697,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
nSize > HTML_PARSPACE && Application::GetDefaultDevice() )
{
nSize -= HTML_PARSPACE;
- nSize = (INT16)Application::GetDefaultDevice()
+ nSize = (sal_Int16)Application::GetDefaultDevice()
->LogicToPixel( Size(nSize,0), MapMode(MAP_TWIP) ).Width();
((((((((aSpacer = OOO_STRING_SVTOOLS_HTML_spacer) += ' ')
@@ -1706,7 +1706,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
}
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode();
ASSERT( pSttNd, "Wo ist der Start-Node" );
@@ -1724,9 +1724,9 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
pSttNd->EndOfSectionIndex() );
if( bHeader )
- rHTMLWrt.bOutHeader = TRUE;
+ rHTMLWrt.bOutHeader = sal_True;
else
- rHTMLWrt.bOutFooter = TRUE;
+ rHTMLWrt.bOutFooter = sal_True;
rHTMLWrt.Out_SwDoc( rWrt.pCurPam );
}
@@ -1739,7 +1739,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
rHTMLWrt.DecIndentLevel(); // den Inhalt von Multicol einruecken;
rHTMLWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_division, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_division, sal_False );
rHTMLWrt.nHeaderFooterSpace = 0;
@@ -1802,14 +1802,14 @@ void SwHTMLWriter::AddLinkTarget( const String& rURL )
else if( sCmp.EqualsAscii( pMarkToOutline ) )
{
// Hier brauchen wir Position und Name. Deshalb sortieren wir
- // ein USHORT und ein String-Array selbst
+ // ein sal_uInt16 und ein String-Array selbst
String aOutline( aURL.Copy( 0, nPos-1 ) );
SwPosition aPos( *pCurPam->GetPoint() );
if( pDoc->GotoOutline( aPos, aOutline ) )
{
- ULONG nIdx = aPos.nNode.GetIndex();
+ sal_uLong nIdx = aPos.nNode.GetIndex();
- USHORT nIns=0;
+ sal_uInt16 nIns=0;
while( nIns < aOutlineMarkPoss.Count() &&
aOutlineMarkPoss[nIns] < nIdx )
nIns++;
@@ -1859,7 +1859,7 @@ void SwHTMLWriter::CollectLinkTargets()
const ImageMap *pIMap = pURL->GetMap();
if( pIMap )
{
- for( USHORT i=0; i<pIMap->GetIMapObjectCount(); i++ )
+ for( sal_uInt16 i=0; i<pIMap->GetIMapObjectCount(); i++ )
{
const IMapObject* pObj = pIMap->GetIMapObject( i );
if( pObj )
@@ -1876,7 +1876,7 @@ void SwHTMLWriter::CollectLinkTargets()
SwHTMLPosFlyFrm::SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
const SdrObject *pSdrObj,
- BYTE nOutMode ) :
+ sal_uInt8 nOutMode ) :
pFrmFmt( &rPosFly.GetFmt() ),
pSdrObject( pSdrObj ),
pNdIdx( new SwNodeIndex( rPosFly.GetNdIndex() ) ),
@@ -1908,7 +1908,7 @@ SwHTMLPosFlyFrm::SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
}
}
-BOOL SwHTMLPosFlyFrm::operator<( const SwHTMLPosFlyFrm& rFrm ) const
+sal_Bool SwHTMLPosFlyFrm::operator<( const SwHTMLPosFlyFrm& rFrm ) const
{
if( pNdIdx->GetIndex() == rFrm.pNdIdx->GetIndex() )
{
diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx
index 72a2dd4ba006..ff91c0a3732c 100644
--- a/sw/source/filter/html/htmlfly.hxx
+++ b/sw/source/filter/html/htmlfly.hxx
@@ -86,31 +86,31 @@ enum SwHTMLFrmType
#define HTML_CNTNR_MASK 0xc0
-const USHORT MAX_FRMTYPES = HTML_FRMTYPE_END;
-const USHORT MAX_BROWSERS = 4;
+const sal_uInt16 MAX_FRMTYPES = HTML_FRMTYPE_END;
+const sal_uInt16 MAX_BROWSERS = 4;
-extern BYTE aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern BYTE aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern BYTE aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern BYTE aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern BYTE aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS];
class SwHTMLPosFlyFrm
{
const SwFrmFmt *pFrmFmt; // der Rahmen
const SdrObject *pSdrObject; // ggf. Sdr-Objekt
SwNodeIndex *pNdIdx; // Node-Index
- UINT32 nOrdNum; // Aus SwPosFlyFrm
+ sal_uInt32 nOrdNum; // Aus SwPosFlyFrm
xub_StrLen nCntntIdx; // seine Position im Content
- BYTE nOutputMode; // Ausgabe-Infos
+ sal_uInt8 nOutputMode; // Ausgabe-Infos
public:
SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
- const SdrObject *pSdrObj, BYTE nOutMode );
+ const SdrObject *pSdrObj, sal_uInt8 nOutMode );
- BOOL operator==( const SwHTMLPosFlyFrm& ) const { return FALSE; }
- BOOL operator<( const SwHTMLPosFlyFrm& ) const;
+ sal_Bool operator==( const SwHTMLPosFlyFrm& ) const { return sal_False; }
+ sal_Bool operator<( const SwHTMLPosFlyFrm& ) const;
const SwFrmFmt& GetFmt() const { return *pFrmFmt; }
const SdrObject *GetSdrObject() const { return pSdrObject; }
@@ -119,15 +119,15 @@ public:
xub_StrLen GetCntntIndex() const { return nCntntIdx; }
- BYTE GetOutMode() const { return nOutputMode; }
+ sal_uInt8 GetOutMode() const { return nOutputMode; }
- static BYTE GetOutFn( BYTE nMode ) { return nMode & HTML_OUT_MASK; }
- static BYTE GetOutPos( BYTE nMode ) { return nMode & HTML_POS_MASK; }
- static BYTE GetOutCntnr( BYTE nMode ) { return nMode & HTML_CNTNR_MASK; }
+ static sal_uInt8 GetOutFn( sal_uInt8 nMode ) { return nMode & HTML_OUT_MASK; }
+ static sal_uInt8 GetOutPos( sal_uInt8 nMode ) { return nMode & HTML_POS_MASK; }
+ static sal_uInt8 GetOutCntnr( sal_uInt8 nMode ) { return nMode & HTML_CNTNR_MASK; }
- BYTE GetOutFn() const { return nOutputMode & HTML_OUT_MASK; }
- BYTE GetOutPos() const { return nOutputMode & HTML_POS_MASK; }
- BYTE GetOutCntnr() const { return nOutputMode & HTML_CNTNR_MASK; }
+ sal_uInt8 GetOutFn() const { return nOutputMode & HTML_OUT_MASK; }
+ sal_uInt8 GetOutPos() const { return nOutputMode & HTML_POS_MASK; }
+ sal_uInt8 GetOutCntnr() const { return nOutputMode & HTML_CNTNR_MASK; }
};
typedef SwHTMLPosFlyFrm *SwHTMLPosFlyFrmPtr;
diff --git a/sw/source/filter/html/htmlflyt.cxx b/sw/source/filter/html/htmlflyt.cxx
index f3b80db509e5..fa1f82ded113 100644
--- a/sw/source/filter/html/htmlflyt.cxx
+++ b/sw/source/filter/html/htmlflyt.cxx
@@ -31,9 +31,9 @@
#include "htmlfly.hxx"
-#define TE(t,p,c) (BYTE)( HTML_OUT_##t | HTML_POS_##p | HTML_CNTNR_##c )
+#define TE(t,p,c) (sal_uInt8)( HTML_OUT_##t | HTML_POS_##p | HTML_CNTNR_##c )
-BYTE aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
@@ -129,7 +129,7 @@ BYTE aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] =
}
};
-BYTE aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
@@ -226,7 +226,7 @@ BYTE aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] =
}
};
-BYTE aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
@@ -322,7 +322,7 @@ BYTE aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] =
}
};
-BYTE aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
@@ -418,7 +418,7 @@ BYTE aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] =
}
};
-BYTE aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index a8c0aedc388f..4563ceb73343 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -1739,7 +1739,7 @@ void SwHTMLParser::InsertInput()
if( bDisabled )
{
- BOOL bFalse = sal_False;
+ sal_Bool bFalse = sal_False;
aTmp.setValue(&bFalse, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString::createFromAscii( "Enabled" ), aTmp );
}
@@ -2132,7 +2132,7 @@ void SwHTMLParser::NewTextArea()
aTmp <<= OUString(sName);
xPropSet->setPropertyValue( OUString::createFromAscii( "Name" ), aTmp );
- BOOL bTrue = sal_True;
+ sal_Bool bTrue = sal_True;
aTmp.setValue( &bTrue, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString::createFromAscii( "MultiLine" ),
aTmp );
@@ -2155,7 +2155,7 @@ void SwHTMLParser::NewTextArea()
if( bDisabled )
{
- BOOL bFalse = sal_False;
+ sal_Bool bFalse = sal_False;
aTmp.setValue( &bFalse, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString::createFromAscii( "Enabled" ),
aTmp );
@@ -2421,7 +2421,7 @@ void SwHTMLParser::NewSelect()
if( bDisabled )
{
- BOOL bFalse = sal_False;
+ sal_Bool bFalse = sal_False;
aTmp.setValue( &bFalse, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString::createFromAscii( "Enabled" ),
aTmp );
@@ -2431,7 +2431,7 @@ void SwHTMLParser::NewSelect()
sal_Bool bMinWidth = sal_True, bMinHeight = sal_True;
if( !bMultiple && 1==nSelectEntryCnt )
{
- BOOL bTrue = sal_True;
+ sal_Bool bTrue = sal_True;
aTmp.setValue( &bTrue, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString::createFromAscii( "Dropdown" ),
aTmp );
@@ -2443,7 +2443,7 @@ void SwHTMLParser::NewSelect()
if( bMultiple )
{
- BOOL bTrue = sal_True;
+ sal_Bool bTrue = sal_True;
aTmp.setValue( &bTrue, ::getBooleanCppuType() );
xPropSet->setPropertyValue(
OUString::createFromAscii( "MultiSelection" ), aTmp );
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 85c4e9846857..d44a543dfa5a 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -99,7 +99,7 @@ struct HTMLControl
{
// die Form, zu der das Control gehoert
uno::Reference< container::XIndexContainer > xFormComps;
- ULONG nNdIdx; // der Node, in dem es verankert ist
+ sal_uLong nNdIdx; // der Node, in dem es verankert ist
xub_StrLen nCount; // wie viele Controls sind in dem Node
HTMLControl( const uno::Reference< container::XIndexContainer > & rForm,
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 900643bbc680..6c96722b5009 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -56,8 +56,8 @@ struct SwHTMLFootEndNote_Impl
String sName;
String sContent; // Infos fuer die letzte Fussnote
- BOOL bEndNote;
- BOOL bFixed;
+ sal_Bool bEndNote;
+ sal_Bool bFixed;
};
@@ -72,7 +72,7 @@ xub_StrLen lcl_html_getNextPart( String& rPart, const String& rContent,
}
else
{
- BOOL bQuoted = FALSE, bDone = FALSE;
+ sal_Bool bQuoted = sal_False, bDone = sal_False;
for( ; nPos < nLen && !bDone; nPos++ )
{
sal_Unicode c = rContent.GetChar( nPos );
@@ -88,13 +88,13 @@ xub_StrLen lcl_html_getNextPart( String& rPart, const String& rContent,
if( bQuoted )
rPart += c;
else
- bDone = TRUE;
- bQuoted = FALSE;
+ bDone = sal_True;
+ bQuoted = sal_False;
break;
default:
rPart += c;
- bQuoted = FALSE;
+ bQuoted = sal_False;
break;
}
}
@@ -105,10 +105,10 @@ xub_StrLen lcl_html_getNextPart( String& rPart, const String& rContent,
xub_StrLen lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
const String& rContent,
- BOOL bEndNote )
+ sal_Bool bEndNote )
{
xub_StrLen nStrPos = 0;
- for( USHORT nPart = 0; nPart < 4; nPart++ )
+ for( sal_uInt16 nPart = 0; nPart < 4; nPart++ )
{
String aPart;
if( STRING_MAXLEN != nStrPos )
@@ -124,7 +124,7 @@ xub_StrLen lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
break;
case 1:
- rInfo.nFtnOffset = aPart.Len() == 0 ? 0 : (USHORT)aPart.ToInt32();
+ rInfo.nFtnOffset = aPart.Len() == 0 ? 0 : (sal_uInt16)aPart.ToInt32();
break;
case 2:
@@ -143,7 +143,7 @@ xub_StrLen lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
void SwHTMLParser::FillEndNoteInfo( const String& rContent )
{
SwEndNoteInfo aInfo( pDoc->GetEndNoteInfo() );
- lcl_html_getEndNoteInfo( aInfo, rContent, TRUE );
+ lcl_html_getEndNoteInfo( aInfo, rContent, sal_True );
pDoc->SetEndNoteInfo( aInfo );
}
@@ -151,9 +151,9 @@ void SwHTMLParser::FillFootNoteInfo( const String& rContent )
{
SwFtnInfo aInfo( pDoc->GetFtnInfo() );
- xub_StrLen nStrPos = lcl_html_getEndNoteInfo( aInfo, rContent, FALSE );
+ xub_StrLen nStrPos = lcl_html_getEndNoteInfo( aInfo, rContent, sal_False );
- for( USHORT nPart = 4; nPart < 8; nPart++ )
+ for( sal_uInt16 nPart = 4; nPart < 8; nPart++ )
{
String aPart;
if( STRING_MAXLEN != nStrPos )
@@ -199,8 +199,8 @@ void SwHTMLParser::FillFootNoteInfo( const String& rContent )
pDoc->SetFtnInfo( aInfo );
}
-void SwHTMLParser::InsertFootEndNote( const String& rName, BOOL bEndNote,
- BOOL bFixed )
+void SwHTMLParser::InsertFootEndNote( const String& rName, sal_Bool bEndNote,
+ sal_Bool bFixed )
{
if( !pFootEndNoteImpl )
pFootEndNoteImpl = new SwHTMLFootEndNote_Impl;
@@ -240,7 +240,7 @@ void SwHTMLParser::FinishFootEndNote()
}
pFootEndNoteImpl->sName = aEmptyStr;
pFootEndNoteImpl->sContent = aEmptyStr;
- pFootEndNoteImpl->bFixed = FALSE;
+ pFootEndNoteImpl->bFixed = sal_False;
}
void SwHTMLParser::InsertFootEndNoteText()
@@ -265,8 +265,8 @@ SwNodeIndex *SwHTMLParser::GetFootEndNoteSection( const String& rName )
// TODO: ToUpperAscii
aName.ToUpperAscii();
- USHORT nCount = pFootEndNoteImpl->aNames.Count();
- for( USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pFootEndNoteImpl->aNames.Count();
+ for( sal_uInt16 i=0; i<nCount; i++ )
{
if( *pFootEndNoteImpl->aNames[i] == aName )
{
@@ -297,7 +297,7 @@ Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt )
return rWrt;
String sFtnName, sClass;
- USHORT nPos;
+ sal_uInt16 nPos;
if( rFmtFtn.IsEndNote() )
{
nPos = rHTMLWrt.pFootEndNotes ? rHTMLWrt.pFootEndNotes->Count() : 0;
@@ -334,12 +334,12 @@ Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt )
(sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_sdfixed;
sOut += '>';
rWrt.Strm() << sOut.GetBuffer();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, TRUE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, sal_True );
HTMLOutFuncs::Out_String( rWrt.Strm(), rFmtFtn.GetViewNumStr(*rWrt.pDoc),
rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, FALSE );
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_anchor, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, sal_False );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_anchor, sal_False );
return rWrt;
}
@@ -352,11 +352,11 @@ void SwHTMLWriter::OutFootEndNotes()
return;
#ifdef DBG_UTIL
- USHORT nFtn = nFootNote, nEn = nEndNote;
+ sal_uInt16 nFtn = nFootNote, nEn = nEndNote;
#endif
nFootNote = 0, nEndNote = 0;
- for( USHORT i=0; i<pFootEndNotes->Count(); i++ )
+ for( sal_uInt16 i=0; i<pFootEndNotes->Count(); i++ )
{
SwTxtFtn *pTxtFtn = (*pFootEndNotes)[i];
pFmtFtn = &pTxtFtn->GetFtn();
@@ -383,7 +383,7 @@ void SwHTMLWriter::OutFootEndNotes()
HTMLOutFuncs::Out_String( Strm(), sFtnName, eDestEnc, &aNonConvertableCharacters );
Strm() << "\">";
- bLFPossible = TRUE;
+ bLFPossible = sal_True;
IncIndentLevel(); // Inhalt von <DIV> einruecken
ASSERT( pTxtFtn, "SwHTMLWriter::OutFootEndNotes: SwTxtFtn fehlt" );
@@ -393,15 +393,15 @@ void SwHTMLWriter::OutFootEndNotes()
if( pSttNdIdx )
{
HTMLSaveData aSaveData( *this, pSttNdIdx->GetIndex()+1,
- pSttNdIdx->GetNode().EndOfSectionIndex(), FALSE );
+ pSttNdIdx->GetNode().EndOfSectionIndex(), sal_False );
Out_SwDoc( pCurPam );
}
DecIndentLevel(); // Inhalt von <DIV> einruecken
if( bLFPossible )
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_division, FALSE );
- bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_division, sal_False );
+ bLFPossible = sal_True;
ASSERT( !pFmtFtn,
"SwHTMLWriter::OutFootEndNotes: Ftn wurde nicht ausgegeben" );
@@ -498,14 +498,14 @@ void SwHTMLWriter::OutFootEndNoteSym( const SwFmtFtn& rFmtFtn,
Strm() << sOut.GetBuffer();
HTMLOutFuncs::Out_String( Strm(), rNum, eDestEnc, &aNonConvertableCharacters );
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_anchor, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_anchor, sal_False );
}
-USHORT lcl_html_fillEndNoteInfo( const SwEndNoteInfo& rInfo,
+sal_uInt16 lcl_html_fillEndNoteInfo( const SwEndNoteInfo& rInfo,
String *pParts,
- BOOL bEndNote )
+ sal_Bool bEndNote )
{
- USHORT nParts = 0;
+ sal_uInt16 nParts = 0;
sal_Int16 eFmt = rInfo.aFmt.GetNumberingType();
if( (bEndNote ? SVX_NUM_ROMAN_LOWER : SVX_NUM_ARABIC) != eFmt )
{
@@ -536,12 +536,12 @@ USHORT lcl_html_fillEndNoteInfo( const SwEndNoteInfo& rInfo,
}
void lcl_html_outFootEndNoteInfo( Writer& rWrt, String *pParts,
- USHORT nParts, const sal_Char *pName )
+ sal_uInt16 nParts, const sal_Char *pName )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
String aContent;
- for( USHORT i=0; i<nParts; i++ )
+ for( sal_uInt16 i=0; i<nParts; i++ )
{
xub_StrLen nPos = 0;
String aTmp( pParts[i] );
@@ -583,7 +583,7 @@ void SwHTMLWriter::OutFootEndNoteInfo()
{
const SwFtnInfo& rInfo = pDoc->GetFtnInfo();
String aParts[8];
- USHORT nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, FALSE );
+ sal_uInt16 nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, sal_False );
if( rInfo.eNum != FTNNUM_DOC )
{
aParts[4] = rInfo.eNum == FTNNUM_CHAPTER ? 'C' : 'P';
@@ -612,7 +612,7 @@ void SwHTMLWriter::OutFootEndNoteInfo()
{
const SwEndNoteInfo& rInfo = pDoc->GetEndNoteInfo();
String aParts[4];
- USHORT nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, TRUE );
+ sal_uInt16 nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, sal_True );
if( nParts > 0 )
lcl_html_outFootEndNoteInfo( *this, aParts, nParts,
OOO_STRING_SVTOOLS_HTML_META_sdendnote );
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 75f39c728313..415c6447fac8 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -114,7 +114,7 @@ ImageMap *SwHTMLParser::FindImageMap( const String& rName ) const
if( pImageMaps )
{
- for( USHORT i=0; i<pImageMaps->Count(); i++ )
+ for( sal_uInt16 i=0; i<pImageMaps->Count(); i++ )
{
ImageMap *pIMap = (*pImageMaps)[i];
if( rName.EqualsIgnoreCaseAscii( pIMap->GetName() ) )
@@ -131,8 +131,8 @@ void SwHTMLParser::ConnectImageMaps()
{
SwNodes& rNds = pDoc->GetNodes();
// auf den Start-Node der 1. Section
- ULONG nIdx = rNds.GetEndOfAutotext().StartOfSectionIndex() + 1;
- ULONG nEndIdx = rNds.GetEndOfAutotext().GetIndex();
+ sal_uLong nIdx = rNds.GetEndOfAutotext().StartOfSectionIndex() + 1;
+ sal_uLong nEndIdx = rNds.GetEndOfAutotext().GetIndex();
SwGrfNode* pGrfNd;
while( nMissingImgMaps > 0 && nIdx < nEndIdx )
@@ -175,7 +175,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
SfxItemSet& rFrmItemSet )
{
const SfxItemSet *pCntnrItemSet = 0;
- USHORT i = aContexts.Count();
+ sal_uInt16 i = aContexts.Count();
while( !pCntnrItemSet && i > nContextStMin )
pCntnrItemSet = aContexts[--i]->GetFrmItemSet();
@@ -185,7 +185,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
// des Containers uebernommen.
rFrmItemSet.Put( *pCntnrItemSet );
}
- else if( pCSS1Parser->MayBePositioned( rCSS1PropInfo, TRUE ) )
+ else if( pCSS1Parser->MayBePositioned( rCSS1PropInfo, sal_True ) )
{
// Wenn die Ausrichtung anhand der CSS1-Optionen gesetzt werden kann
// werden die benutzt.
@@ -202,16 +202,16 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
sal_Int16 eHoriOri,
SfxItemSet& rFrmSet,
- BOOL bDontAppend )
+ sal_Bool bDontAppend )
{
- BOOL bMoveBackward = FALSE;
+ sal_Bool bMoveBackward = sal_False;
SwFmtAnchor aAnchor( FLY_AS_CHAR );
sal_Int16 eVertRel = text::RelOrientation::FRAME;
if( text::HoriOrientation::NONE != eHoriOri )
{
// den Absatz-Einzug bestimmen
- USHORT nLeftSpace = 0, nRightSpace = 0;
+ sal_uInt16 nLeftSpace = 0, nRightSpace = 0;
short nIndent = 0;
GetMarginsFromContextWithNumBul( nLeftSpace, nRightSpace, nIndent );
@@ -240,15 +240,15 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
// Einen neuen Absatz aufmachen, wenn der aktuelle
// absatzgebundene Rahmen ohne Umlauf enthaelt.
- if( !bDontAppend && HasCurrentParaFlys( TRUE ) )
+ if( !bDontAppend && HasCurrentParaFlys( sal_True ) )
{
// Wenn der Absatz nur Grafiken enthaelt, braucht er
// auch keinen unteren Absatz-Abstand. Da hier auch bei
// Verwendung von Styles kein Abstand enstehen soll, wird
// hier auch geweohnlich attributiert !!!
- USHORT nUpper=0, nLower=0;
+ sal_uInt16 nUpper=0, nLower=0;
GetULSpaceFromContext( nUpper, nLower );
- InsertAttr( SvxULSpaceItem( nUpper, 0, RES_UL_SPACE ), FALSE, TRUE );
+ InsertAttr( SvxULSpaceItem( nUpper, 0, RES_UL_SPACE ), sal_False, sal_True );
AppendTxtNode( AM_NOSPACE );
@@ -256,7 +256,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
{
NewAttr( &aAttrTab.pULSpace, SvxULSpaceItem( 0, nLower, RES_UL_SPACE ) );
aParaAttrs.Insert( aAttrTab.pULSpace, aParaAttrs.Count() );
- EndAttr( aAttrTab.pULSpace, 0, FALSE );
+ EndAttr( aAttrTab.pULSpace, 0, sal_False );
}
}
@@ -265,7 +265,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
if( nCntnt )
{
aAnchor.SetType( FLY_AT_CHAR );
- bMoveBackward = TRUE;
+ bMoveBackward = sal_True;
eVertOri = text::VertOrientation::CHAR_BOTTOM;
eVertRel = text::RelOrientation::CHAR;
}
@@ -329,10 +329,10 @@ void SwHTMLParser::InsertImage()
long nWidth=0, nHeight=0;
long nVSpace=0, nHSpace=0;
- USHORT nBorder = (aAttrTab.pINetFmt ? 1 : 0);
- BOOL bIsMap = FALSE;
- BOOL bPrcWidth = FALSE;
- BOOL bPrcHeight = FALSE;
+ sal_uInt16 nBorder = (aAttrTab.pINetFmt ? 1 : 0);
+ sal_Bool bIsMap = sal_False;
+ sal_Bool bPrcWidth = sal_False;
+ sal_Bool bPrcHeight = sal_False;
SvxMacroItem aMacroItem(RES_FRMMACRO);
ScriptType eDfltScriptType;
@@ -340,9 +340,9 @@ void SwHTMLParser::InsertImage()
GetDefaultScriptType( eDfltScriptType, sDfltScriptType );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
ScriptType eScriptType2 = eDfltScriptType;
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -393,10 +393,10 @@ void SwHTMLParser::InsertImage()
sAltNm = pOption->GetString();
break;
case HTML_O_BORDER:
- nBorder = (USHORT)pOption->GetNumber();
+ nBorder = (sal_uInt16)pOption->GetNumber();
break;
case HTML_O_ISMAP:
- bIsMap = TRUE;
+ bIsMap = sal_True;
break;
case HTML_O_USEMAP:
aMap = pOption->GetString();
@@ -462,7 +462,7 @@ IMAGE_SETEVENT:
// Rule invalisieren ist noetig, weil zwischem dem einlesen
// des LI und der Grafik ein EndAction gerufen worden sein kann.
if( GetNumInfo().GetNumRule() )
- GetNumInfo().GetNumRule()->SetInvalidRule( TRUE );
+ GetNumInfo().GetNumRule()->SetInvalidRule( sal_True );
// Die Vorlage novh mal setzen. Ist noetig, damit der
// Erstzeilen-Einzug stimmt.
@@ -494,12 +494,12 @@ IMAGE_SETEVENT:
SvxBorderLine aVBorderLine;
SvxCSS1Parser::SetBorderWidth( aHBorderLine,
- (USHORT)nHBorderWidth, FALSE );
+ (sal_uInt16)nHBorderWidth, sal_False );
if( nHBorderWidth == nVBorderWidth )
aVBorderLine.SetOutWidth( aHBorderLine.GetOutWidth() );
else
SvxCSS1Parser::SetBorderWidth( aVBorderLine,
- (USHORT)nVBorderWidth, FALSE );
+ (sal_uInt16)nVBorderWidth, sal_False );
// die tatsaechlich gesetzter Rahmenbreite benutzen und nicht die
// Wunschbreite!
@@ -512,7 +512,7 @@ IMAGE_SETEVENT:
((const SwFmtINetFmt&)aAttrTab.pINetFmt->GetItem()).GetValue();
pCSS1Parser->SetATagStyles();
- USHORT nPoolId = static_cast< USHORT >(pDoc->IsVisitedURL( rURL )
+ sal_uInt16 nPoolId = static_cast< sal_uInt16 >(pDoc->IsVisitedURL( rURL )
? RES_POOLCHR_INET_VISIT
: RES_POOLCHR_INET_NORMAL);
const SwCharFmt *pCharFmt = pCSS1Parser->GetCharFmtFromPool( nPoolId );
@@ -559,12 +559,12 @@ IMAGE_SETEVENT:
case SVX_CSS1_LTYPE_TWIP:
aTwipSz.Width() = aPropInfo.nWidth;
nWidth = 1; // != 0
- bPrcWidth = FALSE;
+ bPrcWidth = sal_False;
break;
case SVX_CSS1_LTYPE_PERCENTAGE:
aTwipSz.Width() = 0;
nWidth = aPropInfo.nWidth;
- bPrcWidth = TRUE;
+ bPrcWidth = sal_True;
break;
default:
;
@@ -574,23 +574,23 @@ IMAGE_SETEVENT:
case SVX_CSS1_LTYPE_TWIP:
aTwipSz.Height() = aPropInfo.nHeight;
nHeight = 1; // != 0
- bPrcHeight = FALSE;
+ bPrcHeight = sal_False;
break;
case SVX_CSS1_LTYPE_PERCENTAGE:
aTwipSz.Height() = 0;
nHeight = aPropInfo.nHeight;
- bPrcHeight = TRUE;
+ bPrcHeight = sal_True;
break;
default:
;
}
Size aGrfSz( 0, 0 );
- BOOL bSetTwipSize = TRUE; // Twip-Size am Node setzen?
- BOOL bChangeFrmSize = FALSE; // Frame-Format nachtraeglich anpassen?
- BOOL bRequestGrfNow = FALSE;
- BOOL bSetScaleImageMap = FALSE;
- BYTE nPrcWidth = 0, nPrcHeight = 0;
+ sal_Bool bSetTwipSize = sal_True; // Twip-Size am Node setzen?
+ sal_Bool bChangeFrmSize = sal_False; // Frame-Format nachtraeglich anpassen?
+ sal_Bool bRequestGrfNow = sal_False;
+ sal_Bool bSetScaleImageMap = sal_False;
+ sal_uInt8 nPrcWidth = 0, nPrcHeight = 0;
if( !nWidth || !nHeight )
{
@@ -600,12 +600,12 @@ IMAGE_SETEVENT:
// Tabelle layoutet wird.
if( pTable!=0 && !nWidth )
{
- bRequestGrfNow = TRUE;
+ bRequestGrfNow = sal_True;
IncGrfsThatResizeTable();
}
// Die Groesse des Rahmens wird nachtraeglich gesetzt
- bChangeFrmSize = TRUE;
+ bChangeFrmSize = sal_True;
aGrfSz = aTwipSz;
if( !nWidth && !nHeight )
{
@@ -617,7 +617,7 @@ IMAGE_SETEVENT:
// eine %-Angabe
if( bPrcWidth )
{
- nPrcWidth = (BYTE)nWidth;
+ nPrcWidth = (sal_uInt8)nWidth;
nPrcHeight = 255;
}
else
@@ -629,7 +629,7 @@ IMAGE_SETEVENT:
{
if( bPrcHeight )
{
- nPrcHeight = (BYTE)nHeight;
+ nPrcHeight = (sal_uInt8)nHeight;
nPrcWidth = 255;
}
else
@@ -642,13 +642,13 @@ IMAGE_SETEVENT:
{
// Breite und Hoehe wurden angegeben und brauchen nicht gesetzt
// zu werden
- bSetTwipSize = FALSE;
+ bSetTwipSize = sal_False;
if( bPrcWidth )
- nPrcWidth = (BYTE)nWidth;
+ nPrcWidth = (sal_uInt8)nWidth;
if( bPrcHeight )
- nPrcHeight = (BYTE)nHeight;
+ nPrcHeight = (sal_uInt8)nHeight;
}
// Image-Map setzen
@@ -733,7 +733,7 @@ IMAGE_SETEVENT:
// ggfs. eine Grafik anspringen
if( JUMPTO_GRAPHIC == eJumpTo && sHTMLGrfName == sJmpMark )
{
- bChkJumpMark = TRUE;
+ bChkJumpMark = sal_True;
eJumpTo = JUMPTO_NONE;
}
}
@@ -747,7 +747,7 @@ IMAGE_SETEVENT:
pGrfNd->SetChgTwipSize( bChangeFrmSize, bChangeFrmSize );
if( bSetScaleImageMap )
- pGrfNd->SetScaleImageMap( TRUE );
+ pGrfNd->SetScaleImageMap( sal_True );
if( aAttrTab.pINetFmt )
{
@@ -763,13 +763,13 @@ IMAGE_SETEVENT:
{
const SvxMacro *pMacro;
- static USHORT __READONLY_DATA aEvents[] = {
+ static sal_uInt16 __READONLY_DATA aEvents[] = {
SFX_EVENT_MOUSEOVER_OBJECT,
SFX_EVENT_MOUSECLICK_OBJECT,
SFX_EVENT_MOUSEOUT_OBJECT,
0 };
- for( USHORT n = 0; aEvents[ n ]; ++n )
+ for( sal_uInt16 n = 0; aEvents[ n ]; ++n )
if( 0 != ( pMacro = rINetFmt.GetMacro( aEvents[ n ] ) ))
aMacroItem.SetMacro( aEvents[ n ], *pMacro );
}
@@ -824,20 +824,20 @@ void SwHTMLParser::InsertBodyOptions()
String aBackGround, aId, aStyle, aLang, aDir;
Color aBGColor, aTextColor, aLinkColor, aVLinkColor;
- BOOL bBGColor=FALSE, bTextColor=FALSE;
- BOOL bLinkColor=FALSE, bVLinkColor=FALSE;
+ sal_Bool bBGColor=sal_False, bTextColor=sal_False;
+ sal_Bool bLinkColor=sal_False, bVLinkColor=sal_False;
ScriptType eDfltScriptType;
String sDfltScriptType;
GetDefaultScriptType( eDfltScriptType, sDfltScriptType );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
ScriptType eScriptType2 = eDfltScriptType;
rtl::OUString aEvent;
- BOOL bSetEvent = FALSE;
+ sal_Bool bSetEvent = sal_False;
switch( pOption->GetToken() )
{
@@ -849,47 +849,47 @@ void SwHTMLParser::InsertBodyOptions()
break;
case HTML_O_BGCOLOR:
pOption->GetColor( aBGColor );
- bBGColor = TRUE;
+ bBGColor = sal_True;
break;
case HTML_O_TEXT:
pOption->GetColor( aTextColor );
- bTextColor = TRUE;
+ bTextColor = sal_True;
break;
case HTML_O_LINK:
pOption->GetColor( aLinkColor );
- bLinkColor = TRUE;
+ bLinkColor = sal_True;
break;
case HTML_O_VLINK:
pOption->GetColor( aVLinkColor );
- bVLinkColor = TRUE;
+ bVLinkColor = sal_True;
break;
case HTML_O_SDONLOAD:
eScriptType2 = STARBASIC;
case HTML_O_ONLOAD:
aEvent = GlobalEventConfig::GetEventName( STR_EVENT_OPENDOC );
- bSetEvent = TRUE;
+ bSetEvent = sal_True;
break;
case HTML_O_SDONUNLOAD:
eScriptType2 = STARBASIC;
case HTML_O_ONUNLOAD:
aEvent = GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEDOC );
- bSetEvent = TRUE;
+ bSetEvent = sal_True;
break;
case HTML_O_SDONFOCUS:
eScriptType2 = STARBASIC;
case HTML_O_ONFOCUS:
aEvent = GlobalEventConfig::GetEventName( STR_EVENT_ACTIVATEDOC );
- bSetEvent = TRUE;
+ bSetEvent = sal_True;
break;
case HTML_O_SDONBLUR:
eScriptType2 = STARBASIC;
case HTML_O_ONBLUR:
aEvent = GlobalEventConfig::GetEventName( STR_EVENT_DEACTIVATEDOC );
- bSetEvent = TRUE;
+ bSetEvent = sal_True;
break;
case HTML_O_ONERROR:
@@ -900,7 +900,7 @@ void SwHTMLParser::InsertBodyOptions()
case HTML_O_STYLE:
aStyle = pOption->GetString();
- bTextColor = TRUE;
+ bTextColor = sal_True;
break;
case HTML_O_LANG:
aLang = pOption->GetString();
@@ -931,7 +931,7 @@ void SwHTMLParser::InsertBodyOptions()
// Die Item fuer die Seitenvorlage vorbereiten (Hintergrund, Umrandung)
// Beim BrushItem muessen schon gesetzte werte erhalten bleiben!
SvxBrushItem aBrushItem( pCSS1Parser->GetPageDescBackground() );
- BOOL bSetBrush = FALSE;
+ sal_Bool bSetBrush = sal_False;
if( bBGColor && !pCSS1Parser->IsBodyBGColorSet() )
{
@@ -948,7 +948,7 @@ void SwHTMLParser::InsertBodyOptions()
aBrushItem.SetGraphicLink( aLink );
aBrushItem.SetGraphicPos( ePos );
}
- bSetBrush = TRUE;
+ bSetBrush = sal_True;
pCSS1Parser->SetBodyBGColorSet();
}
@@ -957,7 +957,7 @@ void SwHTMLParser::InsertBodyOptions()
// Hintergrundgrafik aus "BACKGROUND"
aBrushItem.SetGraphicLink( INetURLObject::GetAbsURL( sBaseURL, aBackGround ) );
aBrushItem.SetGraphicPos( GPOS_TILED );
- bSetBrush = TRUE;
+ bSetBrush = sal_True;
pCSS1Parser->SetBodyBackgroundSet();
}
@@ -974,12 +974,12 @@ void SwHTMLParser::InsertBodyOptions()
&aItemSet );
const SfxPoolItem *pItem;
- static USHORT aWhichIds[3] = { RES_CHRATR_FONTSIZE,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,
RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE };
- for( USHORT i=0; i<3; i++ )
+ for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == aItemSet.GetItemState( aWhichIds[i], FALSE,
+ if( SFX_ITEM_SET == aItemSet.GetItemState( aWhichIds[i], sal_False,
&pItem ) &&
static_cast <const SvxFontHeightItem * >(pItem)->GetProp() != 100)
{
@@ -1062,16 +1062,16 @@ void SwHTMLParser::NewAnchor()
SvxMacroTableDtor aMacroTbl;
String sHRef, aName, sTarget;
String aId, aStyle, aClass, aLang, aDir;
- BOOL bHasHRef = FALSE, bFixed = FALSE;
+ sal_Bool bHasHRef = sal_False, bFixed = sal_False;
ScriptType eDfltScriptType;
String sDfltScriptType;
GetDefaultScriptType( eDfltScriptType, sDfltScriptType );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
ScriptType eScriptType2 = eDfltScriptType;
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -1082,7 +1082,7 @@ void SwHTMLParser::NewAnchor()
case HTML_O_HREF:
sHRef = pOption->GetString();
- bHasHRef = TRUE;
+ bHasHRef = sal_True;
break;
case HTML_O_TARGET:
sTarget = pOption->GetString();
@@ -1098,7 +1098,7 @@ void SwHTMLParser::NewAnchor()
aClass = pOption->GetString();
break;
case HTML_O_SDFIXED:
- bFixed = TRUE;
+ bFixed = sal_True;
break;
case HTML_O_LANG:
aLang = pOption->GetString();
@@ -1174,7 +1174,7 @@ ANCHOR_SETEVENT:
// einen neuen Kontext anlegen
_HTMLAttrContext *pCntxt = new _HTMLAttrContext( HTML_ANCHOR_ON );
- BOOL bEnAnchor = FALSE, bFtnAnchor = FALSE, bFtnEnSymbol = FALSE;
+ sal_Bool bEnAnchor = sal_False, bFtnAnchor = sal_False, bFtnEnSymbol = sal_False;
String aFtnName;
String aStrippedClass( aClass );
SwCSS1Parser::GetScriptFromClass( aStrippedClass, sal_False );
@@ -1183,17 +1183,17 @@ ANCHOR_SETEVENT:
('d' == aStrippedClass.GetChar(1) || 'D' == aStrippedClass.GetChar(1)) )
{
if( aStrippedClass.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_sdendnote_anc ) )
- bEnAnchor = TRUE;
+ bEnAnchor = sal_True;
else if( aStrippedClass.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_sdfootnote_anc ) )
- bFtnAnchor = TRUE;
+ bFtnAnchor = sal_True;
else if( aStrippedClass.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_sdendnote_sym ) ||
aStrippedClass.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_sdfootnote_sym ) )
- bFtnEnSymbol = TRUE;
+ bFtnEnSymbol = sal_True;
if( bEnAnchor || bFtnAnchor || bFtnEnSymbol )
{
aFtnName = sHRef.Copy( 1 );
aClass = aStrippedClass = aName = aEmptyStr;
- bHasHRef = FALSE;
+ bHasHRef = sal_False;
}
}
@@ -1206,7 +1206,7 @@ ANCHOR_SETEVENT:
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
{
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
}
@@ -1241,11 +1241,11 @@ ANCHOR_SETEVENT:
if( bEnAnchor || bFtnAnchor )
{
InsertFootEndNote( aFtnName, bEnAnchor, bFixed );
- bInFootEndNoteAnchor = bCallNextToken = TRUE;
+ bInFootEndNoteAnchor = bCallNextToken = sal_True;
}
else if( bFtnEnSymbol )
{
- bInFootEndNoteSymbol = bCallNextToken = TRUE;
+ bInFootEndNoteSymbol = bCallNextToken = sal_True;
}
// den Kontext merken
@@ -1257,11 +1257,11 @@ void SwHTMLParser::EndAnchor()
if( bInFootEndNoteAnchor )
{
FinishFootEndNote();
- bInFootEndNoteAnchor = FALSE;
+ bInFootEndNoteAnchor = sal_False;
}
else if( bInFootEndNoteSymbol )
{
- bInFootEndNoteSymbol = FALSE;
+ bInFootEndNoteSymbol = sal_False;
}
EndTag( HTML_ANCHOR_OFF );
@@ -1276,10 +1276,10 @@ void SwHTMLParser::InsertBookmark( const String& rName )
aSetAttrTab.Insert( pTmp, aSetAttrTab.Count() );
}
-BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const
+sal_Bool SwHTMLParser::HasCurrentParaBookmarks( sal_Bool bIgnoreStack ) const
{
- BOOL bHasMarks = FALSE;
- ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
+ sal_Bool bHasMarks = sal_False;
+ sal_uLong nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
// first step: are there still bookmark in the attribute-stack?
// bookmarks are added to the end of the stack - thus we only have
@@ -1287,13 +1287,13 @@ BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const
if( !bIgnoreStack )
{
_HTMLAttr* pAttr;
- for( USHORT i = aSetAttrTab.Count(); i; )
+ for( sal_uInt16 i = aSetAttrTab.Count(); i; )
{
pAttr = aSetAttrTab[ --i ];
if( RES_FLTR_BOOKMARK == pAttr->pItem->Which() )
{
if( pAttr->GetSttParaIdx() == nNodeIdx )
- bHasMarks = TRUE;
+ bHasMarks = sal_True;
break;
}
}
@@ -1309,10 +1309,10 @@ BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const
ppMark++)
{
const ::sw::mark::IMark* pBookmark = ppMark->get();
- ULONG nBookNdIdx = pBookmark->GetMarkPos().nNode.GetIndex();
+ sal_uLong nBookNdIdx = pBookmark->GetMarkPos().nNode.GetIndex();
if( nBookNdIdx==nNodeIdx )
{
- bHasMarks = TRUE;
+ bHasMarks = sal_True;
break;
}
else if( nBookNdIdx > nNodeIdx )
@@ -1327,7 +1327,7 @@ BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const
void SwHTMLParser::StripTrailingPara()
{
- BOOL bSetSmallFont = FALSE;
+ sal_Bool bSetSmallFont = sal_False;
SwCntntNode* pCNd = pPam->GetCntntNode();
if( !pPam->GetPoint()->nContent.GetIndex() )
@@ -1335,11 +1335,11 @@ void SwHTMLParser::StripTrailingPara()
if( pCNd && pCNd->StartOfSectionIndex()+2 <
pCNd->EndOfSectionIndex() )
{
- ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- for( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
+ for( sal_uInt16 i=0; i<rFrmFmtTbl.Count(); i++ )
{
SwFrmFmt const*const pFmt = rFrmFmtTbl[i];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -1352,7 +1352,7 @@ void SwHTMLParser::StripTrailingPara()
return; // den Knoten duerfen wir nicht loeschen
}
- SetAttr( FALSE ); // die noch offenen Attribute muessen
+ SetAttr( sal_False ); // die noch offenen Attribute muessen
// beendet werden, bevor der Node
// geloescht wird, weil sonst der
// End-Index in die Botanik zeigt
@@ -1377,7 +1377,7 @@ void SwHTMLParser::StripTrailingPara()
ppMark++)
{
::sw::mark::IMark* pMark = ppMark->get();
- ULONG nBookNdIdx = pMark->GetMarkPos().nNode.GetIndex();
+ sal_uLong nBookNdIdx = pMark->GetMarkPos().nNode.GetIndex();
if(nBookNdIdx==nNodeIdx)
{
SwNodeIndex nNewNdIdx(pPam->GetPoint()->nNode);
@@ -1412,7 +1412,7 @@ void SwHTMLParser::StripTrailingPara()
// In leeren Zellen stellen wir einen kleinen Font ein, damit die
// Zelle nicht hoeher wird als die Grafik bzw. so niedrig wie
// moeglich bleibt.
- bSetSmallFont = TRUE;
+ bSetSmallFont = sal_True;
}
}
else if( pCNd && pCNd->IsTxtNode() && pTable &&
@@ -1421,7 +1421,7 @@ void SwHTMLParser::StripTrailingPara()
{
// Wenn die Zelle nur zeichengebundene Grafiken/Rahmen enthaelt
// stellen wir ebenfalls einen kleinen Font ein.
- bSetSmallFont = TRUE;
+ bSetSmallFont = sal_True;
SwTxtNode* pTxtNd = pCNd->GetTxtNode();
xub_StrLen nPos = pPam->GetPoint()->nContent.GetIndex();
diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx
index 0cf9d8d6d04c..e6df6e3978e0 100644
--- a/sw/source/filter/html/htmlnum.cxx
+++ b/sw/source/filter/html/htmlnum.cxx
@@ -307,9 +307,9 @@ void SwHTMLParser::NewNumBulList( int nToken )
// den aktuellen Absatz erst einmal nicht numerieren
{
- BYTE nLvl = nLevel;
+ sal_uInt8 nLvl = nLevel;
// --> OD 2008-04-02 #refactorlists#
-// SetNoNum(&nLvl, TRUE); // #115962#
+// SetNoNum(&nLvl, sal_True); // #115962#
// SetNodeNum( nLvl );
SetNodeNum( nLvl, false );
// <--
@@ -540,7 +540,7 @@ void SwHTMLParser::NewNumBulListItem( int nToken )
// --> OD 2008-04-02 #refactorlists#
// if( HTML_LISTHEADER_ON==nToken )
-// SetNoNum(&nLevel, TRUE);
+// SetNoNum(&nLevel, sal_True);
const bool bCountedInList( HTML_LISTHEADER_ON==nToken ? false : true );
// <--
@@ -721,7 +721,7 @@ void SwHTMLWriter::FillNextNumInfo()
{
pNextNumRuleInfo = 0;
- ULONG nPos = pCurPam->GetPoint()->nNode.GetIndex() + 1;
+ sal_uLong nPos = pCurPam->GetPoint()->nNode.GetIndex() + 1;
sal_Bool bTable = sal_False;
do
@@ -795,7 +795,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
bStartValue = sal_True;
if( rInfo.GetDepth() > 1 )
{
- ULONG nPos =
+ sal_uLong nPos =
rWrt.pCurPam->GetPoint()->nNode.GetIndex() + 1;
do
{
@@ -938,7 +938,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
rWrt.Strm() << sOut.GetBuffer();
if( rWrt.bCfgOutStyles )
- OutCSS1_NumBulListStyleOpt( rWrt, *rInfo.GetNumRule(), (BYTE)i );
+ OutCSS1_NumBulListStyleOpt( rWrt, *rInfo.GetNumRule(), (sal_uInt8)i );
rWrt.Strm() << '>';
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index a154592959dc..e5bddbd5eb5e 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -78,53 +78,53 @@ using namespace com::sun::star;
namespace {
-static char const sHTML_O_Hidden_False[] = "FALSE";
+static char const sHTML_O_Hidden_False[] = "sal_False";
}
-const ULONG HTML_FRMOPTS_EMBED_ALL =
+const sal_uLong HTML_FRMOPTS_EMBED_ALL =
HTML_FRMOPT_ALT |
HTML_FRMOPT_SIZE |
HTML_FRMOPT_NAME;
-const ULONG HTML_FRMOPTS_EMBED_CNTNR =
+const sal_uLong HTML_FRMOPTS_EMBED_CNTNR =
HTML_FRMOPTS_EMBED_ALL |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_EMBED =
+const sal_uLong HTML_FRMOPTS_EMBED =
HTML_FRMOPTS_EMBED_ALL |
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SPACE |
HTML_FRMOPT_BRCLEAR |
HTML_FRMOPT_NAME;
-const ULONG HTML_FRMOPTS_HIDDEN_EMBED =
+const sal_uLong HTML_FRMOPTS_HIDDEN_EMBED =
HTML_FRMOPT_ALT |
HTML_FRMOPT_NAME;
-const ULONG HTML_FRMOPTS_APPLET_ALL =
+const sal_uLong HTML_FRMOPTS_APPLET_ALL =
HTML_FRMOPT_ALT |
HTML_FRMOPT_SIZE;
-const ULONG HTML_FRMOPTS_APPLET_CNTNR =
+const sal_uLong HTML_FRMOPTS_APPLET_CNTNR =
HTML_FRMOPTS_APPLET_ALL |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_APPLET =
+const sal_uLong HTML_FRMOPTS_APPLET =
HTML_FRMOPTS_APPLET_ALL |
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SPACE |
HTML_FRMOPT_BRCLEAR;
-const ULONG HTML_FRMOPTS_IFRAME_ALL =
+const sal_uLong HTML_FRMOPTS_IFRAME_ALL =
HTML_FRMOPT_ALT |
HTML_FRMOPT_SIZE;
-const ULONG HTML_FRMOPTS_IFRAME_CNTNR =
+const sal_uLong HTML_FRMOPTS_IFRAME_CNTNR =
HTML_FRMOPTS_IFRAME_ALL |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_IFRAME =
+const sal_uLong HTML_FRMOPTS_IFRAME =
HTML_FRMOPTS_IFRAME_ALL |
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SPACE |
HTML_FRMOPT_BORDER |
HTML_FRMOPT_BRCLEAR;
-const ULONG HTML_FRMOPTS_OLE_CSS1 =
+const sal_uLong HTML_FRMOPTS_OLE_CSS1 =
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SPACE;
@@ -132,13 +132,13 @@ const ULONG HTML_FRMOPTS_OLE_CSS1 =
void SwHTMLParser::SetFixSize( const Size& rPixSize,
const Size& rTwipDfltSize,
- BOOL bPrcWidth, BOOL bPrcHeight,
+ sal_Bool bPrcWidth, sal_Bool bPrcHeight,
SfxItemSet& /*rCSS1ItemSet*/,
SvxCSS1PropertyInfo& rCSS1PropInfo,
SfxItemSet& rFlyItemSet )
{
// absolulte Groessenangaben in Twip umrechnen
- BYTE nPrcWidth = 0, nPrcHeight = 0;
+ sal_uInt8 nPrcWidth = 0, nPrcHeight = 0;
Size aTwipSz( bPrcWidth || USHRT_MAX==rPixSize.Width() ? 0 : rPixSize.Width(),
bPrcHeight || USHRT_MAX==rPixSize.Height() ? 0 : rPixSize.Height() );
if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() )
@@ -151,7 +151,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
// die Breite bearbeiten
if( SVX_CSS1_LTYPE_PERCENTAGE == rCSS1PropInfo.eWidthType )
{
- nPrcWidth = (BYTE)rCSS1PropInfo.nWidth;
+ nPrcWidth = (sal_uInt8)rCSS1PropInfo.nWidth;
aTwipSz.Width() = rTwipDfltSize.Width();
}
else if( SVX_CSS1_LTYPE_TWIP== rCSS1PropInfo.eWidthType )
@@ -160,7 +160,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
}
else if( bPrcWidth && rPixSize.Width() )
{
- nPrcWidth = (BYTE)rPixSize.Width();
+ nPrcWidth = (sal_uInt8)rPixSize.Width();
if( nPrcWidth > 100 )
nPrcWidth = 100;
@@ -178,7 +178,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
// Hoehe bearbeiten
if( SVX_CSS1_LTYPE_PERCENTAGE == rCSS1PropInfo.eHeightType )
{
- nPrcHeight = (BYTE)rCSS1PropInfo.nHeight;
+ nPrcHeight = (sal_uInt8)rCSS1PropInfo.nHeight;
aTwipSz.Height() = rTwipDfltSize.Height();
}
else if( SVX_CSS1_LTYPE_TWIP== rCSS1PropInfo.eHeightType )
@@ -187,7 +187,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
}
else if( bPrcHeight && rPixSize.Height() )
{
- nPrcHeight = (BYTE)rPixSize.Height();
+ nPrcHeight = (sal_uInt8)rPixSize.Height();
if( nPrcHeight > 100 )
nPrcHeight = 100;
@@ -223,12 +223,12 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
Application::GetDefaultDevice()->PixelToLogic( aTwipSpc,
MapMode(MAP_TWIP) );
nLeftSpace = nRightSpace = aTwipSpc.Width();
- nUpperSpace = nLowerSpace = (USHORT)aTwipSpc.Height();
+ nUpperSpace = nLowerSpace = (sal_uInt16)aTwipSpc.Height();
}
// linken/rechten Rand setzen
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, TRUE, &pItem ) )
+ if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, sal_True, &pItem ) )
{
// Ggf. den Erstzeilen-Einzug noch plaetten
const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem;
@@ -237,12 +237,12 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
if( rCSS1PropInfo.bLeftMargin )
{
nLeftSpace = aLRItem.GetLeft();
- rCSS1PropInfo.bLeftMargin = FALSE;
+ rCSS1PropInfo.bLeftMargin = sal_False;
}
if( rCSS1PropInfo.bRightMargin )
{
nRightSpace = aLRItem.GetRight();
- rCSS1PropInfo.bRightMargin = FALSE;
+ rCSS1PropInfo.bRightMargin = sal_False;
}
rCSS1ItemSet.ClearItem( RES_LR_SPACE );
}
@@ -266,19 +266,19 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
}
// oberen/unteren Rand setzen
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, TRUE, &pItem ) )
+ if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, sal_True, &pItem ) )
{
// Ggf. den Erstzeilen-Einzug noch plaetten
const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem;
if( rCSS1PropInfo.bTopMargin )
{
nUpperSpace = pULItem->GetUpper();
- rCSS1PropInfo.bTopMargin = FALSE;
+ rCSS1PropInfo.bTopMargin = sal_False;
}
if( rCSS1PropInfo.bBottomMargin )
{
nLowerSpace = pULItem->GetLower();
- rCSS1PropInfo.bBottomMargin = FALSE;
+ rCSS1PropInfo.bBottomMargin = sal_False;
}
rCSS1ItemSet.ClearItem( RES_UL_SPACE );
}
@@ -309,7 +309,7 @@ void SwHTMLParser::InsertEmbed()
String aURL, aType, aName, aAlt, aId, aStyle, aClass;
Size aSize( USHRT_MAX, USHRT_MAX );
Size aSpace( USHRT_MAX, USHRT_MAX );
- BOOL bPrcWidth = FALSE, bPrcHeight = FALSE, bHidden = FALSE;
+ sal_Bool bPrcWidth = sal_False, bPrcHeight = sal_False, bHidden = sal_False;
sal_Int16 eVertOri = text::VertOrientation::NONE;
sal_Int16 eHoriOri = text::HoriOrientation::NONE;
SvCommandList aCmdLst;
@@ -318,8 +318,8 @@ void SwHTMLParser::InsertEmbed()
// Die Optionen werden vorwaerts gelesen, weil die Plugins sie in
// dieser Reihenfolge erwarten. Trotzdem darf immer nur der erste
// Wert einer Option beruecksichtigt werden.
- USHORT nArrLen = pHTMLOptions->Count();
- for( USHORT i=0; i<nArrLen; i++ )
+ sal_uInt16 nArrLen = pHTMLOptions->Count();
+ for( sal_uInt16 i=0; i<nArrLen; i++ )
{
const HTMLOption *pOption = (*pHTMLOptions)[i];
switch( pOption->GetToken() )
@@ -405,7 +405,7 @@ void SwHTMLParser::InsertEmbed()
// Size (0,0) wird in SetFrmSize auf (MINFLY, MINFLY) umgebogen
aSize.Width() = 0; aSize.Height() = 0;
aSpace.Width() = 0; aSpace.Height() = 0;
- bPrcWidth = bPrcHeight = FALSE;
+ bPrcWidth = bPrcHeight = sal_False;
}
// die URL aufbereiten
@@ -442,7 +442,7 @@ void SwHTMLParser::InsertEmbed()
xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginCommands"), uno::makeAny( aProps ) );
// TODO/LATER: EnableSetModified?!
- //pPlugin->EnableSetModified( TRUE );
+ //pPlugin->EnableSetModified( sal_True );
}
}
@@ -516,7 +516,7 @@ void SwHTMLParser::NewObject()
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -675,7 +675,7 @@ void SwHTMLParser::InsertApplet()
String aCodeBase, aCode, aName, aAlt, aId, aStyle, aClass;
Size aSize( USHRT_MAX, USHRT_MAX );
Size aSpace( 0, 0 );
- BOOL bPrcWidth = FALSE, bPrcHeight = FALSE, bMayScript = FALSE;
+ sal_Bool bPrcWidth = sal_False, bPrcHeight = sal_False, bMayScript = sal_False;
sal_Int16 eVertOri = text::VertOrientation::TOP;
sal_Int16 eHoriOri = text::HoriOrientation::NONE;
@@ -685,7 +685,7 @@ void SwHTMLParser::InsertApplet()
pAppletImpl = new SwApplet_Impl( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -730,7 +730,7 @@ void SwHTMLParser::InsertApplet()
aSpace.Height() = (long)pOption->GetNumber();
break;
case HTML_O_MAYSCRIPT:
- bMayScript = TRUE;
+ bMayScript = sal_True;
break;
}
@@ -810,7 +810,7 @@ void SwHTMLParser::InsertParam()
String aName, aValue;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -839,15 +839,15 @@ void SwHTMLParser::InsertFloatingFrame()
String aAlt, aId, aStyle, aClass;
Size aSize( USHRT_MAX, USHRT_MAX );
Size aSpace( 0, 0 );
- BOOL bPrcWidth = FALSE, bPrcHeight = FALSE;
+ sal_Bool bPrcWidth = sal_False, bPrcHeight = sal_False;
sal_Int16 eVertOri = text::VertOrientation::TOP;
sal_Int16 eHoriOri = text::HoriOrientation::NONE;
const HTMLOptions *pHTMLOptions = GetOptions();
// Erstmal die Optionen f?r das Writer-Frame-Format holen
- USHORT nArrLen = pHTMLOptions->Count();
- for ( USHORT i=0; i<nArrLen; i++ )
+ sal_uInt16 nArrLen = pHTMLOptions->Count();
+ for ( sal_uInt16 i=0; i<nArrLen; i++ )
{
const HTMLOption *pOption = (*pHTMLOptions)[i];
switch( pOption->GetToken() )
@@ -895,7 +895,7 @@ void SwHTMLParser::InsertFloatingFrame()
::rtl::OUString aObjName;
uno::Reference < embed::XEmbeddedObject > xObj = aCnt.CreateEmbeddedObject( SvGlobalName( SO3_IFRAME_CLASSID ).GetByteSequence(), aObjName );
- //pFrame->EnableSetModified( FALSE );
+ //pFrame->EnableSetModified( sal_False );
try
{
// TODO/MBA: testing
@@ -938,7 +938,7 @@ void SwHTMLParser::InsertFloatingFrame()
{
}
- //pFrame->EnableSetModified( TRUE );
+ //pFrame->EnableSetModified( sal_True );
SfxItemSet aItemSet( pDoc->GetAttrPool(), pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
@@ -973,7 +973,7 @@ void SwHTMLParser::InsertFloatingFrame()
// Ggf Frames anlegen und auto-geb. Rahmen registrieren
RegisterFlyFrm( pFlyFmt );
- bInFloatingFrame = TRUE;
+ bInFloatingFrame = sal_True;
}
/* */
@@ -984,9 +984,9 @@ void SwHTMLParser::InsertFloatingFrame()
#define SWHTML_OPTTYPE_PARAM 2
-static USHORT GetOptionType( const String& rName, BOOL bApplet )
+static sal_uInt16 GetOptionType( const String& rName, sal_Bool bApplet )
{
- USHORT nType = bApplet ? SWHTML_OPTTYPE_PARAM : SWHTML_OPTTYPE_TAG;
+ sal_uInt16 nType = bApplet ? SWHTML_OPTTYPE_PARAM : SWHTML_OPTTYPE_TAG;
switch( rName.GetChar(0) )
{
@@ -1061,7 +1061,7 @@ static USHORT GetOptionType( const String& rName, BOOL bApplet )
}
*/
-USHORT SwHTMLWriter::GuessOLENodeFrmType( const SwNode& rNode )
+sal_uInt16 SwHTMLWriter::GuessOLENodeFrmType( const SwNode& rNode )
{
SwOLEObj& rObj = ((SwOLENode*)rNode.GetOLENode())->GetOLEObj();
@@ -1084,16 +1084,16 @@ USHORT SwHTMLWriter::GuessOLENodeFrmType( const SwNode& rNode )
}
#endif
- return static_cast< USHORT >(eType);
+ return static_cast< sal_uInt16 >(eType);
}
Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL bInCntnr )
+ sal_Bool bInCntnr )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
SwOLENode *pOLENd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetOLENode();
ASSERT( pOLENd, "OLE-Node erwartet" );
@@ -1107,7 +1107,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
return rWrt;
uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY );
- BOOL bHiddenEmbed = FALSE;
+ sal_Bool bHiddenEmbed = sal_False;
if( !xSet.is() )
{
@@ -1116,11 +1116,11 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
}
ByteString aEndTags;
- ULONG nFrmOpts;
+ sal_uLong nFrmOpts;
// wenn meoglich vor dem "Objekt" einen Zeilen-Umbruch ausgeben
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
if( rFrmFmt.GetName().Len() )
rHTMLWrt.OutImplicitMark( rFrmFmt.GetName(),
@@ -1166,7 +1166,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// Das Plugin ist HIDDEN
(sOut += ' ') += OOO_STRING_SW_HTML_O_Hidden;
nFrmOpts = HTML_FRMOPTS_HIDDEN_EMBED;
- bHiddenEmbed = TRUE;
+ bHiddenEmbed = sal_True;
}
else
{
@@ -1264,12 +1264,12 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
SvCommandList aCommands;
aCommands.FillFromSequence( aProps );
SvULongs aParams;
- ULONG i = aCommands.Count();
+ sal_uLong i = aCommands.Count();
while( i > 0 )
{
const SvCommand& rCommand = aCommands[ --i ];
const String& rName = rCommand.GetCommand();
- USHORT nType = SwApplet_Impl::GetOptionType( rName, TRUE );
+ sal_uInt16 nType = SwApplet_Impl::GetOptionType( rName, sal_True );
if( SWHTML_OPTTYPE_TAG == nType )
{
const String& rValue = rCommand.GetArgument();
@@ -1288,7 +1288,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
rHTMLWrt.IncIndentLevel(); // Inhalt von Applet einruecken
- USHORT ii = aParams.Count();
+ sal_uInt16 ii = aParams.Count();
while( ii > 0 )
{
const SvCommand& rCommand = aCommands[ aParams[--ii] ];
@@ -1307,7 +1307,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
rHTMLWrt.DecIndentLevel(); // Inhalt von Applet einruecken
if( aCommands.Count() )
rHTMLWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_applet, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_applet, sal_False );
}
else
if( aGlobName == SvGlobalName( SO3_PLUGIN_CLASSID ) )
@@ -1320,12 +1320,12 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
SvCommandList aCommands;
aCommands.FillFromSequence( aProps );
- for( ULONG i=0; i<aCommands.Count(); i++ )
+ for( sal_uLong i=0; i<aCommands.Count(); i++ )
{
const SvCommand& rCommand = aCommands[ i ];
const String& rName = rCommand.GetCommand();
- if( SwApplet_Impl::GetOptionType( rName, FALSE ) == SWHTML_OPTTYPE_TAG )
+ if( SwApplet_Impl::GetOptionType( rName, sal_False ) == SWHTML_OPTTYPE_TAG )
{
const String& rValue = rCommand.GetArgument();
rWrt.Strm() << ' ';
@@ -1342,7 +1342,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// ausgeben
rHTMLWrt.Strm() << '>';
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_iframe, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_iframe, sal_False );
}
if( aEndTags.Len() )
@@ -1352,12 +1352,12 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
}
Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL bInCntnr )
+ sal_Bool bInCntnr )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
SwOLENode *pOLENd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetOLENode();
ASSERT( pOLENd, "OLE-Node erwartet" );
@@ -1376,7 +1376,7 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt,
if(pTempFileName)
aGrfNm = *pTempFileName;
- USHORT nErr = XOutBitmap::WriteGraphic( aGrf, aGrfNm,
+ sal_uInt16 nErr = XOutBitmap::WriteGraphic( aGrf, aGrfNm,
String::CreateFromAscii("JPG"),
(XOUTBMP_USE_GIF_IF_POSSIBLE |
XOUTBMP_USE_NATIVE_IF_POSSIBLE) );
@@ -1388,7 +1388,7 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt,
aGrfNm = URIHelper::SmartRel2Abs(
INetURLObject(rWrt.GetBaseURL()), aGrfNm,
URIHelper::GetMaybeFileHdl() );
- ULONG nFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR
+ sal_uLong nFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR
: HTML_FRMOPTS_GENIMG;
OutHTML_Image( rWrt, rFrmFmt, aGrfNm,
pOLENd->GetTitle(), pOLENd->GetTwipSize(),
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index ac2f348532e8..446ba5b1ee3b 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -435,7 +435,7 @@ void SwHTMLParser::FixHeaderFooterDistance( sal_Bool bHeader,
const SwFmtCntnt& rFlyCntnt = pHdFtFmt->GetCntnt();
const SwNodeIndex& rCntntStIdx = *rFlyCntnt.GetCntntIdx();
- ULONG nPrvNxtIdx;
+ sal_uLong nPrvNxtIdx;
if( bHeader )
{
nPrvNxtIdx = pDoc->GetNodes()[rCntntStIdx]->EndOfSectionIndex()-1;
@@ -810,7 +810,7 @@ void SwHTMLParser::InsertFlyFrame( const SfxItemSet& rItemSet,
/* */
void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd,
- ULONG nDestIdx,
+ sal_uLong nDestIdx,
sal_Bool bFmtBreak )
{
SwCntntNode* pDestCntntNd =
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index df9f43fafa41..8ba60daf881b 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -2735,7 +2735,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
if( GetBGBrush() )
pSwTable->GetFrmFmt()->SetFmtAttr( *GetBGBrush() );
- ((SwTable *)pSwTable)->SetRowsToRepeat( static_cast< USHORT >(nHeadlineRepeat) );
+ ((SwTable *)pSwTable)->SetRowsToRepeat( static_cast< sal_uInt16 >(nHeadlineRepeat) );
((SwTable *)pSwTable)->GCLines();
sal_Bool bIsInFlyFrame = pContext && pContext->GetFrmFmt();
@@ -3497,15 +3497,15 @@ HTMLTableCnts *SwHTMLParser::InsertTableContents(
{
// eine neue Section anlegen, der PaM steht dann darin
const SwStartNode *pStNd =
- InsertTableSection( static_cast< USHORT >(bHead ? RES_POOLCOLL_TABLE_HDLN
+ InsertTableSection( static_cast< sal_uInt16 >(bHead ? RES_POOLCOLL_TABLE_HDLN
: RES_POOLCOLL_TABLE) );
if( GetNumInfo().GetNumRule() )
{
// 1. Absatz auf nicht numeriert setzen
- BYTE nLvl = GetNumInfo().GetLevel();
+ sal_uInt8 nLvl = GetNumInfo().GetLevel();
// --> OD 2008-04-02 #refactorlists#
-// SetNoNum(&nLvl, TRUE);
+// SetNoNum(&nLvl, sal_True);
// SetNodeNum( nLvl);
SetNodeNum( nLvl, false );
}
@@ -4204,7 +4204,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
!pSaveStruct->IsInSection(),
"Section oder nicht, das ist hier die Frage" );
const SwStartNode *pStNd =
- InsertTableSection( static_cast< USHORT >(pSaveStruct->IsHeaderCell()
+ InsertTableSection( static_cast< sal_uInt16 >(pSaveStruct->IsHeaderCell()
? RES_POOLCOLL_TABLE_HDLN
: RES_POOLCOLL_TABLE ));
const SwEndNode *pEndNd = pStNd->EndOfSectionNode();
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 03e59beefbed..91f857907605 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -100,7 +100,7 @@ class SwHTMLWrtTable : public SwWriteTable
public:
SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth,
- sal_Bool bRel, USHORT nNumOfRowsToRepeat,
+ sal_Bool bRel, sal_uInt16 nNumOfRowsToRepeat,
sal_uInt16 nLeftSub=0, sal_uInt16 nRightSub=0 );
SwHTMLWrtTable( const SwHTMLTableLayout *pLayoutInfo );
@@ -112,7 +112,7 @@ public:
SwHTMLWrtTable::SwHTMLWrtTable( const SwTableLines& rLines, long nWidth,
- sal_uInt32 nBWidth, sal_Bool bRel, USHORT nNumOfRowsToRepeat,
+ sal_uInt32 nBWidth, sal_Bool bRel, sal_uInt16 nNumOfRowsToRepeat,
sal_uInt16 nLSub, sal_uInt16 nRSub )
: SwWriteTable( rLines, nWidth, nBWidth, bRel, MAX_DEPTH, nLSub, nRSub, nNumOfRowsToRepeat )
{
@@ -293,7 +293,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
sal_Bool bHead = sal_False;
if( pSttNd )
{
- ULONG nNdPos = pSttNd->GetIndex()+1;
+ sal_uLong nNdPos = pSttNd->GetIndex()+1;
// Art der Zelle (TD/TH) bestimmen
SwNode* pNd;
diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx
index 8d6aadfc41e2..8c43bd6206ae 100644
--- a/sw/source/filter/html/parcss1.cxx
+++ b/sw/source/filter/html/parcss1.cxx
@@ -79,8 +79,8 @@ void CSS1Parser::InitRead( const String& rIn )
nlLineNr = 0;
nlLinePos = 0;
- bWhiteSpace = TRUE; // Wenn noch nichts gelesen wurde ist das wie WS
- bEOF = FALSE;
+ bWhiteSpace = sal_True; // Wenn noch nichts gelesen wurde ist das wie WS
+ bEOF = sal_False;
eState = CSS1_PAR_WORKING;
nValue = 0.;
@@ -94,7 +94,7 @@ sal_Unicode CSS1Parser::GetNextChar()
{
if( nInPos >= aIn.Len() )
{
- bEOF = TRUE;
+ bEOF = sal_True;
return (sal_Unicode)EOF;
}
@@ -129,10 +129,10 @@ CSS1Token CSS1Parser::GetNextToken()
do {
// Merken, ob davor White-Space gelesen wurde
- BOOL bPrevWhiteSpace = bWhiteSpace;
- bWhiteSpace = FALSE;
+ sal_Bool bPrevWhiteSpace = bWhiteSpace;
+ bWhiteSpace = sal_False;
- BOOL bNextCh = TRUE;
+ sal_Bool bNextCh = sal_True;
switch( cNextCh )
{
case '/': // COMMENT | '/'
@@ -143,7 +143,7 @@ CSS1Token CSS1Parser::GetNextToken()
// COMMENT
cNextCh = GetNextChar();
- BOOL bAsterix = FALSE;
+ sal_Bool bAsterix = sal_False;
while( !(bAsterix && '/'==cNextCh) && !IsEOF() )
{
bAsterix = ('*'==cNextCh);
@@ -153,7 +153,7 @@ CSS1Token CSS1Parser::GetNextToken()
else
{
// '/'
- bNextCh = FALSE;
+ bNextCh = sal_False;
nRet = CSS1_SLASH;
}
}
@@ -200,13 +200,13 @@ CSS1Token CSS1Parser::GetNextToken()
if( CSS1_NULL==nRet )
{
aToken.Erase();
- USHORT nBlockLvl = 0;
+ sal_uInt16 nBlockLvl = 0;
sal_Unicode cQuoteCh = 0;
- BOOL bDone = FALSE, bEscape = FALSE;
+ sal_Bool bDone = sal_False, bEscape = sal_False;
while( !bDone && !IsEOF() )
{
- BOOL bOldEscape = bEscape;
- bEscape = FALSE;
+ sal_Bool bOldEscape = bEscape;
+ bEscape = sal_False;
switch( cNextCh )
{
case '{':
@@ -238,14 +238,14 @@ CSS1Token CSS1Parser::GetNextToken()
break;
case '\\':
if( !bOldEscape )
- bEscape = TRUE;
+ bEscape = sal_True;
break;
}
cNextCh = GetNextChar();
}
}
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
break;
@@ -257,7 +257,7 @@ CSS1Token CSS1Parser::GetNextToken()
while( ( ' ' == cNextCh ||
(cNextCh >= 0x09 && cNextCh <= 0x0d) ) && !IsEOF() )
{
- bWhiteSpace = TRUE;
+ bWhiteSpace = sal_True;
cNextCh = GetNextChar();
}
@@ -287,13 +287,13 @@ CSS1Token CSS1Parser::GetNextToken()
nRet = CSS1_IDENT;
}
- bWhiteSpace = FALSE;
- bNextCh = FALSE;
+ bWhiteSpace = sal_False;
+ bNextCh = sal_False;
}
else
{
// Fehlerbehandlung: '!' ignorieren
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
break;
@@ -333,7 +333,7 @@ CSS1Token CSS1Parser::GetNextToken()
sal_Unicode cNextChSave = cNextCh;
sal_uInt32 nlLineNrSave = nlLineNr;
sal_uInt32 nlLinePosSave = nlLinePos;
- BOOL bEOFSave = bEOF;
+ sal_Bool bEOFSave = bEOF;
// erstmal versuchen eine Hex-Zahl zu scannen
::rtl::OUStringBuffer sTmpBuffer( 16 );
@@ -351,7 +351,7 @@ CSS1Token CSS1Parser::GetNextToken()
// wir haben eine hexadezimale Farbe gefunden
aToken += String(sTmpBuffer.makeStringAndClear());
nRet = CSS1_HEXCOLOR;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
@@ -378,7 +378,7 @@ CSS1Token CSS1Parser::GetNextToken()
while( ( ' ' == cNextCh ||
(cNextCh >= 0x09 && cNextCh <= 0x0d) ) && !IsEOF() )
{
- bWhiteSpace = TRUE;
+ bWhiteSpace = sal_True;
cNextCh = GetNextChar();
}
@@ -386,7 +386,7 @@ CSS1Token CSS1Parser::GetNextToken()
switch( cNextCh )
{
case '%': // PERCENTAGE
- bWhiteSpace = FALSE;
+ bWhiteSpace = sal_False;
nRet = CSS1_PERCENTAGE;
break;
@@ -404,9 +404,9 @@ CSS1Token CSS1Parser::GetNextToken()
// die aktuelle Position retten
xub_StrLen nInPosOld = nInPos;
sal_Unicode cNextChOld = cNextCh;
- ULONG nlLineNrOld = nlLineNr;
- ULONG nlLinePosOld = nlLinePos;
- BOOL bEOFOld = bEOF;
+ sal_uLong nlLineNrOld = nlLineNr;
+ sal_uLong nlLinePosOld = nlLinePos;
+ sal_Bool bEOFOld = bEOF;
// den naechsten Identifer scannen
String aIdent;
@@ -502,13 +502,13 @@ CSS1Token CSS1Parser::GetNextToken()
}
else
{
- bWhiteSpace = FALSE;
+ bWhiteSpace = sal_False;
}
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
break;
default: // NUMBER IDENT
- bNextCh = FALSE;
+ bNextCh = sal_False;
nRet = CSS1_NUMBER;
break;
}
@@ -559,9 +559,9 @@ CSS1Token CSS1Parser::GetNextToken()
// die aktuelle Position retten
xub_StrLen nInPosSave = nInPos;
sal_Unicode cNextChSave = cNextCh;
- ULONG nlLineNrSave = nlLineNr;
- ULONG nlLinePosSave = nlLinePos;
- BOOL bEOFSave = bEOF;
+ sal_uLong nlLineNrSave = nlLineNr;
+ sal_uLong nlLinePosSave = nlLinePos;
+ sal_Bool bEOFSave = bEOF;
// erstmal versuchen eine Hex-Zahl zu scannen
::rtl::OUStringBuffer sTmpBuffer( 6L );
@@ -579,7 +579,7 @@ CSS1Token CSS1Parser::GetNextToken()
// wir haben eine hexadezimale Farbe gefunden
aToken += String(sTmpBuffer.makeStringAndClear());
nRet = CSS1_HEXCOLOR;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
@@ -593,21 +593,21 @@ CSS1Token CSS1Parser::GetNextToken()
}
nRet = CSS1_HASH;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
case ' ':
case '\t':
case '\r':
case '\n': // White-Space
- bWhiteSpace = TRUE;
+ bWhiteSpace = sal_True;
break;
case (sal_Unicode)EOF:
if( IsEOF() )
{
eState = CSS1_PAR_ACCEPTED;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
// kein break;
@@ -619,7 +619,7 @@ CSS1Token CSS1Parser::GetNextToken()
{
// IDENT
- BOOL bHexColor = TRUE;
+ sal_Bool bHexColor = sal_True;
// den naechsten Identifer scannen
::rtl::OUStringBuffer sTmpBuffer( 64L );
@@ -644,7 +644,7 @@ CSS1Token CSS1Parser::GetNextToken()
if( bHexColor && sTmpBuffer.getLength()==6 )
{
- bNextCh = FALSE;
+ bNextCh = sal_False;
nRet = CSS1_HEXCOLOR;
break;
@@ -655,7 +655,7 @@ CSS1Token CSS1Parser::GetNextToken()
(('r'==aToken.GetChar(0) || 'R'==aToken.GetChar(0)) &&
aToken.EqualsIgnoreCaseAscii(sCSS1_rgb)) ) )
{
- USHORT nNestCnt = 0;
+ sal_uInt16 nNestCnt = 0;
::rtl::OUStringBuffer sTmpBuffer2( 64L );
do {
sTmpBuffer2.append( cNextCh );
@@ -668,14 +668,14 @@ CSS1Token CSS1Parser::GetNextToken()
} while( (nNestCnt>1 || ')'!=cNextCh) && !IsEOF() );
sTmpBuffer2.append( cNextCh );
aToken += String(sTmpBuffer2.makeStringAndClear());
- bNextCh = TRUE;
+ bNextCh = sal_True;
nRet = 'u'==aToken.GetChar(0) || 'U'==aToken.GetChar(0)
? CSS1_URL
: CSS1_RGB;
}
else
{
- bNextCh = FALSE;
+ bNextCh = sal_False;
nRet = CSS1_IDENT;
}
}
@@ -716,7 +716,7 @@ void CSS1Parser::ParseStyleSheet()
LOOP_CHECK_DECL
// import*
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
while( !bDone && IsParserWorking() )
{
LOOP_CHECK_CHECK( "Endlos-Schleife in ParseStyleSheet()/import *" )
@@ -735,7 +735,7 @@ void CSS1Parser::ParseStyleSheet()
case CSS1_PAGE_SYM:
// /Feature: PrintExt
// rule
- bDone = TRUE;
+ bDone = sal_True;
break;
default:
// Fehlerbehandlung: ueberlesen
@@ -784,7 +784,7 @@ void CSS1Parser::ParseRule()
return;
// Selektor verarbeiten
- if( SelectorParsed( pSelector, TRUE ) )
+ if( SelectorParsed( pSelector, sal_True ) )
delete pSelector;
LOOP_CHECK_DECL
@@ -803,7 +803,7 @@ void CSS1Parser::ParseRule()
return;
// Selektor verarbeiten
- if( SelectorParsed( pSelector, FALSE ) )
+ if( SelectorParsed( pSelector, sal_False ) )
delete pSelector;
}
@@ -874,7 +874,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
{
CSS1Selector *pRoot = 0, *pLast = 0;
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
CSS1Selector *pNew = 0;
LOOP_CHECK_DECL
@@ -884,7 +884,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
{
LOOP_CHECK_CHECK( "Endlos-Schleife in ParseSelector()" )
- BOOL bNextToken = TRUE;
+ sal_Bool bNextToken = sal_True;
switch( nToken )
{
@@ -917,7 +917,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
else
{
// das war jetzt ein Look-Ahead
- bNextToken = FALSE;
+ bNextToken = sal_False;
}
pNew = new CSS1Selector( eType, aElement );
}
@@ -968,7 +968,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
default:
// wir wissen nicht was kommt, also aufhoehren
- bDone = TRUE;
+ bDone = sal_True;
break;
}
@@ -1065,7 +1065,7 @@ CSS1Expression *CSS1Parser::ParseDeclaration( String& rProperty )
// term [operator term]*
// hier sind wir sehr lax, was die Syntax angeht, sollte aber kein
// Problem sein
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
sal_Unicode cSign = 0, cOp = 0;
CSS1Expression *pNew = 0;
@@ -1115,7 +1115,7 @@ CSS1Expression *CSS1Parser::ParseDeclaration( String& rProperty )
break;
default:
- bDone = TRUE;
+ bDone = sal_True;
break;
}
@@ -1165,7 +1165,7 @@ CSS1Parser::~CSS1Parser()
/* */
-BOOL CSS1Parser::ParseStyleSheet( const String& rIn )
+sal_Bool CSS1Parser::ParseStyleSheet( const String& rIn )
{
String aTmp( rIn );
@@ -1188,20 +1188,20 @@ BOOL CSS1Parser::ParseStyleSheet( const String& rIn )
aTmp.Erase( aTmp.Len()-3 );
if( !aTmp.Len() )
- return TRUE;
+ return sal_True;
InitRead( aTmp );
ParseStyleSheet();
- return TRUE;
+ return sal_True;
}
-BOOL CSS1Parser::ParseStyleOption( const String& rIn )
+sal_Bool CSS1Parser::ParseStyleOption( const String& rIn )
{
if( !rIn.Len() )
- return TRUE;
+ return sal_True;
InitRead( rIn );
@@ -1209,7 +1209,7 @@ BOOL CSS1Parser::ParseStyleOption( const String& rIn )
CSS1Expression *pExpr = ParseDeclaration( aProperty );
if( !pExpr )
{
- return FALSE;
+ return sal_False;
}
// expression verarbeiten
@@ -1236,20 +1236,20 @@ BOOL CSS1Parser::ParseStyleOption( const String& rIn )
}
}
- return TRUE;
+ return sal_True;
}
-BOOL CSS1Parser::SelectorParsed( const CSS1Selector * /* pSelector */, BOOL /*bFirst*/ )
+sal_Bool CSS1Parser::SelectorParsed( const CSS1Selector * /* pSelector */, sal_Bool /*bFirst*/ )
{
// Selektor loeschen
- return TRUE;
+ return sal_True;
}
-BOOL CSS1Parser::DeclarationParsed( const String& /*rProperty*/,
+sal_Bool CSS1Parser::DeclarationParsed( const String& /*rProperty*/,
const CSS1Expression * /* pExpr */ )
{
// Deklaration loeschen
- return TRUE;
+ return sal_True;
}
@@ -1267,7 +1267,7 @@ CSS1Expression::~CSS1Expression()
delete pNext;
}
-BOOL CSS1Expression::GetURL( String& rURL ) const
+sal_Bool CSS1Expression::GetURL( String& rURL ) const
{
DBG_ASSERT( CSS1_URL==eType, "CSS1-Ausruck ist keine Farbe URL" );
@@ -1278,33 +1278,33 @@ BOOL CSS1Expression::GetURL( String& rURL ) const
')' == aValue.GetChar(aValue.Len()-1),
"keine gueltiges URL(...)" );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aValue.Len() > 5 )
{
rURL = aValue.Copy( 4, aValue.Len()-5 );
rURL.EraseTrailingChars();
rURL.EraseLeadingChars();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-BOOL CSS1Expression::GetColor( Color &rColor ) const
+sal_Bool CSS1Expression::GetColor( Color &rColor ) const
{
DBG_ASSERT( CSS1_IDENT==eType || CSS1_RGB==eType ||
CSS1_HEXCOLOR==eType || CSS1_STRING==eType,
"CSS1-Ausruck kann keine Farbe sein" );
- BOOL bRet = FALSE;
- ULONG nColor = ULONG_MAX;
+ sal_Bool bRet = sal_False;
+ sal_uLong nColor = ULONG_MAX;
switch( eType )
{
case CSS1_RGB:
{
- BYTE aColors[3] = { 0, 0, 0 };
+ sal_uInt8 aColors[3] = { 0, 0, 0 };
DBG_ASSERT( aValue.CompareIgnoreCaseToAscii( sCSS1_rgb, 3 )
== COMPARE_EQUAL &&
@@ -1316,7 +1316,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
String aColorStr( aValue.Copy( 4, aValue.Len()-1 ) );
xub_StrLen nPos = 0;
- USHORT nCol = 0;
+ sal_uInt16 nCol = 0;
while( nCol < 3 && nPos < aColorStr.Len() )
{
@@ -1339,7 +1339,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
nPos = nEnd+1;
}
- USHORT nNumber = (USHORT)aNumber.ToInt32();
+ sal_uInt16 nNumber = (sal_uInt16)aNumber.ToInt32();
if( aNumber.Search('%') != STRING_NOTFOUND )
{
if( nNumber > 100 )
@@ -1350,7 +1350,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
else if( nNumber > 255 )
nNumber = 255;
- aColors[nCol] = (BYTE)nNumber;
+ aColors[nCol] = (sal_uInt8)nNumber;
nCol ++;
}
@@ -1358,7 +1358,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
rColor.SetGreen( aColors[1] );
rColor.SetBlue( aColors[2] );
- bRet = TRUE; // etwas anderes als eine Farbe kann es nicht sein
+ bRet = sal_True; // etwas anderes als eine Farbe kann es nicht sein
}
break;
@@ -1378,7 +1378,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
{
// HACK fuer MS-IE: DIe Farbe kann auch in einem String stehen
xub_StrLen nOffset = CSS1_STRING==eType ? 1 : 0;
- BOOL bDouble = aValue.Len()-nOffset == 3;
+ sal_Bool bDouble = aValue.Len()-nOffset == 3;
xub_StrLen i = nOffset, nEnd = (bDouble ? 3 : 6) + nOffset;
nColor = 0;
@@ -1406,7 +1406,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
}
}
// bRet = i==6;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
default:
@@ -1416,9 +1416,9 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
if( bRet && nColor!=ULONG_MAX )
{
- rColor.SetRed( (BYTE)((nColor & 0x00ff0000UL) >> 16) );
- rColor.SetGreen( (BYTE)((nColor & 0x0000ff00UL) >> 8) );
- rColor.SetBlue( (BYTE)(nColor & 0x000000ffUL) );
+ rColor.SetRed( (sal_uInt8)((nColor & 0x00ff0000UL) >> 16) );
+ rColor.SetGreen( (sal_uInt8)((nColor & 0x0000ff00UL) >> 8) );
+ rColor.SetBlue( (sal_uInt8)(nColor & 0x000000ffUL) );
}
return bRet;
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index f1dd5631eca4..0590f7881799 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -260,13 +260,13 @@ static CSS1PropertyEnum __READONLY_DATA aPageBreakTable[] =
DEF_DOUBLE_LINE##n##_DIST
-static USHORT __READONLY_DATA aSBorderWidths[] =
+static sal_uInt16 __READONLY_DATA aSBorderWidths[] =
{
SBORDER_ENTRY( 0 ), SBORDER_ENTRY( 1 ), SBORDER_ENTRY( 2 ),
SBORDER_ENTRY( 3 ), SBORDER_ENTRY( 4 )
};
-static USHORT __READONLY_DATA aDBorderWidths[] =
+static sal_uInt16 __READONLY_DATA aDBorderWidths[] =
{
DBORDER_ENTRY( 0 ),
DBORDER_ENTRY( 7 ),
@@ -280,7 +280,7 @@ static USHORT __READONLY_DATA aDBorderWidths[] =
DBORDER_ENTRY( 5 )
};
-static USHORT __READONLY_DATA aTDBorderWidths[] =
+static sal_uInt16 __READONLY_DATA aTDBorderWidths[] =
{
TDBORDER_ENTRY( 7 ), TDBORDER_ENTRY( 8 ), TDBORDER_ENTRY( 9 ),
TDBORDER_ENTRY( 10 )
@@ -293,41 +293,41 @@ static USHORT __READONLY_DATA aTDBorderWidths[] =
struct SvxCSS1ItemIds
{
- USHORT nFont;
- USHORT nFontCJK;
- USHORT nFontCTL;
- USHORT nPosture;
- USHORT nPostureCJK;
- USHORT nPostureCTL;
- USHORT nWeight;
- USHORT nWeightCJK;
- USHORT nWeightCTL;
- USHORT nFontHeight;
- USHORT nFontHeightCJK;
- USHORT nFontHeightCTL;
- USHORT nUnderline;
- USHORT nOverline;
- USHORT nCrossedOut;
- USHORT nColor;
- USHORT nKerning;
- USHORT nCaseMap;
- USHORT nBlink;
-
- USHORT nLineSpacing;
- USHORT nAdjust;
- USHORT nWidows;
- USHORT nOrphans;
- USHORT nFmtSplit;
-
- USHORT nLRSpace;
- USHORT nULSpace;
- USHORT nBox;
- USHORT nBrush;
-
- USHORT nLanguage;
- USHORT nLanguageCJK;
- USHORT nLanguageCTL;
- USHORT nDirection;
+ sal_uInt16 nFont;
+ sal_uInt16 nFontCJK;
+ sal_uInt16 nFontCTL;
+ sal_uInt16 nPosture;
+ sal_uInt16 nPostureCJK;
+ sal_uInt16 nPostureCTL;
+ sal_uInt16 nWeight;
+ sal_uInt16 nWeightCJK;
+ sal_uInt16 nWeightCTL;
+ sal_uInt16 nFontHeight;
+ sal_uInt16 nFontHeightCJK;
+ sal_uInt16 nFontHeightCTL;
+ sal_uInt16 nUnderline;
+ sal_uInt16 nOverline;
+ sal_uInt16 nCrossedOut;
+ sal_uInt16 nColor;
+ sal_uInt16 nKerning;
+ sal_uInt16 nCaseMap;
+ sal_uInt16 nBlink;
+
+ sal_uInt16 nLineSpacing;
+ sal_uInt16 nAdjust;
+ sal_uInt16 nWidows;
+ sal_uInt16 nOrphans;
+ sal_uInt16 nFmtSplit;
+
+ sal_uInt16 nLRSpace;
+ sal_uInt16 nULSpace;
+ sal_uInt16 nBox;
+ sal_uInt16 nBrush;
+
+ sal_uInt16 nLanguage;
+ sal_uInt16 nLanguageCJK;
+ sal_uInt16 nLanguageCTL;
+ sal_uInt16 nDirection;
};
@@ -339,8 +339,8 @@ static SvxCSS1ItemIds aItemIds;
struct SvxCSS1BorderInfo
{
Color aColor;
- USHORT nAbsWidth;
- USHORT nNamedWidth;
+ sal_uInt16 nAbsWidth;
+ sal_uInt16 nNamedWidth;
CSS1BorderStyle eStyle;
SvxCSS1BorderInfo() :
@@ -353,10 +353,10 @@ struct SvxCSS1BorderInfo
nNamedWidth( rInfo.nNamedWidth ), eStyle( rInfo.eStyle )
{}
- void SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) const;
+ void SetBorderLine( sal_uInt16 nLine, SvxBoxItem &rBoxItem ) const;
};
-void SvxCSS1BorderInfo::SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) const
+void SvxCSS1BorderInfo::SetBorderLine( sal_uInt16 nLine, SvxBoxItem &rBoxItem ) const
{
if( CSS1_BS_NONE==eStyle || nAbsWidth==0 ||
(nAbsWidth==USHRT_MAX && nNamedWidth==USHRT_MAX) )
@@ -368,13 +368,13 @@ void SvxCSS1BorderInfo::SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) cons
SvxBorderLine aBorderLine( &aColor );
// Linien-Stil doppelt oder einfach?
- BOOL bDouble = eStyle == CSS1_BS_DOUBLE;
+ sal_Bool bDouble = eStyle == CSS1_BS_DOUBLE;
// benannte Breite umrechnenen, wenn keine absolute gegeben ist
if( nAbsWidth==USHRT_MAX )
{
- const USHORT *aWidths = bDouble ? aDBorderWidths : aSBorderWidths;
- USHORT nNWidth = nNamedWidth * 4;
+ const sal_uInt16 *aWidths = bDouble ? aDBorderWidths : aSBorderWidths;
+ sal_uInt16 nNWidth = nNamedWidth * 4;
aBorderLine.SetOutWidth( aWidths[nNWidth+1] );
aBorderLine.SetInWidth( aWidths[nNWidth+2] );
aBorderLine.SetDistance( aWidths[nNWidth+3] );
@@ -392,7 +392,7 @@ void SvxCSS1BorderInfo::SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) cons
SvxCSS1PropertyInfo::SvxCSS1PropertyInfo()
{
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
aBorderInfos[i] = 0;
Clear();
@@ -427,7 +427,7 @@ SvxCSS1PropertyInfo::SvxCSS1PropertyInfo( const SvxCSS1PropertyInfo& rProp ) :
ePageBreakAfter( rProp.ePageBreakAfter )
// /Feature: PrintExt
{
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
aBorderInfos[i] = rProp.aBorderInfos[i]
? new SvxCSS1BorderInfo( *rProp.aBorderInfos[i] )
: 0;
@@ -440,7 +440,7 @@ SvxCSS1PropertyInfo::~SvxCSS1PropertyInfo()
void SvxCSS1PropertyInfo::DestroyBorderInfos()
{
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
{
delete aBorderInfos[i];
aBorderInfos[i] = 0;
@@ -450,8 +450,8 @@ void SvxCSS1PropertyInfo::DestroyBorderInfos()
void SvxCSS1PropertyInfo::Clear()
{
aId.Erase();
- bTopMargin = bBottomMargin = FALSE;
- bLeftMargin = bRightMargin = bTextIndent = FALSE;
+ bTopMargin = bBottomMargin = sal_False;
+ bLeftMargin = bRightMargin = bTextIndent = sal_False;
nLeftMargin = nRightMargin = 0;
eFloat = SVX_ADJUST_END;
@@ -472,24 +472,24 @@ void SvxCSS1PropertyInfo::Clear()
void SvxCSS1PropertyInfo::Merge( const SvxCSS1PropertyInfo& rProp )
{
if( rProp.bTopMargin )
- bTopMargin = TRUE;
+ bTopMargin = sal_True;
if( rProp.bBottomMargin )
- bBottomMargin = TRUE;
+ bBottomMargin = sal_True;
if( rProp.bLeftMargin )
{
- bLeftMargin = TRUE;
+ bLeftMargin = sal_True;
nLeftMargin = rProp.nLeftMargin;
}
if( rProp.bRightMargin )
{
- bRightMargin = TRUE;
+ bRightMargin = sal_True;
nRightMargin = rProp.nRightMargin;
}
if( rProp.bTextIndent )
- bTextIndent = TRUE;
+ bTextIndent = sal_True;
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
{
if( rProp.aBorderInfos[i] )
{
@@ -556,9 +556,9 @@ void SvxCSS1PropertyInfo::Merge( const SvxCSS1PropertyInfo& rProp )
}
}
-SvxCSS1BorderInfo *SvxCSS1PropertyInfo::GetBorderInfo( USHORT nLine, BOOL bCreate )
+SvxCSS1BorderInfo *SvxCSS1PropertyInfo::GetBorderInfo( sal_uInt16 nLine, sal_Bool bCreate )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
switch( nLine )
{
case BOX_LINE_TOP: nPos = 0; break;
@@ -573,10 +573,10 @@ SvxCSS1BorderInfo *SvxCSS1PropertyInfo::GetBorderInfo( USHORT nLine, BOOL bCreat
return aBorderInfos[nPos];
}
-void SvxCSS1PropertyInfo::CopyBorderInfo( USHORT nSrcLine, USHORT nDstLine,
- USHORT nWhat )
+void SvxCSS1PropertyInfo::CopyBorderInfo( sal_uInt16 nSrcLine, sal_uInt16 nDstLine,
+ sal_uInt16 nWhat )
{
- SvxCSS1BorderInfo *pSrcInfo = GetBorderInfo( nSrcLine, FALSE );
+ SvxCSS1BorderInfo *pSrcInfo = GetBorderInfo( nSrcLine, sal_False );
if( !pSrcInfo )
return;
@@ -594,7 +594,7 @@ void SvxCSS1PropertyInfo::CopyBorderInfo( USHORT nSrcLine, USHORT nDstLine,
pDstInfo->eStyle = pSrcInfo->eStyle;
}
-void SvxCSS1PropertyInfo::CopyBorderInfo( USHORT nCount, USHORT nWhat )
+void SvxCSS1PropertyInfo::CopyBorderInfo( sal_uInt16 nCount, sal_uInt16 nWhat )
{
if( nCount==0 )
{
@@ -608,15 +608,15 @@ void SvxCSS1PropertyInfo::CopyBorderInfo( USHORT nCount, USHORT nWhat )
}
void SvxCSS1PropertyInfo::SetBoxItem( SfxItemSet& rItemSet,
- USHORT nMinBorderDist,
+ sal_uInt16 nMinBorderDist,
const SvxBoxItem *pDfltItem,
- BOOL bTable )
+ sal_Bool bTable )
{
- BOOL bChg = nTopBorderDistance != USHRT_MAX ||
+ sal_Bool bChg = nTopBorderDistance != USHRT_MAX ||
nBottomBorderDistance != USHRT_MAX ||
nLeftBorderDistance != USHRT_MAX ||
nRightBorderDistance != USHRT_MAX;
- USHORT i;
+ sal_uInt16 i;
for( i = 0; !bChg && i < 4; i++ )
bChg = aBorderInfos[i]!=0;
@@ -628,25 +628,25 @@ void SvxCSS1PropertyInfo::SetBoxItem( SfxItemSet& rItemSet,
if( pDfltItem )
aBoxItem = *pDfltItem;
- SvxCSS1BorderInfo *pInfo = GetBorderInfo( BOX_LINE_TOP, FALSE );
+ SvxCSS1BorderInfo *pInfo = GetBorderInfo( BOX_LINE_TOP, sal_False );
if( pInfo )
pInfo->SetBorderLine( BOX_LINE_TOP, aBoxItem );
- pInfo = GetBorderInfo( BOX_LINE_BOTTOM, FALSE );
+ pInfo = GetBorderInfo( BOX_LINE_BOTTOM, sal_False );
if( pInfo )
pInfo->SetBorderLine( BOX_LINE_BOTTOM, aBoxItem );
- pInfo = GetBorderInfo( BOX_LINE_LEFT, FALSE );
+ pInfo = GetBorderInfo( BOX_LINE_LEFT, sal_False );
if( pInfo )
pInfo->SetBorderLine( BOX_LINE_LEFT, aBoxItem );
- pInfo = GetBorderInfo( BOX_LINE_RIGHT, FALSE );
+ pInfo = GetBorderInfo( BOX_LINE_RIGHT, sal_False );
if( pInfo )
pInfo->SetBorderLine( BOX_LINE_RIGHT, aBoxItem );
for( i=0; i<4; i++ )
{
- USHORT nLine = BOX_LINE_TOP, nDist = 0;
+ sal_uInt16 nLine = BOX_LINE_TOP, nDist = 0;
switch( i )
{
case 0: nLine = BOX_LINE_TOP;
@@ -708,12 +708,12 @@ SvxCSS1MapEntry::SvxCSS1MapEntry( const String& rKey, const SfxItemSet& rItemSet
}
#if defined( ICC ) || defined( BLC )
-BOOL operator==( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
+sal_Bool operator==( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
{
return rE1.aKey==rE2.aKey;
}
-BOOL operator<( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
+sal_Bool operator<( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
{
return rE1.aKey<rE2.aKey;
}
@@ -723,16 +723,16 @@ SV_IMPL_OP_PTRARR_SORT( SvxCSS1Map, SvxCSS1MapEntryPtr )
/* */
-BOOL SvxCSS1Parser::StyleParsed( const CSS1Selector * /*pSelector*/,
+sal_Bool SvxCSS1Parser::StyleParsed( const CSS1Selector * /*pSelector*/,
SfxItemSet& /*rItemSet*/,
SvxCSS1PropertyInfo& /*rPropInfo*/ )
{
// wie man sieht passiert hier gar nichts
- return TRUE;
+ return sal_True;
}
-BOOL SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
- BOOL bFirst )
+sal_Bool SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
+ sal_Bool bFirst )
{
if( bFirst )
{
@@ -741,7 +741,7 @@ BOOL SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
// Dieses ist der erste Selektor einer Rule, also muessen
// die bisher geparsten Items auf die Styles verteilt werden
// pSheetPropInfo->CreateBoxItem( *pSheetItemSet, GetDfltBorderDist() );
- for( USHORT i=0; i<aSelectors.Count(); i++ )
+ for( sal_uInt16 i=0; i<aSelectors.Count(); i++ )
{
StyleParsed( aSelectors[i], *pSheetItemSet, *pSheetPropInfo );
}
@@ -755,27 +755,27 @@ BOOL SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
aSelectors.C40_INSERT( CSS1Selector, pSelector, aSelectors.Count() );
- return FALSE; // den Selektor haben wir gespeichert. Loeschen toedlich!
+ return sal_False; // den Selektor haben wir gespeichert. Loeschen toedlich!
}
-BOOL SvxCSS1Parser::DeclarationParsed( const String& rProperty,
+sal_Bool SvxCSS1Parser::DeclarationParsed( const String& rProperty,
const CSS1Expression *pExpr )
{
DBG_ASSERT( pExpr, "DeclarationParsed() ohne Expression" );
if( !pExpr )
- return TRUE;
+ return sal_True;
ParseProperty( rProperty, pExpr );
- return TRUE; // die Deklaration brauchen wir nicht mehr. Loeschen!
+ return sal_True; // die Deklaration brauchen wir nicht mehr. Loeschen!
}
/* */
-SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const String& rBaseURL, USHORT nMinFixLineSp,
- USHORT *pWhichIds, USHORT nWhichIds ) :
+SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const String& rBaseURL, sal_uInt16 nMinFixLineSp,
+ sal_uInt16 *pWhichIds, sal_uInt16 nWhichIds ) :
CSS1Parser(),
sBaseURL( rBaseURL ),
pSheetItemSet(0),
@@ -784,48 +784,48 @@ SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const String& rBaseURL, USHORT
nMinFixLineSpace( nMinFixLineSp ),
eDfltEnc( RTL_TEXTENCODING_DONTKNOW ),
nScriptFlags( CSS1_SCRIPT_ALL ),
- bIgnoreFontFamily( FALSE )
+ bIgnoreFontFamily( sal_False )
{
// Item-Ids auch initialisieren
- aItemIds.nFont = rPool.GetTrueWhich( SID_ATTR_CHAR_FONT, FALSE );
- aItemIds.nFontCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONT, FALSE );
- aItemIds.nFontCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONT, FALSE );
- aItemIds.nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, FALSE );
- aItemIds.nPostureCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_POSTURE, FALSE );
- aItemIds.nPostureCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_POSTURE, FALSE );
- aItemIds.nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, FALSE );
- aItemIds.nWeightCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_WEIGHT, FALSE );
- aItemIds.nWeightCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_WEIGHT, FALSE );
- aItemIds.nFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_FONTHEIGHT, FALSE );
- aItemIds.nFontHeightCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT, FALSE );
- aItemIds.nFontHeightCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT, FALSE );
- aItemIds.nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, FALSE );
- aItemIds.nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, FALSE );
- aItemIds.nCrossedOut = rPool.GetTrueWhich( SID_ATTR_CHAR_STRIKEOUT, FALSE );
- aItemIds.nColor = rPool.GetTrueWhich( SID_ATTR_CHAR_COLOR, FALSE );
- aItemIds.nKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_KERNING, FALSE );
- aItemIds.nCaseMap = rPool.GetTrueWhich( SID_ATTR_CHAR_CASEMAP, FALSE );
- aItemIds.nBlink = rPool.GetTrueWhich( SID_ATTR_FLASH, FALSE );
-
- aItemIds.nLineSpacing = rPool.GetTrueWhich( SID_ATTR_PARA_LINESPACE, FALSE );
- aItemIds.nAdjust = rPool.GetTrueWhich( SID_ATTR_PARA_ADJUST, FALSE );
- aItemIds.nWidows = rPool.GetTrueWhich( SID_ATTR_PARA_WIDOWS, FALSE );
- aItemIds.nOrphans = rPool.GetTrueWhich( SID_ATTR_PARA_ORPHANS, FALSE );
- aItemIds.nFmtSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, FALSE );
-
- aItemIds.nLRSpace = rPool.GetTrueWhich( SID_ATTR_LRSPACE, FALSE );
- aItemIds.nULSpace = rPool.GetTrueWhich( SID_ATTR_ULSPACE, FALSE );
- aItemIds.nBox = rPool.GetTrueWhich( SID_ATTR_BORDER_OUTER, FALSE );
- aItemIds.nBrush = rPool.GetTrueWhich( SID_ATTR_BRUSH, FALSE );
-
- aItemIds.nLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_LANGUAGE, FALSE );
- aItemIds.nLanguageCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_LANGUAGE, FALSE );
- aItemIds.nLanguageCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_LANGUAGE, FALSE );
- aItemIds.nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, FALSE );
-
- aWhichMap.Insert( (USHORT)0, (USHORT)0 );
- SvParser::BuildWhichTbl( aWhichMap, (USHORT *)&aItemIds,
- sizeof(aItemIds) / sizeof(USHORT) );
+ aItemIds.nFont = rPool.GetTrueWhich( SID_ATTR_CHAR_FONT, sal_False );
+ aItemIds.nFontCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONT, sal_False );
+ aItemIds.nFontCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONT, sal_False );
+ aItemIds.nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, sal_False );
+ aItemIds.nPostureCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_POSTURE, sal_False );
+ aItemIds.nPostureCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_POSTURE, sal_False );
+ aItemIds.nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, sal_False );
+ aItemIds.nWeightCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_WEIGHT, sal_False );
+ aItemIds.nWeightCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_WEIGHT, sal_False );
+ aItemIds.nFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_FONTHEIGHT, sal_False );
+ aItemIds.nFontHeightCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT, sal_False );
+ aItemIds.nFontHeightCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT, sal_False );
+ aItemIds.nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, sal_False );
+ aItemIds.nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, sal_False );
+ aItemIds.nCrossedOut = rPool.GetTrueWhich( SID_ATTR_CHAR_STRIKEOUT, sal_False );
+ aItemIds.nColor = rPool.GetTrueWhich( SID_ATTR_CHAR_COLOR, sal_False );
+ aItemIds.nKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_KERNING, sal_False );
+ aItemIds.nCaseMap = rPool.GetTrueWhich( SID_ATTR_CHAR_CASEMAP, sal_False );
+ aItemIds.nBlink = rPool.GetTrueWhich( SID_ATTR_FLASH, sal_False );
+
+ aItemIds.nLineSpacing = rPool.GetTrueWhich( SID_ATTR_PARA_LINESPACE, sal_False );
+ aItemIds.nAdjust = rPool.GetTrueWhich( SID_ATTR_PARA_ADJUST, sal_False );
+ aItemIds.nWidows = rPool.GetTrueWhich( SID_ATTR_PARA_WIDOWS, sal_False );
+ aItemIds.nOrphans = rPool.GetTrueWhich( SID_ATTR_PARA_ORPHANS, sal_False );
+ aItemIds.nFmtSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, sal_False );
+
+ aItemIds.nLRSpace = rPool.GetTrueWhich( SID_ATTR_LRSPACE, sal_False );
+ aItemIds.nULSpace = rPool.GetTrueWhich( SID_ATTR_ULSPACE, sal_False );
+ aItemIds.nBox = rPool.GetTrueWhich( SID_ATTR_BORDER_OUTER, sal_False );
+ aItemIds.nBrush = rPool.GetTrueWhich( SID_ATTR_BRUSH, sal_False );
+
+ aItemIds.nLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_LANGUAGE, sal_False );
+ aItemIds.nLanguageCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_LANGUAGE, sal_False );
+ aItemIds.nLanguageCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_LANGUAGE, sal_False );
+ aItemIds.nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, sal_False );
+
+ aWhichMap.Insert( (sal_uInt16)0, (sal_uInt16)0 );
+ SvParser::BuildWhichTbl( aWhichMap, (sal_uInt16 *)&aItemIds,
+ sizeof(aItemIds) / sizeof(sal_uInt16) );
if( pWhichIds && nWhichIds )
SvParser::BuildWhichTbl( aWhichMap, pWhichIds, nWhichIds );
@@ -844,16 +844,16 @@ SvxCSS1Parser::~SvxCSS1Parser()
/* */
-BOOL SvxCSS1Parser::ParseStyleSheet( const String& rIn )
+sal_Bool SvxCSS1Parser::ParseStyleSheet( const String& rIn )
{
pItemSet = pSheetItemSet;
pPropInfo = pSheetPropInfo;
- BOOL bSuccess = CSS1Parser::ParseStyleSheet( rIn );
+ sal_Bool bSuccess = CSS1Parser::ParseStyleSheet( rIn );
// die bisher geparsten Items auf die Styles verteilt werden
// pSheetPropInfo->CreateBoxItem( *pSheetItemSet, GetDfltBorderDist() );
- for( USHORT i=0; i<aSelectors.Count(); i++ )
+ for( sal_uInt16 i=0; i<aSelectors.Count(); i++ )
{
StyleParsed( aSelectors[i], *pSheetItemSet, *pSheetPropInfo );
}
@@ -870,14 +870,14 @@ BOOL SvxCSS1Parser::ParseStyleSheet( const String& rIn )
return bSuccess;
}
-BOOL SvxCSS1Parser::ParseStyleOption( const String& rIn,
+sal_Bool SvxCSS1Parser::ParseStyleOption( const String& rIn,
SfxItemSet& rItemSet,
SvxCSS1PropertyInfo& rPropInfo )
{
pItemSet = &rItemSet;
pPropInfo = &rPropInfo;
- BOOL bSuccess = CSS1Parser::ParseStyleOption( rIn );
+ sal_Bool bSuccess = CSS1Parser::ParseStyleOption( rIn );
rItemSet.ClearItem( aItemIds.nDirection );
// pPropInfo->CreateBoxItem( *pItemSet, GetDfltBorderDist() );
@@ -889,8 +889,8 @@ BOOL SvxCSS1Parser::ParseStyleOption( const String& rIn,
/* */
-BOOL SvxCSS1Parser::GetEnum( const CSS1PropertyEnum *pPropTable,
- const String &rValue, USHORT& rEnum )
+sal_Bool SvxCSS1Parser::GetEnum( const CSS1PropertyEnum *pPropTable,
+ const String &rValue, sal_uInt16& rEnum )
{
String aValue( rValue );
aValue.ToLowerAscii();
@@ -921,11 +921,11 @@ void SvxCSS1Parser::PixelToTwip( long &rWidth, long &rHeight )
}
}
-void SvxCSS1Parser::SetBorderWidth( SvxBorderLine& aBorderLine, USHORT nWidth,
- BOOL bDouble, BOOL bTable )
+void SvxCSS1Parser::SetBorderWidth( SvxBorderLine& aBorderLine, sal_uInt16 nWidth,
+ sal_Bool bDouble, sal_Bool bTable )
{
- const USHORT *aWidths;
- USHORT nSize;
+ const sal_uInt16 *aWidths;
+ sal_uInt16 nSize;
if( !bDouble )
{
aWidths = aSBorderWidths;
@@ -942,7 +942,7 @@ void SvxCSS1Parser::SetBorderWidth( SvxBorderLine& aBorderLine, USHORT nWidth,
nSize = sizeof( aDBorderWidths );
}
- USHORT i = (nSize / sizeof(USHORT)) - 4;
+ sal_uInt16 i = (nSize / sizeof(sal_uInt16)) - 4;
while( i>0 &&
nWidth <= ((aWidths[i] + aWidths[i-4]) / 2) )
{
@@ -956,9 +956,9 @@ void SvxCSS1Parser::SetBorderWidth( SvxBorderLine& aBorderLine, USHORT nWidth,
aBorderLine.SetDistance( aWidths[i+3] );
}
-sal_uInt32 SvxCSS1Parser::GetFontHeight( USHORT nSize ) const
+sal_uInt32 SvxCSS1Parser::GetFontHeight( sal_uInt16 nSize ) const
{
- USHORT nHeight;
+ sal_uInt16 nHeight;
switch( nSize )
{
@@ -986,7 +986,7 @@ SvxCSS1MapEntry *SvxCSS1Parser::GetMapEntry( const String& rKey,
pSearchEntry->SetKey( rKey );
SvxCSS1MapEntry *pRet = 0;
- USHORT nPos;
+ sal_uInt16 nPos;
if( rMap.Seek_Entry( pSearchEntry, &nPos ) )
pRet = rMap[nPos];
@@ -1002,7 +1002,7 @@ void SvxCSS1Parser::InsertMapEntry( const String& rKey,
if( pEntry )
{
MergeStyles( rItemSet, rProp,
- pEntry->GetItemSet(), pEntry->GetPropertyInfo(), TRUE );
+ pEntry->GetItemSet(), pEntry->GetPropertyInfo(), sal_True );
}
else
{
@@ -1015,7 +1015,7 @@ void SvxCSS1Parser::MergeStyles( const SfxItemSet& rSrcSet,
const SvxCSS1PropertyInfo& rSrcInfo,
SfxItemSet& rTargetSet,
SvxCSS1PropertyInfo& rTargetInfo,
- BOOL bSmart )
+ sal_Bool bSmart )
{
if( !bSmart )
{
@@ -1076,8 +1076,8 @@ static void ParseCSS1_font_size( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "kein Ausdruck" );
- ULONG nHeight = 0;
- USHORT nPropHeight = 100;
+ sal_uLong nHeight = 0;
+ sal_uInt16 nPropHeight = 100;
switch( pExpr->GetType() )
{
@@ -1089,18 +1089,18 @@ static void ParseCSS1_font_size( const CSS1Expression *pExpr,
long nPWidth = 0;
long nPHeight = (long)pExpr->GetNumber();
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nHeight = (ULONG)nPHeight;
+ nHeight = (sal_uLong)nPHeight;
}
break;
//#ifdef PERCENTAGE_POSSIBLE
case CSS1_PERCENTAGE:
// nur fuer Drop-Caps!
- nPropHeight = (USHORT)pExpr->GetNumber();
+ nPropHeight = (sal_uInt16)pExpr->GetNumber();
break;
//#endif
case CSS1_IDENT:
{
- USHORT nSize;
+ sal_uInt16 nSize;
#ifdef PERCENTAGE_POSSIBLE
const String& rValue = pExpr->GetString();
#endif
@@ -1160,8 +1160,8 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
FontPitch ePitch = PITCH_DONTKNOW;
rtl_TextEncoding eEnc = rParser.GetDfltEncoding();
const FontList *pFList = rParser.GetFontList();
- BOOL bFirst = TRUE;
- BOOL bFound = FALSE;
+ sal_Bool bFirst = sal_True;
+ sal_Bool bFound = sal_False;
while( pExpr && (bFirst || ','==pExpr->GetOp() || !pExpr->GetOp()) )
{
CSS1Token eType = pExpr->GetType();
@@ -1192,7 +1192,7 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
const FontInfo& rFInfo = pFList->GetFontInfo( hFont );
if( RTL_TEXTENCODING_DONTKNOW != rFInfo.GetCharSet() )
{
- bFound = TRUE;
+ bFound = sal_True;
if( RTL_TEXTENCODING_SYMBOL == rFInfo.GetCharSet() )
eEnc = RTL_TEXTENCODING_SYMBOL;
}
@@ -1205,7 +1205,7 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
}
pExpr = pExpr->GetNext();
- bFirst = FALSE;
+ bFirst = sal_False;
}
if( aName.Len() && !rParser.IsIgnoreFontFamily() )
@@ -1241,7 +1241,7 @@ static void ParseCSS1_font_weight( const CSS1Expression *pExpr,
case CSS1_IDENT:
case CSS1_STRING: // MS-IE, was sonst
{
- USHORT nWeight;
+ sal_uInt16 nWeight;
if( SvxCSS1Parser::GetEnum( aFontWeightTable, pExpr->GetString(),
nWeight ) )
{
@@ -1263,7 +1263,7 @@ static void ParseCSS1_font_weight( const CSS1Expression *pExpr,
break;
case CSS1_NUMBER:
{
- USHORT nWeight = (USHORT)pExpr->GetNumber();
+ sal_uInt16 nWeight = (sal_uInt16)pExpr->GetNumber();
SvxWeightItem aWeight( nWeight>400 ? WEIGHT_BOLD : WEIGHT_NORMAL,
aItemIds.nWeight );
if( rParser.IsSetWesternProps() )
@@ -1295,8 +1295,8 @@ static void ParseCSS1_font_style( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "kein Ausdruck" );
- BOOL bPosture = FALSE;
- BOOL bCaseMap = FALSE;
+ sal_Bool bPosture = sal_False;
+ sal_Bool bCaseMap = sal_False;
FontItalic eItalic = ITALIC_NONE;
SvxCaseMap eCaseMap = SVX_CASEMAP_NOT_MAPPED;
@@ -1304,7 +1304,7 @@ static void ParseCSS1_font_style( const CSS1Expression *pExpr,
// (wobei nor noch normal | italic und oblique zulaessig sind
// der Wert kann zwei Werte enthalten!
- for( USHORT i=0; pExpr && i<2; i++ )
+ for( sal_uInt16 i=0; pExpr && i<2; i++ )
{
// Auch hier hinterlaesst MS-IEs Parser seine Spuren
if( (CSS1_IDENT==pExpr->GetType() || CSS1_STRING==pExpr->GetType()) &&
@@ -1312,7 +1312,7 @@ static void ParseCSS1_font_style( const CSS1Expression *pExpr,
{
const String& rValue = pExpr->GetString();
// erstmal pruefen, ob es ein Italic-Wert oder 'normal' ist
- USHORT nItalic;
+ sal_uInt16 nItalic;
if( SvxCSS1Parser::GetEnum( aFontStyleTable, rValue, nItalic ) )
{
eItalic = (FontItalic)nItalic;
@@ -1320,15 +1320,15 @@ static void ParseCSS1_font_style( const CSS1Expression *pExpr,
{
// fuer 'normal' muessen wir auch die case-map aussch.
eCaseMap = SVX_CASEMAP_NOT_MAPPED;
- bCaseMap = TRUE;
+ bCaseMap = sal_True;
}
- bPosture = TRUE;
+ bPosture = sal_True;
}
else if( !bCaseMap &&
rValue.EqualsIgnoreCaseAscii(sCSS1_PV_small_caps) )
{
eCaseMap = SVX_CASEMAP_KAPITAELCHEN;
- bCaseMap = TRUE;
+ bCaseMap = sal_True;
}
}
@@ -1372,7 +1372,7 @@ static void ParseCSS1_font_variant( const CSS1Expression *pExpr,
{
case CSS1_IDENT:
{
- USHORT nCaseMap;
+ sal_uInt16 nCaseMap;
if( SvxCSS1Parser::GetEnum( aFontVariantTable, pExpr->GetString(),
nCaseMap ) )
{
@@ -1508,10 +1508,10 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
Color aColor;
String aURL;
- BOOL bColor = FALSE, bTransparent = FALSE;
+ sal_Bool bColor = sal_False, bTransparent = sal_False;
SvxGraphicPosition eRepeat = GPOS_TILED;
SvxGraphicPosition ePos = GPOS_LT;
- BOOL bHori = FALSE, bVert = FALSE;
+ sal_Bool bHori = sal_False, bVert = sal_False;
while( pExpr && !pExpr->GetOp() )
{
@@ -1533,16 +1533,16 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
// koennen Pixel auch wie alle anderen Einheiten behandelt
// werden.
- ULONG nLength = (ULONG)pExpr->GetNumber();
+ sal_uLong nLength = (sal_uLong)pExpr->GetNumber();
if( !bHori )
{
ePos = nLength ? GPOS_MM : GPOS_LT;
- bHori = TRUE;
+ bHori = sal_True;
}
else if( !bVert )
{
MergeVert( ePos, (nLength ? GPOS_LM : GPOS_LT) );
- bVert = TRUE;
+ bVert = sal_True;
}
}
break;
@@ -1551,7 +1551,7 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
{
// die %-Angabe wird auf den enum abgebildet
- USHORT nPerc = (USHORT)pExpr->GetNumber();
+ sal_uInt16 nPerc = (sal_uInt16)pExpr->GetNumber();
if( !bHori )
{
ePos = nPerc < 25 ? GPOS_LT
@@ -1572,11 +1572,11 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
case CSS1_HEXCOLOR:
case CSS1_STRING: // Wegen MS-IE
{
- USHORT nEnum;
+ sal_uInt16 nEnum;
const String &rValue = pExpr->GetString();
if( rValue.EqualsIgnoreCaseAscii( sCSS1_PV_transparent ) )
{
- bTransparent = TRUE;
+ bTransparent = sal_True;
}
if( SvxCSS1Parser::GetEnum( aBGRepeatTable, rValue, nEnum ) )
{
@@ -1611,7 +1611,7 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
// transparent schlaegt alles
if( bTransparent )
{
- bColor = FALSE;
+ bColor = sal_False;
aURL.Erase();
}
@@ -1647,7 +1647,7 @@ static void ParseCSS1_background_color( const CSS1Expression *pExpr,
Color aColor;
- BOOL bColor = FALSE, bTransparent = FALSE;
+ sal_Bool bColor = sal_False, bTransparent = sal_False;
switch( pExpr->GetType() )
{
@@ -1659,7 +1659,7 @@ static void ParseCSS1_background_color( const CSS1Expression *pExpr,
case CSS1_STRING: // Wegen MS-IE
if( pExpr->GetString().EqualsIgnoreCaseAscii( sCSS1_PV_transparent ) )
{
- bTransparent = TRUE;
+ bTransparent = sal_True;
}
else
{
@@ -1693,32 +1693,32 @@ static void ParseCSS1_line_height( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "kein Ausdruck" );
- USHORT nHeight = 0;
- BYTE nPropHeight = 0;
+ sal_uInt16 nHeight = 0;
+ sal_uInt8 nPropHeight = 0;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
- nHeight = (USHORT)pExpr->GetULength();
+ nHeight = (sal_uInt16)pExpr->GetULength();
break;
case CSS1_PIXLENGTH:
{
long nPWidth = 0;
long nPHeight = (long)pExpr->GetNumber();
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nHeight = (USHORT)nPHeight;
+ nHeight = (sal_uInt16)nPHeight;
}
break;
case CSS1_PERCENTAGE:
{
- USHORT nPHeight = (USHORT)pExpr->GetNumber();
- nPropHeight = nPHeight <= 200 ? (BYTE)nPHeight : 200;
+ sal_uInt16 nPHeight = (sal_uInt16)pExpr->GetNumber();
+ nPropHeight = nPHeight <= 200 ? (sal_uInt8)nPHeight : 200;
}
break;
case CSS1_NUMBER:
{
- USHORT nPHeight = (USHORT)(pExpr->GetNumber() * 100);
- nPropHeight = nPHeight <= 200 ? (BYTE)nPHeight : 200;
+ sal_uInt16 nPHeight = (sal_uInt16)(pExpr->GetNumber() * 100);
+ nPropHeight = nPHeight <= 200 ? (sal_uInt8)nPHeight : 200;
}
break;
default:
@@ -1775,7 +1775,7 @@ static void ParseCSS1_font( const CSS1Expression *pExpr,
{
const String& rValue = pExpr->GetString();
- USHORT nEnum;
+ sal_uInt16 nEnum;
if( SvxCSS1Parser::GetEnum( aFontStyleTable, rValue, nEnum ) )
{
@@ -1792,7 +1792,7 @@ static void ParseCSS1_font( const CSS1Expression *pExpr,
}
else
{
- eWeight = (USHORT)pExpr->GetNumber() > 400 ? WEIGHT_BOLD
+ eWeight = (sal_uInt16)pExpr->GetNumber() > 400 ? WEIGHT_BOLD
: WEIGHT_NORMAL;
}
@@ -1915,11 +1915,11 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "kein Ausdruck" );
- BOOL bUnderline = FALSE;
- BOOL bOverline = FALSE;
- BOOL bCrossedOut = FALSE;
- BOOL bBlink = FALSE;
- BOOL bBlinkOn = FALSE;
+ sal_Bool bUnderline = sal_False;
+ sal_Bool bOverline = sal_False;
+ sal_Bool bCrossedOut = sal_False;
+ sal_Bool bBlink = sal_False;
+ sal_Bool bBlinkOn = sal_False;
FontUnderline eUnderline = UNDERLINE_NONE;
FontUnderline eOverline = UNDERLINE_NONE;
FontStrikeout eCrossedOut = STRIKEOUT_NONE;
@@ -1930,73 +1930,73 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr,
{
String aValue = pExpr->GetString();
aValue.ToLowerAscii();
- BOOL bKnown = FALSE;
+ sal_Bool bKnown = sal_False;
switch( aValue.GetChar( 0 ) )
{
case 'n':
if( aValue.EqualsAscii( sCSS1_PV_none ) )
{
- bUnderline = TRUE;
+ bUnderline = sal_True;
eUnderline = UNDERLINE_NONE;
- bOverline = TRUE;
+ bOverline = sal_True;
eOverline = UNDERLINE_NONE;
- bCrossedOut = TRUE;
+ bCrossedOut = sal_True;
eCrossedOut = STRIKEOUT_NONE;
- bBlink = TRUE;
- bBlinkOn = FALSE;
+ bBlink = sal_True;
+ bBlinkOn = sal_False;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
case 'u':
if( aValue.EqualsAscii( sCSS1_PV_underline ) )
{
- bUnderline = TRUE;
+ bUnderline = sal_True;
eUnderline = UNDERLINE_SINGLE;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
case 'o':
if( aValue.EqualsAscii( sCSS1_PV_overline ) )
{
- bOverline = TRUE;
+ bOverline = sal_True;
eOverline = UNDERLINE_SINGLE;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
case 'l':
if( aValue.EqualsAscii( sCSS1_PV_line_through ) )
{
- bCrossedOut = TRUE;
+ bCrossedOut = sal_True;
eCrossedOut = STRIKEOUT_SINGLE;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
case 'b':
if( aValue.EqualsAscii( sCSS1_PV_blink ) )
{
- bBlink = TRUE;
- bBlinkOn = TRUE;
+ bBlink = sal_True;
+ bBlinkOn = sal_True;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
}
if( !bKnown )
{
- bUnderline = TRUE;
+ bUnderline = sal_True;
eUnderline = UNDERLINE_SINGLE;
}
@@ -2028,7 +2028,7 @@ static void ParseCSS1_text_align( const CSS1Expression *pExpr,
if( CSS1_IDENT==pExpr->GetType() ||
CSS1_STRING==pExpr->GetType() ) // MS-IE, mal wieder
{
- USHORT nAdjust;
+ sal_uInt16 nAdjust;
if( SvxCSS1Parser::GetEnum( aTextAlignTable, pExpr->GetString(),
nAdjust ) )
{
@@ -2048,12 +2048,12 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
DBG_ASSERT( pExpr, "kein Ausdruck" );
short nIndent = 0;
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
nIndent = (short)pExpr->GetSLength();
- bSet = TRUE;
+ bSet = sal_True;
break;
case CSS1_PIXLENGTH:
{
@@ -2061,7 +2061,7 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
long nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
nIndent = (short)nPWidth;
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2074,7 +2074,7 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
if( bSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, sal_False,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
@@ -2087,7 +2087,7 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
aLRItem.SetTxtFirstLineOfst( nIndent );
rItemSet.Put( aLRItem );
}
- rPropInfo.bTextIndent = TRUE;
+ rPropInfo.bTextIndent = sal_True;
}
}
@@ -2101,13 +2101,13 @@ static void ParseCSS1_margin_left( const CSS1Expression *pExpr,
DBG_ASSERT( pExpr, "kein Ausdruck" );
long nLeft = 0;
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
{
nLeft = pExpr->GetSLength();
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2115,7 +2115,7 @@ static void ParseCSS1_margin_left( const CSS1Expression *pExpr,
nLeft = (long)pExpr->GetNumber();
long nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nLeft, nPHeight );
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2131,20 +2131,20 @@ static void ParseCSS1_margin_left( const CSS1Expression *pExpr,
if( nLeft < 0 )
nLeft = 0;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, sal_False,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
- aLRItem.SetTxtLeft( (USHORT)nLeft );
+ aLRItem.SetTxtLeft( (sal_uInt16)nLeft );
rItemSet.Put( aLRItem );
}
else
{
SvxLRSpaceItem aLRItem( aItemIds.nLRSpace );
- aLRItem.SetTxtLeft( (USHORT)nLeft );
+ aLRItem.SetTxtLeft( (sal_uInt16)nLeft );
rItemSet.Put( aLRItem );
}
- rPropInfo.bLeftMargin = TRUE;
+ rPropInfo.bLeftMargin = sal_True;
}
}
@@ -2158,13 +2158,13 @@ static void ParseCSS1_margin_right( const CSS1Expression *pExpr,
DBG_ASSERT( pExpr, "kein Ausdruck" );
long nRight = 0;
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
{
nRight = pExpr->GetSLength();
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2172,7 +2172,7 @@ static void ParseCSS1_margin_right( const CSS1Expression *pExpr,
nRight = (long)pExpr->GetNumber();
long nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nRight, nPHeight );
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2188,20 +2188,20 @@ static void ParseCSS1_margin_right( const CSS1Expression *pExpr,
if( nRight < 0 )
nRight = 0;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, sal_False,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
- aLRItem.SetRight( (USHORT)nRight );
+ aLRItem.SetRight( (sal_uInt16)nRight );
rItemSet.Put( aLRItem );
}
else
{
SvxLRSpaceItem aLRItem( aItemIds.nLRSpace );
- aLRItem.SetRight( (USHORT)nRight );
+ aLRItem.SetRight( (sal_uInt16)nRight );
rItemSet.Put( aLRItem );
}
- rPropInfo.bRightMargin = TRUE;
+ rPropInfo.bRightMargin = sal_True;
}
}
@@ -2214,8 +2214,8 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "kein Ausdruck" );
- USHORT nUpper = 0;
- BOOL bSet = FALSE;
+ sal_uInt16 nUpper = 0;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
@@ -2223,8 +2223,8 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
long nTmp = pExpr->GetSLength();
if( nTmp < 0 )
nTmp = 0;
- nUpper = (USHORT)nTmp;
- bSet = TRUE;
+ nUpper = (sal_uInt16)nTmp;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2234,8 +2234,8 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
if( nPHeight < 0 )
nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nUpper = (USHORT)nPHeight;
- bSet = TRUE;
+ nUpper = (sal_uInt16)nPHeight;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2248,7 +2248,7 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
if( bSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, sal_False,
&pItem ) )
{
SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
@@ -2261,7 +2261,7 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
aULItem.SetUpper( nUpper );
rItemSet.Put( aULItem );
}
- rPropInfo.bTopMargin = TRUE;
+ rPropInfo.bTopMargin = sal_True;
}
}
@@ -2274,8 +2274,8 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "kein Ausdruck" );
- USHORT nLower = 0;
- BOOL bSet = FALSE;
+ sal_uInt16 nLower = 0;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
@@ -2283,8 +2283,8 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
long nTmp = pExpr->GetSLength();
if( nTmp < 0 )
nTmp = 0;
- nLower = (USHORT)nTmp;
- bSet = TRUE;
+ nLower = (sal_uInt16)nTmp;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2294,8 +2294,8 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
if( nPHeight < 0 )
nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nLower = (USHORT)nPHeight;
- bSet = TRUE;
+ nLower = (sal_uInt16)nPHeight;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2308,7 +2308,7 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
if( bSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, sal_False,
&pItem ) )
{
SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
@@ -2321,7 +2321,7 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
aULItem.SetLower( nLower );
rItemSet.Put( aULItem );
}
- rPropInfo.bBottomMargin = TRUE;
+ rPropInfo.bBottomMargin = sal_True;
}
}
@@ -2335,11 +2335,11 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
DBG_ASSERT( pExpr, "kein Ausdruck" );
long nMargins[4] = { 0, 0, 0, 0 };
- BOOL bSetMargins[4] = { FALSE, FALSE, FALSE, FALSE };
+ sal_Bool bSetMargins[4] = { sal_False, sal_False, sal_False, sal_False };
- for( USHORT i=0; pExpr && i<4 && !pExpr->GetOp(); i++ )
+ for( sal_uInt16 i=0; pExpr && i<4 && !pExpr->GetOp(); i++ )
{
- BOOL bSetThis = FALSE;
+ sal_Bool bSetThis = sal_False;
long nMargin = 0;
switch( pExpr->GetType() )
@@ -2347,7 +2347,7 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
case CSS1_LENGTH:
{
nMargin = pExpr->GetSLength();
- bSetThis = TRUE;
+ bSetThis = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2355,7 +2355,7 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
long nPWidth = 0;
nMargin = (long)pExpr->GetNumber();
SvxCSS1Parser::PixelToTwip( nPWidth, nMargin );
- bSetThis = TRUE;
+ bSetThis = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2376,19 +2376,19 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
case 0:
nMargins[0] = nMargins[1] =nMargins[2] = nMargins[3] = nMargin;
bSetMargins[0] = bSetMargins[1] =
- bSetMargins[2] = bSetMargins[3] = TRUE;
+ bSetMargins[2] = bSetMargins[3] = sal_True;
break;
case 1:
nMargins[1] = nMargins[3] = nMargin; // right + left
- bSetMargins[1] = bSetMargins[3] = TRUE;
+ bSetMargins[1] = bSetMargins[3] = sal_True;
break;
case 2:
nMargins[2] = nMargin; // bottom
- bSetMargins[2] = TRUE;
+ bSetMargins[2] = sal_True;
break;
case 3:
nMargins[3] = nMargin; // left
- bSetMargins[3] = TRUE;
+ bSetMargins[3] = sal_True;
break;
}
}
@@ -2399,37 +2399,37 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
{
if( bSetMargins[3] )
{
- rPropInfo.bLeftMargin = TRUE;
+ rPropInfo.bLeftMargin = sal_True;
rPropInfo.nLeftMargin = nMargins[3];
if( nMargins[3] < 0 )
nMargins[3] = 0;
}
if( bSetMargins[1] )
{
- rPropInfo.bRightMargin = TRUE;
+ rPropInfo.bRightMargin = sal_True;
rPropInfo.nRightMargin = nMargins[1];
if( nMargins[1] < 0 )
nMargins[1] = 0;
}
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, sal_False,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
if( bSetMargins[3] )
- aLRItem.SetLeft( (USHORT)nMargins[3] );
+ aLRItem.SetLeft( (sal_uInt16)nMargins[3] );
if( bSetMargins[1] )
- aLRItem.SetRight( (USHORT)nMargins[1] );
+ aLRItem.SetRight( (sal_uInt16)nMargins[1] );
rItemSet.Put( aLRItem );
}
else
{
SvxLRSpaceItem aLRItem( aItemIds.nLRSpace );
if( bSetMargins[3] )
- aLRItem.SetLeft( (USHORT)nMargins[3] );
+ aLRItem.SetLeft( (sal_uInt16)nMargins[3] );
if( bSetMargins[1] )
- aLRItem.SetRight( (USHORT)nMargins[1] );
+ aLRItem.SetRight( (sal_uInt16)nMargins[1] );
rItemSet.Put( aLRItem );
}
}
@@ -2442,23 +2442,23 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
nMargins[2] = 0;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, sal_False,
&pItem ) )
{
SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
if( bSetMargins[0] )
- aULItem.SetUpper( (USHORT)nMargins[0] );
+ aULItem.SetUpper( (sal_uInt16)nMargins[0] );
if( bSetMargins[2] )
- aULItem.SetLower( (USHORT)nMargins[2] );
+ aULItem.SetLower( (sal_uInt16)nMargins[2] );
rItemSet.Put( aULItem );
}
else
{
SvxULSpaceItem aULItem( aItemIds.nULSpace );
if( bSetMargins[0] )
- aULItem.SetUpper( (USHORT)nMargins[0] );
+ aULItem.SetUpper( (sal_uInt16)nMargins[0] );
if( bSetMargins[2] )
- aULItem.SetLower( (USHORT)nMargins[2] );
+ aULItem.SetLower( (sal_uInt16)nMargins[2] );
rItemSet.Put( aULItem );
}
@@ -2469,16 +2469,16 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
/* */
-static BOOL ParseCSS1_padding_xxx( const CSS1Expression *pExpr,
+static sal_Bool ParseCSS1_padding_xxx( const CSS1Expression *pExpr,
SfxItemSet & /*rItemSet*/,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/,
- USHORT nWhichLine )
+ sal_uInt16 nWhichLine )
{
DBG_ASSERT( pExpr, "kein Ausdruck" );
- BOOL bSet = FALSE;
- USHORT nDist = 0;
+ sal_Bool bSet = sal_False;
+ sal_uInt16 nDist = 0;
switch( pExpr->GetType() )
{
@@ -2489,8 +2489,8 @@ static BOOL ParseCSS1_padding_xxx( const CSS1Expression *pExpr,
nTmp = 0;
else if( nTmp > USHRT_MAX-1 )
nTmp = USHRT_MAX-1;
- nDist = (USHORT)nTmp;
- bSet = TRUE;
+ nDist = (sal_uInt16)nTmp;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2502,8 +2502,8 @@ static BOOL ParseCSS1_padding_xxx( const CSS1Expression *pExpr,
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
if( nPWidth > USHRT_MAX-1 )
nPWidth = USHRT_MAX-1;
- nDist = (USHORT)nPWidth;
- bSet = TRUE;
+ nDist = (sal_uInt16)nPWidth;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2568,10 +2568,10 @@ static void ParseCSS1_padding( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<4 && pExpr && !pExpr->GetOp() )
{
- USHORT nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
+ sal_uInt16 nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
if( ParseCSS1_padding_xxx( pExpr, rItemSet, rPropInfo, rParser,
nLine ) )
{
@@ -2595,15 +2595,15 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
SfxItemSet & /*rItemSet*/,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/,
- USHORT nWhichLine, BOOL bAll )
+ sal_uInt16 nWhichLine, sal_Bool bAll )
{
DBG_ASSERT( pExpr, "kein Ausdruck" );
- USHORT nWidth = USHRT_MAX; // die Linien-Dicke
- USHORT nNWidth = 1; // benannte Linien-Dicke (und default)
+ sal_uInt16 nWidth = USHRT_MAX; // die Linien-Dicke
+ sal_uInt16 nNWidth = 1; // benannte Linien-Dicke (und default)
CSS1BorderStyle eStyle = CSS1_BS_NONE; // Linien-Style
Color aColor;
- BOOL bColor = FALSE;
+ sal_Bool bColor = sal_False;
while( pExpr && !pExpr->GetOp() )
{
@@ -2612,13 +2612,13 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
case CSS1_RGB:
case CSS1_HEXCOLOR:
if( pExpr->GetColor( aColor ) )
- bColor = TRUE;
+ bColor = sal_True;
break;
case CSS1_IDENT:
{
const String& rValue = pExpr->GetString();
- USHORT nValue;
+ sal_uInt16 nValue;
if( SvxCSS1Parser::GetEnum( aBorderWidthTable, rValue, nValue ) )
{
nNWidth = nValue;
@@ -2629,18 +2629,18 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
}
else if( pExpr->GetColor( aColor ) )
{
- bColor = TRUE;
+ bColor = sal_True;
}
}
break;
case CSS1_LENGTH:
- nWidth = (USHORT)pExpr->GetULength();
+ nWidth = (sal_uInt16)pExpr->GetULength();
break;
case CSS1_PIXLENGTH:
{
- BOOL bHori = nWhichLine == BOX_LINE_TOP ||
+ sal_Bool bHori = nWhichLine == BOX_LINE_TOP ||
nWhichLine == BOX_LINE_BOTTOM;
// Ein Pixel wird zur Haarlinie (ist huebscher)
long nWidthL = (long)pExpr->GetNumber();
@@ -2649,7 +2649,7 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
long nPWidth = bHori ? 0 : nWidthL;
long nPHeight = bHori ? nWidthL : 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nWidth = (USHORT)(bHori ? nPHeight : nPWidth);
+ nWidth = (sal_uInt16)(bHori ? nPHeight : nPWidth);
}
else
nWidth = 1;
@@ -2663,9 +2663,9 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
pExpr = pExpr->GetNext();
}
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
{
- USHORT nLine = 0;
+ sal_uInt16 nLine = 0;
switch( i )
{
case 0: nLine = BOX_LINE_TOP; break;
@@ -2690,18 +2690,18 @@ static void ParseCSS1_border_xxx_width( const CSS1Expression *pExpr,
SfxItemSet & /*rItemSet*/,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/,
- USHORT nWhichLine )
+ sal_uInt16 nWhichLine )
{
DBG_ASSERT( pExpr, "kein Ausdruck" );
- USHORT nWidth = USHRT_MAX; // die Linien-Dicke
- USHORT nNWidth = 1; // benannte Linien-Dicke (und default)
+ sal_uInt16 nWidth = USHRT_MAX; // die Linien-Dicke
+ sal_uInt16 nNWidth = 1; // benannte Linien-Dicke (und default)
switch( pExpr->GetType() )
{
case CSS1_IDENT:
{
- USHORT nValue;
+ sal_uInt16 nValue;
if( SvxCSS1Parser::GetEnum( aBorderWidthTable, pExpr->GetString(), nValue ) )
{
nNWidth = nValue;
@@ -2710,18 +2710,18 @@ static void ParseCSS1_border_xxx_width( const CSS1Expression *pExpr,
break;
case CSS1_LENGTH:
- nWidth = (USHORT)pExpr->GetULength();
+ nWidth = (sal_uInt16)pExpr->GetULength();
break;
case CSS1_PIXLENGTH:
{
- BOOL bHori = nWhichLine == BOX_LINE_TOP ||
+ sal_Bool bHori = nWhichLine == BOX_LINE_TOP ||
nWhichLine == BOX_LINE_BOTTOM;
long nWidthL = (long)pExpr->GetNumber();
long nPWidth = bHori ? 0 : nWidthL;
long nPHeight = bHori ? nWidthL : 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nWidth = (USHORT)(bHori ? nPHeight : nPWidth);
+ nWidth = (sal_uInt16)(bHori ? nPHeight : nPWidth);
}
break;
@@ -2773,10 +2773,10 @@ static void ParseCSS1_border_width( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<4 && pExpr && !pExpr->GetOp() )
{
- USHORT nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
+ sal_uInt16 nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
ParseCSS1_border_xxx_width( pExpr, rItemSet, rPropInfo, rParser, nLine );
rPropInfo.CopyBorderInfo( n, SVX_CSS1_BORDERINFO_WIDTH );
@@ -2790,10 +2790,10 @@ static void ParseCSS1_border_color( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<4 && pExpr && !pExpr->GetOp() )
{
- USHORT nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
+ sal_uInt16 nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
Color aColor;
switch( pExpr->GetType() )
{
@@ -2818,11 +2818,11 @@ static void ParseCSS1_border_style( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<4 && pExpr && !pExpr->GetOp() )
{
- USHORT nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
- USHORT nValue;
+ sal_uInt16 nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
+ sal_uInt16 nValue;
if( CSS1_IDENT==pExpr->GetType() &&
SvxCSS1Parser::GetEnum( aBorderStyleTable, pExpr->GetString(),
nValue ) )
@@ -2842,7 +2842,7 @@ static void ParseCSS1_border_top( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_TOP, FALSE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_TOP, sal_False );
}
static void ParseCSS1_border_right( const CSS1Expression *pExpr,
@@ -2850,7 +2850,7 @@ static void ParseCSS1_border_right( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_RIGHT, FALSE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_RIGHT, sal_False );
}
static void ParseCSS1_border_bottom( const CSS1Expression *pExpr,
@@ -2858,7 +2858,7 @@ static void ParseCSS1_border_bottom( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_BOTTOM, FALSE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_BOTTOM, sal_False );
}
static void ParseCSS1_border_left( const CSS1Expression *pExpr,
@@ -2866,7 +2866,7 @@ static void ParseCSS1_border_left( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_LEFT, FALSE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_LEFT, sal_False );
}
static void ParseCSS1_border( const CSS1Expression *pExpr,
@@ -2874,7 +2874,7 @@ static void ParseCSS1_border( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, 0, TRUE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, 0, sal_True );
}
/* */
@@ -2888,7 +2888,7 @@ static void ParseCSS1_float( const CSS1Expression *pExpr,
if( CSS1_IDENT==pExpr->GetType() )
{
- USHORT nFloat;
+ sal_uInt16 nFloat;
if( SvxCSS1Parser::GetEnum( aFloatTable, pExpr->GetString(), nFloat ) )
rPropInfo.eFloat = (SvxAdjust)nFloat;
}
@@ -2906,7 +2906,7 @@ static void ParseCSS1_position( const CSS1Expression *pExpr,
if( CSS1_IDENT==pExpr->GetType() )
{
- USHORT nPos;
+ sal_uInt16 nPos;
if( SvxCSS1Parser::GetEnum( aPositionTable, pExpr->GetString(), nPos ) )
rPropInfo.ePosition = (SvxCSS1Position)nPos;
}
@@ -2917,7 +2917,7 @@ static void ParseCSS1_position( const CSS1Expression *pExpr,
static void ParseCSS1_length( const CSS1Expression *pExpr,
long& rLength,
SvxCSS1LengthType& rLengthType,
- BOOL bHori )
+ sal_Bool bHori )
{
switch( pExpr->GetType() )
{
@@ -2965,7 +2965,7 @@ static void ParseCSS1_width( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- ParseCSS1_length( pExpr, rPropInfo.nWidth, rPropInfo.eWidthType, TRUE );
+ ParseCSS1_length( pExpr, rPropInfo.nWidth, rPropInfo.eWidthType, sal_True );
}
static void ParseCSS1_height( const CSS1Expression *pExpr,
@@ -2973,7 +2973,7 @@ static void ParseCSS1_height( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- ParseCSS1_length( pExpr, rPropInfo.nHeight, rPropInfo.eHeightType, FALSE );
+ ParseCSS1_length( pExpr, rPropInfo.nHeight, rPropInfo.eHeightType, sal_False );
}
static void ParseCSS1_left( const CSS1Expression *pExpr,
@@ -2981,7 +2981,7 @@ static void ParseCSS1_left( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- ParseCSS1_length( pExpr, rPropInfo.nLeft, rPropInfo.eLeftType, TRUE );
+ ParseCSS1_length( pExpr, rPropInfo.nLeft, rPropInfo.eLeftType, sal_True );
}
static void ParseCSS1_top( const CSS1Expression *pExpr,
@@ -2989,7 +2989,7 @@ static void ParseCSS1_top( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- ParseCSS1_length( pExpr, rPropInfo.nTop, rPropInfo.eTopType, FALSE );
+ ParseCSS1_length( pExpr, rPropInfo.nTop, rPropInfo.eTopType, sal_False );
}
/* */
@@ -3000,14 +3000,14 @@ static void ParseCSS1_size( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<2 && pExpr && !pExpr->GetOp() )
{
switch( pExpr->GetType() )
{
case CSS1_IDENT:
{
- USHORT nValue;
+ sal_uInt16 nValue;
if( SvxCSS1Parser::GetEnum( aSizeTable, pExpr->GetString(),
nValue ) )
{
@@ -3055,7 +3055,7 @@ static void ParseCSS1_page_break_xxx( const CSS1Expression *pExpr,
{
if( CSS1_IDENT == pExpr->GetType() )
{
- USHORT nValue;
+ sal_uInt16 nValue;
if( SvxCSS1Parser::GetEnum( aPageBreakTable, pExpr->GetString(),
nValue ) )
{
@@ -3088,15 +3088,15 @@ static void ParseCSS1_page_break_inside( const CSS1Expression *pExpr,
SvxCSS1PageBreak eBreak(SVX_CSS1_PBREAK_NONE);
ParseCSS1_page_break_xxx( pExpr, eBreak );
- BOOL bSetSplit = FALSE, bSplit = TRUE;
+ sal_Bool bSetSplit = sal_False, bSplit = sal_True;
switch( eBreak )
{
case SVX_CSS1_PBREAK_AUTO:
- bSetSplit = TRUE;
+ bSetSplit = sal_True;
break;
case SVX_CSS1_PBREAK_AVOID:
- bSplit = FALSE;
- bSetSplit = TRUE;
+ bSplit = sal_False;
+ bSetSplit = sal_True;
break;
default:
;
@@ -3113,8 +3113,8 @@ static void ParseCSS1_widows( const CSS1Expression *pExpr,
{
if( CSS1_NUMBER == pExpr->GetType() )
{
- BYTE nVal = pExpr->GetNumber() <= 255
- ? (BYTE)pExpr->GetNumber()
+ sal_uInt8 nVal = pExpr->GetNumber() <= 255
+ ? (sal_uInt8)pExpr->GetNumber()
: 255;
SvxWidowsItem aWidowsItem( nVal, aItemIds.nWidows );
rItemSet.Put( aWidowsItem );
@@ -3128,8 +3128,8 @@ static void ParseCSS1_orphans( const CSS1Expression *pExpr,
{
if( CSS1_NUMBER == pExpr->GetType() )
{
- BYTE nVal = pExpr->GetNumber() <= 255
- ? (BYTE)pExpr->GetNumber()
+ sal_uInt8 nVal = pExpr->GetNumber() <= 255
+ ? (sal_uInt8)pExpr->GetNumber()
: 255;
SvxOrphansItem aOrphansItem( nVal, aItemIds.nOrphans );
rItemSet.Put( aOrphansItem );
@@ -3241,7 +3241,7 @@ static CSS1PropEntry __FAR_DATA aCSS1PropFnTab[] =
/* */
-static int __FAR_DATA bSortedPropFns = FALSE;
+static int __FAR_DATA bSortedPropFns = sal_False;
extern "C"
{
@@ -3289,7 +3289,7 @@ void SvxCSS1Parser::ParseProperty( const String& rProperty,
sizeof( aCSS1PropFnTab ) / sizeof( CSS1PropEntry ),
sizeof( CSS1PropEntry ),
CSS1PropEntryCompare );
- bSortedPropFns = TRUE;
+ bSortedPropFns = sal_True;
}
String aTmp( rProperty );
diff --git a/sw/source/filter/html/swcss1.hxx b/sw/source/filter/html/swcss1.hxx
index 09d16753db82..f0bbd758dce3 100644
--- a/sw/source/filter/html/swcss1.hxx
+++ b/sw/source/filter/html/swcss1.hxx
@@ -49,64 +49,64 @@ class SwCSS1Parser : public SvxCSS1Parser
{
SwDoc *pDoc;
- ULONG aFontHeights[7];
+ sal_uLong aFontHeights[7];
- USHORT nDropCapCnt;
+ sal_uInt16 nDropCapCnt;
- BOOL bIsNewDoc : 1;
+ sal_Bool bIsNewDoc : 1;
- BOOL bBodyBGColorSet : 1;
- BOOL bBodyBackgroundSet : 1;
- BOOL bBodyTextSet : 1;
- BOOL bBodyLinkSet : 1;
- BOOL bBodyVLinkSet : 1;
+ sal_Bool bBodyBGColorSet : 1;
+ sal_Bool bBodyBackgroundSet : 1;
+ sal_Bool bBodyTextSet : 1;
+ sal_Bool bBodyLinkSet : 1;
+ sal_Bool bBodyVLinkSet : 1;
- BOOL bSetFirstPageDesc : 1;
- BOOL bSetRightPageDesc : 1;
+ sal_Bool bSetFirstPageDesc : 1;
+ sal_Bool bSetRightPageDesc : 1;
- BOOL bTableHeaderTxtCollSet : 1;
- BOOL bTableTxtCollSet : 1;
+ sal_Bool bTableHeaderTxtCollSet : 1;
+ sal_Bool bTableTxtCollSet : 1;
- BOOL bLinkCharFmtsSet : 1;
+ sal_Bool bLinkCharFmtsSet : 1;
// die Vorlagen fuer DL anlegen
- SwTxtFmtColl* GetDefListTxtFmtColl( USHORT nCollId, USHORT nDeep );
+ SwTxtFmtColl* GetDefListTxtFmtColl( sal_uInt16 nCollId, sal_uInt16 nDeep );
- const SwPageDesc* GetPageDesc( USHORT nPoolId, BOOL bCreate );
+ const SwPageDesc* GetPageDesc( sal_uInt16 nPoolId, sal_Bool bCreate );
- void SetTableTxtColl( BOOL bHeader );
+ void SetTableTxtColl( sal_Bool bHeader );
void SetLinkCharFmts();
protected:
- virtual BOOL StyleParsed( const CSS1Selector *pSelector,
+ virtual sal_Bool StyleParsed( const CSS1Selector *pSelector,
SfxItemSet& rItemSet,
SvxCSS1PropertyInfo& rPropInfo );
using CSS1Parser::ParseStyleSheet;
public:
- SwCSS1Parser( SwDoc *pDoc, sal_uInt32 aFHeight[7], const String& rBaseURL, BOOL bNewDoc );
+ SwCSS1Parser( SwDoc *pDoc, sal_uInt32 aFHeight[7], const String& rBaseURL, sal_Bool bNewDoc );
virtual ~SwCSS1Parser();
- virtual BOOL ParseStyleSheet( const String& rIn );
+ virtual sal_Bool ParseStyleSheet( const String& rIn );
// Die Font-Hoehe fuer eine bestimmte Font-Groesse (0-6) ermitteln
- virtual sal_uInt32 GetFontHeight( USHORT nSize ) const;
+ virtual sal_uInt32 GetFontHeight( sal_uInt16 nSize ) const;
// Die aktuelle Font-Liste holen (auch 0 ist erlaubt)
virtual const FontList *GetFontList() const;
// das Zeichen-Format zu einem Token und einer ggf leeren Klasse
// ermitteln
- SwCharFmt* GetChrFmt( USHORT nToken, const String& rClass ) const;
+ SwCharFmt* GetChrFmt( sal_uInt16 nToken, const String& rClass ) const;
// eine TextFmtColl zu einer Pool-Id ermitteln
- SwTxtFmtColl *GetTxtFmtColl( USHORT nTxtColl, const String& rClass );
+ SwTxtFmtColl *GetTxtFmtColl( sal_uInt16 nTxtColl, const String& rClass );
// This methods do the same as the one of SwDoc, but change the
// encoding if required.
- SwTxtFmtColl *GetTxtCollFromPool( USHORT nPoolId ) const;
- SwCharFmt *GetCharFmtFromPool( USHORT nPoolId ) const;
+ SwTxtFmtColl *GetTxtCollFromPool( sal_uInt16 nPoolId ) const;
+ SwCharFmt *GetCharFmtFromPool( sal_uInt16 nPoolId ) const;
// Die linke oder rechte Seiten-Vorlage holen. In Dokumenten mit nur
// einer Vorlage gibt es nur eine rechtee Seite.
@@ -114,9 +114,9 @@ public:
// eine Benutzter-Vorlage, die on-demand angelegt wird, wenn
// bCreate gesetzt ist.
SwPageDesc* GetMasterPageDesc();
- inline const SwPageDesc* GetFirstPageDesc( BOOL bCreate=FALSE );
- inline const SwPageDesc* GetRightPageDesc( BOOL bCreate=FALSE );
- inline const SwPageDesc* GetLeftPageDesc( BOOL bCreate=FALSE );
+ inline const SwPageDesc* GetFirstPageDesc( sal_Bool bCreate=sal_False );
+ inline const SwPageDesc* GetRightPageDesc( sal_Bool bCreate=sal_False );
+ inline const SwPageDesc* GetLeftPageDesc( sal_Bool bCreate=sal_False );
// Attribute an der HTML-Seitenvorlage setzen (gesetzte Attribute
// werden aus dem Item-Set geloescht ). Wird fuer's BODY-Tag
@@ -135,7 +135,7 @@ public:
void FillDropCap( SwFmtDrop& rDrop, SfxItemSet& rItemSet,
const String *pName=0 );
- BOOL SetFmtBreak( SfxItemSet& rItemSet,
+ sal_Bool SetFmtBreak( SfxItemSet& rItemSet,
const SvxCSS1PropertyInfo& rPropInfo );
@@ -143,26 +143,26 @@ public:
static inline void AddFirstLetterExt( String& rFmtName );
- static BOOL MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
- BOOL bAutoWidth=FALSE );
+ static sal_Bool MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
+ sal_Bool bAutoWidth=sal_False );
static sal_uInt16 GetScriptFromClass( String& rClass,
sal_Bool bSubClassOnly = sal_True );
- BOOL IsBodyBGColorSet() const { return bBodyBGColorSet; }
- BOOL IsBodyBackgroundSet() const { return bBodyBackgroundSet; }
- BOOL IsBodyTextSet() const { return bBodyTextSet; }
- BOOL IsBodyLinkSet() const { return bBodyLinkSet; }
- BOOL IsBodyVLinkSet() const { return bBodyVLinkSet; }
+ sal_Bool IsBodyBGColorSet() const { return bBodyBGColorSet; }
+ sal_Bool IsBodyBackgroundSet() const { return bBodyBackgroundSet; }
+ sal_Bool IsBodyTextSet() const { return bBodyTextSet; }
+ sal_Bool IsBodyLinkSet() const { return bBodyLinkSet; }
+ sal_Bool IsBodyVLinkSet() const { return bBodyVLinkSet; }
- BOOL IsSetFirstPageDesc() const { return bSetFirstPageDesc; }
- BOOL IsSetRightPageDesc() const { return bSetRightPageDesc; }
+ sal_Bool IsSetFirstPageDesc() const { return bSetFirstPageDesc; }
+ sal_Bool IsSetRightPageDesc() const { return bSetRightPageDesc; }
- void SetBodyBGColorSet() { bBodyBGColorSet = TRUE; }
- void SetBodyBackgroundSet() { bBodyBackgroundSet = TRUE; }
- void SetBodyTextSet() { bBodyTextSet = TRUE; }
- void SetBodyLinkSet() { bBodyLinkSet = TRUE; }
- void SetBodyVLinkSet() { bBodyVLinkSet = TRUE; }
+ void SetBodyBGColorSet() { bBodyBGColorSet = sal_True; }
+ void SetBodyBackgroundSet() { bBodyBackgroundSet = sal_True; }
+ void SetBodyTextSet() { bBodyTextSet = sal_True; }
+ void SetBodyLinkSet() { bBodyLinkSet = sal_True; }
+ void SetBodyVLinkSet() { bBodyVLinkSet = sal_True; }
const SvxBrushItem& GetPageDescBackground() const;
@@ -180,17 +180,17 @@ inline void SwCSS1Parser::AddFirstLetterExt( String& rFmtName )
rFmtName.AppendAscii( ".FL", 3 ); // first letter
}
-inline const SwPageDesc* SwCSS1Parser::GetFirstPageDesc( BOOL bCreate )
+inline const SwPageDesc* SwCSS1Parser::GetFirstPageDesc( sal_Bool bCreate )
{
return GetPageDesc( RES_POOLPAGE_FIRST, bCreate );
}
-inline const SwPageDesc* SwCSS1Parser::GetRightPageDesc( BOOL bCreate )
+inline const SwPageDesc* SwCSS1Parser::GetRightPageDesc( sal_Bool bCreate )
{
return GetPageDesc( RES_POOLPAGE_RIGHT, bCreate );
}
-inline const SwPageDesc* SwCSS1Parser::GetLeftPageDesc( BOOL bCreate )
+inline const SwPageDesc* SwCSS1Parser::GetLeftPageDesc( sal_Bool bCreate )
{
return GetPageDesc( RES_POOLPAGE_LEFT, bCreate );
}
@@ -198,13 +198,13 @@ inline const SwPageDesc* SwCSS1Parser::GetLeftPageDesc( BOOL bCreate )
inline void SwCSS1Parser::SetTHTagStyles()
{
if( !bTableHeaderTxtCollSet )
- SetTableTxtColl( TRUE );
+ SetTableTxtColl( sal_True );
}
inline void SwCSS1Parser::SetTDTagStyles()
{
if( !bTableTxtCollSet )
- SetTableTxtColl( FALSE );
+ SetTableTxtColl( sal_False );
}
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 230da033d50c..668d8562935a 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -158,7 +158,7 @@ SV_IMPL_PTRARR( _HTMLAttrs, _HTMLAttrPtr )
HTMLReader::HTMLReader()
{
- bTmplBrowseMode = TRUE;
+ bTmplBrowseMode = sal_True;
}
String HTMLReader::GetTemplateName() const
@@ -176,7 +176,7 @@ String HTMLReader::GetTemplateName() const
SvtPathOptions aPathOpt;
// OpenDocument Writer/Web template (extension .oth)
- BOOL bSet = aPathOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
+ sal_Bool bSet = aPathOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
#ifndef MAC_WITHOUT_EXT
if( !bSet )
@@ -208,14 +208,14 @@ int HTMLReader::SetStrmStgPtr()
if( pMedium->IsRemote() || !pMedium->IsStorage() )
{
pStrm = pMedium->GetInStream();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// Aufruf fuer die allg. Reader-Schnittstelle
-ULONG HTMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & rName )
+sal_uLong HTMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & rName )
{
if( !pStrm )
{
@@ -239,7 +239,7 @@ ULONG HTMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const
// damit keiner das Doc klaut!
rDoc.acquire();
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
SvParserRef xParser = new SwHTMLParser( &rDoc, rPam, *pStrm,
rName, rBaseURL, !bInsertMode, pMedium,
IsReadUTF8(),
@@ -271,9 +271,9 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
const String& rPath,
const String& rBaseURL,
int bReadNewDoc,
- SfxMedium* pMed, BOOL bReadUTF8,
+ SfxMedium* pMed, sal_Bool bReadUTF8,
sal_Bool bNoHTMLComments )
- : SfxHTMLParser( rIn, static_cast< BOOL >(bReadNewDoc), pMed ),
+ : SfxHTMLParser( rIn, static_cast< sal_Bool >(bReadNewDoc), pMed ),
SwClient( 0 ),
aPathToFile( rPath ),
sBaseURL( rBaseURL ),
@@ -309,33 +309,33 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
nContinue( 0 ),
#endif
eParaAdjust( SVX_ADJUST_END ),
- bDocInitalized( FALSE ),
- bSetModEnabled( FALSE ),
- bInFloatingFrame( FALSE ),
- bInField( FALSE ),
- bCallNextToken( FALSE ),
- bIgnoreRawData( FALSE ),
- bNoParSpace( FALSE ),
- bInNoEmbed( FALSE ),
- bInTitle( FALSE ),
- bUpdateDocStat( FALSE ),
- bFixSelectWidth( FALSE ),
- bFixSelectHeight( FALSE ),
- bTextArea( FALSE ),
- bSelect( FALSE ),
- bInFootEndNoteAnchor( FALSE ),
- bInFootEndNoteSymbol( FALSE ),
+ bDocInitalized( sal_False ),
+ bSetModEnabled( sal_False ),
+ bInFloatingFrame( sal_False ),
+ bInField( sal_False ),
+ bCallNextToken( sal_False ),
+ bIgnoreRawData( sal_False ),
+ bNoParSpace( sal_False ),
+ bInNoEmbed( sal_False ),
+ bInTitle( sal_False ),
+ bUpdateDocStat( sal_False ),
+ bFixSelectWidth( sal_False ),
+ bFixSelectHeight( sal_False ),
+ bTextArea( sal_False ),
+ bSelect( sal_False ),
+ bInFootEndNoteAnchor( sal_False ),
+ bInFootEndNoteSymbol( sal_False ),
// bIgnoreHTMLComments( bNoHTMLComments )
bIgnoreHTMLComments( bNoHTMLComments ),
- bRemoveHidden( FALSE ),
+ bRemoveHidden( sal_False ),
pTempViewFrame(0)
{
nEventId = 0;
bUpperSpace = bViewCreated = bChkJumpMark =
- bSetCrsr = FALSE;
+ bSetCrsr = sal_False;
eScriptLang = HTML_SL_UNKNOWN;
- bAnyStarBasic = TRUE;
+ bAnyStarBasic = sal_True;
pPam = new SwPaM( *rCrsr.GetPoint() );
memset( &aAttrTab, 0, sizeof( _HTMLAttrTable ));
@@ -388,7 +388,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
SwDocShell* pDocSh = pDoc->GetDocShell();
if( pDocSh )
{
- bViewCreated = TRUE; // nicht, synchron laden
+ bViewCreated = sal_True; // nicht, synchron laden
// es ist ein Sprungziel vorgegeben.
@@ -438,8 +438,8 @@ __EXPORT SwHTMLParser::~SwHTMLParser()
#ifdef DBG_UTIL
ASSERT( !nContinue, "DTOR im Continue - Das geht schief!!!" );
#endif
- BOOL bAsync = pDoc->IsInLoadAsynchron();
- pDoc->SetInLoadAsynchron( FALSE );
+ sal_Bool bAsync = pDoc->IsInLoadAsynchron();
+ pDoc->SetInLoadAsynchron( sal_False );
pDoc->set(IDocumentSettingAccess::HTML_MODE, bOldIsHTMLMode);
if( pDoc->GetDocShell() && nEventId )
@@ -450,11 +450,11 @@ __EXPORT SwHTMLParser::~SwHTMLParser()
if( pDoc->GetDocShell() )
{
// Gelinkte Bereiche updaten
- USHORT nLinkMode = pDoc->getLinkUpdateMode( true );
+ sal_uInt16 nLinkMode = pDoc->getLinkUpdateMode( true );
if( nLinkMode != NEVER && bAsync &&
SFX_CREATE_MODE_INTERNAL!=pDoc->GetDocShell()->GetCreateMode() )
pDoc->GetLinkManager().UpdateAllLinks( nLinkMode == MANUAL,
- TRUE, FALSE );
+ sal_True, sal_False );
if ( pDoc->GetDocShell()->IsLoading() )
{
@@ -561,7 +561,7 @@ SvParserState __EXPORT SwHTMLParser::CallParser()
}
else
{
- bViewCreated = TRUE;
+ bViewCreated = sal_True;
nEventId = 0;
}
}
@@ -609,8 +609,8 @@ void __EXPORT SwHTMLParser::Continue( int nToken )
// An dieser Stelle wurde im CallParser gerade mal ein Zeichen
// gelesen und ein SaveState(0) gerufen.
eState = SVPAR_PENDING;
- bViewCreated = TRUE;
- pDoc->SetInLoadAsynchron( TRUE );
+ bViewCreated = sal_True;
+ pDoc->SetInLoadAsynchron( sal_True );
#ifdef DBG_UTIL
nContinue--;
@@ -619,20 +619,20 @@ void __EXPORT SwHTMLParser::Continue( int nToken )
return;
}
- bSetModEnabled = FALSE;
+ bSetModEnabled = sal_False;
if( pDoc->GetDocShell() &&
0 != (bSetModEnabled = pDoc->GetDocShell()->IsEnableSetModified()) )
{
- pDoc->GetDocShell()->EnableSetModified( FALSE );
+ pDoc->GetDocShell()->EnableSetModified( sal_False );
}
// waehrend des einlesens kein OLE-Modified rufen
Link aOLELink( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- BOOL bModified = pDoc->IsModified();
- BOOL bWasUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bModified = pDoc->IsModified();
+ sal_Bool bWasUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
// Wenn der Import abgebrochen wird, kein Continue mehr rufen.
// Falls ein Pending-Stack existiert aber durch einen Aufruf
@@ -655,7 +655,7 @@ void __EXPORT SwHTMLParser::Continue( int nToken )
// Laufbalken wieder abschalten
EndProgress( pDoc->GetDocShell() );
- BOOL bLFStripped = FALSE;
+ sal_Bool bLFStripped = sal_False;
if( SVPAR_PENDING != GetStatus() )
{
// noch die letzten Attribute setzen
@@ -666,7 +666,7 @@ void __EXPORT SwHTMLParser::Continue( int nToken )
(SwScriptFieldType*)pDoc->GetSysFldType( RES_SCRIPTFLD );
SwScriptField aFld( pType, aScriptType, aScriptSource,
- FALSE );
+ sal_False );
InsertAttr( SwFmtFld( aFld ) );
}
@@ -701,7 +701,7 @@ void __EXPORT SwHTMLParser::Continue( int nToken )
if( aParaAttrs.Count() )
aParaAttrs.Remove( 0, aParaAttrs.Count() );
- SetAttr( FALSE );
+ SetAttr( sal_False );
// Noch die erst verzoegert gesetzten Styles setzen
pCSS1Parser->SetDelayedStyles();
@@ -724,21 +724,21 @@ void __EXPORT SwHTMLParser::Continue( int nToken )
#ifdef DBG_UTIL
// !!! sollte nicht moeglich sein, oder ??
-ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( TRUE ).nNode.GetIndex(),
+ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_True ).nNode.GetIndex(),
"Pam.Bound1 steht noch im Node" );
-ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( FALSE ).nNode.GetIndex(),
+ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_False ).nNode.GetIndex(),
"Pam.Bound2 steht noch im Node" );
-if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( TRUE ).nNode.GetIndex() )
+if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_True ).nNode.GetIndex() )
{
- xub_StrLen nCntPos = pPam->GetBound( TRUE ).nContent.GetIndex();
- pPam->GetBound( TRUE ).nContent.Assign( pTxtNode,
+ xub_StrLen nCntPos = pPam->GetBound( sal_True ).nContent.GetIndex();
+ pPam->GetBound( sal_True ).nContent.Assign( pTxtNode,
pTxtNode->GetTxt().Len() + nCntPos );
}
-if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
+if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_False ).nNode.GetIndex() )
{
- xub_StrLen nCntPos = pPam->GetBound( FALSE ).nContent.GetIndex();
- pPam->GetBound( FALSE ).nContent.Assign( pTxtNode,
+ xub_StrLen nCntPos = pPam->GetBound( sal_False ).nContent.GetIndex();
+ pPam->GetBound( sal_False ).nContent.Assign( pTxtNode,
pTxtNode->GetTxt().Len() + nCntPos );
}
#endif
@@ -767,10 +767,10 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
if( !pPos->nContent.GetIndex() && !bLFStripped )
{
SwTxtNode* pAktNd;
- ULONG nNodeIdx = pPos->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPos->nNode.GetIndex();
- BOOL bHasFlysOrMarks =
- HasCurrentParaFlys() || HasCurrentParaBookmarks( TRUE );
+ sal_Bool bHasFlysOrMarks =
+ HasCurrentParaFlys() || HasCurrentParaBookmarks( sal_True );
if( IsNewDoc() )
{
@@ -796,8 +796,8 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
pCrsrSh->SetMark();
pCrsrSh->ClearMark();
}
- pPam->GetBound(TRUE).nContent.Assign( 0, 0 );
- pPam->GetBound(FALSE).nContent.Assign( 0, 0 );
+ pPam->GetBound(sal_True).nContent.Assign( 0, 0 );
+ pPam->GetBound(sal_False).nContent.Assign( 0, 0 );
pDoc->GetNodes().Delete( pPam->GetPoint()->nNode );
}
}
@@ -845,10 +845,10 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
if( pPrev->HasSwAttrSet() )
pTxtNode->SetAttr( *pPrev->GetpSwAttrSet() );
- if( &pPam->GetBound(TRUE).nNode.GetNode() == pPrev )
- pPam->GetBound(TRUE).nContent.Assign( pTxtNode, 0 );
- if( &pPam->GetBound(FALSE).nNode.GetNode() == pPrev )
- pPam->GetBound(FALSE).nContent.Assign( pTxtNode, 0 );
+ if( &pPam->GetBound(sal_True).nNode.GetNode() == pPrev )
+ pPam->GetBound(sal_True).nContent.Assign( pTxtNode, 0 );
+ if( &pPam->GetBound(sal_False).nNode.GetNode() == pPrev )
+ pPam->GetBound(sal_False).nContent.Assign( pTxtNode, 0 );
pTxtNode->JoinPrev();
}
@@ -890,7 +890,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
if( bWasUndo )
{
pDoc->DelAllUndoObj();
- pDoc->DoUndo( TRUE );
+ pDoc->DoUndo( sal_True );
}
else if( !pInitVSh )
{
@@ -900,7 +900,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
// wir muessen das Undo noch anschalten.
ViewShell *pTmpVSh = CheckActionViewShell();
if( pTmpVSh )
- pDoc->DoUndo( TRUE );
+ pDoc->DoUndo( sal_True );
}
pDoc->SetOle2Link( aOLELink );
@@ -908,8 +908,8 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
pDoc->ResetModified();
if( bSetModEnabled && pDoc->GetDocShell() )
{
- pDoc->GetDocShell()->EnableSetModified( TRUE );
- bSetModEnabled = FALSE; // this is unnecessary here
+ pDoc->GetDocShell()->EnableSetModified( sal_True );
+ bSetModEnabled = sal_False; // this is unnecessary here
}
}
@@ -918,7 +918,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
// offen ist (muss bei Abbruch nicht sein), die Action beenden,
// uns von der Shell abmelden und schliesslich die alte Shell
// wieder rekonstruieren.
- CallEndAction( TRUE );
+ CallEndAction( sal_True );
#ifdef DBG_UTIL
nContinue--;
@@ -943,15 +943,15 @@ void SwHTMLParser::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
void SwHTMLParser::DocumentDetected()
{
ASSERT( !bDocInitalized, "DocumentDetected mehrfach aufgerufen" );
- bDocInitalized = TRUE;
+ bDocInitalized = sal_True;
if( IsNewDoc() )
{
if( IsInHeader() )
- FinishHeader( TRUE );
+ FinishHeader( sal_True );
- CallEndAction( TRUE, TRUE );
+ CallEndAction( sal_True, sal_True );
- pDoc->DoUndo( FALSE );
+ pDoc->DoUndo( sal_False );
// Durch das DocumentDetected wurde im allgemeinen eine
// ViewShell angelegt. Es kann aber auch sein, dass sie
// erst spaeter angelegt wird, naemlich dann, wenn die UI
@@ -1024,7 +1024,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
pDoc->GetDocShell()->SetTitle( sTitle );
}
}
- bInTitle = FALSE;
+ bInTitle = sal_False;
sTitle.Erase();
break;
@@ -1065,9 +1065,9 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
if( !bDocInitalized )
DocumentDetected();
- BOOL bGetIDOption = FALSE, bInsertUnknown = FALSE;
- BOOL bUpperSpaceSave = bUpperSpace;
- bUpperSpace = FALSE;
+ sal_Bool bGetIDOption = sal_False, bInsertUnknown = sal_False;
+ sal_Bool bUpperSpaceSave = bUpperSpace;
+ bUpperSpace = sal_False;
// Die folgenden Speziallfaelle muessen oder koennen nach der
// Filter-Detection erfolgen.
@@ -1079,7 +1079,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
// Applets ignoriert wird!
if( HTML_IFRAME_OFF == nToken )
{
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndFloatingFrame();
}
@@ -1093,8 +1093,8 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
aContents.ConvertLineEnd();
InsertComment( aContents, OOO_STRING_SVTOOLS_HTML_noembed );
aContents.Erase();
- bCallNextToken = FALSE;
- bInNoEmbed = FALSE;
+ bCallNextToken = sal_False;
+ bInNoEmbed = sal_False;
break;
case HTML_RAWDATA:
@@ -1117,11 +1117,11 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_APPLET_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndApplet();
break;
case HTML_OBJECT_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndObject();
break;
@@ -1141,7 +1141,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_TEXTAREA_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndTextArea();
break;
@@ -1158,7 +1158,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_SELECT_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndSelect();
return;
@@ -1193,7 +1193,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_MARQUEE_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndMarquee();
break;
@@ -1209,7 +1209,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_SDFIELD_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndField();
break;
@@ -1226,7 +1226,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
{
case HTML_ANCHOR_OFF:
EndAnchor();
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
break;
case HTML_TEXTTOKEN:
@@ -1292,7 +1292,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
case HTML_BASE:
{
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[ --i ];
switch( pOption->GetToken() )
@@ -1350,7 +1350,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
break;
case HTML_TITLE_ON:
- bInTitle = TRUE;
+ bInTitle = sal_True;
break;
case HTML_SCRIPT_ON:
@@ -1363,7 +1363,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
case HTML_NOSCRIPT_ON:
case HTML_NOSCRIPT_OFF:
- bInsertUnknown = TRUE;
+ bInsertUnknown = sal_True;
break;
case HTML_STYLE_ON:
@@ -1416,7 +1416,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
break;
}
else
- bGetIDOption = TRUE;
+ bGetIDOption = sal_True;
// <BR>s in <PRE> aehneln echten LFs, deshalb kein break
case HTML_NEWPARA:
@@ -1448,7 +1448,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
if( !pTable && !pDoc->IsInHeaderFooter( pPam->GetPoint()->nNode ) )
{
NewAttr( &aAttrTab.pBreak, SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
- EndAttr( aAttrTab.pBreak, 0, FALSE );
+ EndAttr( aAttrTab.pBreak, 0, sal_False );
}
break;
@@ -1515,7 +1515,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
break;
case HTML_NOEMBED_ON:
- bInNoEmbed = TRUE;
+ bInNoEmbed = sal_True;
bCallNextToken = pTable!=0;
ReadRawData( OOO_STRING_SVTOOLS_HTML_noembed );
break;
@@ -1528,7 +1528,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
case HTML_DEFLIST_OFF:
if( nOpenParaToken )
EndPara();
- EndDefListItem( 0, FALSE, 1==nDefListDeep );
+ EndDefListItem( 0, sal_False, 1==nDefListDeep );
EndDefList();
break;
@@ -1536,7 +1536,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
case HTML_DT_ON:
if( nOpenParaToken )
EndPara();
- EndDefListItem( 0, FALSE );// <DD>/<DT> beenden und keine Vorl. setzen
+ EndDefListItem( 0, sal_False );// <DD>/<DT> beenden und keine Vorl. setzen
NewDefListItem( nToken );
break;
@@ -1546,7 +1546,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
// eigentlich muesste man ein DD/DT jetzt beenden. Da aber sowhl
// Netscape als auch Microsoft das nicht tun, machen wir das eben
// auch nicht.
- EndDefListItem( nToken, FALSE );
+ EndDefListItem( nToken, sal_False );
break;
// Bereiche
@@ -1601,12 +1601,12 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
// Vorlagen:
case HTML_PARABREAK_ON:
if( nOpenParaToken )
- EndPara( TRUE );
+ EndPara( sal_True );
NewPara();
break;
case HTML_PARABREAK_OFF:
- EndPara( TRUE );
+ EndPara( sal_True );
break;
case HTML_ADDRESS_ON:
@@ -1644,7 +1644,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
break;
case HTML_PREFORMTXT_OFF:
- bNoParSpace = TRUE; // der letzte PRE-Absatz muss einen Zeilenabstand bekommen
+ bNoParSpace = sal_True; // der letzte PRE-Absatz muss einen Zeilenabstand bekommen
EndTxtFmtColl( HTML_PREFORMTXT_OFF );
break;
@@ -1721,7 +1721,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
case HTML_UNORDERLIST_OFF:
if( nOpenParaToken )
EndPara();
- EndNumBulListItem( 0, TRUE, GetNumInfo().GetDepth()==1 );
+ EndNumBulListItem( 0, sal_True, GetNumInfo().GetDepth()==1 );
EndNumBulList( nToken );
break;
@@ -1735,13 +1735,13 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
EndPara();
}
- EndNumBulListItem( 0, FALSE );// <LI>/<LH> beenden und keine Vorl. setzen
+ EndNumBulListItem( 0, sal_False );// <LI>/<LH> beenden und keine Vorl. setzen
NewNumBulListItem( nToken );
break;
case HTML_LI_OFF:
case HTML_LISTHEADER_OFF:
- EndNumBulListItem( nToken, FALSE );
+ EndNumBulListItem( nToken, sal_False );
break;
// Attribute :
@@ -1802,7 +1802,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
case HTML_BLINK_ON:
{
NewStdAttr( HTML_BLINK_ON, &aAttrTab.pBlink,
- SvxBlinkItem( TRUE, RES_CHRATR_BLINK ) );
+ SvxBlinkItem( sal_True, RES_CHRATR_BLINK ) );
}
break;
@@ -1907,7 +1907,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
case HTML_HTML_ON:
{
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[ --i ];
if( HTML_O_DIR == pOption->GetToken() )
@@ -2008,7 +2008,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
case HTML_NOFRAMES_ON:
if( IsInHeader() )
- FinishHeader( TRUE );
+ FinishHeader( sal_True );
bInsertUnknown = bKeepUnknown;
break;
@@ -2053,7 +2053,7 @@ void __EXPORT SwHTMLParser::NextToken( int nToken )
/* */
-extern BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
+extern sal_Bool lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
void lcl_swhtml_getItemInfo( const _HTMLAttr& rAttr,
sal_Bool& rScriptDependent, sal_Bool& rFont,
@@ -2096,7 +2096,7 @@ void lcl_swhtml_getItemInfo( const _HTMLAttr& rAttr,
}
}
-BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
+sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNum )
{
// Ein harter Zeilen-Umbruch am Ende muss immer entfernt werden.
// Einen zweiten ersetzen wir durch einen Absatz-Abstand.
@@ -2116,7 +2116,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
const SvxULSpaceItem& rULSpace =
(const SvxULSpaceItem&)pTxtNode->SwCntntNode::GetAttr( RES_UL_SPACE );
- BOOL bChange = AM_NOSPACE==eMode ? rULSpace.GetLower() > 0
+ sal_Bool bChange = AM_NOSPACE==eMode ? rULSpace.GetLower() > 0
: rULSpace.GetLower() == 0;
if( bChange )
@@ -2124,7 +2124,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
const SvxULSpaceItem& rCollULSpace =
pTxtNode->GetAnyFmtColl().GetULSpace();
- BOOL bMayReset = AM_NOSPACE==eMode ? rCollULSpace.GetLower() == 0
+ sal_Bool bMayReset = AM_NOSPACE==eMode ? rCollULSpace.GetLower() == 0
: rCollULSpace.GetLower() > 0;
if( bMayReset &&
@@ -2144,7 +2144,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
SwPosition aOldPos( *pPam->GetPoint() );
- BOOL bRet = pDoc->AppendTxtNode( *pPam->GetPoint() );
+ sal_Bool bRet = pDoc->AppendTxtNode( *pPam->GetPoint() );
// Zeichen-Attribute aufspalten und ggf keine setzen, die ueber den
// ganzen Absatz gesetzt sind
@@ -2153,13 +2153,13 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
const SwPosition& rPos = *pPam->GetPoint();
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; ++pTbl )
{
_HTMLAttr *pAttr = *pTbl;
if( pAttr && pAttr->GetItem().Which() < RES_PARATR_BEGIN )
{
- BOOL bWholePara = FALSE;
+ sal_Bool bWholePara = sal_False;
while( pAttr )
{
@@ -2203,7 +2203,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
pSetAttr->ClearPrev();
if( !pNext || bWholePara )
{
- USHORT nTmp = pSetAttr->bInsAtStart ? 0
+ sal_uInt16 nTmp = pSetAttr->bInsAtStart ? 0
: aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -2233,7 +2233,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
// wenn Felder ins Rennen kommen (siehe #51020#)
if( !pNext || bWholePara )
{
- USHORT nTmp = pSetAttr->bInsAtStart ? 0
+ sal_uInt16 nTmp = pSetAttr->bInsAtStart ? 0
: aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -2248,7 +2248,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
// Die Previous-Attribute muessen trotzdem gesetzt werden.
if( !pNext || bWholePara )
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
else
@@ -2268,9 +2268,9 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
{
if( GetNumInfo().GetDepth() )
{
- BYTE nLvl = GetNumInfo().GetLevel();
+ sal_uInt8 nLvl = GetNumInfo().GetLevel();
// --> OD 2008-04-02 #refactorlists#
-// SetNoNum (&nLvl, TRUE);
+// SetNoNum (&nLvl, sal_True);
// SetNodeNum( nLvl);
SetNodeNum( nLvl, false );
// <--
@@ -2308,7 +2308,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
if( RES_CHRATR_CJK_FONT <= nWhich &&
nWhich <= RES_CHRATR_CTL_WEIGHT )
{
- nIdx = static_cast< USHORT >(nWhich - RES_CHRATR_CJK_FONT + 5);
+ nIdx = static_cast< sal_uInt16 >(nWhich - RES_CHRATR_CJK_FONT + 5);
}
else switch( nWhich )
{
@@ -2371,9 +2371,9 @@ void SwHTMLParser::AddParSpace()
if( !bNoParSpace )
return;
- bNoParSpace = FALSE;
+ bNoParSpace = sal_False;
- ULONG nNdIdx = pPam->GetPoint()->nNode.GetIndex() - 1;
+ sal_uLong nNdIdx = pPam->GetPoint()->nNode.GetIndex() - 1;
SwTxtNode *pTxtNode = pDoc->GetNodes()[nNdIdx]->GetTxtNode();
if( !pTxtNode )
@@ -2457,13 +2457,13 @@ void SwHTMLParser::ShowStatline()
ViewShell *pVSh = CheckActionViewShell();
if( pVSh && pVSh->HasInvalidRect() )
{
- CallEndAction( FALSE, FALSE );
- CallStartAction( pVSh, FALSE );
+ CallEndAction( sal_False, sal_False );
+ CallStartAction( pVSh, sal_False );
}
}
}
-ViewShell *SwHTMLParser::CallStartAction( ViewShell *pVSh, BOOL bChkPtr )
+ViewShell *SwHTMLParser::CallStartAction( ViewShell *pVSh, sal_Bool bChkPtr )
{
ASSERT( !pActionViewShell, "CallStartAction: ViewShell schon gesetzt" );
@@ -2492,7 +2492,7 @@ ViewShell *SwHTMLParser::CallStartAction( ViewShell *pVSh, BOOL bChkPtr )
return pActionViewShell;
}
-ViewShell *SwHTMLParser::CallEndAction( BOOL bChkAction, BOOL bChkPtr )
+ViewShell *SwHTMLParser::CallEndAction( sal_Bool bChkAction, sal_Bool bChkPtr )
{
if( bChkPtr )
{
@@ -2517,19 +2517,19 @@ ViewShell *SwHTMLParser::CallEndAction( BOOL bChkAction, BOOL bChkPtr )
ViewShell *pSh = pActionViewShell;
do {
if( pSh->IsA( TYPE( SwCrsrShell ) ) )
- ((SwCrsrShell*)pSh)->SttEndDoc(TRUE);
+ ((SwCrsrShell*)pSh)->SttEndDoc(sal_True);
pSh = (ViewShell *)pSh->GetNext();
} while( pSh != pActionViewShell );
- bSetCrsr = FALSE;
+ bSetCrsr = sal_False;
}
if( pActionViewShell->ISA( SwEditShell ) )
{
//Schon gescrollt?, dann dafuer sorgen, dass die View sich nicht bewegt!
- const BOOL bOldLock = pActionViewShell->IsViewLocked();
- pActionViewShell->LockView( TRUE );
- const BOOL bOldEndActionByVirDev = pActionViewShell->IsEndActionByVirDev();
- pActionViewShell->SetEndActionByVirDev( TRUE );;
+ const sal_Bool bOldLock = pActionViewShell->IsViewLocked();
+ pActionViewShell->LockView( sal_True );
+ const sal_Bool bOldEndActionByVirDev = pActionViewShell->IsEndActionByVirDev();
+ pActionViewShell->SetEndActionByVirDev( sal_True );;
((SwEditShell*)pActionViewShell)->EndAction();
pActionViewShell->SetEndActionByVirDev( bOldEndActionByVirDev );
pActionViewShell->LockView( bOldLock );
@@ -2541,7 +2541,7 @@ ViewShell *SwHTMLParser::CallEndAction( BOOL bChkAction, BOOL bChkPtr )
if( GetMedium() && aVisSttPos == pActionViewShell->VisArea().Pos() )
::JumpToSwMark( pActionViewShell,
GetMedium()->GetURLObject().GetMark() );
- bChkJumpMark = FALSE;
+ bChkJumpMark = sal_False;
}
}
else
@@ -2578,7 +2578,7 @@ ViewShell *SwHTMLParser::CheckActionViewShell()
/* */
-void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
+void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable,
_HTMLAttrs *pPostIts )
{
SwPaM* pAttrPam = new SwPaM( *pPam->GetPoint() );
@@ -2586,17 +2586,17 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
xub_StrLen nEndCnt = pPam->GetPoint()->nContent.GetIndex();
_HTMLAttr* pAttr;
SwCntntNode* pCNd;
- USHORT n;
+ sal_uInt16 n;
_HTMLAttrs aFields( 5, 5 );
for( n = aSetAttrTab.Count(); n; )
{
pAttr = aSetAttrTab[ --n ];
- USHORT nWhich = pAttr->pItem->Which();
+ sal_uInt16 nWhich = pAttr->pItem->Which();
- ULONG nEndParaIdx = pAttr->GetEndParaIdx();
- BOOL bSetAttr;
+ sal_uLong nEndParaIdx = pAttr->GetEndParaIdx();
+ sal_Bool bSetAttr;
if( bChkEnd )
{
// fix #42192#: Zechen-Attribute mit Ende moeglich frueh,
@@ -2622,7 +2622,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
// Attribiute im Content-Bereich duerfen nicht gesetzt
// werden, wenn wir in einem Sonderbereich stehen, aber
// umgekekehrt schon.
- ULONG nEndOfIcons = pDoc->GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndOfIcons = pDoc->GetNodes().GetEndOfExtras().GetIndex();
bSetAttr = nEndParaIdx < rEndIdx.GetIndex() ||
rEndIdx.GetIndex() > nEndOfIcons ||
nEndParaIdx <= nEndOfIcons;
@@ -2632,7 +2632,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
{
// Das Attribute darf nicht in der liste der vorlaeufigen
// Absatz-Attribute stehen, weil es sonst geloescht wurde.
- USHORT ii = aParaAttrs.Count();
+ sal_uInt16 ii = aParaAttrs.Count();
while( ii-- )
{
ASSERT( pAttr != aParaAttrs[ii],
@@ -2772,14 +2772,14 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
// jump to bookmark
if( JUMPTO_MARK == eJumpTo && pNewMark->GetName() == ::rtl::OUString(sJmpMark) )
{
- bChkJumpMark = TRUE;
+ bChkJumpMark = sal_True;
eJumpTo = JUMPTO_NONE;
}
}
break;
case RES_TXTATR_FIELD:
{
- USHORT nFldWhich =
+ sal_uInt16 nFldWhich =
pPostIts ? ((const SwFmtFld *)pAttr->pItem)
->GetFld()->GetTyp()->Which() : 0;
if( pPostIts && (RES_POSTITFLD == nFldWhich ||
@@ -2816,7 +2816,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
JUMPTO_MARK == eJumpTo &&
sJmpMark == ((SwFmtINetFmt*)pAttr->pItem)->GetName() )
{
- bChkJumpMark = TRUE;
+ bChkJumpMark = sal_True;
eJumpTo = JUMPTO_NONE;
}
@@ -2838,8 +2838,8 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
ASSERT( FLY_AT_PARA == rAnchor.GetAnchorId(),
"Nur Auto-Rahmen brauchen eine Spezialbehandlung" );
const SwPosition *pFlyPos = rAnchor.GetCntntAnchor();
- ULONG nFlyParaIdx = pFlyPos->nNode.GetIndex();
- BOOL bMoveFly;
+ sal_uLong nFlyParaIdx = pFlyPos->nNode.GetIndex();
+ sal_Bool bMoveFly;
if( bChkEnd )
{
bMoveFly = nFlyParaIdx < rEndIdx.GetIndex() ||
@@ -2848,7 +2848,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
}
else
{
- ULONG nEndOfIcons = pDoc->GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndOfIcons = pDoc->GetNodes().GetEndOfExtras().GetIndex();
bMoveFly = nFlyParaIdx < rEndIdx.GetIndex() ||
rEndIdx.GetIndex() > nEndOfIcons ||
nFlyParaIdx <= nEndOfIcons;
@@ -2931,7 +2931,7 @@ void SwHTMLParser::NewAttr( _HTMLAttr **ppAttr, const SfxPoolItem& rItem )
void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
- BOOL bChkEmpty )
+ sal_Bool bChkEmpty )
{
ASSERT( !ppDepAttr, "SwHTMLParser::EndAttr: ppDepAttr-Feature ungetestet?" );
// Der Listenkopf ist im Attribut gespeichert
@@ -2965,8 +2965,8 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
//nEndCnt = pPrev->GetSttCnt();
}
- BOOL bMoveBack = FALSE;
- USHORT nWhich = pAttr->pItem->Which();
+ sal_Bool bMoveBack = sal_False;
+ sal_uInt16 nWhich = pAttr->pItem->Which();
if( /*!pLast &&*/ !nEndCnt && RES_PARATR_BEGIN <= nWhich &&
*pEndIdx != pAttr->GetSttPara() )
{
@@ -3020,7 +3020,7 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
pNext->InsertPrev( pSetAttr );
else
{
- USHORT nTmp = pSetAttr->bInsAtStart ? 0
+ sal_uInt16 nTmp = pSetAttr->bInsAtStart ? 0
: aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -3050,7 +3050,7 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
(*ppDepAttr)->InsertPrev( pAttr );
else
{
- USHORT nTmp = pAttr->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pAttr->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pAttr, nTmp );
}
}
@@ -3079,7 +3079,7 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
pNext->InsertPrev( pPrev );
else
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
}
@@ -3140,7 +3140,7 @@ void SwHTMLParser::DeleteAttr( _HTMLAttr* pAttr )
pNext->InsertPrev( pPrev );
else
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
}
@@ -3165,7 +3165,7 @@ void SwHTMLParser::SaveAttrTab( _HTMLAttrTable& rNewAttrTab )
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
_HTMLAttr** pSaveTbl = (_HTMLAttr**)&rNewAttrTab;
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; (++pTbl, ++pSaveTbl) )
{
*pSaveTbl = *pTbl;
@@ -3182,7 +3182,7 @@ void SwHTMLParser::SaveAttrTab( _HTMLAttrTable& rNewAttrTab )
}
void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
- BOOL bMoveEndBack )
+ sal_Bool bMoveEndBack )
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
@@ -3198,14 +3198,14 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
// neu aufspannen
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
_HTMLAttr** pSaveTbl = (_HTMLAttr**)&rNewAttrTab;
- BOOL bSetAttr = TRUE;
+ sal_Bool bSetAttr = sal_True;
xub_StrLen nSttCnt = pPam->GetPoint()->nContent.GetIndex();
xub_StrLen nEndCnt = nSttCnt;
if( bMoveEndBack )
{
- ULONG nOldEnd = nEndIdx.GetIndex();
- ULONG nTmpIdx;
+ sal_uLong nOldEnd = nEndIdx.GetIndex();
+ sal_uLong nTmpIdx;
if( ( nTmpIdx = pDoc->GetNodes().GetEndOfExtras().GetIndex()) >= nOldEnd ||
( nTmpIdx = pDoc->GetNodes().GetEndOfAutotext().GetIndex()) >= nOldEnd )
{
@@ -3219,7 +3219,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
nEndCnt = (bSetAttr ? pCNd->Len() : 0);
}
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; (++pTbl, ++pSaveTbl) )
{
_HTMLAttr *pAttr = *pTbl;
@@ -3245,7 +3245,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
pNext->InsertPrev( pSetAttr );
else
{
- USHORT nTmp = pSetAttr->bInsAtStart ? 0
+ sal_uInt16 nTmp = pSetAttr->bInsAtStart ? 0
: aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -3259,7 +3259,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
pNext->InsertPrev( pPrev );
else
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
}
@@ -3286,7 +3286,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
}
void SwHTMLParser::RestoreAttrTab( const _HTMLAttrTable& rNewAttrTab,
- BOOL bSetNewStart )
+ sal_Bool bSetNewStart )
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
@@ -3298,7 +3298,7 @@ void SwHTMLParser::RestoreAttrTab( const _HTMLAttrTable& rNewAttrTab,
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
_HTMLAttr** pSaveTbl = (_HTMLAttr**)&rNewAttrTab;
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; (++pTbl, ++pSaveTbl) )
{
ASSERT( !*pTbl, "Die Attribut-Tabelle ist nicht leer!" );
@@ -3329,14 +3329,14 @@ void SwHTMLParser::RestoreAttrTab( const _HTMLAttrTable& rNewAttrTab,
}
}
-void SwHTMLParser::InsertAttr( const SfxPoolItem& rItem, BOOL bLikePara,
- BOOL bInsAtStart )
+void SwHTMLParser::InsertAttr( const SfxPoolItem& rItem, sal_Bool bLikePara,
+ sal_Bool bInsAtStart )
{
_HTMLAttr* pTmp = new _HTMLAttr( *pPam->GetPoint(),
rItem );
if( bLikePara )
pTmp->SetLikePara();
- USHORT nTmp = bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pTmp, nTmp );
}
@@ -3358,7 +3358,7 @@ void SwHTMLParser::NewStdAttr( int nToken )
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3395,7 +3395,7 @@ void SwHTMLParser::NewStdAttr( int nToken )
if( HTML_SPAN_ON != nToken || !aClass.Len() ||
!CreateContainer( aClass, aItemSet, aPropInfo, pCntxt ) )
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
}
@@ -3411,7 +3411,7 @@ void SwHTMLParser::NewStdAttr( int nToken,
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3452,7 +3452,7 @@ void SwHTMLParser::NewStdAttr( int nToken,
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
else
{
@@ -3489,16 +3489,16 @@ void SwHTMLParser::EndTag( int nToken )
void SwHTMLParser::NewBasefontAttr()
{
String aId, aStyle, aClass, aLang, aDir;
- USHORT nSize = 3;
+ sal_uInt16 nSize = 3;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
{
case HTML_O_SIZE:
- nSize = (USHORT)pOption->GetNumber();
+ nSize = (sal_uInt16)pOption->GetNumber();
break;
case HTML_O_ID:
aId = pOption->GetString();
@@ -3543,7 +3543,7 @@ void SwHTMLParser::NewBasefontAttr()
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
else
{
@@ -3573,23 +3573,23 @@ void SwHTMLParser::EndBasefontAttr()
void SwHTMLParser::NewFontAttr( int nToken )
{
- USHORT nBaseSize =
+ sal_uInt16 nBaseSize =
( aBaseFontStack.Count() > nBaseFontStMin
? (aBaseFontStack[aBaseFontStack.Count()-1] & FONTSIZE_MASK)
: 3 );
- USHORT nFontSize =
+ sal_uInt16 nFontSize =
( aFontStack.Count() > nFontStMin
? (aFontStack[aFontStack.Count()-1] & FONTSIZE_MASK)
: nBaseSize );
String aFace, aId, aStyle, aClass, aLang, aDir;
Color aColor;
- ULONG nFontHeight = 0; // tatsaechlich einzustellende Font-Hoehe
- USHORT nSize = 0; // Fontgroesse in Netscape-Notation (1-7)
- BOOL bColor = FALSE;
+ sal_uLong nFontHeight = 0; // tatsaechlich einzustellende Font-Hoehe
+ sal_uInt16 nSize = 0; // Fontgroesse in Netscape-Notation (1-7)
+ sal_Bool bColor = sal_False;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3597,19 +3597,19 @@ void SwHTMLParser::NewFontAttr( int nToken )
case HTML_O_SIZE:
if( HTML_FONT_ON==nToken && pOption->GetString().Len() )
{
- INT32 nSSize;
+ sal_Int32 nSSize;
if( '+' == pOption->GetString().GetChar(0) ||
'-' == pOption->GetString().GetChar(0) )
nSSize = nBaseSize + pOption->GetSNumber();
else
- nSSize = (INT32)pOption->GetNumber();
+ nSSize = (sal_Int32)pOption->GetNumber();
if( nSSize < 1 )
nSSize = 1;
else if( nSSize > 7 )
nSSize = 7;
- nSize = (USHORT)nSSize;
+ nSize = (sal_uInt16)nSSize;
nFontHeight = aFontHeights[nSize-1];
}
break;
@@ -3617,7 +3617,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
if( HTML_FONT_ON==nToken )
{
pOption->GetColor( aColor );
- bColor = TRUE;
+ bColor = sal_True;
}
break;
case HTML_O_FACE:
@@ -3648,14 +3648,14 @@ void SwHTMLParser::NewFontAttr( int nToken )
// in Ueberschriften bestimmt die aktuelle Ueberschrift
// die Font-Hoehe und nicht BASEFONT
- USHORT nPoolId = GetCurrFmtColl()->GetPoolFmtId();
+ sal_uInt16 nPoolId = GetCurrFmtColl()->GetPoolFmtId();
if( (nPoolId>=RES_POOLCOLL_HEADLINE1 &&
nPoolId<=RES_POOLCOLL_HEADLINE6) )
{
// wenn die Schriftgroesse in der Ueberschrift noch
// nicht veraendert ist, die aus der Vorlage nehmen
if( nFontStHeadStart==aFontStack.Count() )
- nFontSize = static_cast< USHORT >(6 - (nPoolId - RES_POOLCOLL_HEADLINE1));
+ nFontSize = static_cast< sal_uInt16 >(6 - (nPoolId - RES_POOLCOLL_HEADLINE1));
}
else
nPoolId = 0;
@@ -3694,7 +3694,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
pFList = pFListItem->GetFontList();
}
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
xub_StrLen nStrPos = 0;
while( nStrPos!=STRING_NOTFOUND )
{
@@ -3710,7 +3710,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
const FontInfo& rFInfo = pFList->GetFontInfo( hFont );
if( RTL_TEXTENCODING_DONTKNOW != rFInfo.GetCharSet() )
{
- bFound = TRUE;
+ bFound = sal_True;
if( RTL_TEXTENCODING_SYMBOL == rFInfo.GetCharSet() )
eEnc = RTL_TEXTENCODING_SYMBOL;
}
@@ -3758,7 +3758,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
else
{
@@ -3812,7 +3812,7 @@ void SwHTMLParser::NewPara()
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3876,7 +3876,7 @@ void SwHTMLParser::NewPara()
nOpenParaToken = HTML_PARABREAK_ON;
}
-void SwHTMLParser::EndPara( BOOL bReal )
+void SwHTMLParser::EndPara( sal_Bool bReal )
{
if( HTML_LI_ON==nOpenParaToken && pTable )
{
@@ -3932,7 +3932,7 @@ void SwHTMLParser::NewHeading( int nToken )
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3965,7 +3965,7 @@ void SwHTMLParser::NewHeading( int nToken )
AddParSpace();
// die passende Vorlage suchen
- USHORT nTxtColl;
+ sal_uInt16 nTxtColl;
switch( nToken )
{
case HTML_HEAD1_ON: nTxtColl = RES_POOLCOLL_HEADLINE1; break;
@@ -4020,7 +4020,7 @@ void SwHTMLParser::EndHeading()
// Kontext zu dem Token suchen und vom Stack holen
_HTMLAttrContext *pCntxt = 0;
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
while( !pCntxt && nPos>nContextStMin )
{
switch( aContexts[--nPos]->GetToken() )
@@ -4053,12 +4053,12 @@ void SwHTMLParser::EndHeading()
/* */
-void SwHTMLParser::NewTxtFmtColl( int nToken, USHORT nColl )
+void SwHTMLParser::NewTxtFmtColl( int nToken, sal_uInt16 nColl )
{
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -4187,7 +4187,7 @@ void SwHTMLParser::NewDefList()
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -4211,7 +4211,7 @@ void SwHTMLParser::NewDefList()
}
// einen neuen Absatz aufmachen
- BOOL bSpace = (GetNumInfo().GetDepth() + nDefListDeep) == 0;
+ sal_Bool bSpace = (GetNumInfo().GetDepth() + nDefListDeep) == 0;
if( pPam->GetPoint()->nContent.GetIndex() )
AppendTxtNode( bSpace ? AM_SPACE : AM_SOFTNOSPACE );
else if( bSpace )
@@ -4221,11 +4221,11 @@ void SwHTMLParser::NewDefList()
nDefListDeep++;
- BOOL bInDD = FALSE, bNotInDD = FALSE;
- USHORT nPos = aContexts.Count();
+ sal_Bool bInDD = sal_False, bNotInDD = sal_False;
+ sal_uInt16 nPos = aContexts.Count();
while( !bInDD && !bNotInDD && nPos>nContextStMin )
{
- USHORT nCntxtToken = aContexts[--nPos]->GetToken();
+ sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken();
switch( nCntxtToken )
{
case HTML_DEFLIST_ON:
@@ -4233,10 +4233,10 @@ void SwHTMLParser::NewDefList()
case HTML_MENULIST_ON:
case HTML_ORDERLIST_ON:
case HTML_UNORDERLIST_ON:
- bNotInDD = TRUE;
+ bNotInDD = sal_True;
break;
case HTML_DD_ON:
- bInDD = TRUE;
+ bInDD = sal_True;
break;
}
}
@@ -4288,7 +4288,7 @@ void SwHTMLParser::NewDefList()
void SwHTMLParser::EndDefList()
{
- BOOL bSpace = (GetNumInfo().GetDepth() + nDefListDeep) == 1;
+ sal_Bool bSpace = (GetNumInfo().GetDepth() + nDefListDeep) == 1;
if( pPam->GetPoint()->nContent.GetIndex() )
AppendTxtNode( bSpace ? AM_SPACE : AM_SOFTNOSPACE );
else if( bSpace )
@@ -4316,21 +4316,21 @@ void SwHTMLParser::EndDefList()
void SwHTMLParser::NewDefListItem( int nToken )
{
// festellen, ob das DD/DT in einer DL vorkommt
- BOOL bInDefList = FALSE, bNotInDefList = FALSE;
- USHORT nPos = aContexts.Count();
+ sal_Bool bInDefList = sal_False, bNotInDefList = sal_False;
+ sal_uInt16 nPos = aContexts.Count();
while( !bInDefList && !bNotInDefList && nPos>nContextStMin )
{
- USHORT nCntxtToken = aContexts[--nPos]->GetToken();
+ sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken();
switch( nCntxtToken )
{
case HTML_DEFLIST_ON:
- bInDefList = TRUE;
+ bInDefList = sal_True;
break;
case HTML_DIRLIST_ON:
case HTML_MENULIST_ON:
case HTML_ORDERLIST_ON:
case HTML_UNORDERLIST_ON:
- bNotInDefList = TRUE;
+ bNotInDefList = sal_True;
break;
}
}
@@ -4344,12 +4344,12 @@ void SwHTMLParser::NewDefListItem( int nToken )
nOpenParaToken = static_cast< sal_uInt16 >(nToken);
}
- NewTxtFmtColl( nToken, static_cast< USHORT >(nToken==HTML_DD_ON ? RES_POOLCOLL_HTML_DD
+ NewTxtFmtColl( nToken, static_cast< sal_uInt16 >(nToken==HTML_DD_ON ? RES_POOLCOLL_HTML_DD
: RES_POOLCOLL_HTML_DT) );
}
-void SwHTMLParser::EndDefListItem( int nToken, BOOL bSetColl,
- BOOL /*bLastPara*/ )
+void SwHTMLParser::EndDefListItem( int nToken, sal_Bool bSetColl,
+ sal_Bool /*bLastPara*/ )
{
// einen neuen Absatz aufmachen
if( !nToken && pPam->GetPoint()->nContent.GetIndex() )
@@ -4358,10 +4358,10 @@ void SwHTMLParser::EndDefListItem( int nToken, BOOL bSetColl,
// Kontext zu dem Token suchen und vom Stack holen
nToken &= ~1;
_HTMLAttrContext *pCntxt = 0;
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
while( !pCntxt && nPos>nContextStMin )
{
- USHORT nCntxtToken = aContexts[--nPos]->GetToken();
+ sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken();
switch( nCntxtToken )
{
case HTML_DD_ON:
@@ -4399,8 +4399,8 @@ void SwHTMLParser::EndDefListItem( int nToken, BOOL bSetColl,
/* */
-BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
- BOOL bSurroundOnly ) const
+sal_Bool SwHTMLParser::HasCurrentParaFlys( sal_Bool bNoSurroundOnly,
+ sal_Bool bSurroundOnly ) const
{
// bNoSurroundOnly: Der Absatz enthaelt mindestens einen Rahmen
// ohne Umlauf
@@ -4411,8 +4411,8 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- BOOL bFound = FALSE;
- for ( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
+ sal_Bool bFound = sal_False;
+ for ( sal_uInt16 i=0; i<rFrmFmtTbl.Count(); i++ )
{
SwFrmFmt *const pFmt = rFrmFmtTbl[i];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -4430,7 +4430,7 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
{
if( !(bNoSurroundOnly || bSurroundOnly) )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
else
@@ -4444,7 +4444,7 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
{
if( SURROUND_NONE==eSurround )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -4452,12 +4452,12 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
{
if( SURROUND_NONE==eSurround )
{
- bFound = FALSE;
+ bFound = sal_False;
break;
}
else if( SURROUND_THROUGHT!=eSurround )
{
- bFound = TRUE;
+ bFound = sal_True;
// weitersuchen: Es koennten ja noch welche ohne
// Umlauf kommen ...
}
@@ -4484,45 +4484,45 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
{
SwTxtFmtColl *pCollToSet = 0; // die zu setzende Vorlage
SfxItemSet *pItemSet = 0; // der Set fuer harte Attrs
- USHORT nTopColl = pContext ? pContext->GetTxtFmtColl() : 0;
+ sal_uInt16 nTopColl = pContext ? pContext->GetTxtFmtColl() : 0;
const String& rTopClass = pContext ? pContext->GetClass() : (const String&) aEmptyStr;
- USHORT nDfltColl = RES_POOLCOLL_TEXT;
+ sal_uInt16 nDfltColl = RES_POOLCOLL_TEXT;
- BOOL bInPRE=FALSE; // etwas Kontext Info
+ sal_Bool bInPRE=sal_False; // etwas Kontext Info
- USHORT nLeftMargin = 0, nRightMargin = 0; // die Einzuege und
+ sal_uInt16 nLeftMargin = 0, nRightMargin = 0; // die Einzuege und
short nFirstLineIndent = 0; // Abstaende
- USHORT i;
+ sal_uInt16 i;
for( i = nContextStAttrMin; i < aContexts.Count(); i++ )
{
const _HTMLAttrContext *pCntxt = aContexts[i];
- USHORT nColl = pCntxt->GetTxtFmtColl();
+ sal_uInt16 nColl = pCntxt->GetTxtFmtColl();
if( nColl )
{
// Es gibt eine Vorlage, die zu setzen ist. Dann
// muss zunaechst einmal entschieden werden,
// ob die Vorlage auch gesetzt werden kann
- BOOL bSetThis = TRUE;
+ sal_Bool bSetThis = sal_True;
switch( nColl )
{
- case USHORT(RES_POOLCOLL_HTML_PRE):
- bInPRE = TRUE;
+ case sal_uInt16(RES_POOLCOLL_HTML_PRE):
+ bInPRE = sal_True;
break;
- case USHORT(RES_POOLCOLL_TEXT):
+ case sal_uInt16(RES_POOLCOLL_TEXT):
// <TD><P CLASS=xxx> muss TD.xxx werden
if( nDfltColl==RES_POOLCOLL_TABLE ||
nDfltColl==RES_POOLCOLL_TABLE_HDLN )
nColl = nDfltColl;
break;
- case USHORT(RES_POOLCOLL_HTML_HR):
+ case sal_uInt16(RES_POOLCOLL_HTML_HR):
// <HR> auch in <PRE> als Vorlage setzen, sonst kann man sie
// nicht mehr exportieren
break;
default:
if( bInPRE )
- bSetThis = FALSE;
+ bSetThis = sal_False;
break;
}
@@ -4583,7 +4583,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
// ggf. neue Absatz-Einzuege holen
if( pCntxt->IsLRSpaceChanged() )
{
- USHORT nLeft=0, nRight=0;
+ sal_uInt16 nLeft=0, nRight=0;
pCntxt->GetMargins( nLeft, nRight, nFirstLineIndent );
nLeftMargin = nLeft;
@@ -4605,7 +4605,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
pCSS1Parser->GetTxtFmtColl( nTopColl, rTopClass );
const SfxItemSet& rItemSet = pTopColl->GetAttrSet();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,TRUE, &pItem) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,sal_True, &pItem) )
{
const SvxLRSpaceItem *pLRItem =
(const SvxLRSpaceItem *)pItem;
@@ -4637,7 +4637,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
pContext->SetMargins( nLeftMargin, nRightMargin,
nFirstLineIndent );
}
- if( SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,TRUE, &pItem) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,sal_True, &pItem) )
{
const SvxULSpaceItem *pULItem =
(const SvxULSpaceItem *)pItem;
@@ -4672,7 +4672,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
// ggf. noch den Absatz-Einzug korrigieren
const SvxLRSpaceItem& rLRItem = pCollToSet->GetLRSpace();
- BOOL bSetLRSpace;
+ sal_Bool bSetLRSpace;
bSetLRSpace = nLeftMargin != rLRItem.GetTxtLeft() ||
nFirstLineIndent != rLRItem.GetTxtFirstLineOfst() ||
@@ -4691,7 +4691,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
NewAttr( &aAttrTab.pLRSpace, aLRItem );
aAttrTab.pLRSpace->SetLikePara();
aParaAttrs.Insert( aAttrTab.pLRSpace, aParaAttrs.Count() );
- EndAttr( aAttrTab.pLRSpace, 0, FALSE );
+ EndAttr( aAttrTab.pLRSpace, 0, sal_False );
}
}
@@ -4710,7 +4710,7 @@ void SwHTMLParser::NewCharFmt( int nToken )
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -4752,7 +4752,7 @@ void SwHTMLParser::NewCharFmt( int nToken )
ASSERT( !aClass.Len() || !pCSS1Parser->GetClass( aClass ),
"Class wird nicht beruecksichtigt" );
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
}
@@ -4777,12 +4777,12 @@ void SwHTMLParser::InsertSpacer()
sal_Int16 eHoriOri = text::HoriOrientation::NONE;
Size aSize( 0, 0);
long nSize = 0;
- BOOL bPrcWidth = FALSE;
- BOOL bPrcHeight = FALSE;
- USHORT nType = HTML_SPTYPE_HORI;
+ sal_Bool bPrcWidth = sal_False;
+ sal_Bool bPrcHeight = sal_False;
+ sal_uInt16 nType = HTML_SPTYPE_HORI;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -4846,7 +4846,7 @@ void SwHTMLParser::InsertSpacer()
// den Inhalt schuetzen
SvxProtectItem aProtectItem( RES_PROTECT) ;
- aProtectItem.SetCntntProtect( TRUE );
+ aProtectItem.SetCntntProtect( sal_True );
aFrmSet.Put( aProtectItem );
// der Rahmen anlegen
@@ -4891,13 +4891,13 @@ void SwHTMLParser::InsertSpacer()
{
SvxULSpaceItem aULSpace( (const SvxULSpaceItem&)pTxtNode
->SwCntntNode::GetAttr( RES_UL_SPACE ) );
- aULSpace.SetLower( aULSpace.GetLower() + (USHORT)nSize );
+ aULSpace.SetLower( aULSpace.GetLower() + (sal_uInt16)nSize );
pTxtNode->SetAttr( aULSpace );
}
else
{
- NewAttr( &aAttrTab.pULSpace, SvxULSpaceItem( 0, (USHORT)nSize, RES_UL_SPACE ) );
- EndAttr( aAttrTab.pULSpace, 0, FALSE );
+ NewAttr( &aAttrTab.pULSpace, SvxULSpaceItem( 0, (sal_uInt16)nSize, RES_UL_SPACE ) );
+ EndAttr( aAttrTab.pULSpace, 0, sal_False );
AppendTxtNode(); // nicht am Abstand drehen!
}
@@ -4918,7 +4918,7 @@ void SwHTMLParser::InsertSpacer()
if( !pPam->GetPoint()->nContent.GetIndex() )
{
- USHORT nLeft=0, nRight=0;
+ sal_uInt16 nLeft=0, nRight=0;
short nIndent = 0;
GetMarginsFromContextWithNumBul( nLeft, nRight, nIndent );
@@ -4930,7 +4930,7 @@ void SwHTMLParser::InsertSpacer()
aLRItem.SetTxtFirstLineOfst( nIndent );
NewAttr( &aAttrTab.pLRSpace, aLRItem );
- EndAttr( aAttrTab.pLRSpace, 0, FALSE );
+ EndAttr( aAttrTab.pLRSpace, 0, sal_False );
}
else
{
@@ -4943,13 +4943,13 @@ void SwHTMLParser::InsertSpacer()
}
}
-USHORT SwHTMLParser::ToTwips( USHORT nPixel ) const
+sal_uInt16 SwHTMLParser::ToTwips( sal_uInt16 nPixel ) const
{
if( nPixel && Application::GetDefaultDevice() )
{
long nTwips = Application::GetDefaultDevice()->PixelToLogic(
Size( nPixel, nPixel ), MapMode( MAP_TWIP ) ).Width();
- return nTwips <= USHRT_MAX ? (USHORT)nTwips : USHRT_MAX;
+ return nTwips <= USHRT_MAX ? (sal_uInt16)nTwips : USHRT_MAX;
}
else
return nPixel;
@@ -4987,7 +4987,7 @@ void SwHTMLParser::InsertIDOption()
{
String aId;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
if( HTML_O_ID==pOption->GetToken() )
@@ -5024,12 +5024,12 @@ void SwHTMLParser::InsertLineBreak()
// harter Zeilenumbruch eingefuegt
String aId, aStyle, aClass; // die ID der Bookmark
- BOOL bClearLeft = FALSE, bClearRight = FALSE;
- BOOL bCleared = FALSE; // wurde ein CLEAR ausgefuehrt?
+ sal_Bool bClearLeft = sal_False, bClearRight = sal_False;
+ sal_Bool bCleared = sal_False; // wurde ein CLEAR ausgefuehrt?
// dann holen wir mal die Optionen
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -5039,13 +5039,13 @@ void SwHTMLParser::InsertLineBreak()
const String &aClear = pOption->GetString();
if( aClear.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_all ) )
{
- bClearLeft = TRUE;
- bClearRight = TRUE;
+ bClearLeft = sal_True;
+ bClearRight = sal_True;
}
else if( aClear.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_left ) )
- bClearLeft = TRUE;
+ bClearLeft = sal_True;
else if( aClear.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_right ) )
- bClearRight = TRUE;
+ bClearRight = sal_True;
}
break;
case HTML_O_ID:
@@ -5069,7 +5069,7 @@ void SwHTMLParser::InsertLineBreak()
{
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- for( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
+ for( sal_uInt16 i=0; i<rFrmFmtTbl.Count(); i++ )
{
SwFrmFmt *const pFmt = rFrmFmtTbl[i];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -5102,9 +5102,9 @@ void SwHTMLParser::InsertLineBreak()
{
SwFmtSurround aSurround( eSurround );
if( SURROUND_NONE != eSurround )
- aSurround.SetAnchorOnly( TRUE );
+ aSurround.SetAnchorOnly( sal_True );
pFmt->SetFmtAttr( aSurround );
- bCleared = TRUE;
+ bCleared = sal_True;
}
} // Anker ist nicht im Node
} // Schleife ueber Fly-Frames
@@ -5113,7 +5113,7 @@ void SwHTMLParser::InsertLineBreak()
// Styles parsen
SvxFmtBreakItem aBreakItem( SVX_BREAK_NONE, RES_BREAK );
- BOOL bBreakItem = FALSE;
+ sal_Bool bBreakItem = sal_False;
if( HasStyleOptions( aStyle, aId, aClass ) )
{
SfxItemSet aItemSet( pDoc->GetAttrPool(), pCSS1Parser->GetWhichMap() );
@@ -5124,7 +5124,7 @@ void SwHTMLParser::InsertLineBreak()
if( pCSS1Parser->SetFmtBreak( aItemSet, aPropInfo ) )
{
aBreakItem = (const SvxFmtBreakItem &)aItemSet.Get( RES_BREAK );
- bBreakItem = TRUE;
+ bBreakItem = sal_True;
}
if( aPropInfo.aId.Len() )
InsertBookmark( aPropInfo.aId );
@@ -5134,7 +5134,7 @@ void SwHTMLParser::InsertLineBreak()
if( bBreakItem && SVX_BREAK_PAGE_AFTER==aBreakItem.GetBreak() )
{
NewAttr( &aAttrTab.pBreak, aBreakItem );
- EndAttr( aAttrTab.pBreak, 0, FALSE );
+ EndAttr( aAttrTab.pBreak, 0, sal_False );
}
if( !bCleared && !bBreakItem )
@@ -5156,27 +5156,27 @@ void SwHTMLParser::InsertLineBreak()
if( bBreakItem && SVX_BREAK_PAGE_BEFORE==aBreakItem.GetBreak() )
{
NewAttr( &aAttrTab.pBreak, aBreakItem );
- EndAttr( aAttrTab.pBreak, 0, FALSE );
+ EndAttr( aAttrTab.pBreak, 0, sal_False );
}
}
void SwHTMLParser::InsertHorzRule()
{
- USHORT nSize = 0;
- USHORT nWidth = 0;
+ sal_uInt16 nSize = 0;
+ sal_uInt16 nWidth = 0;
SvxAdjust eAdjust = SVX_ADJUST_END;
- BOOL bPrcWidth = FALSE;
- BOOL bNoShade = FALSE;
- BOOL bColor = FALSE;
+ sal_Bool bPrcWidth = sal_False;
+ sal_Bool bNoShade = sal_False;
+ sal_Bool bColor = sal_False;
Color aColor;
String aId;
// dann holen wir mal die Optionen
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -5185,16 +5185,16 @@ void SwHTMLParser::InsertHorzRule()
aId = pOption->GetString();
break;
case HTML_O_SIZE:
- nSize = (USHORT)pOption->GetNumber();
+ nSize = (sal_uInt16)pOption->GetNumber();
break;
case HTML_O_WIDTH:
bPrcWidth = (pOption->GetString().Search('%') != STRING_NOTFOUND);
- nWidth = (USHORT)pOption->GetNumber();
+ nWidth = (sal_uInt16)pOption->GetNumber();
if( bPrcWidth && nWidth>=100 )
{
// 100%-Linien sind der default-Fall (keine Attrs neotig)
nWidth = 0;
- bPrcWidth = FALSE;
+ bPrcWidth = sal_False;
}
break;
case HTML_O_ALIGN:
@@ -5202,11 +5202,11 @@ void SwHTMLParser::InsertHorzRule()
(SvxAdjust)pOption->GetEnum( aHTMLPAlignTable, static_cast< sal_uInt16 >(eAdjust) );
break;
case HTML_O_NOSHADE:
- bNoShade = TRUE;
+ bNoShade = sal_True;
break;
case HTML_O_COLOR:
pOption->GetColor( aColor );
- bColor = TRUE;
+ bColor = sal_True;
break;
}
}
@@ -5243,7 +5243,7 @@ void SwHTMLParser::InsertHorzRule()
long nPWidth = 0;
long nPHeight = (long)nSize;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- SvxCSS1Parser::SetBorderWidth( aBorderLine, (USHORT)nPHeight,
+ SvxCSS1Parser::SetBorderWidth( aBorderLine, (sal_uInt16)nPHeight,
!bNoShade );
}
else if( bNoShade )
@@ -5277,8 +5277,8 @@ void SwHTMLParser::InsertHorzRule()
{
// Laenge und Ausrichtung der Linie ueber Absatz-Einzuege "tuerken"
long nBrowseWidth = GetCurrentBrowseWidth();
- nWidth = bPrcWidth ? (USHORT)((nWidth*nBrowseWidth) / 100)
- : ToTwips( (USHORT)nBrowseWidth );
+ nWidth = bPrcWidth ? (sal_uInt16)((nWidth*nBrowseWidth) / 100)
+ : ToTwips( (sal_uInt16)nBrowseWidth );
if( nWidth < MINLAY )
nWidth = MINLAY;
@@ -5293,16 +5293,16 @@ void SwHTMLParser::InsertHorzRule()
switch( eAdjust )
{
case SVX_ADJUST_RIGHT:
- aLRItem.SetTxtLeft( (USHORT)nDist );
+ aLRItem.SetTxtLeft( (sal_uInt16)nDist );
break;
case SVX_ADJUST_LEFT:
- aLRItem.SetRight( (USHORT)nDist );
+ aLRItem.SetRight( (sal_uInt16)nDist );
break;
case SVX_ADJUST_CENTER:
default:
nDist /= 2;
- aLRItem.SetTxtLeft( (USHORT)nDist );
- aLRItem.SetRight( (USHORT)nDist );
+ aLRItem.SetTxtLeft( (sal_uInt16)nDist );
+ aLRItem.SetRight( (sal_uInt16)nDist );
break;
}
@@ -5337,21 +5337,21 @@ void SwHTMLParser::InsertHorzRule()
void SwHTMLParser::ParseMoreMetaOptions()
{
String aName, aContent;
- BOOL bHTTPEquiv = FALSE;
+ sal_Bool bHTTPEquiv = sal_False;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[ --i ];
switch( pOption->GetToken() )
{
case HTML_O_NAME:
aName = pOption->GetString();
- bHTTPEquiv = FALSE;
+ bHTTPEquiv = sal_False;
break;
case HTML_O_HTTPEQUIV:
aName = pOption->GetString();
- bHTTPEquiv = TRUE;
+ bHTTPEquiv = sal_True;
break;
case HTML_O_CONTENT:
aContent = pOption->GetString();
@@ -5415,9 +5415,9 @@ _HTMLAttr::_HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem,
nEndPara( rPos.nNode ),
nSttCntnt( rPos.nContent.GetIndex() ),
nEndCntnt(rPos.nContent.GetIndex() ),
- bInsAtStart( TRUE ),
- bLikePara( FALSE ),
- bValid( TRUE ),
+ bInsAtStart( sal_True ),
+ bLikePara( sal_False ),
+ bValid( sal_True ),
nCount( 1 ),
pNext( 0 ),
pPrev( 0 ),
@@ -5427,7 +5427,7 @@ _HTMLAttr::_HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem,
}
_HTMLAttr::_HTMLAttr( const _HTMLAttr &rAttr, const SwNodeIndex &rEndPara,
- USHORT nEndCnt, _HTMLAttr **ppHd ) :
+ sal_uInt16 nEndCnt, _HTMLAttr **ppHd ) :
nSttPara( rAttr.nSttPara ),
nEndPara( rEndPara ),
nSttCntnt( rAttr.nSttCntnt ),
@@ -5448,7 +5448,7 @@ _HTMLAttr::~_HTMLAttr()
delete pItem;
}
-_HTMLAttr *_HTMLAttr::Clone( const SwNodeIndex& rEndPara, USHORT nEndCnt ) const
+_HTMLAttr *_HTMLAttr::Clone( const SwNodeIndex& rEndPara, sal_uInt16 nEndCnt ) const
{
// das Attribut mit der alten Start-Position neu anlegen
_HTMLAttr *pNew = new _HTMLAttr( *this, rEndPara, nEndCnt, ppHead );
@@ -5459,7 +5459,7 @@ _HTMLAttr *_HTMLAttr::Clone( const SwNodeIndex& rEndPara, USHORT nEndCnt ) const
return pNew;
}
-void _HTMLAttr::Reset( const SwNodeIndex& rSttPara, USHORT nSttCnt,
+void _HTMLAttr::Reset( const SwNodeIndex& rSttPara, sal_uInt16 nSttCnt,
_HTMLAttr **ppHd )
{
// den Anfang (und das Ende) neu setzen
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index f9d978a73aee..c7f897018dc7 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -433,7 +433,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
sal_uInt32 aFontHeights[7]; // die Font-Hoehen 1-7
sal_uInt32 nScriptStartLineNr; // Zeilennummer eines Script-Blocks
- ULONG nEventId;
+ sal_uLong nEventId;
sal_uInt16 nBaseFontStMin; //
sal_uInt16 nFontStMin; //
@@ -601,7 +601,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
void GetULSpaceFromContext( sal_uInt16 &rUpper, sal_uInt16 &rLower ) const;
- void MovePageDescAttrs( SwNode *pSrcNd, ULONG nDestIdx, sal_Bool bFmtBreak );
+ void MovePageDescAttrs( SwNode *pSrcNd, sal_uLong nDestIdx, sal_Bool bFmtBreak );
// Behandlung von Tags auf Absatz-Ebene
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index ab6dfd92554a..0e14dc1f42de 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -127,7 +127,7 @@ __EXPORT SwHTMLWriter::~SwHTMLWriter()
delete pNumRuleInfo;
}
-ULONG SwHTMLWriter::WriteStream()
+sal_uLong SwHTMLWriter::WriteStream()
{
// neue Konfiguration setzen
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
@@ -498,7 +498,7 @@ const SwFmtCol *lcl_html_GetFmtCol( const SwHTMLWriter& rHTMLWrt,
return pCol;
}
-sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, ULONG nIndex )
+sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex )
{
sal_Bool bRet = sal_False;
const SwSectionNode *pSectNd =
@@ -514,7 +514,7 @@ sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, ULONG nIndex )
return bRet;
}
-sal_Bool lcl_html_IsMultiColEnd( const SwHTMLWriter& rHTMLWrt, ULONG nIndex )
+sal_Bool lcl_html_IsMultiColEnd( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex )
{
sal_Bool bRet = sal_False;
const SwEndNode *pEndNd = rHTMLWrt.pDoc->GetNodes()[nIndex]->GetEndNode();
@@ -877,8 +877,8 @@ static void OutBodyColor( const sal_Char *pTag, const SwFmt *pFmt,
sal_uInt16 SwHTMLWriter::OutHeaderAttrs()
{
- ULONG nIdx = pCurPam->GetPoint()->nNode.GetIndex();
- ULONG nEndIdx = pCurPam->GetMark()->nNode.GetIndex();
+ sal_uLong nIdx = pCurPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nEndIdx = pCurPam->GetMark()->nNode.GetIndex();
SwTxtNode *pTxtNd = 0;
while( nIdx<=nEndIdx &&
@@ -962,7 +962,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
//{
// In Nicht-HTML-Dokumenten wird die erste gesetzte Seitenvorlage
// exportiert und wenn keine gesetzt ist die Standard-Vorlage
- ULONG nNodeIdx = pCurPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNodeIdx = pCurPam->GetPoint()->nNode.GetIndex();
while( nNodeIdx < pDoc->GetNodes().Count() )
{
@@ -1346,8 +1346,8 @@ sal_uInt16 SwHTMLWriter::GetHTMLFontSize( sal_uInt32 nHeight ) const
// Struktur speichert die aktuellen Daten des Writers zwischen, um
// einen anderen Dokument-Teil auszugeben, wie z.B. Header/Footer
-HTMLSaveData::HTMLSaveData( SwHTMLWriter& rWriter, ULONG nStt,
- ULONG nEnd, sal_Bool bSaveNum,
+HTMLSaveData::HTMLSaveData( SwHTMLWriter& rWriter, sal_uLong nStt,
+ sal_uLong nEnd, sal_Bool bSaveNum,
const SwFrmFmt *pFrmFmt ) :
rWrt( rWriter ),
pOldPam( rWrt.pCurPam ),
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 20511eecf3be..bee6d63b805e 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -215,7 +215,7 @@ class SwHTMLWriter : public Writer
void CollectLinkTargets();
protected:
- ULONG WriteStream();
+ sal_uLong WriteStream();
public:
#if defined(UNX)
@@ -347,7 +347,7 @@ public:
void OutHyperlinkHRefValue( const String& rURL );
// gebe die evt. an der akt. Position stehenden FlyFrame aus.
- sal_Bool OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx,
+ sal_Bool OutFlyFrm( sal_uLong nNdIdx, xub_StrLen nCntntIdx,
sal_uInt8 nPos, HTMLOutContext *pContext = 0 );
void OutFrmFmt( sal_uInt8 nType, const SwFrmFmt& rFmt,
const SdrObject *pSdrObj );
@@ -543,7 +543,7 @@ struct HTMLSaveData
sal_Bool bOldOutFlyFrame : 1;
const SwFlyFrmFmt* pOldFlyFmt;
- HTMLSaveData( SwHTMLWriter&, ULONG nStt, ULONG nEnd,
+ HTMLSaveData( SwHTMLWriter&, sal_uLong nStt, sal_uLong nEnd,
sal_Bool bSaveNum=sal_True,
const SwFrmFmt *pFrmFmt=0 );
~HTMLSaveData();
diff --git a/sw/source/filter/inc/fltbase.hxx b/sw/source/filter/inc/fltbase.hxx
index b67b54ce314a..cc8e9b6f41f1 100644
--- a/sw/source/filter/inc/fltbase.hxx
+++ b/sw/source/filter/inc/fltbase.hxx
@@ -35,23 +35,23 @@ class SwFilterBase
protected:
SvStream *pIn;
sal_Char *pReadBuff; // Groessenangabe
- INT32 nBytesLeft; // noch zu lesende Bytes des aktuelle Records
+ sal_Int32 nBytesLeft; // noch zu lesende Bytes des aktuelle Records
CharSet eQuellChar; // Quell-Zeichensatz (interner Zeichensatz)
// CharSet eZielChar; // Ziel-Zeichensatz
- USHORT nTab; // z.Zt. bearbeitete Tabelle
- USHORT nReadBuffSize;// temporaerer Lesepuffer mit
+ sal_uInt16 nTab; // z.Zt. bearbeitete Tabelle
+ sal_uInt16 nReadBuffSize;// temporaerer Lesepuffer mit
// ----------------------------------------------------------
inline void ReadChar( char &rC );
- inline void ReadByte( BYTE &rN );
+ inline void ReadByte( sal_uInt8 &rN );
inline void Read( short &rN );
inline void ReadUnicode( sal_Unicode &rU );
- inline void Read( BYTE &rN0, USHORT &rN1, USHORT &rN2 );
- inline void Read( USHORT &rN );
- inline void Read( USHORT &rN1, USHORT &rN2 );
- inline void Read( USHORT &rN1, USHORT &rN2, USHORT &rN3, USHORT &rN4 );
+ inline void Read( sal_uInt8 &rN0, sal_uInt16 &rN1, sal_uInt16 &rN2 );
+ inline void Read( sal_uInt16 &rN );
+ inline void Read( sal_uInt16 &rN1, sal_uInt16 &rN2 );
+ inline void Read( sal_uInt16 &rN1, sal_uInt16 &rN2, sal_uInt16 &rN3, sal_uInt16 &rN4 );
inline void Read( double &rF );
void Read( String &rS ); // liest 0-terminierten C-String!
inline void ClearBytesLeft( void );
@@ -64,7 +64,7 @@ inline void SwFilterBase::ReadChar( char &rC )
nBytesLeft--;
}
-inline void SwFilterBase::ReadByte( BYTE &rN )
+inline void SwFilterBase::ReadByte( sal_uInt8 &rN )
{
*pIn >> rN;
nBytesLeft--;
@@ -86,25 +86,25 @@ inline void SwFilterBase::Read( short &rN )
nBytesLeft -= 2;
}
-inline void SwFilterBase::Read( BYTE &rN0, USHORT &rN1, USHORT &rN2 )
+inline void SwFilterBase::Read( sal_uInt8 &rN0, sal_uInt16 &rN1, sal_uInt16 &rN2 )
{
*pIn >> rN0 >> rN1 >> rN2;
nBytesLeft -= 5;
}
-inline void SwFilterBase::Read( USHORT &rN )
+inline void SwFilterBase::Read( sal_uInt16 &rN )
{
*pIn >> rN;
nBytesLeft -= 2;
}
-inline void SwFilterBase::Read( USHORT &rN1, USHORT &rN2 )
+inline void SwFilterBase::Read( sal_uInt16 &rN1, sal_uInt16 &rN2 )
{
*pIn >> rN1 >> rN2;
nBytesLeft -= 4;
}
-inline void SwFilterBase::Read( USHORT &rN1, USHORT &rN2, USHORT &rN3, USHORT &rN4 )
+inline void SwFilterBase::Read( sal_uInt16 &rN1, sal_uInt16 &rN2, sal_uInt16 &rN3, sal_uInt16 &rN4 )
{
*pIn >> rN1 >> rN2 >> rN3 >> rN4;
nBytesLeft -= 8;
diff --git a/sw/source/filter/inc/fltglbls.hxx b/sw/source/filter/inc/fltglbls.hxx
index cf2c4a29610b..38867a4125e4 100644
--- a/sw/source/filter/inc/fltglbls.hxx
+++ b/sw/source/filter/inc/fltglbls.hxx
@@ -54,12 +54,12 @@ class FilterGlobals
{
protected:
SvPtrarr aTblFmts;
- USHORT nColStart;
- USHORT nColEnd;
- USHORT nRowStart;
- USHORT nRowEnd;
- USHORT nAnzCols;
- USHORT nAnzRows;
+ sal_uInt16 nColStart;
+ sal_uInt16 nColEnd;
+ sal_uInt16 nRowStart;
+ sal_uInt16 nRowEnd;
+ sal_uInt16 nAnzCols;
+ sal_uInt16 nAnzRows;
public:
FilterGlobals( SwDoc& rDoc, const SwPaM& rPam );
@@ -71,41 +71,41 @@ public:
SvNumberFormatter *pNumFormatter;
LanguageType eDefLanguage;
- ULONG nStandard;
- ULONG nDefFormat; // = 0xFFFFFFFF
+ sal_uLong nStandard;
+ sal_uLong nDefFormat; // = 0xFFFFFFFF
- void SetRange( USHORT nCS, USHORT nCE, USHORT nRS, USHORT nRE );
+ void SetRange( sal_uInt16 nCS, sal_uInt16 nCE, sal_uInt16 nRS, sal_uInt16 nRE );
- BOOL IsInColRange( USHORT nCol )
+ sal_Bool IsInColRange( sal_uInt16 nCol )
{ return ( nCol >= nColStart && nCol <= nColEnd ); }
- BOOL IsInRowRange( USHORT nRow )
+ sal_Bool IsInRowRange( sal_uInt16 nRow )
{ return ( nRow >= nRowStart && nRow <= nRowEnd ); }
- BOOL IsInRange( USHORT nCol, USHORT nRow )
+ sal_Bool IsInRange( sal_uInt16 nCol, sal_uInt16 nRow )
{ return IsInRowRange(nRow) && IsInColRange(nCol); }
- void NormalizeCol( USHORT &rCol ) { rCol -= nColStart; }
- void NormalizeRow( USHORT &rRow ) { rRow -= nRowStart; }
- void Normalize( USHORT &rCol, USHORT &rRow )
+ void NormalizeCol( sal_uInt16 &rCol ) { rCol -= nColStart; }
+ void NormalizeRow( sal_uInt16 &rRow ) { rRow -= nRowStart; }
+ void Normalize( sal_uInt16 &rCol, sal_uInt16 &rRow )
{ NormalizeCol( rCol ); NormalizeRow( rRow ); }
- USHORT AnzCols() const { return nAnzCols; }
- USHORT AnzRows() const { return nAnzRows; }
+ sal_uInt16 AnzCols() const { return nAnzCols; }
+ sal_uInt16 AnzRows() const { return nAnzRows; }
- BOOL ColRangeLimitter( USHORT &rCS, USHORT &rCE );
+ sal_Bool ColRangeLimitter( sal_uInt16 &rCS, sal_uInt16 &rCE );
- void InsertText( USHORT nCol, USHORT nRow, const String& rStr );
+ void InsertText( sal_uInt16 nCol, sal_uInt16 nRow, const String& rStr );
void CreateTable();
void InsertAttr( const SfxPoolItem& rItem );
- inline void ColLimitter( USHORT &rCol );
- inline void RowLimitter( USHORT &rRow );
+ inline void ColLimitter( sal_uInt16 &rCol );
+ inline void RowLimitter( sal_uInt16 &rRow );
};
-inline void FilterGlobals::ColLimitter( USHORT &rCol )
+inline void FilterGlobals::ColLimitter( sal_uInt16 &rCol )
{
if( rCol < nColStart )
rCol = nColStart;
@@ -113,7 +113,7 @@ inline void FilterGlobals::ColLimitter( USHORT &rCol )
rCol = nColEnd;
}
-inline void FilterGlobals::RowLimitter( USHORT &rRow )
+inline void FilterGlobals::RowLimitter( sal_uInt16 &rRow )
{
if( rRow < nRowStart )
rRow = nRowStart;
diff --git a/sw/source/filter/inc/fltini.hxx b/sw/source/filter/inc/fltini.hxx
index a9711f1331a5..f92edaa83f87 100644
--- a/sw/source/filter/inc/fltini.hxx
+++ b/sw/source/filter/inc/fltini.hxx
@@ -42,7 +42,7 @@ class HTMLReader: public Reader
{
// wir wollen die Streams / Storages nicht geoeffnet haben
virtual int SetStrmStgPtr();
- virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
virtual String GetTemplateName() const;
public:
HTMLReader();
@@ -50,12 +50,12 @@ public:
class WW1Reader : public Reader
{
- virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
};
class XMLReader : public Reader
{
- virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
public:
virtual int GetReaderType();
@@ -63,7 +63,7 @@ public:
// read the sections of the document, which is equal to the medium.
// returns the count of it
- virtual USHORT GetSectionList( SfxMedium& rMedium,
+ virtual sal_uInt16 GetSectionList( SfxMedium& rMedium,
SvStrings& rStrings ) const;
};
@@ -81,12 +81,12 @@ void GetWW8Writer( const String&, const String&, WriterRef& );
class SW_DLLPUBLIC SwRelNumRuleSpaces
{
SwNumRuleTbl* pNumRuleTbl; // Liste aller benannten NumRules
- BOOL bNewDoc;
+ sal_Bool bNewDoc;
void SetNumLSpace( SwTxtNode& rNd, const SwNumRule& rRule );
public:
- SwRelNumRuleSpaces( SwDoc& rDoc, BOOL bNewDoc );
+ SwRelNumRuleSpaces( SwDoc& rDoc, sal_Bool bNewDoc );
~SwRelNumRuleSpaces();
void SetNumRelSpaces( SwDoc& rDoc );
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index c511d4aab02a..2c5adee0381c 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -52,13 +52,13 @@ class SwPaM;
using namespace com::sun::star;
-inline void SwFltClearFlag(ULONG& rFieldFlags, int no)
+inline void SwFltClearFlag(sal_uLong& rFieldFlags, int no)
{ rFieldFlags &= ~(1L << no); }
-inline void SwFltSetFlag(ULONG& rFieldFlags, int no)
+inline void SwFltSetFlag(sal_uLong& rFieldFlags, int no)
{ rFieldFlags |= 1L << no; }
-inline BOOL SwFltGetFlag(ULONG nFieldFlags, int no)
+inline sal_Bool SwFltGetFlag(sal_uLong nFieldFlags, int no)
{ return (nFieldFlags & (1L << no)) != 0; }
// Stack-Eintrag fuer die Attribute Es werden immer Pointer auf neue Attribute uebergeben.
@@ -72,10 +72,10 @@ public:
xub_StrLen nMkCntnt;// Nachbildung von Mark()
xub_StrLen nPtCntnt;// Nachbildung von GetPoint()
- BOOL bOld; // to mark Attributes *before* skipping field results
- BOOL bLocked;
- BOOL bCopied;
- BOOL bConsumedByField;
+ sal_Bool bOld; // to mark Attributes *before* skipping field results
+ sal_Bool bLocked;
+ sal_Bool bCopied;
+ sal_Bool bConsumedByField;
SW_DLLPUBLIC SwFltStackEntry(const SwPosition & rStartPos, SfxPoolItem* pHt );
SW_DLLPUBLIC SwFltStackEntry(const SwFltStackEntry& rEntry);
@@ -83,7 +83,7 @@ public:
void SetStartPos(const SwPosition & rStartPos);
SW_DLLPUBLIC void SetEndPos( const SwPosition & rEndPos);
- SW_DLLPUBLIC BOOL MakeRegion(SwDoc* pDoc, SwPaM& rRegion, BOOL bCheck );
+ SW_DLLPUBLIC sal_Bool MakeRegion(SwDoc* pDoc, SwPaM& rRegion, sal_Bool bCheck );
};
class SW_DLLPUBLIC SwFltControlStack
@@ -93,12 +93,12 @@ class SW_DLLPUBLIC SwFltControlStack
Entries maEntries;
friend class SwFltShell;
- ULONG nFieldFlags;
+ sal_uLong nFieldFlags;
KeyCode aEmptyKeyCode; // fuer Bookmarks
protected:
SwDoc* pDoc;
- BOOL bIsEndStack;
+ sal_Bool bIsEndStack;
void MoveAttrs( const SwPosition& rPos );
virtual void SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry* pEntry);
@@ -117,20 +117,20 @@ public:
DONT_HARD_PROTECT
};
- SwFltControlStack(SwDoc* pDo, ULONG nFieldFl);
+ SwFltControlStack(SwDoc* pDo, sal_uLong nFieldFl);
virtual ~SwFltControlStack();
- BOOL IsFlagSet(Flags no) const { return ::SwFltGetFlag(nFieldFlags, no);}
+ sal_Bool IsFlagSet(Flags no) const { return ::SwFltGetFlag(nFieldFlags, no);}
void NewAttr(const SwPosition& rPos, const SfxPoolItem & rAttr );
- virtual void SetAttr(const SwPosition& rPos, USHORT nAttrId=0, BOOL bTstEnde=TRUE, long nHand = LONG_MAX, BOOL consumedByField=FALSE);
+ virtual void SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId=0, sal_Bool bTstEnde=sal_True, long nHand = LONG_MAX, sal_Bool consumedByField=sal_False);
- void StealAttr(const SwPosition* pPos, USHORT nAttrId = 0);
+ void StealAttr(const SwPosition* pPos, sal_uInt16 nAttrId = 0);
void MarkAllAttrsOld();
void KillUnlockedAttrs(const SwPosition& pPos);
- SfxPoolItem* GetFmtStackAttr(USHORT nWhich, USHORT * pPos = 0);
- const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, USHORT nWhich);
+ SfxPoolItem* GetFmtStackAttr(sal_uInt16 nWhich, sal_uInt16 * pPos = 0);
+ const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich);
void Delete(const SwPaM &rPam);
Entries::size_type Count() { return maEntries.size(); }
@@ -177,14 +177,14 @@ public:
DateTime aStampPrev;
RedlineType_t eType;
RedlineType_t eTypePrev;
- USHORT nAutorNo;
- USHORT nAutorNoPrev;
+ sal_uInt16 nAutorNo;
+ sal_uInt16 nAutorNoPrev;
SwFltRedline(RedlineType_t eType_,
- USHORT nAutorNo_,
+ sal_uInt16 nAutorNo_,
const DateTime& rStamp_,
RedlineType_t eTypePrev_ = nsRedlineType_t::REDLINE_INSERT,
- USHORT nAutorNoPrev_ = USHRT_MAX,
+ sal_uInt16 nAutorNoPrev_ = USHRT_MAX,
const DateTime* pStampPrev_ = 0)
: SfxPoolItem(RES_FLTR_REDLINE), aStamp(rStamp_), eType(eType_),
eTypePrev(eTypePrev_), nAutorNo(nAutorNo_), nAutorNoPrev(nAutorNoPrev_)
@@ -213,44 +213,44 @@ class SW_DLLPUBLIC SwFltBookmark : public SfxPoolItem
long nHandle;
String aName;
String aVal;
- BOOL bOnlyRef; // "FRAGE"-Feld, Ref/Seitenrf oder nichts
- BOOL bRef;
- BOOL bPgRef;
+ sal_Bool bOnlyRef; // "FRAGE"-Feld, Ref/Seitenrf oder nichts
+ sal_Bool bRef;
+ sal_Bool bPgRef;
public:
SwFltBookmark( const String& rNa, const String& rVa,
- long nHand, BOOL bOnlyR );
+ long nHand, sal_Bool bOnlyR );
SwFltBookmark( const SwFltBookmark& );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==(const SfxPoolItem&) const;
virtual SfxPoolItem* Clone(SfxItemPool* = 0) const;
const String& GetName() const { return aName; }
const String& GetValSys() const { return aVal; }
- BOOL IsOnlyRef() const { return bOnlyRef; }
- BOOL IsRef() const { return bRef; }
- void SetRef(BOOL b = TRUE) { bRef = b; }
- BOOL IsPgRef() const { return bPgRef; }
- void SetPgRef(BOOL b = TRUE) { bPgRef = b; }
+ sal_Bool IsOnlyRef() const { return bOnlyRef; }
+ sal_Bool IsRef() const { return bRef; }
+ void SetRef(sal_Bool b = sal_True) { bRef = b; }
+ sal_Bool IsPgRef() const { return bPgRef; }
+ void SetPgRef(sal_Bool b = sal_True) { bPgRef = b; }
long GetHandle() const { return nHandle; }
};
class SW_DLLPUBLIC SwFltTOX : public SfxPoolItem
{
SwTOXBase* pTOXBase;
- USHORT nCols;
- BOOL bHadBreakItem; // there was a break item BEFORE insertion of the TOX
- BOOL bHadPageDescItem; // ...
+ sal_uInt16 nCols;
+ sal_Bool bHadBreakItem; // there was a break item BEFORE insertion of the TOX
+ sal_Bool bHadPageDescItem; // ...
public:
- SwFltTOX(SwTOXBase* pBase, USHORT _nCols = 0);
+ SwFltTOX(SwTOXBase* pBase, sal_uInt16 _nCols = 0);
SwFltTOX(const SwFltTOX&);
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==(const SfxPoolItem&) const;
virtual SfxPoolItem* Clone(SfxItemPool* = 0) const;
SwTOXBase* GetBase() { return pTOXBase; }
- USHORT GetCols() const { return nCols; }
- void SetHadBreakItem( BOOL bVal ) { bHadBreakItem = bVal; }
- void SetHadPageDescItem( BOOL bVal ) { bHadPageDescItem = bVal; }
- BOOL HadBreakItem() const { return bHadBreakItem; }
- BOOL HadPageDescItem() const { return bHadPageDescItem; }
+ sal_uInt16 GetCols() const { return nCols; }
+ void SetHadBreakItem( sal_Bool bVal ) { bHadBreakItem = bVal; }
+ void SetHadPageDescItem( sal_Bool bVal ) { bHadPageDescItem = bVal; }
+ sal_Bool HadBreakItem() const { return bHadBreakItem; }
+ sal_Bool HadPageDescItem() const { return bHadPageDescItem; }
};
class SwFltSection : public SfxPoolItem
@@ -271,10 +271,10 @@ public:
class SwFltEndStack : public SwFltControlStack
{
public:
- SwFltEndStack(SwDoc* pDo, ULONG nFieldFl)
+ SwFltEndStack(SwDoc* pDo, sal_uLong nFieldFl)
:SwFltControlStack(pDo, nFieldFl)
{
- bIsEndStack = TRUE;
+ bIsEndStack = sal_True;
}
};
@@ -297,7 +297,7 @@ class SwFltOutBase
SwDoc& rDoc;
protected:
RndStdIds eFlyAnchor;
- BOOL bFlyAbsPos;
+ sal_Bool bFlyAbsPos;
SwDoc& GetDoc() { return rDoc; }
SfxItemSet* NewFlyDefaults();
@@ -306,26 +306,26 @@ protected:
public:
virtual SwFltOutBase& operator << (const SfxPoolItem& rItem) = 0;
- virtual const SfxPoolItem& GetAttr(USHORT nWhich) = 0;
- virtual const SfxPoolItem& GetNodeOrStyAttr(USHORT nWhich) = 0;
+ virtual const SfxPoolItem& GetAttr(sal_uInt16 nWhich) = 0;
+ virtual const SfxPoolItem& GetNodeOrStyAttr(sal_uInt16 nWhich) = 0;
- virtual const SfxPoolItem& GetCellAttr(USHORT nWhich);
- virtual BOOL BeginTable();
+ virtual const SfxPoolItem& GetCellAttr(sal_uInt16 nWhich);
+ virtual sal_Bool BeginTable();
virtual void NextTableCell();
virtual void NextTableRow();
virtual void SetTableWidth(SwTwips nW);
virtual void SetTableOrient(sal_Int16 eOri);
- virtual void SetCellWidth(SwTwips nWidth, USHORT nCell);
+ virtual void SetCellWidth(SwTwips nWidth, sal_uInt16 nCell);
virtual void SetCellHeight(SwTwips nH);
- virtual void SetCellBorder(const SvxBoxItem& rFmtBox, USHORT nCell);
- virtual void SetCellSpace(USHORT nSp);
- virtual void DeleteCell(USHORT nCell);
+ virtual void SetCellBorder(const SvxBoxItem& rFmtBox, sal_uInt16 nCell);
+ virtual void SetCellSpace(sal_uInt16 nSp);
+ virtual void DeleteCell(sal_uInt16 nCell);
virtual void EndTable();
- virtual BOOL IsInFly() = 0;
+ virtual sal_Bool IsInFly() = 0;
virtual void SetFlyFrmAttr(const SfxPoolItem& rAttr) = 0;
- virtual const SfxPoolItem& GetFlyFrmAttr(USHORT nWhich) = 0;
- virtual BOOL BeginFly( RndStdIds eAnchor, BOOL bAbsolutePos,
+ virtual const SfxPoolItem& GetFlyFrmAttr(sal_uInt16 nWhich) = 0;
+ virtual sal_Bool BeginFly( RndStdIds eAnchor, sal_Bool bAbsolutePos,
const SfxItemSet* pMoreAttrs = 0 );
virtual void SetFlyAnchor( RndStdIds eAnchor );
virtual void EndFly();
@@ -342,48 +342,48 @@ class SwFltOutDoc : public SwFltOutBase
SwPosition* pTabSavedPos; // set when in table
SwPosition* pFlySavedPos; // set when in fly
SwTwips nTableWidth;
- USHORT usTableX;
- USHORT usTableY;
- BOOL bReadNoTbl; // Keine Tabellen
+ sal_uInt16 usTableX;
+ sal_uInt16 usTableY;
+ sal_Bool bReadNoTbl; // Keine Tabellen
- SwTableBox* GetBox(USHORT ny, USHORT nx = USHRT_MAX);
- BOOL SeekCell( short nRow, short nCol, BOOL bPam );
+ SwTableBox* GetBox(sal_uInt16 ny, sal_uInt16 nx = USHRT_MAX);
+ sal_Bool SeekCell( short nRow, short nCol, sal_Bool bPam );
void SplitTable();
public:
SwFltOutDoc(SwDoc& rDocu, SwPaM* pP, SwFltControlStack& rStk,
SwFltEndStack& rEStk)
: SwFltOutBase(rDocu), rStack(rStk), rEndStack(rEStk), pPaM(pP),
pFly(0), pTable(0), pTabSavedPos(0), pFlySavedPos(0),
- nTableWidth(0), bReadNoTbl(FALSE)
+ nTableWidth(0), bReadNoTbl(sal_False)
{}
- void SetReadNoTable() { bReadNoTbl = TRUE; }
- BOOL IsTableWidthSet() const { return 0 != nTableWidth; }
+ void SetReadNoTable() { bReadNoTbl = sal_True; }
+ sal_Bool IsTableWidthSet() const { return 0 != nTableWidth; }
virtual SwFltOutBase& operator << (const SfxPoolItem& rItem);
- virtual const SfxPoolItem& GetAttr(USHORT nWhich);
- virtual const SfxPoolItem& GetNodeOrStyAttr(USHORT nWhich);
+ virtual const SfxPoolItem& GetAttr(sal_uInt16 nWhich);
+ virtual const SfxPoolItem& GetNodeOrStyAttr(sal_uInt16 nWhich);
- BOOL IsInTable();
- virtual const SfxPoolItem& GetCellAttr(USHORT nWhich);
- virtual BOOL BeginTable();
+ sal_Bool IsInTable();
+ virtual const SfxPoolItem& GetCellAttr(sal_uInt16 nWhich);
+ virtual sal_Bool BeginTable();
virtual void NextTableCell();
virtual void NextTableRow();
virtual void SetTableWidth(SwTwips nW);
virtual void SetTableOrient(sal_Int16 eOri);
- virtual void SetCellWidth(SwTwips nWidth, USHORT nCell);
+ virtual void SetCellWidth(SwTwips nWidth, sal_uInt16 nCell);
virtual void SetCellHeight(SwTwips nH);
- virtual void SetCellBorder(const SvxBoxItem& rFmtBox, USHORT nCell);
- virtual void SetCellSpace(USHORT nSp);
- virtual void DeleteCell(USHORT nCell);
+ virtual void SetCellBorder(const SvxBoxItem& rFmtBox, sal_uInt16 nCell);
+ virtual void SetCellSpace(sal_uInt16 nSp);
+ virtual void DeleteCell(sal_uInt16 nCell);
virtual void EndTable();
SwFrmFmt* MakeFly( RndStdIds eAnchor, SfxItemSet* pSet );
- virtual BOOL IsInFly();
+ virtual sal_Bool IsInFly();
virtual void SetFlyFrmAttr(const SfxPoolItem& rAttr);
- virtual const SfxPoolItem& GetFlyFrmAttr(USHORT nWhich);
- virtual BOOL BeginFly( RndStdIds eAnchor, BOOL bAbsolutePos,
+ virtual const SfxPoolItem& GetFlyFrmAttr(sal_uInt16 nWhich);
+ virtual sal_Bool BeginFly( RndStdIds eAnchor, sal_Bool bAbsolutePos,
const SfxItemSet* pMoreAttrs = 0 );
virtual void EndFly();
};
@@ -392,7 +392,7 @@ class SwFltFormatCollection : public SwFltOutBase
{
SwTxtFmtColl* pColl;
SfxItemSet* pFlyAttrs; // Simulation der Flys in Styles
- BOOL bHasFly;
+ sal_Bool bHasFly;
public:
SwFltFormatCollection(SwDoc&, RES_POOL_COLLFMT_TYPE nType);
SwFltFormatCollection(SwDoc&, const String& rName );
@@ -403,26 +403,26 @@ public:
// --> OD 2007-01-25 #i73790# - method renamed
pColl->ResetAllFmtAttr();
// <--
- pColl->SetAuto(FALSE); // nach Empfehlung JP
+ pColl->SetAuto(sal_False); // nach Empfehlung JP
}
void Derived(SwTxtFmtColl* pBase)
{ pColl->SetDerivedFrom(pBase); }
// SwTxtFmtColl* Search(String, CharSet eSrc);
SwTxtFmtColl* GetColl() { return pColl; }
- void SetHasFly() { bHasFly = TRUE; }
+ void SetHasFly() { bHasFly = sal_True; }
SfxItemSet* GetpFlyAttrs() { return pFlyAttrs; }
virtual SwFltOutBase& operator << (const SfxPoolItem& rItem);
- virtual const SfxPoolItem& GetAttr(USHORT nWhich);
- virtual const SfxPoolItem& GetNodeOrStyAttr(USHORT nWhich);
+ virtual const SfxPoolItem& GetAttr(sal_uInt16 nWhich);
+ virtual const SfxPoolItem& GetNodeOrStyAttr(sal_uInt16 nWhich);
- virtual BOOL IsInFly();
+ virtual sal_Bool IsInFly();
virtual void SetFlyFrmAttr(const SfxPoolItem& rAttr);
- virtual const SfxPoolItem& GetFlyFrmAttr(USHORT nWhich);
- virtual BOOL BeginFly( RndStdIds eAnchor, BOOL bAbsolutePos,
+ virtual const SfxPoolItem& GetFlyFrmAttr(sal_uInt16 nWhich);
+ virtual sal_Bool BeginFly( RndStdIds eAnchor, sal_Bool bAbsolutePos,
const SfxItemSet* pMoreAttrs = 0 );
- BOOL BeginStyleFly( SwFltOutDoc* pOutDoc );
+ sal_Bool BeginStyleFly( SwFltOutDoc* pOutDoc );
virtual void EndFly();
};
@@ -461,22 +461,22 @@ class SwFltShell
} eSubMode;
// Fly items:
- USHORT nAktStyle; // zur Indizierung pStyleFlyTable
+ sal_uInt16 nAktStyle; // zur Indizierung pStyleFlyTable
//
SwFltControlStack aStack;
SwFltEndStack aEndStack;
SwPaM* pPaM;
//
String sBaseURL;
- USHORT nPageDescOffset; // fuers update der pagedescs
+ sal_uInt16 nPageDescOffset; // fuers update der pagedescs
CharSet eSrcCharSet; // charset der quelle
friend class SwFltControlStack;
- BOOL bNewDoc;
- BOOL bStdPD;
- BOOL bProtect;
+ sal_Bool bNewDoc;
+ sal_Bool bStdPD;
+ sal_Bool bProtect;
public:
- SwFltShell(SwDoc* , SwPaM& , const String& rBaseURL, BOOL bNew, ULONG = 0);
+ SwFltShell(SwDoc* , SwPaM& , const String& rBaseURL, sal_Bool bNew, sal_uLong = 0);
~SwFltShell();
SwDoc& GetDoc() { return *aStack.pDoc; }
@@ -485,20 +485,20 @@ public:
eSrcCharSet = eNew;
return eOld;
}
- void SetUseStdPageDesc() { bStdPD = TRUE; }
- void SetProtect() { bProtect = TRUE; }
+ void SetUseStdPageDesc() { bStdPD = sal_True; }
+ void SetProtect() { bProtect = sal_True; }
SwPageDesc* MakePageDesc(SwPageDesc* pFirstPageDesc = NULL);
SwPageDesc& GetPageDesc() { return *pCurrentPageDesc; }
- void NextTab() { (*this) << BYTE(0x09); }
- void NextLine() { (*this) << BYTE(0x0a); }
+ void NextTab() { (*this) << sal_uInt8(0x09); }
+ void NextLine() { (*this) << sal_uInt8(0x0a); }
void NextParagraph();
void NextPage();
void NextSection() { pCurrentPageDesc = MakePageDesc(); }
SwFltShell& AddGraphic( const String& rPicName );
SwFltShell& AddError( const sal_Char* pErr );
- SwFltShell& EndItem( USHORT nId );
- SwFltShell& SetStyle( USHORT nStyle );
+ SwFltShell& EndItem( sal_uInt16 nId );
+ SwFltShell& SetStyle( sal_uInt16 nStyle );
SwFltShell& operator << ( Graphic& );
SwFltShell& operator << ( SwFltBookmark& aBook );
@@ -520,12 +520,12 @@ public:
void BeginFootnote();
void EndFootnote();
// methoden zur verwaltung von Tabellen
- BOOL IsInTable() {
+ sal_Bool IsInTable() {
return ( pOut == pOutDoc ) ? pOutDoc->IsInTable() : 0; }
- const SfxPoolItem& GetCellAttr(USHORT nWhich) {
+ const SfxPoolItem& GetCellAttr(sal_uInt16 nWhich) {
return pOut->GetCellAttr(nWhich); }
- BOOL BeginTable() {
- BOOL b = pOut->BeginTable();
+ sal_Bool BeginTable() {
+ sal_Bool b = pOut->BeginTable();
if(b) eSubMode = Table;
return b; }
void NextTableCell() {
@@ -534,25 +534,25 @@ public:
pOut->NextTableRow(); }
void SetTableWidth(SwTwips nW) {
pOut->SetTableWidth(nW); }
- BOOL IsTableWidthSet() {
+ sal_Bool IsTableWidthSet() {
return pOutDoc->IsTableWidthSet(); }
void SetTableOrient(sal_Int16 eOri) {
pOut->SetTableOrient(eOri); }
- void SetCellWidth(SwTwips nWidth, USHORT nCell = USHRT_MAX ) {
+ void SetCellWidth(SwTwips nWidth, sal_uInt16 nCell = USHRT_MAX ) {
pOut->SetCellWidth(nWidth, nCell); }
void SetCellHeight(SwTwips nH) {
pOut->SetCellHeight(nH); }
- void SetCellBorder(const SvxBoxItem& rFmtBox, USHORT nCell = USHRT_MAX ){
+ void SetCellBorder(const SvxBoxItem& rFmtBox, sal_uInt16 nCell = USHRT_MAX ){
pOut->SetCellBorder(rFmtBox, nCell); }
- void SetCellSpace(USHORT nSp) {
+ void SetCellSpace(sal_uInt16 nSp) {
pOut->SetCellSpace(nSp); }
- void DeleteCell(USHORT nCell = USHRT_MAX) {
+ void DeleteCell(sal_uInt16 nCell = USHRT_MAX) {
pOut->DeleteCell(nCell); }
void EndTable() {
pOut->EndTable(); }
// methoden zur verwaltung von Flys
- BOOL IsInFly() { return pOut->IsInFly(); }
- BOOL BeginFly( RndStdIds eAnchor = FLY_AT_PARA, BOOL bAbsolutePos = FALSE );
+ sal_Bool IsInFly() { return pOut->IsInFly(); }
+ sal_Bool BeginFly( RndStdIds eAnchor = FLY_AT_PARA, sal_Bool bAbsolutePos = sal_False );
void SetFlyAnchor( RndStdIds eAnchor )
{ pOut->SetFlyAnchor( eAnchor ); }
void SetFlyXPos( short nXPos, sal_Int16 eHRel = com::sun::star::text::RelOrientation::FRAME,
@@ -563,7 +563,7 @@ public:
pOut->SetFlyFrmAttr( rAttr ); }
void EndFly();
// methoden zur verwaltung von styles:
- void BeginStyle(USHORT nUserCode, RES_POOL_COLLFMT_TYPE aType)
+ void BeginStyle(sal_uInt16 nUserCode, RES_POOL_COLLFMT_TYPE aType)
{
ASSERT(nUserCode<sizeof(pColls)/sizeof(*pColls), "code out of bounds");
ASSERT(pColls[nUserCode] == NULL, "user codes dublicate");
@@ -573,7 +573,7 @@ public:
nAktStyle = nUserCode;
eSubMode = Style;
}
- void BeginStyle( USHORT nUserCode, const String& rName )
+ void BeginStyle( sal_uInt16 nUserCode, const String& rName )
{
ASSERT(nUserCode<sizeof(pColls)/sizeof(*pColls), "code out of bounds");
ASSERT(pColls[nUserCode] == NULL, "user codes dublicate");
@@ -583,16 +583,16 @@ public:
nAktStyle = nUserCode;
eSubMode = Style;
}
- BOOL IsStyleImported(USHORT nUserCode)
+ sal_Bool IsStyleImported(sal_uInt16 nUserCode)
{ return pColls[nUserCode] != 0; }
- void BaseStyle(USHORT nBased)
+ void BaseStyle(sal_uInt16 nBased)
{
ASSERT(eSubMode == Style, "wrong state for style");
ASSERT(pColls[nBased], "Style based on noexistent style" );
if( eSubMode == Style && pColls[nBased]->GetColl() )
((SwFltFormatCollection*)pOut)->Derived(pColls[nBased]->GetColl());
}
- void NextStyle(USHORT nWhich, USHORT nNext);
+ void NextStyle(sal_uInt16 nWhich, sal_uInt16 nNext);
void EndStyle()
{
@@ -602,22 +602,22 @@ public:
eSubMode = None;
}
- BOOL IsFlagSet(SwFltControlStack::Flags no) const
+ sal_Bool IsFlagSet(SwFltControlStack::Flags no) const
{ return aStack.IsFlagSet(no); }
void ConvertUStr( String& rInOut );
String QuoteStr( const String& rIn );
// folgende status kann die shell verwalten:
- const SfxPoolItem& GetNodeOrStyAttr(USHORT nWhich);
- const SfxPoolItem& GetAttr(USHORT nWhich);
- const SfxPoolItem& GetFlyFrmAttr(USHORT nWhich);
- SwFieldType* GetSysFldType(USHORT eWhich);
- BOOL GetWeightBold();
- BOOL GetPostureItalic();
- BOOL GetCrossedOut();
- BOOL GetContour();
- BOOL GetCaseKapitaelchen();
- BOOL GetCaseVersalien();
+ const SfxPoolItem& GetNodeOrStyAttr(sal_uInt16 nWhich);
+ const SfxPoolItem& GetAttr(sal_uInt16 nWhich);
+ const SfxPoolItem& GetFlyFrmAttr(sal_uInt16 nWhich);
+ SwFieldType* GetSysFldType(sal_uInt16 eWhich);
+ sal_Bool GetWeightBold();
+ sal_Bool GetPostureItalic();
+ sal_Bool GetCrossedOut();
+ sal_Bool GetContour();
+ sal_Bool GetCaseKapitaelchen();
+ sal_Bool GetCaseVersalien();
const String& GetBaseURL() const { return sBaseURL; }
};
diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx
index 2f93e279c21d..d4f02f690245 100644
--- a/sw/source/filter/inc/msfilter.hxx
+++ b/sw/source/filter/inc/msfilter.hxx
@@ -120,7 +120,7 @@ namespace sw
@author
<a href="mailto:mmaher@openoffice.org">Martin Maher</a
*/
- ULONG MSDateTimeFormatToSwFormat(String& rParams, SvNumberFormatter *pFormatter, USHORT &rLang, bool bHijri);
+ sal_uLong MSDateTimeFormatToSwFormat(String& rParams, SvNumberFormatter *pFormatter, sal_uInt16 &rLang, bool bHijri);
/** Used by MSDateTimeFormatToSwFormat to identify AM time fields
@@ -146,10 +146,10 @@ namespace sw
/// Redlining Authors
struct AuthorInfo
{
- USHORT nWWAuthorId;
- USHORT nOurId;
+ sal_uInt16 nWWAuthorId;
+ sal_uInt16 nOurId;
- AuthorInfo(USHORT nWWAuthorId_, USHORT nOurId_ = 0):
+ AuthorInfo(sal_uInt16 nWWAuthorId_, sal_uInt16 nOurId_ = 0):
nWWAuthorId( nWWAuthorId_ ),
nOurId( nOurId_ )
{}
@@ -438,7 +438,7 @@ namespace sw
protected:
std::vector<String> maAuthors; // Array of Sw - Bookmarknames
- USHORT GetPos( const String& rNm );
+ sal_uInt16 GetPos( const String& rNm );
//No copying
WrtRedlineAuthor(const WrtRedlineAuthor&);
@@ -447,7 +447,7 @@ namespace sw
WrtRedlineAuthor() {}
virtual ~WrtRedlineAuthor() {}
- USHORT AddName( const String& rNm );
+ sal_uInt16 AddName( const String& rNm );
virtual void Write(Writer &rWrt) = 0;
// std::vector<String> GetNames();
};
diff --git a/sw/source/filter/inc/rtf.hxx b/sw/source/filter/inc/rtf.hxx
index 9f7578fd5f71..4ca97a99648e 100644
--- a/sw/source/filter/inc/rtf.hxx
+++ b/sw/source/filter/inc/rtf.hxx
@@ -34,23 +34,23 @@ class RTFVertOrient
{
union {
struct {
- USHORT nOrient : 4;
- USHORT nRelOrient : 1;
+ sal_uInt16 nOrient : 4;
+ sal_uInt16 nRelOrient : 1;
} Flags;
- USHORT nVal;
+ sal_uInt16 nVal;
} Value;
public:
- RTFVertOrient( USHORT nValue ) { Value.nVal = nValue; }
+ RTFVertOrient( sal_uInt16 nValue ) { Value.nVal = nValue; }
- RTFVertOrient( USHORT nOrient, USHORT nRelOrient ) {
+ RTFVertOrient( sal_uInt16 nOrient, sal_uInt16 nRelOrient ) {
Value.Flags.nOrient = nOrient;
Value.Flags.nRelOrient = nRelOrient;
}
- USHORT GetOrient() const { return Value.Flags.nOrient; }
- USHORT GetRelation() const { return Value.Flags.nRelOrient; }
- USHORT GetValue() const { return Value.nVal; }
+ sal_uInt16 GetOrient() const { return Value.Flags.nOrient; }
+ sal_uInt16 GetRelation() const { return Value.Flags.nRelOrient; }
+ sal_uInt16 GetValue() const { return Value.nVal; }
};
@@ -58,50 +58,50 @@ class RTFHoriOrient
{
union {
struct {
- USHORT nOrient : 4;
- USHORT nRelAnchor : 4;
- USHORT nRelOrient : 1;
+ sal_uInt16 nOrient : 4;
+ sal_uInt16 nRelAnchor : 4;
+ sal_uInt16 nRelOrient : 1;
} Flags;
- USHORT nVal;
+ sal_uInt16 nVal;
} Value;
public:
- RTFHoriOrient( USHORT nValue ) { Value.nVal = nValue; }
+ RTFHoriOrient( sal_uInt16 nValue ) { Value.nVal = nValue; }
- RTFHoriOrient( USHORT nOrient, USHORT nRelOrient ) {
+ RTFHoriOrient( sal_uInt16 nOrient, sal_uInt16 nRelOrient ) {
Value.Flags.nOrient = nOrient;
Value.Flags.nRelOrient = nRelOrient;
Value.Flags.nRelAnchor = 0;
}
- USHORT GetOrient() const { return Value.Flags.nOrient; }
- USHORT GetRelation() const { return Value.Flags.nRelOrient; }
- USHORT GetValue() const { return Value.nVal; }
+ sal_uInt16 GetOrient() const { return Value.Flags.nOrient; }
+ sal_uInt16 GetRelation() const { return Value.Flags.nRelOrient; }
+ sal_uInt16 GetValue() const { return Value.nVal; }
};
class RTFProtect
{
union {
struct {
- BOOL bCntnt : 1;
- BOOL bSize : 1;
- BOOL bPos : 1;
+ sal_Bool bCntnt : 1;
+ sal_Bool bSize : 1;
+ sal_Bool bPos : 1;
} Flags;
- BYTE nVal;
+ sal_uInt8 nVal;
} Value;
public:
- RTFProtect( BYTE nValue ) { Value.nVal = nValue; }
+ RTFProtect( sal_uInt8 nValue ) { Value.nVal = nValue; }
- RTFProtect( BOOL bCntnt, BOOL bSize, BOOL bPos ) {
+ RTFProtect( sal_Bool bCntnt, sal_Bool bSize, sal_Bool bPos ) {
Value.Flags.bCntnt = bCntnt;
Value.Flags.bSize = bSize;
Value.Flags.bPos = bPos;
}
- BOOL GetCntnt() const { return Value.Flags.bCntnt; }
- BOOL GetSize() const { return Value.Flags.bSize; }
- BOOL GetPos() const { return Value.Flags.bPos; }
- USHORT GetValue() const { return Value.nVal; }
+ sal_Bool GetCntnt() const { return Value.Flags.bCntnt; }
+ sal_Bool GetSize() const { return Value.Flags.bSize; }
+ sal_Bool GetPos() const { return Value.Flags.bPos; }
+ sal_uInt16 GetValue() const { return Value.nVal; }
};
@@ -109,22 +109,22 @@ class RTFSurround
{
union {
struct {
- USHORT nGoldCut : 1;
- USHORT nOrder : 4;
+ sal_uInt16 nGoldCut : 1;
+ sal_uInt16 nOrder : 4;
} Flags;
- BYTE nVal;
+ sal_uInt8 nVal;
} Value;
public:
- RTFSurround( BYTE nValue ) { Value.nVal = nValue; }
+ RTFSurround( sal_uInt8 nValue ) { Value.nVal = nValue; }
- RTFSurround( BOOL bGoldCut, BYTE nOrder ) {
+ RTFSurround( sal_Bool bGoldCut, sal_uInt8 nOrder ) {
Value.Flags.nOrder = nOrder;
Value.Flags.nGoldCut = bGoldCut;
}
- BYTE GetOrder() const { return (BYTE)Value.Flags.nOrder; }
- BOOL GetGoldCut() const { return (BOOL)Value.Flags.nGoldCut; }
- USHORT GetValue() const { return Value.nVal; }
+ sal_uInt8 GetOrder() const { return (sal_uInt8)Value.Flags.nOrder; }
+ sal_Bool GetGoldCut() const { return (sal_Bool)Value.Flags.nGoldCut; }
+ sal_uInt16 GetValue() const { return Value.nVal; }
};
#endif // _RTF_HXX
diff --git a/sw/source/filter/inc/wrt_fn.hxx b/sw/source/filter/inc/wrt_fn.hxx
index f190811a6f46..80bf3b2ec35b 100644
--- a/sw/source/filter/inc/wrt_fn.hxx
+++ b/sw/source/filter/inc/wrt_fn.hxx
@@ -41,7 +41,7 @@ typedef FnAttrOut SwAttrFnTab[ POOLATTR_END - POOLATTR_BEGIN ];
SW_DLLPUBLIC Writer& Out( const SwAttrFnTab, const SfxPoolItem&, Writer& );
SW_DLLPUBLIC Writer& Out_SfxItemSet( const SwAttrFnTab, Writer&, const SfxItemSet&,
- BOOL bDeep, BOOL bTstForDefault = TRUE );
+ sal_Bool bDeep, sal_Bool bTstForDefault = sal_True );
/* Funktionspointer auf die Node-Write-Funktionen */
diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx
index c47ac7809bd0..c717cfb5d96c 100644
--- a/sw/source/filter/inc/wrtswtbl.hxx
+++ b/sw/source/filter/inc/wrtswtbl.hxx
@@ -63,44 +63,44 @@ class SwWriteTableCell
sal_uInt32 nWidthOpt; // Breite aus Option;
- USHORT nRow; // Start-Zeile
- USHORT nCol; // Start-Spalte
+ sal_uInt16 nRow; // Start-Zeile
+ sal_uInt16 nCol; // Start-Spalte
- USHORT nRowSpan; // ueberspannte Zeilen
- USHORT nColSpan; // ueberspannte Spalten
+ sal_uInt16 nRowSpan; // ueberspannte Zeilen
+ sal_uInt16 nColSpan; // ueberspannte Spalten
- BOOL bPrcWidthOpt;
+ sal_Bool bPrcWidthOpt;
public:
- SwWriteTableCell(const SwTableBox *pB, USHORT nR, USHORT nC, USHORT nRSpan,
- USHORT nCSpan, long nHght, const SvxBrushItem *pBGround)
+ SwWriteTableCell(const SwTableBox *pB, sal_uInt16 nR, sal_uInt16 nC, sal_uInt16 nRSpan,
+ sal_uInt16 nCSpan, long nHght, const SvxBrushItem *pBGround)
: pBox( pB ), pBackground( pBGround ), nHeight( nHght ), nWidthOpt( 0 ),
nRow( nR ), nCol( nC ), nRowSpan( nRSpan ), nColSpan( nCSpan ),
- bPrcWidthOpt( FALSE )
+ bPrcWidthOpt( sal_False )
{}
const SwTableBox *GetBox() const { return pBox; }
- USHORT GetRow() const { return nRow; }
- USHORT GetCol() const { return nCol; }
+ sal_uInt16 GetRow() const { return nRow; }
+ sal_uInt16 GetCol() const { return nCol; }
- USHORT GetRowSpan() const { return nRowSpan; }
- USHORT GetColSpan() const { return nColSpan; }
+ sal_uInt16 GetRowSpan() const { return nRowSpan; }
+ sal_uInt16 GetColSpan() const { return nColSpan; }
long GetHeight() const { return nHeight; }
sal_Int16 GetVertOri() const;
const SvxBrushItem *GetBackground() const { return pBackground; }
- void SetWidthOpt( USHORT nWidth, BOOL bPrc )
+ void SetWidthOpt( sal_uInt16 nWidth, sal_Bool bPrc )
{
nWidthOpt = nWidth; bPrcWidthOpt = bPrc;
}
sal_uInt32 GetWidthOpt() const { return nWidthOpt; }
- BOOL HasPrcWidthOpt() const { return bPrcWidthOpt; }
+ sal_Bool HasPrcWidthOpt() const { return bPrcWidthOpt; }
};
typedef SwWriteTableCell *SwWriteTableCellPtr;
@@ -115,7 +115,7 @@ class SwWriteTableRow
const SvxBrushItem *pBackground;// Hintergrund
long nPos; // End-Position (twips) der Zeile
- BOOL mbUseLayoutHeights;
+ sal_Bool mbUseLayoutHeights;
// Forbidden and not implemented.
SwWriteTableRow();
@@ -128,17 +128,17 @@ protected:
public:
- USHORT nTopBorder; // Dicke der oberen/unteren Umrandugen
- USHORT nBottomBorder;
+ sal_uInt16 nTopBorder; // Dicke der oberen/unteren Umrandugen
+ sal_uInt16 nBottomBorder;
- BOOL bTopBorder : 1; // Welche Umrandungen sind da?
- BOOL bBottomBorder : 1;
+ sal_Bool bTopBorder : 1; // Welche Umrandungen sind da?
+ sal_Bool bBottomBorder : 1;
- SwWriteTableRow( long nPos, BOOL bUseLayoutHeights );
+ SwWriteTableRow( long nPos, sal_Bool bUseLayoutHeights );
SwWriteTableCell *AddCell( const SwTableBox *pBox,
- USHORT nRow, USHORT nCol,
- USHORT nRowSpan, USHORT nColSpan,
+ sal_uInt16 nRow, sal_uInt16 nCol,
+ sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
long nHeight,
const SvxBrushItem *pBackground );
@@ -148,8 +148,8 @@ public:
}
const SvxBrushItem *GetBackground() const { return pBackground; }
- BOOL HasTopBorder() const { return bTopBorder; }
- BOOL HasBottomBorder() const { return bBottomBorder; }
+ sal_Bool HasTopBorder() const { return bTopBorder; }
+ sal_Bool HasBottomBorder() const { return bBottomBorder; }
long GetPos() const { return nPos; }
const SwWriteTableCells& GetCells() const { return aCells; }
@@ -184,35 +184,35 @@ class SwWriteTableCol
sal_uInt32 nWidthOpt;
- BOOL bRelWidthOpt : 1;
- BOOL bOutWidth : 1; // Spaltenbreite ausgeben?
+ sal_Bool bRelWidthOpt : 1;
+ sal_Bool bOutWidth : 1; // Spaltenbreite ausgeben?
public:
- BOOL bLeftBorder : 1; // Welche Umrandungen sind da?
- BOOL bRightBorder : 1;
+ sal_Bool bLeftBorder : 1; // Welche Umrandungen sind da?
+ sal_Bool bRightBorder : 1;
SwWriteTableCol( sal_uInt32 nPosition );
sal_uInt32 GetPos() const { return nPos; }
- void SetLeftBorder( BOOL bBorder ) { bLeftBorder = bBorder; }
- BOOL HasLeftBorder() const { return bLeftBorder; }
+ void SetLeftBorder( sal_Bool bBorder ) { bLeftBorder = bBorder; }
+ sal_Bool HasLeftBorder() const { return bLeftBorder; }
- void SetRightBorder( BOOL bBorder ) { bRightBorder = bBorder; }
- BOOL HasRightBorder() const { return bRightBorder; }
+ void SetRightBorder( sal_Bool bBorder ) { bRightBorder = bBorder; }
+ sal_Bool HasRightBorder() const { return bRightBorder; }
- void SetOutWidth( BOOL bSet ) { bOutWidth = bSet; }
- BOOL GetOutWidth() const { return bOutWidth; }
+ void SetOutWidth( sal_Bool bSet ) { bOutWidth = bSet; }
+ sal_Bool GetOutWidth() const { return bOutWidth; }
inline int operator==( const SwWriteTableCol& rCol ) const;
inline int operator<( const SwWriteTableCol& rCol ) const;
- void SetWidthOpt( sal_uInt32 nWidth, BOOL bRel )
+ void SetWidthOpt( sal_uInt32 nWidth, sal_Bool bRel )
{
nWidthOpt = nWidth; bRelWidthOpt = bRel;
}
sal_uInt32 GetWidthOpt() const { return nWidthOpt; }
- BOOL HasRelWidthOpt() const { return bRelWidthOpt; }
+ sal_Bool HasRelWidthOpt() const { return bRelWidthOpt; }
};
inline int SwWriteTableCol::operator==( const SwWriteTableCol& rCol ) const
@@ -241,70 +241,70 @@ protected:
SwWriteTableCols aCols; // alle Spalten
SwWriteTableRows aRows; // alle Zellen
- UINT32 nBorderColor; // Umrandungsfarbe
+ sal_uInt32 nBorderColor; // Umrandungsfarbe
- USHORT nCellSpacing; // Dicke der inneren Umrandung
- USHORT nCellPadding; // Absatnd Umrandung-Inhalt
+ sal_uInt16 nCellSpacing; // Dicke der inneren Umrandung
+ sal_uInt16 nCellPadding; // Absatnd Umrandung-Inhalt
- USHORT nBorder; // Dicke der ausseren Umrandung
- USHORT nInnerBorder; // Dicke der inneren Umrandung
+ sal_uInt16 nBorder; // Dicke der ausseren Umrandung
+ sal_uInt16 nInnerBorder; // Dicke der inneren Umrandung
sal_uInt32 nBaseWidth; // Bezugsgroesse fur Breiten SwFmtFrmSize
- USHORT nHeadEndRow; // letzte Zeile des Tabellen-Kopfes
+ sal_uInt16 nHeadEndRow; // letzte Zeile des Tabellen-Kopfes
- USHORT nLeftSub;
- USHORT nRightSub;
+ sal_uInt16 nLeftSub;
+ sal_uInt16 nRightSub;
sal_uInt32 nTabWidth; // Absolute/Relative Breite der Tabelle
- BOOL bRelWidths : 1; // Breiten relativ ausgeben?
- BOOL bUseLayoutHeights : 1; // Layout zur Hoehenbestimmung nehmen?
+ sal_Bool bRelWidths : 1; // Breiten relativ ausgeben?
+ sal_Bool bUseLayoutHeights : 1; // Layout zur Hoehenbestimmung nehmen?
#ifdef DBG_UTIL
- BOOL bGetLineHeightCalled : 1;
+ sal_Bool bGetLineHeightCalled : 1;
#endif
- BOOL bColsOption : 1;
- BOOL bColTags : 1;
- BOOL bLayoutExport : 1;
- BOOL bCollectBorderWidth : 1;
+ sal_Bool bColsOption : 1;
+ sal_Bool bColTags : 1;
+ sal_Bool bLayoutExport : 1;
+ sal_Bool bCollectBorderWidth : 1;
- virtual BOOL ShouldExpandSub( const SwTableBox *pBox,
- BOOL bExpandedBefore, USHORT nDepth ) const;
+ virtual sal_Bool ShouldExpandSub( const SwTableBox *pBox,
+ sal_Bool bExpandedBefore, sal_uInt16 nDepth ) const;
void CollectTableRowsCols( long nStartRPos, sal_uInt32 nStartCPos,
long nParentLineHeight,
sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
- USHORT nDepth );
+ sal_uInt16 nDepth );
- void FillTableRowsCols( long nStartRPos, USHORT nStartRow,
- sal_uInt32 nStartCPos, USHORT nStartCol,
+ void FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
+ sal_uInt32 nStartCPos, sal_uInt16 nStartCol,
long nParentLineHeight,
sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
const SvxBrushItem* pLineBrush,
- USHORT nDepth,
+ sal_uInt16 nDepth,
sal_uInt16 nNumOfHeaderRows );
- void MergeBorders( const SvxBorderLine* pBorderLine, BOOL bTable );
+ void MergeBorders( const SvxBorderLine* pBorderLine, sal_Bool bTable );
- USHORT MergeBoxBorders( const SwTableBox *pBox, USHORT nRow, USHORT nCol,
- USHORT nRowSpan, USHORT nColSpan,
- USHORT &rTopBorder, USHORT &rBottomBorder );
+ sal_uInt16 MergeBoxBorders( const SwTableBox *pBox, sal_uInt16 nRow, sal_uInt16 nCol,
+ sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
+ sal_uInt16 &rTopBorder, sal_uInt16 &rBottomBorder );
sal_uInt32 GetBaseWidth() const { return nBaseWidth; }
- BOOL HasRelWidths() const { return bRelWidths; }
+ sal_Bool HasRelWidths() const { return bRelWidths; }
public:
static sal_uInt32 GetBoxWidth( const SwTableBox *pBox );
- sal_uInt32 GetRawWidth( USHORT nCol, USHORT nColSpan ) const;
- USHORT GetAbsWidth( USHORT nCol, USHORT nColSpan ) const;
- USHORT GetRelWidth( USHORT nCol, USHORT nColSpan ) const;
- USHORT GetPrcWidth( USHORT nCol, USHORT nColSpan ) const;
+ sal_uInt32 GetRawWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
+ sal_uInt16 GetAbsWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
+ sal_uInt16 GetRelWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
+ sal_uInt16 GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
- long GetAbsHeight( long nRawWidth, USHORT nRow, USHORT nRowSpan ) const;
+ long GetAbsHeight( long nRawWidth, sal_uInt16 nRow, sal_uInt16 nRowSpan ) const;
protected:
long GetLineHeight( const SwTableLine *pLine );
@@ -312,14 +312,14 @@ protected:
const SvxBrushItem *GetLineBrush( const SwTableBox *pBox,
SwWriteTableRow *pRow );
- USHORT GetLeftSpace( USHORT nCol ) const;
- USHORT GetRightSpace( USHORT nCol, USHORT nColSpan ) const;
+ sal_uInt16 GetLeftSpace( sal_uInt16 nCol ) const;
+ sal_uInt16 GetRightSpace( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
public:
SwWriteTable( const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth,
- BOOL bRel, USHORT nMaxDepth = USHRT_MAX,
- USHORT nLeftSub=0, USHORT nRightSub=0, sal_uInt32 nNumOfRowsToRepeat=0 );
+ sal_Bool bRel, sal_uInt16 nMaxDepth = USHRT_MAX,
+ sal_uInt16 nLeftSub=0, sal_uInt16 nRightSub=0, sal_uInt32 nNumOfRowsToRepeat=0 );
SwWriteTable( const SwHTMLTableLayout *pLayoutInfo );
virtual ~SwWriteTable();
diff --git a/sw/source/filter/rtf/rtffld.cxx b/sw/source/filter/rtf/rtffld.cxx
index 90bb9e668261..694558ba9b5e 100644
--- a/sw/source/filter/rtf/rtffld.cxx
+++ b/sw/source/filter/rtf/rtffld.cxx
@@ -172,7 +172,7 @@ static RTF_FLD_TYPES _WhichFld( String& rName, String& rNext )
return RTFFLD_UNKNOWN; // nichts gefunden.
}
-static USHORT CheckNumberFmtStr( const String& rNStr )
+static sal_uInt16 CheckNumberFmtStr( const String& rNStr )
{
const static sal_Char* aNumberTypeTab[] =
{
@@ -189,12 +189,12 @@ static USHORT CheckNumberFmtStr( const String& rNStr )
ASSERT(sizeof(aNumberTypeTab) / sizeof(sal_Char *)
>= SVX_NUM_PAGEDESC - SVX_NUM_CHARS_UPPER_LETTER, "impossible");
- for (USHORT n = SVX_NUM_CHARS_UPPER_LETTER; n <= SVX_NUM_PAGEDESC; ++n)
+ for (sal_uInt16 n = SVX_NUM_CHARS_UPPER_LETTER; n <= SVX_NUM_PAGEDESC; ++n)
{
const sal_Char* pCmp = aNumberTypeTab[n - SVX_NUM_CHARS_UPPER_LETTER];
int nLen = *pCmp++;
if( rNStr.EqualsAscii( pCmp, 0, static_cast< xub_StrLen >(nLen) ))
- return static_cast< USHORT >(2 <= n ? n : (n + SVX_NUM_CHARS_UPPER_LETTER_N));
+ return static_cast< sal_uInt16 >(2 <= n ? n : (n + SVX_NUM_CHARS_UPPER_LETTER_N));
}
return SVX_NUM_PAGEDESC; // default-Wert
}
@@ -207,7 +207,7 @@ public:
RtfFieldSwitch( const String& rParam );
sal_Unicode GetSwitch( String& rParam );
- BOOL IsAtEnd() const { return nCurPos >= sParam.Len(); }
+ sal_Bool IsAtEnd() const { return nCurPos >= sParam.Len(); }
xub_StrLen GetCurPos() const { return nCurPos; }
void Erase( xub_StrLen nEndPos ) { sParam.Erase( 0, nEndPos ); }
void Insert( const String& rIns ) { sParam.Insert( rIns, 0 ); }
@@ -238,7 +238,7 @@ sal_Unicode RtfFieldSwitch::GetSwitch( String& rParam )
// dann alles in Hochkommatas oder bis zum naechsten // als
// Param returnen
- USHORT nOffset;
+ sal_uInt16 nOffset;
if( '"' != c && '\'' != c )
c = '\\', nOffset = 0;
else
@@ -296,7 +296,7 @@ void lcl_ScanEquationField( const String& rStr, RTF_EquationData& rData,
else if( 1 < nSubSupFlag )
nSubSupFlag = 0;
- BOOL bCheckBracket = FALSE;
+ sal_Bool bCheckBracket = sal_False;
switch( cKey )
{
case 0:
@@ -330,7 +330,7 @@ void lcl_ScanEquationField( const String& rStr, RTF_EquationData& rData,
2 == nSubSupFlag )
{
rData.nUp = sParam.Copy( 1 ).ToInt32();
- bCheckBracket = TRUE;
+ bCheckBracket = sal_True;
}
break;
@@ -339,12 +339,12 @@ void lcl_ScanEquationField( const String& rStr, RTF_EquationData& rData,
2 == nSubSupFlag )
{
rData.nDown = sParam.Copy( 1 ).ToInt32();
- bCheckBracket = TRUE;
+ bCheckBracket = sal_True;
}
break;
default:
- bCheckBracket = TRUE;
+ bCheckBracket = sal_True;
cKey = 0;
break;
}
@@ -495,11 +495,11 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
// and get the rtf filter to use it
SwField *pFld = 0;
short nNumFmtType = NUMBERFORMAT_UNDEFINED;
- ULONG nFmtIdx = NUMBERFORMAT_UNDEFINED;
+ sal_uLong nFmtIdx = NUMBERFORMAT_UNDEFINED;
- USHORT rLang(0);
+ sal_uInt16 rLang(0);
RES_CHRATR eLang = maPageDefaults.mbRTLdoc ? RES_CHRATR_CTL_LANGUAGE : RES_CHRATR_LANGUAGE;
- const SvxLanguageItem *pLang = (SvxLanguageItem*)&pDoc->GetAttrPool().GetDefaultItem( static_cast< USHORT >(eLang) );
+ const SvxLanguageItem *pLang = (SvxLanguageItem*)&pDoc->GetAttrPool().GetDefaultItem( static_cast< sal_uInt16 >(eLang) );
rLang = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter();
@@ -540,7 +540,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
// werden:
// \\data -> Datenbank-Name als Field
// DATA -> Datenbank-Info
- BOOL bField = rFieldStr.GetChar( 0 ) != 'D';
+ sal_Bool bField = rFieldStr.GetChar( 0 ) != 'D';
// nur der Name interressiert
if( STRING_NOTFOUND != (nPos = aSaveStr.Search( '.' )) )
@@ -576,11 +576,11 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
// loesche fuehrende Blanks
if( IsNewGroup() )
GetAttrSet();
- SetNewGroup( TRUE );
+ SetNewGroup( sal_True );
SfxItemSet& rSet = GetAttrSet();
- BOOL bCharIns = FALSE;
+ sal_Bool bCharIns = sal_False;
RtfFieldSwitch aRFS( aSaveStr );
while( !aRFS.IsAtEnd() )
{
@@ -596,7 +596,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
if( nChar )
{
pDoc->InsertString( *pPam, nChar );
- bCharIns = TRUE;
+ bCharIns = sal_True;
}
}
break;
@@ -626,7 +626,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
case 's': case 'S':
// Fontsize setzen
{
- const USHORT nVal = (USHORT)(sParam.ToInt32() * 20);
+ const sal_uInt16 nVal = (sal_uInt16)(sParam.ToInt32() * 20);
rSet.Put( SvxFontHeightItem( nVal,
100, RES_CHRATR_FONTSIZE ));
}
@@ -635,7 +635,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
}
if( !IsNewGroup() ) AttrGroupEnd();
- SetNewGroup( FALSE );
+ SetNewGroup( sal_False );
SkipGroup(); // ueberlese den Rest
}
@@ -704,22 +704,22 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
if( !pCharFmt )
{
//Make a guess at which of asian of western we should be setting
- USHORT nScript;
+ sal_uInt16 nScript;
if (pBreakIt->GetBreakIter().is())
nScript = pBreakIt->GetBreakIter()->getScriptType( aData.sUp, 0);
else
nScript = i18n::ScriptType::ASIAN;
- USHORT nFntHWhich = GetWhichOfScript( RES_CHRATR_FONTSIZE, nScript ),
+ sal_uInt16 nFntHWhich = GetWhichOfScript( RES_CHRATR_FONTSIZE, nScript ),
nFntWhich = GetWhichOfScript( RES_CHRATR_FONT, nScript );
//Check to see if we already have a ruby charstyle that this fits
- for(USHORT i=0; i < aRubyCharFmts.Count(); ++i )
+ for(sal_uInt16 i=0; i < aRubyCharFmts.Count(); ++i )
{
SwCharFmt *pFmt = (SwCharFmt *)aRubyCharFmts[i];
const SvxFontHeightItem &rF = (const SvxFontHeightItem &)
pFmt->GetFmtAttr( nFntHWhich );
- if( rF.GetHeight() == USHORT(aData.nFontSize * 10 ))
+ if( rF.GetHeight() == sal_uInt16(aData.nFontSize * 10 ))
{
const SvxFontItem &rFI = (const SvxFontItem &)
pFmt->GetFmtAttr( nFntWhich );
@@ -757,7 +757,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
//Set the charstyle and justification
aRuby.SetCharFmtName( pCharFmt->GetName() );
aRuby.SetCharFmtId( pCharFmt->GetPoolFmtId() );
- aRuby.SetAdjustment( (USHORT)aData.nJustificationCode );
+ aRuby.SetAdjustment( (sal_uInt16)aData.nJustificationCode );
// im FieldStr steht der anzuzeigenden Text, im
pDoc->InsertString( *pPam, aData.sText );
@@ -896,7 +896,7 @@ void SwRTFParser::ReadXEField()
bReadSwFly = false; //#it may be that any uses of this need to be removed and replaced
int nNumOpenBrakets = 1;
String sFieldStr;
- BYTE cCh;
+ sal_uInt8 cCh;
int nToken;
while (nNumOpenBrakets && IsParserWorking())
@@ -920,7 +920,7 @@ void SwRTFParser::ReadXEField()
if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_HIDDEN, sal_True, &pItem ) )
{
SvxCharHiddenItem aCharHidden(*(SvxCharHiddenItem*)pItem);
- aCharHidden.SetValue(FALSE);
+ aCharHidden.SetValue(sal_False);
rSet.Put(aCharHidden);
}
@@ -1004,9 +1004,9 @@ void SwRTFParser::ReadField()
bReadSwFly = false; //#it may be that any uses of this need to be removed and replaced
int nRet = 0;
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
- int bFldInst = FALSE, bFldRslt = FALSE;
+ int bFldInst = sal_False, bFldRslt = sal_False;
String sFieldStr, sFieldNm;
- BYTE cCh;
+ sal_uInt8 cCh;
int nToken;
while (nNumOpenBrakets && IsParserWorking())
@@ -1138,11 +1138,11 @@ void SwRTFParser::ReadField()
break;
case RTF_FLDINST:
- bFldInst = TRUE;
+ bFldInst = sal_True;
break;
case RTF_FLDRSLT:
- bFldRslt = TRUE;
+ bFldRslt = sal_True;
break;
case RTF_U:
diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx
index 5303ad26dcba..59fe85a3c4a8 100644
--- a/sw/source/filter/rtf/rtffly.cxx
+++ b/sw/source/filter/rtf/rtffly.cxx
@@ -80,11 +80,11 @@ using namespace ::com::sun::star;
#define ANCHOR(p) ((SwFmtAnchor*)p)
// steht in shellio.hxx
-extern SwCntntNode* GoNextNds( SwNodeIndex * pIdx, BOOL bChk );
+extern SwCntntNode* GoNextNds( SwNodeIndex * pIdx, sal_Bool bChk );
SV_IMPL_PTRARR( SwFlySaveArr, SwFlySave* )
-inline const SwFmtFrmSize GetFrmSize(const SfxItemSet& rSet, BOOL bInP=TRUE)
+inline const SwFmtFrmSize GetFrmSize(const SfxItemSet& rSet, sal_Bool bInP=sal_True)
{
return (const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE,bInP);
}
@@ -98,29 +98,29 @@ SwFlySave::SwFlySave(const SwPaM& rPam, SfxItemSet& rSet)
int SwFlySave::IsEqualFly( const SwPaM& rPos, SfxItemSet& rSet )
{
if( rSet.Count() != aFlySet.Count() || nDropAnchor )
- return FALSE;
+ return sal_False;
// nur TextNodes zusammenfassen
if( nSttNd == nEndNd && nEndNd.GetNode().IsNoTxtNode() )
- return FALSE;
+ return sal_False;
// teste auf gleiche / naechste Position
if( rPos.GetPoint()->nNode.GetIndex() == nEndNd.GetIndex() )
{
if( 1 < (rPos.GetPoint()->nContent.GetIndex() - nEndCnt) )
- return FALSE;
+ return sal_False;
}
else if( rPos.GetPoint()->nContent.GetIndex() )
- return FALSE;
+ return sal_False;
else
{
SwNodeIndex aIdx( nEndNd );
SwCntntNode* pCNd = rPos.GetDoc()->GetNodes()[ aIdx ]->GetCntntNode();
- if( !GoNextNds( &aIdx, TRUE ) ||
+ if( !GoNextNds( &aIdx, sal_True ) ||
aIdx.GetIndex() != rPos.GetPoint()->nNode.GetIndex() ||
( pCNd && pCNd->Len() != nEndCnt ))
{
- return FALSE;
+ return sal_False;
}
}
@@ -128,23 +128,23 @@ int SwFlySave::IsEqualFly( const SwPaM& rPos, SfxItemSet& rSet )
{
SfxItemIter aIter( rSet );
const SfxPoolItem *pItem, *pCurr = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
if( SFX_ITEM_SET != aFlySet.GetItemState( pCurr->Which(),
- FALSE, &pItem ) ||
+ sal_False, &pItem ) ||
// Ankerattribute gesondert behandeln
( RES_ANCHOR == pCurr->Which()
? (ANCHOR(pCurr)->GetAnchorId() != ANCHOR(pItem)->GetAnchorId() ||
ANCHOR(pCurr)->GetPageNum() != ANCHOR(pItem)->GetPageNum())
: *pItem != *pCurr ))
- return FALSE;
+ return sal_False;
if( aIter.IsAtEnd() )
break;
pCurr = aIter.NextItem();
}
}
- return TRUE;
+ return sal_True;
}
void SwFlySave::SetFlySize( const SwTableNode& rTblNd )
@@ -157,17 +157,17 @@ void SwFlySave::SetFlySize( const SwTableNode& rTblNd )
aFlySet.Put( SwFmtFrmSize( rSz.GetHeightSizeType(), nWidth, rSz.GetHeight() ));
}
-BOOL lcl_HasBreakAttrs( const SwCntntNode& rNd )
+sal_Bool lcl_HasBreakAttrs( const SwCntntNode& rNd )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SfxItemSet& rSet = rNd.GetSwAttrSet();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, TRUE, &pItem ) &&
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, sal_True, &pItem ) &&
SVX_BREAK_NONE != ((SvxFmtBreakItem*)pItem)->GetBreak() )
- bRet = TRUE;
- else if( SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, TRUE, &pItem )&&
+ bRet = sal_True;
+ else if( SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, sal_True, &pItem )&&
0 != ((SwFmtPageDesc*)pItem)->GetPageDesc() )
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
@@ -181,11 +181,11 @@ void lcl_CpyBreakAttrs( SwCntntNode* pSrcNd, SwCntntNode* pDstNd,
const SfxPoolItem *pDescItem, *pBreakItem;
if( SFX_ITEM_SET != pSet->GetItemState( RES_BREAK,
- FALSE, &pBreakItem ) )
+ sal_False, &pBreakItem ) )
pBreakItem = 0;
if( SFX_ITEM_SET != pSet->GetItemState( RES_PAGEDESC,
- FALSE, &pDescItem ) )
+ sal_False, &pDescItem ) )
pDescItem = 0;
if( pDescItem || pBreakItem )
@@ -233,7 +233,7 @@ void SwRTFParser::SetFlysInDoc()
rtfFmtMap aPrevFmts;
SwFrmFmt* pParent = pDoc->GetFrmFmtFromPool( RES_POOLFRM_FRAME );
- for( USHORT n = 0; n < aFlyArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aFlyArr.Count(); ++n )
{
SwFlySave* pFlySave = aFlyArr[ n ];
@@ -256,10 +256,10 @@ void SwRTFParser::SetFlysInDoc()
pSttNd->GetIndex() + 1 == pEndNd->GetIndex()
&& pSttNd->GetTxt().Len()>0 /* #i38227# leave drop caps with no content as fly frames */ )
{
- ULONG nPos = pSttNd->GetIndex();
+ sal_uLong nPos = pSttNd->GetIndex();
SwDoc * pDoc1 = pSttNd->GetDoc();
- BOOL bJoined;
+ sal_Bool bJoined;
{
SwPaM aTmp( *pSttNd, pSttNd->GetTxt().Len(), *pEndNd, 0 );
bJoined = pDoc1->DeleteAndJoin( aTmp );
@@ -270,7 +270,7 @@ void SwRTFParser::SetFlysInDoc()
if( bJoined && pNd != NULL)
{
SwFmtDrop aDropCap;
- aDropCap.GetLines() = (BYTE)pFlySave->nDropLines;
+ aDropCap.GetLines() = (sal_uInt8)pFlySave->nDropLines;
aDropCap.GetChars() = 1;
SwIndex aIdx( pEndNd );
@@ -313,7 +313,7 @@ void SwRTFParser::SetFlysInDoc()
// die Size muss noch korrigiert werden!
nAktPageDesc = 0; // Standart PageDesc
if( SFX_ITEM_SET != pFlySave->aFlySet.GetItemState(
- RES_FRM_SIZE, FALSE ) )
+ RES_FRM_SIZE, sal_False ) )
_SetPictureSize( *(SwNoTxtNode*)pNd, aRg.aStart,
pFlySave->aFlySet );
if( 0 != ( pNd = pNd->FindTableNode() ) )
@@ -329,7 +329,7 @@ void SwRTFParser::SetFlysInDoc()
if( bMakeEmptySection )
{
pNd = &aRg.aEnd.GetNode();
- ULONG nSectEnd = pNd->EndOfSectionIndex()+1;
+ sal_uLong nSectEnd = pNd->EndOfSectionIndex()+1;
if (!pNd->IsTableNode() && 0 !=(pNd = pNd->FindTableNode())
&& (pNd->GetIndex() >= aRg.aStart.GetNode().GetIndex()) )
@@ -351,7 +351,7 @@ void SwRTFParser::SetFlysInDoc()
else
{
// Tabelle ist noch groesser, also splitte sie hier.
- rNds.SplitTable( aRg.aEnd, TRUE );
+ rNds.SplitTable( aRg.aEnd, sal_True );
aRg.aEnd = pNd->EndOfSectionIndex() + 1;
}
}
@@ -418,7 +418,7 @@ void SwRTFParser::SetFlysInDoc()
SwCntntNode* pSrcNd = pDoc->GetNodes()[ pSttNd->GetIndex() + 1 ]->GetCntntNode();
SfxItemSet aTmpSet( pDoc->GetAttrPool(),
RES_BACKGROUND, RES_BOX );
- const SvxBrushItem* pBackgroundBrush = (const SvxBrushItem*)pFlySave->aFlySet.GetItem(RES_BACKGROUND, FALSE);
+ const SvxBrushItem* pBackgroundBrush = (const SvxBrushItem*)pFlySave->aFlySet.GetItem(RES_BACKGROUND, sal_False);
if( pSrcNd && pSrcNd->HasSwAttrSet() )
aTmpSet.Put( *pSrcNd->GetpSwAttrSet() );
if (pBackgroundBrush)
@@ -427,7 +427,7 @@ void SwRTFParser::SetFlysInDoc()
}
else
{
- pBackgroundBrush = (const SvxBrushItem*)aTmpSet.GetItem(RES_BACKGROUND, FALSE);
+ pBackgroundBrush = (const SvxBrushItem*)aTmpSet.GetItem(RES_BACKGROUND, sal_False);
if (pBackgroundBrush)
{
Color& rBackgroundColor = const_cast<SvxBrushItem*>(pBackgroundBrush)->GetColor();
@@ -568,11 +568,11 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// <--
SvxFrameDirectionItem aFrmDir( FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR );
- USHORT nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
+ sal_uInt16 nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
SvUShorts aColumns;
- BOOL bChkDropCap = 0 == pSet;
- USHORT nDropCapLines = 0, nDropCapAnchor = 0;
+ sal_Bool bChkDropCap = 0 == pSet;
+ sal_uInt16 nDropCapLines = 0, nDropCapAnchor = 0;
int nNumOpenBrakets = GetOpenBrakets();
if( !pSet )
@@ -588,10 +588,10 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
}
// dann sammel mal alle Attribute zusammen
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
int nAppliedProps=0;
do {
- USHORT nVal = USHORT(nTokenValue);
+ sal_uInt16 nVal = sal_uInt16(nTokenValue);
/*
#i5263#
Assume that a property genuinely contributes towards creating a frame,
@@ -604,7 +604,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
{
SwFmtFrmSize aSz( ATT_MIN_SIZE, nTokenValue, 0 );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_FRM_SIZE, TRUE,
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_FRM_SIZE, sal_True,
&pItem ))
{
aSz.SetHeightSizeType( ((SwFmtFrmSize*)pItem)->GetHeightSizeType() );
@@ -618,7 +618,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
{
SwFmtFrmSize aSz( ATT_MIN_SIZE, 0, MINFLY );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_FRM_SIZE, TRUE,
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_FRM_SIZE, sal_True,
&pItem ))
{
aSz.SetWidth( ((SwFmtFrmSize*)pItem)->GetWidth() );
@@ -672,10 +672,10 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
break;
case RTF_POSXC: aHori.SetHoriOrient( text::HoriOrientation::CENTER ); break;
case RTF_POSXI: aHori.SetHoriOrient( text::HoriOrientation::LEFT );
- aHori.SetPosToggle( TRUE );
+ aHori.SetPosToggle( sal_True );
break;
case RTF_POSXO: aHori.SetHoriOrient( text::HoriOrientation::RIGHT );
- aHori.SetPosToggle( TRUE );
+ aHori.SetPosToggle( sal_True );
break;
case RTF_POSXL: aHori.SetHoriOrient( text::HoriOrientation::LEFT ); break;
case RTF_POSXR: aHori.SetHoriOrient( text::HoriOrientation::RIGHT ); break;
@@ -721,7 +721,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
case RTF_DROPCAPLI: // Dropcaps !!
if( bChkDropCap )
{
- nDropCapLines = USHORT( nTokenValue );
+ nDropCapLines = sal_uInt16( nTokenValue );
if( !nDropCapAnchor )
nDropCapAnchor = 1;
}
@@ -729,7 +729,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
case RTF_DROPCAPT:
if( bChkDropCap )
{
- nDropCapAnchor = USHORT( nTokenValue );
+ nDropCapAnchor = sal_uInt16( nTokenValue );
if( !nDropCapLines )
nDropCapLines = 3;
}
@@ -738,15 +738,15 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// fuer die "alten" Writer - haben die Spaltigkeit falsch heraus-
// geschrieben
- case RTF_COLS: nCols = USHORT( nTokenValue ); break;
- case RTF_COLSX: nColSpace = USHORT( nTokenValue ); break;
+ case RTF_COLS: nCols = sal_uInt16( nTokenValue ); break;
+ case RTF_COLSX: nColSpace = sal_uInt16( nTokenValue ); break;
case RTF_COLNO:
- nAktCol = USHORT( nTokenValue );
+ nAktCol = sal_uInt16( nTokenValue );
if( RTF_COLW == GetNextToken() )
{
- USHORT nWidth = USHORT( nTokenValue ), nSpace = 0;
+ sal_uInt16 nWidth = sal_uInt16( nTokenValue ), nSpace = 0;
if( RTF_COLSR == GetNextToken() )
- nSpace = USHORT( nTokenValue );
+ nSpace = sal_uInt16( nTokenValue );
else
SkipToken( -1 ); // wieder zurueck
@@ -780,24 +780,24 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
nCols = USHRT_MAX; // neu aufsetzen
nColSpace = USHRT_MAX;
do {
- nVal = USHORT(nTokenValue);
+ nVal = sal_uInt16(nTokenValue);
switch( nToken )
{
// Swg-Frame-Tokens
case RTF_FLYPRINT:
{
- pSet->Put( SvxPrintItem( RES_PRINT, FALSE ));
+ pSet->Put( SvxPrintItem( RES_PRINT, sal_False ));
}
break;
case RTF_FLYOPAQUE:
{
- pSet->Put( SvxOpaqueItem( RES_OPAQUE, FALSE ));
+ pSet->Put( SvxOpaqueItem( RES_OPAQUE, sal_False ));
}
break;
case RTF_FLYPRTCTD:
{
- RTFProtect aP( (BYTE)nTokenValue );
+ RTFProtect aP( (sal_uInt8)nTokenValue );
SvxProtectItem aProtectItem( RES_PROTECT );
aProtectItem.SetCntntProtect( aP.GetCntnt() );
aProtectItem.SetSizeProtect( aP.GetSize() );
@@ -808,7 +808,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
case RTF_FLYMAINCNT:
{
- RTFSurround aMC( (BYTE)nTokenValue );
+ RTFSurround aMC( (sal_uInt8)nTokenValue );
SwFmtSurround aSurr( (SwSurround)aMC.GetOrder());
if( aMC.GetGoldCut() )
aSurr.SetSurround( SURROUND_IDEAL );
@@ -838,7 +838,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
{
case RTF_FLY_PAGE:
aAnchor.SetType( FLY_AT_PAGE );
- aAnchor.SetPageNum( USHORT(nTokenValue));
+ aAnchor.SetPageNum( sal_uInt16(nTokenValue));
aAnchor.SetAnchor( 0 );
break;
@@ -856,15 +856,15 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// case RTF_FLY_COLUMN:
}
break;
- case RTF_COLS: nCols = USHORT( nTokenValue ); break;
- case RTF_COLSX: nColSpace = USHORT( nTokenValue ); break;
+ case RTF_COLS: nCols = sal_uInt16( nTokenValue ); break;
+ case RTF_COLSX: nColSpace = sal_uInt16( nTokenValue ); break;
case RTF_COLNO:
- nAktCol = USHORT( nTokenValue );
+ nAktCol = sal_uInt16( nTokenValue );
if( RTF_COLW == GetNextToken() )
{
- USHORT nWidth = USHORT( nTokenValue ), nSpace = 0;
+ sal_uInt16 nWidth = sal_uInt16( nTokenValue ), nSpace = 0;
if( RTF_COLSR == GetNextToken() )
- nSpace = USHORT( nTokenValue );
+ nSpace = sal_uInt16( nTokenValue );
else
SkipToken( -1 ); // wieder zurueck
@@ -883,20 +883,20 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
ReadBackgroundAttr( nToken, aSet );
else if( RTF_IGNOREFLAG == nToken )
{
- int bSkipGrp = TRUE;
+ int bSkipGrp = sal_True;
switch( nToken = GetNextToken() )
{
case RTF_SHADOW:
case RTF_BRDBOX:
ReadAttr( SkipToken( -2 ), &aSet );
- bSkipGrp = FALSE;
+ bSkipGrp = sal_False;
break;
case RTF_BRDRT:
case RTF_BRDRB:
case RTF_BRDRR:
case RTF_BRDRL:
- bSkipGrp = FALSE;
+ bSkipGrp = sal_False;
ReadBorderAttr( SkipToken( -2 ), aSet );
break;
}
@@ -934,14 +934,14 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
if( nSkip )
{
nToken = SkipToken( nSkip );
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
break;
default:
--nAppliedProps; //Not sufficient to make a frame
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
if( bWeiter )
@@ -958,7 +958,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ));
// <--
- SwFmtFollowTextFlow aFollowTextFlow( FALSE );
+ SwFmtFollowTextFlow aFollowTextFlow( sal_False );
pSet->Put( aFollowTextFlow );
if( !( aFrmDir == pSet->Get( RES_FRAMEDIR )) )
@@ -970,23 +970,23 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
if( USHRT_MAX == nColSpace )
nColSpace = 720;
- ULONG nWidth = USHRT_MAX;
- aCol.Init( nCols, nColSpace, USHORT( nWidth ) );
+ sal_uLong nWidth = USHRT_MAX;
+ aCol.Init( nCols, nColSpace, sal_uInt16( nWidth ) );
if( nCols == ( aColumns.Count() / 2 ) )
{
- for( USHORT n = 0, i = 0; n < aColumns.Count(); n += 2, ++i )
+ for( sal_uInt16 n = 0, i = 0; n < aColumns.Count(); n += 2, ++i )
{
SwColumn* pCol = aCol.GetColumns()[ i ];
- ULONG nTmp = aColumns[ n ];
+ sal_uLong nTmp = aColumns[ n ];
nTmp *= USHRT_MAX;
nTmp /= nWidth;
- pCol->SetWishWidth( USHORT(nTmp) );
+ pCol->SetWishWidth( sal_uInt16(nTmp) );
/*
JP 07.07.95: der Dialog kennt nur eine Breite fuer alle Spalten
darum hier nicht weiter beachten
nTmp = aColumns[ n+1 ];
if( nTmp )
- pCol->SetRight( USHORT(nTmp) );
+ pCol->SetRight( sal_uInt16(nTmp) );
else
pCol->SetRight( 0 );
pCol->SetLeft( 0 );
@@ -1002,7 +1002,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// ein neues FlyFormat anlegen oder das alte benutzen ?
// (teste ob es die selben Attribute besitzt!)
SwFlySave* pFlySave = 0;
- USHORT nFlyArrCnt = aFlyArr.Count();
+ sal_uInt16 nFlyArrCnt = aFlyArr.Count();
/*
#i5263#
There were not enough frame properties found to actually justify creating
@@ -1037,7 +1037,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
}
}
- SetPardTokenRead( FALSE );
+ SetPardTokenRead( sal_False );
const SwTableNode* pTblNd = pPam->GetNode()->FindTableNode();
while( !IsPardTokenRead() && IsParserWorking() )
@@ -1052,7 +1052,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// #102781#. Added support for transparent frames.
if (nToken == RTF_CBPAT && nFlyArrCnt > 0)
{
- USHORT _index=USHORT(nTokenValue);
+ sal_uInt16 _index=sal_uInt16(nTokenValue);
const Color& rColor = GetColor(_index);
SvxBrushItem aBrush(rColor, RES_BACKGROUND);
SwFlySave* pFS = aFlyArr[nFlyArrCnt-1];
@@ -1121,7 +1121,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
}
else
{
- BOOL bMovePaM = 0 != pTblNd;
+ sal_Bool bMovePaM = 0 != pTblNd;
pFlySave->nEndNd = pPam->GetPoint()->nNode;
pFlySave->nEndCnt = pPam->GetPoint()->nContent.GetIndex();
@@ -1199,15 +1199,15 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
aDiffs.Differentiate( pFlySave->aFlySet );
pFlySave->aFlySet.Put( aDiffs );
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if( aSz1.GetHeight() && !aSz2.GetHeight() )
{
- bSet = TRUE;
+ bSet = sal_True;
aSz2.SetHeight( aSz1.GetHeight() );
}
if( aSz1.GetWidth() && !aSz2.GetWidth() )
{
- bSet = TRUE;
+ bSet = sal_True;
aSz2.SetWidth( aSz1.GetWidth() );
}
if( bSet )
@@ -1288,7 +1288,7 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf,
if (pDoc->IsInHeaderFooter(pPos->nNode))
{
- SvxOpaqueItem aOpaqueItem(RES_OPAQUE, FALSE);
+ SvxOpaqueItem aOpaqueItem(RES_OPAQUE, sal_False);
SwFmtSurround aSurroundItem(SURROUND_THROUGHT);
aFlySet.Put(aOpaqueItem);
aFlySet.Put(aSurroundItem);
@@ -1395,7 +1395,7 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
SwGrfNode* pGrfNd;
if( !aSize.Width() && !aSize.Height() &&
0 != (pGrfNd = (SwGrfNode*)rNd.GetGrfNode() ) && pGrfNd->IsGrfLink() )
- pGrfNd->SetChgTwipSize( TRUE );
+ pGrfNd->SetChgTwipSize( sal_True );
// min. Werte einhalten !!
if( aSize.Width() < MINFLY )
@@ -1405,7 +1405,7 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
if( pPicType )
{
- BOOL bChg = FALSE;
+ sal_Bool bChg = sal_False;
SwCropGrf aCrop;
/*
@@ -1422,7 +1422,7 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
// in der Breite (also rechts) croppen
aCrop.Right() = nTmp - aSize.Width();
aSize.Width() = nTmp;
- bChg = TRUE;
+ bChg = sal_True;
}
nTmp = pPicType->nHeight * 20;
@@ -1431,29 +1431,29 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
// in der Hoehe (also unten) croppen
aCrop.Bottom() = nTmp - aSize.Height();
aSize.Height() = nTmp;
- bChg = TRUE;
+ bChg = sal_True;
}
}
*/
if( pPicType->nCropT )
{
aCrop.SetTop( pPicType->nCropT );
- bChg = TRUE;
+ bChg = sal_True;
}
if( pPicType->nCropB )
{
aCrop.SetBottom( pPicType->nCropB );
- bChg = TRUE;
+ bChg = sal_True;
}
if( pPicType->nCropL )
{
aCrop.SetLeft( pPicType->nCropL );
- bChg = TRUE;
+ bChg = sal_True;
}
if( pPicType->nCropR )
{
aCrop.SetRight( pPicType->nCropR );
- bChg = TRUE;
+ bChg = sal_True;
}
if( bChg )
@@ -1503,7 +1503,7 @@ void SwRTFParser::ReadOLEData()
Graphic aGrf;
SvxRTFPictureType aPicType, aOleType;
- int nToken, bValidOle = TRUE, bWeiter = TRUE;
+ int nToken, bValidOle = sal_True, bWeiter = sal_True;
int nOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
String* pStr = 0;
@@ -1512,7 +1512,7 @@ void SwRTFParser::ReadOLEData()
while( nOpenBrakets && IsParserWorking() && bWeiter && bValidOle )
{
nToken = GetNextToken();
- USHORT nVal = USHORT( nTokenValue );
+ sal_uInt16 nVal = sal_uInt16( nTokenValue );
switch( nToken )
{
case '}': --nOpenBrakets; pStr = 0; break;
@@ -1556,7 +1556,7 @@ void SwRTFParser::ReadOLEData()
case RTF_OBJHTML:
case RTF_OBJALIAS:
case RTF_OBJSECT:
- bValidOle = FALSE; // diese Typen koennen wir nicht
+ bValidOle = sal_False; // diese Typen koennen wir nicht
break;
case RTF_OBJCLASS:
@@ -1576,7 +1576,7 @@ void SwRTFParser::ReadOLEData()
case RTF_RESULT:
{
// hier weitermachen, wenn das OLE-Object ungueltig ist
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
break;
case RTF_RSLTBMP: // diese sollten wir ignorieren
@@ -1602,7 +1602,7 @@ void SwRTFParser::ReadOLEData()
{
xub_StrLen nHexLen = HexToBin( aToken );
if( STRING_NOTFOUND != nHexLen )
- bValidOle = FALSE;
+ bValidOle = sal_False;
else
{
aTmpFile.Write( (sal_Char*)aToken.GetBuffer(), nHexLen );
@@ -1618,7 +1618,7 @@ void SwRTFParser::ReadOLEData()
if( bValidOle )
{
- bValidOle = FALSE; // erstmal
+ bValidOle = sal_False; // erstmal
}
if( !bWeiter ) // dann stehen wir noch im Result
@@ -1629,7 +1629,7 @@ void SwRTFParser::ReadOLEData()
// ansonsten alle Token verarbeiten, bis zur letzten
// schliessenden Klammer
- bWeiter = TRUE;
+ bWeiter = sal_True;
while( nOpenBrakets && IsParserWorking() && bWeiter )
{
switch( nToken = GetNextToken() )
diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx
index 80fa0cd7e263..32a33b5c2abd 100644
--- a/sw/source/filter/rtf/rtfnum.cxx
+++ b/sw/source/filter/rtf/rtfnum.cxx
@@ -64,7 +64,7 @@
void lcl_ExpandNumFmts( SwNumRule& rRule )
{
// dann noch das NumFormat in alle Ebenen setzen
- for( BYTE n = 1; n < MAXLEVEL; ++n )
+ for( sal_uInt8 n = 1; n < MAXLEVEL; ++n )
if( !rRule.GetNumFmt( n ) )
{
SwNumFmt aNumFmt( rRule.Get( 0 ));
@@ -73,7 +73,7 @@ void lcl_ExpandNumFmts( SwNumRule& rRule )
}
}
-SfxItemSet& GetNumChrFmt( SwDoc& rDoc, SwNumRule& rRule, BYTE nNumLvl )
+SfxItemSet& GetNumChrFmt( SwDoc& rDoc, SwNumRule& rRule, sal_uInt8 nNumLvl )
{
SwCharFmt* pChrFmt = rRule.Get( nNumLvl ).GetCharFmt();
if( !pChrFmt )
@@ -88,7 +88,7 @@ SfxItemSet& GetNumChrFmt( SwDoc& rDoc, SwNumRule& rRule, BYTE nNumLvl )
return (SfxItemSet&)pChrFmt->GetAttrSet();
}
-void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
+void SwRTFParser::ReadListLevel( SwNumRule& rRule, sal_uInt8 nNumLvl )
{
int nToken;
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
@@ -117,7 +117,7 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
{
if( DelCharAtEnd( sLvlText, ';' ).Len() &&
sLvlText.Len() && sLvlText.Len() ==
- (USHORT)(sLvlText.GetChar( 0 )) + 1 )
+ (sal_uInt16)(sLvlText.GetChar( 0 )) + 1 )
sLvlText.Erase( 0, 1 );
nLvlTxtLevel = 0;
}
@@ -186,7 +186,7 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
case RTF_LEVELSTARTAT:
if( pCurNumFmt && -1 != nTokenValue )
- pCurNumFmt->SetStart( USHORT( nTokenValue ));
+ pCurNumFmt->SetStart( sal_uInt16( nTokenValue ));
break;
case RTF_LEVELTEXT:
@@ -257,7 +257,7 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
// values on the numrule format
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == aSet.GetItemState( RES_LR_SPACE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
const SvxLRSpaceItem& rLR = *(SvxLRSpaceItem*)pItem;
pCurNumFmt->SetAbsLSpace( static_cast< short >(rLR.GetTxtLeft()) );
@@ -290,11 +290,11 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
// in sLvlText steht der Text, in sLvlNumber die Position
// der Ebenen in sLvlText
pCurNumFmt->SetPrefix(
- sLvlText.Copy( 0, USHORT( sLvlNumber.GetChar( 0 ))-1 ));
+ sLvlText.Copy( 0, sal_uInt16( sLvlNumber.GetChar( 0 ))-1 ));
pCurNumFmt->SetSuffix( sLvlText.Copy(
- USHORT( sLvlNumber.GetChar( sLvlNumber.Len()-1 )) ));
+ sal_uInt16( sLvlNumber.GetChar( sLvlNumber.Len()-1 )) ));
// wieviele Levels stehen im String?
- pCurNumFmt->SetIncludeUpperLevels( (BYTE)sLvlNumber.Len() );
+ pCurNumFmt->SetIncludeUpperLevels( (sal_uInt8)sLvlNumber.Len() );
}
else
{
@@ -321,9 +321,9 @@ void SwRTFParser::ReadListTable()
{
int nToken;
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
- bNewNumList = TRUE;
+ bNewNumList = sal_True;
- BYTE nNumLvl = 0;
+ sal_uInt8 nNumLvl = 0;
SwNumRule* pCurRule = 0;
SwListEntry aEntry;
@@ -379,11 +379,11 @@ void SwRTFParser::ReadListTable()
aEntry.nListDocPos = pDoc->MakeNumRule( sTmp );
pCurRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ];
// --> OD 2008-07-08 #i91400#
- pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, FALSE ),
+ pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, sal_False ),
*pDoc );
// <--
- pCurRule->SetAutoRule( FALSE );
- nNumLvl = (BYTE)-1;
+ pCurRule->SetAutoRule( sal_False );
+ nNumLvl = (sal_uInt8)-1;
}
break;
@@ -408,7 +408,7 @@ void SwRTFParser::ReadListTable()
break;
case RTF_LISTSIMPLE:
- pCurRule->SetContinusNum( TRUE );
+ pCurRule->SetContinusNum( sal_True );
break;
case RTF_LISTLEVEL:
@@ -427,16 +427,16 @@ void SwRTFParser::ReadListTable()
SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
}
-BOOL lcl_IsEqual( SwNumRule* pOrigRule, SwNumRule* pRule )
+sal_Bool lcl_IsEqual( SwNumRule* pOrigRule, SwNumRule* pRule )
{
- BOOL bRet = 0;
+ sal_Bool bRet = 0;
if( pOrigRule && pRule )
{
bRet = pOrigRule->GetRuleType() == pRule->GetRuleType() &&
pOrigRule->IsContinusNum() == pRule->IsContinusNum() &&
pOrigRule->IsAbsSpaces() == pRule->IsAbsSpaces();
if( bRet )
- for( BYTE n = 0; bRet && n < MAXLEVEL; ++n )
+ for( sal_uInt8 n = 0; bRet && n < MAXLEVEL; ++n )
{
const SwNumFmt* pOFmt = pOrigRule->GetNumFmt( n ),
* pFmt = pRule->GetNumFmt( n );
@@ -472,8 +472,8 @@ void SwRTFParser::ReadListOverrideTable()
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
SwListEntry aEntry;
SwNumRule* pRule = 0, *pOrigRule = 0;
- BYTE nNumLvl = 0;
- BOOL bOverrideFormat = FALSE, bOverrideStart = FALSE;
+ sal_uInt8 nNumLvl = 0;
+ sal_Bool bOverrideFormat = sal_False, bOverrideStart = sal_False;
while( nNumOpenBrakets && IsParserWorking() )
{
@@ -488,7 +488,7 @@ void SwRTFParser::ReadListOverrideTable()
if( 1 == nNumOpenBrakets )
{
- bOverrideFormat = FALSE, bOverrideStart = FALSE;
+ bOverrideFormat = sal_False, bOverrideStart = sal_False;
if( pRule )
{
if( lcl_IsEqual( pOrigRule, pRule ))
@@ -516,7 +516,7 @@ void SwRTFParser::ReadListOverrideTable()
}
if(nMatch>=0)
{
- USHORT nMatch2 = static_cast< USHORT >(nMatch);
+ sal_uInt16 nMatch2 = static_cast< sal_uInt16 >(nMatch);
if (!aListArr[nMatch2].nListNo )
{
aListArr[nMatch2].nListNo = aEntry.nListNo;
@@ -581,11 +581,11 @@ void SwRTFParser::ReadListOverrideTable()
aEntry.nListDocPos = pDoc->MakeNumRule( sTmp, pRule );
pRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ];
// --> OD 2008-07-08 #i91400#
- pRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, FALSE ),
+ pRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, sal_False ),
*pDoc );
// <--
- pRule->SetAutoRule( FALSE );
- nNumLvl = (BYTE)-1;
+ pRule->SetAutoRule( sal_False );
+ nNumLvl = (sal_uInt8)-1;
aListArr.push_back( aEntry );
break;
}
@@ -609,11 +609,11 @@ void SwRTFParser::ReadListOverrideTable()
break;
case RTF_LISTOVERRIDESTART:
- bOverrideStart = TRUE;
+ bOverrideStart = sal_True;
break;
case RTF_LISTOVERRIDEFORMAT:
- bOverrideFormat = TRUE;
+ bOverrideFormat = sal_True;
break;
case RTF_LFOLEVEL:
@@ -630,7 +630,7 @@ void SwRTFParser::ReadListOverrideTable()
const SfxPoolItem* pItem( 0 );
const SwTxtFmtColl* pColl( 0 );
- USHORT nRulePos( USHRT_MAX );
+ sal_uInt16 nRulePos( USHRT_MAX );
const SwNumRule *pNumRule = 0;
SvxRTFStyleType* pStyle = GetStyleTbl().First();
do {
@@ -638,20 +638,20 @@ void SwRTFParser::ReadListOverrideTable()
// suppress deletion of outline list style.
// refactoring of code: no assignments in if-condition
// if( MAXLEVEL > pStyle->nOutlineNo &&
-// 0 != ( pColl = aTxtCollTbl.Get( (USHORT)GetStyleTbl().
+// 0 != ( pColl = aTxtCollTbl.Get( (sal_uInt16)GetStyleTbl().
// GetCurKey() )) &&
// SFX_ITEM_SET == pColl->GetItemState( RES_PARATR_NUMRULE,
-// FALSE, &pItem ) &&
+// sal_False, &pItem ) &&
// USHRT_MAX != (nRulePos = pDoc->FindNumRule(
// ((SwNumRuleItem*)pItem)->GetValue() )) &&
// (pNumRule = pDoc->GetNumRuleTbl()[ nRulePos ])->IsAutoRule() )
if ( MAXLEVEL > pStyle->nOutlineNo )
{
- pColl = aTxtCollTbl.Get( (USHORT)GetStyleTbl().GetCurKey() );
+ pColl = aTxtCollTbl.Get( (sal_uInt16)GetStyleTbl().GetCurKey() );
if ( pColl )
{
const SfxItemState eItemState =
- pColl->GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem );
+ pColl->GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem );
if ( eItemState == SFX_ITEM_SET )
{
nRulePos = pDoc->FindNumRule( ((SwNumRuleItem*)pItem)->GetValue() );
@@ -691,7 +691,7 @@ void SwRTFParser::ReadListOverrideTable()
SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
}
-SwNumRule* SwRTFParser::GetNumRuleOfListNo( long nListNo, BOOL bRemoveFromList )
+SwNumRule* SwRTFParser::GetNumRuleOfListNo( long nListNo, sal_Bool bRemoveFromList )
{
SwNumRule* pRet = 0;
SwListEntry* pEntry;
@@ -702,7 +702,7 @@ SwNumRule* SwRTFParser::GetNumRuleOfListNo( long nListNo, BOOL bRemoveFromList )
aListArr.erase( aListArr.begin()+n );
else
{
- pEntry->bRuleUsed = TRUE;
+ pEntry->bRuleUsed = sal_True;
pRet = pDoc->GetNumRuleTbl()[ pEntry->nListDocPos ];
}
break;
@@ -714,7 +714,7 @@ void SwRTFParser::RemoveUnusedNumRule( SwNumRule* pRule )
{
if( pRule )
{
- for ( BYTE nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
+ for ( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
{
SwNumFmt& rNFmt = (SwNumFmt&)pRule->Get( nLvl );
SwCharFmt* pCFmt = rNFmt.GetCharFmt();
@@ -745,7 +745,7 @@ void SwRTFParser::RemoveUnusedNumRules()
if( !( pEntry = &aListArr[ --n ])->bRuleUsed )
{
// really *NOT* used by anyone else?
- BOOL unused=TRUE;
+ sal_Bool unused=sal_True;
for(size_t j = 0; j < aListArr.size(); ++j)
{
if (aListArr[n].nListNo==aListArr[j].nListNo)
@@ -793,27 +793,27 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
{
// lese die \pnseclvl - Gruppe
// nTokenValue gibt schon den richtigen Level vor 1 - 9!
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
long nListNo = 0;
- BOOL bContinus = TRUE;
+ sal_Bool bContinus = sal_True;
if( RTF_PNSECLVL == nToken )
{
// suche die Rule - steht unter Nummer 3
nListNo = 3;
- bContinus = FALSE;
+ bContinus = sal_False;
nLevel = MAXLEVEL <= (unsigned long) nTokenValue ? MAXLEVEL - 1
- : (!nTokenValue ? 0 : BYTE( nTokenValue - 1 ));
+ : (!nTokenValue ? 0 : sal_uInt8( nTokenValue - 1 ));
}
else
{
switch( nToken = GetNextToken() )
{
case RTF_PNLVL: nListNo = 3;
- bContinus = FALSE;
+ bContinus = sal_False;
nLevel = MAXLEVEL <= (unsigned long) nTokenValue
? MAXLEVEL - 1
- : (!nTokenValue ? 0 : BYTE( nTokenValue-1 ));
+ : (!nTokenValue ? 0 : sal_uInt8( nTokenValue-1 ));
break;
case RTF_PNLVLBODY:
@@ -832,7 +832,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
}
// suche die Rule - steht unter Nummer 3
- USHORT nNewFlag = static_cast< USHORT >(1 << nListNo);
+ sal_uInt16 nNewFlag = static_cast< sal_uInt16 >(1 << nListNo);
SwNumRule* pCurRule = GetNumRuleOfListNo( nListNo,
0 != ( nNewNumSectDef & nNewFlag ) );
if( !pCurRule )
@@ -846,9 +846,9 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
aListArr.push_back( aEntry );
pCurRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ];
// --> OD 2008-07-08 #i91400#
- pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, FALSE ), *pDoc );
+ pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, sal_False ), *pDoc );
// <--
- pCurRule->SetAutoRule( FALSE );
+ pCurRule->SetAutoRule( sal_False );
pCurRule->SetContinusNum( bContinus );
}
@@ -866,10 +866,10 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
// dann den akt. Lvl und Rule am Absatz setzen.
// Dieses muss aber in den vorherigen "Kontext", sprich in den vor
// der Klammer offenen Attrset. Darum das SetNewGroup davor und dahinter
- SetNewGroup( FALSE );
+ SetNewGroup( sal_False );
GetAttrSet().Put( SfxUInt16Item( FN_PARAM_NUM_LEVEL, nLevel ));
GetAttrSet().Put( SwNumRuleItem( pCurRule->GetName() ));
- SetNewGroup( TRUE );
+ SetNewGroup( sal_True );
}
FontUnderline eUnderline;
@@ -919,7 +919,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
case RTF_PNF:
{
- const Font& rSVFont = GetFont( USHORT(nTokenValue) );
+ const Font& rSVFont = GetFont( sal_uInt16(nTokenValue) );
GetNumChrFmt( *pDoc, *pCurRule, nLevel ).Put(
SvxFontItem( rSVFont.GetFamily(),
rSVFont.GetName(), rSVFont.GetStyleName(),
@@ -936,7 +936,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
else
nTokenValue *= 10;
GetNumChrFmt( *pDoc, *pCurRule, nLevel ).Put(
- SvxFontHeightItem( (const USHORT)nTokenValue, 100, RES_CHRATR_FONTSIZE ));
+ SvxFontHeightItem( (const sal_uInt16)nTokenValue, 100, RES_CHRATR_FONTSIZE ));
}
break;
@@ -972,7 +972,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
case RTF_PNCF:
{
GetNumChrFmt( *pDoc, *pCurRule, nLevel ).Put( SvxColorItem(
- GetColor( USHORT(nTokenValue) ), RES_CHRATR_COLOR ));
+ GetColor( sal_uInt16(nTokenValue) ), RES_CHRATR_COLOR ));
}
break;
@@ -992,7 +992,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
case RTF_PNULW:
{
GetNumChrFmt( *pDoc, *pCurRule, nLevel ).Put(
- SvxWordLineModeItem( TRUE, RES_CHRATR_WORDLINEMODE ));
+ SvxWordLineModeItem( sal_True, RES_CHRATR_WORDLINEMODE ));
}
eUnderline = UNDERLINE_SINGLE;
goto NUMATTR_SETUNDERLINE;
@@ -1008,16 +1008,16 @@ NUMATTR_SETUNDERLINE:
if( 0 > short( nTokenValue ) )
nTokenValue = - (short)nTokenValue;
pCurNumFmt->SetFirstLineOffset( - short( nTokenValue ));
- pCurNumFmt->SetAbsLSpace( (nLevel + 1 ) * USHORT( nTokenValue ));
+ pCurNumFmt->SetAbsLSpace( (nLevel + 1 ) * sal_uInt16( nTokenValue ));
break;
case RTF_PNSP:
- pCurNumFmt->SetCharTextDistance( USHORT( nTokenValue ));
+ pCurNumFmt->SetCharTextDistance( sal_uInt16( nTokenValue ));
break;
case RTF_PNPREV:
if( nLevel )
{
- BYTE nPrev = 2, nLast = nLevel;
+ sal_uInt8 nPrev = 2, nLast = nLevel;
while( nLast && 1 < pCurRule->Get( --nLast ).GetIncludeUpperLevels() )
++nPrev;
pCurNumFmt->SetIncludeUpperLevels( nPrev );
@@ -1029,7 +1029,7 @@ NUMATTR_SETUNDERLINE:
case RTF_PNQR: pCurNumFmt->SetNumAdjust( SVX_ADJUST_RIGHT ); break;
case RTF_PNSTART:
- pCurNumFmt->SetStart( USHORT( nTokenValue ));
+ pCurNumFmt->SetStart( sal_uInt16( nTokenValue ));
break;
case RTF_PNNUMONCE:
@@ -1084,7 +1084,7 @@ NUMATTR_SETUNDERLINE:
pCurNumFmt->SetPrefix( aEmptyStr );
// den Font oder sogar das gesamte CharFormat loeschen?
- if( SFX_ITEM_SET == pChFmt->GetItemState( RES_CHRATR_FONT, FALSE ))
+ if( SFX_ITEM_SET == pChFmt->GetItemState( RES_CHRATR_FONT, sal_False ))
{
if( 1 == pChFmt->GetAttrSet().Count() )
{
@@ -1105,15 +1105,15 @@ NUMATTR_SETUNDERLINE:
// dann noch die Ausgabe-Funktionen (nur fuer WinWord 97)
-BOOL lcl_IsExportNumRule( const SwNumRule& rRule, BYTE* pEnd = 0 )
+sal_Bool lcl_IsExportNumRule( const SwNumRule& rRule, sal_uInt8* pEnd = 0 )
{
- BYTE nEnd = MAXLEVEL;
+ sal_uInt8 nEnd = MAXLEVEL;
while( nEnd-- && !rRule.GetNumFmt( nEnd ))
;
++nEnd;
const SwNumFmt* pNFmt;
- BYTE nLvl;
+ sal_uInt8 nLvl;
for( nLvl = 0; nLvl < nEnd; ++nLvl )
if( SVX_NUM_NUMBER_NONE != ( pNFmt = &rRule.Get( nLvl ))
diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx
index 6737ebce596e..588cc516ace6 100644
--- a/sw/source/filter/rtf/rtftbl.cxx
+++ b/sw/source/filter/rtf/rtftbl.cxx
@@ -58,13 +58,13 @@ SV_DECL_PTRARR( SwBoxFrmFmts, SwTableBoxFmtPtr, 25, 50 )
class SwShareBoxFmts;
extern void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* = 0,
- BOOL = TRUE, const BOOL = TRUE, SwShareBoxFmts* = 0 );
+ sal_Bool = sal_True, const sal_Bool = sal_True, SwShareBoxFmts* = 0 );
struct Row
{
bool mbUseLeftRowPad, mbUseRightRowPad, mbUseTopRowPad, mbUseBottomRowPad;
long mnLeftRowPad, mnRightRowPad, mnTopRowPad, mnBottomRowPad;
- USHORT mnBrdDist;
+ sal_uInt16 mnBrdDist;
Row() :
mbUseLeftRowPad(false), mbUseRightRowPad(false),
mbUseTopRowPad(false), mbUseBottomRowPad(false),
@@ -77,22 +77,22 @@ static void SetRowBorder(SfxItemSet& rSet, const Row &rRow)
{
#if 1
SvxBoxItem aBox((const SvxBoxItem&)rSet.Get(RES_BOX, false));
- aBox.SetDistance( static_cast< USHORT >(rRow.mbUseLeftRowPad ? rRow.mnLeftRowPad : rRow.mnBrdDist),
+ aBox.SetDistance( static_cast< sal_uInt16 >(rRow.mbUseLeftRowPad ? rRow.mnLeftRowPad : rRow.mnBrdDist),
BOX_LINE_LEFT);
- aBox.SetDistance( static_cast< USHORT >(rRow.mbUseRightRowPad ? rRow.mnRightRowPad : rRow.mnBrdDist),
+ aBox.SetDistance( static_cast< sal_uInt16 >(rRow.mbUseRightRowPad ? rRow.mnRightRowPad : rRow.mnBrdDist),
BOX_LINE_RIGHT);
- aBox.SetDistance( static_cast< USHORT >(rRow.mbUseTopRowPad ? rRow.mnTopRowPad : 0),
+ aBox.SetDistance( static_cast< sal_uInt16 >(rRow.mbUseTopRowPad ? rRow.mnTopRowPad : 0),
BOX_LINE_TOP);
- aBox.SetDistance( static_cast< USHORT >(rRow.mbUseBottomRowPad ? rRow.mnBottomRowPad : 0),
+ aBox.SetDistance( static_cast< sal_uInt16 >(rRow.mbUseBottomRowPad ? rRow.mnBottomRowPad : 0),
BOX_LINE_BOTTOM);
rSet.Put(aBox);
#else
const SfxPoolItem* pItem;
- if (SFX_ITEM_SET == rSet.GetItemState(RES_BOX, FALSE, &pItem))
+ if (SFX_ITEM_SET == rSet.GetItemState(RES_BOX, sal_False, &pItem))
{
SvxBoxItem aBox( *(SvxBoxItem*)pItem );
aBox.SetDistance(rRow.mbUseLeftRowPad ? rRow.mnLeftRowPad : rRow.mnBrdDist,
@@ -160,7 +160,7 @@ void SwRTFParser::ReadTable( int nToken )
// verhinder Tabelle in Tabelle/Footnote
SwTwips nTblSz = 0;
- int bReadNewCell = FALSE, bChkExistTbl = FALSE;
+ int bReadNewCell = sal_False, bChkExistTbl = sal_False;
enum Limits {eMAXCELLS=64000};
@@ -176,7 +176,7 @@ void SwRTFParser::ReadTable( int nToken )
// Flag for delete merged boxes
aMergeBoxes.clear();
- aMergeBoxes.push_back( (BOOL)FALSE );
+ aMergeBoxes.push_back( (sal_Bool)sal_False );
m_nCurrentBox = 0;
// wenn schon in einer Tabellen, dann splitte oder benutze
@@ -185,17 +185,17 @@ void SwRTFParser::ReadTable( int nToken )
}
else
{
- bReadNewCell = TRUE;
+ bReadNewCell = sal_True;
SwTableLines& rLns = pTableNode->GetTable().GetTabLines();
SwTableLine* pLine = rLns[ rLns.Count()-1 ];
// very robust to avoid crashes like bug 127425 + crash reports 118743
if( pLine )
{
- USHORT nTmpBox = m_nCurrentBox;
+ sal_uInt16 nTmpBox = m_nCurrentBox;
if( nTmpBox > pLine->GetTabBoxes().Count() )
nTmpBox = pLine->GetTabBoxes().Count();
- for (USHORT n = nTmpBox; n; )
+ for (sal_uInt16 n = nTmpBox; n; )
{
const SwTableBox *pTmp = pLine->GetTabBoxes()[ --n ];
if( pTmp )
@@ -226,7 +226,7 @@ void SwRTFParser::ReadTable( int nToken )
SvxFrameDirection eDir = FRMDIR_HORI_LEFT_TOP;
bool bCantSplit = false;
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
do {
switch( nToken )
{
@@ -289,7 +289,7 @@ void SwRTFParser::ReadTable( int nToken )
// the first cell cannot be merged with earlier ones.
if (nBoxCnt != 0)
{
- aMergeBoxes.back() = TRUE;
+ aMergeBoxes.back() = sal_True;
}
break;
@@ -326,7 +326,7 @@ void SwRTFParser::ReadTable( int nToken )
//
if (nSize<=2*aRow.mnBrdDist) {
aRow.mnRightRowPad=0;
- aRow.mbUseRightRowPad=TRUE;
+ aRow.mbUseRightRowPad=sal_True;
}
SetRowBorder((SfxItemSet&)pBoxFmt->GetAttrSet(), aRow);
aBoxFmts.Insert( pBoxFmt, aBoxFmts.Count() );
@@ -337,22 +337,22 @@ void SwRTFParser::ReadTable( int nToken )
nSize = COL_DFLT_WIDTH;
pFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nSize, 0 ));
nTblSz = nTokenValue;
- aMergeBoxes.push_back( (BOOL)FALSE );
+ aMergeBoxes.push_back( (sal_Bool)sal_False );
++nBoxCnt;
SvxBoxItem aBox(pFmt->GetBox());
if (bUseRightCellPad)
- aBox.SetDistance( static_cast< USHORT >(nRightCellPad), BOX_LINE_RIGHT);
+ aBox.SetDistance( static_cast< sal_uInt16 >(nRightCellPad), BOX_LINE_RIGHT);
if (bUseBottomCellPad)
- aBox.SetDistance( static_cast< USHORT >(nBottomCellPad), BOX_LINE_BOTTOM);
+ aBox.SetDistance( static_cast< sal_uInt16 >(nBottomCellPad), BOX_LINE_BOTTOM);
//Yes, these are the wrong way around, there appears to
//be a bug in word where these are swapped.
if (bUseLeftCellPad)
- aBox.SetDistance( static_cast< USHORT >(nLeftCellPad), BOX_LINE_TOP);
+ aBox.SetDistance( static_cast< sal_uInt16 >(nLeftCellPad), BOX_LINE_TOP);
if (bUseTopCellPad)
- aBox.SetDistance( static_cast< USHORT >(nTopCellPad), BOX_LINE_LEFT);
+ aBox.SetDistance( static_cast< sal_uInt16 >(nTopCellPad), BOX_LINE_LEFT);
/*#106415# The Cell Borders are now balanced on import to
@@ -364,8 +364,8 @@ void SwRTFParser::ReadTable( int nToken )
SwTableBoxFmt* prevpFmt = aBoxFmts[ aBoxFmts.Count()-2 ];
SvxBoxItem prevaBox(prevpFmt->GetBox());
- USHORT prevWidthRight=0;
- USHORT currWidthLeft=0;
+ sal_uInt16 prevWidthRight=0;
+ sal_uInt16 currWidthLeft=0;
bool bDoubleLine=false;
const SvxBorderLine* brdrline ;
const Color* pPrevRightColor;
@@ -388,7 +388,7 @@ void SwRTFParser::ReadTable( int nToken )
if((currWidthLeft >0 || prevWidthRight >0) &&
!bDoubleLine)
{
- USHORT newBorderWidth=(currWidthLeft+prevWidthRight)/2 ;
+ sal_uInt16 newBorderWidth=(currWidthLeft+prevWidthRight)/2 ;
if(newBorderWidth /2 ==DEF_LINE_WIDTH_0 )
{
newBorderWidth =DEF_LINE_WIDTH_0;
@@ -433,7 +433,7 @@ void SwRTFParser::ReadTable( int nToken )
case RTF_TRGAPH:
//$flr bug #117887#: RTF: wrong internal table cell margin imported (A13)
- aRow.mnBrdDist = (nTokenValue>0?(USHORT)nTokenValue:0); // filter out negative values of \trgaph
+ aRow.mnBrdDist = (nTokenValue>0?(sal_uInt16)nTokenValue:0); // filter out negative values of \trgaph
break;
case RTF_TRQL: eAdjust = text::HoriOrientation::LEFT; break;
@@ -488,7 +488,7 @@ void SwRTFParser::ReadTable( int nToken )
if( aMergeBoxes.back() )
break;
ReadBackgroundAttr( nToken,
- (SfxItemSet&)pBoxFmt->GetAttrSet(), TRUE );
+ (SfxItemSet&)pBoxFmt->GetAttrSet(), sal_True );
}
else if( ( nToken & ~(0xff | RTF_TABLEDEF) ) == RTF_BRDRDEF ||
IsBorderToken(nToken))
@@ -498,7 +498,7 @@ void SwRTFParser::ReadTable( int nToken )
SfxItemSet& rSet = (SfxItemSet&)pBoxFmt->GetAttrSet();
if(!IsBorderToken( nToken ))
- ReadBorderAttr( nToken, rSet, TRUE );
+ ReadBorderAttr( nToken, rSet, sal_True );
else
NextToken( nToken );
}
@@ -507,7 +507,7 @@ void SwRTFParser::ReadTable( int nToken )
if( RTF_UNKNOWNCONTROL == nToken )
NextToken( nToken );
else
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
break;
}
@@ -535,7 +535,7 @@ void SwRTFParser::ReadTable( int nToken )
nTblSz -= nLSpace;
- int bNewTbl = TRUE;
+ int bNewTbl = sal_True;
SwTableLine* pNewLine;
bTrowdRead=true;
@@ -604,7 +604,7 @@ void SwRTFParser::ReadTable( int nToken )
pBox = (*pLns)[ 0 ]->GetTabBoxes()[ 0 ];
SwNodeIndex aTmpIdx( *pBox->GetSttNd() );
- pDoc->GetNodes().SplitTable( aTmpIdx, HEADLINE_NONE, FALSE );
+ pDoc->GetNodes().SplitTable( aTmpIdx, HEADLINE_NONE, sal_False );
pTableNode = pPam->GetNode()->FindTableNode();
pFmt = pTableNode->GetTable().GetFrmFmt();
@@ -624,8 +624,8 @@ void SwRTFParser::ReadTable( int nToken )
pNewLine = (*pLns)[ pLns->Count() - 1 ];
// jetzt die Boxen abgleichen
- USHORT nBoxes = Min( pNewLine->GetTabBoxes().Count(), aBoxFmts.Count() );
- USHORT n;
+ sal_uInt16 nBoxes = Min( pNewLine->GetTabBoxes().Count(), aBoxFmts.Count() );
+ sal_uInt16 n;
for( n = 0; n < nBoxes; ++n )
{
@@ -645,11 +645,11 @@ void SwRTFParser::ReadTable( int nToken )
pPam->SetMark(); pPam->DeleteMark();
while( n < pNewLine->GetTabBoxes().Count() )
_DeleteBox( pTableNode->GetTable(),
- pNewLine->GetTabBoxes()[ n ], 0, FALSE, FALSE );
+ pNewLine->GetTabBoxes()[ n ], 0, sal_False, sal_False );
}
pOldTblNd = pTableNode;
- bNewTbl = FALSE;
+ bNewTbl = sal_False;
{
// JP 13.08.98: TabellenUmrandungen optimieren - Bug 53525
@@ -710,7 +710,7 @@ void SwRTFParser::ReadTable( int nToken )
pNewLine->GetFrmFmt()->ResetFmtAttr( RES_FRM_SIZE );
rLns.C40_INSERT( SwTableLine, pNewLine, rLns.Count() );
}
- bNewTbl = FALSE;
+ bNewTbl = sal_False;
}
else
{
@@ -718,7 +718,7 @@ void SwRTFParser::ReadTable( int nToken )
const SwTable *pTable =
pDoc->InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 0 ),
- *pPam->GetPoint(), 1, 1, eAdjust, 0, 0, FALSE, FALSE );
+ *pPam->GetPoint(), 1, 1, eAdjust, 0, 0, sal_False, sal_False );
bContainsTablePara=true; //#117881#
pTableNode = pTable ? pTable->GetTableNode() : 0;
@@ -778,7 +778,7 @@ void SwRTFParser::ReadTable( int nToken )
if( !pColl )
pColl = pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false );
- USHORT nStt = 0;
+ sal_uInt16 nStt = 0;
if( bNewTbl )
{
SwTableBox* pBox = pNewLine->GetTabBoxes()[0];
@@ -893,16 +893,16 @@ void SwRTFParser::GotoNextBox()
if (++m_nCurrentBox >= aMergeBoxes.size())
{
OSL_ENSURE(aMergeBoxes.size() < SAL_MAX_UINT16, "too many boxes?");
- m_nCurrentBox = static_cast<USHORT>(aMergeBoxes.size()-1);
+ m_nCurrentBox = static_cast<sal_uInt16>(aMergeBoxes.size()-1);
}
if (!aMergeBoxes[ m_nCurrentBox ])
{
- int bMove = TRUE;
+ int bMove = sal_True;
if( pBox->GetSttIdx() > pPam->GetPoint()->nNode.GetIndex() )
{
- USHORT nRealBox = 0;
- for (USHORT nTmp = 0; nTmp < m_nCurrentBox; ++nTmp)
+ sal_uInt16 nRealBox = 0;
+ for (sal_uInt16 nTmp = 0; nTmp < m_nCurrentBox; ++nTmp)
if( !aMergeBoxes[ nTmp ] )
++nRealBox;
@@ -910,7 +910,7 @@ void SwRTFParser::GotoNextBox()
{
pPam->GetPoint()->nNode = *rBoxes[ nRealBox ]->GetSttNd()->EndOfSectionNode();
pPam->Move( fnMoveBackward, fnGoCntnt );
- bMove = FALSE;
+ bMove = sal_False;
}
}
@@ -930,7 +930,7 @@ void SwRTFParser::NewTblLine()
nInsTblRow = USHRT_MAX;
// erweiter die aktuelle um eine neue Line
- BOOL bMakeCopy = FALSE;
+ sal_Bool bMakeCopy = sal_False;
SwNode* pNd = pDoc->GetNodes()[ pPam->GetPoint()->nNode.GetIndex()-1 ];
if( !pNd->IsEndNode() ||
!(pNd = pNd->StartOfSectionNode())->IsTableNode() )
@@ -938,7 +938,7 @@ void SwRTFParser::NewTblLine()
if( !pOldTblNd )
return ;
- bMakeCopy = TRUE;
+ bMakeCopy = sal_True;
pNd = pOldTblNd;
}
pTableNode = (SwTableNode*)pNd;
@@ -954,7 +954,7 @@ void SwRTFParser::NewTblLine()
if( !bMakeCopy &&
64000 < pTableNode->GetTable().GetTabSortBoxes().Count() )
{
- bMakeCopy = TRUE; // spaetestens jetzt eine neue anfangen!
+ bMakeCopy = sal_True; // spaetestens jetzt eine neue anfangen!
}
if( bMakeCopy )
@@ -963,8 +963,8 @@ void SwRTFParser::NewTblLine()
SwSelBoxes aBoxes;
pTableNode->GetTable().SelLineFromBox( pBox, aBoxes );
pTableNode->GetTable().MakeCopy( pDoc, *pPam->GetPoint(),
- aBoxes, FALSE );
- ULONG nNd = pPam->GetPoint()->nNode.GetIndex()-1;
+ aBoxes, sal_False );
+ sal_uLong nNd = pPam->GetPoint()->nNode.GetIndex()-1;
pTableNode = pDoc->GetNodes()[ nNd ]->FindTableNode();
pOldTblNd = pTableNode;
@@ -978,7 +978,7 @@ void SwRTFParser::NewTblLine()
pBox = (*pLns)[ pLns->Count()-1 ]->GetTabBoxes()[0];
- ULONG nOldPos = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nOldPos = pPam->GetPoint()->nNode.GetIndex();
pPam->GetPoint()->nNode = *pBox->GetSttNd();
pPam->Move( fnMoveForward );
m_nCurrentBox = 0;
@@ -1015,7 +1015,7 @@ void SwRTFParser::NewTblLine()
SvxRTFItemStack& rAttrStk = GetAttrStack();
const SvxRTFItemStackType* pStk;
for( size_t n = 0; n < rAttrStk.size(); ++n )
- if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == ULONG(nOldPos) &&
+ if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == sal_uLong(nOldPos) &&
!pStk->GetSttCnt() )
((SvxRTFItemStackType*)pStk)->SetStartPos( SwxPosition( pPam ) );
}
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 0c23218092d5..9a73553bb948 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -120,9 +120,9 @@ using namespace ::com::sun::star;
// einige Hilfs-Funktionen
// char
-inline const SvxFontHeightItem& GetSize(const SfxItemSet& rSet,BOOL bInP=TRUE)
+inline const SvxFontHeightItem& GetSize(const SfxItemSet& rSet,sal_Bool bInP=sal_True)
{ return (const SvxFontHeightItem&)rSet.Get( RES_CHRATR_FONTSIZE,bInP); }
-inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,BOOL bInP=TRUE)
+inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,sal_Bool bInP=sal_True)
{ return (const SvxLRSpaceItem&)rSet.Get( RES_LR_SPACE,bInP); }
/* */
@@ -133,11 +133,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportRTF()
}
// Aufruf fuer die allg. Reader-Schnittstelle
-ULONG RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String &)
+sal_uLong RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String &)
{
if( !pStrm )
{
- ASSERT( FALSE, "RTF-Read ohne Stream" );
+ ASSERT( sal_False, "RTF-Read ohne Stream" );
return ERR_SWG_READ_ERROR;
}
@@ -152,7 +152,7 @@ ULONG RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const S
Reader::ResetFrmFmts( rDoc );
}
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
SwDocShell *pDocShell(rDoc.GetDocShell());
DBG_ASSERT(pDocShell, "no SwDocShell");
uno::Reference<document::XDocumentProperties> xDocProps;
@@ -179,7 +179,7 @@ ULONG RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const S
return nRet;
}
-ULONG RtfReader::Read(SvStream* pStream, SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam)
+sal_uLong RtfReader::Read(SvStream* pStream, SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam)
{
pStrm = pStream;
return Read(rDoc, rBaseURL, rPam, rBaseURL);
@@ -204,7 +204,7 @@ SwRTFParser::SwRTFParser(SwDoc* pD,
pSttNdIdx(0),
pRegionEndIdx(0),
pDoc(pD),
- pRelNumRule(new SwRelNumRuleSpaces(*pD, static_cast< BOOL >(bReadNewDoc))),
+ pRelNumRule(new SwRelNumRuleSpaces(*pD, static_cast< sal_Bool >(bReadNewDoc))),
pRedlineInsert(0),
pRedlineDelete(0),
sBaseURL( rBaseURL ),
@@ -232,11 +232,11 @@ SwRTFParser::SwRTFParser(SwDoc* pD,
pPam = new SwPaM( *rCrsr.GetPoint() );
SetInsPos( SwxPosition( pPam ) );
SetChkStyleAttr( 0 != bReadNewDoc );
- SetCalcValue( FALSE );
- SetReadDocInfo( TRUE );
+ SetCalcValue( sal_False );
+ SetReadDocInfo( sal_True );
// diese sollen zusaetzlich ueber \pard zurueck gesetzt werden
- USHORT temp;
+ sal_uInt16 temp;
temp = RES_TXTATR_CHARFMT; AddPlainAttr( temp );
temp = RES_PAGEDESC; AddPardAttr( temp );
temp = RES_BREAK; AddPardAttr( temp );
@@ -265,8 +265,8 @@ bool lcl_UsedPara(SwPaM &rPam)
if( rPam.GetPoint()->nContent.GetIndex() ||
( 0 != ( pCNd = rPam.GetCntntNode()) &&
0 != ( pSet = pCNd->GetpSwAttrSet()) &&
- ( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE ) ||
- SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, FALSE ))))
+ ( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False ) ||
+ SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, sal_False ))))
return true;
return false;
}
@@ -275,7 +275,7 @@ void SwRTFParser::Continue( int nToken )
{
if( bFirstContinue )
{
- bFirstContinue = FALSE;
+ bFirstContinue = sal_False;
if (IsNewDoc())
{
@@ -333,14 +333,14 @@ void SwRTFParser::Continue( int nToken )
( RES_POOLCOLL_STANDARD, false ));
// verhinder das einlesen von Tabellen in Fussnoten / Tabellen
- ULONG nNd = pPos->nNode.GetIndex();
+ sal_uLong nNd = pPos->nNode.GetIndex();
mbReadNoTbl = 0 != pSttNd->FindTableNode() ||
( nNd < pDoc->GetNodes().GetEndOfInserts().GetIndex() &&
pDoc->GetNodes().GetEndOfInserts().StartOfSectionIndex() < nNd );
}
// Laufbalken anzeigen, aber nur bei synchronem Call
- ULONG nCurrPos = rInput.Tell();
+ sal_uLong nCurrPos = rInput.Tell();
rInput.Seek(STREAM_SEEK_TO_END);
rInput.ResetError();
::StartProgress( STR_STATSTR_W4WREAD, 0, rInput.Tell(), pDoc->GetDocShell());
@@ -381,21 +381,21 @@ void SwRTFParser::Continue( int nToken )
#ifdef DBG_UTIL
// !!! sollte nicht moeglich sein, oder ??
-ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( TRUE ).nNode.GetIndex(),
+ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_True ).nNode.GetIndex(),
"Pam.Bound1 steht noch im Node" );
-ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( FALSE ).nNode.GetIndex(),
+ASSERT( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_False ).nNode.GetIndex(),
"Pam.Bound2 steht noch im Node" );
-if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( TRUE ).nNode.GetIndex() )
+if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_True ).nNode.GetIndex() )
{
- xub_StrLen nCntPos = pPam->GetBound( TRUE ).nContent.GetIndex();
- pPam->GetBound( TRUE ).nContent.Assign( pTxtNode,
+ xub_StrLen nCntPos = pPam->GetBound( sal_True ).nContent.GetIndex();
+ pPam->GetBound( sal_True ).nContent.Assign( pTxtNode,
pTxtNode->GetTxt().Len() + nCntPos );
}
-if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
+if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_False ).nNode.GetIndex() )
{
- xub_StrLen nCntPos = pPam->GetBound( FALSE ).nContent.GetIndex();
- pPam->GetBound( FALSE ).nContent.Assign( pTxtNode,
+ xub_StrLen nCntPos = pPam->GetBound( sal_False ).nContent.GetIndex();
+ pPam->GetBound( sal_False ).nContent.Assign( pTxtNode,
pTxtNode->GetTxt().Len() + nCntPos );
}
#endif
@@ -422,7 +422,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
StartOfSectionNode()->GetSectionNode();
if( pSectNd )
pSectNd->GetSection().GetFmt()->SetFmtAttr(
- SwFmtNoBalancedColumns( TRUE ) );
+ SwFmtNoBalancedColumns( sal_True ) );
}
DelLastNode();
@@ -448,7 +448,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
if( !pPos->nContent.GetIndex() )
{
SwTxtNode* pAktNd;
- ULONG nNodeIdx = pPos->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPos->nNode.GetIndex();
if( IsNewDoc() )
{
SwNode* pTmp = pDoc->GetNodes()[ nNodeIdx -1 ];
@@ -460,7 +460,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
const SwSpzFrmFmts* pFrmFmts = pDoc->GetSpzFrmFmts();
if ( pFrmFmts && pFrmFmts->Count() )
{
- for ( USHORT nI = pFrmFmts->Count(); nI; --nI )
+ for ( sal_uInt16 nI = pFrmFmts->Count(); nI; --nI )
{
const SwFmtAnchor & rAnchor = (*pFrmFmts)[ nI - 1 ]->GetAnchor();
if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
@@ -525,10 +525,10 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
if( pPrev->HasSwAttrSet() )
pTxtNode->SetAttr( *pPrev->GetpSwAttrSet() );
- if( &pPam->GetBound(TRUE).nNode.GetNode() == pPrev )
- pPam->GetBound(TRUE).nContent.Assign( pTxtNode, 0 );
- if( &pPam->GetBound(FALSE).nNode.GetNode() == pPrev )
- pPam->GetBound(FALSE).nContent.Assign( pTxtNode, 0 );
+ if( &pPam->GetBound(sal_True).nNode.GetNode() == pPrev )
+ pPam->GetBound(sal_True).nContent.Assign( pTxtNode, 0 );
+ if( &pPam->GetBound(sal_False).nNode.GetNode() == pPrev )
+ pPam->GetBound(sal_False).nContent.Assign( pTxtNode, 0 );
pTxtNode->JoinPrev();
}
@@ -546,10 +546,10 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
}
bool rtfSections::SetCols(SwFrmFmt &rFmt, const rtfSection &rSection,
- USHORT nNettoWidth)
+ sal_uInt16 nNettoWidth)
{
//sprmSCcolumns - Anzahl der Spalten - 1
- USHORT nCols = static_cast< USHORT >(rSection.NoCols());
+ sal_uInt16 nCols = static_cast< sal_uInt16 >(rSection.NoCols());
if (nCols < 2)
return false; // keine oder bloedsinnige Spalten
@@ -557,7 +557,7 @@ bool rtfSections::SetCols(SwFrmFmt &rFmt, const rtfSection &rSection,
SwFmtCol aCol; // Erzeuge SwFmtCol
//sprmSDxaColumns - Default-Abstand 1.25 cm
- USHORT nColSpace = static_cast< USHORT >(rSection.StandardColSeperation());
+ sal_uInt16 nColSpace = static_cast< sal_uInt16 >(rSection.StandardColSeperation());
aCol.Init( nCols, nColSpace, nNettoWidth );
@@ -565,15 +565,15 @@ bool rtfSections::SetCols(SwFrmFmt &rFmt, const rtfSection &rSection,
if (rSection.maPageInfo.maColumns.size())
{
aCol._SetOrtho(false);
- USHORT nWishWidth = 0, nHalfPrev = 0;
- for(USHORT n=0, i=0; n < rSection.maPageInfo.maColumns.size() && i < nCols; n += 2, ++i )
+ sal_uInt16 nWishWidth = 0, nHalfPrev = 0;
+ for(sal_uInt16 n=0, i=0; n < rSection.maPageInfo.maColumns.size() && i < nCols; n += 2, ++i )
{
SwColumn* pCol = aCol.GetColumns()[ i ];
pCol->SetLeft( nHalfPrev );
- USHORT nSp = static_cast< USHORT >(rSection.maPageInfo.maColumns[ n+1 ]);
+ sal_uInt16 nSp = static_cast< sal_uInt16 >(rSection.maPageInfo.maColumns[ n+1 ]);
nHalfPrev = nSp / 2;
pCol->SetRight( nSp - nHalfPrev );
- pCol->SetWishWidth( static_cast< USHORT >(rSection.maPageInfo.maColumns[ n ]) +
+ pCol->SetWishWidth( static_cast< sal_uInt16 >(rSection.maPageInfo.maColumns[ n ]) +
pCol->GetLeft() + pCol->GetRight());
nWishWidth = nWishWidth + pCol->GetWishWidth();
}
@@ -601,7 +601,7 @@ void rtfSections::SetPage(SwPageDesc &rInPageDesc, SwFrmFmt &rFmt,
if (!bIgnoreCols)
{
- SetCols(rFmt, rSection, static_cast< USHORT >(rSection.GetPageWidth() -
+ SetCols(rFmt, rSection, static_cast< sal_uInt16 >(rSection.GetPageWidth() -
rSection.GetPageLeft() - rSection.GetPageRight()));
}
@@ -877,7 +877,7 @@ SwSectionFmt *rtfSections::InsertSection(SwPaM& rMyPaM, rtfSection &rSection)
ASSERT(pFmt, "impossible");
if (!pFmt)
return 0;
- SetCols(*pFmt, rSection, (USHORT)(nWidth - nLeft - nRight) );
+ SetCols(*pFmt, rSection, (sal_uInt16)(nWidth - nLeft - nRight) );
return pFmt;
}
@@ -927,7 +927,7 @@ void rtfSections::InsertSegments(bool bNewDoc)
}
else
{
- USHORT nPos = mrReader.pDoc->MakePageDesc(
+ sal_uInt16 nPos = mrReader.pDoc->MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(nDesc)
, 0, false);
aIter->mpTitlePage = &mrReader.pDoc->_GetPageDesc(nPos);
@@ -948,7 +948,7 @@ void rtfSections::InsertSegments(bool bNewDoc)
}
else
{
- USHORT nPos = mrReader.pDoc->MakePageDesc(
+ sal_uInt16 nPos = mrReader.pDoc->MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(nDesc,
false, aIter->HasTitlePage()),
aIter->mpTitlePage, false);
@@ -972,7 +972,7 @@ void rtfSections::InsertSegments(bool bNewDoc)
if (aIter->PageRestartNo() ||
((aIter == aStart) && aIter->PageStartAt() != 1))
- aPgDesc.SetNumOffset( static_cast< USHORT >(aIter->PageStartAt()) );
+ aPgDesc.SetNumOffset( static_cast< sal_uInt16 >(aIter->PageStartAt()) );
/*
If its a table here, apply the pagebreak to the table
@@ -1257,7 +1257,7 @@ void SwRTFParser::ReadDrawingObject()
aSur.SetContour( false );
aSur.SetOutside(true);
aFlySet.Put( aSur );
- SwFmtFollowTextFlow aFollowTextFlow( FALSE );
+ SwFmtFollowTextFlow aFollowTextFlow( sal_False );
aFlySet.Put( aFollowTextFlow );
/*
sw::util::SetLayer aSetLayer(*pDoc);
@@ -1326,7 +1326,7 @@ void SwRTFParser::InsertShpObject(SdrObject* pStroke, int _nZOrder)
aSur.SetContour( false );
aSur.SetOutside(true);
aFlySet.Put( aSur );
- SwFmtFollowTextFlow aFollowTextFlow( FALSE );
+ SwFmtFollowTextFlow aFollowTextFlow( sal_False );
aFlySet.Put( aFollowTextFlow );
SwFmtAnchor aAnchor( FLY_AT_PARA );
@@ -1568,15 +1568,15 @@ void SwRTFParser::ReadShapeObject()
}
}
-extern void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich,
- USHORT& rSubType, ULONG &rFmt,
- USHORT nVersion );
+extern void sw3io_ConvertFromOldField( SwDoc& rDoc, sal_uInt16& rWhich,
+ sal_uInt16& rSubType, sal_uLong &rFmt,
+ sal_uInt16 nVersion );
-USHORT SwRTFParser::ReadRevTbl()
+sal_uInt16 SwRTFParser::ReadRevTbl()
{
// rStr.Erase( 0 );
int nNumOpenBrakets = 1, nToken; // die erste wurde schon vorher erkannt !!
- USHORT nAuthorTableIndex = 0;
+ sal_uInt16 nAuthorTableIndex = 0;
while( nNumOpenBrakets && IsParserWorking() )
{
@@ -1604,7 +1604,7 @@ USHORT SwRTFParser::ReadRevTbl()
case RTF_TEXTTOKEN:
aToken.EraseTrailingChars(';');
- USHORT nSWId = pDoc->InsertRedlineAuthor(aToken);
+ sal_uInt16 nSWId = pDoc->InsertRedlineAuthor(aToken);
// Store matchpair
if( !pAuthorInfos )
pAuthorInfos = new sw::util::AuthorInfos;
@@ -1623,7 +1623,7 @@ USHORT SwRTFParser::ReadRevTbl()
void SwRTFParser::NextToken( int nToken )
{
- USHORT eDateFmt;
+ sal_uInt16 eDateFmt;
switch( nToken )
{
@@ -1698,12 +1698,12 @@ void SwRTFParser::NextToken( int nToken )
SkipGroup();
else
{
- bStyleTabValid = TRUE;
+ bStyleTabValid = sal_True;
if (SwNumRule* pRule = ReadNumSecLevel( nToken ))
{
GetAttrSet().Put( SwNumRuleItem( pRule->GetName() ));
- if( SFX_ITEM_SET != GetAttrSet().GetItemState( FN_PARAM_NUM_LEVEL, FALSE ))
+ if( SFX_ITEM_SET != GetAttrSet().GetItemState( FN_PARAM_NUM_LEVEL, sal_False ))
GetAttrSet().Put( SfxUInt16Item( FN_PARAM_NUM_LEVEL, 0 ));
}
}
@@ -1813,8 +1813,8 @@ void SwRTFParser::NextToken( int nToken )
rIdx = *pBox->GetSttNd()->EndOfSectionNode();
pPam->Move( fnMoveForward, fnGoNode );
}
- nInsTblRow = static_cast< USHORT >(GetOpenBrakets());
- SetPardTokenRead( FALSE );
+ nInsTblRow = static_cast< sal_uInt16 >(GetOpenBrakets());
+ SetPardTokenRead( sal_False );
SwPaM aTmp(*pPam);
aTmp.Move( fnMoveBackward, fnGoNode );
}
@@ -1858,8 +1858,8 @@ void SwRTFParser::NextToken( int nToken )
case RTF_REVAUTH:
{
- sw::util::AuthorInfo aEntry( static_cast< USHORT >(nTokenValue) );
- USHORT nPos;
+ sw::util::AuthorInfo aEntry( static_cast< sal_uInt16 >(nTokenValue) );
+ sal_uInt16 nPos;
if(pRedlineInsert)
{
@@ -1877,7 +1877,7 @@ void SwRTFParser::NextToken( int nToken )
case RTF_REVAUTHDEL:
{
sw::util::AuthorInfo aEntry( static_cast< short >(nTokenValue) );
- USHORT nPos;
+ sal_uInt16 nPos;
if(pRedlineDelete)
{
@@ -1909,17 +1909,17 @@ void SwRTFParser::NextToken( int nToken )
{
// Zeichengebundener Fly in Fly
ReadHeaderFooter( nToken );
- SetPardTokenRead( FALSE );
+ SetPardTokenRead( sal_False );
}
break;
case RTF_PGDSCNO:
if( IsNewDoc() && bSwPageDesc &&
- USHORT(nTokenValue) < pDoc->GetPageDescCnt() )
+ sal_uInt16(nTokenValue) < pDoc->GetPageDescCnt() )
{
const SwPageDesc* pPgDsc =
&const_cast<const SwDoc *>(pDoc)
- ->GetPageDesc( USHORT(nTokenValue) );
+ ->GetPageDesc( sal_uInt16(nTokenValue) );
CheckInsNewTblLine();
pDoc->InsertPoolItem(*pPam, SwFmtPageDesc( pPgDsc ), 0);
}
@@ -1940,8 +1940,8 @@ void SwRTFParser::NextToken( int nToken )
case RTF_CHDATEL: eDateFmt = DF_LSYS; goto SETCHDATEFIELD;
SETCHDATEFIELD:
{
- USHORT nSubType = DATEFLD, nWhich = RES_DATEFLD;
- ULONG nFormat = eDateFmt;
+ sal_uInt16 nSubType = DATEFLD, nWhich = RES_DATEFLD;
+ sal_uLong nFormat = eDateFmt;
sw3io_ConvertFromOldField( *pDoc, nWhich, nSubType, nFormat, 0x0110 );
SwDateTimeField aDateFld( (SwDateTimeFieldType*)
@@ -1953,8 +1953,8 @@ SETCHDATEFIELD:
case RTF_CHTIME:
{
- USHORT nSubType = TIMEFLD, nWhich = RES_TIMEFLD;
- ULONG nFormat = TF_SSMM_24;
+ sal_uInt16 nSubType = TIMEFLD, nWhich = RES_TIMEFLD;
+ sal_uLong nFormat = TF_SSMM_24;
sw3io_ConvertFromOldField( *pDoc, nWhich, nSubType, nFormat, 0x0110 );
SwDateTimeField aTimeFld( (SwDateTimeFieldType*)
pDoc->GetSysFldType( RES_DATETIMEFLD ), TIMEFLD, nFormat);
@@ -1974,21 +1974,21 @@ SETCHDATEFIELD:
break;
case RTF_CHFTN:
- bFootnoteAutoNum = TRUE;
+ bFootnoteAutoNum = sal_True;
break;
case RTF_NOFPAGES:
if( IsNewDoc() && nTokenValue && -1 != nTokenValue )
- ((SwDocStat&)pDoc->GetDocStat()).nPage = (USHORT)nTokenValue;
+ ((SwDocStat&)pDoc->GetDocStat()).nPage = (sal_uInt16)nTokenValue;
break;
case RTF_NOFWORDS:
if( IsNewDoc() && nTokenValue && -1 != nTokenValue )
- ((SwDocStat&)pDoc->GetDocStat()).nWord = (USHORT)nTokenValue;
+ ((SwDocStat&)pDoc->GetDocStat()).nWord = (sal_uInt16)nTokenValue;
break;
case RTF_NOFCHARS:
if( IsNewDoc() && nTokenValue && -1 != nTokenValue )
- ((SwDocStat&)pDoc->GetDocStat()).nChar = (USHORT)nTokenValue;
+ ((SwDocStat&)pDoc->GetDocStat()).nChar = (sal_uInt16)nTokenValue;
break;
case RTF_LYTPRTMET:
if (IsNewDoc())
@@ -2131,7 +2131,7 @@ bool SwRTFParser::UncompressableStackEntry(const SvxRTFItemStackType &rSet)
{
if (SFX_ITEM_SET ==
- rSet.GetAttrSet().GetItemState(RES_TXTATR_CHARFMT, FALSE))
+ rSet.GetAttrSet().GetItemState(RES_TXTATR_CHARFMT, sal_False))
{
bRet = true;
}
@@ -2145,7 +2145,7 @@ void SwRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos )
SwCntntNode* pNode = pDoc->GetNodes().GoPrevious( &aIdx );
if( !pNode )
{
- ASSERT( FALSE, "keinen vorherigen ContentNode gefunden" );
+ ASSERT( sal_False, "keinen vorherigen ContentNode gefunden" );
}
rpNodePos = new SwNodeIdx( aIdx );
@@ -2154,7 +2154,7 @@ void SwRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos )
void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
{
- ULONG nSNd = rSet.GetSttNodeIdx(), nENd = rSet.GetEndNodeIdx();
+ sal_uLong nSNd = rSet.GetSttNodeIdx(), nENd = rSet.GetEndNodeIdx();
xub_StrLen nSCnt = rSet.GetSttCnt(), nECnt = rSet.GetEndCnt();
SwPaM aPam( *pPam->GetPoint() );
@@ -2200,7 +2200,7 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
// aus dem Set loeschen. Sonst sind diese doppelt, was man ja
// nicht will.
if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState(
- RES_TXTATR_CHARFMT, FALSE, &pCharFmt ) &&
+ RES_TXTATR_CHARFMT, sal_False, &pCharFmt ) &&
((SwFmtCharFmt*)pCharFmt)->GetCharFmt() )
{
const String& rName = ((SwFmtCharFmt*)pCharFmt)->GetCharFmt()->GetName();
@@ -2213,12 +2213,12 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
SfxItemSet &rAttrSet = rSet.GetAttrSet(),
&rStyleSet = pStyle->aAttrSet;
SfxItemIter aIter( rAttrSet );
- USHORT nWhich = aIter.GetCurItem()->Which();
- while( TRUE )
+ sal_uInt16 nWhich = aIter.GetCurItem()->Which();
+ while( sal_True )
{
const SfxPoolItem* pI;
if( SFX_ITEM_SET == rStyleSet.GetItemState(
- nWhich, FALSE, &pI ) && *pI == *aIter.GetCurItem())
+ nWhich, sal_False, &pI ) && *pI == *aIter.GetCurItem())
rAttrSet.ClearItem( nWhich ); // loeschen
if( aIter.IsAtEnd() )
@@ -2242,22 +2242,22 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
}
if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState(
- FN_PARAM_NUM_LEVEL, FALSE, &pItem ))
+ FN_PARAM_NUM_LEVEL, sal_False, &pItem ))
{
// dann ueber den Bereich an den Nodes das NodeNum setzen
- for( ULONG n = nSNd; n <= nENd; ++n )
+ for( sal_uLong n = nSNd; n <= nENd; ++n )
{
SwTxtNode* pTxtNd = pDoc->GetNodes()[ n ]->GetTxtNode();
if( pTxtNd )
{
- pTxtNd->SetAttrListLevel((BYTE) ((SfxUInt16Item*)pItem)->GetValue());
+ pTxtNd->SetAttrListLevel((sal_uInt8) ((SfxUInt16Item*)pItem)->GetValue());
// Update vom LR-Space abschalten?
}
}
}
if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState(
- RES_PARATR_NUMRULE, FALSE, &pItem ))
+ RES_PARATR_NUMRULE, sal_False, &pItem ))
{
const SwNumRule* pRule = pDoc->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() );
@@ -2266,13 +2266,13 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
// diese Rule hat keinen Level, also muss die Einrueckung
// erhalten bleiben!
// dann ueber den Bereich an den Nodes das Flag zuruecksetzen
- for( ULONG n = nSNd; n <= nENd; ++n )
+ for( sal_uLong n = nSNd; n <= nENd; ++n )
{
SwTxtNode* pTxtNd = pDoc->GetNodes()[ n ]->GetTxtNode();
if( pTxtNd )
{
// Update vom LR-Space abschalten
- pTxtNd->SetNumLSpace( FALSE );
+ pTxtNd->SetNumLSpace( sal_False );
}
}
}
@@ -2289,7 +2289,7 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
if (bNoNum)
{
- for( ULONG n = nSNd; n <= nENd; ++n )
+ for( sal_uLong n = nSNd; n <= nENd; ++n )
{
SwTxtNode* pTxtNd = pDoc->GetNodes()[ n ]->GetTxtNode();
if( pTxtNd )
@@ -2366,8 +2366,8 @@ void SwRTFParser::SetPageInformationAsDefault(const DocPageInformation &rInfo)
{
SwFmtFrmSize aFrmSize(ATT_FIX_SIZE, rInfo.mnPaperw, rInfo.mnPaperh);
- SvxLRSpaceItem aLR( static_cast< USHORT >(rInfo.mnMargl), static_cast< USHORT >(rInfo.mnMargr), 0, 0, RES_LR_SPACE );
- SvxULSpaceItem aUL( static_cast< USHORT >(rInfo.mnMargt), static_cast< USHORT >(rInfo.mnMargb), RES_UL_SPACE );
+ SvxLRSpaceItem aLR( static_cast< sal_uInt16 >(rInfo.mnMargl), static_cast< sal_uInt16 >(rInfo.mnMargr), 0, 0, RES_LR_SPACE );
+ SvxULSpaceItem aUL( static_cast< sal_uInt16 >(rInfo.mnMargt), static_cast< sal_uInt16 >(rInfo.mnMargb), RES_UL_SPACE );
UseOnPage eUseOn;
if (rInfo.mbFacingp)
@@ -2375,7 +2375,7 @@ void SwRTFParser::SetPageInformationAsDefault(const DocPageInformation &rInfo)
else
eUseOn = UseOnPage(nsUseOnPage::PD_ALL | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE);
- USHORT nPgStart = static_cast< USHORT >(rInfo.mnPgnStart);
+ sal_uInt16 nPgStart = static_cast< sal_uInt16 >(rInfo.mnPgnStart);
SvxFrameDirectionItem aFrmDir(rInfo.mbRTLdoc ?
FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR);
@@ -2409,7 +2409,7 @@ void SwRTFParser::SetBorderLine(SvxBoxItem& rBox, sal_uInt16 nLine)
int bWeiter = true;
short nLineThickness = 1;
short nPageDistance = 0;
- BYTE nCol = 0;
+ sal_uInt8 nCol = 0;
short nIdx = 0;
int nToken = GetNextToken();
@@ -2518,10 +2518,10 @@ void SwRTFParser::ReadDocControls( int nToken )
SwEndNoteInfo aEndInfo;
bool bSetHyph = false;
- BOOL bEndInfoChgd = FALSE, bFtnInfoChgd = FALSE;
+ sal_Bool bEndInfoChgd = sal_False, bFtnInfoChgd = sal_False;
do {
- USHORT nValue = USHORT( nTokenValue );
+ sal_uInt16 nValue = sal_uInt16( nTokenValue );
switch( nToken )
{
case RTF_RTLDOC:
@@ -2565,11 +2565,11 @@ void SwRTFParser::ReadDocControls( int nToken )
break;
case RTF_ENDDOC:
case RTF_ENDNOTES:
- aFtnInfo.ePos = FTNPOS_CHAPTER; bFtnInfoChgd = TRUE;
+ aFtnInfo.ePos = FTNPOS_CHAPTER; bFtnInfoChgd = sal_True;
break;
case RTF_FTNTJ:
case RTF_FTNBJ:
- aFtnInfo.ePos = FTNPOS_PAGE; bFtnInfoChgd = TRUE;
+ aFtnInfo.ePos = FTNPOS_PAGE; bFtnInfoChgd = sal_True;
break;
case RTF_AENDDOC:
@@ -2584,60 +2584,60 @@ void SwRTFParser::ReadDocControls( int nToken )
if( nValue )
{
aFtnInfo.nFtnOffset = nValue-1;
- bFtnInfoChgd = TRUE;
+ bFtnInfoChgd = sal_True;
}
break;
case RTF_AFTNSTART:
if( nValue )
{
aEndInfo.nFtnOffset = nValue-1;
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
}
break;
case RTF_FTNRSTPG:
- aFtnInfo.eNum = FTNNUM_PAGE; bFtnInfoChgd = TRUE;
+ aFtnInfo.eNum = FTNNUM_PAGE; bFtnInfoChgd = sal_True;
break;
case RTF_FTNRESTART:
- aFtnInfo.eNum = FTNNUM_CHAPTER; bFtnInfoChgd = TRUE;
+ aFtnInfo.eNum = FTNNUM_CHAPTER; bFtnInfoChgd = sal_True;
break;
case RTF_FTNRSTCONT:
- aFtnInfo.eNum = FTNNUM_DOC; bFtnInfoChgd = TRUE;
+ aFtnInfo.eNum = FTNNUM_DOC; bFtnInfoChgd = sal_True;
break;
case RTF_FTNNAR:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ARABIC); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ARABIC); bFtnInfoChgd = sal_True; break;
case RTF_FTNNALC:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_LOWER_LETTER_N); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_LOWER_LETTER_N); bFtnInfoChgd = sal_True; break;
case RTF_FTNNAUC:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_UPPER_LETTER_N); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_UPPER_LETTER_N); bFtnInfoChgd = sal_True; break;
case RTF_FTNNRLC:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_LOWER); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_LOWER); bFtnInfoChgd = sal_True; break;
case RTF_FTNNRUC:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_UPPER); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_UPPER); bFtnInfoChgd = sal_True; break;
case RTF_FTNNCHI:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); bFtnInfoChgd = sal_True; break;
case RTF_AFTNNAR:
- aEndInfo.aFmt.SetNumberingType(SVX_NUM_ARABIC); bEndInfoChgd = TRUE; break;
+ aEndInfo.aFmt.SetNumberingType(SVX_NUM_ARABIC); bEndInfoChgd = sal_True; break;
case RTF_AFTNNALC:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_LOWER_LETTER_N);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_AFTNNAUC:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_UPPER_LETTER_N);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_AFTNNRLC:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_LOWER);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_AFTNNRUC:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_UPPER);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_AFTNNCHI:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_HYPHAUTO:
if (nTokenValue)
@@ -2677,7 +2677,7 @@ void SwRTFParser::ReadDocControls( int nToken )
if( nSkip )
{
SkipToken( nSkip ); // Ignore wieder zurueck
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
break;
@@ -2687,7 +2687,7 @@ void SwRTFParser::ReadDocControls( int nToken )
RTF_UNKNOWNCONTROL == nToken )
SvxRTFParser::NextToken( nToken );
else
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
if( bWeiter )
@@ -2739,13 +2739,13 @@ void SwRTFParser::MakeStyleTab()
// dann erzeuge aus der SvxStyle-Tabelle die Swg-Collections
if( GetStyleTbl().Count() )
{
- USHORT nValidOutlineLevels = 0;
+ sal_uInt16 nValidOutlineLevels = 0;
if( !IsNewDoc() )
{
// search all outlined collections
- //BYTE nLvl;
+ //sal_uInt8 nLvl;
const SwTxtFmtColls& rColls = *pDoc->GetTxtFmtColls();
- for( USHORT n = rColls.Count(); n; )
+ for( sal_uInt16 n = rColls.Count(); n; )
//if( MAXLEVEL > (nLvl = rColls[ --n ]->GetOutlineLevel() ))//#outline level,zhaojianwei
// nValidOutlineLevels |= 1 << nLvl;
if( rColls[ --n ]->IsAssignedToListLevelOfOutlineStyle())
@@ -2754,7 +2754,7 @@ void SwRTFParser::MakeStyleTab()
SvxRTFStyleType* pStyle = GetStyleTbl().First();
do {
- USHORT nNo = USHORT( GetStyleTbl().GetCurKey() );
+ sal_uInt16 nNo = sal_uInt16( GetStyleTbl().GetCurKey() );
if( pStyle->bIsCharFmt )
{
if( !aCharFmtTbl.Get( nNo ) )
@@ -2768,14 +2768,14 @@ void SwRTFParser::MakeStyleTab()
}
} while( 0 != (pStyle = GetStyleTbl().Next()) );
- bStyleTabValid = TRUE;
+ bStyleTabValid = sal_True;
}
}
-BOOL lcl_SetFmtCol( SwFmt& rFmt, USHORT nCols, USHORT nColSpace,
+sal_Bool lcl_SetFmtCol( SwFmt& rFmt, sal_uInt16 nCols, sal_uInt16 nColSpace,
const SvUShorts& rColumns )
{
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if( nCols && USHRT_MAX != nCols )
{
SwFmtCol aCol;
@@ -2785,13 +2785,13 @@ BOOL lcl_SetFmtCol( SwFmt& rFmt, USHORT nCols, USHORT nColSpace,
aCol.Init( nCols, nColSpace, USHRT_MAX );
if( nCols == ( rColumns.Count() / 2 ) )
{
- aCol._SetOrtho( FALSE );
- USHORT nWishWidth = 0, nHalfPrev = 0;
- for( USHORT n = 0, i = 0; n < rColumns.Count(); n += 2, ++i )
+ aCol._SetOrtho( sal_False );
+ sal_uInt16 nWishWidth = 0, nHalfPrev = 0;
+ for( sal_uInt16 n = 0, i = 0; n < rColumns.Count(); n += 2, ++i )
{
SwColumn* pCol = aCol.GetColumns()[ i ];
pCol->SetLeft( nHalfPrev );
- USHORT nSp = rColumns[ n+1 ];
+ sal_uInt16 nSp = rColumns[ n+1 ];
nHalfPrev = nSp / 2;
pCol->SetRight( nSp - nHalfPrev );
pCol->SetWishWidth( rColumns[ n ] +
@@ -2801,14 +2801,14 @@ BOOL lcl_SetFmtCol( SwFmt& rFmt, USHORT nCols, USHORT nColSpace,
aCol.SetWishWidth( nWishWidth );
}
rFmt.SetFmtAttr( aCol );
- bSet = TRUE;
+ bSet = sal_True;
}
return bSet;
}
void SwRTFParser::DoHairyWriterPageDesc(int nToken)
{
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
do {
if( '{' == nToken )
{
@@ -2819,7 +2819,7 @@ void SwRTFParser::DoHairyWriterPageDesc(int nToken)
& ~(0xff | RTF_SWGDEFS)) )
{
SkipToken( -2 ); // Ignore und Token wieder zurueck
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
// kein break, Gruppe ueberspringen
@@ -2839,7 +2839,7 @@ void SwRTFParser::DoHairyWriterPageDesc(int nToken)
default:
SkipToken( -1 ); // Ignore wieder zurueck
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
}
@@ -2847,7 +2847,7 @@ void SwRTFParser::DoHairyWriterPageDesc(int nToken)
RTF_UNKNOWNCONTROL == nToken )
SvxRTFParser::NextToken( nToken );
else
- bWeiter = FALSE;
+ bWeiter = sal_False;
if( bWeiter )
nToken = GetNextToken();
} while( bWeiter && IsParserWorking() );
@@ -2883,7 +2883,7 @@ void SwRTFParser::ReadSectControls( int nToken )
int bWeiter = true;
bool bKeepFooter = false;
do {
- USHORT nValue = USHORT( nTokenValue );
+ sal_uInt16 nValue = sal_uInt16( nTokenValue );
switch( nToken )
{
case RTF_SECT:
@@ -3237,10 +3237,10 @@ void SwRTFParser::ReadPageDescTbl()
int nToken, bSaveChkStyleAttr = IsChkStyleAttr();
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
- SetChkStyleAttr(FALSE); // Attribute nicht gegen die Styles checken
+ SetChkStyleAttr(sal_False); // Attribute nicht gegen die Styles checken
bInPgDscTbl = true;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
SwPageDesc* pPg = 0;
SwFrmFmt* pPgFmt = 0;
@@ -3252,7 +3252,7 @@ void SwRTFParser::ReadPageDescTbl()
SvxFrameDirectionItem aFrmDir(FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR);
- USHORT nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
+ sal_uInt16 nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
SvUShorts aColumns;
while( nNumOpenBrakets && IsParserWorking() )
@@ -3301,11 +3301,11 @@ void SwRTFParser::ReadPageDescTbl()
if (nPos != pDoc->MakePageDesc(
String::CreateFromInt32(nTokenValue)))
{
- ASSERT( FALSE, "PageDesc an falscher Position" );
+ ASSERT( sal_False, "PageDesc an falscher Position" );
}
}
pPg = &pDoc->_GetPageDesc(nPos);
- pPg->SetLandscape( FALSE );
+ pPg->SetLandscape( sal_False );
pPgFmt = &pPg->GetMaster();
#ifndef CFRONT
SETPAGEDESC_DEFAULTS:
@@ -3383,24 +3383,24 @@ void SwRTFParser::ReadPageDescTbl()
// alt: LI/RI/SA/SB, neu: MARG?SXN
case RTF_MARGLSXN:
- case RTF_LI: aLR.SetLeft( (USHORT)nTokenValue ); break;
+ case RTF_LI: aLR.SetLeft( (sal_uInt16)nTokenValue ); break;
case RTF_MARGRSXN:
- case RTF_RI: aLR.SetRight( (USHORT)nTokenValue ); break;
+ case RTF_RI: aLR.SetRight( (sal_uInt16)nTokenValue ); break;
case RTF_MARGTSXN:
- case RTF_SA: aUL.SetUpper( (USHORT)nTokenValue ); break;
+ case RTF_SA: aUL.SetUpper( (sal_uInt16)nTokenValue ); break;
case RTF_MARGBSXN:
- case RTF_SB: aUL.SetLower( (USHORT)nTokenValue ); break;
+ case RTF_SB: aUL.SetLower( (sal_uInt16)nTokenValue ); break;
case RTF_PGWSXN: aSz.SetWidth( nTokenValue ); break;
case RTF_PGHSXN: aSz.SetHeight( nTokenValue ); break;
- case RTF_HEADERY: aHUL.SetUpper( (USHORT)nTokenValue ); break;
- case RTF_HEADER_YB: aHUL.SetLower( (USHORT)nTokenValue ); break;
- case RTF_HEADER_XL: aHLR.SetLeft( (USHORT)nTokenValue ); break;
- case RTF_HEADER_XR: aHLR.SetRight( (USHORT)nTokenValue ); break;
- case RTF_FOOTERY: aFUL.SetLower( (USHORT)nTokenValue ); break;
- case RTF_FOOTER_YT: aFUL.SetUpper( (USHORT)nTokenValue ); break;
- case RTF_FOOTER_XL: aFLR.SetLeft( (USHORT)nTokenValue ); break;
- case RTF_FOOTER_XR: aFLR.SetRight( (USHORT)nTokenValue ); break;
+ case RTF_HEADERY: aHUL.SetUpper( (sal_uInt16)nTokenValue ); break;
+ case RTF_HEADER_YB: aHUL.SetLower( (sal_uInt16)nTokenValue ); break;
+ case RTF_HEADER_XL: aHLR.SetLeft( (sal_uInt16)nTokenValue ); break;
+ case RTF_HEADER_XR: aHLR.SetRight( (sal_uInt16)nTokenValue ); break;
+ case RTF_FOOTERY: aFUL.SetLower( (sal_uInt16)nTokenValue ); break;
+ case RTF_FOOTER_YT: aFUL.SetUpper( (sal_uInt16)nTokenValue ); break;
+ case RTF_FOOTER_XL: aFLR.SetLeft( (sal_uInt16)nTokenValue ); break;
+ case RTF_FOOTER_XR: aFLR.SetRight( (sal_uInt16)nTokenValue ); break;
case RTF_HEADER_YH:
if( 0 > nTokenValue )
@@ -3408,7 +3408,7 @@ void SwRTFParser::ReadPageDescTbl()
aHSz.SetHeightSizeType( ATT_FIX_SIZE );
nTokenValue = -nTokenValue;
}
- aHSz.SetHeight( (USHORT)nTokenValue );
+ aHSz.SetHeight( (sal_uInt16)nTokenValue );
break;
case RTF_FOOTER_YH:
@@ -3417,22 +3417,22 @@ void SwRTFParser::ReadPageDescTbl()
aFSz.SetHeightSizeType( ATT_FIX_SIZE );
nTokenValue = -nTokenValue;
}
- aFSz.SetHeight( (USHORT)nTokenValue );
+ aFSz.SetHeight( (sal_uInt16)nTokenValue );
break;
- case RTF_LNDSCPSXN: pPg->SetLandscape( TRUE ); break;
+ case RTF_LNDSCPSXN: pPg->SetLandscape( sal_True ); break;
- case RTF_COLS: nCols = (USHORT)nTokenValue; break;
- case RTF_COLSX: nColSpace = (USHORT)nTokenValue; break;
+ case RTF_COLS: nCols = (sal_uInt16)nTokenValue; break;
+ case RTF_COLSX: nColSpace = (sal_uInt16)nTokenValue; break;
case RTF_COLNO:
- nAktCol = (USHORT)nTokenValue;
+ nAktCol = (sal_uInt16)nTokenValue;
if( RTF_COLW == GetNextToken() )
{
- USHORT nWidth = USHORT( nTokenValue ), nSpace = 0;
+ sal_uInt16 nWidth = sal_uInt16( nTokenValue ), nSpace = 0;
if( RTF_COLSR == GetNextToken() )
- nSpace = USHORT( nTokenValue );
+ nSpace = sal_uInt16( nTokenValue );
else
SkipToken( -1 ); // wieder zurueck
@@ -3470,7 +3470,7 @@ void SwRTFParser::ReadPageDescTbl()
pPg->SetName(aToken);
// sollte es eine Vorlage aus dem Pool sein ??
- USHORT n = SwStyleNameMapper::GetPoolIdFromUIName(aToken,
+ sal_uInt16 n = SwStyleNameMapper::GetPoolIdFromUIName(aToken,
nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC);
if (USHRT_MAX != n)
{
@@ -3511,9 +3511,9 @@ void SwRTFParser::ReadPageDescTbl()
for( nPos = 0; nPos < pDoc->GetPageDescCnt(); ++nPos )
{
SwPageDesc* pPgDsc = &pDoc->_GetPageDesc( nPos );
- if( (USHORT)(long)pPgDsc->GetFollow() < pDoc->GetPageDescCnt() )
+ if( (sal_uInt16)(long)pPgDsc->GetFollow() < pDoc->GetPageDescCnt() )
pPgDsc->SetFollow(& const_cast<const SwDoc *>(pDoc)
- ->GetPageDesc((USHORT)(long)
+ ->GetPageDesc((sal_uInt16)(long)
pPgDsc->GetFollow()));
}
@@ -3552,7 +3552,7 @@ void SwRTFParser::ReadPrtData()
SkipToken( -1 ); // schliessende Klammer wieder zurueck!!
}
-static const SwNodeIndex* SetHeader(SwFrmFmt* pHdFtFmt, BOOL bReuseOld)
+static const SwNodeIndex* SetHeader(SwFrmFmt* pHdFtFmt, sal_Bool bReuseOld)
{
ASSERT(pHdFtFmt, "Impossible, no header");
const SwFrmFmt* pExisting = bReuseOld ?
@@ -3560,13 +3560,13 @@ static const SwNodeIndex* SetHeader(SwFrmFmt* pHdFtFmt, BOOL bReuseOld)
if (!pExisting)
{
//No existing header, create a new one
- pHdFtFmt->SetFmtAttr(SwFmtHeader(TRUE));
+ pHdFtFmt->SetFmtAttr(SwFmtHeader(sal_True));
pExisting = pHdFtFmt->GetHeader().GetHeaderFmt();
}
return pExisting->GetCntnt().GetCntntIdx();
}
-static const SwNodeIndex* SetFooter(SwFrmFmt* pHdFtFmt, BOOL bReuseOld)
+static const SwNodeIndex* SetFooter(SwFrmFmt* pHdFtFmt, sal_Bool bReuseOld)
{
ASSERT(pHdFtFmt, "Impossible, no footer");
const SwFrmFmt* pExisting = bReuseOld ?
@@ -3574,7 +3574,7 @@ static const SwNodeIndex* SetFooter(SwFrmFmt* pHdFtFmt, BOOL bReuseOld)
if (!pExisting)
{
//No exist footer, create a new one
- pHdFtFmt->SetFmtAttr(SwFmtFooter(TRUE));
+ pHdFtFmt->SetFmtAttr(SwFmtFooter(sal_True));
pExisting = pHdFtFmt->GetFooter().GetFooterFmt();
}
return pExisting->GetCntnt().GetCntntIdx();
@@ -3598,14 +3598,14 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
SwFlySaveArr aSaveArray( 255 < aFlyArr.Count() ? aFlyArr.Count() : 255 );
aSaveArray.Insert( &aFlyArr, 0 );
aFlyArr.Remove( 0, aFlyArr.Count() );
- BOOL bSetFlyInDoc = TRUE;
+ sal_Bool bSetFlyInDoc = sal_True;
const SwNodeIndex* pSttIdx = 0;
SwFrmFmt* pHdFtFmt = 0;
SwTxtAttr* pTxtAttr = 0;
- int bDelFirstChar = FALSE;
+ int bDelFirstChar = sal_False;
bool bOldIsFootnote = mbIsFootnote;
- BOOL bOldGrpStt = sal::static_int_cast< BOOL, int >(IsNewGroup());
+ sal_Bool bOldGrpStt = sal::static_int_cast< sal_Bool, int >(IsNewGroup());
int nNumOpenBrakets = GetOpenBrakets() - 1;
@@ -3627,7 +3627,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
nPos--;
aFtnNote.SetNumStr( pTxtNd->GetTxt().GetChar( nPos ) );
((String&)pTxtNd->GetTxt()).SetChar( nPos, CH_TXTATR_INWORD );
- bDelFirstChar = TRUE;
+ bDelFirstChar = sal_True;
}
pTxtAttr = pTxtNd->InsertItem( aFtnNote, nPos, nPos,
@@ -3663,7 +3663,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
ASSERT( pTxtAttr, "konnte den Fly nicht einfuegen/finden" );
pSttIdx = pHdFtFmt->GetCntnt().GetCntntIdx();
- bSetFlyInDoc = FALSE;
+ bSetFlyInDoc = sal_False;
}
break;
@@ -3671,50 +3671,50 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
case RTF_HEADER:
pPageDesc->WriteUseOn( (UseOnPage)(pPageDesc->ReadUseOn() | nsUseOnPage::PD_HEADERSHARE) );
pHdFtFmt = &pPageDesc->GetMaster();
- pSttIdx = SetHeader( pHdFtFmt, FALSE );
+ pSttIdx = SetHeader( pHdFtFmt, sal_False );
break;
case RTF_HEADERL:
// we cannot have left or right, must have always both
pPageDesc->WriteUseOn( (UseOnPage)((pPageDesc->ReadUseOn() & ~nsUseOnPage::PD_HEADERSHARE) | nsUseOnPage::PD_ALL));
- SetHeader( pPageDesc->GetRightFmt(), TRUE );
+ SetHeader( pPageDesc->GetRightFmt(), sal_True );
pHdFtFmt = pPageDesc->GetLeftFmt();
- pSttIdx = SetHeader(pHdFtFmt, FALSE );
+ pSttIdx = SetHeader(pHdFtFmt, sal_False );
break;
case RTF_HEADERR:
// we cannot have left or right, must have always both
pPageDesc->WriteUseOn( (UseOnPage)((pPageDesc->ReadUseOn() & ~nsUseOnPage::PD_HEADERSHARE) | nsUseOnPage::PD_ALL));
- SetHeader( pPageDesc->GetLeftFmt(), TRUE );
+ SetHeader( pPageDesc->GetLeftFmt(), sal_True );
pHdFtFmt = pPageDesc->GetRightFmt();
- pSttIdx = SetHeader(pHdFtFmt, FALSE );
+ pSttIdx = SetHeader(pHdFtFmt, sal_False );
break;
case RTF_FOOTERF:
case RTF_FOOTER:
pPageDesc->WriteUseOn( (UseOnPage)(pPageDesc->ReadUseOn() | nsUseOnPage::PD_FOOTERSHARE) );
pHdFtFmt = &pPageDesc->GetMaster();
- pSttIdx = SetFooter(pHdFtFmt, FALSE );
+ pSttIdx = SetFooter(pHdFtFmt, sal_False );
break;
case RTF_FOOTERL:
// we cannot have left or right, must have always both
pPageDesc->WriteUseOn( (UseOnPage)((pPageDesc->ReadUseOn() & ~nsUseOnPage::PD_FOOTERSHARE) | nsUseOnPage::PD_ALL));
- SetFooter( pPageDesc->GetRightFmt(), TRUE );
+ SetFooter( pPageDesc->GetRightFmt(), sal_True );
pHdFtFmt = pPageDesc->GetLeftFmt();
- pSttIdx = SetFooter(pHdFtFmt, FALSE );
+ pSttIdx = SetFooter(pHdFtFmt, sal_False );
break;
case RTF_FOOTERR:
// we cannot have left or right, must have always both
pPageDesc->WriteUseOn( (UseOnPage)((pPageDesc->ReadUseOn() & ~nsUseOnPage::PD_FOOTERSHARE) | nsUseOnPage::PD_ALL));
- SetFooter( pPageDesc->GetLeftFmt(), TRUE );
+ SetFooter( pPageDesc->GetLeftFmt(), sal_True );
pHdFtFmt = pPageDesc->GetRightFmt();
- pSttIdx = SetFooter(pHdFtFmt, FALSE );
+ pSttIdx = SetFooter(pHdFtFmt, sal_False );
break;
}
- USHORT nOldFlyArrCnt = aFlyArr.Count();
+ sal_uInt16 nOldFlyArrCnt = aFlyArr.Count();
if( !pSttIdx )
SkipGroup();
else
@@ -3734,7 +3734,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
pColl = pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false );
pDoc->SetTxtFmtColl( *pPam, pColl );
- SetNewGroup( TRUE );
+ SetNewGroup( sal_True );
while( !( nNumOpenBrakets == GetOpenBrakets() && !GetStackPos()) && IsParserWorking() )
{
@@ -3743,7 +3743,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
case RTF_U:
if( bDelFirstChar )
{
- bDelFirstChar = FALSE;
+ bDelFirstChar = sal_False;
nToken = 0;
}
break;
@@ -3753,7 +3753,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
{
if( !aToken.Erase( 0, 1 ).Len() )
nToken = 0;
- bDelFirstChar = FALSE;
+ bDelFirstChar = sal_False;
}
break;
}
@@ -3791,14 +3791,14 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
}
}
- bFootnoteAutoNum = FALSE; // default auf aus!
+ bFootnoteAutoNum = sal_False; // default auf aus!
// und alles wieder zurueck
*pPam->GetPoint() = aSavePos;
if (mbIsFootnote)
SetNewGroup( bOldGrpStt ); // Status wieder zurueck
else
- SetNewGroup( FALSE ); // { - Klammer war kein Group-Start!
+ SetNewGroup( sal_False ); // { - Klammer war kein Group-Start!
mbIsFootnote = bOldIsFootnote;
GetAttrStack() = aSaveStack;
@@ -3811,7 +3811,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
// Escapement korrigieren
- if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_ESCAPEMENT, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_ESCAPEMENT, sal_False, &pItem ))
{
/* prozentuale Veraenderung errechnen !
* Formel : (FontSize * 1/20 ) pts Escapement * 2
@@ -3836,7 +3836,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
}
// TabStops anpassen
- if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_TABSTOP, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_TABSTOP, sal_False, &pItem ))
{
const SvxLRSpaceItem& rLR = GetLRSpace( rSet );
SvxTabStopItem aTStop( *(SvxTabStopItem*)pItem );
@@ -3846,7 +3846,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
{
// Tabs anpassen !!
SvxTabStop* pTabs = (SvxTabStop*)aTStop.GetStart();
- for( USHORT n = aTStop.Count(); n; --n, ++pTabs)
+ for( sal_uInt16 n = aTStop.Count(); n; --n, ++pTabs)
if( SVX_TAB_ADJUST_DEFAULT != pTabs->GetAdjustment() )
pTabs->GetTabPos() -= nOffset;
@@ -3864,7 +3864,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
}
rSet.Put( aTStop );
}
- else if( SFX_ITEM_SET == rSet.GetItemState( RES_LR_SPACE, FALSE, &pItem )
+ else if( SFX_ITEM_SET == rSet.GetItemState( RES_LR_SPACE, sal_False, &pItem )
&& ((SvxLRSpaceItem*)pItem)->GetTxtFirstLineOfst() < 0 )
{
// negativer Einzug, dann auf 0 Pos einen Tab setzen
@@ -3873,7 +3873,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
// NumRules anpassen
if( !bStyleTabValid &&
- SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem ))
+ SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ))
{
// dann steht im Namen nur ein Verweis in das ListArray
SwNumRule* pRule = GetNumRuleOfListNo( ((SwNumRuleItem*)pItem)->
@@ -3894,7 +3894,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
????????????????????????????????????????????????????????????????????
// LineSpacing korrigieren
- if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_LINESPACING, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_LINESPACING, sal_False, &pItem ))
{
const SvxLineSpacingItem* pLS = (const SvxLineSpacingItem*)pItem;
SvxLineSpacingItem aNew;
@@ -3911,10 +3911,10 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
}
-SwTxtFmtColl* SwRTFParser::MakeColl(const String& rName, USHORT nPos,
- BYTE nOutlineLevel, bool& rbCollExist)
+SwTxtFmtColl* SwRTFParser::MakeColl(const String& rName, sal_uInt16 nPos,
+ sal_uInt8 nOutlineLevel, bool& rbCollExist)
{
- if( BYTE(-1) == nOutlineLevel )
+ if( sal_uInt8(-1) == nOutlineLevel )
//nOutlineLevel = NO_NUMBERING;
nOutlineLevel = MAXLEVEL;//#outline level,zhaojianwei
@@ -3965,10 +3965,10 @@ SwTxtFmtColl* SwRTFParser::MakeColl(const String& rName, USHORT nPos,
return pColl;
}
-SwCharFmt* SwRTFParser::MakeCharFmt(const String& rName, USHORT nPos,
+SwCharFmt* SwRTFParser::MakeCharFmt(const String& rName, sal_uInt16 nPos,
int& rbCollExist)
{
- rbCollExist = FALSE;
+ rbCollExist = sal_False;
SwCharFmt* pFmt;
String aNm( rName );
if( !aNm.Len() )
@@ -4004,10 +4004,10 @@ void SwRTFParser::SetStyleAttr( SfxItemSet& rCollSet,
// suche alle Attribute, die neu gesetzt werden:
const SfxPoolItem* pItem;
SfxItemIter aIter( rDerivedSet );
- USHORT nWhich = aIter.GetCurItem()->Which();
- while( TRUE )
+ sal_uInt16 nWhich = aIter.GetCurItem()->Which();
+ while( sal_True )
{
- switch( rStyleSet.GetItemState( nWhich, FALSE, &pItem ) )
+ switch( rStyleSet.GetItemState( nWhich, sal_False, &pItem ) )
{
case SFX_ITEM_DEFAULT:
// auf default zuruecksetzen
@@ -4030,10 +4030,10 @@ void SwRTFParser::SetStyleAttr( SfxItemSet& rCollSet,
SetSwgValues( rCollSet );
}
-SwTxtFmtColl* SwRTFParser::MakeStyle( USHORT nNo, const SvxRTFStyleType& rStyle)
+SwTxtFmtColl* SwRTFParser::MakeStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle)
{
bool bCollExist;
- SwTxtFmtColl* pColl = MakeColl( rStyle.sName, USHORT(nNo),
+ SwTxtFmtColl* pColl = MakeColl( rStyle.sName, sal_uInt16(nNo),
rStyle.nOutlineNo, bCollExist);
aTxtCollTbl.Insert( nNo, pColl );
@@ -4041,7 +4041,7 @@ SwTxtFmtColl* SwRTFParser::MakeStyle( USHORT nNo, const SvxRTFStyleType& rStyle)
if( bCollExist )
return pColl;
- USHORT nStyleNo = rStyle.nBasedOn;
+ sal_uInt16 nStyleNo = rStyle.nBasedOn;
if( rStyle.bBasedOnIsSet && nStyleNo != nNo )
{
SvxRTFStyleType* pDerivedStyle = GetStyleTbl().Get( nStyleNo );
@@ -4092,17 +4092,17 @@ SwTxtFmtColl* SwRTFParser::MakeStyle( USHORT nNo, const SvxRTFStyleType& rStyle)
return pColl;
}
-SwCharFmt* SwRTFParser::MakeCharStyle( USHORT nNo, const SvxRTFStyleType& rStyle )
+SwCharFmt* SwRTFParser::MakeCharStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle )
{
int bCollExist;
- SwCharFmt* pFmt = MakeCharFmt( rStyle.sName, USHORT(nNo), bCollExist );
+ SwCharFmt* pFmt = MakeCharFmt( rStyle.sName, sal_uInt16(nNo), bCollExist );
aCharFmtTbl.Insert( nNo, pFmt );
// in bestehendes Dok einfuegen, dann keine Ableitung usw. setzen
if( bCollExist )
return pFmt;
- USHORT nStyleNo = rStyle.nBasedOn;
+ sal_uInt16 nStyleNo = rStyle.nBasedOn;
if( rStyle.bBasedOnIsSet && nStyleNo != nNo )
{
SvxRTFStyleType* pDerivedStyle = GetStyleTbl().Get( nStyleNo );
@@ -4146,10 +4146,10 @@ void SwRTFParser::DelLastNode()
if( !pPam->GetPoint()->nContent.GetIndex() )
{
- ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
SwCntntNode* pCNd = pDoc->GetNodes()[ nNodeIdx ]->GetCntntNode();
// paragraphs with page break information are not empty! see #117914# topic 1)
- if(const SfxPoolItem* pItem=&(pCNd->GetAttr( RES_PAGEDESC, FALSE)))
+ if(const SfxPoolItem* pItem=&(pCNd->GetAttr( RES_PAGEDESC, sal_False)))
{
SwFmtPageDesc* pPageDescItem = ((SwFmtPageDesc*)pItem);
if (pPageDescItem->GetPageDesc()!=NULL)
@@ -4163,7 +4163,7 @@ void SwRTFParser::DelLastNode()
{
// Attribut Stack-Eintraege, muessen ans Ende des vorherigen
// Nodes verschoben werden.
- BOOL bMove = FALSE;
+ sal_Bool bMove = sal_False;
for( size_t n = GetAttrStack().size(); n; )
{
SvxRTFItemStackType* pStkEntry = (SvxRTFItemStackType*)
@@ -4173,7 +4173,7 @@ void SwRTFParser::DelLastNode()
if( !bMove )
{
pPam->Move( fnMoveBackward );
- bMove = TRUE;
+ bMove = sal_True;
}
pStkEntry->SetStartPos( SwxPosition( pPam ) );
}
@@ -4205,7 +4205,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
// Crsr nicht mehr in der Tabelle ?
if( !pPam->GetNode()->FindTableNode() && _do )
{
- ULONG nOldPos = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nOldPos = pPam->GetPoint()->nNode.GetIndex();
// dann wieder in die letzte Box setzen
// (kann durch einlesen von Flys geschehen!)
@@ -4240,10 +4240,10 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
case RTF_PGDSCNO:
if( IsNewDoc() && bSwPageDesc &&
- USHORT(nTokenValue) < pDoc->GetPageDescCnt() )
+ sal_uInt16(nTokenValue) < pDoc->GetPageDescCnt() )
{
const SwPageDesc* pPgDsc = &const_cast<const SwDoc *>(pDoc)
- ->GetPageDesc( (USHORT)nTokenValue );
+ ->GetPageDesc( (sal_uInt16)nTokenValue );
pDoc->InsertPoolItem( *pPam, SwFmtPageDesc( pPgDsc ), 0);
}
break;
@@ -4266,7 +4266,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
if( pRule )
pSet->Put( SwNumRuleItem( pRule->GetName() ));
- if( SFX_ITEM_SET != pSet->GetItemState( FN_PARAM_NUM_LEVEL, FALSE ))
+ if( SFX_ITEM_SET != pSet->GetItemState( FN_PARAM_NUM_LEVEL, sal_False ))
pSet->Put( SfxUInt16Item( FN_PARAM_NUM_LEVEL, 0 ));
}
else
@@ -4282,8 +4282,8 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
case RTF_ILVL:
case RTF_SOUTLVL:
{
- BYTE nLevel = MAXLEVEL <= nTokenValue ? MAXLEVEL - 1
- : BYTE( nTokenValue );
+ sal_uInt8 nLevel = MAXLEVEL <= nTokenValue ? MAXLEVEL - 1
+ : sal_uInt8( nTokenValue );
pSet->Put( SfxUInt16Item( FN_PARAM_NUM_LEVEL, nLevel ));
}
break;
@@ -4392,7 +4392,7 @@ bool BookmarkPosition::operator==(const BookmarkPosition rhs)
return(maMkNode.GetIndex() == rhs.maMkNode.GetIndex() && mnMkCntnt == rhs.mnMkCntnt);
}
-ULONG SwNodeIdx::GetIdx() const
+sal_uLong SwNodeIdx::GetIdx() const
{
return aIdx.GetIndex();
}
@@ -4412,7 +4412,7 @@ SvxNodeIdx* SwxPosition::MakeNodeIdx() const
return new SwNodeIdx( pPam->GetPoint()->nNode );
}
-ULONG SwxPosition::GetNodeIdx() const
+sal_uLong SwxPosition::GetNodeIdx() const
{
return pPam->GetPoint()->nNode.GetIndex();
}
diff --git a/sw/source/filter/rtf/swparrtf.hxx b/sw/source/filter/rtf/swparrtf.hxx
index 1faa2614e815..3f13b397ad2f 100644
--- a/sw/source/filter/rtf/swparrtf.hxx
+++ b/sw/source/filter/rtf/swparrtf.hxx
@@ -51,8 +51,8 @@
#include <svx/svdobj.hxx>
-extern void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCol, short nIdx,
- USHORT nOOIndex, USHORT nWWIndex, short *pSize);
+extern void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, sal_uInt8 nCol, short nIdx,
+ sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize);
class Font;
class Graphic;
@@ -75,9 +75,9 @@ struct SvxRTFPictureType;
class RtfReader: public Reader
{
- virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
public:
- virtual ULONG Read( SvStream* pStrm, SwDoc &, const String& rBaseURL, SwPaM &);
+ virtual sal_uLong Read( SvStream* pStrm, SwDoc &, const String& rBaseURL, SwPaM &);
};
class SwNodeIdx : public SvxNodeIdx
@@ -85,7 +85,7 @@ class SwNodeIdx : public SvxNodeIdx
SwNodeIndex aIdx;
public:
SwNodeIdx( const SwNodeIndex& rIdx ) : aIdx( rIdx ) {}
- virtual ULONG GetIdx() const;
+ virtual sal_uLong GetIdx() const;
virtual SvxNodeIdx* Clone() const;
};
@@ -110,7 +110,7 @@ class SwxPosition : public SvxPosition
public:
SwxPosition( SwPaM* pCrsr ) : pPam( pCrsr ) {}
- virtual ULONG GetNodeIdx() const;
+ virtual sal_uLong GetNodeIdx() const;
virtual xub_StrLen GetCntIdx() const;
// erzeuge von sich selbst eine Kopie
@@ -127,7 +127,7 @@ struct SwFlySave
SwNodeIndex nSttNd, nEndNd;
xub_StrLen nEndCnt;
SwTwips nPageWidth;
- USHORT nDropLines, nDropAnchor;
+ sal_uInt16 nDropLines, nDropAnchor;
SwFlySave( const SwPaM& rPam, SfxItemSet& rSet );
int IsEqualFly( const SwPaM& rPos, SfxItemSet& rSet );
@@ -137,20 +137,20 @@ struct SwFlySave
struct SwListEntry
{
long nListId, nListTemplateId, nListNo;
- USHORT nListDocPos;
- BOOL bRuleUsed;
+ sal_uInt16 nListDocPos;
+ sal_Bool bRuleUsed;
SwListEntry()
: nListId( 0 ), nListTemplateId( 0 ), nListNo( 0 ), nListDocPos( 0 ),
- bRuleUsed( FALSE )
+ bRuleUsed( sal_False )
{}
- SwListEntry( long nLstId, long nLstTmplId, USHORT nLstDocPos )
+ SwListEntry( long nLstId, long nLstTmplId, sal_uInt16 nLstDocPos )
: nListId( nLstId ), nListTemplateId( nLstTmplId ), nListNo( 0 ),
- nListDocPos( nLstDocPos ), bRuleUsed( FALSE )
+ nListDocPos( nLstDocPos ), bRuleUsed( sal_False )
{}
void Clear() { nListId = nListTemplateId = nListNo = 0, nListDocPos = 0;
- bRuleUsed = FALSE; }
+ bRuleUsed = sal_False; }
};
DECLARE_TABLE( SwRTFStyleTbl, SwTxtFmtColl* )
@@ -257,7 +257,7 @@ private:
wwULSpaceData& rData);
void SetPageULSpaceItems(SwFrmFmt &rFmt, wwULSpaceData& rData);
bool SetCols(SwFrmFmt &rFmt, const rtfSection &rSection,
- USHORT nNettoWidth);
+ sal_uInt16 nNettoWidth);
void SetHdFt(rtfSection &rSection);
void CopyFrom(const SwPageDesc &rFrom, SwPageDesc &rDest);
void MoveFrom(SwPageDesc &rFrom, SwPageDesc &rDest);
@@ -319,11 +319,11 @@ class SwRTFParser : public SvxRTFParser
String sBaseURL;
- USHORT nAktPageDesc, nAktFirstPageDesc;
- USHORT m_nCurrentBox;
- USHORT nInsTblRow; // beim nach \row kein \pard -> neue Line anlegen
- USHORT nNewNumSectDef; // jeder SectionWechsel kann neue Rules definieren
- USHORT nRowsToRepeat;
+ sal_uInt16 nAktPageDesc, nAktFirstPageDesc;
+ sal_uInt16 m_nCurrentBox;
+ sal_uInt16 nInsTblRow; // beim nach \row kein \pard -> neue Line anlegen
+ sal_uInt16 nNewNumSectDef; // jeder SectionWechsel kann neue Rules definieren
+ sal_uInt16 nRowsToRepeat;
bool bSwPageDesc;
bool bReadSwFly; // lese Swg-Fly (wichtig fuer Bitmaps!)
@@ -354,7 +354,7 @@ class SwRTFParser : public SvxRTFParser
virtual void InsertPara();
virtual void InsertText();
- virtual void MovePos( int bForward = TRUE );
+ virtual void MovePos( int bForward = sal_True );
virtual void SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos );
void EnterEnvironment();
void LeaveEnvironment();
@@ -369,10 +369,10 @@ class SwRTFParser : public SvxRTFParser
void ReadUserProperties();
- void ReadListLevel( SwNumRule& rRule, BYTE nLvl );
+ void ReadListLevel( SwNumRule& rRule, sal_uInt8 nLvl );
void SetBorderLine(SvxBoxItem& rBox, sal_uInt16 nLine);
void ReadListTable();
- USHORT ReadRevTbl();
+ sal_uInt16 ReadRevTbl();
void ReadShpRslt();
void ReadShpTxt(String &shpTxt);
void ReadDrawingObject();
@@ -381,21 +381,21 @@ class SwRTFParser : public SvxRTFParser
void ReadListOverrideTable();
SwNumRule *ReadNumSecLevel( int nToken );
SwNumRule* GetNumRuleOfListNo( long nListNo,
- BOOL bRemoveFromList = FALSE );
+ sal_Bool bRemoveFromList = sal_False );
void RemoveUnusedNumRule( SwNumRule* );
void RemoveUnusedNumRules();
const Font* FindFontOfItem( const SvxFontItem& rItem ) const;
// 3 Methoden zum Aufbauen der Styles
- SwTxtFmtColl* MakeColl( const String&, USHORT nPos, BYTE nOutlineLevel,
+ SwTxtFmtColl* MakeColl( const String&, sal_uInt16 nPos, sal_uInt8 nOutlineLevel,
bool& rbCollExist );
- SwCharFmt* MakeCharFmt( const String& rName, USHORT nPos,
+ SwCharFmt* MakeCharFmt( const String& rName, sal_uInt16 nPos,
int& rbCollExist );
void SetStyleAttr( SfxItemSet& rCollSet,
const SfxItemSet& rStyleSet,
const SfxItemSet& rDerivedSet );
- SwTxtFmtColl* MakeStyle( USHORT nNo, const SvxRTFStyleType& rStyle );
- SwCharFmt* MakeCharStyle( USHORT nNo, const SvxRTFStyleType& rStyle );
+ SwTxtFmtColl* MakeStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle );
+ SwCharFmt* MakeCharStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle );
void MakeStyleTab();
int MakeFieldInst( String& rFieldStr );
@@ -461,7 +461,7 @@ public:
::com::sun::star::document::XDocumentProperties> i_xDocProps,
const SwPaM& rCrsr, SvStream& rIn,
const String& rBaseURL,
- int bReadNewDoc = TRUE );
+ int bReadNewDoc = sal_True );
virtual SvParserState CallParser(); // Aufruf des Parsers
virtual int IsEndPara( SvxNodeIdx* pNd, xub_StrLen nCnt ) const;
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index 2a77d47dd65b..cd943f2278d2 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -94,7 +94,7 @@ Writer_Impl::~Writer_Impl()
void Writer_Impl::RemoveFontList( SwDoc& rDoc )
{
ASSERT( pFontRemoveLst, "wo ist die FontListe?" );
- for( USHORT i = pFontRemoveLst->Count(); i; )
+ for( sal_uInt16 i = pFontRemoveLst->Count(); i; )
{
SvxFontItem* pItem = (SvxFontItem*)(*pFontRemoveLst)[ --i ];
rDoc.GetAttrPool().Remove( *pItem );
@@ -106,7 +106,7 @@ void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk)
if( !pBkmkNodePos )
pBkmkNodePos = new SwBookmarkNodeTable;
- ULONG nNd = rBkmk.GetMarkPos().nNode.GetIndex();
+ sal_uLong nNd = rBkmk.GetMarkPos().nNode.GetIndex();
SvPtrarr* pArr = pBkmkNodePos->Get( nNd );
if( !pArr )
{
@@ -184,18 +184,18 @@ void Writer::ResetWriter()
pOrigFileName = 0;
pDoc = 0;
- bShowProgress = bUCS2_WithStartChar = TRUE;
+ bShowProgress = bUCS2_WithStartChar = sal_True;
bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR =
bWriteClipboardDoc = bWriteOnlyFirstTable = bBlock =
- bOrganizerMode = FALSE;
+ bOrganizerMode = sal_False;
}
-BOOL Writer::CopyNextPam( SwPaM ** ppPam )
+sal_Bool Writer::CopyNextPam( SwPaM ** ppPam )
{
if( (*ppPam)->GetNext() == pOrigPam )
{
*ppPam = pOrigPam; // wieder auf den Anfangs-Pam setzen
- return FALSE; // Ende vom Ring
+ return sal_False; // Ende vom Ring
}
// ansonsten kopiere den die Werte aus dem naechsten Pam
@@ -204,7 +204,7 @@ BOOL Writer::CopyNextPam( SwPaM ** ppPam )
*pCurPam->GetPoint() = *(*ppPam)->Start();
*pCurPam->GetMark() = *(*ppPam)->End();
- return TRUE;
+ return sal_True;
}
// suche die naechste Bookmark-Position aus der Bookmark-Tabelle
@@ -223,8 +223,8 @@ sal_Int32 Writer::FindPos_Bkmk(const SwPosition& rPos) const
}
-SwPaM* Writer::NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx,
- BOOL bNodesArray )
+SwPaM* Writer::NewSwPaM( SwDoc & rDoc, sal_uLong nStartIdx, sal_uLong nEndIdx,
+ sal_Bool bNodesArray )
{
SwNodes* pNds = bNodesArray ? &rDoc.GetNodes() : (SwNodes*)rDoc.GetUndoNds();
@@ -261,11 +261,11 @@ void Writer::SetStream(SvStream *const pStream)
{ m_pImpl->m_pStream = pStream; }
-SvStream& Writer::OutHex( SvStream& rStrm, ULONG nHex, BYTE nLen )
+SvStream& Writer::OutHex( SvStream& rStrm, sal_uLong nHex, sal_uInt8 nLen )
{ // in einen Stream aus
// Pointer an das Bufferende setzen
sal_Char* pStr = aNToABuf + (NTOABUFLEN-1);
- for( BYTE n = 0; n < nLen; ++n )
+ for( sal_uInt8 n = 0; n < nLen; ++n )
{
*(--pStr) = (sal_Char)(nHex & 0xf ) + 48;
if( *pStr > '9' )
@@ -296,7 +296,7 @@ SvStream& Writer::OutLong( SvStream& rStrm, long nVal )
return rStrm << pStr;
}
-SvStream& Writer::OutULong( SvStream& rStrm, ULONG nVal )
+SvStream& Writer::OutULong( SvStream& rStrm, sal_uLong nVal )
{
// Pointer an das Bufferende setzen
sal_Char* pStr = aNToABuf + (NTOABUFLEN-1);
@@ -309,12 +309,12 @@ SvStream& Writer::OutULong( SvStream& rStrm, ULONG nVal )
}
-ULONG Writer::Write( SwPaM& rPaM, SvStream& rStrm, const String* pFName )
+sal_uLong Writer::Write( SwPaM& rPaM, SvStream& rStrm, const String* pFName )
{
if ( IsStgWriter() )
{
SotStorageRef aRef = new SotStorage( rStrm );
- ULONG nResult = Write( rPaM, *aRef, pFName );
+ sal_uLong nResult = Write( rPaM, *aRef, pFName );
if ( nResult == ERRCODE_NONE )
aRef->Commit();
return nResult;
@@ -329,38 +329,38 @@ ULONG Writer::Write( SwPaM& rPaM, SvStream& rStrm, const String* pFName )
// zum Vergleich auf den akt. Pam sichern
pOrigPam = &rPaM;
- ULONG nRet = WriteStream();
+ sal_uLong nRet = WriteStream();
ResetWriter();
return nRet;
}
-ULONG Writer::Write( SwPaM& rPam, SfxMedium& rMed, const String* pFileName )
+sal_uLong Writer::Write( SwPaM& rPam, SfxMedium& rMed, const String* pFileName )
{
// This method must be overloaded in SwXMLWriter a storage from medium will be used there.
// The microsoft format can write to storage but the storage will be based on the stream.
return Write( rPam, *rMed.GetOutStream(), pFileName );
}
-ULONG Writer::Write( SwPaM& /*rPam*/, SvStorage&, const String* )
+sal_uLong Writer::Write( SwPaM& /*rPam*/, SvStorage&, const String* )
{
ASSERT( !this, "Schreiben in Storages auf einem Stream?" );
return ERR_SWG_WRITE_ERROR;
}
-ULONG Writer::Write( SwPaM&, const uno::Reference < embed::XStorage >&, const String*, SfxMedium* )
+sal_uLong Writer::Write( SwPaM&, const uno::Reference < embed::XStorage >&, const String*, SfxMedium* )
{
ASSERT( !this, "Schreiben in Storages auf einem Stream?" );
return ERR_SWG_WRITE_ERROR;
}
-BOOL Writer::CopyLocalFileToINet( String& rFileNm )
+sal_Bool Writer::CopyLocalFileToINet( String& rFileNm )
{
if( !pOrigFileName ) // can be happen, by example if we
- return FALSE; // write into the clipboard
+ return sal_False; // write into the clipboard
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
INetURLObject aFileUrl( rFileNm ), aTargetUrl( *pOrigFileName );
// JP 01.11.00: what is the correct question for the portal??
@@ -376,11 +376,11 @@ BOOL Writer::CopyLocalFileToINet( String& rFileNm )
if (m_pImpl->pSrcArr)
{
// wurde die Datei schon verschoben
- USHORT nPos;
+ sal_uInt16 nPos;
if (m_pImpl->pSrcArr->Seek_Entry( &rFileNm, &nPos ))
{
rFileNm = *(*m_pImpl->pDestArr)[ nPos ];
- return TRUE;
+ return sal_True;
}
}
else
@@ -393,8 +393,8 @@ BOOL Writer::CopyLocalFileToINet( String& rFileNm )
String *pDest = new String( aTargetUrl.GetPartBeforeLastName() );
*pDest += String(aFileUrl.GetName());
- SfxMedium aSrcFile( *pSrc, STREAM_READ, FALSE );
- SfxMedium aDstFile( *pDest, STREAM_WRITE | STREAM_SHARE_DENYNONE, FALSE );
+ SfxMedium aSrcFile( *pSrc, STREAM_READ, sal_False );
+ SfxMedium aDstFile( *pDest, STREAM_WRITE | STREAM_SHARE_DENYNONE, sal_False );
*aDstFile.GetOutStream() << *aSrcFile.GetInStream();
@@ -432,11 +432,11 @@ void Writer::PutNumFmtFontsInAttrPool()
const Font* pFont;
const Font* pDefFont = &numfunc::GetDefBulletFont();
// <--
- BOOL bCheck = FALSE;
+ sal_Bool bCheck = sal_False;
- for( USHORT nGet = rListTbl.Count(); nGet; )
+ for( sal_uInt16 nGet = rListTbl.Count(); nGet; )
if( pDoc->IsUsed( *(pRule = rListTbl[ --nGet ] )))
- for( BYTE nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
+ for( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
if( SVX_NUM_CHAR_SPECIAL == (pFmt = &pRule->Get( nLvl ))->GetNumberingType() ||
SVX_NUM_BITMAP == pFmt->GetNumberingType() )
{
@@ -449,7 +449,7 @@ void Writer::PutNumFmtFontsInAttrPool()
continue;
}
else if( *pFont == *pDefFont )
- bCheck = TRUE;
+ bCheck = sal_True;
_AddFontItem( rPool, SvxFontItem( pFont->GetFamily(),
pFont->GetName(), pFont->GetStyleName(),
@@ -457,7 +457,7 @@ void Writer::PutNumFmtFontsInAttrPool()
}
}
-void Writer::PutEditEngFontsInAttrPool( BOOL bIncl_CJK_CTL )
+void Writer::PutEditEngFontsInAttrPool( sal_Bool bIncl_CJK_CTL )
{
SfxItemPool& rPool = pDoc->GetAttrPool();
if( rPool.GetSecondaryPool() )
@@ -479,7 +479,7 @@ void Writer::PutCJKandCTLFontsInAttrPool()
}
-void Writer::_AddFontItems( SfxItemPool& rPool, USHORT nW )
+void Writer::_AddFontItems( SfxItemPool& rPool, sal_uInt16 nW )
{
const SvxFontItem* pFont = (const SvxFontItem*)&rPool.GetDefaultItem( nW );
_AddFontItem( rPool, *pFont );
@@ -534,12 +534,12 @@ void Writer::CreateBookmarkTbl()
// search alle Bookmarks in the range and return it in the Array
-USHORT Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt,
+sal_uInt16 Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt,
xub_StrLen nEnd, SvPtrarr& rArr)
{
ASSERT( !rArr.Count(), "es sind noch Eintraege vorhanden" );
- ULONG nNd = rNd.GetIndex();
+ sal_uLong nNd = rNd.GetIndex();
SvPtrarr* pArr = (m_pImpl->pBkmkNodePos) ?
m_pImpl->pBkmkNodePos->Get( nNd ) : 0;
if( pArr )
@@ -550,7 +550,7 @@ USHORT Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt,
rArr.Insert( pArr, 0 );
else
{
- USHORT n;
+ sal_uInt16 n;
xub_StrLen nCntnt;
for( n = 0; n < pArr->Count(); ++n )
{
@@ -579,13 +579,13 @@ USHORT Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt,
// Storage-spezifisches
-ULONG StgWriter::WriteStream()
+sal_uLong StgWriter::WriteStream()
{
ASSERT( !this, "Schreiben in Streams auf einem Storage?" );
return ERR_SWG_WRITE_ERROR;
}
-ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName )
+sal_uLong StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName )
{
SetStream(0);
pStg = &rStg;
@@ -597,7 +597,7 @@ ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName )
// zum Vergleich auf den akt. Pam sichern
pOrigPam = &rPaM;
- ULONG nRet = WriteStorage();
+ sal_uLong nRet = WriteStorage();
pStg = NULL;
ResetWriter();
@@ -605,7 +605,7 @@ ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName )
return nRet;
}
-ULONG StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& rStg, const String* pFName, SfxMedium* pMedium )
+sal_uLong StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& rStg, const String* pFName, SfxMedium* pMedium )
{
SetStream(0);
pStg = 0;
@@ -618,7 +618,7 @@ ULONG StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& r
// zum Vergleich auf den akt. Pam sichern
pOrigPam = &rPaM;
- ULONG nRet = pMedium ? WriteMedium( *pMedium ) : WriteStorage();
+ sal_uLong nRet = pMedium ? WriteMedium( *pMedium ) : WriteStorage();
pStg = NULL;
ResetWriter();
diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx
index 2809b05c8256..f9ac75b3a5d1 100644
--- a/sw/source/filter/writer/wrt_fn.cxx
+++ b/sw/source/filter/writer/wrt_fn.cxx
@@ -41,7 +41,7 @@
Writer& Out( const SwAttrFnTab pTab, const SfxPoolItem& rHt, Writer & rWrt )
{
- USHORT nId = rHt.Which();
+ sal_uInt16 nId = rHt.Which();
ASSERT( nId < POOLATTR_END && nId >= POOLATTR_BEGIN, "SwAttrFnTab::Out()" );
FnAttrOut pOut;
if( 0 != ( pOut = pTab[ nId - RES_CHRATR_BEGIN] ))
@@ -51,8 +51,8 @@ Writer& Out( const SwAttrFnTab pTab, const SfxPoolItem& rHt, Writer & rWrt )
}
Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt,
- const SfxItemSet& rSet, BOOL bDeep,
- BOOL bTstForDefault )
+ const SfxItemSet& rSet, sal_Bool bDeep,
+ sal_Bool bTstForDefault )
{
// erst die eigenen Attribute ausgeben
const SfxItemPool& rPool = *rSet.GetPool();
@@ -81,7 +81,7 @@ Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt,
else
{
SfxWhichIter aIter( *pSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
if( SFX_ITEM_SET == pSet->GetItemState( nWhich, bDeep, &pItem ) &&
@@ -106,7 +106,7 @@ Writer& Out( const SwNodeFnTab pTab, SwNode& rNode, Writer & rWrt )
if( !pCNd )
return rWrt;
- USHORT nId = RES_TXTNODE;
+ sal_uInt16 nId = RES_TXTNODE;
switch (pCNd->GetNodeType())
{
case ND_TEXTNODE:
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index 9fd6bd3804b5..20c55ac8c48d 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -55,7 +55,7 @@ sal_Int16 SwWriteTableCell::GetVertOri() const
{
const SfxItemSet& rItemSet = pBox->GetFrmFmt()->GetAttrSet();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, sal_False, &pItem ) )
{
sal_Int16 eBoxVertOri =
((const SwFmtVertOrient *)pItem)->GetVertOrient();
@@ -69,7 +69,7 @@ sal_Int16 SwWriteTableCell::GetVertOri() const
//-----------------------------------------------------------------------
-SwWriteTableRow::SwWriteTableRow( long nPosition, BOOL bUseLayoutHeights )
+SwWriteTableRow::SwWriteTableRow( long nPosition, sal_Bool bUseLayoutHeights )
: pBackground(0), nPos(nPosition), mbUseLayoutHeights(bUseLayoutHeights),
nTopBorder(USHRT_MAX), nBottomBorder(USHRT_MAX), bTopBorder(true),
bBottomBorder(true)
@@ -77,8 +77,8 @@ SwWriteTableRow::SwWriteTableRow( long nPosition, BOOL bUseLayoutHeights )
}
SwWriteTableCell *SwWriteTableRow::AddCell( const SwTableBox *pBox,
- USHORT nRow, USHORT nCol,
- USHORT nRowSpan, USHORT nColSpan,
+ sal_uInt16 nRow, sal_uInt16 nCol,
+ sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
long nHeight,
const SvxBrushItem *pBackgroundBrush )
{
@@ -112,8 +112,8 @@ sal_uInt32 SwWriteTable::GetBoxWidth( const SwTableBox *pBox )
long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
{
#ifdef DBG_UTIL
- BOOL bOldGetLineHeightCalled = bGetLineHeightCalled;
- bGetLineHeightCalled = TRUE;
+ sal_Bool bOldGetLineHeightCalled = bGetLineHeightCalled;
+ bGetLineHeightCalled = sal_True;
#endif
long nHeight = 0;
@@ -130,7 +130,7 @@ long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
// to use the layout heights even if one of the rows has a height of 0
// ('hidden' rows)
// <--
- bUseLayoutHeights = bLayoutAvailable; /*FALSE;*/
+ bUseLayoutHeights = bLayoutAvailable; /*sal_False;*/
#ifdef DBG_UTIL
ASSERT( bLayoutAvailable || !bOldGetLineHeightCalled, "Layout ungueltig?" );
@@ -138,9 +138,9 @@ long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
}
const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- USHORT nBoxes = rBoxes.Count();
+ sal_uInt16 nBoxes = rBoxes.Count();
- for( USHORT nBox=0; nBox<nBoxes; nBox++ )
+ for( sal_uInt16 nBox=0; nBox<nBoxes; nBox++ )
{
const SwTableBox* pBox = rBoxes[nBox];
if( pBox->GetSttNd() )
@@ -152,7 +152,7 @@ long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
{
long nTmp = 0;
const SwTableLines &rLines = pBox->GetTabLines();
- for( USHORT nLine=0; nLine<rLines.Count(); nLine++ )
+ for( sal_uInt16 nLine=0; nLine<rLines.Count(); nLine++ )
{
nTmp += GetLineHeight( rLines[nLine] );
}
@@ -176,7 +176,7 @@ long SwWriteTable::GetLineHeight( const SwTableBox *pBox ) const
const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet();
long nHeight = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ))
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, sal_True, &pItem ))
nHeight = ((SwFmtFrmSize*)pItem)->GetHeight();
return nHeight;
@@ -193,7 +193,7 @@ const SvxBrushItem *SwWriteTable::GetLineBrush( const SwTableBox *pBox,
const SfxPoolItem* pItem;
const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet();
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False,
&pItem ) )
{
if( !pLine->GetUpper() )
@@ -215,9 +215,9 @@ const SvxBrushItem *SwWriteTable::GetLineBrush( const SwTableBox *pBox,
void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine,
- BOOL bTable )
+ sal_Bool bTable )
{
- if( (UINT32)-1 == nBorderColor )
+ if( (sal_uInt32)-1 == nBorderColor )
{
Color aGrayColor( COL_GRAY );
if( !pBorderLine->GetColor().IsRGBEqual( aGrayColor ) )
@@ -227,7 +227,7 @@ void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine,
if( !bCollectBorderWidth )
return;
- USHORT nOutWidth = pBorderLine->GetOutWidth();
+ sal_uInt16 nOutWidth = pBorderLine->GetOutWidth();
if( bTable )
{
if( nOutWidth && (!nBorder || nOutWidth < nBorder) )
@@ -239,20 +239,20 @@ void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine,
nInnerBorder = nOutWidth;
}
- USHORT nDist = pBorderLine->GetInWidth() ? pBorderLine->GetDistance()
+ sal_uInt16 nDist = pBorderLine->GetInWidth() ? pBorderLine->GetDistance()
: 0;
if( nDist && (!nCellSpacing || nDist < nCellSpacing) )
nCellSpacing = nDist;
}
-USHORT SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
- USHORT nRow, USHORT nCol,
- USHORT nRowSpan, USHORT nColSpan,
- USHORT& rTopBorder,
- USHORT &rBottomBorder )
+sal_uInt16 SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
+ sal_uInt16 nRow, sal_uInt16 nCol,
+ sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
+ sal_uInt16& rTopBorder,
+ sal_uInt16 &rBottomBorder )
{
- USHORT nBorderMask = 0;
+ sal_uInt16 nBorderMask = 0;
const SwFrmFmt *pFrmFmt = pBox->GetFrmFmt();
const SvxBoxItem& rBoxItem = (const SvxBoxItem&)pFrmFmt->GetFmtAttr( RES_BOX );
@@ -288,7 +288,7 @@ USHORT SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
// boxes.
if( bCollectBorderWidth )
{
- USHORT nDist = rBoxItem.GetDistance( BOX_LINE_TOP );
+ sal_uInt16 nDist = rBoxItem.GetDistance( BOX_LINE_TOP );
if( nDist && (!nCellPadding || nDist < nCellPadding) )
nCellPadding = nDist;
nDist = rBoxItem.GetDistance( BOX_LINE_BOTTOM );
@@ -306,7 +306,7 @@ USHORT SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
}
-sal_uInt32 SwWriteTable::GetRawWidth( USHORT nCol, USHORT nColSpan ) const
+sal_uInt32 SwWriteTable::GetRawWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
sal_uInt32 nWidth = aCols[nCol+nColSpan-1]->GetPos();
if( nCol > 0 )
@@ -315,9 +315,9 @@ sal_uInt32 SwWriteTable::GetRawWidth( USHORT nCol, USHORT nColSpan ) const
return nWidth;
}
-USHORT SwWriteTable::GetLeftSpace( USHORT nCol ) const
+sal_uInt16 SwWriteTable::GetLeftSpace( sal_uInt16 nCol ) const
{
- USHORT nSpace = nCellPadding + nCellSpacing;
+ sal_uInt16 nSpace = nCellPadding + nCellSpacing;
// In der ersten Spalte auch noch die Liniendicke abziehen
if( nCol==0 )
@@ -332,9 +332,9 @@ USHORT SwWriteTable::GetLeftSpace( USHORT nCol ) const
return nSpace;
}
-USHORT SwWriteTable::GetRightSpace( USHORT nCol, USHORT nColSpan ) const
+sal_uInt16 SwWriteTable::GetRightSpace( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
- USHORT nSpace = nCellPadding;
+ sal_uInt16 nSpace = nCellPadding;
// In der letzten Spalte noch einmal zusaetzlich CELLSPACING und
// und die Liniendicke abziehen
@@ -350,7 +350,7 @@ USHORT SwWriteTable::GetRightSpace( USHORT nCol, USHORT nColSpan ) const
return nSpace;
}
-USHORT SwWriteTable::GetAbsWidth( USHORT nCol, USHORT nColSpan ) const
+sal_uInt16 SwWriteTable::GetAbsWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
sal_uInt32 nWidth = GetRawWidth( nCol, nColSpan );
if( nBaseWidth != nTabWidth )
@@ -362,29 +362,29 @@ USHORT SwWriteTable::GetAbsWidth( USHORT nCol, USHORT nColSpan ) const
nWidth -= GetLeftSpace( nCol ) + GetRightSpace( nCol, nColSpan );
ASSERT( nWidth > 0, "Spaltenbreite <= 0. OK?" );
- return nWidth > 0 ? (USHORT)nWidth : 0;
+ return nWidth > 0 ? (sal_uInt16)nWidth : 0;
}
-USHORT SwWriteTable::GetRelWidth( USHORT nCol, USHORT nColSpan ) const
+sal_uInt16 SwWriteTable::GetRelWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
long nWidth = GetRawWidth( nCol, nColSpan );
- return (USHORT)(long)Fraction( nWidth*256 + GetBaseWidth()/2,
+ return (sal_uInt16)(long)Fraction( nWidth*256 + GetBaseWidth()/2,
GetBaseWidth() );
}
-USHORT SwWriteTable::GetPrcWidth( USHORT nCol, USHORT nColSpan ) const
+sal_uInt16 SwWriteTable::GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
long nWidth = GetRawWidth( nCol, nColSpan );
// sieht komisch aus, ist aber nichts anderes als
// [(100 * nWidth) + .5] ohne Rundungsfehler
- return (USHORT)(long)Fraction( nWidth*100 + GetBaseWidth()/2,
+ return (sal_uInt16)(long)Fraction( nWidth*100 + GetBaseWidth()/2,
GetBaseWidth() );
}
-long SwWriteTable::GetAbsHeight( long nRawHeight, USHORT nRow,
- USHORT nRowSpan ) const
+long SwWriteTable::GetAbsHeight( long nRawHeight, sal_uInt16 nRow,
+ sal_uInt16 nRowSpan ) const
{
nRawHeight -= (2*nCellPadding + nCellSpacing);
@@ -412,8 +412,8 @@ long SwWriteTable::GetAbsHeight( long nRawHeight, USHORT nRow,
return nRawHeight > 0 ? nRawHeight : 0;
}
-BOOL SwWriteTable::ShouldExpandSub(const SwTableBox *pBox, BOOL /*bExpandedBefore*/,
- USHORT nDepth) const
+sal_Bool SwWriteTable::ShouldExpandSub(const SwTableBox *pBox, sal_Bool /*bExpandedBefore*/,
+ sal_uInt16 nDepth) const
{
return !pBox->GetSttNd() && nDepth > 0;
}
@@ -423,17 +423,17 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
long nParentLineHeight,
sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
- USHORT nDepth )
+ sal_uInt16 nDepth )
{
- BOOL bSubExpanded = FALSE;
- USHORT nLines = rLines.Count();
+ sal_Bool bSubExpanded = sal_False;
+ sal_uInt16 nLines = rLines.Count();
#ifdef DBG_UTIL
sal_uInt32 nEndCPos = 0;
#endif
long nRPos = nStartRPos;
- for( USHORT nLine = 0; nLine < nLines; nLine++ )
+ for( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
{
/*const*/ SwTableLine *pLine = rLines[nLine];
@@ -449,14 +449,14 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
layout, you may run into this robust code.
It's not allowed that subrows leaves their parentrow. If this would happen the line
height of subrow is reduced to a part of the remaining height */
- ASSERT( FALSE, "Corrupt line height I" );
+ ASSERT( sal_False, "Corrupt line height I" );
nRPos -= nLineHeight;
nLineHeight = nStartRPos + nParentLineHeight - nRPos; // remaining parent height
nLineHeight /= nLines - nLine; // divided through the number of remaining sub rows
nRPos += nLineHeight;
}
SwWriteTableRow *pRow = new SwWriteTableRow( nRPos, bUseLayoutHeights);
- USHORT nRow;
+ sal_uInt16 nRow;
if( aRows.Seek_Entry( pRow, &nRow ) )
delete pRow;
else
@@ -482,10 +482,10 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
// Fuer alle Boxen der Zeile ggf. eine Spalte einfuegen
const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- USHORT nBoxes = rBoxes.Count();
+ sal_uInt16 nBoxes = rBoxes.Count();
sal_uInt32 nCPos = nStartCPos;
- for( USHORT nBox=0; nBox<nBoxes; nBox++ )
+ for( sal_uInt16 nBox=0; nBox<nBoxes; nBox++ )
{
const SwTableBox *pBox = rBoxes[nBox];
@@ -496,7 +496,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
nCPos = nCPos + GetBoxWidth( pBox );
SwWriteTableCol *pCol = new SwWriteTableCol( nCPos );
- USHORT nCol;
+ sal_uInt16 nCol;
if( aCols.Seek_Entry( pCol, &nCol ) )
delete pCol;
else
@@ -542,30 +542,30 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
nCPos - nOldCPos,
pBox->GetTabLines(),
nDepth-1 );
- bSubExpanded = TRUE;
+ bSubExpanded = sal_True;
}
}
}
}
-void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
- sal_uInt32 nStartCPos, USHORT nStartCol,
+void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
+ sal_uInt32 nStartCPos, sal_uInt16 nStartCol,
long nParentLineHeight,
sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
const SvxBrushItem* pParentBrush,
- USHORT nDepth,
+ sal_uInt16 nDepth,
sal_uInt16 nNumOfHeaderRows )
{
- USHORT nLines = rLines.Count();
- BOOL bSubExpanded = FALSE;
+ sal_uInt16 nLines = rLines.Count();
+ sal_Bool bSubExpanded = sal_False;
// Festlegen der Umrandung
long nRPos = nStartRPos;
- USHORT nRow = nStartRow;
+ sal_uInt16 nRow = nStartRow;
- for( USHORT nLine = 0; nLine < nLines; nLine++ )
+ for( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
{
const SwTableLine *pLine = rLines[nLine];
@@ -578,7 +578,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
if( nParentLineHeight && nStartRPos + nParentLineHeight <= nRPos )
{
/* See comment in CollectTableRowCols */
- ASSERT( FALSE, "Corrupt line height II" );
+ ASSERT( sal_False, "Corrupt line height II" );
nRPos -= nLineHeight;
nLineHeight = nStartRPos + nParentLineHeight - nRPos; // remaining parent height
nLineHeight /= nLines - nLine; // divided through the number of remaining sub rows
@@ -589,10 +589,10 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
nRPos = nStartRPos + nParentLineHeight;
// Und ihren Index
- USHORT nOldRow = nRow;
+ sal_uInt16 nOldRow = nRow;
SwWriteTableRow aRow( nRPos,bUseLayoutHeights );
#ifdef DBG_UTIL
- BOOL bFound =
+ sal_Bool bFound =
#endif
aRows.Seek_Entry( &aRow, &nRow );
ASSERT( bFound, "Wo ist die Zeile geblieben?" );
@@ -619,12 +619,12 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet();
long nHeight = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ))
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, sal_True, &pItem ))
nHeight = ((SwFmtFrmSize*)pItem)->GetHeight();
const SvxBrushItem *pBrushItem, *pLineBrush = pParentBrush;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False,
&pItem ) )
{
pLineBrush = (const SvxBrushItem *)pItem;
@@ -632,10 +632,10 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
// Wenn die Zeile die gesamte Tabelle umspannt, koennen
// Wir den Hintergrund an der Zeile ausgeben. Sonst muessen
// wir in an den Zelle ausgeben.
- BOOL bOutAtRow = !nParentLineWidth;
+ sal_Bool bOutAtRow = !nParentLineWidth;
if( !bOutAtRow && nStartCPos==0 )
{
- USHORT nEndCol;
+ sal_uInt16 nEndCol;
SwWriteTableCol aCol( nParentLineWidth );
bOutAtRow = aCols.Seek_Entry(&aCol,&nEndCol) &&
nEndCol == aCols.Count()-1;
@@ -654,11 +654,11 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
pBrushItem = 0;
}
- USHORT nBoxes = rBoxes.Count();
+ sal_uInt16 nBoxes = rBoxes.Count();
sal_uInt32 nCPos = nStartCPos;
- USHORT nCol = nStartCol;
+ sal_uInt16 nCol = nStartCol;
- for( USHORT nBox=0; nBox<nBoxes; nBox++ )
+ for( sal_uInt16 nBox=0; nBox<nBoxes; nBox++ )
{
const SwTableBox *pBox = rBoxes[nBox];
@@ -674,26 +674,26 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
nCPos = nStartCPos + nParentLineWidth;
// Und ihren Index
- USHORT nOldCol = nCol;
+ sal_uInt16 nOldCol = nCol;
SwWriteTableCol aCol( nCPos );
#ifdef DBG_UTIL
- BOOL bFound2 =
+ sal_Bool bFound2 =
#endif
aCols.Seek_Entry( &aCol, &nCol );
ASSERT( bFound2, "Wo ist die Spalte geblieben?" );
if( !ShouldExpandSub( pBox, bSubExpanded, nDepth ) )
{
- USHORT nRowSpan = nRow - nOldRow + 1;
+ sal_uInt16 nRowSpan = nRow - nOldRow + 1;
// The new table model may have true row span attributes
const long nAttrRowSpan = pBox->getRowSpan();
if ( 1 < nAttrRowSpan )
- nRowSpan = (USHORT)nAttrRowSpan;
+ nRowSpan = (sal_uInt16)nAttrRowSpan;
else if ( nAttrRowSpan < 1 )
nRowSpan = 0;
- USHORT nColSpan = nCol - nOldCol + 1;
+ sal_uInt16 nColSpan = nCol - nOldCol + 1;
pRow->AddCell( pBox, nOldRow, nOldCol,
nRowSpan, nColSpan, nHeight,
pBrushItem );
@@ -701,8 +701,8 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
if( pBox->GetSttNd() )
{
- USHORT nTopBorder = USHRT_MAX, nBottomBorder = USHRT_MAX;
- USHORT nBorderMask = MergeBoxBorders(pBox, nOldRow, nOldCol,
+ sal_uInt16 nTopBorder = USHRT_MAX, nBottomBorder = USHRT_MAX;
+ sal_uInt16 nBorderMask = MergeBoxBorders(pBox, nOldRow, nOldCol,
nRowSpan, nColSpan, nTopBorder, nBottomBorder);
// #i30094# add a sanity check here to ensure that
@@ -713,7 +713,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
SwWriteTableCol *pCol = aCols[nOldCol];
ASSERT(pCol, "No TableCol found, panic!");
if (pCol)
- pCol->bLeftBorder = FALSE;
+ pCol->bLeftBorder = sal_False;
}
if (!(nBorderMask & 8))
@@ -721,16 +721,16 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
SwWriteTableCol *pCol = aCols[nCol];
ASSERT(pCol, "No TableCol found, panic!");
if (pCol)
- pCol->bRightBorder = FALSE;
+ pCol->bRightBorder = sal_False;
}
if (!(nBorderMask & 1))
- pRow->bTopBorder = FALSE;
+ pRow->bTopBorder = sal_False;
else if (!pRow->nTopBorder || nTopBorder < pRow->nTopBorder)
pRow->nTopBorder = nTopBorder;
if (!(nBorderMask & 2))
- pEndRow->bBottomBorder = FALSE;
+ pEndRow->bBottomBorder = sal_False;
else if (
!pEndRow->nBottomBorder ||
nBottomBorder < pEndRow->nBottomBorder
@@ -744,10 +744,10 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
// the fill border lines between the columns and rows. (#74222#)
// else
// {
-// aCols[nOldCol]->bLeftBorder = FALSE;
-// aCols[nCol]->bRightBorder = FALSE;
-// pRow->bTopBorder = FALSE;
-// pEndRow->bBottomBorder = FALSE;
+// aCols[nOldCol]->bLeftBorder = sal_False;
+// aCols[nCol]->bRightBorder = sal_False;
+// pRow->bTopBorder = sal_False;
+// pEndRow->bBottomBorder = sal_False;
// }
}
else
@@ -757,7 +757,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
pBox->GetTabLines(),
pLineBrush, nDepth-1,
nNumOfHeaderRows );
- bSubExpanded = TRUE;
+ bSubExpanded = sal_True;
}
nCol++; // Die naechste Zelle faengt in der nachten Spalte an
@@ -768,8 +768,8 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
}
SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth,
- sal_uInt32 nBWidth, BOOL bRel, USHORT nMaxDepth, USHORT nLSub, USHORT nRSub, sal_uInt32 nNumOfRowsToRepeat)
- : nBorderColor((UINT32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
+ sal_uInt32 nBWidth, sal_Bool bRel, sal_uInt16 nMaxDepth, sal_uInt16 nLSub, sal_uInt16 nRSub, sal_uInt32 nNumOfRowsToRepeat)
+ : nBorderColor((sal_uInt32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
nInnerBorder(0), nBaseWidth(nBWidth), nHeadEndRow(USHRT_MAX),
nLeftSub(nLSub), nRightSub(nRSub), nTabWidth(nWidth), bRelWidths(bRel),
bUseLayoutHeights(true),
@@ -796,7 +796,7 @@ SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth,
}
SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
- : nBorderColor((UINT32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
+ : nBorderColor((sal_uInt32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
nInnerBorder(0), nBaseWidth(pLayoutInfo->GetWidthOption()), nHeadEndRow(0),
nLeftSub(0), nRightSub(0), nTabWidth(pLayoutInfo->GetWidthOption()),
bRelWidths(pLayoutInfo->HasPrcWidthOption()), bUseLayoutHeights(false),
@@ -814,9 +814,9 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
nCellSpacing = pLayoutInfo->GetCellSpacing();
}
- USHORT nRow, nCol;
- USHORT nCols = pLayoutInfo->GetColCount();
- USHORT nRows = pLayoutInfo->GetRowCount();
+ sal_uInt16 nRow, nCol;
+ sal_uInt16 nCols = pLayoutInfo->GetColCount();
+ sal_uInt16 nRows = pLayoutInfo->GetRowCount();
// Erstmal die Tabellen-Struktur festlegen.
for( nCol=0; nCol<nCols; nCol++ )
@@ -849,7 +849,7 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
{
SwWriteTableRow *pRow = aRows[nRow];
- BOOL bHeightExported = FALSE;
+ sal_Bool bHeightExported = sal_False;
for( nCol=0; nCol<nCols; nCol++ )
{
const SwHTMLTableLayoutCell *pLayoutCell =
@@ -868,8 +868,8 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
continue;
}
- USHORT nRowSpan = pLayoutCell->GetRowSpan();
- USHORT nColSpan = pLayoutCell->GetColSpan();
+ sal_uInt16 nRowSpan = pLayoutCell->GetRowSpan();
+ sal_uInt16 nColSpan = pLayoutCell->GetColSpan();
const SwTableBox *pBox = pLayoutCnts->GetTableBox();
ASSERT( pBox,
"Tabelle in Tabelle kann nicht ueber Layout exportiert werden" );
@@ -883,29 +883,29 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
pCell->SetWidthOpt( pLayoutCell->GetWidthOption(),
pLayoutCell->IsPrcWidthOption() );
- USHORT nTopBorder = USHRT_MAX, nBottomBorder = USHRT_MAX;
- USHORT nBorderMask =
+ sal_uInt16 nTopBorder = USHRT_MAX, nBottomBorder = USHRT_MAX;
+ sal_uInt16 nBorderMask =
MergeBoxBorders( pBox, nRow, nCol, nRowSpan, nColSpan,
nTopBorder, nBottomBorder );
SwWriteTableCol *pCol = aCols[nCol];
if( !(nBorderMask & 4) )
- pCol->bLeftBorder = FALSE;
+ pCol->bLeftBorder = sal_False;
pCol = aCols[nCol+nColSpan-1];
if( !(nBorderMask & 8) )
- pCol->bRightBorder = FALSE;
+ pCol->bRightBorder = sal_False;
if( !(nBorderMask & 1) )
- pRow->bTopBorder = FALSE;
+ pRow->bTopBorder = sal_False;
SwWriteTableRow *pEndRow = aRows[nRow+nRowSpan-1];
if( !(nBorderMask & 2) )
- pEndRow->bBottomBorder = FALSE;
+ pEndRow->bBottomBorder = sal_False;
// Die Hoehe braucht nur einmal geschieben werden
if( nHeight )
- bHeightExported = TRUE;
+ bHeightExported = sal_True;
}
}
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index 2cf1ca325a5b..cc59490db8fd 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -77,7 +77,7 @@
using namespace com::sun::star;
-static SwCntntNode* GetCntntNode(SwDoc* pDoc, SwNodeIndex& rIdx, BOOL bNext)
+static SwCntntNode* GetCntntNode(SwDoc* pDoc, SwNodeIndex& rIdx, sal_Bool bNext)
{
SwCntntNode* pCNd = pDoc->GetNodes()[ rIdx ]->GetCntntNode();
if(!pCNd && 0 == (pCNd = bNext ? pDoc->GetNodes().GoNext(&rIdx)
@@ -98,10 +98,10 @@ SwFltStackEntry::SwFltStackEntry(const SwPosition& rStartPos, SfxPoolItem* pHt )
// Anfang vom Bereich merken
nMkCntnt = rStartPos.nContent.GetIndex();
pAttr = pHt; // speicher eine Kopie vom Attribut
- bOld = FALSE; // used for marking Attributes *before* skipping field results
- bLocked = TRUE; // locke das Attribut --> darf erst
- bCopied = FALSE; // gesetzt werden, wenn es wieder geunlocked ist
- bConsumedByField = FALSE;
+ bOld = sal_False; // used for marking Attributes *before* skipping field results
+ bLocked = sal_True; // locke das Attribut --> darf erst
+ bCopied = sal_False; // gesetzt werden, wenn es wieder geunlocked ist
+ bConsumedByField = sal_False;
}
SwFltStackEntry::SwFltStackEntry(const SwFltStackEntry& rEntry) :
@@ -111,7 +111,7 @@ SwFltStackEntry::SwFltStackEntry(const SwFltStackEntry& rEntry) :
pAttr = rEntry.pAttr->Clone();
nMkCntnt= rEntry.nMkCntnt;
bOld = rEntry.bOld;
- bLocked = bCopied = TRUE; // when rEntry were NOT bLocked we would never have been called
+ bLocked = bCopied = sal_True; // when rEntry were NOT bLocked we would never have been called
bConsumedByField = rEntry.bConsumedByField;
}
@@ -126,16 +126,16 @@ SwFltStackEntry::~SwFltStackEntry()
void SwFltStackEntry::SetEndPos(const SwPosition& rEndPos)
{
// Attribut freigeben und das Ende merken.
- // Alles mit USHORT's, weil sonst beim Einfuegen von neuem Text an der
+ // Alles mit sal_uInt16's, weil sonst beim Einfuegen von neuem Text an der
// Cursor-Position auch der Bereich vom Attribut weiter
// verschoben wird.
// Das ist aber nicht das gewollte!
- bLocked = FALSE; // freigeben und das ENDE merken
+ bLocked = sal_False; // freigeben und das ENDE merken
nPtNode = rEndPos.nNode.GetIndex()-1;
nPtCntnt = rEndPos.nContent.GetIndex();
}
-BOOL SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, BOOL bCheck )
+sal_Bool SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, sal_Bool bCheck )
{
// wird ueberhaupt ein Bereich umspannt ??
// - ist kein Bereich, dann nicht returnen wenn am Anfang vom Absatz
@@ -145,33 +145,33 @@ BOOL SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, BOOL bCheck )
nPtCntnt && RES_TXTATR_FIELD != pAttr->Which()
)
{
- return FALSE;
+ return sal_False;
}
// !!! Die Content-Indizies beziehen sich immer auf den Node !!!
rRegion.GetPoint()->nNode = nMkNode.GetIndex() + 1;
- SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, TRUE);
+ SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, sal_True);
rRegion.GetPoint()->nContent.Assign(pCNd, nMkCntnt);
rRegion.SetMark();
if( nMkNode != nPtNode )
{
rRegion.GetPoint()->nNode = nPtNode.GetIndex() + 1;
- pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, FALSE);
+ pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, sal_False);
}
rRegion.GetPoint()->nContent.Assign(pCNd, nPtCntnt);
#if OSL_DEBUG_LEVEL > 1
ASSERT( CheckNodesRange( rRegion.Start()->nNode,
- rRegion.End()->nNode, TRUE ),
+ rRegion.End()->nNode, sal_True ),
"Attribut oder AEhnliches ueber Bereichs-Grenzen" );
#endif
if( bCheck )
return CheckNodesRange( rRegion.Start()->nNode,
- rRegion.End()->nNode, TRUE );
+ rRegion.End()->nNode, sal_True );
else
- return TRUE;
+ return sal_True;
}
-SwFltControlStack::SwFltControlStack(SwDoc* pDo, ULONG nFieldFl)
+SwFltControlStack::SwFltControlStack(SwDoc* pDo, sal_uLong nFieldFl)
: nFieldFlags(nFieldFl), pDoc(pDo), bIsEndStack(false)
{
}
@@ -192,12 +192,12 @@ SwFltControlStack::~SwFltControlStack()
// nach rechts verschoben werden.
void SwFltControlStack::MoveAttrs( const SwPosition& rPos )
{
- USHORT nCnt = static_cast< USHORT >(Count());
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
SwFltStackEntry* pEntry;
- ULONG nPosNd = rPos.nNode.GetIndex();
- USHORT nPosCt = rPos.nContent.GetIndex() - 1;
+ sal_uLong nPosNd = rPos.nNode.GetIndex();
+ sal_uInt16 nPosCt = rPos.nContent.GetIndex() - 1;
- for (USHORT i=0; i < nCnt; i++){
+ for (sal_uInt16 i=0; i < nCnt; i++){
pEntry = (*this)[ i ];
if(( pEntry->nMkNode.GetIndex() + 1 == nPosNd )
&&( pEntry->nMkCntnt >= nPosCt )){
@@ -218,15 +218,15 @@ void SwFltControlStack::MoveAttrs( const SwPosition& rPos )
void SwFltControlStack::MarkAllAttrsOld()
{
- USHORT nCnt = static_cast< USHORT >(Count());
- for (USHORT i=0; i < nCnt; i++)
- (*this)[ i ]->bOld = TRUE;
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
+ for (sal_uInt16 i=0; i < nCnt; i++)
+ (*this)[ i ]->bOld = sal_True;
}
void SwFltControlStack::NewAttr(const SwPosition& rPos, const SfxPoolItem & rAttr )
{
SwFltStackEntry *pTmp = new SwFltStackEntry(rPos, rAttr.Clone() );
- USHORT nWhich = pTmp->pAttr->Which();
+ sal_uInt16 nWhich = pTmp->pAttr->Which();
SetAttr(rPos, nWhich);// Ende von evtl. gleichen Attributen auf dem Stack
// Setzen, damit sich die Attribute nicht auf
// dem Stack haeufen
@@ -249,9 +249,9 @@ void SwFltControlStack::DeleteAndDestroy(Entries::size_type nCnt)
// Damit erscheinen sie nicht in der Doc-Struktur. Dabei werden nur die
// Attribute entfernt, die im selben Absatz wie pPos stehen.
// Wird fuer Grafik-Apos -> Grafiken benutzt.
-void SwFltControlStack::StealAttr(const SwPosition* pPos, USHORT nAttrId /* = 0 */)
+void SwFltControlStack::StealAttr(const SwPosition* pPos, sal_uInt16 nAttrId /* = 0 */)
{
- USHORT nCnt = static_cast< USHORT >(Count());
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
SwFltStackEntry* pEntry;
@@ -273,9 +273,9 @@ void SwFltControlStack::StealAttr(const SwPosition* pPos, USHORT nAttrId /* = 0
void SwFltControlStack::KillUnlockedAttrs(const SwPosition& pPos)
{
SwNodeIndex aAktNode( pPos.nNode, -1 );
- USHORT nAktIdx = pPos.nContent.GetIndex();
+ sal_uInt16 nAktIdx = pPos.nContent.GetIndex();
- USHORT nCnt = static_cast< USHORT >(Count());
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
SwFltStackEntry* pEntry;
while( nCnt )
{
@@ -297,19 +297,19 @@ void SwFltControlStack::KillUnlockedAttrs(const SwPosition& pPos)
// alle anderen im Document setzen und wieder aus dem Stack loeschen
// Returned, ob das gesuchte Attribut / die gesuchten Attribute
// ueberhaupt auf dem Stack standen
-void SwFltControlStack::SetAttr(const SwPosition& rPos, USHORT nAttrId,
- BOOL bTstEnde, long nHand, BOOL consumedByField )
+void SwFltControlStack::SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId,
+ sal_Bool bTstEnde, long nHand, sal_Bool consumedByField )
{
ASSERT(!nAttrId ||
(POOLATTR_BEGIN <= nAttrId && POOLATTR_END > nAttrId) ||
(RES_FLTRATTR_BEGIN <= nAttrId && RES_FLTRATTR_END > nAttrId),
"Falsche Id fuers Attribut")
- USHORT nCnt = static_cast< USHORT >(Count());
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
SwFltStackEntry* pEntry;
- for (USHORT i=0; i < nCnt; i++)
+ for (sal_uInt16 i=0; i < nCnt; i++)
{
pEntry = (*this)[ i ];
if (pEntry->bLocked)
@@ -357,7 +357,7 @@ static void MakePoint(SwFltStackEntry* pEntry, SwDoc* pDoc, SwPaM& rRegion)
// gesetzt werden.
rRegion.DeleteMark();
rRegion.GetPoint()->nNode = pEntry->nMkNode.GetIndex() + 1;
- SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, TRUE);
+ SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, sal_True);
rRegion.GetPoint()->nContent.Assign(pCNd, pEntry->nMkCntnt);
}
@@ -365,11 +365,11 @@ static void MakePoint(SwFltStackEntry* pEntry, SwDoc* pDoc, SwPaM& rRegion)
// Beschraenkungen von Bookmarks in Tabellen werden beachtet.
// ( Anfang und Ende muessen in selber Zelle sein )
static void MakeBookRegionOrPoint(SwFltStackEntry* pEntry, SwDoc* pDoc,
- SwPaM& rRegion, BOOL bCheck )
+ SwPaM& rRegion, sal_Bool bCheck )
{
if (pEntry->MakeRegion(pDoc, rRegion, bCheck )){
const SwNodes& rNds = pDoc->GetNodes();
-// BOOL b1 = rNds[rRegion.GetPoint()->nNode]->FindTableNode() != 0;
+// sal_Bool b1 = rNds[rRegion.GetPoint()->nNode]->FindTableNode() != 0;
// const SwStartNode* p1 = rNds[rRegion.GetPoint()->nNode]->FindTableBoxStartNode();
// const SwStartNode* p2 = rNds[rRegion.GetMark()->nNode]->FindTableBoxStartNode();
if( rNds[rRegion.GetPoint()->nNode]->FindTableBoxStartNode()
@@ -383,8 +383,8 @@ static void MakeBookRegionOrPoint(SwFltStackEntry* pEntry, SwDoc* pDoc,
}
#if OSL_DEBUG_LEVEL > 1
-extern BOOL CheckNodesRange( const SwNodeIndex& rStt,
- const SwNodeIndex& rEnd, BOOL bChkSection );
+extern sal_Bool CheckNodesRange( const SwNodeIndex& rStt,
+ const SwNodeIndex& rEnd, sal_Bool bChkSection );
#endif
// IterateNumrulePiece() sucht von rTmpStart bis rEnd den ersten
@@ -395,8 +395,8 @@ extern BOOL CheckNodesRange( const SwNodeIndex& rStt,
// rTmpStart ist ReinRaus-Parameter: Anfang des zu untersuchenden Bereiches rein,
// Anfang des gueltigen Bereichs raus
// rTmpEnd ist raus-Parameter
-// Return-Bool ist TRUE fuer gueltigen Bereich
-static BOOL IterateNumrulePiece( const SwNodeIndex& rEnd,
+// Return-Bool ist sal_True fuer gueltigen Bereich
+static sal_Bool IterateNumrulePiece( const SwNodeIndex& rEnd,
SwNodeIndex& rTmpStart, SwNodeIndex& rTmpEnd )
{
while( ( rTmpStart <= rEnd )
@@ -450,7 +450,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
SwNumRule* pRul = pDoc->FindNumRulePtr( rNumNm );
if( pRul )
{
- if( pEntry->MakeRegion(pDoc, aRegion, TRUE))
+ if( pEntry->MakeRegion(pDoc, aRegion, sal_True))
{
SwNodeIndex aTmpStart( aRegion.Start()->nNode );
SwNodeIndex aTmpEnd( aTmpStart );
@@ -485,7 +485,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
if (pB->IsPgRef() && !pB->IsRef())
{
// XRefs und Bookmarks sind bereits geUpcased
- MakeBookRegionOrPoint(pEntry, pDoc, aRegion, TRUE);
+ MakeBookRegionOrPoint(pEntry, pDoc, aRegion, sal_True);
pDoc->InsertPoolItem(aRegion, SwFmtRefMark(rName), 0);
}
else if( !pB->IsOnlyRef() )
@@ -507,7 +507,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
if( !pB->IsOnlyRef() &&
( !IsFlagSet(HYPO) || IsFlagSet(BOOK_AND_REF) ) && !pEntry->bConsumedByField)
{
- MakeBookRegionOrPoint(pEntry, pDoc, aRegion, TRUE);
+ MakeBookRegionOrPoint(pEntry, pDoc, aRegion, sal_True);
pDoc->getIDocumentMarkAccess()->makeMark( aRegion, rName, IDocumentMarkAccess::BOOKMARK);
}
}
@@ -534,13 +534,13 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
if( pSet )
{
if( !pTOXAttr->HadBreakItem()
- && SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE, &pItem ) )
+ && SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pItem ) )
{
aBkSet.Put( *pItem );
pNd->ResetAttr( RES_BREAK );
}
if( !pTOXAttr->HadPageDescItem()
- && SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, FALSE, &pItem ) )
+ && SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, sal_False, &pItem ) )
{
aBkSet.Put( *pItem );
pNd->ResetAttr( RES_PAGEDESC );
@@ -565,7 +565,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
break;
case RES_FLTR_REDLINE:
{
- if (pEntry->MakeRegion(pDoc, aRegion, TRUE))
+ if (pEntry->MakeRegion(pDoc, aRegion, sal_True))
{
pDoc->SetRedlineMode((RedlineMode_t)( nsRedlineMode_t::REDLINE_ON
| nsRedlineMode_t::REDLINE_SHOW_INSERT
@@ -596,7 +596,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
}
break;
default:
- if (pEntry->MakeRegion(pDoc, aRegion, FALSE))
+ if (pEntry->MakeRegion(pDoc, aRegion, sal_False))
{
pDoc->InsertPoolItem(aRegion, *pEntry->pAttr, 0);
}
@@ -604,10 +604,10 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
}
}
-SfxPoolItem* SwFltControlStack::GetFmtStackAttr(USHORT nWhich, USHORT * pPos)
+SfxPoolItem* SwFltControlStack::GetFmtStackAttr(sal_uInt16 nWhich, sal_uInt16 * pPos)
{
SwFltStackEntry* pEntry;
- USHORT nSize = static_cast< USHORT >(Count());
+ sal_uInt16 nSize = static_cast< sal_uInt16 >(Count());
while (nSize)
{
@@ -624,7 +624,7 @@ SfxPoolItem* SwFltControlStack::GetFmtStackAttr(USHORT nWhich, USHORT * pPos)
return 0;
}
-const SfxPoolItem* SwFltControlStack::GetFmtAttr(const SwPosition& rPos, USHORT nWhich)
+const SfxPoolItem* SwFltControlStack::GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich)
{
SfxPoolItem* pHt = GetFmtStackAttr(nWhich);
if (pHt)
@@ -647,16 +647,16 @@ void SwFltControlStack::Delete(const SwPaM &rPam)
return;
SwNodeIndex aStartNode(pStt->nNode, -1);
- USHORT nStartIdx = pStt->nContent.GetIndex();
+ sal_uInt16 nStartIdx = pStt->nContent.GetIndex();
SwNodeIndex aEndNode(pEnd->nNode, -1);
- USHORT nEndIdx = pEnd->nContent.GetIndex();
+ sal_uInt16 nEndIdx = pEnd->nContent.GetIndex();
//We don't support deleting content that is over one node, or removing a node.
ASSERT(aEndNode == aStartNode, "nodes must be the same, or this method extended");
if (aEndNode != aStartNode)
return;
- for (USHORT nSize = static_cast< USHORT >(Count()); nSize > 0;)
+ for (sal_uInt16 nSize = static_cast< sal_uInt16 >(Count()); nSize > 0;)
{
SwFltStackEntry* pEntry = (*this)[--nSize];
@@ -806,9 +806,9 @@ SfxPoolItem* SwFltRedline::Clone( SfxItemPool* ) const
//------ hier stehen die Methoden von SwFltBookmark -----------
SwFltBookmark::SwFltBookmark( const String& rNa, const String& rVa,
- long nHand, BOOL bOnlyR )
+ long nHand, sal_Bool bOnlyR )
: SfxPoolItem(RES_FLTR_BOOKMARK), nHandle(nHand), aName(rNa), aVal(rVa),
- bOnlyRef(bOnlyR), bRef(FALSE), bPgRef(FALSE)
+ bOnlyRef(bOnlyR), bRef(sal_False), bPgRef(sal_False)
{
// eSrc: CHARSET_DONTKNOW fuer keine UEbersetzung bei operator <<
// Upcase wird immer gemacht.
@@ -841,9 +841,9 @@ SfxPoolItem* SwFltBookmark::Clone(SfxItemPool*) const
//------ hier stehen die Methoden von SwFltTOX -----------
-SwFltTOX::SwFltTOX(SwTOXBase* pBase, USHORT _nCols)
+SwFltTOX::SwFltTOX(SwTOXBase* pBase, sal_uInt16 _nCols)
: SfxPoolItem(RES_FLTR_TOX), pTOXBase(pBase), nCols( _nCols ),
- bHadBreakItem( FALSE ), bHadPageDescItem( FALSE )
+ bHadBreakItem( sal_False ), bHadPageDescItem( sal_False )
{
}
@@ -896,7 +896,7 @@ SfxPoolItem* __EXPORT SwFltSection::Clone(SfxItemPool*) const
//
//////////////////////////////////////////////////////////// SwFltShell
-SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bNew, ULONG nFieldFl) :
+SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, sal_Bool bNew, sal_uLong nFieldFl) :
pCurrentPageDesc(0),
pSavedPos(0),
eSubMode(None),
@@ -908,8 +908,8 @@ SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bN
nPageDescOffset(GetDoc().GetPageDescCnt()),
eSrcCharSet(RTL_TEXTENCODING_MS_1252),
bNewDoc(bNew),
- bStdPD(FALSE),
- bProtect(FALSE)
+ bStdPD(sal_False),
+ bProtect(sal_False)
{
memset( pColls, 0, sizeof( pColls ) );
pOutDoc = new SwFltOutDoc( *pDoc, pPaM, aStack, aEndStack );
@@ -920,7 +920,7 @@ SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bN
// evtl. Zeilen eingefuegt / aufgebrochen werden
const SwPosition* pPos = pPaM->GetPoint();
const SwTxtNode* pSttNd = pPos->nNode.GetNode().GetTxtNode();
- USHORT nCntPos = pPos->nContent.GetIndex();
+ sal_uInt16 nCntPos = pPos->nContent.GetIndex();
if( nCntPos && pSttNd->GetTxt().Len() )
// EinfuegePos nicht in leerer Zeile
pDoc->SplitNode( *pPos, false ); // neue Zeile erzeugen
@@ -930,8 +930,8 @@ SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bN
}
// verhinder das Einlesen von Tabellen in Fussnoten / Tabellen
- ULONG nNd = pPos->nNode.GetIndex();
- BOOL bReadNoTbl = 0 != pSttNd->FindTableNode() ||
+ sal_uLong nNd = pPos->nNode.GetIndex();
+ sal_Bool bReadNoTbl = 0 != pSttNd->FindTableNode() ||
( nNd < pDoc->GetNodes().GetEndOfInserts().GetIndex() &&
pDoc->GetNodes().GetEndOfInserts().StartOfSectionIndex() < nNd );
if( bReadNoTbl )
@@ -944,7 +944,7 @@ SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bN
SwFltShell::~SwFltShell()
{
- USHORT i;
+ sal_uInt16 i;
if (eSubMode == Style)
EndStyle();
@@ -954,11 +954,11 @@ SwFltShell::~SwFltShell()
EndFly();
GetDoc().SetUpdateExpFldStat(true);
- GetDoc().SetInitDBFields(TRUE);
- aStack.SetAttr(*pPaM->GetPoint(), 0, FALSE);
- aStack.SetAttr(*pPaM->GetPoint(), 0, FALSE);
- aEndStack.SetAttr(*pPaM->GetPoint(), 0, FALSE);
- aEndStack.SetAttr(*pPaM->GetPoint(), 0, FALSE);
+ GetDoc().SetInitDBFields(sal_True);
+ aStack.SetAttr(*pPaM->GetPoint(), 0, sal_False);
+ aStack.SetAttr(*pPaM->GetPoint(), 0, sal_False);
+ aEndStack.SetAttr(*pPaM->GetPoint(), 0, sal_False);
+ aEndStack.SetAttr(*pPaM->GetPoint(), 0, sal_False);
if( bProtect ){ // Das ganze Doc soll geschuetzt sein
SwDoc& rDoc = GetDoc();
@@ -980,7 +980,7 @@ SwFltShell::~SwFltShell()
if( !IsFlagSet(SwFltControlStack::DONT_HARD_PROTECT) ){
SwDocShell* pDocSh = rDoc.GetDocShell();
if( pDocSh )
- pDocSh->SetReadOnlyUI( TRUE );
+ pDocSh->SetReadOnlyUI( sal_True );
}
}
// Pagedescriptoren am Dokument updaten (nur so werden auch die
@@ -1019,7 +1019,7 @@ void SwFltShell::ConvertUStr( String& rInOut )
String SwFltShell::QuoteStr( const String& rIn )
{
String sOut( rIn );
- BOOL bAllowCr = aStack.IsFlagSet( SwFltControlStack::ALLOW_FLD_CR );
+ sal_Bool bAllowCr = aStack.IsFlagSet( SwFltControlStack::ALLOW_FLD_CR );
for( xub_StrLen n = 0; n < sOut.Len(); ++n )
{
@@ -1114,7 +1114,7 @@ SwFltShell& SwFltShell::AddGraphic( const String& rPicName )
return *this;
}
-SwFltShell& SwFltShell::SetStyle( USHORT nStyle )
+SwFltShell& SwFltShell::SetStyle( sal_uInt16 nStyle )
{
SwFltFormatCollection* p = pColls[ nStyle ];
@@ -1132,7 +1132,7 @@ SwFltShell& SwFltShell::SetStyle( USHORT nStyle )
}
else
{
- ASSERT( FALSE, "Ungueltiger SwFltStyleCode" );
+ ASSERT( sal_False, "Ungueltiger SwFltStyleCode" );
}
return *this;
}
@@ -1147,15 +1147,15 @@ SwFltShell& SwFltShell::operator << (SwFltBookmark& aBook)
void SwFltShell::SetBookEnd(long nHandle)
{
- aEndStack.SetAttr( *pPaM->GetPoint(), RES_FLTR_BOOKMARK, TRUE, nHandle );
+ aEndStack.SetAttr( *pPaM->GetPoint(), RES_FLTR_BOOKMARK, sal_True, nHandle );
}
-SwFltShell& SwFltShell::EndItem( USHORT nAttrId )
+SwFltShell& SwFltShell::EndItem( sal_uInt16 nAttrId )
{
switch( nAttrId )
{
case RES_FLTR_BOOKMARK:
- ASSERT( FALSE, "Falscher Aufruf fuer Bookmark-Ende" );
+ ASSERT( sal_False, "Falscher Aufruf fuer Bookmark-Ende" );
break;
case RES_FLTR_TOX:
@@ -1188,12 +1188,12 @@ SwFltShell& SwFltShell::operator << (const SwField& rField)
return *this;
}
-const SfxPoolItem& SwFltOutDoc::GetAttr(USHORT nWhich)
+const SfxPoolItem& SwFltOutDoc::GetAttr(sal_uInt16 nWhich)
{
return *rStack.GetFmtAttr(*pPaM->GetPoint(), nWhich);
}
-const SfxPoolItem& SwFltFormatCollection::GetAttr(USHORT nWhich)
+const SfxPoolItem& SwFltFormatCollection::GetAttr(sal_uInt16 nWhich)
{
return GetColl()->GetFmtAttr(nWhich); // mit Parents
}
@@ -1203,7 +1203,7 @@ const SfxPoolItem& SwFltFormatCollection::GetAttr(USHORT nWhich)
// sonst aus dem Node mit Parents
// Im Stack wird nicht nachgesehen
-const SfxPoolItem& SwFltOutDoc::GetNodeOrStyAttr(USHORT nWhich)
+const SfxPoolItem& SwFltOutDoc::GetNodeOrStyAttr(sal_uInt16 nWhich)
{
SwCntntNode * pNd = GetDoc().GetNodes()[ pPaM->GetPoint()->nNode ]
->GetCntntNode();
@@ -1213,61 +1213,61 @@ const SfxPoolItem& SwFltOutDoc::GetNodeOrStyAttr(USHORT nWhich)
return GetDoc().GetAttrPool().GetDefaultItem(nWhich);
}
-const SfxPoolItem& SwFltFormatCollection::GetNodeOrStyAttr(USHORT nWhich)
+const SfxPoolItem& SwFltFormatCollection::GetNodeOrStyAttr(sal_uInt16 nWhich)
{
return GetColl()->GetFmtAttr(nWhich); // mit Parents
}
-const SfxPoolItem& SwFltShell::GetNodeOrStyAttr(USHORT nWhich)
+const SfxPoolItem& SwFltShell::GetNodeOrStyAttr(sal_uInt16 nWhich)
{
return pOut->GetNodeOrStyAttr( nWhich );
}
-const SfxPoolItem& SwFltShell::GetAttr(USHORT nWhich)
+const SfxPoolItem& SwFltShell::GetAttr(sal_uInt16 nWhich)
{
return pOut->GetAttr( nWhich );
}
-const SfxPoolItem& SwFltShell::GetFlyFrmAttr(USHORT nWhich)
+const SfxPoolItem& SwFltShell::GetFlyFrmAttr(sal_uInt16 nWhich)
{
return pOut->GetFlyFrmAttr( nWhich );
}
-SwFieldType* SwFltShell::GetSysFldType(USHORT eWhich)
+SwFieldType* SwFltShell::GetSysFldType(sal_uInt16 eWhich)
{
return GetDoc().GetSysFldType(eWhich);
}
-BOOL SwFltShell::GetWeightBold()
+sal_Bool SwFltShell::GetWeightBold()
{
return ((SvxWeightItem&)GetNodeOrStyAttr(RES_CHRATR_WEIGHT)).GetWeight()
!= WEIGHT_NORMAL;
}
-BOOL SwFltShell::GetPostureItalic()
+sal_Bool SwFltShell::GetPostureItalic()
{
return ((SvxPostureItem&)GetNodeOrStyAttr(RES_CHRATR_POSTURE)).GetPosture()
!= ITALIC_NONE;
}
-BOOL SwFltShell::GetCrossedOut()
+sal_Bool SwFltShell::GetCrossedOut()
{
return ((SvxCrossedOutItem&)GetNodeOrStyAttr(RES_CHRATR_CROSSEDOUT))
.GetStrikeout() != STRIKEOUT_NONE;
}
-BOOL SwFltShell::GetContour()
+sal_Bool SwFltShell::GetContour()
{
return ((SvxContourItem&)GetNodeOrStyAttr(RES_CHRATR_CONTOUR)).GetValue();
}
-BOOL SwFltShell::GetCaseKapitaelchen()
+sal_Bool SwFltShell::GetCaseKapitaelchen()
{
return ((SvxCaseMapItem&)GetNodeOrStyAttr(RES_CHRATR_CASEMAP))
.GetCaseMap() == SVX_CASEMAP_KAPITAELCHEN;
}
-BOOL SwFltShell::GetCaseVersalien()
+sal_Bool SwFltShell::GetCaseVersalien()
{
return ((SvxCaseMapItem&)GetNodeOrStyAttr(RES_CHRATR_CASEMAP))
.GetCaseMap() == SVX_CASEMAP_VERSALIEN;
@@ -1286,103 +1286,103 @@ SwFltOutBase::SwFltOutBase(SwDoc& rDocu)
{
}
-const SfxPoolItem& SwFltOutBase::GetCellAttr(USHORT nWhich)
+const SfxPoolItem& SwFltOutBase::GetCellAttr(sal_uInt16 nWhich)
{
- ASSERT(FALSE, "GetCellAttr ausserhalb von normalem Text");
+ ASSERT(sal_False, "GetCellAttr ausserhalb von normalem Text");
return GetDoc().GetAttrPool().GetDefaultItem(nWhich);
}
-BOOL SwFltOutBase::BeginTable()
+sal_Bool SwFltOutBase::BeginTable()
{
- ASSERT(FALSE, "BeginTable ausserhalb von normalem Text");
- return FALSE;
+ ASSERT(sal_False, "BeginTable ausserhalb von normalem Text");
+ return sal_False;
}
void SwFltOutBase::NextTableCell()
{
- ASSERT(FALSE, "NextTableCell ausserhalb von normalem Text");
+ ASSERT(sal_False, "NextTableCell ausserhalb von normalem Text");
}
void SwFltOutBase::NextTableRow()
{
- ASSERT(FALSE, "NextTableRow ausserhalb von normalem Text");
+ ASSERT(sal_False, "NextTableRow ausserhalb von normalem Text");
}
void SwFltOutBase::SetTableWidth(SwTwips /*nW*/)
{
- ASSERT(FALSE, "SetTableWidth ausserhalb von normalem Text");
+ ASSERT(sal_False, "SetTableWidth ausserhalb von normalem Text");
}
void SwFltOutBase::SetTableOrient(sal_Int16 /*eOri*/)
{
- ASSERT(FALSE, "SetTableOrient ausserhalb von normalem Text");
+ ASSERT(sal_False, "SetTableOrient ausserhalb von normalem Text");
}
-void SwFltOutBase::SetCellWidth(SwTwips /*nWidth*/, USHORT /*nCell*/)
+void SwFltOutBase::SetCellWidth(SwTwips /*nWidth*/, sal_uInt16 /*nCell*/)
{
- ASSERT(FALSE, "SetCellWidth ausserhalb von normalem Text");
+ ASSERT(sal_False, "SetCellWidth ausserhalb von normalem Text");
}
void SwFltOutBase::SetCellHeight(SwTwips /*nH*/)
{
- ASSERT(FALSE, "SetCellHeight ausserhalb von normalem Text");
+ ASSERT(sal_False, "SetCellHeight ausserhalb von normalem Text");
}
-void SwFltOutBase::SetCellBorder(const SvxBoxItem& /*rFmtBox*/, USHORT /*nCell*/)
+void SwFltOutBase::SetCellBorder(const SvxBoxItem& /*rFmtBox*/, sal_uInt16 /*nCell*/)
{
- ASSERT(FALSE, "SetCellBorder ausserhalb von normalem Text");
+ ASSERT(sal_False, "SetCellBorder ausserhalb von normalem Text");
}
-void SwFltOutBase::SetCellSpace(USHORT /*nSp*/)
+void SwFltOutBase::SetCellSpace(sal_uInt16 /*nSp*/)
{
- ASSERT(FALSE, "SetCellSpace ausserhalb von normalem Text");
+ ASSERT(sal_False, "SetCellSpace ausserhalb von normalem Text");
}
-void SwFltOutBase::DeleteCell(USHORT /*nCell*/)
+void SwFltOutBase::DeleteCell(sal_uInt16 /*nCell*/)
{
- ASSERT(FALSE, "DeleteCell ausserhalb von normalem Text");
+ ASSERT(sal_False, "DeleteCell ausserhalb von normalem Text");
}
void SwFltOutBase::EndTable()
{
- ASSERT(FALSE, "EndTable ausserhalb von normalem Text");
+ ASSERT(sal_False, "EndTable ausserhalb von normalem Text");
}
-/*virtual*/ BOOL SwFltOutDoc::IsInTable()
+/*virtual*/ sal_Bool SwFltOutDoc::IsInTable()
{
return pTable != 0;
};
-BOOL SwFltOutDoc::BeginTable()
+sal_Bool SwFltOutDoc::BeginTable()
{
if(bReadNoTbl)
- return FALSE;
+ return sal_False;
if (pTable){
- ASSERT(FALSE, "BeginTable in Table");
- return FALSE;
+ ASSERT(sal_False, "BeginTable in Table");
+ return sal_False;
}
// Alle Attribute schliessen, da sonst Attribute
// entstehen koennen, die in Flys reinragen
- rStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
- rEndStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
+ rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// create table:
ASSERT(pTabSavedPos == NULL, "SwFltOutDoc");
pTabSavedPos = new SwPosition(*pPaM->GetPoint());
pTable = GetDoc().InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ),
- *pTabSavedPos, 1, 1, text::HoriOrientation::LEFT, 0, 0, FALSE, FALSE ); // TODO MULTIHEADER
+ *pTabSavedPos, 1, 1, text::HoriOrientation::LEFT, 0, 0, sal_False, sal_False ); // TODO MULTIHEADER
nTableWidth = 0;
((SwTable*)pTable)->LockModify(); // Nichts automatisch anpassen!
// set pam in 1. table cell
usTableX =
usTableY = 0;
- SeekCell(usTableY, usTableX, TRUE);
- return TRUE;
+ SeekCell(usTableY, usTableX, sal_True);
+ return sal_True;
}
-SwTableBox* SwFltOutDoc::GetBox(USHORT ny, USHORT nx /*= USHRT_MAX */)
+SwTableBox* SwFltOutDoc::GetBox(sal_uInt16 ny, sal_uInt16 nx /*= USHRT_MAX */)
{
if(!pTable){
ASSERT(pTable, "GetBox ohne Tabelle");
@@ -1394,25 +1394,25 @@ SwTableBox* SwFltOutDoc::GetBox(USHORT ny, USHORT nx /*= USHRT_MAX */)
// get structs to table cells
const SwTableLines* pTableLines = &pTable->GetTabLines();
if(!pTableLines){
- ASSERT(FALSE, "SwFltOutDoc:GetBox:pTableLines");
+ ASSERT(sal_False, "SwFltOutDoc:GetBox:pTableLines");
return 0;
}
if( ny >= pTableLines->Count() ){ // Notbremse
- ASSERT( FALSE, "SwFltOutDoc:GetBox:ny >= Count()");
+ ASSERT( sal_False, "SwFltOutDoc:GetBox:ny >= Count()");
ny = pTableLines->Count() - 1;
}
SwTableLine* pTableLine = (*pTableLines)[ny];
if(!pTableLine){
- ASSERT(FALSE, "SwFltOutDoc:GetBox:pTableLine");
+ ASSERT(sal_False, "SwFltOutDoc:GetBox:pTableLine");
return 0;
}
SwTableBoxes* pTableBoxes = &pTableLine->GetTabBoxes();
if(!pTableBoxes){
- ASSERT(FALSE, "SwFltOutDoc:GetBox:pTableBoxes");
+ ASSERT(sal_False, "SwFltOutDoc:GetBox:pTableBoxes");
return 0;
}
if( nx >= pTableBoxes->Count() ){ // Notbremse
- ASSERT(FALSE, "SwFltOutDoc:GetBox:nx >= Count()");
+ ASSERT(sal_False, "SwFltOutDoc:GetBox:nx >= Count()");
nx = pTableBoxes->Count() - 1;
}
SwTableBox* pTableBox = (*pTableBoxes)[nx];
@@ -1444,7 +1444,7 @@ void SwFltOutDoc::NextTableCell()
GetDoc().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false ),
0,
pTableBoxes->Count());
- SeekCell(usTableY, usTableX, TRUE);
+ SeekCell(usTableY, usTableX, sal_True);
pTableBox = (*pTableBoxes)[usTableX];
ASSERT(pTableBox != 0, "SwFltOutDoc:pTableBox");
if(pTableBox)
@@ -1461,7 +1461,7 @@ void SwFltOutDoc::NextTableRow()
aSelBoxes.Insert( pTableBox );
GetDoc().InsertRow(aSelBoxes);
usTableX = 0;
- SeekCell(++usTableY, usTableX, TRUE);
+ SeekCell(++usTableY, usTableX, sal_True);
GetDoc().SetTxtFmtColl(*pPaM,
GetDoc().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false ));
}
@@ -1491,7 +1491,7 @@ void SwFltOutDoc::SetTableOrient(sal_Int16 eOri)
pTable->GetFrmFmt()->SetFmtAttr( SwFmtHoriOrient( 0, eOri ));
}
-void SwFltOutDoc::SetCellWidth(SwTwips nWidth, USHORT nCell /* = USHRT_MAX */ )
+void SwFltOutDoc::SetCellWidth(SwTwips nWidth, sal_uInt16 nCell /* = USHRT_MAX */ )
{
if(!pTable){
ASSERT(pTable, "SetCellWidth ohne Tabelle");
@@ -1525,7 +1525,7 @@ void SwFltOutDoc::SetCellHeight(SwTwips nHeight)
pTableLine->GetFrmFmt()->SetFmtAttr(aFmtFrmSize);
}
-const SfxPoolItem& SwFltOutDoc::GetCellAttr(USHORT nWhich)
+const SfxPoolItem& SwFltOutDoc::GetCellAttr(sal_uInt16 nWhich)
{
if (!pTable){
ASSERT(pTable, "GetCellAttr ohne Table");
@@ -1539,7 +1539,7 @@ const SfxPoolItem& SwFltOutDoc::GetCellAttr(USHORT nWhich)
}
void SwFltOutDoc::SetCellBorder(const SvxBoxItem& rFmtBox,
- USHORT nCell /* = USHRT_MAX */ )
+ sal_uInt16 nCell /* = USHRT_MAX */ )
{
SwTableBox* pTableBox = GetBox(usTableY, nCell);
if(pTableBox)
@@ -1547,7 +1547,7 @@ void SwFltOutDoc::SetCellBorder(const SvxBoxItem& rFmtBox,
}
// nicht aktiviert !!!
-void SwFltOutDoc::SetCellSpace(USHORT nDist)
+void SwFltOutDoc::SetCellSpace(sal_uInt16 nDist)
{
if(!pTable){
ASSERT(pTable, "SetCellSpace ohne Tabelle");
@@ -1570,7 +1570,7 @@ void SwFltOutDoc::SetCellSpace(USHORT nDist)
pTableBox->GetFrmFmt()->SetFmtAttr(aFmtBox);
}
-void SwFltOutDoc::DeleteCell(USHORT nCell /* = USHRT_MAX */)
+void SwFltOutDoc::DeleteCell(sal_uInt16 nCell /* = USHRT_MAX */)
{
SwTableBox* pTableBox = GetBox(usTableY, nCell);
if(pTableBox){
@@ -1603,8 +1603,8 @@ void SwFltOutDoc::EndTable()
}
// Alle Attribute schliessen, da sonst Attribute
// entstehen koennen, die in Flys reinragen
- rStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
- rEndStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
+ rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
if (GetDoc().GetRootFrm()){
SwTableNode* pTableNode = GetDoc().IsIdxInTbl(
@@ -1621,7 +1621,7 @@ void SwFltOutDoc::EndTable()
nTableWidth = 0;
}
-BOOL SwFltOutDoc::SeekCell(short nRow, short nCol, BOOL bPam)
+sal_Bool SwFltOutDoc::SeekCell(short nRow, short nCol, sal_Bool bPam)
{
// get structs to table cells
const SwTableLines* pTableLines = &pTable->GetTabLines();
@@ -1629,20 +1629,20 @@ BOOL SwFltOutDoc::SeekCell(short nRow, short nCol, BOOL bPam)
SwTableBoxes* pTableBoxes = &pTableLine->GetTabBoxes();
SwTableBox* pTableBox = (*pTableBoxes)[usTableX];
- if ((USHORT)nRow >= pTableLines->Count())
+ if ((sal_uInt16)nRow >= pTableLines->Count())
{
- ASSERT((USHORT)nRow >= pTableLines->Count(), "SwFltOutDoc");
- return FALSE;
+ ASSERT((sal_uInt16)nRow >= pTableLines->Count(), "SwFltOutDoc");
+ return sal_False;
}
pTableLine = (*pTableLines)[nRow];
pTableBoxes = &pTableLine->GetTabBoxes();
if (nCol >= pTableBoxes->Count())
- return FALSE;
+ return sal_False;
pTableBox = (*pTableBoxes)[nCol];
if( !pTableBox->GetSttNd() )
{
ASSERT(pTableBox->GetSttNd(), "SwFltOutDoc");
- return FALSE;
+ return sal_False;
}
if(bPam)
{
@@ -1656,7 +1656,7 @@ BOOL SwFltOutDoc::SeekCell(short nRow, short nCol, BOOL bPam)
GetDoc().SetTxtFmtColl(*pPaM,
GetDoc().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false ));
}
- return TRUE;
+ return sal_True;
}
@@ -1679,8 +1679,8 @@ SfxItemSet* SwFltOutBase::NewFlyDefaults()
return p;
}
-BOOL SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
- BOOL bAbsolutePos /*= FALSE*/,
+sal_Bool SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
+ sal_Bool bAbsolutePos /*= sal_False*/,
const SfxItemSet*
#ifdef DBG_UTIL
pMoreAttrs /*= 0*/
@@ -1690,17 +1690,17 @@ BOOL SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
ASSERT(!pMoreAttrs, "SwFltOutBase:BeginFly mit pMoreAttrs" );
eFlyAnchor = eAnchor;
bFlyAbsPos = bAbsolutePos; // Bloedsinn eigentlich
- return TRUE;
+ return sal_True;
}
/*virtual*/ void SwFltOutBase::SetFlyAnchor( RndStdIds eAnchor )
{
if( !IsInFly() ){
- ASSERT( FALSE, "SetFlyAnchor() ohne Fly" );
+ ASSERT( sal_False, "SetFlyAnchor() ohne Fly" );
return;
}
if ( eAnchor == FLY_AS_CHAR ){
- ASSERT( FALSE, "SetFlyAnchor( FLY_AS_CHAR ) nicht implementiert" );
+ ASSERT( sal_False, "SetFlyAnchor( FLY_AS_CHAR ) nicht implementiert" );
return;
}
SwFmtAnchor& rAnchor = (SwFmtAnchor&)GetFlyFrmAttr( RES_ANCHOR );
@@ -1719,7 +1719,7 @@ void SwFltOutBase::EndFly()
// Flys in SwFltDoc
//-----------------------------------------------------------------------------
-/* virtual */ BOOL SwFltOutDoc::IsInFly()
+/* virtual */ sal_Bool SwFltOutDoc::IsInFly()
{
return pFly != 0;
};
@@ -1731,8 +1731,8 @@ SwFrmFmt* SwFltOutDoc::MakeFly( RndStdIds eAnchor, SfxItemSet* pSet )
return pFly;
}
-BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
- BOOL bAbsolutePos /*= FALSE*/,
+sal_Bool SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
+ sal_Bool bAbsolutePos /*= sal_False*/,
const SfxItemSet* pMoreAttrs /*= 0*/ )
{
@@ -1741,8 +1741,8 @@ BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
// Alle Attribute schliessen, da sonst Attribute entstehen koennen,
// die in Flys reinragen
- rStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
- rEndStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
+ rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// create Fly:
ASSERT(pFlySavedPos == NULL, "BeginFly in Fly"); // rekursiv geht noch nicht
@@ -1771,7 +1771,7 @@ BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
SwCntntNode *pNode = pPaM->GetCntntNode();
pPaM->GetPoint()->nContent.Assign( pNode, 0 );
- return TRUE;
+ return sal_True;
}
/*virtual*/ void SwFltOutDoc::SetFlyFrmAttr(const SfxPoolItem& rAttr)
@@ -1784,7 +1784,7 @@ BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
}
}
-/*virtual*/ const SfxPoolItem& SwFltOutDoc::GetFlyFrmAttr(USHORT nWhich)
+/*virtual*/ const SfxPoolItem& SwFltOutDoc::GetFlyFrmAttr(sal_uInt16 nWhich)
{
if (pFly){
return pFly->GetFmtAttr( nWhich );
@@ -1797,13 +1797,13 @@ BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
void SwFltOutDoc::EndFly()
{
if( pTable ){
- ASSERT( FALSE, "SwFltOutDoc::EndFly() in Table" );
+ ASSERT( sal_False, "SwFltOutDoc::EndFly() in Table" );
return;
}
// Alle Attribute schliessen, da sonst Attribute
// entstehen koennen, die aus Flys rausragen
- rStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
- rEndStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
+ rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
*pPaM->GetPoint() = *pFlySavedPos; // restore Cursor
delete pFlySavedPos;
@@ -1815,7 +1815,7 @@ void SwFltOutDoc::EndFly()
//-----------------------------------------------------------------------------
// Flys in SwFltFormatCollection
//-----------------------------------------------------------------------------
-/*virtual*/ BOOL SwFltFormatCollection::IsInFly()
+/*virtual*/ sal_Bool SwFltFormatCollection::IsInFly()
{
return bHasFly;
};
@@ -1828,58 +1828,58 @@ void SwFltOutDoc::EndFly()
pFlyAttrs->Put( rAttr );
}
-/*virtual*/ const SfxPoolItem& SwFltFormatCollection::GetFlyFrmAttr(USHORT nWhich)
+/*virtual*/ const SfxPoolItem& SwFltFormatCollection::GetFlyFrmAttr(sal_uInt16 nWhich)
{
// ASSERT( pFlyAttrs, "GetFlyFrmAttr ohne Coll-FlyAttrs" );
if( pFlyAttrs )
- return pFlyAttrs->Get( nWhich, FALSE );
+ return pFlyAttrs->Get( nWhich, sal_False );
else
return GetDoc().GetAttrPool().GetDefaultItem(nWhich);
}
-BOOL SwFltFormatCollection::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
- BOOL bAbsolutePos /*= FALSE*/,
+sal_Bool SwFltFormatCollection::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
+ sal_Bool bAbsolutePos /*= sal_False*/,
const SfxItemSet* pMoreAttrs /*= 0*/ )
{
SwFltOutBase::BeginFly( eAnchor, bAbsolutePos, pMoreAttrs );
- bHasFly = TRUE;
- return TRUE;
+ bHasFly = sal_True;
+ return sal_True;
}
void SwFltFormatCollection::EndFly() // Wird nie aufgerufen
{
}
-BOOL SwFltFormatCollection::BeginStyleFly( SwFltOutDoc* pOutDoc )
+sal_Bool SwFltFormatCollection::BeginStyleFly( SwFltOutDoc* pOutDoc )
{
ASSERT( pOutDoc, "BeginStyleFly ohne pOutDoc" );
ASSERT( pOutDoc && !pOutDoc->IsInFly(), "BeginStyleFly in Fly" );
if( pOutDoc && !pOutDoc->IsInFly() )
return pOutDoc->BeginFly( eFlyAnchor, bFlyAbsPos, pFlyAttrs );
else
- return FALSE;
+ return sal_False;
}
//-----------------------------------------------------------------------------
// Flys in SwFltShell
//-----------------------------------------------------------------------------
-BOOL SwFltShell::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
- BOOL bAbsolutePos /*= FALSE*/ )
+sal_Bool SwFltShell::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
+ sal_Bool bAbsolutePos /*= sal_False*/ )
{
if (pOut->IsInFly()){
- ASSERT(FALSE, "BeginFly in Fly");
- return FALSE;
+ ASSERT(sal_False, "BeginFly in Fly");
+ return sal_False;
}
if (pOutDoc->IsInTable()){
- ASSERT(FALSE, "BeginFly in Table");
- return FALSE;
+ ASSERT(sal_False, "BeginFly in Table");
+ return sal_False;
}
pOut->BeginFly( eAnchor, bAbsolutePos, pColls[nAktStyle]->GetpFlyAttrs() );
eSubMode = Fly;
- return TRUE;
+ return sal_True;
}
void SwFltShell::SetFlyXPos( short nXPos, sal_Int16 eHRel /*= text::RelOrientation::FRAME*/,
@@ -1898,11 +1898,11 @@ void SwFltShell::SetFlyYPos( short nYPos, sal_Int16 eVRel /*= text::RelOrientati
void SwFltShell::EndFly()
{
if (!pOut->IsInFly()){
- ASSERT(FALSE, "EndFly ohne Fly");
+ ASSERT(sal_False, "EndFly ohne Fly");
return;
}
if (pOutDoc->IsInTable()){ // Table verschraenkt mit Fly macht keinen Sinn
- ASSERT(FALSE, "EndFly in Table ( verschraenkt )");
+ ASSERT(sal_False, "EndFly in Table ( verschraenkt )");
EndTable(); // -> Table beenden
}
pOut->EndFly();
@@ -1916,18 +1916,18 @@ void SwFltShell::EndFly()
void SwFltShell::BeginFootnote()
{
if( pOut->IsInFly() ){ // Passiert z.B. bei Fussnote in Fly
- ASSERT(FALSE, "Fussnote in Fly nicht erlaubt");
+ ASSERT(sal_False, "Fussnote in Fly nicht erlaubt");
return;
}
if( pOutDoc->IsInTable() ){
- ASSERT(FALSE, "Fussnote in Table z.Zt. nicht erlaubt");
+ ASSERT(sal_False, "Fussnote in Table z.Zt. nicht erlaubt");
return;
}
// Alle Attribute schliessen, da sonst Attribute entstehen koennen,
// die in Fussnoten reinragen
- aStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
-// aEndStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ aStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
+// aEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// EndStack erstmal nicht zwangs-Schliessen, damit Bookmarks ueber
// Fussnoten im PMW uebernommen werden
@@ -1956,8 +1956,8 @@ void SwFltShell::EndFootnote()
return;
// Alle Attribute schliessen, da sonst Attribute
// entstehen koennen, die aus Fussnoten rausragen
- aStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
-// aEndStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ aStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
+// aEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// EndStack erstmal nicht zwangs-Schliessen, damit Bookmarks ueber
// Fussnoten im PMW uebernommen werden
@@ -1971,7 +1971,7 @@ void SwFltShell::BeginHeader(SwPageDesc* /*pPD*/)
SwFrmFmt* pFmt = &pCurrentPageDesc->GetMaster(
); //(bUseLeft) ? &pCurrentPageDesc->GetLeft() :
SwFrmFmt* pHdFtFmt;
- pFmt->SetFmtAttr(SwFmtHeader(TRUE));
+ pFmt->SetFmtAttr(SwFmtHeader(sal_True));
pHdFtFmt = (SwFrmFmt*)pFmt->GetHeader().GetHeaderFmt();
const SwNodeIndex* pStartIndex = pHdFtFmt->GetCntnt().GetCntntIdx();
if (!pStartIndex)
@@ -1988,7 +1988,7 @@ void SwFltShell::BeginFooter(SwPageDesc* /*pPD*/)
SwFrmFmt* pFmt = &pCurrentPageDesc->GetMaster(
); //(bUseLeft) ? &pCurrentPageDesc->GetLeft() :
SwFrmFmt* pHdFtFmt;
- pFmt->SetFmtAttr(SwFmtFooter(TRUE));
+ pFmt->SetFmtAttr(SwFmtFooter(sal_True));
pHdFtFmt = (SwFrmFmt*)pFmt->GetFooter().GetFooterFmt();
const SwNodeIndex* pStartIndex = pHdFtFmt->GetCntnt().GetCntntIdx();
if (!pStartIndex)
@@ -2012,17 +2012,17 @@ SwPageDesc* SwFltShell::MakePageDesc(SwPageDesc* pFirstPageDesc)
if(bStdPD) // keine Neuen PageDescs
return pCurrentPageDesc;
- BOOL bFollow = (pFirstPageDesc != 0);
+ sal_Bool bFollow = (pFirstPageDesc != 0);
SwPageDesc* pNewPD;
- USHORT nPos;
+ sal_uInt16 nPos;
if (bFollow && pFirstPageDesc->GetFollow() != pFirstPageDesc)
return pFirstPageDesc; // Fehler: hat schon Follow
// Erkennung doppelter Namen fehlt noch (Wahrscheinlichkeit
// fuer dopp. Namen ist gering)
nPos = GetDoc().MakePageDesc( ViewShell::GetShellRes()->GetPageDescName(
- GetDoc().GetPageDescCnt(), FALSE, bFollow ),
- pFirstPageDesc, FALSE );
+ GetDoc().GetPageDescCnt(), sal_False, bFollow ),
+ pFirstPageDesc, sal_False );
pNewPD = &((SwPageDesc&)const_cast<const SwDoc &>(GetDoc()).
GetPageDesc(nPos));
@@ -2046,7 +2046,7 @@ SwFltFormatCollection::SwFltFormatCollection(
SwFltOutBase(_rDoc),
pColl(_rDoc.GetTxtCollFromPool( static_cast< sal_uInt16 >(nType), false )),
pFlyAttrs( 0 ),
- bHasFly( FALSE )
+ bHasFly( sal_False )
{
Reset(); // Default-Attrs loeschen und Auto-Flag
}
@@ -2055,13 +2055,13 @@ SwFltFormatCollection::SwFltFormatCollection(
SwDoc& _rDoc, const String& rName ) :
SwFltOutBase(_rDoc),
pFlyAttrs( 0 ),
- bHasFly( FALSE )
+ bHasFly( sal_False )
{
pColl = _rDoc.MakeTxtFmtColl(rName, (SwTxtFmtColl*)_rDoc.GetDfltTxtFmtColl());
Reset(); // Default-Attrs loeschen und Auto-Flag
}
-void SwFltShell::NextStyle(USHORT nWhich, USHORT nNext)
+void SwFltShell::NextStyle(sal_uInt16 nWhich, sal_uInt16 nNext)
{
ASSERT(pColls[nWhich], "Next style for noexistent style" );
ASSERT(pColls[nNext], "Next style to noexistent style" );
diff --git a/sw/source/filter/ww1/w1class.cxx b/sw/source/filter/ww1/w1class.cxx
index 90f1b4dd80ef..9f7ddb08093c 100644
--- a/sw/source/filter/ww1/w1class.cxx
+++ b/sw/source/filter/ww1/w1class.cxx
@@ -59,13 +59,13 @@ Ww1Fib::Ww1Fib( SvStream& _rStream )
///////////////////////////////////////////////////////////// PlainText
-Ww1PlainText::Ww1PlainText(Ww1Fib& rWwFib, ULONG nFilePos, ULONG nCountBytes)
+Ww1PlainText::Ww1PlainText(Ww1Fib& rWwFib, sal_uLong nFilePos, sal_uLong nCountBytes)
: rFib(rWwFib), ulFilePos(nFilePos), ulCountBytes(nCountBytes),
ulSeek(0), bOK(true)
{
}
-sal_Unicode Ww1PlainText::operator [] ( ULONG ulOffset )
+sal_Unicode Ww1PlainText::operator [] ( sal_uLong ulOffset )
{
DBG_ASSERT( ulOffset<Count(), "Ww1PlainText" );
sal_Unicode cRet;
@@ -80,7 +80,7 @@ sal_Unicode Ww1PlainText::operator [] ( ULONG ulOffset )
return cRet;
}
-String Ww1PlainText::GetText( ULONG ulOffset, ULONG nLen ) const
+String Ww1PlainText::GetText( sal_uLong ulOffset, sal_uLong nLen ) const
{
String sRet;
ByteString aStr;
@@ -102,7 +102,7 @@ Ww1Style::~Ww1Style()
delete pPapx;
}
-void Ww1Style::SetDefaults(BYTE stc)
+void Ww1Style::SetDefaults(sal_uInt8 stc)
{
if( 222 == stc )
{
@@ -112,9 +112,9 @@ void Ww1Style::SetDefaults(BYTE stc)
}
}
-USHORT Ww1Style::ReadName( BYTE*&p, USHORT& rnCountBytes, USHORT stc )
+sal_uInt16 Ww1Style::ReadName( sal_uInt8*&p, sal_uInt16& rnCountBytes, sal_uInt16 stc )
{
- BYTE nCountBytes = SVBT8ToByte(p);
+ sal_uInt8 nCountBytes = SVBT8ToByte(p);
p++;
rnCountBytes--;
if( !nCountBytes ) // default
@@ -177,9 +177,9 @@ USHORT Ww1Style::ReadName( BYTE*&p, USHORT& rnCountBytes, USHORT stc )
return 0;
}
-USHORT Ww1Style::ReadChpx( BYTE*&p, USHORT& rnCountBytes )
+sal_uInt16 Ww1Style::ReadChpx( sal_uInt8*&p, sal_uInt16& rnCountBytes )
{
- USHORT nCountBytes = SVBT8ToByte(p);
+ sal_uInt16 nCountBytes = SVBT8ToByte(p);
p++;
rnCountBytes--;
if (nCountBytes != 255 // unused
@@ -195,9 +195,9 @@ USHORT Ww1Style::ReadChpx( BYTE*&p, USHORT& rnCountBytes )
return 0;
}
-USHORT Ww1Style::ReadPapx(BYTE*&p, USHORT& rnCountBytes)
+sal_uInt16 Ww1Style::ReadPapx(sal_uInt8*&p, sal_uInt16& rnCountBytes)
{
- USHORT nCountBytes = SVBT8ToByte(p);
+ sal_uInt16 nCountBytes = SVBT8ToByte(p);
p++;
rnCountBytes--;
if (nCountBytes != 255)
@@ -212,7 +212,7 @@ USHORT Ww1Style::ReadPapx(BYTE*&p, USHORT& rnCountBytes)
return 0;
}
-USHORT Ww1Style::ReadEstcp(BYTE*&p, USHORT& rnCountBytes)
+sal_uInt16 Ww1Style::ReadEstcp(sal_uInt8*&p, sal_uInt16& rnCountBytes)
{
stcNext = SVBT8ToByte(p);
p++;
@@ -228,22 +228,22 @@ USHORT Ww1Style::ReadEstcp(BYTE*&p, USHORT& rnCountBytes)
Ww1StyleSheet::Ww1StyleSheet(Ww1Fib& _rFib)
: cstcStd(0),
rFib(_rFib),
- bOK(FALSE)
+ bOK(sal_False)
{
- USHORT cbStshf = rFib.GetFIB().cbStshfGet();
+ sal_uInt16 cbStshf = rFib.GetFIB().cbStshfGet();
DBG_ASSERT(cbStshf>=17, "Ww1StyleSheet");
- for (USHORT stc=0;stc<Count();stc++)
+ for (sal_uInt16 stc=0;stc<Count();stc++)
{
aStyles[stc].SetParent(this);
- aStyles[stc].SetDefaults((BYTE)stc);
+ aStyles[stc].SetDefaults((sal_uInt8)stc);
}
- BYTE* del = NULL;
+ sal_uInt8* del = NULL;
if (rFib.GetStream().Seek(rFib.GetFIB().fcStshfGet())
- == (ULONG)rFib.GetFIB().fcStshfGet()
- && (del = new BYTE[cbStshf]) != NULL
- && rFib.GetStream().Read(del, cbStshf) == (ULONG)cbStshf)
+ == (sal_uLong)rFib.GetFIB().fcStshfGet()
+ && (del = new sal_uInt8[cbStshf]) != NULL
+ && rFib.GetStream().Read(del, cbStshf) == (sal_uLong)cbStshf)
{
- BYTE* p = del;
+ sal_uInt8* p = del;
cstcStd = SVBT16ToShort(p);
p += sizeof(SVBT16);
cbStshf -= sizeof(SVBT16);
@@ -257,17 +257,17 @@ Ww1StyleSheet::Ww1StyleSheet(Ww1Fib& _rFib)
delete [] del;
}
-USHORT Ww1StyleSheet::ReadNames( BYTE*& p, USHORT& rnCountBytes )
+sal_uInt16 Ww1StyleSheet::ReadNames( sal_uInt8*& p, sal_uInt16& rnCountBytes )
{
- USHORT nCountBytes = SVBT16ToShort(p);
+ sal_uInt16 nCountBytes = SVBT16ToShort(p);
p += sizeof(SVBT16);
DBG_ASSERT(rnCountBytes>=nCountBytes, "Ww1StyleSheet");
rnCountBytes = rnCountBytes - nCountBytes;
nCountBytes = nCountBytes - sizeof(SVBT16);
- USHORT stcp = 0;
+ sal_uInt16 stcp = 0;
while (nCountBytes > 0)
{
- USHORT stc = (stcp - cstcStd) & 255;
+ sal_uInt16 stc = (stcp - cstcStd) & 255;
aStyles[stc].ReadName(p, nCountBytes, stc);
stcp++;
}
@@ -275,17 +275,17 @@ USHORT Ww1StyleSheet::ReadNames( BYTE*& p, USHORT& rnCountBytes )
return 0;
}
-USHORT Ww1StyleSheet::ReadChpx(BYTE*& p, USHORT& rnCountBytes)
+sal_uInt16 Ww1StyleSheet::ReadChpx(sal_uInt8*& p, sal_uInt16& rnCountBytes)
{
- USHORT nCountBytes = SVBT16ToShort(p);
+ sal_uInt16 nCountBytes = SVBT16ToShort(p);
p += sizeof(SVBT16);
DBG_ASSERT(rnCountBytes>=nCountBytes, "Ww1StyleSheet");
rnCountBytes = rnCountBytes - nCountBytes;
nCountBytes = nCountBytes - sizeof(SVBT16);
- USHORT stcp = 0;
+ sal_uInt16 stcp = 0;
while (nCountBytes > 0)
{
- USHORT stc = (stcp - cstcStd) & 255;
+ sal_uInt16 stc = (stcp - cstcStd) & 255;
aStyles[stc].ReadChpx(p, nCountBytes);
stcp++;
}
@@ -293,17 +293,17 @@ USHORT Ww1StyleSheet::ReadChpx(BYTE*& p, USHORT& rnCountBytes)
return 0;
}
-USHORT Ww1StyleSheet::ReadPapx(BYTE*& p, USHORT& rnCountBytes)
+sal_uInt16 Ww1StyleSheet::ReadPapx(sal_uInt8*& p, sal_uInt16& rnCountBytes)
{
- USHORT nCountBytes = SVBT16ToShort(p);
+ sal_uInt16 nCountBytes = SVBT16ToShort(p);
p += sizeof(SVBT16);
DBG_ASSERT(rnCountBytes>=nCountBytes, "Ww1StyleSheet");
rnCountBytes = rnCountBytes - nCountBytes;
nCountBytes = nCountBytes - sizeof(SVBT16);
- USHORT stcp = 0;
+ sal_uInt16 stcp = 0;
while (nCountBytes > 0)
{
- USHORT stc = (stcp - cstcStd) & 255;
+ sal_uInt16 stc = (stcp - cstcStd) & 255;
aStyles[stc].ReadPapx(p, nCountBytes);
stcp++;
}
@@ -311,15 +311,15 @@ USHORT Ww1StyleSheet::ReadPapx(BYTE*& p, USHORT& rnCountBytes)
return 0;
}
-USHORT Ww1StyleSheet::ReadEstcp(BYTE*& p, USHORT& rnCountBytes)
+sal_uInt16 Ww1StyleSheet::ReadEstcp(sal_uInt8*& p, sal_uInt16& rnCountBytes)
{
- USHORT iMac = SVBT16ToShort(p);
+ sal_uInt16 iMac = SVBT16ToShort(p);
p += sizeof(SVBT16);
DBG_ASSERT(rnCountBytes>=sizeof(SVBT16), "Ww1StyleSheet");
rnCountBytes -= sizeof(SVBT16);
- for (USHORT stcp=0;stcp<iMac;stcp++)
+ for (sal_uInt16 stcp=0;stcp<iMac;stcp++)
{
- USHORT stc = (stcp - cstcStd) & 255;
+ sal_uInt16 stc = (stcp - cstcStd) & 255;
aStyles[stc].ReadEstcp(p, rnCountBytes);
}
DBG_ASSERT(rnCountBytes==0, "Ww1StyleSheet");
@@ -328,7 +328,7 @@ USHORT Ww1StyleSheet::ReadEstcp(BYTE*& p, USHORT& rnCountBytes)
///////////////////////////////////////////////////////////////// Fonts
-Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
+Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, sal_uLong nFieldFlgs)
: pFontA(0), rFib(rInFib), nFieldFlags(nFieldFlgs), nMax(0), bOK(false)
{
if(rFib.GetFIB().cbSttbfffnGet() > 2 ) // ueberhaupt fonts?
@@ -336,7 +336,7 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
SVBT16 nCountBytes;
DBG_ASSERT(rFib.GetFIB().cbSttbfffnGet() > sizeof(nCountBytes), "Ww1Fonts");
if (rFib.GetStream().Seek(rFib.GetFIB().fcSttbfffnGet())
- == (ULONG)rFib.GetFIB().fcSttbfffnGet())
+ == (sal_uLong)rFib.GetFIB().fcSttbfffnGet())
if (rFib.GetStream().Read(nCountBytes, sizeof(nCountBytes))
== sizeof(nCountBytes)) // Laenge steht hier nochmal
{
@@ -347,7 +347,7 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
- sizeof(nCountBytes)]; // Alloziere Font-Array
//~ Ww1: new-NULL
if (rFib.GetStream().Read(pA, rFib.GetFIB().cbSttbfffnGet()
- - sizeof(nCountBytes)) == (ULONG)rFib.GetFIB().cbSttbfffnGet()
+ - sizeof(nCountBytes)) == (sal_uLong)rFib.GetFIB().cbSttbfffnGet()
- sizeof(nCountBytes)) // lese alle Fonts
{} //nothing
@@ -356,7 +356,7 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
W1_FFN* p = pA;
while (1)
{
- USHORT nNextSiz;
+ sal_uInt16 nNextSiz;
nNextSiz = p->cbFfnM1Get() + 1;
if(nNextSiz > nLeft)
break;
@@ -371,7 +371,7 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
pFontA = new W1_FFN*[nMax]; // alloziere Index-Array
//~ Ww1: new-NULL
pFontA[0] = pA; // fuelle Index-Array
- USHORT i;
+ sal_uInt16 i;
for(i=1, p=pA; i<nMax; i++)
{
p = (W1_FFN*)(((char*)p) + p->cbFfnM1Get() + 1);
@@ -382,10 +382,10 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
pFontA = 0; // Keine Eintraege -> kein Array
}
}
- bOK = TRUE;
+ bOK = sal_True;
}
-W1_FFN* Ww1Fonts::GetFFN(USHORT nNum)
+W1_FFN* Ww1Fonts::GetFFN(sal_uInt16 nNum)
{
W1_FFN* pRet = NULL;
if (pFontA)
@@ -405,22 +405,22 @@ Ww1Dop::Ww1Dop(Ww1Fib& _rFib)
else
nRead = rFib.GetFIB().cbDopGet();
bOK = rFib.GetStream().Seek(rFib.GetFIB().fcDopGet()) ==
- (ULONG)rFib.GetFIB().fcDopGet() &&
- rFib.GetStream().Read(&aDop, nRead) == (ULONG)nRead;
+ (sal_uLong)rFib.GetFIB().fcDopGet() &&
+ rFib.GetStream().Read(&aDop, nRead) == (sal_uLong)nRead;
}
/////////////////////////////////////////////////////////////// Picture
-Ww1Picture::Ww1Picture(SvStream& rStream, ULONG ulFilePos)
+Ww1Picture::Ww1Picture(SvStream& rStream, sal_uLong ulFilePos)
: bOK(false), pPic(0)
{
ulFilePos &= 0xffffff; //~ ww1: warum auch immer - im highbyte steht eine 5?!?!
SVBT32 lcb;
- if (rStream.Seek(ulFilePos) == (ULONG)ulFilePos)
- if (rStream.Read(&lcb, sizeof(lcb)) == (ULONG)sizeof(lcb))
+ if (rStream.Seek(ulFilePos) == (sal_uLong)ulFilePos)
+ if (rStream.Read(&lcb, sizeof(lcb)) == (sal_uLong)sizeof(lcb))
if (sizeof(int)>=4 || SVBT32ToUInt32(lcb) < 0x8000) //~ mdt: 64K & 16bit
- if ((pPic = (W1_PIC*)(new BYTE[SVBT32ToUInt32(lcb)])) != NULL)
- if (rStream.Seek(ulFilePos) == (ULONG)ulFilePos)
- if (rStream.Read(pPic, SVBT32ToUInt32(lcb)) == (ULONG)SVBT32ToUInt32(lcb))
+ if ((pPic = (W1_PIC*)(new sal_uInt8[SVBT32ToUInt32(lcb)])) != NULL)
+ if (rStream.Seek(ulFilePos) == (sal_uLong)ulFilePos)
+ if (rStream.Read(pPic, SVBT32ToUInt32(lcb)) == (sal_uLong)SVBT32ToUInt32(lcb))
{
DBG_ASSERT(pPic->cbHeaderGet()==sizeof(*pPic)-sizeof(pPic->rgb), "Ww1Picture");
bOK = true;
@@ -428,43 +428,43 @@ Ww1Picture::Ww1Picture(SvStream& rStream, ULONG ulFilePos)
}
////////////////////////////////////////////////////////////////// Sprm
-Ww1Sprm::Ww1Sprm(BYTE* x, USHORT _nCountBytes)
+Ww1Sprm::Ww1Sprm(sal_uInt8* x, sal_uInt16 _nCountBytes)
: p(NULL),
nCountBytes(_nCountBytes),
- bOK(FALSE),
+ bOK(sal_False),
pArr(NULL),
count(0)
{
if (nCountBytes == 0)
- bOK = TRUE;
+ bOK = sal_True;
else
- if ((p = new BYTE[nCountBytes]) != NULL)
+ if ((p = new sal_uInt8[nCountBytes]) != NULL)
{
memcpy(p, x, nCountBytes);
if (ReCalc())
- bOK = TRUE;
+ bOK = sal_True;
}
}
-Ww1Sprm::Ww1Sprm(SvStream& rStream, ULONG ulFilePos)
+Ww1Sprm::Ww1Sprm(SvStream& rStream, sal_uLong ulFilePos)
: p(NULL),
nCountBytes(0),
- bOK(FALSE),
+ bOK(sal_False),
pArr(NULL),
count(0)
{
SVBT8 x;
ByteToSVBT8(0, x);
- if (rStream.Seek(ulFilePos) == (ULONG)ulFilePos)
- if (rStream.Read(&x, sizeof(x)) == (ULONG)sizeof(x))
+ if (rStream.Seek(ulFilePos) == (sal_uLong)ulFilePos)
+ if (rStream.Read(&x, sizeof(x)) == (sal_uLong)sizeof(x))
if ((nCountBytes = SVBT8ToByte(x)) == 255
|| !nCountBytes
- || (p = new BYTE[nCountBytes]) != NULL)
+ || (p = new sal_uInt8[nCountBytes]) != NULL)
if (nCountBytes == 255
|| !nCountBytes
- || rStream.Read(p, nCountBytes) == (ULONG)nCountBytes)
+ || rStream.Read(p, nCountBytes) == (sal_uLong)nCountBytes)
if (ReCalc())
- bOK = TRUE;
+ bOK = sal_True;
}
Ww1Sprm::~Ww1Sprm()
@@ -473,22 +473,22 @@ Ww1Sprm::~Ww1Sprm()
delete p;
}
-USHORT Ww1SingleSprm::Size(BYTE* /*pSprm*/)
+sal_uInt16 Ww1SingleSprm::Size(sal_uInt8* /*pSprm*/)
{
return nCountBytes;
}
-USHORT Ww1SingleSprmTab::Size(BYTE* pSprm) // Doc 24/25, Fastsave-Sprm
+sal_uInt16 Ww1SingleSprmTab::Size(sal_uInt8* pSprm) // Doc 24/25, Fastsave-Sprm
{
DBG_ASSERT(nCountBytes==0, "Ww1SingleSprmTab");
- USHORT nRet = sizeof(SVBT8);
- USHORT nSize = SVBT8ToByte(pSprm);
+ sal_uInt16 nRet = sizeof(SVBT8);
+ sal_uInt16 nSize = SVBT8ToByte(pSprm);
if (nSize != 255)
nRet = nRet + nSize;
else
{
- USHORT nDel = SVBT8ToByte(pSprm+1) * 4;
- USHORT nIns = SVBT8ToByte(pSprm + 3 + nDel) * 3;
+ sal_uInt16 nDel = SVBT8ToByte(pSprm+1) * 4;
+ sal_uInt16 nIns = SVBT8ToByte(pSprm + 3 + nDel) * 3;
nRet += nDel + nIns;
}
DBG_ASSERT(nRet <= 354, "Ww1SingleSprmTab");
@@ -497,9 +497,9 @@ USHORT Ww1SingleSprmTab::Size(BYTE* pSprm) // Doc 24/25, Fastsave-Sprm
return nRet;
}
-USHORT Ww1SingleSprmByteSized::Size(BYTE* pSprm)
+sal_uInt16 Ww1SingleSprmByteSized::Size(sal_uInt8* pSprm)
{
- USHORT nRet;
+ sal_uInt16 nRet;
nRet = SVBT8ToByte(pSprm);
nRet += sizeof(SVBT8); // var. l. byte-size
// pSprm += sizeof(SVBT8); // var. l. byte-size
@@ -507,9 +507,9 @@ USHORT Ww1SingleSprmByteSized::Size(BYTE* pSprm)
return nRet;
}
-USHORT Ww1SingleSprmWordSized::Size(BYTE* pSprm)
+sal_uInt16 Ww1SingleSprmWordSized::Size(sal_uInt8* pSprm)
{
- USHORT nRet;
+ sal_uInt16 nRet;
nRet = SVBT16ToShort(pSprm);
nRet += sizeof(SVBT16); // var. l. word-size
// pSprm += sizeof(SVBT16); // var. l. word-size
@@ -517,19 +517,19 @@ USHORT Ww1SingleSprmWordSized::Size(BYTE* pSprm)
return nRet;
}
-static BYTE nLast = 0;
-static BYTE nCurrent = 0;
-USHORT Ww1Sprm::GetSize(BYTE nId, BYTE* pSprm)
+static sal_uInt8 nLast = 0;
+static sal_uInt8 nCurrent = 0;
+sal_uInt16 Ww1Sprm::GetSize(sal_uInt8 nId, sal_uInt8* pSprm)
{
//DBG_ASSERT( nId < sizeof(aTab) / sizeof(*aTab), "Ww1Sprm" );
- USHORT nL = 0;
+ sal_uInt16 nL = 0;
nL = GetTab(nId).Size(pSprm);
nLast = nCurrent;
nCurrent = nId;
return nL;
}
-BOOL Ww1Sprm::Fill(USHORT index, BYTE& nId, USHORT& nL, BYTE*& pSprm)
+sal_Bool Ww1Sprm::Fill(sal_uInt16 index, sal_uInt8& nId, sal_uInt16& nL, sal_uInt8*& pSprm)
{
//DBG_ASSERT( nId < sizeof(aTab) / sizeof(*aTab), "Ww1Sprm");
DBG_ASSERT(index < Count(), "Ww1Sprm");
@@ -537,22 +537,22 @@ BOOL Ww1Sprm::Fill(USHORT index, BYTE& nId, USHORT& nL, BYTE*& pSprm)
nId = SVBT8ToByte(pSprm);
pSprm++;
nL = GetTab(nId).Size(pSprm);
- return TRUE;
+ return sal_True;
}
-BOOL Ww1Sprm::ReCalc()
+sal_Bool Ww1Sprm::ReCalc()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
delete pArr;
pArr = NULL;
count = 0;
if (nCountBytes != 255) // not unused?
{
- USHORT cbsik = nCountBytes;
- BYTE* psik = p;
+ sal_uInt16 cbsik = nCountBytes;
+ sal_uInt8* psik = p;
while (cbsik > 0)
{
- USHORT iLen = GetSizeBrutto(psik);
+ sal_uInt16 iLen = GetSizeBrutto(psik);
DBG_ASSERT(iLen<=cbsik, "Ww1Sprm");
if (iLen > cbsik)
cbsik = 0; // ignore the rest: we are wrong...
@@ -564,16 +564,16 @@ BOOL Ww1Sprm::ReCalc()
}
}
if (bRet
- && (pArr = new USHORT[count]) != NULL)
+ && (pArr = new sal_uInt16[count]) != NULL)
{
cbsik = nCountBytes;
- USHORT offset = 0;
- USHORT current = 0;
+ sal_uInt16 offset = 0;
+ sal_uInt16 current = 0;
psik = p;
while (current<count)
{
pArr[current++] = offset;
- USHORT iLen = GetSizeBrutto(psik);
+ sal_uInt16 iLen = GetSizeBrutto(psik);
psik += iLen;
if (iLen > cbsik)
cbsik = 0;
@@ -715,33 +715,33 @@ void Ww1Sprm::InitTab()
}
////////////////////////////////////////////////////////////// SprmPapx
-Ww1SprmPapx::Ww1SprmPapx(BYTE* pByte, USHORT nSize) :
+Ww1SprmPapx::Ww1SprmPapx(sal_uInt8* pByte, sal_uInt16 nSize) :
Ww1Sprm(Sprm(pByte, nSize), SprmSize(pByte, nSize))
{
memset(&aPapx, 0, sizeof(aPapx));
memcpy(&aPapx, pByte, nSize<sizeof(aPapx)?nSize:sizeof(aPapx));
}
-USHORT Ww1SprmPapx::SprmSize(BYTE*, USHORT nSize)
+sal_uInt16 Ww1SprmPapx::SprmSize(sal_uInt8*, sal_uInt16 nSize)
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if (nSize >= sizeof(W1_PAPX))
nRet = nSize - ( sizeof(W1_PAPX) - 1 ); // im W1_PAPX ist das
// 1. SprmByte enthalten
return nRet;
}
-BYTE* Ww1SprmPapx::Sprm(BYTE* pByte, USHORT nSize)
+sal_uInt8* Ww1SprmPapx::Sprm(sal_uInt8* pByte, sal_uInt16 nSize)
{
- BYTE* pRet = NULL;
+ sal_uInt8* pRet = NULL;
if (nSize >= sizeof(W1_PAPX))
pRet = ((W1_PAPX*)(pByte))->grpprlGet();
return pRet;
}
/////////////////////////////////////////////////////////////////// Plc
-Ww1Plc::Ww1Plc(Ww1Fib& rInFib, ULONG ulFilePos, USHORT nInCountBytes,
- USHORT nInItemSize)
+Ww1Plc::Ww1Plc(Ww1Fib& rInFib, sal_uLong ulFilePos, sal_uInt16 nInCountBytes,
+ sal_uInt16 nInItemSize)
: p(0), nCountBytes(nInCountBytes), iMac(0), nItemSize(nInItemSize),
bOK(false), rFib(rInFib)
{
@@ -749,17 +749,17 @@ Ww1Plc::Ww1Plc(Ww1Fib& rInFib, ULONG ulFilePos, USHORT nInCountBytes,
bOK = true;
else
{
- if (rFib.GetStream().Seek(ulFilePos) == (ULONG)ulFilePos)
+ if (rFib.GetStream().Seek(ulFilePos) == (sal_uLong)ulFilePos)
{
- if ((p = new BYTE[nCountBytes]) != NULL)
+ if ((p = new sal_uInt8[nCountBytes]) != NULL)
{
- if (rFib.GetStream().Read(p, nCountBytes) == (ULONG)nCountBytes)
+ if (rFib.GetStream().Read(p, nCountBytes) == (sal_uLong)nCountBytes)
{
bOK = true;
iMac = (nCountBytes -
sizeof(SVBT32)) / (sizeof(SVBT32) + nItemSize);
- DBG_ASSERT(iMac * ((USHORT)sizeof(ULONG) + nItemSize) +
- (USHORT)sizeof(SVBT32) == nCountBytes, "Ww1Plc");
+ DBG_ASSERT(iMac * ((sal_uInt16)sizeof(sal_uLong) + nItemSize) +
+ (sal_uInt16)sizeof(SVBT32) == nCountBytes, "Ww1Plc");
}
}
}
@@ -771,25 +771,25 @@ Ww1Plc::~Ww1Plc()
delete p;
}
-void Ww1Plc::Seek(ULONG ulSeek, USHORT& nIndex)
+void Ww1Plc::Seek(sal_uLong ulSeek, sal_uInt16& nIndex)
{
if (iMac)
for (;nIndex <= iMac && Where(nIndex) < ulSeek;nIndex++)
;
}
-ULONG Ww1Plc::Where(USHORT nIndex)
+sal_uLong Ww1Plc::Where(sal_uInt16 nIndex)
{
- ULONG ulRet = 0xffffffff;
+ sal_uLong ulRet = 0xffffffff;
DBG_ASSERT(nIndex <= iMac, "index out of bounds");
if (iMac && nIndex <= iMac)
ulRet = SVBT32ToUInt32(p + sizeof(SVBT32) * nIndex);
return ulRet;
}
-BYTE* Ww1Plc::GetData(USHORT nIndex)
+sal_uInt8* Ww1Plc::GetData(sal_uInt16 nIndex)
{
- BYTE* pRet = NULL;
+ sal_uInt8* pRet = NULL;
DBG_ASSERT(nIndex < iMac, "index out of bounds");
if (nIndex < iMac)
pRet = p + (iMac + 1) * sizeof(SVBT32) +
@@ -817,14 +817,14 @@ BYTE* Ww1Plc::GetData(USHORT nIndex)
// Die Anzahl wird in nMax zurueckgeliefert.
// im Index 0 stehen alle Strings nacheinander, ab Index 1 werden
// die einzelnen Strings referenziert.
-Ww1StringList::Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb )
+Ww1StringList::Ww1StringList( SvStream& rSt, sal_uLong nFc, sal_uInt16 nCb )
: pIdxA(0), nMax(0)
{
if( nCb > 2 ) // ueberhaupt Eintraege ?
{
SVBT16 nCountBytes;
DBG_ASSERT(nCb > sizeof(nCountBytes), "Ww1StringList");
- if (rSt.Seek(nFc) == (ULONG)nFc)
+ if (rSt.Seek(nFc) == (sal_uLong)nFc)
if (rSt.Read(nCountBytes, sizeof(nCountBytes))
== sizeof(nCountBytes)) // Laenge steht hier nochmal
{
@@ -835,14 +835,14 @@ Ww1StringList::Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb )
// Alloziere PString-Array
//~ Ww1: new-NULL
if (rSt.Read(pA, nCb - sizeof(nCountBytes))
- == (ULONG)nCb - sizeof(nCountBytes)) // lese alle
+ == (sal_uLong)nCb - sizeof(nCountBytes)) // lese alle
{}// do nothing
// Zaehle, wieviele Fonts enthalten
long nLeft = nCb - sizeof(nCountBytes);
sal_Char* p = pA;
while (1)
{
- USHORT nNextSiz;
+ sal_uInt16 nNextSiz;
nNextSiz = *p + 1;
if(nNextSiz > nLeft)
break;
@@ -858,9 +858,9 @@ Ww1StringList::Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb )
pIdxA[0] = pA; // Index 0 : alles
// ab Index 1 C-Strings
pIdxA[1] = pA + 1; // fuelle Index-Array
- USHORT i = 2;
+ sal_uInt16 i = 2;
p = pA;
- BYTE nL = *p;
+ sal_uInt8 nL = *p;
while(1)
{
p += nL + 1; // Neues Laengen-Byte
@@ -877,7 +877,7 @@ Ww1StringList::Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb )
}
}
}
-const String Ww1StringList::GetStr( USHORT nNum ) const
+const String Ww1StringList::GetStr( sal_uInt16 nNum ) const
{
String sRet;
if( nNum <= nMax )
@@ -889,10 +889,10 @@ Ww1Bookmarks::Ww1Bookmarks(Ww1Fib& rInFib)
: aNames(rInFib), rFib(rInFib), nIsEnd(0)
{
pPos[0] = new Ww1PlcBookmarkPos(rFib, rFib.GetFIB().fcPlcfbkfGet(),
- rFib.GetFIB().cbPlcfbkfGet(), FALSE);
+ rFib.GetFIB().cbPlcfbkfGet(), sal_False);
nPlcIdx[0] = 0;
pPos[1] = new Ww1PlcBookmarkPos(rFib, rFib.GetFIB().fcPlcfbklGet(),
- rFib.GetFIB().cbPlcfbklGet(), TRUE);
+ rFib.GetFIB().cbPlcfbklGet(), sal_True);
nPlcIdx[1] = 0;
bOK = !aNames.GetError() && !pPos[0]->GetError() && !pPos[1]->GetError();
}
@@ -914,8 +914,8 @@ void Ww1Bookmarks::operator ++( int )
{
nPlcIdx[nIsEnd]++;
- ULONG l0 = pPos[0]->Where(nPlcIdx[0]);
- ULONG l1 = pPos[1]->Where(nPlcIdx[1]);
+ sal_uLong l0 = pPos[0]->Where(nPlcIdx[0]);
+ sal_uLong l1 = pPos[1]->Where(nPlcIdx[1]);
if( l0 < l1 )
nIsEnd = 0;
else if( l1 < l0 )
@@ -932,7 +932,7 @@ long Ww1Bookmarks::GetHandle() const
if( nIsEnd )
return nPlcIdx[1];
- const BYTE* p = pPos[0]->GetData( nPlcIdx[0] );
+ const sal_uInt8* p = pPos[0]->GetData( nPlcIdx[0] );
if( p )
return SVBT16ToShort( p );
}
@@ -943,10 +943,10 @@ long Ww1Bookmarks::Len() const
{
if( nIsEnd )
{
- DBG_ASSERT( FALSE, "Falscher Aufruf (1) von Ww1Bookmarks::Len()" );
+ DBG_ASSERT( sal_False, "Falscher Aufruf (1) von Ww1Bookmarks::Len()" );
return 0;
}
- USHORT nEndIdx = SVBT16ToShort(pPos[0]->GetData(nPlcIdx[0]));
+ sal_uInt16 nEndIdx = SVBT16ToShort(pPos[0]->GetData(nPlcIdx[0]));
return pPos[1]->Where(nEndIdx) - pPos[0]->Where(nPlcIdx[0]);
}
@@ -958,27 +958,27 @@ const String Ww1Bookmarks::GetName() const
}
/////////////////////////////////////////////////////////////////// Fkp
-Ww1Fkp::Ww1Fkp(SvStream& rStream, ULONG ulFilePos, USHORT _nItemSize) :
+Ww1Fkp::Ww1Fkp(SvStream& rStream, sal_uLong ulFilePos, sal_uInt16 _nItemSize) :
nItemSize(_nItemSize),
- bOK(FALSE)
+ bOK(sal_False)
{
- if (rStream.Seek(ulFilePos) == (ULONG)ulFilePos)
+ if (rStream.Seek(ulFilePos) == (sal_uLong)ulFilePos)
if (rStream.Read(aFkp, sizeof(aFkp)) == sizeof(aFkp))
- bOK = TRUE;
+ bOK = sal_True;
}
-ULONG Ww1Fkp::Where(USHORT nIndex)
+sal_uLong Ww1Fkp::Where(sal_uInt16 nIndex)
{
- ULONG lRet = 0xffffffff;
+ sal_uLong lRet = 0xffffffff;
DBG_ASSERT(nIndex<=Count(), "index out of bounds");
if (nIndex<=Count())
lRet = SVBT32ToUInt32(aFkp+nIndex*sizeof(SVBT32));
return lRet;
}
-BYTE* Ww1Fkp::GetData(USHORT nIndex)
+sal_uInt8* Ww1Fkp::GetData(sal_uInt16 nIndex)
{
- BYTE* pRet = NULL;
+ sal_uInt8* pRet = NULL;
DBG_ASSERT(nIndex<=Count(), "index out of bounds");
if (nIndex<=Count())
pRet = aFkp + (Count()+1) * sizeof(SVBT32) +
@@ -987,13 +987,13 @@ BYTE* Ww1Fkp::GetData(USHORT nIndex)
}
//////////////////////////////////////////////////////////////// FkpPap
-BOOL Ww1FkpPap::Fill(USHORT nIndex, BYTE*& p, USHORT& rnCountBytes)
+sal_Bool Ww1FkpPap::Fill(sal_uInt16 nIndex, sal_uInt8*& p, sal_uInt16& rnCountBytes)
{
DBG_ASSERT( nIndex < Count(), "Ww1FkpPap::Fill() Index out of Range" );
- USHORT nOffset = SVBT8ToByte(GetData(nIndex)) * 2;
+ sal_uInt16 nOffset = SVBT8ToByte(GetData(nIndex)) * 2;
if (nOffset)
{
- DBG_ASSERT(nOffset>(USHORT)(Count()*sizeof(SVBT32)), "calc error");
+ DBG_ASSERT(nOffset>(sal_uInt16)(Count()*sizeof(SVBT32)), "calc error");
// rnCountBytes = SVBT8ToByte(aFkp+nOffset) * 2 + 1; // SH: +1 ?????
rnCountBytes = SVBT8ToByte(aFkp+nOffset) * 2;
nOffset += sizeof(SVBT8);
@@ -1011,33 +1011,33 @@ BOOL Ww1FkpPap::Fill(USHORT nIndex, BYTE*& p, USHORT& rnCountBytes)
p = NULL;
rnCountBytes = 0;
}
- return TRUE;
+ return sal_True;
}
//////////////////////////////////////////////////////////////// FkpChp
-BOOL Ww1FkpChp::Fill(USHORT nIndex, W1_CHP& aChp)
+sal_Bool Ww1FkpChp::Fill(sal_uInt16 nIndex, W1_CHP& aChp)
{
DBG_ASSERT( nIndex < Count(), "Ww1FkpChp::Fill() Index out of Range" );
memset(&aChp, 0, sizeof(aChp)); // Default, da verkuerzt gespeichert
- USHORT nOffset = GetData(nIndex)[0] * 2;
+ sal_uInt16 nOffset = GetData(nIndex)[0] * 2;
if (nOffset)
{
- DBG_ASSERT(nOffset>(USHORT)(Count()*sizeof(SVBT32)), "calc error");
- USHORT nCountBytes = aFkp[nOffset];
+ DBG_ASSERT(nOffset>(sal_uInt16)(Count()*sizeof(SVBT32)), "calc error");
+ sal_uInt16 nCountBytes = aFkp[nOffset];
nOffset += sizeof(SVBT8);
DBG_ASSERT(nCountBytes <= 511-nOffset, "calc error");
DBG_ASSERT(nCountBytes <= sizeof(aChp), "calc error");
memcpy(&aChp, aFkp+nOffset, nCountBytes);
}
- return TRUE;
+ return sal_True;
}
///////////////////////////////////////////////////////////////// Assoc
Ww1Assoc::Ww1Assoc(Ww1Fib& _rFib)
- : rFib(_rFib), pBuffer(NULL), bOK(FALSE)
+ : rFib(_rFib), pBuffer(NULL), bOK(sal_False)
{
- USHORT cb = rFib.GetFIB().cbSttbfAssocGet();
- USHORT i;
+ sal_uInt16 cb = rFib.GetFIB().cbSttbfAssocGet();
+ sal_uInt16 i;
for ( i = 0; i < MaxFields; i++ )
pStrTbl[i] = NULL;
@@ -1046,23 +1046,23 @@ Ww1Assoc::Ww1Assoc(Ww1Fib& _rFib)
rFib.GetFIB().fcSttbfAssocGet()
&& rFib.GetStream().Read(pBuffer, cb) == cb)
{
- USHORT j;
+ sal_uInt16 j;
DBG_ASSERT( cb == SVBT16ToShort( *(SVBT16*)pBuffer ), "size missmatch");
for (i=0,j=sizeof(SVBT16);j<cb && i<Criteria1;i++)
{
pStrTbl[i] = pBuffer+j;
j += (*pBuffer + j) + 1;
}
- bOK = TRUE;
+ bOK = sal_True;
}
}
-String Ww1Assoc::GetStr(USHORT code)
+String Ww1Assoc::GetStr(sal_uInt16 code)
{
String sRet;
DBG_ASSERT(code<MaxFields, "out of range");
if (pStrTbl[code] != NULL)
- for( USHORT i=0;i<pStrTbl[code][0];i++ )
+ for( sal_uInt16 i=0;i<pStrTbl[code][0];i++ )
sRet += String( pStrTbl[code][i+1], RTL_TEXTENCODING_MS_1252 );
return sRet;
}
@@ -1074,7 +1074,7 @@ Ww1Pap::Ww1Pap(Ww1Fib& _rFib)
{
}
-void Ww1Pap::Seek(ULONG ulSeek)
+void Ww1Pap::Seek(sal_uLong ulSeek)
{
while (ulSeek > Where())
(*this)++;
@@ -1084,9 +1084,9 @@ void Ww1Pap::Seek(ULONG ulSeek)
// Fkps der zugehoerige Index auf 0 gesetzt werden soll
// ( darf fuer Push/Pop nicht passieren )
// Ein eleganterer Weg faellt mir auf die Schnelle nicht ein
-ULONG Ww1Pap::Where( BOOL bSetIndex )
+sal_uLong Ww1Pap::Where( sal_Bool bSetIndex )
{
- ULONG ulRet = 0xffffffff;
+ sal_uLong ulRet = 0xffffffff;
if (pPap == NULL)
if (nPlcIndex < Count())
{
@@ -1116,46 +1116,46 @@ void Ww1Pap::operator++(int)
// SH: FindSprm sucht in grpprl nach Sprm nId
// Rueckgabe: Pointer oder 0
-BOOL Ww1Pap::FindSprm(USHORT nId, BYTE* pStart, BYTE* pEnd)
-{
- Ww1Sprm aSprm( pStart, static_cast< USHORT >(pEnd-pStart) );
- USHORT nC = aSprm.Count();
- USHORT i;
- BYTE nI;
- USHORT nLen;
- BYTE *pData;
+sal_Bool Ww1Pap::FindSprm(sal_uInt16 nId, sal_uInt8* pStart, sal_uInt8* pEnd)
+{
+ Ww1Sprm aSprm( pStart, static_cast< sal_uInt16 >(pEnd-pStart) );
+ sal_uInt16 nC = aSprm.Count();
+ sal_uInt16 i;
+ sal_uInt8 nI;
+ sal_uInt16 nLen;
+ sal_uInt8 *pData;
for( i = 0; i < nC; i++ ){
aSprm.Fill( i, nI, nLen, pData );
if( nI == nId )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL Ww1Pap::HasId0(USHORT nId)
+sal_Bool Ww1Pap::HasId0(sal_uInt16 nId)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
UpdateIdx();
if( !pPap ){
- DBG_ASSERT( FALSE, "Ww1Pap::HasId():: kann kein pPap erzeugen" );
- return FALSE;
+ DBG_ASSERT( sal_False, "Ww1Pap::HasId():: kann kein pPap erzeugen" );
+ return sal_False;
}
- BYTE* pByte;
- USHORT n;
+ sal_uInt8* pByte;
+ sal_uInt16 n;
if( pPap->Fill(nFkpIndex, pByte, n) ){
- BYTE* p2 = ((W1_PAPX*)(pByte))->grpprlGet(); // SH: Offset fehlte
+ sal_uInt8* p2 = ((W1_PAPX*)(pByte))->grpprlGet(); // SH: Offset fehlte
bRet = FindSprm( nId, p2, pByte + n );
}
return bRet;
}
-BOOL Ww1Pap::HasId(USHORT nId)
+sal_Bool Ww1Pap::HasId(sal_uInt16 nId)
{
- BOOL bRet = FALSE;
- USHORT nPushedPlcIndex2 = nPlcIndex;
- USHORT nPushedFkpIndex2 = nFkpIndex;
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nPushedPlcIndex2 = nPlcIndex;
+ sal_uInt16 nPushedFkpIndex2 = nFkpIndex;
bRet = HasId0( nId );
if (nPlcIndex != nPushedPlcIndex2)
{
@@ -1164,7 +1164,7 @@ BOOL Ww1Pap::HasId(USHORT nId)
}
nPlcIndex = nPushedPlcIndex2;
nFkpIndex = nPushedFkpIndex2;
- Where( FALSE );
+ Where( sal_False );
return bRet;
}
@@ -1175,7 +1175,7 @@ Ww1Chp::Ww1Chp(Ww1Fib& _rFib)
{
}
-void Ww1Chp::Seek(ULONG ulSeek)
+void Ww1Chp::Seek(sal_uLong ulSeek)
{
while (ulSeek > Where())
(*this)++;
@@ -1185,9 +1185,9 @@ void Ww1Chp::Seek(ULONG ulSeek)
// Fkps der zugehoerige Index auf 0 gesetzt werden soll
// ( darf fuer Push/Pop nicht passieren )
// Ein eleganterer Weg faellt mir auf die Schnelle nicht ein
-ULONG Ww1Chp::Where( BOOL bSetIndex )
+sal_uLong Ww1Chp::Where( sal_Bool bSetIndex )
{
- ULONG ulRet = 0xffffffff;
+ sal_uLong ulRet = 0xffffffff;
if (pChp == NULL)
if (nPlcIndex < Count())
{
@@ -1217,8 +1217,8 @@ void Ww1Chp::operator++(int)
}
////////////////////////////////////////////////////////////// Manager
-Ww1Manager::Ww1Manager(SvStream& rStrm, ULONG nFieldFlgs)
- : bOK(FALSE), bInTtp(FALSE), bInStyle(FALSE), bStopAll(FALSE), aFib(rStrm),
+Ww1Manager::Ww1Manager(SvStream& rStrm, sal_uLong nFieldFlgs)
+ : bOK(sal_False), bInTtp(sal_False), bInStyle(sal_False), bStopAll(sal_False), aFib(rStrm),
aDop(aFib), aFonts(aFib, nFieldFlgs), aDoc(aFib), pDoc(&aDoc),
ulDocSeek(0), pSeek(&ulDocSeek), aFld(aFib), pFld(&aFld), aChp(aFib),
aPap(aFib), aFtn(aFib), aBooks(aFib),
@@ -1235,22 +1235,22 @@ Ww1Manager::Ww1Manager(SvStream& rStrm, ULONG nFieldFlgs)
&& !aBooks.GetError();
}
-BOOL Ww1Manager::HasInTable()
+sal_Bool Ww1Manager::HasInTable()
{
return aPap.HasId(24); // Ww1SingleSprmPFInTable
}
-BOOL Ww1Manager::HasTtp()
+sal_Bool Ww1Manager::HasTtp()
{
return aPap.HasId(25); // Ww1SingleSprmPTtp
}
-BOOL Ww1Manager::HasPPc()
+sal_Bool Ww1Manager::HasPPc()
{
return aPap.HasId(29); // Ww1SingleSprmPPc
}
-BOOL Ww1Manager::HasPDxaAbs()
+sal_Bool Ww1Manager::HasPDxaAbs()
{
return aPap.HasId(26); // Ww1SingleSprmPDxaAbs
}
diff --git a/sw/source/filter/ww1/w1class.hxx b/sw/source/filter/ww1/w1class.hxx
index 8ed3c585e975..a018b42a9d8c 100644
--- a/sw/source/filter/ww1/w1class.hxx
+++ b/sw/source/filter/ww1/w1class.hxx
@@ -109,13 +109,13 @@ class Ww1StyleSheet;
class Ww1Fib
{
W1_FIB aFib;
- BOOL bOK;
+ sal_Bool bOK;
SvStream& rStream;
public:
Ww1Fib(SvStream&);
friend ostream& operator <<(ostream&, Ww1Fib&);
W1_FIB& GetFIB() { return aFib; }
- BOOL GetError() { return !bOK; }
+ sal_Bool GetError() { return !bOK; }
SvStream& GetStream() { return rStream; }
};
@@ -127,10 +127,10 @@ class Ww1Dop
{
W1_DOP aDop;
Ww1Fib& rFib;
- BOOL bOK;
+ sal_Bool bOK;
public:
Ww1Dop(Ww1Fib&);
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
W1_DOP& GetDOP() {
return aDop; }
@@ -147,23 +147,23 @@ class Ww1PlainText
{
protected:
Ww1Fib& rFib;
- ULONG ulFilePos;
- ULONG ulCountBytes;
- ULONG ulSeek;
- BOOL bOK;
+ sal_uLong ulFilePos;
+ sal_uLong ulCountBytes;
+ sal_uLong ulSeek;
+ sal_Bool bOK;
public:
- Ww1PlainText(Ww1Fib& rWwFib, ULONG nFilePos, ULONG nCountBytes);
+ Ww1PlainText(Ww1Fib& rWwFib, sal_uLong nFilePos, sal_uLong nCountBytes);
// innerhalb des textes
- ULONG Where() const { return ulSeek; }
- void Seek( ULONG ulNew )
+ sal_uLong Where() const { return ulSeek; }
+ void Seek( sal_uLong ulNew )
{
DBG_ASSERT(ulNew < ulCountBytes, "Ww1PlainText");
if (ulNew < ulCountBytes)
ulSeek = ulNew;
}
- ULONG Count() const { return ulCountBytes; }
- void SetCount(ULONG ulNew)
+ sal_uLong Count() const { return ulCountBytes; }
+ void SetCount(sal_uLong ulNew)
{
ulNew += ulSeek;
if (ulCountBytes > ulNew)
@@ -174,17 +174,17 @@ public:
DBG_ASSERT(ulSeek+1<ulCountBytes, "Ww1PlainText");
ulSeek++;
}
- BOOL GetError() { return !bOK; }
- sal_Unicode Out( Ww1Shell&, ULONG& );
- sal_Unicode Out( String&, ULONG=0xffffffff);
+ sal_Bool GetError() { return !bOK; }
+ sal_Unicode Out( Ww1Shell&, sal_uLong& );
+ sal_Unicode Out( String&, sal_uLong=0xffffffff);
sal_Unicode Out( sal_Unicode& );
friend ostream& operator <<(ostream&, Ww1PlainText&);
- String& Fill( String&, ULONG=0, ULONG=0xffffffff );
- sal_Unicode operator []( ULONG );
- String GetText( ULONG ulOffset, ULONG nLen ) const;
+ String& Fill( String&, sal_uLong=0, sal_uLong=0xffffffff );
+ sal_Unicode operator []( sal_uLong );
+ String GetText( sal_uLong ulOffset, sal_uLong nLen ) const;
enum Consts { MinChar = 32 };
- static BOOL IsChar( sal_Unicode c ) { return c >= MinChar; }
+ static sal_Bool IsChar( sal_Unicode c ) { return c >= MinChar; }
};
/////////////////////////////////////////////////////////////// DocText
@@ -201,7 +201,7 @@ public:
class Ww1FtnText : public Ww1PlainText
{
public:
- ULONG Offset(Ww1Fib& rFibL) {
+ sal_uLong Offset(Ww1Fib& rFibL) {
return rFibL.GetFIB().ccpTextGet(); }
Ww1FtnText(Ww1Fib& rFibL) :
Ww1PlainText(rFibL, rFibL.GetFIB().fcMinGet() +
@@ -213,7 +213,7 @@ public:
class Ww1HddText : public Ww1PlainText
{
public:
- ULONG Offset(Ww1Fib& rFibL) {
+ sal_uLong Offset(Ww1Fib& rFibL) {
return rFibL.GetFIB().ccpTextGet() + rFibL.GetFIB().ccpFtnGet(); }
Ww1HddText(Ww1Fib& rFibL) :
Ww1PlainText(rFibL, rFibL.GetFIB().fcMinGet() +
@@ -225,7 +225,7 @@ public:
class Ww1McrText : public Ww1PlainText
{
public:
- ULONG Offset(Ww1Fib& rFibL) {
+ sal_uLong Offset(Ww1Fib& rFibL) {
return rFibL.GetFIB().ccpTextGet() + rFibL.GetFIB().ccpFtnGet()
+ rFibL.GetFIB().ccpHddGet(); }
Ww1McrText(Ww1Fib& rFibL) :
@@ -238,7 +238,7 @@ public:
class Ww1AtnText : public Ww1PlainText
{
public:
- ULONG Offset(Ww1Fib& rFibL) {
+ sal_uLong Offset(Ww1Fib& rFibL) {
return rFibL.GetFIB().ccpTextGet() + rFibL.GetFIB().ccpFtnGet()
+ rFibL.GetFIB().ccpHddGet() + rFibL.GetFIB().ccpMcrGet(); }
Ww1AtnText(Ww1Fib& rFibL) :
@@ -257,25 +257,25 @@ class Ww1Style
W1_CHP aChpx;
Ww1SprmPapx* pPapx;
Ww1StyleSheet* pParent;
- BYTE stcBase;
- BYTE stcNext;
- BOOL bUsed;
+ sal_uInt8 stcBase;
+ sal_uInt8 stcNext;
+ sal_Bool bUsed;
public:
Ww1Style();
~Ww1Style();
- BOOL IsUsed() const { return bUsed; }
- void SetDefaults(BYTE);
+ sal_Bool IsUsed() const { return bUsed; }
+ void SetDefaults(sal_uInt8);
void SetParent(Ww1StyleSheet* newParent) { pParent = newParent; }
- void SetName(const String& rName) { bUsed = TRUE; aName = rName; }
+ void SetName(const String& rName) { bUsed = sal_True; aName = rName; }
const String& GetName() const { return aName; }
// Ww1Style& GetNext();
Ww1Style& GetBase();
- USHORT GetnBase() const { return stcBase; }
- USHORT GetnNext() const { return stcNext; }
- USHORT ReadName(BYTE*&, USHORT&, USHORT stc);
- USHORT ReadChpx(BYTE*&, USHORT&);
- USHORT ReadPapx(BYTE*&, USHORT&);
- USHORT ReadEstcp(BYTE*&, USHORT&);
+ sal_uInt16 GetnBase() const { return stcBase; }
+ sal_uInt16 GetnNext() const { return stcNext; }
+ sal_uInt16 ReadName(sal_uInt8*&, sal_uInt16&, sal_uInt16 stc);
+ sal_uInt16 ReadChpx(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadPapx(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadEstcp(sal_uInt8*&, sal_uInt16&);
friend ostream& operator <<(ostream&, Ww1Style&);
void Out(Ww1Shell&, Ww1Manager&);
};
@@ -287,28 +287,28 @@ public:
class Ww1StyleSheet
{
Ww1Style aStyles[256];
- USHORT cstcStd; // count style code standard
+ sal_uInt16 cstcStd; // count style code standard
Ww1Fib& rFib;
- BOOL bOK;
- USHORT ReadNames(BYTE*&, USHORT&);
- USHORT ReadChpx(BYTE*&, USHORT&);
- USHORT ReadPapx(BYTE*&, USHORT&);
- USHORT ReadEstcp(BYTE*&, USHORT&);
+ sal_Bool bOK;
+ sal_uInt16 ReadNames(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadChpx(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadPapx(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadEstcp(sal_uInt8*&, sal_uInt16&);
- void OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc);
- void OutOne(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc);
- void OutOneWithBase(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc,
- BYTE* pbStopRecur );
+ void OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc);
+ void OutOne(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc);
+ void OutOneWithBase(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc,
+ sal_uInt8* pbStopRecur );
public:
Ww1StyleSheet(Ww1Fib& rFib);
- Ww1Style& GetStyle(USHORT stc) {
+ Ww1Style& GetStyle(sal_uInt16 stc) {
return aStyles[stc]; }
- USHORT Count() {
+ sal_uInt16 Count() {
return 256; }
friend ostream& operator <<(ostream&, Ww1StyleSheet&);
void Out(Ww1Shell&, Ww1Manager&);
friend class Ww1Style;
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
};
@@ -323,22 +323,22 @@ class Ww1Fonts
protected:
W1_FFN** pFontA; // Array of Pointers to Font Description
Ww1Fib& rFib;
- ULONG nFieldFlags;
- USHORT nMax; // Array-Groesse
- BOOL bOK;
+ sal_uLong nFieldFlags;
+ sal_uInt16 nMax; // Array-Groesse
+ sal_Bool bOK;
public:
- Ww1Fonts(Ww1Fib&, ULONG nFieldFlgs);
+ Ww1Fonts(Ww1Fib&, sal_uLong nFieldFlgs);
~Ww1Fonts() {
if (pFontA)
DELETEZ(pFontA[0]);
DELETEZ(pFontA); }
- W1_FFN* GetFFN(USHORT nNum);
- USHORT Count() {
+ W1_FFN* GetFFN(sal_uInt16 nNum);
+ sal_uInt16 Count() {
return nMax; }
friend ostream& operator <<(ostream&, Ww1Fonts&);
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
- SvxFontItem GetFont(USHORT);
+ SvxFontItem GetFont(sal_uInt16);
};
//////////////////////////////////////////////////////////// SingleSprm
@@ -368,19 +368,19 @@ public:
// stehen faellt dann auch nicht auf. Der Namensstring ist nur im
// Dumper noetig: weg damit im Filter.
//
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- virtual ostream& Dump(ostream&, BYTE*, USHORT);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ virtual ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
const sal_Char* sName;
#else
- virtual void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- virtual void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- ostream& Dump(ostream&, BYTE*, USHORT);
+ virtual void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ virtual void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
#endif
- virtual USHORT Size(BYTE*);
- USHORT nCountBytes;
+ virtual sal_uInt16 Size(sal_uInt8*);
+ sal_uInt16 nCountBytes;
- Ww1SingleSprm(USHORT nBytes, const sal_Char* /*pName*/ = 0 )
+ Ww1SingleSprm(sal_uInt16 nBytes, const sal_Char* /*pName*/ = 0 )
: nCountBytes(nBytes)
#ifdef DUMP
, sName( pName)
@@ -391,26 +391,26 @@ public:
class Ww1SingleSprmByteSized : public Ww1SingleSprm {
public:
-// ostream& Dump(ostream&, BYTE*, USHORT);
- USHORT Size(BYTE*);
- Ww1SingleSprmByteSized(USHORT nBytes, sal_Char* sName = 0) :
+// ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
+ sal_uInt16 Size(sal_uInt8*);
+ Ww1SingleSprmByteSized(sal_uInt16 nBytes, sal_Char* sName = 0) :
Ww1SingleSprm(nBytes, sName) {
}
};
class Ww1SingleSprmWordSized : public Ww1SingleSprm {
public:
-// ostream& Dump(ostream&, BYTE*, USHORT);
- USHORT Size(BYTE*);
- Ww1SingleSprmWordSized(USHORT nBytes, sal_Char* sName = 0) :
+// ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
+ sal_uInt16 Size(sal_uInt8*);
+ Ww1SingleSprmWordSized(sal_uInt16 nBytes, sal_Char* sName = 0) :
Ww1SingleSprm(nBytes, sName) {
}
};
class Ww1SingleSprmByte : public Ww1SingleSprm {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
-// USHORT Size(BYTE*);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
+// sal_uInt16 Size(sal_uInt8*);
Ww1SingleSprmByte(sal_Char* sName = 0) :
Ww1SingleSprm(1, sName) {
}
@@ -418,8 +418,8 @@ public:
class Ww1SingleSprmBool : public Ww1SingleSprmByte {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
-// USHORT Size(BYTE*);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
+// sal_uInt16 Size(sal_uInt8*);
Ww1SingleSprmBool(sal_Char* sName = 0) :
Ww1SingleSprmByte(sName) {
}
@@ -427,8 +427,8 @@ public:
class Ww1SingleSprm4State : public Ww1SingleSprmByte {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
-// USHORT Size(BYTE*);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
+// sal_uInt16 Size(sal_uInt8*);
Ww1SingleSprm4State(sal_Char* sName = 0) :
Ww1SingleSprmByte(sName) {
}
@@ -436,16 +436,16 @@ public:
class Ww1SingleSprmWord : public Ww1SingleSprm {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
-// USHORT Size(BYTE*);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
+// sal_uInt16 Size(sal_uInt8*);
Ww1SingleSprmWord(sal_Char* sName = 0)
: Ww1SingleSprm(2, sName) {}
};
class Ww1SingleSprmLong : public Ww1SingleSprm {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
-// USHORT Size(BYTE*);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
+// sal_uInt16 Size(sal_uInt8*);
Ww1SingleSprmLong(sal_Char* sName = 0) :
Ww1SingleSprm(4, sName) {
}
@@ -453,9 +453,9 @@ public:
class Ww1SingleSprmTab : public Ww1SingleSprm {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
- USHORT Size(BYTE*);
- Ww1SingleSprmTab(USHORT nBytes, sal_Char* sName = 0) :
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
+ sal_uInt16 Size(sal_uInt8*);
+ Ww1SingleSprmTab(sal_uInt16 nBytes, sal_Char* sName = 0) :
Ww1SingleSprm(nBytes, sName) {
}
};
@@ -465,8 +465,8 @@ public:
Ww1SingleSprmPJc(sal_Char* sName) :
Ww1SingleSprmByte(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxa : public Ww1SingleSprmWord {
@@ -474,7 +474,7 @@ public:
Ww1SingleSprmPDxa(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaRight : public Ww1SingleSprmPDxa {
@@ -482,7 +482,7 @@ public:
Ww1SingleSprmPDxaRight(sal_Char* sName) :
Ww1SingleSprmPDxa(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaLeft : public Ww1SingleSprmPDxa {
@@ -490,7 +490,7 @@ public:
Ww1SingleSprmPDxaLeft(sal_Char* sName) :
Ww1SingleSprmPDxa(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaLeft1 : public Ww1SingleSprmPDxa {
@@ -498,7 +498,7 @@ public:
Ww1SingleSprmPDxaLeft1(sal_Char* sName) :
Ww1SingleSprmPDxa(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPFKeep : public Ww1SingleSprmBool {
@@ -506,8 +506,8 @@ public:
Ww1SingleSprmPFKeep(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPFKeepFollow : public Ww1SingleSprmBool {
@@ -515,8 +515,8 @@ public:
Ww1SingleSprmPFKeepFollow(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPPageBreakBefore : public Ww1SingleSprmBool {
@@ -524,8 +524,8 @@ public:
Ww1SingleSprmPPageBreakBefore(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPBrc : public Ww1SingleSprmWord {
@@ -533,8 +533,8 @@ protected:
// SvxBorderLine* SetBorder(SvxBorderLine*, W1_BRC*);
// spezielle start-routine, je nach sprm verschieden versorgt
// mit einem BoxItem.
- void Start(Ww1Shell&, BYTE, W1_BRC10*, USHORT, Ww1Manager&, SvxBoxItem&);
- void Start(Ww1Shell&, BYTE, W1_BRC*, USHORT, Ww1Manager&, SvxBoxItem&);
+ void Start(Ww1Shell&, sal_uInt8, W1_BRC10*, sal_uInt16, Ww1Manager&, SvxBoxItem&);
+ void Start(Ww1Shell&, sal_uInt8, W1_BRC*, sal_uInt16, Ww1Manager&, SvxBoxItem&);
using Ww1SingleSprm::Start;
@@ -542,16 +542,16 @@ public:
Ww1SingleSprmPBrc(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
// SetBorder() wird auch fuer Tabellen gebraucht, deshalb public
static SvxBorderLine* SetBorder(SvxBorderLine*, W1_BRC10*);
};
-#define BRC_TOP ((USHORT)0)
-#define BRC_LEFT ((USHORT)1)
-#define BRC_BOTTOM ((USHORT)2)
-#define BRC_RIGHT ((USHORT)3)
-#define BRC_ANZ ((USHORT)BRC_RIGHT-BRC_TOP+1)
+#define BRC_TOP ((sal_uInt16)0)
+#define BRC_LEFT ((sal_uInt16)1)
+#define BRC_BOTTOM ((sal_uInt16)2)
+#define BRC_RIGHT ((sal_uInt16)3)
+#define BRC_ANZ ((sal_uInt16)BRC_RIGHT-BRC_TOP+1)
// Die BRC-struktur fuer 1.0 versionen von word sind verschieden von
// denen der folgenden versionen. diese werden zum glueck aber auch
@@ -559,29 +559,29 @@ public:
// SH: Ab sofort alle 4 Umrandungen ueber nur 1 Klasse.
class Ww1SingleSprmPBrc10 : public Ww1SingleSprmPBrc
{
- USHORT nLine; // BRC_TOP, BRC_LEFT, ...
+ sal_uInt16 nLine; // BRC_TOP, BRC_LEFT, ...
using Ww1SingleSprmPBrc::Start;
public:
- Ww1SingleSprmPBrc10(USHORT nL, sal_Char* sName)
+ Ww1SingleSprmPBrc10(sal_uInt16 nL, sal_Char* sName)
: Ww1SingleSprmPBrc(sName), nLine(nL) {}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmParaSpace : public Ww1SingleSprmWord {
public:
Ww1SingleSprmParaSpace(sal_Char* sName)
: Ww1SingleSprmWord(sName) {}
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDyaBefore : public Ww1SingleSprmParaSpace {
public:
Ww1SingleSprmPDyaBefore(sal_Char* sName)
: Ww1SingleSprmParaSpace(sName) {}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDyaAfter : public Ww1SingleSprmParaSpace {
@@ -589,7 +589,7 @@ public:
Ww1SingleSprmPDyaAfter(sal_Char* sName) :
Ww1SingleSprmParaSpace(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDyaLine : public Ww1SingleSprmWord {
@@ -597,8 +597,8 @@ public:
Ww1SingleSprmPDyaLine(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPChgTabsPapx : public Ww1SingleSprmByteSized {
@@ -607,8 +607,8 @@ public:
Ww1SingleSprmByteSized(0, sName) {
}
// Size() ist noch nicht aktiviert !!
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmSGprfIhdt : public Ww1SingleSprmByte {
@@ -616,7 +616,7 @@ public:
Ww1SingleSprmSGprfIhdt(sal_Char* sName) :
Ww1SingleSprmByte(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmSColumns : public Ww1SingleSprmWord {
@@ -624,7 +624,7 @@ public:
Ww1SingleSprmSColumns(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPFInTable : public Ww1SingleSprmBool {
@@ -632,8 +632,8 @@ public:
Ww1SingleSprmPFInTable(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPTtp : public Ww1SingleSprmBool {
@@ -641,8 +641,8 @@ public:
Ww1SingleSprmPTtp(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmTJc : public Ww1SingleSprmWord {
@@ -656,7 +656,7 @@ public:
// Ww1SingleSprmTDxaLeft(sal_Char* sName) :
// Ww1SingleSprmWord(sName) {
// }
-// void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+// void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
//};
class Ww1SingleSprmTDxaGapHalf : public Ww1SingleSprmWord {
@@ -664,7 +664,7 @@ public:
Ww1SingleSprmTDxaGapHalf(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmTDefTable10 : public Ww1SingleSprmWordSized {
@@ -672,7 +672,7 @@ public:
Ww1SingleSprmTDefTable10(sal_Char* sName) :
Ww1SingleSprmWordSized(0, sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmTDyaRowHeight : public Ww1SingleSprmWord {
@@ -680,7 +680,7 @@ public:
Ww1SingleSprmTDyaRowHeight(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
// Klassendefinitionen fuer Tabellen-Fastsave-Attribute
@@ -693,7 +693,7 @@ public:
Ww1SingleSprmTInsert(sal_Char* sName) :
Ww1SingleSprm(4, sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmTDelete : public Ww1SingleSprmWord {
@@ -701,7 +701,7 @@ public:
Ww1SingleSprmTDelete(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmTDxaCol : public Ww1SingleSprm {
@@ -709,7 +709,7 @@ public:
Ww1SingleSprmTDxaCol(sal_Char* sName) :
Ww1SingleSprm(4, sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmTMerge : public Ww1SingleSprmWord {
@@ -717,7 +717,7 @@ public:
Ww1SingleSprmTMerge(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmTSplit : public Ww1SingleSprmWord {
@@ -725,7 +725,7 @@ public:
Ww1SingleSprmTSplit(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmTSetBrc10 : public Ww1SingleSprm {
@@ -733,7 +733,7 @@ public:
Ww1SingleSprmTSetBrc10(sal_Char* sName) :
Ww1SingleSprm(5, sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
#endif // 0
@@ -744,7 +744,7 @@ public:
Ww1SingleSprmPpc(sal_Char* sName) :
Ww1SingleSprmByte(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaAbs : public Ww1SingleSprmWord {
@@ -752,7 +752,7 @@ public:
Ww1SingleSprmPDxaAbs(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDyaAbs : public Ww1SingleSprmWord {
@@ -760,7 +760,7 @@ public:
Ww1SingleSprmPDyaAbs(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaWidth : public Ww1SingleSprmWord {
@@ -768,7 +768,7 @@ public:
Ww1SingleSprmPDxaWidth(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPFromText : public Ww1SingleSprmWord {
@@ -776,7 +776,7 @@ public:
Ww1SingleSprmPFromText(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
////////////////////////////////////////////////////////////////// Sprm
@@ -785,48 +785,48 @@ public:
//
class Ww1Sprm
{
- BOOL ReCalc();
+ sal_Bool ReCalc();
static Ww1SingleSprm* aTab[256];
static Ww1SingleSprm* pSingleSprm;
protected:
static void InitTab();
- Ww1SingleSprm& GetTab(USHORT nId)
+ Ww1SingleSprm& GetTab(sal_uInt16 nId)
{
if( !pSingleSprm )
InitTab();
return aTab[ nId ] ? *aTab[nId] : *pSingleSprm;
}
- BYTE* p;
- USHORT nCountBytes;
- BOOL bOK;
- USHORT* pArr;
- USHORT count;
+ sal_uInt8* p;
+ sal_uInt16 nCountBytes;
+ sal_Bool bOK;
+ sal_uInt16* pArr;
+ sal_uInt16 count;
// ohne Token, mit laengen-byte/word
- USHORT GetSize(BYTE nId, BYTE* pSprm);
+ sal_uInt16 GetSize(sal_uInt8 nId, sal_uInt8* pSprm);
// mit Token und LaengenByte
- USHORT GetSizeBrutto(BYTE* pSprm) {
- BYTE nId = *pSprm++;
+ sal_uInt16 GetSizeBrutto(sal_uInt8* pSprm) {
+ sal_uInt8 nId = *pSprm++;
return GetSize(nId, pSprm) + 1; }
// gibt fuer nTh element id, size & zeiger auf daten:
-// BOOL Fill(USHORT, BYTE&, USHORT&, BYTE*&);
+// sal_Bool Fill(sal_uInt16, sal_uInt8&, sal_uInt16&, sal_uInt8*&);
public:
// SH: brauche ich public
// gibt fuer nTh element id, size & zeiger auf daten:
- BOOL Fill(USHORT, BYTE&, USHORT&, BYTE*&);
+ sal_Bool Fill(sal_uInt16, sal_uInt8&, sal_uInt16&, sal_uInt8*&);
- Ww1Sprm(BYTE*, USHORT);
- Ww1Sprm(SvStream&, ULONG);
+ Ww1Sprm(sal_uInt8*, sal_uInt16);
+ Ww1Sprm(SvStream&, sal_uLong);
~Ww1Sprm();
friend ostream& operator <<(ostream&, Ww1Sprm&);
void Start(Ww1Shell&, Ww1Manager&);
- void Start(Ww1Shell&, Ww1Manager&, USHORT);
+ void Start(Ww1Shell&, Ww1Manager&, sal_uInt16);
void Stop(Ww1Shell&, Ww1Manager&);
- BOOL IsUsed() {
+ sal_Bool IsUsed() {
return nCountBytes != 255; }
- USHORT Count() {
+ sal_uInt16 Count() {
return count; }
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
static void DeinitTab();
};
@@ -838,13 +838,13 @@ public:
//
class Ww1Picture
{
- BOOL bOK;
+ sal_Bool bOK;
W1_PIC* pPic;
public:
- Ww1Picture(SvStream&, ULONG);
+ Ww1Picture(SvStream&, sal_uLong);
~Ww1Picture() {
}
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
friend ostream& operator <<(ostream&, Ww1Picture&);
void Out(Ww1Shell&, Ww1Manager&);
@@ -859,26 +859,26 @@ public:
//
class Ww1Plc
{
- BYTE* p;
- USHORT nCountBytes;
- USHORT iMac;
- USHORT nItemSize;
- BOOL bOK;
+ sal_uInt8* p;
+ sal_uInt16 nCountBytes;
+ sal_uInt16 iMac;
+ sal_uInt16 nItemSize;
+ sal_Bool bOK;
protected:
Ww1Fib& rFib;
- BYTE* GetData(USHORT);
+ sal_uInt8* GetData(sal_uInt16);
public:
- Ww1Plc(Ww1Fib&, ULONG, USHORT, USHORT);
+ Ww1Plc(Ww1Fib&, sal_uLong, sal_uInt16, sal_uInt16);
~Ww1Plc();
friend ostream& operator <<(ostream&, Ww1Plc&);
- ULONG Where(USHORT); // wie im jeweiligen plc
- void Seek(ULONG, USHORT&);
- void Fill(USHORT nIndex, ULONG& begin, ULONG& end) {
+ sal_uLong Where(sal_uInt16); // wie im jeweiligen plc
+ void Seek(sal_uLong, sal_uInt16&);
+ void Fill(sal_uInt16 nIndex, sal_uLong& begin, sal_uLong& end) {
begin = Where(nIndex);
end = Where(nIndex+1); }
- USHORT Count() {
+ sal_uInt16 Count() {
return iMac; }
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
};
@@ -987,14 +987,14 @@ public:
///////////////////////////////////////////////////////////// PlcFields
class Ww1PlcFields : public Ww1Plc
{
- //USHORT Fill(USHORT, BYTE&, String&, String&, String&);
+ //sal_uInt16 Fill(sal_uInt16, sal_uInt8&, String&, String&, String&);
public:
- Ww1PlcFields(Ww1Fib& rFibL, ULONG start, USHORT nBytes)
+ Ww1PlcFields(Ww1Fib& rFibL, sal_uLong start, sal_uInt16 nBytes)
: Ww1Plc(rFibL, start, nBytes, 2)
{}
- W1_FLD* GetData(USHORT nIndex)
+ W1_FLD* GetData(sal_uInt16 nIndex)
{ return (W1_FLD*)Ww1Plc::GetData(nIndex); }
- ULONG Where(USHORT nIndex) // absolut im file
+ sal_uLong Where(sal_uInt16 nIndex) // absolut im file
{ return Ww1Plc::Where(nIndex) + rFib.GetFIB().fcMinGet(); }
friend ostream& operator <<(ostream&, Ww1PlcFields&);
};
@@ -1003,14 +1003,14 @@ public:
class Ww1StringList
{
sal_Char** pIdxA;
- USHORT nMax;
+ sal_uInt16 nMax;
public:
- Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb );
+ Ww1StringList( SvStream& rSt, sal_uLong nFc, sal_uInt16 nCb );
~Ww1StringList()
{ if( pIdxA ) { delete pIdxA[0]; delete pIdxA; } }
- const String GetStr( USHORT nNum ) const;
- USHORT Count() const { return nMax; }
- BOOL GetError() const { return (nMax != 0) && !pIdxA; }
+ const String GetStr( sal_uInt16 nNum ) const;
+ sal_uInt16 Count() const { return nMax; }
+ sal_Bool GetError() const { return (nMax != 0) && !pIdxA; }
};
class Ww1PlcBookmarkTxt: public Ww1StringList
@@ -1024,17 +1024,17 @@ public:
class Ww1PlcBookmarkPos : public Ww1Plc
{
-// USHORT Fill(USHORT, BYTE&, String&, String&, String&);
+// sal_uInt16 Fill(sal_uInt16, sal_uInt8&, String&, String&, String&);
public:
- Ww1PlcBookmarkPos(Ww1Fib& _rFib, ULONG start, USHORT nBytes, BOOL bEnd)
+ Ww1PlcBookmarkPos(Ww1Fib& _rFib, sal_uLong start, sal_uInt16 nBytes, sal_Bool bEnd)
: Ww1Plc(_rFib, start, nBytes, (bEnd) ? 0 : 2)
{}
- BYTE* GetData(USHORT nIndex) { return Ww1Plc::GetData(nIndex); }
+ sal_uInt8* GetData(sal_uInt16 nIndex) { return Ww1Plc::GetData(nIndex); }
// Position als CP
- ULONG WhereCP(USHORT nIndex) { return Ww1Plc::Where(nIndex); }
+ sal_uLong WhereCP(sal_uInt16 nIndex) { return Ww1Plc::Where(nIndex); }
// absolut im file
- ULONG Where(USHORT nIndex)
+ sal_uLong Where(sal_uInt16 nIndex)
{
return ( nIndex < Count() )
? Ww1Plc::Where(nIndex) + rFib.GetFIB().fcMinGet()
@@ -1061,26 +1061,26 @@ public:
class Ww1Fkp
{
protected:
- BYTE aFkp[512];
- USHORT nItemSize;
- BOOL bOK;
- BYTE* GetData(USHORT);
+ sal_uInt8 aFkp[512];
+ sal_uInt16 nItemSize;
+ sal_Bool bOK;
+ sal_uInt8* GetData(sal_uInt16);
public:
- Ww1Fkp(SvStream&, ULONG, USHORT);
+ Ww1Fkp(SvStream&, sal_uLong, sal_uInt16);
friend ostream& operator <<(ostream&, Ww1Fkp&);
- USHORT Count() const { return SVBT8ToByte(aFkp+511); }
- ULONG Where(USHORT); // wie im entsprechenden fkp
+ sal_uInt16 Count() const { return SVBT8ToByte(aFkp+511); }
+ sal_uLong Where(sal_uInt16); // wie im entsprechenden fkp
};
//////////////////////////////////////////////////////////////// FkpPap
class Ww1FkpPap : public Ww1Fkp
{
public:
- Ww1FkpPap(SvStream& rStream, ULONG ulFilePos)
+ Ww1FkpPap(SvStream& rStream, sal_uLong ulFilePos)
: Ww1Fkp(rStream, ulFilePos, 1)
{}
friend ostream& operator <<(ostream&, Ww1FkpPap&);
- BOOL Fill(USHORT, BYTE*&, USHORT&);
+ sal_Bool Fill(sal_uInt16, sal_uInt8*&, sal_uInt16&);
};
//////////////////////////////////////////////////////////////// FkpChp
@@ -1091,7 +1091,7 @@ class Ww1FkpChp : public Ww1Fkp
SvStream& GetStream() { return rStream; }
#endif
public:
- Ww1FkpChp(SvStream& rStream, ULONG ulFilePos)
+ Ww1FkpChp(SvStream& rStream, sal_uLong ulFilePos)
: Ww1Fkp(rStream, ulFilePos, 1)
#ifdef DUMP
, rStream(rStream)
@@ -1099,17 +1099,17 @@ public:
{}
friend ostream& operator <<(ostream&, Ww1FkpChp&);
- BOOL Fill(USHORT, W1_CHP&);
+ sal_Bool Fill(sal_uInt16, W1_CHP&);
};
////////////////////////////////////////////////////////////// SprmPapx
class Ww1SprmPapx : public Ww1Sprm
{
W1_PAPX aPapx;
- BYTE* Sprm(BYTE* p, USHORT nSize);
- USHORT SprmSize(BYTE* p, USHORT nSize);
+ sal_uInt8* Sprm(sal_uInt8* p, sal_uInt16 nSize);
+ sal_uInt16 SprmSize(sal_uInt8* p, sal_uInt16 nSize);
public:
- Ww1SprmPapx(BYTE* p, USHORT nSize);
+ Ww1SprmPapx(sal_uInt8* p, sal_uInt16 nSize);
friend ostream& operator <<(ostream&, Ww1SprmPapx&);
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&);
@@ -1119,7 +1119,7 @@ public:
class Ww1SprmSep : public Ww1Sprm
{
public:
- Ww1SprmSep(Ww1Fib& rFib, ULONG ulFilePos)
+ Ww1SprmSep(Ww1Fib& rFib, sal_uLong ulFilePos)
: Ww1Sprm(rFib.GetStream(), ulFilePos)
{}
friend ostream& operator <<(ostream&, Ww1SprmSep&);
@@ -1135,14 +1135,14 @@ class Ww1Assoc
Ww1Fib& rFib;
sal_Char* pBuffer;
sal_Char* pStrTbl[ MaxFields ];
- BOOL bOK;
+ sal_Bool bOK;
- String GetStr(USHORT);
+ String GetStr(sal_uInt16);
public:
Ww1Assoc(Ww1Fib&);
~Ww1Assoc() { delete pBuffer; }
- BOOL GetError() const { return !bOK; }
+ sal_Bool GetError() const { return !bOK; }
friend ostream& operator <<(ostream&, Ww1Assoc&);
void Out(Ww1Shell&);
};
@@ -1165,23 +1165,23 @@ public:
//
class Ww1HeaderFooter : public Ww1PlcHdd
{
- USHORT nextIhdd; // naechster textteil im HddText
- USHORT nFtnSep; // fusznoten trenner
- USHORT nFtnFollowSep; // folge fusznoten trenner
- USHORT nFtnNote; // folgefunsznotennotiz
- USHORT nEvenHeadL; // kopfzeilen grader seiten
- USHORT nOddHeadL; // kopfzeilen ungrader seiten
- USHORT nEvenFootL; // fuszzeilen grader seiten
- USHORT nOddFootL; // fuszzeilen ungerader seiten
- USHORT nFirstHeadL; // kopfzeilen der ersten seite
- USHORT nFirstFootL; // fuszzeilen der ersten seite
+ sal_uInt16 nextIhdd; // naechster textteil im HddText
+ sal_uInt16 nFtnSep; // fusznoten trenner
+ sal_uInt16 nFtnFollowSep; // folge fusznoten trenner
+ sal_uInt16 nFtnNote; // folgefunsznotennotiz
+ sal_uInt16 nEvenHeadL; // kopfzeilen grader seiten
+ sal_uInt16 nOddHeadL; // kopfzeilen ungrader seiten
+ sal_uInt16 nEvenFootL; // fuszzeilen grader seiten
+ sal_uInt16 nOddFootL; // fuszzeilen ungerader seiten
+ sal_uInt16 nFirstHeadL; // kopfzeilen der ersten seite
+ sal_uInt16 nFirstFootL; // fuszzeilen der ersten seite
enum HeaderFooterMode {
None, FtnSep, FtnFollowSep, FtnNote, EvenHeadL, OddHeadL,
EvenFootL, OddFootL, FirstHeadL, MaxHeaderFooterMode
} eHeaderFooterMode;
public:
- Ww1HeaderFooter(Ww1Fib& rFibL, USHORT grpfIhdt)
+ Ww1HeaderFooter(Ww1Fib& rFibL, sal_uInt16 grpfIhdt)
: Ww1PlcHdd(rFibL),
nextIhdd(0),
nFtnSep(0xffff),
@@ -1200,7 +1200,7 @@ public:
if (grpfIhdt & 0x0004) nFtnNote = nextIhdd++;
}
// ~Ww1HeaderFooter() {}
- void SetGrpfIhdt(USHORT grpfIhdt)
+ void SetGrpfIhdt(sal_uInt16 grpfIhdt)
{
if (grpfIhdt & 0x0001) nEvenHeadL = nextIhdd++;
if (grpfIhdt & 0x0002) nOddHeadL = nextIhdd++;
@@ -1210,79 +1210,79 @@ public:
if (grpfIhdt & 0x0020) nFirstFootL = nextIhdd++;
DBG_ASSERT(nextIhdd<=Count(), "Ww1HeaderFooter");
}
- BOOL operator++(int)
+ sal_Bool operator++(int)
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
eHeaderFooterMode = (HeaderFooterMode)((short)eHeaderFooterMode + 1);
if( eHeaderFooterMode == MaxHeaderFooterMode)
{
eHeaderFooterMode = None;
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
- BOOL FillFtnSep(ULONG& begin, ULONG& end)
+ sal_Bool FillFtnSep(sal_uLong& begin, sal_uLong& end)
{
if (nFtnSep == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFtnSep, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillFtnFollowSep(ULONG& begin, ULONG& end)
+ sal_Bool FillFtnFollowSep(sal_uLong& begin, sal_uLong& end)
{
if (nFtnFollowSep == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFtnFollowSep, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillFtnNote(ULONG& begin, ULONG& end)
+ sal_Bool FillFtnNote(sal_uLong& begin, sal_uLong& end)
{
if (nFtnNote == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFtnNote, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillEvenHeadL(ULONG& begin, ULONG& end)
+ sal_Bool FillEvenHeadL(sal_uLong& begin, sal_uLong& end)
{
if (nEvenHeadL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nEvenHeadL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillOddHeadL(ULONG& begin, ULONG& end)
+ sal_Bool FillOddHeadL(sal_uLong& begin, sal_uLong& end)
{
if (nOddHeadL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nOddHeadL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillEvenFootL(ULONG& begin, ULONG& end)
+ sal_Bool FillEvenFootL(sal_uLong& begin, sal_uLong& end)
{
if (nEvenFootL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nEvenFootL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillOddFootL(ULONG& begin, ULONG& end)
+ sal_Bool FillOddFootL(sal_uLong& begin, sal_uLong& end)
{
if (nOddFootL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nOddFootL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillFirstHeadL(ULONG& begin, ULONG& end)
+ sal_Bool FillFirstHeadL(sal_uLong& begin, sal_uLong& end)
{
if (nFirstHeadL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFirstHeadL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillFirstFootL(ULONG& begin, ULONG& end)
+ sal_Bool FillFirstFootL(sal_uLong& begin, sal_uLong& end)
{
if (nFirstFootL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFirstFootL, begin, end);
- return TRUE;
+ return sal_True;
}
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
@@ -1291,35 +1291,35 @@ public:
//////////////////////////////////////////////////////////////// Fields
class Ww1Fields : public Ww1PlcFields
{
- USHORT nPlcIndex;
+ sal_uInt16 nPlcIndex;
String sErgebnis; // das von word errechnete ergebniss
SwField* pField;
- ULONG Where(USHORT nIndex) // innerhalb des textes
+ sal_uLong Where(sal_uInt16 nIndex) // innerhalb des textes
{ return Ww1PlcFields::Where(nIndex) - rFib.GetFIB().fcMinGet(); }
public:
- Ww1Fields(Ww1Fib& rFibL, ULONG ulFilePos, USHORT nBytes)
+ Ww1Fields(Ww1Fib& rFibL, sal_uLong ulFilePos, sal_uInt16 nBytes)
: Ww1PlcFields(rFibL, ulFilePos, nBytes), nPlcIndex(0), pField(0)
{}
// ~Ww1Fields() {}
// innerhalb des textes
- ULONG Where() { return Where(nPlcIndex); }
+ sal_uLong Where() { return Where(nPlcIndex); }
void operator++(int)
{
DBG_ASSERT(nPlcIndex+1 <= Count(), "Ww1Fields");
nPlcIndex++;
}
- void Seek(ULONG ulNew) { Ww1PlcFields::Seek(ulNew, nPlcIndex); }
+ void Seek(sal_uLong ulNew) { Ww1PlcFields::Seek(ulNew, nPlcIndex); }
W1_FLD* GetData()
{
DBG_ASSERT(nPlcIndex < Count(), "Ww1Fields");
return Ww1PlcFields::GetData(nPlcIndex);
}
- ULONG GetLength();
+ sal_uLong GetLength();
friend ostream& operator <<(ostream&, Ww1Manager&);
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
- void Out(Ww1Shell&, Ww1Manager&, USHORT=0);
+ void Out(Ww1Shell&, Ww1Manager&, sal_uInt16=0);
};
class Ww1TextFields : public Ww1Fields
@@ -1365,10 +1365,10 @@ class Ww1Bookmarks
Ww1PlcBookmarkPos* pPos[2];
Ww1Fib& rFib;
- USHORT nPlcIdx[2];
- USHORT nIsEnd;
- BOOL bOK;
-// ULONG Where(USHORT nIndex) { // innerhalb des textes
+ sal_uInt16 nPlcIdx[2];
+ sal_uInt16 nIsEnd;
+ sal_Bool bOK;
+// sal_uLong Where(sal_uInt16 nIndex) { // innerhalb des textes
// return Ww1PlcFields::Where(nIndex) - rFib.GetFIB().fcMinGet(); }
public:
Ww1Bookmarks(Ww1Fib& rFib);
@@ -1377,34 +1377,34 @@ public:
delete pPos[1];
delete pPos[0];
}
- ULONG Where() const { return pPos[nIsEnd]->WhereCP(nPlcIdx[nIsEnd]); }
+ sal_uLong Where() const { return pPos[nIsEnd]->WhereCP(nPlcIdx[nIsEnd]); }
void operator++(int);
- BOOL GetError() const { return !bOK; }
+ sal_Bool GetError() const { return !bOK; }
long GetHandle() const;
- BOOL GetIsEnd() const { return ( nIsEnd ) ? TRUE : FALSE; }
+ sal_Bool GetIsEnd() const { return ( nIsEnd ) ? sal_True : sal_False; }
const String GetName() const;
long Len() const;
friend ostream& operator <<(ostream&, Ww1Bookmarks&);
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
- void Out(Ww1Shell&, Ww1Manager&, USHORT=0);
+ void Out(Ww1Shell&, Ww1Manager&, sal_uInt16=0);
};
///////////////////////////////////////////////////////////// Footnotes
class Ww1Footnotes : public Ww1PlcFootnoteRef
{
- USHORT nPlcIndex;
+ sal_uInt16 nPlcIndex;
Ww1PlcFootnoteTxt aText;
- BOOL bStarted;
+ sal_Bool bStarted;
public:
Ww1Footnotes(Ww1Fib& rFibL)
- : Ww1PlcFootnoteRef(rFibL), nPlcIndex(0), aText(rFibL), bStarted(FALSE)
+ : Ww1PlcFootnoteRef(rFibL), nPlcIndex(0), aText(rFibL), bStarted(sal_False)
{}
// ~Ww1Footnotes() {}
// innerhalb des textes
- ULONG Where()
+ sal_uLong Where()
{
- ULONG ulRet = 0xffffffff;
+ sal_uLong ulRet = 0xffffffff;
if (Count())
ulRet = Ww1PlcFootnoteRef::Where(nPlcIndex);
return ulRet;
@@ -1422,17 +1422,17 @@ public:
class Ww1Sep : public Ww1PlcSep
{
Ww1HeaderFooter aHdd;
- USHORT nPlcIndex;
+ sal_uInt16 nPlcIndex;
public:
- Ww1Sep(Ww1Fib& rFibL, USHORT grpfIhdt)
+ Ww1Sep(Ww1Fib& rFibL, sal_uInt16 grpfIhdt)
: Ww1PlcSep(rFibL), aHdd(rFibL, grpfIhdt), nPlcIndex(0) {}
Ww1HeaderFooter& GetHdd() { return aHdd; }
void operator++(int) { nPlcIndex++; }
- BYTE* GetData() { return Ww1PlcSep::GetData(nPlcIndex); }
+ sal_uInt8* GetData() { return Ww1PlcSep::GetData(nPlcIndex); }
// innerhalb des textes
- ULONG Where() { return Ww1PlcSep::Where(nPlcIndex); }
- void SetGrpfIhdt(BYTE grpfIhdt)
+ sal_uLong Where() { return Ww1PlcSep::Where(nPlcIndex); }
+ void SetGrpfIhdt(sal_uInt8 grpfIhdt)
{
GetHdd().SetGrpfIhdt(grpfIhdt);
// GetHdd().Start(rOut, rMan);
@@ -1445,14 +1445,14 @@ public:
/////////////////////////////////////////////////////////////////// Pap
class Ww1Pap : public Ww1PlcPap
{
- USHORT nPlcIndex;
- USHORT nPushedPlcIndex;
- USHORT nFkpIndex;
- USHORT nPushedFkpIndex;
- ULONG ulOffset;
+ sal_uInt16 nPlcIndex;
+ sal_uInt16 nPushedPlcIndex;
+ sal_uInt16 nFkpIndex;
+ sal_uInt16 nPushedFkpIndex;
+ sal_uLong ulOffset;
Ww1FkpPap* pPap;
- BOOL FindSprm(USHORT nId, BYTE* pStart, BYTE* pEnd);
+ sal_Bool FindSprm(sal_uInt16 nId, sal_uInt8* pStart, sal_uInt8* pEnd);
void UpdateIdx()
{
if (pPap && nFkpIndex >= pPap->Count() )
@@ -1464,26 +1464,26 @@ class Ww1Pap : public Ww1PlcPap
if( !pPap )
Where();
}
- BOOL HasId0(USHORT nId);
+ sal_Bool HasId0(sal_uInt16 nId);
public:
Ww1Pap(Ww1Fib& rFib);
~Ww1Pap() { delete pPap; }
- ULONG Where( BOOL bSetIndex = TRUE ); // innerhalb des textes
+ sal_uLong Where( sal_Bool bSetIndex = sal_True ); // innerhalb des textes
void operator++(int);
- BOOL FillStart(BYTE*& pB, USHORT& nSize)
+ sal_Bool FillStart(sal_uInt8*& pB, sal_uInt16& nSize)
{
UpdateIdx();
return pPap->Fill(nFkpIndex, pB, nSize);
}
- BOOL FillStop(BYTE*& pB, USHORT& nSize)
+ sal_Bool FillStop(sal_uInt8*& pB, sal_uInt16& nSize)
{
- return nFkpIndex ? pPap->Fill(nFkpIndex-1, pB, nSize) : FALSE;
+ return nFkpIndex ? pPap->Fill(nFkpIndex-1, pB, nSize) : sal_False;
}
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
- void Seek(ULONG);
- void Push(ULONG ulOffsetTmp = 0)
+ void Seek(sal_uLong);
+ void Push(sal_uLong ulOffsetTmp = 0)
{
DBG_ASSERT(!Pushed(), "Ww1Pap");
nPushedPlcIndex = nPlcIndex;
@@ -1493,7 +1493,7 @@ public:
delete pPap;
pPap = NULL;
}
- BOOL Pushed()
+ sal_Bool Pushed()
{
return nPushedPlcIndex != 0xffff;
}
@@ -1507,19 +1507,19 @@ public:
nPushedFkpIndex = 0xffff;
delete pPap;
pPap = NULL;
- Where( FALSE );
+ Where( sal_False );
}
- BOOL HasId(USHORT nId);
+ sal_Bool HasId(sal_uInt16 nId);
};
/////////////////////////////////////////////////////////////////// Chp
class Ww1Chp : public Ww1PlcChp
{
- USHORT nPlcIndex;
- USHORT nPushedPlcIndex;
- USHORT nFkpIndex;
- USHORT nPushedFkpIndex;
- ULONG ulOffset;
+ sal_uInt16 nPlcIndex;
+ sal_uInt16 nPushedPlcIndex;
+ sal_uInt16 nFkpIndex;
+ sal_uInt16 nPushedFkpIndex;
+ sal_uLong ulOffset;
Ww1FkpChp* pChp;
void UpdateIdx()
{
@@ -1536,19 +1536,19 @@ class Ww1Chp : public Ww1PlcChp
public:
Ww1Chp( Ww1Fib& rFib );
~Ww1Chp() { delete pChp; }
- ULONG Where( BOOL bSetIndex = TRUE ); // innerhalb des textes
+ sal_uLong Where( sal_Bool bSetIndex = sal_True ); // innerhalb des textes
void operator++(int);
- BOOL FillStart(W1_CHP& rChp)
+ sal_Bool FillStart(W1_CHP& rChp)
{
UpdateIdx();
return pChp->Fill(nFkpIndex, rChp);
}
- BOOL FillStop(W1_CHP& rChp)
- { return nFkpIndex ? pChp->Fill(nFkpIndex-1, rChp) : FALSE; }
+ sal_Bool FillStop(W1_CHP& rChp)
+ { return nFkpIndex ? pChp->Fill(nFkpIndex-1, rChp) : sal_False; }
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
- void Seek(ULONG);
- void Push(ULONG ulOffsetTmp = 0)
+ void Seek(sal_uLong);
+ void Push(sal_uLong ulOffsetTmp = 0)
{
DBG_ASSERT(!Pushed(), "Ww1Chp");
nPushedPlcIndex = nPlcIndex;
@@ -1558,7 +1558,7 @@ public:
delete pChp;
pChp = NULL;
}
- BOOL Pushed() { return nPushedPlcIndex != 0xffff; }
+ sal_Bool Pushed() { return nPushedPlcIndex != 0xffff; }
void Pop()
{
DBG_ASSERT(Pushed(), "Ww1Chp");
@@ -1569,7 +1569,7 @@ public:
nPushedFkpIndex = 0xffff;
delete pChp;
pChp = NULL;
- Where( FALSE );
+ Where( sal_False );
}
};
@@ -1581,18 +1581,18 @@ public:
//
class Ww1Manager
{
- BOOL bOK;
- BOOL bInTtp;
- BOOL bInStyle;
- BOOL bStopAll;
+ sal_Bool bOK;
+ sal_Bool bInTtp;
+ sal_Bool bInStyle;
+ sal_Bool bStopAll;
Ww1Fib aFib;
Ww1Dop aDop;
Ww1Fonts aFonts;
// ab jetzt alles paarig, fuer 'pushed':
Ww1DocText aDoc;
Ww1PlainText* pDoc;
- ULONG ulDocSeek;
- ULONG* pSeek;
+ sal_uLong ulDocSeek;
+ sal_uLong* pSeek;
Ww1TextFields aFld;
Ww1Fields* pFld;
// selbst 'push'bar:
@@ -1608,42 +1608,42 @@ class Ww1Manager
void Out(Ww1Shell&, sal_Unicode );
public:
- Ww1Manager(SvStream& rStrm, ULONG nFieldFlgs);
- BOOL GetError() const { return !bOK; }
+ Ww1Manager(SvStream& rStrm, sal_uLong nFieldFlgs);
+ sal_Bool GetError() const { return !bOK; }
// Fuer Tabellen
- void SetInTtp(BOOL bSet = TRUE) { bInTtp = bSet; }
- BOOL IsInTtp() const { return bInTtp; }
- void SetInStyle(BOOL bSet = TRUE) { bInStyle = bSet; }
- BOOL IsInStyle() const { return bInStyle; }
- void SetStopAll(BOOL bSet = TRUE) { bStopAll = bSet; }
- BOOL IsStopAll() const { return bStopAll; }
- BOOL HasInTable();
- BOOL HasTtp();
- BOOL LastHasTtp();
+ void SetInTtp(sal_Bool bSet = sal_True) { bInTtp = bSet; }
+ sal_Bool IsInTtp() const { return bInTtp; }
+ void SetInStyle(sal_Bool bSet = sal_True) { bInStyle = bSet; }
+ sal_Bool IsInStyle() const { return bInStyle; }
+ void SetStopAll(sal_Bool bSet = sal_True) { bStopAll = bSet; }
+ sal_Bool IsStopAll() const { return bStopAll; }
+ sal_Bool HasInTable();
+ sal_Bool HasTtp();
+ sal_Bool LastHasTtp();
// Fuer Flys
- BOOL HasPPc();
- BOOL HasPDxaAbs();
+ sal_Bool HasPPc();
+ sal_Bool HasPDxaAbs();
Ww1Fib& GetFib() { return aFib; }
Ww1PlainText& GetText() { return *pDoc; }
Ww1Dop& GetDop() { return aDop; }
Ww1Sep& GetSep() { return aSep; }
// innerhalb des textes
- ULONG Where() { return pDoc->Where(); }
+ sal_uLong Where() { return pDoc->Where(); }
void Fill( sal_Unicode& rChr ) { pDoc->Out( rChr ); }
- BYTE Fill( String& rStr, ULONG ulLen)
+ sal_uInt8 Fill( String& rStr, sal_uLong ulLen)
{
ulLen += pDoc->Where();
- return sal::static_int_cast< BYTE >(pDoc->Out(rStr, ulLen));
+ return sal::static_int_cast< sal_uInt8 >(pDoc->Out(rStr, ulLen));
}
- SvxFontItem GetFont(USHORT nFCode);
+ SvxFontItem GetFont(sal_uInt16 nFCode);
friend Ww1Shell& operator <<(Ww1Shell&, Ww1Manager&);
friend ostream& operator <<(ostream&, Ww1Manager&);
- BOOL Pushed() { return pDoc != &aDoc; }
+ sal_Bool Pushed() { return pDoc != &aDoc; }
void Pop();
- void Push0(Ww1PlainText* pDoc, ULONG, Ww1Fields* = 0);
- void Push1(Ww1PlainText* pDoc, ULONG ulSeek, ULONG ulSeek2 = 0,
+ void Push0(Ww1PlainText* pDoc, sal_uLong, Ww1Fields* = 0);
+ void Push1(Ww1PlainText* pDoc, sal_uLong ulSeek, sal_uLong ulSeek2 = 0,
Ww1Fields* = 0);
};
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index 45e94726cddc..b27c2c2b2f11 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -114,9 +114,9 @@ Ww1Shell& operator <<(Ww1Shell& rOut, Ww1Manager& This)
if (!This.Pushed())
{
{ // der wird nur temporaer gebraucht:
- This.SetInStyle( TRUE );
+ This.SetInStyle( sal_True );
Ww1StyleSheet(This.aFib).Out(rOut, This);
- This.SetInStyle( FALSE );
+ This.SetInStyle( sal_False );
}
{ // dieser auch:
Ww1Assoc(This.aFib).Out(rOut);
@@ -146,9 +146,9 @@ Ww1Shell& operator <<(Ww1Shell& rOut, Ww1Manager& This)
// ist:
cUnknown = This.pDoc->Out(rOut, *This.pSeek);
}
- This.SetStopAll(TRUE);
+ This.SetStopAll(sal_True);
This.OutStop(rOut, cUnknown); // Damit die Attribute am Ende geschlossen
- This.SetStopAll(FALSE); // werden
+ This.SetStopAll(sal_False); // werden
return rOut;
}
@@ -183,7 +183,7 @@ void Ww1Manager::OutStart( Ww1Shell& rOut )
if (!Pushed())
aBooks.Start(rOut, *this);
// bestimmen, wo das naechste Ereigniss ist:
- ULONG ulEnd = pDoc->Count(); // spaetestens am textende
+ sal_uLong ulEnd = pDoc->Count(); // spaetestens am textende
if (!Pushed())
if (ulEnd > aSep.Where()) // naechster Sep vorher?
ulEnd = aSep.Where();
@@ -231,8 +231,8 @@ void Ww1Manager::Out(Ww1Shell& rOut, sal_Unicode cUnknown)
// Optimierung: Sie werden nur auf sinnvolle Werte gesetzt, wenn
// das 0x07-Zeiche ansteht.
- BOOL bLIsTtp = FALSE;
- BOOL bLHasTtp = FALSE;
+ sal_Bool bLIsTtp = sal_False;
+ sal_Bool bLHasTtp = sal_False;
if( cUnknown == 0x07 )
{
bLIsTtp = IsInTtp();
@@ -281,16 +281,16 @@ void Ww1Manager::Out(Ww1Shell& rOut, sal_Unicode cUnknown)
OutStart( rOut ); // Attrs ggfs. starten und Naechste Pos berechnen
}
-SvxFontItem Ww1Manager::GetFont(USHORT nFCode)
+SvxFontItem Ww1Manager::GetFont(sal_uInt16 nFCode)
{
return aFonts.GetFont(nFCode);
}
-void Ww1Manager::Push0(Ww1PlainText* _pDoc, ULONG ulSeek, Ww1Fields* _pFld)
+void Ww1Manager::Push0(Ww1PlainText* _pDoc, sal_uLong ulSeek, Ww1Fields* _pFld)
{
DBG_ASSERT(!Pushed(), "Ww1Manager");
this->pDoc = _pDoc;
- pSeek = new ULONG;
+ pSeek = new sal_uLong;
*pSeek = pDoc->Where();
aPap.Push(ulSeek);
aChp.Push(ulSeek);
@@ -300,12 +300,12 @@ void Ww1Manager::Push0(Ww1PlainText* _pDoc, ULONG ulSeek, Ww1Fields* _pFld)
// ulSeek ist der FC-Abstand zwischen Hauptest-Start und Sondertext-Start
// ulSeek2 ist der Offset dieses bestimmten Sondertextes im Sondertext-Bereich,
// also z.B. der Offset des speziellen K/F-Textes
-void Ww1Manager::Push1(Ww1PlainText* _pDoc, ULONG ulSeek, ULONG ulSeek2,
+void Ww1Manager::Push1(Ww1PlainText* _pDoc, sal_uLong ulSeek, sal_uLong ulSeek2,
Ww1Fields* _pFld)
{
DBG_ASSERT(!Pushed(), "Ww1Manager");
this->pDoc = _pDoc;
- pSeek = new ULONG;
+ pSeek = new sal_uLong;
*pSeek = pDoc->Where();
aPap.Push(ulSeek + ulSeek2);
aChp.Push(ulSeek + ulSeek2);
@@ -329,7 +329,7 @@ void Ww1Manager::Pop()
///////////////////////////////////////////////////////////// Bookmarks
-void Ww1Bookmarks::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT)
+void Ww1Bookmarks::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16)
{
if (GetIsEnd())
{
@@ -355,7 +355,7 @@ void Ww1Bookmarks::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT)
String aVal( rMan.GetText().GetText( Where(), nLen ) );
// in 2 Schritten, da OS/2 zu doof ist
- SwFltBookmark aBook( rName, aVal, GetHandle(), FALSE );
+ SwFltBookmark aBook( rName, aVal, GetHandle(), sal_False );
rOut << aBook;
}
@@ -381,10 +381,10 @@ void Ww1Footnotes::Start(Ww1Shell& rOut, Ww1Manager& rMan)
{
Ww1FtnText* pText = new Ww1FtnText(rMan.GetFib());
// beginn des textes dieser fusznote:
- ULONG start = aText.Where(nPlcIndex);
+ sal_uLong start = aText.Where(nPlcIndex);
pText->Seek(start);
// laenge des textes
- ULONG count = aText.Where(nPlcIndex+1) - start;
+ sal_uLong count = aText.Where(nPlcIndex+1) - start;
pText->SetCount(count);
// fusznotenkennung sollte das erste byte sein
pText->Out(c);
@@ -392,7 +392,7 @@ void Ww1Footnotes::Start(Ww1Shell& rOut, Ww1Manager& rMan)
count--; // fuer das eben gelesene kenn-byte
// fusznoten mode beginnen:
rOut.BeginFootnote();
- bStarted = TRUE;
+ bStarted = sal_True;
rMan.Push0(pText, pText->Offset(rMan.GetFib()),
new Ww1FootnoteFields(rMan.GetFib()));
rOut << rMan;
@@ -473,7 +473,7 @@ static WWDateTime GetTimeDatePara( const String& rForm,
}
else // keine Zeit
{
- eDT = (WWDateTime)( eDT & ~(USHORT)WW_TIME );
+ eDT = (WWDateTime)( eDT & ~(sal_uInt16)WW_TIME );
}
xub_StrLen nDPos = 0;
@@ -504,34 +504,34 @@ static WWDateTime GetTimeDatePara( const String& rForm,
DFF_DDDMMMY, DFF_DDDMMMY, DFF_DDDMMMYY, DFF_DDDMMMYY
};
- BOOL bHasDay = STRING_NOTFOUND != rForm.Search( 't' ) ||
+ sal_Bool bHasDay = STRING_NOTFOUND != rForm.Search( 't' ) ||
STRING_NOTFOUND != rForm.Search( 'T' ) ||
STRING_NOTFOUND != rForm.Search( 'd' ) ||
STRING_NOTFOUND != rForm.Search( 'D' );
- BOOL bLongDayOfWeek= STRING_NOTFOUND != rForm.SearchAscii( "tttt" ) ||
+ sal_Bool bLongDayOfWeek= STRING_NOTFOUND != rForm.SearchAscii( "tttt" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "TTTT" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "dddd" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "DDDD" );
- BOOL bDayOfWeek = STRING_NOTFOUND != rForm.SearchAscii( "ttt" ) ||
+ sal_Bool bDayOfWeek = STRING_NOTFOUND != rForm.SearchAscii( "ttt" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "TTT" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "ddd" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "DDD" );
// M, MM -> numeric month
// MMM, MMMM -> text. month
- BOOL bLitMonth = STRING_NOTFOUND != rForm.SearchAscii( "MMM" );
+ sal_Bool bLitMonth = STRING_NOTFOUND != rForm.SearchAscii( "MMM" );
// MMMM -> full month
- BOOL bFullMonth = STRING_NOTFOUND != rForm.SearchAscii( "MMMM" );
+ sal_Bool bFullMonth = STRING_NOTFOUND != rForm.SearchAscii( "MMMM" );
// jj, JJ -> 2-col-year
// jjjj, JJJJ -> 4-col-year
- BOOL bFullYear = STRING_NOTFOUND != rForm.SearchAscii( "jjj" ) ||
+ sal_Bool bFullYear = STRING_NOTFOUND != rForm.SearchAscii( "jjj" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "JJJ" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "yyy" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "YYY" );
- USHORT i = ( bLitMonth & 1 )
+ sal_uInt16 i = ( bLitMonth & 1 )
| ( ( bFullYear & 1 ) << 1 )
| ( ( bFullMonth & 1 ) << 2 )
| ( ( bDayOfWeek & 1 ) << 3 )
@@ -546,17 +546,17 @@ static WWDateTime GetTimeDatePara( const String& rForm,
}
else
{
- eDT = (WWDateTime)( eDT & ~(USHORT)WW_DATE );
+ eDT = (WWDateTime)( eDT & ~(sal_uInt16)WW_DATE );
}
return eDT;
}
-extern void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich,
- USHORT& rSubType, ULONG &rFmt,
- USHORT nVersion );
+extern void sw3io_ConvertFromOldField( SwDoc& rDoc, sal_uInt16& rWhich,
+ sal_uInt16& rSubType, sal_uLong &rFmt,
+ sal_uInt16 nVersion );
-void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT nDepth)
+void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 nDepth)
{
String sType; // der typ als string
String sFormel; // die formel
@@ -580,7 +580,7 @@ void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT nDepth)
if ( pos != STRING_NOTFOUND )
aStr.Erase(0, 1);
sFormel += aStr;
- BYTE rbType = pData->fltGet();
+ sal_uInt8 rbType = pData->fltGet();
do {
// solange den formelteil einlesen, bis das feld entweder
// zuende ist oder der ergebnisteil beginnt. dabei koennen
@@ -623,7 +623,7 @@ void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT nDepth)
pData = GetData();
}
DBG_ASSERT(pData->chGet()==21, "Ww1PlainText");
- BOOL bKnown = TRUE;
+ sal_Bool bKnown = sal_True;
DBG_ASSERT(pField==0, "Ww1PlainText");
if (pField != 0)
{
@@ -701,7 +701,7 @@ oncemore:
IS("anzzeichen", "numberofchars", 28)
IS("dateiname", "filename", 29)
IS("vorlage", "templatename", 30)
- bKnown = FALSE;
+ bKnown = sal_False;
#undef IS
if (rbType != 14)
goto oncemore;
@@ -735,8 +735,8 @@ oncemore:
case 22: // revision date
case 23: // print date
case 25:{// edit time
- USHORT nSub;
- USHORT nReg = 0; // RegInfoFormat, DefaultFormat fuer DocInfoFelder
+ sal_uInt16 nSub;
+ sal_uInt16 nReg = 0; // RegInfoFormat, DefaultFormat fuer DocInfoFelder
switch( rbType )
{
@@ -794,9 +794,9 @@ oncemore:
if( eDT & WW_DATE )
{
- USHORT nWhich = RES_DATEFLD;
- USHORT nSubType = DATEFLD;
- ULONG nFormat = aDate;
+ sal_uInt16 nWhich = RES_DATEFLD;
+ sal_uInt16 nSubType = DATEFLD;
+ sal_uLong nFormat = aDate;
sw3io_ConvertFromOldField( rOut.GetDoc(),
nWhich, nSubType, nFormat, 0x0110 );
pField = new SwDateTimeField((SwDateTimeFieldType*)
@@ -808,9 +808,9 @@ oncemore:
}
if( eDT & WW_TIME )
{
- USHORT nWhich = RES_TIMEFLD;
- USHORT nSubType = TIMEFLD;
- ULONG nFormat = aTime;
+ sal_uInt16 nWhich = RES_TIMEFLD;
+ sal_uInt16 nSubType = TIMEFLD;
+ sal_uLong nFormat = aTime;
sw3io_ConvertFromOldField( rOut.GetDoc(),
nWhich, nSubType, nFormat, 0x0110 );
pField = new SwDateTimeField((SwDateTimeFieldType*)
@@ -895,7 +895,7 @@ oncemore:
SwFieldType* pFT = rOut.GetDoc().InsertFldType(
SwSetExpFieldType( &rOut.GetDoc(), aName, nsSwGetSetExpType::GSE_STRING ) );
pField = new SwSetExpField((SwSetExpFieldType*)pFT, aStr );
- ((SwSetExpField*)pField)->SetInputFlag( TRUE );
+ ((SwSetExpField*)pField)->SetInputFlag( sal_True );
((SwSetExpField*)pField)->SetSubType(nsSwExtendedSubType::SUB_INVISIBLE);
// pField.SetPromptText( aQ ); //!! fehlt noch
// aFld.SetPar2( aDef ); //!! dito
@@ -956,14 +956,14 @@ oncemore:
|| sExt.EqualsIgnoreCaseAscii( ".pic" ))
rOut.AddGraphic( sName );
else
- bKnown = FALSE;
+ bKnown = sal_False;
}
else
- bKnown = FALSE;
+ bKnown = sal_False;
}
break;
default: // unknown
- DBG_ASSERT(FALSE, "Ww1PlainText");
+ DBG_ASSERT(sal_False, "Ww1PlainText");
// unsupported:
case 1: // unknown
case 2: // possible bookmark
@@ -1000,7 +1000,7 @@ oncemore:
case 52: // auto number outline
case 53: // auto number legal
case 54: // auto number arabic
- bKnown = FALSE;
+ bKnown = sal_False;
break;
}
if( bKnown || sErgebnis.EqualsAscii( "\270" ))
@@ -1012,13 +1012,13 @@ oncemore:
(*this)++;
}
-ULONG Ww1Fields::GetLength()
+sal_uLong Ww1Fields::GetLength()
{
// berechnet die laenge eines feldteiles. nicht mitgerechnet werden
// die terminierenden zeichen im text (19, 20, 21) die beginn, trenner
// und ende bedeuten.
- ULONG ulBeg = Where();
- ULONG ulEnd = Where(nPlcIndex+1);
+ sal_uLong ulBeg = Where();
+ sal_uLong ulEnd = Where(nPlcIndex+1);
DBG_ASSERT(ulBeg<ulEnd, "Ww1Fields");
return (ulEnd - ulBeg) - 1;
}
@@ -1045,7 +1045,7 @@ void Ww1Sep::Start(Ww1Shell& rOut, Ww1Manager& rMan)
// momentanes attribut beginnt, wird dieses attribut eingefuegt.
// diese methode ist bei den meisten start/stop methoden der
// memberklassen des managers identisch.
- BYTE* pByte = GetData();
+ sal_uInt8* pByte = GetData();
Ww1SprmSep aSprm(rFib, SVBT32ToUInt32(pByte + 2));
aSprm.Start(rOut, rMan);
aSprm.Stop(rOut, rMan);
@@ -1059,8 +1059,8 @@ void Ww1Pap::Start(Ww1Shell& rOut, Ww1Manager& rMan)
{
if (rMan.Where() >= Where())
{
- BYTE* pByte;
- USHORT cb;
+ sal_uInt8* pByte;
+ sal_uInt16 cb;
// bereitstellen der zu startenden attribute
if (FillStart(pByte, cb))
{
@@ -1076,8 +1076,8 @@ void Ww1Pap::Stop(Ww1Shell& rOut, Ww1Manager& rMan, sal_Unicode&)
{
if (rMan.Where() >= Where() || rMan.IsStopAll())
{
- BYTE* pByte;
- USHORT cb;
+ sal_uInt8* pByte;
+ sal_uInt16 cb;
if (FillStop(pByte, cb)){
Ww1SprmPapx aSprm(pByte, cb);
aSprm.Stop(rOut, rMan);
@@ -1118,15 +1118,15 @@ void W1_CHP::Out(Ww1Shell& rOut, Ww1Manager& rMan)
switch (kulGet()) {
case 0: {
rOut << SvxUnderlineItem(UNDERLINE_NONE, RES_CHRATR_UNDERLINE) <<
- SvxWordLineModeItem(FALSE, RES_CHRATR_WORDLINEMODE);
+ SvxWordLineModeItem(sal_False, RES_CHRATR_WORDLINEMODE);
} break;
- default: DBG_ASSERT(FALSE, "Chpx");
+ default: DBG_ASSERT(sal_False, "Chpx");
case 1: {
rOut << SvxUnderlineItem(UNDERLINE_SINGLE, RES_CHRATR_UNDERLINE);
} break;
case 2: {
rOut << SvxUnderlineItem(UNDERLINE_SINGLE, RES_CHRATR_UNDERLINE) <<
- SvxWordLineModeItem(TRUE, RES_CHRATR_WORDLINEMODE);
+ SvxWordLineModeItem(sal_True, RES_CHRATR_WORDLINEMODE);
} break;
case 3: {
rOut << SvxUnderlineItem(UNDERLINE_DOUBLE, RES_CHRATR_UNDERLINE);
@@ -1138,7 +1138,7 @@ void W1_CHP::Out(Ww1Shell& rOut, Ww1Manager& rMan)
if (fsIcoGet())
switch(icoGet()) {
- default: DBG_ASSERT(FALSE, "Chpx");
+ default: DBG_ASSERT(sal_False, "Chpx");
case 0: { rOut.EndItem(RES_CHRATR_COLOR); } break;
case 1: { rOut << SvxColorItem(Color(COL_BLACK), RES_CHRATR_COLOR); } break;
case 2: { rOut << SvxColorItem(Color(COL_LIGHTBLUE), RES_CHRATR_COLOR); } break;
@@ -1264,7 +1264,7 @@ void Ww1Style::Out(Ww1Shell& rOut, Ww1Manager& rMan)
// umstaenden nicht erreicht wurde. dann wurde das kontrollzeichen
// zwar (weg-)gelesen, jedoch noch nicht ausgegeben.
//
-sal_Unicode Ww1PlainText::Out( Ww1Shell& rOut, ULONG& ulEnd )
+sal_Unicode Ww1PlainText::Out( Ww1Shell& rOut, sal_uLong& ulEnd )
{
// gibt die zeichen bis ulEnd aus, es sei den es kommen sonderzeichen
// die eine bedeutung haben wie absatzende oder seitenumbruch.
@@ -1282,7 +1282,7 @@ sal_Unicode Ww1PlainText::Out( Ww1Shell& rOut, ULONG& ulEnd )
return Ww1PlainText::MinChar;
}
-sal_Unicode Ww1PlainText::Out( String& rStr, ULONG ulEnd )
+sal_Unicode Ww1PlainText::Out( String& rStr, sal_uLong ulEnd )
{
// wie Out(Shell..., jedoch ausgabe auf einen string
rStr.Erase();
@@ -1348,7 +1348,7 @@ void Ww1SprmPapx::Stop(Ww1Shell& rOut, Ww1Manager& rMan)
}
///////////////////////////////////////////////////////////////// Fonts
-SvxFontItem Ww1Fonts::GetFont(USHORT nFCode)
+SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode)
{
// erzeugen eine fonts im sw-sinne aus den word-strukturen
FontFamily eFamily = FAMILY_DONTKNOW;
@@ -1399,7 +1399,7 @@ SvxFontItem Ww1Fonts::GetFont(USHORT nFCode)
|| aName.EqualsIgnoreCaseAscii("ITC Zapf Dingbats") )
eCharSet = RTL_TEXTENCODING_SYMBOL;
// FontFamily ........................................
- USHORT b = pF->ffGet();
+ sal_uInt16 b = pF->ffGet();
static FontFamily eFamilyA[] =
{
FAMILY_DONTKNOW, FAMILY_ROMAN, FAMILY_SWISS, FAMILY_MODERN,
@@ -1410,7 +1410,7 @@ SvxFontItem Ww1Fonts::GetFont(USHORT nFCode)
}
else
{
- DBG_ASSERT(FALSE, "WW1Fonts::GetFont: Nicht existenter Font !");
+ DBG_ASSERT(sal_False, "WW1Fonts::GetFont: Nicht existenter Font !");
eFamily = FAMILY_SWISS;
aName.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "Helv" ));
ePitch = PITCH_VARIABLE;
@@ -1468,7 +1468,7 @@ void Ww1Dop::Out(Ww1Shell& rOut)
nDefTabSiz = 709;
// wir wollen genau einen DefaultTab
- SvxTabStopItem aNewTab(1, USHORT(nDefTabSiz), SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP);
+ SvxTabStopItem aNewTab(1, sal_uInt16(nDefTabSiz), SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP);
((SvxTabStop&)aNewTab[0]).GetAdjustment() = SVX_TAB_ADJUST_DEFAULT;
rOut.GetDoc().GetAttrPool().SetPoolDefaultItem( aNewTab); //~ mdt: besser (GetDoc)
@@ -1532,7 +1532,7 @@ void Ww1Assoc::Out(Ww1Shell& rOut)
}
//////////////////////////////////////////////////////////// StyleSheet
-void Ww1StyleSheet::OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc)
+void Ww1StyleSheet::OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc)
{
switch (stc){
case 222: // Null
@@ -1643,7 +1643,7 @@ void Ww1StyleSheet::OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc)
}
}
-void Ww1StyleSheet::OutOne(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc)
+void Ww1StyleSheet::OutOne(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc)
{
const RES_POOL_COLLFMT_TYPE RES_NONE = RES_POOLCOLL_DOC_END;
RES_POOL_COLLFMT_TYPE aType = RES_NONE;
@@ -1734,18 +1734,18 @@ void Ww1StyleSheet::OutOne(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc)
OutDefaults(rOut, rMan, stc);
GetStyle(stc).Out(rOut, rMan);
rOut.EndStyle();
-// rMan.SetInApo(FALSE);
+// rMan.SetInApo(sal_False);
}
// OutOneWithBase() liest einen Style mit OutOne() einen Style ein
// Jedoch liest er, wenn noch nicht geschehen, den Basisstyle rekursiv ein
void Ww1StyleSheet::OutOneWithBase(Ww1Shell& rOut, Ww1Manager& rMan,
- USHORT stc, BYTE* pbStopRecur )
+ sal_uInt16 stc, sal_uInt8* pbStopRecur )
{
// SH: lineares Einlesen ist Scheisse, da dann BasedOn nicht gesetzt
// werden kann und ausserdem Toggle- und Modify-Attrs (z.B. Tabs ) nicht gehen.
Ww1Style& rSty = GetStyle(stc);
- USHORT nBase = rSty.GetnBase();
+ sal_uInt16 nBase = rSty.GetnBase();
if( nBase != stc
&& !rOut.IsStyleImported( nBase )
&& GetStyle(nBase).IsUsed()
@@ -1759,9 +1759,9 @@ void Ww1StyleSheet::OutOneWithBase(Ww1Shell& rOut, Ww1Manager& rMan,
void Ww1StyleSheet::Out(Ww1Shell& rOut, Ww1Manager& rMan)
{
- USHORT stc;
- BYTE bStopRecur[256];
- memset( bStopRecur, FALSE, sizeof(bStopRecur) );
+ sal_uInt16 stc;
+ sal_uInt8 bStopRecur[256];
+ memset( bStopRecur, sal_False, sizeof(bStopRecur) );
// 1. Durchlauf: Styles mit Basisstyles rekursiv
for (stc=0;stc<Count();stc++)
@@ -1772,7 +1772,7 @@ void Ww1StyleSheet::Out(Ww1Shell& rOut, Ww1Manager& rMan)
for (stc=0;stc<Count();stc++){
Ww1Style& rSty = GetStyle(stc);
if ( rSty.IsUsed() ){
- USHORT nNext = rSty.GetnNext();
+ sal_uInt16 nNext = rSty.GetnNext();
if( nNext != stc && GetStyle(nNext).IsUsed() )
rOut.NextStyle( stc, nNext );
}
@@ -1780,12 +1780,12 @@ void Ww1StyleSheet::Out(Ww1Shell& rOut, Ww1Manager& rMan)
}
////////////////////////////////////////////////////////////// Picture
-static ULONG GuessPicSize(W1_PIC* pPic)
+static sal_uLong GuessPicSize(W1_PIC* pPic)
{
- USHORT maxx = pPic->mfp.xExtGet();
- USHORT padx = ((maxx + 7) / 8) * 8;
- USHORT maxy = pPic->mfp.yExtGet();
- return 120L + (ULONG)padx * maxy;
+ sal_uInt16 maxx = pPic->mfp.xExtGet();
+ sal_uInt16 padx = ((maxx + 7) / 8) * 8;
+ sal_uInt16 maxy = pPic->mfp.yExtGet();
+ return 120L + (sal_uLong)padx * maxy;
}
//
@@ -1796,30 +1796,30 @@ static ULONG GuessPicSize(W1_PIC* pPic)
void Ww1Picture::WriteBmp(SvStream& rOut)
{
long nSize = pPic->lcbGet() - (sizeof(*pPic)-sizeof(pPic->rgb));
- BYTE* p = pPic->rgbGet();
- USHORT maxx = pPic->mfp.xExtGet();
- USHORT padx = ((maxx + 7) / 8) * 8;
- USHORT maxy = pPic->mfp.yExtGet();
+ sal_uInt8* p = pPic->rgbGet();
+ sal_uInt16 maxx = pPic->mfp.xExtGet();
+ sal_uInt16 padx = ((maxx + 7) / 8) * 8;
+ sal_uInt16 maxy = pPic->mfp.yExtGet();
- /*USHORT unknown1 = SVBT16ToShort(p);*/ p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
- /*USHORT unknown2 = SVBT16ToShort(p);*/ p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
+ /*sal_uInt16 unknown1 = SVBT16ToShort(p);*/ p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
+ /*sal_uInt16 unknown2 = SVBT16ToShort(p);*/ p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
#if OSL_DEBUG_LEVEL > 1
- USHORT x = SVBT16ToShort(p);
+ sal_uInt16 x = SVBT16ToShort(p);
(void) x;
#endif
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
#if OSL_DEBUG_LEVEL > 1
- USHORT y = SVBT16ToShort(p);
+ sal_uInt16 y = SVBT16ToShort(p);
(void) y;
#endif
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
#if OSL_DEBUG_LEVEL > 1
- USHORT planes = SVBT16ToShort(p);
+ sal_uInt16 planes = SVBT16ToShort(p);
(void) planes;
#endif
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
#if OSL_DEBUG_LEVEL > 1
- USHORT bitcount = SVBT16ToShort(p);
+ sal_uInt16 bitcount = SVBT16ToShort(p);
(void) bitcount;
#endif
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
@@ -1860,40 +1860,40 @@ void Ww1Picture::WriteBmp(SvStream& rOut)
wLong(0);
wLong(16);
wLong(16);
- USHORT i;
+ sal_uInt16 i;
for (i=0;nSize>0&&i<16;i++)
{
wByte(*p);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
wByte(*p);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
wByte(*p);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
wByte(0);
}
DBG_ASSERT(padx*maxy/2==nSize, "Ww1Picture");
- USHORT j;
+ sal_uInt16 j;
#if 1
{
- BYTE* pBuf = new BYTE[padx];
+ sal_uInt8* pBuf = new sal_uInt8[padx];
for (j=0;nSize>0&&j<maxy;j++)
{
- BYTE* q = pBuf;
+ sal_uInt8* q = pBuf;
for (i=0;nSize>0&&i<maxx;i+=2)
{
*q++ = *p>>4;
*q++ = *p&0xf;
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
}
for (;i<padx;i+=2)
{
*q++ = 0;
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
}
if(rOut.Write(pBuf, padx) != padx){
delete [] pBuf;
@@ -1910,13 +1910,13 @@ void Ww1Picture::WriteBmp(SvStream& rOut)
wByte(*p>>4);
wByte(*p&0xf);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
}
for (;i<padx;i+=2)
{
wByte(0);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
}
}
#endif
@@ -1933,7 +1933,7 @@ error:
void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/)
{
Graphic* pGraphic = 0;
- USHORT mm;
+ sal_uInt16 mm;
switch (mm = pPic->mfp.mmGet())
{
case 8: // embedded metafile
@@ -1960,7 +1960,7 @@ void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/)
case 98: // TIFF-Name
{
String aDir( (sal_Char*)pPic->rgbGet(),
- (USHORT)(pPic->lcbGet() - (sizeof(*pPic)-sizeof(pPic->rgb))),
+ (sal_uInt16)(pPic->lcbGet() - (sizeof(*pPic)-sizeof(pPic->rgb))),
RTL_TEXTENCODING_MS_1252 );
//SvFileStream aOut(aDir, STREAM_READ|STREAM_WRITE|STREAM_TRUNC);
rOut.AddGraphic( aDir );
@@ -1970,7 +1970,7 @@ void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/)
// case 99: // SH: bei meinem BspDoc 41738.doc auch embedded Bitmap,
// aber leider anderes Format
{
- ULONG nSiz = GuessPicSize(pPic);
+ sal_uLong nSiz = GuessPicSize(pPic);
SvMemoryStream aOut(nSiz, 8192);
WriteBmp(aOut);
Bitmap aBmp;
@@ -2004,8 +2004,8 @@ void Ww1HeaderFooter::Start(Ww1Shell& rOut, Ww1Manager& rMan)
break;
case OddHeadL:
{
- ULONG begin = 0;
- ULONG end = 0;
+ sal_uLong begin = 0;
+ sal_uLong end = 0;
if (FillOddHeadL(begin, end))
{
Ww1HddText* pText = new Ww1HddText(rMan.GetFib());
@@ -2025,8 +2025,8 @@ void Ww1HeaderFooter::Start(Ww1Shell& rOut, Ww1Manager& rMan)
break;
case OddFootL:
{
- ULONG begin = 0;
- ULONG end = 0;
+ sal_uLong begin = 0;
+ sal_uLong end = 0;
if (FillOddFootL(begin, end))
{
Ww1HddText* pText = new Ww1HddText(rMan.GetFib());
diff --git a/sw/source/filter/ww1/w1par.cxx b/sw/source/filter/ww1/w1par.cxx
index 7c7d0f9ed8ff..a6fcef57890c 100644
--- a/sw/source/filter/ww1/w1par.cxx
+++ b/sw/source/filter/ww1/w1par.cxx
@@ -47,13 +47,13 @@
// Initialisieren der Feld-FilterFlags
//----------------------------------------
-static ULONG WW1_Read_FieldIniFlags()
+static sal_uLong WW1_Read_FieldIniFlags()
{
-// USHORT i;
+// sal_uInt16 i;
static const sal_Char* aNames[ 1 ] = { "WinWord/WW1F" };
sal_uInt32 aVal[ 1 ];
SwFilterOptions aOpt( 1, aNames, aVal );
- ULONG nFieldFlags = aVal[ 0 ];
+ sal_uLong nFieldFlags = aVal[ 0 ];
if ( SwFltGetFlag( nFieldFlags, SwFltControlStack::HYPO ) )
{
@@ -73,17 +73,17 @@ static ULONG WW1_Read_FieldIniFlags()
// Diese werden dann einfach per Pipe 'uebertragen'.
//
-ULONG WW1Reader::Read(SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam, const String& /*cName*/)
+sal_uLong WW1Reader::Read(SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam, const String& /*cName*/)
{
- ULONG nRet = ERR_SWG_READ_ERROR;
+ sal_uLong nRet = ERR_SWG_READ_ERROR;
ASSERT(pStrm!=NULL, "W1-Read ohne Stream");
if (pStrm != NULL)
{
- BOOL bNew = !bInsertMode; // Neues Doc ( kein Einfuegen )
+ sal_Bool bNew = !bInsertMode; // Neues Doc ( kein Einfuegen )
// erstmal eine shell konstruieren: die ist schnittstelle
// zum writer-dokument
- ULONG nFieldFlags = WW1_Read_FieldIniFlags();
+ sal_uLong nFieldFlags = WW1_Read_FieldIniFlags();
Ww1Shell* pRdr = new Ww1Shell( rDoc, rPam, rBaseURL, bNew, nFieldFlags );
if( pRdr )
{
@@ -133,7 +133,7 @@ ULONG WW1Reader::Read(SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam, const St
// in einen Stream werden alle Informationen, die aus der Datei
// gelesen werden, in die shell ge'piped'.
//
-Ww1Shell::Ww1Shell( SwDoc& rD, SwPaM& rPam, const String& rBaseURL, BOOL bNew, ULONG nFieldFlags)
+Ww1Shell::Ww1Shell( SwDoc& rD, SwPaM& rPam, const String& rBaseURL, sal_Bool bNew, sal_uLong nFieldFlags)
: SwFltShell(&rD, rPam, rBaseURL, bNew, nFieldFlags)
{
}
diff --git a/sw/source/filter/ww1/w1par.hxx b/sw/source/filter/ww1/w1par.hxx
index c3f5c22bdf02..2db214f0ceb1 100644
--- a/sw/source/filter/ww1/w1par.hxx
+++ b/sw/source/filter/ww1/w1par.hxx
@@ -37,7 +37,7 @@
class Ww1Shell : public SwFltShell
{
public:
- Ww1Shell(SwDoc&, SwPaM&, const String& rBaseURL, BOOL bNew, ULONG nFieldFlags);
+ Ww1Shell(SwDoc&, SwPaM&, const String& rBaseURL, sal_Bool bNew, sal_uLong nFieldFlags);
};
diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx
index c03ff6419395..f652ee31d877 100644
--- a/sw/source/filter/ww1/w1sprm.cxx
+++ b/sw/source/filter/ww1/w1sprm.cxx
@@ -65,22 +65,22 @@ using namespace ::com::sun::star;
void Ww1Sprm::Stop( Ww1Shell& rOut, Ww1Manager& rMan)
{
if(IsUsed())
-// for(USHORT i=0;i<Count();i++)
+// for(sal_uInt16 i=0;i<Count();i++)
for(short i=Count()-1;i>=0;i--){ // rueckwaerts
- BYTE nId;
- USHORT nSize;
- BYTE* pSprm;
+ sal_uInt8 nId;
+ sal_uInt16 nSize;
+ sal_uInt8* pSprm;
Fill(i, nId, nSize, pSprm);
GetTab(nId).Stop(rOut, nId, pSprm, nSize, rMan);
}
}
void Ww1Sprm::Start(
- Ww1Shell& rOut, Ww1Manager& rMan, USHORT i)
+ Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 i)
{
- BYTE nId;
- USHORT nSize;
- BYTE* pSprm;
+ sal_uInt8 nId;
+ sal_uInt16 nSize;
+ sal_uInt8* pSprm;
Fill(i, nId, nSize, pSprm);
GetTab(nId).Start(rOut, nId, pSprm, nSize, rMan);
}
@@ -89,20 +89,20 @@ void Ww1Sprm::Start(
Ww1Shell& rOut, Ww1Manager& rMan)
{
if(IsUsed())
- for(USHORT i=0;i<Count();i++)
+ for(sal_uInt16 i=0;i<Count();i++)
Start(rOut, rMan, i);
}
//////////////////////////////////////////////////////////// SingleSprm
void Ww1SingleSprm::Start(
- Ww1Shell&, BYTE /*nId*/, BYTE*, USHORT, Ww1Manager&)
+ Ww1Shell&, sal_uInt8 /*nId*/, sal_uInt8*, sal_uInt16, Ww1Manager&)
{
}
void Ww1SingleSprm::Stop(
- Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&)
+ Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&)
{
-// ASSERT(FALSE, "Unknown Sprm");
+// ASSERT(sal_False, "Unknown Sprm");
}
////////////////////////////////////////////////////////////////// STOP
@@ -113,11 +113,11 @@ void Ww1SingleSprm::Stop(
//
#define STOP1(Class, Code) \
void Class::Stop( \
- Ww1Shell& rOut, BYTE, BYTE*, USHORT, Ww1Manager&) { \
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&) { \
rOut.EndItem(Code); }
#define STOP2(Class, Code1, Code2) \
void Class::Stop( \
- Ww1Shell& rOut, BYTE, BYTE*, USHORT, Ww1Manager&) { \
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&) { \
rOut.EndItem(Code1).EndItem(Code2); }
/////////////////////////////////////////////////////// SingleSprmXxxxx
@@ -129,7 +129,7 @@ void Ww1SingleSprm::Stop(
// virtualen methoden bei beginn und ende der formatierung gerufen.
//
void Ww1SingleSprmPDxaLeft::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
SvxLRSpaceItem aLR((SvxLRSpaceItem&)rOut.GetAttr(RES_LR_SPACE));
short nPara = SVBT16ToShort(pSprm);
@@ -142,7 +142,7 @@ void Ww1SingleSprmPDxaLeft::Start(
}
void Ww1SingleSprmPDxaRight::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
SvxLRSpaceItem aLR((SvxLRSpaceItem&)rOut.GetAttr(RES_LR_SPACE));
short nPara = SVBT16ToShort(pSprm);
@@ -153,7 +153,7 @@ void Ww1SingleSprmPDxaRight::Start(
}
void Ww1SingleSprmPDxaLeft1::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
SvxLRSpaceItem aLR((SvxLRSpaceItem&)rOut.GetAttr(RES_LR_SPACE));
short nPara = SVBT16ToShort(pSprm);
@@ -166,14 +166,14 @@ void Ww1SingleSprmPDxaLeft1::Start(
STOP1(Ww1SingleSprmPDxa, RES_LR_SPACE)
void Ww1SingleSprmPJc::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
static SvxAdjust __READONLY_DATA aAdj[] = {
SVX_ADJUST_LEFT,
SVX_ADJUST_CENTER,
SVX_ADJUST_RIGHT,
SVX_ADJUST_BLOCK };
- BYTE nPara = SVBT8ToByte(pSprm);
+ sal_uInt8 nPara = SVBT8ToByte(pSprm);
nPara %=(sizeof(aAdj)/sizeof(*aAdj));
rOut << SvxAdjustItem(aAdj[nPara], RES_PARATR_ADJUST);
}
@@ -181,7 +181,7 @@ void Ww1SingleSprmPJc::Start(
STOP1(Ww1SingleSprmPJc, RES_PARATR_ADJUST)
void Ww1SingleSprmPFKeep::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
rOut << SvxFmtSplitItem((SVBT8ToByte(pSprm) & 1) == 0, RES_PARATR_SPLIT);
}
@@ -189,7 +189,7 @@ void Ww1SingleSprmPFKeep::Start(
STOP1(Ww1SingleSprmPFKeep, RES_PARATR_SPLIT)
void Ww1SingleSprmPFKeepFollow::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
rOut << SvxFmtKeepItem((SVBT8ToByte(pSprm) & 1) != 0, RES_KEEP);
}
@@ -197,7 +197,7 @@ void Ww1SingleSprmPFKeepFollow::Start(
STOP1(Ww1SingleSprmPFKeepFollow, RES_KEEP)
void Ww1SingleSprmPPageBreakBefore::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
rOut << SvxFmtBreakItem(SVBT8ToByte(pSprm) & 1?
SVX_BREAK_PAGE_BEFORE:SVX_BREAK_NONE, RES_BREAK );
@@ -207,12 +207,12 @@ STOP1(Ww1SingleSprmPPageBreakBefore, RES_BREAK)
SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc)
{
- USHORT nCode;
+ sal_uInt16 nCode;
if(pBrc->dxpLine2WidthGet() == 0)
{
switch(pBrc->dxpLine1WidthGet())
{
- default: ASSERT(FALSE, "unknown linewidth");
+ default: ASSERT(sal_False, "unknown linewidth");
case 0: return 0; // keine Linie
case 1: nCode = DEF_LINE_WIDTH_0; break;
case 2: nCode = DEF_LINE_WIDTH_1; break;
@@ -227,20 +227,20 @@ SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc
{
switch(pBrc->dxpLine1WidthGet())
{
- default: ASSERT(FALSE, "unknown linewidth");
+ default: ASSERT(sal_False, "unknown linewidth");
case 1: nCode = DEF_DOUBLE_LINE0_IN; break;
}
pLine->SetOutWidth(nCode);
switch(pBrc->dxpLine2WidthGet())
{
- default: ASSERT(FALSE, "unknown linewidth");
+ default: ASSERT(sal_False, "unknown linewidth");
case 1: nCode = DEF_DOUBLE_LINE0_OUT; break;
}
pLine->SetInWidth(nCode);
}
switch(pBrc->dxpLine1WidthGet())
{
- default: ASSERT(FALSE, "unknown space");
+ default: ASSERT(sal_False, "unknown space");
case 0: nCode = DEF_DOUBLE_LINE0_DIST; break;
case 1: nCode = DEF_DOUBLE_LINE1_DIST; break;
case 2: nCode = DEF_DOUBLE_LINE2_DIST; break;
@@ -251,9 +251,9 @@ SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc
}
void Ww1SingleSprmPBrc::Start(
- Ww1Shell& rOut, BYTE,
+ Ww1Shell& rOut, sal_uInt8,
W1_BRC10* pBrc,
- USHORT
+ sal_uInt16
#ifdef DBG_UTIL
nSize
#endif
@@ -285,11 +285,11 @@ void Ww1SingleSprmPBrc::Start(
STOP2(Ww1SingleSprmPBrc, RES_BOX, RES_SHADOW)
-static USHORT __READONLY_DATA nBrcTrans[BRC_ANZ] =
+static sal_uInt16 __READONLY_DATA nBrcTrans[BRC_ANZ] =
{ BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT };
void Ww1SingleSprmPBrc10::Start(
- Ww1Shell& rOut, BYTE nId, BYTE* pSprm, USHORT nSize, Ww1Manager& rMan)
+ Ww1Shell& rOut, sal_uInt8 nId, sal_uInt8* pSprm, sal_uInt16 nSize, Ww1Manager& rMan)
{
W1_BRC10* pBrc =(W1_BRC10*)pSprm;
@@ -306,7 +306,7 @@ void Ww1SingleSprmPBrc10::Start(
STOP1(Ww1SingleSprmParaSpace, RES_UL_SPACE)
void Ww1SingleSprmPDyaBefore::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nPara = SVBT16ToShort(pSprm);
if(nPara < 0)
@@ -317,7 +317,7 @@ void Ww1SingleSprmPDyaBefore::Start(
}
void Ww1SingleSprmPDyaAfter::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nPara = SVBT16ToShort(pSprm);
if(nPara < 0)
@@ -330,30 +330,30 @@ void Ww1SingleSprmPDyaAfter::Start(
STOP1(Ww1SingleSprmPDyaLine, RES_PARATR_LINESPACING)
void Ww1SingleSprmPDyaLine::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nSpace = SVBT16ToShort(pSprm);
if(nSpace < 0)
nSpace = -nSpace;
SvxLineSpacingItem aLSpc( LINE_SPACE_DEFAULT_HEIGHT, RES_PARATR_LINESPACING );
- if(TRUE)
+ if(sal_True)
{// MultilineSpace(proportional)
long n = nSpace * 100 / 240; // W1: 240 = 100%, SW: 100 = 100%
if(n>200)
n = 200; // SW_UI-Maximum
aLSpc.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
- aLSpc.SetPropLineSpace((BYTE)n);
+ aLSpc.SetPropLineSpace((sal_uInt8)n);
}
else
{// Fixed / Minimum
- aLSpc.SetLineHeight((USHORT)nSpace);
+ aLSpc.SetLineHeight((sal_uInt16)nSpace);
aLSpc.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF;
}
rOut << aLSpc;
}
void Ww1SingleSprmPChgTabsPapx::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
#if OSL_DEBUG_LEVEL > 1
// rOut << 'T';
@@ -363,10 +363,10 @@ void Ww1SingleSprmPChgTabsPapx::Start(
// : nLeftParaMgn; // Absatz L-Space
short i;
- BYTE nDel = pSprm[1];
- BYTE* pDel = pSprm + 2; // Del - Array
- BYTE nIns = pSprm[nDel*2+2];
- BYTE* pIns = pSprm + 2*nDel + 3; // Ins - Array
+ sal_uInt8 nDel = pSprm[1];
+ sal_uInt8* pDel = pSprm + 2; // Del - Array
+ sal_uInt8 nIns = pSprm[nDel*2+2];
+ sal_uInt8* pIns = pSprm + 2*nDel + 3; // Ins - Array
W1_TBD* pTyp = (W1_TBD*)(pSprm + 2*nDel + 2*nIns + 3);// Typ - Array
SvxTabStopItem aAttr( (SvxTabStopItem&)rOut.GetNodeOrStyAttr( RES_PARATR_TABSTOP ));
@@ -374,7 +374,7 @@ void Ww1SingleSprmPChgTabsPapx::Start(
SvxTabStop aTabStop;
for( i=0; i<nDel; i++ ){
- USHORT nPos = aAttr.GetPos( SVBT16ToShort( pDel + i*2 ) - nLeftPMgn );
+ sal_uInt16 nPos = aAttr.GetPos( SVBT16ToShort( pDel + i*2 ) - nLeftPMgn );
if( nPos != SVX_TAB_NOTFOUND )
aAttr.Remove( nPos, 1 );
}
@@ -400,7 +400,7 @@ void Ww1SingleSprmPChgTabsPapx::Start(
case 4: aTabStop.GetFill() = '_'; break;
}
- USHORT nPos2 = aAttr.GetPos( nPos );
+ sal_uInt16 nPos2 = aAttr.GetPos( nPos );
if( nPos2 != SVX_TAB_NOTFOUND )
aAttr.Remove( nPos2, 1 ); // sonst weigert sich das Insert()
@@ -412,13 +412,13 @@ void Ww1SingleSprmPChgTabsPapx::Start(
STOP1(Ww1SingleSprmPChgTabsPapx, RES_PARATR_TABSTOP)
void Ww1SingleSprmSGprfIhdt::Start(
- Ww1Shell& /*rOut*/, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& rMan)
+ Ww1Shell& /*rOut*/, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& rMan)
{
rMan.GetSep().SetGrpfIhdt(SVBT8ToByte(pSprm));
}
void Ww1SingleSprmSColumns::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nColSpace = 708; // default 1,25 cm
short nNettoWidth = -1; //~ mdt: dxaLeft/Right missing...
@@ -432,22 +432,22 @@ void Ww1SingleSprmSColumns::Start(
}
void Ww1SingleSprmPTtp::Start(
- Ww1Shell& /*rOut*/, BYTE, BYTE*, USHORT, Ww1Manager& rMan)
+ Ww1Shell& /*rOut*/, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager& rMan)
{
- rMan.SetInTtp( TRUE ); // Besonderheit: wird bei InTable::Stop und
+ rMan.SetInTtp( sal_True ); // Besonderheit: wird bei InTable::Stop und
// nicht bei InTtp::Stop zurueckgesetzt,
// da Auswertung in InTable
}
void Ww1SingleSprmPTtp::Stop(
- Ww1Shell& rOut, BYTE, BYTE*, USHORT, Ww1Manager& rMan)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager& rMan)
{
if (rOut.IsInTable() && rMan.HasInTable())
rOut.NextTableRow();
}
void Ww1SingleSprmPFInTable::Start(
- Ww1Shell& /*rOut*/, BYTE, BYTE*, USHORT,
+ Ww1Shell& /*rOut*/, sal_uInt8, sal_uInt8*, sal_uInt16,
Ww1Manager& /*rMan*/)
{
}
@@ -458,26 +458,26 @@ void Ww1SingleSprmPFInTable::Stop(
rOut
#endif
,
- BYTE, BYTE*, USHORT,
+ sal_uInt8, sal_uInt8*, sal_uInt16,
Ww1Manager& rMan)
{
ASSERT(rOut.IsInTable(), "");
- rMan.SetInTtp( FALSE );
+ rMan.SetInTtp( sal_False );
}
void Ww1SingleSprmTDxaGapHalf::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nSpace = SVBT16ToShort(pSprm);
rOut.SetCellSpace(nSpace);
}
void Ww1SingleSprmTDefTable10::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT nSize, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 nSize, Ww1Manager& /*rMan*/)
{
- USHORT i;
- BYTE *p = pSprm + 2; // LaengenWord ueberlesen
- BYTE nCount = *p;
+ sal_uInt16 i;
+ sal_uInt8 *p = pSprm + 2; // LaengenWord ueberlesen
+ sal_uInt8 nCount = *p;
p++;
nSize -= 3;
// Es fehlt noch:
@@ -494,7 +494,7 @@ void Ww1SingleSprmTDefTable10::Start(
// noch gesetzt werden ?
{
short nWholeWidth = SVBT16ToShort( p + 2 * nCount ) - nPos;
- rOut.SetTableWidth( (USHORT)nWholeWidth ); // Tabellenbreite setzen
+ rOut.SetTableWidth( (sal_uInt16)nWholeWidth ); // Tabellenbreite setzen
// Pos der Tabelle setzen
long nMidTab = nPos + nWholeWidth / 2; // TabellenMitte
@@ -515,17 +515,17 @@ void Ww1SingleSprmTDefTable10::Start(
rOut.SetTableOrient( eOri );
}
- BYTE* pEndPos = p+2;
- BYTE* pTc0 = ( nSize >= nCount * 10 ) ? pEndPos + 2 * nCount : 0;
- USHORT nCellsDeleted = 0; // fuer gemergte Zellen
+ sal_uInt8* pEndPos = p+2;
+ sal_uInt8* pTc0 = ( nSize >= nCount * 10 ) ? pEndPos + 2 * nCount : 0;
+ sal_uInt16 nCellsDeleted = 0; // fuer gemergte Zellen
for( i = 0; i < nCount; i++ ){
// Info sammeln
W1_TC* pTc = (W1_TC*)pTc0;
- BOOL bMerged = (pTc) ? pTc->fMergedGet() : FALSE;
+ sal_Bool bMerged = (pTc) ? pTc->fMergedGet() : sal_False;
// Zellenbreiten setzen
- USHORT nPos1 = SVBT16ToShort( pEndPos );
+ sal_uInt16 nPos1 = SVBT16ToShort( pEndPos );
if( !bMerged )
rOut.SetCellWidth( nPos1 - nPos, i - nCellsDeleted );
// Zellenbreite setzen
@@ -536,14 +536,14 @@ void Ww1SingleSprmTDefTable10::Start(
if( pTc0 ){ // gibts TCs ueberhaupt ?
W1_TC* pTc2 = (W1_TC*)pTc0;
- BOOL bMerged2 = pTc2->fMergedGet();
+ sal_Bool bMerged2 = pTc2->fMergedGet();
// ASSERT( !bMerged2, "Gemergte Tabellenzellen noch nicht vollstaendig implementiert" );
if( !bMerged2 ){
// und nun die Umrandungen
SvxBoxItem aBox( (SvxBoxItem&)rOut.GetCellAttr( RES_BOX ));
SvxBorderLine aLine;
W1_BRC10* pBrc = pTc2->rgbrcGet();
- for( USHORT j=0; j<4; j++ ){
+ for( sal_uInt16 j=0; j<4; j++ ){
aBox.SetLine(Ww1SingleSprmPBrc::SetBorder(&aLine, pBrc),
nBrcTrans[j]);
pBrc++;
@@ -561,7 +561,7 @@ void Ww1SingleSprmTDefTable10::Start(
void Ww1SingleSprmTDyaRowHeight::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nSpace = SVBT16ToShort(pSprm);
rOut.SetCellHeight(nSpace);
@@ -570,9 +570,9 @@ void Ww1SingleSprmTDyaRowHeight::Start(
// Fastsave-Attribute brauche ich als Dymmys nicht
void Ww1SingleSprmPpc::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& rMan)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& rMan)
{
- BYTE nPpc = SVBT8ToByte(pSprm);
+ sal_uInt8 nPpc = SVBT8ToByte(pSprm);
if (rOut.IsInTable()) // Flys in Tabellen kann PMW
return; // nicht
@@ -613,7 +613,7 @@ void Ww1SingleSprmPpc::Start(
}
void Ww1SingleSprmPDxaAbs::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& rMan)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& rMan)
{
short nXPos = SVBT16ToShort(pSprm);
@@ -638,7 +638,7 @@ void Ww1SingleSprmPDxaAbs::Start(
}
void Ww1SingleSprmPDyaAbs::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nYPos = SVBT16ToShort(pSprm);
sal_Int16 eVRel = text::RelOrientation::FRAME;
@@ -654,14 +654,14 @@ void Ww1SingleSprmPDyaAbs::Start(
}
void Ww1SingleSprmPDxaWidth::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nDxaWidth = SVBT16ToShort(pSprm);
rOut.SetFlyFrmAttr( SwFmtFrmSize( ATT_VAR_SIZE, nDxaWidth, MINFLY ) );
}
void Ww1SingleSprmPFromText::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
if( rOut.IsInFly() ){ // Kommt auch ausserhalb eines Flys vor, hat
// dann aber offensichtlich nichts zu bedeuten.
diff --git a/sw/source/filter/ww1/w1struct.hxx b/sw/source/filter/ww1/w1struct.hxx
index bc5261fac03f..0e3a91ffc0c6 100644
--- a/sw/source/filter/ww1/w1struct.hxx
+++ b/sw/source/filter/ww1/w1struct.hxx
@@ -38,343 +38,343 @@ class Ww1Manager;
struct W1_FIB /////////////////////////////////////////////////////////
{
SVBT16 wIdent;// 0x0 int magic number
- USHORT wIdentGet() {
+ sal_uInt16 wIdentGet() {
return SVBT16ToShort(wIdent); }
SVBT16 nFib;// 0x2 FIB version written
- USHORT nFibGet() {
+ sal_uInt16 nFibGet() {
return SVBT16ToShort(nFib); }
SVBT16 nProduct;// 0x4 product version written by
- USHORT nProductGet() {
+ sal_uInt16 nProductGet() {
return SVBT16ToShort(nProduct); }
SVBT16 nlocale;// 0x6 language stamp---localized version;
- USHORT nlocaleGet() {
+ sal_uInt16 nlocaleGet() {
return SVBT16ToShort(nlocale); }
SVBT16 pnNext;// 0x8
- USHORT pnNextGet() {
+ sal_uInt16 pnNextGet() {
return SVBT16ToShort(pnNext); }
SVBT16 fFlags;
- USHORT fFlagsGet() {
+ sal_uInt16 fFlagsGet() {
return SVBT16ToShort(fFlags); }
// SVBT16 fDot :1;// 0xa 0001
- BOOL fDotGet() {
+ sal_Bool fDotGet() {
return 0 != ((fFlagsGet() >> 0) & 1); }
// SVBT16 fGlsy :1;// 0002
- BOOL fGlsyGet() {
+ sal_Bool fGlsyGet() {
return 0 != ((fFlagsGet() >> 1) & 1); }
// SVBT16 fComplex :1;// 0004 when 1, file is in complex, fast-saved format.
- BOOL fComplexGet() {
+ sal_Bool fComplexGet() {
return 0 != ((fFlagsGet() >> 2) & 1); }
// SVBT16 fHasPic :1;// 0008 file contains 1 or more pictures
- BOOL fHasPicGet() {
+ sal_Bool fHasPicGet() {
return 0 != ((fFlagsGet() >> 3) & 1); }
// SVBT16 cQuickSaves :4;// 00F0 count of times file was quicksaved
- USHORT cQuickSavesGet() {
- return (USHORT)((fFlagsGet() >> 4) & 0xf); }
+ sal_uInt16 cQuickSavesGet() {
+ return (sal_uInt16)((fFlagsGet() >> 4) & 0xf); }
// SVBT16 u1 :8;// FF00 unused
- USHORT u1Get() {
- return (USHORT)((fFlagsGet() >> 8) & 0xff); }
+ sal_uInt16 u1Get() {
+ return (sal_uInt16)((fFlagsGet() >> 8) & 0xff); }
SVBT16 nFibBack;// 0xc
- USHORT nFibBackGet() {
+ sal_uInt16 nFibBackGet() {
return SVBT16ToShort(nFibBack); }
SVBT16 u2[5];// 0xe reserved
SVBT32 fcMin;// 0x18 file offset of first character of text
- ULONG fcMinGet() {
+ sal_uLong fcMinGet() {
return SVBT32ToUInt32(fcMin); }
SVBT32 fcMac;// 0x1c file offset of last character of text + 1
- ULONG fcMacGet() {
+ sal_uLong fcMacGet() {
return SVBT32ToUInt32(fcMac); }
SVBT32 cbMac;// 0x20 file offset of last byte written to file + 1.
- ULONG cbMacGet() {
+ sal_uLong cbMacGet() {
return SVBT32ToUInt32(cbMac); }
SVBT32 u4[4];// 0x24 reserved
SVBT32 ccpText;// 0x34 length of main document text stream
- ULONG ccpTextGet() {
+ sal_uLong ccpTextGet() {
return SVBT32ToUInt32(ccpText); }
SVBT32 ccpFtn;// 0x38 length of footnote subdocument text stream
- ULONG ccpFtnGet() {
+ sal_uLong ccpFtnGet() {
return SVBT32ToUInt32(ccpFtn); }
SVBT32 ccpHdd;// 0x3c length of header subdocument text stream
- ULONG ccpHddGet() {
+ sal_uLong ccpHddGet() {
return SVBT32ToUInt32(ccpHdd); }
SVBT32 ccpMcr;// 0x40 length of macro subdocument text stream
- ULONG ccpMcrGet() {
+ sal_uLong ccpMcrGet() {
return SVBT32ToUInt32(ccpMcr); }
SVBT32 ccpAtn;// 0x44 length of annotation subdocument text stream
- ULONG ccpAtnGet() {
+ sal_uLong ccpAtnGet() {
return SVBT32ToUInt32(ccpAtn); }
SVBT32 cp5[4];// 0x48
SVBT32 fcStshfOrig;// 0x58 file offset of original allocation for STSH in file
- ULONG fcStshfOrigGet() {
+ sal_uLong fcStshfOrigGet() {
return SVBT32ToUInt32(fcStshfOrig); }
SVBT16 cbStshfOrig;// 0x5c count of bytes of original STSH allocation
- USHORT cbStshfOrigGet() {
+ sal_uInt16 cbStshfOrigGet() {
return SVBT16ToShort(cbStshfOrig); }
SVBT32 fcStshf;// 0x5e file offset of STSH in file.
- ULONG fcStshfGet() {
+ sal_uLong fcStshfGet() {
return SVBT32ToUInt32(fcStshf); }
SVBT16 cbStshf;// 0x62 count of bytes of current STSH allocation
- USHORT cbStshfGet() {
+ sal_uInt16 cbStshfGet() {
return SVBT16ToShort(cbStshf); }
SVBT32 fcPlcffndRef;// 0x64 file offset of footnote reference PLC.
- ULONG fcPlcffndRefGet() {
+ sal_uLong fcPlcffndRefGet() {
return SVBT32ToUInt32(fcPlcffndRef); }
SVBT16 cbPlcffndRef;// 0x68 count of bytes of footnote reference PLC
- USHORT cbPlcffndRefGet() {
+ sal_uInt16 cbPlcffndRefGet() {
return SVBT16ToShort(cbPlcffndRef); }
// == 0 if no footnotes defined in document.
SVBT32 fcPlcffndTxt;// 0x6a file offset of footnote text PLC.
- ULONG fcPlcffndTxtGet() {
+ sal_uLong fcPlcffndTxtGet() {
return SVBT32ToUInt32(fcPlcffndTxt); }
SVBT16 cbPlcffndTxt;// 0x6e count of bytes of footnote text PLC.
- USHORT cbPlcffndTxtGet() {
+ sal_uInt16 cbPlcffndTxtGet() {
return SVBT16ToShort(cbPlcffndTxt); }
// == 0 if no footnotes defined in document
SVBT32 fcPlcfandRef;// 0x70 file offset of annotation reference PLC.
- ULONG fcPlcfandRefGet() {
+ sal_uLong fcPlcfandRefGet() {
return SVBT32ToUInt32(fcPlcfandRef); }
SVBT16 cbPlcfandRef;// 0x74 count of bytes of annotation reference PLC.
- USHORT cbPlcfandRefGet() {
+ sal_uInt16 cbPlcfandRefGet() {
return SVBT16ToShort(cbPlcfandRef); }
SVBT32 fcPlcfandTxt;// 0x76 file offset of annotation text PLC.
- ULONG fcPlcfandTxtGet() {
+ sal_uLong fcPlcfandTxtGet() {
return SVBT32ToUInt32(fcPlcfandTxt); }
SVBT16 cbPlcfandTxt;// 0x7a count of bytes of the annotation text PLC
- USHORT cbPlcfandTxtGet() {
+ sal_uInt16 cbPlcfandTxtGet() {
return SVBT16ToShort(cbPlcfandTxt); }
SVBT32 fcPlcfsed;// 8x7c file offset of section descriptor PLC.
- ULONG fcPlcfsedGet() {
+ sal_uLong fcPlcfsedGet() {
return SVBT32ToUInt32(fcPlcfsed); }
SVBT16 cbPlcfsed;// 0x80 count of bytes of section descriptor PLC.
- USHORT cbPlcfsedGet() {
+ sal_uInt16 cbPlcfsedGet() {
return SVBT16ToShort(cbPlcfsed); }
SVBT32 fcPlcfpgd;// 0x82 file offset of paragraph descriptor PLC
- ULONG fcPlcfpgdGet() {
+ sal_uLong fcPlcfpgdGet() {
return SVBT32ToUInt32(fcPlcfpgd); }
SVBT16 cbPlcfpgd;// 0x86 count of bytes of paragraph descriptor PLC.
- USHORT cbPlcfpgdGet() {
+ sal_uInt16 cbPlcfpgdGet() {
return SVBT16ToShort(cbPlcfpgd); }
// ==0 if file was never repaginated
// Should not be written by third party creators
SVBT32 fcPlcfphe;// 0x88 file offset of PLC of paragraph heights.
- ULONG fcPlcfpheGet() {
+ sal_uLong fcPlcfpheGet() {
return SVBT32ToUInt32(fcPlcfphe); }
SVBT16 cbPlcfphe;// 0x8c count of bytes of paragraph height PLC.
- USHORT cbPlcfpheGet() {
+ sal_uInt16 cbPlcfpheGet() {
return SVBT16ToShort(cbPlcfphe); }
// ==0 when file is non-complex.
SVBT32 fcSttbfglsy;// 0x8e file offset of glossary string table.
- ULONG fcSttbfglsyGet() {
+ sal_uLong fcSttbfglsyGet() {
return SVBT32ToUInt32(fcSttbfglsy); }
SVBT16 cbSttbfglsy;// 0x92 count of bytes of glossary string table.
- USHORT cbSttbfglsyGet() {
+ sal_uInt16 cbSttbfglsyGet() {
return SVBT16ToShort(cbSttbfglsy); }
// == 0 for non-glossary documents.
// !=0 for glossary documents.
SVBT32 fcPlcfglsy;// 0x94 file offset of glossary PLC.
- ULONG fcPlcfglsyGet() {
+ sal_uLong fcPlcfglsyGet() {
return SVBT32ToUInt32(fcPlcfglsy); }
SVBT16 cbPlcfglsy;// 0x98 count of bytes of glossary PLC.
- USHORT cbPlcfglsyGet() {
+ sal_uInt16 cbPlcfglsyGet() {
return SVBT16ToShort(cbPlcfglsy); }
// == 0 for non-glossary documents.
// !=0 for glossary documents.
SVBT32 fcPlcfhdd;// 0x9a byte offset of header PLC.
- ULONG fcPlcfhddGet() {
+ sal_uLong fcPlcfhddGet() {
return SVBT32ToUInt32(fcPlcfhdd); }
SVBT16 cbPlcfhdd;// 0x9e count of bytes of header PLC.
- USHORT cbPlcfhddGet() {
+ sal_uInt16 cbPlcfhddGet() {
return SVBT16ToShort(cbPlcfhdd); }
// == 0 if document contains no headers
SVBT32 fcPlcfbteChpx;// 0xa0 file offset of character property bin table.PLC.
- ULONG fcPlcfbteChpxGet() {
+ sal_uLong fcPlcfbteChpxGet() {
return SVBT32ToUInt32(fcPlcfbteChpx); }
SVBT16 cbPlcfbteChpx;// 0xa4 count of bytes of character property bin table PLC.
- USHORT cbPlcfbteChpxGet() {
+ sal_uInt16 cbPlcfbteChpxGet() {
return SVBT16ToShort(cbPlcfbteChpx); }
SVBT32 fcPlcfbtePapx;// 0xa6 file offset of paragraph property bin table.PLC.
- ULONG fcPlcfbtePapxGet() {
+ sal_uLong fcPlcfbtePapxGet() {
return SVBT32ToUInt32(fcPlcfbtePapx); }
SVBT16 cbPlcfbtePapx;// 0xaa count of bytes of paragraph property bin table PLC.
- USHORT cbPlcfbtePapxGet() {
+ sal_uInt16 cbPlcfbtePapxGet() {
return SVBT16ToShort(cbPlcfbtePapx); }
SVBT32 fcPlcfsea;// 0xac file offset of PLC reserved for private use. The SEA is 6 bytes long.
- ULONG fcPlcfseaGet() {
+ sal_uLong fcPlcfseaGet() {
return SVBT32ToUInt32(fcPlcfsea); }
SVBT16 cbPlcfsea;// 0xb0 count of bytes of private use PLC.
- USHORT cbPlcfseaGet() {
+ sal_uInt16 cbPlcfseaGet() {
return SVBT16ToShort(cbPlcfsea); }
SVBT32 fcSttbfffn;// 0xb2 file offset of font information STTBF. See the FFN file structure definition.
- ULONG fcSttbfffnGet() {
+ sal_uLong fcSttbfffnGet() {
return SVBT32ToUInt32(fcSttbfffn); }
SVBT16 cbSttbfffn;// 0xb6 count of bytes in sttbfffn.
- USHORT cbSttbfffnGet() {
+ sal_uInt16 cbSttbfffnGet() {
return SVBT16ToShort(cbSttbfffn); }
SVBT32 fcPlcffldMom;// 0xb8 offset in doc stream to the PLC of field positions in the main document.
- ULONG fcPlcffldMomGet() {
+ sal_uLong fcPlcffldMomGet() {
return SVBT32ToUInt32(fcPlcffldMom); }
SVBT16 cbPlcffldMom;// 0xbc
- USHORT cbPlcffldMomGet() {
+ sal_uInt16 cbPlcffldMomGet() {
return SVBT16ToShort(cbPlcffldMom); }
SVBT32 fcPlcffldHdr;// 0xbe offset in doc stream to the PLC of field positions in the header subdocument.
- ULONG fcPlcffldHdrGet() {
+ sal_uLong fcPlcffldHdrGet() {
return SVBT32ToUInt32(fcPlcffldHdr); }
SVBT16 cbPlcffldHdr;// 0xc2
- USHORT cbPlcffldHdrGet() {
+ sal_uInt16 cbPlcffldHdrGet() {
return SVBT16ToShort(cbPlcffldHdr); }
SVBT32 fcPlcffldFtn;// 0xc4 offset in doc stream to the PLC of field positions in the footnote subdocument.
- ULONG fcPlcffldFtnGet() {
+ sal_uLong fcPlcffldFtnGet() {
return SVBT32ToUInt32(fcPlcffldFtn); }
SVBT16 cbPlcffldFtn;// 0xc8
- USHORT cbPlcffldFtnGet() {
+ sal_uInt16 cbPlcffldFtnGet() {
return SVBT16ToShort(cbPlcffldFtn); }
SVBT32 fcPlcffldAtn;// 0xca offset in doc stream to the PLC of field positions in the annotation subdocument.
- ULONG fcPlcffldAtnGet() {
+ sal_uLong fcPlcffldAtnGet() {
return SVBT32ToUInt32(fcPlcffldAtn); }
SVBT16 cbPlcffldAtn;// 0xce
- USHORT cbPlcffldAtnGet() {
+ sal_uInt16 cbPlcffldAtnGet() {
return SVBT16ToShort(cbPlcffldAtn); }
SVBT32 fcPlcffldMcr;// 0xd0 offset in doc stream to the PLC of field positions in the macro subdocument.
- ULONG fcPlcffldMcrGet() {
+ sal_uLong fcPlcffldMcrGet() {
return SVBT32ToUInt32(fcPlcffldMcr); }
SVBT16 cbPlcffldMcr;// 0xd4
- USHORT cbPlcffldMcrGet() {
+ sal_uInt16 cbPlcffldMcrGet() {
return SVBT16ToShort(cbPlcffldMcr); }
SVBT32 fcSttbfbkmk;// 0xd6 offset in document stream of the STTBF that records bookmark names in the main document
- ULONG fcSttbfbkmkGet() {
+ sal_uLong fcSttbfbkmkGet() {
return SVBT32ToUInt32(fcSttbfbkmk); }
SVBT16 cbSttbfbkmk;// 0xda
- USHORT cbSttbfbkmkGet() {
+ sal_uInt16 cbSttbfbkmkGet() {
return SVBT16ToShort(cbSttbfbkmk); }
SVBT32 fcPlcfbkf;// 0xdc offset in document stream of the PLCF that records the beginning CP offsets of bookmarks in the main document. See BKF
- ULONG fcPlcfbkfGet() {
+ sal_uLong fcPlcfbkfGet() {
return SVBT32ToUInt32(fcPlcfbkf); }
SVBT16 cbPlcfbkf;// 0xe0
- USHORT cbPlcfbkfGet() {
+ sal_uInt16 cbPlcfbkfGet() {
return SVBT16ToShort(cbPlcfbkf); }
SVBT32 fcPlcfbkl;// 0xe2 offset in document stream of the PLCF that records the ending CP offsets of bookmarks recorded in the main document. See the BKL structure definition.
- ULONG fcPlcfbklGet() {
+ sal_uLong fcPlcfbklGet() {
return SVBT32ToUInt32(fcPlcfbkl); }
SVBT16 cbPlcfbkl;// 0xe6 SVBT16
- USHORT cbPlcfbklGet() {
+ sal_uInt16 cbPlcfbklGet() {
return SVBT16ToShort(cbPlcfbkl); }
SVBT32 fcCmds;// 0xe8 FC
- ULONG fcCmdsGet() {
+ sal_uLong fcCmdsGet() {
return SVBT32ToUInt32(fcCmds); }
SVBT16 cbCmds;// 0xec
- USHORT cbCmdsGet() {
+ sal_uInt16 cbCmdsGet() {
return SVBT16ToShort(cbCmds); }
SVBT32 fcPlcmcr;// 0xee FC
- ULONG fcPlcmcrGet() {
+ sal_uLong fcPlcmcrGet() {
return SVBT32ToUInt32(fcPlcmcr); }
SVBT16 cbPlcmcr;// 0xf2
- USHORT cbPlcmcrGet() {
+ sal_uInt16 cbPlcmcrGet() {
return SVBT16ToShort(cbPlcmcr); }
SVBT32 fcSttbfmcr;// 0xf4 FC
- ULONG fcSttbfmcrGet() {
+ sal_uLong fcSttbfmcrGet() {
return SVBT32ToUInt32(fcSttbfmcr); }
SVBT16 cbSttbfmcr;// 0xf8
- USHORT cbSttbfmcrGet() {
+ sal_uInt16 cbSttbfmcrGet() {
return SVBT16ToShort(cbSttbfmcr); }
SVBT32 fcPrEnv;// 0xfa
- ULONG fcPrEnvGet() {
+ sal_uLong fcPrEnvGet() {
return SVBT32ToUInt32(fcPrEnv); }
SVBT16 cbPrEnv;// 0xfe
- USHORT cbPrEnvGet() {
+ sal_uInt16 cbPrEnvGet() {
return SVBT16ToShort(cbPrEnv); }
SVBT32 fcWss;// 0x100 file offset of Window Save State data structure. See WSS.
- ULONG fcWssGet() {
+ sal_uLong fcWssGet() {
return SVBT32ToUInt32(fcWss); }
SVBT16 cbWss;// 0x100 count of bytes of WSS. ==0 if unable to store the window state.
- USHORT cbWssGet() {
+ sal_uInt16 cbWssGet() {
return SVBT16ToShort(cbWss); }
SVBT32 fcDop;// 0x106 file offset of document property data structure.
- ULONG fcDopGet() {
+ sal_uLong fcDopGet() {
return SVBT32ToUInt32(fcDop); }
SVBT16 cbDop;// 0x10a count of bytes of document properties.
- USHORT cbDopGet() {
+ sal_uInt16 cbDopGet() {
return SVBT16ToShort(cbDop); }
SVBT32 fcSttbfAssoc;// 0x10c offset to STTBF of associated strings. See STTBFASSOC.
- ULONG fcSttbfAssocGet() {
+ sal_uLong fcSttbfAssocGet() {
return SVBT32ToUInt32(fcSttbfAssoc); }
SVBT16 cbSttbfAssoc;// 0x110
- USHORT cbSttbfAssocGet() {
+ sal_uInt16 cbSttbfAssocGet() {
return SVBT16ToShort(cbSttbfAssoc); }
SVBT32 fcClx;// 0x112 file offset of beginning of information for complex files.
- ULONG fcClxGet() {
+ sal_uLong fcClxGet() {
return SVBT32ToUInt32(fcClx); }
SVBT16 cbClx;// 0x116 count of bytes of complex file information. 0 if file is non-complex.
- USHORT cbClxGet() {
+ sal_uInt16 cbClxGet() {
return SVBT16ToShort(cbClx); }
SVBT32 fcPlcfpgdFtn;// 0x118 file offset of page descriptor PLC for footnote subdocument.
- ULONG fcPlcfpgdFtnGet() {
+ sal_uLong fcPlcfpgdFtnGet() {
return SVBT32ToUInt32(fcPlcfpgdFtn); }
SVBT16 cbPlcfpgdFtn;// 0x11C count of bytes of page descriptor PLC for footnote subdocument.
- USHORT cbPlcfpgdFtnGet() {
+ sal_uInt16 cbPlcfpgdFtnGet() {
return SVBT16ToShort(cbPlcfpgdFtn); }
// ==0 if document has not been paginated. The length of the PGD is 8 bytes.
SVBT32 fcSpare1;// 0x11e file offset of the name of the original file.
- ULONG fcSpare1Get() {
+ sal_uLong fcSpare1Get() {
return SVBT32ToUInt32(fcSpare1); }
SVBT16 cbSpare1;// 0x122 count of bytes of the name of the original file.
- USHORT cbSpare1Get() {
+ sal_uInt16 cbSpare1Get() {
return SVBT16ToShort(cbSpare1); }
SVBT32 fcSpare2;// 0x124 file offset of the name of the original file.
- ULONG fcSpare2Get() {
+ sal_uLong fcSpare2Get() {
return SVBT32ToUInt32(fcSpare2); }
SVBT16 cbSpare2;// 0x128 count of bytes of the name of the original file.
- USHORT cbSpare2Get() {
+ sal_uInt16 cbSpare2Get() {
return SVBT16ToShort(cbSpare2); }
SVBT32 fcSpare3;// 0x12a file offset of the name of the original file.
- ULONG fcSpare3Get() {
+ sal_uLong fcSpare3Get() {
return SVBT32ToUInt32(fcSpare3); }
SVBT16 cbSpare3;// 0x12e count of bytes of the name of the original file.
- USHORT cbSpare3Get() {
+ sal_uInt16 cbSpare3Get() {
return SVBT16ToShort(cbSpare3); }
SVBT32 fcSpare4;// 0x130 file offset of the name of the original file.
- ULONG fcSpare4Get() {
+ sal_uLong fcSpare4Get() {
return SVBT32ToUInt32(fcSpare4); }
SVBT16 cbSpare4;// 0x134 count of bytes of the name of the original file.
- USHORT cbSpare4Get() {
+ sal_uInt16 cbSpare4Get() {
return SVBT16ToShort(cbSpare4); }
SVBT16 cpnBteChp;// 0x18E count of CHPX FKPs recorded in file. In non-complex files if the number of
- USHORT cpnBteChpGet() {
+ sal_uInt16 cpnBteChpGet() {
return SVBT16ToShort(cpnBteChp); }
// entries in the plcfbteChpx is less than this, the plcfbteChpx is incomplete.
SVBT16 cpnBtePap;// 0x190 count of PAPX FKPs recorded in file. In non-complex files if the number of
- USHORT cpnBtePapGet() {
+ sal_uInt16 cpnBtePapGet() {
return SVBT16ToShort(cpnBtePap); }
// entries in the plcfbtePapx is less than this, the plcfbtePapx is incomplete.
};
@@ -382,124 +382,124 @@ struct W1_FIB /////////////////////////////////////////////////////////
struct W1_DOP ///////////////////////////////////// Document Properties
{
SVBT16 fFlags;
- USHORT fFlagsGet() {
+ sal_uInt16 fFlagsGet() {
return SVBT16ToShort(fFlags); }
// SVBT16 fFacingPages : 1;// 1 when facing pages should be printed
- BOOL fFacingPagesGet() {
+ sal_Bool fFacingPagesGet() {
return 0 != ((fFlagsGet() >> 0) & 1); }
// SVBT16 fWidowControl : 1;// 1 when widow control is in effect. 0 when widow control disabled.
- BOOL fWidowControlGet() {
+ sal_Bool fWidowControlGet() {
return 0 != ((fFlagsGet() >> 1) & 1); }
// SVBT16 : 3;// unused
// SVBT16 fpc : 2;// 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
- USHORT fpcGet() {
- return (USHORT)((fFlagsGet() >> 5) & 3); }
+ sal_uInt16 fpcGet() {
+ return (sal_uInt16)((fFlagsGet() >> 5) & 3); }
// SVBT16 fWide : 1;// Landscape
- BOOL fWideGet() {
+ sal_Bool fWideGet() {
return 0 != ((fFlagsGet() >> 7) & 1); }
// SVBT16 grpfIhdt : 8;// 0 specification of document headers and footers. See explanation under Headers and Footers topic.
- USHORT grpfIhdtGet() {
- return (USHORT)((fFlagsGet() >> 8) & 0xff); }
+ sal_uInt16 grpfIhdtGet() {
+ return (sal_uInt16)((fFlagsGet() >> 8) & 0xff); }
SVBT16 fFtnFlags;
- USHORT fFtnFlagsGet() {
+ sal_uInt16 fFtnFlagsGet() {
return SVBT16ToShort(fFtnFlags); }
// SVBT16 fFtnRestart : 1;
- BOOL fFtnRestartGet() {
+ sal_Bool fFtnRestartGet() {
return 0 != ((fFtnFlagsGet() >> 0) & 1); }
// SVBT16 nFtn : 15;// 1 initial footnote number for document
- USHORT nFtnGet() {
- return (USHORT)((fFtnFlagsGet() >> 1) & 0x7fff); }
+ sal_uInt16 nFtnGet() {
+ return (sal_uInt16)((fFtnFlagsGet() >> 1) & 0x7fff); }
SVBT16 fRvsFlags;
- USHORT fRvsFlagsGet() {
+ sal_uInt16 fRvsFlagsGet() {
return SVBT16ToShort(fRvsFlags); }
// SVBT16 irmBar : 8;
- USHORT irmBarGet() {
- return (USHORT)((fRvsFlagsGet() >> 0) & 0xff); }
+ sal_uInt16 irmBarGet() {
+ return (sal_uInt16)((fRvsFlagsGet() >> 0) & 0xff); }
// SVBT16 irmProps : 7;
- USHORT irmPropsGet() {
- return (USHORT)((fRvsFlagsGet() >> 8) & 0x7f); }
+ sal_uInt16 irmPropsGet() {
+ return (sal_uInt16)((fRvsFlagsGet() >> 8) & 0x7f); }
// SVBT16 fRevMarking : 1;// when 1, Word will mark revisions as the document is edited
- BOOL fRevMarkingGet() {
+ sal_Bool fRevMarkingGet() {
return 0 != ((fRvsFlagsGet() >> 15) & 1); }
SVBT16 fSveFlags;
- USHORT fSveFlagsGet() {
+ sal_uInt16 fSveFlagsGet() {
return SVBT16ToShort(fSveFlags); }
// SVBT16 fBackup : 1;// always make backup when document saved when 1.
- BOOL fBackupGet() {
+ sal_Bool fBackupGet() {
return 0 != ((fSveFlagsGet() >> 0) & 1); }
// SVBT16 fExactCWords : 1;
- BOOL fExactCWordsGet() {
+ sal_Bool fExactCWordsGet() {
return 0 != ((fSveFlagsGet() >> 1) & 1); }
// SVBT16 fPagHidden : 1;//
- BOOL fPagHiddenGet() {
+ sal_Bool fPagHiddenGet() {
return 0 != ((fSveFlagsGet() >> 2) & 1); }
// SVBT16 fPagResults : 1;
- BOOL fPagResultsGet() {
+ sal_Bool fPagResultsGet() {
return 0 != ((fSveFlagsGet() >> 3) & 1); }
// SVBT16 fLockAtn : 1;// when 1, annotations are locked for editing
- BOOL fLockAtnGet() {
+ sal_Bool fLockAtnGet() {
return 0 != ((fSveFlagsGet() >> 4) & 1); }
// SVBT16 fMirrorMargins : 1;// swap margins on left/right pages when 1.
- BOOL fMirrorMarginsGet() {
+ sal_Bool fMirrorMarginsGet() {
return 0 != ((fSveFlagsGet() >> 5) & 1); }
// SVBT16 : 10;// unused
SVBT16 fSpares;
- USHORT fSparesGet() {
+ sal_uInt16 fSparesGet() {
return SVBT16ToShort(fSpares); }
SVBT16 yaPage;
- USHORT yaPageGet() {
+ sal_uInt16 yaPageGet() {
return SVBT16ToShort(yaPage); }
SVBT16 xaPage;
- USHORT xaPageGet() {
+ sal_uInt16 xaPageGet() {
return SVBT16ToShort(xaPage); }
SVBT16 dyaTop;
- USHORT dyaTopGet() {
+ sal_uInt16 dyaTopGet() {
return SVBT16ToShort(dyaTop); }
SVBT16 dxaLeft;
- USHORT dxaLeftGet() {
+ sal_uInt16 dxaLeftGet() {
return SVBT16ToShort(dxaLeft); }
SVBT16 dyaBottom;
- USHORT dyaBottomGet() {
+ sal_uInt16 dyaBottomGet() {
return SVBT16ToShort(dyaBottom); }
SVBT16 dxaRight;
- USHORT dxaRightGet() {
+ sal_uInt16 dxaRightGet() {
return SVBT16ToShort(dxaRight); }
SVBT16 dxaGutter;
- USHORT dxaGutterGet() {
+ sal_uInt16 dxaGutterGet() {
return SVBT16ToShort(dxaGutter); }
SVBT16 dxaTab;// 720 twips default tab width
- USHORT dxaTabGet() {
+ sal_uInt16 dxaTabGet() {
return SVBT16ToShort(dxaTab); }
SVBT16 wSpare;//
- USHORT wSpareGet() {
+ sal_uInt16 wSpareGet() {
return SVBT16ToShort(wSpare); }
SVBT16 dxaHotZ;// width of hyphenation hot zone measured in twips
- USHORT dxaHotZGet() {
+ sal_uInt16 dxaHotZGet() {
return SVBT16ToShort(dxaHotZ); }
SVBT16 rgwSpare[2];// reserved
SVBT32 dttmCreated;// DTTM date and time document was created
- ULONG dttmCreatedGet() {
+ sal_uLong dttmCreatedGet() {
return SVBT32ToUInt32(dttmCreated); }
SVBT32 dttmRevised;// DTTM date and time document was last revised
- ULONG dttmRevisedGet() {
+ sal_uLong dttmRevisedGet() {
return SVBT32ToUInt32(dttmRevised); }
SVBT32 dttmLastPrint;// DTTM date and time document was last printed
- ULONG dttmLastPrintGet() {
+ sal_uLong dttmLastPrintGet() {
return SVBT32ToUInt32(dttmLastPrint); }
SVBT16 nRevision;// number of times document has been revised since its creation
- USHORT nRevisionGet() {
+ sal_uInt16 nRevisionGet() {
return SVBT16ToShort(nRevision); }
SVBT32 tmEdited;// time document was last edited
- ULONG tmEditedGet() {
+ sal_uLong tmEditedGet() {
return SVBT32ToUInt32(tmEdited); }
SVBT32 cWords;// count of words tallied by last Word Count execution
- ULONG cWordsGet() {
+ sal_uLong cWordsGet() {
return SVBT32ToUInt32(cWords); }
SVBT32 cCh;// count of characters tallied by last Word Count execution
- ULONG cChGet() {
+ sal_uLong cChGet() {
return SVBT32ToUInt32(cCh); }
SVBT16 cPg;// count of pages tallied by last Word Count execution
- USHORT cPgGet() {
+ sal_uInt16 cPgGet() {
return SVBT16ToShort(cPg); }
SVBT16 rgwSpareDocSum[2];
};
@@ -518,29 +518,29 @@ struct W1_CHP /////////////////////////////////////////////////////////
W1_CHP() { memset( this, 0, sizeof( *this)); }
- USHORT fCharGet() { return SVBT16ToShort(fChar); }
- void fCharSet(USHORT n) { ShortToSVBT16(n, fChar); }
- BOOL fBoldGet() { return 0 != ((fCharGet() >> 0) & 1); }
- void fBoldSet(BOOL b) { fCharSet( ( fCharGet() & 0xfffe ) | ( b << 0 ) ); }
- BOOL fItalicGet() { return 0 != ((fCharGet() >> 1) & 1); }
- void fItalicSet(BOOL b) { fCharSet( ( fCharGet() & 0xfffd ) | ( b << 1 ) ); }
- BOOL fStrikeGet() { return 0 != ((fCharGet() >> 2) & 1); }
- BOOL fOutlineGet() { return 0 != ((fCharGet() >> 3) & 1); }
- BOOL fFldVanishGet() { return 0 != ((fCharGet() >> 4) & 1); }
- BOOL fSmallCapsGet() { return 0 != ((fCharGet() >> 5) & 1); }
- BOOL fCapsGet() { return 0 != ((fCharGet() >> 6) & 1); }
- BOOL fVanishGet() { return 0 != ((fCharGet() >> 7) & 1); }
- BOOL fRMarkGet() { return 0 != ((fCharGet() >> 8) & 1); }
- BOOL fSpecGet() { return 0 != ((fCharGet() >> 9) & 1); }
- BOOL fsIcoGet() { return 0 != ((fCharGet() >> 10) & 1); }
- BOOL fsFtcGet() { return 0 != ((fCharGet() >> 11) & 1); }
- void fsFtcSet(BOOL b) { fCharSet( ( fCharGet() & 0xf7ff ) | ( b << 11 ) ); }
- BOOL fsHpsGet() { return 0 != ((fCharGet() >> 12) & 1); }
- void fsHpsSet(BOOL b) { fCharSet( ( fCharGet() & 0xefff ) | ( b << 12 ) ); }
- BOOL fsKulGet() { return 0 != ((fCharGet() >> 13) & 1); }
- void fsKulSet(BOOL b) { fCharSet( ( fCharGet() & 0xdfff ) | ( b << 13 ) ); }
- BOOL fsPosGet() { return 0 != ((fCharGet() >> 14) & 1); }
- BOOL fsSpaceGet() { return 0 != ((fCharGet() >> 15) & 1); }
+ sal_uInt16 fCharGet() { return SVBT16ToShort(fChar); }
+ void fCharSet(sal_uInt16 n) { ShortToSVBT16(n, fChar); }
+ sal_Bool fBoldGet() { return 0 != ((fCharGet() >> 0) & 1); }
+ void fBoldSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xfffe ) | ( b << 0 ) ); }
+ sal_Bool fItalicGet() { return 0 != ((fCharGet() >> 1) & 1); }
+ void fItalicSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xfffd ) | ( b << 1 ) ); }
+ sal_Bool fStrikeGet() { return 0 != ((fCharGet() >> 2) & 1); }
+ sal_Bool fOutlineGet() { return 0 != ((fCharGet() >> 3) & 1); }
+ sal_Bool fFldVanishGet() { return 0 != ((fCharGet() >> 4) & 1); }
+ sal_Bool fSmallCapsGet() { return 0 != ((fCharGet() >> 5) & 1); }
+ sal_Bool fCapsGet() { return 0 != ((fCharGet() >> 6) & 1); }
+ sal_Bool fVanishGet() { return 0 != ((fCharGet() >> 7) & 1); }
+ sal_Bool fRMarkGet() { return 0 != ((fCharGet() >> 8) & 1); }
+ sal_Bool fSpecGet() { return 0 != ((fCharGet() >> 9) & 1); }
+ sal_Bool fsIcoGet() { return 0 != ((fCharGet() >> 10) & 1); }
+ sal_Bool fsFtcGet() { return 0 != ((fCharGet() >> 11) & 1); }
+ void fsFtcSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xf7ff ) | ( b << 11 ) ); }
+ sal_Bool fsHpsGet() { return 0 != ((fCharGet() >> 12) & 1); }
+ void fsHpsSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xefff ) | ( b << 12 ) ); }
+ sal_Bool fsKulGet() { return 0 != ((fCharGet() >> 13) & 1); }
+ void fsKulSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xdfff ) | ( b << 13 ) ); }
+ sal_Bool fsPosGet() { return 0 != ((fCharGet() >> 14) & 1); }
+ sal_Bool fsSpaceGet() { return 0 != ((fCharGet() >> 15) & 1); }
// SVBT16 fBold :1;// 1 == opposite boldness of style
// SVBT16 fItalic :1;// 1 == opposite of style
// SVBT16 fStrike :1;// 1 == opposite of style
@@ -558,29 +558,29 @@ struct W1_CHP /////////////////////////////////////////////////////////
// SVBT16 fsPos :1;// 1 == Char position (hpsPos) different to style
// SVBT16 fsSpace :1;// 1 == Char Spacing (qpsSpace) different to style
- USHORT ftcGet() { return SVBT16ToShort(ftc); }
- void ftcSet(USHORT n) { ShortToSVBT16(n, ftc); }
- void hpsSet(BYTE n) { ByteToSVBT8(n, hps); }
- BYTE hpsGet() { return SVBT8ToByte(hps); }
-
- BYTE hpsPosGet() { return SVBT8ToByte(hpsPos); }
- USHORT fTextGet() { return SVBT16ToShort(fText); }
- void fTextSet(USHORT n) { ShortToSVBT16(n, fText); }
- USHORT qpsSpaceGet() { return (USHORT)((fTextGet() >> 0) & 0x3f); }
- USHORT wSpare2Get() { return (USHORT)((fTextGet() >> 6) & 3); }
- USHORT icoGet() { return (USHORT)((fTextGet() >> 8) & 0xf); }
- USHORT kulGet() { return (USHORT)((fTextGet() >> 12) & 7); }
- void kulSet(USHORT n) { fTextSet( ( fTextGet() & 0x8fff ) | ( ( n & 7 ) << 12 ) ); }
- BOOL fSysVanishGet() { return 0 != ((fTextGet() >> 15) & 1); }
+ sal_uInt16 ftcGet() { return SVBT16ToShort(ftc); }
+ void ftcSet(sal_uInt16 n) { ShortToSVBT16(n, ftc); }
+ void hpsSet(sal_uInt8 n) { ByteToSVBT8(n, hps); }
+ sal_uInt8 hpsGet() { return SVBT8ToByte(hps); }
+
+ sal_uInt8 hpsPosGet() { return SVBT8ToByte(hpsPos); }
+ sal_uInt16 fTextGet() { return SVBT16ToShort(fText); }
+ void fTextSet(sal_uInt16 n) { ShortToSVBT16(n, fText); }
+ sal_uInt16 qpsSpaceGet() { return (sal_uInt16)((fTextGet() >> 0) & 0x3f); }
+ sal_uInt16 wSpare2Get() { return (sal_uInt16)((fTextGet() >> 6) & 3); }
+ sal_uInt16 icoGet() { return (sal_uInt16)((fTextGet() >> 8) & 0xf); }
+ sal_uInt16 kulGet() { return (sal_uInt16)((fTextGet() >> 12) & 7); }
+ void kulSet(sal_uInt16 n) { fTextSet( ( fTextGet() & 0x8fff ) | ( ( n & 7 ) << 12 ) ); }
+ sal_Bool fSysVanishGet() { return 0 != ((fTextGet() >> 15) & 1); }
// SVBT16 qpsSpace :6;// Char Spacing, -7 .. 56; 57 = -7, 63 = -1
// SVBT16 wSpare2 : 2;// reserved
// SVBT16 ico :4;// color of Text: 0=black, 1=blue, 2=cyan, 3=green, 4=magenta, 5=red, 6=yellow, 7=white
// SVBT16 kul: 3;// Underline code: 0=none, 1=single, 2=by word, 3=double, 4=dotted
// SVBT16 fSysVanish: 1;// used internally
- ULONG fcPicGet() { return SVBT32ToUInt32(fcPic); }
- USHORT fnPicGet() { return SVBT8ToByte(fnPic); }
- USHORT hpsLargeChpGet() { return SVBT16ToShort(hpsLargeChp); }
+ sal_uLong fcPicGet() { return SVBT32ToUInt32(fcPic); }
+ sal_uInt16 fnPicGet() { return SVBT8ToByte(fnPic); }
+ sal_uInt16 hpsLargeChpGet() { return SVBT16ToShort(hpsLargeChp); }
void Out(Ww1Shell&, Ww1Manager&);
};
@@ -588,157 +588,157 @@ struct W1_CHP /////////////////////////////////////////////////////////
struct W1_FFN ///////////////////////////////////////// Font Descriptor
{
SVBT8 cbFfnM1;// 0x0 total length of FFN - 1.
- USHORT cbFfnM1Get() {
+ sal_uInt16 cbFfnM1Get() {
return SVBT8ToByte(cbFfnM1); }
SVBT8 fFlags;
- USHORT fFlagsGet() {
+ sal_uInt16 fFlagsGet() {
return SVBT8ToByte(fFlags); }
// SVBT8 prg : 2;// 0x1:03 pitch request
- USHORT prgGet() {
- return (USHORT)((fFlagsGet() >> 0) & 3); }
+ sal_uInt16 prgGet() {
+ return (sal_uInt16)((fFlagsGet() >> 0) & 3); }
// SVBT8 fTrueType : 1;// 0x1:04 when 1, font is a TrueType font
- BOOL fTrueTypeGet() {
+ sal_Bool fTrueTypeGet() {
return 0 != ((fFlagsGet() >> 2) & 1); }
// SVBT8 : 1;// 0x1:08 reserved
// SVBT8 ff : 3;// 0x1:70 font family id
- USHORT ffGet() {
- return (USHORT)((fFlagsGet() >> 4) & 7); }
+ sal_uInt16 ffGet() {
+ return (sal_uInt16)((fFlagsGet() >> 4) & 7); }
// SVBT8 : 1;// 0x1:80 reserved
- BYTE szFfn[65];// 0x6 zero terminated string that records name of font.
+ sal_uInt8 szFfn[65];// 0x6 zero terminated string that records name of font.
// Vorsicht: Dieses Array kann auch kleiner sein!!!
// Possibly followed by a second sz which records the name of an
// alternate font to use if the first named font does not exist
// on this system. Maximal size of szFfn is 65 characters.
- BYTE* szFfnGet() { return szFfn; }
+ sal_uInt8* szFfnGet() { return szFfn; }
};
struct W1_PHE /////////////////////////////////////// Paragraph Height
{
SVBT16 fFlags;
- USHORT fFlagsGet() {
+ sal_uInt16 fFlagsGet() {
return SVBT16ToShort(fFlags); }
- BOOL fSpareGet() {
+ sal_Bool fSpareGet() {
return 0 != (fFlagsGet() & 1); }
- BOOL fUnkGet() {
+ sal_Bool fUnkGet() {
return 0 != ((fFlagsGet() >> 1) & 1); }
- BOOL fDiffLinesGet() {
+ sal_Bool fDiffLinesGet() {
return 0 != ((fFlagsGet() >> 2) & 1); }
- BYTE clMacGet() {
+ sal_uInt8 clMacGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((fFlagsGet() >> 8) & 0xff); }
SVBT16 dxaCol;
- USHORT dxaColGet() {
+ sal_uInt16 dxaColGet() {
return SVBT16ToShort(dxaCol); }
SVBT16 xxx; // beachte die dreifachnutzung.... siehe doc.
- USHORT dylHeightGet() {
+ sal_uInt16 dylHeightGet() {
return SVBT16ToShort(xxx); }
- USHORT dylLineGet() {
+ sal_uInt16 dylLineGet() {
return SVBT16ToShort(xxx); }
- USHORT fStyleDirtyGet() {
+ sal_uInt16 fStyleDirtyGet() {
return SVBT16ToShort(xxx); }
};
struct W1_PAPX ///////////////////////// Paragraph Property Difference
{
SVBT8 stc;
- BYTE stcGet() {
+ sal_uInt8 stcGet() {
return SVBT8ToByte(stc); }
W1_PHE phe;
- BYTE grpprl[1];
- BYTE* grpprlGet() {
+ sal_uInt8 grpprl[1];
+ sal_uInt8* grpprlGet() {
return grpprl; }
};
struct W1_BRC //////////////////////////////////////////// Border Code
{
SVBT16 aBits;
- USHORT aBitsGet() {
+ sal_uInt16 aBitsGet() {
return SVBT16ToShort(aBits); }
// SVBT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5,
// this field is the width of a single line of border
// in units of 0.75 points Must be nonzero when brcType
// is nonzero. 6 == dotted, 7 == dashed.
- BYTE dxpLineWidthGet() {
+ sal_uInt8 dxpLineWidthGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 0) & 0x0007); }
// SVBT16 brcType : 2;// 0018 border type code: 0 == none, 1 == single, 2 == thick,
// 3 == double
- BYTE brcTypeGet() {
+ sal_uInt8 brcTypeGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 3) & 0x0003); }
// SVBT16 fShadow : 1;// 0020 when 1, border is drawn with shadow. Must be 0
// when BRC is a substructure of the TC
- BYTE fShadowGet() {
+ sal_uInt8 fShadowGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 5) & 0x0001); }
// SVBT16 ico : 5;// 07C0 color code (see chp.ico)
- BYTE icoGet() {
+ sal_uInt8 icoGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 6) & 0x001f); }
// SVBT16 dxpSpace : 5;// F800 width of space to maintain between border and
// text within border. Must be 0 when BRC is a
// substructure of the TC. Stored in points for Windows.
- BYTE dxpSpaceGet() {
+ sal_uInt8 dxpSpaceGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 11) & 0x001f); }
};
struct W1_BRC10 ///////////////////////////////// Border Code Word 1.0
{
SVBT16 aBits;
- USHORT aBitsGet() {
+ sal_uInt16 aBitsGet() {
return SVBT16ToShort(aBits); }
- BYTE dxpLine2WidthGet() {
+ sal_uInt8 dxpLine2WidthGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 0) & 0x0007); }
- BYTE dxpSpaceBetweenGet() {
+ sal_uInt8 dxpSpaceBetweenGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 3) & 0x0007); }
- BYTE dxpLine1WidthGet() {
+ sal_uInt8 dxpLine1WidthGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 6) & 0x0007); }
- BYTE dxpSpaceGet() {
+ sal_uInt8 dxpSpaceGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 9) & 0x001f); }
- BYTE fShadowGet() {
+ sal_uInt8 fShadowGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 14) & 0x0001); }
- BYTE fSpareGet() {
+ sal_uInt8 fSpareGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 15) & 0x0001); }
};
struct W1_FLD //////////////////////////////////////// FieldDescriptor
{
SVBT8 ch; // boundary-type (begin(19), separator (20), end (21))
- BYTE chGet() {
+ sal_uInt8 chGet() {
return SVBT8ToByte(ch); }
SVBT8 flt; // field type / flags
- BYTE fltGet() {
+ sal_uInt8 fltGet() {
return SVBT8ToByte(flt); }
// variant, when ch==21:
- BOOL fDifferGet() {
+ sal_Bool fDifferGet() {
return (fltGet() >> 0) & 1; }
- BOOL fResultDirtyGet() {
+ sal_Bool fResultDirtyGet() {
return (fltGet() >> 2) & 1; }
- BOOL ResultEditedGet() {
+ sal_Bool ResultEditedGet() {
return (fltGet() >> 3) & 1; }
- BOOL fLockedGet() {
+ sal_Bool fLockedGet() {
return (fltGet() >> 4) & 1; }
- BOOL fPrivateResultGet() {
+ sal_Bool fPrivateResultGet() {
return (fltGet() >> 5) & 1; }
- BOOL fNestedGet() {
+ sal_Bool fNestedGet() {
return (fltGet() >> 6) & 1; }
};
struct W1_PIC /////////////////////////////////////// PictureStructure
{
SVBT32 lcb;// 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file.
- ULONG lcbGet() {
+ sal_uLong lcbGet() {
return SVBT32ToUInt32(lcb); }
SVBT16 cbHeader;// 0x4 number of bytes in the PIC (to allow for future expansion).
- USHORT cbHeaderGet() {
+ sal_uInt16 cbHeaderGet() {
return SVBT16ToShort(cbHeader); }
struct MFP {
SVBT16 mm;// 0x6 int
- USHORT mmGet() {
+ sal_uInt16 mmGet() {
return SVBT16ToShort(mm); }
SVBT16 xExt;// 0x8 int
- USHORT xExtGet() {
+ sal_uInt16 xExtGet() {
return SVBT16ToShort(xExt); }
SVBT16 yExt;// 0xa int
- USHORT yExtGet() {
+ sal_uInt16 yExtGet() {
return SVBT16ToShort(yExt); }
SVBT16 hMF;// 0xc int
- USHORT hMFGet() {
+ sal_uInt16 hMFGet() {
return SVBT16ToShort(hMF); }
} mfp;
union W1_MFP_BMP {
@@ -746,80 +746,80 @@ struct W1_PIC /////////////////////////////////////// PictureStructure
SVBT8 rcWinMF[14];// 0xe rc (rectangle - 8 bytes) rect for window origin and extents when metafile is stored -- ignored if 0
} MFP_BMP;
SVBT16 dxaGoal;// 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
- USHORT dxaGoalGet() {
+ sal_uInt16 dxaGoalGet() {
return SVBT16ToShort(dxaGoal); }
SVBT16 dyaGoal;// 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
- USHORT dyaGoalGet() {
+ sal_uInt16 dyaGoalGet() {
return SVBT16ToShort(dyaGoal); }
SVBT16 mx;// 0x20 horizontal scaling factor supplied by user in .1% units.
- USHORT mxGet() {
+ sal_uInt16 mxGet() {
return SVBT16ToShort(mx); }
SVBT16 my;// 0x22 vertical scaling factor supplied by user in .1% units.
- USHORT myGet() {
+ sal_uInt16 myGet() {
return SVBT16ToShort(my); }
SVBT16 dxaCropLeft;// 0x24 the amount the picture has been cropped on the left in twips.
- USHORT dxaCropLeftGet() {
+ sal_uInt16 dxaCropLeftGet() {
return SVBT16ToShort(dxaCropLeft); }
SVBT16 dyaCropTop;// 0x26 the amount the picture has been cropped on the top in twips.
- USHORT dyaCropTopGet() {
+ sal_uInt16 dyaCropTopGet() {
return SVBT16ToShort(dyaCropTop); }
SVBT16 dxaCropRight;// 0x28 the amount the picture has been cropped on the right in twips.
- USHORT dxaCropRightGet() {
+ sal_uInt16 dxaCropRightGet() {
return SVBT16ToShort(dxaCropRight); }
SVBT16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
- USHORT dyaCropBottomGet() {
+ sal_uInt16 dyaCropBottomGet() {
return SVBT16ToShort(dyaCropBottom); }
SVBT16 flags;
- USHORT flagsGet() {
+ sal_uInt16 flagsGet() {
return SVBT16ToShort(flags); }
// brcl : 4;// 000F Obsolete, superseded by brcTop, etc. In
- BYTE brclGet() {
- return sal::static_int_cast< BYTE, sal_uInt16 >(flagsGet() & 0xf); }
+ sal_uInt8 brclGet() {
+ return sal::static_int_cast< sal_uInt8, sal_uInt16 >(flagsGet() & 0xf); }
// fFrameEmpty : 1;// 0010 picture consists of a single frame
- BOOL fFrameEmptyGet() {
- return sal::static_int_cast< BYTE, sal_uInt16 >((flagsGet() >> 4) & 1); }
+ sal_Bool fFrameEmptyGet() {
+ return sal::static_int_cast< sal_uInt8, sal_uInt16 >((flagsGet() >> 4) & 1); }
// win6 stuff:
// fBitmap : 1;// 0020 ==1, when picture is just a bitmap
-// BOOL fBitmapGet() {
+// sal_Bool fBitmapGet() {
// return (flagsGet() >> 5) & 1; }
// fDrawHatch : 1;// 0040 ==1, when picture is an active OLE object
-// BOOL fDrawHatchGet() {
+// sal_Bool fDrawHatchGet() {
// return (flagsGet() >> 6) & 1; }
// fError : 1;// 0080 ==1, when picture is just an error message
-// BOOL fErrorGet() {
+// sal_Bool fErrorGet() {
// return (flagsGet() >> 7) & 1; }
// bpp : 8;// FF00 bits per pixel, 0 = unknown
-// BYTE bppGet() {
+// sal_uInt8 bppGet() {
// return (flagsGet() >> 8) & 0xff; }
// SVBT16 rgbrc[4];
-// USHORT rgbrcGet(USHORT nIndex) {
+// sal_uInt16 rgbrcGet(sal_uInt16 nIndex) {
// return SVBT16ToShort(rgbrc[nIndex]); }
// W1_BRC brcTop;// 0x2e specification for border above picture
// W1_BRC brcLeft;// 0x30 specification for border to the left
// W1_BRC brcBottom;// 0x32 specification for border below picture
// W1_BRC brcRight;// 0x34 specification for border to the right
// SVBT16 dxaOrigin;// 0x36 horizontal offset of hand annotation origin
-// USHORT dxaOriginGet() {
+// sal_uInt16 dxaOriginGet() {
// return SVBT16ToShort(dxaOrigin); }
// SVBT16 dyaOrigin;// 0x38 vertical offset of hand annotation origin
-// USHORT dyaOriginGet() {
+// sal_uInt16 dyaOriginGet() {
// return SVBT16ToShort(dyaOrigin); }
SVBT8 rgb;// 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
- BYTE* rgbGet() {
+ sal_uInt8* rgbGet() {
return rgb; }
};
struct W1_TBD /////////////////////////////////////////////////////////
{
SVBT8 aBits1;
- BYTE aBits1Get() {
+ sal_uInt8 aBits1Get() {
return SVBT8ToByte(aBits1); }
// SVBT8 jc : 3;// 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
- BYTE jcGet() {
+ sal_uInt8 jcGet() {
return aBits1Get() & 0x07; }
// SVBT8 tlc : 3;// 0x38 tab leader code: 0=no leader, 1=dotted leader,
// 2=hyphenated leader, 3=single line leader, 4=heavy line leader
- BYTE tlcGet() {
+ sal_uInt8 tlcGet() {
return (aBits1Get() >> 3 ) & 0x07; }
// * int :2 C0 reserved
};
@@ -827,11 +827,11 @@ struct W1_TBD /////////////////////////////////////////////////////////
struct W1_TC //////////////////////////////////////////////////////////
{
SVBT8 aBits1;
- BYTE aBits1Get() {
+ sal_uInt8 aBits1Get() {
return SVBT8ToByte(aBits1); }
- BYTE fFirstMergedGet() {
+ sal_uInt8 fFirstMergedGet() {
return aBits1Get() & 0x01; }
- BYTE fMergedGet() {
+ sal_uInt8 fMergedGet() {
return (aBits1Get() >> 1 ) & 0x01; }
SVBT8 aBits2;
// SVBT16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
@@ -852,16 +852,16 @@ struct W1_SHD ////////////////////////////////////////////// struct SHD
{
SVBT16 aBits1;
// SVBT16 nFore : 5;// 0x001f ForegroundColor
- USHORT GetFore() { return SVBT16ToShort(aBits1) & 0x01; };
+ sal_uInt16 GetFore() { return SVBT16ToShort(aBits1) & 0x01; };
void SetFore( short nVal ){
ShortToSVBT16((SVBT16ToShort(aBits1)&0xffe0)|(nVal&0x1f), aBits1); };
// SVBT16 nBack : 5;// 0x03e0 BackgroundColor
W1_SHD() { ShortToSVBT16( 0, aBits1 ); };
- USHORT GetBack() { return (SVBT16ToShort(aBits1) >> 5 & 0x1f ); };
+ sal_uInt16 GetBack() { return (SVBT16ToShort(aBits1) >> 5 & 0x1f ); };
void SetBack( short nVal ){
ShortToSVBT16((SVBT16ToShort(aBits1)&0xfc1f)|(nVal&0x1f)<<5, aBits1); };
// SVBT16 nStyle : 5;// 0x7c00 Percentage and Style
- USHORT GetStyle() { return (SVBT16ToShort(aBits1) >> 10 & 0x1f ); };
+ sal_uInt16 GetStyle() { return (SVBT16ToShort(aBits1) >> 10 & 0x1f ); };
void SetStyle( short nVal ){
ShortToSVBT16((SVBT16ToShort(aBits1)&0x83ff)|(nVal&0x1f)<<10, aBits1); };
// SVBT16 nDontKnow : 1;// 0x8000 ???
@@ -896,7 +896,7 @@ struct W1_ANLV ////////////////////////////////////////////////////////
SVBT16 ftc;// 6 font code of autonumber
SVBT16 hps;// 8 font half point size (or 0=auto)
SVBT16 iStartAt;// 0x0a starting value (0 to 65535)
- SVBT16 dxaIndent;// 0x0c *short?* *USHORT?* width of prefix text (same as indent)
+ SVBT16 dxaIndent;// 0x0c *short?* *sal_uInt16?* width of prefix text (same as indent)
SVBT16 dxaSpace;// 0x0e minimum space between number and paragraph
};
// *cbANLV (count of bytes of ANLV) is 16 (decimal), 10(hex).
diff --git a/sw/source/filter/ww8/WW8FFData.cxx b/sw/source/filter/ww8/WW8FFData.cxx
index bf69d00490d1..062971252567 100644
--- a/sw/source/filter/ww8/WW8FFData.cxx
+++ b/sw/source/filter/ww8/WW8FFData.cxx
@@ -88,7 +88,7 @@ void WW8FFData::WriteOUString(SvStream * pDataStrm, const ::rtl::OUString & rStr
void WW8FFData::Write(SvStream * pDataStrm)
{
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
static const sal_uInt8 aHeader[] =
{
diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx
index 796670385bd4..a8929dd78ae1 100644
--- a/sw/source/filter/ww8/WW8Sttbf.cxx
+++ b/sw/source/filter/ww8/WW8Sttbf.cxx
@@ -38,7 +38,7 @@ namespace ww8
{
rSt.Seek(nPos);
- mp_data.reset(new BYTE[nSize]);
+ mp_data.reset(new sal_uInt8[nSize]);
rSt.Read(mp_data.get(), nSize);
}
diff --git a/sw/source/filter/ww8/WW8Sttbf.hxx b/sw/source/filter/ww8/WW8Sttbf.hxx
index 9e3a54ed4b46..467c3c504924 100644
--- a/sw/source/filter/ww8/WW8Sttbf.hxx
+++ b/sw/source/filter/ww8/WW8Sttbf.hxx
@@ -36,7 +36,7 @@
namespace ww8
{
- typedef boost::shared_array<BYTE> DataArray_t;
+ typedef boost::shared_array<sal_uInt8> DataArray_t;
class WW8Struct : public ::sw::ExternalData
{
@@ -73,7 +73,7 @@ typedef ::std::vector<rtl::OUString> StringVector_t;
ExtrasVector_t m_Extras;
public:
- WW8Sttb(SvStream& rSt, INT32 nPos, sal_uInt32 nSize);
+ WW8Sttb(SvStream& rSt, sal_Int32 nPos, sal_uInt32 nSize);
virtual ~WW8Sttb();
sal_uInt32 getCount() const;
@@ -94,7 +94,7 @@ typedef ::std::vector<rtl::OUString> StringVector_t;
};
template <class T>
- WW8Sttb<T>::WW8Sttb(SvStream& rSt, INT32 nPos, sal_uInt32 nSize)
+ WW8Sttb<T>::WW8Sttb(SvStream& rSt, sal_Int32 nPos, sal_uInt32 nSize)
: WW8Struct(rSt, nPos, nSize), bDoubleByteCharacters(false)
{
sal_uInt32 nOffset = 0;
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index 8ca7c8d71571..28180f598f6e 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -664,7 +664,7 @@ void WW8TableInfo::processSwTable(const SwTable * pTable)
{
const SwTableLines & rLines = pTable->GetTabLines();
- for (USHORT n = 0; n < rLines.Count(); n++)
+ for (sal_uInt16 n = 0; n < rLines.Count(); n++)
{
const SwTableLine * pLine = rLines[n];
@@ -700,7 +700,7 @@ WW8TableInfo::processTableLine(const SwTable * pTable,
WW8TableNodeInfo::Pointer_t pTextNodeInfo;
- for (USHORT n = 0; n < rBoxes.Count(); n++)
+ for (sal_uInt16 n = 0; n < rBoxes.Count(); n++)
{
const SwTableBox * pBox = rBoxes[n];
@@ -737,7 +737,7 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox,
const SwTableLine * pLine = rLines[n];
const SwTableBoxes & rBoxes = pLine->GetTabBoxes();
- for (USHORT nBox = 0; nBox < rBoxes.Count(); nBox++)
+ for (sal_uInt16 nBox = 0; nBox < rBoxes.Count(); nBox++)
pNodeInfo = processTableBoxLines(rBoxes[nBox], pTable, pBoxToSet, nRow, nCell, nDepth);
}
}
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index 6f69f8e591a5..9e1bd653545b 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -132,8 +132,8 @@ class MSWordExportBase;
namespace sw { class Frame; }
namespace msword {
- const BYTE ColumnBreak = 0xE;
- const BYTE PageBreak = 0xC;
+ const sal_uInt8 ColumnBreak = 0xE;
+ const sal_uInt8 PageBreak = 0xC;
}
class AttributeOutputBase
@@ -198,7 +198,7 @@ public:
/// Output redlining.
virtual void Redline( const SwRedlineData* pRedline ) = 0;
- virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) = 0;
+ virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) = 0;
/// Output FKP (Formatted disK Page) - necessary for binary formats only.
/// FIXME having it in AttributeOutputBase is probably a hack, it
@@ -206,7 +206,7 @@ public:
virtual void OutputFKP() {}
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle ) = 0;
+ virtual void ParagraphStyle( sal_uInt16 nStyle ) = 0;
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo ) = 0;
@@ -240,26 +240,26 @@ public:
virtual void StartStyles() = 0;
/// End of the styles table.
- virtual void EndStyles( USHORT nNumberOfStyles ) = 0;
+ virtual void EndStyles( sal_uInt16 nNumberOfStyles ) = 0;
/// Write default style.
- virtual void DefaultStyle( USHORT nStyle ) = 0;
+ virtual void DefaultStyle( sal_uInt16 nStyle ) = 0;
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId ) = 0;
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId ) = 0;
/// End of a style in the styles table.
virtual void EndStyle() = 0;
/// Start of (paragraph or run) properties of a style.
- virtual void StartStyleProperties( bool bParProp, USHORT nStyle ) = 0;
+ virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle ) = 0;
/// End of (paragraph or run) properties of a style.
virtual void EndStyleProperties( bool bParProp ) = 0;
/// Numbering rule and Id.
- virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt& rNFmt, const SwFmt& rFmt ) = 0;
+ virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& rNFmt, const SwFmt& rFmt ) = 0;
/// Page break
/// As a paragraph property - the paragraph should be on the next page.
@@ -267,7 +267,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL ) = 0;
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL ) = 0;
/// Start of the section properties.
virtual void StartSection() = 0;
@@ -279,7 +279,7 @@ public:
virtual void SectionFormProtection( bool bProtected ) = 0;
/// Numbering of the lines in the document.
- virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo ) = 0;
+ virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo ) = 0;
/// Has different headers/footers for the title page.
virtual void SectionTitlePage() = 0;
@@ -293,30 +293,30 @@ public:
/// The style of the page numbers.
///
/// nPageRestartNumberr being 0 means no restart.
- virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber ) = 0;
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber ) = 0;
/// The type of breaking.
- virtual void SectionType( BYTE nBreakCode ) = 0;
+ virtual void SectionType( sal_uInt8 nBreakCode ) = 0;
/// Special header/footer flags, needed for old versions only.
- virtual void SectionWW6HeaderFooterFlags( BYTE /*nHeadFootFlags*/ ) {}
+ virtual void SectionWW6HeaderFooterFlags( sal_uInt8 /*nHeadFootFlags*/ ) {}
/// Definition of a numbering instance.
- virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule ) = 0;
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule ) = 0;
/// Start of the abstract numbering definition instance.
- virtual void StartAbstractNumbering( USHORT /*nId*/ ) {}
+ virtual void StartAbstractNumbering( sal_uInt16 /*nId*/ ) {}
/// End of the abstract numbering definition instance.
virtual void EndAbstractNumbering() {}
/// All the numbering level information.
- virtual void NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+ virtual void NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -529,7 +529,7 @@ protected:
/// Sfx item RES_COL
void FormatColumns( const SwFmtCol& );
- virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) = 0;
+ virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) = 0;
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& ) = 0;
@@ -567,7 +567,7 @@ public:
void OutputItem( const SfxPoolItem& rHt );
/// Use OutputItem() on an item set - for styles.
- void OutputStyleItemSet( const SfxItemSet& rSet, BOOL bDeep, BOOL bTestForDefault );
+ void OutputStyleItemSet( const SfxItemSet& rSet, sal_Bool bDeep, sal_Bool bTestForDefault );
/// Output frames.
void OutputFlyFrame( const sw::Frame& rFmt );
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 0a6151b98388..991f4b3a0a7e 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -218,7 +218,7 @@ void DocxAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointe
const SwTable *pTable = pInner->getTable( );
const SwTableLines& rLines = pTable->GetTabLines( );
- USHORT nLinesCount = rLines.Count( );
+ sal_uInt16 nLinesCount = rLines.Count( );
if ( pInner->isEndOfCell() )
{
@@ -419,7 +419,7 @@ void DocxAttributeOutput::DoWriteBookmarks()
const OString& rName = *it;
// Output the bookmark
- USHORT nId = m_nNextMarkId++;
+ sal_uInt16 nId = m_nNextMarkId++;
m_rOpenedMarksIds[rName] = nId;
m_pSerializer->singleElementNS( XML_w, XML_bookmarkStart,
FSNS( XML_w, XML_id ), OString::valueOf( sal_Int32( nId ) ).getStr( ),
@@ -435,10 +435,10 @@ void DocxAttributeOutput::DoWriteBookmarks()
const OString& rName = *it;
// Get the id of the bookmark
- std::map< OString, USHORT >::iterator pPos = m_rOpenedMarksIds.find( rName );
+ std::map< OString, sal_uInt16 >::iterator pPos = m_rOpenedMarksIds.find( rName );
if ( pPos != m_rOpenedMarksIds.end( ) )
{
- USHORT nId = ( *pPos ).second;
+ sal_uInt16 nId = ( *pPos ).second;
m_pSerializer->singleElementNS( XML_w, XML_bookmarkEnd,
FSNS( XML_w, XML_id ), OString::valueOf( sal_Int32( nId ) ).getStr( ),
FSEND );
@@ -584,7 +584,7 @@ void DocxAttributeOutput::EndField_Impl( FieldInfos& rInfos )
// should be visible
if ( rInfos.pField )
{
- USHORT nSubType = rInfos.pField->GetSubType( );
+ sal_uInt16 nSubType = rInfos.pField->GetSubType( );
bool bIsSetField = rInfos.pField->GetTyp( )->Which( ) == RES_SETEXPFLD;
bool bShowRef = ( !bIsSetField || ( nSubType & nsSwExtendedSubType::SUB_INVISIBLE ) ) ? false : true;
@@ -957,12 +957,12 @@ void DocxAttributeOutput::EndRedline()
m_pRedlineData = NULL;
}
-void DocxAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t )
+void DocxAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, sal_uInt16 /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t )
{
- OSL_TRACE( "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle )\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle )\n" );
}
-void DocxAttributeOutput::ParagraphStyle( USHORT nStyle )
+void DocxAttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
OString aStyleId( "style" );
aStyleId += OString::valueOf( sal_Int32( nStyle ) );
@@ -1007,13 +1007,13 @@ static OString impl_ConvertColor( const Color &rColor )
return color;
}
-static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, const SvxBorderLine* pBorderLine, USHORT nDist )
+static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, const SvxBorderLine* pBorderLine, sal_uInt16 nDist )
{
FastAttributeList* pAttr = pSerializer->createAttrList();
- USHORT inW = pBorderLine->GetInWidth();
- USHORT outW = pBorderLine->GetOutWidth();
- USHORT nWidth = inW + outW;
+ sal_uInt16 inW = pBorderLine->GetInWidth();
+ sal_uInt16 outW = pBorderLine->GetOutWidth();
+ sal_uInt16 nWidth = inW + outW;
// Compute val attribute value
// Can be one of:
@@ -1043,8 +1043,8 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
// The unit is the 8th of point
nWidth = sal_Int32( nWidth / 2.5 );
- USHORT nMinWidth = 2;
- USHORT nMaxWidth = 96;
+ sal_uInt16 nMinWidth = 2;
+ sal_uInt16 nMaxWidth = 96;
if ( nWidth > nMaxWidth )
nWidth = nMaxWidth;
@@ -1066,16 +1066,16 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
static void impl_pageBorders( FSHelperPtr pSerializer, const SvxBoxItem& rBox )
{
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
- static const USHORT aXmlElements[] =
+ static const sal_uInt16 aXmlElements[] =
{
XML_top, XML_left, XML_bottom, XML_right
};
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
{
const SvxBorderLine* pLn = rBox.GetLine( *pBrd );
@@ -1116,7 +1116,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ];
SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
- USHORT nColSpan = pCell->GetColSpan();
+ sal_uInt16 nColSpan = pCell->GetColSpan();
if ( nColSpan > 1 )
m_pSerializer->singleElementNS( XML_w, XML_gridSpan,
FSNS( XML_w, XML_val ), OString::valueOf( sal_Int32( nColSpan ) ).getStr(),
@@ -1134,16 +1134,16 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
// Cell margins
m_pSerializer->startElementNS( XML_w, XML_tcMar, FSEND );
const SvxBoxItem& rBox = pFmt->GetBox( );
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
- static const USHORT aXmlElements[] =
+ static const sal_uInt16 aXmlElements[] =
{
XML_top, XML_left, XML_bottom, XML_right
};
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
{
sal_Int32 nDist = sal_Int32( rBox.GetDistance( *pBrd ) );
@@ -1176,8 +1176,8 @@ void DocxAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t
if( pLayout && pLayout->IsExportable() )
m_pTableWrt = new SwWriteTable( pLayout );
else
- m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (USHORT)nPageSize,
- (USHORT)nTblSz, false);
+ m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (sal_uInt16)nPageSize,
+ (sal_uInt16)nTblSz, false);
}
void DocxAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
@@ -1459,16 +1459,16 @@ void DocxAttributeOutput::StartStyles()
FSEND );
}
-void DocxAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ )
+void DocxAttributeOutput::EndStyles( sal_uInt16 /*nNumberOfStyles*/ )
{
m_pSerializer->endElementNS( XML_w, XML_styles );
}
-void DocxAttributeOutput::DefaultStyle( USHORT nStyle )
+void DocxAttributeOutput::DefaultStyle( sal_uInt16 nStyle )
{
// are these the values of enum ww::sti (see ../inc/wwstyles.hxx)?
#if OSL_DEBUG_LEVEL > 0
- OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( USHORT nStyle )- %d\n", nStyle );
+ OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( sal_uInt16 nStyle )- %d\n", nStyle );
#else
(void) nStyle; // to quiet the warning
#endif
@@ -1707,7 +1707,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po
}
void DocxAttributeOutput::StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId )
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId )
{
OString aStyle( "style" );
@@ -1737,7 +1737,7 @@ void DocxAttributeOutput::EndStyle()
m_pSerializer->endElementNS( XML_w, XML_style );
}
-void DocxAttributeOutput::StartStyleProperties( bool bParProp, USHORT /*nStyle*/ )
+void DocxAttributeOutput::StartStyleProperties( bool bParProp, sal_uInt16 /*nStyle*/ )
{
if ( bParProp )
{
@@ -1765,7 +1765,7 @@ void DocxAttributeOutput::EndStyleProperties( bool bParProp )
}
}
-void DocxAttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
+void DocxAttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
{
if ( nLvl >= WW8ListManager::nMaxLevel )
nLvl = WW8ListManager::nMaxLevel - 1;
@@ -1785,7 +1785,7 @@ void DocxAttributeOutput::PageBreakBefore( bool bBreak )
FSEND );
}
-void DocxAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo )
+void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo )
{
switch ( nC )
{
@@ -1860,7 +1860,7 @@ void DocxAttributeOutput::SectionFormProtection( bool bProtected )
FSNS( XML_w, XML_val ), "off", FSEND );
}
-void DocxAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLineNumberInfo& /*rLnNumInfo*/ )
+void DocxAttributeOutput::SectionLineNumbering( sal_uLong /*nRestartNo*/, const SwLineNumberInfo& /*rLnNumInfo*/ )
{
// see 2.6.8 lnNumType (Line Numbering Settings)
#if OSL_DEBUG_LEVEL > 0
@@ -1906,7 +1906,7 @@ void DocxAttributeOutput::SectionBiDi( bool bBiDi )
m_pSerializer->singleElementNS( XML_w, XML_bidi, FSEND );
}
-static OString impl_NumberingType( USHORT nNumberingType )
+static OString impl_NumberingType( sal_uInt16 nNumberingType )
{
OString aType;
@@ -1930,7 +1930,7 @@ static OString impl_NumberingType( USHORT nNumberingType )
return aType;
}
-void DocxAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber )
+void DocxAttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber )
{
// FIXME Not called properly with page styles like "First Page"
@@ -1954,7 +1954,7 @@ void DocxAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRes
#endif
}
-void DocxAttributeOutput::SectionType( BYTE nBreakCode )
+void DocxAttributeOutput::SectionType( sal_uInt8 nBreakCode )
{
/* break code: 0 No break, 1 New column
2 New page, 3 Even page, 4 Odd page
@@ -2040,7 +2040,7 @@ void DocxAttributeOutput::FontPitchType( FontPitch ePitch ) const
FSEND );
}
-void DocxAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRule )
+void DocxAttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule )
{
// nId is the same both for abstract numbering definition as well as the
// numbering definition itself
@@ -2066,7 +2066,7 @@ void DocxAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRul
m_pSerializer->endElementNS( XML_w, XML_num );
}
-void DocxAttributeOutput::StartAbstractNumbering( USHORT nId )
+void DocxAttributeOutput::StartAbstractNumbering( sal_uInt16 nId )
{
m_pSerializer->startElementNS( XML_w, XML_abstractNum,
FSNS( XML_w, XML_abstractNumId ), OString::valueOf( sal_Int32( nId ) ).getStr(),
@@ -2078,12 +2078,12 @@ void DocxAttributeOutput::EndAbstractNumbering()
m_pSerializer->endElementNS( XML_w, XML_abstractNum );
}
-void DocxAttributeOutput::NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE * /*pNumLvlPos*/,
- BYTE nFollow,
+ const sal_uInt8 * /*pNumLvlPos*/,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -2545,7 +2545,7 @@ void DocxAttributeOutput::TextCharFormat( const SwFmtCharFmt& )
void DocxAttributeOutput::RefField( const SwField& rFld, const String& rRef )
{
- USHORT nType = rFld.GetTyp( )->Which( );
+ sal_uInt16 nType = rFld.GetTyp( )->Which( );
if ( nType == RES_GETEXPFLD )
{
String sCmd = FieldString( ww::eREF );
@@ -2597,7 +2597,7 @@ void DocxAttributeOutput::WriteExpand( const SwField* pFld )
m_rExport.OutputField( pFld, ww::eUNKNOWN, sCmd );
}
-void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, BYTE nMode )
+void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode )
{
struct FieldInfos infos;
infos.pField = pFld;
@@ -2610,8 +2610,8 @@ void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType
if ( pFld )
{
- USHORT nType = pFld->GetTyp( )->Which( );
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nType = pFld->GetTyp( )->Which( );
+ sal_uInt16 nSubType = pFld->GetSubType();
// TODO Any other field types here ?
if ( ( nType == RES_SETEXPFLD ) && ( nSubType & nsSwGetSetExpType::GSE_STRING ) )
@@ -2893,7 +2893,7 @@ void DocxAttributeOutput::ParaNumRule_Impl( const SwTxtNode* /*pTxtNd*/, sal_Int
void DocxAttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
{
- USHORT nXmlElement = 0;
+ sal_uInt16 nXmlElement = 0;
switch ( rScriptSpace.Which( ) )
{
@@ -2996,7 +2996,7 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
m_pSpacingAttrList = m_pSerializer->createAttrList();
- USHORT nLDist, nRDist;
+ sal_uInt16 nLDist, nRDist;
const SfxPoolItem* pItem = m_rExport.HasItem( RES_BOX );
if ( pItem )
{
@@ -3005,8 +3005,8 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
}
else
nLDist = nRDist = 0;
- nLDist = nLDist + (USHORT)rLRSpace.GetLeft();
- nRDist = nRDist + (USHORT)rLRSpace.GetRight();
+ nLDist = nLDist + (sal_uInt16)rLRSpace.GetLeft();
+ nRDist = nRDist + (sal_uInt16)rLRSpace.GetRight();
m_pSpacingAttrList->add( FSNS( XML_w, XML_left ), OString::valueOf( sal_Int32( nLDist ) ) );
m_pSpacingAttrList->add( FSNS( XML_w, XML_right ), OString::valueOf( sal_Int32( nRDist ) ) );
@@ -3142,7 +3142,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
}
}
-void DocxAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
+void DocxAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
{
// Get the columns attributes
FastAttributeList *pColsAttrList = m_pSerializer->createAttrList();
@@ -3153,7 +3153,7 @@ void DocxAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol
const char* pEquals = "false";
if ( bEven )
{
- USHORT nWidth = rCol.GetGutterWidth( true );
+ sal_uInt16 nWidth = rCol.GetGutterWidth( true );
pColsAttrList->add( FSNS( XML_w, XML_space ),
OString::valueOf( sal_Int32( nWidth ) ).getStr( ) );
@@ -3172,16 +3172,16 @@ void DocxAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol
const SwColumns & rColumns = rCol.GetColumns( );
if ( !bEven )
{
- for ( USHORT n = 0; n < nCols; ++n )
+ for ( sal_uInt16 n = 0; n < nCols; ++n )
{
FastAttributeList *pColAttrList = m_pSerializer->createAttrList();
- USHORT nWidth = rCol.CalcPrtColWidth( n, ( USHORT ) nPageSize );
+ sal_uInt16 nWidth = rCol.CalcPrtColWidth( n, ( sal_uInt16 ) nPageSize );
pColAttrList->add( FSNS( XML_w, XML_w ),
OString::valueOf( sal_Int32( nWidth ) ).getStr( ) );
if ( n + 1 != nCols )
{
- USHORT nSpacing = rColumns[n]->GetRight( ) + rColumns[n + 1]->GetLeft( );
+ sal_uInt16 nSpacing = rColumns[n]->GetRight( ) + rColumns[n + 1]->GetLeft( );
pColAttrList->add( FSNS( XML_w, XML_space ),
OString::valueOf( sal_Int32( nSpacing ) ).getStr( ) );
}
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 841f39372f97..280697d277bf 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -131,10 +131,10 @@ public:
/// End of the tag that encloses the run.
void EndRedline();
- virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
+ virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle );
+ virtual void ParagraphStyle( sal_uInt16 nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
@@ -166,26 +166,26 @@ public:
virtual void StartStyles();
/// End of the styles table.
- virtual void EndStyles( USHORT nNumberOfStyles );
+ virtual void EndStyles( sal_uInt16 nNumberOfStyles );
/// Write default style.
- virtual void DefaultStyle( USHORT nStyle );
+ virtual void DefaultStyle( sal_uInt16 nStyle );
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId );
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId );
/// End of a style in the styles table.
virtual void EndStyle();
/// Start of (paragraph or run) properties of a style.
- virtual void StartStyleProperties( bool bParProp, USHORT nStyle );
+ virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle );
/// End of (paragraph or run) properties of a style.
virtual void EndStyleProperties( bool bParProp );
/// Numbering rule and Id.
- virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
+ virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
/// Page break
/// As a paragraph property - the paragraph should be on the next page.
@@ -193,7 +193,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL );
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL );
/// Start of the section properties.
virtual void StartSection();
@@ -205,7 +205,7 @@ public:
virtual void SectionFormProtection( bool bProtected );
/// Numbering of the lines in the document.
- virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo );
+ virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo );
/// Has different headers/footers for the title page.
virtual void SectionTitlePage();
@@ -219,10 +219,10 @@ public:
/// The style of the page numbers.
///
/// nPageRestartNumberr being 0 means no restart.
- virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber );
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber );
/// The type of breaking.
- virtual void SectionType( BYTE nBreakCode );
+ virtual void SectionType( sal_uInt8 nBreakCode );
/// Start the font.
void StartFont( const String& rFamilyName ) const;
@@ -243,21 +243,21 @@ public:
void FontPitchType( FontPitch ePitch ) const;
/// Definition of a numbering instance.
- virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule );
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule );
/// Start of the abstract numbering definition instance.
- virtual void StartAbstractNumbering( USHORT nId );
+ virtual void StartAbstractNumbering( sal_uInt16 nId );
/// End of the abstract numbering definition instance.
virtual void EndAbstractNumbering();
/// All the numbering level information.
- virtual void NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+ virtual void NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -265,7 +265,7 @@ public:
sal_Int16 nListTabPos,
const String &rNumberingString );
- void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, BYTE nMode );
+ void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode );
void WriteBookmarks_Impl( std::vector< rtl::OUString >& rStarts, std::vector< rtl::OUString >& rEnds );
@@ -492,7 +492,7 @@ protected:
virtual void FormatBox( const SvxBoxItem& );
/// Sfx item RES_COL
- virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
+ virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& );
@@ -564,7 +564,7 @@ private:
std::vector<rtl::OString> m_rMarksEnd;
/// Maps of the bookmarks ids
- std::map<rtl::OString, USHORT> m_rOpenedMarksIds;
+ std::map<rtl::OString, sal_uInt16> m_rOpenedMarksIds;
/// The current table helper
SwWriteTable *m_pTableWrt;
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 35c126cd6571..9a58b8b3c58d 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -82,7 +82,7 @@ MSWordSections& DocxExport::Sections() const
return *m_pSections;
}
-bool DocxExport::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
+bool DocxExport::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich )
{
// TODO FIXME is this actually true for docx? - this is ~copied from WW8
if ( nScript == i18n::ScriptType::ASIAN )
@@ -186,7 +186,7 @@ bool DocxExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt )
return bRet;
}
-void DocxExport::WriteHeadersFooters( BYTE nHeadFootFlags,
+void DocxExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt )
{
// headers
@@ -210,7 +210,7 @@ void DocxExport::WriteHeadersFooters( BYTE nHeadFootFlags,
WriteHeaderFooter( rFirstPageFmt, false, "first" );
}
-void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, BYTE nMode )
+void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, sal_uInt8 nMode )
{
m_pAttrOutput->WriteField_Impl( pFld, eFldType, rFldCmd, nMode );
}
@@ -305,7 +305,7 @@ void DocxExport::OutputPageSectionBreaks( const SwTxtNode& )
}
-void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum )
+void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum )
{
AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() );
m_pSections->AppendSection( pPageDesc, pFmt, nLnNum );
@@ -335,7 +335,7 @@ void DocxExport::OutputEndNode( const SwEndNode& rEndNode )
if( !pParentFmt )
pParentFmt = (SwSectionFmt*)0xFFFFFFFF;
- ULONG nRstLnNum;
+ sal_uLong nRstLnNum;
if( rNd.IsCntntNode() )
nRstLnNum = const_cast< SwCntntNode* >( rNd.GetCntntNode() )->GetSwAttrSet().GetLineNumber().GetStartValue();
else
@@ -362,7 +362,7 @@ void DocxExport::OutputOLENode( const SwOLENode& )
OSL_TRACE( "TODO DocxExport::OutputOLENode( const SwOLENode& )\n" );
}
-ULONG DocxExport::ReplaceCr( BYTE )
+sal_uLong DocxExport::ReplaceCr( sal_uInt8 )
{
// Completely unused for Docx export... only here for code sharing
// purpose with binary export
@@ -378,7 +378,7 @@ void DocxExport::PrepareNewPageDesc( const SfxItemSet* pSet,
AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() );
const SwSectionFmt* pFmt = GetSectionFormat( rNd );
- const ULONG nLnNm = GetSectionLineNo( pSet, rNd );
+ const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd );
ASSERT( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 7d20a1da6969..3cf1397ea9b5 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -91,7 +91,7 @@ public:
virtual bool HackIsWW8OrHigher() const { return true; }
/// Guess the script (asian/western).
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich );
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich );
virtual void AppendBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen );
@@ -107,12 +107,12 @@ public:
virtual bool DisallowInheritingOutlineNumbering( const SwFmt &rFmt );
/// Output the actual headers and footers.
- virtual void WriteHeadersFooters( BYTE nHeadFootFlags,
+ virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt );
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL );
+ const String& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL );
/// Write the data of the form field
virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark );
@@ -125,7 +125,7 @@ public:
virtual void DoFormText(const SwInputField * pFld);
- virtual ULONG ReplaceCr( BYTE nChar );
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar );
protected:
/// Format-dependant part of the actual export.
@@ -147,7 +147,7 @@ protected:
virtual void OutputOLENode( const SwOLENode& );
- virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum );
+ virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum );
virtual void SectionBreaksAndFrames( const SwTxtNode& rNode ) {}
diff --git a/sw/source/filter/ww8/dump/dump8.cxx b/sw/source/filter/ww8/dump/dump8.cxx
index 10037b37636a..f0679da25067 100644
--- a/sw/source/filter/ww8/dump/dump8.cxx
+++ b/sw/source/filter/ww8/dump/dump8.cxx
@@ -42,7 +42,7 @@ char** pPara;
// Deklarationen
int PrepareConvert( String& rName, String& rOutName, String& rMess );
-int DoConvert( const String& rName, BYTE nVersion );
+int DoConvert( const String& rName, sal_uInt8 nVersion );
void DeInit();
@@ -83,7 +83,7 @@ void MyApp::Main()
{
SvFactory::Init();
String aMess, aName, aOutName;
- BYTE nVersion = 8;
+ sal_uInt8 nVersion = 8;
int nArgs = GetCommandLineParamCount();
if (nArgs)
@@ -111,7 +111,7 @@ void MyApp::Main()
}
}
- BOOL bOk = !aMess.Len()
+ sal_Bool bOk = !aMess.Len()
&& !PrepareConvert( aName, aOutName, aMess )
&& !DoConvert( aName, nVersion );
diff --git a/sw/source/filter/ww8/dump/dump8a.cxx b/sw/source/filter/ww8/dump/dump8a.cxx
index cff800713e34..687386b1c9c0 100644
--- a/sw/source/filter/ww8/dump/dump8a.cxx
+++ b/sw/source/filter/ww8/dump/dump8a.cxx
@@ -60,73 +60,73 @@ SvStorageStreamRef xDataStream; // ist bei Ver6-7 mit xStrm identisch,
typedef void (*FNDumpData)( void* );
-BOOL DumpChar( BYTE c );
+sal_Bool DumpChar( sal_uInt8 c );
void DumpShortPlainText( WW8_CP nStartCp, long nTextLen, char* pName );
void DumpPlainText( WW8_CP nStartCp, long nTextLen, char* pName );
-void DumpSprms( BYTE nVersion, SvStream& rSt, short nLen );
+void DumpSprms( sal_uInt8 nVersion, SvStream& rSt, short nLen );
-BOOL WW8ReadINT32( SvStream& rStrm, INT32& rTarget )
+sal_Bool WW8ReadINT32( SvStream& rStrm, sal_Int32& rTarget )
{
rStrm >> rTarget;
- return TRUE;
+ return sal_True;
SVBT32 nData;
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
if( 4 == rStrm.Read( &nData, 4 ) )
rTarget = SVBT32ToUInt32( nData );
else
- bOk = FALSE;
+ bOk = sal_False;
return bOk;
}
-BOOL WW8ReadINT16( SvStream& rStrm, INT16& rTarget )
+sal_Bool WW8ReadINT16( SvStream& rStrm, sal_Int16& rTarget )
{
rStrm >> rTarget;
- return TRUE;
+ return sal_True;
SVBT16 nData;
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
if( 2 == rStrm.Read( &nData, 2 ) )
{
rTarget = SVBT16ToShort( nData );
}
else
- bOk = FALSE;
+ bOk = sal_False;
return bOk;
}
-BOOL WW8ReadBYTE( SvStream& rStrm, BYTE& rTarget )
+sal_Bool WW8ReadBYTE( SvStream& rStrm, sal_uInt8& rTarget )
{
rStrm >> rTarget;
- return TRUE;
+ return sal_True;
SVBT8 nData;
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
if( 1 == rStrm.Read( &nData, 1 ) )
rTarget = SVBT8ToByte( nData );
else
- bOk = FALSE;
+ bOk = sal_False;
return bOk;
}
-BOOL WW8ReadUINT32( SvStream& rStrm, UINT32& rTarget )
- { return WW8ReadINT32( rStrm, (INT32&) rTarget ); }
+sal_Bool WW8ReadUINT32( SvStream& rStrm, sal_uInt32& rTarget )
+ { return WW8ReadINT32( rStrm, (sal_Int32&) rTarget ); }
-BOOL WW8ReadUINT16( SvStream& rStrm, UINT16& rTarget )
- { return WW8ReadINT16( rStrm, (INT16&) rTarget ); }
+sal_Bool WW8ReadUINT16( SvStream& rStrm, sal_uInt16& rTarget )
+ { return WW8ReadINT16( rStrm, (sal_Int16&) rTarget ); }
-static void Dump_LVL( UINT16 nLevel )
+static void Dump_LVL( sal_uInt16 nLevel )
{
indent( *pOut, *xTableStream );
long nStart, dxaSpace, dxaIndent;
- BYTE nfc, nFlags, ixchFollow, cbChpx, cbPapx;
- BYTE aOfsNumsXCH[nWW8MaxListLevel];
+ sal_uInt8 nfc, nFlags, ixchFollow, cbChpx, cbPapx;
+ sal_uInt8 aOfsNumsXCH[nWW8MaxListLevel];
*xTableStream >> nStart >> nfc >> nFlags;
xTableStream->Read( aOfsNumsXCH, 9 );
*xTableStream >> ixchFollow >> dxaSpace >> dxaIndent
@@ -135,7 +135,7 @@ static void Dump_LVL( UINT16 nLevel )
*pOut << " Level: " << nLevel << endl1;
*pOut << indent2 << " Start: " << nStart
- << " Fmt: " << (USHORT)nfc
+ << " Fmt: " << (sal_uInt16)nfc
<< " Follow: ";
if( 0 == ixchFollow ) *pOut << "tab";
else if( 1 == ixchFollow ) *pOut << "blank";
@@ -143,24 +143,24 @@ static void Dump_LVL( UINT16 nLevel )
*pOut << endl1 << indent2<< " dxSpace: " << dxaSpace
<< " dxaIndent: " << dxaIndent << " LevelCharPos: ";
- for( BYTE x = 0; x < nWW8MaxListLevel; ++x )
- *pOut << (USHORT)aOfsNumsXCH[ x ] << ", ";
+ for( sal_uInt8 x = 0; x < nWW8MaxListLevel; ++x )
+ *pOut << (sal_uInt16)aOfsNumsXCH[ x ] << ", ";
*pOut << endl1;
if( cbPapx )
{
- ULONG nXPos = xTableStream->Tell();
+ sal_uLong nXPos = xTableStream->Tell();
DumpSprms( pWwFib->nVersion, *xTableStream, cbPapx );
xTableStream->Seek( nXPos + cbPapx );
}
if( cbChpx )
{
- ULONG nXPos = xTableStream->Tell();
+ sal_uLong nXPos = xTableStream->Tell();
DumpSprms( pWwFib->nVersion, *xTableStream, cbChpx );
xTableStream->Seek( nXPos + cbChpx );
}
- USHORT nStrLen, nC;
+ sal_uInt16 nStrLen, nC;
*xTableStream >> nStrLen;
char* pStr = new char[ nStrLen+1 ], *p = pStr;
while( nStrLen-- )
@@ -177,14 +177,14 @@ static void DumpNumList()
{
if( pWwFib->lcbSttbListNames )
{
- ULONG nOldPos = xTableStream->Tell();
+ sal_uLong nOldPos = xTableStream->Tell();
xTableStream->Seek( pWwFib->fcSttbListNames );
*pOut << endl1;
begin( *pOut, *xTableStream ) << "ListNames, Size ";
- UINT16 nDummy;
- UINT32 nCount;
+ sal_uInt16 nDummy;
+ sal_uInt32 nCount;
*xTableStream >> nDummy >> nCount;
*pOut << nCount << ", Dummy: " << nDummy << endl1;
@@ -192,7 +192,7 @@ static void DumpNumList()
*pOut << indent2;
for( ; nCount; --nCount )
{
- UINT16 nLen, nC;
+ sal_uInt16 nLen, nC;
*xTableStream >> nLen;
char * pChar = new char[ nLen + 1 ], *p = pChar;
while( nLen-- )
@@ -213,29 +213,29 @@ static void DumpNumList()
if( pWwFib->lcbPlcfLst )
{
- ULONG nOldPos = xTableStream->Tell();
+ sal_uLong nOldPos = xTableStream->Tell();
xTableStream->Seek( pWwFib->fcPlcfLst );
*pOut << endl1;
begin( *pOut, *xTableStream ) << "LiST Data on File, Size ";
- UINT16 nCount;
+ sal_uInt16 nCount;
*xTableStream >> nCount;
*pOut << nCount << endl1;
- ULONG nLVLPos = pWwFib->fcPlcfLst + ( nCount * 0x1c ) + 2;
+ sal_uLong nLVLPos = pWwFib->fcPlcfLst + ( nCount * 0x1c ) + 2;
// 1.1 alle LST einlesen
- for( UINT16 nList = 0; nList < nCount; nList++ )
+ for( sal_uInt16 nList = 0; nList < nCount; nList++ )
{
indent( *pOut, *xTableStream );
- BYTE nByte;
- UINT32 nLstId, nTplId;
+ sal_uInt8 nByte;
+ sal_uInt32 nLstId, nTplId;
*xTableStream >> nLstId >> nTplId;
- USHORT aStyleIdArr[ nWW8MaxListLevel ];
- for( USHORT nLevel = 0; nLevel < nWW8MaxListLevel; nLevel++ )
+ sal_uInt16 aStyleIdArr[ nWW8MaxListLevel ];
+ for( sal_uInt16 nLevel = 0; nLevel < nWW8MaxListLevel; nLevel++ )
*xTableStream >> aStyleIdArr[ nLevel ];
*xTableStream >> nByte;
xTableStream->SeekRel( 1 ); // Dummy ueberlesen
@@ -251,7 +251,7 @@ static void DumpNumList()
if( 2 & nByte ) *pOut << " <restart at new section>";
if( 3 & nByte ) *pOut << endl1;
- ULONG nTmpPos = xTableStream->Tell();
+ sal_uLong nTmpPos = xTableStream->Tell();
xTableStream->Seek( nLVLPos );
// 1.2 alle LVL aller aLST einlesen
@@ -268,38 +268,38 @@ static void DumpNumList()
if( pWwFib->lcbPlfLfo )
{
- ULONG nOldPos = xTableStream->Tell();
+ sal_uLong nOldPos = xTableStream->Tell();
xTableStream->Seek( pWwFib->fcPlfLfo );
*pOut << endl1;
begin( *pOut, *xTableStream ) << "List Format Override, Size ";
- UINT32 nCount, nLstId;
+ sal_uInt32 nCount, nLstId;
*xTableStream >> nCount;
*pOut << nCount << endl1;
- ULONG nLVLPos = pWwFib->fcPlfLfo + ( nCount * 0x10 ) + 4;
+ sal_uLong nLVLPos = pWwFib->fcPlfLfo + ( nCount * 0x10 ) + 4;
for( ; nCount; --nCount )
{
indent( *pOut, *xTableStream );
- BYTE nLevels;
+ sal_uInt8 nLevels;
*xTableStream >> nLstId;
xTableStream->SeekRel( 8 );
*xTableStream >> nLevels;
xTableStream->SeekRel( 3 );
*pOut << "ListId: " << nLstId
- << " Override Levels: " << (USHORT)nLevels << endl1;
+ << " Override Levels: " << (sal_uInt16)nLevels << endl1;
- ULONG nTmpPos = xTableStream->Tell();
+ sal_uLong nTmpPos = xTableStream->Tell();
xTableStream->Seek( nLVLPos );
- for( BYTE nLvl = 0; nLvl < nLevels; ++nLvl )
+ for( sal_uInt8 nLvl = 0; nLvl < nLevels; ++nLvl )
{
- UINT32 nStartAt;
- BYTE nFlags;
+ sal_uInt32 nStartAt;
+ sal_uInt8 nFlags;
do {
*xTableStream >> nFlags;
} while( 0xFF == nFlags );
@@ -337,9 +337,9 @@ static void DumpBookLow()
*pOut << endl1;
WW8PLCFspecial aStarts( &xStrm, pWwFib->fcPlcfbkf, pWwFib->lcbPlcfbkf, 4 );
- WW8PLCFspecial aEnds( &xStrm, pWwFib->fcPlcfbkl, pWwFib->lcbPlcfbkl, 0, -1, TRUE );
+ WW8PLCFspecial aEnds( &xStrm, pWwFib->fcPlcfbkl, pWwFib->lcbPlcfbkl, 0, -1, sal_True );
- USHORT i = 0;
+ sal_uInt16 i = 0;
while( 1 ){
long nStart = aStarts.GetPos( i );
if( nStart >= LONG_MAX )
@@ -350,7 +350,7 @@ static void DumpBookLow()
const void* p = aStarts.GetData( i );
if( p ){
*pOut << ", EndIdx: ";
- USHORT nEndIdx = *((USHORT*)p);
+ sal_uInt16 nEndIdx = *((sal_uInt16*)p);
*pOut << nEndIdx;
long nEnd = aEnds.GetPos( nEndIdx );
*pOut << ", End: " << hex6 << nEnd << hex
@@ -375,7 +375,7 @@ static void DumpBookHigh()
*pOut << indent1 << begin1 << "Bookmarks High" << endl1;
- USHORT i = 0;
+ sal_uInt16 i = 0;
while( 1 )
{
long nPos = aBook.Where();
@@ -396,20 +396,20 @@ static void DumpBookHigh()
*pOut << end2 << "Bookmarks High" << endl1 << endl1;
}
-static BOOL DumpField3( WW8PLCFspecial& rPlc )
+static sal_Bool DumpField3( WW8PLCFspecial& rPlc )
{
WW8FieldDesc aF;
- BOOL bOk = WW8GetFieldPara( pWwFib->nVersion, rPlc, aF );
+ sal_Bool bOk = WW8GetFieldPara( pWwFib->nVersion, rPlc, aF );
if( !bOk )
{
*pOut << " " << indent1 << "no WW8GetFieldPara()" << endl1;
- return FALSE;
+ return sal_False;
}
*pOut << " " << indent1 << begin1 << "Field Cp: " << hex
<< aF.nSCode << ", Len: " << aF.nLCode << "; Cp: " << aF.nSRes
- << ", Len: "<< aF.nLRes << ", Typ: " << dec << (USHORT)aF.nId
- << ", Options: " << hex << (USHORT)aF.nOpt;
+ << ", Len: "<< aF.nLRes << ", Typ: " << dec << (sal_uInt16)aF.nId
+ << ", Options: " << hex << (sal_uInt16)aF.nOpt;
if( aF.bCodeNest )
*pOut << " Code Nested";
if( aF.bResNest )
@@ -418,49 +418,49 @@ static BOOL DumpField3( WW8PLCFspecial& rPlc )
DumpShortPlainText( aF.nSCode, aF.nLCode, "Code" );
DumpShortPlainText( aF.nSRes, aF.nLRes, "Result" );
*pOut << " " << end1 << "Field" << endl1;
- return TRUE;
+ return sal_True;
}
-static BOOL DumpField2( WW8PLCFspecial& rPlc )
+static sal_Bool DumpField2( WW8PLCFspecial& rPlc )
{
WW8_CP nSCode, nECode, nSRes, nERes;
void* pData;
if( !rPlc.Get( nSCode, pData ) ) // Ende des Plc1 ?
- return FALSE;
+ return sal_False;
rPlc++;
- if( ((BYTE*)pData)[0] != 19 ){
- *pOut << "Field Error, " << (USHORT)((BYTE*)pData)[0] << endl1;
- return TRUE; // nicht abbrechen
+ if( ((sal_uInt8*)pData)[0] != 19 ){
+ *pOut << "Field Error, " << (sal_uInt16)((sal_uInt8*)pData)[0] << endl1;
+ return sal_True; // nicht abbrechen
}
*pOut << " " << indent1 << begin1 << "Field" << " Cp: " << hex
- << nSCode << " Typ: " << dec << (USHORT)((BYTE*)pData)[1] << endl1;
+ << nSCode << " Typ: " << dec << (sal_uInt16)((sal_uInt8*)pData)[1] << endl1;
if( !rPlc.Get( nECode, pData ) ) // Ende des Plc1 ?
- return FALSE;
+ return sal_False;
DumpShortPlainText( nSCode, nECode - nSCode, "Code" ); // Code, bei nested abgeschnitten
nSRes = nECode; // Default
- while( ((BYTE*)pData)[0] == 19 ){ // immer noch neue (nested) Anfaenge ?
+ while( ((sal_uInt8*)pData)[0] == 19 ){ // immer noch neue (nested) Anfaenge ?
DumpField2( rPlc ); // nested Field im Beschreibungsteil
if( !rPlc.Get( nSRes, pData ) ) // Ende des Plc1 ?
- return FALSE;
+ return sal_False;
}
- if( ((BYTE*)pData)[0] == 20 ){ // Field Separator ?
+ if( ((sal_uInt8*)pData)[0] == 20 ){ // Field Separator ?
rPlc++;
*pOut << " " << indent1 << "Field Seperator" << " Cp: " << hex << nSRes
- << ", Flags = 0x" << hex << (USHORT)((BYTE*)pData)[1] << dec << endl1;
+ << ", Flags = 0x" << hex << (sal_uInt16)((sal_uInt8*)pData)[1] << dec << endl1;
if( !rPlc.Get( nERes, pData ) ) // Ende des Plc1 ?
- return FALSE;
+ return sal_False;
- while( ((BYTE*)pData)[0] == 19 ){ // immer noch neue (nested) Anfaenge ?
+ while( ((sal_uInt8*)pData)[0] == 19 ){ // immer noch neue (nested) Anfaenge ?
DumpField2( rPlc ); // nested Field im Resultatteil
if( !rPlc.Get( nERes, pData ) ) // Ende des Plc1 ?
- return FALSE;
+ return sal_False;
}
DumpShortPlainText( nSRes, nERes - nSRes, "Result" ); // Result, bei nested incl. nested Field
@@ -469,15 +469,15 @@ static BOOL DumpField2( WW8PLCFspecial& rPlc )
}
rPlc++;
- if( ((BYTE*)pData)[0] == 21 ){ // Field Ende ?
+ if( ((sal_uInt8*)pData)[0] == 21 ){ // Field Ende ?
*pOut << " " << end1 << " Field " << " Cp: " << hex << nERes
- << ", Flags = 0x" << hex << (USHORT)((BYTE*)pData)[1] << dec << endl1;
+ << ", Flags = 0x" << hex << (sal_uInt16)((sal_uInt8*)pData)[1] << dec << endl1;
}else{
*pOut << " Unknown Field Type" << endl1;
*pOut << " " << end1 << " Field " << endl1;
}
- return TRUE;
+ return sal_True;
}
static void DumpField1( WW8_FC nPos, long nLen, char* pName )
@@ -515,7 +515,7 @@ static void DumpFonts()
{
WW8Fonts aFonts( *xTableStream, *pWwFib );
- USHORT i;
+ sal_uInt16 i;
*pOut << endl1;
*pOut << 'T' << hex6 << pWwFib->fcSttbfffn << dec2 << ' ' << indent1 << begin1 << "FFNs" << endl1;
@@ -551,7 +551,7 @@ static void DumpFonts()
class DFib: public WW8Fib
{
public:
- DFib( SvStream& rStrm, BYTE nVersion ) : WW8Fib( rStrm, nVersion ) {}
+ DFib( SvStream& rStrm, sal_uInt8 nVersion ) : WW8Fib( rStrm, nVersion ) {}
void Dump();
};
@@ -573,7 +573,7 @@ void DFib::Dump()
*pOut << "\tfGlsy: " << (fGlsy ? '1' : '0') << endl1;
*pOut << "\tfComplex: " << (fComplex ? '1' : '0') << endl1;
*pOut << "\tfHasPic: " << (fHasPic ? '1' : '0') << endl1;
- *pOut << "\tcQuickSaves: " << (USHORT)cQuickSaves << endl1;
+ *pOut << "\tcQuickSaves: " << (sal_uInt16)cQuickSaves << endl1;
*pOut << "\tfEncrypted: " << (fEncrypted ? '1' : '0') << endl1;
*pOut << "\tfWhichTblStm: " << (fWhichTblStm ? '1' : '0') << endl1;
*pOut << "\tfExtChar: " << (fExtChar ? '1' : '0') << endl1;
@@ -763,11 +763,11 @@ void DFib::Dump()
class DStyle: public WW8Style
{
- BYTE nVersion;
+ sal_uInt8 nVersion;
public:
DStyle( SvStream& rStream, WW8Fib& rFib )
: WW8Style( rStream, rFib ){ nVersion = rFib.nVersion; }
- void Dump1Style( USHORT nNr );
+ void Dump1Style( sal_uInt16 nNr );
void Dump();
};
@@ -783,9 +783,9 @@ static void DumpIt( SvStream& rSt, short nLen )
return;
}
while ( nLen ){
- BYTE c;
+ sal_uInt8 c;
xStrm->Read( &c, sizeof(c) );
- *pOut << "<0x" << hex2 << (USHORT)c << dec2 << "> ";
+ *pOut << "<0x" << hex2 << (sal_uInt16)c << dec2 << "> ";
nLen--;
}
*pOut << endl1;
@@ -798,14 +798,14 @@ static void DumpItSmall( SvStream& rStrm, short nLen )
while ( nLen )
{
- BYTE c;
+ sal_uInt8 c;
rStrm.Read( &c, sizeof(c) );
if( c <= 9 )
- *pOut << (USHORT)c;
+ *pOut << (sal_uInt16)c;
else
- *pOut << "0x" << hex2 << (USHORT)c << dec2;
+ *pOut << "0x" << hex2 << (sal_uInt16)c << dec2;
nLen--;
@@ -814,17 +814,17 @@ static void DumpItSmall( SvStream& rStrm, short nLen )
}
}
-static short DumpSprm( BYTE nVersion, SvStream& rSt, short nSprmsLen )
+static short DumpSprm( sal_uInt8 nVersion, SvStream& rSt, short nSprmsLen )
{
long nSprmPos = rSt.Tell();
- BYTE nDelta;
+ sal_uInt8 nDelta;
indent( *pOut, rSt );
- BYTE x[512];
+ sal_uInt8 x[512];
rSt.Read( x, 512 ); // Token und folgende lesen
- USHORT nId = WW8GetSprmId( nVersion, x, &nDelta );
+ sal_uInt16 nId = WW8GetSprmId( nVersion, x, &nDelta );
short nSprmL = WW8GetSprmSizeBrutto( nVersion, x, &nId );
short nSprmNL = WW8GetSprmSizeNetto( nVersion, x, &nId );
@@ -835,7 +835,7 @@ static short DumpSprm( BYTE nVersion, SvStream& rSt, short nSprmsLen )
// Ausgabe: Token in Dez
if( 8 > nVersion )
- *pOut << (USHORT)x[0];
+ *pOut << (sal_uInt16)x[0];
else
*pOut << hex << nId << dec;
*pOut << '/' << nSprmL; // Laenge incl. alles in Dez
@@ -857,7 +857,7 @@ static short DumpSprm( BYTE nVersion, SvStream& rSt, short nSprmsLen )
return nSprmsLen;
}
-void DumpSprms( BYTE nVersion, SvStream& rSt, short nLen )
+void DumpSprms( sal_uInt8 nVersion, SvStream& rSt, short nLen )
{
if( nLen <= 1 || rSt.IsEof() ){
return;
@@ -871,12 +871,12 @@ void DumpSprms( BYTE nVersion, SvStream& rSt, short nLen )
}
// DumpMemSprm() dumpt ein 2-Byte-Sprm, der im WW8_PCD eingebaut ist
-static void DumpMemSprm( BYTE nVersion, INT16* pSprm )
+static void DumpMemSprm( sal_uInt8 nVersion, sal_Int16* pSprm )
{
- BYTE* p = (BYTE*)pSprm;
- USHORT nId = WW8GetSprmId( nVersion, p, 0 );
+ sal_uInt8* p = (sal_uInt8*)pSprm;
+ sal_uInt16 nId = WW8GetSprmId( nVersion, p, 0 );
- *pOut << (USHORT)p[0]; // Ausgabe: Token in Dez
+ *pOut << (sal_uInt16)p[0]; // Ausgabe: Token in Dez
*pOut << '/' << WW8GetSprmSizeBrutto( nVersion, p, &nId ); // Laenge incl. alles in Dez
*pOut << '/' << WW8GetSprmSizeNetto( nVersion, p, &nId ); // Laenge excl Token in Dez
@@ -889,9 +889,9 @@ static void DumpMemSprm( BYTE nVersion, INT16* pSprm )
//-----------------------------------------
// Hilfsroutinen: SEPX
//-----------------------------------------
-void DumpSepx( BYTE nVersion, long nPos )
+void DumpSepx( sal_uInt8 nVersion, long nPos )
{
- USHORT nLen;
+ sal_uInt16 nLen;
xStrm->Seek( nPos );
begin( *pOut, *xStrm ) << "Sepx, Len: ";
xStrm->Read( &nLen, 2 );
@@ -928,7 +928,7 @@ static void DumpPhe( WW8_PHE_Base& rPhe )
*pOut << indent2 << "dxaCol: " << (short)SVBT16ToShort( rPhe.dxaCol );
if( rPhe.aBits1 & 0x4 )
{
- *pOut << ", total height: " << (USHORT)SVBT16ToShort( rPhe.dyl );
+ *pOut << ", total height: " << (sal_uInt16)SVBT16ToShort( rPhe.dyl );
}
else
{
@@ -945,7 +945,7 @@ static char* NameTab[PLCF_END+4]={ "chpx", "papx", "sepx", "head",
"FootnoteRef", "EndnoteRef",
"AnnotationRef" };
-void DumpFkp( BYTE nVersion, long nPos, short nItemSize, ePLCFT ePlc )
+void DumpFkp( sal_uInt8 nVersion, long nPos, short nItemSize, ePLCFT ePlc )
{
char nElem;
@@ -955,11 +955,11 @@ void DumpFkp( BYTE nVersion, long nPos, short nItemSize, ePLCFT ePlc )
*pOut << 'D' << hex6 << nPos << dec2 << ' ' << indent1 << begin1 << "Fkp.";
*pOut << NameTab[ePlc] << ", ";
- *pOut << (USHORT)nElem << " Elements" << endl1;
+ *pOut << (sal_uInt16)nElem << " Elements" << endl1;
int i;
WW8_FC aF[2];
- BYTE c;
+ sal_uInt8 c;
long nStartOfs = nPos + ( nElem + 1 ) * 4; // bei dieser Pos faengt Offset-Array an
short nOfs;
WW8_PHE_Base aPhe;
@@ -1165,22 +1165,22 @@ void DumpDop( WW8Fib& rFib )
struct WW8_PCD1
{
- BYTE aBits1;
- BYTE aBits2;
-// INT16 fNoParaLast : 1; // when 1, means that piece contains no end of parag
-// BYTE fPaphNil : 1; // used internally by Word
-// BYTE fCopied : 1; // used internally by Word
+ sal_uInt8 aBits1;
+ sal_uInt8 aBits2;
+// sal_Int16 fNoParaLast : 1; // when 1, means that piece contains no end of parag
+// sal_uInt8 fPaphNil : 1; // used internally by Word
+// sal_uInt8 fCopied : 1; // used internally by Word
// * int :5
-// BYTE aBits2; // fn int:8, used internally by Word
- INT32 fc; // file offset of beginning of piece. The size of th
- INT16 prm; // PRM contains either a single sprm or else an inde
+// sal_uInt8 aBits2; // fn int:8, used internally by Word
+ sal_Int32 fc; // file offset of beginning of piece. The size of th
+ sal_Int16 prm; // PRM contains either a single sprm or else an inde
};
#ifdef __WW8_NEEDS_PACK
# pragma pack()
#endif
-static void DumpPLCFPcd( BYTE nVersion, long nPos, long nLen )
+static void DumpPLCFPcd( sal_uInt8 nVersion, long nPos, long nLen )
{
WW8PLCF aPlc( &xTableStream, nPos , nLen, 8 );
@@ -1197,12 +1197,12 @@ static void DumpPLCFPcd( BYTE nVersion, long nPos, long nLen )
*pOut << indent2 << " Cp: " << hex6 << start << ".." << hex6 << ende;
WW8_PCD1* p = (WW8_PCD1*) pData;
- *pOut << ", Bits: " << hex2 << (USHORT)p->aBits1 << ' '
- << hex2 << (USHORT)p->aBits2;
+ *pOut << ", Bits: " << hex2 << (sal_uInt16)p->aBits1 << ' '
+ << hex2 << (sal_uInt16)p->aBits2;
*pOut << ", FcStart: ";
if( 8 <= nVersion )
{
- BOOL bUniCode;
+ sal_Bool bUniCode;
*pOut << hex6
<< WW8PLCFx_PCD::TransformPieceAddress( p->fc, bUniCode );
if( bUniCode )
@@ -1227,7 +1227,7 @@ static void DumpPLCFPcd( BYTE nVersion, long nPos, long nLen )
end( *pOut, *xTableStream ) << "Plcx.Pcd" << endl1;
}
-static void DumpPcd( BYTE nVersion, long nPos, long nLen )
+static void DumpPcd( sal_uInt8 nVersion, long nPos, long nLen )
{
long nLen1 = nLen;
xTableStream->Seek( nPos );
@@ -1239,8 +1239,8 @@ static void DumpPcd( BYTE nVersion, long nPos, long nLen )
long i = 0;
while (1){
- BYTE c;
- INT16 cb;
+ sal_uInt8 c;
+ sal_Int16 cb;
xTableStream->Read( &c, 1 );
nLen1 --;
@@ -1258,7 +1258,7 @@ static void DumpPcd( BYTE nVersion, long nPos, long nLen )
// *pOut << " " << indent1 << "grpprl: " << cb << "Bytes ueberlesen";
// *pOut << endl1;
}
- INT32 nLen2;
+ sal_Int32 nLen2;
xTableStream->Read( &nLen2, 4 );
nLen1 -= 4;
if( nLen1 != nLen2 )
@@ -1300,10 +1300,10 @@ static void DumpPLCF( long nPos, long nLen, ePLCFT ePlc )
break;
default:// Programm-Fehler!
/*
- ACHTUNG: im FILTER nicht "FALSE" sondern "!this()" schreiben,
+ ACHTUNG: im FILTER nicht "sal_False" sondern "!this()" schreiben,
da sonst Warning unter OS/2
*/
- ASSERT( FALSE, "Es wurde vergessen, nVersion zu kodieren!" );
+ ASSERT( sal_False, "Es wurde vergessen, nVersion zu kodieren!" );
return;
}
@@ -1345,16 +1345,16 @@ static void DumpPLCF( long nPos, long nLen, ePLCFT ePlc )
switch( pWwFib->nVersion )
{
case 6:
- case 7: nPo = *((USHORT*)pData);
+ case 7: nPo = *((sal_uInt16*)pData);
break;
- case 8: nPo = *((UINT32*)pData);
+ case 8: nPo = *((sal_uInt32*)pData);
break;
default:// Programm-Fehler!
/*
- ACHTUNG: im FILTER nicht "FALSE" sondern "!this()" schreiben,
+ ACHTUNG: im FILTER nicht "sal_False" sondern "!this()" schreiben,
da sonst Warning unter OS/2
*/
- ASSERT( FALSE, "Es wurde vergessen, nVersion zu kodieren!" );
+ ASSERT( sal_False, "Es wurde vergessen, nVersion zu kodieren!" );
return;
}
@@ -1372,7 +1372,7 @@ static void DumpPLCF( long nPos, long nLen, ePLCFT ePlc )
case PLCF_END+2:
{
*pOut << " Cp: " << hex << start;
- USHORT nFlags= *((USHORT*)pData);
+ sal_uInt16 nFlags= *((sal_uInt16*)pData);
*pOut << ", Flags: 0x" << nFlags << dec << endl1;
}
break;
@@ -1381,7 +1381,7 @@ static void DumpPLCF( long nPos, long nLen, ePLCFT ePlc )
{
*pOut << " Cp: " << hex << start << ", Initial: \"";
const char* p = (char*)pData;
- BYTE n = *p++;
+ sal_uInt8 n = *p++;
while( n-- )
{
if( 8 == pWwFib->nVersion )
@@ -1390,7 +1390,7 @@ static void DumpPLCF( long nPos, long nLen, ePLCFT ePlc )
}
long nBkmkId;
- USHORT nId;
+ sal_uInt16 nId;
if( 8 == pWwFib->nVersion )
{
nId = SVBT16ToShort( ((WW8_ATRD*)pData)->ibst );
@@ -1420,7 +1420,7 @@ static void DumpPLCF( long nPos, long nLen, ePLCFT ePlc )
static void DumpPlainText1( WW8_CP nStartCp, long nTextLen )
{
long l;
- BYTE c;
+ sal_uInt8 c;
xStrm->Seek( pSBase->WW8Cp2Fc( nStartCp ) );
@@ -1462,11 +1462,11 @@ void DumpPlainText( WW8_CP nStartCp, long nTextLen, char* pName )
// Text mit Attributen
//-----------------------------------------