summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2011-01-17 15:06:54 +0100
committerCarsten Driesner <cd@openoffice.org>2011-01-17 15:06:54 +0100
commit7f33ed417b2e29e5470724ea76967f64699a2662 (patch)
treeabfa1432c5ffffe4c7502d4ddcaee918c584c69c /sw
parent80731dbfcb48a2ffec30a4b2abe1ba8ada8f0169 (diff)
removetooltypes01: #i112600# Remove tools types from sw
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/EnhancedPDFExportHelper.hxx2
-rw-r--r--sw/inc/IDocumentFieldsAccess.hxx16
-rw-r--r--sw/inc/IDocumentLinksAdministration.hxx2
-rw-r--r--sw/inc/IDocumentRedlineAccess.hxx12
-rw-r--r--sw/inc/IDocumentSettingAccess.hxx4
-rw-r--r--sw/inc/PostItMgr.hxx8
-rw-r--r--sw/inc/SidebarWin.hxx10
-rw-r--r--sw/inc/SwAppletImpl.hxx6
-rw-r--r--sw/inc/SwGetPoolIdFromName.hxx2
-rw-r--r--sw/inc/SwUndoField.hxx10
-rw-r--r--sw/inc/SwUndoFmt.hxx10
-rw-r--r--sw/inc/accessibilityoptions.hxx24
-rw-r--r--sw/inc/acmplwrd.hxx22
-rw-r--r--sw/inc/authfld.hxx44
-rw-r--r--sw/inc/authratr.hxx6
-rw-r--r--sw/inc/bparr.hxx44
-rw-r--r--sw/inc/breakit.hxx4
-rw-r--r--sw/inc/calbck.hxx40
-rw-r--r--sw/inc/calc.hxx22
-rw-r--r--sw/inc/ccoll.hxx14
-rw-r--r--sw/inc/cellatr.hxx22
-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 Eintr„ge 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
//-----------------------------------------
-BOOL DumpChar( BYTE c )
+sal_Bool DumpChar( sal_uInt8 c )
{
if ( ( c >= 32 ) && ( c <= 127 ) ){
*pOut << c;
- return FALSE;
+ return sal_False;
}else{
switch (c){
case 0xe4: // dt. Umlaute
@@ -1475,15 +1475,15 @@ BOOL DumpChar( BYTE c )
case 0xdf:
case 0xc4:
case 0xd6:
- case 0xdc: *pOut << c; return FALSE;
+ case 0xdc: *pOut << c; return sal_False;
case 0xd: *pOut << "<CR>";
- return TRUE;
+ return sal_True;
case 0x7:
- case 0xc: *pOut << "<0x" << hex2 << (USHORT)c << dec2 << '>';
- return TRUE;
- default: *pOut << "<0x" << hex2 << (USHORT)c << dec2 << '>';
- return FALSE;
+ case 0xc: *pOut << "<0x" << hex2 << (sal_uInt16)c << dec2 << '>';
+ return sal_True;
+ default: *pOut << "<0x" << hex2 << (sal_uInt16)c << dec2 << '>';
+ return sal_False;
}
}
}
@@ -1645,7 +1645,7 @@ static void DumpDrawObjects( const char* pNm, long nStart, long nLen,
<< pNm << ", Len: " << nLen
<< ", " << aPLCF.GetIMax() << " Elements" << endl1;
- for( USHORT i = 0; i < aPLCF.GetIMax(); ++i )
+ for( sal_uInt16 i = 0; i < aPLCF.GetIMax(); ++i )
{
long nCp = aPLCF.GetPos( i );
if( nCp >= LONG_MAX )
@@ -1660,7 +1660,7 @@ static void DumpDrawObjects( const char* pNm, long nStart, long nLen,
*pOut << " top: " << *pFSPA++;
*pOut << " right: " << *pFSPA++;
*pOut << " bottom: " << *pFSPA++;
- USHORT* pU = (USHORT*)pFSPA;
+ sal_uInt16* pU = (sal_uInt16*)pFSPA;
*pOut << " flags: 0x" << hex << *pU++;
pFSPA = (long*)pU;
*pOut << " xTxbx: " << dec << *pFSPA;
@@ -1668,7 +1668,7 @@ static void DumpDrawObjects( const char* pNm, long nStart, long nLen,
else
{
*pOut << " FC of DO: 0x" << *pFSPA++;
- *pOut << " ctcbx: " << dec << *(USHORT*)pFSPA;
+ *pOut << " ctcbx: " << dec << *(sal_uInt16*)pFSPA;
}
*pOut << endl1;
@@ -1690,13 +1690,13 @@ static void DumpTxtboxBrks( const char* pNm, long nStart, long nLen,
<< pNm << ", Len: " << nLen
<< ", " << aPLCF.GetIMax() << " Elements" << endl1;
- for( USHORT i = 0; i < aPLCF.GetIMax(); ++i )
+ for( sal_uInt16 i = 0; i < aPLCF.GetIMax(); ++i )
{
long nCp = aPLCF.GetPos( i );
if( nCp >= LONG_MAX )
break;
- USHORT* pBKD = (USHORT*)aPLCF.GetData( i );
+ sal_uInt16* pBKD = (sal_uInt16*)aPLCF.GetData( i );
*pOut << indent2 << i << ".Cp: 0x" << hex << nCp + nOffset
<< " itxbxs: 0x" << *pBKD++;
*pOut << " dcpDepend: 0x" << *pBKD++;
@@ -1747,20 +1747,20 @@ static void DumpFdoa( WW8ScannerBase* pBase )
/*nOffset*/0 );
}
-BOOL ReadEsherRec( SvStream& rStrm, UINT8& rVer, UINT16& rInst,
- UINT16& rFbt, UINT32& rLength )
+sal_Bool ReadEsherRec( SvStream& rStrm, sal_uInt8& rVer, sal_uInt16& rInst,
+ sal_uInt16& rFbt, sal_uInt32& rLength )
{
- UINT16 aBits;
- if( !WW8ReadUINT16( rStrm, aBits ) ) return FALSE;
+ sal_uInt16 aBits;
+ if( !WW8ReadUINT16( rStrm, aBits ) ) return sal_False;
rVer = aBits & 0x000F;
rInst = (aBits & 0xFFF0) >> 4;
//----------------------------------------------
- if( !WW8ReadUINT16( rStrm, rFbt ) ) return FALSE;
+ if( !WW8ReadUINT16( rStrm, rFbt ) ) return sal_False;
//----------------------------------------------
return WW8ReadUINT32( rStrm, rLength );
}
-const char* _GetShapeTypeNm( UINT16 nId )
+const char* _GetShapeTypeNm( sal_uInt16 nId )
{
const char* aNmArr[ 202 + 2 + 1 ] = {
/* 0*/ "NotPrimitive","Rectangle","RoundRectangle","Ellipse","Diamond","IsocelesTriangle","RightTriangle","Parallelogram","Trapezoid","Hexagon",
@@ -1790,8 +1790,8 @@ const char* _GetShapeTypeNm( UINT16 nId )
return aNmArr[ nId ];
}
-void DumpEscherProp( UINT16 nId, BOOL bBid, BOOL bComplex, UINT32 nOp,
- UINT32& rStreamOffset )
+void DumpEscherProp( sal_uInt16 nId, sal_Bool bBid, sal_Bool bComplex, sal_uInt32 nOp,
+ sal_uInt32& rStreamOffset )
{
const char* pRecNm = 0;
switch( nId )
@@ -2096,11 +2096,11 @@ void DumpEscherProp( UINT16 nId, BOOL bBid, BOOL bComplex, UINT32 nOp,
*pOut << " Id: " << dec << nId << " (=0x" << hex << nId << ')';
if( bBid )
- *pOut << " Bid: 0x" << (UINT16)bBid;
+ *pOut << " Bid: 0x" << (sal_uInt16)bBid;
if( bComplex )
{
- *pOut << " Cmpl: 0x" << (UINT16)bComplex;
+ *pOut << " Cmpl: 0x" << (sal_uInt16)bComplex;
// ....
rStreamOffset += nOp;
}
@@ -2110,8 +2110,8 @@ void DumpEscherProp( UINT16 nId, BOOL bBid, BOOL bComplex, UINT32 nOp,
*pOut << dec << endl1;
}
-void DumpEscherRec( ULONG nPos, UINT8 nVer, UINT16 nInst,
- UINT16 nFbt, UINT32 nLength )
+void DumpEscherRec( sal_uLong nPos, sal_uInt8 nVer, sal_uInt16 nInst,
+ sal_uInt16 nFbt, sal_uInt32 nLength )
{
const char* pRecNm = 0;
switch( nFbt )
@@ -2157,16 +2157,16 @@ void DumpEscherRec( ULONG nPos, UINT8 nVer, UINT16 nInst,
else
*pOut << "Record:";
*pOut << " Id: 0x" << hex << nFbt << " Instance: 0x" << nInst
- << " Version: 0x" << (UINT16)nVer << " Laenge: 0x" << nLength
+ << " Version: 0x" << (sal_uInt16)nVer << " Laenge: 0x" << nLength
<< dec << endl1;
switch( nFbt )
{
case 0xf00b: // DFF_msofbtOPT
{
- UINT16 nId; UINT32 nOp, nStreamOffset = nInst * 6;
- BOOL bBid, bComplex;
- for( UINT16 n = 0; n < nInst; ++n )
+ sal_uInt16 nId; sal_uInt32 nOp, nStreamOffset = nInst * 6;
+ sal_Bool bBid, bComplex;
+ for( sal_uInt16 n = 0; n < nInst; ++n )
{
if( !WW8ReadUINT16( *xTableStream, nId ) ||
!WW8ReadUINT32( *xTableStream, nOp ))
@@ -2184,7 +2184,7 @@ void DumpEscherRec( ULONG nPos, UINT8 nVer, UINT16 nInst,
case 0xF010: // DFF_msofbtClientAnchor
case 0xF011: // DFF_msofbtClientData
{
- UINT32 nData;
+ sal_uInt32 nData;
if( 4 == nLength && WW8ReadUINT32( *xTableStream, nData ))
*pOut << " " << indent1 << " Data: "
<< hex << nData << dec << endl1;
@@ -2193,7 +2193,7 @@ void DumpEscherRec( ULONG nPos, UINT8 nVer, UINT16 nInst,
case 0xf00a: // DFF_msofbtSp
{
- UINT32 nId, nData;
+ sal_uInt32 nId, nData;
if( WW8ReadUINT32( *xTableStream, nId ) &&
WW8ReadUINT32( *xTableStream, nData ))
{
@@ -2208,7 +2208,7 @@ void DumpEscherRec( ULONG nPos, UINT8 nVer, UINT16 nInst,
case 0xf009: // DFF_msofbtSpgr
case 0xf00f: // DFF_msofbtChildAnchor
{
- UINT32 nL, nT, nR, nB;
+ sal_uInt32 nL, nT, nR, nB;
if( WW8ReadUINT32( *xTableStream, nL ) &&
WW8ReadUINT32( *xTableStream, nT ) &&
WW8ReadUINT32( *xTableStream, nR ) &&
@@ -2222,7 +2222,7 @@ void DumpEscherRec( ULONG nPos, UINT8 nVer, UINT16 nInst,
case 0xf006: //ESCHER_Dgg
{
- UINT32 spidMax, // The current maximum shape ID
+ sal_uInt32 spidMax, // The current maximum shape ID
cidcl, // The number of ID clusters (FIDCLs)
cspSaved, // The total number of shapes saved
// (including deleted shapes, if undo
@@ -2242,10 +2242,10 @@ void DumpEscherRec( ULONG nPos, UINT8 nVer, UINT16 nInst,
<< dec << endl1;
- UINT32 dgid, // DG owning the SPIDs in this cluster
+ sal_uInt32 dgid, // DG owning the SPIDs in this cluster
cspidCur; // number of SPIDs used so far
- for( UINT32 n = 1; n < cidcl; ++n )
+ for( sal_uInt32 n = 1; n < cidcl; ++n )
{
if( !WW8ReadUINT32( *xTableStream, dgid ) ||
!WW8ReadUINT32( *xTableStream, cspidCur ))
@@ -2265,13 +2265,13 @@ void DumpEscherRec( ULONG nPos, UINT8 nVer, UINT16 nInst,
if( 3 < nLength )
{
*pOut << " " << indent1 << " Data:" << hex;
- UINT8 nParam;
- for( UINT32 n = 0; n < nLength; ++n )
+ sal_uInt8 nParam;
+ for( sal_uInt32 n = 0; n < nLength; ++n )
{
if( !WW8ReadBYTE( *xTableStream, nParam ) )
break;
- UINT16 nHexParam = nParam;
+ sal_uInt16 nHexParam = nParam;
*pOut << " 0x" << nHexParam;
}
*pOut << dec << endl1;
@@ -2313,7 +2313,7 @@ void DumpEscherRec( ULONG nPos, UINT8 nVer, UINT16 nInst,
}
static char __READONLY_DATA sHex[17] = { "0123456789abcdef" };
- BYTE c;
+ sal_uInt8 c;
*xTableStream >> c;
*pOut << sHex[ ( c & 0xf0 ) >> 4 ] << sHex[ c & 0x0f ] << ' ';
--nLength;
@@ -2327,17 +2327,17 @@ void DumpEscherRec( ULONG nPos, UINT8 nVer, UINT16 nInst,
}
-void DumpEscherRecs( ULONG nPos, UINT32 nLength )
+void DumpEscherRecs( sal_uLong nPos, sal_uInt32 nLength )
{
begin( *pOut, *xTableStream ) << endl1;
- UINT16 nOldFbt = 0;
- ULONG nReadLen = 0;
+ sal_uInt16 nOldFbt = 0;
+ sal_uLong nReadLen = 0;
while( nReadLen < nLength )
{
- UINT8 nVer;
- UINT16 nInst, nFbt;
- UINT32 nRecLen;
+ sal_uInt8 nVer;
+ sal_uInt16 nInst, nFbt;
+ sal_uInt32 nRecLen;
if( !::ReadEsherRec( *xTableStream, nVer, nInst, nFbt, nRecLen ))
break;
@@ -2362,7 +2362,7 @@ void DumpEscherRecs( ULONG nPos, UINT32 nLength )
::DumpEscherRec( nPos + nReadLen, nVer, nInst,
nFbt, nRecLen );
- nReadLen += 2 * sizeof( UINT32 );
+ nReadLen += 2 * sizeof( sal_uInt32 );
switch( nFbt )
{
case 0xF000:
@@ -2386,14 +2386,14 @@ void DumpDrawing()
{
if( pWwFib->lcbDggInfo )
{
- ULONG nOldPos = xTableStream->Tell(), nReadLen = 0;
+ sal_uLong nOldPos = xTableStream->Tell(), nReadLen = 0;
xTableStream->Seek( pWwFib->fcDggInfo );
*pOut << endl << hex6 << pWwFib->fcDggInfo << dec2 << ' ' << indent1
<< begin1 << "Escher (DggInfo): Len: " << pWwFib->lcbDggInfo
<< endl1;
- ::DumpEscherRecs( pWwFib->fcDggInfo, (ULONG)pWwFib->lcbDggInfo );
+ ::DumpEscherRecs( pWwFib->fcDggInfo, (sal_uLong)pWwFib->lcbDggInfo );
end( *pOut, *xTableStream ) << endl1 << endl1;
xTableStream->Seek( nOldPos );
@@ -2405,10 +2405,10 @@ void DumpDrawing()
// Hilfroutinen fuer Styles
//-----------------------------------------
-static short DumpStyleUPX( BYTE nVersion, short nLen, BOOL bPAP )
+static short DumpStyleUPX( sal_uInt8 nVersion, short nLen, sal_Bool bPAP )
{
short cbUPX;
- BOOL bEmpty;
+ sal_Bool bEmpty;
if( nLen <= 0 ){
@@ -2442,7 +2442,7 @@ static short DumpStyleUPX( BYTE nVersion, short nLen, BOOL bPAP )
if( bPAP )
{
- USHORT id;
+ sal_uInt16 id;
xTableStream->Read( &id, 2 );
cbUPX-= 2;
@@ -2452,7 +2452,7 @@ static short DumpStyleUPX( BYTE nVersion, short nLen, BOOL bPAP )
*pOut << endl1;
- ULONG nPos = xTableStream->Tell(); // falls etwas falsch interpretiert
+ sal_uLong nPos = xTableStream->Tell(); // falls etwas falsch interpretiert
// wird, gehts danach wieder richtig
DumpSprms( nVersion, *xTableStream, cbUPX );
@@ -2470,7 +2470,7 @@ static short DumpStyleUPX( BYTE nVersion, short nLen, BOOL bPAP )
return nLen;
}
-static void DumpStyleGrupx( BYTE nVersion, short nLen, BOOL bPara )
+static void DumpStyleGrupx( sal_uInt8 nVersion, short nLen, sal_Bool bPara )
{
if( nLen <= 0 )
return;
@@ -2478,13 +2478,13 @@ static void DumpStyleGrupx( BYTE nVersion, short nLen, BOOL bPara )
begin( *pOut, *xTableStream ) << "Grupx, Len:" << nLen << endl1;
- if( bPara ) nLen = DumpStyleUPX( nVersion, nLen, TRUE ); // Grupx.Papx
- DumpStyleUPX( nVersion, nLen, FALSE ); // Grupx.Chpx
+ if( bPara ) nLen = DumpStyleUPX( nVersion, nLen, sal_True ); // Grupx.Papx
+ DumpStyleUPX( nVersion, nLen, sal_False ); // Grupx.Chpx
end( *pOut, *xTableStream ) << "Grupx" << endl1;
}
-static void PrintStyleId( USHORT nId )
+static void PrintStyleId( sal_uInt16 nId )
{
switch ( nId ){
case 0xffe: *pOut << "User "; break;
@@ -2497,7 +2497,7 @@ static void PrintStyleId( USHORT nId )
// Styles
//-----------------------------------------
-void DStyle::Dump1Style( USHORT nNr )
+void DStyle::Dump1Style( sal_uInt16 nNr )
{
short nSkip, cbStd;
String aStr;
@@ -2554,7 +2554,7 @@ void DStyle::Dump()
*pOut << ", BuildIn:" << nVerBuiltInNamesWhenSaved;
*pOut << ", StdFnt:" << ftcStandardChpStsh << endl1;
- USHORT i;
+ sal_uInt16 i;
for( i=0; i<cstd; i++ )
Dump1Style( i );
@@ -2582,7 +2582,7 @@ int PrepareConvert( String& rName, String& rOutName, String& rMess )
return 1;
}
- ULONG nL;
+ sal_uLong nL;
if ( xStrm->Read( &nL, sizeof( nL ) ) == 0 ){
rMess.AppendAscii( "Kann aus StorageStream \"WordDocument\" in ");
rMess += rName;
@@ -2615,9 +2615,9 @@ int PrepareConvert( String& rName, String& rOutName, String& rMess )
return 0;
}
-int DoConvert( const String& rName, BYTE nVersion )
+int DoConvert( const String& rName, sal_uInt8 nVersion )
{
- ULONG nL;
+ sal_uLong nL;
if ( xStrm->Read( &nL, sizeof( nL ) ) == 0 ){
return 1;
}
@@ -2650,10 +2650,10 @@ int DoConvert( const String& rName, BYTE nVersion )
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 1;
}
diff --git a/sw/source/filter/ww8/dump/msvbasic.cxx b/sw/source/filter/ww8/dump/msvbasic.cxx
index d21d539ff2b7..f102235ed152 100644
--- a/sw/source/filter/ww8/dump/msvbasic.cxx
+++ b/sw/source/filter/ww8/dump/msvbasic.cxx
@@ -51,12 +51,12 @@
* cmc
* */
-BYTE VBA_Impl::ReadPString(SvStorageStreamRef &xVBAProject)
+sal_uInt8 VBA_Impl::ReadPString(SvStorageStreamRef &xVBAProject)
{
- UINT16 idlen;
- BYTE type=0;
+ sal_uInt16 idlen;
+ sal_uInt8 type=0;
*xVBAProject >> idlen;
- BYTE out;
+ sal_uInt8 out;
int i=0;
if (idlen < 6)
{
@@ -88,12 +88,12 @@ BYTE VBA_Impl::ReadPString(SvStorageStreamRef &xVBAProject)
void VBA_Impl::ConfirmFixedOctect(SvStorageStreamRef &xVBAProject)
{
- static const BYTE stest[8] =
+ static const sal_uInt8 stest[8] =
{
0x06, 0x02, 0x01, 0x00, 0x08, 0x02, 0x00, 0x00
};
- BYTE test[8];
+ sal_uInt8 test[8];
xVBAProject->Read(test,8);
if (memcmp(stest,test,8) != 0)
DBG_WARNING("Found a different octect, please report");
@@ -101,8 +101,8 @@ void VBA_Impl::ConfirmFixedOctect(SvStorageStreamRef &xVBAProject)
void VBA_Impl::Confirm12Zeros(SvStorageStreamRef &xVBAProject)
{
- static const BYTE stest[12]={0};
- BYTE test[12];
+ static const sal_uInt8 stest[12]={0};
+ sal_uInt8 test[12];
xVBAProject->Read(test,12);
if (memcmp(stest,test,12) != 0)
DBG_WARNING("Found a Non Zero block, please report");
@@ -110,8 +110,8 @@ void VBA_Impl::Confirm12Zeros(SvStorageStreamRef &xVBAProject)
void VBA_Impl::ConfirmHalfWayMarker(SvStorageStreamRef &xVBAProject)
{
- static const BYTE stest[12]={0,0,0,0,0,0,0,0,0,0,1,0};
- BYTE test[12];
+ static const sal_uInt8 stest[12]={0,0,0,0,0,0,0,0,0,0,1,0};
+ sal_uInt8 test[12];
xVBAProject->Read(test,12);
if (memcmp(stest,test,12) != 0)
DBG_WARNING("Found a different halfway marker, please report");
@@ -119,14 +119,14 @@ void VBA_Impl::ConfirmHalfWayMarker(SvStorageStreamRef &xVBAProject)
void VBA_Impl::ConfirmFixedMiddle(SvStorageStreamRef &xVBAProject)
{
- static const BYTE stest[20] =
+ static const sal_uInt8 stest[20] =
{
0x00, 0x00, 0xe1, 0x2e, 0x45, 0x0d, 0x8f, 0xe0,
0x1a, 0x10, 0x85, 0x2e, 0x02, 0x60, 0x8c, 0x4d,
0x0b, 0xb4, 0x00, 0x00
};
- BYTE test[20];
+ sal_uInt8 test[20];
xVBAProject->Read(test,20);
if (memcmp(stest,test,20) != 0)
{
@@ -137,14 +137,14 @@ void VBA_Impl::ConfirmFixedMiddle(SvStorageStreamRef &xVBAProject)
void VBA_Impl::ConfirmFixedMiddle2(SvStorageStreamRef &xVBAProject)
{
- static const BYTE stest[20] =
+ static const sal_uInt8 stest[20] =
{
0x00, 0x00, 0x2e, 0xc9, 0x27, 0x8e, 0x64, 0x12,
0x1c, 0x10, 0x8a, 0x2f, 0x04, 0x02, 0x24, 0x00,
0x9c, 0x02, 0x00, 0x00
};
- BYTE test[20];
+ sal_uInt8 test[20];
xVBAProject->Read(test,20);
if (memcmp(stest,test,20) != 0)
{
@@ -154,7 +154,7 @@ void VBA_Impl::ConfirmFixedMiddle2(SvStorageStreamRef &xVBAProject)
}
-void VBA_Impl::Output( int nLen, const BYTE *pData)
+void VBA_Impl::Output( int nLen, const sal_uInt8 *pData)
{
sVBAString += String( (const sal_Char *)pData, nLen );
/*
@@ -180,28 +180,28 @@ int VBA_Impl::ReadVBAProject(const SvStorageRef &rxVBAStorage)
xVBAProject->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
//*pOut << hex;
- BYTE header[30] =
+ sal_uInt8 header[30] =
{
0xcc, 0x61, 0x5e, 0x00, 0x00, 0x01, 0x00, 0xff,
0x07, 0x04, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00,
0xe4, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00
};
- BYTE headerin[30];
+ sal_uInt8 headerin[30];
xVBAProject->Read(headerin,30);
if (memcmp(header,headerin,30) != 0)
DBG_WARNING("Warning VBA header is different, please report");
- UINT16 value;
+ sal_uInt16 value;
*xVBAProject >> value;
//*pOut << "Trigger value 1 is " << value << endl;
- UINT16 svalue;
+ sal_uInt16 svalue;
*xVBAProject >> svalue;
if (svalue != 0x02)
DBG_WARNING("Warning VBA number is different, please report");
int count=0;
- BYTE testc=0;
+ sal_uInt8 testc=0;
//*pOut << "Other strings after the middle are..." << endl;
//There appears to be almost any number of strings acceptable
@@ -269,7 +269,7 @@ int VBA_Impl::ReadVBAProject(const SvStorageRef &rxVBAStorage)
//*pOut << "testc is " << testc << endl;
//*pOut << "position is " << xVBAProject->Tell() << endl;
- UINT16 nModules;
+ sal_uInt16 nModules;
*xVBAProject >> nModules;
//begin section, this section isn't really 100% correct
@@ -279,7 +279,7 @@ int VBA_Impl::ReadVBAProject(const SvStorageRef &rxVBAStorage)
//*pOut << "position is " << xVBAProject->Tell() << endl;
ConfirmFixedOctect(xVBAProject);
- UINT16 junksize;
+ sal_uInt16 junksize;
while(junksize != 0xFFFF)
{
xVBAProject->Read(&junksize,2); // usually 18 02, sometimes 1e 02
@@ -288,7 +288,7 @@ int VBA_Impl::ReadVBAProject(const SvStorageRef &rxVBAStorage)
// << junksize << endl;
}
- UINT16 ftest;
+ sal_uInt16 ftest;
*xVBAProject >> ftest;
if (ftest != 0xFFFF)
xVBAProject->SeekRel(ftest);
@@ -306,8 +306,8 @@ int VBA_Impl::ReadVBAProject(const SvStorageRef &rxVBAStorage)
int i;
for (i=0;i<nOffsets;i++)
{
- BYTE discard;
- UINT16 len;
+ sal_uInt8 discard;
+ sal_uInt16 len;
*xVBAProject >> len;
int j;
for (j=0;j<len/2;j++)
@@ -339,7 +339,7 @@ int VBA_Impl::ReadVBAProject(const SvStorageRef &rxVBAStorage)
//end section
xVBAProject->SeekRel(8);
- BYTE no_of_octects;
+ sal_uInt8 no_of_octects;
*xVBAProject >> no_of_octects;
for(j=0;j<no_of_octects;j++)
xVBAProject->SeekRel(8);
@@ -354,10 +354,10 @@ int VBA_Impl::ReadVBAProject(const SvStorageRef &rxVBAStorage)
return(nOffsets);
}
-BOOL VBA_Impl::Open( const String &rToplevel,const String &rSublevel )
+sal_Bool VBA_Impl::Open( const String &rToplevel,const String &rSublevel )
{
/* beginning test for vba stuff */
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SvStorageRef xMacros= xStor->OpenStorage(rToplevel);
if( !xMacros.Is() || SVSTREAM_OK != xMacros->GetError() )
{
@@ -373,14 +373,14 @@ BOOL VBA_Impl::Open( const String &rToplevel,const String &rSublevel )
else
{
if (ReadVBAProject(xVBA))
- bRet = TRUE;
+ bRet = sal_True;
}
}
/* end test for vba stuff */
return bRet;
}
-const String &VBA_Impl::Decompress( UINT16 nIndex, int *pOverflow)
+const String &VBA_Impl::Decompress( sal_uInt16 nIndex, int *pOverflow)
{
SvStorageStreamRef xVBAStream;
sVBAString.Erase();
@@ -419,14 +419,14 @@ const String &VBA_Impl::Decompress( UINT16 nIndex, int *pOverflow)
int VBA_Impl::DecompressVBA( int nIndex, SvStorageStreamRef &xVBAStream )
{
- BYTE leadbyte;
+ sal_uInt8 leadbyte;
unsigned int pos = 0;
//*pOut << "jumping to " << hex << offsets[nIndex].offset << endl;
xVBAStream->Seek(pOffsets[nIndex].nOffset+3);
int len;
- UINT16 token;
+ sal_uInt16 token;
int distance, shift, clean=1;
while(xVBAStream->Read(&leadbyte,1))
diff --git a/sw/source/filter/ww8/dump/msvbasic.hxx b/sw/source/filter/ww8/dump/msvbasic.hxx
index 11c6bfa92ad6..9b5128a70e7c 100644
--- a/sw/source/filter/ww8/dump/msvbasic.hxx
+++ b/sw/source/filter/ww8/dump/msvbasic.hxx
@@ -56,34 +56,34 @@
class VBA_Impl
{
public:
- VBA_Impl( SvStorage &rIn, BOOL bCmmntd = TRUE )
+ VBA_Impl( SvStorage &rIn, sal_Bool bCmmntd = sal_True )
: xStor(&rIn), pOffsets(0), nOffsets(0), bCommented(bCmmntd)
{}
~VBA_Impl() {if (nOffsets) delete [] pOffsets;}
//0 for failure, 1 for success
- BOOL Open( const String &rToplevel, const String &rSublevel);
- const String & Decompress( UINT16 nIndex, int *pOverflow=0);
- UINT16 GetNoStreams() const { return nOffsets; }
- const String &GetStreamName( UINT16 nIndex ) const
+ sal_Bool Open( const String &rToplevel, const String &rSublevel);
+ const String & Decompress( sal_uInt16 nIndex, int *pOverflow=0);
+ sal_uInt16 GetNoStreams() const { return nOffsets; }
+ const String &GetStreamName( sal_uInt16 nIndex ) const
{
DBG_ASSERT( nIndex < nOffsets, "Index out of range" );
return pOffsets[ nIndex ].sName;
}
- virtual void Output(int len,const BYTE *data);
+ virtual void Output(int len,const sal_uInt8 *data);
private:
struct VBAOffset_Impl
{
String sName;
- UINT32 nOffset;
+ sal_uInt32 nOffset;
};
SvStorageRef xVBA;
String sVBAString;
SvStorageRef xStor;
VBAOffset_Impl *pOffsets;
- UINT16 nOffsets;
- BYTE aHistory[ WINDOWLEN ];
- BOOL bCommented;
+ sal_uInt16 nOffsets;
+ sal_uInt8 aHistory[ WINDOWLEN ];
+ sal_Bool bCommented;
//0 for failure, anything else for success
int ReadVBAProject(const SvStorageRef &rxVBAStorage);
@@ -93,7 +93,7 @@ private:
void ConfirmFixedMiddle(SvStorageStreamRef &xVBAProject);
void ConfirmFixedMiddle2(SvStorageStreamRef &xVBAProject);
void ConfirmFixedOctect(SvStorageStreamRef &xVBAProject);
- BYTE ReadPString(SvStorageStreamRef &xVBAProject);
+ sal_uInt8 ReadPString(SvStorageStreamRef &xVBAProject);
};
diff --git a/sw/source/filter/ww8/dump/ww8darr.cxx b/sw/source/filter/ww8/dump/ww8darr.cxx
index 8e97075f2c69..cf142e703bc3 100644
--- a/sw/source/filter/ww8/dump/ww8darr.cxx
+++ b/sw/source/filter/ww8/dump/ww8darr.cxx
@@ -513,17 +513,17 @@ static int
}
-SprmDumpInfo& WW8GetSprmDumpInfo( USHORT nId )
+SprmDumpInfo& WW8GetSprmDumpInfo( sal_uInt16 nId )
{
// ggfs. Tab sortieren
- static BOOL bInit = FALSE;
+ static sal_Bool bInit = sal_False;
if( !bInit )
{
qsort( (void*)aSprmDumpTab,
sizeof( aSprmDumpTab ) / sizeof (aSprmDumpTab[ 0 ]),
sizeof( aSprmDumpTab[ 0 ] ),
CompSprmDumpId );
- bInit = TRUE;
+ bInit = sal_True;
}
// Sprm heraussuchen
void* pFound;
diff --git a/sw/source/filter/ww8/dump/ww8darr.hxx b/sw/source/filter/ww8/dump/ww8darr.hxx
index caad5f3ec61f..ee63df9cf99c 100644
--- a/sw/source/filter/ww8/dump/ww8darr.hxx
+++ b/sw/source/filter/ww8/dump/ww8darr.hxx
@@ -32,12 +32,12 @@ typedef void (*FnOut)( SvStream& rSt, short );
struct SprmDumpInfo
{
- USHORT nId;
+ sal_uInt16 nId;
FnOut pOutFnc;
char* pName;
};
-SprmDumpInfo& WW8GetSprmDumpInfo( USHORT nId );
+SprmDumpInfo& WW8GetSprmDumpInfo( sal_uInt16 nId );
#endif
diff --git a/sw/source/filter/ww8/dump/ww8dout.cxx b/sw/source/filter/ww8/dump/ww8dout.cxx
index 18f1737cc9f1..5b4c2aa0f50a 100644
--- a/sw/source/filter/ww8/dump/ww8dout.cxx
+++ b/sw/source/filter/ww8/dump/ww8dout.cxx
@@ -31,7 +31,7 @@
#include <stdio.h> // getchar
//#include "defs.hxx"
-#include <tools/solar.h> // BYTE
+#include <tools/solar.h> // sal_uInt8
//#include "wwscan.hxx" // aWwStor
#include "ww8dout.hxx"
#include <tools/stream.hxx>
@@ -41,7 +41,7 @@
extern SvStorageStreamRef xStrm;
extern SvStorageStreamRef xTableStream;
extern SvStorageStreamRef xDataStream; // ist bei Ver6-7 mit xStrm identisch,
-void DumpSprms( BYTE nVersion, SvStream& rSt, short nLen );
+void DumpSprms( sal_uInt8 nVersion, SvStream& rSt, short nLen );
ostream* pOut = 0;
@@ -158,19 +158,19 @@ ostream& __cdecl end2( ostream& s ) { level--; return s << indent2 << "END "; }
void OutBool( SvStream& rSt, short )
{
- BYTE nPara;
+ sal_uInt8 nPara;
rSt.Read( &nPara, sizeof( nPara ) );
switch( nPara ){
case 0: *pOut << "F"; break;
case 1: *pOut << "T"; break;
- default: *pOut << "ERROR:" << (USHORT)nPara; break;
+ default: *pOut << "ERROR:" << (sal_uInt16)nPara; break;
}
}
void OutBool4( SvStream& rSt, short )
{
- BYTE nPara;
+ sal_uInt8 nPara;
rSt.Read( &nPara, sizeof( nPara ) );
switch( nPara ){
@@ -178,16 +178,16 @@ void OutBool4( SvStream& rSt, short )
case 1: *pOut << "T"; break;
case 128: *pOut << "==Style"; break;
case 129: *pOut << "!=Style"; break;
- default: *pOut << "ERROR:" << (USHORT)nPara; break;
+ default: *pOut << "ERROR:" << (sal_uInt16)nPara; break;
}
}
void OutByte( SvStream& rSt, short )
{
- BYTE nPara;
+ sal_uInt8 nPara;
rSt.Read( &nPara, sizeof( nPara ) );
- *pOut << (USHORT)nPara;
+ *pOut << (sal_uInt16)nPara;
}
void OutShort( SvStream& rSt, short )
@@ -200,7 +200,7 @@ void OutShort( SvStream& rSt, short )
void OutShorts( SvStream& rSt, short nLen )
{
- INT16 nPara;
+ sal_Int16 nPara;
for( short i = 0; i < nLen / 2; i++ ){
rSt.Read( &nPara, sizeof( nPara ) );
@@ -210,7 +210,7 @@ void OutShorts( SvStream& rSt, short nLen )
void OutWord( SvStream& rSt, short )
{
- USHORT nPara;
+ sal_uInt16 nPara;
rSt.Read( &nPara, sizeof( nPara ) );
*pOut << nPara;
@@ -218,7 +218,7 @@ void OutWord( SvStream& rSt, short )
void OutWords( SvStream& rSt, short nLen )
{
- USHORT nPara;
+ sal_uInt16 nPara;
for( short i = 0; i < nLen / 2; i++ ){
rSt.Read( &nPara, sizeof( nPara ) );
@@ -228,7 +228,7 @@ void OutWords( SvStream& rSt, short nLen )
void OutWordHex( SvStream& rSt, short )
{
- USHORT nPara;
+ sal_uInt16 nPara;
rSt.Read( &nPara, sizeof( nPara ) );
*pOut << "0x" << hex4 << nPara << dec;
@@ -236,7 +236,7 @@ void OutWordHex( SvStream& rSt, short )
void OutWordsHex( SvStream& rSt, short nLen )
{
- USHORT nPara;
+ sal_uInt16 nPara;
nLen /= sizeof( nPara );
for( short i = 0; i < nLen; i++ ){
rSt.Read( &nPara, sizeof( nPara ) );
@@ -261,7 +261,7 @@ void OutLongsHex( SvStream& rSt, short nLen )
void OutLongHex( SvStream& rSt, short )
{
- ULONG nPara;
+ sal_uLong nPara;
rSt.Read( &nPara, sizeof( nPara ) );
*pOut << "0x" << hex8 << nPara << dec;
@@ -269,7 +269,7 @@ void OutLongHex( SvStream& rSt, short )
void OutTab68( SvStream& rSt, short )
{
- ULONG nPara;
+ sal_uLong nPara;
rSt.Read( &nPara, sizeof( nPara ) );
if( nPara == 0 )
@@ -281,11 +281,11 @@ void OutTab68( SvStream& rSt, short )
void OutTab( SvStream& rSt, short )
{
- BYTE nDel, nIns, nType;
+ sal_uInt8 nDel, nIns, nType;
short nPos, i;
rSt.Read( &nDel, sizeof( nDel ) );
- *pOut << "Del " << (USHORT)nDel;
+ *pOut << "Del " << (sal_uInt16)nDel;
if ( nDel ) *pOut << ": ";
else *pOut << ", ";
@@ -296,7 +296,7 @@ void OutTab( SvStream& rSt, short )
else *pOut << ' ';
}
rSt.Read( &nIns, sizeof( nIns ) );
- *pOut << "Ins " << (USHORT)nIns;
+ *pOut << "Ins " << (sal_uInt16)nIns;
if ( nIns ) *pOut << ": ";
for( i=1; i<=nIns; i++){
@@ -309,7 +309,7 @@ void OutTab( SvStream& rSt, short )
for( i=1; i<=nIns; i++){
rSt.Read( &nType, sizeof( nType ) );
- *pOut << (USHORT)nType;
+ *pOut << (sal_uInt16)nType;
if( i<nIns ) *pOut << ',';
else *pOut << ' ';
}
@@ -321,9 +321,9 @@ void OutTab( SvStream& rSt, short )
void OutTab190( SvStream& rSt, short nLen )
{
- BYTE nCols;
+ sal_uInt8 nCols;
rSt.Read( &nCols, sizeof( nCols ) );
- *pOut << (USHORT)nCols << " Cols: ";
+ *pOut << (sal_uInt16)nCols << " Cols: ";
short nPos, i;
for( i = 0; i <= nCols; i++ ){
@@ -343,9 +343,9 @@ void OutTab190( SvStream& rSt, short nLen )
void OutTab191( SvStream& rSt, short nLen )
{
- BYTE nCols;
+ sal_uInt8 nCols;
rSt.Read( &nCols, sizeof( nCols ) );
- *pOut << (USHORT)nCols << " Cols, SHDs: ";
+ *pOut << (sal_uInt16)nCols << " Cols, SHDs: ";
OutWordsHex( rSt, ( nCols + 1 ) * 2 );
}
@@ -374,7 +374,7 @@ void OutHugeHex( SvStream& rSt, short nLen )
void OutTabD608( SvStream& rSt, short nLen )
{
- BYTE nHi, nCols;
+ sal_uInt8 nHi, nCols;
rSt.Read( &nHi, sizeof( nHi ) );
// nLen += ((short)nHi) << 8;
@@ -406,7 +406,7 @@ void OutTabD609( SvStream& rSt, short nLen )
*pOut << " Brush(FBS): ";
for( short i = 0; i < nLen / 2; ++i )
{
- UINT16 nVal;
+ sal_uInt16 nVal;
rSt.Read( &nVal, sizeof( nVal ) );
*pOut << (nVal & 0x1f);
*pOut << "|" << ((nVal >> 5) & 0x1f);
diff --git a/sw/source/filter/ww8/dump/ww8dout.hxx b/sw/source/filter/ww8/dump/ww8dout.hxx
index ce7f65e0ac59..ac301c0e62bf 100644
--- a/sw/source/filter/ww8/dump/ww8dout.hxx
+++ b/sw/source/filter/ww8/dump/ww8dout.hxx
@@ -32,7 +32,7 @@
#include <fstream.h> // ostream
#endif
#ifndef SOLAR_H
- #include <tools/solar.h> // BYTE
+ #include <tools/solar.h> // sal_uInt8
#endif
class SvStream;
diff --git a/sw/source/filter/ww8/dump/ww8scan.cxx b/sw/source/filter/ww8/dump/ww8scan.cxx
index cd211520e083..b099ea590022 100644
--- a/sw/source/filter/ww8/dump/ww8scan.cxx
+++ b/sw/source/filter/ww8/dump/ww8scan.cxx
@@ -753,52 +753,52 @@ SprmInfo wwSprmParser::GetSprmInfo(sal_uInt16 nId) const
//-end
-inline BYTE Get_Byte( BYTE *& p )
+inline sal_uInt8 Get_Byte( sal_uInt8 *& p )
{
- BYTE n = SVBT8ToByte( *(SVBT8*)p );
+ sal_uInt8 n = SVBT8ToByte( *(SVBT8*)p );
p += 1;
return n;
}
-inline USHORT Get_UShort( BYTE *& p )
+inline sal_uInt16 Get_UShort( sal_uInt8 *& p )
{
- USHORT n = SVBT16ToShort( *(SVBT16*)p );
+ sal_uInt16 n = SVBT16ToShort( *(SVBT16*)p );
p += 2;
return n;
}
-inline short Get_Short( BYTE *& p )
+inline short Get_Short( sal_uInt8 *& p )
{
return Get_UShort(p);
}
-inline ULONG Get_ULong( BYTE *& p )
+inline sal_uLong Get_ULong( sal_uInt8 *& p )
{
- ULONG n = SVBT32ToUInt32( *(SVBT32*)p );
+ sal_uLong n = SVBT32ToUInt32( *(SVBT32*)p );
p += 4;
return n;
}
-inline long Get_Long( BYTE *& p )
+inline long Get_Long( sal_uInt8 *& p )
{
return Get_ULong(p);
}
-WW8SprmIter::WW8SprmIter(const BYTE* pSprms_, long nLen_,
+WW8SprmIter::WW8SprmIter(const sal_uInt8* pSprms_, long nLen_,
const wwSprmParser &rParser)
: mrSprmParser(rParser), pSprms( pSprms_), nRemLen( nLen_)
{
UpdateMyMembers();
}
-void WW8SprmIter::SetSprms(const BYTE* pSprms_, long nLen_)
+void WW8SprmIter::SetSprms(const sal_uInt8* pSprms_, long nLen_)
{
pSprms = pSprms_;
nRemLen = nLen_;
UpdateMyMembers();
}
-const BYTE* WW8SprmIter::operator ++( int )
+const sal_uInt8* WW8SprmIter::operator ++( int )
{
if (nRemLen > 0)
{
@@ -826,7 +826,7 @@ void WW8SprmIter::UpdateMyMembers()
}
}
-const BYTE* WW8SprmIter::FindSprm(USHORT nId)
+const sal_uInt8* WW8SprmIter::FindSprm(sal_uInt16 nId)
{
while(GetSprms())
{
@@ -845,7 +845,7 @@ const BYTE* WW8SprmIter::FindSprm(USHORT nId)
// eigenen Iteratoren. Alle sich auf Iteratoren beziehenden Methoden
// sind deshalb Dummies.
-WW8PLCFx_PCDAttrs::WW8PLCFx_PCDAttrs(BYTE nVersion, WW8PLCFx_PCD* pPLCFx_PCD,
+WW8PLCFx_PCDAttrs::WW8PLCFx_PCDAttrs(sal_uInt8 nVersion, WW8PLCFx_PCD* pPLCFx_PCD,
const WW8ScannerBase* pBase)
: WW8PLCFx(nVersion, true), pPcdI(pPLCFx_PCD->GetPLCFIter()),
pPcd(pPLCFx_PCD), pGrpprls(pBase->pPieceGrpprls),
@@ -853,12 +853,12 @@ WW8PLCFx_PCDAttrs::WW8PLCFx_PCDAttrs(BYTE nVersion, WW8PLCFx_PCD* pPLCFx_PCD,
{
}
-ULONG WW8PLCFx_PCDAttrs::GetIdx() const
+sal_uLong WW8PLCFx_PCDAttrs::GetIdx() const
{
return 0;
}
-void WW8PLCFx_PCDAttrs::SetIdx( ULONG )
+void WW8PLCFx_PCDAttrs::SetIdx( sal_uLong )
{
}
@@ -891,11 +891,11 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
return;
}
- UINT16 nPrm = SVBT16ToShort( ( (WW8_PCD*)pData )->prm );
+ sal_uInt16 nPrm = SVBT16ToShort( ( (WW8_PCD*)pData )->prm );
if ( nPrm & 1 )
{
// PRM Variant 2
- UINT16 nSprmIdx = nPrm >> 1;
+ sal_uInt16 nSprmIdx = nPrm >> 1;
if( nSprmIdx >= nGrpprls )
{
@@ -905,7 +905,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
p->nSprmsLen = 0;
return;
}
- const BYTE* pSprms = pGrpprls[ nSprmIdx ];
+ const sal_uInt8* pSprms = pGrpprls[ nSprmIdx ];
p->nSprmsLen = SVBT16ToShort( pSprms ); // Length
pSprms += 2;
@@ -920,8 +920,8 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
if(8 > GetVersion())
{
- aShortSprm[0] = (BYTE)( ( nPrm & 0xfe) >> 1 );
- aShortSprm[1] = (BYTE)( nPrm >> 8 );
+ aShortSprm[0] = (sal_uInt8)( ( nPrm & 0xfe) >> 1 );
+ aShortSprm[1] = (sal_uInt8)( nPrm >> 8 );
p->nSprmsLen = ( nPrm ) ? 2 : 0; // Laenge
// store Postion of internal mini storage in Data Pointer
@@ -931,7 +931,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
{
p->pMemPos = 0;
p->nSprmsLen = 0;
- BYTE nSprmListIdx = (BYTE)((nPrm & 0xfe) >> 1);
+ sal_uInt8 nSprmListIdx = (sal_uInt8)((nPrm & 0xfe) >> 1);
if( nSprmListIdx )
{
// process Sprm Id Matching as explained in MS Doku
@@ -940,7 +940,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
// see file: s62f39.htm
//
// Since isprm is 7 bits, rgsprmPrm can hold 0x80 entries.
- static const USHORT aSprmId[0x80] =
+ static const sal_uInt16 aSprmId[0x80] =
{
// sprmNoop, sprmNoop, sprmNoop, sprmNoop
0x0000,0x0000,0x0000,0x0000,
@@ -1012,14 +1012,14 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
};
// find real Sprm Id:
- USHORT nSprmId = aSprmId[ nSprmListIdx ];
+ sal_uInt16 nSprmId = aSprmId[ nSprmListIdx ];
if( nSprmId )
{
// move Sprm Id and Sprm Param to internal mini storage:
- aShortSprm[0] = (BYTE)( ( nSprmId & 0x00ff) );
- aShortSprm[1] = (BYTE)( ( nSprmId & 0xff00) >> 8 );
- aShortSprm[2] = (BYTE)( nPrm >> 8 );
+ aShortSprm[0] = (sal_uInt8)( ( nSprmId & 0x00ff) );
+ aShortSprm[1] = (sal_uInt8)( ( nSprmId & 0xff00) >> 8 );
+ aShortSprm[2] = (sal_uInt8)( nPrm >> 8 );
// store Sprm Length in member:
p->nSprmsLen = ( nPrm ) ? 3 : 0;
@@ -1034,7 +1034,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
//------------------------------------------------------------------------
-WW8PLCFx_PCD::WW8PLCFx_PCD(BYTE nVersion, WW8PLCFpcd* pPLCFpcd,
+WW8PLCFx_PCD::WW8PLCFx_PCD(sal_uInt8 nVersion, WW8PLCFpcd* pPLCFpcd,
WW8_CP nStartCp, bool bVer67P)
: WW8PLCFx(nVersion, false), nClipStart(-1)
{
@@ -1049,17 +1049,17 @@ WW8PLCFx_PCD::~WW8PLCFx_PCD()
delete pPcdI;
}
-ULONG WW8PLCFx_PCD::GetIMax() const
+sal_uLong WW8PLCFx_PCD::GetIMax() const
{
return pPcdI ? pPcdI->GetIMax() : 0;
}
-ULONG WW8PLCFx_PCD::GetIdx() const
+sal_uLong WW8PLCFx_PCD::GetIdx() const
{
return pPcdI ? pPcdI->GetIdx() : 0;
}
-void WW8PLCFx_PCD::SetIdx( ULONG nIdx )
+void WW8PLCFx_PCD::SetIdx( sal_uLong nIdx )
{
if (pPcdI)
pPcdI->SetIdx( nIdx );
@@ -1146,11 +1146,11 @@ WW8_CP WW8PLCFx_PCD::AktPieceStartFc2Cp( WW8_FC nStartPos )
return LONG_MAX;
}
bool bIsUnicode = false;
- INT32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
+ sal_Int32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
if( !bVer67 )
nFcStart = WW8PLCFx_PCD::TransformPieceAddress( nFcStart, bIsUnicode );
- INT32 nUnicodeFactor = bIsUnicode ? 2 : 1;
+ sal_Int32 nUnicodeFactor = bIsUnicode ? 2 : 1;
if( nStartPos < nFcStart )
nStartPos = nFcStart;
@@ -1184,22 +1184,22 @@ DateTime WW8ScannerBase::WW8DTTM2DateTime(long lDTTM)
DateTime aDateTime(Date( 0 ), Time( 0 ));
if( lDTTM )
{
- USHORT lMin = (USHORT)(lDTTM & 0x0000003F);
+ sal_uInt16 lMin = (sal_uInt16)(lDTTM & 0x0000003F);
lDTTM >>= 6;
- USHORT lHour= (USHORT)(lDTTM & 0x0000001F);
+ sal_uInt16 lHour= (sal_uInt16)(lDTTM & 0x0000001F);
lDTTM >>= 5;
- USHORT lDay = (USHORT)(lDTTM & 0x0000001F);
+ sal_uInt16 lDay = (sal_uInt16)(lDTTM & 0x0000001F);
lDTTM >>= 5;
- USHORT lMon = (USHORT)(lDTTM & 0x0000000F);
+ sal_uInt16 lMon = (sal_uInt16)(lDTTM & 0x0000000F);
lDTTM >>= 4;
- USHORT lYear= (USHORT)(lDTTM & 0x000001FF) + 1900;
+ sal_uInt16 lYear= (sal_uInt16)(lDTTM & 0x000001FF) + 1900;
aDateTime = DateTime(Date(lDay, lMon, lYear), Time(lHour, lMin));
}
return aDateTime;
}
short WW8_BRC::DetermineBorderProperties(bool bVer67, short *pSpace,
- BYTE *pCol, short *pIdx) const
+ sal_uInt8 *pCol, short *pIdx) const
{
/*
Word does not factor the width of the border into the width/height
@@ -1208,11 +1208,11 @@ short WW8_BRC::DetermineBorderProperties(bool bVer67, short *pSpace,
our calculations
*/
short nMSTotalWidth;
- BYTE nCol;
+ sal_uInt8 nCol;
short nIdx,nSpace;
if( bVer67 )
{
- UINT16 aBrc1 = SVBT16ToShort(aBits1);
+ sal_uInt16 aBrc1 = SVBT16ToShort(aBits1);
nCol = ((aBrc1 >> 6) & 0x1f); // aBor.ico
nSpace = (aBrc1 & 0xF800) >> 11;
@@ -1423,7 +1423,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
bool bIsUnicode = false;
if( pPieceIter ) // Complex File ?
{
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
for (pPieceIter->SetIdx(0);
pPieceIter->GetIdx() < pPieceIter->GetIMax();(*pPieceIter)++)
@@ -1435,11 +1435,11 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
ASSERT( !this, "PLCFpcd-WW8Fc2Cp() ging schief" );
break;
}
- INT32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
+ sal_Int32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
if( 8 <= pWw8Fib->nVersion )
nFcStart = WW8PLCFx_PCD::TransformPieceAddress( nFcStart,
bIsUnicode );
- INT32 nLen = (nCpEnd - nCpStart) * (bIsUnicode ? 2 : 1);
+ sal_Int32 nLen = (nCpEnd - nCpStart) * (bIsUnicode ? 2 : 1);
/*
If this cp is inside this piece, or its the last piece and we are
@@ -1546,10 +1546,10 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
return 0;
WW8_FC nClxPos = pWwF->fcClx;
- INT32 nClxLen = pWwF->lcbClx;
- INT32 nLeft = nClxLen;
- INT16 nGrpprl = 0;
- BYTE clxt;
+ sal_Int32 nClxLen = pWwF->lcbClx;
+ sal_Int32 nLeft = nClxLen;
+ sal_Int16 nGrpprl = 0;
+ sal_uInt8 clxt;
pStr->Seek( nClxPos );
while( 1 ) // Zaehle Zahl der Grpprls
@@ -1560,7 +1560,7 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
break; // PLCFfpcd gefunden
if( 1 == clxt ) // clxtGrpprl ?
nGrpprl++;
- UINT16 nLen;
+ sal_uInt16 nLen;
*pStr >> nLen;
nLeft -= 2 + nLen;
if( nLeft < 0 )
@@ -1569,24 +1569,24 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
}
pStr->Seek( nClxPos );
nLeft = nClxLen;
- pPieceGrpprls = new BYTE*[nGrpprl + 1];
+ pPieceGrpprls = new sal_uInt8*[nGrpprl + 1];
memset( pPieceGrpprls, 0, ( nGrpprl + 1 ) * 4 );
nPieceGrpprls = nGrpprl;
- INT16 nAktGrpprl = 0; // lies Grpprls ein
+ sal_Int16 nAktGrpprl = 0; // lies Grpprls ein
while( 1 )
{
*pStr >> clxt;
nLeft--;
if( 2 == clxt) // PLCFfpcd ?
break; // PLCFfpcd gefunden
- UINT16 nLen;
+ sal_uInt16 nLen;
*pStr >> nLen;
nLeft -= 2 + nLen;
if( nLeft < 0 )
return 0; // schiefgegangen
if( 1 == clxt ) // clxtGrpprl ?
{
- BYTE* p = new BYTE[nLen+2]; // alloziere
+ sal_uInt8* p = new sal_uInt8[nLen+2]; // alloziere
ShortToSVBT16(nLen, p); // trage Laenge ein
pStr->Read( p+2, nLen ); // lies grpprl
pPieceGrpprls[nAktGrpprl++] = p; // trage in Array ein
@@ -1595,7 +1595,7 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
pStr->SeekRel( nLen ); // ueberlies nicht-Grpprl
}
// lies Piece Table PLCF ein
- INT32 nPLCFfLen;
+ sal_Int32 nPLCFfLen;
*pStr >> nPLCFfLen;
ASSERT( 65536 > nPLCFfLen, "PLCFfpcd ueber 64 k" );
return new WW8PLCFpcd( pStr, pStr->Tell(), nPLCFfLen, 8 );
@@ -1605,7 +1605,7 @@ void WW8ScannerBase::DeletePieceTable()
{
if( pPieceGrpprls )
{
- for( BYTE** p = pPieceGrpprls; *p; p++ )
+ for( sal_uInt8** p = pPieceGrpprls; *p; p++ )
delete[] (*p);
delete[] pPieceGrpprls;
pPieceGrpprls = 0;
@@ -1781,14 +1781,14 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
return true; // Bei Fehler nicht abbrechen
if( !rPLCF.Get( nP, pData ) )
return false;
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Beschreibungsteil
@@ -1796,7 +1796,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
return false;
}
- if((((BYTE*)pData)[0] & 0x1f ) == 0x14 )
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x14 )
{
// Field Separator ?
@@ -1805,7 +1805,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
if( !rPLCF.Get( nP, pData ) )
return false;
- while ((((BYTE*)pData)[0] & 0x1f ) == 0x13)
+ while ((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13)
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Resultatteil
@@ -1821,7 +1821,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
{
void* pData;
- ULONG nOldIdx = rPLCF.GetIdx();
+ sal_uLong nOldIdx = rPLCF.GetIdx();
rF.nLen = rF.nId = rF.nOpt = rF.bCodeNest = rF.bResNest = 0;
@@ -1830,10 +1830,10 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
goto Err;
- rF.nId = ((BYTE*)pData)[1];
+ rF.nId = ((sal_uInt8*)pData)[1];
if( !rPLCF.Get( rF.nLCode, pData ) )
goto Err;
@@ -1842,7 +1842,7 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
rF.nSCode++; // ohne Marken
rF.nLCode -= rF.nSCode; // Pos zu Laenge
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Beschreibungsteil
@@ -1851,13 +1851,13 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
goto Err;
}
- if((((BYTE*)pData)[0] & 0x1f ) == 0x14 ){ // Field Separator ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x14 ){ // Field Separator ?
rPLCF++;
if( !rPLCF.Get( rF.nLRes, pData ) )
goto Err;
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Resultatteil
@@ -1876,11 +1876,11 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
}
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) == 0x15 )
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x15 )
{
// Field Ende ?
// INDEX-Fld hat Bit7 gesetzt!?!
- rF.nOpt = ((BYTE*)pData)[1]; // Ja -> Flags uebernehmen
+ rF.nOpt = ((sal_uInt8*)pData)[1]; // Ja -> Flags uebernehmen
}else{
rF.nId = 0; // Nein -> Feld ungueltig
}
@@ -1903,7 +1903,7 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
bool bAtEndSeekRel1)
{
ByteString aByteStr;
- UINT8 b;
+ sal_uInt8 b;
rStrm >> b;
if (b)
@@ -1911,7 +1911,7 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
// Alloc methode automatically sets Zero at the end
sal_Char* pByteData = aByteStr.AllocBuffer( b );
- ULONG nWasRead = rStrm.Read( pByteData, b );
+ sal_uLong nWasRead = rStrm.Read( pByteData, b );
if( nWasRead != b )
aByteStr.ReleaseBufferAccess(static_cast<xub_StrLen>(nWasRead));
}
@@ -1923,9 +1923,9 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
return String( aByteStr, eEnc );
}
-String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
+String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1)
{
- UINT16 b;
+ sal_uInt16 b;
if( nChars )
b = nChars;
@@ -1938,16 +1938,16 @@ String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
// Alloc methode automatically sets Zero at the end
sal_Unicode* pData = aStr.AllocBuffer( b );
- ULONG nWasRead = rStrm.Read( (sal_Char*)pData, b * 2 );
- if( nWasRead != static_cast<ULONG>(b*2) )
+ sal_uLong nWasRead = rStrm.Read( (sal_Char*)pData, b * 2 );
+ if( nWasRead != static_cast<sal_uLong>(b*2) )
{
- b = static_cast<UINT16>(nWasRead / 2);
+ b = static_cast<sal_uInt16>(nWasRead / 2);
aStr.ReleaseBufferAccess( b );
pData = aStr.GetBufferAccess();
}
#ifdef OSL_BIGENDIAN
- ULONG n;
+ sal_uLong n;
sal_Unicode *pWork;
for( n = 0, pWork = pData; n < b; ++n, ++pWork )
*pWork = SWAPSHORT( *pWork );
@@ -1960,9 +1960,9 @@ String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
return aStr;
}
-static ULONG SafeReadString(ByteString &rStr,USHORT nLen,SvStream &rStrm)
+static sal_uLong SafeReadString(ByteString &rStr,sal_uInt16 nLen,SvStream &rStrm)
{
- ULONG nWasRead=0;
+ sal_uLong nWasRead=0;
if (nLen)
{
nWasRead = rStrm.Read( rStr.AllocBuffer( nLen ), nLen);
@@ -1972,7 +1972,7 @@ static ULONG SafeReadString(ByteString &rStr,USHORT nLen,SvStream &rStrm)
return nWasRead;
}
-USHORT WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr,
+sal_uInt16 WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr,
WW8_CP nAktStartCp, long nTotalLen, rtl_TextEncoding eEnc ) const
{
// Klartext einlesen, der sich ueber mehrere Pieces erstrecken kann
@@ -2002,12 +2002,12 @@ USHORT WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr,
nLen = USHRT_MAX - 1;
if( bIsUnicode )
- rStr.Append(WW8Read_xstz(rStrm, (USHORT)nLen, false));
+ rStr.Append(WW8Read_xstz(rStrm, (sal_uInt16)nLen, false));
else
{
// Alloc method automatically sets Zero at the end
ByteString aByteStr;
- SafeReadString(aByteStr,(USHORT)nLen,rStrm);
+ SafeReadString(aByteStr,(sal_uInt16)nLen,rStrm);
rStr += String( aByteStr, eEnc );
}
nTotalRead += nLen;
@@ -2031,7 +2031,7 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
// Pointer auf Pos- u. Struct-Array
- pPLCF_PosArray = new INT32[ ( nPLCF + 3 ) / 4 ];
+ pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ];
long nOldPos = pSt->Tell();
@@ -2045,7 +2045,7 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
if( bNoEnd )
nIMax++;
if( nStruct ) // Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
else
pPLCF_Contents = 0; // kein Inhalt
if( nStartPos >= 0 )
@@ -2183,7 +2183,7 @@ WW8PLCF::WW8PLCF( SvStream* pSt, long nFilePos, long nPLCF, long nStruct,
void WW8PLCF::ReadPLCF( SvStream* pSt, long nFilePos, long nPLCF )
{
// Pointer auf Pos-Array
- pPLCF_PosArray = new INT32[ ( nPLCF + 3 ) / 4 ];
+ pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ];
long nOldPos = pSt->Tell();
@@ -2195,7 +2195,7 @@ void WW8PLCF::ReadPLCF( SvStream* pSt, long nFilePos, long nPLCF )
nIdx = 0;
#endif // OSL_BIGENDIAN
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
pSt->Seek( nOldPos );
}
@@ -2205,28 +2205,28 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, long nPN, long ncpN )
ASSERT( nIMax < (long)ncpN, "Pcl.Fkp: Warum ist PLCF zu gross ?" );
nIMax = ncpN;
long nSiz = 6 * nIMax + 4;
- pPLCF_PosArray = new INT32[ ( nSiz + 3 ) / 4 ]; // Pointer auf Pos-Array
+ pPLCF_PosArray = new sal_Int32[ ( nSiz + 3 ) / 4 ]; // Pointer auf Pos-Array
memset( pPLCF_PosArray, 0, (size_t)nSiz );
- INT32 nFc;
- USHORT i;
+ sal_Int32 nFc;
+ sal_uInt16 i;
for( i = 0; i < ncpN; i++ ){ // Baue FC-Eintraege
pSt->Seek( ( nPN + i ) << 9 ); // erster FC-Eintrag jedes Fkp
*pSt >> nFc;
pPLCF_PosArray[i] = nFc;
}
- ULONG nLastFkpPos = ( ( nPN + nIMax - 1 ) << 9 );
+ sal_uLong nLastFkpPos = ( ( nPN + nIMax - 1 ) << 9 );
pSt->Seek( nLastFkpPos + 511 ); // Anz. Fkp-Eintraege des letzten Fkp
- BYTE nb;
+ sal_uInt8 nb;
*pSt >> nb;
pSt->Seek( nLastFkpPos + nb * 4 ); // letzer FC-Eintrag des letzten Fkp
*pSt >> nFc;
pPLCF_PosArray[nIMax] = nFc; // Ende des letzten Fkp
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
- BYTE* p = pPLCF_Contents;
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
+ sal_uInt8* p = pPLCF_Contents;
for( i = 0; i < ncpN; i++ ) // Baue PNs
{
@@ -2300,7 +2300,7 @@ WW8PLCFpcd::WW8PLCFpcd( SvStream* pSt, long nFilePos, long nPLCF, long nStruct )
:nStru( nStruct )
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
- pPLCF_PosArray = new INT32[ ( nPLCF + 3 ) / 4 ]; // Pointer auf Pos-Array
+ pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ]; // Pointer auf Pos-Array
long nOldPos = pSt->Tell();
@@ -2312,7 +2312,7 @@ WW8PLCFpcd::WW8PLCFpcd( SvStream* pSt, long nFilePos, long nPLCF, long nStruct )
#endif // OSL_BIGENDIAN
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
pSt->Seek( nOldPos );
}
@@ -2386,7 +2386,7 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::Entry::operator<
return (mnFC < rSecond.mnFC);
}
-WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(BYTE nFibVer, SvStream* pSt, SvStream* pDataSt,
+WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(sal_uInt8 nFibVer, SvStream* pSt, SvStream* pDataSt,
long _nFilePos, long nItemSiz, ePLCFT ePl, WW8_FC nStartFc)
: nItemSize(nItemSiz), nFilePos(_nFilePos), nIdx(0), ePLCF(ePl),
maSprmParser(nFibVer)
@@ -2403,7 +2403,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(BYTE nFibVer, SvStream* pSt, SvStream* pDataSt,
for (nIdx = 0; nIdx < nIMax; ++nIdx)
{
- USHORT nOfs = (*(pOfs + nIdx * nItemSize)) * 2;
+ sal_uInt16 nOfs = (*(pOfs + nIdx * nItemSize)) * 2;
Entry aEntry(Get_Long(pStart));
if (nOfs)
@@ -2428,13 +2428,13 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(BYTE nFibVer, SvStream* pSt, SvStream* pDataSt,
aEntry.mpData = maRawData + nOfs + 3+ nDelta;
- USHORT nSpId = maSprmParser.GetSprmId(aEntry.mpData);
+ sal_uInt16 nSpId = maSprmParser.GetSprmId(aEntry.mpData);
if (0x6645 == nSpId || 0x6646 == nSpId)
{
- UINT32 nCurr = pDataSt->Tell();
+ sal_uInt32 nCurr = pDataSt->Tell();
- UINT32 nPos = SVBT32ToUInt32(aEntry.mpData + 2);
+ sal_uInt32 nPos = SVBT32ToUInt32(aEntry.mpData + 2);
pDataSt->Seek(nPos);
*pDataSt >> aEntry.mnLen;
aEntry.mpData = new sal_uInt8[aEntry.mnLen];
@@ -2548,7 +2548,7 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::SeekPos(WW8_FC nFc)
return false;
}
-BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::Get( WW8_FC& rStart, WW8_FC& rEnd, long& rLen )
+sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::Get( WW8_FC& rStart, WW8_FC& rEnd, long& rLen )
const
{
rLen = 0;
@@ -2562,42 +2562,42 @@ BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::Get( WW8_FC& rStart, WW8_FC& rEnd, long& rLen )
rStart = maEntries[nIdx].mnFC;
rEnd = maEntries[nIdx + 1].mnFC;
- BYTE* pSprms = GetLenAndIStdAndSprms( rLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( rLen );
return pSprms;
}
-void WW8PLCFx_Fc_FKP::WW8Fkp::SetIdx( ULONG nI )
+void WW8PLCFx_Fc_FKP::WW8Fkp::SetIdx( sal_uLong nI )
{
if( nI < nIMax)
nIdx = (short)nI;
}
-BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(long& rLen) const
+sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(long& rLen) const
{
rLen = maEntries[nIdx].mnLen;
return maEntries[nIdx].mpData;
}
-const BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm( USHORT nId )
+const sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm( sal_uInt16 nId )
{
if( nIdx >= nIMax )
return 0;
long nLen;
- BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
WW8SprmIter aIter(pSprms, nLen, maSprmParser);
return aIter.FindSprm(nId);
}
-bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(USHORT nId,
- std::vector<const BYTE *> &rResult)
+bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(sal_uInt16 nId,
+ std::vector<const sal_uInt8 *> &rResult)
{
if (nIdx >= nIMax)
return false;
long nLen;
- BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
WW8SprmIter aIter(pSprms, nLen, maSprmParser);
@@ -2630,12 +2630,12 @@ long WW8PLCFx::GetNoSprms( long& rStart, long& rEnd, long& rLen )
}
// ...Idx2: Default: ignorieren
-ULONG WW8PLCFx::GetIdx2() const
+sal_uLong WW8PLCFx::GetIdx2() const
{
return 0;
}
-void WW8PLCFx::SetIdx2(ULONG )
+void WW8PLCFx::SetIdx2(sal_uLong )
{
}
@@ -2686,7 +2686,7 @@ bool WW8PLCFx_Fc_FKP::NewFkp()
return false; // PLCF fertig abgearbeitet
}
(*pPLCF)++;
- long nPo = SVBT16ToShort( (BYTE *)pPage );
+ long nPo = SVBT16ToShort( (sal_uInt8 *)pPage );
nPo <<= 9; // shift als LONG
long nAktFkpFilePos = pFkp ? pFkp->GetFilePos() : -1;
@@ -2746,15 +2746,15 @@ WW8PLCFx_Fc_FKP::~WW8PLCFx_Fc_FKP()
delete pPCDAttrs;
}
-ULONG WW8PLCFx_Fc_FKP::GetIdx() const
+sal_uLong WW8PLCFx_Fc_FKP::GetIdx() const
{
- ULONG u = pPLCF->GetIdx() << 8;
+ sal_uLong u = pPLCF->GetIdx() << 8;
if (pFkp)
u |= pFkp->GetIdx();
return u;
}
-void WW8PLCFx_Fc_FKP::SetIdx( ULONG nIdx )
+void WW8PLCFx_Fc_FKP::SetIdx( sal_uLong nIdx )
{
if( !( nIdx & 0xffffff00L ) )
{
@@ -2783,7 +2783,7 @@ bool WW8PLCFx_Fc_FKP::SeekPos(WW8_FC nFcPos)
void* pPage;
if( pFkp && pPLCF->Get( nPLCFStart, nPLCFEnd, pPage ) )
{
- long nPo = SVBT16ToShort( (BYTE *)pPage );
+ long nPo = SVBT16ToShort( (sal_uInt8 *)pPage );
nPo <<= 9; // shift als LONG
if (nPo != pFkp->GetFilePos())
pFkp = 0;
@@ -2808,7 +2808,7 @@ WW8_FC WW8PLCFx_Fc_FKP::Where()
return Where(); // am einfachsten rekursiv
}
-BYTE* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, long& rLen)
+sal_uInt8* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, long& rLen)
{
rLen = 0; // Default
rStart = rEnd = LONG_MAX;
@@ -2819,7 +2819,7 @@ BYTE* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, long& rLen)
return 0;
}
- BYTE* pPos = pFkp->Get( rStart, rEnd, rLen );
+ sal_uInt8* pPos = pFkp->Get( rStart, rEnd, rLen );
if( rStart == LONG_MAX ) //Not found
return 0;
return pPos;
@@ -2840,7 +2840,7 @@ WW8PLCFx& WW8PLCFx_Fc_FKP::operator ++( int )
return *this;
}
-USHORT WW8PLCFx_Fc_FKP::GetIstd() const
+sal_uInt16 WW8PLCFx_Fc_FKP::GetIstd() const
{
return pFkp ? pFkp->GetIstd() : 0xFFFF;
}
@@ -2862,7 +2862,7 @@ void WW8PLCFx_Fc_FKP::GetPCDSprms( WW8PLCFxDesc& rDesc )
}
}
-const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
+const sal_uInt8* WW8PLCFx_Fc_FKP::HasSprm( sal_uInt16 nId )
{
// const waere schoener, aber dafuer muesste NewFkp() ersetzt werden oder
// wegfallen
@@ -2874,7 +2874,7 @@ const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
return 0;
}
- const BYTE* pRes = pFkp->HasSprm( nId );
+ const sal_uInt8* pRes = pFkp->HasSprm( nId );
if( !pRes )
{
@@ -2892,7 +2892,7 @@ const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
return pRes;
}
-bool WW8PLCFx_Fc_FKP::HasSprm(USHORT nId, std::vector<const BYTE *> &rResult)
+bool WW8PLCFx_Fc_FKP::HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult)
{
// const waere schoener, aber dafuer muesste NewFkp() ersetzt werden oder
// wegfallen
@@ -2965,17 +2965,17 @@ void WW8PLCFx_Cp_FKP::ResetAttrStartEnd()
bLineEnd = false;
}
-ULONG WW8PLCFx_Cp_FKP::GetPCDIMax() const
+sal_uLong WW8PLCFx_Cp_FKP::GetPCDIMax() const
{
return pPcd ? pPcd->GetIMax() : 0;
}
-ULONG WW8PLCFx_Cp_FKP::GetPCDIdx() const
+sal_uLong WW8PLCFx_Cp_FKP::GetPCDIdx() const
{
return pPcd ? pPcd->GetIdx() : 0;
}
-void WW8PLCFx_Cp_FKP::SetPCDIdx( ULONG nIdx )
+void WW8PLCFx_Cp_FKP::SetPCDIdx( sal_uLong nIdx )
{
if( pPcd )
pPcd->SetIdx( nIdx );
@@ -3026,7 +3026,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
Otherwise our cool fastsave algorithm can be brought to bear on the
problem.
*/
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
bool bOk = pPieceIter->SeekPos(nOrigCp);
pPieceIter->SetIdx( nOldPos );
if (!bOk)
@@ -3053,7 +3053,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
//We set the piece iterator to the piece that contains the
//character, now we have the correct piece for this character
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
p->nStartPos = nOrigCp;
pPieceIter->SeekPos( p->nStartPos);
@@ -3130,7 +3130,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
break;
}
bIsUnicode = false;
- INT32 nFcStart=SVBT32ToUInt32(((WW8_PCD*)pData)->fc);
+ sal_Int32 nFcStart=SVBT32ToUInt32(((WW8_PCD*)pData)->fc);
if( 8 <= GetVersion() )
{
@@ -3212,7 +3212,7 @@ WW8PLCFx_SEPX::WW8PLCFx_SEPX(SvStream* pSt, SvStream* pTblSt,
? new WW8PLCF(pTblSt, rFib.fcPlcfsed, rFib.lcbPlcfsed, 12, nStartCp)
: 0;
- pSprms = new BYTE[nArrMax]; // maximum length
+ pSprms = new sal_uInt8[nArrMax]; // maximum length
}
WW8PLCFx_SEPX::~WW8PLCFx_SEPX()
@@ -3221,12 +3221,12 @@ WW8PLCFx_SEPX::~WW8PLCFx_SEPX()
delete[] pSprms;
}
-ULONG WW8PLCFx_SEPX::GetIdx() const
+sal_uLong WW8PLCFx_SEPX::GetIdx() const
{
return pPLCF ? pPLCF->GetIdx() : 0;
}
-void WW8PLCFx_SEPX::SetIdx( ULONG nIdx )
+void WW8PLCFx_SEPX::SetIdx( sal_uLong nIdx )
{
if( pPLCF ) pPLCF->SetIdx( nIdx );
}
@@ -3256,7 +3256,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
}
else
{
- long nPo = SVBT32ToUInt32( (BYTE*)pData+2 );
+ long nPo = SVBT32ToUInt32( (sal_uInt8*)pData+2 );
if (nPo == -1L)
{
p->nStartPos = p->nEndPos = LONG_MAX; // Sepx empty
@@ -3272,7 +3272,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
{ // passt nicht
delete[] pSprms;
nArrMax = nSprmSiz; // Hole mehr Speicher
- pSprms = new BYTE[nArrMax];
+ pSprms = new sal_uInt8[nArrMax];
}
pStrm->Read( pSprms, nSprmSiz ); // read Sprms
@@ -3289,15 +3289,15 @@ WW8PLCFx& WW8PLCFx_SEPX::operator ++( int )
return *this;
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId ) const
{
return HasSprm( nId, pSprms, nSprmSiz);
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, const BYTE* pOtherSprms,
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, const sal_uInt8* pOtherSprms,
long nOtherSprmSiz ) const
{
- const BYTE *pRet = 0;
+ const sal_uInt8 *pRet = 0;
if (pPLCF)
{
WW8SprmIter aIter(pOtherSprms, nOtherSprmSiz, maSprmParser);
@@ -3306,8 +3306,8 @@ const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, const BYTE* pOtherSprms,
return pRet;
}
-bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
- BYTE*& p1, BYTE*& p2, BYTE*& p3, BYTE*& p4) const
+bool WW8PLCFx_SEPX::Find4Sprms(sal_uInt16 nId1,sal_uInt16 nId2,sal_uInt16 nId3,sal_uInt16 nId4,
+ sal_uInt8*& p1, sal_uInt8*& p2, sal_uInt8*& p3, sal_uInt8*& p4) const
{
if( !pPLCF )
return 0;
@@ -3318,12 +3318,12 @@ bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
p3 = 0;
p4 = 0;
- BYTE* pSp = pSprms;
- USHORT i=0;
+ sal_uInt8* pSp = pSprms;
+ sal_uInt16 i=0;
while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
{
// Sprm gefunden?
- USHORT nAktId = maSprmParser.GetSprmId(pSp);
+ sal_uInt16 nAktId = maSprmParser.GetSprmId(pSp);
bool bOk = true;
if( nAktId == nId1 )
p1 = pSp + maSprmParser.DistanceToData(nId1);
@@ -3337,33 +3337,33 @@ bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
bOk = false;
bFound |= bOk;
// erhoehe Zeiger, so dass er auf naechsten Sprm zeigt
- USHORT x = maSprmParser.GetSprmSize(nAktId, pSp);
+ sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSp);
i += x;
pSp += x;
}
return bFound;
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, BYTE n2nd ) const
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const
{
if( !pPLCF )
return 0;
- BYTE* pSp = pSprms;
+ sal_uInt8* pSp = pSprms;
- USHORT i=0;
+ sal_uInt16 i=0;
while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
{
// Sprm gefunden?
- USHORT nAktId = maSprmParser.GetSprmId(pSp);
+ sal_uInt16 nAktId = maSprmParser.GetSprmId(pSp);
if (nAktId == nId)
{
- BYTE *pRet = pSp + maSprmParser.DistanceToData(nId);
+ sal_uInt8 *pRet = pSp + maSprmParser.DistanceToData(nId);
if (*pRet == n2nd)
return pRet;
}
// erhoehe Zeiger, so dass er auf naechsten Sprm zeigt
- USHORT x = maSprmParser.GetSprmSize(nAktId, pSp);
+ sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSp);
i += x;
pSp += x;
}
@@ -3372,7 +3372,7 @@ const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, BYTE n2nd ) const
}
//-----------------------------------------
-WW8PLCFx_SubDoc::WW8PLCFx_SubDoc(SvStream* pSt, BYTE nVersion,
+WW8PLCFx_SubDoc::WW8PLCFx_SubDoc(SvStream* pSt, sal_uInt8 nVersion,
WW8_CP nStartCp, long nFcRef, long nLenRef, long nFcTxt, long nLenTxt,
long nStruct)
: WW8PLCFx(nVersion, false), pRef(0), pTxt(0)
@@ -3390,7 +3390,7 @@ WW8PLCFx_SubDoc::~WW8PLCFx_SubDoc()
delete pTxt;
}
-ULONG WW8PLCFx_SubDoc::GetIdx() const
+sal_uLong WW8PLCFx_SubDoc::GetIdx() const
{
// Wahrscheinlich pTxt... nicht noetig
if( pRef )
@@ -3398,7 +3398,7 @@ ULONG WW8PLCFx_SubDoc::GetIdx() const
return 0;
}
-void WW8PLCFx_SubDoc::SetIdx( ULONG nIdx )
+void WW8PLCFx_SubDoc::SetIdx( sal_uLong nIdx )
{
if( pRef )
{
@@ -3431,7 +3431,7 @@ long WW8PLCFx_SubDoc::GetNoSprms( WW8_CP& rStart, long& rEnd, long& rLen )
return -1;
}
- ULONG nNr = pRef->GetIdx();
+ sal_uLong nNr = pRef->GetIdx();
if (!pRef->Get( rStart, nE, pData ))
{
@@ -3512,12 +3512,12 @@ WW8PLCFx_FLD::~WW8PLCFx_FLD()
delete pPLCF;
}
-ULONG WW8PLCFx_FLD::GetIdx() const
+sal_uLong WW8PLCFx_FLD::GetIdx() const
{
return pPLCF ? pPLCF->GetIdx() : 0;
}
-void WW8PLCFx_FLD::SetIdx( ULONG nIdx )
+void WW8PLCFx_FLD::SetIdx( sal_uLong nIdx )
{
if( pPLCF )
pPLCF->SetIdx( nIdx );
@@ -3539,7 +3539,7 @@ bool WW8PLCFx_FLD::StartPosIsFieldStart()
long nTest;
if (
(!pPLCF || !pPLCF->Get(nTest, pData) ||
- ((((BYTE*)pData)[0] & 0x1f) != 0x13))
+ ((((sal_uInt8*)pData)[0] & 0x1f) != 0x13))
)
return false;
return true;
@@ -3557,7 +3557,7 @@ bool WW8PLCFx_FLD::EndPosIsFieldEnd()
void* pData;
long nTest;
- if ( pPLCF->Get(nTest, pData) && ((((BYTE*)pData)[0] & 0x1f) == 0x15) )
+ if ( pPLCF->Get(nTest, pData) && ((((sal_uInt8*)pData)[0] & 0x1f) == 0x15) )
bRet = true;
pPLCF->SetIdx(n);
@@ -3631,20 +3631,20 @@ bool WW8PLCFx_FLD::GetPara(long nIdx, WW8FieldDesc& rF)
//-----------------------------------------
/* to be optimized like this: */
-void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
- USHORT nExtraLen, rtl_TextEncoding eCS, std::vector<String> &rArray,
+void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen,
+ sal_uInt16 nExtraLen, rtl_TextEncoding eCS, std::vector<String> &rArray,
std::vector<String>* pExtraArray)
{
- ULONG nOldPos = rStrm.Tell();
+ sal_uLong nOldPos = rStrm.Tell();
rStrm.Seek( nStart );
- UINT16 nLen2;
+ sal_uInt16 nLen2;
rStrm >> nLen2; // bVer67: total length of structure
// bVer8 : count of strings
if( bVer8 )
{
- UINT16 nStrings;
+ sal_uInt16 nStrings;
bool bUnicode = (0xFFFF == nLen2);
if( bUnicode )
rStrm >> nStrings;
@@ -3653,13 +3653,13 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
rStrm >> nExtraLen;
- for( USHORT i=0; i < nStrings; i++ )
+ for( sal_uInt16 i=0; i < nStrings; i++ )
{
if( bUnicode )
rArray.push_back(WW8Read_xstz(rStrm, 0, false));
else
{
- BYTE nBChar;
+ sal_uInt8 nBChar;
rStrm >> nBChar;
ByteString aTmp;
SafeReadString(aTmp,nBChar,rStrm);
@@ -3682,7 +3682,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
}
else
{
- BYTE nBChar;
+ sal_uInt8 nBChar;
if( nLen2 != nLen )
{
ASSERT( nLen2 == nLen, "Fib length and read length are different" );
@@ -3690,9 +3690,9 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
nLen = USHRT_MAX;
else if (nLen < 2 )
nLen = 2;
- nLen2 = static_cast<UINT16>(nLen);
+ nLen2 = static_cast<sal_uInt16>(nLen);
}
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
for( nLen2 -= 2; nRead < nLen2; )
{
rStrm >> nBChar; ++nRead;
@@ -3763,28 +3763,28 @@ WW8PLCFx_Book::~WW8PLCFx_Book()
delete pBook[0];
}
-ULONG WW8PLCFx_Book::GetIdx() const
+sal_uLong WW8PLCFx_Book::GetIdx() const
{
return nIMax ? pBook[0]->GetIdx() : 0;
}
-void WW8PLCFx_Book::SetIdx( ULONG nI )
+void WW8PLCFx_Book::SetIdx( sal_uLong nI )
{
if( nIMax )
pBook[0]->SetIdx( nI );
}
-ULONG WW8PLCFx_Book::GetIdx2() const
+sal_uLong WW8PLCFx_Book::GetIdx2() const
{
return nIMax ? ( pBook[1]->GetIdx() | ( ( nIsEnd ) ? 0x80000000 : 0 ) ) : 0;
}
-void WW8PLCFx_Book::SetIdx2( ULONG nI )
+void WW8PLCFx_Book::SetIdx2( sal_uLong nI )
{
if( nIMax )
{
pBook[1]->SetIdx( nI & 0x7fffffff );
- nIsEnd = (USHORT)( ( nI >> 31 ) & 1 ); // 0 oder 1
+ nIsEnd = (sal_uInt16)( ( nI >> 31 ) & 1 ); // 0 oder 1
}
}
@@ -3839,8 +3839,8 @@ WW8PLCFx& WW8PLCFx_Book::operator ++( int )
{
(*pBook[nIsEnd])++;
- ULONG l0 = pBook[0]->Where();
- ULONG l1 = pBook[1]->Where();
+ sal_uLong l0 = pBook[0]->Where();
+ sal_uLong l1 = pBook[1]->Where();
if( l0 < l1 )
nIsEnd = 0;
else if( l1 < l0 )
@@ -3865,13 +3865,13 @@ long WW8PLCFx_Book::GetLen() const
ASSERT( !this, "Falscher Aufruf (2) von PLCF_Book::GetLen()" );
return 0;
}
- USHORT nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
+ sal_uInt16 nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
long nNum = pBook[1]->GetPos( nEndIdx );
nNum -= nStartPos;
return nNum;
}
-void WW8PLCFx_Book::SetStatus(USHORT nIndex, eBookStatus eStat )
+void WW8PLCFx_Book::SetStatus(sal_uInt16 nIndex, eBookStatus eStat )
{
ASSERT(nIndex < nIMax, "set status of non existing bookmark!");
pStatus[nIndex] = (eBookStatus)( pStatus[nIndex] | eStat );
@@ -3901,17 +3901,17 @@ long WW8PLCFx_Book::GetHandle() const
}
}
-String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, USHORT &nIndex)
+String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex)
{
bool bFound = false;
- USHORT i = 0;
+ sal_uInt16 i = 0;
if( pBook[0] && pBook[1] )
{
WW8_CP nStartAkt, nEndAkt;
do
{
void* p;
- USHORT nEndIdx;
+ sal_uInt16 nEndIdx;
if( pBook[0]->GetData( i, nStartAkt, p ) && p )
nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
@@ -3942,12 +3942,12 @@ bool WW8PLCFx_Book::MapName(String& rName)
return false;
bool bFound = false;
- USHORT i = 0;
+ sal_uInt16 i = 0;
WW8_CP nStartAkt, nEndAkt;
do
{
void* p;
- USHORT nEndIdx;
+ sal_uInt16 nEndIdx;
if( pBook[0]->GetData( i, nStartAkt, p ) && p )
nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
@@ -4078,9 +4078,9 @@ void WW8PLCFMan::GetNewNoSprms( WW8PLCFxDesc& rDesc )
rDesc.nOrigSprmsLen = rDesc.nSprmsLen;
}
-USHORT WW8PLCFMan::GetId(const WW8PLCFxDesc* p) const
+sal_uInt16 WW8PLCFMan::GetId(const WW8PLCFxDesc* p) const
{
- USHORT nId;
+ sal_uInt16 nId;
if (p == pFld)
nId = eFLD;
@@ -4103,7 +4103,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, short nType, long nStartCp,
memset( aD, 0, sizeof( aD ) );
nLineEnd = LONG_MAX;
nManType = nType;
- USHORT i;
+ sal_uInt16 i;
if( MAN_MAINTEXT == nType )
{
@@ -4253,7 +4253,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, short nType, long nStartCp,
if( p->pPLCFx->IsSprm() )
{
// Vorsicht: nEndPos muss bereits
- p->pIdStk = new std::stack<USHORT>;
+ p->pIdStk = new std::stack<sal_uInt16>;
if ((p == pChp) || (p == pPap))
{
WW8_CP nTemp = p->nEndPos+p->nCpOfs;
@@ -4275,20 +4275,20 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, short nType, long nStartCp,
WW8PLCFMan::~WW8PLCFMan()
{
- for( USHORT i=0; i<nPLCF; i++)
+ for( sal_uInt16 i=0; i<nPLCF; i++)
delete aD[i].pIdStk;
}
// 0. welche Attr.-Klasse,
// 1. ob ein Attr.-Start ist,
// 2. CP, wo ist naechste Attr.-Aenderung
-USHORT WW8PLCFMan::WhereIdx(bool* pbStart, long* pPos) const
+sal_uInt16 WW8PLCFMan::WhereIdx(bool* pbStart, long* pPos) const
{
ASSERT(nPLCF,"What the hell");
long nNext = LONG_MAX; // SuchReihenfolge:
- USHORT nNextIdx = nPLCF;// first ending found ( CHP, PAP, ( SEP ) ),
+ sal_uInt16 nNextIdx = nPLCF;// first ending found ( CHP, PAP, ( SEP ) ),
bool bStart = true; // dann Anfaenge finden ( ( SEP ), PAP, CHP )
- USHORT i;
+ sal_uInt16 i;
const WW8PLCFxDesc* pD;
for (i=0; i < nPLCF; i++)
{
@@ -4345,7 +4345,7 @@ void WW8PLCFMan::SeekPos( long nNewCp )
void WW8PLCFMan::SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const
{
- USHORT i, n=0;
+ sal_uInt16 i, n=0;
if( pPcd )
pPcd->Save( rSave.aS[n++] );
if( pPcdA )
@@ -4358,7 +4358,7 @@ void WW8PLCFMan::SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const
void WW8PLCFMan::RestoreAllPLCFx( const WW8PLCFxSaveAll& rSave )
{
- USHORT i, n=0;
+ sal_uInt16 i, n=0;
if( pPcd )
pPcd->Restore( rSave.aS[n++] );
if( pPcdA )
@@ -4456,7 +4456,7 @@ void WW8PLCFMan::GetNoSprmEnd( short nIdx, WW8PLCFManResult* pRes ) const
pRes->nSprmId = 0;
}
-bool WW8PLCFMan::TransferOpenSprms(std::stack<USHORT> &rStack)
+bool WW8PLCFMan::TransferOpenSprms(std::stack<sal_uInt16> &rStack)
{
for (int i = 0; i < nPLCF; ++i)
{
@@ -4479,7 +4479,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
p->bFirstSprm = false;
if( bStart )
{
- USHORT nLastId = GetId(p);
+ sal_uInt16 nLastId = GetId(p);
p->pIdStk->push(nLastId); // merke Id fuer Attribut-Ende
if( p->nSprmsLen )
@@ -4489,7 +4489,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
if( p->pMemPos )
{
// Length of last sprm
- USHORT nSprmL = maSprmParser.GetSprmSize(nLastId, p->pMemPos);
+ sal_uInt16 nSprmL = maSprmParser.GetSprmSize(nLastId, p->pMemPos);
// Gesamtlaenge Sprms um SprmLaenge verringern
p->nSprmsLen -= nSprmL;
@@ -4642,7 +4642,7 @@ void WW8PLCFMan::AdvNoSprm(short nIdx, bool bStart)
WW8PLCFMan& WW8PLCFMan::operator ++(int)
{
bool bStart;
- USHORT nIdx = WhereIdx(&bStart);
+ sal_uInt16 nIdx = WhereIdx(&bStart);
if (nIdx < nPLCF)
{
WW8PLCFxDesc* p = &aD[nIdx];
@@ -4665,7 +4665,7 @@ bool WW8PLCFMan::Get(WW8PLCFManResult* pRes) const
{
memset( pRes, 0, sizeof( WW8PLCFManResult ) );
bool bStart;
- USHORT nIdx = WhereIdx(&bStart);
+ sal_uInt16 nIdx = WhereIdx(&bStart);
if( nIdx >= nPLCF )
{
@@ -4701,7 +4701,7 @@ bool WW8PLCFMan::Get(WW8PLCFManResult* pRes) const
}
}
-USHORT WW8PLCFMan::GetColl() const
+sal_uInt16 WW8PLCFMan::GetColl() const
{
if( pPap->pPLCFx )
return pPap->pPLCFx->GetIstd();
@@ -4717,18 +4717,18 @@ WW8PLCFx_FLD* WW8PLCFMan::GetFld() const
return (WW8PLCFx_FLD*)pFld->pPLCFx;
}
-const BYTE* WW8PLCFMan::HasParaSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFMan::HasParaSprm( sal_uInt16 nId ) const
{
return ((WW8PLCFx_Cp_FKP*)pPap->pPLCFx)->HasSprm( nId );
}
-const BYTE* WW8PLCFMan::HasCharSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFMan::HasCharSprm( sal_uInt16 nId ) const
{
return ((WW8PLCFx_Cp_FKP*)pChp->pPLCFx)->HasSprm( nId );
}
-bool WW8PLCFMan::HasCharSprm(USHORT nId,
- std::vector<const BYTE *> &rResult) const
+bool WW8PLCFMan::HasCharSprm(sal_uInt16 nId,
+ std::vector<const sal_uInt8 *> &rResult) const
{
return ((WW8PLCFx_Cp_FKP*)pChp->pPLCFx)->HasSprm(nId, rResult);
}
@@ -4750,12 +4750,12 @@ void WW8PLCFx::Restore( const WW8PLCFxSave1& rSave )
SetStartFc( rSave.nStartFC );
}
-ULONG WW8PLCFx_Cp_FKP::GetIdx2() const
+sal_uLong WW8PLCFx_Cp_FKP::GetIdx2() const
{
return GetPCDIdx();
}
-void WW8PLCFx_Cp_FKP::SetIdx2( ULONG nIdx )
+void WW8PLCFx_Cp_FKP::SetIdx2( sal_uLong nIdx )
{
SetPCDIdx( nIdx );
}
@@ -4828,12 +4828,12 @@ void WW8PLCFxDesc::Restore( const WW8PLCFxSave1& rSave )
//-----------------------------------------
-WW8Fib::WW8Fib( SvStream& rSt, BYTE nWantedVersion,UINT32 nOffset )
+WW8Fib::WW8Fib( SvStream& rSt, sal_uInt8 nWantedVersion,sal_uInt32 nOffset )
: nFibError( 0 )
{
- BYTE aBits1;
- BYTE aBits2;
- BYTE aVer8Bits1; // nur ab WinWord 8 benutzt
+ sal_uInt8 aBits1;
+ sal_uInt8 aBits2;
+ sal_uInt8 aVer8Bits1; // nur ab WinWord 8 benutzt
rSt.Seek( nOffset );
/*
Wunsch-Nr vermerken, File-Versionsnummer ermitteln
@@ -4845,8 +4845,8 @@ WW8Fib::WW8Fib( SvStream& rSt, BYTE nWantedVersion,UINT32 nOffset )
rSt >> nProduct;
if( 0 != rSt.GetError() )
{
- INT16 nFibMin;
- INT16 nFibMax;
+ sal_Int16 nFibMin;
+ sal_Int16 nFibMax;
// note: 6 stands for "6 OR 7", 7 stands for "ONLY 7"
switch( nVersion )
{
@@ -4884,10 +4884,10 @@ WW8Fib::WW8Fib( SvStream& rSt, BYTE nWantedVersion,UINT32 nOffset )
bool bVer8 = (8 == nVersion);
// Hilfs-Varis fuer Ver67:
- INT16 pnChpFirst_Ver67=0;
- INT16 pnPapFirst_Ver67=0;
- INT16 cpnBteChp_Ver67=0;
- INT16 cpnBtePap_Ver67=0;
+ sal_Int16 pnChpFirst_Ver67=0;
+ sal_Int16 pnPapFirst_Ver67=0;
+ sal_Int16 cpnBteChp_Ver67=0;
+ sal_Int16 cpnBtePap_Ver67=0;
// und auf gehts: FIB einlesen
rSt >> lid;
@@ -4901,12 +4901,12 @@ WW8Fib::WW8Fib( SvStream& rSt, BYTE nWantedVersion,UINT32 nOffset )
rSt >> aVer8Bits1; // unter Ver67 nur leeres Reservefeld
// Inhalt von aVer8Bits1
//
- // BYTE fMac :1;
- // BYTE fEmptySpecial :1;
- // BYTE fLoadOverridePage :1;
- // BYTE fFuturesavedUndo :1;
- // BYTE fWord97Saved :1;
- // BYTE :3;
+ // sal_uInt8 fMac :1;
+ // sal_uInt8 fEmptySpecial :1;
+ // sal_uInt8 fLoadOverridePage :1;
+ // sal_uInt8 fFuturesavedUndo :1;
+ // sal_uInt8 fWord97Saved :1;
+ // sal_uInt8 :3;
rSt >> chse;
rSt >> chseTables;
rSt >> fcMin;
@@ -4922,7 +4922,7 @@ WW8Fib::WW8Fib( SvStream& rSt, BYTE nWantedVersion,UINT32 nOffset )
rSt >> wMagicRevised;
rSt >> wMagicCreatedPrivate;
rSt >> wMagicRevisedPrivate;
- rSt.SeekRel( 9 * sizeof( INT16 ) );
+ rSt.SeekRel( 9 * sizeof( sal_Int16 ) );
/*
// dies sind die 9 unused Felder:
@@ -4946,11 +4946,11 @@ WW8Fib::WW8Fib( SvStream& rSt, BYTE nWantedVersion,UINT32 nOffset )
rSt >> cbMac;
// 2 Longs uebergehen, da unwichtiger Quatsch
- rSt.SeekRel( 2 * sizeof( INT32) );
+ rSt.SeekRel( 2 * sizeof( sal_Int32) );
// weitere 2 Longs nur bei Ver67 ueberspringen
if( bVer67 )
- rSt.SeekRel( 2 * sizeof( INT32) );
+ rSt.SeekRel( 2 * sizeof( sal_Int32) );
rSt >> ccpText;
rSt >> ccpFtn;
@@ -4963,7 +4963,7 @@ WW8Fib::WW8Fib( SvStream& rSt, BYTE nWantedVersion,UINT32 nOffset )
// weiteres Long nur bei Ver67 ueberspringen
if( bVer67 )
- rSt.SeekRel( 1 * sizeof( INT32) );
+ rSt.SeekRel( 1 * sizeof( sal_Int32) );
else
{
// Einschub fuer WW8 *****************************************************
@@ -5064,7 +5064,7 @@ WW8Fib::WW8Fib( SvStream& rSt, BYTE nWantedVersion,UINT32 nOffset )
// weiteres short nur bei Ver67 ueberspringen
if (bVer67)
{
- rSt.SeekRel( 1*sizeof( INT16) );
+ rSt.SeekRel( 1*sizeof( sal_Int16) );
// folgende 4 Shorts existieren nur bei Ver67;
rSt >> pnChpFirst_Ver67;
@@ -5192,7 +5192,7 @@ WW8Fib::WW8Fib( SvStream& rSt, BYTE nWantedVersion,UINT32 nOffset )
}
-WW8Fib::WW8Fib(BYTE nVer)
+WW8Fib::WW8Fib(sal_uInt8 nVer)
{
memset(this, 0, sizeof(*this));
nVersion = nVer;
@@ -5234,13 +5234,13 @@ WW8Fib::WW8Fib(BYTE nVer)
bool WW8Fib::Write(SvStream& rStrm)
{
- BYTE *pDataPtr = new BYTE[ fcMin ];
- BYTE *pData = pDataPtr;
+ sal_uInt8 *pDataPtr = new sal_uInt8[ fcMin ];
+ sal_uInt8 *pData = pDataPtr;
memset( pData, 0, fcMin );
bool bVer8 = 8 == nVersion;
- ULONG nPos = rStrm.Tell();
+ sal_uLong nPos = rStrm.Tell();
cbMac = rStrm.Seek( STREAM_SEEK_TO_END );
rStrm.Seek( nPos );
@@ -5250,7 +5250,7 @@ bool WW8Fib::Write(SvStream& rStrm)
Set_UInt16( pData, lid );
Set_UInt16( pData, pnNext );
- UINT16 nBits16 = 0;
+ sal_uInt16 nBits16 = 0;
if( fDot ) nBits16 |= 0x0001;
if( fGlsy) nBits16 |= 0x0002;
if( fComplex ) nBits16 |= 0x0004;
@@ -5266,7 +5266,7 @@ bool WW8Fib::Write(SvStream& rStrm)
Set_UInt16( pData, lKey2 );
Set_UInt8( pData, envr );
- BYTE nBits8 = 0;
+ sal_uInt8 nBits8 = 0;
if( bVer8 )
{
if( fMac ) nBits8 |= 0x0001;
@@ -5294,7 +5294,7 @@ bool WW8Fib::Write(SvStream& rStrm)
Set_UInt16( pData, wMagicRevised );
Set_UInt16( pData, wMagicCreatedPrivate );
Set_UInt16( pData, wMagicRevisedPrivate );
- pData += 9 * sizeof( INT16 );
+ pData += 9 * sizeof( sal_Int16 );
Set_UInt16( pData, lidFE );
Set_UInt16( pData, clw );
}
@@ -5305,11 +5305,11 @@ bool WW8Fib::Write(SvStream& rStrm)
Set_UInt32( pData, cbMac );
// 2 Longs uebergehen, da unwichtiger Quatsch
- pData += 2 * sizeof( INT32);
+ pData += 2 * sizeof( sal_Int32);
// weitere 2 Longs nur bei Ver67 ueberspringen
if( !bVer8 )
- pData += 2 * sizeof( INT32);
+ pData += 2 * sizeof( sal_Int32);
Set_UInt32( pData, ccpText );
Set_UInt32( pData, ccpFtn );
@@ -5322,7 +5322,7 @@ bool WW8Fib::Write(SvStream& rStrm)
// weiteres Long nur bei Ver67 ueberspringen
if( !bVer8 )
- pData += 1 * sizeof( INT32);
+ pData += 1 * sizeof( sal_Int32);
// Einschub fuer WW8 *****************************************************
if( bVer8 )
@@ -5423,11 +5423,11 @@ bool WW8Fib::Write(SvStream& rStrm)
// weiteres short nur bei Ver67 ueberspringen
if( !bVer8 )
{
- pData += 1*sizeof( INT16);
- Set_UInt16( pData, (UINT16)pnChpFirst );
- Set_UInt16( pData, (UINT16)pnPapFirst );
- Set_UInt16( pData, (UINT16)cpnBteChp );
- Set_UInt16( pData, (UINT16)cpnBtePap );
+ pData += 1*sizeof( sal_Int16);
+ Set_UInt16( pData, (sal_uInt16)pnChpFirst );
+ Set_UInt16( pData, (sal_uInt16)pnPapFirst );
+ Set_UInt16( pData, (sal_uInt16)cpnBteChp );
+ Set_UInt16( pData, (sal_uInt16)cpnBtePap );
}
Set_UInt32( pData, fcPlcfdoaMom ); // nur bei Ver67, in Ver8 unused
@@ -5498,8 +5498,8 @@ bool WW8Fib::Write(SvStream& rStrm)
Set_UInt32( pData, lcbMagicTable );
pData += 0x3FA - 0x38A;
- Set_UInt16( pData, (UINT16)0x0002);
- Set_UInt16( pData, (UINT16)0x00D9);
+ Set_UInt16( pData, (sal_uInt16)0x0002);
+ Set_UInt16( pData, (sal_uInt16)0x00D9);
}
rStrm.Write( pDataPtr, fcMin );
@@ -5507,13 +5507,13 @@ bool WW8Fib::Write(SvStream& rStrm)
return 0 == rStrm.GetError();
}
-rtl_TextEncoding WW8Fib::GetFIBCharset(UINT16 chs)
+rtl_TextEncoding WW8Fib::GetFIBCharset(sal_uInt16 chs)
{
ASSERT(chs <= 0x100, "overflowed winword charset set");
rtl_TextEncoding eCharSet =
(0x0100 == chs)
? RTL_TEXTENCODING_APPLE_ROMAN
- : rtl_getTextEncodingFromWindowsCharset( static_cast<BYTE>(chs) );
+ : rtl_getTextEncodingFromWindowsCharset( static_cast<sal_uInt8>(chs) );
return eCharSet;
}
@@ -5527,7 +5527,7 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
rSt.Seek(nStyleStart);
- USHORT cbStshi = 0; // 2 bytes size of the following STSHI structure
+ sal_uInt16 cbStshi = 0; // 2 bytes size of the following STSHI structure
// alte Version ?
if (rFib.nFib < 67)
@@ -5536,10 +5536,10 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
// lies die Laenge der in der Datei gespeicherten Struktur
rSt >> cbStshi;
- UINT16 nRead = cbStshi;
+ sal_uInt16 nRead = cbStshi;
do
{
- UINT16 a16Bit;
+ sal_uInt16 a16Bit;
if( 2 > nRead ) break;
rSt >> cstd;
@@ -5590,10 +5590,10 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
{
WW8_STD* pStd = 0;
- UINT16 cbStd;
+ sal_uInt16 cbStd;
rSt >> cbStd; // lies Laenge
- UINT16 nRead = cbSTDBaseInFile;
+ sal_uInt16 nRead = cbSTDBaseInFile;
if( cbStd >= cbSTDBaseInFile )
{
// Fixed part vollst. vorhanden
@@ -5604,7 +5604,7 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
do
{
- UINT16 a16Bit;
+ sal_uInt16 a16Bit;
if( 2 > nRead ) break;
rSt >> a16Bit;
@@ -5737,7 +5737,7 @@ struct WW8_FFN_Ver8 : public WW8_FFN_BASE
sal_Char fs[ 24 ]; // 0x10 FONTSIGNATURE
// ab Ver8 als Unicode
- UINT16 szFfn[65]; // 0x6 bzw. 0x40 ab Ver8 zero terminated string that
+ sal_uInt16 szFfn[65]; // 0x6 bzw. 0x40 ab Ver8 zero terminated string that
// records name of font.
// Maximal size of szFfn is 65 characters.
// Vorsicht: Dieses Array kann auch kleiner sein!!!
@@ -5763,7 +5763,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
rSt.Seek( rFib.fcSttbfffn );
// allocate Font Array
- BYTE* pA = new BYTE[ rFib.lcbSttbfffn - 2 ];
+ sal_uInt8* pA = new sal_uInt8[ rFib.lcbSttbfffn - 2 ];
WW8_FFN* p = (WW8_FFN*)pA;
if( !bVer67 )
@@ -5797,7 +5797,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
if( nLeft < 1 ) // can we read the given ammount of bytes ?
break;
// increase p by nNextSiz Bytes
- p = (WW8_FFN *)( ( (BYTE*)p ) + nNextSiz );
+ p = (WW8_FFN *)( ( (sal_uInt8*)p ) + nNextSiz );
}
}
@@ -5810,11 +5810,11 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
if( bVer67 )
{
WW8_FFN_Ver6* pVer6 = (WW8_FFN_Ver6*)pA;
- BYTE c2;
- for(USHORT i=0; i<nMax; ++i, ++p)
+ sal_uInt8 c2;
+ for(sal_uInt16 i=0; i<nMax; ++i, ++p)
{
p->cbFfnM1 = pVer6->cbFfnM1;
- c2 = *(((BYTE*)pVer6) + 1);
+ c2 = *(((sal_uInt8*)pVer6) + 1);
p->prg = c2 & 0x02;
p->fTrueType = (c2 & 0x04) >> 2;
@@ -5840,17 +5840,17 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
p->sFontname += String(pVer6->szFfn+p->ibszAlt, eEnc);
// RTL_TEXTENCODING_MS_1252 );
}
- pVer6 = (WW8_FFN_Ver6*)( ((BYTE*)pVer6) + pVer6->cbFfnM1 + 1 );
+ pVer6 = (WW8_FFN_Ver6*)( ((sal_uInt8*)pVer6) + pVer6->cbFfnM1 + 1 );
}
}
else
{
WW8_FFN_Ver8* pVer8 = (WW8_FFN_Ver8*)pA;
- BYTE c2;
- for(USHORT i=0; i<nMax; ++i, ++p)
+ sal_uInt8 c2;
+ for(sal_uInt16 i=0; i<nMax; ++i, ++p)
{
p->cbFfnM1 = pVer8->cbFfnM1;
- c2 = *(((BYTE*)pVer8) + 1);
+ c2 = *(((sal_uInt8*)pVer8) + 1);
p->prg = c2 & 0x02;
p->fTrueType = (c2 & 0x04) >> 2;
@@ -5863,8 +5863,8 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
#ifdef __WW8_NEEDS_COPY
{
- BYTE nLen = 0x28;
- for( UINT16* pTmp = pVer8->szFfn;
+ sal_uInt8 nLen = 0x28;
+ for( sal_uInt16* pTmp = pVer8->szFfn;
nLen < pVer8->cbFfnM1 + 1 ; ++pTmp, nLen+=2 )
{
*pTmp = SVBT16ToShort( *(SVBT16*)pTmp );
@@ -5880,14 +5880,14 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
}
// Zeiger auf Ursprungsarray einen Font nach hinten setzen
- pVer8 = (WW8_FFN_Ver8*)( ((BYTE*)pVer8) + pVer8->cbFfnM1 + 1 );
+ pVer8 = (WW8_FFN_Ver8*)( ((sal_uInt8*)pVer8) + pVer8->cbFfnM1 + 1 );
}
}
}
delete[] pA;
}
-const WW8_FFN* WW8Fonts::GetFont( USHORT nNum ) const
+const WW8_FFN* WW8Fonts::GetFont( sal_uInt16 nNum ) const
{
if( !pFontA || nNum >= nMax )
return 0;
@@ -5930,7 +5930,7 @@ WW8PLCF_HdFt::WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop )
to point to the beginning of the next section's group of headers and
footers in this PLCF, UpdateIndex does that task.
*/
- for( BYTE nI = 0x1; nI <= 0x20; nI <<= 1 )
+ for( sal_uInt8 nI = 0x1; nI <= 0x20; nI <<= 1 )
if( nI & rDop.grpfIhdt ) // Bit gesetzt ?
nIdxOffset++;
@@ -5938,10 +5938,10 @@ WW8PLCF_HdFt::WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop )
// und der Fussnoten
}
-bool WW8PLCF_HdFt::GetTextPos(BYTE grpfIhdt, BYTE nWhich, WW8_CP& rStart,
+bool WW8PLCF_HdFt::GetTextPos(sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP& rStart,
long& rLen)
{
- BYTE nI = 0x01;
+ sal_uInt8 nI = 0x01;
short nIdx = nIdxOffset;
while (true)
{
@@ -5976,10 +5976,10 @@ bool WW8PLCF_HdFt::GetTextPosExact(short nIdx, WW8_CP& rStart, long& rLen)
return true;
}
-void WW8PLCF_HdFt::UpdateIndex( BYTE grpfIhdt )
+void WW8PLCF_HdFt::UpdateIndex( sal_uInt8 grpfIhdt )
{
// Caution: Description is not correct
- for( BYTE nI = 0x01; nI <= 0x20; nI <<= 1 )
+ for( sal_uInt8 nI = 0x01; nI <= 0x20; nI <<= 1 )
if( nI & grpfIhdt )
nIdxOffset++;
}
@@ -5988,12 +5988,12 @@ void WW8PLCF_HdFt::UpdateIndex( BYTE grpfIhdt )
// WW8Dop
//-----------------------------------------
-WW8Dop::WW8Dop( SvStream& rSt, INT16 nFib, INT32 nPos, INT32 nSize )
+WW8Dop::WW8Dop( SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_Int32 nSize )
{
- BYTE* pDataPtr = new BYTE[ 500 ];
- BYTE* pData = pDataPtr;
+ sal_uInt8* pDataPtr = new sal_uInt8[ 500 ];
+ sal_uInt8* pData = pDataPtr;
- UINT32 nRead = 500 < nSize ? 500 : nSize;
+ sal_uInt32 nRead = 500 < nSize ? 500 : nSize;
rSt.Seek( nPos );
if( 2 > nSize || nRead != rSt.Read( pData, nRead ))
{
@@ -6006,9 +6006,9 @@ WW8Dop::WW8Dop( SvStream& rSt, INT16 nFib, INT32 nPos, INT32 nSize )
memset( pData + nRead, 0, 500 - nRead );
// dann mal die Daten auswerten
- UINT32 a32Bit;
- UINT16 a16Bit;
- BYTE a8Bit;
+ sal_uInt32 a32Bit;
+ sal_uInt16 a16Bit;
+ sal_uInt8 a8Bit;
a16Bit = Get_UShort( pData );
fFacingPages = 0 != ( a16Bit & 0x0001 ) ;
@@ -6239,9 +6239,9 @@ WW8Dop::WW8Dop()
cDBCFtnEdn = /**!!**/ 0;
}
-UINT32 WW8Dop::GetCompatabilityOptions() const
+sal_uInt32 WW8Dop::GetCompatabilityOptions() const
{
- UINT32 a32Bit = 0;
+ sal_uInt32 a32Bit = 0;
if (fNoTabForInd) a32Bit |= 0x00000001;
if (fNoSpaceRaiseLower) a32Bit |= 0x00000002;
if (fSupressSpbfAfterPageBreak) a32Bit |= 0x00000004;
@@ -6265,17 +6265,17 @@ UINT32 WW8Dop::GetCompatabilityOptions() const
bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
{
- INT32 nLen = 8 == rFib.nVersion ? 0x220 : 84;
+ sal_Int32 nLen = 8 == rFib.nVersion ? 0x220 : 84;
rFib.fcDop = rStrm.Tell();
rFib.lcbDop = nLen;
- BYTE aData[ 0x220 ];
+ sal_uInt8 aData[ 0x220 ];
memset( aData, 0, 0x220 );
- BYTE* pData = aData;
+ sal_uInt8* pData = aData;
// dann mal die Daten auswerten
- UINT16 a16Bit;
- BYTE a8Bit;
+ sal_uInt16 a16Bit;
+ sal_uInt8 a8Bit;
a16Bit = 0;
if (fFacingPages)
@@ -6446,9 +6446,9 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
return 0 == rStrm.GetError();
}
-void WW8DopTypography::ReadFromMem(BYTE *&pData)
+void WW8DopTypography::ReadFromMem(sal_uInt8 *&pData)
{
- USHORT a16Bit = Get_UShort(pData);
+ sal_uInt16 a16Bit = Get_UShort(pData);
fKerningPunct = (a16Bit & 0x0001);
iJustification = (a16Bit & 0x0006) >> 1;
iLevelOfKinsoku = (a16Bit & 0x0018) >> 3;
@@ -6459,7 +6459,7 @@ void WW8DopTypography::ReadFromMem(BYTE *&pData)
cchFollowingPunct = Get_Short(pData);
cchLeadingPunct = Get_Short(pData);
- INT16 i;
+ sal_Int16 i;
for (i=0; i < nMaxFollowing; ++i)
rgxchFPunct[i] = Get_Short(pData);
for (i=0; i < nMaxLeading; ++i)
@@ -6469,9 +6469,9 @@ void WW8DopTypography::ReadFromMem(BYTE *&pData)
rgxchLPunct[cchLeadingPunct]=0;
}
-void WW8DopTypography::WriteToMem(BYTE *&pData) const
+void WW8DopTypography::WriteToMem(sal_uInt8 *&pData) const
{
- USHORT a16Bit = fKerningPunct;
+ sal_uInt16 a16Bit = fKerningPunct;
a16Bit |= (iJustification << 1) & 0x0006;
a16Bit |= (iLevelOfKinsoku << 3) & 0x0018;
a16Bit |= (f2on1 << 5) & 0x002;
@@ -6482,16 +6482,16 @@ void WW8DopTypography::WriteToMem(BYTE *&pData) const
Set_UInt16(pData,cchFollowingPunct);
Set_UInt16(pData,cchLeadingPunct);
- INT16 i;
+ sal_Int16 i;
for (i=0; i < nMaxFollowing; ++i)
Set_UInt16(pData,rgxchFPunct[i]);
for (i=0; i < nMaxLeading; ++i)
Set_UInt16(pData,rgxchLPunct[i]);
}
-USHORT WW8DopTypography::GetConvertedLang() const
+sal_uInt16 WW8DopTypography::GetConvertedLang() const
{
- USHORT nLang;
+ sal_uInt16 nLang;
//I have assumed peoples republic/taiwan == simplified/traditional
//This isn't a documented issue, so we might have it all wrong,
@@ -6534,11 +6534,11 @@ USHORT WW8DopTypography::GetConvertedLang() const
//-----------------------------------------
// Sprms
//-----------------------------------------
-USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
+sal_uInt16 wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
const
{
SprmInfo aSprm = GetSprmInfo(nId);
- USHORT nL = 0; // number of Bytes to read
+ sal_uInt16 nL = 0; // number of Bytes to read
//sprmPChgTabs
switch( nId )
@@ -6549,8 +6549,8 @@ USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
nL = pSprm[1 + mnDelta] + aSprm.nLen;
else
{
- BYTE nDel = pSprm[2 + mnDelta];
- BYTE nIns = pSprm[3 + mnDelta + 4 * nDel];
+ sal_uInt8 nDel = pSprm[2 + mnDelta];
+ sal_uInt8 nIns = pSprm[3 + mnDelta + 4 * nDel];
nL = 2 + 4 * nDel + 3 * nIns;
}
@@ -6586,16 +6586,16 @@ USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
int wwSprmParser::CountSprms(const sal_uInt8* pSp, long nSprmSiz,
const wwSprmSequence* pIgnoreSprms) const
{
- USHORT nMySprms = 0;
- USHORT i=0;
+ sal_uInt16 nMySprms = 0;
+ sal_uInt16 i=0;
while (i+1+mnDelta < nSprmSiz)
{
- USHORT nSpId = GetSprmId(pSp);
+ sal_uInt16 nSpId = GetSprmId(pSp);
if( !nSpId )
break;
- USHORT nSpLen = GetSprmSize(nSpId, pSp);
+ sal_uInt16 nSpLen = GetSprmSize(nSpId, pSp);
// increase pointers so to point to next sprm
i += nSpLen;
pSp += nSpLen;
@@ -6607,11 +6607,11 @@ int wwSprmParser::CountSprms(const sal_uInt8* pSp, long nSprmSiz,
}
// one or two bytes at the beginning at the sprm id
-USHORT wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
+sal_uInt16 wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
{
ASSERT_RET_ON_FAIL(pSp, "Why GetSprmId with pSp of 0", 0);
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch (mnVersion) // 6 stands for "6 OR 7", 7 stands for "ONLY 7"
{
case 6:
@@ -6631,17 +6631,17 @@ USHORT wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
}
// with tokens and length byte
-USHORT wwSprmParser::GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const
+sal_uInt16 wwSprmParser::GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const
{
return GetSprmTailLen(nId, pSprm) + 1 + mnDelta + SprmDataOfs(nId);
}
-BYTE wwSprmParser::SprmDataOfs(USHORT nId) const
+sal_uInt8 wwSprmParser::SprmDataOfs(sal_uInt16 nId) const
{
return GetSprmInfo(nId).nVari;
}
-USHORT wwSprmParser::DistanceToData(USHORT nId) const
+sal_uInt16 wwSprmParser::DistanceToData(sal_uInt16 nId) const
{
return 1 + mnDelta + SprmDataOfs(nId);
}
diff --git a/sw/source/filter/ww8/dump/ww8scan.hxx b/sw/source/filter/ww8/dump/ww8scan.hxx
index 7db1224704e3..02eba9b6a8e6 100644
--- a/sw/source/filter/ww8/dump/ww8scan.hxx
+++ b/sw/source/filter/ww8/dump/ww8scan.hxx
@@ -72,16 +72,16 @@ class SvUShortsSort;
String WW8ReadPString( SvStream& rStrm, rtl_TextEncoding eEnc,
- BOOL bAtEndSeekRel1 = TRUE );
+ sal_Bool bAtEndSeekRel1 = sal_True );
// Folgende Methode liest einen 2-byter-UNICODE-String ein:
// - falls bAtEndSeekRel1 gesetzt ist, wird am Ende genau EIN Byte uebersprungen,
// - falls nChars (die Zeichen-Anzahl, NICHT die Byte-Anzahl) nicht gesetzt ist,
-// wird das erste USHORT als Lannengenangabe interpretiert,
+// wird das erste sal_uInt16 als Lannengenangabe interpretiert,
// ansonsten als erstes String-Zeichen genommen.
String WW8Read_xstz(SvStream& rStrm,
- USHORT nChars,
- BOOL bAtEndSeekRel1);
+ sal_uInt16 nChars,
+ sal_Bool bAtEndSeekRel1);
// read array of strings (see MS documentation: STring TaBle stored in File)
@@ -90,17 +90,17 @@ String WW8Read_xstz(SvStream& rStrm,
// attention: the *extra data* of each string are SKIPPED and ignored
/* to be optimized like this: */
-void WW8ReadSTTBF( BOOL bVer8, SvStream& rStrm,
- UINT32 nStart, INT32 nLen, USHORT nSkip,
+void WW8ReadSTTBF( sal_Bool bVer8, SvStream& rStrm,
+ sal_uInt32 nStart, sal_Int32 nLen, sal_uInt16 nSkip,
rtl_TextEncoding eCS,
SvStrings &rArray, SvStrings* pExtraArray = 0 );
-USHORT WW8GetSprmId( BYTE nVersion, BYTE* pSp, BYTE* pDelta = 0 );
-short WW8GetSprmSizeNetto( BYTE nVersion, BYTE* pSprm, USHORT* pId );
-short WW8GetSprmSizeBrutto( BYTE nVersion, BYTE* pSprm, USHORT* pId );
-BYTE WW8SprmDataOfs( USHORT nId );
+sal_uInt16 WW8GetSprmId( sal_uInt8 nVersion, sal_uInt8* pSp, sal_uInt8* pDelta = 0 );
+short WW8GetSprmSizeNetto( sal_uInt8 nVersion, sal_uInt8* pSprm, sal_uInt16* pId );
+short WW8GetSprmSizeBrutto( sal_uInt8 nVersion, sal_uInt8* pSprm, sal_uInt16* pId );
+sal_uInt8 WW8SprmDataOfs( sal_uInt16 nId );
struct WW8FieldDesc
{
@@ -109,23 +109,23 @@ struct WW8FieldDesc
long nLCode; // Laenge
WW8_CP nSRes; // Anfang Ergebnis
long nLRes; // Laenge ( == 0, falls kein Ergebnis )
- USHORT nId; // WW-Id fuer Felder
- BYTE nOpt; // WW-Flags ( z.B.: vom User geaendert )
- BOOL bCodeNest:1; // Befehl rekursiv verwendet
- BOOL bResNest:1; // Befehl in Resultat eingefuegt
+ sal_uInt16 nId; // WW-Id fuer Felder
+ sal_uInt8 nOpt; // WW-Flags ( z.B.: vom User geaendert )
+ sal_Bool bCodeNest:1; // Befehl rekursiv verwendet
+ sal_Bool bResNest:1; // Befehl in Resultat eingefuegt
};
-BOOL WW8GetFieldPara( BYTE nVersion, WW8PLCFspecial& rPLCF, WW8FieldDesc& rF );
+sal_Bool WW8GetFieldPara( sal_uInt8 nVersion, WW8PLCFspecial& rPLCF, WW8FieldDesc& rF );
struct WW8PLCFxSave1
{
- ULONG nPLCFxPos;
- ULONG nPLCFxPos2; // fuer PLCF_Cp_Fkp: PieceIter-Pos
+ sal_uLong nPLCFxPos;
+ sal_uLong nPLCFxPos2; // fuer PLCF_Cp_Fkp: PieceIter-Pos
long nPLCFxMemOfs;
WW8_CP nAttrStart;
WW8_CP nAttrEnd;
- BOOL bLineEnd;
+ sal_Bool bLineEnd;
};
@@ -135,25 +135,25 @@ struct WW8PLCFxSave1
*/
class WW8PLCFspecial // Iterator fuer PLCFs
{
- INT32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
+ sal_uInt8* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
long nIMax; // Anzahl der Elemente
long nIdx; // Merker, wo wir gerade sind
long nStru;
public:
WW8PLCFspecial( SvStream* pSt, long nFilePos, long nPLCF,
- long nStruct, long nStartPos = -1, BOOL bNoEnd = FALSE );
+ long nStruct, long nStartPos = -1, sal_Bool bNoEnd = sal_False );
~WW8PLCFspecial(){ delete( pPLCF_PosArray ); pPLCF_PosArray = 0; }
- ULONG GetIdx() const { return (ULONG)nIdx; }
- void SetIdx( ULONG nI ) { nIdx = (long)nI; } // geht ueber Nummer
+ sal_uLong GetIdx() const { return (sal_uLong)nIdx; }
+ void SetIdx( sal_uLong nI ) { nIdx = (long)nI; } // geht ueber Nummer
long GetIMax(){ return nIMax; }
- BOOL SeekPos( long nPos ); // geht ueber FC- bzw. CP-Wert
+ sal_Bool SeekPos( long nPos ); // geht ueber FC- bzw. CP-Wert
// bzw. naechste groesseren Wert
- BOOL SeekPosExact( long nPos );
+ sal_Bool SeekPosExact( long nPos );
long Where() { return ( nIdx >= nIMax ) ? LONG_MAX : pPLCF_PosArray[nIdx]; }
- BOOL Get( long& rStart, void*& rpValue );
- BOOL GetData( long nIdx, long& rPos, void*& rpValue );
+ sal_Bool Get( long& rStart, void*& rpValue );
+ sal_Bool GetData( long nIdx, long& rPos, void*& rpValue );
const void* GetData( long nIdx ) const {
return ( nIdx >= nIMax ) ? 0 : (const void*)&pPLCF_Contents[nIdx * nStru]; }
@@ -173,26 +173,26 @@ public:
class WW8SprmIter
{
// these members will be updated
- BYTE* pSprms; // remaining part of the SPRMs ( == start of akt. SPRM)
- BYTE* pAktParams; // start of akt. SPRM's parameters
- USHORT nAktId;
+ sal_uInt8* pSprms; // remaining part of the SPRMs ( == start of akt. SPRM)
+ sal_uInt8* pAktParams; // start of akt. SPRM's parameters
+ sal_uInt16 nAktId;
short nAktSizeBrutto;
// these members will *not* be updated by UpdateMyMembers()
- BYTE nVersion;
- BYTE nDelta;
+ sal_uInt8 nVersion;
+ sal_uInt8 nDelta;
short nRemLen; // length of remaining SPRMs (including akt. SPRM)
void UpdateMyMembers();
public:
- WW8SprmIter( BYTE* pSprms_, short nLen_, BYTE nVersion_ );
- void SetSprms( BYTE* pSprms_, short nLen_ );
- BYTE* operator ++( int );
- BYTE* GetSprms() const { return ( pSprms && (0 < nRemLen) )
+ WW8SprmIter( sal_uInt8* pSprms_, short nLen_, sal_uInt8 nVersion_ );
+ void SetSprms( sal_uInt8* pSprms_, short nLen_ );
+ sal_uInt8* operator ++( int );
+ sal_uInt8* GetSprms() const { return ( pSprms && (0 < nRemLen) )
? pSprms
: 0; }
- BYTE* GetAktParams() const { return pAktParams; }
- USHORT GetAktId() const { return nAktId; }
+ sal_uInt8* GetAktParams() const { return pAktParams; }
+ sal_uInt16 GetAktId() const { return nAktId; }
};
@@ -202,8 +202,8 @@ public:
*/
class WW8PLCF // Iterator fuer PLCFs
{
- INT32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
+ sal_uInt8* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
long nIMax; // Anzahl der Elemente
long nIdx;
long nStru;
@@ -227,12 +227,12 @@ public:
long nStruct, long nStartPos, long nPN, long ncpN );
~WW8PLCF(){ delete( pPLCF_PosArray ); pPLCF_PosArray = 0; }
- ULONG GetIdx() const { return (ULONG)nIdx; }
- void SetIdx( ULONG nI ) { nIdx = (long)nI; }
+ sal_uLong GetIdx() const { return (sal_uLong)nIdx; }
+ void SetIdx( sal_uLong nI ) { nIdx = (long)nI; }
long GetIMax(){ return nIMax; }
- BOOL SeekPos( long nPos );
+ sal_Bool SeekPos( long nPos );
long Where();
- BOOL Get( long& rStart, long& rEnd, void*& rpValue );
+ sal_Bool Get( long& rStart, long& rEnd, void*& rpValue );
WW8PLCF& operator ++( int ) { if( nIdx < nIMax ) nIdx++; return *this; }
const void* GetData( long nIdx ) const {
@@ -240,7 +240,7 @@ public:
};
-DECLARE_TABLE( WW8Pcd_FC_sortArr, INT32 )
+DECLARE_TABLE( WW8Pcd_FC_sortArr, sal_Int32 )
/*
@@ -250,15 +250,15 @@ class WW8PLCFpcd
{
friend class WW8PLCFpcd_Iter;
WW8Pcd_FC_sortArr aFC_sort; // sorted PCD entries by FC
- INT32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
+ sal_uInt8* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
long nIMax;
long nStru;
public:
WW8PLCFpcd( SvStream* pSt, long nFilePos, long nPLCF, long nStruct );
~WW8PLCFpcd(){ delete( pPLCF_PosArray ); }
- ULONG FindIdx( WW8_FC nFC ) const;
+ sal_uLong FindIdx( WW8_FC nFC ) const;
};
/*
@@ -272,14 +272,14 @@ class WW8PLCFpcd_Iter
public:
WW8PLCFpcd_Iter( WW8PLCFpcd& rPLCFpcd, long nStartPos = -1 );
// ~WW8PLCFpcd_Iter() {}
- ULONG GetIdx() const { return (ULONG)nIdx; }
- void SetIdx( ULONG nI ) { nIdx = (long)nI; }
+ sal_uLong GetIdx() const { return (sal_uLong)nIdx; }
+ void SetIdx( sal_uLong nI ) { nIdx = (long)nI; }
long GetIMax(){ return rPLCF.nIMax; }
- BOOL SeekPos( long nPos );
-// BOOL SeekMaxMainFC( WW8Fib& rWwF, long& rMaxPosData );
+ sal_Bool SeekPos( long nPos );
+// sal_Bool SeekMaxMainFC( WW8Fib& rWwF, long& rMaxPosData );
long Where();
- BOOL Get( long& rStart, long& rEnd, void*& rpValue );
- ULONG FindIdx( WW8_FC nFC ) const { return rPLCF.FindIdx( nFC ); }
+ sal_Bool Get( long& rStart, long& rEnd, void*& rpValue );
+ sal_uLong FindIdx( WW8_FC nFC ) const { return rPLCF.FindIdx( nFC ); }
WW8PLCFpcd_Iter& operator ++( int ) { if( nIdx < rPLCF.nIMax ) nIdx++; return *this; }
};
@@ -291,28 +291,28 @@ enum ePLCFT{ CHP=0, PAP, SEP, /*HED, FNR, ENR,*/ PLCF_END };
*/
class WW8PLCFx // virtueller Iterator fuer Piece Table Exceptions
{
- BYTE nVersion; // Versionsnummer des FIB
- BOOL bIsSprm; // PLCF von Sprms oder von anderem ( Footnote, ... )
+ sal_uInt8 nVersion; // Versionsnummer des FIB
+ sal_Bool bIsSprm; // PLCF von Sprms oder von anderem ( Footnote, ... )
public:
- WW8PLCFx( BYTE nFibVersion, BOOL bSprm )
+ WW8PLCFx( sal_uInt8 nFibVersion, sal_Bool bSprm )
{ bIsSprm = bSprm; nVersion = nFibVersion; }
virtual ~WW8PLCFx() {}
- BOOL IsSprm() { return bIsSprm; }
- virtual ULONG GetIdx() const = 0;
- virtual void SetIdx( ULONG nIdx ) = 0;
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
- virtual BOOL SeekPos( WW8_CP nCpPos ) = 0;
+ sal_Bool IsSprm() { return bIsSprm; }
+ virtual sal_uLong GetIdx() const = 0;
+ virtual void SetIdx( sal_uLong nIdx ) = 0;
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
+ virtual sal_Bool SeekPos( WW8_CP nCpPos ) = 0;
virtual long Where() = 0;
-// virtual BYTE* GetSprms( long& rStart, long& rEnd, long& rLen );
+// virtual sal_uInt8* GetSprms( long& rStart, long& rEnd, long& rLen );
virtual void GetSprms( WW8PLCFxDesc* p );
virtual long GetNoSprms( long& rStart, long&, long& rLen );
virtual WW8PLCFx& operator ++( int ) = 0;
- virtual USHORT GetIstd() const { return 0xffff; }
+ virtual sal_uInt16 GetIstd() const { return 0xffff; }
virtual void Save( WW8PLCFxSave1& rSave ) const;
virtual void Restore( const WW8PLCFxSave1& rSave );
- BYTE GetVersion() const { return nVersion; }
+ sal_uInt8 GetVersion() const { return nVersion; }
};
enum eCutT { CUT_NONE = 0, CUT_START, CUT_END, CUT_BOTH };
@@ -321,17 +321,17 @@ class WW8PLCFx_PCDAttrs : public WW8PLCFx
{
WW8PLCFpcd_Iter* pPcdI;
WW8PLCFx_PCD* pPcd;
- BYTE** pGrpprls; // Attribute an Piece-Table
+ sal_uInt8** pGrpprls; // Attribute an Piece-Table
SVBT32 aShortSprm; // mini storage: can contain ONE sprm with
// 1 byte param
- UINT16 nGrpprls; // Attribut Anzahl davon
+ sal_uInt16 nGrpprls; // Attribut Anzahl davon
public:
- WW8PLCFx_PCDAttrs( BYTE nVersion, WW8PLCFx_PCD* pPLCFx_PCD, WW8ScannerBase* pBase );
+ WW8PLCFx_PCDAttrs( sal_uInt8 nVersion, WW8PLCFx_PCD* pPLCFx_PCD, WW8ScannerBase* pBase );
virtual ~WW8PLCFx_PCDAttrs();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
- virtual BOOL SeekPos( WW8_CP nCpPos );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
+ virtual sal_Bool SeekPos( WW8_CP nCpPos );
virtual long Where();
virtual void GetSprms( WW8PLCFxDesc* p );
virtual WW8PLCFx& operator ++( int );
@@ -342,15 +342,15 @@ public:
class WW8PLCFx_PCD : public WW8PLCFx // Iterator fuer Piece Table
{
WW8PLCFpcd_Iter* pPcdI;
- BOOL bVer67;
+ sal_Bool bVer67;
public:
- WW8PLCFx_PCD( BYTE nVersion, WW8PLCFpcd* pPLCFpcd, WW8_CP nStartCp, BOOL bVer67P );
+ WW8PLCFx_PCD( sal_uInt8 nVersion, WW8PLCFpcd* pPLCFpcd, WW8_CP nStartCp, sal_Bool bVer67P );
virtual ~WW8PLCFx_PCD();
- virtual ULONG GetIMax() const;
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
- virtual BOOL SeekPos( WW8_CP nCpPos );
+ virtual sal_uLong GetIMax() const;
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
+ virtual sal_Bool SeekPos( WW8_CP nCpPos );
virtual long Where();
// virtual void GetSprms( WW8PLCFxDesc* p );
virtual long GetNoSprms( long& rStart, long&, long& rLen );
@@ -360,14 +360,14 @@ public:
eCutT AktPieceFc2Cp( long& rStartPos, long& rEndPos );
WW8PLCFpcd_Iter* GetPLCFIter() { return pPcdI; }
- static INT32 TransformPieceAddress(long nfc, BOOL& bIsUnicodeAddress)
+ static sal_Int32 TransformPieceAddress(long nfc, sal_Bool& bIsUnicodeAddress)
{
bIsUnicodeAddress = 0 == (0x40000000 & nfc);
return bIsUnicodeAddress
? nfc
: (nfc & 0x3fffFFFF) / 2;
}
- BOOL IsVersion67() const { return bVer67; }
+ sal_Bool IsVersion67() const { return bVer67; }
};
@@ -381,54 +381,54 @@ class WW8PLCFx_Fc_FKP : public WW8PLCFx // Iterator fuer Piece Table Excepti
{
struct WW8Grpprl
{
- BYTE* pData;
- USHORT nLen;
- USHORT nIStd; // nur bei Fkp.Papx gueltig (aktuelle Style-Nr)
- BOOL bMustDelete;
+ sal_uInt8* pData;
+ sal_uInt16 nLen;
+ sal_uInt16 nIStd; // nur bei Fkp.Papx gueltig (aktuelle Style-Nr)
+ sal_Bool bMustDelete;
};
WW8Grpprl* pGrpprl; // Pointer of Meta Array (pointing
- BYTE* pFkp; // gesamter Fkp
+ sal_uInt8* pFkp; // gesamter Fkp
long nItemSize; // entweder 1 Byte oder ein komplettes BX
long nFilePos; // Offset in Stream where last read of 52 bytes took place
short nIdx; // Pos-Merker
ePLCFT ePLCF;
- BYTE nIMax; // Anzahl der Eintraege
- BYTE nVersion;
+ sal_uInt8 nIMax; // Anzahl der Eintraege
+ sal_uInt8 nVersion;
public:
- WW8Fkp( BYTE nFibVer, SvStream* pFKPStrm, SvStream* pDataStrm,
+ WW8Fkp( sal_uInt8 nFibVer, SvStream* pFKPStrm, SvStream* pDataStrm,
long _nFilePos, long nItemSiz,
ePLCFT ePl, WW8_FC nStartFc = -1 );
~WW8Fkp();
long GetFilePos() const { return nFilePos; }
- ULONG GetIdx() const { return (ULONG)nIdx; }
- void SetIdx( ULONG nI );
- BOOL SeekPos( long nPos );
+ sal_uLong GetIdx() const { return (sal_uLong)nIdx; }
+ void SetIdx( sal_uLong nI );
+ sal_Bool SeekPos( long nPos );
WW8_FC Where() { return ( nIdx<nIMax)
? ((WW8_FC*)pFkp)[nIdx]
: LONG_MAX; }
WW8Fkp& operator ++( int ) { if( nIdx < nIMax ) nIdx++;
return *this; }
- BYTE* Get( WW8_FC& rStart, WW8_FC& rEnd, short& rLen );
- USHORT GetIstd() const { return pGrpprl[ nIdx ].nIStd; }
+ sal_uInt8* Get( WW8_FC& rStart, WW8_FC& rEnd, short& rLen );
+ sal_uInt16 GetIstd() const { return pGrpprl[ nIdx ].nIStd; }
/*
liefert einen echten Pointer auf das Sprm vom Typ nId,
falls ein solches im Fkp drin ist.
*/
- BYTE* GetLenAndIStdAndSprms(short& rLen);
+ sal_uInt8* GetLenAndIStdAndSprms(short& rLen);
/*
ruft GetLenAndIStdAndSprms() auf...
*/
- BYTE* HasSprm( USHORT nId );
+ sal_uInt8* HasSprm( sal_uInt16 nId );
- ULONG GetParaHeight() const; // fuer Header/Footer bei Papx-Fkps
+ sal_uLong GetParaHeight() const; // fuer Header/Footer bei Papx-Fkps
- BYTE GetVersion() const { return nVersion; }
+ sal_uInt8 GetVersion() const { return nVersion; }
};
@@ -439,7 +439,7 @@ class WW8PLCFx_Fc_FKP : public WW8PLCFx // Iterator fuer Piece Table Excepti
WW8Fkp* pFkp;
WW8_FC nStartFc;
- BOOL NewFkp();
+ sal_Bool NewFkp();
protected:
ePLCFT ePLCF;
@@ -449,17 +449,17 @@ public:
WW8Fib& rFib, ePLCFT ePl, WW8_FC nStartFcL,
WW8PLCFx_PCDAttrs* pPLCFx_PCD );
virtual ~WW8PLCFx_Fc_FKP();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
- virtual BOOL SeekPos( WW8_FC nFcPos );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
+ virtual sal_Bool SeekPos( WW8_FC nFcPos );
virtual WW8_FC Where();
- BYTE* GetSprms( WW8_FC& rStart, WW8_FC& rEnd, long& rLen );
+ sal_uInt8* GetSprms( WW8_FC& rStart, WW8_FC& rEnd, long& rLen );
virtual WW8PLCFx& operator ++( int );
- virtual USHORT GetIstd() const;
+ virtual sal_uInt16 GetIstd() const;
void GetPCDSprms( WW8PLCFxDesc& rDesc );
- BYTE* HasSprm( USHORT nId );
- ULONG GetParaHeight() const;
- BOOL HasFkp() { return (0 != pFkp); }
+ sal_uInt8* HasSprm( sal_uInt16 nId );
+ sal_uLong GetParaHeight() const;
+ sal_Bool HasFkp() { return (0 != pFkp); }
};
// Iterator fuer Piece Table Exceptions of Fkps arbeitet auf CPs (High-Level)
@@ -468,8 +468,8 @@ class WW8PLCFx_Cp_FKP : public WW8PLCFx_Fc_FKP
const WW8ScannerBase& rSBase;
WW8PLCFx_PCD* pPcd;
WW8_CP nAttrStart, nAttrEnd;
- BOOL bLineEnd : 1;
- BOOL bComplex : 1;
+ sal_Bool bLineEnd : 1;
+ sal_Bool bComplex : 1;
void SearchParaEnd( long nOldEndCp );
@@ -478,12 +478,12 @@ public:
rBase, ePLCFT ePl );
virtual ~WW8PLCFx_Cp_FKP();
void ResetAttrStartEnd();
- ULONG GetPCDIMax() const;
- ULONG GetPCDIdx() const;
- void SetPCDIdx( ULONG nIdx );
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
- virtual BOOL SeekPos( WW8_CP nCpPos );
+ sal_uLong GetPCDIMax() const;
+ sal_uLong GetPCDIdx() const;
+ void SetPCDIdx( sal_uLong nIdx );
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
+ virtual sal_Bool SeekPos( WW8_CP nCpPos );
virtual WW8_CP Where();
virtual void GetSprms( WW8PLCFxDesc* p );
virtual WW8PLCFx& operator ++( int );
@@ -497,26 +497,26 @@ class WW8PLCFx_SEPX : public WW8PLCFx // Iterator fuer Piece Table Exc
{
SvStream* pStrm;
WW8PLCF* pPLCF;
- BYTE* pSprms;
- USHORT nArrMax;
- UINT16 nSprmSiz;
+ sal_uInt8* pSprms;
+ sal_uInt16 nArrMax;
+ sal_uInt16 nSprmSiz;
public:
WW8PLCFx_SEPX( SvStream* pSt, SvStream* pTblxySt, WW8Fib& rFib, WW8_CP nStartCp );
virtual ~WW8PLCFx_SEPX();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
long GetIMax() const { return ( pPLCF ) ? pPLCF->GetIMax() : 0; }
- virtual BOOL SeekPos( WW8_CP nCpPos );
+ virtual sal_Bool SeekPos( WW8_CP nCpPos );
virtual long Where();
virtual void GetSprms( WW8PLCFxDesc* p );
virtual WW8PLCFx& operator ++( int );
- BYTE* HasSprm( USHORT nId ) const;
- BYTE* HasSprm( USHORT nId, BYTE n2nd ) const;
- BYTE* HasSprm( USHORT nId, BYTE* pOtherSprms, long nOtherSprmSiz ) const;
- BOOL Find4Sprms(USHORT nId1, USHORT nId2, USHORT nId3, USHORT nId4,
- BYTE*& p1, BYTE*& p2, BYTE*& p3, BYTE*& p4 ) const;
- BOOL CompareSprms( BYTE* pOtherSprms,
+ sal_uInt8* HasSprm( sal_uInt16 nId ) const;
+ sal_uInt8* HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const;
+ sal_uInt8* HasSprm( sal_uInt16 nId, sal_uInt8* pOtherSprms, long nOtherSprmSiz ) const;
+ sal_Bool Find4Sprms(sal_uInt16 nId1, sal_uInt16 nId2, sal_uInt16 nId3, sal_uInt16 nId4,
+ sal_uInt8*& p1, sal_uInt8*& p2, sal_uInt8*& p3, sal_uInt8*& p4 ) const;
+ sal_Bool CompareSprms( sal_uInt8* pOtherSprms,
long nOtherSprmSiz,
const SvUShortsSort* pIgnoreSprms = 0 ) const;
};
@@ -528,13 +528,13 @@ class WW8PLCFx_SubDoc : public WW8PLCFx
WW8PLCF* pTxt;
public:
- WW8PLCFx_SubDoc( SvStream* pSt, BYTE nVersion, WW8_CP nStartCp,
+ WW8PLCFx_SubDoc( SvStream* pSt, sal_uInt8 nVersion, WW8_CP nStartCp,
long nFcRef, long nLenRef,
long nFcTxt, long nLenTxt, long nStruc = 0 );
virtual ~WW8PLCFx_SubDoc();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
- virtual BOOL SeekPos( WW8_CP nCpPos );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
+ virtual sal_Bool SeekPos( WW8_CP nCpPos );
virtual long Where();
// liefert Reference Descriptoren
@@ -547,7 +547,7 @@ public:
/*
liefert Angabe, wo Kopf und Fusszeilen-Text zu finden ist
*/
- BOOL Get( long& rStart, void*& rpValue );
+ sal_Bool Get( long& rStart, void*& rpValue );
virtual long GetNoSprms( long& rStart, long&, long& rLen );
virtual WW8PLCFx& operator ++( int );
long Count() { return ( pRef ) ? pRef->GetIMax() : 0; }
@@ -561,13 +561,13 @@ class WW8PLCFx_FLD : public WW8PLCFx // Iterator fuer Fuss- und Endno
public:
WW8PLCFx_FLD( SvStream* pSt, WW8Fib& rMyFib, short nType, WW8_CP nStartCp );
virtual ~WW8PLCFx_FLD();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
- virtual BOOL SeekPos( WW8_CP nCpPos );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
+ virtual sal_Bool SeekPos( WW8_CP nCpPos );
virtual long Where();
virtual long GetNoSprms( long& rStart, long&, long& rLen );
virtual WW8PLCFx& operator ++( int );
- BOOL GetPara( long nIdx, WW8FieldDesc& rF );
+ sal_Bool GetPara( long nIdx, WW8FieldDesc& rF );
};
enum eBookStatus { BOOK_NORMAL = 0, BOOK_IGNORE = 0x1, BOOK_ONLY_REF = 0x2 };
@@ -578,16 +578,16 @@ class WW8PLCFx_Book : public WW8PLCFx // Iterator fuer Booknotes
SvStrings aBookNames; // Name
eBookStatus* pStatus;
long nIMax; // Anzahl der Booknotes
- USHORT nIsEnd;
+ sal_uInt16 nIsEnd;
public:
WW8PLCFx_Book( SvStream* pSt, SvStream* pTblSt, WW8Fib& rFib, WW8_CP nStartCp );
virtual ~WW8PLCFx_Book();
long GetIMax(){ return nIMax; }
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
- virtual BOOL SeekPos( WW8_CP nCpPos );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
+ virtual sal_Bool SeekPos( WW8_CP nCpPos );
virtual long Where();
virtual long GetNoSprms( long& rStart, long& rEnd, long& rLen );
virtual WW8PLCFx& operator ++( int );
@@ -599,9 +599,9 @@ public:
WW8_CP GetStartPos() const
{ return ( nIsEnd ) ? LONG_MAX : pBook[0]->Where(); }
long GetLen() const;
- BOOL GetIsEnd() const { return ( nIsEnd ) ? TRUE : FALSE; }
+ sal_Bool GetIsEnd() const { return ( nIsEnd ) ? sal_True : sal_False; }
long GetHandle() const;
- BOOL SetStatus( WW8_CP nStartRegion, WW8_CP nEndRegion, const String& rName,
+ sal_Bool SetStatus( WW8_CP nStartRegion, WW8_CP nEndRegion, const String& rName,
eBookStatus eStat );
eBookStatus GetStatus() const;
};
@@ -615,11 +615,11 @@ struct WW8PLCFManResult
long nMemLen; // Laenge dazu
long nCp2OrIdx; // footnote-textpos oder Index in PLCF
WW8_CP nAktCp; // wird nur vom Aufrufer benutzt
- BYTE* pMemPos; // Mem-Pos fuer Sprms
- USHORT nSprmId; // Sprm-Id ( 0 = ungueltige Id -> ueberspringen! )
+ sal_uInt8* pMemPos; // Mem-Pos fuer Sprms
+ sal_uInt16 nSprmId; // Sprm-Id ( 0 = ungueltige Id -> ueberspringen! )
// (2..255) oder Pseudo-Sprm-Id (256..260)
// bzw. ab Winword-Ver8 die Sprm-Id (800..)
- BYTE nFlags; // Absatz- oder Section-Anfang
+ sal_uInt8 nFlags; // Absatz- oder Section-Anfang
};
#define MAN_ANZ_PLCF 12
@@ -648,14 +648,14 @@ struct WW8PLCFxDesc
{
WW8PLCFx* pPLCFx;
UShortStk* pIdStk;// Speicher fuer Attr-Id fuer Attr-Ende(n)
- BYTE* pMemPos; // wo liegen die Sprm(s)
+ sal_uInt8* pMemPos; // wo liegen die Sprm(s)
long nStartPos;
long nEndPos;
long nCp2OrIdx; // wo liegen die NoSprm(s)
long nSprmsLen; // wie viele Bytes fuer weitere Sprms / Laenge Fussnote
long nCpOfs; // fuer Offset Header .. Footnote
- BOOL bFirstSprm; // fuer Erkennung erster Sprm einer Gruppe
- BOOL bRealLineEnd; // FALSE bei Pap-Piece-Ende
+ sal_Bool bFirstSprm; // fuer Erkennung erster Sprm einer Gruppe
+ sal_Bool bRealLineEnd; // sal_False bei Pap-Piece-Ende
void Save( WW8PLCFxSave1& rSave ) const;
void Restore( const WW8PLCFxSave1& rSave );
};
@@ -669,7 +669,7 @@ class WW8PLCFMan
long nLineEnd; // zeigt *hinter* das <CR>
long nLastWhereIdxCp; // last result of WhereIdx()
- USHORT nPLCF; // so viele PLCFe werden verwaltet
+ sal_uInt16 nPLCF; // so viele PLCFe werden verwaltet
short nManType;
WW8PLCFxDesc aD[MAN_ANZ_PLCF];
@@ -679,10 +679,10 @@ class WW8PLCFMan
WW8PLCFspecial *pFdoa, *pTxbx, *pTxbxBkd;
WW8Fib* pWwFib;
- USHORT* pNoAttrScan; // Attribute komplett(!) ignorieren, die ueber n CPs
+ sal_uInt16* pNoAttrScan; // Attribute komplett(!) ignorieren, die ueber n CPs
// aufgespannt sind; z.B. bei Char #7 (Zellen-/Zeilenende)
- short WhereIdx( BOOL* pbStart, long* pPos );
+ short WhereIdx( sal_Bool* pbStart, long* pPos );
void AdjustEnds( WW8PLCFxDesc& rDesc );
void GetNewSprms( WW8PLCFxDesc& rDesc );
void GetNewNoSprms( WW8PLCFxDesc& rDesc );
@@ -690,8 +690,8 @@ class WW8PLCFMan
void GetSprmEnd( short nIdx, WW8PLCFManResult* pRes );
void GetNoSprmStart( short nIdx, WW8PLCFManResult* pRes );
void GetNoSprmEnd( short nIdx, WW8PLCFManResult* pRes );
- void AdvSprm( short nIdx, BOOL bStart );
- void AdvNoSprm( short nIdx, BOOL bStart );
+ void AdvSprm( short nIdx, sal_Bool bStart );
+ void AdvNoSprm( short nIdx, sal_Bool bStart );
public:
WW8PLCFMan( WW8ScannerBase* pBase, short nType, long nStartCp );
@@ -703,9 +703,9 @@ public:
*/
long Where();
- BOOL Get( WW8PLCFManResult* pResult );
+ sal_Bool Get( WW8PLCFManResult* pResult );
WW8PLCFMan& operator ++( int );
- USHORT GetColl() const; // liefert aktuellen Style
+ sal_uInt16 GetColl() const; // liefert aktuellen Style
WW8PLCFx_FLD* GetFld() const;
WW8PLCFx_SubDoc* GetEdn() const { return (WW8PLCFx_SubDoc*)pEdn->pPLCFx; }
WW8PLCFx_SubDoc* GetFtn() const { return (WW8PLCFx_SubDoc*)pFtn->pPLCFx; }
@@ -716,12 +716,12 @@ public:
/*
fragt, ob *aktueller Absatz* einen Sprm diesen Typs hat
*/
- BYTE* HasParaSprm( USHORT nId ) const;
+ sal_uInt8* HasParaSprm( sal_uInt16 nId ) const;
/*
fragt, ob *aktueller Textrun* einen Sprm diesen Typs hat
*/
- BYTE* HasCharSprm( USHORT nId ) const;
+ sal_uInt8* HasCharSprm( sal_uInt16 nId ) const;
WW8PLCFx_Cp_FKP* GetChpPLCF(){ return (WW8PLCFx_Cp_FKP*)pChp->pPLCFx; }
WW8PLCFx_Cp_FKP* GetPapPLCF(){ return (WW8PLCFx_Cp_FKP*)pPap->pPLCFx; }
@@ -740,7 +740,7 @@ public:
class WW8ScannerBase
{
-friend WW8PLCFx_PCDAttrs::WW8PLCFx_PCDAttrs( BYTE nVersion, WW8PLCFx_PCD* pPLCFx_PCD, WW8ScannerBase* pBase );
+friend WW8PLCFx_PCDAttrs::WW8PLCFx_PCDAttrs( sal_uInt8 nVersion, WW8PLCFx_PCD* pPLCFx_PCD, WW8ScannerBase* pBase );
friend WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP( SvStream*, SvStream*, SvStream*,
const WW8ScannerBase&, ePLCFT );
@@ -779,9 +779,9 @@ friend class SwWw8ImplReader;
WW8PLCFpcd_Iter* pPieceIter; // fuer FastSave ( Iterator dazu )
WW8PLCFx_PCD* pPLCFx_PCD; // dito
WW8PLCFx_PCDAttrs* pPLCFx_PCDAttrs;
- BYTE** pPieceGrpprls; // Attribute an Piece-Table
- UINT16 nPieceGrpprls; // Anzahl davon
- USHORT nNoAttrScan; // Attribute komplett(!) ignorieren, die ueber n CPs
+ sal_uInt8** pPieceGrpprls; // Attribute an Piece-Table
+ sal_uInt16 nPieceGrpprls; // Anzahl davon
+ sal_uInt16 nNoAttrScan; // Attribute komplett(!) ignorieren, die ueber n CPs
// aufgespannt sind; z.B. bei Char #7 (Zellen-/Zeilenende)
WW8PLCFpcd* OpenPieceTable( SvStream* pStr, WW8Fib* pWwF );
@@ -791,16 +791,16 @@ public:
WW8ScannerBase( SvStream* pSt, SvStream* pTblSt, SvStream* pDataSt,
WW8Fib* pWwF );
~WW8ScannerBase();
- BOOL AreThereFootnotes() { return pFtnPLCF->Count() > 0; };
- BOOL AreThereEndnotes() { return pEdnPLCF->Count() > 0; };
+ sal_Bool AreThereFootnotes() { return pFtnPLCF->Count() > 0; };
+ sal_Bool AreThereEndnotes() { return pEdnPLCF->Count() > 0; };
static DateTime WW8DTTM2DateTime(long lDTTM);
WW8_CP WW8Fc2Cp( WW8_FC nFcPos ) const ;
- WW8_FC WW8Cp2Fc( WW8_CP nCpPos, BOOL* pIsUnicode = 0,
- WW8_CP* pNextPieceCp = 0, BOOL* pTestFlag = 0 ) const;
- void SetNoAttrScan( USHORT nValue ) { nNoAttrScan = nValue; };
+ WW8_FC WW8Cp2Fc( WW8_CP nCpPos, sal_Bool* pIsUnicode = 0,
+ WW8_CP* pNextPieceCp = 0, sal_Bool* pTestFlag = 0 ) const;
+ void SetNoAttrScan( sal_uInt16 nValue ) { nNoAttrScan = nValue; };
- USHORT WW8ReadString( SvStream& rStrm, String& rStr,
+ sal_uInt16 WW8ReadString( SvStream& rStrm, String& rStr,
WW8_CP nAktStartCp, long nTotalLen,
rtl_TextEncoding eEnc ) const;
};
@@ -816,84 +816,84 @@ public:
von uns verlangte Programm-Version:
in Ctor wird geprueft, ob sie zu nFib passt
*/
- BYTE nVersion; // 6 steht fuer "WinWord 6 oder WinWord 95",
+ sal_uInt8 nVersion; // 6 steht fuer "WinWord 6 oder WinWord 95",
// 7 steht fuer "nur WinWord 95"
// 8 steht fuer "nur WinWord 97"
/*
Fehlerstatus
*/
- ULONG nFibError;
+ sal_uLong nFibError;
/*
vom Ctor aus dem FIB gelesene Daten
(entspricht nur ungefaehr der tatsaechlichen Struktur
des Winword-FIB)
*/
- UINT16 wIdent; // 0x0 int magic number
- UINT16 nFib; // 0x2 FIB version written
- UINT16 nProduct; // 0x4 product version written by
- INT16 lid; // 0x6 language stamp---localized version;
+ sal_uInt16 wIdent; // 0x0 int magic number
+ sal_uInt16 nFib; // 0x2 FIB version written
+ sal_uInt16 nProduct; // 0x4 product version written by
+ sal_Int16 lid; // 0x6 language stamp---localized version;
WW8_PN pnNext; // 0x8
- UINT16 fDot :1; // 0xa 0001
- UINT16 fGlsy :1;
- UINT16 fComplex :1; // 0004 when 1, file is in complex, fast-saved format.
- UINT16 fHasPic :1; // 0008 file contains 1 or more pictures
- UINT16 cQuickSaves :4; // 00F0 count of times file was quicksaved
- UINT16 fEncrypted :1; //0100 1 if file is encrypted, 0 if not
- UINT16 fWhichTblStm :1; //0200 When 0, this fib refers to the table stream
+ sal_uInt16 fDot :1; // 0xa 0001
+ sal_uInt16 fGlsy :1;
+ sal_uInt16 fComplex :1; // 0004 when 1, file is in complex, fast-saved format.
+ sal_uInt16 fHasPic :1; // 0008 file contains 1 or more pictures
+ sal_uInt16 cQuickSaves :4; // 00F0 count of times file was quicksaved
+ sal_uInt16 fEncrypted :1; //0100 1 if file is encrypted, 0 if not
+ sal_uInt16 fWhichTblStm :1; //0200 When 0, this fib refers to the table stream
// named "0Table", when 1, this fib refers to the
// table stream named "1Table". Normally, a file
// will have only one table stream, but under unusual
// circumstances a file may have table streams with
// both names. In that case, this flag must be used
// to decide which table stream is valid.
- // UINT16 u1 :2;
- UINT16 fExtChar :1; // 1000 =1, when using extended character set in file
- // UINT16 u2 :3;
-
- UINT16 nFibBack; // 0xc
- INT16 lKey1; // 0xe file encrypted key, only valid if fEncrypted.
- INT16 lKey2; // 0x10 key in 2 Portionen wg. Misalignment
- UINT8 envr; // 0x12 environment in which file was created
+ // sal_uInt16 u1 :2;
+ sal_uInt16 fExtChar :1; // 1000 =1, when using extended character set in file
+ // sal_uInt16 u2 :3;
+
+ sal_uInt16 nFibBack; // 0xc
+ sal_Int16 lKey1; // 0xe file encrypted key, only valid if fEncrypted.
+ sal_Int16 lKey2; // 0x10 key in 2 Portionen wg. Misalignment
+ sal_uInt8 envr; // 0x12 environment in which file was created
// 0 created by Win Word / 1 created by Mac Word
- BYTE fMac :1; // 0x13 when 1, this file was last saved in the Mac environment
- BYTE fEmptySpecial :1;
- BYTE fLoadOverridePage :1;
- BYTE fFuturesavedUndo :1;
- BYTE fWord97Saved :1;
- BYTE :3;
-
- UINT16 chse; // 0x14 default extended character set id for text in document stream. (overidden by chp.chse)
+ sal_uInt8 fMac :1; // 0x13 when 1, this file was last saved in the Mac environment
+ sal_uInt8 fEmptySpecial :1;
+ sal_uInt8 fLoadOverridePage :1;
+ sal_uInt8 fFuturesavedUndo :1;
+ sal_uInt8 fWord97Saved :1;
+ sal_uInt8 :3;
+
+ sal_uInt16 chse; // 0x14 default extended character set id for text in document stream. (overidden by chp.chse)
// 0 = ANSI / 256 Macintosh character set.
- UINT16 chseTables; // 0x16 default extended character set id for text in
+ sal_uInt16 chseTables; // 0x16 default extended character set id for text in
// internal data structures: 0 = ANSI, 256 = Macintosh
WW8_FC fcMin; // 0x18 file offset of first character of text
WW8_FC fcMac; // 0x1c file offset of last character of text + 1
// Einschub fuer WW8 *****************************************************
- UINT16 csw; // Count of fields in the array of "shorts"
+ sal_uInt16 csw; // Count of fields in the array of "shorts"
// Marke: "rgsw" Beginning of the array of shorts
- UINT16 wMagicCreated; // unique number Identifying the File's creator
+ sal_uInt16 wMagicCreated; // unique number Identifying the File's creator
// 0x6A62 is the creator ID for Word and is reserved.
// Other creators should choose a different value.
- UINT16 wMagicRevised; // identifies the File's last modifier
- UINT16 wMagicCreatedPrivate; // private data
- UINT16 wMagicRevisedPrivate; // private data
+ sal_uInt16 wMagicRevised; // identifies the File's last modifier
+ sal_uInt16 wMagicCreatedPrivate; // private data
+ sal_uInt16 wMagicRevisedPrivate; // private data
/*
- INT16 pnFbpChpFirst_W6; // not used
- INT16 pnChpFirst_W6; // not used
- INT16 cpnBteChp_W6; // not used
- INT16 pnFbpPapFirst_W6; // not used
- INT16 pnPapFirst_W6; // not used
- INT16 cpnBtePap_W6; // not used
- INT16 pnFbpLvcFirst_W6; // not used
- INT16 pnLvcFirst_W6; // not used
- INT16 cpnBteLvc_W6; // not used
+ sal_Int16 pnFbpChpFirst_W6; // not used
+ sal_Int16 pnChpFirst_W6; // not used
+ sal_Int16 cpnBteChp_W6; // not used
+ sal_Int16 pnFbpPapFirst_W6; // not used
+ sal_Int16 pnPapFirst_W6; // not used
+ sal_Int16 cpnBtePap_W6; // not used
+ sal_Int16 pnFbpLvcFirst_W6; // not used
+ sal_Int16 pnLvcFirst_W6; // not used
+ sal_Int16 cpnBteLvc_W6; // not used
*/
- INT16 lidFE; // Language id if document was written by Far East version
+ sal_Int16 lidFE; // Language id if document was written by Far East version
// of Word (i.e. FIB.fFarEast is on)
- UINT16 clw; // Number of fields in the array of longs
+ sal_uInt16 clw; // Number of fields in the array of longs
// Ende des Einschubs fuer WW8 *******************************************
@@ -911,7 +911,7 @@ public:
WW8_CP ccpHdrTxbx; // 0x50 length of header textbox subdocument text stream
// Einschub fuer WW8 *****************************************************
- INT32 pnFbpChpFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpChpFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written
// to the file in a linked list of 512-byte pieces
// starting with this pn.
@@ -919,13 +919,13 @@ public:
// folgende Felder existieren zwar so in der Datei,
// wir benutzen jedoch unten deklarierte General-Variablen
// fuer Ver67 und Ver8 gemeinsam.
- INT32 pnChpFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnChpFirst; // the page number of the lowest numbered page in the
// document that records CHPX FKP information
- INT32 cpnBteChp; // count of CHPX FKPs recorded in file. In non-complex
+ sal_Int32 cpnBteChp; // count of CHPX FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbteChpx
// is less than this, the PLCFbteChpx is incomplete.
*/
- INT32 pnFbpPapFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpPapFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written to
// the file in a linked list of 512-byte pieces
// starting with this pn
@@ -933,24 +933,24 @@ public:
// folgende Felder existieren zwar so in der Datei,
// wir benutzen jedoch unten deklarierte General-Variablen
// fuer Ver67 und Ver8 gemeinsam.
- INT32 pnPapFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnPapFirst; // the page number of the lowest numbered page in the
// document that records PAPX FKP information
- INT32 cpnBtePap; // count of PAPX FKPs recorded in file. In non-complex
+ sal_Int32 cpnBtePap; // count of PAPX FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbtePapx is
// less than this, the PLCFbtePapx is incomplete.
*/
- INT32 pnFbpLvcFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpLvcFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written to
// the file in a linked list of 512-byte pieces
// starting with this pn
- INT32 pnLvcFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnLvcFirst; // the page number of the lowest numbered page in the
// document that records LVC FKP information
- INT32 cpnBteLvc; // count of LVC FKPs recorded in file. In non-complex
+ sal_Int32 cpnBteLvc; // count of LVC FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbtePapx is
// less than this, the PLCFbtePapx is incomplete.
- INT32 fcIslandFirst; // ?
- INT32 fcIslandLim; // ?
- UINT16 cfclcb; // Number of fields in the array of FC/LCB pairs.
+ sal_Int32 fcIslandFirst; // ?
+ sal_Int32 fcIslandLim; // ?
+ sal_uInt16 cfclcb; // Number of fields in the array of FC/LCB pairs.
// Ende des Einschubs fuer WW8 *******************************************
@@ -958,133 +958,133 @@ public:
WW8_FC fcStshfOrig; // file offset of original allocation for STSH in table
// stream. During fast save Word will attempt to reuse
// this allocation if STSH is small enough to fit.
- INT32 lcbStshfOrig; // 0x5c count of bytes of original STSH allocation
+ sal_Int32 lcbStshfOrig; // 0x5c count of bytes of original STSH allocation
WW8_FC fcStshf; // 0x60 file offset of STSH in file.
- INT32 lcbStshf; // 0x64 count of bytes of current STSH allocation
+ sal_Int32 lcbStshf; // 0x64 count of bytes of current STSH allocation
WW8_FC fcPlcffndRef; // 0x68 file offset of footnote reference PLCF.
- INT32 lcbPlcffndRef; // 0x6c count of bytes of footnote reference PLCF
+ sal_Int32 lcbPlcffndRef; // 0x6c count of bytes of footnote reference PLCF
// == 0 if no footnotes defined in document.
WW8_FC fcPlcffndTxt; // 0x70 file offset of footnote text PLCF.
- INT32 lcbPlcffndTxt; // 0x74 count of bytes of footnote text PLCF.
+ sal_Int32 lcbPlcffndTxt; // 0x74 count of bytes of footnote text PLCF.
// == 0 if no footnotes defined in document
WW8_FC fcPlcfandRef; // 0x78 file offset of annotation reference PLCF.
- INT32 lcbPlcfandRef; // 0x7c count of bytes of annotation reference PLCF.
+ sal_Int32 lcbPlcfandRef; // 0x7c count of bytes of annotation reference PLCF.
WW8_FC fcPlcfandTxt; // 0x80 file offset of annotation text PLCF.
- INT32 lcbPlcfandTxt; // 0x84 count of bytes of the annotation text PLCF
+ sal_Int32 lcbPlcfandTxt; // 0x84 count of bytes of the annotation text PLCF
WW8_FC fcPlcfsed; // 8x88 file offset of section descriptor PLCF.
- INT32 lcbPlcfsed; // 0x8c count of bytes of section descriptor PLCF.
+ sal_Int32 lcbPlcfsed; // 0x8c count of bytes of section descriptor PLCF.
WW8_FC fcPlcfpad; // 0x90 file offset of paragraph descriptor PLCF
- INT32 lcbPlcfpad; // 0x94 count of bytes of paragraph descriptor PLCF.
+ sal_Int32 lcbPlcfpad; // 0x94 count of bytes of paragraph descriptor PLCF.
// ==0 if file was never viewed in Outline view.
// Should not be written by third party creators
WW8_FC fcPlcfphe; // 0x98 file offset of PLCF of paragraph heights.
- INT32 lcbPlcfphe; // 0x9c count of bytes of paragraph height PLCF.
+ sal_Int32 lcbPlcfphe; // 0x9c count of bytes of paragraph height PLCF.
// ==0 when file is non-complex.
WW8_FC fcSttbfglsy; // 0xa0 file offset of glossary string table.
- INT32 lcbSttbfglsy; // 0xa4 count of bytes of glossary string table.
+ sal_Int32 lcbSttbfglsy; // 0xa4 count of bytes of glossary string table.
// == 0 for non-glossary documents.
// !=0 for glossary documents.
WW8_FC fcPlcfglsy; // 0xa8 file offset of glossary PLCF.
- INT32 lcbPlcfglsy; // 0xac count of bytes of glossary PLCF.
+ sal_Int32 lcbPlcfglsy; // 0xac count of bytes of glossary PLCF.
// == 0 for non-glossary documents.
// !=0 for glossary documents.
WW8_FC fcPlcfhdd; // 0xb0 byte offset of header PLCF.
- INT32 lcbPlcfhdd; // 0xb4 count of bytes of header PLCF.
+ sal_Int32 lcbPlcfhdd; // 0xb4 count of bytes of header PLCF.
// == 0 if document contains no headers
WW8_FC fcPlcfbteChpx; // 0xb8 file offset of character property bin table.PLCF.
- INT32 lcbPlcfbteChpx;// 0xbc count of bytes of character property bin table PLCF.
+ sal_Int32 lcbPlcfbteChpx;// 0xbc count of bytes of character property bin table PLCF.
WW8_FC fcPlcfbtePapx; // 0xc0 file offset of paragraph property bin table.PLCF.
- INT32 lcbPlcfbtePapx;// 0xc4 count of bytes of paragraph property bin table PLCF.
+ sal_Int32 lcbPlcfbtePapx;// 0xc4 count of bytes of paragraph property bin table PLCF.
WW8_FC fcPlcfsea; // 0xc8 file offset of PLCF reserved for private use. The SEA is 6 bytes long.
- INT32 lcbPlcfsea; // 0xcc count of bytes of private use PLCF.
+ sal_Int32 lcbPlcfsea; // 0xcc count of bytes of private use PLCF.
WW8_FC fcSttbfffn; // 0xd0 file offset of font information STTBF. See the FFN file structure definition.
- INT32 lcbSttbfffn; // 0xd4 count of bytes in sttbfffn.
+ sal_Int32 lcbSttbfffn; // 0xd4 count of bytes in sttbfffn.
WW8_FC fcPlcffldMom; // 0xd8 offset in doc stream to the PLCF of field positions in the main document.
- INT32 lcbPlcffldMom; // 0xdc
+ sal_Int32 lcbPlcffldMom; // 0xdc
WW8_FC fcPlcffldHdr; // 0xe0 offset in doc stream to the PLCF of field positions in the header subdocument.
- INT32 lcbPlcffldHdr; // 0xe4
+ sal_Int32 lcbPlcffldHdr; // 0xe4
WW8_FC fcPlcffldFtn; // 0xe8 offset in doc stream to the PLCF of field positions in the footnote subdocument.
- INT32 lcbPlcffldFtn; // 0xec
+ sal_Int32 lcbPlcffldFtn; // 0xec
WW8_FC fcPlcffldAtn; // 0xf0 offset in doc stream to the PLCF of field positions in the annotation subdocument.
- INT32 lcbPlcffldAtn; // 0xf4
+ sal_Int32 lcbPlcffldAtn; // 0xf4
WW8_FC fcPlcffldMcr; // 0xf8 offset in doc stream to the PLCF of field positions in the macro subdocument.
- INT32 lcbPlcffldMcr; // 9xfc
+ sal_Int32 lcbPlcffldMcr; // 9xfc
WW8_FC fcSttbfbkmk; // 0x100 offset in document stream of the STTBF that records bookmark names in the main document
- INT32 lcbSttbfbkmk; // 0x104
+ sal_Int32 lcbSttbfbkmk; // 0x104
WW8_FC fcPlcfbkf; // 0x108 offset in document stream of the PLCF that records the beginning CP offsets of bookmarks in the main document. See BKF
- INT32 lcbPlcfbkf; // 0x10c
+ sal_Int32 lcbPlcfbkf; // 0x10c
WW8_FC fcPlcfbkl; // 0x110 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.
- INT32 lcbPlcfbkl; // 0x114 INT32
+ sal_Int32 lcbPlcfbkl; // 0x114 sal_Int32
WW8_FC fcCmds; // 0x118 FC
- INT32 lcbCmds; // 0x11c
+ sal_Int32 lcbCmds; // 0x11c
WW8_FC fcPlcfmcr; // 0x120 FC
- INT32 lcbPlcfmcr; // 0x124
+ sal_Int32 lcbPlcfmcr; // 0x124
WW8_FC fcSttbfmcr; // 0x128 FC
- INT32 lcbSttbfmcr; // 0x12c
+ sal_Int32 lcbSttbfmcr; // 0x12c
WW8_FC fcPrDrvr; // 0x130 file offset of the printer driver information (names of drivers, port etc...)
- INT32 lcbPrDrvr; // 0x134 count of bytes of the printer driver information (names of drivers, port etc...)
+ sal_Int32 lcbPrDrvr; // 0x134 count of bytes of the printer driver information (names of drivers, port etc...)
WW8_FC fcPrEnvPort; // 0x138 file offset of the print environment in portrait mode.
- INT32 lcbPrEnvPort; // 0x13c count of bytes of the print environment in portrait mode.
+ sal_Int32 lcbPrEnvPort; // 0x13c count of bytes of the print environment in portrait mode.
WW8_FC fcPrEnvLand; // 0x140 file offset of the print environment in landscape mode.
- INT32 lcbPrEnvLand; // 0x144 count of bytes of the print environment in landscape mode.
+ sal_Int32 lcbPrEnvLand; // 0x144 count of bytes of the print environment in landscape mode.
WW8_FC fcWss; // 0x148 file offset of Window Save State data structure. See WSS.
- INT32 lcbWss; // 0x14c count of bytes of WSS. ==0 if unable to store the window state.
+ sal_Int32 lcbWss; // 0x14c count of bytes of WSS. ==0 if unable to store the window state.
WW8_FC fcDop; // 0x150 file offset of document property data structure.
- INT32 lcbDop; // 0x154 count of bytes of document properties.
+ sal_Int32 lcbDop; // 0x154 count of bytes of document properties.
// cbDOP is 84 when nFib < 103
WW8_FC fcSttbfAssoc; // 0x158 offset to STTBF of associated strings. See STTBFASSOC.
- INT32 cbSttbfAssoc; // 0x15C
+ sal_Int32 cbSttbfAssoc; // 0x15C
WW8_FC fcClx; // 0x160 file offset of beginning of information for complex files.
- INT32 lcbClx; // 0x164 count of bytes of complex file information. 0 if file is non-complex.
+ sal_Int32 lcbClx; // 0x164 count of bytes of complex file information. 0 if file is non-complex.
WW8_FC fcPlcfpgdFtn; // 0x168 file offset of page descriptor PLCF for footnote subdocument.
- INT32 lcbPlcfpgdFtn; // 0x16C count of bytes of page descriptor PLCF for footnote subdocument.
+ sal_Int32 lcbPlcfpgdFtn; // 0x16C count of bytes of page descriptor PLCF for footnote subdocument.
// ==0 if document has not been paginated. The length of the PGD is 8 bytes.
WW8_FC fcAutosaveSource; // 0x170 file offset of the name of the original file.
- INT32 lcbAutosaveSource; // 0x174 count of bytes of the name of the original file.
+ sal_Int32 lcbAutosaveSource; // 0x174 count of bytes of the name of the original file.
WW8_FC fcGrpStAtnOwners; // 0x178 group of strings recording the names of the owners of annotations
- INT32 lcbGrpStAtnOwners; // 0x17C count of bytes of the group of strings
+ sal_Int32 lcbGrpStAtnOwners; // 0x17C count of bytes of the group of strings
WW8_FC fcSttbfAtnbkmk; // 0x180 file offset of the sttbf that records names of bookmarks in the annotation subdocument
- INT32 lcbSttbfAtnbkmk; // 0x184 length in bytes of the sttbf that records names of bookmarks in the annotation subdocument
+ sal_Int32 lcbSttbfAtnbkmk; // 0x184 length in bytes of the sttbf that records names of bookmarks in the annotation subdocument
// Einschubs fuer WW67 ***************************************************
- // INT16 wSpare4Fib; // Reserve, muss hier nicht deklariert werden
+ // sal_Int16 wSpare4Fib; // Reserve, muss hier nicht deklariert werden
/*
// folgende Felder existieren zwar so in der Datei,
@@ -1108,118 +1108,118 @@ public:
WW8_FC fcPlcfdoaMom; // 0x192 file offset of the FDOA (drawn object) PLCF for main document.
// ==0 if document has no drawn objects. The length of the FDOA is 6 bytes.
// ab Ver8 unused
- INT32 lcbPlcfdoaMom; // 0x196 length in bytes of the FDOA PLCF of the main document
+ sal_Int32 lcbPlcfdoaMom; // 0x196 length in bytes of the FDOA PLCF of the main document
// ab Ver8 unused
WW8_FC fcPlcfdoaHdr; // 0x19A file offset of the FDOA (drawn object) PLCF for the header document.
// ==0 if document has no drawn objects. The length of the FDOA is 6 bytes.
// ab Ver8 unused
- INT32 lcbPlcfdoaHdr; // 0x19E length in bytes of the FDOA PLCF of the header document
+ sal_Int32 lcbPlcfdoaHdr; // 0x19E length in bytes of the FDOA PLCF of the header document
// ab Ver8 unused
WW8_FC fcPlcfspaMom; // offset in table stream of the FSPA PLCF for main document.
// == 0 if document has no office art objects
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspaMom; // length in bytes of the FSPA PLCF of the main document
+ sal_Int32 lcbPlcfspaMom; // length in bytes of the FSPA PLCF of the main document
// war in Ver67 nur leere Reserve
WW8_FC fcPlcfspaHdr; // offset in table stream of the FSPA PLCF for header document.
// == 0 if document has no office art objects
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspaHdr; // length in bytes of the FSPA PLCF of the header document
+ sal_Int32 lcbPlcfspaHdr; // length in bytes of the FSPA PLCF of the header document
// war in Ver67 nur leere Reserve
WW8_FC fcPlcfAtnbkf; // 0x1B2 file offset of BKF (bookmark first) PLCF of the annotation subdocument
- INT32 lcbPlcfAtnbkf; // 0x1B6 length in bytes of BKF (bookmark first) PLCF of the annotation subdocument
+ sal_Int32 lcbPlcfAtnbkf; // 0x1B6 length in bytes of BKF (bookmark first) PLCF of the annotation subdocument
WW8_FC fcPlcfAtnbkl; // 0x1BA file offset of BKL (bookmark last) PLCF of the annotation subdocument
- INT32 lcbPlcfAtnbkl; // 0x1BE length in bytes of BKL (bookmark first) PLCF of the annotation subdocument
+ sal_Int32 lcbPlcfAtnbkl; // 0x1BE length in bytes of BKL (bookmark first) PLCF of the annotation subdocument
WW8_FC fcPms; // 0x1C2 file offset of PMS (Print Merge State) information block
- INT32 lcbPMS; // 0x1C6 length in bytes of PMS
+ sal_Int32 lcbPMS; // 0x1C6 length in bytes of PMS
WW8_FC fcFormFldSttbf; // 0x1CA file offset of form field Sttbf which contains strings used in form field dropdown controls
- INT32 lcbFormFldSttbf; // 0x1CE length in bytes of form field Sttbf
+ sal_Int32 lcbFormFldSttbf; // 0x1CE length in bytes of form field Sttbf
WW8_FC fcPlcfendRef; // 0x1D2 file offset of PLCFendRef which points to endnote references in the main document stream
- INT32 lcbPlcfendRef; // 0x1D6
+ sal_Int32 lcbPlcfendRef; // 0x1D6
WW8_FC fcPlcfendTxt; // 0x1DA file offset of PLCFendRef which points to endnote text in the endnote document
// stream which corresponds with the PLCFendRef
- INT32 lcbPlcfendTxt; // 0x1DE
+ sal_Int32 lcbPlcfendTxt; // 0x1DE
WW8_FC fcPlcffldEdn; // 0x1E2 offset to PLCF of field positions in the endnote subdoc
- INT32 lcbPlcffldEdn; // 0x1E6
+ sal_Int32 lcbPlcffldEdn; // 0x1E6
WW8_FC fcPlcfpgdEdn; // 0x1EA offset to PLCF of page boundaries in the endnote subdoc.
- INT32 lcbPlcfpgdEdn; // 0x1EE
+ sal_Int32 lcbPlcfpgdEdn; // 0x1EE
WW8_FC fcDggInfo; // offset in table stream of the office art object table data.
// The format of office art object table data is found in a separate document.
// war in Ver67 nur leere Reserve
- INT32 lcbDggInfo; // length in bytes of the office art object table data
+ sal_Int32 lcbDggInfo; // length in bytes of the office art object table data
// war in Ver67 nur leere Reserve
WW8_FC fcSttbfRMark; // 0x1fa offset to STTBF that records the author abbreviations...
- INT32 lcbSttbfRMark; // 0x1fe
+ sal_Int32 lcbSttbfRMark; // 0x1fe
WW8_FC fcSttbfCaption; // 0x202 offset to STTBF that records caption titles...
- INT32 lcbSttbfCaption; // 0x206
+ sal_Int32 lcbSttbfCaption; // 0x206
WW8_FC fcSttbAutoCaption; // offset in table stream to the STTBF that records the object names and
// indices into the caption STTBF for objects which get auto captions.
- INT32 lcbSttbAutoCaption; // 0x20e
+ sal_Int32 lcbSttbAutoCaption; // 0x20e
WW8_FC fcPlcfwkb; // 0x212 offset to PLCF that describes the boundaries of contributing documents...
- INT32 lcbPlcfwkb; // 0x216
+ sal_Int32 lcbPlcfwkb; // 0x216
WW8_FC fcPlcfspl; // offset in table stream of PLCF (of SPLS structures) that records spell check state
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspl; // war in Ver67 nur leere Reserve
+ sal_Int32 lcbPlcfspl; // war in Ver67 nur leere Reserve
WW8_FC fcPlcftxbxTxt; // 0x222 ...PLCF of beginning CP in the text box subdoc
- INT32 lcbPlcftxbxTxt; // 0x226
+ sal_Int32 lcbPlcftxbxTxt; // 0x226
WW8_FC fcPlcffldTxbx; // 0x22a ...PLCF of field boundaries recorded in the textbox subdoc.
- INT32 lcbPlcffldTxbx; // 0x22e
+ sal_Int32 lcbPlcffldTxbx; // 0x22e
WW8_FC fcPlcfHdrtxbxTxt;// 0x232 ...PLCF of beginning CP in the header text box subdoc
- INT32 lcbPlcfHdrtxbxTxt;// 0x236
+ sal_Int32 lcbPlcfHdrtxbxTxt;// 0x236
WW8_FC fcPlcffldHdrTxbx;// 0x23a ...PLCF of field boundaries recorded in the header textbox subdoc.
- INT32 lcbPlcffldHdrTxbx;// 0x23e
+ sal_Int32 lcbPlcffldHdrTxbx;// 0x23e
/*
spezielle Listenverwaltung fuer WW8
*/
WW8_FC fcPlcfLst; // 0x02e2 offset in the table stream of list format information.
- INT32 lcbPlcfLst; // 0x02e6 length
+ sal_Int32 lcbPlcfLst; // 0x02e6 length
WW8_FC fcPlfLfo; // 0x02ea offset in the table stream of list format override information.
- INT32 lcbPlfLfo; // 0x02ee length
+ sal_Int32 lcbPlfLfo; // 0x02ee length
/*
spezielle Break-Verwaltung fuer Text-Box-Stories in WW8
*/
WW8_FC fcPlcftxbxBkd; // 0x02f2 PLCF fuer TextBox-Break-Deskriptoren im Maintext
- INT32 lcbPlcftxbxBkd; // 0x02f6
+ sal_Int32 lcbPlcftxbxBkd; // 0x02f6
WW8_FC fcPlcfHdrtxbxBkd;// 0x02fa PLCF fuer TextBox-Break-Deskriptoren im Header-/Footer-Bereich
- INT32 lcbPlcfHdrtxbxBkd;// 0x02fe
+ sal_Int32 lcbPlcfHdrtxbxBkd;// 0x02fe
// 0x302 - 372 == ignore
/*
ListNames (skip to here!)
*/
WW8_FC fcSttbListNames;// 0x0372 PLCF for Listname Table
- INT32 lcbSttbListNames;// 0x0376
+ sal_Int32 lcbSttbListNames;// 0x0376
/*
General-Varaiblen, die fuer Ver67 und Ver8 verwendet werden,
obwohl sie in der jeweiligen DATEI verschiedene Groesse haben:
*/
- INT32 pnChpFirst;
- INT32 pnPapFirst;
- INT32 cpnBteChp;
- INT32 cpnBtePap;
+ sal_Int32 pnChpFirst;
+ sal_Int32 pnPapFirst;
+ sal_Int32 cpnBteChp;
+ sal_Int32 cpnBtePap;
/*
nun wird lediglich noch ein Ctor benoetigt
*/
- WW8Fib( SvStream& rStrm, BYTE nWantedVersion,UINT32 nOffset=0 );
+ WW8Fib( SvStream& rStrm, sal_uInt8 nWantedVersion,sal_uInt32 nOffset=0 );
/* leider falsch, man braucht auch noch einen fuer den Export */
- WW8Fib( BYTE nVersion = 6 );
- BOOL Write( SvStream& rStrm );
+ WW8Fib( sal_uInt8 nVersion = 6 );
+ sal_Bool Write( SvStream& rStrm );
};
@@ -1232,21 +1232,21 @@ protected:
long nStyleLen;
// WW8_STSHI* pStishi;
- UINT16 cstd; // Count of styles in stylesheet
- UINT16 cbSTDBaseInFile; // Length of STD Base as stored in a file
- UINT16 fStdStylenamesWritten : 1; // Are built-in stylenames stored?
- UINT16 : 15; // Spare flags
- UINT16 stiMaxWhenSaved; // Max sti known when this file was written
- UINT16 istdMaxFixedWhenSaved; // How many fixed-index istds are there?
- UINT16 nVerBuiltInNamesWhenSaved; // Current version of built-in stylenames
- UINT16 ftcStandardChpStsh; // ftc used by StandardChpStsh for this document
+ sal_uInt16 cstd; // Count of styles in stylesheet
+ sal_uInt16 cbSTDBaseInFile; // Length of STD Base as stored in a file
+ sal_uInt16 fStdStylenamesWritten : 1; // Are built-in stylenames stored?
+ sal_uInt16 : 15; // Spare flags
+ sal_uInt16 stiMaxWhenSaved; // Max sti known when this file was written
+ sal_uInt16 istdMaxFixedWhenSaved; // How many fixed-index istds are there?
+ sal_uInt16 nVerBuiltInNamesWhenSaved; // Current version of built-in stylenames
+ sal_uInt16 ftcStandardChpStsh; // ftc used by StandardChpStsh for this document
public:
WW8Style( SvStream& rSt, WW8Fib& rFibPara );
// ~WW8Style(){ delete( pStishi ); pStishi = 0; }
WW8_STD* Read1STDFixed( short& rSkip, short* pcbStd );
WW8_STD* Read1Style( short& rSkip, String* pString, short* pcbStd );
- const UINT16 GetCount() const { return cstd; }
+ const sal_uInt16 GetCount() const { return cstd; }
};
@@ -1255,12 +1255,12 @@ class WW8Fonts
protected:
WW8_FFN* pFontA; // Array of Pointers to Font Description
// Hilfs-Vari
- USHORT nMax; // Array-Groesse
+ sal_uInt16 nMax; // Array-Groesse
public:
WW8Fonts( SvStream& rSt, WW8Fib& rFib );
~WW8Fonts(){ if( pFontA ) delete [] pFontA; }
- const WW8_FFN* GetFont( USHORT nNum ) const;
- USHORT GetMax() const { return nMax; }
+ const WW8_FFN* GetFont( sal_uInt16 nNum ) const;
+ sal_uInt16 GetMax() const { return nMax; }
};
@@ -1272,180 +1272,180 @@ public:
/*
Fehlerstatus
*/
- ULONG nDopError;
+ sal_uLong nDopError;
/*
vom Ctor aus dem FIB gelesene Daten
(entspricht nur ungefaehr der tatsaechlichen Struktur
des Winword-FIB)
*/
// Initialisier-Dummy:
- BYTE nDataStart;
+ sal_uInt8 nDataStart;
//-------------------------
- UINT16 fFacingPages : 1; // 1 when facing pages should be printed
- UINT16 fWidowControl : 1; // 1 when widow control is in effect. 0 when widow control disabled.
- UINT16 fPMHMainDoc : 1; // 1 when doc is a main doc for Print Merge Helper, 0 when not; default=0
- UINT16 grfSuppression : 2; // 0 Default line suppression storage; 0= form letter line suppression; 1= no line suppression; default=0
- UINT16 fpc : 2; // 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
- UINT16 : 1; // 0 unused
+ sal_uInt16 fFacingPages : 1; // 1 when facing pages should be printed
+ sal_uInt16 fWidowControl : 1; // 1 when widow control is in effect. 0 when widow control disabled.
+ sal_uInt16 fPMHMainDoc : 1; // 1 when doc is a main doc for Print Merge Helper, 0 when not; default=0
+ sal_uInt16 grfSuppression : 2; // 0 Default line suppression storage; 0= form letter line suppression; 1= no line suppression; default=0
+ sal_uInt16 fpc : 2; // 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
+ sal_uInt16 : 1; // 0 unused
//-------------------------
- UINT16 grpfIhdt : 8; // 0 specification of document headers and footers. See explanation under Headers and Footers topic.
+ sal_uInt16 grpfIhdt : 8; // 0 specification of document headers and footers. See explanation under Headers and Footers topic.
//-------------------------
- UINT16 rncFtn : 2; // 0 restart index for footnotes, 0 don't restart note numbering, 1 section, 2 page
- UINT16 nFtn : 14; // 1 initial footnote number for document
- UINT16 fOutlineDirtySave : 1; // when 1, indicates that information in the hPLCFpad should be refreshed since outline has been dirtied
- UINT16 : 7; // reserved
- UINT16 fOnlyMacPics : 1; // when 1, Word believes all pictures recorded in the document were created on a Macintosh
- UINT16 fOnlyWinPics : 1; // when 1, Word believes all pictures recorded in the document were created in Windows
- UINT16 fLabelDoc : 1; // when 1, document was created as a print merge labels document
- UINT16 fHyphCapitals : 1; // when 1, Word is allowed to hyphenate words that are capitalized. When 0, capitalized may not be hyphenated
- UINT16 fAutoHyphen : 1; // when 1, Word will hyphenate newly typed text as a background task
- UINT16 fFormNoFields : 1;
- UINT16 fLinkStyles : 1; // when 1, Word will merge styles from its template
- UINT16 fRevMarking : 1; // when 1, Word will mark revisions as the document is edited
- UINT16 fBackup : 1; // always make backup when document saved when 1.
- UINT16 fExactCWords : 1;
- UINT16 fPagHidden : 1; //
- UINT16 fPagResults : 1;
- UINT16 fLockAtn : 1; // when 1, annotations are locked for editing
- UINT16 fMirrorMargins : 1; // swap margins on left/right pages when 1.
- UINT16 fReadOnlyRecommended : 1;// user has recommended that this doc be opened read-only when 1
- UINT16 fDfltTrueType : 1; // when 1, use TrueType fonts by default (flag obeyed only when doc was created by WinWord 2.x)
- UINT16 fPagSuppressTopSpacing : 1;//when 1, file created with SUPPRESSTOPSPACING=YES in win.ini. (flag obeyed only when doc was created by WinWord 2.x).
- UINT16 fProtEnabled : 1; // when 1, document is protected from edit operations
- UINT16 fDispFormFldSel : 1;// when 1, restrict selections to occur only within form fields
- UINT16 fRMView : 1; // when 1, show revision markings on screen
- UINT16 fRMPrint : 1; // when 1, print revision marks when document is printed
- UINT16 fWriteReservation : 1;
- UINT16 fLockRev : 1; // when 1, the current revision marking state is locked
- UINT16 fEmbedFonts : 1; // when 1, document contains embedded True Type fonts
+ sal_uInt16 rncFtn : 2; // 0 restart index for footnotes, 0 don't restart note numbering, 1 section, 2 page
+ sal_uInt16 nFtn : 14; // 1 initial footnote number for document
+ sal_uInt16 fOutlineDirtySave : 1; // when 1, indicates that information in the hPLCFpad should be refreshed since outline has been dirtied
+ sal_uInt16 : 7; // reserved
+ sal_uInt16 fOnlyMacPics : 1; // when 1, Word believes all pictures recorded in the document were created on a Macintosh
+ sal_uInt16 fOnlyWinPics : 1; // when 1, Word believes all pictures recorded in the document were created in Windows
+ sal_uInt16 fLabelDoc : 1; // when 1, document was created as a print merge labels document
+ sal_uInt16 fHyphCapitals : 1; // when 1, Word is allowed to hyphenate words that are capitalized. When 0, capitalized may not be hyphenated
+ sal_uInt16 fAutoHyphen : 1; // when 1, Word will hyphenate newly typed text as a background task
+ sal_uInt16 fFormNoFields : 1;
+ sal_uInt16 fLinkStyles : 1; // when 1, Word will merge styles from its template
+ sal_uInt16 fRevMarking : 1; // when 1, Word will mark revisions as the document is edited
+ sal_uInt16 fBackup : 1; // always make backup when document saved when 1.
+ sal_uInt16 fExactCWords : 1;
+ sal_uInt16 fPagHidden : 1; //
+ sal_uInt16 fPagResults : 1;
+ sal_uInt16 fLockAtn : 1; // when 1, annotations are locked for editing
+ sal_uInt16 fMirrorMargins : 1; // swap margins on left/right pages when 1.
+ sal_uInt16 fReadOnlyRecommended : 1;// user has recommended that this doc be opened read-only when 1
+ sal_uInt16 fDfltTrueType : 1; // when 1, use TrueType fonts by default (flag obeyed only when doc was created by WinWord 2.x)
+ sal_uInt16 fPagSuppressTopSpacing : 1;//when 1, file created with SUPPRESSTOPSPACING=YES in win.ini. (flag obeyed only when doc was created by WinWord 2.x).
+ sal_uInt16 fProtEnabled : 1; // when 1, document is protected from edit operations
+ sal_uInt16 fDispFormFldSel : 1;// when 1, restrict selections to occur only within form fields
+ sal_uInt16 fRMView : 1; // when 1, show revision markings on screen
+ sal_uInt16 fRMPrint : 1; // when 1, print revision marks when document is printed
+ sal_uInt16 fWriteReservation : 1;
+ sal_uInt16 fLockRev : 1; // when 1, the current revision marking state is locked
+ sal_uInt16 fEmbedFonts : 1; // when 1, document contains embedded True Type fonts
// compatability options
- UINT16 copts_fNoTabForInd : 1; // when 1, don�t add automatic tab stops for hanging indent
- UINT16 copts_fNoSpaceRaiseLower : 1; // when 1, don�t add extra space for raised or lowered characters
- UINT16 copts_fSupressSpbfAfterPgBrk : 1; // when 1, supress the paragraph Space Before and Space After options after a page break
- UINT16 copts_fWrapTrailSpaces : 1; // when 1, wrap trailing spaces at the end of a line to the next line
- UINT16 copts_fMapPrintTextColor : 1; // when 1, print colors as black on non-color printers
- UINT16 copts_fNoColumnBalance : 1; // when 1, don�t balance columns for Continuous Section starts
- UINT16 copts_fConvMailMergeEsc : 1;
- UINT16 copts_fSupressTopSpacing : 1; // when 1, supress extra line spacing at top of page
- UINT16 copts_fOrigWordTableRules : 1; // when 1, combine table borders like Word 5.x for the Macintosh
- UINT16 copts_fTransparentMetafiles : 1; // when 1, don�t blank area between metafile pictures
- UINT16 copts_fShowBreaksInFrames : 1; // when 1, show hard page or column breaks in frames
- UINT16 copts_fSwapBordersFacingPgs : 1; // when 1, swap left and right pages on odd facing pages
-
- INT16 dxaTab; // 720 twips default tab width
- UINT16 wSpare; //
- UINT16 dxaHotZ; // width of hyphenation hot zone measured in twips
- UINT16 cConsecHypLim; // number of lines allowed to have consecutive hyphens
- UINT16 wSpare2; // reserved
- INT32 dttmCreated; // DTTM date and time document was created
- INT32 dttmRevised; // DTTM date and time document was last revised
- INT32 dttmLastPrint; // DTTM date and time document was last printed
- INT16 nRevision; // number of times document has been revised since its creation
- INT32 tmEdited; // time document was last edited
- INT32 cWords; // count of words tallied by last Word Count execution
- INT32 cCh; // count of characters tallied by last Word Count execution
- INT16 cPg; // count of pages tallied by last Word Count execution
- INT32 cParas; // count of paragraphs tallied by last Word Count execution
- UINT16 rncEdn : 2; // restart endnote number code: 0 don�t restart endnote numbering, 1 section, 2 page
- UINT16 nEdn : 14; // beginning endnote number
- UINT16 epc : 2; // endnote position code: 0 at end of section, 3 at end of document
- // UINT16 nfcFtnRef : 4; // number format code for auto footnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
+ sal_uInt16 copts_fNoTabForInd : 1; // when 1, don�t add automatic tab stops for hanging indent
+ sal_uInt16 copts_fNoSpaceRaiseLower : 1; // when 1, don�t add extra space for raised or lowered characters
+ sal_uInt16 copts_fSupressSpbfAfterPgBrk : 1; // when 1, supress the paragraph Space Before and Space After options after a page break
+ sal_uInt16 copts_fWrapTrailSpaces : 1; // when 1, wrap trailing spaces at the end of a line to the next line
+ sal_uInt16 copts_fMapPrintTextColor : 1; // when 1, print colors as black on non-color printers
+ sal_uInt16 copts_fNoColumnBalance : 1; // when 1, don�t balance columns for Continuous Section starts
+ sal_uInt16 copts_fConvMailMergeEsc : 1;
+ sal_uInt16 copts_fSupressTopSpacing : 1; // when 1, supress extra line spacing at top of page
+ sal_uInt16 copts_fOrigWordTableRules : 1; // when 1, combine table borders like Word 5.x for the Macintosh
+ sal_uInt16 copts_fTransparentMetafiles : 1; // when 1, don�t blank area between metafile pictures
+ sal_uInt16 copts_fShowBreaksInFrames : 1; // when 1, show hard page or column breaks in frames
+ sal_uInt16 copts_fSwapBordersFacingPgs : 1; // when 1, swap left and right pages on odd facing pages
+
+ sal_Int16 dxaTab; // 720 twips default tab width
+ sal_uInt16 wSpare; //
+ sal_uInt16 dxaHotZ; // width of hyphenation hot zone measured in twips
+ sal_uInt16 cConsecHypLim; // number of lines allowed to have consecutive hyphens
+ sal_uInt16 wSpare2; // reserved
+ sal_Int32 dttmCreated; // DTTM date and time document was created
+ sal_Int32 dttmRevised; // DTTM date and time document was last revised
+ sal_Int32 dttmLastPrint; // DTTM date and time document was last printed
+ sal_Int16 nRevision; // number of times document has been revised since its creation
+ sal_Int32 tmEdited; // time document was last edited
+ sal_Int32 cWords; // count of words tallied by last Word Count execution
+ sal_Int32 cCh; // count of characters tallied by last Word Count execution
+ sal_Int16 cPg; // count of pages tallied by last Word Count execution
+ sal_Int32 cParas; // count of paragraphs tallied by last Word Count execution
+ sal_uInt16 rncEdn : 2; // restart endnote number code: 0 don�t restart endnote numbering, 1 section, 2 page
+ sal_uInt16 nEdn : 14; // beginning endnote number
+ sal_uInt16 epc : 2; // endnote position code: 0 at end of section, 3 at end of document
+ // sal_uInt16 nfcFtnRef : 4; // number format code for auto footnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
// 3 Upper case Letter, 4 Lower case Letter
// ersetzt durch gleichlautendes Feld unten
- // UINT16 nfcEdnRef : 4; // number format code for auto endnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
+ // sal_uInt16 nfcEdnRef : 4; // number format code for auto endnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
// 3 Upper case Letter, 4 Lower case Letter
// ersetzt durch gleichlautendes Feld unten
- UINT16 fPrintFormData : 1; // only print data inside of form fields
- UINT16 fSaveFormData : 1; // only save document data that is inside of a form field.
- UINT16 fShadeFormData : 1; // shade form fields
- UINT16 : 2; // reserved
- UINT16 fWCFtnEdn : 1; // when 1, include footnotes and endnotes in word count
- INT32 cLines; // count of lines tallied by last Word Count operation
- INT32 cWordsFtnEnd; // count of words in footnotes and endnotes tallied by last Word Count operation
- INT32 cChFtnEdn; // count of characters in footnotes and endnotes tallied by last Word Count operation
- INT16 cPgFtnEdn; // count of pages in footnotes and endnotes tallied by last Word Count operation
- INT32 cParasFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
- INT32 cLinesFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
- INT32 lKeyProtDoc; // document protection password key, only valid if dop.fProtEnabled, dop.fLockAtn or dop.fLockRev are 1.
- UINT16 wvkSaved : 3; // document view kind: 0 Normal view, 1 Outline view, 2 Page View
- UINT16 wScaleSaved : 9; //
- UINT16 zkSaved : 2;
+ sal_uInt16 fPrintFormData : 1; // only print data inside of form fields
+ sal_uInt16 fSaveFormData : 1; // only save document data that is inside of a form field.
+ sal_uInt16 fShadeFormData : 1; // shade form fields
+ sal_uInt16 : 2; // reserved
+ sal_uInt16 fWCFtnEdn : 1; // when 1, include footnotes and endnotes in word count
+ sal_Int32 cLines; // count of lines tallied by last Word Count operation
+ sal_Int32 cWordsFtnEnd; // count of words in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cChFtnEdn; // count of characters in footnotes and endnotes tallied by last Word Count operation
+ sal_Int16 cPgFtnEdn; // count of pages in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cParasFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cLinesFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 lKeyProtDoc; // document protection password key, only valid if dop.fProtEnabled, dop.fLockAtn or dop.fLockRev are 1.
+ sal_uInt16 wvkSaved : 3; // document view kind: 0 Normal view, 1 Outline view, 2 Page View
+ sal_uInt16 wScaleSaved : 9; //
+ sal_uInt16 zkSaved : 2;
// hier sollte bei nFib < 103 Schluss sein, sonst ist Datei fehlerhaft!
/*
bei nFib >= 103 gehts weiter:
*/
- UINT32 fNoTabForInd :1; // see above in compatability options
- UINT32 fNoSpaceRaiseLower :1; // see above
- UINT32 fSupressSpbfAfterPageBreak :1; // see above
- UINT32 fWrapTrailSpaces :1; // see above
- UINT32 fMapPrintTextColor :1; // see above
- UINT32 fNoColumnBalance :1; // see above
- UINT32 fConvMailMergeEsc :1; // see above
- UINT32 fSupressTopSpacing :1; // see above
- UINT32 fOrigWordTableRules :1; // see above
- UINT32 fTransparentMetafiles :1; // see above
- UINT32 fShowBreaksInFrames :1; // see above
- UINT32 fSwapBordersFacingPgs :1; // see above
- UINT32 :4; // reserved
- UINT32 fSuppressTopSpacingMac5 :1; // Suppress extra line spacing at top
+ sal_uInt32 fNoTabForInd :1; // see above in compatability options
+ sal_uInt32 fNoSpaceRaiseLower :1; // see above
+ sal_uInt32 fSupressSpbfAfterPageBreak :1; // see above
+ sal_uInt32 fWrapTrailSpaces :1; // see above
+ sal_uInt32 fMapPrintTextColor :1; // see above
+ sal_uInt32 fNoColumnBalance :1; // see above
+ sal_uInt32 fConvMailMergeEsc :1; // see above
+ sal_uInt32 fSupressTopSpacing :1; // see above
+ sal_uInt32 fOrigWordTableRules :1; // see above
+ sal_uInt32 fTransparentMetafiles :1; // see above
+ sal_uInt32 fShowBreaksInFrames :1; // see above
+ sal_uInt32 fSwapBordersFacingPgs :1; // see above
+ sal_uInt32 :4; // reserved
+ sal_uInt32 fSuppressTopSpacingMac5 :1; // Suppress extra line spacing at top
// of page like MacWord 5.x
- UINT32 fTruncDxaExpand :1; // Expand/Condense by whole number of points
- UINT32 fPrintBodyBeforeHdr :1; // Print body text before header/footer
- UINT32 fNoLeading :1; // Don't add extra spacebetween rows of text
- UINT32 :1; // reserved
- UINT32 fMWSmallCaps :1; // Use larger small caps like MacWord 5.x
- UINT32 :10;// reserved
+ sal_uInt32 fTruncDxaExpand :1; // Expand/Condense by whole number of points
+ sal_uInt32 fPrintBodyBeforeHdr :1; // Print body text before header/footer
+ sal_uInt32 fNoLeading :1; // Don't add extra spacebetween rows of text
+ sal_uInt32 :1; // reserved
+ sal_uInt32 fMWSmallCaps :1; // Use larger small caps like MacWord 5.x
+ sal_uInt32 :10;// reserved
// hier sollte bei nFib <= 105 Schluss sein, sonst ist Datei fehlerhaft!
/*
bei nFib > 105 gehts weiter:
*/
- INT16 adt; // Autoformat Document Type:
+ sal_Int16 adt; // Autoformat Document Type:
// 0 for normal. 1 for letter, and 2 for email.
WW8_DOPTYPOGRAPHY doptypography; // siehe WW8STRUC.HXX
WW8_DOGRID dogrid; // siehe WW8STRUC.HXX
- UINT16 :1; // reserved
- UINT16 lvl :4; // Which outline levels are showing in outline view
- UINT16 :4; // reserved
- UINT16 fHtmlDoc :1; // This file is based upon an HTML file
- UINT16 :1; // reserved
- UINT16 fSnapBorder :1; // Snap table and page borders to page border
- UINT16 fIncludeHeader :1; // Place header inside page border
- UINT16 fIncludeFooter :1; // Place footer inside page border
- UINT16 fForcePageSizePag :1; // Are we in online view
- UINT16 fMinFontSizePag :1; // Are we auto-promoting
+ sal_uInt16 :1; // reserved
+ sal_uInt16 lvl :4; // Which outline levels are showing in outline view
+ sal_uInt16 :4; // reserved
+ sal_uInt16 fHtmlDoc :1; // This file is based upon an HTML file
+ sal_uInt16 :1; // reserved
+ sal_uInt16 fSnapBorder :1; // Snap table and page borders to page border
+ sal_uInt16 fIncludeHeader :1; // Place header inside page border
+ sal_uInt16 fIncludeFooter :1; // Place footer inside page border
+ sal_uInt16 fForcePageSizePag :1; // Are we in online view
+ sal_uInt16 fMinFontSizePag :1; // Are we auto-promoting
// fonts to >= hpsZoonFontPag?
- UINT16 fHaveVersions :1; // versioning is turned on
- UINT16 fAutoVersion :1; // autoversioning is enabled
- UINT16 :14; // reserved
+ sal_uInt16 fHaveVersions :1; // versioning is turned on
+ sal_uInt16 fAutoVersion :1; // autoversioning is enabled
+ sal_uInt16 :14; // reserved
// hier 12 Byte ueberspringen: ASUMI
- INT32 cChWS;
- INT32 cChWSFtnEdn;
- INT32 grfDocEvents;
+ sal_Int32 cChWS;
+ sal_Int32 cChWSFtnEdn;
+ sal_Int32 grfDocEvents;
// hier 4+30+8 Bytes ueberspringen
- INT32 cDBC;
- INT32 cDBCFtnEdn;
+ sal_Int32 cDBC;
+ sal_Int32 cDBCFtnEdn;
// hier 4 Bytes ueberspringen
- INT16 nfcFtnRef;
- INT16 nfcEdnRef;
- INT16 hpsZoonFontPag;
- INT16 dywDispPag;
+ sal_Int16 nfcFtnRef;
+ sal_Int16 nfcEdnRef;
+ sal_Int16 hpsZoonFontPag;
+ sal_Int16 dywDispPag;
// 2. Initialisier-Dummy:
- BYTE nDataEnd;
+ sal_uInt8 nDataEnd;
/*
nun wird lediglich noch ein Ctor benoetigt,
dem die FIB-Nummer uebergeben werden muss
*/
- WW8Dop( SvStream& rSt, INT16 nFib, INT32 nPos, INT32 nSize );
+ WW8Dop( SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_Int32 nSize );
/* leider falsch, man braucht auch noch einen fuer den Export */
WW8Dop();
- BOOL Write( SvStream& rStrm, WW8Fib& rFib );
+ sal_Bool Write( SvStream& rStrm, WW8Fib& rFib );
};
@@ -1454,13 +1454,13 @@ inline short WW8SkipOdd(SvStream* pSt )
#if defined HP9000 || defined SINIX
short bRet = pSt->Tell() & 0x1;
if (bRet) {
- UINT8 c;
+ sal_uInt8 c;
pSt->Read( &c, 1 );
}
return bRet;
#else
if ( pSt->Tell() & 0x1 ){
- UINT8 c;
+ sal_uInt8 c;
pSt->Read( &c, 1 );
return 1;
}
@@ -1478,9 +1478,9 @@ class WW8PLCF_HdFt
public:
WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop );
// ~WW8PLCF_HdFt() {}
- BOOL GetTextPos( BYTE grpfIhdt, BYTE nWhich, WW8_CP& rStart, long& rLen );
- BOOL GetTextPosExact( short nIdx, WW8_CP& rStart, long& rLen );
- void UpdateIndex( BYTE grpfIhdt );
+ sal_Bool GetTextPos( sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP& rStart, long& rLen );
+ sal_Bool GetTextPosExact( short nIdx, WW8_CP& rStart, long& rLen );
+ void UpdateIndex( sal_uInt8 grpfIhdt );
};
diff --git a/sw/source/filter/ww8/dump/ww8struc.hxx b/sw/source/filter/ww8/dump/ww8struc.hxx
index aa566098fd6e..6f86aa380f6d 100644
--- a/sw/source/filter/ww8/dump/ww8struc.hxx
+++ b/sw/source/filter/ww8/dump/ww8struc.hxx
@@ -36,26 +36,26 @@
#define nWW8MaxListLevel 9
-inline BYTE Get_Byte( BYTE *& p )
- { BYTE n = SVBT8ToByte( *(SVBT8*)p ); p += 1; return n; }
+inline sal_uInt8 Get_Byte( sal_uInt8 *& p )
+ { sal_uInt8 n = SVBT8ToByte( *(SVBT8*)p ); p += 1; return n; }
-inline short Get_Short( BYTE *& p )
+inline short Get_Short( sal_uInt8 *& p )
{ short n = SVBT16ToShort( *(SVBT16*)p ); p += 2; return n; }
-inline USHORT Get_UShort( BYTE *& p )
- { USHORT n = SVBT16ToShort( *(SVBT16*)p ); p += 2; return n; }
+inline sal_uInt16 Get_UShort( sal_uInt8 *& p )
+ { sal_uInt16 n = SVBT16ToShort( *(SVBT16*)p ); p += 2; return n; }
-inline long Get_Long( BYTE *& p )
+inline long Get_Long( sal_uInt8 *& p )
{ long n = SVBT32ToUInt32( *(SVBT32*)p ); p += 4; return n; }
-inline ULONG Get_ULong( BYTE *& p )
- { ULONG n = SVBT32ToUInt32( *(SVBT32*)p ); p += 4; return n; }
+inline sal_uLong Get_ULong( sal_uInt8 *& p )
+ { sal_uLong n = SVBT32ToUInt32( *(SVBT32*)p ); p += 4; return n; }
-inline void Set_UInt8( BYTE *& p, UINT8 n )
+inline void Set_UInt8( sal_uInt8 *& p, sal_uInt8 n )
{ ByteToSVBT8( n, *(SVBT8*)p ); p+= 1; }
-inline void Set_UInt16( BYTE *& p, UINT16 n )
+inline void Set_UInt16( sal_uInt8 *& p, sal_uInt16 n )
{ ShortToSVBT16( n, *(SVBT16*)p ); p+= 2; }
-inline void Set_UInt32( BYTE *& p, UINT32 n )
+inline void Set_UInt32( sal_uInt8 *& p, sal_uInt32 n )
{ UInt32ToSVBT32( n, *(SVBT32*)p ); p+= 4; }
@@ -68,9 +68,9 @@ inline void Set_UInt32( BYTE *& p, UINT32 n )
#endif
#endif
-typedef INT16 WW8_PN;
-typedef INT32 WW8_FC;
-typedef INT32 WW8_CP;
+typedef sal_Int16 WW8_PN;
+typedef sal_Int32 WW8_FC;
+typedef sal_Int32 WW8_CP;
// STD: STyle Definition
// The STD contains the entire definition of a style.
@@ -84,26 +84,26 @@ typedef INT32 WW8_CP;
struct WW8_STD
{
// Base part of STD:
- UINT16 sti : 12; // invariant style identifier
- UINT16 fScratch : 1; // spare field for any temporary use,
+ sal_uInt16 sti : 12; // invariant style identifier
+ sal_uInt16 fScratch : 1; // spare field for any temporary use,
// always reset back to zero!
- UINT16 fInvalHeight : 1; // PHEs of all text with this style are wrong
- UINT16 fHasUpe : 1; // UPEs have been generated
- UINT16 fMassCopy : 1; // std has been mass-copied; if unused at
+ sal_uInt16 fInvalHeight : 1; // PHEs of all text with this style are wrong
+ sal_uInt16 fHasUpe : 1; // UPEs have been generated
+ sal_uInt16 fMassCopy : 1; // std has been mass-copied; if unused at
// save time, style should be deleted
- UINT16 sgc : 4; // style type code
- UINT16 istdBase : 12; // base style
- UINT16 cupx : 4; // # of UPXs (and UPEs)
- UINT16 istdNext : 12; // next style
- UINT16 bchUpe; // offset to end of upx's, start of upe's
+ sal_uInt16 sgc : 4; // style type code
+ sal_uInt16 istdBase : 12; // base style
+ sal_uInt16 cupx : 4; // # of UPXs (and UPEs)
+ sal_uInt16 istdNext : 12; // next style
+ sal_uInt16 bchUpe; // offset to end of upx's, start of upe's
//-------- jetzt neu:
// ab Ver8 gibts zwei Felder mehr:
- UINT16 fAutoRedef : 1; /* auto redefine style when appropriate */
- UINT16 fHidden : 1; /* hidden from UI? */
- UINT16 : 14; /* unused bits */
+ sal_uInt16 fAutoRedef : 1; /* auto redefine style when appropriate */
+ sal_uInt16 fHidden : 1; /* hidden from UI? */
+ sal_uInt16 : 14; /* unused bits */
// Variable length part of STD:
- // UINT8 stzName[2]; /* sub-names are separated by chDelimStyle
+ // sal_uInt8 stzName[2]; /* sub-names are separated by chDelimStyle
// char grupx[];
// the UPEs are not stored on the file; they are a cache of the based-on
// chain
@@ -117,17 +117,17 @@ struct WW8_STD
struct WW8_FFN_BASE // Font Descriptor
{
// ab Ver6
- BYTE cbFfnM1; // 0x0 total length of FFN - 1.
+ sal_uInt8 cbFfnM1; // 0x0 total length of FFN - 1.
- BYTE prg: 2; // 0x1:03 pitch request
- BYTE fTrueType : 1; // 0x1:04 when 1, font is a TrueType font
+ sal_uInt8 prg: 2; // 0x1:03 pitch request
+ sal_uInt8 fTrueType : 1; // 0x1:04 when 1, font is a TrueType font
// 0x1:08 reserved
- BYTE ff : 3; // 0x1:70 font family id
+ sal_uInt8 ff : 3; // 0x1:70 font family id
// 0x1:80 reserved
short wWeight; // 0x2 base weight of font
- BYTE chs; // 0x4 character set identifier
- BYTE ibszAlt; // 0x5 index into ffn.szFfn to the name of the alternate font
+ sal_uInt8 chs; // 0x4 character set identifier
+ sal_uInt8 ibszAlt; // 0x5 index into ffn.szFfn to the name of the alternate font
};
/*
@@ -150,28 +150,28 @@ struct WW8_FFN : public WW8_FFN_BASE
struct WW8_BRCVer6 // alter Border Code
{
SVBT16 aBits1;
-// UINT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
+// sal_uInt16 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.
-// UINT16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
-// UINT16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
-// UINT16 ico : 5; // 07C0 color code (see chp.ico)
-// UINT16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
+// sal_uInt16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
+// sal_uInt16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
+// sal_uInt16 ico : 5; // 07C0 color code (see chp.ico)
+// sal_uInt16 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.
};
struct WW8_BRC : public WW8_BRCVer6 // Border Code
{
SVBT16 aBits2;
-// UINT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
+// sal_uInt16 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.
-// UINT16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
-// UINT16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
-// UINT16 ico : 5; // 07C0 color code (see chp.ico)
-// UINT16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
+// sal_uInt16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
+// sal_uInt16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
+// sal_uInt16 ico : 5; // 07C0 color code (see chp.ico)
+// sal_uInt16 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.
};
@@ -189,9 +189,9 @@ typedef WW8_BRC WW8_BRC5[5]; // 5 * Border Code
struct WW8_BordersSO // fuer StarOffice-Border Code
{
- USHORT Out;
- USHORT In;
- USHORT Dist;
+ sal_uInt16 Out;
+ sal_uInt16 In;
+ sal_uInt16 Dist;
};
@@ -351,39 +351,39 @@ struct WW8_DOGRID
struct WW8_PIC
{
- INT32 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.
- UINT16 cbHeader; // 0x4 number of bytes in the PIC (to allow for future expansion).
+ sal_Int32 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.
+ sal_uInt16 cbHeader; // 0x4 number of bytes in the PIC (to allow for future expansion).
struct {
- INT16 mm; // 0x6 int
- INT16 xExt; // 0x8 int
- INT16 yExt; // 0xa int
- INT16 hMF; // 0xc int
+ sal_Int16 mm; // 0x6 int
+ sal_Int16 xExt; // 0x8 int
+ sal_Int16 yExt; // 0xa int
+ sal_Int16 hMF; // 0xc int
}MFP;
-// BYTE bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
- BYTE rcWinMF[14]; // 0xe rc (rectangle - 8 bytes) rect for window origin
+// sal_uInt8 bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
+ sal_uInt8 rcWinMF[14]; // 0xe rc (rectangle - 8 bytes) rect for window origin
// and extents when metafile is stored -- ignored if 0
- INT16 dxaGoal; // 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
- INT16 dyaGoal; // 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
- UINT16 mx; // 0x20 horizontal scaling factor supplied by user in .1% units.
- UINT16 my; // 0x22 vertical scaling factor supplied by user in .1% units.
- INT16 dxaCropLeft; // 0x24 the amount the picture has been cropped on the left in twips.
- INT16 dyaCropTop; // 0x26 the amount the picture has been cropped on the top in twips.
- INT16 dxaCropRight; // 0x28 the amount the picture has been cropped on the right in twips.
- INT16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
- INT16 brcl : 4; // 000F Obsolete, superseded by brcTop, etc. In
- INT16 fFrameEmpty : 1; // 0010 picture consists of a single frame
- INT16 fBitmap : 1; // 0020 ==1, when picture is just a bitmap
- INT16 fDrawHatch : 1; // 0040 ==1, when picture is an active OLE object
- INT16 fError : 1; // 0080 ==1, when picture is just an error message
- INT16 bpp : 8; // FF00 bits per pixel, 0 = unknown
+ sal_Int16 dxaGoal; // 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
+ sal_Int16 dyaGoal; // 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
+ sal_uInt16 mx; // 0x20 horizontal scaling factor supplied by user in .1% units.
+ sal_uInt16 my; // 0x22 vertical scaling factor supplied by user in .1% units.
+ sal_Int16 dxaCropLeft; // 0x24 the amount the picture has been cropped on the left in twips.
+ sal_Int16 dyaCropTop; // 0x26 the amount the picture has been cropped on the top in twips.
+ sal_Int16 dxaCropRight; // 0x28 the amount the picture has been cropped on the right in twips.
+ sal_Int16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
+ sal_Int16 brcl : 4; // 000F Obsolete, superseded by brcTop, etc. In
+ sal_Int16 fFrameEmpty : 1; // 0010 picture consists of a single frame
+ sal_Int16 fBitmap : 1; // 0020 ==1, when picture is just a bitmap
+ sal_Int16 fDrawHatch : 1; // 0040 ==1, when picture is an active OLE object
+ sal_Int16 fError : 1; // 0080 ==1, when picture is just an error message
+ sal_Int16 bpp : 8; // FF00 bits per pixel, 0 = unknown
WW8_BRC rgbrc[4];
// BRC brcTop; // 0x2e specification for border above picture
// BRC brcLeft; // 0x30 specification for border to the left
// BRC brcBottom; // 0x32 specification for border below picture
// BRC brcRight; // 0x34 specification for border to the right
- INT16 dxaOrigin; // 0x36 horizontal offset of hand annotation origin
- INT16 dyaOrigin; // 0x38 vertical offset of hand annotation origin
-// BYTE rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
+ sal_Int16 dxaOrigin; // 0x36 horizontal offset of hand annotation origin
+ sal_Int16 dyaOrigin; // 0x38 vertical offset of hand annotation origin
+// sal_uInt8 rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
};
struct WW8_PIC_SHADOW
@@ -423,26 +423,26 @@ struct WW8_PIC_SHADOW
struct WW8_TBD
{
SVBT8 aBits1;
-// BYTE jc : 3; // 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
-// BYTE tlc : 3; // 0x38 tab leader code: 0=no leader, 1=dotted leader,
+// sal_uInt8 jc : 3; // 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
+// sal_uInt8 tlc : 3; // 0x38 tab leader code: 0=no leader, 1=dotted leader,
// 2=hyphenated leader, 3=single line leader, 4=heavy line leader
// * int :2 C0 reserved
};
struct WW8_TCell // hiermit wird weitergearbeitet (entspricht weitestgehend dem Ver8-Format)
{
- BOOL bFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
- BOOL bMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell.
- BOOL bVertical : 1;// set to 1 when cell has vertical text flow
- BOOL bBackward : 1;// for a vertical table cell, text flow is bottom to top when 1 and is bottom to top when 0.
- BOOL bRotateFont : 1;// set to 1 when cell has rotated characters (i.e. uses @font)
- BOOL bVertMerge : 1;// set to 1 when cell is vertically merged with the cell(s) above and/or below. When cells are vertically merged, the display area of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell (the cell with fVertRestart set to 1), and all other vertically merged cells (those with fVertRestart set to 0) must be empty. Cells can only be merged vertically if their left and right boundaries are (nearly) identical (i.e. if corresponding entries in rgdxaCenter of the table rows differ by at most 3).
- BOOL bVertRestart : 1;// set to 1 when the cell is the first of a set of vertically merged cells. The contents of a cell with fVertStart set to 1 are displayed in the consolidated area belonging to the entire set of vertically merged cells. Vertically merged cells with fVertRestart set to 0 must be empty.
- BYTE nVertAlign : 2;// specifies the alignment of the cell contents relative to text flow (e.g. in a cell with bottom to top text flow and bottom vertical alignment, the text is shifted horizontally to match the cell's right boundary):
+ sal_Bool bFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
+ sal_Bool bMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell.
+ sal_Bool bVertical : 1;// set to 1 when cell has vertical text flow
+ sal_Bool bBackward : 1;// for a vertical table cell, text flow is bottom to top when 1 and is bottom to top when 0.
+ sal_Bool bRotateFont : 1;// set to 1 when cell has rotated characters (i.e. uses @font)
+ sal_Bool bVertMerge : 1;// set to 1 when cell is vertically merged with the cell(s) above and/or below. When cells are vertically merged, the display area of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell (the cell with fVertRestart set to 1), and all other vertically merged cells (those with fVertRestart set to 0) must be empty. Cells can only be merged vertically if their left and right boundaries are (nearly) identical (i.e. if corresponding entries in rgdxaCenter of the table rows differ by at most 3).
+ sal_Bool bVertRestart : 1;// set to 1 when the cell is the first of a set of vertically merged cells. The contents of a cell with fVertStart set to 1 are displayed in the consolidated area belonging to the entire set of vertically merged cells. Vertically merged cells with fVertRestart set to 0 must be empty.
+ sal_uInt8 nVertAlign : 2;// specifies the alignment of the cell contents relative to text flow (e.g. in a cell with bottom to top text flow and bottom vertical alignment, the text is shifted horizontally to match the cell's right boundary):
// 0 top
// 1 center
// 2 bottom
- UINT16 fUnused : 7;// reserved - nicht loeschen: macht das UINT16 voll !!
+ sal_uInt16 fUnused : 7;// reserved - nicht loeschen: macht das sal_uInt16 voll !!
WW8_BRC rgbrc[4]; // border codes
//notational convenience for referring to brcTop, brcLeft, etc fields.
@@ -458,9 +458,9 @@ struct WW8_TCellVer6 // wird aus der Datei gelesen
{
SVBT8 aBits1Ver6;
SVBT8 aBits2Ver6;
-// UINT16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
-// UINT16 fMerged : 1; // 0002 set to 1 when cell has been merged with preceding cell.
-// UINT16 fUnused : 14; // FFFC reserved
+// sal_uInt16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
+// sal_uInt16 fMerged : 1; // 0002 set to 1 when cell has been merged with preceding cell.
+// sal_uInt16 fUnused : 14; // FFFC reserved
WW8_BRCVer6 rgbrcVer6[4];
// notational convenience for referring to brcTop, brcLeft, etc fields:
// BRC brcTop; // specification of the top border of a table cell
@@ -482,27 +482,27 @@ struct WW8_TCellVer8 // wird aus der Datei gelesen
struct WW8_SHD // struct SHD fehlt in der Beschreibung
{
private:
- UINT16 aBits;
-// UINT16 nFore : 5; // 0x001f ForegroundColor
-// UINT16 nBack : 5; // 0x03e0 BackgroundColor
-// UINT16 nStyle : 5; // 0x7c00 Percentage and Style
-// UINT16 nDontKnow : 1; // 0x8000 ??? ab Ver8: ebenfalls fuer Style
+ sal_uInt16 aBits;
+// sal_uInt16 nFore : 5; // 0x001f ForegroundColor
+// sal_uInt16 nBack : 5; // 0x03e0 BackgroundColor
+// sal_uInt16 nStyle : 5; // 0x7c00 Percentage and Style
+// sal_uInt16 nDontKnow : 1; // 0x8000 ??? ab Ver8: ebenfalls fuer Style
public:
WW8_SHD(){ aBits = 0; }
- BYTE GetFore() const { return (BYTE)( aBits & 0x1f); }
- BYTE GetBack() const { return (BYTE)((aBits >> 5 ) & 0x1f); }
- BYTE GetStyle(BOOL bVer67) const { return (BYTE)((aBits >> 10) & ( bVer67?0x1f:0x3f ) ); }
+ sal_uInt8 GetFore() const { return (sal_uInt8)( aBits & 0x1f); }
+ sal_uInt8 GetBack() const { return (sal_uInt8)((aBits >> 5 ) & 0x1f); }
+ sal_uInt8 GetStyle(sal_Bool bVer67) const { return (sal_uInt8)((aBits >> 10) & ( bVer67?0x1f:0x3f ) ); }
- UINT16 GetValue() const { return aBits; }
+ sal_uInt16 GetValue() const { return aBits; }
- void SetValue( UINT16 nVal ){ aBits = nVal; }
- void SetWWValue( SVBT16 nVal ){ aBits = (UINT16)SVBT16ToShort( nVal ); }
+ void SetValue( sal_uInt16 nVal ){ aBits = nVal; }
+ void SetWWValue( SVBT16 nVal ){ aBits = (sal_uInt16)SVBT16ToShort( nVal ); }
- void SetFore( BYTE nVal ){ aBits = (aBits & 0xffe0) | (nVal & 0x1f); }
- void SetBack( BYTE nVal ){ aBits = (aBits & 0xfc1f) | ((nVal & 0x1f)<<5); }
- void SetStyle( BOOL bVer67, BYTE nVal ){
+ void SetFore( sal_uInt8 nVal ){ aBits = (aBits & 0xffe0) | (nVal & 0x1f); }
+ void SetBack( sal_uInt8 nVal ){ aBits = (aBits & 0xfc1f) | ((nVal & 0x1f)<<5); }
+ void SetStyle( sal_Bool bVer67, sal_uInt8 nVal ){
aBits = (aBits & ( bVer67?0x83ff:0x03ff ) )
| ((nVal & ( bVer67?0x1f:0x2f ))<<10); }
};
@@ -515,29 +515,29 @@ struct WW8_ANLV
SVBT8 cbTextBefore; // 1 offset into anld.rgch limit of prefix text
SVBT8 cbTextAfter; // 2
SVBT8 aBits1;
-// BYTE jc : 2; // 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify
-// BYTE fPrev : 1; // 0x04 when ==1, include previous levels
-// BYTE fHang : 1; // 0x08 when ==1, number will be displayed using a hanging indent
-// BYTE fSetBold : 1; // 0x10 when ==1, boldness of number will be determined by anld.fBold.
-// BYTE fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic
-// BYTE fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not.
-// BYTE fSetCaps : 1; // 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not
+// sal_uInt8 jc : 2; // 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify
+// sal_uInt8 fPrev : 1; // 0x04 when ==1, include previous levels
+// sal_uInt8 fHang : 1; // 0x08 when ==1, number will be displayed using a hanging indent
+// sal_uInt8 fSetBold : 1; // 0x10 when ==1, boldness of number will be determined by anld.fBold.
+// sal_uInt8 fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic
+// sal_uInt8 fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not.
+// sal_uInt8 fSetCaps : 1; // 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not
SVBT8 aBits2;
-// BYTE fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not.
-// BYTE fSetKul : 1; // 0x02 when ==1, anld.kul will determine the underlining state of the autonumber.
-// BYTE fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character
-// BYTE fBold : 1; // 0x08 determines boldness of autonumber when anld.fSetBold == 1.
-// BYTE fItalic : 1; // 0x10 determines italicness of autonumber when anld.fSetItalic == 1.
-// BYTE fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1.
-// BYTE fCaps : 1; // 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1.
-// BYTE fStrike : 1; // 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1.
+// sal_uInt8 fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not.
+// sal_uInt8 fSetKul : 1; // 0x02 when ==1, anld.kul will determine the underlining state of the autonumber.
+// sal_uInt8 fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character
+// sal_uInt8 fBold : 1; // 0x08 determines boldness of autonumber when anld.fSetBold == 1.
+// sal_uInt8 fItalic : 1; // 0x10 determines italicness of autonumber when anld.fSetItalic == 1.
+// sal_uInt8 fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1.
+// sal_uInt8 fCaps : 1; // 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1.
+// sal_uInt8 fStrike : 1; // 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1.
SVBT8 aBits3;
-// BYTE kul : 3; // 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1.
-// BYTE ico : 5; // 0xF1 color of autonumber
+// sal_uInt8 kul : 3; // 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1.
+// sal_uInt8 ico : 5; // 0xF1 color of autonumber
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).
@@ -549,7 +549,7 @@ struct WW8_ANLD
SVBT8 fNumberAcross; // 0x11 number across cells in table rows(instead of down)
SVBT8 fRestartHdn; // 0x12 restart heading number on section boundary
SVBT8 fSpareX; // 0x13 unused( should be 0)
- BYTE rgchAnld[32]; // 0x14 characters displayed before/after autonumber
+ sal_uInt8 rgchAnld[32]; // 0x14 characters displayed before/after autonumber
};
@@ -560,7 +560,7 @@ struct WW8_OLST
SVBT8 fSpareOlst2; // 0x91 reserved
SVBT8 fSpareOlst3; // 0x92 reserved
SVBT8 fSpareOlst4; // 0x93 reserved
- BYTE rgch[64]; // 0x94 array of 64 chars text before/after number
+ sal_uInt8 rgch[64]; // 0x94 array of 64 chars text before/after number
};
// cbOLST is 212(decimal), D4(hex).
@@ -578,8 +578,8 @@ struct WW8_DO
SVBT8 by; // 5 y position relative to anchor CP
SVBT16 dhgt; // 6 height of DO
SVBT16 aBits1;
-// UINT16 fAnchorLock : 1; // 8 1 if the DO anchor is locked
-// BYTE[] rgdp; // 0xa variable length array of drawing primitives
+// sal_uInt16 fAnchorLock : 1; // 8 1 if the DO anchor is locked
+// sal_uInt8[] rgdp; // 0xa variable length array of drawing primitives
};
struct WW8_DPHEAD
@@ -621,16 +621,16 @@ struct WW8_DP_FILL
struct WW8_DP_LINEEND
{
SVBT16 aStartBits;
-// UINT16 eppsStart : 2; // Start EndPoint Property Style
+// sal_uInt16 eppsStart : 2; // Start EndPoint Property Style
// 0=None, 1=Hollow, 2=Filled
-// UINT16 eppwStart : 2; // Start EndPoint Property Weight
-// UINT16 epplStart : 2; // Start EndPoint Property length
-// UINT16 dummyStart : 10; // Alignment
+// sal_uInt16 eppwStart : 2; // Start EndPoint Property Weight
+// sal_uInt16 epplStart : 2; // Start EndPoint Property length
+// sal_uInt16 dummyStart : 10; // Alignment
SVBT16 aEndBits;
-// UINT16 eppsEnd : 2; // End EndPoint Property Style
-// UINT16 eppwEnd : 2; // End EndPoint Property Weight
-// UINT16 epplEnd : 2; // End EndPoint Property length
-// UINT16 dummyEnd : 10; // Alignment
+// sal_uInt16 eppsEnd : 2; // End EndPoint Property Style
+// sal_uInt16 eppwEnd : 2; // End EndPoint Property Weight
+// sal_uInt16 epplEnd : 2; // End EndPoint Property length
+// sal_uInt16 dummyEnd : 10; // Alignment
};
struct WW8_DP_LINE
@@ -651,8 +651,8 @@ struct WW8_DP_TXTBOX
WW8_DP_FILL aFill;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fRoundCorners : 1; //0x24 0001 1 if the textbox has rounded corners
-// UINT16 zaShape : 15; // 0x24 000e REVIEW davebu
+// sal_uInt16 fRoundCorners : 1; //0x24 0001 1 if the textbox has rounded corners
+// sal_uInt16 zaShape : 15; // 0x24 000e REVIEW davebu
SVBT16 dzaInternalMargin; // 0x26 REVIEW davebu
};
@@ -662,8 +662,8 @@ struct WW8_DP_RECT
WW8_DP_FILL aFill;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fRoundCorners : 1; // 0x24 0001 1 if the textbox has rounded corners
-// UINT16 zaShape : 15; // 0x24 000e REVIEW davebu
+// sal_uInt16 fRoundCorners : 1; // 0x24 0001 1 if the textbox has rounded corners
+// sal_uInt16 zaShape : 15; // 0x24 000e REVIEW davebu
};
struct WW8_DP_ARC
@@ -673,8 +673,8 @@ struct WW8_DP_ARC
WW8_DP_SHADOW aShd;
SVBT8 fLeft; // 0x24 00ff REVIEW davebu
SVBT8 fUp; // 0x24 ff00 REVIEW davebu
-// UINT16 fLeft : 8; // 0x24 00ff REVIEW davebu
-// UINT16 fUp : 8; // 0x24 ff00 REVIEW davebu
+// sal_uInt16 fLeft : 8; // 0x24 00ff REVIEW davebu
+// sal_uInt16 fUp : 8; // 0x24 ff00 REVIEW davebu
};
struct WW8_DP_ELIPSE
@@ -691,8 +691,8 @@ struct WW8_DP_POLYLINE
WW8_DP_LINEEND aEpp;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fPolygon : 1; // 0x28 0001 1 if this is a polygon
-// UINT16 cpt : 15; // 0x28 00fe count of points
+// sal_uInt16 fPolygon : 1; // 0x28 0001 1 if this is a polygon
+// sal_uInt16 cpt : 15; // 0x28 00fe count of points
// short xaFirst; // 0x2a These are the endpoints of the first line.
// short yaFirst; // 0x2c
// short xaEnd; // 0x2e
@@ -723,8 +723,8 @@ struct WW8_DP_DEFAULTS
SVBT16 dzaLength; // 0x2e REVIEW davebu
SVBT16 aBits3;
-// UINT16 fRoundCorners : 1; // 0x30 0001 1 if the textbox has rounded corners
-// UINT16 zaShape : 15; // 0x30 000fe REVIEW davebu
+// sal_uInt16 fRoundCorners : 1; // 0x30 0001 1 if the textbox has rounded corners
+// sal_uInt16 zaShape : 15; // 0x30 000fe REVIEW davebu
SVBT16 dzaInternalMargin; // 0x32 REVIEW davebu
};
@@ -732,9 +732,9 @@ struct WW8_DP_DEFAULTS
struct WW8_PCD
{
SVBT8 aBits1;
-// BYTE fNoParaLast : 1; // when 1, means that piece contains no end of paragraph marks.
-// BYTE fPaphNil : 1; // used internally by Word
-// BYTE fCopied : 1; // used internally by Word
+// sal_uInt8 fNoParaLast : 1; // when 1, means that piece contains no end of paragraph marks.
+// sal_uInt8 fPaphNil : 1; // used internally by Word
+// sal_uInt8 fCopied : 1; // used internally by Word
// * int :5
SVBT8 aBits2; // fn int:8, used internally by Word
SVBT32 fc; // file offset of beginning of piece. The size of the
@@ -747,7 +747,7 @@ struct WW8_PCD
struct WW8_PHE_Base
{
- BYTE aBits1; //
+ sal_uInt8 aBits1; //
// 0 0 fSpare int :1 0001 reserved
// fUnk int :1 0002 phe entry is invalid
// when == 1
@@ -755,7 +755,7 @@ struct WW8_PHE_Base
// height of paragraph is known but lines in
// paragraph have different heights.
// * int :5 00F8 reserved
- BYTE nlMac; // when fDiffLines is 0 is number of lines in
+ sal_uInt8 nlMac; // when fDiffLines is 0 is number of lines in
// // paragraph
SVBT16 dxaCol; // width of lines in paragraph
SVBT16 dyl;
diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx
index 46aa1d0d71a8..0a71b6620c5a 100644
--- a/sw/source/filter/ww8/escher.hxx
+++ b/sw/source/filter/ww8/escher.hxx
@@ -111,7 +111,7 @@ protected:
SvStream* pEscherStrm;
long mnEmuMul, mnEmuDiv;
- virtual INT32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
+ virtual sal_Int32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
EscherPropertyContainer& rPropOpt);
void WriteBrushAttr(const SvxBrushItem &rBrush,
EscherPropertyContainer& rPropOpt);
@@ -120,19 +120,19 @@ protected:
sal_uInt32 nShapeId, const com::sun::star::awt::Rectangle* pVisArea );
void WriteGrfAttr(const SwNoTxtNode& rNd,EscherPropertyContainer& rPropOpt);
- INT32 DrawModelToEmu(INT32 nVal) const
+ sal_Int32 DrawModelToEmu(sal_Int32 nVal) const
{ return BigMulDiv(nVal, mnEmuMul, mnEmuDiv); }
- INT32 ToFract16(INT32 nVal, UINT32 nMax) const;
+ sal_Int32 ToFract16(sal_Int32 nVal, sal_uInt32 nMax) const;
- virtual void SetPicId(const SdrObject &, UINT32, EscherPropertyContainer &);
+ virtual void SetPicId(const SdrObject &, sal_uInt32, EscherPropertyContainer &);
SdrLayerID GetInvisibleHellId() const;
public:
SwBasicEscherEx(SvStream* pStrm, WW8Export& rWrt);
- INT32 WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId);
- INT32 WriteOLEFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId);
- void WriteEmptyFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId);
+ sal_Int32 WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
+ sal_Int32 WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
+ void WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
virtual void WriteFrmExtraData(const SwFrmFmt&);
virtual void WritePictures();
virtual ~SwBasicEscherEx();
@@ -150,23 +150,23 @@ private:
WinwordAnchoring aWinwordAnchoring;
WW8_WrPlcTxtBoxes *pTxtBxs;
- UINT32 GetFlyShapeId(const SwFrmFmt& rFmt,
+ sal_uInt32 GetFlyShapeId(const SwFrmFmt& rFmt,
unsigned int nHdFtIndex, DrawObjPointerVector &rPVec);
void MakeZOrderArrAndFollowIds(std::vector<DrawObj>& rSrcArr,
DrawObjPointerVector& rDstArr);
- INT32 WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
+ sal_Int32 WriteFlyFrm(const DrawObj &rObj, sal_uInt32 &rShapeId,
DrawObjPointerVector &rPVec);
- INT32 WriteTxtFlyFrame(const DrawObj &rObj, UINT32 nShapeId,
- UINT32 nTxtBox, DrawObjPointerVector &rPVec);
- void WriteOCXControl(const SwFrmFmt& rFmt,UINT32 nShapeId);
- virtual INT32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
+ sal_Int32 WriteTxtFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId,
+ sal_uInt32 nTxtBox, DrawObjPointerVector &rPVec);
+ void WriteOCXControl(const SwFrmFmt& rFmt,sal_uInt32 nShapeId);
+ virtual sal_Int32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
EscherPropertyContainer& rPropOpt);
- virtual UINT32 QueryTextID(
+ virtual sal_uInt32 QueryTextID(
const com::sun::star::uno::Reference<
- com::sun::star::drawing::XShape > &,UINT32);
- virtual void SetPicId(const SdrObject &rSdrObj, UINT32 nShapeId,
+ com::sun::star::drawing::XShape > &,sal_uInt32);
+ virtual void SetPicId(const SdrObject &rSdrObj, sal_uInt32 nShapeId,
EscherPropertyContainer &rPropOpt);
public:
SwEscherEx( SvStream* pStrm, WW8Export& rWW8Wrt );
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 587a90df4a27..1653b7e6ace7 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -187,7 +187,7 @@ static OString OutTBLBorderLine(RtfExport &rExport, const SvxBorderLine* pLine,
}
static OString OutBorderLine(RtfExport &rExport, const SvxBorderLine* pLine,
- const sal_Char* pStr, USHORT nDist)
+ const sal_Char* pStr, sal_uInt16 nDist)
{
OStringBuffer aRet;
aRet.append(OutTBLBorderLine(rExport, pLine, pStr));
@@ -519,12 +519,12 @@ void RtfAttributeOutput::Redline( const SwRedlineData* pRedline )
m_aRun.append(' ');
}
-void RtfAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t /*pTextNodeInfoInner*/ )
+void RtfAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, sal_uInt16 /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t /*pTextNodeInfoInner*/ )
{
OSL_TRACE("TODO: %s", OSL_THIS_FUNC);
}
-void RtfAttributeOutput::ParagraphStyle( USHORT nStyle )
+void RtfAttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -578,7 +578,7 @@ void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
// Cell margins
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
};
@@ -609,7 +609,7 @@ void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
SwRect aRect( pFmt->FindLayoutRect( false, &aPt ));
SwTwips nPageSize = aRect.Width();
SwTwips nTblSz = pFmt->GetFrmSize().GetWidth();
- for( USHORT i = 0; i < pRow->GetCells().Count(); i++ )
+ for( sal_uInt16 i = 0; i < pRow->GetCells().Count(); i++ )
{
SwWriteTableCell *pCell = pRow->GetCells( )[ i ];
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
@@ -647,10 +647,10 @@ void RtfAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
const SfxPoolItem* pItem;
- if (SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(RES_BOX, TRUE, &pItem))
+ if (SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(RES_BOX, sal_True, &pItem))
{
const SvxBoxItem& rBox = (SvxBoxItem&)*pItem;
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -694,7 +694,7 @@ void RtfAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(
- RES_BACKGROUND, TRUE, &pItem ))
+ RES_BACKGROUND, sal_True, &pItem ))
{
const SvxBrushItem& rBack = (SvxBrushItem&)*pItem;
if( !rBack.GetColor().GetTransparency() )
@@ -778,7 +778,7 @@ void RtfAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_
// vertical alignment
if( SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(
- RES_VERT_ORIENT, TRUE, &pItem ) )
+ RES_VERT_ORIENT, sal_True, &pItem ) )
switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() )
{
case text::VertOrientation::CENTER: m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLVERTALC); break;
@@ -869,8 +869,8 @@ void RtfAttributeOutput::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 RtfAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ )
@@ -988,7 +988,7 @@ void RtfAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer
const SwTable *pTable = pInner->getTable( );
const SwTableLines& rLines = pTable->GetTabLines( );
- USHORT nLinesCount = rLines.Count( );
+ sal_uInt16 nLinesCount = rLines.Count( );
if ( pInner->isEndOfCell() )
EndTableCell();
@@ -1014,7 +1014,7 @@ void RtfAttributeOutput::StartStyles()
m_aStylesheet.append(OOO_STRING_SVTOOLS_RTF_STYLESHEET);
}
-void RtfAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ )
+void RtfAttributeOutput::EndStyles( sal_uInt16 /*nNumberOfStyles*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
m_rExport.Strm() << '}';
@@ -1022,7 +1022,7 @@ void RtfAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ )
m_rExport.Strm() << '}';
}
-void RtfAttributeOutput::DefaultStyle( USHORT /*nStyle*/ )
+void RtfAttributeOutput::DefaultStyle( sal_uInt16 /*nStyle*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1030,7 +1030,7 @@ void RtfAttributeOutput::DefaultStyle( USHORT /*nStyle*/ )
}
void RtfAttributeOutput::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 )
{
OSL_TRACE("%s, rName = '%s'", OSL_THIS_FUNC,
OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ).getStr());
@@ -1068,7 +1068,7 @@ void RtfAttributeOutput::EndStyle()
m_aStylesheet.append(m_rExport.sNewLine);
}
-void RtfAttributeOutput::StartStyleProperties( bool /*bParProp*/, USHORT /*nStyle*/ )
+void RtfAttributeOutput::StartStyleProperties( bool /*bParProp*/, sal_uInt16 /*nStyle*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
/* noop */
@@ -1080,7 +1080,7 @@ void RtfAttributeOutput::EndStyleProperties( bool /*bParProp*/ )
/* noop */
}
-void RtfAttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
+void RtfAttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1103,7 +1103,7 @@ void RtfAttributeOutput::PageBreakBefore( bool bBreak )
}
}
-void RtfAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo )
+void RtfAttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1146,7 +1146,7 @@ void RtfAttributeOutput::SectionFormProtection( bool bProtected )
m_aSectionBreaks.append((sal_Int32)!bProtected);
}
-void RtfAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLineNumberInfo& rLnNumInfo )
+void RtfAttributeOutput::SectionLineNumbering( sal_uLong /*nRestartNo*/, const SwLineNumberInfo& rLnNumInfo )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1201,7 +1201,7 @@ void RtfAttributeOutput::SectionBiDi( bool bBiDi )
m_rExport.Strm() << (bBiDi ? OOO_STRING_SVTOOLS_RTF_RTLSECT : OOO_STRING_SVTOOLS_RTF_LTRSECT);
}
-void RtfAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber )
+void RtfAttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1228,7 +1228,7 @@ void RtfAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRest
m_aSectionBreaks.append(pStr);
}
-void RtfAttributeOutput::SectionType( BYTE nBreakCode )
+void RtfAttributeOutput::SectionType( sal_uInt8 nBreakCode )
{
OSL_TRACE("%s, nBreakCode = %d", OSL_THIS_FUNC, nBreakCode);
@@ -1250,7 +1250,7 @@ void RtfAttributeOutput::SectionType( BYTE nBreakCode )
m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
}
-void RtfAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &/*rRule*/ )
+void RtfAttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &/*rRule*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1262,7 +1262,7 @@ void RtfAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &/*rRu
m_rExport.OutULong(nId) << '}';
}
-void RtfAttributeOutput::StartAbstractNumbering( USHORT nId )
+void RtfAttributeOutput::StartAbstractNumbering( sal_uInt16 nId )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1279,12 +1279,12 @@ void RtfAttributeOutput::EndAbstractNumbering()
m_rExport.OutULong( m_nListId ) << '}' << m_rExport.sNewLine;
}
-void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+void RtfAttributeOutput::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,
@@ -1300,7 +1300,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LISTLEVEL;
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
switch( nNumberingType )
{
case SVX_NUM_ROMAN_UPPER: nVal = 1; break;
@@ -1352,7 +1352,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
// write the levelnumbers
m_rExport.Strm() << "{" << OOO_STRING_SVTOOLS_RTF_LEVELNUMBERS;
- for( BYTE i = 0; i <= nLevel && pNumLvlPos[ i ]; ++i )
+ for( sal_uInt8 i = 0; i <= nLevel && pNumLvlPos[ i ]; ++i )
{
m_rExport.Strm() << "\\'" << m_rExport.OutHex(pNumLvlPos[ i ], 2).getStr();
}
@@ -1378,7 +1378,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
m_rExport.Strm() << '}';
}
-void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eType*/, const String& rFldCmd, BYTE /*nMode*/ )
+void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eType*/, const String& rFldCmd, sal_uInt8 /*nMode*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1465,8 +1465,8 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
const SwFrmFmt& rFrmFmt = rFrame.GetFrmFmt( );
const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx();
- ULONG nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
- ULONG nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
+ sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
+ sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
m_rExport.SaveData( nStt, nEnd );
m_rExport.mpParentFrame = &rFrame;
m_rExport.WriteText( );
@@ -2167,7 +2167,7 @@ void RtfAttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
sal_Unicode cStart = rTwoLines.GetStartBracket();
sal_Unicode cEnd = rTwoLines.GetEndBracket();
- USHORT nType;
+ sal_uInt16 nType;
if( !cStart && !cEnd )
nType = 0;
else if( '{' == cStart || '}' == cEnd )
@@ -2235,7 +2235,7 @@ void RtfAttributeOutput::TextINetFormat( const SwFmtINetFmt& rURL )
m_aStyles.append("{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " ");
if( pTxtAtr && 0 != ( pFmt = pTxtAtr->GetCharFmt() ))
{
- USHORT nStyle = m_rExport.GetId( *pFmt );
+ sal_uInt16 nStyle = m_rExport.GetId( *pFmt );
OString* pString = m_rExport.GetStyle(nStyle);
if (pString)
m_aStyles.append(*pString);
@@ -2247,7 +2247,7 @@ void RtfAttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
- USHORT nStyle = m_rExport.GetId( *rCharFmt.GetCharFmt() );
+ sal_uInt16 nStyle = m_rExport.GetId( *rCharFmt.GetCharFmt() );
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_CS);
m_aStyles.append((sal_Int32)nStyle);
OString* pString = m_rExport.GetStyle(nStyle);
@@ -2355,7 +2355,7 @@ void RtfAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop )
OSL_TRACE("%s", OSL_THIS_FUNC);
long nOffset = ((SvxLRSpaceItem&)m_rExport.GetItem( RES_LR_SPACE )).GetTxtLeft();
- for( USHORT n = 0; n < rTabStop.Count(); n++ )
+ for( sal_uInt16 n = 0; n < rTabStop.Count(); n++ )
{
const SvxTabStop & rTS = rTabStop[ n ];
if( SVX_TAB_ADJUST_DEFAULT != rTS.GetAdjustment() )
@@ -2462,7 +2462,7 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
aLR.SetTxtLeft( aLR.GetTxtLeft() + pFmt->GetIndentAt() );
aLR.SetTxtFirstLineOfst( pFmt->GetFirstLineOffset() );
- USHORT nStyle = m_rExport.GetId( *pFmt->GetCharFmt() );
+ sal_uInt16 nStyle = m_rExport.GetId( *pFmt->GetCharFmt() );
OString* pString = m_rExport.GetStyle(nStyle);
if (pString)
m_aStyles.append(*pString);
@@ -2696,10 +2696,10 @@ void RtfAttributeOutput::FormatSurround( const SwFmtSurround& rSurround )
if ( m_rExport.bOutFlyFrmAttrs && !m_rExport.bRTFFlySyntax )
{
SwSurround eSurround = rSurround.GetSurround();
- BOOL bGold = SURROUND_IDEAL == eSurround;
+ sal_Bool bGold = SURROUND_IDEAL == eSurround;
if( bGold )
eSurround = SURROUND_PARALLEL;
- RTFSurround aMC( bGold, static_cast< BYTE >(eSurround) );
+ RTFSurround aMC( bGold, static_cast< sal_uInt8 >(eSurround) );
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYMAINCNT);
m_aRunText.append( (sal_Int32) aMC.GetValue() );
}
@@ -2737,7 +2737,7 @@ void RtfAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert
}
else if ( !m_rExport.bRTFFlySyntax )
{
- RTFVertOrient aVO( static_cast< USHORT >(rFlyVert.GetVertOrient()), static_cast< USHORT >(rFlyVert.GetRelationOrient()) );
+ RTFVertOrient aVO( static_cast< sal_uInt16 >(rFlyVert.GetVertOrient()), static_cast< sal_uInt16 >(rFlyVert.GetRelationOrient()) );
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYVERT);
m_aRunText.append((sal_Int32)aVO.GetValue());
}
@@ -2774,8 +2774,8 @@ void RtfAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori
m_aRunText.append(pS);
} else if ( !m_rExport.bRTFFlySyntax )
{
- RTFHoriOrient aHO( static_cast< USHORT >(rFlyHori.GetHoriOrient()),
- static_cast< USHORT >(rFlyHori.GetRelationOrient()) );
+ RTFHoriOrient aHO( static_cast< sal_uInt16 >(rFlyHori.GetHoriOrient()),
+ static_cast< sal_uInt16 >(rFlyHori.GetRelationOrient()) );
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYHORZ);
m_aRunText.append((sal_Int32)aHO.GetValue());
}
@@ -2787,7 +2787,7 @@ void RtfAttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
if ( !m_rExport.bRTFFlySyntax )
{
- USHORT nId = static_cast< USHORT >(rAnchor.GetAnchorId());
+ sal_uInt16 nId = static_cast< sal_uInt16 >(rAnchor.GetAnchorId());
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYANCHOR);
m_aRunText.append((sal_Int32)nId);
switch( nId )
@@ -2819,12 +2819,12 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
- static USHORT __READONLY_DATA aBorders[] = {
+ static sal_uInt16 __READONLY_DATA aBorders[] = {
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT };
static const sal_Char* aBorderNames[] = {
OOO_STRING_SVTOOLS_RTF_BRDRT, OOO_STRING_SVTOOLS_RTF_BRDRL, OOO_STRING_SVTOOLS_RTF_BRDRB, OOO_STRING_SVTOOLS_RTF_BRDRR };
- USHORT nDist = rBox.GetDistance();
+ sal_uInt16 nDist = rBox.GetDistance();
if ( m_rExport.bRTFFlySyntax )
return;
@@ -2841,7 +2841,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
m_aSectionBreaks.append(OutBorderLine( m_rExport, rBox.GetTop(), OOO_STRING_SVTOOLS_RTF_BOX, nDist ));
else
{
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
const sal_Char** pBrdNms = (const sal_Char**)aBorderNames;
for(int i = 0; i < 4; ++i, ++pBrd, ++pBrdNms)
{
@@ -2853,7 +2853,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
}
}
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
const sal_Char** pBrdNms = (const sal_Char**)aBorderNames;
for( int i = 0; i < 4; ++i, ++pBrd, ++pBrdNms )
{
@@ -2871,7 +2871,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
m_aStyles.append(m_aSectionBreaks.makeStringAndClear());
}
-void RtfAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
+void RtfAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -2881,12 +2881,12 @@ void RtfAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol,
if( bEven )
{
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLSX;
- m_rExport.OutLong( rCol.GetGutterWidth( TRUE ) );
+ m_rExport.OutLong( rCol.GetGutterWidth( sal_True ) );
}
else
{
const SwColumns & rColumns = rCol.GetColumns( );
- for( USHORT n = 0; n < nCols; )
+ for( sal_uInt16 n = 0; n < nCols; )
{
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLNO;
m_rExport.OutLong( n+1 );
@@ -3086,7 +3086,7 @@ void RtfAttributeOutput::FontPitchType( FontPitch ePitch ) const
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_FPRQ;
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
switch (ePitch)
{
case PITCH_FIXED:
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index af54802aa5d6..91c0db7568f4 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -109,10 +109,10 @@ public:
/// The common attribute that can be among the run properties.
virtual void Redline( const SwRedlineData* pRedline );
- 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 );
@@ -146,26 +146,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.
@@ -173,7 +173,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();
@@ -185,7 +185,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();
@@ -199,27 +199,27 @@ 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 );
/// 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,
@@ -227,7 +227,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 );
void WriteHeaderFooter_Impl( const SwFrmFmt& rFmt, bool bHeader, const sal_Char* pStr );
@@ -401,7 +401,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& );
@@ -463,11 +463,11 @@ private:
* Current style name and its ID.
*/
String m_rStyleName;
- USHORT m_nStyleId;
+ sal_uInt16 m_nStyleId;
/*
* Current list ID.
*/
- USHORT m_nListId;
+ sal_uInt16 m_nListId;
/*
* This is needed because the call order is: run text, run properties, paragraph properties.
* What we need is the opposite.
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index f899d2160e86..357a7aff1e57 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -118,7 +118,7 @@ RtfSdrExport& RtfExport::SdrExporter() const
return *m_pSdrExport;
}
-bool RtfExport::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
+bool RtfExport::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich )
{
// FIXME is this actually true for rtf? - this is copied from DOCX
if ( nScript == i18n::ScriptType::ASIAN )
@@ -200,15 +200,15 @@ void RtfExport::WriteChar( sal_Unicode )
/* WriteChar() has nothing to do for rtf. */
}
-static bool IsExportNumRule( const SwNumRule& rRule, BYTE* pEnd = 0 )
+static bool 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 ))
@@ -225,7 +225,7 @@ void RtfExport::BuildNumbering()
{
const SwNumRuleTbl& rListTbl = pDoc->GetNumRuleTbl();
- for( USHORT n = rListTbl.Count()+1; n; )
+ for( sal_uInt16 n = rListTbl.Count()+1; n; )
{
SwNumRule* pRule;
--n;
@@ -274,7 +274,7 @@ void RtfExport::WriteRevTab()
String sUnknown(RTL_CONSTASCII_USTRINGPARAM("Unknown"));
GetRedline(sUnknown);
- for( USHORT i = 0; i < pDoc->GetRedlineTbl().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pDoc->GetRedlineTbl().Count(); ++i )
{
const SwRedline* pRedl = pDoc->GetRedlineTbl()[ i ];
@@ -283,7 +283,7 @@ void RtfExport::WriteRevTab()
// Now write the table
Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_REVTBL << ' ';
- for(USHORT i = 0; i < m_aRedlineTbl.size(); ++i)
+ for(sal_uInt16 i = 0; i < m_aRedlineTbl.size(); ++i)
{
const String* pAuthor = GetRedline(i);
Strm() << '{';
@@ -294,8 +294,8 @@ void RtfExport::WriteRevTab()
Strm() << '}' << sNewLine;
}
-void RtfExport::WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE /*nBreakCode*/ )
+void RtfExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 /*nBreakCode*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -320,7 +320,7 @@ void RtfExport::WriteHeadersFooters( BYTE nHeadFootFlags,
WriteHeaderFooter( rFirstPageFmt, false, OOO_STRING_SVTOOLS_RTF_FOOTERF );
}
-void RtfExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, BYTE nMode )
+void RtfExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, sal_uInt8 nMode )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -375,7 +375,7 @@ void RtfExport::DoFormText(const SwInputField* pFld )
m_pAttrOutput->RunText().append( OutString( sResult, eDefaultEncoding )).append( "}}" );
}
-ULONG RtfExport::ReplaceCr( BYTE )
+sal_uLong RtfExport::ReplaceCr( sal_uInt8 )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -450,14 +450,14 @@ void RtfExport::WritePageDescTable()
OSL_TRACE("%s", OSL_THIS_FUNC);
// Write page descriptions (page styles)
- USHORT nSize = pDoc->GetPageDescCnt();
+ sal_uInt16 nSize = pDoc->GetPageDescCnt();
if( !nSize )
return;
Strm() << sNewLine; // a separator
- bOutPageDescs = TRUE;
+ bOutPageDescs = sal_True;
Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_PGDSCTBL;
- for( USHORT n = 0; n < nSize; ++n )
+ for( sal_uInt16 n = 0; n < nSize; ++n )
{
const SwPageDesc& rPageDesc =
const_cast<const SwDoc*>(pDoc)->GetPageDesc( n );
@@ -466,10 +466,10 @@ void RtfExport::WritePageDescTable()
OutULong( n ) << OOO_STRING_SVTOOLS_RTF_PGDSCUSE;
OutULong( rPageDesc.ReadUseOn() );
- OutPageDescription( rPageDesc, FALSE, FALSE );
+ OutPageDescription( rPageDesc, sal_False, sal_False );
// search for the next page description
- USHORT i = nSize;
+ sal_uInt16 i = nSize;
while( i )
if( rPageDesc.GetFollow() ==
&const_cast<const SwDoc *>(pDoc)->GetPageDesc( --i ) )
@@ -479,7 +479,7 @@ void RtfExport::WritePageDescTable()
Strm() << OutString( rPageDesc.GetName(), eDefaultEncoding) << ";}";
}
Strm() << '}' << sNewLine;
- bOutPageDescs = FALSE;
+ bOutPageDescs = sal_False;
}
void RtfExport::ExportDocument_Impl()
@@ -562,7 +562,7 @@ void RtfExport::ExportDocument_Impl()
if( pSet )
{
- USHORT nPosInDoc;
+ sal_uInt16 nPosInDoc;
pSttPgDsc = (SwFmtPageDesc*)&pSet->Get( RES_PAGEDESC );
if( !pSttPgDsc->GetPageDesc() )
pSttPgDsc = 0;
@@ -618,7 +618,7 @@ void RtfExport::ExportDocument_Impl()
// All sections are unlocked by default
Strm() << OOO_STRING_SVTOOLS_RTF_SECTUNLOCKED;
OutLong(1);
- OutPageDescription( rPageDesc, FALSE, TRUE ); // Changed bCheckForFirstPage to TRUE so headers
+ OutPageDescription( rPageDesc, sal_False, sal_True ); // Changed bCheckForFirstPage to sal_True so headers
// following title page are correctly added - i13107
if( pSttPgDsc )
{
@@ -706,7 +706,7 @@ void RtfExport::PrepareNewPageDesc( const SfxItemSet* pSet,
{
OSL_TRACE("%s", OSL_THIS_FUNC);
const SwSectionFmt* pFmt = GetSectionFormat( rNd );
- const ULONG nLnNm = GetSectionLineNo( pSet, rNd );
+ const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd );
OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
@@ -755,7 +755,7 @@ void RtfExport::OutputOLENode( const SwOLENode& )
/* noop, see RtfAttributeOutput::FlyFrameOLE */
}
-void RtfExport::AppendSection( const SwPageDesc* pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum )
+void RtfExport::AppendSection( const SwPageDesc* pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -801,7 +801,7 @@ SvStream& RtfExport::Strm()
return m_pWriter->Strm();
}
-SvStream& RtfExport::OutULong( ULONG nVal )
+SvStream& RtfExport::OutULong( sal_uLong nVal )
{
return m_pWriter->OutULong( Strm(), nVal );
}
@@ -821,7 +821,7 @@ void RtfExport::OutUnicode(const sal_Char *pToken, const String &rContent)
}
}
-OString RtfExport::OutHex(ULONG nHex, BYTE nLen)
+OString RtfExport::OutHex(sal_uLong nHex, sal_uInt8 nLen)
{
sal_Char aNToABuf[] = "0000000000000000";
@@ -831,7 +831,7 @@ OString RtfExport::OutHex(ULONG nHex, BYTE nLen)
// Set pointer to the buffer end
sal_Char* pStr = aNToABuf + (sizeof(aNToABuf)-1);
- for( BYTE n = 0; n < nLen; ++n )
+ for( sal_uInt8 n = 0; n < nLen; ++n )
{
*(--pStr) = (sal_Char)(nHex & 0xf ) + 48;
if( *pStr > '9' )
@@ -950,20 +950,20 @@ void RtfExport::OutDateTime(const sal_Char* pStr, const util::DateTime& rDT )
OutULong( rDT.Minutes ) << '}';
}
-USHORT RtfExport::GetColor( const Color& rColor ) const
+sal_uInt16 RtfExport::GetColor( const Color& rColor ) const
{
for (RtfColorTbl::const_iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); it++ )
if ((*it).second == rColor) {
OSL_TRACE("%s returning %d (%d,%d,%d)", OSL_THIS_FUNC, (*it).first, rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue());
return (*it).first;
}
- OSL_ENSURE( FALSE, "No such Color in m_aColTbl!" );
+ OSL_ENSURE( sal_False, "No such Color in m_aColTbl!" );
return 0;
}
void RtfExport::InsColor( const Color& rCol )
{
- USHORT n;
+ sal_uInt16 n;
for (RtfColorTbl::iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); it++ )
if ((*it).second == rCol)
return; // Already in the table
@@ -977,7 +977,7 @@ void RtfExport::InsColor( const Color& rCol )
if (!n)
n++;
}
- m_aColTbl.insert(std::pair<USHORT,Color>( n, rCol ));
+ m_aColTbl.insert(std::pair<sal_uInt16,Color>( n, rCol ));
}
void RtfExport::InsColorLine( const SvxBoxItem& rBox )
@@ -1039,10 +1039,10 @@ void RtfExport::OutColorTable()
}
// background color
- static const USHORT aBrushIds[] = {
+ static const sal_uInt16 aBrushIds[] = {
RES_BACKGROUND, RES_CHRATR_BACKGROUND, 0 };
- for( const USHORT* pIds = aBrushIds; *pIds; ++pIds )
+ for( const sal_uInt16* pIds = aBrushIds; *pIds; ++pIds )
{
const SvxBrushItem* pBkgrd = (const SvxBrushItem*)GetDfltAttr( *pIds );
InsColor( pBkgrd->GetColor() );
@@ -1111,41 +1111,41 @@ void RtfExport::OutColorTable()
}
}
-void RtfExport::InsStyle( USHORT nId, const OString& rStyle )
+void RtfExport::InsStyle( sal_uInt16 nId, const OString& rStyle )
{
- m_aStyTbl.insert(std::pair<USHORT,OString>(nId, rStyle) );
+ m_aStyTbl.insert(std::pair<sal_uInt16,OString>(nId, rStyle) );
}
-OString* RtfExport::GetStyle( USHORT nId )
+OString* RtfExport::GetStyle( sal_uInt16 nId )
{
- std::map<USHORT,OString>::iterator i = m_aStyTbl.find(nId);
+ std::map<sal_uInt16,OString>::iterator i = m_aStyTbl.find(nId);
if (i != m_aStyTbl.end())
return &i->second;
return NULL;
}
-USHORT RtfExport::GetRedline( const String& rAuthor )
+sal_uInt16 RtfExport::GetRedline( const String& rAuthor )
{
- std::map<String,USHORT>::iterator i = m_aRedlineTbl.find(rAuthor);
+ std::map<String,sal_uInt16>::iterator i = m_aRedlineTbl.find(rAuthor);
if (i != m_aRedlineTbl.end())
return i->second;
else
{
int nId = m_aRedlineTbl.size();
- m_aRedlineTbl.insert(std::pair<String,USHORT>(rAuthor,nId));
+ m_aRedlineTbl.insert(std::pair<String,sal_uInt16>(rAuthor,nId));
return nId;
}
}
-const String* RtfExport::GetRedline( USHORT nId )
+const String* RtfExport::GetRedline( sal_uInt16 nId )
{
- for(std::map<String,USHORT>::iterator aIter = m_aRedlineTbl.begin(); aIter != m_aRedlineTbl.end(); ++aIter)
+ for(std::map<String,sal_uInt16>::iterator aIter = m_aRedlineTbl.begin(); aIter != m_aRedlineTbl.end(); ++aIter)
if ((*aIter).second == nId)
return &(*aIter).first;
return NULL;
}
-void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage )
+void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, sal_Bool bWriteReset, sal_Bool bCheckForFirstPage )
{
OSL_TRACE("%s start", OSL_THIS_FUNC);
const SwPageDesc *pSave = pAktPageDesc;
@@ -1173,10 +1173,10 @@ void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset,
// normal header / footer (without a style)
const SfxPoolItem* pItem;
- if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_HEADER, FALSE,
+ if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_HEADER, sal_False,
&pItem ) == SFX_ITEM_SET)
WriteHeaderFooter(*pItem, true);
- if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_FOOTER, FALSE,
+ if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_FOOTER, sal_False,
&pItem ) == SFX_ITEM_SET)
WriteHeaderFooter(*pItem, false);
@@ -1186,10 +1186,10 @@ void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset,
pAktPageDesc = &rPgDsc;
Strm() << OOO_STRING_SVTOOLS_RTF_TITLEPG;
if( pAktPageDesc->GetMaster().GetAttrSet().GetItemState( RES_HEADER,
- FALSE, &pItem ) == SFX_ITEM_SET )
+ sal_False, &pItem ) == SFX_ITEM_SET )
WriteHeaderFooter(*pItem, true);
if( pAktPageDesc->GetMaster().GetAttrSet().GetItemState( RES_FOOTER,
- FALSE, &pItem ) == SFX_ITEM_SET )
+ sal_False, &pItem ) == SFX_ITEM_SET )
WriteHeaderFooter(*pItem, false);
}
@@ -1246,7 +1246,7 @@ class SwRTFWriter : public Writer
public:
SwRTFWriter( const String& rFilterName, const String& rBaseURL );
virtual ~SwRTFWriter();
- virtual ULONG WriteStream();
+ virtual sal_uLong WriteStream();
};
SwRTFWriter::SwRTFWriter( const String& /*rFltName*/, const String & rBaseURL )
@@ -1258,7 +1258,7 @@ SwRTFWriter::SwRTFWriter( const String& /*rFltName*/, const String & rBaseURL )
SwRTFWriter::~SwRTFWriter()
{}
-ULONG SwRTFWriter::WriteStream()
+sal_uLong SwRTFWriter::WriteStream()
{
OSL_TRACE("%s", OSL_THIS_FUNC);
RtfExport aExport( NULL, pDoc, new SwPaM( *pCurPam->End(), *pCurPam->Start() ), pCurPam, this );
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index 1a26607ffd6a..e73cd9b822c5 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -40,9 +40,9 @@
class RtfExportFilter;
class RtfSdrExport;
-typedef std::map<USHORT,Color> RtfColorTbl;
-typedef std::map<USHORT,rtl::OString> RtfStyleTbl;
-typedef std::map<String,USHORT> RtfRedlineTbl;
+typedef std::map<sal_uInt16,Color> RtfColorTbl;
+typedef std::map<sal_uInt16,rtl::OString> RtfStyleTbl;
+typedef std::map<String,sal_uInt16> RtfRedlineTbl;
class SwNode;
class SwEndNode;
class SwTableNode;
@@ -85,7 +85,7 @@ public:
virtual bool HackIsWW8OrHigher() const { return false; }
/// 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 );
@@ -101,12 +101,12 @@ public:
virtual void WriteRevTab();
/// Output the actual headers and footers.
- virtual void WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE nBreakCode );
+ virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode );
/// 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 );
@@ -120,7 +120,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.
@@ -143,7 +143,7 @@ protected:
/// Output SwOLENode
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 );
public:
/// Pass the pDocument, pCurrentPam and pOriginalPam to the base class.
@@ -164,26 +164,26 @@ public:
/// This is used by OutputFlyFrame_Impl() to control the written syntax
bool bRTFFlySyntax;
- BOOL m_bOutStyleTab : 1;
+ sal_Bool m_bOutStyleTab : 1;
SvStream& Strm();
- SvStream& OutULong( ULONG nVal );
+ SvStream& OutULong( sal_uLong nVal );
SvStream& OutLong( long nVal );
void OutUnicode(const sal_Char *pToken, const String &rContent);
void OutDateTime(const sal_Char* pStr, const util::DateTime& rDT );
static rtl::OString OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc);
static rtl::OString OutString(const String &rStr, rtl_TextEncoding eDestEnc);
- static rtl::OString OutHex(ULONG nHex, BYTE nLen);
- void OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage );
+ static rtl::OString OutHex(sal_uLong nHex, sal_uInt8 nLen);
+ void OutPageDescription( const SwPageDesc& rPgDsc, sal_Bool bWriteReset, sal_Bool bCheckForFirstPage );
- USHORT GetColor( const Color& rColor ) const;
+ sal_uInt16 GetColor( const Color& rColor ) const;
void InsColor( const Color& rCol );
void InsColorLine( const SvxBoxItem& rBox );
void OutColorTable();
- USHORT GetRedline( const String& rAuthor );
- const String* GetRedline( USHORT nId );
+ sal_uInt16 GetRedline( const String& rAuthor );
+ const String* GetRedline( sal_uInt16 nId );
- void InsStyle( USHORT nId, const rtl::OString& rStyle );
- rtl::OString* GetStyle( USHORT nId );
+ void InsStyle( sal_uInt16 nId, const rtl::OString& rStyle );
+ rtl::OString* GetStyle( sal_uInt16 nId );
private:
/// No copying.
diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx
index e3ccc3a9d3f9..d4595eab27b6 100644
--- a/sw/source/filter/ww8/rtfexportfilter.hxx
+++ b/sw/source/filter/ww8/rtfexportfilter.hxx
@@ -40,7 +40,7 @@
class RtfWriter : public Writer
{
protected:
- ULONG WriteStream() { return 0; }
+ sal_uLong WriteStream() { return 0; }
};
/// The physical access to the RTF document (for writing).
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index 567ddd664dd3..f016cb0c46fc 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -88,7 +88,7 @@ RtfSdrExport::~RtfSdrExport()
delete[] m_pShapeTypeWritten, m_pShapeTypeWritten = NULL;
}
-void RtfSdrExport::OpenContainer( UINT16 nEscherContainer, int nRecInstance )
+void RtfSdrExport::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -121,7 +121,7 @@ void RtfSdrExport::CloseContainer()
EscherEx::CloseContainer();
}
-UINT32 RtfSdrExport::EnterGroup( const String& /*rShapeName*/, const Rectangle* /*pRect*/ )
+sal_uInt32 RtfSdrExport::EnterGroup( const String& /*rShapeName*/, const Rectangle* /*pRect*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -135,7 +135,7 @@ void RtfSdrExport::LeaveGroup()
/* noop */
}
-void RtfSdrExport::AddShape( UINT32 nShapeType, UINT32 nShapeFlags, UINT32 /*nShapeId*/ )
+void RtfSdrExport::AddShape( sal_uInt32 nShapeType, sal_uInt32 nShapeFlags, sal_uInt32 /*nShapeId*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -520,10 +520,10 @@ void RtfSdrExport::WriteOutliner(const OutlinerParaObject& rParaObj)
const EditTextObject& rEditObj = rParaObj.GetTextObject();
MSWord_SdrAttrIter aAttrIter( m_rExport, rEditObj, TXT_HFTXTBOX );
- USHORT nPara = rEditObj.GetParagraphCount();
+ sal_uInt16 nPara = rEditObj.GetParagraphCount();
m_rAttrOutput.RunText().append('{').append(OOO_STRING_SVTOOLS_RTF_SHPTXT).append(' ');
- for (USHORT n = 0; n < nPara; ++n)
+ for (sal_uInt16 n = 0; n < nPara; ++n)
{
if( n )
aAttrIter.NextPara( n );
@@ -577,7 +577,7 @@ void RtfSdrExport::EndShape( sal_Int32 nShapeElement )
}
}
-UINT32 RtfSdrExport::AddSdrObject( const SdrObject& rObj )
+sal_uInt32 RtfSdrExport::AddSdrObject( const SdrObject& rObj )
{
m_pSdrObject = &rObj;
return EscherEx::AddSdrObject(rObj);
diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx
index f69b8bccab96..ee161f8cde0d 100644
--- a/sw/source/filter/ww8/rtfsdrexport.hxx
+++ b/sw/source/filter/ww8/rtfsdrexport.hxx
@@ -67,7 +67,7 @@ public:
/// Export the sdr object as Sdr.
///
/// Call this when you need to export the object as Sdr in RTF.
- UINT32 AddSdrObject( const SdrObject& rObj );
+ sal_uInt32 AddSdrObject( const SdrObject& rObj );
protected:
/// Add an attribute to the generated shape element.
@@ -92,14 +92,14 @@ protected:
private:
- virtual void OpenContainer( UINT16 nEscherContainer, int nRecInstance = 0 );
+ virtual void OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance = 0 );
virtual void CloseContainer();
using EscherEx::EnterGroup;
- virtual UINT32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 );
+ virtual sal_uInt32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 );
virtual void LeaveGroup();
- virtual void AddShape( UINT32 nShapeType, UINT32 nShapeFlags, UINT32 nShapeId = 0 );
+ virtual void AddShape( sal_uInt32 nShapeType, sal_uInt32 nShapeFlags, sal_uInt32 nShapeId = 0 );
private:
/// Add starting and ending point of a line to the m_pShapeAttrList.
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 663df5db7b0e..5328d377e7a6 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -129,7 +129,7 @@ namespace
};
// <--
- bool IsValidSlotWhich(USHORT nSlotId, USHORT nWhichId)
+ bool IsValidSlotWhich(sal_uInt16 nSlotId, sal_uInt16 nWhichId)
{
return (nSlotId != 0 && nWhichId != 0 && nSlotId != nWhichId);
}
@@ -144,8 +144,8 @@ namespace
sw::Frames SwPosFlyFrmsToFrames(const SwPosFlyFrms &rFlys)
{
sw::Frames aRet;
- USHORT nEnd = rFlys.Count();
- for (USHORT nI = 0; nI < nEnd; ++nI)
+ sal_uInt16 nEnd = rFlys.Count();
+ for (sal_uInt16 nI = 0; nI < nEnd; ++nI)
{
const SwFrmFmt &rEntry = rFlys[nI]->GetFmt();
if (const SwPosition* pAnchor = rEntry.GetAnchor().GetCntntAnchor())
@@ -165,9 +165,9 @@ namespace
class anchoredto: public std::unary_function<const sw::Frame&, bool>
{
private:
- ULONG mnNode;
+ sal_uLong mnNode;
public:
- anchoredto(ULONG nNode) : mnNode(nNode) {}
+ anchoredto(sal_uLong nNode) : mnNode(nNode) {}
bool operator()(const sw::Frame &rFrame) const
{
return (mnNode == rFrame.GetPosition().nNode.GetNode().GetIndex());
@@ -268,10 +268,10 @@ namespace sw
namespace hack
{
- USHORT TransformWhichBetweenPools(const SfxItemPool &rDestPool,
- const SfxItemPool &rSrcPool, USHORT nWhich)
+ sal_uInt16 TransformWhichBetweenPools(const SfxItemPool &rDestPool,
+ const SfxItemPool &rSrcPool, sal_uInt16 nWhich)
{
- USHORT nSlotId = rSrcPool.GetSlotId(nWhich);
+ sal_uInt16 nSlotId = rSrcPool.GetSlotId(nWhich);
if (IsValidSlotWhich(nSlotId, nWhich))
nWhich = rDestPool.GetWhich(nSlotId);
else
@@ -279,8 +279,8 @@ namespace sw
return nWhich;
}
- USHORT GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
- const SwDoc &rDoc, USHORT nWhich)
+ sal_uInt16 GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
+ const SwDoc &rDoc, sal_uInt16 nWhich)
{
if (RES_WHICHHINT_END < *(rSet.GetRanges()))
{
@@ -373,7 +373,7 @@ namespace sw
void DumpStream(const SvStream &rSrc, SvStream &rDest, sal_uInt32 nLen)
{
SvStream &rSource = const_cast<SvStream&>(rSrc);
- ULONG nOrigPos = rSource.Tell();
+ sal_uLong nOrigPos = rSource.Tell();
if (nLen == STREAM_SEEK_TO_END)
{
rSource.Seek(STREAM_SEEK_TO_END);
@@ -470,8 +470,8 @@ namespace sw
{
if( bExportParentItemSet )
{
- USHORT nTotal = rSet.TotalCount();
- for( USHORT nItem =0; nItem < nTotal; ++nItem )
+ sal_uInt16 nTotal = rSet.TotalCount();
+ for( sal_uInt16 nItem =0; nItem < nTotal; ++nItem )
{
const SfxPoolItem* pItem = 0;
if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetWhichByPos( nItem ), true, &pItem ) )
@@ -525,7 +525,7 @@ namespace sw
mysizet nCount = pColls ? pColls->Count() : 0;
aStyles.reserve(nCount);
for (mysizet nI = 0; nI < nCount; ++nI)
- aStyles.push_back((*pColls)[ static_cast< USHORT >(nI) ]);
+ aStyles.push_back((*pColls)[ static_cast< sal_uInt16 >(nI) ]);
return aStyles;
}
@@ -574,7 +574,7 @@ namespace sw
SwPosFlyFrms aFlys;
rDoc.GetAllFlyFmts(aFlys, pPaM, true);
sw::Frames aRet(SwPosFlyFrmsToFrames(aFlys));
- for (USHORT i = aFlys.Count(); i > 0;)
+ for (sal_uInt16 i = aFlys.Count(); i > 0;)
delete aFlys[--i];
return aRet;
}
@@ -584,8 +584,8 @@ namespace sw
const SwNode &rStart, const SwNode &rEnd)
{
Frames aRet;
- ULONG nEnd = rEnd.GetIndex();
- for (ULONG nI = rStart.GetIndex(); nI < nEnd; ++nI)
+ sal_uLong nEnd = rEnd.GetIndex();
+ for (sal_uLong nI = rStart.GetIndex(); nI < nEnd; ++nI)
{
my_copy_if(rFrames.begin(), rFrames.end(),
std::back_inserter(aRet), anchoredto(nI));
@@ -610,7 +610,7 @@ namespace sw
0 != (pRule = rTxtNode.GetNumRule())
)
{
- return &(pRule->Get( static_cast< USHORT >(rTxtNode.GetActualListLevel()) ));
+ return &(pRule->Get( static_cast< sal_uInt16 >(rTxtNode.GetActualListLevel()) ));
}
ASSERT(rTxtNode.GetDoc(), "No document for node?, suspicious");
@@ -622,7 +622,7 @@ namespace sw
0 != (pRule = rTxtNode.GetDoc()->GetOutlineNumRule())
)
{
- return &(pRule->Get( static_cast< USHORT >(rTxtNode.GetActualListLevel()) ));
+ return &(pRule->Get( static_cast< sal_uInt16 >(rTxtNode.GetActualListLevel()) ));
}
return 0;
@@ -846,16 +846,16 @@ namespace sw
std::for_each(maStack.begin(), maStack.end(), SetInDocAndDelete(mrDoc));
}
- USHORT WrtRedlineAuthor::AddName( const String& rNm )
+ sal_uInt16 WrtRedlineAuthor::AddName( const String& rNm )
{
- USHORT nRet;
+ sal_uInt16 nRet;
typedef std::vector<String>::iterator myiter;
myiter aIter = std::find(maAuthors.begin(), maAuthors.end(), rNm);
if (aIter != maAuthors.end())
- nRet = static_cast< USHORT >(aIter - maAuthors.begin());
+ nRet = static_cast< sal_uInt16 >(aIter - maAuthors.begin());
else
{
- nRet = static_cast< USHORT >(maAuthors.size());
+ nRet = static_cast< sal_uInt16 >(maAuthors.size());
maAuthors.push_back(rNm);
}
return nRet;
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index 9e425714aad7..a2e3b95fcea0 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -851,8 +851,8 @@ namespace sw
@author
<a href="mailto:cmc@openoffice.org">Caol&aacute;n McNamara</a>
*/
- USHORT TransformWhichBetweenPools(const SfxItemPool &rDestPool,
- const SfxItemPool &rSrcPool, USHORT nWhich);
+ sal_uInt16 TransformWhichBetweenPools(const SfxItemPool &rDestPool,
+ const SfxItemPool &rSrcPool, sal_uInt16 nWhich);
/** Map a SwDoc WhichId to the equivalent Id for a given SfxItemSet
@@ -881,8 +881,8 @@ namespace sw
@author
<a href="mailto:cmc@openoffice.org">Caol&aacute;n McNamara</a>
*/
- USHORT GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
- const SwDoc &rDoc, USHORT nWhich);
+ sal_uInt16 GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
+ const SwDoc &rDoc, sal_uInt16 nWhich);
/** Make inserting an OLE object into a Writer document easy
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index 15baac0f3498..f00df65478eb 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -792,25 +792,25 @@ namespace sw
DateTime aDateTime(Date( 0 ), Time( 0 ));
if( lDTTM )
{
- USHORT lMin = (USHORT)(lDTTM & 0x0000003F);
+ sal_uInt16 lMin = (sal_uInt16)(lDTTM & 0x0000003F);
lDTTM >>= 6;
- USHORT lHour= (USHORT)(lDTTM & 0x0000001F);
+ sal_uInt16 lHour= (sal_uInt16)(lDTTM & 0x0000001F);
lDTTM >>= 5;
- USHORT lDay = (USHORT)(lDTTM & 0x0000001F);
+ sal_uInt16 lDay = (sal_uInt16)(lDTTM & 0x0000001F);
lDTTM >>= 5;
- USHORT lMon = (USHORT)(lDTTM & 0x0000000F);
+ sal_uInt16 lMon = (sal_uInt16)(lDTTM & 0x0000000F);
lDTTM >>= 4;
- USHORT lYear= (USHORT)(lDTTM & 0x000001FF) + 1900;
+ sal_uInt16 lYear= (sal_uInt16)(lDTTM & 0x000001FF) + 1900;
aDateTime = DateTime(Date(lDay, lMon, lYear), Time(lHour, lMin));
}
return aDateTime;
}
- ULONG MSDateTimeFormatToSwFormat(String& rParams,
- SvNumberFormatter *pFormatter, USHORT &rLang, bool bHijri)
+ sal_uLong MSDateTimeFormatToSwFormat(String& rParams,
+ SvNumberFormatter *pFormatter, sal_uInt16 &rLang, bool bHijri)
{
// tell the Formatter about the new entry
- UINT16 nCheckPos = 0;
+ sal_uInt16 nCheckPos = 0;
short nType = NUMBERFORMAT_DEFINED;
sal_uInt32 nKey = 0;
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 306c9f6df78c..bae95df4f735 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -209,19 +209,19 @@ void WW8Export::DoComboBox(const rtl::OUString &rName,
OutputField(0, ww::eFORMDROPDOWN, FieldString(ww::eFORMDROPDOWN),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry( Strm().Tell() );
WriteChar( 0x01 );
- static BYTE aArr1[] =
+ static sal_uInt8 aArr1[] =
{
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32( pDataAdr, nDataStt );
pChpPlc->AppendFkpEntry(Strm().Tell(), sizeof(aArr1), aArr1);
@@ -256,18 +256,18 @@ void WW8Export::DoCheckBox(uno::Reference<beans::XPropertySet> xPropSet)
OutputField(0, ww::eFORMCHECKBOX, FieldString(ww::eFORMCHECKBOX),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry( Strm().Tell() );
WriteChar( 0x01 );
- static BYTE aArr1[] = {
+ static sal_uInt8 aArr1[] = {
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32( pDataAdr, nDataStt );
pChpPlc->AppendFkpEntry(Strm().Tell(),
@@ -316,18 +316,18 @@ void WW8Export::DoFormText(const SwInputField * pFld)
OutputField(0, ww::eFORMTEXT, FieldString(ww::eFORMTEXT),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry( Strm().Tell() );
WriteChar( 0x01 );
- static BYTE aArr1[] = {
+ static sal_uInt8 aArr1[] = {
0x02, 0x08, 0x81, // sprmCFFldVanish
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01 // sprmCFSpec
};
- BYTE* pDataAdr = aArr1 + 5;
+ sal_uInt8* pDataAdr = aArr1 + 5;
Set_UInt32( pDataAdr, nDataStt );
pChpPlc->AppendFkpEntry(Strm().Tell(),
@@ -346,7 +346,7 @@ void WW8Export::DoFormText(const SwInputField * pFld)
String const fieldStr( pFld->ExpandField(true) );
SwWW8Writer::WriteString16(Strm(), fieldStr, false);
- static BYTE aArr2[] = {
+ static sal_uInt8 aArr2[] = {
0x03, 0x6a, 0x00, 0x00, 0x00, 0x00, // sprmCPicLocation
0x55, 0x08, 0x01, // sprmCFSpec
0x75, 0x08, 0x01 // ???
@@ -550,7 +550,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
}
// <--
- INT32 nThick = aIter->mnThick;
+ sal_Int32 nThick = aIter->mnThick;
//If we are being exported as an inline hack, set
//corner to 0 and forget about border thickness for positioning
@@ -578,7 +578,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
SwWW8Writer::WriteLong(*rWrt.pTableStrm,aRect.Bottom() - nThick);
//fHdr/bx/by/wr/wrk/fRcaSimple/fBelowText/fAnchorLock
- USHORT nFlags=0;
+ sal_uInt16 nFlags=0;
//If nFlags isn't 0x14 its overridden by the escher properties
if (FLY_AT_PAGE == rFmt.GetAnchor().GetAnchorId())
nFlags = 0x0000;
@@ -586,7 +586,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
nFlags = 0x0014; // x-rel to text, y-rel to text
const SwFmtSurround& rSurr = rFmt.GetSurround();
- USHORT nContour = rSurr.IsContour() ? 0x0080 : 0x0040;
+ sal_uInt16 nContour = rSurr.IsContour() ? 0x0080 : 0x0040;
SwSurround eSurround = rSurr.GetSurround();
/*
@@ -707,7 +707,7 @@ bool PlcDrawObj::Append( WW8Export& rWrt, WW8_CP nCp, const sw::Frame& rFmt,
return bRet;
}
-void DrawObj::SetShapeDetails(UINT32 nId, INT32 nThick)
+void DrawObj::SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick)
{
mnShapeId = nId;
mnThick = nThick;
@@ -733,7 +733,7 @@ bool WW8_WrPlcTxtBoxes::WriteTxt( WW8Export& rWrt )
return bRet;
}
-void WW8_WrPlcTxtBoxes::Append( const SdrObject& rObj, UINT32 nShapeId )
+void WW8_WrPlcTxtBoxes::Append( const SdrObject& rObj, sal_uInt32 nShapeId )
{
void* p = (void*)&rObj;
aCntnt.Insert( p, aCntnt.Count() );
@@ -747,9 +747,9 @@ const SvULongs* WW8_WrPlcTxtBoxes::GetShapeIdArr() const
/* */
-UINT32 WW8Export::GetSdrOrdNum( const SwFrmFmt& rFmt ) const
+sal_uInt32 WW8Export::GetSdrOrdNum( const SwFrmFmt& rFmt ) const
{
- UINT32 nOrdNum;
+ sal_uInt32 nOrdNum;
const SdrObject* pObj = rFmt.FindRealSdrObject();
if( pObj )
nOrdNum = pObj->GetOrdNum();
@@ -813,7 +813,7 @@ void WW8Export::AppendFlyInFlys(const sw::Frame& rFrmFmt,
}
MSWord_SdrAttrIter::MSWord_SdrAttrIter( MSWordExportBase& rWr,
- const EditTextObject& rEditObj, BYTE nTyp )
+ const EditTextObject& rEditObj, sal_uInt8 nTyp )
: MSWordAttrIter( rWr ), pEditObj(&rEditObj), pEditPool(0),
aTxtAtrArr( 0, 4 ), aChrTxtAtrArr( 0, 4 ), aChrSetArr( 0, 4 ),
mnTyp(nTyp)
@@ -821,7 +821,7 @@ MSWord_SdrAttrIter::MSWord_SdrAttrIter( MSWordExportBase& rWr,
NextPara( 0 );
}
-void MSWord_SdrAttrIter::NextPara( USHORT nPar )
+void MSWord_SdrAttrIter::NextPara( sal_uInt16 nPar )
{
nPara = nPar;
// Attributwechsel an Pos 0 wird ignoriert, da davon ausgegangen
@@ -906,7 +906,7 @@ void MSWord_SdrAttrIter::SetCharSet(const EECharAttrib& rAttr, bool bStart)
if( p )
{
- USHORT nPos;
+ sal_uInt16 nPos;
if( bStart )
{
nPos = aChrSetArr.Count();
@@ -927,7 +927,7 @@ void MSWord_SdrAttrIter::OutEEField(const SfxPoolItem& rHt)
const SvxFieldData *pFld = rField.GetField();
if (pFld && pFld->ISA(SvxURLField))
{
- BYTE nOldTxtTyp = m_rExport.nTxtTyp;
+ sal_uInt8 nOldTxtTyp = m_rExport.nTxtTyp;
m_rExport.nTxtTyp = mnTyp;
const SvxURLField *pURL = (const SvxURLField *)pFld;
m_rExport.AttrOutput().StartURL( pURL->GetURL(), pURL->GetTargetFrame() );
@@ -953,7 +953,7 @@ void MSWord_SdrAttrIter::OutAttr( xub_StrLen nSwPos )
const SfxItemPool& rDstPool = m_rExport.pDoc->GetAttrPool();
nTmpSwPos = nSwPos;
- USHORT i, nWhich, nSlotId;
+ sal_uInt16 i, nWhich, nSlotId;
for( i = 0; i < aTxtAtrArr.Count(); i++ )
{
const EECharAttrib& rHt = aTxtAtrArr[ i ];
@@ -999,7 +999,7 @@ void MSWord_SdrAttrIter::OutAttr( xub_StrLen nSwPos )
bool MSWord_SdrAttrIter::IsTxtAttr(xub_StrLen nSwPos)
{
- for (USHORT i = 0; i < aTxtAtrArr.Count(); ++i)
+ for (sal_uInt16 i = 0; i < aTxtAtrArr.Count(); ++i)
{
const EECharAttrib& rHt = aTxtAtrArr[ i ];
if (nSwPos >= rHt.nStart && nSwPos < rHt.nEnd)
@@ -1022,14 +1022,14 @@ bool MSWord_SdrAttrIter::IsTxtAttr(xub_StrLen nSwPos)
// Attribut-Anfangposition fragen kann.
// Es koennen nur Attribute mit Ende abgefragt werden.
// Es wird mit bDeep gesucht
-const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(USHORT nWhich) const
+const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(sal_uInt16 nWhich) const
{
const SfxPoolItem* pRet = 0;
nWhich = sw::hack::TransformWhichBetweenPools(*pEditPool,
m_rExport.pDoc->GetAttrPool(), nWhich);
if (nWhich)
{
- for (USHORT i = 0; i < aTxtAtrArr.Count(); ++i)
+ for (sal_uInt16 i = 0; i < aTxtAtrArr.Count(); ++i)
{
const EECharAttrib& rHt = aTxtAtrArr[i];
if (
@@ -1047,7 +1047,7 @@ const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(USHORT nWhich) const
return pRet;
}
-const SfxPoolItem& MSWord_SdrAttrIter::GetItem( USHORT nWhich ) const
+const SfxPoolItem& MSWord_SdrAttrIter::GetItem( sal_uInt16 nWhich ) const
{
using sw::hack::GetSetWhichFromSwDocWhich;
const SfxPoolItem* pRet = HasTextItem(nWhich);
@@ -1076,7 +1076,7 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr)
* pDstPool = &m_rExport.pDoc->GetAttrPool();
do {
- USHORT nWhich = pItem->Which(),
+ sal_uInt16 nWhich = pItem->Which(),
nSlotId = pSrcPool->GetSlotId( nWhich );
if ( nSlotId && nWhich != nSlotId &&
@@ -1097,7 +1097,7 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr)
}
}
-void WW8Export::WriteSdrTextObj(const SdrObject& rObj, BYTE nTyp)
+void WW8Export::WriteSdrTextObj(const SdrObject& rObj, sal_uInt8 nTyp)
{
const SdrTextObj* pTxtObj = PTR_CAST(SdrTextObj, &rObj);
ASSERT(pTxtObj, "That is no SdrTextObj!");
@@ -1130,15 +1130,15 @@ void WW8Export::WriteSdrTextObj(const SdrObject& rObj, BYTE nTyp)
}
}
-void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, BYTE nTyp)
+void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp)
{
bool bAnyWrite = false;
const EditTextObject& rEditObj = rParaObj.GetTextObject();
MSWord_SdrAttrIter aAttrIter( *this, rEditObj, nTyp );
- USHORT nPara = rEditObj.GetParagraphCount();
- BYTE bNul = 0;
- for( USHORT n = 0; n < nPara; ++n )
+ sal_uInt16 nPara = rEditObj.GetParagraphCount();
+ sal_uInt8 bNul = 0;
+ for( sal_uInt16 n = 0; n < nPara; ++n )
{
if( n )
aAttrIter.NextPara( n );
@@ -1189,7 +1189,7 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, BYTE nTyp)
aAttrIter.OutParaAttr(false);
- ULONG nPos = Strm().Tell();
+ sal_uLong nPos = Strm().Tell();
pPapPlc->AppendFkpEntry( Strm().Tell(),
pO->Count(), pO->GetData() );
pO->Remove( 0, pO->Count() ); // leeren
@@ -1212,19 +1212,19 @@ void WinwordAnchoring::WriteData( EscherEx& rEx ) const
if (mbInline)
{
rEx.AddAtom(18, DFF_msofbtUDefProp, 3, 3); //Prop id is 0xF122
- rSt << (UINT16)0x0390 << sal_uInt32(3);
- rSt << (UINT16)0x0392 << sal_uInt32(3);
+ rSt << (sal_uInt16)0x0390 << sal_uInt32(3);
+ rSt << (sal_uInt16)0x0392 << sal_uInt32(3);
//This sub property is required to be in the dummy inline frame as
//well
- rSt << (UINT16)0x053F << nInlineHack;
+ rSt << (sal_uInt16)0x053F << nInlineHack;
}
else
{
rEx.AddAtom(24, DFF_msofbtUDefProp, 3, 4 ); //Prop id is 0xF122
- rSt << (UINT16)0x038F << mnXAlign;
- rSt << (UINT16)0x0390 << mnXRelTo;
- rSt << (UINT16)0x0391 << mnYAlign;
- rSt << (UINT16)0x0392 << mnYRelTo;
+ rSt << (sal_uInt16)0x038F << mnXAlign;
+ rSt << (sal_uInt16)0x0390 << mnXRelTo;
+ rSt << (sal_uInt16)0x0391 << mnYAlign;
+ rSt << (sal_uInt16)0x0392 << mnYRelTo;
}
}
}
@@ -1249,7 +1249,7 @@ void WW8Export::WriteEscher()
{
if (pEscher)
{
- ULONG nStart = pTableStrm->Tell();
+ sal_uLong nStart = pTableStrm->Tell();
pEscher->WritePictures();
pEscher->FinishEscher();
@@ -1265,7 +1265,7 @@ void SwEscherEx::WritePictures()
if( SvStream* pPicStrm = static_cast< SwEscherExGlobal& >( *mxGlobal ).GetPictureStream() )
{
// set the blip - entries to the correct stream pos
- INT32 nEndPos = rWrt.Strm().Tell();
+ sal_Int32 nEndPos = rWrt.Strm().Tell();
mxGlobal->SetNewBlipStreamOffset( nEndPos );
pPicStrm->Seek( 0 );
@@ -1310,7 +1310,7 @@ void SwBasicEscherEx::WriteFrmExtraData(const SwFrmFmt&)
GetStream() << (sal_uInt32)0x80000000;
}
-void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
+void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId)
{
OpenContainer(ESCHER_SpContainer);
AddShape(ESCHER_ShpInst_PictureFrame, 0xa00, nShapeId);
@@ -1318,12 +1318,12 @@ void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
WriteFrmExtraData(rFmt);
AddAtom(6, DFF_msofbtUDefProp, 3, 1); //Prop id is 0xF122
- GetStream() << (UINT16)0x053F << nInlineHack;
+ GetStream() << (sal_uInt16)0x053F << nInlineHack;
CloseContainer(); // ESCHER_SpContainer
}
-UINT32 AddMirrorFlags(UINT32 nFlags, const SwMirrorGrf &rMirror)
+sal_uInt32 AddMirrorFlags(sal_uInt32 nFlags, const SwMirrorGrf &rMirror)
{
switch (rMirror.GetValue())
{
@@ -1345,9 +1345,9 @@ UINT32 AddMirrorFlags(UINT32 nFlags, const SwMirrorGrf &rMirror)
return nFlags;
}
-INT32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
+sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId)
{
- INT32 nBorderThick=0;
+ sal_Int32 nBorderThick=0;
SwNoTxtNode *pNd = GetNoTxtNodeFromSwFrmFmt(rFmt);
SwGrfNode *pGrfNd = pNd ? pNd->GetGrfNode() : 0;
ASSERT(pGrfNd, "No SwGrfNode ?, suspicious");
@@ -1362,7 +1362,7 @@ INT32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
EscherPropertyContainer aPropOpt;
- UINT32 nFlags = ESCHER_BlipFlagDefault;
+ sal_uInt32 nFlags = ESCHER_BlipFlagDefault;
if (pGrfNd->IsLinkedFile())
{
@@ -1373,8 +1373,8 @@ INT32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
SwWW8Writer::InsAsString16( aBuf, sURL );
SwWW8Writer::InsUInt16( aBuf, 0 );
- USHORT nArrLen = aBuf.Count();
- BYTE* pArr = new BYTE[ nArrLen ];
+ sal_uInt16 nArrLen = aBuf.Count();
+ sal_uInt8* pArr = new sal_uInt8[ nArrLen ];
memcpy( pArr, aBuf.GetData(), nArrLen );
aPropOpt.AddOpt(ESCHER_Prop_pibName, true, nArrLen, pArr, nArrLen);
@@ -1504,7 +1504,7 @@ void SwBasicEscherEx::WriteGrfAttr(const SwNoTxtNode& rNd,
true, &pItem))
{
const Size aSz( rNd.GetTwipSize() );
- INT32 nVal;
+ sal_Int32 nVal;
if( 0 != ( nVal = ((SwCropGrf*)pItem )->GetLeft() ) )
rPropOpt.AddOpt( ESCHER_Prop_cropFromLeft, ToFract16( nVal, aSz.Width()) );
if( 0 != ( nVal = ((SwCropGrf*)pItem )->GetRight() ) )
@@ -1516,23 +1516,23 @@ void SwBasicEscherEx::WriteGrfAttr(const SwNoTxtNode& rNd,
}
}
-void SwBasicEscherEx::SetPicId(const SdrObject &, UINT32,
+void SwBasicEscherEx::SetPicId(const SdrObject &, sal_uInt32,
EscherPropertyContainer &)
{
}
-void SwEscherEx::SetPicId(const SdrObject &rSdrObj, UINT32 nShapeId,
+void SwEscherEx::SetPicId(const SdrObject &rSdrObj, sal_uInt32 nShapeId,
EscherPropertyContainer &rPropOpt)
{
pTxtBxs->Append(rSdrObj, nShapeId);
- UINT32 nPicId = pTxtBxs->Count();
+ sal_uInt32 nPicId = pTxtBxs->Count();
nPicId *= 0x10000;
rPropOpt.AddOpt( ESCHER_Prop_pictureId, nPicId );
}
-INT32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
+sal_Int32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId)
{
- INT32 nBorderThick = 0;
+ sal_Int32 nBorderThick = 0;
if (const SdrObject* pSdrObj = rFmt.FindRealSdrObject())
{
SwNodeIndex aIdx(*rFmt.GetCntnt().GetCntntIdx(), 1);
@@ -1632,7 +1632,7 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush,
}
else
{
- UINT32 nFillColor = GetColor(rBrush.GetColor(), false);
+ sal_uInt32 nFillColor = GetColor(rBrush.GetColor(), false);
rPropOpt.AddOpt( ESCHER_Prop_fillColor, nFillColor );
rPropOpt.AddOpt( ESCHER_Prop_fillBackColor, nFillColor ^ 0xffffff );
rPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x100010 );
@@ -1649,27 +1649,27 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush,
}
}
-INT32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
+sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
MSO_SPT eShapeType, EscherPropertyContainer& rPropOpt)
{
- INT32 nLineWidth=0;
+ sal_Int32 nLineWidth=0;
const SfxPoolItem* pItem;
bool bFirstLine = true;
if (SFX_ITEM_SET == rFmt.GetItemState(RES_BOX, true, &pItem))
{
- static const UINT16 aExhperProp[4] =
+ static const sal_uInt16 aExhperProp[4] =
{
ESCHER_Prop_dyTextTop, ESCHER_Prop_dyTextBottom,
ESCHER_Prop_dxTextLeft, ESCHER_Prop_dxTextRight
};
const SvxBorderLine* pLine;
- for( USHORT n = 0; n < 4; ++n )
+ for( sal_uInt16 n = 0; n < 4; ++n )
if( 0 != ( pLine = ((SvxBoxItem*)pItem)->GetLine( n )) )
{
if( bFirstLine )
{
- UINT32 nLineColor = GetColor(pLine->GetColor(), false);
+ sal_uInt32 nLineColor = GetColor(pLine->GetColor(), false);
rPropOpt.AddOpt( ESCHER_Prop_lineColor, nLineColor );
rPropOpt.AddOpt( ESCHER_Prop_lineBackColor,
nLineColor ^ 0xffffff );
@@ -1734,10 +1734,10 @@ INT32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
return nLineWidth;
}
-INT32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
+sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
EscherPropertyContainer& rPropOpt)
{
- INT32 nLineWidth = SwBasicEscherEx::WriteFlyFrameAttr(rFmt, eShapeType,
+ sal_Int32 nLineWidth = SwBasicEscherEx::WriteFlyFrameAttr(rFmt, eShapeType,
rPropOpt);
/*
@@ -1819,7 +1819,7 @@ INT32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
//PropOpt wants to own the buffer
aPolyDump.ObjectOwnsMemory(false);
rPropOpt.AddOpt(DFF_Prop_pWrapPolygonVertices, false,
- nArrLen, static_cast<BYTE *>(pArr), nArrLen);
+ nArrLen, static_cast<sal_uInt8 *>(pArr), nArrLen);
}
}
}
@@ -1849,11 +1849,11 @@ void SwBasicEscherEx::Init()
SetHellLayerId(rWrt.pDoc->GetHellId());
}
-INT32 SwBasicEscherEx::ToFract16(INT32 nVal, UINT32 nMax) const
+sal_Int32 SwBasicEscherEx::ToFract16(sal_Int32 nVal, sal_uInt32 nMax) const
{
if (nMax)
{
- INT32 nMSVal = (nVal / 65536) * nMax;
+ sal_Int32 nMSVal = (nVal / 65536) * nMax;
nMSVal += (nVal * 65536 ) / nMax;
return nMSVal;
}
@@ -1870,7 +1870,7 @@ void SwBasicEscherEx::WritePictures()
if( SvStream* pPicStrm = static_cast< SwEscherExGlobal& >( *mxGlobal ).GetPictureStream() )
{
// set the blip - entries to the correct stream pos
- INT32 nEndPos = pPicStrm->Tell();
+ sal_Int32 nEndPos = pPicStrm->Tell();
mxGlobal->WriteBlibStoreEntry(*pEscherStrm, 1, sal_True, nEndPos);
pPicStrm->Seek(0);
@@ -1896,7 +1896,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
CloseContainer(); // ESCHER_DggContainer
- BYTE i = 2; // for header/footer and the other
+ sal_uInt8 i = 2; // for header/footer and the other
PlcDrawObj *pSdrObjs = rWrt.pHFSdrObjs;
pTxtBxs = rWrt.pHFTxtBxs;
@@ -1917,7 +1917,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
EnterGroup( 0 );
- ULONG nSecondShapeId = pSdrObjs == rWrt.pSdrObjs ? GenerateShapeId() : 0;
+ sal_uLong nSecondShapeId = pSdrObjs == rWrt.pSdrObjs ? GenerateShapeId() : 0;
// write now all Writer-/DrawObjects
DrawObjPointerVector aSorted;
@@ -1927,7 +1927,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
DrawObjPointerIter aEnd = aSorted.end();
for (DrawObjPointerIter aIter = aSorted.begin(); aIter != aEnd; ++aIter)
{
- INT32 nBorderThick=0;
+ sal_Int32 nBorderThick=0;
DrawObj *pObj = (*aIter);
ASSERT(pObj, "impossible");
if (!pObj)
@@ -2499,13 +2499,13 @@ void SwEscherEx::WriteFrmExtraData( const SwFrmFmt& rFmt )
GetStream() << 1L;
}
-INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
+sal_Int32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, sal_uInt32 &rShapeId,
DrawObjPointerVector &rPVec)
{
const SwFrmFmt &rFmt = rObj.maCntnt.GetFrmFmt();
// check for textflyframe and if it is the first in a Chain
- INT32 nBorderThick = 0;
+ sal_Int32 nBorderThick = 0;
const SwNodeIndex* pNdIdx = rFmt.GetCntnt().GetCntntIdx();
if( pNdIdx )
{
@@ -2522,8 +2522,8 @@ INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
if (const SdrObject* pObj = rFmt.FindRealSdrObject())
{
// check for the first in a Chain
- UINT32 nTxtId;
- USHORT nOff = 0;
+ sal_uInt32 nTxtId;
+ sal_uInt16 nOff = 0;
const SwFrmFmt* pFmt = &rFmt, *pPrev;
while( 0 != ( pPrev = pFmt->GetChain().GetPrev() ))
{
@@ -2551,7 +2551,7 @@ INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
nTxtId = pTxtBxs->GetPos( p );
if( USHRT_MAX == nTxtId )
{
- UINT32 nPrevShapeId =
+ sal_uInt32 nPrevShapeId =
GetFlyShapeId(*pFmt, rObj.mnHdFtIndex, rPVec);
pTxtBxs->Append( *pPrevObj, nPrevShapeId );
nTxtId = pTxtBxs->Count();
@@ -2569,7 +2569,7 @@ INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
return nBorderThick;
}
-USHORT FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex,
+sal_uInt16 FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex,
DrawObjPointerVector &rPVec)
{
DrawObjPointerIter aEnd = rPVec.end();
@@ -2584,19 +2584,19 @@ USHORT FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex,
&rFmt == (&pObj->maCntnt.GetFrmFmt())
)
{
- return static_cast< USHORT >(aIter - rPVec.begin());
+ return static_cast< sal_uInt16 >(aIter - rPVec.begin());
}
}
return USHRT_MAX;
}
-INT32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, UINT32 nShapeId,
- UINT32 nTxtBox, DrawObjPointerVector &rPVec)
+sal_Int32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId,
+ sal_uInt32 nTxtBox, DrawObjPointerVector &rPVec)
{
const SwFrmFmt &rFmt = rObj.maCntnt.GetFrmFmt();
short nDirection = rObj.mnDirection;
- INT32 nBorderThick=0;
+ sal_Int32 nBorderThick=0;
OpenContainer( ESCHER_SpContainer );
AddShape( ESCHER_ShpInst_TextBox, 0xa00, nShapeId );
@@ -2604,7 +2604,7 @@ INT32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, UINT32 nShapeId,
aPropOpt.AddOpt(ESCHER_Prop_lTxid, nTxtBox);
if (const SwFrmFmt *pNext = rFmt.GetChain().GetNext())
{
- USHORT nPos = FindPos(*pNext, rObj.mnHdFtIndex, rPVec);
+ sal_uInt16 nPos = FindPos(*pNext, rObj.mnHdFtIndex, rPVec);
if (USHRT_MAX != nPos && aFollowShpIds[nPos])
aPropOpt.AddOpt(ESCHER_Prop_hspNext, aFollowShpIds[nPos]);
}
@@ -2665,7 +2665,7 @@ void SwBasicEscherEx::WriteOLEPicture(EscherPropertyContainer &rPropOpt,
rPropOpt.AddOpt( ESCHER_Prop_pictureActive, 0x10000 );
}
-void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, UINT32 nShapeId )
+void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, sal_uInt32 nShapeId )
{
if (const SdrObject* pSdrObj = rFmt.FindRealSdrObject())
{
@@ -2698,15 +2698,15 @@ void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, UINT32 nShapeId )
void SwEscherEx::MakeZOrderArrAndFollowIds(
std::vector<DrawObj>& rSrcArr, std::vector<DrawObj*>&rDstArr)
{
- USHORT n, nCnt = static_cast< USHORT >(rSrcArr.size());
+ sal_uInt16 n, nCnt = static_cast< sal_uInt16 >(rSrcArr.size());
SvULongsSort aSort( 255 < nCnt ? 255 : nCnt, 255 );
rDstArr.clear();
rDstArr.reserve(nCnt);
for (n = 0; n < nCnt; ++n)
{
const SwFrmFmt &rFmt = rSrcArr[n].maCntnt.GetFrmFmt();
- ULONG nOrdNum = rWrt.GetSdrOrdNum(rFmt);
- USHORT nPos;
+ sal_uLong nOrdNum = rWrt.GetSdrOrdNum(rFmt);
+ sal_uInt16 nPos;
//returns what will be the index in rDstArr of p as nPos
aSort.Insert(nOrdNum, nPos);
DrawObj &rObj = rSrcArr[n];
@@ -2728,17 +2728,17 @@ void SwEscherEx::MakeZOrderArrAndFollowIds(
bNeedsShapeId = true;
}
- ULONG nShapeId = bNeedsShapeId ? GenerateShapeId() : 0;
+ sal_uLong nShapeId = bNeedsShapeId ? GenerateShapeId() : 0;
aFollowShpIds.Insert(nShapeId, n);
}
}
-UINT32 SwEscherEx::GetFlyShapeId(const SwFrmFmt& rFmt,
+sal_uInt32 SwEscherEx::GetFlyShapeId(const SwFrmFmt& rFmt,
unsigned int nHdFtIndex, DrawObjPointerVector &rpVec)
{
- USHORT nPos = FindPos(rFmt, nHdFtIndex, rpVec);
- UINT32 nShapeId;
+ sal_uInt16 nPos = FindPos(rFmt, nHdFtIndex, rpVec);
+ sal_uInt32 nShapeId;
if (USHRT_MAX != nPos)
{
if (0 == (nShapeId = aFollowShpIds[nPos]))
@@ -2752,10 +2752,10 @@ UINT32 SwEscherEx::GetFlyShapeId(const SwFrmFmt& rFmt,
return nShapeId;
}
-UINT32 SwEscherEx::QueryTextID(
- const uno::Reference< drawing::XShape>& xXShapeRef, UINT32 nShapeId )
+sal_uInt32 SwEscherEx::QueryTextID(
+ const uno::Reference< drawing::XShape>& xXShapeRef, sal_uInt32 nShapeId )
{
- UINT32 nId = 0;
+ sal_uInt32 nId = 0;
if (SdrObject* pObj = GetSdrObjectFromXShape(xXShapeRef))
{
pTxtBxs->Append( *pObj, nShapeId );
@@ -2802,7 +2802,7 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrObject *pOb
if (!WriteOCXStream(xOleStg,xControlModel,aSize,sName))
return false;
- BYTE aSpecOLE[] =
+ sal_uInt8 aSpecOLE[] =
{
0x03, 0x6a, 0xFF, 0xFF, 0xFF, 0xFF, // sprmCPicLocation
0x0a, 0x08, 1, // sprmCFOLE2
@@ -2810,7 +2810,7 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrObject *pOb
0x56, 0x08, 1 // sprmCFObj
};
//Set the obj id into the sprmCPicLocation
- BYTE *pData = aSpecOLE+2;
+ sal_uInt8 *pData = aSpecOLE+2;
Set_UInt32(pData,(sal_uInt32)(sal_uIntPtr)pObj);
String sFld(FieldString(ww::eCONTROL));
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 7b97b2fbdbc0..7f5e0eaae54e 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -192,7 +192,7 @@ private:
const SwRedline* pCurRedline;
xub_StrLen nAktSwPos;
- USHORT nCurRedlinePos;
+ sal_uInt16 nCurRedlinePos;
bool mbParaIsRTL;
@@ -222,8 +222,8 @@ public:
void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); }
void OutAttr( xub_StrLen nSwPos );
- virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const;
- virtual const SfxPoolItem& GetItem( USHORT nWhich ) const;
+ virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const;
+ virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
int OutAttrWithRange(xub_StrLen nPos);
const SwRedlineData* GetRedline( xub_StrLen nPos );
void OutFlys(xub_StrLen nSwPos);
@@ -477,7 +477,7 @@ void SwAttrIter::OutAttr( xub_StrLen nSwPos )
//The hard formatting properties that affect the entire paragraph
if (rNd.HasSwAttrSet())
{
- BOOL bDeep = FALSE;
+ sal_Bool bDeep = sal_False;
// only copy hard attributes - bDeep = false
aExportSet.Set(rNd.GetSwAttrSet(), bDeep);
// get the current font item. Use rNd.GetSwAttrSet instead of aExportSet:
@@ -511,7 +511,7 @@ void SwAttrIter::OutAttr( xub_StrLen nSwPos )
sal_uInt16 nWhichId = aIter.FirstWhich();
while( nWhichId )
{
- if( SFX_ITEM_SET == pSet->GetItemState( nWhichId, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pSet->GetItemState( nWhichId, sal_False, &pItem ))
{
if (nWhichId == nFontId)
pFont = &(item_cast<SvxFontItem>(*pItem));
@@ -609,7 +609,7 @@ bool SwAttrIter::IsTxtAttr( xub_StrLen nSwPos )
// search for attrs with CH_TXTATR
if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints())
{
- 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() && (*pHt->GetStart() == nSwPos) )
@@ -644,7 +644,7 @@ bool SwAttrIter::RequiresImplicitBookmark()
SwImplBookmarksIter bkmkIterEnd = m_rExport.maImplicitBookmarks.end();
for ( SwImplBookmarksIter aIter = m_rExport.maImplicitBookmarks.begin(); aIter != bkmkIterEnd; ++aIter )
{
- ULONG sample = aIter->second;
+ sal_uLong sample = aIter->second;
if ( sample == rNd.GetIndex() )
return true;
@@ -658,14 +658,14 @@ bool SwAttrIter::RequiresImplicitBookmark()
// Attribut-Anfangposition fragen kann.
// Es koennen nur Attribute mit Ende abgefragt werden.
// Es wird mit bDeep gesucht
-const SfxPoolItem* SwAttrIter::HasTextItem( USHORT nWhich ) const
+const SfxPoolItem* SwAttrIter::HasTextItem( sal_uInt16 nWhich ) const
{
const SfxPoolItem* pRet = 0;
const SwpHints* pTxtAttrs = rNd.GetpSwpHints();
xub_StrLen nTmpSwPos = m_rExport.m_aCurrentCharPropStarts.top();
if (pTxtAttrs)
{
- for (USHORT i = 0; i < pTxtAttrs->Count(); ++i)
+ for (sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i)
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
const SfxPoolItem* pItem = &pHt->GetAttr();
@@ -686,12 +686,12 @@ const SfxPoolItem* SwAttrIter::HasTextItem( USHORT nWhich ) const
void WW8Export::GetCurrentItems(WW8Bytes& rItems) const
{
- USHORT nEnd = pO ? pO->Count() : 0;
- for (USHORT nI = 0; nI < nEnd; ++nI)
+ sal_uInt16 nEnd = pO ? pO->Count() : 0;
+ for (sal_uInt16 nI = 0; nI < nEnd; ++nI)
rItems.Insert((*pO)[nI], rItems.Count());
}
-const SfxPoolItem& SwAttrIter::GetItem(USHORT nWhich) const
+const SfxPoolItem& SwAttrIter::GetItem(sal_uInt16 nWhich) const
{
const SfxPoolItem* pRet = HasTextItem(nWhich);
return pRet ? *pRet : rNd.SwCntntNode::GetAttr(nWhich);
@@ -737,7 +737,7 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRu
other, so we make a guess based upon the first character of the text,
defaulting to asian.
*/
- USHORT nRubyScript;
+ sal_uInt16 nRubyScript;
if( pBreakIt->GetBreakIter().is() )
nRubyScript = pBreakIt->GetBreakIter()->getScriptType( rRuby.GetText(), 0);
else
@@ -920,20 +920,20 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
m_rWW8Export.OutputField( 0, ww::eHYPERLINK, sURL, WRITEFIELD_START | WRITEFIELD_CMD_START );
// write the refence to the "picture" structure
- ULONG nDataStt = m_rWW8Export.pDataStrm->Tell();
+ sal_uLong nDataStt = m_rWW8Export.pDataStrm->Tell();
m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell() );
// WinWord 2000 doesn't write this - so its a temp solution by W97 ?
m_rWW8Export.WriteChar( 0x01 );
- static BYTE aArr1[] = {
+ static sal_uInt8 aArr1[] = {
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32( pDataAdr, nDataStt );
m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), sizeof( aArr1 ), aArr1 );
@@ -946,7 +946,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
//all links end up in the data stream as absolute references.
bool bAbsolute = !bBookMarkOnly;
- static BYTE __READONLY_DATA aURLData1[] = {
+ static sal_uInt8 __READONLY_DATA aURLData1[] = {
0,0,0,0, // len of struct
0x44,0, // the start of "next" data
0,0,0,0,0,0,0,0,0,0, // PIC-Structure!
@@ -955,20 +955,20 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // |
0,0,0,0, // /
};
- static BYTE __READONLY_DATA MAGIC_A[] = {
+ static sal_uInt8 __READONLY_DATA MAGIC_A[] = {
// start of "next" data
0xD0,0xC9,0xEA,0x79,0xF9,0xBA,0xCE,0x11,
0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B
};
m_rWW8Export.pDataStrm->Write( aURLData1, sizeof( aURLData1 ) );
- BYTE nAnchor = 0x00;
+ sal_uInt8 nAnchor = 0x00;
if ( sMark.Len() )
nAnchor = 0x08;
m_rWW8Export.pDataStrm->Write( &nAnchor, 1 );
m_rWW8Export.pDataStrm->Write( MAGIC_A, sizeof(MAGIC_A) );
SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, 0x00000002);
- UINT32 nFlag = bBookMarkOnly ? 0 : 0x01;
+ sal_uInt32 nFlag = bBookMarkOnly ? 0 : 0x01;
if ( bAbsolute )
nFlag |= 0x02;
if ( sMark.Len() )
@@ -980,13 +980,13 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
{
// version 1 (for a document)
- static BYTE __READONLY_DATA MAGIC_C[] = {
+ static sal_uInt8 __READONLY_DATA MAGIC_C[] = {
0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46,
0x00, 0x00
};
- static BYTE __READONLY_DATA MAGIC_D[] = {
+ static sal_uInt8 __READONLY_DATA MAGIC_D[] = {
0xFF, 0xFF, 0xAD, 0xDE, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
@@ -1026,7 +1026,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
// what the data mean, except for the URL.
// The First piece is the WW8_PIC structure.
//
- static BYTE __READONLY_DATA MAGIC_B[] = {
+ static sal_uInt8 __READONLY_DATA MAGIC_B[] = {
0xE0,0xC9,0xEA,0x79,0xF9,0xBA,0xCE,0x11,
0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B
};
@@ -1091,7 +1091,7 @@ void WW8AttributeOutput::FieldVanish( const String& rTxt, ww::eField /*eType*/ )
aItems.Insert( 67, aItems.Count() );
aItems.Insert( 1, aItems.Count() );
- USHORT nStt_sprmCFSpec = aItems.Count();
+ sal_uInt16 nStt_sprmCFSpec = aItems.Count();
// sprmCFSpec -- fSpec-Attribut true
if ( m_rWW8Export.bWrtWW8 )
@@ -1155,7 +1155,7 @@ void AttributeOutputBase::TOXMark( const SwTxtNode& rNode, const SwTOXMark& rAtt
{
eType = ww::eTC;
sTxt.InsertAscii( " TC \"", 0 );
- USHORT nLvl = rAttr.GetLevel();
+ sal_uInt16 nLvl = rAttr.GetLevel();
if (nLvl > WW8ListManager::nMaxLevel)
nLvl = WW8ListManager::nMaxLevel;
@@ -1179,7 +1179,7 @@ int SwAttrIter::OutAttrWithRange(xub_StrLen nPos)
{
m_rExport.m_aCurrentCharPropStarts.push( nPos );
const xub_StrLen* pEnd;
- for ( USHORT i = 0; i < pTxtAttrs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
const SfxPoolItem* pItem = &pHt->GetAttr();
@@ -1237,7 +1237,7 @@ bool SwAttrIter::IsRedlineAtEnd( xub_StrLen nEnd ) const
{
bool bRet = false;
// search next Redline
- for( USHORT nPos = nCurRedlinePos;
+ for( sal_uInt16 nPos = nCurRedlinePos;
nPos < m_rExport.pDoc->GetRedlineTbl().Count(); ++nPos )
{
const SwPosition* pEnd = m_rExport.pDoc->GetRedlineTbl()[ nPos ]->End();
@@ -1516,8 +1516,8 @@ String SwAttrIter::GetSnippet(const String &rStr, xub_StrLen nAktPos,
*/
static SwTxtFmtColl& lcl_getFormatCollection( MSWordExportBase& rExport, const SwTxtNode* pTxtNode )
{
- USHORT nPos = 0;
- USHORT nMax = rExport.pDoc->GetRedlineTbl().Count();
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nMax = rExport.pDoc->GetRedlineTbl().Count();
while( nPos < nMax )
{
const SwRedline* pRedl = rExport.pDoc->GetRedlineTbl()[ nPos++ ];
@@ -1538,7 +1538,7 @@ static SwTxtFmtColl& lcl_getFormatCollection( MSWordExportBase& rExport, const S
return static_cast<SwTxtFmtColl&>( pTxtNode->GetAnyFmtColl() );
}
-void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, USHORT nStyle,
+void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, sal_uInt16 nStyle,
ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner )
{
short nDropLines = rSwFmtDrop.GetLines();
@@ -1547,7 +1547,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
SVBT16 nSty;
ShortToSVBT16( nStyle, nSty );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
if ( m_rWW8Export.bWrtWW8 )
{
@@ -1559,7 +1559,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
m_rWW8Export.InsUInt16( NS_sprm::LN_PDcs ); // Dropcap (sprmPDcs)
int nDCS = ( nDropLines << 3 ) | 0x01;
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( nDCS ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( nDCS ) );
m_rWW8Export.InsUInt16( NS_sprm::LN_PDxaFromText ); // Distance from text (sprmPDxaFromText)
m_rWW8Export.InsUInt16( nDistance );
@@ -1567,7 +1567,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
if ( rNode.GetDropSize( rFontHeight, rDropHeight, rDropDescent ) )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PDyaLine ); // Line spacing
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -rDropHeight ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -rDropHeight ) );
m_rWW8Export.InsUInt16( 0 );
}
}
@@ -1581,7 +1581,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
m_rWW8Export.pO->Insert( 46, m_rWW8Export.pO->Count() ); // Dropcap (sprmPDcs)
int nDCS = ( nDropLines << 3 ) | 0x01;
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( nDCS ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( nDCS ) );
m_rWW8Export.pO->Insert( 49, m_rWW8Export.pO->Count() ); // Distance from text (sprmPDxaFromText)
m_rWW8Export.InsUInt16( nDistance );
@@ -1589,7 +1589,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
if (rNode.GetDropSize(rFontHeight, rDropHeight, rDropDescent))
{
m_rWW8Export.pO->Insert( 20, m_rWW8Export.pO->Count() ); // Line spacing
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -rDropHeight ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -rDropHeight ) );
m_rWW8Export.InsUInt16( 0 );
}
}
@@ -1620,10 +1620,10 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
}
m_rWW8Export.InsUInt16( NS_sprm::LN_CHpsPos ); // Lower the chars
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
m_rWW8Export.InsUInt16( NS_sprm::LN_CHps ); // Font Size
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( rFontHeight / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( rFontHeight / 10 ) );
}
else
{
@@ -1635,10 +1635,10 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
}
m_rWW8Export.pO->Insert( 101, m_rWW8Export.pO->Count() ); // Lower the chars
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
m_rWW8Export.pO->Insert( 99, m_rWW8Export.pO->Count() ); // Font Size
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( rFontHeight / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( rFontHeight / 10 ) );
}
}
@@ -1673,7 +1673,7 @@ bool MSWordExportBase::GetBookmarks( const SwTxtNode& rNd, xub_StrLen nStt,
xub_StrLen nEnd, IMarkVector& rArr )
{
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
- ULONG nNd = rNd.GetIndex( );
+ sal_uLong nNd = rNd.GetIndex( );
const sal_Int32 nMarks = pMarkAccess->getMarksCount();
for ( sal_Int32 i = 0; i < nMarks; i++ )
@@ -1795,7 +1795,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// nStyleBeforeFly may change when we recurse into another node, so we
// have to remember it in nStyle
- USHORT nStyle = nStyleBeforeFly;
+ sal_uInt16 nStyle = nStyleBeforeFly;
SwAttrIter aAttrIter( *this, rNode );
rtl_TextEncoding eChrSet = aAttrIter.GetCharSet();
@@ -1917,9 +1917,9 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if ( isDropdownOrCheckbox )
AppendBookmark( pFieldmark->GetName(), false );
}
- nLen -= static_cast< USHORT >( ofs );
+ nLen -= static_cast< sal_uInt16 >( ofs );
- String aSnippet( aAttrIter.GetSnippet( aStr, nAktPos + static_cast< USHORT >( ofs ), nLen ) );
+ String aSnippet( aAttrIter.GetSnippet( aStr, nAktPos + static_cast< sal_uInt16 >( ofs ), nLen ) );
if ( ( nTxtTyp == TXT_EDN || nTxtTyp == TXT_FTN ) && nAktPos == 0 && nLen > 0 )
{
// Insert tab for aesthetic puposes #i24762#
@@ -2038,7 +2038,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if ( !bFlyInTable )
{
SfxItemSet* pTmpSet = 0;
- const BYTE nPrvNxtNd = rNode.HasPrevNextLayNode();
+ const sal_uInt8 nPrvNxtNd = rNode.HasPrevNextLayNode();
if( (ND_HAS_PREV_LAYNODE|ND_HAS_NEXT_LAYNODE ) != nPrvNxtNd )
{
@@ -2068,16 +2068,16 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
}
}
- BOOL bParaRTL = FALSE;
+ sal_Bool bParaRTL = sal_False;
const SvxFrameDirectionItem* pItem = (const SvxFrameDirectionItem*)
rNode.GetSwAttrSet().GetItem(RES_FRAMEDIR);
if ( aAttrIter.IsParaRTL())
- bParaRTL = TRUE;
+ bParaRTL = sal_True;
if( rNode.IsNumbered())
{
const SwNumRule* pRule = rNode.GetNumRule();
- BYTE nLvl = static_cast< BYTE >( rNode.GetActualListLevel() );
+ sal_uInt8 nLvl = static_cast< sal_uInt8 >( rNode.GetActualListLevel() );
const SwNumFmt* pFmt = pRule->GetNumFmt( nLvl );
if( !pFmt )
pFmt = &pRule->Get( nLvl );
@@ -2185,7 +2185,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// create new LRSpace item, based on the current (if present)
const SfxPoolItem* pPoolItem = NULL;
- pTmpSet->GetItemState(RES_LR_SPACE, TRUE, &pPoolItem);
+ pTmpSet->GetItemState(RES_LR_SPACE, sal_True, &pPoolItem);
SvxLRSpaceItem aLRSpace(
( pPoolItem == NULL )
? SvxLRSpaceItem(0, 0, 0, 0, RES_LR_SPACE)
@@ -2193,7 +2193,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// new left margin = old left + label space
const SwNumRule* pRule = rNode.GetNumRule();
- const SwNumFmt& rNumFmt = pRule->Get( static_cast< USHORT >(rNode.GetActualListLevel()) );
+ const SwNumFmt& rNumFmt = pRule->Get( static_cast< sal_uInt16 >(rNode.GetActualListLevel()) );
// --> OD 2008-06-03 #i86652#
if ( rNumFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -2290,7 +2290,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if ( !pTmpSet )
pTmpSet = new SfxItemSet(rNode.GetSwAttrSet());
- const SvxFmtKeepItem aKeepItem( TRUE, RES_KEEP );
+ const SvxFmtKeepItem aKeepItem( sal_True, RES_KEEP );
pTmpSet->Put( aKeepItem );
}
}
@@ -2344,7 +2344,7 @@ void WW8AttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeIn
{
TableRowEnd( pInner->getDepth() );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoRow( pInner );
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -2362,7 +2362,7 @@ void WW8AttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeIn
#if 0
/* */
-USHORT WW8Export::StartTableFromFrmFmt( WW8Bytes &rAt, const SwFrmFmt *pFmt )
+sal_uInt16 WW8Export::StartTableFromFrmFmt( WW8Bytes &rAt, const SwFrmFmt *pFmt )
{
// Tell the undocumented table hack that everything between here and
// the last table position is nontable text
@@ -2372,7 +2372,7 @@ USHORT WW8Export::StartTableFromFrmFmt( WW8Bytes &rAt, const SwFrmFmt *pFmt )
// sprmPDxaFromText10
if( bWrtWW8 )
{
- static BYTE __READONLY_DATA aTabLineAttr[] = {
+ static sal_uInt8 __READONLY_DATA aTabLineAttr[] = {
0, 0, // Sty # 0
0x16, 0x24, 1, // sprmPFInTable
0x17, 0x24, 1 }; // sprmPFTtp
@@ -2380,7 +2380,7 @@ USHORT WW8Export::StartTableFromFrmFmt( WW8Bytes &rAt, const SwFrmFmt *pFmt )
}
else
{
- static BYTE __READONLY_DATA aTabLineAttr[] = {
+ static sal_uInt8 __READONLY_DATA aTabLineAttr[] = {
0, 0, // Sty # 0
24, 1, // sprmPFInTable
25, 1 }; // sprmPFTtp
@@ -2446,10 +2446,10 @@ static bool CellContainsProblematicGraphic( const SwWriteTableCell *pCell,
}
static bool RowContainsProblematicGraphic( const SwWriteTableCellPtr *pRow,
- USHORT nCols, const MSWordExportBase &rExport )
+ sal_uInt16 nCols, const MSWordExportBase &rExport )
{
bool bHasGraphic = false;
- for ( USHORT nI = 0; nI < nCols; ++nI )
+ for ( sal_uInt16 nI = 0; nI < nCols; ++nI )
{
if ( CellContainsProblematicGraphic( pRow[nI], rExport ) )
{
@@ -2518,7 +2518,7 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode )
// Bug 74245 - if the first Node inside the section has an own
// PageDesc or PageBreak attribut, then dont write
// here the section break
- ULONG nRstLnNum = 0;
+ sal_uLong nRstLnNum = 0;
const SfxItemSet* pSet;
if ( rNd.IsTableNode() )
pSet = &rNd.GetTableNode()->GetTable().GetFrmFmt()->GetAttrSet();
@@ -2556,7 +2556,7 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode )
}
-void WW8Export::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum )
+void WW8Export::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum )
{
pSepx->AppendSep(Fc2Cp(Strm().Tell()), pPageDesc, pFmt, nLnNum);
}
@@ -2575,7 +2575,7 @@ void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd )
if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints())
{
- for( USHORT n=0; n < pTxtAttrs->Count(); ++n )
+ for( sal_uInt16 n=0; n < pTxtAttrs->Count(); ++n )
{
const SwTxtAttr* pAttr = (*pTxtAttrs)[ n ];
if( RES_TXTATR_FLYCNT == pAttr->Which() )
@@ -2587,7 +2587,7 @@ void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd )
if( pNodeIndex )
{
- ULONG nStt = pNodeIndex->GetIndex()+1,
+ sal_uLong nStt = pNodeIndex->GetIndex()+1,
nEnd = pNodeIndex->GetNode().EndOfSectionIndex();
if( (nStt < nEnd) && !pDoc->GetNodes()[ nStt ]->IsNoTxtNode() )
@@ -2658,8 +2658,8 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
// Hole vom Node und vom letzten Node die Position in der Section
const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx();
- ULONG nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
- ULONG nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
+ sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
+ sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
if( nStt >= nEnd ) // kein Bereich, also kein gueltiger Node
return;
@@ -2692,7 +2692,7 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
word 6
*/
const SwTxtNode* pParTxtNode = rAnch.GetCntntAnchor()->nNode.GetNode().GetTxtNode();
- const SwRect aPageRect = pParTxtNode->FindPageFrmRect( FALSE, 0, FALSE );
+ const SwRect aPageRect = pParTxtNode->FindPageFrmRect( sal_False, 0, sal_False );
aOffset = rFrmFmt.FindLayoutRect().Pos();
aOffset -= aPageRect.Pos();
@@ -2769,7 +2769,7 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline )
if ( pRedline->Next() )
Redline( pRedline->Next() );
- static USHORT __READONLY_DATA aSprmIds[ 2 * 2 * 3 ] =
+ static sal_uInt16 __READONLY_DATA aSprmIds[ 2 * 2 * 3 ] =
{
// Ids for insert
NS_sprm::LN_CFRMark, NS_sprm::LN_CIbstRMark, NS_sprm::LN_CDttmRMark, // for WW8
@@ -2779,7 +2779,7 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline )
0x0041, 0x0045, 0x0046 // for WW6
};
- const USHORT* pSprmIds = 0;
+ const sal_uInt16* pSprmIds = 0;
switch( pRedline->GetType() )
{
case nsRedlineType_t::REDLINE_INSERT:
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 47316c867e33..e8cb9a755087 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -59,9 +59,9 @@ using namespace ::com::sun::star;
using namespace sw::types;
using namespace sw::util;
-USHORT MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel, USHORT nVal )
+sal_uInt16 MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, sal_uInt8 nLevel, sal_uInt16 nVal )
{
- USHORT nNumId = USHRT_MAX;
+ sal_uInt16 nNumId = USHRT_MAX;
String sPrefix( CREATE_CONST_ASC( "WW8TempExport" ) );
sPrefix += String::CreateFromInt32( nUniqueList++ );
// --> OD 2008-02-11 #newlistlevelattrs#
@@ -71,7 +71,7 @@ USHORT MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel,
// <--
pUsedNumTbl->Insert( pMyNumRule, pUsedNumTbl->Count() );
- for ( USHORT i = 0; i < MAXLEVEL; i++ )
+ for ( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
{
const SwNumFmt& rSubRule = pRule->Get(i);
pMyNumRule->Set( i, rSubRule );
@@ -89,7 +89,7 @@ USHORT MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel,
return nNumId;
}
-USHORT MSWordExportBase::GetId( const SwNumRule& rNumRule )
+sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule )
{
if ( !pUsedNumTbl )
{
@@ -98,7 +98,7 @@ USHORT MSWordExportBase::GetId( const SwNumRule& rNumRule )
// --> OD 2005-10-17 #126238# - Check, if the outline rule is
// already inserted into <pUsedNumTbl>. If yes, do not insert it again.
bool bOutlineRuleAdded( false );
- for ( USHORT n = pUsedNumTbl->Count(); n; )
+ for ( sal_uInt16 n = pUsedNumTbl->Count(); n; )
{
const SwNumRule& rRule = *pUsedNumTbl->GetObject( --n );
if ( !pDoc->IsUsed( rRule ) )
@@ -120,12 +120,12 @@ USHORT MSWordExportBase::GetId( const SwNumRule& rNumRule )
// <--
}
SwNumRule* p = (SwNumRule*)&rNumRule;
- USHORT nRet = pUsedNumTbl->GetPos(p);
+ sal_uInt16 nRet = pUsedNumTbl->GetPos(p);
//Is this list now duplicated into a new list which we should use
// --> OD 2007-05-30 #i77812#
// perform 'deep' search in duplication map
- ::std::map<USHORT,USHORT>::const_iterator aResult = aRuleDuplicates.end();
+ ::std::map<sal_uInt16,sal_uInt16>::const_iterator aResult = aRuleDuplicates.end();
do {
aResult = aRuleDuplicates.find(nRet);
if ( aResult != aRuleDuplicates.end() )
@@ -175,7 +175,7 @@ void WW8Export::WriteNumbering()
OutListNamesTab();
}
-void WW8AttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRule )
+void WW8AttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule )
{
SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId );
SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId );
@@ -184,7 +184,7 @@ void WW8AttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRule
for ( int i = 0; i < WW8ListManager::nMaxLevel; ++i )
SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 0xFFF );
- BYTE nFlags = 0, nDummy = 0;
+ sal_uInt8 nFlags = 0, nDummy = 0;
if ( rRule.IsContinusNum() )
nFlags |= 0x1;
@@ -196,10 +196,10 @@ void MSWordExportBase::NumberingDefinitions()
if ( !pUsedNumTbl )
return; // no numbering is used
- USHORT nCount = pUsedNumTbl->Count();
+ sal_uInt16 nCount = pUsedNumTbl->Count();
// Write static data of SwNumRule - LSTF
- for ( USHORT n = 0; n < nCount; ++n )
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
{
const SwNumRule& rRule = *pUsedNumTbl->GetObject( n );
@@ -207,12 +207,12 @@ void MSWordExportBase::NumberingDefinitions()
}
}
-void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
- USHORT nStart,
- USHORT nNumberingType,
+void WW8AttributeOutput::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,
@@ -228,7 +228,7 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
*m_rWW8Export.pTableStrm << WW8Export::GetNumId( nNumberingType );
// Justification
- BYTE nAlign;
+ sal_uInt8 nAlign;
switch ( eAdjust )
{
case SVX_ADJUST_CENTER: nAlign = 1; break;
@@ -255,7 +255,7 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
m_rWW8Export.pO = &aCharAtrs;
if ( pFont )
{
- USHORT nFontID = m_rWW8Export.maFontHelper.GetId( *pFont );
+ sal_uInt16 nFontID = m_rWW8Export.maFontHelper.GetId( *pFont );
if ( m_rWW8Export.bWrtWW8 )
{
@@ -272,21 +272,21 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
m_rWW8Export.pO = pOldpO;
}
- *m_rWW8Export.pTableStrm << BYTE( aCharAtrs.Count() );
+ *m_rWW8Export.pTableStrm << sal_uInt8( aCharAtrs.Count() );
// cbGrpprlPapx
- BYTE aPapSprms [] = {
+ sal_uInt8 aPapSprms [] = {
0x5e, 0x84, 0, 0, // sprmPDxaLeft
0x60, 0x84, 0, 0, // sprmPDxaLeft1
0x15, 0xc6, 0x05, 0x00, 0x01, 0, 0, 0x06
};
- *m_rWW8Export.pTableStrm << BYTE( sizeof( aPapSprms ) );
+ *m_rWW8Export.pTableStrm << sal_uInt8( sizeof( aPapSprms ) );
// reserved
SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 0 );
// pap sprms
- BYTE* pData = aPapSprms + 2;
+ sal_uInt8* pData = aPapSprms + 2;
Set_UInt16( pData, nIndentAt );
pData += 2;
Set_UInt16( pData, nFirstLineIndex );
@@ -306,8 +306,8 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
void MSWordExportBase::AbstractNumberingDefinitions()
{
- USHORT nCount = pUsedNumTbl->Count();
- USHORT n;
+ sal_uInt16 nCount = pUsedNumTbl->Count();
+ sal_uInt16 n;
// prepare the NodeNum to generate the NumString
SwNumberTree::tNumberVector aNumVector;
@@ -320,17 +320,17 @@ void MSWordExportBase::AbstractNumberingDefinitions()
AttrOutput().StartAbstractNumbering( n + 1 );
const SwNumRule& rRule = *pUsedNumTbl->GetObject( n );
- BYTE nLvl;
- BYTE nLevels = static_cast< BYTE >(rRule.IsContinusNum() ?
+ sal_uInt8 nLvl;
+ sal_uInt8 nLevels = static_cast< sal_uInt8 >(rRule.IsContinusNum() ?
WW8ListManager::nMinLevel : WW8ListManager::nMaxLevel);
for( nLvl = 0; nLvl < nLevels; ++nLvl )
{
// write the static data of the SwNumFmt of this level
- BYTE aNumLvlPos[WW8ListManager::nMaxLevel] = { 0,0,0,0,0,0,0,0,0 };
+ sal_uInt8 aNumLvlPos[WW8ListManager::nMaxLevel] = { 0,0,0,0,0,0,0,0,0 };
const SwNumFmt& rFmt = rRule.Get( nLvl );
- BYTE nFollow = 0;
+ sal_uInt8 nFollow = 0;
// --> OD 2008-06-03 #i86652#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -411,20 +411,20 @@ void MSWordExportBase::AbstractNumberingDefinitions()
{
if (SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType())
{
- BYTE* pLvlPos = aNumLvlPos;
+ sal_uInt8* pLvlPos = aNumLvlPos;
// --> OD 2005-10-17 #126238# - the numbering string
// has to be restrict to the level currently working on.
sNumStr = rRule.MakeNumString(aNumVector, false, true, nLvl);
// <--
// now search the nums in the string
- for( BYTE i = 0; i <= nLvl; ++i )
+ for( sal_uInt8 i = 0; i <= nLvl; ++i )
{
String sSrch( String::CreateFromInt32( i ));
xub_StrLen nFnd = sNumStr.Search( sSrch );
if( STRING_NOTFOUND != nFnd )
{
- *pLvlPos = (BYTE)(nFnd + rFmt.GetPrefix().Len() + 1 );
+ *pLvlPos = (sal_uInt8)(nFnd + rFmt.GetPrefix().Len() + 1 );
++pLvlPos;
sNumStr.SetChar( nFnd, (char)i );
}
@@ -518,8 +518,8 @@ void WW8Export::OutOverrideListTab()
return ; // no numbering is used
// write the "list format override" - LFO
- USHORT nCount = pUsedNumTbl->Count();
- USHORT n;
+ sal_uInt16 nCount = pUsedNumTbl->Count();
+ sal_uInt16 n;
pFib->fcPlfLfo = pTableStrm->Tell();
SwWW8Writer::WriteLong( *pTableStrm, nCount );
@@ -542,7 +542,7 @@ void WW8Export::OutListNamesTab()
return ; // no numbering is used
// write the "list format override" - LFO
- USHORT nNms = 0, nCount = pUsedNumTbl->Count();
+ sal_uInt16 nNms = 0, nCount = pUsedNumTbl->Count();
pFib->fcSttbListNames = pTableStrm->Tell();
SwWW8Writer::WriteShort( *pTableStrm, -1 );
@@ -574,41 +574,41 @@ void WW8Export::OutputOlst( const SwNumRule& rRule )
if ( bWrtWW8 )
return;
- static BYTE __READONLY_DATA aAnlvBase[] = { // Defaults
+ static sal_uInt8 __READONLY_DATA aAnlvBase[] = { // Defaults
1,0,0, // Upper Roman
0x0C, // Hanging Indent, fPrev
0,0,1,0x80,0,0,1,0,0x1b,1,0,0 };
- static BYTE __READONLY_DATA aSprmOlstHdr[] = { 133, 212 };
+ static sal_uInt8 __READONLY_DATA aSprmOlstHdr[] = { 133, 212 };
pO->Insert( aSprmOlstHdr, sizeof( aSprmOlstHdr ), pO->Count() );
WW8_OLST aOlst;
memset( &aOlst, 0, sizeof(aOlst) );
- BYTE* pC = aOlst.rgch;
- BYTE* pChars = (BYTE*)pC;
- USHORT nCharLen = 64;
+ sal_uInt8* pC = aOlst.rgch;
+ sal_uInt8* pChars = (sal_uInt8*)pC;
+ sal_uInt16 nCharLen = 64;
- for (USHORT j = 0; j < WW8ListManager::nMaxLevel; j++ ) // 9 variable ANLVs
+ for (sal_uInt16 j = 0; j < WW8ListManager::nMaxLevel; j++ ) // 9 variable ANLVs
{
memcpy( &aOlst.rganlv[j], aAnlvBase, sizeof( WW8_ANLV ) ); // Defaults
const SwNumFmt* pFmt = rRule.GetNumFmt( j );
if( pFmt )
BuildAnlvBase( aOlst.rganlv[j], pChars, nCharLen, rRule,
- *pFmt, (BYTE)j );
+ *pFmt, (sal_uInt8)j );
}
- pO->Insert( (BYTE*)&aOlst, sizeof( aOlst ), pO->Count() );
+ pO->Insert( (sal_uInt8*)&aOlst, sizeof( aOlst ), pO->Count() );
}
-void WW8Export::Out_WwNumLvl( BYTE nWwLevel )
+void WW8Export::Out_WwNumLvl( sal_uInt8 nWwLevel )
{
pO->Insert( 13, pO->Count() );
pO->Insert( nWwLevel, pO->Count() );
}
-void WW8Export::Out_SwNumLvl( BYTE nSwLevel )
+void WW8Export::Out_SwNumLvl( sal_uInt8 nSwLevel )
{
// --> OD 2008-04-02 #refactorlists#
// ASSERT(IsNum(nSwLevel), "numbered?");
@@ -617,12 +617,12 @@ void WW8Export::Out_SwNumLvl( BYTE nSwLevel )
Out_WwNumLvl( nSwLevel + 1 );
}
-void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
- USHORT& rCharLen, const SwNumFmt& rFmt)
+void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
+ sal_uInt16& rCharLen, const SwNumFmt& rFmt)
{
ByteToSVBT8(11, rAnlv.nfc);
- BYTE nb = 0; // Zahlentyp
+ sal_uInt8 nb = 0; // Zahlentyp
switch (rFmt.GetNumAdjust())
{
case SVX_ADJUST_RIGHT:
@@ -662,7 +662,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
rtl_TextEncoding eChrSet = rFont.GetCharSet();
String sFontName = rFont.GetName();
- USHORT nFontId;
+ sal_uInt16 nFontId;
if (sw::util::IsStarSymbol(sFontName))
{
/*
@@ -691,7 +691,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
if ( (eChrSet == RTL_TEXTENCODING_SYMBOL) && (cChar >= 0xF000) && (
cChar <= 0xF0FF) )
{
- *rpCh = static_cast< BYTE >(cChar - 0xF000);
+ *rpCh = static_cast< sal_uInt8 >(cChar - 0xF000);
}
else
*rpCh = ByteString::ConvertFromUnicode(cChar, eChrSet);
@@ -772,17 +772,17 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
delete pConvert;
}
-static void SwWw8_InsertAnlText( const String& rStr, BYTE*& rpCh,
- USHORT& rCharLen, SVBT8& r8Len )
+static void SwWw8_InsertAnlText( const String& rStr, sal_uInt8*& rpCh,
+ sal_uInt16& rCharLen, SVBT8& r8Len )
{
- BYTE nb = 0;
+ sal_uInt8 nb = 0;
WW8Bytes aO;
SwWW8Writer::InsAsString8( aO, rStr, RTL_TEXTENCODING_MS_1252 );
- USHORT nCnt = aO.Count();
+ sal_uInt16 nCnt = aO.Count();
if( nCnt && nCnt < rCharLen )
{
- nb = (BYTE)nCnt;
+ nb = (sal_uInt8)nCnt;
memcpy( rpCh, aO.GetData(), nCnt );
rpCh += nCnt;
rCharLen = rCharLen - nCnt;
@@ -790,13 +790,13 @@ static void SwWw8_InsertAnlText( const String& rStr, BYTE*& rpCh,
ByteToSVBT8( nb, r8Len );
}
-void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
- USHORT& rCharLen, const SwNumRule& rRul, const SwNumFmt& rFmt,
- BYTE nSwLevel)
+void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
+ sal_uInt16& rCharLen, const SwNumRule& rRul, const SwNumFmt& rFmt,
+ sal_uInt8 nSwLevel)
{
ByteToSVBT8(WW8Export::GetNumId(rFmt.GetNumberingType()), rAnlv.nfc);
- BYTE nb = 0;
+ sal_uInt8 nb = 0;
switch (rFmt.GetNumAdjust())
{
case SVX_ADJUST_RIGHT:
@@ -828,7 +828,7 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
&& (nSwLevel<= WW8ListManager::nMaxLevel )
&& (rFmt.GetNumberingType() != SVX_NUM_NUMBER_NONE ) ) // UEberhaupt Nummerierung ?
{ // -> suche, ob noch Zahlen davor
- BYTE nUpper = rFmt.GetIncludeUpperLevels();
+ sal_uInt8 nUpper = rFmt.GetIncludeUpperLevels();
if( (nUpper <= WW8ListManager::nMaxLevel) &&
(rRul.Get(nUpper).GetNumberingType() != SVX_NUM_NUMBER_NONE ) ) // Nummerierung drueber ?
{
@@ -863,21 +863,21 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
}
void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
- BYTE nSwLevel )
+ sal_uInt8 nSwLevel )
{
- static BYTE __READONLY_DATA aSprmAnldDefault[54] = {
+ static sal_uInt8 __READONLY_DATA aSprmAnldDefault[54] = {
12, 52,
1,0,0,0x0c,0,0,1,0x80,0,0,1,0,0x1b,1,0,0,0x2e,
0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
- BYTE aSprmAnld[54];
+ sal_uInt8 aSprmAnld[54];
memcpy( aSprmAnld, aSprmAnldDefault, sizeof( aSprmAnld ) );
WW8_ANLD* pA = (WW8_ANLD*)(aSprmAnld + 2); // handlicher Pointer
- BYTE* pChars = (BYTE*)(pA->rgchAnld);
- USHORT nCharLen = 31;
+ sal_uInt8* pChars = (sal_uInt8*)(pA->rgchAnld);
+ sal_uInt16 nCharLen = 31;
if( nSwLevel == 11 )
BuildAnlvBulletBase( pA->eAnlv, pChars, nCharLen, rFmt );
@@ -885,7 +885,7 @@ void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
BuildAnlvBase( pA->eAnlv, pChars, nCharLen, rRul, rFmt, nSwLevel );
// ... und raus damit
- OutSprmBytes( (BYTE*)&aSprmAnld, sizeof( aSprmAnld ) );
+ OutSprmBytes( (sal_uInt8*)&aSprmAnld, sizeof( aSprmAnld ) );
}
@@ -896,12 +896,12 @@ bool WW8Export::Out_SwNum(const SwTxtNode* pNd)
if (nLevel < 0 || nLevel >= MAXLEVEL)
{
- ASSERT(FALSE, "Invalid level");
+ ASSERT(sal_False, "Invalid level");
return false;
}
- BYTE nSwLevel = static_cast< BYTE >(nLevel);
+ sal_uInt8 nSwLevel = static_cast< sal_uInt8 >(nLevel);
const SwNumRule* pRul = pNd->GetNumRule();
if( !pRul || nSwLevel == WW8ListManager::nMaxLevel)
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index ab7a8c4e3a0e..d6134c5b1c10 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -103,15 +103,15 @@ class WW8_WrPlc0
{
private:
SvULongs aPos; // PTRARR von CPs / FCs
- ULONG nOfs;
+ sal_uLong nOfs;
//No copying
WW8_WrPlc0(const WW8_WrPlc0&);
WW8_WrPlc0 &operator=(const WW8_WrPlc0&);
public:
- WW8_WrPlc0( ULONG nOffset );
- USHORT Count() const { return aPos.Count(); }
- void Append( ULONG nStartCpOrFc );
+ WW8_WrPlc0( sal_uLong nOffset );
+ sal_uInt16 Count() const { return aPos.Count(); }
+ void Append( sal_uLong nStartCpOrFc );
void Write( SvStream& rStrm );
};
@@ -123,17 +123,17 @@ public:
// GetId( SwCharFmt ) zur Benutzung im Text -> nil verboten,
// "Default Char Style" stattdessen
-USHORT MSWordExportBase::GetId( const SwCharFmt& rFmt ) const
+sal_uInt16 MSWordExportBase::GetId( const SwCharFmt& rFmt ) const
{
- USHORT nRet = pStyles->GetSlot( rFmt );
+ sal_uInt16 nRet = pStyles->GetSlot( rFmt );
return ( nRet != 0x0fff ) ? nRet : 10; // Default Char Style
}
// GetId( SwTxtFmtColl ) zur Benutzung an TextNodes -> nil verboten,
// "Standard" stattdessen
-USHORT MSWordExportBase::GetId( const SwTxtFmtColl& rColl ) const
+sal_uInt16 MSWordExportBase::GetId( const SwTxtFmtColl& rColl ) const
{
- USHORT nRet = pStyles->GetSlot( rColl );
+ sal_uInt16 nRet = pStyles->GetSlot( rColl );
return ( nRet != 0xfff ) ? nRet : 0; // Default TxtFmtColl
}
@@ -152,7 +152,7 @@ MSWordStyles::MSWordStyles( MSWordExportBase& rExport )
m_rExport.pDoc->GetFtnInfo().GetAnchorCharFmt( *m_rExport.pDoc );
m_rExport.pDoc->GetFtnInfo().GetCharFmt( *m_rExport.pDoc );
}
- USHORT nAlloc = WW8_RESERVED_SLOTS + m_rExport.pDoc->GetCharFmts()->Count() - 1 +
+ sal_uInt16 nAlloc = WW8_RESERVED_SLOTS + m_rExport.pDoc->GetCharFmts()->Count() - 1 +
m_rExport.pDoc->GetTxtFmtColls()->Count() - 1;
// etwas grosszuegig ( bis zu 15 frei )
@@ -168,18 +168,18 @@ MSWordStyles::~MSWordStyles()
}
// Sty_SetWWSlot() fuer Abhaengigkeiten der Styles -> nil ist erlaubt
-USHORT MSWordStyles::GetSlot( const SwFmt& rFmt ) const
+sal_uInt16 MSWordStyles::GetSlot( const SwFmt& rFmt ) const
{
- USHORT n;
+ sal_uInt16 n;
for ( n = 0; n < nUsedSlots; n++ )
if ( pFmtA[n] == &rFmt )
return n;
return 0xfff; // 0xfff: WW: nil
}
-USHORT MSWordStyles::BuildGetSlot( const SwFmt& rFmt )
+sal_uInt16 MSWordStyles::BuildGetSlot( const SwFmt& rFmt )
{
- USHORT nRet;
+ sal_uInt16 nRet;
switch ( nRet = rFmt.GetPoolFmtId() )
{
case RES_POOLCOLL_STANDARD:
@@ -207,24 +207,24 @@ USHORT MSWordStyles::BuildGetSlot( const SwFmt& rFmt )
return nRet;
}
-USHORT MSWordStyles::GetWWId( const SwFmt& rFmt ) const
+sal_uInt16 MSWordStyles::GetWWId( const SwFmt& rFmt ) const
{
- USHORT nRet = ww::stiUser; // User-Style als default
- USHORT nPoolId = rFmt.GetPoolFmtId();
+ sal_uInt16 nRet = ww::stiUser; // User-Style als default
+ sal_uInt16 nPoolId = rFmt.GetPoolFmtId();
if( nPoolId == RES_POOLCOLL_STANDARD )
nRet = 0;
else if( nPoolId >= RES_POOLCOLL_HEADLINE1 &&
nPoolId <= RES_POOLCOLL_HEADLINE9 )
- nRet = static_cast< USHORT >(nPoolId + 1 - RES_POOLCOLL_HEADLINE1);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 1 - RES_POOLCOLL_HEADLINE1);
else if( nPoolId >= RES_POOLCOLL_TOX_IDX1 &&
nPoolId <= RES_POOLCOLL_TOX_IDX3 )
- nRet = static_cast< USHORT >(nPoolId + 10 - RES_POOLCOLL_TOX_IDX1);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 10 - RES_POOLCOLL_TOX_IDX1);
else if( nPoolId >= RES_POOLCOLL_TOX_CNTNT1 &&
nPoolId <= RES_POOLCOLL_TOX_CNTNT5 )
- nRet = static_cast< USHORT >(nPoolId + 19 - RES_POOLCOLL_TOX_CNTNT1);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 19 - RES_POOLCOLL_TOX_CNTNT1);
else if( nPoolId >= RES_POOLCOLL_TOX_CNTNT6 &&
nPoolId <= RES_POOLCOLL_TOX_CNTNT9 )
- nRet = static_cast< USHORT >(nPoolId + 24 - RES_POOLCOLL_TOX_CNTNT6);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 24 - RES_POOLCOLL_TOX_CNTNT6);
else
switch( nPoolId )
{
@@ -260,7 +260,7 @@ void MSWordStyles::BuildStylesTable()
nUsedSlots = WW8_RESERVED_SLOTS; // soviele sind reserviert fuer
// Standard und HeadingX u.a.
SwFmt* pFmt;
- USHORT n;
+ sal_uInt16 n;
const SvPtrarr& rArr = *m_rExport.pDoc->GetCharFmts(); // erst CharFmt
// das Default-ZeichenStyle ( 0 ) wird nicht mit ausgegeben !
for( n = 1; n < rArr.Count(); n++ )
@@ -282,7 +282,7 @@ void MSWordStyles::BuildStylesTable()
static void impl_SkipOdd( WW8Bytes* pO, sal_Size nTableStrmTell )
{
if ( ( nTableStrmTell + pO->Count() ) & 1 ) // Start auf gerader
- pO->Insert( (BYTE)0, pO->Count() ); // Adresse
+ pO->Insert( (sal_uInt8)0, pO->Count() ); // Adresse
}
void WW8AttributeOutput::EndStyle()
@@ -290,23 +290,23 @@ void WW8AttributeOutput::EndStyle()
impl_SkipOdd( m_rWW8Export.pO, m_rWW8Export.pTableStrm->Tell() );
short nLen = m_rWW8Export.pO->Count() - 2; // Laenge des Styles
- BYTE* p = (BYTE*)m_rWW8Export.pO->GetData() + nPOPosStdLen1;
+ sal_uInt8* p = (sal_uInt8*)m_rWW8Export.pO->GetData() + nPOPosStdLen1;
ShortToSVBT16( nLen, p ); // nachtragen
- p = (BYTE*)m_rWW8Export.pO->GetData() + nPOPosStdLen2;
+ p = (sal_uInt8*)m_rWW8Export.pO->GetData() + nPOPosStdLen2;
ShortToSVBT16( nLen, p ); // dito
m_rWW8Export.pTableStrm->Write( m_rWW8Export.pO->GetData(), m_rWW8Export.pO->Count() ); // ins File damit
m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren fuer naechsten
}
-void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT nWwBase,
- USHORT nWwNext, USHORT nWwId, USHORT /*nId*/ )
+void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, sal_uInt16 nWwBase,
+ sal_uInt16 nWwNext, sal_uInt16 nWwId, sal_uInt16 /*nId*/ )
{
- BYTE aWW8_STD[ sizeof( WW8_STD ) ];
- BYTE* pData = aWW8_STD;
+ sal_uInt8 aWW8_STD[ sizeof( WW8_STD ) ];
+ sal_uInt8* pData = aWW8_STD;
memset( &aWW8_STD, 0, sizeof( WW8_STD ) );
- UINT16 nBit16 = 0x1000; // fInvalHeight
+ sal_uInt16 nBit16 = 0x1000; // fInvalHeight
nBit16 |= (ww::stiNil & nWwId);
Set_UInt16( pData, nBit16 );
@@ -318,27 +318,27 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT n
nBit16 |= bPapFmt ? 2 : 1; // cupx
Set_UInt16( pData, nBit16 );
- pData += sizeof( UINT16 ); // bchUpe
+ pData += sizeof( sal_uInt16 ); // bchUpe
if( m_rWW8Export.bWrtWW8 )
{
//-------- jetzt neu:
// ab Ver8 gibts zwei Felder mehr:
- //UINT16 fAutoRedef : 1; /* auto redefine style when appropriate */
- //UINT16 fHidden : 1; /* hidden from UI? */
- //UINT16 : 14; /* unused bits */
- pData += sizeof( UINT16 );
+ //sal_uInt16 fAutoRedef : 1; /* auto redefine style when appropriate */
+ //sal_uInt16 fHidden : 1; /* hidden from UI? */
+ //sal_uInt16 : 14; /* unused bits */
+ pData += sizeof( sal_uInt16 );
}
- UINT16 nLen = static_cast< UINT16 >( ( pData - aWW8_STD ) + 1 +
+ sal_uInt16 nLen = static_cast< sal_uInt16 >( ( pData - aWW8_STD ) + 1 +
((m_rWW8Export.bWrtWW8 ? 2 : 1 ) * (rName.Len() + 1)) ); // vorlaeufig
WW8Bytes* pO = m_rWW8Export.pO;
nPOPosStdLen1 = pO->Count(); // Adr1 zum nachtragen der Laenge
SwWW8Writer::InsUInt16( *pO, nLen );
- pO->Insert( aWW8_STD, static_cast< USHORT >( pData - aWW8_STD ), pO->Count() );
+ pO->Insert( aWW8_STD, static_cast< sal_uInt16 >( pData - aWW8_STD ), pO->Count() );
nPOPosStdLen2 = nPOPosStdLen1 + 8; // Adr2 zum nachtragen von "end of upx"
@@ -350,18 +350,18 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT n
}
else
{
- pO->Insert( (BYTE)rName.Len(), pO->Count() ); // Laenge
+ pO->Insert( (sal_uInt8)rName.Len(), pO->Count() ); // Laenge
SwWW8Writer::InsAsString8( *pO, rName, RTL_TEXTENCODING_MS_1252 );
}
- pO->Insert( (BYTE)0, pO->Count() ); // Trotz P-String 0 am Ende!
+ pO->Insert( (sal_uInt8)0, pO->Count() ); // Trotz P-String 0 am Ende!
}
void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
{
const SwModify* pOldMod = m_rExport.pOutFmtNode;
m_rExport.pOutFmtNode = &rFmt;
- bool aFlags[ static_cast< USHORT >(RES_FRMATR_END) - RES_CHRATR_BEGIN ];
- USHORT nStt, nEnd, n;
+ bool aFlags[ static_cast< sal_uInt16 >(RES_FRMATR_END) - RES_CHRATR_BEGIN ];
+ sal_uInt16 nStt, nEnd, n;
if( bPap )
nStt = RES_PARATR_BEGIN, nEnd = RES_FRMATR_END;
else
@@ -375,8 +375,8 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
// static defaults, that differs between WinWord and SO
if( bPap )
{
- aFlags[ static_cast< USHORT >(RES_PARATR_WIDOWS) - RES_CHRATR_BEGIN ] = 1;
- aFlags[ static_cast< USHORT >(RES_PARATR_HYPHENZONE) - RES_CHRATR_BEGIN ] = 1;
+ aFlags[ static_cast< sal_uInt16 >(RES_PARATR_WIDOWS) - RES_CHRATR_BEGIN ] = 1;
+ aFlags[ static_cast< sal_uInt16 >(RES_PARATR_HYPHENZONE) - RES_CHRATR_BEGIN ] = 1;
}
else
{
@@ -407,13 +407,13 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
m_rExport.pOutFmtNode = pOldMod;
}
-void WW8AttributeOutput::StartStyleProperties( bool bParProp, USHORT nStyle )
+void WW8AttributeOutput::StartStyleProperties( bool bParProp, sal_uInt16 nStyle )
{
WW8Bytes* pO = m_rWW8Export.pO;
impl_SkipOdd( pO, m_rWW8Export.pTableStrm->Tell() );
- UINT16 nLen = ( bParProp ) ? 2 : 0; // Default-Laenge
+ sal_uInt16 nLen = ( bParProp ) ? 2 : 0; // Default-Laenge
m_nStyleLenPos = pO->Count(); // Laenge zum Nachtragen
// Keinen Pointer merken, da sich bei
// _grow der Pointer aendert !
@@ -426,7 +426,7 @@ void WW8AttributeOutput::StartStyleProperties( bool bParProp, USHORT nStyle )
SwWW8Writer::InsUInt16( *pO, nStyle ); // Style-Nummer
}
-void MSWordStyles::WriteProperties( const SwFmt* pFmt, bool bParProp, USHORT nPos,
+void MSWordStyles::WriteProperties( const SwFmt* pFmt, bool bParProp, sal_uInt16 nPos,
bool bInsDefCharSiz )
{
m_rExport.AttrOutput().StartStyleProperties( bParProp, nPos );
@@ -450,12 +450,12 @@ void WW8AttributeOutput::EndStyleProperties( bool /*bParProp*/ )
{
WW8Bytes* pO = m_rWW8Export.pO;
- UINT16 nLen = pO->Count() - m_nStyleStartSize;
- BYTE* pUpxLen = (BYTE*)pO->GetData() + m_nStyleLenPos; // Laenge zum Nachtragen
+ sal_uInt16 nLen = pO->Count() - m_nStyleStartSize;
+ sal_uInt8* pUpxLen = (sal_uInt8*)pO->GetData() + m_nStyleLenPos; // Laenge zum Nachtragen
ShortToSVBT16( nLen, pUpxLen ); // Default-Laenge eintragen
}
-void MSWordStyles::GetStyleData( SwFmt* pFmt, bool& bFmtColl, USHORT& nBase, USHORT& nNext )
+void MSWordStyles::GetStyleData( SwFmt* pFmt, bool& bFmtColl, sal_uInt16& nBase, sal_uInt16& nNext )
{
bFmtColl = pFmt->Which() == RES_TXTFMTCOLL || pFmt->Which() == RES_CONDTXTFMTCOLL;
@@ -475,13 +475,13 @@ void MSWordStyles::GetStyleData( SwFmt* pFmt, bool& bFmtColl, USHORT& nBase, USH
nNext = GetSlot( *pNext );
}
-void WW8AttributeOutput::DefaultStyle( USHORT nStyle )
+void WW8AttributeOutput::DefaultStyle( sal_uInt16 nStyle )
{
if ( nStyle == 10 ) // Default Char-Style ( nur WW )
{
if ( m_rWW8Export.bWrtWW8 )
{
- static BYTE __READONLY_DATA aDefCharSty[] = {
+ static sal_uInt8 __READONLY_DATA aDefCharSty[] = {
0x42, 0x00,
0x41, 0x40, 0xF2, 0xFF, 0xA1, 0x00, 0x42, 0x00,
0x00, 0x00, 0x19, 0x00, 0x41, 0x00, 0x62, 0x00,
@@ -496,7 +496,7 @@ void WW8AttributeOutput::DefaultStyle( USHORT nStyle )
}
else
{
- static BYTE __READONLY_DATA aDefCharSty[] = {
+ static sal_uInt8 __READONLY_DATA aDefCharSty[] = {
0x26, 0x00,
0x41, 0x40, 0xF2, 0xFF, 0xA1, 0x00, 0x26, 0x00,
0x19, 0x41, 0x62, 0x73, 0x61, 0x74, 0x7A, 0x2D,
@@ -508,20 +508,20 @@ void WW8AttributeOutput::DefaultStyle( USHORT nStyle )
}
else
{
- UINT16 n = 0;
+ sal_uInt16 n = 0;
m_rWW8Export.pTableStrm->Write( &n , 2 ); // leerer Style
}
}
// OutputStyle geht fuer TxtFmtColls und CharFmts
-void MSWordStyles::OutputStyle( SwFmt* pFmt, USHORT nPos )
+void MSWordStyles::OutputStyle( SwFmt* pFmt, sal_uInt16 nPos )
{
if ( !pFmt )
m_rExport.AttrOutput().DefaultStyle( nPos );
else
{
bool bFmtColl;
- USHORT nBase, nWwNext;
+ sal_uInt16 nBase, nWwNext;
GetStyleData( pFmt, bFmtColl, nBase, nWwNext );
@@ -541,7 +541,7 @@ void WW8AttributeOutput::StartStyles()
{
WW8Fib& rFib = *m_rWW8Export.pFib;
- ULONG nCurPos = m_rWW8Export.pTableStrm->Tell();
+ sal_uLong nCurPos = m_rWW8Export.pTableStrm->Tell();
if ( nCurPos & 1 ) // Start auf gerader
{
*m_rWW8Export.pTableStrm << (char)0; // Adresse
@@ -552,7 +552,7 @@ void WW8AttributeOutput::StartStyles()
if ( m_rWW8Export.bWrtWW8 )
{
- static BYTE __READONLY_DATA aStShi[] = {
+ static sal_uInt8 __READONLY_DATA aStShi[] = {
0x12, 0x00,
0x0F, 0x00, 0x0A, 0x00, 0x01, 0x00, 0x5B, 0x00,
0x0F, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -562,7 +562,7 @@ void WW8AttributeOutput::StartStyles()
}
else
{
- static BYTE __READONLY_DATA aStShi[] = {
+ static sal_uInt8 __READONLY_DATA aStShi[] = {
0x0E, 0x00,
0x0F, 0x00, 0x08, 0x00, 0x01, 0x00, 0x4B, 0x00,
0x0F, 0x00, 0x00, 0x00, 0x00, 0x00 };
@@ -570,7 +570,7 @@ void WW8AttributeOutput::StartStyles()
}
}
-void WW8AttributeOutput::EndStyles( USHORT nNumberOfStyles )
+void WW8AttributeOutput::EndStyles( sal_uInt16 nNumberOfStyles )
{
WW8Fib& rFib = *m_rWW8Export.pFib;
@@ -584,7 +584,7 @@ void MSWordStyles::OutputStylesTable()
m_rExport.AttrOutput().StartStyles();
- USHORT n;
+ sal_uInt16 n;
for ( n = 0; n < nUsedSlots; n++ )
OutputStyle( pFmtA[n], n );
@@ -615,18 +615,18 @@ wwFont::wwFont(const String &rFamilyName, FontPitch ePitch, FontFamily eFamily,
if (bWrtWW8)
{
- maWW8_FFN[0] = (BYTE)( 6 - 1 + 0x22 + ( 2 * ( 1 + msFamilyNm.Len() ) ));
+ maWW8_FFN[0] = (sal_uInt8)( 6 - 1 + 0x22 + ( 2 * ( 1 + msFamilyNm.Len() ) ));
if (mbAlt)
- maWW8_FFN[0] = static_cast< BYTE >(maWW8_FFN[0] + 2 * ( 1 + msAltNm.Len()));
+ maWW8_FFN[0] = static_cast< sal_uInt8 >(maWW8_FFN[0] + 2 * ( 1 + msAltNm.Len()));
}
else
{
- maWW8_FFN[0] = (BYTE)( 6 - 1 + 1 + msFamilyNm.Len() );
+ maWW8_FFN[0] = (sal_uInt8)( 6 - 1 + 1 + msFamilyNm.Len() );
if (mbAlt)
- maWW8_FFN[0] = static_cast< BYTE >(maWW8_FFN[0] + 1 + msAltNm.Len());
+ maWW8_FFN[0] = static_cast< sal_uInt8 >(maWW8_FFN[0] + 1 + msAltNm.Len());
}
- BYTE aB = 0;
+ sal_uInt8 aB = 0;
switch(ePitch)
{
case PITCH_VARIABLE:
@@ -667,7 +667,7 @@ wwFont::wwFont(const String &rFamilyName, FontPitch ePitch, FontFamily eFamily,
maWW8_FFN[4] = sw::ms::rtl_TextEncodingToWinCharset(eChrSet);
if (mbAlt)
- maWW8_FFN[5] = static_cast< BYTE >(msFamilyNm.Len() + 1);
+ maWW8_FFN[5] = static_cast< sal_uInt8 >(msFamilyNm.Len() + 1);
}
bool wwFont::Write(SvStream *pTableStrm) const
@@ -739,15 +739,15 @@ bool operator<(const wwFont &r1, const wwFont &r2)
}
-USHORT wwFontHelper::GetId(const wwFont &rFont)
+sal_uInt16 wwFontHelper::GetId(const wwFont &rFont)
{
- USHORT nRet;
- ::std::map<wwFont, USHORT>::const_iterator aIter = maFonts.find(rFont);
+ sal_uInt16 nRet;
+ ::std::map<wwFont, sal_uInt16>::const_iterator aIter = maFonts.find(rFont);
if (aIter != maFonts.end())
nRet = aIter->second;
else
{
- nRet = static_cast< USHORT >(maFonts.size());
+ nRet = static_cast< sal_uInt16 >(maFonts.size());
maFonts[rFont] = nRet;
}
return nRet;
@@ -781,8 +781,8 @@ void wwFontHelper::InitFontTable(bool bWrtWW8,const SwDoc& rDoc)
if (!bLoadAllFonts)
return;
- const USHORT aTypes[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT, 0 };
- for (const USHORT* pId = aTypes; *pId; ++pId)
+ const sal_uInt16 aTypes[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT, 0 };
+ for (const sal_uInt16* pId = aTypes; *pId; ++pId)
{
sal_uInt32 const nMaxItem = rPool.GetItemCount2( *pId );
for (sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet)
@@ -797,14 +797,14 @@ void wwFontHelper::InitFontTable(bool bWrtWW8,const SwDoc& rDoc)
}
}
-USHORT wwFontHelper::GetId(const Font& rFont)
+sal_uInt16 wwFontHelper::GetId(const Font& rFont)
{
wwFont aFont(rFont.GetName(), rFont.GetPitch(), rFont.GetFamily(),
rFont.GetCharSet(), mbWrtWW8);
return GetId(aFont);
}
-USHORT wwFontHelper::GetId(const SvxFontItem& rFont)
+sal_uInt16 wwFontHelper::GetId(const SvxFontItem& rFont)
{
wwFont aFont(rFont.GetFamilyName(), rFont.GetPitch(), rFont.GetFamily(),
rFont.GetCharSet(), mbWrtWW8);
@@ -815,7 +815,7 @@ USHORT wwFontHelper::GetId(const SvxFontItem& rFont)
{
::std::vector<const wwFont *> aFontList( maFonts.size() );
- typedef ::std::map<wwFont, USHORT>::const_iterator myiter;
+ typedef ::std::map<wwFont, sal_uInt16>::const_iterator myiter;
myiter aEnd = maFonts.end();
for ( myiter aIter = maFonts.begin(); aIter != aEnd; ++aIter )
aFontList[aIter->second] = &aIter->first;
@@ -855,7 +855,7 @@ void wwFontHelper::WriteFontTable(SvStream *pTableStream, WW8Fib& rFib)
else
{
SwWW8Writer::WriteShort( *pTableStream, rFib.fcSttbfffn,
- (INT16)rFib.lcbSttbfffn );
+ (sal_Int16)rFib.lcbSttbfffn );
}
}
@@ -879,20 +879,20 @@ void wwFontHelper::WriteFontTable( const RtfAttributeOutput& rAttrOutput )
/* */
-WW8_WrPlc0::WW8_WrPlc0( ULONG nOffset )
+WW8_WrPlc0::WW8_WrPlc0( sal_uLong nOffset )
: aPos( 4, 4 ), nOfs( nOffset )
{
}
-void WW8_WrPlc0::Append( ULONG nStartCpOrFc )
+void WW8_WrPlc0::Append( sal_uLong nStartCpOrFc )
{
aPos.Insert( nStartCpOrFc - nOfs, aPos.Count() );
}
void WW8_WrPlc0::Write( SvStream& rStrm )
{
- USHORT nLen = aPos.Count();
- for( USHORT i = 0; i < nLen; ++i )
+ sal_uInt16 nLen = aPos.Count();
+ for( sal_uInt16 i = 0; i < nLen; ++i )
{
SVBT32 nP;
UInt32ToSVBT32( aPos[i], nP );
@@ -919,7 +919,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport )
const SwNode* pNd = rExport.pCurPam->GetCntntNode();
const SfxItemSet* pSet = pNd ? &((SwCntntNode*)pNd)->GetSwAttrSet() : 0;
- ULONG nRstLnNum = pSet ? ((SwFmtLineNumber&)pSet->Get( RES_LINENUMBER )).GetStartValue() : 0;
+ sal_uLong nRstLnNum = pSet ? ((SwFmtLineNumber&)pSet->Get( RES_LINENUMBER )).GetStartValue() : 0;
const SwTableNode* pTblNd = rExport.pCurPam->GetNode()->FindTableNode();
const SwSectionNode* pSectNd;
@@ -965,7 +965,7 @@ WW8_WrPlcSepx::WW8_WrPlcSepx( MSWordExportBase& rExport )
{
// to be in sync with the AppendSection() call in the MSWordSections
// constructor
- aCps.Insert( ULONG( 0 ), aCps.Count() );
+ aCps.Insert( sal_uLong( 0 ), aCps.Count() );
}
MSWordSections::~MSWordSections()
@@ -974,7 +974,7 @@ MSWordSections::~MSWordSections()
WW8_WrPlcSepx::~WW8_WrPlcSepx()
{
- USHORT nLen = aSects.Count();
+ sal_uInt16 nLen = aSects.Count();
if( pAttrs )
{
while( nLen )
@@ -1027,7 +1027,7 @@ const WW8_SepInfo* MSWordSections::CurrentSectionInfo()
}
void MSWordSections::AppendSection( const SwPageDesc* pPd,
- const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
aSects.Insert( WW8_SepInfo( pPd, pSectionFmt, nLnNumRestartNo ),
aSects.Count() );
@@ -1035,7 +1035,7 @@ void MSWordSections::AppendSection( const SwPageDesc* pPd,
}
void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd,
- const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
aCps.Insert( nStartCp, aCps.Count() );
@@ -1043,7 +1043,7 @@ void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd,
}
void MSWordSections::AppendSection( const SwFmtPageDesc& rPD,
- const SwNode& rNd, const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwNode& rNd, const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
WW8_SepInfo aI( rPD.GetPageDesc(), pSectionFmt, nLnNumRestartNo,
rPD.GetNumOffset(), &rNd );
@@ -1052,7 +1052,7 @@ void MSWordSections::AppendSection( const SwFmtPageDesc& rPD,
}
void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPD,
- const SwNode& rNd, const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwNode& rNd, const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
aCps.Insert(nStartCp, aCps.Count());
@@ -1070,14 +1070,14 @@ void MSWordSections::SetNum( const SwTxtNode* pNumNd )
rInfo.pNumNd = pNumNd;
}
-void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, ULONG nCpStt )
+void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, sal_uLong nCpStt )
{
- BYTE nInfoFlags = 0;
+ sal_uInt8 nInfoFlags = 0;
const SwFtnInfo& rInfo = rWrt.pDoc->GetFtnInfo();
if( rInfo.aErgoSum.Len() ) nInfoFlags |= 0x02;
if( rInfo.aQuoVadis.Len() ) nInfoFlags |= 0x04;
- BYTE nEmptyStt = rWrt.bWrtWW8 ? 0 : 6;
+ sal_uInt8 nEmptyStt = rWrt.bWrtWW8 ? 0 : 6;
if( nInfoFlags )
{
if( rWrt.bWrtWW8 )
@@ -1133,8 +1133,8 @@ void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, ULONG nCpStt )
rDop.epc = rWrt.bEndAtTxtEnd ? 3 : 0;
}
-void MSWordSections::SetHeaderFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag )
+void MSWordSections::SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rFmt.GetItemState(RES_HEADER, true, &pItem)
@@ -1143,8 +1143,8 @@ void MSWordSections::SetHeaderFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
rHeadFootFlags |= nFlag;
}
-void MSWordSections::SetFooterFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag )
+void MSWordSections::SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rFmt.GetItemState(RES_FOOTER, true, &pItem)
@@ -1154,8 +1154,8 @@ void MSWordSections::SetFooterFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
}
void WW8_WrPlcSepx::OutHeaderFooter( WW8Export& rWrt, bool bHeader,
- const SwFmt& rFmt, ULONG& rCpPos, BYTE nHFFlags,
- BYTE nFlag, BYTE nBreakCode)
+ const SwFmt& rFmt, sal_uLong& rCpPos, sal_uInt8 nHFFlags,
+ sal_uInt8 nFlag, sal_uInt8 nBreakCode)
{
if ( nFlag & nHFFlags )
{
@@ -1205,7 +1205,7 @@ void MSWordSections::CheckForFacinPg( WW8Export& rWrt ) const
// 2 Werte werden gesetzt
// Dop.fFacingPages == Kopf-/Fusszeilen unterschiedlich
// Dop.fSwapBordersFacingPgs == gespiegelte Raender
- for( USHORT i = 0, nEnde = 0; i < aSects.Count(); ++i )
+ for( sal_uInt16 i = 0, nEnde = 0; i < aSects.Count(); ++i )
{
WW8_SepInfo& rSepInfo = aSects[i];
if( !rSepInfo.pSectionFmt )
@@ -1281,21 +1281,21 @@ void WW8AttributeOutput::SectionFormProtection( bool bProtected )
}
}
-void WW8AttributeOutput::SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo )
+void WW8AttributeOutput::SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo )
{
// sprmSNLnnMod - activate Line Numbering and define Modulo
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SNLnnMod );
else
m_rWW8Export.pO->Insert( 154, m_rWW8Export.pO->Count() );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (UINT16)rLnNumInfo.GetCountBy() );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)rLnNumInfo.GetCountBy() );
// sprmSDxaLnn - xPosition of Line Number
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SDxaLnn );
else
m_rWW8Export.pO->Insert( 155, m_rWW8Export.pO->Count() );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (UINT16)rLnNumInfo.GetPosFromLeft() );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)rLnNumInfo.GetPosFromLeft() );
// sprmSLnc - restart number: 0 per page, 1 per section, 2 never restart
if ( nRestartNo || !rLnNumInfo.IsRestartEachPage() )
@@ -1314,7 +1314,7 @@ void WW8AttributeOutput::SectionLineNumbering( ULONG nRestartNo, const SwLineNum
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SLnnMin );
else
m_rWW8Export.pO->Insert( 160, m_rWW8Export.pO->Count() );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (UINT16)nRestartNo - 1 );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)nRestartNo - 1 );
}
}
@@ -1332,7 +1332,7 @@ void WW8AttributeOutput::SectionPageBorders( const SwFrmFmt* pPdFmt, const SwFrm
{
if ( m_rWW8Export.bWrtWW8 ) // Seitenumrandung schreiben
{
- USHORT nPgBorder = MSWordSections::HasBorderItem( *pPdFmt ) ? 0 : USHRT_MAX;
+ sal_uInt16 nPgBorder = MSWordSections::HasBorderItem( *pPdFmt ) ? 0 : USHRT_MAX;
if ( pPdFmt != pPdFirstPgFmt )
{
if ( MSWordSections::HasBorderItem( *pPdFirstPgFmt ) )
@@ -1368,10 +1368,10 @@ void WW8AttributeOutput::SectionBiDi( bool bBiDi )
}
}
-void WW8AttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber )
+void WW8AttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber )
{
// sprmSNfcPgn
- BYTE nb = WW8Export::GetNumId( nNumType );
+ sal_uInt8 nb = WW8Export::GetNumId( nNumType );
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SNfcPgn );
else
@@ -1396,7 +1396,7 @@ void WW8AttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRest
}
}
-void WW8AttributeOutput::SectionType( BYTE nBreakCode )
+void WW8AttributeOutput::SectionType( sal_uInt8 nBreakCode )
{
if ( 2 != nBreakCode ) // new page is the default
{
@@ -1408,11 +1408,11 @@ void WW8AttributeOutput::SectionType( BYTE nBreakCode )
}
}
-void WW8AttributeOutput::SectionWW6HeaderFooterFlags( BYTE nHeadFootFlags )
+void WW8AttributeOutput::SectionWW6HeaderFooterFlags( sal_uInt8 nHeadFootFlags )
{
if ( nHeadFootFlags && !m_rWW8Export.bWrtWW8 )
{
- BYTE nTmpFlags = nHeadFootFlags;
+ sal_uInt8 nTmpFlags = nHeadFootFlags;
if ( m_rWW8Export.pDop->fFacingPages )
{
if ( !(nTmpFlags & WW8_FOOTER_EVEN) && (nTmpFlags & WW8_FOOTER_ODD ) )
@@ -1436,7 +1436,7 @@ void WW8Export::SetupSectionPositions( WW8_PdAttrDesc* pA )
if ( pO->Count() )
{ // waren Attrs vorhanden ?
pA->nLen = pO->Count();
- pA->pData = new BYTE [pO->Count()];
+ pA->pData = new sal_uInt8 [pO->Count()];
memcpy( pA->pData, pO->GetData(), pO->Count() ); // -> merken
pO->Remove( 0, pO->Count() ); // leeren fuer HdFt-Text
}
@@ -1447,10 +1447,10 @@ void WW8Export::SetupSectionPositions( WW8_PdAttrDesc* pA )
}
}
-void WW8Export::WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE nBreakCode )
+void WW8Export::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode )
{
- ULONG nCpPos = Fc2Cp( Strm().Tell() );
+ sal_uLong nCpPos = Fc2Cp( Strm().Tell() );
IncrementHdFtIndex();
if ( !(nHeadFootFlags & WW8_HEADER_EVEN) && pDop->fFacingPages )
@@ -1503,7 +1503,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
/* sprmSBkc, break code: 0 No break, 1 New column
2 New page, 3 Even page, 4 Odd page
*/
- BYTE nBreakCode = 2; // default neue Seite beginnen
+ sal_uInt8 nBreakCode = 2; // default neue Seite beginnen
bool bOutPgDscSet = true, bLeftRightPgChain = false;
const SwFrmFmt* pPdFmt = &pPd->GetMaster();
const SwFrmFmt* pPdFirstPgFmt = pPdFmt;
@@ -1662,7 +1662,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
}
// Header oder Footer
- BYTE nHeadFootFlags = 0;
+ sal_uInt8 nHeadFootFlags = 0;
const SwFrmFmt* pPdLeftFmt = bLeftRightPgChain
? &pPd->GetFollow()->GetMaster()
@@ -1722,7 +1722,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
{
pAttrs = new WW8_PdAttrDesc[ aSects.Count() ];
- ULONG nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+ sal_uLong nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
ASSERT( !pTxtPos, "wer hat den Pointer gesetzt?" );
pTxtPos = new WW8_WrPlc0( nCpStart );
@@ -1732,7 +1732,7 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
unsigned int nOldIndex = rWrt.GetHdFtIndex();
rWrt.SetHdFtIndex( 0 );
- for ( USHORT i = 0; i < aSects.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aSects.Count(); ++i )
{
WW8_PdAttrDesc* pA = pAttrs + i;
pA->pData = 0;
@@ -1747,7 +1747,7 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
if ( pTxtPos->Count() )
{
// HdFt vorhanden ?
- ULONG nCpEnd = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+ sal_uLong nCpEnd = rWrt.Fc2Cp( rWrt.Strm().Tell() );
pTxtPos->Append( nCpEnd ); // Ende letzter Hd/Ft fuer PlcfHdd
if ( nCpEnd > nCpStart )
@@ -1768,7 +1768,7 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
void WW8_WrPlcSepx::WriteSepx( SvStream& rStrm ) const
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aSects.Count(); i++ ) // ueber alle Sections
{
WW8_PdAttrDesc* pA = pAttrs + i;
@@ -1786,13 +1786,13 @@ void WW8_WrPlcSepx::WriteSepx( SvStream& rStrm ) const
void WW8_WrPlcSepx::WritePlcSed( WW8Export& rWrt ) const
{
ASSERT( aCps.Count() == aSects.Count() + 1, "WrPlcSepx: DeSync" );
- ULONG nFcStart = rWrt.pTableStrm->Tell();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
- USHORT i;
+ sal_uInt16 i;
// ( ueber alle Sections )
for( i = 0; i <= aSects.Count(); i++ )
{
- UINT32 nP = aCps[i];
+ sal_uInt32 nP = aCps[i];
SVBT32 nPos;
UInt32ToSVBT32( nP, nPos );
rWrt.pTableStrm->Write( nPos, 4 );
@@ -1847,8 +1847,8 @@ void MSWordExportBase::WriteHeaderFooterText( const SwFmt& rFmt, bool bHeader )
{
SwNodeIndex aIdx( *pSttIdx, 1 ),
aEnd( *pSttIdx->GetNode().EndOfSectionNode() );
- ULONG nStart = aIdx.GetIndex();
- ULONG nEnd = aEnd.GetIndex();
+ sal_uLong nStart = aIdx.GetIndex();
+ sal_uLong nEnd = aEnd.GetIndex();
// Bereich also gueltiger Node
if ( nStart < nEnd )
@@ -1931,20 +1931,20 @@ bool WW8_WrPlcAnnotations::IsNewRedlineComment( const SwRedlineData *pRedline )
WW8_WrPlcAnnotations::~WW8_WrPlcAnnotations()
{
- for( USHORT n=0; n < aCntnt.Count(); n++ )
+ for( sal_uInt16 n=0; n < aCntnt.Count(); n++ )
delete (WW8_Annotation*)aCntnt[n];
}
-bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
+bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp,
WW8_CP& rCount )
{
- USHORT nLen = aCntnt.Count();
+ sal_uInt16 nLen = aCntnt.Count();
if ( !nLen )
return false;
- ULONG nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+ sal_uLong nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
pTxtPos = new WW8_WrPlc0( nCpStart );
- USHORT i;
+ sal_uInt16 i;
switch ( nTTyp )
{
@@ -1980,7 +1980,7 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
const SdrObject& rObj = *(SdrObject*)aCntnt[ i ];
if (rObj.GetObjInventor() == FmFormInventor)
{
- BYTE nOldTyp = rWrt.nTxtTyp;
+ sal_uInt8 nOldTyp = rWrt.nTxtTyp;
rWrt.nTxtTyp = nTTyp;
rWrt.GetOCXExp().ExportControl(rWrt,&rObj);
rWrt.nTxtTyp = nOldTyp;
@@ -2063,13 +2063,13 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
return ( rCount != 0 );
}
-void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
+void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp,
WW8_FC& rTxtStart, sal_Int32& rTxtCount, WW8_FC& rRefStart, sal_Int32& rRefCount ) const
{
typedef ::std::vector<String>::iterator myiter;
- ULONG nFcStart = rWrt.pTableStrm->Tell();
- USHORT nLen = aCps.Count();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
+ sal_uInt16 nLen = aCps.Count();
if ( !nLen )
return;
@@ -2077,7 +2077,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
::std::vector<String> aStrArr;
WW8Fib& rFib = *rWrt.pFib; // n+1-te CP-Pos nach Handbuch
- USHORT i;
+ sal_uInt16 i;
bool bWriteCP = true;
switch ( nTTyp )
@@ -2111,7 +2111,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
for ( i = 0; i < aStrArr.size(); ++i )
{
const String& rStr = aStrArr[i];
- *rWrt.pTableStrm << (BYTE)rStr.Len();
+ *rWrt.pTableStrm << (sal_uInt8)rStr.Len();
SwWW8Writer::WriteString8(*rWrt.pTableStrm, rStr, false,
RTL_TEXTENCODING_MS_1252);
}
@@ -2158,7 +2158,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
// write textbox story - FTXBXS
// is it an writer or sdr - textbox?
const SdrObject* pObj = (SdrObject*)aCntnt[ i ];
- INT32 nCnt = 1;
+ sal_Int32 nCnt = 1;
if ( !pObj->ISA( SdrTextObj ) )
{
// find the "highest" SdrObject of this
@@ -2217,7 +2217,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
"Impossible");
sal_uInt16 nFndPos = static_cast< sal_uInt16 >(aIter - aStrArr.begin());
String sAuthor(*aIter);
- BYTE nNameLen = (BYTE)sAuthor.Len();
+ sal_uInt8 nNameLen = (sal_uInt8)sAuthor.Len();
if ( nNameLen > 9 )
{
sAuthor.Erase( 9 );
@@ -2256,7 +2256,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
}
else
{
- USHORT nNo = 0;
+ sal_uInt16 nNo = 0;
for ( i = 0; i < nLen; ++i ) // Schreibe Flags
{
const SwFmtFtn* pFtn = (SwFmtFtn*)aCntnt[ i ];
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 5c82f67a32f1..c40ce759b3f2 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -130,42 +130,42 @@ using namespace sw::types;
*/
class WW8_WrFkp
{
- BYTE* pFkp; // gesamter Fkp ( zuerst nur FCs und Sprms )
- BYTE* pOfs; // Pointer auf Offset-Bereich, spaeter nach pFkp kopiert
+ sal_uInt8* pFkp; // gesamter Fkp ( zuerst nur FCs und Sprms )
+ sal_uInt8* pOfs; // Pointer auf Offset-Bereich, spaeter nach pFkp kopiert
ePLCFT ePlc;
short nStartGrp; // ab hier grpprls
short nOldStartGrp;
- BYTE nItemSize;
- BYTE nIMax; // Anzahl der Eintrags-Paare
- BYTE nOldVarLen;
- BYTE nMark;
+ sal_uInt8 nItemSize;
+ sal_uInt8 nIMax; // Anzahl der Eintrags-Paare
+ sal_uInt8 nOldVarLen;
+ sal_uInt8 nMark;
bool bCombined; // true : Einfuegen verboten
- BYTE SearchSameSprm( USHORT nVarLen, const BYTE* pSprms );
+ sal_uInt8 SearchSameSprm( sal_uInt16 nVarLen, const sal_uInt8* pSprms );
public:
WW8_WrFkp(ePLCFT ePl, WW8_FC nStartFc, bool bWrtWW8);
~WW8_WrFkp();
- bool Append( WW8_FC nEndFc, USHORT nVarLen = 0, const BYTE* pSprms = 0 );
+ bool Append( WW8_FC nEndFc, sal_uInt16 nVarLen = 0, const sal_uInt8* pSprms = 0 );
bool Combine();
void Write( SvStream& rStrm, SwWW8WrGrf& rGrf );
bool IsEqualPos(WW8_FC nEndFc) const
- { return !bCombined && nIMax && nEndFc == ((INT32*)pFkp)[nIMax]; }
- void MergeToNew( short& rVarLen, BYTE *& pNewSprms );
+ { return !bCombined && nIMax && nEndFc == ((sal_Int32*)pFkp)[nIMax]; }
+ void MergeToNew( short& rVarLen, sal_uInt8 *& pNewSprms );
bool IsEmptySprm() const
{ return !bCombined && nIMax && !nOldVarLen; }
void SetNewEnd( WW8_FC nEnd )
- { ((INT32*)pFkp)[nIMax] = nEnd; }
+ { ((sal_Int32*)pFkp)[nIMax] = nEnd; }
#ifdef __WW8_NEEDS_COPY
WW8_FC GetStartFc() const;
WW8_FC GetEndFc() const;
#else
- WW8_FC GetStartFc() const { return ((INT32*)pFkp)[0]; };
- WW8_FC GetEndFc() const { return ((INT32*)pFkp)[nIMax]; };
+ WW8_FC GetStartFc() const { return ((sal_Int32*)pFkp)[0]; };
+ WW8_FC GetEndFc() const { return ((sal_Int32*)pFkp)[nIMax]; };
#endif // defined __WW8_NEEDS_COPY
- BYTE *CopyLastSprms(BYTE &rLen, bool bVer8);
+ sal_uInt8 *CopyLastSprms(sal_uInt8 &rLen, bool bVer8);
};
@@ -177,7 +177,7 @@ class WW8_WrPc
{
WW8_CP nStartCp; // Start ZeichenPosition vom Text
WW8_FC nStartFc; // Start File Position vom Text
- USHORT nStatus; // Absatzende im Piece ?
+ sal_uInt16 nStatus; // Absatzende im Piece ?
public:
WW8_WrPc(WW8_FC nSFc, WW8_CP nSCp )
@@ -185,7 +185,7 @@ public:
{}
void SetStatus() { nStatus = 0x0050; }
- USHORT GetStatus() const { return nStatus; }
+ sal_uInt16 GetStatus() const { return nStatus; }
WW8_CP GetStartCp() const { return nStartCp; }
WW8_FC GetStartFc() const { return nStartFc; }
};
@@ -198,7 +198,7 @@ private:
std::vector<String> maSwBkmkNms; // Array of Sw - Bookmarknames
typedef std::vector<String>::iterator myIter;
- USHORT GetPos( const String& rNm );
+ sal_uInt16 GetPos( const String& rNm );
//No copying
WW8_WrtBookmarks(const WW8_WrtBookmarks&);
@@ -209,7 +209,7 @@ public:
void Append( WW8_CP nStartCp, const String& rNm, const ::sw::mark::IMark* pBkmk=NULL );
void Write( WW8Export& rWrt );
- void MoveFieldMarks(ULONG nFrom,ULONG nTo);
+ void MoveFieldMarks(sal_uLong nFrom,sal_uLong nTo);
// String GetWWBkmkName( const String& rName ) const;
};
@@ -221,7 +221,7 @@ public:
#define sCompObj CREATE_CONST_ASC("\1CompObj")
-SV_IMPL_VARARR( WW8Bytes, BYTE )
+SV_IMPL_VARARR( WW8Bytes, sal_uInt8 )
SV_IMPL_PTRARR( WW8_WrFkpPtrs, WW8_FkpPtr )
typedef WW8_WrPc* WW8_WrPcPtr;
@@ -242,7 +242,7 @@ static void WriteDop( WW8Export& rWrt )
// default TabStop schreiben
const SvxTabStopItem& rTabStop =
DefaultItemGet<SvxTabStopItem>(*rWrt.pDoc, RES_PARATR_TABSTOP);
- rDop.dxaTab = (USHORT)rTabStop[0].GetTabPos();
+ rDop.dxaTab = (sal_uInt16)rTabStop[0].GetTabPos();
// Werte aus der DocStatistik (werden aufjedenfall fuer die
@@ -252,7 +252,7 @@ static void WriteDop( WW8Export& rWrt )
const SwDocStat& rDStat = rWrt.pDoc->GetDocStat();
rDop.cWords = rDStat.nWord;
rDop.cCh = rDStat.nChar;
- rDop.cPg = static_cast< INT16 >(rDStat.nPage);
+ rDop.cPg = static_cast< sal_Int16 >(rDStat.nPage);
rDop.cParas = rDStat.nPara;
rDop.cLines = rDStat.nPara;
@@ -308,7 +308,7 @@ static void WriteDop( WW8Export& rWrt )
// und noch fuer die Header und Footers
rDop.cWordsFtnEnd = rDStat.nWord;
rDop.cChFtnEdn = rDStat.nChar;
- rDop.cPgFtnEdn = (INT16)rDStat.nPage;
+ rDop.cPgFtnEdn = (sal_Int16)rDStat.nPage;
rDop.cParasFtnEdn = rDStat.nPara;
rDop.cLinesFtnEdn = rDStat.nPara;
@@ -442,7 +442,7 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
const i18n::ForbiddenCharacters *pForbidden = 0;
const i18n::ForbiddenCharacters *pUseMe = 0;
- BYTE nUseReserved=0;
+ sal_uInt8 nUseReserved=0;
int nNoNeeded=0;
/*
Now we have some minor difficult issues, to wit...
@@ -545,7 +545,7 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
// Es kann nur etwas gefunden werden, wenn diese Methode innerhalb
// der aufgerufenen Methoden WW8_SwAttrIter::OutAttr() und
// WW8Export::OutputItemSet() benutzt wird.
-const SfxPoolItem* MSWordExportBase::HasItem( USHORT nWhich ) const
+const SfxPoolItem* MSWordExportBase::HasItem( sal_uInt16 nWhich ) const
{
const SfxPoolItem* pItem=0;
if (pISet)
@@ -567,7 +567,7 @@ const SfxPoolItem* MSWordExportBase::HasItem( USHORT nWhich ) const
return pItem;
}
-const SfxPoolItem& MSWordExportBase::GetItem(USHORT nWhich) const
+const SfxPoolItem& MSWordExportBase::GetItem(sal_uInt16 nWhich) const
{
const SfxPoolItem* pItem;
if (pISet)
@@ -591,11 +591,11 @@ const SfxPoolItem& MSWordExportBase::GetItem(USHORT nWhich) const
//------------------------------------------------------------------------------
-WW8_WrPlc1::WW8_WrPlc1( USHORT nStructSz )
+WW8_WrPlc1::WW8_WrPlc1( sal_uInt16 nStructSz )
: aPos( 16, 16 ), nStructSiz( nStructSz )
{
nDataLen = 16 * nStructSz;
- pData = new BYTE[ nDataLen ];
+ pData = new sal_uInt8[ nDataLen ];
}
WW8_WrPlc1::~WW8_WrPlc1()
@@ -605,18 +605,18 @@ WW8_WrPlc1::~WW8_WrPlc1()
WW8_CP WW8_WrPlc1::Prev() const
{
- USHORT nLen = aPos.Count();
+ sal_uInt16 nLen = aPos.Count();
ASSERT(nLen,"Prev called on empty list");
return nLen ? aPos[nLen-1] : 0;
}
void WW8_WrPlc1::Append( WW8_CP nCp, const void* pNewData )
{
- ULONG nInsPos = aPos.Count() * nStructSiz;
+ sal_uLong nInsPos = aPos.Count() * nStructSiz;
aPos.Insert( nCp, aPos.Count() );
if( nDataLen < nInsPos + nStructSiz )
{
- BYTE* pNew = new BYTE[ 2 * nDataLen ];
+ sal_uInt8* pNew = new sal_uInt8[ 2 * nDataLen ];
memmove( pNew, pData, nDataLen );
delete[] pData;
pData = pNew;
@@ -625,13 +625,13 @@ void WW8_WrPlc1::Append( WW8_CP nCp, const void* pNewData )
memcpy( pData + nInsPos, pNewData, nStructSiz );
}
-void WW8_WrPlc1::Finish( ULONG nLastCp, ULONG nSttCp )
+void WW8_WrPlc1::Finish( sal_uLong nLastCp, sal_uLong nSttCp )
{
if( aPos.Count() )
{
aPos.Insert( nLastCp, aPos.Count() );
if( nSttCp )
- for( USHORT n = 0; n < aPos.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aPos.Count(); ++n )
aPos[ n ] -= nSttCp;
}
}
@@ -639,7 +639,7 @@ void WW8_WrPlc1::Finish( ULONG nLastCp, ULONG nSttCp )
void WW8_WrPlc1::Write( SvStream& rStrm )
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aPos.Count(); ++i )
SwWW8Writer::WriteLong( rStrm, aPos[i] );
if( i )
@@ -701,7 +701,7 @@ bool WW8_WrPlcFld::Write( WW8Export& rWrt )
if( pfc && plc )
{
- ULONG nFcStart = rWrt.pTableStrm->Tell();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
WW8_WrPlc1::Write( *rWrt.pTableStrm );
*pfc = nFcStart;
*plc = rWrt.pTableStrm->Tell() - nFcStart;
@@ -713,14 +713,14 @@ bool WW8_WrMagicTable::Write( WW8Export& rWrt )
{
if( WW8_WrPlc1::Count() <= 1 )
return false;
- ULONG nFcStart = rWrt.pTableStrm->Tell();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
WW8_WrPlc1::Write( *rWrt.pTableStrm );
rWrt.pFib->fcPlcfTch = nFcStart;
rWrt.pFib->lcbPlcfTch = rWrt.pTableStrm->Tell() - nFcStart;
return true;
}
-void WW8_WrMagicTable::Append( WW8_CP nCp, ULONG nData)
+void WW8_WrMagicTable::Append( WW8_CP nCp, sal_uLong nData)
{
SVBT32 nLittle;
/*
@@ -737,9 +737,9 @@ void WW8_WrMagicTable::Append( WW8_CP nCp, ULONG nData)
//--------------------------------------------------------------------------
-void SwWW8Writer::FillCount( SvStream& rStrm, ULONG nCount )
+void SwWW8Writer::FillCount( SvStream& rStrm, sal_uLong nCount )
{
- static const UINT32 aNulls[16] =
+ static const sal_uInt32 aNulls[16] =
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 // 64 Byte
};
@@ -752,9 +752,9 @@ void SwWW8Writer::FillCount( SvStream& rStrm, ULONG nCount )
rStrm.Write( aNulls, nCount ); // Rest ( 0 .. 64 Bytes ) schreiben
}
-ULONG SwWW8Writer::FillUntil( SvStream& rStrm, ULONG nEndPos )
+sal_uLong SwWW8Writer::FillUntil( SvStream& rStrm, sal_uLong nEndPos )
{
- ULONG nCurPos = rStrm.Tell();
+ sal_uLong nCurPos = rStrm.Tell();
if( !nEndPos ) // nEndPos == 0 -> next Page
nEndPos = (nCurPos + 0x1ff) & ~0x1ffUL;
@@ -783,22 +783,22 @@ WW8_WrPlcPn::~WW8_WrPlcPn()
aFkps.DeleteAndDestroy( 0, aFkps.Count() );
}
-BYTE *WW8_WrPlcPn::CopyLastSprms(BYTE &rLen)
+sal_uInt8 *WW8_WrPlcPn::CopyLastSprms(sal_uInt8 &rLen)
{
WW8_FkpPtr pF = aFkps.GetObject(aFkps.Count() - 1);
return pF->CopyLastSprms(rLen, rWrt.bWrtWW8);
}
-void WW8_WrPlcPn::AppendFkpEntry(WW8_FC nEndFc,short nVarLen,const BYTE* pSprms)
+void WW8_WrPlcPn::AppendFkpEntry(WW8_FC nEndFc,short nVarLen,const sal_uInt8* pSprms)
{
WW8_FkpPtr pF = aFkps.GetObject( aFkps.Count() - 1 );
// big sprm? build the sprmPHugePapx
- BYTE* pNewSprms = (BYTE*)pSprms;
- BYTE aHugePapx[ 8 ];
+ sal_uInt8* pNewSprms = (sal_uInt8*)pSprms;
+ sal_uInt8 aHugePapx[ 8 ];
if( rWrt.bWrtWW8 && PAP == ePlc && 488 < nVarLen )
{
- BYTE* p = aHugePapx;
+ sal_uInt8* p = aHugePapx;
*p++ = *pSprms++; // set style Id
*p++ = *pSprms++;
nVarLen -= 2;
@@ -842,9 +842,9 @@ void WW8_WrPlcPn::AppendFkpEntry(WW8_FC nEndFc,short nVarLen,const BYTE* pSprms)
void WW8_WrPlcPn::WriteFkps()
{
- nFkpStartPage = (USHORT) ( SwWW8Writer::FillUntil( rWrt.Strm() ) >> 9 );
+ nFkpStartPage = (sal_uInt16) ( SwWW8Writer::FillUntil( rWrt.Strm() ) >> 9 );
- for( USHORT i = 0; i < aFkps.Count(); i++ )
+ for( sal_uInt16 i = 0; i < aFkps.Count(); i++ )
aFkps.GetObject( i )->Write( rWrt.Strm(), *rWrt.pGrf );
if( CHP == ePlc )
@@ -861,8 +861,8 @@ void WW8_WrPlcPn::WriteFkps()
void WW8_WrPlcPn::WritePlc()
{
- ULONG nFcStart = rWrt.pTableStrm->Tell();
- USHORT i;
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
+ sal_uInt16 i;
for( i = 0; i < aFkps.Count(); i++ )
SwWW8Writer::WriteLong( *rWrt.pTableStrm,
@@ -899,25 +899,25 @@ WW8_WrFkp::WW8_WrFkp(ePLCFT ePl, WW8_FC nStartFc, bool bWrtWW8)
nItemSize( ( CHP == ePl ) ? 1 : ( bWrtWW8 ? 13 : 7 )),
nIMax(0), nOldVarLen(0), nMark(0), bCombined(false)
{
- pFkp = (BYTE*)new INT32[128]; // 512 Byte
- pOfs = (BYTE*)new INT32[128]; // 512 Byte
+ pFkp = (sal_uInt8*)new sal_Int32[128]; // 512 Byte
+ pOfs = (sal_uInt8*)new sal_Int32[128]; // 512 Byte
memset( pFkp, 0, 4 * 128 );
memset( pOfs, 0, 4 * 128 );
- ( (INT32*)pFkp )[0] = nStartFc; // 0. FC-Eintrag auf nStartFc
+ ( (sal_Int32*)pFkp )[0] = nStartFc; // 0. FC-Eintrag auf nStartFc
}
WW8_WrFkp::~WW8_WrFkp()
{
- delete[] (INT32 *)pFkp;
- delete[] (INT32 *)pOfs;
+ delete[] (sal_Int32 *)pFkp;
+ delete[] (sal_Int32 *)pOfs;
}
-BYTE WW8_WrFkp::SearchSameSprm( USHORT nVarLen, const BYTE* pSprms )
+sal_uInt8 WW8_WrFkp::SearchSameSprm( sal_uInt16 nVarLen, const sal_uInt8* pSprms )
{
if( 3 < nVarLen )
{
// if the sprms contained picture-references then never equal!
- for( BYTE n = static_cast< BYTE >(nVarLen - 1); 3 < n; --n )
+ for( sal_uInt8 n = static_cast< sal_uInt8 >(nVarLen - 1); 3 < n; --n )
if( pSprms[ n ] == GRF_MAGIC_3 &&
pSprms[ n-1 ] == GRF_MAGIC_2 &&
pSprms[ n-2 ] == GRF_MAGIC_1 )
@@ -927,13 +927,13 @@ BYTE WW8_WrFkp::SearchSameSprm( USHORT nVarLen, const BYTE* pSprms )
short i;
for( i = 0; i < nIMax; i++ )
{
- BYTE nStart = pOfs[i * nItemSize];
+ sal_uInt8 nStart = pOfs[i * nItemSize];
if( nStart )
{ // Hat Sprms
- const BYTE* p = pFkp + ( (USHORT)nStart << 1 );
+ const sal_uInt8* p = pFkp + ( (sal_uInt16)nStart << 1 );
if( ( CHP == ePlc
? (*p++ == nVarLen)
- : (((USHORT)*p++ << 1 ) == (( nVarLen+1) & 0xfffe)) )
+ : (((sal_uInt16)*p++ << 1 ) == (( nVarLen+1) & 0xfffe)) )
&& !memcmp( p, pSprms, nVarLen ) )
return nStart; // gefunden
}
@@ -941,19 +941,19 @@ BYTE WW8_WrFkp::SearchSameSprm( USHORT nVarLen, const BYTE* pSprms )
return 0; // nicht gefunden
}
-BYTE *WW8_WrFkp::CopyLastSprms(BYTE &rLen, bool bVer8)
+sal_uInt8 *WW8_WrFkp::CopyLastSprms(sal_uInt8 &rLen, bool bVer8)
{
rLen=0;
- BYTE *pStart=0,*pRet=0;
+ sal_uInt8 *pStart=0,*pRet=0;
if (!bCombined)
pStart = pOfs;
else
pStart = pFkp + ( nIMax + 1 ) * 4;
- BYTE nStart = *(pStart + (nIMax-1) * nItemSize);
+ sal_uInt8 nStart = *(pStart + (nIMax-1) * nItemSize);
- const BYTE* p = pFkp + ( (USHORT)nStart << 1 );
+ const sal_uInt8* p = pFkp + ( (sal_uInt16)nStart << 1 );
if (!*p && bVer8)
p++;
@@ -963,13 +963,13 @@ BYTE *WW8_WrFkp::CopyLastSprms(BYTE &rLen, bool bVer8)
rLen = *p++;
if (PAP == ePlc)
rLen *= 2;
- pRet = new BYTE[rLen];
+ pRet = new sal_uInt8[rLen];
memcpy(pRet,p,rLen);
}
return pRet;
}
-bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
+bool WW8_WrFkp::Append( WW8_FC nEndFc, sal_uInt16 nVarLen, const sal_uInt8* pSprms )
{
ASSERT( !nVarLen || pSprms, "Item-Pointer fehlt" );
ASSERT( nVarLen < ( ( ePlc == PAP ) ? 497U : 502U ), "Sprms zu lang !" );
@@ -979,7 +979,7 @@ bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
ASSERT( !this, "Fkp::Append: Fkp is already combined" );
return false;
}
- INT32 n = ((INT32*)pFkp)[nIMax]; // letzter Eintrag
+ sal_Int32 n = ((sal_Int32*)pFkp)[nIMax]; // letzter Eintrag
if( nEndFc <= n )
{
ASSERT( nEndFc >= n, "+Fkp: FC rueckwaerts" );
@@ -990,7 +990,7 @@ bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
return true; // ignorieren, keinen neuen Fkp anlegen
}
- BYTE nOldP = ( nVarLen ) ? SearchSameSprm( nVarLen, pSprms ) : 0;
+ sal_uInt8 nOldP = ( nVarLen ) ? SearchSameSprm( nVarLen, pSprms ) : 0;
// Kombinieren gleicher Eintraege
short nOffset=0, nPos = nStartGrp;
if (nVarLen && !nOldP)
@@ -1006,22 +1006,22 @@ bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
nPos &= 0xFFFE; // Pos fuer Sprms ( gerade Pos )
}
- if( (USHORT)nPos <= ( nIMax + 2U ) * 4U + ( nIMax + 1U ) * nItemSize )
+ if( (sal_uInt16)nPos <= ( nIMax + 2U ) * 4U + ( nIMax + 1U ) * nItemSize )
// Passt hinter CPs und Offsets ?
return false; // Nein
- ((INT32*)pFkp)[nIMax + 1] = nEndFc; // FC eintragen
+ ((sal_Int32*)pFkp)[nIMax + 1] = nEndFc; // FC eintragen
- nOldVarLen = (BYTE)nVarLen;
+ nOldVarLen = (sal_uInt8)nVarLen;
if( nVarLen && !nOldP )
{ // echt eintragen
nOldStartGrp = nStartGrp;
nStartGrp = nPos;
- pOfs[nIMax * nItemSize] = (BYTE)( nStartGrp >> 1 );
+ pOfs[nIMax * nItemSize] = (sal_uInt8)( nStartGrp >> 1 );
// ( DatenAnfg >> 1 ) eintragen
- BYTE nCnt = static_cast< BYTE >(CHP == ePlc
- ? ( nVarLen < 256 ) ? (BYTE) nVarLen : 255
+ sal_uInt8 nCnt = static_cast< sal_uInt8 >(CHP == ePlc
+ ? ( nVarLen < 256 ) ? (sal_uInt8) nVarLen : 255
: ( ( nVarLen + 1 ) >> 1 ));
pFkp[ nOffset ] = nCnt; // DatenLaenge eintragen
@@ -1045,14 +1045,14 @@ bool WW8_WrFkp::Combine()
memcpy( pFkp + ( nIMax + 1 ) * 4, pOfs, nIMax * nItemSize );
delete[] pOfs;
pOfs = 0;
- ((BYTE*)pFkp)[511] = nIMax;
+ ((sal_uInt8*)pFkp)[511] = nIMax;
bCombined = true;
#if defined OSL_BIGENDIAN // Hier werden nur die FCs gedreht, die
- USHORT i; // Sprms muessen an anderer Stelle gedreht
+ sal_uInt16 i; // Sprms muessen an anderer Stelle gedreht
// werden
- UINT32* p;
- for( i = 0, p = (UINT32*)pFkp; i <= nIMax; i++, p++ )
+ sal_uInt32* p;
+ for( i = 0, p = (sal_uInt32*)pFkp; i <= nIMax; i++, p++ )
*p = SWAPLONG( *p );
#endif // ifdef OSL_BIGENDIAN
@@ -1063,8 +1063,8 @@ void WW8_WrFkp::Write( SvStream& rStrm, SwWW8WrGrf& rGrf )
{
Combine(); // Falls noch nicht Combined
- BYTE* p; // Suche Magic fuer nPicLocFc
- BYTE* pEnd = pFkp + nStartGrp;
+ sal_uInt8* p; // Suche Magic fuer nPicLocFc
+ sal_uInt8* pEnd = pFkp + nStartGrp;
for( p = pFkp + 511 - 4; p >= pEnd; p-- )
{
if( *p != GRF_MAGIC_1 ) // Suche nach Signatur 0x12 0x34 0x56 0xXX
@@ -1081,23 +1081,23 @@ void WW8_WrFkp::Write( SvStream& rStrm, SwWW8WrGrf& rGrf )
rStrm.Write( pFkp, 512 );
}
-void WW8_WrFkp::MergeToNew( short& rVarLen, BYTE *& rpNewSprms )
+void WW8_WrFkp::MergeToNew( short& rVarLen, sal_uInt8 *& rpNewSprms )
{
- BYTE nStart = pOfs[ (nIMax-1) * nItemSize ];
+ sal_uInt8 nStart = pOfs[ (nIMax-1) * nItemSize ];
if( nStart )
{ // Hat Sprms
- BYTE* p = pFkp + ( (USHORT)nStart << 1 );
+ sal_uInt8* p = pFkp + ( (sal_uInt16)nStart << 1 );
// old and new equal? Then copy only one into the new sprms
if( nOldVarLen == rVarLen && !memcmp( p+1, rpNewSprms, nOldVarLen ))
{
- BYTE* pNew = new BYTE[ nOldVarLen ];
+ sal_uInt8* pNew = new sal_uInt8[ nOldVarLen ];
memcpy( pNew, p+1, nOldVarLen );
rpNewSprms = pNew;
}
else
{
- BYTE* pNew = new BYTE[ nOldVarLen + rVarLen ];
+ sal_uInt8* pNew = new sal_uInt8[ nOldVarLen + rVarLen ];
memcpy( pNew, p+1, nOldVarLen );
memcpy( pNew + nOldVarLen, rpNewSprms, rVarLen );
@@ -1107,7 +1107,7 @@ void WW8_WrFkp::MergeToNew( short& rVarLen, BYTE *& rpNewSprms )
--nIMax;
// if this sprms dont used from others, remove it
bool bFnd = false;
- for (USHORT n = 0; n < nIMax; ++n)
+ for (sal_uInt16 n = 0; n < nIMax; ++n)
{
if (nStart == pOfs[n * nItemSize])
{
@@ -1132,14 +1132,14 @@ WW8_FC WW8_WrFkp::GetStartFc() const
// zurueckgedreht werden.
if( bCombined )
return SVBT32ToUInt32( pFkp ); // 0. Element
- return ((INT32*)pFkp)[0];
+ return ((sal_Int32*)pFkp)[0];
}
WW8_FC WW8_WrFkp::GetEndFc() const
{
if( bCombined )
return SVBT32ToUInt32( &(pFkp[nIMax*4]) ); // nIMax-tes SVBT32-Element
- return ((INT32*)pFkp)[nIMax];
+ return ((sal_Int32*)pFkp)[nIMax];
}
#endif // defined __WW8_NEEDS_COPY
@@ -1198,9 +1198,9 @@ void WW8_WrPct::AppendPc(WW8_FC nStartFc, bool bIsUnicode)
void WW8_WrPct::WritePc( WW8Export& rWrt )
{
- ULONG nPctStart;
- ULONG nOldPos, nEndPos;
- USHORT i;
+ sal_uLong nPctStart;
+ sal_uLong nOldPos, nEndPos;
+ sal_uInt16 i;
nPctStart = rWrt.pTableStrm->Tell(); // Beginn Piece-Table
*rWrt.pTableStrm << ( char )0x02; // Statusbyte PCT
@@ -1212,7 +1212,7 @@ void WW8_WrPct::WritePc( WW8Export& rWrt )
// die letzte Pos noch errechnen
- ULONG nStartCp = rWrt.pFib->fcMac - nOldFc;
+ sal_uLong nStartCp = rWrt.pFib->fcMac - nOldFc;
if( bIsUni )
nStartCp >>= 1; // Bei Unicode Anzahl der Zeichen / 2
nStartCp += pPcts->GetObject( i-1 )->GetStartCp();
@@ -1245,9 +1245,9 @@ void WW8_WrPct::SetParaBreak()
pPcts->GetObject( pPcts->Count() - 1)->SetStatus();
}
-WW8_CP WW8_WrPct::Fc2Cp( ULONG nFc ) const
+WW8_CP WW8_WrPct::Fc2Cp( sal_uLong nFc ) const
{
- ASSERT( nFc >= (ULONG)nOldFc, "FilePos liegt vorm letzten Piece" );
+ ASSERT( nFc >= (sal_uLong)nOldFc, "FilePos liegt vorm letzten Piece" );
ASSERT( pPcts->Count(), "Fc2Cp noch kein Piece vorhanden" );
nFc -= nOldFc;
@@ -1270,7 +1270,7 @@ WW8_WrtBookmarks::~WW8_WrtBookmarks()
void WW8_WrtBookmarks::Append( WW8_CP nStartCp, const String& rNm, const ::sw::mark::IMark* )
{
- USHORT nPos = GetPos( rNm );
+ sal_uInt16 nPos = GetPos( rNm );
if( USHRT_MAX == nPos )
{
// new -> insert as start position
@@ -1278,7 +1278,7 @@ void WW8_WrtBookmarks::Append( WW8_CP nStartCp, const String& rNm, const ::sw::
myIter aIter = maSwBkmkNms.end();
// sort by startposition
// theory: write continuous -> then the new position is at end
- while( nPos && aSttCps[ nPos - 1 ] > ULONG( nStartCp ))
+ while( nPos && aSttCps[ nPos - 1 ] > sal_uLong( nStartCp ))
{
--nPos;
--aIter;
@@ -1286,7 +1286,7 @@ void WW8_WrtBookmarks::Append( WW8_CP nStartCp, const String& rNm, const ::sw::
aSttCps.Insert(nStartCp, nPos);
aEndCps.Insert(nStartCp, nPos);
- aFieldMarks.insert(aFieldMarks.begin() + nPos, BOOL(false));
+ aFieldMarks.insert(aFieldMarks.begin() + nPos, sal_Bool(false));
maSwBkmkNms.insert(aIter, rNm);
}
else
@@ -1307,15 +1307,15 @@ void WW8_WrtBookmarks::Append( WW8_CP nStartCp, const String& rNm, const ::sw::
void WW8_WrtBookmarks::Write( WW8Export& rWrt )
{
- USHORT nCount = aSttCps.Count(), i;
+ sal_uInt16 nCount = aSttCps.Count(), i;
if( nCount )
{
SvULongs aEndSortTab( 255 < nCount ? 255 : nCount, 4 );
// sort then endpositions
for( i = 0; i < nCount; ++i )
{
- ULONG nCP = aEndCps[ i ];
- USHORT nPos = i;
+ sal_uLong nCP = aEndCps[ i ];
+ sal_uInt16 nPos = i;
while( nPos && aEndSortTab[ nPos - 1 ] > nCP )
--nPos;
aEndSortTab.Insert( nCP, nPos );
@@ -1334,8 +1334,8 @@ void WW8_WrtBookmarks::Write( WW8Export& rWrt )
SwWW8Writer::WriteLong(rStrm, rWrt.pFib->ccpText + rWrt.pFib->ccpTxbx);
for( i = 0; i < nCount; ++i )
{
- ULONG nEndCP = aEndCps[ i ];
- USHORT nPos = i;
+ sal_uLong nEndCP = aEndCps[ i ];
+ sal_uInt16 nPos = i;
if( aEndSortTab[ nPos ] > nEndCP )
{
while( aEndSortTab[ --nPos ] != nEndCP )
@@ -1358,9 +1358,9 @@ void WW8_WrtBookmarks::Write( WW8Export& rWrt )
}
}
-USHORT WW8_WrtBookmarks::GetPos( const String& rNm )
+sal_uInt16 WW8_WrtBookmarks::GetPos( const String& rNm )
{
- USHORT nRet = USHRT_MAX, n;
+ sal_uInt16 nRet = USHRT_MAX, n;
for (n = 0; n < aSttCps.Count(); ++n)
if (rNm == maSwBkmkNms[n])
{
@@ -1370,9 +1370,9 @@ USHORT WW8_WrtBookmarks::GetPos( const String& rNm )
return nRet;
}
-void WW8_WrtBookmarks::MoveFieldMarks(ULONG nFrom, ULONG nTo)
+void WW8_WrtBookmarks::MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo)
{
- for (USHORT nI=0;nI<aSttCps.Count();++nI)
+ for (sal_uInt16 nI=0;nI<aSttCps.Count();++nI)
{
if (aSttCps[nI] == nFrom)
{
@@ -1390,12 +1390,12 @@ void WW8Export::AppendBookmarks( const SwTxtNode& rNd,
xub_StrLen nAktPos, xub_StrLen nLen )
{
SvPtrarr aArr( 8, 8 );
- USHORT nCntnt;
+ sal_uInt16 nCntnt;
xub_StrLen nAktEnd = nAktPos + nLen;
if( GetWriter().GetBookmarks( rNd, nAktPos, nAktEnd, aArr ))
{
- ULONG nNd = rNd.GetIndex(), nSttCP = Fc2Cp( Strm().Tell() );
- for( USHORT n = 0; n < aArr.Count(); ++n )
+ sal_uLong nNd = rNd.GetIndex(), nSttCP = Fc2Cp( Strm().Tell() );
+ for( sal_uInt16 n = 0; n < aArr.Count(); ++n )
{
::sw::mark::IMark& rBkmk = *(::sw::mark::IMark*)aArr[ n ];
if(dynamic_cast< ::sw::mark::IFieldmark *>(&rBkmk))
@@ -1416,28 +1416,28 @@ void WW8Export::AppendBookmarks( const SwTxtNode& rNd,
( nCntnt = pPos->nContent.GetIndex() ) >= nAktPos &&
nCntnt < nAktEnd ) )
{
- ULONG nCp = nSttCP + pPos->nContent.GetIndex() - nAktPos;
+ sal_uLong nCp = nSttCP + pPos->nContent.GetIndex() - nAktPos;
pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()), &rBkmk);
}
if( pOPos && nNd == pOPos->nNode.GetIndex() &&
( nCntnt = pOPos->nContent.GetIndex() ) >= nAktPos &&
nCntnt < nAktEnd )
{
- ULONG nCp = nSttCP + pOPos->nContent.GetIndex() - nAktPos;
+ sal_uLong nCp = nSttCP + pOPos->nContent.GetIndex() - nAktPos;
pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()), &rBkmk);
}
}
}
}
-void WW8Export::MoveFieldMarks(ULONG nFrom, ULONG nTo)
+void WW8Export::MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo)
{
pBkmks->MoveFieldMarks(nFrom, nTo);
}
void WW8Export::AppendBookmark( const rtl::OUString& rName, bool bSkip )
{
- ULONG nSttCP = Fc2Cp( Strm().Tell() ) + ( bSkip? 1: 0 );
+ sal_uLong nSttCP = Fc2Cp( Strm().Tell() ) + ( bSkip? 1: 0 );
pBkmks->Append( nSttCP, rName );
}
@@ -1457,7 +1457,7 @@ void WW8_WrtRedlineAuthor::Write( Writer& rWrt )
rWW8Wrt.pFib->lcbSttbfRMark, rWW8Wrt.bWrtWW8 ? 0 : 2);
}
-USHORT WW8Export::AddRedlineAuthor( USHORT nId )
+sal_uInt16 WW8Export::AddRedlineAuthor( sal_uInt16 nId )
{
if( !pRedlAuthors )
{
@@ -1471,9 +1471,9 @@ USHORT WW8Export::AddRedlineAuthor( USHORT nId )
/* */
void WW8Export::WriteAsStringTable(const std::vector<String>& rStrings,
- INT32& rfcSttbf, INT32& rlcbSttbf, USHORT nExtraLen)
+ sal_Int32& rfcSttbf, sal_Int32& rlcbSttbf, sal_uInt16 nExtraLen)
{
- USHORT n, nCount = static_cast< USHORT >(rStrings.size());
+ sal_uInt16 n, nCount = static_cast< sal_uInt16 >(rStrings.size());
if( nCount )
{
// we have some Redlines found in the document -> the
@@ -1499,7 +1499,7 @@ void WW8Export::WriteAsStringTable(const std::vector<String>& rStrings,
for( n = 0; n < nCount; ++n )
{
const String aNm(rStrings[n].Copy(0, 255));
- rStrm << (BYTE)aNm.Len();
+ rStrm << (sal_uInt8)aNm.Len();
SwWW8Writer::WriteString8(rStrm, aNm, false,
RTL_TEXTENCODING_MS_1252);
if (nExtraLen)
@@ -1508,23 +1508,23 @@ void WW8Export::WriteAsStringTable(const std::vector<String>& rStrings,
}
rlcbSttbf = rStrm.Tell() - rfcSttbf;
if( !bWrtWW8 )
- SwWW8Writer::WriteShort( rStrm, rfcSttbf, (USHORT)rlcbSttbf );
+ SwWW8Writer::WriteShort( rStrm, rfcSttbf, (sal_uInt16)rlcbSttbf );
}
}
// WriteShort() traegt an FilePos nPos den Wert nVal ein und seekt auf die
// alte FilePos zurueck. Benutzt zum Nachtragen von Laengen.
-void SwWW8Writer::WriteShort( SvStream& rStrm, ULONG nPos, INT16 nVal )
+void SwWW8Writer::WriteShort( SvStream& rStrm, sal_uLong nPos, sal_Int16 nVal )
{
- ULONG nOldPos = rStrm.Tell(); // Pos merken
+ sal_uLong nOldPos = rStrm.Tell(); // Pos merken
rStrm.Seek( nPos );
SwWW8Writer::WriteShort( rStrm, nVal );
rStrm.Seek( nOldPos );
}
-void SwWW8Writer::WriteLong( SvStream& rStrm, ULONG nPos, INT32 nVal )
+void SwWW8Writer::WriteLong( SvStream& rStrm, sal_uLong nPos, sal_Int32 nVal )
{
- ULONG nOldPos = rStrm.Tell(); // Pos merken
+ sal_uLong nOldPos = rStrm.Tell(); // Pos merken
rStrm.Seek( nPos );
SwWW8Writer::WriteLong( rStrm, nVal );
rStrm.Seek( nOldPos );
@@ -1568,13 +1568,13 @@ void SwWW8Writer::InsAsString8(ww::bytes &rO, const String& rStr,
#ifdef __WW8_NEEDS_COPY
-void SwWW8Writer::InsUInt16( WW8Bytes& rO, UINT16 n )
+void SwWW8Writer::InsUInt16( WW8Bytes& rO, sal_uInt16 n )
{
SVBT16 nL;
ShortToSVBT16( n, nL );
rO.Insert( nL, 2, rO.Count() );
}
-void SwWW8Writer::InsUInt32( WW8Bytes& rO, UINT32 n )
+void SwWW8Writer::InsUInt32( WW8Bytes& rO, sal_uInt32 n )
{
SVBT32 nL;
UInt32ToSVBT32( n, nL );
@@ -1583,13 +1583,13 @@ void SwWW8Writer::InsUInt32( WW8Bytes& rO, UINT32 n )
#else
-void SwWW8Writer::InsUInt16( WW8Bytes& rO, UINT16 n )
+void SwWW8Writer::InsUInt16( WW8Bytes& rO, sal_uInt16 n )
{
- rO.Insert( (BYTE*)&n, 2, rO.Count() );
+ rO.Insert( (sal_uInt8*)&n, 2, rO.Count() );
}
-void SwWW8Writer::InsUInt32( WW8Bytes& rO, UINT32 n )
+void SwWW8Writer::InsUInt32( WW8Bytes& rO, sal_uInt32 n )
{
- rO.Insert( (BYTE*)&n, 4, rO.Count() );
+ rO.Insert( (sal_uInt8*)&n, 4, rO.Count() );
}
#endif // defined __WW8_NEEDS_COPY
@@ -1605,7 +1605,7 @@ void SwWW8Writer::InsAsString8( WW8Bytes& rO, const String& rStr,
rtl_TextEncoding eCodeSet )
{
ByteString sTmp( rStr, eCodeSet );
- rO.Insert( (BYTE*)sTmp.GetBuffer(), sTmp.Len(), rO.Count() );
+ rO.Insert( (sal_uInt8*)sTmp.GetBuffer(), sTmp.Len(), rO.Count() );
}
void SwWW8Writer::WriteString16(SvStream& rStrm, const String& rStr,
@@ -1645,7 +1645,7 @@ void SwWW8Writer::WriteString8(SvStream& rStrm, const String& rStr,
rStrm.Write(&aBytes[0], aBytes.size());
}
-void WW8Export::WriteStringAsPara( const String& rTxt, USHORT nStyleId )
+void WW8Export::WriteStringAsPara( const String& rTxt, sal_uInt16 nStyleId )
{
if( rTxt.Len() )
OutSwString( rTxt, 0, rTxt.Len(), IsUnicode(), RTL_TEXTENCODING_MS_1252 );
@@ -1663,14 +1663,14 @@ void WW8Export::WriteStringAsPara( const String& rTxt, USHORT nStyleId )
aArr.Insert( 1, aArr.Count() );
}
- ULONG nPos = Strm().Tell();
+ sal_uLong nPos = Strm().Tell();
pPapPlc->AppendFkpEntry( nPos, aArr.Count(), aArr.GetData() );
pChpPlc->AppendFkpEntry( nPos );
}
-void MSWordExportBase::WriteSpecialText( ULONG nStart, ULONG nEnd, BYTE nTTyp )
+void MSWordExportBase::WriteSpecialText( sal_uLong nStart, sal_uLong nEnd, sal_uInt8 nTTyp )
{
- BYTE nOldTyp = nTxtTyp;
+ sal_uInt8 nOldTyp = nTxtTyp;
nTxtTyp = nTTyp;
SwPaM* pOldPam = pCurPam; //!! Einfaches Umsetzen des PaM ohne
SwPaM* pOldEnd = pOrigPam; // Wiederherstellen muesste es auch tun
@@ -1757,10 +1757,10 @@ void WW8Export::WriteChar( sal_Unicode c )
if( pPiece->IsUnicode() )
Strm() << c;
else
- Strm() << (BYTE)c;
+ Strm() << (sal_uInt8)c;
}
-void MSWordExportBase::SaveData( ULONG nStt, ULONG nEnd )
+void MSWordExportBase::SaveData( sal_uLong nStt, sal_uLong nEnd )
{
MSWordSaveData aData;
@@ -1829,7 +1829,7 @@ void MSWordExportBase::RestoreData()
maSaveData.pop();
}
-void WW8Export::SaveData( ULONG nStt, ULONG nEnd )
+void WW8Export::SaveData( sal_uLong nStt, sal_uLong nEnd )
{
MSWordExportBase::SaveData( nStt, nEnd );
@@ -1882,14 +1882,14 @@ void WW8AttributeOutput::TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pT
{
/* Cell */
m_rWW8Export.InsUInt16( NS_sprm::LN_PFInTable );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( NS_sprm::LN_PTableDepth );
m_rWW8Export.InsUInt32( nDepth );
if ( nDepth > 1 && pTableTextNodeInfoInner->isEndOfCell() )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PCell );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
}
}
}
@@ -1904,12 +1904,12 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa
if ( pTableTextNodeInfoInner->isEndOfLine() )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PFInTable );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
if ( nDepth == 1 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PFTtp );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
}
m_rWW8Export.InsUInt16( NS_sprm::LN_PTableDepth );
@@ -1918,9 +1918,9 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa
if ( nDepth > 1 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PCell );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( NS_sprm::LN_PRow );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
}
TableDefinition( pTableTextNodeInfoInner );
@@ -1979,8 +1979,8 @@ void WW8AttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_
if ( FRMDIR_VERT_TOP_RIGHT == m_rWW8Export.TrueFrameDirection( *pFrmFmt ) )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_TTextFlow );
- m_rWW8Export.pO->Insert( BYTE(n), m_rWW8Export.pO->Count() ); //start range
- m_rWW8Export.pO->Insert( BYTE(n + 1), m_rWW8Export.pO->Count() ); //end range
+ m_rWW8Export.pO->Insert( sal_uInt8(n), m_rWW8Export.pO->Count() ); //start range
+ m_rWW8Export.pO->Insert( sal_uInt8(n + 1), m_rWW8Export.pO->Count() ); //end range
m_rWW8Export.InsUInt16( 5 ); //Equals vertical writing
}
}
@@ -1999,7 +1999,7 @@ void WW8AttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pT
*/
const SwFmtRowSplit& rSplittable = pLineFmt->GetRowSplit();
- BYTE nCantSplit = (!rSplittable.GetValue()) ? 1 : 0;
+ sal_uInt8 nCantSplit = (!rSplittable.GetValue()) ? 1 : 0;
if ( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_TFCantSplit );
@@ -2072,7 +2072,7 @@ void WW8AttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTab
m_rWW8Export.InsUInt16( NS_sprm::LN_TDyaRowHeight );
else
m_rWW8Export.pO->Insert( 189, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)nHeight );
+ m_rWW8Export.InsUInt16( (sal_uInt16)nHeight );
}
}
@@ -2173,7 +2173,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
m_rWW8Export.InsUInt16( nSprmSize ); // length
// number of boxes
- m_rWW8Export.pO->Insert( static_cast<BYTE>(nBoxes), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( static_cast<sal_uInt8>(nBoxes), m_rWW8Export.pO->Count() );
/* cellxs */
/*
@@ -2222,7 +2222,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
for ( ww8::GridCols::const_iterator it = pGridCols->begin(),
end = pGridCols->end(); it != end; ++it )
{
- m_rWW8Export.InsUInt16( static_cast<USHORT>( *it ) + nTblOffset );
+ m_rWW8Export.InsUInt16( static_cast<sal_uInt16>( *it ) + nTblOffset );
}
/* TCs */
@@ -2256,7 +2256,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
m_rWW8Export.InsUInt16( nFlags );
}
- static BYTE aNullBytes[] = { 0x0, 0x0 };
+ static sal_uInt8 aNullBytes[] = { 0x0, 0x0 };
m_rWW8Export.pO->Insert( aNullBytes, 2, m_rWW8Export.pO->Count() ); // dummy
if (pBoxFmt != NULL)
@@ -2355,7 +2355,7 @@ void WW8AttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
//Set Default, just taken from the first cell of the first
//row
- static USHORT aBorders[] =
+ static sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT,
BOX_LINE_BOTTOM, BOX_LINE_RIGHT
@@ -2364,11 +2364,11 @@ void WW8AttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
for ( int i = 0; i < 4; ++i )
{
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, 0xD634 );
- m_rWW8Export.pO->Insert( BYTE(6), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(0), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(1), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(1 << i), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(3), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(6), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(0), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(1), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(1 << i), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(3), m_rWW8Export.pO->Count() );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO,
pFrmFmt->GetBox().GetDistance( aBorders[i] ) );
@@ -2385,8 +2385,8 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_TDefTableShd );
else
- m_rWW8Export.pO->Insert( (BYTE)191, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( (BYTE)(nBoxes * 2), m_rWW8Export.pO->Count() ); // Len
+ m_rWW8Export.pO->Insert( (sal_uInt8)191, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)(nBoxes * 2), m_rWW8Export.pO->Count() ); // Len
for ( sal_uInt8 n = 0; n < nBoxes; n++ )
{
@@ -2417,7 +2417,7 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
for (sal_uInt32 m = 0; m < 2; m++)
{
m_rWW8Export.InsUInt16( aSprmIds[m] );
- m_rWW8Export.pO->Insert( static_cast<BYTE>(nBoxes0 * 10),
+ m_rWW8Export.pO->Insert( static_cast<sal_uInt8>(nBoxes0 * 10),
m_rWW8Export.pO->Count() );
for ( sal_uInt8 n = 0; n < nBoxes0; n++ )
@@ -2547,7 +2547,7 @@ void MSWordExportBase::WriteText()
if ( !pParentFmt )
pParentFmt = (SwSectionFmt*)0xFFFFFFFF;
- ULONG nRstLnNum;
+ sal_uLong nRstLnNum;
if ( aIdx.GetNode().IsCntntNode() )
nRstLnNum = ((SwCntntNode&)aIdx.GetNode()).GetSwAttrSet().
GetLineNumber().GetStartValue();
@@ -2577,7 +2577,7 @@ void MSWordExportBase::WriteText()
else
pCurPam->GetPoint()->nNode++;
- ULONG nPos = pCurPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nPos = pCurPam->GetPoint()->nNode.GetIndex();
::SetProgressState( nPos, pCurPam->GetDoc()->GetDocShell() );
}
@@ -2624,7 +2624,7 @@ void WW8Export::WriteFkpPlcUsw()
{
if( !bWrtWW8 )
{
- static const BYTE aSpec[2] =
+ static const sal_uInt8 aSpec[2] =
{
117, 1
};
@@ -2789,8 +2789,8 @@ void WW8Export::StoreDoc1()
SwWW8Writer::FillUntil( Strm(), pFib->fcMin );
WriteMainText(); // HauptText
- BYTE nSprmsLen;
- BYTE *pLastSprms = pPapPlc->CopyLastSprms(nSprmsLen);
+ sal_uInt8 nSprmsLen;
+ sal_uInt8 *pLastSprms = pPapPlc->CopyLastSprms(nSprmsLen);
bNeedsFinalPara |= pFtn->WriteTxt( *this ); // Footnote-Text
bNeedsFinalPara |= pSepx->WriteKFTxt( *this ); // K/F-Text
@@ -2846,7 +2846,7 @@ void MSWordExportBase::AddLinkTarget(const String& rURL)
// node index number of where it points to
if( pDoc->GotoOutline( aPos, aOutline ) )
{
- ULONG nIdx = aPos.nNode.GetIndex();
+ sal_uLong nIdx = aPos.nNode.GetIndex();
aPair aImplicitBookmark;
aImplicitBookmark.first = aOutline;
aImplicitBookmark.second = nIdx;
@@ -2885,7 +2885,7 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc)
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 )
@@ -2900,18 +2900,18 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc)
namespace
{
- const ULONG WW_BLOCKSIZE = 0x200;
+ const sal_uLong WW_BLOCKSIZE = 0x200;
void EncryptRC4(msfilter::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut)
{
rIn.Seek(STREAM_SEEK_TO_END);
- ULONG nLen = rIn.Tell();
+ sal_uLong nLen = rIn.Tell();
rIn.Seek(0);
sal_uInt8 in[WW_BLOCKSIZE];
- for (ULONG nI = 0, nBlock = 0; nI < nLen; nI += WW_BLOCKSIZE, ++nBlock)
+ for (sal_uLong nI = 0, nBlock = 0; nI < nLen; nI += WW_BLOCKSIZE, ++nBlock)
{
- ULONG nBS = (nLen - nI > WW_BLOCKSIZE) ? WW_BLOCKSIZE : nLen - nI;
+ sal_uLong nBS = (nLen - nI > WW_BLOCKSIZE) ? WW_BLOCKSIZE : nLen - nI;
rIn.Read(in, nBS);
rCtx.InitCipher(nBlock);
rCtx.Encode(in, nBS, in, nBS);
@@ -2950,7 +2950,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
if ( !pOLEExp )
{
- UINT32 nSvxMSDffOLEConvFlags = 0;
+ sal_uInt32 nSvxMSDffOLEConvFlags = 0;
const SvtFilterOptions* pOpt = SvtFilterOptions::Get();
if ( pOpt->IsMath2MathType() )
nSvxMSDffOLEConvFlags |= OLE_STARMATH_2_MATHTYPE;
@@ -3247,15 +3247,15 @@ void WW8Export::ExportDocument_Impl()
void WW8Export::PrepareStorage()
{
- ULONG nLen;
- const BYTE* pData;
+ sal_uLong nLen;
+ const sal_uInt8* pData;
const char* pName;
- UINT32 nId1;
+ sal_uInt32 nId1;
if (bWrtWW8)
{
static const char aUserName[] = "Microsoft Word-Document";
- static const BYTE aCompObj[] =
+ static const sal_uInt8 aCompObj[] =
{
0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x06, 0x09, 0x02, 0x00,
@@ -3281,7 +3281,7 @@ void WW8Export::PrepareStorage()
else
{
static const char aUserName[] = "Microsoft Word 6.0 Document";
- static const BYTE aCompObj[] =
+ static const sal_uInt8 aCompObj[] =
{
0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x09, 0x02, 0x00,
@@ -3336,7 +3336,7 @@ void WW8Export::PrepareStorage()
}
}
-ULONG SwWW8Writer::WriteStorage()
+sal_uLong SwWW8Writer::WriteStorage()
{
// #i34818# #120099# - update layout (if present), for SwWriteTable
ViewShell* pViewShell = NULL;
@@ -3367,16 +3367,16 @@ ULONG SwWW8Writer::WriteStorage()
return 0;
}
-ULONG SwWW8Writer::WriteMedium( SfxMedium& )
+sal_uLong SwWW8Writer::WriteMedium( SfxMedium& )
{
return WriteStorage();
}
-ULONG SwWW8Writer::Write( SwPaM& rPaM, SfxMedium& rMed,
+sal_uLong SwWW8Writer::Write( SwPaM& rPaM, SfxMedium& rMed,
const String* pFileName )
{
mpMedium = &rMed;
- ULONG nRet = StgWriter::Write( rPaM, rMed, pFileName );
+ sal_uLong nRet = StgWriter::Write( rPaM, rMed, pFileName );
mpMedium = NULL;
return nRet;
}
@@ -3447,7 +3447,7 @@ SwWW8Writer::~SwWW8Writer()
{
}
-extern "C" SAL_DLLPUBLIC_EXPORT ULONG SAL_CALL SaveOrDelMSVBAStorage_ww8( SfxObjectShell& rDoc, SotStorage& rStor, BOOL bSaveInto, const String& rStorageName )
+extern "C" SAL_DLLPUBLIC_EXPORT sal_uLong SAL_CALL SaveOrDelMSVBAStorage_ww8( SfxObjectShell& rDoc, SotStorage& rStor, sal_Bool bSaveInto, const String& rStorageName )
{
SvxImportMSVBasic aTmp( rDoc, rStor );
return aTmp.SaveOrDelMSVBAStorage( bSaveInto, rStorageName );
@@ -3459,7 +3459,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ExportDOC( const String& rFltName,
}
-extern "C" SAL_DLLPUBLIC_EXPORT ULONG SAL_CALL GetSaveWarningOfMSVBAStorage_ww8( SfxObjectShell &rDocS )
+extern "C" SAL_DLLPUBLIC_EXPORT sal_uLong SAL_CALL GetSaveWarningOfMSVBAStorage_ww8( SfxObjectShell &rDocS )
{
return SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( rDocS );
}
@@ -3600,11 +3600,11 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
if(pNameParameter != rFieldmark.GetParameters()->end())
pNameParameter->second >>= ffname;
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry(Strm().Tell());
WriteChar(0x01);
- static BYTE aArr1[] =
+ static sal_uInt8 aArr1[] =
{
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
@@ -3612,7 +3612,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32(pDataAdr, nDataStt);
pChpPlc->AppendFkpEntry( Strm().Tell(), sizeof( aArr1 ), aArr1 );
@@ -3751,7 +3751,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
{
m_rWW8Export.WriteCR(pTmpNodeInfoInner);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2,
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2,
m_rWW8Export.pO->Count() ); // Style #
TableInfoCell(pTmpNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry
@@ -3769,7 +3769,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
#endif
m_rWW8Export.WriteCR(pNodeInfoInner);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoCell(pNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -3790,7 +3790,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
{
m_rWW8Export.WriteCR(pTmpNodeInfoInner);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoCell(pTmpNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -3807,7 +3807,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
TableRowEnd(pNodeInfoInner->getDepth());
ShortToSVBT16(0, nStyle);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoRow(pNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index a4ab2c69aaa8..6350fb9f5512 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -136,7 +136,7 @@ class SvxBrushItem;
#define OLE_PREVIEW_AS_EMF //If we want to export ole2 previews as emf in ww8+
-typedef BYTE FieldFlags;
+typedef sal_uInt8 FieldFlags;
namespace nsFieldFlags // for InsertField- Method
{
const FieldFlags WRITEFIELD_START = 0x01;
@@ -153,7 +153,7 @@ enum TxtTypes //enums for TextTypes
TXT_EDN = 4, TXT_ATN = 5, TXT_TXTBOX = 6, TXT_HFTXTBOX= 7
};
-SV_DECL_VARARR( WW8Bytes, BYTE, 128, 128 )
+SV_DECL_VARARR( WW8Bytes, sal_uInt8, 128, 128 )
struct WW8_SepInfo
{
@@ -161,8 +161,8 @@ struct WW8_SepInfo
const SwSectionFmt* pSectionFmt;
const SwNode* pPDNd;
const SwTxtNode* pNumNd;
- ULONG nLnNumRestartNo;
- USHORT nPgRestartNo;
+ sal_uLong nLnNumRestartNo;
+ sal_uInt16 nPgRestartNo;
WW8_SepInfo()
: pPageDesc(0), pSectionFmt(0), pPDNd(0), pNumNd(0), nLnNumRestartNo(0), nPgRestartNo(0)
@@ -170,7 +170,7 @@ struct WW8_SepInfo
{}
WW8_SepInfo( const SwPageDesc* pPD, const SwSectionFmt* pFmt,
- ULONG nLnRestart, USHORT nPgRestart = 0, const SwNode* pNd = NULL )
+ sal_uLong nLnRestart, sal_uInt16 nPgRestart = 0, const SwNode* pNd = NULL )
: pPageDesc( pPD ), pSectionFmt( pFmt ), pPDNd( pNd ), pNumNd( 0 ),
nLnNumRestartNo( nLnRestart ), nPgRestartNo( nPgRestart )
{}
@@ -201,11 +201,11 @@ public:
void AppendSection( const SwPageDesc* pPd,
const SwSectionFmt* pSectionFmt = 0,
- ULONG nLnNumRestartNo = 0 );
+ sal_uLong nLnNumRestartNo = 0 );
void AppendSection( const SwFmtPageDesc& rPd,
const SwNode& rNd,
const SwSectionFmt* pSectionFmt,
- ULONG nLnNumRestartNo );
+ sal_uLong nLnNumRestartNo );
void SetNum( const SwTxtNode* pNumNd );
/// Number of columns based on the most recent WW8_SepInfo.
@@ -219,10 +219,10 @@ public:
/// The most recent WW8_SepInfo.
const WW8_SepInfo* CurrentSectionInfo();
- static void SetHeaderFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag );
- static void SetFooterFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag );
+ static void SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag );
+ static void SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag );
/// Should we output borders?
static int HasBorderItem( const SwFmt& rFmt );
@@ -245,11 +245,11 @@ public:
void AppendSep( WW8_CP nStartCp,
const SwPageDesc* pPd,
const SwSectionFmt* pSectionFmt = 0,
- ULONG nLnNumRestartNo = 0 );
+ sal_uLong nLnNumRestartNo = 0 );
void AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPd,
const SwNode& rNd,
const SwSectionFmt* pSectionFmt,
- ULONG nLnNumRestartNo );
+ sal_uLong nLnNumRestartNo );
void Finish( WW8_CP nEndCp ) { aCps.Insert( nEndCp, aCps.Count() ); }
bool WriteKFTxt( WW8Export& rWrt );
@@ -258,10 +258,10 @@ public:
void WritePlcHdd( WW8Export& rWrt ) const;
private:
- void WriteFtnEndTxt( WW8Export& rWrt, ULONG nCpStt );
+ void WriteFtnEndTxt( WW8Export& rWrt, sal_uLong nCpStt );
public:
void OutHeaderFooter(WW8Export& rWrt, bool bHeader,
- const SwFmt& rFmt, ULONG& rCpPos, BYTE nHFFlags, BYTE nFlag, BYTE nBreakCode);
+ const SwFmt& rFmt, sal_uLong& rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode);
};
//--------------------------------------------------------------------------
@@ -279,7 +279,7 @@ public:
void WritePc( WW8Export& rWrt );
void SetParaBreak();
bool IsUnicode() const { return bIsUni; }
- WW8_CP Fc2Cp( ULONG nFc ) const;
+ WW8_CP Fc2Cp( sal_uLong nFc ) const;
};
/// Collects and outputs fonts.
@@ -288,7 +288,7 @@ class wwFont
//In some future land the stream could be converted to a nice stream interface
//and we could have harmony
private:
- BYTE maWW8_FFN[6];
+ sal_uInt8 maWW8_FFN[6];
String msFamilyNm;
String msAltNm;
bool mbAlt;
@@ -312,7 +312,7 @@ class wwFontHelper
{
private:
/// Keep track of fonts that need to be exported.
- ::std::map<wwFont, USHORT> maFonts;
+ ::std::map<wwFont, sal_uInt16> maFonts;
bool mbWrtWW8;
/// Convert from fast insertion map to linear vector in the order that we want to write.
@@ -322,9 +322,9 @@ public:
wwFontHelper() : mbWrtWW8(false), bLoadAllFonts(false) {}
/// rDoc used only to get the initial standard font(s) in use.
void InitFontTable(bool bWrtWW8, const SwDoc& rDoc);
- USHORT GetId(const Font& rFont);
- USHORT GetId(const SvxFontItem& rFont);
- USHORT GetId(const wwFont& rFont);
+ sal_uInt16 GetId(const Font& rFont);
+ sal_uInt16 GetId(const SvxFontItem& rFont);
+ sal_uInt16 GetId(const wwFont& rFont);
void WriteFontTable( SvStream *pTableStream, WW8Fib& pFib );
#ifdef DOCX
void WriteFontTable( const DocxAttributeOutput& rAttrOutput );
@@ -332,17 +332,17 @@ public:
void WriteFontTable( const RtfAttributeOutput& rAttrOutput );
/// If true, all fonts are loaded before processing the document.
- BYTE bLoadAllFonts: 1;
+ sal_uInt8 bLoadAllFonts: 1;
};
class DrawObj
{
public:
WW8_CP mnCp; // CP-Pos der Verweise
- UINT32 mnShapeId; // ShapeId for the SwFrmFmts
+ sal_uInt32 mnShapeId; // ShapeId for the SwFrmFmts
sw::Frame maCntnt; // the frame itself
Point maParentPos; // Points
- INT32 mnThick; // Border Thicknesses
+ sal_Int32 mnThick; // Border Thicknesses
short mnDirection; // If BiDi or not
unsigned int mnHdFtIndex; // 0 for main text, +1 for each subsequent
// msword hd/ft
@@ -351,7 +351,7 @@ public:
unsigned int nHdFtIndex)
: mnCp(nCp), mnShapeId(0), maCntnt(rCntnt), maParentPos(aParentPos),
mnThick(0), mnDirection(nDir), mnHdFtIndex(nHdFtIndex) {}
- void SetShapeDetails(UINT32 nId, INT32 nThick);
+ void SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick);
DrawObj& operator=(const DrawObj &rOther);
};
@@ -412,7 +412,7 @@ private:
HdFtPlcDrawObj& operator=(const HdFtPlcDrawObj&);
};
-typedef ::std::pair<String, ULONG> aPair;
+typedef ::std::pair<String, sal_uLong> aPair;
typedef std::vector<aPair> SwImplBookmarks;
typedef std::vector<aPair>::iterator SwImplBookmarksIter;
@@ -444,12 +444,12 @@ struct MSWordSaveData
const sw::Frame* pOldFlyFmt;
const SwPageDesc* pOldPageDesc;
- BYTE bOldWriteAll : 1; ///< WW8Export only
- BYTE bOldOutTable : 1;
- BYTE bOldIsInTable: 1;
- BYTE bOldFlyFrmAttrs : 1;
- BYTE bOldStartTOX : 1;
- BYTE bOldInWriteTOX : 1;
+ sal_uInt8 bOldWriteAll : 1; ///< WW8Export only
+ sal_uInt8 bOldOutTable : 1;
+ sal_uInt8 bOldIsInTable: 1;
+ sal_uInt8 bOldFlyFrmAttrs : 1;
+ sal_uInt8 bOldStartTOX : 1;
+ sal_uInt8 bOldInWriteTOX : 1;
// bOutPageDesc muss nicht gesichert werden, da es nur nicht waehrend der
// Ausgabe von Spezial-Texten veraendert wird.
};
@@ -459,15 +459,15 @@ class MSWordExportBase
{
public:
wwFontHelper maFontHelper;
- std::vector<ULONG> maChapterFieldLocs;
- typedef std::vector<ULONG>::const_iterator mycCFIter;
+ std::vector<sal_uLong> maChapterFieldLocs;
+ typedef std::vector<sal_uLong>::const_iterator mycCFIter;
String aMainStg;
SvPtrarr aTOXArr;
const SfxItemSet* pISet; // fuer Doppel-Attribute
WW8_WrPct* pPiece; // Pointer auf Piece-Table
SwNumRuleTbl* pUsedNumTbl; // alle used NumRules
const SwTxtNode *mpTopNodeOfHdFtPage; ///< Top node of host page when in hd/ft
- std::map< USHORT, USHORT > aRuleDuplicates; //map to Duplicated numrules
+ std::map< sal_uInt16, sal_uInt16 > aRuleDuplicates; //map to Duplicated numrules
std::stack< xub_StrLen > m_aCurrentCharPropStarts; ///< To remember the position in a run.
WW8_WrtBookmarks* pBkmks;
WW8_WrtRedlineAuthor* pRedlAuthors;
@@ -478,15 +478,15 @@ public:
WW8OleMaps* pOleMap;
ww8::WW8TableInfo::Pointer_t mpTableInfo;
- USHORT nCharFmtStart;
- USHORT nFmtCollStart;
- USHORT nStyleBeforeFly; ///< Style-Nummer des Nodes,
+ sal_uInt16 nCharFmtStart;
+ sal_uInt16 nFmtCollStart;
+ sal_uInt16 nStyleBeforeFly; ///< Style-Nummer des Nodes,
///< in/an dem ein Fly verankert ist
- USHORT nLastFmtId; ///< Style of last TxtNode in normal range
- USHORT nUniqueList; ///< current number for creating unique list names
+ sal_uInt16 nLastFmtId; ///< Style of last TxtNode in normal range
+ sal_uInt16 nUniqueList; ///< current number for creating unique list names
unsigned int mnHdFtIndex;
- USHORT mnRedlineMode; ///< Remember the original redline mode
+ sal_uInt16 mnRedlineMode; ///< Remember the original redline mode
public:
/* implicit bookmark vector containing pairs of node indexes and bookmark names */
@@ -531,27 +531,27 @@ public:
// SwTwips nFlyWidth, nFlyHeight; // Fuer Anpassung Graphic
// <--
- BYTE nTxtTyp;
+ sal_uInt8 nTxtTyp;
- BYTE bStyDef : 1; // wird Style geschrieben ?
- BYTE bBreakBefore : 1; // Breaks werden 2mal ausgegeben
- BYTE bOutKF : 1; // Kopf/Fusstexte werden ausgegeben
- BYTE bOutFlyFrmAttrs : 1; // Rahmen-Attr von Flys werden ausgegeben
- BYTE bOutPageDescs : 1; ///< PageDescs (section properties) are being written
- BYTE bOutFirstPage : 1; // write Attrset of FirstPageDesc
- BYTE bOutTable : 1; // Tabelle wird ausgegeben
+ sal_uInt8 bStyDef : 1; // wird Style geschrieben ?
+ sal_uInt8 bBreakBefore : 1; // Breaks werden 2mal ausgegeben
+ sal_uInt8 bOutKF : 1; // Kopf/Fusstexte werden ausgegeben
+ sal_uInt8 bOutFlyFrmAttrs : 1; // Rahmen-Attr von Flys werden ausgegeben
+ sal_uInt8 bOutPageDescs : 1; ///< PageDescs (section properties) are being written
+ sal_uInt8 bOutFirstPage : 1; // write Attrset of FirstPageDesc
+ sal_uInt8 bOutTable : 1; // Tabelle wird ausgegeben
// ( wird zB bei Flys in Tabelle zurueckgesetzt )
- BYTE bIsInTable : 1; // wird sind innerhalb der Ausgabe einer Tabelle
+ sal_uInt8 bIsInTable : 1; // wird sind innerhalb der Ausgabe einer Tabelle
// ( wird erst nach der Tabelle zurueckgesetzt )
- BYTE bOutGrf : 1; // Grafik wird ausgegeben
- BYTE bInWriteEscher : 1; // in write textboxes
- BYTE bStartTOX : 1; // true: a TOX is startet
- BYTE bInWriteTOX : 1; // true: all content are in a TOX
- BYTE bFtnAtTxtEnd : 1; // true: all FTN at Textend
- BYTE bEndAtTxtEnd : 1; // true: all END at Textend
- BYTE bHasHdr : 1;
- BYTE bHasFtr : 1;
- BYTE bSubstituteBullets : 1; // true: SubstituteBullet() gets called
+ sal_uInt8 bOutGrf : 1; // Grafik wird ausgegeben
+ sal_uInt8 bInWriteEscher : 1; // in write textboxes
+ sal_uInt8 bStartTOX : 1; // true: a TOX is startet
+ sal_uInt8 bInWriteTOX : 1; // true: all content are in a TOX
+ sal_uInt8 bFtnAtTxtEnd : 1; // true: all FTN at Textend
+ sal_uInt8 bEndAtTxtEnd : 1; // true: all END at Textend
+ sal_uInt8 bHasHdr : 1;
+ sal_uInt8 bHasFtr : 1;
+ sal_uInt8 bSubstituteBullets : 1; // true: SubstituteBullet() gets called
bool mbExportModeRTF;
@@ -576,35 +576,35 @@ public:
/// Set the pCurPam appropriately and call WriteText().
///
/// Used to export paragraphs in footnotes/endnotes/etc.
- void WriteSpecialText( ULONG nStart, ULONG nEnd, BYTE nTTyp );
+ void WriteSpecialText( sal_uLong nStart, sal_uLong nEnd, sal_uInt8 nTTyp );
/// Export the pool items to attributes (through an attribute output class).
- void ExportPoolItemsToCHP( sw::PoolItems &rItems, USHORT nScript );
+ void ExportPoolItemsToCHP( sw::PoolItems &rItems, sal_uInt16 nScript );
/// Return the numeric id of the numbering rule
- USHORT GetId( const SwNumRule& rNumRule );
+ sal_uInt16 GetId( const SwNumRule& rNumRule );
/// Return the numeric id of the style.
- USHORT GetId( const SwTxtFmtColl& rColl ) const;
+ sal_uInt16 GetId( const SwTxtFmtColl& rColl ) const;
/// Return the numeric id of the style.
- USHORT GetId( const SwCharFmt& rFmt ) const;
+ sal_uInt16 GetId( const SwCharFmt& rFmt ) const;
- USHORT GetId( const SwTOXType& rTOXType );
+ sal_uInt16 GetId( const SwTOXType& rTOXType );
- const SfxPoolItem& GetItem( USHORT nWhich ) const;
+ const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
/// Find the reference.
- bool HasRefToObject( USHORT nTyp, const String* pName, USHORT nSeqNo );
+ bool HasRefToObject( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo );
/// Find the bookmark name.
- String GetBookmarkName( USHORT nTyp, const String* pName, USHORT nSeqNo );
+ String GetBookmarkName( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo );
/// Add a bookmark converted to a Word name.
void AppendWordBookmark( const String& rName );
/// Use OutputItem() on an item set according to the parameters.
- void OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, USHORT nScript, bool bExportParentItemSet );
+ void OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, sal_uInt16 nScript, bool bExportParentItemSet );
short GetDefaultFrameDirection( ) const;
@@ -619,7 +619,7 @@ public:
/// List is set to restart at a particular value so for export make a
/// completely new list based on this one and export that instead,
/// which duplicates words behaviour in this respect.
- USHORT DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel, USHORT nVal );
+ sal_uInt16 DuplicateNumRule( const SwNumRule *pRule, sal_uInt8 nLevel, sal_uInt16 nVal );
/// Access to the attribute output class.
virtual AttributeOutputBase& AttrOutput() const = 0;
@@ -641,7 +641,7 @@ public:
///
/// In addition WW7- has only one character language identifier while WW8+
/// has two
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich ) = 0;
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) = 0;
virtual void AppendBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen ) = 0;
@@ -664,7 +664,7 @@ public:
void SetCurItemSet( const SfxItemSet* pS ) { pISet = pS; }
/// Remember some of the memebers so that we can recurse in WriteText().
- virtual void SaveData( ULONG nStt, ULONG nEnd );
+ virtual void SaveData( sal_uLong nStt, sal_uLong nEnd );
/// Restore what was saved in SaveData().
virtual void RestoreData();
@@ -680,7 +680,7 @@ public:
const SwSectionFmt* GetSectionFormat( const SwNode& rNd ) const;
/// Line number of the section start.
- ULONG GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const;
+ sal_uLong GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const;
/// Start new section.
void OutputSectionBreaks( const SfxItemSet *pSet, const SwNode& rNd );
@@ -716,13 +716,13 @@ public:
const SwTxtNode *GetHdFtPageRoot() const { return mpTopNodeOfHdFtPage; }
/// 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,
- BYTE nBreakCode) = 0;
+ sal_uInt8 nBreakCode) = 0;
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL ) = 0;
+ const String& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL ) = 0;
/// Write the data of the form field
virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) = 0;
@@ -741,9 +741,9 @@ public:
// Compute the number format for WW dates
bool GetNumberFmt(const SwField& rFld, String& rStr);
- virtual ULONG ReplaceCr( BYTE nChar ) = 0;
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) = 0;
- const SfxPoolItem* HasItem( USHORT nWhich ) const;
+ const SfxPoolItem* HasItem( sal_uInt16 nWhich ) const;
protected:
@@ -798,7 +798,7 @@ protected:
/// Output SwSectionNode
virtual void OutputSectionNode( const SwSectionNode& );
- virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum ) = 0;
+ virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum ) = 0;
/// Call the right (virtual) function according to the type of the item.
///
@@ -822,7 +822,7 @@ public:
// TODO move as much as possible here from WW8Export! ;-)
- static void CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft );
+ static void CorrectTabStopInSet( SfxItemSet& rSet, sal_uInt16 nAbsLeft );
private:
/// No copying.
@@ -847,8 +847,8 @@ public:
SwWW8Writer( const String& rFltName, const String& rBaseURL );
virtual ~SwWW8Writer();
- virtual ULONG WriteStorage();
- virtual ULONG WriteMedium( SfxMedium& );
+ virtual sal_uLong WriteStorage();
+ virtual sal_uLong WriteMedium( SfxMedium& );
// TODO most probably we want to be able to get these in
// MSExportFilterBase
@@ -864,20 +864,20 @@ public:
rtl_TextEncoding eCodeSet);
#endif
- static void InsUInt16( WW8Bytes& rO, UINT16 );
- static void InsUInt32( WW8Bytes& rO, UINT32 );
+ static void InsUInt16( WW8Bytes& rO, sal_uInt16 );
+ static void InsUInt32( WW8Bytes& rO, sal_uInt32 );
static void InsAsString16( WW8Bytes& rO, const String& );
static void InsAsString8( WW8Bytes& rO, const String& rStr,
rtl_TextEncoding eCodeSet );
- static ULONG FillUntil( SvStream& rStrm, ULONG nEndPos = 0 );
- static void FillCount( SvStream& rStrm, ULONG nCount );
+ static sal_uLong FillUntil( SvStream& rStrm, sal_uLong nEndPos = 0 );
+ static void FillCount( SvStream& rStrm, sal_uLong nCount );
- static void WriteShort( SvStream& rStrm, INT16 nVal ) { rStrm << nVal; }
- static void WriteShort( SvStream& rStrm, ULONG nPos, INT16 nVal );
+ static void WriteShort( SvStream& rStrm, sal_Int16 nVal ) { rStrm << nVal; }
+ static void WriteShort( SvStream& rStrm, sal_uLong nPos, sal_Int16 nVal );
- static void WriteLong( SvStream& rStrm, INT32 nVal ) { rStrm << nVal; }
- static void WriteLong( SvStream& rStrm, ULONG nPos, INT32 nVal );
+ static void WriteLong( SvStream& rStrm, sal_Int32 nVal ) { rStrm << nVal; }
+ static void WriteLong( SvStream& rStrm, sal_uLong nPos, sal_Int32 nVal );
static void WriteString16(SvStream& rStrm, const String& rStr,
bool bAddZero);
@@ -889,7 +889,7 @@ public:
bool InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec );
using StgWriter::Write;
- virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 );
+ virtual sal_uLong Write( SwPaM&, SfxMedium&, const String* = 0 );
private:
/// No copying.
@@ -914,7 +914,7 @@ public:
WW8_WrPlcFtnEdn *pEdn; ///< Endnotes - structure to remember them, and output
WW8_WrPlcSepx* pSepx; ///< Sections/headers/footers
- BYTE bWrtWW8 : 1; ///< Write WW95 (false) or WW97 (true) file format
+ sal_uInt8 bWrtWW8 : 1; ///< Write WW95 (false) or WW97 (true) file format
protected:
SwWW8Writer *m_pWriter; ///< Pointer to the writer
@@ -938,14 +938,14 @@ private:
void WriteFkpPlcUsw();
void WriteMainText();
void StoreDoc1();
- void Out_WwNumLvl( BYTE nWwLevel );
- void BuildAnlvBulletBase( WW8_ANLV& rAnlv, BYTE*& rpCh, USHORT& rCharLen,
+ void Out_WwNumLvl( sal_uInt8 nWwLevel );
+ void BuildAnlvBulletBase( WW8_ANLV& rAnlv, sal_uInt8*& rpCh, sal_uInt16& rCharLen,
const SwNumFmt& rFmt );
- static void BuildAnlvBase( WW8_ANLV& rAnlv, BYTE*& rpCh, USHORT& rCharLen,
- const SwNumRule& rRul, const SwNumFmt& rFmt, BYTE nSwLevel );
+ static void BuildAnlvBase( WW8_ANLV& rAnlv, sal_uInt8*& rpCh, sal_uInt16& rCharLen,
+ const SwNumRule& rRul, const SwNumFmt& rFmt, sal_uInt8 nSwLevel );
void Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
- USHORT nDist, sal_uInt16 nSprmNo, bool bShadow);
+ sal_uInt16 nDist, sal_uInt16 nSprmNo, bool bShadow);
/// Output the numbering table.
virtual void WriteNumbering();
@@ -966,9 +966,9 @@ public:
/// Setup the pA's info.
virtual void SetupSectionPositions( WW8_PdAttrDesc* pA );
- void Out_SwNumLvl( BYTE nSwLevel );
+ void Out_SwNumLvl( sal_uInt8 nSwLevel );
void Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
- BYTE nSwLevel );
+ sal_uInt8 nSwLevel );
bool MiserableFormFieldExportHack(const SwFrmFmt& rFrmFmt);
@@ -978,12 +978,12 @@ public:
void ExportDopTypography(WW8DopTypography &rTypo);
using MSWordExportBase::GetId;
- USHORT GetId( const SvxFontItem& rFont)
+ sal_uInt16 GetId( const SvxFontItem& rFont)
{
return maFontHelper.GetId(rFont);
}
- USHORT AddRedlineAuthor( USHORT nId );
+ sal_uInt16 AddRedlineAuthor( sal_uInt16 nId );
void WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pO = 0 );
void WritePostItBegin( WW8Bytes* pO = 0 );
@@ -994,10 +994,10 @@ public:
void OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd );
void AppendFlyInFlys(const sw::Frame& rFrmFmt, const Point& rNdTopLeft);
- void WriteOutliner(const OutlinerParaObject& rOutliner, BYTE nTyp);
- void WriteSdrTextObj(const SdrObject& rObj, BYTE nTyp);
+ void WriteOutliner(const OutlinerParaObject& rOutliner, sal_uInt8 nTyp);
+ void WriteSdrTextObj(const SdrObject& rObj, sal_uInt8 nTyp);
- UINT32 GetSdrOrdNum( const SwFrmFmt& rFmt ) const;
+ sal_uInt32 GetSdrOrdNum( const SwFrmFmt& rFmt ) const;
void CreateEscher();
void WriteEscher();
@@ -1005,7 +1005,7 @@ public:
/// 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 );
void StartCommentOutput( const String& rName );
void EndCommentOutput( const String& rName );
@@ -1015,28 +1015,28 @@ public:
virtual void AppendBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen );
virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false );
- void MoveFieldMarks(ULONG nFrom, ULONG nTo);
+ void MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo);
- void WriteAsStringTable(const ::std::vector<String>&, INT32& rfcSttbf,
- INT32& rlcbSttbf, USHORT nExtraLen = 0);
+ void WriteAsStringTable(const ::std::vector<String>&, sal_Int32& rfcSttbf,
+ sal_Int32& rlcbSttbf, sal_uInt16 nExtraLen = 0);
- virtual ULONG ReplaceCr( BYTE nChar );
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar );
virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() );
void WriteChar( sal_Unicode c );
#if 0
- USHORT StartTableFromFrmFmt(WW8Bytes &rAt, const SwFrmFmt *pFmt,
+ sal_uInt16 StartTableFromFrmFmt(WW8Bytes &rAt, const SwFrmFmt *pFmt,
SwTwips &rPageSize);
#endif
void OutSwString(const String&, xub_StrLen nStt, xub_StrLen nLen,
bool bUnicode, rtl_TextEncoding eChrSet);
- WW8_CP Fc2Cp( ULONG nFc ) const { return pPiece->Fc2Cp( nFc ); }
+ WW8_CP Fc2Cp( sal_uLong nFc ) const { return pPiece->Fc2Cp( nFc ); }
// einige z.T. static halb-interne Funktions-Deklarationen
- void OutSprmBytes( BYTE* pBytes, USHORT nSiz )
+ void OutSprmBytes( sal_uInt8* pBytes, sal_uInt16 nSiz )
{ pO->Insert( pBytes, nSiz, pO->Count() ); }
inline bool IsUnicode() const { return pPiece->IsUnicode(); }
@@ -1052,10 +1052,10 @@ public:
void Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow);
void Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem * rBox );
- BYTE TransCol( const Color& rCol );
+ sal_uInt8 TransCol( const Color& rCol );
bool TransBrush(const Color& rCol, WW8_SHD& rShd);
WW8_BRC TranslateBorderLine(const SvxBorderLine& pLine,
- USHORT nDist, bool bShadow);
+ sal_uInt16 nDist, bool bShadow);
// --> OD 2007-06-04 #i77805#
// new return value indicates, if an inherited outline numbering is suppressed
@@ -1069,12 +1069,12 @@ public:
static long GetDTTM( const DateTime& rDT );
/// Convert the SVX numbering type to id
- static BYTE GetNumId( USHORT eNumType );
+ static sal_uInt8 GetNumId( sal_uInt16 eNumType );
/// Guess the script (asian/western).
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich );
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich );
- USHORT DupNumRuleWithLvlStart(const SwNumRule *pRule,BYTE nLvl,USHORT nVal);
+ sal_uInt16 DupNumRuleWithLvlStart(const SwNumRule *pRule,sal_uInt8 nLvl,sal_uInt16 nVal);
SwTwips CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const;
@@ -1082,13 +1082,13 @@ public:
bool MiserableRTLFrmFmtHack(SwTwips &rLeft, SwTwips &rRight,
const sw::Frame &rFrmFmt);
- void InsUInt16( UINT16 n ) { SwWW8Writer::InsUInt16( *pO, n ); }
- void InsUInt32( UINT32 n ) { SwWW8Writer::InsUInt32( *pO, n ); }
+ void InsUInt16( sal_uInt16 n ) { SwWW8Writer::InsUInt16( *pO, n ); }
+ void InsUInt32( sal_uInt32 n ) { SwWW8Writer::InsUInt32( *pO, n ); }
void InsAsString16( const String& rStr )
{ SwWW8Writer::InsAsString16( *pO, rStr ); }
void InsAsString8( const String& rStr, rtl_TextEncoding eCodeSet )
{ SwWW8Writer::InsAsString8( *pO, rStr, eCodeSet ); }
- void WriteStringAsPara( const String& rTxt, USHORT nStyleId = 0 );
+ void WriteStringAsPara( const String& rTxt, sal_uInt16 nStyleId = 0 );
/// Setup the exporter.
WW8Export( SwWW8Writer *pWriter,
@@ -1117,15 +1117,15 @@ public:
SvStream& Strm() const { return m_pWriter->Strm(); }
/// Remember some of the memebers so that we can recurse in WriteText().
- virtual void SaveData( ULONG nStt, ULONG nEnd );
+ virtual void SaveData( sal_uLong nStt, sal_uLong nEnd );
/// Restore what was saved in SaveData().
virtual void RestoreData();
/// 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,
- BYTE nBreakCode);
+ sal_uInt8 nBreakCode);
protected:
/// Output SwGrfNode
@@ -1134,7 +1134,7 @@ protected:
/// Output SwOLENode
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 );
private:
/// No copying.
@@ -1157,8 +1157,8 @@ protected:
WW8_WrPlcSubDoc();
virtual ~WW8_WrPlcSubDoc();
- bool WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp, WW8_CP& rCount );
- void WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp, WW8_FC& rTxtStt,
+ bool WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_CP& rCount );
+ void WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_FC& rTxtStt,
sal_Int32& rTxtCnt, WW8_FC& rRefStt, sal_Int32& rRefCnt ) const;
virtual const SvULongs* GetShapeIdArr() const;
@@ -1168,13 +1168,13 @@ protected:
class WW8_WrPlcFtnEdn : public WW8_WrPlcSubDoc
{
private:
- BYTE nTyp;
+ sal_uInt8 nTyp;
//No copying
WW8_WrPlcFtnEdn(const WW8_WrPlcFtnEdn&);
WW8_WrPlcFtnEdn& operator=(WW8_WrPlcFtnEdn &);
public:
- WW8_WrPlcFtnEdn( BYTE nTTyp ) : nTyp( nTTyp ) {}
+ WW8_WrPlcFtnEdn( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {}
bool WriteTxt( WW8Export& rWrt );
void WritePlc( WW8Export& rWrt ) const;
@@ -1213,7 +1213,7 @@ public:
class WW8_WrPlcTxtBoxes : public WW8_WrPlcSubDoc // Doppel-Plc fuer Textboxen
{ // Rahmen/DrawTextboxes!
private:
- BYTE nTyp;
+ sal_uInt8 nTyp;
SvULongs aShapeIds; // VARARR of ShapeIds for the SwFrmFmts
virtual const SvULongs* GetShapeIdArr() const;
@@ -1221,13 +1221,13 @@ private:
WW8_WrPlcTxtBoxes(const WW8_WrPlcTxtBoxes&);
WW8_WrPlcTxtBoxes& operator=(WW8_WrPlcTxtBoxes&);
public:
- WW8_WrPlcTxtBoxes( BYTE nTTyp ) : nTyp( nTTyp ) {}
+ WW8_WrPlcTxtBoxes( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {}
bool WriteTxt( WW8Export& rWrt );
void WritePlc( WW8Export& rWrt ) const;
- void Append( const SdrObject& rObj, UINT32 nShapeId );
- USHORT Count() const { return aCntnt.Count(); }
- USHORT GetPos( const VoidPtr& p ) const { return aCntnt.GetPos( p ); }
+ void Append( const SdrObject& rObj, sal_uInt32 nShapeId );
+ sal_uInt16 Count() const { return aCntnt.Count(); }
+ sal_uInt16 GetPos( const VoidPtr& p ) const { return aCntnt.GetPos( p ); }
};
typedef WW8_WrFkp* WW8_FkpPtr; // Plc fuer Chpx und Papx ( incl PN-Plc )
@@ -1238,10 +1238,10 @@ class WW8_WrPlcPn // Plc fuer Page Numbers
private:
WW8Export& rWrt;
WW8_WrFkpPtrs aFkps; // PTRARR
- USHORT nFkpStartPage;
+ sal_uInt16 nFkpStartPage;
ePLCFT ePlc;
bool bWrtWW8; // Fuer Writererkennung
- USHORT nMark;
+ sal_uInt16 nMark;
//No copying
WW8_WrPlcPn(const WW8_WrPlcPn&);
@@ -1249,10 +1249,10 @@ private:
public:
WW8_WrPlcPn( WW8Export& rWrt, ePLCFT ePl, WW8_FC nStartFc );
~WW8_WrPlcPn();
- void AppendFkpEntry(WW8_FC nEndFc,short nVarLen = 0,const BYTE* pSprms = 0);
+ void AppendFkpEntry(WW8_FC nEndFc,short nVarLen = 0,const sal_uInt8* pSprms = 0);
void WriteFkps();
void WritePlc();
- BYTE *CopyLastSprms(BYTE &rLen);
+ sal_uInt8 *CopyLastSprms(sal_uInt8 &rLen);
};
// class WW8_WrPlc1 ist erstmal nur fuer Felder
@@ -1260,41 +1260,41 @@ class WW8_WrPlc1
{
private:
SvULongs aPos; // PTRARR von CPs
- BYTE* pData; // Inhalte ( Strukturen )
- ULONG nDataLen;
- USHORT nStructSiz;
+ sal_uInt8* pData; // Inhalte ( Strukturen )
+ sal_uLong nDataLen;
+ sal_uInt16 nStructSiz;
//No copying
WW8_WrPlc1(const WW8_WrPlc1&);
WW8_WrPlc1& operator=(const WW8_WrPlc1&);
protected:
- USHORT Count() const { return aPos.Count(); }
+ sal_uInt16 Count() const { return aPos.Count(); }
void Write( SvStream& rStrm );
WW8_CP Prev() const;
public:
- WW8_WrPlc1( USHORT nStructSz );
+ WW8_WrPlc1( sal_uInt16 nStructSz );
~WW8_WrPlc1();
void Append( WW8_CP nCp, const void* pData );
- void Finish( ULONG nLastCp, ULONG nStartCp );
+ void Finish( sal_uLong nLastCp, sal_uLong nStartCp );
};
// class WW8_WrPlcFld ist fuer Felder
class WW8_WrPlcFld : public WW8_WrPlc1
{
private:
- BYTE nTxtTyp;
- USHORT nResults;
+ sal_uInt8 nTxtTyp;
+ sal_uInt16 nResults;
//No copying
WW8_WrPlcFld(const WW8_WrPlcFld&);
WW8_WrPlcFld& operator=(const WW8_WrPlcFld&);
public:
- WW8_WrPlcFld( USHORT nStructSz, BYTE nTTyp )
+ WW8_WrPlcFld( sal_uInt16 nStructSz, sal_uInt8 nTTyp )
: WW8_WrPlc1( nStructSz ), nTxtTyp( nTTyp ), nResults(0)
{}
bool Write( WW8Export& rWrt );
void ResultAdded() { ++nResults; }
- USHORT ResultCount() const { return nResults; }
+ sal_uInt16 ResultCount() const { return nResults; }
};
class WW8_WrMagicTable : public WW8_WrPlc1
@@ -1305,7 +1305,7 @@ private:
WW8_WrMagicTable& operator=(const WW8_WrMagicTable&);
public:
WW8_WrMagicTable() : WW8_WrPlc1( 4 ) {Append(0,0);}
- void Append( WW8_CP nCp, ULONG nData );
+ void Append( WW8_CP nCp, sal_uLong nData );
bool Write( WW8Export& rWrt );
};
@@ -1313,11 +1313,11 @@ class GraphicDetails
{
public:
sw::Frame maFly; // Umgebende FlyFrms dazu
- ULONG mnPos; // FilePos der Grafiken
- UINT16 mnWid; // Breite der Grafiken
- UINT16 mnHei; // Hoehe der Grafiken
+ sal_uLong mnPos; // FilePos der Grafiken
+ sal_uInt16 mnWid; // Breite der Grafiken
+ sal_uInt16 mnHei; // Hoehe der Grafiken
- GraphicDetails(const sw::Frame &rFly, UINT16 nWid, UINT16 nHei)
+ GraphicDetails(const sw::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei)
: maFly(rFly), mnPos(0), mnWid(nWid), mnHei(nHei)
{}
GraphicDetails& operator=(const GraphicDetails& rOther);
@@ -1340,14 +1340,14 @@ private:
std::vector<GraphicDetails> maDetails;
typedef std::vector<GraphicDetails>::iterator myiter;
- USHORT mnIdx; // Index in File-Positionen
+ sal_uInt16 mnIdx; // Index in File-Positionen
void WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
- UINT16 mm, UINT16 nWidth, UINT16 nHeight,
+ sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight,
const SwAttrSet* pAttrSet = 0);
void WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem);
void WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rNd,
- const sw::Frame &rFly, UINT16 nWidth, UINT16 nHeight);
+ const sw::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight);
//No copying
SwWW8WrGrf(const SwWW8WrGrf&);
@@ -1356,7 +1356,7 @@ public:
SwWW8WrGrf( WW8Export& rW ) : rWrt( rW ), mnIdx( 0 ) {}
void Insert(const sw::Frame &rFly);
void Write();
- ULONG GetFPos()
+ sal_uLong GetFPos()
{ return (mnIdx < maDetails.size()) ? maDetails[mnIdx++].mnPos : 0; }
};
@@ -1377,8 +1377,8 @@ public:
MSWordAttrIter( MSWordExportBase& rExport );
virtual ~MSWordAttrIter();
- virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const = 0;
- virtual const SfxPoolItem& GetItem( USHORT nWhich ) const = 0;
+ virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const = 0;
+ virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const = 0;
};
class MSWord_SdrAttrIter : public MSWordAttrIter
@@ -1389,12 +1389,12 @@ private:
EECharAttribArray aTxtAtrArr;
SvPtrarr aChrTxtAtrArr;
SvUShorts aChrSetArr;
- USHORT nPara;
+ sal_uInt16 nPara;
xub_StrLen nAktSwPos;
xub_StrLen nTmpSwPos; // for HasItem()
rtl_TextEncoding eNdChrSet;
- USHORT nScript;
- BYTE mnTyp;
+ sal_uInt16 nScript;
+ sal_uInt8 mnTyp;
xub_StrLen SearchNext( xub_StrLen nStartPos );
void SetCharSet(const EECharAttrib& rTxtAttr, bool bStart);
@@ -1404,8 +1404,8 @@ private:
MSWord_SdrAttrIter& operator=(const MSWord_SdrAttrIter&);
public:
MSWord_SdrAttrIter( MSWordExportBase& rWr, const EditTextObject& rEditObj,
- BYTE nType );
- void NextPara( USHORT nPar );
+ sal_uInt8 nType );
+ void NextPara( sal_uInt16 nPar );
void OutParaAttr(bool bCharAttr);
void OutEEField(const SfxPoolItem& rHt);
@@ -1414,8 +1414,8 @@ public:
void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); }
void OutAttr( xub_StrLen nSwPos );
- virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const;
- virtual const SfxPoolItem& GetItem( USHORT nWhich ) const;
+ virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const;
+ virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
bool OutAttrWithRange(xub_StrLen nPos);
xub_StrLen WhereNext() const { return nAktSwPos; }
rtl_TextEncoding GetNextCharSet() const;
@@ -1427,26 +1427,26 @@ class MSWordStyles
{
MSWordExportBase& m_rExport;
SwFmt** pFmtA;
- USHORT nUsedSlots;
+ sal_uInt16 nUsedSlots;
/// Create the style table, called from the constructor.
void BuildStylesTable();
/// Get slot number during building the style table.
- USHORT BuildGetSlot( const SwFmt& rFmt );
+ sal_uInt16 BuildGetSlot( const SwFmt& rFmt );
/// Return information about one style.
- void GetStyleData( SwFmt* pFmt, bool& bFmtColl, USHORT& nBase, USHORT& nNext );
+ void GetStyleData( SwFmt* pFmt, bool& bFmtColl, sal_uInt16& nBase, sal_uInt16& nNext );
/// Outputs attributes of one style.
- void WriteProperties( const SwFmt* pFmt, bool bPap, USHORT nPos, bool bInsDefCharSiz );
+ void WriteProperties( const SwFmt* pFmt, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz );
- USHORT GetWWId( const SwFmt& rFmt ) const;
+ sal_uInt16 GetWWId( const SwFmt& rFmt ) const;
void SetStyleDefaults( const SwFmt& rFmt, bool bPap );
/// Outputs one style - called (in a loop) from OutputStylesTable().
- void OutputStyle( SwFmt* pFmt, USHORT nPos );
+ void OutputStyle( SwFmt* pFmt, sal_uInt16 nPos );
// No copying
MSWordStyles( const MSWordStyles& );
@@ -1460,7 +1460,7 @@ public:
void OutputStylesTable();
/// Get id of the style (rFmt).
- USHORT GetSlot( const SwFmt& rFmt ) const;
+ sal_uInt16 GetSlot( const SwFmt& rFmt ) const;
SwFmt* GetSwFmt() { return (*pFmtA); }
};
@@ -1489,8 +1489,8 @@ public:
/// For the output of sections.
struct WW8_PdAttrDesc
{
- BYTE* pData;
- USHORT nLen;
+ sal_uInt8* pData;
+ sal_uInt16 nLen;
WW8_FC nSepxFcPos;
};
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 5d96a74b009d..fcaf4e07a293 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -93,7 +93,7 @@ using namespace nsFieldFlags;
// 5. Die MapModes, die Win nicht kann, umrechnen
// OutGrf() wird fuer jeden GrafNode im Doc gerufen. Es wird ein PicLocFc-Sprm
-// eingefuegt, der statt Adresse ein Magic ULONG enthaelt. Ausserdem wird
+// eingefuegt, der statt Adresse ein Magic sal_uLong enthaelt. Ausserdem wird
// in der Graf-Klasse der GrfNode-Ptr gemerkt ( fuers spaetere Ausgeben der
// Grafiken und Patchen der PicLocFc-Attribute )
@@ -220,15 +220,15 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet,
void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
{
OSL_TRACE("WW8Export::OutputOLENode( const SwOLENode& rOLENode )\n" );
- BYTE *pSpecOLE;
- BYTE *pDataAdr;
+ sal_uInt8 *pSpecOLE;
+ sal_uInt8 *pDataAdr;
short nSize;
- static BYTE aSpecOLE_WW8[] = {
+ static sal_uInt8 aSpecOLE_WW8[] = {
0x03, 0x6a, 0, 0, 0, 0, // sprmCPicLocation
0x0a, 0x08, 1, // sprmCFOLE2
0x56, 0x08, 1 // sprmCFObj
};
- static BYTE aSpecOLE_WW6[] = {
+ static sal_uInt8 aSpecOLE_WW6[] = {
68, 4, 0, 0, 0, 0, // sprmCPicLocation (len is 4)
75, 1, // sprmCFOLE2
118, 1 // sprmCFObj
@@ -262,7 +262,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
WW8OleMap *pMap = new WW8OleMap(nPictureId);
bool bDuplicate = false;
WW8OleMaps &rOleMap = GetOLEMap();
- USHORT nPos;
+ sal_uInt16 nPos;
if ( rOleMap.Seek_Entry(pMap, &nPos) )
{
bDuplicate = true;
@@ -291,7 +291,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
::rtl::OUString aObjInfo( RTL_CONSTASCII_USTRINGPARAM( "\3ObjInfo" ) );
if ( !xOleStg->IsStream( aObjInfo ) )
{
- const BYTE pObjInfoData[] = { 0x40, 0x00, 0x03, 0x00 };
+ const sal_uInt8 pObjInfoData[] = { 0x40, 0x00, 0x03, 0x00 };
SvStorageStreamRef rObjInfoStream = xOleStg->OpenSotStream( aObjInfo );
if ( rObjInfoStream.Is() && !rObjInfoStream->GetError() )
{
@@ -397,8 +397,8 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
WriteChar( (char)1 ); // Grafik-Sonderzeichen in Haupttext einfuegen
- BYTE aArr[ 18 ];
- BYTE* pArr = aArr;
+ sal_uInt8 aArr[ 18 ];
+ sal_uInt8* pArr = aArr;
const SwFrmFmt &rFlyFmt = rFrame.GetFrmFmt();
const RndStdIds eAn = rFlyFmt.GetAttrSet().GetAnchor(false).GetAnchorId();
@@ -429,7 +429,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
Set_UInt16( pArr, NS_sprm::LN_CHpsPos );
else
Set_UInt8( pArr, 101 );
- Set_UInt16( pArr, -((INT16)nHeight));
+ Set_UInt16( pArr, -((sal_Int16)nHeight));
}
}
}
@@ -453,7 +453,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
// Magic variieren, damit verschiedene Grafik-Attribute nicht
// gemerged werden
- static BYTE nAttrMagicIdx = 0;
+ static sal_uInt8 nAttrMagicIdx = 0;
--pArr;
Set_UInt8( pArr, nAttrMagicIdx++ );
pChpPlc->AppendFkpEntry( Strm().Tell(), static_cast< short >(pArr - aArr), aArr );
@@ -469,7 +469,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
{
WriteChar( (char)0x0d ); // umgebenden Rahmen mit CR abschliessen
- static BYTE __READONLY_DATA nSty[2] = { 0, 0 };
+ static sal_uInt8 __READONLY_DATA nSty[2] = { 0, 0 };
pO->Insert( nSty, 2, pO->Count() ); // Style #0
bool bOldGrf = bOutGrf;
bOutGrf = true;
@@ -501,16 +501,16 @@ GraphicDetails& GraphicDetails::operator=(const GraphicDetails &rOther)
void SwWW8WrGrf::Insert(const sw::Frame &rFly)
{
const Size aSize( rFly.GetLayoutSize() );
- const UINT16 nWidth = static_cast< UINT16 >(aSize.Width());
- const UINT16 nHeight = static_cast< UINT16 >(aSize.Height());
+ const sal_uInt16 nWidth = static_cast< sal_uInt16 >(aSize.Width());
+ const sal_uInt16 nHeight = static_cast< sal_uInt16 >(aSize.Height());
maDetails.push_back(GraphicDetails(rFly, nWidth, nHeight));
}
void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
- UINT16 mm, UINT16 nWidth, UINT16 nHeight, const SwAttrSet* pAttrSet)
+ sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight, const SwAttrSet* pAttrSet)
{
- INT16 nXSizeAdd = 0, nYSizeAdd = 0;
- INT16 nCropL = 0, nCropR = 0, nCropT = 0, nCropB = 0;
+ sal_Int16 nXSizeAdd = 0, nYSizeAdd = 0;
+ sal_Int16 nCropL = 0, nCropR = 0, nCropT = 0, nCropB = 0;
// Crop-AttributInhalt in Header schreiben ( falls vorhanden )
const SfxPoolItem* pItem;
@@ -518,21 +518,21 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
== pAttrSet->GetItemState(RES_GRFATR_CROPGRF, false, &pItem)))
{
const SwCropGrf& rCr = *(SwCropGrf*)pItem;
- nCropL = (INT16)rCr.GetLeft();
- nCropR = (INT16)rCr.GetRight();
- nCropT = (INT16)rCr.GetTop();
- nCropB = (INT16)rCr.GetBottom();
- nXSizeAdd = nXSizeAdd - (INT16)( rCr.GetLeft() + rCr.GetRight() );
- nYSizeAdd = nYSizeAdd - (INT16)( rCr.GetTop() + rCr.GetBottom() );
+ nCropL = (sal_Int16)rCr.GetLeft();
+ nCropR = (sal_Int16)rCr.GetRight();
+ nCropT = (sal_Int16)rCr.GetTop();
+ nCropB = (sal_Int16)rCr.GetBottom();
+ nXSizeAdd = nXSizeAdd - (sal_Int16)( rCr.GetLeft() + rCr.GetRight() );
+ nYSizeAdd = nYSizeAdd - (sal_Int16)( rCr.GetTop() + rCr.GetBottom() );
}
Size aGrTwipSz(rFly.GetSize());
bool bWrtWW8 = rWrt.bWrtWW8;
- UINT16 nHdrLen = bWrtWW8 ? 0x44 : 0x3A;
+ sal_uInt16 nHdrLen = bWrtWW8 ? 0x44 : 0x3A;
- BYTE aArr[ 0x44 ] = { 0 };
+ sal_uInt8 aArr[ 0x44 ] = { 0 };
- BYTE* pArr = aArr + 0x2E; //Do borders first
+ sal_uInt8* pArr = aArr + 0x2E; //Do borders first
const SwAttrSet& rAttrSet = rFly.GetFrmFmt().GetAttrSet();
if (SFX_ITEM_ON == rAttrSet.GetItemState(RES_BOX, false, &pItem))
@@ -549,9 +549,9 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
(pSI->GetWidth() != 0);
}
- BYTE aLnArr[4] = { BOX_LINE_TOP, BOX_LINE_LEFT,
+ sal_uInt8 aLnArr[4] = { BOX_LINE_TOP, BOX_LINE_LEFT,
BOX_LINE_BOTTOM, BOX_LINE_RIGHT };
- for( BYTE i = 0; i < 4; ++i )
+ for( sal_uInt8 i = 0; i < 4; ++i )
{
const SvxBorderLine* pLn = pBox->GetLine( aLnArr[ i ] );
WW8_BRC aBrc;
@@ -622,7 +622,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
if( aGrTwipSz.Width() + nXSizeAdd ) // set mx
{
double fVal = nWidth * 1000.0 / (aGrTwipSz.Width() + nXSizeAdd);
- Set_UInt16( pArr, (USHORT)::rtl::math::round(fVal) );
+ Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) );
}
else
pArr += 2;
@@ -630,7 +630,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
if( aGrTwipSz.Height() + nYSizeAdd ) // set my
{
double fVal = nHeight * 1000.0 / (aGrTwipSz.Height() + nYSizeAdd);
- Set_UInt16( pArr, (USHORT)::rtl::math::round(fVal) );
+ Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) );
}
else
pArr += 2;
@@ -644,7 +644,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
}
void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
- const sw::Frame &rFly, UINT16 nWidth, UINT16 nHeight)
+ const sw::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight)
{
if (rGrfNd.IsLinkedFile()) // Linked File
{
@@ -666,11 +666,11 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
// if ( COMPARE_EQUAL == aFiltN.ICompare( "TIF", 3 ) )
// mm = 99; // 99 = TIFF
// else
- UINT16 mm = 94; // 94 = BMP, GIF
+ sal_uInt16 mm = 94; // 94 = BMP, GIF
WritePICFHeader(rStrm, rFly, mm, nWidth, nHeight,
rGrfNd.GetpSwAttrSet());
- rStrm << (BYTE)aFileN.Len(); // Pascal-String schreiben
+ rStrm << (sal_uInt8)aFileN.Len(); // Pascal-String schreiben
SwWW8Writer::WriteString8(rStrm, aFileN, false,
RTL_TEXTENCODING_MS_1252);
}
@@ -724,9 +724,9 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
{
- UINT16 nWidth = rItem.mnWid;
- UINT16 nHeight = rItem.mnHei;
- UINT32 nPos = rStrm.Tell(); // Grafik-Anfang merken
+ sal_uInt16 nWidth = rItem.mnWid;
+ sal_uInt16 nHeight = rItem.mnHei;
+ sal_uInt32 nPos = rStrm.Tell(); // Grafik-Anfang merken
const sw::Frame &rFly = rItem.maFly;
switch (rFly.GetWriterType())
@@ -840,7 +840,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
break;
}
- UINT32 nPos2 = rStrm.Tell(); // Ende merken
+ sal_uInt32 nPos2 = rStrm.Tell(); // Ende merken
rStrm.Seek( nPos );
SVBT32 nLen;
UInt32ToSVBT32( nPos2 - nPos, nLen ); // Grafik-Laenge ausrechnen
@@ -852,7 +852,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
// Grafiken raus und merkt sich die File-Positionen der Grafiken, damit
// beim Schreiben der Attribute die Positionen in die PicLocFc-Sprms
// eingepatcht werden koennen.
-// Das Suchen in den Attributen nach dem Magic ULONG und das Patchen
+// Das Suchen in den Attributen nach dem Magic sal_uLong und das Patchen
// passiert beim Schreiben der Attribute. Die SwWW8WrGrf-Klasse liefert
// hierfuer nur mit GetFPos() sequentiell die Positionen.
void SwWW8WrGrf::Write()
@@ -861,7 +861,7 @@ void SwWW8WrGrf::Write()
myiter aEnd = maDetails.end();
for (myiter aIter = maDetails.begin(); aIter != aEnd; ++aIter)
{
- UINT32 nPos = rStrm.Tell(); // auf 4 Bytes alignen
+ sal_uInt32 nPos = rStrm.Tell(); // auf 4 Bytes alignen
if( nPos & 0x3 )
SwWW8Writer::FillCount( rStrm, 4 - ( nPos & 0x3 ) );
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 6453869ee0d2..4e865bc0ca83 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -166,7 +166,7 @@ using namespace nsSwDocInfoSubType;
using namespace sw::util;
using namespace sw::types;
-bool WW8Export::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
+bool WW8Export::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich )
{
bool bRet = true;
if ( nScript == i18n::ScriptType::ASIAN )
@@ -252,13 +252,13 @@ bool WW8Export::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
// Hilfsroutinen fuer Styles
//------------------------------------------------------------
-void MSWordExportBase::ExportPoolItemsToCHP( sw::PoolItems &rItems, USHORT nScript )
+void MSWordExportBase::ExportPoolItemsToCHP( sw::PoolItems &rItems, sal_uInt16 nScript )
{
sw::cPoolItemIter aEnd = rItems.end();
for ( sw::cPoolItemIter aI = rItems.begin(); aI != aEnd; ++aI )
{
const SfxPoolItem *pItem = aI->second;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if ( ( isCHRATR( nWhich ) || isTXTATR( nWhich ) ) && CollapseScriptsforWordOk( nScript, nWhich ) )
{
AttrOutput().OutputItem( *pItem );
@@ -271,7 +271,7 @@ void MSWordExportBase::ExportPoolItemsToCHP( sw::PoolItems &rItems, USHORT nScri
* - gebe die Attribute aus; ohne Parents!
*/
-void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, USHORT nScript,
+void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, sal_uInt16 nScript,
bool bExportParentItemSet )
{
if( bExportParentItemSet || rSet.Count() )
@@ -318,7 +318,7 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool
for ( sw::cPoolItemIter aI = aItems.begin(); aI != aEnd; ++aI )
{
pItem = aI->second;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if ( nWhich >= RES_PARATR_BEGIN && nWhich < RES_FRMATR_END && nWhich != RES_PARATR_NUMRULE)
AttrOutput().OutputItem( *pItem );
}
@@ -351,8 +351,8 @@ bool MSWordExportBase::CntntContainsChapterField(const SwFmtCntnt &rCntnt) const
{
SwNodeIndex aIdx( *pSttIdx, 1 );
SwNodeIndex aEnd( *pSttIdx->GetNode().EndOfSectionNode() );
- ULONG nStart = aIdx.GetIndex();
- ULONG nEnd = aEnd.GetIndex();
+ sal_uLong nStart = aIdx.GetIndex();
+ sal_uLong nEnd = aEnd.GetIndex();
//If the header/footer contains a chapter field
mycCFIter aIEnd = maChapterFieldLocs.end();
for ( mycCFIter aI = maChapterFieldLocs.begin(); aI != aIEnd; ++aI )
@@ -574,7 +574,7 @@ const SwSectionFmt* MSWordExportBase::GetSectionFormat( const SwNode& rNd ) cons
return pFmt;
}
-ULONG MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const
+sal_uLong MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const
{
const SwFmtLineNumber* pNItem = 0;
if ( pSet )
@@ -599,7 +599,7 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet,
// Aufbauen und die Ausgabe der am PageDesc haengenden Attribute und
// Kopf/Fusszeilen passiert nach dem Haupttext und seinen Attributen.
- ULONG nFcPos = ReplaceCr( msword::PageBreak ); // Page/Section-Break
+ sal_uLong nFcPos = ReplaceCr( msword::PageBreak ); // Page/Section-Break
// tatsaechlich wird hier NOCH NICHTS ausgegeben, sondern
// nur die Merk-Arrays aCps, aSects entsprechend ergaenzt
@@ -607,7 +607,7 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet,
return;
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." );
@@ -621,7 +621,7 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet,
}
}
-void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft )
+void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, sal_uInt16 nAbsLeft )
{
const SvxTabStopItem *pItem =
sw::util::HasItem<SvxTabStopItem>( rSet, RES_PARATR_TABSTOP );
@@ -630,7 +630,7 @@ void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft )
{
// dann muss das fuer die Ausgabe korrigiert werden
SvxTabStopItem aTStop(*pItem);
- for ( USHORT nCnt = 0; nCnt < aTStop.Count(); ++nCnt )
+ for ( sal_uInt16 nCnt = 0; nCnt < aTStop.Count(); ++nCnt )
{
SvxTabStop& rTab = (SvxTabStop&)aTStop[ nCnt ];
if ( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() &&
@@ -648,9 +648,9 @@ void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft )
}
}
-BYTE WW8Export::GetNumId( USHORT eNumType )
+sal_uInt8 WW8Export::GetNumId( sal_uInt16 eNumType )
{
- BYTE nRet = 0;
+ sal_uInt8 nRet = 0;
switch( eNumType )
{
case SVX_NUM_CHARS_UPPER_LETTER:
@@ -669,7 +669,7 @@ BYTE WW8Export::GetNumId( USHORT eNumType )
return nRet;
}
-void WW8AttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt )
+void WW8AttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt )
{
if ( nLvl >= WW8ListManager::nMaxLevel )
nLvl = WW8ListManager::nMaxLevel-1;
@@ -730,7 +730,7 @@ bool WW8Export::DisallowInheritingOutlineNumbering(const SwFmt &rFmt)
if (bWrtWW8)
{
SwWW8Writer::InsUInt16(*pO, NS_sprm::LN_POutLvl);
- pO->Insert(BYTE(9), pO->Count());
+ pO->Insert(sal_uInt8(9), pO->Count());
SwWW8Writer::InsUInt16(*pO, NS_sprm::LN_PIlfo);
SwWW8Writer::InsUInt16(*pO, 0);
@@ -763,9 +763,9 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
//if outline numbered
// if Write StyleDefinition then write the OutlineRule
- const SwNumFmt& rNFmt = pDoc->GetOutlineNumRule()->Get( static_cast<USHORT>( nLvl ) );
+ const SwNumFmt& rNFmt = pDoc->GetOutlineNumRule()->Get( static_cast<sal_uInt16>( nLvl ) );
if ( bStyDef )
- AttrOutput().OutlineNumbering( static_cast< BYTE >( nLvl ), rNFmt, rFmt );
+ AttrOutput().OutlineNumbering( static_cast< sal_uInt8 >( nLvl ), rNFmt, rFmt );
// --> OD 2008-06-03 #i86652#
// if (rNFmt.GetAbsLSpace())
@@ -860,7 +860,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
pOutFmtNode = pOldMod;
}
-bool MSWordExportBase::HasRefToObject( USHORT nTyp, const String* pName, USHORT nSeqNo )
+bool MSWordExportBase::HasRefToObject( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo )
{
const SwTxtNode* pNd;
SwClientIter aIter( *pDoc->GetSysFldType( RES_GETREFFLD ) );
@@ -896,7 +896,7 @@ bool MSWordExportBase::HasRefToObject( USHORT nTyp, const String* pName, USHORT
return false;
}
-String MSWordExportBase::GetBookmarkName( USHORT nTyp, const String* pName, USHORT nSeqNo )
+String MSWordExportBase::GetBookmarkName( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo )
{
String sRet;
switch ( nTyp )
@@ -938,14 +938,14 @@ void WW8AttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript )
if ( m_rWW8Export.bWrtWW8 && bIsRTL )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_CFBiDi );
- m_rWW8Export.pO->Insert( (BYTE)1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)1, m_rWW8Export.pO->Count() );
}
// #i46087# patch from james_clark; complex texts needs the undocumented SPRM CComplexScript with param 0x81.
if ( m_rWW8Export.bWrtWW8 && nScript == i18n::ScriptType::COMPLEX && !bIsRTL )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_CComplexScript );
- m_rWW8Export.pO->Insert( (BYTE)0x81, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x81, m_rWW8Export.pO->Count() );
m_rWW8Export.pDop->bUseThaiLineBreakingRules = true;
}
}
@@ -963,7 +963,7 @@ void WW8AttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe
SVBT16 nSty;
ShortToSVBT16( 0, nSty );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoRow( pTextNodeInfoInner );
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -1001,7 +1001,7 @@ void WW8AttributeOutput::EndRunProperties( const SwRedlineData* pRedlineData )
Redline( pRedlineData );
WW8_WrPlcFld* pCurrentFields = m_rWW8Export.CurrentFieldPlc();
- USHORT nNewFieldResults = pCurrentFields ? pCurrentFields->ResultCount() : 0;
+ sal_uInt16 nNewFieldResults = pCurrentFields ? pCurrentFields->ResultCount() : 0;
bool bExportedFieldResult = ( m_nFieldResults != nNewFieldResults );
@@ -1037,16 +1037,16 @@ void WW8AttributeOutput::OutputFKP()
}
}
-void WW8AttributeOutput::ParagraphStyle( USHORT nStyle )
+void WW8AttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
ASSERT( !m_rWW8Export.pO->Count(), " pO ist am ZeilenEnde nicht leer" );
SVBT16 nSty;
ShortToSVBT16( nStyle, nSty );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
}
-void WW8AttributeOutput::OutputWW8Attribute( BYTE nId, bool bVal )
+void WW8AttributeOutput::OutputWW8Attribute( sal_uInt8 nId, bool bVal )
{
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( 8 == nId ? NS_sprm::LN_CFDStrike : NS_sprm::LN_CFBold + nId );
@@ -1058,7 +1058,7 @@ void WW8AttributeOutput::OutputWW8Attribute( BYTE nId, bool bVal )
m_rWW8Export.pO->Insert( bVal ? 1 : 0, m_rWW8Export.pO->Count() );
}
-void WW8AttributeOutput::OutputWW8AttributeCTL( BYTE nId, bool bVal )
+void WW8AttributeOutput::OutputWW8AttributeCTL( sal_uInt8 nId, bool bVal )
{
ASSERT( nId <= 1, "out of range" );
if ( !m_rWW8Export.bWrtWW8 || nId > 1 )
@@ -1070,7 +1070,7 @@ void WW8AttributeOutput::OutputWW8AttributeCTL( BYTE nId, bool bVal )
void WW8AttributeOutput::CharFont( const SvxFontItem& rFont )
{
- USHORT nFontID = m_rWW8Export.GetId( rFont );
+ sal_uInt16 nFontID = m_rWW8Export.GetId( rFont );
if ( m_rWW8Export.bWrtWW8 )
{
@@ -1202,7 +1202,7 @@ void WW8AttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossed )
void WW8AttributeOutput::CharCaseMap( const SvxCaseMapItem& rCaseMap )
{
- USHORT eSt = rCaseMap.GetValue();
+ sal_uInt16 eSt = rCaseMap.GetValue();
switch ( eSt )
{
case SVX_CASEMAP_KAPITAELCHEN:
@@ -1244,7 +1244,7 @@ void WW8AttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
// WW97 - additional parameters:
// 6 = thick, 7 = dash, 8 = dot(not used)
// 9 = dotdash 10 = dotdotdash, 11 = wave
- BYTE b = 0;
+ sal_uInt8 b = 0;
switch ( rUnderline.GetLineStyle() )
{
case UNDERLINE_SINGLE:
@@ -1309,7 +1309,7 @@ void WW8AttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( m_rWW8Export.bWrtWW8 )
{
switch ( rLanguage.Which() )
@@ -1333,7 +1333,7 @@ void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
if ( m_rWW8Export.bWrtWW8 ) // use sprmCRgLid0 rather than sprmCLid
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (BYTE)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( rLanguage.GetLanguage() );
// unknown as to exactly why, but this seems to shadow the other
@@ -1354,7 +1354,7 @@ void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
void WW8AttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
{
- BYTE b = 0xFF;
+ sal_uInt8 b = 0xFF;
short nEsc = rEscapement.GetEsc(), nProp = rEscapement.GetProp();
if ( !nEsc )
{
@@ -1406,7 +1406,7 @@ void WW8AttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
void WW8AttributeOutput::CharFontSize( const SvxFontHeightItem& rHeight )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( m_rWW8Export.bWrtWW8 )
{
switch ( rHeight.Which() )
@@ -1428,9 +1428,9 @@ void WW8AttributeOutput::CharFontSize( const SvxFontHeightItem& rHeight )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (BYTE)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (UINT16)(( rHeight.GetHeight() + 5 ) / 10 ) );
+ m_rWW8Export.InsUInt16( (sal_uInt16)(( rHeight.GetHeight() + 5 ) / 10 ) );
}
}
@@ -1447,7 +1447,7 @@ void WW8AttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
{
if ( m_rWW8Export.bWrtWW8 )
{
- USHORT nId;
+ sal_uInt16 nId;
switch ( rRelief.GetValue() )
{
case RELIEF_EMBOSSED: nId = NS_sprm::LN_CFEmboss; break;
@@ -1458,15 +1458,15 @@ void WW8AttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
if( nId )
{
m_rWW8Export.InsUInt16( nId );
- m_rWW8Export.pO->Insert( (BYTE)0x81, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x81, m_rWW8Export.pO->Count() );
}
else
{
// switch both flags off
m_rWW8Export.InsUInt16( NS_sprm::LN_CFEmboss );
- m_rWW8Export.pO->Insert( (BYTE)0x0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x0, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( NS_sprm::LN_CFImprint );
- m_rWW8Export.pO->Insert( (BYTE)0x0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x0, m_rWW8Export.pO->Count() );
}
}
}
@@ -1484,11 +1484,11 @@ void WW8AttributeOutput::CharRotate( const SvxCharRotateItem& rRotate )
// here corrupts the table, hence !m_rWW8Export.bIsInTable
m_rWW8Export.InsUInt16( NS_sprm::LN_CEastAsianLayout );
- m_rWW8Export.pO->Insert( (BYTE)0x06, m_rWW8Export.pO->Count() ); //len 6
- m_rWW8Export.pO->Insert( (BYTE)0x01, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x06, m_rWW8Export.pO->Count() ); //len 6
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x01, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( rRotate.IsFitToLine() ? 1 : 0 );
- static const BYTE aZeroArr[ 3 ] = { 0, 0, 0 };
+ static const sal_uInt8 aZeroArr[ 3 ] = { 0, 0, 0 };
m_rWW8Export.pO->Insert( aZeroArr, 3, m_rWW8Export.pO->Count() );
}
}
@@ -1497,7 +1497,7 @@ void WW8AttributeOutput::CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisM
{
if ( m_rWW8Export.bWrtWW8 )
{
- BYTE nVal;
+ sal_uInt8 nVal;
switch ( rEmphasisMark.GetValue() )
{
case EMPHASISMARK_NONE: nVal = 0; break;
@@ -1518,9 +1518,9 @@ void WW8AttributeOutput::CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisM
// Gibt es keine direkte Entsprechung, dann wird versucht, eine moeglichst
// aehnliche WW-Farbe zu finden.
// return: 5-Bit-Wert ( 0..16 )
-BYTE WW8Export::TransCol( const Color& rCol )
+sal_uInt8 WW8Export::TransCol( const Color& rCol )
{
- BYTE nCol = 0; // ->Auto
+ sal_uInt8 nCol = 0; // ->Auto
switch( rCol.GetColor() )
{
case COL_BLACK: nCol = 1; break;
@@ -1552,10 +1552,10 @@ BYTE WW8Export::TransCol( const Color& rCol )
COL_RED, COL_BROWN, COL_GRAY, COL_LIGHTGRAY
};
- for( USHORT i = 0; i < 16; ++i )
+ for( sal_uInt16 i = 0; i < 16; ++i )
pBmpPal->operator[]( i ) = Color( aColArr[ i ] );
}
- nCol = static_cast< BYTE >(pBmpPal->GetBestIndex( rCol ) + 1);
+ nCol = static_cast< sal_uInt8 >(pBmpPal->GetBestIndex( rCol ) + 1);
break;
}
return nCol;
@@ -1594,7 +1594,7 @@ void WW8AttributeOutput::CharColor( const SvxColorItem& rColor )
else
m_rWW8Export.pO->Insert( 98, m_rWW8Export.pO->Count() );
- BYTE nColor = m_rWW8Export.TransCol( rColor.GetValue() );
+ sal_uInt8 nColor = m_rWW8Export.TransCol( rColor.GetValue() );
m_rWW8Export.pO->Insert( nColor, m_rWW8Export.pO->Count() );
if ( m_rWW8Export.bWrtWW8 && nColor )
@@ -1629,7 +1629,7 @@ void WW8AttributeOutput::TextINetFormat( const SwFmtINetFmt& rINet )
{
if ( rINet.GetValue().Len() )
{
- USHORT nId;
+ sal_uInt16 nId;
const String& rStr = rINet.GetINetFmt();
if ( rStr.Len() )
nId = rINet.GetINetFmtId();
@@ -1654,7 +1654,7 @@ void WW8AttributeOutput::TextINetFormat( const SwFmtINetFmt& rINet )
// - it contains the name of the link target, which is a bookmark.
// --> OD 2008-08-14 #158418# - add optional parameter <bIncludeEmptyPicLocation>
// It is needed to write an empty picture location for page number field separators
-static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
+static void InsertSpecialChar( WW8Export& rWrt, sal_uInt8 c,
String* pLinkStr = 0L,
bool bIncludeEmptyPicLocation = false )
{
@@ -1685,15 +1685,15 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
// write hyperlink data to data stream
SvStream& rStrm = *rWrt.pDataStrm;
// position of hyperlink data
- const UINT32 nLinkPosInDataStrm = rStrm.Tell();
+ const sal_uInt32 nLinkPosInDataStrm = rStrm.Tell();
// write empty header
- const UINT16 nEmptyHdrLen = 0x44;
- BYTE aEmptyHeader[ nEmptyHdrLen ] = { 0 };
+ const sal_uInt16 nEmptyHdrLen = 0x44;
+ sal_uInt8 aEmptyHeader[ nEmptyHdrLen ] = { 0 };
aEmptyHeader[ 4 ] = 0x44;
rStrm.Write( aEmptyHeader, nEmptyHdrLen );
// writer fixed header
- const UINT16 nFixHdrLen = 0x19;
- BYTE aFixHeader[ nFixHdrLen ] =
+ const sal_uInt16 nFixHdrLen = 0x19;
+ sal_uInt8 aFixHeader[ nFixHdrLen ] =
{
0x08, 0xD0, 0xC9, 0xEA, 0x79, 0xF9, 0xBA, 0xCE,
0x11, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9,
@@ -1702,13 +1702,13 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
};
rStrm.Write( aFixHeader, nFixHdrLen );
// write reference string including length+1
- UINT32 nStrLen( pLinkStr->Len() + 1 );
+ sal_uInt32 nStrLen( pLinkStr->Len() + 1 );
SwWW8Writer::WriteLong( rStrm, nStrLen );
SwWW8Writer::WriteString16( rStrm, *(pLinkStr), false );
// write additional two NULL Bytes
SwWW8Writer::WriteLong( rStrm, 0 );
// write length of hyperlink data
- const UINT32 nCurrPos = rStrm.Tell();
+ const sal_uInt32 nCurrPos = rStrm.Tell();
rStrm.Seek( nLinkPosInDataStrm );
SVBT32 nLen;
UInt32ToSVBT32( nCurrPos - nLinkPosInDataStrm, nLen );
@@ -1717,11 +1717,11 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
// write attributes of hyperlink character 0x01
SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CFFldVanish );
- aItems.Insert( (BYTE)0x81, aItems.Count() );
+ aItems.Insert( (sal_uInt8)0x81, aItems.Count() );
SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CPicLocation );
SwWW8Writer::InsUInt32( aItems, nLinkPosInDataStrm );
SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CFData );
- aItems.Insert( (BYTE)0x01, aItems.Count() );
+ aItems.Insert( (sal_uInt8)0x01, aItems.Count() );
}
//Technically we should probably Remove all attribs
@@ -1787,7 +1787,7 @@ WW8_WrPlcFld* WW8Export::CurrentFieldPlc() const
}
void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode )
+ const String& rFldCmd, sal_uInt8 nMode )
{
bool bUnicode = IsUnicode();
WW8_WrPlcFld* pFldP = CurrentFieldPlc();
@@ -1797,11 +1797,11 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
// <--
if (WRITEFIELD_START & nMode)
{
- BYTE aFld13[2] = { 0x13, 0x00 }; // will change
+ sal_uInt8 aFld13[2] = { 0x13, 0x00 }; // will change
//#i3958#, Needed to make this field work correctly in Word 2000
if (eFldType == ww::eSHAPE)
aFld13[0] |= 0x80;
- aFld13[1] = static_cast< BYTE >(eFldType); // Typ nachtragen
+ aFld13[1] = static_cast< sal_uInt8 >(eFldType); // Typ nachtragen
pFldP->Append( Fc2Cp( Strm().Tell() ), aFld13 );
// --> OD 2008-08-14 #158418#
InsertSpecialChar( *this, 0x13, 0, bIncludeEmptyPicLocation );
@@ -1838,7 +1838,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
{
// retrieve reference destionation - the name of the bookmark
String aLinkStr;
- const USHORT nSubType = pFld->GetSubType();
+ const sal_uInt16 nSubType = pFld->GetSubType();
const SwGetRefField& rRFld = *(static_cast<const SwGetRefField*>(pFld));
if ( nSubType == REF_SETREFATTR ||
nSubType == REF_BOOKMARK )
@@ -1861,7 +1861,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
}
if (WRITEFIELD_CMD_END & nMode)
{
- static const BYTE aFld14[2] = { 0x14, 0xff };
+ static const sal_uInt8 aFld14[2] = { 0x14, 0xff };
pFldP->Append( Fc2Cp( Strm().Tell() ), aFld14 );
pFldP->ResultAdded();
// --> OD 2008-08-14 #158418#
@@ -1890,8 +1890,8 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
if (pFld->GetTyp()->Which() == RES_INPUTFLD &&
eFldType == ww::eFORMTEXT)
{
- BYTE aArr[12];
- BYTE *pArr = aArr;
+ sal_uInt8 aArr[12];
+ sal_uInt8 *pArr = aArr;
if ( bWrtWW8 )
{
@@ -1919,14 +1919,14 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
}
if (WRITEFIELD_CLOSE & nMode)
{
- BYTE aFld15[2] = { 0x15, 0x80 };
+ sal_uInt8 aFld15[2] = { 0x15, 0x80 };
if (pFld)
{
if (pFld->GetTyp()->Which() == RES_INPUTFLD &&
eFldType == ww::eFORMTEXT)
{
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
if (nSubType == REF_SEQUENCEFLD)
aFld15[0] |= (0x4 << 5);
@@ -1958,10 +1958,10 @@ void WW8Export::EndCommentOutput(const String& rName)
WRITEFIELD_CLOSE);
}
-USHORT MSWordExportBase::GetId( const SwTOXType& rTOXType )
+sal_uInt16 MSWordExportBase::GetId( const SwTOXType& rTOXType )
{
void* p = (void*)&rTOXType;
- USHORT nRet = aTOXArr.GetPos( p );
+ sal_uInt16 nRet = aTOXArr.GetPos( p );
if( USHRT_MAX == nRet )
aTOXArr.Insert( p, nRet = aTOXArr.Count() );
return nRet;
@@ -1971,7 +1971,7 @@ USHORT MSWordExportBase::GetId( const SwTOXType& rTOXType )
// 2 - TabStop before PageNum,
// 3 - Text before PageNum - rTxt hold the text
// 4 - no Text and no TabStop before PageNum
-int lcl_CheckForm( const SwForm& rForm, BYTE nLvl, String& rText )
+int lcl_CheckForm( const SwForm& rForm, sal_uInt8 nLvl, String& rText )
{
int nRet = 4;
rText.Erase();
@@ -2021,10 +2021,10 @@ int lcl_CheckForm( const SwForm& rForm, BYTE nLvl, String& rText )
return nRet;
}
-bool lcl_IsHyperlinked(const SwForm& rForm, USHORT nTOXLvl)
+bool lcl_IsHyperlinked(const SwForm& rForm, sal_uInt16 nTOXLvl)
{
bool bRes = false;
- for (USHORT nI = 1; nI < nTOXLvl; ++nI)
+ for (sal_uInt16 nI = 1; nI < nTOXLvl; ++nI)
{
// #i21237#
SwFormTokens aPattern = rForm.GetPattern(nI);
@@ -2076,7 +2076,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
{
String aFillTxt;
- for (BYTE n = 1; n <= 3; ++n)
+ for (sal_uInt8 n = 1; n <= 3; ++n)
{
String aTxt;
int nRet = ::lcl_CheckForm(pTOX->GetTOXForm(), n, aTxt);
@@ -2127,7 +2127,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
sStr = FieldString(eCode);
String sTOption;
- USHORT n, nTOXLvl = pTOX->GetLevel();
+ sal_uInt16 n, nTOXLvl = pTOX->GetLevel();
if( !nTOXLvl )
++nTOXLvl;
@@ -2150,7 +2150,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
// // Search over all the outline styles used and figure out
// // what is the minimum outline level we need to display
// // (ignoring headline styles 1-9)
-// //BYTE nLvl = 0, nMinLvl = 0; //#outline level, removed by zhaojianwei
+// //sal_uInt8 nLvl = 0, nMinLvl = 0; //#outline level, removed by zhaojianwei
// int nLvl = 0, nMinLvl = 0; //<-end,add by zhaojianwei
// const SwTxtFmtColls& rColls = *GetExport().pDoc->GetTxtFmtColls();
// const SwTxtFmtColl* pColl;
@@ -2158,9 +2158,9 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
// {
// pColl = rColls[ --n ];
// //nLvl = pColl->GetOutlineLevel(); //#outline level,zhaojianwei
-// //USHORT nPoolId = pColl->GetPoolFmtId();
+// //sal_uInt16 nPoolId = pColl->GetPoolFmtId();
// //if( MAXLEVEL > nLvl && nMinLvl < nLvl && //<-end, ->add by zhaojianwei
-// USHORT nPoolId = pColl->GetPoolFmtId();
+// sal_uInt16 nPoolId = pColl->GetPoolFmtId();
// if( pColl->IsAssignedToListLevelOfOutlineStyle() &&
// nMinLvl < (nLvl = pColl->GetAssignedOutlineStyleLevel()) && //<-end,zhaojianwei
// ( RES_POOLCOLL_HEADLINE1 > nPoolId ||
@@ -2170,7 +2170,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
// if(!nMinLvl)
// nLvl = nTOXLvl;
// else
-// nLvl = nMinLvl < nTOXLvl ? nMinLvl : (BYTE)nTOXLvl;
+// nLvl = nMinLvl < nTOXLvl ? nMinLvl : (sal_uInt8)nTOXLvl;
// nMinLvl = nLvl;
// }
// }
@@ -2242,12 +2242,12 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
// what is the minimum outline level (if any) filled by a
// non-standard style for that level, i.e. ignore headline
// styles 1-9 and find the lowest valid outline level
- BYTE nPosOfLowestNonStandardLvl = MAXLEVEL;
+ sal_uInt8 nPosOfLowestNonStandardLvl = MAXLEVEL;
const SwTxtFmtColls& rColls = *GetExport().pDoc->GetTxtFmtColls();
for( n = rColls.Count(); n; )
{
const SwTxtFmtColl* pColl = rColls[ --n ];
- USHORT nPoolId = pColl->GetPoolFmtId();
+ sal_uInt16 nPoolId = pColl->GetPoolFmtId();
if (
//Is a Non-Standard Outline Style
(RES_POOLCOLL_HEADLINE1 > nPoolId || RES_POOLCOLL_HEADLINE9 < nPoolId) &&
@@ -2257,11 +2257,11 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
(pColl->GetAssignedOutlineStyleLevel() < nPosOfLowestNonStandardLvl)
)
{
- nPosOfLowestNonStandardLvl = ::sal::static_int_cast<BYTE>(pColl->GetAssignedOutlineStyleLevel());
+ nPosOfLowestNonStandardLvl = ::sal::static_int_cast<sal_uInt8>(pColl->GetAssignedOutlineStyleLevel());
}
}
- BYTE nMaxMSAutoEvaluate = nPosOfLowestNonStandardLvl < nTOXLvl ? nPosOfLowestNonStandardLvl : (BYTE)nTOXLvl;
+ sal_uInt8 nMaxMSAutoEvaluate = nPosOfLowestNonStandardLvl < nTOXLvl ? nPosOfLowestNonStandardLvl : (sal_uInt8)nTOXLvl;
//output \o 1-X where X is the highest normal outline style to be included in the toc
if ( nMaxMSAutoEvaluate )
@@ -2285,7 +2285,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
const SwTxtFmtColl* pColl = rColls[ --n ];
if (!pColl->IsAssignedToListLevelOfOutlineStyle())
continue;
- BYTE nTestLvl = ::sal::static_int_cast<BYTE>(pColl->GetAssignedOutlineStyleLevel());
+ sal_uInt8 nTestLvl = ::sal::static_int_cast<sal_uInt8>(pColl->GetAssignedOutlineStyleLevel());
if (nTestLvl < nTOXLvl && nTestLvl >= nMaxMSAutoEvaluate)
{
if( sTOption.Len() )
@@ -2328,24 +2328,24 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
{
String aFillTxt;
- BYTE nNoPgStt = MAXLEVEL, nNoPgEnd = MAXLEVEL;
+ sal_uInt8 nNoPgStt = MAXLEVEL, nNoPgEnd = MAXLEVEL;
bool bFirstFillTxt = true, bOnlyText = true;
for( n = 0; n < nTOXLvl; ++n )
{
String aTxt;
int nRet = ::lcl_CheckForm( pTOX->GetTOXForm(),
- static_cast< BYTE >(n+1), aTxt );
+ static_cast< sal_uInt8 >(n+1), aTxt );
if( 1 == nRet )
{
bOnlyText = false;
if( MAXLEVEL == nNoPgStt )
- nNoPgStt = static_cast< BYTE >(n+1);
+ nNoPgStt = static_cast< sal_uInt8 >(n+1);
}
else
{
if( MAXLEVEL != nNoPgStt &&
MAXLEVEL == nNoPgEnd )
- nNoPgEnd = BYTE(n);
+ nNoPgEnd = sal_uInt8(n);
bOnlyText = bOnlyText && 3 == nRet;
if( 3 == nRet || 4 == nRet )
@@ -2417,11 +2417,11 @@ bool MSWordExportBase::GetNumberFmt(const SwField& rFld, String& rStr)
// Returns a date or time format string by using the US NfKeywordTable
bool bHasFmt = false;
SvNumberFormatter* pNFmtr = pDoc->GetNumberFormatter();
- UINT32 nFmtIdx = rFld.GetFormat();
+ sal_uInt32 nFmtIdx = rFld.GetFormat();
const SvNumberformat* pNumFmt = pNFmtr->GetEntry( nFmtIdx );
if( pNumFmt )
{
- //USHORT nLng = rFld.GetLanguage();
+ //sal_uInt16 nLng = rFld.GetLanguage();
LocaleDataWrapper aLocDat( pNFmtr->GetServiceManager(),
MsLangId::convertLanguageToLocale( LANGUAGE_ENGLISH_US ) );
@@ -2479,8 +2479,8 @@ void AttributeOutputBase::GetNumberPara( String& rStr, const SwField& rFld )
void WW8Export::WritePostItBegin( WW8Bytes* pOut )
{
- BYTE aArr[ 3 ];
- BYTE* pArr = aArr;
+ sal_uInt8 aArr[ 3 ];
+ sal_uInt8* pArr = aArr;
// sprmCFSpec true
if( bWrtWW8 )
@@ -2493,7 +2493,7 @@ void WW8Export::WritePostItBegin( WW8Bytes* pOut )
WriteChar( 0x05 ); // Annotation reference
if( pOut )
- pOut->Insert( aArr, static_cast< USHORT >(pArr - aArr), pOut->Count() );
+ pOut->Insert( aArr, static_cast< sal_uInt16 >(pArr - aArr), pOut->Count() );
else
pChpPlc->AppendFkpEntry( Strm().Tell(), static_cast< short >(pArr - aArr), aArr );
}
@@ -2516,7 +2516,7 @@ void WW8AttributeOutput::HiddenField( const SwField& rFld )
if (m_rWW8Export.IsUnicode())
{
SwWW8Writer::WriteString16(m_rWW8Export.Strm(), sExpand, false);
- static BYTE aArr[] =
+ static sal_uInt8 aArr[] =
{
0x3C, 0x08, 0x1
};
@@ -2526,7 +2526,7 @@ void WW8AttributeOutput::HiddenField( const SwField& rFld )
{
SwWW8Writer::WriteString8(m_rWW8Export.Strm(), sExpand, false,
RTL_TEXTENCODING_MS_1252);
- static BYTE aArr[] =
+ static sal_uInt8 aArr[] =
{
92, 0x1
};
@@ -2539,7 +2539,7 @@ void WW8AttributeOutput::SetField( const SwField& rFld, ww::eField eType, const
const SwSetExpField* pSet=(const SwSetExpField*)(&rFld);
const String &rVar = pSet->GetPar2();
- ULONG nFrom = m_rWW8Export.Fc2Cp(m_rWW8Export.Strm().Tell());
+ sal_uLong nFrom = m_rWW8Export.Fc2Cp(m_rWW8Export.Strm().Tell());
GetExport().OutputField(&rFld, eType, rCmd, WRITEFIELD_START |
WRITEFIELD_CMD_START | WRITEFIELD_CMD_END);
@@ -2630,7 +2630,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
const SwField* pFld = rField.GetFld();
String sStr; // fuer optionale Parameter
bool bWriteExpand = false;
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
switch (pFld->GetTyp()->Which())
{
@@ -2973,7 +2973,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
asian or western text based up on the first character and use the
font size of that script as our default.
*/
- USHORT nScript;
+ sal_uInt16 nScript;
if( pBreakIt->GetBreakIter().is() )
nScript = pBreakIt->GetBreakIter()->getScriptType( pFld->GetPar1(), 0);
else
@@ -3083,7 +3083,7 @@ void WW8AttributeOutput::ParaHyphenZone( const SvxHyphenZoneItem& rHyphenZone )
void WW8AttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( m_rWW8Export.bWrtWW8 )
switch ( rScriptSpace.Which() )
{
@@ -3097,7 +3097,7 @@ void WW8AttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (BYTE)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
m_rWW8Export.pO->Insert( rScriptSpace.GetValue() ? 1 : 0,
m_rWW8Export.pO->Count() );
@@ -3124,7 +3124,7 @@ void WW8AttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign )
m_rWW8Export.InsUInt16( NS_sprm::LN_PWAlignFont );
- INT16 nVal = rAlign.GetValue();
+ sal_Int16 nVal = rAlign.GetValue();
switch ( nVal )
{
case SvxParaVertAlignItem::BASELINE:
@@ -3164,7 +3164,7 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pOutArr )
{
if( bWrtWW8 )
{
- static const BYTE aSpec[] =
+ static const sal_uInt8 aSpec[] =
{
0x03, 0x6a, 0, 0, 0, 0, // sprmCObjLocation
0x55, 0x08, 1 // sprmCFSpec
@@ -3174,7 +3174,7 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pOutArr )
}
else
{
- static BYTE const aSpec[] =
+ static sal_uInt8 const aSpec[] =
{
117, 1, // sprmCFSpec
68, 4, 0, 0, 0, 0 // sprmCObjLocation
@@ -3251,7 +3251,7 @@ static bool lcl_IsAtTxtEnd(const SwFmtFtn& rFtn)
bool bRet = true;
if( rFtn.GetTxtFtn() )
{
- USHORT nWh = static_cast< USHORT >(rFtn.IsEndNote() ? RES_END_AT_TXTEND
+ sal_uInt16 nWh = static_cast< sal_uInt16 >(rFtn.IsEndNote() ? RES_END_AT_TXTEND
: RES_FTN_AT_TXTEND);
const SwSectionNode* pSectNd = rFtn.GetTxtFtn()->GetTxtNode().
FindSectionNode();
@@ -3269,7 +3269,7 @@ static bool lcl_IsAtTxtEnd(const SwFmtFtn& rFtn)
void AttributeOutputBase::TextFootnote( const SwFmtFtn& rFtn )
{
- USHORT nTyp;
+ sal_uInt16 nTyp;
if ( rFtn.IsEndNote() )
{
nTyp = REF_ENDNOTE;
@@ -3337,8 +3337,8 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
return;
m_rWW8Export.InsUInt16( NS_sprm::LN_CEastAsianLayout );
- m_rWW8Export.pO->Insert( (BYTE)0x06, m_rWW8Export.pO->Count() ); //len 6
- m_rWW8Export.pO->Insert( (BYTE)0x02, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x06, m_rWW8Export.pO->Count() ); //len 6
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x02, m_rWW8Export.pO->Count() );
sal_Unicode cStart = rTwoLines.GetStartBracket();
sal_Unicode cEnd = rTwoLines.GetEndBracket();
@@ -3357,7 +3357,7 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
ill effects.
*/
- USHORT nType;
+ sal_uInt16 nType;
if (!cStart && !cEnd)
nType = 0;
else if ((cStart == '{') || (cEnd == '}'))
@@ -3369,7 +3369,7 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
else
nType = 1;
m_rWW8Export.InsUInt16( nType );
- static const BYTE aZeroArr[ 3 ] = { 0, 0, 0 };
+ static const sal_uInt8 aZeroArr[ 3 ] = { 0, 0, 0 };
m_rWW8Export.pO->Insert( aZeroArr, 3, m_rWW8Export.pO->Count() );
}
}
@@ -3377,8 +3377,8 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
{
const SwTxtNode* pTxtNd = 0;
- USHORT nNumId;
- BYTE nLvl = 0;
+ sal_uInt16 nNumId;
+ sal_uInt8 nLvl = 0;
if ( rNumRule.GetValue().Len() )
{
const SwNumRule* pRule = GetExport().pDoc->FindNumRulePtr(
@@ -3394,11 +3394,11 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
if( pTxtNd->IsCountedInList())
{
- nLvl = static_cast< BYTE >(pTxtNd->GetActualListLevel());
+ nLvl = static_cast< sal_uInt8 >(pTxtNd->GetActualListLevel());
if ( pTxtNd->IsListRestart() )
{
- USHORT nStartWith = static_cast< USHORT >( pTxtNd->GetActualListStartValue() );
+ sal_uInt16 nStartWith = static_cast< sal_uInt16 >( pTxtNd->GetActualListStartValue() );
nNumId = GetExport().DuplicateNumRule( pRule, nLvl, nStartWith );
if ( USHRT_MAX != nNumId )
++nNumId;
@@ -3417,7 +3417,7 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
{
const SwTxtFmtColl* pC = (SwTxtFmtColl*)GetExport().pOutFmtNode;
if ( pC && pC->IsAssignedToListLevelOfOutlineStyle() )
- nLvl = static_cast< BYTE >( pC->GetAssignedOutlineStyleLevel() ); //<-end,zhaojianwei
+ nLvl = static_cast< sal_uInt8 >( pC->GetAssignedOutlineStyleLevel() ); //<-end,zhaojianwei
}
}
}
@@ -3442,9 +3442,9 @@ void WW8AttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
{
// write sprmPIlvl and sprmPIlfo
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_PIlvl );
- m_rWW8Export.pO->Insert( ::sal::static_int_cast<BYTE>(nLvl), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( ::sal::static_int_cast<sal_uInt8>(nLvl), m_rWW8Export.pO->Count() );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_PIlfo );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, ::sal::static_int_cast<UINT16>(nNumId) );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, ::sal::static_int_cast<sal_uInt16>(nNumId) );
}
else if ( pTxtNd && m_rWW8Export.Out_SwNum( pTxtNd ) ) // NumRules
m_rWW8Export.pSepx->SetNum( pTxtNd );
@@ -3467,7 +3467,7 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
m_rWW8Export.InsUInt16( NS_sprm::LN_PDxaWidth );
else
m_rWW8Export.pO->Insert( 28, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)rSize.GetWidth() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rSize.GetWidth() );
}
if ( rSize.GetHeight() )
@@ -3478,12 +3478,12 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
else
m_rWW8Export.pO->Insert( 45, m_rWW8Export.pO->Count() );
- USHORT nH = 0;
+ sal_uInt16 nH = 0;
switch ( rSize.GetHeightSizeType() )
{
case ATT_VAR_SIZE: break;
- case ATT_FIX_SIZE: nH = (USHORT)rSize.GetHeight() & 0x7fff; break;
- default: nH = (USHORT)rSize.GetHeight() | 0x8000; break;
+ case ATT_FIX_SIZE: nH = (sal_uInt16)rSize.GetHeight() & 0x7fff; break;
+ default: nH = (sal_uInt16)rSize.GetHeight() | 0x8000; break;
}
m_rWW8Export.InsUInt16( nH );
}
@@ -3525,18 +3525,18 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
// direkt nach Schreiben des CR gerufen werden.
// Rueckgabe: FilePos des ersetzten CRs + 1 oder 0 fuer nicht ersetzt
-ULONG WW8Export::ReplaceCr( BYTE nChar )
+sal_uLong WW8Export::ReplaceCr( sal_uInt8 nChar )
{
// Bug #49917#
ASSERT( nChar, "gegen 0 ersetzt bringt WW97/95 zum Absturz" );
bool bReplaced = false;
SvStream& rStrm = Strm();
- ULONG nRetPos = 0, nPos = rStrm.Tell();
- BYTE nBCode=0;
- UINT16 nUCode=0;
+ sal_uLong nRetPos = 0, nPos = rStrm.Tell();
+ sal_uInt8 nBCode=0;
+ sal_uInt16 nUCode=0;
//If there is at least two characters already output
- if (nPos - (IsUnicode() ? 2 : 1) >= ULONG(pFib->fcMin))
+ if (nPos - (IsUnicode() ? 2 : 1) >= sal_uLong(pFib->fcMin))
{
rStrm.SeekRel(IsUnicode() ? -2 : -1);
if (IsUnicode())
@@ -3550,7 +3550,7 @@ ULONG WW8Export::ReplaceCr( BYTE nChar )
if (nUCode == 0x0d) // CR ?
{
if ((nChar == 0x0c) &&
- (nPos - (IsUnicode() ? 4 : 2) >= ULONG(pFib->fcMin)))
+ (nPos - (IsUnicode() ? 4 : 2) >= sal_uLong(pFib->fcMin)))
{
rStrm.SeekRel( IsUnicode() ? -4 : -2 );
if (IsUnicode())
@@ -3599,7 +3599,7 @@ ULONG WW8Export::ReplaceCr( BYTE nChar )
#ifndef DBG_UTIL
else
{
- ASSERT( nRetPos || nPos == (ULONG)pFib->fcMin,
+ ASSERT( nRetPos || nPos == (sal_uLong)pFib->fcMin,
"WW8_ReplaceCr an falscher FilePos gerufen" );
}
#endif
@@ -3609,9 +3609,9 @@ ULONG WW8Export::ReplaceCr( BYTE nChar )
void WW8AttributeOutput::TableRowEnd(sal_uInt32 nDepth)
{
if ( nDepth == 1 )
- m_rWW8Export.WriteChar( (BYTE)0x07 );
+ m_rWW8Export.WriteChar( (sal_uInt8)0x07 );
else if ( nDepth > 1 )
- m_rWW8Export.WriteChar( (BYTE)0x0d );
+ m_rWW8Export.WriteChar( (sal_uInt8)0x0d );
//Technically in a word document this is a different value for a row ends
//that are not row ends directly after a cell with a graphic. But it
@@ -3663,7 +3663,7 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak )
}
else if ( !GetExport().mpParentFrame )
{
- BYTE nC = 0;
+ sal_uInt8 nC = 0;
bool bBefore = false;
// --> OD 2007-05-29 #i76300#
// Note: Can only be <true>, if <bBefore> equals <false>.
@@ -3733,7 +3733,7 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak )
}
}
-void WW8AttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* /*pSectionInfo*/ )
+void WW8AttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* /*pSectionInfo*/ )
{
m_rWW8Export.ReplaceCr( nC );
}
@@ -3742,7 +3742,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
{
if ( m_rWW8Export.bOutPageDescs && m_rWW8Export.bWrtWW8 )
{
- UINT16 nGridType = 0;
+ sal_uInt16 nGridType = 0;
switch ( rGrid.GetGridType() )
{
default:
@@ -3763,7 +3763,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
m_rWW8Export.InsUInt16( NS_sprm::LN_SClm );
m_rWW8Export.InsUInt16( nGridType );
- UINT16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
+ sal_uInt16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
m_rWW8Export.InsUInt16( NS_sprm::LN_SDyaLinePitch );
m_rWW8Export.InsUInt16( nHeight );
@@ -3778,22 +3778,22 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
(*pSwFmt, RES_CHRATR_CJK_FONTSIZE).GetHeight();
}
- INT32 nCharWidth = rGrid.GetBaseWidth() - nPageCharSize;
- INT32 nFraction = 0;
+ sal_Int32 nCharWidth = rGrid.GetBaseWidth() - nPageCharSize;
+ sal_Int32 nFraction = 0;
nFraction = nCharWidth % 20;
if ( nCharWidth < 0 )
nFraction = 20 + nFraction;
nFraction = ( nFraction * 0xFFF ) / 20;
nFraction = ( nFraction & 0x00000FFF );
- INT32 nMain = 0;
+ sal_Int32 nMain = 0;
nMain = nCharWidth / 20;
if ( nCharWidth < 0 )
nMain -= 1;
nMain = nMain * 0x1000;
nMain = ( nMain & 0xFFFFF000 );
- UINT32 nCharSpace = nFraction + nMain;
+ sal_uInt32 nCharSpace = nFraction + nMain;
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxtCharSpace );
m_rWW8Export.InsUInt32( nCharSpace );
}
@@ -3803,7 +3803,7 @@ void WW8AttributeOutput::FormatPaperBin( const SvxPaperBinItem& rPaperBin )
{
if ( m_rWW8Export.bOutPageDescs )
{
- USHORT nVal;
+ sal_uInt16 nVal;
switch ( rPaperBin.GetValue() )
{
case 0: nVal = 15; break; // Automatically select
@@ -3836,11 +3836,11 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
else
m_rWW8Export.pO->Insert( 49, m_rWW8Export.pO->Count() );
// Mittelwert nehmen, da WW nur 1 Wert kennt
- m_rWW8Export.InsUInt16( (USHORT) ( ( rLR.GetLeft() + rLR.GetRight() ) / 2 ) );
+ m_rWW8Export.InsUInt16( (sal_uInt16) ( ( rLR.GetLeft() + rLR.GetRight() ) / 2 ) );
}
else if ( m_rWW8Export.bOutPageDescs ) // PageDescs
{
- USHORT nLDist, nRDist;
+ sal_uInt16 nLDist, nRDist;
const SfxPoolItem* pItem = m_rWW8Export.HasItem( RES_BOX );
if ( pItem )
{
@@ -3849,8 +3849,8 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
}
else
nLDist = nRDist = 0;
- nLDist = nLDist + (USHORT)rLR.GetLeft();
- nRDist = nRDist + (USHORT)rLR.GetRight();
+ nLDist = nLDist + (sal_uInt16)rLR.GetLeft();
+ nRDist = nRDist + (sal_uInt16)rLR.GetRight();
// sprmSDxaLeft
if( m_rWW8Export.bWrtWW8 )
@@ -3872,24 +3872,24 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
if( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( 0x845E ); //asian version ?
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetTxtLeft() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetTxtLeft() );
}
else
{
m_rWW8Export.pO->Insert( 17, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetTxtLeft() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetTxtLeft() );
}
// sprmPDxaRight
if( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( 0x845D ); //asian version ?
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetRight() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetRight() );
}
else
{
m_rWW8Export.pO->Insert( 16, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetRight() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetRight() );
}
// sprmPDxaLeft1
@@ -3918,7 +3918,7 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL )
else
m_rWW8Export.pO->Insert( 48, m_rWW8Export.pO->Count() );
// Mittelwert nehmen, da WW nur 1 Wert kennt
- m_rWW8Export.InsUInt16( (USHORT) ( ( rUL.GetUpper() + rUL.GetLower() ) / 2 ) );
+ m_rWW8Export.InsUInt16( (sal_uInt16) ( ( rUL.GetUpper() + rUL.GetLower() ) / 2 ) );
}
else if ( m_rWW8Export.bOutPageDescs ) // Page-UL
{
@@ -4080,7 +4080,7 @@ void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
if ( m_rWW8Export.bOutFlyFrmAttrs )
{
- BYTE nP = 0;
+ sal_uInt8 nP = 0;
switch ( rAnchor.GetAnchorId() )
{
case FLY_AT_PAGE:
@@ -4137,14 +4137,14 @@ void WW8AttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
}
WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
- USHORT nDist, bool bShadow)
+ sal_uInt16 nDist, bool bShadow)
{
// M.M. This function writes out border lines to the word format similar to
// what SwRTFWriter::OutRTFBorder does in the RTF filter Eventually it
// would be nice if all this functionality was in the one place
WW8_BRC aBrc;
- UINT16 nWidth = rLine.GetInWidth() + rLine.GetOutWidth();
- BYTE brcType = 0, nColCode = 0;
+ sal_uInt16 nWidth = rLine.GetInWidth() + rLine.GetOutWidth();
+ sal_uInt8 brcType = 0, nColCode = 0;
if( nWidth ) // Linie ?
{
@@ -4185,17 +4185,17 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
}
// BRC.dxpSpace
- USHORT nLDist = nDist;
+ sal_uInt16 nLDist = nDist;
nLDist /= 20; // Masseinheit : pt
if( nLDist > 0x1f )
nLDist = 0x1f;
if( bWrtWW8 )
{
- aBrc.aBits1[0] = BYTE(nWidth);
+ aBrc.aBits1[0] = sal_uInt8(nWidth);
aBrc.aBits1[1] = brcType;
aBrc.aBits2[0] = nColCode;
- aBrc.aBits2[1] = BYTE(nLDist);
+ aBrc.aBits2[1] = sal_uInt8(nLDist);
// fShadow, keine weiteren Einstellungen im WW moeglich
if( bShadow )
@@ -4203,7 +4203,7 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
}
else
{
- USHORT aBits = nWidth + ( brcType << 3 );
+ sal_uInt16 aBits = nWidth + ( brcType << 3 );
aBits |= (nColCode & 0x1f) << 6;
aBits |= nLDist << 11;
// fShadow, keine weiteren Einstellungen im WW moeglich
@@ -4220,7 +4220,7 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
// Wenn nSprmNo == 0, dann wird der Opcode nicht ausgegeben.
// bShadow darf bei Tabellenzellen *nicht* gesetzt sein !
void WW8Export::Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
- USHORT nDist, sal_uInt16 nSprmNo, bool bShadow)
+ sal_uInt16 nDist, sal_uInt16 nSprmNo, bool bShadow)
{
ASSERT( ( nSprmNo == 0 ) ||
( nSprmNo >= 38 && nSprmNo <= 41 ) ||
@@ -4246,7 +4246,7 @@ void WW8Export::Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
{
// WW95-SprmIds
if ( nSprmNo != 0 )
- rO.Insert( (BYTE)( nSprmNo ), rO.Count() );
+ rO.Insert( (sal_uInt8)( nSprmNo ), rO.Count() );
rO.Insert( aBrc.aBits1, 2, rO.Count() );
}
}
@@ -4258,7 +4258,7 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow)
if ( bOutPageDescs && !bWrtWW8 )
return; // no page ouline in WW6
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -4275,8 +4275,8 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow)
38, 39, 40, 41
};
- const USHORT* pBrd = aBorders;
- for( USHORT i = 0; i < 4; ++i, ++pBrd )
+ const sal_uInt16* pBrd = aBorders;
+ for( sal_uInt16 i = 0; i < 4; ++i, ++pBrd )
{
const SvxBorderLine* pLn = rBox.GetLine( *pBrd );
@@ -4301,13 +4301,13 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow)
void WW8Export::Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem * pBox )
{
// moeglich und vielleicht besser waere 0xffff
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
static const SvxBorderLine aBorderLine;
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
{
const SvxBorderLine* pLn;
@@ -4351,7 +4351,7 @@ SwTwips WW8Export::CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const
return nPageSize;
}
-void WW8AttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize )
+void WW8AttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize )
{
// CColumns
if ( m_rWW8Export.bWrtWW8 )
@@ -4388,7 +4388,7 @@ void WW8AttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol
// FIXME what's the use of this code
if ( bEven )
{
- USHORT nSpace = rColumns[0]->GetRight() + rColumns[1]->GetLeft();
+ sal_uInt16 nSpace = rColumns[0]->GetRight() + rColumns[1]->GetLeft();
for ( n = 2; n < nCols; n++ )
{
short nDiff = nSpace - ( rColumns[n - 1]->GetRight()
@@ -4405,17 +4405,17 @@ void WW8AttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol
if ( !bEven )
{
- for ( USHORT n = 0; n < nCols; ++n )
+ for ( sal_uInt16 n = 0; n < nCols; ++n )
{
//sprmSDxaColWidth
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxaColWidth );
else
m_rWW8Export.pO->Insert( 136, m_rWW8Export.pO->Count( ) );
- m_rWW8Export.pO->Insert( ( BYTE ) n, m_rWW8Export.pO->Count( ) );
+ m_rWW8Export.pO->Insert( ( sal_uInt8 ) n, m_rWW8Export.pO->Count( ) );
m_rWW8Export.InsUInt16( rCol.
CalcPrtColWidth( n,
- ( USHORT ) nPageSize ) );
+ ( sal_uInt16 ) nPageSize ) );
if ( n + 1 != nCols )
{
@@ -4425,7 +4425,7 @@ void WW8AttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol
else
m_rWW8Export.pO->Insert( 137,
m_rWW8Export.pO->Count( ) );
- m_rWW8Export.pO->Insert( ( BYTE ) n,
+ m_rWW8Export.pO->Insert( ( sal_uInt8 ) n,
m_rWW8Export.pO->Count( ) );
m_rWW8Export.InsUInt16( rColumns[n]->GetRight( ) +
rColumns[n + 1]->GetLeft( ) );
@@ -4438,7 +4438,7 @@ void AttributeOutputBase::FormatColumns( const SwFmtCol& rCol )
{
const SwColumns& rColumns = rCol.GetColumns();
- USHORT nCols = rColumns.Count();
+ sal_uInt16 nCols = rColumns.Count();
if ( 1 < nCols && !GetExport( ).bOutFlyFrmAttrs )
{
// dann besorge mal die Seitenbreite ohne Raender !!
@@ -4480,12 +4480,12 @@ void AttributeOutputBase::FormatColumns( const SwFmtCol& rCol )
// Nachsehen, ob alle Spalten gleich sind
bool bEven = true;
- USHORT n;
- USHORT nColWidth = rCol.CalcPrtColWidth( 0, (USHORT)nPageSize );
+ sal_uInt16 n;
+ sal_uInt16 nColWidth = rCol.CalcPrtColWidth( 0, (sal_uInt16)nPageSize );
for ( n = 1; n < nCols; n++ )
{
short nDiff = nColWidth -
- rCol.CalcPrtColWidth( n, (USHORT)nPageSize );
+ rCol.CalcPrtColWidth( n, (sal_uInt16)nPageSize );
if ( nDiff > 10 || nDiff < -10 ) // Toleranz: 10 tw
{
@@ -4603,8 +4603,8 @@ void AttributeOutputBase::ParaLineSpacing( const SvxLineSpacingItem& rSpacing )
void WW8AttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
{
// sprmPJc
- BYTE nAdj = 255;
- BYTE nAdjBiDi = 255;
+ sal_uInt8 nAdj = 255;
+ sal_uInt8 nAdjBiDi = 255;
switch ( rAdjust.GetAdjust() )
{
case SVX_ADJUST_LEFT:
@@ -4681,7 +4681,7 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir
if ( !m_rWW8Export.bWrtWW8 ) //8+ only
return;
- UINT16 nTextFlow=0;
+ sal_uInt16 nTextFlow=0;
bool bBiDi = false;
short nDir = rDirection.GetValue();
@@ -4770,9 +4770,9 @@ void WW8AttributeOutput::ParaWidows( const SvxWidowsItem& rWidows )
class SwWW8WrTabu
{
- BYTE* pDel; // DelArray
- BYTE* pAddPos; // AddPos-Array
- BYTE* pAddTyp; // AddTyp-Array
+ sal_uInt8* pDel; // DelArray
+ sal_uInt8* pAddPos; // AddPos-Array
+ sal_uInt8* pAddTyp; // AddTyp-Array
sal_uInt16 nAdd; // so viele Tabs kommen hinzu
sal_uInt16 nDel; // so viele Tabs fallen weg
public:
@@ -4787,9 +4787,9 @@ public:
SwWW8WrTabu::SwWW8WrTabu(sal_uInt16 nDelMax, sal_uInt16 nAddMax)
: nAdd(0), nDel(0)
{
- pDel = nDelMax ? new BYTE[nDelMax * 2] : 0;
- pAddPos = new BYTE[nAddMax * 2];
- pAddTyp = new BYTE[nAddMax];
+ pDel = nDelMax ? new sal_uInt8[nDelMax * 2] : 0;
+ pAddPos = new sal_uInt8[nAddMax * 2];
+ pAddTyp = new sal_uInt8[nAddMax];
}
SwWW8WrTabu::~SwWW8WrTabu()
@@ -4807,7 +4807,7 @@ void SwWW8WrTabu::Add(const SvxTabStop & rTS, long nAdjustment)
pAddPos + (nAdd * 2));
// Tab-Typ eintragen
- BYTE nPara = 0;
+ sal_uInt8 nPara = 0;
switch (rTS.GetAdjustment())
{
case SVX_TAB_ADJUST_RIGHT:
@@ -4896,7 +4896,7 @@ static void ParaTabStopAdd( WW8Export& rWrt, const SvxTabStopItem& rTStops,
{
SwWW8WrTabu aTab( 0, rTStops.Count());
- for( USHORT n = 0; n < rTStops.Count(); n++ )
+ for( sal_uInt16 n = 0; n < rTStops.Count(); n++ )
{
const SvxTabStop& rTS = rTStops[n];
// Def-Tabs ignorieren
@@ -4922,8 +4922,8 @@ static void ParaTabStopDelAdd( WW8Export& rWrt, const SvxTabStopItem& rTStyle,
{
SwWW8WrTabu aTab(rTStyle.Count(), rTNew.Count());
- USHORT nO = 0; // rTStyle Index
- USHORT nN = 0; // rTNew Index
+ sal_uInt16 nO = 0; // rTStyle Index
+ sal_uInt16 nN = 0; // rTNew Index
do {
const SvxTabStop* pTO;
@@ -5267,7 +5267,7 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt )
}
}
-void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, BOOL bDeep, BOOL bTestForDefault )
+void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, sal_Bool bDeep, sal_Bool bTestForDefault )
{
// based on OutputItemSet() from wrt_fn.cxx
@@ -5298,7 +5298,7 @@ void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, BOOL bDeep
else
{
SfxWhichIter aIter( *pSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
if ( SFX_ITEM_SET == pSet->GetItemState( nWhich, bDeep, &pItem ) &&
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index b9d9ba38c246..e8013f9d450d 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -90,7 +90,7 @@ public:
/// Output redlining.
virtual void Redline( const SwRedlineData* pRedline );
- 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 FKP (Formatted disK Page) - necessary for binary formats only.
/// FIXME having it in AttributeOutputBase is probably a hack, it
@@ -98,7 +98,7 @@ public:
virtual void OutputFKP();
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle );
+ virtual void ParagraphStyle( sal_uInt16 nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
@@ -132,26 +132,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 nWwIdi, USHORT nId );
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwIdi, 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.
@@ -159,7 +159,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();
@@ -173,7 +173,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();
@@ -187,24 +187,24 @@ 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 );
/// 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 );
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule );
/// 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,
@@ -382,7 +382,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& );
@@ -414,24 +414,24 @@ protected:
///
/// We have to remember these positions between the StartStyle() and
/// EndStyle().
- USHORT nPOPosStdLen1, nPOPosStdLen2;
+ sal_uInt16 nPOPosStdLen1, nPOPosStdLen2;
/// For output of styles.
///
/// We have to remember this position between StartStyleProperties() and
/// EndStyleProperties().
- USHORT m_nStyleStartSize, m_nStyleLenPos;
+ sal_uInt16 m_nStyleStartSize, m_nStyleLenPos;
/// For output of styles.
///
/// Used between StartStyles() and EndStyles().
- ULONG m_nStyAnzPos;
+ sal_uLong m_nStyAnzPos;
/// For output of run properties.
///
/// We have to remember the number of field results, and do not export end
/// of the field results if we were forced to split text.
- USHORT m_nFieldResults;
+ sal_uInt16 m_nFieldResults;
public:
WW8AttributeOutput( WW8Export &rWW8Export ) : AttributeOutputBase(), m_rWW8Export( rWW8Export ) {}
@@ -442,10 +442,10 @@ public:
protected:
/// Output the bold etc. attributes
- void OutputWW8Attribute( BYTE nId, bool bVal );
+ void OutputWW8Attribute( sal_uInt8 nId, bool bVal );
/// Output the bold etc. attributes, the Complex Text Layout version
- void OutputWW8AttributeCTL( BYTE nId, bool bVal );
+ void OutputWW8AttributeCTL( sal_uInt8 nId, bool bVal );
};
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index 7d8bc56272b7..dc3b987cd30c 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -45,7 +45,7 @@
#include "ww8par.hxx"
-WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, BYTE nVersion,
+WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, sal_uInt8 nVersion,
SvStorage *pStg)
: pGlossary(0), rStrm(refStrm), xStg(pStg), nStrings(0)
{
@@ -69,7 +69,7 @@ WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, BYTE nVersion,
bool WW8Glossary::HasBareGraphicEnd(SwDoc *pDoc,SwNodeIndex &rIdx)
{
bool bRet=false;
- for( USHORT nCnt = pDoc->GetSpzFrmFmts()->Count(); nCnt; )
+ for( sal_uInt16 nCnt = pDoc->GetSpzFrmFmts()->Count(); nCnt; )
{
SwFrmFmt* pFrmFmt = (*pDoc->GetSpzFrmFmts())[ --nCnt ];
if ( RES_FLYFRMFMT != pFrmFmt->Which() &&
@@ -120,7 +120,7 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
{
SwTxtFmtColl* pColl = pD->GetTxtCollFromPool
(RES_POOLCOLL_STANDARD, false);
- USHORT nGlosEntry = 0;
+ sal_uInt16 nGlosEntry = 0;
SwCntntNode* pCNd = 0;
do {
SwPaM aPam( aStart );
@@ -154,7 +154,7 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
// sttbfglsystyle list that this entry belongs to. Unused at the
// moment
const ww::bytes &rData = rExtra[nGlosEntry];
- USHORT n = SVBT16ToShort( &(rData[2]) );
+ sal_uInt16 n = SVBT16ToShort( &(rData[2]) );
if(n != 0xFFFF)
{
rBlocks.ClearDoc();
@@ -164,9 +164,9 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
// Need to check make sure the shortcut is not already being used
xub_StrLen nStart = 0;
- USHORT nCurPos = rBlocks.GetIndex( sShortcut );
+ sal_uInt16 nCurPos = rBlocks.GetIndex( sShortcut );
xub_StrLen nLen = sShortcut.Len();
- while( (USHORT)-1 != nCurPos )
+ while( (sal_uInt16)-1 != nCurPos )
{
sShortcut.Erase( nLen ) +=
String::CreateFromInt32( ++nStart ); // add an Number to it
@@ -217,7 +217,7 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile )
rStrm->Seek(0);
- if ( 0 != (nStrings = static_cast< USHORT >(aStrings.size())))
+ if ( 0 != (nStrings = static_cast< sal_uInt16 >(aStrings.size())))
{
SfxObjectShellRef xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL));
if (xDocSh->DoInitNew(0))
@@ -256,11 +256,11 @@ bool WW8GlossaryFib::IsGlossaryFib()
return fGlsy;
}
-UINT32 WW8GlossaryFib::FindGlossaryFibOffset(SvStream & /* rTableStrm */,
+sal_uInt32 WW8GlossaryFib::FindGlossaryFibOffset(SvStream & /* rTableStrm */,
SvStream & /* rStrm */,
const WW8Fib &rFib)
{
- UINT32 nGlossaryFibOffset = 0;
+ sal_uInt32 nGlossaryFibOffset = 0;
if ( rFib.fDot ) // its a template
{
if ( rFib.pnNext )
diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx
index dd77ef68b94f..72770557c110 100644
--- a/sw/source/filter/ww8/ww8glsy.hxx
+++ b/sw/source/filter/ww8/ww8glsy.hxx
@@ -43,12 +43,12 @@ class SwNodeIndex;
class WW8GlossaryFib : public WW8Fib
{
public:
- WW8GlossaryFib( SvStream& rStrm, BYTE nWantedVersion ,
+ WW8GlossaryFib( SvStream& rStrm, sal_uInt8 nWantedVersion ,
SvStream& rTableStrm, const WW8Fib &rFib) : WW8Fib(rStrm,
nWantedVersion,FindGlossaryFibOffset(rTableStrm,rStrm,rFib)) {}
bool IsGlossaryFib();
private:
- UINT32 FindGlossaryFibOffset(SvStream &rTableStrm,SvStream &rStrm,
+ sal_uInt32 FindGlossaryFibOffset(SvStream &rTableStrm,SvStream &rStrm,
const WW8Fib &rFib);
};
@@ -65,18 +65,18 @@ private:
class WW8Glossary
{
public:
- WW8Glossary( SvStorageStreamRef &refStrm, BYTE nVersion, SvStorage *pStg=0);
+ WW8Glossary( SvStorageStreamRef &refStrm, sal_uInt8 nVersion, SvStorage *pStg=0);
bool Load( SwTextBlocks &rBlocks, bool bSaveRelFile );
~WW8Glossary() { delete pGlossary; }
WW8GlossaryFib *GetFib() { return pGlossary; }
- USHORT GetNoStrings() const { return nStrings; }
+ sal_uInt16 GetNoStrings() const { return nStrings; }
private:
WW8GlossaryFib *pGlossary;
SvStorageStreamRef xTableStream;
SvStorageStreamRef &rStrm;
SvStorageRef xStg;
- USHORT nStrings;
+ sal_uInt16 nStrings;
bool MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, bool bSaveRelFile,
const ::std::vector<String>& rStrings,
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index ccfdf086c21c..ab78cbbc59b1 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -154,7 +154,7 @@ Color WW8TransCol(SVBT32 nWC)
if (nWC[3] & 0x1)
{
//Special colour gray
- BYTE u = (BYTE)( (ULONG)( 200 - nWC[0] ) * 256 / 200 );
+ sal_uInt8 u = (sal_uInt8)( (sal_uLong)( 200 - nWC[0] ) * 256 / 200 );
return Color(u, u, u);
}
@@ -223,7 +223,7 @@ static void SetStdAttr( SfxItemSet& rSet, WW8_DP_LINETYPE& rL,
if( SVBT16ToShort( rL.lnps ) >= 1
&& SVBT16ToShort(rL.lnps ) <= 4 ){ // LinienStil
rSet.Put( XLineStyleItem( XLINE_DASH ) );
- INT16 nLen = SVBT16ToShort( rL.lnpw );
+ sal_Int16 nLen = SVBT16ToShort( rL.lnpw );
XDash aD( XDASH_RECT, 1, 2 * nLen, 1, 5 * nLen, 5 * nLen );
switch( SVBT16ToShort( rL.lnps ) ){
case 1: aD.SetDots( 0 ); // Dash
@@ -255,7 +255,7 @@ static void SetStdAttr( SfxItemSet& rSet, WW8_DP_LINETYPE& rL,
static void SetFill( SfxItemSet& rSet, WW8_DP_FILL& rFill )
{
- static BYTE nPatA[] =
+ static sal_uInt8 nPatA[] =
{
0, 0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80,
90, 50, 50, 50, 50, 50, 50, 33, 33, 33, 33, 33, 33
@@ -276,12 +276,12 @@ static void SetFill( SfxItemSet& rSet, WW8_DP_FILL& rFill )
{ // Brush -> Farbmischung
Color aB( WW8TransCol( rFill.dlpcBg ) );
Color aF( WW8TransCol( rFill.dlpcFg ) );
- aB.SetRed( (BYTE)( ( (ULONG)aF.GetRed() * nPatA[nPat]
- + (ULONG)aB.GetRed() * ( 100 - nPatA[nPat] ) ) / 100 ) );
- aB.SetGreen( (BYTE)( ( (ULONG)aF.GetGreen() * nPatA[nPat]
- + (ULONG)aB.GetGreen() * ( 100 - nPatA[nPat] ) ) / 100 ) );
- aB.SetBlue( (BYTE)( ( (ULONG)aF.GetBlue() * nPatA[nPat]
- + (ULONG)aB.GetBlue() * ( 100 - nPatA[nPat] ) ) / 100 ) );
+ aB.SetRed( (sal_uInt8)( ( (sal_uLong)aF.GetRed() * nPatA[nPat]
+ + (sal_uLong)aB.GetRed() * ( 100 - nPatA[nPat] ) ) / 100 ) );
+ aB.SetGreen( (sal_uInt8)( ( (sal_uLong)aF.GetGreen() * nPatA[nPat]
+ + (sal_uLong)aB.GetGreen() * ( 100 - nPatA[nPat] ) ) / 100 ) );
+ aB.SetBlue( (sal_uInt8)( ( (sal_uLong)aF.GetBlue() * nPatA[nPat]
+ + (sal_uLong)aB.GetBlue() * ( 100 - nPatA[nPat] ) ) / 100 ) );
rSet.Put( XFillColorItem( aEmptyStr, aB ) );
}
}
@@ -290,7 +290,7 @@ static void SetFill( SfxItemSet& rSet, WW8_DP_FILL& rFill )
static void SetLineEndAttr( SfxItemSet& rSet, WW8_DP_LINEEND& rLe,
WW8_DP_LINETYPE& rLt )
{
- UINT16 aSB = SVBT16ToShort( rLe.aStartBits );
+ sal_uInt16 aSB = SVBT16ToShort( rLe.aStartBits );
if( aSB & 0x3 )
{
::basegfx::B2DPolygon aPolygon;
@@ -299,14 +299,14 @@ static void SetLineEndAttr( SfxItemSet& rSet, WW8_DP_LINEEND& rLe,
aPolygon.append(::basegfx::B2DPoint(200.0, 330.0));
aPolygon.setClosed(true);
rSet.Put( XLineEndItem( aEmptyStr, ::basegfx::B2DPolyPolygon(aPolygon) ) );
- USHORT nSiz = SVBT16ToShort( rLt.lnpw )
+ sal_uInt16 nSiz = SVBT16ToShort( rLt.lnpw )
* ( ( aSB >> 2 & 0x3 ) + ( aSB >> 4 & 0x3 ) );
if( nSiz < 220 ) nSiz = 220;
rSet.Put(XLineEndWidthItem(nSiz));
rSet.Put(XLineEndCenterItem(false));
}
- UINT16 aEB = SVBT16ToShort( rLe.aEndBits );
+ sal_uInt16 aEB = SVBT16ToShort( rLe.aEndBits );
if( aEB & 0x3 ){
::basegfx::B2DPolygon aPolygon;
aPolygon.append(::basegfx::B2DPoint(0.0, 330.0));
@@ -314,7 +314,7 @@ static void SetLineEndAttr( SfxItemSet& rSet, WW8_DP_LINEEND& rLe,
aPolygon.append(::basegfx::B2DPoint(200.0, 330.0));
aPolygon.setClosed(true);
rSet.Put( XLineStartItem( aEmptyStr, ::basegfx::B2DPolyPolygon(aPolygon) ) );
- USHORT nSiz = SVBT16ToShort( rLt.lnpw )
+ sal_uInt16 nSiz = SVBT16ToShort( rLt.lnpw )
* ( ( aEB >> 2 & 0x3 ) + ( aEB >> 4 & 0x3 ) );
if( nSiz < 220 ) nSiz = 220;
rSet.Put(XLineStartWidthItem(nSiz));
@@ -336,13 +336,13 @@ SdrObject* SwWW8ImplReader::ReadLine( WW8_DPHEAD* pHd, const WW8_DO* pDo,
Point& rP0 = aP[0];
Point& rP1 = aP[1];
- rP0.X() = (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2;
- rP0.Y() = (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2;
+ rP0.X() = (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2;
+ rP0.Y() = (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2;
rP1 = rP0;
- rP0.X() += (INT16)SVBT16ToShort( aLine.xaStart );
- rP0.Y() += (INT16)SVBT16ToShort( aLine.yaStart );
- rP1.X() += (INT16)SVBT16ToShort( aLine.xaEnd );
- rP1.Y() += (INT16)SVBT16ToShort( aLine.yaEnd );
+ rP0.X() += (sal_Int16)SVBT16ToShort( aLine.xaStart );
+ rP0.Y() += (sal_Int16)SVBT16ToShort( aLine.yaStart );
+ rP1.X() += (sal_Int16)SVBT16ToShort( aLine.xaEnd );
+ rP1.Y() += (sal_Int16)SVBT16ToShort( aLine.yaEnd );
}
::basegfx::B2DPolygon aPolygon;
@@ -364,11 +364,11 @@ SdrObject* SwWW8ImplReader::ReadRect( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aRect, sizeof( aRect ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa );
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya );
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya );
SdrObject* pObj = new SdrRectObj( Rectangle( aP0, aP1 ) );
@@ -386,11 +386,11 @@ SdrObject* SwWW8ImplReader::ReadElipse( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aElipse, sizeof( aElipse ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa );
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya );
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya );
SdrObject* pObj = new SdrCircObj( OBJ_CIRC, Rectangle( aP0, aP1 ) );
@@ -408,22 +408,22 @@ SdrObject* SwWW8ImplReader::ReadArc( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aArc, sizeof( aArc ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa ) * 2;
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya ) * 2;
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa ) * 2;
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya ) * 2;
short nA[] = { 2, 3, 1, 0 };
short nW = nA[ ( ( SVBT8ToByte( aArc.fLeft ) & 1 ) << 1 )
+ ( SVBT8ToByte( aArc.fUp ) & 1 ) ];
if( !SVBT8ToByte( aArc.fLeft ) ){
- aP0.Y() -= (INT16)SVBT16ToShort( pHd->dya );
- aP1.Y() -= (INT16)SVBT16ToShort( pHd->dya );
+ aP0.Y() -= (sal_Int16)SVBT16ToShort( pHd->dya );
+ aP1.Y() -= (sal_Int16)SVBT16ToShort( pHd->dya );
}
if( SVBT8ToByte( aArc.fUp ) ){
- aP0.X() -= (INT16)SVBT16ToShort( pHd->dxa );
- aP1.X() -= (INT16)SVBT16ToShort( pHd->dxa );
+ aP0.X() -= (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.X() -= (sal_Int16)SVBT16ToShort( pHd->dxa );
}
SdrObject* pObj = new SdrCircObj( OBJ_SECT, Rectangle( aP0, aP1 ),
@@ -443,18 +443,18 @@ SdrObject* SwWW8ImplReader::ReadPolyLine( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aPoly, sizeof( aPoly ), pHd, pDo, rSet ) )
return 0;
- UINT16 nCount = SVBT16ToShort( aPoly.aBits1 ) >> 1 & 0x7fff;
+ sal_uInt16 nCount = SVBT16ToShort( aPoly.aBits1 ) >> 1 & 0x7fff;
SVBT16 *pP = new SVBT16[nCount * 2];
pStrm->Read( pP, nCount * 4 ); // Punkte einlesen
Polygon aP( nCount );
Point aPt;
- USHORT i;
+ sal_uInt16 i;
for( i=0; i<nCount; i++ ){
aPt.X() = SVBT16ToShort( pP[i << 1] ) + nDrawXOfs2
- + (INT16)SVBT16ToShort( pHd->xa );
+ + (sal_Int16)SVBT16ToShort( pHd->xa );
aPt.Y() = SVBT16ToShort( pP[( i << 1 ) + 1] ) + nDrawYOfs2
- + (INT16)SVBT16ToShort( pHd->ya );
+ + (sal_Int16)SVBT16ToShort( pHd->ya );
aP[i] = aPt;
}
delete[] pP;
@@ -468,9 +468,9 @@ SdrObject* SwWW8ImplReader::ReadPolyLine( WW8_DPHEAD* pHd, const WW8_DO* pDo,
ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
{
- USHORT nPCnt = mpDrawEditEngine->GetParagraphCount();
- USHORT nSP = 0;
- USHORT nEP = 0;
+ sal_uInt16 nPCnt = mpDrawEditEngine->GetParagraphCount();
+ sal_uInt16 nSP = 0;
+ sal_uInt16 nEP = 0;
while( (nSP < nPCnt)
&& (nCpStart >= mpDrawEditEngine->GetTextLen( nSP ) + 1) )
{
@@ -485,7 +485,7 @@ ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
nCpEnd -= mpDrawEditEngine->GetTextLen( nEP ) + 1;
nEP++;
}
- return ESelection( nSP, (USHORT)nCpStart, nEP, (USHORT)nCpEnd );
+ return ESelection( nSP, (sal_uInt16)nCpStart, nEP, (sal_uInt16)nCpEnd );
}
// InsertTxbxStyAttrs() setzt die Style-Attribute in den uebergebenen ItemSet.
@@ -498,13 +498,13 @@ ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
// ignoriert.
// Es werden hierbei sowohl Para- wie auch Zeichen-Attribute in den
// ItemSet gestopft.
-void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl )
+void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, sal_uInt16 nColl )
{
SwWW8StyInf * pStyInf = GetStyle(nColl);
if( pStyInf != NULL && pStyInf->pFmt && pStyInf->bColl )
{
const SfxPoolItem* pItem;
- for( USHORT i = POOLATTR_BEGIN; i < POOLATTR_END; i++ )
+ for( sal_uInt16 i = POOLATTR_BEGIN; i < POOLATTR_END; i++ )
{
//If we are set in the source and not set in the destination
//then add it in.
@@ -512,8 +512,8 @@ void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl )
i, true, &pItem ) )
{
SfxItemPool *pEditPool = rS.GetPool();
- USHORT nWhich = i;
- USHORT nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
+ sal_uInt16 nWhich = i;
+ sal_uInt16 nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
if (
nSlotId && nWhich != nSlotId &&
0 != (nWhich = pEditPool->GetWhich(nSlotId)) &&
@@ -534,7 +534,7 @@ void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl )
static void lcl_StripFields(String &rString, long &rNewStartCp)
{
- for(USHORT i=0; i < rString.Len(); i++)
+ for(sal_uInt16 i=0; i < rString.Len(); i++)
{
if( 0x13 == rString.GetChar( i ) )
{
@@ -628,7 +628,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
std::deque<Chunk> aChunks;
//Here store stack location
- USHORT nCurrentCount = static_cast< USHORT >(pCtrlStck->Count());
+ sal_uInt16 nCurrentCount = static_cast< sal_uInt16 >(pCtrlStck->Count());
while (nStart < nEndCp)
{
//nStart is the beginning of the attributes for this range, and
@@ -686,14 +686,14 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
{
if (bStartAttr)
{
- USHORT nCount = static_cast< USHORT >(pCtrlStck->Count());
+ sal_uInt16 nCount = static_cast< sal_uInt16 >(pCtrlStck->Count());
if (maFieldStack.empty() && Read_Field(&aRes))
{
String sURL;
- for (USHORT nI = static_cast< USHORT >(pCtrlStck->Count()); nI > nCount; --nI)
+ for (sal_uInt16 nI = static_cast< sal_uInt16 >(pCtrlStck->Count()); nI > nCount; --nI)
{
const SfxPoolItem *pItem = ((*pCtrlStck)[nI-1])->pAttr;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if (nWhich == RES_TXTATR_INETFMT)
{
const SwFmtINetFmt *pURL =
@@ -726,14 +726,14 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
//to draw attributes
if (pCtrlStck->Count() - nCurrentCount)
{
- for (USHORT i = nCurrentCount; i < pCtrlStck->Count(); i++)
+ for (sal_uInt16 i = nCurrentCount; i < pCtrlStck->Count(); i++)
{
const SfxPoolItem *pItem = ((*pCtrlStck)[i])->pAttr;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if( nWhich < RES_FLTRATTR_BEGIN ||
nWhich >= RES_FLTRATTR_END )
{
- USHORT nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
+ sal_uInt16 nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
if (
nSlotId && nWhich != nSlotId &&
0 != (nWhich = pEditPool->GetWhich(nSlotId)) &&
@@ -765,7 +765,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
//pop off as far as recorded location just in case there were some left
//unclosed
- for (USHORT nI = static_cast< USHORT >(pCtrlStck->Count()); nI > nCurrentCount; --nI)
+ for (sal_uInt16 nI = static_cast< sal_uInt16 >(pCtrlStck->Count()); nI > nCurrentCount; --nI)
pCtrlStck->DeleteAndDestroy(nI-1);
typedef std::deque<Chunk>::iterator myIter;
@@ -804,7 +804,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
}
bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
- USHORT nTxBxS, USHORT nSequence)
+ sal_uInt16 nTxBxS, sal_uInt16 nSequence)
{
// rasch den TextBox-PLCF greifen
WW8PLCFspecial* pT = pPlcxMan ? pPlcxMan->GetTxbx() : 0;
@@ -869,7 +869,7 @@ bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
return false;
}
// ggfs. entsprechende Anzahl Eintraege weitergehen
- for(USHORT iSequence = 0; iSequence < nSequence; iSequence++) (*pT)++;
+ for(sal_uInt16 iSequence = 0; iSequence < nSequence; iSequence++) (*pT)++;
// dann die tatsaechlichen Start und Ende ermitteln
if( (!pT->Get( rStartCp, pT0 ))
|| ( nMinStartCp > rStartCp ) )
@@ -912,7 +912,7 @@ bool SwWW8ImplReader::GetRangeAsDrawingString(String& rString, long nStartCp, lo
else if (nStartCp < nEndCp)
{
// den Text einlesen: kann sich ueber mehrere Pieces erstrecken!!!
- USHORT nLen = pSBase->WW8ReadString(*pStrm, rString,
+ sal_uInt16 nLen = pSBase->WW8ReadString(*pStrm, rString,
nStartCp + nOffset, nEndCp - nStartCp, GetCurrentCharSet());
ASSERT(nLen, "+Wo ist der Grafik-Text (8) ?");
if (nLen)
@@ -973,13 +973,13 @@ OutlinerParaObject* SwWW8ImplReader::ImportAsOutliner(String &rString, WW8_CP nS
// InsertTxbxText() fuegt fuer TextBoxen und CaptionBoxen den Text
// und die Attribute ein
SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
- Size* pObjSiz, USHORT nTxBxS, USHORT nSequence, long nPosCp,
+ Size* pObjSiz, sal_uInt16 nTxBxS, sal_uInt16 nSequence, long nPosCp,
SwFrmFmt* pOldFlyFmt, bool bMakeSdrGrafObj, bool& rbEraseTextObj,
bool* pbTestTxbxContainsText, long* pnStartCp, long* pnEndCp,
bool* pbContainsGraphics, SvxMSDffImportRec* pRecord)
{
SwFrmFmt* pFlyFmt = 0;
- ULONG nOld = pStrm->Tell();
+ sal_uLong nOld = pStrm->Tell();
ManTypes eType = pPlcxMan->GetManType() == MAN_HDFT ? MAN_TXBX_HDFT : MAN_TXBX;
@@ -1031,13 +1031,13 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
WW8SprmIter aSprmIter(aDesc.pMemPos, aDesc.nSprmsLen,
*mpSprmParser);
- const BYTE* pParams = aSprmIter.GetAktParams();
+ const sal_uInt8* pParams = aSprmIter.GetAktParams();
for( int nLoop = 0; nLoop < 2; ++nLoop )
{
while( aSprmIter.GetSprms()
&& (0 != (pParams = aSprmIter.GetAktParams())) )
{
- USHORT nAktId = aSprmIter.GetAktId();
+ sal_uInt16 nAktId = aSprmIter.GetAktId();
switch( nAktId )
{
case 75:
@@ -1187,7 +1187,7 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
}
-bool SwWW8ImplReader::TxbxChainContainsRealText(USHORT nTxBxS, long& rStartCp,
+bool SwWW8ImplReader::TxbxChainContainsRealText(sal_uInt16 nTxBxS, long& rStartCp,
long& rEndCp)
{
bool bErase, bContainsText;
@@ -1207,17 +1207,17 @@ SdrObject* SwWW8ImplReader::ReadTxtBox( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aTxtB, sizeof( aTxtB ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa );
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya );
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya );
SdrObject* pObj = new SdrRectObj( OBJ_TEXT, Rectangle( aP0, aP1 ) );
pObj->SetModel( pDrawModel );
pObj->NbcSetSnapRect(Rectangle(aP0, aP1));
- Size aSize( (INT16)SVBT16ToShort( pHd->dxa ) ,
- (INT16)SVBT16ToShort( pHd->dya ) );
+ Size aSize( (sal_Int16)SVBT16ToShort( pHd->dxa ) ,
+ (sal_Int16)SVBT16ToShort( pHd->dya ) );
long nStartCpFly,nEndCpFly;
bool bContainsGraphics;
@@ -1249,33 +1249,33 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aCallB, sizeof( aCallB ), pHd, pDo, rSet ) )
return 0;
- UINT16 nCount = SVBT16ToShort( aCallB.dpPolyLine.aBits1 ) >> 1 & 0x7fff;
+ sal_uInt16 nCount = SVBT16ToShort( aCallB.dpPolyLine.aBits1 ) >> 1 & 0x7fff;
SVBT16 *pP = new SVBT16[nCount * 2];
pStrm->Read( pP, nCount * 4 ); // Punkte einlesen
- BYTE nTyp = (BYTE)nCount - 1;
+ sal_uInt8 nTyp = (sal_uInt8)nCount - 1;
if( nTyp == 1 && SVBT16ToShort( pP[0] ) == SVBT16ToShort( pP[2] ) )
nTyp = 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) +
- (INT16)SVBT16ToShort( aCallB.dpheadTxbx.xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya )
- + (INT16)SVBT16ToShort( aCallB.dpheadTxbx.ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) +
+ (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya )
+ + (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dxa );
- aP1.Y() += (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dya );
- Point aP2( (INT16)SVBT16ToShort( pHd->xa )
- + (INT16)SVBT16ToShort( aCallB.dpheadPolyLine.xa )
- + nDrawXOfs2 + (INT16)SVBT16ToShort( pP[0] ),
- (INT16)SVBT16ToShort( pHd->ya )
- + (INT16)SVBT16ToShort( aCallB.dpheadPolyLine.ya )
- + nDrawYOfs2 + (INT16)SVBT16ToShort( pP[1] ) );
+ aP1.X() += (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dya );
+ Point aP2( (sal_Int16)SVBT16ToShort( pHd->xa )
+ + (sal_Int16)SVBT16ToShort( aCallB.dpheadPolyLine.xa )
+ + nDrawXOfs2 + (sal_Int16)SVBT16ToShort( pP[0] ),
+ (sal_Int16)SVBT16ToShort( pHd->ya )
+ + (sal_Int16)SVBT16ToShort( aCallB.dpheadPolyLine.ya )
+ + nDrawYOfs2 + (sal_Int16)SVBT16ToShort( pP[1] ) );
delete[] pP;
SdrCaptionObj* pObj = new SdrCaptionObj( Rectangle( aP0, aP1 ), aP2 );
pObj->SetModel( pDrawModel );
pObj->NbcSetSnapRect(Rectangle(aP0, aP1));
- Size aSize( (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dxa ),
- (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dya ) );
+ Size aSize( (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dxa ),
+ (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dya ) );
bool bEraseThisObject;
InsertTxbxText(pObj, &aSize, 0, 0, 0, 0, false, bEraseThisObject );
@@ -1294,21 +1294,21 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox( WW8_DPHEAD* pHd, const WW8_DO* pDo,
SdrObject *SwWW8ImplReader::ReadGroup( WW8_DPHEAD* pHd, const WW8_DO* pDo,
SfxAllItemSet &rSet)
{
- INT16 nGrouped;
+ sal_Int16 nGrouped;
if( !ReadGrafStart( (void*)&nGrouped, sizeof( nGrouped ), pHd, pDo, rSet ) )
return 0;
#ifdef OSL_BIGENDIAN
- nGrouped = (INT16)SWAPSHORT( nGrouped );
+ nGrouped = (sal_Int16)SWAPSHORT( nGrouped );
#endif
- nDrawXOfs = nDrawXOfs + (INT16)SVBT16ToShort( pHd->xa );
- nDrawYOfs = nDrawYOfs + (INT16)SVBT16ToShort( pHd->ya );
+ nDrawXOfs = nDrawXOfs + (sal_Int16)SVBT16ToShort( pHd->xa );
+ nDrawYOfs = nDrawYOfs + (sal_Int16)SVBT16ToShort( pHd->ya );
SdrObject* pObj = new SdrObjGroup;
- short nLeft = (INT16)SVBT16ToShort( pHd->cb ) - sizeof( WW8_DPHEAD );
+ short nLeft = (sal_Int16)SVBT16ToShort( pHd->cb ) - sizeof( WW8_DPHEAD );
for (int i = 0; i < nGrouped; i++)
{
SfxAllItemSet aSet(pDrawModel->GetItemPool());
@@ -1324,8 +1324,8 @@ SdrObject *SwWW8ImplReader::ReadGroup( WW8_DPHEAD* pHd, const WW8_DO* pDo,
}
}
- nDrawXOfs = nDrawXOfs - (INT16)SVBT16ToShort( pHd->xa );
- nDrawYOfs = nDrawYOfs - (INT16)SVBT16ToShort( pHd->ya );
+ nDrawXOfs = nDrawXOfs - (sal_Int16)SVBT16ToShort( pHd->xa );
+ nDrawYOfs = nDrawYOfs - (sal_Int16)SVBT16ToShort( pHd->ya );
return pObj;
}
@@ -1502,10 +1502,10 @@ const WW8_BordersSO &WW8_BordersSO::Get0x01LineMatch(eBorderCode eCode)
return aLineTabVer8[eCode];
}
-INT32 SwMSDffManager::GetEscherLineMatch(MSO_LineStyle eStyle,
- MSO_SPT eShapeType, INT32 &rThick)
+sal_Int32 SwMSDffManager::GetEscherLineMatch(MSO_LineStyle eStyle,
+ MSO_SPT eShapeType, sal_Int32 &rThick)
{
- INT32 nOutsideThick = 0;
+ sal_Int32 nOutsideThick = 0;
/*
Beachte: im Gegensatz zu den Winword-ueblichen Tabellen- und
Rahmen-Randbreiten-Angaben, bei denen jeweils aus der Staerke *einer*
@@ -1561,17 +1561,17 @@ INT32 SwMSDffManager::GetEscherLineMatch(MSO_LineStyle eStyle,
//Returns the thickness of the line outside the frame, the logic of
//words positioning of borders around floating objects is that of a
//disturbed mind.
-INT32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
- MSO_LineStyle eLineStyle, MSO_SPT eShapeType, INT32 &rLineThick,
+sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
+ MSO_LineStyle eLineStyle, MSO_SPT eShapeType, sal_Int32 &rLineThick,
SvxBoxItem& rBox )
{
- INT32 nOutsideThick = 0;
+ sal_Int32 nOutsideThick = 0;
if( !rLineThick )
return nOutsideThick;
WW8_BordersSO::eBorderCode nIdx = WW8_BordersSO::none;
- INT32 nLineThick=rLineThick;
+ sal_Int32 nLineThick=rLineThick;
nOutsideThick = SwMSDffManager::GetEscherLineMatch(eLineStyle,
eShapeType, rLineThick);
@@ -1668,7 +1668,7 @@ INT32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
aLine.SetInWidth (rBorders.mnIn);
aLine.SetDistance(rBorders.mnDist);
- for(USHORT nLine = 0; nLine < 4; ++nLine)
+ for(sal_uInt16 nLine = 0; nLine < 4; ++nLine)
rBox.SetLine(new SvxBorderLine( aLine ), nLine);
}
@@ -1703,16 +1703,16 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
const SfxItemSet& rOldSet = pSdrObj->GetMergedItemSet();
// einige Items koennen direkt so uebernommen werden
- const USHORT nDirectMatch = 2;
+ const sal_uInt16 nDirectMatch = 2;
static RES_FRMATR __READONLY_DATA aDirectMatch[ nDirectMatch ] =
{
RES_LR_SPACE, // Aussenabstand links/rechts: SvxLRSpaceItem
RES_UL_SPACE // Aussenabstand Oben/unten: SvxULSpaceItem
};
const SfxPoolItem* pPoolItem;
- for(USHORT nItem = 0; nItem < nDirectMatch; ++nItem)
+ for(sal_uInt16 nItem = 0; nItem < nDirectMatch; ++nItem)
if( SFX_ITEM_SET == rOldSet.GetItemState(
- static_cast< USHORT >(aDirectMatch[ nItem ]), false, &pPoolItem) )
+ static_cast< sal_uInt16 >(aDirectMatch[ nItem ]), false, &pPoolItem) )
{
rFlySet.Put( *pPoolItem );
}
@@ -1722,7 +1722,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
// Rahmen-GROESSE benoetigt!
SvxBoxItem aBox(sw::util::ItemGet<SvxBoxItem>(rFlySet, RES_BOX));
// dashed oder solid wird zu solid
- INT32 nLineThick = 0, nOutside=0;
+ sal_Int32 nLineThick = 0, nOutside=0;
// check if LineStyle is *really* set!
const SfxPoolItem* pItem;
@@ -1775,13 +1775,13 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
// set distances from box's border to text contained within the box
if( 0 < rInnerDist.Left() )
- aBox.SetDistance( (USHORT)rInnerDist.Left(), BOX_LINE_LEFT );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Left(), BOX_LINE_LEFT );
if( 0 < rInnerDist.Top() )
- aBox.SetDistance( (USHORT)rInnerDist.Top(), BOX_LINE_TOP );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Top(), BOX_LINE_TOP );
if( 0 < rInnerDist.Right() )
- aBox.SetDistance( (USHORT)rInnerDist.Right(), BOX_LINE_RIGHT );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Right(), BOX_LINE_RIGHT );
if( 0 < rInnerDist.Bottom() )
- aBox.SetDistance( (USHORT)rInnerDist.Bottom(), BOX_LINE_BOTTOM );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Bottom(), BOX_LINE_BOTTOM );
bool bFixSize = !(WW8ITEMVALUE(rOldSet, SDRATTR_TEXT_AUTOGROWHEIGHT,
SdrTextAutoGrowHeightItem));
@@ -1832,11 +1832,11 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
const Color aShdColor = static_cast< SdrShadowColorItem const & >(
rOldSet.Get(SDRATTR_SHADOWCOLOR)).GetColorValue();
- const INT32 nShdDistX = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWXDIST,
+ const sal_Int32 nShdDistX = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWXDIST,
SdrShadowXDistItem);
- const INT32 nShdDistY = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWYDIST,
+ const sal_Int32 nShdDistY = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWYDIST,
SdrShadowYDistItem);
- //const USHORT nShdTrans= WW8ITEMVALUE(rOldSet,
+ //const sal_uInt16 nShdTrans= WW8ITEMVALUE(rOldSet,
// SDRATTR_SHADOWTRANSPARENCE, SdrShadowTransparenceItem);
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1846,7 +1846,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
aShadow.SetColor( Color( aShdColor ) );
- aShadow.SetWidth(writer_cast<USHORT>((Abs( nShdDistX) +
+ aShadow.SetWidth(writer_cast<sal_uInt16>((Abs( nShdDistX) +
Abs( nShdDistY )) / 2 ));
SvxShadowLocation eShdPosi;
@@ -1958,7 +1958,7 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
if (rRecord.nXAlign == 1)
{
if ((rRecord.nXRelTo == 0) || (rRecord.nXRelTo == 2))
- rLR.SetLeft((USHORT)0);
+ rLR.SetLeft((sal_uInt16)0);
}
// Right adjustments - if horizontally aligned to right of
@@ -1966,19 +1966,19 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
if (rRecord.nXAlign == 3)
{
if ((rRecord.nXRelTo == 0) || (rRecord.nXRelTo == 2))
- rLR.SetRight((USHORT)0);
+ rLR.SetRight((sal_uInt16)0);
}
//Inside margin, remove left wrapping
if ((rRecord.nXAlign == 4) && (rRecord.nXRelTo == 0))
{
- rLR.SetLeft((USHORT)0);
+ rLR.SetLeft((sal_uInt16)0);
}
//Outside margin, remove left wrapping
if ((rRecord.nXAlign == 5) && (rRecord.nXRelTo == 0))
{
- rLR.SetRight((USHORT)0);
+ rLR.SetRight((sal_uInt16)0);
}
}
@@ -1991,7 +1991,7 @@ void SwWW8ImplReader::AdjustULWrapForWordMargins(
if (rRecord.nYAlign == 1)
{
if ((rRecord.nYRelTo == 0) || (rRecord.nYRelTo == 1))
- rUL.SetUpper((USHORT)0);
+ rUL.SetUpper((sal_uInt16)0);
}
// Bottom adjustment - remove bottom wrapping if aligned to page or
@@ -1999,12 +1999,12 @@ void SwWW8ImplReader::AdjustULWrapForWordMargins(
if (rRecord.nYAlign == 3)
{
if ((rRecord.nYRelTo == 0) || (rRecord.nYRelTo == 1))
- rUL.SetLower((USHORT)0);
+ rUL.SetLower((sal_uInt16)0);
}
//Remove top margin if aligned vertically inside margin
if ((rRecord.nYAlign == 4) && (rRecord.nYRelTo == 0))
- rUL.SetUpper((USHORT)0);
+ rUL.SetUpper((sal_uInt16)0);
/*
// Something like this needs to be done once inside and outside are
@@ -2012,7 +2012,7 @@ void SwWW8ImplReader::AdjustULWrapForWordMargins(
if (rRecord.nYAlign == 4)
{
if (rRecord.nYRelTo == 0)
- rUL.SetUpper((USHORT)0);
+ rUL.SetUpper((sal_uInt16)0);
}
*/
}
@@ -2025,15 +2025,15 @@ void SwWW8ImplReader::MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord,
if (pRecord->nDxWrapDistLeft || pRecord->nDxWrapDistRight)
{
- SvxLRSpaceItem aLR(writer_cast<USHORT>(pRecord->nDxWrapDistLeft),
- writer_cast<USHORT>(pRecord->nDxWrapDistRight), 0, 0, RES_LR_SPACE);
+ SvxLRSpaceItem aLR(writer_cast<sal_uInt16>(pRecord->nDxWrapDistLeft),
+ writer_cast<sal_uInt16>(pRecord->nDxWrapDistRight), 0, 0, RES_LR_SPACE);
AdjustLRWrapForWordMargins(*pRecord, aLR);
pFlyFmt->SetFmtAttr(aLR);
}
if (pRecord->nDyWrapDistTop || pRecord->nDyWrapDistBottom)
{
- SvxULSpaceItem aUL(writer_cast<USHORT>(pRecord->nDyWrapDistTop),
- writer_cast<USHORT>(pRecord->nDyWrapDistBottom), RES_UL_SPACE);
+ SvxULSpaceItem aUL(writer_cast<sal_uInt16>(pRecord->nDyWrapDistTop),
+ writer_cast<sal_uInt16>(pRecord->nDyWrapDistBottom), RES_UL_SPACE);
AdjustULWrapForWordMargins(*pRecord, aUL);
pFlyFmt->SetFmtAttr(aUL);
}
@@ -2129,7 +2129,7 @@ void SwWW8ImplReader::SetAttributesAtGrfNode( SvxMSDffImportRec* pRecord,
if( pIdx && 0 != (pGrfNd = rDoc.GetNodes()[pIdx->GetIndex() + 1]->GetGrfNode() ))
{
Size aSz(pGrfNd->GetTwipSize());
- // --> OD 2005-08-01 #124722# - use type <sal_uInt64> instead of <ULONG>
+ // --> OD 2005-08-01 #124722# - use type <sal_uInt64> instead of <sal_uLong>
// to get correct results in the following calculations.
sal_uInt64 rHeight = aSz.Height();
sal_uInt64 rWidth = aSz.Width();
@@ -2196,7 +2196,7 @@ void SwWW8ImplReader::SetAttributesAtGrfNode( SvxMSDffImportRec* pRecord,
//drawmode
if (WW8ITEMVALUE(rOldSet, SDRATTR_GRAFMODE, SdrGrafModeItem))
{
- SwDrawModeGrf aDrawMode( static_cast< USHORT >(WW8ITEMVALUE(rOldSet,
+ SwDrawModeGrf aDrawMode( static_cast< sal_uInt16 >(WW8ITEMVALUE(rOldSet,
SDRATTR_GRAFMODE, SdrGrafModeItem)) );
pGrfNd->SetAttr( aDrawMode );
}
@@ -2258,13 +2258,13 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
// nXRelTo - Page printable area, Page, Column, Character
// nYRelTo - Page printable area, Page, Paragraph, Line
- const UINT32 nCntXAlign = 6;
- const UINT32 nCntYAlign = 6;
+ const sal_uInt32 nCntXAlign = 6;
+ const sal_uInt32 nCntYAlign = 6;
- const UINT32 nCntRelTo = 4;
+ const sal_uInt32 nCntRelTo = 4;
- UINT32 nXAlign = nCntXAlign > pRecord->nXAlign ? pRecord->nXAlign : 1;
- UINT32 nYAlign = nCntYAlign > pRecord->nYAlign ? pRecord->nYAlign : 1;
+ sal_uInt32 nXAlign = nCntXAlign > pRecord->nXAlign ? pRecord->nXAlign : 1;
+ sal_uInt32 nYAlign = nCntYAlign > pRecord->nYAlign ? pRecord->nYAlign : 1;
if (pFSPA)
{
@@ -2289,8 +2289,8 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
// <--
}
- UINT32 nXRelTo = nCntRelTo > pRecord->nXRelTo ? pRecord->nXRelTo : 1;
- UINT32 nYRelTo = nCntRelTo > pRecord->nYRelTo ? pRecord->nYRelTo : 1;
+ sal_uInt32 nXRelTo = nCntRelTo > pRecord->nXRelTo ? pRecord->nXRelTo : 1;
+ sal_uInt32 nYRelTo = nCntRelTo > pRecord->nYRelTo ? pRecord->nYRelTo : 1;
// --> OD 2005-03-03 #i43718#
RndStdIds eAnchor = IsInlineEscherHack() ? FLY_AS_CHAR : FLY_AT_CHAR;
@@ -2468,13 +2468,13 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
}
// --> OD 2008-04-10 #i84783#
-bool SwWW8ImplReader::IsObjectLayoutInTableCell( const UINT32 nLayoutInTableCell ) const
+bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const
{
bool bIsObjectLayoutInTableCell = false;
if ( bVer8 )
{
- const UINT16 nWWVersion = pWwFib->nProduct & 0xE000;
+ const sal_uInt16 nWWVersion = pWwFib->nProduct & 0xE000;
switch ( nWWVersion )
{
case 0x0000: // version 8 aka Microsoft Word 97
@@ -2690,8 +2690,8 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
Get the record for top level object, so we can get the word anchoring
and wrapping information for it.
*/
- USHORT nRecCount = aData.GetRecCount();
- for (USHORT nTxbx=0; nTxbx < nRecCount; ++nTxbx )
+ sal_uInt16 nRecCount = aData.GetRecCount();
+ for (sal_uInt16 nTxbx=0; nTxbx < nRecCount; ++nTxbx )
{
pRecord = aData.GetRecord( nTxbx );
if (pRecord && pRecord->pObj == pObject)
@@ -2721,7 +2721,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
// its wrapping isn't 'SURROUND_THROUGH'
if (bLayoutInTableCell && eSurround != SURROUND_THROUGHT)
{
- SwFmtFollowTextFlow aFollowTextFlow( TRUE );
+ SwFmtFollowTextFlow aFollowTextFlow( sal_True );
aFlySet.Put( aFollowTextFlow );
}
@@ -2809,8 +2809,8 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
*/
if (aData.HasRecords())
{
- USHORT nCount = aData.GetRecCount();
- for (USHORT nTxbx=0; nTxbx < nCount; ++nTxbx)
+ sal_uInt16 nCount = aData.GetRecCount();
+ for (sal_uInt16 nTxbx=0; nTxbx < nCount; ++nTxbx)
{
pRecord = aData.GetRecord(nTxbx);
if (pRecord && pRecord->pObj && pRecord->aTextId.nTxBxS)
@@ -2904,7 +2904,7 @@ SwFrmFmt* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject,
// Objekt ist Bestandteil einer Gruppe?
SdrObject* pGroupObject = pSdrTextObj->GetUpGroup();
- UINT32 nOrdNum = pSdrTextObj->GetOrdNum();
+ sal_uInt32 nOrdNum = pSdrTextObj->GetOrdNum();
bool bEraseThisObject;
InsertTxbxText( pSdrTextObj, &aObjSize, pRecord->aTextId.nTxBxS,
pRecord->aTextId.nSequence, nGrafAnchorCp, pRetFrmFmt,
@@ -3029,7 +3029,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
deleted and useless.
*/
pMSDffManager->StoreShapeOrder(pF->nSpId,
- (((ULONG)pRecord->aTextId.nTxBxS) << 16) +
+ (((sal_uLong)pRecord->aTextId.nTxBxS) << 16) +
pRecord->aTextId.nSequence, 0, pRetFrmFmt);
// Das Kontakt-Objekt MUSS in die Draw-Page gesetzt werden, damit
@@ -3238,8 +3238,8 @@ void SwWW8FltAnchorStack::AddAnchor(const SwPosition& rPos, SwFrmFmt *pFmt)
void SwWW8FltAnchorStack::Flush()
{
- USHORT nCnt = static_cast< USHORT >(Count());
- for (USHORT i=0; i < nCnt; ++i)
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
+ for (sal_uInt16 i=0; i < nCnt; ++i)
{
SwFltStackEntry *pEntry = (*this)[i];
SwPosition aDummy(pEntry->nMkNode);
diff --git a/sw/source/filter/ww8/ww8graf.hxx b/sw/source/filter/ww8/ww8graf.hxx
index 12d168724cbd..26a863533775 100644
--- a/sw/source/filter/ww8/ww8graf.hxx
+++ b/sw/source/filter/ww8/ww8graf.hxx
@@ -36,11 +36,11 @@
struct EscherShape
{
- ULONG mnEscherShapeOrder;
- ULONG mnNoInlines;
+ sal_uLong mnEscherShapeOrder;
+ sal_uLong mnNoInlines;
// --> OD 2004-12-13 #117915# - new member <mbInHeaderFooter>
bool mbInHeaderFooter;
- EscherShape( ULONG nEscherShapeOrder,
+ EscherShape( sal_uLong nEscherShapeOrder,
bool _bInHeaderFooter )
: mnEscherShapeOrder(nEscherShapeOrder),
mnNoInlines(0),
@@ -65,24 +65,24 @@ private:
std::vector<short> maDrawHeight;
typedef std::vector<short>::iterator myditer;
- std::stack<USHORT> maIndexes;
+ std::stack<sal_uInt16> maIndexes;
sw::util::SetLayer maSetLayer;
- ULONG mnNoInitialObjects;
- ULONG mnInlines;
+ sal_uLong mnNoInitialObjects;
+ sal_uLong mnInlines;
SdrPage* mpDrawPg;
const SvxMSDffShapeOrders *mpShapeOrders;
- USHORT GetEscherObjectIdx(ULONG nSpId);
- myeiter MapEscherIdxToIter(ULONG nIdx);
+ sal_uInt16 GetEscherObjectIdx(sal_uLong nSpId);
+ myeiter MapEscherIdxToIter(sal_uLong nIdx);
// --> OD 2004-12-13 #117915# - new parameter <_bInHeaderFooter>, indicating
// that object is in header or footer
- ULONG GetEscherObjectPos( ULONG nSpId,
+ sal_uLong GetEscherObjectPos( sal_uLong nSpId,
const bool _bInHeaderFooter );
// <--
- ULONG GetDrawingObjectPos(short nWwHeight);
- bool InsertObject(SdrObject *pObject, ULONG nPos);
+ sal_uLong GetDrawingObjectPos(short nWwHeight);
+ bool InsertObject(SdrObject *pObject, sal_uLong nPos);
public:
wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg,
const SvxMSDffShapeOrders *pShapeOrders);
@@ -95,10 +95,10 @@ public:
// --> OD 2004-12-13 #117915# - new parameter <_bInHeaderFooter>, indicating
// that object is in header or footer
void InsertEscherObject( SdrObject* pObject,
- ULONG nSpId,
+ sal_uLong nSpId,
const bool _bInHeaderFooter );
// <--
- void InsideEscher(ULONG nIndex);
+ void InsideEscher(sal_uLong nIndex);
void OutsideEscher();
};
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 7bfa32992f9c..6303e9b8c6e6 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -72,7 +72,7 @@ wwZOrderer::wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg,
ASSERT(mpDrawPg,"Missing draw page impossible!");
}
-void wwZOrderer::InsideEscher(ULONG nSpId)
+void wwZOrderer::InsideEscher(sal_uLong nSpId)
{
maIndexes.push(GetEscherObjectIdx(nSpId));
}
@@ -84,15 +84,15 @@ void wwZOrderer::OutsideEscher()
// --> OD 2004-12-13 #117915# - consider new parameter <_bInHeaderFooter>
void wwZOrderer::InsertEscherObject( SdrObject* pObject,
- ULONG nSpId,
+ sal_uLong nSpId,
const bool _bInHeaderFooter )
{
- ULONG nInsertPos = GetEscherObjectPos( nSpId, _bInHeaderFooter );
+ sal_uLong nInsertPos = GetEscherObjectPos( nSpId, _bInHeaderFooter );
// <--
InsertObject(pObject, nInsertPos + mnNoInitialObjects + mnInlines);
}
-wwZOrderer::myeiter wwZOrderer::MapEscherIdxToIter(ULONG nIdx)
+wwZOrderer::myeiter wwZOrderer::MapEscherIdxToIter(sal_uLong nIdx)
{
myeiter aIter = maEscherLayer.begin();
myeiter aEnd = maEscherLayer.end();
@@ -105,12 +105,12 @@ wwZOrderer::myeiter wwZOrderer::MapEscherIdxToIter(ULONG nIdx)
return aIter;
}
-USHORT wwZOrderer::GetEscherObjectIdx(ULONG nSpId)
+sal_uInt16 wwZOrderer::GetEscherObjectIdx(sal_uLong nSpId)
{
- USHORT nFound=0;
- USHORT nShapeCount = mpShapeOrders ? mpShapeOrders->Count() : 0;
+ sal_uInt16 nFound=0;
+ sal_uInt16 nShapeCount = mpShapeOrders ? mpShapeOrders->Count() : 0;
// First, find out what position this shape is in in the Escher order.
- for (USHORT nShapePos=0; nShapePos < nShapeCount; nShapePos++)
+ for (sal_uInt16 nShapePos=0; nShapePos < nShapeCount; nShapePos++)
{
const SvxMSDffShapeOrder *pOrder = mpShapeOrders->GetObject(nShapePos);
if (pOrder->nShapeId == nSpId)
@@ -123,7 +123,7 @@ USHORT wwZOrderer::GetEscherObjectIdx(ULONG nSpId)
}
// --> OD 2004-12-13 #117915# - consider new parameter <_bInHeaderFooter>
-ULONG wwZOrderer::GetEscherObjectPos( ULONG nSpId,
+sal_uLong wwZOrderer::GetEscherObjectPos( sal_uLong nSpId,
const bool _bInHeaderFooter )
{
/*
@@ -131,12 +131,12 @@ ULONG wwZOrderer::GetEscherObjectPos( ULONG nSpId,
the actual ordering that should be used when inserting them into the
document.
*/
- USHORT nFound = GetEscherObjectIdx(nSpId);
+ sal_uInt16 nFound = GetEscherObjectIdx(nSpId);
// Match the ordering position from the ShapeOrders to the ordering of all
// objects in the document, there is a complexity when escherobjects
// contain inlines objects, we need to consider thsose as part of the
// escher count
- ULONG nRet=0;
+ sal_uLong nRet=0;
myeiter aIter = maEscherLayer.begin();
myeiter aEnd = maEscherLayer.end();
// --> OD 2004-12-13 #117915# - skip objects in page header|footer, if
@@ -177,7 +177,7 @@ ULONG wwZOrderer::GetEscherObjectPos( ULONG nSpId,
// einem VarArr
void wwZOrderer::InsertDrawingObject(SdrObject* pObj, short nWwHeight)
{
- ULONG nPos = GetDrawingObjectPos(nWwHeight);
+ sal_uLong nPos = GetDrawingObjectPos(nWwHeight);
if (nWwHeight & 0x2000) // Heaven ?
maSetLayer.SendObjectToHeaven(*pObj);
else
@@ -198,10 +198,10 @@ void wwZOrderer::InsertTextLayerObject(SdrObject* pObject)
{
//If we are inside an escher objects, place us just after that
//escher obj, and increment its inline count
- USHORT nIdx = maIndexes.top();
+ sal_uInt16 nIdx = maIndexes.top();
myeiter aEnd = MapEscherIdxToIter(nIdx);
- ULONG nInsertPos=0;
+ sal_uLong nInsertPos=0;
myeiter aIter = maEscherLayer.begin();
while (aIter != aEnd)
{
@@ -226,7 +226,7 @@ void wwZOrderer::InsertTextLayerObject(SdrObject* pObject)
// Der Offset bei Datei in bestehendes Dokument mit Grafiklayer einfuegen
// muss der Aufrufer den Index um mnNoInitialObjects erhoeht werden, damit die
// neuen Objekte am Ende landen ( Einfuegen ist dann schneller )
-ULONG wwZOrderer::GetDrawingObjectPos(short nWwHeight)
+sal_uLong wwZOrderer::GetDrawingObjectPos(short nWwHeight)
{
myditer aIter = maDrawHeight.begin();
myditer aEnd = maDrawHeight.end();
@@ -242,7 +242,7 @@ ULONG wwZOrderer::GetDrawingObjectPos(short nWwHeight)
return std::distance(maDrawHeight.begin(), aIter);
}
-bool wwZOrderer::InsertObject(SdrObject* pObject, ULONG nPos)
+bool wwZOrderer::InsertObject(SdrObject* pObject, sal_uLong nPos)
{
if (!pObject->IsInserted())
{
@@ -263,11 +263,11 @@ bool SwWW8ImplReader::GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc)
}
bool SwWW8ImplReader::ReadGrafFile(String& rFileName, Graphic*& rpGraphic,
- const WW8_PIC& rPic, SvStream* pSt, ULONG nFilePos, bool* pbInDoc)
+ const WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos, bool* pbInDoc)
{ // Grafik in File schreiben
*pbInDoc = true; // default
- ULONG nPosFc = nFilePos + rPic.cbHeader;
+ sal_uLong nPosFc = nFilePos + rPic.cbHeader;
switch (rPic.MFP.mm)
{
@@ -334,7 +334,7 @@ able to calculate the proper prefsize (especially if the wmf fileheader was miss
struct WW8PicDesc
{
- INT16 nCL, nCR, nCT, nCB;
+ sal_Int16 nCL, nCR, nCT, nCB;
long nWidth, nHeight;
WW8PicDesc( const WW8_PIC& rPic );
@@ -388,14 +388,14 @@ SwFlyFrmFmt* SwWW8ImplReader::MakeGrafNotInCntnt(const WW8PicDesc& rPD,
const Graphic* pGraph, const String& rFileName, const SfxItemSet& rGrfSet)
{
- UINT32 nWidth = rPD.nWidth;
- UINT32 nHeight = rPD.nHeight;
+ sal_uInt32 nWidth = rPD.nWidth;
+ sal_uInt32 nHeight = rPD.nHeight;
// Vertikale Verschiebung durch Zeilenabstand
- INT32 nNetHeight = nHeight + rPD.nCT + rPD.nCB;
+ sal_Int32 nNetHeight = nHeight + rPD.nCT + rPD.nCB;
if( pSFlyPara->nLineSpace && pSFlyPara->nLineSpace > nNetHeight )
pSFlyPara->nYPos =
- (USHORT)( pSFlyPara->nYPos + pSFlyPara->nLineSpace - nNetHeight );
+ (sal_uInt16)( pSFlyPara->nYPos + pSFlyPara->nLineSpace - nNetHeight );
WW8FlySet aFlySet(*this, pWFlyPara, pSFlyPara, true);
@@ -445,7 +445,7 @@ SwFrmFmt* SwWW8ImplReader::MakeGrafInCntnt(const WW8_PIC& rPic,
}
SwFrmFmt* SwWW8ImplReader::ImportGraf1(WW8_PIC& rPic, SvStream* pSt,
- ULONG nFilePos )
+ sal_uLong nFilePos )
{
SwFrmFmt* pRet = 0;
if( pSt->IsEof() || rPic.fError || rPic.MFP.mm == 99 )
@@ -520,7 +520,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
Wir mappen ansonsten die Variable pDataStream auf pStream.
*/
- ULONG nOldPos = pDataStream->Tell();
+ sal_uLong nOldPos = pDataStream->Tell();
WW8_PIC aPic;
pDataStream->Seek( nPicLocFc );
PicRead( pDataStream, &aPic, bVer67);
@@ -586,7 +586,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
if (0x66 == aPic.MFP.mm)
{
//These ones have names prepended
- BYTE nNameLen=0;
+ sal_uInt8 nNameLen=0;
*pDataStream >> nNameLen;
pDataStream->SeekRel( nNameLen );
}
@@ -676,7 +676,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
ReplaceObj(*pTextObj, *pObject);
else
{
- if (UINT16(OBJ_OLE2) == pObject->GetObjIdentifier())
+ if (sal_uInt16(OBJ_OLE2) == pObject->GetObjIdentifier())
{
// the size from BLIP, if there is any, should be already set
pRet = InsertOle(*((SdrOle2Obj*)pObject), aAttrSet, aGrSet);
@@ -766,7 +766,7 @@ void WW8PicShadowToReal( WW8_PIC_SHADOW * pPicS, WW8_PIC * pPic )
pPic->MFP.xExt = SVBT16ToShort( pPicS->MFP.xExt );
pPic->MFP.yExt = SVBT16ToShort( pPicS->MFP.yExt );
pPic->MFP.hMF = SVBT16ToShort( pPicS->MFP.hMF );
- for( USHORT i = 0; i < 14 ; i++ )
+ for( sal_uInt16 i = 0; i < 14 ; i++ )
pPic->rcWinMF[i] = SVBT8ToByte( pPicS->rcWinMF[i] );
pPic->dxaGoal = SVBT16ToShort( pPicS->dxaGoal );
pPic->dyaGoal = SVBT16ToShort( pPicS->dyaGoal );
@@ -791,13 +791,13 @@ void WW8FSPAShadowToReal( WW8_FSPA_SHADOW * pFSPAS, WW8_FSPA * pFSPA )
//long nYaTop; //top of rectangle enclosing shape relative to the origin of the shape
//long nXaRight; //right of rectangle enclosing shape relative to the origin of the shape
//long nYaBottom;//bottom of the rectangle enclosing shape relative to the origin of the shape
- //USHORT bHdr:1;
- //USHORT nbx:2;
- //USHORT nby:2;
- //USHORT nwr:4;
- //USHORT nwrk:4;
- //USHORT bRcaSimple:1;
- //USHORT bAnchorLock:1;
+ //sal_uInt16 bHdr:1;
+ //sal_uInt16 nbx:2;
+ //sal_uInt16 nby:2;
+ //sal_uInt16 nwr:4;
+ //sal_uInt16 nwrk:4;
+ //sal_uInt16 bRcaSimple:1;
+ //sal_uInt16 bAnchorLock:1;
//long nTxbx; //count of textboxes in shape (undo doc only)
@@ -807,7 +807,7 @@ void WW8FSPAShadowToReal( WW8_FSPA_SHADOW * pFSPAS, WW8_FSPA * pFSPA )
pFSPA->nXaRight = SVBT32ToUInt32( pFSPAS->nXaRight );
pFSPA->nYaBottom = SVBT32ToUInt32( pFSPAS->nYaBottom );
- USHORT nBits = SVBT16ToShort( pFSPAS->aBits1 );
+ sal_uInt16 nBits = SVBT16ToShort( pFSPAS->aBits1 );
pFSPA->bHdr = 0 != ( nBits & 0x0001 );
pFSPA->nbx = ( nBits & 0x0006 ) >> 1;
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 21804b38dca9..dd90dbc9d0bf 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -160,9 +160,9 @@ SwMSDffManager::SwMSDffManager( SwWW8ImplReader& rRdr )
nSvxMSDffOLEConvFlags = SwMSDffManager::GetFilterFlags();
}
-UINT32 SwMSDffManager::GetFilterFlags()
+sal_uInt32 SwMSDffManager::GetFilterFlags()
{
- UINT32 nFlags(0);
+ sal_uInt32 nFlags(0);
if (const SvtFilterOptions* pOpt = SvtFilterOptions::Get())
{
if (pOpt->IsMathType2Math())
@@ -244,23 +244,23 @@ void SwMSDffManager::EnableFallbackStream()
pFallbackStream = 0;
}
-USHORT SwWW8ImplReader::GetToggleAttrFlags() const
+sal_uInt16 SwWW8ImplReader::GetToggleAttrFlags() const
{
return pCtrlStck ? pCtrlStck->GetToggleAttrFlags() : 0;
}
-USHORT SwWW8ImplReader::GetToggleBiDiAttrFlags() const
+sal_uInt16 SwWW8ImplReader::GetToggleBiDiAttrFlags() const
{
return pCtrlStck ? pCtrlStck->GetToggleBiDiAttrFlags() : 0;
}
-void SwWW8ImplReader::SetToggleAttrFlags(USHORT nFlags)
+void SwWW8ImplReader::SetToggleAttrFlags(sal_uInt16 nFlags)
{
if (pCtrlStck)
pCtrlStck->SetToggleAttrFlags(nFlags);
}
-void SwWW8ImplReader::SetToggleBiDiAttrFlags(USHORT nFlags)
+void SwWW8ImplReader::SetToggleBiDiAttrFlags(sal_uInt16 nFlags)
{
if (pCtrlStck)
pCtrlStck->SetToggleBiDiAttrFlags(nFlags);
@@ -310,9 +310,9 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
SEEK_FROM_CURRENT_AND_RESTART )
&& maShapeRecords.Current()->nRecLen )
{
- UINT32 nBytesLeft = maShapeRecords.Current()->nRecLen;
- UINT32 nUDData;
- UINT16 nPID;
+ sal_uInt32 nBytesLeft = maShapeRecords.Current()->nRecLen;
+ sal_uInt32 nUDData;
+ sal_uInt16 nPID;
while( 5 < nBytesLeft )
{
rSt >> nPID;
@@ -329,13 +329,13 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
}
if ( rSt.GetError() != 0 )
break;
- pImpRec->bHasUDefProp = TRUE;
+ pImpRec->bHasUDefProp = sal_True;
nBytesLeft -= 6;
}
}
// Textrahmen, auch Title oder Outline
- UINT32 nTextId = GetPropertyValue( DFF_Prop_lTxid, 0 );
+ sal_uInt32 nTextId = GetPropertyValue( DFF_Prop_lTxid, 0 );
if( nTextId )
{
SfxItemSet aSet( pSdrModel->GetItemPool() );
@@ -344,7 +344,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
//textbox, this was changed for #88277# to be created as a simple
//rect to keep impress happy. For the rest of us we'd like to turn
//it back into a textbox again.
- BOOL bIsSimpleDrawingTextBox = (pImpRec->eShapeType == mso_sptTextBox);
+ sal_Bool bIsSimpleDrawingTextBox = (pImpRec->eShapeType == mso_sptTextBox);
if (!bIsSimpleDrawingTextBox)
{
//Either
@@ -362,17 +362,17 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
}
// Distance of Textbox to it's surrounding Autoshape
- INT32 nTextLeft = GetPropertyValue( DFF_Prop_dxTextLeft, 91440L);
- INT32 nTextRight = GetPropertyValue( DFF_Prop_dxTextRight, 91440L );
- INT32 nTextTop = GetPropertyValue( DFF_Prop_dyTextTop, 45720L );
- INT32 nTextBottom = GetPropertyValue( DFF_Prop_dyTextBottom, 45720L );
+ sal_Int32 nTextLeft = GetPropertyValue( DFF_Prop_dxTextLeft, 91440L);
+ sal_Int32 nTextRight = GetPropertyValue( DFF_Prop_dxTextRight, 91440L );
+ sal_Int32 nTextTop = GetPropertyValue( DFF_Prop_dyTextTop, 45720L );
+ sal_Int32 nTextBottom = GetPropertyValue( DFF_Prop_dyTextBottom, 45720L );
ScaleEmu( nTextLeft );
ScaleEmu( nTextRight );
ScaleEmu( nTextTop );
ScaleEmu( nTextBottom );
- INT32 nTextRotationAngle=0;
+ sal_Int32 nTextRotationAngle=0;
bool bVerticalText = false;
if ( IsProperty( DFF_Prop_txflTextFlow ) )
{
@@ -411,10 +411,10 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
rTextRect.Right() = rTextRect.Left() + rTextRect.GetHeight();
rTextRect.Bottom() = rTextRect.Top() + nWidth;
- INT32 nOldTextLeft = nTextLeft;
- INT32 nOldTextRight = nTextRight;
- INT32 nOldTextTop = nTextTop;
- INT32 nOldTextBottom = nTextBottom;
+ sal_Int32 nOldTextLeft = nTextLeft;
+ sal_Int32 nOldTextRight = nTextRight;
+ sal_Int32 nOldTextTop = nTextTop;
+ sal_Int32 nOldTextBottom = nTextBottom;
nTextLeft = nOldTextBottom;
nTextRight = nOldTextTop;
@@ -428,10 +428,10 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
rTextRect.Right() = rTextRect.Left() + rTextRect.GetHeight();
rTextRect.Bottom() = rTextRect.Top() + nWidth;
- INT32 nOldTextLeft = nTextLeft;
- INT32 nOldTextRight = nTextRight;
- INT32 nOldTextTop = nTextTop;
- INT32 nOldTextBottom = nTextBottom;
+ sal_Int32 nOldTextLeft = nTextLeft;
+ sal_Int32 nOldTextRight = nTextRight;
+ sal_Int32 nOldTextTop = nTextTop;
+ sal_Int32 nOldTextBottom = nTextBottom;
nTextLeft = nOldTextTop;
nTextRight = nOldTextBottom;
@@ -461,9 +461,9 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
if( bIsSimpleDrawingTextBox )
{
SvxMSDffShapeInfo aTmpRec( 0, pImpRec->nShapeId );
- aTmpRec.bSortByShapeId = TRUE;
+ aTmpRec.bSortByShapeId = sal_True;
- USHORT nFound;
+ sal_uInt16 nFound;
if( GetShapeInfos()->Seek_Entry( &aTmpRec, &nFound ) )
{
SvxMSDffShapeInfo& rInfo = *GetShapeInfos()->GetObject(nFound);
@@ -478,7 +478,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
bool bFitText = false;
if (GetPropertyValue(DFF_Prop_FitTextToShape) & 2)
{
- aSet.Put( SdrTextAutoGrowHeightItem( TRUE ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( sal_True ) );
aSet.Put( SdrTextMinFrameHeightItem(
aNewRect.Bottom() - aNewRect.Top() ) );
aSet.Put( SdrTextMinFrameWidthItem(
@@ -487,19 +487,19 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
}
else
{
- aSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
- aSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( sal_False ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
}
switch ( (MSO_WrapMode)
GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) )
{
case mso_wrapNone :
- aSet.Put( SdrTextAutoGrowWidthItem( TRUE ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( sal_True ) );
pImpRec->bAutoWidth = true;
break;
case mso_wrapByPoints :
- aSet.Put( SdrTextContourFrameItem( TRUE ) );
+ aSet.Put( SdrTextContourFrameItem( sal_True ) );
break;
default:
;
@@ -648,7 +648,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
const SfxPoolItem* pPoolItem=NULL;
SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR,
- FALSE, &pPoolItem );
+ sal_False, &pPoolItem );
if( SFX_ITEM_DEFAULT == eState )
aSet.Put( XFillColorItem( String(),
Color( mnDefaultColor ) ) );
@@ -657,17 +657,17 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
//Means that fBehindDocument is set
if (GetPropertyValue(DFF_Prop_fPrint) & 0x20)
- pImpRec->bDrawHell = TRUE;
+ pImpRec->bDrawHell = sal_True;
else
- pImpRec->bDrawHell = FALSE;
+ pImpRec->bDrawHell = sal_False;
if (GetPropertyValue(DFF_Prop_fPrint) & 0x02)
- pImpRec->bHidden = TRUE;
+ pImpRec->bHidden = sal_True;
pImpRec->nNextShapeId = GetPropertyValue( DFF_Prop_hspNext, 0 );
if ( nTextId )
{
- pImpRec->aTextId.nTxBxS = (UINT16)( nTextId >> 16 );
- pImpRec->aTextId.nSequence = (UINT16)nTextId;
+ pImpRec->aTextId.nTxBxS = (sal_uInt16)( nTextId >> 16 );
+ pImpRec->aTextId.nSequence = (sal_uInt16)nTextId;
}
pImpRec->nDxWrapDistLeft = GetPropertyValue(
@@ -715,7 +715,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
pImpRec->nCropFromRight = GetPropertyValue(
DFF_Prop_cropFromRight, 0 );
- UINT32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
+ sal_uInt32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
// --> OD 2008-06-16 #156765#
if ( !IsHardAttribute( DFF_Prop_fLine ) &&
pImpRec->eShapeType == mso_sptPictureFrame )
@@ -745,7 +745,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
&& (rObjData.nCalledByGroup < 2) )
)
StoreShapeOrder( pImpRec->nShapeId,
- ( ( (ULONG)pImpRec->aTextId.nTxBxS ) << 16 )
+ ( ( (sal_uLong)pImpRec->aTextId.nTxBxS ) << 16 )
+ pImpRec->aTextId.nSequence, pObj );
}
else
@@ -759,14 +759,14 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
# Spezial FastSave - Attribute
#**************************************************************************/
-void SwWW8ImplReader::Read_StyleCode( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_StyleCode( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (nLen < 0)
{
bCpxStyle = false;
return;
}
- USHORT nColl = 0;
+ sal_uInt16 nColl = 0;
if (pWwFib->GetFIBVersion() <= ww::eWW2)
nColl = *pData;
else
@@ -779,7 +779,7 @@ void SwWW8ImplReader::Read_StyleCode( USHORT, const BYTE* pData, short nLen )
}
// Read_Majority ist fuer Majority ( 103 ) und Majority50 ( 108 )
-void SwWW8ImplReader::Read_Majority( USHORT, const BYTE* , short )
+void SwWW8ImplReader::Read_Majority( sal_uInt16, const sal_uInt8* , short )
{
}
@@ -796,16 +796,16 @@ void SwWW8FltControlStack::NewAttr(const SwPosition& rPos,
SwFltControlStack::NewAttr(rPos, rAttr);
}
-void SwWW8FltControlStack::SetAttr(const SwPosition& rPos, USHORT nAttrId,
- BOOL bTstEnde, long nHand, BOOL )
+void SwWW8FltControlStack::SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId,
+ sal_Bool bTstEnde, long nHand, sal_Bool )
{
//Doing a textbox, and using the control stack only as a temporary
//collection point for properties which will are not to be set into
//the real document
if (rReader.pPlcxMan && rReader.pPlcxMan->GetDoingDrawTextBox())
{
- USHORT nCnt = static_cast< USHORT >(Count());
- for (USHORT i=0; i < nCnt; ++i)
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
+ for (sal_uInt16 i=0; i < nCnt; ++i)
{
SwFltStackEntry* pEntry = (*this)[i];
if (nAttrId == pEntry->pAttr->Which())
@@ -893,7 +893,7 @@ const SwNumFmt* SwWW8FltControlStack::GetNumFmtFromStack(const SwPosition &rPos,
if (rTxtNode.IsCountedInList())
{
const SwNumRule *pRule = pDoc->FindNumRulePtr(sName);
- BYTE nLvl = static_cast< BYTE >(rTxtNode.GetActualListLevel());
+ sal_uInt8 nLvl = static_cast< sal_uInt8 >(rTxtNode.GetActualListLevel());
pRet = &(pRule->Get(nLvl));
}
}
@@ -919,8 +919,8 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
if (pEntry->MakeRegion(pDoc, aRegion, false))
{
SvxLRSpaceItem aNewLR( *(SvxLRSpaceItem*)pEntry->pAttr );
- ULONG nStart = aRegion.Start()->nNode.GetIndex();
- ULONG nEnd = aRegion.End()->nNode.GetIndex();
+ sal_uLong nStart = aRegion.Start()->nNode.GetIndex();
+ sal_uLong nEnd = aRegion.End()->nNode.GetIndex();
for(; nStart <= nEnd; ++nStart)
{
SwNode* pNode = pDoc->GetNodes()[ nStart ];
@@ -1002,7 +1002,7 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
}
const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos,
- USHORT nWhich)
+ sal_uInt16 nWhich)
{
const SfxPoolItem *pItem = GetStackAttr(rPos, nWhich);
if (!pItem)
@@ -1035,12 +1035,12 @@ const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos,
}
const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos,
- USHORT nWhich)
+ sal_uInt16 nWhich)
{
SwNodeIndex aNode( rPos.nNode, -1 );
- USHORT nIdx = rPos.nContent.GetIndex();
+ sal_uInt16 nIdx = rPos.nContent.GetIndex();
- USHORT nSize = static_cast< USHORT >(Count());
+ sal_uInt16 nSize = static_cast< sal_uInt16 >(Count());
while (nSize)
{
const SwFltStackEntry* pEntry = (*this)[ --nSize ];
@@ -1057,10 +1057,10 @@ const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos,
return 0;
}
-bool SwWW8FltRefStack::IsFtnEdnBkmField(const SwFmtFld& rFmtFld, USHORT& rBkmNo)
+bool SwWW8FltRefStack::IsFtnEdnBkmField(const SwFmtFld& rFmtFld, sal_uInt16& rBkmNo)
{
const SwField* pFld = rFmtFld.GetFld();
- USHORT nSubType;
+ sal_uInt16 nSubType;
if(pFld && (RES_GETREFFLD == pFld->Which())
&& ((REF_FOOTNOTE == (nSubType = pFld->GetSubType())) || (REF_ENDNOTE == nSubType))
&& ((SwGetRefField*)pFld)->GetSetRefName().Len())
@@ -1099,7 +1099,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
// OD 2004-03-19 - <NOT> got lost from revision 1.128 to 1.129
if (!RefToVar(pFld,pEntry))
{
- USHORT nBkmNo;
+ sal_uInt16 nBkmNo;
if( IsFtnEdnBkmField(rFmtFld, nBkmNo) )
{
::sw::mark::IMark const * const pMark = (pDoc->getIDocumentMarkAccess()->getMarksBegin() + nBkmNo)->get();
@@ -1113,7 +1113,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
rBkMrkPos.nContent.GetIndex()-1, RES_TXTATR_FTN );
if( pFtn )
{
- USHORT nRefNo = ((SwTxtFtn*)pFtn)->GetSeqRefNo();
+ sal_uInt16 nRefNo = ((SwTxtFtn*)pFtn)->GetSeqRefNo();
((SwGetRefField*)pFld)->SetSeqNo( nRefNo );
@@ -1149,7 +1149,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
into the document. If explicit left indent exist which affects them, then this
is handled when the explict left indent is set into the document
*/
-void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if (nLen < 0)
{
@@ -1158,16 +1158,16 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
}
short i;
- const BYTE* pDel = pData + 1; // Del - Array
- BYTE nDel = pData[0];
- const BYTE* pIns = pData + 2*nDel + 2; // Ins - Array
- BYTE nIns = pData[nDel*2+1];
+ const sal_uInt8* pDel = pData + 1; // Del - Array
+ sal_uInt8 nDel = pData[0];
+ const sal_uInt8* pIns = pData + 2*nDel + 2; // Ins - Array
+ sal_uInt8 nIns = pData[nDel*2+1];
WW8_TBD* pTyp = (WW8_TBD*)(pData + 2*nDel + 2*nIns + 2);// Typ - Array
SvxTabStopItem aAttr(0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP);
const SwTxtFmtColl* pSty = 0;
- USHORT nTabBase;
+ sal_uInt16 nTabBase;
if (pAktColl) // StyleDef
{
nTabBase = pCollA[nAktColl].nBase;
@@ -1192,7 +1192,7 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
else
{
- USHORT nOldTabBase = nTabBase;
+ sal_uInt16 nOldTabBase = nTabBase;
// If based on another
if (nTabBase < nColls)
nTabBase = pCollA[nTabBase].nBase;
@@ -1220,7 +1220,7 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
SvxTabStop aTabStop;
for (i=0; i < nDel; ++i)
{
- USHORT nPos = aAttr.GetPos(SVBT16ToShort(pDel + i*2));
+ sal_uInt16 nPos = aAttr.GetPos(SVBT16ToShort(pDel + i*2));
if( nPos != SVX_TAB_NOTFOUND )
aAttr.Remove( nPos, 1 );
}
@@ -1264,7 +1264,7 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
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()
aAttr.Insert(aTabStop);
@@ -1336,7 +1336,7 @@ void SwWW8ImplReader::ImportDop()
rDoc.set(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT, false);
maTracer.Log(sw::log::eTabStopDistance);
// OD 14.10.2003 #i18732# - adjust default of option 'FollowTextFlow'
- rDoc.SetDefault( SwFmtFollowTextFlow( FALSE ) );
+ rDoc.SetDefault( SwFmtFollowTextFlow( sal_False ) );
// Import Default-Tabs
long nDefTabSiz = pWDop->dxaTab;
@@ -1344,7 +1344,7 @@ void SwWW8ImplReader::ImportDop()
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;
rDoc.GetAttrPool().SetPoolDefaultItem( aNewTab );
@@ -1380,11 +1380,11 @@ void SwWW8ImplReader::ImportDop()
rDoc.set(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS, true);
// OD 2004-03-17 #i11860# - set new compatibility option
- // 'Use former object positioning' to <FALSE>
+ // 'Use former object positioning' to <sal_False>
rDoc.set(IDocumentSettingAccess::USE_FORMER_OBJECT_POS, false);
// OD 2004-05-10 #i27767# - set new compatibility option
- // 'Conder Wrapping mode when positioning object' to <TRUE>
+ // 'Conder Wrapping mode when positioning object' to <sal_True>
rDoc.set(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION, true);
// --> FME 2004-04-22 # #108724#, #i13832#, #i24135#
@@ -1648,9 +1648,9 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
sal_uInt32 nDateTime = 0;
- if (BYTE * pExtended = pPlcxMan->GetExtendedAtrds()) // Word < 2002 has no date data for comments
+ if (sal_uInt8 * pExtended = pPlcxMan->GetExtendedAtrds()) // Word < 2002 has no date data for comments
{
- ULONG nIndex = pSD->GetIdx() & 0xFFFF; //Index is (stupidly) multiplexed for WW8PLCFx_SubDocs
+ sal_uLong nIndex = pSD->GetIdx() & 0xFFFF; //Index is (stupidly) multiplexed for WW8PLCFx_SubDocs
if (pWwFib->lcbAtrdExtra/18 > nIndex)
nDateTime = SVBT32ToUInt32(*(SVBT32*)(pExtended+(nIndex*18)));
}
@@ -1731,16 +1731,16 @@ bool SwWW8ImplReader::isValid_HdFt_CP(WW8_CP nHeaderCP) const
return (nHeaderCP < pWwFib->ccpHdr) ? true : false;
}
-bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt,
+bool SwWW8ImplReader::HasOwnHeaderFooter(sal_uInt8 nWhichItems, sal_uInt8 grpfIhdt,
int nSect)
{
if (pHdFt)
{
WW8_CP start;
long nLen;
- BYTE nNumber = 5;
+ sal_uInt8 nNumber = 5;
- for( BYTE nI = 0x20; nI; nI >>= 1, nNumber-- )
+ for( sal_uInt8 nI = 0x20; nI; nI >>= 1, nNumber-- )
{
if (nI & nWhichItems)
{
@@ -1764,7 +1764,7 @@ bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt,
void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
const SwPageDesc *pPrev, const wwSection &rSection)
{
- BYTE nWhichItems = 0;
+ sal_uInt8 nWhichItems = 0;
SwPageDesc *pPD = 0;
if (!bIsTitle)
{
@@ -1783,16 +1783,16 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
pPD = rSection.mpTitlePage;
}
- BYTE grpfIhdt = rSection.maSep.grpfIhdt;
+ sal_uInt8 grpfIhdt = rSection.maSep.grpfIhdt;
if( pHdFt )
{
WW8_CP start;
long nLen;
- BYTE nNumber = 5;
+ sal_uInt8 nNumber = 5;
- for( BYTE nI = 0x20; nI; nI >>= 1, nNumber-- )
+ for( sal_uInt8 nI = 0x20; nI; nI >>= 1, nNumber-- )
{
if (nI & nWhichItems)
{
@@ -1983,9 +1983,9 @@ bool SwWW8ImplReader::SetSpacing(SwPaM &rMyPam, int nSpace, bool bIsUpper )
SvxULSpaceItem aUL(*pULSpaceItem);
if(bIsUpper)
- aUL.SetUpper( static_cast< USHORT >(nSpace) );
+ aUL.SetUpper( static_cast< sal_uInt16 >(nSpace) );
else
- aUL.SetLower( static_cast< USHORT >(nSpace) );
+ aUL.SetLower( static_cast< sal_uInt16 >(nSpace) );
xub_StrLen nEnd = pSpacingPos->nContent.GetIndex();
rMyPam.GetPoint()->nContent.Assign(rMyPam.GetCntntNode(), 0);
@@ -2007,7 +2007,7 @@ bool SwWW8ImplReader::SetUpperSpacing(SwPaM &rMyPam, int nSpace)
return SetSpacing(rMyPam, nSpace, true);
}
-USHORT SwWW8ImplReader::TabRowSprm(int nLevel) const
+sal_uInt16 SwWW8ImplReader::TabRowSprm(int nLevel) const
{
if (bVer67)
return 25;
@@ -2074,7 +2074,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
// 1st look for in-table flag, for 2000+ there is a subtable flag to
// be considered, the sprm 6649 gives the level of the table
- BYTE nCellLevel = 0;
+ sal_uInt8 nCellLevel = 0;
if (bVer67)
nCellLevel = 0 != pPlcxMan->HasParaSprm(24);
@@ -2095,14 +2095,14 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
WW8PLCFx_Cp_FKP* pPap = pPlcxMan->GetPapPLCF();
WW8_CP nMyStartCp=nStartCp;
- if (const BYTE *pLevel = pPlcxMan->HasParaSprm(0x6649))
+ if (const sal_uInt8 *pLevel = pPlcxMan->HasParaSprm(0x6649))
nCellLevel = *pLevel;
bool bHasRowEnd = SearchRowEnd(pPap, nMyStartCp, nCellLevel-1);
//Bad Table, remain unchanged in level, e.g. #i19667#
if (!bHasRowEnd)
- nCellLevel = static_cast< BYTE >(nInTable);
+ nCellLevel = static_cast< sal_uInt8 >(nInTable);
if (bHasRowEnd && ParseTabPos(&aTabPos,pPap))
pTabPos = &aTabPos;
@@ -2130,10 +2130,10 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
if( bAnl && !bTableRowEnd )
{
- const BYTE* pSprm13 = pPlcxMan->HasParaSprm( 13 );
+ const sal_uInt8* pSprm13 = pPlcxMan->HasParaSprm( 13 );
if( pSprm13 )
{ // Noch Anl ?
- BYTE nT = static_cast< BYTE >(GetNumType( *pSprm13 ));
+ sal_uInt8 nT = static_cast< sal_uInt8 >(GetNumType( *pSprm13 ));
if( ( nT != WW8_Pause && nT != nWwNumType ) // Anl-Wechsel
|| aApo.HasStartStop() // erzwungenes Anl-Ende
|| bStopTab || bStartTab )
@@ -2392,7 +2392,7 @@ sal_Size Custom8BitToUnicode(rtl_TextToUnicodeConverter hConverter,
return nDestChars;
}
-bool SwWW8ImplReader::LangUsesHindiNumbers(USHORT nLang)
+bool SwWW8ImplReader::LangUsesHindiNumbers(sal_uInt16 nLang)
{
bool bResult = false;
@@ -2470,11 +2470,11 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
p8Bits = new sal_Char[nLen];
// read the stream data
- BYTE nBCode = 0;
- UINT16 nUCode;
+ sal_uInt8 nBCode = 0;
+ sal_uInt16 nUCode;
xub_StrLen nL2;
- USHORT nCTLLang = 0;
+ sal_uInt16 nCTLLang = 0;
const SfxPoolItem * pItem = GetFmtAttr(RES_CHRATR_CTL_LANGUAGE);
if (pItem != NULL)
nCTLLang = dynamic_cast<const SvxLanguageItem *>(pItem)->GetLanguage();
@@ -2607,7 +2607,7 @@ bool SwWW8ImplReader::ReadChars(WW8_CP& rPos, WW8_CP nNextAttr, long nTextEnd,
{
if( bSymbol ) // Spezialzeichen einfuegen
{
- for(USHORT nCh = 0; nCh < nEnd - rPos; ++nCh)
+ for(sal_uInt16 nCh = 0; nCh < nEnd - rPos; ++nCh)
{
rDoc.InsertString( *pPaM, cSymbol );
}
@@ -2640,11 +2640,11 @@ bool SwWW8ImplReader::HandlePageBreakChar()
if (!nInTable)
{
//xushanchuan add for issue106569
- BOOL IsTemp=TRUE;
+ sal_Bool IsTemp=sal_True;
SwTxtNode* pTemp = pPaM->GetNode()->GetTxtNode();
if ( pTemp && !( pTemp->GetTxt().Len() ) && ( bFirstPara || bFirstParaOfPage ) )
{
- IsTemp = FALSE;
+ IsTemp = sal_False;
AppendTxtNode(*pPaM->GetPoint());
pTemp->SetAttr(*GetDfltAttr(RES_PARATR_NUMRULE));
}
@@ -2683,8 +2683,8 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
// ob die korrekte FilePos nicht schon erreicht ist.
pStrm->Seek( pSBase->WW8Cp2Fc(nCpOfs+nPosCp, &bIsUnicode) );
- BYTE nBCode;
- UINT16 nWCharVal;
+ sal_uInt8 nBCode;
+ sal_uInt16 nWCharVal;
if( bIsUnicode )
*pStrm >> nWCharVal; // unicode --> read 2 bytes
else
@@ -2856,7 +2856,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
void SwWW8ImplReader::ProcessAktCollChange(WW8PLCFManResult& rRes,
bool* pStartAttr, bool bCallProcessSpecial)
{
- USHORT nOldColl = nAktColl;
+ sal_uInt16 nOldColl = nAktColl;
nAktColl = pPlcxMan->GetColl();
// Invalid Style-Id
@@ -2963,7 +2963,7 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTxtPos, bool& rbStartLine)
pCtrlStck->MarkAllAttrsOld();
bool bOldIgnoreText = bIgnoreText;
bIgnoreText = true;
- USHORT nOldColl = nAktColl;
+ sal_uInt16 nOldColl = nAktColl;
bool bDoPlcxManPlusPLus = true;
long nNext;
do
@@ -3036,12 +3036,12 @@ void SwWW8ImplReader::CloseAttrEnds()
{
//If there are any unclosed sprms then copy them to
//another stack and close the ones that must be closed
- std::stack<USHORT> aStack;
+ std::stack<sal_uInt16> aStack;
pPlcxMan->TransferOpenSprms(aStack);
while (!aStack.empty())
{
- USHORT nSprmId = aStack.top();
+ sal_uInt16 nSprmId = aStack.top();
if ((0 < nSprmId) && (( eFTN > nSprmId) || (0x0800 <= nSprmId)))
EndSprm(nSprmId);
aStack.pop();
@@ -3077,7 +3077,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
WW8_CP nNext = pPlcxMan->Where();
SwTxtNode* pPreviousNode = 0;
- BYTE nDropLines = 0;
+ sal_uInt8 nDropLines = 0;
SwCharFmt* pNewSwCharFmt = 0;
const SwCharFmt* pFmt = 0;
pStrm->Seek( pSBase->WW8Cp2Fc( nStartCp + nCpOfs, &bIsUnicode ) );
@@ -3120,7 +3120,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
aDrop.GetLines() = nDropLines;
aDrop.GetDistance() = nDistance;
- aDrop.GetChars() = writer_cast<BYTE>(nDropCapLen);
+ aDrop.GetChars() = writer_cast<sal_uInt8>(nDropCapLen);
// Word has no concept of a "whole word dropcap"
aDrop.GetWholeWord() = false;
@@ -3139,7 +3139,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
// If we have found a dropcap store the textnode
pPreviousNode = pPaM->GetNode()->GetTxtNode();
- const BYTE *pDCS;
+ const sal_uInt8 *pDCS;
if (bVer67)
pDCS = pPlcxMan->GetPapPLCF()->HasSprm(46);
@@ -3151,7 +3151,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
else // There is no Drop Cap Specifier hence no dropcap
pPreviousNode = 0;
- if (const BYTE *pDistance = pPlcxMan->GetPapPLCF()->HasSprm(0x842F))
+ if (const sal_uInt8 *pDistance = pPlcxMan->GetPapPLCF()->HasSprm(0x842F))
nDistance = SVBT16ToShort( pDistance );
else
nDistance = 0;
@@ -3183,7 +3183,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
// alle 64 CRs aufrufen not for Header u. ae.
if ((nCrCount++ & 0x40) == 0 && nType == MAN_MAINTEXT)
{
- nProgress = (USHORT)( l * 100 / nTextLen );
+ nProgress = (sal_uInt16)( l * 100 / nTextLen );
::SetProgressState(nProgress, mpDocShell); // Update
}
}
@@ -3238,7 +3238,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
# class SwWW8ImplReader
#**************************************************************************/
-SwWW8ImplReader::SwWW8ImplReader(BYTE nVersionPara, SvStorage* pStorage,
+SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SvStorage* pStorage,
SvStream* pSt, SwDoc& rD, const String& rBaseURL, bool bNewDoc) :
mpDocShell(rD.GetDocShell()),
maTracer(*(mpDocShell->GetMedium())),
@@ -3478,7 +3478,7 @@ SwFmtPageDesc wwSectionManager::SetSwFmtPageDesc(mySegIter &rIter,
}
else
{
- USHORT nPos = mrReader.rDoc.MakePageDesc(
+ sal_uInt16 nPos = mrReader.rDoc.MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(mnDesc)
, 0, false);
rIter->mpTitlePage = &mrReader.rDoc._GetPageDesc(nPos);
@@ -3497,7 +3497,7 @@ SwFmtPageDesc wwSectionManager::SetSwFmtPageDesc(mySegIter &rIter,
}
else
{
- USHORT nPos = mrReader.rDoc.MakePageDesc(
+ sal_uInt16 nPos = mrReader.rDoc.MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(mnDesc,
false, rIter->HasTitlePage()),
rIter->mpTitlePage, false);
@@ -3674,8 +3674,8 @@ void wwSectionManager::InsertSegments()
SwFmtPageDesc aDesc(SetSwFmtPageDesc(aIter, aStart, true));
if (aDesc.GetPageDesc())
{
- ULONG nStart = aSectPaM.Start()->nNode.GetIndex();
- ULONG nEnd = aSectPaM.End()->nNode.GetIndex();
+ sal_uLong nStart = aSectPaM.Start()->nNode.GetIndex();
+ sal_uLong nEnd = aSectPaM.End()->nNode.GetIndex();
for(; nStart <= nEnd; ++nStart)
{
SwNode* pNode = mrReader.rDoc.GetNodes()[nStart];
@@ -3793,9 +3793,9 @@ void SwWW8ImplReader::ReadDocInfo()
}
}
-ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
+sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
if (mbNewDoc && pStg && !pGloss)
ReadDocInfo();
@@ -3848,7 +3848,7 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
SwNodeIndex aSttNdIdx( rDoc.GetNodes() );
SwRelNumRuleSpaces aRelNumRule(rDoc, mbNewDoc);
- USHORT eMode = nsRedlineMode_t::REDLINE_SHOW_INSERT;
+ sal_uInt16 eMode = nsRedlineMode_t::REDLINE_SHOW_INSERT;
mpSprmParser = new wwSprmParser(pWwFib->GetFIBVersion());
@@ -4028,7 +4028,7 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
const SwTxtNode* pSttNd =
rDoc.GetNodes()[ pPos->nNode ]->GetTxtNode();
- USHORT nCntPos = pPos->nContent.GetIndex();
+ sal_uInt16 nCntPos = pPos->nContent.GetIndex();
// EinfuegePos nicht in leerer Zeile
if( nCntPos && pSttNd->GetTxt().Len() )
@@ -4041,7 +4041,7 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
}
// verhinder das Einlesen von Tabellen in Fussnoten / Tabellen
- ULONG nNd = pPos->nNode.GetIndex();
+ sal_uLong nNd = pPos->nNode.GetIndex();
bReadNoTbl = 0 != pSttNd->FindTableNode() ||
( nNd < rDoc.GetNodes().GetEndOfInserts().GetIndex() &&
rDoc.GetNodes().GetEndOfInserts().StartOfSectionIndex()
@@ -4088,9 +4088,9 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
SvxMSDffShapeTxBxSort aTxBxSort;
// korrekte Z-Order der eingelesen Escher-Objekte sicherstellen
- USHORT nShapeCount = pMSDffManager->GetShapeOrders()->Count();
+ sal_uInt16 nShapeCount = pMSDffManager->GetShapeOrders()->Count();
- for (USHORT nShapeNum=0; nShapeNum < nShapeCount; nShapeNum++)
+ for (sal_uInt16 nShapeNum=0; nShapeNum < nShapeCount; nShapeNum++)
{
SvxMSDffShapeOrder *pOrder =
pMSDffManager->GetShapeOrders()->GetObject(nShapeNum);
@@ -4099,11 +4099,11 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
aTxBxSort.Insert(pOrder);
}
// zu verkettende Rahmen jetzt verketten
- USHORT nTxBxCount = aTxBxSort.Count();
+ sal_uInt16 nTxBxCount = aTxBxSort.Count();
if( nTxBxCount )
{
SwFmtChain aChain;
- for (USHORT nTxBxNum=0; nTxBxNum < nTxBxCount; nTxBxNum++)
+ for (sal_uInt16 nTxBxNum=0; nTxBxNum < nTxBxCount; nTxBxNum++)
{
SvxMSDffShapeOrder *pOrder =
aTxBxSort.GetObject(nTxBxNum);
@@ -4215,10 +4215,10 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
return nErrRet;
}
-ULONG SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream,
+sal_uLong SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream,
SvStorageStreamRef &rDataStream)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
// 6 stands for "6 OR 7", 7 stand for "ONLY 7"
switch (pWwFib->nVersion)
{
@@ -4277,13 +4277,13 @@ namespace
void DecryptRC4(msfilter::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut)
{
rIn.Seek(STREAM_SEEK_TO_END);
- ULONG nLen = rIn.Tell();
+ sal_uLong nLen = rIn.Tell();
rIn.Seek(0);
sal_uInt8 in[WW_BLOCKSIZE];
- for (ULONG nI = 0, nBlock = 0; nI < nLen; nI += WW_BLOCKSIZE, ++nBlock)
+ for (sal_uLong nI = 0, nBlock = 0; nI < nLen; nI += WW_BLOCKSIZE, ++nBlock)
{
- ULONG nBS = (nLen - nI > WW_BLOCKSIZE) ? WW_BLOCKSIZE : nLen - nI;
+ sal_uLong nBS = (nLen - nI > WW_BLOCKSIZE) ? WW_BLOCKSIZE : nLen - nI;
rIn.Read(in, nBS);
rCtx.InitCipher(nBlock);
rCtx.Decode(in, nBS, in, nBS);
@@ -4293,18 +4293,18 @@ namespace
void DecryptXOR(msfilter::MSCodec_XorWord95 &rCtx, SvStream &rIn, SvStream &rOut)
{
- ULONG nSt = rIn.Tell();
+ sal_uLong nSt = rIn.Tell();
rIn.Seek(STREAM_SEEK_TO_END);
- ULONG nLen = rIn.Tell();
+ sal_uLong nLen = rIn.Tell();
rIn.Seek(nSt);
rCtx.InitCipher();
rCtx.Skip(nSt);
sal_uInt8 in[0x4096];
- for (ULONG nI = nSt; nI < nLen; nI += 0x4096)
+ for (sal_uLong nI = nSt; nI < nLen; nI += 0x4096)
{
- ULONG nBS = (nLen - nI > 0x4096 ) ? 0x4096 : nLen - nI;
+ sal_uLong nBS = (nLen - nI > 0x4096 ) ? 0x4096 : nLen - nI;
rIn.Read(in, nBS);
rCtx.Decode(in, nBS);
rOut.Write(in, nBS);
@@ -4321,7 +4321,7 @@ namespace
const SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem *pPasswordItem;
- if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pPasswordItem))
+ if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, sal_True, &pPasswordItem))
aPassw = ((const SfxStringItem *)pPasswordItem)->GetValue();
else
{
@@ -4435,9 +4435,9 @@ namespace
}
}
-ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
+sal_uLong SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
if (pGloss)
pWwFib = pGloss->GetFib();
else
@@ -4606,9 +4606,9 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
class outlineeq : public std::unary_function<const SwTxtFmtColl*, bool>
{
private:
- BYTE mnNum;
+ sal_uInt8 mnNum;
public:
- outlineeq(BYTE nNum) : mnNum(nNum) {}
+ outlineeq(sal_uInt8 nNum) : mnNum(nNum) {}
bool operator()(const SwTxtFmtColl *pTest) const
{
//return pTest->GetOutlineLevel() == mnNum; //#outline level,zhaojianwei
@@ -4641,7 +4641,7 @@ void SwWW8ImplReader::SetOutLineStyles()
If we are inserted into a document then don't clobber existing existing
levels.
*/
- USHORT nFlagsStyleOutlLevel = 0;
+ sal_uInt16 nFlagsStyleOutlLevel = 0;
if (!mbNewDoc)
{
// --> OD 2008-12-16 #i70748#
@@ -4671,9 +4671,9 @@ void SwWW8ImplReader::SetOutLineStyles()
// instead of the memory pointer of the outline numbering rule
// to assure that, if two outline numbering rule affect the same
// count of text formats, always the same outline numbering rule is chosen.
- std::map<USHORT, int>aRuleMap;
- typedef std::map<USHORT, int>::iterator myIter;
- for (USHORT nI = 0; nI < nColls; ++nI)
+ std::map<sal_uInt16, int>aRuleMap;
+ typedef std::map<sal_uInt16, int>::iterator myIter;
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
SwWW8StyInf& rSI = pCollA[ nI ];
if (
@@ -4732,15 +4732,15 @@ void SwWW8ImplReader::SetOutLineStyles()
}
}
- USHORT nOldFlags = nFlagsStyleOutlLevel;
+ sal_uInt16 nOldFlags = nFlagsStyleOutlLevel;
- for (USHORT nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
SwWW8StyInf& rSI = pCollA[nI];
if (rSI.IsOutlineNumbered())
{
- USHORT nAktFlags = 1 << rSI.nOutlineLevel;
+ sal_uInt16 nAktFlags = 1 << rSI.nOutlineLevel;
if (
(nAktFlags & nFlagsStyleOutlLevel) ||
(rSI.pOutlineNumrule != mpChosenOutlineNumRule)
@@ -4790,8 +4790,8 @@ void SwWW8ImplReader::SetOutLineStyles()
physical mapping into the list style reged on that outline
style.
*/
- BYTE nFromLevel = rSI.nListLevel;
- BYTE nToLevel = rSI.nOutlineLevel;
+ sal_uInt8 nFromLevel = rSI.nListLevel;
+ sal_uInt8 nToLevel = rSI.nOutlineLevel;
const SwNumFmt& rRule=rSI.pOutlineNumrule->Get(nFromLevel);
aOutlineRule.Set(nToLevel, rRule);
// Set my outline level
@@ -4829,12 +4829,12 @@ const String* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
if( bVer67 )
{
mpAtnNames->push_back(WW8ReadPString(rStrm, false));
- nRead += mpAtnNames->rbegin()->Len() + 1; // Laenge + BYTE Count
+ nRead += mpAtnNames->rbegin()->Len() + 1; // Laenge + sal_uInt8 Count
}
else
{
mpAtnNames->push_back(WW8Read_xstz(rStrm, 0, false));
- // UNICode: doppelte Laenge + USHORT Count
+ // UNICode: doppelte Laenge + sal_uInt16 Count
nRead += mpAtnNames->rbegin()->Len() * 2 + 2;
}
}
@@ -4847,9 +4847,9 @@ const String* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
return pRet;
}
-ULONG SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
+sal_uLong SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
{
static const sal_Char* aNames[ 13 ] = {
@@ -4880,7 +4880,7 @@ ULONG SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
m_bRegardHindiDigits = aVal[ 12 ] > 0;
}
- UINT16 nMagic;
+ sal_uInt16 nMagic;
*pStrm >> nMagic;
// beachte: 6 steht fuer "6 ODER 7", 7 steht fuer "NUR 7"
@@ -4896,10 +4896,10 @@ ULONG SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
//JP 06.05.99: teste auf eigenen 97-Fake!
if (pStg && 0xa5ec == nMagic)
{
- ULONG nCurPos = pStrm->Tell();
+ sal_uLong nCurPos = pStrm->Tell();
if (pStrm->Seek(nCurPos + 22))
{
- UINT32 nfcMin;
+ sal_uInt32 nfcMin;
*pStrm >> nfcMin;
if (0x300 != nfcMin)
nErrRet = ERR_WW6_NO_WW6_FILE_ERR;
@@ -4933,17 +4933,17 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportDOC()
return new WW8Reader();
}
-ULONG WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & /* FileName */)
+sal_uLong WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & /* FileName */)
{
- USHORT nOldBuffSize = 32768;
+ sal_uInt16 nOldBuffSize = 32768;
bool bNew = !bInsertMode; // Neues Doc ( kein Einfuegen )
SvStorageStreamRef refStrm; // damit uns keiner den Stream klaut
SvStream* pIn = pStrm;
- ULONG nRet = 0;
- BYTE nVersion = 8;
+ sal_uLong nRet = 0;
+ sal_uInt8 nVersion = 8;
String sFltName = GetFltName();
if( sFltName.EqualsAscii( "WW6" ) )
@@ -5015,18 +5015,18 @@ int WW8Reader::GetReaderType()
return SW_STORAGE_READER | SW_STREAM_READER;
}
-BOOL WW8Reader::HasGlossaries() const
+sal_Bool WW8Reader::HasGlossaries() const
{
return true;
}
-BOOL WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, BOOL bSaveRelFiles) const
+sal_Bool WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, sal_Bool bSaveRelFiles) const
{
bool bRet=false;
WW8Reader *pThis = const_cast<WW8Reader *>(this);
- USHORT nOldBuffSize = 32768;
+ sal_uInt16 nOldBuffSize = 32768;
SvStorageStreamRef refStrm;
if (!pThis->OpenMainStream(refStrm, nOldBuffSize))
{
@@ -5036,7 +5036,7 @@ BOOL WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, BOOL bSaveRelFiles) const
return bRet ? true : false;
}
-BOOL SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
+sal_Bool SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
SvStorageRef& rSrcStorage, uno::Reference < embed::XStorage >& rDestStorage) const
{
bool bRet = false;
@@ -5077,12 +5077,12 @@ BOOL SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
if (aDesc.nSprmsLen && aDesc.pMemPos) // Attribut(e) vorhanden
{
long nLen = aDesc.nSprmsLen;
- const BYTE* pSprm = aDesc.pMemPos;
+ const sal_uInt8* pSprm = aDesc.pMemPos;
while (nLen >= 2 && !nPictureId)
{
- USHORT nId = aSprmParser.GetSprmId(pSprm);
- USHORT nSL = aSprmParser.GetSprmSize(nId, pSprm);
+ sal_uInt16 nId = aSprmParser.GetSprmId(pSprm);
+ sal_uInt16 nSL = aSprmParser.GetSprmSize(nId, pSprm);
if( nLen < nSL )
break; // nicht mehr genug Bytes uebrig
@@ -5121,7 +5121,7 @@ BOOL SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
return bRet;
}
-BOOL SwMSDffManager::ShapeHasText(ULONG, ULONG) const
+sal_Bool SwMSDffManager::ShapeHasText(sal_uLong, sal_uLong) const
{
// Zur Zeit des Einlesens einer einzelnen Box, die womoeglich Teil einer
// Gruppe ist, liegen noch nicht genuegend Informationen vor, um
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index c87035f208a1..1de503093141 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -147,12 +147,12 @@ SV_DECL_PTRARR_SORT_DEL(WW8OleMaps, WW8OleMap_Ptr,16,16)
class WW8Reader : public StgReader
{
- 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();
- 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;
};
struct WW8OleMap
@@ -186,7 +186,7 @@ public:
enum ListLevel {nMinLevel=1, nMaxLevel=9};
//the rParaSprms returns back the original word paragraph indent
//sprms which were attached to the original numbering format
- SwNumRule* GetNumRuleForActivation(USHORT nLFOPosition, const BYTE nLevel,
+ SwNumRule* GetNumRuleForActivation(sal_uInt16 nLFOPosition, const sal_uInt8 nLevel,
std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode=0);
SwNumRule* CreateNextRule(bool bSimple);
~WW8ListManager();
@@ -198,12 +198,12 @@ private:
SvStream& rSt;
std::vector<WW8LSTInfo* > maLSTInfos;
WW8LFOInfos* pLFOInfos;// D. aus PLF LFO, sortiert genau wie im WW8 Stream
- USHORT nUniqueList; // current number for creating unique list names
- BYTE* GrpprlHasSprm(USHORT nId, BYTE& rSprms, BYTE nLen);
+ sal_uInt16 nUniqueList; // current number for creating unique list names
+ sal_uInt8* GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms, sal_uInt8 nLen);
WW8LSTInfo* GetLSTByListId( sal_uInt32 nIdLst ) const;
//the rParaSprms returns back the original word paragraph indent
//sprms which are attached to this numbering level
- bool ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, USHORT nLevelStyle,
+ bool ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, sal_uInt16 nLevelStyle,
bool bSetStartNo, std::deque<bool> &rNotReallyThere, sal_uInt16 nLevel,
std::vector<sal_uInt8> &rParaSprms);
@@ -212,7 +212,7 @@ private:
// Zeichen Style Pointer
typedef SwCharFmt* WW8aCFmt[nMaxLevel];
- void AdjustLVL(BYTE nLevel, SwNumRule& rNumRule, WW8aISet& rListItemSet,
+ void AdjustLVL(sal_uInt8 nLevel, SwNumRule& rNumRule, WW8aISet& rListItemSet,
WW8aCFmt& aCharFmt, bool& bNewCharFmtCreated,
String aPrefix = aEmptyStr);
@@ -229,8 +229,8 @@ class SwWW8FltControlStack : public SwFltControlStack
{
private:
SwWW8ImplReader& rReader;
- USHORT nToggleAttrFlags;
- USHORT nToggleBiDiAttrFlags;
+ sal_uInt16 nToggleAttrFlags;
+ sal_uInt16 nToggleBiDiAttrFlags;
//No copying
SwWW8FltControlStack(const SwWW8FltControlStack&);
SwWW8FltControlStack& operator=(const SwWW8FltControlStack&);
@@ -241,16 +241,16 @@ protected:
SwFltStackEntry* pEntry);
public:
- SwWW8FltControlStack(SwDoc* pDo, ULONG nFieldFl, SwWW8ImplReader& rReader_ )
+ SwWW8FltControlStack(SwDoc* pDo, sal_uLong nFieldFl, SwWW8ImplReader& rReader_ )
: SwFltControlStack( pDo, nFieldFl ), rReader( rReader_ ),
nToggleAttrFlags(0), nToggleBiDiAttrFlags(0)
{}
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 SetToggleAttr(BYTE nId, bool bOn)
+ void SetToggleAttr(sal_uInt8 nId, bool bOn)
{
if( bOn )
nToggleAttrFlags |= (1 << nId);
@@ -258,9 +258,9 @@ public:
nToggleAttrFlags &= ~(1 << nId);
}
- USHORT GetToggleAttrFlags() const { return nToggleAttrFlags; }
+ sal_uInt16 GetToggleAttrFlags() const { return nToggleAttrFlags; }
- void SetToggleBiDiAttr(BYTE nId, bool bOn)
+ void SetToggleBiDiAttr(sal_uInt8 nId, bool bOn)
{
if( bOn )
nToggleBiDiAttrFlags |= (1 << nId);
@@ -268,12 +268,12 @@ public:
nToggleBiDiAttrFlags &= ~(1 << nId);
}
- USHORT GetToggleBiDiAttrFlags() const { return nToggleBiDiAttrFlags; }
- void SetToggleAttrFlags(USHORT nFlags) { nToggleAttrFlags = nFlags; }
- void SetToggleBiDiAttrFlags(USHORT nFlags) {nToggleBiDiAttrFlags = nFlags;}
+ sal_uInt16 GetToggleBiDiAttrFlags() const { return nToggleBiDiAttrFlags; }
+ void SetToggleAttrFlags(sal_uInt16 nFlags) { nToggleAttrFlags = nFlags; }
+ void SetToggleBiDiAttrFlags(sal_uInt16 nFlags) {nToggleBiDiAttrFlags = nFlags;}
- const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, USHORT nWhich);
- const SfxPoolItem* GetStackAttr(const SwPosition& rPos, USHORT nWhich);
+ const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich);
+ const SfxPoolItem* GetStackAttr(const SwPosition& rPos, sal_uInt16 nWhich);
};
//The only thing this is for is RES_FLTR_ANCHOR, anything else is an error.
@@ -282,7 +282,7 @@ public:
class SwWW8FltAnchorStack : public SwFltControlStack
{
public:
- SwWW8FltAnchorStack(SwDoc* pDo, ULONG nFieldFl)
+ SwWW8FltAnchorStack(SwDoc* pDo, sal_uLong nFieldFl)
: SwFltControlStack( pDo, nFieldFl ) {}
void AddAnchor(const SwPosition& rPos,SwFrmFmt *pFmt);
void Flush();
@@ -311,10 +311,10 @@ private:
class SwWW8FltRefStack : public SwFltEndStack
{
public:
- SwWW8FltRefStack(SwDoc* pDo, ULONG nFieldFl)
+ SwWW8FltRefStack(SwDoc* pDo, sal_uLong nFieldFl)
: SwFltEndStack( pDo, nFieldFl )
{}
- bool IsFtnEdnBkmField(const SwFmtFld& rFmtFld, USHORT& rBkmNo);
+ bool IsFtnEdnBkmField(const SwFmtFld& rFmtFld, sal_uInt16& rBkmNo);
struct ltstr
{
@@ -403,7 +403,7 @@ private:
const SwNumRule* mpPrevNumRule;
WW8TabDesc* mpTableDesc;
int mnInTable;
- USHORT mnAktColl;
+ sal_uInt16 mnAktColl;
sal_Unicode mcSymbol;
bool mbIgnoreText;
bool mbSymbol;
@@ -459,19 +459,19 @@ public:
fUnused(0), nSize(0), hpsCheckBox(20), nChecked(0)
{
}
- UINT8 fUnknown:2;
- UINT8 fDropdownIndex:6;
- UINT8 fToolTip:1;
- UINT8 fNoMark:1;
- UINT8 fUseSize:1;
- UINT8 fNumbersOnly:1;
- UINT8 fDateOnly:1;
- UINT8 fUnused:3;
- UINT16 nSize;
-
- UINT16 hpsCheckBox;
- UINT16 nChecked;
- UINT16 nDefaultChecked;
+ sal_uInt8 fUnknown:2;
+ sal_uInt8 fDropdownIndex:6;
+ sal_uInt8 fToolTip:1;
+ sal_uInt8 fNoMark:1;
+ sal_uInt8 fUseSize:1;
+ sal_uInt8 fNumbersOnly:1;
+ sal_uInt8 fDateOnly:1;
+ sal_uInt8 fUnused:3;
+ sal_uInt16 nSize;
+
+ sal_uInt16 hpsCheckBox;
+ sal_uInt16 nChecked;
+ sal_uInt16 nDefaultChecked;
String sTitle;
String sDefault;
@@ -554,7 +554,7 @@ public:
com::sun::star::form::XFormComponent >& rFComp,
const ::com::sun::star::awt::Size& rSize,
com::sun::star::uno::Reference <
- com::sun::star::drawing::XShape > *pShape,BOOL bFloatingCtrl);
+ com::sun::star::drawing::XShape > *pShape,sal_Bool bFloatingCtrl);
bool ExportControl(WW8Export &rWrt, const SdrObject *pObj);
};
@@ -565,9 +565,9 @@ private:
SvStream *pFallbackStream;
List *pOldEscherBlipCache;
- virtual BOOL GetOLEStorageName( long nOLEId, String& rStorageName,
+ virtual sal_Bool GetOLEStorageName( long nOLEId, String& rStorageName,
SvStorageRef& rSrcStorage, com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rDestStorage ) const;
- virtual BOOL ShapeHasText( ULONG nShapeId, ULONG nFilePos ) const;
+ virtual sal_Bool ShapeHasText( sal_uLong nShapeId, sal_uLong nFilePos ) const;
// --> OD 2004-12-14 #i32596# - new parameter <_nCalledByGroup>, which
// indicates, if the OLE object is imported inside a group object
virtual SdrObject* ImportOLE( long nOLEId,
@@ -582,9 +582,9 @@ private:
SwMSDffManager(const SwMSDffManager&);
SwMSDffManager& operator=(const SwMSDffManager&);
public:
- static UINT32 GetFilterFlags();
- static INT32 GetEscherLineMatch(MSO_LineStyle eStyle, MSO_SPT eShapeType,
- INT32 &rThick);
+ static sal_uInt32 GetFilterFlags();
+ static sal_Int32 GetEscherLineMatch(MSO_LineStyle eStyle, MSO_SPT eShapeType,
+ sal_Int32 &rThick);
SwMSDffManager( SwWW8ImplReader& rRdr );
void DisableFallbackStream();
void EnableFallbackStream();
@@ -610,7 +610,7 @@ public:
sal_uInt32 nPgLeft;
sal_uInt32 nPgRight;
- BYTE mnBorders;
+ sal_uInt8 mnBorders;
bool mbHasFootnote;
void SetDirection();
void SetLinkId(short sLinkId) { mLinkId = sLinkId; }
@@ -698,7 +698,7 @@ public:
bool CurrentSectionIsVertical() const;
bool CurrentSectionIsProtected() const;
void PrependedInlineNode(const SwPosition &rPos, const SwNode &rNode);
- USHORT CurrentSectionColCount() const;
+ sal_uInt16 CurrentSectionColCount() const;
bool WillHavePageDescHere(SwNodeIndex aIdx) const;
void CreateSep(const long nTxtPos, bool bMustHaveBreak);
void InsertSegments();
@@ -758,8 +758,8 @@ struct ApoTestResults
{
bool mbStartApo;
bool mbStopApo;
- const BYTE* mpSprm37;
- const BYTE* mpSprm29;
+ const sal_uInt8* mpSprm37;
+ const sal_uInt8* mpSprm29;
WW8FlyPara* mpStyleApo;
ApoTestResults() :
mbStartApo(false), mbStopApo(false), mpSprm37(0), mpSprm29(0),
@@ -772,8 +772,8 @@ struct ANLDRuleMap
{
SwNumRule* mpOutlineNumRule; // WinWord 6 numbering, varient 1
SwNumRule* mpNumberingNumRule; // WinWord 6 numbering, varient 2
- SwNumRule* GetNumRule(BYTE nNumType);
- void SetNumRule(SwNumRule*, BYTE nNumType);
+ SwNumRule* GetNumRule(sal_uInt8 nNumType);
+ void SetNumRule(SwNumRule*, sal_uInt8 nNumType);
ANLDRuleMap() : mpOutlineNumRule(0), mpNumberingNumRule(0) {}
};
@@ -991,29 +991,29 @@ private:
String sBaseURL;
// Ini-Flags:
- ULONG nIniFlags; // Flags aus der writer.ini
- ULONG nIniFlags1; // dito ( zusaetzliche Flags )
- ULONG nFieldFlags; // dito fuer Feldern
- ULONG nFieldTagAlways[3]; // dito fuers Taggen von Feldern
- ULONG nFieldTagBad[3]; // dito fuers Taggen von nicht importierbaren F.
+ sal_uLong nIniFlags; // Flags aus der writer.ini
+ sal_uLong nIniFlags1; // dito ( zusaetzliche Flags )
+ sal_uLong nFieldFlags; // dito fuer Feldern
+ sal_uLong nFieldTagAlways[3]; // dito fuers Taggen von Feldern
+ sal_uLong nFieldTagBad[3]; // dito fuers Taggen von nicht importierbaren F.
bool m_bRegardHindiDigits; // import digits in CTL scripts as Hindi numbers
WW8_CP nDrawCpO; // Anfang der Txbx-SubDocs
- ULONG nPicLocFc; // Picture Location in File (FC)
- ULONG nObjLocFc; // Object Location in File (FC)
+ sal_uLong nPicLocFc; // Picture Location in File (FC)
+ sal_uLong nObjLocFc; // Object Location in File (FC)
- INT32 nIniFlyDx; // X-Verschiebung von Flys
- INT32 nIniFlyDy; // Y-Verschiebung von Flys
+ sal_Int32 nIniFlyDx; // X-Verschiebung von Flys
+ sal_Int32 nIniFlyDy; // Y-Verschiebung von Flys
rtl_TextEncoding eTextCharSet; // Default charset for Text
rtl_TextEncoding eStructCharSet; // rtl_TextEncoding for structures
rtl_TextEncoding eHardCharSet; // Hard rtl_TextEncoding-Attribute
- USHORT nProgress; // %-Angabe fuer Progressbar
- USHORT nColls; // Groesse des Arrays
- USHORT nAktColl; // gemaess WW-Zaehlung
- USHORT nFldNum; // laufende Nummer dafuer
- USHORT nLFOPosition;
+ sal_uInt16 nProgress; // %-Angabe fuer Progressbar
+ sal_uInt16 nColls; // Groesse des Arrays
+ sal_uInt16 nAktColl; // gemaess WW-Zaehlung
+ sal_uInt16 nFldNum; // laufende Nummer dafuer
+ sal_uInt16 nLFOPosition;
short nCharFmt; // gemaess WW-Zaehlung, <0 fuer keine
@@ -1023,16 +1023,16 @@ private:
sal_Unicode cSymbol; // aktuell einzulesendes Symbolzeichen
- BYTE nWantedVersion; // urspruenglich vom Writer
+ sal_uInt8 nWantedVersion; // urspruenglich vom Writer
// angeforderte WW-Doc-Version
- BYTE nSwNumLevel; // LevelNummer fuer Outline / Nummerierung
- BYTE nWwNumType; // Gliederung / Nummerg / Aufzaehlg
- BYTE nListLevel;
+ sal_uInt8 nSwNumLevel; // LevelNummer fuer Outline / Nummerierung
+ sal_uInt8 nWwNumType; // Gliederung / Nummerg / Aufzaehlg
+ sal_uInt8 nListLevel;
- BYTE nPgChpDelim; // ChapterDelim from PageNum
- BYTE nPgChpLevel; // ChapterLevel of Heading from PageNum
+ sal_uInt8 nPgChpDelim; // ChapterDelim from PageNum
+ sal_uInt8 nPgChpLevel; // ChapterLevel of Heading from PageNum
bool mbNewDoc; // Neues Dokument ?
bool bReadNoTbl; // Keine Tabellen
@@ -1097,10 +1097,10 @@ private:
//---------------------------------------------
- const SprmReadInfo& GetSprmReadInfo(USHORT nId) const;
+ const SprmReadInfo& GetSprmReadInfo(sal_uInt16 nId) const;
bool StyleExists(int nColl) const { return (nColl < nColls); }
- SwWW8StyInf *GetStyle(USHORT nColl) const;
+ SwWW8StyInf *GetStyle(sal_uInt16 nColl) const;
void AppendTxtNode(SwPosition& rPos);
void Read_HdFt(bool bIsTitle, int nSect, const SwPageDesc *pPrev,
@@ -1111,12 +1111,12 @@ private:
bool isValid_HdFt_CP(WW8_CP nHeaderCP) const;
- bool HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt, int nSect);
+ bool HasOwnHeaderFooter(sal_uInt8 nWhichItems, sal_uInt8 grpfIhdt, int nSect);
void HandleLineNumbering(const wwSection &rSection);
void CopyPageDescHdFt( const SwPageDesc* pOrgPageDesc,
- SwPageDesc* pNewPageDesc, BYTE nCode );
+ SwPageDesc* pNewPageDesc, sal_uInt8 nCode );
void DeleteStk(SwFltControlStack* prStck);
void DeleteCtrlStk() { DeleteStk( pCtrlStck ); pCtrlStck = 0; }
@@ -1133,7 +1133,7 @@ private:
bool ReadChar(long nPosCp, long nCpOfs);
bool ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs);
bool ReadChars(WW8_CP& rPos, WW8_CP nNextAttr, long nTextEnd, long nCpOfs);
- bool LangUsesHindiNumbers(USHORT nLang);
+ bool LangUsesHindiNumbers(sal_uInt16 nLang);
sal_Unicode TranslateToHindiNumbers(sal_Unicode);
void SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection);
@@ -1145,15 +1145,15 @@ private:
void CloseAttrEnds();
bool ReadText(long nStartCp, long nTextLen, ManTypes nType);
- void ReadRevMarkAuthorStrTabl( SvStream& rStrm, INT32 nTblPos,
- INT32 nTblSiz, SwDoc& rDoc );
+ void ReadRevMarkAuthorStrTabl( SvStream& rStrm, sal_Int32 nTblPos,
+ sal_Int32 nTblSiz, SwDoc& rDoc );
void Read_HdFtFtnText( const SwNodeIndex* pSttIdx, long nStartCp,
long nLen, ManTypes nType );
void ImportTox( int nFldId, String aStr );
- void EndSprm( USHORT nId );
+ void EndSprm( sal_uInt16 nId );
// --> OD 2010-05-06 #i103711#
// --> OD 2010-05-11 #i105414#
void NewAttr( const SfxPoolItem& rAttr,
@@ -1161,14 +1161,14 @@ private:
const bool bLeftIndentSet = false );
// <--
- bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&,
+ bool GetFontParams(sal_uInt16, FontFamily&, String&, FontPitch&,
rtl_TextEncoding&);
- bool SetNewFontAttr(USHORT nFCode, bool bSetEnums, USHORT nWhich);
- USHORT CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich);
+ bool SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums, sal_uInt16 nWhich);
+ sal_uInt16 CorrectResIdForCharset(CharSet nCharSet, sal_uInt16 nWhich);
void ResetCharSetVars();
void ResetCJKCharSetVars();
- const SfxPoolItem* GetFmtAttr( USHORT nWhich );
+ const SfxPoolItem* GetFmtAttr( sal_uInt16 nWhich );
bool JoinNode(SwPaM &rPam, bool bStealAttr = false);
bool IsBorder(const WW8_BRC* pbrc, bool bChkBtwn = false) const;
@@ -1182,10 +1182,10 @@ private:
// #i20672# we can't properly support between lines so best to ignore
// them for now
bool SetBorder(SvxBoxItem& rBox, const WW8_BRC* pbrc, short *pSizeArray=0,
- BYTE nSetBorders=0xFF, bool bChkBtwn = false) const;
+ sal_uInt8 nSetBorders=0xFF, bool bChkBtwn = false) const;
#endif
bool SetBorder(SvxBoxItem& rBox, const WW8_BRC* pbrc, short *pSizeArray=0,
- BYTE nSetBorders=0xFF) const;
+ sal_uInt8 nSetBorders=0xFF) const;
void GetBorderDistance(const WW8_BRC* pbrc, Rectangle& rInnerDist) const;
sal_uInt16 GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing);
bool SetShadow(SvxShadowItem& rShadow, const short *pSizeArray,
@@ -1195,8 +1195,8 @@ private:
short *SizeArray=0) const;
void SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) const;
- INT32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor,
- MSO_LineStyle eLineStyle, MSO_SPT eShapeType, INT32 &rLineWidth,
+ sal_Int32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor,
+ MSO_LineStyle eLineStyle, MSO_SPT eShapeType, sal_Int32 &rLineWidth,
SvxBoxItem& rBox );
void MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, SfxItemSet &aFlySet,
MSO_LineStyle eLineStyle, MSO_SPT eShapeType, Rectangle &rInnerDist );
@@ -1222,10 +1222,10 @@ private:
void EndSpecial();
bool ProcessSpecial(bool &rbReSync, WW8_CP nStartCp);
- USHORT TabRowSprm(int nLevel) const;
+ sal_uInt16 TabRowSprm(int nLevel) const;
bool ReadGrafFile(String& rFileName, Graphic*& rpGraphic,
- const WW8_PIC& rPic, SvStream* pSt, ULONG nFilePos, bool* pDelIt);
+ const WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos, bool* pDelIt);
void ReplaceObj(const SdrObject &rReplaceTextObj,
SdrObject &rSubObj);
@@ -1239,7 +1239,7 @@ private:
const SfxItemSet& rGrfSet);
SwFrmFmt *AddAutoAnchor(SwFrmFmt *pFmt);
- SwFrmFmt* ImportGraf1(WW8_PIC& rPic, SvStream* pSt, ULONG nFilePos);
+ SwFrmFmt* ImportGraf1(WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos);
SwFrmFmt* ImportGraf(SdrTextObj* pTextObj = 0, SwFrmFmt* pFlyFmt = 0);
SdrObject* ImportOleBase( Graphic& rGraph, const Graphic* pGrf=0,
@@ -1258,9 +1258,9 @@ private:
//This converts MS Asian Typography information into OOo's
void ImportDopTypography(const WW8DopTypography &rTypo);
- ULONG LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss);
- ULONG SetSubStreams(SvStorageStreamRef &rTableStream, SvStorageStreamRef &rDataStream);
- ULONG CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos);
+ sal_uLong LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss);
+ sal_uLong SetSubStreams(SvStorageStreamRef &rTableStream, SvStorageStreamRef &rDataStream);
+ sal_uLong CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos);
void ReadDocVars();
@@ -1283,16 +1283,16 @@ private:
// verwaltet werden: rglst, hpllfo und hsttbListNames
// die Strukturen hierfuer sind: LSTF, LVLF, LFO LFOLVL
- void SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV, const BYTE* pTxt,
+ void SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV, const sal_uInt8* pTxt,
bool bOutline);
- void SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, BYTE nSwLevel, bool bOutLine);
- void SetNumOlst( SwNumRule* pNumR, WW8_OLST* pO, BYTE nSwLevel );
+ void SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, sal_uInt8 nSwLevel, bool bOutLine);
+ void SetNumOlst( SwNumRule* pNumR, WW8_OLST* pO, sal_uInt8 nSwLevel );
SwNumRule* GetStyRule();
- void StartAnl(const BYTE* pSprm13);
- void NextAnlLine(const BYTE* pSprm13);
+ void StartAnl(const sal_uInt8* pSprm13);
+ void NextAnlLine(const sal_uInt8* pSprm13);
void StopAllAnl(bool bGoBack = true);
- void StopAnlToRestart(BYTE nType, bool bGoBack = true);
+ void StopAnlToRestart(sal_uInt8 nType, bool bGoBack = true);
// GrafikLayer
@@ -1309,20 +1309,20 @@ private:
SdrObject *ReadPolyLine(WW8_DPHEAD* pHd, const WW8_DO* pDo,
SfxAllItemSet &rSet);
ESelection GetESelection( long nCpStart, long nCpEnd );
- void InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl );
+ void InsertTxbxStyAttrs( SfxItemSet& rS, sal_uInt16 nColl );
void InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp, ManTypes eType, bool bONLYnPicLocFc=false);
- bool GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp, USHORT nTxBxS,
- USHORT nSequence);
+ bool GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp, sal_uInt16 nTxBxS,
+ sal_uInt16 nSequence);
bool GetRangeAsDrawingString(String& rString, long StartCp, long nEndCp, ManTypes eType);
OutlinerParaObject* ImportAsOutliner(String &rString, WW8_CP nStartCp, WW8_CP nEndCp, ManTypes eType);
SwFrmFmt* InsertTxbxText(SdrTextObj* pTextObj, Size* pObjSiz,
- USHORT nTxBxS, USHORT nSequence, long nPosCp, SwFrmFmt* pFlyFmt,
+ sal_uInt16 nTxBxS, sal_uInt16 nSequence, long nPosCp, SwFrmFmt* pFlyFmt,
bool bMakeSdrGrafObj, bool& rbEraseTextObj,
bool* pbTestTxbxContainsText = 0, long* pnStartCp = 0,
long* pnEndCp = 0, bool* pbContainsGraphics = 0,
SvxMSDffImportRec* pRecord = 0);
- bool TxbxChainContainsRealText( USHORT nTxBxS,
+ bool TxbxChainContainsRealText( sal_uInt16 nTxBxS,
long& rStartCp,
long& rEndCp );
SdrObject *ReadTxtBox(WW8_DPHEAD* pHd, const WW8_DO* pDo,
@@ -1358,39 +1358,39 @@ private:
void UpdateFields();
void ConvertFFileName( String& rName, const String& rRaw );
long Read_F_Tag( WW8FieldDesc* pF );
- void InsertTagField( const USHORT nId, const String& rTagText );
+ void InsertTagField( const sal_uInt16 nId, const String& rTagText );
long ImportExtSprm(WW8PLCFManResult* pRes);
- void EndExtSprm(USHORT nSprmId);
+ void EndExtSprm(sal_uInt16 nSprmId);
void ReadDocInfo();
// Ver8-Listen
- void RegisterNumFmtOnTxtNode(USHORT nActLFO, BYTE nActLevel,
+ void RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO, sal_uInt8 nActLevel,
bool bSetAttr = true);
- void RegisterNumFmtOnStyle(USHORT nStyle);
+ void RegisterNumFmtOnStyle(sal_uInt16 nStyle);
void SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO,
sal_uInt8 nActLevel);
- void RegisterNumFmt(USHORT nActLFO, BYTE nActLevel);
+ void RegisterNumFmt(sal_uInt16 nActLFO, sal_uInt8 nActLevel);
// spaeter zu ersetzen durch Aufruf in entsprechend erweiterten SvxMSDffManager
const String* GetAnnotationAuthor(sal_uInt16 nIdx);
// Schnittstellen fuer die Toggle-Attribute
- void SetToggleAttr(BYTE nAttrId, bool bOn);
- void SetToggleBiDiAttr(BYTE nAttrId, bool bOn);
- void _ChkToggleAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask );
+ void SetToggleAttr(sal_uInt8 nAttrId, bool bOn);
+ void SetToggleBiDiAttr(sal_uInt8 nAttrId, bool bOn);
+ void _ChkToggleAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask );
- void ChkToggleAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask )
+ void ChkToggleAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask )
{
if( nOldStyle81Mask != nNewStyle81Mask &&
pCtrlStck->GetToggleAttrFlags() )
_ChkToggleAttr( nOldStyle81Mask, nNewStyle81Mask );
}
- void _ChkToggleBiDiAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask );
+ void _ChkToggleBiDiAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask );
- void ChkToggleBiDiAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask )
+ void ChkToggleBiDiAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask )
{
if( nOldStyle81Mask != nNewStyle81Mask &&
pCtrlStck->GetToggleBiDiAttrFlags() )
@@ -1415,17 +1415,17 @@ private:
// --> OD 2008-04-10 #i84783#
// determine object attribute "Layout in Table Cell"
- bool IsObjectLayoutInTableCell( const UINT32 nLayoutInTableCell ) const;
+ bool IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const;
// <--
//No copying
SwWW8ImplReader(const SwWW8ImplReader &);
SwWW8ImplReader& operator=(const SwWW8ImplReader&);
public: // eigentlich private, geht aber leider nur public
- USHORT GetToggleAttrFlags() const;
- USHORT GetToggleBiDiAttrFlags() const;
- void SetToggleAttrFlags(USHORT nFlags);
- void SetToggleBiDiAttrFlags(USHORT nFlags);
+ sal_uInt16 GetToggleAttrFlags() const;
+ sal_uInt16 GetToggleBiDiAttrFlags() const;
+ void SetToggleAttrFlags(sal_uInt16 nFlags);
+ void SetToggleBiDiAttrFlags(sal_uInt16 nFlags);
long Read_Ftn(WW8PLCFManResult* pRes);
@@ -1437,100 +1437,100 @@ public: // eigentlich private, geht aber leider nur public
// Attribute
- void Read_Special(USHORT, const BYTE*, short nLen);
- void Read_Obj(USHORT, const BYTE*, short nLen);
- void Read_PicLoc(USHORT, const BYTE* pData, short nLen );
- void Read_BoldUsw(USHORT nId, const BYTE*, short nLen);
- void Read_Bidi(USHORT nId, const BYTE*, short nLen);
- void Read_BoldBiDiUsw(USHORT nId, const BYTE*, short nLen);
- void Read_SubSuper( USHORT, const BYTE*, short nLen );
+ void Read_Special(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_Obj(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_PicLoc(sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_BoldUsw(sal_uInt16 nId, const sal_uInt8*, short nLen);
+ void Read_Bidi(sal_uInt16 nId, const sal_uInt8*, short nLen);
+ void Read_BoldBiDiUsw(sal_uInt16 nId, const sal_uInt8*, short nLen);
+ void Read_SubSuper( sal_uInt16, const sal_uInt8*, short nLen );
bool ConvertSubToGraphicPlacement();
SwFrmFmt *ContainsSingleInlineGraphic(const SwPaM &rRegion);
- void Read_SubSuperProp( USHORT, const BYTE*, short nLen );
- void Read_Underline( USHORT, const BYTE*, short nLen );
- void Read_TxtColor( USHORT, const BYTE*, short nLen );
- void Read_FontCode( USHORT, const BYTE*, short nLen );
- void Read_FontSize( USHORT, const BYTE*, short nLen );
- void Read_CharSet(USHORT , const BYTE* pData, short nLen);
- void Read_Language( USHORT, const BYTE*, short nLen );
- void Read_CColl( USHORT, const BYTE*, short nLen );
- void Read_Kern( USHORT, const BYTE* pData, short nLen );
- void Read_FontKern( USHORT, const BYTE* pData, short nLen );
- void Read_Emphasis( USHORT, const BYTE* pData, short nLen );
- void Read_ScaleWidth( USHORT, const BYTE* pData, short nLen );
- void Read_Relief( USHORT, const BYTE* pData, short nLen);
- void Read_TxtAnim( USHORT, const BYTE* pData, short nLen);
-
- void Read_NoLineNumb( USHORT nId, const BYTE* pData, short nLen );
-
- void Read_LR( USHORT nId, const BYTE*, short nLen );
- void Read_UL( USHORT nId, const BYTE*, short nLen );
- void Read_ParaAutoBefore(USHORT , const BYTE *pData, short nLen);
- void Read_ParaAutoAfter(USHORT , const BYTE *pData, short nLen);
- void Read_DontAddEqual(USHORT , const BYTE *pData, short nLen);
- void Read_LineSpace( USHORT, const BYTE*, short nLen );
- void Read_Justify(USHORT, const BYTE*, short nLen);
- void Read_IdctHint(USHORT, const BYTE*, short nLen);
+ void Read_SubSuperProp( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_Underline( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_TxtColor( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_FontCode( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_FontSize( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_CharSet(sal_uInt16 , const sal_uInt8* pData, short nLen);
+ void Read_Language( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_CColl( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_Kern( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_FontKern( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_Emphasis( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_ScaleWidth( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_Relief( sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_TxtAnim( sal_uInt16, const sal_uInt8* pData, short nLen);
+
+ void Read_NoLineNumb( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
+
+ void Read_LR( sal_uInt16 nId, const sal_uInt8*, short nLen );
+ void Read_UL( sal_uInt16 nId, const sal_uInt8*, short nLen );
+ void Read_ParaAutoBefore(sal_uInt16 , const sal_uInt8 *pData, short nLen);
+ void Read_ParaAutoAfter(sal_uInt16 , const sal_uInt8 *pData, short nLen);
+ void Read_DontAddEqual(sal_uInt16 , const sal_uInt8 *pData, short nLen);
+ void Read_LineSpace( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_Justify(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_IdctHint(sal_uInt16, const sal_uInt8*, short nLen);
bool IsRightToLeft();
- void Read_RTLJustify(USHORT, const BYTE*, short nLen);
- void Read_Hyphenation( USHORT, const BYTE* pData, short nLen );
- void Read_WidowControl( USHORT, const BYTE* pData, short nLen );
- void Read_AlignFont( USHORT, const BYTE* pData, short nLen );
- void Read_UsePgsuSettings( USHORT, const BYTE* pData, short nLen );
- void Read_KeepLines( USHORT, const BYTE* pData, short nLen );
- void Read_KeepParas( USHORT, const BYTE* pData, short nLen );
- void Read_BreakBefore( USHORT, const BYTE* pData, short nLen );
- void Read_Apo(USHORT nId, const BYTE* pData, short nLen);
- void Read_ApoPPC(USHORT, const BYTE* pData, short);
-
- void Read_BoolItem( USHORT nId, const BYTE*, short nLen );
-
- void Read_Border( USHORT nId, const BYTE* pData, short nLen );
- void Read_Tab( USHORT nId, const BYTE* pData, short nLen );
- void Read_Symbol(USHORT, const BYTE* pData, short nLen);
- void Read_FldVanish( USHORT nId, const BYTE* pData, short nLen );
+ void Read_RTLJustify(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_Hyphenation( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_WidowControl( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_AlignFont( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_UsePgsuSettings( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_KeepLines( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_KeepParas( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_BreakBefore( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_Apo(sal_uInt16 nId, const sal_uInt8* pData, short nLen);
+ void Read_ApoPPC(sal_uInt16, const sal_uInt8* pData, short);
+
+ void Read_BoolItem( sal_uInt16 nId, const sal_uInt8*, short nLen );
+
+ void Read_Border( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
+ void Read_Tab( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
+ void Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_FldVanish( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
// Revision Marks ( == Redlining )
// insert or delete content (change char attributes resp.)
- void Read_CRevisionMark(RedlineType_t eType, const BYTE* pData, short nLen);
+ void Read_CRevisionMark(RedlineType_t eType, const sal_uInt8* pData, short nLen);
// insert new content
- void Read_CFRMark(USHORT , const BYTE* pData, short nLen);
+ void Read_CFRMark(sal_uInt16 , const sal_uInt8* pData, short nLen);
// delete old content
- void Read_CFRMarkDel(USHORT , const BYTE* pData, short nLen);
+ void Read_CFRMarkDel(sal_uInt16 , const sal_uInt8* pData, short nLen);
// change properties of content (e.g. char formating)
- void Read_CPropRMark(USHORT , const BYTE* pData, short nLen); // complex!
+ void Read_CPropRMark(sal_uInt16 , const sal_uInt8* pData, short nLen); // complex!
- void Read_TabRowEnd( USHORT, const BYTE* pData, short nLen );
- void Read_TabCellEnd( USHORT, const BYTE* pData, short nLen );
+ void Read_TabRowEnd( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_TabCellEnd( sal_uInt16, const sal_uInt8* pData, short nLen );
static bool ParseTabPos(WW8_TablePos *aTabPos, WW8PLCFx_Cp_FKP* pPap);
- void Read_Shade( USHORT, const BYTE* pData, short nLen );
- void Read_ANLevelNo( USHORT, const BYTE* pData, short nLen );
- void Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen );
+ void Read_Shade( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_ANLevelNo( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_ANLevelDesc( sal_uInt16, const sal_uInt8* pData, short nLen );
// Gliederungsebene Ver8
- void Read_POutLvl(USHORT, const BYTE* pData, short nLen);
+ void Read_POutLvl(sal_uInt16, const sal_uInt8* pData, short nLen);
- void Read_OLST( USHORT, const BYTE* pData, short nLen );
+ void Read_OLST( sal_uInt16, const sal_uInt8* pData, short nLen );
- void Read_CharShadow( USHORT, const BYTE* pData, short nLen );
- void Read_CharHighlight( USHORT, const BYTE* pData, short nLen );
+ void Read_CharShadow( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_CharHighlight( sal_uInt16, const sal_uInt8* pData, short nLen );
// Ver8-Listen
- void Read_ListLevel( USHORT nId, const sal_uInt8* pData, short nLen);
- void Read_LFOPosition( USHORT nId, const sal_uInt8* pData, short nLen);
+ void Read_ListLevel( sal_uInt16 nId, const sal_uInt8* pData, short nLen);
+ void Read_LFOPosition( sal_uInt16 nId, const sal_uInt8* pData, short nLen);
bool SetTxtFmtCollAndListLevel(const SwPaM& rRg, SwWW8StyInf& rStyleInfo);
- void Read_StyleCode(USHORT, const BYTE* pData, short nLen);
- void Read_Majority(USHORT, const BYTE* , short );
- void Read_DoubleLine_Rotate( USHORT, const BYTE* pDATA, short nLen);
+ void Read_StyleCode(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_Majority(sal_uInt16, const sal_uInt8* , short );
+ void Read_DoubleLine_Rotate( sal_uInt16, const sal_uInt8* pDATA, short nLen);
- void Read_TxtForeColor(USHORT, const BYTE* pData, short nLen);
- void Read_TxtBackColor(USHORT, const BYTE* pData, short nLen);
- void Read_ParaBackColor(USHORT, const BYTE* pData, short nLen);
- void Read_ParaBiDi(USHORT, const BYTE* pData, short nLen);
- static sal_uInt32 ExtractColour(const BYTE* &rpData, bool bVer67);
+ void Read_TxtForeColor(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_TxtBackColor(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nLen);
+ static sal_uInt32 ExtractColour(const sal_uInt8* &rpData, bool bVer67);
long MapBookmarkVariables(const WW8FieldDesc* pF,String &rOrigName,
const String &rData);
@@ -1543,9 +1543,9 @@ public: // eigentlich private, geht aber leider nur public
eF_ResT Read_F_DocInfo( WW8FieldDesc* pF, String& rStr );
eF_ResT Read_F_Author( WW8FieldDesc*, String& );
eF_ResT Read_F_TemplName( WW8FieldDesc*, String& );
- short GetTimeDatePara(String& rStr, sal_uInt32& rFormat, USHORT &rLang,
+ short GetTimeDatePara(String& rStr, sal_uInt32& rFormat, sal_uInt16 &rLang,
int nWhichDefault, bool bHijri = false);
- bool ForceFieldLanguage(SwField &rFld, USHORT nLang);
+ bool ForceFieldLanguage(SwField &rFld, sal_uInt16 nLang);
eF_ResT Read_F_DateTime( WW8FieldDesc*, String& rStr );
eF_ResT Read_F_FileName( WW8FieldDesc*, String& rStr);
eF_ResT Read_F_Anz( WW8FieldDesc* pF, String& );
@@ -1584,30 +1584,30 @@ public: // eigentlich private, geht aber leider nur public
void DeleteFormImpl();
- short ImportSprm( const BYTE* pPos, USHORT nId = 0 );
+ short ImportSprm( const sal_uInt8* pPos, sal_uInt16 nId = 0 );
bool SearchRowEnd(WW8PLCFx_Cp_FKP* pPap,WW8_CP &rStartCp, int nLevel) const;
const WW8Fib& GetFib() const { return *pWwFib; }
SwDoc& GetDoc() const { return rDoc; }
- USHORT GetNAktColl() const { return nAktColl; }
- void SetNAktColl( USHORT nColl ) { nAktColl = nColl; }
+ sal_uInt16 GetNAktColl() const { return nAktColl; }
+ void SetNAktColl( sal_uInt16 nColl ) { nAktColl = nColl; }
void SetAktItemSet( SfxItemSet* pItemSet ) { pAktItemSet = pItemSet; }
- USHORT StyleUsingLFO( USHORT nLFOIndex ) const ;
+ sal_uInt16 StyleUsingLFO( sal_uInt16 nLFOIndex ) const ;
const SwFmt* GetStyleWithOrgWWName( String& rName ) const ;
static bool GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc);
static void PicRead( SvStream *pDataStream, WW8_PIC *pPic, bool bVer67);
static bool ImportOleWMF( SvStorageRef xSrc1, GDIMetaFile &rWMF,
long &rX, long &rY);
- static ColorData GetCol(BYTE nIco);
+ static ColorData GetCol(sal_uInt8 nIco);
- SwWW8ImplReader( BYTE nVersionPara, SvStorage* pStorage, SvStream* pSt,
+ SwWW8ImplReader( sal_uInt8 nVersionPara, SvStorage* pStorage, SvStream* pSt,
SwDoc& rD, const String& rBaseURL, bool bNewDoc );
const String& GetBaseURL() const { return sBaseURL; }
// Laden eines kompletten DocFiles
- ULONG LoadDoc( SwPaM&,WW8Glossary *pGloss=0);
+ sal_uLong LoadDoc( SwPaM&,WW8Glossary *pGloss=0);
CharSet GetCurrentCharSet();
CharSet GetCurrentCJKCharSet();
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index f848b6332c38..5fec06b894c4 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -119,14 +119,14 @@ struct WW8TabBandDesc
sal_uInt16 maDirections[MAX_COL + 1];
short nCenter[MAX_COL + 1]; // X-Rand aller Zellen dieses Bandes
short nWidth[MAX_COL + 1]; // Laenge aller Zellen dieses Bandes
- short nWwCols; // BYTE wuerde reichen, alignment -> short
+ short nWwCols; // sal_uInt8 wuerde reichen, alignment -> short
short nSwCols; // SW: so viele Spalten fuer den Writer
bool bLEmptyCol; // SW: Links eine leere Zusatz-Spalte
bool bREmptyCol; // SW: dito rechts
bool bCantSplit;
bool bCantSplit90;
WW8_TCell* pTCs;
- BYTE nOverrideSpacing[MAX_COL + 1];
+ sal_uInt8 nOverrideSpacing[MAX_COL + 1];
short nOverrideValues[MAX_COL + 1][4];
WW8_SHD* pSHDs;
sal_uInt32* pNewSHDs;
@@ -138,23 +138,23 @@ struct WW8TabBandDesc
bool bExist[MAX_COL]; // Existiert diese Zelle ?
- UINT8 nTransCell[MAX_COL + 2]; // UEbersetzung WW-Index -> SW-Index
+ sal_uInt8 nTransCell[MAX_COL + 2]; // UEbersetzung WW-Index -> SW-Index
WW8TabBandDesc();
WW8TabBandDesc(WW8TabBandDesc& rBand); // tief kopieren
~WW8TabBandDesc();
static void setcelldefaults(WW8_TCell *pCells, short nCells);
- void ReadDef(bool bVer67, const BYTE* pS);
- void ProcessDirection(const BYTE* pParams);
- void ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC);
- void ProcessSprmTTableBorders(bool bVer67, const BYTE* pParams);
- void ProcessSprmTDxaCol(const BYTE* pParamsTDxaCol);
- void ProcessSprmTDelete(const BYTE* pParamsTDelete);
- void ProcessSprmTInsert(const BYTE* pParamsTInsert);
- void ProcessSpacing(const BYTE* pParamsTInsert);
- void ProcessSpecificSpacing(const BYTE* pParamsTInsert);
- void ReadShd(const BYTE* pS );
- void ReadNewShd(const BYTE* pS, bool bVer67);
+ void ReadDef(bool bVer67, const sal_uInt8* pS);
+ void ProcessDirection(const sal_uInt8* pParams);
+ void ProcessSprmTSetBRC(bool bVer67, const sal_uInt8* pParamsTSetBRC);
+ void ProcessSprmTTableBorders(bool bVer67, const sal_uInt8* pParams);
+ void ProcessSprmTDxaCol(const sal_uInt8* pParamsTDxaCol);
+ void ProcessSprmTDelete(const sal_uInt8* pParamsTDelete);
+ void ProcessSprmTInsert(const sal_uInt8* pParamsTInsert);
+ void ProcessSpacing(const sal_uInt8* pParamsTInsert);
+ void ProcessSpecificSpacing(const sal_uInt8* pParamsTInsert);
+ void ReadShd(const sal_uInt8* pS );
+ void ReadNewShd(const sal_uInt8* pS, bool bVer67);
enum wwDIR {wwTOP = 0, wwLEFT = 1, wwBOTTOM = 2, wwRIGHT = 3};
};
@@ -215,11 +215,11 @@ class WW8TabDesc
// 3. Verwaltungsinfo fuer Writer
short nAktCol;
- USHORT nRowsToRepeat;
+ sal_uInt16 nRowsToRepeat;
// 4. Methoden
- USHORT GetLogicalWWCol() const;
+ sal_uInt16 GetLogicalWWCol() const;
void SetTabBorders( SwTableBox* pBox, short nIdx );
void SetTabShades( SwTableBox* pBox, short nWwIdx );
void SetTabVertAlign( SwTableBox* pBox, short nWwIdx );
@@ -236,7 +236,7 @@ class WW8TabDesc
// einzelne Box ggfs. in eine Merge-Gruppe aufnehmen
// (die Merge-Gruppen werden dann spaeter auf einen Schlag abgearbeitet)
SwTableBox* UpdateTableMergeGroup(WW8_TCell& rCell,
- WW8SelBoxInfo* pActGroup, SwTableBox* pActBox, USHORT nCol );
+ WW8SelBoxInfo* pActGroup, SwTableBox* pActBox, sal_uInt16 nCol );
void StartMiserableHackForUnsupportedDirection(short nWwCol);
void EndMiserableHackForUnsupportedDirection(short nWwCol);
//No copying
@@ -497,10 +497,10 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp,
{
if (pPap->Where() != WW8_CP_MAX)
{
- const BYTE* pB = pPap->HasSprm(TabRowSprm(nLevel));
+ const sal_uInt8* pB = pPap->HasSprm(TabRowSprm(nLevel));
if (pB && *pB == 1)
{
- const BYTE *pLevel = 0;
+ const sal_uInt8 *pLevel = 0;
if (0 != (pLevel = pPap->HasSprm(0x6649)))
{
if (nLevel + 1 == *pLevel)
@@ -636,7 +636,7 @@ ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd,
// Hilfroutinen fuer Kapitelnummerierung und Aufzaehlung / Gliederung
//---------------------------------------------------------------------
-static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, BYTE nSwLevel )
+static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, sal_uInt8 nSwLevel )
{
static SvxExtNumType eNumA[8] = { SVX_NUM_ARABIC, SVX_NUM_ROMAN_UPPER, SVX_NUM_ROMAN_LOWER,
SVX_NUM_CHARS_UPPER_LETTER_N, SVX_NUM_CHARS_LOWER_LETTER_N, SVX_NUM_ARABIC,
@@ -656,7 +656,7 @@ static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, BYTE nSwLevel )
rNum.SetNumAdjust( eAdjA[SVBT8ToByte( rAV.aBits1 ) & 0x3] );
rNum.SetCharTextDistance( SVBT16ToShort( rAV.dxaSpace ) );
- INT16 nIndent = Abs((INT16)SVBT16ToShort( rAV.dxaIndent ));
+ sal_Int16 nIndent = Abs((sal_Int16)SVBT16ToShort( rAV.dxaIndent ));
if( SVBT8ToByte( rAV.aBits1 ) & 0x08 ) //fHang
{
rNum.SetFirstLineOffset( -nIndent );
@@ -675,7 +675,7 @@ static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, BYTE nSwLevel )
}
void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
- const BYTE* pTxt, bool bOutline)
+ const sal_uInt8* pTxt, bool bOutline)
{
bool bInsert = false; // Default
CharSet eCharSet = eStructCharSet;
@@ -726,7 +726,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
if( GetFontParams( SVBT16ToShort( rAV.ftc ), eFamily, aName,
ePitch, eCharSet ) ){
-// USHORT nSiz = ( SVBT16ToShort( rAV.hps ) ) ?
+// sal_uInt16 nSiz = ( SVBT16ToShort( rAV.hps ) ) ?
// SVBT16ToShort( rAV.hps ) : 24; // Groesse in 1/2 Pt
// darf nach JP nicht gesetzt werden, da immer die Size
// genommen wird, die am ZeilenAnfang benutzt wird
@@ -771,7 +771,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
// SetAnld bekommt einen WW-ANLD-Descriptor und einen Level und modifiziert
// die durch pNumR anggebeben NumRules. Wird benutzt fuer alles ausser
// Gliederung im Text
-void SwWW8ImplReader::SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, BYTE nSwLevel,
+void SwWW8ImplReader::SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, sal_uInt8 nSwLevel,
bool bOutLine)
{
SwNumFmt aNF;
@@ -800,8 +800,8 @@ SwNumRule* SwWW8ImplReader::GetStyRule()
const String aName( rDoc.GetUniqueNumRuleName( &aBaseName, false) );
// --> OD 2008-06-04 #i86652#
-// USHORT nRul = rDoc.MakeNumRule( aName );
- USHORT nRul = rDoc.MakeNumRule( aName, 0, FALSE,
+// sal_uInt16 nRul = rDoc.MakeNumRule( aName );
+ sal_uInt16 nRul = rDoc.MakeNumRule( aName, 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT );
// <--
pStyles->pStyRule = rDoc.GetNumRuleTbl()[nRul];
@@ -812,7 +812,7 @@ SwNumRule* SwWW8ImplReader::GetStyRule()
}
// Sprm 13
-void SwWW8ImplReader::Read_ANLevelNo( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_ANLevelNo( sal_uInt16, const sal_uInt8* pData, short nLen )
{
nSwNumLevel = 0xff; // Default: ungueltig
@@ -857,7 +857,7 @@ void SwWW8ImplReader::Read_ANLevelNo( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen ) // Sprm 12
+void SwWW8ImplReader::Read_ANLevelDesc( sal_uInt16, const sal_uInt8* pData, short nLen ) // Sprm 12
{
{
SwWW8StyInf * pStyInf = GetStyle(nAktColl);
@@ -909,14 +909,14 @@ void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen )
// ( nur fuer Gliederungen im Text; Aufzaehlungen / Nummerierungen laufen
// ueber ANLDs )
// dabei wird die Info aus dem OLST geholt und nicht aus dem ANLD ( s.u. )
-void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, BYTE nSwLevel)
+void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, sal_uInt8 nSwLevel)
{
SwNumFmt aNF;
WW8_ANLV &rAV = pO->rganlv[nSwLevel];
SetBaseAnlv(aNF, rAV, nSwLevel);
// ... und then the Strings
int nTxtOfs = 0;
- BYTE i;
+ sal_uInt8 i;
WW8_ANLV* pAV1; // search String-Positions
for (i = 0, pAV1 = pO->rganlv; i < nSwLevel; ++i, ++pAV1)
{
@@ -934,7 +934,7 @@ void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, BYTE nSwLevel)
// die an jeder Gliederungszeile haengen, enthalten nur Stuss, also werden die
// OLSTs waehrend der Section gemerkt, damit die Informationen beim Auftreten
// von Gliederungsabsaetzen zugreifbar ist.
-void SwWW8ImplReader::Read_OLST( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_OLST( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (nLen <= 0)
{
@@ -949,7 +949,7 @@ void SwWW8ImplReader::Read_OLST( USHORT, const BYTE* pData, short nLen )
*pNumOlst = *(WW8_OLST*)pData;
}
-WW8LvlType GetNumType(BYTE nWwLevelNo)
+WW8LvlType GetNumType(sal_uInt8 nWwLevelNo)
{
WW8LvlType nRet = WW8_None;
if( nWwLevelNo == 12 )
@@ -963,12 +963,12 @@ WW8LvlType GetNumType(BYTE nWwLevelNo)
return nRet;
}
-SwNumRule *ANLDRuleMap::GetNumRule(BYTE nNumType)
+SwNumRule *ANLDRuleMap::GetNumRule(sal_uInt8 nNumType)
{
return (WW8_Numbering == nNumType ? mpNumberingNumRule : mpOutlineNumRule);
}
-void ANLDRuleMap::SetNumRule(SwNumRule *pRule, BYTE nNumType)
+void ANLDRuleMap::SetNumRule(SwNumRule *pRule, sal_uInt8 nNumType)
{
if (WW8_Numbering == nNumType)
mpNumberingNumRule = pRule;
@@ -979,11 +979,11 @@ void ANLDRuleMap::SetNumRule(SwNumRule *pRule, BYTE nNumType)
// StartAnl wird am Anfang eines Zeilenbereichs gerufen,
// der Gliederung / Nummerierung / Aufzaehlung enthaelt
-void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
+void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13)
{
bAktAND_fNumberAcross = false;
- BYTE nT = static_cast< BYTE >(GetNumType(*pSprm13));
+ sal_uInt8 nT = static_cast< sal_uInt8 >(GetNumType(*pSprm13));
if (nT == WW8_Pause || nT == WW8_None)
return;
@@ -991,7 +991,7 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
SwNumRule *pNumRule = maANLDRules.GetNumRule(nWwNumType);
// check for COL numbering:
- const BYTE* pS12 = 0;// sprmAnld
+ const sal_uInt8* pS12 = 0;// sprmAnld
String sNumRule;
if (pTableDesc)
@@ -1028,7 +1028,7 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
// --> OD 2008-06-04 #i86652#
// pNumRule = rDoc.GetNumRuleTbl()[rDoc.MakeNumRule(sNumRule)];
pNumRule = rDoc.GetNumRuleTbl()[
- rDoc.MakeNumRule( sNumRule, 0, FALSE,
+ rDoc.MakeNumRule( sNumRule, 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT ) ];
// <--
}
@@ -1052,7 +1052,7 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
// NextAnlLine() wird fuer jede Zeile einer
// Gliederung / Nummerierung / Aufzaehlung einmal gerufen
-void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
+void SwWW8ImplReader::NextAnlLine(const sal_uInt8* pSprm13)
{
if (!bAnl)
return;
@@ -1070,7 +1070,7 @@ void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
{
// noch nicht definiert
// sprmAnld o. 0
- const BYTE* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
+ const sal_uInt8* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
SetAnld(pNumRule, (WW8_ANLD*)pS12, nSwNumLevel, false);
}
}
@@ -1083,7 +1083,7 @@ void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
if (pNumOlst) // es gab ein OLST
{
//Assure upper levels are set, #i9556#
- for (BYTE nI = 0; nI < nSwNumLevel; ++nI)
+ for (sal_uInt8 nI = 0; nI < nSwNumLevel; ++nI)
{
if (!pNumRule->GetNumFmt(nI))
SetNumOlst(pNumRule, pNumOlst, nI);
@@ -1094,7 +1094,7 @@ void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
else // kein Olst, nimm Anld
{
// sprmAnld
- const BYTE* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
+ const sal_uInt8* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
SetAnld(pNumRule, (WW8_ANLD*)pS12, nSwNumLevel, false);
}
}
@@ -1119,7 +1119,7 @@ void SwWW8ImplReader::StopAllAnl(bool bGoBack)
StopAnlToRestart(WW8_None, bGoBack);
}
-void SwWW8ImplReader::StopAnlToRestart(BYTE nNewType, bool bGoBack)
+void SwWW8ImplReader::StopAnlToRestart(sal_uInt8 nNewType, bool bGoBack)
{
if (bGoBack)
{
@@ -1170,14 +1170,14 @@ WW8TabBandDesc::WW8TabBandDesc( WW8TabBandDesc& rBand )
}
// ReadDef liest die Zellenpositionen und ggfs die Umrandungen eines Bandes ein
-void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
+void WW8TabBandDesc::ReadDef(bool bVer67, const sal_uInt8* pS)
{
if (!bVer67)
pS++;
- short nLen = (INT16)SVBT16ToShort( pS - 2 ); // nicht schoen
+ short nLen = (sal_Int16)SVBT16ToShort( pS - 2 ); // nicht schoen
- BYTE nCols = *pS; // Anzahl der Zellen
+ sal_uInt8 nCols = *pS; // Anzahl der Zellen
short nOldCols = nWwCols;
if( nCols > MAX_COL )
@@ -1185,11 +1185,11 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
nWwCols = nCols;
- const BYTE* pT = &pS[1];
+ const sal_uInt8* pT = &pS[1];
nLen --;
int i;
for(i=0; i<=nCols; i++, pT+=2 )
- nCenter[i] = (INT16)SVBT16ToShort( pT ); // X-Raender
+ nCenter[i] = (sal_Int16)SVBT16ToShort( pT ); // X-Raender
nLen -= 2 * ( nCols + 1 );
if( nCols != nOldCols ) // andere Spaltenzahl
{
@@ -1231,7 +1231,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
{
if( i < nColsToRead )
{ // TC aus File ?
- BYTE aBits1 = SVBT8ToByte( pTc->aBits1Ver6 );
+ sal_uInt8 aBits1 = SVBT8ToByte( pTc->aBits1Ver6 );
pAktTC->bFirstMerged = ( ( aBits1 & 0x01 ) != 0 );
pAktTC->bMerged = ( ( aBits1 & 0x02 ) != 0 );
memcpy( pAktTC->rgbrc[ WW8_TOP ].aBits1,
@@ -1261,7 +1261,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
WW8_TCellVer8* pTc = (WW8_TCellVer8*)pT;
for (int k = 0; k < nColsToRead; ++k, ++pAktTC, ++pTc )
{
- UINT16 aBits1 = SVBT16ToShort( pTc->aBits1Ver8 );
+ sal_uInt16 aBits1 = SVBT16ToShort( pTc->aBits1Ver8 );
pAktTC->bFirstMerged = ( ( aBits1 & 0x0001 ) != 0 );
pAktTC->bMerged = ( ( aBits1 & 0x0002 ) != 0 );
pAktTC->bVertical = ( ( aBits1 & 0x0004 ) != 0 );
@@ -1299,13 +1299,13 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
}
}
-void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC)
+void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const sal_uInt8* pParamsTSetBRC)
{
if( pParamsTSetBRC && pTCs ) // set one or more cell border(s)
{
- BYTE nitcFirst= pParamsTSetBRC[0];// first col to be changed
- BYTE nitcLim = pParamsTSetBRC[1];// (last col to be changed)+1
- BYTE nFlag = *(pParamsTSetBRC+2);
+ sal_uInt8 nitcFirst= pParamsTSetBRC[0];// first col to be changed
+ sal_uInt8 nitcLim = pParamsTSetBRC[1];// (last col to be changed)+1
+ sal_uInt8 nFlag = *(pParamsTSetBRC+2);
if (nitcFirst >= nWwCols)
return;
@@ -1373,7 +1373,7 @@ void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC)
}
}
-void WW8TabBandDesc::ProcessSprmTTableBorders(bool bVer67, const BYTE* pParams)
+void WW8TabBandDesc::ProcessSprmTTableBorders(bool bVer67, const sal_uInt8* pParams)
{
// sprmTTableBorders
if( bVer67 )
@@ -1388,16 +1388,16 @@ void WW8TabBandDesc::ProcessSprmTTableBorders(bool bVer67, const BYTE* pParams)
memcpy( aDefBrcs, pParams, 24 );
}
-void WW8TabBandDesc::ProcessSprmTDxaCol(const BYTE* pParamsTDxaCol)
+void WW8TabBandDesc::ProcessSprmTDxaCol(const sal_uInt8* pParamsTDxaCol)
{
// sprmTDxaCol (opcode 0x7623) changes the width of cells
// whose index is within a certain range to be a certain value.
if( nWwCols && pParamsTDxaCol ) // set one or more cell length(s)
{
- BYTE nitcFirst= pParamsTDxaCol[0]; // first col to be changed
- BYTE nitcLim = pParamsTDxaCol[1]; // (last col to be changed)+1
- short nDxaCol = (INT16)SVBT16ToShort( pParamsTDxaCol + 2 );
+ sal_uInt8 nitcFirst= pParamsTDxaCol[0]; // first col to be changed
+ sal_uInt8 nitcLim = pParamsTDxaCol[1]; // (last col to be changed)+1
+ short nDxaCol = (sal_Int16)SVBT16ToShort( pParamsTDxaCol + 2 );
short nOrgWidth;
short nDelta;
@@ -1413,15 +1413,15 @@ void WW8TabBandDesc::ProcessSprmTDxaCol(const BYTE* pParamsTDxaCol)
}
}
-void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
+void WW8TabBandDesc::ProcessSprmTInsert(const sal_uInt8* pParamsTInsert)
{
if( nWwCols && pParamsTInsert ) // set one or more cell length(s)
{
- BYTE nitcInsert = pParamsTInsert[0]; // position at which to insert
+ sal_uInt8 nitcInsert = pParamsTInsert[0]; // position at which to insert
if (nitcInsert >= MAX_COL) // cannot insert into cell outside max possible index
return;
- BYTE nctc = pParamsTInsert[1]; // number of cells
- USHORT ndxaCol = SVBT16ToShort( pParamsTInsert+2 );
+ sal_uInt8 nctc = pParamsTInsert[1]; // number of cells
+ sal_uInt16 ndxaCol = SVBT16ToShort( pParamsTInsert+2 );
short nNewWwCols;
if (nitcInsert > nWwCols)
@@ -1432,7 +1432,7 @@ void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
if (nNewWwCols > MAX_COL)
{
nNewWwCols = MAX_COL;
- nctc = ::sal::static_int_cast<BYTE>(nNewWwCols-nitcInsert);
+ nctc = ::sal::static_int_cast<sal_uInt8>(nNewWwCols-nitcInsert);
}
}
else
@@ -1443,7 +1443,7 @@ void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
if (nNewWwCols > MAX_COL)
{
nNewWwCols = MAX_COL;
- nctc = ::sal::static_int_cast<BYTE>(nNewWwCols-nWwCols);
+ nctc = ::sal::static_int_cast<sal_uInt8>(nNewWwCols-nWwCols);
}
}
@@ -1484,7 +1484,7 @@ void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
}
}
-void WW8TabBandDesc::ProcessDirection(const BYTE* pParams)
+void WW8TabBandDesc::ProcessDirection(const sal_uInt8* pParams)
{
sal_uInt8 nStartCell = *pParams++;
sal_uInt8 nEndCell = *pParams++;
@@ -1501,24 +1501,24 @@ void WW8TabBandDesc::ProcessDirection(const BYTE* pParams)
maDirections[nStartCell] = nCode;
}
-void WW8TabBandDesc::ProcessSpacing(const BYTE* pParams)
+void WW8TabBandDesc::ProcessSpacing(const sal_uInt8* pParams)
{
- BYTE nLen = pParams ? *(pParams - 1) : 0;
+ sal_uInt8 nLen = pParams ? *(pParams - 1) : 0;
ASSERT(nLen == 6, "Unexpected spacing len");
if (nLen != 6)
return;
mbHasSpacing=true;
#ifdef DBG_UTIL
- BYTE nWhichCell = *pParams;
+ sal_uInt8 nWhichCell = *pParams;
ASSERT(nWhichCell == 0, "Expected cell to be 0!");
#endif
++pParams; //Skip which cell
++pParams; //unknown byte
- BYTE nSideBits = *pParams++;
+ sal_uInt8 nSideBits = *pParams++;
ASSERT(nSideBits < 0x10, "Unexpected value for nSideBits");
++pParams; //unknown byte
- USHORT nValue = SVBT16ToShort( pParams );
+ sal_uInt16 nValue = SVBT16ToShort( pParams );
for (int i = wwTOP; i <= wwRIGHT; i++)
{
switch (nSideBits & (1 << i))
@@ -1544,30 +1544,30 @@ void WW8TabBandDesc::ProcessSpacing(const BYTE* pParams)
}
}
-void WW8TabBandDesc::ProcessSpecificSpacing(const BYTE* pParams)
+void WW8TabBandDesc::ProcessSpecificSpacing(const sal_uInt8* pParams)
{
- BYTE nLen = pParams ? *(pParams - 1) : 0;
+ sal_uInt8 nLen = pParams ? *(pParams - 1) : 0;
ASSERT(nLen == 6, "Unexpected spacing len");
if (nLen != 6)
return;
- BYTE nWhichCell = *pParams++;
+ sal_uInt8 nWhichCell = *pParams++;
ASSERT(nWhichCell < MAX_COL + 1, "Cell out of range in spacings");
if (nWhichCell >= MAX_COL + 1)
return;
++pParams; //unknown byte
- BYTE nSideBits = *pParams++;
+ sal_uInt8 nSideBits = *pParams++;
ASSERT(nSideBits < 0x10, "Unexpected value for nSideBits");
nOverrideSpacing[nWhichCell] |= nSideBits;
ASSERT(nOverrideSpacing[nWhichCell] < 0x10,
"Unexpected value for nSideBits");
#ifdef DBG_UTIL
- BYTE nUnknown2 = *pParams;
+ sal_uInt8 nUnknown2 = *pParams;
ASSERT(nUnknown2 == 0x3, "Unexpected value for spacing2");
#endif
++pParams;
- USHORT nValue = SVBT16ToShort( pParams );
+ sal_uInt16 nValue = SVBT16ToShort( pParams );
for (int i=0; i < 4; i++)
{
@@ -1576,14 +1576,14 @@ void WW8TabBandDesc::ProcessSpecificSpacing(const BYTE* pParams)
}
}
-void WW8TabBandDesc::ProcessSprmTDelete(const BYTE* pParamsTDelete)
+void WW8TabBandDesc::ProcessSprmTDelete(const sal_uInt8* pParamsTDelete)
{
if( nWwCols && pParamsTDelete ) // set one or more cell length(s)
{
- BYTE nitcFirst= pParamsTDelete[0]; // first col to be deleted
+ sal_uInt8 nitcFirst= pParamsTDelete[0]; // first col to be deleted
if (nitcFirst >= nWwCols) // first index to delete from doesn't exist
return;
- BYTE nitcLim = pParamsTDelete[1]; // (last col to be deleted)+1
+ sal_uInt8 nitcLim = pParamsTDelete[1]; // (last col to be deleted)+1
if (nitcLim <= nitcFirst) // second index to delete to is not greater than first index
return;
@@ -1622,9 +1622,9 @@ void WW8TabBandDesc::ProcessSprmTDelete(const BYTE* pParamsTDelete)
// ReadShd liest ggfs die Hintergrundfarben einer Zeile ein.
// Es muss vorher ReadDef aufgerufen worden sein
-void WW8TabBandDesc::ReadShd(const BYTE* pS )
+void WW8TabBandDesc::ReadShd(const sal_uInt8* pS )
{
- BYTE nLen = pS ? *(pS - 1) : 0;
+ sal_uInt8 nLen = pS ? *(pS - 1) : 0;
if( !nLen )
return;
@@ -1644,9 +1644,9 @@ void WW8TabBandDesc::ReadShd(const BYTE* pS )
pSHDs[i].SetWWValue( *pShd );
}
-void WW8TabBandDesc::ReadNewShd(const BYTE* pS, bool bVer67)
+void WW8TabBandDesc::ReadNewShd(const sal_uInt8* pS, bool bVer67)
{
- BYTE nLen = pS ? *(pS - 1) : 0;
+ sal_uInt8 nLen = pS ? *(pS - 1) : 0;
if (!nLen)
return;
@@ -1670,9 +1670,9 @@ void WW8TabBandDesc::setcelldefaults(WW8_TCell *pCells, short nCols)
memset( pCells, 0, nCols * sizeof( WW8_TCell ) );
}
-const BYTE *HasTabCellSprm(WW8PLCFx_Cp_FKP* pPap, bool bVer67)
+const sal_uInt8 *HasTabCellSprm(WW8PLCFx_Cp_FKP* pPap, bool bVer67)
{
- const BYTE *pParams;
+ const sal_uInt8 *pParams;
if (bVer67)
pParams = pPap->HasSprm(24);
else
@@ -1864,8 +1864,8 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
{
short nTabeDxaNew = SHRT_MAX;
bool bTabRowJustRead = false;
- const BYTE* pShadeSprm = 0;
- const BYTE* pNewShadeSprm = 0;
+ const sal_uInt8* pShadeSprm = 0;
+ const sal_uInt8* pNewShadeSprm = 0;
WW8_TablePos *pTabPos = 0;
// Suche Ende einer TabZeile
@@ -1881,7 +1881,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
pPap->GetSprms( &aDesc );
WW8SprmIter aSprmIter(aDesc.pMemPos, aDesc.nSprmsLen, aSprmParser);
- const BYTE* pParams = aSprmIter.GetAktParams();
+ const sal_uInt8* pParams = aSprmIter.GetAktParams();
for (int nLoop = 0; nLoop < 2; ++nLoop)
{
bool bRepeatedSprm = false;
@@ -1893,9 +1893,9 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
{
case sprmTTableWidth:
{
- const BYTE b0 = pParams[0];
- const BYTE b1 = pParams[1];
- const BYTE b2 = pParams[2];
+ const sal_uInt8 b0 = pParams[0];
+ const sal_uInt8 b1 = pParams[1];
+ const sal_uInt8 b2 = pParams[2];
if (b0 == 3) // Twips
nPreferredWidth = b2 * 0x100 + b1;
}
@@ -1930,10 +1930,10 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
bIsBiDi = SVBT16ToShort(pParams) ? true : false;
break;
case sprmTDxaGapHalf:
- pNewBand->nGapHalf = (INT16)SVBT16ToShort( pParams );
+ pNewBand->nGapHalf = (sal_Int16)SVBT16ToShort( pParams );
break;
case sprmTDyaRowHeight:
- pNewBand->nLineHeight = (INT16)SVBT16ToShort( pParams );
+ pNewBand->nLineHeight = (sal_Int16)SVBT16ToShort( pParams );
bClaimLineFmt = true;
break;
case sprmTDefTable:
@@ -1952,7 +1952,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
// parameter (meaning the left-most position) and then
// shift the whole table to that margin (see below)
{
- short nDxaNew = (INT16)SVBT16ToShort( pParams );
+ short nDxaNew = (sal_Int16)SVBT16ToShort( pParams );
nOrgDxaLeft = nDxaNew;
if( nDxaNew < nTabeDxaNew )
nTabeDxaNew = nDxaNew;
@@ -2054,7 +2054,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
//Are we still in a table cell
pParams = HasTabCellSprm(pPap, bOldVer);
- const BYTE *pLevel = pPap->HasSprm(0x6649);
+ const sal_uInt8 *pLevel = pPap->HasSprm(0x6649);
// InTable
if (!pParams || (1 != *pParams) ||
(pLevel && (*pLevel <= pIo->nInTable)))
@@ -2313,11 +2313,11 @@ void WW8TabDesc::CalcDefaults()
pR->bREmptyCol = (nMaxRight - pR->nCenter[pR->nWwCols] - nRightMaxThickness) >= MINLAY;
short nAddCols = pR->bLEmptyCol + pR->bREmptyCol;
- USHORT i;
- USHORT j = ( pR->bLEmptyCol ) ? 1 : 0;
+ sal_uInt16 i;
+ sal_uInt16 j = ( pR->bLEmptyCol ) ? 1 : 0;
for (i = 0; i < pR->nWwCols; ++i)
{
- pR->nTransCell[i] = (INT8)j;
+ pR->nTransCell[i] = (sal_Int8)j;
if ( pR->nCenter[i] < pR->nCenter[i+1] )
{
pR->bExist[i] = true;
@@ -2340,15 +2340,15 @@ void WW8TabDesc::CalcDefaults()
*/
if (i && pR->bExist[i-1] == false)
{
- USHORT k=i-1;
+ sal_uInt16 k=i-1;
while (k && pR->bExist[k] == false)
k--;
- for (USHORT n=k+1;n<i;n++)
+ for (sal_uInt16 n=k+1;n<i;n++)
pR->nTransCell[n] = pR->nTransCell[k];
}
- pR->nTransCell[i++] = (INT8)(j++); // Wird u.a. wegen bREmptyCol um
- pR->nTransCell[i] = (INT8)j; // max. 2 ueberindiziert
+ pR->nTransCell[i++] = (sal_Int8)(j++); // Wird u.a. wegen bREmptyCol um
+ pR->nTransCell[i] = (sal_Int8)j; // max. 2 ueberindiziert
pR->nSwCols = pR->nSwCols + nAddCols;
if( pR->nSwCols < nMinCols )
@@ -2487,7 +2487,7 @@ void WW8TabDesc::CreateSwTable()
// da sich die (identischen) Zeilen eines Bandes prima duplizieren lassen
pTable = pIo->rDoc.InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 0 ),
- *pTmpPos, nBands, nDefaultSwCols, eOri, 0, 0, FALSE, TRUE );
+ *pTmpPos, nBands, nDefaultSwCols, eOri, 0, 0, sal_False, sal_True );
ASSERT(pTable && pTable->GetFrmFmt(), "insert table failed");
if (!pTable || !pTable->GetFrmFmt())
@@ -2599,7 +2599,7 @@ void WW8TabDesc::UseSwTable()
ASSERT( pTblNd, "wo ist mein TabellenNode" );
// --> mloiseleur 2007-10-10 #i69519# Restrict rows to repeat to a decent value
- if ( nRowsToRepeat == static_cast<USHORT>(nRows) )
+ if ( nRowsToRepeat == static_cast<sal_uInt16>(nRows) )
nRowsToRepeat = 1;
// <--
@@ -2643,7 +2643,7 @@ void WW8TabDesc::MergeCells()
pTabLine = (*pTabLines)[ nRow ];
pTabBoxes = &pTabLine->GetTabBoxes();
- USHORT nCol = pActBand->nTransCell[ i ];
+ sal_uInt16 nCol = pActBand->nTransCell[ i ];
if (!pActBand->bExist[i]) //#113434#
continue;
ASSERT(nCol < pTabBoxes->Count(),
@@ -2672,7 +2672,7 @@ void WW8TabDesc::MergeCells()
//If its a hori merge only, and the only things in
//it are invalid cells then its already taken care
//of, so don't merge.
- for (USHORT i2 = i+1; i2 < pActBand->nWwCols; i2++ )
+ for (sal_uInt16 i2 = i+1; i2 < pActBand->nWwCols; i2++ )
if (pActBand->pTCs[ i2 ].bMerged &&
!pActBand->pTCs[ i2 ].bFirstMerged )
{
@@ -2706,7 +2706,7 @@ void WW8TabDesc::MergeCells()
// Needed to correctly locked previously created merge groups.
// Gesamtbreite ermitteln und zuweisen
short nSizCell = pActBand->nWidth[ i ];
- for (USHORT i2 = i+1; i2 < pActBand->nWwCols; i2++ )
+ for (sal_uInt16 i2 = i+1; i2 < pActBand->nWwCols; i2++ )
if (pActBand->pTCs[ i2 ].bMerged &&
!pActBand->pTCs[ i2 ].bFirstMerged )
{
@@ -2809,17 +2809,17 @@ void WW8TabDesc::FinishSwTable()
{
// bearbeite alle Merge-Gruppen nacheinander
WW8SelBoxInfo* pActMGroup;
- USHORT nActBoxCount;
+ sal_uInt16 nActBoxCount;
- for (USHORT iGr = 0; iGr < pMergeGroups->Count(); ++iGr)
+ for (sal_uInt16 iGr = 0; iGr < pMergeGroups->Count(); ++iGr)
{
pActMGroup = (*pMergeGroups)[ iGr ];
nActBoxCount = pActMGroup->Count();
if( ( 1 < nActBoxCount ) && pActMGroup && (*pActMGroup)[ 0 ] )
{
- const USHORT nRowSpan = pActMGroup->Count();
- for (USHORT n = 0; n < nRowSpan; ++n)
+ const sal_uInt16 nRowSpan = pActMGroup->Count();
+ for (sal_uInt16 n = 0; n < nRowSpan; ++n)
{
SwTableBox* pCurrentBox = (*pActMGroup)[n];
const long nRowSpanSet = n == 0 ?
@@ -2859,7 +2859,7 @@ bool WW8TabDesc::FindMergeGroup(short nX1, short nWidth, bool bExact,
short nGrX2;
// --> OD 2005-02-04 #118544# - improvement: search backwards
- //for ( USHORT iGr = 0; iGr < pMergeGroups->Count(); iGr++ )
+ //for ( sal_uInt16 iGr = 0; iGr < pMergeGroups->Count(); iGr++ )
for ( short iGr = pMergeGroups->Count() - 1; iGr >= 0; --iGr )
{
// die aktuell untersuchte Gruppe
@@ -2902,7 +2902,7 @@ bool WW8TabDesc::FindMergeGroup(short nX1, short nWidth, bool bExact,
bool WW8TabDesc::IsValidCell(short nCol) const
{
- return pActBand->bExist[nCol] && (USHORT)nAktRow < pTabLines->Count();
+ return pActBand->bExist[nCol] && (sal_uInt16)nAktRow < pTabLines->Count();
}
bool WW8TabDesc::InFirstParaInCell() const
@@ -2944,9 +2944,9 @@ bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam)
{
ASSERT( pActBand, "pActBand ist 0" );
- USHORT nCol = pActBand->nTransCell[nWwCol];
+ sal_uInt16 nCol = pActBand->nTransCell[nWwCol];
- if ((USHORT)nAktRow >= pTabLines->Count())
+ if ((sal_uInt16)nAktRow >= pTabLines->Count())
{
ASSERT(!this, "Actual row bigger than expected." );
if (bPam)
@@ -3140,7 +3140,7 @@ void WW8TabDesc::SetTabShades( SwTableBox* pBox, short nWwIdx )
}
}
-SvxFrameDirection MakeDirection(sal_uInt16 nCode, BOOL bIsBiDi)
+SvxFrameDirection MakeDirection(sal_uInt16 nCode, sal_Bool bIsBiDi)
{
SvxFrameDirection eDir = FRMDIR_ENVIRONMENT;
// 1: Asian layout with rotated CJK characters
@@ -3213,7 +3213,7 @@ void WW8TabDesc::AdjustNewBand()
InsertCells( pActBand->nSwCols - nDefaultSwCols );
SetPamInCell( 0, false);
- ASSERT( pTabBoxes && pTabBoxes->Count() == (USHORT)pActBand->nSwCols,
+ ASSERT( pTabBoxes && pTabBoxes->Count() == (sal_uInt16)pActBand->nSwCols,
"Falsche Spaltenzahl in Tabelle" )
if( bClaimLineFmt )
@@ -3337,7 +3337,7 @@ void WW8TabDesc::TableCellEnd()
// bWasTabRowEnd will be deactivated in
// SwWW8ImplReader::ProcessSpecial()
- USHORT iCol = GetLogicalWWCol();
+ sal_uInt16 iCol = GetLogicalWWCol();
if (iCol < aNumRuleNames.size())
{
aNumRuleNames.erase(aNumRuleNames.begin() + iCol,
@@ -3384,7 +3384,7 @@ void WW8TabDesc::TableCellEnd()
SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell,
WW8SelBoxInfo* pActGroup,
SwTableBox* pActBox,
- USHORT nCol )
+ sal_uInt16 nCol )
{
// Rueckgabewert defaulten
SwTableBox* pResult = 0;
@@ -3428,12 +3428,12 @@ SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell,
}
-USHORT WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDICATED within WW6 UI status line -1
+sal_uInt16 WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDICATED within WW6 UI status line -1
{
- USHORT nCol = 0;
+ sal_uInt16 nCol = 0;
if( pActBand && pActBand->pTCs)
{
- for( USHORT iCol = 1; iCol <= nAktCol; ++iCol )
+ for( sal_uInt16 iCol = 1; iCol <= nAktCol; ++iCol )
{
if( !pActBand->pTCs[ iCol-1 ].bMerged )
++nCol;
@@ -3445,7 +3445,7 @@ USHORT WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDICATED
// find name of numrule valid for current WW-COL
const String& WW8TabDesc::GetNumRuleName() const
{
- USHORT nCol = GetLogicalWWCol();
+ sal_uInt16 nCol = GetLogicalWWCol();
if (nCol < aNumRuleNames.size())
return aNumRuleNames[nCol];
else
@@ -3454,8 +3454,8 @@ const String& WW8TabDesc::GetNumRuleName() const
void WW8TabDesc::SetNumRuleName( const String& rName )
{
- USHORT nCol = GetLogicalWWCol();
- for (USHORT nSize = static_cast< USHORT >(aNumRuleNames.size()); nSize <= nCol; ++nSize)
+ sal_uInt16 nCol = GetLogicalWWCol();
+ for (sal_uInt16 nSize = static_cast< sal_uInt16 >(aNumRuleNames.size()); nSize <= nCol; ++nSize)
aNumRuleNames.push_back(aEmptyStr);
aNumRuleNames[nCol] = rName;
}
@@ -3573,7 +3573,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
// <--
// --> OD 2005-01-27 #i33818# - The nested table doesn't have to leave
// the table cell. Thus, the Writer fly frame has to follow the text flow.
- pTableDesc->pFlyFmt->SetFmtAttr( SwFmtFollowTextFlow( TRUE ) );
+ pTableDesc->pFlyFmt->SetFmtAttr( SwFmtFollowTextFlow( sal_True ) );
// <--
}
else
@@ -3660,13 +3660,13 @@ void SwWW8ImplReader::TabCellEnd()
mpTableEndPaM.reset();
}
-void SwWW8ImplReader::Read_TabCellEnd( USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_TabCellEnd( sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( ( nLen > 0 ) && ( *pData == 1 ) )
bWasTabCellEnd = true;
}
-void SwWW8ImplReader::Read_TabRowEnd( USHORT, const BYTE* pData, short nLen ) // Sprm25
+void SwWW8ImplReader::Read_TabRowEnd( sal_uInt16, const sal_uInt8* pData, short nLen ) // Sprm25
{
if( ( nLen > 0 ) && ( *pData == 1 ) )
bWasTabRowEnd = true;
@@ -3748,12 +3748,12 @@ bool SwWW8ImplReader::IsInvalidOrToBeMergedTabCell() const
);
}
-USHORT SwWW8ImplReader::StyleUsingLFO( USHORT nLFOIndex ) const
+sal_uInt16 SwWW8ImplReader::StyleUsingLFO( sal_uInt16 nLFOIndex ) const
{
- USHORT nRes = USHRT_MAX;
+ sal_uInt16 nRes = USHRT_MAX;
if( pCollA )
{
- for(USHORT nI = 0; nI < pStyles->GetCount(); nI++ )
+ for(sal_uInt16 nI = 0; nI < pStyles->GetCount(); nI++ )
if( pCollA[ nI ].bValid
&& (nLFOIndex == pCollA[ nI ].nLFOIndex) )
nRes = nI;
@@ -3766,7 +3766,7 @@ const SwFmt* SwWW8ImplReader::GetStyleWithOrgWWName( String& rName ) const
SwFmt* pRet = 0;
if( pCollA )
{
- for(USHORT nI = 0; nI < pStyles->GetCount(); nI++ )
+ for(sal_uInt16 nI = 0; nI < pStyles->GetCount(); nI++ )
if( pCollA[ nI ].bValid
&& (rName.Equals( pCollA[ nI ].GetOrgWWName())) )
{
@@ -3781,17 +3781,17 @@ const SwFmt* SwWW8ImplReader::GetStyleWithOrgWWName( String& rName ) const
// class WW8RStyle
//-----------------------------------------
-const BYTE* WW8RStyle::HasParaSprm( USHORT nId ) const
+const sal_uInt8* WW8RStyle::HasParaSprm( sal_uInt16 nId ) const
{
if( !pParaSprms || !nSprmsLen )
return 0;
- const BYTE* pSprms = pParaSprms;
- USHORT i, x;
+ const sal_uInt8* pSprms = pParaSprms;
+ sal_uInt16 i, x;
for( i=0; i < nSprmsLen; )
{
- USHORT nAktId = maSprmParser.GetSprmId(pSprms);
+ sal_uInt16 nAktId = maSprmParser.GetSprmId(pSprms);
// Sprm found ?
if( nAktId == nId )
return pSprms + maSprmParser.DistanceToData(nId);
@@ -3803,7 +3803,7 @@ const BYTE* WW8RStyle::HasParaSprm( USHORT nId ) const
return 0; // Sprm not found
}
-void WW8RStyle::ImportSprms(BYTE *pSprms, short nLen, bool bPap)
+void WW8RStyle::ImportSprms(sal_uInt8 *pSprms, short nLen, bool bPap)
{
if (!nLen)
return;
@@ -3816,7 +3816,7 @@ void WW8RStyle::ImportSprms(BYTE *pSprms, short nLen, bool bPap)
while ( nLen > 0 )
{
- USHORT nL1 = pIo->ImportSprm(pSprms);
+ sal_uInt16 nL1 = pIo->ImportSprm(pSprms);
nLen = nLen - nL1;
pSprms += nL1;
}
@@ -3830,7 +3830,7 @@ void WW8RStyle::ImportSprms(sal_Size nPosFc, short nLen, bool bPap)
if (!nLen)
return;
- BYTE *pSprms = new BYTE[nLen];
+ sal_uInt8 *pSprms = new sal_uInt8[nLen];
pStStrm->Seek(nPosFc);
pStStrm->Read(pSprms, nLen);
@@ -3844,7 +3844,7 @@ static inline short WW8SkipOdd(SvStream* pSt )
{
if ( pSt->Tell() & 0x1 )
{
- UINT8 c;
+ sal_uInt8 c;
pSt->Read( &c, 1 );
return 1;
}
@@ -3855,7 +3855,7 @@ static inline short WW8SkipEven(SvStream* pSt )
{
if (!(pSt->Tell() & 0x1))
{
- UINT8 c;
+ sal_uInt8 c;
pSt->Read( &c, 1 );
return 1;
}
@@ -3864,7 +3864,7 @@ static inline short WW8SkipEven(SvStream* pSt )
short WW8RStyle::ImportUPX(short nLen, bool bPAP, bool bOdd)
{
- INT16 cbUPX;
+ sal_Int16 cbUPX;
if( 0 < nLen ) // Empty ?
{
@@ -3884,7 +3884,7 @@ short WW8RStyle::ImportUPX(short nLen, bool bPAP, bool bOdd)
{
if( bPAP )
{
- UINT16 id;
+ sal_uInt16 id;
*pStStrm >> id;
cbUPX-= 2;
@@ -4032,7 +4032,7 @@ bool WW8RStyle::PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisSty
rSI.bImportSkipped = !bImport;
// Set Based on style
- USHORT j = rSI.nBase;
+ sal_uInt16 j = rSI.nBase;
if (j != nThisStyle && j < cstd )
{
SwWW8StyInf* pj = &pIo->pCollA[j];
@@ -4094,7 +4094,7 @@ void WW8RStyle::PostStyle(SwWW8StyInf &rSI, bool bOldNoImp)
pIo->nListLevel = WW8ListManager::nMaxLevel;
}
-void WW8RStyle::Import1Style( USHORT nNr )
+void WW8RStyle::Import1Style( sal_uInt16 nNr )
{
SwWW8StyInf &rSI = pIo->pCollA[nNr];
@@ -4147,7 +4147,7 @@ void WW8RStyle::Import1Style( USHORT nNr )
delete pStd;
}
-void WW8RStyle::RecursiveReg(USHORT nNr)
+void WW8RStyle::RecursiveReg(sal_uInt16 nNr)
{
SwWW8StyInf &rSI = pIo->pCollA[nNr];
if( rSI.bImported || !rSI.bValid )
@@ -4169,7 +4169,7 @@ void WW8RStyle::RecursiveReg(USHORT nNr)
*/
void WW8RStyle::PostProcessStyles()
{
- USHORT i;
+ sal_uInt16 i;
/*
Clear all imported flags so that we can recursively apply numbering
formats and use it to mark handled ones
@@ -4203,7 +4203,7 @@ void WW8RStyle::ScanStyles() // untersucht Style-Abhaengigkeiten
WW8_FC nStyleStart = rFib.fcStshf;
pStStrm->Seek( nStyleStart );
*/
- for (USHORT i = 0; i < cstd; ++i)
+ for (sal_uInt16 i = 0; i < cstd; ++i)
{
short nSkip;
SwWW8StyInf &rSI = pIo->pCollA[i];
@@ -4224,30 +4224,30 @@ void WW8RStyle::ScanStyles() // untersucht Style-Abhaengigkeiten
}
}
-std::vector<BYTE> ChpxToSprms(const Word2CHPX &rChpx)
+std::vector<sal_uInt8> ChpxToSprms(const Word2CHPX &rChpx)
{
- std::vector<BYTE> aRet;
+ std::vector<sal_uInt8> aRet;
aRet.push_back(60);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fBold) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fBold) );
aRet.push_back(61);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fItalic) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fItalic) );
aRet.push_back(62);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fStrike) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fStrike) );
aRet.push_back(63);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fOutline) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fOutline) );
aRet.push_back(65);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fSmallCaps) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fSmallCaps) );
aRet.push_back(66);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fCaps) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fCaps) );
aRet.push_back(67);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fVanish) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fVanish) );
if (rChpx.fsFtc)
{
@@ -4296,10 +4296,10 @@ std::vector<BYTE> ChpxToSprms(const Word2CHPX &rChpx)
}
aRet.push_back(80);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fBoldBi) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fBoldBi) );
aRet.push_back(81);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fItalicBi) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fItalicBi) );
if (rChpx.fsFtcBi)
{
@@ -4478,7 +4478,7 @@ void WW8RStyle::ImportOldFormatStyles()
sal_uInt16 cbName;
rSt >> cbName;
sal_uInt16 nByteCount = 2;
- USHORT stcp=0;
+ sal_uInt16 stcp=0;
while (nByteCount < cbName)
{
sal_uInt8 nCount;
@@ -4519,14 +4519,14 @@ void WW8RStyle::ImportOldFormatStyles()
stcp++;
}
- USHORT nStyles=stcp;
+ sal_uInt16 nStyles=stcp;
std::vector<pxoffset> aCHPXOffsets(stcp);
sal_uInt16 cbChpx;
rSt >> cbChpx;
nByteCount = 2;
stcp=0;
- std::vector< std::vector<BYTE> > aConvertedChpx;
+ std::vector< std::vector<sal_uInt8> > aConvertedChpx;
while (nByteCount < cbChpx)
{
sal_uInt8 cb;
@@ -4549,7 +4549,7 @@ void WW8RStyle::ImportOldFormatStyles()
nByteCount += nRemainder;
}
else
- aConvertedChpx.push_back( std::vector<BYTE>() );
+ aConvertedChpx.push_back( std::vector<sal_uInt8>() );
stcp++;
if (stcp == nStyles)
@@ -4647,7 +4647,7 @@ void WW8RStyle::ImportNewFormatStyles()
{
ScanStyles(); // Scanne Based On
- for (USHORT i = 0; i < cstd; ++i) // import Styles
+ for (sal_uInt16 i = 0; i < cstd; ++i) // import Styles
if (pIo->pCollA[i].bValid)
Import1Style( i );
}
@@ -4671,11 +4671,11 @@ void WW8RStyle::Import()
ImportStyles();
- for (USHORT i = 0; i < cstd; ++i)
+ for (sal_uInt16 i = 0; i < cstd; ++i)
{
// Follow chain
SwWW8StyInf* pi = &pIo->pCollA[i];
- USHORT j = pi->nFollow;
+ sal_uInt16 j = pi->nFollow;
if( j < cstd )
{
SwWW8StyInf* pj = &pIo->pCollA[j];
diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx
index 71aa7022ed31..bba1310a24dc 100644
--- a/sw/source/filter/ww8/ww8par2.hxx
+++ b/sw/source/filter/ww8/ww8par2.hxx
@@ -64,24 +64,24 @@ struct WW8FlyPara
// Achtung: *Nicht* umsortieren, da Teile mit
// memcmp verglichen werden
bool bVer67;
- INT16 nSp26, nSp27; // rohe Position
- INT16 nSp45, nSp28; // Breite / Hoehe
- INT16 nLeMgn, nRiMgn, nUpMgn, nLoMgn; // Raender
- BYTE nSp29; // rohe Bindung + Alignment
- BYTE nSp37; // Wrap-Mode ( 1 / 2; 0 = no Apo ? )
+ sal_Int16 nSp26, nSp27; // rohe Position
+ sal_Int16 nSp45, nSp28; // Breite / Hoehe
+ sal_Int16 nLeMgn, nRiMgn, nUpMgn, nLoMgn; // Raender
+ sal_uInt8 nSp29; // rohe Bindung + Alignment
+ sal_uInt8 nSp37; // Wrap-Mode ( 1 / 2; 0 = no Apo ? )
WW8_BRC5 brc; // Umrandung Top, Left, Bottom, Right, Between
bool bBorderLines; // Umrandungslinien
bool bGrafApo; // true: Dieser Rahmen dient allein dazu, die
// enthaltene Grafik anders als zeichengebunden
// zu positionieren
bool mbVertSet; // true if vertical positioning has been set
- BYTE nOrigSp29;
+ sal_uInt8 nOrigSp29;
WW8FlyPara(bool bIsVer67, const WW8FlyPara* pSrc = 0);
bool operator==(const WW8FlyPara& rSrc) const;
- void Read(const BYTE* pSprm29, WW8PLCFx_Cp_FKP* pPap);
- void ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo);
- void Read(const BYTE* pSprm29, WW8RStyle* pStyle);
+ void Read(const sal_uInt8* pSprm29, WW8PLCFx_Cp_FKP* pPap);
+ void ReadFull(const sal_uInt8* pSprm29, SwWW8ImplReader* pIo);
+ void Read(const sal_uInt8* pSprm29, WW8RStyle* pStyle);
void ApplyTabPos(const WW8_TablePos *pTabPos);
bool IsEmpty() const;
};
@@ -91,11 +91,11 @@ struct WW8SwFlyPara
SwFlyFrmFmt* pFlyFmt;
// 1. Teil: daraus abgeleitete Sw-Attribute
- INT16 nXPos, nYPos; // Position
- INT16 nLeMgn, nRiMgn; // Raender
- INT16 nUpMgn, nLoMgn; // Raender
- INT16 nWidth, nHeight; // Groesse
- INT16 nNettoWidth;
+ sal_Int16 nXPos, nYPos; // Position
+ sal_Int16 nLeMgn, nRiMgn; // Raender
+ sal_Int16 nUpMgn, nLoMgn; // Raender
+ sal_Int16 nWidth, nHeight; // Groesse
+ sal_Int16 nNettoWidth;
SwFrmSize eHeightFix; // Hoehe Fix oder Min
RndStdIds eAnchor; // Bindung
@@ -105,12 +105,12 @@ struct WW8SwFlyPara
sal_Int16 eHAlign; // links, rechts, mittig
SwSurround eSurround; // Wrap-Mode
- BYTE nXBind, nYBind; // relativ zu was gebunden
+ sal_uInt8 nXBind, nYBind; // relativ zu was gebunden
// 2.Teil: sich waehrend des Einlesens ergebende AEnderungen
long nNewNettoWidth;
SwPosition* pMainTextPos; // um nach Apo in Haupttext zurueckzukehren
- USHORT nLineSpace; // LineSpace in tw fuer Graf-Apos
+ sal_uInt16 nLineSpace; // LineSpace in tw fuer Graf-Apos
bool bAutoWidth;
bool bToggelPos;
@@ -122,8 +122,8 @@ struct WW8SwFlyPara
const sal_uInt32 nWWPgTop,
const sal_uInt32 nPgLeft,
const sal_uInt32 nPgWidth,
- const INT32 nIniFlyDx,
- const INT32 nIniFlyDy );
+ const sal_Int32 nIniFlyDx,
+ const sal_Int32 nIniFlyDy );
void BoxUpWidth( long nWidth );
SwWW8FltAnchorStack *pOldAnchorStck;
@@ -132,7 +132,7 @@ struct WW8SwFlyPara
class SwWW8StyInf
{
String sWWStyleName;
- USHORT nWWStyleId;
+ sal_uInt16 nWWStyleId;
public:
rtl_TextEncoding eLTRFontSrcCharSet; // rtl_TextEncoding fuer den Font
rtl_TextEncoding eRTLFontSrcCharSet; // rtl_TextEncoding fuer den Font
@@ -141,11 +141,11 @@ public:
WW8FlyPara* pWWFly;
SwNumRule* pOutlineNumrule;
long nFilePos;
- USHORT nBase;
- USHORT nFollow;
- USHORT nLFOIndex;
- BYTE nListLevel;
- BYTE nOutlineLevel; // falls Gliederungs-Style
+ sal_uInt16 nBase;
+ sal_uInt16 nFollow;
+ sal_uInt16 nLFOIndex;
+ sal_uInt8 nListLevel;
+ sal_uInt8 nOutlineLevel; // falls Gliederungs-Style
sal_uInt16 n81Flags; // Fuer Bold, Italic, ...
sal_uInt16 n81BiDiFlags; // Fuer Bold, Italic, ...
SvxLRSpaceItem maWordLR;
@@ -198,12 +198,12 @@ public:
delete pWWFly;
}
- void SetOrgWWIdent( const String& rName, const USHORT nId )
+ void SetOrgWWIdent( const String& rName, const sal_uInt16 nId )
{
sWWStyleName = rName;
nWWStyleId = nId;
}
- USHORT GetWWStyleId() const { return nWWStyleId; }
+ sal_uInt16 GetWWStyleId() const { return nWWStyleId; }
const String& GetOrgWWName() const
{
return sWWStyleName;
@@ -233,10 +233,10 @@ friend class SwWW8ImplReader;
SwNumRule* pStyRule; // Bullets und Aufzaehlungen in Styles
- BYTE* pParaSprms; // alle ParaSprms des UPX falls UPX.Papx
- USHORT nSprmsLen; // Laenge davon
+ sal_uInt8* pParaSprms; // alle ParaSprms des UPX falls UPX.Papx
+ sal_uInt16 nSprmsLen; // Laenge davon
- BYTE nWwNumLevel; // fuer Bullets und Aufzaehlungen in Styles
+ sal_uInt8 nWwNumLevel; // fuer Bullets und Aufzaehlungen in Styles
bool bTxtColChanged;
bool bFontChanged; // For Simulating Default-Font
@@ -247,13 +247,13 @@ friend class SwWW8ImplReader;
bool bWidowsChanged; // For Simulating Default-Widows / Orphans
void ImportSprms(sal_Size nPosFc, short nLen, bool bPap);
- void ImportSprms(BYTE *pSprms, short nLen, bool bPap);
+ void ImportSprms(sal_uInt8 *pSprms, short nLen, bool bPap);
void ImportGrupx(short nLen, bool bPara, bool bOdd);
short ImportUPX(short nLen, bool bPAP, bool bOdd);
void Set1StyleDefaults();
- void Import1Style(USHORT nNr);
- void RecursiveReg(USHORT nNr);
+ void Import1Style(sal_uInt16 nNr);
+ void RecursiveReg(sal_uInt16 nNr);
void ImportStyles();
@@ -271,7 +271,7 @@ public:
WW8RStyle( WW8Fib& rFib, SwWW8ImplReader* pI );
void Import();
void PostProcessStyles();
- const BYTE* HasParaSprm( USHORT nId ) const;
+ const sal_uInt8* HasParaSprm( sal_uInt16 nId ) const;
};
class WW8FlySet: public SfxItemSet
@@ -289,7 +289,7 @@ public:
enum WW8LvlType {WW8_None, WW8_Outline, WW8_Numbering, WW8_Sequence, WW8_Pause};
-WW8LvlType GetNumType(BYTE nWwLevelNo);
+WW8LvlType GetNumType(sal_uInt8 nWwLevelNo);
#endif
/* vi:set tabstop=4 shiftwidth=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index a9a60a01147a..bcf4e1efbc9a 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -163,7 +163,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
- USHORT bkmFindIdx;
+ sal_uInt16 bkmFindIdx;
String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
if (aBookmarkFind.Len()>0) {
@@ -211,7 +211,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr )
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
- USHORT bkmFindIdx;
+ sal_uInt16 bkmFindIdx;
String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
if (aBookmarkFind.Len()>0) {
@@ -285,7 +285,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr)
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
- USHORT bkmFindIdx;
+ sal_uInt16 bkmFindIdx;
String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
if (aBookmarkFind.Len()>0)
@@ -347,8 +347,8 @@ struct WW8LST // nur DIE Eintraege, die WIR benoetigen!
// nIStDNil if no style linked
sal_uInt32 nIdLst; // Unique List ID
sal_uInt32 nTplC; // Unique template code - Was ist das bloss?
- BYTE bSimpleList:1; // Flag: Liste hat nur EINEN Level
- BYTE bRestartHdn:1; // WW6-Kompatibilitaets-Flag:
+ sal_uInt8 bSimpleList:1; // Flag: Liste hat nur EINEN Level
+ sal_uInt8 bRestartHdn:1; // WW6-Kompatibilitaets-Flag:
// true if the list should start numbering over
}; // at the beginning of each section
@@ -376,11 +376,11 @@ struct WW8LVL // nur DIE Eintraege, die WIR benoetigen!
sal_uInt8 nLenGrpprlChpx; // length, in bytes, of the LVL's grpprlChpx
sal_uInt8 nLenGrpprlPapx; // length, in bytes, of the LVL's grpprlPapx
sal_uInt8 nAlign: 2; // alignment (left, right, centered) of the number
- BYTE bLegal: 1; // egal
- BYTE bNoRest:1; // egal
- BYTE bV6Prev:1; // Ver6-Compatible: number will include previous levels
- BYTE bV6PrSp:1; // Ver6-Compatible: egal
- BYTE bV6: 1; // falls true , beachte die V6-Compatible Eintraege!
+ sal_uInt8 bLegal: 1; // egal
+ sal_uInt8 bNoRest:1; // egal
+ sal_uInt8 bV6Prev:1; // Ver6-Compatible: number will include previous levels
+ sal_uInt8 bV6PrSp:1; // Ver6-Compatible: egal
+ sal_uInt8 bV6: 1; // falls true , beachte die V6-Compatible Eintraege!
sal_uInt8 bDummy: 1; // (macht das Byte voll)
};
@@ -393,8 +393,8 @@ struct WW8LFOLVL
// dieses Byte ist _absichtlich_ nicht in das folgende Byte hineingepackt !!
// (siehe Kommentar unten bei struct WW8LFOInfo)
- BYTE bStartAt :1; // true if the start-at value is overridden
- BYTE bFormat :1; // true if the formatting is overriden
+ sal_uInt8 bStartAt :1; // true if the start-at value is overridden
+ sal_uInt8 bFormat :1; // true if the formatting is overriden
WW8LFOLVL() :
nStartAt(1), nLevel(0), bStartAt(1), bFormat(0) {}
@@ -411,8 +411,8 @@ struct WW8LSTInfo // sortiert nach nIdLst (in WW8 verwendete Listen-Id)
SwNumRule* pNumRule; // Zeiger auf entsprechende Listenvorlage im Writer
sal_uInt32 nIdLst; // WW8Id dieser Liste
- BYTE bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
- BYTE bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
+ sal_uInt8 bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
+ sal_uInt8 bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
// oder beim Reader-Ende geloescht werden sollte
WW8LSTInfo(SwNumRule* pNumRule_, WW8LST& aLST)
@@ -442,12 +442,12 @@ struct WW8LFOInfo // unsortiert, d.h. Reihenfolge genau wie im WW8 Stream
// Byte mit hineinpacken, doch waere das eine ziemliche Fehlerquelle,
// an dem Tag, wo MS ihr Listenformat auf mehr als 15 Level aufbohren.
- BYTE bOverride :1;// Flag, ob die NumRule nicht in maLSTInfos steht,
+ sal_uInt8 bOverride :1;// Flag, ob die NumRule nicht in maLSTInfos steht,
// sondern fuer pLFOInfos NEU angelegt wurde
- BYTE bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
- BYTE bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
+ sal_uInt8 bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
+ sal_uInt8 bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
// oder beim Reader-Ende geloescht werden sollte
- BYTE bLSTbUIDSet :1;// Flag, ob bUsedInDoc in maLSTInfos gesetzt wurde,
+ sal_uInt8 bLSTbUIDSet :1;// Flag, ob bUsedInDoc in maLSTInfos gesetzt wurde,
// und nicht nochmals gesetzt zu werden braucht
WW8LFOInfo(const WW8LFO& rLFO);
};
@@ -472,7 +472,7 @@ sal_uInt8* WW8ListManager::GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms,
sal_uInt8 nLen)
{
sal_uInt8* pSprms = &rSprms;
- USHORT i=0;
+ sal_uInt16 i=0;
while (i < nLen)
{
sal_uInt16 nAktId = maSprmParser.GetSprmId(pSprms);
@@ -480,7 +480,7 @@ sal_uInt8* WW8ListManager::GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms,
return pSprms + maSprmParser.DistanceToData(nId);
// gib Zeiger auf Daten
- USHORT x = maSprmParser.GetSprmSize(nAktId, pSprms);
+ sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSprms);
i = i + x;
pSprms += x;
}
@@ -640,7 +640,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
// most of the time.
if ( nTabPos != 0 )
{
- const USHORT nDesired = aLVL.nDxaLeft + aLVL.nDxaLeft1;
+ const sal_uInt16 nDesired = aLVL.nDxaLeft + aLVL.nDxaLeft1;
bool bDoAdjust = false;
if ( nDesired < aLVL.nDxaLeft )
@@ -696,8 +696,8 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
// in WW8PAR6.CXX rufen ganz normal ihr NewAttr() oder GetFmtAttr()
// und diese merken am besetzten Reader-ItemSet-Pointer, dass dieser
// spezielle ItemSet relevant ist - und nicht ein Stack oder Style!
- USHORT nOldFlags1 = rReader.GetToggleAttrFlags();
- USHORT nOldFlags2 = rReader.GetToggleBiDiAttrFlags();
+ sal_uInt16 nOldFlags1 = rReader.GetToggleAttrFlags();
+ sal_uInt16 nOldFlags2 = rReader.GetToggleBiDiAttrFlags();
short nLen = aLVL.nLenGrpprlChpx;
sal_uInt8* pSprms1 = &aGrpprlChpx[0];
while (0 < nLen)
@@ -1062,7 +1062,7 @@ SwNumRule* WW8ListManager::CreateNextRule(bool bSimple)
// --> OD 2008-06-04 #i86652#
// sal_uInt16 nRul = rDoc.MakeNumRule(rDoc.GetUniqueNumRuleName(&sPrefix));
sal_uInt16 nRul =
- rDoc.MakeNumRule( rDoc.GetUniqueNumRuleName(&sPrefix), 0, FALSE,
+ rDoc.MakeNumRule( rDoc.GetUniqueNumRuleName(&sPrefix), 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT );
// <--
SwNumRule* pMyNumRule = rDoc.GetNumRuleTbl()[nRul];
@@ -1392,7 +1392,7 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
else if (aLFOLVL.bStartAt)
{
aNumFmt.SetStart(
- writer_cast<USHORT>(aLFOLVL.nStartAt));
+ writer_cast<sal_uInt16>(aLFOLVL.nStartAt));
}
//
// 2.2.2.3 das NumFmt in die NumRule aufnehmen
@@ -1483,7 +1483,7 @@ bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo)
if (bRet)
{
- for (BYTE n = 0; n < MAXLEVEL; ++n )
+ for (sal_uInt8 n = 0; n < MAXLEVEL; ++n )
{
//The SvxNumberFormat compare, not the SwNumFmt compare
const SvxNumberFormat &rO = rOne.Get(n);
@@ -1499,7 +1499,7 @@ bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo)
}
SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
- const BYTE nLevel, std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode)
+ const sal_uInt8 nLevel, std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode)
{
sal_uInt16 nLFOInfos = pLFOInfos ? pLFOInfos->Count() : 0;
if( nLFOInfos <= nLFOPosition )
@@ -1558,7 +1558,7 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
SwNumRule *pRet = pLFOInfo->pNumRule;
bool bRestart(false);
- USHORT nStart(0);
+ sal_uInt16 nStart(0);
bool bNewstart(false);
/*
Note: If you fiddle with this then you have to make sure that #i18322#
@@ -1598,7 +1598,7 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
else
{
bNewstart = true;
- nStart = writer_cast<USHORT>
+ nStart = writer_cast<sal_uInt16>
(pLFOInfo->maOverrides[nLevel].nStartAt);
}
}
@@ -2132,10 +2132,10 @@ bool SwWW8ImplReader::ImportFormulaControl(WW8FormulaControl &aFormula,
(*pPlcxMan)++;
nStart = pPlcxMan->Where();
}
- ULONG nOffset = nPicLocFc;
+ sal_uLong nOffset = nPicLocFc;
aSave.Restore(this);
- ULONG nOldPos = pDataStream->Tell();
+ sal_uLong nOldPos = pDataStream->Tell();
WW8_PIC aPic;
pDataStream->Seek( nOffset);
PicRead( pDataStream, &aPic, bVer67);
@@ -2180,8 +2180,8 @@ sal_Bool SwMSConvertControls::InsertFormula(WW8FormulaControl &rFormula)
void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
SvStream *pDataStream)
{
- UINT8 nField;
- UINT8 nHeaderByte;
+ sal_uInt8 nField;
+ sal_uInt8 nHeaderByte;
int nType=0;
*pDataStream >> nHeaderByte;
@@ -2314,7 +2314,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const String &rString,
awt::Size aRet;
struct CtrlFontMapEntry
{
- USHORT nWhichId;
+ sal_uInt16 nWhichId;
const sal_Char* pPropNm;
};
const CtrlFontMapEntry aMapTable[] =
@@ -2576,7 +2576,7 @@ WW8FormulaEditBox::WW8FormulaEditBox(SwWW8ImplReader &rR)
sal_Bool SwMSConvertControls::InsertControl(
const uno::Reference< form::XFormComponent > & rFComp,
const awt::Size& rSize, uno::Reference< drawing::XShape > *pShape,
- BOOL bFloatingCtrl)
+ sal_Bool bFloatingCtrl)
{
const uno::Reference< container::XIndexContainer > &rComps = GetFormComps();
uno::Any aTmp( &rFComp, ::getCppuType((const uno::Reference<
@@ -2603,8 +2603,8 @@ sal_Bool SwMSConvertControls::InsertControl(
xCreate, uno::UNO_QUERY );
//I lay a small bet that this will change to
- //INT16 nTemp=TextContentAnchorType::AS_CHARACTER;
- INT16 nTemp;
+ //sal_Int16 nTemp=TextContentAnchorType::AS_CHARACTER;
+ sal_Int16 nTemp;
if (bFloatingCtrl)
nTemp= text::TextContentAnchorType_AT_PARAGRAPH;
else
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index c9238b4a4681..d6779fd360ac 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -67,10 +67,10 @@
struct OLE_MFP
{
- INT16 mm; // 0x6 int
- INT16 xExt; // 0x8 int in 1/100 mm
- INT16 yExt; // 0xa int in 1/100 mm
- INT16 hMF; // 0xc int
+ sal_Int16 mm; // 0x6 int
+ sal_Int16 xExt; // 0x8 int in 1/100 mm
+ sal_Int16 yExt; // 0xa int in 1/100 mm
+ sal_Int16 hMF; // 0xc int
};
using namespace ::com::sun::star;
@@ -101,7 +101,7 @@ static bool SwWw8ReadScaling(long& rX, long& rY, SvStorageRef& rSrc1)
ASSERT( pS->Tell() >= 76, "+OLE-PIC-Stream is shorter than 76 Byte" );
- INT32 nOrgWidth,
+ sal_Int32 nOrgWidth,
nOrgHeight,
nScaleX,
nScaleY,
@@ -142,7 +142,7 @@ static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp,
STREAM_STD_READ | STREAM_NOCREATE);
SvStorageStream* pSt = xSrc2;
pSt->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- ULONG nRead = pSt->Read( pMfp, sizeof(*pMfp ) );
+ sal_uLong nRead = pSt->Read( pMfp, sizeof(*pMfp ) );
// Mini-Placable-Header lesen
if (nRead != sizeof(*pMfp))
return false;
@@ -197,8 +197,8 @@ static bool SwWw6ReadMacPICTStream(Graphic& rGraph, SvStorageRef& rSrc1)
SvStorageStreamRef xSrc4 = rSrc1->OpenSotStream( CREATE_CONST_ASC( "\3PICT" ));
SvStorageStream* pStp = xSrc4;
pStp->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- BYTE aTestA[10]; // Ist der 01Ole-Stream ueberhaupt vorhanden
- ULONG nReadTst = pStp->Read( aTestA, sizeof( aTestA ) );
+ sal_uInt8 aTestA[10]; // Ist der 01Ole-Stream ueberhaupt vorhanden
+ sal_uLong nReadTst = pStp->Read( aTestA, sizeof( aTestA ) );
if (nReadTst != sizeof(aTestA))
return false;
@@ -433,7 +433,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
if (bOleOk)
{
- ULONG nOldPos = pDataStream->Tell();
+ sal_uLong nOldPos = pDataStream->Tell();
pDataStream->Seek(STREAM_SEEK_TO_END);
SvStream *pTmpData = 0;
if (nObjLocFc < pDataStream->Tell())
@@ -449,7 +449,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
STREAM_STD_READ | STREAM_NOCREATE );
if ( xObjInfoSrc.Is() && !xObjInfoSrc->GetError() )
{
- BYTE nByte = 0;
+ sal_uInt8 nByte = 0;
*xObjInfoSrc >> nByte;
if ( ( nByte >> 4 ) & embed::Aspects::MSOLE_ICON )
nAspect = embed::Aspects::MSOLE_ICON;
@@ -467,17 +467,17 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
}
void SwWW8ImplReader::ReadRevMarkAuthorStrTabl( SvStream& rStrm,
- INT32 nTblPos, INT32 nTblSiz, SwDoc& rDocOut )
+ sal_Int32 nTblPos, sal_Int32 nTblSiz, SwDoc& rDocOut )
{
::std::vector<String> aAuthorNames;
WW8ReadSTTBF( !bVer67, rStrm, nTblPos, nTblSiz, bVer67 ? 2 : 0,
eStructCharSet, aAuthorNames );
- USHORT nCount = static_cast< USHORT >(aAuthorNames.size());
- for( USHORT nAuthor = 0; nAuthor < nCount; ++nAuthor )
+ sal_uInt16 nCount = static_cast< sal_uInt16 >(aAuthorNames.size());
+ for( sal_uInt16 nAuthor = 0; nAuthor < nCount; ++nAuthor )
{
// Store author in doc
- USHORT nSWId = rDocOut.InsertRedlineAuthor(aAuthorNames[nAuthor]);
+ sal_uInt16 nSWId = rDocOut.InsertRedlineAuthor(aAuthorNames[nAuthor]);
// Store matchpair
if( !pAuthorInfos )
pAuthorInfos = new sw::util::AuthorInfos;
@@ -492,14 +492,14 @@ void SwWW8ImplReader::ReadRevMarkAuthorStrTabl( SvStream& rStrm,
*/
// insert or delete content (change char attributes resp.)
void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
- const BYTE* pData, short nLen )
+ const sal_uInt8* pData, short nLen )
{
// there *must* be a SprmCIbstRMark[Del] and a SprmCDttmRMark[Del]
// pointing to the very same char position as our SprmCFRMark[Del]
if (!pPlcxMan)
return;
- const BYTE* pSprmCIbstRMark;
- const BYTE* pSprmCDttmRMark;
+ const sal_uInt8* pSprmCIbstRMark;
+ const sal_uInt8* pSprmCDttmRMark;
if( nsRedlineType_t::REDLINE_FORMAT == eType )
{
pSprmCIbstRMark = pData+1;
@@ -513,7 +513,7 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
of the change, (possibly a word bug) so we must use the "get a full
list" varient of HasCharSprm and take the last one as the true one.
*/
- std::vector<const BYTE *> aResult;
+ std::vector<const sal_uInt8 *> aResult;
bool bIns = (nsRedlineType_t::REDLINE_INSERT == eType);
if( bVer67 )
{
@@ -538,16 +538,16 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
else
{
// start of new revision mark, if not there default to first entry
- USHORT nWWAutNo = pSprmCIbstRMark ? SVBT16ToShort( pSprmCIbstRMark ) : 0;
+ sal_uInt16 nWWAutNo = pSprmCIbstRMark ? SVBT16ToShort( pSprmCIbstRMark ) : 0;
sw::util::AuthorInfo aEntry(nWWAutNo);
- USHORT nPos;
+ sal_uInt16 nPos;
if (pAuthorInfos && pAuthorInfos->Seek_Entry(&aEntry, &nPos))
{
if (const sw::util::AuthorInfo* pAuthor = pAuthorInfos->GetObject(nPos))
{
- UINT32 nWWDate = pSprmCDttmRMark ? SVBT32ToUInt32(pSprmCDttmRMark): 0;
+ sal_uInt32 nWWDate = pSprmCDttmRMark ? SVBT32ToUInt32(pSprmCDttmRMark): 0;
DateTime aStamp(sw::ms::DTTM2DateTime(nWWDate));
- USHORT nAutorNo = pAuthor->nOurId;
+ sal_uInt16 nAutorNo = pAuthor->nOurId;
SwFltRedline aNewAttr(eType, nAutorNo, aStamp);
NewAttr(aNewAttr);
@@ -557,19 +557,19 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
}
// insert new content
-void SwWW8ImplReader::Read_CFRMark(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CFRMark(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
Read_CRevisionMark( nsRedlineType_t::REDLINE_INSERT, pData, nLen );
}
// delete old content
-void SwWW8ImplReader::Read_CFRMarkDel(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CFRMarkDel(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
Read_CRevisionMark( nsRedlineType_t::REDLINE_DELETE, pData, nLen );
}
// change properties of content ( == char formating)
-void SwWW8ImplReader::Read_CPropRMark(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CPropRMark(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
// complex (len is always 7)
// 1 byte - chp.fPropRMark
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 93a39b1c390c..4e74a64722ab 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -272,10 +272,10 @@ xub_StrLen _ReadFieldParams::FindNextStringPiece(const xub_StrLen nStart)
// read parameters "1-3" or 1-3 with both values between 1 and nMax
-bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax)
+bool _ReadFieldParams::GetTokenSttFromTo(sal_uInt16* pFrom, sal_uInt16* pTo, sal_uInt16 nMax)
{
- USHORT nStart = 0;
- USHORT nEnd = 0;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nEnd = 0;
xub_StrLen n = GoToTokenParam();
if( STRING_NOTFOUND != n )
{
@@ -286,8 +286,8 @@ bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax
String sStart( sParams.GetToken(0, '-', nIndex) );
if( STRING_NOTFOUND != nIndex )
{
- nStart = static_cast<USHORT>(sStart.ToInt32());
- nEnd = static_cast<USHORT>(sParams.Copy(nIndex).ToInt32());
+ nStart = static_cast<sal_uInt16>(sStart.ToInt32());
+ nEnd = static_cast<sal_uInt16>(sParams.Copy(nIndex).ToInt32());
}
}
if( pFrom ) *pFrom = nStart;
@@ -543,14 +543,14 @@ static SvxExtNumType GetNumberPara(String& rStr, bool bAllowPageDesc = false)
-bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, USHORT nLang)
+bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, sal_uInt16 nLang)
{
bool bRet(false);
const SvxLanguageItem *pLang =
(const SvxLanguageItem*)GetFmtAttr(RES_CHRATR_LANGUAGE);
ASSERT(pLang, "impossible");
- USHORT nDefault = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
+ sal_uInt16 nDefault = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
if (nLang != nDefault)
{
@@ -562,12 +562,12 @@ bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, USHORT nLang)
return bRet;
}
-String GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, USHORT nLang)
+String GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, sal_uInt16 nLang)
{
//Get the system date in the correct final language layout, convert to
//a known language and modify the 2 digit year part to be 4 digit, and
//convert back to the correct language layout.
- ULONG nIndex = pFormatter->GetFormatIndex(NF_DATE_SYSTEM_SHORT, nLang);
+ sal_uLong nIndex = pFormatter->GetFormatIndex(NF_DATE_SYSTEM_SHORT, nLang);
SvNumberformat aFormat = const_cast<SvNumberformat &>
(*(pFormatter->GetEntry(nIndex)));
@@ -587,17 +587,17 @@ String GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, USHORT nLang)
}
short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
- USHORT &rLang, int nWhichDefault, bool bHijri)
+ sal_uInt16 &rLang, int nWhichDefault, bool bHijri)
{
bool bRTL = false;
if (pPlcxMan && !bVer67)
{
- const BYTE *pResult = pPlcxMan->HasCharSprm(0x85A);
+ const sal_uInt8 *pResult = pPlcxMan->HasCharSprm(0x85A);
if (pResult && *pResult)
bRTL = true;
}
RES_CHRATR eLang = bRTL ? RES_CHRATR_CTL_LANGUAGE : RES_CHRATR_LANGUAGE;
- const SvxLanguageItem *pLang = (SvxLanguageItem*)GetFmtAttr( static_cast< USHORT >(eLang));
+ const SvxLanguageItem *pLang = (SvxLanguageItem*)GetFmtAttr( static_cast< sal_uInt16 >(eLang));
ASSERT(pLang, "impossible");
rLang = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
@@ -627,8 +627,8 @@ short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
if (bHijri)
sParams.Insert(CREATE_CONST_ASC("[~hijri]"), 0);
- UINT16 nCheckPos = 0;
- INT16 nType = NUMBERFORMAT_DEFINED;
+ sal_uInt16 nCheckPos = 0;
+ sal_Int16 nType = NUMBERFORMAT_DEFINED;
rFormat = 0;
pFormatter->PutandConvertEntry(sParams, nCheckPos, nType, rFormat,
@@ -637,7 +637,7 @@ short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
return bHasTime ? NUMBERFORMAT_DATETIME : NUMBERFORMAT_DATE;
}
- ULONG nFmtIdx =
+ sal_uLong nFmtIdx =
sw::ms::MSDateTimeFormatToSwFormat(sParams, pFormatter, rLang, bHijri);
short nNumFmtType = NUMBERFORMAT_UNDEFINED;
if (nFmtIdx)
@@ -947,9 +947,9 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
if (bNested)
return 0;
- USHORT n = ( aF.nId <= eMax ) ? aF.nId : static_cast< USHORT >(eMax); // alle > 91 werden 92
- USHORT nI = n / 32; // # des UINT32
- ULONG nMask = 1 << ( n % 32 ); // Maske fuer Bits
+ sal_uInt16 n = ( aF.nId <= eMax ) ? aF.nId : static_cast< sal_uInt16 >(eMax); // alle > 91 werden 92
+ sal_uInt16 nI = n / 32; // # des sal_uInt32
+ sal_uLong nMask = 1 << ( n % 32 ); // Maske fuer Bits
if( nFieldTagAlways[nI] & nMask ) // Flag: Tag it
return Read_F_Tag( &aF ); // Resultat nicht als Text
@@ -1115,7 +1115,7 @@ void SwWW8ImplReader::MakeTagString( String& rStr, const String& rOrg )
rStr.Erase( MAX_FIELDLEN - 4 );
}
-void SwWW8ImplReader::InsertTagField( const USHORT nId, const String& rTagText )
+void SwWW8ImplReader::InsertTagField( const sal_uInt16 nId, const String& rTagText )
{
String aName( CREATE_CONST_ASC( "WwFieldTag" ) );
if( SwFltGetFlag( nFieldFlags, SwFltControlStack::TAGS_DO_ID ) ) // Nummer?
@@ -1133,7 +1133,7 @@ void SwWW8ImplReader::InsertTagField( const USHORT nId, const String& rTagText )
SwFieldType* pFT = rDoc.InsertFldType(
SwSetExpFieldType( &rDoc, aName, nsSwGetSetExpType::GSE_STRING ) );
SwSetExpField aFld( (SwSetExpFieldType*)pFT, rTagText ); // SUB_INVISIBLE
- USHORT nSubType = ( SwFltGetFlag( nFieldFlags, SwFltControlStack::TAGS_VISIBLE ) ) ? 0 : nsSwExtendedSubType::SUB_INVISIBLE;
+ sal_uInt16 nSubType = ( SwFltGetFlag( nFieldFlags, SwFltControlStack::TAGS_VISIBLE ) ) ? 0 : nsSwExtendedSubType::SUB_INVISIBLE;
aFld.SetSubType(nSubType | nsSwGetSetExpType::GSE_STRING);
rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
@@ -1276,7 +1276,7 @@ long SwWW8ImplReader::MapBookmarkVariables(const WW8FieldDesc* pF,
If there was no bookmark associated with this set field, then we create a
pseudo one and insert it in the document.
*/
- USHORT nIndex;
+ sal_uInt16 nIndex;
pPlcxMan->GetBook()->MapName(rOrigName);
String sName = pPlcxMan->GetBook()->GetBookmark(
pF->nSCode, pF->nSCode + pF->nLen, nIndex);
@@ -1496,9 +1496,9 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8FieldDesc*, String& rStr )
eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
{
- USHORT nSub=0;
+ sal_uInt16 nSub=0;
// RegInfoFormat, DefaultFormat fuer DocInfoFelder
- USHORT nReg = DI_SUB_AUTHOR;
+ sal_uInt16 nReg = DI_SUB_AUTHOR;
bool bDateTime = false;
if( 85 == pF->nId )
@@ -1575,11 +1575,11 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
= "REVISIONNUMBER";
static const sal_Char* aName54 // Spanish
= "SNUBBEL BUBBEL";
- static const USHORT nFldCnt = 5;
+ static const sal_uInt16 nFldCnt = 5;
// additional fields are to be coded soon! :-)
- static const USHORT nLangCnt = 4;
+ static const sal_uInt16 nLangCnt = 4;
static const sal_Char *aNameSet_26[nFldCnt][nLangCnt+1] =
{
{aName10, aName11, aName12, aName13, aName14},
@@ -1590,8 +1590,8 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
};
bool bFldFound= false;
- USHORT nFIdx;
- for(USHORT nLIdx=1; !bFldFound && (nLangCnt > nLIdx); ++nLIdx)
+ sal_uInt16 nFIdx;
+ for(sal_uInt16 nLIdx=1; !bFldFound && (nLangCnt > nLIdx); ++nLIdx)
{
for(nFIdx = 0; !bFldFound && (nFldCnt > nFIdx); ++nFIdx)
{
@@ -1670,7 +1670,7 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
sal_uInt32 nFormat = 0;
- USHORT nLang(0);
+ sal_uInt16 nLang(0);
if (bDateTime)
{
short nDT = GetTimeDatePara(rStr, nFormat, nLang, pF->nId);
@@ -1747,7 +1747,7 @@ eF_ResT SwWW8ImplReader::Read_F_DateTime( WW8FieldDesc*pF, String& rStr )
sal_uInt32 nFormat = 0;
- USHORT nLang(0);
+ sal_uInt16 nLang(0);
short nDT = GetTimeDatePara(rStr, nFormat, nLang, ww::eDATE, bHijri);
if( NUMBERFORMAT_UNDEFINED == nDT ) // no D/T-Formatstring
@@ -1814,7 +1814,7 @@ eF_ResT SwWW8ImplReader::Read_F_FileName(WW8FieldDesc*, String &rStr)
eF_ResT SwWW8ImplReader::Read_F_Anz( WW8FieldDesc* pF, String& rStr )
{ // SeitenZahl - Feld
- USHORT nSub = DS_PAGE;
+ sal_uInt16 nSub = DS_PAGE;
switch ( pF->nId ){
case 27: nSub = DS_WORD; break; // Wordzahl
case 28: nSub = DS_CHAR; break; // Zeichenzahl
@@ -1837,7 +1837,7 @@ eF_ResT SwWW8ImplReader::Read_F_CurPage( WW8FieldDesc*, String& rStr )
rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
static const sal_Char aDelim[] = "-.:\x97\x96";
- BYTE nDelim = nPgChpDelim;
+ sal_uInt8 nDelim = nPgChpDelim;
if( nDelim > 4 )
nDelim = 0;
@@ -2501,9 +2501,9 @@ void SwWW8ImplReader::Read_SubF_Combined( _ReadFieldParams& rReadParam)
void SwWW8ImplReader::Read_SubF_Ruby( _ReadFieldParams& rReadParam)
{
- USHORT nJustificationCode=0;
+ sal_uInt16 nJustificationCode=0;
String sFontName;
- UINT32 nFontSize=0;
+ sal_uInt32 nFontSize=0;
String sRuby;
String sText;
long nRet;
@@ -2517,12 +2517,12 @@ void SwWW8ImplReader::Read_SubF_Ruby( _ReadFieldParams& rReadParam)
if( sTemp.EqualsIgnoreCaseAscii( "jc", 0, 2 ) )
{
sTemp.Erase(0,2);
- nJustificationCode = static_cast<USHORT>(sTemp.ToInt32());
+ nJustificationCode = static_cast<sal_uInt16>(sTemp.ToInt32());
}
else if( sTemp.EqualsIgnoreCaseAscii( "hps", 0, 3 ) )
{
sTemp.Erase(0,3);
- nFontSize= static_cast<UINT32>(sTemp.ToInt32());
+ nFontSize= static_cast<sal_uInt32>(sTemp.ToInt32());
}
else if( sTemp.EqualsIgnoreCaseAscii( "Font:", 0, 5 ) )
{
@@ -2600,7 +2600,7 @@ void SwWW8ImplReader::Read_SubF_Ruby( _ReadFieldParams& rReadParam)
SwFmtRuby aRuby(sRuby);
const SwCharFmt *pCharFmt=0;
//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(sRuby, 0);
else
@@ -2688,7 +2688,7 @@ bool SwWW8ImplReader::AddExtraOutlinesAsExtraStyles(SwTOXBase& rBase)
bool bExtras = false;
//This is the case if the winword outline numbering is set while the
//writer one is not
- for (USHORT nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
SwWW8StyInf& rSI = pCollA[nI];
if (rSI.IsOutline())
@@ -2724,7 +2724,7 @@ static void EnsureMaxLevelForTemplates(SwTOXBase& rBase)
//Word included.
if ((rBase.GetLevel() != MAXLEVEL) && (nsSwTOXElement::TOX_TEMPLATE & rBase.GetCreateType()))
{
- for (USHORT nI = MAXLEVEL; nI > 0; --nI)
+ for (sal_uInt16 nI = MAXLEVEL; nI > 0; --nI)
{
String sStyles(rBase.GetStyleNames(nI-1));
if (rBase.GetStyleNames(nI-1).Len())
@@ -2767,12 +2767,12 @@ void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase,
else while( STRING_NOTFOUND != nIndex )
{
xub_StrLen nOldIndex=nIndex;
- USHORT nLevel = static_cast<USHORT>(
+ sal_uInt16 nLevel = static_cast<sal_uInt16>(
sParams.GetToken(0, ';', nIndex).ToInt32());
if( STRING_NOTFOUND == nIndex )
{
nIndex = nOldIndex;
- nLevel = static_cast<USHORT>(
+ nLevel = static_cast<sal_uInt16>(
sParams.GetToken(0, ',', nIndex).ToInt32());
}
@@ -2805,9 +2805,9 @@ void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase,
}
}
-USHORT wwSectionManager::CurrentSectionColCount() const
+sal_uInt16 wwSectionManager::CurrentSectionColCount() const
{
- USHORT nIndexCols = 1;
+ sal_uInt16 nIndexCols = 1;
if (!maSegments.empty())
nIndexCols = maSegments.back().maSep.ccolM1 + 1;
return nIndexCols;
@@ -2829,10 +2829,10 @@ bool wwSectionManager::WillHavePageDescHere(SwNodeIndex aIdx) const
return bRet;
}
-USHORT lcl_GetMaxValidWordTOCLevel(const SwForm &rForm)
+sal_uInt16 lcl_GetMaxValidWordTOCLevel(const SwForm &rForm)
{
// GetFormMax() returns level + 1, hence the -1
- USHORT nRet = rForm.GetFormMax()-1;
+ sal_uInt16 nRet = rForm.GetFormMax()-1;
// If the max of this type of TOC is greater than the max of a word
// possible toc, then clip to the word max
@@ -2871,9 +2871,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
break;
}
- USHORT nCreateOf = (eTox == TOX_CONTENT) ? nsSwTOXElement::TOX_OUTLINELEVEL : nsSwTOXElement::TOX_MARK;
+ sal_uInt16 nCreateOf = (eTox == TOX_CONTENT) ? nsSwTOXElement::TOX_OUTLINELEVEL : nsSwTOXElement::TOX_MARK;
- USHORT nIndexCols = 1;
+ sal_uInt16 nIndexCols = 1;
const SwTOXType* pType = rDoc.GetTOXType( eTox, 0 );
SwForm aOrigForm(eTox);
@@ -2882,7 +2882,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
switch( eTox ){
case TOX_INDEX:
{
- USHORT eOptions = nsSwTOIOptions::TOI_SAME_ENTRY | nsSwTOIOptions::TOI_CASE_SENSITIVE;
+ sal_uInt16 eOptions = nsSwTOIOptions::TOI_SAME_ENTRY | nsSwTOIOptions::TOI_CASE_SENSITIVE;
// TOX_OUTLINELEVEL setzen wir genau dann, wenn
// die Parameter \o in 1 bis 9 liegen
@@ -2904,7 +2904,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
if( sParams.Len() )
{
nIndexCols =
- static_cast<USHORT>(sParams.ToInt32());
+ static_cast<sal_uInt16>(sParams.ToInt32());
}
}
}
@@ -2919,9 +2919,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// Attention: if TOX_CONTENT brave
// GetFormMax() returns MAXLEVEL + 1 !!
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
- for(USHORT nLevel = 1;
+ for(sal_uInt16 nLevel = 1;
nLevel <= nEnd;
++nLevel)
{
@@ -2987,8 +2987,8 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// die Parameter \o in 1 bis 9 liegen
// oder der Parameter \f existiert
// oder GARKEINE Switches Parameter angegeben sind.
- USHORT eCreateFrom = 0;
- USHORT nMaxLevel = 0;
+ sal_uInt16 eCreateFrom = 0;
+ sal_uInt16 nMaxLevel = 0;
long nRet;
_ReadFieldParams aReadParam( rStr );
while( -1 != ( nRet = aReadParam.SkipToNextToken() ))
@@ -3007,7 +3007,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
break;
case 'o':
{
- USHORT nVal;
+ sal_uInt16 nVal;
if( !aReadParam.GetTokenSttFromTo(0, &nVal, WW8ListManager::nMaxLevel) )
nVal = lcl_GetMaxValidWordTOCLevel(aOrigForm);
if( nMaxLevel < nVal )
@@ -3020,7 +3020,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
break;
case 'l':
{
- USHORT nVal;
+ sal_uInt16 nVal;
if( aReadParam.GetTokenSttFromTo(0, &nVal, WW8ListManager::nMaxLevel) )
{
if( nMaxLevel < nVal )
@@ -3044,9 +3044,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// Attention: if TOX_CONTENT brave
// GetFormMax() returns MAXLEVEL + 1 !!
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
- for(USHORT nLevel = 1;
+ for(sal_uInt16 nLevel = 1;
nLevel <= nEnd;
++nLevel)
{
@@ -3092,7 +3092,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
case 'n': // don't print page numbers
{
// read START and END param
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
if( !aReadParam.GetTokenSttFromTo( &nStart, &nEnd,
WW8ListManager::nMaxLevel ) )
{
@@ -3104,7 +3104,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
if (aForm.GetFormMax() <= nEnd)
nEnd = aForm.GetFormMax()-1;
for (
- USHORT nLevel = nStart; nLevel <= nEnd;
+ sal_uInt16 nLevel = nStart; nLevel <= nEnd;
++nLevel
)
{
@@ -3157,12 +3157,12 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
if (bIsHyperlink)
{
SwForm aForm(pBase->GetTOXForm());
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
SwFormToken aLinkStart(TOKEN_LINK_START);
SwFormToken aLinkEnd(TOKEN_LINK_END);
// -> #i21237#
- for(USHORT nLevel = 1; nLevel <= nEnd; ++nLevel)
+ for(sal_uInt16 nLevel = 1; nLevel <= nEnd; ++nLevel)
{
SwFormTokens aPattern = aForm.GetPattern(nLevel);
@@ -3187,7 +3187,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
{
//If we would be created from outlines, either explictly or by default
//then see if we need extra styles added to the outlines
- USHORT eEffectivelyFrom = eCreateFrom ? eCreateFrom : nsSwTOXElement::TOX_OUTLINELEVEL;
+ sal_uInt16 eEffectivelyFrom = eCreateFrom ? eCreateFrom : nsSwTOXElement::TOX_OUTLINELEVEL;
if (eEffectivelyFrom & nsSwTOXElement::TOX_OUTLINELEVEL)
{
if (AddExtraOutlinesAsExtraStyles(*pBase))
@@ -3199,7 +3199,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// currently have no clue how to obtain the tab stop position.
// It is _not_ set at the paragraph style.
SwForm* pForm = 0;
- for (USHORT nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
const SwWW8StyInf& rSI = pCollA[nI];
if (rSI.IsOutlineNumbered())
@@ -3256,10 +3256,10 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
*/
SwForm aOldForm( pBase->GetTOXForm() );
SwForm aForm( eType );
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
// -> #i21237#
- for(USHORT nLevel = 1; nLevel <= nEnd; ++nLevel)
+ for(sal_uInt16 nLevel = 1; nLevel <= nEnd; ++nLevel)
{
SwFormTokens aPattern = aOldForm.GetPattern(nLevel);
@@ -3297,7 +3297,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// #i21237#
// propagate tab stops from paragraph styles used in TOX to
// patterns of the TOX
- pBase->AdjustTabStops(rDoc, TRUE);
+ pBase->AdjustTabStops(rDoc, sal_True);
//#i10028# inserting a toc implicltly acts like a parabreak
//in word and writer
@@ -3454,7 +3454,7 @@ void lcl_ImportTox(SwDoc &rDoc, SwPaM &rPaM, const String &rStr, bool bIdx)
{
TOXTypes eTox = ( !bIdx ) ? TOX_CONTENT : TOX_INDEX; // Default
- USHORT nLevel = 1;
+ sal_uInt16 nLevel = 1;
xub_StrLen n;
String sFldTxt;
@@ -3490,7 +3490,7 @@ void lcl_ImportTox(SwDoc &rDoc, SwPaM &rPaM, const String &rStr, bool bIdx)
&& sParams.GetChar( 0 ) > '0'
&& sParams.GetChar( 0 ) <= '9' )
{
- nLevel = (USHORT)sParams.ToInt32();
+ nLevel = (sal_uInt16)sParams.ToInt32();
}
}
break;
@@ -3538,7 +3538,7 @@ void SwWW8ImplReader::ImportTox( int nFldId, String aStr )
lcl_ImportTox(rDoc, *pPaM, aStr, bIdx);
}
-void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
+void SwWW8ImplReader::Read_FldVanish( sal_uInt16, const sal_uInt8*, short nLen )
{
//Meaningless in a style
if (pAktColl || !pPlcxMan)
@@ -3549,7 +3549,7 @@ void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
// Vorsicht: Bei Feldnamen mit Umlauten geht das MEMICMP nicht!
const static sal_Char *aFldNames[] = { "\x06""INHALT", "\x02""XE", // dt.
"\x02""TC" }; // us
- const static BYTE aFldId[] = { 9, 4, 9 };
+ const static sal_uInt8 aFldId[] = { 9, 4, 9 };
if( nLen < 0 )
{
@@ -3568,7 +3568,7 @@ void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
WW8_CP nStartCp = pPlcxMan->Where() + pPlcxMan->GetCpOfs();
String sFieldName;
- USHORT nFieldLen = pSBase->WW8ReadString( *pStrm, sFieldName, nStartCp,
+ sal_uInt16 nFieldLen = pSBase->WW8ReadString( *pStrm, sFieldName, nStartCp,
nChunk, eStructCharSet );
nStartCp+=nFieldLen;
@@ -3614,7 +3614,7 @@ void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
for( int i = 0; i < 3; i++ )
{
const sal_Char* pName = aFldNames[i];
- USHORT nNameLen = *pName++;
+ sal_uInt16 nNameLen = *pName++;
if( sFieldName.EqualsIgnoreCaseAscii( pName, nC, nNameLen ) )
{
ImportTox( aFldId[i], sFieldName.Copy( nC + nNameLen ) );
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index b298f3721b00..57c04a5226cf 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -123,11 +123,11 @@ using namespace nsHdFtFlags;
#define MM_200 1134 // WW-Default fuer u.Seitenrand: 2.0 cm
-BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
+sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
const WW8RStyle* pSty = 0, const WW8PLCFx_SEPX* pSep = 0);
-ColorData SwWW8ImplReader::GetCol(BYTE nIco)
+ColorData SwWW8ImplReader::GetCol(sal_uInt8 nIco)
{
static const ColorData eSwWW8ColA[] =
{
@@ -151,24 +151,24 @@ inline sal_uInt32 MSRoundTweak(sal_uInt32 x)
# ( ausser OLST, dass weiterhin ein normales Attribut ist )
#**************************************************************************/
-static short ReadSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, short nDefaultVal )
+static short ReadSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, short nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
short nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
return nVal;
}
-static USHORT ReadUSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, short nDefaultVal )
+static sal_uInt16 ReadUSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, short nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
- USHORT nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
+ sal_uInt16 nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
return nVal;
}
-static BYTE ReadBSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, BYTE nDefaultVal )
+static sal_uInt8 ReadBSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, sal_uInt8 nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
- BYTE nVal = ( pS ) ? SVBT8ToByte( pS ) : nDefaultVal;
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
+ sal_uInt8 nVal = ( pS ) ? SVBT8ToByte( pS ) : nDefaultVal;
return nVal;
}
@@ -284,7 +284,7 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
//Get the size of word's default styles font
sal_uInt32 nCharWidth=240;
- for (USHORT nI = 0; nI < pStyles->GetCount(); ++nI)
+ for (sal_uInt16 nI = 0; nI < pStyles->GetCount(); ++nI)
{
if (pCollA[nI].bValid && pCollA[nI].pFmt &&
pCollA[nI].GetWWStyleId() == 0)
@@ -298,9 +298,9 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
//dxtCharSpace
if (rSection.maSep.dxtCharSpace)
{
- UINT32 nCharSpace = rSection.maSep.dxtCharSpace;
+ sal_uInt32 nCharSpace = rSection.maSep.dxtCharSpace;
//main lives in top 20 bits, and is signed.
- INT32 nMain = (nCharSpace & 0xFFFFF000);
+ sal_Int32 nMain = (nCharSpace & 0xFFFFF000);
nMain/=0x1000;
nCharWidth += nMain*20;
@@ -323,7 +323,7 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
rFmt.SetFmtAttr(aGrid);
}
-void SwWW8ImplReader::Read_ParaBiDi(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_FRAMEDIR);
@@ -358,27 +358,27 @@ bool wwSectionManager::SetCols(SwFrmFmt &rFmt, const wwSection &rSection,
aCol.SetLineWidth(1);
}
- aCol.Init(nCols, writer_cast<USHORT>(nColSpace),
- writer_cast<USHORT>(nNettoWidth));
+ aCol.Init(nCols, writer_cast<sal_uInt16>(nColSpace),
+ writer_cast<sal_uInt16>(nNettoWidth));
// sprmSFEvenlySpaced
if (!rSection.maSep.fEvenlySpaced)
{
aCol._SetOrtho(false);
int nIdx = 1;
- for (USHORT i = 0; i < nCols; i++ )
+ for (sal_uInt16 i = 0; i < nCols; i++ )
{
SwColumn* pCol = aCol.GetColumns()[i];
sal_Int32 nLeft = rSection.maSep.rgdxaColumnWidthSpacing[nIdx-1]/2;
sal_Int32 nRight = rSection.maSep.rgdxaColumnWidthSpacing[nIdx+1]/2;
sal_Int32 nWishWidth = rSection.maSep.rgdxaColumnWidthSpacing[nIdx]
+ nLeft + nRight;
- pCol->SetWishWidth(writer_cast<USHORT>(nWishWidth));
- pCol->SetLeft(writer_cast<USHORT>(nLeft));
- pCol->SetRight(writer_cast<USHORT>(nRight));
+ pCol->SetWishWidth(writer_cast<sal_uInt16>(nWishWidth));
+ pCol->SetLeft(writer_cast<sal_uInt16>(nLeft));
+ pCol->SetRight(writer_cast<sal_uInt16>(nRight));
nIdx += 2;
}
- aCol.SetWishWidth(writer_cast<USHORT>(nNettoWidth));
+ aCol.SetWishWidth(writer_cast<sal_uInt16>(nNettoWidth));
}
rFmt.SetFmtAttr(aCol);
return true;
@@ -443,7 +443,7 @@ void wwSectionManager::SetPage(SwPageDesc &rInPageDesc, SwFrmFmt &rFmt,
SetCols(rFmt, rSection, rSection.GetTextAreaWidth());
}
-USHORT lcl_MakeSafeNegativeSpacing(USHORT nIn)
+sal_uInt16 lcl_MakeSafeNegativeSpacing(sal_uInt16 nIn)
{
if (nIn > SHRT_MAX)
nIn = 0;
@@ -466,11 +466,11 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (rSection.maSep.pgbOffsetFrom == 1)
{
- USHORT nDist;
+ sal_uInt16 nDist;
if (aBox.GetLeft())
{
nDist = aBox.GetDistance(BOX_LINE_LEFT);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetLeft() - nDist)), BOX_LINE_LEFT);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetLeft() - nDist)), BOX_LINE_LEFT);
aSizeArray[WW8_LEFT] =
aSizeArray[WW8_LEFT] - nDist + aBox.GetDistance(BOX_LINE_LEFT);
}
@@ -478,7 +478,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetRight())
{
nDist = aBox.GetDistance(BOX_LINE_RIGHT);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetRight() - nDist)), BOX_LINE_RIGHT);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetRight() - nDist)), BOX_LINE_RIGHT);
aSizeArray[WW8_RIGHT] =
aSizeArray[WW8_RIGHT] - nDist + aBox.GetDistance(BOX_LINE_RIGHT);
}
@@ -486,7 +486,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetTop())
{
nDist = aBox.GetDistance(BOX_LINE_TOP);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetUpper() - nDist)), BOX_LINE_TOP);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetUpper() - nDist)), BOX_LINE_TOP);
aSizeArray[WW8_TOP] =
aSizeArray[WW8_TOP] - nDist + aBox.GetDistance(BOX_LINE_TOP);
}
@@ -494,7 +494,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetBottom())
{
nDist = aBox.GetDistance(BOX_LINE_BOTTOM);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetLower() - nDist)), BOX_LINE_BOTTOM);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetLower() - nDist)), BOX_LINE_BOTTOM);
aSizeArray[WW8_BOT] =
aSizeArray[WW8_BOT] - nDist + aBox.GetDistance(BOX_LINE_BOTTOM);
}
@@ -503,20 +503,20 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
}
if (aBox.GetLeft())
- aLR.SetLeft(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetLeft() - aSizeArray[WW8_LEFT])));
+ aLR.SetLeft(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetLeft() - aSizeArray[WW8_LEFT])));
if (aBox.GetRight())
- aLR.SetRight(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetRight() - aSizeArray[WW8_RIGHT])));
+ aLR.SetRight(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetRight() - aSizeArray[WW8_RIGHT])));
if (aBox.GetTop())
- aUL.SetUpper(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetUpper() - aSizeArray[WW8_TOP])));
+ aUL.SetUpper(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetUpper() - aSizeArray[WW8_TOP])));
if (aBox.GetBottom())
{
//#i30088# and #i30074# - do a final sanity check on
//bottom value. Do not allow a resulting zero if bottom
//Border margin value was not originally zero.
if(aUL.GetLower() != 0)
- aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetLower() - aSizeArray[WW8_BOT])));
+ aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetLower() - aSizeArray[WW8_BOT])));
else
- aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aOriginalBottomMargin - aSizeArray[WW8_BOT])));
+ aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aOriginalBottomMargin - aSizeArray[WW8_BOT])));
}
aSet.Put(aLR);
@@ -616,7 +616,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
pHdFmt->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, 0, rData.nSwHLo));
// --> OD 2004-06-18 #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
- aHdUL.SetLower( writer_cast<USHORT>(rData.nSwHLo - cMinHdFtHeight) );
+ aHdUL.SetLower( writer_cast<sal_uInt16>(rData.nSwHLo - cMinHdFtHeight) );
pHdFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, true));
}
@@ -626,7 +626,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
// header and body.
const SwTwips nHdLowerSpace( Abs(rSection.maSep.dyaTop) - rData.nSwUp - rData.nSwHLo );
pHdFmt->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, 0, rData.nSwHLo + nHdLowerSpace));
- aHdUL.SetLower( static_cast< USHORT >(nHdLowerSpace) );
+ aHdUL.SetLower( static_cast< sal_uInt16 >(nHdLowerSpace) );
// <--
pHdFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, false));
@@ -645,7 +645,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
pFtFmt->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, 0, rData.nSwFUp));
// --> OD 2004-06-18 #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
- aFtUL.SetUpper( writer_cast<USHORT>(rData.nSwFUp - cMinHdFtHeight) );
+ aFtUL.SetUpper( writer_cast<sal_uInt16>(rData.nSwFUp - cMinHdFtHeight) );
pFtFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, true));
}
@@ -655,7 +655,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
// footer and body.
const SwTwips nFtUpperSpace( Abs(rSection.maSep.dyaBottom) - rData.nSwLo - rData.nSwFUp );
pFtFmt->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, 0, rData.nSwFUp + nFtUpperSpace));
- aFtUL.SetUpper( static_cast< USHORT >(nFtUpperSpace) );
+ aFtUL.SetUpper( static_cast< sal_uInt16 >(nFtUpperSpace) );
// <--
pFtFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, false));
@@ -664,8 +664,8 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
}
}
- SvxULSpaceItem aUL(writer_cast<USHORT>(rData.nSwUp),
- writer_cast<USHORT>(rData.nSwLo), RES_UL_SPACE);
+ SvxULSpaceItem aUL(writer_cast<sal_uInt16>(rData.nSwUp),
+ writer_cast<sal_uInt16>(rData.nSwLo), RES_UL_SPACE);
rFmt.SetFmtAttr(aUL);
}
@@ -747,7 +747,7 @@ void SwWW8ImplReader::HandleLineNumbering(const wwSection &rSection)
aInfo.SetRestartEachPage(rSection.maSep.lnc == 0);
- aInfo.SetPosFromLeft(writer_cast<USHORT>(rSection.maSep.dxaLnn));
+ aInfo.SetPosFromLeft(writer_cast<sal_uInt16>(rSection.maSep.dxaLnn));
//Paint only for every n line
aInfo.SetCountBy(rSection.maSep.nLnnMod);
@@ -850,12 +850,12 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aLastSection = maSegments.back();
//Here
- USHORT nLIdx = ( ( mrReader.pWwFib->lid & 0xff ) == 0x9 ) ? 1 : 0;
+ sal_uInt16 nLIdx = ( ( mrReader.pWwFib->lid & 0xff ) == 0x9 ) ? 1 : 0;
//BEGIN read section values
wwSection aNewSection(*mrReader.pPaM->GetPoint());
- static const USHORT aVer2Ids0[] =
+ static const sal_uInt16 aVer2Ids0[] =
{
/*sprmSBkc*/ 117,
/*sprmSFTitlePage*/ 118,
@@ -865,7 +865,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 133
};
- static const USHORT aVer67Ids0[] =
+ static const sal_uInt16 aVer67Ids0[] =
{
/*sprmSBkc*/ 142,
/*sprmSFTitlePage*/ 143,
@@ -875,7 +875,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 158
};
- static const USHORT aVer8Ids0[] =
+ static const sal_uInt16 aVer8Ids0[] =
{
/*sprmSBkc*/ 0x3009,
/*sprmSFTitlePage*/ 0x300A,
@@ -885,7 +885,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 0x3019
};
- const USHORT* pIds = eVer <= ww::eWW2 ? aVer2Ids0 : eVer <= ww::eWW7 ? aVer67Ids0 : aVer8Ids0;
+ const sal_uInt16* pIds = eVer <= ww::eWW2 ? aVer2Ids0 : eVer <= ww::eWW7 ? aVer67Ids0 : aVer8Ids0;
if (!maSegments.empty())
{
@@ -895,7 +895,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
// 2 New page
// 3 Even page
// 4 Odd page
- if (const BYTE* pSprmBkc = pSep->HasSprm(pIds[0]))
+ if (const sal_uInt8* pSprmBkc = pSep->HasSprm(pIds[0]))
aNewSection.maSep.bkc = *pSprmBkc;
}
@@ -935,7 +935,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
for (int i = 0; i < nCols; ++i)
{
//sprmSDxaColWidth
- const BYTE* pSW = pSep->HasSprm( (eVer <= ww::eWW7 ? 136 : 0xF203), BYTE( i ) );
+ const sal_uInt8* pSW = pSep->HasSprm( (eVer <= ww::eWW7 ? 136 : 0xF203), sal_uInt8( i ) );
ASSERT( pSW, "+Sprm 136 (bzw. 0xF203) (ColWidth) fehlt" );
sal_uInt16 nWidth = pSW ? SVBT16ToShort(pSW + 1) : 1440;
@@ -945,7 +945,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
if (i < nCols-1)
{
//sprmSDxaColSpacing
- const BYTE* pSD = pSep->HasSprm( (eVer <= ww::eWW7 ? 137 : 0xF204), BYTE( i ) );
+ const sal_uInt8* pSD = pSep->HasSprm( (eVer <= ww::eWW7 ? 137 : 0xF204), sal_uInt8( i ) );
ASSERT( pSD, "+Sprm 137 (bzw. 0xF204) (Colspacing) fehlt" );
if( pSD )
@@ -958,7 +958,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
}
- static const USHORT aVer2Ids1[] =
+ static const sal_uInt16 aVer2Ids1[] =
{
/*sprmSBOrientation*/ 137,
/*sprmSXaPage*/ 139,
@@ -972,7 +972,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDmBinOther*/ 116
};
- static const USHORT aVer67Ids1[] =
+ static const sal_uInt16 aVer67Ids1[] =
{
/*sprmSBOrientation*/ 162,
/*sprmSXaPage*/ 164,
@@ -986,7 +986,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDmBinOther*/ 141
};
- static const USHORT aVer8Ids1[] =
+ static const sal_uInt16 aVer8Ids1[] =
{
/*sprmSBOrientation*/ 0x301d,
/*sprmSXaPage*/ 0xB01F,
@@ -1012,8 +1012,8 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aNewSection.maSep.yaPage = ReadUSprm(pSep, pIds[2], lLetterHeight);
// 3. LR-Raender
- static const USHORT nLef[] = { MM_250, 1800 };
- static const USHORT nRig[] = { MM_250, 1800 };
+ static const sal_uInt16 nLef[] = { MM_250, 1800 };
+ static const sal_uInt16 nRig[] = { MM_250, 1800 };
aNewSection.maSep.dxaLeft = ReadUSprm( pSep, pIds[3], nLef[nLIdx]);
aNewSection.maSep.dxaRight = ReadUSprm( pSep, pIds[4], nRig[nLIdx]);
@@ -1037,23 +1037,23 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
if (eVer >= ww::eWW6)
{
- if (const BYTE* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 132 : 0x3001) ))
+ if (const sal_uInt8* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 132 : 0x3001) ))
aNewSection.maSep.iHeadingPgn = *p;
- if (const BYTE* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 131 : 0x3000) ))
+ if (const sal_uInt8* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 131 : 0x3000) ))
aNewSection.maSep.cnsPgn = *p;
}
- if(const BYTE* pSprmSDmBinFirst = pSep->HasSprm( pIds[8] ))
+ if(const sal_uInt8* pSprmSDmBinFirst = pSep->HasSprm( pIds[8] ))
aNewSection.maSep.dmBinFirst = *pSprmSDmBinFirst;
- if (const BYTE* pSprmSDmBinOther = pSep->HasSprm( pIds[9] ))
+ if (const sal_uInt8* pSprmSDmBinOther = pSep->HasSprm( pIds[9] ))
aNewSection.maSep.dmBinOther = *pSprmSDmBinOther;
- static const USHORT nTop[] = { MM_250, 1440 };
- static const USHORT nBot[] = { MM_200, 1440 };
+ static const sal_uInt16 nTop[] = { MM_250, 1440 };
+ static const sal_uInt16 nBot[] = { MM_200, 1440 };
- static const USHORT aVer2Ids2[] =
+ static const sal_uInt16 aVer2Ids2[] =
{
/*sprmSDyaTop*/ 143,
/*sprmSDyaBottom*/ 144,
@@ -1065,7 +1065,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLnnMin*/ 135
};
- static const USHORT aVer67Ids2[] =
+ static const sal_uInt16 aVer67Ids2[] =
{
/*sprmSDyaTop*/ 168,
/*sprmSDyaBottom*/ 169,
@@ -1076,7 +1076,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDxaLnn*/ 155,
/*sprmSLnnMin*/ 160
};
- static const USHORT aVer8Ids2[] =
+ static const sal_uInt16 aVer8Ids2[] =
{
/*sprmSDyaTop*/ 0x9023,
/*sprmSDyaBottom*/ 0x9024,
@@ -1100,7 +1100,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aNewSection.maSep.wTextFlow = ReadUSprm(pSep, 0x5033, 0);
aNewSection.maSep.clm = ReadUSprm( pSep, 0x5032, 0 );
aNewSection.maSep.dyaLinePitch = ReadUSprm(pSep, 0x9031, 360);
- if (const BYTE* pS = pSep->HasSprm(0x7030))
+ if (const sal_uInt8* pS = pSep->HasSprm(0x7030))
aNewSection.maSep.dxtCharSpace = SVBT32ToUInt32(pS);
//sprmSPgbProp
@@ -1114,16 +1114,16 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
// check if Line Numbering must be activated or resetted
- if (const BYTE* pSprmSNLnnMod = pSep->HasSprm( pIds[4] ))
+ if (const sal_uInt8* pSprmSNLnnMod = pSep->HasSprm( pIds[4] ))
aNewSection.maSep.nLnnMod = *pSprmSNLnnMod;
- if (const BYTE* pSprmSLnc = pSep->HasSprm( pIds[5] ))
+ if (const sal_uInt8* pSprmSLnc = pSep->HasSprm( pIds[5] ))
aNewSection.maSep.lnc = *pSprmSLnc;
- if (const BYTE* pSprmSDxaLnn = pSep->HasSprm( pIds[6] ))
+ if (const sal_uInt8* pSprmSDxaLnn = pSep->HasSprm( pIds[6] ))
aNewSection.maSep.dxaLnn = SVBT16ToShort( pSprmSDxaLnn );
- if (const BYTE* pSprmSLnnMin = pSep->HasSprm( pIds[7] ))
+ if (const sal_uInt8* pSprmSLnnMin = pSep->HasSprm( pIds[7] ))
aNewSection.maSep.lnnMin = *pSprmSLnnMin;
if (eVer <= ww::eWW7)
@@ -1174,7 +1174,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
void SwWW8ImplReader::CopyPageDescHdFt(const SwPageDesc* pOrgPageDesc,
- SwPageDesc* pNewPageDesc, BYTE nCode )
+ SwPageDesc* pNewPageDesc, sal_uInt8 nCode )
{
// copy first header content section
if (nCode & WW8_HEADER_FIRST)
@@ -1218,7 +1218,7 @@ void SwWW8ImplReader::CopyPageDescHdFt(const SwPageDesc* pOrgPageDesc,
// Hilfsroutinen fuer Grafiken und Apos und Tabellen
//------------------------------------------------------
-static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const BYTE* pS)
+static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const sal_uInt8* pS)
{
if( pS )
{
@@ -1231,7 +1231,7 @@ static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const BYTE* pS)
return 0 != pS;
}
-BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
+sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
const WW8RStyle* pSty, const WW8PLCFx_SEPX* pSep)
{
// Ausgegend von diesen defines:
@@ -1241,15 +1241,15 @@ BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
// #define WW8_RIGHT 3
// #define WW8_BETW 4
-//returns a BYTE filled with a bit for each position that had a sprm
+//returns a sal_uInt8 filled with a bit for each position that had a sprm
//setting that border
- BYTE nBorder = false;
+ sal_uInt8 nBorder = false;
if( pSep )
{
if( !bVer67 )
{
- BYTE* pSprm[4];
+ sal_uInt8* pSprm[4];
// sprmSBrcTop, sprmSBrcLeft, sprmSBrcBottom, sprmSBrcRight
if( pSep->Find4Sprms( 0x702B, 0x702C, 0x702D, 0x702E,
@@ -1263,12 +1263,12 @@ BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
else
{
- static const USHORT aVer67Ids[5] = { 38, 39, 40, 41, 42 };
+ static const sal_uInt16 aVer67Ids[5] = { 38, 39, 40, 41, 42 };
- static const USHORT aVer8Ids[5] =
+ static const sal_uInt16 aVer8Ids[5] =
{ 0x6424, 0x6425, 0x6426, 0x6427, 0x6428 };
- const USHORT* pIds = bVer67 ? aVer67Ids : aVer8Ids;
+ const sal_uInt16* pIds = bVer67 ? aVer67Ids : aVer8Ids;
if( pPap )
{
@@ -1289,8 +1289,8 @@ BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
return nBorder;
}
-void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCol, short nIdx,
- USHORT nOOIndex, USHORT nWWIndex, short *pSize=0)
+void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, sal_uInt8 nCol, short nIdx,
+ sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize=0)
{
WW8_BordersSO::eBorderCode eCodeIdx;
@@ -1472,9 +1472,9 @@ void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCo
}
void Set1Border(bool bVer67, SvxBoxItem &rBox, const WW8_BRC& rBor,
- USHORT nOOIndex, USHORT nWWIndex, short *pSize=0)
+ sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize=0)
{
- BYTE nCol;
+ sal_uInt8 nCol;
short nSpace, nIdx;
short nLineThickness = rBor.DetermineBorderProperties(bVer67,&nSpace,&nCol,
&nIdx);
@@ -1529,10 +1529,10 @@ bool WW8_BRC::IsZeroed(bool bVer67) const
}
bool SwWW8ImplReader::SetBorder(SvxBoxItem& rBox, const WW8_BRC* pbrc,
- short *pSizeArray, BYTE nSetBorders) const
+ short *pSizeArray, sal_uInt8 nSetBorders) const
{
bool bChange = false;
- static const USHORT aIdArr[ 10 ] =
+ static const sal_uInt16 aIdArr[ 10 ] =
{
WW8_TOP, BOX_LINE_TOP,
WW8_LEFT, BOX_LINE_LEFT,
@@ -1650,19 +1650,19 @@ static void FlySecur1(short& rSize, const bool bBorder)
rSize = nMin;
}
-inline bool SetValSprm( INT16* pVar, WW8PLCFx_Cp_FKP* pPap, USHORT nId )
+inline bool SetValSprm( sal_Int16* pVar, WW8PLCFx_Cp_FKP* pPap, sal_uInt16 nId )
{
- const BYTE* pS = pPap->HasSprm( nId );
+ const sal_uInt8* pS = pPap->HasSprm( nId );
if( pS )
- *pVar = (INT16)SVBT16ToShort( pS );
+ *pVar = (sal_Int16)SVBT16ToShort( pS );
return ( pS != 0 );
}
-inline bool SetValSprm( INT16* pVar, const WW8RStyle* pStyle, USHORT nId )
+inline bool SetValSprm( sal_Int16* pVar, const WW8RStyle* pStyle, sal_uInt16 nId )
{
- const BYTE* pS = pStyle->HasParaSprm( nId );
+ const sal_uInt8* pS = pStyle->HasParaSprm( nId );
if( pS )
- *pVar = (INT16)SVBT16ToShort( pS );
+ *pVar = (sal_Int16)SVBT16ToShort( pS );
return ( pS != 0 );
}
@@ -1720,12 +1720,12 @@ bool WW8FlyPara::operator==(const WW8FlyPara& rSrc) const
}
// Read fuer normalen Text
-void WW8FlyPara::Read(const BYTE* pSprm29, WW8PLCFx_Cp_FKP* pPap)
+void WW8FlyPara::Read(const sal_uInt8* pSprm29, WW8PLCFx_Cp_FKP* pPap)
{
if (pSprm29)
nOrigSp29 = *pSprm29; // PPC ( Bindung )
- const BYTE* pS = 0;
+ const sal_uInt8* pS = 0;
if( bVer67 )
{
SetValSprm( &nSp26, pPap, 26 ); // X-Position //sprmPDxaAbs
@@ -1775,7 +1775,7 @@ void WW8FlyPara::Read(const BYTE* pSprm29, WW8PLCFx_Cp_FKP* pPap)
nSp29 = nOrigSp29;
}
-void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
+void WW8FlyPara::ReadFull(const sal_uInt8* pSprm29, SwWW8ImplReader* pIo)
{
WW8PLCFMan* pPlcxMan = pIo->pPlcxMan;
WW8PLCFx_Cp_FKP* pPap = pPlcxMan->GetPapPLCF();
@@ -1789,14 +1789,14 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
break; // (*pPap)++ geht bei FastSave schief
// -> bei FastSave kein Test auf Grafik-APO
SvStream* pIoStrm = pIo->pStrm;
- ULONG nPos = pIoStrm->Tell();
+ sal_uLong nPos = pIoStrm->Tell();
WW8PLCFxSave1 aSave;
pPlcxMan->GetPap()->Save( aSave );
bGrafApo = false;
do{ // Block zum rausspringen
- BYTE nTxt[2];
+ sal_uInt8 nTxt[2];
pIoStrm->Read( nTxt, 2 ); // lies Text
if( nTxt[0] != 0x01 || nTxt[1] != 0x0d )// nur Grafik + CR ?
@@ -1806,7 +1806,7 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
// In APO ?
//sprmPPc
- const BYTE* pS = pPap->HasSprm( bVer67 ? 29 : 0x261B );
+ const sal_uInt8* pS = pPap->HasSprm( bVer67 ? 29 : 0x261B );
// Nein -> Grafik-Apo
if( !pS ){
@@ -1816,7 +1816,7 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
ww::WordVersion eVer = pIo->GetFib().GetFIBVersion();
WW8FlyPara *pNowStyleApo=0;
- USHORT nColl = pPap->GetIstd();
+ sal_uInt16 nColl = pPap->GetIstd();
ww::sti eSti = eVer < ww::eWW6 ? ww::GetCanonicalStiFromStc( static_cast< sal_uInt8 >(nColl) ) : static_cast<ww::sti>(nColl);
while (eSti != ww::stiNil && 0 == (pNowStyleApo = pIo->pCollA[nColl].pWWFly))
{
@@ -1840,12 +1840,12 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
// Read fuer Apo-Defs in Styledefs
-void WW8FlyPara::Read(const BYTE* pSprm29, WW8RStyle* pStyle)
+void WW8FlyPara::Read(const sal_uInt8* pSprm29, WW8RStyle* pStyle)
{
if (pSprm29)
nOrigSp29 = *pSprm29; // PPC ( Bindung )
- const BYTE* pS = 0;
+ const sal_uInt8* pS = 0;
if (bVer67)
{
SetValSprm( &nSp26, pStyle, 26 ); // X-Position
@@ -1918,8 +1918,8 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
const sal_uInt32 nWWPgTop,
const sal_uInt32 nPgLeft,
const sal_uInt32 nPgWidth,
- const INT32 nIniFlyDx,
- const INT32 nIniFlyDy )
+ const sal_Int32 nIniFlyDx,
+ const sal_Int32 nIniFlyDy )
{
(void) rPaM;
(void) nPgLeft;
@@ -2072,18 +2072,18 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
// --> OD 2005-01-19 #119176# - no adjustments possible, if frame has
// automatic width.
// determine left border distance
- INT16 nLeBorderMgn( 0L );
+ sal_Int16 nLeBorderMgn( 0L );
if ( !bAutoWidth )
{
- INT16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
&nLeBorderMgn);
nLeBorderMgn = nLeBorderMgn + nTemp;
}
// determine right border distance
- INT16 nRiBorderMgn( 0L );
+ sal_Int16 nRiBorderMgn( 0L );
if ( !bAutoWidth )
{
- INT16 nTemp = rWW.brc[WW8_RIGHT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nTemp = rWW.brc[WW8_RIGHT].DetermineBorderProperties(rWW.bVer67,
&nRiBorderMgn);
nRiBorderMgn = nRiBorderMgn + nTemp;
}
@@ -2137,8 +2137,8 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
Word has a curious bug where the offset stored do not take into
account the internal distance from the corner both
*/
- INT16 nLeLMgn = 0;
- INT16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nLeLMgn = 0;
+ sal_Int16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
&nLeLMgn);
nLeLMgn = nLeLMgn + nTemp;
@@ -2157,7 +2157,7 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
// convert "<X> from top page text area" to
// "<X + page top margin> from page"
eVRel = text::RelOrientation::PAGE_FRAME;
- nYPos = static_cast< INT16 >( nYPos + nWWPgTop );
+ nYPos = static_cast< sal_Int16 >( nYPos + nWWPgTop );
}
// <--
@@ -2291,8 +2291,8 @@ WW8DupProperties::WW8DupProperties(SwDoc &rDoc, SwWW8FltControlStack *pStk)
{
//Close any open character properties and duplicate them inside the
//first table cell
- USHORT nCnt = static_cast< USHORT >(pCtrlStck->Count());
- for (USHORT i=0; i < nCnt; i++)
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(pCtrlStck->Count());
+ for (sal_uInt16 i=0; i < nCnt; i++)
{
const SwFltStackEntry* pEntry = (*pCtrlStck)[ i ];
if(pEntry->bLocked)
@@ -2437,7 +2437,7 @@ bool SwWW8ImplReader::IsDropCap()
WW8PLCFx_Cp_FKP *pPap = pPlcxMan ? pPlcxMan->GetPapPLCF() : 0;
if (pPap)
{
- const BYTE *pDCS;
+ const sal_uInt8 *pDCS;
if (bVer67)
pDCS = pPap->HasSprm(46);
else
@@ -2754,7 +2754,7 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr,
}
// holt Attribut aus der FmtColl / Stack / Doc
-const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( USHORT nWhich )
+const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( sal_uInt16 nWhich )
{
const SfxPoolItem* pRet = 0;
if (pAktColl)
@@ -2799,7 +2799,7 @@ const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( USHORT nWhich )
# Spezial WW - Attribute
#**************************************************************************/
-void SwWW8ImplReader::Read_Special(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_Special(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
{
@@ -2810,7 +2810,7 @@ void SwWW8ImplReader::Read_Special(USHORT, const BYTE* pData, short nLen)
}
// Read_Obj wird fuer fObj und fuer fOle2 benutzt !
-void SwWW8ImplReader::Read_Obj(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_Obj(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
bObj = false;
@@ -2823,7 +2823,7 @@ void SwWW8ImplReader::Read_Obj(USHORT , const BYTE* pData, short nLen)
}
}
-void SwWW8ImplReader::Read_PicLoc(USHORT , const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_PicLoc(sal_uInt16 , const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -2840,13 +2840,13 @@ void SwWW8ImplReader::Read_PicLoc(USHORT , const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_POutLvl(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_POutLvl(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (pAktColl && (0 < nLen))
{
if (SwWW8StyInf* pSI = GetStyle(nAktColl))
{
- pSI->nOutlineLevel = static_cast< BYTE >(
+ pSI->nOutlineLevel = static_cast< sal_uInt8 >(
( (1 <= pSI->GetWWStyleId()) && (9 >= pSI->GetWWStyleId()) )
? pSI->GetWWStyleId()-1
: (pData ? *pData : 0) );
@@ -2854,7 +2854,7 @@ void SwWW8ImplReader::Read_POutLvl(USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Symbol(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( !bIgnoreText )
{
@@ -2889,7 +2889,7 @@ void SwWW8ImplReader::Read_Symbol(USHORT, const BYTE* pData, short nLen )
}
}
-SwWW8StyInf *SwWW8ImplReader::GetStyle(USHORT nColl) const
+SwWW8StyInf *SwWW8ImplReader::GetStyle(sal_uInt16 nColl) const
{
return nColl < nColls ? &pCollA[nColl] : 0;
}
@@ -2900,13 +2900,13 @@ SwWW8StyInf *SwWW8ImplReader::GetStyle(USHORT nColl) const
// Read_BoldUsw fuer Italic, Bold, Kapitaelchen, Versalien, durchgestrichen,
// Contour und Shadow
-void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BoldUsw( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
const int nContigiousWestern = 8;
const int nWestern = nContigiousWestern + 1;
const int nEastern = 2;
const int nIds = nWestern + nEastern;
- static const USHORT nEndIds[ nIds ] =
+ static const sal_uInt16 nEndIds[ nIds ] =
{
RES_CHRATR_WEIGHT, RES_CHRATR_POSTURE,
RES_CHRATR_CROSSEDOUT, RES_CHRATR_CONTOUR,
@@ -2920,7 +2920,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
- BYTE nI;
+ sal_uInt8 nI;
// die Attribut-Nr fuer "doppelt durchgestrichen" tanzt aus der Reihe
if (0x2A53 == nId)
nI = nContigiousWestern; // The out of sequence western id
@@ -2928,11 +2928,11 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
{
// The contigious western ids
if (eVersion <= ww::eWW2)
- nI = static_cast< BYTE >(nId - 60);
+ nI = static_cast< sal_uInt8 >(nId - 60);
else if (eVersion < ww::eWW8)
- nI = static_cast< BYTE >(nId - 85);
+ nI = static_cast< sal_uInt8 >(nId - 85);
else
- nI = static_cast< BYTE >(nId - 0x0835);
+ nI = static_cast< sal_uInt8 >(nId - 0x0835);
}
sal_uInt16 nMask = 1 << nI;
@@ -2952,7 +2952,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
SwWW8StyInf* pSI = GetStyle(nAktColl);
if (pPlcxMan && eVersion > ww::eWW2)
{
- const BYTE *pCharIstd =
+ const sal_uInt8 *pCharIstd =
pPlcxMan->GetChpPLCF()->HasSprm(bVer67 ? 80 : 0x4A30);
if (pCharIstd)
pSI = GetStyle(SVBT16ToShort(pCharIstd));
@@ -2993,7 +2993,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
SetToggleAttr( nI, bOn );
}
-void SwWW8ImplReader::Read_Bidi(USHORT, const BYTE*, short nLen)
+void SwWW8ImplReader::Read_Bidi(sal_uInt16, const sal_uInt8*, short nLen)
{
if (nLen > 0)
bBidi = true;
@@ -3002,22 +3002,22 @@ void SwWW8ImplReader::Read_Bidi(USHORT, const BYTE*, short nLen)
}
// Read_BoldUsw for BiDi Italic, Bold
-void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
+void SwWW8ImplReader::Read_BoldBiDiUsw(sal_uInt16 nId, const sal_uInt8* pData,
short nLen)
{
- static const USHORT nEndIds[2] =
+ static const sal_uInt16 nEndIds[2] =
{
RES_CHRATR_CTL_WEIGHT, RES_CHRATR_CTL_POSTURE,
};
- BYTE nI;
+ sal_uInt8 nI;
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
if (eVersion <= ww::eWW2)
- nI = static_cast< BYTE >(nId - 80);
+ nI = static_cast< sal_uInt8 >(nId - 80);
else if (eVersion < ww::eWW8)
- nI = static_cast< BYTE >(nId - 111);
+ nI = static_cast< sal_uInt8 >(nId - 111);
else
- nI = static_cast< BYTE >(nId - 0x085C);
+ nI = static_cast< sal_uInt8 >(nId - 0x085C);
ASSERT(nI <= 1, "not happening");
if (nI > 1)
@@ -3035,7 +3035,7 @@ void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
SwWW8StyInf* pSI = GetStyle(nAktColl);
if (pPlcxMan)
{
- const BYTE *pCharIstd =
+ const sal_uInt8 *pCharIstd =
pPlcxMan->GetChpPLCF()->HasSprm(bVer67 ? 80 : 0x4A30);
if (pCharIstd)
pSI = GetStyle(SVBT16ToShort(pCharIstd));
@@ -3072,7 +3072,7 @@ void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
SetToggleBiDiAttr(nI, bOn);
}
-void SwWW8ImplReader::SetToggleBiDiAttr(BYTE nAttrId, bool bOn)
+void SwWW8ImplReader::SetToggleBiDiAttr(sal_uInt8 nAttrId, bool bOn)
{
switch (nAttrId)
{
@@ -3097,7 +3097,7 @@ void SwWW8ImplReader::SetToggleBiDiAttr(BYTE nAttrId, bool bOn)
}
}
-void SwWW8ImplReader::SetToggleAttr(BYTE nAttrId, bool bOn)
+void SwWW8ImplReader::SetToggleAttr(sal_uInt8 nAttrId, bool bOn)
{
switch (nAttrId)
{
@@ -3147,11 +3147,11 @@ void SwWW8ImplReader::SetToggleAttr(BYTE nAttrId, bool bOn)
}
}
-void SwWW8ImplReader::_ChkToggleAttr( USHORT nOldStyle81Mask,
- USHORT nNewStyle81Mask )
+void SwWW8ImplReader::_ChkToggleAttr( sal_uInt16 nOldStyle81Mask,
+ sal_uInt16 nNewStyle81Mask )
{
- USHORT i = 1, nToggleAttrFlags = pCtrlStck->GetToggleAttrFlags();
- for (BYTE n = 0; n < 7; ++n, i <<= 1)
+ sal_uInt16 i = 1, nToggleAttrFlags = pCtrlStck->GetToggleAttrFlags();
+ for (sal_uInt8 n = 0; n < 7; ++n, i <<= 1)
{
if (
(i & nToggleAttrFlags) &&
@@ -3163,11 +3163,11 @@ void SwWW8ImplReader::_ChkToggleAttr( USHORT nOldStyle81Mask,
}
}
-void SwWW8ImplReader::_ChkToggleBiDiAttr( USHORT nOldStyle81Mask,
- USHORT nNewStyle81Mask )
+void SwWW8ImplReader::_ChkToggleBiDiAttr( sal_uInt16 nOldStyle81Mask,
+ sal_uInt16 nNewStyle81Mask )
{
- USHORT i = 1, nToggleAttrFlags = pCtrlStck->GetToggleBiDiAttrFlags();
- for (BYTE n = 0; n < 7; ++n, i <<= 1)
+ sal_uInt16 i = 1, nToggleAttrFlags = pCtrlStck->GetToggleBiDiAttrFlags();
+ for (sal_uInt8 n = 0; n < 7; ++n, i <<= 1)
{
if (
(i & nToggleAttrFlags) &&
@@ -3179,7 +3179,7 @@ void SwWW8ImplReader::_ChkToggleBiDiAttr( USHORT nOldStyle81Mask,
}
}
-void SwWW8ImplReader::Read_SubSuper( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_SubSuper( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_ESCAPEMENT );
@@ -3187,7 +3187,7 @@ void SwWW8ImplReader::Read_SubSuper( USHORT, const BYTE* pData, short nLen )
}
short nEs;
- BYTE nProp;
+ sal_uInt8 nProp;
switch( *pData )
{
case 1:
@@ -3251,7 +3251,7 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement()
FLY_AS_CHAR and then we can change its anchoring to centered in the line.
*/
bool bIsGraphicPlacementHack = false;
- USHORT nPos;
+ sal_uInt16 nPos;
if (pCtrlStck->GetFmtStackAttr(RES_CHRATR_ESCAPEMENT, &nPos))
{
SwPaM aRegion(*pPaM->GetPoint());
@@ -3273,7 +3273,7 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement()
return bIsGraphicPlacementHack;
}
-void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_SubSuperProp( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -3286,13 +3286,13 @@ void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
// Font-Position in HalfPoints
short nPos = eVersion <= ww::eWW2 ? *pData : SVBT16ToShort( pData );
- INT32 nPos2 = nPos * ( 10 * 100 ); // HalfPoints in 100 * tw
+ sal_Int32 nPos2 = nPos * ( 10 * 100 ); // HalfPoints in 100 * tw
const SvxFontHeightItem* pF
= (const SvxFontHeightItem*)GetFmtAttr(RES_CHRATR_FONTSIZE);
ASSERT(pF, "Expected to have the fontheight available here");
// #i59022: Check ensure nHeight != 0. Div by zero otherwise.
- INT32 nHeight = 240;
+ sal_Int32 nHeight = 240;
if (pF != NULL && pF->GetHeight() != 0)
nHeight = pF->GetHeight();
nPos2 /= nHeight; // ... nun in % ( gerundet )
@@ -3304,7 +3304,7 @@ void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
NewAttr( aEs );
}
-void SwWW8ImplReader::Read_Underline( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Underline( sal_uInt16, const sal_uInt8* pData, short nLen )
{
FontUnderline eUnderline = UNDERLINE_NONE;
bool bWordLine = false;
@@ -3321,7 +3321,7 @@ void SwWW8ImplReader::Read_Underline( USHORT, const BYTE* pData, short nLen )
// erst mal ggfs. *bold* einschalten!
if( bAlsoBold )
{
- BYTE nOn = 1;
+ sal_uInt8 nOn = 1;
Read_BoldUsw( 0x0835, &nOn, nLen );
eUnderline = UNDERLINE_SINGLE;
}
@@ -3372,7 +3372,7 @@ NoBracket 78 CA 06 - 02 00 00 02 34 52
<> 78 CA 06 - 02 03 00 02 34 52
{} 78 CA 06 - 02 04 00 02 34 52
*/
-void SwWW8ImplReader::Read_DoubleLine_Rotate( USHORT, const BYTE* pData,
+void SwWW8ImplReader::Read_DoubleLine_Rotate( sal_uInt16, const sal_uInt8* pData,
short nLen )
{
if( nLen < 0 ) // close the tag
@@ -3408,7 +3408,7 @@ void SwWW8ImplReader::Read_DoubleLine_Rotate( USHORT, const BYTE* pData,
}
}
-void SwWW8ImplReader::Read_TxtColor( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_TxtColor( sal_uInt16, const sal_uInt8* pData, short nLen )
{
//Has newer colour varient, ignore this old varient
if (!bVer67 && pPlcxMan && pPlcxMan->GetChpPLCF()->HasSprm(0x6870))
@@ -3418,7 +3418,7 @@ void SwWW8ImplReader::Read_TxtColor( USHORT, const BYTE* pData, short nLen )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
else
{
- BYTE b = *pData; // Parameter: 0 = Auto, 1..16 Farben
+ sal_uInt8 b = *pData; // Parameter: 0 = Auto, 1..16 Farben
if( b > 16 ) // unbekannt -> Black
b = 0;
@@ -3440,7 +3440,7 @@ sal_uInt32 wwUtility::BGRToRGB(sal_uInt32 nColor)
return nColor;
}
-void SwWW8ImplReader::Read_TxtForeColor(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_TxtForeColor(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
@@ -3453,7 +3453,7 @@ void SwWW8ImplReader::Read_TxtForeColor(USHORT, const BYTE* pData, short nLen)
}
}
-bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
+bool SwWW8ImplReader::GetFontParams( sal_uInt16 nFCode, FontFamily& reFamily,
String& rName, FontPitch& rePitch, CharSet& reCharSet )
{
// Die Defines, aus denen diese Tabellen erzeugt werden, stehen in windows.h
@@ -3492,7 +3492,7 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
}
// pF->ff : Family
- BYTE b = pF->ff;
+ sal_uInt8 b = pF->ff;
// make sure Font Family Code is set correctly
// at least for the most important fonts
@@ -3533,7 +3533,7 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
sFontName12, sFontName13
};
- for( USHORT n = 0; n < FONTNAMETAB_SZ; n++ )
+ for( sal_uInt16 n = 0; n < FONTNAMETAB_SZ; n++ )
{
const sal_Char* pCmp = aFontNameTab[ n ];
xub_StrLen nLen = *pCmp++;
@@ -3551,9 +3551,9 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
return true;
}
-USHORT SwWW8ImplReader::CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich)
+sal_uInt16 SwWW8ImplReader::CorrectResIdForCharset(CharSet nCharSet, sal_uInt16 nWhich)
{
- USHORT nResult = 0;
+ sal_uInt16 nResult = 0;
switch (nCharSet) {
case RTL_TEXTENCODING_MS_932:
@@ -3568,8 +3568,8 @@ USHORT SwWW8ImplReader::CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich)
return nResult;
}
-bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums,
- USHORT nWhich)
+bool SwWW8ImplReader::SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums,
+ sal_uInt16 nWhich)
{
FontFamily eFamily;
String aName;
@@ -3669,7 +3669,7 @@ void SwWW8ImplReader::ResetCJKCharSetVars()
/*
Font ein oder ausschalten:
*/
-void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_FontCode( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if (!bSymbol) // falls bSymbol, gilt der am Symbol
{ // (siehe sprmCSymbol) gesetzte Font !
@@ -3703,7 +3703,7 @@ void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
}
else
{
- USHORT nFCode = SVBT16ToShort( pData ); // Font-Nummer
+ sal_uInt16 nFCode = SVBT16ToShort( pData ); // Font-Nummer
if (SetNewFontAttr(nFCode, true, nId) // Lies Inhalt
&& pAktColl && pStyles ) // Style-Def ?
{
@@ -3719,7 +3719,7 @@ void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_FontSize( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -3748,7 +3748,7 @@ void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
// Font-Size in half points e.g. 10 = 1440 / ( 72 * 2 )
- USHORT nFSize = eVersion <= ww::eWW2 ? *pData : SVBT16ToShort(pData);
+ sal_uInt16 nFSize = eVersion <= ww::eWW2 ? *pData : SVBT16ToShort(pData);
nFSize*= 10;
SvxFontHeightItem aSz( nFSize, 100, nId );
@@ -3771,14 +3771,14 @@ void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
-void SwWW8ImplReader::Read_CharSet(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CharSet(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
{ // Ende des Attributes
eHardCharSet = RTL_TEXTENCODING_DONTKNOW;
return;
}
- BYTE nfChsDiff = SVBT8ToByte( pData );
+ sal_uInt8 nfChsDiff = SVBT8ToByte( pData );
if( nfChsDiff )
eHardCharSet = rtl_getTextEncodingFromWindowsCharset( *(pData + 1) );
@@ -3786,7 +3786,7 @@ void SwWW8ImplReader::Read_CharSet(USHORT , const BYTE* pData, short nLen)
eHardCharSet = RTL_TEXTENCODING_DONTKNOW;
}
-void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Language( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -3811,7 +3811,7 @@ void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
pCtrlStck->SetAttr( *pPaM->GetPoint(), nId );
else
{
- USHORT nLang = SVBT16ToShort( pData ); // Language-Id
+ sal_uInt16 nLang = SVBT16ToShort( pData ); // Language-Id
NewAttr(SvxLanguageItem((const LanguageType)nLang, nId));
}
}
@@ -3819,14 +3819,14 @@ void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
/*
Einschalten des Zeichen-Styles:
*/
-void SwWW8ImplReader::Read_CColl( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_CColl( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){ // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_TXTATR_CHARFMT );
nCharFmt = -1;
return;
}
- USHORT nId = SVBT16ToShort( pData ); // Style-Id (NICHT Sprm-Id!)
+ sal_uInt16 nId = SVBT16ToShort( pData ); // Style-Id (NICHT Sprm-Id!)
if( nId >= nColls || !pCollA[nId].pFmt // ungueltige Id ?
|| pCollA[nId].bColl ) // oder Para-Style ?
@@ -3840,17 +3840,17 @@ void SwWW8ImplReader::Read_CColl( USHORT, const BYTE* pData, short nLen )
/*
enger oder weiter als normal:
*/
-void SwWW8ImplReader::Read_Kern( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Kern( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){ // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_KERNING );
return;
}
- INT16 nKern = SVBT16ToShort( pData ); // Kerning in Twips
+ sal_Int16 nKern = SVBT16ToShort( pData ); // Kerning in Twips
NewAttr( SvxKerningItem( nKern, RES_CHRATR_KERNING ) );
}
-void SwWW8ImplReader::Read_FontKern( USHORT, const BYTE* , short nLen )
+void SwWW8ImplReader::Read_FontKern( sal_uInt16, const sal_uInt8* , short nLen )
{
if( nLen < 0 ) // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_AUTOKERN );
@@ -3858,7 +3858,7 @@ void SwWW8ImplReader::Read_FontKern( USHORT, const BYTE* , short nLen )
NewAttr(SvxAutoKernItem(true, RES_CHRATR_AUTOKERN));
}
-void SwWW8ImplReader::Read_CharShadow( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_CharShadow( sal_uInt16, const sal_uInt8* pData, short nLen )
{
//Has newer colour varient, ignore this old varient
if (!bVer67 && pPlcxMan && pPlcxMan->GetChpPLCF()->HasSprm(0xCA71))
@@ -3884,7 +3884,7 @@ void SwWW8ImplReader::Read_CharShadow( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_TxtBackColor(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_TxtBackColor(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
{
@@ -3906,7 +3906,7 @@ void SwWW8ImplReader::Read_TxtBackColor(USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CharHighlight(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen <= 0 )
{
@@ -3919,7 +3919,7 @@ void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
}
else
{
- BYTE b = *pData; // Parameter: 0 = Auto, 1..16 Farben
+ sal_uInt8 b = *pData; // Parameter: 0 = Auto, 1..16 Farben
if( b > 16 ) // unbekannt -> Black
b = 0; // Auto -> Black
@@ -3934,7 +3934,7 @@ void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
# Absatz - Attribute
#**************************************************************************/
-void SwWW8ImplReader::Read_NoLineNumb(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_NoLineNumb(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 ) // Ende des Attributes
{
@@ -3953,7 +3953,7 @@ void SwWW8ImplReader::Read_NoLineNumb(USHORT , const BYTE* pData, short nLen)
}
// Sprm 16, 17
-void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if (nLen < 0) // End of the Attributes
{
@@ -4034,7 +4034,7 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
*/
if (pPlcxMan && pCollA[nAktColl].bHasBrokenWW6List)
{
- const BYTE *pIsZeroed = pPlcxMan->GetPapPLCF()->HasSprm(0x460B);
+ const sal_uInt8 *pIsZeroed = pPlcxMan->GetPapPLCF()->HasSprm(0x460B);
if (pIsZeroed && *pIsZeroed == 0)
{
const SvxLRSpaceItem &rLR =
@@ -4070,7 +4070,7 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
}
// Sprm 20
-void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_LineSpace( sal_uInt16, const sal_uInt8* pData, short nLen )
{
// Kommentear siehe Read_UL()
if (bStyNormal && bWWBugNormal)
@@ -4107,11 +4107,11 @@ void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
// bei proportional betraegt er min( 0cm, FontSize*(nFach-1) ) sowohl "vor"
// wie auch "nach"
- USHORT nWwPre = 0;
- USHORT nWwPost = 0;
- USHORT nSwPre = 0;
- USHORT nSwPost = 0;
- USHORT nSpaceTw = 0;
+ sal_uInt16 nWwPre = 0;
+ sal_uInt16 nWwPost = 0;
+ sal_uInt16 nSwPre = 0;
+ sal_uInt16 nSwPost = 0;
+ sal_uInt16 nSpaceTw = 0;
SvxLineSpacingItem aLSpc( LINE_SPACE_DEFAULT_HEIGHT, RES_PARATR_LINESPACING );
@@ -4121,32 +4121,32 @@ void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
//JP 03.12.98: nach Absprache mit AMA ist die Begrenzung unsinnig
if( n>200 ) n = 200; // SW_UI-Maximum
- aLSpc.SetPropLineSpace( (const BYTE)n );
+ aLSpc.SetPropLineSpace( (const sal_uInt8)n );
const SvxFontHeightItem* pH = (const SvxFontHeightItem*)
GetFmtAttr( RES_CHRATR_FONTSIZE );
- nSpaceTw = (USHORT)( n * pH->GetHeight() / 100 );
+ nSpaceTw = (sal_uInt16)( n * pH->GetHeight() / 100 );
if( n > 100 )
- nWwPost = nSwPre = nSwPost = (USHORT)( ( n - 100 )
+ nWwPost = nSwPre = nSwPost = (sal_uInt16)( ( n - 100 )
* pH->GetHeight() / 100 );
}
else // Fixed / Minimum
{
// bei negativen Space ist der Abstand exakt, sonst minimum
- nSpaceTw = (USHORT)nSpace;
+ nSpaceTw = (sal_uInt16)nSpace;
aLSpc.SetLineHeight( nSpaceTw );
aLSpc.GetLineSpaceRule() = eLnSpc;
nSwPre = nSpace;
if( SVX_LINE_SPACE_FIX == eLnSpc ) // Genau
{
- nWwPre = (USHORT)( 8L * nSpace / 10 );
- nWwPost = (USHORT)( 2L * nSpace / 10 );
+ nWwPre = (sal_uInt16)( 8L * nSpace / 10 );
+ nWwPost = (sal_uInt16)( 2L * nSpace / 10 );
nSwPre = nSpace;
}
else // Minimum
{
- nWwPre = (USHORT)( 129L * nSpace / 100 - 95 );// erst bei groesseren
+ nWwPre = (sal_uInt16)( 129L * nSpace / 100 - 95 );// erst bei groesseren
// Zeilenabstaenden
}
}
@@ -4164,7 +4164,7 @@ sal_uInt16 SwWW8ImplReader::GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing)
return 280; //Seems to be always 14points in this case
}
-void SwWW8ImplReader::Read_DontAddEqual(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_DontAddEqual(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
return;
@@ -4173,7 +4173,7 @@ void SwWW8ImplReader::Read_DontAddEqual(USHORT, const BYTE *pData, short nLen)
maTracer.Log(sw::log::eDontAddSpaceForEqualStyles);
}
-void SwWW8ImplReader::Read_ParaAutoBefore(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_ParaAutoBefore(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
{
@@ -4200,7 +4200,7 @@ void SwWW8ImplReader::Read_ParaAutoBefore(USHORT, const BYTE *pData, short nLen)
}
}
-void SwWW8ImplReader::Read_ParaAutoAfter(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_ParaAutoAfter(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
{
@@ -4228,7 +4228,7 @@ void SwWW8ImplReader::Read_ParaAutoAfter(USHORT, const BYTE *pData, short nLen)
}
// Sprm 21, 22
-void SwWW8ImplReader::Read_UL( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
// Nun eine Umpopelung eines WW-Fehlers: Bei nProduct == 0c03d wird
// faelschlicherweise ein DyaAfter 240 ( delta y abstand after, amn.d.?b.)
@@ -4273,7 +4273,7 @@ void SwWW8ImplReader::Read_UL( USHORT nId, const BYTE* pData, short nLen )
NewAttr( aUL );
}
-void SwWW8ImplReader::Read_IdctHint( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_IdctHint( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (nLen < 0)
nIdctHint = 0;
@@ -4281,7 +4281,7 @@ void SwWW8ImplReader::Read_IdctHint( USHORT, const BYTE* pData, short nLen )
nIdctHint = *pData;
}
-void SwWW8ImplReader::Read_Justify( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Justify( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -4320,7 +4320,7 @@ void SwWW8ImplReader::Read_Justify( USHORT, const BYTE* pData, short nLen )
bool SwWW8ImplReader::IsRightToLeft()
{
bool bRTL = false;
- const BYTE *pDir =
+ const sal_uInt8 *pDir =
pPlcxMan ? pPlcxMan->GetPapPLCF()->HasSprm(0x2441) : 0;
if (pDir)
bRTL = *pDir ? true : false;
@@ -4334,7 +4334,7 @@ bool SwWW8ImplReader::IsRightToLeft()
return bRTL;
}
-void SwWW8ImplReader::Read_RTLJustify( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_RTLJustify( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -4377,7 +4377,7 @@ void SwWW8ImplReader::Read_RTLJustify( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_BoolItem( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BoolItem( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -4406,7 +4406,7 @@ void SwWW8ImplReader::Read_BoolItem( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Emphasis( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_EMPHASIS_MARK );
@@ -4417,7 +4417,7 @@ void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
//there is use it, if there is not fall back to the currently set one.
//Only the cjk language setting seems to matter to word, the western
//one is ignored
- const BYTE *pLang =
+ const sal_uInt8 *pLang =
pPlcxMan ? pPlcxMan->GetChpPLCF()->HasSprm(0x486E) : 0;
if (pLang)
@@ -4467,7 +4467,7 @@ void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_ScaleWidth( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_ScaleWidth( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_SCALEW );
@@ -4481,7 +4481,7 @@ void SwWW8ImplReader::Read_ScaleWidth( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Relief( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Relief( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_RELIEF );
@@ -4508,7 +4508,7 @@ void SwWW8ImplReader::Read_Relief( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_TxtAnim(USHORT /*nId*/, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_TxtAnim(sal_uInt16 /*nId*/, const sal_uInt8* pData, short nLen)
{
if (nLen < 0)
pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_CHRATR_BLINK);
@@ -4536,7 +4536,7 @@ void SwWW8ImplReader::Read_TxtAnim(USHORT /*nId*/, const BYTE* pData, short nLen
SwWW8Shade::SwWW8Shade(bool bVer67, const WW8_SHD& rSHD)
{
- BYTE b = rSHD.GetFore();
+ sal_uInt8 b = rSHD.GetFore();
ASSERT(b < 17, "ww8: colour out of range");
if (b >= 17)
b = 0;
@@ -4557,7 +4557,7 @@ SwWW8Shade::SwWW8Shade(bool bVer67, const WW8_SHD& rSHD)
void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
{
- static const ULONG eMSGrayScale[] =
+ static const sal_uLong eMSGrayScale[] =
{
// Nul-Brush
0, // 0
@@ -4644,7 +4644,7 @@ void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
if( nIndex >= sizeof( eMSGrayScale ) / sizeof ( eMSGrayScale[ 0 ] ) )
nIndex = 0;
- ULONG nWW8BrushStyle = eMSGrayScale[nIndex];
+ sal_uLong nWW8BrushStyle = eMSGrayScale[nIndex];
switch (nWW8BrushStyle)
{
@@ -4670,7 +4670,7 @@ void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
}
}
-void SwWW8ImplReader::Read_Shade( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Shade( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (!bVer67 && pPlcxMan && pPlcxMan->GetPapPLCF()->HasSprm(0xC64D))
return;
@@ -4696,7 +4696,7 @@ void SwWW8ImplReader::Read_Shade( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_ParaBackColor(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if (nLen <= 0)
{
@@ -4718,7 +4718,7 @@ void SwWW8ImplReader::Read_ParaBackColor(USHORT, const BYTE* pData, short nLen)
}
}
-sal_uInt32 SwWW8ImplReader::ExtractColour(const BYTE* &rpData,
+sal_uInt32 SwWW8ImplReader::ExtractColour(const sal_uInt8* &rpData,
bool
#ifdef DBG_UTIL
bVer67
@@ -4743,7 +4743,7 @@ sal_uInt32 SwWW8ImplReader::ExtractColour(const BYTE* &rpData,
return aShade.aColor.GetColor();
}
-void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
+void SwWW8ImplReader::Read_Border(sal_uInt16 , const sal_uInt8* , short nLen)
{
if( nLen < 0 )
{
@@ -4762,7 +4762,7 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
bHasBorder = true;
WW8_BRC5 aBrcs; // Top, Left, Bottom, Right, Between
- BYTE nBorder;
+ sal_uInt8 nBorder;
if( pAktColl )
nBorder = ::lcl_ReadBorders(bVer67, aBrcs, 0, pStyles);
@@ -4798,10 +4798,10 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
maTracer.Log(sw::log::eBorderDistOutside);
- aBox.SetDistance( (USHORT)aInnerDist.Left(), BOX_LINE_LEFT );
- aBox.SetDistance( (USHORT)aInnerDist.Top(), BOX_LINE_TOP );
- aBox.SetDistance( (USHORT)aInnerDist.Right(), BOX_LINE_RIGHT );
- aBox.SetDistance( (USHORT)aInnerDist.Bottom(), BOX_LINE_BOTTOM );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Left(), BOX_LINE_LEFT );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Top(), BOX_LINE_TOP );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Right(), BOX_LINE_RIGHT );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Bottom(), BOX_LINE_BOTTOM );
NewAttr( aBox );
@@ -4813,7 +4813,7 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
}
}
-void SwWW8ImplReader::Read_Hyphenation( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Hyphenation( sal_uInt16, const sal_uInt8* pData, short nLen )
{
// set Hyphenation flag
if( nLen <= 0 )
@@ -4836,7 +4836,7 @@ void SwWW8ImplReader::Read_Hyphenation( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_WidowControl( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
{
@@ -4845,7 +4845,7 @@ void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
}
else
{
- BYTE nL = ( *pData & 1 ) ? 2 : 0;
+ sal_uInt8 nL = ( *pData & 1 ) ? 2 : 0;
NewAttr( SvxWidowsItem( nL, RES_PARATR_WIDOWS ) ); // Aus -> nLines = 0
NewAttr( SvxOrphansItem( nL, RES_PARATR_ORPHANS ) );
@@ -4856,7 +4856,7 @@ void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_UsePgsuSettings(USHORT,const BYTE* pData,short nLen)
+void SwWW8ImplReader::Read_UsePgsuSettings(sal_uInt16,const sal_uInt8* pData,short nLen)
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_SNAPTOGRID);
@@ -4869,7 +4869,7 @@ void SwWW8ImplReader::Read_UsePgsuSettings(USHORT,const BYTE* pData,short nLen)
}
}
-void SwWW8ImplReader::Read_AlignFont( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_AlignFont( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_VERTALIGN);
@@ -4902,7 +4902,7 @@ void SwWW8ImplReader::Read_AlignFont( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_KeepLines( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_KeepLines( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_SPLIT );
@@ -4910,7 +4910,7 @@ void SwWW8ImplReader::Read_KeepLines( USHORT, const BYTE* pData, short nLen )
NewAttr( SvxFmtSplitItem( ( *pData & 1 ) == 0, RES_PARATR_SPLIT ) );
}
-void SwWW8ImplReader::Read_KeepParas( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_KeepParas( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_KEEP );
@@ -4918,7 +4918,7 @@ void SwWW8ImplReader::Read_KeepParas( USHORT, const BYTE* pData, short nLen )
NewAttr( SvxFmtKeepItem( ( *pData & 1 ) != 0 , RES_KEEP) );
}
-void SwWW8ImplReader::Read_BreakBefore( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BreakBefore( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_BREAK );
@@ -4927,7 +4927,7 @@ void SwWW8ImplReader::Read_BreakBefore( USHORT, const BYTE* pData, short nLen )
( *pData & 1 ) ? SVX_BREAK_PAGE_BEFORE : SVX_BREAK_NONE, RES_BREAK ) );
}
-void SwWW8ImplReader::Read_ApoPPC( USHORT, const BYTE* pData, short )
+void SwWW8ImplReader::Read_ApoPPC( sal_uInt16, const sal_uInt8* pData, short )
{
if (pAktColl) // only for Styledef, sonst anders geloest
{
@@ -4943,7 +4943,7 @@ void SwWW8ImplReader::Read_ApoPPC( USHORT, const BYTE* pData, short )
bool SwWW8ImplReader::ParseTabPos(WW8_TablePos *pTabPos, WW8PLCFx_Cp_FKP* pPap)
{
bool bRet = false;
- const BYTE *pRes=0;
+ const sal_uInt8 *pRes=0;
memset(pTabPos, 0, sizeof(WW8_TablePos));
if (0 != (pRes = pPap->HasSprm(0x360D)))
{
@@ -4990,7 +4990,7 @@ long SwWW8ImplReader::ImportExtSprm(WW8PLCFManResult* pRes)
if( pRes->nSprmId < 280 )
{
- BYTE nIdx = static_cast< BYTE >(pRes->nSprmId - eFTN);
+ sal_uInt8 nIdx = static_cast< sal_uInt8 >(pRes->nSprmId - eFTN);
if( nIdx < sizeof( aWwSprmTab ) / sizeof( *aWwSprmTab )
&& aWwSprmTab[nIdx] )
return (this->*aWwSprmTab[nIdx])(pRes);
@@ -5001,7 +5001,7 @@ long SwWW8ImplReader::ImportExtSprm(WW8PLCFManResult* pRes)
return 0;
}
-void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
+void SwWW8ImplReader::EndExtSprm(sal_uInt16 nSprmId)
{
typedef sal_uInt16 (SwWW8ImplReader:: *FNReadRecordExt)();
@@ -5014,7 +5014,7 @@ void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
/* 4 (260) */ 0 // Annotation
};
- BYTE nIdx = static_cast< BYTE >(nSprmId - eFTN);
+ sal_uInt8 nIdx = static_cast< sal_uInt8 >(nSprmId - eFTN);
if( nIdx < sizeof( aWwSprmTab ) / sizeof( *aWwSprmTab )
&& aWwSprmTab[nIdx] )
(this->*aWwSprmTab[nIdx])();
@@ -5025,11 +5025,11 @@ void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
#**************************************************************************/
// Funktion zum Einlesen von Sprms. Par1: SprmId
-typedef void (SwWW8ImplReader:: *FNReadRecord)( USHORT, const BYTE*, short );
+typedef void (SwWW8ImplReader:: *FNReadRecord)( sal_uInt16, const sal_uInt8*, short );
struct SprmReadInfo
{
- USHORT nId;
+ sal_uInt16 nId;
FNReadRecord pReadFnc;
};
@@ -6154,7 +6154,7 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
// Hilfsroutinen : SPRM finden
//-----------------------------------------
-const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(USHORT nId) const
+const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(sal_uInt16 nId) const
{
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
const wwSprmDispatcher *pDispatcher;
@@ -6181,7 +6181,7 @@ const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(USHORT nId) const
//-----------------------------------------
// Hilfsroutinen : SPRMs
//-----------------------------------------
-void SwWW8ImplReader::EndSprm( USHORT nId )
+void SwWW8ImplReader::EndSprm( sal_uInt16 nId )
{
if( ( nId > 255 ) && ( nId < 0x0800 ) ) return;
@@ -6191,7 +6191,7 @@ void SwWW8ImplReader::EndSprm( USHORT nId )
(this->*rSprm.pReadFnc)( nId, 0, -1 );
}
-short SwWW8ImplReader::ImportSprm(const BYTE* pPos,USHORT nId)
+short SwWW8ImplReader::ImportSprm(const sal_uInt8* pPos,sal_uInt16 nId)
{
if (!nId)
nId = mpSprmParser->GetSprmId(pPos);
@@ -6202,8 +6202,8 @@ short SwWW8ImplReader::ImportSprm(const BYTE* pPos,USHORT nId)
const SprmReadInfo& rSprm = GetSprmReadInfo(nId);
- USHORT nFixedLen = mpSprmParser->DistanceToData(nId);
- USHORT nL = mpSprmParser->GetSprmSize(nId, pPos);
+ sal_uInt16 nFixedLen = mpSprmParser->DistanceToData(nId);
+ sal_uInt16 nL = mpSprmParser->GetSprmSize(nId, pPos);
if (rSprm.pReadFnc)
(this->*rSprm.pReadFnc)(nId, pPos + nFixedLen, nL - nFixedLen);
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 171e45260818..da83e8617025 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -845,52 +845,52 @@ SprmInfo wwSprmParser::GetSprmInfo(sal_uInt16 nId) const
//-end
-inline BYTE Get_Byte( BYTE *& p )
+inline sal_uInt8 Get_Byte( sal_uInt8 *& p )
{
- BYTE n = SVBT8ToByte( *(SVBT8*)p );
+ sal_uInt8 n = SVBT8ToByte( *(SVBT8*)p );
p += 1;
return n;
}
-inline USHORT Get_UShort( BYTE *& p )
+inline sal_uInt16 Get_UShort( sal_uInt8 *& p )
{
- USHORT n = SVBT16ToShort( *(SVBT16*)p );
+ sal_uInt16 n = SVBT16ToShort( *(SVBT16*)p );
p += 2;
return n;
}
-inline short Get_Short( BYTE *& p )
+inline short Get_Short( sal_uInt8 *& p )
{
return Get_UShort(p);
}
-inline ULONG Get_ULong( BYTE *& p )
+inline sal_uLong Get_ULong( sal_uInt8 *& p )
{
- ULONG n = SVBT32ToUInt32( *(SVBT32*)p );
+ sal_uLong n = SVBT32ToUInt32( *(SVBT32*)p );
p += 4;
return n;
}
-inline long Get_Long( BYTE *& p )
+inline long Get_Long( sal_uInt8 *& p )
{
return Get_ULong(p);
}
-WW8SprmIter::WW8SprmIter(const BYTE* pSprms_, long nLen_,
+WW8SprmIter::WW8SprmIter(const sal_uInt8* pSprms_, long nLen_,
const wwSprmParser &rParser)
: mrSprmParser(rParser), pSprms( pSprms_), nRemLen( nLen_)
{
UpdateMyMembers();
}
-void WW8SprmIter::SetSprms(const BYTE* pSprms_, long nLen_)
+void WW8SprmIter::SetSprms(const sal_uInt8* pSprms_, long nLen_)
{
pSprms = pSprms_;
nRemLen = nLen_;
UpdateMyMembers();
}
-const BYTE* WW8SprmIter::operator ++( int )
+const sal_uInt8* WW8SprmIter::operator ++( int )
{
if (nRemLen > 0 )
{
@@ -925,7 +925,7 @@ void WW8SprmIter::UpdateMyMembers()
}
}
-const BYTE* WW8SprmIter::FindSprm(USHORT nId)
+const sal_uInt8* WW8SprmIter::FindSprm(sal_uInt16 nId)
{
while(GetSprms())
{
@@ -952,12 +952,12 @@ WW8PLCFx_PCDAttrs::WW8PLCFx_PCDAttrs(ww::WordVersion eVersion,
{
}
-ULONG WW8PLCFx_PCDAttrs::GetIdx() const
+sal_uLong WW8PLCFx_PCDAttrs::GetIdx() const
{
return 0;
}
-void WW8PLCFx_PCDAttrs::SetIdx( ULONG )
+void WW8PLCFx_PCDAttrs::SetIdx( sal_uLong )
{
}
@@ -990,11 +990,11 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
return;
}
- UINT16 nPrm = SVBT16ToShort( ( (WW8_PCD*)pData )->prm );
+ sal_uInt16 nPrm = SVBT16ToShort( ( (WW8_PCD*)pData )->prm );
if ( nPrm & 1 )
{
// PRM Variant 2
- UINT16 nSprmIdx = nPrm >> 1;
+ sal_uInt16 nSprmIdx = nPrm >> 1;
if( nSprmIdx >= nGrpprls )
{
@@ -1004,7 +1004,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
p->nSprmsLen = 0;
return;
}
- const BYTE* pSprms = pGrpprls[ nSprmIdx ];
+ const sal_uInt8* pSprms = pGrpprls[ nSprmIdx ];
p->nSprmsLen = SVBT16ToShort( pSprms ); // Length
pSprms += 2;
@@ -1019,8 +1019,8 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
if (IsSevenMinus(GetFIBVersion()))
{
- aShortSprm[0] = (BYTE)( ( nPrm & 0xfe) >> 1 );
- aShortSprm[1] = (BYTE)( nPrm >> 8 );
+ aShortSprm[0] = (sal_uInt8)( ( nPrm & 0xfe) >> 1 );
+ aShortSprm[1] = (sal_uInt8)( nPrm >> 8 );
p->nSprmsLen = ( nPrm ) ? 2 : 0; // Laenge
// store Postion of internal mini storage in Data Pointer
@@ -1030,7 +1030,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
{
p->pMemPos = 0;
p->nSprmsLen = 0;
- BYTE nSprmListIdx = (BYTE)((nPrm & 0xfe) >> 1);
+ sal_uInt8 nSprmListIdx = (sal_uInt8)((nPrm & 0xfe) >> 1);
if( nSprmListIdx )
{
// process Sprm Id Matching as explained in MS Doku
@@ -1039,7 +1039,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
// see file: s62f39.htm
//
// Since isprm is 7 bits, rgsprmPrm can hold 0x80 entries.
- static const USHORT aSprmId[0x80] =
+ static const sal_uInt16 aSprmId[0x80] =
{
// sprmNoop, sprmNoop, sprmNoop, sprmNoop
0x0000,0x0000,0x0000,0x0000,
@@ -1111,14 +1111,14 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
};
// find real Sprm Id:
- USHORT nSprmId = aSprmId[ nSprmListIdx ];
+ sal_uInt16 nSprmId = aSprmId[ nSprmListIdx ];
if( nSprmId )
{
// move Sprm Id and Sprm Param to internal mini storage:
- aShortSprm[0] = (BYTE)( ( nSprmId & 0x00ff) );
- aShortSprm[1] = (BYTE)( ( nSprmId & 0xff00) >> 8 );
- aShortSprm[2] = (BYTE)( nPrm >> 8 );
+ aShortSprm[0] = (sal_uInt8)( ( nSprmId & 0x00ff) );
+ aShortSprm[1] = (sal_uInt8)( ( nSprmId & 0xff00) >> 8 );
+ aShortSprm[2] = (sal_uInt8)( nPrm >> 8 );
// store Sprm Length in member:
p->nSprmsLen = ( nPrm ) ? 3 : 0;
@@ -1148,17 +1148,17 @@ WW8PLCFx_PCD::~WW8PLCFx_PCD()
delete pPcdI;
}
-ULONG WW8PLCFx_PCD::GetIMax() const
+sal_uLong WW8PLCFx_PCD::GetIMax() const
{
return pPcdI ? pPcdI->GetIMax() : 0;
}
-ULONG WW8PLCFx_PCD::GetIdx() const
+sal_uLong WW8PLCFx_PCD::GetIdx() const
{
return pPcdI ? pPcdI->GetIdx() : 0;
}
-void WW8PLCFx_PCD::SetIdx( ULONG nIdx )
+void WW8PLCFx_PCD::SetIdx( sal_uLong nIdx )
{
if (pPcdI)
pPcdI->SetIdx( nIdx );
@@ -1246,11 +1246,11 @@ WW8_CP WW8PLCFx_PCD::AktPieceStartFc2Cp( WW8_FC nStartPos )
return WW8_CP_MAX;
}
bool bIsUnicode = false;
- INT32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
+ sal_Int32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
if( !bVer67 )
nFcStart = WW8PLCFx_PCD::TransformPieceAddress( nFcStart, bIsUnicode );
- INT32 nUnicodeFactor = bIsUnicode ? 2 : 1;
+ sal_Int32 nUnicodeFactor = bIsUnicode ? 2 : 1;
if( nStartPos < nFcStart )
nStartPos = nFcStart;
@@ -1266,7 +1266,7 @@ WW8_CP WW8PLCFx_PCD::AktPieceStartFc2Cp( WW8_FC nStartPos )
//-----------------------------------------
short WW8_BRC::DetermineBorderProperties(bool bVer67, short *pSpace,
- BYTE *pCol, short *pIdx) const
+ sal_uInt8 *pCol, short *pIdx) const
{
/*
Word does not factor the width of the border into the width/height
@@ -1275,12 +1275,12 @@ short WW8_BRC::DetermineBorderProperties(bool bVer67, short *pSpace,
our calculations
*/
short nMSTotalWidth;
- BYTE nCol;
+ sal_uInt8 nCol;
short nIdx,nSpace;
if( bVer67 )
{
- UINT16 aBrc1 = SVBT16ToShort(aBits1);
- nCol = static_cast< BYTE >((aBrc1 >> 6) & 0x1f); // aBor.ico
+ sal_uInt16 aBrc1 = SVBT16ToShort(aBits1);
+ nCol = static_cast< sal_uInt8 >((aBrc1 >> 6) & 0x1f); // aBor.ico
nSpace = (aBrc1 & 0xF800) >> 11;
nMSTotalWidth = aBrc1 & 0x07;
@@ -1489,7 +1489,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
bool bIsUnicode = false;
if( pPieceIter ) // Complex File ?
{
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
for (pPieceIter->SetIdx(0);
pPieceIter->GetIdx() < pPieceIter->GetIMax();(*pPieceIter)++)
@@ -1501,7 +1501,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
ASSERT( !this, "PLCFpcd-WW8Fc2Cp() ging schief" );
break;
}
- INT32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
+ sal_Int32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
if( 8 <= pWw8Fib->nVersion )
{
nFcStart = WW8PLCFx_PCD::TransformPieceAddress( nFcStart,
@@ -1512,7 +1512,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
if (pWw8Fib->fExtChar)
bIsUnicode=true;
}
- INT32 nLen = (nCpEnd - nCpStart) * (bIsUnicode ? 2 : 1);
+ sal_Int32 nLen = (nCpEnd - nCpStart) * (bIsUnicode ? 2 : 1);
/*
If this cp is inside this piece, or its the last piece and we are
@@ -1624,10 +1624,10 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
return 0;
WW8_FC nClxPos = pWwF->fcClx;
- INT32 nClxLen = pWwF->lcbClx;
- INT32 nLeft = nClxLen;
- INT16 nGrpprl = 0;
- BYTE clxt;
+ sal_Int32 nClxLen = pWwF->lcbClx;
+ sal_Int32 nLeft = nClxLen;
+ sal_Int16 nGrpprl = 0;
+ sal_uInt8 clxt;
pStr->Seek( nClxPos );
while( 1 ) // Zaehle Zahl der Grpprls
@@ -1638,7 +1638,7 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
break; // PLCFfpcd gefunden
if( 1 == clxt ) // clxtGrpprl ?
nGrpprl++;
- UINT16 nLen;
+ sal_uInt16 nLen;
*pStr >> nLen;
nLeft -= 2 + nLen;
if( nLeft < 0 )
@@ -1647,24 +1647,24 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
}
pStr->Seek( nClxPos );
nLeft = nClxLen;
- pPieceGrpprls = new BYTE*[nGrpprl + 1];
- memset( pPieceGrpprls, 0, ( nGrpprl + 1 ) * sizeof(BYTE *) );
+ pPieceGrpprls = new sal_uInt8*[nGrpprl + 1];
+ memset( pPieceGrpprls, 0, ( nGrpprl + 1 ) * sizeof(sal_uInt8 *) );
nPieceGrpprls = nGrpprl;
- INT16 nAktGrpprl = 0; // lies Grpprls ein
+ sal_Int16 nAktGrpprl = 0; // lies Grpprls ein
while( 1 )
{
*pStr >> clxt;
nLeft--;
if( 2 == clxt) // PLCFfpcd ?
break; // PLCFfpcd gefunden
- UINT16 nLen;
+ sal_uInt16 nLen;
*pStr >> nLen;
nLeft -= 2 + nLen;
if( nLeft < 0 )
return 0; // schiefgegangen
if( 1 == clxt ) // clxtGrpprl ?
{
- BYTE* p = new BYTE[nLen+2]; // alloziere
+ sal_uInt8* p = new sal_uInt8[nLen+2]; // alloziere
ShortToSVBT16(nLen, p); // trage Laenge ein
pStr->Read( p+2, nLen ); // lies grpprl
pPieceGrpprls[nAktGrpprl++] = p; // trage in Array ein
@@ -1690,7 +1690,7 @@ void WW8ScannerBase::DeletePieceTable()
{
if( pPieceGrpprls )
{
- for( BYTE** p = pPieceGrpprls; *p; p++ )
+ for( sal_uInt8** p = pPieceGrpprls; *p; p++ )
delete[] (*p);
delete[] pPieceGrpprls;
pPieceGrpprls = 0;
@@ -1807,7 +1807,7 @@ WW8ScannerBase::WW8ScannerBase( SvStream* pSt, SvStream* pTblSt,
// Extended ATRD
if (pWwFib->fcAtrdExtra && pWwFib->lcbAtrdExtra)
{
- pExtendedAtrds = new BYTE[pWwFib->lcbAtrdExtra];
+ pExtendedAtrds = new sal_uInt8[pWwFib->lcbAtrdExtra];
long nOldPos = pTblSt->Tell();
pTblSt->Seek(pWwFib->fcAtrdExtra);
pTblSt->Read(pExtendedAtrds, pWwFib->lcbAtrdExtra);
@@ -1884,14 +1884,14 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
return true; // Bei Fehler nicht abbrechen
if( !rPLCF.Get( nP, pData ) )
return false;
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Beschreibungsteil
@@ -1899,7 +1899,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
return false;
}
- if((((BYTE*)pData)[0] & 0x1f ) == 0x14 )
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x14 )
{
// Field Separator ?
@@ -1908,7 +1908,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
if( !rPLCF.Get( nP, pData ) )
return false;
- while ((((BYTE*)pData)[0] & 0x1f ) == 0x13)
+ while ((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13)
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Resultatteil
@@ -1924,7 +1924,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
{
void* pData;
- ULONG nOldIdx = rPLCF.GetIdx();
+ sal_uLong nOldIdx = rPLCF.GetIdx();
rF.nLen = rF.nId = rF.nOpt = rF.bCodeNest = rF.bResNest = 0;
@@ -1933,10 +1933,10 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
goto Err;
- rF.nId = ((BYTE*)pData)[1];
+ rF.nId = ((sal_uInt8*)pData)[1];
if( !rPLCF.Get( rF.nLCode, pData ) )
goto Err;
@@ -1945,7 +1945,7 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
rF.nSCode++; // ohne Marken
rF.nLCode -= rF.nSCode; // Pos zu Laenge
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Beschreibungsteil
@@ -1954,13 +1954,13 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
goto Err;
}
- if((((BYTE*)pData)[0] & 0x1f ) == 0x14 ){ // Field Separator ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x14 ){ // Field Separator ?
rPLCF++;
if( !rPLCF.Get( rF.nLRes, pData ) )
goto Err;
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Resultatteil
@@ -1979,11 +1979,11 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
}
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) == 0x15 )
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x15 )
{
// Field Ende ?
// INDEX-Fld hat Bit7 gesetzt!?!
- rF.nOpt = ((BYTE*)pData)[1]; // Ja -> Flags uebernehmen
+ rF.nOpt = ((sal_uInt8*)pData)[1]; // Ja -> Flags uebernehmen
}else{
rF.nId = 0; // Nein -> Feld ungueltig
}
@@ -2006,7 +2006,7 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
bool bAtEndSeekRel1)
{
ByteString aByteStr;
- UINT8 b;
+ sal_uInt8 b;
rStrm >> b;
if (b)
@@ -2014,7 +2014,7 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
// Alloc methode automatically sets Zero at the end
sal_Char* pByteData = aByteStr.AllocBuffer( b );
- ULONG nWasRead = rStrm.Read( pByteData, b );
+ sal_uLong nWasRead = rStrm.Read( pByteData, b );
if( nWasRead != b )
aByteStr.ReleaseBufferAccess(static_cast<xub_StrLen>(nWasRead));
}
@@ -2026,9 +2026,9 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
return String( aByteStr, eEnc );
}
-String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
+String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1)
{
- UINT16 b;
+ sal_uInt16 b;
if( nChars )
b = nChars;
@@ -2041,16 +2041,16 @@ String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
// Alloc methode automatically sets Zero at the end
sal_Unicode* pData = aStr.AllocBuffer( b );
- ULONG nWasRead = rStrm.Read( (sal_Char*)pData, b * 2 );
- if( nWasRead != static_cast<ULONG>(b*2) )
+ sal_uLong nWasRead = rStrm.Read( (sal_Char*)pData, b * 2 );
+ if( nWasRead != static_cast<sal_uLong>(b*2) )
{
- b = static_cast<UINT16>(nWasRead / 2);
+ b = static_cast<sal_uInt16>(nWasRead / 2);
aStr.ReleaseBufferAccess( b );
pData = aStr.GetBufferAccess();
}
#ifdef OSL_BIGENDIAN
- ULONG n;
+ sal_uLong n;
sal_Unicode *pWork;
for( n = 0, pWork = pData; n < b; ++n, ++pWork )
*pWork = SWAPSHORT( *pWork );
@@ -2063,9 +2063,9 @@ String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
return aStr;
}
-ULONG SafeReadString(ByteString &rStr,USHORT nLen,SvStream &rStrm)
+sal_uLong SafeReadString(ByteString &rStr,sal_uInt16 nLen,SvStream &rStrm)
{
- ULONG nWasRead=0;
+ sal_uLong nWasRead=0;
if (nLen)
{
nWasRead = rStrm.Read( rStr.AllocBuffer( nLen ), nLen);
@@ -2105,12 +2105,12 @@ xub_StrLen WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr,
nLen = USHRT_MAX - 1;
if( bIsUnicode )
- rStr.Append(WW8Read_xstz(rStrm, (USHORT)nLen, false));
+ rStr.Append(WW8Read_xstz(rStrm, (sal_uInt16)nLen, false));
else
{
// Alloc method automatically sets Zero at the end
ByteString aByteStr;
- SafeReadString(aByteStr,(USHORT)nLen,rStrm);
+ SafeReadString(aByteStr,(sal_uInt16)nLen,rStrm);
rStr += String( aByteStr, eEnc );
}
nTotalRead += nLen;
@@ -2134,7 +2134,7 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
// Pointer auf Pos- u. Struct-Array
- pPLCF_PosArray = new INT32[ ( nPLCF + 3 ) / 4 ];
+ pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ];
long nOldPos = pSt->Tell();
@@ -2146,7 +2146,7 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
nIdx = 0;
#endif // OSL_BIGENDIAN
if( nStruct ) // Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
else
pPLCF_Contents = 0; // kein Inhalt
if( nStartPos >= 0 )
@@ -2249,7 +2249,7 @@ bool WW8PLCFspecial::GetData(long nInIdx, WW8_CP& rPos, void*& rpValue) const
// Ctor fuer *andere* als Fkps
// Bei nStartPos < 0 wird das erste Element des PLCFs genommen
-WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
+WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
WW8_CP nStartPos ) : pPLCF_PosArray(0), nIdx(0), nStru(nStruct)
{
ASSERT( nPLCF, "WW8PLCF: nPLCF ist Null!" );
@@ -2267,8 +2267,8 @@ WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
// != 0, dann wird ein unvollstaendiger PLCF vervollstaendigt. Das ist bei
// WW6 bei Resourcenmangel und bei WordPad (W95) immer noetig. Bei nStartPos
// < 0 wird das erste Element des PLCFs genommen
-WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
- WW8_CP nStartPos, INT32 nPN, INT32 ncpN ) : pPLCF_PosArray(0), nIdx(0),
+WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
+ WW8_CP nStartPos, sal_Int32 nPN, sal_Int32 ncpN ) : pPLCF_PosArray(0), nIdx(0),
nStru(nStruct)
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
@@ -2282,7 +2282,7 @@ WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
SeekPos( nStartPos );
}
-void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF )
+void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF )
{
bool failure = false;
@@ -2308,7 +2308,7 @@ void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF )
nIdx = 0;
#endif // OSL_BIGENDIAN
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
}
pSt->Seek( nOldPos );
@@ -2323,12 +2323,12 @@ void WW8PLCF::MakeFailedPLCF()
{
nIMax = 0;
delete[] pPLCF_PosArray;
- pPLCF_PosArray = new INT32[2];
+ pPLCF_PosArray = new sal_Int32[2];
pPLCF_PosArray[0] = pPLCF_PosArray[1] = WW8_CP_MAX;
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
}
-void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
+void WW8PLCF::GeneratePLCF( SvStream* pSt, sal_Int32 nPN, sal_Int32 ncpN )
{
ASSERT( nIMax < ncpN, "Pcl.Fkp: Warum ist PLCF zu gross ?" );
@@ -2342,9 +2342,9 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
{
size_t nSiz = 6 * nIMax + 4;
size_t nElems = ( nSiz + 3 ) / 4;
- pPLCF_PosArray = new INT32[ nElems ]; // Pointer auf Pos-Array
+ pPLCF_PosArray = new sal_Int32[ nElems ]; // Pointer auf Pos-Array
- for (INT32 i = 0; i < ncpN && !pSt->GetError(); ++i)
+ for (sal_Int32 i = 0; i < ncpN && !pSt->GetError(); ++i)
{
// Baue FC-Eintraege
pSt->Seek( ( nPN + i ) << 9 ); // erster FC-Eintrag jedes Fkp
@@ -2361,7 +2361,7 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
sal_Size nLastFkpPos = ( ( nPN + nIMax - 1 ) << 9 );
pSt->Seek( nLastFkpPos + 511 ); // Anz. Fkp-Eintraege des letzten Fkp
- BYTE nb;
+ sal_uInt8 nb;
*pSt >> nb;
pSt->Seek( nLastFkpPos + nb * 4 ); // letzer FC-Eintrag des letzten Fkp
@@ -2375,10 +2375,10 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
if (!failure)
{
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
- BYTE* p = pPLCF_Contents;
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
+ sal_uInt8* p = pPLCF_Contents;
- for (INT32 i = 0; i < ncpN; ++i) // Baue PNs
+ for (sal_Int32 i = 0; i < ncpN; ++i) // Baue PNs
{
ShortToSVBT16(static_cast<sal_uInt16>(nPN + i), p);
p+=2;
@@ -2406,8 +2406,8 @@ bool WW8PLCF::SeekPos(WW8_CP nPos)
if( (1 > nIdx) || (nP < pPLCF_PosArray[ nIdx-1 ]) )
nIdx = 1;
- INT32 nI = nIdx ? nIdx : 1;
- INT32 nEnd = nIMax;
+ sal_Int32 nI = nIdx ? nIdx : 1;
+ sal_Int32 nEnd = nIMax;
for(int n = (1==nIdx ? 1 : 2); n; --n )
{
@@ -2456,7 +2456,7 @@ WW8PLCFpcd::WW8PLCFpcd( SvStream* pSt, long nFilePos, long nPLCF, long nStruct )
:nStru( nStruct )
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
- pPLCF_PosArray = new INT32[ ( nPLCF + 3 ) / 4 ]; // Pointer auf Pos-Array
+ pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ]; // Pointer auf Pos-Array
long nOldPos = pSt->Tell();
@@ -2468,7 +2468,7 @@ WW8PLCFpcd::WW8PLCFpcd( SvStream* pSt, long nFilePos, long nPLCF, long nStruct )
#endif // OSL_BIGENDIAN
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
pSt->Seek( nOldPos );
}
@@ -2527,7 +2527,7 @@ bool WW8PLCFpcd_Iter::Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const
return true;
}
-INT32 WW8PLCFpcd_Iter::Where() const
+sal_Int32 WW8PLCFpcd_Iter::Where() const
{
if ( nIdx >= rPLCF.nIMax )
return SAL_MAX_INT32;
@@ -2542,12 +2542,12 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::Entry::operator<
return (mnFC < rSecond.mnFC);
}
-bool IsReplaceAllSprm(USHORT nSpId)
+bool IsReplaceAllSprm(sal_uInt16 nSpId)
{
return (0x6645 == nSpId || 0x6646 == nSpId);
}
-bool IsExpandableSprm(USHORT nSpId)
+bool IsExpandableSprm(sal_uInt16 nSpId)
{
return 0x646B == nSpId;
}
@@ -2584,7 +2584,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
if (aEntry.mnLen && eVersion == ww::eWW2)
{
Word2CHPX aChpx = ReadWord2Chpx(*pSt, nFilePos + nOfs + 1, static_cast< sal_uInt8 >(aEntry.mnLen));
- std::vector<BYTE> aSprms = ChpxToSprms(aChpx);
+ std::vector<sal_uInt8> aSprms = ChpxToSprms(aChpx);
aEntry.mnLen = static_cast< sal_uInt16 >(aSprms.size());
if (aEntry.mnLen)
{
@@ -2625,7 +2625,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
aEntry.mpData = maRawData + nOfs + 3 + nDelta;
}
- USHORT nSpId = aEntry.mnLen ? maSprmParser.GetSprmId(aEntry.mpData) : 0;
+ sal_uInt16 nSpId = aEntry.mnLen ? maSprmParser.GetSprmId(aEntry.mpData) : 0;
/*
If we replace then we throw away the old data, if we
@@ -2638,9 +2638,9 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
sal_uInt16 nOrigLen = bExpand ? aEntry.mnLen : 0;
sal_uInt8 *pOrigData = bExpand ? aEntry.mpData : 0;
- UINT32 nCurr = pDataSt->Tell();
+ sal_uInt32 nCurr = pDataSt->Tell();
- UINT32 nPos = SVBT32ToUInt32(aEntry.mpData + 2);
+ sal_uInt32 nPos = SVBT32ToUInt32(aEntry.mpData + 2);
pDataSt->Seek(nPos);
*pDataSt >> aEntry.mnLen;
aEntry.mpData =
@@ -2762,7 +2762,7 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::SeekPos(WW8_FC nFc)
return false;
}
-BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
+sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
const
{
rLen = 0;
@@ -2776,7 +2776,7 @@ BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen
rStart = maEntries[mnIdx].mnFC;
rEnd = maEntries[mnIdx + 1].mnFC;
- BYTE* pSprms = GetLenAndIStdAndSprms( rLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( rLen );
return pSprms;
}
@@ -2790,32 +2790,32 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::SetIdx(sal_uInt8 nI)
return false;
}
-BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(sal_Int32& rLen) const
+sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(sal_Int32& rLen) const
{
rLen = maEntries[mnIdx].mnLen;
return maEntries[mnIdx].mpData;
}
-const BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm( USHORT nId )
+const sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm( sal_uInt16 nId )
{
if (mnIdx >= mnIMax)
return 0;
sal_Int32 nLen;
- BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
WW8SprmIter aIter(pSprms, nLen, maSprmParser);
return aIter.FindSprm(nId);
}
-bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(USHORT nId,
- std::vector<const BYTE *> &rResult)
+bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(sal_uInt16 nId,
+ std::vector<const sal_uInt8 *> &rResult)
{
if (mnIdx >= mnIMax)
return false;
sal_Int32 nLen;
- BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
WW8SprmIter aIter(pSprms, nLen, maSprmParser);
@@ -2848,12 +2848,12 @@ long WW8PLCFx::GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen )
}
// ...Idx2: Default: ignorieren
-ULONG WW8PLCFx::GetIdx2() const
+sal_uLong WW8PLCFx::GetIdx2() const
{
return 0;
}
-void WW8PLCFx::SetIdx2(ULONG )
+void WW8PLCFx::SetIdx2(sal_uLong )
{
}
@@ -2912,7 +2912,7 @@ bool WW8PLCFx_Fc_FKP::NewFkp()
return false; // PLCF fertig abgearbeitet
}
(*pPLCF)++;
- long nPo = SVBT16ToShort( (BYTE *)pPage );
+ long nPo = SVBT16ToShort( (sal_uInt8 *)pPage );
nPo <<= 9; // shift als LONG
long nAktFkpFilePos = pFkp ? pFkp->GetFilePos() : -1;
@@ -2972,15 +2972,15 @@ WW8PLCFx_Fc_FKP::~WW8PLCFx_Fc_FKP()
delete pPCDAttrs;
}
-ULONG WW8PLCFx_Fc_FKP::GetIdx() const
+sal_uLong WW8PLCFx_Fc_FKP::GetIdx() const
{
- ULONG u = pPLCF->GetIdx() << 8;
+ sal_uLong u = pPLCF->GetIdx() << 8;
if (pFkp)
u |= pFkp->GetIdx();
return u;
}
-void WW8PLCFx_Fc_FKP::SetIdx( ULONG nIdx )
+void WW8PLCFx_Fc_FKP::SetIdx( sal_uLong nIdx )
{
if( !( nIdx & 0xffffff00L ) )
{
@@ -3012,7 +3012,7 @@ bool WW8PLCFx_Fc_FKP::SeekPos(WW8_FC nFcPos)
void* pPage;
if( pFkp && pPLCF->Get( nPLCFStart, nPLCFEnd, pPage ) )
{
- long nPo = SVBT16ToShort( (BYTE *)pPage );
+ long nPo = SVBT16ToShort( (sal_uInt8 *)pPage );
nPo <<= 9; // shift als LONG
if (nPo != pFkp->GetFilePos())
pFkp = 0;
@@ -3037,7 +3037,7 @@ WW8_FC WW8PLCFx_Fc_FKP::Where()
return Where(); // am einfachsten rekursiv
}
-BYTE* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
+sal_uInt8* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
{
rLen = 0; // Default
rStart = rEnd = WW8_FC_MAX;
@@ -3048,7 +3048,7 @@ BYTE* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& r
return 0;
}
- BYTE* pPos = pFkp->Get( rStart, rEnd, rLen );
+ sal_uInt8* pPos = pFkp->Get( rStart, rEnd, rLen );
if( rStart == WW8_FC_MAX ) //Not found
return 0;
return pPos;
@@ -3069,7 +3069,7 @@ WW8PLCFx& WW8PLCFx_Fc_FKP::operator ++( int )
return *this;
}
-USHORT WW8PLCFx_Fc_FKP::GetIstd() const
+sal_uInt16 WW8PLCFx_Fc_FKP::GetIstd() const
{
return pFkp ? pFkp->GetIstd() : 0xFFFF;
}
@@ -3091,7 +3091,7 @@ void WW8PLCFx_Fc_FKP::GetPCDSprms( WW8PLCFxDesc& rDesc )
}
}
-const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
+const sal_uInt8* WW8PLCFx_Fc_FKP::HasSprm( sal_uInt16 nId )
{
// const waere schoener, aber dafuer muesste NewFkp() ersetzt werden oder
// wegfallen
@@ -3103,7 +3103,7 @@ const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
return 0;
}
- const BYTE* pRes = pFkp->HasSprm( nId );
+ const sal_uInt8* pRes = pFkp->HasSprm( nId );
if( !pRes )
{
@@ -3121,7 +3121,7 @@ const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
return pRes;
}
-bool WW8PLCFx_Fc_FKP::HasSprm(USHORT nId, std::vector<const BYTE *> &rResult)
+bool WW8PLCFx_Fc_FKP::HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult)
{
// const waere schoener, aber dafuer muesste NewFkp() ersetzt werden oder
// wegfallen
@@ -3193,17 +3193,17 @@ void WW8PLCFx_Cp_FKP::ResetAttrStartEnd()
bLineEnd = false;
}
-ULONG WW8PLCFx_Cp_FKP::GetPCDIMax() const
+sal_uLong WW8PLCFx_Cp_FKP::GetPCDIMax() const
{
return pPcd ? pPcd->GetIMax() : 0;
}
-ULONG WW8PLCFx_Cp_FKP::GetPCDIdx() const
+sal_uLong WW8PLCFx_Cp_FKP::GetPCDIdx() const
{
return pPcd ? pPcd->GetIdx() : 0;
}
-void WW8PLCFx_Cp_FKP::SetPCDIdx( ULONG nIdx )
+void WW8PLCFx_Cp_FKP::SetPCDIdx( sal_uLong nIdx )
{
if( pPcd )
pPcd->SetIdx( nIdx );
@@ -3256,7 +3256,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
*/
if( !pPieceIter )
return;
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
bool bOk = pPieceIter->SeekPos(nOrigCp);
pPieceIter->SetIdx( nOldPos );
if (!bOk)
@@ -3283,7 +3283,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
//We set the piece iterator to the piece that contains the
//character, now we have the correct piece for this character
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
p->nStartPos = nOrigCp;
pPieceIter->SeekPos( p->nStartPos);
@@ -3361,7 +3361,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
break;
}
bIsUnicode = false;
- INT32 nFcStart=SVBT32ToUInt32(((WW8_PCD*)pData)->fc);
+ sal_Int32 nFcStart=SVBT32ToUInt32(((WW8_PCD*)pData)->fc);
if (IsEightPlus(GetFIBVersion()))
{
@@ -3445,7 +3445,7 @@ WW8PLCFx_SEPX::WW8PLCFx_SEPX(SvStream* pSt, SvStream* pTblSt,
GetFIBVersion() <= ww::eWW2 ? 6 : 12, nStartCp)
: 0;
- pSprms = new BYTE[nArrMax]; // maximum length
+ pSprms = new sal_uInt8[nArrMax]; // maximum length
}
WW8PLCFx_SEPX::~WW8PLCFx_SEPX()
@@ -3454,12 +3454,12 @@ WW8PLCFx_SEPX::~WW8PLCFx_SEPX()
delete[] pSprms;
}
-ULONG WW8PLCFx_SEPX::GetIdx() const
+sal_uLong WW8PLCFx_SEPX::GetIdx() const
{
return pPLCF ? pPLCF->GetIdx() : 0;
}
-void WW8PLCFx_SEPX::SetIdx( ULONG nIdx )
+void WW8PLCFx_SEPX::SetIdx( sal_uLong nIdx )
{
if( pPLCF ) pPLCF->SetIdx( nIdx );
}
@@ -3489,7 +3489,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
}
else
{
- sal_uInt32 nPo = SVBT32ToUInt32( (BYTE*)pData+2 );
+ sal_uInt32 nPo = SVBT32ToUInt32( (sal_uInt8*)pData+2 );
if (nPo == 0xFFFFFFFF)
{
p->nStartPos = p->nEndPos = WW8_CP_MAX; // Sepx empty
@@ -3503,7 +3503,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
// read len
if (GetFIBVersion() <= ww::eWW2) // eWW6 ?, docs say yes, but...
{
- BYTE nSiz(0);
+ sal_uInt8 nSiz(0);
*pStrm >> nSiz;
nSprmSiz = nSiz;
}
@@ -3514,7 +3514,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
{ // passt nicht
delete[] pSprms;
nArrMax = nSprmSiz; // Hole mehr Speicher
- pSprms = new BYTE[nArrMax];
+ pSprms = new sal_uInt8[nArrMax];
}
pStrm->Read( pSprms, nSprmSiz ); // read Sprms
@@ -3531,15 +3531,15 @@ WW8PLCFx& WW8PLCFx_SEPX::operator ++( int )
return *this;
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId ) const
{
return HasSprm( nId, pSprms, nSprmSiz);
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, const BYTE* pOtherSprms,
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, const sal_uInt8* pOtherSprms,
long nOtherSprmSiz ) const
{
- const BYTE *pRet = 0;
+ const sal_uInt8 *pRet = 0;
if (pPLCF)
{
WW8SprmIter aIter(pOtherSprms, nOtherSprmSiz, maSprmParser);
@@ -3548,8 +3548,8 @@ const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, const BYTE* pOtherSprms,
return pRet;
}
-bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
- BYTE*& p1, BYTE*& p2, BYTE*& p3, BYTE*& p4) const
+bool WW8PLCFx_SEPX::Find4Sprms(sal_uInt16 nId1,sal_uInt16 nId2,sal_uInt16 nId3,sal_uInt16 nId4,
+ sal_uInt8*& p1, sal_uInt8*& p2, sal_uInt8*& p3, sal_uInt8*& p4) const
{
if( !pPLCF )
return 0;
@@ -3560,12 +3560,12 @@ bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
p3 = 0;
p4 = 0;
- BYTE* pSp = pSprms;
- USHORT i=0;
+ sal_uInt8* pSp = pSprms;
+ sal_uInt16 i=0;
while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
{
// Sprm gefunden?
- USHORT nAktId = maSprmParser.GetSprmId(pSp);
+ sal_uInt16 nAktId = maSprmParser.GetSprmId(pSp);
bool bOk = true;
if( nAktId == nId1 )
p1 = pSp + maSprmParser.DistanceToData(nId1);
@@ -3579,33 +3579,33 @@ bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
bOk = false;
bFound |= bOk;
// erhoehe Zeiger, so dass er auf naechsten Sprm zeigt
- USHORT x = maSprmParser.GetSprmSize(nAktId, pSp);
+ sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSp);
i = i + x;
pSp += x;
}
return bFound;
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, BYTE n2nd ) const
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const
{
if( !pPLCF )
return 0;
- BYTE* pSp = pSprms;
+ sal_uInt8* pSp = pSprms;
- USHORT i=0;
+ sal_uInt16 i=0;
while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
{
// Sprm gefunden?
- USHORT nAktId = maSprmParser.GetSprmId(pSp);
+ sal_uInt16 nAktId = maSprmParser.GetSprmId(pSp);
if (nAktId == nId)
{
- BYTE *pRet = pSp + maSprmParser.DistanceToData(nId);
+ sal_uInt8 *pRet = pSp + maSprmParser.DistanceToData(nId);
if (*pRet == n2nd)
return pRet;
}
// erhoehe Zeiger, so dass er auf naechsten Sprm zeigt
- USHORT x = maSprmParser.GetSprmSize(nAktId, pSp);
+ sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSp);
i = i + x;
pSp += x;
}
@@ -3632,7 +3632,7 @@ WW8PLCFx_SubDoc::~WW8PLCFx_SubDoc()
delete pTxt;
}
-ULONG WW8PLCFx_SubDoc::GetIdx() const
+sal_uLong WW8PLCFx_SubDoc::GetIdx() const
{
// Wahrscheinlich pTxt... nicht noetig
if( pRef )
@@ -3640,7 +3640,7 @@ ULONG WW8PLCFx_SubDoc::GetIdx() const
return 0;
}
-void WW8PLCFx_SubDoc::SetIdx( ULONG nIdx )
+void WW8PLCFx_SubDoc::SetIdx( sal_uLong nIdx )
{
if( pRef )
{
@@ -3670,7 +3670,7 @@ void WW8PLCFx_SubDoc::GetSprms(WW8PLCFxDesc* p)
if (!pRef)
return;
- ULONG nNr = pRef->GetIdx();
+ sal_uLong nNr = pRef->GetIdx();
void *pData;
WW8_CP nFoo;
@@ -3757,12 +3757,12 @@ WW8PLCFx_FLD::~WW8PLCFx_FLD()
delete pPLCF;
}
-ULONG WW8PLCFx_FLD::GetIdx() const
+sal_uLong WW8PLCFx_FLD::GetIdx() const
{
return pPLCF ? pPLCF->GetIdx() : 0;
}
-void WW8PLCFx_FLD::SetIdx( ULONG nIdx )
+void WW8PLCFx_FLD::SetIdx( sal_uLong nIdx )
{
if( pPLCF )
pPLCF->SetIdx( nIdx );
@@ -3784,7 +3784,7 @@ bool WW8PLCFx_FLD::StartPosIsFieldStart()
sal_Int32 nTest;
if (
(!pPLCF || !pPLCF->Get(nTest, pData) ||
- ((((BYTE*)pData)[0] & 0x1f) != 0x13))
+ ((((sal_uInt8*)pData)[0] & 0x1f) != 0x13))
)
return false;
return true;
@@ -3802,7 +3802,7 @@ bool WW8PLCFx_FLD::EndPosIsFieldEnd()
void* pData;
sal_Int32 nTest;
- if ( pPLCF->Get(nTest, pData) && ((((BYTE*)pData)[0] & 0x1f) == 0x15) )
+ if ( pPLCF->Get(nTest, pData) && ((((sal_uInt8*)pData)[0] & 0x1f) == 0x15) )
bRet = true;
pPLCF->SetIdx(n);
@@ -3876,23 +3876,23 @@ bool WW8PLCFx_FLD::GetPara(long nIdx, WW8FieldDesc& rF)
//-----------------------------------------
/* to be optimized like this: */
-void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
- USHORT nExtraLen, rtl_TextEncoding eCS, std::vector<String> &rArray,
+void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen,
+ sal_uInt16 nExtraLen, rtl_TextEncoding eCS, std::vector<String> &rArray,
std::vector<ww::bytes>* pExtraArray, ::std::vector<String>* pValueArray)
{
if(nLen==0) // Handle Empty STTBF
return;
- ULONG nOldPos = rStrm.Tell();
+ sal_uLong nOldPos = rStrm.Tell();
rStrm.Seek( nStart );
- UINT16 nLen2;
+ sal_uInt16 nLen2;
rStrm >> nLen2; // bVer67: total length of structure
// bVer8 : count of strings
if( bVer8 )
{
- UINT16 nStrings;
+ sal_uInt16 nStrings;
bool bUnicode = (0xFFFF == nLen2);
if( bUnicode )
rStrm >> nStrings;
@@ -3901,13 +3901,13 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
rStrm >> nExtraLen;
- for( USHORT i=0; i < nStrings; i++ )
+ for( sal_uInt16 i=0; i < nStrings; i++ )
{
if( bUnicode )
rArray.push_back(WW8Read_xstz(rStrm, 0, false));
else
{
- BYTE nBChar;
+ sal_uInt8 nBChar;
rStrm >> nBChar;
ByteString aTmp;
SafeReadString(aTmp,nBChar,rStrm);
@@ -3935,13 +3935,13 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
// #129053# read the value of the document variables, if requested.
if (pValueArray)
{
- for( USHORT i=0; i < nStrings; i++ )
+ for( sal_uInt16 i=0; i < nStrings; i++ )
{
if( bUnicode )
pValueArray->push_back(WW8Read_xstz(rStrm, 0, false));
else
{
- BYTE nBChar;
+ sal_uInt8 nBChar;
rStrm >> nBChar;
ByteString aTmp;
SafeReadString(aTmp,nBChar,rStrm);
@@ -3952,7 +3952,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
}
else
{
- BYTE nBChar;
+ sal_uInt8 nBChar;
if( nLen2 != nLen )
{
ASSERT( nLen2 == nLen, "Fib length and read length are different" );
@@ -3960,9 +3960,9 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
nLen = USHRT_MAX;
else if (nLen < 2 )
nLen = 2;
- nLen2 = static_cast<UINT16>(nLen);
+ nLen2 = static_cast<sal_uInt16>(nLen);
}
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
for( nLen2 -= 2; nRead < nLen2; )
{
rStrm >> nBChar; ++nRead;
@@ -4037,28 +4037,28 @@ WW8PLCFx_Book::~WW8PLCFx_Book()
delete pBook[0];
}
-ULONG WW8PLCFx_Book::GetIdx() const
+sal_uLong WW8PLCFx_Book::GetIdx() const
{
return nIMax ? pBook[0]->GetIdx() : 0;
}
-void WW8PLCFx_Book::SetIdx( ULONG nI )
+void WW8PLCFx_Book::SetIdx( sal_uLong nI )
{
if( nIMax )
pBook[0]->SetIdx( nI );
}
-ULONG WW8PLCFx_Book::GetIdx2() const
+sal_uLong WW8PLCFx_Book::GetIdx2() const
{
return nIMax ? ( pBook[1]->GetIdx() | ( ( nIsEnd ) ? 0x80000000 : 0 ) ) : 0;
}
-void WW8PLCFx_Book::SetIdx2( ULONG nI )
+void WW8PLCFx_Book::SetIdx2( sal_uLong nI )
{
if( nIMax )
{
pBook[1]->SetIdx( nI & 0x7fffffff );
- nIsEnd = (USHORT)( ( nI >> 31 ) & 1 ); // 0 oder 1
+ nIsEnd = (sal_uInt16)( ( nI >> 31 ) & 1 ); // 0 oder 1
}
}
@@ -4113,8 +4113,8 @@ WW8PLCFx& WW8PLCFx_Book::operator ++( int )
{
(*pBook[nIsEnd])++;
- ULONG l0 = pBook[0]->Where();
- ULONG l1 = pBook[1]->Where();
+ sal_uLong l0 = pBook[0]->Where();
+ sal_uLong l1 = pBook[1]->Where();
if( l0 < l1 )
nIsEnd = 0;
else if( l1 < l0 )
@@ -4139,13 +4139,13 @@ long WW8PLCFx_Book::GetLen() const
ASSERT( !this, "Falscher Aufruf (2) von PLCF_Book::GetLen()" );
return 0;
}
- USHORT nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
+ sal_uInt16 nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
long nNum = pBook[1]->GetPos( nEndIdx );
nNum -= nStartPos;
return nNum;
}
-void WW8PLCFx_Book::SetStatus(USHORT nIndex, eBookStatus eStat )
+void WW8PLCFx_Book::SetStatus(sal_uInt16 nIndex, eBookStatus eStat )
{
ASSERT(nIndex < nIMax, "set status of non existing bookmark!");
pStatus[nIndex] = (eBookStatus)( pStatus[nIndex] | eStat );
@@ -4175,17 +4175,17 @@ long WW8PLCFx_Book::GetHandle() const
}
}
-String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, USHORT &nIndex)
+String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex)
{
bool bFound = false;
- USHORT i = 0;
+ sal_uInt16 i = 0;
if( pBook[0] && pBook[1] )
{
WW8_CP nStartAkt, nEndAkt;
do
{
void* p;
- USHORT nEndIdx;
+ sal_uInt16 nEndIdx;
if( pBook[0]->GetData( i, nStartAkt, p ) && p )
nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
@@ -4219,9 +4219,9 @@ String WW8PLCFx_Book::GetUniqueBookmarkName(String &suggestedName)
if (aRet.CompareTo(s)==0) {
int len=aRet.Len();
int p=len-1;
- while(p>0 && aRet.GetChar(static_cast<USHORT>(p))>='0' && aRet.GetChar(static_cast<USHORT>(p))<='9')
+ while(p>0 && aRet.GetChar(static_cast<sal_uInt16>(p))>='0' && aRet.GetChar(static_cast<sal_uInt16>(p))<='9')
p--;
- aRet=String(aRet, 0, static_cast<USHORT>(p+1));
+ aRet=String(aRet, 0, static_cast<sal_uInt16>(p+1));
aRet += String::CreateFromInt32( nBookmarkId++ );
i=0; // start search from beginning
} else {
@@ -4237,12 +4237,12 @@ bool WW8PLCFx_Book::MapName(String& rName)
return false;
bool bFound = false;
- USHORT i = 0;
+ sal_uInt16 i = 0;
WW8_CP nStartAkt, nEndAkt;
do
{
void* p;
- USHORT nEndIdx;
+ sal_uInt16 nEndIdx;
if( pBook[0]->GetData( i, nStartAkt, p ) && p )
nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
@@ -4373,9 +4373,9 @@ void WW8PLCFMan::GetNewNoSprms( WW8PLCFxDesc& rDesc )
rDesc.nOrigSprmsLen = rDesc.nSprmsLen;
}
-USHORT WW8PLCFMan::GetId(const WW8PLCFxDesc* p) const
+sal_uInt16 WW8PLCFMan::GetId(const WW8PLCFxDesc* p) const
{
- USHORT nId;
+ sal_uInt16 nId;
if (p == pFld)
nId = eFLD;
@@ -4404,7 +4404,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
memset( aD, 0, sizeof( aD ) );
nLineEnd = WW8_CP_MAX;
nManType = nType;
- USHORT i;
+ sal_uInt16 i;
if( MAN_MAINTEXT == nType )
{
@@ -4547,7 +4547,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
if( p->pPLCFx->IsSprm() )
{
// Vorsicht: nEndPos muss bereits
- p->pIdStk = new std::stack<USHORT>;
+ p->pIdStk = new std::stack<sal_uInt16>;
if ((p == pChp) || (p == pPap))
{
WW8_CP nTemp = p->nEndPos+p->nCpOfs;
@@ -4569,20 +4569,20 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
WW8PLCFMan::~WW8PLCFMan()
{
- for( USHORT i=0; i<nPLCF; i++)
+ for( sal_uInt16 i=0; i<nPLCF; i++)
delete aD[i].pIdStk;
}
// 0. welche Attr.-Klasse,
// 1. ob ein Attr.-Start ist,
// 2. CP, wo ist naechste Attr.-Aenderung
-USHORT WW8PLCFMan::WhereIdx(bool* pbStart, long* pPos) const
+sal_uInt16 WW8PLCFMan::WhereIdx(bool* pbStart, long* pPos) const
{
ASSERT(nPLCF,"What the hell");
long nNext = LONG_MAX; // SuchReihenfolge:
- USHORT nNextIdx = nPLCF;// first ending found ( CHP, PAP, ( SEP ) ),
+ sal_uInt16 nNextIdx = nPLCF;// first ending found ( CHP, PAP, ( SEP ) ),
bool bStart = true; // dann Anfaenge finden ( ( SEP ), PAP, CHP )
- USHORT i;
+ sal_uInt16 i;
const WW8PLCFxDesc* pD;
for (i=0; i < nPLCF; i++)
{
@@ -4639,7 +4639,7 @@ void WW8PLCFMan::SeekPos( long nNewCp )
void WW8PLCFMan::SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const
{
- USHORT i, n=0;
+ sal_uInt16 i, n=0;
if( pPcd )
pPcd->Save( rSave.aS[n++] );
if( pPcdA )
@@ -4652,7 +4652,7 @@ void WW8PLCFMan::SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const
void WW8PLCFMan::RestoreAllPLCFx( const WW8PLCFxSaveAll& rSave )
{
- USHORT i, n=0;
+ sal_uInt16 i, n=0;
if( pPcd )
pPcd->Restore( rSave.aS[n++] );
if( pPcdA )
@@ -4752,7 +4752,7 @@ void WW8PLCFMan::GetNoSprmEnd( short nIdx, WW8PLCFManResult* pRes ) const
pRes->nSprmId = 0;
}
-bool WW8PLCFMan::TransferOpenSprms(std::stack<USHORT> &rStack)
+bool WW8PLCFMan::TransferOpenSprms(std::stack<sal_uInt16> &rStack)
{
for (int i = 0; i < nPLCF; ++i)
{
@@ -4775,7 +4775,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
p->bFirstSprm = false;
if( bStart )
{
- USHORT nLastId = GetId(p);
+ sal_uInt16 nLastId = GetId(p);
p->pIdStk->push(nLastId); // merke Id fuer Attribut-Ende
if( p->nSprmsLen )
@@ -4785,7 +4785,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
if( p->pMemPos )
{
// Length of last sprm
- USHORT nSprmL = maSprmParser.GetSprmSize(nLastId, p->pMemPos);
+ sal_uInt16 nSprmL = maSprmParser.GetSprmSize(nLastId, p->pMemPos);
// Gesamtlaenge Sprms um SprmLaenge verringern
p->nSprmsLen -= nSprmL;
@@ -4938,7 +4938,7 @@ void WW8PLCFMan::AdvNoSprm(short nIdx, bool bStart)
WW8PLCFMan& WW8PLCFMan::operator ++(int)
{
bool bStart;
- USHORT nIdx = WhereIdx(&bStart);
+ sal_uInt16 nIdx = WhereIdx(&bStart);
if (nIdx < nPLCF)
{
WW8PLCFxDesc* p = &aD[nIdx];
@@ -4961,7 +4961,7 @@ bool WW8PLCFMan::Get(WW8PLCFManResult* pRes) const
{
memset( pRes, 0, sizeof( WW8PLCFManResult ) );
bool bStart;
- USHORT nIdx = WhereIdx(&bStart);
+ sal_uInt16 nIdx = WhereIdx(&bStart);
if( nIdx >= nPLCF )
{
@@ -4997,7 +4997,7 @@ bool WW8PLCFMan::Get(WW8PLCFManResult* pRes) const
}
}
-USHORT WW8PLCFMan::GetColl() const
+sal_uInt16 WW8PLCFMan::GetColl() const
{
if( pPap->pPLCFx )
return pPap->pPLCFx->GetIstd();
@@ -5013,18 +5013,18 @@ WW8PLCFx_FLD* WW8PLCFMan::GetFld() const
return (WW8PLCFx_FLD*)pFld->pPLCFx;
}
-const BYTE* WW8PLCFMan::HasParaSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFMan::HasParaSprm( sal_uInt16 nId ) const
{
return ((WW8PLCFx_Cp_FKP*)pPap->pPLCFx)->HasSprm( nId );
}
-const BYTE* WW8PLCFMan::HasCharSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFMan::HasCharSprm( sal_uInt16 nId ) const
{
return ((WW8PLCFx_Cp_FKP*)pChp->pPLCFx)->HasSprm( nId );
}
-bool WW8PLCFMan::HasCharSprm(USHORT nId,
- std::vector<const BYTE *> &rResult) const
+bool WW8PLCFMan::HasCharSprm(sal_uInt16 nId,
+ std::vector<const sal_uInt8 *> &rResult) const
{
return ((WW8PLCFx_Cp_FKP*)pChp->pPLCFx)->HasSprm(nId, rResult);
}
@@ -5046,12 +5046,12 @@ void WW8PLCFx::Restore( const WW8PLCFxSave1& rSave )
SetStartFc( rSave.nStartFC );
}
-ULONG WW8PLCFx_Cp_FKP::GetIdx2() const
+sal_uLong WW8PLCFx_Cp_FKP::GetIdx2() const
{
return GetPCDIdx();
}
-void WW8PLCFx_Cp_FKP::SetIdx2( ULONG nIdx )
+void WW8PLCFx_Cp_FKP::SetIdx2( sal_uLong nIdx )
{
SetPCDIdx( nIdx );
}
@@ -5206,13 +5206,13 @@ ww::WordVersion WW8Fib::GetFIBVersion() const
return eVer;
}
-WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
+WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset)
: nFibError( 0 )
{
memset(this, 0, sizeof(*this));
- BYTE aBits1;
- BYTE aBits2;
- BYTE aVer8Bits1; // nur ab WinWord 8 benutzt
+ sal_uInt8 aBits1;
+ sal_uInt8 aBits2;
+ sal_uInt8 aVer8Bits1; // nur ab WinWord 8 benutzt
rSt.Seek( nOffset );
/*
Wunsch-Nr vermerken, File-Versionsnummer ermitteln
@@ -5224,8 +5224,8 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> nProduct;
if( 0 != rSt.GetError() )
{
- INT16 nFibMin;
- INT16 nFibMax;
+ sal_Int16 nFibMin;
+ sal_Int16 nFibMax;
// note: 6 stands for "6 OR 7", 7 stands for "ONLY 7"
switch( nVersion )
{
@@ -5261,10 +5261,10 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
ww::WordVersion eVer = GetFIBVersion();
// Hilfs-Varis fuer Ver67:
- INT16 pnChpFirst_Ver67=0;
- INT16 pnPapFirst_Ver67=0;
- INT16 cpnBteChp_Ver67=0;
- INT16 cpnBtePap_Ver67=0;
+ sal_Int16 pnChpFirst_Ver67=0;
+ sal_Int16 pnPapFirst_Ver67=0;
+ sal_Int16 cpnBteChp_Ver67=0;
+ sal_Int16 cpnBtePap_Ver67=0;
// und auf gehts: FIB einlesen
rSt >> lid;
@@ -5278,12 +5278,12 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> aVer8Bits1; // unter Ver67 nur leeres Reservefeld
// Inhalt von aVer8Bits1
//
- // BYTE fMac :1;
- // BYTE fEmptySpecial :1;
- // BYTE fLoadOverridePage :1;
- // BYTE fFuturesavedUndo :1;
- // BYTE fWord97Saved :1;
- // BYTE :3;
+ // sal_uInt8 fMac :1;
+ // sal_uInt8 fEmptySpecial :1;
+ // sal_uInt8 fLoadOverridePage :1;
+ // sal_uInt8 fFuturesavedUndo :1;
+ // sal_uInt8 fWord97Saved :1;
+ // sal_uInt8 :3;
rSt >> chse;
rSt >> chseTables;
rSt >> fcMin;
@@ -5299,7 +5299,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> wMagicRevised;
rSt >> wMagicCreatedPrivate;
rSt >> wMagicRevisedPrivate;
- rSt.SeekRel( 9 * sizeof( INT16 ) );
+ rSt.SeekRel( 9 * sizeof( sal_Int16 ) );
/*
// dies sind die 9 unused Felder:
@@ -5323,11 +5323,11 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> cbMac;
// 2 Longs uebergehen, da unwichtiger Quatsch
- rSt.SeekRel( 2 * sizeof( INT32) );
+ rSt.SeekRel( 2 * sizeof( sal_Int32) );
// weitere 2 Longs nur bei Ver67 ueberspringen
if (IsSevenMinus(eVer))
- rSt.SeekRel( 2 * sizeof( INT32) );
+ rSt.SeekRel( 2 * sizeof( sal_Int32) );
rSt >> ccpText;
rSt >> ccpFtn;
@@ -5340,7 +5340,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
// weiteres Long nur bei Ver67 ueberspringen
if (IsSevenMinus(eVer))
- rSt.SeekRel( 1 * sizeof( INT32) );
+ rSt.SeekRel( 1 * sizeof( sal_Int32) );
else
{
// Einschub fuer WW8 *****************************************************
@@ -5441,7 +5441,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
// weiteres short nur bei Ver67 ueberspringen
if (IsSevenMinus(eVer))
{
- rSt.SeekRel( 1*sizeof( INT16) );
+ rSt.SeekRel( 1*sizeof( sal_Int16) );
// folgende 4 Shorts existieren nur bei Ver67;
rSt >> pnChpFirst_Ver67;
@@ -5597,7 +5597,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
}
-WW8Fib::WW8Fib(BYTE nVer)
+WW8Fib::WW8Fib(sal_uInt8 nVer)
{
memset(this, 0, sizeof(*this));
nVersion = nVer;
@@ -5665,11 +5665,11 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
bool bVer8 = 8 == nVersion;
size_t nUnencryptedHdr = bVer8 ? 0x44 : 0x24;
- BYTE *pDataPtr = new BYTE[ nUnencryptedHdr ];
- BYTE *pData = pDataPtr;
+ sal_uInt8 *pDataPtr = new sal_uInt8[ nUnencryptedHdr ];
+ sal_uInt8 *pData = pDataPtr;
memset( pData, 0, nUnencryptedHdr );
- ULONG nPos = rStrm.Tell();
+ sal_uLong nPos = rStrm.Tell();
cbMac = rStrm.Seek( STREAM_SEEK_TO_END );
rStrm.Seek( nPos );
@@ -5679,7 +5679,7 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
Set_UInt16( pData, lid );
Set_UInt16( pData, pnNext );
- UINT16 nBits16 = 0;
+ sal_uInt16 nBits16 = 0;
if( fDot ) nBits16 |= 0x0001;
if( fGlsy) nBits16 |= 0x0002;
if( fComplex ) nBits16 |= 0x0004;
@@ -5703,7 +5703,7 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
Set_UInt16( pData, nKey );
Set_UInt8( pData, envr );
- BYTE nBits8 = 0;
+ sal_uInt8 nBits8 = 0;
if( bVer8 )
{
if( fMac ) nBits8 |= 0x0001;
@@ -5731,7 +5731,7 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
Set_UInt16( pData, wMagicRevised );
Set_UInt16( pData, wMagicCreatedPrivate );
Set_UInt16( pData, wMagicRevisedPrivate );
- pData += 9 * sizeof( INT16 );
+ pData += 9 * sizeof( sal_Int16 );
Set_UInt16( pData, lidFE );
Set_UInt16( pData, clw );
}
@@ -5754,20 +5754,20 @@ bool WW8Fib::Write(SvStream& rStrm)
size_t nUnencryptedHdr = bVer8 ? 0x44 : 0x24;
- BYTE *pDataPtr = new BYTE[ fcMin - nUnencryptedHdr ];
- BYTE *pData = pDataPtr;
+ sal_uInt8 *pDataPtr = new sal_uInt8[ fcMin - nUnencryptedHdr ];
+ sal_uInt8 *pData = pDataPtr;
memset( pData, 0, fcMin - nUnencryptedHdr );
- ULONG nPos = rStrm.Tell();
+ sal_uLong nPos = rStrm.Tell();
cbMac = rStrm.Seek( STREAM_SEEK_TO_END );
rStrm.Seek( nPos );
// 2 Longs uebergehen, da unwichtiger Quatsch
- pData += 2 * sizeof( INT32);
+ pData += 2 * sizeof( sal_Int32);
// weitere 2 Longs nur bei Ver67 ueberspringen
if( !bVer8 )
- pData += 2 * sizeof( INT32);
+ pData += 2 * sizeof( sal_Int32);
Set_UInt32( pData, ccpText );
Set_UInt32( pData, ccpFtn );
@@ -5780,7 +5780,7 @@ bool WW8Fib::Write(SvStream& rStrm)
// weiteres Long nur bei Ver67 ueberspringen
if( !bVer8 )
- pData += 1 * sizeof( INT32);
+ pData += 1 * sizeof( sal_Int32);
// Einschub fuer WW8 *****************************************************
if( bVer8 )
@@ -5881,11 +5881,11 @@ bool WW8Fib::Write(SvStream& rStrm)
// weiteres short nur bei Ver67 ueberspringen
if( !bVer8 )
{
- pData += 1*sizeof( INT16);
- Set_UInt16( pData, (UINT16)pnChpFirst );
- Set_UInt16( pData, (UINT16)pnPapFirst );
- Set_UInt16( pData, (UINT16)cpnBteChp );
- Set_UInt16( pData, (UINT16)cpnBtePap );
+ pData += 1*sizeof( sal_Int16);
+ Set_UInt16( pData, (sal_uInt16)pnChpFirst );
+ Set_UInt16( pData, (sal_uInt16)pnPapFirst );
+ Set_UInt16( pData, (sal_uInt16)cpnBteChp );
+ Set_UInt16( pData, (sal_uInt16)cpnBtePap );
}
Set_UInt32( pData, fcPlcfdoaMom ); // nur bei Ver67, in Ver8 unused
@@ -5958,8 +5958,8 @@ bool WW8Fib::Write(SvStream& rStrm)
Set_UInt32( pData, lcbPlcfTch );
pData += 0x3FA - 0x38A;
- Set_UInt16( pData, (UINT16)0x0002);
- Set_UInt16( pData, (UINT16)0x00D9);
+ Set_UInt16( pData, (sal_uInt16)0x0002);
+ Set_UInt16( pData, (sal_uInt16)0x00D9);
pData += 0x41A - 0x3FE;
Set_UInt32( pData, fcAtrdExtra );
@@ -5975,13 +5975,13 @@ bool WW8Fib::Write(SvStream& rStrm)
return 0 == rStrm.GetError();
}
-rtl_TextEncoding WW8Fib::GetFIBCharset(UINT16 chs)
+rtl_TextEncoding WW8Fib::GetFIBCharset(sal_uInt16 chs)
{
ASSERT(chs <= 0x100, "overflowed winword charset set");
rtl_TextEncoding eCharSet =
(0x0100 == chs)
? RTL_TEXTENCODING_APPLE_ROMAN
- : rtl_getTextEncodingFromWindowsCharset( static_cast<BYTE>(chs) );
+ : rtl_getTextEncodingFromWindowsCharset( static_cast<sal_uInt8>(chs) );
return eCharSet;
}
@@ -5995,7 +5995,7 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
rSt.Seek(nStyleStart);
- USHORT cbStshi = 0; // 2 bytes size of the following STSHI structure
+ sal_uInt16 cbStshi = 0; // 2 bytes size of the following STSHI structure
if (rFib.GetFIBVersion() <= ww::eWW2)
{
@@ -6008,10 +6008,10 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
// lies die Laenge der in der Datei gespeicherten Struktur
rSt >> cbStshi;
- UINT16 nRead = cbStshi;
+ sal_uInt16 nRead = cbStshi;
do
{
- UINT16 a16Bit;
+ sal_uInt16 a16Bit;
if( 2 > nRead ) break;
rSt >> cstd;
@@ -6062,10 +6062,10 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
{
WW8_STD* pStd = 0;
- UINT16 cbStd;
+ sal_uInt16 cbStd;
rSt >> cbStd; // lies Laenge
- UINT16 nRead = cbSTDBaseInFile;
+ sal_uInt16 nRead = cbSTDBaseInFile;
if( cbStd >= cbSTDBaseInFile )
{
// Fixed part vollst. vorhanden
@@ -6076,7 +6076,7 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
do
{
- UINT16 a16Bit;
+ sal_uInt16 a16Bit;
if( 2 > nRead ) break;
rSt >> a16Bit;
@@ -6209,7 +6209,7 @@ struct WW8_FFN_Ver8 : public WW8_FFN_BASE
sal_Char fs[ 24 ]; // 0x10 FONTSIGNATURE
// ab Ver8 als Unicode
- UINT16 szFfn[65]; // 0x6 bzw. 0x40 ab Ver8 zero terminated string that
+ sal_uInt16 szFfn[65]; // 0x6 bzw. 0x40 ab Ver8 zero terminated string that
// records name of font.
// Maximal size of szFfn is 65 characters.
// Vorsicht: Dieses Array kann auch kleiner sein!!!
@@ -6265,10 +6265,10 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
rSt.Seek( rFib.fcSttbfffn );
- INT32 nFFn = rFib.lcbSttbfffn - 2;
+ sal_Int32 nFFn = rFib.lcbSttbfffn - 2;
// allocate Font Array
- BYTE* pA = new BYTE[ nFFn ];
+ sal_uInt8* pA = new sal_uInt8[ nFFn ];
memset(pA, 0, nFFn);
WW8_FFN* p = (WW8_FFN*)pA;
@@ -6305,7 +6305,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
if( nLeft < 1 ) // can we read the given ammount of bytes ?
break;
// increase p by nNextSiz Bytes
- p = (WW8_FFN *)( ( (BYTE*)p ) + nNextSiz );
+ p = (WW8_FFN *)( ( (sal_uInt8*)p ) + nNextSiz );
}
}
@@ -6318,7 +6318,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
if( eVersion <= ww::eWW2 )
{
WW8_FFN_BASE* pVer2 = (WW8_FFN_BASE*)pA;
- for(USHORT i=0; i<nMax; ++i, ++p)
+ for(sal_uInt16 i=0; i<nMax; ++i, ++p)
{
p->cbFfnM1 = pVer2->cbFfnM1;
@@ -6326,8 +6326,8 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
p->fTrueType = 0;
p->ff = 0;
- p->wWeight = ( *(((BYTE*)pVer2) + 1) );
- p->chs = ( *(((BYTE*)pVer2) + 2) );
+ p->wWeight = ( *(((sal_uInt8*)pVer2) + 1) );
+ p->chs = ( *(((sal_uInt8*)pVer2) + 2) );
/*
#i8726# 7- seems to encode the name in the same encoding as
the font, e.g load the doc in 97 and save to see the unicode
@@ -6338,17 +6338,17 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
eEnc = RTL_TEXTENCODING_MS_1252;
p->sFontname = String ( (((const sal_Char*)pVer2) + 1 + 2), eEnc);
- pVer2 = (WW8_FFN_BASE*)( ((BYTE*)pVer2) + pVer2->cbFfnM1 + 1 );
+ pVer2 = (WW8_FFN_BASE*)( ((sal_uInt8*)pVer2) + pVer2->cbFfnM1 + 1 );
}
}
else if( eVersion < ww::eWW8 )
{
WW8_FFN_Ver6* pVer6 = (WW8_FFN_Ver6*)pA;
- BYTE c2;
- for(USHORT i=0; i<nMax; ++i, ++p)
+ sal_uInt8 c2;
+ for(sal_uInt16 i=0; i<nMax; ++i, ++p)
{
p->cbFfnM1 = pVer6->cbFfnM1;
- c2 = *(((BYTE*)pVer6) + 1);
+ c2 = *(((sal_uInt8*)pVer6) + 1);
p->prg = c2 & 0x02;
p->fTrueType = (c2 & 0x04) >> 2;
@@ -6383,17 +6383,17 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
p->sFontname.APPEND_CONST_ASC(";Symbol");
}
}
- pVer6 = (WW8_FFN_Ver6*)( ((BYTE*)pVer6) + pVer6->cbFfnM1 + 1 );
+ pVer6 = (WW8_FFN_Ver6*)( ((sal_uInt8*)pVer6) + pVer6->cbFfnM1 + 1 );
}
}
else
{
WW8_FFN_Ver8* pVer8 = (WW8_FFN_Ver8*)pA;
- BYTE c2;
- for(USHORT i=0; i<nMax; ++i, ++p)
+ sal_uInt8 c2;
+ for(sal_uInt16 i=0; i<nMax; ++i, ++p)
{
p->cbFfnM1 = pVer8->cbFfnM1;
- c2 = *(((BYTE*)pVer8) + 1);
+ c2 = *(((sal_uInt8*)pVer8) + 1);
p->prg = c2 & 0x02;
p->fTrueType = (c2 & 0x04) >> 2;
@@ -6406,10 +6406,10 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
#ifdef __WW8_NEEDS_COPY
{
- BYTE nLen = 0x28;
- BYTE nLength = sizeof( pVer8->szFfn ) / sizeof( SVBT16 );
- nLength = std::min( nLength, BYTE( pVer8->cbFfnM1+1 ) );
- for( UINT16* pTmp = pVer8->szFfn;
+ sal_uInt8 nLen = 0x28;
+ sal_uInt8 nLength = sizeof( pVer8->szFfn ) / sizeof( SVBT16 );
+ nLength = std::min( nLength, sal_uInt8( pVer8->cbFfnM1+1 ) );
+ for( sal_uInt16* pTmp = pVer8->szFfn;
nLen < nLength; ++pTmp, nLen+=2 )
{
*pTmp = SVBT16ToShort( *(SVBT16*)pTmp );
@@ -6428,14 +6428,14 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
lcl_checkFontname( p->sFontname );
// Zeiger auf Ursprungsarray einen Font nach hinten setzen
- pVer8 = (WW8_FFN_Ver8*)( ((BYTE*)pVer8) + pVer8->cbFfnM1 + 1 );
+ pVer8 = (WW8_FFN_Ver8*)( ((sal_uInt8*)pVer8) + pVer8->cbFfnM1 + 1 );
}
}
}
delete[] pA;
}
-const WW8_FFN* WW8Fonts::GetFont( USHORT nNum ) const
+const WW8_FFN* WW8Fonts::GetFont( sal_uInt16 nNum ) const
{
if( !pFontA || nNum >= nMax )
return 0;
@@ -6478,7 +6478,7 @@ WW8PLCF_HdFt::WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop )
to point to the beginning of the next section's group of headers and
footers in this PLCF, UpdateIndex does that task.
*/
- for( BYTE nI = 0x1; nI <= 0x20; nI <<= 1 )
+ for( sal_uInt8 nI = 0x1; nI <= 0x20; nI <<= 1 )
if( nI & rDop.grpfIhdt ) // Bit gesetzt ?
nIdxOffset++;
@@ -6486,10 +6486,10 @@ WW8PLCF_HdFt::WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop )
// und der Fussnoten
}
-bool WW8PLCF_HdFt::GetTextPos(BYTE grpfIhdt, BYTE nWhich, WW8_CP& rStart,
+bool WW8PLCF_HdFt::GetTextPos(sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP& rStart,
long& rLen)
{
- BYTE nI = 0x01;
+ sal_uInt8 nI = 0x01;
short nIdx = nIdxOffset;
while (true)
{
@@ -6524,10 +6524,10 @@ bool WW8PLCF_HdFt::GetTextPosExact(short nIdx, WW8_CP& rStart, long& rLen)
return true;
}
-void WW8PLCF_HdFt::UpdateIndex( BYTE grpfIhdt )
+void WW8PLCF_HdFt::UpdateIndex( sal_uInt8 grpfIhdt )
{
// Caution: Description is not correct
- for( BYTE nI = 0x01; nI <= 0x20; nI <<= 1 )
+ for( sal_uInt8 nI = 0x01; nI <= 0x20; nI <<= 1 )
if( nI & grpfIhdt )
nIdxOffset++;
}
@@ -6536,14 +6536,14 @@ void WW8PLCF_HdFt::UpdateIndex( BYTE grpfIhdt )
// WW8Dop
//-----------------------------------------
-WW8Dop::WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize) : bUseThaiLineBreakingRules(false)
+WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize) : bUseThaiLineBreakingRules(false)
{
memset( &nDataStart, 0, (&nDataEnd - &nDataStart) );
fDontUseHTMLAutoSpacing = true; //default
fAcetateShowAtn = true; //default
const sal_uInt32 nMaxDopSize = 0x268;
- BYTE* pDataPtr = new BYTE[ nMaxDopSize ];
- BYTE* pData = pDataPtr;
+ sal_uInt8* pDataPtr = new sal_uInt8[ nMaxDopSize ];
+ sal_uInt8* pData = pDataPtr;
sal_uInt32 nRead = nMaxDopSize < nSize ? nMaxDopSize : nSize;
rSt.Seek( nPos );
@@ -6555,9 +6555,9 @@ WW8Dop::WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize) : bUseTh
memset( pData + nRead, 0, nMaxDopSize - nRead );
// dann mal die Daten auswerten
- UINT32 a32Bit;
- UINT16 a16Bit;
- BYTE a8Bit;
+ sal_uInt32 a32Bit;
+ sal_uInt16 a16Bit;
+ sal_uInt8 a8Bit;
a16Bit = Get_UShort( pData ); // 0 0x00
fFacingPages = 0 != ( a16Bit & 0x0001 ) ;
@@ -6713,7 +6713,7 @@ WW8Dop::WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize) : bUseTh
cDBC = Get_Long( pData ); // 480 0x1e0
cDBCFtnEdn = Get_Long( pData ); // 484 0x1e4
- pData += 1 * sizeof( INT32); // 488 0x1e8
+ pData += 1 * sizeof( sal_Int32); // 488 0x1e8
nfcFtnRef = Get_Short( pData ); // 492 0x1ec
nfcEdnRef = Get_Short( pData ); // 494 0x1ee
@@ -6813,7 +6813,7 @@ WW8Dop::WW8Dop() : bUseThaiLineBreakingRules(false)
fAcetateShowAtn = true;
}
-void WW8Dop::SetCompatabilityOptions(UINT32 a32Bit)
+void WW8Dop::SetCompatabilityOptions(sal_uInt32 a32Bit)
{
fNoTabForInd = ( a32Bit & 0x00000001 ) ;
fNoSpaceRaiseLower = ( a32Bit & 0x00000002 ) >> 1 ;
@@ -6850,9 +6850,9 @@ void WW8Dop::SetCompatabilityOptions(UINT32 a32Bit)
fUsePrinterMetrics = ( a32Bit & 0x80000000 ) >> 31 ;
}
-UINT32 WW8Dop::GetCompatabilityOptions() const
+sal_uInt32 WW8Dop::GetCompatabilityOptions() const
{
- UINT32 a32Bit = 0;
+ sal_uInt32 a32Bit = 0;
if (fNoTabForInd) a32Bit |= 0x00000001;
if (fNoSpaceRaiseLower) a32Bit |= 0x00000002;
if (fSupressSpbfAfterPageBreak) a32Bit |= 0x00000004;
@@ -6889,7 +6889,7 @@ UINT32 WW8Dop::GetCompatabilityOptions() const
}
// i#78591#
-void WW8Dop::SetCompatabilityOptions2(UINT32 a32Bit)
+void WW8Dop::SetCompatabilityOptions2(sal_uInt32 a32Bit)
{
fCompatabilityOptions_Unknown2_1 = ( a32Bit & 0x00000001 );
fCompatabilityOptions_Unknown2_2 = ( a32Bit & 0x00000002 ) >> 1 ;
@@ -6925,9 +6925,9 @@ void WW8Dop::SetCompatabilityOptions2(UINT32 a32Bit)
fCompatabilityOptions_Unknown2_32 = ( a32Bit & 0x80000000 ) >> 31 ;
}
-UINT32 WW8Dop::GetCompatabilityOptions2() const
+sal_uInt32 WW8Dop::GetCompatabilityOptions2() const
{
- UINT32 a32Bit = 0;
+ sal_uInt32 a32Bit = 0;
if (fCompatabilityOptions_Unknown2_1) a32Bit |= 0x00000001;
if (fCompatabilityOptions_Unknown2_2) a32Bit |= 0x00000002;
if (fDontUseHTMLAutoSpacing) a32Bit |= 0x00000004;
@@ -6974,13 +6974,13 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
rFib.fcDop = rStrm.Tell();
rFib.lcbDop = nLen;
- BYTE aData[ nMaxDopLen ];
+ sal_uInt8 aData[ nMaxDopLen ];
memset( aData, 0, nMaxDopLen );
- BYTE* pData = aData;
+ sal_uInt8* pData = aData;
// dann mal die Daten auswerten
- UINT16 a16Bit;
- BYTE a8Bit;
+ sal_uInt16 a16Bit;
+ sal_uInt8 a8Bit;
a16Bit = 0; // 0 0x00
if (fFacingPages)
@@ -7137,7 +7137,7 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
Set_UInt32( pData, cDBC ); // 480 0x1e0
Set_UInt32( pData, cDBCFtnEdn ); // 484 0x1e4
- pData += 1 * sizeof( INT32); // 488 0x1e8
+ pData += 1 * sizeof( sal_Int32); // 488 0x1e8
Set_UInt16( pData, nfcFtnRef ); // 492 0x1ec
Set_UInt16( pData, nfcEdnRef ); // 494 0x1ee
@@ -7169,9 +7169,9 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
return 0 == rStrm.GetError();
}
-void WW8DopTypography::ReadFromMem(BYTE *&pData)
+void WW8DopTypography::ReadFromMem(sal_uInt8 *&pData)
{
- USHORT a16Bit = Get_UShort(pData);
+ sal_uInt16 a16Bit = Get_UShort(pData);
fKerningPunct = (a16Bit & 0x0001);
iJustification = (a16Bit & 0x0006) >> 1;
iLevelOfKinsoku = (a16Bit & 0x0018) >> 3;
@@ -7182,7 +7182,7 @@ void WW8DopTypography::ReadFromMem(BYTE *&pData)
cchFollowingPunct = Get_Short(pData);
cchLeadingPunct = Get_Short(pData);
- INT16 i;
+ sal_Int16 i;
for (i=0; i < nMaxFollowing; ++i)
rgxchFPunct[i] = Get_Short(pData);
for (i=0; i < nMaxLeading; ++i)
@@ -7200,9 +7200,9 @@ void WW8DopTypography::ReadFromMem(BYTE *&pData)
}
-void WW8DopTypography::WriteToMem(BYTE *&pData) const
+void WW8DopTypography::WriteToMem(sal_uInt8 *&pData) const
{
- USHORT a16Bit = fKerningPunct;
+ sal_uInt16 a16Bit = fKerningPunct;
a16Bit |= (iJustification << 1) & 0x0006;
a16Bit |= (iLevelOfKinsoku << 3) & 0x0018;
a16Bit |= (f2on1 << 5) & 0x002;
@@ -7213,16 +7213,16 @@ void WW8DopTypography::WriteToMem(BYTE *&pData) const
Set_UInt16(pData,cchFollowingPunct);
Set_UInt16(pData,cchLeadingPunct);
- INT16 i;
+ sal_Int16 i;
for (i=0; i < nMaxFollowing; ++i)
Set_UInt16(pData,rgxchFPunct[i]);
for (i=0; i < nMaxLeading; ++i)
Set_UInt16(pData,rgxchLPunct[i]);
}
-USHORT WW8DopTypography::GetConvertedLang() const
+sal_uInt16 WW8DopTypography::GetConvertedLang() const
{
- USHORT nLang;
+ sal_uInt16 nLang;
//I have assumed peoples republic/taiwan == simplified/traditional
//This isn't a documented issue, so we might have it all wrong,
@@ -7265,11 +7265,11 @@ USHORT WW8DopTypography::GetConvertedLang() const
//-----------------------------------------
// Sprms
//-----------------------------------------
-USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
+sal_uInt16 wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
const
{
SprmInfo aSprm = GetSprmInfo(nId);
- USHORT nL = 0; // number of Bytes to read
+ sal_uInt16 nL = 0; // number of Bytes to read
//sprmPChgTabs
switch( nId )
@@ -7277,11 +7277,11 @@ USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
case 23:
case 0xC615:
if( pSprm[1 + mnDelta] != 255 )
- nL = static_cast< USHORT >(pSprm[1 + mnDelta] + aSprm.nLen);
+ nL = static_cast< sal_uInt16 >(pSprm[1 + mnDelta] + aSprm.nLen);
else
{
- BYTE nDel = pSprm[2 + mnDelta];
- BYTE nIns = pSprm[3 + mnDelta + 4 * nDel];
+ sal_uInt8 nDel = pSprm[2 + mnDelta];
+ sal_uInt8 nIns = pSprm[3 + mnDelta + 4 * nDel];
nL = 2 + 4 * nDel + 3 * nIns;
}
@@ -7298,12 +7298,12 @@ USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
case L_VAR:
// Variable 1-Byte Length?
// Excl. Token + Var-Lengthbyte
- nL = static_cast< USHORT >(pSprm[1 + mnDelta] + aSprm.nLen);
+ nL = static_cast< sal_uInt16 >(pSprm[1 + mnDelta] + aSprm.nLen);
break;
case L_VAR2:
// Variable 2-Byte Length?
// Excl. Token + Var-Lengthbyte
- nL = static_cast< USHORT >(SVBT16ToShort( &pSprm[1 + mnDelta] ) + aSprm.nLen - 1);
+ nL = static_cast< sal_uInt16 >(SVBT16ToShort( &pSprm[1 + mnDelta] ) + aSprm.nLen - 1);
break;
default:
ASSERT(!this, "Unknown sprm varient");
@@ -7315,11 +7315,11 @@ USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
}
// one or two bytes at the beginning at the sprm id
-USHORT wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
+sal_uInt16 wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
{
ASSERT_RET_ON_FAIL(pSp, "Why GetSprmId with pSp of 0", 0);
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if (ww::IsSevenMinus(meVersion))
{
@@ -7338,17 +7338,17 @@ USHORT wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
}
// with tokens and length byte
-USHORT wwSprmParser::GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const
+sal_uInt16 wwSprmParser::GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const
{
return GetSprmTailLen(nId, pSprm) + 1 + mnDelta + SprmDataOfs(nId);
}
-BYTE wwSprmParser::SprmDataOfs(USHORT nId) const
+sal_uInt8 wwSprmParser::SprmDataOfs(sal_uInt16 nId) const
{
return GetSprmInfo(nId).nVari;
}
-USHORT wwSprmParser::DistanceToData(USHORT nId) const
+sal_uInt16 wwSprmParser::DistanceToData(sal_uInt16 nId) const
{
return 1 + mnDelta + SprmDataOfs(nId);
}
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 33d40bcf4c0d..369f1199a2bd 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -119,7 +119,7 @@ class wwSprmParser
{
private:
ww::WordVersion meVersion;
- BYTE mnDelta;
+ sal_uInt8 mnDelta;
const wwSprmSearcher *mpKnownSprms;
static const wwSprmSearcher* GetWW8SprmSearcher();
static const wwSprmSearcher* GetWW6SprmSearcher();
@@ -127,7 +127,7 @@ private:
SprmInfo GetSprmInfo(sal_uInt16 nId) const;
- BYTE SprmDataOfs(sal_uInt16 nId) const;
+ sal_uInt8 SprmDataOfs(sal_uInt16 nId) const;
enum SprmType {L_FIX=0, L_VAR=1, L_VAR2=2};
public:
@@ -136,15 +136,15 @@ public:
/// Return the SPRM id at the beginning of this byte sequence
sal_uInt16 GetSprmId(const sal_uInt8* pSp) const;
- USHORT GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const;
+ sal_uInt16 GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const;
/// Get known len of a sprms head, the bytes of the sprm id + any bytes
/// reserved to hold a variable length
- USHORT DistanceToData(sal_uInt16 nId) const;
+ sal_uInt16 DistanceToData(sal_uInt16 nId) const;
/// Get len of a sprms data area, ignoring the bytes of the sprm id and
/// ignoring any len bytes. Reports the remaining data after those bytes
- USHORT GetSprmTailLen(sal_uInt16 nId, const sal_uInt8 * pSprm) const;
+ sal_uInt16 GetSprmTailLen(sal_uInt16 nId, const sal_uInt8 * pSprm) const;
/// The minimum acceptable sprm len possible for this type of parser
int MinSprmLen() const { return (IsSevenMinus(meVersion)) ? 2 : 3; }
@@ -168,7 +168,7 @@ String WW8ReadPString( SvStream& rStrm, rtl_TextEncoding eEnc,
exactly ONE byte is skipped If nChars is set then that number of characters
(not bytes) is read, if its not set, the first character read is the length
*/
-String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1);
+String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1);
/**
reads array of strings (see MS documentation: STring TaBle stored in File)
@@ -176,8 +176,8 @@ String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1);
attention: the *extra data* of each string are SKIPPED and ignored
*/
-void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
- USHORT nExtraLen, rtl_TextEncoding eCS, ::std::vector<String> &rArray,
+void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen,
+ sal_uInt16 nExtraLen, rtl_TextEncoding eCS, ::std::vector<String> &rArray,
::std::vector<ww::bytes>* pExtraArray = 0, ::std::vector<String>* pValueArray = 0);
struct WW8FieldDesc
@@ -187,16 +187,16 @@ struct WW8FieldDesc
WW8_CP nLCode; ///< Laenge
WW8_CP nSRes; ///< Anfang Ergebnis
WW8_CP nLRes; ///< Laenge ( == 0, falls kein Ergebnis )
- USHORT nId; ///< WW-Id fuer Felder
- BYTE nOpt; ///< WW-Flags ( z.B.: vom User geaendert )
- BYTE bCodeNest:1; ///< Befehl rekursiv verwendet
- BYTE bResNest:1; ///< Befehl in Resultat eingefuegt
+ sal_uInt16 nId; ///< WW-Id fuer Felder
+ sal_uInt8 nOpt; ///< WW-Flags ( z.B.: vom User geaendert )
+ sal_uInt8 bCodeNest:1; ///< Befehl rekursiv verwendet
+ sal_uInt8 bResNest:1; ///< Befehl in Resultat eingefuegt
};
struct WW8PLCFxSave1
{
- ULONG nPLCFxPos;
- ULONG nPLCFxPos2; ///< fuer PLCF_Cp_Fkp: PieceIter-Pos
+ sal_uLong nPLCFxPos;
+ sal_uLong nPLCFxPos2; ///< fuer PLCF_Cp_Fkp: PieceIter-Pos
long nPLCFxMemOfs;
WW8_CP nStartCp; ///< for cp based iterator like PAP and CHP
long nCpOfs;
@@ -213,8 +213,8 @@ struct WW8PLCFxSave1
class WW8PLCFspecial // Iterator fuer PLCFs
{
private:
- INT32* pPLCF_PosArray; ///< Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; ///< Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32* pPLCF_PosArray; ///< Pointer auf Pos-Array und auf ganze Struktur
+ sal_uInt8* pPLCF_Contents; ///< Pointer auf Inhalts-Array-Teil des Pos-Array
long nIMax; ///< Anzahl der Elemente
long nIdx; ///< Merker, wo wir gerade sind
long nStru;
@@ -228,7 +228,7 @@ public:
bool SeekPos(long nPos); // geht ueber FC- bzw. CP-Wert
// bzw. naechste groesseren Wert
bool SeekPosExact(long nPos);
- INT32 Where() const
+ sal_Int32 Where() const
{ return ( nIdx >= nIMax ) ? SAL_MAX_INT32 : pPLCF_PosArray[nIdx]; }
bool Get(WW8_CP& rStart, void*& rpValue) const;
bool GetData(long nIdx, WW8_CP& rPos, void*& rpValue) const;
@@ -238,7 +238,7 @@ public:
return ( nInIdx >= nIMax ) ? 0
: (const void*)&pPLCF_Contents[nInIdx * nStru];
}
- INT32 GetPos( long nInIdx ) const
+ sal_Int32 GetPos( long nInIdx ) const
{ return ( nInIdx >= nIMax ) ? SAL_MAX_INT32 : pPLCF_PosArray[nInIdx]; }
WW8PLCFspecial& operator ++( int ) { nIdx++; return *this; }
@@ -251,24 +251,24 @@ class WW8SprmIter
private:
const wwSprmParser &mrSprmParser;
// these members will be updated
- const BYTE* pSprms; // remaining part of the SPRMs ( == start of akt. SPRM)
- const BYTE* pAktParams; // start of akt. SPRM's parameters
- USHORT nAktId;
- USHORT nAktSize;
+ const sal_uInt8* pSprms; // remaining part of the SPRMs ( == start of akt. SPRM)
+ const sal_uInt8* pAktParams; // start of akt. SPRM's parameters
+ sal_uInt16 nAktId;
+ sal_uInt16 nAktSize;
long nRemLen; // length of remaining SPRMs (including akt. SPRM)
void UpdateMyMembers();
public:
- explicit WW8SprmIter( const BYTE* pSprms_, long nLen_,
+ explicit WW8SprmIter( const sal_uInt8* pSprms_, long nLen_,
const wwSprmParser &rSprmParser);
- void SetSprms( const BYTE* pSprms_, long nLen_ );
- const BYTE* FindSprm(USHORT nId);
- const BYTE* operator ++( int );
- const BYTE* GetSprms() const
+ void SetSprms( const sal_uInt8* pSprms_, long nLen_ );
+ const sal_uInt8* FindSprm(sal_uInt16 nId);
+ const sal_uInt8* operator ++( int );
+ const sal_uInt8* GetSprms() const
{ return ( pSprms && (0 < nRemLen) ) ? pSprms : 0; }
- const BYTE* GetAktParams() const { return pAktParams; }
- USHORT GetAktId() const { return nAktId; }
+ const sal_uInt8* GetAktParams() const { return pAktParams; }
+ sal_uInt16 GetAktId() const { return nAktId; }
private:
//No copying
WW8SprmIter(const WW8SprmIter&);
@@ -280,40 +280,40 @@ class WW8PLCF // Iterator fuer PLCFs
{
private:
WW8_CP* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
- INT32 nIMax; // Anzahl der Elemente
- INT32 nIdx;
+ sal_uInt8* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32 nIMax; // Anzahl der Elemente
+ sal_Int32 nIdx;
int nStru;
- void ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF );
+ void ReadPLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF );
/*
Falls im Dok ein PLC fehlt und die FKPs solo dastehen,
machen wir uns hiermit einen PLC:
*/
- void GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN );
+ void GeneratePLCF( SvStream* pSt, sal_Int32 nPN, sal_Int32 ncpN );
void MakeFailedPLCF();
public:
- WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
+ WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
WW8_CP nStartPos = -1 );
/*
folgender Ctor generiert ggfs. einen PLC aus nPN und ncpN
*/
- WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
- WW8_CP nStartPos, INT32 nPN, INT32 ncpN );
+ WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
+ WW8_CP nStartPos, sal_Int32 nPN, sal_Int32 ncpN );
~WW8PLCF(){ delete[] pPLCF_PosArray; }
- INT32 GetIdx() const { return nIdx; }
- void SetIdx( INT32 nI ) { nIdx = nI; }
- INT32 GetIMax() const { return nIMax; }
+ sal_Int32 GetIdx() const { return nIdx; }
+ void SetIdx( sal_Int32 nI ) { nIdx = nI; }
+ sal_Int32 GetIMax() const { return nIMax; }
bool SeekPos(WW8_CP nPos);
WW8_CP Where() const;
bool Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const;
WW8PLCF& operator ++( int ) { if( nIdx < nIMax ) nIdx++; return *this; }
- const void* GetData( INT32 nInIdx ) const
+ const void* GetData( sal_Int32 nInIdx ) const
{
return ( nInIdx >= nIMax ) ? 0 :
(const void*)&pPLCF_Contents[nInIdx * nStru];
@@ -324,8 +324,8 @@ public:
class WW8PLCFpcd
{
friend class WW8PLCFpcd_Iter;
- INT32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
+ sal_uInt8* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
long nIMax;
long nStru;
public:
@@ -349,7 +349,7 @@ public:
void SetIdx( long nI ) { nIdx = nI; }
long GetIMax() const { return rPLCF.nIMax; }
bool SeekPos(long nPos);
- INT32 Where() const;
+ sal_Int32 Where() const;
bool Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const;
WW8PLCFpcd_Iter& operator ++( int )
{
@@ -384,16 +384,16 @@ public:
: meVer(eVersion), bIsSprm(bSprm), bDirty(false) {}
virtual ~WW8PLCFx() {}
bool IsSprm() const { return bIsSprm; }
- virtual ULONG GetIdx() const = 0;
- virtual void SetIdx( ULONG nIdx ) = 0;
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
+ virtual sal_uLong GetIdx() const = 0;
+ virtual void SetIdx( sal_uLong nIdx ) = 0;
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos) = 0;
virtual WW8_FC Where() = 0;
virtual void GetSprms( WW8PLCFxDesc* p );
virtual long GetNoSprms( WW8_CP& rStart, WW8_CP&, sal_Int32& rLen );
virtual WW8PLCFx& operator ++( int ) = 0;
- virtual USHORT GetIstd() const { return 0xffff; }
+ virtual sal_uInt16 GetIstd() const { return 0xffff; }
virtual void Save( WW8PLCFxSave1& rSave ) const;
virtual void Restore( const WW8PLCFxSave1& rSave );
ww::WordVersion GetFIBVersion() const { return meVer; }
@@ -408,10 +408,10 @@ class WW8PLCFx_PCDAttrs : public WW8PLCFx
private:
WW8PLCFpcd_Iter* pPcdI;
WW8PLCFx_PCD* pPcd;
- BYTE** const pGrpprls; // Attribute an Piece-Table
+ sal_uInt8** const pGrpprls; // Attribute an Piece-Table
SVBT32 aShortSprm; // mini storage: can contain ONE sprm with
// 1 byte param
- UINT16 nGrpprls; // Attribut Anzahl davon
+ sal_uInt16 nGrpprls; // Attribut Anzahl davon
//No copying
WW8PLCFx_PCDAttrs(const WW8PLCFx_PCDAttrs&);
@@ -419,8 +419,8 @@ private:
public:
WW8PLCFx_PCDAttrs(ww::WordVersion eVersion, WW8PLCFx_PCD* pPLCFx_PCD,
const WW8ScannerBase* pBase );
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual void GetSprms( WW8PLCFxDesc* p );
@@ -443,9 +443,9 @@ public:
WW8PLCFx_PCD(ww::WordVersion eVersion, WW8PLCFpcd* pPLCFpcd,
WW8_CP nStartCp, bool bVer67P);
virtual ~WW8PLCFx_PCD();
- virtual ULONG GetIMax() const;
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
+ virtual sal_uLong GetIMax() const;
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual long GetNoSprms( WW8_CP& rStart, WW8_CP&, sal_Int32& rLen );
@@ -458,7 +458,7 @@ public:
void SetClipStart(WW8_CP nIn) { nClipStart = nIn; }
WW8_CP GetClipStart() { return nClipStart; }
- static INT32 TransformPieceAddress(long nfc, bool& bIsUnicodeAddress)
+ static sal_Int32 TransformPieceAddress(long nfc, bool& bIsUnicodeAddress)
{
bIsUnicodeAddress = 0 == (0x40000000 & nfc);
return bIsUnicodeAddress ? nfc : (nfc & 0x3fffFFFF) / 2;
@@ -524,20 +524,20 @@ public:
mnIdx++;
return *this;
}
- BYTE* Get( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen ) const;
+ sal_uInt8* Get( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen ) const;
sal_uInt16 GetIstd() const { return maEntries[mnIdx].mnIStd; }
/*
liefert einen echten Pointer auf das Sprm vom Typ nId,
falls ein solches im Fkp drin ist.
*/
- BYTE* GetLenAndIStdAndSprms(sal_Int32& rLen) const;
+ sal_uInt8* GetLenAndIStdAndSprms(sal_Int32& rLen) const;
/*
ruft GetLenAndIStdAndSprms() auf...
*/
- const BYTE* HasSprm( USHORT nId );
- bool HasSprm(USHORT nId, std::vector<const BYTE *> &rResult);
+ const sal_uInt8* HasSprm( sal_uInt16 nId );
+ bool HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult);
const wwSprmParser &GetSprmParser() const { return maSprmParser; }
};
@@ -576,16 +576,16 @@ public:
WW8PLCFx_Fc_FKP( SvStream* pSt, SvStream* pTblSt, SvStream* pDataSt,
const WW8Fib& rFib, ePLCFT ePl, WW8_FC nStartFcL );
virtual ~WW8PLCFx_Fc_FKP();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
virtual bool SeekPos(WW8_FC nFcPos);
virtual WW8_FC Where();
- BYTE* GetSprmsAndPos( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen );
+ sal_uInt8* GetSprmsAndPos( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen );
virtual WW8PLCFx& operator ++( int );
- virtual USHORT GetIstd() const;
+ virtual sal_uInt16 GetIstd() const;
void GetPCDSprms( WW8PLCFxDesc& rDesc );
- const BYTE* HasSprm( USHORT nId );
- bool HasSprm(USHORT nId, std::vector<const BYTE *> &rResult);
+ const sal_uInt8* HasSprm( sal_uInt16 nId );
+ bool HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult);
bool HasFkp() const { return (0 != pFkp); }
};
@@ -597,8 +597,8 @@ private:
WW8PLCFx_PCD* pPcd;
WW8PLCFpcd_Iter *pPieceIter;
WW8_CP nAttrStart, nAttrEnd;
- BYTE bLineEnd : 1;
- BYTE bComplex : 1;
+ sal_uInt8 bLineEnd : 1;
+ sal_uInt8 bComplex : 1;
//No copying
WW8PLCFx_Cp_FKP(const WW8PLCFx_Cp_FKP&);
@@ -608,11 +608,11 @@ public:
const WW8ScannerBase& rBase, ePLCFT ePl );
virtual ~WW8PLCFx_Cp_FKP();
void ResetAttrStartEnd();
- ULONG GetPCDIMax() const;
- ULONG GetPCDIdx() const;
- void SetPCDIdx( ULONG nIdx );
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
+ sal_uLong GetPCDIMax() const;
+ sal_uLong GetPCDIdx() const;
+ void SetPCDIdx( sal_uLong nIdx );
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_CP Where();
virtual void GetSprms( WW8PLCFxDesc* p );
@@ -628,9 +628,9 @@ private:
wwSprmParser maSprmParser;
SvStream* pStrm;
WW8PLCF* pPLCF;
- BYTE* pSprms;
- USHORT nArrMax;
- UINT16 nSprmSiz;
+ sal_uInt8* pSprms;
+ sal_uInt16 nArrMax;
+ sal_uInt16 nSprmSiz;
//no copying
WW8PLCFx_SEPX(const WW8PLCFx_SEPX&);
@@ -639,19 +639,19 @@ public:
WW8PLCFx_SEPX( SvStream* pSt, SvStream* pTblxySt, const WW8Fib& rFib,
WW8_CP nStartCp );
virtual ~WW8PLCFx_SEPX();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
long GetIMax() const { return ( pPLCF ) ? pPLCF->GetIMax() : 0; }
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual void GetSprms( WW8PLCFxDesc* p );
virtual WW8PLCFx& operator ++( int );
- const BYTE* HasSprm( USHORT nId ) const;
- const BYTE* HasSprm( USHORT nId, BYTE n2nd ) const;
- const BYTE* HasSprm( USHORT nId, const BYTE* pOtherSprms,
+ const sal_uInt8* HasSprm( sal_uInt16 nId ) const;
+ const sal_uInt8* HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const;
+ const sal_uInt8* HasSprm( sal_uInt16 nId, const sal_uInt8* pOtherSprms,
long nOtherSprmSiz ) const;
- bool Find4Sprms(USHORT nId1, USHORT nId2, USHORT nId3, USHORT nId4,
- BYTE*& p1, BYTE*& p2, BYTE*& p3, BYTE*& p4 ) const;
+ bool Find4Sprms(sal_uInt16 nId1, sal_uInt16 nId2, sal_uInt16 nId3, sal_uInt16 nId4,
+ sal_uInt8*& p1, sal_uInt8*& p2, sal_uInt8*& p3, sal_uInt8*& p4 ) const;
};
/// Iterator fuer Fuss-/Endnoten und Anmerkungen
@@ -668,8 +668,8 @@ public:
WW8PLCFx_SubDoc(SvStream* pSt, ww::WordVersion eVersion, WW8_CP nStartCp,
long nFcRef, long nLenRef, long nFcTxt, long nLenTxt, long nStruc = 0);
virtual ~WW8PLCFx_SubDoc();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
@@ -698,8 +698,8 @@ private:
public:
WW8PLCFx_FLD(SvStream* pSt, const WW8Fib& rMyFib, short nType);
virtual ~WW8PLCFx_FLD();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual void GetSprms(WW8PLCFxDesc* p);
@@ -719,7 +719,7 @@ private:
::std::vector<String> aBookNames; // Name
eBookStatus* pStatus;
long nIMax; // Number of Booknotes
- USHORT nIsEnd;
+ sal_uInt16 nIsEnd;
int nBookmarkId; // counter incremented by GetUniqueBookmarkName.
//No copying
@@ -729,10 +729,10 @@ public:
WW8PLCFx_Book(SvStream* pTblSt,const WW8Fib& rFib);
virtual ~WW8PLCFx_Book();
long GetIMax() const { return nIMax; }
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual long GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen );
@@ -743,9 +743,9 @@ public:
long GetLen() const;
bool GetIsEnd() const { return nIsEnd ? true : false; }
long GetHandle() const;
- void SetStatus( USHORT nIndex, eBookStatus eStat );
+ void SetStatus( sal_uInt16 nIndex, eBookStatus eStat );
bool MapName(String& rName);
- String GetBookmark(long nStart,long nEnd, USHORT &nIndex);
+ String GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex);
eBookStatus GetStatus() const;
String GetUniqueBookmarkName(String &suggestedName);
};
@@ -759,11 +759,11 @@ struct WW8PLCFManResult
long nMemLen; // Laenge dazu
long nCp2OrIdx; // footnote-textpos oder Index in PLCF
WW8_CP nAktCp; // wird nur vom Aufrufer benutzt
- const BYTE* pMemPos;// Mem-Pos fuer Sprms
- USHORT nSprmId; // Sprm-Id ( 0 = ungueltige Id -> ueberspringen! )
+ const sal_uInt8* pMemPos;// Mem-Pos fuer Sprms
+ sal_uInt16 nSprmId; // Sprm-Id ( 0 = ungueltige Id -> ueberspringen! )
// (2..255) oder Pseudo-Sprm-Id (256..260)
// bzw. ab Winword-Ver8 die Sprm-Id (800..)
- BYTE nFlags; // Absatz- oder Section-Anfang
+ sal_uInt8 nFlags; // Absatz- oder Section-Anfang
};
enum ManMaskTypes
@@ -784,8 +784,8 @@ enum ManTypes // enums for PLCFMan-ctor
struct WW8PLCFxDesc
{
WW8PLCFx* pPLCFx;
- ::std::stack<USHORT>* pIdStk; // Speicher fuer Attr-Id fuer Attr-Ende(n)
- const BYTE* pMemPos;// wo liegen die Sprm(s)
+ ::std::stack<sal_uInt16>* pIdStk; // Speicher fuer Attr-Id fuer Attr-Ende(n)
+ const sal_uInt8* pMemPos;// wo liegen die Sprm(s)
long nOrigSprmsLen;
WW8_CP nStartPos;
@@ -830,7 +830,7 @@ private:
WW8_CP nLineEnd; // zeigt *hinter* das <CR>
long nLastWhereIdxCp; // last result of WhereIdx()
- USHORT nPLCF; // so viele PLCFe werden verwaltet
+ sal_uInt16 nPLCF; // so viele PLCFe werden verwaltet
ManTypes nManType;
bool mbDoingDrawTextBox; //Normally we adjust the end of attributes
//so that the end of a paragraph occurs
@@ -841,11 +841,11 @@ private:
WW8PLCFxDesc *pChp, *pPap, *pSep, *pFld, *pFtn, *pEdn, *pBkm, *pPcd,
*pPcdA, *pAnd;
WW8PLCFspecial *pFdoa, *pTxbx, *pTxbxBkd,*pMagicTables, *pSubdocs;
- BYTE* pExtendedAtrds;
+ sal_uInt8* pExtendedAtrds;
const WW8Fib* pWwFib;
- USHORT WhereIdx(bool* pbStart=0, long* pPos=0) const;
+ sal_uInt16 WhereIdx(bool* pbStart=0, long* pPos=0) const;
void AdjustEnds(WW8PLCFxDesc& rDesc);
void GetNewSprms(WW8PLCFxDesc& rDesc);
void GetNewNoSprms(WW8PLCFxDesc& rDesc);
@@ -855,7 +855,7 @@ private:
void GetNoSprmEnd(short nIdx, WW8PLCFManResult* pRes) const;
void AdvSprm(short nIdx, bool bStart);
void AdvNoSprm(short nIdx, bool bStart);
- USHORT GetId(const WW8PLCFxDesc* p ) const;
+ sal_uInt16 GetId(const WW8PLCFxDesc* p ) const;
public:
WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
bool bDoingDrawTextBox = false);
@@ -869,7 +869,7 @@ public:
bool Get(WW8PLCFManResult* pResult) const;
WW8PLCFMan& operator ++( int );
- USHORT GetColl() const; // index of actual Style
+ sal_uInt16 GetColl() const; // index of actual Style
WW8PLCFx_FLD* GetFld() const;
WW8PLCFx_SubDoc* GetEdn() const { return (WW8PLCFx_SubDoc*)pEdn->pPLCFx; }
WW8PLCFx_SubDoc* GetFtn() const { return (WW8PLCFx_SubDoc*)pFtn->pPLCFx; }
@@ -878,11 +878,11 @@ public:
long GetCpOfs() const { return pChp->nCpOfs; } // for Header/Footer...
/* fragt, ob *aktueller Absatz* einen Sprm diesen Typs hat */
- const BYTE* HasParaSprm( USHORT nId ) const;
+ const sal_uInt8* HasParaSprm( sal_uInt16 nId ) const;
/* fragt, ob *aktueller Textrun* einen Sprm diesen Typs hat */
- const BYTE* HasCharSprm( USHORT nId ) const;
- bool HasCharSprm(USHORT nId, std::vector<const BYTE *> &rResult) const;
+ const sal_uInt8* HasCharSprm( sal_uInt16 nId ) const;
+ bool HasCharSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult) const;
WW8PLCFx_Cp_FKP* GetChpPLCF() const
{ return (WW8PLCFx_Cp_FKP*)pChp->pPLCFx; }
@@ -891,7 +891,7 @@ public:
WW8PLCFx_SEPX* GetSepPLCF() const
{ return (WW8PLCFx_SEPX*)pSep->pPLCFx; }
WW8PLCFxDesc* GetPap() const { return pPap; }
- bool TransferOpenSprms(std::stack<USHORT> &rStack);
+ bool TransferOpenSprms(std::stack<sal_uInt16> &rStack);
void SeekPos( long nNewCp );
void SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const;
void RestoreAllPLCFx( const WW8PLCFxSaveAll& rSave );
@@ -900,7 +900,7 @@ public:
WW8PLCFspecial* GetTxbxBkd() const { return pTxbxBkd; }
WW8PLCFspecial* GetMagicTables() const { return pMagicTables; }
WW8PLCFspecial* GetWkbPLCF() const { return pSubdocs; }
- BYTE* GetExtendedAtrds() const { return pExtendedAtrds; }
+ sal_uInt8* GetExtendedAtrds() const { return pExtendedAtrds; }
ManTypes GetManType() const { return nManType; }
bool GetDoingDrawTextBox() const { return mbDoingDrawTextBox; }
};
@@ -948,15 +948,15 @@ private:
WW8PLCFspecial* pHdFtTxbxBkd; // Break-Deskriptoren fuer diese
WW8PLCFspecial* pMagicTables; // Break-Deskriptoren fuer diese
WW8PLCFspecial* pSubdocs; // subdoc references in master document
- BYTE* pExtendedAtrds; // Extended ATRDs
+ sal_uInt8* pExtendedAtrds; // Extended ATRDs
WW8PLCFx_Book* pBook; // Bookmarks
WW8PLCFpcd* pPiecePLCF; // fuer FastSave ( Basis-PLCF ohne Iterator )
WW8PLCFpcd_Iter* pPieceIter; // fuer FastSave ( Iterator dazu )
WW8PLCFx_PCD* pPLCFx_PCD; // dito
WW8PLCFx_PCDAttrs* pPLCFx_PCDAttrs;
- BYTE** pPieceGrpprls; // Attribute an Piece-Table
- UINT16 nPieceGrpprls; // Anzahl davon
+ sal_uInt8** pPieceGrpprls; // Attribute an Piece-Table
+ sal_uInt16 nPieceGrpprls; // Anzahl davon
WW8PLCFpcd* OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF );
void DeletePieceTable();
@@ -997,17 +997,17 @@ public:
7 == "only WinWord 95"
8 == "WinWord 97 or newer"
*/
- BYTE nVersion;
+ sal_uInt8 nVersion;
/*
error status
*/
- ULONG nFibError;
+ sal_uLong nFibError;
/*
vom Ctor aus dem FIB gelesene Daten
(entspricht nur ungefaehr der tatsaechlichen Struktur
des Winword-FIB)
*/
- UINT16 wIdent; // 0x0 int magic number
+ sal_uInt16 wIdent; // 0x0 int magic number
/*
File Information Block (FIB) values:
WinWord 1.0 = 33
@@ -1021,20 +1021,20 @@ public:
Word 2003 = 268
Word 2007 = 274
*/
- UINT16 nFib; // 0x2 FIB version written
- UINT16 nProduct; // 0x4 product version written by
- INT16 lid; // 0x6 language stamp---localized version;
+ sal_uInt16 nFib; // 0x2 FIB version written
+ sal_uInt16 nProduct; // 0x4 product version written by
+ sal_Int16 lid; // 0x6 language stamp---localized version;
WW8_PN pnNext; // 0x8
- UINT16 fDot :1; // 0xa 0001
- UINT16 fGlsy :1;
- UINT16 fComplex :1; // 0004 when 1, file is in complex, fast-saved format.
- UINT16 fHasPic :1; // 0008 file contains 1 or more pictures
- UINT16 cQuickSaves :4; // 00F0 count of times file was quicksaved
- UINT16 fEncrypted :1; //0100 1 if file is encrypted, 0 if not
- UINT16 fWhichTblStm :1; //0200 When 0, this fib refers to the table stream
- UINT16 fReadOnlyRecommended :1;
- UINT16 fWriteReservation :1;
+ sal_uInt16 fDot :1; // 0xa 0001
+ sal_uInt16 fGlsy :1;
+ sal_uInt16 fComplex :1; // 0004 when 1, file is in complex, fast-saved format.
+ sal_uInt16 fHasPic :1; // 0008 file contains 1 or more pictures
+ sal_uInt16 cQuickSaves :4; // 00F0 count of times file was quicksaved
+ sal_uInt16 fEncrypted :1; //0100 1 if file is encrypted, 0 if not
+ sal_uInt16 fWhichTblStm :1; //0200 When 0, this fib refers to the table stream
+ sal_uInt16 fReadOnlyRecommended :1;
+ sal_uInt16 fWriteReservation :1;
// named "0Table", when 1, this fib refers to the
// table stream named "1Table". Normally, a file
// will have only one table stream, but under unusual
@@ -1042,55 +1042,55 @@ public:
// both names. In that case, this flag must be used
// to decide which table stream is valid.
- UINT16 fExtChar :1; // 1000 =1, when using extended character set in file
- UINT16 fFarEast :1; // 4000 =1, probably, when far-East language vaiants of Word is used to create a file #i90932#
+ sal_uInt16 fExtChar :1; // 1000 =1, when using extended character set in file
+ sal_uInt16 fFarEast :1; // 4000 =1, probably, when far-East language vaiants of Word is used to create a file #i90932#
- UINT16 fObfuscated :1; // 8000=1. specifies whether the document is obfuscated using XOR obfuscation. otherwise this bit MUST be ignored.
+ sal_uInt16 fObfuscated :1; // 8000=1. specifies whether the document is obfuscated using XOR obfuscation. otherwise this bit MUST be ignored.
- UINT16 nFibBack; // 0xc
- UINT16 nHash; // 0xe file encrypted hash
- UINT16 nKey; // 0x10 file encrypted key
- UINT8 envr; // 0x12 environment in which file was created
+ sal_uInt16 nFibBack; // 0xc
+ sal_uInt16 nHash; // 0xe file encrypted hash
+ sal_uInt16 nKey; // 0x10 file encrypted key
+ sal_uInt8 envr; // 0x12 environment in which file was created
// 0 created by Win Word / 1 created by Mac Word
- BYTE fMac :1; // 0x13 when 1, this file was last saved in the Mac environment
- BYTE fEmptySpecial :1;
- BYTE fLoadOverridePage :1;
- BYTE fFuturesavedUndo :1;
- BYTE fWord97Saved :1;
- BYTE fWord2000Saved :1;
- BYTE :2;
-
- UINT16 chse; // 0x14 default extended character set id for text in document stream. (overidden by chp.chse)
+ sal_uInt8 fMac :1; // 0x13 when 1, this file was last saved in the Mac environment
+ sal_uInt8 fEmptySpecial :1;
+ sal_uInt8 fLoadOverridePage :1;
+ sal_uInt8 fFuturesavedUndo :1;
+ sal_uInt8 fWord97Saved :1;
+ sal_uInt8 fWord2000Saved :1;
+ sal_uInt8 :2;
+
+ sal_uInt16 chse; // 0x14 default extended character set id for text in document stream. (overidden by chp.chse)
// 0 = ANSI / 256 Macintosh character set.
- UINT16 chseTables; // 0x16 default extended character set id for text in
+ sal_uInt16 chseTables; // 0x16 default extended character set id for text in
// internal data structures: 0 = ANSI, 256 = Macintosh
WW8_FC fcMin; // 0x18 file offset of first character of text
WW8_FC fcMac; // 0x1c file offset of last character of text + 1
// Einschub fuer WW8 *****************************************************
- UINT16 csw; // Count of fields in the array of "shorts"
+ sal_uInt16 csw; // Count of fields in the array of "shorts"
// Marke: "rgsw" Beginning of the array of shorts
- UINT16 wMagicCreated; // unique number Identifying the File's creator
+ sal_uInt16 wMagicCreated; // unique number Identifying the File's creator
// 0x6A62 is the creator ID for Word and is reserved.
// Other creators should choose a different value.
- UINT16 wMagicRevised; // identifies the File's last modifier
- UINT16 wMagicCreatedPrivate; // private data
- UINT16 wMagicRevisedPrivate; // private data
+ sal_uInt16 wMagicRevised; // identifies the File's last modifier
+ sal_uInt16 wMagicCreatedPrivate; // private data
+ sal_uInt16 wMagicRevisedPrivate; // private data
/*
- INT16 pnFbpChpFirst_W6; // not used
- INT16 pnChpFirst_W6; // not used
- INT16 cpnBteChp_W6; // not used
- INT16 pnFbpPapFirst_W6; // not used
- INT16 pnPapFirst_W6; // not used
- INT16 cpnBtePap_W6; // not used
- INT16 pnFbpLvcFirst_W6; // not used
- INT16 pnLvcFirst_W6; // not used
- INT16 cpnBteLvc_W6; // not used
+ sal_Int16 pnFbpChpFirst_W6; // not used
+ sal_Int16 pnChpFirst_W6; // not used
+ sal_Int16 cpnBteChp_W6; // not used
+ sal_Int16 pnFbpPapFirst_W6; // not used
+ sal_Int16 pnPapFirst_W6; // not used
+ sal_Int16 cpnBtePap_W6; // not used
+ sal_Int16 pnFbpLvcFirst_W6; // not used
+ sal_Int16 pnLvcFirst_W6; // not used
+ sal_Int16 cpnBteLvc_W6; // not used
*/
- INT16 lidFE; // Language id if document was written by Far East version
+ sal_Int16 lidFE; // Language id if document was written by Far East version
// of Word (i.e. FIB.fFarEast is on)
- UINT16 clw; // Number of fields in the array of longs
+ sal_uInt16 clw; // Number of fields in the array of longs
// Ende des Einschubs fuer WW8 *******************************************
@@ -1108,7 +1108,7 @@ public:
WW8_CP ccpHdrTxbx; // 0x50 length of header textbox subdocument text stream
// Einschub fuer WW8 *****************************************************
- INT32 pnFbpChpFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpChpFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written
// to the file in a linked list of 512-byte pieces
// starting with this pn.
@@ -1116,13 +1116,13 @@ public:
// folgende Felder existieren zwar so in der Datei,
// wir benutzen jedoch unten deklarierte General-Variablen
// fuer Ver67 und Ver8 gemeinsam.
- INT32 pnChpFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnChpFirst; // the page number of the lowest numbered page in the
// document that records CHPX FKP information
- INT32 cpnBteChp; // count of CHPX FKPs recorded in file. In non-complex
+ sal_Int32 cpnBteChp; // count of CHPX FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbteChpx
// is less than this, the PLCFbteChpx is incomplete.
*/
- INT32 pnFbpPapFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpPapFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written to
// the file in a linked list of 512-byte pieces
// starting with this pn
@@ -1130,24 +1130,24 @@ public:
// folgende Felder existieren zwar so in der Datei,
// wir benutzen jedoch unten deklarierte General-Variablen
// fuer Ver67 und Ver8 gemeinsam.
- INT32 pnPapFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnPapFirst; // the page number of the lowest numbered page in the
// document that records PAPX FKP information
- INT32 cpnBtePap; // count of PAPX FKPs recorded in file. In non-complex
+ sal_Int32 cpnBtePap; // count of PAPX FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbtePapx is
// less than this, the PLCFbtePapx is incomplete.
*/
- INT32 pnFbpLvcFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpLvcFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written to
// the file in a linked list of 512-byte pieces
// starting with this pn
- INT32 pnLvcFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnLvcFirst; // the page number of the lowest numbered page in the
// document that records LVC FKP information
- INT32 cpnBteLvc; // count of LVC FKPs recorded in file. In non-complex
+ sal_Int32 cpnBteLvc; // count of LVC FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbtePapx is
// less than this, the PLCFbtePapx is incomplete.
- INT32 fcIslandFirst; // ?
- INT32 fcIslandLim; // ?
- UINT16 cfclcb; // Number of fields in the array of FC/LCB pairs.
+ sal_Int32 fcIslandFirst; // ?
+ sal_Int32 fcIslandLim; // ?
+ sal_uInt16 cfclcb; // Number of fields in the array of FC/LCB pairs.
// Ende des Einschubs fuer WW8 *******************************************
@@ -1155,105 +1155,105 @@ public:
WW8_FC fcStshfOrig; // file offset of original allocation for STSH in table
// stream. During fast save Word will attempt to reuse
// this allocation if STSH is small enough to fit.
- INT32 lcbStshfOrig; // 0x5c count of bytes of original STSH allocation
+ sal_Int32 lcbStshfOrig; // 0x5c count of bytes of original STSH allocation
WW8_FC fcStshf; // 0x60 file offset of STSH in file.
- INT32 lcbStshf; // 0x64 count of bytes of current STSH allocation
+ sal_Int32 lcbStshf; // 0x64 count of bytes of current STSH allocation
WW8_FC fcPlcffndRef; // 0x68 file offset of footnote reference PLCF.
- INT32 lcbPlcffndRef; // 0x6c count of bytes of footnote reference PLCF
+ sal_Int32 lcbPlcffndRef; // 0x6c count of bytes of footnote reference PLCF
// == 0 if no footnotes defined in document.
WW8_FC fcPlcffndTxt; // 0x70 file offset of footnote text PLCF.
- INT32 lcbPlcffndTxt; // 0x74 count of bytes of footnote text PLCF.
+ sal_Int32 lcbPlcffndTxt; // 0x74 count of bytes of footnote text PLCF.
// == 0 if no footnotes defined in document
WW8_FC fcPlcfandRef; // 0x78 file offset of annotation reference PLCF.
- INT32 lcbPlcfandRef; // 0x7c count of bytes of annotation reference PLCF.
+ sal_Int32 lcbPlcfandRef; // 0x7c count of bytes of annotation reference PLCF.
WW8_FC fcPlcfandTxt; // 0x80 file offset of annotation text PLCF.
- INT32 lcbPlcfandTxt; // 0x84 count of bytes of the annotation text PLCF
+ sal_Int32 lcbPlcfandTxt; // 0x84 count of bytes of the annotation text PLCF
WW8_FC fcPlcfsed; // 8x88 file offset of section descriptor PLCF.
- INT32 lcbPlcfsed; // 0x8c count of bytes of section descriptor PLCF.
+ sal_Int32 lcbPlcfsed; // 0x8c count of bytes of section descriptor PLCF.
WW8_FC fcPlcfpad; // 0x90 file offset of paragraph descriptor PLCF
- INT32 lcbPlcfpad; // 0x94 count of bytes of paragraph descriptor PLCF.
+ sal_Int32 lcbPlcfpad; // 0x94 count of bytes of paragraph descriptor PLCF.
// ==0 if file was never viewed in Outline view.
// Should not be written by third party creators
WW8_FC fcPlcfphe; // 0x98 file offset of PLCF of paragraph heights.
- INT32 lcbPlcfphe; // 0x9c count of bytes of paragraph height PLCF.
+ sal_Int32 lcbPlcfphe; // 0x9c count of bytes of paragraph height PLCF.
// ==0 when file is non-complex.
WW8_FC fcSttbfglsy; // 0xa0 file offset of glossary string table.
- INT32 lcbSttbfglsy; // 0xa4 count of bytes of glossary string table.
+ sal_Int32 lcbSttbfglsy; // 0xa4 count of bytes of glossary string table.
// == 0 for non-glossary documents.
// !=0 for glossary documents.
WW8_FC fcPlcfglsy; // 0xa8 file offset of glossary PLCF.
- INT32 lcbPlcfglsy; // 0xac count of bytes of glossary PLCF.
+ sal_Int32 lcbPlcfglsy; // 0xac count of bytes of glossary PLCF.
// == 0 for non-glossary documents.
// !=0 for glossary documents.
WW8_FC fcPlcfhdd; // 0xb0 byte offset of header PLCF.
- INT32 lcbPlcfhdd; // 0xb4 count of bytes of header PLCF.
+ sal_Int32 lcbPlcfhdd; // 0xb4 count of bytes of header PLCF.
// == 0 if document contains no headers
WW8_FC fcPlcfbteChpx; // 0xb8 file offset of character property bin table.PLCF.
- INT32 lcbPlcfbteChpx;// 0xbc count of bytes of character property bin table PLCF.
+ sal_Int32 lcbPlcfbteChpx;// 0xbc count of bytes of character property bin table PLCF.
WW8_FC fcPlcfbtePapx; // 0xc0 file offset of paragraph property bin table.PLCF.
- INT32 lcbPlcfbtePapx;// 0xc4 count of bytes of paragraph property bin table PLCF.
+ sal_Int32 lcbPlcfbtePapx;// 0xc4 count of bytes of paragraph property bin table PLCF.
WW8_FC fcPlcfsea; // 0xc8 file offset of PLCF reserved for private use. The SEA is 6 bytes long.
- INT32 lcbPlcfsea; // 0xcc count of bytes of private use PLCF.
+ sal_Int32 lcbPlcfsea; // 0xcc count of bytes of private use PLCF.
WW8_FC fcSttbfffn; // 0xd0 file offset of font information STTBF. See the FFN file structure definition.
- INT32 lcbSttbfffn; // 0xd4 count of bytes in sttbfffn.
+ sal_Int32 lcbSttbfffn; // 0xd4 count of bytes in sttbfffn.
WW8_FC fcPlcffldMom; // 0xd8 offset in doc stream to the PLCF of field positions in the main document.
- INT32 lcbPlcffldMom; // 0xdc
+ sal_Int32 lcbPlcffldMom; // 0xdc
WW8_FC fcPlcffldHdr; // 0xe0 offset in doc stream to the PLCF of field positions in the header subdocument.
- INT32 lcbPlcffldHdr; // 0xe4
+ sal_Int32 lcbPlcffldHdr; // 0xe4
WW8_FC fcPlcffldFtn; // 0xe8 offset in doc stream to the PLCF of field positions in the footnote subdocument.
- INT32 lcbPlcffldFtn; // 0xec
+ sal_Int32 lcbPlcffldFtn; // 0xec
WW8_FC fcPlcffldAtn; // 0xf0 offset in doc stream to the PLCF of field positions in the annotation subdocument.
- INT32 lcbPlcffldAtn; // 0xf4
+ sal_Int32 lcbPlcffldAtn; // 0xf4
WW8_FC fcPlcffldMcr; // 0xf8 offset in doc stream to the PLCF of field positions in the macro subdocument.
- INT32 lcbPlcffldMcr; // 9xfc
+ sal_Int32 lcbPlcffldMcr; // 9xfc
WW8_FC fcSttbfbkmk; // 0x100 offset in document stream of the STTBF that records bookmark names in the main document
- INT32 lcbSttbfbkmk; // 0x104
+ sal_Int32 lcbSttbfbkmk; // 0x104
WW8_FC fcPlcfbkf; // 0x108 offset in document stream of the PLCF that records the beginning CP offsets of bookmarks in the main document. See BKF
- INT32 lcbPlcfbkf; // 0x10c
+ sal_Int32 lcbPlcfbkf; // 0x10c
WW8_FC fcPlcfbkl; // 0x110 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.
- INT32 lcbPlcfbkl; // 0x114 INT32
+ sal_Int32 lcbPlcfbkl; // 0x114 sal_Int32
WW8_FC fcCmds; // 0x118 FC
- INT32 lcbCmds; // 0x11c
+ sal_Int32 lcbCmds; // 0x11c
WW8_FC fcPlcfmcr; // 0x120 FC
- INT32 lcbPlcfmcr; // 0x124
+ sal_Int32 lcbPlcfmcr; // 0x124
WW8_FC fcSttbfmcr; // 0x128 FC
- INT32 lcbSttbfmcr; // 0x12c
+ sal_Int32 lcbSttbfmcr; // 0x12c
WW8_FC fcPrDrvr; // 0x130 file offset of the printer driver information (names of drivers, port etc...)
- INT32 lcbPrDrvr; // 0x134 count of bytes of the printer driver information (names of drivers, port etc...)
+ sal_Int32 lcbPrDrvr; // 0x134 count of bytes of the printer driver information (names of drivers, port etc...)
WW8_FC fcPrEnvPort; // 0x138 file offset of the print environment in portrait mode.
- INT32 lcbPrEnvPort; // 0x13c count of bytes of the print environment in portrait mode.
+ sal_Int32 lcbPrEnvPort; // 0x13c count of bytes of the print environment in portrait mode.
WW8_FC fcPrEnvLand; // 0x140 file offset of the print environment in landscape mode.
- INT32 lcbPrEnvLand; // 0x144 count of bytes of the print environment in landscape mode.
+ sal_Int32 lcbPrEnvLand; // 0x144 count of bytes of the print environment in landscape mode.
WW8_FC fcWss; // 0x148 file offset of Window Save State data structure. See WSS.
- INT32 lcbWss; // 0x14c count of bytes of WSS. ==0 if unable to store the window state.
+ sal_Int32 lcbWss; // 0x14c count of bytes of WSS. ==0 if unable to store the window state.
WW8_FC fcDop; // 0x150 file offset of document property data structure.
sal_uInt32 lcbDop; // 0x154 count of bytes of document properties.
@@ -1261,27 +1261,27 @@ public:
WW8_FC fcSttbfAssoc; // 0x158 offset to STTBF of associated strings. See STTBFASSOC.
- INT32 lcbSttbfAssoc; // 0x15C
+ sal_Int32 lcbSttbfAssoc; // 0x15C
WW8_FC fcClx; // 0x160 file offset of beginning of information for complex files.
- INT32 lcbClx; // 0x164 count of bytes of complex file information. 0 if file is non-complex.
+ sal_Int32 lcbClx; // 0x164 count of bytes of complex file information. 0 if file is non-complex.
WW8_FC fcPlcfpgdFtn; // 0x168 file offset of page descriptor PLCF for footnote subdocument.
- INT32 lcbPlcfpgdFtn; // 0x16C count of bytes of page descriptor PLCF for footnote subdocument.
+ sal_Int32 lcbPlcfpgdFtn; // 0x16C count of bytes of page descriptor PLCF for footnote subdocument.
// ==0 if document has not been paginated. The length of the PGD is 8 bytes.
WW8_FC fcAutosaveSource; // 0x170 file offset of the name of the original file.
- INT32 lcbAutosaveSource; // 0x174 count of bytes of the name of the original file.
+ sal_Int32 lcbAutosaveSource; // 0x174 count of bytes of the name of the original file.
WW8_FC fcGrpStAtnOwners; // 0x178 group of strings recording the names of the owners of annotations
- INT32 lcbGrpStAtnOwners; // 0x17C count of bytes of the group of strings
+ sal_Int32 lcbGrpStAtnOwners; // 0x17C count of bytes of the group of strings
WW8_FC fcSttbfAtnbkmk; // 0x180 file offset of the sttbf that records names of bookmarks in the annotation subdocument
- INT32 lcbSttbfAtnbkmk; // 0x184 length in bytes of the sttbf that records names of bookmarks in the annotation subdocument
+ sal_Int32 lcbSttbfAtnbkmk; // 0x184 length in bytes of the sttbf that records names of bookmarks in the annotation subdocument
// Einschubs fuer WW67 ***************************************************
- // INT16 wSpare4Fib; // Reserve, muss hier nicht deklariert werden
+ // sal_Int16 wSpare4Fib; // Reserve, muss hier nicht deklariert werden
/*
// folgende Felder existieren zwar so in der Datei,
@@ -1305,144 +1305,144 @@ public:
WW8_FC fcPlcfdoaMom; // 0x192 file offset of the FDOA (drawn object) PLCF for main document.
// ==0 if document has no drawn objects. The length of the FDOA is 6 bytes.
// ab Ver8 unused
- INT32 lcbPlcfdoaMom; // 0x196 length in bytes of the FDOA PLCF of the main document
+ sal_Int32 lcbPlcfdoaMom; // 0x196 length in bytes of the FDOA PLCF of the main document
// ab Ver8 unused
WW8_FC fcPlcfdoaHdr; // 0x19A file offset of the FDOA (drawn object) PLCF for the header document.
// ==0 if document has no drawn objects. The length of the FDOA is 6 bytes.
// ab Ver8 unused
- INT32 lcbPlcfdoaHdr; // 0x19E length in bytes of the FDOA PLCF of the header document
+ sal_Int32 lcbPlcfdoaHdr; // 0x19E length in bytes of the FDOA PLCF of the header document
// ab Ver8 unused
WW8_FC fcPlcfspaMom; // offset in table stream of the FSPA PLCF for main document.
// == 0 if document has no office art objects
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspaMom; // length in bytes of the FSPA PLCF of the main document
+ sal_Int32 lcbPlcfspaMom; // length in bytes of the FSPA PLCF of the main document
// war in Ver67 nur leere Reserve
WW8_FC fcPlcfspaHdr; // offset in table stream of the FSPA PLCF for header document.
// == 0 if document has no office art objects
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspaHdr; // length in bytes of the FSPA PLCF of the header document
+ sal_Int32 lcbPlcfspaHdr; // length in bytes of the FSPA PLCF of the header document
// war in Ver67 nur leere Reserve
WW8_FC fcPlcfAtnbkf; // 0x1B2 file offset of BKF (bookmark first) PLCF of the annotation subdocument
- INT32 lcbPlcfAtnbkf; // 0x1B6 length in bytes of BKF (bookmark first) PLCF of the annotation subdocument
+ sal_Int32 lcbPlcfAtnbkf; // 0x1B6 length in bytes of BKF (bookmark first) PLCF of the annotation subdocument
WW8_FC fcPlcfAtnbkl; // 0x1BA file offset of BKL (bookmark last) PLCF of the annotation subdocument
- INT32 lcbPlcfAtnbkl; // 0x1BE length in bytes of BKL (bookmark first) PLCF of the annotation subdocument
+ sal_Int32 lcbPlcfAtnbkl; // 0x1BE length in bytes of BKL (bookmark first) PLCF of the annotation subdocument
WW8_FC fcPms; // 0x1C2 file offset of PMS (Print Merge State) information block
- INT32 lcbPMS; // 0x1C6 length in bytes of PMS
+ sal_Int32 lcbPMS; // 0x1C6 length in bytes of PMS
WW8_FC fcFormFldSttbf; // 0x1CA file offset of form field Sttbf which contains strings used in form field dropdown controls
- INT32 lcbFormFldSttbf; // 0x1CE length in bytes of form field Sttbf
+ sal_Int32 lcbFormFldSttbf; // 0x1CE length in bytes of form field Sttbf
WW8_FC fcPlcfendRef; // 0x1D2 file offset of PLCFendRef which points to endnote references in the main document stream
- INT32 lcbPlcfendRef; // 0x1D6
+ sal_Int32 lcbPlcfendRef; // 0x1D6
WW8_FC fcPlcfendTxt; // 0x1DA file offset of PLCFendRef which points to endnote text in the endnote document
// stream which corresponds with the PLCFendRef
- INT32 lcbPlcfendTxt; // 0x1DE
+ sal_Int32 lcbPlcfendTxt; // 0x1DE
WW8_FC fcPlcffldEdn; // 0x1E2 offset to PLCF of field positions in the endnote subdoc
- INT32 lcbPlcffldEdn; // 0x1E6
+ sal_Int32 lcbPlcffldEdn; // 0x1E6
WW8_FC fcPlcfpgdEdn; // 0x1EA offset to PLCF of page boundaries in the endnote subdoc.
- INT32 lcbPlcfpgdEdn; // 0x1EE
+ sal_Int32 lcbPlcfpgdEdn; // 0x1EE
WW8_FC fcDggInfo; // offset in table stream of the office art object table data.
// The format of office art object table data is found in a separate document.
// war in Ver67 nur leere Reserve
- INT32 lcbDggInfo; // length in bytes of the office art object table data
+ sal_Int32 lcbDggInfo; // length in bytes of the office art object table data
// war in Ver67 nur leere Reserve
WW8_FC fcSttbfRMark; // 0x1fa offset to STTBF that records the author abbreviations...
- INT32 lcbSttbfRMark; // 0x1fe
+ sal_Int32 lcbSttbfRMark; // 0x1fe
WW8_FC fcSttbfCaption; // 0x202 offset to STTBF that records caption titles...
- INT32 lcbSttbfCaption; // 0x206
+ sal_Int32 lcbSttbfCaption; // 0x206
WW8_FC fcSttbAutoCaption; // offset in table stream to the STTBF that records the object names and
// indices into the caption STTBF for objects which get auto captions.
- INT32 lcbSttbAutoCaption; // 0x20e
+ sal_Int32 lcbSttbAutoCaption; // 0x20e
WW8_FC fcPlcfwkb; // 0x212 offset to PLCF that describes the boundaries of contributing documents...
- INT32 lcbPlcfwkb; // 0x216
+ sal_Int32 lcbPlcfwkb; // 0x216
WW8_FC fcPlcfspl; // offset in table stream of PLCF (of SPLS structures) that records spell check state
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspl; // war in Ver67 nur leere Reserve
+ sal_Int32 lcbPlcfspl; // war in Ver67 nur leere Reserve
WW8_FC fcPlcftxbxTxt; // 0x222 ...PLCF of beginning CP in the text box subdoc
- INT32 lcbPlcftxbxTxt; // 0x226
+ sal_Int32 lcbPlcftxbxTxt; // 0x226
WW8_FC fcPlcffldTxbx; // 0x22a ...PLCF of field boundaries recorded in the textbox subdoc.
- INT32 lcbPlcffldTxbx; // 0x22e
+ sal_Int32 lcbPlcffldTxbx; // 0x22e
WW8_FC fcPlcfHdrtxbxTxt;// 0x232 ...PLCF of beginning CP in the header text box subdoc
- INT32 lcbPlcfHdrtxbxTxt;// 0x236
+ sal_Int32 lcbPlcfHdrtxbxTxt;// 0x236
WW8_FC fcPlcffldHdrTxbx;// 0x23a ...PLCF of field boundaries recorded in the header textbox subdoc.
- INT32 lcbPlcffldHdrTxbx;// 0x23e
+ sal_Int32 lcbPlcffldHdrTxbx;// 0x23e
WW8_FC fcStwUser;
sal_uInt32 lcbStwUser;
WW8_FC fcSttbttmbd;
sal_uInt32 lcbSttbttmbd;
WW8_FC fcSttbFnm; // 0x02da offset in the table stream of masters subdocument names
- INT32 lcbSttbFnm; // 0x02de length
+ sal_Int32 lcbSttbFnm; // 0x02de length
/*
spezielle Listenverwaltung fuer WW8
*/
WW8_FC fcPlcfLst; // 0x02e2 offset in the table stream of list format information.
- INT32 lcbPlcfLst; // 0x02e6 length
+ sal_Int32 lcbPlcfLst; // 0x02e6 length
WW8_FC fcPlfLfo; // 0x02ea offset in the table stream of list format override information.
- INT32 lcbPlfLfo; // 0x02ee length
+ sal_Int32 lcbPlfLfo; // 0x02ee length
/*
spezielle Break-Verwaltung fuer Text-Box-Stories in WW8
*/
WW8_FC fcPlcftxbxBkd; // 0x02f2 PLCF fuer TextBox-Break-Deskriptoren im Maintext
- INT32 lcbPlcftxbxBkd; // 0x02f6
+ sal_Int32 lcbPlcftxbxBkd; // 0x02f6
WW8_FC fcPlcfHdrtxbxBkd;// 0x02fa PLCF fuer TextBox-Break-Deskriptoren im Header-/Footer-Bereich
- INT32 lcbPlcfHdrtxbxBkd;// 0x02fe
+ sal_Int32 lcbPlcfHdrtxbxBkd;// 0x02fe
// 0x302 - 372 == ignore
/*
ListNames (skip to here!)
*/
WW8_FC fcSttbListNames;// 0x0372 PLCF for Listname Table
- INT32 lcbSttbListNames;// 0x0376
+ sal_Int32 lcbSttbListNames;// 0x0376
WW8_FC fcPlcfTch;
- INT32 lcbPlcfTch;
+ sal_Int32 lcbPlcfTch;
// 0x38A - 41A == ignore
WW8_FC fcAtrdExtra;
- UINT32 lcbAtrdExtra;
+ sal_uInt32 lcbAtrdExtra;
// 0x422 - 0x4D4 == ignore
WW8_FC fcHplxsdr; //bizarrely, word xp seems to require this set to shows dates from AtrdExtra
- UINT32 lcbHplxsdr;
+ sal_uInt32 lcbHplxsdr;
/*
General-Varaiblen, die fuer Ver67 und Ver8 verwendet werden,
obwohl sie in der jeweiligen DATEI verschiedene Groesse haben:
*/
- INT32 pnChpFirst;
- INT32 pnPapFirst;
- INT32 cpnBteChp;
- INT32 cpnBtePap;
+ sal_Int32 pnChpFirst;
+ sal_Int32 pnPapFirst;
+ sal_Int32 cpnBteChp;
+ sal_Int32 cpnBtePap;
/*
The actual nFib, moved here because some readers assumed
they couldn't read any format with nFib > some constant
*/
- UINT16 nFib_actual; // 0x05bc #i56856#
+ sal_uInt16 nFib_actual; // 0x05bc #i56856#
/*
nun wird lediglich noch ein Ctor benoetigt
*/
- WW8Fib( SvStream& rStrm, BYTE nWantedVersion,UINT32 nOffset=0 );
+ WW8Fib( SvStream& rStrm, sal_uInt8 nWantedVersion,sal_uInt32 nOffset=0 );
/* leider falsch, man braucht auch noch einen fuer den Export */
- WW8Fib( BYTE nVersion = 6 );
+ WW8Fib( sal_uInt8 nVersion = 6 );
bool WriteHeader(SvStream& rStrm);
bool Write(SvStream& rStrm);
- static rtl_TextEncoding GetFIBCharset(UINT16 chs);
+ static rtl_TextEncoding GetFIBCharset(sal_uInt16 chs);
ww::WordVersion GetFIBVersion() const;
WW8_CP GetBaseCp(ManTypes nType) const;
};
@@ -1455,19 +1455,19 @@ protected:
long nStyleStart;
long nStyleLen;
- UINT16 cstd; // Count of styles in stylesheet
- UINT16 cbSTDBaseInFile; // Length of STD Base as stored in a file
- UINT16 fStdStylenamesWritten : 1; // Are built-in stylenames stored?
- UINT16 : 15; // Spare flags
- UINT16 stiMaxWhenSaved; // Max sti known when file was written
- UINT16 istdMaxFixedWhenSaved; // How many fixed-index istds are there?
- UINT16 nVerBuiltInNamesWhenSaved; // Current version of built-in stylenames
+ sal_uInt16 cstd; // Count of styles in stylesheet
+ sal_uInt16 cbSTDBaseInFile; // Length of STD Base as stored in a file
+ sal_uInt16 fStdStylenamesWritten : 1; // Are built-in stylenames stored?
+ sal_uInt16 : 15; // Spare flags
+ sal_uInt16 stiMaxWhenSaved; // Max sti known when file was written
+ sal_uInt16 istdMaxFixedWhenSaved; // How many fixed-index istds are there?
+ sal_uInt16 nVerBuiltInNamesWhenSaved; // Current version of built-in stylenames
// ftc used by StandardChpStsh for this document
- UINT16 ftcStandardChpStsh;
+ sal_uInt16 ftcStandardChpStsh;
// CJK ftc used by StandardChpStsh for this document
- UINT16 ftcStandardChpCJKStsh;
+ sal_uInt16 ftcStandardChpCJKStsh;
// CTL ftc used by StandardChpStsh for this document
- UINT16 ftcStandardChpCTLStsh;
+ sal_uInt16 ftcStandardChpCTLStsh;
//No copying
WW8Style(const WW8Style&);
@@ -1476,22 +1476,22 @@ public:
WW8Style( SvStream& rSt, WW8Fib& rFibPara );
WW8_STD* Read1STDFixed( short& rSkip, short* pcbStd );
WW8_STD* Read1Style( short& rSkip, String* pString, short* pcbStd );
- UINT16 GetCount() const { return cstd; }
+ sal_uInt16 GetCount() const { return cstd; }
};
class WW8Fonts
{
protected:
WW8_FFN* pFontA; // Array of Pointers to Font Description
- USHORT nMax; // Array-Size
+ sal_uInt16 nMax; // Array-Size
public:
WW8Fonts( SvStream& rSt, WW8Fib& rFib );
~WW8Fonts() { delete[] pFontA; }
- const WW8_FFN* GetFont( USHORT nNum ) const;
- USHORT GetMax() const { return nMax; }
+ const WW8_FFN* GetFont( sal_uInt16 nNum ) const;
+ sal_uInt16 GetMax() const { return nMax; }
};
-typedef BYTE HdFtFlags;
+typedef sal_uInt8 HdFtFlags;
namespace nsHdFtFlags
{
const HdFtFlags WW8_HEADER_EVEN = 0x01;
@@ -1507,251 +1507,251 @@ class WW8Dop
{
public:
/* Error Status */
- ULONG nDopError;
+ sal_uLong nDopError;
/*
Corresponds only roughly to the actual structure of the Winword DOP,
the winword FIB version matters to what exists.
*/
// Initialisier-Dummy:
- BYTE nDataStart;
+ sal_uInt8 nDataStart;
//-------------------------
- UINT16 fFacingPages : 1; // 1 when facing pages should be printed
- UINT16 fWidowControl : 1; // 1 when widow control is in effect. 0 when widow control disabled.
- UINT16 fPMHMainDoc : 1; // 1 when doc is a main doc for Print Merge Helper, 0 when not; default=0
- UINT16 grfSuppression : 2; // 0 Default line suppression storage; 0= form letter line suppression; 1= no line suppression; default=0
- UINT16 fpc : 2; // 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
- UINT16 : 1; // 0 unused
+ sal_uInt16 fFacingPages : 1; // 1 when facing pages should be printed
+ sal_uInt16 fWidowControl : 1; // 1 when widow control is in effect. 0 when widow control disabled.
+ sal_uInt16 fPMHMainDoc : 1; // 1 when doc is a main doc for Print Merge Helper, 0 when not; default=0
+ sal_uInt16 grfSuppression : 2; // 0 Default line suppression storage; 0= form letter line suppression; 1= no line suppression; default=0
+ sal_uInt16 fpc : 2; // 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
+ sal_uInt16 : 1; // 0 unused
//-------------------------
- UINT16 grpfIhdt : 8; // 0 specification of document headers and footers. See explanation under Headers and Footers topic.
+ sal_uInt16 grpfIhdt : 8; // 0 specification of document headers and footers. See explanation under Headers and Footers topic.
//-------------------------
- UINT16 rncFtn : 2; // 0 restart index for footnotes, 0 don't restart note numbering, 1 section, 2 page
- UINT16 nFtn : 14; // 1 initial footnote number for document
- UINT16 fOutlineDirtySave : 1; // when 1, indicates that information in the hPLCFpad should be refreshed since outline has been dirtied
- UINT16 : 7; // reserved
- UINT16 fOnlyMacPics : 1; // when 1, Word believes all pictures recorded in the document were created on a Macintosh
- UINT16 fOnlyWinPics : 1; // when 1, Word believes all pictures recorded in the document were created in Windows
- UINT16 fLabelDoc : 1; // when 1, document was created as a print merge labels document
- UINT16 fHyphCapitals : 1; // when 1, Word is allowed to hyphenate words that are capitalized. When 0, capitalized may not be hyphenated
- UINT16 fAutoHyphen : 1; // when 1, Word will hyphenate newly typed text as a background task
- UINT16 fFormNoFields : 1;
- UINT16 fLinkStyles : 1; // when 1, Word will merge styles from its template
- UINT16 fRevMarking : 1; // when 1, Word will mark revisions as the document is edited
- UINT16 fBackup : 1; // always make backup when document saved when 1.
- UINT16 fExactCWords : 1;
- UINT16 fPagHidden : 1; //
- UINT16 fPagResults : 1;
- UINT16 fLockAtn : 1; // when 1, annotations are locked for editing
- UINT16 fMirrorMargins : 1; // swap margins on left/right pages when 1.
- UINT16 fReadOnlyRecommended : 1;// user has recommended that this doc be opened read-only when 1
- UINT16 fDfltTrueType : 1; // when 1, use TrueType fonts by default (flag obeyed only when doc was created by WinWord 2.x)
- UINT16 fPagSuppressTopSpacing : 1;//when 1, file created with SUPPRESSTOPSPACING=YES in win.ini. (flag obeyed only when doc was created by WinWord 2.x).
- UINT16 fProtEnabled : 1; // when 1, document is protected from edit operations
- UINT16 fDispFormFldSel : 1;// when 1, restrict selections to occur only within form fields
- UINT16 fRMView : 1; // when 1, show revision markings on screen
- UINT16 fRMPrint : 1; // when 1, print revision marks when document is printed
- UINT16 fWriteReservation : 1;
- UINT16 fLockRev : 1; // when 1, the current revision marking state is locked
- UINT16 fEmbedFonts : 1; // when 1, document contains embedded True Type fonts
+ sal_uInt16 rncFtn : 2; // 0 restart index for footnotes, 0 don't restart note numbering, 1 section, 2 page
+ sal_uInt16 nFtn : 14; // 1 initial footnote number for document
+ sal_uInt16 fOutlineDirtySave : 1; // when 1, indicates that information in the hPLCFpad should be refreshed since outline has been dirtied
+ sal_uInt16 : 7; // reserved
+ sal_uInt16 fOnlyMacPics : 1; // when 1, Word believes all pictures recorded in the document were created on a Macintosh
+ sal_uInt16 fOnlyWinPics : 1; // when 1, Word believes all pictures recorded in the document were created in Windows
+ sal_uInt16 fLabelDoc : 1; // when 1, document was created as a print merge labels document
+ sal_uInt16 fHyphCapitals : 1; // when 1, Word is allowed to hyphenate words that are capitalized. When 0, capitalized may not be hyphenated
+ sal_uInt16 fAutoHyphen : 1; // when 1, Word will hyphenate newly typed text as a background task
+ sal_uInt16 fFormNoFields : 1;
+ sal_uInt16 fLinkStyles : 1; // when 1, Word will merge styles from its template
+ sal_uInt16 fRevMarking : 1; // when 1, Word will mark revisions as the document is edited
+ sal_uInt16 fBackup : 1; // always make backup when document saved when 1.
+ sal_uInt16 fExactCWords : 1;
+ sal_uInt16 fPagHidden : 1; //
+ sal_uInt16 fPagResults : 1;
+ sal_uInt16 fLockAtn : 1; // when 1, annotations are locked for editing
+ sal_uInt16 fMirrorMargins : 1; // swap margins on left/right pages when 1.
+ sal_uInt16 fReadOnlyRecommended : 1;// user has recommended that this doc be opened read-only when 1
+ sal_uInt16 fDfltTrueType : 1; // when 1, use TrueType fonts by default (flag obeyed only when doc was created by WinWord 2.x)
+ sal_uInt16 fPagSuppressTopSpacing : 1;//when 1, file created with SUPPRESSTOPSPACING=YES in win.ini. (flag obeyed only when doc was created by WinWord 2.x).
+ sal_uInt16 fProtEnabled : 1; // when 1, document is protected from edit operations
+ sal_uInt16 fDispFormFldSel : 1;// when 1, restrict selections to occur only within form fields
+ sal_uInt16 fRMView : 1; // when 1, show revision markings on screen
+ sal_uInt16 fRMPrint : 1; // when 1, print revision marks when document is printed
+ sal_uInt16 fWriteReservation : 1;
+ sal_uInt16 fLockRev : 1; // when 1, the current revision marking state is locked
+ sal_uInt16 fEmbedFonts : 1; // when 1, document contains embedded True Type fonts
// compatability options
- UINT16 copts_fNoTabForInd : 1; // when 1, don�t add automatic tab stops for hanging indent
- UINT16 copts_fNoSpaceRaiseLower : 1; // when 1, don�t add extra space for raised or lowered characters
- UINT16 copts_fSupressSpbfAfterPgBrk : 1; // when 1, supress the paragraph Space Before and Space After options after a page break
- UINT16 copts_fWrapTrailSpaces : 1; // when 1, wrap trailing spaces at the end of a line to the next line
- UINT16 copts_fMapPrintTextColor : 1; // when 1, print colors as black on non-color printers
- UINT16 copts_fNoColumnBalance : 1; // when 1, don�t balance columns for Continuous Section starts
- UINT16 copts_fConvMailMergeEsc : 1;
- UINT16 copts_fSupressTopSpacing : 1; // when 1, supress extra line spacing at top of page
- UINT16 copts_fOrigWordTableRules : 1; // when 1, combine table borders like Word 5.x for the Macintosh
- UINT16 copts_fTransparentMetafiles : 1; // when 1, don�t blank area between metafile pictures
- UINT16 copts_fShowBreaksInFrames : 1; // when 1, show hard page or column breaks in frames
- UINT16 copts_fSwapBordersFacingPgs : 1; // when 1, swap left and right pages on odd facing pages
- UINT16 copts_fExpShRtn : 1; // when 1, expand character spaces on the line ending SHIFT+RETURN // #i56856#
-
- INT16 dxaTab; // 720 twips default tab width
- UINT16 wSpare; //
- UINT16 dxaHotZ; // width of hyphenation hot zone measured in twips
- UINT16 cConsecHypLim; // number of lines allowed to have consecutive hyphens
- UINT16 wSpare2; // reserved
- INT32 dttmCreated; // DTTM date and time document was created
- INT32 dttmRevised; // DTTM date and time document was last revised
- INT32 dttmLastPrint; // DTTM date and time document was last printed
- INT16 nRevision; // number of times document has been revised since its creation
- INT32 tmEdited; // time document was last edited
- INT32 cWords; // count of words tallied by last Word Count execution
- INT32 cCh; // count of characters tallied by last Word Count execution
- INT16 cPg; // count of pages tallied by last Word Count execution
- INT32 cParas; // count of paragraphs tallied by last Word Count execution
- UINT16 rncEdn : 2; // restart endnote number code: 0 don�t restart endnote numbering, 1 section, 2 page
- UINT16 nEdn : 14; // beginning endnote number
- UINT16 epc : 2; // endnote position code: 0 at end of section, 3 at end of document
- // UINT16 nfcFtnRef : 4; // number format code for auto footnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
+ sal_uInt16 copts_fNoTabForInd : 1; // when 1, don�t add automatic tab stops for hanging indent
+ sal_uInt16 copts_fNoSpaceRaiseLower : 1; // when 1, don�t add extra space for raised or lowered characters
+ sal_uInt16 copts_fSupressSpbfAfterPgBrk : 1; // when 1, supress the paragraph Space Before and Space After options after a page break
+ sal_uInt16 copts_fWrapTrailSpaces : 1; // when 1, wrap trailing spaces at the end of a line to the next line
+ sal_uInt16 copts_fMapPrintTextColor : 1; // when 1, print colors as black on non-color printers
+ sal_uInt16 copts_fNoColumnBalance : 1; // when 1, don�t balance columns for Continuous Section starts
+ sal_uInt16 copts_fConvMailMergeEsc : 1;
+ sal_uInt16 copts_fSupressTopSpacing : 1; // when 1, supress extra line spacing at top of page
+ sal_uInt16 copts_fOrigWordTableRules : 1; // when 1, combine table borders like Word 5.x for the Macintosh
+ sal_uInt16 copts_fTransparentMetafiles : 1; // when 1, don�t blank area between metafile pictures
+ sal_uInt16 copts_fShowBreaksInFrames : 1; // when 1, show hard page or column breaks in frames
+ sal_uInt16 copts_fSwapBordersFacingPgs : 1; // when 1, swap left and right pages on odd facing pages
+ sal_uInt16 copts_fExpShRtn : 1; // when 1, expand character spaces on the line ending SHIFT+RETURN // #i56856#
+
+ sal_Int16 dxaTab; // 720 twips default tab width
+ sal_uInt16 wSpare; //
+ sal_uInt16 dxaHotZ; // width of hyphenation hot zone measured in twips
+ sal_uInt16 cConsecHypLim; // number of lines allowed to have consecutive hyphens
+ sal_uInt16 wSpare2; // reserved
+ sal_Int32 dttmCreated; // DTTM date and time document was created
+ sal_Int32 dttmRevised; // DTTM date and time document was last revised
+ sal_Int32 dttmLastPrint; // DTTM date and time document was last printed
+ sal_Int16 nRevision; // number of times document has been revised since its creation
+ sal_Int32 tmEdited; // time document was last edited
+ sal_Int32 cWords; // count of words tallied by last Word Count execution
+ sal_Int32 cCh; // count of characters tallied by last Word Count execution
+ sal_Int16 cPg; // count of pages tallied by last Word Count execution
+ sal_Int32 cParas; // count of paragraphs tallied by last Word Count execution
+ sal_uInt16 rncEdn : 2; // restart endnote number code: 0 don�t restart endnote numbering, 1 section, 2 page
+ sal_uInt16 nEdn : 14; // beginning endnote number
+ sal_uInt16 epc : 2; // endnote position code: 0 at end of section, 3 at end of document
+ // sal_uInt16 nfcFtnRef : 4; // number format code for auto footnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
// 3 Upper case Letter, 4 Lower case Letter
// ersetzt durch gleichlautendes Feld unten
- // UINT16 nfcEdnRef : 4; // number format code for auto endnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
+ // sal_uInt16 nfcEdnRef : 4; // number format code for auto endnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
// 3 Upper case Letter, 4 Lower case Letter
// ersetzt durch gleichlautendes Feld unten
- UINT16 fPrintFormData : 1; // only print data inside of form fields
- UINT16 fSaveFormData : 1; // only save document data that is inside of a form field.
- UINT16 fShadeFormData : 1; // shade form fields
- UINT16 : 2; // reserved
- UINT16 fWCFtnEdn : 1; // when 1, include footnotes and endnotes in word count
- INT32 cLines; // count of lines tallied by last Word Count operation
- INT32 cWordsFtnEnd; // count of words in footnotes and endnotes tallied by last Word Count operation
- INT32 cChFtnEdn; // count of characters in footnotes and endnotes tallied by last Word Count operation
- INT16 cPgFtnEdn; // count of pages in footnotes and endnotes tallied by last Word Count operation
- INT32 cParasFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
- INT32 cLinesFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
- INT32 lKeyProtDoc; // document protection password key, only valid if dop.fProtEnabled, dop.fLockAtn or dop.fLockRev are 1.
- UINT16 wvkSaved : 3; // document view kind: 0 Normal view, 1 Outline view, 2 Page View
- UINT16 wScaleSaved : 9; //
- UINT16 zkSaved : 2;
- UINT16 fRotateFontW6 : 1;
- UINT16 iGutterPos : 1 ;
+ sal_uInt16 fPrintFormData : 1; // only print data inside of form fields
+ sal_uInt16 fSaveFormData : 1; // only save document data that is inside of a form field.
+ sal_uInt16 fShadeFormData : 1; // shade form fields
+ sal_uInt16 : 2; // reserved
+ sal_uInt16 fWCFtnEdn : 1; // when 1, include footnotes and endnotes in word count
+ sal_Int32 cLines; // count of lines tallied by last Word Count operation
+ sal_Int32 cWordsFtnEnd; // count of words in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cChFtnEdn; // count of characters in footnotes and endnotes tallied by last Word Count operation
+ sal_Int16 cPgFtnEdn; // count of pages in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cParasFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cLinesFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 lKeyProtDoc; // document protection password key, only valid if dop.fProtEnabled, dop.fLockAtn or dop.fLockRev are 1.
+ sal_uInt16 wvkSaved : 3; // document view kind: 0 Normal view, 1 Outline view, 2 Page View
+ sal_uInt16 wScaleSaved : 9; //
+ sal_uInt16 zkSaved : 2;
+ sal_uInt16 fRotateFontW6 : 1;
+ sal_uInt16 iGutterPos : 1 ;
// hier sollte bei nFib < 103 Schluss sein, sonst ist Datei fehlerhaft!
/*
bei nFib >= 103 gehts weiter:
*/
- UINT32 fNoTabForInd :1; // see above in compatability options
- UINT32 fNoSpaceRaiseLower :1; // see above
- UINT32 fSupressSpbfAfterPageBreak :1; // see above
- UINT32 fWrapTrailSpaces :1; // see above
- UINT32 fMapPrintTextColor :1; // see above
- UINT32 fNoColumnBalance :1; // see above
- UINT32 fConvMailMergeEsc :1; // see above
- UINT32 fSupressTopSpacing :1; // see above
- UINT32 fOrigWordTableRules :1; // see above
- UINT32 fTransparentMetafiles :1; // see above
- UINT32 fShowBreaksInFrames :1; // see above
- UINT32 fSwapBordersFacingPgs :1; // see above
- UINT32 fCompatabilityOptions_Unknown1_13 :1; // #i78591#
- UINT32 fExpShRtn :1; // #i78591# and #i56856#
- UINT32 fCompatabilityOptions_Unknown1_15 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_16 :1; // #i78591#
- UINT32 fSuppressTopSpacingMac5 :1; // Suppress extra line spacing at top
+ sal_uInt32 fNoTabForInd :1; // see above in compatability options
+ sal_uInt32 fNoSpaceRaiseLower :1; // see above
+ sal_uInt32 fSupressSpbfAfterPageBreak :1; // see above
+ sal_uInt32 fWrapTrailSpaces :1; // see above
+ sal_uInt32 fMapPrintTextColor :1; // see above
+ sal_uInt32 fNoColumnBalance :1; // see above
+ sal_uInt32 fConvMailMergeEsc :1; // see above
+ sal_uInt32 fSupressTopSpacing :1; // see above
+ sal_uInt32 fOrigWordTableRules :1; // see above
+ sal_uInt32 fTransparentMetafiles :1; // see above
+ sal_uInt32 fShowBreaksInFrames :1; // see above
+ sal_uInt32 fSwapBordersFacingPgs :1; // see above
+ sal_uInt32 fCompatabilityOptions_Unknown1_13 :1; // #i78591#
+ sal_uInt32 fExpShRtn :1; // #i78591# and #i56856#
+ sal_uInt32 fCompatabilityOptions_Unknown1_15 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_16 :1; // #i78591#
+ sal_uInt32 fSuppressTopSpacingMac5 :1; // Suppress extra line spacing at top
// of page like MacWord 5.x
- UINT32 fTruncDxaExpand :1; // Expand/Condense by whole number of points
- UINT32 fPrintBodyBeforeHdr :1; // Print body text before header/footer
- UINT32 fNoLeading :1; // Don't add extra spacebetween rows of text
- UINT32 fCompatabilityOptions_Unknown1_21 :1; // #i78591#
- UINT32 fMWSmallCaps : 1; // Use larger small caps like MacWord 5.x
- UINT32 fCompatabilityOptions_Unknown1_23 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_24 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_25 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_26 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_27 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_28 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_29 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_30 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_31 :1; // #i78591#
- UINT32 fUsePrinterMetrics : 1; //The magic option
+ sal_uInt32 fTruncDxaExpand :1; // Expand/Condense by whole number of points
+ sal_uInt32 fPrintBodyBeforeHdr :1; // Print body text before header/footer
+ sal_uInt32 fNoLeading :1; // Don't add extra spacebetween rows of text
+ sal_uInt32 fCompatabilityOptions_Unknown1_21 :1; // #i78591#
+ sal_uInt32 fMWSmallCaps : 1; // Use larger small caps like MacWord 5.x
+ sal_uInt32 fCompatabilityOptions_Unknown1_23 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_24 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_25 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_26 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_27 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_28 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_29 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_30 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_31 :1; // #i78591#
+ sal_uInt32 fUsePrinterMetrics : 1; //The magic option
// hier sollte bei nFib <= 105 Schluss sein, sonst ist Datei fehlerhaft!
/*
bei nFib > 105 gehts weiter:
*/
- INT16 adt; // Autoformat Document Type:
+ sal_Int16 adt; // Autoformat Document Type:
// 0 for normal.
// 1 for letter, and
// 2 for email.
WW8DopTypography doptypography; // see WW8STRUC.HXX
WW8_DOGRID dogrid; // see WW8STRUC.HXX
- UINT16 :1; // reserved
- UINT16 lvl :4; // Which outline levels are showing in outline view
- UINT16 :4; // reserved
- UINT16 fHtmlDoc :1; // This file is based upon an HTML file
- UINT16 :1; // reserved
- UINT16 fSnapBorder :1; // Snap table and page borders to page border
- UINT16 fIncludeHeader :1; // Place header inside page border
- UINT16 fIncludeFooter :1; // Place footer inside page border
- UINT16 fForcePageSizePag :1; // Are we in online view
- UINT16 fMinFontSizePag :1; // Are we auto-promoting fonts to >= hpsZoonFontPag?
- UINT16 fHaveVersions :1; // versioning is turned on
- UINT16 fAutoVersion :1; // autoversioning is enabled
- UINT16 : 14; // reserved
+ sal_uInt16 :1; // reserved
+ sal_uInt16 lvl :4; // Which outline levels are showing in outline view
+ sal_uInt16 :4; // reserved
+ sal_uInt16 fHtmlDoc :1; // This file is based upon an HTML file
+ sal_uInt16 :1; // reserved
+ sal_uInt16 fSnapBorder :1; // Snap table and page borders to page border
+ sal_uInt16 fIncludeHeader :1; // Place header inside page border
+ sal_uInt16 fIncludeFooter :1; // Place footer inside page border
+ sal_uInt16 fForcePageSizePag :1; // Are we in online view
+ sal_uInt16 fMinFontSizePag :1; // Are we auto-promoting fonts to >= hpsZoonFontPag?
+ sal_uInt16 fHaveVersions :1; // versioning is turned on
+ sal_uInt16 fAutoVersion :1; // autoversioning is enabled
+ sal_uInt16 : 14; // reserved
// Skip 12 Bytes here: ASUMI
- INT32 cChWS;
- INT32 cChWSFtnEdn;
- INT32 grfDocEvents;
+ sal_Int32 cChWS;
+ sal_Int32 cChWSFtnEdn;
+ sal_Int32 grfDocEvents;
// Skip 4+30+8 Bytes here
- INT32 cDBC;
- INT32 cDBCFtnEdn;
+ sal_Int32 cDBC;
+ sal_Int32 cDBCFtnEdn;
// Skip 4 Bytes here
- INT16 nfcFtnRef;
- INT16 nfcEdnRef;
- INT16 hpsZoonFontPag;
- INT16 dywDispPag;
-
- UINT32 fCompatabilityOptions_Unknown2_1 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_2 :1; // #i78591#
- UINT32 fDontUseHTMLAutoSpacing:1;
- UINT32 fCompatabilityOptions_Unknown2_4 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_5 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_6 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_7 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_8 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_9 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_10 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_11 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_12 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_13 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_14 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_15 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_16 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_17 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_18 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_19 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_20 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_21 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_22 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_23 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_24 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_25 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_26 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_27 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_28 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_29 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_30 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_31 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_32 :1; // #i78591#
-
- UINT16 fUnknown3:15;
- UINT16 fUseBackGroundInAllmodes:1;
-
- UINT16 fDoNotEmbedSystemFont:1;
- UINT16 fWordCompat:1;
- UINT16 fLiveRecover:1;
- UINT16 fEmbedFactoids:1;
- UINT16 fFactoidXML:1;
- UINT16 fFactoidAllDone:1;
- UINT16 fFolioPrint:1;
- UINT16 fReverseFolio:1;
- UINT16 iTextLineEnding:3;
- UINT16 fHideFcc:1;
- UINT16 fAcetateShowMarkup:1;
- UINT16 fAcetateShowAtn:1;
- UINT16 fAcetateShowInsDel:1;
- UINT16 fAcetateShowProps:1;
+ sal_Int16 nfcFtnRef;
+ sal_Int16 nfcEdnRef;
+ sal_Int16 hpsZoonFontPag;
+ sal_Int16 dywDispPag;
+
+ sal_uInt32 fCompatabilityOptions_Unknown2_1 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_2 :1; // #i78591#
+ sal_uInt32 fDontUseHTMLAutoSpacing:1;
+ sal_uInt32 fCompatabilityOptions_Unknown2_4 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_5 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_6 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_7 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_8 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_9 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_10 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_11 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_12 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_13 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_14 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_15 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_16 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_17 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_18 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_19 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_20 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_21 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_22 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_23 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_24 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_25 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_26 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_27 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_28 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_29 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_30 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_31 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_32 :1; // #i78591#
+
+ sal_uInt16 fUnknown3:15;
+ sal_uInt16 fUseBackGroundInAllmodes:1;
+
+ sal_uInt16 fDoNotEmbedSystemFont:1;
+ sal_uInt16 fWordCompat:1;
+ sal_uInt16 fLiveRecover:1;
+ sal_uInt16 fEmbedFactoids:1;
+ sal_uInt16 fFactoidXML:1;
+ sal_uInt16 fFactoidAllDone:1;
+ sal_uInt16 fFolioPrint:1;
+ sal_uInt16 fReverseFolio:1;
+ sal_uInt16 iTextLineEnding:3;
+ sal_uInt16 fHideFcc:1;
+ sal_uInt16 fAcetateShowMarkup:1;
+ sal_uInt16 fAcetateShowAtn:1;
+ sal_uInt16 fAcetateShowInsDel:1;
+ sal_uInt16 fAcetateShowProps:1;
// 2. Initialisier-Dummy:
- BYTE nDataEnd;
+ sal_uInt8 nDataEnd;
bool bUseThaiLineBreakingRules;
/* Constructor for importing, needs to know the version of word used */
- WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize);
+ WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize);
/* Constructs default DOP suitable for exporting */
WW8Dop();
bool Write(SvStream& rStrm, WW8Fib& rFib) const;
public:
- UINT32 GetCompatabilityOptions() const;
- void SetCompatabilityOptions(UINT32 a32Bit);
+ sal_uInt32 GetCompatabilityOptions() const;
+ void SetCompatabilityOptions(sal_uInt32 a32Bit);
// i#78591#
- UINT32 GetCompatabilityOptions2() const;
- void SetCompatabilityOptions2(UINT32 a32Bit);
+ sal_uInt32 GetCompatabilityOptions2() const;
+ void SetCompatabilityOptions2(sal_uInt32 a32Bit);
};
class WW8PLCF_HdFt
@@ -1762,22 +1762,22 @@ private:
short nIdxOffset;
public:
WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop );
- bool GetTextPos(BYTE grpfIhdt, BYTE nWhich, WW8_CP& rStart, long& rLen);
+ bool GetTextPos(sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP& rStart, long& rLen);
bool GetTextPosExact(short nIdx, WW8_CP& rStart, long& rLen);
- void UpdateIndex( BYTE grpfIhdt );
+ void UpdateIndex( sal_uInt8 grpfIhdt );
};
void SwapQuotesInField(String &rFmt);
Word2CHPX ReadWord2Chpx(SvStream &rSt, sal_Size nOffset, sal_uInt8 nSize);
-std::vector<BYTE> ChpxToSprms(const Word2CHPX &rChpx);
+std::vector<sal_uInt8> ChpxToSprms(const Word2CHPX &rChpx);
-ULONG SafeReadString(ByteString &rStr,USHORT nLen,SvStream &rStrm);
+sal_uLong SafeReadString(ByteString &rStr,sal_uInt16 nLen,SvStream &rStrm);
//MS has a (slightly) inaccurate view of how many twips
//are in the default letter size of a page
-const USHORT lLetterWidth = 12242;
-const USHORT lLetterHeight = 15842;
+const sal_uInt16 lLetterWidth = 12242;
+const sal_uInt16 lLetterHeight = 15842;
#endif
diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx
index 24a9c9a6970f..a4f80b77ca4a 100644
--- a/sw/source/filter/ww8/ww8struc.hxx
+++ b/sw/source/filter/ww8/ww8struc.hxx
@@ -44,19 +44,19 @@
# pragma pack(2)
#endif
-inline void Set_UInt8( BYTE *& p, UINT8 n )
+inline void Set_UInt8( sal_uInt8 *& p, sal_uInt8 n )
{
ByteToSVBT8( n, *(SVBT8*)p );
p+= 1;
}
-inline void Set_UInt16( BYTE *& p, UINT16 n )
+inline void Set_UInt16( sal_uInt8 *& p, sal_uInt16 n )
{
ShortToSVBT16( n, *(SVBT16*)p );
p+= 2;
}
-inline void Set_UInt32( BYTE *& p, UINT32 n )
+inline void Set_UInt32( sal_uInt8 *& p, sal_uInt32 n )
{
UInt32ToSVBT32( n, *(SVBT32*)p );
p+= 4;
@@ -176,26 +176,26 @@ const WW8_CP WW8_CP_MAX = SAL_MAX_INT32;
struct WW8_STD
{
// Base part of STD:
- UINT16 sti : 12; // invariant style identifier
- UINT16 fScratch : 1; // spare field for any temporary use,
+ sal_uInt16 sti : 12; // invariant style identifier
+ sal_uInt16 fScratch : 1; // spare field for any temporary use,
// always reset back to zero!
- UINT16 fInvalHeight : 1; // PHEs of all text with this style are wrong
- UINT16 fHasUpe : 1; // UPEs have been generated
- UINT16 fMassCopy : 1; // std has been mass-copied; if unused at
+ sal_uInt16 fInvalHeight : 1; // PHEs of all text with this style are wrong
+ sal_uInt16 fHasUpe : 1; // UPEs have been generated
+ sal_uInt16 fMassCopy : 1; // std has been mass-copied; if unused at
// save time, style should be deleted
- UINT16 sgc : 4; // style type code
- UINT16 istdBase : 12; // base style
- UINT16 cupx : 4; // # of UPXs (and UPEs)
- UINT16 istdNext : 12; // next style
- UINT16 bchUpe; // offset to end of upx's, start of upe's
+ sal_uInt16 sgc : 4; // style type code
+ sal_uInt16 istdBase : 12; // base style
+ sal_uInt16 cupx : 4; // # of UPXs (and UPEs)
+ sal_uInt16 istdNext : 12; // next style
+ sal_uInt16 bchUpe; // offset to end of upx's, start of upe's
//-------- jetzt neu:
// ab Ver8 gibts zwei Felder mehr:
- UINT16 fAutoRedef : 1; /* auto redefine style when appropriate */
- UINT16 fHidden : 1; /* hidden from UI? */
- UINT16 : 14; /* unused bits */
+ sal_uInt16 fAutoRedef : 1; /* auto redefine style when appropriate */
+ sal_uInt16 fHidden : 1; /* hidden from UI? */
+ sal_uInt16 : 14; /* unused bits */
// Variable length part of STD:
- // UINT8 stzName[2]; /* sub-names are separated by chDelimStyle
+ // sal_uInt8 stzName[2]; /* sub-names are separated by chDelimStyle
// char grupx[];
// the UPEs are not stored on the file; they are a cache of the based-on
// chain
@@ -207,17 +207,17 @@ struct WW8_STD
struct WW8_FFN_BASE // Font Descriptor
{
// ab Ver6
- BYTE cbFfnM1; // 0x0 total length of FFN - 1.
+ sal_uInt8 cbFfnM1; // 0x0 total length of FFN - 1.
- BYTE prg: 2; // 0x1:03 pitch request
- BYTE fTrueType : 1; // 0x1:04 when 1, font is a TrueType font
+ sal_uInt8 prg: 2; // 0x1:03 pitch request
+ sal_uInt8 fTrueType : 1; // 0x1:04 when 1, font is a TrueType font
// 0x1:08 reserved
- BYTE ff : 3; // 0x1:70 font family id
+ sal_uInt8 ff : 3; // 0x1:70 font family id
// 0x1:80 reserved
short wWeight; // 0x2 base weight of font
- BYTE chs; // 0x4 character set identifier
- BYTE ibszAlt; // 0x5 index into ffn.szFfn to the name of the alternate font
+ sal_uInt8 chs; // 0x4 character set identifier
+ sal_uInt8 ibszAlt; // 0x5 index into ffn.szFfn to the name of the alternate font
};
/** Hiermit arbeiten wir im Parser (und Dumper)
@@ -239,14 +239,14 @@ struct WW8_FFN : public WW8_FFN_BASE
struct WW8_BRCVer6 // alter Border Code
{
SVBT16 aBits1;
-// UINT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
+// sal_uInt16 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.
-// UINT16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
-// UINT16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
-// UINT16 ico : 5; // 07C0 color code (see chp.ico)
-// UINT16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
+// sal_uInt16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
+// sal_uInt16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
+// sal_uInt16 ico : 5; // 07C0 color code (see chp.ico)
+// sal_uInt16 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.
};
@@ -255,14 +255,14 @@ class WW8_BRC // Border Code
public:
SVBT16 aBits1;
SVBT16 aBits2;
-// UINT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
+// sal_uInt16 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.
-// UINT16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
-// UINT16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
-// UINT16 ico : 5; // 07C0 color code (see chp.ico)
-// UINT16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
+// sal_uInt16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
+// sal_uInt16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
+// sal_uInt16 ico : 5; // 07C0 color code (see chp.ico)
+// sal_uInt16 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.
WW8_BRC()
{
@@ -270,7 +270,7 @@ public:
memset(aBits2, 0, sizeof(aBits2));
}
short DetermineBorderProperties (bool bVer67, short *pSpace=0,
- BYTE *pCol=0, short *pIdx=0) const;
+ sal_uInt8 *pCol=0, short *pIdx=0) const;
bool IsEmpty(bool bVer67) const;
bool IsZeroed(bool bVer67) const;
bool IsBlank() const;
@@ -286,9 +286,9 @@ enum BRC_Sides
class WW8_BordersSO // for StarOffice-Border Code
{
public:
- USHORT mnOut;
- USHORT mnIn;
- USHORT mnDist;
+ sal_uInt16 mnOut;
+ sal_uInt16 mnIn;
+ sal_uInt16 mnDist;
public:
enum eBorderCode
{
@@ -307,24 +307,24 @@ and are accessible through the Typography tab of the Tools/Options dialog.
class WW8DopTypography
{
public:
- void ReadFromMem(BYTE *&pData);
- void WriteToMem(BYTE *&pData) const;
+ void ReadFromMem(sal_uInt8 *&pData);
+ void WriteToMem(sal_uInt8 *&pData) const;
//Maps what I think is the language this is to affect to the OOo language
- USHORT GetConvertedLang() const;
+ sal_uInt16 GetConvertedLang() const;
- UINT16 fKerningPunct : 1; // true if we're kerning punctuation
- UINT16 iJustification : 2; // Kinsoku method of justification:
+ sal_uInt16 fKerningPunct : 1; // true if we're kerning punctuation
+ sal_uInt16 iJustification : 2; // Kinsoku method of justification:
// 0 = always expand
// 1 = compress punctuation
// 2 = compress punctuation and kana.
- UINT16 iLevelOfKinsoku : 2; // Level of Kinsoku:
+ sal_uInt16 iLevelOfKinsoku : 2; // Level of Kinsoku:
// 0 = Level 1
// 1 = Level 2
// 2 = Custom
- UINT16 f2on1 : 1; // 2-page-on-1 feature is turned on.
- UINT16 reserved1 : 4; // in 97 its marked as reserved BUT
- UINT16 reserved2 : 6; // reserved ?
+ sal_uInt16 f2on1 : 1; // 2-page-on-1 feature is turned on.
+ sal_uInt16 reserved1 : 4; // in 97 its marked as reserved BUT
+ sal_uInt16 reserved2 : 6; // reserved ?
//we find that the following applies,
//2 == Japanese
//4 == Chinese (VR...
@@ -339,8 +339,8 @@ public:
static const sal_Unicode * GetJapanNotBeginLevel1();
static const sal_Unicode * GetJapanNotEndLevel1();
- INT16 cchFollowingPunct; // length of rgxchFPunct
- INT16 cchLeadingPunct; // length of rgxchLPunct
+ sal_Int16 cchFollowingPunct; // length of rgxchFPunct
+ sal_Int16 cchLeadingPunct; // length of rgxchLPunct
// array of characters that should never appear at the start of a line
sal_Unicode rgxchFPunct[nMaxFollowing];
@@ -378,39 +378,39 @@ struct WW8_DOGRID
struct WW8_PIC
{
- INT32 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.
- UINT16 cbHeader; // 0x4 number of bytes in the PIC (to allow for future expansion).
+ sal_Int32 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.
+ sal_uInt16 cbHeader; // 0x4 number of bytes in the PIC (to allow for future expansion).
struct {
- INT16 mm; // 0x6 int
- INT16 xExt; // 0x8 int
- INT16 yExt; // 0xa int
- INT16 hMF; // 0xc int
+ sal_Int16 mm; // 0x6 int
+ sal_Int16 xExt; // 0x8 int
+ sal_Int16 yExt; // 0xa int
+ sal_Int16 hMF; // 0xc int
}MFP;
-// BYTE bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
- BYTE rcWinMF[14]; // 0xe rc (rectangle - 8 bytes) rect for window origin
+// sal_uInt8 bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
+ sal_uInt8 rcWinMF[14]; // 0xe rc (rectangle - 8 bytes) rect for window origin
// and extents when metafile is stored -- ignored if 0
- INT16 dxaGoal; // 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
- INT16 dyaGoal; // 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
- UINT16 mx; // 0x20 horizontal scaling factor supplied by user in .1% units.
- UINT16 my; // 0x22 vertical scaling factor supplied by user in .1% units.
- INT16 dxaCropLeft; // 0x24 the amount the picture has been cropped on the left in twips.
- INT16 dyaCropTop; // 0x26 the amount the picture has been cropped on the top in twips.
- INT16 dxaCropRight; // 0x28 the amount the picture has been cropped on the right in twips.
- INT16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
- INT16 brcl : 4; // 000F Obsolete, superseded by brcTop, etc. In
- INT16 fFrameEmpty : 1; // 0010 picture consists of a single frame
- INT16 fBitmap : 1; // 0020 ==1, when picture is just a bitmap
- INT16 fDrawHatch : 1; // 0040 ==1, when picture is an active OLE object
- INT16 fError : 1; // 0080 ==1, when picture is just an error message
- INT16 bpp : 8; // FF00 bits per pixel, 0 = unknown
+ sal_Int16 dxaGoal; // 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
+ sal_Int16 dyaGoal; // 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
+ sal_uInt16 mx; // 0x20 horizontal scaling factor supplied by user in .1% units.
+ sal_uInt16 my; // 0x22 vertical scaling factor supplied by user in .1% units.
+ sal_Int16 dxaCropLeft; // 0x24 the amount the picture has been cropped on the left in twips.
+ sal_Int16 dyaCropTop; // 0x26 the amount the picture has been cropped on the top in twips.
+ sal_Int16 dxaCropRight; // 0x28 the amount the picture has been cropped on the right in twips.
+ sal_Int16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
+ sal_Int16 brcl : 4; // 000F Obsolete, superseded by brcTop, etc. In
+ sal_Int16 fFrameEmpty : 1; // 0010 picture consists of a single frame
+ sal_Int16 fBitmap : 1; // 0020 ==1, when picture is just a bitmap
+ sal_Int16 fDrawHatch : 1; // 0040 ==1, when picture is an active OLE object
+ sal_Int16 fError : 1; // 0080 ==1, when picture is just an error message
+ sal_Int16 bpp : 8; // FF00 bits per pixel, 0 = unknown
WW8_BRC rgbrc[4];
// BRC brcTop; // 0x2e specification for border above picture
// BRC brcLeft; // 0x30 specification for border to the left
// BRC brcBottom; // 0x32 specification for border below picture
// BRC brcRight; // 0x34 specification for border to the right
- INT16 dxaOrigin; // 0x36 horizontal offset of hand annotation origin
- INT16 dyaOrigin; // 0x38 vertical offset of hand annotation origin
-// BYTE rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
+ sal_Int16 dxaOrigin; // 0x36 horizontal offset of hand annotation origin
+ sal_Int16 dyaOrigin; // 0x38 vertical offset of hand annotation origin
+// sal_uInt8 rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
};
struct WW8_PIC_SHADOW
@@ -450,26 +450,26 @@ struct WW8_PIC_SHADOW
struct WW8_TBD
{
SVBT8 aBits1;
-// BYTE jc : 3; // 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
-// BYTE tlc : 3; // 0x38 tab leader code: 0=no leader, 1=dotted leader,
+// sal_uInt8 jc : 3; // 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
+// sal_uInt8 tlc : 3; // 0x38 tab leader code: 0=no leader, 1=dotted leader,
// 2=hyphenated leader, 3=single line leader, 4=heavy line leader
// * int :2 C0 reserved
};
struct WW8_TCell // hiermit wird weitergearbeitet (entspricht weitestgehend dem Ver8-Format)
{
- BYTE bFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
- BYTE bMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell.
- BYTE bVertical : 1;// set to 1 when cell has vertical text flow
- BYTE bBackward : 1;// for a vertical table cell, text flow is bottom to top when 1 and is bottom to top when 0.
- BYTE bRotateFont : 1;// set to 1 when cell has rotated characters (i.e. uses @font)
- BYTE bVertMerge : 1;// set to 1 when cell is vertically merged with the cell(s) above and/or below. When cells are vertically merged, the display area of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell (the cell with fVertRestart set to 1), and all other vertically merged cells (those with fVertRestart set to 0) must be empty. Cells can only be merged vertically if their left and right boundaries are (nearly) identical (i.e. if corresponding entries in rgdxaCenter of the table rows differ by at most 3).
- BYTE bVertRestart : 1;// set to 1 when the cell is the first of a set of vertically merged cells. The contents of a cell with fVertStart set to 1 are displayed in the consolidated area belonging to the entire set of vertically merged cells. Vertically merged cells with fVertRestart set to 0 must be empty.
- BYTE nVertAlign : 2;// specifies the alignment of the cell contents relative to text flow (e.g. in a cell with bottom to top text flow and bottom vertical alignment, the text is shifted horizontally to match the cell's right boundary):
+ sal_uInt8 bFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
+ sal_uInt8 bMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell.
+ sal_uInt8 bVertical : 1;// set to 1 when cell has vertical text flow
+ sal_uInt8 bBackward : 1;// for a vertical table cell, text flow is bottom to top when 1 and is bottom to top when 0.
+ sal_uInt8 bRotateFont : 1;// set to 1 when cell has rotated characters (i.e. uses @font)
+ sal_uInt8 bVertMerge : 1;// set to 1 when cell is vertically merged with the cell(s) above and/or below. When cells are vertically merged, the display area of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell (the cell with fVertRestart set to 1), and all other vertically merged cells (those with fVertRestart set to 0) must be empty. Cells can only be merged vertically if their left and right boundaries are (nearly) identical (i.e. if corresponding entries in rgdxaCenter of the table rows differ by at most 3).
+ sal_uInt8 bVertRestart : 1;// set to 1 when the cell is the first of a set of vertically merged cells. The contents of a cell with fVertStart set to 1 are displayed in the consolidated area belonging to the entire set of vertically merged cells. Vertically merged cells with fVertRestart set to 0 must be empty.
+ sal_uInt8 nVertAlign : 2;// specifies the alignment of the cell contents relative to text flow (e.g. in a cell with bottom to top text flow and bottom vertical alignment, the text is shifted horizontally to match the cell's right boundary):
// 0 top
// 1 center
// 2 bottom
- UINT16 fUnused : 7;// reserved - nicht loeschen: macht das UINT16 voll !!
+ sal_uInt16 fUnused : 7;// reserved - nicht loeschen: macht das sal_uInt16 voll !!
WW8_BRC rgbrc[4]; // border codes
//notational convenience for referring to brcTop, brcLeft, etc fields.
@@ -485,9 +485,9 @@ struct WW8_TCellVer6 // wird aus der Datei gelesen
{
SVBT8 aBits1Ver6;
SVBT8 aBits2Ver6;
-// UINT16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
-// UINT16 fMerged : 1; // 0002 set to 1 when cell has been merged with preceding cell.
-// UINT16 fUnused : 14; // FFFC reserved
+// sal_uInt16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
+// sal_uInt16 fMerged : 1; // 0002 set to 1 when cell has been merged with preceding cell.
+// sal_uInt16 fUnused : 14; // FFFC reserved
WW8_BRCVer6 rgbrcVer6[4];
// notational convenience for referring to brcTop, brcLeft, etc fields:
// BRC brcTop; // specification of the top border of a table cell
@@ -509,36 +509,36 @@ struct WW8_TCellVer8 // wird aus der Datei gelesen
struct WW8_SHD // struct SHD fehlt in der Beschreibung
{
private:
- UINT16 maBits;
-// UINT16 nFore : 5; // 0x001f ForegroundColor
-// UINT16 nBack : 5; // 0x03e0 BackgroundColor
-// UINT16 nStyle : 5; // 0x7c00 Percentage and Style
-// UINT16 nDontKnow : 1; // 0x8000 ??? ab Ver8: ebenfalls fuer Style
+ sal_uInt16 maBits;
+// sal_uInt16 nFore : 5; // 0x001f ForegroundColor
+// sal_uInt16 nBack : 5; // 0x03e0 BackgroundColor
+// sal_uInt16 nStyle : 5; // 0x7c00 Percentage and Style
+// sal_uInt16 nDontKnow : 1; // 0x8000 ??? ab Ver8: ebenfalls fuer Style
public:
WW8_SHD() : maBits(0) {}
- BYTE GetFore() const { return (BYTE)( maBits & 0x1f); }
- BYTE GetBack() const { return (BYTE)((maBits >> 5 ) & 0x1f); }
- BYTE GetStyle(bool bVer67) const
- { return (BYTE)((maBits >> 10) & ( bVer67 ? 0x1f : 0x3f ) ); }
+ sal_uInt8 GetFore() const { return (sal_uInt8)( maBits & 0x1f); }
+ sal_uInt8 GetBack() const { return (sal_uInt8)((maBits >> 5 ) & 0x1f); }
+ sal_uInt8 GetStyle(bool bVer67) const
+ { return (sal_uInt8)((maBits >> 10) & ( bVer67 ? 0x1f : 0x3f ) ); }
- UINT16 GetValue() const { return maBits; }
+ sal_uInt16 GetValue() const { return maBits; }
- void SetValue(UINT16 nVal) { maBits = nVal; }
+ void SetValue(sal_uInt16 nVal) { maBits = nVal; }
void SetWWValue(SVBT16 nVal) { maBits = SVBT16ToShort(nVal); }
- void SetFore(BYTE nVal)
+ void SetFore(sal_uInt8 nVal)
{
maBits &= 0xffe0;
maBits |= (nVal & 0x1f);
}
- void SetBack(BYTE nVal)
+ void SetBack(sal_uInt8 nVal)
{
maBits &= 0xfc1f;
maBits |= (nVal & 0x1f) << 5;
}
- void SetStyle(bool bVer67, BYTE nVal)
+ void SetStyle(bool bVer67, sal_uInt8 nVal)
{
if (bVer67)
{
@@ -560,29 +560,29 @@ struct WW8_ANLV
SVBT8 cbTextBefore; // 1 offset into anld.rgch limit of prefix text
SVBT8 cbTextAfter; // 2
SVBT8 aBits1;
-// BYTE jc : 2; // 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify
-// BYTE fPrev : 1; // 0x04 when ==1, include previous levels
-// BYTE fHang : 1; // 0x08 when ==1, number will be displayed using a hanging indent
-// BYTE fSetBold : 1; // 0x10 when ==1, boldness of number will be determined by anld.fBold.
-// BYTE fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic
-// BYTE fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not.
-// BYTE fSetCaps : 1; // 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not
+// sal_uInt8 jc : 2; // 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify
+// sal_uInt8 fPrev : 1; // 0x04 when ==1, include previous levels
+// sal_uInt8 fHang : 1; // 0x08 when ==1, number will be displayed using a hanging indent
+// sal_uInt8 fSetBold : 1; // 0x10 when ==1, boldness of number will be determined by anld.fBold.
+// sal_uInt8 fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic
+// sal_uInt8 fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not.
+// sal_uInt8 fSetCaps : 1; // 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not
SVBT8 aBits2;
-// BYTE fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not.
-// BYTE fSetKul : 1; // 0x02 when ==1, anld.kul will determine the underlining state of the autonumber.
-// BYTE fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character
-// BYTE fBold : 1; // 0x08 determines boldness of autonumber when anld.fSetBold == 1.
-// BYTE fItalic : 1; // 0x10 determines italicness of autonumber when anld.fSetItalic == 1.
-// BYTE fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1.
-// BYTE fCaps : 1; // 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1.
-// BYTE fStrike : 1; // 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1.
+// sal_uInt8 fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not.
+// sal_uInt8 fSetKul : 1; // 0x02 when ==1, anld.kul will determine the underlining state of the autonumber.
+// sal_uInt8 fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character
+// sal_uInt8 fBold : 1; // 0x08 determines boldness of autonumber when anld.fSetBold == 1.
+// sal_uInt8 fItalic : 1; // 0x10 determines italicness of autonumber when anld.fSetItalic == 1.
+// sal_uInt8 fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1.
+// sal_uInt8 fCaps : 1; // 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1.
+// sal_uInt8 fStrike : 1; // 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1.
SVBT8 aBits3;
-// BYTE kul : 3; // 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1.
-// BYTE ico : 5; // 0xF1 color of autonumber
+// sal_uInt8 kul : 3; // 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1.
+// sal_uInt8 ico : 5; // 0xF1 color of autonumber
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).
@@ -594,7 +594,7 @@ struct WW8_ANLD
SVBT8 fNumberAcross; // 0x11 number across cells in table rows(instead of down)
SVBT8 fRestartHdn; // 0x12 restart heading number on section boundary
SVBT8 fSpareX; // 0x13 unused( should be 0)
- BYTE rgchAnld[32]; // 0x14 characters displayed before/after autonumber
+ sal_uInt8 rgchAnld[32]; // 0x14 characters displayed before/after autonumber
};
struct WW8_OLST
@@ -604,7 +604,7 @@ struct WW8_OLST
SVBT8 fSpareOlst2; // 0x91 reserved
SVBT8 fSpareOlst3; // 0x92 reserved
SVBT8 fSpareOlst4; // 0x93 reserved
- BYTE rgch[64]; // 0x94 array of 64 chars text before/after number
+ sal_uInt8 rgch[64]; // 0x94 array of 64 chars text before/after number
};
// cbOLST is 212(decimal), D4(hex).
@@ -671,8 +671,8 @@ struct WW8_DO
SVBT8 by; // 5 y position relative to anchor CP
SVBT16 dhgt; // 6 height of DO
SVBT16 aBits1;
-// UINT16 fAnchorLock : 1; // 8 1 if the DO anchor is locked
-// BYTE[] rgdp; // 0xa variable length array of drawing primitives
+// sal_uInt16 fAnchorLock : 1; // 8 1 if the DO anchor is locked
+// sal_uInt8[] rgdp; // 0xa variable length array of drawing primitives
};
struct WW8_DPHEAD
@@ -714,16 +714,16 @@ struct WW8_DP_FILL
struct WW8_DP_LINEEND
{
SVBT16 aStartBits;
-// UINT16 eppsStart : 2; // Start EndPoint Property Style
+// sal_uInt16 eppsStart : 2; // Start EndPoint Property Style
// 0=None, 1=Hollow, 2=Filled
-// UINT16 eppwStart : 2; // Start EndPoint Property Weight
-// UINT16 epplStart : 2; // Start EndPoint Property length
-// UINT16 dummyStart : 10; // Alignment
+// sal_uInt16 eppwStart : 2; // Start EndPoint Property Weight
+// sal_uInt16 epplStart : 2; // Start EndPoint Property length
+// sal_uInt16 dummyStart : 10; // Alignment
SVBT16 aEndBits;
-// UINT16 eppsEnd : 2; // End EndPoint Property Style
-// UINT16 eppwEnd : 2; // End EndPoint Property Weight
-// UINT16 epplEnd : 2; // End EndPoint Property length
-// UINT16 dummyEnd : 10; // Alignment
+// sal_uInt16 eppsEnd : 2; // End EndPoint Property Style
+// sal_uInt16 eppwEnd : 2; // End EndPoint Property Weight
+// sal_uInt16 epplEnd : 2; // End EndPoint Property length
+// sal_uInt16 dummyEnd : 10; // Alignment
};
struct WW8_DP_LINE
@@ -744,8 +744,8 @@ struct WW8_DP_TXTBOX
WW8_DP_FILL aFill;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fRoundCorners : 1; //0x24 0001 1 if the textbox has rounded corners
-// UINT16 zaShape : 15; // 0x24 000e REVIEW davebu
+// sal_uInt16 fRoundCorners : 1; //0x24 0001 1 if the textbox has rounded corners
+// sal_uInt16 zaShape : 15; // 0x24 000e REVIEW davebu
SVBT16 dzaInternalMargin; // 0x26 REVIEW davebu
};
@@ -755,8 +755,8 @@ struct WW8_DP_RECT
WW8_DP_FILL aFill;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fRoundCorners : 1; // 0x24 0001 1 if the textbox has rounded corners
-// UINT16 zaShape : 15; // 0x24 000e REVIEW davebu
+// sal_uInt16 fRoundCorners : 1; // 0x24 0001 1 if the textbox has rounded corners
+// sal_uInt16 zaShape : 15; // 0x24 000e REVIEW davebu
};
struct WW8_DP_ARC
@@ -766,8 +766,8 @@ struct WW8_DP_ARC
WW8_DP_SHADOW aShd;
SVBT8 fLeft; // 0x24 00ff REVIEW davebu
SVBT8 fUp; // 0x24 ff00 REVIEW davebu
-// UINT16 fLeft : 8; // 0x24 00ff REVIEW davebu
-// UINT16 fUp : 8; // 0x24 ff00 REVIEW davebu
+// sal_uInt16 fLeft : 8; // 0x24 00ff REVIEW davebu
+// sal_uInt16 fUp : 8; // 0x24 ff00 REVIEW davebu
};
struct WW8_DP_ELIPSE
@@ -784,8 +784,8 @@ struct WW8_DP_POLYLINE
WW8_DP_LINEEND aEpp;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fPolygon : 1; // 0x28 0001 1 if this is a polygon
-// UINT16 cpt : 15; // 0x28 00fe count of points
+// sal_uInt16 fPolygon : 1; // 0x28 0001 1 if this is a polygon
+// sal_uInt16 cpt : 15; // 0x28 00fe count of points
// short xaFirst; // 0x2a These are the endpoints of the first line.
// short yaFirst; // 0x2c
// short xaEnd; // 0x2e
@@ -808,9 +808,9 @@ struct WW8_DP_CALLOUT_TXTBOX
struct WW8_PCD
{
SVBT8 aBits1;
-// BYTE fNoParaLast : 1; // when 1, means that piece contains no end of paragraph marks.
-// BYTE fPaphNil : 1; // used internally by Word
-// BYTE fCopied : 1; // used internally by Word
+// sal_uInt8 fNoParaLast : 1; // when 1, means that piece contains no end of paragraph marks.
+// sal_uInt8 fPaphNil : 1; // used internally by Word
+// sal_uInt8 fCopied : 1; // used internally by Word
// * int :5
SVBT8 aBits2; // fn int:8, used internally by Word
SVBT32 fc; // file offset of beginning of piece. The size of the
@@ -861,14 +861,14 @@ struct WW67_ATRD // fuer die 6/7-Version
struct WW8_TablePos
{
- INT16 nSp26;
- INT16 nSp27;
- INT16 nLeMgn;
- INT16 nRiMgn;
- INT16 nUpMgn;
- INT16 nLoMgn;
- BYTE nSp29;
- BYTE nSp37;
+ sal_Int16 nSp26;
+ sal_Int16 nSp27;
+ sal_Int16 nLeMgn;
+ sal_Int16 nRiMgn;
+ sal_Int16 nUpMgn;
+ sal_Int16 nLoMgn;
+ sal_uInt8 nSp29;
+ sal_uInt8 nSp37;
};
struct WW8_FSPA
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 2b9e95d10c26..21c9a3b93c75 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -667,8 +667,8 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
// create redline (using pRedlineData which gets copied in SwRedline())
SwRedlineData* pRedlineData = ConvertRedline(pRedlineInfo, pDoc);
SwRedline* pRedline =
- new SwRedline( pRedlineData, *aPaM.GetPoint(), TRUE,
- !pRedlineInfo->bMergeLastParagraph, FALSE );
+ new SwRedline( pRedlineData, *aPaM.GetPoint(), sal_True,
+ !pRedlineInfo->bMergeLastParagraph, sal_False );
// set mark
if( aPaM.HasMark() )
@@ -680,7 +680,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
// set content node (if necessary)
if (NULL != pRedlineInfo->pContentIndex)
{
- ULONG nPoint = aPaM.GetPoint()->nNode.GetIndex();
+ sal_uLong nPoint = aPaM.GetPoint()->nNode.GetIndex();
if( nPoint < pRedlineInfo->pContentIndex->GetIndex() ||
nPoint > pRedlineInfo->pContentIndex->GetNode().EndOfSectionIndex() )
pRedline->SetContentIdx(pRedlineInfo->pContentIndex);
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 92b0c08e3b8d..98ae19039002 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -121,8 +121,8 @@ void lcl_EnsureValidPam( SwPaM& rPam )
// else: point was already valid
// if mark is invalid, we delete it
- if( ( rPam.GetCntntNode( FALSE ) == NULL ) ||
- ( rPam.GetCntntNode( FALSE ) != rPam.GetMark()->nContent.GetIdxReg() ) )
+ if( ( rPam.GetCntntNode( sal_False ) == NULL ) ||
+ ( rPam.GetCntntNode( sal_False ) != rPam.GetMark()->nContent.GetIdxReg() ) )
{
rPam.DeleteMark();
}
@@ -416,7 +416,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
String aDefOutlStyleNames[ MAXLEVEL ];
{
String sStyleName;
- for ( BYTE i = 0; i < MAXLEVEL; ++i )
+ for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
sStyleName =
SwStyleNameMapper::GetProgName( static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i),
@@ -431,7 +431,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
SwTxtFmtColl* aCreatedDefaultOutlineStyles[ MAXLEVEL ];
{
- for ( BYTE i = 0; i < MAXLEVEL; ++i )
+ for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
aOutlineLevelAssigned[ i ] = false;
aCreatedDefaultOutlineStyles[ i ] = 0L;
@@ -441,7 +441,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
// determine, which outline level has already a style assigned and
// which of the default outline styles is created.
const SwTxtFmtColls& rColls = *(_rDoc.GetTxtFmtColls());
- for ( USHORT n = 1; n < rColls.Count(); ++n )
+ for ( sal_uInt16 n = 1; n < rColls.Count(); ++n )
{
SwTxtFmtColl* pColl = rColls[ n ];
//if ( pColl->GetOutlineLevel() != NO_NUMBERING ) //#outline level zhaojianwei
@@ -451,7 +451,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
aOutlineLevelAssigned[ pColl->GetAssignedOutlineStyleLevel() ] = true;//<-end,zhaojianwei
}
- for ( BYTE i = 0; i < MAXLEVEL; ++i )
+ for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
if ( aCreatedDefaultOutlineStyles[ i ] == 0L &&
pColl->GetName() == aDefOutlStyleNames[i] )
@@ -465,7 +465,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
// assign already created default outline style to outline level, which
// doesn't have a style assigned to it.
const SwNumRule* pOutlineRule = _rDoc.GetOutlineNumRule();
- for ( BYTE i = 0; i < MAXLEVEL; ++i )
+ for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
// --> OD 2007-01-11 #i73361#
// Do not change assignment of already created default outline style
@@ -482,7 +482,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
// apply outline numbering rule, if none is set.
const SfxPoolItem& rItem =
- aCreatedDefaultOutlineStyles[ i ]->GetFmtAttr( RES_PARATR_NUMRULE, FALSE );
+ aCreatedDefaultOutlineStyles[ i ]->GetFmtAttr( RES_PARATR_NUMRULE, sal_False );
if ( static_cast<const SwNumRuleItem&>(rItem).GetValue().Len() == 0 )
{
SwNumRuleItem aItem( pOutlineRule->GetName() );
@@ -535,7 +535,7 @@ void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SwDoc& _rDoc )
// <--
-ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const String & rName )
+sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const String & rName )
{
// Get service factory
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
@@ -665,7 +665,7 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S
// Note: Text documents read via the binary filter are also finally
// read using the OpenOffice.org file format. Thus, e.g. for text
// documents in StarOffice 5.2 binary file format this property
- // will be TRUE.
+ // will be sal_True.
{ "TextDocInOOoFileFormat", sizeof("TextDocInOOoFileFormat")-1, 0,
&::getBooleanCppuType(),
beans::PropertyAttribute::MAYBEVOID, 0 },
@@ -976,9 +976,9 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S
// Notify math objects
if( bInsertMode )
- rDoc.PrtOLENotify( FALSE );
+ rDoc.PrtOLENotify( sal_False );
else if ( rDoc.IsOLEPrtNotifyPending() )
- rDoc.PrtOLENotify( TRUE );
+ rDoc.PrtOLENotify( sal_True );
nRet = nRet ? nRet : (nWarn ? nWarn : (nWarn2 ? nWarn2 : nWarnRDF ) );
@@ -1036,7 +1036,7 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S
// <--
// Fix #i58251#: Unfortunately is the static default different to SO7 behaviour,
// so we have to set a dynamic default after importing SO7
- rDoc.SetDefault( SfxBoolItem( RES_ROW_SPLIT, FALSE ) );
+ rDoc.SetDefault( SfxBoolItem( RES_ROW_SPLIT, sal_False ) );
}
// <--
@@ -1081,7 +1081,7 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S
// read the sections of the document, which is equal to the medium.
// returns the count of it
-USHORT XMLReader::GetSectionList( SfxMedium& rMedium,
+sal_uInt16 XMLReader::GetSectionList( SfxMedium& rMedium,
SvStrings& rStrings ) const
{
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index 4107657e8554..1f64db9fdae8 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -539,17 +539,17 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
return 0;
}
-ULONG SwXMLWriter::WriteStorage()
+sal_uLong SwXMLWriter::WriteStorage()
{
return _Write();
}
-ULONG SwXMLWriter::WriteMedium( SfxMedium& aTargetMedium )
+sal_uLong SwXMLWriter::WriteMedium( SfxMedium& aTargetMedium )
{
return _Write( &aTargetMedium );
}
-ULONG SwXMLWriter::Write( SwPaM& rPaM, SfxMedium& rMed,
+sal_uLong SwXMLWriter::Write( SwPaM& rPaM, SfxMedium& rMed,
const String* pFileName )
{
return IsStgWriter()
diff --git a/sw/source/filter/xml/wrtxml.hxx b/sw/source/filter/xml/wrtxml.hxx
index b5dbe191776b..97e073a02f91 100644
--- a/sw/source/filter/xml/wrtxml.hxx
+++ b/sw/source/filter/xml/wrtxml.hxx
@@ -52,15 +52,15 @@ class SwXMLWriter : public StgWriter
using StgWriter::Write;
protected:
- virtual ULONG WriteStorage();
- virtual ULONG WriteMedium( SfxMedium& aTargetMedium );
+ virtual sal_uLong WriteStorage();
+ virtual sal_uLong WriteMedium( SfxMedium& aTargetMedium );
public:
SwXMLWriter( const String& rBaseURL );
virtual ~SwXMLWriter();
- virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 );
+ virtual sal_uLong Write( SwPaM&, SfxMedium&, const String* = 0 );
private:
diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx
index 5568995c5ca3..12a272e62bda 100644
--- a/sw/source/filter/xml/xmlexp.hxx
+++ b/sw/source/filter/xml/xmlexp.hxx
@@ -100,7 +100,7 @@ class SwXMLExport : public SvXMLExport
SwXMLTableInfo_Impl& rTblInfo );
void ExportTableLines( const SwTableLines& rLines,
SwXMLTableInfo_Impl& rTblInfo,
- USHORT nHeaderRows = 0 );
+ sal_uInt16 nHeaderRows = 0 );
virtual void _ExportMeta();
virtual void _ExportFontDecls();
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index a883f8dbae2a..279df96eb7cb 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -881,7 +881,7 @@ void SwXMLImport::endDocument( void )
if( !pPos->nContent.GetIndex() )
{
SwTxtNode* pCurrNd;
- ULONG nNodeIdx = pPos->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPos->nNode.GetIndex();
pDoc = pPaM->GetDoc();
DBG_ASSERT( pPos->nNode.GetNode().IsCntntNode(),
@@ -961,9 +961,9 @@ void SwXMLImport::endDocument( void )
// Notify math objects. If we are in the package filter this will
// be done by the filter object itself
if( IsInsertMode() )
- pDoc->PrtOLENotify( FALSE );
+ pDoc->PrtOLENotify( sal_False );
else if ( pDoc->IsOLEPrtNotifyPending() )
- pDoc->PrtOLENotify( TRUE );
+ pDoc->PrtOLENotify( sal_True );
}
// SJ: #i49801# -> now permitting repaints
@@ -1216,7 +1216,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
const PropertyValue* pValues = aConfigProps.getConstArray();
SvtSaveOptions aSaveOpt;
- BOOL bIsUserSetting = aSaveOpt.IsLoadUserSettings(),
+ sal_Bool bIsUserSetting = aSaveOpt.IsLoadUserSettings(),
bSet = bIsUserSetting;
// for some properties we don't want to use the application
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index adbaf90e11df..c7e50f9fe8b1 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -68,7 +68,7 @@ using uno::Any;
SvXMLImportItemMapper::SvXMLImportItemMapper(
SvXMLItemMapEntriesRef rMapEntries,
- USHORT nUnknWhich ) :
+ sal_uInt16 nUnknWhich ) :
mrMapEntries( rMapEntries ),
nUnknownWhich( nUnknWhich )
{
@@ -84,14 +84,14 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
const SvXMLUnitConverter& rUnitConverter,
const SvXMLNamespaceMap& rNamespaceMap ) const
{
- INT16 nAttr = xAttrList->getLength();
+ sal_Int16 nAttr = xAttrList->getLength();
SvXMLAttrContainerItem *pUnknownItem = 0;
- for( INT16 i=0; i < nAttr; i++ )
+ for( sal_Int16 i=0; i < nAttr; i++ )
{
const OUString& rAttrName = xAttrList->getNameByIndex( i );
OUString aLocalName, aPrefix, aNamespace;
- USHORT nPrefix =
+ sal_uInt16 nPrefix =
rNamespaceMap.GetKeyByAttrName( rAttrName, &aPrefix, &aLocalName,
&aNamespace );
if( XML_NAMESPACE_XMLNS == nPrefix )
@@ -110,7 +110,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
{
// first get item from itemset
const SfxPoolItem* pItem = 0;
- SfxItemState eState = rSet.GetItemState( pEntry->nWhichId, TRUE,
+ SfxItemState eState = rSet.GetItemState( pEntry->nWhichId, sal_True,
&pItem );
// if its not set, try the pool
@@ -121,7 +121,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
if(eState >= SFX_ITEM_DEFAULT && pItem)
{
SfxPoolItem *pNewItem = pItem->Clone();
- BOOL bPut = FALSE;
+ sal_Bool bPut = sal_False;
if( 0 == (pEntry->nMemberId&MID_SW_FLAG_SPECIAL_ITEM_IMPORT) )
{
@@ -161,7 +161,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
if( !pUnknownItem )
{
const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( nUnknownWhich, TRUE,
+ if( SFX_ITEM_SET == rSet.GetItemState( nUnknownWhich, sal_True,
&pItem ) )
{
SfxPoolItem *pNew = pItem->Clone();
@@ -198,7 +198,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
/** this method is called for every item that has the
MID_SW_FLAG_SPECIAL_ITEM_IMPORT flag set */
-BOOL
+sal_Bool
SvXMLImportItemMapper::handleSpecialItem( const SvXMLItemMapEntry& /*rEntry*/,
SfxPoolItem& /*rItem*/,
SfxItemSet& /*rSet*/,
@@ -207,19 +207,19 @@ SvXMLImportItemMapper::handleSpecialItem( const SvXMLItemMapEntry& /*rEntry*/,
const SvXMLNamespaceMap& /*rNamespaceMap*/ ) const
{
DBG_ERROR( "unsuported special item in xml import" );
- return FALSE;
+ return sal_False;
}
/** this method is called for every item that has the
MID_SW_FLAG_NO_ITEM_IMPORT flag set */
-BOOL SvXMLImportItemMapper::handleNoItem( const SvXMLItemMapEntry& /*rEntry*/,
+sal_Bool SvXMLImportItemMapper::handleNoItem( const SvXMLItemMapEntry& /*rEntry*/,
SfxItemSet& /*rSet*/,
const OUString& /*rValue*/,
const SvXMLUnitConverter& /*rUnitConverter*/,
const SvXMLNamespaceMap& /*rNamespaceMap*/ ) const
{
DBG_ERROR( "unsuported no item in xml import" );
- return FALSE;
+ return sal_False;
}
void SvXMLImportItemMapper::finished( SfxItemSet& ) const
@@ -393,7 +393,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
if( nX < 0 ) nX *= -1;
if( nY < 0 ) nY *= -1;
- pShadow->SetWidth( static_cast< USHORT >( (nX + nY) >> 1 ) );
+ pShadow->SetWidth( static_cast< sal_uInt16 >( (nX + nY) >> 1 ) );
}
}
}
@@ -598,12 +598,12 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
switch( nMemberId )
{
case MID_BREAK_BEFORE:
- pFmtBreak->SetValue( static_cast< USHORT >((eEnum == 1) ?
+ pFmtBreak->SetValue( static_cast< sal_uInt16 >((eEnum == 1) ?
SVX_BREAK_COLUMN_BEFORE :
SVX_BREAK_PAGE_BEFORE) );
break;
case MID_BREAK_AFTER:
- pFmtBreak->SetValue( static_cast< USHORT >((eEnum == 1) ?
+ pFmtBreak->SetValue( static_cast< sal_uInt16 >((eEnum == 1) ?
SVX_BREAK_COLUMN_AFTER :
SVX_BREAK_PAGE_AFTER) );
break;
@@ -785,7 +785,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
sal_Int32 nVal;
bOk = rUnitConverter.convertNumber( nVal, rValue, 0, USHRT_MAX );
if( bOk )
- pPageDesc->SetNumOffset( (USHORT)nVal );
+ pPageDesc->SetNumOffset( (sal_uInt16)nVal );
}
}
break;
diff --git a/sw/source/filter/xml/xmlimpit.hxx b/sw/source/filter/xml/xmlimpit.hxx
index f9f9e746e126..703c0372392a 100644
--- a/sw/source/filter/xml/xmlimpit.hxx
+++ b/sw/source/filter/xml/xmlimpit.hxx
@@ -47,11 +47,11 @@ class SvXMLImportItemMapper
{
protected:
SvXMLItemMapEntriesRef mrMapEntries;
- USHORT nUnknownWhich;
+ sal_uInt16 nUnknownWhich;
public:
SvXMLImportItemMapper( SvXMLItemMapEntriesRef rMapEntries ,
- USHORT nUnknWhich=USHRT_MAX );
+ sal_uInt16 nUnknWhich=USHRT_MAX );
virtual ~SvXMLImportItemMapper();
/** fills the given itemset with the attributes in the given list */
@@ -62,7 +62,7 @@ public:
/** this method is called for every item that has the
MID_SW_FLAG_SPECIAL_ITEM_IMPORT flag set */
- virtual BOOL handleSpecialItem( const SvXMLItemMapEntry& rEntry,
+ virtual sal_Bool handleSpecialItem( const SvXMLItemMapEntry& rEntry,
SfxPoolItem& rItem,
SfxItemSet& rSet,
const ::rtl::OUString& rValue,
@@ -71,7 +71,7 @@ public:
/** this method is called for every item that has the
MID_SW_FLAG_NO_ITEM_IMPORT flag set */
- virtual BOOL handleNoItem( const SvXMLItemMapEntry& rEntry,
+ virtual sal_Bool handleNoItem( const SvXMLItemMapEntry& rEntry,
SfxItemSet& rSet,
const ::rtl::OUString& rValue,
const SvXMLUnitConverter& rUnitConverter,
diff --git a/sw/source/filter/xml/xmlitem.cxx b/sw/source/filter/xml/xmlitem.cxx
index 76baffc198c1..bc040877cee6 100644
--- a/sw/source/filter/xml/xmlitem.cxx
+++ b/sw/source/filter/xml/xmlitem.cxx
@@ -35,7 +35,7 @@
using ::rtl::OUString;
using namespace ::com::sun::star;
-SvXMLItemSetContext::SvXMLItemSetContext( SvXMLImport& rImp, USHORT nPrfx,
+SvXMLItemSetContext::SvXMLItemSetContext( SvXMLImport& rImp, sal_uInt16 nPrfx,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList,
SfxItemSet& rISet,
@@ -55,7 +55,7 @@ SvXMLItemSetContext::~SvXMLItemSetContext()
{
}
-SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList )
{
@@ -77,7 +77,7 @@ SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( USHORT nPrefix,
CreateChildContext if the element matches an entry in the
SvXMLImportItemMapper with the mid flag MID_SW_FLAG_ELEMENT
*/
-SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( sal_uInt16 nPrefix,
const rtl::OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList >& /*xAttrList*/,
SfxItemSet& /*rItemSet*/,
diff --git a/sw/source/filter/xml/xmlitem.hxx b/sw/source/filter/xml/xmlitem.hxx
index 013afdb804b5..2d3e06bec48e 100644
--- a/sw/source/filter/xml/xmlitem.hxx
+++ b/sw/source/filter/xml/xmlitem.hxx
@@ -49,7 +49,7 @@ protected:
public:
- SvXMLItemSetContext( SvXMLImport& rImport, USHORT nPrfx,
+ SvXMLItemSetContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
SfxItemSet& rItemSet,
@@ -58,14 +58,14 @@ public:
virtual ~SvXMLItemSetContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
// This method is called from this instance implementation of
// CreateChildContext if the element matches an entry in the
// SvXMLImportItemMapper with the mid flag MID_SW_FLAG_ELEMENT_ITEM_IMPORT
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
SfxItemSet& rItemSet,
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index fa674798eef3..1a421e6ca5ba 100644
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@ -146,7 +146,7 @@ public:
const SvXMLUnitConverter& rUnitConv );
virtual ~SwXMLItemSetContext_Impl();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::uno::Reference< xml::sax::XAttributeList > & xAttrList,
SfxItemSet& rItemSet,
diff --git a/sw/source/filter/xml/xmlitmpr.cxx b/sw/source/filter/xml/xmlitmpr.cxx
index 6a92fa50efd5..0f9f05b1ab16 100644
--- a/sw/source/filter/xml/xmlitmpr.cxx
+++ b/sw/source/filter/xml/xmlitmpr.cxx
@@ -79,12 +79,12 @@ SvXMLItemMapEntry* SvXMLItemMapEntries::getByName( sal_uInt16 nNameSpace,
return (pMap->eLocalName != XML_TOKEN_INVALID) ? pMap : NULL;
}
-SvXMLItemMapEntry* SvXMLItemMapEntries::getByIndex( UINT16 nIndex ) const
+SvXMLItemMapEntry* SvXMLItemMapEntries::getByIndex( sal_uInt16 nIndex ) const
{
return &mpImpl->mpEntries[nIndex];
}
-UINT16 SvXMLItemMapEntries::getCount() const
+sal_uInt16 SvXMLItemMapEntries::getCount() const
{
return mpImpl->mnCount;
}
diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx
index 0d3adfd46c77..c337e231017a 100644
--- a/sw/source/filter/xml/xmlmeta.cxx
+++ b/sw/source/filter/xml/xmlmeta.cxx
@@ -113,8 +113,8 @@ static __FAR_DATA SvXMLTokenMapEntry aMetaStatAttrTokenMap[] =
struct statistic {
SvXMLTokenMapAttrs token;
const char* name;
- USHORT SwDocStat::* target16;
- ULONG SwDocStat::* target32; /* or 64, on LP64 platforms */
+ sal_uInt16 SwDocStat::* target16;
+ sal_uLong SwDocStat::* target32; /* or 64, on LP64 platforms */
};
static const struct statistic s_stats [] = {
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 3b55e6f81697..9180f910b09b 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -637,7 +637,7 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
pColumn->SetWidthOpt( nColAbsWidth, sal_False );
}
- ULONG nExpPos = 0;
+ sal_uLong nExpPos = 0;
if( rExpCols.Seek_Entry( pColumn, &nExpPos ) )
{
pColumn->SetStyleName(
@@ -1025,7 +1025,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
void SwXMLExport::ExportTableLines( const SwTableLines& rLines,
SwXMLTableInfo_Impl& rTblInfo,
- USHORT nHeaderRows )
+ sal_uInt16 nHeaderRows )
{
ASSERT( pTableLines && pTableLines->Count(),
"SwXMLExport::ExportTableLines: table columns infos missing" );
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index b83d5fcca0c0..397ac1bda534 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -2111,7 +2111,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
{
// default num format?
const SfxPoolItem* pItem = NULL;
- if( pBoxFmt2->GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem )
+ if( pBoxFmt2->GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem )
== SFX_ITEM_SET )
{
const SwTblBoxNumFormat* pNumFormat =
@@ -2166,7 +2166,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
// Solution: the number format will be removed,
// the cell gets the default text format.
const SfxPoolItem* pItem = NULL;
- if( pBoxFmt->GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem )
+ if( pBoxFmt->GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem )
== SFX_ITEM_SET )
{
const SwDoc* pDoc = pBoxFmt->GetDoc();
@@ -2842,10 +2842,10 @@ void SwXMLTableContext::MakeTable()
// 3) create new DDE table, and
SwDDETable* pDDETable = new SwDDETable( pTableNode->GetTable(),
- pFldType, FALSE );
+ pFldType, sal_False );
// 4) set new (DDE)table at node.
- pTableNode->SetNewTable(pDDETable, FALSE);
+ pTableNode->SetNewTable(pDDETable, sal_False);
}
// ??? this is always false: root frame is only created in ViewShell::Init
diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx
index 89c3996bc566..3df8a8b8e41b 100644
--- a/sw/source/filter/xml/xmltbli.hxx
+++ b/sw/source/filter/xml/xmltbli.hxx
@@ -99,7 +99,7 @@ class SwXMLTableContext : public XMLTextTableContext
sal_Bool bRelWidth : 1;
sal_Bool bHasSubTables : 1;
- USHORT nHeaderRows;
+ sal_uInt16 nHeaderRows;
sal_uInt32 nCurRow;
sal_uInt32 nCurCol;
sal_Int32 nWidth;
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 2e22743fd1ee..775f23b6aa40 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -602,7 +602,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
while ( i > 0 )
{
beans::PropertyValue& aProp = aProps[--i];
- USHORT nType2 = SwApplet_Impl::GetOptionType( aProp.Name, TRUE );
+ sal_uInt16 nType2 = SwApplet_Impl::GetOptionType( aProp.Name, sal_True );
if ( nType2 == SWHTML_OPTTYPE_TAG)
{
::rtl::OUString aStr2;
@@ -698,7 +698,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
while ( i > 0 )
{
beans::PropertyValue& aProp = aProps[--i];
- USHORT nType2 = SwApplet_Impl::GetOptionType( aProp.Name, TRUE );
+ sal_uInt16 nType2 = SwApplet_Impl::GetOptionType( aProp.Name, sal_True );
if (SWHTML_OPTTYPE_PARAM == nType2 || SWHTML_OPTTYPE_SIZE == nType2 )
{
::rtl::OUString aStr;
@@ -724,7 +724,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
while ( i > 0 )
{
beans::PropertyValue& aProp = aProps[--i];
- USHORT nType2 = SwApplet_Impl::GetOptionType( aProp.Name, FALSE );
+ sal_uInt16 nType2 = SwApplet_Impl::GetOptionType( aProp.Name, sal_False );
if ( nType2 == SWHTML_OPTTYPE_TAG)
{
::rtl::OUString aStr;
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index ce06c22cfc88..6be2c5b5c3dd 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -105,16 +105,16 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
aText.EraseAllChars( '\r' );
- USHORT nTokenPos = 0;
+ sal_uInt16 nTokenPos = 0;
while( STRING_NOTFOUND != nTokenPos )
{
String aLine = aText.GetToken( 0, '\n', nTokenPos );
while ( aLine.Len() )
{
String sTmpText;
- BOOL bField = FALSE;
+ sal_Bool bField = sal_False;
- USHORT nPos = aLine.Search( '<' );
+ sal_uInt16 nPos = aLine.Search( '<' );
if ( nPos )
{
sTmpText = aLine.Copy( 0, nPos );
@@ -138,14 +138,14 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
// Datenbankfelder muesen mind. 3 Punkte beinhalten!
String sDBName( sTmpText.Copy( 1, sTmpText.Len() - 2));
- USHORT nCnt = sDBName.GetTokenCount('.');
+ sal_uInt16 nCnt = sDBName.GetTokenCount('.');
if (nCnt >= 3)
{
- ::ReplacePoint(sDBName, TRUE);
+ ::ReplacePoint(sDBName, sal_True);
SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, &rSh );
rFldMgr.InsertFld( aData );
sRet = sDBName;
- bField = TRUE;
+ bField = sal_True;
}
}
}
@@ -162,11 +162,11 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
// ----------------------------------------------------------------------------
-void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, USHORT nCollId)
+void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, sal_uInt16 nCollId)
{
- USHORT nCollCnt = pOldSh->GetTxtFmtCollCount();
+ sal_uInt16 nCollCnt = pOldSh->GetTxtFmtCollCount();
SwTxtFmtColl* pColl;
- for( USHORT nCnt = 0; nCnt < nCollCnt; ++nCnt )
+ for( sal_uInt16 nCnt = 0; nCnt < nCollCnt; ++nCnt )
if(nCollId == (pColl = &pOldSh->GetTxtFmtColl(nCnt))->GetPoolFmtId())
pNewSh->GetTxtCollFromPool(nCollId)->SetFmtAttr(pColl->GetAttrSet());
}
@@ -176,7 +176,7 @@ void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, USHORT nCollId)
void SwModule::InsertEnv( SfxRequest& rReq )
{
-static USHORT nTitleNo = 0;
+static sal_uInt16 nTitleNo = 0;
SwDocShell *pMyDocSh;
SfxViewFrame *pFrame;
@@ -212,7 +212,7 @@ static USHORT nTitleNo = 0;
SwEnvCfgItem aEnvCfg;
//Haben wir schon einen Briefumschlag.
- BOOL bEnvChange = FALSE;
+ sal_Bool bEnvChange = sal_False;
SfxItemSet aSet(GetPool(), FN_ENVELOP, FN_ENVELOP, 0);
aSet.Put(aEnvCfg.GetItem());
@@ -260,7 +260,7 @@ static USHORT nTitleNo = 0;
if (nMode == ENV_NEWDOC || nMode == ENV_INSERT)
{
- SwWait aWait( (SwDocShell&)*xDocSh, TRUE );
+ SwWait aWait( (SwDocShell&)*xDocSh, sal_True );
// Dialog auslesen, Item in Config speichern
const SwEnvItem& rItem = pItem ? *pItem : (const SwEnvItem&) pDlg->GetOutputItemSet()->Get(FN_ENVELOP);
@@ -275,7 +275,7 @@ static USHORT nTitleNo = 0;
{
ASSERT(pOldSh, "Kein Dokument - war 'Einfuegen' nicht disabled???");
SvxPaperBinItem aItem( RES_PAPER_BIN );
- aItem.SetValue((BYTE)pSh->getIDocumentDeviceAccess()->getPrinter(true)->GetPaperBin());
+ aItem.SetValue((sal_uInt8)pSh->getIDocumentDeviceAccess()->getPrinter(true)->GetPaperBin());
pOldSh->GetPageDescFromPool(RES_POOLPAGE_JAKET)->GetMaster().SetFmtAttr(aItem);
}
@@ -300,7 +300,7 @@ static USHORT nTitleNo = 0;
// Los geht's (Einfuegen)
pSh->StartUndo(UNDO_UI_INSERT_ENVELOPE, NULL);
pSh->StartAllAction();
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
if (bEnvChange)
{
@@ -308,8 +308,8 @@ static USHORT nTitleNo = 0;
pFollow = pSh->GetPageDesc(pSh->GetCurPageDesc()).GetFollow();
// Text der ersten Seite loeschen
- if ( !pSh->SttNxtPg(TRUE) )
- pSh->EndPg(TRUE);
+ if ( !pSh->SttNxtPg(sal_True) )
+ pSh->EndPg(sal_True);
pSh->DelRight();
// Rahmen der ersten Seite loeschen
if( pSh->GotoFly( rSendMark ) )
@@ -322,7 +322,7 @@ static USHORT nTitleNo = 0;
pSh->EnterSelFrmMode();
pSh->DelRight();
}
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
}
else
// Folgevorlage: Seite 1
@@ -332,21 +332,21 @@ static USHORT nTitleNo = 0;
if ( pSh->IsCrsrInTbl() )
{
pSh->SplitNode();
- pSh->Right( CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pSh->Right( CRSR_SKIP_CHARS, sal_False, 1, sal_False );
SfxItemSet aBreakSet( pSh->GetAttrPool(), RES_BREAK, RES_BREAK, 0 );
aBreakSet.Put( SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
pSh->SetTblAttr( aBreakSet );
}
else
- pSh->InsertPageBreak(0, FALSE);
- pSh->SttEndDoc(TRUE);
+ pSh->InsertPageBreak(0, sal_False);
+ pSh->SttEndDoc(sal_True);
}
else
{
pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc());
// Los geht's (Drucken)
pSh->StartAllAction();
- pSh->DoUndo(FALSE);
+ pSh->DoUndo(sal_False);
// Neue Collections "Absender" und "Empfaenger" wieder in neues
// Dokument kopieren
@@ -383,8 +383,8 @@ static USHORT nTitleNo = 0;
long lLeft = rItem.lShiftRight,
lUpper = rItem.lShiftDown;
- USHORT nPageW = (USHORT) Max(rItem.lWidth, rItem.lHeight),
- nPageH = (USHORT) Min(rItem.lWidth, rItem.lHeight);
+ sal_uInt16 nPageW = (sal_uInt16) Max(rItem.lWidth, rItem.lHeight),
+ nPageH = (sal_uInt16) Min(rItem.lWidth, rItem.lHeight);
switch (rItem.eAlign)
{
@@ -401,18 +401,18 @@ static USHORT nTitleNo = 0;
}
SvxLRSpaceItem aLRMargin( RES_LR_SPACE );
SvxULSpaceItem aULMargin( RES_UL_SPACE );
- aLRMargin.SetLeft ((USHORT) lLeft );
- aULMargin.SetUpper((USHORT) lUpper);
+ aLRMargin.SetLeft ((sal_uInt16) lLeft );
+ aULMargin.SetUpper((sal_uInt16) lUpper);
aLRMargin.SetRight(0);
aULMargin.SetLower(0);
rFmt.SetFmtAttr(aLRMargin);
rFmt.SetFmtAttr(aULMargin);
// Kopf-, Fusszeilen
- rFmt.SetFmtAttr(SwFmtHeader(BOOL(FALSE)));
- pDesc->ChgHeaderShare(FALSE);
- rFmt.SetFmtAttr(SwFmtFooter(BOOL(FALSE)));
- pDesc->ChgFooterShare(FALSE);
+ rFmt.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False)));
+ pDesc->ChgHeaderShare(sal_False);
+ rFmt.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False)));
+ pDesc->ChgFooterShare(sal_False);
// Seitennumerierung
pDesc->SetUseOn(nsUseOnPage::PD_ALL);
@@ -436,9 +436,9 @@ static USHORT nTitleNo = 0;
// Page-Desc anwenden
- USHORT nPos;
+ sal_uInt16 nPos;
pSh->FindPageDescByName( pDesc->GetName(),
- FALSE,
+ sal_False,
&nPos );
@@ -446,7 +446,7 @@ static USHORT nTitleNo = 0;
pSh->ChgCurPageDesc(*pDesc);
// Rahmen einfuegen
- SwFlyFrmAttrMgr aMgr(FALSE, pSh, FRMMGR_TYPE_ENVELP);
+ SwFlyFrmAttrMgr aMgr(sal_False, pSh, FRMMGR_TYPE_ENVELP);
SwFldMgr aFldMgr;
aMgr.SetHeightSizeType(ATT_VAR_SIZE);
@@ -458,7 +458,7 @@ static USHORT nTitleNo = 0;
// Absender
if (rItem.bSend)
{
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lSendFromLeft + lLeft, rItem.lSendFromTop + lUpper),
Size (rItem.lAddrFromLeft - rItem.lSendFromLeft, 0));
@@ -473,7 +473,7 @@ static USHORT nTitleNo = 0;
}
// Empfaenger
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lAddrFromLeft + lLeft, rItem.lAddrFromTop + lUpper),
@@ -490,12 +490,12 @@ static USHORT nTitleNo = 0;
pSh->SetPageObjsNewPage(aFlyArr, 1);
// Fertig
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
pSh->EndAllAction();
if (nMode == ENV_NEWDOC)
- pSh->DoUndo(TRUE);
+ pSh->DoUndo(sal_True);
else
pSh->EndUndo(UNDO_UI_INSERT_ENVELOPE);
@@ -505,7 +505,7 @@ static USHORT nTitleNo = 0;
if ( rItem.aAddrText.indexOf('<') >= 0 )
{
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{
SID_SBA_BRW_UPDATE,
SID_SBA_BRW_INSERT,
@@ -523,7 +523,7 @@ static USHORT nTitleNo = 0;
{
rReq.AppendItem( rItem );
if ( nMode == ENV_NEWDOC )
- rReq.AppendItem( SfxBoolItem( FN_PARAM_1, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( FN_PARAM_1, sal_True ) );
}
rReq.Done();
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index 653208aaf250..9ed011cdad78 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -202,7 +202,7 @@ void SwModule::StateOther(SfxItemSet &rSet)
}
break;
case SID_ATTR_METRIC:
- rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, static_cast< UINT16 >(::GetDfltMetric(bWebView))));
+ rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, static_cast< sal_uInt16 >(::GetDfltMetric(bWebView))));
break;
case FN_SET_MODOPT_TBLNUMFMT:
rSet.Put( SfxBoolItem( nWhich, pModuleConfig->
@@ -225,7 +225,7 @@ SwView* lcl_LoadDoc(SwView* pView, const String& rURL)
{
SfxStringItem aURL(SID_FILE_NAME, rURL);
SfxStringItem aTargetFrameName( SID_TARGETNAME, String::CreateFromAscii("_blank") );
- SfxBoolItem aHidden( SID_HIDDEN, TRUE );
+ SfxBoolItem aHidden( SID_HIDDEN, sal_True );
SfxStringItem aReferer(SID_REFERER, pView->GetDocShell()->GetTitle());
SfxObjectItem* pItem = (SfxObjectItem*)pView->GetViewFrame()->GetDispatcher()->
Execute(SID_OPENDOC, SFX_CALLMODE_SYNCHRON,
@@ -337,7 +337,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
m_pMMConfig->SetSourceView( m_pView );
m_pView->SetMailMergeConfigItem(0, 0, sal_True);
SfxViewFrame* pViewFrame = m_pView->GetViewFrame();
- pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, FALSE);
+ pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, sal_False);
DBG_ASSERT(m_pMMConfig, "no MailMergeConfigItem available");
bRestoreWizard = true;
}
@@ -750,7 +750,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
else if(rHint.ISA(SfxSimpleHint))
{
- USHORT nHintId = ((SfxSimpleHint&)rHint).GetId();
+ sal_uInt16 nHintId = ((SfxSimpleHint&)rHint).GetId();
if(SFX_HINT_DEINITIALIZING == nHintId)
{
DELETEZ(pWebUsrPref);
@@ -798,7 +798,7 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal
{
if( pBrdCst == pUserOptions )
{
- bAuthorInitialised = FALSE;
+ bAuthorInitialised = sal_False;
}
else if( pBrdCst == pUndoOptions )
{
@@ -817,7 +817,7 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal
pDocShell = (SwDocShell*)SfxObjectShell::GetNext(*pDocShell, &aType);
}
}
- SwEditShell::SetUndoActionCount( static_cast< USHORT >(nNew));
+ SwEditShell::SetUndoActionCount( static_cast< sal_uInt16 >(nNew));
}
else if ( pBrdCst == pColorConfig || pBrdCst == pAccessibilityOptions )
{
@@ -952,11 +952,11 @@ const SwMasterUsrPref *SwModule::GetUsrPref(sal_Bool bWeb) const
{
// im Load der SwMasterUsrPref wird der SpellChecker gebraucht, dort darf
// er aber nicht angelegt werden #58256#
- pNonConstModule->pWebUsrPref = new SwMasterUsrPref(TRUE);
+ pNonConstModule->pWebUsrPref = new SwMasterUsrPref(sal_True);
}
else if(!bWeb && !pUsrPref)
{
- pNonConstModule->pUsrPref = new SwMasterUsrPref(FALSE);
+ pNonConstModule->pUsrPref = new SwMasterUsrPref(sal_False);
}
return bWeb ? pWebUsrPref : pUsrPref;
}
diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx
index a1e6cef80cd1..5f2697405cb3 100644
--- a/sw/source/ui/app/appopt.cxx
+++ b/sw/source/ui/app/appopt.cxx
@@ -86,9 +86,9 @@ using namespace ::com::sun::star::lang;
*
* --------------------------------------------------*/
-SfxItemSet* SwModule::CreateItemSet( USHORT nId )
+SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
{
- BOOL bTextDialog = (nId == SID_SW_EDITOPTIONS) ? TRUE : FALSE;
+ sal_Bool bTextDialog = (nId == SID_SW_EDITOPTIONS) ? sal_True : sal_False;
// hier werden die Optionen fuer die Web- und den Textdialog zusmmengesetzt
SwViewOption aViewOpt = *GetUsrPref(!bTextDialog);
@@ -100,7 +100,7 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
if(pAppView)
{
// wenn Text dann nicht WebView und umgekehrt
- BOOL bWebView = 0 != PTR_CAST(SwWebView, pAppView);
+ sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
if( (bWebView && !bTextDialog) ||(!bWebView && bTextDialog))
{
aViewOpt = *pAppView->GetWrtShell().GetViewOptions();
@@ -197,20 +197,20 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
pRet->Put(SwPtrItem(FN_PARAM_STDFONTS, GetStdFontConfig()));
if( PTR_CAST( SwPagePreView, SfxViewShell::Current())!=0)
{
- SfxBoolItem aBool(SfxBoolItem(SID_PRINTPREVIEW, TRUE));
+ SfxBoolItem aBool(SfxBoolItem(SID_PRINTPREVIEW, sal_True));
pRet->Put(aBool);
}
FieldUnit eUnit = pPref->GetHScrollMetric();
if(pAppView)
pAppView->GetHLinealMetric(eUnit);
- pRet->Put(SfxUInt16Item( FN_HSCROLL_METRIC, static_cast< UINT16 >(eUnit)));
+ pRet->Put(SfxUInt16Item( FN_HSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit)));
eUnit = pPref->GetVScrollMetric();
if(pAppView)
pAppView->GetVLinealMetric(eUnit);
- pRet->Put(SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< UINT16 >(eUnit) ));
- pRet->Put(SfxUInt16Item( SID_ATTR_METRIC, static_cast< UINT16 >(pPref->GetMetric()) ));
+ pRet->Put(SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit) ));
+ pRet->Put(SfxUInt16Item( SID_ATTR_METRIC, static_cast< sal_uInt16 >(pPref->GetMetric()) ));
if(bTextDialog)
{
if(pAppView)
@@ -218,10 +218,10 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
const SvxTabStopItem& rDefTabs =
(const SvxTabStopItem&)pAppView->GetWrtShell().
GetDefault(RES_PARATR_TABSTOP);
- pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, (USHORT)::GetTabDist(rDefTabs)));
+ pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, (sal_uInt16)::GetTabDist(rDefTabs)));
}
else
- pRet->Put(SfxUInt16Item( SID_ATTR_DEFTABSTOP, (UINT16)pPref->GetDefTab()));
+ pRet->Put(SfxUInt16Item( SID_ATTR_DEFTABSTOP, (sal_uInt16)pPref->GetDefTab()));
}
/*-----------------01.02.97 11.13-------------------
@@ -235,8 +235,8 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
aGridItem.SetGridVisible( aViewOpt.IsGridVisible());
const Size& rSnapSize = aViewOpt.GetSnapSize();
- aGridItem.SetFldDrawX( (USHORT) (rSnapSize.Width() ));
- aGridItem.SetFldDrawY( (USHORT) (rSnapSize.Height()));
+ aGridItem.SetFldDrawX( (sal_uInt16) (rSnapSize.Width() ));
+ aGridItem.SetFldDrawY( (sal_uInt16) (rSnapSize.Height()));
aGridItem.SetFldDivisionX( aViewOpt.GetDivisionX());
aGridItem.SetFldDivisionY( aViewOpt.GetDivisionY());
@@ -292,16 +292,16 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
/* -----------------12.02.99 12:28-------------------
*
* --------------------------------------------------*/
-void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
+void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
{
- BOOL bTextDialog = nId == SID_SW_EDITOPTIONS;
+ sal_Bool bTextDialog = nId == SID_SW_EDITOPTIONS;
SwView* pAppView = GetView();
if(pAppView && pAppView->GetViewFrame() != SfxViewFrame::Current())
pAppView = 0;
if(pAppView)
{
// the text dialog mustn't apply data to the web view and vice versa
- BOOL bWebView = 0 != PTR_CAST(SwWebView, pAppView);
+ sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
if( (bWebView == bTextDialog))
pAppView = 0; //
}
@@ -316,18 +316,18 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
/*---------------------------------------------------------------------
Seite Dokumentansicht auswerten
-----------------------------------------------------------------------*/
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, sal_False, &pItem ))
{
const SwDocDisplayItem* pDocDispItem = (const SwDocDisplayItem*)pItem;
if(!aViewOpt.IsViewMetaChars())
{
- if( (!aViewOpt.IsTab( TRUE ) && pDocDispItem->bTab) ||
- (!aViewOpt.IsBlank( TRUE ) && pDocDispItem->bSpace) ||
- (!aViewOpt.IsParagraph( TRUE ) && pDocDispItem->bParagraphEnd) ||
- (!aViewOpt.IsLineBreak( TRUE ) && pDocDispItem->bManualBreak) )
+ if( (!aViewOpt.IsTab( sal_True ) && pDocDispItem->bTab) ||
+ (!aViewOpt.IsBlank( sal_True ) && pDocDispItem->bSpace) ||
+ (!aViewOpt.IsParagraph( sal_True ) && pDocDispItem->bParagraphEnd) ||
+ (!aViewOpt.IsLineBreak( sal_True ) && pDocDispItem->bManualBreak) )
{
- aViewOpt.SetViewMetaChars(TRUE);
+ aViewOpt.SetViewMetaChars(sal_True);
if(pBindings)
pBindings->Invalidate(FN_VIEW_META_CHARS);
}
@@ -345,20 +345,20 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
Elemente - Item auswerten
-----------------------------------------------------------------------*/
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, sal_False, &pItem ) )
{
const SwElemItem* pElemItem = (const SwElemItem*)pItem;
pElemItem->FillViewOptions( aViewOpt );
}
- if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, sal_False, &pItem ) )
{
SFX_APP()->SetOptions(rSet);
const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
::SetDfltMetric((FieldUnit)pMetricItem->GetValue(), !bTextDialog);
}
- if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, sal_False, &pItem ) )
{
const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue();
@@ -367,7 +367,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
pAppView->ChangeTabMetric(eUnit);
}
- if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, sal_False, &pItem ) )
{
const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue();
@@ -376,9 +376,9 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
pAppView->ChangeVLinealMetric(eUnit);
}
- if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem ) )
{
- USHORT nTabDist = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nTabDist = ((const SfxUInt16Item*)pItem)->GetValue();
pPref->SetDefTab(nTabDist);
if(pAppView)
{
@@ -403,7 +403,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
Seite Rastereinstellungen auswerten
----------------------------------------------------------------------*/
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, sal_False, &pItem ))
{
const SvxGridItem* pGridItem = (const SvxGridItem*)pItem;
@@ -433,7 +433,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
// Writer Drucker Zusatzeinstellungen auswerten
//----------------------------------------------------------------------------
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, sal_False, &pItem ))
{
SwPrintOptions* pOpt = GetPrtOptions(!bTextDialog);
if (pOpt)
@@ -447,7 +447,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem ))
{
((SwShadowCursorItem*)pItem)->FillViewOptions( aViewOpt );
if(pBindings)
@@ -465,7 +465,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
rWrtSh.AlignAllFormulasToBaseline();
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, sal_False, &pItem ))
{
aViewOpt.SetCursorInProtectedArea(((const SfxBoolItem*)pItem)->GetValue());
}
@@ -477,19 +477,19 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
----------------------------------------------------------------------------*/
if( SFX_ITEM_SET == rSet.GetItemState(
- FN_PARAM_SWTEST, FALSE, &pItem ))
+ FN_PARAM_SWTEST, sal_False, &pItem ))
{
const SwTestItem* pTestItem = (const SwTestItem*)pItem;
- aViewOpt.SetTest1((BOOL)pTestItem->bTest1);
- aViewOpt.SetTest2((BOOL)pTestItem->bTest2);
- aViewOpt.SetTest3((BOOL)pTestItem->bTest3);
- aViewOpt.SetTest4((BOOL)pTestItem->bTest4);
- aViewOpt.SetTest5((BOOL)pTestItem->bTest5);
- aViewOpt.SetTest6((BOOL)pTestItem->bTest6);
- aViewOpt.SetTest7((BOOL)pTestItem->bTest7);
- aViewOpt.SetTest8((BOOL)pTestItem->bTest8);
- SwViewOption::SetTest9((BOOL)pTestItem->bTest9);
- aViewOpt.SetTest10((BOOL)pTestItem->bTest10);
+ aViewOpt.SetTest1((sal_Bool)pTestItem->bTest1);
+ aViewOpt.SetTest2((sal_Bool)pTestItem->bTest2);
+ aViewOpt.SetTest3((sal_Bool)pTestItem->bTest3);
+ aViewOpt.SetTest4((sal_Bool)pTestItem->bTest4);
+ aViewOpt.SetTest5((sal_Bool)pTestItem->bTest5);
+ aViewOpt.SetTest6((sal_Bool)pTestItem->bTest6);
+ aViewOpt.SetTest7((sal_Bool)pTestItem->bTest7);
+ aViewOpt.SetTest8((sal_Bool)pTestItem->bTest8);
+ SwViewOption::SetTest9((sal_Bool)pTestItem->bTest9);
+ aViewOpt.SetTest10((sal_Bool)pTestItem->bTest10);
}
#endif
// dann an der akt. View und Shell die entsp. Elemente setzen
@@ -498,7 +498,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
/* -----------------12.02.99 12:28-------------------
*
* --------------------------------------------------*/
-SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet )
+SfxTabPage* SwModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet )
{
SfxTabPage* pRet = NULL;
SfxAllItemSet aSet(*(rSet.GetPool()));
@@ -567,7 +567,7 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS
if(pCurrView)
{
// wenn Text dann nicht WebView und umgekehrt
- BOOL bWebView = 0 != PTR_CAST(SwWebView, pCurrView);
+ sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pCurrView);
if( (bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE == nId) ||
(!bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE != nId) )
{
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index c839b5c03f52..b30b0f1198c5 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -150,11 +150,11 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
SwCrsrShell *pCrsrShell,
SwPaM* pPaM )
{
- BOOL bAPICall = FALSE;
+ sal_Bool bAPICall = sal_False;
const SfxPoolItem* pApiItem;
const SfxItemSet* pMedSet;
if( 0 != ( pMedSet = rMedium.GetItemSet() ) && SFX_ITEM_SET ==
- pMedSet->GetItemState( FN_API_CALL, TRUE, &pApiItem ) )
+ pMedSet->GetItemState( FN_API_CALL, sal_True, &pApiItem ) )
bAPICall = ((const SfxBoolItem*)pApiItem)->GetValue();
const SfxFilter* pFlt = rMedium.GetFilter();
@@ -198,7 +198,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
{
const SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem *pPassItem;
- if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pPassItem))
+ if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, sal_True, &pPassItem))
aPasswd = ((const SfxStringItem *)pPassItem)->GetValue();
}
@@ -224,7 +224,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
const SfxItemSet* pSet;
const SfxPoolItem* pItem;
if( 0 != ( pSet = rMedium.GetItemSet() ) && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
aOpt.ReadUserData( ((const SfxStringItem*)pItem)->GetValue() );
if( pRead )
@@ -238,17 +238,17 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
Beschreibung: Laden
--------------------------------------------------------------------*/
-BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
+sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::ConvertFrom" );
SwReader* pRdr;
SwRead pRead = StartConvertFrom(rMedium, &pRdr);
if (!pRead)
- return FALSE; // #129881# return if no reader is found
+ return sal_False; // #129881# return if no reader is found
SotStorageRef pStg=pRead->getSotStorageRef(); // #i45333# save sot storage ref in case of recursive calls
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
// SfxProgress unterdruecken, wenn man Embedded ist
SW_MOD()->SetEmbeddedLoadSave(
@@ -259,7 +259,7 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
/* #106748# Restore the pool default if reading a saved document. */
pDoc->RemoveAllFmtLanguageDependencies();
- ULONG nErr = pRdr->Read( *pRead );
+ sal_uLong nErr = pRdr->Read( *pRead );
// Evtl. ein altes Doc weg
if ( pDoc != pRdr->GetDoc() )
@@ -279,10 +279,10 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
delete pRdr;
- SW_MOD()->SetEmbeddedLoadSave( FALSE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_False );
SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
- BOOL bOk = !IsError( nErr );
+ sal_Bool bOk = !IsError( nErr );
// --> OD 2006-11-07 #i59688#
// // StartFinishedLoading rufen. Nicht bei asynchronen Filtern!
@@ -305,13 +305,13 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
--------------------------------------------------------------------*/
-BOOL SwDocShell::Save()
+sal_Bool SwDocShell::Save()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::Save" );
//#i3370# remove quick help to prevent saving of autocorrection suggestions
if(pView)
pView->GetEditWin().StopQuickHelp();
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
CalcLayoutForOLEObjects(); // format for OLE objets
// --> OD 2006-03-17 #i62875#
@@ -324,7 +324,7 @@ BOOL SwDocShell::Save()
}
// <--
- ULONG nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
+ sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
if( SfxObjectShell::Save() )
{
switch( GetCreateMode() )
@@ -337,16 +337,16 @@ BOOL SwDocShell::Save()
{
WriterRef xWrt;
::GetXMLWriter( aEmptyStr, GetMedium()->GetBaseURL( true ), xWrt );
- xWrt->SetOrganizerMode( TRUE );
+ xWrt->SetOrganizerMode( sal_True );
SwWriter aWrt( *GetMedium(), *pDoc );
nErr = aWrt.Write( xWrt );
- xWrt->SetOrganizerMode( FALSE );
+ xWrt->SetOrganizerMode( sal_False );
}
break;
case SFX_CREATE_MODE_EMBEDDED:
// SfxProgress unterdruecken, wenn man Embedded ist
- SW_MOD()->SetEmbeddedLoadSave( TRUE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_True );
// kein break;
case SFX_CREATE_MODE_STANDARD:
@@ -357,10 +357,10 @@ BOOL SwDocShell::Save()
{
//TODO/MBA: it looks as that this code can be removed!
//SvxImportMSVBasic aTmp( *this, pIo->GetStorage() );
- //aTmp.SaveOrDelMSVBAStorage( FALSE, aEmptyStr );
+ //aTmp.SaveOrDelMSVBAStorage( sal_False, aEmptyStr );
if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() )
nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) (*this) );
- pDoc->SetContainsMSVBasic( FALSE );
+ pDoc->SetContainsMSVBasic( sal_False );
}
// TabellenBox Edit beenden!
@@ -370,11 +370,11 @@ BOOL SwDocShell::Save()
WriterRef xWrt;
::GetXMLWriter( aEmptyStr, GetMedium()->GetBaseURL( true ), xWrt );
- BOOL bLockedView(FALSE);
+ sal_Bool bLockedView(sal_False);
if ( pWrtShell )
{
bLockedView = pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); //lock visible section
+ pWrtShell->LockView( sal_True ); //lock visible section
}
SwWriter aWrt( *GetMedium(), *pDoc );
@@ -385,7 +385,7 @@ BOOL SwDocShell::Save()
}
break;
}
- SW_MOD()->SetEmbeddedLoadSave( FALSE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_False );
}
SetError( nErr ? nErr : nVBWarning, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
@@ -406,7 +406,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveAs" );
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
//#i3370# remove quick help to prevent saving of autocorrection suggestions
if(pView)
pView->GetEditWin().StopQuickHelp();
@@ -455,7 +455,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
}
// <--
- ULONG nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
+ sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
uno::Reference < embed::XStorage > xStor = rMedium.GetOutputStorage();
if( SfxObjectShell::SaveAs( rMedium ) )
{
@@ -479,10 +479,10 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
{
//TODO/MBA: it looks as that this code can be removed!
//SvxImportMSVBasic aTmp( *this, pIo->GetStorage() );
- //aTmp.SaveOrDelMSVBAStorage( FALSE, aEmptyStr );
+ //aTmp.SaveOrDelMSVBAStorage( sal_False, aEmptyStr );
if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() )
nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) *this );
- pDoc->SetContainsMSVBasic( FALSE );
+ pDoc->SetContainsMSVBasic( sal_False );
}
// TabellenBox Edit beenden!
@@ -491,7 +491,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
// Modified-Flag merken und erhalten ohne den Link zu Callen
// (fuer OLE; nach Anweisung von MM)
- BOOL bIsModified = pDoc->IsModified();
+ sal_Bool bIsModified = pDoc->IsModified();
SwUndoNoModifiedPosition aOldPos = pDoc->getUndoNoModifiedPosition();
Link aOldOLELnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
@@ -503,11 +503,11 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
WriterRef xWrt;
::GetXMLWriter( aEmptyStr, rMedium.GetBaseURL( true ), xWrt );
- BOOL bLockedView(FALSE);
+ sal_Bool bLockedView(sal_False);
if ( pWrtShell )
{
bLockedView = pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); //lock visible section
+ pWrtShell->LockView( sal_True ); //lock visible section
}
SwWriter aWrt( rMedium, *pDoc );
@@ -523,7 +523,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
}
pDoc->SetOle2Link( aOldOLELnk );
- SW_MOD()->SetEmbeddedLoadSave( FALSE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_False );
}
SetError( nErr ? nErr : nVBWarning, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
@@ -541,12 +541,12 @@ SwSrcView* lcl_GetSourceView( SwDocShell* pSh )
return PTR_CAST( SwSrcView, pViewShell);
}
-BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
+sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::ConvertTo" );
const SfxFilter* pFlt = rMedium.GetFilter();
if( !pFlt )
- return FALSE;
+ return sal_False;
WriterRef xWriter;
SwReaderWriter::GetWriter( pFlt->GetUserData(), rMedium.GetBaseURL( true ), xWriter );
@@ -554,7 +554,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
{ // Der Filter ist nicht vorhanden
InfoBox( 0,
SW_RESSTR(STR_DLLNOTFOUND) ).Execute();
- return FALSE;
+ return sal_False;
}
//#i3370# remove quick help to prevent saving of autocorrection suggestions
@@ -569,22 +569,22 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
pView->GetPostItMgr()->UpdateDataOnActiveSidebarWin();
}
- ULONG nVBWarning = 0;
+ sal_uLong nVBWarning = 0;
if( pDoc->ContainsMSVBasic() )
{
- BOOL bSave = pFlt->GetUserData().EqualsAscii( "CWW8" )
+ sal_Bool bSave = pFlt->GetUserData().EqualsAscii( "CWW8" )
&& SvtFilterOptions::Get()->IsLoadWordBasicStorage();
if ( bSave )
{
- SvStorageRef xStg = new SotStorage( rMedium.GetOutStream(), FALSE );
+ SvStorageRef xStg = new SotStorage( rMedium.GetOutStream(), sal_False );
DBG_ASSERT( !xStg->GetError(), "No storage available for storing VBA macros!" );
if ( !xStg->GetError() )
{
nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, String::CreateFromAscii("Macros") );
xStg->Commit();
- pDoc->SetContainsMSVBasic( TRUE );
+ pDoc->SetContainsMSVBasic( sal_True );
}
}
}
@@ -642,15 +642,15 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
pFlt->GetUserData().EqualsAscii( FILTER_XMLVW ) ) )
{
// eigenen Typ ermitteln
- BYTE nMyType = 0;
+ sal_uInt8 nMyType = 0;
if( ISA( SwWebDocShell) )
nMyType = 1;
else if( ISA( SwGlobalDocShell) )
nMyType = 2;
// gewuenschten Typ ermitteln
- BYTE nSaveType = 0;
- ULONG nSaveClipId = pFlt->GetFormat();
+ sal_uInt8 nSaveType = 0;
+ sal_uLong nSaveClipId = pFlt->GetFormat();
if( SOT_FORMATSTR_ID_STARWRITERWEB_8 == nSaveClipId ||
SOT_FORMATSTR_ID_STARWRITERWEB_60 == nSaveClipId ||
SOT_FORMATSTR_ID_STARWRITERWEB_50 == nSaveClipId ||
@@ -663,9 +663,9 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
nSaveType = 2;
// Flags am Dokument entsprechend umsetzen
- BOOL bIsHTMLModeSave = GetDoc()->get(IDocumentSettingAccess::HTML_MODE);
- BOOL bIsGlobalDocSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
- BOOL bIsGlblDocSaveLinksSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
+ sal_Bool bIsHTMLModeSave = GetDoc()->get(IDocumentSettingAccess::HTML_MODE);
+ sal_Bool bIsGlobalDocSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
+ sal_Bool bIsGlblDocSaveLinksSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
if( nMyType != nSaveType )
{
GetDoc()->set(IDocumentSettingAccess::HTML_MODE, 1 == nSaveType);
@@ -692,7 +692,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
}
// Jetzt das Dokument normal speichern
- BOOL bRet = SaveAs( rMedium );
+ sal_Bool bRet = SaveAs( rMedium );
if( nMyType != nSaveType )
{
@@ -733,7 +733,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
if( 0 != ( pSet = rMedium.GetItemSet() ) )
{
if( SFX_ITEM_SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS,
- TRUE, &pItem ) )
+ sal_True, &pItem ) )
sItemOpt = ((const SfxStringItem*)pItem)->GetValue();
}
if(sItemOpt.Len())
@@ -747,26 +747,26 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
SFX_CREATE_MODE_EMBEDDED == GetCreateMode());
// Kontext aufspannen, um die Anzeige der Selektion zu unterbinden
- ULONG nErrno;
+ sal_uLong nErrno;
String aFileName( rMedium.GetName() );
//Keine View also das ganze Dokument!
if ( pWrtShell )
{
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
// --> OD 2009-12-31 #i106906#
const sal_Bool bFormerLockView = pWrtShell->IsViewLocked();
pWrtShell->LockView( sal_True );
// <--
pWrtShell->StartAllAction();
pWrtShell->Push();
- SwWriter aWrt( rMedium, *pWrtShell, TRUE );
+ SwWriter aWrt( rMedium, *pWrtShell, sal_True );
nErrno = aWrt.Write( xWriter, &aFileName );
//JP 16.05.97: falls der SFX uns die View waehrend des speicherns
// entzieht
if( pWrtShell )
{
- pWrtShell->Pop(FALSE);
+ pWrtShell->Pop(sal_False);
pWrtShell->EndAllAction();
// --> OD 2009-12-31 #i106906#
pWrtShell->LockView( bFormerLockView );
@@ -789,7 +789,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
}
}
- SW_MOD()->SetEmbeddedLoadSave( FALSE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_False );
SetError( nErrno ? nErrno : nVBWarning, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
if( !rMedium.IsStorage() )
rMedium.CloseOutStream();
@@ -803,14 +803,14 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
/*--------------------------------------------------------------------
- Beschreibung: ??? noch nicht zu aktivieren, muss TRUE liefern
+ Beschreibung: ??? noch nicht zu aktivieren, muss sal_True liefern
--------------------------------------------------------------------*/
sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveCompleted" );
- BOOL bRet = SfxObjectShell::SaveCompleted( xStor );
+ sal_Bool bRet = SfxObjectShell::SaveCompleted( xStor );
if( bRet )
{
// erst hier entscheiden, ob das Speichern geklappt hat oder nicht
@@ -822,9 +822,9 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
if( pOLEChildList )
{
- BOOL bResetModified = IsEnableSetModified();
+ sal_Bool bResetModified = IsEnableSetModified();
if( bResetModified )
- EnableSetModified( FALSE );
+ EnableSetModified( sal_False );
uno::Sequence < rtl::OUString > aNames = pOLEChildList->GetObjectNames();
for( sal_Int32 n = aNames.getLength(); n; n-- )
@@ -841,7 +841,7 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
DELETEZ( pOLEChildList );
if( bResetModified )
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
return bRet;
}
@@ -851,12 +851,12 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
--------------------------------------------------------------------*/
void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
- USHORT nAspect )
+ sal_uInt16 nAspect )
{
//fix #25341# Draw sollte das Modified nicht beeinflussen
- BOOL bResetModified;
- if ( TRUE == (bResetModified = IsEnableSetModified()) )
- EnableSetModified( FALSE );
+ sal_Bool bResetModified;
+ if ( sal_True == (bResetModified = IsEnableSetModified()) )
+ EnableSetModified( sal_False );
//sollte am Document ein JobSetup haengen, dann kopieren wir uns diesen,
//um nach dem PrtOle2 diesen wieder am Doc zu verankern.
@@ -878,7 +878,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
pDev->SetFillColor();
pDev->SetLineColor();
pDev->SetBackground();
- BOOL bWeb = 0 != PTR_CAST(SwWebDocShell, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebDocShell, this);
SwPrintData aOpts;
ViewShell::PrtOle2( pDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, pDev, aRect );
pDev->Pop();
@@ -889,7 +889,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
delete pOrig;
}
if ( bResetModified )
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
@@ -911,14 +911,14 @@ void SwDocShell::SetVisArea( const Rectangle &rRect )
aRect.Move( nMoveX, nMoveY );
//Ruft das SfxInPlaceObject::SetVisArea()!
- pView->SetVisArea( aRect, TRUE );
+ pView->SetVisArea( aRect, sal_True );
}
else
SfxObjectShell::SetVisArea( aRect );
}
-Rectangle SwDocShell::GetVisArea( USHORT nAspect ) const
+Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const
{
if ( nAspect == ASPECT_THUMBNAIL )
{
@@ -926,7 +926,7 @@ Rectangle SwDocShell::GetVisArea( USHORT nAspect ) const
SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), 1 );
SwCntntNode* pNd = pDoc->GetNodes().GoNext( &aIdx );
- const SwRect aPageRect = pNd->FindPageFrmRect( FALSE, 0, FALSE );
+ const SwRect aPageRect = pNd->FindPageFrmRect( sal_False, 0, sal_False );
return aPageRect.SVRect();
// Why does this have to be that complicated? I replaced this by the
@@ -939,8 +939,8 @@ Rectangle SwDocShell::GetVisArea( USHORT nAspect ) const
pDesc = &const_cast<const SwDoc *>(pDoc)->GetPageDesc( 0 );
//Das Format wird evtl. von der virtuellen Seitennummer bestimmt.
- const USHORT nPgNum = rDesc.GetNumOffset();
- const BOOL bOdd = nPgNum % 2 ? TRUE : FALSE;
+ const sal_uInt16 nPgNum = rDesc.GetNumOffset();
+ const sal_Bool bOdd = nPgNum % 2 ? sal_True : sal_False;
const SwFrmFmt *pFmt = bOdd ? pDesc->GetRightFmt() : pDesc->GetLeftFmt();
if ( !pFmt ) //#40568#
pFmt = bOdd ? pDesc->GetLeftFmt() : pDesc->GetRightFmt();
@@ -976,7 +976,7 @@ void SwDocShell::OnDocumentPrinterChanged( Printer * pNewPrinter )
GetDoc()->setPrinter( 0, true, true );
}
-ULONG SwDocShell::GetMiscStatus() const
+sal_uLong SwDocShell::GetMiscStatus() const
{
return SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE;
}
@@ -1026,7 +1026,7 @@ sal_uInt16 SwDocShell::GetHiddenInformationState( sal_uInt16 nStates )
void SwDocShell::GetState(SfxItemSet& rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -1044,7 +1044,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
// break;
case SID_PRINTPREVIEW:
{
- BOOL bDisable = IsInPlaceActive();
+ sal_Bool bDisable = IsInPlaceActive();
if ( !bDisable )
{
SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this);
@@ -1053,7 +1053,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
if ( PTR_CAST(SwView, pTmpFrm->GetViewShell()) &&
((SwView*)pTmpFrm->GetViewShell())->GetWrtShell().getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE))
{
- bDisable = TRUE;
+ bDisable = sal_True;
break;
}
pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this);
@@ -1063,9 +1063,9 @@ void SwDocShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( SID_PRINTPREVIEW );
else
{
- SfxBoolItem aBool( SID_PRINTPREVIEW, FALSE );
+ SfxBoolItem aBool( SID_PRINTPREVIEW, sal_False );
if( PTR_CAST( SwPagePreView, SfxViewShell::Current()) )
- aBool.SetValue( TRUE );
+ aBool.SetValue( sal_True );
rSet.Put( aBool );
}
}
@@ -1074,7 +1074,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
{
SfxViewShell* pCurrView = GetView() ? (SfxViewShell*)GetView()
: SfxViewShell::Current();
- BOOL bSourceView = 0 != PTR_CAST(SwSrcView, pCurrView);
+ sal_Bool bSourceView = 0 != PTR_CAST(SwSrcView, pCurrView);
rSet.Put(SfxBoolItem(SID_SOURCEVIEW, bSourceView));
}
break;
@@ -1119,7 +1119,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
case SID_ATTR_YEAR2000:
{
- const SvNumberFormatter* pFmtr = pDoc->GetNumberFormatter(FALSE);
+ const SvNumberFormatter* pFmtr = pDoc->GetNumberFormatter(sal_False);
rSet.Put( SfxUInt16Item( nWhich,
static_cast< sal_uInt16 >(
pFmtr ? pFmtr->GetYear2000()
@@ -1168,7 +1168,7 @@ IMPL_LINK( SwDocShell, Ole2ModifiedHdl, void *, p )
// Bit 1: -> neuer Zustand
long nStatus = (long)p;
if( IsEnableSetModified() )
- SetModified( (nStatus & 2) ? TRUE : FALSE );
+ SetModified( (nStatus & 2) ? sal_True : sal_False );
return 0;
}
@@ -1217,7 +1217,7 @@ void SwDocShell::LoadingFinished()
// if ( IsEnableSetModified() &&
// pDoc->IsModified() && pDoc->LinksUpdated() )
// {
-// EnableSetModified( FALSE );
+// EnableSetModified( sal_False );
// bResetEnableSetModified = true;
// }
// <--
@@ -1225,7 +1225,7 @@ void SwDocShell::LoadingFinished()
// // --> OD 2005-02-11 #i38810#
// if ( bResetEnableSetModified )
// {
-// EnableSetModified( TRUE );
+// EnableSetModified( sal_True );
// }
// // <--
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst(this);
@@ -1308,7 +1308,7 @@ void SwDocShell::CalcLayoutForOLEObjects()
// read by the binary filter:
void SwDocShell::UpdateLinks()
{
- GetDoc()->UpdateLinks(TRUE);
+ GetDoc()->UpdateLinks(sal_True);
// --> FME 2005-07-27 #i50703# Update footnote numbers
SwTxtFtn::SetUniqueSeqRefNo( *GetDoc() );
SwNodeIndex aTmp( GetDoc()->GetNodes() );
@@ -1385,8 +1385,8 @@ bool SwDocShell::HasChangeRecordProtection() const
void SwDocShell::SetChangeRecording( bool bActivate )
{
- USHORT nOn = bActivate ? nsRedlineMode_t::REDLINE_ON : 0;
- USHORT nMode = pWrtShell->GetRedlineMode();
+ sal_uInt16 nOn = bActivate ? nsRedlineMode_t::REDLINE_ON : 0;
+ sal_uInt16 nMode = pWrtShell->GetRedlineMode();
pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
}
@@ -1399,7 +1399,7 @@ bool SwDocShell::SetProtectionPassword( const String &rNewPassword )
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence< sal_Int8 > aPasswd = pIDRA->GetRedlinePassword();
- if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem )
+ if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, sal_False, &pItem )
&& ((SfxBoolItem*)pItem)->GetValue() == (aPasswd.getLength() > 0))
return false;
@@ -1435,7 +1435,7 @@ bool SwDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence< sal_Int8 > aPasswdHash( pIDRA->GetRedlinePassword() );
- if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem )
+ if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, sal_False, &pItem )
&& ((SfxBoolItem*)pItem)->GetValue() == (aPasswdHash.getLength() != 0))
return false;
rPasswordHash = aPasswdHash;
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 5bbc29aab2ee..c053d21538e3 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -140,7 +140,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
using ::rtl::OUString;
using namespace ::sfx2;
-extern BOOL FindPhyStyle( SwDoc& , const String& , SfxStyleFamily );
+extern sal_Bool FindPhyStyle( SwDoc& , const String& , SfxStyleFamily );
/*--------------------------------------------------------------------
Beschreibung: DocInfo kreieren (virtuell)
@@ -176,7 +176,7 @@ void SwDocShell::DoFlushDocInfo()
bool bUnlockView(true);
if ( pWrtShell ) {
bUnlockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); // lock visible section
+ pWrtShell->LockView( sal_True ); // lock visible section
pWrtShell->StartAllAction();
}
@@ -185,7 +185,7 @@ void SwDocShell::DoFlushDocInfo()
if ( pWrtShell ) {
pWrtShell->EndAllAction();
if ( bUnlockView ) {
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
}
}
@@ -197,7 +197,7 @@ void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVBAEventP
if ( rHint.ISA( SfxEventHint ) )
{
uno::Sequence< uno::Any > aArgs;
- ULONG nEventId = ((SfxEventHint&)rHint).GetEventId();
+ sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId();
switch( nEventId )
{
case SFX_EVENT_CREATEDOC:
@@ -230,7 +230,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
lcl_processCompatibleSfxHint( xVbaEvents, rHint );
#endif
- USHORT nAction = 0;
+ sal_uInt16 nAction = 0;
if( rHint.ISA(SfxSimpleHint) )
{
// swithc for more actions
@@ -252,11 +252,11 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
if( nAction )
{
- BOOL bUnlockView = sal_True; //initializing prevents warning
+ sal_Bool bUnlockView = sal_True; //initializing prevents warning
if( pWrtShell )
{
bUnlockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); //lock visible section
+ pWrtShell->LockView( sal_True ); //lock visible section
pWrtShell->StartAllAction();
}
switch( nAction )
@@ -273,7 +273,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const bool bResetModified = IsEnableSetModified();
if ( bResetModified )
- EnableSetModified( FALSE );
+ EnableSetModified( sal_False );
// --> OD 2005-02-01 #i41679#
const bool bIsDocModified = pDoc->IsModified();
// <--
@@ -285,7 +285,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
pDoc->ResetModified();
// <--
if ( bResetModified )
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
break;
// <--
@@ -295,7 +295,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
pWrtShell->EndAllAction();
if( bUnlockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
}
}
@@ -304,11 +304,11 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
Beschreibung: Benachrichtigung Doc schliessen
--------------------------------------------------------------------*/
-USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
+sal_uInt16 SwDocShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
{
- USHORT nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
+ sal_uInt16 nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
- if( TRUE == nRet ) //Unbedingt auf TRUE abfragen! (RET_NEWTASK)
+ if( sal_True == nRet ) //Unbedingt auf sal_True abfragen! (RET_NEWTASK)
EndListening( *this );
#ifdef FUTURE_VBA
@@ -330,14 +330,14 @@ USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
Beschreibung: Organizer
--------------------------------------------------------------------*/
-BOOL SwDocShell::Insert( SfxObjectShell &rSource,
- USHORT nSourceIdx1, // SourcePool: oberste Inhaltsebene (Vorlagen/Makros)
- USHORT nSourceIdx2, // Index in den Inhalt
- USHORT nSourceIdx3, // Index in die Inhaltsebene
- USHORT &rIdx1, // und das gleiche fuer den DestinationPool
- USHORT &rIdx2, // ""
- USHORT &rIdx3, // ""
- USHORT &rRemovedIdx ) // falls doppelte geloescht werden, Pos zurueck
+sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
+ sal_uInt16 nSourceIdx1, // SourcePool: oberste Inhaltsebene (Vorlagen/Makros)
+ sal_uInt16 nSourceIdx2, // Index in den Inhalt
+ sal_uInt16 nSourceIdx3, // Index in die Inhaltsebene
+ sal_uInt16 &rIdx1, // und das gleiche fuer den DestinationPool
+ sal_uInt16 &rIdx2, // ""
+ sal_uInt16 &rIdx3, // ""
+ sal_uInt16 &rRemovedIdx ) // falls doppelte geloescht werden, Pos zurueck
{
// --> OD 2005-05-10 #i48949# - actions aren't undoable. Thus, allow no undo
// actions
@@ -346,7 +346,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
GetDoc()->DoUndo( sal_False );
// <--
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (INDEX_IGNORE == rIdx1 && CONTENT_STYLE == nSourceIdx1)
rIdx1 = CONTENT_STYLE;
@@ -359,7 +359,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// wir koennen nicht in uns selbst hin und her moven
if( pHisPool == pMyPool )
- return FALSE;
+ return sal_False;
if( INDEX_IGNORE == rIdx2 )
rIdx2 = pMyPool->Count();
@@ -379,10 +379,10 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
( SFX_STYLE_FAMILY_CHAR == eOldFamily &&
rOldName == *SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
RES_POOLCOLL_TEXT_BEGIN ] ))
- return FALSE;
+ return sal_False;
SfxStyleFamily eMyOldFamily( pMyPool->GetSearchFamily() );
- USHORT nMySrchMask = pMyPool->GetSearchMask();
+ sal_uInt16 nMySrchMask = pMyPool->GetSearchMask();
SfxStyleSheetBase* pExist;
if( ::FindPhyStyle( *pDoc, rOldName, eOldFamily ) )
@@ -391,7 +391,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
if( ERRCODE_BUTTON_OK != ErrorHandler::HandleError(
*new MessageInfo( ERRCODE_SFXMSG_STYLEREPLACE, rOldName )) )
{
- return FALSE;
+ return sal_False;
}
// Da Replace den aStyleSheet-Member selbst benoetigt, muss
@@ -405,7 +405,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
GetDoc()->SetModified();
- return TRUE;
+ return sal_True;
}
pMyPool->SetSearchMask( eOldFamily, nMySrchMask );
@@ -439,7 +439,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// Dshalb muss hier der Index der neuen Vorlage im Pool
// ermittelt werden.
pExist = pMyPool->First();
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
while( pExist )
{
if( pExist->GetName() == rOldName &&
@@ -467,7 +467,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// wer bekommt den Neuen als Parent? wer benutzt den Neuen als Follow?
// (immer nur ueber die Instanziierten!!!)
pMyPool->SetSearchMask( eOldFamily, nMySrchMask );
- pMyPool->SetOrganizerMode( TRUE );
+ pMyPool->SetOrganizerMode( sal_True );
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
{
@@ -528,7 +528,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
ASSERT(pDoc, "Doc fehlt");
GetDoc()->SetModified();
- bRet = TRUE;
+ bRet = sal_True;
}
else
bRet = SfxObjectShell::Insert( rSource,
@@ -556,11 +556,11 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
Beschreibung: Vorlagen Remove
--------------------------------------------------------------------*/
-BOOL SwDocShell::Remove(USHORT nIdx1, // siehe Insert
- USHORT nIdx2,
- USHORT nIdx3)
+sal_Bool SwDocShell::Remove(sal_uInt16 nIdx1, // siehe Insert
+ sal_uInt16 nIdx2,
+ sal_uInt16 nIdx3)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (CONTENT_STYLE == nIdx1)
{
@@ -579,13 +579,13 @@ BOOL SwDocShell::Remove(USHORT nIdx1, // siehe Insert
( SFX_STYLE_FAMILY_CHAR == eFamily &&
aName == *SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
RES_POOLCOLL_TEXT_BEGIN ] ))
- return FALSE;
+ return sal_False;
// also loeschen
pMyPool->Remove( pMySheet );
// jetzt noch die Parents/Follows aller Instanziierten korrigieren
- pMyPool->SetOrganizerMode( TRUE );
+ pMyPool->SetOrganizerMode( sal_True );
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
{
@@ -607,7 +607,7 @@ BOOL SwDocShell::Remove(USHORT nIdx1, // siehe Insert
}
pMyPool->SetOrganizerMode( SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
- bRet = TRUE;
+ bRet = sal_True;
}
else
bRet = SfxObjectShell::Remove( nIdx1,
@@ -630,8 +630,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nWhich = rReq.GetSlot();
- BOOL bDone = FALSE;
+ sal_uInt16 nWhich = rReq.GetSlot();
+ sal_Bool bDone = sal_False;
switch ( nWhich )
{
case SID_AUTO_CORRECT_DLG:
@@ -639,10 +639,10 @@ void SwDocShell::Execute(SfxRequest& rReq)
SvxSwAutoFmtFlags* pAFlags = &SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags();
SwAutoCompleteWord& rACW = SwDoc::GetAutoCompleteWords();
- BOOL bOldLocked = rACW.IsLockWordLstLocked(),
+ sal_Bool bOldLocked = rACW.IsLockWordLstLocked(),
bOldAutoCmpltCollectWords = pAFlags->bAutoCmpltCollectWords;
- rACW.SetLockWordLstLocked( TRUE );
+ rACW.SetLockWordLstLocked( sal_True );
SvStringsISortDtor aTmpLst;
aTmpLst.Insert( &rACW.GetWordList() );
@@ -650,7 +650,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SfxApplication* pApp = SFX_APP();
SfxRequest aAppReq(SID_AUTO_CORRECT_DLG, SFX_CALLMODE_SYNCHRON, pApp->GetPool());
- SfxBoolItem aSwOptions( SID_AUTO_CORRECT_DLG, TRUE );
+ SfxBoolItem aSwOptions( SID_AUTO_CORRECT_DLG, sal_True );
aAppReq.AppendItem(aSwOptions);
// SMARTTAGS
@@ -662,7 +662,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
aSet.Put( aSwOptions );
const SfxPoolItem* pOpenSmartTagOptionsItem = 0;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, FALSE, &pOpenSmartTagOptionsItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, sal_False, &pOpenSmartTagOptionsItem ) )
aSet.Put( *static_cast<const SfxBoolItem*>(pOpenSmartTagOptionsItem) );
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
@@ -682,7 +682,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
pAFlags->pAutoCmpltList = 0;
}
// remove all pointer we never delete the strings
- aTmpLst.Remove( (USHORT)0, aTmpLst.Count() );
+ aTmpLst.Remove( (sal_uInt16)0, aTmpLst.Count() );
if( !bOldAutoCmpltCollectWords && bOldAutoCmpltCollectWords !=
pAFlags->bAutoCmpltCollectWords )
@@ -704,20 +704,20 @@ void SwDocShell::Execute(SfxRequest& rReq)
case SID_PRINTPREVIEW:
{
- BOOL bSet = FALSE, bFound = FALSE, bOnly = TRUE;
+ sal_Bool bSet = sal_False, bFound = sal_False, bOnly = sal_True;
SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this);
SfxViewShell* pViewShell = SfxViewShell::Current();
SwView* pCurrView = dynamic_cast< SwView *> ( pViewShell );
- BOOL bCurrent = IS_TYPE( SwPagePreView, pViewShell );
+ sal_Bool bCurrent = IS_TYPE( SwPagePreView, pViewShell );
while( pTmpFrm ) // search PreView
{
if( IS_TYPE( SwView, pTmpFrm->GetViewShell()) )
- bOnly = FALSE;
+ bOnly = sal_False;
else if( IS_TYPE( SwPagePreView, pTmpFrm->GetViewShell()))
{
pTmpFrm->GetFrame().Appear();
- bFound = TRUE;
+ bFound = sal_True;
}
if( bFound && !bOnly )
break;
@@ -725,12 +725,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
if( pArgs && SFX_ITEM_SET ==
- pArgs->GetItemState( SID_PRINTPREVIEW, FALSE, &pItem ))
+ pArgs->GetItemState( SID_PRINTPREVIEW, sal_False, &pItem ))
bSet = ((SfxBoolItem*)pItem)->GetValue();
else
bSet = !bCurrent;
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
if( bSet && !bFound ) // Keine gefunden, daher neue Preview anlegen
{
//Keine neue anlegen fuer BrowseView!
@@ -761,14 +761,14 @@ void SwDocShell::Execute(SfxRequest& rReq)
case SID_TEMPLATE_LOAD:
{
String aFileName;
- static BOOL bText = TRUE;
- static BOOL bFrame = FALSE;
- static BOOL bPage = FALSE;
- static BOOL bNum = FALSE;
- static BOOL bMerge = FALSE;
- USHORT nRet = USHRT_MAX;
-
- USHORT nFlags = bFrame ? SFX_LOAD_FRAME_STYLES : 0;
+ static sal_Bool bText = sal_True;
+ static sal_Bool bFrame = sal_False;
+ static sal_Bool bPage = sal_False;
+ static sal_Bool bNum = sal_False;
+ static sal_Bool bMerge = sal_False;
+ sal_uInt16 nRet = USHRT_MAX;
+
+ sal_uInt16 nFlags = bFrame ? SFX_LOAD_FRAME_STYLES : 0;
if(bPage)
nFlags|= SFX_LOAD_PAGE_STYLES;
if(bNum)
@@ -780,13 +780,13 @@ void SwDocShell::Execute(SfxRequest& rReq)
if ( pArgs )
{
- SFX_REQUEST_ARG( rReq, pTemplateItem, SfxStringItem, SID_TEMPLATE_NAME, FALSE );
+ SFX_REQUEST_ARG( rReq, pTemplateItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False );
if ( pTemplateItem )
{
aFileName = pTemplateItem->GetValue();
- SFX_REQUEST_ARG( rReq, pFlagsItem, SfxInt32Item, SID_TEMPLATE_LOAD, FALSE );
+ SFX_REQUEST_ARG( rReq, pFlagsItem, SfxInt32Item, SID_TEMPLATE_LOAD, sal_False );
if ( pFlagsItem )
- nFlags = (USHORT) pFlagsItem->GetValue();
+ nFlags = (sal_uInt16) pFlagsItem->GetValue();
}
}
@@ -819,7 +819,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
pFlt = aIter.Next();
}
- BOOL bWeb = 0 != dynamic_cast< SwWebDocShell *>( this );
+ sal_Bool bWeb = 0 != dynamic_cast< SwWebDocShell *>( this );
const SfxFilter *pOwnFlt =
SwDocShell::Factory().GetFilterContainer()->
GetFilter4FilterName(String::CreateFromAscii("writer8"));
@@ -869,7 +869,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
bMerge = 0 != (nFlags&SFX_MERGE_STYLES);
aOpt.SetMerge( !bMerge );
- SetError( LoadStylesFromFile( aFileName, aOpt, FALSE ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
+ SetError( LoadStylesFromFile( aFileName, aOpt, sal_False ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
if ( !GetError() )
rReq.Done();
}
@@ -892,7 +892,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SwIoSystem::GetFilterOfFormat(
String::CreateFromAscii("HTML"),
SwWebDocShell::Factory().GetFilterContainer() );
- BOOL bLocalHasName = HasName();
+ sal_Bool bLocalHasName = HasName();
if(bLocalHasName)
{
//check for filter type
@@ -901,7 +901,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
QueryBox aQuery(&pViewFrm->GetWindow(), SW_RES(MSG_SAVEAS_HTML_QUERY));
if(RET_YES == aQuery.Execute())
- bLocalHasName = FALSE;
+ bLocalHasName = sal_False;
else
break;
}
@@ -927,13 +927,13 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
#ifdef DBG_UTIL
{
- BOOL bWeb = 0 != dynamic_cast<SwWebDocShell*>(this);
- DBG_ASSERT(bWeb == TRUE, "SourceView nur in der WebDocShell");
+ sal_Bool bWeb = 0 != dynamic_cast<SwWebDocShell*>(this);
+ DBG_ASSERT(bWeb == sal_True, "SourceView nur in der WebDocShell");
}
#endif
// die SourceView ist fuer die SwWebDocShell die 1
- USHORT nSlot = SID_VIEWSHELL1;
- BOOL bSetModified = FALSE;
+ sal_uInt16 nSlot = SID_VIEWSHELL1;
+ sal_Bool bSetModified = sal_False;
SfxPrinter* pSavePrinter = 0;
if( 0 != pSrcView)
{
@@ -946,7 +946,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
pSrcView->SaveContent(aTempFile.GetURL());
- bDone = TRUE;
+ bDone = sal_True;
SfxEventConfiguration* pEvent = SFX_APP()->GetEventConfig();
SvxMacro aMac(aEmptyStr, aEmptyStr, STARBASIC);
pEvent->ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_OPENDOC ), aMac, this);
@@ -965,7 +965,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
Export in den SourceMode und dem Speichern des Docs
else if(IsModified())
{
- USHORT nRet = QueryBox( SFX_APPWINDOW ,SW_RES(MSG_SAVE_HTML_QUERY)).Execute();
+ sal_uInt16 nRet = QueryBox( SFX_APPWINDOW ,SW_RES(MSG_SAVE_HTML_QUERY)).Execute();
if(RET_YES == nRet)
{
S F X _DISPATCHER().Execute(SID_SAVEDOC,
@@ -1010,13 +1010,13 @@ void SwDocShell::Execute(SfxRequest& rReq)
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
- BYTE nLevel = pDlg->GetLevel();
- BYTE nPara = pDlg->GetPara();
+ sal_uInt8 nLevel = pDlg->GetLevel();
+ sal_uInt8 nPara = pDlg->GetPara();
SwDoc* pSmryDoc = new SwDoc();
SfxObjectShellRef xDocSh( new SwDocShell( pSmryDoc, SFX_CREATE_MODE_STANDARD));
xDocSh->DoInitNew( 0 );
- BOOL bImpress = FN_ABSTRACT_STARIMPRESS == nWhich;
+ sal_Bool bImpress = FN_ABSTRACT_STARIMPRESS == nWhich;
pDoc->Summary( pSmryDoc, nLevel, nPara, bImpress );
if( bImpress )
{
@@ -1044,12 +1044,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
pStrm->Seek( STREAM_SEEK_TO_BEGIN );
// Transfer ownership of stream to a lockbytes object
- SvLockBytes aLockBytes( pStrm, TRUE );
+ SvLockBytes aLockBytes( pStrm, sal_True );
SvLockBytesStat aStat;
if ( aLockBytes.Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
{
sal_uInt32 nLen = aStat.nSize;
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
uno::Sequence< sal_Int8 > aSeq( nLen );
aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead );
@@ -1115,12 +1115,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
pStrm->Seek( STREAM_SEEK_TO_BEGIN );
// Transfer ownership of stream to a lockbytes object
- SvLockBytes aLockBytes( pStrm, TRUE );
+ SvLockBytes aLockBytes( pStrm, sal_True );
SvLockBytesStat aStat;
if ( aLockBytes.Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
{
sal_uInt32 nLen = aStat.nSize;
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
uno::Sequence< sal_Int8 > aSeq( nLen );
aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead );
@@ -1151,17 +1151,17 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
break;
case SID_SPELLCHECKER_CHANGED:
- //! FALSE, TRUE, TRUE is on the save side but a probably overdone
- SW_MOD()->CheckSpellChanges(FALSE, TRUE, TRUE, FALSE );
+ //! sal_False, sal_True, sal_True is on the save side but a probably overdone
+ SW_MOD()->CheckSpellChanges(sal_False, sal_True, sal_True, sal_False );
break;
case SID_BROWSER_MODE:
case FN_PRINT_LAYOUT: //Fuer Web, genau umgekehrt zum BrowserMode
{
int eState = STATE_TOGGLE;
- BOOL bSet = sal_True;
+ sal_Bool bSet = sal_True;
const SfxPoolItem* pAttr=NULL;
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , FALSE, &pAttr ))
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_False, &pAttr ))
{
bSet = ((SfxBoolItem*)pAttr)->GetValue();
if ( nWhich == FN_PRINT_LAYOUT )
@@ -1175,7 +1175,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
ToggleBrowserMode(bSet, 0);
// OS: numerische Reihenfolge beachten!
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{
SID_NEWWINDOW,/*5620*/
SID_BROWSER_MODE, /*6313*/
@@ -1234,14 +1234,14 @@ void SwDocShell::Execute(SfxRequest& rReq)
case FN_NEW_HTML_DOC:
case FN_NEW_GLOBAL_DOC:
{
- bDone = FALSE;
- BOOL bCreateHtml = FN_NEW_HTML_DOC == nWhich;
+ bDone = sal_False;
+ sal_Bool bCreateHtml = FN_NEW_HTML_DOC == nWhich;
- BOOL bCreateByOutlineLevel = false; //#outline level,add by zhaojianwei
+ sal_Bool bCreateByOutlineLevel = false; //#outline level,add by zhaojianwei
sal_Int32 nTemplateOutlineLevel = 0 ; //#outline level,add by zhaojianwei
String aFileName, aTemplateName;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich, FALSE, &pItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich, sal_False, &pItem ) )
{
aFileName = ((const SfxStringItem*)pItem)->GetValue();
SFX_ITEMSET_ARG( pArgs, pTemplItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False );
@@ -1293,7 +1293,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
const SfxFilter* pFlt;
- USHORT nStrId;
+ sal_uInt16 nStrId;
if( bCreateHtml )
{
@@ -1332,14 +1332,14 @@ void SwDocShell::Execute(SfxRequest& rReq)
//#removed by zhaojianwei
- // const USHORT nCount = pDoc->GetTxtFmtColls()->Count();
+ // const sal_uInt16 nCount = pDoc->GetTxtFmtColls()->Count();
// Sequence<OUString> aListBoxEntries(nCount);
// OUString* pEntries = aListBoxEntries.getArray();
// sal_Int32 nIdx = 0;
// sal_Int16 nSelect = 0;
// OUString sStartTemplate;
// SwTxtFmtColl *pFnd = 0, *pAny = 0;
- // for(USHORT i = 0; i < nCount; ++i)
+ // for(sal_uInt16 i = 0; i < nCount; ++i)
// {
// SwTxtFmtColl &rTxtColl =
// *pDoc->GetTxtFmtColls()->GetObject( i );
@@ -1373,7 +1373,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
if( rOutlNds.Count() )
{
int nLevel;
- for(USHORT n = 0; n < rOutlNds.Count(); ++n )
+ for(sal_uInt16 n = 0; n < rOutlNds.Count(); ++n )
if( ( nLevel = rOutlNds[n]->GetTxtNode()->GetAttrOutlineLevel()) > 0 &&
! bOutline[nLevel-1] )
{
@@ -1381,20 +1381,20 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
}
- const USHORT nStyleCount = pDoc->GetTxtFmtColls()->Count();
+ const sal_uInt16 nStyleCount = pDoc->GetTxtFmtColls()->Count();
Sequence<OUString> aListBoxEntries( MAXLEVEL + nStyleCount);
OUString* pEntries = aListBoxEntries.getArray();
sal_Int32 nIdx = 0 ;
OUString sOutline( SW_RESSTR(STR_FDLG_OUTLINE_LEVEL) );
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
if( bOutline[i] )
pEntries[nIdx++] = sOutline + String::CreateFromInt32( i+1 );
}
OUString sStyle( SW_RESSTR(STR_FDLG_STYLE) );
- for(USHORT i = 0; i < nStyleCount; ++i)
+ for(sal_uInt16 i = 0; i < nStyleCount; ++i)
{
SwTxtFmtColl &rTxtColl =
*pDoc->GetTxtFmtColls()->GetObject( i );
@@ -1469,9 +1469,9 @@ void SwDocShell::Execute(SfxRequest& rReq)
//<-end,zhaojianwei
if( aFileName.Len() )
{
- if( PrepareClose( FALSE ) )
+ if( PrepareClose( sal_False ) )
{
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
//bDone = bCreateHtml //#outline level,removed by zhaojianwei
// ? pDoc->GenerateHTMLDoc( aFileName, pSplitColl )
@@ -1533,10 +1533,10 @@ void SwDocShell::Execute(SfxRequest& rReq)
break;
case SID_ATTR_YEAR2000:
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , FALSE, &pItem ))
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_False, &pItem ))
{
DBG_ASSERT(pItem->ISA(SfxUInt16Item), "falsches Item");
- USHORT nYear2K = ((SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nYear2K = ((SfxUInt16Item*)pItem)->GetValue();
//ueber Views iterieren und den State an den FormShells setzen
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst( this );
@@ -1551,7 +1551,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
pCurrView = dynamic_cast<SwView*>( pViewShell );
}
- pDoc->GetNumberFormatter(TRUE)->SetYear2000(nYear2K);
+ pDoc->GetNumberFormatter(sal_True)->SetYear2000(nYear2K);
}
break;
@@ -1624,17 +1624,17 @@ void SwDocShell::FillClass( SvGlobalName * pClassName,
Beschreibung:
--------------------------------------------------------------------*/
-void SwDocShell::SetModified( BOOL bSet )
+void SwDocShell::SetModified( sal_Bool bSet )
{
SfxObjectShell::SetModified( bSet );
if( IsEnableSetModified())
{
if (!pDoc->IsInCallModified() )
{
- EnableSetModified( FALSE );
+ EnableSetModified( sal_False );
if( bSet )
{
- BOOL bOld = pDoc->IsModified();
+ sal_Bool bOld = pDoc->IsModified();
pDoc->SetModified();
if( !bOld )
pDoc->SetUndoNoResetModified();
@@ -1642,7 +1642,7 @@ void SwDocShell::SetModified( BOOL bSet )
else
pDoc->ResetModified();
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
UpdateChildWindows();
@@ -1690,7 +1690,7 @@ class SwReloadFromHtmlReader : public SwReader
// <--
void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView )
{
- BOOL bModified = IsModified();
+ sal_Bool bModified = IsModified();
// MIB 23.6.97: Die HTTP-Header-Felder muessen geloescht werden,
// sonst gibt es welche aus Meta-Tags hinter doppelt und dreifach.
@@ -1709,7 +1709,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
BasicManager *pBasicMan = GetBasicManager();
if( pBasicMan && (pBasicMan != SFX_APP()->GetBasicManager()) )
{
- USHORT nLibCount = pBasicMan->GetLibCount();
+ sal_uInt16 nLibCount = pBasicMan->GetLibCount();
while( nLibCount )
{
StarBASIC *pBasic = pBasicMan->GetLib( --nLibCount );
@@ -1726,7 +1726,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
// Aus der Standard-Lib werden nur die Module geloescht
if( nLibCount )
- pBasicMan->RemoveLib( nLibCount, TRUE );
+ pBasicMan->RemoveLib( nLibCount, sal_True );
else
pBasic->Clear();
}
@@ -1763,7 +1763,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
SubInitNew();
- SfxMedium aMed( rStreamName, STREAM_READ, FALSE );
+ SfxMedium aMed( rStreamName, STREAM_READ, sal_False );
// --> OD 2005-08-01 #i48748# - use class <SwReloadFromHtmlReader>, because
// the base URL has to be set to the filename of the document <rMedname>
// and not to the base URL of the temporary file <aMed> in order to get
@@ -1779,7 +1779,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
{
SwWrtShell& rWrtSh = pCurrView->GetWrtShell();
if( rWrtSh.GetLayout())
- rWrtSh.CheckBrowseView( TRUE );
+ rWrtSh.CheckBrowseView( sal_True );
}
@@ -1797,7 +1797,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
/* -----------------------------14.12.99 16:52--------------------------------
---------------------------------------------------------------------------*/
-void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
+void SwDocShell::ToggleBrowserMode(sal_Bool bSet, SwView* _pView )
{
GetDoc()->set(IDocumentSettingAccess::BROWSE_MODE, bSet );
UpdateFontList();
@@ -1822,15 +1822,15 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
// Currently there can be only one view (layout) if the document is viewed in Web layout
// So if there are more views we are in print layout and for toggling to Web layout all other views must be closed
- SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, FALSE);
+ SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, sal_False);
do {
if( pTmpFrm != pTempView->GetViewFrame() )
{
pTmpFrm->DoClose();
- pTmpFrm = SfxViewFrame::GetFirst(this, FALSE);
+ pTmpFrm = SfxViewFrame::GetFirst(this, sal_False);
}
else
- pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, FALSE);
+ pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, sal_False);
} while ( pTmpFrm );
@@ -1839,7 +1839,7 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
// set view columns before toggling:
if ( bSet )
{
- const USHORT nColumns = rViewOptions.GetViewLayoutColumns();
+ const sal_uInt16 nColumns = rViewOptions.GetViewLayoutColumns();
const bool bBookMode = rViewOptions.IsViewLayoutBookMode();
if ( 1 != nColumns || bBookMode )
{
@@ -1848,7 +1848,7 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
}
// Triggeres a formatting:
- pTempView->GetWrtShell().CheckBrowseView( TRUE );
+ pTempView->GetWrtShell().CheckBrowseView( sal_True );
pTempView->CheckVisArea();
if( GetDoc()->get(IDocumentSettingAccess::BROWSE_MODE) )
@@ -1865,10 +1865,10 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
}
}
-ULONG SwDocShell::LoadStylesFromFile( const String& rURL,
- SwgReaderOption& rOpt, BOOL bUnoCall )
+sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL,
+ SwgReaderOption& rOpt, sal_Bool bUnoCall )
{
- ULONG nErr = 0;
+ sal_uLong nErr = 0;
// Create a URL from filename
INetURLObject aURLObj( rURL );
@@ -1884,14 +1884,14 @@ ULONG SwDocShell::LoadStylesFromFile( const String& rURL,
SfxFilterMatcher aMatcher( sFactory );
//#b6445961# search for filter in WebDocShell, too
- SfxMedium aMed( rURL, STREAM_STD_READ, FALSE );
+ SfxMedium aMed( rURL, STREAM_STD_READ, sal_False );
const SfxFilter* pFlt = 0;
- aMatcher.DetectFilter( aMed, &pFlt, FALSE, FALSE );
+ aMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False );
if(!pFlt)
{
String sWebFactory(String::CreateFromAscii(SwWebDocShell::Factory().GetShortName()));
SfxFilterMatcher aWebMatcher( sWebFactory );
- aWebMatcher.DetectFilter( aMed, &pFlt, FALSE, FALSE );
+ aWebMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False );
}
if( aMed.IsStorage() )
{
diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx
index 98fe7316ecd5..f39cbca5f305 100644
--- a/sw/source/ui/app/docshini.cxx
+++ b/sw/source/ui/app/docshini.cxx
@@ -170,30 +170,30 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
SfxPrinter* pPrt = pDoc->getPrinter( false );
String sEntry;
- USHORT aFontWhich[] =
+ sal_uInt16 aFontWhich[] =
{ RES_CHRATR_FONT,
RES_CHRATR_CJK_FONT,
RES_CHRATR_CTL_FONT
};
- USHORT aFontHeightWhich[] =
+ sal_uInt16 aFontHeightWhich[] =
{
RES_CHRATR_FONTSIZE,
RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE
};
- USHORT aFontIds[] =
+ sal_uInt16 aFontIds[] =
{
FONT_STANDARD,
FONT_STANDARD_CJK,
FONT_STANDARD_CTL
};
- USHORT nFontTypes[] =
+ sal_uInt16 nFontTypes[] =
{
DEFAULTFONT_LATIN_TEXT,
DEFAULTFONT_CJK_TEXT,
DEFAULTFONT_CTL_TEXT
};
- USHORT aLangTypes[] =
+ sal_uInt16 aLangTypes[] =
{
RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE,
@@ -202,8 +202,8 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
for(sal_uInt8 i = 0; i < 3; i++)
{
- USHORT nFontWhich = aFontWhich[i];
- USHORT nFontId = aFontIds[i];
+ sal_uInt16 nFontWhich = aFontWhich[i];
+ sal_uInt16 nFontId = aFontIds[i];
SvxFontItem* pFontItem = 0;
const SvxLanguageItem& rLang = (const SvxLanguageItem&)pDoc->GetDefault( aLangTypes[i] );
LanguageType eLanguage = rLang.GetLanguage();
@@ -266,7 +266,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
}
}
- USHORT aFontIdPoolId[] =
+ sal_uInt16 aFontIdPoolId[] =
{
FONT_OUTLINE, RES_POOLCOLL_HEADLINE_BASE,
FONT_LIST, RES_POOLCOLL_NUMBUL_BASE,
@@ -282,8 +282,8 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
FONT_INDEX_CTL, RES_POOLCOLL_REGISTER_BASE
};
- USHORT nFontWhich = RES_CHRATR_FONT;
- USHORT nFontHeightWhich = RES_CHRATR_FONTSIZE;
+ sal_uInt16 nFontWhich = RES_CHRATR_FONT;
+ sal_uInt16 nFontHeightWhich = RES_CHRATR_FONTSIZE;
LanguageType eLanguage = static_cast<const SvxLanguageItem&>(pDoc->GetDefault( RES_CHRATR_LANGUAGE )).GetLanguage();
for(sal_uInt8 nIdx = 0; nIdx < 24; nIdx += 2)
{
@@ -351,14 +351,14 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
pDoc->SetDefault( SvxAdjustItem(SVX_ADJUST_RIGHT, RES_PARATR_ADJUST ) );
// OD 09.10.2003 #i18732# - set dynamic pool default for
- // item RES_FOLLOW_TEXT_FLOW to FALSE for *new document*.
+ // item RES_FOLLOW_TEXT_FLOW to sal_False for *new document*.
// Thus, redo this change in method <SwDoc::RemoveAllFmtLanguageDependencies()>,
// which is called from <SwDocShell::ConvertFrom(..)> in order to restore
// the static pool default.
- pDoc->SetDefault( SwFmtFollowTextFlow( FALSE ) );
+ pDoc->SetDefault( SwFmtFollowTextFlow( sal_False ) );
// --> collapsing borders FME 2005-05-27 #i29550#
- pDoc->SetDefault( SfxBoolItem( RES_COLLAPSING_BORDERS, TRUE ) );
+ pDoc->SetDefault( SfxBoolItem( RES_COLLAPSING_BORDERS, sal_True ) );
// <-- collapsing
//#i16874# AutoKerning as default for new documents
@@ -605,10 +605,10 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium )
{
if( ReadXML )
{
- ReadXML->SetOrganizerMode( TRUE );
+ ReadXML->SetOrganizerMode( sal_True );
SwReader aRdr( rMedium, aEmptyStr, pDoc );
nErr = aRdr.Read( *ReadXML );
- ReadXML->SetOrganizerMode( FALSE );
+ ReadXML->SetOrganizerMode( sal_False );
}
}
break;
@@ -716,10 +716,10 @@ sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium )
mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
if( ReadXML )
{
- ReadXML->SetOrganizerMode( TRUE );
+ ReadXML->SetOrganizerMode( sal_True );
SwReader aRdr( rMedium, aEmptyStr, pDoc );
nErr = aRdr.Read( *ReadXML );
- ReadXML->SetOrganizerMode( FALSE );
+ ReadXML->SetOrganizerMode( sal_False );
}
}
}
@@ -736,7 +736,7 @@ sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium )
if( !pFltr || !pFltr->GetUserData().EqualsAscii( FILTER_SWG ))
break;
- SfxMedium aMed( rNm, STREAM_STD_READ, FALSE );
+ SfxMedium aMed( rNm, STREAM_STD_READ, sal_False );
if( 0 == ( nErr = aMed.GetInStream()->GetError() ) )
{
SwWait aWait( *this, sal_True );
@@ -799,12 +799,12 @@ void SwDocShell::SubInitNew()
{
SvxHyphenZoneItem aHyp( (SvxHyphenZoneItem&) pDoc->GetDefault(
RES_PARATR_HYPHENZONE) );
- aHyp.GetMinLead() = static_cast< BYTE >(aLinguOpt.nHyphMinLeading);
- aHyp.GetMinTrail() = static_cast< BYTE >(aLinguOpt.nHyphMinTrailing);
+ aHyp.GetMinLead() = static_cast< sal_uInt8 >(aLinguOpt.nHyphMinLeading);
+ aHyp.GetMinTrail() = static_cast< sal_uInt8 >(aLinguOpt.nHyphMinTrailing);
aDfltSet.Put( aHyp );
- sal_uInt16 nNewPos = static_cast< sal_uInt16 >(SW_MOD()->GetUsrPref(FALSE)->GetDefTab());
+ sal_uInt16 nNewPos = static_cast< sal_uInt16 >(SW_MOD()->GetUsrPref(sal_False)->GetDefTab());
if( nNewPos )
aDfltSet.Put( SvxTabStopItem( 1, nNewPos,
SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ) );
@@ -816,7 +816,7 @@ void SwDocShell::SubInitNew()
//default page mode for text grid
if(!bWeb)
{
- sal_Bool bSquaredPageMode = SW_MOD()->GetUsrPref(FALSE)->IsSquaredPageMode();
+ sal_Bool bSquaredPageMode = SW_MOD()->GetUsrPref(sal_False)->IsSquaredPageMode();
pDoc->SetDefaultPageMode( bSquaredPageMode );
}
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index d06ab31b7478..5740300d3e66 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -95,8 +95,8 @@ using namespace ::com::sun::star;
void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
- USHORT nActualFamily = USHRT_MAX;
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_uInt16 nActualFamily = USHRT_MAX;
SwWrtShell* pShell = pSh ? pSh : GetWrtShell();
if(!pShell)
@@ -113,7 +113,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
SfxViewFrame* pFrame = pShell->GetView().GetViewFrame();
const ISfxTemplateCommon* pCommon = SFX_APP()->GetCurrentTemplateCommon(pFrame->GetBindings());
if( pCommon )
- nActualFamily = static_cast< USHORT >(pCommon->GetActualFamily());
+ nActualFamily = static_cast< sal_uInt16 >(pCommon->GetActualFamily());
}
while (nWhich)
@@ -163,12 +163,12 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
SfxTemplateItem aItem(nWhich, aName);
- USHORT nMask = 0;
+ sal_uInt16 nMask = 0;
if( pDoc->get(IDocumentSettingAccess::HTML_MODE) )
nMask = SWSTYLEBIT_HTML;
else
{
- const int nSelection = pShell->GetFrmType(0,TRUE);
+ const int nSelection = pShell->GetFrmType(0,sal_True);
if(pShell->GetCurTOX())
nMask = SWSTYLEBIT_IDX ;
else if(nSelection & FRMTYPE_HEADER ||
@@ -210,7 +210,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
rSet.DisableItem( nWhich );
else
{
- USHORT n = pShell->GetCurPageDesc( FALSE );
+ sal_uInt16 n = pShell->GetCurPageDesc( sal_False );
if( n < pShell->GetPageDescCnt() )
aName = pShell->GetPageDesc( n ).GetName();
@@ -271,42 +271,42 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
- USHORT nRet = 0xffff;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_uInt16 nRet = 0xffff;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
SwWrtShell* pActShell = 0;
- BOOL bSetReturn = TRUE;
+ sal_Bool bSetReturn = sal_True;
switch (nSlot)
{
case SID_STYLE_NEW:
if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
- USHORT nFamily = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nFamily = ((const SfxUInt16Item*)pItem)->GetValue();
String sName;
- USHORT nMask = 0;
+ sal_uInt16 nMask = 0;
if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_NEW,
- FALSE, &pItem ))
+ sal_False, &pItem ))
sName = ((const SfxStringItem*)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_MASK,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nMask = ((const SfxUInt16Item*)pItem)->GetValue();
String sParent;
if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
sParent = ((const SfxStringItem*)pItem)->GetValue();
- nRet = Edit( sName, sParent, nFamily, nMask, TRUE, FALSE, 0, rReq.IsAPI() );
+ nRet = Edit( sName, sParent, nFamily, nMask, sal_True, sal_False, 0, rReq.IsAPI() );
}
break;
case SID_STYLE_APPLY:
if( !pArgs )
{
- GetView()->GetViewFrame()->GetDispatcher()->Execute(SID_STYLE_DESIGNER, FALSE);
+ GetView()->GetViewFrame()->GetDispatcher()->Execute(SID_STYLE_DESIGNER, sal_False);
break;
}
else
@@ -345,8 +345,8 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
case SID_STYLE_NEW_BY_EXAMPLE:
{
String aParam;
- USHORT nFamily = SFX_STYLE_FAMILY_PARA;
- USHORT nMask = 0;
+ sal_uInt16 nFamily = SFX_STYLE_FAMILY_PARA;
+ sal_uInt16 nMask = 0;
if( !pArgs )
{
@@ -386,14 +386,14 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
ASSERT( pArgs->Count(), "SfxBug ItemSet ist leer");
SwWrtShell* pShell = GetWrtShell();
- if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ))
aParam = ((const SfxStringItem*)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILY,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nFamily = ((const SfxUInt16Item*)pItem)->GetValue();
- if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, sal_False, &pItem ))
{
String aFamily = ((const SfxStringItem*)pItem)->GetValue();
if(aFamily.CompareToAscii("CharacterStyles") == COMPARE_EQUAL)
@@ -413,10 +413,10 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
}
if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_MASK,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nMask = ((const SfxUInt16Item*)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_WRTSHELL,
- FALSE, &pItem ))
+ sal_False, &pItem ))
pActShell = pShell = (SwWrtShell*)((SwPtrItem*)pItem)->GetValue();
if( nSlot == SID_STYLE_UPDATE_BY_EXAMPLE )
@@ -445,7 +445,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
}
break;
case SFX_STYLE_FAMILY_PSEUDO:
- if(SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, sal_False, &pItem))
{
aParam = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -459,7 +459,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
switch(nSlot)
{
case SID_STYLE_EDIT:
- nRet = Edit(aParam, aEmptyStr, nFamily, nMask, FALSE, FALSE, pActShell );
+ nRet = Edit(aParam, aEmptyStr, nFamily, nMask, sal_False, sal_False, pActShell );
break;
case SID_STYLE_DELETE:
nRet = Delete(aParam, nFamily);
@@ -497,7 +497,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
if(bSetReturn)
{
- if(rReq.IsAPI()) // Basic bekommt nur TRUE oder FALSE
+ if(rReq.IsAPI()) // Basic bekommt nur sal_True oder sal_False
rReq.SetReturnValue(SfxUInt16Item(nSlot, nRet !=0));
else
rReq.SetReturnValue(SfxUInt16Item(nSlot, nRet));
@@ -510,15 +510,15 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
--------------------------------------------------------------------*/
-USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFamily, USHORT nMask,
- BOOL bNew, BOOL bColumn, SwWrtShell* pActShell,
- BOOL bBasic )
+sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uInt16 nFamily, sal_uInt16 nMask,
+ sal_Bool bNew, sal_Bool bColumn, SwWrtShell* pActShell,
+ sal_Bool bBasic )
{
ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
SfxStyleSheetBase *pStyle = 0;
- USHORT nRet = nMask;
- BOOL bModified = pDoc->IsModified();
+ sal_uInt16 nRet = nMask;
+ sal_Bool bModified = pDoc->IsModified();
if( bNew )
{
@@ -540,7 +540,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SwTxtFmtColl* pColl = pWrtShell->FindTxtFmtCollByName( rParent );
if(!pColl)
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
if(USHRT_MAX != nId)
pColl = pWrtShell->GetTxtCollFromPool( nId );
}
@@ -577,7 +577,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SwCharFmt* pCFmt = pWrtShell->FindCharFmtByName( rParent );
if(!pCFmt)
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
if(USHRT_MAX != nId)
pCFmt = pWrtShell->GetCharFmtFromPool( nId );
}
@@ -601,7 +601,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SwFrmFmt* pFFmt = pWrtShell->GetDoc()->FindFrmFmtByName( rParent );
if(!pFFmt)
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
if(USHRT_MAX != nId)
pFFmt = pWrtShell->GetFrmFmtFromPool( nId );
}
@@ -619,7 +619,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
}
if(!pStyle)
- return FALSE;
+ return sal_False;
// Dialoge zusammenstoepseln
//
@@ -652,7 +652,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SfxItemSet& rSet = xTmp->GetItemSet();
const SfxPoolItem *pTmpBrush;
if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_BACKGROUND,
- TRUE, &pTmpBrush ) )
+ sal_True, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_BACKGROUND );
@@ -662,7 +662,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
if (!bBasic)
{
// vor dem Dialog wird der HtmlMode an der DocShell versenkt
- USHORT nHtmlMode = ::GetHtmlMode(this);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(this);
// In HTML mode, we do not always have a printer. In order to show
// the correct page size in the Format - Page dialog, we have to
@@ -674,7 +674,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
PutItem(SfxUInt16Item(SID_HTML_MODE, nHtmlMode));
FieldUnit eMetric = ::GetDfltMetric(0 != (HTMLMODE_ON&nHtmlMode));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateTemplateDialog( DLG_TEMPLATE_BASE,
@@ -709,7 +709,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
{
if(SFX_STYLE_FAMILY_PAGE == nFamily)
{
- static const USHORT aInval[] = {
+ static const sal_uInt16 aInval[] = {
SID_IMAGE_ORIENTATION,
SID_ATTR_CHAR_FONT,
FN_INSERT_CTRL, FN_INSERT_OBJ_CTRL, 0};
@@ -720,7 +720,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
{
const SfxPoolItem *pTmpBrush;
if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND,
- FALSE, &pTmpBrush ) )
+ sal_False, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
@@ -733,7 +733,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
if( SFX_STYLE_FAMILY_PAGE == nFamily && SvtLanguageOptions().IsCTLFontEnabled() )
{
const SfxPoolItem *pItem = NULL;
- if( aTmpSet.GetItemState( GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, FALSE ) , TRUE, &pItem ) == SFX_ITEM_SET )
+ if( aTmpSet.GetItemState( GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, sal_False ) , sal_True, &pItem ) == SFX_ITEM_SET )
SwChartHelper::DoUpdateAllCharts( pDoc );
}
}
@@ -796,7 +796,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
{
const SfxPoolItem *pTmpBrush;
if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND,
- FALSE, &pTmpBrush ) )
+ sal_False, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
@@ -826,7 +826,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
--------------------------------------------------------------------*/
-USHORT SwDocShell::Delete(const String &rName, USHORT nFamily)
+sal_uInt16 SwDocShell::Delete(const String &rName, sal_uInt16 nFamily)
{
SfxStyleSheetBase *pStyle = mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
@@ -838,9 +838,9 @@ USHORT SwDocShell::Delete(const String &rName, USHORT nFamily)
mxBasePool->Remove(pStyle);
GetWrtShell()->EndAllAction();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -848,15 +848,15 @@ USHORT SwDocShell::Delete(const String &rName, USHORT nFamily)
--------------------------------------------------------------------*/
-USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily,
- SwWrtShell* pShell, USHORT nMode )
+sal_uInt16 SwDocShell::ApplyStyles(const String &rName, sal_uInt16 nFamily,
+ SwWrtShell* pShell, sal_uInt16 nMode )
{
SwDocStyleSheet* pStyle =
(SwDocStyleSheet*)mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
ASSERT(pStyle, "Wo ist der StyleSheet");
if(!pStyle)
- return FALSE;
+ return sal_False;
SwWrtShell *pSh = pShell ? pShell : GetWrtShell();
@@ -919,15 +919,15 @@ USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily,
-USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily)
+sal_uInt16 SwDocShell::DoWaterCan(const String &rName, sal_uInt16 nFamily)
{
ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
SwEditWin& rEdtWin = pView->GetEditWin();
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
- BOOL bWaterCan = !(pApply && pApply->eType != 0);
+ sal_Bool bWaterCan = !(pApply && pApply->eType != 0);
if( !rName.Len() )
- bWaterCan = FALSE;
+ bWaterCan = sal_False;
SwApplyTemplate aTemplate;
aTemplate.eType = nFamily;
@@ -975,7 +975,7 @@ USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily)
--------------------------------------------------------------------*/
-USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* pShell)
+sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell)
{
SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell();
ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
@@ -1026,7 +1026,7 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell*
// Vorlage auch anwenden, um harte Attributierung
// zu entfernen
- pCurrWrtShell->SetFrmFmt( pFrm, TRUE );
+ pCurrWrtShell->SetFrmFmt( pFrm, sal_True );
pCurrWrtShell->EndAllAction();
}
}
@@ -1069,8 +1069,8 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell*
--------------------------------------------------------------------*/
-USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
- USHORT nMask, SwWrtShell* pShell )
+sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily,
+ sal_uInt16 nMask, SwWrtShell* pShell )
{
SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell();
SwDocStyleSheet* pStyle = (SwDocStyleSheet*)mxBasePool->Find(
@@ -1102,7 +1102,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
pColl->SetDerivedFrom(pCurrWrtShell->GetCurTxtFmtColl());
// setze die Maske noch an der Collection:
- USHORT nId = pColl->GetPoolFmtId() & 0x87ff;
+ sal_uInt16 nId = pColl->GetPoolFmtId() & 0x87ff;
switch( nMask & 0x0fff )
{
case SWSTYLEBIT_TEXT:
@@ -1148,12 +1148,12 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
/* #61359# jetzt auch wieder alle Orientierungen
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == aSet.GetItemState( RES_VERT_ORIENT,
- FALSE, &pItem ) &&
+ sal_False, &pItem ) &&
text::VertOrientation::NONE == ((SwFmtVertOrient*)pItem)->GetVertOrient())
aSet.ClearItem( RES_VERT_ORIENT );
if( SFX_ITEM_SET == aSet.GetItemState( RES_HORI_ORIENT,
- FALSE, &pItem ) &&
+ sal_False, &pItem ) &&
text::HoriOrientation::NONE == ((SwFmtHoriOrient*)pItem)->GetHoriOrient())
aSet.ClearItem( RES_HORI_ORIENT );
*/
@@ -1184,13 +1184,13 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
case SFX_STYLE_FAMILY_PAGE:
{
pCurrWrtShell->StartAllAction();
- USHORT nPgDsc = pCurrWrtShell->GetCurPageDesc();
+ sal_uInt16 nPgDsc = pCurrWrtShell->GetCurPageDesc();
SwPageDesc& rSrc = (SwPageDesc&)pCurrWrtShell->GetPageDesc( nPgDsc );
SwPageDesc& rDest = *(SwPageDesc*)pStyle->GetPageDesc();
- USHORT nPoolId = rDest.GetPoolFmtId();
- USHORT nHId = rDest.GetPoolHelpId();
- BYTE nHFId = rDest.GetPoolHlpFileId();
+ sal_uInt16 nPoolId = rDest.GetPoolFmtId();
+ sal_uInt16 nHId = rDest.GetPoolHelpId();
+ sal_uInt8 nHFId = rDest.GetPoolHlpFileId();
pCurrWrtShell->GetDoc()->CopyPageDesc( rSrc, rDest );
@@ -1230,7 +1230,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
void SwDocShell::LoadStyles( SfxObjectShell& rSource )
{
- _LoadStyles(rSource, FALSE);
+ _LoadStyles(rSource, sal_False);
}
/* -----------------16.05.2003 15:45-----------------
bPreserveCurrentDocument determines whether SetFixFields() is called
@@ -1239,7 +1239,7 @@ void SwDocShell::LoadStyles( SfxObjectShell& rSource )
Calls of ::LoadStyles() normally use files especially loaded for the purpose
of importing styles.
--------------------------------------------------*/
-void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocument )
+void SwDocShell::_LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrentDocument )
{
/* [Beschreibung]
@@ -1268,7 +1268,7 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocu
}
else
{
- BOOL bModified = pDoc->IsModified();
+ sal_Bool bModified = pDoc->IsModified();
pDoc->ReplaceStyles( *((SwDocShell&)rSource).pDoc );
if( !bModified && pDoc->IsModified() && !pView )
{
@@ -1283,9 +1283,9 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocu
}
-void SwDocShell::FormatPage( const String& rPage, BOOL bColumn, SwWrtShell* pActShell )
+void SwDocShell::FormatPage( const String& rPage, sal_Bool bColumn, SwWrtShell* pActShell )
{
- Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, FALSE, bColumn, pActShell);
+ Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, sal_False, bColumn, pActShell);
}
Bitmap SwDocShell::GetStyleFamilyBitmap( SfxStyleFamily eFamily, BmpColorMode eColorMode )
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index b0b81c5df6e4..cc7792038f32 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -84,7 +84,7 @@
// die Familie wird neu generiert.
// Ausserdem gibt es jetzt zusaetzlich das Bit bPhysical. Ist dieses Bit
-// TRUE, werden die Pool-Formatnamen NICHT mit eingetragen.
+// sal_True, werden die Pool-Formatnamen NICHT mit eingetragen.
class SwImplShellAction
{
@@ -129,7 +129,7 @@ SwImplShellAction::~SwImplShellAction()
SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
SwCharFmt* pFmt = 0;
if( rName.Len() )
@@ -144,7 +144,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
if( !pFmt && bCreate )
{ // Pool abklappern
- const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
if(nId != USHRT_MAX)
pFmt = rDoc.GetCharFmtFromPool(nId);
}
@@ -153,7 +153,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
{
if(pFmt)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
SwFmt* p = pFmt->DerivedFrom();
if( p && !p->IsDefault() )
pStyle->PresetParent( p->GetName() );
@@ -161,7 +161,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pFmt;
}
@@ -175,7 +175,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
SwTxtFmtColl* pColl = 0;
@@ -184,7 +184,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
pColl = rDoc.FindTxtFmtCollByName( rName );
if( !pColl && bCreate )
{ // Pool abklappern
- const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
+ const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
if(nId != USHRT_MAX)
pColl = rDoc.GetTxtCollFromPool(nId);
}
@@ -194,7 +194,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
{
if(pColl)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
if( pColl->DerivedFrom() && !pColl->DerivedFrom()->IsDefault() )
pStyle->PresetParent( pColl->DerivedFrom()->GetName() );
else
@@ -204,7 +204,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
pStyle->PresetFollow(rNext.GetName());
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pColl;
}
@@ -218,7 +218,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
SwFrmFmt* pFmt = 0;
if( rName.Len() )
@@ -226,7 +226,7 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
pFmt = rDoc.FindFrmFmtByName( rName );
if( !pFmt && bCreate )
{ // Pool abklappern
- const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
+ const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
if(nId != USHRT_MAX)
pFmt = rDoc.GetFrmFmtFromPool(nId);
}
@@ -236,14 +236,14 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
{
if(pFmt)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
if( pFmt->DerivedFrom() && !pFmt->DerivedFrom()->IsDefault() )
pStyle->PresetParent( pFmt->DerivedFrom()->GetName() );
else
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pFmt;
}
@@ -256,7 +256,7 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
const SwPageDesc* pDesc = 0;
@@ -265,7 +265,7 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
pDesc = rDoc.FindPageDescByName( rName );
if( !pDesc && bCreate )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC);
if(nId != USHRT_MAX)
pDesc = rDoc.GetPageDescFromPool(nId);
}
@@ -275,14 +275,14 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
{
if(pDesc)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
if(pDesc->GetFollow())
pStyle->PresetFollow(pDesc->GetFollow()->GetName());
else
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pDesc;
}
@@ -290,7 +290,7 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
const SwNumRule* lcl_FindNumRule( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
const SwNumRule* pRule = 0;
@@ -299,7 +299,7 @@ const SwNumRule* lcl_FindNumRule( SwDoc& rDoc,
pRule = rDoc.FindNumRulePtr( rName );
if( !pRule && bCreate )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE);
if(nId != USHRT_MAX)
pRule = rDoc.GetNumRuleFromPool(nId);
}
@@ -309,17 +309,17 @@ const SwNumRule* lcl_FindNumRule( SwDoc& rDoc,
{
if(pRule)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pRule;
}
-USHORT lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam,
+sal_uInt16 lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam,
const String& rName )
{
if( rLst.Count() )
@@ -336,30 +336,30 @@ USHORT lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam,
default:; //prevent warning
}
sSrch += rName;
- for( USHORT i=0; i < rLst.Count(); ++i )
+ for( sal_uInt16 i=0; i < rLst.Count(); ++i )
if( *rLst[i] == sSrch )
return i;
}
return USHRT_MAX;
}
-BOOL FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam )
+sal_Bool FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam )
{
switch( eFam )
{
case SFX_STYLE_FAMILY_CHAR :
- return 0 != lcl_FindCharFmt( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindCharFmt( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_PARA :
- return 0 != lcl_FindParaFmt( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindParaFmt( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_FRAME:
- return 0 != lcl_FindFrmFmt( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindFrmFmt( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_PAGE :
- return 0 != lcl_FindPageDesc( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindPageDesc( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_PSEUDO:
- return 0 != lcl_FindNumRule( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindNumRule( rDoc, rName, 0, sal_False );
default:; //prevent warning
}
- return FALSE;
+ return sal_False;
}
@@ -372,7 +372,7 @@ void SwPoolFmtList::Append( char cChar, const String& rStr )
{
String* pStr = new String( cChar );
*pStr += rStr;
- for ( USHORT i=0; i < Count(); ++i )
+ for ( sal_uInt16 i=0; i < Count(); ++i )
{
if( *operator[](i) == *pStr )
{
@@ -404,7 +404,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
const String& rName,
SwDocStyleSheetPool& _rPool,
SfxStyleFamily eFam,
- USHORT _nMask) :
+ sal_uInt16 _nMask) :
SfxStyleSheetBase( rName, _rPool, eFam, _nMask ),
pCharFmt(0),
@@ -436,7 +436,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
SID_PARA_BACKGRND_DESTINATION, SID_ATTR_BRUSH_CHAR,
SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE,
0),
- bPhysical(FALSE)
+ bPhysical(sal_False)
{
nHelpId = UCHAR_MAX;
}
@@ -470,7 +470,7 @@ void SwDocStyleSheet::Reset()
aName.Erase();
aFollow.Erase();
aParent.Erase();
- SetPhysical(FALSE);
+ SetPhysical(sal_False);
}
/*--------------------------------------------------------------------
@@ -511,7 +511,7 @@ const String& SwDocStyleSheet::GetParent() const
String sTmp;
if( !pFmt ) // noch nicht vorhanden, also dflt. Parent
{
- USHORT i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType );
+ sal_uInt16 i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType );
i = ::GetPoolParent( i );
if( i && USHRT_MAX != i )
SwStyleNameMapper::FillUIName( i, sTmp );
@@ -548,19 +548,19 @@ const String& SwDocStyleSheet::GetFollow() const
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::HasFollowSupport() const
+sal_Bool SwDocStyleSheet::HasFollowSupport() const
{
switch(nFamily)
{
case SFX_STYLE_FAMILY_PARA :
- case SFX_STYLE_FAMILY_PAGE : return TRUE;
+ case SFX_STYLE_FAMILY_PAGE : return sal_True;
case SFX_STYLE_FAMILY_FRAME:
case SFX_STYLE_FAMILY_CHAR :
- case SFX_STYLE_FAMILY_PSEUDO: return FALSE;
+ case SFX_STYLE_FAMILY_PSEUDO: return sal_False;
default:
ASSERT(!this, "unbekannte Style-Familie");
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -568,28 +568,28 @@ BOOL SwDocStyleSheet::HasFollowSupport() const
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::HasParentSupport() const
+sal_Bool SwDocStyleSheet::HasParentSupport() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR :
case SFX_STYLE_FAMILY_PARA :
- case SFX_STYLE_FAMILY_FRAME: bRet = TRUE;
+ case SFX_STYLE_FAMILY_FRAME: bRet = sal_True;
default:; //prevent warning
}
return bRet;
}
-BOOL SwDocStyleSheet::HasClearParentSupport() const
+sal_Bool SwDocStyleSheet::HasClearParentSupport() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch(nFamily)
{
case SFX_STYLE_FAMILY_PARA :
case SFX_STYLE_FAMILY_CHAR :
- case SFX_STYLE_FAMILY_FRAME: bRet = TRUE;
+ case SFX_STYLE_FAMILY_FRAME: bRet = sal_True;
default:; //prevent warning
}
return bRet;
@@ -655,8 +655,8 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
const SfxPoolItem* pItem = aIter.FirstItem();
String sPageNum, sModel, sBreak;
- BOOL bHasWesternFontPrefix = FALSE;
- BOOL bHasCJKFontPrefix = FALSE;
+ sal_Bool bHasWesternFontPrefix = sal_False;
+ sal_Bool bHasCJKFontPrefix = sal_False;
SvtCJKOptions aCJKOptions;
while ( pItem )
@@ -682,7 +682,7 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
*pItem, SFX_ITEM_PRESENTATION_COMPLETE,
eUnit, aItemPresentation, &aIntlWrapper ) )
{
- BOOL bIsDefault = FALSE;
+ sal_Bool bIsDefault = sal_False;
switch ( pItem->Which() )
{
case SID_ATTR_PARA_PAGENUM:
@@ -700,11 +700,11 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
case RES_CHRATR_CJK_POSTURE:
case RES_CHRATR_CJK_WEIGHT:
if(aCJKOptions.IsCJKFontEnabled())
- bIsDefault = TRUE;
+ bIsDefault = sal_True;
if(!bHasCJKFontPrefix)
{
aItemPresentation.Insert(SW_RESSTR(STR_CJK_FONT), 0);
- bHasCJKFontPrefix = TRUE;
+ bHasCJKFontPrefix = sal_True;
}
break;
case RES_CHRATR_FONT:
@@ -715,12 +715,12 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
if(!bHasWesternFontPrefix)
{
aItemPresentation.Insert(SW_RESSTR(STR_WESTERN_FONT), 0);
- bHasWesternFontPrefix = TRUE;
- bIsDefault = TRUE;
+ bHasWesternFontPrefix = sal_True;
+ bIsDefault = sal_True;
}
// no break;
default:
- bIsDefault = TRUE;
+ bIsDefault = sal_True;
}
if(bIsDefault)
{
@@ -778,20 +778,20 @@ String SwDocStyleSheet::GetDescription()
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::SetName( const String& rStr)
+sal_Bool SwDocStyleSheet::SetName( const String& rStr)
{
if( !rStr.Len() )
- return FALSE;
+ return sal_False;
if( aName != rStr )
{
if( !SfxStyleSheetBase::SetName( rStr ))
- return FALSE;
+ return sal_False;
}
else if(!bPhysical)
FillStyleSheet( FillPhysical );
- int bChg = FALSE;
+ int bChg = sal_False;
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR :
@@ -800,7 +800,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
if( pCharFmt && pCharFmt->GetName() != rStr )
{
pCharFmt->SetName( rStr );
- bChg = TRUE;
+ bChg = sal_True;
}
break;
}
@@ -814,7 +814,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
else
pColl->SetName(rStr);
- bChg = TRUE;
+ bChg = sal_True;
}
break;
}
@@ -828,7 +828,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
else
pFrmFmt->SetName( rStr );
- bChg = TRUE;
+ bChg = sal_True;
}
break;
}
@@ -844,7 +844,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
String aOldName(aPageDesc.GetName());
aPageDesc.SetName( rStr );
- BOOL bDoesUndo = rDoc.DoesUndo();
+ sal_Bool bDoesUndo = rDoc.DoesUndo();
rDoc.DoUndo(aOldName.Len() > 0);
rDoc.ChgPageDesc(aOldName, aPageDesc);
@@ -852,7 +852,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
// <- #116530#
rDoc.SetModified();
- bChg = TRUE;
+ bChg = sal_True;
}
break;
case SFX_STYLE_FAMILY_PSEUDO:
@@ -871,7 +871,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
pNumRule = rDoc.FindNumRulePtr(rStr);
rDoc.SetModified();
- bChg = TRUE;
+ bChg = sal_True;
}
}
else
@@ -881,7 +881,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
// <--
rDoc.SetModified();
- bChg = TRUE;
+ bChg = sal_True;
}
}
// <- #106897#
@@ -900,7 +900,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
if( pSh )
pSh->CallChgLnk();
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -908,7 +908,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::SetParent( const String& rStr)
+sal_Bool SwDocStyleSheet::SetParent( const String& rStr)
{
SwFmt* pFmt = 0, *pParent = 0;
switch(nFamily)
@@ -938,7 +938,7 @@ BOOL SwDocStyleSheet::SetParent( const String& rStr)
ASSERT(!this, "unbekannte Style-Familie");
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pFmt && pFmt->DerivedFrom() &&
pFmt->DerivedFrom()->GetName() != rStr )
{
@@ -963,10 +963,10 @@ BOOL SwDocStyleSheet::SetParent( const String& rStr)
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::SetFollow( const String& rStr)
+sal_Bool SwDocStyleSheet::SetFollow( const String& rStr)
{
if( rStr.Len() && !SfxStyleSheetBase::SetFollow( rStr ))
- return FALSE;
+ return sal_False;
SwImplShellAction aTmpSh( rDoc );
switch(nFamily)
@@ -992,7 +992,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr)
const SwPageDesc* pFollowDesc = rStr.Len()
? lcl_FindPageDesc(rDoc, rStr)
: 0;
- USHORT nId;
+ sal_uInt16 nId;
if( pFollowDesc != pDesc->GetFollow() &&
rDoc.FindPageDescByName( pDesc->GetName(), &nId ) )
{
@@ -1012,7 +1012,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr)
ASSERT(!this, "unbekannte Style-Familie");
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -1038,12 +1038,12 @@ SfxItemSet& SwDocStyleSheet::GetItemSet()
case SFX_STYLE_FAMILY_FRAME:
{
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
- aBoxInfo.SetTable( FALSE );
- aBoxInfo.SetDist( TRUE); // Abstandsfeld immer anzeigen
- aBoxInfo.SetMinDist( TRUE );// Minimalgroesse in Tabellen und Absaetzen setzen
+ aBoxInfo.SetTable( sal_False );
+ aBoxInfo.SetDist( sal_True); // Abstandsfeld immer anzeigen
+ aBoxInfo.SetMinDist( sal_True );// Minimalgroesse in Tabellen und Absaetzen setzen
aBoxInfo.SetDefDist( MIN_BORDER_DIST );// Default-Abstand immer setzen
// Einzelne Linien koennen nur in Tabellen DontCare-Status haben
- aBoxInfo.SetValid( VALID_DISABLE, TRUE );
+ aBoxInfo.SetValid( VALID_DISABLE, sal_True );
if ( nFamily == SFX_STYLE_FAMILY_PARA )
{
ASSERT(pColl, "Wo ist die Collektion");
@@ -1150,7 +1150,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
SwFmt* pFmt = 0;
SwPageDesc* pNewDsc = 0;
- USHORT nPgDscPos = 0;
+ sal_uInt16 nPgDscPos = 0;
switch(nFamily)
{
@@ -1165,13 +1165,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
ASSERT(pColl, "Wo ist die Collection");
const SfxPoolItem* pAutoUpdate;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,FALSE, &pAutoUpdate ))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,sal_False, &pAutoUpdate ))
{
pColl->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue());
}
const SwCondCollItem* pCondItem;
- if( SFX_ITEM_SET != rSet.GetItemState( FN_COND_COLL, FALSE,
+ if( SFX_ITEM_SET != rSet.GetItemState( FN_COND_COLL, sal_False,
(const SfxPoolItem**)&pCondItem ))
pCondItem = 0;
@@ -1179,13 +1179,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
SwFmt* pFindFmt;
const CommandStruct* pCmds = SwCondCollItem::GetCmds();
- for(USHORT i = 0; i < COND_COMMAND_COUNT; i++)
+ for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++)
{
SwCollCondition aCond( 0, pCmds[ i ].nCnd, pCmds[ i ].nSubCond );
((SwConditionTxtFmtColl*)pColl)->RemoveCondition( aCond );
const String& rStyle = pCondItem->GetStyle( i );
if( rStyle.Len() &&
- 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, TRUE )))
+ 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, sal_True )))
{
pFindFmt->Add( &aCond );
((SwConditionTxtFmtColl*)pColl)->InsertCondition( aCond );
@@ -1215,11 +1215,11 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
SwTxtFmtColl* pFindFmt;
const CommandStruct* pCmds = SwCondCollItem::GetCmds();
- for( USHORT i = 0; i < COND_COMMAND_COUNT; ++i )
+ for( sal_uInt16 i = 0; i < COND_COMMAND_COUNT; ++i )
{
const String& rStyle = pCondItem->GetStyle( i );
if( rStyle.Len() &&
- 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, TRUE )))
+ 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, sal_True )))
{
pCColl->InsertCondition( SwCollCondition( pFindFmt,
pCmds[ i ].nCnd, pCmds[ i ].nSubCond ) );
@@ -1231,9 +1231,9 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
}
// --> OD 2008-02-12 #newlistlevelattrs#
if ( bResetIndentAttrsAtParagraphStyle &&
- rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, 0 ) == SFX_ITEM_SET &&
- rSet.GetItemState( RES_LR_SPACE, FALSE, 0 ) != SFX_ITEM_SET &&
- pColl->GetItemState( RES_LR_SPACE, FALSE, 0 ) == SFX_ITEM_SET )
+ rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, 0 ) == SFX_ITEM_SET &&
+ rSet.GetItemState( RES_LR_SPACE, sal_False, 0 ) != SFX_ITEM_SET &&
+ pColl->GetItemState( RES_LR_SPACE, sal_False, 0 ) == SFX_ITEM_SET )
{
rDoc.ResetAttrAtFormat( RES_LR_SPACE, *pColl );
}
@@ -1244,7 +1244,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
// neither the paragraph style nor the numbering style is used in the document
// the numbering style will not be saved with the document and the assignment got lost.
const SfxPoolItem* pNumRuleItem = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, &pNumRuleItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, &pNumRuleItem ) )
{ // Setting a numbering rule?
String sNumRule = ((SwNumRuleItem*)pNumRuleItem)->GetValue();
if( sNumRule.Len() )
@@ -1252,7 +1252,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
SwNumRule* pRule = rDoc.FindNumRulePtr( sNumRule );
if( !pRule )
{ // Numbering rule not in use yet.
- USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sNumRule, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
+ sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sNumRule, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
if( USHRT_MAX != nPoolId ) // It's a standard numbering rule
{
pRule = rDoc.GetNumRuleFromPool( nPoolId ); // Create numbering rule (physical)
@@ -1263,7 +1263,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
pFmt = pColl;
- USHORT nId = pColl->GetPoolFmtId() &
+ sal_uInt16 nId = pColl->GetPoolFmtId() &
~ ( COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID );
switch( GetMask() & ( 0x0fff & ~SWSTYLEBIT_CONDCOLL ) )
{
@@ -1293,7 +1293,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
ASSERT(pFrmFmt, "Wo ist das FrmFmt");
const SfxPoolItem* pAutoUpdate;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,FALSE, &pAutoUpdate ))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,sal_False, &pAutoUpdate ))
{
pFrmFmt->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue());
}
@@ -1329,7 +1329,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
break;
const SfxPoolItem* pItem;
- switch( rSet.GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem ))
+ switch( rSet.GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem ))
{
case SFX_ITEM_SET:
{
@@ -1366,7 +1366,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
SfxItemIter aIter( rSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
if( IsInvalidItem( pItem ) ) // Clearen
{
@@ -1416,7 +1416,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
// <--
}
-void lcl_SaveStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
+void lcl_SaveStyles( sal_uInt16 nFamily, SvPtrarr& rArr, SwDoc& rDoc )
{
switch( nFamily )
{
@@ -1475,7 +1475,7 @@ void lcl_SaveStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
}
}
-void lcl_DeleteInfoStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
+void lcl_DeleteInfoStyles( sal_uInt16 nFamily, SvPtrarr& rArr, SwDoc& rDoc )
{
sal_uInt16 n, nCnt;
switch( nFamily )
@@ -1562,15 +1562,15 @@ void lcl_DeleteInfoStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
Beschreibung: Das Format ermitteln
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
+sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
{
- BOOL bRet = FALSE;
- USHORT nPoolId = USHRT_MAX;
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nPoolId = USHRT_MAX;
SwFmt* pFmt = 0;
- BOOL bCreate = FillPhysical == eFType;
- BOOL bDeleteInfo = FALSE;
- BOOL bFillOnlyInfo = FillAllInfo == eFType;
+ sal_Bool bCreate = FillPhysical == eFType;
+ sal_Bool bDeleteInfo = sal_False;
+ sal_Bool bFillOnlyInfo = FillAllInfo == eFType;
SvPtrarr aDelArr;
switch(nFamily)
@@ -1580,9 +1580,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pCharFmt;
if( bFillOnlyInfo && !bPhysical )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pCharFmt = lcl_FindCharFmt(rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pCharFmt = lcl_FindCharFmt(rDoc, aName, this, sal_True );
}
pFmt = pCharFmt;
@@ -1607,9 +1607,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pColl;
if( bFillOnlyInfo && !bPhysical )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pColl = lcl_FindParaFmt(rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pColl = lcl_FindParaFmt(rDoc, aName, this, sal_True );
}
pFmt = pColl;
@@ -1630,9 +1630,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pFrmFmt;
if( bFillOnlyInfo && bPhysical )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, sal_True );
}
pFmt = pFrmFmt;
if( !bCreate && !pFmt )
@@ -1649,9 +1649,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pDesc;
if( bFillOnlyInfo && !pDesc )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pDesc = lcl_FindPageDesc( rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pDesc = lcl_FindPageDesc( rDoc, aName, this, sal_True );
}
if( pDesc )
@@ -1677,9 +1677,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pNumRule;
if( bFillOnlyInfo && !pNumRule )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pNumRule = lcl_FindNumRule( rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pNumRule = lcl_FindNumRule( rDoc, aName, this, sal_True );
}
if( pNumRule )
@@ -1710,7 +1710,7 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
if( pFmt )
nPoolId = pFmt->GetPoolFmtId();
- USHORT _nMask = 0;
+ sal_uInt16 _nMask = 0;
if( pFmt == rDoc.GetDfltCharFmt() )
_nMask |= SFXSTYLEBIT_READONLY;
else if( USER_FMT & nPoolId )
@@ -1743,7 +1743,7 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
SetMask( _nMask );
}
if( bDeleteInfo && bFillOnlyInfo )
- ::lcl_DeleteInfoStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
+ ::lcl_DeleteInfoStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
return bRet;
}
@@ -1761,7 +1761,7 @@ void SwDocStyleSheet::Create()
if( !pCharFmt )
pCharFmt = rDoc.MakeCharFmt(aName,
rDoc.GetDfltCharFmt());
- pCharFmt->SetAuto( FALSE );
+ pCharFmt->SetAuto( sal_False );
break;
case SFX_STYLE_FAMILY_PARA :
@@ -1779,7 +1779,7 @@ void SwDocStyleSheet::Create()
case SFX_STYLE_FAMILY_FRAME:
pFrmFmt = lcl_FindFrmFmt( rDoc, aName );
if( !pFrmFmt )
- pFrmFmt = rDoc.MakeFrmFmt(aName, rDoc.GetDfltFrmFmt(), FALSE, FALSE);
+ pFrmFmt = rDoc.MakeFrmFmt(aName, rDoc.GetDfltFrmFmt(), sal_False, sal_False);
break;
@@ -1787,7 +1787,7 @@ void SwDocStyleSheet::Create()
pDesc = lcl_FindPageDesc( rDoc, aName );
if( !pDesc )
{
- USHORT nId = rDoc.MakePageDesc(aName);
+ sal_uInt16 nId = rDoc.MakePageDesc(aName);
pDesc = &const_cast<const SwDoc &>(rDoc).GetPageDesc(nId);
}
break;
@@ -1803,12 +1803,12 @@ void SwDocStyleSheet::Create()
// --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule* pRule = rDoc.GetNumRuleTbl()[
- rDoc.MakeNumRule( sTmpNm, 0, FALSE,
+ rDoc.MakeNumRule( sTmpNm, 0, sal_False,
// --> OD 2008-06-06 #i89178#
numfunc::GetDefaultPositionAndSpaceMode() ) ];
// <--
// <--
- pRule->SetAutoRule( FALSE );
+ pRule->SetAutoRule( sal_False );
if( !aName.Len() )
{
// --> OD 2008-07-08 #i91400#
@@ -1820,7 +1820,7 @@ void SwDocStyleSheet::Create()
break;
default:; //prevent warning
}
- bPhysical = TRUE;
+ bPhysical = sal_True;
aCoreSet.ClearItem();
}
@@ -1888,7 +1888,7 @@ void SwDocStyleSheet::PresetNameAndFamily(const String& rName)
--------------------------------------------------------------------*/
-void SwDocStyleSheet::SetPhysical(BOOL bPhys)
+void SwDocStyleSheet::SetPhysical(sal_Bool bPhys)
{
bPhysical = bPhys;
@@ -1909,7 +1909,7 @@ SwFrmFmt* SwDocStyleSheet::GetFrmFmt()
}
-BOOL SwDocStyleSheet::IsUsed() const
+sal_Bool SwDocStyleSheet::IsUsed() const
{
if( !bPhysical )
{
@@ -1919,7 +1919,7 @@ BOOL SwDocStyleSheet::IsUsed() const
// immer noch nicht ?
if( !bPhysical )
- return FALSE;
+ return sal_False;
const SwModify* pMod;
switch( nFamily )
@@ -1930,22 +1930,22 @@ BOOL SwDocStyleSheet::IsUsed() const
case SFX_STYLE_FAMILY_PAGE : pMod = pDesc; break;
case SFX_STYLE_FAMILY_PSEUDO:
- return pNumRule ? rDoc.IsUsed( *pNumRule ) : FALSE;
+ return pNumRule ? rDoc.IsUsed( *pNumRule ) : sal_False;
default:
ASSERT(!this, "unbekannte Style-Familie");
- return FALSE;
+ return sal_False;
}
return rDoc.IsUsed( *pMod );
}
-ULONG SwDocStyleSheet::GetHelpId( String& rFile )
+sal_uLong SwDocStyleSheet::GetHelpId( String& rFile )
{
static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
- USHORT nId = 0;
- USHORT nPoolId = 0;
+ sal_uInt16 nId = 0;
+ sal_uInt16 nPoolId = 0;
unsigned char nFileId = UCHAR_MAX;
rFile = sTemplateHelpFile;
@@ -1955,7 +1955,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
{
case SFX_STYLE_FAMILY_CHAR :
if( !pCharFmt &&
- 0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, FALSE )) )
+ 0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, sal_False )) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
return USHRT_MAX == nId ? 0 : nId;
@@ -1965,7 +1965,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_PARA:
if( !pColl &&
- 0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, FALSE )) )
+ 0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, sal_False )) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
return USHRT_MAX == nId ? 0 : nId;
@@ -1975,7 +1975,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_FRAME:
if( !pFrmFmt &&
- 0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, FALSE ) ) )
+ 0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, sal_False ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT );
return USHRT_MAX == nId ? 0 : nId;
@@ -1985,7 +1985,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_PAGE:
if( !pDesc &&
- 0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, FALSE ) ) )
+ 0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, sal_False ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
return USHRT_MAX == nId ? 0 : nId;
@@ -1998,7 +1998,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_PSEUDO:
if( !pNumRule &&
- 0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, FALSE ) ) )
+ 0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, sal_False ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
return USHRT_MAX == nId ? 0 : nId;
@@ -2043,10 +2043,10 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
}
-void SwDocStyleSheet::SetHelpId( const String& r, ULONG nId )
+void SwDocStyleSheet::SetHelpId( const String& r, sal_uLong nId )
{
- BYTE nFileId = static_cast< BYTE >(rDoc.SetDocPattern( r ));
- USHORT nHId = static_cast< USHORT >(nId); //!! SFX hat eigenmaechtig auf ULONG umgestellt!
+ sal_uInt8 nFileId = static_cast< sal_uInt8 >(rDoc.SetDocPattern( r ));
+ sal_uInt16 nHId = static_cast< sal_uInt16 >(nId); //!! SFX hat eigenmaechtig auf sal_uLong umgestellt!
SwFmt* pTmpFmt = 0;
switch( nFamily )
@@ -2082,7 +2082,7 @@ void SwDocStyleSheet::SetHelpId( const String& r, ULONG nId )
Beschreibung: Methoden fuer den DocStyleSheetPool
--------------------------------------------------------------------*/
-SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, BOOL bOrg )
+SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, sal_Bool bOrg )
: SfxStyleSheetBasePool( rDocument.GetAttrPool() )
, mxStyleSheet( new SwDocStyleSheet( rDocument, aEmptyStr, *this, SFX_STYLE_FAMILY_CHAR, 0 ) )
, rDoc( rDocument )
@@ -2107,15 +2107,15 @@ void SAL_CALL SwDocStyleSheetPool::release( ) throw ()
SfxStyleSheetBase& SwDocStyleSheetPool::Make(
const String& rName,
SfxStyleFamily eFam,
- USHORT _nMask,
- USHORT /*nPos*/ )
+ sal_uInt16 _nMask,
+ sal_uInt16 /*nPos*/ )
{
mxStyleSheet->PresetName(rName);
mxStyleSheet->PresetParent(aEmptyStr);
mxStyleSheet->PresetFollow(aEmptyStr);
mxStyleSheet->SetMask(_nMask) ;
mxStyleSheet->SetFamily(eFam);
- mxStyleSheet->SetPhysical(TRUE);
+ mxStyleSheet->SetPhysical(sal_True);
mxStyleSheet->Create();
return *mxStyleSheet.get();
@@ -2130,7 +2130,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Create( const SfxStyleSheetBase& /*rOr
SfxStyleSheetBase* SwDocStyleSheetPool::Create( const String &,
- SfxStyleFamily, USHORT )
+ SfxStyleFamily, sal_uInt16 )
{
ASSERT( !this, "Create im SW-Stylesheet-Pool geht nicht" );
return NULL;
@@ -2163,7 +2163,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
SwImplShellAction aTmpSh( rDoc );
- BOOL bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName();
+ sal_Bool bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName();
if( SFX_STYLE_FAMILY_PAGE == eFamily && bSwSrcPool )
{
// gesondert behandeln!!
@@ -2177,7 +2177,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
{
const SwFmt *pSourceFmt = 0;
SwFmt *pTargetFmt = 0;
- USHORT nPgDscPos = USHRT_MAX;
+ sal_uInt16 nPgDscPos = USHRT_MAX;
switch( eFamily )
{
case SFX_STYLE_FAMILY_CHAR :
@@ -2237,7 +2237,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
}
SfxStyleSheetIterator* SwDocStyleSheetPool::CreateIterator(
- SfxStyleFamily eFam, USHORT _nMask )
+ SfxStyleFamily eFam, sal_uInt16 _nMask )
{
return new SwStyleSheetIterator( this, eFam, _nMask );
}
@@ -2252,35 +2252,35 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
if( !pStyle )
return;
- BOOL bBroadcast = TRUE;
+ sal_Bool bBroadcast = sal_True;
SwImplShellAction aTmpSh( rDoc );
const String& rName = pStyle->GetName();
switch( pStyle->GetFamily() )
{
case SFX_STYLE_FAMILY_CHAR:
{
- SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, rName, 0, FALSE );
+ SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, rName, 0, sal_False );
if(pFmt)
rDoc.DelCharFmt(pFmt);
}
break;
case SFX_STYLE_FAMILY_PARA:
{
- SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, rName, 0, FALSE );
+ SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, rName, 0, sal_False );
if(pColl)
rDoc.DelTxtFmtColl(pColl);
}
break;
case SFX_STYLE_FAMILY_FRAME:
{
- SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, rName, 0, FALSE );
+ SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, rName, 0, sal_False );
if(pFmt)
rDoc.DelFrmFmt(pFmt);
}
break;
case SFX_STYLE_FAMILY_PAGE :
{
- USHORT nPos;
+ sal_uInt16 nPos;
if( rDoc.FindPageDescByName( rName, &nPos ))
rDoc.DelPageDesc( nPos );
}
@@ -2290,13 +2290,13 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
{
if( !rDoc.DelNumRule( rName ) )
// Broadcast nur versenden, wenn etwas geloescht wurde
- bBroadcast = FALSE;
+ bBroadcast = sal_False;
}
break;
default:
ASSERT(!this, "unbekannte Style-Familie");
- bBroadcast = FALSE;
+ bBroadcast = sal_False;
}
if( bBroadcast )
@@ -2305,7 +2305,7 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
-BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
+sal_Bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
const String &rStyle, const String &rParent )
{
SwFmt* pFmt = 0, *pParent = 0;
@@ -2334,7 +2334,7 @@ BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
ASSERT(!this, "unbekannte Style-Familie");
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pFmt && pFmt->DerivedFrom() &&
pFmt->DerivedFrom()->GetName() != rParent )
{
@@ -2363,9 +2363,9 @@ BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
}
SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
- SfxStyleFamily eFam, USHORT n )
+ SfxStyleFamily eFam, sal_uInt16 n )
{
- USHORT nSMask = n;
+ sal_uInt16 nSMask = n;
if( SFX_STYLE_FAMILY_PARA == eFam && rDoc.get(IDocumentSettingAccess::HTML_MODE) )
{
// dann sind nur HTML-Vorlagen von Interesse
@@ -2378,14 +2378,14 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
nSMask = SWSTYLEBIT_HTML;
}
- const BOOL bSearchUsed = ( n != SFXSTYLEBIT_ALL &&
- n & SFXSTYLEBIT_USED ) ? TRUE : FALSE;
+ const sal_Bool bSearchUsed = ( n != SFXSTYLEBIT_ALL &&
+ n & SFXSTYLEBIT_USED ) ? sal_True : sal_False;
const SwModify* pMod = 0;
- mxStyleSheet->SetPhysical( FALSE );
+ mxStyleSheet->SetPhysical( sal_False );
mxStyleSheet->PresetName( rName );
mxStyleSheet->SetFamily( eFam );
- BOOL bFnd = mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
+ sal_Bool bFnd = mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
if( mxStyleSheet->IsPhysical() )
{
@@ -2416,7 +2416,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
? !(pRule->GetPoolFmtId() & USER_FMT)
// benutzte gesucht und keine gefunden
: bSearchUsed ))
- bFnd = FALSE;
+ bFnd = sal_False;
}
break;
@@ -2428,7 +2428,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
// dann noch die Maske auswerten:
if( pMod && !(bSearchUsed && (bOrganizer || rDoc.IsUsed(*pMod)) ) )
{
- const USHORT nId = SFX_STYLE_FAMILY_PAGE == eFam
+ const sal_uInt16 nId = SFX_STYLE_FAMILY_PAGE == eFam
? ((SwPageDesc*)pMod)->GetPoolFmtId()
: ((SwFmt*)pMod)->GetPoolFmtId();
@@ -2436,7 +2436,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
? !(nId & USER_FMT)
// benutzte gesucht und keine gefunden
: bSearchUsed )
- bFnd = FALSE;
+ bFnd = sal_False;
}
return bFnd ? mxStyleSheet.get() : 0;
}
@@ -2444,12 +2444,12 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
/* */
SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
- SfxStyleFamily eFam, USHORT n )
+ SfxStyleFamily eFam, sal_uInt16 n )
: SfxStyleSheetIterator( pBase, eFam, n ),
mxIterSheet( new SwDocStyleSheet( pBase->GetDoc(), aEmptyStr, *pBase, SFX_STYLE_FAMILY_CHAR, 0 ) ),
mxStyleSheet( new SwDocStyleSheet( pBase->GetDoc(), aEmptyStr, *pBase, SFX_STYLE_FAMILY_CHAR, 0 ) )
{
- bFirstCalled = FALSE;
+ bFirstCalled = sal_False;
nLastPos = 0;
StartListening( *pBase );
}
@@ -2459,7 +2459,7 @@ SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
EndListening( mxIterSheet->GetPool() );
}
-USHORT SwStyleSheetIterator::Count()
+sal_uInt16 SwStyleSheetIterator::Count()
{
// Liste richtig fuellen lassen !!
if( !bFirstCalled )
@@ -2467,13 +2467,13 @@ USHORT SwStyleSheetIterator::Count()
return aLst.Count();
}
-SfxStyleSheetBase* SwStyleSheetIterator::operator[]( USHORT nIdx )
+SfxStyleSheetBase* SwStyleSheetIterator::operator[]( sal_uInt16 nIdx )
{
// gefunden
if( !bFirstCalled )
First();
mxStyleSheet->PresetNameAndFamily( *aLst[ nIdx ] );
- mxStyleSheet->SetPhysical( FALSE );
+ mxStyleSheet->SetPhysical( sal_False );
mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
return mxStyleSheet.get();
@@ -2482,7 +2482,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::operator[]( USHORT nIdx )
SfxStyleSheetBase* SwStyleSheetIterator::First()
{
// Alte Liste loeschen
- bFirstCalled = TRUE;
+ bFirstCalled = sal_True;
nLastPos = 0;
aLst.Erase();
@@ -2490,27 +2490,27 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
mxIterSheet->Reset();
SwDoc& rDoc = ((SwDocStyleSheetPool*)pBasePool)->GetDoc();
- const USHORT nSrchMask = nMask;
- const BOOL bIsSearchUsed = SearchUsed();
+ const sal_uInt16 nSrchMask = nMask;
+ const sal_Bool bIsSearchUsed = SearchUsed();
- const BOOL bOrganizer = ((SwDocStyleSheetPool*)pBasePool)->IsOrganizerMode();
+ const sal_Bool bOrganizer = ((SwDocStyleSheetPool*)pBasePool)->IsOrganizerMode();
if( nSearchFamily == SFX_STYLE_FAMILY_CHAR
|| nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- const USHORT nArrLen = rDoc.GetCharFmts()->Count();
- for( USHORT i = 0; i < nArrLen; i++ )
+ const sal_uInt16 nArrLen = rDoc.GetCharFmts()->Count();
+ for( sal_uInt16 i = 0; i < nArrLen; i++ )
{
SwCharFmt* pFmt = (*rDoc.GetCharFmts())[ i ];
if( pFmt->IsDefault() && pFmt != rDoc.GetDfltCharFmt() )
continue;
- const BOOL bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFmt));
+ const sal_Bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFmt));
if( !bUsed )
{
// Standard ist keine Benutzervorlage #46181#
- const USHORT nId = rDoc.GetDfltCharFmt() == pFmt ?
- USHORT( RES_POOLCHR_INET_NORMAL ):
+ const sal_uInt16 nId = rDoc.GetDfltCharFmt() == pFmt ?
+ sal_uInt16( RES_POOLCHR_INET_NORMAL ):
pFmt->GetPoolFmtId();
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
? !(nId & USER_FMT)
@@ -2560,7 +2560,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( nSearchFamily == SFX_STYLE_FAMILY_PARA ||
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- USHORT nSMask = nSrchMask;
+ sal_uInt16 nSMask = nSrchMask;
if( rDoc.get(IDocumentSettingAccess::HTML_MODE) )
{
// dann sind nur HTML-Vorlagen von Interesse
@@ -2574,18 +2574,18 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
nSMask = SWSTYLEBIT_HTML;
}
- const USHORT nArrLen = rDoc.GetTxtFmtColls()->Count();
- for( USHORT i = 0; i < nArrLen; i++ )
+ const sal_uInt16 nArrLen = rDoc.GetTxtFmtColls()->Count();
+ for( sal_uInt16 i = 0; i < nArrLen; i++ )
{
SwTxtFmtColl* pColl = (*rDoc.GetTxtFmtColls())[ i ];
if(pColl->IsDefault())
continue;
- const BOOL bUsed = bOrganizer || rDoc.IsUsed(*pColl);
+ const sal_Bool bUsed = bOrganizer || rDoc.IsUsed(*pColl);
if( !(bIsSearchUsed && bUsed ))
{
- const USHORT nId = pColl->GetPoolFmtId();
+ const sal_uInt16 nId = pColl->GetPoolFmtId();
switch ( (nSMask & ~SFXSTYLEBIT_USED) )
{
case SFXSTYLEBIT_USERDEF:
@@ -2615,7 +2615,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( (nId & COLL_GET_RANGE_BITS) != COLL_HTML_BITS)
{
// einige wollen wir aber auch in dieser Section sehen
- BOOL bWeiter = TRUE;
+ sal_Bool bWeiter = sal_True;
switch( nId )
{
case RES_POOLCOLL_SENDADRESS: // --> ADDRESS
@@ -2632,7 +2632,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
case RES_POOLCOLL_STANDARD: // --> P
case RES_POOLCOLL_FOOTNOTE:
case RES_POOLCOLL_ENDNOTE:
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
if( bWeiter )
@@ -2651,7 +2651,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
aLst.Append( cPARA, pColl->GetName() );
}
- const BOOL bAll = nSMask == SFXSTYLEBIT_ALL;
+ const sal_Bool bAll = nSMask == SFXSTYLEBIT_ALL;
if ( bAll || (nSMask & ~SFXSTYLEBIT_USED) == SWSTYLEBIT_TEXT )
AppendStyleList(SwStyleNameMapper::GetTextUINameArray(),
bIsSearchUsed, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, cPARA );
@@ -2684,7 +2684,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( !bAll )
{
// dann auch die, die wir mappen:
- static USHORT aPoolIds[] = {
+ static sal_uInt16 aPoolIds[] = {
RES_POOLCOLL_SENDADRESS, // --> ADDRESS
RES_POOLCOLL_TABLE_HDLN, // --> TH
RES_POOLCOLL_TABLE, // --> TD
@@ -2702,7 +2702,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
0
};
- USHORT* pPoolIds = aPoolIds;
+ sal_uInt16* pPoolIds = aPoolIds;
String s;
while( *pPoolIds )
{
@@ -2718,8 +2718,8 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( nSearchFamily == SFX_STYLE_FAMILY_FRAME ||
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- const USHORT nArrLen = rDoc.GetFrmFmts()->Count();
- for( USHORT i = 0; i < nArrLen; i++ )
+ const sal_uInt16 nArrLen = rDoc.GetFrmFmts()->Count();
+ for( sal_uInt16 i = 0; i < nArrLen; i++ )
{
SwFrmFmt* pFmt = (*rDoc.GetFrmFmts())[ i ];
@@ -2728,8 +2728,8 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
continue;
}
- const USHORT nId = pFmt->GetPoolFmtId();
- BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFmt));
+ const sal_uInt16 nId = pFmt->GetPoolFmtId();
+ sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFmt));
if( !bUsed )
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
@@ -2754,13 +2754,13 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( nSearchFamily == SFX_STYLE_FAMILY_PAGE ||
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- const USHORT nCount = rDoc.GetPageDescCnt();
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = rDoc.GetPageDescCnt();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const SwPageDesc& rDesc =
const_cast<const SwDoc &>(rDoc).GetPageDesc(i);
- const USHORT nId = rDesc.GetPoolFmtId();
- BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc));
+ const sal_uInt16 nId = rDesc.GetPoolFmtId();
+ sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc));
if( !bUsed )
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
@@ -2781,12 +2781,12 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
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() )
{
- BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rRule) );
+ sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rRule) );
if( !bUsed )
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
@@ -2818,7 +2818,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::Next()
if(aLst.Count() > 0 && nLastPos < aLst.Count())
{
mxIterSheet->PresetNameAndFamily(*aLst[nLastPos]);
- mxIterSheet->SetPhysical( FALSE );
+ mxIterSheet->SetPhysical( sal_False );
mxIterSheet->SetMask( nMask );
if(mxIterSheet->pSet)
{
@@ -2844,7 +2844,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find( const UniString& rName )
// neuer Name gesetzt, also bestimme seine Daten
mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
if( !mxStyleSheet->IsPhysical() )
- mxStyleSheet->SetPhysical( FALSE );
+ mxStyleSheet->SetPhysical( sal_False );
return mxStyleSheet.get();
}
@@ -2852,16 +2852,16 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find( const UniString& rName )
}
void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList,
- BOOL bTestUsed,
- USHORT nSection, char cType )
+ sal_Bool bTestUsed,
+ sal_uInt16 nSection, char cType )
{
if( bTestUsed )
{
SwDoc& rDoc = ((SwDocStyleSheetPool*)pBasePool)->GetDoc();
- for ( USHORT i=0; i < rList.Count(); ++i )
+ for ( sal_uInt16 i=0; i < rList.Count(); ++i )
{
- BOOL bUsed = FALSE;
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(*rList[i], (SwGetPoolIdFromName)nSection);
+ sal_Bool bUsed = sal_False;
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(*rList[i], (SwGetPoolIdFromName)nSection);
switch ( nSection )
{
case nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL:
@@ -2883,7 +2883,7 @@ void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList,
}
}
else
- for ( USHORT i=0; i < rList.Count(); ++i )
+ for ( sal_uInt16 i=0; i < rList.Count(); ++i )
aLst.Append( cType, *rList[i] );
}
@@ -2897,7 +2897,7 @@ void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint )
if (pStyle)
{
- USHORT nTmpPos = lcl_FindName( aLst, pStyle->GetFamily(),
+ sal_uInt16 nTmpPos = lcl_FindName( aLst, pStyle->GetFamily(),
pStyle->GetName() );
if( nTmpPos < aLst.Count() )
aLst.DeleteAndDestroy( nTmpPos );
diff --git a/sw/source/ui/app/mainwn.cxx b/sw/source/ui/app/mainwn.cxx
index e6085a4a8662..d9750b737617 100644
--- a/sw/source/ui/app/mainwn.cxx
+++ b/sw/source/ui/app/mainwn.cxx
@@ -58,7 +58,7 @@ static SvPtrarr *pProgressContainer = 0;
static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell )
{
- for ( USHORT i = 0; i < pProgressContainer->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pProgressContainer->Count(); ++i )
{
SwProgress *pTmp = (SwProgress*)(*pProgressContainer)[i];
if ( pTmp->pDocShell == pDocShell )
@@ -68,7 +68,7 @@ static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell )
}
-void StartProgress( USHORT nMessResId, long nStartValue, long nEndValue,
+void StartProgress( sal_uInt16 nMessResId, long nStartValue, long nEndValue,
SwDocShell *pDocShell )
{
if( !SW_MOD()->IsEmbeddedLoadSave() )
@@ -88,8 +88,8 @@ void StartProgress( USHORT nMessResId, long nStartValue, long nEndValue,
pProgress->pProgress = new SfxProgress( pDocShell,
SW_RESSTR(nMessResId),
nEndValue - nStartValue,
- FALSE,
- TRUE );
+ sal_False,
+ sal_True );
pProgress->nStartCount = 1;
pProgress->pDocShell = pDocShell;
pProgressContainer->Insert( (void*)pProgress, 0 );
@@ -115,7 +115,7 @@ void EndProgress( SwDocShell *pDocShell )
if( pProgressContainer && !SW_MOD()->IsEmbeddedLoadSave() )
{
SwProgress *pProgress = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < pProgressContainer->Count(); ++i )
{
SwProgress *pTmp = (SwProgress*)(*pProgressContainer)[i];
@@ -141,7 +141,7 @@ void EndProgress( SwDocShell *pDocShell )
}
-void SetProgressText( USHORT nId, SwDocShell *pDocShell )
+void SetProgressText( sal_uInt16 nId, SwDocShell *pDocShell )
{
if( pProgressContainer && !SW_MOD()->IsEmbeddedLoadSave() )
{
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index 2b3a5df1391b..f5e79b9da72f 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -160,7 +160,7 @@ SwView* SwModule::GetNextView(SwView* pView)
{
DBG_ASSERT(PTR_CAST(SwView, pView),"keine SwView uebergeben");
const TypeId aTypeId = TYPE(SwView);
- SwView* pNView = (SwView*)SfxViewShell::GetNext(*pView, &aTypeId, TRUE);
+ SwView* pNView = (SwView*)SfxViewShell::GetNext(*pView, &aTypeId, sal_True);
return pNView;
}
@@ -236,7 +236,7 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
/* -----------------------------28.09.00 12:36--------------------------------
---------------------------------------------------------------------------*/
-void SwModule::ApplyUserMetric( FieldUnit eMetric, BOOL bWeb )
+void SwModule::ApplyUserMetric( FieldUnit eMetric, sal_Bool bWeb )
{
SwMasterUsrPref* pPref;
if(bWeb)
@@ -274,7 +274,7 @@ void SwModule::ApplyUserMetric( FieldUnit eMetric, BOOL bWeb )
/*-- 12.11.2008 14:47:58---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwModule::ApplyRulerMetric( FieldUnit eMetric, BOOL bHorizontal, BOOL bWeb )
+void SwModule::ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_Bool bWeb )
{
SwMasterUsrPref* pPref;
if(bWeb)
@@ -329,11 +329,11 @@ SwPrintOptions* SwModule::GetPrtOptions(sal_Bool bWeb)
{
if(bWeb && !pWebPrtOpt)
{
- pWebPrtOpt = new SwPrintOptions(TRUE);
+ pWebPrtOpt = new SwPrintOptions(sal_True);
}
else if(!bWeb && !pPrtOpt)
{
- pPrtOpt = new SwPrintOptions(FALSE);
+ pPrtOpt = new SwPrintOptions(sal_False);
}
return bWeb ? pWebPrtOpt : pPrtOpt;
@@ -353,7 +353,7 @@ SwChapterNumRules* SwModule::GetChapterNumRules()
Beschreibung:
--------------------------------------------------------------------*/
-void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, BOOL /*bOnlyIfAvailable*/)
+void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, sal_Bool /*bOnlyIfAvailable*/)
{
Reference<XFrame> xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface();
Reference<XDispatchProvider> xDP(xFrame, uno::UNO_QUERY);
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index 3f1c4665c6e3..644faae08d26 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -468,7 +468,7 @@ void SwDLL::RegisterControls()
::avmedia::MediaPlayer::RegisterChildWindow(0, pMod);
SvxSmartTagsControl::RegisterControl(SID_OPEN_SMARTTAGMENU, pMod);
- ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pMod );
+ ::sfx2::TaskPaneWrapper::RegisterChildWindow( sal_False, pMod );
}
diff --git a/sw/source/ui/app/swwait.cxx b/sw/source/ui/app/swwait.cxx
index 4392bdea04ac..95dd59900a13 100644
--- a/sw/source/ui/app/swwait.cxx
+++ b/sw/source/ui/app/swwait.cxx
@@ -36,31 +36,31 @@
#include <swwait.hxx>
-void SwDocShell::EnterWait( BOOL bLockDispatcher )
+void SwDocShell::EnterWait( sal_Bool bLockDispatcher )
{
- SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE );
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, sal_False );
while ( pFrame )
{
pFrame->GetWindow().EnterWait();
if ( bLockDispatcher )
- pFrame->GetDispatcher()->Lock( TRUE );
- pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE );
+ pFrame->GetDispatcher()->Lock( sal_True );
+ pFrame = SfxViewFrame::GetNext( *pFrame, this, sal_False );
}
}
-void SwDocShell::LeaveWait( BOOL bLockDispatcher )
+void SwDocShell::LeaveWait( sal_Bool bLockDispatcher )
{
- SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE );
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, sal_False );
while ( pFrame )
{
pFrame->GetWindow().LeaveWait();
if ( bLockDispatcher )
- pFrame->GetDispatcher()->Lock( FALSE );
- pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE );
+ pFrame->GetDispatcher()->Lock( sal_False );
+ pFrame = SfxViewFrame::GetNext( *pFrame, this, sal_False );
}
}
-SwWait::SwWait( SwDocShell &rDocShell, BOOL bLockDispatcher ) :
+SwWait::SwWait( SwDocShell &rDocShell, sal_Bool bLockDispatcher ) :
rDoc ( rDocShell ),
bLock( bLockDispatcher )
{
diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx
index 967505a5f96d..13d40f258552 100644
--- a/sw/source/ui/cctrl/actctrl.cxx
+++ b/sw/source/ui/cctrl/actctrl.cxx
@@ -50,7 +50,7 @@ long NumEditAction::Notify( NotifyEvent& rNEvt )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
const KeyCode aKeyCode = pKEvt->GetKeyCode();
- const USHORT nModifier = aKeyCode.GetModifier();
+ const sal_uInt16 nModifier = aKeyCode.GetModifier();
if( aKeyCode.GetCode() == KEY_RETURN &&
!nModifier)
{
@@ -80,12 +80,12 @@ NoSpaceEdit::~NoSpaceEdit()
void NoSpaceEdit::KeyInput(const KeyEvent& rEvt)
{
- BOOL bCallParent = TRUE;
+ sal_Bool bCallParent = sal_True;
if(rEvt.GetCharCode())
{
String sKey = rEvt.GetCharCode();
if( STRING_NOTFOUND != sForbiddenChars.Search(sKey))
- bCallParent = FALSE;
+ bCallParent = sal_False;
}
if(bCallParent)
Edit::KeyInput(rEvt);
@@ -97,11 +97,11 @@ void NoSpaceEdit::Modify()
{
Selection aSel = GetSelection();
String sTemp = GetText();
- for(USHORT i = 0; i < sForbiddenChars.Len(); i++)
+ for(sal_uInt16 i = 0; i < sForbiddenChars.Len(); i++)
{
sTemp.EraseAllChars( sForbiddenChars.GetChar(i) );
}
- USHORT nDiff = GetText().Len() - sTemp.Len();
+ sal_uInt16 nDiff = GetText().Len() - sTemp.Len();
if(nDiff)
{
aSel.setMin(aSel.getMin() - nDiff);
@@ -124,7 +124,7 @@ ReturnActionEdit::~ReturnActionEdit()
void ReturnActionEdit::KeyInput( const KeyEvent& rEvt)
{
const KeyCode aKeyCode = rEvt.GetKeyCode();
- const USHORT nModifier = aKeyCode.GetModifier();
+ const sal_uInt16 nModifier = aKeyCode.GetModifier();
if( aKeyCode.GetCode() == KEY_RETURN &&
!nModifier)
{
diff --git a/sw/source/ui/cctrl/popbox.cxx b/sw/source/ui/cctrl/popbox.cxx
index 9b99a41b3e64..9d09a613283f 100644
--- a/sw/source/ui/cctrl/popbox.cxx
+++ b/sw/source/ui/cctrl/popbox.cxx
@@ -67,8 +67,8 @@ long SwHelpToolBox::DoubleClick( ToolBox* pCaller )
{
// kein Doppelklick auf einen Button
if( 0 == pCaller->GetCurItemId() && aDoubleClickLink.Call(0) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
/*-----------------26.02.94 00:36-------------------
diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index a6a50a01f851..ebb91b5f7ff7 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -45,16 +45,16 @@ SV_IMPL_PTRARR(SwEntryLst, SwBoxEntry*)
SwBoxEntry::SwBoxEntry() :
- bModified(FALSE),
- bNew(FALSE),
+ bModified(sal_False),
+ bNew(sal_False),
nId(LISTBOX_APPEND)
{
}
-SwBoxEntry::SwBoxEntry(const String& aNam, USHORT nIdx) :
- bModified(FALSE),
- bNew(FALSE),
+SwBoxEntry::SwBoxEntry(const String& aNam, sal_uInt16 nIdx) :
+ bModified(sal_False),
+ bNew(sal_False),
aName(aNam),
nId(nIdx)
{
@@ -72,13 +72,13 @@ SwBoxEntry::SwBoxEntry(const SwBoxEntry& rOld) :
-SwComboBox::SwComboBox(Window* pParent, const ResId& rId, USHORT nStyleBits ):
+SwComboBox::SwComboBox(Window* pParent, const ResId& rId, sal_uInt16 nStyleBits ):
ComboBox(pParent, rId),
nStyle(nStyleBits)
{
// Verwaltung fuer die Stringlist aus der Resource aufbauen
- USHORT nSize = GetEntryCount();
- for( USHORT i=0; i < nSize; ++i )
+ sal_uInt16 nSize = GetEntryCount();
+ for( sal_uInt16 i=0; i < nSize; ++i )
{
const SwBoxEntry* pTmp = new SwBoxEntry(ComboBox::GetEntry(i), i);
aEntryLst.Insert(pTmp, aEntryLst.Count() );
@@ -112,7 +112,7 @@ void SwComboBox::InsertEntry(const SwBoxEntry& rEntry)
--------------------------------------------------------------------*/
-void SwComboBox::RemoveEntry(USHORT nPos)
+void SwComboBox::RemoveEntry(sal_uInt16 nPos)
{
if(nPos >= aEntryLst.Count())
return;
@@ -136,7 +136,7 @@ void SwComboBox::RemoveEntry(USHORT nPos)
Beschreibung: Position by Name
--------------------------------------------------------------------*/
-USHORT SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
+sal_uInt16 SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
{
return ComboBox::GetEntryPos(rEntry.aName);
}
@@ -146,7 +146,7 @@ USHORT SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
--------------------------------------------------------------------*/
-const SwBoxEntry& SwComboBox::GetEntry(USHORT nPos) const
+const SwBoxEntry& SwComboBox::GetEntry(sal_uInt16 nPos) const
{
if(nPos < aEntryLst.Count())
return *aEntryLst[nPos];
@@ -159,13 +159,13 @@ const SwBoxEntry& SwComboBox::GetEntry(USHORT nPos) const
--------------------------------------------------------------------*/
-USHORT SwComboBox::GetRemovedCount() const
+sal_uInt16 SwComboBox::GetRemovedCount() const
{
return aDelEntryLst.Count();
}
-const SwBoxEntry& SwComboBox::GetRemovedEntry(USHORT nPos) const
+const SwBoxEntry& SwComboBox::GetRemovedEntry(sal_uInt16 nPos) const
{
if(nPos < aDelEntryLst.Count())
return *aDelEntryLst[nPos];
@@ -181,7 +181,7 @@ const SwBoxEntry& SwComboBox::GetRemovedEntry(USHORT nPos) const
void SwComboBox::InsertSorted(SwBoxEntry* pEntry)
{
ComboBox::InsertEntry(pEntry->aName);
- USHORT nPos = ComboBox::GetEntryPos(pEntry->aName);
+ sal_uInt16 nPos = ComboBox::GetEntryPos(pEntry->aName);
aEntryLst.C40_INSERT(SwBoxEntry, pEntry, nPos);
}
@@ -193,7 +193,7 @@ void SwComboBox::InsertSorted(SwBoxEntry* pEntry)
void SwComboBox::KeyInput( const KeyEvent& rKEvt )
{
- USHORT nChar = rKEvt.GetCharCode();
+ sal_uInt16 nChar = rKEvt.GetCharCode();
if(nStyle & CBS_FILENAME)
{
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index 63d878006f7e..244af428abe0 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -74,11 +74,11 @@ void SwBreakDlg::Apply()
else if(aPageBtn.IsChecked())
{
nKind = 3;
- const USHORT nPos = aPageCollBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos();
if(0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos)
{
aTemplate = aPageCollBox.GetSelectEntry();
- nPgNum = aPageNumBox.IsChecked() ? (USHORT)aPageNumEdit.GetValue() : 0;
+ nPgNum = aPageNumBox.IsChecked() ? (sal_uInt16)aPageNumEdit.GetValue() : 0;
}
}
}
@@ -125,18 +125,18 @@ IMPL_LINK( SwBreakDlg, OkHdl, Button *, EMPTYARG )
{
if(aPageNumBox.IsChecked()) {
// wenn unterschiedliche Seitenvorlagen, testen auf Gueltigkeit
- const USHORT nPos = aPageCollBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos();
// auf Position 0 steht 'Ohne'.
const SwPageDesc *pPageDesc;
if ( 0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos )
pPageDesc = rSh.FindPageDescByName( aPageCollBox.GetSelectEntry(),
- TRUE );
+ sal_True );
else
pPageDesc = &rSh.GetPageDesc(rSh.GetCurPageDesc());
ASSERT(pPageDesc, Seitenvorlage nicht gefunden.);
- const USHORT nUserPage = USHORT(aPageNumEdit.GetValue());
- BOOL bOk = TRUE;
+ const sal_uInt16 nUserPage = sal_uInt16(aPageNumEdit.GetValue());
+ sal_Bool bOk = sal_True;
switch(pPageDesc->GetUseOn())
{
case nsUseOnPage::PD_MIRROR:
@@ -190,8 +190,8 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
// Einfuegen der vorhandenen Seitenvorlagen in die Listbox
- const USHORT nCount = rSh.GetPageDescCnt();
- USHORT i;
+ const sal_uInt16 nCount = rSh.GetPageDescCnt();
+ sal_uInt16 i;
for( i = 0; i < nCount; ++i)
{
@@ -216,22 +216,22 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
void SwBreakDlg::CheckEnable()
{
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if ( bHtmlMode )
{
- aColumnBtn .Enable(FALSE);
- aPageCollBox.Enable(FALSE);
- bEnable = FALSE;
+ aColumnBtn .Enable(sal_False);
+ aPageCollBox.Enable(sal_False);
+ bEnable = sal_False;
}
- else if(rSh.GetFrmType(0,TRUE)
+ else if(rSh.GetFrmType(0,sal_True)
& (FRMTYPE_FLY_ANY | FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE))
{
- aPageBtn.Enable(FALSE);
+ aPageBtn.Enable(sal_False);
if(aPageBtn.IsChecked())
- aLineBtn.Check(TRUE);
- bEnable = FALSE;
+ aLineBtn.Check(sal_True);
+ bEnable = sal_False;
}
- const BOOL bPage = aPageBtn.IsChecked();
+ const sal_Bool bPage = aPageBtn.IsChecked();
aPageCollText.Enable( bPage );
aPageCollBox.Enable ( bPage );
@@ -239,9 +239,9 @@ void SwBreakDlg::CheckEnable()
if ( bEnable )
{
// auf Position 0 steht 'Ohne' Seitenvorlage.
- const USHORT nPos = aPageCollBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos();
if ( 0 == nPos || LISTBOX_ENTRY_NOTFOUND == nPos )
- bEnable = FALSE;
+ bEnable = sal_False;
}
aPageNumBox .Enable(bEnable);
aPageNumEdit.Enable(bEnable);
diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx
index 44b144d28f4b..f2099aabdda1 100644
--- a/sw/source/ui/chrdlg/ccoll.cxx
+++ b/sw/source/ui/chrdlg/ccoll.cxx
@@ -156,7 +156,7 @@ TYPEINIT1_AUTOFACTORY(SwCondCollItem, SfxPoolItem)
****************************************************************************/
-SwCondCollItem::SwCondCollItem(USHORT _nWhich ) :
+SwCondCollItem::SwCondCollItem(sal_uInt16 _nWhich ) :
SfxPoolItem(_nWhich)
{
@@ -188,11 +188,11 @@ SfxPoolItem* SwCondCollItem::Clone( SfxItemPool * /*pPool*/ ) const
int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
{
DBG_ASSERT( SfxPoolItem::operator==(rItem), "unterschiedliche Typen" );
- BOOL bReturn = TRUE;
- for(USHORT i = 0; i < COND_COMMAND_COUNT; i++)
+ sal_Bool bReturn = sal_True;
+ for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++)
if(sStyles[i] != ((SwCondCollItem&)rItem).sStyles[i])
{
- bReturn = FALSE;
+ bReturn = sal_False;
break;
}
@@ -204,7 +204,7 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
****************************************************************************/
-const String& SwCondCollItem::GetStyle(USHORT nPos) const
+const String& SwCondCollItem::GetStyle(sal_uInt16 nPos) const
{
return nPos < COND_COMMAND_COUNT ? sStyles[nPos] : aEmptyStr;
}
@@ -214,7 +214,7 @@ const String& SwCondCollItem::GetStyle(USHORT nPos) const
****************************************************************************/
-void SwCondCollItem::SetStyle(const String* pStyle, USHORT nPos)
+void SwCondCollItem::SetStyle(const String* pStyle, sal_uInt16 nPos)
{
if( nPos < COND_COMMAND_COUNT )
sStyles[nPos] = pStyle ? *pStyle : aEmptyStr;
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 38b1ba906fdd..61ca1e90a750 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -99,7 +99,7 @@ using namespace ::sfx2;
SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
- const String* pStr, BOOL bIsDrwTxtDlg) :
+ const String* pStr, sal_Bool bIsDrwTxtDlg) :
SfxTabDialog(pParent, SW_RES(DLG_CHAR), &rCoreSet, pStr != 0),
rView(rVw),
bIsDrwTxtMode(bIsDrwTxtDlg)
@@ -150,7 +150,7 @@ SwCharDlg::~SwCharDlg()
-void SwCharDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
switch( nId )
@@ -211,18 +211,18 @@ SwCharURLPage::SwCharURLPage( Window* pParent,
aNotVisitedFT( this, SW_RES(FT_NOT_VISITED)),
aNotVisitedLB( this, SW_RES(LB_NOT_VISITED)),
pINetItem(0),
- bModified(FALSE)
+ bModified(sal_False)
{
FreeResource();
const SfxPoolItem* pItem;
SfxObjectShell* pShell;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem) ||
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem) ||
( 0 != ( pShell = SfxObjectShell::Current()) &&
0 != (pItem = pShell->GetItem(SID_HTML_MODE))))
{
- USHORT nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
if(HTMLMODE_ON & nHtmlMode)
{
aStyleFL.Hide();
@@ -243,10 +243,10 @@ SwCharURLPage::SwCharURLPage( Window* pParent,
TargetList* pList = new TargetList;
const SfxFrame& rFrame = pView->GetViewFrame()->GetTopFrame();
rFrame.GetTargetList(*pList);
- USHORT nCount = (USHORT)pList->Count();
+ sal_uInt16 nCount = (sal_uInt16)pList->Count();
if( nCount )
{
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < nCount; i++ )
{
@@ -278,7 +278,7 @@ SwCharURLPage::~SwCharURLPage()
void SwCharURLPage::Reset(const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem))
{
const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem;
aURLED.SetText( INetURLObject::decode( pINetFmt->GetValue(),
@@ -305,11 +305,11 @@ void SwCharURLPage::Reset(const SfxItemSet& rSet)
if( pINetFmt->GetMacroTbl() )
pINetItem->SetMacroTable( *pINetFmt->GetMacroTbl() );
}
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_SELECTION, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_SELECTION, sal_False, &pItem))
{
aTextED.SetText(((const SfxStringItem*)pItem)->GetValue());
- aTextFT.Enable( FALSE );
- aTextED.Enable( FALSE );
+ aTextFT.Enable( sal_False );
+ aTextED.Enable( sal_False );
}
}
@@ -317,7 +317,7 @@ void SwCharURLPage::Reset(const SfxItemSet& rSet)
--------------------------------------------------*/
-BOOL SwCharURLPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwCharURLPage::FillItemSet(SfxItemSet& rSet)
{
::rtl::OUString sURL = aURLED.GetText();
if(sURL.getLength())
@@ -338,7 +338,7 @@ BOOL SwCharURLPage::FillItemSet(SfxItemSet& rSet)
//zuerst die gueltigen Einstellungen setzen
String sEntry = aVisitedLB.GetSelectEntry();
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
aINetFmt.SetVisitedFmtId(nId);
aINetFmt.SetVisitedFmt(nId == RES_POOLCHR_INET_VISIT ? aEmptyStr : sEntry);
@@ -351,14 +351,14 @@ BOOL SwCharURLPage::FillItemSet(SfxItemSet& rSet)
aINetFmt.SetMacroTbl( &pINetItem->GetMacroTable() );
if(aVisitedLB.GetSavedValue() != aVisitedLB.GetSelectEntryPos())
- bModified = TRUE;
+ bModified = sal_True;
if(aNotVisitedLB.GetSavedValue() != aNotVisitedLB.GetSelectEntryPos())
- bModified = TRUE;
+ bModified = sal_True;
if(aTextED.IsModified())
{
- bModified = TRUE;
+ bModified = sal_True;
rSet.Put(SfxStringItem(FN_PARAM_SELECTION, aTextED.GetText()));
}
if(bModified)
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index f31e5d7dc7a7..e4b95c599071 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -89,7 +89,7 @@ using namespace ::com::sun::star::lang;
// Globals ******************************************************************
-static USHORT __FAR_DATA aPageRg[] = {
+static sal_uInt16 __FAR_DATA aPageRg[] = {
RES_PARATR_DROP, RES_PARATR_DROP,
0
};
@@ -104,14 +104,14 @@ class SwDropCapsPict : public Control
String maScriptText;
Color maBackColor;
Color maTextLineColor;
- BYTE mnLines;
+ sal_uInt8 mnLines;
long mnTotLineH;
long mnLineH;
long mnTextH;
- USHORT mnDistance;
+ sal_uInt16 mnDistance;
sal_Int32 mnLeading;
Printer* mpPrinter;
- BOOL mbDelPrinter;
+ sal_Bool mbDelPrinter;
SvULongs maTextWidth;
SvXub_StrLens maScriptChg;
SvUShorts maScriptType;
@@ -126,19 +126,19 @@ class SwDropCapsPict : public Control
Size CalcTextSize( void );
inline void InitPrinter( void );
void _InitPrinter( void );
- void GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, USHORT _nWhich );
+ void GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, sal_uInt16 _nWhich );
public:
SwDropCapsPict(Window *pParent, const ResId &rResId) :
- Control(pParent, rResId), mpPrinter( NULL ), mbDelPrinter( FALSE ) {}
+ Control(pParent, rResId), mpPrinter( NULL ), mbDelPrinter( sal_False ) {}
~SwDropCapsPict();
void UpdatePaintSettings( void ); // also invalidates control!
inline void SetText( const String& rT );
- inline void SetLines( BYTE nL );
- inline void SetDistance( USHORT nD );
- inline void SetValues( const String& rText, BYTE nLines, USHORT nDistance );
+ inline void SetLines( sal_uInt8 nL );
+ inline void SetDistance( sal_uInt16 nD );
+ inline void SetValues( const String& rText, sal_uInt8 nLines, sal_uInt16 nDistance );
void DrawPrev( const Point& rPt );
};
@@ -149,19 +149,19 @@ inline void SwDropCapsPict::SetText( const String& rT )
UpdatePaintSettings();
}
-inline void SwDropCapsPict::SetLines( BYTE nL )
+inline void SwDropCapsPict::SetLines( sal_uInt8 nL )
{
mnLines = nL;
UpdatePaintSettings();
}
-inline void SwDropCapsPict::SetDistance( USHORT nD )
+inline void SwDropCapsPict::SetDistance( sal_uInt16 nD )
{
mnDistance = nD;
UpdatePaintSettings();
}
-inline void SwDropCapsPict::SetValues( const String& rText, BYTE nLines, USHORT nDistance )
+inline void SwDropCapsPict::SetValues( const String& rText, sal_uInt8 nLines, sal_uInt16 nDistance )
{
maText = rText;
mnLines = nLines;
@@ -181,10 +181,10 @@ Default-String aus Zeichenanzahl erzeugen (A, AB, ABC, ...)
****************************************************************************/
-String GetDefaultString(USHORT nChars)
+String GetDefaultString(sal_uInt16 nChars)
{
String aStr;
- for (USHORT i = 0; i < nChars; i++)
+ for (sal_uInt16 i = 0; i < nChars; i++)
aStr += String((char) (i + 65));
return aStr;
}
@@ -218,7 +218,7 @@ Pict: Update Font
#define LINES 10
#define BORDER 2
-void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, USHORT _nWhich )
+void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, sal_uInt16 _nWhich )
{
SfxItemSet aSet( _rPage.rSh.GetAttrPool(), _nWhich, _nWhich);
_rPage.rSh.GetCurAttr(aSet);
@@ -261,7 +261,7 @@ void SwDropCapsPict::UpdatePaintSettings( void )
// CTL
GetFontSettings( *pPage, maCTLFont, RES_CHRATR_CTL_FONT );
- pPage->rSh.Pop(FALSE);
+ pPage->rSh.Pop(sal_False);
pPage->rSh.EndCrsrMove();
}
else
@@ -285,9 +285,9 @@ void SwDropCapsPict::UpdatePaintSettings( void )
maCJKFont.SetSize(Size(0, mnTextH));
maCTLFont.SetSize(Size(0, mnTextH));
- aFont.SetTransparent(TRUE);
- maCJKFont.SetTransparent(TRUE);
- maCTLFont.SetTransparent(TRUE);
+ aFont.SetTransparent(sal_True);
+ maCJKFont.SetTransparent(sal_True);
+ maCTLFont.SetTransparent(sal_True);
aFont.SetColor( SwViewOption::GetFontColor() );
maCJKFont.SetColor( SwViewOption::GetFontColor() );
@@ -337,12 +337,12 @@ void SwDropCapsPict::Paint(const Rectangle &/*rRect*/)
ASSERT(mnLineH > 0, "So klein lassen wir uns nicht machen");
long nY0 = (aOutputSizePixel.Height() - (LINES * mnTotLineH)) / 2;
SetFillColor( maTextLineColor );
- for (USHORT i = 0; i < LINES; ++i)
+ for (sal_uInt16 i = 0; i < LINES; ++i)
DrawRect(Rectangle(Point(BORDER, nY0 + i * mnTotLineH), Size(aOutputSizePixel.Width() - 2 * BORDER, mnLineH)));
// Texthintergrund mit Abstand (240 twips ~ 1 Zeilenhoehe)
- ULONG lDistance = mnDistance;
- USHORT nDistW = (USHORT) (ULONG) (((lDistance * 100) / 240) * mnTotLineH) / 100;
+ sal_uLong lDistance = mnDistance;
+ sal_uInt16 nDistW = (sal_uInt16) (sal_uLong) (((lDistance * 100) / 240) * mnTotLineH) / 100;
SetFillColor( maBackColor );
if(((SwDropCapsPage*)GetParent())->aDropCapsBox.IsChecked())
{
@@ -363,7 +363,7 @@ void SwDropCapsPict::DrawPrev( const Point& rPt )
InitPrinter();
Font aOldFont = mpPrinter->GetFont();
- USHORT nScript;
+ sal_uInt16 nScript;
size_t nIdx = 0;
xub_StrLen nStart = 0;
xub_StrLen nEnd;
@@ -396,7 +396,7 @@ void SwDropCapsPict::DrawPrev( const Point& rPt )
else
break;
}
- while( TRUE );
+ while( sal_True );
mpPrinter->SetFont( aOldFont );
}
@@ -422,8 +422,8 @@ void SwDropCapsPict::CheckScript( void )
}
if( xBreak.is() )
{
- USHORT nScript = xBreak->getScriptType( maText, 0 );
- USHORT nChg = 0;
+ sal_uInt16 nScript = xBreak->getScriptType( maText, 0 );
+ sal_uInt16 nChg = 0;
if( I18N_SCRIPTTYPE::WEAK == nScript )
{
nChg = (xub_StrLen)xBreak->endOfScript( maText, nChg, nScript );
@@ -438,13 +438,13 @@ void SwDropCapsPict::CheckScript( void )
nChg = (xub_StrLen)xBreak->endOfScript( maText, nChg, nScript );
maScriptChg.push_back( nChg );
maScriptType.Insert( nScript, nCnt );
- maTextWidth.Insert( ULONG(0), nCnt++ );
+ maTextWidth.Insert( sal_uLong(0), nCnt++ );
if( nChg < maText.Len() )
nScript = xBreak->getScriptType( maText, nChg );
else
break;
- } while( TRUE );
+ } while( sal_True );
}
}
@@ -452,7 +452,7 @@ Size SwDropCapsPict::CalcTextSize( void )
{
InitPrinter();
- USHORT nScript;
+ sal_uInt16 nScript;
size_t nIdx = 0;
xub_StrLen nStart = 0;
xub_StrLen nEnd;
@@ -478,7 +478,7 @@ Size SwDropCapsPict::CalcTextSize( void )
{
SvxFont& rFnt = ( nScript == I18N_SCRIPTTYPE::ASIAN )? maCJKFont :
( ( nScript == I18N_SCRIPTTYPE::COMPLEX )? maCTLFont : maFont );
- ULONG nWidth = rFnt.GetTxtSize( mpPrinter, maText, nStart, nEnd-nStart ).Width();
+ sal_uLong nWidth = rFnt.GetTxtSize( mpPrinter, maText, nStart, nEnd-nStart ).Width();
if( nIdx < maTextWidth.Count() )
maTextWidth[ nIdx++ ] = nWidth;
@@ -504,7 +504,7 @@ Size SwDropCapsPict::CalcTextSize( void )
else
break;
}
- while( TRUE );
+ while( sal_True );
nHeight -= nAscent;
nCJKHeight -= nCJKAscent;
nCTLHeight -= nCTLAscent;
@@ -532,7 +532,7 @@ void SwDropCapsPict::_InitPrinter()
if ( !mpPrinter )
{
mpPrinter = new Printer;
- mbDelPrinter = TRUE;
+ mbDelPrinter = sal_True;
}
}
@@ -547,7 +547,7 @@ SwDropCapsDlg::SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet ) :
{
SwDropCapsPage* pNewPage = (SwDropCapsPage*) SwDropCapsPage::Create(this, rSet);
- pNewPage->SetFormat(FALSE);
+ pNewPage->SetFormat(sal_False);
SetTabPage(pNewPage);
}
@@ -587,15 +587,15 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
pPict (new SwDropCapsPict(this, SW_RES(CNT_PICT))),
- bModified(FALSE),
- bFormat(TRUE),
+ bModified(sal_False),
+ bFormat(sal_True),
rSh(::GetActiveView()->GetWrtShell())
{
FreeResource();
SetExchangeSupport();
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
//Im Vorlagendialog kann der Text nicht beeinflusst werden
aTextText.Enable( !bFormat );
@@ -652,7 +652,7 @@ Page: FillItemSet-Overload
****************************************************************************/
-BOOL SwDropCapsPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwDropCapsPage::FillItemSet(SfxItemSet &rSet)
{
if(bModified)
FillSet(rSet);
@@ -682,7 +682,7 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet)
aDistanceField.SetValue(0);
}
- ::FillCharStyleListBox(aTemplateBox, rSh.GetView().GetDocShell(), TRUE);
+ ::FillCharStyleListBox(aTemplateBox, rSh.GetView().GetDocShell(), sal_True);
aTemplateBox.InsertEntry(SW_RESSTR(SW_STR_NONE), 0);
// Vorlage defaulten
@@ -692,7 +692,7 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet)
// Controls enablen
aDropCapsBox.Check(aFmtDrop.GetLines() > 1);
- const USHORT nVal = USHORT(aDropCapsField.GetValue());
+ const sal_uInt16 nVal = sal_uInt16(aDropCapsField.GetValue());
if (bFormat)
aTextEdit.SetText(GetDefaultString(nVal));
else
@@ -704,11 +704,11 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet)
// Preview
pPict->SetValues( aTextEdit.GetText(),
- BYTE( aLinesField.GetValue() ),
- USHORT( aDistanceField.Denormalize( aDistanceField.GetValue( FUNIT_TWIP ) ) ) );
+ sal_uInt8( aLinesField.GetValue() ),
+ sal_uInt16( aDistanceField.Denormalize( aDistanceField.GetValue( FUNIT_TWIP ) ) ) );
ClickHdl(&aDropCapsBox);
- bModified = FALSE;
+ bModified = sal_False;
}
/****************************************************************************
@@ -718,7 +718,7 @@ Page: Click-Handler der CheckBox
IMPL_LINK( SwDropCapsPage, ClickHdl, Button *, EMPTYARG )
{
- BOOL bChecked = aDropCapsBox.IsChecked();
+ sal_Bool bChecked = aDropCapsBox.IsChecked();
aWholeWordCB .Enable( bChecked && !bHtmlMode );
@@ -741,7 +741,7 @@ IMPL_LINK( SwDropCapsPage, ClickHdl, Button *, EMPTYARG )
else
pPict->SetText(aEmptyStr);
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -757,7 +757,7 @@ IMPL_LINK( SwDropCapsPage, WholeWordHdl, CheckBox *, EMPTYARG )
ModifyHdl(&aDropCapsField);
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -774,11 +774,11 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
// Ggf. Text setzen
if (pEdit == &aDropCapsField)
{
- USHORT nVal;
- BOOL bSetText = FALSE;
+ sal_uInt16 nVal;
+ sal_Bool bSetText = sal_False;
if (!aWholeWordCB.IsChecked())
- nVal = (USHORT)aDropCapsField.GetValue();
+ nVal = (sal_uInt16)aDropCapsField.GetValue();
else
nVal = 0;
@@ -786,7 +786,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
sPreview = GetDefaultString(nVal);
else
{
- bSetText = TRUE;
+ bSetText = sal_True;
sPreview = rSh.GetDropTxt(nVal);
}
@@ -795,7 +795,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
if (sEdit.Len() && sPreview.CompareTo(sEdit, sEdit.Len()) != COMPARE_EQUAL)
{
sPreview = sEdit.Copy(0, sPreview.Len());
- bSetText = FALSE;
+ bSetText = sal_False;
}
if (bSetText)
@@ -803,8 +803,8 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
}
else if (pEdit == &aTextEdit) // Ggf. Anzahl setzen
{
- USHORT nTmp = aTextEdit.GetText().Len();
- aDropCapsField.SetValue(Max((USHORT)1, nTmp));
+ sal_uInt16 nTmp = aTextEdit.GetText().Len();
+ aDropCapsField.SetValue(Max((sal_uInt16)1, nTmp));
sPreview = aTextEdit.GetText().Copy(0, nTmp);
}
@@ -813,11 +813,11 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
if (pEdit == &aDropCapsField || pEdit == &aTextEdit)
pPict->SetText (sPreview);
else if (pEdit == &aLinesField)
- pPict->SetLines((BYTE)aLinesField.GetValue());
+ pPict->SetLines((sal_uInt8)aLinesField.GetValue());
else
- pPict->SetDistance((USHORT)aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP)));
+ pPict->SetDistance((sal_uInt16)aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP)));
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -830,13 +830,13 @@ Page: Select-Handler der Template-Box.
IMPL_LINK_INLINE_START( SwDropCapsPage, SelectHdl, ListBox *, EMPTYARG )
{
pPict->UpdatePaintSettings();
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
IMPL_LINK_INLINE_END( SwDropCapsPage, SelectHdl, ListBox *, EMPTYARG )
-USHORT* SwDropCapsPage::GetRanges()
+sal_uInt16* SwDropCapsPage::GetRanges()
{
return aPageRg;
}
@@ -848,13 +848,13 @@ void SwDropCapsPage::FillSet( SfxItemSet &rSet )
{
SwFmtDrop aFmt;
- BOOL bOn = aDropCapsBox.IsChecked();
+ sal_Bool bOn = aDropCapsBox.IsChecked();
if(bOn)
{
// Anzahl, Zeilen, Abstand
- aFmt.GetChars() = (BYTE) aDropCapsField.GetValue();
- aFmt.GetLines() = (BYTE) aLinesField.GetValue();
- aFmt.GetDistance() = (USHORT) aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP));
+ aFmt.GetChars() = (sal_uInt8) aDropCapsField.GetValue();
+ aFmt.GetLines() = (sal_uInt8) aLinesField.GetValue();
+ aFmt.GetDistance() = (sal_uInt16) aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP));
aFmt.GetWholeWord() = aWholeWordCB.IsChecked();
// Vorlage
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index f80130f475e9..00d691edd9c3 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -56,7 +56,7 @@
// Globals ******************************************************************
-static USHORT __FAR_DATA aPageRg[] = {
+static sal_uInt16 __FAR_DATA aPageRg[] = {
FN_NUMBER_NEWSTART, FN_NUMBER_NEWSTART_AT,
0
};
@@ -83,18 +83,18 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent,
// --> OD 2008-04-14 #outlinelevel#
msOutlineNumbering( SW_RES( STR_OUTLINE_NUMBERING ) ),
// <--
- bModified(FALSE),
- bCurNumrule(FALSE)
+ bModified(sal_False),
+ bCurNumrule(sal_False)
{
FreeResource();
const SfxPoolItem* pItem;
SfxObjectShell* pObjSh;
- if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, FALSE, &pItem) ||
+ if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, sal_False, &pItem) ||
( 0 != ( pObjSh = SfxObjectShell::Current()) &&
0 != (pItem = pObjSh->GetItem(SID_HTML_MODE))))
{
- USHORT nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
if(HTMLMODE_ON & nHtmlMode)
{
aCountParaFL .Hide();
@@ -131,7 +131,7 @@ SfxTabPage* SwParagraphNumTabPage::Create( Window* pParent,
/*-----------------31.01.98 08:38-------------------
--------------------------------------------------*/
-USHORT* SwParagraphNumTabPage::GetRanges()
+sal_uInt16* SwParagraphNumTabPage::GetRanges()
{
return aPageRg;
}
@@ -139,18 +139,18 @@ USHORT* SwParagraphNumTabPage::GetRanges()
/*-----------------31.01.98 08:38-------------------
--------------------------------------------------*/
-BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
{
//<-#outline level, added by zhaojianwei
if( aOutlineLvLB.GetSelectEntryPos() != aOutlineLvLB.GetSavedValue())
{
- USHORT aOutlineLv = aOutlineLvLB.GetSelectEntryPos();
+ sal_uInt16 aOutlineLv = aOutlineLvLB.GetSelectEntryPos();
const SfxUInt16Item* pOldOutlineLv = (const SfxUInt16Item*)GetOldItem( rSet, SID_ATTR_PARA_OUTLINE_LEVEL);
SfxUInt16Item* pOutlineLv = (SfxUInt16Item*)pOldOutlineLv->Clone();
pOutlineLv->SetValue( aOutlineLv );
rSet.Put(*pOutlineLv);
delete pOutlineLv;
- bModified = TRUE;
+ bModified = sal_True;
}
//<-end
if( aNumberStyleLB.GetSelectEntryPos() != aNumberStyleLB.GetSavedValue())
@@ -163,18 +163,18 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
pRule->SetValue(aStyle);
rSet.Put(*pRule);
delete pRule;
- bModified = TRUE;
+ bModified = sal_True;
}
if(aNewStartCB.GetState() != aNewStartCB.GetSavedValue() ||
aNewStartNumberCB.GetState() != aNewStartNumberCB.GetSavedValue()||
aNewStartNF.GetText() != aNewStartNF.GetSavedValue())
{
- bModified = TRUE;
- BOOL bNewStartChecked = STATE_CHECK == aNewStartCB.GetState();
- BOOL bNumberNewStartChecked = STATE_CHECK == aNewStartNumberCB.GetState();
+ bModified = sal_True;
+ sal_Bool bNewStartChecked = STATE_CHECK == aNewStartCB.GetState();
+ sal_Bool bNumberNewStartChecked = STATE_CHECK == aNewStartNumberCB.GetState();
rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART, bNewStartChecked));
rSet.Put(SfxUInt16Item(FN_NUMBER_NEWSTART_AT,
- bNumberNewStartChecked && bNewStartChecked ? (USHORT)aNewStartNF.GetValue() : USHRT_MAX));
+ bNumberNewStartChecked && bNewStartChecked ? (sal_uInt16)aNewStartNF.GetValue() : USHRT_MAX));
}
if(aCountParaCB.GetSavedValue() != aCountParaCB.GetState() ||
@@ -182,11 +182,11 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
aRestartNF.GetSavedValue() != aRestartNF.GetText() )
{
SwFmtLineNumber aFmt;
- aFmt.SetStartValue( static_cast< ULONG >(aRestartParaCountCB.GetState() == STATE_CHECK ?
+ aFmt.SetStartValue( static_cast< sal_uLong >(aRestartParaCountCB.GetState() == STATE_CHECK ?
aRestartNF.GetValue() : 0 ));
aFmt.SetCountLines( aCountParaCB.IsChecked() );
rSet.Put(aFmt);
- bModified = TRUE;
+ bModified = sal_True;
}
return bModified;
}
@@ -196,7 +196,7 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
--------------------------------------------------*/
void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
{
- BOOL bHasNumberStyle = FALSE;
+ sal_Bool bHasNumberStyle = sal_False;
SfxItemState eItemState = rSet.GetItemState( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) );
@@ -231,7 +231,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
else
aNumberStyleLB.SelectEntry( aStyle );
- bHasNumberStyle = TRUE;
+ bHasNumberStyle = sal_True;
}
else
{
@@ -243,12 +243,12 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART );
if(eItemState > SFX_ITEM_AVAILABLE )
{
- bCurNumrule = TRUE;
+ bCurNumrule = sal_True;
const SfxBoolItem& rStart = (const SfxBoolItem&)rSet.Get(FN_NUMBER_NEWSTART);
aNewStartCB.SetState(
rStart.GetValue() ?
STATE_CHECK : STATE_NOCHECK );
- aNewStartCB.EnableTriState(FALSE);
+ aNewStartCB.EnableTriState(sal_False);
}
else
aNewStartCB.SetState(bHasNumberStyle ? STATE_NOCHECK : STATE_DONTKNOW);
@@ -257,13 +257,13 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART_AT);
if( eItemState > SFX_ITEM_AVAILABLE )
{
- USHORT nNewStart = ((const SfxUInt16Item&)rSet.Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ sal_uInt16 nNewStart = ((const SfxUInt16Item&)rSet.Get(FN_NUMBER_NEWSTART_AT)).GetValue();
aNewStartNumberCB.Check(USHRT_MAX != nNewStart);
if(USHRT_MAX == nNewStart)
nNewStart = 1;
aNewStartNF.SetValue(nNewStart);
- aNewStartNumberCB.EnableTriState(FALSE);
+ aNewStartNumberCB.EnableTriState(sal_False);
}
else
aNewStartCB.SetState(STATE_DONTKNOW);
@@ -274,14 +274,14 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
if( SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_LINENUMBER))
{
SwFmtLineNumber& rNum = (SwFmtLineNumber&)rSet.Get(RES_LINENUMBER);
- ULONG nStartValue = rNum.GetStartValue();
- BOOL bCount = rNum.IsCount();
+ sal_uLong nStartValue = rNum.GetStartValue();
+ sal_Bool bCount = rNum.IsCount();
aCountParaCB.SetState( bCount ? STATE_CHECK : STATE_NOCHECK );
aRestartParaCountCB.SetState( 0 != nStartValue ? STATE_CHECK : STATE_NOCHECK );
aRestartNF.SetValue(nStartValue == 0 ? 1 : nStartValue);
LineCountHdl_Impl(&aCountParaCB);
- aCountParaCB.EnableTriState(FALSE);
- aRestartParaCountCB.EnableTriState(FALSE);
+ aCountParaCB.EnableTriState(sal_False);
+ aRestartParaCountCB.EnableTriState(sal_False);
}
else
{
@@ -292,7 +292,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
aRestartParaCountCB.SaveValue();
aRestartNF.SaveValue();
- bModified = FALSE;
+ bModified = sal_False;
}
/*-----------------31.01.98 08:38-------------------
@@ -324,7 +324,7 @@ void SwParagraphNumTabPage::EnableNewStart()
--------------------------------------------------*/
IMPL_LINK( SwParagraphNumTabPage, NewStartHdl_Impl, CheckBox*, EMPTYARG )
{
- BOOL bEnable = aNewStartCB.IsChecked();
+ sal_Bool bEnable = aNewStartCB.IsChecked();
aNewStartNumberCB.Enable(bEnable);
aNewStartNF.Enable(bEnable && aNewStartNumberCB.IsChecked());
return 0;
@@ -337,7 +337,7 @@ IMPL_LINK( SwParagraphNumTabPage, LineCountHdl_Impl, CheckBox* , EMPTYARG)
{
aRestartParaCountCB.Enable(aCountParaCB.IsChecked());
- BOOL bEnableRestartValue = aRestartParaCountCB.IsEnabled() &&
+ sal_Bool bEnableRestartValue = aRestartParaCountCB.IsEnabled() &&
aRestartParaCountCB.IsChecked();
aRestartFT.Enable(bEnableRestartValue);
aRestartNF.Enable(bEnableRestartValue);
@@ -354,7 +354,7 @@ IMPL_LINK( SwParagraphNumTabPage, StyleHdl_Impl, ListBox*, pBox )
// if( msOutlineNumbering == dd)
{
}
- BOOL bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0;
+ sal_Bool bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0;
aNewStartCB.Enable(bEnable);
NewStartHdl_Impl(&aNewStartCB);
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 0976c7fbf5aa..e91f2d67d880 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -70,10 +70,10 @@
SwParaDlg::SwParaDlg(Window *pParent,
SwView& rVw,
const SfxItemSet& rCoreSet,
- BYTE nDialogMode,
+ sal_uInt8 nDialogMode,
const String *pTitle,
- BOOL bDraw,
- UINT16 nDefPage):
+ sal_Bool bDraw,
+ sal_uInt16 nDefPage):
SfxTabDialog(pParent, bDraw ? SW_RES(DLG_DRAWPARA) : SW_RES(DLG_PARA),
&rCoreSet, 0 != pTitle),
@@ -86,7 +86,7 @@ SwParaDlg::SwParaDlg(Window *pParent,
FreeResource();
nHtmlMode = ::GetHtmlMode(rVw.GetDocShell());
- BOOL bHtmlMode = static_cast< BOOL >(nHtmlMode & HTMLMODE_ON);
+ sal_Bool bHtmlMode = static_cast< sal_Bool >(nHtmlMode & HTMLMODE_ON);
if(pTitle)
{
// Update des Titels
@@ -127,8 +127,8 @@ SwParaDlg::SwParaDlg(Window *pParent,
else
RemoveTabPage(TP_PARA_ASIAN);
- USHORT nWhich(rCoreSet.GetPool()->GetWhich(SID_ATTR_LRSPACE));
- BOOL bLRValid = SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(nWhich);
+ sal_uInt16 nWhich(rCoreSet.GetPool()->GetWhich(SID_ATTR_LRSPACE));
+ sal_Bool bLRValid = SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(nWhich);
if(bHtmlMode || !bLRValid)
RemoveTabPage(TP_TABULATOR);
else
@@ -182,7 +182,7 @@ __EXPORT SwParaDlg::~SwParaDlg()
}
-void __EXPORT SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
+void __EXPORT SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
{
SwWrtShell& rSh = rView.GetWrtShell();
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
@@ -196,7 +196,7 @@ void __EXPORT SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
else if( nId == TP_PARA_STD )
{
aSet.Put(SfxUInt16Item(SID_SVXSTDPARAGRAPHTABPAGE_PAGEWIDTH,
- static_cast< UINT16 >(rSh.GetAnyCurRect(RECT_PAGE_PRT).Width()) ));
+ static_cast< sal_uInt16 >(rSh.GetAnyCurRect(RECT_PAGE_PRT).Width()) ));
if (!bDrawParaDlg)
{
@@ -210,7 +210,7 @@ void __EXPORT SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
{
if (!bDrawParaDlg)
{
- aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,TRUE));
+ aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,sal_True));
rPage.PageCreated(aSet);
}
}
@@ -218,17 +218,17 @@ void __EXPORT SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
{
// Seitenumbruch nur, wenn der Cursor im Body-Bereich und nicht in
// einer Tabelle steht
- const USHORT eType = rSh.GetFrmType(0,TRUE);
+ const sal_uInt16 eType = rSh.GetFrmType(0,sal_True);
if( !(FRMTYPE_BODY & eType) ||
rSh.GetSelectionType() & nsSelectionType::SEL_TBL )
{
- aSet.Put(SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,TRUE));
+ aSet.Put(SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,sal_True));
rPage.PageCreated(aSet);
}
}
else if( TP_DROPCAPS == nId )
{
- ((SwDropCapsPage&)rPage).SetFormat(FALSE);
+ ((SwDropCapsPage&)rPage).SetFormat(sal_False);
}
else if( TP_BACKGROUND == nId )
{
@@ -259,7 +259,7 @@ void __EXPORT SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
aNames.Insert(new String(pBase->GetName()));
pBase = pPool->Next();
}
- for(USHORT i = 0; i < aNames.Count(); i++)
+ for(sal_uInt16 i = 0; i < aNames.Count(); i++)
rBox.InsertEntry(*aNames.GetObject(i));
}
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 44006ef5cab4..94a0e7845930 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -59,7 +59,7 @@
#include "swuiccoll.hxx"
-static USHORT __FAR_DATA aPageRg[] = {
+static sal_uInt16 __FAR_DATA aPageRg[] = {
FN_COND_COLL, FN_COND_COLL,
0
};
@@ -94,7 +94,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
pCmds( SwCondCollItem::GetCmds() ),
pFmt(0),
- bNewTemplate(FALSE)
+ bNewTemplate(sal_False)
{
FreeResource();
SetExchangeSupport();
@@ -118,12 +118,12 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
SfxStyleFamilies aFamilies(SW_RES(DLG_STYLE_DESIGNER));
const SfxStyleFamilyItem* pFamilyItem = 0;
- USHORT nCount = aFamilies.Count();
- USHORT i;
+ sal_uInt16 nCount = aFamilies.Count();
+ sal_uInt16 i;
for( i = 0; i < nCount; ++i)
{
- if(SFX_STYLE_FAMILY_PARA == (USHORT)(pFamilyItem = aFamilies.GetObject(i))->GetFamily())
+ if(SFX_STYLE_FAMILY_PARA == (sal_uInt16)(pFamilyItem = aFamilies.GetObject(i))->GetFamily())
break;
}
@@ -131,7 +131,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
for( i = 0; i < rFilterList.Count(); ++i)
{
aFilterLB.InsertEntry(rFilterList.GetObject(i)->aName);
- USHORT* pFilter = new USHORT(rFilterList.GetObject(i)->nFlags);
+ sal_uInt16* pFilter = new sal_uInt16(rFilterList.GetObject(i)->nFlags);
aFilterLB.SetEntryData(i, pFilter);
}
aFilterLB.SelectEntryPos(1);
@@ -147,8 +147,8 @@ Page: Dtor
__EXPORT SwCondCollPage::~SwCondCollPage()
{
- for(USHORT i = 0; i < aFilterLB.GetEntryCount(); ++i)
- delete (USHORT*)aFilterLB.GetEntryData(i);
+ for(sal_uInt16 i = 0; i < aFilterLB.GetEntryCount(); ++i)
+ delete (sal_uInt16*)aFilterLB.GetEntryData(i);
}
@@ -176,11 +176,11 @@ Page: FillItemSet-Overload
****************************************************************************/
-BOOL __EXPORT SwCondCollPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool __EXPORT SwCondCollPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bModified = TRUE;
+ sal_Bool bModified = sal_True;
SwCondCollItem aCondItem;
- for(USHORT i = 0; i < aStrArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < aStrArr.Count(); i++)
{
String sEntry = aTbLinks.GetEntryText(i, 1);
aCondItem.SetStyle( &sEntry, i);
@@ -216,7 +216,7 @@ void __EXPORT SwCondCollPage::Reset(const SfxItemSet &/*rSet*/)
}
aStyleLB.SelectEntryPos(0);
- for( USHORT n = 0; n < aStrArr.Count(); n++)
+ for( sal_uInt16 n = 0; n < aStrArr.Count(); n++)
{
String aEntry( aStrArr.GetString(n) );
aEntry += '\t';
@@ -242,7 +242,7 @@ void __EXPORT SwCondCollPage::Reset(const SfxItemSet &/*rSet*/)
****************************************************************************/
-USHORT* __EXPORT SwCondCollPage::GetRanges()
+sal_uInt16* __EXPORT SwCondCollPage::GetRanges()
{
return aPageRg;
}
@@ -255,10 +255,10 @@ USHORT* __EXPORT SwCondCollPage::GetRanges()
IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox )
{
- const BOOL bEnable = pBox->IsChecked();
+ const sal_Bool bEnable = pBox->IsChecked();
aContextFT.Enable( bEnable );
aUsedFT .Enable( bEnable );
- aTbLinks .EnableList( bEnable != FALSE );
+ aTbLinks .EnableList( bEnable != sal_False );
aStyleFT .Enable( bEnable );
aStyleLB .Enable( bEnable );
aFilterLB .Enable( bEnable );
@@ -277,7 +277,7 @@ IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox )
IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
{
SvLBoxEntry* pE = aTbLinks.FirstSelected();
- ULONG nPos;
+ sal_uLong nPos;
if( !pE || LISTBOX_ENTRY_NOTFOUND ==
( nPos = aTbLinks.GetModel()->GetAbsPos( pE ) ) )
{
@@ -285,21 +285,21 @@ IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
return 0;
}
- String sSel = aStrArr.GetString( USHORT(nPos) );
+ String sSel = aStrArr.GetString( sal_uInt16(nPos) );
sSel += '\t';
- const BOOL bAssEnabled = pBtn != &aRemovePB && aAssignPB.IsEnabled();
+ const sal_Bool bAssEnabled = pBtn != &aRemovePB && aAssignPB.IsEnabled();
aAssignPB.Enable( !bAssEnabled );
aRemovePB.Enable( bAssEnabled );
if ( bAssEnabled )
sSel += aStyleLB.GetSelectEntry();
- aTbLinks.SetUpdateMode(FALSE);
+ aTbLinks.SetUpdateMode(sal_False);
aTbLinks.GetModel()->Remove(pE);
pE = aTbLinks.InsertEntryToColumn(sSel, nPos);
aTbLinks.Select(pE);
aTbLinks.MakeVisible(pE);
- aTbLinks.SetUpdateMode(TRUE);
+ aTbLinks.SetUpdateMode(sal_True);
return 0;
}
@@ -313,8 +313,8 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
if(pBox == &aFilterLB)
{
aStyleLB.Clear();
- USHORT nSearchFlags = pBox->GetSelectEntryPos();
- nSearchFlags = *(USHORT*)aFilterLB.GetEntryData(nSearchFlags);
+ sal_uInt16 nSearchFlags = pBox->GetSelectEntryPos();
+ nSearchFlags = *(sal_uInt16*)aFilterLB.GetEntryData(nSearchFlags);
SfxStyleSheetBasePool* pPool = rSh.GetView().GetDocShell()->GetStyleSheetPool();
pPool->SetSearchMask(SFX_STYLE_FAMILY_PARA, nSearchFlags);
const SfxStyleSheetBase* pBase = pPool->First();
@@ -350,7 +350,7 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
****************************************************************************/
-void SwCondCollPage::SetCollection( SwFmt* pFormat, BOOL bNew )
+void SwCondCollPage::SetCollection( SwFmt* pFormat, sal_Bool bNew )
{
pFmt = pFormat;
bNewTemplate = bNew;
diff --git a/sw/source/ui/config/barcfg.cxx b/sw/source/ui/config/barcfg.cxx
index 5fb403da58ce..a271d50fd6dd 100644
--- a/sw/source/ui/config/barcfg.cxx
+++ b/sw/source/ui/config/barcfg.cxx
@@ -50,11 +50,11 @@ using namespace com::sun::star::uno;
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-SwToolbarConfigItem::SwToolbarConfigItem( BOOL bWeb ) :
+SwToolbarConfigItem::SwToolbarConfigItem( sal_Bool bWeb ) :
ConfigItem(bWeb ? C2U("Office.WriterWeb/ObjectBar") : C2U("Office.Writer/ObjectBar"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE)
{
- for(USHORT i = 0; i <= SEL_TYPE_GRAPHIC; i++ )
+ for(sal_uInt16 i = 0; i <= SEL_TYPE_GRAPHIC; i++ )
aTbxIdArray[i] = -1;
Sequence<OUString> aNames = GetPropertyNames();
diff --git a/sw/source/ui/config/caption.cxx b/sw/source/ui/config/caption.cxx
index d60361e49453..25a3c85e1ee4 100644
--- a/sw/source/ui/config/caption.cxx
+++ b/sw/source/ui/config/caption.cxx
@@ -42,15 +42,15 @@
--------------------------------------------------------------------*/
InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleId) :
- bUseCaption(FALSE),
+ bUseCaption(sal_False),
eObjType(eType),
nNumType(SVX_NUM_ARABIC),
sNumberSeparator( ::rtl::OUString::createFromAscii(". ") ),
nPos(1),
nLevel(0),
sSeparator( String::CreateFromAscii( ": " ) ),
- bIgnoreSeqOpts(FALSE),
- bCopyAttributes(FALSE)
+ bIgnoreSeqOpts(sal_False),
+ bCopyAttributes(sal_False)
{
if (pOleId)
aOleId = *pOleId;
@@ -100,7 +100,7 @@ InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt )
Beschreibung:
--------------------------------------------------------------------*/
-BOOL InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
+sal_Bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
{
return (eObjType == rOpt.eObjType &&
aOleId == rOpt.aOleId); // Damit gleiche Ole-IDs nicht mehrfach eingefuegt
@@ -127,9 +127,9 @@ BOOL InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
/*SvStream& operator>>( SvStream& rIStream, InsCaptionOpt& rCapOpt )
{
rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding();
- UINT16 nVal;
- BYTE cVal;
- BYTE nVersion;
+ sal_uInt16 nVal;
+ sal_uInt8 cVal;
+ sal_uInt8 nVersion;
rIStream >> nVersion;
rIStream >> cVal; rCapOpt.UseCaption() = cVal != 0;
@@ -160,20 +160,20 @@ BOOL InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
/*SvStream& operator<<( SvStream& rOStream, const InsCaptionOpt& rCapOpt )
{
rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding();
- rOStream << (BYTE)CAPTION_VERSION
- << (BYTE)rCapOpt.UseCaption()
- << (UINT16)rCapOpt.eObjType
+ rOStream << (sal_uInt8)CAPTION_VERSION
+ << (sal_uInt8)rCapOpt.UseCaption()
+ << (sal_uInt16)rCapOpt.eObjType
<< rCapOpt.aOleId;
rOStream.WriteByteString( rCapOpt.sCategory, eEncoding );
- rOStream << (UINT16)rCapOpt.nNumType;
+ rOStream << (sal_uInt16)rCapOpt.nNumType;
rOStream.WriteByteString( rCapOpt.sCaption, eEncoding );
- BYTE cSep = ByteString(rCapOpt.sSeparator, eEncoding).GetChar(0);
- rOStream << (UINT16)rCapOpt.nPos
- << (UINT16)rCapOpt.nLevel
+ sal_uInt8 cSep = ByteString(rCapOpt.sSeparator, eEncoding).GetChar(0);
+ rOStream << (sal_uInt16)rCapOpt.nPos
+ << (sal_uInt16)rCapOpt.nLevel
<< cSep;
return rOStream;
diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx
index 8652970d588f..8197190b6c83 100644
--- a/sw/source/ui/config/cfgitems.cxx
+++ b/sw/source/ui/config/cfgitems.cxx
@@ -54,7 +54,7 @@ TYPEINIT1_AUTOFACTORY(SwAddPrinterItem, SfxPoolItem)
TYPEINIT1_AUTOFACTORY(SwShadowCursorItem, SfxPoolItem)
-SwDocDisplayItem::SwDocDisplayItem( USHORT _nWhich ) :
+SwDocDisplayItem::SwDocDisplayItem( sal_uInt16 _nWhich ) :
SfxPoolItem(_nWhich),
aIndexBackgrndCol(COL_GRAY)
{
@@ -66,7 +66,7 @@ SwDocDisplayItem::SwDocDisplayItem( USHORT _nWhich ) :
bFldHiddenText =
bCharHiddenText =
bManualBreak =
- bShowHiddenPara = FALSE;
+ bShowHiddenPara = sal_False;
};
@@ -84,17 +84,17 @@ SwDocDisplayItem::SwDocDisplayItem( const SwDocDisplayItem& rDocDisplayItem ):
--------------------------------------------------------------------*/
-SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, USHORT _nWhich ) :
+SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich ) :
SfxPoolItem( _nWhich )
{
- bParagraphEnd = rVOpt.IsParagraph(TRUE);
- bTab = rVOpt.IsTab(TRUE);
- bSpace = rVOpt.IsBlank(TRUE);
+ bParagraphEnd = rVOpt.IsParagraph(sal_True);
+ bTab = rVOpt.IsTab(sal_True);
+ bSpace = rVOpt.IsBlank(sal_True);
bNonbreakingSpace = rVOpt.IsHardBlank();
bSoftHyphen = rVOpt.IsSoftHyph();
- bCharHiddenText = rVOpt.IsShowHiddenChar(TRUE);
+ bCharHiddenText = rVOpt.IsShowHiddenChar(sal_True);
bFldHiddenText = rVOpt.IsShowHiddenField();
- bManualBreak = rVOpt.IsLineBreak(TRUE);
+ bManualBreak = rVOpt.IsLineBreak(sal_True);
bShowHiddenPara = rVOpt.IsShowHiddenPara();
}
@@ -167,7 +167,7 @@ void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-SwElemItem::SwElemItem( USHORT _nWhich ) :
+SwElemItem::SwElemItem( sal_uInt16 _nWhich ) :
SfxPoolItem(_nWhich)
{
bHorzScrollbar =
@@ -184,7 +184,7 @@ SwElemItem::SwElemItem( USHORT _nWhich ) :
bGraphic =
bDrawing =
bFieldName =
- bNotes = FALSE;
+ bNotes = sal_False;
}
/*--------------------------------------------------------------------
Beschreibung:
@@ -199,14 +199,14 @@ SwElemItem::SwElemItem( const SwElemItem& rElemItem ):
Beschreibung:
--------------------------------------------------------------------*/
-SwElemItem::SwElemItem(const SwViewOption& rVOpt, USHORT _nWhich) :
+SwElemItem::SwElemItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich) :
SfxPoolItem( _nWhich )
{
bHorzScrollbar = rVOpt.IsViewHScrollBar();
bVertScrollbar = rVOpt.IsViewVScrollBar();
bAnyRuler = rVOpt.IsViewAnyRuler();
- bHorzRuler = rVOpt.IsViewHRuler(TRUE);
- bVertRuler = rVOpt.IsViewVRuler(TRUE);
+ bHorzRuler = rVOpt.IsViewHRuler(sal_True);
+ bVertRuler = rVOpt.IsViewVRuler(sal_True);
bVertRulerRight = rVOpt.IsVRulerRight();
bCrosshair = rVOpt.IsCrossHair();
bHandles = rVOpt.IsSolidMarkHdl();
@@ -319,7 +319,7 @@ SwAddPrinterItem::SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem ):
Beschreibung: CTOR fuer leeres Item
--------------------------------------------------------------------*/
-SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich):
+SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich):
SfxPoolItem(_nWhich)
{
}
@@ -327,7 +327,7 @@ SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich):
Beschreibung: CTOR aus SwPrintOptions
--------------------------------------------------------------------*/
-SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich, const SwPrintData& rPrtData ) :
+SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich, const SwPrintData& rPrtData ) :
SfxPoolItem(_nWhich)
{
SwPrintData::operator=(rPrtData);
@@ -357,10 +357,10 @@ int SwAddPrinterItem::operator==( const SfxPoolItem& rAttr ) const
Item fuer Einstellungsdialog, ShadowCursorSeite
--------------------------------------------------*/
-SwShadowCursorItem::SwShadowCursorItem( USHORT _nWhich )
+SwShadowCursorItem::SwShadowCursorItem( sal_uInt16 _nWhich )
: SfxPoolItem( _nWhich ),
eMode( FILL_TAB )
- ,bOn( FALSE )
+ ,bOn( sal_False )
{
}
@@ -372,7 +372,7 @@ SwShadowCursorItem::SwShadowCursorItem( const SwShadowCursorItem& rCpy )
{
}
-SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt, USHORT _nWhich )
+SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 _nWhich )
: SfxPoolItem( _nWhich ),
eMode( rVOpt.GetShdwCrsrFillMode() )
,bOn( rVOpt.IsShadowCursor() )
diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx
index e1b951c1c879..140b8da8c42c 100644
--- a/sw/source/ui/config/fontcfg.cxx
+++ b/sw/source/ui/config/fontcfg.cxx
@@ -192,9 +192,9 @@ SwStdFontConfig::~SwStdFontConfig()
/*-----------------18.01.97 10.05-------------------
--------------------------------------------------*/
-BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const
+sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const
{
- BOOL bSame = sal_False;
+ sal_Bool bSame = sal_False;
SvtLinguOptions aLinguOpt;
SvtLinguConfig().GetOptions( aLinguOpt );
@@ -234,7 +234,7 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const
case FONT_CAPTION_CJK :
case FONT_INDEX_CJK :
{
- BOOL b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCJK;
+ sal_Bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCJK;
bSame = b1 && sDefaultFonts[nFontType] == sDefFontCJK;
}
break;
@@ -242,7 +242,7 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const
case FONT_CAPTION_CTL :
case FONT_INDEX_CTL :
{
- BOOL b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCTL;
+ sal_Bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCTL;
bSame = b1 && sDefaultFonts[nFontType] == sDefFontCTL;
}
break;
@@ -253,10 +253,10 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const
/* -----------------11.01.99 13:16-------------------
* Standards auslesen
* --------------------------------------------------*/
-String SwStdFontConfig::GetDefaultFor(USHORT nFontType, LanguageType eLang)
+String SwStdFontConfig::GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang)
{
String sRet;
- USHORT nFontId;
+ sal_uInt16 nFontId;
switch( nFontType )
{
case FONT_OUTLINE :
@@ -294,7 +294,7 @@ String SwStdFontConfig::GetDefaultFor(USHORT nFontType, LanguageType eLang)
/*-- 11.10.2005 10:43:43---------------------------------------------------
-----------------------------------------------------------------------*/
-sal_Int32 SwStdFontConfig::GetDefaultHeightFor(USHORT nFontType, LanguageType eLang)
+sal_Int32 SwStdFontConfig::GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang)
{
sal_Int32 nRet = FONTSIZE_DEFAULT;
switch( nFontType )
@@ -315,7 +315,7 @@ sal_Int32 SwStdFontConfig::GetDefaultHeightFor(USHORT nFontType, LanguageType eL
/*-- 11.10.2005 10:50:06---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwStdFontConfig::ChangeInt( USHORT nFontType, sal_Int32 nHeight )
+void SwStdFontConfig::ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight )
{
DBG_ASSERT( nFontType < DEF_FONT_COUNT, "invalid index in SwStdFontConfig::ChangInt()");
if( nFontType < DEF_FONT_COUNT && nDefaultFontHeight[nFontType] != nHeight)
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 726d27b281d1..b8a34bad578b 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -198,7 +198,7 @@ SfxTabPage* SwMailConfigPage::Create( Window* pParent, const SfxItemSet& rAttrS
/*-- 06.05.2004 10:59:41---------------------------------------------------
-----------------------------------------------------------------------*/
-BOOL SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ )
+sal_Bool SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ )
{
if(m_aDisplayNameED.GetText() != m_aDisplayNameED.GetSavedValue())
m_pConfigItem->SetMailDisplayName(m_aDisplayNameED.GetText());
diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx
index ec0e47393eb2..69414515a404 100644
--- a/sw/source/ui/config/modcfg.cxx
+++ b/sw/source/ui/config/modcfg.cxx
@@ -69,7 +69,7 @@ SV_IMPL_PTRARR_SORT(InsCapOptArr, InsCaptionOptPtr)
* --------------------------------------------------*/
InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalName *pOleId) const
{
- for (USHORT i = 0; i < Count(); i++ )
+ for (sal_uInt16 i = 0; i < Count(); i++ )
{
InsCaptionOpt* pObj = GetObject(i);
if (pObj->GetObjType() == eType &&
@@ -87,7 +87,7 @@ InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalNa
* --------------------------------------------------*/
const InsCaptionOpt* SwModuleOptions::GetCapOption(
- BOOL bHTML, const SwCapObjType eType, const SvGlobalName *pOleId)
+ sal_Bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId)
{
if(bHTML)
{
@@ -96,10 +96,10 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption(
}
else
{
- sal_Bool bFound = FALSE;
+ sal_Bool bFound = sal_False;
if(eType == OLE_CAP && pOleId)
{
- for( USHORT nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++)
+ for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++)
bFound = *pOleId == aInsertConfig.aGlobalNames[nId ];
if(!bFound)
return aInsertConfig.pOLEMiscOpt;
@@ -112,9 +112,9 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption(
*
* --------------------------------------------------*/
-BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt)
+sal_Bool SwModuleOptions::SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if(bHTML)
{
@@ -122,10 +122,10 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt)
}
else if (pOpt)
{
- sal_Bool bFound = FALSE;
+ sal_Bool bFound = sal_False;
if(pOpt->GetObjType() == OLE_CAP && &pOpt->GetOleId())
{
- for( USHORT nId = 0; nId <= GLOB_NAME_CHART; nId++)
+ for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART; nId++)
bFound = pOpt->GetOleId() == aInsertConfig.aGlobalNames[nId ];
if(!bFound)
{
@@ -147,7 +147,7 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt)
rArr.Insert(new InsCaptionOpt(*pOpt));
aInsertConfig.SetModified();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -156,17 +156,17 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt)
--------------------------------------------------*/
SwModuleOptions::SwModuleOptions() :
- aInsertConfig(FALSE),
- aWebInsertConfig(TRUE),
- aTableConfig(FALSE),
- aWebTableConfig(TRUE),
- bHideFieldTips(FALSE)
+ aInsertConfig(sal_False),
+ aWebInsertConfig(sal_True),
+ aTableConfig(sal_False),
+ aWebTableConfig(sal_True),
+ bHideFieldTips(sal_False)
{
}
/* -----------------------------19.01.01 12:26--------------------------------
---------------------------------------------------------------------------*/
-String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI)
+String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFromUI)
{
String sReturn;
if(bFromUI)
@@ -193,7 +193,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI)
case 'x':
{
sal_Unicode nVal, nChar;
- BOOL bValidData = TRUE;
+ sal_Bool bValidData = sal_True;
xub_StrLen n;
for( n = 0, nChar = 0; n < 2 && i < rDelim.Len(); ++n, ++i )
{
@@ -206,7 +206,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI)
else
{
DBG_ERROR( "ungueltiger Hex-Wert" );
- bValidData = FALSE;
+ bValidData = sal_False;
break;
}
@@ -967,7 +967,7 @@ void SwInsertConfig::Load()
else if(!bIsWeb)
return;
- USHORT nInsTblFlags = 0;
+ sal_uInt16 nInsTblFlags = 0;
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
if(pValues[nProp].hasValue())
@@ -1251,10 +1251,10 @@ void SwTableConfig::Load()
sal_Int32 nTemp = 0;
switch(nProp)
{
- case 0 : pValues[nProp] >>= nTemp; nTblHMove = (USHORT)MM100_TO_TWIP(nTemp); break; //"Shift/Row",
- case 1 : pValues[nProp] >>= nTemp; nTblVMove = (USHORT)MM100_TO_TWIP(nTemp); break; //"Shift/Column",
- case 2 : pValues[nProp] >>= nTemp; nTblHInsert = (USHORT)MM100_TO_TWIP(nTemp); break; //"Insert/Row",
- case 3 : pValues[nProp] >>= nTemp; nTblVInsert = (USHORT)MM100_TO_TWIP(nTemp); break; //"Insert/Column",
+ case 0 : pValues[nProp] >>= nTemp; nTblHMove = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Shift/Row",
+ case 1 : pValues[nProp] >>= nTemp; nTblVMove = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Shift/Column",
+ case 2 : pValues[nProp] >>= nTemp; nTblHInsert = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Insert/Row",
+ case 3 : pValues[nProp] >>= nTemp; nTblVInsert = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Insert/Column",
case 4 : pValues[nProp] >>= nTemp; eTblChgMode = (TblChgMode)nTemp; break; //"Change/Effect",
case 5 : bInsTblFormatNum = *(sal_Bool*)pValues[nProp].getValue(); break; //"Input/NumberRecognition",
case 6 : bInsTblChangeNumFormat = *(sal_Bool*)pValues[nProp].getValue(); break; //"Input/NumberFormatRecognition",
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 04b781982979..e54ef583d50c 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -137,7 +137,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe
{
// init options strings with local resource ids -> so do it before FreeResource()
- for ( USHORT nResId = STR_COMP_OPTIONS_START; nResId < STR_COMP_OPTIONS_END; ++nResId )
+ for ( sal_uInt16 nResId = STR_COMP_OPTIONS_START; nResId < STR_COMP_OPTIONS_END; ++nResId )
{
String sEntry = String( SW_RES( nResId ) );
if ( STR_TAB_ALIGNMENT == nResId ||
@@ -149,7 +149,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe
if ( pEntry )
{
m_aOptionsLB.SetCheckButtonState( pEntry, SV_BUTTON_UNCHECKED );
- pEntry->SetUserData( (void*)(ULONG)nResId );
+ pEntry->SetUserData( (void*)(sal_uLong)nResId );
}
}
m_aOptionsLB.SetStyle( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION );
@@ -218,7 +218,7 @@ void SwCompatibilityOptPage::ReplaceFormatName( String& rEntry )
// -----------------------------------------------------------------------
-ULONG convertBools2Ulong_Impl
+sal_uLong convertBools2Ulong_Impl
(
bool _bUsePrtMetrics,
bool _bAddSpacing,
@@ -233,8 +233,8 @@ ULONG convertBools2Ulong_Impl
bool _bExpandWordSpace
)
{
- ULONG nRet = 0;
- ULONG nSetBit = 1;
+ sal_uLong nRet = 0;
+ sal_uLong nSetBit = 1;
if ( _bUsePrtMetrics )
nRet |= nSetBit;
@@ -280,7 +280,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
String sDocTitle;
const SfxPoolItem* pItem = NULL;
SfxObjectShell* pObjShell = NULL;
- if ( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_WRTSHELL, FALSE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_WRTSHELL, sal_False, &pItem ) )
m_pWrtShell = (SwWrtShell*)( (const SwPtrItem*)pItem )->GetValue();
if ( m_pWrtShell )
{
@@ -378,8 +378,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
if ( sNewEntry.Len() == 0 )
sNewEntry = sName;
- USHORT nPos = m_aFormattingLB.InsertEntry( sNewEntry );
- ULONG nOptions = convertBools2Ulong_Impl(
+ sal_uInt16 nPos = m_aFormattingLB.InsertEntry( sNewEntry );
+ sal_uLong nOptions = convertBools2Ulong_Impl(
bUsePrtMetrics, bAddSpacing, bAddSpacingAtPages,
bUseOurTabStops, bNoExtLeading, bUseLineSpacing,
bAddTableSpacing, bUseObjPos, bUseOurTextWrapping,
@@ -410,8 +410,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
IMPL_LINK( SwCompatibilityOptPage, SelectHdl, ListBox*, EMPTYARG )
{
- USHORT nPos = m_aFormattingLB.GetSelectEntryPos();
- ULONG nOptions = (ULONG)(void*)m_aFormattingLB.GetEntryData( nPos );
+ sal_uInt16 nPos = m_aFormattingLB.GetSelectEntryPos();
+ sal_uLong nOptions = (sal_uLong)(void*)m_aFormattingLB.GetEntryData( nPos );
SetCurrentOptions( nOptions );
return 0;
@@ -429,10 +429,10 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG )
{
if ( pItem->m_bIsDefault )
{
- USHORT nCount = static_cast< USHORT >( m_aOptionsLB.GetEntryCount() );
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = static_cast< sal_uInt16 >( m_aOptionsLB.GetEntryCount() );
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
- bool bChecked = ( m_aOptionsLB.IsChecked(i) != FALSE );
+ bool bChecked = ( m_aOptionsLB.IsChecked(i) != sal_False );
CompatibilityOptions eOption = static_cast< CompatibilityOptions >(i);
switch ( eOption )
{
@@ -465,13 +465,13 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG )
// -----------------------------------------------------------------------
-void SwCompatibilityOptPage::SetCurrentOptions( ULONG nOptions )
+void SwCompatibilityOptPage::SetCurrentOptions( sal_uLong nOptions )
{
- ULONG nCount = m_aOptionsLB.GetEntryCount();
+ sal_uLong nCount = m_aOptionsLB.GetEntryCount();
DBG_ASSERT( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
- BOOL bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 );
+ sal_Bool bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 );
m_aOptionsLB.CheckEntryPos( i, bChecked );
nOptions = nOptions >> 1;
}
@@ -479,9 +479,9 @@ void SwCompatibilityOptPage::SetCurrentOptions( ULONG nOptions )
// -----------------------------------------------------------------------
-ULONG SwCompatibilityOptPage::GetDocumentOptions() const
+sal_uLong SwCompatibilityOptPage::GetDocumentOptions() const
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if ( m_pWrtShell )
{
const IDocumentSettingAccess& rIDocumentSettingAccess = *m_pWrtShell->getIDocumentSettingAccess();
@@ -526,75 +526,75 @@ SfxTabPage* SwCompatibilityOptPage::Create( Window* pParent, const SfxItemSet& r
// -----------------------------------------------------------------------
-BOOL SwCompatibilityOptPage::FillItemSet( SfxItemSet& )
+sal_Bool SwCompatibilityOptPage::FillItemSet( SfxItemSet& )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if ( m_pWrtShell )
{
- ULONG nSavedOptions = m_nSavedOptions;
- ULONG nCount = m_aOptionsLB.GetEntryCount();
+ sal_uLong nSavedOptions = m_nSavedOptions;
+ sal_uLong nCount = m_aOptionsLB.GetEntryCount();
DBG_ASSERT( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
bool bSetParaSpaceMax = false;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
CompatibilityOptions nOption = static_cast< CompatibilityOptions >(i);
- BOOL bChecked = m_aOptionsLB.IsChecked(i);
- BOOL bSavedChecked = ( ( nSavedOptions & 0x00000001 ) == 0x00000001 );
+ sal_Bool bChecked = m_aOptionsLB.IsChecked(i);
+ sal_Bool bSavedChecked = ( ( nSavedOptions & 0x00000001 ) == 0x00000001 );
if ( bChecked != bSavedChecked )
{
if ( COPT_USE_PRINTERDEVICE == nOption )
{
m_pWrtShell->SetUseVirDev( !bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( ( COPT_ADD_SPACING == nOption || COPT_ADD_SPACING_AT_PAGES == nOption ) && !bSetParaSpaceMax )
bSetParaSpaceMax = true;
else if ( COPT_USE_OUR_TABSTOPS == nOption )
{
m_pWrtShell->SetTabCompat( !bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_NO_EXTLEADING == nOption )
{
m_pWrtShell->SetAddExtLeading( !bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_USE_LINESPACING == nOption )
{
m_pWrtShell->SetUseFormerLineSpacing( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_ADD_TABLESPACING == nOption )
{
m_pWrtShell->SetAddParaSpacingToTableCells( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_ADD_TABLESPACING == nOption )
{
m_pWrtShell->SetAddParaSpacingToTableCells( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_USE_OBJECTPOSITIONING == nOption )
{
m_pWrtShell->SetUseFormerObjectPositioning( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_USE_OUR_TEXTWRAPPING == nOption )
{
m_pWrtShell->SetUseFormerTextWrapping( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_CONSIDER_WRAPPINGSTYLE == nOption )
{
m_pWrtShell->SetConsiderWrapOnObjPos( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_EXPAND_WORDSPACE == nOption )
{
m_pWrtShell->SetDoNotJustifyLinesWithManualBreak( !bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
}
@@ -603,9 +603,9 @@ BOOL SwCompatibilityOptPage::FillItemSet( SfxItemSet& )
if ( bSetParaSpaceMax )
{
- m_pWrtShell->SetParaSpaceMax( m_aOptionsLB.IsChecked( (USHORT)COPT_ADD_SPACING ) );
- m_pWrtShell->SetParaSpaceMaxAtPages( m_aOptionsLB.IsChecked( (USHORT)COPT_ADD_SPACING_AT_PAGES ) );
- bModified = TRUE;
+ m_pWrtShell->SetParaSpaceMax( m_aOptionsLB.IsChecked( (sal_uInt16)COPT_ADD_SPACING ) );
+ m_pWrtShell->SetParaSpaceMaxAtPages( m_aOptionsLB.IsChecked( (sal_uInt16)COPT_ADD_SPACING_AT_PAGES ) );
+ bModified = sal_True;
}
}
@@ -621,7 +621,7 @@ void SwCompatibilityOptPage::Reset( const SfxItemSet& )
{
m_aOptionsLB.SelectEntryPos( 0 );
- ULONG nOptions = GetDocumentOptions();
+ sal_uLong nOptions = GetDocumentOptions();
SetCurrentOptions( nOptions );
m_nSavedOptions = nOptions;
}
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 4a0c9c2a6b25..f3570d0d21ff 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -102,7 +102,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
aUseSquaredPageMode ( this, SW_RES( CB_USE_SQUARE_PAGE_MODE ) ),
pWrtShell ( NULL ),
- bHTMLMode ( FALSE ),
+ bHTMLMode ( sal_False ),
nLastTab ( 0 ),
nOldLinkMode( MANUAL )
@@ -110,7 +110,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
FreeResource();
SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) );
- for ( USHORT i = 0; i < aMetricArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i )
{
String sMetric = aMetricArr.GetStringByPos( i );
FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i );
@@ -124,7 +124,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
case FUNIT_INCH:
{
// nur diese Metriken benutzen
- USHORT nPos = aMetricLB.InsertEntry( sMetric );
+ sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric );
aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit );
}
default:; //prevent warning
@@ -133,7 +133,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
aMetricLB.SetSelectHdl(LINK(this, SwLoadOptPage, MetricHdl));
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
aTabFT.Hide();
@@ -167,12 +167,12 @@ SfxTabPage* __EXPORT SwLoadOptPage::Create( Window* pParent,
--------------------------------------------------*/
-BOOL __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwModule* pMod = SW_MOD();
- USHORT nNewLinkMode = AUTOMATIC;
+ sal_uInt16 nNewLinkMode = AUTOMATIC;
if (aNeverRB.IsChecked())
nNewLinkMode = NEVER;
else if (aRequestRB.IsChecked())
@@ -201,23 +201,23 @@ BOOL __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
pWrtShell->SetModified();
}
- bRet = TRUE;
+ bRet = sal_True;
}
- const USHORT nMPos = aMetricLB.GetSelectEntryPos();
+ const sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos();
if ( nMPos != aMetricLB.GetSavedValue() )
{
// Doppel-Cast fuer VA3.0
- USHORT nFieldUnit = (USHORT)(long)aMetricLB.GetEntryData( nMPos );
- rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (UINT16)nFieldUnit ) );
- bRet = TRUE;
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aMetricLB.GetEntryData( nMPos );
+ rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) );
+ bRet = sal_True;
}
if(aTabMF.IsVisible() && aTabMF.GetText() != aTabMF.GetSavedValue())
{
rSet.Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP,
- (USHORT)aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP))));
- bRet = TRUE;
+ (sal_uInt16)aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP))));
+ bRet = sal_True;
}
sal_Bool bIsSquaredPageModeFlag = aUseSquaredPageMode.IsChecked();
@@ -230,7 +230,7 @@ BOOL __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
pDoc->SetDefaultPageMode( bIsSquaredPageModeFlag );
pWrtShell->SetModified();
}
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -240,18 +240,18 @@ BOOL __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
--------------------------------------------------*/
void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet)
{
- const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(FALSE);
+ const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(sal_False);
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, sal_False, &pItem))
pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue();
SwFldUpdateFlags eFldFlags = AUTOUPD_GLOBALSETTING;
nOldLinkMode = GLOBALSETTING;
if (pWrtShell)
{
- eFldFlags = pWrtShell->GetFldUpdateFlags(TRUE);
- nOldLinkMode = pWrtShell->GetLinkUpdMode(TRUE);
+ eFldFlags = pWrtShell->GetFldUpdateFlags(sal_True);
+ nOldLinkMode = pWrtShell->GetLinkUpdMode(sal_True);
}
if(GLOBALSETTING == nOldLinkMode)
nOldLinkMode = pUsrPref->GetUpdateLinkMode();
@@ -276,7 +276,7 @@ void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet)
const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet.Get( SID_ATTR_METRIC );
FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue();
- for ( USHORT i = 0; i < aMetricLB.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aMetricLB.GetEntryCount(); ++i )
{
if ( (int)(sal_IntPtr)aMetricLB.GetEntryData( i ) == (int)eFieldUnit )
{
@@ -287,14 +287,14 @@ void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet)
::SetFieldUnit(aTabMF, eFieldUnit);
}
aMetricLB.SaveValue();
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem))
{
nLastTab = ((SfxUInt16Item*)pItem)->GetValue();
aTabMF.SetValue(aTabMF.Normalize(nLastTab), FUNIT_TWIP);
}
aTabMF.SaveValue();
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem))
{
bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
}
@@ -313,12 +313,12 @@ void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet)
IMPL_LINK(SwLoadOptPage, MetricHdl, ListBox*, EMPTYARG)
{
- const USHORT nMPos = aMetricLB.GetSelectEntryPos();
+ const sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos();
if(nMPos != USHRT_MAX)
{
// Doppel-Cast fuer VA3.0
FieldUnit eFieldUnit = (FieldUnit)(long)aMetricLB.GetEntryData( nMPos );
- BOOL bModified = aTabMF.IsModified();
+ sal_Bool bModified = aTabMF.IsModified();
long nVal = bModified ?
sal::static_int_cast<sal_Int32, sal_Int64 >( aTabMF.Denormalize( aTabMF.GetValue( FUNIT_TWIP ) )) :
nLastTab;
@@ -438,7 +438,7 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
sNone (SW_RESSTR( STR_CATEGORY_NONE )),
pMgr (new SwFldMgr()),
- bHTMLMode(FALSE)
+ bHTMLMode(sal_False)
{
Wallpaper aBack( GetSettings().GetStyleSettings().GetWindowColor() );
aPreview.SetBackground( aBack );
@@ -448,11 +448,11 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
SwStyleNameMapper::FillUIName( RES_POOLCOLL_LABEL_FRAME, sText );
SwStyleNameMapper::FillUIName( RES_POOLCOLL_LABEL_DRAWING, sDrawing );
- USHORT i, nCount;
+ sal_uInt16 i, nCount;
SwWrtShell *pSh = ::GetActiveWrtShell();
// aFormatBox
- USHORT nSelFmt = SVX_NUM_ARABIC;
+ sal_uInt16 nSelFmt = SVX_NUM_ARABIC;
if (pSh)
{
nCount = pMgr->GetFldTypeCount();
@@ -461,19 +461,19 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
if( ( pFldType = pMgr->GetFldType(USHRT_MAX, --i))->GetName() ==
aCategoryBox.GetText() )
{
- nSelFmt = (USHORT)((SwSetExpFieldType*)pFldType)->GetSeqFormat();
+ nSelFmt = (sal_uInt16)((SwSetExpFieldType*)pFldType)->GetSeqFormat();
break;
}
- ::FillCharStyleListBox( aCharStyleLB, pSh->GetView().GetDocShell(), TRUE, TRUE );
+ ::FillCharStyleListBox( aCharStyleLB, pSh->GetView().GetDocShell(), sal_True, sal_True );
}
- nCount = pMgr->GetFormatCount(TYP_SEQFLD, FALSE);
+ nCount = pMgr->GetFormatCount(TYP_SEQFLD, sal_False);
for ( i = 0; i < nCount; ++i )
{
aFormatBox.InsertEntry( pMgr->GetFormatStr(TYP_SEQFLD, i) );
- USHORT nFmtId = pMgr->GetFormatId(TYP_SEQFLD, i);
+ sal_uInt16 nFmtId = pMgr->GetFormatId(TYP_SEQFLD, i);
aFormatBox.SetEntryData( i, reinterpret_cast<void*>(nFmtId) );
if( nFmtId == nSelFmt )
aFormatBox.SelectEntryPos( i );
@@ -543,9 +543,9 @@ SfxTabPage* SwCaptionOptPage::Create( Window* pParent,
--------------------------------------------------*/
-BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& )
+sal_Bool SwCaptionOptPage::FillItemSet( SfxItemSet& )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
SaveEntry(aCheckLB.FirstSelected()); // Aktuellen Eintrag uebernehmen
@@ -559,7 +559,7 @@ BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& )
pEntry = aCheckLB.Next(pEntry);
}
- USHORT nCheckCount = aCheckLB.GetCheckedEntryCount();
+ sal_uInt16 nCheckCount = aCheckLB.GetCheckedEntryCount();
pModOpt->SetInsWithCaption( bHTMLMode, nCheckCount > 0 );
sal_Int32 nPos = aLbCaptionOrder.GetSelectEntryPos();
@@ -575,7 +575,7 @@ BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& )
void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem))
{
bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
}
@@ -584,7 +584,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
aCheckLB.GetModel()->Clear(); // remove all entries
// Writer objects
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
aCheckLB.InsertEntry(sSWTable);
SetOptions(nPos++, TABLE_CAP);
aCheckLB.InsertEntry(sSWFrame);
@@ -621,7 +621,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
aObjS.FillInsertObjects();
aObjS.Remove( SvGlobalName( SO3_SW_CLASSID ) ); // remove Writer-ID
- for ( ULONG i = 0; i < aObjS.Count(); ++i )
+ for ( sal_uLong i = 0; i < aObjS.Count(); ++i )
{
const SvGlobalName &rOleId = aObjS[i].GetClassName();
const String* pClassName = &aObjS[i].GetHumanName();
@@ -642,7 +642,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
--------------------------------------------------*/
-void SwCaptionOptPage::SetOptions(const USHORT nPos,
+void SwCaptionOptPage::SetOptions(const sal_uInt16 nPos,
const SwCapObjType eObjType, const SvGlobalName *pOleId)
{
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
@@ -683,7 +683,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
if (pSelEntry)
{
- sal_Bool bChecked = aCheckLB.IsChecked((USHORT)aCheckLB.GetModel()->GetAbsPos(pSelEntry));
+ sal_Bool bChecked = aCheckLB.IsChecked((sal_uInt16)aCheckLB.GetModel()->GetAbsPos(pSelEntry));
aSettingsGroupFL.Enable( bChecked );
aCategoryText.Enable( bChecked );
@@ -716,9 +716,9 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
aCategoryBox.InsertEntry( sNone );
if (pSh)
{
- USHORT nCount = pMgr->GetFldTypeCount();
+ sal_uInt16 nCount = pMgr->GetFldTypeCount();
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
SwFieldType *pType = pMgr->GetFldType( USHRT_MAX, i );
if( pType->Which() == RES_SETEXPFLD &&
@@ -743,7 +743,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
aCategoryBox.InsertEntry(pOpt->GetCategory());
if (!aCategoryBox.GetText().Len())
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
switch(pOpt->GetObjType())
{
case OLE_CAP:
@@ -754,9 +754,9 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
aCategoryBox.SetText(aCategoryBox.GetEntry(nPos).GetName());
}
- for (USHORT i = 0; i < aFormatBox.GetEntryCount(); i++)
+ for (sal_uInt16 i = 0; i < aFormatBox.GetEntryCount(); i++)
{
- if (pOpt->GetNumType() == (USHORT)(ULONG)aFormatBox.GetEntryData(i))
+ if (pOpt->GetNumType() == (sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(i))
{
aFormatBox.SelectEntryPos(i);
break;
@@ -784,7 +784,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
aPosText.IsEnabled() );
aPosBox.SelectEntryPos(pOpt->GetPos());
- USHORT nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0;
+ sal_uInt16 nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0;
aLbLevel.SelectEntryPos( nLevelPos );
aEdDelim.SetText(pOpt->GetSeparator());
aNumberingSeparatorED.SetText( pOpt->GetNumSeparator() );
@@ -826,7 +826,7 @@ void SwCaptionOptPage::SaveEntry(SvLBoxEntry* pEntry)
{
InsCaptionOpt* pOpt = (InsCaptionOpt*)pEntry->GetUserData();
- pOpt->UseCaption() = aCheckLB.IsChecked((USHORT)aCheckLB.GetModel()->GetAbsPos(pEntry));
+ pOpt->UseCaption() = aCheckLB.IsChecked((sal_uInt16)aCheckLB.GetModel()->GetAbsPos(pEntry));
String aName( aCategoryBox.GetText() );
if(aName == sNone)
pOpt->SetCategory(aEmptyStr);
@@ -836,11 +836,11 @@ void SwCaptionOptPage::SaveEntry(SvLBoxEntry* pEntry)
aName.EraseTrailingChars(' ');
pOpt->SetCategory(aName);
}
- pOpt->SetNumType((USHORT)(ULONG)aFormatBox.GetEntryData(aFormatBox.GetSelectEntryPos()));
+ pOpt->SetNumType((sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(aFormatBox.GetSelectEntryPos()));
pOpt->SetCaption(aTextEdit.IsEnabled() ? aTextEdit.GetText() : aEmptyStr );
pOpt->SetPos(aPosBox.GetSelectEntryPos());
- USHORT nPos = aLbLevel.GetSelectEntryPos();
- USHORT nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL;
+ sal_uInt16 nPos = aLbLevel.GetSelectEntryPos();
+ sal_uInt16 nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL;
pOpt->SetLevel(nLevel);
pOpt->SetSeparator(aEdDelim.GetText());
pOpt->SetNumSeparator( aNumberingSeparatorED.GetText());
@@ -914,7 +914,7 @@ void SwCaptionOptPage::DrawSample()
//#i61007# order of captions
bool bOrderNumberingFirst = aLbCaptionOrder.GetSelectEntryPos() == 1;
// Nummer
- USHORT nNumFmt = (USHORT)(ULONG)aFormatBox.GetEntryData(
+ sal_uInt16 nNumFmt = (sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(
aFormatBox.GetSelectEntryPos() );
if( SVX_NUM_NUMBER_NONE != nNumFmt )
{
@@ -934,13 +934,13 @@ void SwCaptionOptPage::DrawSample()
RES_SETEXPFLD, sFldTypeName );
if( pFldType && pFldType->GetOutlineLvl() < MAXLEVEL )
{
- BYTE nLvl = pFldType->GetOutlineLvl();
+ sal_uInt8 nLvl = pFldType->GetOutlineLvl();
SwNumberTree::tNumberVector aNumVector;
- for( BYTE i = 0; i <= nLvl; ++i )
+ for( sal_uInt8 i = 0; i <= nLvl; ++i )
aNumVector.push_back(1);
String sNumber( pSh->GetOutlineNumRule()->MakeNumString(
- aNumVector, FALSE ));
+ aNumVector, sal_False ));
if( sNumber.Len() )
(aStr += sNumber) += pFldType->GetDelimiter();
}
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 6e6ed773a33d..285caa238731 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -127,7 +127,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
{
FreeResource();
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
aMetricLB.Show();
@@ -147,7 +147,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
aAnyRulerCB.SetClickHdl(LINK(this, SwContentOptPage, AnyRulerHdl));
SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) );
- for ( USHORT i = 0; i < aMetricArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i )
{
String sMetric = aMetricArr.GetStringByPos( i );
FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i );
@@ -161,7 +161,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
case FUNIT_INCH:
{
// nur diese Metriken benutzen
- USHORT nPos = aMetricLB.InsertEntry( sMetric );
+ sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric );
aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit );
aVMetric.InsertEntry( sMetric );
aVMetric.SetEntryData( nPos, (void*)(long)eFUnit );
@@ -191,13 +191,13 @@ SfxTabPage* SwContentOptPage::Create( Window* pParent,
/* -----------------------------07.04.01 16:57--------------------------------
---------------------------------------------------------------------------*/
-static void lcl_SelectMetricLB(ListBox& rMetric, USHORT nSID, const SfxItemSet& rSet)
+static void lcl_SelectMetricLB(ListBox& rMetric, sal_uInt16 nSID, const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- if( rSet.GetItemState( nSID, FALSE, &pItem ) >= SFX_ITEM_AVAILABLE )
+ if( rSet.GetItemState( nSID, sal_False, &pItem ) >= SFX_ITEM_AVAILABLE )
{
FieldUnit eFieldUnit = (FieldUnit)((SfxUInt16Item*)pItem)->GetValue();
- for ( USHORT i = 0; i < rMetric.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMetric.GetEntryCount(); ++i )
{
if ( (int)(sal_IntPtr)rMetric.GetEntryData( i ) == (int)eFieldUnit )
{
@@ -215,7 +215,7 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet)
{
const SwElemItem* pElemAttr = 0;
- rSet.GetItemState( FN_PARAM_ELEM , FALSE,
+ rSet.GetItemState( FN_PARAM_ELEM , sal_False,
(const SfxPoolItem**)&pElemAttr );
if(pElemAttr)
{
@@ -245,7 +245,7 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet)
/*-----------------31.08.96 13.58-------------------
--------------------------------------------------*/
-BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet)
{
const SwElemItem* pOldAttr = (const SwElemItem*)
GetOldItem(GetItemSet(), FN_PARAM_ELEM);
@@ -270,34 +270,34 @@ BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet)
aElem.bSmoothScroll = aSmoothCBox.IsChecked();
- BOOL bRet = !pOldAttr || aElem != *pOldAttr;
+ sal_Bool bRet = !pOldAttr || aElem != *pOldAttr;
if(bRet)
bRet = 0 != rSet.Put(aElem);
- USHORT nMPos = aMetricLB.GetSelectEntryPos();
- USHORT nGlobalMetricPos = nMPos;
+ sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos();
+ sal_uInt16 nGlobalMetricPos = nMPos;
if ( nMPos != aMetricLB.GetSavedValue() )
{
// Doppel-Cast fuer VA3.0
- USHORT nFieldUnit = (USHORT)(long)aMetricLB.GetEntryData( nMPos );
- rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (UINT16)nFieldUnit ) );
- bRet = TRUE;
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aMetricLB.GetEntryData( nMPos );
+ rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) );
+ bRet = sal_True;
}
nMPos = aHMetric.GetSelectEntryPos();
if ( nMPos != aHMetric.GetSavedValue() || nMPos != nGlobalMetricPos )
{
// Doppel-Cast fuer VA3.0
- USHORT nFieldUnit = (USHORT)(long)aHMetric.GetEntryData( nMPos );
- rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (UINT16)nFieldUnit ) );
- bRet = TRUE;
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aHMetric.GetEntryData( nMPos );
+ rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (sal_uInt16)nFieldUnit ) );
+ bRet = sal_True;
}
nMPos = aVMetric.GetSelectEntryPos();
if ( nMPos != aVMetric.GetSavedValue() || nMPos != nGlobalMetricPos )
{
// Doppel-Cast fuer VA3.0
- USHORT nFieldUnit = (USHORT)(long)aVMetric.GetEntryData( nMPos );
- rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (UINT16)nFieldUnit ) );
- bRet = TRUE;
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aVMetric.GetEntryData( nMPos );
+ rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (sal_uInt16)nFieldUnit ) );
+ bRet = sal_True;
}
return bRet;
}
@@ -314,7 +314,7 @@ IMPL_LINK(SwContentOptPage, VertRulerHdl, CheckBox*, pBox)
* --------------------------------------------------*/
IMPL_LINK( SwContentOptPage, AnyRulerHdl, CheckBox*, pBox)
{
- BOOL bChecked = pBox->IsChecked();
+ sal_Bool bChecked = pBox->IsChecked();
aHRulerCBox .Enable(bChecked);
aHMetric .Enable(bChecked);
aVRulerCBox .Enable(bChecked);
@@ -357,8 +357,8 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aFaxFT (this, SW_RES(FT_FAX)),
aFaxLB (this, SW_RES(LB_FAX)),
sNone(SW_RES(ST_NONE)),
- bAttrModified( FALSE ),
- bPreview ( FALSE )
+ bAttrModified( sal_False ),
+ bPreview ( sal_False )
{
Init();
FreeResource();
@@ -386,7 +386,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aFaxLB.SetSelectHdl( LINK( this, SwAddPrinterTabPage, SelectHdl ) );
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
// aDrawCB .Hide();
@@ -424,7 +424,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
//------------------------------------------------------------------------
-void SwAddPrinterTabPage::SetPreview(BOOL bPrev)
+void SwAddPrinterTabPage::SetPreview(sal_Bool bPrev)
{
bPreview = bPrev;
@@ -452,13 +452,13 @@ SfxTabPage* SwAddPrinterTabPage::Create( Window* pParent,
//------------------------------------------------------------------------
-BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
{
if ( bAttrModified )
{
SwAddPrinterItem aAddPrinterAttr (FN_PARAM_ADDPRINTER);
aAddPrinterAttr.bPrintGraphic = aGrfCB.IsChecked();
- aAddPrinterAttr.bPrintTable = TRUE; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/
+ aAddPrinterAttr.bPrintTable = sal_True; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/
aAddPrinterAttr.bPrintDraw = aGrfCB.IsChecked(); // UI merged with aGrfCB in CWS printerpullgpages /*aDrawCB.IsChecked()*/;
aAddPrinterAttr.bPrintControl = aCtrlFldCB.IsChecked();
aAddPrinterAttr.bPrintPageBackground = aBackgroundCB.IsChecked();
@@ -468,12 +468,12 @@ BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
aAddPrinterAttr.bPrintLeftPages = aLeftPageCB.IsChecked();
aAddPrinterAttr.bPrintRightPages = aRightPageCB.IsChecked();
- aAddPrinterAttr.bPrintReverse = FALSE; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/;
+ aAddPrinterAttr.bPrintReverse = sal_False; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/;
aAddPrinterAttr.bPrintProspect = aProspectCB.IsChecked();
aAddPrinterAttr.bPrintProspectRTL = aProspectCB_RTL.IsChecked();
aAddPrinterAttr.bPaperFromSetup = aPaperFromSetupCB.IsChecked();
aAddPrinterAttr.bPrintEmptyPages = aPrintEmptyPagesCB.IsChecked();
- aAddPrinterAttr.bPrintSingleJobs = TRUE; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/;
+ aAddPrinterAttr.bPrintSingleJobs = sal_True; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/;
if (aNoRB.IsChecked()) aAddPrinterAttr.nPrintPostIts =
POSTITS_NONE;
@@ -498,7 +498,7 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
const SfxItemSet& rSet = GetItemSet();
const SwAddPrinterItem* pAddPrinterAttr = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , FALSE,
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , sal_False,
(const SfxPoolItem**)&pAddPrinterAttr ))
{
aGrfCB.Check( pAddPrinterAttr->bPrintGraphic || pAddPrinterAttr->bPrintDraw );
@@ -526,14 +526,14 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
}
if (aProspectCB.IsChecked())
{
- aProspectCB_RTL.Enable(TRUE);
- aNoRB.Enable( FALSE );
- aOnlyRB.Enable( FALSE );
- aEndRB.Enable( FALSE );
- aEndPageRB.Enable( FALSE );
+ aProspectCB_RTL.Enable(sal_True);
+ aNoRB.Enable( sal_False );
+ aOnlyRB.Enable( sal_False );
+ aEndRB.Enable( sal_False );
+ aEndPageRB.Enable( sal_False );
}
else
- aProspectCB_RTL.Enable( FALSE );
+ aProspectCB_RTL.Enable( sal_False );
}
//-----------------------------------------------------------------------
@@ -547,10 +547,10 @@ void SwAddPrinterTabPage::Init()
IMPL_LINK_INLINE_START( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
{
- bAttrModified = TRUE;
+ bAttrModified = sal_True;
bool bIsProspect = aProspectCB.IsChecked();
if (!bIsProspect)
- aProspectCB_RTL.Check( FALSE );
+ aProspectCB_RTL.Check( sal_False );
aProspectCB_RTL.Enable( bIsProspect );
aNoRB.Enable( !bIsProspect );
aOnlyRB.Enable( !bIsProspect );
@@ -566,7 +566,7 @@ IMPL_LINK_INLINE_END( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
void SwAddPrinterTabPage::SetFax( const SvStringsDtor& rFaxLst )
{
aFaxLB.InsertEntry(sNone);
- for ( USHORT i = 0; i < rFaxLst.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rFaxLst.Count(); ++i )
aFaxLB.InsertEntry( *rFaxLst.GetObject(i) );
aFaxLB.SelectEntryPos(0);
}
@@ -576,7 +576,7 @@ void SwAddPrinterTabPage::SetFax( const SvStringsDtor& rFaxLst )
IMPL_LINK_INLINE_START( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG )
{
- bAttrModified=TRUE;
+ bAttrModified=sal_True;
return 0;
}
IMPL_LINK_INLINE_END( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG )
@@ -656,20 +656,20 @@ SwStdFontTabPage::SwStdFontTabPage( Window* pParent,
pWrtShell(0),
eLanguage( GetAppLanguage() ),
- bListDefault(FALSE),
- bSetListDefault(TRUE),
- bLabelDefault(FALSE),
- bSetLabelDefault(TRUE),
- bIdxDefault(FALSE),
- bSetIdxDefault(TRUE),
- bDeletePrinter(FALSE),
-
- bListHeightDefault (FALSE),
- bSetListHeightDefault (FALSE),
- bLabelHeightDefault (FALSE),
- bSetLabelHeightDefault(FALSE),
- bIndexHeightDefault (FALSE),
- bSetIndexHeightDefault (FALSE),
+ bListDefault(sal_False),
+ bSetListDefault(sal_True),
+ bLabelDefault(sal_False),
+ bSetLabelDefault(sal_True),
+ bIdxDefault(sal_False),
+ bSetIdxDefault(sal_True),
+ bDeletePrinter(sal_False),
+
+ bListHeightDefault (sal_False),
+ bSetListHeightDefault (sal_False),
+ bLabelHeightDefault (sal_False),
+ bSetLabelHeightDefault(sal_False),
+ bIndexHeightDefault (sal_False),
+ bSetIndexHeightDefault (sal_False),
nFontGroup(FONT_GROUP_DEFAULT),
@@ -722,16 +722,16 @@ SfxTabPage* SwStdFontTabPage::Create( Window* pParent,
/*-----------------03.09.96 11.53-------------------
--------------------------------------------------*/
-void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType,
+void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
SfxPrinter* pPrt, const String& rStyle,
- USHORT nFontWhich)
+ sal_uInt16 nFontWhich)
{
- BOOL bDelete = FALSE;
+ sal_Bool bDelete = sal_False;
const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(rStyle): 0;
if(!pFnt)
{
pFnt = new SfxFont(FAMILY_DONTKNOW, rStyle);
- bDelete = TRUE;
+ bDelete = sal_True;
}
SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(nType);
pColl->SetFmtAttr(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(),
@@ -744,8 +744,8 @@ void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType,
/*-- 11.10.2005 15:47:52---------------------------------------------------
-----------------------------------------------------------------------*/
-void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType,
- sal_Int32 nHeight, USHORT nFontHeightWhich)
+void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
+ sal_Int32 nHeight, sal_uInt16 nFontHeightWhich)
{
float fSize = (float)nHeight / 10;
nHeight = CalcToUnit( fSize, SFX_MAPUNIT_TWIP );
@@ -755,9 +755,9 @@ void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType,
/*-----------------03.09.96 11.53-------------------
--------------------------------------------------*/
-BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& )
{
- BOOL bNotDocOnly = !aDocOnlyCB.IsChecked();
+ sal_Bool bNotDocOnly = !aDocOnlyCB.IsChecked();
SW_MOD()->GetModuleConfig()->SetDefaultFontInCurrDocOnly(!bNotDocOnly);
String sStandard = aStandardBox.GetText();
@@ -813,21 +813,21 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& )
{
pWrtShell->StartAllAction();
SfxPrinter* pPrinter = pWrtShell->getIDocumentDeviceAccess()->getPrinter( false );
- BOOL bMod = FALSE;
- USHORT nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
+ sal_Bool bMod = sal_False;
+ sal_uInt16 nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONT :
FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONT : RES_CHRATR_CTL_FONT);
- USHORT nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
+ sal_uInt16 nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONTSIZE :
FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE);
if(sStandard != sShellStd)
{
- BOOL bDelete = FALSE;
+ sal_Bool bDelete = sal_False;
const SfxFont* pFnt = pPrinter ? pPrinter->GetFontByName(sStandard): 0;
if(!pFnt)
{
pFnt = new SfxFont(FAMILY_DONTKNOW, sStandard);
- bDelete = TRUE;
+ bDelete = sal_True;
}
pWrtShell->SetDefault(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(),
aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich));
@@ -836,10 +836,10 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& )
if(bDelete)
{
delete (SfxFont*) pFnt;
- bDelete = FALSE;
+ bDelete = sal_False;
}
// lcl_SetColl(pWrtShell, RES_POOLCOLL_STANDARD, pPrinter, sStandard);
- bMod = TRUE;
+ bMod = sal_True;
}
if(bStandardHeightChanged)
{
@@ -847,59 +847,59 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& )
pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), 100, nFontHeightWhich ) );
SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
pColl->ResetFmtAttr(nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(sTitle != sShellTitle )
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE, pPrinter, sTitle, nFontWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(bTitleHeightChanged)
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aTitleHeightLB.GetValue()), nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(sList != sShellList && (!bListDefault || !bSetListDefault ))
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE, pPrinter, sList, nFontWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(bListHeightChanged)
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aListHeightLB.GetValue()), nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(sLabel != sShellLabel && (!bLabelDefault || !bSetLabelDefault))
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL, pPrinter, sLabel, nFontWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(bLabelHeightChanged)
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aLabelHeightLB.GetValue()), nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(sIdx != sShellIndex && (!bIdxDefault || !bSetIdxDefault))
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE, pPrinter, sIdx, nFontWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(bIndexHeightChanged)
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aIndexHeightLB.GetValue()), nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if ( bMod )
pWrtShell->SetModified();
pWrtShell->EndAllAction();
}
- return FALSE;
+ return sal_False;
}
/*-----------------03.09.96 11.53-------------------
@@ -908,11 +908,11 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& )
void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
{
const SfxPoolItem* pLang;
- USHORT nLangSlot = nFontGroup == FONT_GROUP_DEFAULT ? SID_ATTR_LANGUAGE :
+ sal_uInt16 nLangSlot = nFontGroup == FONT_GROUP_DEFAULT ? SID_ATTR_LANGUAGE :
FONT_GROUP_CJK == nFontGroup ? SID_ATTR_CHAR_CJK_LANGUAGE : SID_ATTR_CHAR_CTL_LANGUAGE;
- if( SFX_ITEM_SET == rSet.GetItemState(nLangSlot, FALSE, &pLang))
+ if( SFX_ITEM_SET == rSet.GetItemState(nLangSlot, sal_False, &pLang))
eLanguage = ((const SvxLanguageItem*)pLang)->GetValue();
String sTmp(aStdChrFL.GetText());
@@ -926,7 +926,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
aStdChrFL.SetText(sTmp);
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_PRINTER, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_PRINTER, sal_False, &pItem))
{
pPrt = (SfxPrinter*)((const SwPtrItem*)pItem)->GetValue();
}
@@ -937,14 +937,14 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
0 );
pPrt = new SfxPrinter(pPrinterSet);
- bDeletePrinter = TRUE;
+ bDeletePrinter = sal_True;
}
pFontList = new FontList( pPrt );
// #i94536# prevent duplication of font entries when 'reset' button is pressed
if( !aStandardBox.GetEntryCount() )
{
- const USHORT nCount = pPrt->GetFontCount();
- for (USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = pPrt->GetFontCount();
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
const String &rString = pPrt->GetFont(i)->GetName();
aStandardBox.InsertEntry( rString );
@@ -954,12 +954,12 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
aIdxBox .InsertEntry( rString );
}
}
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_STDFONTS, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_STDFONTS, sal_False, &pItem))
{
pFontConfig = (SwStdFontConfig*)((const SwPtrItem*)pItem)->GetValue();
}
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, sal_False, &pItem))
{
pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue();
}
@@ -997,7 +997,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
if( nIndexHeight <= 0)
nIndexHeight = pFontConfig->GetDefaultHeightFor( FONT_INDEX + nFontGroup * FONT_PER_GROUP, eLanguage);
- aDocOnlyCB.Enable(FALSE);
+ aDocOnlyCB.Enable(sal_False);
}
else
{
@@ -1006,7 +1006,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
sShellStd = sStdBackup = rFont.GetFamilyName();
- USHORT nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
+ sal_uInt16 nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONTSIZE :
FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE );
const SvxFontHeightItem& rFontHeightStandard = (const SvxFontHeightItem& )pColl->GetFmtAttr(nFontHeightWhich);
@@ -1020,37 +1020,37 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
const SvxFontHeightItem& rFontHeightTitle = (const SvxFontHeightItem&)pColl->GetFmtAttr( nFontHeightWhich, sal_True );
nTitleHeight = (sal_Int32)rFontHeightTitle.GetHeight();
- USHORT nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
+ sal_uInt16 nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONT :
FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONT : RES_CHRATR_CTL_FONT);
pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_NUMBUL_BASE);
const SvxFontItem& rFontLS = !nFontGroup ? pColl->GetFont() :
FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
- bListDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
+ bListDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False);
sShellList = sListBackup = rFontLS.GetFamilyName();
const SvxFontHeightItem& rFontHeightList = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True);
nListHeight = (sal_Int32)rFontHeightList.GetHeight();
- bListHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
+ bListHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False);
pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_LABEL);
- bLabelDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
+ bLabelDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False);
const SvxFontItem& rFontCP = !nFontGroup ? pColl->GetFont() :
FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
sShellLabel = sCapBackup = rFontCP.GetFamilyName();
const SvxFontHeightItem& rFontHeightLabel = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True);
nLabelHeight = (sal_Int32)rFontHeightLabel.GetHeight();
- bLabelHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
+ bLabelHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False);
pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_REGISTER_BASE);
- bIdxDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
+ bIdxDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False);
const SvxFontItem& rFontIDX = !nFontGroup ? pColl->GetFont() :
FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
sShellIndex = sIdxBackup = rFontIDX.GetFamilyName();
const SvxFontHeightItem& rFontHeightIndex = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True);
nIndexHeight = (sal_Int32)rFontHeightIndex.GetHeight();
- bIndexHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
+ bIndexHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False);
}
aStandardBox.SetText(sStdBackup );
aTitleBox .SetText(sOutBackup );
@@ -1144,15 +1144,15 @@ IMPL_LINK( SwStdFontTabPage, ModifyHdl, ComboBox*, pBox )
}
else if(pBox == &aListBox)
{
- bSetListDefault = FALSE;
+ bSetListDefault = sal_False;
}
else if(pBox == &aLabelBox)
{
- bSetLabelDefault = FALSE;
+ bSetLabelDefault = sal_False;
}
else if(pBox == &aIdxBox)
{
- bSetIdxDefault = FALSE;
+ bSetIdxDefault = sal_False;
}
return 0;
}
@@ -1174,15 +1174,15 @@ IMPL_LINK( SwStdFontTabPage, ModifyHeightHdl, FontSizeBox*, pBox )
}
else if(pBox == &aListHeightLB)
{
- bSetListHeightDefault = FALSE;
+ bSetListHeightDefault = sal_False;
}
else if(pBox == &aLabelHeightLB)
{
- bSetLabelHeightDefault = FALSE;
+ bSetLabelHeightDefault = sal_False;
}
else if(pBox == &aIndexHeightLB)
{
- bSetIndexHeightDefault = FALSE;
+ bSetIndexHeightDefault = sal_False;
}
return 0;
}
@@ -1267,7 +1267,7 @@ SwTableOptionsTabPage::SwTableOptionsTabPage( Window* pParent, const SfxItemSet&
aFixPropFT( this, SW_RES(FT_FIXPROP )),
aVarFT( this, SW_RES(FT_VAR )),
pWrtShell(0),
- bHTMLMode(FALSE)
+ bHTMLMode(sal_False)
{
FreeResource();
@@ -1299,22 +1299,22 @@ SfxTabPage* SwTableOptionsTabPage::Create( Window* pParent,
--------------------------------------------------*/
-BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
if(aRowMoveMF.IsModified())
- pModOpt->SetTblHMove( (USHORT)aRowMoveMF.Denormalize( aRowMoveMF.GetValue(FUNIT_TWIP)));
+ pModOpt->SetTblHMove( (sal_uInt16)aRowMoveMF.Denormalize( aRowMoveMF.GetValue(FUNIT_TWIP)));
if(aColMoveMF.IsModified())
- pModOpt->SetTblVMove( (USHORT)aColMoveMF.Denormalize( aColMoveMF.GetValue(FUNIT_TWIP)));
+ pModOpt->SetTblVMove( (sal_uInt16)aColMoveMF.Denormalize( aColMoveMF.GetValue(FUNIT_TWIP)));
if(aRowInsertMF.IsModified())
- pModOpt->SetTblHInsert((USHORT)aRowInsertMF.Denormalize( aRowInsertMF.GetValue(FUNIT_TWIP)));
+ pModOpt->SetTblHInsert((sal_uInt16)aRowInsertMF.Denormalize( aRowInsertMF.GetValue(FUNIT_TWIP)));
if(aColInsertMF.IsModified())
- pModOpt->SetTblVInsert((USHORT)aColInsertMF.Denormalize( aColInsertMF.GetValue(FUNIT_TWIP)));
+ pModOpt->SetTblVInsert((sal_uInt16)aColInsertMF.Denormalize( aColInsertMF.GetValue(FUNIT_TWIP)));
TblChgMode eMode;
if(aFixRB.IsChecked())
@@ -1331,7 +1331,7 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
if(pWrtShell && nsSelectionType::SEL_TBL & pWrtShell->GetSelectionType())
{
pWrtShell->SetTblChgMode(eMode);
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{ FN_TABLE_MODE_FIX,
FN_TABLE_MODE_FIX_PROP,
FN_TABLE_MODE_VARIABLE,
@@ -1340,7 +1340,7 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
pWrtShell->GetView().GetViewFrame()->GetBindings().Invalidate( aInva );
}
- bRet = TRUE;
+ bRet = sal_True;
}
SwInsertTableOptions aInsOpts( 0, 0 );
@@ -1368,19 +1368,19 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
if (aNumFormattingCB.GetSavedValue() != aNumFormattingCB.GetState())
{
pModOpt->SetInsTblFormatNum(bHTMLMode, aNumFormattingCB.IsChecked());
- bRet = TRUE;
+ bRet = sal_True;
}
if (aNumFmtFormattingCB.GetSavedValue() != aNumFmtFormattingCB.GetState())
{
pModOpt->SetInsTblChangeNumFormat(bHTMLMode, aNumFmtFormattingCB.IsChecked());
- bRet = TRUE;
+ bRet = sal_True;
}
if (aNumAlignmentCB.GetSavedValue() != aNumAlignmentCB.GetState())
{
pModOpt->SetInsTblAlignNum(bHTMLMode, aNumAlignmentCB.IsChecked());
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -1413,7 +1413,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet& rSet)
case TBLVAR_CHGABS: aVarRB.Check(); break;
}
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem))
{
bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
}
@@ -1462,7 +1462,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet& rSet)
}
SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode);
- USHORT nInsTblFlags = aInsOpts.mnInsMode;
+ sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode;
aHeaderCB.Check(0 != (nInsTblFlags & tabopts::HEADLINE));
aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0);
@@ -1540,17 +1540,17 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent,
const SfxPoolItem* pItem = 0;
SwShadowCursorItem aOpt;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem ))
aOpt = *(SwShadowCursorItem*)pItem;
aOnOffCB.Check( aOpt.IsOn() );
- BYTE eMode = aOpt.GetMode();
+ sal_uInt8 eMode = aOpt.GetMode();
aFillIndentRB.Check( FILL_INDENT == eMode );
aFillMarginRB.Check( FILL_MARGIN == eMode );
aFillTabRB.Check( FILL_TAB == eMode );
aFillSpaceRB.Check( FILL_SPACE == eMode );
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
aTabCB .Hide();
@@ -1595,12 +1595,12 @@ void SwShdwCrsrOptionsTabPage::PageCreated( SfxAllItemSet aSet )
}
-BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
{
SwShadowCursorItem aOpt;
aOpt.SetOn( aOnOffCB.IsChecked() );
- BYTE eMode;
+ sal_uInt8 eMode;
if( aFillIndentRB.IsChecked() )
eMode= FILL_INDENT;
else if( aFillMarginRB.IsChecked() )
@@ -1611,13 +1611,13 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
eMode = FILL_SPACE;
aOpt.SetMode( eMode );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET != rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )
+ if( SFX_ITEM_SET != rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem )
|| ((SwShadowCursorItem&)*pItem) != aOpt )
{
rSet.Put( aOpt );
- bRet = TRUE;
+ bRet = sal_True;
}
m_pWrtShell->GetDoc()->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT,
@@ -1627,7 +1627,7 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
if( aCrsrInProtCB.IsChecked() != aCrsrInProtCB.GetSavedValue())
{
rSet.Put(SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, aCrsrInProtCB.IsChecked()));
- bRet |= TRUE;
+ bRet |= sal_True;
}
const SwDocDisplayItem* pOldAttr = (const SwDocDisplayItem*)
@@ -1659,11 +1659,11 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet )
const SfxPoolItem* pItem = 0;
SwShadowCursorItem aOpt;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem ))
aOpt = *(SwShadowCursorItem*)pItem;
aOnOffCB.Check( aOpt.IsOn() );
- BYTE eMode = aOpt.GetMode();
+ sal_uInt8 eMode = aOpt.GetMode();
aFillIndentRB.Check( FILL_INDENT == eMode );
aFillMarginRB.Check( FILL_MARGIN == eMode );
aFillTabRB.Check( FILL_TAB == eMode );
@@ -1672,13 +1672,13 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet )
m_aMathBaselineAlignmentCB.Check( m_pWrtShell->GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) );
m_aMathBaselineAlignmentCB.SaveValue();
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, sal_False, &pItem ))
aCrsrInProtCB.Check(((const SfxBoolItem*)pItem)->GetValue());
aCrsrInProtCB.SaveValue();
const SwDocDisplayItem* pDocDisplayAttr = 0;
- rSet.GetItemState( FN_PARAM_DOCDISP, FALSE,
+ rSet.GetItemState( FN_PARAM_DOCDISP, sal_False,
(const SfxPoolItem**)&pDocDisplayAttr );
if(pDocDisplayAttr)
{
@@ -1700,8 +1700,8 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet )
struct CharAttr
{
- USHORT nItemId;
- USHORT nAttr;
+ sal_uInt16 nItemId;
+ sal_uInt16 nAttr;
};
// Editieren entspricht Einfuegen-Attributen
@@ -1721,15 +1721,15 @@ static CharAttr __FAR_DATA aRedlineAttr[] =
};
// Items from aRedlineAttr relevant for InsertAttr: strikethrough is
// not used
-static USHORT aInsertAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
+static sal_uInt16 aInsertAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
// Items from aRedlineAttr relevant for DeleteAttr: underline and
// double underline is not used
-static USHORT aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 };
+static sal_uInt16 aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 };
// Items from aRedlineAttr relevant for ChangeAttr: strikethrough is
// not used
-static USHORT aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
+static sal_uInt16 aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
/*-----------------------------------------------------------------------
Beschreibung: Markierungsvorschau
@@ -1751,18 +1751,18 @@ SwMarkPreview::SwMarkPreview( Window *pParent, const ResId& rResID ) :
// Seite
aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3));
- ULONG nOutWPix = aPage.GetWidth();
- ULONG nOutHPix = aPage.GetHeight();
+ sal_uLong nOutWPix = aPage.GetWidth();
+ sal_uLong nOutHPix = aPage.GetHeight();
// PrintArea
- ULONG nLBorder = 8;
- ULONG nRBorder = 8;
- ULONG nTBorder = 4;
- ULONG nBBorder = 4;
+ sal_uLong nLBorder = 8;
+ sal_uLong nRBorder = 8;
+ sal_uLong nTBorder = 4;
+ sal_uLong nBBorder = 4;
aLeftPagePrtArea = Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder));
- USHORT nWidth = (USHORT)aLeftPagePrtArea.GetWidth();
- USHORT nKorr = (nWidth & 1) != 0 ? 0 : 1;
+ sal_uInt16 nWidth = (sal_uInt16)aLeftPagePrtArea.GetWidth();
+ sal_uInt16 nKorr = (nWidth & 1) != 0 ? 0 : 1;
aLeftPagePrtArea.SetSize(Size(nWidth / 2 - (nLBorder + nRBorder) / 2 + nKorr, aLeftPagePrtArea.GetHeight()));
aRightPagePrtArea = aLeftPagePrtArea;
@@ -1780,7 +1780,7 @@ void SwMarkPreview::InitColors( void )
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
m_aBgCol = Color( rSettings.GetWindowColor() );
- BOOL bHC = rSettings.GetHighContrastMode();
+ sal_Bool bHC = rSettings.GetHighContrastMode();
m_aLineCol = bHC? SwViewOption::GetFontColor() : Color( COL_BLACK );
m_aShadowCol = bHC? m_aBgCol : rSettings.GetShadowColor();
m_aTxtCol = bHC? SwViewOption::GetFontColor() : Color( COL_GRAY );
@@ -1849,9 +1849,9 @@ void SwMarkPreview::PaintPage(const Rectangle &rRect)
DrawRect(rRect, m_aTransCol, m_aPrintAreaCol );
// Testabsatz zeichnen
- ULONG nLTxtBorder = 4;
- ULONG nRTxtBorder = 4;
- ULONG nTTxtBorder = 4;
+ sal_uLong nLTxtBorder = 4;
+ sal_uLong nRTxtBorder = 4;
+ sal_uLong nTTxtBorder = 4;
Rectangle aTextLine = rRect;
aTextLine.SetSize(Size(aTextLine.GetWidth(), 2));
@@ -1860,14 +1860,14 @@ void SwMarkPreview::PaintPage(const Rectangle &rRect)
aTextLine.Move(0, nTTxtBorder);
sal_Int32 nStep;
- USHORT nLines;
+ sal_uInt16 nLines;
nStep = aTextLine.GetHeight() + 2;
- nLines = (USHORT)(rRect.GetHeight() / (aTextLine.GetHeight() + 2)) - 1;
+ nLines = (sal_uInt16)(rRect.GetHeight() / (aTextLine.GetHeight() + 2)) - 1;
// Text simulieren
//
- for (USHORT i = 0; i < nLines; ++i)
+ for (sal_uInt16 i = 0; i < nLines; ++i)
{
if (i == (nLines - 1))
aTextLine.SetSize(Size(aTextLine.GetWidth() / 2, aTextLine.GetHeight()));
@@ -1891,9 +1891,9 @@ namespace
{
void lcl_FillRedlineAttrListBox(
ListBox& rLB, const AuthorCharAttr& rAttrToSelect,
- const USHORT* pAttrMap, const USHORT nAttrMapSize)
+ const sal_uInt16* pAttrMap, const sal_uInt16 nAttrMapSize)
{
- for (USHORT i = 0; i != nAttrMapSize; ++i)
+ for (sal_uInt16 i = 0; i != nAttrMapSize; ++i)
{
CharAttr& rAttr(aRedlineAttr[pAttrMap[i]]);
rLB.SetEntryData(i, &rAttr);
@@ -1945,7 +1945,7 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent,
{
FreeResource();
- for(USHORT i = 0; i < aInsertLB.GetEntryCount(); i++)
+ for(sal_uInt16 i = 0; i < aInsertLB.GetEntryCount(); i++)
{
String sEntry(aInsertLB.GetEntry(i));
aDeletedLB.InsertEntry(sEntry);
@@ -1983,7 +1983,7 @@ SfxTabPage* SwRedlineOptionsTabPage::Create( Window* pParent, const SfxItemSet&
return new SwRedlineOptionsTabPage( pParent, rSet );
}
-BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& )
{
CharAttr *pAttr;
SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig();
@@ -1997,9 +1997,9 @@ BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& )
AuthorCharAttr aOldChangedAttr(pOpt->GetFormatAuthorAttr());
ColorData nOldMarkColor = pOpt->GetMarkAlignColor().GetColor();
- USHORT nOldMarkMode = pOpt->GetMarkAlignMode();
+ sal_uInt16 nOldMarkMode = pOpt->GetMarkAlignMode();
- USHORT nPos = aInsertLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aInsertLB.GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
pAttr = (CharAttr *)aInsertLB.GetEntryData(nPos);
@@ -2107,7 +2107,7 @@ BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& )
}
}
- return FALSE;
+ return sal_False;
}
void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
@@ -2125,10 +2125,10 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
// Farblistboxen initialisieren
String sColor;
- aInsertColorLB.SetUpdateMode(FALSE);
- aDeletedColorLB.SetUpdateMode(FALSE);
- aChangedColorLB.SetUpdateMode(FALSE);
- aMarkColorLB.SetUpdateMode(FALSE);
+ aInsertColorLB.SetUpdateMode(sal_False);
+ aDeletedColorLB.SetUpdateMode(sal_False);
+ aChangedColorLB.SetUpdateMode(sal_False);
+ aMarkColorLB.SetUpdateMode(sal_False);
aInsertColorLB.InsertEntry(sNone);
aDeletedColorLB.InsertEntry(sNone);
@@ -2139,7 +2139,7 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
aChangedColorLB.InsertEntry(sAuthor);
XColorTable* pColorTbl = XColorTable::GetStdColorTable();
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < pColorTbl->Count(); ++i )
{
XColorEntry* pEntry = pColorTbl->GetColor( i );
@@ -2151,10 +2151,10 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
aChangedColorLB.InsertEntry( aColor, sName );
aMarkColorLB.InsertEntry( aColor, sName );
}
- aInsertColorLB.SetUpdateMode( TRUE );
- aDeletedColorLB.SetUpdateMode( TRUE );
- aChangedColorLB.SetUpdateMode( TRUE );
- aMarkColorLB.SetUpdateMode( TRUE );
+ aInsertColorLB.SetUpdateMode( sal_True );
+ aDeletedColorLB.SetUpdateMode( sal_True );
+ aChangedColorLB.SetUpdateMode( sal_True );
+ aMarkColorLB.SetUpdateMode( sal_True );
ColorData nColor = rInsertAttr.nColor;
@@ -2205,13 +2205,13 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
aChangedLB.SelectEntryPos(0);
lcl_FillRedlineAttrListBox(aInsertLB, rInsertAttr, aInsertAttrMap,
- sizeof(aInsertAttrMap) / sizeof(USHORT));
+ sizeof(aInsertAttrMap) / sizeof(sal_uInt16));
lcl_FillRedlineAttrListBox(aDeletedLB, rDeletedAttr, aDeletedAttrMap,
- sizeof(aDeletedAttrMap) / sizeof(USHORT));
+ sizeof(aDeletedAttrMap) / sizeof(sal_uInt16));
lcl_FillRedlineAttrListBox(aChangedLB, rChangedAttr, aChangedAttrMap,
- sizeof(aChangedAttrMap) / sizeof(USHORT));
+ sizeof(aChangedAttrMap) / sizeof(sal_uInt16));
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
switch (pOpt->GetMarkAlignMode())
{
case text::HoriOrientation::NONE: nPos = 0; break;
@@ -2268,7 +2268,7 @@ IMPL_LINK( SwRedlineOptionsTabPage, AttribHdl, ListBox *, pLB )
rFont.SetCaseMap(SVX_CASEMAP_NOT_MAPPED);
rCJKFont.SetCaseMap(SVX_CASEMAP_NOT_MAPPED);
- USHORT nPos = pColorLB->GetSelectEntryPos();
+ sal_uInt16 nPos = pColorLB->GetSelectEntryPos();
switch( nPos )
{
@@ -2363,7 +2363,7 @@ IMPL_LINK( SwRedlineOptionsTabPage, ColorHdl, ColorListBox *, pColorLB )
SvxFont& rFont = pPrev->GetFont();
SvxFont& rCJKFont = pPrev->GetCJKFont();
- USHORT nPos = pLB->GetSelectEntryPos();
+ sal_uInt16 nPos = pLB->GetSelectEntryPos();
if( nPos == LISTBOX_ENTRY_NOTFOUND )
nPos = 0;
@@ -2490,7 +2490,7 @@ SwTestTabPage::SwTestTabPage( Window* pParent,
aTest8CBox ( this, 0 ),
aTest9CBox ( this, 0 ),
aTest10CBox ( this, 0 ),
- bAttrModified( FALSE )
+ bAttrModified( sal_False )
{
lcl_SetPosSize(*this, Point(0,0), Size(260 , 135));
lcl_SetPosSize(aTestFL, Point(6,2), Size(209,8));
@@ -2543,7 +2543,7 @@ SfxTabPage* SwTestTabPage::Create( Window* pParent,
//------------------------------------------------------------------------
-BOOL SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet )
{
if ( bAttrModified )
@@ -2571,7 +2571,7 @@ void SwTestTabPage::Reset( const SfxItemSet& )
const SfxItemSet& rSet = GetItemSet();
const SwTestItem* pTestAttr = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SWTEST , FALSE,
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SWTEST , sal_False,
(const SfxPoolItem**)&pTestAttr ))
{
aTest1CBox.Check(pTestAttr->bTest1);
@@ -2609,7 +2609,7 @@ void SwTestTabPage::Init()
IMPL_LINK_INLINE_START( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
{
- bAttrModified = TRUE;
+ bAttrModified = sal_True;
return 0;
}
IMPL_LINK_INLINE_END( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx
index d81c743604db..cc6f0a4368c0 100644
--- a/sw/source/ui/config/prtopt.cxx
+++ b/sw/source/ui/config/prtopt.cxx
@@ -158,7 +158,7 @@ void SwPrintOptions::Commit()
Any* pValues = aValues.getArray();
const Type& rType = ::getBooleanCppuType();
- BOOL bVal;
+ sal_Bool bVal;
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
switch(nProp)
diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx
index 40d56b3b6507..640471e441f1 100644
--- a/sw/source/ui/config/uinums.cxx
+++ b/sw/source/ui/config/uinums.cxx
@@ -56,11 +56,11 @@
using namespace ::com::sun::star;
-#define VERSION_30B ((USHORT)250)
-#define VERSION_31B ((USHORT)326)
-#define VERSION_40A ((USHORT)364)
-#define VERSION_50A ((USHORT)373)
-#define VERSION_53A ((USHORT)596)
+#define VERSION_30B ((sal_uInt16)250)
+#define VERSION_31B ((sal_uInt16)326)
+#define VERSION_40A ((sal_uInt16)364)
+#define VERSION_50A ((sal_uInt16)373)
+#define VERSION_53A ((sal_uInt16)596)
#define ACT_NUM_VERSION VERSION_53A
#define NUMRULE_FILENAME "numrule.cfg"
@@ -87,7 +87,7 @@ SwBaseNumRules::SwBaseNumRules( const String& rFileName )
:
sFileName( rFileName ),
nVersion(0),
- bModified( FALSE )
+ bModified( sal_False )
{
Init();
}
@@ -106,11 +106,11 @@ SwBaseNumRules::~SwBaseNumRules()
INetURLObject aTempObj(sNm);
sNm = aTempObj.GetFull();
SfxMedium aStrm( sNm, STREAM_WRITE | STREAM_TRUNC |
- STREAM_SHARE_DENYALL, TRUE );
+ STREAM_SHARE_DENYALL, sal_True );
Store( *aStrm.GetOutStream() );
}
- for( USHORT i = 0; i < nMaxRules; ++i )
+ for( sal_uInt16 i = 0; i < nMaxRules; ++i )
delete pNumRules[i];
}
@@ -119,14 +119,14 @@ SwBaseNumRules::~SwBaseNumRules()
------------------------------------------------------------------------*/
void SwBaseNumRules::Init()
{
- for(USHORT i = 0; i < nMaxRules; ++i )
+ for(sal_uInt16 i = 0; i < nMaxRules; ++i )
pNumRules[i] = 0;
String sNm( sFileName );
SvtPathOptions aOpt;
if( aOpt.SearchFile( sNm, SvtPathOptions::PATH_USERCONFIG ))
{
- SfxMedium aStrm( sNm, STREAM_STD_READ, TRUE );
+ SfxMedium aStrm( sNm, STREAM_STD_READ, sal_True );
Load( *aStrm.GetInStream() );
}
}
@@ -135,7 +135,7 @@ void SwBaseNumRules::Init()
--------------------------------------------------*/
-void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx)
+void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx)
{
ASSERT(nIdx < nMaxRules, Array der NumRules ueberindiziert.);
if( !pNumRules[nIdx] )
@@ -149,22 +149,22 @@ void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx)
Beschreibung: Speichern
------------------------------------------------------------------------*/
-BOOL /**/ SwBaseNumRules::Store(SvStream &rStream)
+sal_Bool /**/ SwBaseNumRules::Store(SvStream &rStream)
{
rStream << ACT_NUM_VERSION;
// Schreiben, welche Positionen durch eine Regel belegt sind
// Anschliessend Schreiben der einzelnen Rules
- for(USHORT i = 0; i < nMaxRules; ++i)
+ for(sal_uInt16 i = 0; i < nMaxRules; ++i)
{
if(pNumRules[i])
{
- rStream << (unsigned char) TRUE;
+ rStream << (unsigned char) sal_True;
pNumRules[i]->Store( rStream );
}
else
- rStream << (unsigned char) FALSE;
+ rStream << (unsigned char) sal_False;
}
- return TRUE;
+ return sal_True;
}
@@ -189,8 +189,8 @@ int SwBaseNumRules::Load(SvStream &rStream)
else if( VERSION_30B == nVersion || VERSION_31B == nVersion ||
ACT_NUM_VERSION >= nVersion )
{
- unsigned char bRule = FALSE;
- for(USHORT i = 0; i < nMaxRules; ++i)
+ unsigned char bRule = sal_False;
+ for(sal_uInt16 i = 0; i < nMaxRules; ++i)
{
rStream >> bRule;
if(bRule)
@@ -226,9 +226,9 @@ SwChapterNumRules::SwChapterNumRules() :
/*-----------------26.06.97 08.23-------------------
--------------------------------------------------*/
-void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx)
+void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx)
{
- bModified = TRUE;
+ bModified = sal_True;
SwBaseNumRules::ApplyNumRules(rCopy, nIdx);
}
@@ -238,7 +238,7 @@ SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy,
const String &rName )
: aName(rName)
{
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
const SwNumFmt* pFmt = rCopy.GetNumFmt( n );
if( pFmt )
@@ -292,13 +292,13 @@ const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName
/*------------------------------------------------------------------------
Beschreibung:
------------------------------------------------------------------------*/
-SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, USHORT nVersion )
+SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, sal_uInt16 nVersion )
{
CharSet eEncoding = gsl_getSystemTextEncoding();
rStream.ReadByteString(aName, eEncoding);
char c;
- for(USHORT n = 0; n < MAXLEVEL; ++n )
+ for(sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
if( VERSION_30B == nVersion )
c = 1;
@@ -327,9 +327,9 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const
// --> OD 2008-06-06 #i89178#
rChg = SwNumRule( aName, numfunc::GetDefaultPositionAndSpaceMode() );
// <--
- rChg.SetAutoRule( FALSE );
+ rChg.SetAutoRule( sal_False );
_SwNumFmtGlobal* pFmt;
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
if( 0 != ( pFmt = aFmts[ n ] ) )
{
SwNumFmt aNew;
@@ -346,7 +346,7 @@ void SwNumRulesWithName::Store( SvStream &rStream )
CharSet eEncoding = gsl_getSystemTextEncoding();
rStream.WriteByteString(aName, eEncoding);
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
_SwNumFmtGlobal* pFmt = aFmts[ n ];
if( pFmt )
@@ -377,7 +377,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const SwNumFmt& rFmt )
{
SfxItemIter aIter( pFmt->GetAttrSet() );
const SfxPoolItem *pCurr = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
aItems.Insert( pCurr->Clone(), aItems.Count() );
if( aIter.IsAtEnd() )
@@ -400,7 +400,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const _SwNumFmtGlobal& rFm
sCharFmtName( rFmt.sCharFmtName ),
nCharPoolId( rFmt.nCharPoolId )
{
- for( USHORT n = rFmt.aItems.Count(); n; )
+ for( sal_uInt16 n = rFmt.aItems.Count(); n; )
aItems.Insert( rFmt.aItems[ --n ]->Clone(), aItems.Count() );
}
@@ -409,15 +409,15 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const _SwNumFmtGlobal& rFm
------------------------------------------------------------------------*/
SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
- USHORT nVersion )
+ sal_uInt16 nVersion )
: nCharPoolId( USHRT_MAX )
{
CharSet eEncoding = gsl_getSystemTextEncoding();
{
- USHORT nUS;
+ sal_uInt16 nUS;
sal_Char cChar;
short nShort;
- BOOL bFlag;
+ sal_Bool bFlag;
String sStr;
rStream >> nUS; aFmt.SetNumberingType((sal_Int16)nUS );
@@ -435,7 +435,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
if( VERSION_30B == nVersion )
{
long nL;
- rStream >> cChar; aFmt.SetStart( (USHORT)cChar );
+ rStream >> cChar; aFmt.SetStart( (sal_uInt16)cChar );
rStream.ReadByteString(sStr, eEncoding);
aFmt.SetPrefix( sStr );
@@ -460,11 +460,11 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
rStream >> bFlag;
}
- USHORT nFamily;
- USHORT nCharSet;
+ sal_uInt16 nFamily;
+ sal_uInt16 nCharSet;
short nWidth;
short nHeight;
- USHORT nPitch;
+ sal_uInt16 nPitch;
String aName;
rStream.ReadByteString(aName, eEncoding);
@@ -489,14 +489,14 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
if( VERSION_30B != nVersion )
{
- USHORT nItemCount;
+ sal_uInt16 nItemCount;
rStream >> nCharPoolId;
rStream.ReadByteString(sCharFmtName, eEncoding);
rStream >> nItemCount;
while( nItemCount-- )
{
- USHORT nWhich, nVers;
+ sal_uInt16 nWhich, nVers;
rStream >> nWhich >> nVers;
aItems.Insert( GetDfltAttr( nWhich )->Create( rStream, nVers ),
aItems.Count() );
@@ -505,7 +505,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
if( VERSION_40A == nVersion && SVX_NUM_BITMAP == aFmt.GetNumberingType() )
{
- BYTE cF;
+ sal_uInt8 cF;
Size aSz;
rStream >> aSz.Width() >> aSz.Height();
@@ -515,7 +515,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
{
SvxBrushItem* pBrush = 0;
SwFmtVertOrient* pVOrient = 0;
- USHORT nVer;
+ sal_uInt16 nVer;
if( cF & 1 )
{
@@ -556,32 +556,32 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
CharSet eEncoding = gsl_getSystemTextEncoding();
{
String aName;
- USHORT nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0;
+ sal_uInt16 nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0;
short nWidth = 0, nHeight = 0;
const Font* pFnt = aFmt.GetBulletFont();
if( pFnt )
{
aName = pFnt->GetName();
- nFamily = (USHORT)pFnt->GetFamily();
- nCharSet = (USHORT)pFnt->GetCharSet();
+ nFamily = (sal_uInt16)pFnt->GetFamily();
+ nCharSet = (sal_uInt16)pFnt->GetCharSet();
nWidth = (short)pFnt->GetSize().Width();
nHeight = (short)pFnt->GetSize().Height();
- nPitch = (USHORT)pFnt->GetPitch();
+ nPitch = (sal_uInt16)pFnt->GetPitch();
}
- rStream << USHORT(aFmt.GetNumberingType())
+ rStream << sal_uInt16(aFmt.GetNumberingType())
<< aFmt.GetBulletChar()
<< (aFmt.GetIncludeUpperLevels() > 0)
<< aFmt.GetStart();
rStream.WriteByteString( aFmt.GetPrefix(), eEncoding );
rStream.WriteByteString( aFmt.GetSuffix(), eEncoding );
- rStream << USHORT( aFmt.GetNumAdjust() )
+ rStream << sal_uInt16( aFmt.GetNumAdjust() )
<< aFmt.GetAbsLSpace()
<< aFmt.GetFirstLineOffset()
<< aFmt.GetCharTextDistance()
<< aFmt.GetLSpace()
- << FALSE;//aFmt.IsRelLSpace();
+ << sal_False;//aFmt.IsRelLSpace();
rStream.WriteByteString( aName, eEncoding );
rStream << nFamily
<< nCharSet
@@ -593,10 +593,10 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
rStream.WriteByteString( sCharFmtName, eEncoding );
rStream << aItems.Count();
- for( USHORT n = aItems.Count(); n; )
+ for( sal_uInt16 n = aItems.Count(); n; )
{
SfxPoolItem* pItem = aItems[ --n ];
- USHORT nIVers = pItem->GetVersion( SOFFICE_FILEFORMAT_50 );
+ sal_uInt16 nIVers = pItem->GetVersion( SOFFICE_FILEFORMAT_50 );
ASSERT( nIVers != USHRT_MAX,
"Was'n das: Item-Version USHRT_MAX in der aktuellen Version" );
rStream << pItem->Which()
@@ -608,21 +608,21 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
if( SVX_NUM_BITMAP == aFmt.GetNumberingType() )
{
- rStream << (INT32)aFmt.GetGraphicSize().Width()
- << (INT32)aFmt.GetGraphicSize().Height();
- BYTE cFlg = ( 0 != aFmt.GetBrush() ? 1 : 0 ) +
+ rStream << (sal_Int32)aFmt.GetGraphicSize().Width()
+ << (sal_Int32)aFmt.GetGraphicSize().Height();
+ sal_uInt8 cFlg = ( 0 != aFmt.GetBrush() ? 1 : 0 ) +
( 0 != aFmt.GetGraphicOrientation() ? 2 : 0 );
rStream << cFlg;
if( aFmt.GetBrush() )
{
- USHORT nVersion = aFmt.GetBrush()->GetVersion( SOFFICE_FILEFORMAT_50 );
+ sal_uInt16 nVersion = aFmt.GetBrush()->GetVersion( SOFFICE_FILEFORMAT_50 );
rStream << nVersion;
aFmt.GetBrush()->Store( rStream, nVersion );
}
if( aFmt.GetGraphicOrientation() )
{
- USHORT nVersion = aFmt.GetGraphicOrientation()->GetVersion( SOFFICE_FILEFORMAT_50 );
+ sal_uInt16 nVersion = aFmt.GetGraphicOrientation()->GetVersion( SOFFICE_FILEFORMAT_50 );
rStream << nVersion;
aFmt.GetGraphicOrientation()->Store( rStream, nVersion );
}
@@ -640,8 +640,8 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh,
if( sCharFmtName.Len() )
{
// suche erstmal ueber den Namen
- USHORT nArrLen = rSh.GetCharFmtCount();
- for( USHORT i = 1; i < nArrLen; ++i )
+ sal_uInt16 nArrLen = rSh.GetCharFmtCount();
+ for( sal_uInt16 i = 1; i < nArrLen; ++i )
{
pFmt = &rSh.GetCharFmt( i );
if( COMPARE_EQUAL == pFmt->GetName().CompareTo( sCharFmtName ))
@@ -655,13 +655,13 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh,
if( IsPoolUserFmt( nCharPoolId ) )
{
pFmt = rSh.MakeCharFmt( sCharFmtName );
- pFmt->SetAuto( FALSE );
+ pFmt->SetAuto( sal_False );
}
else
pFmt = rSh.GetCharFmtFromPool( nCharPoolId );
if( !pFmt->GetDepends() ) // Attribute setzen
- for( USHORT n = aItems.Count(); n; )
+ for( sal_uInt16 n = aItems.Count(); n; )
pFmt->SetFmtAttr( *aItems[ --n ] );
}
}
diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx
index 8d79abfb6244..c8b6bd7d3ab1 100644
--- a/sw/source/ui/config/usrpref.cxx
+++ b/sw/source/ui/config/usrpref.cxx
@@ -56,7 +56,7 @@ void SwMasterUsrPref::SetUsrPref(const SwViewOption &rCopy)
*((SwViewOption*)this) = rCopy;
}
-SwMasterUsrPref::SwMasterUsrPref(BOOL bWeb) :
+SwMasterUsrPref::SwMasterUsrPref(sal_Bool bWeb) :
eFldUpdateFlags(AUTOUPD_OFF),
nLinkUpdateMode(0),
bIsHScrollMetricSet(sal_False),
@@ -129,7 +129,7 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames()
/*-- 28.09.00 09:55:33---------------------------------------------------
-----------------------------------------------------------------------*/
-SwContentViewConfig::SwContentViewConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) :
+SwContentViewConfig::SwContentViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) :
ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Content") : C2U("Office.Writer/Content")),
rParent(rPar),
bWeb(bIsWeb)
@@ -162,7 +162,7 @@ void SwContentViewConfig::Commit()
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
- sal_Bool bVal = FALSE;
+ sal_Bool bVal = sal_False;
switch(nProp)
{
case 0: bVal = rParent.IsGraphic(); break;// "Display/GraphicObject",
@@ -228,11 +228,11 @@ void SwContentViewConfig::Load()
{
sal_Int32 nSet = 0;
pValues[nProp] >>= nSet;
- rParent.SetUpdateLinkMode(nSet, TRUE);
+ rParent.SetUpdateLinkMode(nSet, sal_True);
}
break;// "Update/Link",
- case 17: rParent.SetUpdateFields(bSet, TRUE); break;// "Update/Field",
- case 18: rParent.SetUpdateCharts(bSet, TRUE); break;// "Update/Chart"
+ case 17: rParent.SetUpdateFields(bSet, sal_True); break;// "Update/Field",
+ case 18: rParent.SetUpdateCharts(bSet, sal_True); break;// "Update/Chart"
}
}
}
@@ -279,7 +279,7 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames()
/*-- 28.09.00 09:55:34---------------------------------------------------
-----------------------------------------------------------------------*/
-SwLayoutViewConfig::SwLayoutViewConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) :
+SwLayoutViewConfig::SwLayoutViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) :
ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Layout") : C2U("Office.Writer/Layout"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
rParent(rPar),
@@ -313,10 +313,10 @@ void SwLayoutViewConfig::Commit()
case 3: rVal <<= (sal_Bool) rParent.IsViewHScrollBar(); break; // "Window/HorizontalScroll",
case 4: rVal <<= (sal_Bool) rParent.IsViewVScrollBar(); break; // "Window/VerticalScroll",
case 5: rVal <<= (sal_Bool) rParent.IsViewAnyRuler(); break; // "Window/ShowRulers"
- // #i14593# use IsView*Ruler(TRUE) instead of IsView*Ruler()
+ // #i14593# use IsView*Ruler(sal_True) instead of IsView*Ruler()
// this preserves the single ruler states even if "Window/ShowRulers" is off
- case 6: rVal <<= (sal_Bool) rParent.IsViewHRuler(TRUE); break; // "Window/HorizontalRuler",
- case 7: rVal <<= (sal_Bool) rParent.IsViewVRuler(TRUE); break; // "Window/VerticalRuler",
+ case 6: rVal <<= (sal_Bool) rParent.IsViewHRuler(sal_True); break; // "Window/HorizontalRuler",
+ case 7: rVal <<= (sal_Bool) rParent.IsViewVRuler(sal_True); break; // "Window/VerticalRuler",
case 8:
if(rParent.bIsHScrollMetricSet)
rVal <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit"
@@ -382,15 +382,15 @@ void SwLayoutViewConfig::Load()
}
break;
case 10: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll",
- case 11: rParent.SetZoom( static_cast< USHORT >(nInt32Val) ); break;// "Zoom/Value",
+ case 11: rParent.SetZoom( static_cast< sal_uInt16 >(nInt32Val) ); break;// "Zoom/Value",
case 12: rParent.SetZoomType( static_cast< SvxZoomType >(nInt32Val) ); break;// "Zoom/Type",
case 13: rParent.SetAlignMathObjectsToBaseline(bSet); break;// "Other/IsAlignMathObjectsToBaseline"
- case 14: rParent.SetMetric((FieldUnit)nInt32Val, TRUE); break;// "Other/MeasureUnit",
- case 15: rParent.SetDefTab(MM100_TO_TWIP(nInt32Val), TRUE); break;// "Other/TabStop",
+ case 14: rParent.SetMetric((FieldUnit)nInt32Val, sal_True); break;// "Other/MeasureUnit",
+ case 15: rParent.SetDefTab(MM100_TO_TWIP(nInt32Val), sal_True); break;// "Other/TabStop",
case 16: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight",
- case 17: rParent.SetViewLayoutColumns( static_cast<USHORT>(nInt32Val) ); break;// "ViewLayout/Columns",
+ case 17: rParent.SetViewLayoutColumns( static_cast<sal_uInt16>(nInt32Val) ); break;// "ViewLayout/Columns",
case 18: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode",
- case 19: rParent.SetDefaultPageMode(bSet,TRUE); break;// "Other/IsSquaredPageMode",
+ case 19: rParent.SetDefaultPageMode(bSet,sal_True); break;// "Other/IsSquaredPageMode",
}
}
}
@@ -426,7 +426,7 @@ Sequence<OUString> SwGridConfig::GetPropertyNames()
/* -----------------------------19.01.01 13:07--------------------------------
---------------------------------------------------------------------------*/
-SwGridConfig::SwGridConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) :
+SwGridConfig::SwGridConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) :
ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Grid") : C2U("Office.Writer/Grid"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
rParent(rPar),
@@ -587,7 +587,7 @@ void SwCursorConfig::Load()
switch(nProp)
{
case 0: rParent.SetShadowCursor(bSet); break;// "DirectCursor/UseDirectCursor",
- case 1: rParent.SetShdwCrsrFillMode((BYTE)nSet); break;// "DirectCursor/Insert",
+ case 1: rParent.SetShdwCrsrFillMode((sal_uInt8)nSet); break;// "DirectCursor/Insert",
case 2: rParent.SetCursorInProtectedArea(bSet); break;// "Option/ProtectedArea"
}
}
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index 13cec2b93bb5..7a2304f1a4f7 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -60,7 +60,7 @@
#include <editeng/acorrcfg.hxx>
#ifdef DBG_UTIL
-BOOL SwViewOption::bTest9 = FALSE; //DrawingLayerNotLoading
+sal_Bool SwViewOption::bTest9 = sal_False; //DrawingLayerNotLoading
#endif
Color SwViewOption::aDocBoundColor(COL_LIGHTGRAY);
Color SwViewOption::aObjectBoundColor(COL_LIGHTGRAY);
@@ -81,7 +81,7 @@ Color SwViewOption::aPageBreakColor(COL_BLUE);
Color SwViewOption::aScriptIndicatorColor(COL_GREEN);
sal_Int32 SwViewOption::nAppearanceFlags = VIEWOPT_DOC_BOUNDARIES|VIEWOPT_OBJECT_BOUNDARIES;
-USHORT SwViewOption::nPixelTwips = 0; //ein Pixel auf dem Bildschirm
+sal_uInt16 SwViewOption::nPixelTwips = 0; //ein Pixel auf dem Bildschirm
#define LINEBREAK_SIZE 12, 8
@@ -98,7 +98,7 @@ static const char __FAR_DATA aPostItStr[] = " ";
* SwViewOption::IsEqualFlags()
*************************************************************************/
-BOOL SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
+sal_Bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
{
return nCoreOptions == rOpt.nCoreOptions
&& nCore2Options == rOpt.nCore2Options
@@ -167,10 +167,10 @@ void SwViewOption::DrawRectPrinter( OutputDevice *pOut,
* SwViewOption::GetPostItsWidth()
*************************************************************************/
-USHORT SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const
+sal_uInt16 SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const
{
ASSERT( pOut, "no Outdev" );
- return USHORT(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr )));
+ return sal_uInt16(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr )));
}
/*************************************************************************
@@ -184,7 +184,7 @@ void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, sal_Bo
Color aOldLineColor( pOut->GetLineColor() );
pOut->SetLineColor( Color(COL_GRAY ) );
// Wir ziehen ueberall zwei Pixel ab, damit es schick aussieht
- USHORT nPix = GetPixelTwips() * 2;
+ sal_uInt16 nPix = GetPixelTwips() * 2;
if( rRect.Width() <= 2 * nPix || rRect.Height() <= 2 * nPix )
nPix = 0;
const Point aTopLeft( rRect.Left() + nPix, rRect.Top() + nPix );
@@ -210,15 +210,15 @@ SwViewOption::SwViewOption() :
nPagePrevRow( 1 ),
nPagePrevCol( 2 ),
nShdwCrsrFillMode( FILL_TAB ),
- bReadonly(FALSE),
- bStarOneSetting(FALSE),
- bIsPagePreview(FALSE),
- bSelectionInReadonly(FALSE),
+ bReadonly(sal_False),
+ bStarOneSetting(sal_False),
+ bIsPagePreview(sal_False),
+ bSelectionInReadonly(sal_False),
// --> FME 2004-06-29 #114856# Formular view
- bFormView(FALSE),
+ bFormView(sal_False),
// <--
- bBookview(FALSE),
- mbViewLayoutBookMode(FALSE),
+ bBookview(sal_False),
+ mbViewLayoutBookMode(sal_False),
bShowPlaceHolderFields( sal_True ),
nZoom( 100 ),
@@ -249,14 +249,14 @@ SwViewOption::SwViewOption() :
#ifdef DBG_UTIL
// korrespondieren zu den Angaben in ui/config/cfgvw.src
bTest1 = bTest2 = bTest3 = bTest4 =
- bTest5 = bTest6 = bTest7 = bTest8 = bTest10 = FALSE;
+ bTest5 = bTest6 = bTest7 = bTest8 = bTest10 = sal_False;
#endif
}
SwViewOption::SwViewOption(const SwViewOption& rVOpt)
{
- bReadonly = FALSE;
- bSelectionInReadonly = FALSE;
+ bReadonly = sal_False;
+ bSelectionInReadonly = sal_False;
// --> FME 2004-06-29 #114856# Formular view
bFormView = rVOpt.bFormView;
// <--
@@ -354,11 +354,11 @@ void SwViewOption::Init( Window *pWin )
{
if( !nPixelTwips && pWin )
{
- nPixelTwips = (USHORT)pWin->PixelToLogic( Size(1,1) ).Height();
+ nPixelTwips = (sal_uInt16)pWin->PixelToLogic( Size(1,1) ).Height();
}
}
-BOOL SwViewOption::IsAutoCompleteWords() const
+sal_Bool SwViewOption::IsAutoCompleteWords() const
{
const SvxSwAutoFmtFlags& rFlags = SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags();
return /*rFlags.bAutoCompleteWords &&*/ rFlags.bAutoCmpltCollectWords;
@@ -379,9 +379,9 @@ AuthorCharAttr::AuthorCharAttr() :
--------------------------------------------------*/
-USHORT GetHtmlMode(const SwDocShell* pShell)
+sal_uInt16 GetHtmlMode(const SwDocShell* pShell)
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if(!pShell || PTR_CAST(SwWebDocShell, pShell))
{
nRet = HTMLMODE_ON;
@@ -593,7 +593,7 @@ void SwViewOption::ApplyColorConfigValues(const svtools::ColorConfig& rConfig )
/* -----------------------------23.04.2002 17:48------------------------------
---------------------------------------------------------------------------*/
-void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInConfig )
+void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bSaveInConfig )
{
if(bSet)
nAppearanceFlags |= nFlag;
@@ -636,7 +636,7 @@ void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInCon
/* -----------------------------24.04.2002 10:42------------------------------
---------------------------------------------------------------------------*/
-BOOL SwViewOption::IsAppearanceFlag(sal_Int32 nFlag)
+sal_Bool SwViewOption::IsAppearanceFlag(sal_Int32 nFlag)
{
return 0 != (nAppearanceFlags & nFlag);
}
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 331d7035dc56..0b5b9127b066 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -236,7 +236,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) :
DBG_ASSERT(m_xDBContext.is(), "service 'com.sun.star.sdb.DatabaseContext' not found!");
sal_Bool bEnableEdit = sal_False;
sal_Bool bEnableOK = sal_True;
- m_aListLB.SelectAll( FALSE );
+ m_aListLB.SelectAll( sal_False );
if(m_xDBContext.is())
{
@@ -461,7 +461,7 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton)
pUserData->sURL = sURL;
m_pCreatedDataSource->SetUserData(pUserData);
m_aListLB.Select(m_pCreatedDataSource);
- m_aCreateListPB.Enable(FALSE);
+ m_aCreateListPB.Enable(sal_False);
}
catch(Exception& )
@@ -531,7 +531,7 @@ IMPL_STATIC_LINK(SwAddressListDialog, StaticListBoxSelectHdl_Impl, SvLBoxEntry*,
pThis->m_aListLB.SetEntryText(pThis->m_sConnecting, pSelect, ITEMID_TABLE - 1);
// allow painting of the new entry
pThis->m_aListLB.Window::Invalidate(INVALIDATE_UPDATE);
- for (USHORT i = 0; i < 10; i++)
+ for (sal_uInt16 i = 0; i < 10; i++)
Application::Reschedule();
}
@@ -689,7 +689,7 @@ IMPL_LINK(SwAddressListDialog, TableSelectHdl_Impl, PushButton*, pButton)
-----------------------------------------------------------------------*/
IMPL_LINK(SwAddressListDialog, OKHdl_Impl, PushButton*, EMPTYARG)
{
- EndDialog(TRUE);
+ EndDialog(sal_True);
return 0;
}
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 6c13fee26b9c..1eeedd3a0e0f 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -223,11 +223,11 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
if(nContentHeight < m_aScrollBar.GetSizePixel().Height())
{
nContentHeight = m_aScrollBar.GetSizePixel().Height();
- m_aScrollBar.Enable(FALSE);
+ m_aScrollBar.Enable(sal_False);
}
else
{
- m_aScrollBar.Enable(TRUE);
+ m_aScrollBar.Enable(sal_True);
m_aScrollBar.SetRange(Range(0, nLines));
m_aScrollBar.SetThumbPos(0);
m_aScrollBar.SetVisibleSize(nVisibleLines);
@@ -366,7 +366,7 @@ long SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt )
if(rNEvt.GetType() == EVENT_COMMAND)
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- USHORT nCmd = pCEvt->GetCommand();
+ sal_uInt16 nCmd = pCEvt->GetCommand();
if( COMMAND_WHEEL == nCmd )
{
Command(*pCEvt);
@@ -428,7 +428,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
if(m_sURL.Len())
{
//file exists, has to be loaded here
- SfxMedium aMedium( m_sURL, STREAM_READ, TRUE );
+ SfxMedium aMedium( m_sURL, STREAM_READ, sal_True );
SvStream* pStream = aMedium.GetInStream();
if(pStream)
{
@@ -442,7 +442,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
OUString sMiddle(sTempMiddle);
String sLine;
- BOOL bRead = pStream->ReadUniOrByteStringLine( sLine, RTL_TEXTENCODING_UTF8 );
+ sal_Bool bRead = pStream->ReadUniOrByteStringLine( sLine, RTL_TEXTENCODING_UTF8 );
if(bRead)
{
@@ -487,7 +487,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
//database has to be created
const ResStringArray& rAddressHeader = rConfig.GetDefaultAddressHeaders();
sal_uInt32 nCount = rAddressHeader.Count();
- for(USHORT nHeader = 0; nHeader < nCount; ++nHeader)
+ for(sal_uInt16 nHeader = 0; nHeader < nCount; ++nHeader)
m_pCSVData->aDBColumnHeaders.push_back( rAddressHeader.GetString(nHeader));
::std::vector<OUString> aNewData;
String sTemp;
@@ -545,7 +545,7 @@ IMPL_LINK(SwCreateAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
// if only one set is available then clear the data
String sTemp;
m_pCSVData->aDBData[0].assign(m_pCSVData->aDBData[0].size(), sTemp);
- m_aDeletePB.Enable(FALSE);
+ m_aDeletePB.Enable(sal_False);
}
m_pAddressControl->SetCurrentDataSet(nCurrent);
m_aSetNoNF.SetMax(m_pCSVData->aDBData.size());
@@ -629,7 +629,7 @@ IMPL_LINK(SwCreateAddressListDialog, OkHdl_Impl, PushButton*, EMPTYARG)
}
if(m_sURL.Len())
{
- SfxMedium aMedium( m_sURL, STREAM_READWRITE|STREAM_TRUNC, TRUE );
+ SfxMedium aMedium( m_sURL, STREAM_READWRITE|STREAM_TRUNC, sal_True );
SvStream* pStream = aMedium.GetOutStream();
pStream->SetLineDelimiter( LINEEND_LF );
pStream->SetStreamCharSet(RTL_TEXTENCODING_UTF8);
@@ -830,6 +830,6 @@ IMPL_LINK(SwFindEntryDialog, FindEnableHdl_Impl, Edit*, EMPTYARG)
-----------------------------------------------------------------------*/
IMPL_LINK(SwFindEntryDialog, CloseHdl_Impl, PushButton*, EMPTYARG)
{
- Show(FALSE);
+ Show(sal_False);
return 0;
}
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index f5191fe0fe55..d1da798202c0 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -107,7 +107,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, ListBoxSelectHdl_Impl, ListBox*, EMPTYAR
IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
{
bool bRename = pButton == &m_aRenamePB;
- USHORT nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
@@ -152,7 +152,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
-----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
{
- USHORT nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos();
m_aFieldsLB.RemoveEntry(m_aFieldsLB.GetSelectEntryPos());
m_aFieldsLB.SelectEntryPos(nPos > m_aFieldsLB.GetEntryCount() - 1 ? nPos - 1 : nPos);
@@ -171,8 +171,8 @@ IMPL_LINK(SwCustomizeAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
-----------------------------------------------------------------------*/
IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton)
{
- USHORT nPos;
- USHORT nOldPos = nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nPos;
+ sal_uInt16 nOldPos = nPos = m_aFieldsLB.GetSelectEntryPos();
String aTemp = m_aFieldsLB.GetEntry(nPos);
m_aFieldsLB.RemoveEntry( nPos );
if(pButton == &m_aUpPB)
@@ -201,8 +201,8 @@ IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton)
-----------------------------------------------------------------------*/
void SwCustomizeAddressListDialog::UpdateButtons()
{
- USHORT nPos = m_aFieldsLB.GetSelectEntryPos();
- USHORT nEntries = m_aFieldsLB.GetEntryCount();
+ sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nEntries = m_aFieldsLB.GetEntryCount();
m_aUpPB.Enable(nPos > 0 && nEntries > 0);
m_aDownPB.Enable(nPos < nEntries -1);
m_aDeletePB.Enable(nEntries > 0);
@@ -255,7 +255,7 @@ SwAddRenameEntryDialog::~SwAddRenameEntryDialog()
IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
{
::rtl::OUString sEntry = pEdit->GetText();
- BOOL bFound = sEntry.getLength() ? FALSE : TRUE;
+ sal_Bool bFound = sEntry.getLength() ? sal_False : sal_True;
if(!bFound)
{
@@ -265,7 +265,7 @@ IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
++aHeaderIter)
if(*aHeaderIter == sEntry)
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 9e62f7a4de36..64a3e3f455a0 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -136,7 +136,7 @@ struct _DB_Column
union {
String* pText;
SwField* pField;
- ULONG nFormat;
+ sal_uLong nFormat;
} DB_ColumnData;
const SwInsDBColumn* pColInfo;
@@ -154,7 +154,7 @@ struct _DB_Column
eColType = DB_FILLTEXT;
}
- _DB_Column( const SwInsDBColumn& rInfo, ULONG nFormat )
+ _DB_Column( const SwInsDBColumn& rInfo, sal_uLong nFormat )
{
pColInfo = &rInfo;
DB_ColumnData.nFormat = nFormat;
@@ -193,15 +193,15 @@ struct _DB_ColumnConfigData
{
SwInsDBColumns aDBColumns;
rtl::OUString sSource, sTable, sEdit, sTblList, sTmplNm, sTAutoFmtNm;
- BOOL bIsTable : 1,
+ sal_Bool bIsTable : 1,
bIsField : 1,
bIsHeadlineOn : 1,
bIsEmptyHeadln : 1;
_DB_ColumnConfigData()
{
- bIsTable = bIsHeadlineOn = TRUE;
- bIsField = bIsEmptyHeadln = FALSE;
+ bIsTable = bIsHeadlineOn = sal_True;
+ bIsField = bIsEmptyHeadln = sal_False;
}
~_DB_ColumnConfigData();
@@ -308,7 +308,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
long nCount = aColNames.getLength();
for (long n = 0; n < nCount; n++)
{
- SwInsDBColumn* pNew = new SwInsDBColumn( pColNames[n], (USHORT)n );
+ SwInsDBColumn* pNew = new SwInsDBColumn( pColNames[n], (sal_uInt16)n );
Any aCol = xCols->getByName(pColNames[n]);
Reference <XPropertySet> xCol;
aCol >>= xCol;
@@ -332,7 +332,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
case DataType::TIME:
case DataType::TIMESTAMP:
{
- pNew->bHasFmt = TRUE;
+ pNew->bHasFmt = sal_True;
Any aFormat = xCol->getPropertyValue(C2U("FormatKey"));
if(aFormat.hasValue())
{
@@ -397,16 +397,16 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
// steht der Cursor in einer Tabelle, darf NIE Tabelle auswaehlbar sein
if( pView->GetWrtShell().GetTableFmt() )
{
- aRbAsTable.Enable( FALSE );
- aRbAsField.Check( TRUE );
- aRbDbFmtFromDb.Check( TRUE );
+ aRbAsTable.Enable( sal_False );
+ aRbAsField.Check( sal_True );
+ aRbDbFmtFromDb.Check( sal_True );
}
else
{
- aRbAsTable.Check( TRUE );
- aRbDbFmtFromDb.Check( TRUE );
- aIbDbcolOneFrom.Enable( FALSE );
- aIbDbcolAllFrom.Enable( FALSE );
+ aRbAsTable.Check( sal_True );
+ aRbDbFmtFromDb.Check( sal_True );
+ aIbDbcolOneFrom.Enable( sal_False );
+ aIbDbcolAllFrom.Enable( sal_False );
}
aRbAsTable.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, PageHdl ));
@@ -438,7 +438,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
aLbTblDbColumn.SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl ));
aLbTableCol.SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl ));
- for( USHORT n = 0; n < aDBColumns.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aDBColumns.Count(); ++n )
{
const String& rS = aDBColumns[ n ]->sColumn;
aLbTblDbColumn.InsertEntry( rS, n );
@@ -469,7 +469,7 @@ SwInsertDBColAutoPilot::~SwInsertDBColAutoPilot()
---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton )
{
- BOOL bShowTbl = pButton == &aRbAsTable;
+ sal_Bool bShowTbl = pButton == &aRbAsTable;
String sTxt( pButton->GetText() );
aFlHead.SetText( MnemonicGenerator::EraseAllMnemonicChars( sTxt ) );
@@ -505,7 +505,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton )
---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton )
{
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
ListBox& rBox = aRbAsTable.IsChecked()
? ( 0 == aLbTableCol.GetEntryData( 0 )
? aLbTblDbColumn
@@ -515,7 +515,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton )
SwInsDBColumn aSrch( rBox.GetSelectEntry(), 0 );
aDBColumns.Seek_Entry( &aSrch, &nFndPos );
- BOOL bFromDB = &aRbDbFmtFromDb == pButton;
+ sal_Bool bFromDB = &aRbDbFmtFromDb == pButton;
aDBColumns[ nFndPos ]->bIsDBFmt = bFromDB;
aLbDbFmtFromUsr.Enable( !bFromDB );
@@ -526,15 +526,15 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton )
---------------------------------------------------------------------------*/
IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
{
- BOOL bChgEnable = TRUE, bEnableTo = TRUE, bEnableFrom = TRUE;
- aLbTblDbColumn.SetUpdateMode( FALSE );
- aLbTableCol.SetUpdateMode( FALSE );
+ sal_Bool bChgEnable = sal_True, bEnableTo = sal_True, bEnableFrom = sal_True;
+ aLbTblDbColumn.SetUpdateMode( sal_False );
+ aLbTableCol.SetUpdateMode( sal_False );
if( pButton == &aIbDbcolAllTo )
{
- bEnableTo = FALSE;
+ bEnableTo = sal_False;
- USHORT n, nInsPos = aLbTableCol.GetSelectEntryPos(),
+ sal_uInt16 n, nInsPos = aLbTableCol.GetSelectEntryPos(),
nCnt = aLbTblDbColumn.GetEntryCount();
if( LISTBOX_APPEND == nInsPos )
for( n = 0; n < nCnt; ++n )
@@ -550,7 +550,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
else if( pButton == &aIbDbcolOneTo &&
LISTBOX_ENTRY_NOTFOUND != aLbTblDbColumn.GetSelectEntryPos() )
{
- USHORT nInsPos = aLbTableCol.GetSelectEntryPos(),
+ sal_uInt16 nInsPos = aLbTableCol.GetSelectEntryPos(),
nDelPos = aLbTblDbColumn.GetSelectEntryPos(),
nTopPos = aLbTblDbColumn.GetTopEntry();
aLbTableCol.InsertEntry( aLbTblDbColumn.GetEntry( nDelPos ), nInsPos );
@@ -568,7 +568,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
{
if( LISTBOX_ENTRY_NOTFOUND != aLbTableCol.GetSelectEntryPos() )
{
- USHORT nFndPos, nInsPos,
+ sal_uInt16 nFndPos, nInsPos,
nDelPos = aLbTableCol.GetSelectEntryPos(),
nTopPos = aLbTableCol.GetTopEntry();
@@ -605,24 +605,24 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
}
else if( pButton == &aIbDbcolAllFrom )
{
- bEnableFrom = FALSE;
+ bEnableFrom = sal_False;
aLbTblDbColumn.Clear();
aLbTableCol.Clear();
- for( USHORT n = 0; n < aDBColumns.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aDBColumns.Count(); ++n )
aLbTblDbColumn.InsertEntry( aDBColumns[ n ]->sColumn, n );
aLbTblDbColumn.SelectEntryPos( 0 );
}
else if( pButton == &aIbDbcolToEdit )
{
- bChgEnable = FALSE;
+ bChgEnable = sal_False;
// Daten ins Edit moven:
String aFld( aLbTxtDbColumn.GetSelectEntry() );
if( aFld.Len() )
{
String aStr( aEdDbText.GetText() );
- USHORT nPos = (USHORT)aEdDbText.GetSelection().Min();
- USHORT nSel = USHORT(aEdDbText.GetSelection().Max()) - nPos;
+ sal_uInt16 nPos = (sal_uInt16)aEdDbText.GetSelection().Min();
+ sal_uInt16 nSel = sal_uInt16(aEdDbText.GetSelection().Max()) - nPos;
if( nSel )
// dann loesche erstmal die bestehende Selektion
aStr.Erase( nPos, nSel );
@@ -659,14 +659,14 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
aIbDbcolOneFrom.Enable( bEnableFrom );
aIbDbcolAllFrom.Enable( bEnableFrom );
- aRbDbFmtFromDb.Enable( FALSE );
- aRbDbFmtFromUsr.Enable( FALSE );
- aLbDbFmtFromUsr.Enable( FALSE );
+ aRbDbFmtFromDb.Enable( sal_False );
+ aRbDbFmtFromUsr.Enable( sal_False );
+ aLbDbFmtFromUsr.Enable( sal_False );
aPbTblFormat.Enable( bEnableFrom );
}
- aLbTblDbColumn.SetUpdateMode( TRUE );
- aLbTableCol.SetUpdateMode( TRUE );
+ aLbTblDbColumn.SetUpdateMode( sal_True );
+ aLbTableCol.SetUpdateMode( sal_True );
return 0;
}
@@ -694,10 +694,10 @@ IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox )
IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
{
SwWrtShell& rSh = pView->GetWrtShell();
- BOOL bNewSet = FALSE;
+ sal_Bool bNewSet = sal_False;
if( !pTblSet )
{
- bNewSet = TRUE;
+ bNewSet = sal_True;
pTblSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() );
//Ersteinmal die einfachen Attribute besorgen.
@@ -714,19 +714,19 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
// Tabellenvariante, wenn mehrere Tabellenzellen selektiert
- aBoxInfo.SetTable( TRUE );
+ aBoxInfo.SetTable( sal_True );
// Abstandsfeld immer anzeigen
- aBoxInfo.SetDist( TRUE);
+ aBoxInfo.SetDist( sal_True);
// Minimalgroesse in Tabellen und Absaetzen setzen
- aBoxInfo.SetMinDist( FALSE );
+ aBoxInfo.SetMinDist( sal_False );
// Default-Abstand immer setzen
aBoxInfo.SetDefDist( MIN_BORDER_DIST );
// Einzelne Linien koennen nur in Tabellen DontCare-Status haben
- aBoxInfo.SetValid( VALID_DISABLE, TRUE );
+ aBoxInfo.SetValid( VALID_DISABLE, sal_True );
pTblSet->Put( aBoxInfo );
SwGetCurColNumPara aPara;
- const USHORT nNum = rSh.GetCurColNum( &aPara );
+ const sal_uInt16 nNum = rSh.GetCurColNum( &aPara );
long nWidth;
if( nNum )
@@ -739,11 +739,11 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
long nWidth1 = 0,
nStart1 = 0,
nEnd1 = nWidth;
- for( USHORT i = 0; i < nNum; ++i )
+ for( sal_uInt16 i = 0; i < nNum; ++i )
{
SwColumn* pCol = rCols[i];
nStart1 = pCol->GetLeft() + nWidth1;
- nWidth1 += (long)rCol.CalcColWidth( i, (USHORT)nWidth );
+ nWidth1 += (long)rCol.CalcColWidth( i, (sal_uInt16)nWidth );
nEnd1 = nWidth1 - pCol->GetRight();
}
if(nStart1 || nEnd1 != nWidth)
@@ -751,14 +751,14 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
}
else
nWidth = rSh.GetAnyCurRect(
- FRMTYPE_FLY_ANY & rSh.GetFrmType( 0, TRUE )
+ FRMTYPE_FLY_ANY & rSh.GetFrmType( 0, sal_True )
? RECT_FLY_PRT_EMBEDDED
: RECT_PAGE_PRT ).Width();
SwTabCols aTabCols;
aTabCols.SetRight( nWidth );
aTabCols.SetRightMax( nWidth );
- pRep = new SwTableRep( aTabCols, FALSE );
+ pRep = new SwTableRep( aTabCols, sal_False );
pRep->SetAlign( text::HoriOrientation::NONE );
pRep->SetSpace( nWidth );
pRep->SetWidth( nWidth );
@@ -774,18 +774,18 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
// Anzahl der Spalten hat sich geaendert: dann muessen die
// TabCols angepasst werden
long nWidth = pRep->GetWidth();
- USHORT nCols = aLbTableCol.GetEntryCount() - 1;
+ sal_uInt16 nCols = aLbTableCol.GetEntryCount() - 1;
SwTabCols aTabCols( nCols );
aTabCols.SetRight( nWidth );
aTabCols.SetRightMax( nWidth );
if( nCols )
- for( USHORT n = 0, nStep = (USHORT)(nWidth / (nCols+1)), nW = nStep;
+ for( sal_uInt16 n = 0, nStep = (sal_uInt16)(nWidth / (nCols+1)), nW = nStep;
n < nCols; ++n, nW = nW + nStep )
{
- aTabCols.Insert( nW, FALSE, n );
+ aTabCols.Insert( nW, sal_False, n );
}
delete pRep;
- pRep = new SwTableRep( aTabCols, FALSE );
+ pRep = new SwTableRep( aTabCols, sal_False );
pRep->SetAlign( text::HoriOrientation::NONE );
pRep->SetSpace( nWidth );
pRep->SetWidth( nWidth );
@@ -817,7 +817,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, AutoFmtHdl, PushButton*, pButton )
SwAbstractDialogFactory* pFact = swui::GetFactory();
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
- AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(),DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt);
+ AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(),DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
@@ -837,7 +837,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
: &aLbTxtDbColumn )
: pBox;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
SwInsDBColumn aSrch( pGetBox->GetSelectEntry(), 0 );
aDBColumns.Seek_Entry( &aSrch, &nFndPos );
@@ -856,13 +856,13 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
String sTxt( aFlFormat.GetText().Copy( 0, nGBFmtLen ));
if( !aSrch.sColumn.getLength() )
{
- aRbDbFmtFromDb.Enable( FALSE );
- aRbDbFmtFromUsr.Enable( FALSE );
- aLbDbFmtFromUsr.Enable( FALSE );
+ aRbDbFmtFromDb.Enable( sal_False );
+ aRbDbFmtFromUsr.Enable( sal_False );
+ aLbDbFmtFromUsr.Enable( sal_False );
}
else
{
- BOOL bEnableFmt = aDBColumns[ nFndPos ]->bHasFmt;
+ sal_Bool bEnableFmt = aDBColumns[ nFndPos ]->bHasFmt;
aRbDbFmtFromDb.Enable( bEnableFmt );
aRbDbFmtFromUsr.Enable( bEnableFmt );
@@ -871,7 +871,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
(( sTxt += C2S(" (" )) += String(aSrch.sColumn) ) += (sal_Unicode)')';
}
- BOOL bIsDBFmt = aDBColumns[ nFndPos ]->bIsDBFmt;
+ sal_Bool bIsDBFmt = aDBColumns[ nFndPos ]->bIsDBFmt;
aRbDbFmtFromDb.Check( bIsDBFmt );
aRbDbFmtFromUsr.Check( !bIsDBFmt );
aLbDbFmtFromUsr.Enable( !bIsDBFmt );
@@ -895,7 +895,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton )
{
if( pButton == &aCbTableHeadon )
{
- BOOL bEnable = aCbTableHeadon.IsChecked();
+ sal_Bool bEnable = aCbTableHeadon.IsChecked();
aRbHeadlColnms.Enable( bEnable );
aRbHeadlEmpty.Enable( bEnable );
@@ -908,7 +908,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton )
static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr )
{
_DB_Column* pNew;
- USHORT nSttPos = 0, nFndPos;
+ sal_uInt16 nSttPos = 0, nFndPos;
while( STRING_NOTFOUND != ( nFndPos = rTxt.Search( '\x0A', nSttPos )) )
{
if( 1 < nFndPos )
@@ -929,16 +929,16 @@ static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr )
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-BOOL SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
+sal_Bool SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
_DB_Columns& rColArr,
- BOOL bInsField )
+ sal_Bool bInsField )
{
// aus dem Text wieder die einzelnen Datenbank - Spalten erzeugen
// und dann in einem Array speichern
// Die Datenbankspalten stehen in <> und muessen im Array der Spalten
// vorhanden sein:
String sTxt( rTxt );
- USHORT nFndPos, nEndPos, nSttPos = 0;
+ sal_uInt16 nFndPos, nEndPos, nSttPos = 0;
while( STRING_NOTFOUND != ( nFndPos = sTxt.Search( cDBFldStart, nSttPos )))
{
@@ -964,8 +964,8 @@ BOOL SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
sTxt.Erase( 0, (xub_StrLen)(rFndCol.sColumn.getLength() + 2) );
nSttPos = 0;
- USHORT nSubType = 0;
- ULONG nFormat;
+ sal_uInt16 nSubType = 0;
+ sal_uLong nFormat;
if( rFndCol.bHasFmt )
{
if( rFndCol.bIsDBFmt )
@@ -1016,7 +1016,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
SwWrtShell& rSh = pView->GetWrtShell();
//with the drag and drop interface no result set is initially available
- BOOL bDisposeResultSet = FALSE;
+ sal_Bool bDisposeResultSet = sal_False;
// we don't have a cursor, so we have to create our own RowSet
if ( !xResultSet.is() )
{
@@ -1029,11 +1029,11 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
return;
rSh.StartAllAction();
- BOOL bUndo = rSh.DoesUndo();
+ sal_Bool bUndo = rSh.DoesUndo();
if( bUndo )
rSh.StartUndo( UNDO_EMPTY );
- BOOL bAsTable = aRbAsTable.IsChecked();
+ sal_Bool bAsTable = aRbAsTable.IsChecked();
SvNumberFormatter& rNumFmtr = *rSh.GetNumberFormatter();
if( rSh.HasSelection() )
@@ -1047,22 +1047,22 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
do{ // middle checked loop!!
if( bAsTable ) // Daten als Tabelle einfuegen
{
- rSh.DoUndo( FALSE );
+ rSh.DoUndo( sal_False );
- USHORT n, nRows = 0, nCols = aLbTableCol.GetEntryCount();
+ sal_uInt16 n, nRows = 0, nCols = aLbTableCol.GetEntryCount();
if( aCbTableHeadon.IsChecked() )
nRows++;
if( pSelection )
- nRows = nRows + (USHORT)rSelection.getLength();
+ nRows = nRows + (sal_uInt16)rSelection.getLength();
else
++nRows;
// bereite das Array fuer die ausgewaehlten Spalten auf
- SwInsDBColumns_SAR aColFlds( 255 >= nCols ? (BYTE)nCols : 255, 5 );
+ SwInsDBColumns_SAR aColFlds( 255 >= nCols ? (sal_uInt8)nCols : 255, 5 );
for( n = 0; n < nCols; ++n )
{
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
SwInsDBColumn aSrch( aLbTableCol.GetEntry( n ), 0 );
if( aDBColumns.Seek_Entry( &aSrch, &nFndPos ) )
aColFlds.Insert( aDBColumns[ nFndPos ], n );
@@ -1085,7 +1085,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
- BOOL bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON);
+ sal_Bool bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON);
rSh.InsertTable(
pModOpt->GetInsTblFlags(bHTML),
nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFmt : 0) );
@@ -1096,8 +1096,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
SfxItemSet aTblSet( rSh.GetAttrPool(), RES_BOXATR_FORMAT,
RES_BOXATR_VALUE );
- BOOL bIsAutoUpdateCells = rSh.IsAutoUpdateCells();
- rSh.SetAutoUpdateCells( FALSE );
+ sal_Bool bIsAutoUpdateCells = rSh.IsAutoUpdateCells();
+ rSh.SetAutoUpdateCells( sal_False );
if( aCbTableHeadon.IsChecked() )
@@ -1116,7 +1116,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
for( sal_Int32 i = 0 ; ; ++i )
{
- BOOL bBreak = FALSE;
+ sal_Bool bBreak = sal_False;
try
{
if(pSelection)
@@ -1130,7 +1130,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
catch(const Exception& )
{
- bBreak = TRUE;
+ bBreak = sal_True;
}
if(bBreak)
break;
@@ -1227,7 +1227,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
break;
if( 10 == i )
- pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), TRUE ));
+ pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True ));
}
rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() );
@@ -1257,7 +1257,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
rSh.SwCrsrShell::Left(1,CRSR_SKIP_CHARS);
}
- rSh.DoUndo( FALSE );
+ rSh.DoUndo( sal_False );
SwTxtFmtColl* pColl = 0;
{
@@ -1267,7 +1267,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
pColl = rSh.FindTxtFmtCollByName( sTmplNm );
if( !pColl )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmplNm, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmplNm, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if( USHRT_MAX != nId )
pColl = rSh.GetTxtCollFromPool( nId );
else
@@ -1311,12 +1311,12 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
C2S("1"), aEmptyStr, aDBData );
- BOOL bSetCrsr = TRUE;
- USHORT n = 0, nCols = aColArr.Count();
+ sal_Bool bSetCrsr = sal_True;
+ sal_uInt16 n = 0, nCols = aColArr.Count();
::sw::mark::IMark* pMark = NULL;
for( sal_Int32 i = 0 ; ; ++i )
{
- BOOL bBreak = FALSE;
+ sal_Bool bBreak = sal_False;
try
{
if(pSelection)
@@ -1330,7 +1330,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
catch(Exception&)
{
- bBreak = TRUE;
+ bBreak = sal_True;
}
if(bBreak)
@@ -1384,7 +1384,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
if(aStandard != aCompare)
nValue += (aStandard - aCompare);
}
- pFld->ChgValue( nValue, TRUE );
+ pFld->ChgValue( nValue, sal_True );
}
pFld->SetInitialized();
@@ -1439,13 +1439,13 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
// rSh.SwCrsrShell::MovePara( fnParaCurr, fnParaEnd );
rSh.SwCrsrShell::MovePara(
GetfnParaCurr(), GetfnParaEnd() );
- bSetCrsr = FALSE;
+ bSetCrsr = sal_False;
}
}
if( !pSelection )
{
- BOOL bNext = xResultSet->next();
+ sal_Bool bNext = xResultSet->next();
if(!bNext)
break;
}
@@ -1459,7 +1459,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
rSh.SwEditShell::SplitNode();
if( 10 == i )
- pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), TRUE ));
+ pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True ));
}
if( !bSetCrsr && pMark != NULL)
@@ -1473,11 +1473,11 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
// write configuration
Commit();
- }while( FALSE ); // middle checked loop
+ }while( sal_False ); // middle checked loop
if( bUndo )
{
- rSh.DoUndo( TRUE );
+ rSh.DoUndo( sal_True );
rSh.AppendUndoForInsertFromDB( bAsTable );
rSh.EndUndo( UNDO_EMPTY );
}
@@ -1511,15 +1511,15 @@ void SwInsertDBColAutoPilot::SetTabSet()
{
// die Defaults wieder entfernen, es macht keinen Sinn sie zu setzen
SvxBrushItem aBrush( RES_BACKGROUND );
- static USHORT __READONLY_DATA aIds[3] =
+ static sal_uInt16 __READONLY_DATA aIds[3] =
{ RES_BACKGROUND, SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE };
for( int i = 0; i < 3; ++i )
if( SFX_ITEM_SET == pTblSet->GetItemState( aIds[ i ],
- FALSE, &pItem ) && *pItem == aBrush )
+ sal_False, &pItem ) && *pItem == aBrush )
pTblSet->ClearItem( aIds[ i ] );
}
- if( SFX_ITEM_SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, FALSE,
+ if( SFX_ITEM_SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, sal_False,
&pItem ) && ((const SfxStringItem*)pItem)->GetValue() ==
rSh.GetTableFmt()->GetName() )
pTblSet->ClearItem( FN_PARAM_TABLE_NAME );
@@ -1672,7 +1672,7 @@ void SwInsertDBColAutoPilot::Commit()
pValues[3].Value <<= rtl::OUString(aEdDbText.GetText());
String sTmp;
- for( USHORT n = 0, nCnt = aLbTableCol.GetEntryCount(); n < nCnt; ++n )
+ for( sal_uInt16 n = 0, nCnt = aLbTableCol.GetEntryCount(); n < nCnt; ++n )
( sTmp += aLbTableCol.GetEntry( n ) ) += '\x0a';
if( sTmp.Len() )
@@ -1706,7 +1706,7 @@ void SwInsertDBColAutoPilot::Commit()
rtl::OUString sPrevLang;
SvNumberFormatter& rNFmtr = *pView->GetWrtShell().GetNumberFormatter();
- for(USHORT nCol = 0; nCol < aDBColumns.Count(); nCol++)
+ for(sal_uInt16 nCol = 0; nCol < aDBColumns.Count(); nCol++)
{
rtl::OUString sColumnNode = sNewNode;
SwInsDBColumn* pColumn = aDBColumns[nCol];
@@ -1817,7 +1817,7 @@ void SwInsertDBColAutoPilot::Load()
sal_Bool bFound = sal_False;
for(sal_Int32 nRealColumn = 0; nRealColumn < aDBColumns.Count(); nRealColumn++)
{
- if(aDBColumns[(USHORT)nRealColumn]->sColumn == sColumn)
+ if(aDBColumns[(sal_uInt16)nRealColumn]->sColumn == sColumn)
{
bFound = sal_True;
break;
@@ -1849,7 +1849,7 @@ void SwInsertDBColAutoPilot::Load()
pNewData->aDBColumns.Insert(pInsDBColumn);
}
- USHORT n = 0;
+ sal_uInt16 n = 0;
String sTmp( pNewData->sTblList );
if( sTmp.Len() )
{
@@ -1865,11 +1865,11 @@ void SwInsertDBColAutoPilot::Load()
if( !aLbTblDbColumn.GetEntryCount() )
{
- aIbDbcolAllTo.Enable( FALSE );
- aIbDbcolOneTo.Enable( FALSE );
+ aIbDbcolAllTo.Enable( sal_False );
+ aIbDbcolOneTo.Enable( sal_False );
}
- aIbDbcolOneFrom.Enable( TRUE );
- aIbDbcolAllFrom.Enable( TRUE );
+ aIbDbcolOneFrom.Enable( sal_True );
+ aIbDbcolAllFrom.Enable( sal_True );
}
aEdDbText.SetText( pNewData->sEdit );
@@ -1887,7 +1887,7 @@ void SwInsertDBColAutoPilot::Load()
// dann erstmal die AutoFmt-Datei laden und das Autoformat suchen
SwTableAutoFmtTbl aAutoFmtTbl;
aAutoFmtTbl.Load();
- for( USHORT nAutoFmt = aAutoFmtTbl.Count(); nAutoFmt; )
+ for( sal_uInt16 nAutoFmt = aAutoFmtTbl.Count(); nAutoFmt; )
if( sTmp == aAutoFmtTbl[ --nAutoFmt ]->GetName() )
{
pTAutoFmt = new SwTableAutoFmt( *aAutoFmtTbl[ nAutoFmt ] );
@@ -1909,14 +1909,14 @@ void SwInsertDBColAutoPilot::Load()
for( n = 0; n < aDBColumns.Count() ; ++n )
{
SwInsDBColumn& rSet = *aDBColumns[ n ];
- for( USHORT m = 0; m < pNewData->aDBColumns.Count() ; ++m )
+ for( sal_uInt16 m = 0; m < pNewData->aDBColumns.Count() ; ++m )
{
SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ];
if(rGet.sColumn == rSet.sColumn)
{
if( rGet.bHasFmt && !rGet.bIsDBFmt )
{
- rSet.bIsDBFmt = FALSE;
+ rSet.bIsDBFmt = sal_False;
rSet.nUsrNumFmt = rNFmtr.GetEntryKey( rGet.sUsrNumFmt,
rGet.eUsrNumFmtLng );
if( NUMBERFORMAT_ENTRY_NOT_FOUND == rSet.nUsrNumFmt )
@@ -1936,7 +1936,7 @@ void SwInsertDBColAutoPilot::Load()
// steht der Cursor in einer Tabelle, darf NIE Tabelle auswaehlbar sein
if( !aRbAsTable.IsEnabled() && aRbAsTable.IsChecked() )
- aRbAsField.Check( TRUE );
+ aRbAsField.Check( sal_True );
delete pNewData;
break;
}
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 90eeb6ee1982..89c8617d9bdb 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -277,9 +277,9 @@ void lcl_InitNumberFormatter(SwDSParam& rParam, uno::Reference<XDataSource> xSou
/* -----------------------------17.07.00 17:04--------------------------------
---------------------------------------------------------------------------*/
-BOOL lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
+sal_Bool lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
try
{
if(pParam->bScrollable)
@@ -299,7 +299,7 @@ BOOL lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
/* -----------------------------17.07.00 17:23--------------------------------
---------------------------------------------------------------------------*/
-BOOL lcl_GetColumnCnt(SwDSParam* pParam,
+sal_Bool lcl_GetColumnCnt(SwDSParam* pParam,
const String& rColumnName, long nLanguage, String& rResult, double* pNumber)
{
uno::Reference< XColumnsSupplier > xColsSupp( pParam->xResultSet, UNO_QUERY );
@@ -312,7 +312,7 @@ BOOL lcl_GetColumnCnt(SwDSParam* pParam,
{
}
if(!xCols.is() || !xCols->hasByName(rColumnName))
- return FALSE;
+ return sal_False;
Any aCol = xCols->getByName(rColumnName);
uno::Reference< XPropertySet > xColumnProps;
aCol >>= xColumnProps;
@@ -330,12 +330,12 @@ BOOL lcl_GetColumnCnt(SwDSParam* pParam,
MsLangId::convertLanguageToLocale( (LanguageType)nLanguage, aFormatData.aLocale );
rResult = SwNewDBMgr::GetDBField( xColumnProps, aFormatData, pNumber);
- return TRUE;
+ return sal_True;
};
/*--------------------------------------------------------------------
Beschreibung: Daten importieren
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
+sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
{
SetMergeType( rMergeDesc.nMergeType );
@@ -360,11 +360,11 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
if(!aData.sDataSource.getLength() || !aData.sCommand.getLength() || !xResSet.is())
{
- return FALSE;
+ return sal_False;
}
pImpl->pMergeData = new SwDSParam(aData, xResSet, aSelection);
- SwDSParam* pTemp = FindDSData(aData, FALSE);
+ SwDSParam* pTemp = FindDSData(aData, sal_False);
if(pTemp)
*pTemp = *pImpl->pMergeData;
else
@@ -374,7 +374,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
//DSData and set the correct CommandType
SwDBData aTempData(aData);
aData.nCommandType = -1;
- pTemp = FindDSData(aData, FALSE);
+ pTemp = FindDSData(aData, sal_False);
if(pTemp)
*pTemp = *pImpl->pMergeData;
else
@@ -405,7 +405,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
pImpl->pMergeData->bEndOfDB = !pImpl->pMergeData->xResultSet->absolute( nPos );
pImpl->pMergeData->CheckEndOfDB();
if(pImpl->pMergeData->nSelectionIndex >= pImpl->pMergeData->aSelection.getLength())
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
}
else
{
@@ -415,7 +415,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
}
catch(Exception&)
{
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
pImpl->pMergeData->CheckEndOfDB();
DBG_ERROR("exception in MergeNew()");
}
@@ -425,7 +425,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
lcl_InitNumberFormatter(*pImpl->pMergeData, xSource);
rMergeDesc.rSh.ChgDBData(aData);
- bInMerge = TRUE;
+ bInMerge = sal_True;
if (IsInitDBFields())
{
@@ -439,10 +439,10 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
sDBName += DB_DELIM;
sDBName += String::CreateFromInt32(aInsertData.nCommandType);
rMergeDesc.rSh.ChangeDBFields( aDBNames, sDBName);
- SetInitDBFields(FALSE);
+ SetInitDBFields(sal_False);
}
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch(rMergeDesc.nMergeType)
{
case DBMGR_MERGE:
@@ -473,16 +473,16 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::Merge(SwWrtShell* pSh)
+sal_Bool SwNewDBMgr::Merge(SwWrtShell* pSh)
{
pSh->StartAllAction();
- pSh->ViewShell::UpdateFlds(TRUE);
+ pSh->ViewShell::UpdateFlds(sal_True);
pSh->SetModified();
pSh->EndAllAction();
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -495,8 +495,8 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
{
pSh->StartAllAction();
pSh->StartUndo(UNDO_EMPTY);
- BOOL bGroupUndo(pSh->DoesGroupUndo());
- pSh->DoGroupUndo(FALSE);
+ sal_Bool bGroupUndo(pSh->DoesGroupUndo());
+ pSh->DoGroupUndo(sal_False);
if( pSh->HasSelection() )
pSh->DelRight();
@@ -504,12 +504,12 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
SwWait *pWait = 0;
{
- ULONG i = 0;
+ sal_uLong i = 0;
do {
ImportDBEntry(pSh);
if( 10 == ++i )
- pWait = new SwWait( *pSh->GetView().GetDocShell(), TRUE);
+ pWait = new SwWait( *pSh->GetView().GetDocShell(), sal_True);
} while(ToNextMergeRecord());
}
@@ -525,10 +525,10 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
--------------------------------------------------*/
-String lcl_FindColumn(const String& sFormatStr,USHORT &nUsedPos, BYTE &nSeparator)
+String lcl_FindColumn(const String& sFormatStr,sal_uInt16 &nUsedPos, sal_uInt8 &nSeparator)
{
String sReturn;
- USHORT nLen = sFormatStr.Len();
+ sal_uInt16 nLen = sFormatStr.Len();
nSeparator = 0xff;
while(nUsedPos < nLen && nSeparator == 0xff)
{
@@ -566,13 +566,13 @@ void SwNewDBMgr::ImportDBEntry(SwWrtShell* pSh)
uno::Reference< XColumnsSupplier > xColsSupp( pImpl->pMergeData->xResultSet, UNO_QUERY );
uno::Reference<XNameAccess> xCols = xColsSupp->getColumns();
String sFormatStr;
- USHORT nFmtLen = sFormatStr.Len();
+ sal_uInt16 nFmtLen = sFormatStr.Len();
if( nFmtLen )
{
const char cSpace = ' ';
const char cTab = '\t';
- USHORT nUsedPos = 0;
- BYTE nSeparator;
+ sal_uInt16 nUsedPos = 0;
+ sal_uInt8 nSeparator;
String sColumn = lcl_FindColumn(sFormatStr, nUsedPos, nSeparator);
while( sColumn.Len() )
{
@@ -631,12 +631,12 @@ void SwNewDBMgr::ImportDBEntry(SwWrtShell* pSh)
/*--------------------------------------------------------------------
Beschreibung: Listbox mit Tabellenliste fuellen
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
+sal_Bool SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sOldTableName(pListBox->GetSelectEntry());
pListBox->Clear();
- SwDSParam* pParam = FindDSConnection(rDBName, FALSE);
+ SwDSParam* pParam = FindDSConnection(rDBName, sal_False);
uno::Reference< XConnection> xConnection;
if(pParam && pParam->xConnection.is())
xConnection = pParam->xConnection;
@@ -655,7 +655,7 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
const rtl::OUString* pTbls = aTbls.getConstArray();
for(long i = 0; i < aTbls.getLength(); i++)
{
- USHORT nEntry = pListBox->InsertEntry(pTbls[i]);
+ sal_uInt16 nEntry = pListBox->InsertEntry(pTbls[i]);
pListBox->SetEntryData(nEntry, (void*)0);
}
}
@@ -667,13 +667,13 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
const rtl::OUString* pQueries = aQueries.getConstArray();
for(long i = 0; i < aQueries.getLength(); i++)
{
- USHORT nEntry = pListBox->InsertEntry(pQueries[i]);
+ sal_uInt16 nEntry = pListBox->InsertEntry(pQueries[i]);
pListBox->SetEntryData(nEntry, (void*)1);
}
}
if (sOldTableName.Len())
pListBox->SelectEntry(sOldTableName);
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -681,8 +681,8 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
/*--------------------------------------------------------------------
Beschreibung: Listbox mit Spaltennamen einer Datenbank fuellen
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
- const String& rDBName, const String& rTableName, BOOL bAppend)
+sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox,
+ const String& rDBName, const String& rTableName, sal_Bool bAppend)
{
if (!bAppend)
pListBox->Clear();
@@ -690,7 +690,7 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
aData.sDataSource = rDBName;
aData.sCommand = rTableName;
aData.nCommandType = -1;
- SwDSParam* pParam = FindDSData(aData, FALSE);
+ SwDSParam* pParam = FindDSData(aData, sal_False);
uno::Reference< XConnection> xConnection;
if(pParam && pParam->xConnection.is())
xConnection = pParam->xConnection;
@@ -711,14 +711,14 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
}
::comphelper::disposeComponent( xColsSupp );
}
- return(TRUE);
+ return(sal_True);
}
/* -----------------------------08.06.01 15:11--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
+sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox,
uno::Reference< XConnection> xConnection,
- const String& rTableName, BOOL bAppend)
+ const String& rTableName, sal_Bool bAppend)
{
if (!bAppend)
pListBox->Clear();
@@ -734,7 +734,7 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
}
::comphelper::disposeComponent( xColsSupp );
}
- return(TRUE);
+ return(sal_True);
}
/*--------------------------------------------------------------------
@@ -743,10 +743,10 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
SwNewDBMgr::SwNewDBMgr() :
nMergeType(DBMGR_INSERT),
- bInitDBFields(FALSE),
- bInMerge(FALSE),
- bMergeSilent(FALSE),
- bMergeLock(FALSE),
+ bInitDBFields(sal_False),
+ bInMerge(sal_False),
+ bMergeSilent(sal_False),
+ bMergeLock(sal_False),
pImpl(new SwNewDBMgr_Impl(*this)),
pMergeEvtSrc(NULL)
{
@@ -756,7 +756,7 @@ SwNewDBMgr::SwNewDBMgr() :
---------------------------------------------------------------------------*/
SwNewDBMgr::~SwNewDBMgr()
{
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
{
SwDSParam* pParam = aDataSourceParams[nPos];
if(pParam->xConnection.is())
@@ -779,7 +779,7 @@ SwNewDBMgr::~SwNewDBMgr()
/*--------------------------------------------------------------------
Beschreibung: Serienbriefe als einzelne Dokumente speichern
--------------------------------------------------------------------*/
-String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageDesc, ULONG nDocNo )
+String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageDesc, sal_uLong nDocNo )
{
do
{
@@ -792,7 +792,7 @@ String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageD
}
void lcl_CopyDynamicDefaults( const SwDoc& rSource, SwDoc& rTarget )
{
- 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,
@@ -805,8 +805,8 @@ void lcl_CopyDynamicDefaults( const SwDoc& rSource, SwDoc& rTarget )
SfxItemSet aNewDefaults( rTarget.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 )
@@ -824,7 +824,7 @@ void lcl_CopyFollowPageDesc(
SwWrtShell& rTargetShell,
const SwPageDesc& rSourcePageDesc,
const SwPageDesc& rTargetPageDesc,
- const ULONG nDocNo )
+ const sal_uLong nDocNo )
{
//now copy the follow page desc, too
const SwPageDesc* pFollowPageDesc = rSourcePageDesc.GetFollow();
@@ -846,8 +846,8 @@ void lcl_CopyFollowPageDesc(
void lcl_RemoveSectionLinks( SwWrtShell& rWorkShell )
{
//reset all links of the sections of synchronized labels
- USHORT nSections = rWorkShell.GetSectionFmtCount();
- for( USHORT nSection = 0; nSection < nSections; ++nSection )
+ sal_uInt16 nSections = rWorkShell.GetSectionFmtCount();
+ for( sal_uInt16 nSection = 0; nSection < nSections; ++nSection )
{
SwSectionData aSectionData( *rWorkShell.GetSectionFmt( nSection ).GetSection() );
if( aSectionData.GetType() == FILE_LINK_SECTION )
@@ -860,13 +860,13 @@ void lcl_RemoveSectionLinks( SwWrtShell& rWorkShell )
rWorkShell.SetLabelDoc( sal_False );
}
-BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
+sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
const SwMergeDescriptor& rMergeDescriptor)
{
//check if the doc is synchronized and contains at least one linked section
- BOOL bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1;
- BOOL bLoop = TRUE;
- BOOL bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING;
+ sal_Bool bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1;
+ sal_Bool bLoop = sal_True;
+ sal_Bool bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING;
const bool bAsSingleFile = rMergeDescriptor.nMergeType == DBMGR_MERGE_SINGLE_FILE;
::rtl::Reference< MailDispatcher > xMailDispatcher;
@@ -891,14 +891,14 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
uno::Reference< XPropertySet > xColumnProp;
{
- BOOL bColumnName = sEMailAddrFld.Len() > 0;
+ sal_Bool bColumnName = sEMailAddrFld.Len() > 0;
if (bColumnName)
{
uno::Reference< XColumnsSupplier > xColsSupp( pImpl->pMergeData->xResultSet, UNO_QUERY );
uno::Reference<XNameAccess> xCols = xColsSupp->getColumns();
if(!xCols->hasByName(sEMailAddrFld))
- return FALSE;
+ return sal_False;
Any aCol = xCols->getByName(sEMailAddrFld);
aCol >>= xColumnProp;
}
@@ -934,7 +934,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
pStoreToFilterOptions = &rMergeDescriptor.sSaveToFilterOptions;
}
}
- bCancel = FALSE;
+ bCancel = sal_False;
// in case of creating a single resulting file this has to be created here
SwWrtShell* pTargetShell = 0;
@@ -943,7 +943,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
std::auto_ptr< utl::TempFile > aTempFile;
String sModifiedStartingPageDesc;
String sStartingPageDesc;
- USHORT nStartingPageNo = 0;
+ sal_uInt16 nStartingPageNo = 0;
bool bPageStylesWithHeaderFooter = false;
if(bAsSingleFile || rMergeDescriptor.bCreateSingleFile)
{
@@ -967,7 +967,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
pTargetView->GetDocShell()->LoadStylesFromFile(
sSourceDocumentURL, aOpt, sal_True );
//determine the page style and number used at the start of the source document
- pSourceShell->SttEndDoc(TRUE);
+ pSourceShell->SttEndDoc(sal_True);
nStartingPageNo = pSourceShell->GetVirtPageNum();
sStartingPageDesc = sModifiedStartingPageDesc = pSourceShell->GetPageDesc(
pSourceShell->GetCurPageDesc()).GetName();
@@ -997,10 +997,10 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
SfxViewFrame* pViewFrm = SfxViewFrame::GetFirst(pSourrceDocSh);
while (pViewFrm)
{
- pViewFrm->GetDispatcher()->Lock(TRUE);
+ pViewFrm->GetDispatcher()->Lock(sal_True);
pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourrceDocSh);
}
- ULONG nDocNo = 1;
+ sal_uLong nDocNo = 1;
long nStartRow, nEndRow;
// collect temporary files
@@ -1046,8 +1046,8 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
if( !aTempFile->IsValid() )
{
ErrorHandler::HandleError( ERRCODE_IO_NOTSUPPORTED );
- bLoop = FALSE;
- bCancel = TRUE;
+ bLoop = sal_False;
+ bCancel = sal_True;
}
else
{
@@ -1059,12 +1059,12 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
aPrtMonDlg.aPrintInfo.SetText(sStat);
// Rechenzeit fuer Save-Monitor:
- for (USHORT i = 0; i < 10; i++)
+ for (sal_uInt16 i = 0; i < 10; i++)
Application::Reschedule();
// Neues Dokument erzeugen und speichern
SfxObjectShellRef xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
- SfxMedium* pWorkMed = new SfxMedium( sSourceDocumentURL, STREAM_STD_READ, TRUE );
+ SfxMedium* pWorkMed = new SfxMedium( sSourceDocumentURL, STREAM_STD_READ, sal_True );
pWorkMed->SetFilter( pSfxFlt );
if (xWorkDocSh->DoLoad(pWorkMed))
@@ -1106,10 +1106,10 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
}
// insert the document into the target document
- rWorkShell.SttEndDoc(FALSE);
- rWorkShell.SttEndDoc(TRUE);
+ rWorkShell.SttEndDoc(sal_False);
+ rWorkShell.SttEndDoc(sal_True);
rWorkShell.SelAll();
- pTargetShell->SwCrsrShell::SttEndDoc( FALSE );
+ pTargetShell->SwCrsrShell::SttEndDoc( sal_False );
//#i72517# the headers and footers are still those from the source - update in case of fields inside header/footer
if( !nDocNo && bPageStylesWithHeaderFooter )
pTargetShell->GetView().GetDocShell()->_LoadStyles( *rWorkShell.GetView().GetDocShell(), sal_True );
@@ -1163,7 +1163,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
String sFileURL = aTempFileURL.GetMainURL( INetURLObject::NO_DECODE );
SfxMedium* pDstMed = new SfxMedium(
sFileURL,
- STREAM_STD_READWRITE, TRUE );
+ STREAM_STD_READWRITE, sal_True );
pDstMed->SetFilter( pStoreToFilter );
if(pDstMed->GetItemSet())
{
@@ -1183,8 +1183,8 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
// error message ??
ErrorHandler::HandleError( xWorkDocSh->GetError() );
- bCancel = TRUE;
- bLoop = FALSE;
+ bCancel = sal_True;
+ bLoop = sal_False;
}
if( bEMail )
{
@@ -1221,7 +1221,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
{
//read in the temporary file and use it as mail body
- SfxMedium aMedium( sFileURL, STREAM_READ, TRUE);
+ SfxMedium aMedium( sFileURL, STREAM_READ, sal_True);
SvStream* pInStream = aMedium.GetInStream();
DBG_ASSERT(pInStream, "no output file created?");
if(pInStream)
@@ -1275,7 +1275,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
} while( !bCancel &&
(bSynchronizedDoc && (nStartRow != nEndRow)? ExistsNextRecord() : ToNextMergeRecord()));
- aPrtMonDlg.Show( FALSE );
+ aPrtMonDlg.Show( sal_False );
// save the single output document
if(rMergeDescriptor.bCreateSingleFile || bAsSingleFile)
@@ -1286,7 +1286,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
INetURLObject aTempFileURL(bAsSingleFile ? sSubject : aTempFile->GetURL());
SfxMedium* pDstMed = new SfxMedium(
aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ),
- STREAM_STD_READWRITE, TRUE );
+ STREAM_STD_READWRITE, sal_True );
pDstMed->SetFilter( pStoreToFilter );
if(pDstMed->GetItemSet())
{
@@ -1302,7 +1302,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
// error message ??
ErrorHandler::HandleError( xTargetDocShell->GetError() );
- bLoop = FALSE;
+ bLoop = sal_False;
}
}
else if( pTargetView ) // must be available!
@@ -1329,7 +1329,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
aOptions.realloc( nOpts + 1 );
aOptions[ nOpts ].Name = rtl::OUString::createFromAscii( "Wait" );
aOptions[ nOpts ].Value <<= sal_True ;
-// aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, TRUE) );
+// aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, sal_True) );
// // #i52629# aynchronous printing should only be done in silent mode - otherwise
// // the printer dialog does not come up
// aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, rMergeDescriptor.bPrintAsync ));
@@ -1371,7 +1371,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
pViewFrm = SfxViewFrame::GetFirst(pSourrceDocSh);
while (pViewFrm)
{
- pViewFrm->GetDispatcher()->Lock(FALSE);
+ pViewFrm->GetDispatcher()->Lock(sal_False);
pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourrceDocSh);
}
@@ -1398,7 +1398,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
IMPL_LINK_INLINE_START( SwNewDBMgr, PrtCancelHdl, Button *, pButton )
{
pButton->GetParent()->Hide();
- bCancel = TRUE;
+ bCancel = sal_True;
return 0;
}
IMPL_LINK_INLINE_END( SwNewDBMgr, PrtCancelHdl, Button *, pButton )
@@ -1409,13 +1409,13 @@ IMPL_LINK_INLINE_END( SwNewDBMgr, PrtCancelHdl, Button *, pButton )
den uebergebenen Formatter uebertragen
--------------------------------------------------------------------*/
-ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
+sal_uLong SwNewDBMgr::GetColumnFmt( const String& rDBName,
const String& rTableName,
const String& rColNm,
SvNumberFormatter* pNFmtr,
long nLanguage )
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if(pNFmtr)
{
uno::Reference< XDataSource> xSource;
@@ -1437,7 +1437,7 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
aData.sDataSource = rDBName;
aData.sCommand = rTableName;
aData.nCommandType = -1;
- SwDSParam* pParam = FindDSData(aData, FALSE);
+ SwDSParam* pParam = FindDSData(aData, sal_False);
if(pParam && pParam->xConnection.is())
{
xConnection = pParam->xConnection;
@@ -1491,14 +1491,14 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
/* -----------------------------07.06.01 15:43--------------------------------
---------------------------------------------------------------------------*/
-ULONG SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource,
+sal_uLong SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource,
uno::Reference< XConnection> xConnection,
uno::Reference< XPropertySet> xColumn,
SvNumberFormatter* pNFmtr,
long nLanguage )
{
//JP 12.01.99: ggfs. das NumberFormat im Doc setzen
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if(!xSource.is())
{
@@ -1584,7 +1584,7 @@ sal_Int32 SwNewDBMgr::GetColumnType( const String& rDBName,
aData.sDataSource = rDBName;
aData.sCommand = rTableName;
aData.nCommandType = -1;
- SwDSParam* pParam = FindDSData(aData, FALSE);
+ SwDSParam* pParam = FindDSData(aData, sal_False);
uno::Reference< XConnection> xConnection;
uno::Reference< XColumnsSupplier > xColsSupp;
bool bDispose = false;
@@ -1648,7 +1648,7 @@ uno::Reference< sdbc::XConnection> SwNewDBMgr::GetConnection(const String& rData
---------------------------------------------------------------------------*/
uno::Reference< sdbcx::XColumnsSupplier> SwNewDBMgr::GetColumnSupplier(uno::Reference<sdbc::XConnection> xConnection,
const String& rTableOrQuery,
- BYTE eTableOrQuery)
+ sal_uInt8 eTableOrQuery)
{
Reference< sdbcx::XColumnsSupplier> xRet;
try
@@ -1794,14 +1794,14 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps,
void SwNewDBMgr::EndMerge()
{
DBG_ASSERT(bInMerge, "merge is not active");
- bInMerge = FALSE;
+ bInMerge = sal_False;
delete pImpl->pMergeData;
pImpl->pMergeData = 0;
}
/* -----------------------------06.07.00 14:28--------------------------------
checks if a desired data source table or query is open
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
+sal_Bool SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
const String& rTableOrQuery, sal_Bool bMergeOnly)
{
if(pImpl->pMergeData)
@@ -1819,7 +1819,7 @@ BOOL SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
aData.sDataSource = rDataSource;
aData.sCommand = rTableOrQuery;
aData.nCommandType = -1;
- SwDSParam* pFound = FindDSData(aData, FALSE);
+ SwDSParam* pFound = FindDSData(aData, sal_False);
return (pFound && pFound->xResultSet.is());
}
return sal_False;
@@ -1827,12 +1827,12 @@ BOOL SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
/* -----------------------------17.07.00 16:44--------------------------------
read column data a a specified position
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableName,
+sal_Bool SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableName,
const String& rColumnName, sal_uInt32 nAbsRecordId,
long nLanguage,
String& rResult, double* pNumber)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwDSParam* pFound = 0;
//check if it's the merge data source
if(pImpl->pMergeData &&
@@ -1847,7 +1847,7 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam
aData.sDataSource = rSourceName;
aData.sCommand = rTableName;
aData.nCommandType = -1;
- pFound = FindDSData(aData, FALSE);
+ pFound = FindDSData(aData, sal_False);
}
//check validity of supplied record Id
if(pFound->aSelection.getLength())
@@ -1863,7 +1863,7 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam
bFound = sal_True;
}
if(!bFound)
- return FALSE;
+ return sal_False;
}
if(pFound && pFound->xResultSet.is() && !pFound->bAfterSelection)
{
@@ -1874,10 +1874,10 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam
}
catch(const Exception& )
{
- return FALSE;
+ return sal_False;
}
//position to the desired index
- BOOL bMove = TRUE;
+ sal_Bool bMove = sal_True;
if ( nOldRow != static_cast<sal_Int32>(nAbsRecordId) )
bMove = lcl_MoveAbsolute(pFound, nAbsRecordId);
if(bMove)
@@ -1892,22 +1892,22 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam
/* -----------------------------06.07.00 16:47--------------------------------
reads the column data at the current position
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, USHORT nLanguage,
+sal_Bool SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, sal_uInt16 nLanguage,
String &rResult, double *pNumber, sal_uInt32 * /*pFormat*/)
{
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is() || pImpl->pMergeData->bAfterSelection )
{
rResult.Erase();
- return FALSE;
+ return sal_False;
}
- BOOL bRet = lcl_GetColumnCnt(pImpl->pMergeData, rColumnName, nLanguage, rResult, pNumber);
+ sal_Bool bRet = lcl_GetColumnCnt(pImpl->pMergeData, rColumnName, nLanguage, rResult, pNumber);
return bRet;
}
/* -----------------------------07.07.00 14:28--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::ToNextMergeRecord()
+sal_Bool SwNewDBMgr::ToNextMergeRecord()
{
DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
return ToNextRecord(pImpl->pMergeData);
@@ -1915,7 +1915,7 @@ BOOL SwNewDBMgr::ToNextMergeRecord()
/* -----------------------------10.07.01 14:28--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::ToNextRecord(
+sal_Bool SwNewDBMgr::ToNextRecord(
const String& rDataSource, const String& rCommand, sal_Int32 /*nCommandType*/)
{
SwDSParam* pFound = 0;
@@ -1929,22 +1929,22 @@ BOOL SwNewDBMgr::ToNextRecord(
aData.sDataSource = rDataSource;
aData.sCommand = rCommand;
aData.nCommandType = -1;
- pFound = FindDSData(aData, FALSE);
+ pFound = FindDSData(aData, sal_False);
}
return ToNextRecord(pFound);
}
/* -----------------------------10.07.01 14:38--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
+sal_Bool SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if(!pParam || !pParam->xResultSet.is() || pParam->bEndOfDB ||
(pParam->aSelection.getLength() && pParam->aSelection.getLength() <= pParam->nSelectionIndex))
{
if(pParam)
pParam->CheckEndOfDB();
- return FALSE;
+ return sal_False;
}
try
{
@@ -1956,7 +1956,7 @@ BOOL SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
pParam->CheckEndOfDB();
bRet = !pParam->bEndOfDB;
if(pParam->nSelectionIndex >= pParam->aSelection.getLength())
- pParam->bEndOfDB = TRUE;
+ pParam->bEndOfDB = sal_True;
}
else
{
@@ -1984,7 +1984,7 @@ BOOL SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
to assure that the next page can be created in mail merge
the cursor position must be validated
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::ExistsNextRecord() const
+sal_Bool SwNewDBMgr::ExistsNextRecord() const
{
return pImpl->pMergeData && !pImpl->pMergeData->bEndOfDB;
}
@@ -1996,7 +1996,7 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId()
sal_uInt32 nRet = 0;
DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is())
- return FALSE;
+ return sal_False;
try
{
nRet = pImpl->pMergeData->xResultSet->getRow();
@@ -2013,8 +2013,8 @@ sal_Bool SwNewDBMgr::ToRecordId(sal_Int32 nSet)
{
DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is()|| nSet < 0)
- return FALSE;
- sal_Bool bRet = FALSE;
+ return sal_False;
+ sal_Bool bRet = sal_False;
sal_Int32 nAbsPos = nSet;
if(nAbsPos >= 0)
@@ -2029,7 +2029,7 @@ sal_Bool SwNewDBMgr::ToRecordId(sal_Int32 nSet)
/* -----------------------------17.07.00 14:17--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
+sal_Bool SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
sal_Int32 nCommandType, bool bCreate)
{
SwDBData aData;
@@ -2037,11 +2037,11 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO
aData.sCommand = rTableOrQuery;
aData.nCommandType = nCommandType;
- SwDSParam* pFound = FindDSData(aData, TRUE);
+ SwDSParam* pFound = FindDSData(aData, sal_True);
uno::Reference< XDataSource> xSource;
if(pFound->xResultSet.is())
- return TRUE;
- SwDSParam* pParam = FindDSConnection(rDataSource, FALSE);
+ return sal_True;
+ SwDSParam* pParam = FindDSConnection(rDataSource, sal_False);
uno::Reference< XConnection> xConnection;
if(pParam && pParam->xConnection.is())
pFound->xConnection = pParam->xConnection;
@@ -2063,7 +2063,7 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO
catch(Exception&)
{
//#98373# DB driver may not be ODBC 3.0 compliant
- pFound->bScrollable = TRUE;
+ pFound->bScrollable = sal_True;
}
pFound->xStatement = pFound->xConnection->createStatement();
rtl::OUString aQuoteChar = xMetaData->getIdentifierQuoteString();
@@ -2094,7 +2094,7 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO
---------------------------------------------------------------------------*/
uno::Reference< XConnection> SwNewDBMgr::RegisterConnection(rtl::OUString& rDataSource)
{
- SwDSParam* pFound = SwNewDBMgr::FindDSConnection(rDataSource, TRUE);
+ SwDSParam* pFound = SwNewDBMgr::FindDSConnection(rDataSource, sal_True);
uno::Reference< XDataSource> xSource;
if(!pFound->xConnection.is())
{
@@ -2130,7 +2130,7 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId(
aData.sDataSource = rDataSource;
aData.sCommand = rTableOrQuery;
aData.nCommandType = nCommandType;
- SwDSParam* pFound = FindDSData(aData, FALSE);
+ SwDSParam* pFound = FindDSData(aData, sal_False);
if(pFound && pFound->xResultSet.is())
{
try
@@ -2155,11 +2155,11 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId(
/* -----------------------------17.07.00 14:18--------------------------------
close all data sources - after fields were updated
---------------------------------------------------------------------------*/
-void SwNewDBMgr::CloseAll(BOOL bIncludingMerge)
+void SwNewDBMgr::CloseAll(sal_Bool bIncludingMerge)
{
//the only thing done here is to reset the selection index
//all connections stay open
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
{
SwDSParam* pParam = aDataSourceParams[nPos];
if(bIncludingMerge || pParam != pImpl->pMergeData)
@@ -2180,7 +2180,7 @@ void SwNewDBMgr::CloseAll(BOOL bIncludingMerge)
/* -----------------------------17.07.00 14:54--------------------------------
---------------------------------------------------------------------------*/
-SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate)
+SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, sal_Bool bCreate)
{
//prefer merge data if available
if(pImpl->pMergeData && rData.sDataSource == pImpl->pMergeData->sDataSource &&
@@ -2192,7 +2192,7 @@ SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate)
}
SwDSParam* pFound = 0;
- for(USHORT nPos = aDataSourceParams.Count(); nPos; nPos--)
+ for(sal_uInt16 nPos = aDataSourceParams.Count(); nPos; nPos--)
{
SwDSParam* pParam = aDataSourceParams[nPos - 1];
if(rData.sDataSource == pParam->sDataSource &&
@@ -2232,7 +2232,7 @@ SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate)
---------------------------------------------------------------------------*/
-SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, BOOL bCreate)
+SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, sal_Bool bCreate)
{
//prefer merge data if available
if(pImpl->pMergeData && rDataSource == pImpl->pMergeData->sDataSource )
@@ -2240,7 +2240,7 @@ SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, BOOL
return pImpl->pMergeData;
}
SwDSParam* pFound = 0;
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
{
SwDSParam* pParam = aDataSourceParams[nPos];
if(rDataSource == pParam->sDataSource)
@@ -2491,7 +2491,7 @@ String SwNewDBMgr::LoadAndRegisterDataSource()
---------------------------------------------------------------------------*/
void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
const Sequence<PropertyValue>& rProperties,
- BOOL bWithDataSourceBrowser)
+ sal_Bool bWithDataSourceBrowser)
{
//prevent second call
if(pImpl->pMergeDialog)
@@ -2523,7 +2523,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
if(!xConnection.is())
{
xConnection = SwNewDBMgr::RegisterConnection(sDataSource);
- pFound = FindDSConnection(sDataSource, TRUE);
+ pFound = FindDSConnection(sDataSource, sal_True);
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
@@ -2574,7 +2574,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
else
{
SfxObjectShellRef xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
- SfxMedium* pWorkMed = new SfxMedium( sTempURL, STREAM_STD_READ, TRUE );
+ SfxMedium* pWorkMed = new SfxMedium( sTempURL, STREAM_STD_READ, sal_True );
pWorkMed->SetFilter( pSfxFlt );
if( xWorkDocSh->DoLoad(pWorkMed) )
{
@@ -2619,7 +2619,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
}
if(pFound)
{
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
{
SwDSParam* pParam = aDataSourceParams[nPos];
if(pParam == pFound)
@@ -2651,7 +2651,7 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh,
rtl::OUString sDataSource, sDataTableOrQuery;
uno::Reference<XResultSet> xResSet;
Sequence<Any> aSelection;
- BOOL bHasSelectionProperty = FALSE;
+ sal_Bool bHasSelectionProperty = sal_False;
sal_Int32 nSelectionPos = 0;
sal_Int16 nCmdType = CommandType::TABLE;
const PropertyValue* pValues = rProperties.getConstArray();
@@ -2666,7 +2666,7 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh,
pValues[nPos].Value >>= xResSet;
else if(pValues[nPos].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(cSelection)))
{
- bHasSelectionProperty = TRUE;
+ bHasSelectionProperty = sal_True;
nSelectionPos = nPos;
pValues[nPos].Value >>= aSelection;
}
@@ -2812,7 +2812,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
uno::Reference< XResultSet> xResultSet = rMMConfig.GetResultSet();
if(!xResultSet.is())
return false;
- bInMerge = TRUE;
+ bInMerge = sal_True;
sal_Int32 nRet = 0;
pImpl->pMergeData = new SwDSParam(
rMMConfig.GetCurrentDBData(), xResultSet, rMMConfig.GetSelection());
@@ -2826,7 +2826,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
pImpl->pMergeData->bEndOfDB = !pImpl->pMergeData->xResultSet->absolute( nPos );
pImpl->pMergeData->CheckEndOfDB();
if(pImpl->pMergeData->nSelectionIndex >= pImpl->pMergeData->aSelection.getLength())
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
}
else
{
@@ -2836,13 +2836,13 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
catch(Exception&)
{
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
pImpl->pMergeData->CheckEndOfDB();
DBG_ERROR("exception in MergeNew()");
}
//bCancel is set from the PrintMonitor
- bCancel = FALSE;
+ bCancel = sal_False;
CreateMonitor aMonitorDlg(&rSourceView.GetEditWin());
aMonitorDlg.SetCancelHdl(LINK(this, SwNewDBMgr, PrtCancelHdl));
@@ -2852,15 +2852,15 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
aMonitorDlg.Invalidate();
aMonitorDlg.Update();
// the print monitor needs some time to act
- for( USHORT i = 0; i < 25; i++)
+ for( sal_uInt16 i = 0; i < 25; i++)
Application::Reschedule();
}
SwWrtShell& rSourceShell = rSourceView.GetWrtShell();
- BOOL bSynchronizedDoc = rSourceShell.IsLabelDoc() && rSourceShell.GetSectionFmtCount() > 1;
+ sal_Bool bSynchronizedDoc = rSourceShell.IsLabelDoc() && rSourceShell.GetSectionFmtCount() > 1;
//save the settings of the first
- rSourceShell.SttEndDoc(TRUE);
- USHORT nStartingPageNo = rSourceShell.GetVirtPageNum();
+ rSourceShell.SttEndDoc(sal_True);
+ sal_uInt16 nStartingPageNo = rSourceShell.GetVirtPageNum();
String sModifiedStartingPageDesc;
String sStartingPageDesc = sModifiedStartingPageDesc = rSourceShell.GetPageDesc(
rSourceShell.GetCurPageDesc()).GetName();
@@ -2897,7 +2897,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
long nStartRow, nEndRow;
- ULONG nDocNo = 1;
+ sal_uLong nDocNo = 1;
sal_Int32 nDocCount = 0;
if( !IsMergeSilent() && lcl_getCountFromResultSet( nDocCount, pImpl->pMergeData->xResultSet ) )
aMonitorDlg.SetTotalCount( nDocCount );
@@ -2911,7 +2911,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
aMonitorDlg.Invalidate();
aMonitorDlg.Update();
// the print monitor needs some time to act
- for( USHORT i = 0; i < 25; i++)
+ for( sal_uInt16 i = 0; i < 25; i++)
Application::Reschedule();
}
@@ -2959,10 +2959,10 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
// insert the document into the target document
- rWorkShell.SttEndDoc(FALSE);
- rWorkShell.SttEndDoc(TRUE);
+ rWorkShell.SttEndDoc(sal_False);
+ rWorkShell.SttEndDoc(sal_True);
rWorkShell.SelAll();
- pTargetShell->SttEndDoc(FALSE);
+ pTargetShell->SttEndDoc(sal_False);
//#i63806# put the styles to the target document
//if the source uses headers or footers each new copy need to copy a new page styles
@@ -2996,7 +2996,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
{
pTargetShell->SetPageStyle(sModifiedStartingPageDesc);
}
- USHORT nPageCountBefore = pTargetShell->GetPageCnt();
+ sal_uInt16 nPageCountBefore = pTargetShell->GetPageCnt();
DBG_ASSERT(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended");
//#i51359# add a second paragraph in case there's only one
{
@@ -3027,7 +3027,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
++nRet;
// the print monitor needs some time to act
- for( USHORT i = 0; i < 25; i++)
+ for( sal_uInt16 i = 0; i < 25; i++)
Application::Reschedule();
//restore the ole DBMgr
@@ -3058,7 +3058,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
DBG_ERROR("exception caught in SwNewDBMgr::MergeDocuments");
}
DELETEZ(pImpl->pMergeData);
- bInMerge = FALSE;
+ bInMerge = sal_False;
return nRet;
}
/* -----------------09.12.2002 12:38-----------------
@@ -3080,7 +3080,7 @@ void SwConnectionDisposedListener_Impl::disposing( const EventObject& rSource )
{
::vos::OGuard aGuard(Application::GetSolarMutex());
uno::Reference<XConnection> xSource(rSource.Source, UNO_QUERY);
- for(USHORT nPos = rDBMgr.aDataSourceParams.Count(); nPos; nPos--)
+ for(sal_uInt16 nPos = rDBMgr.aDataSourceParams.Count(); nPos; nPos--)
{
SwDSParam* pParam = rDBMgr.aDataSourceParams[nPos - 1];
if(pParam->xConnection.is() &&
diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx
index 83259add5238..f2080f822547 100644
--- a/sw/source/ui/dbui/dbtree.cxx
+++ b/sw/source/ui/dbui/dbtree.cxx
@@ -110,7 +110,7 @@ class SwDBTreeList_Impl : public cppu::WeakImplHelper1 < XContainerListener >
virtual void SAL_CALL elementReplaced( const ContainerEvent& Event ) throw (RuntimeException);
virtual void SAL_CALL disposing( const EventObject& Source ) throw (RuntimeException);
- BOOL HasContext();
+ sal_Bool HasContext();
SwWrtShell* GetWrtShell() { return pWrtSh;}
void SetWrtShell(SwWrtShell& rSh) { pWrtSh = &rSh;}
Reference< XNameAccess > GetContext() {return xDBContext;}
@@ -148,7 +148,7 @@ void SwDBTreeList_Impl::elementRemoved( const ContainerEvent& rEvent ) throw (Ru
vos::OGuard aGuard(Application::GetSolarMutex());
::rtl::OUString sSource;
rEvent.Accessor >>= sSource;
- for(USHORT i = 0; i < aConnections.Count(); i++)
+ for(sal_uInt16 i = 0; i < aConnections.Count(); i++)
{
SwConnectionDataPtr pPtr = aConnections[i];
if(pPtr->sSourceName == sSource)
@@ -179,7 +179,7 @@ void SwDBTreeList_Impl::elementReplaced( const ContainerEvent& rEvent ) throw (R
/* -----------------------------17.07.01 13:24--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwDBTreeList_Impl::HasContext()
+sal_Bool SwDBTreeList_Impl::HasContext()
{
if(!xDBContext.is())
{
@@ -203,7 +203,7 @@ BOOL SwDBTreeList_Impl::HasContext()
Reference<XConnection> SwDBTreeList_Impl::GetConnection(const rtl::OUString& rSourceName)
{
Reference<XConnection> xRet;
- for(USHORT i = 0; i < aConnections.Count(); i++)
+ for(sal_uInt16 i = 0; i < aConnections.Count(); i++)
{
SwConnectionDataPtr pPtr = aConnections[i];
if(pPtr->sSourceName == rSourceName)
@@ -226,13 +226,13 @@ Reference<XConnection> SwDBTreeList_Impl::GetConnection(const rtl::OUString& rS
------------------------------------------------------------------------*/
SwDBTreeList::SwDBTreeList(Window *pParent, const ResId& rResId,
SwWrtShell* pSh,
- const String& rDefDBName, const BOOL bShowCol):
+ const String& rDefDBName, const sal_Bool bShowCol):
SvTreeListBox (pParent, rResId),
aImageList (SW_RES(ILIST_DB_DLG )),
aImageListHC (SW_RES(ILIST_DB_DLG_HC )),
sDefDBName (rDefDBName),
- bInitialized (FALSE),
+ bInitialized (sal_False),
bShowColumns (bShowCol),
pImpl(new SwDBTreeList_Impl(pSh))
{
@@ -281,7 +281,7 @@ void SwDBTreeList::InitTreeList()
for(long i = 0; i < nCount; i++)
{
String sDBName(pDBNames[i]);
- SvLBoxEntry* pEntry = InsertEntry(sDBName, aImg, aImg, NULL, TRUE);
+ SvLBoxEntry* pEntry = InsertEntry(sDBName, aImg, aImg, NULL, sal_True);
SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
}
@@ -291,7 +291,7 @@ void SwDBTreeList::InitTreeList()
Select(sDBName, sTableName, sColumnName);
- bInitialized = TRUE;
+ bInitialized = sal_True;
}
/*-- 27.05.2004 09:19:09---------------------------------------------------
@@ -300,7 +300,7 @@ void SwDBTreeList::AddDataSource(const String& rSource)
{
Image aImg = aImageList.GetImage(IMG_DB);
Image aHCImg = aImageListHC.GetImage(IMG_DB);
- SvLBoxEntry* pEntry = InsertEntry(rSource, aImg, aImg, NULL, TRUE);
+ SvLBoxEntry* pEntry = InsertEntry(rSource, aImg, aImg, NULL, sal_True);
SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
SvTreeListBox::Select(pEntry);
@@ -309,7 +309,7 @@ void SwDBTreeList::AddDataSource(const String& rSource)
Beschreibung:
------------------------------------------------------------------------*/
-void SwDBTreeList::ShowColumns(BOOL bShowCol)
+void SwDBTreeList::ShowColumns(sal_Bool bShowCol)
{
if (bShowCol != bShowColumns)
{
@@ -317,7 +317,7 @@ void SwDBTreeList::ShowColumns(BOOL bShowCol)
String sTableName, sColumnName;
String sDBName(GetDBName(sTableName, sColumnName));
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
SvLBoxEntry* pEntry = First();
@@ -337,7 +337,7 @@ void SwDBTreeList::ShowColumns(BOOL bShowCol)
{
Select(sDBName, sTableName, sColumnName); // force RequestingChilds
}
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
}
}
@@ -360,7 +360,7 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
if(!pImpl->GetContext()->hasByName(sSourceName))
return;
Reference<XConnection> xConnection = pImpl->GetConnection(sSourceName);
- BOOL bTable = pParent->GetUserData() == 0;
+ sal_Bool bTable = pParent->GetUserData() == 0;
Reference<XColumnsSupplier> xColsSupplier;
if(bTable)
{
@@ -496,7 +496,7 @@ IMPL_LINK( SwDBTreeList, DBCompare, SvSortData*, pData )
Beschreibung:
------------------------------------------------------------------------*/
-String SwDBTreeList::GetDBName(String& rTableName, String& rColumnName, BOOL* pbIsTable)
+String SwDBTreeList::GetDBName(String& rTableName, String& rColumnName, sal_Bool* pbIsTable)
{
String sDBName;
SvLBoxEntry* pEntry = FirstSelected();
@@ -527,8 +527,8 @@ void SwDBTreeList::Select(const String& rDBName, const String& rTableName, const
{
SvLBoxEntry* pParent;
SvLBoxEntry* pChild;
- USHORT nParent = 0;
- USHORT nChild = 0;
+ sal_uInt16 nParent = 0;
+ sal_uInt16 nChild = 0;
while ((pParent = GetEntry(nParent++)) != NULL)
{
diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx
index 06d7dffab0ed..276f7850f91e 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.cxx
+++ b/sw/source/ui/dbui/mailmergechildwindow.cxx
@@ -64,7 +64,7 @@ SFX_IMPL_FLOATINGWINDOW( SwMailMergeChildWindow, FN_MAILMERGE_CHILDWINDOW )
------------------------------------------------------------------------*/
SwMailMergeChildWindow::SwMailMergeChildWindow( Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( _pParent, nId )
@@ -781,7 +781,7 @@ void SwSendMailDialog::UpdateTransferStatus()
m_aErrorStatusFT.SetText(sStatus);
if(m_pImpl->aDescriptors.size())
- m_aProgressBar.SetValue((USHORT)(m_nSendCount * 100 / m_pImpl->aDescriptors.size()));
+ m_aProgressBar.SetValue((sal_uInt16)(m_nSendCount * 100 / m_pImpl->aDescriptors.size()));
else
m_aProgressBar.SetValue(0);
}
diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx
index 7cc5d4070891..63f4adae3895 100644
--- a/sw/source/ui/dbui/mailmergehelper.cxx
+++ b/sw/source/ui/dbui/mailmergehelper.cxx
@@ -271,7 +271,7 @@ void SwAddressPreview::SetAddress(const ::rtl::OUString& rAddress)
{
pImpl->aAdresses.clear();
pImpl->aAdresses.push_back(rAddress);
- aVScrollBar.Show(FALSE);
+ aVScrollBar.Show(sal_False);
Invalidate();
}
/*-- 27.04.2004 14:01:23---------------------------------------------------
@@ -436,7 +436,7 @@ void SwAddressPreview::MouseButtonDown( const MouseEvent& rMEvt )
-----------------------------------------------------------------------*/
void SwAddressPreview::KeyInput( const KeyEvent& rKEvt )
{
- USHORT nKey = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode();
if(pImpl->nRows || pImpl->nColumns)
{
sal_uInt32 nSelectedRow = (pImpl->nSelectedAddress + 1)/ pImpl->nColumns;
@@ -555,7 +555,7 @@ String SwAddressPreview::FillData(
//find the appropriate assignment
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rDefHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -805,7 +805,7 @@ uno::Any SwMailTransferable::getTransferData( const datatransfer::DataFlavor& /*
else
{
Sequence<sal_Int8> aData;
- SfxMedium aMedium( m_aURL, STREAM_STD_READ, FALSE );
+ SfxMedium aMedium( m_aURL, STREAM_STD_READ, sal_False );
SvStream* pStream = aMedium.GetInStream();
if ( aMedium.GetErrorCode() == ERRCODE_NONE && pStream)
{
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 1c45831e97e2..f56da53ceeb2 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -321,16 +321,16 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton
}
else
{
- BOOL bNext = pButton == &m_aNextSetIB;
+ sal_Bool bNext = pButton == &m_aNextSetIB;
sal_Int32 nPos = rConfig.GetResultSetPosition();
rConfig.MoveResultSet( bNext ? ++nPos : --nPos);
}
m_pWizard->LeaveWait();
sal_Int32 nPos = rConfig.GetResultSetPosition();
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if(nPos < 1)
{
- bEnable = FALSE;
+ bEnable = sal_False;
nPos = 1;
}
else
@@ -557,12 +557,12 @@ SwRestrictedComboBox::~SwRestrictedComboBox()
---------------------------------------------------------------------------*/
void SwRestrictedComboBox::KeyInput(const KeyEvent& rEvt)
{
- BOOL bCallParent = TRUE;
+ sal_Bool bCallParent = sal_True;
if(rEvt.GetCharCode())
{
String sKey = rEvt.GetCharCode();
if( STRING_NOTFOUND != sForbiddenChars.Search(sKey))
- bCallParent = FALSE;
+ bCallParent = sal_False;
}
if(bCallParent)
ComboBox::KeyInput(rEvt);
@@ -574,11 +574,11 @@ void SwRestrictedComboBox::Modify()
{
Selection aSel = GetSelection();
String sTemp = GetText();
- for(USHORT i = 0; i < sForbiddenChars.Len(); i++)
+ for(sal_uInt16 i = 0; i < sForbiddenChars.Len(); i++)
{
sTemp.EraseAllChars( sForbiddenChars.GetChar(i) );
}
- USHORT nDiff = GetText().Len() - sTemp.Len();
+ sal_uInt16 nDiff = GetText().Len() - sTemp.Len();
if(nDiff)
{
aSel.setMin(aSel.getMin() - nDiff);
@@ -672,7 +672,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
}
FreeResource();
const ResStringArray& rHeaders = m_rConfigItem.GetDefaultAddressHeaders();
- for(USHORT i = 0; i < rHeaders.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i)
{
const XubString& rHeader = rHeaders.GetString( i );
SvLBoxEntry* pEntry = m_aAddressElementsLB.InsertEntry(rHeader);
@@ -772,7 +772,7 @@ sal_Int32 SwCustomizeAddressBlockDialog::GetSelectedItem_Impl()
sal_Int32 nRet = USER_DATA_NONE;
String sSelected = m_aDragED.GetCurrentItem();
if(sSelected.Len())
- for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
+ for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
{
SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i);
String sEntry = m_aAddressElementsLB.GetEntryText(pEntry);
@@ -791,7 +791,7 @@ bool SwCustomizeAddressBlockDialog::HasItem_Impl(sal_Int32 nUserData)
{
//get the entry from the ListBox
String sEntry;
- for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
+ for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
{
SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i);
if((sal_Int32)(sal_IntPtr)pEntry->GetUserData() == nUserData)
@@ -921,7 +921,7 @@ void SwCustomizeAddressBlockDialog::SetAddress(const ::rtl::OUString& rAddress)
//remove placeholders by the actual content
if(m_aFieldFT.IsVisible())
{
- for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
+ for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
{
SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i);
String sEntry = m_aAddressElementsLB.GetEntryText(pEntry);
@@ -1117,7 +1117,7 @@ SwAssignFieldsControl::SwAssignFieldsControl(
};
//fill the controls
- for(USHORT i = 0; i < rHeaders.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i)
{
const XubString& rHeader = rHeaders.GetString( i );
FixedInfo* pNewText = new FixedInfo(&m_aWindow, ResId( FT_FIELDS, *rResId.GetResMgr()));
@@ -1231,7 +1231,7 @@ long SwAssignFieldsControl::PreNotify( NotifyEvent& rNEvt )
if(rNEvt.GetType() == EVENT_COMMAND)
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- USHORT nCmd = pCEvt->GetCommand();
+ sal_uInt16 nCmd = pCEvt->GetCommand();
if( COMMAND_WHEEL == nCmd )
{
Command(*pCEvt);
@@ -1267,7 +1267,7 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll)
// The first line has to be -(nThumb * m_nYOffset) in the negative
long nMove = m_nFirstYPos - (*m_aMatches.begin())->GetPosPixel().Y() - (nThumb * m_nYOffset);
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
long nIndex;
::std::vector<FixedInfo*>::iterator aFIIter;
for(nIndex = 0, aFIIter = m_aFieldNames.begin(); aFIIter != m_aFieldNames.end(); ++aFIIter, ++nIndex)
@@ -1277,7 +1277,7 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll)
lcl_Move(*aLBIter, nMove);
for(nIndex = 0, aFIIter = m_aPreviews.begin(); aFIIter != m_aPreviews.end(); ++aFIIter, ++nIndex)
lcl_Move(*aFIIter, nMove);
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
return 0;
}
@@ -1458,7 +1458,7 @@ DDListBox::DDListBox(SwCustomizeAddressBlockDialog* pParent, const ResId rResId)
// SetSpaceBetweenEntries(3);
SetSelectionMode( SINGLE_SELECTION );
SetDragDropMode( SV_DRAGDROP_CTRL_COPY );
- EnableAsyncDrag(TRUE);
+ EnableAsyncDrag(sal_True);
SetHelpId(HID_MM_CUSTOMFIELDS);
// expand selection to the complete width of the ListBox
SetHighlightRange();
@@ -1512,7 +1512,7 @@ AddressMultiLineEdit::AddressMultiLineEdit(SwCustomizeAddressBlockDialog* pParen
GetTextView()->SupportProtectAttribute(sal_True);
StartListening(*GetTextEngine());
//DisableSelectionOnFocus();
- EnableFocusSelectionHide(FALSE);
+ EnableFocusSelectionHide(sal_False);
}
/*-- 26.05.2004 13:14:53---------------------------------------------------
@@ -1570,8 +1570,8 @@ void AddressMultiLineEdit::SetText( const String& rStr )
ExtTextEngine* pTextEngine = GetTextEngine();
TextAttribProtect aProtectAttr;
- ULONG nParaCount = pTextEngine->GetParagraphCount();
- for(ULONG nPara = 0; nPara < nParaCount; ++nPara)
+ sal_uLong nParaCount = pTextEngine->GetParagraphCount();
+ for(sal_uLong nPara = 0; nPara < nParaCount; ++nPara)
{
xub_StrLen nIndex = 0;
String sPara = pTextEngine->GetText( nPara );
@@ -1582,11 +1582,11 @@ void AddressMultiLineEdit::SetText( const String& rStr )
}
while(true)
{
- USHORT nStart = sPara.Search( '<', nIndex );
- USHORT nEnd = sPara.Search( '>', nStart );
+ sal_uInt16 nStart = sPara.Search( '<', nIndex );
+ sal_uInt16 nEnd = sPara.Search( '>', nStart );
nIndex = nEnd;
if(nStart != STRING_NOTFOUND && nEnd != STRING_NOTFOUND)
- pTextEngine->SetAttrib( aProtectAttr, nPara, nStart, nEnd + 1, FALSE );
+ pTextEngine->SetAttrib( aProtectAttr, nPara, nStart, nEnd + 1, sal_False );
else
break;
}
@@ -1614,8 +1614,8 @@ void AddressMultiLineEdit::InsertNewEntry( const String& rStr )
// insert new entry after current selected one.
ExtTextView* pTextView = GetTextView();
const TextSelection& rSelection = pTextView->GetSelection();
- ULONG nPara = rSelection.GetStart().GetPara();
- USHORT nIndex = rSelection.GetEnd().GetIndex();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
+ sal_uInt16 nIndex = rSelection.GetEnd().GetIndex();
ExtTextEngine *pTextEngine = GetTextEngine();
const TextCharAttrib *pAttrib;
if(0 != (pAttrib = pTextEngine->FindCharAttrib( rSelection.GetStart(), TEXTATTR_PROTECTED )))
@@ -1630,7 +1630,7 @@ void AddressMultiLineEdit::InsertNewEntry( const String& rStr )
Modify();
}
-void AddressMultiLineEdit::InsertNewEntryAtPosition( const String& rStr, ULONG nPara, USHORT nIndex )
+void AddressMultiLineEdit::InsertNewEntryAtPosition( const String& rStr, sal_uLong nPara, sal_uInt16 nIndex )
{
ExtTextEngine* pTextEngine = GetTextEngine();
TextPaM aInsertPos( nPara, nIndex );
@@ -1659,7 +1659,7 @@ void AddressMultiLineEdit::RemoveCurrentEntry()
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
- ULONG nPara = rSelection.GetStart().GetPara();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
pTextEngine->ReplaceText(aEntrySel, String());
//restore the attributes
@@ -1681,8 +1681,8 @@ void AddressMultiLineEdit::MoveCurrentItem(sal_uInt16 nMove)
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
//current item has been found
- ULONG nPara = rSelection.GetStart().GetPara();
- USHORT nIndex = pBeginAttrib->GetStart();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
+ sal_uInt16 nIndex = pBeginAttrib->GetStart();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
String sCurrentItem = pTextEngine->GetText(aEntrySel);
pTextEngine->RemoveAttrib( nPara, *pBeginAttrib );
@@ -1793,7 +1793,7 @@ String AddressMultiLineEdit::GetCurrentItem()
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
- ULONG nPara = rSelection.GetStart().GetPara();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
sRet = pTextEngine->GetText( aEntrySel );
}
@@ -1812,7 +1812,7 @@ void AddressMultiLineEdit::SelectCurrentItem()
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
- ULONG nPara = rSelection.GetStart().GetPara();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
pTextView->SetSelection(aEntrySel);
Invalidate();
@@ -1827,8 +1827,8 @@ String AddressMultiLineEdit::GetAddress()
{
String sRet;
ExtTextEngine* pTextEngine = GetTextEngine();
- ULONG nParaCount = pTextEngine->GetParagraphCount();
- for(ULONG nPara = nParaCount; nPara; --nPara)
+ sal_uLong nParaCount = pTextEngine->GetParagraphCount();
+ for(sal_uLong nPara = nParaCount; nPara; --nPara)
{
String sPara = pTextEngine->GetText( nPara - 1);
sPara.EraseTrailingChars(' ');
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index eddaca225e9b..b5f4a3fc87a6 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -197,7 +197,7 @@ public:
String GetAddress();
void InsertNewEntry( const String& rStr );
- void InsertNewEntryAtPosition( const String& rStr, ULONG nPara, USHORT nIndex );
+ void InsertNewEntryAtPosition( const String& rStr, sal_uLong nPara, sal_uInt16 nIndex );
void RemoveCurrentEntry();
void MoveCurrentItem(sal_uInt16 nMove);
diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx
index be1ad7d3a43d..442cb4de6e9c 100644
--- a/sw/source/ui/dbui/mmconfigitem.cxx
+++ b/sw/source/ui/dbui/mmconfigitem.cxx
@@ -426,7 +426,7 @@ void lcl_ConvertToNumbers(OUString& rBlock, const ResStringArray& rHeaders )
//convert the strings used for UI to numbers used for the configuration
String sBlock(rBlock);
sBlock.SearchAndReplaceAllAscii("\n", String::CreateFromAscii("\\n"));
- for(USHORT i = 0; i < rHeaders.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i)
{
String sHeader = rHeaders.GetString( i );
sHeader.Insert('<', 0);
@@ -1083,7 +1083,7 @@ sal_Int32 SwMailMergeConfigItem::MoveResultSet(sal_Int32 nTarget)
{
if(nTarget > 0)
{
- BOOL bMoved = m_pImpl->xResultSet->absolute(nTarget);
+ sal_Bool bMoved = m_pImpl->xResultSet->absolute(nTarget);
if(!bMoved)
{
if(nTarget > 1)
@@ -1460,7 +1460,7 @@ bool SwMailMergeConfigItem::IsAddressFieldsAssigned() const
if(aItem.bIsColumn)
{
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -1521,7 +1521,7 @@ bool SwMailMergeConfigItem::IsGreetingFieldsAssigned() const
if(aItem.bIsColumn)
{
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -1880,13 +1880,13 @@ sal_uInt32 SwMailMergeConfigItem::GetMergedDocumentCount() const
SwView* lcl_ExistsView(SwView* pView)
{
const TypeId aType(TYPE(SwView));
- SfxViewShell* pViewShell = SfxViewShell::GetFirst( &aType, FALSE );
+ SfxViewShell* pViewShell = SfxViewShell::GetFirst( &aType, sal_False );
while(pViewShell)
{
if(pViewShell == pView)
return pView;
- pViewShell = SfxViewShell::GetNext( *pViewShell, &aType, FALSE );
+ pViewShell = SfxViewShell::GetNext( *pViewShell, &aType, sal_False );
}
return 0;
}
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index e125b4f8ed2e..5aa9e7032568 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -145,7 +145,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton)
m_aLoadTemplateRB.Check();
SfxNewFileDialog* pNewFileDlg = new SfxNewFileDialog(this, 0);
//pNewFileDlg->SetTemplateFlags(nFlags);
- USHORT nRet = pNewFileDlg->Execute();
+ sal_uInt16 nRet = pNewFileDlg->Execute();
if(RET_TEMPLATE_LOAD == nRet)
bTemplate = false;
else if(RET_CANCEL != nRet)
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 7281880c593d..807d52a95f77 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -55,7 +55,7 @@ void lcl_FillGreetingsBox(ListBox& rBox,
const Sequence< ::rtl::OUString> rEntries = rConfig.GetGreetings(eType);
for(sal_Int32 nEntry = 0; nEntry < rEntries.getLength(); ++nEntry)
rBox.InsertEntry(rEntries[nEntry]);
- rBox.SelectEntryPos((USHORT)rConfig.GetCurrentGreeting(eType));
+ rBox.SelectEntryPos((sal_uInt16)rConfig.GetCurrentGreeting(eType));
}
// -----------------------------------------------------------------------
void lcl_FillGreetingsBox(ComboBox& rBox,
@@ -65,7 +65,7 @@ void lcl_FillGreetingsBox(ComboBox& rBox,
const Sequence< ::rtl::OUString> rEntries = rConfig.GetGreetings(eType);
for(sal_Int32 nEntry = 0; nEntry < rEntries.getLength(); ++nEntry)
rBox.InsertEntry(rEntries[nEntry]);
- rBox.SelectEntryPos((USHORT)rConfig.GetCurrentGreeting(eType));
+ rBox.SelectEntryPos((sal_uInt16)rConfig.GetCurrentGreeting(eType));
}
// -----------------------------------------------------------------------
void lcl_StoreGreetingsBox(ListBox& rBox,
@@ -74,7 +74,7 @@ void lcl_StoreGreetingsBox(ListBox& rBox,
{
Sequence< ::rtl::OUString> aEntries(rBox.GetEntryCount());
::rtl::OUString* pEntries = aEntries.getArray();
- for(USHORT nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
+ for(sal_uInt16 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
pEntries[nEntry] = rBox.GetEntry(nEntry);
rConfig.SetGreetings(eType, aEntries);
rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos());
@@ -86,7 +86,7 @@ void lcl_StoreGreetingsBox(ComboBox& rBox,
{
Sequence< ::rtl::OUString> aEntries(rBox.GetEntryCount());
::rtl::OUString* pEntries = aEntries.getArray();
- for(USHORT nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
+ for(sal_uInt16 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
pEntries[nEntry] = rBox.GetEntry(nEntry);
rConfig.SetGreetings(eType, aEntries);
rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos());
@@ -96,7 +96,7 @@ void lcl_StoreGreetingsBox(ComboBox& rBox,
-----------------------------------------------------------------------*/
IMPL_LINK(SwGreetingsHandler, IndividualHdl_Impl, CheckBox*, EMPTYARG)
{
- BOOL bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked();
+ sal_Bool bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked();
m_pFemaleFT->Enable(bIndividual);
m_pFemaleLB->Enable(bIndividual);
m_pFemalePB->Enable(bIndividual);
@@ -409,10 +409,10 @@ sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPage
lcl_StoreGreetingsBox(m_aFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE);
lcl_StoreGreetingsBox(m_aMaleLB, rConfig, SwMailMergeConfigItem::MALE);
- USHORT nCurrentTextPos = m_aNeutralCB.GetEntryPos( m_aNeutralCB.GetText() );
+ sal_uInt16 nCurrentTextPos = m_aNeutralCB.GetEntryPos( m_aNeutralCB.GetText() );
if(LISTBOX_ENTRY_NOTFOUND == nCurrentTextPos)
{
- USHORT nCount = m_aNeutralCB.GetEntryCount();
+ sal_uInt16 nCount = m_aNeutralCB.GetEntryCount();
m_aNeutralCB.InsertEntry( m_aNeutralCB.GetText(), nCount );
m_aNeutralCB.SelectEntryPos(nCount);
}
@@ -452,15 +452,15 @@ IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, ImageButton*, pButton)
}
else
{
- BOOL bNext = pButton == &m_aNextSetIB;
+ sal_Bool bNext = pButton == &m_aNextSetIB;
sal_Int32 nPos = rConfig.GetResultSetPosition();
rConfig.MoveResultSet( bNext ? ++nPos : --nPos);
}
sal_Int32 nPos = rConfig.GetResultSetPosition();
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if(nPos < 1)
{
- bEnable = FALSE;
+ bEnable = sal_False;
nPos = 1;
}
else
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index d9ae7b9c518f..0ef952079635 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -149,8 +149,8 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) :
m_pExampleFrame = new SwOneExampleFrame( m_aExampleWIN,
EX_SHOW_DEFAULT_PAGE, &aLink, &m_sExampleURL );
- m_aExampleWIN.Show( FALSE );
- m_aExampleContainerWIN.Show(TRUE);
+ m_aExampleWIN.Show( sal_False );
+ m_aExampleContainerWIN.Show(sal_True);
m_aLeftMF.SetValue(m_aLeftMF.Normalize(DEFAULT_LEFT_DISTANCE), FUNIT_TWIP);
m_aTopMF.SetValue(m_aTopMF.Normalize(DEFAULT_TOP_DISTANCE), FUNIT_TWIP);
@@ -236,7 +236,7 @@ void SwMailMergeLayoutPage::ActivatePage()
m_pExampleWrtShell->GotoFly( m_pAddressBlockFormat->GetName() );
m_pExampleWrtShell->DelRight();
m_pAddressBlockFormat = 0;
- m_pExampleWrtShell->Pop(FALSE);
+ m_pExampleWrtShell->Pop(sal_False);
}
else
{
@@ -380,7 +380,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame(
if(aItem.bIsColumn)
{
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -474,7 +474,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
{
//there's already text at the desired position
//go to start of the doc, directly!
- rShell.SttEndDoc(TRUE);
+ rShell.SttEndDoc(sal_True);
//and go by paragraph until the position is reached
long nYPos = rShell.GetCharRect().Top();
while(nYPos < GREETING_TOP_DISTANCE)
@@ -641,7 +641,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
{
String sDB(sDBName);
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -682,7 +682,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
{
rShell.Push();
rShell.SplitNode();
- rShell.Pop(FALSE);
+ rShell.Pop(sal_False);
}
//put the cursor to the start of the paragraph
rShell.SttPara();
@@ -694,8 +694,8 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
-----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, void*, EMPTYARG)
{
- m_aExampleWIN.Show( TRUE );
- m_aExampleContainerWIN.Show(FALSE);
+ m_aExampleWIN.Show( sal_True );
+ m_aExampleContainerWIN.Show(sal_False);
Reference< XModel > & xModel = m_pExampleFrame->GetModel();
//now the ViewOptions should be set properly
@@ -792,7 +792,7 @@ IMPL_LINK(SwMailMergeLayoutPage, ChangeAddressHdl_Impl, MetricField*, EMPTYARG)
IMPL_LINK(SwMailMergeLayoutPage, GreetingsHdl_Impl, PushButton*, pButton)
{
bool bDown = pButton == &m_aDownPB;
- BOOL bMoved = m_pExampleWrtShell->MoveParagraph( bDown ? 1 : -1 );
+ sal_Bool bMoved = m_pExampleWrtShell->MoveParagraph( bDown ? 1 : -1 );
if (bMoved || bDown)
m_pWizard->GetConfigItem().MoveGreeting(bDown ? 1 : -1 );
if(!bMoved && bDown)
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index ee2803e73aad..4a112e29b871 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -105,7 +105,7 @@ using namespace ::com::sun::star::uno;
/*-- 01.07.2004 16:47:49---------------------------------------------------
-----------------------------------------------------------------------*/
-String lcl_GetExtensionForDocType(ULONG nDocType)
+String lcl_GetExtensionForDocType(sal_uLong nDocType)
{
String sExtension;
switch( nDocType )
@@ -507,7 +507,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
&m_aSendAllRB, &m_aSendDocumentsPB,
0
};
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
Control** pControl = aControls;
do
{
@@ -603,7 +603,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
String sAttach( m_sDefaultAttachmentST );
sAttach += '.';
sAttach += lcl_GetExtensionForDocType(
- (ULONG)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos()));
+ (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos()));
m_aAttachmentED.SetText( sAttach );
}
@@ -649,7 +649,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
}
m_aFromRB.GetClickHdl().Call(m_aFromRB.IsChecked() ? &m_aFromRB : 0);
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
return 0;
}
/*-- 22.08.2005 12:15:10---------------------------------------------------
@@ -714,9 +714,9 @@ IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton)
rConfigItem.AddSavedDocument(
aURL.GetMainURL(INetURLObject::DECODE_TO_IURI));
- pButton->Enable(FALSE);
+ pButton->Enable(sal_False);
m_pWizard->enableButtons(WZB_FINISH, sal_True);
- pButton->Enable(FALSE);
+ pButton->Enable(sal_False);
}
}
@@ -869,7 +869,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
sTargetTempURL, aOpt, sal_True );
pTargetView->GetWrtShell().PastePages(pTempView->GetWrtShell(),
- (USHORT)rInfo.nStartPageInTarget, (USHORT)rInfo.nEndPageInTarget );
+ (sal_uInt16)rInfo.nStartPageInTarget, (sal_uInt16)rInfo.nEndPageInTarget );
pTargetView->GetWrtShell().EndAction();
//then save it
String sOutPath = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
@@ -987,7 +987,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG)
if(nEnd > rConfigItem.GetMergedDocumentCount())
nEnd = rConfigItem.GetMergedDocumentCount();
}
- rConfigItem.SetPrintRange( (USHORT)nBegin, (USHORT)nEnd );
+ rConfigItem.SetPrintRange( (sal_uInt16)nBegin, (sal_uInt16)nEnd );
SwDocMergeInfo& rStartInfo = rConfigItem.GetDocumentMergeInfo(nBegin);
SwDocMergeInfo& rEndInfo = rConfigItem.GetDocumentMergeInfo(nEnd - 1);
@@ -1040,7 +1040,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrinterSetupHdl_Impl, PushButton*, pButton)
-----------------------------------------------------------------------*/
IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox)
{
- ULONG nDocType = (ULONG)pBox->GetEntryData(pBox->GetSelectEntryPos());
+ sal_uLong nDocType = (sal_uLong)pBox->GetEntryData(pBox->GetSelectEntryPos());
sal_Bool bEnable = MM_DOCTYPE_HTML != nDocType && MM_DOCTYPE_TEXT != nDocType;
m_aSendAsPB.Enable( bEnable );
m_aAttachmentFT.Enable( bEnable );
@@ -1094,7 +1094,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
!SwMailMergeHelper::CheckMailAddress(rConfigItem.GetMailAddress()) )
{
QueryBox aQuery(pButton, WB_YES_NO_CANCEL, m_sConfigureMail);
- USHORT nRet = aQuery.Execute();
+ sal_uInt16 nRet = aQuery.Execute();
if(RET_YES == nRet )
{
SfxAllItemSet aSet(pTargetView->GetPool());
@@ -1126,7 +1126,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
rtl_TextEncoding eEncoding = ::gsl_getSystemTextEncoding();
SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer();
const SfxFilter *pSfxFlt = 0;
- ULONG nDocType = (ULONG)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos());
+ sal_uLong nDocType = (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos());
String sExtension = lcl_GetExtensionForDocType(nDocType);
switch( nDocType )
{
@@ -1216,7 +1216,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
++nTokenCount;
}
sAttach.SetToken( nTokenCount - 1, '.', lcl_GetExtensionForDocType(
- (ULONG)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos())));
+ (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos())));
m_aAttachmentED.SetText(sAttach);
}
else
@@ -1234,8 +1234,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
if(MM_DOCTYPE_TEXT == nDocType)
{
SwAsciiOptions aOpt;
- USHORT nAppScriptType = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
- USHORT nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType);
+ sal_uInt16 nAppScriptType = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
+ sal_uInt16 nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType);
aOpt.SetLanguage( ((SvxLanguageItem&)pTargetView->GetWrtShell().
GetDefault( nWhich )).GetLanguage());
aOpt.SetParaFlags( LINEEND_CR );
@@ -1286,7 +1286,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
pTempView->GetDocShell()->LoadStylesFromFile(
sTargetTempURL, aOpt, sal_True );
pTargetView->GetWrtShell().PastePages(pTempView->GetWrtShell(),
- (USHORT)rInfo.nStartPageInTarget, (USHORT)rInfo.nEndPageInTarget );
+ (sal_uInt16)rInfo.nStartPageInTarget, (sal_uInt16)rInfo.nEndPageInTarget );
pTargetView->GetWrtShell().EndAction();
//then save it
@@ -1333,7 +1333,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
{
{
//read in the temporary file and use it as mail body
- SfxMedium aMedium( aName.GetValue(), STREAM_READ, TRUE);
+ SfxMedium aMedium( aName.GetValue(), STREAM_READ, sal_True);
SvStream* pInStream = aMedium.GetInStream();
if(pInStream)
pInStream->SetStreamCharSet( eEncoding );
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 41f9a18a0325..5659b45bfc3d 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -113,7 +113,7 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(Window* pParent,
m_aTableLB.SetSpaceBetweenEntries(3);
m_aTableLB.SetSelectionMode( SINGLE_SELECTION );
m_aTableLB.SetDragDropMode( 0 );
- m_aTableLB.EnableAsyncDrag(FALSE);
+ m_aTableLB.EnableAsyncDrag(sal_False);
m_aPreviewPB.SetClickHdl(LINK(this, SwSelectDBTableDialog, PreviewHdl));
diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
index c9e99979e66b..3f021b3a1bc5 100644
--- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
@@ -80,7 +80,7 @@ struct SpellState
bool m_bLostFocus;
//restart and progress information
- USHORT m_SpellStartPosition;
+ sal_uInt16 m_SpellStartPosition;
bool m_bBodySpelled; //body already spelled
bool m_bOtherSpelled; //frames, footnotes, headers and footers spelled
bool m_bStartedInOther; //started the spelling insided of the _other_ area
@@ -151,7 +151,7 @@ void lcl_LeaveDrawText(SwWrtShell& rSh)
{
if(rSh.GetDrawView())
{
- rSh.GetDrawView()->SdrEndTextEdit( TRUE );
+ rSh.GetDrawView()->SdrEndTextEdit( sal_True );
Point aPt(LONG_MIN, LONG_MIN);
//go out of the frame
rSh.SelectObj(aPt, SW_LEAVE_FRAME);
@@ -164,7 +164,7 @@ void lcl_LeaveDrawText(SwWrtShell& rSh)
-----------------------------------------------------------------------*/
SwSpellDialogChildWindow::SwSpellDialogChildWindow (
Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo) :
svx::SpellDialogChildWindow (
@@ -192,7 +192,7 @@ SwSpellDialogChildWindow::~SwSpellDialogChildWindow ()
SfxChildWinInfo SwSpellDialogChildWindow::GetInfo (void) const
{
SfxChildWinInfo aInfo = svx::SpellDialogChildWindow::GetInfo();
- aInfo.bVisible = FALSE;
+ aInfo.bVisible = sal_False;
return aInfo;
}
@@ -255,7 +255,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
{
m_pSpellState->pOtherCursor = new SwPaM(*pWrtShell->GetCrsr()->GetPoint());
m_pSpellState->m_bStartedInOther = true;
- pWrtShell->SpellStart( DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_CURR, FALSE );
+ pWrtShell->SpellStart( DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_CURR, sal_False );
}
else
{
@@ -268,7 +268,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
*pWrtShell->GetDoc(),
*pCrsr->Start(), pCrsr->End());
}
- pWrtShell->SpellStart( DOCPOS_START, DOCPOS_END, DOCPOS_CURR, FALSE );
+ pWrtShell->SpellStart( DOCPOS_START, DOCPOS_END, DOCPOS_CURR, sal_False );
}
}
else
@@ -313,7 +313,7 @@ The code below would only be part of the solution.
//if there's any that has not been spelled yet
if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt())
{
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE );
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, sal_False );
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
pWrtShell->SpellEnd();
@@ -325,7 +325,7 @@ The code below would only be part of the solution.
//if no result has been found try at the body text - completely
if(!m_pSpellState->m_bBodySpelled && !aRet.size())
{
- pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE );
+ pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, sal_False );
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
m_pSpellState->m_bBodySpelled = true;
@@ -354,7 +354,7 @@ The code below would only be part of the solution.
pWrtShell->SpellEnd();
delete m_pSpellState->pOtherCursor;
m_pSpellState->pOtherCursor = 0;
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, FALSE );
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, sal_False );
pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn);
}
if(!aRet.size())
@@ -367,7 +367,7 @@ The code below would only be part of the solution.
//has the body been spelled?
if(!m_pSpellState->m_bBodySpelled)
{
- pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE );
+ pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, sal_False );
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
m_pSpellState->m_bBodySpelled = true;
@@ -380,7 +380,7 @@ The code below would only be part of the solution.
m_pSpellState->m_bBodySpelled = true;
if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt())
{
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE );
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, sal_False );
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
pWrtShell->SpellEnd();
@@ -415,7 +415,7 @@ The code below would only be part of the solution.
if(m_pSpellState->m_xStartRange.is())
{
LockFocusNotification( true );
- USHORT nRet = QueryBox( GetWindow(), SW_RES(RID_QB_SPELL_CONTINUE)).Execute();
+ sal_uInt16 nRet = QueryBox( GetWindow(), SW_RES(RID_QB_SPELL_CONTINUE)).Execute();
if(RET_YES == nRet)
{
SwUnoInternalPaM aPam(*pWrtShell->GetDoc());
@@ -583,8 +583,8 @@ void SwSpellDialogChildWindow::GetFocus()
case SHELL_MODE_TABLE_LIST_TEXT:
{
SwPaM* pCursor = pWrtShell->GetCrsr();
- if(m_pSpellState->m_pPointNode != pCursor->GetNode(TRUE) ||
- m_pSpellState->m_pMarkNode != pCursor->GetNode(FALSE)||
+ if(m_pSpellState->m_pPointNode != pCursor->GetNode(sal_True) ||
+ m_pSpellState->m_pMarkNode != pCursor->GetNode(sal_False)||
m_pSpellState->m_nPointPos != pCursor->GetPoint()->nContent.GetIndex()||
m_pSpellState->m_nMarkPos != pCursor->GetMark()->nContent.GetIndex())
bInvalidate = true;
@@ -642,8 +642,8 @@ void SwSpellDialogChildWindow::LoseFocus()
{
//store a node pointer and a pam-position to be able to check on next GetFocus();
SwPaM* pCursor = pWrtShell->GetCrsr();
- m_pSpellState->m_pPointNode = pCursor->GetNode(TRUE);
- m_pSpellState->m_pMarkNode = pCursor->GetNode(FALSE);
+ m_pSpellState->m_pPointNode = pCursor->GetNode(sal_True);
+ m_pSpellState->m_pMarkNode = pCursor->GetNode(sal_False);
m_pSpellState->m_nPointPos = pCursor->GetPoint()->nContent.GetIndex();
m_pSpellState->m_nMarkPos = pCursor->GetMark()->nContent.GetIndex();
@@ -689,7 +689,7 @@ SwWrtShell* SwSpellDialogChildWindow::GetWrtShell_Impl()
SwView* pView = 0;
if(pDispatch)
{
- USHORT nShellIdx = 0;
+ sal_uInt16 nShellIdx = 0;
SfxShell* pShell;
while(0 != (pShell = pDispatch->GetShell(nShellIdx++)))
if(pShell->ISA(SwView))
@@ -877,13 +877,13 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
{
//now the current one has to be deselected
if(pCurrentTextObj)
- pDrView->SdrEndTextEdit( TRUE );
+ pDrView->SdrEndTextEdit( sal_True );
//and the found one should be activated
rSh.MakeVisible(pTextObj->GetLogicRect());
Point aTmp( 0,0 );
rSh.SelectObj( aTmp, 0, pTextObj );
SdrPageView* pPV = pDrView->GetSdrPageView();
- rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), FALSE, TRUE );
+ rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), sal_False, sal_True );
rView.AttrChangedNotify(&rSh);
bNextDoc = true;
}
diff --git a/sw/source/ui/dialog/abstract.cxx b/sw/source/ui/dialog/abstract.cxx
index 54955c286a02..3d4de9b187dc 100644
--- a/sw/source/ui/dialog/abstract.cxx
+++ b/sw/source/ui/dialog/abstract.cxx
@@ -72,17 +72,17 @@ SwInsertAbstractDlg::~SwInsertAbstractDlg()
--------------------------------------------------*/
-BYTE SwInsertAbstractDlg::GetLevel() const
+sal_uInt8 SwInsertAbstractDlg::GetLevel() const
{
- return static_cast< BYTE >(aLevelNF.GetValue() - 1);
+ return static_cast< sal_uInt8 >(aLevelNF.GetValue() - 1);
}
/*-----------------22.02.97 15.34-------------------
--------------------------------------------------*/
-BYTE SwInsertAbstractDlg::GetPara() const
+sal_uInt8 SwInsertAbstractDlg::GetPara() const
{
- return (BYTE) aParaNF.GetValue();
+ return (sal_uInt8) aParaNF.GetValue();
}
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 355e68bd5c58..0e804d5dca9b 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -64,7 +64,7 @@ using namespace ::com::sun::star;
const sal_Unicode cDialogExtraDataClose = '}';
const char __FAR_DATA sDialogImpExtraData[] = "EncImpDlg:{";
const char __FAR_DATA sDialogExpExtraData[] = "EncExpDlg:{";
-const USHORT nDialogExtraDataLen = 11; // 12345678901
+const sal_uInt16 nDialogExtraDataLen = 11; // 12345678901
SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
SvStream* pStream )
@@ -84,7 +84,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
aCancelPB( this, SW_RES( PB_CANCEL )),
aHelpPB( this, SW_RES( PB_HELP )),
sSystemCharSet( SW_RES( STR_SYS_CHARSET )),
- bSaveLineStatus( TRUE )
+ bSaveLineStatus( sal_True )
{
FreeResource();
@@ -93,7 +93,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
const String& rFindNm = String::CreateFromAscii(
pStream ? sDialogImpExtraData
: sDialogExpExtraData);
- USHORT nEnd, nStt = GetExtraData().Search( rFindNm );
+ sal_uInt16 nEnd, nStt = GetExtraData().Search( rFindNm );
if( STRING_NOTFOUND != nStt )
{
nStt += nDialogExtraDataLen;
@@ -111,8 +111,8 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
if( pStream )
{
char aBuffer[ 4098 ];
- ULONG nOldPos = pStream->Tell();
- ULONG nBytesRead = pStream->Read( aBuffer, 4096 );
+ sal_uLong nOldPos = pStream->Tell();
+ sal_uLong nBytesRead = pStream->Read( aBuffer, 4096 );
pStream->Seek( nOldPos );
if( nBytesRead <= 4096 )
@@ -123,20 +123,20 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
aBuffer[ nBytesRead + 2 ] = '0';
}
- BOOL bCR = FALSE, bLF = FALSE, bNoNormalChar = FALSE,
- bNullChar = FALSE;
- for( USHORT nCnt = 0; nCnt < nBytesRead; ++nCnt )
+ sal_Bool bCR = sal_False, bLF = sal_False, bNoNormalChar = sal_False,
+ bNullChar = sal_False;
+ for( sal_uInt16 nCnt = 0; nCnt < nBytesRead; ++nCnt )
switch( aBuffer[ nCnt ] )
{
- case 0x0: bNullChar = TRUE; break;
- case 0xA: bLF = TRUE; break;
- case 0xD: bCR = TRUE; break;
+ case 0x0: bNullChar = sal_True; break;
+ case 0xA: bLF = sal_True; break;
+ case 0xD: bCR = sal_True; break;
case 0xC:
case 0x1A:
case 0x9: break;
default:
if( 0x20 > aBuffer[ nCnt ] )
- bNoNormalChar = TRUE;
+ bNoNormalChar = sal_True;
}
if( !bNullChar )
@@ -166,9 +166,9 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
SwDoc* pDoc = rDocSh.GetDoc();
- USHORT nAppScriptType = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
+ sal_uInt16 nAppScriptType = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
{
- BOOL bDelPrinter = FALSE;
+ sal_Bool bDelPrinter = sal_False;
SfxPrinter* pPrt = pDoc ? pDoc->getPrinter(false) : 0;
if( !pPrt )
{
@@ -177,11 +177,11 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
0 );
pPrt = new SfxPrinter( pSet );
- bDelPrinter = TRUE;
+ bDelPrinter = sal_True;
}
- const USHORT nCount = pPrt->GetFontCount();
- for (USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = pPrt->GetFontCount();
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
const String &rStr = pPrt->GetFont(i)->GetName();
aFontLB.InsertEntry( rStr );
@@ -191,7 +191,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
{
if(pDoc)
{
- USHORT nFontRes = RES_CHRATR_FONT;
+ sal_uInt16 nFontRes = RES_CHRATR_FONT;
if(SCRIPTTYPE_ASIAN == nAppScriptType)
nFontRes = RES_CHRATR_CJK_FONT;
else if(SCRIPTTYPE_COMPLEX == nAppScriptType)
@@ -202,7 +202,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
}
else
{
- USHORT nFontType = FONT_STANDARD;
+ sal_uInt16 nFontType = FONT_STANDARD;
if(SCRIPTTYPE_ASIAN == nAppScriptType)
nFontType = FONT_STANDARD_CJK;
else if(SCRIPTTYPE_COMPLEX == nAppScriptType)
@@ -222,7 +222,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
{
if(pDoc)
{
- USHORT nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType);
+ sal_uInt16 nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType);
aOpt.SetLanguage( ((SvxLanguageItem&)pDoc->
GetDefault( nWhich )).GetLanguage());
}
@@ -245,7 +245,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
}
}
- aLanguageLB.SetLanguageList( LANG_LIST_ALL, TRUE, FALSE );
+ aLanguageLB.SetLanguageList( LANG_LIST_ALL, sal_True, sal_False );
aLanguageLB.SelectLanguage( aOpt.GetLanguage() );
}
}
@@ -303,18 +303,18 @@ SwAsciiFilterDlg::~SwAsciiFilterDlg()
void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions )
{
- ULONG nCCode = aCharSetLB.GetSelectTextEncoding();
+ sal_uLong nCCode = aCharSetLB.GetSelectTextEncoding();
String sFont;
- ULONG nLng = 0;
+ sal_uLong nLng = 0;
if( aFontLB.IsVisible() )
{
sFont = aFontLB.GetSelectEntry();
- nLng = (ULONG)aLanguageLB.GetSelectLanguage();
+ nLng = (sal_uLong)aLanguageLB.GetSelectLanguage();
}
rOptions.SetFontName( sFont );
rOptions.SetCharSet( rtl_TextEncoding( nCCode ) );
- rOptions.SetLanguage( USHORT( nLng ) );
+ rOptions.SetLanguage( sal_uInt16( nLng ) );
rOptions.SetParaFlags( GetCRLF() );
// JP: Task #71802# save the user settings
@@ -325,7 +325,7 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions )
const String& rFindNm = String::CreateFromAscii(
aFontLB.IsVisible() ? sDialogImpExtraData
: sDialogExpExtraData);
- USHORT nEnd, nStt = GetExtraData().Search( rFindNm );
+ sal_uInt16 nEnd, nStt = GetExtraData().Search( rFindNm );
if( STRING_NOTFOUND != nStt )
{
// called twice, so remove "old" settings
@@ -419,7 +419,7 @@ IMPL_LINK( SwAsciiFilterDlg, CharSetSelHdl, SvxTextEncodingBox*, pBox )
}
}
- bSaveLineStatus = FALSE;
+ bSaveLineStatus = sal_False;
if( eEnd != (LineEnd)-1 ) // changed?
{
if( eOldEnd != eEnd )
@@ -432,7 +432,7 @@ IMPL_LINK( SwAsciiFilterDlg, CharSetSelHdl, SvxTextEncodingBox*, pBox )
aCR_RB.Check( aCR_RB.GetSavedValue() );
aLF_RB.Check( aLF_RB.GetSavedValue() );
}
- bSaveLineStatus = TRUE;
+ bSaveLineStatus = sal_True;
if( nOldLng != nLng && aFontLB.IsVisible() )
aLanguageLB.SelectLanguage( nLng );
diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx
index 40f0fddf98f8..cb6a9882fac3 100644
--- a/sw/source/ui/dialog/docstdlg.cxx
+++ b/sw/source/ui/dialog/docstdlg.cxx
@@ -110,9 +110,9 @@ SwDocStatPage::SwDocStatPage(Window *pParent, const SfxItemSet &rSet) :
SwFEShell* pFEShell = pDocShell->GetFEShell();
if(!pFEShell)
{
- aUpdatePB.Show(FALSE);
- aLineLbl.Show(FALSE);
- aLineNo .Show(FALSE);
+ aUpdatePB.Show(sal_False);
+ aLineLbl.Show(sal_False);
+ aLineNo .Show(sal_False);
}
}
@@ -127,9 +127,9 @@ SwDocStatPage::SwDocStatPage(Window *pParent, const SfxItemSet &rSet) :
--------------------------------------------------------------------*/
-BOOL SwDocStatPage::FillItemSet(SfxItemSet & /*rSet*/)
+sal_Bool SwDocStatPage::FillItemSet(SfxItemSet & /*rSet*/)
{
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -172,7 +172,7 @@ void SwDocStatPage::Update()
ASSERT( pSh, "Shell not found" );
- SwWait aWait( *pSh->GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *pSh->GetDoc()->GetDocShell(), sal_True );
pSh->StartAction();
aDocStat = pSh->GetDoc()->GetDocStat();
pSh->GetDoc()->UpdateDocStat( aDocStat );
@@ -190,7 +190,7 @@ IMPL_LINK( SwDocStatPage, UpdateHdl, PushButton*, EMPTYARG)
SwDocShell* pDocShell = (SwDocShell*) SfxObjectShell::Current();
SwFEShell* pFEShell = pDocShell->GetFEShell();
if(pFEShell)
- aLineNo.SetText( String::CreateFromInt32( pFEShell->GetLineCount(FALSE)));
+ aLineNo.SetText( String::CreateFromInt32( pFEShell->GetLineCount(sal_False)));
//pButton->Disable();
return 0;
}
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index 2d2b7c357720..9cca0c02b8fc 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -68,9 +68,9 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
// const SfxItemSet& rSet = rPg.GetItemSet();
SfxEventNamesItem aItem(SID_EVENTCONFIG);
- BOOL bHtmlMode = FALSE;
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ sal_Bool bHtmlMode = sal_False;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
switch( eType )
{
@@ -133,10 +133,10 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
}
-BOOL SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh,
+sal_Bool SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh,
SvxMacroItem*& rpINetItem )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMMACRO, RES_FRMMACRO, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 );
SvxMacroItem aItem( RES_FRMMACRO );
if( !rpINetItem )
@@ -155,10 +155,10 @@ BOOL SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh,
{
const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pOutSet->GetItemState( RES_FRMMACRO, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pOutSet->GetItemState( RES_FRMMACRO, sal_False, &pItem ))
{
rpINetItem->SetMacroTable( ((SvxMacroItem*)pItem)->GetMacroTable() );
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index 8a4304bcd5a9..df22cbe9e2dc 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -111,7 +111,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
const SfxPoolItem *pItem = 0;
String aTmpStr;
if ( SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_NAME, TRUE, &pItem) )
+ pSet->GetItemState(FN_PARAM_REGION_NAME, sal_True, &pItem) )
aTmpStr = rSh.GetUniqueSectionName(
&((const SfxStringItem *)pItem)->GetValue() );
else
@@ -121,36 +121,36 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
rReq.SetReturnValue(SfxStringItem(FN_INSERT_REGION, aTmpStr));
aSet.Put( *pSet );
- if(SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem)||
- SFX_ITEM_SET == pSet->GetItemState(FN_INSERT_REGION, FALSE, &pItem))
+ if(SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem)||
+ SFX_ITEM_SET == pSet->GetItemState(FN_INSERT_REGION, sal_False, &pItem))
{
SwFmtCol aCol;
SwRect aRect;
rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
- USHORT nCol = ((SfxUInt16Item *)pItem)->GetValue();
+ sal_uInt16 nCol = ((SfxUInt16Item *)pItem)->GetValue();
if(nCol)
{
- aCol.Init( nCol, 0, static_cast< USHORT >(nWidth) );
+ aCol.Init( nCol, 0, static_cast< sal_uInt16 >(nWidth) );
aSet.Put(aCol);
}
}
- else if(SFX_ITEM_SET == pSet->GetItemState(RES_COL, FALSE, &pItem))
+ else if(SFX_ITEM_SET == pSet->GetItemState(RES_COL, sal_False, &pItem))
{
aSet.Put(*pItem);
}
- const BOOL bHidden = SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_HIDDEN, TRUE, &pItem)?
- (BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE;
- const BOOL bProtect = SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_PROTECT, TRUE, &pItem)?
- (BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE;
+ const sal_Bool bHidden = SFX_ITEM_SET ==
+ pSet->GetItemState(FN_PARAM_REGION_HIDDEN, sal_True, &pItem)?
+ (sal_Bool)((const SfxBoolItem *)pItem)->GetValue():sal_False;
+ const sal_Bool bProtect = SFX_ITEM_SET ==
+ pSet->GetItemState(FN_PARAM_REGION_PROTECT, sal_True, &pItem)?
+ (sal_Bool)((const SfxBoolItem *)pItem)->GetValue():sal_False;
// --> FME 2004-06-22 #114856# edit in readonly sections
- const BOOL bEditInReadonly = SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, TRUE, &pItem)?
- (BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE;
+ const sal_Bool bEditInReadonly = SFX_ITEM_SET ==
+ pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, sal_True, &pItem)?
+ (sal_Bool)((const SfxBoolItem *)pItem)->GetValue():sal_False;
// <--
aSection.SetProtectFlag(bProtect);
@@ -160,16 +160,16 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
// <--
if(SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_CONDITION, TRUE, &pItem))
+ pSet->GetItemState(FN_PARAM_REGION_CONDITION, sal_True, &pItem))
aSection.SetCondition(((const SfxStringItem *)pItem)->GetValue());
String aFile, aSub;
if(SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_1, TRUE, &pItem))
+ pSet->GetItemState(FN_PARAM_1, sal_True, &pItem))
aFile = ((const SfxStringItem *)pItem)->GetValue();
if(SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_3, TRUE, &pItem))
+ pSet->GetItemState(FN_PARAM_3, sal_True, &pItem))
aSub = ((const SfxStringItem *)pItem)->GetValue();
@@ -180,7 +180,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
sLinkFileName.SetToken(0, sfx2::cTokenSeperator,aFile);
if(SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_2, TRUE, &pItem))
+ pSet->GetItemState(FN_PARAM_2, sal_True, &pItem))
sLinkFileName.SetToken(1, sfx2::cTokenSeperator,
((const SfxStringItem *)pItem)->GetValue());
@@ -230,10 +230,10 @@ IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSectionData*, pSect )
void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxPoolItem* pItem = 0;
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem);
+ pArgs->GetItemState(nSlot, sal_False, &pItem);
SwWrtShell& rWrtShell = GetShell();
switch ( nSlot )
@@ -241,7 +241,7 @@ void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
case FN_EDIT_REGION:
{
Window* pParentWin = &GetView().GetViewFrame()->GetWindow();
- BOOL bStart = TRUE;
+ sal_Bool bStart = sal_True;
if(bStart)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx
index b873d8028024..7a119caecbf5 100644
--- a/sw/source/ui/dialog/swabstdlg.cxx
+++ b/sw/source/ui/dialog/swabstdlg.cxx
@@ -42,7 +42,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
{
SwFuncPtrCreateDialogFactory fp = 0;
static ::osl::Module aDialogLibrary;
- static const ::rtl::OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", TRUE));
+ static const ::rtl::OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", sal_True));
if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( sLibName ) ) )
fp = ( SwAbstractDialogFactory* (__LOADONCALLAPI*)() )
aDialogLibrary.getFunctionSymbol( ::rtl::OUString::createFromAscii("CreateDialogFactory") );
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 91d2b2c12b47..5610365e3167 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -146,7 +146,7 @@ IMPL_ABSTDLG_BASE(AbstractIndexMarkFloatDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractAuthMarkFloatDlg_Impl);
// AbstractTabDialog_Impl begin
-void AbstractTabDialog_Impl::SetCurPageId( USHORT nId )
+void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -156,7 +156,7 @@ const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -183,11 +183,11 @@ void AbstractSwWordCountDialog_Impl::SetValues(const SwDocStat& rCurrent, con
}
//add for SwInsertAbstractDlg begin
-BYTE AbstractSwInsertAbstractDlg_Impl::GetLevel() const
+sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetLevel() const
{
return pDlg->GetLevel();
}
-BYTE AbstractSwInsertAbstractDlg_Impl::GetPara() const
+sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetPara() const
{
return pDlg->GetPara();
}
@@ -228,12 +228,12 @@ String AbstractSwBreakDlg_Impl::GetTemplateName()
return pDlg->GetTemplateName();
}
-USHORT AbstractSwBreakDlg_Impl:: GetKind()
+sal_uInt16 AbstractSwBreakDlg_Impl:: GetKind()
{
return pDlg->GetKind();
}
-USHORT AbstractSwBreakDlg_Impl:: GetPageNumber()
+sal_uInt16 AbstractSwBreakDlg_Impl:: GetPageNumber()
{
return pDlg->GetPageNumber();
}
@@ -258,7 +258,7 @@ void AbstractSwInsertDBColAutoPilot_Impl::DataToDoc( const uno::Sequence< uno::A
//add for SwInsertDBColAutoPilot end
// add for DropDownFieldDialog begin
-ByteString AbstractDropDownFieldDialog_Impl::GetWindowState( ULONG nMask ) const
+ByteString AbstractDropDownFieldDialog_Impl::GetWindowState( sal_uLong nMask ) const
{
return pDlg->GetWindowState(nMask);
}
@@ -270,7 +270,7 @@ void AbstractDropDownFieldDialog_Impl::SetWindowState( const ByteString& r
//add for SwLabDlg begin
-void AbstarctSwLabDlg_Impl::SetCurPageId( USHORT nId )
+void AbstarctSwLabDlg_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -280,7 +280,7 @@ const SfxItemSet* AbstarctSwLabDlg_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-const USHORT* AbstarctSwLabDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstarctSwLabDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -315,11 +315,11 @@ void AbstarctSwSelGlossaryDlg_Impl::InsertGlos(const String &rRegion, const Stri
{
pDlg->InsertGlos( rRegion, rGlosName );
}
-USHORT AbstarctSwSelGlossaryDlg_Impl::GetSelectedIdx() const
+sal_uInt16 AbstarctSwSelGlossaryDlg_Impl::GetSelectedIdx() const
{
return pDlg->GetSelectedIdx();
}
-void AbstarctSwSelGlossaryDlg_Impl::SelectEntryPos(USHORT nIdx)
+void AbstarctSwSelGlossaryDlg_Impl::SelectEntryPos(sal_uInt16 nIdx)
{
pDlg->SelectEntryPos( nIdx );
}
@@ -335,7 +335,7 @@ void AbstractSwAutoFormatDlg_Impl::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill
//add for SwAutoFormatDlg end
//add for SwFldDlg begin
-void AbstractSwFldDlg_Impl::SetCurPageId( USHORT nId )
+void AbstractSwFldDlg_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -345,7 +345,7 @@ const SfxItemSet* AbstractSwFldDlg_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-const USHORT* AbstractSwFldDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstractSwFldDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -363,7 +363,7 @@ String AbstractSwFldDlg_Impl::GetText() const
{
return pDlg->GetText();
}
-void AbstractSwFldDlg_Impl::Start( BOOL bShowl )
+void AbstractSwFldDlg_Impl::Start( sal_Bool bShowl )
{
pDlg->Start( bShowl );
}
@@ -385,7 +385,7 @@ Window* AbstractSwFldDlg_Impl::GetWindow()
{
return (Window*)pDlg;
}
-void AbstractSwFldDlg_Impl::ShowPage( USHORT nId )
+void AbstractSwFldDlg_Impl::ShowPage( sal_uInt16 nId )
{
pDlg->ShowPage(nId);
}
@@ -408,7 +408,7 @@ void AbstractSwRenameXNamedDlg_Impl::SetAlternativeAccess(
//add for SwModalRedlineAcceptDlg begin
-void AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( BOOL bAccept )
+void AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( sal_Bool bAccept )
{
pDlg->AcceptAll( bAccept);
}
@@ -432,7 +432,7 @@ void AbstractFldInputDlg_Impl::SetWindowState( const ByteString& rStr )
pDlg->SetWindowState( rStr );
}
-ByteString AbstractFldInputDlg_Impl::GetWindowState( ULONG nMask ) const
+ByteString AbstractFldInputDlg_Impl::GetWindowState( sal_uLong nMask ) const
{
return pDlg->GetWindowState( nMask );
}
@@ -443,7 +443,7 @@ String AbstractInsFootNoteDlg_Impl::GetFontName()
{
return pDlg->GetFontName();
}
-BOOL AbstractInsFootNoteDlg_Impl::IsEndNote()
+sal_Bool AbstractInsFootNoteDlg_Impl::IsEndNote()
{
return pDlg->IsEndNote();
}
@@ -466,18 +466,18 @@ String AbstractInsertGrfRulerDlg_Impl::GetGraphicName()
{
return pDlg->GetGraphicName();
}
-BOOL AbstractInsertGrfRulerDlg_Impl::IsSimpleLine()
+sal_Bool AbstractInsertGrfRulerDlg_Impl::IsSimpleLine()
{
return pDlg->IsSimpleLine();
}
-BOOL AbstractInsertGrfRulerDlg_Impl::HasImages() const
+sal_Bool AbstractInsertGrfRulerDlg_Impl::HasImages() const
{
return pDlg->HasImages();
}
// AbstractInsertGrfRulerDlg_Impl end
// AbstractInsTableDlg_Impl begin
-void AbstractInsTableDlg_Impl::GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+void AbstractInsTableDlg_Impl::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName,
SwTableAutoFmt *& prTAFmt )
{
@@ -494,22 +494,22 @@ String AbstractJavaEditDialog_Impl::GetType()
{
return pDlg->GetType();
}
-BOOL AbstractJavaEditDialog_Impl::IsUrl()
+sal_Bool AbstractJavaEditDialog_Impl::IsUrl()
{
return pDlg->IsUrl();
}
-BOOL AbstractJavaEditDialog_Impl::IsNew()
+sal_Bool AbstractJavaEditDialog_Impl::IsNew()
{
return pDlg->IsNew();
}
-BOOL AbstractJavaEditDialog_Impl::IsUpdate()
+sal_Bool AbstractJavaEditDialog_Impl::IsUpdate()
{
return pDlg->IsUpdate();
}
// AbstractJavaEditDialog_Impl end
// AbstractMailMergeDlg_Impl begin
-USHORT AbstractMailMergeDlg_Impl::GetMergeType()
+sal_uInt16 AbstractMailMergeDlg_Impl::GetMergeType()
{
return pDlg->GetMergeType();
}
@@ -528,13 +528,13 @@ uno::Reference< sdbc::XResultSet> AbstractMailMergeDlg_Impl::GetResultSet() cons
}
// AbstractMailMergeDlg_Impl end
// AbstractMailMergeCreateFromDlg_Impl begin
-BOOL AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const
+sal_Bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const
{
return pDlg->IsThisDocument();
}
// AbstractMailMergeCreateFromDlg_Impl end
//AbstractMailMergeFieldConnectionsDlg_Impl begin
-BOOL AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const
+sal_Bool AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const
{
return pDlg->IsUseExistingConnections();
}
@@ -634,7 +634,7 @@ const String& AbstractMailMergeWizard_Impl::GetReloadDocument() const
{
return pDlg->GetReloadDocument();
}
-BOOL AbstractMailMergeWizard_Impl::ShowPage( USHORT nLevel )
+sal_Bool AbstractMailMergeWizard_Impl::ShowPage( sal_uInt16 nLevel )
{
return pDlg->skipUntil(nLevel);
}
@@ -795,7 +795,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg( SwView&
// add for SwCharDlg begin
SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
- const String* pFmtStr , BOOL bIsDrwTxtDlg )
+ const String* pFmtStr , sal_Bool bIsDrwTxtDlg )
{
SfxTabDialog* pDlg=NULL;
@@ -903,7 +903,7 @@ SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg(
//add for DropDownFieldDialog begin
AbstractDropDownFieldDialog * SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog
- SwField* pField,int nResId, BOOL bNextButton )
+ SwField* pField,int nResId, sal_Bool bNextButton )
{
sw::DropDownFieldDialog* pDlg=NULL;
switch ( nResId )
@@ -925,7 +925,7 @@ AbstractDropDownFieldDialog * SwAbstractDialogFactory_Impl::CreateDropDownField
//add for SwEnvDlg begin
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet,
SwWrtShell* pWrtSh, Printer* pPrt,
- BOOL bInsert,int nResId ) //add for SwEnvDlg
+ sal_Bool bInsert,int nResId ) //add for SwEnvDlg
{
SfxTabDialog* pDlg=NULL;
switch ( nResId )
@@ -947,7 +947,7 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( Window* pPa
//add for SwLabDlg begin
AbstarctSwLabDlg* SwAbstractDialogFactory_Impl::CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
- SwNewDBMgr* pNewDBMgr, BOOL bLabel,int nResId )
+ SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId )
{
SwLabDlg* pDlg=NULL;
switch ( nResId )
@@ -975,10 +975,10 @@ SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod ()
//add for SwParaDlg begin
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwParaDlg ( Window *pParent, SwView& rVw,
const SfxItemSet& rCoreSet ,
- BYTE nDialogMode,
+ sal_uInt8 nDialogMode,
int nResId,
const String *pCollName,
- BOOL bDraw , UINT16 nDefPage)
+ sal_Bool bDraw , sal_uInt16 nDefPage)
{
SfxTabDialog* pDlg=NULL;
switch ( nResId )
@@ -1057,7 +1057,7 @@ AbstarctSwSelGlossaryDlg * SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg
//add for SwAutoFormatDlg begin
AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell,
int nResId,
- BOOL bSetAutoFmt,
+ sal_Bool bSetAutoFmt,
const SwTableAutoFmt* pSelFmt )
{
SwAutoFormatDlg* pDlg=NULL;
@@ -1078,7 +1078,7 @@ AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg( W
//add for SwAutoFormatDlg end
//add for SwBorderDlg begin
-SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, USHORT nType,int nResId )
+SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, sal_uInt16 nType,int nResId )
{
SfxModalDialog* pDlg=NULL;
switch ( nResId )
@@ -1097,7 +1097,7 @@ SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pPa
//add for SwBorderDlg end
//add for SwWrapDlg begin
-SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId )
+SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId )
{
SfxModalDialog* pDlg=NULL;
switch ( nResId )
@@ -1237,7 +1237,7 @@ AbstractSwModalRedlineAcceptDlg * SwAbstractDialogFactory_Impl::CreateSwModalRed
//add for SwModalRedlineAcceptDlg end
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwVclDialog( int nResId,
- Window* pParent, BOOL& rWithPrev ) //add for SwMergeTblDlg
+ Window* pParent, sal_Bool& rWithPrev ) //add for SwMergeTblDlg
{
Dialog* pDlg=NULL;
switch ( nResId )
@@ -1255,10 +1255,10 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwVclDialog( int nResId,
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog( int nResId,
SfxViewFrame *pFrame, Window *pParent,
const SfxItemSet& rCoreSet,
- BOOL bNewFrm,
- USHORT nResType,
- BOOL bFmt,
- UINT16 nDefPage,
+ sal_Bool bNewFrm,
+ sal_uInt16 nResType,
+ sal_Bool bFmt,
+ sal_uInt16 nDefPage,
const String* pFmtStr ) //add for SwFrmDlg
{
SfxTabDialog* pDlg=NULL;
@@ -1281,10 +1281,10 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog( int nRes
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateTemplateDialog( int nResId,
Window* pParent,
SfxStyleSheetBase& rBase,
- USHORT nRegion,
- BOOL bColumn,
+ sal_uInt16 nRegion,
+ sal_Bool bColumn,
SwWrtShell* pActShell,
- BOOL bNew ) //add for SwTemplateDlg
+ sal_Bool bNew ) //add for SwTemplateDlg
{
SfxTabDialog* pDlg=NULL;
switch ( nResId )
@@ -1322,7 +1322,7 @@ AbstractGlossaryDlg* SwAbstractDialogFactory_Impl::CreateGlossaryDlg( int nResId
AbstractFldInputDlg* SwAbstractDialogFactory_Impl::CreateFldInputDlg( int nResId,
Window *pParent, SwWrtShell &rSh,
- SwField* pField, BOOL bNextButton ) //add for SwFldInputDlg
+ SwField* pField, sal_Bool bNextButton ) //add for SwFldInputDlg
{
SwFldInputDlg* pDlg=NULL;
switch ( nResId )
@@ -1339,7 +1339,7 @@ AbstractFldInputDlg* SwAbstractDialogFactory_Impl::CreateFldInputDlg( int nResId
}
AbstractInsFootNoteDlg* SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg( int nResId,
- Window * pParent, SwWrtShell &rSh, BOOL bEd ) //add for SwInsFootNoteDlg
+ Window * pParent, SwWrtShell &rSh, sal_Bool bEd ) //add for SwInsFootNoteDlg
{
SwInsFootNoteDlg* pDlg=NULL;
switch ( nResId )
@@ -1356,7 +1356,7 @@ AbstractInsFootNoteDlg* SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg( int
}
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclSwViewDialog( int nResId,
- SwView& rView, BOOL /*bCol*/ ) //add for SwInsRowColDlg, SwLineNumberingDlg
+ SwView& rView, sal_Bool /*bCol*/ ) //add for SwInsRowColDlg, SwLineNumberingDlg
{
Dialog* pDlg=NULL;
switch ( nResId )
@@ -1520,8 +1520,8 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTabDialog( int nResI
AbstractMultiTOXTabDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog( int nResId,
Window* pParent, const SfxItemSet& rSet,
SwWrtShell &rShell,
- SwTOXBase* pCurTOX, USHORT nToxType,
- BOOL bGlobal ) //add for SwMultiTOXTabDialog
+ SwTOXBase* pCurTOX, sal_uInt16 nToxType,
+ sal_Bool bGlobal ) //add for SwMultiTOXTabDialog
{
SwMultiTOXTabDialog* pDlg=NULL;
switch ( nResId )
@@ -1640,7 +1640,7 @@ AbstractMailMergeWizard* SwAbstractDialogFactory_Impl::CreateMailMergeWizard(
}
//add for static func in SwGlossaryDlg
-GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc( USHORT nId )
+GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc( sal_uInt16 nId )
{
switch ( nId )
{
@@ -1651,7 +1651,7 @@ GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc(
}
return 0;
}
-GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( USHORT nId )
+GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( sal_uInt16 nId )
{
switch ( nId )
{
@@ -1664,7 +1664,7 @@ GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( USHOR
}
//------------------ Factories for TabPages
-CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
+CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
{
CreateTabPage pRet = 0;
switch ( nId )
@@ -1727,7 +1727,7 @@ CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
return pRet;
}
-GetTabPageRanges SwAbstractDialogFactory_Impl::GetTabPageRangesFunc( USHORT nId )
+GetTabPageRanges SwAbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId )
{
switch ( nId )
{
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index c8c19d5bcc0b..5ffd7fcd74ad 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -64,7 +64,7 @@ public: \
{} \
virtual ~Class(); \
virtual short Execute() ;
-// virtual void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 )
+// virtual void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 )
#define IMPL_ABSTDLG_BASE(Class) \
Class::~Class() \
@@ -87,8 +87,8 @@ class AbstractSwWordCountDialog_Impl : public AbstractSwWordCountDialog
class AbstractSwInsertAbstractDlg_Impl : public AbstractSwInsertAbstractDlg
{
DECL_ABSTDLG_BASE(AbstractSwInsertAbstractDlg_Impl,SwInsertAbstractDlg)
- virtual BYTE GetLevel() const ;
- virtual BYTE GetPara() const ;
+ virtual sal_uInt8 GetLevel() const ;
+ virtual sal_uInt8 GetPara() const ;
};
//add for SwInsertAbstractDlg end
@@ -125,8 +125,8 @@ class AbstractSwBreakDlg_Impl : public AbstractSwBreakDlg // add for SwBreakDlg
{
DECL_ABSTDLG_BASE(AbstractSwBreakDlg_Impl,SwBreakDlg)
virtual String GetTemplateName();
- virtual USHORT GetKind();
- virtual USHORT GetPageNumber();
+ virtual sal_uInt16 GetKind();
+ virtual sal_uInt16 GetPageNumber();
};
class AbstractSplitTableDialog_Impl : public AbstractSplitTableDialog // add for
@@ -141,9 +141,9 @@ class AbstractSplitTableDialog_Impl : public AbstractSplitTableDialog // add for
class AbstractTabDialog_Impl : public SfxAbstractTabDialog
{
DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog )
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
@@ -175,7 +175,7 @@ class AbstractSwInsertDBColAutoPilot_Impl : public AbstractSwInsertDBColAutoPil
class AbstractDropDownFieldDialog_Impl : public AbstractDropDownFieldDialog //add for DropDownFieldDialog
{
DECL_ABSTDLG_BASE(AbstractDropDownFieldDialog_Impl, sw::DropDownFieldDialog)
- virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const; //this method inherit from SystemWindow
+ virtual ByteString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const; //this method inherit from SystemWindow
virtual void SetWindowState( const ByteString& rStr );//this method inherit from SystemWindow
};
//add for DropDownFieldDialog end
@@ -184,9 +184,9 @@ class AbstractDropDownFieldDialog_Impl : public AbstractDropDownFieldDialog //ad
class AbstarctSwLabDlg_Impl : public AbstarctSwLabDlg
{
DECL_ABSTDLG_BASE(AbstarctSwLabDlg_Impl,SwLabDlg)
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
@@ -201,8 +201,8 @@ class AbstarctSwSelGlossaryDlg_Impl : public AbstarctSwSelGlossaryDlg
{
DECL_ABSTDLG_BASE(AbstarctSwSelGlossaryDlg_Impl,SwSelGlossaryDlg)
virtual void InsertGlos(const String &rRegion, const String &rGlosName); // inline
- virtual USHORT GetSelectedIdx() const; // inline
- virtual void SelectEntryPos(USHORT nIdx); // inline
+ virtual sal_uInt16 GetSelectedIdx() const; // inline
+ virtual void SelectEntryPos(sal_uInt16 nIdx); // inline
};
//add for SwSelGlossaryDlg end
@@ -219,15 +219,15 @@ class AbstractSwAutoFormatDlg_Impl : public AbstractSwAutoFormatDlg
class AbstractSwFldDlg_Impl : public AbstractSwFldDlg //add for SwFldDlg
{
DECL_ABSTDLG_BASE(AbstractSwFldDlg_Impl,SwFldDlg )
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
virtual String GetText() const;
- virtual void Start( BOOL bShow = TRUE ); //this method from SfxTabDialog
- virtual void ShowPage( USHORT nId );// this method from SfxTabDialog
+ virtual void Start( sal_Bool bShow = sal_True ); //this method from SfxTabDialog
+ virtual void ShowPage( sal_uInt16 nId );// this method from SfxTabDialog
virtual void Initialize(SfxChildWinInfo *pInfo);
virtual void ReInitDlg();
virtual void ActivateDatabasePage();
@@ -249,7 +249,7 @@ class AbstractSwRenameXNamedDlg_Impl : public AbstractSwRenameXNamedDlg
class AbstractSwModalRedlineAcceptDlg_Impl : public AbstractSwModalRedlineAcceptDlg
{
DECL_ABSTDLG_BASE(AbstractSwModalRedlineAcceptDlg_Impl,SwModalRedlineAcceptDlg )
- virtual void AcceptAll( BOOL bAccept );
+ virtual void AcceptAll( sal_Bool bAccept );
};
//add for SwModalRedlineAcceptDlg end
@@ -270,7 +270,7 @@ class AbstractFldInputDlg_Impl : public AbstractFldInputDlg
DECL_ABSTDLG_BASE(AbstractFldInputDlg_Impl,SwFldInputDlg)
//from class SalFrame
virtual void SetWindowState( const ByteString& rStr ) ;
- virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const ;
+ virtual ByteString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const ;
};
//for SwFldInputDlg end
@@ -280,7 +280,7 @@ class AbstractInsFootNoteDlg_Impl : public AbstractInsFootNoteDlg
{
DECL_ABSTDLG_BASE(AbstractInsFootNoteDlg_Impl,SwInsFootNoteDlg)
virtual String GetFontName();
- virtual BOOL IsEndNote();
+ virtual sal_Bool IsEndNote();
virtual String GetStr();
//from class Window
virtual void SetHelpId( const rtl::OString& sHelpId );
@@ -294,8 +294,8 @@ class AbstractInsertGrfRulerDlg_Impl : public AbstractInsertGrfRulerDlg
{
DECL_ABSTDLG_BASE(AbstractInsertGrfRulerDlg_Impl,SwInsertGrfRulerDlg)
virtual String GetGraphicName();
- virtual BOOL IsSimpleLine();
- virtual BOOL HasImages() const ;
+ virtual sal_Bool IsSimpleLine();
+ virtual sal_Bool HasImages() const ;
};
//for SwInsertGrfRulerDlg end
@@ -304,7 +304,7 @@ class SwInsTableDlg;
class AbstractInsTableDlg_Impl : public AbstractInsTableDlg
{
DECL_ABSTDLG_BASE(AbstractInsTableDlg_Impl,SwInsTableDlg)
- 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 );
};
@@ -317,9 +317,9 @@ class AbstractJavaEditDialog_Impl : public AbstractJavaEditDialog
DECL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl,SwJavaEditDialog)
virtual String GetText();
virtual String GetType();
- virtual BOOL IsUrl();
- virtual BOOL IsNew();
- virtual BOOL IsUpdate();
+ virtual sal_Bool IsUrl();
+ virtual sal_Bool IsNew();
+ virtual sal_Bool IsUpdate();
};
//for SwJavaEditDialog end
@@ -328,7 +328,7 @@ class SwMailMergeDlg;
class AbstractMailMergeDlg_Impl : public AbstractMailMergeDlg
{
DECL_ABSTDLG_BASE(AbstractMailMergeDlg_Impl,SwMailMergeDlg)
- virtual USHORT GetMergeType() ;
+ virtual sal_uInt16 GetMergeType() ;
virtual const ::rtl::OUString& GetSaveFilter() const;
virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const ;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const;
@@ -339,7 +339,7 @@ class SwMailMergeCreateFromDlg;
class AbstractMailMergeCreateFromDlg_Impl : public AbstractMailMergeCreateFromDlg
{
DECL_ABSTDLG_BASE(AbstractMailMergeCreateFromDlg_Impl,SwMailMergeCreateFromDlg)
- virtual BOOL IsThisDocument() const ;
+ virtual sal_Bool IsThisDocument() const ;
};
//for SwMailMergeCreateFromDlg end
//for SwMailMergeFieldConnectionsDlg begin
@@ -347,7 +347,7 @@ class SwMailMergeFieldConnectionsDlg;
class AbstractMailMergeFieldConnectionsDlg_Impl : public AbstractMailMergeFieldConnectionsDlg
{
DECL_ABSTDLG_BASE(AbstractMailMergeFieldConnectionsDlg_Impl,SwMailMergeFieldConnectionsDlg)
- virtual BOOL IsUseExistingConnections() const ;
+ virtual sal_Bool IsUseExistingConnections() const ;
};
//for SwMailMergeFieldConnectionsDlg end
@@ -418,7 +418,7 @@ public:
virtual void SetReloadDocument(const String& rURL);
virtual const String& GetReloadDocument() const;
- virtual BOOL ShowPage( USHORT nLevel );
+ virtual sal_Bool ShowPage( sal_uInt16 nLevel );
virtual sal_uInt16 GetRestartPage() const;
};
@@ -441,7 +441,7 @@ public:
virtual AbstractSwBreakDlg * CreateSwBreakDlg ( Window *pParent, SwWrtShell &rSh,int nResId ); // add for SwBreakDlg
virtual VclAbstractDialog * CreateSwChangeDBDlg( SwView& rVw, int nResId ); //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);
+ const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False);
virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg ( SwView& rView, int nResId, bool bToTable ); //add for SwConvertTableDlg
virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId); //add for SwCaptionDialog
@@ -452,20 +452,20 @@ public:
virtual SfxAbstractTabDialog * CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId);//add for SwFootNoteOptionDlg
virtual AbstractDropDownFieldDialog * CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog
- SwField* pField,int nResId, BOOL bNextButton = FALSE );
- virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert,int nResId ); //add for SwEnvDlg
+ SwField* pField,int nResId, sal_Bool bNextButton = sal_False );
+ virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert,int nResId ); //add for SwEnvDlg
virtual AbstarctSwLabDlg* CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
- SwNewDBMgr* pNewDBMgr, BOOL bLabel,int nResId );
+ SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId );
virtual SwLabDlgMethod GetSwLabDlgStaticMethod (); //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);
+ sal_Bool bDraw = sal_False,
+ sal_uInt16 nDefPage = 0);
virtual AbstarctSwSelGlossaryDlg * CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId ); //add for SwSelGlossaryDlg
virtual VclAbstractDialog * CreateVclAbstractDialog ( Window * pParent, SwWrtShell &rSh, int nResId ); //add for SwTableHeightDlg SwSortDlg
@@ -473,11 +473,11 @@ 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 );
- virtual SfxAbstractDialog * CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, USHORT nType,int nResId );//add for SwBorderDlg
+ virtual SfxAbstractDialog * CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, sal_uInt16 nType,int nResId );//add for SwBorderDlg
- virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId ); //add for SwWrapDlg
+ virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId ); //add for SwWrapDlg
virtual VclAbstractDialog * CreateSwTableWidthDlg ( Window *pParent, SwTableFUNC &rFnc , int nResId ); //add for SwTableWidthDlg
virtual SfxAbstractTabDialog* CreateSwTableTabDlg( Window* pParent, SfxItemPool& Pool,
const SfxItemSet* pItemSet, SwWrtShell* pSh,int nResId ); //add for SwTableTabDlg
@@ -489,33 +489,33 @@ public:
virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId ); //add for SwModalRedlineAcceptDlg
virtual VclAbstractDialog* CreateSwVclDialog( int nResId,
- Window* pParent, BOOL& rWithPrev ); //add for SwMergeTblDlg
+ Window* pParent, sal_Bool& rWithPrev ); //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); //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 ); //add for SwTemplateDlg
+ sal_Bool bNew = sal_False ); //add for SwTemplateDlg
virtual AbstractGlossaryDlg* CreateGlossaryDlg( int nResId,
SfxViewFrame* pViewFrame,
SwGlossaryHdl* pGlosHdl,
SwWrtShell *pWrtShell); //add for SwGlossaryDlg
virtual AbstractFldInputDlg* CreateFldInputDlg( int nResId,
Window *pParent, SwWrtShell &rSh,
- SwField* pField, BOOL bNextButton = FALSE ); //add for SwFldInputDlg
+ SwField* pField, sal_Bool bNextButton = sal_False ); //add for SwFldInputDlg
virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId,
- Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE); //add for SwInsFootNoteDlg
+ Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False); //add for SwInsFootNoteDlg
virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
- SwView& rView, BOOL bCol = FALSE ); //add for SwInsRowColDlg, SwLineNumberingDlg
+ SwView& rView, sal_Bool bCol = sal_False ); //add for SwInsRowColDlg, SwLineNumberingDlg
virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
Window * pParent ); //add for SwInsertGrfRulerDlg
virtual AbstractInsTableDlg* CreateInsTableDlg( int nResId,
@@ -542,8 +542,8 @@ public:
virtual AbstractMultiTOXTabDialog* CreateMultiTOXTabDialog( int nResId,
Window* pParent, const SfxItemSet& rSet,
SwWrtShell &rShell,
- SwTOXBase* pCurTOX, USHORT nToxType = USHRT_MAX,
- BOOL bGlobal = FALSE); //add for SwMultiTOXTabDialog
+ SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX,
+ sal_Bool bGlobal = sal_False); //add for SwMultiTOXTabDialog
virtual AbstractEditRegionDlg* CreateEditRegionDlg( int nResId,
Window* pParent, SwWrtShell& rWrtSh ); //add for SwEditRegionDlg
virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( int nResId,
@@ -566,13 +566,13 @@ public:
virtual AbstractMailMergeWizard* CreateMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem);
//add for static func in SwGlossaryDlg
- virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( USHORT nId );
- virtual GlossarySetActGroup SetGlossaryActGroupFunc( USHORT nId );
+ virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( sal_uInt16 nId );
+ virtual GlossarySetActGroup SetGlossaryActGroupFunc( sal_uInt16 nId );
// For TabPage
- virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId );
+ virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId );
- virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId );
+ virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId );
};
diff --git a/sw/source/ui/dialog/swwrtshitem.cxx b/sw/source/ui/dialog/swwrtshitem.cxx
index f9015e3a0387..8bc635cf769c 100644
--- a/sw/source/ui/dialog/swwrtshitem.cxx
+++ b/sw/source/ui/dialog/swwrtshitem.cxx
@@ -29,7 +29,7 @@
#include "precompiled_sw.hxx"
#include "swwrtshitem.hxx"
TYPEINIT1(SwWrtShellItem,SfxPoolItem);
-SwWrtShellItem::SwWrtShellItem( USHORT _nWhich, SwWrtShell* pSh )
+SwWrtShellItem::SwWrtShellItem( sal_uInt16 _nWhich, SwWrtShell* pSh )
: SfxPoolItem( _nWhich ), pWrtSh( pSh )
{
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 5acc169c4979..312224b8dad0 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -93,8 +93,8 @@ void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames
const SwSectionFmt* pFmt;
if( !pNewFmt )
{
- USHORT nCount = rSh.GetSectionFmtCount();
- for(USHORT i=0;i<nCount;i++)
+ sal_uInt16 nCount = rSh.GetSectionFmtCount();
+ for(sal_uInt16 i=0;i<nCount;i++)
{
SectionType eTmpType;
if( !(pFmt = &rSh.GetSectionFmt(i))->GetParent() &&
@@ -114,11 +114,11 @@ void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames
else
{
SwSections aTmpArr;
- USHORT nCnt = pNewFmt->GetChildSections(aTmpArr,SORTSECT_POS);
+ sal_uInt16 nCnt = pNewFmt->GetChildSections(aTmpArr,SORTSECT_POS);
if( nCnt )
{
SectionType eTmpType;
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
if( (pFmt = aTmpArr[n]->GetFmt())->IsInNodesArr()&&
(eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION
&& TOX_HEADER_SECTION != eTmpType )
@@ -176,7 +176,7 @@ private:
SwFmtNoBalancedColumns m_Balance;
SvxFrameDirectionItem m_FrmDirItem;
SvxLRSpaceItem m_LRSpaceItem;
- USHORT m_nArrPos;
+ sal_uInt16 m_nArrPos;
// zeigt an, ob evtl. Textinhalt im Bereich ist
bool m_bContent : 1;
// fuer Multiselektion erst markieren, dann mit der TreeListBox arbeiten!
@@ -184,7 +184,7 @@ private:
uno::Sequence<sal_Int8> m_TempPasswd;
public:
- SectRepr(USHORT nPos, SwSection& rSect);
+ SectRepr(sal_uInt16 nPos, SwSection& rSect);
bool operator==(SectRepr& rSectRef) const
{ return m_nArrPos == rSectRef.GetArrPos(); }
@@ -201,7 +201,7 @@ public:
SvxFrameDirectionItem& GetFrmDir() { return m_FrmDirItem; }
SvxLRSpaceItem& GetLRSpace() { return m_LRSpaceItem; }
- USHORT GetArrPos() const { return m_nArrPos; }
+ sal_uInt16 GetArrPos() const { return m_nArrPos; }
String GetFile() const;
String GetSubRegion() const;
void SetFile(String const& rFile);
@@ -222,7 +222,7 @@ public:
SV_IMPL_OP_PTRARR_SORT( SectReprArr, SectReprPtr )
-SectRepr::SectRepr( USHORT nPos, SwSection& rSect )
+SectRepr::SectRepr( sal_uInt16 nPos, SwSection& rSect )
: m_SectionData( rSect )
, m_Brush( RES_BACKGROUND )
, m_FrmDirItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR )
@@ -327,7 +327,7 @@ String SectRepr::GetFile() const
{
if (DDE_LINK_SECTION == m_SectionData.GetType())
{
- USHORT n = sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ' );
+ sal_uInt16 n = sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ' );
sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ', n );
}
else
@@ -461,11 +461,11 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
/* -----------------------------26.04.01 14:56--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
+sal_Bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
{
if(bDontCheckPasswd)
- return TRUE;
- sal_Bool bRet = TRUE;
+ return sal_True;
+ sal_Bool bRet = sal_True;
SvLBoxEntry* pEntry = aTree.FirstSelected();
while( pEntry )
{
@@ -474,7 +474,7 @@ BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
&& pRepr->GetSectionData().GetPassword().getLength())
{
SwTestPasswdDlg aPasswdDlg(this);
- bRet = FALSE;
+ bRet = sal_False;
if (aPasswdDlg.Execute())
{
String sNewPasswd( aPasswdDlg.GetPassword() );
@@ -484,7 +484,7 @@ BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
pRepr->GetSectionData().GetPassword(), sNewPasswd))
{
pRepr->SetTempPasswd(aNewPasswd);
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -516,8 +516,8 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
if (!pFmt)
{
- USHORT nCount=rSh.GetSectionFmtCount();
- for ( USHORT n=0; n < nCount; n++ )
+ sal_uInt16 nCount=rSh.GetSectionFmtCount();
+ for ( sal_uInt16 n=0; n < nCount; n++ )
{
SectionType eTmpType;
if( !( pFmt = &rSh.GetSectionFmt(n))->GetParent() &&
@@ -527,9 +527,9 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
{
SectRepr* pSectRepr = new SectRepr( n,
*(pSect=pFmt->GetSection()) );
- Image aImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), FALSE);
+ Image aImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), sal_False);
pEntry = aTree.InsertEntry(pSect->GetSectionName(), aImg, aImg);
- Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), TRUE);
+ Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), sal_True);
aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
pEntry->SetUserData(pSectRepr);
@@ -545,10 +545,10 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
{
SwSections aTmpArr;
SvLBoxEntry* pNEntry;
- USHORT nCnt = pFmt->GetChildSections(aTmpArr,SORTSECT_POS);
+ sal_uInt16 nCnt = pFmt->GetChildSections(aTmpArr,SORTSECT_POS);
if( nCnt )
{
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
SectionType eTmpType;
pFmt = aTmpArr[n]->GetFmt();
@@ -560,10 +560,10 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
SectRepr* pSectRepr=new SectRepr(
FindArrPos( pSect->GetFmt() ), *pSect );
Image aImage = BuildBitmap( pSect->IsProtect(),
- pSect->IsHidden(), FALSE);
+ pSect->IsHidden(), sal_False);
pNEntry = aTree.InsertEntry(
pSect->GetSectionName(), aImage, aImage, pEntry);
- Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), TRUE);
+ Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), sal_True);
aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
pNEntry->SetUserData(pSectRepr);
@@ -586,10 +586,10 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
---------------------------------------------------------------------*/
-USHORT SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt )
+sal_uInt16 SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt )
{
- USHORT nCount=rSh.GetSectionFmtCount();
- for (USHORT i=0;i<nCount;i++)
+ sal_uInt16 nCount=rSh.GetSectionFmtCount();
+ for (sal_uInt16 i=0;i<nCount;i++)
if (pFmt==&rSh.GetSectionFmt(i))
return i;
@@ -627,7 +627,7 @@ void SwEditRegionDlg::SelectSection(const String& rSectionName)
}
if(pEntry)
{
- aTree.SelectAll( FALSE);
+ aTree.SelectAll( sal_False);
aTree.Select(pEntry);
aTree.MakeVisible(pEntry);
}
@@ -642,21 +642,21 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
{
bDontCheckPasswd = sal_True;
SvLBoxEntry* pEntry=pBox->FirstSelected();
- aHideCB .Enable(TRUE);
+ aHideCB .Enable(sal_True);
// --> FME 2004-06-22 #114856# edit in readonly sections
- aEditInReadonlyCB.Enable(TRUE);
+ aEditInReadonlyCB.Enable(sal_True);
// <--
- aProtectCB .Enable(TRUE);
- aFileCB .Enable(TRUE);
+ aProtectCB .Enable(sal_True);
+ aFileCB .Enable(sal_True);
UNO_NMSPC::Sequence <sal_Int8> aCurPasswd;
if( 1 < pBox->GetSelectionCount() )
{
- aHideCB.EnableTriState( TRUE );
- aProtectCB.EnableTriState( TRUE );
+ aHideCB.EnableTriState( sal_True );
+ aProtectCB.EnableTriState( sal_True );
// --> FME 2004-06-22 #114856# edit in readonly sections
- aEditInReadonlyCB.EnableTriState ( TRUE );
+ aEditInReadonlyCB.EnableTriState ( sal_True );
// <--
- aFileCB.EnableTriState( TRUE );
+ aFileCB.EnableTriState( sal_True );
bool bHiddenValid = true;
bool bProtectValid = true;
@@ -668,10 +668,10 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
bool bHidden = true;
bool bProtect = true;
String sCondition;
- BOOL bFirst = TRUE;
- BOOL bFileValid = TRUE;
- BOOL bFile = TRUE;
- BOOL bPasswdValid = TRUE;
+ sal_Bool bFirst = sal_True;
+ sal_Bool bFileValid = sal_True;
+ sal_Bool bFile = sal_True;
+ sal_Bool bPasswdValid = sal_True;
while( pEntry )
{
@@ -692,7 +692,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
{
String sTemp(rData.GetCondition());
if(sCondition != sTemp)
- bConditionValid = FALSE;
+ bConditionValid = sal_False;
bHiddenValid = (bHidden == rData.IsHidden());
bProtectValid = (bProtect == rData.IsProtectFlag());
// --> FME 2004-06-22 #114856# edit in readonly sections
@@ -704,7 +704,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
bPasswdValid = (aCurPasswd == rData.GetPassword());
}
pEntry = pBox->NextSelected(pEntry);
- bFirst = FALSE;
+ bFirst = sal_False;
}
aHideCB.SetState( !bHiddenValid ? STATE_DONTKNOW :
@@ -723,27 +723,27 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
else
{
// aConditionED.SetText(aEmptyStr);
- aConditionFT.Enable(FALSE);
- aConditionED.Enable(FALSE);
+ aConditionFT.Enable(sal_False);
+ aConditionED.Enable(sal_False);
}
- aFilePB.Enable(FALSE);
- aFileNameFT .Enable(FALSE);
- aFileNameED .Enable(FALSE);
- aSubRegionFT.Enable(FALSE);
- aSubRegionED.Enable(FALSE);
-// aNameFT .Enable(FALSE);
- aCurName .Enable(FALSE);
- aOptionsPB .Enable(FALSE);
- aDDECB .Enable(FALSE);
- aDDECommandFT .Enable(FALSE);
- BOOL bPasswdEnabled = aProtectCB.GetState() == STATE_CHECK;
+ aFilePB.Enable(sal_False);
+ aFileNameFT .Enable(sal_False);
+ aFileNameED .Enable(sal_False);
+ aSubRegionFT.Enable(sal_False);
+ aSubRegionED.Enable(sal_False);
+// aNameFT .Enable(sal_False);
+ aCurName .Enable(sal_False);
+ aOptionsPB .Enable(sal_False);
+ aDDECB .Enable(sal_False);
+ aDDECommandFT .Enable(sal_False);
+ sal_Bool bPasswdEnabled = aProtectCB.GetState() == STATE_CHECK;
aPasswdCB.Enable(bPasswdEnabled);
aPasswdPB.Enable(bPasswdEnabled);
if(!bPasswdValid)
{
pEntry = pBox->FirstSelected();
- pBox->SelectAll( FALSE );
+ pBox->SelectAll( sal_False );
pBox->Select( pEntry );
GetFirstEntryHdl(pBox);
return 0;
@@ -753,15 +753,15 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
}
else if (pEntry )
{
-// aNameFT .Enable(TRUE);
- aCurName .Enable(TRUE);
- aOptionsPB .Enable(TRUE);
+// aNameFT .Enable(sal_True);
+ aCurName .Enable(sal_True);
+ aOptionsPB .Enable(sal_True);
SectRepr* pRepr=(SectRepr*) pEntry->GetUserData();
SwSectionData const& rData( pRepr->GetSectionData() );
aConditionED.SetText(rData.GetCondition());
aHideCB.Enable();
aHideCB.SetState((rData.IsHidden()) ? STATE_CHECK : STATE_NOCHECK);
- BOOL bHide = STATE_CHECK == aHideCB.GetState();
+ sal_Bool bHide = STATE_CHECK == aHideCB.GetState();
aConditionED.Enable(bHide);
aConditionFT.Enable(bHide);
aPasswdCB.Check(rData.GetPassword().getLength() > 0);
@@ -777,17 +777,17 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
aSubRegionED.Clear();
if(aFile.Len()||sSub.Len())
{
- aFileCB.Check(TRUE);
+ aFileCB.Check(sal_True);
aFileNameED.SetText(aFile);
aSubRegionED.SetText(sSub);
aDDECB.Check(rData.GetType() == DDE_LINK_SECTION);
}
else
{
- aFileCB.Check(FALSE);
+ aFileCB.Check(sal_False);
aFileNameED.SetText(aFile);
- aDDECB.Enable(FALSE);
- aDDECB.Check(FALSE);
+ aDDECB.Enable(sal_False);
+ aDDECB.Check(sal_False);
}
UseFileHdl(&aFileCB);
DDEHdl( &aDDECB );
@@ -801,7 +801,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
aEditInReadonlyCB.Enable();
// <--
- BOOL bPasswdEnabled = aProtectCB.IsChecked();
+ sal_Bool bPasswdEnabled = aProtectCB.IsChecked();
aPasswdCB.Enable(bPasswdEnabled);
aPasswdPB.Enable(bPasswdEnabled);
}
@@ -815,25 +815,25 @@ IMPL_LINK( SwEditRegionDlg, DeselectHdl, SvTreeListBox *, pBox )
{
if( !pBox->GetSelectionCount() )
{
- aHideCB .Enable(FALSE);
- aProtectCB .Enable(FALSE);
+ aHideCB .Enable(sal_False);
+ aProtectCB .Enable(sal_False);
// --> FME 2004-06-22 #114856# edit in readonly sections
- aEditInReadonlyCB.Enable(FALSE);
+ aEditInReadonlyCB.Enable(sal_False);
// <--
- aPasswdCB .Enable(FALSE);
- aPasswdCB .Enable(FALSE);
- aConditionFT .Enable(FALSE);
- aConditionED.Enable(FALSE);
- aFileCB .Enable(FALSE);
- aFilePB .Enable(FALSE);
- aFileNameFT .Enable(FALSE);
- aFileNameED .Enable(FALSE);
- aSubRegionFT .Enable(FALSE);
- aSubRegionED .Enable(FALSE);
-// aNameFT .Enable(FALSE);
- aCurName .Enable(FALSE);
- aDDECB .Enable(FALSE);
- aDDECommandFT .Enable(FALSE);
+ aPasswdCB .Enable(sal_False);
+ aPasswdCB .Enable(sal_False);
+ aConditionFT .Enable(sal_False);
+ aConditionED.Enable(sal_False);
+ aFileCB .Enable(sal_False);
+ aFilePB .Enable(sal_False);
+ aFileNameFT .Enable(sal_False);
+ aFileNameED .Enable(sal_False);
+ aSubRegionFT .Enable(sal_False);
+ aSubRegionED .Enable(sal_False);
+// aNameFT .Enable(sal_False);
+ aCurName .Enable(sal_False);
+ aDDECB .Enable(sal_False);
+ aDDECommandFT .Enable(sal_False);
UseFileHdl(&aFileCB);
DDEHdl( &aDDECB );
@@ -862,7 +862,7 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
rSh.StartAllAction();
rSh.StartUndo();
- rSh.ResetSelect( 0,FALSE );
+ rSh.ResetSelect( 0,sal_False );
SvLBoxEntry* pEntry = aTree.First();
while( pEntry )
@@ -873,20 +873,20 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
{
pRepr->GetSectionData().SetPassword(uno::Sequence<sal_Int8 >());
}
- USHORT nNewPos = rDocFmts.GetPos( pFmt );
+ sal_uInt16 nNewPos = rDocFmts.GetPos( pFmt );
if( USHRT_MAX != nNewPos )
{
- SfxItemSet* pSet = pFmt->GetAttrSet().Clone( FALSE );
+ SfxItemSet* pSet = pFmt->GetAttrSet().Clone( sal_False );
if( pFmt->GetCol() != pRepr->GetCol() )
pSet->Put( pRepr->GetCol() );
- if( pFmt->GetBackground(FALSE) != pRepr->GetBackground() )
+ if( pFmt->GetBackground(sal_False) != pRepr->GetBackground() )
pSet->Put( pRepr->GetBackground() );
- if( pFmt->GetFtnAtTxtEnd(FALSE) != pRepr->GetFtnNtAtEnd() )
+ if( pFmt->GetFtnAtTxtEnd(sal_False) != pRepr->GetFtnNtAtEnd() )
pSet->Put( pRepr->GetFtnNtAtEnd() );
- if( pFmt->GetEndAtTxtEnd(FALSE) != pRepr->GetEndNtAtEnd() )
+ if( pFmt->GetEndAtTxtEnd(sal_False) != pRepr->GetEndNtAtEnd() )
pSet->Put( pRepr->GetEndNtAtEnd() );
if( pFmt->GetBalancedColumns() != pRepr->GetBalance() )
@@ -905,10 +905,10 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
pEntry = aTree.Next( pEntry );
}
- for(USHORT i = aSectReprArr.Count(); i; )
+ for(sal_uInt16 i = aSectReprArr.Count(); i; )
{
SwSectionFmt* pFmt = aOrigArray[ aSectReprArr[ --i ]->GetArrPos() ];
- USHORT nNewPos = rDocFmts.GetPos( pFmt );
+ sal_uInt16 nNewPos = rDocFmts.GetPos( pFmt );
if( USHRT_MAX != nNewPos )
rSh.DelSectionFmt( nNewPos );
}
@@ -933,19 +933,19 @@ IMPL_LINK( SwEditRegionDlg, ChangeProtectHdl, TriStateBox *, pBox )
{
if(!CheckPasswd(pBox))
return 0;
- pBox->EnableTriState( FALSE );
+ pBox->EnableTriState( sal_False );
SvLBoxEntry* pEntry=aTree.FirstSelected();
DBG_ASSERT(pEntry,"kein Entry gefunden");
- BOOL bCheck = STATE_CHECK == pBox->GetState();
+ sal_Bool bCheck = STATE_CHECK == pBox->GetState();
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
pRepr->GetSectionData().SetProtectFlag(bCheck);
Image aImage = BuildBitmap( bCheck,
- STATE_CHECK == aHideCB.GetState(), FALSE);
+ STATE_CHECK == aHideCB.GetState(), sal_False);
aTree.SetExpandedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
aTree.SetCollapsedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
- Image aHCImg = BuildBitmap( bCheck, STATE_CHECK == aHideCB.GetState(), TRUE);
+ Image aHCImg = BuildBitmap( bCheck, STATE_CHECK == aHideCB.GetState(), sal_True);
aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
pEntry = aTree.NextSelected(pEntry);
@@ -962,7 +962,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox )
{
if(!CheckPasswd(pBox))
return 0;
- pBox->EnableTriState( FALSE );
+ pBox->EnableTriState( sal_False );
SvLBoxEntry* pEntry=aTree.FirstSelected();
DBG_ASSERT(pEntry,"kein Entry gefunden");
while( pEntry )
@@ -970,18 +970,18 @@ IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox )
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
pRepr->GetSectionData().SetHidden(STATE_CHECK == pBox->GetState());
Image aImage = BuildBitmap(STATE_CHECK == aProtectCB.GetState(),
- STATE_CHECK == pBox->GetState(), FALSE);
+ STATE_CHECK == pBox->GetState(), sal_False);
aTree.SetExpandedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
aTree.SetCollapsedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
Image aHCImg = BuildBitmap( STATE_CHECK == aProtectCB.GetState(),
- STATE_CHECK == pBox->GetState(), TRUE);
+ STATE_CHECK == pBox->GetState(), sal_True);
aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
pEntry = aTree.NextSelected(pEntry);
}
- BOOL bHide = STATE_CHECK == pBox->GetState();
+ sal_Bool bHide = STATE_CHECK == pBox->GetState();
aConditionED.Enable(bHide);
aConditionFT.Enable(bHide);
return 0;
@@ -995,7 +995,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeEditInReadonlyHdl, TriStateBox *, pBox )
{
if(!CheckPasswd(pBox))
return 0;
- pBox->EnableTriState( FALSE );
+ pBox->EnableTriState( sal_False );
SvLBoxEntry* pEntry=aTree.FirstSelected();
DBG_ASSERT(pEntry,"kein Entry gefunden");
while( pEntry )
@@ -1033,14 +1033,14 @@ IMPL_LINK( SwEditRegionDlg, ChangeDismissHdl, CheckBox *, EMPTYARG )
{
const SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
SvLBoxEntry* pRemove = 0;
- BOOL bRestart = FALSE;
+ sal_Bool bRestart = sal_False;
if(pSectRepr->IsSelected())
{
aSectReprArr.Insert( pSectRepr );
while( (pChild = aTree.FirstChild(pEntry) )!= 0 )
{
//durch das Umhaengen muss wieder am Anfang aufgesetzt werden
- bRestart = TRUE;
+ bRestart = sal_True;
pParent=aTree.GetParent(pEntry);
aTree.GetModel()->Move(pChild, pParent, aTree.GetModel()->GetRelPos(pEntry));
}
@@ -1056,21 +1056,21 @@ IMPL_LINK( SwEditRegionDlg, ChangeDismissHdl, CheckBox *, EMPTYARG )
if ( (pEntry=aTree.FirstSelected()) == 0 )
{
- aConditionFT. Enable(FALSE);
- aConditionED. Enable(FALSE);
- aDismiss. Enable(FALSE);
- aCurName. Enable(FALSE);
- aProtectCB. Enable(FALSE);
- aPasswdCB. Enable(FALSE);
- aHideCB. Enable(FALSE);
+ aConditionFT. Enable(sal_False);
+ aConditionED. Enable(sal_False);
+ aDismiss. Enable(sal_False);
+ aCurName. Enable(sal_False);
+ aProtectCB. Enable(sal_False);
+ aPasswdCB. Enable(sal_False);
+ aHideCB. Enable(sal_False);
// --> FME 2004-06-22 #114856# edit in readonly sections
- aEditInReadonlyCB.Enable(FALSE);
+ aEditInReadonlyCB.Enable(sal_False);
aEditInReadonlyCB.SetState(STATE_NOCHECK);
// <--
aProtectCB. SetState(STATE_NOCHECK);
- aPasswdCB. Check(FALSE);
+ aPasswdCB. Check(sal_False);
aHideCB. SetState(STATE_NOCHECK);
- aFileCB. Check(FALSE);
+ aFileCB. Check(sal_False);
//sonst liegt der Focus auf dem HelpButton
aOK.GrabFocus();
UseFileHdl(&aFileCB);
@@ -1086,22 +1086,22 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
if(!CheckPasswd(pBox))
return 0;
SvLBoxEntry* pEntry = aTree.FirstSelected();
- pBox->EnableTriState(FALSE);
- BOOL bMulti = 1 < aTree.GetSelectionCount();
- BOOL bFile = pBox->IsChecked();
+ pBox->EnableTriState(sal_False);
+ sal_Bool bMulti = 1 < aTree.GetSelectionCount();
+ sal_Bool bFile = pBox->IsChecked();
if(pEntry)
{
while(pEntry)
{
const SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
- BOOL bContent = pSectRepr->IsContent();
+ sal_Bool bContent = pSectRepr->IsContent();
if( pBox->IsChecked() && bContent && rSh.HasSelection() )
{
if( RET_NO == QueryBox( this, SW_RES(QB_CONNECT) ).Execute() )
- pBox->Check( FALSE );
+ pBox->Check( sal_False );
}
if( bFile )
- pSectRepr->SetContent(FALSE);
+ pSectRepr->SetContent(sal_False);
else
{
pSectRepr->SetFile(aEmptyStr);
@@ -1126,7 +1126,7 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
}
else
{
- aDDECB.Check(FALSE);
+ aDDECB.Check(sal_False);
DDEHdl(&aDDECB);
// aFileNameED.SetText(aEmptyStr);
aSubRegionED.SetText(aEmptyStr);
@@ -1134,16 +1134,16 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
}
else
{
- pBox->Check(FALSE);
- pBox->Enable(FALSE);
- aFilePB.Enable(FALSE);
- aFileNameED.Enable(FALSE);
- aFileNameFT.Enable(FALSE);
- aSubRegionED.Enable(FALSE);
- aSubRegionFT.Enable(FALSE);
- aDDECB.Check(FALSE);
- aDDECB.Enable(FALSE);
- aDDECommandFT.Enable(FALSE);
+ pBox->Check(sal_False);
+ pBox->Enable(sal_False);
+ aFilePB.Enable(sal_False);
+ aFileNameED.Enable(sal_False);
+ aFileNameFT.Enable(sal_False);
+ aSubRegionED.Enable(sal_False);
+ aSubRegionFT.Enable(sal_False);
+ aDDECB.Check(sal_False);
+ aDDECB.Enable(sal_False);
+ aDDECommandFT.Enable(sal_False);
}
return 0;
}
@@ -1220,19 +1220,19 @@ IMPL_LINK( SwEditRegionDlg, OptionsHdl, PushButton *, EMPTYARG )
*pFtnItem, *pEndItem, *pBalanceItem,
*pFrmDirItem, *pLRSpaceItem;
SfxItemState eColState = pOutSet->GetItemState(
- RES_COL, FALSE, &pColItem );
+ RES_COL, sal_False, &pColItem );
SfxItemState eBrushState = pOutSet->GetItemState(
- RES_BACKGROUND, FALSE, &pBrushItem );
+ RES_BACKGROUND, sal_False, &pBrushItem );
SfxItemState eFtnState = pOutSet->GetItemState(
- RES_FTN_AT_TXTEND, FALSE, &pFtnItem );
+ RES_FTN_AT_TXTEND, sal_False, &pFtnItem );
SfxItemState eEndState = pOutSet->GetItemState(
- RES_END_AT_TXTEND, FALSE, &pEndItem );
+ RES_END_AT_TXTEND, sal_False, &pEndItem );
SfxItemState eBalanceState = pOutSet->GetItemState(
- RES_COLUMNBALANCE, FALSE, &pBalanceItem );
+ RES_COLUMNBALANCE, sal_False, &pBalanceItem );
SfxItemState eFrmDirState = pOutSet->GetItemState(
- RES_FRAMEDIR, FALSE, &pFrmDirItem );
+ RES_FRAMEDIR, sal_False, &pFrmDirItem );
SfxItemState eLRState = pOutSet->GetItemState(
- RES_LR_SPACE, FALSE, &pLRSpaceItem);
+ RES_LR_SPACE, sal_False, &pLRSpaceItem);
if( SFX_ITEM_SET == eColState ||
SFX_ITEM_SET == eBrushState ||
@@ -1292,7 +1292,7 @@ IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit )
if( aDDECB.IsChecked() )
{
String sLink( pEdit->GetText() );
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while( STRING_NOTFOUND != (nPos = sLink.SearchAscii( " ", nPos )) )
sLink.Erase( nPos--, 1 );
@@ -1335,10 +1335,10 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox )
SvLBoxEntry* pEntry=aTree.FirstSelected();
if(pEntry)
{
- BOOL bFile = aFileCB.IsChecked();
+ sal_Bool bFile = aFileCB.IsChecked();
SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
SwSectionData & rData( pSectRepr->GetSectionData() );
- BOOL bDDE = pBox->IsChecked();
+ sal_Bool bDDE = pBox->IsChecked();
if(bDDE)
{
aFileNameFT.Hide();
@@ -1418,7 +1418,7 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox )
else
{
if(!bChange)
- aPasswdCB.Check(FALSE);
+ aPasswdCB.Check(sal_False);
break;
}
}
@@ -1487,7 +1487,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg )
sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
sFilterName = pMedium->GetFilter()->GetFilterName();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, FALSE, &pItem ) )
+ if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, sal_False, &pItem ) )
sPassword = ( (SfxStringItem*)pItem )->GetValue();
::lcl_ReadSections( *pMedium, aSubRegionED );
delete pMedium;
@@ -1542,7 +1542,7 @@ IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent *, pEvent )
/* -----------------------------08.05.2002 15:00------------------------------
---------------------------------------------------------------------------*/
-Image SwEditRegionDlg::BuildBitmap(BOOL bProtect,BOOL bHidden, BOOL bHighContrast)
+Image SwEditRegionDlg::BuildBitmap(sal_Bool bProtect,sal_Bool bHidden, sal_Bool bHighContrast)
{
ImageList& rImgLst = bHighContrast ? aImageILH : aImageIL;
return rImgLst.GetImage((!bHidden+(bProtect<<1)) + 1);
@@ -1564,7 +1564,7 @@ static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox )
nFormat == SOT_FORMATSTR_ID_STARWRITER_8 || nFormat == SOT_FORMATSTR_ID_STARWRITERGLOB_8)
SwGetReaderXML()->GetSectionList( rMedium, aArr );
- for( USHORT n = 0; n < aArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aArr.Count(); ++n )
rBox.InsertEntry( *aArr[ n ] );
aArr.DeleteAndDestroy(0, aArr.Count());
@@ -1593,7 +1593,7 @@ SwInsertSectionTabDialog::SwInsertSectionTabDialog(
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = pHtmlOpt->GetExportMode();
- BOOL bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
+ sal_Bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
if(bWeb)
{
RemoveTabPage(TP_SECTION_FTNENDNOTES);
@@ -1612,7 +1612,7 @@ SwInsertSectionTabDialog::~SwInsertSectionTabDialog()
/* -----------------21.05.99 10:23-------------------
*
* --------------------------------------------------*/
-void SwInsertSectionTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwInsertSectionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
if(TP_INSERT_SECTION == nId)
((SwInsertSectionTabPage&)rPage).SetWrtShell(rWrtSh);
@@ -1626,8 +1626,8 @@ void SwInsertSectionTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
{
const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)GetInputSetImpl()->Get(RES_FRM_SIZE);
((SwColumnPage&)rPage).SetPageWidth(rSize.GetWidth());
- ((SwColumnPage&)rPage).ShowBalance(TRUE);
- ((SwColumnPage&)rPage).SetInSection(TRUE);
+ ((SwColumnPage&)rPage).ShowBalance(sal_True);
+ ((SwColumnPage&)rPage).SetInSection(sal_True);
}
else if(TP_SECTION_INDENTS == nId)
((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh);
@@ -1657,7 +1657,7 @@ short SwInsertSectionTabDialog::Ok()
{
SfxRequest aRequest( pViewFrm, FN_INSERT_REGION);
const SfxPoolItem* pCol;
- if(SFX_ITEM_SET == pOutputItemSet->GetItemState(RES_COL, FALSE, &pCol))
+ if(SFX_ITEM_SET == pOutputItemSet->GetItemState(RES_COL, sal_False, &pCol))
{
aRequest.AppendItem(SfxUInt16Item(SID_ATTR_COLUMNS,
((const SwFmtCol*)pCol)->GetColumns().Count()));
@@ -1748,7 +1748,7 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh)
{
m_pWrtSh = &rSh;
- BOOL bWeb = 0 != PTR_CAST(SwWebDocShell, m_pWrtSh->GetView().GetDocShell());
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebDocShell, m_pWrtSh->GetView().GetDocShell());
if(bWeb)
{
aHideCB .Hide();
@@ -1782,11 +1782,11 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh)
/* -----------------21.05.99 10:32-------------------
*
* --------------------------------------------------*/
-BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
{
SwSectionData aSection(CONTENT_SECTION, aCurName.GetText());
aSection.SetCondition(aConditionED.GetText());
- BOOL bProtected = aProtectCB.IsChecked();
+ sal_Bool bProtected = aProtectCB.IsChecked();
aSection.SetProtectFlag(bProtected);
aSection.SetHidden(aHideCB.IsChecked());
// --> FME 2004-06-22 #114856# edit in readonly sections
@@ -1798,7 +1798,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
}
String sFileName = aFileNameED.GetText();
String sSubRegion = aSubRegionED.GetText();
- BOOL bDDe = aDDECB.IsChecked();
+ sal_Bool bDDe = aDDECB.IsChecked();
if(aFileCB.IsChecked() && (sFileName.Len() || sSubRegion.Len() || bDDe))
{
String aLinkFile;
@@ -1806,7 +1806,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
{
aLinkFile = sFileName;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while( STRING_NOTFOUND != (nPos = aLinkFile.SearchAscii( " ", nPos )) )
aLinkFile.Erase( nPos--, 1 );
@@ -1841,7 +1841,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
}
}
((SwInsertSectionTabDialog*)GetTabDialog())->SetSectionData(aSection);
- return TRUE;
+ return sal_True;
}
/* -----------------21.05.99 10:32-------------------
*
@@ -1863,7 +1863,7 @@ SfxTabPage* SwInsertSectionTabPage::Create( Window* pParent,
IMPL_LINK( SwInsertSectionTabPage, ChangeHideHdl, CheckBox *, pBox )
{
- BOOL bHide = pBox->IsChecked();
+ sal_Bool bHide = pBox->IsChecked();
aConditionED.Enable(bHide);
aConditionFT.Enable(bHide);
return 0;
@@ -1913,7 +1913,7 @@ IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton )
}
}
else if(!bChange)
- aPasswdCB.Check(FALSE);
+ aPasswdCB.Check(sal_False);
}
}
else
@@ -1942,10 +1942,10 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox )
{
if( m_pWrtSh->HasSelection() &&
RET_NO == QueryBox( this, SW_RES(QB_CONNECT) ).Execute() )
- pBox->Check( FALSE );
+ pBox->Check( sal_False );
}
- BOOL bFile = pBox->IsChecked();
+ sal_Bool bFile = pBox->IsChecked();
aFileNameFT.Enable(bFile);
aFileNameED.Enable(bFile);
aFilePB.Enable(bFile);
@@ -1957,11 +1957,11 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox )
{
// aFileNameED.SetText( aFileName );
aFileNameED.GrabFocus();
- aProtectCB.Check( TRUE );
+ aProtectCB.Check( sal_True );
}
else
{
- aDDECB.Check(FALSE);
+ aDDECB.Check(sal_False);
DDEHdl(&aDDECB);
// aFileNameED.SetText(aEmptyStr);
}
@@ -1989,8 +1989,8 @@ IMPL_LINK( SwInsertSectionTabPage, FileSearchHdl, PushButton *, EMPTYARG )
IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox )
{
- BOOL bDDE = pBox->IsChecked();
- BOOL bFile = aFileCB.IsChecked();
+ sal_Bool bDDE = pBox->IsChecked();
+ sal_Bool bFile = aFileCB.IsChecked();
aFilePB.Enable(!bDDE && bFile);
if(bDDE)
{
@@ -2022,7 +2022,7 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil
m_sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
m_sFilterName = pMedium->GetFilter()->GetFilterName();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, FALSE, &pItem ) )
+ if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, sal_False, &pItem ) )
m_sFilePasswd = ( (SfxStringItem*)pItem )->GetValue();
aFileNameED.SetText( INetURLObject::decode(
m_sFileName, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 ) );
@@ -2049,12 +2049,12 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil
// 5 - A, .., AA, .., - 9
// 6 - a, .., aa, .., - 10
-inline USHORT GetNumPos( USHORT n )
+inline sal_uInt16 GetNumPos( sal_uInt16 n )
{
return SVX_NUM_ARABIC < n ? n - 4 : n;
}
-inline SvxExtNumType GetNumType( USHORT n )
+inline SvxExtNumType GetNumType( sal_uInt16 n )
{
return (SvxExtNumType)(4 < n ? n + 4 : n );
}
@@ -2105,7 +2105,7 @@ SwSectionFtnEndTabPage::~SwSectionFtnEndTabPage()
{
}
-BOOL SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet )
{
SwFmtFtnAtTxtEnd aFtn( aFtnNtAtTextEndCB.IsChecked()
? ( aFtnNtNumCB.IsChecked()
@@ -2124,7 +2124,7 @@ BOOL SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet )
// no break;
case FTNEND_ATTXTEND_OWNNUMSEQ:
- aFtn.SetOffset( static_cast< USHORT >( aFtnOffsetFld.GetValue()-1 ) );
+ aFtn.SetOffset( static_cast< sal_uInt16 >( aFtnOffsetFld.GetValue()-1 ) );
// no break;
}
@@ -2145,17 +2145,17 @@ BOOL SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet )
// no break;
case FTNEND_ATTXTEND_OWNNUMSEQ:
- aEnd.SetOffset( static_cast< USHORT >( aEndOffsetFld.GetValue()-1 ) );
+ aEnd.SetOffset( static_cast< sal_uInt16 >( aEndOffsetFld.GetValue()-1 ) );
// no break;
}
rSet.Put( aFtn );
rSet.Put( aEnd );
- return TRUE;
+ return sal_True;
}
-void SwSectionFtnEndTabPage::ResetState( BOOL bFtn,
+void SwSectionFtnEndTabPage::ResetState( sal_Bool bFtn,
const SwFmtFtnEndAtTxtEnd& rAttr )
{
CheckBox *pNtAtTextEndCB, *pNtNumCB, *pNtNumFmtCB;
@@ -2192,7 +2192,7 @@ void SwSectionFtnEndTabPage::ResetState( BOOL bFtn,
pOffsetFld = &aEndOffsetFld;
}
- USHORT eState = rAttr.GetValue();
+ sal_uInt16 eState = rAttr.GetValue();
switch( eState )
{
// case FTNEND_ATPGORDOCEND:
@@ -2217,31 +2217,31 @@ void SwSectionFtnEndTabPage::ResetState( BOOL bFtn,
switch( eState )
{
case FTNEND_ATPGORDOCEND:
- pNtNumCB->Enable( FALSE );
+ pNtNumCB->Enable( sal_False );
// no break;
case FTNEND_ATTXTEND:
- pNtNumFmtCB->Enable( FALSE );
- pOffsetFld->Enable( FALSE );
- pOffsetTxt->Enable( FALSE );
+ pNtNumFmtCB->Enable( sal_False );
+ pOffsetFld->Enable( sal_False );
+ pOffsetTxt->Enable( sal_False );
// no break;
case FTNEND_ATTXTEND_OWNNUMSEQ:
- pNumViewBox->Enable( FALSE );
- pPrefixFT->Enable( FALSE );
- pPrefixED->Enable( FALSE );
- pSuffixFT->Enable( FALSE );
- pSuffixED->Enable( FALSE );
+ pNumViewBox->Enable( sal_False );
+ pPrefixFT->Enable( sal_False );
+ pPrefixED->Enable( sal_False );
+ pSuffixFT->Enable( sal_False );
+ pSuffixED->Enable( sal_False );
// no break;
}
}
void SwSectionFtnEndTabPage::Reset( const SfxItemSet& rSet )
{
- ResetState( TRUE, (const SwFmtFtnAtTxtEnd&)rSet.Get(
- RES_FTN_AT_TXTEND, FALSE ));
- ResetState( FALSE, (const SwFmtEndAtTxtEnd&)rSet.Get(
- RES_END_AT_TXTEND, FALSE ));
+ ResetState( sal_True, (const SwFmtFtnAtTxtEnd&)rSet.Get(
+ RES_FTN_AT_TXTEND, sal_False ));
+ ResetState( sal_False, (const SwFmtEndAtTxtEnd&)rSet.Get(
+ RES_END_AT_TXTEND, sal_False ));
}
SfxTabPage* SwSectionFtnEndTabPage::Create( Window* pParent,
@@ -2252,8 +2252,8 @@ SfxTabPage* SwSectionFtnEndTabPage::Create( Window* pParent,
IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox )
{
-// pBox->EnableTriState( FALSE );
- BOOL bFoot = &aFtnNtAtTextEndCB == pBox || &aFtnNtNumCB == pBox ||
+// pBox->EnableTriState( sal_False );
+ sal_Bool bFoot = &aFtnNtAtTextEndCB == pBox || &aFtnNtNumCB == pBox ||
&aFtnNtNumFmtCB == pBox ;
CheckBox *pNumBox, *pNumFmtBox, *pEndBox;
@@ -2290,9 +2290,9 @@ IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox )
pSuffixED = &aEndSuffixED;
}
- BOOL bEnableAtEnd = STATE_CHECK == pEndBox->GetState();
- BOOL bEnableNum = bEnableAtEnd && STATE_CHECK == pNumBox->GetState();
- BOOL bEnableNumFmt = bEnableNum && STATE_CHECK == pNumFmtBox->GetState();
+ sal_Bool bEnableAtEnd = STATE_CHECK == pEndBox->GetState();
+ sal_Bool bEnableNum = bEnableAtEnd && STATE_CHECK == pNumBox->GetState();
+ sal_Bool bEnableNumFmt = bEnableNum && STATE_CHECK == pNumFmtBox->GetState();
pNumBox->Enable( bEnableAtEnd );
pOffsetTxt->Enable( bEnableNum );
@@ -2325,7 +2325,7 @@ SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = pHtmlOpt->GetExportMode();
- BOOL bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
+ sal_Bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
if(bWeb)
{
RemoveTabPage(TP_SECTION_FTNENDNOTES);
@@ -2343,7 +2343,7 @@ SwSectionPropertyTabDialog::~SwSectionPropertyTabDialog()
/* -----------------21.05.99 13:59-------------------
*
* --------------------------------------------------*/
-void SwSectionPropertyTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwSectionPropertyTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
if( TP_BACKGROUND == nId )
{
@@ -2353,8 +2353,8 @@ void SwSectionPropertyTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
}
else if( TP_COLUMN == nId )
{
- ((SwColumnPage&)rPage).ShowBalance(TRUE);
- ((SwColumnPage&)rPage).SetInSection(TRUE);
+ ((SwColumnPage&)rPage).ShowBalance(sal_True);
+ ((SwColumnPage&)rPage).SetInSection(sal_True);
}
else if(TP_SECTION_INDENTS == nId)
((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh);
@@ -2385,7 +2385,7 @@ SwSectionIndentTabPage::~SwSectionIndentTabPage()
/*-- 13.06.2003 09:59:23---------------------------------------------------
-----------------------------------------------------------------------*/
-BOOL SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet)
+sal_Bool SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet)
{
if(aBeforeMF.IsValueModified() ||
aAfterMF.IsValueModified())
@@ -2395,7 +2395,7 @@ BOOL SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet)
static_cast< long >(aAfterMF.Denormalize(aAfterMF.GetValue(FUNIT_TWIP))), 0, 0, RES_LR_SPACE);
rSet.Put(aLRSpace);
}
- return TRUE;
+ return sal_True;
}
/*-- 13.06.2003 09:59:24---------------------------------------------------
@@ -2403,7 +2403,7 @@ BOOL SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet)
void SwSectionIndentTabPage::Reset( const SfxItemSet& rSet)
{
//this page doesn't show up in HTML mode
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aBeforeMF, aMetric);
SetMetric(aAfterMF , aMetric);
@@ -2451,7 +2451,7 @@ IMPL_LINK(SwSectionIndentTabPage, IndentModifyHdl, MetricField*, EMPTYARG)
{
aPreviewWin.SetLeftMargin( static_cast< long >(aBeforeMF.Denormalize(aBeforeMF.GetValue(FUNIT_TWIP))) );
aPreviewWin.SetRightMargin( static_cast< long >(aAfterMF.Denormalize(aAfterMF.GetValue(FUNIT_TWIP))) );
- aPreviewWin.Draw(TRUE);
+ aPreviewWin.Draw(sal_True);
return 0;
}
diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index cc789d6e4498..96ad51872363 100755
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -139,7 +139,7 @@ void SwGlossaryHdl::GlossaryDlg()
------------------------------------------------------------------------*/
-void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreateNew )
+void SwGlossaryHdl::SetCurGroup(const String &rGrp, sal_Bool bApi, sal_Bool bAlwaysCreateNew )
{
String sGroup(rGrp);
if(STRING_NOTFOUND == sGroup.Search(GLOS_DELIM) && !FindGroupName(sGroup))
@@ -149,7 +149,7 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
}
if(pCurGrp)
{
- BOOL bPathEqual = FALSE;
+ sal_Bool bPathEqual = sal_False;
if(!bAlwaysCreateNew)
{
INetURLObject aTemp( pCurGrp->GetFileName() );
@@ -157,8 +157,8 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
aTemp.removeSegment();
const String sCurEntryPath = aTemp.GetMainURL(INetURLObject::NO_DECODE);
const SvStrings* pPathArr = rStatGlossaries.GetPathArray();
- USHORT nCurrentPath = USHRT_MAX;
- for(USHORT nPath = 0; nPath < pPathArr->Count(); nPath++)
+ sal_uInt16 nCurrentPath = USHRT_MAX;
+ for(sal_uInt16 nPath = 0; nPath < pPathArr->Count(); nPath++)
{
if(sCurEntryPath == *(*pPathArr)[nPath])
{
@@ -167,10 +167,10 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
}
}
String sPath = sGroup.GetToken(1, GLOS_DELIM);
- USHORT nComparePath = (USHORT)sPath.ToInt32();
+ sal_uInt16 nComparePath = (sal_uInt16)sPath.ToInt32();
if(nCurrentPath == nComparePath &&
sGroup.GetToken(0, GLOS_DELIM) == sCurBase)
- bPathEqual = TRUE;
+ bPathEqual = sal_True;
}
// const String aMac_Tmp(pCurGrp->GetName());
// Beim Pfadwechsel kann man sich auf den Namen nicht verlassen
@@ -188,7 +188,7 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
rStatGlossaries.PutGroupDoc(pCurGrp);
pCurGrp = 0;
}
- pCurGrp = rStatGlossaries.GetGroupDoc(aCurGrp, TRUE);
+ pCurGrp = rStatGlossaries.GetGroupDoc(aCurGrp, sal_True);
}
}
@@ -197,7 +197,7 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
------------------------------------------------------------------------*/
-USHORT SwGlossaryHdl::GetGroupCnt() const
+sal_uInt16 SwGlossaryHdl::GetGroupCnt() const
{
return rStatGlossaries.GetGroupCnt();
}
@@ -207,12 +207,12 @@ USHORT SwGlossaryHdl::GetGroupCnt() const
------------------------------------------------------------------------*/
-String SwGlossaryHdl::GetGroupName( USHORT nId, String* pTitle )
+String SwGlossaryHdl::GetGroupName( sal_uInt16 nId, String* pTitle )
{
String sRet = rStatGlossaries.GetGroupName(nId);
if(pTitle)
{
- SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sRet, FALSE);
+ SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sRet, sal_False);
if(pGroup && !pGroup->GetError())
{
*pTitle = pGroup->GetName();
@@ -233,7 +233,7 @@ String SwGlossaryHdl::GetGroupName( USHORT nId, String* pTitle )
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::NewGroup(String &rGrpName, const String& rTitle)
+sal_Bool SwGlossaryHdl::NewGroup(String &rGrpName, const String& rTitle)
{
if(STRING_NOTFOUND == rGrpName.Search(GLOS_DELIM))
FindGroupName(rGrpName);
@@ -242,20 +242,20 @@ BOOL SwGlossaryHdl::NewGroup(String &rGrpName, const String& rTitle)
/* -----------------23.11.98 13:10-------------------
* Umbenennen eines Textbausteins
* --------------------------------------------------*/
-BOOL SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const String& rNewTitle)
+sal_Bool SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const String& rNewTitle)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sOldGroup(rOld);
if(STRING_NOTFOUND == rOld.Search(GLOS_DELIM))
FindGroupName(sOldGroup);
if(rOld == rNew)
{
- SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sOldGroup, FALSE);
+ SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sOldGroup, sal_False);
if(pGroup)
{
pGroup->SetName(rNewTitle);
rStatGlossaries.PutGroupDoc( pGroup );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else
@@ -274,23 +274,23 @@ BOOL SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const String&
/* -----------------27.11.98 13:49-------------------
*
* --------------------------------------------------*/
-BOOL SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSourceShortName,
- const String& rDestGroupName, const String& rLongName, BOOL bMove )
+sal_Bool SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSourceShortName,
+ const String& rDestGroupName, const String& rLongName, sal_Bool bMove )
{
- SwTextBlocks* pSourceGroup = rStatGlossaries.GetGroupDoc(rSourceGroupName, FALSE);
+ SwTextBlocks* pSourceGroup = rStatGlossaries.GetGroupDoc(rSourceGroupName, sal_False);
- SwTextBlocks* pDestGroup = rStatGlossaries.GetGroupDoc(rDestGroupName, FALSE);
+ SwTextBlocks* pDestGroup = rStatGlossaries.GetGroupDoc(rDestGroupName, sal_False);
if(pDestGroup->IsReadOnly() || (bMove && pSourceGroup->IsReadOnly()) )
- return FALSE;
+ return sal_False;
/*if(pDestGroup->IsOld()&& 0!= pDestGroup->ConvertToNew())
- return FALSE;
+ return sal_False;
if(bMove && pSourceGroup->IsOld() && 0 != pSourceGroup->ConvertToNew())
- return FALSE;*/
+ return sal_False;*/
//Der Index muss hier ermittelt werden, weil rSourceShortName in CopyBlock evtl veraendert wird
- USHORT nDeleteIdx = pSourceGroup->GetIndex( rSourceShortName );
+ sal_uInt16 nDeleteIdx = pSourceGroup->GetIndex( rSourceShortName );
DBG_ASSERT(USHRT_MAX != nDeleteIdx, "Eintrag nicht gefunden");
- ULONG nRet = pSourceGroup->CopyBlock( *pDestGroup, rSourceShortName, rLongName );
+ sal_uLong nRet = pSourceGroup->CopyBlock( *pDestGroup, rSourceShortName, rLongName );
if(!nRet && bMove)
{
// der Index muss existieren
@@ -306,7 +306,7 @@ BOOL SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSource
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::DelGroup(const String &rGrpName)
+sal_Bool SwGlossaryHdl::DelGroup(const String &rGrpName)
{
String sGroup(rGrpName);
if(STRING_NOTFOUND == sGroup.Search(GLOS_DELIM))
@@ -319,9 +319,9 @@ BOOL SwGlossaryHdl::DelGroup(const String &rGrpName)
if(aMac_Tmp == sGroup)
DELETEZ(pCurGrp);
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
@@ -329,7 +329,7 @@ BOOL SwGlossaryHdl::DelGroup(const String &rGrpName)
------------------------------------------------------------------------*/
-USHORT SwGlossaryHdl::GetGlossaryCnt()
+sal_uInt16 SwGlossaryHdl::GetGlossaryCnt()
{
return pCurGrp ? pCurGrp->GetCount() : 0;
}
@@ -339,7 +339,7 @@ USHORT SwGlossaryHdl::GetGlossaryCnt()
------------------------------------------------------------------------*/
-String SwGlossaryHdl::GetGlossaryName( USHORT nId )
+String SwGlossaryHdl::GetGlossaryName( sal_uInt16 nId )
{
ASSERT(nId < GetGlossaryCnt(), Textbausteinarray ueberindiziert.);
return pCurGrp->GetLongName( nId );
@@ -347,7 +347,7 @@ String SwGlossaryHdl::GetGlossaryName( USHORT nId )
/* -----------------30.11.98 13:18-------------------
*
* --------------------------------------------------*/
-String SwGlossaryHdl::GetGlossaryShortName(USHORT nId)
+String SwGlossaryHdl::GetGlossaryShortName(sal_uInt16 nId)
{
ASSERT(nId < GetGlossaryCnt(), Textbausteinarray ueberindiziert.);
return pCurGrp->GetShortName( nId );
@@ -363,11 +363,11 @@ String SwGlossaryHdl::GetGlossaryShortName(const String &rName)
{
String sReturn;
SwTextBlocks *pTmp =
- pCurGrp ? pCurGrp: rStatGlossaries.GetGroupDoc( aCurGrp, FALSE );
+ pCurGrp ? pCurGrp: rStatGlossaries.GetGroupDoc( aCurGrp, sal_False );
if(pTmp)
{
- USHORT nIdx = pTmp->GetLongIndex( rName );
- if( nIdx != (USHORT) -1 )
+ sal_uInt16 nIdx = pTmp->GetLongIndex( rName );
+ if( nIdx != (sal_uInt16) -1 )
sReturn = pTmp->GetShortName( nIdx );
if( !pCurGrp )
rStatGlossaries.PutGroupDoc( pTmp );
@@ -380,11 +380,11 @@ String SwGlossaryHdl::GetGlossaryShortName(const String &rName)
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::HasShortName(const String& rShortName) const
+sal_Bool SwGlossaryHdl::HasShortName(const String& rShortName) const
{
SwTextBlocks *pBlock = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc( aCurGrp );
- BOOL bRet = pBlock->GetIndex( rShortName ) != (USHORT) -1;
+ sal_Bool bRet = pBlock->GetIndex( rShortName ) != (sal_uInt16) -1;
if( !pCurGrp )
rStatGlossaries.PutGroupDoc( pBlock );
return bRet;
@@ -393,7 +393,7 @@ BOOL SwGlossaryHdl::HasShortName(const String& rShortName) const
/* -----------------------------20.03.01 10:52--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::ConvertToNew(SwTextBlocks& /*rOld*/)
+sal_Bool SwGlossaryHdl::ConvertToNew(SwTextBlocks& /*rOld*/)
{
/*if( rOld.IsOld() )
{
@@ -403,70 +403,70 @@ BOOL SwGlossaryHdl::ConvertToNew(SwTextBlocks& /*rOld*/)
if( rOld.ConvertToNew() )
{
InfoBox(pWrtShell->GetView().GetWindow(), SW_RES(MSG_ERR_INSERT_GLOS)).Execute();
- return FALSE;
+ return sal_False;
}
}
else
- return FALSE;
+ return sal_False;
}*/
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Beschreibung: Erzeugen eines Textbausteines
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::NewGlossary(const String& rName, const String& rShortName,
- BOOL bCreateGroup, BOOL bNoAttr)
+sal_Bool SwGlossaryHdl::NewGlossary(const String& rName, const String& rShortName,
+ sal_Bool bCreateGroup, sal_Bool bNoAttr)
{
SwTextBlocks *pTmp =
pCurGrp ? pCurGrp: rStatGlossaries.GetGroupDoc( aCurGrp, bCreateGroup );
//pTmp == 0 if the AutoText path setting is wrong
if(!pTmp)
- return FALSE;
+ return sal_False;
if(!ConvertToNew(*pTmp))
- return FALSE;
+ return sal_False;
String sOnlyTxt;
String* pOnlyTxt = 0;
if( bNoAttr )
{
if( !pWrtShell->GetSelectedText( sOnlyTxt, GETSELTXT_PARABRK_TO_ONLYCR ))
- return FALSE;
+ return sal_False;
pOnlyTxt = &sOnlyTxt;
}
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
- const USHORT nSuccess = pWrtShell->MakeGlossary( *pTmp, rName, rShortName,
+ const sal_uInt16 nSuccess = pWrtShell->MakeGlossary( *pTmp, rName, rShortName,
pCfg->IsSaveRelFile(), pOnlyTxt );
- if(nSuccess == (USHORT) -1 )
+ if(nSuccess == (sal_uInt16) -1 )
{
InfoBox(pWrtShell->GetView().GetWindow(), SW_RES(MSG_ERR_INSERT_GLOS)).Execute();
}
if( !pCurGrp )
rStatGlossaries.PutGroupDoc( pTmp );
- return BOOL( nSuccess != (USHORT) -1 );
+ return sal_Bool( nSuccess != (sal_uInt16) -1 );
}
/*------------------------------------------------------------------------
Beschreibung: Loeschen eines Textbausteines
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::DelGlossary(const String &rShortName)
+sal_Bool SwGlossaryHdl::DelGlossary(const String &rShortName)
{
SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
//pTmp == 0 if the AutoText path setting is wrong
if(!pGlossary || !ConvertToNew(*pGlossary))
- return FALSE;
+ return sal_False;
- USHORT nIdx = pGlossary->GetIndex( rShortName );
- if( nIdx != (USHORT) -1 )
+ sal_uInt16 nIdx = pGlossary->GetIndex( rShortName );
+ if( nIdx != (sal_uInt16) -1 )
pGlossary->Delete( nIdx );
if( !pCurGrp )
rStatGlossaries.PutGroupDoc( pGlossary );
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
@@ -474,7 +474,7 @@ BOOL SwGlossaryHdl::DelGlossary(const String &rShortName)
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::ExpandGlossary()
+sal_Bool SwGlossaryHdl::ExpandGlossary()
{
ASSERT(pWrtShell->CanInsert(), illegal);
SwTextBlocks *pGlossary;
@@ -508,37 +508,37 @@ BOOL SwGlossaryHdl::ExpandGlossary()
if(pWrtShell->IsSelection())
aShortName = pWrtShell->GetSelTxt();
}
- return pGlossary ? Expand( aShortName, &rStatGlossaries, pGlossary ) : FALSE;
+ return pGlossary ? Expand( aShortName, &rStatGlossaries, pGlossary ) : sal_False;
}
-BOOL SwGlossaryHdl::Expand( const String& rShortName,
+sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
SwGlossaries *pGlossaries,
SwTextBlocks *pGlossary )
{
TextBlockInfoArr aFoundArr;
String aShortName( rShortName );
- BOOL bCancel = FALSE;
+ sal_Bool bCancel = sal_False;
// search for text block
//#b6633427# - don't prefer current group depending on configuration setting
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
- USHORT nFound = !pCfg->IsSearchInAllCategories() ? pGlossary->GetIndex( aShortName ) : -1;
+ sal_uInt16 nFound = !pCfg->IsSearchInAllCategories() ? pGlossary->GetIndex( aShortName ) : -1;
// if not found then search in all groups
- if( nFound == (USHORT) -1 )
+ if( nFound == (sal_uInt16) -1 )
{
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
SwGlossaryList* pGlossaryList = ::GetGlossaryList();
- USHORT nGroupCount = pGlossaryList->GetGroupCount();
- for(USHORT i = 1; i <= nGroupCount; i++)
+ sal_uInt16 nGroupCount = pGlossaryList->GetGroupCount();
+ for(sal_uInt16 i = 1; i <= nGroupCount; i++)
{
// Gruppenname mit Pfad-Extension besorgen
String sTitle;
- String sGroupName = pGlossaryList->GetGroupName(i - 1, FALSE, &sTitle);
+ String sGroupName = pGlossaryList->GetGroupName(i - 1, sal_False, &sTitle);
if(sGroupName == pGlossary->GetName())
continue;
- USHORT nBlockCount = pGlossaryList->GetBlockCount(i -1);
+ sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1);
if(nBlockCount)
{
- for(USHORT j = 0; j < nBlockCount; j++)
+ for(sal_uInt16 j = 0; j < nBlockCount; j++)
{
String sEntry;
String sLongName(pGlossaryList->GetBlockName(i - 1, j, sEntry));
@@ -569,13 +569,13 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
AbstarctSwSelGlossaryDlg* pDlg = pFact->CreateSwSelGlossaryDlg( 0, aShortName, DLG_SEL_GLOS );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
- for(USHORT i = 0; i < aFoundArr.Count(); ++i)
+ for(sal_uInt16 i = 0; i < aFoundArr.Count(); ++i)
{
TextBlockInfo_Impl* pData = aFoundArr.GetObject(i);
pDlg->InsertGlos(pData->sTitle, pData->sLongName);
}
pDlg->SelectEntryPos(0);
- const USHORT nRet = RET_OK == pDlg->Execute()?
+ const sal_uInt16 nRet = RET_OK == pDlg->Execute()?
pDlg->GetSelectedIdx():
LISTBOX_ENTRY_NOTFOUND;
delete pDlg;
@@ -587,21 +587,21 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
}
else
{
- nFound = (USHORT) -1;
- bCancel = TRUE;
+ nFound = (sal_uInt16) -1;
+ bCancel = sal_True;
}
}
}
}
// nicht gefunden
- if( nFound == (USHORT) -1 )
+ if( nFound == (sal_uInt16) -1 )
{
if( !bCancel )
{
pGlossaries->PutGroupDoc(pGlossary);
- const USHORT nMaxLen = 50;
+ const sal_uInt16 nMaxLen = 50;
if(pWrtShell->IsSelection() && aShortName.Len() > nMaxLen)
{
aShortName.Erase(nMaxLen);
@@ -612,7 +612,7 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute();
}
- return FALSE;
+ return sal_False;
}
else
{
@@ -633,7 +633,7 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
pWrtShell->StartAllAction();
// alle InputFelder zwischenspeichern
- SwInputFieldList aFldLst( pWrtShell, TRUE );
+ SwInputFieldList aFldLst( pWrtShell, sal_True );
pWrtShell->InsertGlossary(*pGlossary, aShortName);
pWrtShell->EndAllAction();
@@ -648,7 +648,7 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
pWrtShell->UpdateInputFlds( &aFldLst );
}
pGlossaries->PutGroupDoc(pGlossary);
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
@@ -656,7 +656,7 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::InsertGlossary(const String &rName)
+sal_Bool SwGlossaryHdl::InsertGlossary(const String &rName)
{
ASSERT(pWrtShell->CanInsert(), illegal);
@@ -664,7 +664,7 @@ BOOL SwGlossaryHdl::InsertGlossary(const String &rName)
pCurGrp? pCurGrp: rStatGlossaries.GetGroupDoc(aCurGrp);
if (!pGlos)
- return FALSE;
+ return sal_False;
SvxMacro aStartMacro(aEmptyStr, aEmptyStr, STARBASIC);
SvxMacro aEndMacro(aEmptyStr, aEmptyStr, STARBASIC);
@@ -681,7 +681,7 @@ BOOL SwGlossaryHdl::InsertGlossary(const String &rName)
pWrtShell->StartAllAction();
// alle InputFelder zwischenspeichern
- SwInputFieldList aFldLst( pWrtShell, TRUE );
+ SwInputFieldList aFldLst( pWrtShell, sal_True );
pWrtShell->InsertGlossary(*pGlos, rName);
pWrtShell->EndAllAction();
@@ -696,7 +696,7 @@ BOOL SwGlossaryHdl::InsertGlossary(const String &rName)
if(!pCurGrp)
rStatGlossaries.PutGroupDoc(pGlos);
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
@@ -717,7 +717,7 @@ void SwGlossaryHdl::SetMacros(const String& rShortName,
aMacroTbl.Insert( SW_EVENT_START_INS_GLOSSARY, new SvxMacro(*pStart));
if( pEnd )
aMacroTbl.Insert( SW_EVENT_END_INS_GLOSSARY, new SvxMacro(*pEnd));
- USHORT nIdx = pGlos->GetIndex( rShortName );
+ sal_uInt16 nIdx = pGlos->GetIndex( rShortName );
if( !pGlos->SetMacroTable( nIdx, aMacroTbl ) && pGlos->GetError() )
ErrorHandler::HandleError( pGlos->GetError() );
@@ -733,7 +733,7 @@ void SwGlossaryHdl::GetMacros( const String &rShortName,
SwTextBlocks *pGlos = pGlossary ? pGlossary
: pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
- USHORT nIndex = pGlos->GetIndex( rShortName );
+ sal_uInt16 nIndex = pGlos->GetIndex( rShortName );
if( nIndex != USHRT_MAX )
{
SvxMacroTableDtor aMacroTbl;
@@ -780,20 +780,20 @@ SwGlossaryHdl::~SwGlossaryHdl()
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::Rename(const String& rOldShort, const String& rNewShortName,
+sal_Bool SwGlossaryHdl::Rename(const String& rOldShort, const String& rNewShortName,
const String& rNewName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
if(pGlossary)
{
if(!ConvertToNew(*pGlossary))
- return FALSE;
+ return sal_False;
- USHORT nIdx = pGlossary->GetIndex( rOldShort );
- USHORT nOldLongIdx = pGlossary->GetLongIndex( rNewName );
- USHORT nOldIdx = pGlossary->GetIndex( rNewShortName );
+ sal_uInt16 nIdx = pGlossary->GetIndex( rOldShort );
+ sal_uInt16 nOldLongIdx = pGlossary->GetLongIndex( rNewName );
+ sal_uInt16 nOldIdx = pGlossary->GetIndex( rNewShortName );
if( nIdx != USHRT_MAX &&
(nOldLongIdx == USHRT_MAX || nOldLongIdx == nIdx )&&
@@ -811,7 +811,7 @@ BOOL SwGlossaryHdl::Rename(const String& rOldShort, const String& rNewShortName,
}
-BOOL SwGlossaryHdl::IsReadOnly( const String* pGrpNm ) const
+sal_Bool SwGlossaryHdl::IsReadOnly( const String* pGrpNm ) const
{
SwTextBlocks *pGlossary = 0;
@@ -822,18 +822,18 @@ BOOL SwGlossaryHdl::IsReadOnly( const String* pGrpNm ) const
else
pGlossary = rStatGlossaries.GetGroupDoc(aCurGrp);
- BOOL bRet = pGlossary ? pGlossary->IsReadOnly() : TRUE;
+ sal_Bool bRet = pGlossary ? pGlossary->IsReadOnly() : sal_True;
if( pGrpNm || !pCurGrp )
delete pGlossary;
return bRet;
}
-BOOL SwGlossaryHdl::IsOld() const
+sal_Bool SwGlossaryHdl::IsOld() const
{
SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
- BOOL bRet = pGlossary ? pGlossary->IsOld() : FALSE;
+ sal_Bool bRet = pGlossary ? pGlossary->IsOld() : sal_False;
if( !pCurGrp )
delete pGlossary;
return bRet;
@@ -842,7 +842,7 @@ BOOL SwGlossaryHdl::IsOld() const
/*-----------------09.06.97 16:15-------------------
Gruppe ohne Pfadindex finden
--------------------------------------------------*/
-BOOL SwGlossaryHdl::FindGroupName(String & rGroup)
+sal_Bool SwGlossaryHdl::FindGroupName(String & rGroup)
{
return rStatGlossaries.FindGroupName(rGroup);
}
@@ -850,7 +850,7 @@ BOOL SwGlossaryHdl::FindGroupName(String & rGroup)
/* -----------------29.07.99 08:34-------------------
--------------------------------------------------*/
-BOOL SwGlossaryHdl::CopyToClipboard(SwWrtShell& rSh, const String& rShortName)
+sal_Bool SwGlossaryHdl::CopyToClipboard(SwWrtShell& rSh, const String& rShortName)
{
SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
@@ -865,16 +865,16 @@ BOOL SwGlossaryHdl::CopyToClipboard(SwWrtShell& rSh, const String& rShortName)
return 0 != nRet;
}
-BOOL SwGlossaryHdl::ImportGlossaries( const String& rName )
+sal_Bool SwGlossaryHdl::ImportGlossaries( const String& rName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rName.Len() )
{
const SfxFilter* pFilter = 0;
- SfxMedium* pMed = new SfxMedium( rName, STREAM_READ, TRUE, 0, 0 );
+ SfxMedium* pMed = new SfxMedium( rName, STREAM_READ, sal_True, 0, 0 );
SfxFilterMatcher aMatcher( String::CreateFromAscii("swriter") );
- pMed->UseInteractionHandler( TRUE );
- if( !aMatcher.GuessFilter( *pMed, &pFilter, FALSE ) )
+ pMed->UseInteractionHandler( sal_True );
+ if( !aMatcher.GuessFilter( *pMed, &pFilter, sal_False ) )
{
SwTextBlocks *pGlossary;
pMed->SetFilter( pFilter );
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 8220c7ee2c8d..beb296272af5 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -138,9 +138,9 @@
#include <vcl/svapp.hxx>
#include <swserv.hxx>
-extern BOOL bFrmDrag;
-extern BOOL bDDINetAttr;
-extern BOOL bExecuteDrag;
+extern sal_Bool bFrmDrag;
+extern sal_Bool bDDINetAttr;
+extern sal_Bool bExecuteDrag;
#define OLESIZE 11905 - 2 * lMinBorder, 6 * MM50
@@ -187,11 +187,11 @@ class SwTrnsfrDdeLink : public ::sfx2::SvBaseLink
::sfx2::SvLinkSourceRef refObj;
SwTransferable& rTrnsfr;
SwDocShell* pDocShell;
- ULONG nOldTimeOut;
- BOOL bDelBookmrk : 1;
- BOOL bInDisconnect : 1;
+ sal_uLong nOldTimeOut;
+ sal_Bool bDelBookmrk : 1;
+ sal_Bool bInDisconnect : 1;
- BOOL FindDocShell();
+ sal_Bool FindDocShell();
using sfx2::SvBaseLink::Disconnect;
@@ -205,9 +205,9 @@ public:
const uno::Any & rValue );
virtual void Closed();
- BOOL WriteData( SvStream& rStrm );
+ sal_Bool WriteData( SvStream& rStrm );
- void Disconnect( BOOL bRemoveDataAdvise );
+ void Disconnect( sal_Bool bRemoveDataAdvise );
};
// helper class for Action and Undo enclosing
@@ -218,7 +218,7 @@ class SwTrnsfrActionAndUndo
public:
SwTrnsfrActionAndUndo( SwWrtShell *pS, SwUndoId nId,
const SwRewriter * pRewriter = 0,
- BOOL bDelSel = FALSE)
+ sal_Bool bDelSel = sal_False)
: pSh( pS ), eUndoId( nId )
{
pSh->StartUndo( eUndoId, pRewriter );
@@ -275,7 +275,7 @@ SwTransferable::~SwTransferable()
// der DDELink braucht noch die WrtShell!
if( refDdeLink.Is() )
{
- ((SwTrnsfrDdeLink*)&refDdeLink)->Disconnect( TRUE );
+ ((SwTrnsfrDdeLink*)&refDdeLink)->Disconnect( sal_True );
refDdeLink.Clear();
}
@@ -469,7 +469,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
Point aPos( SwEditWin::GetDDStartPosX(), SwEditWin::GetDDStartPosY());
- BOOL bSelect = bExecuteDrag &&
+ sal_Bool bSelect = bExecuteDrag &&
pWrtShell->GetView().GetDocShell() &&
!pWrtShell->GetView().GetDocShell()->IsReadOnly();
if( pWrtShell->GetContentAtPos( aPos, aCntntAtPos, bSelect ) )
@@ -688,7 +688,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, sal_False );
// mba: no BaseURL for clipboard
SfxMedium aMedium( xWorkStore, String() );
- bRet = pEmbObj->DoSaveObjectAs( aMedium, FALSE );
+ bRet = pEmbObj->DoSaveObjectAs( aMedium, sal_False );
pEmbObj->DoSaveCompleted();
uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY );
@@ -703,7 +703,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
delete pSrcStm;
}
- bRet = TRUE;
+ bRet = sal_True;
xWorkStore->dispose();
xWorkStore = uno::Reference < embed::XStorage >();
@@ -746,7 +746,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
xWrt->SetAsciiOptions( aAOpt );
// #102841# no start char for clipboard
- xWrt->bUCS2_WithStartChar = FALSE;
+ xWrt->bUCS2_WithStartChar = sal_False;
}
break;
}
@@ -754,9 +754,9 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
if( xWrt.Is() )
{
SwDoc* pDoc = (SwDoc*)pObject;
- xWrt->bWriteClipboardDoc = TRUE;
+ xWrt->bWriteClipboardDoc = sal_True;
xWrt->bWriteOnlyFirstTable = 0 != (TRNSFR_TABELLE & eBufferType);
- xWrt->SetShowProgress( FALSE );
+ xWrt->SetShowProgress( sal_False );
SwWriter aWrt( *xStream, *pDoc );
if( !IsError( aWrt.Write( xWrt )) )
{
@@ -773,7 +773,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
int SwTransferable::Cut()
{
- int nRet = Copy( TRUE );
+ int nRet = Copy( sal_True );
if( nRet )
DeleteSelection();
return nRet;
@@ -796,7 +796,7 @@ void SwTransferable::DeleteSelection()
// -----------------------------------------------------------------------
-int SwTransferable::PrepareForCopy( BOOL bIsCut )
+int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
{
int nRet = 1;
if(!pWrtShell)
@@ -856,7 +856,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
{
SwWait *pWait = 0;
if( pWrtShell->ShouldWait() )
- pWait = new SwWait( *pWrtShell->GetView().GetDocShell(), TRUE );
+ pWait = new SwWait( *pWrtShell->GetView().GetDocShell(), sal_True );
pClpDocFac = new SwDocFac;
@@ -901,7 +901,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
else
{
eBufferType = TRNSFR_DOCUMENT;
- if (pWrtShell->IntelligentCut(nSelection, FALSE) != SwWrtShell::NO_WORD)
+ if (pWrtShell->IntelligentCut(nSelection, sal_False) != SwWrtShell::NO_WORD)
eBufferType = (TransferBufferType)(TRNSFR_DOCUMENT_WORD | eBufferType);
}
@@ -970,7 +970,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
//ObjectDescriptor wurde bereits aus der alten DocShell gefuellt.
//Jetzt noch anpassen. Dadurch kann im GetData die erste Anfrage
//auch noch mit delayed rendering beantwortet werden.
- aObjDesc.mbCanLink = FALSE;
+ aObjDesc.mbCanLink = sal_False;
Size aSz( OLESIZE );
aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM );
@@ -1004,7 +1004,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
return nRet;
}
-int SwTransferable::Copy( BOOL bIsCut )
+int SwTransferable::Copy( sal_Bool bIsCut )
{
int nRet = PrepareForCopy( bIsCut );
if ( nRet )
@@ -1020,7 +1020,7 @@ int SwTransferable::CalculateAndCopy()
{
if(!pWrtShell)
return 0;
- SwWait aWait( *pWrtShell->GetView().GetDocShell(), TRUE );
+ SwWait aWait( *pWrtShell->GetView().GetDocShell(), sal_True );
String aStr( pWrtShell->Calculate() );
@@ -1042,7 +1042,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
{
if(!pWrtShell)
return 0;
- SwWait aWait( *pWrtShell->GetView().GetDocShell(), TRUE );
+ SwWait aWait( *pWrtShell->GetView().GetDocShell(), sal_True );
pClpDocFac = new SwDocFac;
SwDoc *const pCDoc = lcl_GetDoc(*pClpDocFac);
@@ -1073,7 +1073,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
//ObjectDescriptor wurde bereits aus der alten DocShell gefuellt.
//Jetzt noch anpassen. Dadurch kann im GetData die erste Anfrage
//auch noch mit delayed rendering beantwortet werden.
- aObjDesc.mbCanLink = FALSE;
+ aObjDesc.mbCanLink = sal_False;
Size aSz( OLESIZE );
aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM );
@@ -1091,7 +1091,7 @@ static inline uno::Reference < XTransferable > * lcl_getTransferPointer ( uno::R
}
// -----------------------------------------------------------------------
-BOOL SwTransferable::IsPaste( const SwWrtShell& rSh,
+sal_Bool SwTransferable::IsPaste( const SwWrtShell& rSh,
const TransferableDataHelper& rData )
{
// Check the common case first: We can always paste our own data!
@@ -1106,8 +1106,8 @@ BOOL SwTransferable::IsPaste( const SwWrtShell& rSh,
// determine the proper paste action, and return true if we find one
uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() );
- USHORT nDestination = SwTransferable::GetSotDestination( rSh );
- USHORT nSourceOptions =
+ sal_uInt16 nDestination = SwTransferable::GetSotDestination( rSh );
+ sal_uInt16 nSourceOptions =
(( EXCHG_DEST_DOC_TEXTFRAME == nDestination ||
EXCHG_DEST_SWDOC_FREE_AREA == nDestination ||
EXCHG_DEST_DOC_TEXTFRAME_WEB == nDestination ||
@@ -1115,9 +1115,9 @@ BOOL SwTransferable::IsPaste( const SwWrtShell& rSh,
? EXCHG_IN_ACTION_COPY
: EXCHG_IN_ACTION_MOVE);
- ULONG nFormat; // output param for GetExchangeAction
- USHORT nEventAction; // output param for GetExchangeAction
- USHORT nAction = SotExchange::GetExchangeAction(
+ sal_uLong nFormat; // output param for GetExchangeAction
+ sal_uInt16 nEventAction; // output param for GetExchangeAction
+ sal_uInt16 nAction = SotExchange::GetExchangeAction(
rData.GetDataFlavorExVector(),
nDestination,
nSourceOptions, /* ?? */
@@ -1136,9 +1136,9 @@ BOOL SwTransferable::IsPaste( const SwWrtShell& rSh,
int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData )
{
- USHORT nEventAction, nAction=0,
+ sal_uInt16 nEventAction, nAction=0,
nDestination = SwTransferable::GetSotDestination( rSh );
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
if( GetSwTransferable( rData ) )
{
@@ -1146,7 +1146,7 @@ int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData )
}
else
{
- USHORT nSourceOptions =
+ sal_uInt16 nSourceOptions =
(( EXCHG_DEST_DOC_TEXTFRAME == nDestination ||
EXCHG_DEST_SWDOC_FREE_AREA == nDestination ||
EXCHG_DEST_DOC_TEXTFRAME_WEB == nDestination ||
@@ -1175,20 +1175,20 @@ int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData )
return EXCHG_INOUT_ACTION_NONE != nAction &&
SwTransferable::PasteData( rData, rSh, nAction, nFormat,
- nDestination, FALSE, FALSE );
+ nDestination, sal_False, sal_False );
}
// -----------------------------------------------------------------------
int SwTransferable::PasteData( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction, ULONG nFormat,
- USHORT nDestination, BOOL bIsPasteFmt,
+ SwWrtShell& rSh, sal_uInt16 nAction, sal_uLong nFormat,
+ sal_uInt16 nDestination, sal_Bool bIsPasteFmt,
sal_Bool bIsDefault,
const Point* pPt, sal_Int8 nDropAction,
- BOOL bPasteSelection )
+ sal_Bool bPasteSelection )
{
SwWait aWait( *rSh.GetView().
- GetDocShell(), FALSE );
+ GetDocShell(), sal_False );
SwTrnsfrActionAndUndo* pAction = 0;
SwModule* pMod = SW_MOD();
@@ -1211,14 +1211,14 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
case EXCHG_DEST_DOC_URLBUTTON:
case EXCHG_DEST_DOC_GROUPOBJ:
// Rahmen/Objecte selektieren
- SwTransferable::SetSelInShell( rSh, TRUE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_True, pPt );
break;
// case EXCHG_DEST_DOC_TEXTFRAME:
// case EXCHG_DEST_SWDOC_FREE_AREA:
// case EXCHG_DEST_DOC_URLFIELD:
default:
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
break;
}
}
@@ -1233,21 +1233,21 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
// - nicht bei ReRead einer Grafik/DDEDaten
// - nicht bei D&D, fuer die richtige Selektion wurde im
// Drop-Handler gesorgt
- BOOL bDelSel = FALSE;
+ sal_Bool bDelSel = sal_False;
switch( nDestination )
{
case EXCHG_DEST_DOC_TEXTFRAME:
case EXCHG_DEST_SWDOC_FREE_AREA:
case EXCHG_DEST_DOC_TEXTFRAME_WEB:
case EXCHG_DEST_SWDOC_FREE_AREA_WEB:
- bDelSel = TRUE;
+ bDelSel = sal_True;
break;
}
if( bDelSel )
// --> FME 2004-10-19 #i34830#
pAction = new SwTrnsfrActionAndUndo( &rSh, UNDO_PASTE_CLIPBOARD, NULL,
- TRUE );
+ sal_True );
// <--
}
@@ -1282,10 +1282,10 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
}
// im Drag&Drop duerfen keine MessageBoxen angezeigt werden
- BOOL bMsg = 0 == pPt;
- BYTE nActionFlags = static_cast< BYTE >(( nAction >> 8 ) & 0xFF);
+ sal_Bool bMsg = 0 == pPt;
+ sal_uInt8 nActionFlags = static_cast< sal_uInt8 >(( nAction >> 8 ) & 0xFF);
- USHORT nClearedAction = ( nAction & EXCHG_ACTION_MASK );
+ sal_uInt16 nClearedAction = ( nAction & EXCHG_ACTION_MASK );
// Selektionen loeschen
switch( nClearedAction )
@@ -1405,7 +1405,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
case SOT_FORMATSTR_ID_NETSCAPE_IMAGE:
nRet = SwTransferable::_PasteTargetURL( rData, rSh,
SW_PASTESDR_INSERT,
- pPt, TRUE );
+ pPt, sal_True );
break;
default:
@@ -1428,7 +1428,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
case EXCHG_OUT_ACTION_INSERT_DDE:
{
- BOOL bReRead = 0 != CNT_HasGrf( rSh.GetCntType() );
+ sal_Bool bReRead = 0 != CNT_HasGrf( rSh.GetCntType() );
nRet = SwTransferable::_PasteDDE( rData, rSh, bReRead, bMsg );
}
break;
@@ -1485,7 +1485,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
nActionFlags, bMsg );
break;
default:
- ASSERT( FALSE, "unbekanntes Format" );
+ ASSERT( sal_False, "unbekanntes Format" );
}
break;
@@ -1524,7 +1524,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
break;
default:
- ASSERT( FALSE, "unbekannte Action" );
+ ASSERT( sal_False, "unbekannte Action" );
}
}
@@ -1545,10 +1545,10 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
// -----------------------------------------------------------------------
-USHORT SwTransferable::GetSotDestination( const SwWrtShell& rSh,
+sal_uInt16 SwTransferable::GetSotDestination( const SwWrtShell& rSh,
const Point* pPt )
{
- USHORT nRet = EXCHG_INOUT_ACTION_NONE;
+ sal_uInt16 nRet = EXCHG_INOUT_ACTION_NONE;
ObjCntType eOType;
if( pPt )
@@ -1563,7 +1563,7 @@ USHORT SwTransferable::GetSotDestination( const SwWrtShell& rSh,
{
case OBJCNT_GRF:
{
- BOOL bIMap, bLink;
+ sal_Bool bIMap, bLink;
if( pPt )
{
bIMap = 0 != rSh.GetFmtFromObj( *pPt )->GetURL().GetMap();
@@ -1613,7 +1613,7 @@ JP 13.07.98: Bug 52637: es wird ein URL-Feld erkannt also werden nur die
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_INETATTR );
SfxItemSet aSet( (SfxItemPool&)rSh.GetAttrPool(),
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT );
- if( pPt ? ((SwWrtShell&)rSh).GetContentAtPos( *pPt, aCntntAtPos, FALSE )
+ if( pPt ? ((SwWrtShell&)rSh).GetContentAtPos( *pPt, aCntntAtPos, sal_False )
: (rSh.GetAttr( aSet ) && aSet.Count()) )
nRet = EXCHG_DEST_DOC_URLFIELD;
else
@@ -1631,9 +1631,9 @@ JP 13.07.98: Bug 52637: es wird ein URL-Feld erkannt also werden nur die
// -----------------------------------------------------------------------
int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt, BOOL bMsg )
+ SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bMsg )
{
- USHORT nResId = MSG_CLPBRD_FORMAT_ERROR;
+ sal_uInt16 nResId = MSG_CLPBRD_FORMAT_ERROR;
int nRet = 0;
MSE40HTMLClipFormatObj aMSE40ClpObj;
@@ -1674,10 +1674,10 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
{
pStream = aMSE40ClpObj.IsValid( *xStrm );
pRead = ReadHTML;
- pRead->SetReadUTF8( TRUE );
+ pRead->SetReadUTF8( sal_True );
//pRead->SetBaseURL( aMSE40ClpObj.GetBaseURL() );
- BOOL bNoComments =
+ sal_Bool bNoComments =
( nFmt == SOT_FORMATSTR_ID_HTML_NO_COMMENT );
pRead->SetIgnoreHTMLComments( bNoComments );
}
@@ -1689,7 +1689,7 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
else if( !pRead )
{
pRead = ReadHTML;
- pRead->SetReadUTF8( TRUE );
+ pRead->SetReadUTF8( sal_True );
}
}
}
@@ -1728,7 +1728,7 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, BYTE nActionFlags, BOOL bMsg )
+ sal_uLong nFmt, sal_uInt8 nActionFlags, sal_Bool bMsg )
{
int nRet = 0;
TransferableObjectDescriptor aObjDesc;
@@ -1851,7 +1851,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
// try to get the replacement image from the clipboard
Graphic aGraphic;
- ULONG nGrFormat = 0;
+ sal_uLong nGrFormat = 0;
// (wg. Selection Manager bei Trustet Solaris)
#ifndef SOLARIS
@@ -1939,7 +1939,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
if( nRet && ( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) ))
- SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, FALSE );
+ SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, sal_False );
// let the object be unloaded if possible
SwOLEObj::UnloadObject( xObj, rSh.GetDoc(), embed::Aspects::MSOLE_CONTENT );
@@ -1954,8 +1954,8 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
// -----------------------------------------------------------------------
int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction,
- const Point* pPt, BOOL bInsertGRF )
+ SwWrtShell& rSh, sal_uInt16 nAction,
+ const Point* pPt, sal_Bool bInsertGRF )
{
int nRet = 0;
INetImage aINetImg;
@@ -1979,7 +1979,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
switch( nAction )
{
case SW_PASTESDR_INSERT:
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
rSh.Insert( sURL, aEmptyStr, aGrf );
break;
@@ -1988,7 +1988,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
{
rSh.ReplaceSdrObj( sURL, aEmptyStr, &aGrf );
Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() );
- SwTransferable::SetSelInShell( rSh, TRUE, &aPt );
+ SwTransferable::SetSelInShell( rSh, sal_True, &aPt );
}
else
rSh.ReRead( sURL, aEmptyStr, &aGrf );
@@ -2001,7 +2001,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
rSh.ReRead( sURL, aEmptyStr, &aGrf );
else
{
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
rSh.Insert( sURL, aEmptyStr, aGrf );
}
break;
@@ -2023,7 +2023,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
if( aURL.GetURL() != aINetImg.GetTargetURL() ||
aURL.GetTargetFrameName() != aINetImg.GetTargetFrame() )
{
- aURL.SetURL( aINetImg.GetTargetURL(), FALSE );
+ aURL.SetURL( aINetImg.GetTargetURL(), sal_False );
aURL.SetTargetFrameName( aINetImg.GetTargetFrame() );
aSet.Put( aURL );
rSh.SetFlyFrmAttr( aSet );
@@ -2035,7 +2035,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
-void SwTransferable::SetSelInShell( SwWrtShell& rSh, BOOL bSelectFrm,
+void SwTransferable::SetSelInShell( SwWrtShell& rSh, sal_Bool bSelectFrm,
const Point* pPt )
{
if( bSelectFrm )
@@ -2048,7 +2048,7 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, BOOL bSelectFrm,
{
rSh.HideCrsr();
rSh.EnterSelFrmMode( pPt );
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
}
}
}
@@ -2059,22 +2059,22 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, BOOL bSelectFrm,
rSh.UnSelectFrm();
rSh.LeaveSelFrmMode();
rSh.GetView().GetEditWin().StopInsFrm();
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
}
else if( rSh.GetView().GetDrawFuncPtr() )
rSh.GetView().GetEditWin().StopInsFrm();
rSh.EnterStdMode();
if( pPt )
- rSh.SwCrsrShell::SetCrsr( *pPt, TRUE );
+ rSh.SwCrsrShell::SetCrsr( *pPt, sal_True );
}
}
// -----------------------------------------------------------------------
int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
- SwWrtShell& rWrtShell, BOOL bReReadGrf,
- BOOL bMsg )
+ SwWrtShell& rWrtShell, sal_Bool bReReadGrf,
+ sal_Bool bMsg )
{
// Daten aus dem Clipboardformat
String aApp, aTopic, aItem;
@@ -2097,7 +2097,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
sfx2::MakeLnkName( aCmd, &aApp, aTopic, aItem );
// wollen wir jetzt eine Grafik einlesen ?
- ULONG nFormat;
+ sal_uLong nFormat;
if( !rData.HasFormat( FORMAT_RTF ) &&
!rData.HasFormat( SOT_FORMATSTR_ID_HTML ) &&
!rData.HasFormat( FORMAT_STRING ) &&
@@ -2119,10 +2119,10 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
}
SwFieldType* pTyp = 0;
- USHORT i = 1,j;
+ sal_uInt16 i = 1,j;
String aName;
- BOOL bAlreadyThere = FALSE, bDoublePaste = FALSE;
- USHORT nSize = rWrtShell.GetFldTypeCount();
+ sal_Bool bAlreadyThere = sal_False, bDoublePaste = sal_False;
+ sal_uInt16 nSize = rWrtShell.GetFldTypeCount();
const ::utl::TransliterationWrapper& rColl = ::GetAppCmpStrIgnore();
do {
@@ -2138,7 +2138,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
sfx2::LINKUPDATE_ALWAYS == ((SwDDEFieldType*)pTyp)->GetType() )
{
aName = pTyp->GetName();
- bDoublePaste = TRUE;
+ bDoublePaste = sal_True;
break;
}
else if( rColl.isEqual( aName, pTyp->GetName() ) )
@@ -2146,10 +2146,10 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
}
}
if( j == nSize )
- bAlreadyThere = FALSE;
+ bAlreadyThere = sal_False;
else
{
- bAlreadyThere = TRUE;
+ bAlreadyThere = sal_True;
i++;
}
}
@@ -2217,7 +2217,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
rWrtShell.Insert( aSwDDEField );
}
- } while( FALSE );
+ } while( sal_False );
}
else
pDDETyp = 0; // FeldTypen wieder entfernen
@@ -2239,8 +2239,8 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
int SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction,
- const Point* pPt, BYTE nActionFlags )
+ SwWrtShell& rSh, sal_uInt16 nAction,
+ const Point* pPt, sal_uInt8 nActionFlags )
{
int nRet = 0;
SotStorageStreamRef xStrm;
@@ -2252,7 +2252,7 @@ int SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData,
if( nRet && ( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) ))
- SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, FALSE );
+ SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, sal_False );
}
return nRet;
}
@@ -2260,14 +2260,14 @@ int SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, USHORT nAction, const Point* pPt,
- BYTE nActionFlags, BOOL /*bMsg*/ )
+ sal_uLong nFmt, sal_uInt16 nAction, const Point* pPt,
+ sal_uInt8 nActionFlags, sal_Bool /*bMsg*/ )
{
int nRet = 0;
Graphic aGrf;
INetBookmark aBkmk;
- BOOL bCheckForGrf = FALSE, bCheckForImageMap = FALSE;
+ sal_Bool bCheckForGrf = sal_False, bCheckForImageMap = sal_False;
switch( nFmt )
{
@@ -2291,7 +2291,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
if( SW_PASTESDR_SETATTR == nAction )
nFmt = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK;
else
- bCheckForGrf = TRUE;
+ bCheckForGrf = sal_True;
}
break;
@@ -2306,7 +2306,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
aBkmk = INetBookmark(
URIHelper::SmartRel2Abs(INetURLObject(), sTxt, Link(), false ),
sDesc );
- bCheckForGrf = TRUE;
+ bCheckForGrf = sal_True;
bCheckForImageMap = SW_PASTESDR_REPLACE == nAction;
}
}
@@ -2331,7 +2331,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
{
// dann als Hyperlink hinter die Grafik setzen
nFmt = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK;
- nRet = TRUE;
+ nRet = sal_True;
}
}
@@ -2344,7 +2344,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
switch( nAction )
{
case SW_PASTESDR_INSERT:
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
rSh.Insert( sURL, aEmptyStr, aGrf );
break;
@@ -2353,7 +2353,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
{
rSh.ReplaceSdrObj( sURL, aEmptyStr, &aGrf );
Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() );
- SwTransferable::SetSelInShell( rSh, TRUE, &aPt );
+ SwTransferable::SetSelInShell( rSh, sal_True, &aPt );
}
else
rSh.ReRead( sURL, aEmptyStr, &aGrf );
@@ -2367,7 +2367,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
rSh.GetFlyFrmAttr( aSet );
SwFmtURL aURL( (SwFmtURL&)aSet.Get( RES_URL ) );
- aURL.SetURL( aBkmk.GetURL(), FALSE );
+ aURL.SetURL( aBkmk.GetURL(), sal_False );
aSet.Put( aURL );
rSh.SetFlyFrmAttr( aSet );
}
@@ -2378,7 +2378,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
rSh.ReRead( sURL, aEmptyStr, &aGrf );
else
{
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
rSh.Insert( aBkmk.GetURL(), aEmptyStr, aGrf );
}
break;
@@ -2397,14 +2397,14 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
if( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) )
- SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, FALSE );
+ SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, sal_False );
}
else if( bCheckForImageMap )
{
// oder sollte das File ein ImageMap-File sein?
ImageMap aMap;
SfxMedium aMed( INetURLObject(aBkmk.GetURL()).GetFull(),
- STREAM_STD_READ, FALSE );
+ STREAM_STD_READ, sal_False );
SvStream* pStream = aMed.GetInStream();
if( pStream != NULL &&
!pStream->GetError() &&
@@ -2455,7 +2455,7 @@ int SwTransferable::_PasteImageMap( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt )
+ SwWrtShell& rSh, sal_uLong nFmt )
{
int nRet = 0;
String sFile;
@@ -2479,7 +2479,7 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData,
SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
rSh.GetFlyFrmAttr( aSet );
SwFmtURL aURL2( (SwFmtURL&)aSet.Get( RES_URL ) );
- aURL2.SetURL( sFile, FALSE );
+ aURL2.SetURL( sFile, sal_False );
if( !aURL2.GetName().Len() )
aURL2.SetName( sFile );
aSet.Put( aURL2 );
@@ -2493,7 +2493,7 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData,
sDesc.Len() ? sDesc : sFile );
}
}
- nRet = TRUE;
+ nRet = sal_True;
}
return nRet;
}
@@ -2501,9 +2501,9 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt,
- USHORT nAction, const Point* pPt,
- BYTE nActionFlags, BOOL bMsg )
+ SwWrtShell& rSh, sal_uLong nFmt,
+ sal_uInt16 nAction, const Point* pPt,
+ sal_uInt8 nActionFlags, sal_Bool bMsg )
{
int nRet = SwTransferable::_PasteGrf( rData, rSh, nFmt, nAction,
pPt, nActionFlags, bMsg );
@@ -2528,7 +2528,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
}
else
{
- BOOL bIsURLFile = SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc );
+ sal_Bool bIsURLFile = SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc );
//Eigenes FileFormat? -->Einfuegen, nicht fuer StarWriter/Web
String sFileURL = URIHelper::SmartRel2Abs(INetURLObject(), sFile, Link(), false );
@@ -2577,7 +2577,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
rSh.GetFlyFrmAttr( aSet );
SwFmtURL aURL2( (SwFmtURL&)aSet.Get( RES_URL ) );
- aURL2.SetURL( sFile, FALSE );
+ aURL2.SetURL( sFile, sal_False );
if( !aURL2.GetName().Len() )
aURL2.SetName( sFile );
aSet.Put( aURL2 );
@@ -2591,7 +2591,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
sDesc.Len() ? sDesc : sFile );
}
}
- nRet = TRUE;
+ nRet = sal_True;
}
}
}
@@ -2602,14 +2602,14 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
int SwTransferable::_PasteDBData( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt, BOOL bLink,
- const Point* pDragPt, BOOL bMsg )
+ SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bLink,
+ const Point* pDragPt, sal_Bool bMsg )
{
int nRet = 0;
String sTxt;
if( rData.GetString( nFmt, sTxt ) && sTxt.Len() )
{
- USHORT nWh = SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE == nFmt
+ sal_uInt16 nWh = SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE == nFmt
? 0
: SOT_FORMATSTR_ID_SBA_DATAEXCHANGE == nFmt
? (bLink
@@ -2644,14 +2644,14 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& rData,
SfxUsrAnyItem* pColumnNameItem = 0;
SfxUsrAnyItem* pSelectionItem = 0;
- BOOL bDataAvailable = TRUE;
+ sal_Bool bDataAvailable = sal_True;
ODataAccessDescriptor aDesc;
if(bHaveColumnDescriptor)
aDesc = OColumnTransferable::extractColumnDescriptor(rData);
else if(ODataAccessObjectTransferable::canExtractObjectDescriptor(rVector) )
aDesc = ODataAccessObjectTransferable::extractObjectDescriptor(rData);
else
- bDataAvailable = FALSE;
+ bDataAvailable = sal_False;
if ( bDataAvailable )
{
@@ -2706,30 +2706,30 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
int SwTransferable::_PasteFileList( TransferableDataHelper& rData,
- SwWrtShell& rSh, BOOL bLink,
- const Point* pPt, BOOL bMsg )
+ SwWrtShell& rSh, sal_Bool bLink,
+ const Point* pPt, sal_Bool bMsg )
{
int nRet = 0;
FileList aFileList;
if( rData.GetFileList( SOT_FORMAT_FILE_LIST, aFileList ) &&
aFileList.Count() )
{
- USHORT nAct = bLink ? SW_PASTESDR_SETATTR : SW_PASTESDR_INSERT;
+ sal_uInt16 nAct = bLink ? SW_PASTESDR_SETATTR : SW_PASTESDR_INSERT;
String sFlyNm;
// iterate over the filelist
- for( ULONG n = 0, nEnd = aFileList.Count(); n < nEnd; ++n )
+ for( sal_uLong n = 0, nEnd = aFileList.Count(); n < nEnd; ++n )
{
TransferDataContainer* pHlp = new TransferDataContainer;
pHlp->CopyString( FORMAT_FILE, aFileList.GetFile( n ));
TransferableDataHelper aData( pHlp );
if( SwTransferable::_PasteFileName( aData, rSh, SOT_FORMAT_FILE, nAct,
- pPt, FALSE, bMsg ))
+ pPt, sal_False, bMsg ))
{
if( bLink )
{
sFlyNm = rSh.GetFlyName();
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
}
nRet = 1;
}
@@ -2746,17 +2746,17 @@ int SwTransferable::_PasteFileList( TransferableDataHelper& rData,
// -----------------------------------------------------------------------
-BOOL SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData,
+sal_Bool SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData,
String& rFileName, String* pTitle )
{
- BOOL bIsURLFile = FALSE;
+ sal_Bool bIsURLFile = sal_False;
INetBookmark aBkmk;
if( rData.GetINetBookmark( SOT_FORMATSTR_ID_SOLK, aBkmk ) )
{
rFileName = aBkmk.GetURL();
if( pTitle )
*pTitle = aBkmk.GetDescription();
- bIsURLFile = TRUE;
+ bIsURLFile = sal_True;
}
else
{
@@ -2775,7 +2775,7 @@ ASSERT( !&rFileName, "how do we read today .URL - Files?" );
// -----------------------------------------------------------------------
-BOOL SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell,
+sal_Bool SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell,
const TransferableDataHelper& rData )
{
// we can paste-special if there's an entry in the paste-special-format list
@@ -2788,12 +2788,12 @@ BOOL SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell,
int SwTransferable::PasteFormat( SwWrtShell& rSh,
TransferableDataHelper& rData,
- ULONG nFormat )
+ sal_uLong nFormat )
{
- SwWait aWait( *rSh.GetView().GetDocShell(), FALSE );
+ SwWait aWait( *rSh.GetView().GetDocShell(), sal_False );
int nRet = 0;
- ULONG nPrivateFmt = FORMAT_PRIVATE;
+ sal_uLong nPrivateFmt = FORMAT_PRIVATE;
SwTransferable *pClipboard = GetSwTransferable( rData );
if( pClipboard &&
((TRNSFR_DOCUMENT|TRNSFR_GRAPHIC|TRNSFR_OLE) & pClipboard->eBufferType ))
@@ -2804,7 +2804,7 @@ int SwTransferable::PasteFormat( SwWrtShell& rSh,
else if( rData.HasFormat( nFormat ) )
{
uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() );
- USHORT nEventAction,
+ sal_uInt16 nEventAction,
nDestination = SwTransferable::GetSotDestination( rSh ),
nSourceOptions =
(( EXCHG_DEST_DOC_TEXTFRAME == nDestination ||
@@ -2823,7 +2823,7 @@ int SwTransferable::PasteFormat( SwWrtShell& rSh,
if( EXCHG_INOUT_ACTION_NONE != nAction )
nRet = SwTransferable::PasteData( rData, rSh, nAction, nFormat,
- nDestination, TRUE, FALSE );
+ nDestination, sal_True, sal_False );
}
return nRet;
}
@@ -2831,9 +2831,9 @@ int SwTransferable::PasteFormat( SwWrtShell& rSh,
// -----------------------------------------------------------------------
int SwTransferable::_TestAllowedFormat( const TransferableDataHelper& rData,
- ULONG nFormat, USHORT nDestination )
+ sal_uLong nFormat, sal_uInt16 nDestination )
{
- USHORT nAction = EXCHG_INOUT_ACTION_NONE, nEventAction;
+ sal_uInt16 nAction = EXCHG_INOUT_ACTION_NONE, nEventAction;
if( rData.HasFormat( nFormat )) {
uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() );
nAction = SotExchange::GetExchangeAction(
@@ -2852,7 +2852,7 @@ int SwTransferable::_TestAllowedFormat( const TransferableDataHelper& rData,
* the list of formats which will be offered to the user in the 'Paste
* Special...' dialog and the paste button menu
*/
-static USHORT aPasteSpecialIds[] =
+static sal_uInt16 aPasteSpecialIds[] =
{
SOT_FORMATSTR_ID_HTML,
SOT_FORMATSTR_ID_HTML_SIMPLE,
@@ -2879,7 +2879,7 @@ int SwTransferable::PasteUnformatted( SwWrtShell& rSh, TransferableDataHelper& r
// -----------------------------------------------------------------------
-int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData, ULONG& rFormatUsed )
+int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData, sal_uLong& rFormatUsed )
{
int nRet = 0;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -2888,13 +2888,13 @@ int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData
DataFlavorExVector aFormats( rData.GetDataFlavorExVector() );
TransferableObjectDescriptor aDesc;
- USHORT nDest = SwTransferable::GetSotDestination( rSh );
+ sal_uInt16 nDest = SwTransferable::GetSotDestination( rSh );
SwTransferable *pClipboard = GetSwTransferable( rData );
if( pClipboard )
{
aDesc = pClipboard->aObjDesc;
- USHORT nResId;
+ sal_uInt16 nResId;
if( pClipboard->eBufferType & TRNSFR_DOCUMENT )
nResId = STR_PRIVATETEXT;
else if( pClipboard->eBufferType & TRNSFR_GRAPHIC )
@@ -2934,11 +2934,11 @@ int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData
if( SwTransferable::_TestAllowedFormat( rData, SOT_FORMATSTR_ID_LINK, nDest ))
pDlg->Insert( SOT_FORMATSTR_ID_LINK, SW_RES(STR_DDEFORMAT) );
- for( USHORT* pIds = aPasteSpecialIds; *pIds; ++pIds )
+ for( sal_uInt16* pIds = aPasteSpecialIds; *pIds; ++pIds )
if( SwTransferable::_TestAllowedFormat( rData, *pIds, nDest ))
pDlg->Insert( *pIds, aEmptyStr );
- ULONG nFormat = pDlg->GetFormat( rData.GetTransferable() );
+ sal_uLong nFormat = pDlg->GetFormat( rData.GetTransferable() );
if( nFormat )
nRet = SwTransferable::PasteFormat( rSh, rData, nFormat );
@@ -2955,12 +2955,12 @@ void SwTransferable::FillClipFmtItem( const SwWrtShell& rSh,
const TransferableDataHelper& rData,
SvxClipboardFmtItem & rToFill )
{
- USHORT nDest = SwTransferable::GetSotDestination( rSh );
+ sal_uInt16 nDest = SwTransferable::GetSotDestination( rSh );
SwTransferable *pClipboard = GetSwTransferable( rData );
if( pClipboard )
{
- USHORT nResId;
+ sal_uInt16 nResId;
if( pClipboard->eBufferType & TRNSFR_DOCUMENT )
nResId = STR_PRIVATETEXT;
else if( pClipboard->eBufferType & TRNSFR_GRAPHIC )
@@ -2999,7 +2999,7 @@ void SwTransferable::FillClipFmtItem( const SwWrtShell& rSh,
if( SwTransferable::_TestAllowedFormat( rData, SOT_FORMATSTR_ID_LINK, nDest ))
rToFill.AddClipbrdFormat( SOT_FORMATSTR_ID_LINK, SW_RES(STR_DDEFORMAT) );
- for( USHORT* pIds = aPasteSpecialIds; *pIds; ++pIds )
+ for( sal_uInt16* pIds = aPasteSpecialIds; *pIds; ++pIds )
if( SwTransferable::_TestAllowedFormat( rData, *pIds, nDest ))
rToFill.AddClipbrdFormat( *pIds, aEmptyStr );
}
@@ -3042,7 +3042,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
{
eBufferType = TRNSFR_DOCUMENT;
if( SwWrtShell::NO_WORD !=
- pWrtShell->IntelligentCut( nSelection, FALSE ))
+ pWrtShell->IntelligentCut( nSelection, sal_False ))
eBufferType = TransferBufferType( TRNSFR_DOCUMENT_WORD
| eBufferType);
}
@@ -3096,7 +3096,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
//ObjectDescriptor wurde bereits aus der alten DocShell gefuellt.
//Jetzt noch anpassen. Dadurch kann im GetData die erste Anfrage
//auch noch mit delayed rendering beantwortet werden.
- aObjDesc.mbCanLink = FALSE;
+ aObjDesc.mbCanLink = sal_False;
aObjDesc.maDragStartPos = rSttPos;
aObjDesc.maSize = OutputDevice::LogicToLogic( Size( OLESIZE ),
MAP_TWIP, MAP_100TH_MM );
@@ -3146,9 +3146,9 @@ void SwTransferable::StartDrag( Window* pWin, const Point& rPos )
if(!pWrtShell)
return;
bOldIdle = pWrtShell->GetViewOptions()->IsIdle();
- bCleanUp = TRUE;
+ bCleanUp = sal_True;
- ((SwViewOption *)pWrtShell->GetViewOptions())->SetIdle( FALSE );
+ ((SwViewOption *)pWrtShell->GetViewOptions())->SetIdle( sal_False );
if( pWrtShell->IsSelFrmMode() )
pWrtShell->ShowCrsr();
@@ -3183,7 +3183,7 @@ void SwTransferable::DragFinished( sal_Int8 nAction )
{
if ( !(pWrtShell->IsSelFrmMode() || pWrtShell->IsObjSelected()) )
//SmartCut, eines der Blanks mitnehmen.
- pWrtShell->IntelligentCut( pWrtShell->GetSelectionType(), TRUE );
+ pWrtShell->IntelligentCut( pWrtShell->GetSelectionType(), sal_True );
pWrtShell->DelRight();
}
pWrtShell->EndUndo( UNDO_UI_DRAG_AND_MOVE );
@@ -3226,7 +3226,7 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
// (sonst wird nicht in eine TabellenSelektion gepastet!!!)
ASSERT( !rShell.ActionPend(), "Paste darf nie eine Actionklammerung haben" );
if ( !pClpDocFac )
- return sal_False; // the return value of the SwFEShell::Paste also is BOOL!
+ return sal_False; // the return value of the SwFEShell::Paste also is sal_Bool!
const int nSelection = rShell.GetSelectionType();
@@ -3252,12 +3252,12 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
{
// den Cursor wieder positionieren
Point aPt( rShell.GetCharRect().Pos() );
- rShell.SwCrsrShell::SetCrsr( aPt, TRUE );
+ rShell.SwCrsrShell::SetCrsr( aPt, sal_True );
}
rShell.SetRetainSelection( false );
}
- BOOL bInWrd = FALSE, bEndWrd = FALSE, bSttWrd = FALSE,
+ sal_Bool bInWrd = sal_False, bEndWrd = sal_False, bSttWrd = sal_False,
bSmart = 0 != (TRNSFR_DOCUMENT_WORD & eBufferType);
if( bSmart )
{
@@ -3266,7 +3266,7 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
// beginning and end'. In this case we definitely want these spaces to be inserted
// here.
// if( SCRIPTTYPE_LATIN != rShell.GetScriptType() )
-// bSmart = FALSE;
+// bSmart = sal_False;
// else
// {
bInWrd = rShell.IsInWrd();
@@ -3294,15 +3294,15 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
}
int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
- BOOL bMove, BOOL bIsXSelection )
+ sal_Bool bMove, sal_Bool bIsXSelection )
{
int cWord = 0;
- BOOL bInWrd = FALSE;
- BOOL bEndWrd = FALSE;
- BOOL bSttWrd = FALSE;
- BOOL bSttPara= FALSE;
- BOOL bTblSel = FALSE;
- BOOL bFrmSel = FALSE;
+ sal_Bool bInWrd = sal_False;
+ sal_Bool bEndWrd = sal_False;
+ sal_Bool bSttWrd = sal_False;
+ sal_Bool bSttPara= sal_False;
+ sal_Bool bTblSel = sal_False;
+ sal_Bool bFrmSel = sal_False;
SwWrtShell& rSrcSh = *GetShell();
@@ -3321,7 +3321,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
{
rSh.HideCrsr();
rSh.EnterSelFrmMode( &rDragPt );
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
}
const int nSelection = rSh.GetSelectionType();
@@ -3332,7 +3332,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
rSh.GetFlyFrmAttr( aSet );
SwFmtURL aURL( (SwFmtURL&)aSet.Get( RES_URL ) );
- aURL.SetURL( aTmp.GetURL(), FALSE );
+ aURL.SetURL( aTmp.GetURL(), sal_False );
aSet.Put( aURL );
rSh.SetFlyFrmAttr( aSet );
return 1;
@@ -3343,7 +3343,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
rSh.LeaveSelFrmMode();
rSh.UnSelectFrm();
rSh.ShowCrsr();
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
}
}
}
@@ -3364,14 +3364,14 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
return 0;
if( rSrcSh.IsTableMode() )
- bTblSel = TRUE;
+ bTblSel = sal_True;
else if( rSrcSh.IsSelFrmMode() || rSrcSh.IsObjSelected() )
{
// keine positionsgeschuetzten Objecte verschieben!
if( bMove && rSrcSh.IsSelObjProtected( FLYPROTECT_POS ) )
return 0;
- bFrmSel = TRUE;
+ bFrmSel = sal_True;
}
const int nSel = rSrcSh.GetSelectionType();
@@ -3393,8 +3393,8 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
if( &rSrcSh != &rSh )
{
rSh.EnterStdMode();
- rSh.SwCrsrShell::SetCrsr( rDragPt, TRUE );
- cWord = rSrcSh.IntelligentCut( nSel, FALSE );
+ rSh.SwCrsrShell::SetCrsr( rDragPt, sal_True );
+ cWord = rSrcSh.IntelligentCut( nSel, sal_False );
}
else if( !bTblSel && !bFrmSel )
{
@@ -3409,9 +3409,9 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
// <--
rSh.SwCrsrShell::CreateCrsr();
}
- rSh.SwCrsrShell::SetCrsr( rDragPt, TRUE, false );
+ rSh.SwCrsrShell::SetCrsr( rDragPt, sal_True, false );
rSh.GoPrevCrsr();
- cWord = rSh.IntelligentCut( rSh.GetSelectionType(), FALSE );
+ cWord = rSh.IntelligentCut( rSh.GetSelectionType(), sal_False );
rSh.GoNextCrsr();
}
@@ -3428,7 +3428,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
if( &rSrcSh == &rSh )
{
rSh.GoPrevCrsr();
- rSh.SwCrsrShell::SetCrsr( aSttPt, TRUE );
+ rSh.SwCrsrShell::SetCrsr( aSttPt, sal_True );
rSh.SelectTxtAttr( RES_TXTATR_INETFMT );
if( rSh.ChgCurrPam( rDragPt ) )
{
@@ -3443,14 +3443,14 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
}
else
{
- rSrcSh.SwCrsrShell::SetCrsr( aSttPt, TRUE );
+ rSrcSh.SwCrsrShell::SetCrsr( aSttPt, sal_True );
rSrcSh.SelectTxtAttr( RES_TXTATR_INETFMT );
}
// ist am Einfuege Punkt ein URL-Attribut? Dann das ersetzen,
// also einfach eine Selektion aufspannen?
rSh.DelINetAttrWithText();
- bDDINetAttr = TRUE;
+ bDDINetAttr = sal_True;
}
if ( rSrcSh.IsSelFrmMode() )
@@ -3459,7 +3459,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
aSttPt -= aSttPt - rSrcSh.GetObjRect().Pos();
}
- BOOL bRet = rSrcSh.SwFEShell::Copy( &rSh, aSttPt, rDragPt, bMove,
+ sal_Bool bRet = rSrcSh.SwFEShell::Copy( &rSh, aSttPt, rDragPt, bMove,
!bIsXSelection );
if( !bIsXSelection )
@@ -3477,14 +3477,14 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
//SmartCut, eines der Blank mitnehmen.
rSh.SwCrsrShell::DestroyCrsr();
if ( cWord == SwWrtShell::WORD_SPACE_BEFORE )
- rSh.ExtendSelection( FALSE );
+ rSh.ExtendSelection( sal_False );
else if ( cWord == SwWrtShell::WORD_SPACE_AFTER )
rSh.ExtendSelection();
rSrcSh.DelRight();
}
}
rSrcSh.KillPams();
- rSrcSh.Pop( FALSE );
+ rSrcSh.Pop( sal_False );
/* #109590# after dragging a table selection inside one shell
set cursor to the drop position. */
@@ -3635,7 +3635,7 @@ SwTransferable* SwTransferable::GetSwTransferable( const TransferableDataHelper&
SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
: rTrnsfr( rTrans ), pDocShell( 0 ),
- bDelBookmrk( FALSE ), bInDisconnect( FALSE )
+ bDelBookmrk( sal_False ), bInDisconnect( sal_False )
{
// hier kommen wir nur bei Tabellen- oder Text-Selection an
const int nSelection = rSh.GetSelectionType();
@@ -3648,9 +3648,9 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
else
{
// creating a temp. bookmark without undo
- BOOL bUndo = rSh.DoesUndo();
- rSh.DoUndo( FALSE );
- BOOL bIsModified = rSh.IsModified();
+ sal_Bool bUndo = rSh.DoesUndo();
+ rSh.DoUndo( sal_False );
+ sal_Bool bIsModified = rSh.IsModified();
::sw::mark::IMark* pMark = rSh.SetBookmark(
KeyCode(),
@@ -3660,7 +3660,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
if(pMark)
{
sName = pMark->GetName();
- bDelBookmrk = TRUE;
+ bDelBookmrk = sal_True;
if( !bIsModified )
rSh.ResetModified();
}
@@ -3693,7 +3693,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
SwTrnsfrDdeLink::~SwTrnsfrDdeLink()
{
if( refObj.Is() )
- Disconnect( TRUE );
+ Disconnect( sal_True );
}
// -----------------------------------------------------------------------
@@ -3706,16 +3706,16 @@ void SwTrnsfrDdeLink::DataChanged( const String& ,
{
if( FindDocShell() && pDocShell->GetView() )
rTrnsfr.RemoveDDELinkFormat( pDocShell->GetView()->GetEditWin() );
- Disconnect( FALSE );
+ Disconnect( sal_False );
}
}
// -----------------------------------------------------------------------
-BOOL SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
+sal_Bool SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
{
if( !refObj.Is() || !FindDocShell() )
- return FALSE;
+ return sal_False;
rtl_TextEncoding eEncoding = DDE_TXT_ENCODING;
const ByteString aAppNm( GetpApp()->GetAppName(), eEncoding );
@@ -3784,27 +3784,27 @@ BOOL SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
// -----------------------------------------------------------------------
-void SwTrnsfrDdeLink::Disconnect( BOOL bRemoveDataAdvise )
+void SwTrnsfrDdeLink::Disconnect( sal_Bool bRemoveDataAdvise )
{
//JP 29.01.96 Bug 24432:
// kein DataChanged mehr entgegen nehmen, wenn man
// sich schon im Disconnet befindet!
// (DTOR vom Bookmark verschickt einen DataChanged!)
- BOOL bOldDisconnect = bInDisconnect;
- bInDisconnect = TRUE;
+ sal_Bool bOldDisconnect = bInDisconnect;
+ bInDisconnect = sal_True;
// den nicht verwendeten Bookmark wieder zerstoeren (ohne Undo!)?
if( bDelBookmrk && refObj.Is() && FindDocShell() )
{
SwDoc* pDoc = pDocShell->GetDoc();
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bUndo = pDoc->DoesUndo();
+ pDoc->DoUndo( sal_False );
// --> OD, CD, OS 2005-11-25 #i58448#
Link aSavedOle2Link( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
// <--
- BOOL bIsModified = pDoc->IsModified();
+ sal_Bool bIsModified = pDoc->IsModified();
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
pMarkAccess->deleteMark(pMarkAccess->findMark(sName));
@@ -3816,7 +3816,7 @@ void SwTrnsfrDdeLink::Disconnect( BOOL bRemoveDataAdvise )
// <--
pDoc->DoUndo( bUndo );
- bDelBookmrk = FALSE;
+ bDelBookmrk = sal_False;
}
if( refObj.Is() )
@@ -3836,7 +3836,7 @@ void SwTrnsfrDdeLink::Disconnect( BOOL bRemoveDataAdvise )
// -----------------------------------------------------------------------
-BOOL SwTrnsfrDdeLink::FindDocShell()
+sal_Bool SwTrnsfrDdeLink::FindDocShell()
{
TypeId aType( TYPE( SwDocShell ) );
SfxObjectShell* pTmpSh = SfxObjectShell::GetFirst( &aType );
@@ -3845,14 +3845,14 @@ BOOL SwTrnsfrDdeLink::FindDocShell()
if( pTmpSh == pDocShell ) // die wollen wir haben
{
if( pDocShell->GetDoc() )
- return TRUE;
+ return sal_True;
break; // das Doc ist nicht mehr vorhanden, also raus!
}
pTmpSh = SfxObjectShell::GetNext( *pTmpSh, &aType );
}
pDocShell = 0;
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx
index c49c689851ba..8cef565545ff 100644
--- a/sw/source/ui/docvw/AnnotationMenuButton.cxx
+++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx
@@ -49,13 +49,13 @@
namespace sw { namespace annotation {
-Color ColorFromAlphaColor( const UINT8 aTransparency,
+Color ColorFromAlphaColor( const sal_uInt8 aTransparency,
const Color &aFront,
const Color &aBack )
{
- return Color((UINT8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)),
- (UINT8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)),
- (UINT8)(aFront.GetBlue() * aTransparency/(double)255 + aBack.GetBlue() * (1-aTransparency/(double)255)));
+ return Color((sal_uInt8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)),
+ (sal_uInt8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)),
+ (sal_uInt8)(aFront.GetBlue() * aTransparency/(double)255 + aBack.GetBlue() * (1-aTransparency/(double)255)));
}
AnnotationMenuButton::AnnotationMenuButton( sw::sidebarwindows::SwSidebarWin& rSidebarWin )
@@ -199,7 +199,7 @@ void AnnotationMenuButton::Paint( const Rectangle& /*rRect*/ )
void AnnotationMenuButton::KeyInput( const KeyEvent& rKeyEvt )
{
const KeyCode& rKeyCode = rKeyEvt.GetKeyCode();
- const USHORT nKey = rKeyCode.GetCode();
+ const sal_uInt16 nKey = rKeyCode.GetCode();
if ( nKey == KEY_TAB )
{
mrSidebarWin.ActivatePostIt();
diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx
index 08fb91dcc3c6..1c201f4665f3 100644
--- a/sw/source/ui/docvw/AnnotationWin.cxx
+++ b/sw/source/ui/docvw/AnnotationWin.cxx
@@ -88,7 +88,7 @@ void SwAnnotationWin::SetPostItText()
{
// get text from SwPostItField and insert into our textview
Engine()->SetModifyHdl( Link() );
- Engine()->EnableUndo( FALSE );
+ Engine()->EnableUndo( sal_False );
mpFld = static_cast<SwPostItField*>(mpFmtFld->GetFld());
if( mpFld->GetTextObject() )
Engine()->SetText( *mpFld->GetTextObject() );
@@ -101,7 +101,7 @@ void SwAnnotationWin::SetPostItText()
Engine()->ClearModifyFlag();
Engine()->GetUndoManager().Clear();
- Engine()->EnableUndo( TRUE );
+ Engine()->EnableUndo( sal_True );
Engine()->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) );
Invalidate();
}
@@ -256,8 +256,8 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText)
SvxLanguageItem SwAnnotationWin::GetLanguage(void)
{
// set initial language for outliner
- USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( mpFld->GetLanguage() );
- USHORT nLangWhichId = 0;
+ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( mpFld->GetLanguage() );
+ sal_uInt16 nLangWhichId = 0;
switch (nScriptType)
{
case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE ; break;
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx
index 645d4773626a..5f7ffa042869 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -423,8 +423,8 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if ((*i)->pPostIt)
{
- USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( (*i)->GetFmtFld()->GetFld()->GetLanguage() );
- USHORT nLangWhichId = 0;
+ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( (*i)->GetFmtFld()->GetFld()->GetLanguage() );
+ sal_uInt16 nLangWhichId = 0;
switch (nScriptType)
{
case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE ; break;
@@ -962,7 +962,7 @@ void SwPostItMgr::MakeVisible(const SwSidebarWin* pPostIt,long aPage )
mpWrtShell->MakeVisible(SwRect(mpEditWin->PixelToLogic(aNoteRect)));
}
-bool SwPostItMgr::ArrowEnabled(USHORT aDirection,unsigned long aPage) const
+bool SwPostItMgr::ArrowEnabled(sal_uInt16 aDirection,unsigned long aPage) const
{
switch (aDirection)
{
@@ -978,7 +978,7 @@ bool SwPostItMgr::ArrowEnabled(USHORT aDirection,unsigned long aPage) const
}
}
-Color SwPostItMgr::GetArrowColor(USHORT aDirection,unsigned long aPage) const
+Color SwPostItMgr::GetArrowColor(sal_uInt16 aDirection,unsigned long aPage) const
{
if (ArrowEnabled(aDirection,aPage))
{
@@ -1172,7 +1172,7 @@ void SwPostItMgr::AddRedlineComments(bool bCheckExistance, bool bFocus)
{
bool bEmpty = mvPostItFlds.empty();
const SwRedlineTbl& aTable = mpView->GetDocShell()->GetDoc()->GetRedlineTbl();
- for( USHORT i = 0; i < aTable.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aTable.Count(); ++i )
{
SwRedline* pRedline = const_cast<SwRedline*>((aTable)[i]);
if ( pRedline->GetComment() != String(rtl::OUString::createFromAscii("")) )
@@ -1398,7 +1398,7 @@ sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const SwPostItFie
return NULL;
}
-SwSidebarWin* SwPostItMgr::GetNextPostIt( USHORT aDirection,
+SwSidebarWin* SwPostItMgr::GetNextPostIt( sal_uInt16 aDirection,
SwSidebarWin* aPostIt )
{
if (mvPostItFlds.size()>1)
diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx
index 829c79373a61..5d71ca3696ce 100644
--- a/sw/source/ui/docvw/SidebarTxtControl.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControl.cxx
@@ -116,7 +116,7 @@ void SidebarTxtControl::LoseFocus()
void SidebarTxtControl::RequestHelp(const HelpEvent &rEvt)
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch( mrSidebarWin.GetLayoutStatus() )
{
case SwPostItHelper::INSERTED: nResId = STR_REDLINE_INSERT; break;
@@ -181,7 +181,7 @@ void SidebarTxtControl::Paint( const Rectangle& rRect)
void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt )
{
const KeyCode& rKeyCode = rKeyEvt.GetKeyCode();
- USHORT nKey = rKeyCode.GetCode();
+ sal_uInt16 nKey = rKeyCode.GetCode();
if ( ( rKeyCode.IsMod1() && rKeyCode.IsMod2() ) &&
( (nKey == KEY_PAGEUP) || (nKey == KEY_PAGEDOWN) ) )
{
@@ -236,7 +236,7 @@ void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt )
}
}
- mrDocView.GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ mrDocView.GetViewFrame()->GetBindings().InvalidateAll(sal_False);
}
void SidebarTxtControl::MouseMove( const MouseEvent& rMEvt )
@@ -303,7 +303,7 @@ void SidebarTxtControl::MouseButtonDown( const MouseEvent& rMEvt )
{
GetTextView()->MouseButtonDown( rMEvt );
}
- mrDocView.GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ mrDocView.GetViewFrame()->GetBindings().InvalidateAll(sal_False);
}
void SidebarTxtControl::MouseButtonUp( const MouseEvent& rMEvt )
@@ -333,7 +333,7 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt )
{
if ( !mrSidebarWin.IsProtected() &&
GetTextView() &&
- GetTextView()->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(),TRUE ))
+ GetTextView()->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(),sal_True ))
{
Link aLink = LINK(this, SidebarTxtControl, OnlineSpellCallback);
GetTextView()->ExecuteSpellPopup(rCEvt.GetMousePosPixel(),&aLink);
diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
index bd613fc7c031..66b0bc88335c 100644
--- a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
@@ -80,7 +80,7 @@ class SidebarTextEditSource : public SvxEditSource,
SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl )
: SvxEditSource()
, mrSidebarTxtControl( rSidebarTxtControl )
- , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), FALSE )
+ , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), sal_False )
, mViewForwarder( *(rSidebarTxtControl.GetTextView()) )
{
if ( mrSidebarTxtControl.GetTextView() )
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index 413ffaef4333..2deb8889c419 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -331,7 +331,7 @@ void SwSidebarWin::InitControls()
SwDocShell* aShell = mrView.GetDocShell();
mpOutliner = new Outliner(&aShell->GetPool(),OUTLINERMODE_TEXTOBJECT);
aShell->GetDoc()->SetCalcFieldValueHdl( mpOutliner );
- mpOutliner->SetUpdateMode( TRUE );
+ mpOutliner->SetUpdateMode( sal_True );
Rescale();
mpOutlinerView = new OutlinerView ( mpOutliner, mpSidebarTxtControl );
@@ -354,7 +354,7 @@ void SwSidebarWin::InitControls()
mpVScrollbar->AddEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = mpOutliner->GetControlWord();
+ sal_uLong nCntrl = mpOutliner->GetControlWord();
// TODO: crash when AUTOCOMPLETE enabled
nCntrl |= EE_CNTRL_MARKFIELDS | EE_CNTRL_PASTESPECIAL | EE_CNTRL_AUTOCORRECT | EV_CNTRL_AUTOSCROLL | EE_CNTRL_URLSFXEXECUTE; // | EE_CNTRL_AUTOCOMPLETE;
if (pVOpt->IsFieldShadings())
@@ -770,7 +770,7 @@ void SwSidebarWin::SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSideb
meSidebarPosition = eSidebarPosition;
}
-void SwSidebarWin::SetReadonly(BOOL bSet)
+void SwSidebarWin::SetReadonly(sal_Bool bSet)
{
mbReadonly = bSet;
GetOutlinerView()->SetReadOnly(bSet);
@@ -782,7 +782,7 @@ void SwSidebarWin::SetLanguage(const SvxLanguageItem aNewItem)
Engine()->SetModifyHdl( Link() );
ESelection aOld = GetOutlinerView()->GetSelection();
- ESelection aNewSelection( 0, 0, (USHORT)Engine()->GetParagraphCount()-1, USHRT_MAX );
+ ESelection aNewSelection( 0, 0, (sal_uInt16)Engine()->GetParagraphCount()-1, USHRT_MAX );
GetOutlinerView()->SetSelection( aNewSelection );
SfxItemSet aEditAttr(GetOutlinerView()->GetAttribs());
aEditAttr.Put(aNewItem);
@@ -792,7 +792,7 @@ void SwSidebarWin::SetLanguage(const SvxLanguageItem aNewItem)
Engine()->SetModifyHdl( pLink );
const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = Engine()->GetControlWord();
+ sal_uLong nCntrl = Engine()->GetControlWord();
// turn off
if (!pVOpt->IsOnlineSpell())
nCntrl &= ~EE_CNTRL_ONLINESPELLING;
@@ -912,7 +912,7 @@ void SwSidebarWin::ToggleInsMode()
}
}
-void SwSidebarWin::ExecuteCommand(USHORT nSlot)
+void SwSidebarWin::ExecuteCommand(sal_uInt16 nSlot)
{
mrMgr.AssureStdModeAtShell();
@@ -970,7 +970,7 @@ long SwSidebarWin::GetPostItTextHeight()
return mpOutliner ? LogicToPixel(mpOutliner->CalcTextSize()).Height() : 0;
}
-void SwSidebarWin::SwitchToPostIt(USHORT aDirection)
+void SwSidebarWin::SwitchToPostIt(sal_uInt16 aDirection)
{
SwSidebarWin* pPostIt = mrMgr.GetNextPostIt(aDirection, this);
if (pPostIt)
@@ -1014,8 +1014,8 @@ IMPL_LINK( SwSidebarWin, WindowEventListener, VclSimpleEvent*, pEvent )
else if ( pWinEvent->GetId() == VCLEVENT_WINDOW_ACTIVATE &&
pWinEvent->GetWindow() == mpSidebarTxtControl )
{
- const BOOL bLockView = mrView.GetWrtShell().IsViewLocked();
- mrView.GetWrtShell().LockView( TRUE );
+ const sal_Bool bLockView = mrView.GetWrtShell().IsViewLocked();
+ mrView.GetWrtShell().LockView( sal_True );
if ( !IsPreview() )
{
@@ -1075,8 +1075,8 @@ IMPL_LINK(SwSidebarWin, DeleteHdl, void*, pVoid)
void SwSidebarWin::ResetAttributes()
{
- mpOutlinerView->RemoveAttribsKeepLanguages(TRUE);
- mpOutliner->RemoveFields(TRUE);
+ mpOutlinerView->RemoveAttribsKeepLanguages(sal_True);
+ mpOutliner->RemoveFields(sal_True);
mpOutlinerView->SetAttribs(DefaultItem());
}
@@ -1114,7 +1114,7 @@ sal_Int32 SwSidebarWin::GetMinimumSizeWithoutMeta()
void SwSidebarWin::SetSpellChecking()
{
const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = mpOutliner->GetControlWord();
+ sal_uLong nCntrl = mpOutliner->GetControlWord();
if (pVOpt->IsOnlineSpell())
nCntrl |= EE_CNTRL_ONLINESPELLING;
else
@@ -1210,7 +1210,7 @@ void SwSidebarWin::SwitchToFieldPos()
GotoPos();
sal_uInt32 aCount = MoveCaret();
if (aCount)
- mrView.GetDocShell()->GetWrtShell()->SwCrsrShell::Right(aCount, 0, FALSE);
+ mrView.GetDocShell()->GetWrtShell()->SwCrsrShell::Right(aCount, 0, sal_False);
GrabFocusToDocument();
}
@@ -1313,7 +1313,7 @@ void SwRedComment::UpdateData()
void SwRedComment::SetPostItText()
{
Engine()->SetModifyHdl( Link() );
- Engine()->EnableUndo( FALSE );
+ Engine()->EnableUndo( sal_False );
Engine()->Clear();
View()->SetAttribs(DefaultItem());
@@ -1321,7 +1321,7 @@ void SwRedComment::SetPostItText()
Engine()->ClearModifyFlag();
Engine()->GetUndoManager().Clear();
- Engine()->EnableUndo( TRUE );
+ Engine()->EnableUndo( sal_True );
Engine()->SetModifyHdl( LINK( this, SwSidebarWin, ModifyHdl ) );
Invalidate();
}
diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx
index 8e11e5117c27..501394255fde 100644
--- a/sw/source/ui/docvw/edtdd.cxx
+++ b/sw/source/ui/docvw/edtdd.cxx
@@ -63,27 +63,27 @@ using namespace ::com::sun::star;
// no include "dbgoutsw.hxx" here!!!!!!
-extern BOOL bNoInterrupt;
-extern BOOL bFrmDrag;
-extern BOOL bDDTimerStarted;
+extern sal_Bool bNoInterrupt;
+extern sal_Bool bFrmDrag;
+extern sal_Bool bDDTimerStarted;
-BOOL bExecuteDrag = FALSE;
+sal_Bool bExecuteDrag = sal_False;
void SwEditWin::StartDDTimer()
{
aTimer.SetTimeoutHdl(LINK(this, SwEditWin, DDHandler));
aTimer.SetTimeout(480);
aTimer.Start();
- bDDTimerStarted = TRUE;
+ bDDTimerStarted = sal_True;
}
void SwEditWin::StopDDTimer(SwWrtShell *pSh, const Point &rPt)
{
aTimer.Stop();
- bDDTimerStarted = FALSE;
+ bDDTimerStarted = sal_False;
if(!pSh->IsSelFrmMode())
- (pSh->*pSh->fnSetCrsr)(&rPt,FALSE);
+ (pSh->*pSh->fnSetCrsr)(&rPt,sal_False);
aTimer.SetTimeoutHdl(LINK(this,SwEditWin, TimerHandler));
}
@@ -92,37 +92,37 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel )
SwWrtShell &rSh = rView.GetWrtShell();
if( rSh.GetDrawView() )
{
- CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, TRUE );
+ CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, sal_True );
if( rSh.GetDrawView()->Command( aDragEvent, this ) )
{
- rView.GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ rView.GetViewFrame()->GetBindings().InvalidateAll(sal_False);
return; // Event von der SdrView ausgewertet
}
}
if ( !pApplyTempl && !rSh.IsDrawCreate() && !IsDrawAction())
{
- BOOL bStart = FALSE, bDelSelect = FALSE;
+ sal_Bool bStart = sal_False, bDelSelect = sal_False;
SdrObject *pObj = NULL;
Point aDocPos( PixelToLogic( rPosPixel ) );
- if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, TRUE, TRUE))
+ if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, sal_True, sal_True))
//Wir sind nicht beim Selektieren und stehen auf einer
//Selektion
- bStart = TRUE;
+ bStart = sal_True;
else if ( !bFrmDrag && rSh.IsSelFrmMode() &&
rSh.IsInsideSelectedObj( aDocPos ) )
{
//Wir sind nicht am internen Draggen und stehen auf
//einem Objekt (Rahmen, Zeichenobjekt)
- bStart = TRUE;
+ bStart = sal_True;
}
else if( !bFrmDrag && rView.GetDocShell()->IsReadOnly() &&
OBJCNT_NONE != rSh.GetObjCntType( aDocPos, pObj ))
{
rSh.LockPaint();
if( rSh.SelectObj( aDocPos, 0, pObj ))
- bStart = bDelSelect = TRUE;
+ bStart = bDelSelect = sal_True;
else
rSh.UnlockPaint();
}
@@ -131,15 +131,15 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel )
SwContentAtPos aSwContentAtPos( SwContentAtPos::SW_INETATTR );
bStart = rSh.GetContentAtPos( aDocPos,
aSwContentAtPos,
- FALSE );
+ sal_False );
}
if ( bStart && !bIsInDrag )
{
- bMBPressed = FALSE;
+ bMBPressed = sal_False;
ReleaseMouse();
- bFrmDrag = FALSE;
- bExecuteDrag = TRUE;
+ bFrmDrag = sal_False;
+ bExecuteDrag = sal_True;
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
aMovePos = aDocPos;
@@ -158,7 +158,7 @@ void SwEditWin::StartExecuteDrag()
if( !bExecuteDrag || bIsInDrag )
return;
- bIsInDrag = TRUE;
+ bIsInDrag = sal_True;
SwTransferable* pTransfer = new SwTransferable( rView.GetWrtShell() );
uno::Reference<
@@ -171,7 +171,7 @@ void SwEditWin::DragFinished()
{
DropCleanup();
aTimer.SetTimeoutHdl( LINK(this,SwEditWin, TimerHandler) );
- bIsInDrag = FALSE;
+ bIsInDrag = sal_False;
}
@@ -180,11 +180,11 @@ void SwEditWin::DropCleanup()
SwWrtShell &rSh = rView.GetWrtShell();
// Stati zuruecksetzen
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
if ( bOldIdleSet )
{
((SwViewOption*)rSh.GetViewOptions())->SetIdle( bOldIdle );
- bOldIdleSet = FALSE;
+ bOldIdleSet = sal_False;
}
if ( pUserMarker )
CleanupDropUserMarker();
@@ -246,7 +246,7 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt )
// (according to KA due to Java D&D), we'll have to
// reevaluate the drop action once more _with_ the
// Transferable.
- USHORT nEventAction;
+ sal_uInt16 nEventAction;
sal_Int8 nUserOpt = rEvt.mbDefault ? EXCHG_IN_ACTION_DEFAULT
: rEvt.mnAction;
m_nDropAction = SotExchange::GetExchangeAction(
@@ -261,18 +261,18 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt )
TransferableDataHelper aData( rEvt.maDropEvent.Transferable );
nRet = rEvt.mnAction;
if( !SwTransferable::PasteData( aData, rSh, m_nDropAction, m_nDropFormat,
- m_nDropDestination, FALSE, rEvt.mbDefault, &aDocPt, nRet))
+ m_nDropDestination, sal_False, rEvt.mbDefault, &aDocPt, nRet))
//!! nRet = SFX_APP()->ExecuteDrop( rEvt );
nRet = DND_ACTION_NONE;
else if ( SW_MOD()->pDragDrop )
//Bei internem D&D nicht mehr aufraeumen!
- SW_MOD()->pDragDrop->SetCleanUp( FALSE );
+ SW_MOD()->pDragDrop->SetCleanUp( sal_False );
return nRet;
}
-USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj )
+sal_uInt16 SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj )
{
SwWrtShell &rSh = rView.GetWrtShell();
const Point aDocPt( PixelToLogic( rPixPnt ) );
@@ -297,7 +297,7 @@ USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj )
}
//Auf was wollen wir denn gerade droppen?
- USHORT nDropDestination = 0;
+ sal_uInt16 nDropDestination = 0;
//Sonst etwas aus der DrawingEngine getroffen?
if( OBJCNT_NONE != eType )
@@ -306,7 +306,7 @@ USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj )
{
case OBJCNT_GRF:
{
- BOOL bLink,
+ sal_Bool bLink,
bIMap = 0 != rSh.GetFmtFromObj( aDocPt )->GetURL().GetMap();
String aDummy;
rSh.GetGrfAtPos( aDocPt, aDummy, bLink );
@@ -372,14 +372,14 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
aWin.Right() -= nMargin;
aWin.Bottom() -= nMargin;
if(!aWin.IsInside(aPixPt)) {
- static ULONG last_tick = 0;
- ULONG current_tick = Time::GetSystemTicks();
+ static sal_uLong last_tick = 0;
+ sal_uLong current_tick = Time::GetSystemTicks();
if((current_tick-last_tick) > 500) {
last_tick = current_tick;
if(!bOldIdleSet) {
bOldIdle = rSh.GetViewOptions()->IsIdle();
- ((SwViewOption *)rSh.GetViewOptions())->SetIdle(FALSE);
- bOldIdleSet = TRUE;
+ ((SwViewOption *)rSh.GetViewOptions())->SetIdle(sal_False);
+ bOldIdleSet = sal_True;
}
CleanupDropUserMarker();
if(aPixPt.X() > aWin.Right()) aPixPt.X() += nMargin;
@@ -394,7 +394,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
if(bOldIdleSet) {
((SwViewOption *)rSh.GetViewOptions())->SetIdle( bOldIdle );
- bOldIdleSet = FALSE;
+ bOldIdleSet = sal_False;
}
SdrObject *pObj = NULL;
@@ -402,7 +402,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
if( !m_nDropDestination )
return DND_ACTION_NONE;
- USHORT nEventAction;
+ sal_uInt16 nEventAction;
sal_Int8 nUserOpt = rEvt.mbDefault ? EXCHG_IN_ACTION_DEFAULT
: rEvt.mnAction;
@@ -421,21 +421,21 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
SwModule *pMod = SW_MOD();
if( pMod->pDragDrop )
{
- BOOL bCleanup = FALSE;
+ sal_Bool bCleanup = sal_False;
//Zeichenobjekte in Kopf-/Fusszeilen sind nicht erlaubt
SwWrtShell *pSrcSh = pMod->pDragDrop->GetShell();
if( (pSrcSh->GetSelFrmType() == FRMTYPE_DRAWOBJ) &&
pSrcSh->IsSelContainsControl() &&
- (rSh.GetFrmType( &aDocPt, FALSE ) & (FRMTYPE_HEADER|FRMTYPE_FOOTER)) )
+ (rSh.GetFrmType( &aDocPt, sal_False ) & (FRMTYPE_HEADER|FRMTYPE_FOOTER)) )
{
- bCleanup = TRUE;
+ bCleanup = sal_True;
}
// keine positionsgeschuetzten Objecte verschieben!
else if( DND_ACTION_MOVE == rEvt.mnAction &&
pSrcSh->IsSelObjProtected( FLYPROTECT_POS ) )
{
- bCleanup = TRUE;
+ bCleanup = sal_True;
}
else if( rEvt.mbDefault )
{
@@ -508,16 +508,16 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
IMPL_LINK( SwEditWin, DDHandler, Timer *, EMPTYARG )
{
- bDDTimerStarted = FALSE;
+ bDDTimerStarted = sal_False;
aTimer.Stop();
aTimer.SetTimeout(240);
- bMBPressed = FALSE;
+ bMBPressed = sal_False;
ReleaseMouse();
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
if ( rView.GetViewFrame() )
{
- bExecuteDrag = TRUE;
+ bExecuteDrag = sal_True;
StartExecuteDrag();
}
return 0;
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 5049220b1b5a..afb0f49cac84 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -154,7 +154,7 @@ using namespace ::com::sun::star;
--------------------------------------------------------------------*/
static bool bInputLanguageSwitched = false;
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
//Normalerweise wird im MouseButtonUp eine Selektion aufgehoben wenn die
//Selektion nicht gerade aufgezogen wird. Leider wird im MouseButtonDown
@@ -162,15 +162,15 @@ extern BOOL bNoInterrupt; // in mainwn.cxx
//komplett abgeschlossen und kann deshalb im Up nicht mehr unterschieden
//werden. Um dies Aufzuloese wird bHoldSelection im Down gesetzt und im
//Up ausgewertet.
-static BOOL bHoldSelection = FALSE;
-
-BOOL bFrmDrag = FALSE;
-BOOL bValidCrsrPos = FALSE;
-BOOL bModePushed = FALSE;
-BOOL bDDTimerStarted = FALSE;
-BOOL bFlushCharBuffer = FALSE;
-BOOL SwEditWin::bReplaceQuote = FALSE;
-BOOL bDDINetAttr = FALSE;
+static sal_Bool bHoldSelection = sal_False;
+
+sal_Bool bFrmDrag = sal_False;
+sal_Bool bValidCrsrPos = sal_False;
+sal_Bool bModePushed = sal_False;
+sal_Bool bDDTimerStarted = sal_False;
+sal_Bool bFlushCharBuffer = sal_False;
+sal_Bool SwEditWin::bReplaceQuote = sal_False;
+sal_Bool bDDINetAttr = sal_False;
SdrHdlKind eSdrMoveHdl = HDL_USER;
QuickHelpData* SwEditWin::pQuickHlpData = 0;
@@ -179,10 +179,10 @@ long SwEditWin::nDDStartPosY = 0;
long SwEditWin::nDDStartPosX = 0;
Color SwEditWin::aTextBackColor(COL_YELLOW);
Color SwEditWin::aTextColor(COL_RED);
-BOOL SwEditWin::bTransparentBackColor = FALSE; // Hintergrund nicht transparent
+sal_Bool SwEditWin::bTransparentBackColor = sal_False; // Hintergrund nicht transparent
-extern BOOL bExecuteDrag;
+extern sal_Bool bExecuteDrag;
SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType );
@@ -243,27 +243,27 @@ public:
struct QuickHelpData
{
SvStringsISortDtor aArr;
- USHORT* pAttrs;
+ sal_uInt16* pAttrs;
CommandExtTextInputData* pCETID;
- ULONG nTipId;
- USHORT nLen, nCurArrPos;
- BOOL bClear : 1, bChkInsBlank : 1, bIsTip : 1, bIsAutoText : 1;
+ sal_uLong nTipId;
+ sal_uInt16 nLen, nCurArrPos;
+ sal_Bool bClear : 1, bChkInsBlank : 1, bIsTip : 1, bIsAutoText : 1;
QuickHelpData() : pAttrs( 0 ), pCETID( 0 ) { ClearCntnt(); }
void Move( QuickHelpData& rCpy );
void ClearCntnt();
- void Start( SwWrtShell& rSh, USHORT nWrdLen );
+ void Start( SwWrtShell& rSh, sal_uInt16 nWrdLen );
void Stop( SwWrtShell& rSh );
- BOOL HasCntnt() const { return aArr.Count() && 0 != nLen; }
+ sal_Bool HasCntnt() const { return aArr.Count() && 0 != nLen; }
- void Inc( BOOL bEndLess )
+ void Inc( sal_Bool bEndLess )
{
if( ++nCurArrPos >= aArr.Count() )
nCurArrPos = (bEndLess && !bIsAutoText )? 0 : nCurArrPos-1;
}
- void Dec( BOOL bEndLess )
+ void Dec( sal_Bool bEndLess )
{
if( 0 == nCurArrPos-- )
nCurArrPos = (bEndLess && !bIsAutoText ) ? aArr.Count()-1 : 0;
@@ -279,7 +279,7 @@ struct QuickHelpData
#define HIT_PIX 2 /* Hit-Toleranz in Pixel */
#define MIN_MOVE 4
-inline BOOL IsMinMove(const Point &rStartPos, const Point &rLPt)
+inline sal_Bool IsMinMove(const Point &rStartPos, const Point &rLPt)
{
return Abs(rStartPos.X() - rLPt.X()) > MIN_MOVE ||
Abs(rStartPos.Y() - rLPt.Y()) > MIN_MOVE;
@@ -291,9 +291,9 @@ inline BOOL IsMinMove(const Point &rStartPos, const Point &rLPt)
nur bei DrawObjecte zum Selektieren fuehren, bei SwgFlys
ggfs zum ausloesen von Hyperlinks (DownLoad/NewWindow!)
--------------------------------------------------------------------*/
-inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
+inline sal_Bool IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SdrObject* pObj;
switch( rSh.GetObjCntType( rPt, pObj ))
{
@@ -301,7 +301,7 @@ inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
case OBJCNT_FLY:
case OBJCNT_GRF:
case OBJCNT_OLE:
- bRet = FALSE;
+ bRet = sal_False;
break;
default:; //prevent warning
}
@@ -313,7 +313,7 @@ inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
--------------------------------------------------------------------*/
-void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
+void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
{
SwWrtShell &rSh = rView.GetWrtShell();
if( pApplyTempl )
@@ -398,45 +398,45 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
}
// Removed ExecHyperlink option.
- //BOOL bExecHyperlinks = rSh.GetViewOptions()->IsExecHyperlinks() ^
- // (nModifier == KEY_MOD2 ? TRUE : FALSE);
- BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
+ //sal_Bool bExecHyperlinks = rSh.GetViewOptions()->IsExecHyperlinks() ^
+ // (nModifier == KEY_MOD2 ? sal_True : sal_False);
+ sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
- const BOOL bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ const sal_Bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
if ( ( bSecureOption && nModifier == KEY_MOD1 ) ||
( !bSecureOption && nModifier != KEY_MOD1 ) )
- bExecHyperlinks = TRUE;
+ bExecHyperlinks = sal_True;
}
- const BOOL bExecSmarttags = nModifier == KEY_MOD1;
+ const sal_Bool bExecSmarttags = nModifier == KEY_MOD1;
SdrView *pSdrView = rSh.GetDrawView();
- BOOL bPrefSdrPointer = FALSE;
- BOOL bHitHandle = FALSE;
- BOOL bCntAtPos = FALSE;
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
+ sal_Bool bPrefSdrPointer = sal_False;
+ sal_Bool bHitHandle = sal_False;
+ sal_Bool bCntAtPos = sal_False;
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
rSh.IsCrsrReadonly();
aActHitType = SDRHIT_NONE;
PointerStyle eStyle = POINTER_TEXT;
if ( !pSdrView )
- bCntAtPos = TRUE;
- else if ( TRUE == (bHitHandle = pSdrView->PickHandle( rLPt ) != 0) )
+ bCntAtPos = sal_True;
+ else if ( sal_True == (bHitHandle = pSdrView->PickHandle( rLPt ) != 0) )
{
aActHitType = SDRHIT_OBJECT;
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
}
else
{
- const BOOL bNotInSelObj = !rSh.IsInsideSelectedObj( rLPt );
+ const sal_Bool bNotInSelObj = !rSh.IsInsideSelectedObj( rLPt );
if ( rView.GetDrawFuncPtr() && !bInsDraw && bNotInSelObj )
{
aActHitType = SDRHIT_OBJECT;
if (IsObjectSelect())
eStyle = POINTER_ARROW;
else
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
}
else
{
@@ -461,7 +461,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
if (pSdrView->IsTextEdit())
{
aActHitType = SDRHIT_NONE;
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
}
else
{
@@ -471,7 +471,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
if (eHit == SDRHIT_URLFIELD && bExecHyperlinks)
{
aActHitType = SDRHIT_OBJECT;
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
}
else
{
@@ -510,9 +510,9 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
else
{
if ( rView.GetDrawFuncPtr() )
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
else
- bCntAtPos = TRUE;
+ bCntAtPos = sal_True;
}
}
}
@@ -576,7 +576,7 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
SwWrtShell &rSh = rView.GetWrtShell();
Point aModPt( aMovePos );
const SwRect aOldVis( rSh.VisArea() );
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if ( !rSh.VisArea().IsInside( aModPt ) )
{
@@ -584,12 +584,12 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
{
const int nMaxScroll = 40;
rView.Scroll( Rectangle(aModPt,Size(1,1)), nMaxScroll, nMaxScroll);
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( bFrmDrag )
{
- (rSh.*rSh.fnDrag)(&aModPt,FALSE);
- bDone = TRUE;
+ (rSh.*rSh.fnDrag)(&aModPt,sal_False);
+ bDone = sal_True;
}
if ( !bDone )
aModPt = rSh.GetCntntPos( aModPt,aModPt.Y() > rSh.VisArea().Bottom() );
@@ -602,7 +602,7 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
rSh.SelectTableRowCol( *pRowColumnSelectionStart, &aPos, bIsRowDrag );
}
else
- (rSh.*rSh.fnSetCrsr)( &aModPt, FALSE );
+ (rSh.*rSh.fnSetCrsr)( &aModPt, sal_False );
//fix(24138): Es kann sein, dass der "Sprung" ueber eine Tabelle so
//nicht geschafft wird. Deshalb wir hier eben per Up/Down ueber die
@@ -613,9 +613,9 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
//JP 11.10.2001 Bug 72294 - take the center point of VisArea to
// decide in which direction the user want.
if( aModPt.Y() < ( rVisArea.Top() + rVisArea.Height() / 2 ) )
- rSh.Up( TRUE, 1 );
+ rSh.Up( sal_True, 1 );
else
- rSh.Down( TRUE, 1 );
+ rSh.Down( sal_True, 1 );
}
}
@@ -669,16 +669,16 @@ inline void SwEditWin::EnterArea()
------------------------------------------------------------------------*/
-void SwEditWin::InsFrm(USHORT nCols)
+void SwEditWin::InsFrm(sal_uInt16 nCols)
{
- StdDrawMode( OBJ_NONE, FALSE );
- bInsFrm = TRUE;
+ StdDrawMode( OBJ_NONE, sal_False );
+ bInsFrm = sal_True;
nInsFrmColCount = nCols;
}
-void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect )
+void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, sal_Bool bObjSelect )
{
SetSdrDrawMode( eSdrObjectKind );
@@ -695,8 +695,8 @@ void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect )
if (bObjSelect)
rView.GetDrawFuncPtr()->Activate( SID_OBJECT_SELECT );
else
- rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< USHORT >(eSdrObjectKind) ); // don't know if this is useful at all; but it keeps functionality as it was...
- bInsFrm = FALSE;
+ rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< sal_uInt16 >(eSdrObjectKind) ); // don't know if this is useful at all; but it keeps functionality as it was...
+ bInsFrm = sal_False;
nInsFrmColCount = 1;
}
@@ -710,7 +710,7 @@ void SwEditWin::StopInsFrm()
rView.SetDrawFuncPtr(NULL);
}
rView.LeaveDrawCreate(); // Konstruktionsmode verlassen
- bInsFrm = FALSE;
+ bInsFrm = sal_False;
nInsFrmColCount = 1;
}
@@ -718,16 +718,16 @@ void SwEditWin::StopInsFrm()
--------------------------------------------------------------------*/
-BOOL SwEditWin::IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const
+sal_Bool SwEditWin::IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const
{
const SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions();
if ( !rCTLOptions.IsCTLFontEnabled() ||
!rCTLOptions.IsCTLSequenceChecking() )
- return FALSE;
+ return sal_False;
const xub_StrLen nFirstPos = rCrsr.Start()->nContent.GetIndex();
if ( 0 == nFirstPos ) /* first char needs not to be checked */
- return FALSE;
+ return sal_False;
SwBreakIt *pBreakIter = SwBreakIt::Get();
uno::Reference < i18n::XBreakIterator > xBI = pBreakIter->GetBreakIter();
@@ -841,7 +841,7 @@ void SwEditWin::FlushInBuffer()
// at this point now we will insert the buffer text 'normally' some lines below...
- rSh.Pop( FALSE ); // pop old cursor from stack
+ rSh.Pop( sal_False ); // pop old cursor from stack
if (!aInBuffer.Len())
return;
@@ -877,7 +877,7 @@ void SwEditWin::FlushInBuffer()
sal_Bool bLang = true;
if(eBufferLanguage != LANGUAGE_DONTKNOW)
{
- USHORT nWhich = 0;
+ sal_uInt16 nWhich = 0;
switch( GetI18NScriptTypeOfLanguage( eBufferLanguage ))
{
case i18n::ScriptType::ASIAN: nWhich = RES_CHRATR_CJK_LANGUAGE; break;
@@ -889,7 +889,7 @@ void SwEditWin::FlushInBuffer()
{
SfxItemSet aLangSet(rView.GetPool(), nWhich, nWhich);
rSh.GetCurAttr(aLangSet);
- if(SFX_ITEM_DEFAULT <= aLangSet.GetItemState(nWhich, TRUE))
+ if(SFX_ITEM_DEFAULT <= aLangSet.GetItemState(nWhich, sal_True))
{
LanguageType eLang = static_cast<const SvxLanguageItem&>(aLangSet.Get(nWhich)).GetLanguage();
if ( eLang == eBufferLanguage )
@@ -956,7 +956,7 @@ void SwEditWin::FlushInBuffer()
rSh.Insert( aInBuffer );
eBufferLanguage = LANGUAGE_DONTKNOW;
aInBuffer.Erase();
- bFlushCharBuffer = FALSE;
+ bFlushCharBuffer = sal_False;
}
}
@@ -969,7 +969,7 @@ void SwEditWin::FlushInBuffer()
#define MOVE_RIGHT_SMALL 6
#define MOVE_DOWN_SMALL 7
-void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
+void SwEditWin::ChangeFly( sal_uInt8 nDir, sal_Bool bWeb )
{
SwWrtShell &rSh = rView.GetWrtShell();
SwRect aTmp = rSh.GetFlyRect();
@@ -1001,10 +1001,10 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
aSnap = rSh.GetViewOptions()->GetSnapSize();
short nDiv = rSh.GetViewOptions()->GetDivisionX();
if ( nDiv > 0 )
- aSnap.Width() = Max( (ULONG)1, (ULONG)aSnap.Width() / nDiv );
+ aSnap.Width() = Max( (sal_uLong)1, (sal_uLong)aSnap.Width() / nDiv );
nDiv = rSh.GetViewOptions()->GetDivisionY();
if ( nDiv > 0 )
- aSnap.Height() = Max( (ULONG)1, (ULONG)aSnap.Height() / nDiv );
+ aSnap.Height() = Max( (sal_uLong)1, (sal_uLong)aSnap.Height() / nDiv );
}
SwRect aBoundRect;
@@ -1039,9 +1039,9 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
case MOVE_DOWN_SMALL: if( aTmp.Height() < aSnap.Height() + MINFLY ) break;
nDown = aSnap.Height(); // kein break
case MOVE_DOWN_BIG: aTmp.Top( aTmp.Top() + nDown ); break;
- default: ASSERT( TRUE, "ChangeFly: Unknown direction." );
+ default: ASSERT( sal_True, "ChangeFly: Unknown direction." );
}
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if ((FLY_AS_CHAR == eAnchorId) && ( nDir % 2 ))
{
long aDiff = aTmp.Top() - aRefPoint.Y();
@@ -1054,7 +1054,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
if( bWeb )
{
eNew = aVert.GetVertOrient();
- BOOL bDown = 0 != ( nDir & 0x02 );
+ sal_Bool bDown = 0 != ( nDir & 0x02 );
switch( eNew )
{
case text::VertOrientation::CHAR_TOP:
@@ -1085,7 +1085,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
}
aVert.SetVertOrient( eNew );
aSet.Put( aVert );
- bSet = TRUE;
+ bSet = sal_True;
}
if (bWeb && (FLY_AT_PARA == eAnchorId)
&& ( nDir==MOVE_LEFT_SMALL || nDir==MOVE_RIGHT_BIG ))
@@ -1109,23 +1109,23 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
{
aHori.SetHoriOrient( eNew );
aSet.Put( aHori );
- bSet = TRUE;
+ bSet = sal_True;
}
}
rSh.StartAllAction();
if( bSet )
rSh.SetFlyFrmAttr( aSet );
- BOOL bSetPos = (FLY_AS_CHAR != eAnchorId);
+ sal_Bool bSetPos = (FLY_AS_CHAR != eAnchorId);
if(bSetPos && bWeb)
{
if (FLY_AT_PAGE != eAnchorId)
{
- bSetPos = FALSE;
+ bSetPos = sal_False;
}
else
{
bSetPos = (::GetHtmlMode(rView.GetDocShell()) & HTMLMODE_SOME_ABS_POS) ?
- TRUE : FALSE;
+ sal_True : sal_False;
}
}
if( bSetPos )
@@ -1136,7 +1136,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
/* -----------------------------23.05.2002 11:35------------------------------
---------------------------------------------------------------------------*/
-void SwEditWin::ChangeDrawing( BYTE nDir )
+void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
{
// --> OD 2005-01-31 #i40845# - start undo action in order to get only one
// undo action for this change.
@@ -1147,7 +1147,7 @@ void SwEditWin::ChangeDrawing( BYTE nDir )
long nX = 0;
long nY = 0;
sal_Bool bOnePixel = sal_False;
- USHORT nAnchorDir = SW_MOVE_UP;
+ sal_uInt16 nAnchorDir = SW_MOVE_UP;
switch(nDir)
{
case MOVE_LEFT_SMALL:
@@ -1181,14 +1181,14 @@ void SwEditWin::ChangeDrawing( BYTE nDir )
if(0 != nX || 0 != nY)
{
- BYTE nProtect = rSh.IsSelObjProtected( FLYPROTECT_POS|FLYPROTECT_SIZE );
+ sal_uInt8 nProtect = rSh.IsSelObjProtected( FLYPROTECT_POS|FLYPROTECT_SIZE );
Size aSnap( rSh.GetViewOptions()->GetSnapSize() );
short nDiv = rSh.GetViewOptions()->GetDivisionX();
if ( nDiv > 0 )
- aSnap.Width() = Max( (ULONG)1, (ULONG)aSnap.Width() / nDiv );
+ aSnap.Width() = Max( (sal_uLong)1, (sal_uLong)aSnap.Width() / nDiv );
nDiv = rSh.GetViewOptions()->GetDivisionY();
if ( nDiv > 0 )
- aSnap.Height() = Max( (ULONG)1, (ULONG)aSnap.Height() / nDiv );
+ aSnap.Height() = Max( (sal_uLong)1, (sal_uLong)aSnap.Height() / nDiv );
if(bOnePixel)
aSnap = PixelToLogic(Size(1,1));
@@ -1208,8 +1208,8 @@ void SwEditWin::ChangeDrawing( BYTE nDir )
{
// --> FME 2005-04-26 #i47138#
// Check if object is anchored as character and move direction
- BOOL bDummy;
- const bool bVertAnchor = rSh.IsFrmVertical( TRUE, bDummy );
+ sal_Bool bDummy;
+ const bool bVertAnchor = rSh.IsFrmVertical( sal_True, bDummy );
const bool bHoriMove = !bVertAnchor == !( nDir % 2 );
const bool bMoveAllowed =
!bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR);
@@ -1246,14 +1246,14 @@ void SwEditWin::ChangeDrawing( BYTE nDir )
if(pSdrView->IsDragObj())
{
- BOOL bWasNoSnap = static_cast< BOOL >(rDragStat.IsNoSnap());
- BOOL bWasSnapEnabled = pSdrView->IsSnapEnabled();
+ sal_Bool bWasNoSnap = static_cast< sal_Bool >(rDragStat.IsNoSnap());
+ sal_Bool bWasSnapEnabled = pSdrView->IsSnapEnabled();
// switch snapping off
if(!bWasNoSnap)
- ((SdrDragStat&)rDragStat).SetNoSnap(TRUE);
+ ((SdrDragStat&)rDragStat).SetNoSnap(sal_True);
if(bWasSnapEnabled)
- pSdrView->SetSnapEnabled(FALSE);
+ pSdrView->SetSnapEnabled(sal_False);
pSdrView->MovAction(aEndPoint);
pSdrView->EndDragObj();
@@ -1304,7 +1304,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
aKeyInputFlushTimer.Stop();
SwWrtShell &rSh = rView.GetWrtShell();
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
rSh.IsCrsrReadonly();
//if the language changes the buffer must be flushed
@@ -1325,7 +1325,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
// OS:auch die DrawView braucht noch ein readonly-Flag
if ( !bIsDocReadOnly && rSh.GetDrawView() && rSh.GetDrawView()->KeyInput( rKEvt, this ) )
{
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll( FALSE );
+ rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll( sal_False );
rSh.SetModified();
return; // Event von der SdrView ausgewertet
}
@@ -1336,10 +1336,10 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
rSh.Edit();
}
- BOOL bFlushBuffer = FALSE;
- BOOL bNormalChar = FALSE;
- BOOL bChkInsBlank = pQuickHlpData->bChkInsBlank;
- pQuickHlpData->bChkInsBlank = FALSE;
+ sal_Bool bFlushBuffer = sal_False;
+ sal_Bool bNormalChar = sal_False;
+ sal_Bool bChkInsBlank = pQuickHlpData->bChkInsBlank;
+ pQuickHlpData->bChkInsBlank = sal_False;
KeyEvent aKeyEvent( rKEvt );
// look for vertical mappings
@@ -1348,7 +1348,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
//JP 21.2.2002: must changed from switch to if, because the Linux
// compiler has problem with the code. Has to remove if the new general
// handler exist.
- USHORT nKey = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode();
if( KEY_UP == nKey || KEY_DOWN == nKey ||
KEY_LEFT == nKey || KEY_RIGHT == nKey )
@@ -1398,7 +1398,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
const SwFrmFmt* pFlyFmt = rSh.GetFlyFrmFmt();
if( pFlyFmt )
{
- USHORT nEvent;
+ sal_uInt16 nEvent;
if( 32 <= aCh &&
0 == (( KEY_MOD1 | KEY_MOD2 ) & rKeyCode.GetModifier() ))
@@ -1459,8 +1459,8 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
TblChgWidthHeightType eTblChgMode = nsTblChgWidthHeightType::WH_COL_LEFT; // initialization just for warning-free code
- USHORT nTblChgSize = 0;
- BOOL bStopKeyInputTimer = TRUE;
+ sal_uInt16 nTblChgSize = 0;
+ sal_Bool bStopKeyInputTimer = sal_True;
String sFmlEntry;
enum SW_KeyState { KS_Start,
@@ -1511,7 +1511,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
SW_KeyState eKeyState = bIsDocReadOnly ? KS_CheckDocReadOnlyKeys
: KS_CheckKey,
eNextKeyState = KS_Ende;
- BYTE nDir = 0;
+ sal_uInt8 nDir = 0;
// -> #i23725#
if (nKS_NUMDOWN_Count > 0)
@@ -1558,12 +1558,12 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
else
rSh.SttSelect();
rSh.MoveSection( fnSectionCurr, fnSectionEnd );
- rSh.Pop( TRUE );
+ rSh.Pop( sal_True );
rSh.EndSelect();
sFmlEntry = '=';
}
else
- rSh.Pop( FALSE );
+ rSh.Pop( sal_False );
}
else
{
@@ -1662,7 +1662,7 @@ KEYINPUT_CHECKTABLE:
case KEY_LEFT:
case KEY_LEFT | KEY_MOD1:
{
- BOOL bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1);
+ sal_Bool bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1);
if(!bMod1)
{
eFlyState = KS_Fly_Change;
@@ -1685,7 +1685,7 @@ KEYINPUT_CHECKTABLE:
case KEY_UP:
case KEY_UP | KEY_MOD1:
{
- BOOL bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1);
+ sal_Bool bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1);
if(!bMod1)
{
eFlyState = KS_Fly_Change;
@@ -1701,7 +1701,7 @@ KEYINPUT_CHECKTABLE:
case KEY_DOWN:
case KEY_DOWN | KEY_MOD1:
{
- BOOL bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1);
+ sal_Bool bMod1 = 0 != (rKeyCode.GetModifier() & KEY_MOD1);
if(!bMod1)
{
eFlyState = KS_Fly_Change;
@@ -1718,7 +1718,7 @@ KEYINPUT_CHECKTABLE:
KEYINPUT_CHECKTABLE_INSDEL:
if( rSh.IsTableMode() || !rSh.GetTableFmt() ||
!bTblInsDelMode ||
- FALSE /* Tabelle geschuetzt */
+ sal_False /* Tabelle geschuetzt */
)
{
const int nSelectionType = rSh.GetSelectionType();
@@ -1743,7 +1743,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KEY_DELETE:
if (rSh.IsInFrontOfLabel() &&
- rSh.NumOrNoNum(FALSE))
+ rSh.NumOrNoNum(sal_False))
eKeyState = KS_NumOrNoNum;
break;
@@ -1751,22 +1751,22 @@ KEYINPUT_CHECKTABLE_INSDEL:
if( !rSh.IsTableMode() && rSh.GetTableFmt() )
{
eKeyState = KS_Ende;
- bTblInsDelMode = TRUE;
- bTblIsInsMode = FALSE;
- bTblIsColMode = TRUE;
+ bTblInsDelMode = sal_True;
+ bTblIsInsMode = sal_False;
+ bTblIsColMode = sal_True;
aKeyInputTimer.Start();
- bStopKeyInputTimer = FALSE;
+ bStopKeyInputTimer = sal_False;
}
break;
case KEY_INSERT | KEY_MOD2:
if( !rSh.IsTableMode() && rSh.GetTableFmt() )
{
eKeyState = KS_Ende;
- bTblInsDelMode = TRUE;
- bTblIsInsMode = TRUE;
- bTblIsColMode = TRUE;
+ bTblInsDelMode = sal_True;
+ bTblIsInsMode = sal_True;
+ bTblIsColMode = sal_True;
aKeyInputTimer.Start();
- bStopKeyInputTimer = FALSE;
+ bStopKeyInputTimer = sal_False;
}
break;
@@ -1818,7 +1818,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
if( !rSh.HasReadonlySel() )
{
// #i23725#
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
// --> OD 2006-01-31 - try to add comment for code snip:
// Remove the paragraph indent, if the cursor is at the
// beginning of a paragraph, there is no selection
@@ -1851,13 +1851,13 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
eKeyState = KS_NumUp;
nKS_NUMDOWN_Count = 2;
- bDone = TRUE;
+ bDone = sal_True;
}
else if (nKS_NUMINDENTINC_Count > 0)
{
eKeyState = KS_NumIndentDec;
nKS_NUMINDENTINC_Count = 2;
- bDone = TRUE;
+ bDone = sal_True;
}
}
// <- #i23725#
@@ -1901,7 +1901,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
}
if ( bCallNumOrNoNum &&
- rSh.NumOrNoNum( !bOnlyBackspaceKey, TRUE ) )
+ rSh.NumOrNoNum( !bOnlyBackspaceKey, sal_True ) )
{
eKeyState = KS_NumOrNoNum;
}
@@ -1922,9 +1922,9 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
#ifdef SW_CRSR_TIMER
- BOOL bOld = rSh.ChgCrsrTimerFlag( FALSE );
+ sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
#endif
- if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark() || rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT)
+ if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark() || rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT)
{
eKeyState=KS_GotoNextFieldMark;
}
@@ -1978,9 +1978,9 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KEY_TAB | KEY_SHIFT:
{
#ifdef SW_CRSR_TIMER
- BOOL bOld = rSh.ChgCrsrTimerFlag( FALSE );
+ sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
#endif
- if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT) {
+ if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT) {
eKeyState=KS_GotoPrevFieldMark;
}
else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
@@ -2088,7 +2088,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
case KEY_TAB:
case KEY_TAB | KEY_SHIFT:
- bNormalChar = FALSE;
+ bNormalChar = sal_False;
eKeyState = KS_Ende;
if ( rSh.GetSelectionType() &
(nsSelectionType::SEL_GRF |
@@ -2114,10 +2114,10 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
SfxItemSet aSet(rSh.GetAttrPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT);
rSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, FALSE))
+ if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, sal_False))
{
- const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, TRUE);
- bNormalChar = FALSE;
+ const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, sal_True);
+ bNormalChar = sal_False;
eKeyState = KS_Ende;
rSh.ClickToINetAttr((const SwFmtINetFmt&)rItem, URLLOAD_NOFILTER);
}
@@ -2134,12 +2134,12 @@ KEYINPUT_CHECKTABLE_INSDEL:
switch ( rKeyCode.GetModifier() | rKeyCode.GetCode() )
{
case KEY_RIGHT | KEY_MOD2:
- rSh.Right( CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.Right( CRSR_SKIP_CHARS, sal_False, 1, sal_False );
eKeyState = KS_Ende;
FlushInBuffer();
break;
case KEY_LEFT | KEY_MOD2:
- rSh.Left( CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.Left( CRSR_SKIP_CHARS, sal_False, 1, sal_False );
eKeyState = KS_Ende;
FlushInBuffer();
break;
@@ -2158,14 +2158,14 @@ KEYINPUT_CHECKTABLE_INSDEL:
if (bNormalChar && rSh.IsInFrontOfLabel())
{
- rSh.NumOrNoNum(FALSE);
+ rSh.NumOrNoNum(sal_False);
}
if( aInBuffer.Len() && ( !bNormalChar || bIsDocReadOnly ))
FlushInBuffer();
if( rView.KeyInput( aKeyEvent ) )
- bFlushBuffer = TRUE, bNormalChar = FALSE;
+ bFlushBuffer = sal_True, bNormalChar = sal_False;
else
{
// OS 22.09.95: Da der Sfx Acceleratoren nur aufruft, wenn sie beim letzten
@@ -2202,7 +2202,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else
{
- bNormalChar = FALSE;
+ bNormalChar = sal_False;
Window::KeyInput( aKeyEvent );
}
}
@@ -2251,7 +2251,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
aCh = '\t';
// kein break!
case KS_InsChar:
- if (rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT)
+ if (rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT)
{
::sw::mark::ICheckboxFieldmark* pFieldmark =
dynamic_cast< ::sw::mark::ICheckboxFieldmark* >
@@ -2284,7 +2284,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else if(!rSh.HasReadonlySel())
{
- BOOL bIsNormalChar = GetAppCharClass().isLetterNumeric(
+ sal_Bool bIsNormalChar = GetAppCharClass().isLetterNumeric(
String( aCh ), 0 );
if( bChkInsBlank && bIsNormalChar &&
(aInBuffer.Len() || !rSh.IsSttPara() || !rSh.IsEndPara() ))
@@ -2296,8 +2296,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
- BOOL bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh );
- BOOL bRunNext = pACorr && pACorr->HasRunNext();
+ sal_Bool bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh );
+ sal_Bool bRunNext = pACorr && pACorr->HasRunNext();
if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) &&
pACfg->IsAutoFmtByInput() &&
(( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) &&
@@ -2364,7 +2364,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
default:
{
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
FlushInBuffer();
//??? if( bFlushCharBuffer )
//??? FlushInBuffer( &rSh );
@@ -2387,11 +2387,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
break;
case KS_NumDown:
- rSh.NumUpDown( TRUE );
+ rSh.NumUpDown( sal_True );
nKS_NUMDOWN_Count = 2; // #i23725#
break;
case KS_NumUp:
- rSh.NumUpDown( FALSE );
+ rSh.NumUpDown( sal_False );
break;
// -> #i23726#
@@ -2440,7 +2440,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
nSlotId = FN_GOTO_PREV_CELL;
break;
case KS_AutoFmtByInput:
- rSh.SplitNode( TRUE );
+ rSh.SplitNode( sal_True );
break;
// case KS_NumOrNoNum:
@@ -2475,11 +2475,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
if(pList->GetShortName( sFnd, sShrtNm, sGroup))
{
rSh.SttSelect();
- rSh.ExtendSelection( FALSE, aTmpQHD.nLen );
+ rSh.ExtendSelection( sal_False, aTmpQHD.nLen );
SwGlossaryHdl* pGlosHdl = GetView().GetGlosHdl();
- pGlosHdl->SetCurGroup(sGroup, TRUE);
+ pGlosHdl->SetCurGroup(sGroup, sal_True);
pGlosHdl->InsertGlossary( sShrtNm);
- pQuickHlpData->bChkInsBlank = TRUE;
+ pQuickHlpData->bChkInsBlank = sal_True;
}
}
else
@@ -2499,7 +2499,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KS_EditFormula:
{
- const USHORT nId = SwInputChild::GetChildWindowId();
+ const sal_uInt16 nId = SwInputChild::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
pVFrame->ToggleChildWindow( nId );
@@ -2576,7 +2576,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
if( bStopKeyInputTimer )
{
aKeyInputTimer.Stop();
- bTblInsDelMode = FALSE;
+ bTblInsDelMode = sal_False;
}
// falls die gepufferten Zeichen eingefuegt werden sollen
@@ -2584,7 +2584,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
//OS 16.02.96 11.04: bFlushCharBuffer wurde hier nicht zurueckgesetzt
// warum nicht?
- BOOL bSave = bFlushCharBuffer;
+ sal_Bool bSave = bFlushCharBuffer;
FlushInBuffer();
bFlushCharBuffer = bSave;
@@ -2611,7 +2611,7 @@ void SwEditWin::RstMBDownFlags()
//Dialog noch ein MouseButton Up (wie unter WINDOWS).
//Daher hier die Stati zuruecksetzen und die Maus
//fuer den Dialog freigeben.
- bMBPressed = bNoInterrupt = FALSE;
+ bMBPressed = bNoInterrupt = sal_False;
EnterArea();
ReleaseMouse();
}
@@ -2630,7 +2630,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// would work on deleted objects or the context menu has no parent anymore)
// See #126086# and #128122#
SfxInPlaceClient* pIPClient = rSh.GetSfxViewShell()->GetIPClient();
- BOOL bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
+ sal_Bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
if ( bIsOleActive && PopupMenu::IsInExecute() )
return;
@@ -2646,7 +2646,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
//ignore key modifiers for format paintbrush
{
- BOOL bExecFormatPaintbrush = pApplyTempl && pApplyTempl->pFormatClipboard
+ sal_Bool bExecFormatPaintbrush = pApplyTempl && pApplyTempl->pFormatClipboard
&& pApplyTempl->pFormatClipboard->HasContent();
if( bExecFormatPaintbrush )
rMEvt = MouseEvent( _rMEvt.GetPosPixel(), _rMEvt.GetClicks(),
@@ -2661,7 +2661,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( IsChainMode() )
{
- SetChainMode( FALSE );
+ SetChainMode( sal_False );
SwRect aDummy;
SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)rSh.GetFlyFrmFmt();
if ( !rSh.Chainable( aDummy, *pFmt, aDocPos ) )
@@ -2674,12 +2674,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
//klappen aber in der Praxis ...
lcl_SelectShellForDrop( rView );
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly();
- BOOL bCallBase = TRUE;
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bCallBase = sal_True;
if( pQuickHlpData->bClear )
pQuickHlpData->Stop( rSh );
- pQuickHlpData->bChkInsBlank = FALSE;
+ pQuickHlpData->bChkInsBlank = sal_False;
if( rSh.FinishOLEObj() )
return; //InPlace beenden und der Klick zaehlt nicht mehr
@@ -2691,18 +2691,18 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
if (pSdrView->MouseButtonDown( rMEvt, this ) )
{
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
return; // Event von der SdrView ausgewertet
}
}
- bIsInMove = FALSE;
+ bIsInMove = sal_False;
aStartPos = rMEvt.GetPosPixel();
aRszMvHdlPt.X() = 0, aRszMvHdlPt.Y() = 0;
- BYTE nMouseTabCol = 0;
- const BOOL bTmp = !rSh.IsDrawCreate() && !pApplyTempl && !rSh.IsInSelect() &&
+ sal_uInt8 nMouseTabCol = 0;
+ const sal_Bool bTmp = !rSh.IsDrawCreate() && !pApplyTempl && !rSh.IsInSelect() &&
rMEvt.GetClicks() == 1 && MOUSE_LEFT == rMEvt.GetButtons();
if ( bTmp &&
0 != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPos ) ) &&
@@ -2719,7 +2719,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
bIsRowDrag = SW_TABROWSEL_HORI == nMouseTabCol||
SW_TABROWSEL_HORI_RTL == nMouseTabCol ||
SW_TABCOLSEL_VERT == nMouseTabCol;
- bMBPressed = TRUE;
+ bMBPressed = sal_True;
CaptureMouse();
}
return;
@@ -2730,9 +2730,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
//Zuppeln von Tabellenspalten aus dem Dokument heraus.
if(SW_TABCOL_VERT == nMouseTabCol || SW_TABCOL_HORI == nMouseTabCol)
- rView.SetTabColFromDoc( TRUE );
+ rView.SetTabColFromDoc( sal_True );
else
- rView.SetTabRowFromDoc( TRUE );
+ rView.SetTabRowFromDoc( sal_True );
rView.SetTabColFromDocPos( aDocPos );
rView.InvalidateRulerPos();
@@ -2741,11 +2741,11 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( RulerColumnDrag( rMEvt,
(SW_TABCOL_VERT == nMouseTabCol || SW_TABROW_HORI == nMouseTabCol)) )
{
- rView.SetTabColFromDoc( FALSE );
- rView.SetTabRowFromDoc( FALSE );
+ rView.SetTabColFromDoc( sal_False );
+ rView.SetTabRowFromDoc( sal_False );
rView.InvalidateRulerPos();
rBind.Update();
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
else
{
@@ -2771,7 +2771,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rView.SetNumRuleNodeFromDoc( NULL );
rView.InvalidateRulerPos();
rBind.Update();
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
else
{
@@ -2797,8 +2797,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
//beispielsweise die Selektion aufgehoben wird.
if ( MOUSE_LEFT == rMEvt.GetButtons() )
{
- BOOL bOnlyText = FALSE;
- bMBPressed = bNoInterrupt = TRUE;
+ sal_Bool bOnlyText = sal_False;
+ bMBPressed = bNoInterrupt = sal_True;
nKS_NUMDOWN_Count = 0; // #i23725#
CaptureMouse();
@@ -2827,7 +2827,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
if ( EnterDrawMode( rMEvt, aDocPos ) )
{
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
return;
}
else if ( rView.GetDrawFuncPtr() && bInsFrm )
@@ -2842,7 +2842,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( rSh.IsSelFrmMode())
{
SdrHdl* pHdl = rSh.GetDrawView()->PickHandle(aDocPos);
- BOOL bHitHandle = pHdl && pHdl->GetKind() != HDL_ANCHOR &&
+ sal_Bool bHitHandle = pHdl && pHdl->GetKind() != HDL_ANCHOR &&
pHdl->GetKind() != HDL_ANCHOR_TR;
if ((rSh.IsInsideSelectedObj(aDocPos) || bHitHandle) &&
@@ -2858,32 +2858,32 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
}
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
}
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
return;
}
}
}
}
- BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
- const BOOL bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ const sal_Bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
if ( ( bSecureOption && rMEvt.GetModifier() == KEY_MOD1 ) ||
( !bSecureOption && rMEvt.GetModifier() != KEY_MOD1 ) )
- bExecHyperlinks = TRUE;
+ bExecHyperlinks = sal_True;
}
// --> FME 2004-07-30 #i32329# Enhanced selection
- BYTE nNumberOfClicks = static_cast< BYTE >(rMEvt.GetClicks() % 4);
+ sal_uInt8 nNumberOfClicks = static_cast< sal_uInt8 >(rMEvt.GetClicks() % 4);
if ( 0 == nNumberOfClicks && 0 < rMEvt.GetClicks() )
nNumberOfClicks = 4;
// <--
- BOOL bExecDrawTextLink = FALSE;
+ sal_Bool bExecDrawTextLink = sal_False;
switch ( rMEvt.GetModifier() + rMEvt.GetButtons() )
{
@@ -2905,7 +2905,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
if (aVEvt.eEvent == SDREVENT_EXECUTEURL)
- bExecDrawTextLink = TRUE;
+ bExecDrawTextLink = sal_True;
}
//Rahmen nur zu selektieren versuchen, wenn
@@ -2923,12 +2923,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rView.NoRotate();
rSh.HideCrsr();
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
- BOOL bSelObj = rSh.SelectObj( aDocPos,
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
+ sal_Bool bSelObj = rSh.SelectObj( aDocPos,
rMEvt.IsMod1() ? SW_ENTER_GROUP : 0);
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
if( bSelObj )
{
@@ -2948,13 +2948,13 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
rSh.EnterSelFrmMode( &aDocPos );
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
UpdatePointer( aDocPos, rMEvt.GetModifier() );
}
return;
}
else
- bOnlyText = static_cast< BOOL >(rSh.IsObjSelectable( aDocPos ));
+ bOnlyText = static_cast< sal_Bool >(rSh.IsObjSelectable( aDocPos ));
if (!rView.GetDrawFuncPtr())
rSh.ShowCrsr();
@@ -2979,9 +2979,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
else
{
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
- BYTE nFlag = rMEvt.IsShift() ? SW_ADD_SELECT :0;
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
+ sal_uInt8 nFlag = rMEvt.IsShift() ? SW_ADD_SELECT :0;
if( rMEvt.IsMod1() )
nFlag = nFlag | SW_ENTER_GROUP;
@@ -2992,19 +2992,19 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rView.AttrChangedNotify(&rSh);
}
- BOOL bSelObj = rSh.SelectObj( aDocPos, nFlag );
+ sal_Bool bSelObj = rSh.SelectObj( aDocPos, nFlag );
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
if( !bSelObj )
{
// Cursor hier umsetzen, damit er nicht zuerst
// im Rahmen gezeichnet wird; ShowCrsr() geschieht
// in LeaveSelFrmMode()
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE));
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False));
rSh.LeaveSelFrmMode();
rView.AttrChangedNotify( &rSh );
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
else
{
@@ -3012,7 +3012,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
rSh.SelFlyGrabCrsr();
rSh.MakeSelVisible();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
if( rSh.IsFrmSelected() &&
rView.GetDrawFuncPtr() )
{
@@ -3031,7 +3031,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
case 2:
{
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
if ( !bIsDocReadOnly && rSh.IsInsideSelectedObj(aDocPos) &&
0 == rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) )
@@ -3078,7 +3078,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
return;
SwField *pFld;
- BOOL bFtn = FALSE;
+ sal_Bool bFtn = sal_False;
if( !bIsDocReadOnly &&
( 0 != ( pFld = rSh.GetCurFld() ) ||
@@ -3089,7 +3089,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
GetView().GetViewFrame()->GetBindings().Execute( FN_EDIT_FOOTNOTE );
else
{
- USHORT nTypeId = pFld->GetTypeId();
+ sal_uInt16 nTypeId = pFld->GetTypeId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
switch( nTypeId )
{
@@ -3098,8 +3098,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
//falls es ein Readonly-Bereich ist, dann muss der Status
//enabled werden
- USHORT nSlot = TYP_POSTITFLD == nTypeId ? FN_POSTIT : FN_JAVAEDIT;
- SfxBoolItem aItem(nSlot, TRUE);
+ sal_uInt16 nSlot = TYP_POSTITFLD == nTypeId ? FN_POSTIT : FN_JAVAEDIT;
+ SfxBoolItem aItem(nSlot, sal_True);
pVFrame->GetBindings().SetState(aItem);
pVFrame->GetBindings().Execute(nSlot);
break;
@@ -3127,13 +3127,13 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
else
rSh.SelWrd( &aDocPos );
- bHoldSelection = TRUE;
+ bHoldSelection = sal_True;
return;
}
case 3:
case 4:
{
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
//im Extended Mode hat Doppel- und
//Dreifachklick keine Auswirkungen.
if ( rSh.IsExtMode() )
@@ -3162,7 +3162,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( bMod )
rSh.LeaveAddMode();
- bHoldSelection = TRUE;
+ bHoldSelection = sal_True;
return;
}
@@ -3173,7 +3173,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
case MOUSE_LEFT + KEY_SHIFT:
case MOUSE_LEFT + KEY_SHIFT + KEY_MOD1:
{
- BOOL bLockView = bWasShdwCrsr;
+ sal_Bool bLockView = bWasShdwCrsr;
switch ( rMEvt.GetModifier() )
{
@@ -3191,7 +3191,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
return;
}
}
@@ -3199,8 +3199,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
else if( rSh.IsSelFrmMode() &&
rSh.GetDrawView()->PickHandle( aDocPos ))
{
- bFrmDrag = TRUE;
- bNoInterrupt = FALSE;
+ bFrmDrag = sal_True;
+ bNoInterrupt = sal_False;
return;
}
}
@@ -3220,7 +3220,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
return;
}
}
@@ -3228,8 +3228,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
else if( rSh.IsSelFrmMode() &&
rSh.GetDrawView()->PickHandle( aDocPos ))
{
- bFrmDrag = TRUE;
- bNoInterrupt = FALSE;
+ bFrmDrag = sal_True;
+ bNoInterrupt = sal_False;
return;
}
else
@@ -3237,15 +3237,15 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( !rSh.IsAddMode() && !rSh.IsExtMode() && !rSh.IsBlockMode() )
{
rSh.PushMode();
- bModePushed = TRUE;
+ bModePushed = sal_True;
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
rSh.EnterAddMode();
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
}
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
break;
@@ -3254,14 +3254,14 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( !rSh.IsAddMode() && !rSh.IsExtMode() && !rSh.IsBlockMode() )
{
rSh.PushMode();
- bModePushed = TRUE;
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
+ bModePushed = sal_True;
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
rSh.EnterBlockMode();
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
}
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
break;
case KEY_SHIFT:
@@ -3279,7 +3279,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
rSh.LeaveSelFrmMode();
rView.AttrChangedNotify(&rSh);
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
}
}
else
@@ -3288,7 +3288,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
return;
}
}
@@ -3301,7 +3301,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
return;
}
if ( rSh.IsSelFrmMode() )
@@ -3309,18 +3309,18 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.UnSelectFrm();
rSh.LeaveSelFrmMode();
rView.AttrChangedNotify(&rSh);
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
}
if ( !rSh.IsExtMode() )
{
// keine Selection anfangen, wenn in ein URL-
// Feld oder eine -Grafik geklickt wird
- BOOL bSttSelect = rSh.HasSelection() ||
+ sal_Bool bSttSelect = rSh.HasSelection() ||
Pointer(POINTER_REFHAND) != GetPointer();
if( !bSttSelect )
{
- bSttSelect = TRUE;
+ bSttSelect = sal_True;
if( bExecHyperlinks )
{
SwContentAtPos aCntntAtPos(
@@ -3332,12 +3332,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if( !rSh.IsViewLocked() &&
!rSh.IsReadOnlyAvailable() &&
aCntntAtPos.IsInProtectSect() )
- bLockView = TRUE;
+ bLockView = sal_True;
- bSttSelect = FALSE;
+ bSttSelect = sal_False;
}
else if( rSh.IsURLGrfAtPos( aDocPos ))
- bSttSelect = FALSE;
+ bSttSelect = sal_False;
}
}
@@ -3345,7 +3345,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.SttSelect();
}
}
- bCallBase = FALSE;
+ bCallBase = sal_False;
break;
}
default:
@@ -3353,10 +3353,10 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_CLICKFIELD |
SwContentAtPos::SW_INETATTR );
- if( rSh.GetContentAtPos( aDocPos, aCntntAtPos, FALSE ) &&
+ if( rSh.GetContentAtPos( aDocPos, aCntntAtPos, sal_False ) &&
!rSh.IsReadOnlyAvailable() &&
aCntntAtPos.IsInProtectSect() )
- bLockView = TRUE;
+ bLockView = sal_True;
}
}
@@ -3366,19 +3366,19 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.ClearGCAttr();
}
- BOOL bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = FALSE;
+ sal_Bool bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = sal_False;
if( !bOverSelect )
bOverURLGrf = bOverSelect = 0 != rSh.IsURLGrfAtPos( aDocPos );
if ( !bOverSelect )
{
- const BOOL bTmpNoInterrupt = bNoInterrupt;
- bNoInterrupt = FALSE;
+ const sal_Bool bTmpNoInterrupt = bNoInterrupt;
+ bNoInterrupt = sal_False;
if( !rSh.IsViewLocked() && bLockView )
- rSh.LockView( TRUE );
+ rSh.LockView( sal_True );
else
- bLockView = FALSE;
+ bLockView = sal_False;
int nTmpSetCrsr = 0;
@@ -3387,7 +3387,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
MV_KONTEXT( &rSh );
nTmpSetCrsr = (rSh.*rSh.fnSetCrsr)(&aDocPos,bOnlyText);
bValidCrsrPos = !(CRSR_POSCHG & nTmpSetCrsr);
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
//#i42732# - notify the edit window that from now on we do not use the input language
@@ -3395,7 +3395,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
SetUseInputLanguage( sal_False );
if( bLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
bNoInterrupt = bTmpNoInterrupt;
}
@@ -3414,14 +3414,14 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if( !rSh.IsFrmSelected() )
rSh.GotoNextFly();
rSh.EnterSelFrmMode();
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
// nicht mehr hier zuruecksetzen, damit -- falls durch MouseMove
// bei gedrueckter Ctrl-Taste eine Mehrfachselektion erfolgen soll,
// im Drag nicht die vorherige Selektion aufgehoben wird.
// if(bModePushed)
-// rSh.PopMode(FALSE);
+// rSh.PopMode(sal_False);
break;
}
}
@@ -3441,7 +3441,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
//ignore key modifiers for format paintbrush
{
- BOOL bExecFormatPaintbrush = pApplyTempl && pApplyTempl->pFormatClipboard
+ sal_Bool bExecFormatPaintbrush = pApplyTempl && pApplyTempl->pFormatClipboard
&& pApplyTempl->pFormatClipboard->HasContent();
if( bExecFormatPaintbrush )
rMEvt = MouseEvent( _rMEvt.GetPosPixel(), _rMEvt.GetClicks(),
@@ -3457,7 +3457,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if( pShadCrsr && 0 != (rMEvt.GetModifier() + rMEvt.GetButtons() ) )
delete pShadCrsr, pShadCrsr = 0;
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly();
SET_CURR_SHELL( &rSh );
@@ -3496,9 +3496,9 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
aVis.Bottom( aVis.Bottom() - aFuzzySz.Height() );
aVis.Left( aVis.Left() + aFuzzySz.Width() );
aVis.Right( aVis.Right() - aFuzzySz.Width() );
- const BOOL bInsWin = aVis.IsInside( aDocPt );
+ const sal_Bool bInsWin = aVis.IsInside( aDocPt );
#else
- const BOOL bInsWin = rSh.VisArea().IsInside( aDocPt );
+ const sal_Bool bInsWin = rSh.VisArea().IsInside( aDocPt );
#endif
if( pShadCrsr && !bInsWin )
@@ -3559,13 +3559,13 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
}
}
- BYTE nMouseTabCol;
+ sal_uInt8 nMouseTabCol;
if( !bIsDocReadOnly && bInsWin && !pApplyTempl && !rSh.IsInSelect() )
{
if ( SW_TABCOL_NONE != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPt ) ) &&
!rSh.IsObjSelectable( aDocPt ) )
{
- USHORT nPointer = USHRT_MAX;
+ sal_uInt16 nPointer = USHRT_MAX;
bool bChkTblSel = false;
switch ( nMouseTabCol )
@@ -3618,7 +3618,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
{
// --> OD 2005-02-21 #i42921# - consider vertical mode
SwTxtNode* pNodeAtPos = rSh.GetNumRuleNodeAtPos( aDocPt );
- const USHORT nPointer =
+ const sal_uInt16 nPointer =
rSh.IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPt )
? POINTER_VSIZEBAR
: POINTER_HSIZEBAR;
@@ -3629,7 +3629,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
}
}
- BOOL bDelShadCrsr = TRUE;
+ sal_Bool bDelShadCrsr = sal_True;
switch ( rMEvt.GetModifier() + rMEvt.GetButtons() )
{
@@ -3682,10 +3682,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
EnterArea();
if ( rView.GetDrawFuncPtr() )
{
- pSdrView->SetOrtho(FALSE);
+ pSdrView->SetOrtho(sal_False);
rView.GetDrawFuncPtr()->MouseMove( rMEvt );
}
- bIsInMove = TRUE;
+ bIsInMove = sal_True;
}
return;
}
@@ -3716,7 +3716,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
eSdrMoveHdl = pHdl ? pHdl->GetKind() : HDL_MOVE;
}
- USHORT nEvent = HDL_MOVE == eSdrMoveHdl
+ sal_uInt16 nEvent = HDL_MOVE == eSdrMoveHdl
? SW_EVENT_FRM_MOVE
: SW_EVENT_FRM_RESIZE;
@@ -3729,7 +3729,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
aRszMvHdlPt != aDocPt )
{
aRszMvHdlPt = aDocPt;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
String sRet;
SbxArrayRef xArgs = new SbxArray;
SbxVariableRef xVar = new SbxVariable;
@@ -3739,7 +3739,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if( SW_EVENT_FRM_RESIZE == nEvent )
{
xVar = new SbxVariable;
- xVar->PutUShort( static_cast< UINT16 >(eSdrMoveHdl) );
+ xVar->PutUShort( static_cast< sal_uInt16 >(eSdrMoveHdl) );
xArgs->Put( &xVar, ++nPos );
}
@@ -3767,17 +3767,17 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if ( rMEvt.IsShift() )
{
- pSdrView->SetOrtho(TRUE);
- pSdrView->SetAngleSnapEnabled(TRUE);
+ pSdrView->SetOrtho(sal_True);
+ pSdrView->SetAngleSnapEnabled(sal_True);
}
else
{
- pSdrView->SetOrtho(FALSE);
- pSdrView->SetAngleSnapEnabled(FALSE);
+ pSdrView->SetOrtho(sal_False);
+ pSdrView->SetAngleSnapEnabled(sal_False);
}
(rSh.*rSh.fnDrag)( &aDocPt, rMEvt.IsShift() );
- bIsInMove = TRUE;
+ bIsInMove = sal_True;
}
else if( bIsDocReadOnly )
break;
@@ -3799,9 +3799,9 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if ( pSdrView )
{
if ( rMEvt.IsShift() )
- pSdrView->SetOrtho(TRUE);
+ pSdrView->SetOrtho(sal_True);
else
- pSdrView->SetOrtho(FALSE);
+ pSdrView->SetOrtho(sal_False);
}
if ( !bInsWin )
{
@@ -3819,14 +3819,14 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
rMEvt.GetModifier() + rMEvt.GetButtons() ) &&
rSh.Is_FnDragEQBeginDrag() && !rSh.IsAddMode() ))
{
- (rSh.*rSh.fnDrag)( &aDocPt,FALSE );
+ (rSh.*rSh.fnDrag)( &aDocPt,sal_False );
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPt,FALSE));
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPt,sal_False));
EnterArea();
}
}
}
- bDDINetAttr = FALSE;
+ bDDINetAttr = sal_False;
break;
case 0:
{
@@ -3839,7 +3839,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
// TODO: do the same thing for redlines SW_REDLINE
SwRect aFldRect;
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD);
- if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, FALSE, &aFldRect ) )
+ if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, sal_False, &aFldRect ) )
{
const SwField* pFld = aCntntAtPos.aFnd.pFld;
if (pFld->Which()== RES_POSTITFLD)
@@ -3858,7 +3858,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
case KEY_MOD1:
if ( !bInsDraw )
{
- BOOL bTstShdwCrsr = TRUE;
+ sal_Bool bTstShdwCrsr = sal_True;
UpdatePointer( aDocPt, rMEvt.GetModifier() );
@@ -3873,7 +3873,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if( pINet ||
0 != ( pTmp = pFmt = rSh.GetFmtFromAnyObj( aDocPt )))
{
- bTstShdwCrsr = FALSE;
+ bTstShdwCrsr = sal_False;
if( pTmp == pINet )
aSaveCallEvent.Set( pINet );
else
@@ -3891,7 +3891,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
{
if( aLastCallEvent.HasEvent() )
rSh.CallEvent( SFX_EVENT_MOUSEOUT_OBJECT,
- aLastCallEvent, TRUE );
+ aLastCallEvent, sal_True );
// 0 besagt, das das Object gar keine Tabelle hat
if( !rSh.CallEvent( SFX_EVENT_MOUSEOVER_OBJECT,
aSaveCallEvent ))
@@ -3902,7 +3902,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
{
// Cursor stand auf einem Object
rSh.CallEvent( SFX_EVENT_MOUSEOUT_OBJECT,
- aLastCallEvent, TRUE );
+ aLastCallEvent, sal_True );
}
if( bTstShdwCrsr && bInsWin && !bIsDocReadOnly &&
@@ -3922,8 +3922,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
SwViewOption::GetDirectCursorColor() );
if( text::HoriOrientation::RIGHT != eOrient && text::HoriOrientation::CENTER != eOrient )
eOrient = text::HoriOrientation::LEFT;
- pShadCrsr->SetPos( aRect.Pos(), aRect.Height(), static_cast< USHORT >(eOrient) );
- bDelShadCrsr = FALSE;
+ pShadCrsr->SetPos( aRect.Pos(), aRect.Height(), static_cast< sal_uInt16 >(eOrient) );
+ bDelShadCrsr = sal_False;
}
}
}
@@ -3931,8 +3931,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
case MOUSE_LEFT + KEY_MOD2:
if( rSh.IsBlockMode() && !rMEvt.IsSynthetic() )
{
- (rSh.*rSh.fnDrag)( &aDocPt,FALSE );
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPt,FALSE));
+ (rSh.*rSh.fnDrag)( &aDocPt,sal_False );
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPt,sal_False));
EnterArea();
}
break;
@@ -3940,7 +3940,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if( bDelShadCrsr && pShadCrsr )
delete pShadCrsr, pShadCrsr = 0;
- bWasShdwCrsr = FALSE;
+ bWasShdwCrsr = sal_False;
}
/*--------------------------------------------------------------------
@@ -3950,10 +3950,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
- BOOL bCallShadowCrsr = bWasShdwCrsr;
- bWasShdwCrsr = FALSE;
+ sal_Bool bCallShadowCrsr = bWasShdwCrsr;
+ bWasShdwCrsr = sal_False;
if( pShadCrsr )
delete pShadCrsr, pShadCrsr = 0;
@@ -3964,7 +3964,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
eSdrMoveHdl = HDL_USER; // fuer die MoveEvents - wieder zuruecksetzen
// sicherheitshalber zuruecksetzen Bug 27900
- rView.SetTabColFromDoc( FALSE );
+ rView.SetTabColFromDoc( sal_False );
rView.SetNumRuleNodeFromDoc(NULL);
SwWrtShell &rSh = rView.GetWrtShell();
@@ -3972,11 +3972,11 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
SdrView *pSdrView = rSh.GetDrawView();
if ( pSdrView )
{
- pSdrView->SetOrtho(FALSE);
+ pSdrView->SetOrtho(sal_False);
if ( pSdrView->MouseButtonUp( rMEvt,this ) )
{
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
return; // Event von der SdrView ausgewertet
}
}
@@ -3995,13 +3995,13 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if ( bDDTimerStarted )
{
StopDDTimer( &rSh, aDocPt );
- bMBPressed = FALSE;
+ bMBPressed = sal_False;
if ( rSh.IsSelFrmMode() )
{
- (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE );
- bFrmDrag = FALSE;
+ (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False );
+ bFrmDrag = sal_False;
}
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
ReleaseMouse();
return;
}
@@ -4012,7 +4012,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
//OLMpSdrView->RefreshAllIAOManagers();
DELETEZ( pAnchorMarker );
if( aPnt.X() || aPnt.Y() )
- rSh.FindAnchorPos( aPnt, TRUE );
+ rSh.FindAnchorPos( aPnt, sal_True );
}
if ( bInsDraw && rView.GetDrawFuncPtr() )
{
@@ -4035,7 +4035,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
rSh.EnterSelFrmMode();
if (!rView.GetDrawFuncPtr())
- StdDrawMode( OBJ_NONE, TRUE );
+ StdDrawMode( OBJ_NONE, sal_True );
}
else if ( rSh.IsFrmSelected() )
{
@@ -4045,7 +4045,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
else
{
const Point aDocPos( PixelToLogic( aStartPos ) );
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE));
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False));
rSh.Edit();
}
@@ -4054,17 +4054,17 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
else if (rMEvt.GetButtons() == MOUSE_RIGHT && rSh.IsDrawCreate())
rView.GetDrawFuncPtr()->BreakCreate(); // Zeichnen abbrechen
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
ReleaseMouse();
return;
}
- BOOL bPopMode = FALSE;
+ sal_Bool bPopMode = sal_False;
switch ( rMEvt.GetModifier() + rMEvt.GetButtons() )
{
case MOUSE_LEFT:
if ( bInsDraw && rSh.IsDrawCreate() )
{
- if ( rView.GetDrawFuncPtr() && rView.GetDrawFuncPtr()->MouseButtonUp(rMEvt) == TRUE )
+ if ( rView.GetDrawFuncPtr() && rView.GetDrawFuncPtr()->MouseButtonUp(rMEvt) == sal_True )
{
rView.GetDrawFuncPtr()->Deactivate();
rView.AttrChangedNotify( &rSh );
@@ -4073,7 +4073,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if ( rView.GetDrawFuncPtr() && bInsFrm )
StopInsFrm();
}
- bCallBase = FALSE;
+ bCallBase = sal_False;
break;
}
case MOUSE_LEFT + KEY_MOD1:
@@ -4103,12 +4103,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if ( aSttPt != aEndPt )
{
rSh.StartUndo( UNDO_UI_DRAG_AND_COPY );
- rSh.Copy(&rSh, aSttPt, aEndPt, FALSE);
+ rSh.Copy(&rSh, aSttPt, aEndPt, sal_False);
rSh.EndUndo( UNDO_UI_DRAG_AND_COPY );
}
}
else
- (rSh.*rSh.fnEndDrag)( &aDocPt,FALSE );
+ (rSh.*rSh.fnEndDrag)( &aDocPt,sal_False );
}
else
{
@@ -4116,7 +4116,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
const SwFrmFmt* pFlyFmt;
const SvxMacro* pMacro;
- USHORT nEvent = HDL_MOVE == eOldSdrMoveHdl
+ sal_uInt16 nEvent = HDL_MOVE == eOldSdrMoveHdl
? SW_EVENT_FRM_MOVE
: SW_EVENT_FRM_RESIZE;
@@ -4126,7 +4126,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
const Point aSttPt( PixelToLogic( aStartPos ) );
aRszMvHdlPt = aDocPt;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
SbxArrayRef xArgs = new SbxArray;
SbxVariableRef xVar = new SbxVariable;
xVar->PutString( pFlyFmt->GetName() );
@@ -4135,7 +4135,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if( SW_EVENT_FRM_RESIZE == nEvent )
{
xVar = new SbxVariable;
- xVar->PutUShort( static_cast< UINT16 >(eOldSdrMoveHdl) );
+ xVar->PutUShort( static_cast< sal_uInt16 >(eOldSdrMoveHdl) );
xArgs->Put( &xVar, ++nPos );
}
@@ -4157,21 +4157,21 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
CaptureMouse();
}
}
- (rSh.*rSh.fnEndDrag)( &aDocPt,FALSE );
+ (rSh.*rSh.fnEndDrag)( &aDocPt,sal_False );
}
- bFrmDrag = FALSE;
- bCallBase = FALSE;
+ bFrmDrag = sal_False;
+ bCallBase = sal_False;
break;
}
- bPopMode = TRUE;
+ bPopMode = sal_True;
// no break
case MOUSE_LEFT + KEY_SHIFT:
if (rSh.IsSelFrmMode())
{
- (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE );
- bFrmDrag = FALSE;
- bCallBase = FALSE;
+ (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False );
+ bFrmDrag = sal_False;
+ bCallBase = sal_False;
break;
}
@@ -4179,63 +4179,63 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
//JP 27.04.99: Bug 65389 - das EndDrag sollte auf jedenfall
// gerufen werden.
- bHoldSelection = FALSE;
- (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE );
+ bHoldSelection = sal_False;
+ (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False );
}
else
{
if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPt ) )
{
- const BOOL bTmpNoInterrupt = bNoInterrupt;
- bNoInterrupt = FALSE;
+ const sal_Bool bTmpNoInterrupt = bNoInterrupt;
+ bNoInterrupt = sal_False;
{ // nur temp. Move-Kontext aufspannen, da sonst die
// Abfrage auf die Inhaltsform nicht funktioniert!!!
MV_KONTEXT( &rSh );
const Point aDocPos( PixelToLogic( aStartPos ) );
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE));
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False));
}
bNoInterrupt = bTmpNoInterrupt;
}
else
{
- BOOL bInSel = rSh.IsInSelect();
- (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE );
+ sal_Bool bInSel = rSh.IsInSelect();
+ (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False );
// Internetfield? --> Link-Callen (DocLaden!!)
//JP 18.10.96: Bug 32437 -
// if( !rSh.HasSelection() )
if( !bInSel )
{
- USHORT nFilter = URLLOAD_NOFILTER;
+ sal_uInt16 nFilter = URLLOAD_NOFILTER;
if( KEY_MOD1 == rMEvt.GetModifier() )
nFilter |= URLLOAD_NEWVIEW;
- BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
- const BOOL bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ const sal_Bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
if ( ( bSecureOption && rMEvt.GetModifier() == KEY_MOD1 ) ||
( !bSecureOption && rMEvt.GetModifier() != KEY_MOD1 ) )
- bExecHyperlinks = TRUE;
+ bExecHyperlinks = sal_True;
}
- const BOOL bExecSmarttags = rMEvt.GetModifier() == KEY_MOD1;
+ const sal_Bool bExecSmarttags = rMEvt.GetModifier() == KEY_MOD1;
if(pApplyTempl)
- bExecHyperlinks = FALSE;
+ bExecHyperlinks = sal_False;
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_CLICKFIELD |
SwContentAtPos::SW_INETATTR |
SwContentAtPos::SW_SMARTTAG | SwContentAtPos::SW_FORMCTRL);
- if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, TRUE ) )
+ if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, sal_True ) )
{
- BOOL bViewLocked = rSh.IsViewLocked();
+ sal_Bool bViewLocked = rSh.IsViewLocked();
if( !bViewLocked && !rSh.IsReadOnlyAvailable() &&
aCntntAtPos.IsInProtectSect() )
- rSh.LockView( TRUE );
+ rSh.LockView( sal_True );
ReleaseMouse();
@@ -4279,12 +4279,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
rSh.LockView( bViewLocked );
- bCallShadowCrsr = FALSE;
+ bCallShadowCrsr = sal_False;
}
else
{
aCntntAtPos = SwContentAtPos( SwContentAtPos::SW_FTN );
- if( !rSh.GetContentAtPos( aDocPt, aCntntAtPos, TRUE ) && bExecHyperlinks )
+ if( !rSh.GetContentAtPos( aDocPt, aCntntAtPos, sal_True ) && bExecHyperlinks )
{
SdrViewEvent aVEvt;
@@ -4301,14 +4301,14 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
String sTarget(pField->GetTargetFrame());
::LoadURL( sURL, &rSh, nFilter, &sTarget);
}
- bCallShadowCrsr = FALSE;
+ bCallShadowCrsr = sal_False;
}
else
{
// Grafik getroffen
ReleaseMouse();
if( rSh.ClickToINetGrf( aDocPt, nFilter ))
- bCallShadowCrsr = FALSE;
+ bCallShadowCrsr = sal_False;
}
}
}
@@ -4327,7 +4327,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
}
}
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
@@ -4335,8 +4335,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if ( bPopMode && bModePushed )
{
rSh.PopMode();
- bModePushed = FALSE;
- bCallBase = FALSE;
+ bModePushed = sal_False;
+ bCallBase = sal_False;
}
break;
@@ -4374,7 +4374,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
else if( pApplyTempl->nColor )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch( pApplyTempl->nColor )
{
case SID_ATTR_CHAR_COLOR_EXT:
@@ -4401,8 +4401,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
rSh.EnterStdMode();
rSh.SetVisCrsr(aDocPt);
- pApplyTempl->bUndo = TRUE;
- bCallBase = FALSE;
+ pApplyTempl->bUndo = sal_True;
+ bCallBase = sal_False;
aTemplateTimer.Stop();
}
else if(rMEvt.GetClicks() == 1)
@@ -4422,8 +4422,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
& eSelection ) && !rSh.HasReadonlySel() )
{
rSh.SetTxtFmtColl( pApplyTempl->aColl.pTxtColl );
- pApplyTempl->bUndo = TRUE;
- bCallBase = FALSE;
+ pApplyTempl->bUndo = sal_True;
+ bCallBase = sal_False;
if ( pApplyTempl->aColl.pTxtColl )
aStyleName = pApplyTempl->aColl.pTxtColl->GetName();
}
@@ -4436,8 +4436,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
rSh.UnSetVisCrsr();
rSh.EnterStdMode();
rSh.SetVisCrsr(aDocPt);
- pApplyTempl->bUndo = TRUE;
- bCallBase = FALSE;
+ pApplyTempl->bUndo = sal_True;
+ bCallBase = sal_False;
if ( pApplyTempl->aColl.pCharFmt )
aStyleName = pApplyTempl->aColl.pCharFmt->GetName();
}
@@ -4447,9 +4447,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
const SwFrmFmt* pFmt = rSh.GetFmtFromObj( aDocPt );
if(PTR_CAST(SwFlyFrmFmt, pFmt))
{
- rSh.SetFrmFmt( pApplyTempl->aColl.pFrmFmt, FALSE, &aDocPt );
- pApplyTempl->bUndo = TRUE;
- bCallBase = FALSE;
+ rSh.SetFrmFmt( pApplyTempl->aColl.pFrmFmt, sal_False, &aDocPt );
+ pApplyTempl->bUndo = sal_True;
+ bCallBase = sal_False;
if( pApplyTempl->aColl.pFrmFmt )
aStyleName = pApplyTempl->aColl.pFrmFmt->GetName();
}
@@ -4460,7 +4460,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
rSh.ChgCurPageDesc( *pApplyTempl->aColl.pPageDesc );
if ( pApplyTempl->aColl.pPageDesc )
aStyleName = pApplyTempl->aColl.pPageDesc->GetName();
- bCallBase = FALSE;
+ bCallBase = sal_False;
break;
case SFX_STYLE_FAMILY_PSEUDO:
if( !rSh.HasReadonlySel() )
@@ -4470,8 +4470,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
false,
pApplyTempl->aColl.pNumRule->GetDefaultListId() );
// <--
- bCallBase = FALSE;
- pApplyTempl->bUndo = TRUE;
+ bCallBase = sal_False;
+ pApplyTempl->bUndo = sal_True;
if( pApplyTempl->aColl.pNumRule )
aStyleName = pApplyTempl->aColl.pNumRule->GetName();
}
@@ -4487,7 +4487,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
SfxRequest aReq( rView.GetViewFrame(), SID_STYLE_APPLY );
aReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aStyleName ) );
- aReq.AppendItem( SfxUInt16Item( SID_STYLE_FAMILY, (USHORT) pApplyTempl->eType ) );
+ aReq.AppendItem( SfxUInt16Item( SID_STYLE_FAMILY, (sal_uInt16) pApplyTempl->eType ) );
aReq.Done();
}
}
@@ -4497,12 +4497,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
ReleaseMouse();
// Hier kommen nur verarbeitete MouseEvents an; nur bei diesen duerfen
// die Modi zurueckgesetzt werden.
- bMBPressed = FALSE;
+ bMBPressed = sal_False;
//sicherheitshalber aufrufen, da jetzt das Selektieren bestimmt zu Ende ist.
//Andernfalls koennte der Timeout des Timers Kummer machen.
EnterArea();
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
if (bCallBase)
Window::MouseButtonUp(rMEvt);
@@ -4516,7 +4516,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl)
{
- static BOOL bIdle = FALSE;
+ static sal_Bool bIdle = sal_False;
DELETEZ(pApplyTempl);
SwWrtShell &rSh = rView.GetWrtShell();
@@ -4524,25 +4524,25 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl)
{
pApplyTempl = new SwApplyTemplate( rTempl );
SetPointer( POINTER_FILL );//@todo #i20119# maybe better a new brush pointer here in future
- rSh.NoEdit( FALSE );
+ rSh.NoEdit( sal_False );
bIdle = rSh.GetViewOptions()->IsIdle();
- ((SwViewOption *)rSh.GetViewOptions())->SetIdle( FALSE );
+ ((SwViewOption *)rSh.GetViewOptions())->SetIdle( sal_False );
}
else if(rTempl.nColor)
{
pApplyTempl = new SwApplyTemplate( rTempl );
SetPointer( POINTER_FILL );
- rSh.NoEdit( FALSE );
+ rSh.NoEdit( sal_False );
bIdle = rSh.GetViewOptions()->IsIdle();
- ((SwViewOption *)rSh.GetViewOptions())->SetIdle( FALSE );
+ ((SwViewOption *)rSh.GetViewOptions())->SetIdle( sal_False );
}
else if( rTempl.eType )
{
pApplyTempl = new SwApplyTemplate( rTempl );
SetPointer( POINTER_FILL );
- rSh.NoEdit( FALSE );
+ rSh.NoEdit( sal_False );
bIdle = rSh.GetViewOptions()->IsIdle();
- ((SwViewOption *)rSh.GetViewOptions())->SetIdle( FALSE );
+ ((SwViewOption *)rSh.GetViewOptions())->SetIdle( sal_False );
}
else
{
@@ -4554,7 +4554,7 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl)
rSh.Edit();
}
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{
SID_STYLE_WATERCAN,
SID_ATTR_CHAR_COLOR_EXT,
@@ -4592,8 +4592,8 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
nInsFrmColCount( 1 ),
eDrawMode(OBJ_NONE),
- bLockInput(FALSE),
- bObjectSelect( FALSE ),
+ bLockInput(sal_False),
+ bObjectSelect( sal_False ),
nKS_NUMDOWN_Count(0), // #i23725#
nKS_NUMINDENTINC_Count(0) // #i23725#
{
@@ -4602,7 +4602,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
SetDialogControlFlags( WINDOW_DLGCTRL_RETURN | WINDOW_DLGCTRL_WANTFOCUS );
bLinkRemoved = bMBPressed = bInsDraw = bInsFrm =
- bIsInDrag = bOldIdle = bOldIdleSet = bChainMode = bWasShdwCrsr = FALSE;
+ bIsInDrag = bOldIdle = bOldIdleSet = bChainMode = bWasShdwCrsr = sal_False;
//#i42732# initially use the input language
bUseInputLanguage = sal_True;
@@ -4611,7 +4611,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
SetPointer( POINTER_TEXT );
aTimer.SetTimeoutHdl(LINK(this, SwEditWin, TimerHandler));
- bTblInsDelMode = FALSE;
+ bTblInsDelMode = sal_False;
aKeyInputTimer.SetTimeout( 3000 );
aKeyInputTimer.SetTimeoutHdl(LINK(this, SwEditWin, KeyInputTimerHandler));
@@ -4642,7 +4642,7 @@ SwEditWin::~SwEditWin()
delete pRowColumnSelectionStart;
if( pQuickHlpData->bClear && rView.GetWrtShellPtr() )
pQuickHlpData->Stop( rView.GetWrtShell() );
- bExecuteDrag = FALSE;
+ bExecuteDrag = sal_False;
delete pApplyTempl;
rView.SetDrawFuncPtr(NULL);
@@ -4662,7 +4662,7 @@ SwEditWin::~SwEditWin()
void SwEditWin::EnterDrawTextMode( const Point& aDocPos )
{
- if ( rView.EnterDrawTextMode(aDocPos) == TRUE )
+ if ( rView.EnterDrawTextMode(aDocPos) == sal_True )
{
if (rView.GetDrawFuncPtr())
{
@@ -4681,7 +4681,7 @@ void SwEditWin::EnterDrawTextMode( const Point& aDocPos )
-BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
+sal_Bool SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
{
SwWrtShell &rSh = rView.GetWrtShell();
SdrView *pSdrView = rSh.GetDrawView();
@@ -4690,17 +4690,17 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
if ( rView.GetDrawFuncPtr() )
{
if (rSh.IsDrawCreate())
- return TRUE;
+ return sal_True;
- BOOL bRet = rView.GetDrawFuncPtr()->MouseButtonDown( rMEvt );
+ sal_Bool bRet = rView.GetDrawFuncPtr()->MouseButtonDown( rMEvt );
rView.AttrChangedNotify( &rSh );
return bRet;
}
if ( pSdrView && pSdrView->IsTextEdit() )
{
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
rSh.EndTextEdit(); // Danebengeklickt, Ende mit Edit
rSh.SelectObj( aDocPos );
@@ -4710,14 +4710,14 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
{
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
}
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
rView.AttrChangedNotify( &rSh );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/******************************************************************************
@@ -4726,9 +4726,9 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
-BOOL SwEditWin::IsDrawSelMode()
+sal_Bool SwEditWin::IsDrawSelMode()
{
-// return (IsFrmAction() == FALSE && GetSdrDrawMode() == OBJ_NONE);
+// return (IsFrmAction() == sal_False && GetSdrDrawMode() == OBJ_NONE);
return IsObjectSelect();
}
@@ -4789,20 +4789,20 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
// windows and code on the stack.
// For more information, see #126086# and #128122#
SfxInPlaceClient* pIPClient = rSh.GetSfxViewShell()->GetIPClient();
- BOOL bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
+ sal_Bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
if ( bIsOleActive && ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ))
{
rSh.FinishOLEObj();
return;
}
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
switch ( rCEvt.GetCommand() )
{
case COMMAND_CONTEXTMENU:
{
- const USHORT nId = SwInputChild::GetChildWindowId();
+ const sal_uInt16 nId = SwInputChild::GetChildWindowId();
SwInputChild* pChildWin = (SwInputChild*)GetView().GetViewFrame()->
GetChildWindow( nId );
@@ -4815,11 +4815,11 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
SET_CURR_SHELL( &rSh );
if (!pApplyTempl)
{
- if (bNoInterrupt == TRUE)
+ if (bNoInterrupt == sal_True)
{
ReleaseMouse();
- bNoInterrupt = FALSE;
- bMBPressed = FALSE;
+ bNoInterrupt = sal_False;
+ bMBPressed = sal_False;
}
Point aDocPos( PixelToLogic( rCEvt.GetMousePosPixel() ) );
if ( !rCEvt.IsMouseEvent() )
@@ -4847,7 +4847,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
{
if ( pMenu )
{
- USHORT nExecId = ((PopupMenu*)pMenu)->Execute(this, aPixPos);
+ sal_uInt16 nExecId = ((PopupMenu*)pMenu)->Execute(this, aPixPos);
if( !::ExecuteMenuCommand( *static_cast<PopupMenu*>(pMenu), *rView.GetViewFrame(), nExecId ))
pROPopup->Execute(this, nExecId);
}
@@ -4861,7 +4861,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
else if (pApplyTempl->bUndo)
rSh.Do(SwWrtShell::UNDO);
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
break;
@@ -4879,7 +4879,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
//ggf. an Outliner weiterleiten
if ( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() )
{
- bCallBase = FALSE;
+ bCallBase = sal_False;
rSh.GetDrawView()->GetTextEditOutlinerView()->Command( rCEvt );
break;
}
@@ -4889,7 +4889,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
break;
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
SfxPoolItem *pItem = 0;
switch ( pCData->GetCommand() )
@@ -4948,7 +4948,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
if ( nSlotId )
{
- bCallBase = FALSE;
+ bCallBase = sal_False;
if ( pItem )
{
const SfxPoolItem* aArgs[2];
@@ -4966,13 +4966,13 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
case COMMAND_STARTEXTTEXTINPUT:
{
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
rSh.IsCrsrReadonly();
if(!bIsDocReadOnly)
{
if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() )
{
- bCallBase = FALSE;
+ bCallBase = sal_False;
rSh.GetDrawView()->GetTextEditOutlinerView()->Command( rCEvt );
}
else
@@ -4980,7 +4980,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if( rSh.HasSelection() )
rSh.DelRight();
- bCallBase = FALSE;
+ bCallBase = sal_False;
LanguageType eInputLanguage = GetInputLanguage();
rSh.CreateExtTextInput(eInputLanguage);
}
@@ -4989,18 +4989,18 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
case COMMAND_ENDEXTTEXTINPUT:
{
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
rSh.IsCrsrReadonly();
if(!bIsDocReadOnly)
{
if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() )
{
- bCallBase = FALSE;
+ bCallBase = sal_False;
rSh.GetDrawView()->GetTextEditOutlinerView()->Command( rCEvt );
}
else
{
- bCallBase = FALSE;
+ bCallBase = sal_False;
String sRecord = rSh.DeleteExtTextInput();
uno::Reference< frame::XDispatchRecorder > xRecorder =
rView.GetViewFrame()->GetBindings().GetRecorder();
@@ -5040,7 +5040,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
break;
case COMMAND_EXTTEXTINPUT:
{
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
rSh.IsCrsrReadonly();
if(!bIsDocReadOnly)
{
@@ -5053,7 +5053,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
String sWord;
if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() )
{
- bCallBase = FALSE;
+ bCallBase = sal_False;
rSh.GetDrawView()->GetTextEditOutlinerView()->Command( rCEvt );
}
else
@@ -5062,7 +5062,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if( pData )
{
sWord = pData->GetText();
- bCallBase = FALSE;
+ bCallBase = sal_False;
rSh.SetExtTextInputData( *pData );
}
}
@@ -5095,8 +5095,8 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if( !aDataHelper.GetXTransferable().is() )
break;
- ULONG nDropFormat;
- USHORT nEventAction, nDropAction, nDropDestination;
+ sal_uLong nDropFormat;
+ sal_uInt16 nEventAction, nDropAction, nDropDestination;
nDropDestination = GetDropDestination( rCEvt.GetMousePosPixel() );
if( !nDropDestination )
break;
@@ -5110,9 +5110,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
{
const Point aDocPt( PixelToLogic( rCEvt.GetMousePosPixel() ) );
SwTransferable::PasteData( aDataHelper, rSh, nDropAction,
- nDropFormat, nDropDestination, FALSE,
- FALSE, &aDocPt, EXCHG_IN_ACTION_COPY,
- TRUE );
+ nDropFormat, nDropDestination, sal_False,
+ sal_False, &aDocPt, EXCHG_IN_ACTION_COPY,
+ sal_True );
}
}
break;
@@ -5121,7 +5121,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
const CommandModKeyData* pCommandData = (const CommandModKeyData*)rCEvt.GetData();
if(pCommandData->IsMod1() && !pCommandData->IsMod2())
{
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
if(pCommandData->IsLeftShift() && !pCommandData->IsRightShift())
nSlot = SID_ATTR_PARA_LEFT_TO_RIGHT;
else if(!pCommandData->IsLeftShift() && pCommandData->IsRightShift())
@@ -5144,10 +5144,10 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
const CommandSelectionChangeData *pData = rCEvt.GetSelectionChangeData();
rSh.SttCrsrMove();
rSh.GoStartSentence();
- rSh.GetCrsr()->GetPoint()->nContent += sal::static_int_cast<sal_uInt16, ULONG>(pData->GetStart());
+ rSh.GetCrsr()->GetPoint()->nContent += sal::static_int_cast<sal_uInt16, sal_uLong>(pData->GetStart());
rSh.SetMark();
- rSh.GetCrsr()->GetMark()->nContent += sal::static_int_cast<sal_uInt16, ULONG>(pData->GetEnd() - pData->GetStart());
- rSh.EndCrsrMove( TRUE );
+ rSh.GetCrsr()->GetMark()->nContent += sal::static_int_cast<sal_uInt16, sal_uLong>(pData->GetEnd() - pData->GetStart());
+ rSh.EndCrsrMove( sal_True );
}
break;
case COMMAND_PREPARERECONVERSION:
@@ -5171,9 +5171,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if( pCrsr )
{
- ULONG nPosNodeIdx = pCrsr->GetPoint()->nNode.GetIndex();
+ sal_uLong nPosNodeIdx = pCrsr->GetPoint()->nNode.GetIndex();
xub_StrLen nPosIdx = pCrsr->GetPoint()->nContent.GetIndex();
- ULONG nMarkNodeIdx = pCrsr->GetMark()->nNode.GetIndex();
+ sal_uLong nMarkNodeIdx = pCrsr->GetMark()->nNode.GetIndex();
xub_StrLen nMarkIdx = pCrsr->GetMark()->nContent.GetIndex();
if( !rSh.GetCrsr()->HasMark() )
@@ -5187,7 +5187,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
rSh.GetCrsr()->GetPoint()->nContent = nPosIdx;
rSh.GetCrsr()->GetMark()->nNode = nPosNodeIdx;
rSh.GetCrsr()->GetMark()->nContent =
- rSh.GetCrsr()->GetCntntNode( TRUE )->Len();
+ rSh.GetCrsr()->GetCntntNode( sal_True )->Len();
}
else if( nPosNodeIdx == nMarkNodeIdx )
{
@@ -5202,10 +5202,10 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
rSh.GetCrsr()->GetMark()->nContent = nMarkIdx;
rSh.GetCrsr()->GetPoint()->nNode = nMarkNodeIdx;
rSh.GetCrsr()->GetPoint()->nContent =
- rSh.GetCrsr()->GetCntntNode( FALSE )->Len();
+ rSh.GetCrsr()->GetCntntNode( sal_False )->Len();
}
- rSh.EndCrsrMove( TRUE );
+ rSh.EndCrsrMove( sal_True );
}
}
break;
@@ -5222,9 +5222,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
#i18686#: select the object/cursor at the mouse
position of the context menu request
--------------------------------------------------*/
-BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
+sal_Bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const Point aDocPos( PixelToLogic( rMousePos ) );
// --> OD 2005-02-17 #i42258#
const bool bIsInsideSelectedObj( rSh.IsInsideSelectedObj( aDocPos ) );
@@ -5257,7 +5257,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
if(!aSelection.IsZero())
{
SdrOutliner* pOutliner = pSdrView->GetTextEditOutliner();
- BOOL bVertical = pOutliner->IsVertical();
+ sal_Bool bVertical = pOutliner->IsVertical();
const EditEngine& rEditEng = pOutliner->GetEditEngine();
Point aEEPos(aDocPos);
const Rectangle& rOutputArea = pOLV->GetOutputArea();
@@ -5279,7 +5279,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
aSelection.Adjust();
if(!aCompare.IsLess(aSelection) && !aCompare.IsGreater(aSelection))
{
- return FALSE;
+ return sal_False;
}
}
@@ -5288,15 +5288,15 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
if (pSdrView->MouseButtonDown( aMEvt, this ) )
{
pSdrView->MouseButtonUp( aMEvt, this );
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE);
- return TRUE;
+ rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
+ return sal_True;
}
}
rSh.ResetCursorStack();
if ( EnterDrawMode( aMEvt, aDocPos ) )
{
- return TRUE;
+ return sal_True;
}
if ( rView.GetDrawFuncPtr() && bInsFrm )
{
@@ -5318,15 +5318,15 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
rView.NoRotate();
rSh.HideCrsr();
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
- BOOL bSelObj = rSh.SelectObj( aDocPos, 0);
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
+ sal_Bool bSelObj = rSh.SelectObj( aDocPos, 0);
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
if( bSelObj )
{
- bRet = TRUE;
+ bRet = sal_True;
// falls im Macro der Rahmen deselektiert
// wurde, muss nur noch der Cursor
// wieder angezeigt werden.
@@ -5343,7 +5343,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
}
rSh.EnterSelFrmMode( &aDocPos );
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
UpdatePointer( aDocPos, 0 );
return bRet;
}
@@ -5358,32 +5358,32 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
!bIsInsideSelectedObj))
{
rView.NoRotate();
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
- BYTE nFlag = 0;
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
+ sal_uInt8 nFlag = 0;
if ( rSh.IsSelFrmMode() )
{
rSh.UnSelectFrm();
rSh.LeaveSelFrmMode();
rView.AttrChangedNotify(&rSh);
- bRet = TRUE;
+ bRet = sal_True;
}
- BOOL bSelObj = rSh.SelectObj( aDocPos, nFlag );
+ sal_Bool bSelObj = rSh.SelectObj( aDocPos, nFlag );
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
if( !bSelObj )
{
// Cursor hier umsetzen, damit er nicht zuerst
// im Rahmen gezeichnet wird; ShowCrsr() geschieht
// in LeaveSelFrmMode()
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE));
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False));
rSh.LeaveSelFrmMode();
rView.LeaveDrawCreate();
rView.AttrChangedNotify( &rSh );
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -5391,7 +5391,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
rSh.EnterSelFrmMode( &aDocPos );
rSh.SelFlyGrabCrsr();
rSh.MakeSelVisible();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
if( rSh.IsFrmSelected() &&
rView.GetDrawFuncPtr() )
{
@@ -5401,13 +5401,13 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
rView.AttrChangedNotify( &rSh );
}
UpdatePointer( aDocPos, 0 );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if ( rSh.IsSelFrmMode() && bIsInsideSelectedObj )
{
// ## object at the mouse cursor is already selected - do nothing
- return FALSE;
+ return sal_False;
}
if ( rSh.IsGCAttr() )
@@ -5416,7 +5416,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
rSh.ClearGCAttr();
}
- BOOL bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = FALSE;
+ sal_Bool bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = sal_False;
if( !bOverSelect )
bOverURLGrf = bOverSelect = 0 != rSh.IsURLGrfAtPos( aDocPos );
@@ -5425,8 +5425,8 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
{ // nur temp. Move-Kontext aufspannen, da sonst die
// Abfrage auf die Inhaltsform nicht funktioniert!!!
MV_KONTEXT( &rSh );
- (rSh.*rSh.fnSetCrsr)(&aDocPos, FALSE);
- bRet = TRUE;
+ (rSh.*rSh.fnSetCrsr)(&aDocPos, sal_False);
+ bRet = sal_True;
}
}
if( !bOverURLGrf )
@@ -5439,7 +5439,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
if( !rSh.IsFrmSelected() )
rSh.GotoNextFly();
rSh.EnterSelFrmMode();
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -5450,7 +5450,7 @@ SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType )
//Shell ermitteln
SfxShell* pShell;
SfxDispatcher* pDispatcher = rView.GetViewFrame()->GetDispatcher();
- for(USHORT i = 0; TRUE; ++i )
+ for(sal_uInt16 i = 0; sal_True; ++i )
{
pShell = pDispatcher->GetShell( i );
if( !pShell || pShell->IsA( nType ) )
@@ -5474,7 +5474,7 @@ IMPL_LINK( SwEditWin, KeyInputFlushHandler, Timer *, EMPTYARG )
IMPL_LINK( SwEditWin, KeyInputTimerHandler, Timer *, EMPTYARG )
{
- bTblInsDelMode = FALSE;
+ bTblInsDelMode = sal_False;
return 0;
}
@@ -5509,7 +5509,7 @@ IMPL_LINK(SwEditWin, TemplateTimerHdl, Timer*, EMPTYARG)
}
-void SwEditWin::SetChainMode( BOOL bOn )
+void SwEditWin::SetChainMode( sal_Bool bOn )
{
if ( !bChainMode )
StopInsFrm();
@@ -5524,7 +5524,7 @@ void SwEditWin::SetChainMode( BOOL bOn )
if ( !bChainMode )
rView.GetViewFrame()->HideStatusText();
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{
FN_FRAME_CHAIN, FN_FRAME_UNCHAIN, 0
};
@@ -5551,7 +5551,7 @@ void QuickHelpData::Move( QuickHelpData& rCpy )
{
// Pointer verschieben
aArr.Insert( &rCpy.aArr );
- rCpy.aArr.Remove( (USHORT)0, rCpy.aArr.Count() );
+ rCpy.aArr.Remove( (sal_uInt16)0, rCpy.aArr.Count() );
// nTipId = rCpy.nTipId;
bClear = rCpy.bClear;
nLen = rCpy.nLen;
@@ -5573,17 +5573,17 @@ void QuickHelpData::Move( QuickHelpData& rCpy )
void QuickHelpData::ClearCntnt()
{
nLen = nCurArrPos = 0;
- bClear = bChkInsBlank = FALSE;
+ bClear = bChkInsBlank = sal_False;
nTipId = 0;
aArr.DeleteAndDestroy( 0 , aArr.Count() );
- bIsTip = TRUE;
- bIsAutoText = TRUE;
+ bIsTip = sal_True;
+ bIsAutoText = sal_True;
delete pCETID, pCETID = 0;
delete[] pAttrs, pAttrs = 0;
}
-void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen )
+void QuickHelpData::Start( SwWrtShell& rSh, sal_uInt16 nWrdLen )
{
if( pCETID ) delete pCETID, pCETID = 0;
if( pAttrs ) delete[] pAttrs, pAttrs = 0;
@@ -5593,7 +5593,7 @@ void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen )
nLen = nWrdLen;
nCurArrPos = 0;
}
- bClear = TRUE;
+ bClear = sal_True;
Window& rWin = rSh.GetView().GetEditWin();
if( bIsTip )
@@ -5609,13 +5609,13 @@ void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen )
{
String sStr( *aArr[ nCurArrPos ] );
sStr.Erase( 0, nLen );
- USHORT nL = sStr.Len();
- pAttrs = new USHORT[ nL ];
- for( USHORT n = nL; n; )
+ sal_uInt16 nL = sStr.Len();
+ pAttrs = new sal_uInt16[ nL ];
+ for( sal_uInt16 n = nL; n; )
*(pAttrs + --n ) = EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE |
EXTTEXTINPUT_ATTR_HIGHLIGHT;
pCETID = new CommandExtTextInputData( sStr, pAttrs, nL,
- 0, 0, 0, FALSE );
+ 0, 0, 0, sal_False );
rSh.CreateExtTextInput(rWin.GetInputLanguage());
rSh.SetExtTextInputData( *pCETID );
}
@@ -5624,7 +5624,7 @@ void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen )
void QuickHelpData::Stop( SwWrtShell& rSh )
{
if( !bIsTip )
- rSh.DeleteExtTextInput( 0, FALSE );
+ rSh.DeleteExtTextInput( 0, sal_False );
else if( nTipId )
Help::HideTip( nTipId );
ClearCntnt();
@@ -5665,7 +5665,7 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord )
// and than add all words from the AutoCompleteWord-List
const SwAutoCompleteWord& rACLst = rSh.GetAutoCompleteWords();
- USHORT nStt, nEnd;
+ sal_uInt16 nStt, nEnd;
if( rACLst.GetRange( rWord, nStt, nEnd ) )
{
while( nStt < nEnd )
@@ -5701,12 +5701,12 @@ void SwEditWin::ShowAutoTextCorrectQuickHelp(
if( pQuickHlpData->aArr.Count() )
{
- pQuickHlpData->bIsTip = TRUE;
- pQuickHlpData->bIsAutoText = TRUE;
+ pQuickHlpData->bIsTip = sal_True;
+ pQuickHlpData->bIsAutoText = sal_True;
}
else if( pACorr->GetSwFlags().bAutoCompleteWords )
{
- pQuickHlpData->bIsAutoText = FALSE;
+ pQuickHlpData->bIsAutoText = sal_False;
pQuickHlpData->bIsTip = bFromIME ||
!pACorr ||
pACorr->GetSwFlags().bAutoCmpltShowAsTip;
diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx
index 1ecf32144ee5..fc3ed663ad6d 100644
--- a/sw/source/ui/docvw/edtwin2.cxx
+++ b/sw/source/ui/docvw/edtwin2.cxx
@@ -83,9 +83,9 @@
/*--------------------------------------------------------------------
Beschreibung: KeyEvents
--------------------------------------------------------------------*/
-static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, BOOL bBalloon )
+static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, sal_Bool bBalloon )
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch( rRedl.GetType() )
{
case nsRedlineType_t::REDLINE_INSERT: nResId = STR_REDLINE_INSERT; break;
@@ -111,14 +111,14 @@ static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, BOOL bBall
void SwEditWin::RequestHelp(const HelpEvent &rEvt)
{
SwWrtShell &rSh = rView.GetWrtShell();
- BOOL bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON ));
+ sal_Bool bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON ));
if(bQuickBalloon && rSh.GetViewOptions()->IsPreventTips())
return;
- BOOL bWeiter = TRUE;
+ sal_Bool bWeiter = sal_True;
SET_CURR_SHELL(&rSh);
String sTxt;
Point aPos( PixelToLogic( ScreenToOutputPixel( rEvt.GetMousePosPixel() ) ));
- BOOL bBalloon = static_cast< BOOL >(rEvt.GetMode() & HELPMODE_BALLOON);
+ sal_Bool bBalloon = static_cast< sal_Bool >(rEvt.GetMode() & HELPMODE_BALLOON);
SdrView *pSdrView = rSh.GetDrawView();
@@ -135,7 +135,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( bWeiter && bQuickBalloon)
{
SwRect aFldRect;
- USHORT nStyle = 0; // style of quick help
+ sal_uInt16 nStyle = 0; // style of quick help
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD |
SwContentAtPos::SW_INETATTR |
SwContentAtPos::SW_FTN |
@@ -149,7 +149,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
#endif
SwContentAtPos::SW_TABLEBOXFML );
- if( rSh.GetContentAtPos( aPos, aCntntAtPos, FALSE, &aFldRect ) )
+ if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
{
switch( aCntntAtPos.eCntntAtPos )
{
@@ -224,7 +224,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
}
// <--
// --> OD 2007-07-26 #i80029#
- BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
@@ -302,7 +302,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case RES_TABLEFLD:
case RES_GETEXPFLD:
{
- USHORT nOldSubType = pFld->GetSubType();
+ sal_uInt16 nOldSubType = pFld->GetSubType();
((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD);
sTxt = pFld->ExpandField(true);
((SwField*)pFld)->SetSubType(nOldSubType);
@@ -332,7 +332,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
break;
}
case RES_INPUTFLD: // BubbleHelp, da der Hinweis ggf ziemlich lang sein kann
- bBalloon = TRUE;
+ bBalloon = sal_True;
/* no break */
case RES_JUMPEDITFLD:
sTxt = pFld->GetPar2();
@@ -388,7 +388,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( !sTxt.Len() )
{
aCntntAtPos.eCntntAtPos = SwContentAtPos::SW_REDLINE;
- if( rSh.GetContentAtPos( aPos, aCntntAtPos, FALSE, &aFldRect ) )
+ if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl,
sTxt, bBalloon );
}
@@ -412,12 +412,12 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
}
}
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
if( bWeiter )
{
- BYTE nTabCols = rSh.WhichMouseTabCol(aPos);
- USHORT nTabRes = 0;
+ sal_uInt8 nTabCols = rSh.WhichMouseTabCol(aPos);
+ sal_uInt16 nTabRes = 0;
switch(nTabCols)
{
case SW_TABCOL_HORI:
@@ -452,7 +452,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
Rectangle aRect(rEvt.GetMousePosPixel(), aTxtSize);
Help::ShowQuickHelp(this, aRect, sTxt);
}
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
@@ -479,7 +479,7 @@ aktuelle Zeichenvorlage anzeigen?
pObj = aVEvt.pObj;
sTxt = pField->GetURL();
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
if (bWeiter && eHit == SDRHIT_TEXTEDIT)
@@ -504,7 +504,7 @@ aktuelle Zeichenvorlage anzeigen?
if (pField )
{
sTxt = ((const SvxURLField*) pField)->GetURL();
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
}
@@ -553,7 +553,7 @@ void SwEditWin::Paint(const Rectangle& rRect)
SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
if(!pWrtShell)
return;
- BOOL bPaintShadowCrsr = FALSE;
+ sal_Bool bPaintShadowCrsr = sal_False;
if( pShadCrsr )
{
Rectangle aRect( pShadCrsr->GetRect());
@@ -566,7 +566,7 @@ void SwEditWin::Paint(const Rectangle& rRect)
// liegt irgendwie drueber, dann ist alles ausserhalb geclippt
// und wir muessen den "inneren Teil" am Ende vom Paint
// wieder sichtbar machen. Sonst kommt es zu Paintfehlern!
- bPaintShadowCrsr = TRUE;
+ bPaintShadowCrsr = sal_True;
}
}
/*
diff --git a/sw/source/ui/docvw/edtwin3.cxx b/sw/source/ui/docvw/edtwin3.cxx
index c2d7492cb066..1d0699e5cd81 100644
--- a/sw/source/ui/docvw/edtwin3.cxx
+++ b/sw/source/ui/docvw/edtwin3.cxx
@@ -56,7 +56,7 @@
void ScrollMDI( ViewShell* pVwSh, const SwRect &rRect,
- USHORT nRangeX, USHORT nRangeY)
+ sal_uInt16 nRangeX, sal_uInt16 nRangeY)
{
SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell();
if (pSfxVwSh && pSfxVwSh->ISA(SwView))
@@ -69,12 +69,12 @@ void ScrollMDI( ViewShell* pVwSh, const SwRect &rRect,
-BOOL IsScrollMDI( ViewShell* pVwSh, const SwRect &rRect )
+sal_Bool IsScrollMDI( ViewShell* pVwSh, const SwRect &rRect )
{
SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell();
if (pSfxVwSh && pSfxVwSh->ISA(SwView))
return (((SwView *)pSfxVwSh)->IsScroll(rRect.SVRect()));
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -101,7 +101,7 @@ void SizeNotify(ViewShell* pVwSh, const Size &rSize)
-void PageNumNotify( ViewShell* pVwSh, USHORT nPhyNum, USHORT nVirtNum,
+void PageNumNotify( ViewShell* pVwSh, sal_uInt16 nPhyNum, sal_uInt16 nVirtNum,
const String& rPgStr)
{
SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell();
@@ -128,7 +128,7 @@ void FrameNotify( ViewShell* pVwSh, FlyMode eMode )
/*--------------------------------------------------------------------
Beschreibung: Notify fuer Seitenzahl-Update
--------------------------------------------------------------------*/
-BOOL SwEditWin::RulerColumnDrag( const MouseEvent& rMEvt, BOOL bVerticalMode)
+sal_Bool SwEditWin::RulerColumnDrag( const MouseEvent& rMEvt, sal_Bool bVerticalMode)
{
SvxRuler& rRuler = bVerticalMode ? rView.GetVLineal() : rView.GetHLineal();
return (!rRuler.StartDocDrag( rMEvt, RULER_TYPE_BORDER ) &&
@@ -139,7 +139,7 @@ BOOL SwEditWin::RulerColumnDrag( const MouseEvent& rMEvt, BOOL bVerticalMode)
// #i23726#
// --> OD 2005-02-18 #i42921# - add 3rd parameter <bVerticalMode> in order
// to consider vertical layout
-BOOL SwEditWin::RulerMarginDrag( const MouseEvent& rMEvt,
+sal_Bool SwEditWin::RulerMarginDrag( const MouseEvent& rMEvt,
const bool bVerticalMode )
{
SvxRuler& rRuler = bVerticalMode ? rView.GetVLineal() : rView.GetHLineal();
@@ -165,12 +165,12 @@ void RepaintPagePreview( ViewShell* pVwSh, const SwRect& rRect )
((SwPagePreView *)pSfxVwSh)->RepaintCoreRect( rRect );
}
-BOOL JumpToSwMark( ViewShell* pVwSh, const String& rMark )
+sal_Bool JumpToSwMark( ViewShell* pVwSh, const String& rMark )
{
SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell();
if( pSfxVwSh && pSfxVwSh->ISA( SwView ) )
return ((SwView *)pSfxVwSh)->JumpToSwMark( rMark );
- return FALSE;
+ return sal_False;
}
void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
@@ -182,8 +182,8 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
// the SwWrtShell
if(!pSh)
return;
- BOOL bViewWasLocked = pSh->IsViewLocked(), bUnlockPaint = FALSE;
- pSh->LockView( TRUE );
+ sal_Bool bViewWasLocked = pSh->IsViewLocked(), bUnlockPaint = sal_False;
+ pSh->LockView( sal_True );
switch( rDCEvt.GetType() )
{
case DATACHANGED_SETTINGS:
@@ -194,7 +194,7 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
if( rDCEvt.GetFlags() & SETTINGS_STYLE )
{
pSh->LockPaint();
- bUnlockPaint = TRUE;
+ bUnlockPaint = sal_True;
ViewShell::DeleteReplacementBitmaps();
GetView().InvalidateBorder(); //Scrollbarbreiten
}
@@ -205,7 +205,7 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
case DATACHANGED_FONTS:
case DATACHANGED_FONTSUBSTITUTION:
pSh->LockPaint();
- bUnlockPaint = TRUE;
+ bUnlockPaint = sal_True;
GetView().GetDocShell()->UpdateFontList(); //z.B. Druckerwechsel
break;
}
diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx
index c93409441be9..681eab61dee9 100644
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
@@ -90,13 +90,13 @@ SwReadOnlyPopup::~SwReadOnlyPopup()
-void SwReadOnlyPopup::Check( USHORT nMID, USHORT nSID, SfxDispatcher &rDis )
+void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rDis )
{
SfxPoolItem *_pItem = 0;
SfxItemState eState = rDis.GetBindings()->QueryState( nSID, _pItem );
if (eState >= SFX_ITEM_AVAILABLE)
{
- EnableItem( nMID, TRUE );
+ EnableItem( nMID, sal_True );
if (_pItem)
{
CheckItem ( nMID, !_pItem->ISA(SfxVoidItem) &&
@@ -104,11 +104,11 @@ void SwReadOnlyPopup::Check( USHORT nMID, USHORT nSID, SfxDispatcher &rDis )
((SfxBoolItem*)_pItem)->GetValue());
//remove full screen entry when not in full screen mode
if(SID_WIN_FULLSCREEN == nSID && !IsItemChecked(SID_WIN_FULLSCREEN) )
- EnableItem(nMID, FALSE);
+ EnableItem(nMID, sal_False);
}
}
else
- EnableItem( nMID, FALSE );
+ EnableItem( nMID, sal_False );
delete _pItem;
}
@@ -127,7 +127,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
if ( !sURL.Len() )
{
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_INETATTR );
- if( rSh.GetContentAtPos( rDocPos, aCntntAtPos, FALSE))
+ if( rSh.GetContentAtPos( rDocPos, aCntntAtPos, sal_False))
{
SwFmtINetFmt &rIItem = *(SwFmtINetFmt*)aCntntAtPos.aFnd.pAttr;
sURL = rIItem.GetValue();
@@ -136,12 +136,12 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
}
}
- BOOL bLink = FALSE;
+ sal_Bool bLink = sal_False;
const Graphic *pGrf;
if ( 0 == (pGrf = rSh.GetGrfAtPos( rDocPos, sGrfName, bLink )) )
{
- EnableItem( MN_READONLY_SAVEGRAPHIC, FALSE );
- EnableItem( MN_READONLY_COPYGRAPHIC, FALSE );
+ EnableItem( MN_READONLY_SAVEGRAPHIC, sal_False );
+ EnableItem( MN_READONLY_COPYGRAPHIC, sal_False );
}
else
{
@@ -149,7 +149,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
const SwFrmFmt* pGrfFmt = rSh.GetFmtFromObj( rDocPos );
const SfxPoolItem* pURLItem;
if( pGrfFmt && SFX_ITEM_SET == pGrfFmt->GetItemState(
- RES_URL, TRUE, &pURLItem ))
+ RES_URL, sal_True, &pURLItem ))
{
const SwFmtURL& rURL = *(SwFmtURL*)pURLItem;
if( rURL.GetMap() )
@@ -162,8 +162,8 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
}
}
- BOOL bEnableGraphicToGallery;
- if ( TRUE == (bEnableGraphicToGallery = bLink) )
+ sal_Bool bEnableGraphicToGallery;
+ if ( sal_True == (bEnableGraphicToGallery = bLink) )
{
GalleryExplorer::FillThemeList( aThemeList );
if ( aThemeList.Count() )
@@ -171,12 +171,12 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
PopupMenu *pMenu = GetPopupMenu(MN_READONLY_GRAPHICTOGALLERY);
pMenu->CheckItem( MN_READONLY_TOGALLERYLINK, bGrfToGalleryAsLnk );
pMenu->CheckItem( MN_READONLY_TOGALLERYCOPY, !bGrfToGalleryAsLnk );
- for ( USHORT i=0; i < aThemeList.Count(); ++i )
+ for ( sal_uInt16 i=0; i < aThemeList.Count(); ++i )
pMenu->InsertItem( MN_READONLY_GRAPHICTOGALLERY+i + 3,
*(String*)aThemeList.GetObject( i ) );
}
else
- bEnableGraphicToGallery = FALSE;
+ bEnableGraphicToGallery = sal_False;
}
EnableItem( MN_READONLY_GRAPHICTOGALLERY, bEnableGraphicToGallery );
@@ -184,12 +184,12 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
SfxDispatcher &rDis = *pVFrame->GetDispatcher();
const SwPageDesc &rDesc = rSh.GetPageDesc( rSh.GetCurPageDesc() );
pItem = &rDesc.GetMaster().GetBackground();
- BOOL bEnableBackGallery = FALSE,
- bEnableBack = FALSE;
+ sal_Bool bEnableBackGallery = sal_False,
+ bEnableBack = sal_False;
if ( GPOS_NONE != pItem->GetGraphicPos() )
{
- bEnableBack = TRUE;
+ bEnableBack = sal_True;
if ( pItem->GetGraphicLink() )
{
if ( !aThemeList.Count() )
@@ -199,8 +199,8 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
PopupMenu *pMenu = GetPopupMenu(MN_READONLY_BACKGROUNDTOGALLERY);
pMenu->CheckItem( MN_READONLY_TOGALLERYLINK, bGrfToGalleryAsLnk );
pMenu->CheckItem( MN_READONLY_TOGALLERYCOPY, !bGrfToGalleryAsLnk );
- bEnableBackGallery = TRUE;
- for ( USHORT i=0; i < aThemeList.Count(); ++i )
+ bEnableBackGallery = sal_True;
+ for ( sal_uInt16 i=0; i < aThemeList.Count(); ++i )
pMenu->InsertItem( MN_READONLY_BACKGROUNDTOGALLERY+i + 3,
*(String*)aThemeList.GetObject( i ) );
}
@@ -212,9 +212,9 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
if ( !rSh.GetViewOptions()->IsGraphic() )
CheckItem( MN_READONLY_GRAPHICOFF );
else
- EnableItem( MN_READONLY_LOADGRAPHIC, FALSE );
+ EnableItem( MN_READONLY_LOADGRAPHIC, sal_False );
- BOOL bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame();
+ sal_Bool bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame();
EnableItem( MN_READONLY_RELOAD_FRAME,
bReloadFrame );
EnableItem( MN_READONLY_RELOAD, !bReloadFrame);
@@ -235,7 +235,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
SfxItemState eState = pVFrame->GetBindings().QueryState( SID_COPY, pState );
Check( MN_READONLY_COPY, SID_COPY, rDis );
if(eState < SFX_ITEM_AVAILABLE)
- EnableItem( MN_READONLY_COPY, FALSE );
+ EnableItem( MN_READONLY_COPY, sal_False );
eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState );
if (
@@ -243,23 +243,23 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
(rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI())
)
{
- EnableItem( MN_READONLY_EDITDOC, FALSE );
+ EnableItem( MN_READONLY_EDITDOC, sal_False );
}
if ( !sURL.Len() )
{
- EnableItem( MN_READONLY_OPENURL, FALSE );
- EnableItem( MN_READONLY_OPENURLNEW, FALSE );
- EnableItem( MN_READONLY_COPYLINK, FALSE );
+ EnableItem( MN_READONLY_OPENURL, sal_False );
+ EnableItem( MN_READONLY_OPENURLNEW, sal_False );
+ EnableItem( MN_READONLY_COPYLINK, sal_False );
}
Check( SID_WIN_FULLSCREEN, SID_WIN_FULLSCREEN, rDis );
- RemoveDisabledEntries( TRUE, TRUE );
+ RemoveDisabledEntries( sal_True, sal_True );
}
void SwReadOnlyPopup::Execute( Window* pWin, const Point &rPixPos )
{
- USHORT nId = PopupMenu::Execute(
+ sal_uInt16 nId = PopupMenu::Execute(
pWin,
rPixPos );
Execute(pWin, nId);
@@ -268,14 +268,14 @@ void SwReadOnlyPopup::Execute( Window* pWin, const Point &rPixPos )
/*-- 17.03.2004 13:06:18---------------------------------------------------
execute the resulting ID only - necessary to support XContextMenuInterception
-----------------------------------------------------------------------*/
-void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId )
+void SwReadOnlyPopup::Execute( Window* pWin, sal_uInt16 nId )
{
SwWrtShell &rSh = rView.GetWrtShell();
SfxDispatcher &rDis = *rView.GetViewFrame()->GetDispatcher();
if ( nId >= MN_READONLY_GRAPHICTOGALLERY )
{
String sTmp;
- USHORT nSaveId;
+ sal_uInt16 nSaveId;
if ( nId >= MN_READONLY_BACKGROUNDTOGALLERY )
{
nId -= MN_READONLY_BACKGROUNDTOGALLERY+3;
@@ -301,8 +301,8 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId )
TransferDataContainer* pClipCntnr = 0;
- USHORT nExecId = USHRT_MAX;
- USHORT nFilter = USHRT_MAX;
+ sal_uInt16 nExecId = USHRT_MAX;
+ sal_uInt16 nFilter = USHRT_MAX;
switch( nId )
{
case SID_WIN_FULLSCREEN : nExecId = SID_WIN_FULLSCREEN; break;
@@ -343,9 +343,9 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId )
case MN_READONLY_LOADGRAPHIC:
{
- BOOL bModified = rSh.IsModified();
+ sal_Bool bModified = rSh.IsModified();
SwViewOption aOpt( *rSh.GetViewOptions() );
- aOpt.SetGraphic( TRUE );
+ aOpt.SetGraphic( sal_True );
rSh.ApplyViewOptions( aOpt );
if(!bModified)
rSh.ResetModified();
@@ -356,10 +356,10 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId )
case MN_READONLY_PLUGINOFF: nExecId = SID_PLUGINS_ACTIVE; break;
#endif
case MN_READONLY_TOGALLERYLINK:
- SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( TRUE );
+ SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( sal_True );
break;
case MN_READONLY_TOGALLERYCOPY:
- SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( FALSE );
+ SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( sal_False );
break;
default: //forward the id to the SfxBindings
@@ -396,7 +396,7 @@ static void lcl_GetPreferedExtension( String &rExt, const Graphic &rGrf )
}
-String SwReadOnlyPopup::SaveGraphic( USHORT nId )
+String SwReadOnlyPopup::SaveGraphic( sal_uInt16 nId )
{
//Namen der Grafik herausfischen.
@@ -441,18 +441,18 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
aDlgHelper.SetFileName( aURL.GetName() );
GraphicFilter& rGF = *GraphicFilter::GetGraphicFilter();
- const USHORT nCount = rGF.GetExportFormatCount();
+ const sal_uInt16 nCount = rGF.GetExportFormatCount();
String aExt( aURL.GetExtension() );
if( !aExt.Len() )
lcl_GetPreferedExtension( aExt, rGraphic );
aExt.ToLowerAscii();
- USHORT nDfltFilter = USHRT_MAX;
+ sal_uInt16 nDfltFilter = USHRT_MAX;
Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
xFltMgr->appendFilter( rGF.GetExportFormatName( i ), rGF.GetExportWildcard( i ) );
if ( COMPARE_EQUAL == aExt.CompareIgnoreCaseToAscii(rGF.GetExportFormatShortName( i ).ToLowerAscii() ))
@@ -462,7 +462,7 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
{
//"falsche" Extension?
lcl_GetPreferedExtension( aExt, rGraphic );
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
if ( aExt == rGF.GetExportFormatShortName( i ).ToLowerAscii() )
{
nDfltFilter = i;
@@ -486,11 +486,11 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
{
//Versuchen die Originalgrafik zu speichern.
SfxMedium aIn( rGrfName, STREAM_READ | STREAM_NOCREATE,
- TRUE );
+ sal_True );
if( aIn.GetInStream() && !aIn.GetInStream()->GetError() )
{
SfxMedium aOut( sPath, STREAM_WRITE | STREAM_SHARE_DENYNONE,
- FALSE);
+ sal_False);
if( aOut.GetOutStream() && !aOut.GetOutStream()->GetError())
{
*aOut.GetOutStream() << *aIn.GetInStream();
@@ -505,7 +505,7 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
}
}
- USHORT nFilter;
+ sal_uInt16 nFilter;
if ( xFltMgr->getCurrentFilter().getLength() && rGF.GetExportFormatCount() )
nFilter = rGF.GetExportFormatNumber( xFltMgr->getCurrentFilter() );
else
diff --git a/sw/source/ui/docvw/romenu.hxx b/sw/source/ui/docvw/romenu.hxx
index 2d60689c6854..db532a709264 100644
--- a/sw/source/ui/docvw/romenu.hxx
+++ b/sw/source/ui/docvw/romenu.hxx
@@ -53,12 +53,12 @@ class SwReadOnlyPopup : public PopupMenu
sDescription,
sGrfName;
List aThemeList;
- BOOL bGrfToGalleryAsLnk;
+ sal_Bool bGrfToGalleryAsLnk;
ImageMap* pImageMap;
INetImage* pTargetURL;
- void Check( USHORT nMID, USHORT nSID, SfxDispatcher &rDis );
- String SaveGraphic( USHORT nId );
+ void Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rDis );
+ String SaveGraphic( sal_uInt16 nId );
using PopupMenu::Execute;
@@ -67,7 +67,7 @@ public:
~SwReadOnlyPopup();
void Execute( Window* pWin, const Point &rPPos );
- void Execute( Window* pWin, USHORT nId );
+ void Execute( Window* pWin, sal_uInt16 nId );
};
diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index 56c4eba3b8f1..34c9711bd01b 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -68,8 +68,8 @@
struct SwTextPortion
{
- USHORT nLine;
- USHORT nStart, nEnd;
+ sal_uInt16 nLine;
+ sal_uInt16 nStart, nEnd;
svtools::ColorConfigEntry eType;
};
@@ -93,12 +93,12 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
const sal_Unicode cCR = 0x0d;
- const USHORT nStrLen = rSource.Len();
- USHORT nInsert = 0; // Number of inserted Portions
- USHORT nActPos = 0; // Position, at the '<' was found
- USHORT nOffset = 0; // Offset of nActPos for '<'
- USHORT nPortStart = USHRT_MAX; // For the TextPortion
- USHORT nPortEnd = 0; //
+ const sal_uInt16 nStrLen = rSource.Len();
+ sal_uInt16 nInsert = 0; // Number of inserted Portions
+ sal_uInt16 nActPos = 0; // Position, at the '<' was found
+ sal_uInt16 nOffset = 0; // Offset of nActPos for '<'
+ sal_uInt16 nPortStart = USHRT_MAX; // For the TextPortion
+ sal_uInt16 nPortEnd = 0; //
SwTextPortion aText;
while(nActPos < nStrLen)
{
@@ -143,7 +143,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
if(svtools::HTMLUNKNOWN == eFoundType)
{
//jetzt koennte hier ein keyword folgen
- USHORT nSrchPos = nActPos;
+ sal_uInt16 nSrchPos = nActPos;
while(++nSrchPos < nStrLen - 1)
{
sal_Unicode cNext = rSource.GetChar(nSrchPos);
@@ -184,18 +184,18 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
// jetzt muss noch '>' gesucht werden
if(svtools::HTMLUNKNOWN != eFoundType)
{
- BOOL bFound = FALSE;
- for(USHORT i = nPortEnd; i < nStrLen; i++)
+ sal_Bool bFound = sal_False;
+ for(sal_uInt16 i = nPortEnd; i < nStrLen; i++)
if(cCloseBracket == rSource.GetChar(i))
{
- bFound = TRUE;
+ bFound = sal_True;
nPortEnd = i;
break;
}
if(!bFound && (eFoundType == svtools::HTMLCOMMENT))
{
// Kommentar ohne Ende in dieser Zeile
- bFound = TRUE;
+ bFound = sal_True;
nPortEnd = nStrLen - 1;
}
@@ -246,8 +246,8 @@ SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) :
nCurTextWidth(0),
nStartLine(USHRT_MAX),
eSourceEncoding(gsl_getSystemTextEncoding()),
- bDoSyntaxHighlight(TRUE),
- bHighlighting(FALSE)
+ bDoSyntaxHighlight(sal_True),
+ bHighlighting(sal_False)
{
SetHelpId(HID_SOURCE_EDITWIN);
CreateTextEngine();
@@ -448,9 +448,9 @@ void TextViewOutWin::Command( const CommandEvent& rCEvt )
void TextViewOutWin::KeyInput( const KeyEvent& rKEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
SwSrcEditWindow* pSrcEditWin = (SwSrcEditWindow*)GetParent();
- BOOL bChange = !pSrcEditWin->IsReadonly() || !TextEngine::DoesKeyChangeText( rKEvt );
+ sal_Bool bChange = !pSrcEditWin->IsReadonly() || !TextEngine::DoesKeyChangeText( rKEvt );
if(bChange)
bDone = pTextView->KeyInput( rKEvt );
@@ -521,14 +521,14 @@ void SwSrcEditWindow::CreateTextEngine()
pTextEngine = new ExtTextEngine;
pTextView = new ExtTextView( pTextEngine, pOutWin );
- pTextView->SetAutoIndentMode(TRUE);
+ pTextView->SetAutoIndentMode(sal_True);
pOutWin->SetTextView(pTextView);
- pTextEngine->SetUpdateMode( FALSE );
+ pTextEngine->SetUpdateMode( sal_False );
pTextEngine->InsertView( pTextView );
Font aFont;
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
aFont.SetFillColor( rCol );
SetPointFont( aFont );
aFont = GetFont();
@@ -539,10 +539,10 @@ void SwSrcEditWindow::CreateTextEngine()
aSyntaxIdleTimer.SetTimeout( SYNTAX_HIGHLIGHT_TIMEOUT );
aSyntaxIdleTimer.SetTimeoutHdl( LINK( this, SwSrcEditWindow, SyntaxTimerHdl ) );
- pTextEngine->EnableUndo( TRUE );
- pTextEngine->SetUpdateMode( TRUE );
+ pTextEngine->EnableUndo( sal_True );
+ pTextEngine->SetUpdateMode( sal_True );
- pTextView->ShowCursor( TRUE, TRUE );
+ pTextView->ShowCursor( sal_True, sal_True );
InitScrollBars();
StartListening( *pTextEngine );
@@ -600,14 +600,14 @@ IMPL_LINK(SwSrcEditWindow, ScrollHdl, ScrollBar*, pScroll)
{
long nDiff = pTextView->GetStartDocPos().Y() - pScroll->GetThumbPos();
GetTextView()->Scroll( 0, nDiff );
- pTextView->ShowCursor( FALSE, TRUE );
+ pTextView->ShowCursor( sal_False, sal_True );
pScroll->SetThumbPos( pTextView->GetStartDocPos().Y() );
}
else
{
long nDiff = pTextView->GetStartDocPos().X() - pScroll->GetThumbPos();
GetTextView()->Scroll( nDiff, 0 );
- pTextView->ShowCursor( FALSE, TRUE );
+ pTextView->ShowCursor( sal_False, sal_True );
pScroll->SetThumbPos( pTextView->GetStartDocPos().X() );
}
GetSrcView()->GetViewFrame()->GetBindings().Invalidate( SID_TABLE_CELL );
@@ -622,20 +622,20 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
{
Time aSyntaxCheckStart;
DBG_ASSERT( pTextView, "Noch keine View, aber Syntax-Highlight ?!" );
- // pTextEngine->SetUpdateMode( FALSE );
+ // pTextEngine->SetUpdateMode( sal_False );
- bHighlighting = TRUE;
- USHORT nLine;
- USHORT nCount = 0;
+ bHighlighting = sal_True;
+ sal_uInt16 nLine;
+ sal_uInt16 nCount = 0;
// zuerst wird der Bereich um dem Cursor bearbeitet
TextSelection aSel = pTextView->GetSelection();
- USHORT nCur = (USHORT)aSel.GetStart().GetPara();
+ sal_uInt16 nCur = (sal_uInt16)aSel.GetStart().GetPara();
if(nCur > 40)
nCur -= 40;
else
nCur = 0;
if(aSyntaxLineTable.Count())
- for(USHORT i = 0; i < 80 && nCount < 40; i++, nCur++)
+ for(sal_uInt16 i = 0; i < 80 && nCount < 40; i++, nCur++)
{
void * p = aSyntaxLineTable.Get(nCur);
if(p)
@@ -657,9 +657,9 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
void* p = aSyntaxLineTable.First();
while ( p && nCount < MAX_SYNTAX_HIGHLIGHT)
{
- nLine = (USHORT)aSyntaxLineTable.GetCurKey();
+ nLine = (sal_uInt16)aSyntaxLineTable.GetCurKey();
DoSyntaxHighlight( nLine );
- USHORT nCurKey = (USHORT)aSyntaxLineTable.GetCurKey();
+ sal_uInt16 nCurKey = (sal_uInt16)aSyntaxLineTable.GetCurKey();
p = aSyntaxLineTable.Next();
aSyntaxLineTable.Remove(nCurKey);
nCount ++;
@@ -675,9 +675,9 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
TextView* pTmp = pTextEngine->GetActiveView();
pTextEngine->SetActiveView(0);
- // pTextEngine->SetUpdateMode( TRUE );
+ // pTextEngine->SetUpdateMode( sal_True );
pTextEngine->SetActiveView(pTmp);
- pTextView->ShowCursor(FALSE, FALSE);
+ pTextView->ShowCursor(sal_False, sal_False);
*/
if(aSyntaxLineTable.Count() && !pTimer->IsActive())
@@ -688,7 +688,7 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
nCurTextWidth = pTextEngine->CalcTextWidth() + 25; // kleine Toleranz
if ( nCurTextWidth != nPrevTextWidth )
SetScrollBarRanges();
- bHighlighting = FALSE;
+ bHighlighting = sal_False;
return 0;
}
@@ -696,27 +696,27 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
--------------------------------------------------*/
-void SwSrcEditWindow::DoSyntaxHighlight( USHORT nPara )
+void SwSrcEditWindow::DoSyntaxHighlight( sal_uInt16 nPara )
{
// Durch das DelayedSyntaxHighlight kann es passieren,
// dass die Zeile nicht mehr existiert!
if ( nPara < pTextEngine->GetParagraphCount() )
{
- BOOL bTempModified = IsModified();
- pTextEngine->RemoveAttribs( nPara, (BOOL)TRUE );
+ sal_Bool bTempModified = IsModified();
+ pTextEngine->RemoveAttribs( nPara, (sal_Bool)sal_True );
String aSource( pTextEngine->GetText( nPara ) );
- pTextEngine->SetUpdateMode( FALSE );
+ pTextEngine->SetUpdateMode( sal_False );
ImpDoHighlight( aSource, nPara );
// os: #43050# hier wird ein TextView-Problem umpopelt:
// waehrend des Highlightings funktionierte das Scrolling nicht
TextView* pTmp = pTextEngine->GetActiveView();
- pTmp->SetAutoScroll(FALSE);
+ pTmp->SetAutoScroll(sal_False);
pTextEngine->SetActiveView(0);
- pTextEngine->SetUpdateMode( TRUE );
+ pTextEngine->SetUpdateMode( sal_True );
pTextEngine->SetActiveView(pTmp);
// Bug 72887 show the cursor
- pTmp->SetAutoScroll(TRUE);
- pTmp->ShowCursor( FALSE/*pTmp->IsAutoScroll()*/ );
+ pTmp->SetAutoScroll(sal_True);
+ pTmp->ShowCursor( sal_False/*pTmp->IsAutoScroll()*/ );
if(!bTempModified)
ClearModifyFlag();
@@ -727,11 +727,11 @@ void SwSrcEditWindow::DoSyntaxHighlight( USHORT nPara )
--------------------------------------------------*/
-void SwSrcEditWindow::DoDelayedSyntaxHighlight( USHORT nPara )
+void SwSrcEditWindow::DoDelayedSyntaxHighlight( sal_uInt16 nPara )
{
if ( !bHighlighting && bDoSyntaxHighlight )
{
- aSyntaxLineTable.Insert( nPara, (void*)(USHORT)1 );
+ aSyntaxLineTable.Insert( nPara, (void*)(sal_uInt16)1 );
aSyntaxIdleTimer.Start();
}
}
@@ -740,7 +740,7 @@ void SwSrcEditWindow::DoDelayedSyntaxHighlight( USHORT nPara )
--------------------------------------------------*/
-void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
+void SwSrcEditWindow::ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff )
{
SwTextPortions aPortionList;
lcl_Highlight(rSource, aPortionList);
@@ -762,16 +762,16 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
// Wenn haufig gleiche Farbe, dazwischen Blank ohne Farbe,
// ggf. zusammenfassen, oder zumindest das Blank,
// damit weniger Attribute
- BOOL bOptimizeHighlight = TRUE; // war in der BasicIDE static
+ sal_Bool bOptimizeHighlight = sal_True; // war in der BasicIDE static
if ( bOptimizeHighlight )
{
// Es muessen nur die Blanks und Tabs mit attributiert werden.
// Wenn zwei gleiche Attribute hintereinander eingestellt werden,
// optimiert das die TextEngine.
- USHORT nLastEnd = 0;
+ sal_uInt16 nLastEnd = 0;
#ifdef DBG_UTIL
- USHORT nLine = aPortionList[0].nLine;
+ sal_uInt16 nLine = aPortionList[0].nLine;
#endif
for ( size_t i = 0; i < nCount; i++ )
{
@@ -803,8 +803,8 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
r.eType != svtools::HTMLUNKNOWN)
r.eType = svtools::HTMLUNKNOWN;
Color aColor((ColorData)SW_MOD()->GetColorConfig().GetColorValue((svtools::ColorConfigEntry)r.eType).nColor);
- USHORT nLine = nLineOff+r.nLine; //
- pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1, TRUE );
+ sal_uInt16 nLine = nLineOff+r.nLine; //
+ pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1, sal_True );
}
}
@@ -832,7 +832,7 @@ void SwSrcEditWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
else if( ( rTextHint.GetId() == TEXT_HINT_PARAINSERTED ) ||
( rTextHint.GetId() == TEXT_HINT_PARACONTENTCHANGED ) )
{
- DoDelayedSyntaxHighlight( (USHORT)rTextHint.GetValue() );
+ DoDelayedSyntaxHighlight( (sal_uInt16)rTextHint.GetValue() );
}
}
}
@@ -847,7 +847,7 @@ void SwSrcEditWindow::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdC
--------------------------------------------------*/
-void SwSrcEditWindow::Invalidate(USHORT )
+void SwSrcEditWindow::Invalidate(sal_uInt16 )
{
pOutWin->Invalidate();
Window::Invalidate();
@@ -892,7 +892,7 @@ void SwSrcEditWindow::GetFocus()
/* -----------------------------29.08.2002 13:21------------------------------
---------------------------------------------------------------------------*/
-BOOL lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType aLanguages[])
+sal_Bool lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType aLanguages[])
{
switch(eEnc)
{
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index cfb5ad8f4afd..328b7391ef46 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -131,7 +131,7 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) :
SetExchangeSupport();
// Metriken
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aAddrLeftField, aMetric);
SetMetric(aAddrTopField, aMetric);
SetMetric(aSendLeftField, aMetric);
@@ -176,29 +176,29 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) :
aSizeFormatBox .SetSelectHdl(LINK(this, SwEnvFmtPage, FormatHdl));
// aSizeFormatBox
- for (USHORT i = PAPER_A3; i <= PAPER_KAI32BIG; i++)
+ for (sal_uInt16 i = PAPER_A3; i <= PAPER_KAI32BIG; i++)
{
if (i != PAPER_USER)
{
String aPaperName = SvxPaperInfo::GetName((Paper) i),
aEntryName;
- USHORT nPos = 0;
- BOOL bFound = FALSE;
+ sal_uInt16 nPos = 0;
+ sal_Bool bFound = sal_False;
while (nPos < aSizeFormatBox.GetEntryCount() && !bFound)
{
aEntryName = aSizeFormatBox.GetEntry(i);
if (aEntryName < aPaperName)
nPos++;
else
- bFound = TRUE;
+ bFound = sal_True;
}
aSizeFormatBox.InsertEntry(aPaperName, nPos);
- aIDs.Insert((USHORT) i, nPos);
+ aIDs.Insert((sal_uInt16) i, nPos);
}
}
aSizeFormatBox.InsertEntry(SvxPaperInfo::GetName(PAPER_USER));
- aIDs.Insert((USHORT) PAPER_USER, aIDs.Count());
+ aIDs.Insert((sal_uInt16) PAPER_USER, aIDs.Count());
}
@@ -226,13 +226,13 @@ IMPL_LINK_INLINE_START( SwEnvFmtPage, ModifyHdl, Edit *, pEdit )
if (pEdit == &aSizeWidthField || pEdit == &aSizeHeightField)
{
Paper ePaper = SvxPaperInfo::GetSvxPaper(
- Size(lHeight, lWidth), MAP_TWIP, TRUE);
- for (USHORT i = 0; i < aIDs.Count(); i++)
- if (aIDs[i] == (USHORT)ePaper)
+ Size(lHeight, lWidth), MAP_TWIP, sal_True);
+ for (sal_uInt16 i = 0; i < aIDs.Count(); i++)
+ if (aIDs[i] == (sal_uInt16)ePaper)
aSizeFormatBox.SelectEntryPos(i);
// Benutzergroesse merken
- if (aIDs[aSizeFormatBox.GetSelectEntryPos()] == (USHORT)PAPER_USER)
+ if (aIDs[aSizeFormatBox.GetSelectEntryPos()] == (sal_uInt16)PAPER_USER)
{
lUserW = lWidth ;
lUserH = lHeight;
@@ -259,9 +259,9 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
ASSERT(pSh, "Shell fehlt");
// Collection-Ptr ermitteln
- BOOL bSender = pButton != &aAddrEditButton;
+ sal_Bool bSender = pButton != &aAddrEditButton;
- SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< USHORT >(
+ SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< sal_uInt16 >(
bSender ? RES_POOLCOLL_SENDADRESS : RES_POOLCOLL_JAKETADRESS));
ASSERT(pColl, "Text-Collection fehlt");
@@ -279,7 +279,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
const SfxPoolItem *pTmpBrush;
if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_CHRATR_BACKGROUND,
- TRUE, &pTmpBrush ) )
+ sal_True, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_BACKGROUND );
@@ -297,7 +297,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
{
SfxItemSet aOutputSet( *pDlg->GetOutputItemSet() );
if( SFX_ITEM_SET == aOutputSet.GetItemState( RES_BACKGROUND,
- FALSE, &pTmpBrush ) )
+ sal_False, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
@@ -322,7 +322,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&)
pSh->GetView().GetCurShell()->GetPool().GetDefaultItem(RES_PARATR_TABSTOP);
- USHORT nDefDist = ::GetTabDist( rDefTabs );
+ sal_uInt16 nDefDist = ::GetTabDist( rDefTabs );
SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
aTmpSet.Put( aDefDistItem );
@@ -346,9 +346,9 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
// Defaults evtl umsetzen
const SfxPoolItem* pItem = 0;
SfxItemSet* pOutputSet = (SfxItemSet*)pDlg->GetOutputItemSet();
- USHORT nNewDist;
+ sal_uInt16 nNewDist;
if( SFX_ITEM_SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS,
- FALSE, &pItem ) &&
+ sal_False, &pItem ) &&
nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) )
{
SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
@@ -373,16 +373,16 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
Beschreibung: Ein temporaeres Itemset, das bei Abbruch verworfen wird
------------------------------------------------------------------------*/
-SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender)
+SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender)
{
SfxItemSet *&pAddrSet = bSender ? GetParent()->pSenderSet : GetParent()->pAddresseeSet;
if (!pAddrSet)
{
// Range ermitteln (Ranges beider Itemsets mergen)
- const USHORT *pRanges = pColl->GetAttrSet().GetRanges();
+ const sal_uInt16 *pRanges = pColl->GetAttrSet().GetRanges();
- static USHORT __READONLY_DATA aRanges[] =
+ static sal_uInt16 __READONLY_DATA aRanges[] =
{
RES_PARATR_BEGIN, RES_PARATR_ADJUST,
RES_PARATR_TABSTOP, RES_PARATR_END-1,
@@ -396,12 +396,12 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender)
};
// BruteForce-Merge, weil MergeRange in SvTools buggy ist:
- USHORT i = 0;
+ sal_uInt16 i = 0;
SvLongsSort aMergedRanges( 0, 10 );
while (pRanges[i])
{
- for (USHORT nPos = pRanges[i]; nPos <= pRanges[i+1]; nPos++)
+ for (sal_uInt16 nPos = pRanges[i]; nPos <= pRanges[i+1]; nPos++)
aMergedRanges.Insert(nPos);
i += 2;
}
@@ -410,7 +410,7 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender)
while (aRanges[i])
{
- for (USHORT nPos = aRanges[i]; nPos <= aRanges[i+1]; nPos++)
+ for (sal_uInt16 nPos = aRanges[i]; nPos <= aRanges[i+1]; nPos++)
aMergedRanges.Insert(nPos);
i += 2;
}
@@ -438,9 +438,9 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender)
}
// Neue Ranges erzeugen
- USHORT *pNewRanges = new USHORT[aCompactedRanges.Count() + 1];
+ sal_uInt16 *pNewRanges = new sal_uInt16[aCompactedRanges.Count() + 1];
for (i = 0; i < aCompactedRanges.Count(); i++)
- pNewRanges[i] = (USHORT)aCompactedRanges[i];
+ pNewRanges[i] = (sal_uInt16)aCompactedRanges[i];
pNewRanges[i] = 0;
@@ -466,8 +466,8 @@ IMPL_LINK( SwEnvFmtPage, FormatHdl, ListBox *, EMPTYARG )
long lAddrFromLeft;
long lAddrFromTop;
- USHORT nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()];
- if (nPaper != (USHORT)PAPER_USER)
+ sal_uInt16 nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()];
+ if (nPaper != (sal_uInt16)PAPER_USER)
{
Size aSz = SvxPaperInfo::GetPaperSize((Paper)nPaper);
lWidth = Max(aSz.Width(), aSz.Height());
@@ -577,8 +577,8 @@ void SwEnvFmtPage::FillItem(SwEnvItem& rItem)
rItem.lSendFromLeft = static_cast< sal_Int32 >(GetFldVal(aSendLeftField));
rItem.lSendFromTop = static_cast< sal_Int32 >(GetFldVal(aSendTopField ));
- USHORT nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()];
- if (nPaper == (USHORT)PAPER_USER)
+ sal_uInt16 nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()];
+ if (nPaper == (sal_uInt16)PAPER_USER)
{
long lWVal = static_cast< long >(GetFldVal(aSizeWidthField ));
long lHVal = static_cast< long >(GetFldVal(aSizeHeightField));
@@ -597,11 +597,11 @@ void SwEnvFmtPage::FillItem(SwEnvItem& rItem)
// --------------------------------------------------------------------------
-BOOL __EXPORT SwEnvFmtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool __EXPORT SwEnvFmtPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(GetParent()->aEnvItem);
rSet.Put(GetParent()->aEnvItem);
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------------
@@ -613,9 +613,9 @@ void __EXPORT SwEnvFmtPage::Reset(const SfxItemSet& rSet)
Paper ePaper = SvxPaperInfo::GetSvxPaper(
Size( Min(rItem.lWidth, rItem.lHeight),
- Max(rItem.lWidth, rItem.lHeight)), MAP_TWIP, TRUE);
- for (USHORT i = 0; i < (USHORT) aIDs.Count(); i++)
- if (aIDs[i] == (USHORT)ePaper)
+ Max(rItem.lWidth, rItem.lHeight)), MAP_TWIP, sal_True);
+ for (sal_uInt16 i = 0; i < (sal_uInt16) aIDs.Count(); i++)
+ if (aIDs[i] == (sal_uInt16)ePaper)
aSizeFormatBox.SelectEntryPos(i);
// Die MetricFields
diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx
index f8508bb7e69a..90c35adc50ff 100644
--- a/sw/source/ui/envelp/envfmt.hxx
+++ b/sw/source/ui/envelp/envfmt.hxx
@@ -88,7 +88,7 @@ class SwEnvFmtPage : public SfxTabPage
void SetMinMax();
- SfxItemSet *GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender);
+ SfxItemSet *GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender);
using Window::GetParent;
SwEnvDlg *GetParent() {return (SwEnvDlg*) SfxTabPage::GetParent()->GetParent();}
@@ -103,7 +103,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwEnvItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
};
diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx
index 436f4bd27df6..1a2ee6c27f22 100644
--- a/sw/source/ui/envelp/envimg.cxx
+++ b/sw/source/ui/envelp/envimg.cxx
@@ -72,7 +72,7 @@ SW_DLLPUBLIC String MakeSender()
String sRet;
String sSenderToken(SW_RES(STR_SENDER_TOKENS));
xub_StrLen nSttPos = 0, nTokenCount = sSenderToken.GetTokenCount(';');
- BOOL bLastLength = TRUE;
+ sal_Bool bLastLength = sal_True;
for( xub_StrLen i = 0; i < nTokenCount; i++ )
{
String sToken = sSenderToken.GetToken( 0, ';', nSttPos );
@@ -86,7 +86,7 @@ SW_DLLPUBLIC String MakeSender()
{
if(bLastLength)
sRet +=NEXTLINE;
- bLastLength = TRUE;
+ bLastLength = sal_True;
}
else if(sToken.EqualsAscii("FIRSTNAME"))
sRet += (String)rUserOpt.GetFirstName();
@@ -112,7 +112,7 @@ SwEnvItem::SwEnvItem() :
SfxPoolItem(FN_ENVELOP)
{
aAddrText = aEmptyStr;
- bSend = TRUE;
+ bSend = sal_True;
aSendText = MakeSender();
lSendFromLeft = 566; // 1 cm
lSendFromTop = 566; // 1 cm
@@ -120,7 +120,7 @@ SwEnvItem::SwEnvItem() :
lWidth = aEnvSz.Width();
lHeight = aEnvSz.Height();
eAlign = ENV_HOR_LEFT;
- bPrintFromAbove = TRUE;
+ bPrintFromAbove = sal_True;
lShiftRight = 0;
lShiftDown = 0;
@@ -322,7 +322,7 @@ Sequence<rtl::OUString> SwEnvCfgItem::GetPropertyNames()
return aNames;
}
-BOOL SwEnvItem::QueryValue( Any& rVal, BYTE nMemberId ) const
+sal_Bool SwEnvItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
sal_Bool bRet = sal_True;
switch(nMemberId & ~CONVERT_TWIPS)
@@ -349,9 +349,9 @@ BOOL SwEnvItem::QueryValue( Any& rVal, BYTE nMemberId ) const
/* -----------------------------26.04.01 12:26--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwEnvItem::PutValue(const Any& rVal, BYTE nMemberId)
+sal_Bool SwEnvItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch(nMemberId & ~CONVERT_TWIPS)
{
case MID_ENV_ADDR_TEXT : bRet = (rVal >>= aAddrText); break;
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index d10a938c3046..baa0013392ab 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -100,8 +100,8 @@ void SwEnvPreview::Paint(const Rectangle &)
const SwEnvItem& rItem =
((SwEnvDlg*) GetParent()->GetParent()->GetParent())->aEnvItem;
- USHORT nPageW = (USHORT) Max(rItem.lWidth, rItem.lHeight),
- nPageH = (USHORT) Min(rItem.lWidth, rItem.lHeight);
+ sal_uInt16 nPageW = (sal_uInt16) Max(rItem.lWidth, rItem.lHeight),
+ nPageH = (sal_uInt16) Min(rItem.lWidth, rItem.lHeight);
float fx = (float)GetOutputSizePixel().Width () / (float)nPageW,
fy = (float)GetOutputSizePixel().Height() / (float)nPageH,
@@ -117,8 +117,8 @@ void SwEnvPreview::Paint(const Rectangle &)
SetLineColor( aFront );
// Umschlag
- long nW = (USHORT) (f * nPageW),
- nH = (USHORT) (f * nPageH),
+ long nW = (sal_uInt16) (f * nPageW),
+ nH = (sal_uInt16) (f * nPageH),
nX = (GetOutputSizePixel().Width () - nW) / 2,
nY = (GetOutputSizePixel().Height() - nH) / 2;
SetFillColor( aBack );
@@ -127,28 +127,28 @@ void SwEnvPreview::Paint(const Rectangle &)
// Absender
if (rItem.bSend)
{
- long nSendX = nX + (USHORT) (f * rItem.lSendFromLeft),
- nSendY = nY + (USHORT) (f * rItem.lSendFromTop ),
- nSendW = (USHORT) (f * (rItem.lAddrFromLeft - rItem.lSendFromLeft)),
- nSendH = (USHORT) (f * (rItem.lAddrFromTop - rItem.lSendFromTop - 566));
+ long nSendX = nX + (sal_uInt16) (f * rItem.lSendFromLeft),
+ nSendY = nY + (sal_uInt16) (f * rItem.lSendFromTop ),
+ nSendW = (sal_uInt16) (f * (rItem.lAddrFromLeft - rItem.lSendFromLeft)),
+ nSendH = (sal_uInt16) (f * (rItem.lAddrFromTop - rItem.lSendFromTop - 566));
SetFillColor( aMedium );
DrawRect(Rectangle(Point(nSendX, nSendY), Size(nSendW, nSendH)));
}
// Empfaenger
- long nAddrX = nX + (USHORT) (f * rItem.lAddrFromLeft),
- nAddrY = nY + (USHORT) (f * rItem.lAddrFromTop ),
- nAddrW = (USHORT) (f * (nPageW - rItem.lAddrFromLeft - 566)),
- nAddrH = (USHORT) (f * (nPageH - rItem.lAddrFromTop - 566));
+ long nAddrX = nX + (sal_uInt16) (f * rItem.lAddrFromLeft),
+ nAddrY = nY + (sal_uInt16) (f * rItem.lAddrFromTop ),
+ nAddrW = (sal_uInt16) (f * (nPageW - rItem.lAddrFromLeft - 566)),
+ nAddrH = (sal_uInt16) (f * (nPageH - rItem.lAddrFromTop - 566));
SetFillColor( aMedium );
DrawRect(Rectangle(Point(nAddrX, nAddrY), Size(nAddrW, nAddrH)));
// Briefmarke
- long nStmpW = (USHORT) (f * 1417 /* 2,5 cm */),
- nStmpH = (USHORT) (f * 1701 /* 3,0 cm */),
- nStmpX = nX + nW - (USHORT) (f * 566) - nStmpW,
- nStmpY = nY + (USHORT) (f * 566);
+ long nStmpW = (sal_uInt16) (f * 1417 /* 2,5 cm */),
+ nStmpH = (sal_uInt16) (f * 1701 /* 3,0 cm */),
+ nStmpX = nX + nW - (sal_uInt16) (f * 566) - nStmpW,
+ nStmpY = nY + (sal_uInt16) (f * 566);
SetFillColor( aBack );
DrawRect(Rectangle(Point(nStmpX, nStmpY), Size(nStmpW, nStmpH)));
@@ -159,9 +159,9 @@ void SwEnvPreview::Paint(const Rectangle &)
SwEnvDlg::SwEnvDlg(Window* pParent, const SfxItemSet& rSet,
- SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert) :
+ SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert) :
- SfxTabDialog(pParent, SW_RES(DLG_ENV), &rSet, FALSE, &aEmptyStr),
+ SfxTabDialog(pParent, SW_RES(DLG_ENV), &rSet, sal_False, &aEmptyStr),
sInsert(SW_RES(ST_INSERT)),
sChange(SW_RES(ST_CHANGE)),
aEnvItem((const SwEnvItem&) rSet.Get(FN_ENVELOP)),
@@ -200,7 +200,7 @@ SwEnvDlg::~SwEnvDlg()
-void SwEnvDlg::PageCreated(USHORT nId, SfxTabPage &rPage)
+void SwEnvDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage)
{
if (nId == TP_ENV_PRT)
{
@@ -285,7 +285,7 @@ SwEnvPage::~SwEnvPage()
IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox )
{
- SwWait aWait( *pSh->GetView().GetDocShell(), TRUE );
+ SwWait aWait( *pSh->GetView().GetDocShell(), sal_True );
if (pListBox == &aDatabaseLB)
{
@@ -330,7 +330,7 @@ IMPL_LINK( SwEnvPage, FieldHdl, Button *, EMPTYARG )
IMPL_LINK( SwEnvPage, SenderHdl, Button *, EMPTYARG )
{
- const BOOL bEnable = aSenderBox.IsChecked();
+ const sal_Bool bEnable = aSenderBox.IsChecked();
GetParent()->aEnvItem.bSend = bEnable;
aSenderEdit.Enable(bEnable);
if ( bEnable )
@@ -418,11 +418,11 @@ void SwEnvPage::FillItem(SwEnvItem& rItem)
-BOOL SwEnvPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwEnvPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(GetParent()->aEnvItem);
rSet.Put(GetParent()->aEnvItem);
- return TRUE;
+ return sal_True;
}
// ----------------------------------------------------------------------------
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index 22690e95abff..f12eaa95240d 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -69,7 +69,7 @@ SwEnvPrtPage::SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet) :
SetExchangeSupport();
// Metriken
- FieldUnit eUnit = ::GetDfltMetric(FALSE);
+ FieldUnit eUnit = ::GetDfltMetric(sal_False);
SetMetric(aRightField, eUnit);
SetMetric(aDownField , eUnit);
@@ -158,15 +158,15 @@ IMPL_LINK( SwEnvPrtPage, AlignHdl, ToolBox *, EMPTYARG )
{
if (aAlignBox.GetCurItemId())
{
- for (USHORT i = ITM_HOR_LEFT; i <= ITM_VER_RGHT; i++)
- aAlignBox.CheckItem(i, FALSE);
- aAlignBox.CheckItem(aAlignBox.GetCurItemId(), TRUE);
+ for (sal_uInt16 i = ITM_HOR_LEFT; i <= ITM_VER_RGHT; i++)
+ aAlignBox.CheckItem(i, sal_False);
+ aAlignBox.CheckItem(aAlignBox.GetCurItemId(), sal_True);
}
else
{
// GetCurItemId() == 0 ist moeglich!
const SwEnvItem& rItem = (const SwEnvItem&) GetItemSet().Get(FN_ENVELOP);
- aAlignBox.CheckItem((USHORT) rItem.eAlign + ITM_HOR_LEFT, TRUE);
+ aAlignBox.CheckItem((sal_uInt16) rItem.eAlign + ITM_HOR_LEFT, sal_True);
}
return 0;
}
@@ -207,8 +207,8 @@ int SwEnvPrtPage::DeactivatePage(SfxItemSet* _pSet)
void SwEnvPrtPage::FillItem(SwEnvItem& rItem)
{
- USHORT nID = 0;
- for (USHORT i = ITM_HOR_LEFT; i <= ITM_VER_RGHT && !nID; i++)
+ sal_uInt16 nID = 0;
+ for (sal_uInt16 i = ITM_HOR_LEFT; i <= ITM_VER_RGHT && !nID; i++)
if (aAlignBox.IsItemChecked(i))
nID = i;
@@ -222,11 +222,11 @@ void SwEnvPrtPage::FillItem(SwEnvItem& rItem)
-BOOL SwEnvPrtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwEnvPrtPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(GetParent()->aEnvItem);
rSet.Put(GetParent()->aEnvItem);
- return TRUE;
+ return sal_True;
}
// ----------------------------------------------------------------------------
@@ -240,7 +240,7 @@ void SwEnvPrtPage::Reset(const SfxItemSet& rSet)
// Item auslesen
const SwEnvItem& rItem = (const SwEnvItem&) rSet.Get(FN_ENVELOP);
- aAlignBox.CheckItem((USHORT) rItem.eAlign + ITM_HOR_LEFT);
+ aAlignBox.CheckItem((sal_uInt16) rItem.eAlign + ITM_HOR_LEFT);
if (rItem.bPrintFromAbove)
aTopButton .Check();
diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx
index 4c2c14fb5cd6..afc7127c2702 100644
--- a/sw/source/ui/envelp/envprt.hxx
+++ b/sw/source/ui/envelp/envprt.hxx
@@ -83,7 +83,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwEnvItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
inline void SetPrt(Printer* pPrinter) { pPrt = pPrinter; }
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index c18e5587445f..cacd61a83434 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -472,17 +472,17 @@ IMPL_LINK( SwLabPage, MakeHdl, ListBox *, EMPTYARG )
for ( sal_uInt16 i = 0; i < nCount; ++i )
{
const String aType ( GetParent()->Recs()[i]->aType );
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
if ( GetParent()->Recs()[i]->aType == sCustom )
{
- bInsert = TRUE;
+ bInsert = sal_True;
aTypeBox.InsertEntry(aType );
}
else if ( GetParent()->Recs()[i]->bCont == bCont )
{
if ( aHiddenSortTypeBox.GetEntryPos(aType) == LISTBOX_ENTRY_NOTFOUND )
{
- bInsert = TRUE;
+ bInsert = sal_True;
aHiddenSortTypeBox.InsertEntry( aType );
}
}
@@ -524,7 +524,7 @@ IMPL_LINK_INLINE_END( SwLabPage, TypeHdl, ListBox *, EMPTYARG )
void SwLabPage::DisplayFormat()
{
MetricField aField(this, WinBits(0));
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aField, aMetric);
aField.SetDecimalDigits(2);
aField.SetMin (0);
diff --git a/sw/source/ui/envelp/labelcfg.cxx b/sw/source/ui/envelp/labelcfg.cxx
index 7b906c0ae6bf..d9981dced2e9 100644
--- a/sw/source/ui/envelp/labelcfg.cxx
+++ b/sw/source/ui/envelp/labelcfg.cxx
@@ -99,8 +99,8 @@ SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufactur
//continuous flag ('C'/'S')
pValues[nProp] >>= sTmp;
String sMeasure(sTmp);
- USHORT nTokenCount = sMeasure.GetTokenCount(';');
- for(USHORT i = 0; i < nTokenCount; i++)
+ sal_uInt16 nTokenCount = sMeasure.GetTokenCount(';');
+ for(sal_uInt16 i = 0; i < nTokenCount; i++)
{
String sToken(sMeasure.GetToken(i, ';' ));
int nVal = sToken.ToInt32();
diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx
index 22e281cfcef7..7af41110fff8 100644
--- a/sw/source/ui/envelp/labelexp.cxx
+++ b/sw/source/ui/envelp/labelexp.cxx
@@ -185,7 +185,7 @@ IMPL_LINK( SwVisitingCardPage, AutoTextSelectHdl, void*, pBox )
aBlockNames.getConstArray() );
}
if(pExampleFrame->IsInitialized())
- pExampleFrame->ClearDocument( TRUE );
+ pExampleFrame->ClearDocument( sal_True );
}
return 0;
}
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index c39daed1729e..a4ed05353058 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -54,7 +54,7 @@ using namespace ::com::sun::star::beans;
// #define ------------------------------------------------------------------
-#define ROUND(x) ((USHORT) ((x) + .5))
+#define ROUND(x) ((sal_uInt16) ((x) + .5))
// --------------------------------------------------------------------------
SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
@@ -79,7 +79,7 @@ SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
SetBackground(Wallpaper(rWinColor));
Font aFont = GetFont();
- aFont.SetTransparent(TRUE);
+ aFont.SetTransparent(sal_True);
aFont.SetWeight (WEIGHT_NORMAL);
SetFont(aFont);
@@ -127,7 +127,7 @@ void SwLabPreview::Paint(const Rectangle &)
SetLineColor(rWinColor);
SetFillColor(aGrayColor);
Font aPaintFont(GetFont());
- aPaintFont.SetTransparent(FALSE);
+ aPaintFont.SetTransparent(sal_False);
SetFont(aPaintFont);
// Groesse des darzustellenden Bereichs
@@ -175,8 +175,8 @@ void SwLabPreview::Paint(const Rectangle &)
// Etiketten
SetClipRegion (Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH)));
SetFillColor(rWinColor);
- for (USHORT nRow = 0; nRow < Min((USHORT) 2, (USHORT) aItem.nRows); nRow++)
- for (USHORT nCol = 0; nCol < Min((USHORT) 2, (USHORT) aItem.nCols); nCol++)
+ for (sal_uInt16 nRow = 0; nRow < Min((sal_uInt16) 2, (sal_uInt16) aItem.nRows); nRow++)
+ for (sal_uInt16 nCol = 0; nCol < Min((sal_uInt16) 2, (sal_uInt16) aItem.nCols); nCol++)
DrawRect(Rectangle(
Point(ROUND(lX0 + f * (aItem.lLeft + nCol * aItem.lHDist)),
ROUND(lY0 + f * (aItem.lUpper + nRow * aItem.lVDist))),
@@ -188,15 +188,15 @@ void SwLabPreview::Paint(const Rectangle &)
if (aItem.lLeft)
{
long lX = (lX0 + lX1) / 2;
- DrawArrow(Point(lX0, lY0 - 5), Point(lX1, lY0 - 5), FALSE);
- DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), TRUE);
+ DrawArrow(Point(lX0, lY0 - 5), Point(lX1, lY0 - 5), sal_False);
+ DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), sal_True);
DrawText(Point(lX1 - lLeftWidth, lY0 - 10 - lXHeight), aLeftStr);
}
// Beschriftung: Rand oben
if (aItem.lUpper)
{
- DrawArrow(Point(lX0 - 5, lY0), Point(lX0 - 5, lY1), FALSE);
+ DrawArrow(Point(lX0 - 5, lY0), Point(lX0 - 5, lY1), sal_False);
DrawText(Point(lX0 - 10 - lUpperWidth, ROUND(lY0 + f * aItem.lUpper / 2 - lXHeight / 2)), aUpperStr);
}
@@ -216,29 +216,29 @@ void SwLabPreview::Paint(const Rectangle &)
if (aItem.nCols > 1)
{
long lX = (lX1 + lX3) / 2;
- DrawArrow(Point(lX1, lY0 - 5), Point(lX3, lY0 - 5), FALSE);
- DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), TRUE);
+ DrawArrow(Point(lX1, lY0 - 5), Point(lX3, lY0 - 5), sal_False);
+ DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), sal_True);
DrawText(Point(lX - lHDistWidth / 2, lY0 - 10 - lXHeight), aHDistStr);
}
// Beschriftung: Vertikaler Abstand
if (aItem.nRows > 1)
{
- DrawArrow(Point(lX0 - 5, lY1), Point(lX0 - 5, lY3), FALSE);
+ DrawArrow(Point(lX0 - 5, lY1), Point(lX0 - 5, lY3), sal_False);
DrawText(Point(lX0 - 10 - lVDistWidth, ROUND(lY1 + f * aItem.lVDist / 2 - lXHeight / 2)), aVDistStr);
}
// Beschriftung: Spalten
{
long lY = lY0 + lOutlineH + 4;
- DrawArrow(Point(lX0, lY), Point(lX0 + lOutlineW - 1, lY), TRUE);
+ DrawArrow(Point(lX0, lY), Point(lX0 + lOutlineW - 1, lY), sal_True);
DrawText(Point((lX0 + lX0 + lOutlineW - 1) / 2 - lColsWidth / 2, lY + 5), aColsStr);
}
// Beschriftung: Zeilen
{
long lX = lX0 + lOutlineW + 4;
- DrawArrow(Point(lX, lY0), Point(lX, lY0 + lOutlineH - 1), TRUE);
+ DrawArrow(Point(lX, lY0), Point(lX, lY0 + lOutlineH - 1), sal_True);
DrawText(Point(lX + 5, (lY0 + lY0 + lOutlineH - 1 - lXHeight / 2) / 2), aRowsStr);
}
}
@@ -247,7 +247,7 @@ void SwLabPreview::Paint(const Rectangle &)
-void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, BOOL bArrow)
+void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, sal_Bool bArrow)
{
DrawLine(rP1, rP2);
@@ -334,14 +334,14 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
aRowsText (this, SW_RES(TXT_ROWS )),
aRowsField (this, SW_RES(FLD_ROWS )),
aSavePB (this, SW_RES(PB_SAVE )),
- bModified(FALSE),
+ bModified(sal_False),
aItem ((const SwLabItem&) rSet.Get(FN_LABEL))
{
FreeResource();
SetExchangeSupport();
// Metriken
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aHDistField , aMetric);
SetMetric(aVDistField , aMetric);
SetMetric(aWidthField , aMetric);
@@ -390,7 +390,7 @@ SwLabFmtPage::~SwLabFmtPage()
IMPL_LINK_INLINE_START( SwLabFmtPage, ModifyHdl, Edit *, EMPTYARG )
{
- bModified = TRUE;
+ bModified = sal_True;
aPreviewTimer.Start();
return 0;
}
@@ -515,7 +515,7 @@ int SwLabFmtPage::DeactivatePage(SfxItemSet* _pSet)
if (_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------------
@@ -535,8 +535,8 @@ void SwLabFmtPage::FillItem(SwLabItem& rItem)
rItem.lHeight = rRec.lHeight = static_cast< long >(GETFLDVAL(aHeightField));
rItem.lLeft = rRec.lLeft = static_cast< long >(GETFLDVAL(aLeftField ));
rItem.lUpper = rRec.lUpper = static_cast< long >(GETFLDVAL(aUpperField ));
- rItem.nCols = rRec.nCols = (USHORT) aColsField.GetValue();
- rItem.nRows = rRec.nRows = (USHORT) aRowsField.GetValue();
+ rItem.nCols = rRec.nCols = (sal_uInt16) aColsField.GetValue();
+ rItem.nRows = rRec.nRows = (sal_uInt16) aRowsField.GetValue();
}
}
@@ -544,12 +544,12 @@ void SwLabFmtPage::FillItem(SwLabItem& rItem)
-BOOL SwLabFmtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwLabFmtPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(aItem);
rSet.Put(aItem);
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------------
@@ -594,18 +594,18 @@ IMPL_LINK( SwLabFmtPage, SaveHdl, PushButton *, EMPTYARG )
aRec.lHeight = static_cast< long >(GETFLDVAL(aHeightField));
aRec.lLeft = static_cast< long >(GETFLDVAL(aLeftField ));
aRec.lUpper = static_cast< long >(GETFLDVAL(aUpperField ));
- aRec.nCols = (USHORT) aColsField.GetValue();
- aRec.nRows = (USHORT) aRowsField.GetValue();
+ aRec.nCols = (sal_uInt16) aColsField.GetValue();
+ aRec.nRows = (sal_uInt16) aRowsField.GetValue();
aRec.bCont = aItem.bCont;
SwSaveLabelDlg* pSaveDlg = new SwSaveLabelDlg(this, aRec);
pSaveDlg->SetLabel(aItem.aLstMake, aItem.aLstType);
pSaveDlg->Execute();
if(pSaveDlg->GetLabel(aItem))
{
- bModified = FALSE;
+ bModified = sal_False;
const Sequence<OUString>& rMan = GetParent()->GetLabelsConfig().GetManufacturers();
SvStringsDtor& rMakes = GetParent()->Makes();
- if(rMakes.Count() < (USHORT)rMan.getLength())
+ if(rMakes.Count() < (sal_uInt16)rMan.getLength())
{
rMakes.DeleteAndDestroy(0, rMakes.Count());
const OUString* pMan = rMan.getConstArray();
diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx
index ebe7ab46dc81..5b503c5da054 100644
--- a/sw/source/ui/envelp/labfmt.hxx
+++ b/sw/source/ui/envelp/labfmt.hxx
@@ -66,7 +66,7 @@ class SwLabPreview : public Window
void Paint(const Rectangle&);
- void DrawArrow(const Point& rP1, const Point& rP2, BOOL bArrow);
+ void DrawArrow(const Point& rP1, const Point& rP2, sal_Bool bArrow);
using Window::GetParent;
SwLabFmtPage* GetParent() {return (SwLabFmtPage*) Window::GetParent();}
@@ -107,7 +107,7 @@ class SwLabFmtPage : public SfxTabPage
PushButton aSavePB;
Timer aPreviewTimer;
- BOOL bModified;
+ sal_Bool bModified;
SwLabItem aItem;
@@ -132,7 +132,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwLabItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
SwLabDlg* GetParent() {return (SwLabDlg*) SfxTabPage::GetParent()->GetParent();}
diff --git a/sw/source/ui/envelp/labimg.cxx b/sw/source/ui/envelp/labimg.cxx
index 0be179372ca5..88f78f950b3c 100644
--- a/sw/source/ui/envelp/labimg.cxx
+++ b/sw/source/ui/envelp/labimg.cxx
@@ -59,8 +59,8 @@ SwLabItem::SwLabItem() :
nCol (1),
nRow (1)
{
- bAddr = bCont = bSynchron = FALSE;
- bPage = TRUE;
+ bAddr = bCont = bSynchron = sal_False;
+ bPage = sal_True;
lHDist =
lVDist =
lWidth =
@@ -400,7 +400,7 @@ SwLabCfgItem::SwLabCfgItem(sal_Bool bLabel) :
aItem.aCompFax = aItem.aPrivFax = rUserOpt.GetFax();
aItem.aCompMail = aItem.aPrivMail = rUserOpt.GetEmail();
aItem.aCompState = aItem.aPrivState = rUserOpt.GetState();
- aItem.bSynchron = TRUE;
+ aItem.bSynchron = sal_True;
SetModified();
}
}
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index 633e40a5d146..2639109b8079 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -125,7 +125,7 @@ IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton )
aPrinterInfo.SetText(pPrinter->GetName());
return 0;
}
- const BOOL bEnable = pButton == &aSingleButton;
+ const sal_Bool bEnable = pButton == &aSingleButton;
aColText .Enable(bEnable);
aColField.Enable(bEnable);
aRowText .Enable(bEnable);
@@ -168,7 +168,7 @@ int SwLabPrtPage::DeactivatePage(SfxItemSet* _pSet)
if ( _pSet )
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------------
@@ -178,8 +178,8 @@ int SwLabPrtPage::DeactivatePage(SfxItemSet* _pSet)
void SwLabPrtPage::FillItem(SwLabItem& rItem)
{
rItem.bPage = aPageButton.IsChecked();
- rItem.nCol = (USHORT) aColField.GetValue();
- rItem.nRow = (USHORT) aRowField.GetValue();
+ rItem.nCol = (sal_uInt16) aColField.GetValue();
+ rItem.nRow = (sal_uInt16) aRowField.GetValue();
rItem.bSynchron = aSynchronCB.IsChecked() && aSynchronCB.IsEnabled();
}
@@ -187,14 +187,14 @@ void SwLabPrtPage::FillItem(SwLabItem& rItem)
-BOOL SwLabPrtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwLabPrtPage::FillItemSet(SfxItemSet& rSet)
{
SwLabItem aItem;
GetParent()->GetLabItem(aItem);
FillItem(aItem);
rSet.Put(aItem);
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------------
diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx
index 1f8ff491423d..4fd8d163ac36 100644
--- a/sw/source/ui/envelp/labprt.hxx
+++ b/sw/source/ui/envelp/labprt.hxx
@@ -76,7 +76,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwLabItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
inline Printer* GetPrt() { return (pPrinter); }
};
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 43ef58b11d7c..709fe09cd21e 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -226,16 +226,16 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
FreeResource();
aSingleJobsCB.Show(sal_False); // not supported in since cws printerpullpages anymore
//task #97066# mailing of form letters is currently not supported
- aMailingRB.Show(FALSE);
- aSubjectFT.Show(FALSE);
- aSubjectED.Show(FALSE);
- aFormatFT.Show(FALSE);
- aFormatSwCB.Show(FALSE);
- aFormatHtmlCB.Show(FALSE);
- aFormatRtfCB.Show(FALSE);
- aAttachFT.Show(FALSE);
- aAttachED.Show(FALSE);
- aAttachPB.Show(FALSE);
+ aMailingRB.Show(sal_False);
+ aSubjectFT.Show(sal_False);
+ aSubjectED.Show(sal_False);
+ aFormatFT.Show(sal_False);
+ aFormatSwCB.Show(sal_False);
+ aFormatHtmlCB.Show(sal_False);
+ aFormatRtfCB.Show(sal_False);
+ aAttachFT.Show(sal_False);
+ aAttachED.Show(sal_False);
+ aAttachPB.Show(sal_False);
Point aMailPos = aMailingRB.GetPosPixel();
Point aFilePos = aFileRB.GetPosPixel();
@@ -247,7 +247,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
m_aSelection = *pSelection;
//move all controls
long nDiff = aRecordFL.GetPosPixel().Y() - pBeamerWin->GetPosPixel().Y();
- pBeamerWin->Show(FALSE);
+ pBeamerWin->Show(sal_False);
::Size aSize = GetSizePixel();
aSize.Height() -= nDiff;
SetSizePixel(aSize);
@@ -352,7 +352,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
aFormatHtmlCB.Check((nMailingMode & TXTFORMAT_HTML) != 0);
aFormatRtfCB.Check((nMailingMode & TXTFORMAT_RTF) != 0);
- aAllRB.Check(TRUE);
+ aAllRB.Check(sal_True);
// Handler installieren
Link aLk = LINK(this, SwMailMergeDlg, ButtonHdl);
@@ -373,7 +373,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
aLk = LINK(this, SwMailMergeDlg, FilenameHdl);
aGenerateFromDataBaseCB.SetClickHdl( aLk );
- BOOL bColumn = pModOpt->IsNameFromColumn();
+ sal_Bool bColumn = pModOpt->IsNameFromColumn();
if(bColumn)
aGenerateFromDataBaseCB.Check();
@@ -395,7 +395,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
pNewDBMgr->GetColumnNames(&aAddressFldLB, _xConnection, rTableName);
else
pNewDBMgr->GetColumnNames(&aAddressFldLB, rDBName, rTableName);
- for(USHORT nEntry = 0; nEntry < aAddressFldLB.GetEntryCount(); nEntry++)
+ for(sal_uInt16 nEntry = 0; nEntry < aAddressFldLB.GetEntryCount(); nEntry++)
aColumnLB.InsertEntry(aAddressFldLB.GetEntry(nEntry));
aAddressFldLB.SelectEntry(C2S("EMAIL"));
@@ -424,14 +424,14 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
if (aColumnLB.GetSelectEntryCount() == 0)
aColumnLB.SelectEntryPos(0);
- const BOOL bEnable = m_aSelection.getLength() != 0;
+ const sal_Bool bEnable = m_aSelection.getLength() != 0;
aMarkedRB.Enable(bEnable);
if (bEnable)
aMarkedRB.Check();
else
{
aAllRB.Check();
- aMarkedRB.Enable(FALSE);
+ aMarkedRB.Enable(sal_False);
}
SetMinOutputSizePixel(m_aDialogSize);
try
@@ -448,7 +448,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
const ::rtl::OUString sName = OUString::createFromAscii("Name");
const ::rtl::OUString sFlags = OUString::createFromAscii("Flags");
const ::rtl::OUString sUIName = OUString::createFromAscii("UIName");
- USHORT nODT = USHRT_MAX;
+ sal_uInt16 nODT = USHRT_MAX;
while(xList->hasMoreElements())
{
comphelper::SequenceAsHashMap aFilter(xList->nextElement());
@@ -469,7 +469,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
}
if( sUIName2.getLength() )
{
- USHORT nFilter = aFilterLB.InsertEntry( sUIName2 );
+ sal_uInt16 nFilter = aFilterLB.InsertEntry( sUIName2 );
if( 0 == sFilter.compareToAscii("writer8") )
nODT = nFilter;
aFilterLB.SetEntryData( nFilter, new ::rtl::OUString( sFilter ) );
@@ -496,7 +496,7 @@ SwMailMergeDlg::~SwMailMergeDlg()
else
delete pBeamerWin;
- for( USHORT nFilter = 0; nFilter < aFilterLB.GetEntryCount(); ++nFilter )
+ for( sal_uInt16 nFilter = 0; nFilter < aFilterLB.GetEntryCount(); ++nFilter )
{
::rtl::OUString* pData = reinterpret_cast< ::rtl::OUString* >( aFilterLB.GetEntryData(nFilter) );
delete pData;
@@ -684,7 +684,7 @@ IMPL_LINK( SwMailMergeDlg, SaveTypeHdl, RadioButton*, pBtn )
IMPL_LINK( SwMailMergeDlg, FilenameHdl, CheckBox*, pBox )
{
- BOOL bEnable = pBox->IsChecked();
+ sal_Bool bEnable = pBox->IsChecked();
aColumnFT.Enable( bEnable );
aColumnLB.Enable(bEnable);
aPathFT.Enable( bEnable );
@@ -728,7 +728,7 @@ bool SwMailMergeDlg::ExecQryShell()
}
else
{
- nMergeType = static_cast< USHORT >( aSaveSingleDocRB.IsChecked() ?
+ nMergeType = static_cast< sal_uInt16 >( aSaveSingleDocRB.IsChecked() ?
DBMGR_MERGE_SINGLE_FILE : DBMGR_MERGE_MAILFILES );
SfxMedium* pMedium = rSh.GetView().GetDocShell()->GetMedium();
INetURLObject aAbs;
@@ -804,7 +804,7 @@ bool SwMailMergeDlg::ExecQryShell()
}
}
}
- SwPrintData aPrtData = *SW_MOD()->GetPrtOptions(FALSE);
+ SwPrintData aPrtData = *SW_MOD()->GetPrtOptions(sal_False);
IDocumentDeviceAccess* pIDDA = rSh.getIDocumentDeviceAccess();
SwPrintData* pShellPrintData = pIDDA->getPrintData();
if(pShellPrintData)
@@ -814,7 +814,7 @@ bool SwMailMergeDlg::ExecQryShell()
pModOpt->SetSinglePrintJob(aSingleJobsCB.IsChecked());
- BYTE nMailingMode = 0;
+ sal_uInt8 nMailingMode = 0;
if (aFormatSwCB.IsChecked())
nMailingMode |= TXTFORMAT_OFFICE;
diff --git a/sw/source/ui/envelp/syncbtn.cxx b/sw/source/ui/envelp/syncbtn.cxx
index a0e7c0ac659e..d0b43dd2efc5 100644
--- a/sw/source/ui/envelp/syncbtn.cxx
+++ b/sw/source/ui/envelp/syncbtn.cxx
@@ -51,7 +51,7 @@ SFX_IMPL_FLOATINGWINDOW( SwSyncChildWin, FN_SYNC_LABELS )
------------------------------------------------------------------------*/
SwSyncChildWin::SwSyncChildWin( Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( _pParent, nId )
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx
index 1d3fafa880a1..0379059682e8 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx
@@ -49,7 +49,7 @@ using namespace ::com::sun::star;
--------------------------------------------------------------------*/
sw::DropDownFieldDialog::DropDownFieldDialog( Window *pParent, SwWrtShell &rS,
- SwField* pField, BOOL bNextButton ) :
+ SwField* pField, sal_Bool bNextButton ) :
SvxStandardDialog(pParent, SW_RES(DLG_FLD_DROPDOWN)),
aItemsFL( this, SW_RES( FL_ITEMS )),
@@ -93,7 +93,7 @@ sw::DropDownFieldDialog::DropDownFieldDialog( Window *pParent, SwWrtShell &rS,
aListItemsLB.SelectEntry(pDropField->GetSelectedItem());
}
- BOOL bEnable = !rSh.IsCrsrReadonly();
+ sal_Bool bEnable = !rSh.IsCrsrReadonly();
aOKPB.Enable( bEnable );
aListItemsLB.GrabFocus();
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index a08e717f6948..cbd24bf1c498 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -166,12 +166,12 @@ void SwChangeDBDlg::FillDBPopup()
SvStringsDtor aDBNameList(5, 1);
pSh->GetAllUsedDB( aDBNameList, &aAllDBNames );
- USHORT nCount = aDBNameList.Count();
+ sal_uInt16 nCount = aDBNameList.Count();
aUsedDBTLB.Clear();
SvLBoxEntry *pFirst = 0;
SvLBoxEntry *pLast = 0;
- for (USHORT k = 0; k < nCount; k++)
+ for (sal_uInt16 k = 0; k < nCount; k++)
{
sDBName = *aDBNameList.GetObject(k);
sDBName = sDBName.GetToken(0);
@@ -201,8 +201,8 @@ SvLBoxEntry* SwChangeDBDlg::Insert(const String& rDBName)
SvLBoxEntry* pParent;
SvLBoxEntry* pChild;
- USHORT nParent = 0;
- USHORT nChild = 0;
+ sal_uInt16 nParent = 0;
+ sal_uInt16 nChild = 0;
Image aTableImg = aImageList.GetImage(IMG_DBTABLE);
Image aDBImg = aImageList.GetImage(IMG_DB);
@@ -259,7 +259,7 @@ void __EXPORT SwChangeDBDlg::Apply()
--------------------------------------------------------------------*/
void SwChangeDBDlg::UpdateFlds()
{
- SvStringsDtor aDBNames( (BYTE)aUsedDBTLB.GetSelectionCount(), 1 );
+ SvStringsDtor aDBNames( (sal_uInt8)aUsedDBTLB.GetSelectionCount(), 1 );
SvLBoxEntry* pEntry = aUsedDBTLB.FirstSelected();
while( pEntry )
@@ -271,7 +271,7 @@ void SwChangeDBDlg::UpdateFlds()
*pTmp += DB_DELIM;
*pTmp += aUsedDBTLB.GetEntryText( pEntry );
*pTmp += DB_DELIM;
- int nCommandType = (int)(ULONG)pEntry->GetUserData();
+ int nCommandType = (int)(sal_uLong)pEntry->GetUserData();
*pTmp += String::CreateFromInt32(nCommandType);
aDBNames.Insert(pTmp, aDBNames.Count() );
}
@@ -317,14 +317,14 @@ IMPL_LINK( SwChangeDBDlg, ButtonHdl, Button *, EMPTYARG )
IMPL_LINK( SwChangeDBDlg, TreeSelectHdl, SvTreeListBox *, EMPTYARG )
{
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
SvLBoxEntry* pEntry = aAvailDBTLB.GetCurEntry();
if (pEntry)
{
if (aAvailDBTLB.GetParent(pEntry))
- bEnable = TRUE;
+ bEnable = sal_True;
aOKBT.Enable( bEnable );
}
return 0;
@@ -341,7 +341,7 @@ void SwChangeDBDlg::ShowDBName(const SwDBData& rDBData)
sTmp += '.';
sTmp += (String)rDBData.sCommand;
- for (USHORT i = 0; i < sTmp.Len(); i++)
+ for (sal_uInt16 i = 0; i < sTmp.Len(); i++)
{
sName += sTmp.GetChar(i);
if (sTmp.GetChar(i) == '~')
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 3c67cdb6afe7..44fd4bc213ee 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -71,7 +71,7 @@ SwFldDBPage::SwFldDBPage(Window* pParent, const SfxItemSet& rCoreSet ) :
aTypeFT (this, SW_RES(FT_DBTYPE)),
aTypeLB (this, SW_RES(LB_DBTYPE)),
aSelectionFT(this, SW_RES(FT_DBSELECTION)),
- aDatabaseTLB(this, SW_RES(TLB_DBLIST), 0, aEmptyStr, FALSE),
+ aDatabaseTLB(this, SW_RES(TLB_DBLIST), 0, aEmptyStr, sal_False),
aAddDBFT(this, SW_RES(FT_ADDDB)),
aAddDBPB(this, SW_RES(PB_ADDDB)),
aConditionFT(this, SW_RES(FT_DBCONDITION)),
@@ -113,13 +113,13 @@ void __EXPORT SwFldDBPage::Reset(const SfxItemSet&)
{
Init(); // Allgemeine initialisierung
- aTypeLB.SetUpdateMode(FALSE);
- USHORT nOldPos = aTypeLB.GetSelectEntryPos();
+ aTypeLB.SetUpdateMode(sal_False);
+ sal_uInt16 nOldPos = aTypeLB.GetSelectEntryPos();
sOldDBName = aDatabaseTLB.GetDBName(sOldTableName, sOldColumnName);
aTypeLB.Clear();
- USHORT nPos, nTypeId, i;
+ sal_uInt16 nPos, nTypeId, i;
if (!IsFldEdit())
{
@@ -146,11 +146,11 @@ void __EXPORT SwFldDBPage::Reset(const SfxItemSet&)
aFormatLB.Clear();
- USHORT nSize = GetFldMgr().GetFormatCount(TYP_DBSETNUMBERFLD, FALSE, IsFldDlgHtmlMode());
+ sal_uInt16 nSize = GetFldMgr().GetFormatCount(TYP_DBSETNUMBERFLD, sal_False, IsFldDlgHtmlMode());
for( i = 0; i < nSize; ++i )
{
- USHORT nEntryPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(TYP_DBSETNUMBERFLD, i));
- USHORT nFmtId = GetFldMgr().GetFormatId( TYP_DBSETNUMBERFLD, i );
+ sal_uInt16 nEntryPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(TYP_DBSETNUMBERFLD, i));
+ sal_uInt16 nFmtId = GetFldMgr().GetFormatId( TYP_DBSETNUMBERFLD, i );
aFormatLB.SetEntryData( nEntryPos, reinterpret_cast<void*>(nFmtId) );
if( SVX_NUM_ARABIC == nFmtId )
aFormatLB.SelectEntryPos( nEntryPos );
@@ -184,11 +184,11 @@ void __EXPORT SwFldDBPage::Reset(const SfxItemSet&)
if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = (USHORT)sVal.ToInt32();
+ sal_uInt16 nVal = (sal_uInt16)sVal.ToInt32();
if(nVal != USHRT_MAX)
{
for(i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -198,7 +198,7 @@ void __EXPORT SwFldDBPage::Reset(const SfxItemSet&)
}
TypeHdl(0);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
aTypeLB.SetSelectHdl(LINK(this, SwFldDBPage, TypeHdl));
aTypeLB.SetDoubleClickHdl(LINK(this, SwFldDBPage, InsertHdl));
@@ -216,7 +216,7 @@ void __EXPORT SwFldDBPage::Reset(const SfxItemSet&)
Beschreibung:
--------------------------------------------------------------------*/
-BOOL __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& )
+sal_Bool __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& )
{
String sTableName, sColumnName;
SwDBData aData;
@@ -233,11 +233,11 @@ BOOL __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& )
if(aData.sDataSource.getLength()) // Ohne Datenbank kein neuer Feldbefehl
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
String aVal(aValueED.GetText());
String aName(aConditionED.GetText());
- ULONG nFormat = 0;
- USHORT nSubType = 0;
+ sal_uLong nFormat = 0;
+ sal_uInt16 nSubType = 0;
String sDBName = aData.sDataSource;
sDBName += DB_DELIM;
@@ -262,7 +262,7 @@ BOOL __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& )
break;
case TYP_DBSETNUMBERFLD:
- nFormat = (USHORT)(ULONG)aFormatLB.GetEntryData(
+ nFormat = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
aFormatLB.GetSelectEntryPos() );
break;
}
@@ -270,7 +270,7 @@ BOOL __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& )
String sTempDBName, sTempTableName, sTempColumnName;
sTempDBName = aDatabaseTLB.GetDBName(sTempTableName, sTempColumnName);
- BOOL bDBListBoxChanged = sOldDBName != sTempDBName ||
+ sal_Bool bDBListBoxChanged = sOldDBName != sTempDBName ||
sOldTableName != sTempTableName || sOldColumnName != sTempColumnName;
if (!IsFldEdit() ||
aConditionED.GetSavedValue() != aConditionED.GetText() ||
@@ -282,7 +282,7 @@ BOOL __EXPORT SwFldDBPage::FillItemSet(SfxItemSet& )
}
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -299,7 +299,7 @@ SfxTabPage* __EXPORT SwFldDBPage::Create( Window* pParent,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldDBPage::GetGroup()
+sal_uInt16 SwFldDBPage::GetGroup()
{
return GRP_DB;
}
@@ -311,7 +311,7 @@ USHORT SwFldDBPage::GetGroup()
IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
{
// Alte ListBoxPos sichern
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// Aktuelle ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -327,8 +327,8 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
SwWrtShell *pSh = GetWrtShell();
if(!pSh)
pSh = ::GetActiveWrtShell();
- BOOL bCond = FALSE, bSetNo = FALSE, bFormat = FALSE, bDBFormat = FALSE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bCond = sal_False, bSetNo = sal_False, bFormat = sal_False, bDBFormat = sal_False;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
aDatabaseTLB.ShowColumns(nTypeId == TYP_DBFLD);
@@ -351,8 +351,8 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
switch (nTypeId)
{
case TYP_DBFLD:
- bFormat = TRUE;
- bDBFormat = TRUE;
+ bFormat = sal_True;
+ bDBFormat = sal_True;
aNumFormatLB.Show();
aFormatLB.Hide();
@@ -372,10 +372,10 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
break;
case TYP_DBNUMSETFLD:
- bSetNo = TRUE;
+ bSetNo = sal_True;
// kein break!
case TYP_DBNEXTSETFLD:
- bCond = TRUE;
+ bCond = sal_True;
if (IsFldEdit())
{
aConditionED.SetText(GetCurField()->GetPar1());
@@ -387,14 +387,14 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
break;
case TYP_DBSETNUMBERFLD:
- bFormat = TRUE;
+ bFormat = sal_True;
aNewFormatRB.Check();
aNumFormatLB.Hide();
aFormatLB.Show();
if( IsFldEdit() )
{
- for( USHORT nI = aFormatLB.GetEntryCount(); nI; )
- if( GetCurField()->GetFormat() == (USHORT)(ULONG)
+ for( sal_uInt16 nI = aFormatLB.GetEntryCount(); nI; )
+ if( GetCurField()->GetFormat() == (sal_uInt16)(sal_uLong)
aFormatLB.GetEntryData( --nI ))
{
aFormatLB.SelectEntryPos( nI );
@@ -422,7 +422,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
aValueED.SetText(aEmptyStr);
if (bCond)
aConditionED.SetText( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "TRUE" )));
+ RTL_CONSTASCII_STRINGPARAM( "sal_True" )));
else
aConditionED.SetText(aEmptyStr);
}
@@ -451,8 +451,8 @@ IMPL_LINK( SwFldDBPage, NumSelectHdl, NumFormatListBox *, pLB )
void SwFldDBPage::CheckInsert()
{
- BOOL bInsert = TRUE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bInsert = sal_True;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
SvLBoxEntry* pEntry = aDatabaseTLB.GetCurEntry();
@@ -466,11 +466,11 @@ void SwFldDBPage::CheckInsert()
bInsert &= pEntry != 0;
}
else
- bInsert = FALSE;
+ bInsert = sal_False;
if (nTypeId == TYP_DBNUMSETFLD)
{
- BOOL bHasValue = aValueED.GetText().Len() != 0;
+ sal_Bool bHasValue = aValueED.GetText().Len() != 0;
bInsert &= bHasValue;
}
@@ -488,7 +488,7 @@ IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox )
SvLBoxEntry* pEntry = pColEntry = pBox->GetCurEntry();
if (pEntry)
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
pEntry = aDatabaseTLB.GetParent(pEntry);
@@ -499,13 +499,13 @@ IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox )
if (nTypeId == TYP_DBFLD)
{
- BOOL bNumFormat = FALSE;
+ sal_Bool bNumFormat = sal_False;
if (pEntry != 0)
{
String sTableName;
String sColumnName;
- BOOL bIsTable;
+ sal_Bool bIsTable;
String sDBName = aDatabaseTLB.GetDBName(sTableName, sColumnName, &bIsTable);
bNumFormat = GetFldMgr().IsDBNumeric(sDBName,
sTableName,
@@ -554,12 +554,12 @@ void SwFldDBPage::FillUserData()
String sData( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = (USHORT)(ULONG)aTypeLB.GetEntryData( nTypeSel );
+ nTypeSel = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData( nTypeSel );
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
@@ -568,7 +568,7 @@ void SwFldDBPage::FillUserData()
* --------------------------------------------------*/
void SwFldDBPage::ActivateMailMergeAddress()
{
- ULONG nData = TYP_DBFLD;
+ sal_uLong nData = TYP_DBFLD;
aTypeLB.SelectEntryPos(aTypeLB.GetEntryPos( (const void*) nData ));
aTypeLB.GetSelectHdl().Call(&aTypeLB);
const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource();
diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx
index 2472031777a1..8f93d97f8b16 100644
--- a/sw/source/ui/fldui/flddb.hxx
+++ b/sw/source/ui/fldui/flddb.hxx
@@ -68,8 +68,8 @@ class SwFldDBPage : public SwFldPage
String sOldDBName;
String sOldTableName;
String sOldColumnName;
- ULONG nOldFormat;
- USHORT nOldSubType;
+ sal_uLong nOldFormat;
+ sal_uInt16 nOldSubType;
Link aOldNumSelectHdl;
DECL_LINK( TypeHdl, ListBox* );
@@ -83,7 +83,7 @@ class SwFldDBPage : public SwFldPage
using SwFldPage::SetWrtShell;
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldDBPage(Window* pParent, const SfxItemSet& rSet);
@@ -92,7 +92,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 1fd345c832d4..549593bc3496 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -96,9 +96,9 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
aTypeTLB.SetNodeDefaultImages();
//enable 'active' language selection
- aFormatLB.SetShowLanguageControl(TRUE);
+ aFormatLB.SetShowLanguageControl(sal_True);
- SFX_ITEMSET_ARG( &rCoreSet, pItem, SfxUnoAnyItem, SID_DOCINFO, FALSE );
+ SFX_ITEMSET_ARG( &rCoreSet, pItem, SfxUnoAnyItem, SID_DOCINFO, sal_False );
if ( pItem )
pItem->GetValue() >>= xCustomPropertySet;
}
@@ -120,17 +120,17 @@ void __EXPORT SwFldDokInfPage::Reset(const SfxItemSet& )
Init(); // Allgemeine initialisierung
// TypeListBox initialisieren
- aTypeTLB.SetUpdateMode(FALSE);
+ aTypeTLB.SetUpdateMode(sal_False);
aTypeTLB.Clear();
pSelEntry = 0;
// SubTypes in der TypeLB anzeigen
- USHORT nTypeId = TYP_DOCINFOFLD;
+ sal_uInt16 nTypeId = TYP_DOCINFOFLD;
SvLBoxEntry* pEntry = 0;
SvLBoxEntry* pInfo = 0;
- USHORT nSubType = USHRT_MAX;
+ sal_uInt16 nSubType = USHRT_MAX;
if (IsFldEdit())
{
const SwField* pCurField = GetCurField();
@@ -149,17 +149,17 @@ void __EXPORT SwFldDokInfPage::Reset(const SfxItemSet& )
}
}
- USHORT nSelEntryData = USHRT_MAX;
+ sal_uInt16 nSelEntryData = USHRT_MAX;
String sUserData = GetUserData();
if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- nSelEntryData = static_cast< USHORT >(sVal.ToInt32());
+ nSelEntryData = static_cast< sal_uInt16 >(sVal.ToInt32());
}
SvStringsDtor aLst;
GetFldMgr().GetSubTypes(nTypeId, aLst);
- for (USHORT i = 0; i < aLst.Count(); ++i)
+ for (sal_uInt16 i = 0; i < aLst.Count(); ++i)
{
if (!IsFldEdit() || nSubType == i)
{
@@ -210,19 +210,19 @@ void __EXPORT SwFldDokInfPage::Reset(const SfxItemSet& )
if (pSelEntry != 0)
{
aTypeTLB.Select(pSelEntry);
- nSubType = (USHORT)(ULONG)pSelEntry->GetUserData();
+ nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
}
else if ( aTypeTLB.GetEntry(0) )
{
pSelEntry = aTypeTLB.GetEntry(0);
- nSubType = (USHORT)(ULONG)pSelEntry->GetUserData();
+ nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
}
FillSelectionLB(nSubType);
if ( pSelEntry )
TypeHdl();
- aTypeTLB.SetUpdateMode(TRUE);
+ aTypeTLB.SetUpdateMode(sal_True);
aTypeTLB.SetSelectHdl(LINK(this, SwFldDokInfPage, TypeHdl));
aTypeTLB.SetDoubleClickHdl(LINK(this, SwFldDokInfPage, InsertHdl));
aSelectionLB.SetSelectHdl(LINK(this, SwFldDokInfPage, SubTypeHdl));
@@ -257,7 +257,7 @@ IMPL_LINK( SwFldDokInfPage, TypeHdl, ListBox *, EMPTYARG )
else
if (pOldEntry != pSelEntry)
- FillSelectionLB((USHORT)(ULONG)pSelEntry->GetUserData());
+ FillSelectionLB((sal_uInt16)(sal_uLong)pSelEntry->GetUserData());
SubTypeHdl();
@@ -269,10 +269,10 @@ IMPL_LINK( SwFldDokInfPage, TypeHdl, ListBox *, EMPTYARG )
--------------------------------------------------------------------*/
IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
{
- USHORT nSubType = (USHORT)(ULONG)pSelEntry->GetUserData();
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
- USHORT nExtSubType;
- USHORT nNewType = 0;
+ sal_uInt16 nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nExtSubType;
+ sal_uInt16 nNewType = 0;
if (nSubType != DI_EDIT)
{
@@ -281,8 +281,8 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
if (!aSelectionLB.GetEntryCount())
{
aFormatLB.Clear();
- aFormatLB.Enable(FALSE);
- aFormatFT.Enable(FALSE);
+ aFormatLB.Enable(sal_False);
+ aFormatFT.Enable(sal_False);
if( nSubType == DI_CUSTOM )
{
//find out which type the custom field has - for a start set to DATE format
@@ -314,14 +314,14 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
nPos = 0;
}
- nExtSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nExtSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
}
else
nExtSubType = DI_SUB_TIME;
- USHORT nOldType = 0;
- BOOL bEnable = FALSE;
- BOOL bOneArea = FALSE;
+ sal_uInt16 nOldType = 0;
+ sal_Bool bEnable = sal_False;
+ sal_Bool bOneArea = sal_False;
if (aFormatLB.IsEnabled())
nOldType = aFormatLB.GetFormatType();
@@ -333,12 +333,12 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
case DI_SUB_DATE:
nNewType = NUMBERFORMAT_DATE;
- bOneArea = TRUE;
+ bOneArea = sal_True;
break;
case DI_SUB_TIME:
nNewType = NUMBERFORMAT_TIME;
- bOneArea = TRUE;
+ bOneArea = sal_True;
break;
}
if (!nNewType)
@@ -352,19 +352,19 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
aFormatLB.SetFormatType(nNewType);
aFormatLB.SetOneArea(bOneArea);
}
- bEnable = TRUE;
+ bEnable = sal_True;
}
- ULONG nFormat = IsFldEdit() ? ((SwDocInfoField*)GetCurField())->GetFormat() : 0;
+ sal_uLong nFormat = IsFldEdit() ? ((SwDocInfoField*)GetCurField())->GetFormat() : 0;
- USHORT nOldSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0;
+ sal_uInt16 nOldSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0;
if (IsFldEdit())
{
nPos = aSelectionLB.GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND )
{
- nSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
nOldSubType &= ~DI_SUB_FIXED;
if (nOldSubType == nSubType)
@@ -406,10 +406,10 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType)
+sal_uInt16 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType)
{
// Format-Listbox fuellen
- USHORT nTypeId = TYP_DOCINFOFLD;
+ sal_uInt16 nTypeId = TYP_DOCINFOFLD;
EnableInsert(nSubType != USHRT_MAX);
@@ -418,9 +418,9 @@ USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType)
aSelectionLB.Clear();
- USHORT nSize = 0;
- USHORT nSelPos = USHRT_MAX;
- USHORT nExtSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0;
+ sal_uInt16 nSize = 0;
+ sal_uInt16 nSelPos = USHRT_MAX;
+ sal_uInt16 nExtSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0;
if (IsFldEdit())
{
@@ -434,24 +434,24 @@ USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType)
}
else
{
- nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
- for (USHORT i = 0; i < nSize; i++)
+ nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode());
+ for (sal_uInt16 i = 0; i < nSize; i++)
{
- USHORT nPos = aSelectionLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_uInt16 nPos = aSelectionLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId(nTypeId, i)));
if (IsFldEdit() && i == nExtSubType)
nSelPos = nPos;
}
}
- BOOL bEnable = nSize != 0;
+ sal_Bool bEnable = nSize != 0;
if (nSize)
{
if (!aSelectionLB.GetSelectEntryCount())
aSelectionLB.SelectEntryPos(nSelPos == USHRT_MAX ? 0 : nSelPos);
- bEnable = TRUE;
+ bEnable = sal_True;
}
aSelectionFT.Enable(bEnable);
@@ -464,24 +464,24 @@ USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType)
Beschreibung:
--------------------------------------------------------------------*/
-BOOL __EXPORT SwFldDokInfPage::FillItemSet(SfxItemSet& )
+sal_Bool __EXPORT SwFldDokInfPage::FillItemSet(SfxItemSet& )
{
- if (!pSelEntry || (USHORT)(ULONG)pSelEntry->GetUserData() == USHRT_MAX)
- return FALSE;
+ if (!pSelEntry || (sal_uInt16)(sal_uLong)pSelEntry->GetUserData() == USHRT_MAX)
+ return sal_False;
- USHORT nTypeId = TYP_DOCINFOFLD;
- USHORT nSubType = (USHORT)(ULONG)pSelEntry->GetUserData();
+ sal_uInt16 nTypeId = TYP_DOCINFOFLD;
+ sal_uInt16 nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
::rtl::OUString aName;
if (DI_CUSTOM == nSubType)
aName = aTypeTLB.GetEntryText(pSelEntry);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
- nSubType |= (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nSubType |= (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
if (aFixedCB.IsChecked())
nSubType |= DI_SUB_FIXED;
@@ -498,7 +498,7 @@ BOOL __EXPORT SwFldDokInfPage::FillItemSet(SfxItemSet& )
' ', aFormatLB.IsAutomaticLanguage());
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -515,7 +515,7 @@ SfxTabPage* __EXPORT SwFldDokInfPage::Create( Window* pParent,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldDokInfPage::GetGroup()
+sal_uInt16 SwFldDokInfPage::GetGroup()
{
return GRP_REG;
}
@@ -528,7 +528,7 @@ void SwFldDokInfPage::FillUserData()
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
SvLBoxEntry* pEntry = aTypeTLB.FirstSelected();
- USHORT nTypeSel = pEntry ? sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(pEntry->GetUserData())) : USHRT_MAX;
+ sal_uInt16 nTypeSel = pEntry ? sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(pEntry->GetUserData())) : USHRT_MAX;
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx
index 20f9ebf3b786..05bee2dc32c3 100644
--- a/sw/source/ui/fldui/flddinf.hxx
+++ b/sw/source/ui/fldui/flddinf.hxx
@@ -59,17 +59,17 @@ class SwFldDokInfPage : public SwFldPage
String aInfoStr;
- USHORT nOldSel;
- ULONG nOldFormat;
+ sal_uInt16 nOldSel;
+ sal_uLong nOldFormat;
::rtl::OUString m_sOldCustomFieldName;
DECL_LINK( TypeHdl, ListBox* pLB = 0 );
DECL_LINK( SubTypeHdl, ListBox* pLB = 0 );
- USHORT FillSelectionLB(USHORT nSubTypeId);
+ sal_uInt16 FillSelectionLB(sal_uInt16 nSubTypeId);
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldDokInfPage(Window* pWindow, const SfxItemSet& rSet);
@@ -78,7 +78,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index 12d71b6f4577..d405245ed704 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -96,7 +96,7 @@ SwFldDokPage::SwFldDokPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
aDateOffsetED.SetMin(LONG_MIN);
aDateOffsetED.SetMax(LONG_MAX);
//enable 'active' language selection
- aNumFormatLB.SetShowLanguageControl(TRUE);
+ aNumFormatLB.SetShowLanguageControl(sal_True);
}
/*--------------------------------------------------------------------
@@ -119,11 +119,11 @@ void __EXPORT SwFldDokPage::Reset(const SfxItemSet& )
// TypeListBox initialisieren
const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup());
- aTypeLB.SetUpdateMode(FALSE);
+ aTypeLB.SetUpdateMode(sal_False);
aTypeLB.Clear();
- USHORT nPos, nTypeId;
- BOOL bPage = FALSE;
+ sal_uInt16 nPos, nTypeId;
+ sal_Bool bPage = sal_False;
if (!IsFldEdit())
{
@@ -141,7 +141,7 @@ void __EXPORT SwFldDokPage::Reset(const SfxItemSet& )
{
nPos = aTypeLB.InsertEntry(SW_RESSTR(FMT_REF_PAGE));
aTypeLB.SetEntryData(nPos, (void*)USHRT_MAX);
- bPage = TRUE;
+ bPage = sal_True;
}
break;
@@ -177,7 +177,7 @@ void __EXPORT SwFldDokPage::Reset(const SfxItemSet& )
// alte Pos selektieren
RestorePos(&aTypeLB);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
aTypeLB.SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl));
aTypeLB.SetSelectHdl(LINK(this, SwFldDokPage, TypeHdl));
aFormatLB.SetSelectHdl(LINK(this, SwFldDokPage, FormatHdl));
@@ -188,11 +188,11 @@ void __EXPORT SwFldDokPage::Reset(const SfxItemSet& )
if( sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1 ))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = static_cast< USHORT >(sVal.ToInt32());
+ sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32());
if(nVal != USHRT_MAX)
{
- for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++)
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -220,7 +220,7 @@ void __EXPORT SwFldDokPage::Reset(const SfxItemSet& )
IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
{
// Alte ListBoxPos sichern
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// Aktuelle ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -231,11 +231,11 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
aTypeLB.SelectEntryPos(0);
}
- USHORT nCount;
+ sal_uInt16 nCount;
if (nOld != GetTypeSel())
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
// Auswahl-Listbox fuellen
aSelectionLB.Clear();
@@ -248,11 +248,11 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
if (nTypeId != TYP_AUTHORFLD)
nCount = aLst.Count();
else
- nCount = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
+ nCount = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode());
- USHORT nPos;
+ sal_uInt16 nPos;
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
if (!IsFldEdit())
{
@@ -265,7 +265,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
}
else
{
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
switch (nTypeId)
{
@@ -298,7 +298,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
default:
if (*aLst[i] == GetCurField()->GetPar1())
- bInsert = TRUE;
+ bInsert = sal_True;
break;
}
if (bInsert)
@@ -316,12 +316,12 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
AddSubType(TYP_PAGENUMBERFLD);
AddSubType(TYP_PREVPAGEFLD);
AddSubType(TYP_NEXTPAGEFLD);
- nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(0);
+ nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(0);
nCount = 3;
aSelectionLB.SetSelectHdl(LINK(this, SwFldDokPage, SubTypeHdl));
}
- BOOL bEnable = nCount != 0;
+ sal_Bool bEnable = nCount != 0;
if (bEnable && !aSelectionLB.GetSelectEntryCount())
aSelectionLB.SelectEntryPos(0);
@@ -330,18 +330,18 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
aSelectionFT.Enable( bEnable );
// Format-Listbox fuellen
- USHORT nSize = FillFormatLB(nTypeId);
+ sal_uInt16 nSize = FillFormatLB(nTypeId);
- BOOL bValue = FALSE, bLevel = FALSE, bNumFmt = FALSE, bOffset = FALSE;
- BOOL bFormat = nSize != 0;
- BOOL bOneArea = FALSE;
- BOOL bFixed = FALSE;
- USHORT nFmtType = 0;
+ sal_Bool bValue = sal_False, bLevel = sal_False, bNumFmt = sal_False, bOffset = sal_False;
+ sal_Bool bFormat = nSize != 0;
+ sal_Bool bOneArea = sal_False;
+ sal_Bool bFixed = sal_False;
+ sal_uInt16 nFmtType = 0;
switch (nTypeId)
{
case TYP_DATEFLD:
- bFormat = bNumFmt = bOneArea = bOffset = TRUE;
+ bFormat = bNumFmt = bOneArea = bOffset = sal_True;
nFmtType = NUMBERFORMAT_DATE;
aValueFT.SetText(sDateOffset);
@@ -353,7 +353,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
break;
case TYP_TIMEFLD:
- bFormat = bNumFmt = bOneArea = bOffset = TRUE;
+ bFormat = bNumFmt = bOneArea = bOffset = sal_True;
nFmtType = NUMBERFORMAT_TIME;
aValueFT.SetText(sTimeOffset);
@@ -368,13 +368,13 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
case TYP_NEXTPAGEFLD:
if (IsFldEdit())
{
- USHORT nTmp = (USHORT)(ULONG)aFormatLB.GetEntryData(
+ sal_uInt16 nTmp = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
aFormatLB.GetSelectEntryPos() );
String sOldTxt(aValueFT.GetText());
if(SVX_NUM_CHAR_SPECIAL != nTmp)
{
- INT32 nOff = GetCurField()->GetPar2().ToInt32();
+ sal_Int32 nOff = GetCurField()->GetPar2().ToInt32();
if( TYP_NEXTPAGEFLD == nTypeId && 1 != nOff )
aValueED.SetText(
String::CreateFromInt32(nOff - 1) );
@@ -387,27 +387,27 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
else
aValueED.SetText(((SwPageNumberField*)GetCurField())->GetUserString());
}
- bValue = TRUE;
+ bValue = sal_True;
break;
case TYP_CHAPTERFLD:
aValueFT.SetText(SW_RESSTR(STR_LEVEL));
if (IsFldEdit())
aLevelED.SetText(String::CreateFromInt32(((SwChapterField*)GetCurField())->GetLevel() + 1));
- bLevel = TRUE;
+ bLevel = sal_True;
break;
case TYP_PAGENUMBERFLD:
aValueFT.SetText( SW_RESSTR( STR_OFFSET ));
if (IsFldEdit())
aValueED.SetText(GetCurField()->GetPar2());
- bValue = TRUE;
+ bValue = sal_True;
break;
case TYP_EXTUSERFLD:
case TYP_AUTHORFLD:
case TYP_FILENAMEFLD:
- bFixed = TRUE;
+ bFixed = sal_True;
break;
default:
@@ -460,7 +460,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
aFixedCB.Enable(bFixed);
if (IsFldEdit())
- aFixedCB.Check( static_cast< BOOL >(((GetCurField()->GetFormat() & AF_FIXED) != 0) & bFixed));
+ aFixedCB.Check( static_cast< sal_Bool >(((GetCurField()->GetFormat() & AF_FIXED) != 0) & bFixed));
if (aNumFormatLB.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND)
aNumFormatLB.SelectEntryPos(0);
@@ -475,9 +475,9 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
Beschreibung:
--------------------------------------------------------------------*/
-void SwFldDokPage::AddSubType(USHORT nTypeId)
+void SwFldDokPage::AddSubType(sal_uInt16 nTypeId)
{
- USHORT nPos = aSelectionLB.InsertEntry(SwFieldType::GetTypeStr(nTypeId));
+ sal_uInt16 nPos = aSelectionLB.InsertEntry(SwFieldType::GetTypeStr(nTypeId));
aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
}
@@ -487,14 +487,14 @@ void SwFldDokPage::AddSubType(USHORT nTypeId)
IMPL_LINK( SwFldDokPage, SubTypeHdl, ListBox *, EMPTYARG )
{
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
- USHORT nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
FillFormatLB(nTypeId);
- USHORT nTextRes = 0;
+ sal_uInt16 nTextRes = 0;
switch (nTypeId)
{
case TYP_CHAPTERFLD:
@@ -503,7 +503,7 @@ IMPL_LINK( SwFldDokPage, SubTypeHdl, ListBox *, EMPTYARG )
case TYP_PREVPAGEFLD:
case TYP_NEXTPAGEFLD:
- nTextRes = SVX_NUM_CHAR_SPECIAL == (USHORT)(ULONG)aFormatLB.GetEntryData(
+ nTextRes = SVX_NUM_CHAR_SPECIAL == (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
aFormatLB.GetSelectEntryPos() )
? STR_VALUE : STR_OFFSET;
break;
@@ -523,7 +523,7 @@ IMPL_LINK( SwFldDokPage, SubTypeHdl, ListBox *, EMPTYARG )
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldDokPage::FillFormatLB(USHORT nTypeId)
+sal_uInt16 SwFldDokPage::FillFormatLB(sal_uInt16 nTypeId)
{
// Format-Listbox fuellen
aFormatLB.Clear();
@@ -531,12 +531,12 @@ USHORT SwFldDokPage::FillFormatLB(USHORT nTypeId)
if (nTypeId == TYP_AUTHORFLD)
return aFormatLB.GetEntryCount();
- USHORT nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
+ sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode());
- for( USHORT i = 0; i < nSize; ++i )
+ for( sal_uInt16 i = 0; i < nSize; ++i )
{
- USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
- USHORT nFmtId = GetFldMgr().GetFormatId( nTypeId, i );
+ sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_uInt16 nFmtId = GetFldMgr().GetFormatId( nTypeId, i );
aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>( nFmtId ));
if (IsFldEdit() && nFmtId == (GetCurField()->GetFormat() & ~AF_FIXED))
aFormatLB.SelectEntryPos( nPos );
@@ -564,21 +564,21 @@ USHORT SwFldDokPage::FillFormatLB(USHORT nTypeId)
IMPL_LINK( SwFldDokPage, FormatHdl, ListBox *, EMPTYARG )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if (nTypeId == USHRT_MAX)
{
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
- nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
}
if (nTypeId == TYP_NEXTPAGEFLD || nTypeId == TYP_PREVPAGEFLD)
{
// Prev/Next - PageNumFelder Sonderbehandlung:
- USHORT nTmp = (USHORT)(ULONG)aFormatLB.GetEntryData(
+ sal_uInt16 nTmp = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
aFormatLB.GetSelectEntryPos() );
String sOldTxt( aValueFT.GetText() );
String sNewTxt( SW_RES( SVX_NUM_CHAR_SPECIAL == nTmp ? STR_VALUE
@@ -598,36 +598,36 @@ IMPL_LINK( SwFldDokPage, FormatHdl, ListBox *, EMPTYARG )
Beschreibung:
--------------------------------------------------------------------*/
-BOOL __EXPORT SwFldDokPage::FillItemSet(SfxItemSet& )
+sal_Bool __EXPORT SwFldDokPage::FillItemSet(SfxItemSet& )
{
- BOOL bPage = FALSE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bPage = sal_False;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if (nTypeId == USHRT_MAX)
{
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
- nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
- bPage = TRUE;
+ nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
+ bPage = sal_True;
}
String aVal(aValueED.GetText());
- ULONG nFormat = 0;
- USHORT nSubType = 0;
+ sal_uLong nFormat = 0;
+ sal_uInt16 nSubType = 0;
if (aFormatLB.IsEnabled())
{
- USHORT nPos = aFormatLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aFormatLB.GetSelectEntryPos();
if(nPos != LISTBOX_ENTRY_NOTFOUND)
- nFormat = (USHORT)(ULONG)aFormatLB.GetEntryData(nPos);
+ nFormat = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(nPos);
}
if (aSelectionLB.IsEnabled())
{
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
if(nPos != LISTBOX_ENTRY_NOTFOUND)
- nSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
}
switch (nTypeId)
@@ -664,7 +664,7 @@ BOOL __EXPORT SwFldDokPage::FillItemSet(SfxItemSet& )
if( SVX_NUM_CHAR_SPECIAL != nFormat &&
(TYP_PREVPAGEFLD == nTypeId || TYP_NEXTPAGEFLD == nTypeId))
{
- INT32 nVal = aValueED.GetText().ToInt32();
+ sal_Int32 nVal = aValueED.GetText().ToInt32();
aVal = String::CreateFromInt32(nVal);
}
break;
@@ -689,7 +689,7 @@ BOOL __EXPORT SwFldDokPage::FillItemSet(SfxItemSet& )
InsertFld( nTypeId, nSubType, aEmptyStr, aVal, nFormat, ' ', aNumFormatLB.IsAutomaticLanguage() );
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -706,7 +706,7 @@ SfxTabPage* __EXPORT SwFldDokPage::Create( Window* pParent,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldDokPage::GetGroup()
+sal_uInt16 SwFldDokPage::GetGroup()
{
return GRP_DOC;
}
@@ -719,11 +719,11 @@ void SwFldDokPage::FillUserData()
String sData( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
+ nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx
index bd46111c0b8e..d5720a4e2872 100644
--- a/sw/source/ui/fldui/flddok.hxx
+++ b/sw/source/ui/fldui/flddok.hxx
@@ -64,18 +64,18 @@ class SwFldDokPage : public SwFldPage
Bitmap aRootOpened;
Bitmap aRootClosed;
- USHORT nOldSel;
- ULONG nOldFormat;
+ sal_uInt16 nOldSel;
+ sal_uLong nOldFormat;
DECL_LINK( TypeHdl, ListBox* pLB = 0 );
DECL_LINK( FormatHdl, ListBox* pLB = 0 );
DECL_LINK( SubTypeHdl, ListBox* pLB = 0 );
- void AddSubType(USHORT nTypeId);
- USHORT FillFormatLB(USHORT nTypeId);
+ void AddSubType(sal_uInt16 nTypeId);
+ sal_uInt16 FillFormatLB(sal_uInt16 nTypeId);
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldDokPage(Window* pWindow, const SfxItemSet& rSet);
@@ -84,7 +84,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index f423a9d70f1a..3d6d52659c9d 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -110,11 +110,11 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) :
/* #108536# Only create selection if there is none
already. Normalize PaM instead of swapping. */
if ( ! pSh->HasSelection() )
- pSh->Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ pSh->Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
pSh->NormalizePam();
- USHORT nGroup = aMgr.GetGroup(FALSE, pCurFld->GetTypeId(), pCurFld->GetSubType());
+ sal_uInt16 nGroup = aMgr.GetGroup(sal_False, pCurFld->GetTypeId(), pCurFld->GetSubType());
CreatePage(nGroup);
@@ -124,7 +124,7 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) :
// Fontgroessen im Wald stehen, und da PB im SingleTabDlg feste Pixelgroessen
// fuer seine Buttons und die Dialogbreite verwendet.
aPrevBT.SetPosPixel(Point(GetOKButton()->GetPosPixel().X(), aPrevBT.GetPosPixel().Y()));
- USHORT nWidth = static_cast< USHORT >(GetOKButton()->GetOutputSize().Width() / 2 - 3);
+ sal_uInt16 nWidth = static_cast< sal_uInt16 >(GetOKButton()->GetOutputSize().Width() / 2 - 3);
Size aNewSize(LogicToPixel(Size(nWidth, GetOKButton()->GetOutputSize().Height())));
aPrevBT.SetSizePixel(aNewSize);
@@ -167,7 +167,7 @@ void SwFldEditDlg::Init()
pSh->StartAction();
pSh->CreateCrsr();
- BOOL bMove = rMgr.GoNext();
+ sal_Bool bMove = rMgr.GoNext();
if( bMove )
rMgr.GoPrev();
aNextBT.Enable(bMove);
@@ -191,7 +191,7 @@ void SwFldEditDlg::Init()
Beschreibung:
--------------------------------------------------------------------*/
-SfxTabPage* SwFldEditDlg::CreatePage(USHORT nGroup)
+SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup)
{
// TabPage erzeugen
SfxTabPage* pTabPage = 0;
@@ -275,10 +275,10 @@ SwFldEditDlg::~SwFldEditDlg()
Beschreibung:
--------------------------------------------------------------------*/
-void SwFldEditDlg::EnableInsert(BOOL bEnable)
+void SwFldEditDlg::EnableInsert(sal_Bool bEnable)
{
if( bEnable && pSh->IsReadOnlyAvailable() && pSh->HasReadonlySel() )
- bEnable = FALSE;
+ bEnable = sal_False;
GetOKButton()->Enable( bEnable );
}
@@ -327,7 +327,7 @@ short SwFldEditDlg::Execute()
IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton )
{
- BOOL bNext = pButton == &aNextBT;
+ sal_Bool bNext = pButton == &aNextBT;
pSh->EnterStdMode();
@@ -350,11 +350,11 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton )
/* #108536# Only create selection if there is none
already. Normalize PaM instead of swapping. */
if ( ! pSh->HasSelection() )
- pSh->Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ pSh->Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
pSh->NormalizePam();
- USHORT nGroup = rMgr.GetGroup(FALSE, pCurFld->GetTypeId(), pCurFld->GetSubType());
+ sal_uInt16 nGroup = rMgr.GetGroup(sal_False, pCurFld->GetTypeId(), pCurFld->GetSubType());
if (nGroup != pTabPage->GetGroup())
pTabPage = (SwFldPage*)CreatePage(nGroup);
@@ -380,7 +380,7 @@ IMPL_LINK( SwFldEditDlg, AddressHdl, PushButton *, EMPTYARG )
SID_FIELD_GRABFOCUS, SID_FIELD_GRABFOCUS,
0L );
- USHORT nEditPos = UNKNOWN_EDIT;
+ sal_uInt16 nEditPos = UNKNOWN_EDIT;
switch(pCurFld->GetSubType())
{
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index ae05a35681a7..bd528f39709a 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -108,8 +108,8 @@ SwFldFuncPage::SwFldFuncPage(Window* pParent, const SfxItemSet& rCoreSet ) :
sOldValueFT = aValueFT.GetText();
sOldNameFT = aNameFT.GetText();
- aCond1ED.ShowBrackets(FALSE);
- aCond2ED.ShowBrackets(FALSE);
+ aCond1ED.ShowBrackets(sal_False);
+ aCond2ED.ShowBrackets(sal_False);
// SwWrtShell* pSh = (SwWrtShell*)ViewShell::GetCurrShell();
}
@@ -131,10 +131,10 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
SavePos(&aTypeLB);
Init(); // Allgemeine initialisierung
- aTypeLB.SetUpdateMode(FALSE);
+ aTypeLB.SetUpdateMode(sal_False);
aTypeLB.Clear();
- USHORT nPos, nTypeId;
+ sal_uInt16 nPos, nTypeId;
if (!IsFldEdit())
{
@@ -187,11 +187,11 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = static_cast< USHORT >(sVal.ToInt32());
+ sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32());
if(nVal != USHRT_MAX)
{
- for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++)
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -201,7 +201,7 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
}
TypeHdl(0);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
if (IsFldEdit())
{
@@ -220,7 +220,7 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
{
// Alte ListBoxPos sichern
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// Aktuelle ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -233,7 +233,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
if (nOld != GetTypeSel())
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
// Auswahl-Listbox fuellen
UpdateSubType();
@@ -241,30 +241,30 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
// Format-Listbox fuellen
aFormatLB.Clear();
- USHORT nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
+ sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode());
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
{
- USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, i )) );
}
if (nSize)
{
if (IsFldEdit() && nTypeId == TYP_JUMPEDITFLD)
- aFormatLB.SelectEntry(SW_RESSTR(FMT_MARK_BEGIN + (USHORT)GetCurField()->GetFormat()));
+ aFormatLB.SelectEntry(SW_RESSTR(FMT_MARK_BEGIN + (sal_uInt16)GetCurField()->GetFormat()));
if (!aFormatLB.GetSelectEntryCount())
aFormatLB.SelectEntryPos(0);
}
- BOOL bValue = FALSE, bName = FALSE, bMacro = FALSE, bInsert = TRUE;
- BOOL bShowSelection = FALSE;
- BOOL bFormat = nSize != 0;
+ sal_Bool bValue = sal_False, bName = sal_False, bMacro = sal_False, bInsert = sal_True;
+ sal_Bool bShowSelection = sal_False;
+ sal_Bool bFormat = nSize != 0;
// fuer Conditional Text zwei Controls
- BOOL bDropDown = TYP_DROPDOWN == nTypeId;
- BOOL bCondTxtFld = TYP_CONDTXTFLD == nTypeId;
+ sal_Bool bDropDown = TYP_DROPDOWN == nTypeId;
+ sal_Bool bCondTxtFld = TYP_CONDTXTFLD == nTypeId;
aCond1FT.Show(!bDropDown && bCondTxtFld);
aCond1ED.Show(!bDropDown && bCondTxtFld);
@@ -287,7 +287,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
aListNameFT.Show(bDropDown);
aListNameED.Show(bDropDown);
- aNameED.SetDropEnable(FALSE);
+ aNameED.SetDropEnable(sal_False);
if (IsFldEdit())
{
@@ -326,11 +326,11 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
switch (nTypeId)
{
case TYP_MACROFLD:
- bMacro = TRUE;
+ bMacro = sal_True;
if (GetFldMgr().GetMacroPath().Len())
- bValue = TRUE;
+ bValue = sal_True;
else
- bInsert = FALSE;
+ bInsert = sal_False;
aNameFT.SetText(SW_RESSTR(STR_MACNAME));
aValueFT.SetText(SW_RESSTR(STR_PROMPT));
@@ -339,55 +339,55 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
case TYP_HIDDENPARAFLD:
aNameFT.SetText(SW_RESSTR(STR_COND));
- aNameED.SetDropEnable(TRUE);
- bName = TRUE;
+ aNameED.SetDropEnable(sal_True);
+ bName = sal_True;
break;
case TYP_HIDDENTXTFLD:
{
aNameFT.SetText(SW_RESSTR(STR_COND));
- aNameED.SetDropEnable(TRUE);
+ aNameED.SetDropEnable(sal_True);
aValueFT.SetText(SW_RESSTR(STR_INSTEXT));
SwWrtShell* pSh = GetActiveWrtShell();
if (!IsFldEdit() && pSh )
aValueED.SetText(pSh->GetSelTxt());
- bName = bValue = TRUE;
+ bName = bValue = sal_True;
}
break;
case TYP_CONDTXTFLD:
aNameFT.SetText(SW_RESSTR(STR_COND));
- aNameED.SetDropEnable(TRUE);
+ aNameED.SetDropEnable(sal_True);
if (IsFldEdit())
{
aCond1ED.SetText(GetCurField()->GetPar2().GetToken(0, '|'));
aCond2ED.SetText(GetCurField()->GetPar2().GetToken(1, '|'));
}
- bName = bValue = TRUE;
+ bName = bValue = sal_True;
break;
case TYP_JUMPEDITFLD:
aNameFT.SetText(SW_RESSTR(STR_JUMPEDITFLD));
aValueFT.SetText(SW_RESSTR(STR_PROMPT));
- bName = bValue = TRUE;
+ bName = bValue = sal_True;
break;
case TYP_INPUTFLD:
aValueFT.SetText(SW_RESSTR(STR_PROMPT));
- bValue = TRUE;
- // bShowSelection = TRUE;
+ bValue = sal_True;
+ // bShowSelection = sal_True;
break;
case TYP_COMBINED_CHARS:
{
aNameFT.SetText(SW_RESSTR(STR_COMBCHRS_FT));
- aNameED.SetDropEnable(TRUE);
- bName = TRUE;
+ aNameED.SetDropEnable(sal_True);
+ bName = sal_True;
- const USHORT nLen = aNameED.GetText().Len();
+ const sal_uInt16 nLen = aNameED.GetText().Len();
if( !nLen || nLen > MAX_COMBINED_CHARACTERS )
- bInsert = FALSE;
+ bInsert = sal_False;
}
break;
case TYP_DROPDOWN :
@@ -431,7 +431,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
IMPL_LINK( SwFldFuncPage, SelectHdl, ListBox *, EMPTYARG )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if( TYP_MACROFLD == nTypeId )
aNameED.SetText( aSelectionLB.GetSelectEntry() );
@@ -455,7 +455,7 @@ IMPL_LINK( SwFldFuncPage, InsertMacroHdl, ListBox *, EMPTYARG )
--------------------------------------------------*/
IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
{
- aListItemsLB.SetUpdateMode(FALSE);
+ aListItemsLB.SetUpdateMode(sal_False);
if(pControl == &aListAddPB ||
(pControl == &aListItemED && aListAddPB.IsEnabled()))
{
@@ -465,7 +465,7 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
}
else if(aListItemsLB.GetSelectEntryCount())
{
- USHORT nSelPos = aListItemsLB.GetSelectEntryPos();
+ sal_uInt16 nSelPos = aListItemsLB.GetSelectEntryPos();
if(pControl == &aListRemovePB)
{
aListItemsLB.RemoveEntry(nSelPos);
@@ -495,7 +495,7 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
}
}
bDropDownLBChanged = true;
- aListItemsLB.SetUpdateMode(TRUE);
+ aListItemsLB.SetUpdateMode(sal_True);
ListEnableHdl(0);
return 0;
}
@@ -507,7 +507,7 @@ IMPL_LINK( SwFldFuncPage, ListEnableHdl, void*, EMPTYARG)
//enable "Add" button when text is in the Edit that's not already member of the box
aListAddPB.Enable(aListItemED.GetText().Len() &&
LISTBOX_ENTRY_NOTFOUND == aListItemsLB.GetEntryPos(aListItemED.GetText()));
- BOOL bEnableButtons = aListItemsLB.GetSelectEntryCount() > 0;
+ sal_Bool bEnableButtons = aListItemsLB.GetSelectEntryCount() > 0;
aListRemovePB.Enable(bEnableButtons);
aListUpPB.Enable(bEnableButtons && (aListItemsLB.GetSelectEntryPos() > 0));
aListDownPB.Enable(bEnableButtons &&
@@ -523,23 +523,23 @@ IMPL_LINK( SwFldFuncPage, ListEnableHdl, void*, EMPTYARG)
void SwFldFuncPage::UpdateSubType()
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
// Auswahl-Listbox fuellen
- aSelectionLB.SetUpdateMode(FALSE);
+ aSelectionLB.SetUpdateMode(sal_False);
aSelectionLB.Clear();
SvStringsDtor aLst;
GetFldMgr().GetSubTypes(nTypeId, aLst);
- USHORT nCount = aLst.Count();
+ sal_uInt16 nCount = aLst.Count();
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
- USHORT nPos = aSelectionLB.InsertEntry(*aLst[i]);
+ sal_uInt16 nPos = aSelectionLB.InsertEntry(*aLst[i]);
aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(i));
}
- BOOL bEnable = nCount != 0;
+ sal_Bool bEnable = nCount != 0;
aSelectionLB.Enable( bEnable );
aSelectionFT.Enable( bEnable );
@@ -551,7 +551,7 @@ void SwFldFuncPage::UpdateSubType()
if (nTypeId == TYP_MACROFLD)
{
- BOOL bHasMacro = GetFldMgr().GetMacroPath().Len() != 0;
+ sal_Bool bHasMacro = GetFldMgr().GetMacroPath().Len() != 0;
if (bHasMacro)
{
@@ -562,7 +562,7 @@ void SwFldFuncPage::UpdateSubType()
EnableInsert(bHasMacro);
}
- aSelectionLB.SetUpdateMode(TRUE);
+ aSelectionLB.SetUpdateMode(sal_True);
}
/*--------------------------------------------------------------------
@@ -589,18 +589,18 @@ IMPL_LINK( SwFldFuncPage, MacroHdl, Button *, pBtn )
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwFldFuncPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldFuncPage::FillItemSet(SfxItemSet& )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
- USHORT nSubType = 0;
+ sal_uInt16 nSubType = 0;
- ULONG nFormat = aFormatLB.GetSelectEntryPos();
+ sal_uLong nFormat = aFormatLB.GetSelectEntryPos();
if(nFormat == LISTBOX_ENTRY_NOTFOUND)
nFormat = 0;
else
- nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat);
+ nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat);
String aVal(aValueED.GetText());
String aName(aNameED.GetText());
@@ -628,7 +628,7 @@ BOOL SwFldFuncPage::FillItemSet(SfxItemSet& )
case TYP_DROPDOWN :
{
aName = aListNameED.GetText();
- for(USHORT i = 0; i < aListItemsLB.GetEntryCount(); i++)
+ for(sal_uInt16 i = 0; i < aListItemsLB.GetEntryCount(); i++)
{
if(i)
aVal += DB_DELIM;
@@ -654,7 +654,7 @@ BOOL SwFldFuncPage::FillItemSet(SfxItemSet& )
ModifyHdl(); // Insert ggf enablen/disablen
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -667,9 +667,9 @@ String SwFldFuncPage::TurnMacroString(const String &rMacro)
{
// Inhalt von aName umdrehen
String sTmp, sBuf;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
- for (USHORT i = 0; i < 4 && nPos != STRING_NOTFOUND; i++)
+ for (sal_uInt16 i = 0; i < 4 && nPos != STRING_NOTFOUND; i++)
{
if (i == 3)
sTmp = rMacro.Copy(nPos);
@@ -700,7 +700,7 @@ SfxTabPage* SwFldFuncPage::Create( Window* pParent,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldFuncPage::GetGroup()
+sal_uInt16 SwFldFuncPage::GetGroup()
{
return GRP_FKT;
}
@@ -713,11 +713,11 @@ void SwFldFuncPage::FillUserData()
String sData( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
+ nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
@@ -725,14 +725,14 @@ void SwFldFuncPage::FillUserData()
IMPL_LINK( SwFldFuncPage, ModifyHdl, Edit *, EMPTYARG )
{
String aName(aNameED.GetText());
- const USHORT nLen = aName.Len();
+ const sal_uInt16 nLen = aName.Len();
- BOOL bEnable = TRUE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bEnable = sal_True;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if( TYP_COMBINED_CHARS == nTypeId &&
(!nLen || nLen > MAX_COMBINED_CHARACTERS ))
- bEnable = FALSE;
+ bEnable = sal_False;
EnableInsert( bEnable );
diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx
index 7a63385a5935..9a052bed7034 100644
--- a/sw/source/ui/fldui/fldfunc.hxx
+++ b/sw/source/ui/fldui/fldfunc.hxx
@@ -76,7 +76,7 @@ class SwFldFuncPage : public SwFldPage
String sOldValueFT;
String sOldNameFT;
- ULONG nOldFormat;
+ sal_uLong nOldFormat;
bool bDropDownLBChanged;
DECL_LINK( TypeHdl, ListBox* pLB = 0 );
@@ -93,7 +93,7 @@ class SwFldFuncPage : public SwFldPage
String TurnMacroString(const String &rMacro);
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldFuncPage(Window* pParent, const SfxItemSet& rSet);
@@ -102,7 +102,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 2088ce591bbe..2d001a8c9577 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -143,7 +143,7 @@ enum
/*--------------------------------------------------------------------
Beschreibung: Formate in der richtigen Reihenfolge
--------------------------------------------------------------------*/
-static const USHORT __FAR_DATA aSetFmt[] =
+static const sal_uInt16 __FAR_DATA aSetFmt[] =
{
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_SETVAR_???
// uebereinstimmen
@@ -151,14 +151,14 @@ static const USHORT __FAR_DATA aSetFmt[] =
0
};
-static const USHORT __FAR_DATA aGetFmt[] =
+static const sal_uInt16 __FAR_DATA aGetFmt[] =
{
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_GETVAR_???
// uebereinstimmen
0
};
-static const USHORT __FAR_DATA aUsrFmt[] =
+static const sal_uInt16 __FAR_DATA aUsrFmt[] =
{
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_SETVAR_???
// uebereinstimmen
@@ -166,29 +166,29 @@ static const USHORT __FAR_DATA aUsrFmt[] =
nsSwExtendedSubType::SUB_CMD
};
-static const USHORT __FAR_DATA aDBFmt[] =
+static const sal_uInt16 __FAR_DATA aDBFmt[] =
{
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_DBFLD_???
// uebereinstimmen
nsSwExtendedSubType::SUB_OWN_FMT
};
-static const USHORT VF_COUNT = sizeof(aGetFmt) / sizeof(USHORT);
-static const USHORT VF_USR_COUNT = sizeof(aUsrFmt) / sizeof(USHORT);
-static const USHORT VF_DB_COUNT = sizeof(aDBFmt) / sizeof(USHORT);
+static const sal_uInt16 VF_COUNT = sizeof(aGetFmt) / sizeof(sal_uInt16);
+static const sal_uInt16 VF_USR_COUNT = sizeof(aUsrFmt) / sizeof(sal_uInt16);
+static const sal_uInt16 VF_DB_COUNT = sizeof(aDBFmt) / sizeof(sal_uInt16);
/*--------------------------------------------------------------------
Beschreibung: Feldtypen und Subtypes
--------------------------------------------------------------------*/
struct SwFldPack
{
- USHORT nTypeId;
+ sal_uInt16 nTypeId;
- USHORT nSubTypeStart;
- USHORT nSubTypeEnd;
+ sal_uInt16 nSubTypeStart;
+ sal_uInt16 nSubTypeEnd;
- ULONG nFmtBegin;
- ULONG nFmtEnd;
+ sal_uLong nFmtBegin;
+ sal_uLong nFmtEnd;
};
/*--------------------------------------------------------------------
@@ -260,7 +260,7 @@ static SwWrtShell* lcl_GetShell()
return 0;
}
-inline USHORT GetPackCount() { return sizeof(aSwFlds) / sizeof(SwFldPack); }
+inline sal_uInt16 GetPackCount() { return sizeof(aSwFlds) / sizeof(SwFldPack); }
/*--------------------------------------------------------------------
Beschreibung: FieldManager regelt das Einfuegen und Updaten
@@ -271,7 +271,7 @@ SwFldMgr::SwFldMgr(SwWrtShell* pSh ) :
pModule(0),
pMacroItem(0),
pWrtShell(pSh),
- bEvalExp(TRUE)
+ bEvalExp(sal_True)
{
// aktuelles Feld ermitteln falls vorhanden
GetCurFld();
@@ -286,14 +286,14 @@ SwFldMgr::~SwFldMgr()
Beschreibung: RefMark ueber Namen organisieren
--------------------------------------------------------------------*/
-BOOL SwFldMgr::CanInsertRefMark( const String& rStr )
+sal_Bool SwFldMgr::CanInsertRefMark( const String& rStr )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell();
DBG_ASSERT(pSh, "no SwWrtShell found");
if(pSh)
{
- USHORT nCnt = pSh->GetCrsrCnt();
+ sal_uInt16 nCnt = pSh->GetCrsrCnt();
// der letzte Crsr muss keine aufgespannte Selektion
if( 1 < nCnt && !pSh->SwCrsrShell::HasSelection() )
@@ -308,7 +308,7 @@ BOOL SwFldMgr::CanInsertRefMark( const String& rStr )
Beschreibung: Zugriff ueber ResIds
--------------------------------------------------------------------*/
-void SwFldMgr::RemoveFldType(USHORT nResId, const String& rName )
+void SwFldMgr::RemoveFldType(sal_uInt16 nResId, const String& rName )
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
DBG_ASSERT(pSh, "no SwWrtShell found");
@@ -316,7 +316,7 @@ void SwFldMgr::RemoveFldType(USHORT nResId, const String& rName )
pSh->RemoveFldType(nResId, rName);
}
-USHORT SwFldMgr::GetFldTypeCount(USHORT nResId) const
+sal_uInt16 SwFldMgr::GetFldTypeCount(sal_uInt16 nResId) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
DBG_ASSERT(pSh, "no SwWrtShell found");
@@ -324,7 +324,7 @@ USHORT SwFldMgr::GetFldTypeCount(USHORT nResId) const
}
-SwFieldType* SwFldMgr::GetFldType(USHORT nResId, USHORT nId) const
+SwFieldType* SwFldMgr::GetFldType(sal_uInt16 nResId, sal_uInt16 nId) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
DBG_ASSERT(pSh, "no SwWrtShell found");
@@ -332,7 +332,7 @@ SwFieldType* SwFldMgr::GetFldType(USHORT nResId, USHORT nId) const
}
-SwFieldType* SwFldMgr::GetFldType(USHORT nResId, const String& rName) const
+SwFieldType* SwFldMgr::GetFldType(sal_uInt16 nResId, const String& rName) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
DBG_ASSERT(pSh, "no SwWrtShell found");
@@ -364,7 +364,7 @@ SwField* SwFldMgr::GetCurFld()
// Aktuelle Werte aufbereiten Parameter 1 und Parameter 2
// als auch das Format ermitteln
//
- const USHORT nTypeId = pCurFld->GetTypeId();
+ const sal_uInt16 nTypeId = pCurFld->GetTypeId();
nCurFmt = pCurFld->GetFormat();
aCurPar1 = pCurFld->GetPar1();
@@ -388,7 +388,7 @@ SwField* SwFldMgr::GetCurFld()
--------------------------------------------------------------------*/
-const SwFldGroupRgn& SwFldMgr::GetGroupRange(BOOL bHtmlMode, USHORT nGrpId) const
+const SwFldGroupRgn& SwFldMgr::GetGroupRange(sal_Bool bHtmlMode, sal_uInt16 nGrpId) const
{
static SwFldGroupRgn __READONLY_DATA aRanges[] =
{
@@ -410,16 +410,16 @@ static SwFldGroupRgn __READONLY_DATA aWebRanges[] =
};
if (bHtmlMode)
- return aWebRanges[(USHORT)nGrpId];
+ return aWebRanges[(sal_uInt16)nGrpId];
else
- return aRanges[(USHORT)nGrpId];
+ return aRanges[(sal_uInt16)nGrpId];
}
/*--------------------------------------------------------------------
Beschreibung: GroupId bestimmen
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType) const
+sal_uInt16 SwFldMgr::GetGroup(sal_Bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType) const
{
if (nTypeId == TYP_SETINPFLD)
nTypeId = TYP_SETFLD;
@@ -433,10 +433,10 @@ USHORT SwFldMgr::GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType) const
if (nTypeId == TYP_FIXTIMEFLD)
nTypeId = TYP_TIMEFLD;
- for (USHORT i = GRP_DOC; i <= GRP_VAR; i++)
+ for (sal_uInt16 i = GRP_DOC; i <= GRP_VAR; i++)
{
const SwFldGroupRgn& rRange = GetGroupRange(bHtmlMode, i);
- for (USHORT nPos = rRange.nStart; nPos < rRange.nEnd; nPos++)
+ for (sal_uInt16 nPos = rRange.nStart; nPos < rRange.nEnd; nPos++)
{
if (aSwFlds[nPos].nTypeId == nTypeId)
return i;
@@ -451,18 +451,18 @@ USHORT SwFldMgr::GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType) const
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetTypeId(USHORT nPos)
+sal_uInt16 SwFldMgr::GetTypeId(sal_uInt16 nPos)
{
ASSERT(nPos < ::GetPackCount(), "unzulaessige Pos");
return aSwFlds[ nPos ].nTypeId;
}
-const String& SwFldMgr::GetTypeStr(USHORT nPos)
+const String& SwFldMgr::GetTypeStr(sal_uInt16 nPos)
{
ASSERT(nPos < ::GetPackCount(), "unzulaessige TypeId");
- USHORT nFldWh = aSwFlds[ nPos ].nTypeId;
+ sal_uInt16 nFldWh = aSwFlds[ nPos ].nTypeId;
// Sonderbehandlung fuer Datum/Zeit Felder (ohne var/fix)
if( TYP_DATEFLD == nFldWh )
@@ -484,7 +484,7 @@ const String& SwFldMgr::GetTypeStr(USHORT nPos)
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetPos(USHORT nTypeId)
+sal_uInt16 SwFldMgr::GetPos(sal_uInt16 nTypeId)
{
switch( nTypeId )
{
@@ -494,7 +494,7 @@ USHORT SwFldMgr::GetPos(USHORT nTypeId)
case TYP_USRINPFLD: nTypeId = TYP_USERFLD; break;
}
- for(USHORT i = 0; i < GetPackCount(); i++)
+ for(sal_uInt16 i = 0; i < GetPackCount(); i++)
if(aSwFlds[i].nTypeId == nTypeId)
return i;
@@ -505,14 +505,14 @@ USHORT SwFldMgr::GetPos(USHORT nTypeId)
Beschreibung: Subtypen eines Feldes lokalisieren
--------------------------------------------------------------------*/
-BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
+sal_Bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, SvStringsDtor& rToFill)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell();
DBG_ASSERT(pSh, "no SwWrtShell found");
if(pSh)
{
- const USHORT nPos = GetPos(nTypeId);
+ const sal_uInt16 nPos = GetPos(nTypeId);
switch(nTypeId)
{
@@ -540,11 +540,11 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
case TYP_USERFLD:
{
- const USHORT nCount = pSh->GetFldTypeCount();
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = pSh->GetFldTypeCount();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
SwFieldType* pFldType = pSh->GetFldType( i );
- const USHORT nWhich = pFldType->Which();
+ const sal_uInt16 nWhich = pFldType->Which();
if((nTypeId == TYP_DDEFLD && pFldType->Which() == RES_DDEFLD) ||
@@ -581,13 +581,13 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
// statische SubTypes
if(nPos != USHRT_MAX)
{
- USHORT nCount;
+ sal_uInt16 nCount;
if (nTypeId == TYP_DOCINFOFLD)
nCount = DI_SUBTYPE_END - DI_SUBTYPE_BEGIN;
else
nCount = aSwFlds[nPos].nSubTypeEnd - aSwFlds[nPos].nSubTypeStart;
- for(USHORT i = 0; i < nCount; ++i)
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
String* pNew;
if (nTypeId == TYP_DOCINFOFLD)
@@ -605,7 +605,7 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
}
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -616,18 +616,18 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) const
+sal_uInt16 SwFldMgr::GetFormatCount(sal_uInt16 nTypeId, sal_Bool bIsText, sal_Bool bHtmlMode) const
{
ASSERT(nTypeId < TYP_END, "unzulaessige TypeId");
{
- const USHORT nPos = GetPos(nTypeId);
+ const sal_uInt16 nPos = GetPos(nTypeId);
if(nPos == USHRT_MAX || (bHtmlMode && nTypeId == TYP_SETFLD))
return 0;
- ULONG nStart = aSwFlds[nPos].nFmtBegin;
- ULONG nEnd = aSwFlds[nPos].nFmtEnd;
+ sal_uLong nStart = aSwFlds[nPos].nFmtBegin;
+ sal_uLong nEnd = aSwFlds[nPos].nFmtEnd;
if (bIsText && nEnd - nStart >= 2)
return 2;
@@ -643,7 +643,7 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co
case FMT_DBFLD_BEGIN: return VF_DB_COUNT;
case FMT_NUM_BEGIN:
{
- USHORT nCount = (USHORT)(nEnd - nStart);
+ sal_uInt16 nCount = (sal_uInt16)(nEnd - nStart);
GetNumberingInfo();
if(xNumberingInfo.is())
{
@@ -664,7 +664,7 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co
}
}
- return (USHORT)(nEnd - nStart);
+ return (sal_uInt16)(nEnd - nStart);
}
}
@@ -673,17 +673,17 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co
--------------------------------------------------------------------*/
-String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const
+String SwFldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const
{
String aRet;
ASSERT(nTypeId < TYP_END, "unzulaessige TypeId");
- const USHORT nPos = GetPos(nTypeId);
+ const sal_uInt16 nPos = GetPos(nTypeId);
if(nPos == USHRT_MAX)
return aRet;
- ULONG nStart;
+ sal_uLong nStart;
nStart = aSwFlds[nPos].nFmtBegin;
@@ -691,7 +691,7 @@ String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const
nFormatId &= ~FF_FIXED; // Fixed-Flag ausmaskieren
if((nStart + nFormatId) < aSwFlds[nPos].nFmtEnd)
- aRet = SW_RESSTR((USHORT)(nStart + nFormatId));
+ aRet = SW_RESSTR((sal_uInt16)(nStart + nFormatId));
else if( FMT_NUM_BEGIN == nStart)
{
if(xNumberingInfo.is())
@@ -723,9 +723,9 @@ String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const
Beschreibung: FormatId aus Pseudo-ID ermitteln
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetFormatId(USHORT nTypeId, ULONG nFormatId) const
+sal_uInt16 SwFldMgr::GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const
{
- USHORT nId = (USHORT)nFormatId;
+ sal_uInt16 nId = (sal_uInt16)nFormatId;
switch( nTypeId )
{
@@ -746,9 +746,9 @@ USHORT SwFldMgr::GetFormatId(USHORT nTypeId, ULONG nFormatId) const
case TYP_SEQFLD:
case TYP_GETREFPAGEFLD:
{
- USHORT nPos = GetPos( nTypeId );
- ULONG nBegin = aSwFlds[ nPos ].nFmtBegin;
- ULONG nEnd = aSwFlds[nPos].nFmtEnd;
+ sal_uInt16 nPos = GetPos( nTypeId );
+ sal_uLong nBegin = aSwFlds[ nPos ].nFmtBegin;
+ sal_uLong nEnd = aSwFlds[nPos].nFmtEnd;
if((nBegin + nFormatId) < nEnd)
{
switch( nBegin + nFormatId )
@@ -804,15 +804,15 @@ USHORT SwFldMgr::GetFormatId(USHORT nTypeId, ULONG nFormatId) const
--------------------------------------------------------------------*/
-BOOL SwFldMgr::GoNextPrev( BOOL bNext, SwFieldType* pTyp )
+sal_Bool SwFldMgr::GoNextPrev( sal_Bool bNext, SwFieldType* pTyp )
{
SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
if(!pSh)
- return FALSE;
+ return sal_False;
if( !pTyp && pCurFld )
{
- const USHORT nTypeId = pCurFld->GetTypeId();
+ const sal_uInt16 nTypeId = pCurFld->GetTypeId();
if( TYP_SETINPFLD == nTypeId || TYP_USRINPFLD == nTypeId )
pTyp = pSh->GetFldType( 0, RES_INPUTFLD );
else
@@ -825,7 +825,7 @@ BOOL SwFldMgr::GoNextPrev( BOOL bNext, SwFieldType* pTyp )
return pSh->MoveFldType( 0, bNext, USHRT_MAX, RES_DBFLD );
}
- return pTyp && pSh ? pSh->MoveFldType( pTyp, bNext ) : FALSE;
+ return pTyp && pSh ? pSh->MoveFldType( pTyp, bNext ) : sal_False;
}
/*--------------------------------------------------------------------
@@ -846,7 +846,7 @@ void SwFldMgr::InsertFldType(SwFieldType& rType)
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetCurTypeId() const
+sal_uInt16 SwFldMgr::GetCurTypeId() const
{
return pCurFld ? pCurFld->GetTypeId() : USHRT_MAX;
}
@@ -856,21 +856,21 @@ USHORT SwFldMgr::GetCurTypeId() const
--------------------------------------------------------------------*/
-BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
+sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
{
SwField* pFld = 0;
- BOOL bExp = FALSE;
- BOOL bTbl = FALSE;
- BOOL bPageVar = FALSE;
- ULONG nFormatId = rData.nFormatId;
- USHORT nSubType = rData.nSubType;
+ sal_Bool bExp = sal_False;
+ sal_Bool bTbl = sal_False;
+ sal_Bool bPageVar = sal_False;
+ sal_uLong nFormatId = rData.nFormatId;
+ sal_uInt16 nSubType = rData.nSubType;
sal_Unicode cSeparator = rData.cSeparator;
SwWrtShell* pCurShell = rData.pSh;
if(!pCurShell)
pCurShell = pWrtShell ? pWrtShell : ::lcl_GetShell();
DBG_ASSERT(pCurShell, "no SwWrtShell found");
if(!pCurShell)
- return FALSE;
+ return sal_False;
switch(rData.nTypeId)
{ // ACHTUNG dieses Feld wird ueber einen gesonderten Dialog eingefuegt
@@ -884,7 +884,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
{
SwScriptFieldType* pType =
(SwScriptFieldType*)pCurShell->GetFldType(0, RES_SCRIPTFLD);
- pFld = new SwScriptField(pType, rData.sPar1, rData.sPar2, (BOOL)nFormatId);
+ pFld = new SwScriptField(pType, rData.sPar1, rData.sPar2, (sal_Bool)nFormatId);
break;
}
case TYP_COMBINED_CHARS:
@@ -910,7 +910,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
case TYP_DATEFLD:
case TYP_TIMEFLD:
{
- USHORT nSub = static_cast< USHORT >(rData.nTypeId == TYP_DATEFLD ? DATEFLD : TIMEFLD);
+ sal_uInt16 nSub = static_cast< sal_uInt16 >(rData.nTypeId == TYP_DATEFLD ? DATEFLD : TIMEFLD);
nSub |= nSubType == DATE_VAR ? 0 : FIXEDFLD;
SwDateTimeFieldType* pTyp =
@@ -935,14 +935,14 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
}
case TYP_CHAPTERFLD:
{
- USHORT nByte = (USHORT)rData.sPar2.ToInt32();
+ sal_uInt16 nByte = (sal_uInt16)rData.sPar2.ToInt32();
SwChapterFieldType* pTyp =
(SwChapterFieldType*)pCurShell->GetFldType(0, RES_CHAPTERFLD);
pFld = new SwChapterField(pTyp, nFormatId);
- nByte = Max(USHORT(1), nByte);
- nByte = Min(nByte, USHORT(MAXLEVEL));
+ nByte = Max(sal_uInt16(1), nByte);
+ nByte = Min(nByte, sal_uInt16(MAXLEVEL));
nByte -= 1;
- ((SwChapterField*)pFld)->SetLevel((BYTE)nByte);
+ ((SwChapterField*)pFld)->SetLevel((sal_uInt8)nByte);
break;
}
case TYP_NEXTPAGEFLD:
@@ -996,8 +996,8 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
{
SwHiddenTxtFieldType* pTyp =
(SwHiddenTxtFieldType*)pCurShell->GetFldType(0, RES_HIDDENTXTFLD);
- pFld = new SwHiddenTxtField(pTyp, TRUE, rData.sPar1, rData.sPar2, FALSE, rData.nTypeId);
- bExp = TRUE;
+ pFld = new SwHiddenTxtField(pTyp, sal_True, rData.sPar1, rData.sPar2, sal_False, rData.nTypeId);
+ bExp = sal_True;
break;
}
case TYP_HIDDENPARAFLD:
@@ -1005,7 +1005,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwHiddenParaFieldType* pTyp =
(SwHiddenParaFieldType*)pCurShell->GetFldType(0, RES_HIDDENPARAFLD);
pFld = new SwHiddenParaField(pTyp, rData.sPar1);
- bExp = TRUE;
+ bExp = sal_True;
break;
}
case TYP_SETREFFLD:
@@ -1013,17 +1013,17 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
if( rData.sPar1.Len() > 0 && CanInsertRefMark( rData.sPar1 ) )
{
pCurShell->SetAttr( SwFmtRefMark( rData.sPar1 ) );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
case TYP_GETREFFLD:
{
SwGetRefFieldType* pTyp =
(SwGetRefFieldType*)pCurShell->GetFldType(0, RES_GETREFFLD);
- USHORT nSeqNo = (USHORT)rData.sPar2.ToInt32();
+ sal_uInt16 nSeqNo = (sal_uInt16)rData.sPar2.ToInt32();
pFld = new SwGetRefField(pTyp, rData.sPar1, nSubType, nSeqNo, nFormatId);
- bExp = TRUE;
+ bExp = sal_True;
break;
}
case TYP_DDEFLD:
@@ -1031,11 +1031,11 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
//JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren
// Namen haben! Wird hier noch nicht beachtet.
String sCmd( rData.sPar2 );
- USHORT nTmpPos = sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator );
+ sal_uInt16 nTmpPos = sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator );
sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos );
SwDDEFieldType* pTyp = (SwDDEFieldType*)pCurShell->InsertFldType(
- SwDDEFieldType( rData.sPar1, sCmd, (USHORT)nFormatId ));
+ SwDDEFieldType( rData.sPar1, sCmd, (sal_uInt16)nFormatId ));
pFld = new SwDDEField( pTyp );
break;
}
@@ -1123,7 +1123,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
}
pFld->ChangeFormat( nFormatId );
- bExp = TRUE;
+ bExp = sal_True;
break;
}
case TYP_DBSETNUMBERFLD:
@@ -1131,7 +1131,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
case TYP_DBNEXTSETFLD:
case TYP_DBNAMEFLD:
{
- USHORT nPos, nTablePos, nCmdTypePos, nExpPos;
+ sal_uInt16 nPos, nTablePos, nCmdTypePos, nExpPos;
String sPar1;
SwDBData aDBData;
@@ -1172,7 +1172,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwDBNextSetFieldType* pTyp = (SwDBNextSetFieldType*)pCurShell->GetFldType(
0, RES_DBNEXTSETFLD);
pFld = new SwDBNextSetField(pTyp, sPar1, rData.sPar2, aDBData);
- bExp = TRUE;
+ bExp = sal_True;
break;
}
case TYP_DBNUMSETFLD:
@@ -1180,7 +1180,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwDBNumSetFieldType* pTyp = (SwDBNumSetFieldType*)pCurShell->GetFldType(
0, RES_DBNUMSETFLD);
pFld = new SwDBNumSetField( pTyp, sPar1, rData.sPar2, aDBData);
- bExp = TRUE;
+ bExp = sal_True;
break;
}
case TYP_DBSETNUMBERFLD:
@@ -1188,7 +1188,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwDBSetNumberFieldType* pTyp = (SwDBSetNumberFieldType*)
pCurShell->GetFldType(0, RES_DBSETNUMBERFLD);
pFld = new SwDBSetNumberField( pTyp, aDBData, nFormatId);
- bExp = TRUE;
+ bExp = sal_True;
break;
}
}
@@ -1210,7 +1210,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pFld = new SwUserField(pTyp, 0, nFormatId);
if (pFld->GetSubType() != nSubType)
pFld->SetSubType(nSubType);
- bTbl = TRUE;
+ bTbl = sal_True;
break;
}
case TYP_INPUTFLD:
@@ -1227,16 +1227,16 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
new SwSetExpField(pTyp, aEmptyStr, nFormatId);
// Typ vom SwSetExpFieldType nicht veraendern:
- USHORT nOldSubType = pExpFld->GetSubType();
+ sal_uInt16 nOldSubType = pExpFld->GetSubType();
pExpFld->SetSubType(nOldSubType | (nSubType & 0xff00));
pExpFld->SetPromptText(rData.sPar2);
- pExpFld->SetInputFlag(TRUE) ;
- bExp = TRUE;
+ pExpFld->SetInputFlag(sal_True) ;
+ bExp = sal_True;
pFld = pExpFld;
}
else
- return FALSE;
+ return sal_False;
}
else
{
@@ -1250,13 +1250,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
// Dialog starten
//
- pCurShell->StartInputFldDlg(pFld, FALSE, rData.pParent);
+ pCurShell->StartInputFldDlg(pFld, sal_False, rData.pParent);
break;
}
case TYP_SETFLD:
{
if (!rData.sPar2.Len()) // Leere Variablen sind nicht erlaubt
- return FALSE;
+ return sal_False;
SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pCurShell->InsertFldType(
SwSetExpFieldType(pCurShell->GetDoc(), rData.sPar1) );
@@ -1264,7 +1264,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwSetExpField* pExpFld = new SwSetExpField( pTyp, rData.sPar2, nFormatId);
pExpFld->SetSubType(nSubType);
pExpFld->SetPar2(rData.sPar2);
- bExp = TRUE;
+ bExp = sal_True;
pFld = pExpFld;
break;
}
@@ -1273,7 +1273,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pCurShell->InsertFldType(
SwSetExpFieldType(pCurShell->GetDoc(), rData.sPar1, nsSwGetSetExpType::GSE_SEQ));
- BYTE nLevel = static_cast< BYTE >(nSubType & 0xff);
+ sal_uInt8 nLevel = static_cast< sal_uInt8 >(nSubType & 0xff);
pTyp->SetOutlineLvl(nLevel);
if (nLevel != 0x7f && cSeparator == 0)
@@ -1281,7 +1281,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pTyp->SetDelimiter(cSeparator);
SwSetExpField* pExpFld = new SwSetExpField(pTyp, rData.sPar2, nFormatId);
- bExp = TRUE;
+ bExp = sal_True;
pFld = pExpFld;
nSubType = nsSwGetSetExpType::GSE_SEQ;
break;
@@ -1298,15 +1298,15 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
0, RES_GETEXPFLD);
pFld = new SwGetExpField(pTyp, rData.sPar1, pSetTyp->GetType(), nFormatId);
pFld->SetSubType(nSubType | pSetTyp->GetType());
- bExp = TRUE;
+ bExp = sal_True;
}
else
- return FALSE;
+ return sal_False;
break;
}
case TYP_FORMELFLD:
{
- if(pCurShell->GetFrmType(0,FALSE) & FRMTYPE_TABLE)
+ if(pCurShell->GetFrmType(0,sal_False) & FRMTYPE_TABLE)
{
pCurShell->StartAllAction();
@@ -1333,13 +1333,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pCurShell->UpdateTable();
pCurShell->EndAllAction();
- return TRUE;
+ return sal_True;
/* // In der Tabelle Tabellenformeln einfuegen
SwTblFieldType* pTyp = (SwTblFieldType*)pCurShell->GetFldType(
0, RES_TABLEFLD);
pFld = new SwTblField(pTyp, rData.sPar2, nsSwGetSetExpType::GSE_EXPR, nFormatId);
- bTbl = TRUE;*/
+ bTbl = sal_True;*/
}
else
{
@@ -1347,7 +1347,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pCurShell->GetFldType(0, RES_GETEXPFLD);
pFld = new SwGetExpField(pTyp, rData.sPar2, nsSwGetSetExpType::GSE_FORMULA, nFormatId);
pFld->SetSubType(nSubType);
- bExp = TRUE;
+ bExp = sal_True;
}
break;
}
@@ -1355,13 +1355,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pFld = new SwRefPageSetField( (SwRefPageSetFieldType*)
pCurShell->GetFldType( 0, RES_REFPAGESETFLD ),
(short)rData.sPar2.ToInt32(), 0 != nSubType );
- bPageVar = TRUE;
+ bPageVar = sal_True;
break;
case TYP_GETREFPAGEFLD:
pFld = new SwRefPageGetField( (SwRefPageGetFieldType*)
pCurShell->GetFldType( 0, RES_REFPAGEGETFLD ), nFormatId );
- bPageVar = TRUE;
+ bPageVar = sal_True;
break;
case TYP_DROPDOWN :
{
@@ -1377,7 +1377,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
break;
default:
{ ASSERT(!this, "Falscher Feldtyp");
- return FALSE;
+ return sal_False;
}
}
ASSERT(pFld, "Feld nicht vorhanden");
@@ -1385,7 +1385,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
//the auto language flag has to be set prior to the language!
pFld->SetAutomaticLanguage(rData.bIsAutomaticLanguage);
- USHORT nLang = GetCurrLanguage();
+ sal_uInt16 nLang = GetCurrLanguage();
pFld->SetLanguage(nLang);
// Einfuegen
@@ -1394,13 +1394,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pCurShell->Insert(*pFld);
if(bExp && bEvalExp)
- pCurShell->UpdateExpFlds(TRUE);
+ pCurShell->UpdateExpFlds(sal_True);
if(bTbl)
{
- pCurShell->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pCurShell->Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
pCurShell->UpdateFlds(*pFld);
- pCurShell->Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pCurShell->Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
}
else if( bPageVar )
((SwRefPageGetFieldType*)pCurShell->GetFldType( 0, RES_REFPAGEGETFLD ))->UpdateFlds();
@@ -1411,7 +1411,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
delete pFld;
pCurShell->EndAllAction();
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -1419,7 +1419,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
--------------------------------------------------------------------*/
-void SwFldMgr::UpdateCurFld(ULONG nFormat,
+void SwFldMgr::UpdateCurFld(sal_uLong nFormat,
const String& rPar1,
const String& rPar2,
SwField * _pTmpFld) // #111840#
@@ -1440,7 +1440,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
}
SwFieldType* pType = pTmpFld->GetTyp();
- const USHORT nTypeId = pTmpFld->GetTypeId();
+ const sal_uInt16 nTypeId = pTmpFld->GetTypeId();
SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
DBG_ASSERT(pSh, "no SwWrtShell found");
@@ -1448,8 +1448,8 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
return;
pSh->StartAllAction();
- BOOL bSetPar2 = TRUE;
- BOOL bSetPar1 = TRUE;
+ sal_Bool bSetPar2 = sal_True;
+ sal_Bool bSetPar1 = sal_True;
String sPar1( rPar1 );
String sPar2( rPar2 );
@@ -1460,24 +1460,24 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
{
//JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren
// Namen haben! Wird hier noch nicht beachtet.
- USHORT nTmpPos = sPar2.SearchAndReplace( ' ', sfx2::cTokenSeperator );
+ sal_uInt16 nTmpPos = sPar2.SearchAndReplace( ' ', sfx2::cTokenSeperator );
sPar2.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos );
break;
}
case TYP_CHAPTERFLD:
{
- USHORT nByte = (USHORT)rPar2.ToInt32();
- nByte = Max(USHORT(1), nByte);
- nByte = Min(nByte, USHORT(MAXLEVEL));
+ sal_uInt16 nByte = (sal_uInt16)rPar2.ToInt32();
+ nByte = Max(sal_uInt16(1), nByte);
+ nByte = Min(nByte, sal_uInt16(MAXLEVEL));
nByte -= 1;
- ((SwChapterField*)pTmpFld)->SetLevel((BYTE)nByte);
- bSetPar2 = FALSE;
+ ((SwChapterField*)pTmpFld)->SetLevel((sal_uInt8)nByte);
+ bSetPar2 = sal_False;
break;
}
case TYP_SCRIPTFLD:
- ((SwScriptField*)pTmpFld)->SetCodeURL((BOOL)nFormat);
+ ((SwScriptField*)pTmpFld)->SetCodeURL((sal_Bool)nFormat);
break;
case TYP_NEXTPAGEFLD:
@@ -1521,11 +1521,11 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
case TYP_GETREFFLD:
{
- bSetPar2 = FALSE;
- ((SwGetRefField*)pTmpFld)->SetSubType( (USHORT)rPar2.ToInt32() );
- USHORT nPos = rPar2.Search( '|' );
+ bSetPar2 = sal_False;
+ ((SwGetRefField*)pTmpFld)->SetSubType( (sal_uInt16)rPar2.ToInt32() );
+ sal_uInt16 nPos = rPar2.Search( '|' );
if( STRING_NOTFOUND != nPos )
- ((SwGetRefField*)pTmpFld)->SetSeqNo( (USHORT)rPar2.Copy( nPos + 1 ).ToInt32());
+ ((SwGetRefField*)pTmpFld)->SetSeqNo( (sal_uInt16)rPar2.Copy( nPos + 1 ).ToInt32());
}
break;
case TYP_DROPDOWN:
@@ -1537,7 +1537,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
pArray[nToken] = sPar2.GetToken(nToken, DB_DELIM);
((SwDropDownField*)pTmpFld)->SetItems(aEntries);
((SwDropDownField*)pTmpFld)->SetName(sPar1);
- bSetPar1 = bSetPar2 = FALSE;
+ bSetPar1 = bSetPar2 = sal_False;
}
break;
case TYP_AUTHORITY :
@@ -1546,7 +1546,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
SwAuthorityField* pAuthorityField = static_cast<SwAuthorityField*>(pTmpFld);
SwAuthorityFieldType* pAuthorityType = static_cast<SwAuthorityFieldType*>(pType);
SwAuthEntry aTempEntry;
- for( USHORT i = 0; i < AUTH_FIELD_END; ++i )
+ for( sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i )
aTempEntry.SetAuthorField( (ToxAuthorityField)i,
rPar1.GetToken( i, TOX_STYLE_DELIMITER ));
if( pAuthorityType->ChangeEntryContent( &aTempEntry ) )
@@ -1557,8 +1557,8 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
if( aTempEntry.GetAuthorField( AUTH_FIELD_IDENTIFIER ) ==
pAuthorityField->GetFieldText( AUTH_FIELD_IDENTIFIER ) )
- bSetPar1 = FALSE; //otherwise it's a new or changed entry, the field needs to be updated
- bSetPar2 = FALSE;
+ bSetPar1 = sal_False; //otherwise it's a new or changed entry, the field needs to be updated
+ bSetPar2 = sal_False;
}
break;
}
@@ -1603,11 +1603,11 @@ void SwFldMgr::EvalExpFlds(SwWrtShell* pSh)
if(pSh)
{
pSh->StartAllAction();
- pSh->UpdateExpFlds(TRUE);
+ pSh->UpdateExpFlds(sal_True);
pSh->EndAllAction();
}
}
-USHORT SwFldMgr::GetCurrLanguage() const
+sal_uInt16 SwFldMgr::GetCurrLanguage() const
{
SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
if( pSh )
@@ -1617,9 +1617,9 @@ USHORT SwFldMgr::GetCurrLanguage() const
void SwFieldType::_GetFldName()
{
- static const USHORT coFldCnt = STR_TYPE_END - STR_TYPE_BEGIN;
+ static const sal_uInt16 coFldCnt = STR_TYPE_END - STR_TYPE_BEGIN;
- static USHORT __READONLY_DATA coFldNms[ coFldCnt ] = {
+ static sal_uInt16 __READONLY_DATA coFldNms[ coFldCnt ] = {
FLD_DATE_STD,
FLD_TIME_STD,
STR_FILENAMEFLD,
@@ -1666,8 +1666,8 @@ void SwFieldType::_GetFldName()
};
// Infos fuer Felder einfuegen
- SwFieldType::pFldNames = new SvStringsDtor( (BYTE)coFldCnt, 2 );
- for( USHORT nIdx = 0; nIdx < coFldCnt; ++nIdx )
+ SwFieldType::pFldNames = new SvStringsDtor( (sal_uInt8)coFldCnt, 2 );
+ for( sal_uInt16 nIdx = 0; nIdx < coFldCnt; ++nIdx )
{
String* pTmp = new SW_RESSTR( coFldNms[ nIdx ] );
pTmp->Assign( MnemonicGenerator::EraseAllMnemonicChars( *pTmp ) );
@@ -1679,9 +1679,9 @@ void SwFieldType::_GetFldName()
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwFldMgr::ChooseMacro(const String&)
+sal_Bool SwFldMgr::ChooseMacro(const String&)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// choose script dialog
::rtl::OUString aScriptURL = SfxApplication::ChooseScript();
@@ -1690,7 +1690,7 @@ BOOL SwFldMgr::ChooseMacro(const String&)
if ( aScriptURL.getLength() != 0 )
{
SetMacroPath( aScriptURL );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -1728,7 +1728,7 @@ void SwFldMgr::SetMacroPath(const String& rPath)
Beschreibung:
--------------------------------------------------------------------*/
-ULONG SwFldMgr::GetDefaultFormat(USHORT nTypeId, BOOL bIsText, SvNumberFormatter* pFormatter, double* pVal)
+sal_uLong SwFldMgr::GetDefaultFormat(sal_uInt16 nTypeId, sal_Bool bIsText, SvNumberFormatter* pFormatter, double* pVal)
{
double fValue;
short nDefFormat;
@@ -1745,8 +1745,8 @@ ULONG SwFldMgr::GetDefaultFormat(USHORT nTypeId, BOOL bIsText, SvNumberFormatter
Time aTime;
- ULONG nNumFmtTime = (ULONG)aTime.GetSec() + (ULONG)aTime.GetMin() * 60L +
- (ULONG)aTime.GetHour() * 3600L;
+ sal_uLong nNumFmtTime = (sal_uLong)aTime.GetSec() + (sal_uLong)aTime.GetMin() * 60L +
+ (sal_uLong)aTime.GetHour() * 3600L;
fValue += (double)nNumFmtTime / 86400.0;
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 265a53dc6646..3e6db5e1bf1e 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -65,14 +65,14 @@ SwFldPage::SwFldPage( Window *pParent, const ResId &rId,
:SfxTabPage (pParent, rId, rAttrSet),
m_pCurFld (0),
m_pWrtShell (0),
- m_nPageId ( static_cast< USHORT >(rId.GetId()) ),
+ m_nPageId ( static_cast< sal_uInt16 >(rId.GetId()) ),
m_nTypeSel (LISTBOX_ENTRY_NOTFOUND),
m_nSelectionSel (LISTBOX_ENTRY_NOTFOUND),
- m_bFldEdit (FALSE),
- m_bInsert (TRUE),
- m_bFldDlgHtmlMode (FALSE),
- m_bRefresh (FALSE),
- m_bFirstHTMLInit (TRUE)
+ m_bFldEdit (sal_False),
+ m_bInsert (sal_True),
+ m_bFldDlgHtmlMode (sal_False),
+ m_bRefresh (sal_False),
+ m_bFirstHTMLInit (sal_True)
{
// FreeResource();
}
@@ -92,7 +92,7 @@ SwFldPage::~SwFldPage()
void SwFldPage::Init()
{
SwDocShell* pDocSh = (SwDocShell*)SfxObjectShell::Current();
- BOOL bNewMode = 0 != (::GetHtmlMode(pDocSh) & HTMLMODE_ON);
+ sal_Bool bNewMode = 0 != (::GetHtmlMode(pDocSh) & HTMLMODE_ON);
m_bFldEdit = 0 == GetTabDialog();
@@ -107,7 +107,7 @@ void SwFldPage::Init()
// Bereichslistbox initialisieren
if( m_bFldDlgHtmlMode && m_bFirstHTMLInit )
{
- m_bFirstHTMLInit = FALSE;
+ m_bFirstHTMLInit = sal_False;
SwWrtShell *pSh = m_pWrtShell;
if(! pSh)
pSh = ::GetActiveWrtShell();
@@ -136,27 +136,27 @@ void SwFldPage::ActivatePage()
Beschreibung: Kompletter Reset; neues Feld editieren
--------------------------------------------------------------------*/
-void SwFldPage::EditNewField( BOOL bOnlyActivate )
+void SwFldPage::EditNewField( sal_Bool bOnlyActivate )
{
if( !bOnlyActivate )
{
m_nTypeSel = LISTBOX_ENTRY_NOTFOUND;
}
m_nSelectionSel = LISTBOX_ENTRY_NOTFOUND;
- m_bRefresh = TRUE;
+ m_bRefresh = sal_True;
Reset(*(SfxItemSet*)0);
- m_bRefresh = FALSE;
+ m_bRefresh = sal_False;
}
/*--------------------------------------------------------------------
Beschreibung: Feld einfuegen
--------------------------------------------------------------------*/
-BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
- const String& rPar2, ULONG nFormatId,
- sal_Unicode cSeparator, BOOL bIsAutomaticLanguage)
+sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const String& rPar1,
+ const String& rPar2, sal_uLong nFormatId,
+ sal_Unicode cSeparator, sal_Bool bIsAutomaticLanguage)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwView* pView = GetActiveView();
SwWrtShell *pSh = m_pWrtShell ? m_pWrtShell : pView->GetWrtShellPtr();
@@ -171,7 +171,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
pView->GetViewFrame()->GetBindings().GetRecorder();
if ( xRecorder.is() )
{
- BOOL bRecordDB = TYP_DBFLD == nTypeId ||
+ sal_Bool bRecordDB = TYP_DBFLD == nTypeId ||
TYP_DBSETNUMBERFLD == nTypeId ||
TYP_DBNUMSETFLD == nTypeId ||
TYP_DBNEXTSETFLD == nTypeId ||
@@ -210,12 +210,12 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
String sPar1(rPar1);
String sPar2(rPar2);
- BOOL bDBChanged = FALSE;
+ sal_Bool bDBChanged = sal_False;
switch( nTypeId )
{
case TYP_DATEFLD:
case TYP_TIMEFLD:
- nSubType = static_cast< USHORT >(((nTypeId == TYP_DATEFLD) ? DATEFLD : TIMEFLD) |
+ nSubType = static_cast< sal_uInt16 >(((nTypeId == TYP_DATEFLD) ? DATEFLD : TIMEFLD) |
((nSubType == DATE_VAR) ? 0 : FIXEDFLD));
break;
@@ -233,7 +233,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
sPar1 = rPar1.Copy(nPos);
((SwDBNameInfField*)pTmpFld)->SetDBData(aData);
- bDBChanged = TRUE;
+ bDBChanged = sal_True;
}
break;
@@ -261,14 +261,14 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
break;
}
}
- bDBChanged = TRUE;
+ bDBChanged = sal_True;
}
break;
case TYP_SEQFLD:
{
SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pTmpFld->GetTyp();
- pTyp->SetOutlineLvl( static_cast< BYTE >(nSubType & 0xff));
+ pTyp->SetOutlineLvl( static_cast< sal_uInt8 >(nSubType & 0xff));
pTyp->SetDelimiter(cSeparator);
nSubType = nsSwGetSetExpType::GSE_SEQ;
@@ -345,7 +345,7 @@ void SwFldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2,
void SwFldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3)
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
ListBox* aLBArr [ coLBCount ] = { pLst1, pLst2, pLst3 };
ListBox** ppLB = aLBArr;
for( int i = 0; i < coLBCount; ++i, ++ppLB )
@@ -383,7 +383,7 @@ IMPL_LINK( SwFldPage, InsertHdl, Button *, pBtn )
Beschreibung: "Einfuegen"-Button Enablen/Disablen
--------------------------------------------------------------------*/
-void SwFldPage::EnableInsert(BOOL bEnable)
+void SwFldPage::EnableInsert(sal_Bool bEnable)
{
SwFldDlg *pDlg = (SwFldDlg*)GetTabDialog();
diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx
index f2dc85e07f7c..00517a154efa 100644
--- a/sw/source/ui/fldui/fldpage.hxx
+++ b/sw/source/ui/fldui/fldpage.hxx
@@ -44,23 +44,23 @@ class SwFldPage : public SfxTabPage
SwFldMgr m_aMgr;
SwField *m_pCurFld;
SwWrtShell* m_pWrtShell;
- USHORT m_nPageId;
- USHORT m_nTypeSel;
- USHORT m_nSelectionSel;
- BOOL m_bFldEdit;
- BOOL m_bInsert;
- BOOL m_bFldDlgHtmlMode;
- BOOL m_bRefresh;
- BOOL m_bFirstHTMLInit;
+ sal_uInt16 m_nPageId;
+ sal_uInt16 m_nTypeSel;
+ sal_uInt16 m_nSelectionSel;
+ sal_Bool m_bFldEdit;
+ sal_Bool m_bInsert;
+ sal_Bool m_bFldDlgHtmlMode;
+ sal_Bool m_bRefresh;
+ sal_Bool m_bFirstHTMLInit;
protected:
- USHORT GetTypeSel() const { return m_nTypeSel;}
- void SetTypeSel(USHORT nSet) { m_nTypeSel = nSet;}
- USHORT GetSelectionSel() const { return m_nSelectionSel;}
- void SetSelectionSel(USHORT nSet){ m_nSelectionSel = nSet;}
- BOOL IsFldDlgHtmlMode() const { return m_bFldDlgHtmlMode;}
- BOOL IsRefresh() const { return m_bRefresh;}
+ sal_uInt16 GetTypeSel() const { return m_nTypeSel;}
+ void SetTypeSel(sal_uInt16 nSet) { m_nTypeSel = nSet;}
+ sal_uInt16 GetSelectionSel() const { return m_nSelectionSel;}
+ void SetSelectionSel(sal_uInt16 nSet){ m_nSelectionSel = nSet;}
+ sal_Bool IsFldDlgHtmlMode() const { return m_bFldDlgHtmlMode;}
+ sal_Bool IsRefresh() const { return m_bRefresh;}
SwField* GetCurField() { return m_pCurFld;}
SwWrtShell* GetWrtShell() { return m_pWrtShell;}
@@ -73,17 +73,17 @@ protected:
const ListBox* pLst3 = 0);
void RestorePos( ListBox* pLst1, ListBox* pLst2 = 0,
ListBox* pLst3 = 0 );
- void EnableInsert(BOOL bEnable = TRUE);
- inline BOOL IsFldEdit() const { return m_bFldEdit; }
+ void EnableInsert(sal_Bool bEnable = sal_True);
+ inline sal_Bool IsFldEdit() const { return m_bFldEdit; }
// Feld einfuegen
- BOOL InsertFld( USHORT nTypeId,
- USHORT nSubType,
+ sal_Bool InsertFld( sal_uInt16 nTypeId,
+ sal_uInt16 nSubType,
const String& rPar1,
const String& rPar2,
- ULONG nFormatId,
+ sal_uLong nFormatId,
sal_Unicode cDelim = ' ',
- BOOL bIsAutomaticLanguage = TRUE);
+ sal_Bool bIsAutomaticLanguage = sal_True);
using SfxTabPage::ActivatePage;
@@ -98,8 +98,8 @@ public:
inline SwFldMgr& GetFldMgr() { return m_aMgr; }
void SetWrtShell( SwWrtShell* m_pWrtShell );
- void EditNewField( BOOL bOnlyActivate = FALSE );
- virtual USHORT GetGroup() = 0;
+ void EditNewField( sal_Bool bOnlyActivate = sal_False );
+ virtual sal_uInt16 GetGroup() = 0;
};
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 4713e30775bc..7ef5b58e9b8b 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -72,7 +72,7 @@ SV_IMPL_PTRARR( _SwSeqFldList, _SeqFldLstElem* )
#define REFFLDFLAG_NUMITEM 0x7200
// <--
-USHORT nFldDlgFmtSel = 0;
+sal_uInt16 nFldDlgFmtSel = 0;
#define USER_DATA_VERSION_1 "1"
#define USER_DATA_VERSION USER_DATA_VERSION_1
@@ -148,7 +148,7 @@ void SwFldRefPage::SaveSelectedTxtNode()
SvLBoxEntry* pEntry = aSelectionToolTipLB.GetCurEntry();
if ( pEntry )
{
- const USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
SwWrtShell *pSh = GetWrtShell();
if ( !pSh )
{
@@ -156,7 +156,7 @@ void SwFldRefPage::SaveSelectedTxtNode()
}
if ( nTypeId == REFFLDFLAG_HEADING )
{
- mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData()));
+ mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData()));
if ( mnSavedSelectedPos < maOutlineNodes.size() )
{
mpSavedSelectedTxtNode = maOutlineNodes[mnSavedSelectedPos];
@@ -164,7 +164,7 @@ void SwFldRefPage::SaveSelectedTxtNode()
}
else if ( nTypeId == REFFLDFLAG_NUMITEM )
{
- mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData()));
+ mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData()));
if ( mnSavedSelectedPos < maNumItems.size() )
{
mpSavedSelectedTxtNode = maNumItems[mnSavedSelectedPos]->GetTxtNode();
@@ -204,18 +204,18 @@ void SwFldRefPage::Reset(const SfxItemSet& )
Init(); // Allgemeine initialisierung
// TypeListBox initialisieren
- aTypeLB.SetUpdateMode(FALSE);
+ aTypeLB.SetUpdateMode(sal_False);
aTypeLB.Clear();
// Typ-Listbox fuellen
- USHORT nPos;
+ sal_uInt16 nPos;
// Referenz setzen / einfuegen
const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup());
for (short i = rRg.nStart; i < rRg.nEnd; ++i)
{
- const USHORT nTypeId = GetFldMgr().GetTypeId(i);
+ const sal_uInt16 nTypeId = GetFldMgr().GetTypeId(i);
if (!IsFldEdit() || nTypeId != TYP_SETREFFLD)
{
@@ -237,9 +237,9 @@ void SwFldRefPage::Reset(const SfxItemSet& )
if(!pSh)
pSh = ::GetActiveWrtShell();
- USHORT nFldTypeCnt = pSh->GetFldTypeCount(RES_SETEXPFLD);
+ sal_uInt16 nFldTypeCnt = pSh->GetFldTypeCount(RES_SETEXPFLD);
- for (USHORT n = 0; n < nFldTypeCnt; ++n)
+ for (sal_uInt16 n = 0; n < nFldTypeCnt; ++n)
{
SwSetExpFieldType* pType = (SwSetExpFieldType*)pSh->GetFldType(n, RES_SETEXPFLD);
@@ -272,7 +272,7 @@ void SwFldRefPage::Reset(const SfxItemSet& )
if (!IsFldEdit())
RestorePos(&aTypeLB);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
nFldDlgFmtSel = 0;
@@ -283,11 +283,11 @@ void SwFldRefPage::Reset(const SfxItemSet& )
EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = static_cast< USHORT >(sVal.ToInt32());
+ sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32());
if(nVal != USHRT_MAX)
{
- for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++)
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -314,7 +314,7 @@ void SwFldRefPage::Reset(const SfxItemSet& )
IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
{
// Alte ListBoxPos sichern
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// Aktuelle ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -325,7 +325,7 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
{
// Positionen selektieren
String sName;
- USHORT nFlag = 0;
+ sal_uInt16 nFlag = 0;
switch( GetCurField()->GetSubType() )
{
@@ -379,7 +379,7 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
if (aTypeLB.GetEntryPos(sName) == LISTBOX_ENTRY_NOTFOUND) // Referenz zu gel?schter Marke
{
- USHORT nPos = aTypeLB.InsertEntry(sName);
+ sal_uInt16 nPos = aTypeLB.InsertEntry(sName);
aTypeLB.SetEntryData(nPos, reinterpret_cast<void*>(nFlag));
}
@@ -395,12 +395,12 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
if (nOld != GetTypeSel())
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
// Auswahl-Listbox fuellen
UpdateSubType();
- BOOL bName = FALSE; nFldDlgFmtSel = 0;
+ sal_Bool bName = sal_False; nFldDlgFmtSel = 0;
if ( ( !IsFldEdit() || aSelectionLB.GetEntryCount() ) &&
nOld != LISTBOX_ENTRY_NOTFOUND )
@@ -412,23 +412,23 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
switch (nTypeId)
{
case TYP_GETREFFLD:
- if (REFFLDFLAG & (USHORT)(ULONG)aTypeLB.GetEntryData(nOld))
+ if (REFFLDFLAG & (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(nOld))
// dann bleibt die alte bestehen
nFldDlgFmtSel = aFormatLB.GetSelectEntryPos();
- bName = TRUE;
+ bName = sal_True;
break;
case TYP_SETREFFLD:
- bName = TRUE;
+ bName = sal_True;
break;
case REFFLDFLAG_BOOKMARK:
- bName = TRUE;
+ bName = sal_True;
// kein break!!!
default:
if( REFFLDFLAG & nTypeId )
{
- USHORT nOldId = (USHORT)(ULONG)aTypeLB.GetEntryData(nOld);
+ sal_uInt16 nOldId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(nOld);
if( nOldId & REFFLDFLAG || nOldId == TYP_GETREFFLD )
// dann bleibt die alte bestehen
nFldDlgFmtSel = aFormatLB.GetSelectEntryPos();
@@ -440,8 +440,8 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
aNameFT.Enable(bName);
// Format-Listbox fuellen
- USHORT nSize = FillFormatLB(nTypeId);
- BOOL bFormat = nSize != 0;
+ sal_uInt16 nSize = FillFormatLB(nTypeId);
+ sal_Bool bFormat = nSize != 0;
aFormatLB.Enable(bFormat);
aFormatFT.Enable(bFormat);
@@ -458,7 +458,7 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
IMPL_LINK( SwFldRefPage, SubTypeHdl, ListBox *, EMPTYARG )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
switch(nTypeId)
{
@@ -514,13 +514,13 @@ void SwFldRefPage::UpdateSubType()
if(!pSh)
pSh = ::GetActiveWrtShell();
SwGetRefField* pRefFld = (SwGetRefField*)GetCurField();
- const USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
String sOldSel;
// --> OD 2007-11-22 #i83479#
if ( aSelectionLB.IsVisible() )
{
- const USHORT nSelectionSel = aSelectionLB.GetSelectEntryPos();
+ const sal_uInt16 nSelectionSel = aSelectionLB.GetSelectEntryPos();
if (nSelectionSel != LISTBOX_ENTRY_NOTFOUND)
{
sOldSel = aSelectionLB.GetEntry(nSelectionSel);
@@ -530,10 +530,10 @@ void SwFldRefPage::UpdateSubType()
if (IsFldEdit() && !sOldSel.Len())
sOldSel = String::CreateFromInt32( pRefFld->GetSeqNo() + 1 );
- aSelectionLB.SetUpdateMode(FALSE);
+ aSelectionLB.SetUpdateMode(sal_False);
aSelectionLB.Clear();
// --> OD 2007-11-21 #i83479#
- aSelectionToolTipLB.SetUpdateMode(FALSE);
+ aSelectionToolTipLB.SetUpdateMode(sal_False);
aSelectionToolTipLB.Clear();
bool bShowSelectionToolTipLB( false );
// <--
@@ -560,9 +560,9 @@ void SwFldRefPage::UpdateSubType()
{
aSelectionLB.SetStyle(aSelectionLB.GetStyle() & ~WB_SORT);
SwSeqFldList aArr;
- USHORT nCnt = pSh->GetSeqFtnList( aArr );
+ sal_uInt16 nCnt = pSh->GetSeqFtnList( aArr );
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
aSelectionLB.InsertEntry( aArr[ n ]->sDlgEntry );
if (IsFldEdit() && pRefFld->GetSeqNo() == aArr[ n ]->nSeqNo)
@@ -573,9 +573,9 @@ void SwFldRefPage::UpdateSubType()
{
aSelectionLB.SetStyle(aSelectionLB.GetStyle() & ~WB_SORT);
SwSeqFldList aArr;
- USHORT nCnt = pSh->GetSeqFtnList( aArr, true );
+ sal_uInt16 nCnt = pSh->GetSeqFtnList( aArr, true );
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
aSelectionLB.InsertEntry( aArr[ n ]->sDlgEntry );
if (IsFldEdit() && pRefFld->GetSeqNo() == aArr[ n ]->nSeqNo)
@@ -658,8 +658,8 @@ void SwFldRefPage::UpdateSubType()
if(IsFldEdit())
sOldSel.Erase();
- USHORT nCnt = pType->GetSeqFldList( aArr );
- for( USHORT n = 0; n < nCnt; ++n )
+ sal_uInt16 nCnt = pType->GetSeqFldList( aArr );
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
aSelectionLB.InsertEntry( aArr[ n ]->sDlgEntry );
if (IsFldEdit() && !sOldSel.Len() &&
@@ -676,7 +676,7 @@ void SwFldRefPage::UpdateSubType()
{
SvStringsDtor aLst;
GetFldMgr().GetSubTypes(nTypeId, aLst);
- for (USHORT i = 0; i < aLst.Count(); ++i)
+ for (sal_uInt16 i = 0; i < aLst.Count(); ++i)
aSelectionLB.InsertEntry(*aLst[i]);
if (IsFldEdit())
@@ -688,9 +688,9 @@ void SwFldRefPage::UpdateSubType()
aSelectionLB.Show( !bShowSelectionToolTipLB );
if ( bShowSelectionToolTipLB )
{
- aSelectionToolTipLB.SetUpdateMode(TRUE);
+ aSelectionToolTipLB.SetUpdateMode(sal_True);
- BOOL bEnable = aSelectionToolTipLB.GetEntryCount() != 0;
+ sal_Bool bEnable = aSelectionToolTipLB.GetEntryCount() != 0;
aSelectionToolTipLB.Enable( bEnable );
aSelectionFT.Enable( bEnable );
@@ -706,10 +706,10 @@ void SwFldRefPage::UpdateSubType()
}
else
{
- aSelectionLB.SetUpdateMode(TRUE);
+ aSelectionLB.SetUpdateMode(sal_True);
// Enable oder Disable
- BOOL bEnable = aSelectionLB.GetEntryCount() != 0;
+ sal_Bool bEnable = aSelectionLB.GetEntryCount() != 0;
aSelectionLB.Enable( bEnable );
aSelectionFT.Enable( bEnable );
@@ -730,11 +730,11 @@ void SwFldRefPage::UpdateSubType()
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
+sal_uInt16 SwFldRefPage::FillFormatLB(sal_uInt16 nTypeId)
{
String sOldSel;
- USHORT nFormatSel = aFormatLB.GetSelectEntryPos();
+ sal_uInt16 nFormatSel = aFormatLB.GetSelectEntryPos();
if (nFormatSel != LISTBOX_ENTRY_NOTFOUND)
sOldSel = aFormatLB.GetEntry(nFormatSel);
@@ -742,7 +742,7 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
aFormatLB.Clear();
// Referenz hat weniger als die Beschriftung
- USHORT nSize( 0 );
+ sal_uInt16 nSize( 0 );
bool bAddCrossRefFormats( false );
switch (nTypeId)
{
@@ -763,15 +763,15 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
default:
// --> OD 2007-11-16 #i83479#
// nSize = GetFldMgr().GetFormatCount( (REFFLDFLAG & nTypeId)
-// ? (USHORT)TYP_GETREFFLD : nTypeId,
-// FALSE, IsFldDlgHtmlMode() );
+// ? (sal_uInt16)TYP_GETREFFLD : nTypeId,
+// sal_False, IsFldDlgHtmlMode() );
if ( REFFLDFLAG & nTypeId )
{
nSize = FMT_REF_ONLYSEQNO - FMT_REF_BEGIN + 1;
}
else
{
- nSize = GetFldMgr().GetFormatCount( nTypeId, FALSE, IsFldDlgHtmlMode() );
+ nSize = GetFldMgr().GetFormatCount( nTypeId, sal_False, IsFldDlgHtmlMode() );
}
break;
}
@@ -779,16 +779,16 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
if (REFFLDFLAG & nTypeId)
nTypeId = TYP_GETREFFLD;
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
{
- USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, i ));
+ sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, i ));
aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, i )));
}
// --> OD 2007-11-16 #i83479#
if ( bAddCrossRefFormats )
{
- USHORT nFormat = FMT_REF_NUMBER - FMT_REF_BEGIN;
- USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat ));
+ sal_uInt16 nFormat = FMT_REF_NUMBER - FMT_REF_BEGIN;
+ sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat ));
aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, nFormat )));
nFormat = FMT_REF_NUMBER_NO_CONTEXT - FMT_REF_BEGIN;
nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat ));
@@ -806,7 +806,7 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
if (!IsFldEdit())
aFormatLB.SelectEntry(sOldSel);
else
- aFormatLB.SelectEntry(SW_RESSTR(FMT_REF_BEGIN + (USHORT)GetCurField()->GetFormat()));
+ aFormatLB.SelectEntry(SW_RESSTR(FMT_REF_BEGIN + (sal_uInt16)GetCurField()->GetFormat()));
if (!aFormatLB.GetSelectEntryCount())
{
@@ -826,15 +826,15 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
IMPL_LINK( SwFldRefPage, ModifyHdl, Edit *, EMPTYARG )
{
String aName(aNameED.GetText());
- const USHORT nLen = aName.Len();
+ const sal_uInt16 nLen = aName.Len();
- BOOL bEnable = TRUE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bEnable = sal_True;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if ((nTypeId == TYP_SETREFFLD && !GetFldMgr().CanInsertRefMark(aName)) ||
(nLen == 0 && (nTypeId == TYP_GETREFFLD || nTypeId == TYP_SETREFFLD ||
nTypeId == REFFLDFLAG_BOOKMARK)))
- bEnable = FALSE;
+ bEnable = sal_False;
EnableInsert(bEnable);
@@ -847,20 +847,20 @@ IMPL_LINK( SwFldRefPage, ModifyHdl, Edit *, EMPTYARG )
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldRefPage::FillItemSet(SfxItemSet& )
{
- BOOL bModified = FALSE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bModified = sal_False;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
- USHORT nSubType = 0;
- ULONG nFormat;
+ sal_uInt16 nSubType = 0;
+ sal_uLong nFormat;
nFormat = aFormatLB.GetSelectEntryPos();
if(nFormat == LISTBOX_ENTRY_NOTFOUND)
nFormat = 0;
else
- nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat);
+ nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat);
String aVal(aValueED.GetText());
String aName(aNameED.GetText());
@@ -906,7 +906,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
SwSeqFldList aArr;
_SeqFldLstElem aElem( aSelectionLB.GetSelectEntry(), 0 );
- USHORT nPos;
+ sal_uInt16 nPos;
nTypeId = TYP_GETREFFLD;
nSubType = REF_FOOTNOTE;
@@ -917,7 +917,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
aVal = String::CreateFromInt32( aArr[nPos]->nSeqNo );
if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo())
- bModified = TRUE; // Kann bei Feldern passieren, deren Referenz geloescht wurde
+ bModified = sal_True; // Kann bei Feldern passieren, deren Referenz geloescht wurde
}
else if (IsFldEdit())
aVal = String::CreateFromInt32( pRefFld->GetSeqNo() );
@@ -927,7 +927,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
SwSeqFldList aArr;
_SeqFldLstElem aElem( aSelectionLB.GetSelectEntry(), 0 );
- USHORT nPos;
+ sal_uInt16 nPos;
nTypeId = TYP_GETREFFLD;
nSubType = REF_ENDNOTE;
@@ -938,7 +938,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
aVal = String::CreateFromInt32( aArr[nPos]->nSeqNo );
if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo())
- bModified = TRUE; // Kann bei Feldern passieren, deren Referenz geloescht wurde
+ bModified = sal_True; // Kann bei Feldern passieren, deren Referenz geloescht wurde
}
else if (IsFldEdit())
aVal = String::CreateFromInt32( pRefFld->GetSeqNo() );
@@ -951,7 +951,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
"<SwFldRefPage::FillItemSet(..)> - no entry selected in selection tool tip listbox!" );
if ( pEntry )
{
- const sal_uInt16 nOutlIdx( static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData())) );
+ const sal_uInt16 nOutlIdx( static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData())) );
pSh->getIDocumentOutlineNodesAccess()->getOutlineNodes( maOutlineNodes );
if ( nOutlIdx < maOutlineNodes.size() )
{
@@ -971,7 +971,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
"<SwFldRefPage::FillItemSet(..)> - no entry selected in selection tool tip listbox!" );
if ( pEntry )
{
- const sal_uInt16 nNumItemIdx( static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData())) );
+ const sal_uInt16 nNumItemIdx( static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData())) );
pSh->getIDocumentListItemsAccess()->getNumItems( maNumItems );
if ( nNumItemIdx < maNumItems.size() )
{
@@ -995,7 +995,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
SwSeqFldList aArr;
_SeqFldLstElem aElem( aSelectionLB.GetSelectEntry(), 0 );
- USHORT nPos;
+ sal_uInt16 nPos;
nTypeId = TYP_GETREFFLD;
nSubType = REF_SEQUENCEFLD;
@@ -1006,7 +1006,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
aVal = String::CreateFromInt32( aArr[nPos]->nSeqNo );
if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo())
- bModified = TRUE; // Kann bei Feldern passieren, deren Referenz geloescht wurde
+ bModified = sal_True; // Kann bei Feldern passieren, deren Referenz geloescht wurde
}
else if (IsFldEdit())
aVal = String::CreateFromInt32( pRefFld->GetSeqNo() );
@@ -1032,7 +1032,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
ModifyHdl(); // Insert ggf enablen/disablen
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -1049,7 +1049,7 @@ SfxTabPage* SwFldRefPage::Create( Window* pParent,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldRefPage::GetGroup()
+sal_uInt16 SwFldRefPage::GetGroup()
{
return GRP_REF;
}
@@ -1062,11 +1062,11 @@ void SwFldRefPage::FillUserData()
String sData( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
+ nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx
index 0facb24bf823..e65e05b19d2f 100644
--- a/sw/source/ui/fldui/fldref.hxx
+++ b/sw/source/ui/fldui/fldref.hxx
@@ -85,7 +85,7 @@ class SwFldRefPage : public SwFldPage
DECL_LINK( ModifyHdl, Edit *pEd = 0 );
void UpdateSubType();
- USHORT FillFormatLB(USHORT nTypeId);
+ sal_uInt16 FillFormatLB(sal_uInt16 nTypeId);
// --> OD 2007-12-05 #i83479#
void SaveSelectedTxtNode();
@@ -94,7 +94,7 @@ class SwFldRefPage : public SwFldPage
// <--
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldRefPage(Window* pParent, const SfxItemSet& rSet);
@@ -103,7 +103,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index 308bc379d4f4..9efc63519459 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -76,7 +76,7 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent)
: SfxTabDialog( pParent, SW_RES( DLG_FLD_INSERT )),
m_pChildWin(pCW),
m_pBindings(pB),
- m_bDataBaseMode(FALSE)
+ m_bDataBaseMode(sal_False)
{
SetStyle(GetStyle()|WB_STDMODELESS);
m_bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0;
@@ -142,12 +142,12 @@ SwFldDlg::~SwFldDlg()
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwFldDlg::Close()
+sal_Bool SwFldDlg::Close()
{
m_pBindings->GetDispatcher()->
Execute(m_bDataBaseMode ? FN_INSERT_FIELD_DATA_ONLY : FN_INSERT_FIELD,
SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD);
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -204,7 +204,7 @@ void SwFldDlg::Initialize(SfxChildWinInfo *pInfo)
Beschreibung:
--------------------------------------------------------------------*/
-SfxItemSet* SwFldDlg::CreateInputItemSet( USHORT nID )
+SfxItemSet* SwFldDlg::CreateInputItemSet( sal_uInt16 nID )
{
if ( nID == TP_FLD_DOKINF )
{
@@ -249,7 +249,7 @@ IMPL_LINK( SwFldDlg, OKHdl, Button *, EMPTYARG )
void SwFldDlg::ReInitDlg()
{
SwDocShell* pDocSh = (SwDocShell*)SfxObjectShell::Current();
- BOOL bNewMode = (::GetHtmlMode(pDocSh) & HTMLMODE_ON) != 0;
+ sal_Bool bNewMode = (::GetHtmlMode(pDocSh) & HTMLMODE_ON) != 0;
if (bNewMode != m_bHtmlMode)
{
@@ -283,7 +283,7 @@ void SwFldDlg::ReInitDlg()
Beschreibung: Nach Dok-Wechsel TabPage neu initialisieren
--------------------------------------------------------------------*/
-void SwFldDlg::ReInitTabPage( USHORT nPageId, BOOL bOnlyActivate )
+void SwFldDlg::ReInitTabPage( sal_uInt16 nPageId, sal_Bool bOnlyActivate )
{
SwFldPage* pPage = (SwFldPage* )GetTabPage(nPageId);
@@ -300,17 +300,17 @@ void SwFldDlg::Activate()
SwView* pView = ::GetActiveView();
if( pView )
{
- BOOL bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0;
+ sal_Bool bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0;
const SwWrtShell& rSh = pView->GetWrtShell();
GetOKButton().Enable( !rSh.IsReadOnlyAvailable() ||
!rSh.HasReadonlySel() );
- ReInitTabPage( TP_FLD_VAR, TRUE );
+ ReInitTabPage( TP_FLD_VAR, sal_True );
if( !bHtmlMode )
{
- ReInitTabPage( TP_FLD_REF, TRUE );
- ReInitTabPage( TP_FLD_FUNC, TRUE );
+ ReInitTabPage( TP_FLD_REF, sal_True );
+ ReInitTabPage( TP_FLD_FUNC, sal_True );
}
}
}
@@ -319,7 +319,7 @@ void SwFldDlg::Activate()
Beschreibung:
--------------------------------------------------------------------*/
-void SwFldDlg::EnableInsert(BOOL bEnable)
+void SwFldDlg::EnableInsert(sal_Bool bEnable)
{
if( bEnable )
{
@@ -328,7 +328,7 @@ void SwFldDlg::EnableInsert(BOOL bEnable)
if( !pView ||
(pView->GetWrtShell().IsReadOnlyAvailable() &&
pView->GetWrtShell().HasReadonlySel()) )
- bEnable = FALSE;
+ bEnable = sal_False;
}
GetOKButton().Enable(bEnable);
}
@@ -346,7 +346,7 @@ void SwFldDlg::InsertHdl()
* --------------------------------------------------*/
void SwFldDlg::ActivateDatabasePage()
{
- m_bDataBaseMode = TRUE;
+ m_bDataBaseMode = sal_True;
ShowPage( TP_FLD_DB );
SfxTabPage* pDBPage = GetTabPage( TP_FLD_DB );
if( pDBPage )
@@ -363,7 +363,7 @@ void SwFldDlg::ActivateDatabasePage()
/*-- 07.10.2003 14:01:44---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwFldDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
+void SwFldDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
{
if( TP_FLD_DB == nId)
{
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 6aee7bba2cf3..74256233560d 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -86,7 +86,7 @@ SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) :
aSeparatorFT (this, SW_RES(FT_VARSEPARATOR)),
aSeparatorED (this, SW_RES(ED_VARSEPARATOR)),
aNewDelTBX (this, SW_RES(TBX_VARNEWDEL)),
- bInit (TRUE)
+ bInit (sal_True)
{
FreeResource();
@@ -101,12 +101,12 @@ SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) :
sOldValueFT = aValueFT.GetText();
sOldNameFT = aNameFT.GetText();
- for (USHORT i = 1; i <= MAXLEVEL; i++)
+ for (sal_uInt16 i = 1; i <= MAXLEVEL; i++)
aChapterLevelLB.InsertEntry(String::CreateFromInt32(i));
aChapterLevelLB.SelectEntryPos(0);
//enable 'active' language selection
- aNumFormatLB.SetShowLanguageControl(TRUE);
+ aNumFormatLB.SetShowLanguageControl(sal_True);
}
/*--------------------------------------------------------------------
@@ -127,10 +127,10 @@ void SwFldVarPage::Reset(const SfxItemSet& )
Init(); // Allgemeine initialisierung
- aTypeLB.SetUpdateMode(FALSE);
+ aTypeLB.SetUpdateMode(sal_False);
aTypeLB.Clear();
- USHORT nPos, nTypeId;
+ sal_uInt16 nPos, nTypeId;
if (!IsFldEdit())
{
@@ -185,11 +185,11 @@ void SwFldVarPage::Reset(const SfxItemSet& )
if(!IsRefresh() && sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = (USHORT)sVal.ToInt32();
+ sal_uInt16 nVal = (sal_uInt16)sVal.ToInt32();
if( USHRT_MAX != nVal )
{
- for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++)
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -199,7 +199,7 @@ void SwFldVarPage::Reset(const SfxItemSet& )
}
TypeHdl(0);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
if (IsFldEdit())
{
@@ -221,7 +221,7 @@ void SwFldVarPage::Reset(const SfxItemSet& )
IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG )
{
// Alte ListBoxPos sichern
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// Aktuelle ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -234,18 +234,18 @@ IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG )
if (nOld != GetTypeSel() || nOld == LISTBOX_ENTRY_NOTFOUND)
{
- bInit = TRUE;
+ bInit = sal_True;
if (nOld != LISTBOX_ENTRY_NOTFOUND)
{
aNameED.SetText(aEmptyStr);
aValueED.SetText(aEmptyStr);
}
- aValueED.SetDropEnable(FALSE);
+ aValueED.SetDropEnable(sal_False);
UpdateSubType(); // Auswahl-Listboxen initialisieren
}
- bInit = FALSE;
+ bInit = sal_False;
return 0;
}
@@ -256,11 +256,11 @@ IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG )
IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
- USHORT nSelPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nSelPos = aSelectionLB.GetSelectEntryPos();
if (nSelPos != LISTBOX_ENTRY_NOTFOUND)
- nSelPos = (USHORT)(ULONG)aSelectionLB.GetEntryData(nSelPos);
+ nSelPos = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nSelPos);
if (IsFldEdit() && (!pBox || bInit))
{
@@ -275,15 +275,15 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if (aValueFT.GetText() != sOldValueFT)
aValueFT.SetText(sOldValueFT);
- aNumFormatLB.SetUpdateMode(FALSE);
- aFormatLB.SetUpdateMode(FALSE);
+ aNumFormatLB.SetUpdateMode(sal_False);
+ aFormatLB.SetUpdateMode(sal_False);
FillFormatLB(nTypeId);
- USHORT nSize = aFormatLB.GetEntryCount();
+ sal_uInt16 nSize = aFormatLB.GetEntryCount();
- BOOL bValue = FALSE, bName = FALSE, bNumFmt = FALSE,
- bInvisible = FALSE, bSeparator = FALSE, bChapterLevel = FALSE;
- BOOL bFormat = nSize != 0;
+ sal_Bool bValue = sal_False, bName = sal_False, bNumFmt = sal_False,
+ bInvisible = sal_False, bSeparator = sal_False, bChapterLevel = sal_False;
+ sal_Bool bFormat = nSize != 0;
switch (nTypeId)
{
@@ -322,23 +322,23 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aValueED.SetText(aEmptyStr);
}
}
- bValue = bName = bNumFmt = bInvisible = TRUE;
+ bValue = bName = bNumFmt = bInvisible = sal_True;
- aValueED.SetDropEnable(TRUE);
+ aValueED.SetDropEnable(sal_True);
break;
}
case TYP_SETFLD:
- bValue = TRUE;
+ bValue = sal_True;
- bNumFmt = bInvisible = TRUE;
+ bNumFmt = bInvisible = sal_True;
if (!IsFldDlgHtmlMode())
- bName = TRUE;
+ bName = sal_True;
else
{
aNumFormatLB.Clear();
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
aNumFormatLB.SelectEntryPos(0);
}
@@ -375,15 +375,15 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
// (statt test2 = test + 1)
aValueED.SetText(((SwSetExpField*)GetCurField())->GetFormula());
}
- aValueED.SetDropEnable(TRUE);
+ aValueED.SetDropEnable(sal_True);
break;
case TYP_FORMELFLD:
{
- bValue = TRUE;
- bNumFmt = TRUE;
+ bValue = sal_True;
+ bNumFmt = sal_True;
aValueFT.SetText(SW_RESSTR(STR_FORMULA));
- aValueED.SetDropEnable(TRUE);
+ aValueED.SetDropEnable(sal_True);
}
break;
@@ -413,14 +413,14 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if(pSetTyp)
{
if (pSetTyp->GetType() & nsSwGetSetExpType::GSE_STRING) // Textuell?
- bFormat = TRUE;
+ bFormat = sal_True;
else // Numerisch
- bNumFmt = TRUE;
+ bNumFmt = sal_True;
}
}
}
else
- bFormat = FALSE;
+ bFormat = sal_False;
EnableInsert(bFormat|bNumFmt);
}
@@ -431,7 +431,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if (nSelPos != LISTBOX_ENTRY_NOTFOUND)
{
- bValue = bNumFmt = TRUE;
+ bValue = bNumFmt = sal_True;
String sName;
@@ -439,8 +439,8 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aNameED.SetText( sName );
// User- oder SetField ?
- USHORT nInpType = 0;
- nInpType = static_cast< USHORT >(GetFldMgr().GetFldType(RES_USERFLD, sName) ? 0 : TYP_SETINPFLD);
+ sal_uInt16 nInpType = 0;
+ nInpType = static_cast< sal_uInt16 >(GetFldMgr().GetFldType(RES_USERFLD, sName) ? 0 : TYP_SETINPFLD);
if (nInpType) // SETEXPFLD
{
@@ -454,7 +454,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
{
aNumFormatLB.Clear();
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_USERVAR_TEXT), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_USERVAR_TEXT), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
aNumFormatLB.SelectEntryPos(0);
}
@@ -463,7 +463,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aValueED.SetText(((SwSetExpField*)GetCurField())->GetPromptText());
}
else // USERFLD
- bFormat = bNumFmt = FALSE;
+ bFormat = bNumFmt = sal_False;
}
break;
@@ -484,7 +484,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
//JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren
// Namen haben! Wird hier noch nicht beachtet
String sCmd( pType->GetCmd() );
- USHORT nTmpPos = sCmd.SearchAndReplace( sfx2::cTokenSeperator, ' ' );
+ sal_uInt16 nTmpPos = sCmd.SearchAndReplace( sfx2::cTokenSeperator, ' ' );
sCmd.SearchAndReplace( sfx2::cTokenSeperator, ' ', nTmpPos );
aValueED.SetText( sCmd );
@@ -492,13 +492,13 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
}
}
}
- bName = bValue = TRUE;
+ bName = bValue = sal_True;
break;
case TYP_SEQFLD:
{
- // aNumRB.Check(TRUE);
- bName = bValue = bSeparator = bChapterLevel = TRUE;
+ // aNumRB.Check(sal_True);
+ bName = bValue = bSeparator = bChapterLevel = sal_True;
SwFieldType* pFldTyp;
if( IsFldEdit() )
@@ -522,7 +522,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if( pFldTyp )
{
- BYTE nLevel = ((SwSetExpFieldType*)pFldTyp)->GetOutlineLvl();
+ sal_uInt8 nLevel = ((SwSetExpFieldType*)pFldTyp)->GetOutlineLvl();
if( 0x7f == nLevel )
aChapterLevelLB.SelectEntryPos( 0 );
else
@@ -536,7 +536,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
case TYP_SETREFPAGEFLD:
{
- bValue = FALSE;
+ bValue = sal_False;
aValueFT.SetText( SW_RESSTR( STR_OFFSET ));
if (IsFldEdit() || pBox) // Nur bei Interaktion mit Maus
@@ -544,7 +544,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if (nSelPos != 0 && nSelPos != LISTBOX_ENTRY_NOTFOUND)
{
- bValue = TRUE; // SubType OFF - kennt keinen Offset
+ bValue = sal_True; // SubType OFF - kennt keinen Offset
if (IsFldEdit())
aValueED.SetText(String::CreateFromInt32(((SwRefPageSetField*)GetCurField())->GetOffset()));
}
@@ -561,7 +561,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aFormatLB.Show(!bNumFmt);
if (IsFldEdit())
- bName = FALSE;
+ bName = sal_False;
aFormatLB.Enable(bFormat);
aFormatFT.Enable(bFormat|bNumFmt);
@@ -589,12 +589,12 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
ModifyHdl(); // Anwenden/Einfuegen/Loeschen Status update
- aNumFormatLB.SetUpdateMode(TRUE);
- aFormatLB.SetUpdateMode(TRUE);
+ aNumFormatLB.SetUpdateMode(sal_True);
+ aFormatLB.SetUpdateMode(sal_True);
if(aSelectionLB.IsCallAddSelection())
{
- nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
switch (nTypeId)
{
@@ -603,7 +603,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
nSelPos = aSelectionLB.GetSelectEntryPos();
if (nSelPos != LISTBOX_ENTRY_NOTFOUND)
- nSelPos = (USHORT)(ULONG)aSelectionLB.GetEntryData(nSelPos);
+ nSelPos = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nSelPos);
if (nSelPos != LISTBOX_ENTRY_NOTFOUND && pBox && !bInit)
{
@@ -625,22 +625,22 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
void SwFldVarPage::UpdateSubType()
{
String sOldSel;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
SetSelectionSel(aSelectionLB.GetSelectEntryPos());
if(GetSelectionSel() != LISTBOX_ENTRY_NOTFOUND)
sOldSel = aSelectionLB.GetEntry(GetSelectionSel());
// Auswahl-Listbox fuellen
- aSelectionLB.SetUpdateMode(FALSE);
+ aSelectionLB.SetUpdateMode(sal_False);
aSelectionLB.Clear();
SvStringsDtor aList;
GetFldMgr().GetSubTypes(nTypeId, aList);
- USHORT nCount = aList.Count();
- USHORT nPos;
+ sal_uInt16 nCount = aList.Count();
+ sal_uInt16 nPos;
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
if (nTypeId != TYP_INPUTFLD || i)
{
@@ -651,29 +651,29 @@ void SwFldVarPage::UpdateSubType()
}
else
{
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
switch (nTypeId)
{
case TYP_INPUTFLD:
if (*aList[i] == GetCurField()->GetPar1())
- bInsert = TRUE;
+ bInsert = sal_True;
break;
case TYP_FORMELFLD:
- bInsert = TRUE;
+ bInsert = sal_True;
break;
case TYP_GETFLD:
if (*aList[i] == ((SwFormulaField*)GetCurField())->GetFormula())
- bInsert = TRUE;
+ bInsert = sal_True;
break;
case TYP_SETFLD:
case TYP_USERFLD:
if (*aList[i] == GetCurField()->GetTyp()->GetName())
{
- bInsert = TRUE;
+ bInsert = sal_True;
if (GetCurField()->GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE)
aInvisibleCB.Check();
}
@@ -691,7 +691,7 @@ void SwFldVarPage::UpdateSubType()
default:
if (*aList[i] == GetCurField()->GetPar1())
- bInsert = TRUE;
+ bInsert = sal_True;
break;
}
if (bInsert)
@@ -705,7 +705,7 @@ void SwFldVarPage::UpdateSubType()
}
}
- BOOL bEnable = aSelectionLB.GetEntryCount() != 0;
+ sal_Bool bEnable = aSelectionLB.GetEntryCount() != 0;
ListBox *pLB = 0;
if (bEnable)
@@ -722,23 +722,23 @@ void SwFldVarPage::UpdateSubType()
aSelectionFT.Enable( bEnable );
SubTypeHdl(pLB);
- aSelectionLB.SetUpdateMode(TRUE);
+ aSelectionLB.SetUpdateMode(sal_True);
}
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
+sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
{
String sOldSel, sOldNumSel;
- ULONG nOldNumFormat = 0;
+ sal_uLong nOldNumFormat = 0;
- USHORT nFormatSel = aFormatLB.GetSelectEntryPos();
+ sal_uInt16 nFormatSel = aFormatLB.GetSelectEntryPos();
if (nFormatSel != LISTBOX_ENTRY_NOTFOUND)
sOldSel = aFormatLB.GetEntry(nFormatSel);
- USHORT nNumFormatSel = aNumFormatLB.GetSelectEntryPos();
+ sal_uInt16 nNumFormatSel = aNumFormatLB.GetSelectEntryPos();
if (nNumFormatSel != LISTBOX_ENTRY_NOTFOUND)
{
sOldNumSel = aNumFormatLB.GetEntry(nNumFormatSel);
@@ -748,7 +748,7 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
// Format-Listbox fuellen
aFormatLB.Clear();
aNumFormatLB.Clear();
- BOOL bSpecialFmt = FALSE;
+ sal_Bool bSpecialFmt = sal_False;
if( TYP_GETREFPAGEFLD != nTypeId )
{
@@ -780,7 +780,7 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
{
if (!IsFldEdit() || bSpecialFmt)
{
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_MARK_TEXT), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_MARK_TEXT), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_USERVAR_CMD), 1);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
@@ -792,7 +792,7 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
{
if (!IsFldEdit() || bSpecialFmt)
{
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
}
}
@@ -800,14 +800,14 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
case TYP_FORMELFLD:
{
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
}
break;
case TYP_GETFLD:
{
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
}
break;
@@ -828,12 +828,12 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
aNumFormatLB.SelectEntry(sOldSel);
}
- USHORT nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
+ sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode());
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
{
- USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
- USHORT nFldId = GetFldMgr().GetFormatId( nTypeId, i );
+ sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_uInt16 nFldId = GetFldMgr().GetFormatId( nTypeId, i );
aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(nFldId) );
if (IsFldEdit() && nFldId == GetCurField()->GetFormat())
aFormatLB.SelectEntryPos( nPos );
@@ -865,9 +865,9 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
{
String sValue(aValueED.GetText());
- BOOL bHasValue = sValue.Len() != 0;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
- BOOL bInsert = FALSE, bApply = FALSE, bDelete = FALSE;
+ sal_Bool bHasValue = sValue.Len() != 0;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bInsert = sal_False, bApply = sal_False, bDelete = sal_False;
String sName( aNameED.GetText() );
xub_StrLen nLen = sName.Len();
@@ -897,7 +897,7 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
if( nLen )
{
// Gibts schon einen entsprechenden Type
- bInsert = bApply = TRUE;
+ bInsert = bApply = sal_True;
SwFieldType* pType = GetFldMgr().GetFldType(RES_DDEFLD, sName);
@@ -926,13 +926,13 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
{
// Benutzerfelder duerfen auch ohne Inhalt eingefuegt werden!
// Bug #56845
- bInsert = bApply = TRUE;
+ bInsert = bApply = sal_True;
}
}
break;
default:
- bInsert = TRUE;
+ bInsert = sal_True;
if (nTypeId == TYP_SETFLD || nTypeId == TYP_SEQFLD)
{
@@ -948,7 +948,7 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
if(pSh)
{
const SwFldTypes* p = pSh->GetDoc()->GetFldTypes();
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < INIT_FLDTYPES; i++)
{
@@ -958,26 +958,26 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
}
if (i >= INIT_FLDTYPES && !pSh->IsUsed(*pFldType))
- bDelete = TRUE;
+ bDelete = sal_True;
if (nTypeId == TYP_SEQFLD && !(pFldType->GetType() & nsSwGetSetExpType::GSE_SEQ))
- bInsert = FALSE;
+ bInsert = sal_False;
if (nTypeId == TYP_SETFLD && (pFldType->GetType() & nsSwGetSetExpType::GSE_SEQ))
- bInsert = FALSE;
+ bInsert = sal_False;
}
}
if (GetFldMgr().GetFldType(RES_USERFLD, sName))
- bInsert = FALSE;
+ bInsert = sal_False;
}
if( !nLen && ( nTypeId == TYP_SETFLD ||
(!IsFldEdit() && nTypeId == TYP_GETFLD ) ) )
- bInsert = FALSE;
+ bInsert = sal_False;
if( (nTypeId == TYP_SETFLD || nTypeId == TYP_FORMELFLD) &&
!bHasValue )
- bInsert = FALSE;
+ bInsert = sal_False;
break;
}
@@ -994,7 +994,7 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
switch (pBox->GetCurItemId())
{
@@ -1004,7 +1004,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
GetFldMgr().RemoveFldType(RES_USERFLD, aSelectionLB.GetSelectEntry());
else
{
- USHORT nWhich;
+ sal_uInt16 nWhich;
switch(nTypeId)
{
@@ -1035,8 +1035,8 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
String sName(aNameED.GetText()), sValue(aValueED.GetText());
SwFieldType* pType = 0;
- USHORT nId = 0;
- USHORT nNumFormatPos = aNumFormatLB.GetSelectEntryPos();
+ sal_uInt16 nId = 0;
+ sal_uInt16 nNumFormatPos = aNumFormatLB.GetSelectEntryPos();
switch (nTypeId)
{
@@ -1046,9 +1046,9 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
}
pType = GetFldMgr().GetFldType(nId, sName);
- ULONG nFormat = aFormatLB.GetSelectEntryPos();
+ sal_uLong nFormat = aFormatLB.GetSelectEntryPos();
if (nFormat != LISTBOX_ENTRY_NOTFOUND)
- nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat);
+ nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat);
if (pType) // Aendern
{
@@ -1063,7 +1063,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
if (nNumFormatPos != LISTBOX_ENTRY_NOTFOUND)
{
- ULONG nFmt = nNumFormatPos == 0 ? 0 : aNumFormatLB.GetFormat();
+ sal_uLong nFmt = nNumFormatPos == 0 ? 0 : aNumFormatLB.GetFormat();
if (nFmt)
{ // Sprache auf Office-Sprache umstellen, da String im Office
// Format vom Kalkulator erwartet wird und so in den Dlg
@@ -1081,10 +1081,10 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
//JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren
// Namen haben! Wird hier noch nicht beachtet.
- USHORT nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator );
+ sal_uInt16 nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator );
sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos );
((SwDDEFieldType*)pType)->SetCmd(sValue);
- ((SwDDEFieldType*)pType)->SetType((USHORT)nFormat);
+ ((SwDDEFieldType*)pType)->SetType((sal_uInt16)nFormat);
}
}
pType->UpdateFlds();
@@ -1119,10 +1119,10 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
//JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren
// Namen haben! Wird hier noch nicht beachtet.
- USHORT nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator );
+ sal_uInt16 nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator );
sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos );
- SwDDEFieldType aType(sName, sValue, (USHORT)nFormat);
+ SwDDEFieldType aType(sName, sValue, (sal_uInt16)nFormat);
aSelectionLB.InsertEntry(sName);
aSelectionLB.SelectEntry(sName);
GetFldMgr().InsertFldType(aType); // DDE-Feld Neu
@@ -1137,7 +1137,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
break;
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -1146,7 +1146,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
IMPL_LINK( SwFldVarPage, ChapterHdl, ListBox *, EMPTYARG )
{
- BOOL bEnable = aChapterLevelLB.GetSelectEntryPos() != 0;
+ sal_Bool bEnable = aChapterLevelLB.GetSelectEntryPos() != 0;
aSeparatorED.Enable(bEnable);
aSeparatorFT.Enable(bEnable);
@@ -1161,7 +1161,7 @@ IMPL_LINK( SwFldVarPage, ChapterHdl, ListBox *, EMPTYARG )
IMPL_LINK( SwFldVarPage, SeparatorHdl, Edit *, EMPTYARG )
{
- BOOL bEnable = aSeparatorED.GetText().Len() != 0 ||
+ sal_Bool bEnable = aSeparatorED.GetText().Len() != 0 ||
aChapterLevelLB.GetSelectEntryPos() == 0;
EnableInsert(bEnable);
@@ -1172,20 +1172,20 @@ IMPL_LINK( SwFldVarPage, SeparatorHdl, Edit *, EMPTYARG )
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwFldVarPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
String aVal(aValueED.GetText());
String aName(aNameED.GetText());
- USHORT nSubType = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nSubType = aSelectionLB.GetSelectEntryPos();
if(nSubType == LISTBOX_ENTRY_NOTFOUND)
nSubType = 0;
else
- nSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nSubType);
+ nSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nSubType);
- ULONG nFormat;
+ sal_uLong nFormat;
if (!aNumFormatLB.IsVisible())
{
@@ -1194,7 +1194,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& )
if(nFormat == LISTBOX_ENTRY_NOTFOUND)
nFormat = 0;
else
- nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat);
+ nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat);
}
else
{
@@ -1245,7 +1245,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& )
case TYP_INPUTFLD:
{
SwFieldType* pType = GetFldMgr().GetFldType(RES_USERFLD, aName);
- nSubType = static_cast< USHORT >((nSubType & 0xff00) | ((pType) ? INP_USR : INP_VAR));
+ nSubType = static_cast< sal_uInt16 >((nSubType & 0xff00) | ((pType) ? INP_USR : INP_VAR));
break;
}
@@ -1274,7 +1274,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& )
nSubType--;
String sSeparator(aSeparatorED.GetText().GetChar(0));
cSeparator = sSeparator.Len() ? sSeparator.GetChar(0) : ' ';
- //nSubType |= (USHORT)(((BYTE)) << 8);
+ //nSubType |= (sal_uInt16)(((sal_uInt8)) << 8);
}
break;
}
@@ -1300,7 +1300,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& )
UpdateSubType();
- return FALSE;
+ return sal_False;
}
@@ -1318,7 +1318,7 @@ SfxTabPage* SwFldVarPage::Create( Window* pParent,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFldVarPage::GetGroup()
+sal_uInt16 SwFldVarPage::GetGroup()
{
return GRP_VAR;
}
@@ -1330,7 +1330,7 @@ USHORT SwFldVarPage::GetGroup()
SelectionListBox::SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId ) :
ListBox (pDialog, rResId),
pDlg (pDialog),
- bCallAddSelection(FALSE)
+ bCallAddSelection(sal_False)
{
}
@@ -1341,23 +1341,23 @@ SelectionListBox::SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId )
long SelectionListBox::PreNotify( NotifyEvent& rNEvt )
{
long nHandled = ListBox::PreNotify( rNEvt );
- //BOOL bAddSel = FALSE;
+ //sal_Bool bAddSel = sal_False;
if ( rNEvt.GetType() == EVENT_KEYUP )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
const KeyCode aKeyCode = pKEvt->GetKeyCode();
- const USHORT nModifier = aKeyCode.GetModifier();
+ const sal_uInt16 nModifier = aKeyCode.GetModifier();
if( aKeyCode.GetCode() == KEY_SPACE && !nModifier)
-// bAddSel = TRUE;
- bCallAddSelection = TRUE;
+// bAddSel = sal_True;
+ bCallAddSelection = sal_True;
}
if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
{
const MouseEvent* pMEvt = rNEvt.GetMouseEvent();
if (pMEvt && (pMEvt->IsMod1() || pMEvt->IsMod2())) // Alt oder Ctrl
- //bAddSel = TRUE;
- bCallAddSelection = TRUE;
+ //bAddSel = sal_True;
+ bCallAddSelection = sal_True;
}
// if (bAddSel)
@@ -1372,11 +1372,11 @@ void SwFldVarPage::FillUserData()
{
String sData(String::CreateFromAscii(USER_DATA_VERSION));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = (USHORT)(ULONG)aTypeLB.GetEntryData( nTypeSel );
+ nTypeSel = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData( nTypeSel );
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx
index dd4665198589..3c3ecf60b983 100644
--- a/sw/source/ui/fldui/fldvar.hxx
+++ b/sw/source/ui/fldui/fldvar.hxx
@@ -50,7 +50,7 @@ class SwFldVarPage;
class SelectionListBox : public ListBox
{
SwFldVarPage* pDlg;
- BOOL bCallAddSelection;
+ sal_Bool bCallAddSelection;
virtual long PreNotify( NotifyEvent& rNEvt );
@@ -58,8 +58,8 @@ public:
SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId );
// Selektieren per Ctrl oder Alt erkennen und mit SelectHdl auswerten
- BOOL IsCallAddSelection() const {return bCallAddSelection;}
- void ResetCallAddSelection() {bCallAddSelection = FALSE;}
+ sal_Bool IsCallAddSelection() const {return bCallAddSelection;}
+ void ResetCallAddSelection() {bCallAddSelection = sal_False;}
};
/*--------------------------------------------------------------------
@@ -92,8 +92,8 @@ class SwFldVarPage : public SwFldPage
String sOldValueFT;
String sOldNameFT;
- ULONG nOldFormat;
- BOOL bInit;
+ sal_uLong nOldFormat;
+ sal_Bool bInit;
DECL_LINK( TypeHdl, ListBox* pLB = 0 );
DECL_LINK( SubTypeHdl, ListBox* pLB = 0 );
@@ -103,10 +103,10 @@ class SwFldVarPage : public SwFldPage
DECL_LINK( SeparatorHdl, Edit *pED = 0 );
void UpdateSubType();
- USHORT FillFormatLB(USHORT nTypeId);
+ sal_uInt16 FillFormatLB(sal_uInt16 nTypeId);
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldVarPage(Window* pParent, const SfxItemSet& rSet);
@@ -115,7 +115,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/fldwrap.cxx b/sw/source/ui/fldui/fldwrap.cxx
index 18f291d5b6e6..bda3a14282f8 100644
--- a/sw/source/ui/fldui/fldwrap.cxx
+++ b/sw/source/ui/fldui/fldwrap.cxx
@@ -67,7 +67,7 @@ SFX_IMPL_CHILDWINDOW(SwFldDlgWrapper, FN_INSERT_FIELD)
Beschreibung:
--------------------------------------------------------------------*/
-SwChildWinWrapper::SwChildWinWrapper(Window *pParentWindow, USHORT nId) :
+SwChildWinWrapper::SwChildWinWrapper(Window *pParentWindow, sal_uInt16 nId) :
SfxChildWindow(pParentWindow, nId),
m_pDocSh(0)
{
@@ -91,14 +91,14 @@ IMPL_LINK( SwChildWinWrapper, UpdateHdl, void*, EMPTYARG )
Beschreibung: Nach Dok-Wechsel Dialog neu initialisieren
--------------------------------------------------------------------*/
-BOOL SwChildWinWrapper::ReInitDlg(SwDocShell *)
+sal_Bool SwChildWinWrapper::ReInitDlg(SwDocShell *)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (m_pDocSh != GetOldDocShell())
{
m_aUpdateTimer.Stop();
- bRet = TRUE; // Sofortiges Update
+ bRet = sal_True; // Sofortiges Update
}
else
m_aUpdateTimer.Start();
@@ -122,7 +122,7 @@ SfxChildWinInfo SwFldDlgWrapper::GetInfo() const
Beschreibung:
--------------------------------------------------------------------*/
-SwFldDlgWrapper::SwFldDlgWrapper( Window* _pParent, USHORT nId,
+SwFldDlgWrapper::SwFldDlgWrapper( Window* _pParent, sal_uInt16 nId,
SfxBindings* pB,
SfxChildWinInfo* )
: SwChildWinWrapper( _pParent, nId )
@@ -142,11 +142,11 @@ SwFldDlgWrapper::SwFldDlgWrapper( Window* _pParent, USHORT nId,
Beschreibung: Nach Dok-Wechsel Dialog neu initialisieren
--------------------------------------------------------------------*/
-BOOL SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
+sal_Bool SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
{
- BOOL bRet;
+ sal_Bool bRet;
- if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == TRUE) // Sofort aktualisieren, Dok-Wechsel
+ if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == sal_True) // Sofort aktualisieren, Dok-Wechsel
{
pDlgInterface->ReInitDlg();
}
@@ -158,7 +158,7 @@ BOOL SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
Beschreibung:
--------------------------------------------------------------------*/
-void SwFldDlgWrapper::ShowPage(USHORT nPage)
+void SwFldDlgWrapper::ShowPage(sal_uInt16 nPage)
{
pDlgInterface->ShowPage(nPage ? nPage : TP_FLD_REF);
}
@@ -173,13 +173,13 @@ SfxChildWinInfo SwFldDataOnlyDlgWrapper::GetInfo() const
SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
// prevent instatiation of dialog other than by calling
// the mail merge dialog
- aInfo.bVisible = FALSE;
+ aInfo.bVisible = sal_False;
return aInfo;
}
/* -----------------04.02.2003 14:17-----------------
*
* --------------------------------------------------*/
-SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( Window* _pParent, USHORT nId,
+SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( Window* _pParent, sal_uInt16 nId,
SfxBindings* pB,
SfxChildWinInfo* pInfo )
: SwChildWinWrapper( _pParent, nId )
@@ -200,10 +200,10 @@ SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( Window* _pParent, USHORT nId,
/* -----------------04.02.2003 14:17-----------------
* re-init after doc activation
* --------------------------------------------------*/
-BOOL SwFldDataOnlyDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
+sal_Bool SwFldDataOnlyDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
{
- BOOL bRet;
- if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == TRUE) // Sofort aktualisieren, Dok-Wechsel
+ sal_Bool bRet;
+ if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == sal_True) // Sofort aktualisieren, Dok-Wechsel
{
pDlgInterface->ReInitDlg();
}
diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx
index 6676b72a1f84..b8c26c701b04 100644
--- a/sw/source/ui/fldui/inpdlg.cxx
+++ b/sw/source/ui/fldui/inpdlg.cxx
@@ -51,7 +51,7 @@
--------------------------------------------------------------------*/
SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS,
- SwField* pField, BOOL bNextButton ) :
+ SwField* pField, sal_Bool bNextButton ) :
SvxStandardDialog(pParent, SW_RES(DLG_FLD_INPUT)),
@@ -94,7 +94,7 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS,
//
pInpFld = (SwInputField*)pField;
aLabelED.SetText( pInpFld->GetPar2() );
- USHORT nSubType = pInpFld->GetSubType();
+ sal_uInt16 nSubType = pInpFld->GetSubType();
switch(nSubType & 0xff)
{
@@ -128,7 +128,7 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS,
// JP 31.3.00: Inputfields in readonly regions must be allowed to
// input any content. - 74639
- BOOL bEnable = !rSh.IsCrsrReadonly();
+ sal_Bool bEnable = !rSh.IsCrsrReadonly();
/*!rSh.IsReadOnlyAvailable() || !rSh.HasReadonlySel()*/;
aOKBT.Enable( bEnable );
aEditED.SetReadOnly( !bEnable );
@@ -159,7 +159,7 @@ void SwFldInputDlg::Apply()
aTmp.EraseAllChars( '\r' );
rSh.StartAllAction();
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if(pInpFld)
{
if(pUsrType)
@@ -168,21 +168,21 @@ void SwFldInputDlg::Apply()
{
pUsrType->SetContent(aTmp);
pUsrType->UpdateFlds();
- bModified = TRUE;
+ bModified = sal_True;
}
}
else if( aTmp != pInpFld->GetPar1() )
{
pInpFld->SetPar1(aTmp);
rSh.SwEditShell::UpdateFlds(*pInpFld);
- bModified = TRUE;
+ bModified = sal_True;
}
}
else if( aTmp != pSetFld->GetPar2() )
{
pSetFld->SetPar2(aTmp);
rSh.SwEditShell::UpdateFlds(*pSetFld);
- bModified = TRUE;
+ bModified = sal_True;
}
if( bModified )
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index 443bc075b7db..cd8081701b31 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -91,8 +91,8 @@ SwJavaEditDialog::SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh) :
aNextBtn ( this, SW_RES( BTN_NEXT ) ),
aHelpBtn ( this, SW_RES( BTN_POST_HELP ) ),
- bNew(TRUE),
- bIsUrl(FALSE),
+ bNew(sal_True),
+ bIsUrl(sal_False),
pSh(pWrtSh),
pFileDlg(NULL),
@@ -210,8 +210,8 @@ void SwJavaEditDialog::Apply()
void SwJavaEditDialog::CheckTravel()
{
- BOOL bTravel = FALSE;
- BOOL bNext(FALSE), bPrev(FALSE);
+ sal_Bool bTravel = sal_False;
+ sal_Bool bNext(sal_False), bPrev(sal_False);
if(!bNew)
{
@@ -299,7 +299,7 @@ void SwJavaEditDialog::SetFld()
aType = String::CreateFromAscii("JavaScript");
}
-BOOL SwJavaEditDialog::IsUpdate()
+sal_Bool SwJavaEditDialog::IsUpdate()
{
return pFld && ( bIsUrl != pFld->GetFormat() || pFld->GetPar2() != aType || pFld->GetPar1() != aText );
}
@@ -310,7 +310,7 @@ BOOL SwJavaEditDialog::IsUpdate()
IMPL_LINK( SwJavaEditDialog, RadioButtonHdl, RadioButton *, EMPTYARG )
{
- BOOL bEnable = aUrlRB.IsChecked();
+ sal_Bool bEnable = aUrlRB.IsChecked();
aUrlPB.Enable(bEnable);
aUrlED.Enable(bEnable);
aEditED.Enable(!bEnable);
@@ -323,7 +323,7 @@ IMPL_LINK( SwJavaEditDialog, RadioButtonHdl, RadioButton *, EMPTYARG )
aEditED.SetReadOnly( !bEnable);
aTypeED.SetReadOnly( !bEnable);
if( aUrlPB.IsEnabled() && !bEnable )
- aUrlPB.Enable( FALSE );
+ aUrlPB.Enable( sal_False );
}
return 0;
}
diff --git a/sw/source/ui/fldui/xfldui.cxx b/sw/source/ui/fldui/xfldui.cxx
index a86a78943711..15cb04547b41 100644
--- a/sw/source/ui/fldui/xfldui.cxx
+++ b/sw/source/ui/fldui/xfldui.cxx
@@ -67,13 +67,13 @@ using namespace ::com::sun::star::beans;
/*--------------------------------------------------------------------
Beschreibung: Ist das Datenbankfeld numerisch?
- Anm: Im Fehlerfall wird TRUE returnt.
+ Anm: Im Fehlerfall wird sal_True returnt.
--------------------------------------------------------------------*/
-BOOL SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName,
- BOOL bIsTable, const String& rFldName)
+sal_Bool SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName,
+ sal_Bool bIsTable, const String& rFldName)
{
- BOOL bNumeric = TRUE;
+ sal_Bool bNumeric = sal_True;
SwNewDBMgr* pDBMgr = pWrtShell ? pWrtShell->GetNewDBMgr() :
::GetActiveView()->GetWrtShell().GetNewDBMgr();
@@ -174,7 +174,7 @@ BOOL SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName,
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
default:
- bNumeric = FALSE;
+ bNumeric = sal_False;
}
}
}
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 015a31fce90e..bacee1ee3a5e 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -109,14 +109,14 @@ extern SW_DLLPUBLIC SwWrtShell* GetActiveWrtShell();
SwTemplateDlg::SwTemplateDlg(Window* pParent,
SfxStyleSheetBase& rBase,
- USHORT nRegion,
- BOOL bColumn,
+ sal_uInt16 nRegion,
+ sal_Bool bColumn,
SwWrtShell* pActShell,
- BOOL bNew ) :
+ sal_Bool bNew ) :
SfxStyleDialog( pParent,
SW_RES(DLG_TEMPLATE_BASE + nRegion),
rBase,
- FALSE,
+ sal_False,
0 ),
nType( nRegion ),
pWrtShell(pActShell),
@@ -295,7 +295,7 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
AddTabPage(TP_PAGE_STD, String(SW_RES(STR_PAGE_STD)),
pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ),
pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ),
- FALSE,
+ sal_False,
1 ); // nach der Verwalten-Page
if(!pActShell || 0 == ::GetHtmlMode(pWrtShell->GetView().GetDocShell()))
{
@@ -333,7 +333,7 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
/* const SfxPoolItem* pItem;
if(SFX_ITEM_SET == rBase.GetItemSet().GetItemState(
- FN_PARAM_ACT_NUMBER, FALSE, &pItem ))
+ FN_PARAM_ACT_NUMBER, sal_False, &pItem ))
{
// pActNum = (ActNumberFormat*)((const SwPtrItem*)pItem)->GetValue();
}
@@ -366,10 +366,10 @@ short SwTemplateDlg::Ok()
{
const SfxPoolItem *pOutItem, *pExItem;
if( SFX_ITEM_SET == pExampleSet->GetItemState(
- SID_ATTR_NUMBERING_RULE, FALSE, &pExItem ) &&
+ SID_ATTR_NUMBERING_RULE, sal_False, &pExItem ) &&
( !GetOutputItemSet() ||
SFX_ITEM_SET != GetOutputItemSet()->GetItemState(
- SID_ATTR_NUMBERING_RULE, FALSE, &pOutItem ) ||
+ SID_ATTR_NUMBERING_RULE, sal_False, &pOutItem ) ||
*pExItem != *pOutItem ))
{
if( GetOutputItemSet() )
@@ -401,7 +401,7 @@ const SfxItemSet* SwTemplateDlg::GetRefreshedSet()
Beschreibung:
--------------------------------------------------------------------*/
-void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
//Namen der Vorlagen und Metric setzen
String sNumCharFmt, sBulletCharFmt;
@@ -419,7 +419,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ) ) );
aSet.Put (SvxFontListItem( aFontListItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
- UINT32 nFlags = 0;
+ sal_uInt32 nFlags = 0;
if(rPage.GetItemSet().GetParent() && 0 == (nHtmlMode & HTMLMODE_ON ))
nFlags = SVX_RELATIVE_MODE;
if( SFX_STYLE_FAMILY_CHAR == nType )
@@ -431,7 +431,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
case TP_CHAR_EXT:
{
- UINT32 nFlags = SVX_ENABLE_FLASH;
+ sal_uInt32 nFlags = SVX_ENABLE_FLASH;
if( SFX_STYLE_FAMILY_CHAR == nType )
nFlags = nFlags|SVX_PREVIEW_CHARACTER;
aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlags));
@@ -486,35 +486,35 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
aNames.Insert(new String(pBase->GetName()));
pBase = pPool->Next();
}
- for(USHORT i = 0; i < aNames.Count(); i++)
+ for(sal_uInt16 i = 0; i < aNames.Count(); i++)
rBox.InsertEntry(*aNames.GetObject(i));
}
break;
case TP_PARA_ALIGN:
{
- aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,TRUE));
+ aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,sal_True));
rPage.PageCreated(aSet);
}
break;
case TP_FRM_STD:
- ((SwFrmPage&)rPage).SetNewFrame( TRUE );
- ((SwFrmPage&)rPage).SetFormatUsed( TRUE );
+ ((SwFrmPage&)rPage).SetNewFrame( sal_True );
+ ((SwFrmPage&)rPage).SetFormatUsed( sal_True );
break;
case TP_FRM_ADD:
- ((SwFrmAddPage&)rPage).SetFormatUsed(TRUE);
- ((SwFrmAddPage&)rPage).SetNewFrame(TRUE);
+ ((SwFrmAddPage&)rPage).SetFormatUsed(sal_True);
+ ((SwFrmAddPage&)rPage).SetNewFrame(sal_True);
break;
case TP_FRM_WRAP:
- ((SwWrapTabPage&)rPage).SetFormatUsed( TRUE, FALSE );
+ ((SwWrapTabPage&)rPage).SetFormatUsed( sal_True, sal_False );
break;
case TP_COLUMN:
if( nType == SFX_STYLE_FAMILY_FRAME )
- ((SwColumnPage&)rPage).SetFrmMode(TRUE);
- ((SwColumnPage&)rPage).SetFormatUsed( TRUE );
+ ((SwColumnPage&)rPage).SetFrmMode(sal_True);
+ ((SwColumnPage&)rPage).SetFormatUsed( sal_True );
break;
case TP_BACKGROUND:
@@ -541,7 +541,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
List aList;
String* pNew = new String;
SwStyleNameMapper::FillUIName( RES_POOLCOLL_TEXT, *pNew );
- aList.Insert( pNew, (ULONG)0 );
+ aList.Insert( pNew, (sal_uLong)0 );
if( pWrtShell )
{
SfxStyleSheetBasePool* pStyleSheetPool = pWrtShell->
@@ -557,7 +557,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
}
aSet.Put (SfxStringListItem(SID_COLLECT_LIST, &aList));
rPage.PageCreated(aSet);
- for( USHORT i = (USHORT)aList.Count(); i; --i )
+ for( sal_uInt16 i = (sal_uInt16)aList.Count(); i; --i )
delete (String*)aList.Remove(i);
}
break;
@@ -591,16 +591,16 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell();
::FillCharStyleListBox(rCharFmtLB, pDocShell);
List aList;
- for(USHORT j = 0; j < rCharFmtLB.GetEntryCount(); j++)
+ for(sal_uInt16 j = 0; j < rCharFmtLB.GetEntryCount(); j++)
{
aList.Insert( new XubString(rCharFmtLB.GetEntry(j)), LIST_APPEND );
}
aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric)));
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
rPage.PageCreated(aSet);
- for( USHORT i = (USHORT)aList.Count(); i; --i )
+ for( sal_uInt16 i = (sal_uInt16)aList.Count(); i; --i )
delete (XubString*)aList.Remove(i);
aList.Clear();
}
@@ -610,7 +610,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric)));
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
rPage.PageCreated(aSet);
}
break;
diff --git a/sw/source/ui/frmdlg/colex.cxx b/sw/source/ui/frmdlg/colex.cxx
index 2cdc9fb014f0..f9b3a678f8f2 100644
--- a/sw/source/ui/frmdlg/colex.cxx
+++ b/sw/source/ui/frmdlg/colex.cxx
@@ -57,9 +57,9 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
{
const SvxPageItem* pPage = 0;
SfxItemPool* pPool = rSet.GetPool();
- USHORT nWhich = pPool->GetWhich( SID_ATTR_PAGE );
+ sal_uInt16 nWhich = pPool->GetWhich( SID_ATTR_PAGE );
- if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
{
// Ausrichtung
pPage = (const SvxPageItem*)&rSet.Get( nWhich );
@@ -70,14 +70,14 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
nWhich = pPool->GetWhich( SID_ATTR_PAGE_SIZE );
- if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
{
// Orientation und Size aus dem PageItem
const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( nWhich );
SetSize( rSize.GetSize() );
}
nWhich = RES_LR_SPACE;
- if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
{
// linken und rechten Rand einstellen
const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rSet.Get( nWhich );
@@ -93,7 +93,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
nWhich = RES_UL_SPACE;
- if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
{
// oberen und unteren Rand einstellen
const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)rSet.Get( nWhich );
@@ -111,7 +111,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
// Kopfzeilen-Attribute auswerten
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_HEADERSET),
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rHeaderOn =
@@ -131,7 +131,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
SetHdDist( rUL.GetLower() );
SetHdLeft( rLR.GetLeft() );
SetHdRight( rLR.GetRight() );
- SetHeader( TRUE );
+ SetHeader( sal_True );
if ( rHeaderSet.GetItemState( RES_BACKGROUND ) == SFX_ITEM_SET )
{
const SvxBrushItem& rItem =
@@ -146,11 +146,11 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
}
}
else
- SetHeader( FALSE );
+ SetHeader( sal_False );
}
if( SFX_ITEM_SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_FOOTERSET),
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rFooterOn =
@@ -170,7 +170,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
SetFtDist( rUL.GetUpper() );
SetFtLeft( rLR.GetLeft() );
SetFtRight( rLR.GetRight() );
- SetFooter( TRUE );
+ SetFooter( sal_True );
if( rFooterSet.GetItemState( RES_BACKGROUND ) == SFX_ITEM_SET )
{
const SvxBrushItem& rItem =
@@ -185,10 +185,10 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
}
}
else
- SetFooter( FALSE );
+ SetFooter( sal_False );
}
if( SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
SetColor( ( (const SvxBrushItem*)pItem )->GetColor() );
const Graphic* pGrf = ( (const SvxBrushItem*)pItem )->GetGraphic();
@@ -210,11 +210,11 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
void SwColExample::DrawPage( const Point& rOrg,
- const BOOL bSecond,
- const BOOL bEnabled )
+ const sal_Bool bSecond,
+ const sal_Bool bEnabled )
{
SwPageExample::DrawPage( rOrg, bSecond, bEnabled );
- USHORT nColumnCount;
+ sal_uInt16 nColumnCount;
if( pColMgr && 0 != (nColumnCount = pColMgr->GetCount()))
{
long nL = GetLeft();
@@ -247,18 +247,18 @@ void SwColExample::DrawPage( const Point& rOrg,
SetFillColor( GetColor() );
// #97495# make sure that the automatic column widht's are always equal
- BOOL bAutoWidth = pColMgr->IsAutoWidth();
+ sal_Bool bAutoWidth = pColMgr->IsAutoWidth();
sal_Int32 nAutoColWidth = 0;
if(bAutoWidth)
{
sal_Int32 nColumnWidthSum = 0;
- USHORT i;
+ sal_uInt16 i;
for(i = 0; i < nColumnCount; ++i)
nColumnWidthSum += pColMgr->GetColWidth( i );
nAutoColWidth = nColumnWidthSum / nColumnCount;
}
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < nColumnCount; i++)
{
if(!bAutoWidth)
@@ -326,7 +326,7 @@ SwColumnOnlyExample::SwColumnOnlyExample( Window* pParent, const ResId& rResId)
SetBorderStyle( WINDOW_BORDER_MONO );
m_aFrmSize = SvxPaperInfo::GetPaperSize(PAPER_A4);// DIN A4
- ::FitToActualSize(m_aCols, (USHORT)m_aFrmSize.Width());
+ ::FitToActualSize(m_aCols, (sal_uInt16)m_aFrmSize.Width());
long nHeight = m_aFrmSize.Height();
Fraction aScale( m_aWinSize.Height(), nHeight );
@@ -377,12 +377,12 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
long nLength = aLogSize.Height() - 2 * aTL.Y();
Point aUp( aTL );
Point aDown( aTL.X(), nLength );
- BOOL bLines = FALSE;
+ sal_Bool bLines = sal_False;
if(m_aCols.GetLineAdj() != COLADJ_NONE)
{
- bLines = TRUE;
+ bLines = sal_True;
- USHORT nPercent = m_aCols.GetLineHeight();
+ sal_uInt16 nPercent = m_aCols.GetLineHeight();
if( nPercent != 100 )
{
nLength -= nLength * nPercent / 100;
@@ -400,14 +400,14 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
}
const SwColumns& rCols = m_aCols.GetColumns();
- USHORT nColCount = rCols.Count();
+ sal_uInt16 nColCount = rCols.Count();
if( nColCount )
{
DrawRect(aRect);
SetFillColor( rFieldColor );
Rectangle aFrmRect(aTL, m_aFrmSize);
long nSum = aTL.X();
- for(USHORT i = 0; i < nColCount; i++)
+ for(sal_uInt16 i = 0; i < nColCount; i++)
{
SwColumn* pCol = rCols[i];
aFrmRect.Left() = nSum + pCol->GetLeft();//nSum + pCol->GetLeft() + aTL.X();
@@ -418,7 +418,7 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
if(bLines )
{
nSum = aTL.X();
- for(USHORT i = 0; i < nColCount - 1; i++)
+ for(sal_uInt16 i = 0; i < nColCount - 1; i++)
{
nSum += rCols[i]->GetWishWidth();
aUp.X() = nSum;
@@ -437,32 +437,32 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
void SwColumnOnlyExample::SetColumns(const SwFmtCol& rCol)
{
m_aCols = rCol;
- USHORT nWishSum = m_aCols.GetWishWidth();
+ sal_uInt16 nWishSum = m_aCols.GetWishWidth();
long nFrmWidth = m_aFrmSize.Width();
SwColumns& rCols = m_aCols.GetColumns();
- USHORT nColCount = rCols.Count();
+ sal_uInt16 nColCount = rCols.Count();
- for(USHORT i = 0; i < nColCount; i++)
+ for(sal_uInt16 i = 0; i < nColCount; i++)
{
SwColumn* pCol = rCols[i];
long nWish = pCol->GetWishWidth();
nWish *= nFrmWidth;
nWish /= nWishSum;
- pCol->SetWishWidth((USHORT)nWish);
+ pCol->SetWishWidth((sal_uInt16)nWish);
long nLeft = pCol->GetLeft();
nLeft *= nFrmWidth;
nLeft /= nWishSum;
- pCol->SetLeft((USHORT)nLeft);
+ pCol->SetLeft((sal_uInt16)nLeft);
long nRight = pCol->GetRight();
nRight *= nFrmWidth;
nRight /= nWishSum;
- pCol->SetRight((USHORT)nRight);
+ pCol->SetRight((sal_uInt16)nRight);
}
// #97495# make sure that the automatic column width's are always equal
if(nColCount && m_aCols.IsOrtho())
{
sal_Int32 nColumnWidthSum = 0;
- USHORT i;
+ sal_uInt16 i;
for(i = 0; i < nColCount; ++i)
{
SwColumn* pCol = rCols[i];
@@ -473,7 +473,7 @@ void SwColumnOnlyExample::SetColumns(const SwFmtCol& rCol)
for(i = 0; i < nColCount; ++i)
{
SwColumn* pCol = rCols[i];
- pCol->SetWishWidth( static_cast< USHORT >(nColumnWidthSum + pCol->GetRight() + pCol->GetLeft()));
+ pCol->SetWishWidth( static_cast< sal_uInt16 >(nColumnWidthSum + pCol->GetRight() + pCol->GetLeft()));
}
}
}
@@ -490,8 +490,8 @@ SwPageGridExample::~SwPageGridExample()
#define MAX_ROWS 10
#define MAX_LINES 15
void SwPageGridExample::DrawPage( const Point& rOrg,
- const BOOL bSecond,
- const BOOL bEnabled )
+ const sal_Bool bSecond,
+ const sal_Bool bEnabled )
{
SwPageExample::DrawPage(rOrg, bSecond, bEnabled);
if(pGridItem && pGridItem->GetGridType())
@@ -596,9 +596,9 @@ void SwPageGridExample::UpdateExample( const SfxItemSet& rSet )
{
DELETEZ(pGridItem);
//get the grid information
- if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, TRUE))
+ if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, sal_True))
pGridItem = (SwTextGridItem*)((const SwTextGridItem&)rSet.Get(RES_TEXTGRID)).Clone();
- if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( RES_FRAMEDIR, TRUE ))
+ if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( RES_FRAMEDIR, sal_True ))
{
const SvxFrameDirectionItem& rDirItem =
(const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR);
diff --git a/sw/source/ui/frmdlg/colmgr.cxx b/sw/source/ui/frmdlg/colmgr.cxx
index 0e18946af778..90f695aa8ae5 100644
--- a/sw/source/ui/frmdlg/colmgr.cxx
+++ b/sw/source/ui/frmdlg/colmgr.cxx
@@ -45,12 +45,12 @@
-void FitToActualSize(SwFmtCol& rCol, USHORT nWidth)
+void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth)
{
- const USHORT nCount = rCol.GetColumns().Count();
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = rCol.GetColumns().Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
- const USHORT nTmp = rCol.CalcColWidth(i, nWidth);
+ const sal_uInt16 nTmp = rCol.CalcColWidth(i, nWidth);
rCol.GetColumns()[i]->SetWishWidth(nTmp);
}
rCol.SetWishWidth(nWidth);
@@ -64,7 +64,7 @@ void FitToActualSize(SwFmtCol& rCol, USHORT nWidth)
-void SwColMgr::SetCount(USHORT nCount, USHORT nGutterWidth)
+void SwColMgr::SetCount(sal_uInt16 nCount, sal_uInt16 nGutterWidth)
{
aFmtCol.Init(nCount, nGutterWidth, nWidth);
aFmtCol.SetWishWidth(nWidth);
@@ -73,9 +73,9 @@ void SwColMgr::SetCount(USHORT nCount, USHORT nGutterWidth)
-USHORT SwColMgr::GetGutterWidth( USHORT nPos ) const
+sal_uInt16 SwColMgr::GetGutterWidth( sal_uInt16 nPos ) const
{
- USHORT nRet;
+ sal_uInt16 nRet;
if(nPos == USHRT_MAX )
nRet = GetCount() > 1 ? aFmtCol.GetGutterWidth() : DEF_GUTTER_WIDTH;
else
@@ -92,7 +92,7 @@ USHORT SwColMgr::GetGutterWidth( USHORT nPos ) const
--------------------------------------------------*/
-void SwColMgr::SetGutterWidth(USHORT nGutterWidth, USHORT nPos )
+void SwColMgr::SetGutterWidth(sal_uInt16 nGutterWidth, sal_uInt16 nPos )
{
if(nPos == USHRT_MAX)
aFmtCol.SetGutterWidth(nGutterWidth, nWidth);
@@ -100,7 +100,7 @@ void SwColMgr::SetGutterWidth(USHORT nGutterWidth, USHORT nPos )
{
DBG_ASSERT(nPos < GetCount() - 1, "Spalte ueberindiziert" );
SwColumns& rCols = aFmtCol.GetColumns();
- USHORT nGutterWidth2 = nGutterWidth / 2;
+ sal_uInt16 nGutterWidth2 = nGutterWidth / 2;
rCols.GetObject(nPos)->SetRight(nGutterWidth2);
rCols.GetObject(nPos + 1)->SetLeft(nGutterWidth2);
}
@@ -122,7 +122,7 @@ short SwColMgr::GetLineHeightPercent() const
void SwColMgr::SetLineHeightPercent(short nPercent)
{
ASSERT(nPercent <= 100, LineHeight darf nur bis 100 % gross sein);
- aFmtCol.SetLineHeight((BYTE)nPercent);
+ aFmtCol.SetLineHeight((sal_uInt8)nPercent);
}
/*------------------------------------------------------------------------
Beschreibung: Spaltenbreite
@@ -130,7 +130,7 @@ void SwColMgr::SetLineHeightPercent(short nPercent)
-USHORT SwColMgr::GetColWidth(USHORT nIdx) const
+sal_uInt16 SwColMgr::GetColWidth(sal_uInt16 nIdx) const
{
ASSERT(nIdx < GetCount(), Spaltenarray ueberindiziert.);
return aFmtCol.CalcPrtColWidth(nIdx, nWidth);
@@ -138,7 +138,7 @@ USHORT SwColMgr::GetColWidth(USHORT nIdx) const
-void SwColMgr::SetColWidth(USHORT nIdx, USHORT nWd)
+void SwColMgr::SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWd)
{
ASSERT(nIdx < GetCount(), Spaltenarray ueberindiziert.);
aFmtCol.GetColumns()[nIdx]->SetWishWidth(nWd);
@@ -151,7 +151,7 @@ void SwColMgr::SetColWidth(USHORT nIdx, USHORT nWd)
-void SwColMgr::SetActualWidth(USHORT nW)
+void SwColMgr::SetActualWidth(sal_uInt16 nW)
{
nWidth = nW;
::FitToActualSize(aFmtCol, nW);
@@ -163,18 +163,18 @@ void SwColMgr::SetActualWidth(USHORT nW)
-SwColMgr::SwColMgr(const SfxItemSet& rSet, USHORT nActWidth) :
+SwColMgr::SwColMgr(const SfxItemSet& rSet, sal_uInt16 nActWidth) :
aFmtCol((const SwFmtCol&)rSet.Get(RES_COL)),
nWidth(nActWidth)
{
if(nWidth == USHRT_MAX)
{
- nWidth = (USHORT)((const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE)).GetWidth();
+ nWidth = (sal_uInt16)((const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE)).GetWidth();
if (nWidth < MINLAY)
nWidth = USHRT_MAX;
const SvxLRSpaceItem &rLR = (const SvxLRSpaceItem&)rSet.Get(RES_LR_SPACE);
- nWidth = nWidth - (USHORT)rLR.GetLeft();
- nWidth = nWidth - (USHORT)rLR.GetRight();
+ nWidth = nWidth - (sal_uInt16)rLR.GetLeft();
+ nWidth = nWidth - (sal_uInt16)rLR.GetRight();
}
::FitToActualSize(aFmtCol, nWidth);
}
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 0a3c8cc33623..62b95165bd6b 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -77,7 +77,7 @@ SV_IMPL_PTRARR( SwColumns, SwColumnPtr )
Beschreibung: Statische Daten
--------------------------------------------------------------------*/
-static const USHORT __FAR_DATA nLines[] = {
+static const sal_uInt16 __FAR_DATA nLines[] = {
DEF_LINE_WIDTH_0,
DEF_LINE_WIDTH_1,
DEF_LINE_WIDTH_2,
@@ -85,13 +85,13 @@ static const USHORT __FAR_DATA nLines[] = {
DEF_LINE_WIDTH_4
};
-static const USHORT nLineCount = sizeof(nLines) / sizeof(nLines[0]);
-static const USHORT nVisCols = 3;
+static const sal_uInt16 nLineCount = sizeof(nLines) / sizeof(nLines[0]);
+static const sal_uInt16 nVisCols = 3;
-inline BOOL IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
+inline sal_Bool IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
{
rWrtSh.SwapPam();
- BOOL bRet = pSect == rWrtSh.GetCurrSection();
+ sal_Bool bRet = pSect == rWrtSh.GetCurrSection();
rWrtSh.SwapPam();
return bRet;
}
@@ -114,10 +114,10 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
pFrameSet(0),
nOldSelection(0),
nSelectionWidth(0),
- bPageChanged(FALSE),
- bSectionChanged(FALSE),
- bSelSectionChanged(FALSE),
- bFrameChanged(FALSE)
+ bPageChanged(sal_False),
+ bSectionChanged(sal_False),
+ bSelSectionChanged(sal_False),
+ bFrameChanged(sal_False)
{
FreeResource();
@@ -127,13 +127,13 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
nSelectionWidth = aRect.Width();
SfxItemSet* pColPgSet = 0;
- static USHORT __READONLY_DATA aSectIds[] = { RES_COL, RES_COL,
+ static sal_uInt16 __READONLY_DATA aSectIds[] = { RES_COL, RES_COL,
RES_FRM_SIZE, RES_FRM_SIZE,
RES_COLUMNBALANCE, RES_FRAMEDIR,
0 };
const SwSection* pCurrSection = rWrtShell.GetCurrSection();
- USHORT nFullSectCnt = rWrtShell.GetFullSelectedSectionCount();
+ sal_uInt16 nFullSectCnt = rWrtShell.GetFullSelectedSectionCount();
if( pCurrSection && ( !rWrtShell.HasSelection() || 0 != nFullSectCnt ))
{
nSelectionWidth = rSh.GetSectionWidth(*pCurrSection->GetFmt());
@@ -175,7 +175,7 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
aApplyToLB.RemoveEntry(aApplyToLB.GetEntryPos( (void*) LISTBOX_FRAME ));
- USHORT nPagePos = aApplyToLB.GetEntryPos( (void*) LISTBOX_PAGE );
+ sal_uInt16 nPagePos = aApplyToLB.GetEntryPos( (void*) LISTBOX_PAGE );
const SwPageDesc* pPageDesc = rWrtShell.GetSelectedPageDescs();
if( pPageDesc )
{
@@ -256,19 +256,19 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox)
break;
case LISTBOX_SECTION :
pSet = pSectionSet;
- bSectionChanged = TRUE;
+ bSectionChanged = sal_True;
break;
case LISTBOX_SECTIONS :
pSet = pSectionSet;
- bSelSectionChanged = TRUE;
+ bSelSectionChanged = sal_True;
break;
case LISTBOX_PAGE :
pSet = pPageSet;
- bPageChanged = TRUE;
+ bPageChanged = sal_True;
break;
case LISTBOX_FRAME:
pSet = pFrameSet;
- bFrameChanged = TRUE;
+ bFrameChanged = sal_True;
break;
}
if(pBox)
@@ -299,10 +299,10 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox)
break;
}
- BOOL bIsSection = pSet == pSectionSet || pSet == pSelectionSet;
+ sal_Bool bIsSection = pSet == pSectionSet || pSet == pSelectionSet;
pTabPage->ShowBalance(bIsSection);
pTabPage->SetInSection(bIsSection);
- pTabPage->SetFrmMode(TRUE);
+ pTabPage->SetFrmMode(sal_True);
pTabPage->SetPageWidth(nWidth);
if( pSet )
pTabPage->Reset(*pSet);
@@ -322,19 +322,19 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
break;
case LISTBOX_SECTION :
pSet = pSectionSet;
- bSectionChanged = TRUE;
+ bSectionChanged = sal_True;
break;
case LISTBOX_SECTIONS :
pSet = pSectionSet;
- bSelSectionChanged = TRUE;
+ bSelSectionChanged = sal_True;
break;
case LISTBOX_PAGE :
pSet = pPageSet;
- bPageChanged = TRUE;
+ bPageChanged = sal_True;
break;
case LISTBOX_FRAME:
pSet = pFrameSet;
- bFrameChanged = TRUE;
+ bFrameChanged = sal_True;
break;
}
pTabPage->FillItemSet(*pSet);
@@ -353,7 +353,7 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
{
const SwSection* pCurrSection = rWrtShell.GetCurrSection();
const SwSectionFmt* pFmt = pCurrSection->GetFmt();
- USHORT nNewPos = rWrtShell.GetSectionFmtPos( *pFmt );
+ sal_uInt16 nNewPos = rWrtShell.GetSectionFmtPos( *pFmt );
SwSectionData aData(*pCurrSection);
rWrtShell.UpdateSection( nNewPos, aData, pSectionSet );
}
@@ -366,7 +366,7 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
if(pPageSet && SFX_ITEM_SET == pPageSet->GetItemState(RES_COL) && bPageChanged)
{
// aktuellen PageDescriptor ermitteln und damit den Set fuellen
- const USHORT nCurIdx = rWrtShell.GetCurPageDesc();
+ const sal_uInt16 nCurIdx = rWrtShell.GetCurPageDesc();
SwPageDesc aPageDesc(rWrtShell.GetPageDesc(nCurIdx));
SwFrmFmt &rFmt = aPageDesc.GetMaster();
rFmt.SetFmtAttr(pPageSet->Get(RES_COL));
@@ -399,15 +399,15 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
#if OSL_DEBUG_LEVEL < 2
inline
#endif
-USHORT GetMaxWidth( SwColMgr* pColMgr, USHORT nCols )
+sal_uInt16 GetMaxWidth( SwColMgr* pColMgr, sal_uInt16 nCols )
{
- USHORT nMax = pColMgr->GetActualSize();
+ sal_uInt16 nMax = pColMgr->GetActualSize();
if( --nCols )
nMax -= pColMgr->GetGutterWidth() * nCols;
return nMax;
}
-static USHORT __FAR_DATA aPageRg[] = {
+static sal_uInt16 __FAR_DATA aPageRg[] = {
RES_COL, RES_COL,
0
};
@@ -417,10 +417,10 @@ DBG_NAME(columnhdl)
-USHORT lcl_LineWidthToPos(ULONG nWidth)
+sal_uInt16 lcl_LineWidthToPos(sal_uLong nWidth)
{
- const USHORT nUShortWidth = (USHORT)nWidth;
- for(USHORT i = 0; i < nLineCount; ++i)
+ const sal_uInt16 nUShortWidth = (sal_uInt16)nWidth;
+ for(sal_uInt16 i = 0; i < nLineCount; ++i)
if(nUShortWidth == nLines[i])
return i;
return 0;
@@ -432,10 +432,10 @@ void SwColumnPage::ResetColWidth()
{
if( nCols )
{
- USHORT nWidth = GetMaxWidth( pColMgr, nCols );
+ sal_uInt16 nWidth = GetMaxWidth( pColMgr, nCols );
nWidth = nWidth / nCols;
- for(USHORT i = 0; i < nCols; ++i)
+ for(sal_uInt16 i = 0; i < nCols; ++i)
nColWidth[i] = (long) nWidth;
}
@@ -495,12 +495,12 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet)
nFirstVis(0),
nMinWidth(MINLAY),
pModifiedField(0),
- bFormat(FALSE),
- bFrm(FALSE),
- bHtmlMode(FALSE),
- bLockUpdate(FALSE)
+ bFormat(sal_False),
+ bFrm(sal_False),
+ bHtmlMode(sal_False),
+ bLockUpdate(sal_False)
{
- USHORT i;
+ sal_uInt16 i;
FreeResource();
SetExchangeSupport();
@@ -590,11 +590,11 @@ void SwColumnPage::SetPageWidth(long nPageWidth)
void SwColumnPage::Reset(const SfxItemSet &rSet)
{
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
if(nHtmlMode & HTMLMODE_ON)
{
- bHtmlMode = TRUE;
- aAutoWidthBox.Enable(FALSE);
+ bHtmlMode = sal_True;
+ aAutoWidthBox.Enable(sal_False);
}
FieldUnit aMetric = ::GetDfltMetric(bHtmlMode);
SetMetric(aEd1, aMetric);
@@ -606,8 +606,8 @@ void SwColumnPage::Reset(const SfxItemSet &rSet)
delete pColMgr;
pColMgr = new SwColMgr(rSet);
nCols = pColMgr->GetCount() ;
- aCLNrEdt.SetMax(Max((USHORT)aCLNrEdt.GetMax(), (USHORT)nCols));
- aCLNrEdt.SetLast(Max(nCols,(USHORT)aCLNrEdt.GetMax()));
+ aCLNrEdt.SetMax(Max((sal_uInt16)aCLNrEdt.GetMax(), (sal_uInt16)nCols));
+ aCLNrEdt.SetLast(Max(nCols,(sal_uInt16)aCLNrEdt.GetMax()));
if(bFrm)
{
@@ -617,16 +617,16 @@ void SwColumnPage::Reset(const SfxItemSet &rSet)
{
const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE);
const SvxBoxItem& rBox = (const SvxBoxItem&) rSet.Get(RES_BOX);
- pColMgr->SetActualWidth((USHORT)rSize.GetSize().Width() - rBox.GetDistance());
+ pColMgr->SetActualWidth((sal_uInt16)rSize.GetSize().Width() - rBox.GetDistance());
}
}
if(aBalanceColsCB.IsVisible())
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_COLUMNBALANCE, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_COLUMNBALANCE, sal_False, &pItem ))
aBalanceColsCB.Check(!((const SwFmtNoBalancedColumns*)pItem)->GetValue());
else
- aBalanceColsCB.Check( TRUE );
+ aBalanceColsCB.Check( sal_True );
}
//text direction
@@ -634,7 +634,7 @@ void SwColumnPage::Reset(const SfxItemSet &rSet)
{
const SvxFrameDirectionItem& rItem = (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR);
sal_uInt32 nVal = rItem.GetValue();
- USHORT nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
+ sal_uInt16 nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
aTextDirectionLB.SelectEntryPos( nPos );
aTextDirectionLB.SaveValue();
}
@@ -660,7 +660,7 @@ SfxTabPage* SwColumnPage::Create(Window *pParent, const SfxItemSet &rSet)
-BOOL SwColumnPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwColumnPage::FillItemSet(SfxItemSet &rSet)
{
if(aCLNrEdt.HasChildPathFocus())
aCLNrEdt.GetDownHdl().Call(&aCLNrEdt);
@@ -678,7 +678,7 @@ BOOL SwColumnPage::FillItemSet(SfxItemSet &rSet)
{
rSet.Put(SwFmtNoBalancedColumns(!aBalanceColsCB.IsChecked() ));
}
- USHORT nPos;
+ sal_uInt16 nPos;
if( aTextDirectionLB.IsVisible() &&
( nPos = aTextDirectionLB.GetSelectEntryPos() ) !=
aTextDirectionLB.GetSavedValue() )
@@ -686,7 +686,7 @@ BOOL SwColumnPage::FillItemSet(SfxItemSet &rSet)
sal_uInt32 nDirection = (sal_uInt32)(sal_IntPtr)aTextDirectionLB.GetEntryData( nPos );
rSet.Put( SvxFrameDirectionItem( (SvxFrameDirection)nDirection, RES_FRAMEDIR));
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -703,15 +703,15 @@ IMPL_LINK( SwColumnPage, UpdateColMgr, void *, /*pField*/ )
// Ermitteln, ob die schmalste Spalte zu schmal ist
// fuer den eingestellten Spaltenabstand
long nMin = nColWidth[0];
- USHORT i;
+ sal_uInt16 i;
for( i = 1; i < nCols; ++i)
nMin = Min(nMin, nColWidth[i]);
- BOOL bAutoWidth = aAutoWidthBox.IsChecked();
+ sal_Bool bAutoWidth = aAutoWidthBox.IsChecked();
if(!bAutoWidth)
{
- pColMgr->SetAutoWidth(FALSE);
+ pColMgr->SetAutoWidth(sal_False);
// falls der Benutzer nicht die Gesamtbreite vergeben hat,
// den fehlenden Betrag auf die letzte Spalte addieren.
long nSum = 0;
@@ -727,19 +727,19 @@ IMPL_LINK( SwColumnPage, UpdateColMgr, void *, /*pField*/ )
if( nSum < nMaxW )
nColWidth[nCols - 1] += nMaxW - nSum;
- pColMgr->SetColWidth( 0, static_cast< USHORT >(nColWidth[0] + (USHORT)nColDist[0]/2) );
+ pColMgr->SetColWidth( 0, static_cast< sal_uInt16 >(nColWidth[0] + (sal_uInt16)nColDist[0]/2) );
for( i = 1; i < nCols-1; ++i )
{
long nActDist = (nColDist[i] + nColDist[i - 1]) / 2;
- pColMgr->SetColWidth( i, (USHORT)nColWidth[i] + (USHORT)nActDist );
+ pColMgr->SetColWidth( i, (sal_uInt16)nColWidth[i] + (sal_uInt16)nActDist );
}
- pColMgr->SetColWidth( nCols-1, static_cast< USHORT >(nColWidth[nCols-1] + nColDist[nCols -2]/2) );
+ pColMgr->SetColWidth( nCols-1, static_cast< sal_uInt16 >(nColWidth[nCols-1] + nColDist[nCols -2]/2) );
}
// keins ist ausgeschaltet
- const USHORT nPos = aLineTypeDLB.GetSelectEntryPos();
- BOOL bEnable = 0 != nPos;
+ const sal_uInt16 nPos = aLineTypeDLB.GetSelectEntryPos();
+ sal_Bool bEnable = 0 != nPos;
aLineHeightEdit.Enable( bEnable );
aLineHeightLbl.Enable( bEnable );
if( !bEnable )
@@ -792,12 +792,12 @@ void SwColumnPage::Init()
{
aCLNrEdt.SetValue(nCols);
- BOOL bAutoWidth = pColMgr->IsAutoWidth() || bHtmlMode;
+ sal_Bool bAutoWidth = pColMgr->IsAutoWidth() || bHtmlMode;
aAutoWidthBox.Check( bAutoWidth );
sal_Int32 nColumnWidthSum = 0;
// Setzen der Breiten
- USHORT i;
+ sal_uInt16 i;
for(i = 0; i < nCols; ++i)
{
nColWidth[i] = pColMgr->GetColWidth(i);
@@ -828,7 +828,7 @@ void SwColumnPage::Init()
aLineTypeDLB.SelectEntryPos( lcl_LineWidthToPos(( pColMgr->GetLineWidth() )) + 1);
aLineHeightEdit.SetValue( pColMgr->GetLineHeightPercent() );
}
- aLinePosDLB.SelectEntryPos( static_cast< USHORT >(eAdj - 1) );
+ aLinePosDLB.SelectEntryPos( static_cast< sal_uInt16 >(eAdj - 1) );
}
else
{
@@ -861,13 +861,13 @@ void SwColumnPage::Init()
void SwColumnPage::UpdateCols()
{
- BOOL bEnableBtns= FALSE;
- BOOL bEnable12 = FALSE;
- BOOL bEnable3 = FALSE;
- const BOOL bEdit = !aAutoWidthBox.IsChecked();
+ sal_Bool bEnableBtns= sal_False;
+ sal_Bool bEnable12 = sal_False;
+ sal_Bool bEnable3 = sal_False;
+ const sal_Bool bEdit = !aAutoWidthBox.IsChecked();
if ( nCols > nVisCols )
{
- bEnableBtns = TRUE && !bHtmlMode;
+ bEnableBtns = sal_True && !bHtmlMode;
bEnable12 = bEnable3 = bEdit;
}
else if( bEdit )
@@ -875,8 +875,8 @@ void SwColumnPage::UpdateCols()
// hier gibt es absichtlich kaum noch breaks
switch(nCols)
{
- case 3: bEnable3 = TRUE;
- case 2: bEnable12= TRUE; break;
+ case 3: bEnable3 = sal_True;
+ case 2: bEnable12= sal_True; break;
default: /* do nothing */;
}
}
@@ -891,11 +891,11 @@ void SwColumnPage::UpdateCols()
aBtnUp.Enable( bEnableBtns );
aBtnDown.Enable( bEnableBtns );
- const BOOL bEnable = nCols > 1;
+ const sal_Bool bEnable = nCols > 1;
if( !bEnable )
{
- aLinePosDLB.Enable( FALSE );
- aLinePosLbl.Enable( FALSE );
+ aLinePosDLB.Enable( sal_False );
+ aLinePosLbl.Enable( sal_False );
}
aLineHeightEdit.Enable( bEnable );
aLineHeightLbl.Enable( bEnable );
@@ -904,7 +904,7 @@ void SwColumnPage::UpdateCols()
aAutoWidthBox.Enable( bEnable && !bHtmlMode );
}
-void SwColumnPage::SetLabels( USHORT nVis )
+void SwColumnPage::SetLabels( sal_uInt16 nVis )
{
String sLbl( '~' );
@@ -931,7 +931,7 @@ void SwColumnPage::SetLabels( USHORT nVis )
IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF )
{
- nCols = (USHORT)aCLNrEdt.GetValue();
+ nCols = (sal_uInt16)aCLNrEdt.GetValue();
//#107890# the handler is also called from LoseFocus()
//then no change has been made and thus no action should be taken
// #i17816# changing the displayed types within the ValueSet
@@ -942,8 +942,8 @@ IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF )
if(pNF)
aDefaultVS.SetNoSelection();
long nDist = static_cast< long >(aDistEd1.DenormalizePercent(aDistEd1.GetValue(FUNIT_TWIP)));
- pColMgr->SetCount(nCols, (USHORT)nDist);
- for(USHORT i = 0; i < nCols; i++)
+ pColMgr->SetCount(nCols, (sal_uInt16)nDist);
+ for(sal_uInt16 i = 0; i < nCols; i++)
nColDist[i] = nDist;
nFirstVis = 0;
SetLabels( nFirstVis );
@@ -974,7 +974,7 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
return 0;
if(aAutoWidthBox.IsChecked())
{
- USHORT nMaxGap = pColMgr->GetActualSize() - nCols * MINLAY;
+ sal_uInt16 nMaxGap = pColMgr->GetActualSize() - nCols * MINLAY;
DBG_ASSERT(nCols, "Abstand kann nicht ohne Spalten eingestellt werden");
nMaxGap /= nCols - 1;
if(nActValue > nMaxGap)
@@ -982,8 +982,8 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
nActValue = nMaxGap;
aDistEd1.SetPrcntValue(aDistEd1.NormalizePercent(nMaxGap), FUNIT_TWIP);
}
- pColMgr->SetGutterWidth((USHORT)nActValue);
- for(USHORT i = 0; i < nCols; i++)
+ pColMgr->SetGutterWidth((sal_uInt16)nActValue);
+ for(sal_uInt16 i = 0; i < nCols; i++)
nColDist[i] = nActValue;
ResetColWidth();
@@ -992,7 +992,7 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
else
{
- USHORT nOffset = 0;
+ sal_uInt16 nOffset = 0;
if(pFld == &aDistEd2)
{
nOffset = 1;
@@ -1028,9 +1028,9 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
nColWidth[nFirstVis + nOffset + 1] = nRight;
nColDist[nFirstVis + nOffset] += nDiff;
- pColMgr->SetColWidth( nFirstVis + nOffset, USHORT(nLeft) );
- pColMgr->SetColWidth( nFirstVis + nOffset + 1, USHORT(nRight) );
- pColMgr->SetGutterWidth( USHORT(nColDist[nFirstVis + nOffset]), nFirstVis + nOffset );
+ pColMgr->SetColWidth( nFirstVis + nOffset, sal_uInt16(nLeft) );
+ pColMgr->SetColWidth( nFirstVis + nOffset + 1, sal_uInt16(nRight) );
+ pColMgr->SetGutterWidth( sal_uInt16(nColDist[nFirstVis + nOffset]), nFirstVis + nOffset );
}
}
@@ -1061,15 +1061,15 @@ IMPL_LINK( SwColumnPage, EdModify, PercentField *, pField )
IMPL_LINK( SwColumnPage, AutoWidthHdl, CheckBox *, pBox )
{
long nDist = static_cast< long >(aDistEd1.DenormalizePercent(aDistEd1.GetValue(FUNIT_TWIP)));
- pColMgr->SetCount(nCols, (USHORT)nDist);
- for(USHORT i = 0; i < nCols; i++)
+ pColMgr->SetCount(nCols, (sal_uInt16)nDist);
+ for(sal_uInt16 i = 0; i < nCols; i++)
nColDist[i] = nDist;
if(pBox->IsChecked())
{
- pColMgr->SetGutterWidth(USHORT(nDist));
+ pColMgr->SetGutterWidth(sal_uInt16(nDist));
ResetColWidth();
}
- pColMgr->SetAutoWidth(pBox->IsChecked(), USHORT(nDist));
+ pColMgr->SetAutoWidth(pBox->IsChecked(), sal_uInt16(nDist));
UpdateCols();
Update();
return 0;
@@ -1115,7 +1115,7 @@ IMPL_LINK( SwColumnPage, Timeout, Timer *, EMPTYARG )
if(pModifiedField)
{
// Finden der veraenderten Spalte
- USHORT nChanged = nFirstVis;
+ sal_uInt16 nChanged = nFirstVis;
if(pModifiedField == &aEd2)
++nChanged;
else if(pModifiedField == &aEd3)
@@ -1123,7 +1123,7 @@ IMPL_LINK( SwColumnPage, Timeout, Timer *, EMPTYARG )
/*else if(pModifiedField == &aEd4)
nChanged += 3;*/
- long nNewWidth = (USHORT)
+ long nNewWidth = (sal_uInt16)
pModifiedField->DenormalizePercent(pModifiedField->GetValue(FUNIT_TWIP));
long nDiff = nNewWidth - nColWidth[nChanged];
@@ -1207,7 +1207,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rSet.Get(
RES_LR_SPACE );
const SvxBoxItem& rBox = (const SvxBoxItem&) rSet.Get(RES_BOX);
- USHORT nActWidth = static_cast< USHORT >(rSize.GetSize().Width()
+ sal_uInt16 nActWidth = static_cast< sal_uInt16 >(rSize.GetSize().Width()
- rLRSpace.GetLeft() - rLRSpace.GetRight() - rBox.GetDistance());
if( pColMgr->GetActualSize() != nActWidth)
@@ -1232,7 +1232,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
const SvxBoxItem& rBox = (const SvxBoxItem&) rSet.Get(RES_BOX);
long nDistance = rBox.GetDistance();
- const USHORT nTotalWish = bFormat ? FRAME_FORMAT_WIDTH : USHORT(rSize.GetWidth() - 2 * nDistance);
+ const sal_uInt16 nTotalWish = bFormat ? FRAME_FORMAT_WIDTH : sal_uInt16(rSize.GetWidth() - 2 * nDistance);
// Maximalwerte der Spaltenbreiten setzen
SetPageWidth(nTotalWish);
@@ -1242,7 +1242,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
pColMgr->SetActualWidth(nTotalWish);
Init();
}
- BOOL bPercent;
+ sal_Bool bPercent;
// im Rahmenformat nur relative Angaben
if ( bFormat || (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff) )
{
@@ -1254,10 +1254,10 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
aDistEd2.SetRefValue(nTotalWish);
// Auf %-Darstellung umschalten
- bPercent = TRUE;
+ bPercent = sal_True;
}
else
- bPercent = FALSE;
+ bPercent = sal_False;
aEd1.ShowPercent(bPercent);
aEd2.ShowPercent(bPercent);
@@ -1281,12 +1281,12 @@ int SwColumnPage::DeactivatePage(SfxItemSet *_pSet)
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
-USHORT* SwColumnPage::GetRanges()
+sal_uInt16* SwColumnPage::GetRanges()
{
return aPageRg;
}
@@ -1299,7 +1299,7 @@ USHORT* SwColumnPage::GetRanges()
IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS )
{
- USHORT nItem = pVS->GetSelectItemId();
+ sal_uInt16 nItem = pVS->GetSelectItemId();
if( nItem < 4 )
{
aCLNrEdt.SetValue( nItem );
@@ -1309,13 +1309,13 @@ IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS )
}
else
{
- bLockUpdate = TRUE;
+ bLockUpdate = sal_True;
aCLNrEdt.SetValue( 2 );
- aAutoWidthBox.Check(FALSE);
+ aAutoWidthBox.Check(sal_False);
aDistEd1.SetPrcntValue(0);
ColModify(0);
// jetzt noch das Breitenverhaeltnisse auf 2 : 1 bzw. 1 : 2 stellen
- USHORT nSmall = pColMgr->GetActualSize() / 3;
+ sal_uInt16 nSmall = pColMgr->GetActualSize() / 3;
if(nItem == 4)
{
aEd2.SetPrcntValue(aEd2.NormalizePercent(long(nSmall)), FUNIT_TWIP);
@@ -1326,7 +1326,7 @@ IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS )
aEd1.SetPrcntValue(aEd1.NormalizePercent(long(nSmall)), FUNIT_TWIP);
pModifiedField = &aEd1;
}
- bLockUpdate = FALSE;
+ bLockUpdate = sal_False;
Timeout(0);
}
@@ -1338,14 +1338,14 @@ IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS )
--------------------------------------------------*/
-void SwColumnPage::SetFrmMode(BOOL bMod)
+void SwColumnPage::SetFrmMode(sal_Bool bMod)
{
bFrm = bMod;
}
/* -----------------------------2002/06/19 13:08------------------------------
---------------------------------------------------------------------------*/
-void SwColumnPage::SetInSection(BOOL bSet)
+void SwColumnPage::SetInSection(sal_Bool bSet)
{
if(!SW_MOD()->GetCTLOptions().IsCTLFontEnabled())
return;
@@ -1382,7 +1382,7 @@ void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt )
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Rectangle aRect = rUDEvt.GetRect();
- USHORT nItemId = rUDEvt.GetItemId();
+ sal_uInt16 nItemId = rUDEvt.GetItemId();
long nRectWidth = aRect.GetWidth();
long nRectHeight = aRect.GetHeight();
@@ -1394,7 +1394,7 @@ void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt )
long nStep = Abs(Abs(nRectHeight * 95 /100) / 11);
long nTop = (nRectHeight - 11 * nStep ) / 2;
- USHORT nCols = 0;
+ sal_uInt16 nCols = 0;
long nStarts[3];
long nEnds[3];
nStarts[0] = nRectWidth * 10 / 100;
@@ -1427,11 +1427,11 @@ void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt )
nEnds[1] = nRectWidth * 9 / 10;
break;
}
- for(USHORT j = 0; j < nCols; j++ )
+ for(sal_uInt16 j = 0; j < nCols; j++ )
{
Point aStart(aBLPos.X() + nStarts[j], 0);
Point aEnd(aBLPos.X() + nEnds[j], 0);
- for( USHORT i = 0; i < 12; i ++)
+ for( sal_uInt16 i = 0; i < 12; i ++)
{
aStart.Y() = aEnd.Y() = aBLPos.Y() + nTop + i * nStep;
pDev->DrawLine(aStart, aEnd);
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index e92cd4e0ae81..0a7863270034 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -143,7 +143,7 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) :
aPrevWin (this, SW_RES(WIN_SAMPLE )),
rView( rV ),
pMgr( new SwFldMgr(rView.GetWrtShellPtr()) ),
- bCopyAttributes( FALSE ),
+ bCopyAttributes( sal_False ),
bOrderNumberingFirst( SW_MOD()->GetModuleConfig()->IsCaptionOrderNumberingFirst() )
{
//#i61007# order of captions
@@ -188,7 +188,7 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) :
{
nPoolId = RES_POOLCOLL_LABEL_ABB;
pString = ::GetOldGrfCat();
- bCopyAttributes = TRUE;
+ bCopyAttributes = sal_True;
sObjectName = rSh.GetFlyName();
//if not OLE
if(!xNameAccess.is())
@@ -528,7 +528,7 @@ SwSequenceOptionDialog::SwSequenceOptionDialog( Window *pParent, SwView &rV,
aLbLevel.SelectEntryPos( nLvl < MAXLEVEL ? nLvl + 1 : 0 );
aEdDelim.SetText( sDelim );
- ::FillCharStyleListBox( aLbCharStyle, rView.GetDocShell(), TRUE, TRUE );
+ ::FillCharStyleListBox( aLbCharStyle, rView.GetDocShell(), sal_True, sal_True );
aLbCharStyle.SelectEntryPos( 0 );
}
@@ -594,7 +594,7 @@ long SwCaptionDialog::CategoryBox::PreNotify( NotifyEvent& rNEvt )
{
const KeyEvent* pEvent = rNEvt.GetKeyEvent();
const KeyCode& rKeyCode = pEvent->GetKeyCode();
- USHORT nTmpCode = rKeyCode.GetFullCode() & ~KEY_ALLMODTYPE;
+ sal_uInt16 nTmpCode = rKeyCode.GetFullCode() & ~KEY_ALLMODTYPE;
if(nTmpCode != KEY_BACKSPACE && nTmpCode != KEY_RETURN
&& nTmpCode != KEY_TAB && nTmpCode != KEY_ESCAPE)
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index 54078db0f9a7..f25d8186b83e 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -67,10 +67,10 @@
SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
Window* pParent,
const SfxItemSet& rCoreSet,
- BOOL bNewFrm,
- USHORT nResType,
- BOOL bFormat,
- UINT16 nDefPage,
+ sal_Bool bNewFrm,
+ sal_uInt16 nResType,
+ sal_Bool bFormat,
+ sal_uInt16 nDefPage,
const String* pStr) :
SfxTabDialog(pViewFrame, pParent, SW_RES(nResType), &rCoreSet, pStr != 0),
@@ -81,8 +81,8 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
m_pWrtShell(((SwView*)pViewFrame->GetViewShell())->GetWrtShellPtr())
{
FreeResource();
- USHORT nHtmlMode = ::GetHtmlMode(m_pWrtShell->GetView().GetDocShell());
- m_bHTMLMode = static_cast< BOOL >(nHtmlMode & HTMLMODE_ON);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(m_pWrtShell->GetView().GetDocShell());
+ m_bHTMLMode = static_cast< sal_Bool >(nHtmlMode & HTMLMODE_ON);
// BspFont fuer beide Bsp-TabPages
//
@@ -153,7 +153,7 @@ SwFrmDlg::~SwFrmDlg()
-void SwFrmDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwFrmDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
switch ( nId )
@@ -173,13 +173,13 @@ void SwFrmDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
case TP_FRM_WRAP:
((SwWrapTabPage&)rPage).SetNewFrame(m_bNew);
- ((SwWrapTabPage&)rPage).SetFormatUsed(m_bFormat, FALSE);
+ ((SwWrapTabPage&)rPage).SetFormatUsed(m_bFormat, sal_False);
((SwWrapTabPage&)rPage).SetShell(m_pWrtShell);
break;
case TP_COLUMN:
{
- ((SwColumnPage&)rPage).SetFrmMode(TRUE);
+ ((SwColumnPage&)rPage).SetFrmMode(sal_True);
((SwColumnPage&)rPage).SetFormatUsed(m_bFormat);
const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)
diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx
index 302baebd0362..09c9764c460e 100644
--- a/sw/source/ui/frmdlg/frmmgr.cxx
+++ b/sw/source/ui/frmdlg/frmmgr.cxx
@@ -56,7 +56,7 @@
using namespace ::com::sun::star;
//using namespace text;
-static USHORT __FAR_DATA aFrmMgrRange[] = {
+static sal_uInt16 __FAR_DATA aFrmMgrRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
FN_SET_FRM_NAME, FN_SET_FRM_NAME,
@@ -66,17 +66,17 @@ static USHORT __FAR_DATA aFrmMgrRange[] = {
Beschreibung: Rahmen-Attribute ueber Shell ermitteln
--------------------------------------------------------------------*/
-SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType ) :
+SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, sal_uInt8 nType ) :
aSet( (SwAttrPool&)pSh->GetAttrPool(), aFrmMgrRange ),
pOwnSh( pSh ),
- bAbsPos( FALSE ),
+ bAbsPos( sal_False ),
bNewFrm( bNew ),
- bIsInVertical( FALSE )
+ bIsInVertical( sal_False )
{
if ( bNewFrm )
{
// Defaults einstellen:
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( nType )
{
case FRMMGR_TYPE_TEXT: nId = RES_POOLFRM_FRAME; break;
@@ -91,23 +91,23 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType ) :
else if ( nType == FRMMGR_TYPE_NONE )
{
pOwnSh->GetFlyFrmAttr( aSet );
- BOOL bRightToLeft;
- bIsInVertical = pOwnSh->IsFrmVertical(TRUE, bRightToLeft);
+ sal_Bool bRightToLeft;
+ bIsInVertical = pOwnSh->IsFrmVertical(sal_True, bRightToLeft);
}
::PrepareBoxInfo( aSet, *pOwnSh );
}
-SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, const SfxItemSet &rSet ) :
+SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, const SfxItemSet &rSet ) :
aSet( rSet ),
pOwnSh( pSh ),
- bAbsPos( FALSE ),
+ bAbsPos( sal_False ),
bNewFrm( bNew ),
- bIsInVertical(FALSE)
+ bIsInVertical(sal_False)
{
if(!bNew)
{
- BOOL bRightToLeft;
- bIsInVertical = pSh->IsFrmVertical(TRUE, bRightToLeft);
+ sal_Bool bRightToLeft;
+ bIsInVertical = pSh->IsFrmVertical(sal_True, bRightToLeft);
}
}
@@ -127,7 +127,7 @@ void SwFlyFrmAttrMgr::_UpdateFlyFrm()
{
const SfxPoolItem* pItem = 0;
- if (aSet.GetItemState(FN_SET_FRM_NAME, FALSE, &pItem) == SFX_ITEM_SET)
+ if (aSet.GetItemState(FN_SET_FRM_NAME, sal_False, &pItem) == SFX_ITEM_SET)
pOwnSh->SetFlyName(((SfxStringItem *)pItem)->GetValue());
pOwnSh->SetModified();
@@ -135,7 +135,7 @@ void SwFlyFrmAttrMgr::_UpdateFlyFrm()
if ( bAbsPos )
{
pOwnSh->SetFlyPos( aAbsPos );
- bAbsPos = FALSE;
+ bAbsPos = sal_False;
}
}
@@ -152,11 +152,11 @@ void SwFlyFrmAttrMgr::UpdateFlyFrm()
{
//JP 6.8.2001: set never an invalid anchor into the core.
const SfxPoolItem *pGItem, *pItem;
- if( SFX_ITEM_SET == aSet.GetItemState( RES_ANCHOR, FALSE, &pItem ))
+ if( SFX_ITEM_SET == aSet.GetItemState( RES_ANCHOR, sal_False, &pItem ))
{
SfxItemSet aGetSet( *aSet.GetPool(), RES_ANCHOR, RES_ANCHOR );
if( pOwnSh->GetFlyFrmAttr( aGetSet ) && 1 == aGetSet.Count() &&
- SFX_ITEM_SET == aGetSet.GetItemState( RES_ANCHOR, FALSE, &pGItem )
+ SFX_ITEM_SET == aGetSet.GetItemState( RES_ANCHOR, sal_False, &pGItem )
&& ((SwFmtAnchor*)pGItem)->GetAnchorId() ==
((SwFmtAnchor*)pItem)->GetAnchorId() )
aSet.ClearItem( RES_ANCHOR );
@@ -177,11 +177,11 @@ void SwFlyFrmAttrMgr::UpdateFlyFrm()
Beschreibung: Rahmen einfuegen
--------------------------------------------------------------------*/
-BOOL SwFlyFrmAttrMgr::InsertFlyFrm()
+sal_Bool SwFlyFrmAttrMgr::InsertFlyFrm()
{
pOwnSh->StartAllAction();
- BOOL bRet = 0 != pOwnSh->NewFlyFrm( aSet );
+ sal_Bool bRet = 0 != pOwnSh->NewFlyFrm( aSet );
// richtigen Mode an der Shell einschalten, Rahmen wurde aut. selektiert.
if ( bRet )
@@ -204,7 +204,7 @@ BOOL SwFlyFrmAttrMgr::InsertFlyFrm()
void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType,
const Point &rPos,
const Size &rSize,
- BOOL bAbs )
+ sal_Bool bAbs )
{
ASSERT( eAnchorType == FLY_AT_PAGE ||
eAnchorType == FLY_AT_PARA ||
@@ -228,7 +228,7 @@ void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType,
void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId )
{
- USHORT nPhyPageNum, nVirtPageNum;
+ sal_uInt16 nPhyPageNum, nVirtPageNum;
pOwnSh->GetPageNum( nPhyPageNum, nVirtPageNum );
aSet.Put( SwFmtAnchor( eId, nPhyPageNum ) );
@@ -258,7 +258,7 @@ void SwFlyFrmAttrMgr::SetCol( const SwFmtCol &rCol )
void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint )
{
- bAbsPos = TRUE;
+ bAbsPos = sal_True;
aAbsPos = rPoint;
SwFmtVertOrient aVertOrient( GetVertOrient() );
@@ -274,7 +274,7 @@ void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint )
--------------------------------------------------------------------*/
void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
const SwPosition* pToCharCntntPos,
- BOOL bOnlyPercentRefValue )
+ sal_Bool bOnlyPercentRefValue )
{
if (!bOnlyPercentRefValue)
{
@@ -544,7 +544,7 @@ SwTwips SwFlyFrmAttrMgr::CalcRightSpace()
/*--------------------------------------------------------------------
Beschreibung: Attribut aus dem Set loeschen
--------------------------------------------------------------------*/
-void SwFlyFrmAttrMgr::DelAttr( USHORT nId )
+void SwFlyFrmAttrMgr::DelAttr( sal_uInt16 nId )
{
aSet.ClearItem( nId );
}
@@ -555,9 +555,9 @@ void SwFlyFrmAttrMgr::SetLRSpace( long nLeft, long nRight )
SvxLRSpaceItem aTmp( (SvxLRSpaceItem&)aSet.Get( RES_LR_SPACE ) );
if( LONG_MAX != nLeft )
- aTmp.SetLeft( USHORT(nLeft) );
+ aTmp.SetLeft( sal_uInt16(nLeft) );
if( LONG_MAX != nRight )
- aTmp.SetRight( USHORT(nRight) );
+ aTmp.SetRight( sal_uInt16(nRight) );
aSet.Put( aTmp );
}
@@ -567,9 +567,9 @@ void SwFlyFrmAttrMgr::SetULSpace( long nTop, long nBottom )
SvxULSpaceItem aTmp( (SvxULSpaceItem&)aSet.Get( RES_UL_SPACE ) );
if( LONG_MAX != nTop )
- aTmp.SetUpper( USHORT(nTop) );
+ aTmp.SetUpper( sal_uInt16(nTop) );
if( LONG_MAX != nBottom )
- aTmp.SetLower( USHORT(nBottom) );
+ aTmp.SetLower( sal_uInt16(nBottom) );
aSet.Put( aTmp );
}
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index c1747efaa962..9c107582aed9 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -92,16 +92,16 @@ struct FrmMap
{
SvxSwFramePosString::StringId eStrId;
SvxSwFramePosString::StringId eMirrorStrId;
- USHORT nAlign;
- ULONG nLBRelations;
+ sal_uInt16 nAlign;
+ sal_uLong nLBRelations;
};
struct RelationMap
{
SvxSwFramePosString::StringId eStrId;
SvxSwFramePosString::StringId eMirrorStrId;
- ULONG nLBRelation;
- USHORT nRelation;
+ sal_uLong nLBRelation;
+ sal_uInt16 nRelation;
};
struct StringIdPair_Impl
@@ -399,14 +399,14 @@ static FrmMap __FAR_DATA aVAsCharHtmlMap[] =
{SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::LINE_CENTER, LB_REL_ROW}
};
-static USHORT __FAR_DATA aPageRg[] = {
+static sal_uInt16 __FAR_DATA aPageRg[] = {
RES_FRM_SIZE, RES_FRM_SIZE,
RES_VERT_ORIENT, RES_ANCHOR,
RES_COL, RES_COL,
RES_FOLLOW_TEXT_FLOW, RES_FOLLOW_TEXT_FLOW,
0
};
-static USHORT __FAR_DATA aAddPgRg[] = {
+static sal_uInt16 __FAR_DATA aAddPgRg[] = {
RES_PROTECT, RES_PROTECT,
RES_PRINT, RES_PRINT,
FN_SET_FRM_NAME, FN_SET_FRM_NAME,
@@ -476,7 +476,7 @@ void lcl_InsertVectors(ListBox& rBox,
const ::std::vector< String >& rNext, const ::std::vector< String >& rRemain)
{
::std::vector< String >::const_iterator aIt;
- USHORT nEntry = 0;
+ sal_uInt16 nEntry = 0;
for(aIt = rPrev.begin(); aIt != rPrev.end(); aIt++)
nEntry = rBox.InsertEntry(*aIt);
for(aIt = rThis.begin(); aIt != rThis.end(); aIt++)
@@ -485,7 +485,7 @@ void lcl_InsertVectors(ListBox& rBox,
nEntry = rBox.InsertEntry(*aIt);
rBox.SetSeparatorPos(nEntry);
//now insert all strings sorted
- USHORT nStartPos = rBox.GetEntryCount();
+ sal_uInt16 nStartPos = rBox.GetEntryCount();
for(aIt = rPrev.begin(); aIt != rPrev.end(); aIt++)
::InsertStringSorted(*aIt, rBox, nStartPos );
@@ -500,7 +500,7 @@ void lcl_InsertVectors(ListBox& rBox,
/* -----------------------------20.08.2002 16:12------------------------------
---------------------------------------------------------------------------*/
-SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, BOOL bVertical, BOOL bRTL)
+SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, sal_Bool bVertical, sal_Bool bRTL)
{
//special handling of STR_FROMLEFT
if(SwFPos::FROMLEFT == eStringId)
@@ -535,7 +535,7 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString
{SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT },
{SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT }
};
- USHORT nIndex;
+ sal_uInt16 nIndex;
for(nIndex = 0; nIndex < sizeof(aHoriIds) / sizeof(StringIdPair_Impl); ++nIndex)
{
if(aHoriIds[nIndex].eHori == eStringId)
@@ -559,9 +559,9 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString
// OD 12.11.2003 #i22341# - helper method in order to determine all possible
// listbox relations in a relation map for a given relation
-ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel )
+sal_uLong lcl_GetLBRelationsForRelations( const sal_uInt16 _nRel )
{
- ULONG nLBRelations = 0L;
+ sal_uLong nLBRelations = 0L;
sal_uInt16 nRelMapSize = sizeof(aRelationMap) / sizeof(RelationMap);
for ( sal_uInt16 nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos )
@@ -577,11 +577,11 @@ ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel )
// OD 14.11.2003 #i22341# - helper method on order to determine all possible
// listbox relations in a relation map for a given string ID
-ULONG lcl_GetLBRelationsForStrID( const FrmMap* _pMap,
+sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap,
const SvxSwFramePosString::StringId _eStrId,
const bool _bUseMirrorStr )
{
- ULONG nLBRelations = 0L;
+ sal_uLong nLBRelations = 0L;
size_t nRelMapSize = lcl_GetFrmMapCount( _pMap );
for ( size_t nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos )
@@ -602,7 +602,7 @@ ULONG lcl_GetLBRelationsForStrID( const FrmMap* _pMap,
namespace
{
- void HandleAutoCB( BOOL _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto )
+ void HandleAutoCB( sal_Bool _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto )
{
_rFT_man.Show( !_bChecked );
_rFT_auto.Show( _bChecked );
@@ -654,16 +654,16 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
aExampleWN (this, SW_RES(WN_BSP)),
- bAtHorzPosModified( FALSE ),
- bAtVertPosModified( FALSE ),
+ bAtHorzPosModified( sal_False ),
+ bAtVertPosModified( sal_False ),
- bFormat(FALSE),
- bNew(TRUE),
- bNoModifyHdl(TRUE),
- bVerticalChanged(FALSE),
- bIsVerticalFrame(FALSE),
- bIsInRightToLeft(FALSE),
- bHtmlMode(FALSE),
+ bFormat(sal_False),
+ bNew(sal_True),
+ bNoModifyHdl(sal_True),
+ bVerticalChanged(sal_False),
+ bIsVerticalFrame(sal_False),
+ bIsInRightToLeft(sal_False),
+ bHtmlMode(sal_False),
nHtmlMode(0),
nDlgType(0),
nUpperBorder(0),
@@ -777,7 +777,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
FieldUnit aMetric = ::GetDfltMetric(bHtmlMode);
SetMetric( aWidthED, aMetric );
@@ -789,9 +789,9 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
const SwFmtAnchor& rAnchor = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR);
- if (SFX_ITEM_SET == rSet.GetItemState(FN_OLE_IS_MATH, FALSE, &pItem))
+ if (SFX_ITEM_SET == rSet.GetItemState(FN_OLE_IS_MATH, sal_False, &pItem))
m_bIsMathOLE = ((const SfxBoolItem*)pItem)->GetValue();
- if (SFX_ITEM_SET == rSet.GetItemState(FN_MATH_BASELINE_ALIGNMENT, FALSE, &pItem))
+ if (SFX_ITEM_SET == rSet.GetItemState(FN_MATH_BASELINE_ALIGNMENT, sal_False, &pItem))
m_bIsMathBaselineAlignment = ((const SfxBoolItem*)pItem)->GetValue();
EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment
&& FLY_AS_CHAR == rAnchor.GetAnchorId()) );
@@ -799,24 +799,24 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
if (bFormat)
{
// Bei Formaten keine Ankerbearbeitung
- aAnchorAtPageRB.Enable( FALSE );
- aAnchorAtParaRB.Enable( FALSE );
- aAnchorAtCharRB.Enable( FALSE );
- aAnchorAsCharRB.Enable( FALSE );
- aAnchorAtFrameRB.Enable( FALSE );
- aTypeFL.Enable( FALSE );
- aFixedRatioCB.Enable(FALSE);
+ aAnchorAtPageRB.Enable( sal_False );
+ aAnchorAtParaRB.Enable( sal_False );
+ aAnchorAtCharRB.Enable( sal_False );
+ aAnchorAsCharRB.Enable( sal_False );
+ aAnchorAtFrameRB.Enable( sal_False );
+ aTypeFL.Enable( sal_False );
+ aFixedRatioCB.Enable(sal_False);
}
else
{
if (rAnchor.GetAnchorId() != FLY_AT_FLY && !pSh->IsFlyInFly())
aAnchorAtFrameRB.Hide();
- if(!bVerticalChanged && pSh->IsFrmVertical(TRUE, bIsInRightToLeft))
+ if(!bVerticalChanged && pSh->IsFrmVertical(sal_True, bIsInRightToLeft))
{
String sHLabel = aHorizontalFT.GetText();
aHorizontalFT.SetText(aVerticalFT.GetText());
aVerticalFT.SetText(sHLabel);
- bIsVerticalFrame = TRUE;
+ bIsVerticalFrame = sal_True;
}
}
@@ -824,7 +824,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
{
ASSERT(pSh , "shell not found");
//OS: nur fuer die Variante Einfuegen/Grafik/Eigenschaften
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_GRF_REALSIZE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_GRF_REALSIZE, sal_False, &pItem))
aGrfSize = ((const SvxSizeItem*)pItem)->GetSize();
else
pSh->GetGrfSize( aGrfSize );
@@ -838,7 +838,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
// aTypeFL.SetSizePixel(Size(aTypeFL.GetSizePixel().Width(), aSizeFL.GetSizePixel().Height()));
if ( nDlgType == DLG_FRM_GRF )
- aFixedRatioCB.Check( FALSE );
+ aFixedRatioCB.Check( sal_False );
else
{
if ( bNew )
@@ -902,9 +902,9 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
if(nDlgType == DLG_FRM_STD &&
0 == (nHtmlMode & HTMLMODE_FULL_ABS_POS))
{
- aHeightFT .Enable( FALSE );
- aHeightED .Enable( FALSE );
- aRelHeightCB.Enable( FALSE );
+ aHeightFT .Enable( sal_False );
+ aHeightED .Enable( sal_False );
+ aRelHeightCB.Enable( sal_False );
}
if( 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))
{
@@ -912,15 +912,15 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
{
aAnchorAtParaRB.Check();
}
- aAnchorAtPageRB.Enable(FALSE);
+ aAnchorAtPageRB.Enable(sal_False);
}
- aAutoHeightCB.Enable(FALSE);
- aAutoWidthCB.Enable(FALSE);
- aMirrorPagesCB.Show(FALSE);
+ aAutoHeightCB.Enable(sal_False);
+ aAutoWidthCB.Enable(sal_False);
+ aMirrorPagesCB.Show(sal_False);
if(nDlgType == DLG_FRM_STD)
- aFixedRatioCB.Enable(FALSE);
+ aFixedRatioCB.Enable(sal_False);
// OD 19.09.2003 #i18732# - hide checkbox in HTML mode
- aFollowTextFlowCB.Show(FALSE);
+ aFollowTextFlowCB.Show(sal_False);
}
else
{
@@ -935,13 +935,13 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
aAnchorAtFrameRB.IsChecked() );
}
- Init( rSet, TRUE );
+ Init( rSet, sal_True );
aAtVertPosED.SaveValue();
aAtHorzPosED.SaveValue();
// OD 19.09.2003 #i18732#
aFollowTextFlowCB.SaveValue();
- bNoModifyHdl = FALSE;
+ bNoModifyHdl = sal_False;
//lock PercentFields
aWidthED.LockAutoCalculation(sal_True);
aHeightED.LockAutoCalculation(sal_True);
@@ -962,9 +962,9 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
Beschreibung: Attribute in den Set stopfen bei OK
--------------------------------------------------------------------*/
-BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwWrtShell* pSh = bFormat ? ::GetActiveWrtShell()
: ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
ASSERT( pSh , "shell not found");
@@ -988,7 +988,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
SwFmtHoriOrient aHoriOrient( (const SwFmtHoriOrient&)
rOldSet.Get(RES_HORI_ORIENT) );
- USHORT nMapPos = GetMapPos(pHMap, aHorizontalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pHMap, aHorizontalDLB);
short nAlign = GetAlignment(pHMap, nMapPos, aHorizontalDLB, aHoriRelationLB);
short nRel = GetRelation(pHMap, aHoriRelationLB);
@@ -999,7 +999,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
aHoriOrient.SetRelationOrient( eRel );
aHoriOrient.SetPosToggle(aMirrorPagesCB.IsChecked());
- BOOL bMod = aAtHorzPosED.GetText() != aAtHorzPosED.GetSavedValue();
+ sal_Bool bMod = aAtHorzPosED.GetText() != aAtHorzPosED.GetSavedValue();
bMod |= aMirrorPagesCB.GetState() != aMirrorPagesCB.GetSavedValue();
if ( eHOri == text::HoriOrientation::NONE &&
@@ -1010,10 +1010,10 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
}
pOldItem = GetOldItem(rSet, FN_HORI_ORIENT);
- BOOL bSame = FALSE;
+ sal_Bool bSame = sal_False;
if ((bNew == bFormat) && pOldItem)
{
- bSame = static_cast< BOOL >(aHoriOrient == (SwFmtHoriOrient&)*pOldItem);
+ bSame = static_cast< sal_Bool >(aHoriOrient == (SwFmtHoriOrient&)*pOldItem);
}
if ((bNew && !bFormat) || ((bAtHorzPosModified || bMod) && !bSame))
{
@@ -1027,7 +1027,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
SwFmtVertOrient aVertOrient( (const SwFmtVertOrient&)
rOldSet.Get(RES_VERT_ORIENT) );
- USHORT nMapPos = GetMapPos(pVMap, aVerticalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pVMap, aVerticalDLB);
short nAlign = GetAlignment(pVMap, nMapPos, aVerticalDLB, aVertRelationLB);
short nRel = GetRelation(pVMap, aVertRelationLB);
@@ -1037,7 +1037,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
aVertOrient.SetVertOrient ( eVOri);
aVertOrient.SetRelationOrient( eRel );
- BOOL bMod = aAtVertPosED.GetText() != aAtVertPosED.GetSavedValue();
+ sal_Bool bMod = aAtVertPosED.GetText() != aAtVertPosED.GetSavedValue();
if ( eVOri == text::VertOrientation::NONE &&
( bNew || (bAtVertPosModified || bMod) || nOldV != eVOri) )
@@ -1052,10 +1052,10 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
aVertOrient.SetPos( nY );
}
pOldItem = GetOldItem(rSet, FN_VERT_ORIENT);
- BOOL bSame = FALSE;
+ sal_Bool bSame = sal_False;
if((bNew == bFormat) && pOldItem)
{
- bSame = static_cast< BOOL >( bFormat ?
+ bSame = static_cast< sal_Bool >( bFormat ?
aVertOrient.GetVertOrient() == ((SwFmtVertOrient*)pOldItem)->GetVertOrient() &&
aVertOrient.GetRelationOrient() == ((SwFmtVertOrient*)pOldItem)->GetRelationOrient() &&
aVertOrient.GetPos() == ((SwFmtVertOrient*)pOldItem)->GetPos()
@@ -1077,16 +1077,16 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
SwFmtFrmSize aSz( rOldSize );
/* // Folgende Zeilen nur zum debuggen:
- BOOL bModified = aWidthED.IsValueModified();
- USHORT nOldWidth = rOldSize.GetWidth ();
- USHORT nWidth = aWidthED .GetValue();
- USHORT nMinWidth = aWidthED .GetMin();*/
+ sal_Bool bModified = aWidthED.IsValueModified();
+ sal_uInt16 nOldWidth = rOldSize.GetWidth ();
+ sal_uInt16 nWidth = aWidthED .GetValue();
+ sal_uInt16 nMinWidth = aWidthED .GetMin();*/
- BOOL bValueModified = (aWidthED.IsValueModified() || aHeightED.IsValueModified());
- BOOL bCheckChanged = (aRelWidthCB.GetSavedValue() != aRelWidthCB.IsChecked()
+ sal_Bool bValueModified = (aWidthED.IsValueModified() || aHeightED.IsValueModified());
+ sal_Bool bCheckChanged = (aRelWidthCB.GetSavedValue() != aRelWidthCB.IsChecked()
|| aRelHeightCB.GetSavedValue() != aRelHeightCB.IsChecked());
- BOOL bLegalValue = !(!rOldSize.GetWidth () && !rOldSize.GetHeight() &&
+ sal_Bool bLegalValue = !(!rOldSize.GetWidth () && !rOldSize.GetHeight() &&
aWidthED .GetValue() == aWidthED .GetMin() &&
aHeightED.GetValue() == aHeightED.GetMin());
@@ -1099,12 +1099,12 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
if (aRelWidthCB.IsChecked())
{
- aSz.SetWidthPercent((BYTE)Min( static_cast< sal_Int64 >(MAX_PERCENT_WIDTH), aWidthED.Convert(aWidthED.NormalizePercent(nNewWidth), FUNIT_TWIP, FUNIT_CUSTOM)));
+ aSz.SetWidthPercent((sal_uInt8)Min( static_cast< sal_Int64 >(MAX_PERCENT_WIDTH), aWidthED.Convert(aWidthED.NormalizePercent(nNewWidth), FUNIT_TWIP, FUNIT_CUSTOM)));
}
else
aSz.SetWidthPercent(0);
if (aRelHeightCB.IsChecked())
- aSz.SetHeightPercent((BYTE)Min(static_cast< sal_Int64 >(MAX_PERCENT_HEIGHT), aHeightED.Convert(aHeightED.NormalizePercent(nNewHeight), FUNIT_TWIP, FUNIT_CUSTOM)));
+ aSz.SetHeightPercent((sal_uInt8)Min(static_cast< sal_Int64 >(MAX_PERCENT_HEIGHT), aHeightED.Convert(aHeightED.NormalizePercent(nNewHeight), FUNIT_TWIP, FUNIT_CUSTOM)));
else
aSz.SetHeightPercent(0);
@@ -1159,14 +1159,14 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
--------------------------------------------------------------------*/
void SwFrmPage::InitPos(RndStdIds eId,
- USHORT nH,
- USHORT nHRel,
- USHORT nV,
- USHORT nVRel,
+ sal_uInt16 nH,
+ sal_uInt16 nHRel,
+ sal_uInt16 nV,
+ sal_uInt16 nVRel,
long nX,
long nY)
{
- USHORT nPos = aVerticalDLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aVerticalDLB.GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND && pVMap )
{
nOldV = pVMap[nPos].nAlign;
@@ -1186,7 +1186,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
nOldHRel = ((RelationMap *)aHoriRelationLB.GetEntryData(nPos))->nRelation;
}
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if ( eId == FLY_AT_PAGE )
{
pVMap = bHtmlMode ? aVPageHtmlMap : aVPageMap;
@@ -1229,7 +1229,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
{
pVMap = bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap;
pHMap = 0;
- bEnable = FALSE;
+ bEnable = sal_False;
}
aHorizontalDLB.Enable( bEnable );
aHorizontalFT.Enable( bEnable );
@@ -1242,7 +1242,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
nHRel = nOldHRel;
}
// OD 12.11.2003 #i22341# - pass <nHRel> as 3rd parameter to method <FillPosLB>
- USHORT nMapPos = FillPosLB(pHMap, nH, nHRel, aHorizontalDLB);
+ sal_uInt16 nMapPos = FillPosLB(pHMap, nH, nHRel, aHorizontalDLB);
FillRelLB(pHMap, nMapPos, nH, nHRel, aHoriRelationLB, aHoriRelationFT);
// Vertikal
@@ -1299,9 +1299,9 @@ void SwFrmPage::InitPos(RndStdIds eId,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap,
- const USHORT _nAlign,
- const USHORT _nRel,
+sal_uInt16 SwFrmPage::FillPosLB(const FrmMap* _pMap,
+ const sal_uInt16 _nAlign,
+ const sal_uInt16 _nRel,
ListBox& _rLB )
{
String sSelEntry, sOldEntry;
@@ -1311,7 +1311,7 @@ USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap,
// OD 12.11.2003 #i22341# - determine all possible listbox relations for
// given relation for map <aVCharMap>
- const ULONG nLBRelations = (_pMap != aVCharMap)
+ const sal_uLong nLBRelations = (_pMap != aVCharMap)
? 0L
: ::lcl_GetLBRelationsForRelations( _nRel );
@@ -1355,15 +1355,15 @@ USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap,
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
- const USHORT _nLBSelPos,
- const USHORT _nAlign,
- USHORT _nRel,
+sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap,
+ const sal_uInt16 _nLBSelPos,
+ const sal_uInt16 _nAlign,
+ sal_uInt16 _nRel,
ListBox& _rLB,
FixedText& _rFT )
{
String sSelEntry;
- ULONG nLBRelations = 0;
+ sal_uLong nLBRelations = 0;
size_t nMapCount = ::lcl_GetFrmMapCount(_pMap);
_rLB.Clear();
@@ -1373,7 +1373,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
if (_pMap == aVAsCharHtmlMap || _pMap == aVAsCharMap)
{
String sOldEntry(_rLB.GetSelectEntry());
- USHORT nRelCount = sizeof(aAsCharRelationMap) / sizeof(RelationMap);
+ sal_uInt16 nRelCount = sizeof(aAsCharRelationMap) / sizeof(RelationMap);
SvxSwFramePosString::StringId eStrId = _pMap[_nLBSelPos].eStrId;
for (size_t nMapPos = 0; nMapPos < nMapCount; nMapPos++)
@@ -1381,7 +1381,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
if (_pMap[nMapPos].eStrId == eStrId)
{
nLBRelations = _pMap[nMapPos].nLBRelations;
- for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++)
+ for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++)
{
if (nLBRelations & aAsCharRelationMap[nRelPos].nLBRelation)
{
@@ -1389,7 +1389,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, bIsVerticalFrame, bIsInRightToLeft);
String sEntry = aFramePosString.GetString(sStrId1);
- USHORT nPos = _rLB.InsertEntry(sEntry);
+ sal_uInt16 nPos = _rLB.InsertEntry(sEntry);
_rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]);
if (_pMap[nMapPos].nAlign == _nAlign)
sSelEntry = sEntry;
@@ -1406,7 +1406,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
if (!_rLB.GetSelectEntryCount())
{
- for (USHORT i = 0; i < _rLB.GetEntryCount(); i++)
+ for (sal_uInt16 i = 0; i < _rLB.GetEntryCount(); i++)
{
RelationMap *pEntry = (RelationMap *)_rLB.GetEntryData(i);
if (pEntry->nLBRelation == LB_REL_CHAR) // Default
@@ -1420,7 +1420,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
}
else
{
- USHORT nRelCount = sizeof(aRelationMap) / sizeof(RelationMap);
+ sal_uInt16 nRelCount = sizeof(aRelationMap) / sizeof(RelationMap);
// OD 14.11.2003 #i22341# - special handling for map <aVCharMap>,
// because its ambigous in its <eStrId>/<eMirrorStrId>.
@@ -1437,11 +1437,11 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
nLBRelations = _pMap[_nLBSelPos].nLBRelations;
}
- for (ULONG nBit = 1; nBit < 0x80000000; nBit <<= 1)
+ for (sal_uLong nBit = 1; nBit < 0x80000000; nBit <<= 1)
{
if (nLBRelations & nBit)
{
- for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++)
+ for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++)
{
if (aRelationMap[nRelPos].nLBRelation == nBit)
{
@@ -1449,7 +1449,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId;
eStrId1 = lcl_ChangeResIdToVerticalOrRTL(eStrId1, bIsVerticalFrame, bIsInRightToLeft);
String sEntry = aFramePosString.GetString(eStrId1);
- USHORT nPos = _rLB.InsertEntry(sEntry);
+ sal_uInt16 nPos = _rLB.InsertEntry(sEntry);
_rLB.SetEntryData(nPos, &aRelationMap[nRelPos]);
if (!sSelEntry.Len() && aRelationMap[nRelPos].nRelation == _nRel)
sSelEntry = sEntry;
@@ -1482,7 +1482,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
break;
}
- for (USHORT i = 0; i < _rLB.GetEntryCount(); i++)
+ for (sal_uInt16 i = 0; i < _rLB.GetEntryCount(); i++)
{
RelationMap *pEntry = (RelationMap *)_rLB.GetEntryData(i);
if (pEntry->nRelation == _nRel)
@@ -1515,7 +1515,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
short SwFrmPage::GetRelation(FrmMap * /*pMap*/, ListBox &rRelationLB)
{
short nRel = 0;
- USHORT nPos = rRelationLB.GetSelectEntryPos();
+ sal_uInt16 nPos = rRelationLB.GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -1530,7 +1530,7 @@ short SwFrmPage::GetRelation(FrmMap * /*pMap*/, ListBox &rRelationLB)
Beschreibung:
--------------------------------------------------------------------*/
-short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos,
+short SwFrmPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos,
ListBox &/*rAlignLB*/, ListBox &rRelationLB)
{
short nAlign = 0;
@@ -1542,7 +1542,7 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos,
{
if (rRelationLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND)
{
- ULONG nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation;
+ sal_uLong nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation;
size_t nMapCount = ::lcl_GetFrmMapCount(pMap);
SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId;
@@ -1550,7 +1550,7 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos,
{
if (pMap[i].eStrId == eStrId)
{
- ULONG nLBRelations = pMap[i].nLBRelations;
+ sal_uLong nLBRelations = pMap[i].nLBRelations;
if (nLBRelations & nRel)
{
nAlign = pMap[i].nAlign;
@@ -1570,10 +1570,10 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
+sal_uInt16 SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
{
- USHORT nMapPos = 0;
- USHORT nLBSelPos = rAlignLB.GetSelectEntryPos();
+ sal_uInt16 nMapPos = 0;
+ sal_uInt16 nLBSelPos = rAlignLB.GetSelectEntryPos();
if (nLBSelPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -1591,7 +1591,7 @@ USHORT SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
if (sEntry == sSelEntry)
{
- nMapPos = static_cast< USHORT >(i);
+ nMapPos = static_cast< sal_uInt16 >(i);
break;
}
}
@@ -1635,9 +1635,9 @@ RndStdIds SwFrmPage::GetAnchor()
void SwFrmPage::ActivatePage(const SfxItemSet& rSet)
{
- bNoModifyHdl = TRUE;
+ bNoModifyHdl = sal_True;
Init(rSet);
- bNoModifyHdl = FALSE;
+ bNoModifyHdl = sal_False;
//lock PercentFields
aWidthED.LockAutoCalculation(sal_True);
aHeightED.LockAutoCalculation(sal_True);
@@ -1663,7 +1663,7 @@ int SwFrmPage::DeactivatePage(SfxItemSet * _pSet)
_pSet->Put( aAnc );
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -1723,7 +1723,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
SwFlyFrmAttrMgr aMgr( bNew, pSh, (const SwAttrSet&)GetItemSet() );
SvxSwFrameValidation aVal;
- aVal.nAnchorType = static_cast< USHORT >(GetAnchor());
+ aVal.nAnchorType = static_cast< sal_uInt16 >(GetAnchor());
aVal.bAutoHeight = aAutoHeightCB.IsChecked();
aVal.bAutoWidth = aAutoWidthCB.IsChecked();
aVal.bMirror = aMirrorPagesCB.IsChecked();
@@ -1733,7 +1733,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
if ( pHMap )
{
// Ausrichtung Horizontal
- USHORT nMapPos = GetMapPos(pHMap, aHorizontalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pHMap, aHorizontalDLB);
short nAlign = GetAlignment(pHMap, nMapPos, aHorizontalDLB, aHoriRelationLB);
short nRel = GetRelation(pHMap, aHoriRelationLB);
@@ -1746,7 +1746,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
if ( pVMap )
{
// Ausrichtung Vertikal
- USHORT nMapPos = GetMapPos(pVMap, aVerticalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pVMap, aVerticalDLB);
short nAlign = GetAlignment(pVMap, nMapPos, aVerticalDLB, aVertRelationLB);
short nRel = GetRelation(pVMap, aVertRelationLB);
@@ -1764,7 +1764,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
aVal.nHPos = nAtHorzPosVal;
aVal.nVPos = nAtVertPosVal;
- aMgr.ValidateMetrics(aVal, mpToCharCntntPos, TRUE); // Einmal, um Referenzwerte fuer prozentuale Werte zu erhalten
+ aMgr.ValidateMetrics(aVal, mpToCharCntntPos, sal_True); // Einmal, um Referenzwerte fuer prozentuale Werte zu erhalten
// Referenzwerte fuer fuer Prozentwerte setzen (100%) ...
aWidthED.SetRefValue(aVal.aPercentSize.Width());
@@ -1785,7 +1785,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
const SwFmtCol& rCol = (const SwFmtCol&)GetTabDialog()->GetExampleSet()->Get(RES_COL);
if ( rCol.GetColumns().Count() > 1 )
{
- for ( USHORT i = 0; i < rCol.GetColumns().Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rCol.GetColumns().Count(); ++i )
{
aVal.nMinWidth += rCol.GetColumns()[i]->GetLeft() +
rCol.GetColumns()[i]->GetRight() +
@@ -1875,23 +1875,23 @@ IMPL_LINK( SwFrmPage, AnchorTypeHdl, RadioButton *, EMPTYARG )
IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
{
- BOOL bHori = pLB == &aHorizontalDLB;
+ sal_Bool bHori = pLB == &aHorizontalDLB;
ListBox *pRelLB = bHori ? &aHoriRelationLB : &aVertRelationLB;
FixedText *pRelFT = bHori ? &aHoriRelationFT : &aVertRelationFT;
FrmMap *pMap = bHori ? pHMap : pVMap;
- USHORT nMapPos = GetMapPos(pMap, *pLB);
+ sal_uInt16 nMapPos = GetMapPos(pMap, *pLB);
short nAlign = GetAlignment(pMap, nMapPos, *pLB, *pRelLB);
if (bHori)
{
- BOOL bEnable = text::HoriOrientation::NONE == nAlign;
+ sal_Bool bEnable = text::HoriOrientation::NONE == nAlign;
aAtHorzPosED.Enable( bEnable );
aAtHorzPosFT.Enable( bEnable );
}
else
{
- BOOL bEnable = text::VertOrientation::NONE == nAlign && m_bAllowVertPositioning;
+ sal_Bool bEnable = text::VertOrientation::NONE == nAlign && m_bAllowVertPositioning;
aAtVertPosED.Enable( bEnable );
aAtVertPosFT.Enable( bEnable );
}
@@ -1899,7 +1899,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
if (pLB) // Nur wenn Handler durch Aenderung des Controllers gerufen wurde
RangeModifyHdl( 0 );
- USHORT nRel = 0;
+ sal_uInt16 nRel = 0;
if (pLB->GetSelectEntryCount())
{
@@ -1914,15 +1914,15 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
UpdateExample();
if (bHori)
- bAtHorzPosModified = TRUE;
+ bAtHorzPosModified = sal_True;
else
- bAtVertPosModified = TRUE;
+ bAtVertPosModified = sal_True;
// Sonderbehandlung fuer HTML-Mode mit horz-vert-Abhaengigkeiten
if(bHtmlMode && nHtmlMode&HTMLMODE_SOME_ABS_POS &&
(FLY_AT_CHAR == GetAnchor()))
{
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if(bHori)
{
// rechts ist nur unterhalb erlaubt - von links nur oben
@@ -1934,17 +1934,17 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
aVerticalDLB.SelectEntryPos(1);
else
aVerticalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
else if(text::HoriOrientation::LEFT == nAlign && 1 == aVerticalDLB.GetSelectEntryPos())
{
aVerticalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
else if(text::HoriOrientation::NONE == nAlign && 1 == aVerticalDLB.GetSelectEntryPos())
{
aVerticalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
if(bSet)
PosHdl(&aVerticalDLB);
@@ -1956,7 +1956,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
if(1 == aHorizontalDLB.GetSelectEntryPos())
{
aHorizontalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
aHoriRelationLB.SelectEntryPos(1);
}
@@ -1965,7 +1965,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
if(2 == aHorizontalDLB.GetSelectEntryPos())
{
aHorizontalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
aHoriRelationLB.SelectEntryPos(0) ;
}
@@ -1983,20 +1983,20 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB )
{
- BOOL bHori = pLB == &aHoriRelationLB;
+ sal_Bool bHori = pLB == &aHoriRelationLB;
UpdateExample();
if (bHori)
- bAtHorzPosModified = TRUE;
+ bAtHorzPosModified = sal_True;
else
- bAtVertPosModified = TRUE;
+ bAtVertPosModified = sal_True;
if (bHtmlMode && (FLY_AT_CHAR == GetAnchor()))
{
if(bHori)
{
- USHORT nRel = GetRelation(pHMap, aHoriRelationLB);
+ sal_uInt16 nRel = GetRelation(pHMap, aHoriRelationLB);
if(text::RelOrientation::PRINT_AREA == nRel && 0 == aVerticalDLB.GetSelectEntryPos())
{
aVerticalDLB.SelectEntryPos(1);
@@ -2067,10 +2067,10 @@ IMPL_LINK( SwFrmPage, ModifyHdl, Edit *, pEdit )
void SwFrmPage::UpdateExample()
{
- USHORT nPos = aHorizontalDLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aHorizontalDLB.GetSelectEntryPos();
if ( pHMap && nPos != LISTBOX_ENTRY_NOTFOUND )
{
- USHORT nMapPos = GetMapPos(pHMap, aHorizontalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pHMap, aHorizontalDLB);
short nAlign = GetAlignment(pHMap, nMapPos, aHorizontalDLB, aHoriRelationLB);
short nRel = GetRelation(pHMap, aHoriRelationLB);
@@ -2081,7 +2081,7 @@ void SwFrmPage::UpdateExample()
nPos = aVerticalDLB.GetSelectEntryPos();
if ( pVMap && nPos != LISTBOX_ENTRY_NOTFOUND )
{
- USHORT nMapPos = GetMapPos(pVMap, aVerticalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pVMap, aVerticalDLB);
short nAlign = GetAlignment(pVMap, nMapPos, aVerticalDLB, aVertRelationLB);
short nRel = GetRelation(pVMap, aVertRelationLB);
@@ -2094,18 +2094,18 @@ void SwFrmPage::UpdateExample()
long nYPos = static_cast< long >(aAtVertPosED.Denormalize(aAtVertPosED.GetValue(FUNIT_TWIP)));
aExampleWN.SetRelPos(Point(nXPos, nYPos));
- aExampleWN.SetAnchor( static_cast< USHORT >(GetAnchor()) );
+ aExampleWN.SetAnchor( static_cast< sal_uInt16 >(GetAnchor()) );
aExampleWN.Invalidate();
}
-void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
+void SwFrmPage::Init(const SfxItemSet& rSet, sal_Bool bReset)
{
if(!bFormat)
{
SwWrtShell* pSh = ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
// Size
- const BOOL bSizeFixed = pSh->IsSelObjProtected( FLYPROTECT_FIXED );
+ const sal_Bool bSizeFixed = pSh->IsSelObjProtected( FLYPROTECT_FIXED );
aWidthED .Enable( !bSizeFixed );
aHeightED.Enable( !bSizeFixed );
@@ -2117,9 +2117,9 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
const SvGlobalName& rFactNm( pSh->GetOLEObject()->getClassID() );
struct _GlobalNameId {
- 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;
} aGlbNmIds[4] = { { SO3_SM_CLASSID_60 }, { SO3_SM_CLASSID_50 },
{ SO3_SM_CLASSID_40 }, { SO3_SM_CLASSID_30 } };
@@ -2182,7 +2182,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
if (!IsInGraficMode())
{
SwFrmSize eSize = rSize.GetHeightSizeType();
- BOOL bCheck = eSize != ATT_FIX_SIZE;
+ sal_Bool bCheck = eSize != ATT_FIX_SIZE;
aAutoHeightCB.Check( bCheck );
HandleAutoCB( bCheck, aHeightFT, aHeightAutoFT );
if( eSize == ATT_VAR_SIZE )
@@ -2200,7 +2200,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
SwWrtShell* pSh = ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
const SwFrmFmt* pFmt = pSh->GetFlyFrmFmt();
if( pFmt && pFmt->GetChain().GetNext() )
- aAutoHeightCB.Enable( FALSE );
+ aAutoHeightCB.Enable( sal_False );
}
}
else
@@ -2219,7 +2219,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
// Spalten
SwFmtCol aCol( (const SwFmtCol&)rSet.Get(RES_COL) );
- ::FitToActualSize( aCol, (USHORT)rSize.GetWidth() );
+ ::FitToActualSize( aCol, (sal_uInt16)rSize.GetWidth() );
RndStdIds eAnchorId = (RndStdIds)GetAnchor();
@@ -2261,7 +2261,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
// Transparent fuers Bsp
// Umlauf fuers Bsp
const SwFmtSurround& rSurround = (const SwFmtSurround&)rSet.Get(RES_SURROUND);
- aExampleWN.SetWrap ( static_cast< USHORT >(rSurround.GetSurround()) );
+ aExampleWN.SetWrap ( static_cast< sal_uInt16 >(rSurround.GetSurround()) );
if ( rSurround.GetSurround() == SURROUND_THROUGHT )
{
@@ -2273,18 +2273,18 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
RangeModifyHdl(&aWidthED); // Referenzwerte setzen (fuer 100%)
if (rSize.GetWidthPercent() == 0xff || rSize.GetHeightPercent() == 0xff)
- aFixedRatioCB.Check(TRUE);
+ aFixedRatioCB.Check(sal_True);
if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff &&
!aRelWidthCB.IsChecked())
{
- aRelWidthCB.Check(TRUE);
+ aRelWidthCB.Check(sal_True);
RelSizeClickHdl(&aRelWidthCB);
aWidthED.SetPrcntValue(rSize.GetWidthPercent(), FUNIT_CUSTOM);
}
if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff &&
!aRelHeightCB.IsChecked())
{
- aRelHeightCB.Check(TRUE);
+ aRelHeightCB.Check(sal_True);
RelSizeClickHdl(&aRelHeightCB);
aHeightED.SetPrcntValue(rSize.GetHeightPercent(), FUNIT_CUSTOM);
}
@@ -2292,14 +2292,14 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
aRelHeightCB.SaveValue();
}
-USHORT* SwFrmPage::GetRanges()
+sal_uInt16* SwFrmPage::GetRanges()
{
return aPageRg;
}
/* -----------------------------03.11.00 10:52--------------------------------
---------------------------------------------------------------------------*/
-void SwFrmPage::SetFormatUsed(BOOL bFmt)
+void SwFrmPage::SetFormatUsed(sal_Bool bFmt)
{
bFormat = bFmt;
if(bFormat)
@@ -2385,14 +2385,14 @@ SfxTabPage* SwGrfExtPage::Create( Window *pParent, const SfxItemSet &rSet )
void SwGrfExtPage::Reset(const SfxItemSet &rSet)
{
const SfxPoolItem* pItem;
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_GRF_CONNECT, TRUE, &pItem)
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_GRF_CONNECT, sal_True, &pItem)
&& ((const SfxBoolItem *)pItem)->GetValue() )
{
aBrowseBT.Enable();
- aConnectED.SetReadOnly(FALSE);
+ aConnectED.SetReadOnly(sal_False);
}
ActivatePage(rSet);
@@ -2405,34 +2405,34 @@ void SwGrfExtPage::Reset(const SfxItemSet &rSet)
void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
{
const SvxProtectItem& rProt = (const SvxProtectItem& )rSet.Get(RES_PROTECT);
- BOOL bProtCntnt = rProt.IsCntntProtected();
+ sal_Bool bProtCntnt = rProt.IsCntntProtected();
const SfxPoolItem* pItem = 0;
- BOOL bEnable = FALSE;
- BOOL bEnableMirrorRB = FALSE;
+ sal_Bool bEnable = sal_False;
+ sal_Bool bEnableMirrorRB = sal_False;
- SfxItemState eState = rSet.GetItemState(RES_GRFATR_MIRRORGRF, TRUE, &pItem);
+ SfxItemState eState = rSet.GetItemState(RES_GRFATR_MIRRORGRF, sal_True, &pItem);
if( SFX_ITEM_UNKNOWN != eState && !bProtCntnt && !bHtmlMode )
{
if( SFX_ITEM_SET != eState )
pItem = &rSet.Get( RES_GRFATR_MIRRORGRF );
- bEnable = TRUE;
+ bEnable = sal_True;
MirrorGraph eMirror = static_cast< MirrorGraph >(((const SwMirrorGrf* )pItem)->GetValue());
switch( eMirror )
{
case RES_MIRROR_GRAPH_DONT: break;
- case RES_MIRROR_GRAPH_VERT: aMirrorHorzBox.Check(TRUE); break;
- case RES_MIRROR_GRAPH_HOR: aMirrorVertBox.Check(TRUE); break;
- case RES_MIRROR_GRAPH_BOTH: aMirrorHorzBox.Check(TRUE);
- aMirrorVertBox.Check(TRUE);
+ case RES_MIRROR_GRAPH_VERT: aMirrorHorzBox.Check(sal_True); break;
+ case RES_MIRROR_GRAPH_HOR: aMirrorVertBox.Check(sal_True); break;
+ case RES_MIRROR_GRAPH_BOTH: aMirrorHorzBox.Check(sal_True);
+ aMirrorVertBox.Check(sal_True);
break;
default:
;
}
- USHORT nPos = ((const SwMirrorGrf* )pItem)->IsGrfToggle() ? 1 : 0;
+ sal_uInt16 nPos = ((const SwMirrorGrf* )pItem)->IsGrfToggle() ? 1 : 0;
nPos += (eMirror == RES_MIRROR_GRAPH_VERT || eMirror == RES_MIRROR_GRAPH_BOTH)
? 2 : 0;
@@ -2442,7 +2442,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
{
case 1: // Auf linken bzw geraden Seiten spiegeln
aLeftPagesRB.Check();
- aMirrorHorzBox.Check(TRUE);
+ aMirrorHorzBox.Check(sal_True);
break;
case 2: // Auf allen Seiten spiegeln
aAllPagesRB.Check();
@@ -2456,7 +2456,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
}
}
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, sal_False, &pItem ) )
{
const SvxBrushItem& rBrush = *(SvxBrushItem*)pItem;
if( rBrush.GetGraphicLink() )
@@ -2491,22 +2491,22 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
+sal_Bool SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if ( aMirrorHorzBox.GetSavedValue() != aMirrorHorzBox.IsChecked() ||
aMirrorVertBox.GetSavedValue() != aMirrorVertBox.IsChecked() ||
aAllPagesRB .GetSavedValue() != aAllPagesRB .IsChecked() ||
aLeftPagesRB.GetSavedValue() != aLeftPagesRB.IsChecked() ||
aRightPagesRB.GetSavedValue() != aRightPagesRB.IsChecked())
{
- bModified = TRUE;
+ bModified = sal_True;
- BOOL bHori = FALSE;
+ sal_Bool bHori = sal_False;
if (aMirrorHorzBox.IsChecked() &&
!aLeftPagesRB.IsChecked())
- bHori = TRUE;
+ bHori = sal_True;
MirrorGraph eMirror;
eMirror = aMirrorVertBox.IsChecked() && bHori ?
@@ -2514,7 +2514,7 @@ BOOL SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
RES_MIRROR_GRAPH_VERT : aMirrorVertBox.IsChecked() ?
RES_MIRROR_GRAPH_HOR : RES_MIRROR_GRAPH_DONT;
- BOOL bMirror = !aAllPagesRB.IsChecked();
+ sal_Bool bMirror = !aAllPagesRB.IsChecked();
SwMirrorGrf aMirror( eMirror );
aMirror.SetGrfToggle(bMirror );
rSet.Put( aMirror );
@@ -2522,7 +2522,7 @@ BOOL SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
if( aGrfName != aNewGrfName || aConnectED.IsModified() )
{
- bModified = TRUE;
+ bModified = sal_True;
aGrfName = aConnectED.GetText();
rSet.Put( SvxBrushItem( aGrfName, aFilterName, GPOS_LT,
SID_ATTR_GRAF_GRAPHIC ));
@@ -2537,7 +2537,7 @@ int SwGrfExtPage::DeactivatePage(SfxItemSet *_pSet)
{
if( _pSet )
FillItemSet( *_pSet );
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -2570,19 +2570,19 @@ IMPL_LINK( SwGrfExtPage, BrowseHdl, Button *, EMPTYARG )
//Spiegeln zuruecksetzen, da u. U. eine Bitmap
//gegen eine andere Art von Grafik ausgetauscht worden ist,
//die nicht gespiegelt werden kann.
- aMirrorVertBox.Check(FALSE);
- aMirrorHorzBox.Check(FALSE);
- aAllPagesRB .Enable(FALSE);
- aLeftPagesRB.Enable(FALSE);
- aRightPagesRB.Enable(FALSE);
- aBmpWin.MirrorHorz(FALSE);
- aBmpWin.MirrorVert(FALSE);
+ aMirrorVertBox.Check(sal_False);
+ aMirrorHorzBox.Check(sal_False);
+ aAllPagesRB .Enable(sal_False);
+ aLeftPagesRB.Enable(sal_False);
+ aRightPagesRB.Enable(sal_False);
+ aBmpWin.MirrorHorz(sal_False);
+ aBmpWin.MirrorVert(sal_False);
Graphic aGraphic;
GraphicFilter::LoadGraphic( pGrfDlg->GetPath(), aEmptyStr, aGraphic );
aBmpWin.SetGraphic(aGraphic);
- BOOL bEnable = GRAPHIC_BITMAP == aGraphic.GetType() ||
+ sal_Bool bEnable = GRAPHIC_BITMAP == aGraphic.GetType() ||
GRAPHIC_GDIMETAFILE == aGraphic.GetType();
aMirrorVertBox.Enable(bEnable);
aMirrorHorzBox.Enable(bEnable);
@@ -2598,7 +2598,7 @@ IMPL_LINK( SwGrfExtPage, BrowseHdl, Button *, EMPTYARG )
IMPL_LINK( SwGrfExtPage, MirrorHdl, CheckBox *, EMPTYARG )
{
- BOOL bEnable = aMirrorHorzBox.IsChecked();
+ sal_Bool bEnable = aMirrorHorzBox.IsChecked();
aBmpWin.MirrorHorz( aMirrorVertBox.IsChecked() );
aBmpWin.MirrorVert( bEnable );
@@ -2617,16 +2617,16 @@ IMPL_LINK( SwGrfExtPage, MirrorHdl, CheckBox *, EMPTYARG )
Beschreibung: BeispielWindow
--------------------------------------------------------------------*/
-BmpWindow::BmpWindow( Window* pPar, USHORT nId,
+BmpWindow::BmpWindow( Window* pPar, sal_uInt16 nId,
const Graphic& rGraphic, const BitmapEx& rBmp, const BitmapEx& rBmpHC ) :
Window(pPar, SW_RES(nId)),
aGraphic(rGraphic),
aBmp(rBmp),
aBmpHC(rBmpHC),
- bHorz(FALSE),
- bVert(FALSE),
- bGraphic(FALSE),
- bLeftAlign(FALSE)
+ bHorz(sal_False),
+ bVert(sal_False),
+ bGraphic(sal_False),
+ bLeftAlign(sal_False)
{
SetBackground();
}
@@ -2725,14 +2725,14 @@ SwFrmURLPage::~SwFrmURLPage()
void SwFrmURLPage::Reset( const SfxItemSet &rSet )
{
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == rSet.GetItemState( SID_DOCFRAME, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState( SID_DOCFRAME, sal_True, &pItem))
{
TargetList* pList = new TargetList;
((const SfxFrameItem*)pItem)->GetFrame()->GetTargetList(*pList);
- USHORT nCount = (USHORT)pList->Count();
+ sal_uInt16 nCount = (sal_uInt16)pList->Count();
if( nCount )
{
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < nCount; i++ )
{
aFrameCB.InsertEntry(*pList->GetObject(i));
@@ -2745,7 +2745,7 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet )
delete pList;
}
- if ( SFX_ITEM_SET == rSet.GetItemState( RES_URL, TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( RES_URL, sal_True, &pItem ) )
{
const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem;
aURLED.SetText( INetURLObject::decode( pFmtURL->GetURL(),
@@ -2762,7 +2762,7 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet )
aFrameCB.SaveValue();
}
else
- aClientCB.Enable( FALSE );
+ aClientCB.Enable( sal_False );
aServerCB.SaveValue();
aClientCB.SaveValue();
@@ -2774,9 +2774,9 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet )
Beschreibung:
***************************************************************************/
-BOOL SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
const SwFmtURL* pOldURL = (SwFmtURL*)GetOldItem(rSet, RES_URL);
SwFmtURL* pFmtURL;
if(pOldURL)
@@ -2793,20 +2793,20 @@ BOOL SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
{
pFmtURL->SetURL( sText, aServerCB.IsChecked() );
pFmtURL->SetName( aNameED.GetText() );
- bModified = TRUE;
+ bModified = sal_True;
}
}
if(!aClientCB.IsChecked() && pFmtURL->GetMap() != 0)
{
pFmtURL->SetMap(0);
- bModified = TRUE;
+ bModified = sal_True;
}
if(pFmtURL->GetTargetFrameName() != aFrameCB.GetText())
{
pFmtURL->SetTargetFrameName(aFrameCB.GetText());
- bModified = TRUE;
+ bModified = sal_True;
}
rSet.Put(*pFmtURL);
delete pFmtURL;
@@ -2923,8 +2923,8 @@ SfxTabPage* SwFrmAddPage::Create(Window *pParent, const SfxItemSet &rSet)
void SwFrmAddPage::Reset(const SfxItemSet &rSet )
{
const SfxPoolItem* pItem;
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
if(bHtmlMode)
{
aProtectContentCB .Hide();
@@ -2941,7 +2941,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
aPrintFrameCB.SetPosPixel(aEditInReadonlyCB.GetPosPixel());
}
- if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_ALT_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_ALT_NAME, sal_False, &pItem))
{
aAltNameED.SetText(((const SfxStringItem*)pItem)->GetValue());
aAltNameED.SaveValue();
@@ -2952,7 +2952,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
// Grafik einfuegen - Eigenschaften
// bNew ist nicht gesetzt, deswegen ueber Selektion erkennen
String aTmpName1;
- if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_NAME, sal_False, &pItem))
{
aTmpName1 = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -2978,11 +2978,11 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
}
else
{
- aNameED.Enable( FALSE );
- aAltNameED.Enable(FALSE);
- aNameFT.Enable( FALSE );
- aAltNameFT.Enable(FALSE);
- aNamesFL.Enable(FALSE);
+ aNameED.Enable( sal_False );
+ aAltNameED.Enable(sal_False);
+ aNameFT.Enable( sal_False );
+ aAltNameFT.Enable(sal_False);
+ aNamesFL.Enable(sal_False);
}
if(nDlgType == DLG_FRM_STD && aAltNameFT.IsVisible())
{
@@ -3042,7 +3042,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
::std::vector< String > aThisPageFrames;
::std::vector< String > aNextPageFrames;
::std::vector< String > aRemainFrames;
- pWrtSh->GetConnectableFrmFmts(*pFmt, sNextChain, FALSE,
+ pWrtSh->GetConnectableFrmFmts(*pFmt, sNextChain, sal_False,
aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames );
lcl_InsertVectors(aPrevLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames);
if(sPrevChain.Len())
@@ -3059,7 +3059,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
aRemainFrames.erase(aRemainFrames.begin(), aRemainFrames.end());
- pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, TRUE,
+ pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, sal_True,
aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames );
lcl_InsertVectors(aNextLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames);
if(sNextChain.Len())
@@ -3093,7 +3093,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
if( (!bHtmlMode || (0 != (nHtmlMode&HTMLMODE_SOME_STYLES)))
&& DLG_FRM_GRF != nDlgType && DLG_FRM_OLE != nDlgType &&
SFX_ITEM_UNKNOWN != ( eState = rSet.GetItemState(
- RES_FRAMEDIR, TRUE )) )
+ RES_FRAMEDIR, sal_True )) )
{
aTextFlowFT.Show();
aTextFlowLB.Show();
@@ -3101,7 +3101,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
//vertical text flow is not possible in HTML
if(bHtmlMode)
{
- ULONG nData = FRMDIR_VERT_TOP_RIGHT;
+ sal_uLong nData = FRMDIR_VERT_TOP_RIGHT;
aTextFlowLB.RemoveEntry(aTextFlowLB.GetEntryPos((void*)nData));
}
sal_uInt16 nPos, nVal = ((SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR)).GetValue();
@@ -3122,9 +3122,9 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
--------------------------------------------------*/
-BOOL SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (aNameED.GetText() != aNameED.GetSavedValue())
bRet |= 0 != rSet.Put(SfxStringItem(FN_SET_FRM_NAME, aNameED.GetText()));
if (aAltNameED.GetText() != aAltNameED.GetSavedValue())
@@ -3139,7 +3139,7 @@ BOOL SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
aProt != *pOldItem )
bRet |= 0 != rSet.Put( aProt);
- BOOL bChecked;
+ sal_Bool bChecked;
if ( (bChecked = aEditInReadonlyCB.IsChecked()) != aEditInReadonlyCB.GetSavedValue() )
bRet |= 0 != rSet.Put( SwFmtEditInReadonly( RES_EDIT_IN_READONLY, bChecked));
@@ -3188,7 +3188,7 @@ BOOL SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
--------------------------------------------------*/
-USHORT* SwFrmAddPage::GetRanges()
+sal_uInt16* SwFrmAddPage::GetRanges()
{
return aAddPgRg;
}
@@ -3199,27 +3199,27 @@ USHORT* SwFrmAddPage::GetRanges()
IMPL_LINK(SwFrmAddPage, EditModifyHdl, Edit*, EMPTYARG)
{
- BOOL bEnable = 0 != aNameED.GetText().Len();
+ sal_Bool bEnable = 0 != aNameED.GetText().Len();
aAltNameED.Enable(bEnable);
aAltNameFT.Enable(bEnable);
return 0;
}
//-----------------------------------------------------------------------------
-void SwFrmAddPage::SetFormatUsed(BOOL bFmt)
+void SwFrmAddPage::SetFormatUsed(sal_Bool bFmt)
{
bFormat = bFmt;
if(bFormat)
{
- aNameFT.Show(FALSE);
- aNameED.Show(FALSE);
- aAltNameFT.Show(FALSE);
- aAltNameED.Show(FALSE);
- aPrevFT.Show(FALSE);
- aPrevLB.Show(FALSE);
- aNextFT.Show(FALSE);
- aNextLB.Show(FALSE);
- aNamesFL.Show(FALSE);
+ aNameFT.Show(sal_False);
+ aNameED.Show(sal_False);
+ aAltNameFT.Show(sal_False);
+ aAltNameED.Show(sal_False);
+ aPrevFT.Show(sal_False);
+ aPrevLB.Show(sal_False);
+ aNextFT.Show(sal_False);
+ aNextLB.Show(sal_False);
+ aNamesFL.Show(sal_False);
sal_Int32 nDiff = aExtFL.GetPosPixel().Y() - aNamesFL.GetPosPixel().Y();
Window* aWindows[] =
@@ -3253,9 +3253,9 @@ IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox)
SwFrmFmt* pFmt = pWrtSh->GetFlyFrmFmt();
if (pFmt)
{
- BOOL bNextBox = &aNextLB == pBox;
+ sal_Bool bNextBox = &aNextLB == pBox;
ListBox& rChangeLB = bNextBox ? aPrevLB : aNextLB;
- for(USHORT nEntry = rChangeLB.GetEntryCount(); nEntry > 1; nEntry--)
+ for(sal_uInt16 nEntry = rChangeLB.GetEntryCount(); nEntry > 1; nEntry--)
rChangeLB.RemoveEntry(nEntry - 1);
//determine chainable frames
::std::vector< String > aPrevPageFrames;
diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx
index 2add324b61ee..8a7ddfd6b5f9 100644
--- a/sw/source/ui/frmdlg/uiborder.cxx
+++ b/sw/source/ui/frmdlg/uiborder.cxx
@@ -47,7 +47,7 @@
-SwBorderDlg::SwBorderDlg(Window* pParent, SfxItemSet& rSet, USHORT nType) :
+SwBorderDlg::SwBorderDlg(Window* pParent, SfxItemSet& rSet, sal_uInt16 nType) :
SfxSingleTabDialog(pParent, rSet, 0)
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index b313ebd530eb..fc988a3ab0e6 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -65,7 +65,7 @@ using namespace ::com::sun::star;
Beschreibung:
--------------------------------------------------------------------*/
-static USHORT __FAR_DATA aWrapPageRg[] = {
+static sal_uInt16 __FAR_DATA aWrapPageRg[] = {
RES_LR_SPACE, RES_UL_SPACE,
RES_PROTECT, RES_SURROUND,
RES_PRINT, RES_PRINT,
@@ -79,14 +79,14 @@ static USHORT __FAR_DATA aWrapPageRg[] = {
-SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode) :
+SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode) :
SfxSingleTabDialog(pParent, rSet, 0),
pWrtShell(pSh)
{
// TabPage erzeugen
SwWrapTabPage* pNewPage = (SwWrapTabPage*) SwWrapTabPage::Create(this, rSet);
- pNewPage->SetFormatUsed(FALSE, bDrawMode);
+ pNewPage->SetFormatUsed(sal_False, bDrawMode);
pNewPage->SetShell(pWrtShell);
SetTabPage(pNewPage);
@@ -142,10 +142,10 @@ SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet) :
pWrtSh(0),
- bFormat(FALSE),
- bNew(TRUE),
- bHtmlMode(FALSE),
- bContourImage(FALSE)
+ bFormat(sal_False),
+ bNew(sal_True),
+ bHtmlMode(sal_False),
+ bContourImage(sal_False)
{
FreeResource();
@@ -219,14 +219,14 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
}
else
{
- BOOL bShowCB = bFormat;
+ sal_Bool bShowCB = bFormat;
if( !bFormat )
{
int nSelType = pWrtSh->GetSelectionType();
if( ( nSelType & nsSelectionType::SEL_GRF ) ||
( nSelType & nsSelectionType::SEL_OLE && GRAPHIC_NONE !=
pWrtSh->GetIMapGraphic().GetType() ))
- bShowCB = TRUE;
+ bShowCB = sal_True;
}
if( bShowCB )
{
@@ -236,7 +236,7 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
}
nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
FieldUnit aMetric = ::GetDfltMetric(bHtmlMode);
SetMetric( aLeftMarginED , aMetric );
@@ -257,10 +257,10 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
}
else
{
- aWrapAnchorOnlyCB.Enable( FALSE );
+ aWrapAnchorOnlyCB.Enable( sal_False );
}
- BOOL bContour = rSurround.IsContour();
+ sal_Bool bContour = rSurround.IsContour();
aWrapOutlineCB.Check( bContour );
aWrapOutsideCB.Check( rSurround.IsOutside() );
aWrapThroughRB.Enable(!aWrapOutlineCB.IsChecked());
@@ -340,9 +340,9 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
-BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
const SfxPoolItem* pOldItem;
const SwFmtSurround& rOldSur = (const SwFmtSurround&)GetItemSet().Get(RES_SURROUND);
@@ -354,7 +354,7 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
{
const SvxOpaqueItem& rOpaque = (const SvxOpaqueItem&)GetItemSet().Get(RES_OPAQUE);
aOp = rOpaque;
- aOp.SetValue(TRUE);
+ aOp.SetValue(sal_True);
}
if (aNoWrapRB.IsChecked())
@@ -369,13 +369,13 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
{
aSur.SetSurround(SURROUND_THROUGHT);
if (aWrapTransparentCB.IsChecked() && !bDrawMode)
- aOp.SetValue(FALSE);
+ aOp.SetValue(sal_False);
}
else if (aIdealWrapRB.IsChecked())
aSur.SetSurround(SURROUND_IDEAL);
aSur.SetAnchorOnly( aWrapAnchorOnlyCB.IsChecked() );
- BOOL bContour = aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled();
+ sal_Bool bContour = aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled();
aSur.SetContour( bContour );
if ( bContour )
@@ -385,7 +385,7 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aSur != *pOldItem )
{
rSet.Put(aSur);
- bModified = TRUE;
+ bModified = sal_True;
}
if (!bDrawMode)
@@ -394,16 +394,16 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aOp != *pOldItem )
{
rSet.Put(aOp);
- bModified = TRUE;
+ bModified = sal_True;
}
}
- BOOL bTopMod = aTopMarginED.IsValueModified();
- BOOL bBottomMod = aBottomMarginED.IsValueModified();
+ sal_Bool bTopMod = aTopMarginED.IsValueModified();
+ sal_Bool bBottomMod = aBottomMarginED.IsValueModified();
SvxULSpaceItem aUL( RES_UL_SPACE );
- aUL.SetUpper((USHORT)aTopMarginED.Denormalize(aTopMarginED.GetValue(FUNIT_TWIP)));
- aUL.SetLower((USHORT)aBottomMarginED.Denormalize(aBottomMarginED.GetValue(FUNIT_TWIP)));
+ aUL.SetUpper((sal_uInt16)aTopMarginED.Denormalize(aTopMarginED.GetValue(FUNIT_TWIP)));
+ aUL.SetLower((sal_uInt16)aBottomMarginED.Denormalize(aBottomMarginED.GetValue(FUNIT_TWIP)));
if ( bTopMod || bBottomMod )
{
@@ -411,16 +411,16 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aUL != *pOldItem )
{
rSet.Put( aUL, RES_UL_SPACE );
- bModified = TRUE;
+ bModified = sal_True;
}
}
- BOOL bLeftMod = aLeftMarginED.IsValueModified();
- BOOL bRightMod = aRightMarginED.IsValueModified();
+ sal_Bool bLeftMod = aLeftMarginED.IsValueModified();
+ sal_Bool bRightMod = aRightMarginED.IsValueModified();
SvxLRSpaceItem aLR( RES_LR_SPACE );
- aLR.SetLeft((USHORT)aLeftMarginED.Denormalize(aLeftMarginED.GetValue(FUNIT_TWIP)));
- aLR.SetRight((USHORT)aRightMarginED.Denormalize(aRightMarginED.GetValue(FUNIT_TWIP)));
+ aLR.SetLeft((sal_uInt16)aLeftMarginED.Denormalize(aLeftMarginED.GetValue(FUNIT_TWIP)));
+ aLR.SetRight((sal_uInt16)aRightMarginED.Denormalize(aRightMarginED.GetValue(FUNIT_TWIP)));
if ( bLeftMod || bRightMod )
{
@@ -428,13 +428,13 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aLR != *pOldItem )
{
rSet.Put(aLR, RES_LR_SPACE);
- bModified = TRUE;
+ bModified = sal_True;
}
}
if ( bDrawMode )
{
- BOOL bChecked = aWrapTransparentCB.IsChecked() & aWrapTransparentCB.IsEnabled();
+ sal_Bool bChecked = aWrapTransparentCB.IsChecked() & aWrapTransparentCB.IsEnabled();
if (aWrapTransparentCB.GetSavedValue() != bChecked)
bModified |= 0 != rSet.Put(SfxInt16Item(FN_DRAW_WRAP_DLG, bChecked ? 0 : 1));
}
@@ -453,7 +453,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
// Anchor
const SwFmtAnchor &rAnch = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR);
nAnchorId = rAnch.GetAnchorId();
- BOOL bEnable = (nAnchorId != FLY_AS_CHAR);
+ sal_Bool bEnable = (nAnchorId != FLY_AS_CHAR);
if (!bDrawMode)
{
@@ -468,10 +468,10 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
// Rand
const SvxULSpaceItem& rUL = (const SvxULSpaceItem&)rSet.Get(RES_UL_SPACE);
const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&)rSet.Get(RES_LR_SPACE);
- nOldLeftMargin = static_cast< USHORT >(rLR.GetLeft());
- nOldRightMargin = static_cast< USHORT >(rLR.GetRight());
- nOldUpperMargin = static_cast< USHORT >(rUL.GetUpper());
- nOldLowerMargin = static_cast< USHORT >(rUL.GetLower());
+ nOldLeftMargin = static_cast< sal_uInt16 >(rLR.GetLeft());
+ nOldRightMargin = static_cast< sal_uInt16 >(rLR.GetRight());
+ nOldUpperMargin = static_cast< sal_uInt16 >(rUL.GetUpper());
+ nOldLowerMargin = static_cast< sal_uInt16 >(rUL.GetLower());
// Position
const SwFmtHoriOrient& rHori = (const SwFmtHoriOrient&)rSet.Get(RES_HORI_ORIENT);
@@ -562,7 +562,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aWrapTransparentCB.Enable( bEnable && !bHtmlMode && nSur == SURROUND_THROUGHT );
if(bHtmlMode)
{
- BOOL bSomeAbsPos = 0 != (nHtmlMode & HTMLMODE_SOME_ABS_POS);
+ sal_Bool bSomeAbsPos = 0 != (nHtmlMode & HTMLMODE_SOME_ABS_POS);
const SwFmtHoriOrient& rHori = (const SwFmtHoriOrient&)rSet.Get(RES_HORI_ORIENT);
sal_Int16 eHOrient = rHori.GetHoriOrient();
sal_Int16 eHRelOrient = rHori.GetRelationOrient();
@@ -572,12 +572,12 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
(eHOrient == text::HoriOrientation::RIGHT || eHOrient == text::HoriOrientation::LEFT);
aWrapAnchorOnlyCB.Enable( bAllHtmlModes && nSur != SURROUND_NONE );
aWrapOutsideCB.Hide();
- aIdealWrapRB.Enable( FALSE );
+ aIdealWrapRB.Enable( sal_False );
- aWrapTransparentCB.Enable( FALSE );
+ aWrapTransparentCB.Enable( sal_False );
aNoWrapRB.Enable( FLY_AT_PARA == nAnchorId );
- aWrapParallelRB.Enable( FALSE );
+ aWrapParallelRB.Enable( sal_False );
aWrapLeftRB .Enable
( (FLY_AT_PARA == nAnchorId)
|| ( (FLY_AT_CHAR == nAnchorId)
@@ -599,7 +599,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
if(aNoWrapRB.IsChecked() && !aNoWrapRB.IsEnabled())
{
if(aWrapThroughRB.IsEnabled())
- aWrapThroughRB.Check(TRUE);
+ aWrapThroughRB.Check(sal_True);
else if(aWrapLeftRB.IsEnabled())
aWrapLeftRB.Check();
else if(aWrapRightRB.IsEnabled())
@@ -649,7 +649,7 @@ int SwWrapTabPage::DeactivatePage(SfxItemSet* _pSet)
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -703,7 +703,7 @@ IMPL_LINK( SwWrapTabPage, RangeModifyHdl, MetricField *, pEdit )
IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn )
{
- BOOL bWrapThrough = (pBtn == &aWrapThroughRB);
+ sal_Bool bWrapThrough = (pBtn == &aWrapThroughRB);
aWrapTransparentCB.Enable( bWrapThrough && !bHtmlMode );
bWrapThrough |= ( nAnchorId == FLY_AS_CHAR );
aWrapOutlineCB.Enable( !bWrapThrough && pBtn != &aNoWrapRB);
@@ -724,7 +724,7 @@ IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn )
IMPL_LINK( SwWrapTabPage, ContourHdl, CheckBox *, EMPTYARG )
{
- BOOL bEnable = !(aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled());
+ sal_Bool bEnable = !(aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled());
aWrapOutsideCB.Enable(!bEnable);
@@ -741,7 +741,7 @@ IMPL_LINK( SwWrapTabPage, ContourHdl, CheckBox *, EMPTYARG )
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-USHORT* SwWrapTabPage::GetRanges()
+sal_uInt16* SwWrapTabPage::GetRanges()
{
return aWrapPageRg;
}
@@ -765,7 +765,7 @@ void SwWrapTabPage::ApplyImageList()
aWrapILH : aWrapIL;
aWrapThroughRB.SetModeRadioImage(rImgLst.GetImage(IMG_THROUGH));
- BOOL bWrapOutline = !aWrapOutlineCB.IsChecked();
+ sal_Bool bWrapOutline = !aWrapOutlineCB.IsChecked();
if(bWrapOutline)
{
aNoWrapRB.SetModeRadioImage(rImgLst.GetImage(IMG_NONE));
diff --git a/sw/source/ui/inc/DropDownFieldDialog.hxx b/sw/source/ui/inc/DropDownFieldDialog.hxx
index 26b01ae4accb..9800783c2e48 100644
--- a/sw/source/ui/inc/DropDownFieldDialog.hxx
+++ b/sw/source/ui/inc/DropDownFieldDialog.hxx
@@ -62,7 +62,7 @@ class DropDownFieldDialog : public SvxStandardDialog
virtual void Apply();
public:
DropDownFieldDialog( Window *pParent, SwWrtShell &rSh,
- SwField* pField, BOOL bNextButton = FALSE );
+ SwField* pField, sal_Bool bNextButton = sal_False );
~DropDownFieldDialog();
};
} //namespace sw
diff --git a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
index dd3e7e2dce9b..b45dd1a6cd2d 100644
--- a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
+++ b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
@@ -61,7 +61,7 @@ protected:
public:
SwSpellDialogChildWindow (
Window*pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo);
~SwSpellDialogChildWindow();
diff --git a/sw/source/ui/inc/abstract.hxx b/sw/source/ui/inc/abstract.hxx
index 6700212aa0c3..4dd8f3a56b65 100644
--- a/sw/source/ui/inc/abstract.hxx
+++ b/sw/source/ui/inc/abstract.hxx
@@ -63,8 +63,8 @@ public:
SwInsertAbstractDlg( Window* pParent );
~SwInsertAbstractDlg();
- BYTE GetLevel() const;
- BYTE GetPara() const;
+ sal_uInt8 GetLevel() const;
+ sal_uInt8 GetPara() const;
};
#endif
diff --git a/sw/source/ui/inc/annotsh.hxx b/sw/source/ui/inc/annotsh.hxx
index 979e1374e004..120321a5ffee 100755
--- a/sw/source/ui/inc/annotsh.hxx
+++ b/sw/source/ui/inc/annotsh.hxx
@@ -67,7 +67,7 @@ public:
void InsertSymbol(SfxRequest& rReq);
- void ExecSearch(SfxRequest&, BOOL bNoMessage = FALSE);
+ void ExecSearch(SfxRequest&, sal_Bool bNoMessage = sal_False);
void StateSearch(SfxItemSet &);
diff --git a/sw/source/ui/inc/ascfldlg.hxx b/sw/source/ui/inc/ascfldlg.hxx
index 18eb19228fee..9fc1b98d044a 100644
--- a/sw/source/ui/inc/ascfldlg.hxx
+++ b/sw/source/ui/inc/ascfldlg.hxx
@@ -55,7 +55,7 @@ class SwAsciiFilterDlg : public SfxModalDialog
CancelButton aCancelPB;
HelpButton aHelpPB;
String sSystemCharSet;
- BOOL bSaveLineStatus;
+ sal_Bool bSaveLineStatus;
DECL_LINK( CharSetSelHdl, SvxTextEncodingBox* );
DECL_LINK( LineEndHdl, RadioButton* );
diff --git a/sw/source/ui/inc/basesh.hxx b/sw/source/ui/inc/basesh.hxx
index 8c8b6eb98b7a..03e183b81116 100644
--- a/sw/source/ui/inc/basesh.hxx
+++ b/sw/source/ui/inc/basesh.hxx
@@ -69,7 +69,7 @@ protected:
inline SwView& GetView() { return rView; }
inline void SetGetStateSet( SfxItemSet* p ) { pGetStateSet = p; }
- inline BOOL AddGrfUpdateSlot( USHORT nSlot ){ return aGrfUpdateSlots.Insert( nSlot ); }
+ inline sal_Bool AddGrfUpdateSlot( sal_uInt16 nSlot ){ return aGrfUpdateSlots.Insert( nSlot ); }
DECL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl* );
@@ -108,7 +108,7 @@ public:
void GetBckColState(SfxItemSet &rSet);
void ExecBckCol(SfxRequest& rReq);
- void SetWrapMode( USHORT nSlot );
+ void SetWrapMode( sal_uInt16 nSlot );
void StateDisableItems(SfxItemSet &);
diff --git a/sw/source/ui/inc/bmpwin.hxx b/sw/source/ui/inc/bmpwin.hxx
index e09ae625534d..aa7c6287de8d 100644
--- a/sw/source/ui/inc/bmpwin.hxx
+++ b/sw/source/ui/inc/bmpwin.hxx
@@ -47,22 +47,22 @@ private:
BitmapEx aBmp;
BitmapEx aBmpHC;
- BOOL bHorz : 1;
- BOOL bVert : 1;
- BOOL bGraphic : 1;
- BOOL bLeftAlign : 1;
+ sal_Bool bHorz : 1;
+ sal_Bool bVert : 1;
+ sal_Bool bGraphic : 1;
+ sal_Bool bLeftAlign : 1;
void Paint(const Rectangle& rRect);
public:
- BmpWindow(Window* pPar, USHORT nId,
+ BmpWindow(Window* pPar, sal_uInt16 nId,
const Graphic& rGraphic, const BitmapEx& rBmp, const BitmapEx& rBmpHC);
BmpWindow(Window* pParent, const ResId rResId) :
Window(pParent, rResId),
- bHorz(FALSE), bVert(FALSE),bGraphic(FALSE), bLeftAlign(TRUE) {}
+ bHorz(sal_False), bVert(sal_False),bGraphic(sal_False), bLeftAlign(sal_True) {}
~BmpWindow();
- void MirrorVert(BOOL bMirror) { bVert = bMirror; Invalidate(); }
- void MirrorHorz(BOOL bMirror) { bHorz = bMirror; Invalidate(); }
+ void MirrorVert(sal_Bool bMirror) { bVert = bMirror; Invalidate(); }
+ void MirrorHorz(sal_Bool bMirror) { bHorz = bMirror; Invalidate(); }
void SetGraphic(const Graphic& rGrf);
};
diff --git a/sw/source/ui/inc/bookctrl.hxx b/sw/source/ui/inc/bookctrl.hxx
index a41fb5262e64..8955276579fb 100644
--- a/sw/source/ui/inc/bookctrl.hxx
+++ b/sw/source/ui/inc/bookctrl.hxx
@@ -39,13 +39,13 @@ class SwBookmarkControl : public SfxStatusBarControl
virtual void Command( const CommandEvent& rCEvt );
public:
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
virtual void Paint( const UserDrawEvent& rEvt );
SFX_DECL_STATUSBAR_CONTROL();
- SwBookmarkControl( USHORT nSlotId, USHORT nId, StatusBar& rStb );
+ SwBookmarkControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
~SwBookmarkControl();
private:
diff --git a/sw/source/ui/inc/bookmark.hxx b/sw/source/ui/inc/bookmark.hxx
index 29c3173787a9..5034c410725a 100644
--- a/sw/source/ui/inc/bookmark.hxx
+++ b/sw/source/ui/inc/bookmark.hxx
@@ -45,16 +45,16 @@ class SfxRequest;
class BookmarkCombo : public SwComboBox
{
- USHORT GetFirstSelEntryPos() const;
- USHORT GetNextSelEntryPos(USHORT nPos) const;
- USHORT GetSelEntryPos(USHORT nPos) const;
+ sal_uInt16 GetFirstSelEntryPos() const;
+ sal_uInt16 GetNextSelEntryPos(sal_uInt16 nPos) const;
+ sal_uInt16 GetSelEntryPos(sal_uInt16 nPos) const;
virtual long PreNotify(NotifyEvent& rNEvt);
public:
BookmarkCombo( Window* pWin, const ResId& rResId );
- USHORT GetSelectEntryCount() const;
- USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const;
+ sal_uInt16 GetSelectEntryCount() const;
+ sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
static const String aForbiddenChars;
};
diff --git a/sw/source/ui/inc/break.hxx b/sw/source/ui/inc/break.hxx
index 447afd8ca567..6e90131912df 100644
--- a/sw/source/ui/inc/break.hxx
+++ b/sw/source/ui/inc/break.hxx
@@ -64,10 +64,10 @@ class SwBreakDlg: public SvxStandardDialog
HelpButton aHelpBtn;
String aTemplate;
- USHORT nKind;
- USHORT nPgNum;
+ sal_uInt16 nKind;
+ sal_uInt16 nPgNum;
- BOOL bHtmlMode;
+ sal_Bool bHtmlMode;
DECL_LINK( ClickHdl, void * );
DECL_LINK( PageNumHdl, CheckBox * );
@@ -84,8 +84,8 @@ public:
~SwBreakDlg();
String GetTemplateName() { return aTemplate; }
- USHORT GetKind() { return nKind; }
- USHORT GetPageNumber() { return nPgNum; }
+ sal_uInt16 GetKind() { return nKind; }
+ sal_uInt16 GetPageNumber() { return nPgNum; }
};
#endif
diff --git a/sw/source/ui/inc/caption.hxx b/sw/source/ui/inc/caption.hxx
index c56f70364596..17cb80f3b518 100644
--- a/sw/source/ui/inc/caption.hxx
+++ b/sw/source/ui/inc/caption.hxx
@@ -42,29 +42,29 @@
class SW_DLLPUBLIC InsCaptionOpt
{
private:
- BOOL bUseCaption;
+ sal_Bool bUseCaption;
SwCapObjType eObjType;
SvGlobalName aOleId;
String sCategory;
- USHORT nNumType;
+ sal_uInt16 nNumType;
::rtl::OUString sNumberSeparator;
String sCaption;
- USHORT nPos;
- USHORT nLevel;
+ sal_uInt16 nPos;
+ sal_uInt16 nLevel;
// sal_Unicode cSeparator;
String sSeparator;
String sCharacterStyle;
- BOOL bIgnoreSeqOpts; // wird nicht gespeichert
- BOOL bCopyAttributes; // -""-
+ sal_Bool bIgnoreSeqOpts; // wird nicht gespeichert
+ sal_Bool bCopyAttributes; // -""-
public:
InsCaptionOpt(const SwCapObjType eType = FRAME_CAP, const SvGlobalName* pOleId = 0);
InsCaptionOpt(const InsCaptionOpt&);
~InsCaptionOpt();
- inline BOOL& UseCaption() { return bUseCaption; }
- inline BOOL UseCaption() const { return bUseCaption; }
+ inline sal_Bool& UseCaption() { return bUseCaption; }
+ inline sal_Bool UseCaption() const { return bUseCaption; }
inline SwCapObjType GetObjType() const { return eObjType; }
inline void SetObjType(const SwCapObjType eType) { eObjType = eType; }
@@ -75,8 +75,8 @@ public:
inline const String& GetCategory() const { return sCategory; }
inline void SetCategory(const String& rCat) { sCategory = rCat; }
- inline USHORT GetNumType() const { return nNumType; }
- inline void SetNumType(const USHORT nNT) { nNumType = nNT; }
+ inline sal_uInt16 GetNumType() const { return nNumType; }
+ inline void SetNumType(const sal_uInt16 nNT) { nNumType = nNT; }
const ::rtl::OUString& GetNumSeparator() const { return sNumberSeparator; }
void SetNumSeparator(const ::rtl::OUString& rSet) {sNumberSeparator = rSet;}
@@ -84,11 +84,11 @@ public:
inline const String& GetCaption() const { return sCaption; }
inline void SetCaption(const String& rCap) { sCaption = rCap; }
- inline USHORT GetPos() const { return nPos; }
- inline void SetPos(const USHORT nP) { nPos = nP; }
+ inline sal_uInt16 GetPos() const { return nPos; }
+ inline void SetPos(const sal_uInt16 nP) { nPos = nP; }
- inline USHORT GetLevel() const { return nLevel; }
- inline void SetLevel(const USHORT nLvl) { nLevel = nLvl; }
+ inline sal_uInt16 GetLevel() const { return nLevel; }
+ inline void SetLevel(const sal_uInt16 nLvl) { nLevel = nLvl; }
// inline sal_Unicode GetSeparator() const { return cSeparator; }
// inline void SetSeparator(const sal_Unicode cSep){ cSeparator = cSep; }
@@ -99,15 +99,15 @@ public:
void SetCharacterStyle(const String& rStyle)
{ sCharacterStyle = rStyle; }
- inline BOOL& IgnoreSeqOpts() { return bIgnoreSeqOpts; }
- inline BOOL IgnoreSeqOpts() const { return bIgnoreSeqOpts; }
+ inline sal_Bool& IgnoreSeqOpts() { return bIgnoreSeqOpts; }
+ inline sal_Bool IgnoreSeqOpts() const { return bIgnoreSeqOpts; }
- inline BOOL& CopyAttributes() { return bCopyAttributes; }
- inline BOOL CopyAttributes() const { return bCopyAttributes; }
+ inline sal_Bool& CopyAttributes() { return bCopyAttributes; }
+ inline sal_Bool CopyAttributes() const { return bCopyAttributes; }
- BOOL operator==( const InsCaptionOpt& rOpt ) const;
+ sal_Bool operator==( const InsCaptionOpt& rOpt ) const;
InsCaptionOpt& operator= ( const InsCaptionOpt& rOpt );
- inline BOOL operator< ( const InsCaptionOpt & rObj ) const
+ inline sal_Bool operator< ( const InsCaptionOpt & rObj ) const
{ return aOleId < rObj.aOleId; }
// friend SvStream& operator>>( SvStream& rIStream, InsCaptionOpt& rCapOpt );
// friend SvStream& operator<<( SvStream& rOStream, const InsCaptionOpt& rCapOpt );
diff --git a/sw/source/ui/inc/cfgdesc.hxx b/sw/source/ui/inc/cfgdesc.hxx
index 81732b05c208..6a45826c9019 100644
--- a/sw/source/ui/inc/cfgdesc.hxx
+++ b/sw/source/ui/inc/cfgdesc.hxx
@@ -34,25 +34,25 @@ class SwCfgDesc
protected:
String aFuncText;
String aLibName;
- USHORT nEvent;
+ sal_uInt16 nEvent;
- SwCfgDesc(const String &rFuncName, USHORT nId);
+ SwCfgDesc(const String &rFuncName, sal_uInt16 nId);
SwCfgDesc(const String &rLib,const String &rMacro);
~SwCfgDesc();
public:
- void SetEvent(USHORT nE); // inline
+ void SetEvent(sal_uInt16 nE); // inline
void SetFuncText(const String &rStr); // inline
void SetMacro(const String &rLib, const String &rMac);
- BOOL IsMacro() const;
- USHORT GetEvent() const; // inline
+ sal_Bool IsMacro() const;
+ sal_uInt16 GetEvent() const; // inline
String GetFuncText() const; // inline
String GetMacro() const; // inline
String GetLib() const; // inline
};
// INLINE METHODE --------------------------------------------------------
-inline void SwCfgDesc::SetEvent(USHORT nE) {
+inline void SwCfgDesc::SetEvent(sal_uInt16 nE) {
nEvent = nE;
}
@@ -60,7 +60,7 @@ inline void SwCfgDesc::SetFuncText(const String &rStr) {
aFuncText = rStr;
}
-inline USHORT SwCfgDesc::GetEvent() const { return nEvent; }
+inline sal_uInt16 SwCfgDesc::GetEvent() const { return nEvent; }
inline String SwCfgDesc::GetFuncText() const { return aFuncText; }
inline String SwCfgDesc::GetMacro() const { return aFuncText; }
inline String SwCfgDesc::GetLib() const { return aLibName; }
diff --git a/sw/source/ui/inc/cfgitems.hxx b/sw/source/ui/inc/cfgitems.hxx
index d80df8672cfd..2b98f70cbdca 100644
--- a/sw/source/ui/inc/cfgitems.hxx
+++ b/sw/source/ui/inc/cfgitems.hxx
@@ -60,26 +60,26 @@ class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem
friend class SwShdwCrsrOptionsTabPage;
friend class SwModule;
- BOOL bParagraphEnd :1;
- BOOL bTab :1;
- BOOL bSpace :1;
- BOOL bNonbreakingSpace :1;
- BOOL bSoftHyphen :1;
- BOOL bCharHiddenText :1;
- BOOL bFldHiddenText :1;
- BOOL bManualBreak :1;
- BOOL bShowHiddenPara :1;
+ sal_Bool bParagraphEnd :1;
+ sal_Bool bTab :1;
+ sal_Bool bSpace :1;
+ sal_Bool bNonbreakingSpace :1;
+ sal_Bool bSoftHyphen :1;
+ sal_Bool bCharHiddenText :1;
+ sal_Bool bFldHiddenText :1;
+ sal_Bool bManualBreak :1;
+ sal_Bool bShowHiddenPara :1;
Color aIndexBackgrndCol;
public:
TYPEINFO();
- SwDocDisplayItem( USHORT nWhich = FN_PARAM_DOCDISP );
+ SwDocDisplayItem( sal_uInt16 nWhich = FN_PARAM_DOCDISP );
SwDocDisplayItem(
const SwDocDisplayItem& rSwDocDisplayItem );
SwDocDisplayItem( const SwViewOption& rVOpt,
- USHORT nWhich );
+ sal_uInt16 nWhich );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -93,31 +93,31 @@ Item fuer Einstellungsdialog, Elementeseite
class SW_DLLPUBLIC SwElemItem : public SfxPoolItem
{
//view
- BOOL bHorzScrollbar :1;
- BOOL bVertScrollbar :1;
- BOOL bAnyRuler : 1;
- BOOL bHorzRuler :1;
- BOOL bVertRuler :1;
- BOOL bVertRulerRight:1;
- BOOL bSmoothScroll :1;
+ sal_Bool bHorzScrollbar :1;
+ sal_Bool bVertScrollbar :1;
+ sal_Bool bAnyRuler : 1;
+ sal_Bool bHorzRuler :1;
+ sal_Bool bVertRuler :1;
+ sal_Bool bVertRulerRight:1;
+ sal_Bool bSmoothScroll :1;
//visual aids
- BOOL bCrosshair :1;
- BOOL bHandles :1;
- BOOL bBigHandles :1;
+ sal_Bool bCrosshair :1;
+ sal_Bool bHandles :1;
+ sal_Bool bBigHandles :1;
//display
- BOOL bTable :1;
- BOOL bGraphic :1;
- BOOL bDrawing :1;
- BOOL bFieldName :1;
- BOOL bNotes :1;
+ sal_Bool bTable :1;
+ sal_Bool bGraphic :1;
+ sal_Bool bDrawing :1;
+ sal_Bool bFieldName :1;
+ sal_Bool bNotes :1;
friend class SwContentOptPage;
public:
TYPEINFO();
- SwElemItem( USHORT nWhich = FN_PARAM_ELEM );
+ SwElemItem( sal_uInt16 nWhich = FN_PARAM_ELEM );
SwElemItem(const SwElemItem& rElemItem);
- SwElemItem(const SwViewOption& rVOpt, USHORT nWhich);
+ SwElemItem(const SwViewOption& rVOpt, sal_uInt16 nWhich);
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -139,8 +139,8 @@ class SW_DLLPUBLIC SwAddPrinterItem : public SfxPoolItem, public SwPrintData
public:
TYPEINFO();
- SwAddPrinterItem( USHORT nWhich = FN_PARAM_ADDPRINTER );
- SwAddPrinterItem( USHORT nWhich, const SwPrintData& rPrtData );
+ SwAddPrinterItem( sal_uInt16 nWhich = FN_PARAM_ADDPRINTER );
+ SwAddPrinterItem( sal_uInt16 nWhich, const SwPrintData& rPrtData );
SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem);
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -151,27 +151,27 @@ public:
void SetFax( const String& rFax) { sFaxName = rFax; }
- BOOL IsPrintProspect() const { return bPrintProspect; }
- BOOL IsPrintProspectRTL() const { return bPrintProspectRTL; }
- void SetPrintProspect(BOOL bFlag ){ bPrintProspect = bFlag; }
- void SetPrintProspectRTL(BOOL bFlag ){ bPrintProspectRTL = bFlag; }
- BOOL IsPrintGraphic () const { return bPrintGraphic; }
- BOOL IsPrintTable () const { return bPrintTable; }
- BOOL IsPrintDraw () const { return bPrintDraw; }
- BOOL IsPrintControl () const { return bPrintControl; }
- BOOL IsPrintLeftPage () const { return bPrintLeftPages; }
- BOOL IsPrintRightPage() const { return bPrintRightPages; }
- BOOL IsPrintReverse () const { return bPrintReverse; }
- BOOL IsPaperFromSetup() const { return bPaperFromSetup; }
- BOOL IsPrintEmptyPages() const { return bPrintEmptyPages; }
- BOOL IsPrintPageBackground() const { return bPrintPageBackground; }
- BOOL IsPrintBlackFont() const { return bPrintBlackFont; }
+ sal_Bool IsPrintProspect() const { return bPrintProspect; }
+ sal_Bool IsPrintProspectRTL() const { return bPrintProspectRTL; }
+ void SetPrintProspect(sal_Bool bFlag ){ bPrintProspect = bFlag; }
+ void SetPrintProspectRTL(sal_Bool bFlag ){ bPrintProspectRTL = bFlag; }
+ sal_Bool IsPrintGraphic () const { return bPrintGraphic; }
+ sal_Bool IsPrintTable () const { return bPrintTable; }
+ sal_Bool IsPrintDraw () const { return bPrintDraw; }
+ sal_Bool IsPrintControl () const { return bPrintControl; }
+ sal_Bool IsPrintLeftPage () const { return bPrintLeftPages; }
+ sal_Bool IsPrintRightPage() const { return bPrintRightPages; }
+ sal_Bool IsPrintReverse () const { return bPrintReverse; }
+ sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; }
+ sal_Bool IsPrintEmptyPages() const { return bPrintEmptyPages; }
+ sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; }
+ sal_Bool IsPrintBlackFont() const { return bPrintBlackFont; }
//#i81434# - printing of hidden text
sal_Bool IsPrintHiddenText() const { return bPrintHiddenText; }
sal_Bool IsPrintTextPlaceholder() const { return bPrintTextPlaceholder; }
- BOOL IsPrintSingleJobs() const { return bPrintSingleJobs; }
- ULONG GetPrintPostIts () const { return nPrintPostIts; }
+ sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs; }
+ sal_uLong GetPrintPostIts () const { return nPrintPostIts; }
};
@@ -182,13 +182,13 @@ Item fuer Einstellungsdialog, ShadowCursorSeite
class SW_DLLPUBLIC SwShadowCursorItem : public SfxPoolItem
{
- BYTE eMode;
- BOOL bOn;
+ sal_uInt8 eMode;
+ sal_Bool bOn;
public:
TYPEINFO();
- SwShadowCursorItem( USHORT nWhich = FN_PARAM_SHADOWCURSOR );
+ SwShadowCursorItem( sal_uInt16 nWhich = FN_PARAM_SHADOWCURSOR );
SwShadowCursorItem( const SwShadowCursorItem& rElemItem );
- SwShadowCursorItem( const SwViewOption& rVOpt, USHORT nWhich );
+ SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 nWhich );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -197,11 +197,11 @@ public:
void FillViewOptions( SwViewOption& rVOpt) const;
- BYTE GetMode() const { return eMode; }
- BOOL IsOn() const { return bOn; }
+ sal_uInt8 GetMode() const { return eMode; }
+ sal_Bool IsOn() const { return bOn; }
- void SetMode( BYTE eM ) { eMode = eM; }
- void SetOn( BOOL bFlag ) { bOn = bFlag; }
+ void SetMode( sal_uInt8 eM ) { eMode = eM; }
+ void SetOn( sal_Bool bFlag ) { bOn = bFlag; }
};
#ifdef DBG_UTIL
@@ -215,19 +215,19 @@ class SW_DLLPUBLIC SwTestItem : public SfxPoolItem
friend class SwTestTabPage;
friend class SwDocEditDialog;
- BOOL bTest1:1;
- BOOL bTest2:1;
- BOOL bTest3:1;
- BOOL bTest4:1;
- BOOL bTest5:1;
- BOOL bTest6:1;
- BOOL bTest7:1;
- BOOL bTest8:1;
- BOOL bTest9:1;
- BOOL bTest10:1;
+ sal_Bool bTest1:1;
+ sal_Bool bTest2:1;
+ sal_Bool bTest3:1;
+ sal_Bool bTest4:1;
+ sal_Bool bTest5:1;
+ sal_Bool bTest6:1;
+ sal_Bool bTest7:1;
+ sal_Bool bTest8:1;
+ sal_Bool bTest9:1;
+ sal_Bool bTest10:1;
public:
- SwTestItem( USHORT _nWhich):
+ SwTestItem( sal_uInt16 _nWhich):
SfxPoolItem(_nWhich){};
SwTestItem( const SwTestItem& pTestItem);
diff --git a/sw/source/ui/inc/chldwrap.hxx b/sw/source/ui/inc/chldwrap.hxx
index 67009b0a8d2f..6a6bfe0f9a97 100644
--- a/sw/source/ui/inc/chldwrap.hxx
+++ b/sw/source/ui/inc/chldwrap.hxx
@@ -41,10 +41,10 @@ class SwChildWinWrapper : public SfxChildWindow
// Implementation in fldtdlg.cxx
protected:
- SwChildWinWrapper(Window *pParentWindow, USHORT nId);
+ SwChildWinWrapper(Window *pParentWindow, sal_uInt16 nId);
public:
- virtual BOOL ReInitDlg(SwDocShell *pDocSh);
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
inline SwDocShell* GetOldDocShell() { return m_pDocSh; }
inline void SetOldDocShell(SwDocShell *pDcSh) { m_pDocSh = pDcSh; }
diff --git a/sw/source/ui/inc/chrdlg.hxx b/sw/source/ui/inc/chrdlg.hxx
index 85248baeed8b..300874ffaeb6 100644
--- a/sw/source/ui/inc/chrdlg.hxx
+++ b/sw/source/ui/inc/chrdlg.hxx
@@ -62,15 +62,15 @@ class SvxMacroItem;
class SwCharDlg: public SfxTabDialog
{
SwView& rView;
- BOOL bIsDrwTxtMode;
+ sal_Bool bIsDrwTxtMode;
public:
SwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
- const String* pFmtStr = 0, BOOL bIsDrwTxtDlg = FALSE);
+ const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False);
~SwCharDlg();
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
};
/*-----------------14.08.96 11.03-------------------
@@ -98,7 +98,7 @@ class SwCharURLPage : public SfxTabPage
ListBox aNotVisitedLB;
SvxMacroItem* pINetItem;
- BOOL bModified;
+ sal_Bool bModified;
DECL_LINK( InsertFileHdl, PushButton * );
DECL_LINK( EventHdl, PushButton * );
@@ -111,7 +111,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sw/source/ui/inc/cnttab.hxx b/sw/source/ui/inc/cnttab.hxx
index 852a2f705c68..d263be129b56 100644
--- a/sw/source/ui/inc/cnttab.hxx
+++ b/sw/source/ui/inc/cnttab.hxx
@@ -62,17 +62,17 @@
struct CurTOXType
{
TOXTypes eType;
- USHORT nIndex; //for TOX_USER only
+ sal_uInt16 nIndex; //for TOX_USER only
- BOOL operator==(const CurTOXType aCmp)
+ sal_Bool operator==(const CurTOXType aCmp)
{
return eType == aCmp.eType && nIndex == aCmp.nIndex;
}
- USHORT GetFlatIndex() const;
+ sal_uInt16 GetFlatIndex() const;
CurTOXType () : eType (TOX_INDEX), nIndex (0) {};
- CurTOXType (TOXTypes t, USHORT i) : eType (t), nIndex (i) {};
+ CurTOXType (TOXTypes t, sal_uInt16 i) : eType (t), nIndex (i) {};
};
class SwOLENames : public Resource
diff --git a/sw/source/ui/inc/colex.hxx b/sw/source/ui/inc/colex.hxx
index 39778f503d2a..22cd2b6ff507 100644
--- a/sw/source/ui/inc/colex.hxx
+++ b/sw/source/ui/inc/colex.hxx
@@ -58,8 +58,8 @@ class SW_DLLPUBLIC SwPageGridExample : public SwPageExample
sal_Bool m_bVertical;
protected:
virtual void DrawPage( const Point& rPoint,
- const BOOL bSecond,
- const BOOL bEnabled );
+ const sal_Bool bSecond,
+ const sal_Bool bEnabled );
public:
SwPageGridExample(Window* pPar, const ResId& rResId ) :
SwPageExample(pPar, rResId ),
@@ -80,8 +80,8 @@ class SW_DLLPUBLIC SwColExample : public SwPageExample
protected:
virtual void DrawPage( const Point& rPoint,
- const BOOL bSecond,
- const BOOL bEnabled );
+ const sal_Bool bSecond,
+ const sal_Bool bEnabled );
public:
SwColExample(Window* pPar, const ResId& rResId ) :
diff --git a/sw/source/ui/inc/colmgr.hxx b/sw/source/ui/inc/colmgr.hxx
index 641c48e9bb66..0d9ebdf5123c 100644
--- a/sw/source/ui/inc/colmgr.hxx
+++ b/sw/source/ui/inc/colmgr.hxx
@@ -30,33 +30,33 @@
#include "swdllapi.h"
#include <fmtclds.hxx>
-SW_DLLPUBLIC void FitToActualSize(SwFmtCol& rCol, USHORT nWidth);
+SW_DLLPUBLIC void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth);
class SW_DLLPUBLIC SwColMgr
{
public:
// lActWidth wird aus den Edits des Seitendialogs
// direkt uebergeben
- SwColMgr(const SfxItemSet &rSet, USHORT nActWidth = USHRT_MAX);
+ SwColMgr(const SfxItemSet &rSet, sal_uInt16 nActWidth = USHRT_MAX);
~SwColMgr();
- inline USHORT GetCount() const;
- void SetCount(USHORT nCount, USHORT nGutterWidth);
- USHORT GetGutterWidth(USHORT nPos = USHRT_MAX) const;
- void SetGutterWidth(USHORT nWidth, USHORT nPos = USHRT_MAX);
+ inline sal_uInt16 GetCount() const;
+ void SetCount(sal_uInt16 nCount, sal_uInt16 nGutterWidth);
+ sal_uInt16 GetGutterWidth(sal_uInt16 nPos = USHRT_MAX) const;
+ void SetGutterWidth(sal_uInt16 nWidth, sal_uInt16 nPos = USHRT_MAX);
- USHORT GetColWidth(USHORT nIdx) const;
- void SetColWidth(USHORT nIdx, USHORT nWidth);
+ sal_uInt16 GetColWidth(sal_uInt16 nIdx) const;
+ void SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWidth);
- inline BOOL IsAutoWidth() const;
- void SetAutoWidth(BOOL bOn = TRUE, USHORT lGutterWidth = 0);
+ inline sal_Bool IsAutoWidth() const;
+ void SetAutoWidth(sal_Bool bOn = sal_True, sal_uInt16 lGutterWidth = 0);
- inline BOOL HasLine() const;
+ inline sal_Bool HasLine() const;
inline void SetNoLine();
- inline void SetLineWidthAndColor(ULONG nWidth, const Color& rCol);
- inline ULONG GetLineWidth() const;
+ inline void SetLineWidthAndColor(sal_uLong nWidth, const Color& rCol);
+ inline sal_uLong GetLineWidth() const;
inline const Color& GetLineColor() const;
inline SwColLineAdj GetAdjust() const;
@@ -70,28 +70,28 @@ public:
const SwFmtCol& GetColumns() const { return aFmtCol; }
- void SetActualWidth(USHORT nW);
- USHORT GetActualSize() const { return nWidth; }
+ void SetActualWidth(sal_uInt16 nW);
+ sal_uInt16 GetActualSize() const { return nWidth; }
private:
SwFmtCol aFmtCol;
- USHORT nWidth;
+ sal_uInt16 nWidth;
};
// INLINE METHODE --------------------------------------------------------
-inline USHORT SwColMgr::GetCount() const
+inline sal_uInt16 SwColMgr::GetCount() const
{
return aFmtCol.GetNumCols();
}
-inline void SwColMgr::SetLineWidthAndColor(ULONG nLWidth, const Color& rCol)
+inline void SwColMgr::SetLineWidthAndColor(sal_uLong nLWidth, const Color& rCol)
{
aFmtCol.SetLineWidth(nLWidth);
aFmtCol.SetLineColor(rCol);
}
-inline ULONG SwColMgr::GetLineWidth() const
+inline sal_uLong SwColMgr::GetLineWidth() const
{
return aFmtCol.GetLineWidth();
}
@@ -107,11 +107,11 @@ inline void SwColMgr::SetAdjust(SwColLineAdj eAdj)
{
aFmtCol.SetLineAdj(eAdj);
}
-inline BOOL SwColMgr::IsAutoWidth() const
+inline sal_Bool SwColMgr::IsAutoWidth() const
{
return aFmtCol.IsOrtho();
}
-inline void SwColMgr::SetAutoWidth(BOOL bOn, USHORT nGutterWidth)
+inline void SwColMgr::SetAutoWidth(sal_Bool bOn, sal_uInt16 nGutterWidth)
{
aFmtCol.SetOrtho(bOn, nGutterWidth, nWidth);
}
@@ -119,7 +119,7 @@ inline void SwColMgr::NoCols()
{
aFmtCol.GetColumns().DeleteAndDestroy(0, aFmtCol.GetColumns().Count());
}
-inline BOOL SwColMgr::HasLine() const
+inline sal_Bool SwColMgr::HasLine() const
{
return GetAdjust() != COLADJ_NONE;
}
diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx
index f2a5e37d283b..948f68c9d319 100644
--- a/sw/source/ui/inc/column.hxx
+++ b/sw/source/ui/inc/column.hxx
@@ -87,10 +87,10 @@ class SwColumnDlg : public SfxModalDialog
long nSelectionWidth;
long nPageWidth;
- BOOL bPageChanged : 1;
- BOOL bSectionChanged : 1;
- BOOL bSelSectionChanged : 1;
- BOOL bFrameChanged : 1;
+ sal_Bool bPageChanged : 1;
+ sal_Bool bSectionChanged : 1;
+ sal_Bool bSelSectionChanged : 1;
+ sal_Bool bFrameChanged : 1;
DECL_LINK(ObjectHdl, ListBox*);
@@ -165,16 +165,16 @@ class SwColumnPage : public SfxTabPage
SwColMgr* pColMgr;
- USHORT nFirstVis;
- USHORT nCols;
+ sal_uInt16 nFirstVis;
+ sal_uInt16 nCols;
long nColWidth[nMaxCols];
long nColDist[nMaxCols];
- USHORT nMinWidth;
+ sal_uInt16 nMinWidth;
PercentField *pModifiedField;
- BOOL bFormat;
- BOOL bFrm;
- BOOL bHtmlMode;
- BOOL bLockUpdate;
+ sal_Bool bFormat;
+ sal_Bool bFrm;
+ sal_Bool bHtmlMode;
+ sal_Bool bLockUpdate;
// Handler
DECL_LINK( ColModify, NumericField * );
@@ -193,7 +193,7 @@ class SwColumnPage : public SfxTabPage
void UpdateCols();
void Init();
void ResetColWidth();
- void SetLabels( USHORT nVis );
+ void SetLabels( sal_uInt16 nVis );
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
@@ -207,18 +207,18 @@ public:
virtual ~SwColumnPage();
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
- void SetFrmMode(BOOL bMod);
+ void SetFrmMode(sal_Bool bMod);
void SetPageWidth(long nPageWidth);
- void SetFormatUsed(BOOL bFmt) { bFormat = bFmt; }
+ void SetFormatUsed(sal_Bool bFmt) { bFormat = bFmt; }
- void ShowBalance(BOOL bShow) {aBalanceColsCB.Show(bShow);}
- void SetInSection(BOOL bSet);
+ void ShowBalance(sal_Bool bShow) {aBalanceColsCB.Show(bShow);}
+ void SetInSection(sal_Bool bSet);
void ActivateColumnControl() {aCLNrEdt.GrabFocus();}
};
diff --git a/sw/source/ui/inc/conarc.hxx b/sw/source/ui/inc/conarc.hxx
index 4b8d01f8d5c3..739a27e309cc 100644
--- a/sw/source/ui/inc/conarc.hxx
+++ b/sw/source/ui/inc/conarc.hxx
@@ -38,16 +38,16 @@
class ConstArc : public SwDrawBase
{
Point aStartPnt;
- UINT16 nAnzButUp;
+ sal_uInt16 nAnzButUp;
public:
ConstArc(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Funktion aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Funktion aktivieren
virtual void Deactivate();
};
diff --git a/sw/source/ui/inc/concustomshape.hxx b/sw/source/ui/inc/concustomshape.hxx
index 5ff08952f28d..20b9cf798f77 100644
--- a/sw/source/ui/inc/concustomshape.hxx
+++ b/sw/source/ui/inc/concustomshape.hxx
@@ -52,10 +52,10 @@ class ConstCustomShape : public SwDrawBase
ConstCustomShape( SwWrtShell* pSh, SwEditWin* pWin, SwView* pView, SfxRequest& rReq );
// Mouse- & Key-Events
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
rtl::OUString GetShapeType() const;
static rtl::OUString GetShapeTypeFromRequest( SfxRequest& rReq );
diff --git a/sw/source/ui/inc/condedit.hxx b/sw/source/ui/inc/condedit.hxx
index bce44192ae68..1cbd29d52a78 100644
--- a/sw/source/ui/inc/condedit.hxx
+++ b/sw/source/ui/inc/condedit.hxx
@@ -39,7 +39,7 @@
class SW_DLLPUBLIC ConditionEdit : public Edit, public DropTargetHelper
{
- BOOL bBrackets, bEnableDrop;
+ sal_Bool bBrackets, bEnableDrop;
SW_DLLPRIVATE virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
SW_DLLPRIVATE virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
@@ -47,10 +47,10 @@ class SW_DLLPUBLIC ConditionEdit : public Edit, public DropTargetHelper
public:
ConditionEdit( Window* pParent, const ResId& rResId );
- inline void ShowBrackets(BOOL bShow) { bBrackets = bShow; }
+ inline void ShowBrackets(sal_Bool bShow) { bBrackets = bShow; }
- inline void SetDropEnable( BOOL bFlag ) { bEnableDrop = bFlag; }
- inline BOOL IsDropEnable() const { return bEnableDrop; }
+ inline void SetDropEnable( sal_Bool bFlag ) { bEnableDrop = bFlag; }
+ inline sal_Bool IsDropEnable() const { return bEnableDrop; }
};
#endif
diff --git a/sw/source/ui/inc/conform.hxx b/sw/source/ui/inc/conform.hxx
index 1117da12dc25..db62dc3deada 100644
--- a/sw/source/ui/inc/conform.hxx
+++ b/sw/source/ui/inc/conform.hxx
@@ -35,9 +35,9 @@ public:
ConstFormControl(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
virtual void CreateDefaultObject();
};
diff --git a/sw/source/ui/inc/conpoly.hxx b/sw/source/ui/inc/conpoly.hxx
index 7fc528fd4d93..3733c7a71b61 100644
--- a/sw/source/ui/inc/conpoly.hxx
+++ b/sw/source/ui/inc/conpoly.hxx
@@ -43,11 +43,11 @@ public:
ConstPolygon(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
};
diff --git a/sw/source/ui/inc/conrect.hxx b/sw/source/ui/inc/conrect.hxx
index 3490aa4d9faa..0280cf173a00 100644
--- a/sw/source/ui/inc/conrect.hxx
+++ b/sw/source/ui/inc/conrect.hxx
@@ -38,8 +38,8 @@
class ConstRectangle : public SwDrawBase
{
- BOOL bMarquee;
- BOOL bCapVertical;
+ sal_Bool bMarquee;
+ sal_Bool bCapVertical;
// #93382#
sal_Bool mbVertical;
@@ -48,10 +48,10 @@ class ConstRectangle : public SwDrawBase
ConstRectangle(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
};
diff --git a/sw/source/ui/inc/content.hxx b/sw/source/ui/inc/content.hxx
index bfcd31dcba87..c7bc20ebb65b 100644
--- a/sw/source/ui/inc/content.hxx
+++ b/sw/source/ui/inc/content.hxx
@@ -47,7 +47,7 @@ class SwRedline;
class SwPopup : public PopupMenu
{
- USHORT nCurId;
+ sal_uInt16 nCurId;
virtual void Select(){nCurId = GetCurItemId();}
public:
@@ -55,7 +55,7 @@ public:
PopupMenu(),
nCurId(USHRT_MAX){}
- USHORT GetCurId() const { return nCurId; }
+ sal_uInt16 GetCurId() const { return nCurId; }
};
@@ -63,38 +63,38 @@ public:
class SwOutlineContent : public SwContent
{
- USHORT nOutlinePos;
- BYTE nOutlineLevel;
- BOOL bIsMoveable;
+ sal_uInt16 nOutlinePos;
+ sal_uInt8 nOutlineLevel;
+ sal_Bool bIsMoveable;
public:
SwOutlineContent( const SwContentType* pCnt,
const String& rName,
- USHORT nArrPos,
- BYTE nLevel,
- BOOL bMove,
+ sal_uInt16 nArrPos,
+ sal_uInt8 nLevel,
+ sal_Bool bMove,
long nYPos) :
SwContent(pCnt, rName, nYPos),
nOutlinePos(nArrPos), nOutlineLevel(nLevel), bIsMoveable(bMove) {}
- USHORT GetPos(){return nOutlinePos;}
- BYTE GetOutlineLevel(){return nOutlineLevel;}
- BOOL IsMoveable(){return bIsMoveable;};
+ sal_uInt16 GetPos(){return nOutlinePos;}
+ sal_uInt8 GetOutlineLevel(){return nOutlineLevel;}
+ sal_Bool IsMoveable(){return bIsMoveable;};
};
//----------------------------------------------------------------------------
class SwRegionContent : public SwContent
{
- BYTE nRegionLevel;
+ sal_uInt8 nRegionLevel;
public:
SwRegionContent( const SwContentType* pCnt,
const String& rName,
- BYTE nLevel,
+ sal_uInt8 nLevel,
long nYPos) :
SwContent(pCnt, rName, nYPos),
nRegionLevel(nLevel){}
- BYTE GetRegionLevel() const {return nRegionLevel;}
+ sal_uInt8 GetRegionLevel() const {return nRegionLevel;}
};
//----------------------------------------------------------------------------
@@ -112,7 +112,7 @@ public:
: SwContent( pCnt, rName, nYPos ), sURL( rURL ), pINetAttr( pAttr )
{}
- virtual BOOL IsProtect() const;
+ virtual sal_Bool IsProtect() const;
const String& GetURL() { return sURL; }
const SwTxtINetFmt* GetINetAttr() { return pINetAttr; }
};
@@ -139,7 +139,7 @@ public:
const SwFmtFld* GetPostIt() { return pFld; }
SwRedline* GetRedline() { return pRedline; }
- virtual BOOL IsProtect() const;
+ virtual sal_Bool IsProtect() const;
bool IsPostIt() {return mbPostIt; }
};
@@ -185,31 +185,31 @@ class SwContentType : public SwTypeNumber
String sContentTypeName; // Name der Inhaltsform
String sSingleContentTypeName; // Name der Inhaltsform, Singular
String sTypeToken; // Anhaengsel fuer URL
- USHORT nMemberCount; // Inhaltsanzahl
- USHORT nContentType; // Id der Inhaltsform
- BYTE nOutlineLevel;
- BOOL bMemberFilled : 1; // wurden die Inhalte bereits eingefuegt?
- BOOL bIsInternalDrag:1; // koennen die Inhalte verschoben werden?
- BOOL bDataValid : 1; //
- BOOL bEdit: 1; // kann diese Type bearbeitet werden ?
- BOOL bDelete: 1; // kann diese Type geloescht werden ?
+ sal_uInt16 nMemberCount; // Inhaltsanzahl
+ sal_uInt16 nContentType; // Id der Inhaltsform
+ sal_uInt8 nOutlineLevel;
+ sal_Bool bMemberFilled : 1; // wurden die Inhalte bereits eingefuegt?
+ sal_Bool bIsInternalDrag:1; // koennen die Inhalte verschoben werden?
+ sal_Bool bDataValid : 1; //
+ sal_Bool bEdit: 1; // kann diese Type bearbeitet werden ?
+ sal_Bool bDelete: 1; // kann diese Type geloescht werden ?
protected:
void RemoveNewline(String&);
public:
- SwContentType(SwWrtShell* pParent, USHORT nType, BYTE nLevel );
+ SwContentType(SwWrtShell* pParent, sal_uInt16 nType, sal_uInt8 nLevel );
~SwContentType();
- void Init(BOOL* pbInvalidateWindow = 0);
- void FillMemberList(BOOL* pbLevelChanged = NULL);
- USHORT GetMemberCount() const
+ void Init(sal_Bool* pbInvalidateWindow = 0);
+ void FillMemberList(sal_Bool* pbLevelChanged = NULL);
+ sal_uInt16 GetMemberCount() const
{return nMemberCount;};
- USHORT GetType() const {return nContentType;}
- const SwContent* GetMember(USHORT nIndex);
+ sal_uInt16 GetType() const {return nContentType;}
+ const SwContent* GetMember(sal_uInt16 nIndex);
const String& GetName() {return sContentTypeName;}
const String& GetSingleName() const {return sSingleContentTypeName;}
const String& GetTypeToken() const{return sTypeToken;}
- void SetOutlineLevel(BYTE nNew)
+ void SetOutlineLevel(sal_uInt8 nNew)
{
nOutlineLevel = nNew;
Invalidate();
@@ -217,8 +217,8 @@ public:
void Invalidate(); // nur nMemberCount wird neu gelesen
- BOOL IsEditable() const {return bEdit;}
- BOOL IsDeletable() const {return bDelete;}
+ sal_Bool IsEditable() const {return bEdit;}
+ sal_Bool IsDeletable() const {return bDelete;}
};
#endif
diff --git a/sw/source/ui/inc/conttree.hxx b/sw/source/ui/inc/conttree.hxx
index d3a84b0bdb78..10e222b3787b 100644
--- a/sw/source/ui/inc/conttree.hxx
+++ b/sw/source/ui/inc/conttree.hxx
@@ -75,24 +75,24 @@ class SwContentTree : public SvTreeListBox
SwNavigationConfig* pConfig;
sal_Int32 nActiveBlock;
- USHORT nHiddenBlock;
- USHORT nRootType;
- USHORT nLastSelType;
- BYTE nOutlineLevel;
-
- BOOL bIsActive :1;
- BOOL bIsConstant :1;
- BOOL bIsHidden :1;
- BOOL bDocChgdInDragging :1;
- BOOL bIsInternalDrag :1;
- BOOL bIsRoot :1;
- BOOL bIsIdleClear :1;
- BOOL bIsLastReadOnly :1;
- BOOL bIsOutlineMoveable :1;
- BOOL bViewHasChanged :1;
- BOOL bIsImageListInitialized : 1;
-
- static BOOL bIsInDrag;
+ sal_uInt16 nHiddenBlock;
+ sal_uInt16 nRootType;
+ sal_uInt16 nLastSelType;
+ sal_uInt8 nOutlineLevel;
+
+ sal_Bool bIsActive :1;
+ sal_Bool bIsConstant :1;
+ sal_Bool bIsHidden :1;
+ sal_Bool bDocChgdInDragging :1;
+ sal_Bool bIsInternalDrag :1;
+ sal_Bool bIsRoot :1;
+ sal_Bool bIsIdleClear :1;
+ sal_Bool bIsLastReadOnly :1;
+ sal_Bool bIsOutlineMoveable :1;
+ sal_Bool bViewHasChanged :1;
+ sal_Bool bIsImageListInitialized : 1;
+
+ static sal_Bool bIsInDrag;
void FindActiveTypeAndRemoveUserData();
@@ -119,41 +119,41 @@ protected:
sal_Bool FillTransferData( TransferDataContainer& rTransfer,
sal_Int8& rDragMode );
- BOOL HasContentChanged();
+ sal_Bool HasContentChanged();
virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData,
SvLBoxEntry* );
- virtual BOOL NotifyAcceptDrop( SvLBoxEntry* );
+ virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* );
- virtual BOOL NotifyMoving( SvLBoxEntry* pTarget,
+ virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
- virtual BOOL NotifyCopying( SvLBoxEntry* pTarget,
+ virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
virtual void MouseButtonDown( const MouseEvent& rMEvt );
- void EditEntry( SvLBoxEntry* pEntry, BYTE nMode );
+ void EditEntry( SvLBoxEntry* pEntry, sal_uInt8 nMode );
void GotoContent(SwContent* pCnt);
- static void SetInDrag(BOOL bSet) {bIsInDrag = bSet;}
+ static void SetInDrag(sal_Bool bSet) {bIsInDrag = bSet;}
virtual PopupMenu* CreateContextMenu( void );
- virtual void ExcecuteContextMenuAction( USHORT nSelectedPopupEntry );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry );
public:
SwContentTree(Window* pParent, const ResId& rResId);
~SwContentTree();
- BOOL ToggleToRoot();
- BOOL IsRoot() const {return bIsRoot;}
- USHORT GetRootType() const {return nRootType;}
- void SetRootType(USHORT nType);
- void Display( BOOL bActiveView );
+ sal_Bool ToggleToRoot();
+ sal_Bool IsRoot() const {return bIsRoot;}
+ sal_uInt16 GetRootType() const {return nRootType;}
+ void SetRootType(sal_uInt16 nType);
+ void Display( sal_Bool bActiveView );
void Clear();
void SetHiddenShell(SwWrtShell* pSh);
void ShowHiddenShell();
@@ -166,26 +166,26 @@ public:
pActiveShell :
pHiddenShell;}
- static BOOL IsInDrag() {return bIsInDrag;}
- BOOL IsInternalDrag() const {return bIsInternalDrag != 0;}
+ static sal_Bool IsInDrag() {return bIsInDrag;}
+ sal_Bool IsInternalDrag() const {return bIsInternalDrag != 0;}
sal_Int32 GetActiveBlock() const {return nActiveBlock;}
- BYTE GetOutlineLevel()const {return nOutlineLevel;}
- void SetOutlineLevel(BYTE nSet);
+ sal_uInt8 GetOutlineLevel()const {return nOutlineLevel;}
+ void SetOutlineLevel(sal_uInt8 nSet);
- BOOL Expand( SvLBoxEntry* pParent );
+ sal_Bool Expand( SvLBoxEntry* pParent );
- BOOL Collapse( SvLBoxEntry* pParent );
+ sal_Bool Collapse( SvLBoxEntry* pParent );
- void ExecCommand(USHORT nCmd, BOOL bModifier);
+ void ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier);
void ShowTree();
void HideTree();
- BOOL IsConstantView() {return bIsConstant;}
- BOOL IsActiveView() {return bIsActive;}
- BOOL IsHiddenView() {return bIsHidden;}
+ sal_Bool IsConstantView() {return bIsConstant;}
+ sal_Bool IsActiveView() {return bIsActive;}
+ sal_Bool IsHiddenView() {return bIsHidden;}
const SwWrtShell* GetActiveWrtShell() {return pActiveShell;}
SwWrtShell* GetHiddenWrtShell() {return pHiddenShell;}
@@ -199,7 +199,7 @@ public:
virtual void GetFocus();
virtual void KeyInput(const KeyEvent& rKEvt);
- virtual BOOL Select( SvLBoxEntry* pEntry, BOOL bSelect=TRUE );
+ virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
};
@@ -211,12 +211,12 @@ class SwLBoxString : public SvLBoxString
{
public:
- SwLBoxString( SvLBoxEntry* pEntry, USHORT nFlags,
+ SwLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags,
const String& rStr ) : SvLBoxString(pEntry,nFlags,rStr)
{
}
- virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags,
+ virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
SvLBoxEntry* pEntry);
};
@@ -240,9 +240,9 @@ private:
SwGlblDocContent* pDocContent;
sfx2::DocumentInserter* pDocInserter;
- BOOL bIsInternalDrag :1;
- BOOL bLastEntryEmphasis :1; // Drag'n Drop
- BOOL bIsImageListInitialized : 1;
+ sal_Bool bIsInternalDrag :1;
+ sal_Bool bLastEntryEmphasis :1; // Drag'n Drop
+ sal_Bool bIsImageListInitialized : 1;
static const SfxObjectShell* pShowShell;
@@ -266,22 +266,22 @@ protected:
virtual void RequestHelp( const HelpEvent& rHEvt );
virtual long GetTabPos( SvLBoxEntry*, SvLBoxTab* );
- virtual BOOL NotifyMoving( SvLBoxEntry* pTarget,
+ virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
- virtual BOOL NotifyCopying( SvLBoxEntry* pTarget,
+ virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
virtual void DragFinished( sal_Int8 );
virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData,
SvLBoxEntry* );
- virtual BOOL NotifyAcceptDrop( SvLBoxEntry* );
+ virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
virtual void KeyInput(const KeyEvent& rKEvt);
@@ -296,26 +296,26 @@ protected:
DECL_LINK( Timeout, Timer* );
DECL_LINK( DoubleClickHdl, SwGlobalTree * );
- BOOL IsInternalDrag() const {return bIsInternalDrag != 0;}
+ sal_Bool IsInternalDrag() const {return bIsInternalDrag != 0;}
SwNavigationPI* GetParentWindow()
{ return (SwNavigationPI*)Window::GetParent(); }
void OpenDoc(const SwGlblDocContent*);
void GotoContent(const SwGlblDocContent*);
- USHORT GetEnableFlags() const;
+ sal_uInt16 GetEnableFlags() const;
static const SfxObjectShell* GetShowShell() {return pShowShell;}
static void SetShowShell(const SfxObjectShell*pSet) {pShowShell = pSet;}
DECL_STATIC_LINK(SwGlobalTree, ShowFrameHdl, SwGlobalTree*);
virtual PopupMenu* CreateContextMenu( void );
- virtual void ExcecuteContextMenuAction( USHORT nSelectedPopupEntry );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry );
public:
SwGlobalTree(Window* pParent, const ResId& rResId);
virtual ~SwGlobalTree();
- void TbxMenuHdl(USHORT nTbxId, ToolBox* pBox);
+ void TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox);
void InsertRegion( const SwGlblDocContent* pCont,
const String* pFileName = 0 );
void EditContent(const SwGlblDocContent* pCont );
@@ -323,11 +323,11 @@ public:
void ShowTree();
void HideTree();
- void ExecCommand(USHORT nCmd);
+ void ExecCommand(sal_uInt16 nCmd);
- void Display(BOOL bOnlyUpdateUserData = FALSE);
+ void Display(sal_Bool bOnlyUpdateUserData = sal_False);
- BOOL Update(BOOL bHard);
+ sal_Bool Update(sal_Bool bHard);
};
#endif
diff --git a/sw/source/ui/inc/dbinsdlg.hxx b/sw/source/ui/inc/dbinsdlg.hxx
index c0a530de9f3a..4cc46b7ff964 100644
--- a/sw/source/ui/inc/dbinsdlg.hxx
+++ b/sw/source/ui/inc/dbinsdlg.hxx
@@ -73,18 +73,18 @@ struct SwInsDBColumn
sal_Int32 nDBNumFmt;
sal_uInt32 nUsrNumFmt;
LanguageType eUsrNumFmtLng;
- USHORT nCol;
- BOOL bHasFmt : 1;
- BOOL bIsDBFmt : 1;
+ sal_uInt16 nCol;
+ sal_Bool bHasFmt : 1;
+ sal_Bool bIsDBFmt : 1;
- SwInsDBColumn( const String& rStr, USHORT nColumn )
+ SwInsDBColumn( const String& rStr, sal_uInt16 nColumn )
: sColumn( rStr ),
nDBNumFmt( 0 ),
nUsrNumFmt( 0 ),
eUsrNumFmtLng( LANGUAGE_SYSTEM ),
nCol( nColumn ),
- bHasFmt(FALSE),
- bIsDBFmt(TRUE)
+ bHasFmt(sal_False),
+ bIsDBFmt(sal_True)
{}
int operator==( const SwInsDBColumn& rCmp ) const
@@ -150,7 +150,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem
SfxItemSet* pTblSet;
SwTableRep* pRep;
- USHORT nGBFmtLen;
+ sal_uInt16 nGBFmtLen;
DECL_LINK( PageHdl, Button* );
DECL_LINK( AutoFmtHdl, PushButton* );
@@ -161,7 +161,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem
DECL_LINK( DblClickHdl, ListBox* );
DECL_LINK( HeaderHdl, Button* );
- BOOL SplitTextToColArr( const String& rTxt, _DB_Columns& rColArr, BOOL bInsField );
+ sal_Bool SplitTextToColArr( const String& rTxt, _DB_Columns& rColArr, sal_Bool bInsField );
using SfxModalDialog::Notify;
virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
virtual void Commit();
diff --git a/sw/source/ui/inc/dbtree.hxx b/sw/source/ui/inc/dbtree.hxx
index d6c81e2e5ce8..44236edf7b00 100644
--- a/sw/source/ui/inc/dbtree.hxx
+++ b/sw/source/ui/inc/dbtree.hxx
@@ -49,8 +49,8 @@ class SW_DLLPUBLIC SwDBTreeList : public SvTreeListBox
Image aQueryBMP;
String sDefDBName;
- BOOL bInitialized;
- BOOL bShowColumns;
+ sal_Bool bInitialized;
+ sal_Bool bShowColumns;
SwDBTreeList_Impl* pImpl;
@@ -68,15 +68,15 @@ public:
SwDBTreeList( Window* pParent, const ResId& rResId,
SwWrtShell* pSh,
const String& rDefDBName = aEmptyStr,
- const BOOL bShowCol = FALSE );
+ const sal_Bool bShowCol = sal_False );
virtual ~SwDBTreeList();
- String GetDBName( String& rTableName, String& rColumnName, BOOL* pbIsTable = 0);
+ String GetDBName( String& rTableName, String& rColumnName, sal_Bool* pbIsTable = 0);
void Select( const String& rDBName, const String& rTableName,
const String& rColumnName );
- void ShowColumns(BOOL bShowCol);
+ void ShowColumns(sal_Bool bShowCol);
void SetWrtShell(SwWrtShell& rSh);
void AddDataSource(const String& rSource);
diff --git a/sw/source/ui/inc/docfnote.hxx b/sw/source/ui/inc/docfnote.hxx
index b3ffde863596..7804773be5ff 100644
--- a/sw/source/ui/inc/docfnote.hxx
+++ b/sw/source/ui/inc/docfnote.hxx
@@ -36,7 +36,7 @@ class SwFootNoteOptionDlg :public SfxTabDialog
SwWrtShell &rSh;
Link aOldOkHdl;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
#ifdef _SOLAR__PRIVATE
DECL_LINK( OkHdl, Button * );
diff --git a/sw/source/ui/inc/docstdlg.hxx b/sw/source/ui/inc/docstdlg.hxx
index f269693975cc..7880413f6089 100644
--- a/sw/source/ui/inc/docstdlg.hxx
+++ b/sw/source/ui/inc/docstdlg.hxx
@@ -49,7 +49,7 @@ public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
protected:
- virtual BOOL FillItemSet( SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet( SfxItemSet &rSet);
virtual void Reset (const SfxItemSet &rSet);
DECL_LINK( UpdateHdl, PushButton*);
diff --git a/sw/source/ui/inc/drawbase.hxx b/sw/source/ui/inc/drawbase.hxx
index 783bd730a86d..2a63c6db360c 100644
--- a/sw/source/ui/inc/drawbase.hxx
+++ b/sw/source/ui/inc/drawbase.hxx
@@ -51,9 +51,9 @@ protected:
SwEditWin* m_pWin;
Point m_aStartPos; // Position von BeginCreate
Point m_aMDPos; // Position von MouseButtonDown
- USHORT m_nSlotId;
- BOOL m_bCreateObj :1;
- BOOL m_bInsForm :1;
+ sal_uInt16 m_nSlotId;
+ sal_Bool m_bCreateObj :1;
+ sal_Bool m_bInsForm :1;
Point GetDefaultCenterPos();
public:
@@ -62,20 +62,20 @@ public:
void SetDrawPointer();
void EnterSelectMode(const MouseEvent& rMEvt);
- inline BOOL IsInsertForm() const { return m_bInsForm; }
- inline BOOL IsCreateObj() const { return m_bCreateObj; }
+ inline sal_Bool IsInsertForm() const { return m_bInsForm; }
+ inline sal_Bool IsCreateObj() const { return m_bCreateObj; }
- // Mouse- & Key-Events; Returnwert=TRUE: Event wurde bearbeitet
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ // Mouse- & Key-Events; Returnwert=sal_True: Event wurde bearbeitet
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
void BreakCreate();
- void SetSlotId(USHORT nSlot) {m_nSlotId = nSlot;}
- USHORT GetSlotId() { return m_nSlotId;}
+ void SetSlotId(sal_uInt16 nSlot) {m_nSlotId = nSlot;}
+ sal_uInt16 GetSlotId() { return m_nSlotId;}
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
virtual void CreateDefaultObject();
diff --git a/sw/source/ui/inc/drpcps.hxx b/sw/source/ui/inc/drpcps.hxx
index 50140443f726..b52ef7d813d2 100644
--- a/sw/source/ui/inc/drpcps.hxx
+++ b/sw/source/ui/inc/drpcps.hxx
@@ -90,9 +90,9 @@ friend class SwDropCapsPict;
SwDropCapsPict *pPict;
- BOOL bModified;
- BOOL bFormat;
- BOOL bHtmlMode;
+ sal_Bool bModified;
+ sal_Bool bFormat;
+ sal_Bool bHtmlMode;
SwWrtShell &rSh;
@@ -113,12 +113,12 @@ friend class SwDropCapsPict;
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet( SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet( SfxItemSet &rSet);
virtual void Reset (const SfxItemSet &rSet);
- void SetFormat(BOOL bSet){bFormat = bSet;}
+ void SetFormat(sal_Bool bSet){bFormat = bSet;}
};
#endif
diff --git a/sw/source/ui/inc/drwbassh.hxx b/sw/source/ui/inc/drwbassh.hxx
index dcdd1c1b427d..00b18f2fb143 100644
--- a/sw/source/ui/inc/drwbassh.hxx
+++ b/sw/source/ui/inc/drwbassh.hxx
@@ -38,9 +38,9 @@ class SwDrawBaseShell: public SwBaseShell
{
SwDrawBase* pDrawActual;
- UINT16 eDrawMode;
- BOOL bRotate : 1;
- BOOL bSelMove: 1;
+ sal_uInt16 eDrawMode;
+ sal_Bool bRotate : 1;
+ sal_Bool bSelMove: 1;
DECL_LINK( CheckGroupShapeNameHdl, AbstractSvxNameDialog* );
DECL_LINK(ValidatePosition, SvxSwFrameValidation* );
@@ -54,7 +54,7 @@ public:
void Execute(SfxRequest &);
void GetState(SfxItemSet &);
void DisableState(SfxItemSet &rSet) { Disable(rSet);}
- BOOL Disable(SfxItemSet& rSet, USHORT nWhich = 0);
+ sal_Bool Disable(SfxItemSet& rSet, sal_uInt16 nWhich = 0);
void StateStatusline(SfxItemSet &rSet);
diff --git a/sw/source/ui/inc/drwtxtsh.hxx b/sw/source/ui/inc/drwtxtsh.hxx
index 79aebc4e016a..3a502a2b2779 100644
--- a/sw/source/ui/inc/drwtxtsh.hxx
+++ b/sw/source/ui/inc/drwtxtsh.hxx
@@ -41,12 +41,12 @@ class SwDrawTextShell: public SfxShell
SdrView *pSdrView;
- BOOL bRotate : 1;
- BOOL bSelMove: 1;
+ sal_Bool bRotate : 1;
+ sal_Bool bSelMove: 1;
void SetAttrToMarked(const SfxItemSet& rAttr);
void InsertSymbol(SfxRequest& rReq);
- BOOL IsTextEdit();
+ sal_Bool IsTextEdit();
public:
SFX_DECL_INTERFACE(SW_DRWTXTSHELL)
TYPEINFO();
diff --git a/sw/source/ui/inc/dselect.hxx b/sw/source/ui/inc/dselect.hxx
index 37d3d84832bb..65b778181947 100644
--- a/sw/source/ui/inc/dselect.hxx
+++ b/sw/source/ui/inc/dselect.hxx
@@ -41,9 +41,9 @@ class DrawSelection : public SwDrawBase
DrawSelection(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
};
diff --git a/sw/source/ui/inc/edtwin.hxx b/sw/source/ui/inc/edtwin.hxx
index b70a3f75aa96..3ca6259c41a4 100644
--- a/sw/source/ui/inc/edtwin.hxx
+++ b/sw/source/ui/inc/edtwin.hxx
@@ -60,23 +60,23 @@ class SwEditWin: public Window,
public DropTargetHelper, public DragSourceHelper
{
friend void ScrollMDI(ViewShell* pVwSh, const SwRect&,
- USHORT nRangeX, USHORT nRangeY);
-friend BOOL IsScrollMDI(ViewShell* pVwSh, const SwRect&);
+ sal_uInt16 nRangeX, sal_uInt16 nRangeY);
+friend sal_Bool IsScrollMDI(ViewShell* pVwSh, const SwRect&);
friend void SizeNotify(ViewShell* pVwSh, const Size &);
friend void PageNumNotify( ViewShell* pVwSh,
- USHORT nPhyNum,
- USHORT nVirtNum,
+ sal_uInt16 nPhyNum,
+ sal_uInt16 nVirtNum,
const String& rPg );
static QuickHelpData* pQuickHlpData;
- static BOOL bReplaceQuote;
+ static sal_Bool bReplaceQuote;
static long nDDStartPosX, nDDStartPosY;
static Color aTextColor; //Textfarbe, fuer die Giesskanne
- static BOOL bTransparentBackColor; // Hintergrund transparent
+ static sal_Bool bTransparentBackColor; // Hintergrund transparent
static Color aTextBackColor; //Texthintergrundfarbe, fuer die Giesskanne
/*
@@ -113,14 +113,14 @@ friend void PageNumNotify( ViewShell* pVwSh,
int aActHitType; // aktueller Mauspointer
- ULONG m_nDropFormat; //Format aus dem letzten QueryDrop
- USHORT m_nDropAction; //Action aus dem letzten QueryDrop
- USHORT m_nDropDestination; //Ziel aus dem letzten QueryDrop
+ sal_uLong m_nDropFormat; //Format aus dem letzten QueryDrop
+ sal_uInt16 m_nDropAction; //Action aus dem letzten QueryDrop
+ sal_uInt16 m_nDropDestination; //Ziel aus dem letzten QueryDrop
- UINT16 eBezierMode;
- UINT16 nInsFrmColCount; //Spaltenzahl fuer interaktiven Rahmen
+ sal_uInt16 eBezierMode;
+ sal_uInt16 nInsFrmColCount; //Spaltenzahl fuer interaktiven Rahmen
SdrObjKind eDrawMode;
- BOOL bLinkRemoved : 1,
+ sal_Bool bLinkRemoved : 1,
bMBPressed : 1,
bInsDraw : 1,
bInsFrm : 1,
@@ -142,8 +142,8 @@ friend void PageNumNotify( ViewShell* pVwSh,
bObjectSelect : 1;
- USHORT nKS_NUMDOWN_Count; // #i23725#
- USHORT nKS_NUMINDENTINC_Count;
+ sal_uInt16 nKS_NUMDOWN_Count; // #i23725#
+ sal_uInt16 nKS_NUMINDENTINC_Count;
void LeaveArea(const Point &);
void JustifyAreaTimer();
@@ -151,19 +151,19 @@ friend void PageNumNotify( ViewShell* pVwSh,
void RstMBDownFlags();
- void ChangeFly( BYTE nDir, BOOL bWeb = FALSE );
- void ChangeDrawing( BYTE nDir );
+ void ChangeFly( sal_uInt8 nDir, sal_Bool bWeb = sal_False );
+ void ChangeDrawing( sal_uInt8 nDir );
- BOOL EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos);
- BOOL RulerColumnDrag( const MouseEvent& rMEvt, BOOL bVerticalMode);
+ sal_Bool EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos);
+ sal_Bool RulerColumnDrag( const MouseEvent& rMEvt, sal_Bool bVerticalMode);
//Hilfsfunktionen fuer D&D
void DropCleanup();
void CleanupDropUserMarker();
- USHORT GetDropDestination( const Point& rPixPnt,
+ sal_uInt16 GetDropDestination( const Point& rPixPnt,
SdrObject ** ppObj = 0 );
//select the object/cursor at the mouse position of the context menu request
- BOOL SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos );
+ sal_Bool SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos );
/*
* Handler fuer das Weiterscrollen, wenn der Mauspointer innerhalb eines
@@ -217,45 +217,45 @@ protected:
SvxAutoCorrect* pACorr, sal_Bool bFromIME = sal_False );
public:
- void UpdatePointer(const Point &, USHORT nButtons = 0);
+ void UpdatePointer(const Point &, sal_uInt16 nButtons = 0);
- BOOL IsDrawSelMode();
- BOOL IsDrawAction() { return (bInsDraw); }
- void SetDrawAction(BOOL bFlag) { bInsDraw = bFlag; }
+ sal_Bool IsDrawSelMode();
+ sal_Bool IsDrawAction() { return (bInsDraw); }
+ void SetDrawAction(sal_Bool bFlag) { bInsDraw = bFlag; }
- void SetObjectSelect( BOOL bVal ) { bObjectSelect = bVal; }
- BOOL IsObjectSelect() const { return bObjectSelect; }
+ void SetObjectSelect( sal_Bool bVal ) { bObjectSelect = bVal; }
+ sal_Bool IsObjectSelect() const { return bObjectSelect; }
- inline SdrObjKind GetSdrDrawMode(/*BOOL bBuf = FALSE*/) const { return eDrawMode; }
- inline void SetSdrDrawMode( SdrObjKind eSdrObjectKind ) { eDrawMode = eSdrObjectKind; SetObjectSelect( FALSE ); }
- void StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect );
+ inline SdrObjKind GetSdrDrawMode(/*sal_Bool bBuf = sal_False*/) const { return eDrawMode; }
+ inline void SetSdrDrawMode( SdrObjKind eSdrObjectKind ) { eDrawMode = eSdrObjectKind; SetObjectSelect( sal_False ); }
+ void StdDrawMode( SdrObjKind eSdrObjectKind, sal_Bool bObjSelect );
- BOOL IsFrmAction() { return (bInsFrm); }
- inline UINT16 GetBezierMode() { return eBezierMode; }
- void SetBezierMode(UINT16 eBezMode) { eBezierMode = eBezMode; }
+ sal_Bool IsFrmAction() { return (bInsFrm); }
+ inline sal_uInt16 GetBezierMode() { return eBezierMode; }
+ void SetBezierMode(sal_uInt16 eBezMode) { eBezierMode = eBezMode; }
void EnterDrawTextMode(const Point& aDocPos); // DrawTextEditMode einschalten
- void InsFrm(USHORT nCols);
+ void InsFrm(sal_uInt16 nCols);
void StopInsFrm();
- UINT16 GetFrmColCount() const {return nInsFrmColCount;} //Spaltenzahl fuer interaktiven Rahmen
+ sal_uInt16 GetFrmColCount() const {return nInsFrmColCount;} //Spaltenzahl fuer interaktiven Rahmen
- void SetChainMode( BOOL bOn );
- BOOL IsChainMode() const { return bChainMode; }
+ void SetChainMode( sal_Bool bOn );
+ sal_Bool IsChainMode() const { return bChainMode; }
void FlushInBuffer();
- BOOL IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const;
+ sal_Bool IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const;
- static void SetReplaceQuote(BOOL bOn = TRUE) { bReplaceQuote = bOn; }
- static BOOL IsReplaceQuote() { return bReplaceQuote; }
+ static void SetReplaceQuote(sal_Bool bOn = sal_True) { bReplaceQuote = bOn; }
+ static sal_Bool IsReplaceQuote() { return bReplaceQuote; }
void SetApplyTemplate(const SwApplyTemplate &);
SwApplyTemplate* GetApplyTemplate() const { return pApplyTempl; }
void StartExecuteDrag();
void DragFinished();
- USHORT GetDropAction() const { return m_nDropAction; }
- ULONG GetDropFormat() const { return m_nDropFormat; }
+ sal_uInt16 GetDropAction() const { return m_nDropAction; }
+ sal_uLong GetDropFormat() const { return m_nDropFormat; }
Color GetTextColor() { return aTextColor; }
@@ -265,11 +265,11 @@ public:
{ return aTextBackColor; }
void SetTextBackColor(const Color& rCol )
{ aTextBackColor = rCol; }
- void SetTextBackColorTransparent(BOOL bSet)
+ void SetTextBackColorTransparent(sal_Bool bSet)
{ bTransparentBackColor = bSet; }
- BOOL IsTextBackColorTransparent()
+ sal_Bool IsTextBackColorTransparent()
{ return bTransparentBackColor; }
- void LockKeyInput(BOOL bSet){bLockInput = bSet;}
+ void LockKeyInput(sal_Bool bSet){bLockInput = bSet;}
const SwView &GetView() const { return rView; }
SwView &GetView() { return rView; }
@@ -289,7 +289,7 @@ public:
void StopQuickHelp();
// --> OD 2005-02-18 #i42921# - add parameter <bVerticalMode>
- BOOL RulerMarginDrag( const MouseEvent& rMEvt,
+ sal_Bool RulerMarginDrag( const MouseEvent& rMEvt,
const bool bVerticalMode );
// <--
diff --git a/sw/source/ui/inc/envimg.hxx b/sw/source/ui/inc/envimg.hxx
index a7cb66199100..659fe46892db 100644
--- a/sw/source/ui/inc/envimg.hxx
+++ b/sw/source/ui/inc/envimg.hxx
@@ -77,8 +77,8 @@ public:
virtual int operator ==(const SfxPoolItem& rItem) const;
virtual SfxPoolItem* Clone(SfxItemPool* = 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 SwEnvCfgItem -------------------------------------------------------
diff --git a/sw/source/ui/inc/envlop.hxx b/sw/source/ui/inc/envlop.hxx
index 849bb63b9d51..85f87c71d7c0 100644
--- a/sw/source/ui/inc/envlop.hxx
+++ b/sw/source/ui/inc/envlop.hxx
@@ -90,11 +90,11 @@ friend class SwEnvPreview;
SfxItemSet *pAddresseeSet;
SfxItemSet *pSenderSet;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
virtual short Ok();
public:
- SwEnvDlg(Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert);
+ SwEnvDlg(Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert);
~SwEnvDlg();
};
@@ -140,7 +140,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwEnvItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
};
diff --git a/sw/source/ui/inc/fldedt.hxx b/sw/source/ui/inc/fldedt.hxx
index 83f4b5b758f3..35b0b19be6c8 100644
--- a/sw/source/ui/inc/fldedt.hxx
+++ b/sw/source/ui/inc/fldedt.hxx
@@ -47,7 +47,7 @@ class SwFldEditDlg : public SfxSingleTabDialog
DECL_LINK( NextPrevHdl, Button *pBt = 0 );
void Init();
- SfxTabPage* CreatePage(USHORT nGroup);
+ SfxTabPage* CreatePage(sal_uInt16 nGroup);
public:
@@ -58,7 +58,7 @@ public:
virtual short Execute();
- void EnableInsert(BOOL bEnable);
+ void EnableInsert(sal_Bool bEnable);
void InsertHdl();
};
diff --git a/sw/source/ui/inc/fldmgr.hxx b/sw/source/ui/inc/fldmgr.hxx
index 33070131ae58..009084c633a2 100644
--- a/sw/source/ui/inc/fldmgr.hxx
+++ b/sw/source/ui/inc/fldmgr.hxx
@@ -68,8 +68,8 @@ enum SwFldGroups
struct SwFldGroupRgn
{
- USHORT nStart;
- USHORT nEnd;
+ sal_uInt16 nStart;
+ sal_uInt16 nEnd;
};
/*--------------------------------------------------------------------
@@ -78,21 +78,21 @@ struct SwFldGroupRgn
--------------------------------------------------------------------*/
struct SwInsertFld_Data
{
- USHORT nTypeId;
- USHORT nSubType;
+ sal_uInt16 nTypeId;
+ sal_uInt16 nSubType;
const String sPar1;
const String sPar2;
- ULONG nFormatId;
+ sal_uLong nFormatId;
SwWrtShell* pSh;
sal_Unicode cSeparator;
- BOOL bIsAutomaticLanguage;
+ sal_Bool bIsAutomaticLanguage;
::com::sun::star::uno::Any aDBDataSource;
::com::sun::star::uno::Any aDBConnection;
::com::sun::star::uno::Any aDBColumn;
Window* pParent; // parent dialog used for SwWrtShell::StartInputFldDlg()
- SwInsertFld_Data(USHORT nType, USHORT nSub, const String& rPar1, const String& rPar2,
- ULONG nFmtId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', BOOL bIsAutoLanguage = TRUE) :
+ SwInsertFld_Data(sal_uInt16 nType, sal_uInt16 nSub, const String& rPar1, const String& rPar2,
+ sal_uLong nFmtId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', sal_Bool bIsAutoLanguage = sal_True) :
nTypeId(nType),
nSubType(nSub),
sPar1(rPar1),
@@ -106,7 +106,7 @@ struct SwInsertFld_Data
SwInsertFld_Data() :
pSh(0),
cSeparator(' '),
- bIsAutomaticLanguage(TRUE){}
+ bIsAutomaticLanguage(sal_True){}
};
@@ -124,10 +124,10 @@ private:
String sMacroPath;
String sMacroName;
- ULONG nCurFmt;
- BOOL bEvalExp;
+ sal_uLong nCurFmt;
+ sal_Bool bEvalExp;
- SW_DLLPRIVATE USHORT GetCurrLanguage() const;
+ SW_DLLPRIVATE sal_uInt16 GetCurrLanguage() const;
com::sun::star::uno::Reference<com::sun::star::container::XNameAccess> xDBContext;
com::sun::star::uno::Reference<com::sun::star::text::XNumberingTypeInfo> xNumberingInfo;
@@ -141,83 +141,83 @@ public:
{ pWrtShell = pShell; }
// Feld einfuegen ueber TypeId (TYP_ ...)
- BOOL InsertFld( const SwInsertFld_Data& rData );
+ sal_Bool InsertFld( const SwInsertFld_Data& rData );
// Direkt das aktuelle Feld aendern
- void UpdateCurFld(ULONG nFormat,
+ void UpdateCurFld(sal_uLong nFormat,
const String& rPar1,
const String& rPar2,
SwField * _pField = 0); // #111840#
inline const String& GetCurFldPar1() const;
inline const String& GetCurFldPar2() const;
- inline ULONG GetCurFldFmt() const;
+ inline sal_uLong GetCurFldFmt() const;
// Ein Feld ermitteln
SwField* GetCurFld();
void InsertFldType(SwFieldType& rType);
- BOOL ChooseMacro(const String &rSelMacro = aEmptyStr);
+ sal_Bool ChooseMacro(const String &rSelMacro = aEmptyStr);
void SetMacroPath(const String& rPath);
inline const String& GetMacroPath() const { return (sMacroPath); }
inline const String& GetMacroName() const { return (sMacroName); }
inline void SetMacroModule(SbModule* pMod) { pModule = pMod; }
// Vorheriger Naechster gleichen Typ
- BOOL GoNextPrev( BOOL bNext = TRUE, SwFieldType* pTyp = 0 );
- BOOL GoNext( SwFieldType* pTyp = 0 ) { return GoNextPrev( TRUE, pTyp ); }
- BOOL GoPrev( SwFieldType* pTyp = 0 ) { return GoNextPrev( FALSE, pTyp ); }
+ sal_Bool GoNextPrev( sal_Bool bNext = sal_True, SwFieldType* pTyp = 0 );
+ sal_Bool GoNext( SwFieldType* pTyp = 0 ) { return GoNextPrev( sal_True, pTyp ); }
+ sal_Bool GoPrev( SwFieldType* pTyp = 0 ) { return GoNextPrev( sal_False, pTyp ); }
// Erfragen von Werten aus Datenbankfeldern (BASIC )
// String GetDataBaseFieldValue(const String &rDBName, const String &rFieldName, SwWrtShell* pSh);
- BOOL IsDBNumeric(const String& rDBName, const String& rTblQryName,
- BOOL bIsTable, const String& rFldName);
+ sal_Bool IsDBNumeric(const String& rDBName, const String& rTblQryName,
+ sal_Bool bIsTable, const String& rFldName);
// RefMark mit Namen organisieren
- BOOL CanInsertRefMark( const String& rStr );
+ sal_Bool CanInsertRefMark( const String& rStr );
// Zugriff ueber ResId auf Feldtypen
- USHORT GetFldTypeCount(USHORT nResId = USHRT_MAX) const;
- SwFieldType* GetFldType(USHORT nResId, USHORT nId = 0) const;
- SwFieldType* GetFldType(USHORT nResId, const String& rName) const;
+ sal_uInt16 GetFldTypeCount(sal_uInt16 nResId = USHRT_MAX) const;
+ SwFieldType* GetFldType(sal_uInt16 nResId, sal_uInt16 nId = 0) const;
+ SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName) const;
- void RemoveFldType(USHORT nResId, const String& rName);
+ void RemoveFldType(sal_uInt16 nResId, const String& rName);
// Zugriff ueber TypeId aus dem Dialog
// Ids fuer einen Bereich von Feldern
- const SwFldGroupRgn& GetGroupRange(BOOL bHtmlMode, USHORT nGrpId) const;
- USHORT GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType = 0) const;
+ const SwFldGroupRgn& GetGroupRange(sal_Bool bHtmlMode, sal_uInt16 nGrpId) const;
+ sal_uInt16 GetGroup(sal_Bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType = 0) const;
// TypeId des aktuellen Feldes
- USHORT GetCurTypeId() const;
+ sal_uInt16 GetCurTypeId() const;
// TypeId fuer einen konkrete Pos in der Liste
- static USHORT GetTypeId(USHORT nPos);
+ static sal_uInt16 GetTypeId(sal_uInt16 nPos);
// Name des Typen in der Liste der Felder
- static const String& GetTypeStr(USHORT nPos);
+ static const String& GetTypeStr(sal_uInt16 nPos);
// Pos in der Liste der Felder
- static USHORT GetPos(USHORT nTypeId);
+ static sal_uInt16 GetPos(sal_uInt16 nTypeId);
// Untertypen zu einem Typ
- BOOL GetSubTypes(USHORT nId, SvStringsDtor& rToFill);
+ sal_Bool GetSubTypes(sal_uInt16 nId, SvStringsDtor& rToFill);
// Formate zu einem Typ
- USHORT GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode = FALSE) const;
- String GetFormatStr(USHORT nTypeId, ULONG nFormatId) const;
- USHORT GetFormatId(USHORT nTypeId, ULONG nFormatId) const;
- ULONG GetDefaultFormat(USHORT nTypeId, BOOL bIsText, SvNumberFormatter* pFormatter, double* pVal = 0L);
+ sal_uInt16 GetFormatCount(sal_uInt16 nTypeId, sal_Bool bIsText, sal_Bool bHtmlMode = sal_False) const;
+ String GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const;
+ sal_uInt16 GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const;
+ sal_uLong GetDefaultFormat(sal_uInt16 nTypeId, sal_Bool bIsText, SvNumberFormatter* pFormatter, double* pVal = 0L);
// Evaluierung der ExpressionFelder ausschalten fuer das Einfuegen
// vieler Expressionfelder (siehe Etiketten)
//
- inline void SetEvalExpFlds(BOOL bEval);
+ inline void SetEvalExpFlds(sal_Bool bEval);
void EvalExpFlds(SwWrtShell* pSh = NULL);
};
-inline void SwFldMgr::SetEvalExpFlds(BOOL bEval)
+inline void SwFldMgr::SetEvalExpFlds(sal_Bool bEval)
{ bEvalExp = bEval; }
inline const String& SwFldMgr::GetCurFldPar1() const
@@ -226,7 +226,7 @@ inline const String& SwFldMgr::GetCurFldPar1() const
inline const String& SwFldMgr::GetCurFldPar2() const
{ return aCurPar2; }
-inline ULONG SwFldMgr::GetCurFldFmt() const
+inline sal_uLong SwFldMgr::GetCurFldFmt() const
{ return nCurFmt; }
diff --git a/sw/source/ui/inc/fldtdlg.hxx b/sw/source/ui/inc/fldtdlg.hxx
index cacc2e0a6183..9ee45e91cbe8 100644
--- a/sw/source/ui/inc/fldtdlg.hxx
+++ b/sw/source/ui/inc/fldtdlg.hxx
@@ -41,16 +41,16 @@ class SwFldDlg: public SfxTabDialog
{
SwChildWinWrapper* m_pChildWin;
SfxBindings* m_pBindings;
- BOOL m_bHtmlMode;
- BOOL m_bDataBaseMode;
+ sal_Bool m_bHtmlMode;
+ sal_Bool m_bDataBaseMode;
- virtual BOOL Close();
- virtual SfxItemSet* CreateInputItemSet( USHORT nId );
+ virtual sal_Bool Close();
+ virtual SfxItemSet* CreateInputItemSet( sal_uInt16 nId );
virtual void Activate();
- virtual void PageCreated(USHORT nId, SfxTabPage& rPage);
+ virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage);
- void ReInitTabPage( USHORT nPageId,
- BOOL bOnlyActivate = FALSE );
+ void ReInitTabPage( sal_uInt16 nPageId,
+ sal_Bool bOnlyActivate = sal_False );
public:
SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent);
@@ -60,7 +60,7 @@ public:
void Initialize(SfxChildWinInfo *pInfo);
void ReInitDlg();
- void EnableInsert(BOOL bEnable);
+ void EnableInsert(sal_Bool bEnable);
void InsertHdl();
void ActivateDatabasePage();
};
diff --git a/sw/source/ui/inc/fldwrap.hxx b/sw/source/ui/inc/fldwrap.hxx
index 12ed8743ccfd..9d8435e60bfc 100644
--- a/sw/source/ui/inc/fldwrap.hxx
+++ b/sw/source/ui/inc/fldwrap.hxx
@@ -34,13 +34,13 @@ class SwFldDlgWrapper : public SwChildWinWrapper
{
public:
AbstractSwFldDlg * pDlgInterface;
- SwFldDlgWrapper( Window* pParent, USHORT nId,
+ SwFldDlgWrapper( Window* pParent, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo );
SFX_DECL_CHILDWINDOW(SwFldDlgWrapper);
- virtual BOOL ReInitDlg(SwDocShell *pDocSh);
- void ShowPage(USHORT nPage = 0);
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
+ void ShowPage(sal_uInt16 nPage = 0);
};
/* -----------------04.02.2003 14:14-----------------
* field dialog only showing database page to support
@@ -50,12 +50,12 @@ class SwFldDataOnlyDlgWrapper : public SwChildWinWrapper
{
public:
AbstractSwFldDlg * pDlgInterface;
- SwFldDataOnlyDlgWrapper( Window* pParent, USHORT nId,
+ SwFldDataOnlyDlgWrapper( Window* pParent, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo );
SFX_DECL_CHILDWINDOW(SwFldDataOnlyDlgWrapper);
- virtual BOOL ReInitDlg(SwDocShell *pDocSh);
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
};
diff --git a/sw/source/ui/inc/fontcfg.hxx b/sw/source/ui/inc/fontcfg.hxx
index 71cbdf3ad5d2..23f585863a07 100644
--- a/sw/source/ui/inc/fontcfg.hxx
+++ b/sw/source/ui/inc/fontcfg.hxx
@@ -68,7 +68,7 @@ class SW_DLLPUBLIC SwStdFontConfig : public utl::ConfigItem
SW_DLLPRIVATE com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
- void ChangeString(USHORT nFontType, const String& rSet)
+ void ChangeString(sal_uInt16 nFontType, const String& rSet)
{
if(sDefaultFonts[nFontType] != rSet)
{
@@ -77,7 +77,7 @@ class SW_DLLPUBLIC SwStdFontConfig : public utl::ConfigItem
}
}
- void ChangeInt( USHORT nFontType, sal_Int32 nHeight );
+ void ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight );
public:
SwStdFontConfig();
@@ -92,8 +92,8 @@ public:
const String& GetFontCaption(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_CAPTION + FONT_PER_GROUP * nFontGroup];}
const String& GetFontIndex (sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_INDEX + FONT_PER_GROUP * nFontGroup];}
- const String& GetFontFor(USHORT nFontType) const {return sDefaultFonts[nFontType];}
- BOOL IsFontDefault(USHORT nFontType) const;
+ const String& GetFontFor(sal_uInt16 nFontType) const {return sDefaultFonts[nFontType];}
+ sal_Bool IsFontDefault(sal_uInt16 nFontType) const;
void SetFontStandard(const String& rSet, sal_uInt8 nFontGroup)
{ChangeString(FONT_STANDARD + FONT_PER_GROUP * nFontGroup, rSet);}
@@ -112,8 +112,8 @@ public:
sal_Int32 GetFontHeight( sal_uInt8 nFont, sal_uInt8 nScriptType, LanguageType eLang );
- static String GetDefaultFor(USHORT nFontType, LanguageType eLang);
- static sal_Int32 GetDefaultHeightFor(USHORT nFontType, LanguageType eLang);
+ static String GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang);
+ static sal_Int32 GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang);
};
#endif
diff --git a/sw/source/ui/inc/formedt.hxx b/sw/source/ui/inc/formedt.hxx
index c039fe512599..333f76f093ae 100644
--- a/sw/source/ui/inc/formedt.hxx
+++ b/sw/source/ui/inc/formedt.hxx
@@ -89,14 +89,14 @@ class SwIdxFormDlg : public SvxStandardDialog
SwWrtShell &rSh;
SwForm *pForm;
- USHORT nAktLevel;
- BOOL bLastLinkIsEnd;
+ sal_uInt16 nAktLevel;
+ sal_Bool bLastLinkIsEnd;
public:
SwIdxFormDlg( Window* pParent, SwWrtShell &rShell, const SwForm& rForm );
~SwIdxFormDlg();
- static BOOL IsNoNum(SwWrtShell& rSh, const String& rName);
+ static sal_Bool IsNoNum(SwWrtShell& rSh, const String& rName);
const SwForm& GetTOXForm();
};
diff --git a/sw/source/ui/inc/frmdlg.hxx b/sw/source/ui/inc/frmdlg.hxx
index decce61e2606..69d17759b625 100644
--- a/sw/source/ui/inc/frmdlg.hxx
+++ b/sw/source/ui/inc/frmdlg.hxx
@@ -38,24 +38,24 @@ class SwWrtShell;
class SwFrmDlg : public SfxTabDialog
{
- BOOL m_bFormat;
- BOOL m_bNew;
- BOOL m_bHTMLMode;
+ sal_Bool m_bFormat;
+ sal_Bool m_bNew;
+ sal_Bool m_bHTMLMode;
bool m_bEnableVertPos;
const SfxItemSet& m_rSet;
- USHORT m_nDlgType;
+ sal_uInt16 m_nDlgType;
SwWrtShell* m_pWrtShell;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
SwFrmDlg( 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);
~SwFrmDlg();
diff --git a/sw/source/ui/inc/frmmgr.hxx b/sw/source/ui/inc/frmmgr.hxx
index 9664c484b0f3..8a38df73a1bd 100644
--- a/sw/source/ui/inc/frmmgr.hxx
+++ b/sw/source/ui/inc/frmmgr.hxx
@@ -62,9 +62,9 @@ class SW_DLLPUBLIC SwFlyFrmAttrMgr
Point aAbsPos;
SwWrtShell *pOwnSh;
- BOOL bAbsPos,
+ sal_Bool bAbsPos,
bNewFrm;
- BOOL bIsInVertical;
+ sal_Bool bIsInVertical;
// interne Verrechnung fuer Umrandung
SW_DLLPRIVATE SwTwips CalcTopSpace();
@@ -75,10 +75,10 @@ class SW_DLLPUBLIC SwFlyFrmAttrMgr
SW_DLLPRIVATE void _UpdateFlyFrm(); //Nacharbeit nach Einfuegen oder Update
public:
- SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType );
+ SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, sal_uInt8 nType );
//CopyCtor fuer die Dialoge, zum Pruefen der Metrics
- SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell *pSh, const SfxItemSet &rSet );
+ SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell *pSh, const SfxItemSet &rSet );
inline SwWrtShell* GetShell() { return pOwnSh; }
@@ -99,7 +99,7 @@ public:
void SetSize(const Size& rLSize);
inline const Size& GetSize() const;
- inline USHORT GetHeightPercent() const;
+ inline sal_uInt16 GetHeightPercent() const;
void SetHeightSizeType(SwFrmSize eType);
@@ -116,18 +116,18 @@ public:
void UpdateFlyFrm();
// neuen Rahmen erzeugen
- BOOL InsertFlyFrm();
+ sal_Bool InsertFlyFrm();
void InsertFlyFrm(RndStdIds eAnchorType,
const Point &rPos,
const Size &rSize,
- BOOL bAbsPos = FALSE);
+ sal_Bool bAbsPos = sal_False);
// Metriken pruefen und aendern
void ValidateMetrics(SvxSwFrameValidation& rVal,
const SwPosition* pToCharCntntPos,
- BOOL bOnlyPercentRefValue = FALSE);
+ sal_Bool bOnlyPercentRefValue = sal_False);
- void DelAttr(USHORT nId);
+ void DelAttr(sal_uInt16 nId);
// Set rausreichen
inline const SfxItemSet &GetAttrSet() const { return aSet; }
@@ -185,7 +185,7 @@ inline RndStdIds SwFlyFrmAttrMgr::GetAnchor() const
return ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetAnchorId();
}
-inline USHORT SwFlyFrmAttrMgr::GetHeightPercent() const
+inline sal_uInt16 SwFlyFrmAttrMgr::GetHeightPercent() const
{
return GetFrmSize().GetHeightPercent();
}
diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx
index 979f5cf12dd6..0af7ae0b1602 100644
--- a/sw/source/ui/inc/frmpage.hxx
+++ b/sw/source/ui/inc/frmpage.hxx
@@ -101,18 +101,18 @@ class SwFrmPage: public SfxTabPage
//'string provider'
SvxSwFramePosString aFramePosString;
- BOOL bAtHorzPosModified;
- BOOL bAtVertPosModified;
-
- BOOL bFormat;
- BOOL bNew;
- BOOL bNoModifyHdl;
- BOOL bVerticalChanged; //check done whether frame is in vertical environment
- BOOL bIsVerticalFrame; //current frame is in vertical environment - strings are exchanged
- BOOL bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged
- BOOL bHtmlMode;
- USHORT nHtmlMode;
- USHORT nDlgType;
+ sal_Bool bAtHorzPosModified;
+ sal_Bool bAtVertPosModified;
+
+ sal_Bool bFormat;
+ sal_Bool bNew;
+ sal_Bool bNoModifyHdl;
+ sal_Bool bVerticalChanged; //check done whether frame is in vertical environment
+ sal_Bool bIsVerticalFrame; //current frame is in vertical environment - strings are exchanged
+ sal_Bool bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged
+ sal_Bool bHtmlMode;
+ sal_uInt16 nHtmlMode;
+ sal_uInt16 nDlgType;
Size aGrfSize;
Size aWrap;
SwTwips nUpperBorder;
@@ -144,8 +144,8 @@ class SwFrmPage: public SfxTabPage
DECL_LINK( AnchorTypeHdl, RadioButton * );
DECL_LINK( PosHdl, ListBox * );
DECL_LINK( RelHdl, ListBox * );
- void InitPos(RndStdIds eId, USHORT nH, USHORT nHRel,
- USHORT nV, USHORT nVRel,
+ void InitPos(RndStdIds eId, sal_uInt16 nH, sal_uInt16 nHRel,
+ sal_uInt16 nV, sal_uInt16 nVRel,
long nX, long nY);
DECL_LINK( RealSizeHdl, Button * );
@@ -159,23 +159,23 @@ class SwFrmPage: public SfxTabPage
void UpdateExample();
DECL_LINK( ModifyHdl, Edit * );
- void Init(const SfxItemSet& rSet, BOOL bReset = FALSE);
+ void Init(const SfxItemSet& rSet, sal_Bool bReset = sal_False);
// OD 12.11.2003 #i22341# - adjustment to handle maps, that are ambigous
// in the alignment.
- USHORT FillPosLB( const FrmMap* _pMap,
- const USHORT _nAlign,
- const USHORT _nRel,
+ sal_uInt16 FillPosLB( const FrmMap* _pMap,
+ const sal_uInt16 _nAlign,
+ const sal_uInt16 _nRel,
ListBox& _rLB );
// OD 14.11.2003 #i22341# - adjustment to handle maps, that are ambigous
// in their string entries.
- ULONG FillRelLB( const FrmMap* _pMap,
- const USHORT _nLBSelPos,
- const USHORT _nAlign,
- USHORT _nRel,
+ sal_uLong FillRelLB( const FrmMap* _pMap,
+ const sal_uInt16 _nLBSelPos,
+ const sal_uInt16 _nAlign,
+ sal_uInt16 _nRel,
ListBox& _rLB,
FixedText& _rFT );
- USHORT GetMapPos( const FrmMap *pMap, ListBox &rAlignLB );
- short GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &rAlignLB, ListBox &rRelationLB);
+ sal_uInt16 GetMapPos( const FrmMap *pMap, ListBox &rAlignLB );
+ short GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB);
short GetRelation(FrmMap *pMap, ListBox &rRelationLB);
RndStdIds GetAnchor();
@@ -190,15 +190,15 @@ class SwFrmPage: public SfxTabPage
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
- void SetNewFrame(BOOL bNewFrame) { bNew = bNewFrame; }
- void SetFormatUsed(BOOL bFmt);
- void SetFrmType(USHORT nType) { nDlgType = nType; }
- inline BOOL IsInGraficMode( void ) { return nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE; }
+ void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
+ void SetFormatUsed(sal_Bool bFmt);
+ void SetFrmType(sal_uInt16 nType) { nDlgType = nType; }
+ inline sal_Bool IsInGraficMode( void ) { return nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE; }
void EnableVerticalPositioning( bool bEnable );
};
@@ -223,7 +223,7 @@ class SwGrfExtPage: public SfxTabPage
::sfx2::FileDialogHelper* pGrfDlg;
- BOOL bHtmlMode;
+ sal_Bool bHtmlMode;
// Handler fuer Spiegeln
DECL_LINK( MirrorHdl, CheckBox * );
@@ -240,7 +240,7 @@ public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
virtual int DeactivatePage(SfxItemSet *pSet);
};
@@ -276,7 +276,7 @@ public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
};
@@ -310,10 +310,10 @@ class SwFrmAddPage : public SfxTabPage
SwWrtShell* pWrtSh;
- USHORT nDlgType;
- BOOL bHtmlMode;
- BOOL bFormat;
- BOOL bNew;
+ sal_uInt16 nDlgType;
+ sal_Bool bHtmlMode;
+ sal_Bool bFormat;
+ sal_Bool bNew;
DECL_LINK(EditModifyHdl, Edit*);
DECL_LINK(ChainModifyHdl, ListBox*);
@@ -324,14 +324,14 @@ class SwFrmAddPage : public SfxTabPage
public:
static SfxTabPage* Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
- void SetFormatUsed(BOOL bFmt);
- void SetFrmType(USHORT nType) { nDlgType = nType; }
- void SetNewFrame(BOOL bNewFrame) { bNew = bNewFrame; }
+ void SetFormatUsed(sal_Bool bFmt);
+ void SetFrmType(sal_uInt16 nType) { nDlgType = nType; }
+ void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; }
};
diff --git a/sw/source/ui/inc/glosbib.hxx b/sw/source/ui/inc/glosbib.hxx
index c96e4177027b..e547ad831889 100644
--- a/sw/source/ui/inc/glosbib.hxx
+++ b/sw/source/ui/inc/glosbib.hxx
@@ -97,7 +97,7 @@ class SwGlossaryGroupDlg : public SvxStandardDialog
String sCreatedGroup;
- BOOL IsDeleteAllowed(const String &rGroup);
+ sal_Bool IsDeleteAllowed(const String &rGroup);
protected:
virtual void Apply();
diff --git a/sw/source/ui/inc/glosdoc.hxx b/sw/source/ui/inc/glosdoc.hxx
index 1436c7fe8db9..ff7c01ee0b88 100644
--- a/sw/source/ui/inc/glosdoc.hxx
+++ b/sw/source/ui/inc/glosdoc.hxx
@@ -67,9 +67,9 @@ class SW_DLLPUBLIC SwGlossaries
String m_sErrPath;
SvStrings *m_pPathArr;
SvStrings *m_pGlosArr;
- BOOL m_bError;
+ sal_Bool m_bError;
- SW_DLLPRIVATE SwTextBlocks* GetGlosDoc(const String &rName, BOOL bCreate = TRUE) const;
+ SW_DLLPRIVATE SwTextBlocks* GetGlosDoc(const String &rName, sal_Bool bCreate = sal_True) const;
SW_DLLPRIVATE SvStrings *GetNameList();
// implementation in unoatxt.cxx
@@ -118,14 +118,14 @@ public:
bool _bCreate = false
);
- USHORT GetGroupCnt();
- String GetGroupName(USHORT );
+ sal_uInt16 GetGroupCnt();
+ String GetGroupName(sal_uInt16 );
String GetGroupTitle( const String& rGroupName );
- BOOL FindGroupName(String & rGroup);
+ sal_Bool FindGroupName(String & rGroup);
SwTextBlocks* GetGroupDoc(const String &rName,
- BOOL bCreate = FALSE) const;
+ sal_Bool bCreate = sal_False) const;
SwTextBlocks* GetDefGroupDoc() const {return GetGroupDoc(GetDefName());}
void PutGroupDoc(SwTextBlocks *pBlock);
static String GetDefName();
@@ -133,14 +133,14 @@ public:
String GetCompleteGroupName( const ::rtl::OUString& GroupName );
- BOOL NewGroupDoc(String &rGroupName, const String& rTitle);
- BOOL RenameGroupDoc(const String& sOldGroup, String& sNewGroup, const String& rNewTitle);
- BOOL DelGroupDoc(const String &);
- SwDocShellRef EditGroupDoc(const String &rGrpName, const String& rShortName, BOOL bShow = TRUE );
+ sal_Bool NewGroupDoc(String &rGroupName, const String& rTitle);
+ sal_Bool RenameGroupDoc(const String& sOldGroup, String& sNewGroup, const String& rNewTitle);
+ sal_Bool DelGroupDoc(const String &);
+ SwDocShellRef EditGroupDoc(const String &rGrpName, const String& rShortName, sal_Bool bShow = sal_True );
void SaveGroupDoc(const String &rGrpName, const String& rLongName );
- void UpdateGlosPath(BOOL bFull);
+ void UpdateGlosPath(sal_Bool bFull);
void ShowError();
- inline ULONG IsGlosPathErr() { return m_bError; }
+ inline sal_uLong IsGlosPathErr() { return m_bError; }
const SvStrings* GetPathArray() const {return m_pPathArr;}
};
diff --git a/sw/source/ui/inc/gloshdl.hxx b/sw/source/ui/inc/gloshdl.hxx
index df9e610f4b9a..9bda46e4afef 100644
--- a/sw/source/ui/inc/gloshdl.hxx
+++ b/sw/source/ui/inc/gloshdl.hxx
@@ -50,42 +50,42 @@ class SW_DLLPUBLIC SwGlossaryHdl
const SvxMacro *pStart,
const SvxMacro *pEnd);
- SW_DLLPRIVATE BOOL Expand( const String& rShortName,
+ SW_DLLPRIVATE sal_Bool Expand( const String& rShortName,
SwGlossaries* pGlossaries,
SwTextBlocks *pGlossary );
public:
- BOOL ConvertToNew(SwTextBlocks& rOld);
+ sal_Bool ConvertToNew(SwTextBlocks& rOld);
void GlossaryDlg();
- USHORT GetGroupCnt() const;
- String GetGroupName( USHORT, String* pTitle = 0 );
- BOOL NewGroup(String & rGroupName, const String& rTitle);
- BOOL DelGroup(const String &);
- BOOL RenameGroup(const String & rOld, String& rNew, const String& rNewTitle);
- void SetCurGroup(const String &aGrp, BOOL bApi = FALSE, BOOL bAlwaysCreateNew = FALSE);
+ sal_uInt16 GetGroupCnt() const;
+ String GetGroupName( sal_uInt16, String* pTitle = 0 );
+ sal_Bool NewGroup(String & rGroupName, const String& rTitle);
+ sal_Bool DelGroup(const String &);
+ sal_Bool RenameGroup(const String & rOld, String& rNew, const String& rNewTitle);
+ void SetCurGroup(const String &aGrp, sal_Bool bApi = sal_False, sal_Bool bAlwaysCreateNew = sal_False);
const String &GetCurGroup() const { return aCurGrp; }
- USHORT GetGlossaryCnt();
- String GetGlossaryName(USHORT);
+ sal_uInt16 GetGlossaryCnt();
+ String GetGlossaryName(sal_uInt16);
String GetGlossaryShortName(const String &rName);
- String GetGlossaryShortName(USHORT);
+ String GetGlossaryShortName(sal_uInt16);
- BOOL Rename( const String& rOldShortName, const String& rNewShortName,
+ sal_Bool Rename( const String& rOldShortName, const String& rNewShortName,
const String& rNewName);
- BOOL CopyOrMove( const String& rSourceGroupName, String& rSourceShortName,
- const String& rDestGroupName, const String& rLongName, BOOL bMove );
- BOOL HasShortName(const String &rShortName) const;
+ sal_Bool CopyOrMove( const String& rSourceGroupName, String& rSourceShortName,
+ const String& rDestGroupName, const String& rLongName, sal_Bool bMove );
+ sal_Bool HasShortName(const String &rShortName) const;
//wird NewGlossary vom Basic gerufen, dann soll dir zuvor eingestellte
//Gruppe ggf. neu erstellt werden
- BOOL NewGlossary(const String &rName, const String &rShortName,
- BOOL bApiCall = FALSE, BOOL bNoAttr = FALSE );
- BOOL DelGlossary(const String&);
- BOOL CopyToClipboard(SwWrtShell& rSh, const String& rShortName);
+ sal_Bool NewGlossary(const String &rName, const String &rShortName,
+ sal_Bool bApiCall = sal_False, sal_Bool bNoAttr = sal_False );
+ sal_Bool DelGlossary(const String&);
+ sal_Bool CopyToClipboard(SwWrtShell& rSh, const String& rShortName);
- BOOL ExpandGlossary();
- BOOL InsertGlossary(const String &rName);
+ sal_Bool ExpandGlossary();
+ sal_Bool InsertGlossary(const String &rName);
void SetMacros(const String& rName,
const SvxMacro* pStart,
@@ -96,12 +96,12 @@ public:
SvxMacro& rEnd,
SwTextBlocks* pGlossary = 0 );
- BOOL IsReadOnly( const String* = 0 ) const;
- BOOL IsOld() const;
+ sal_Bool IsReadOnly( const String* = 0 ) const;
+ sal_Bool IsOld() const;
- BOOL FindGroupName(String & rGroup); // Gruppe ohne Pfadindex finden
+ sal_Bool FindGroupName(String & rGroup); // Gruppe ohne Pfadindex finden
- BOOL ImportGlossaries( const String& rName );
+ sal_Bool ImportGlossaries( const String& rName );
SwGlossaryHdl(SfxViewFrame* pViewFrame, SwWrtShell *);
~SwGlossaryHdl();
diff --git a/sw/source/ui/inc/gloslst.hxx b/sw/source/ui/inc/gloslst.hxx
index 52654c84b865..676c3f3c4afd 100644
--- a/sw/source/ui/inc/gloslst.hxx
+++ b/sw/source/ui/inc/gloslst.hxx
@@ -39,7 +39,7 @@ class SvStringsISortDtor;
struct AutoTextGroup
{
- USHORT nCount;
+ sal_uInt16 nCount;
String sName;
String sTitle;
String sLongNames; // durch 0x0A getrennte Langnamen
@@ -55,7 +55,7 @@ class SwGlossaryList : public AutoTimer
{
AutoTextGroups aGroupArr;
String sPath;
- BOOL bFilled;
+ sal_Bool bFilled;
AutoTextGroup* FindGroup(const String& rGroupName);
void FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGloss);
@@ -64,14 +64,14 @@ public:
SwGlossaryList();
~SwGlossaryList();
- BOOL HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames );
- BOOL GetShortName(const String& rLongName,
+ sal_Bool HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames );
+ sal_Bool GetShortName(const String& rLongName,
String& rShortName, String& rGroupName );
- USHORT GetGroupCount();
- String GetGroupName(USHORT nPos, BOOL bNoPath = TRUE, String* pTitle = 0);
- USHORT GetBlockCount(USHORT nGroup);
- String GetBlockName(USHORT nGroup, USHORT nBlock, String& rShortName);
+ sal_uInt16 GetGroupCount();
+ String GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath = sal_True, String* pTitle = 0);
+ sal_uInt16 GetBlockCount(sal_uInt16 nGroup);
+ String GetBlockName(sal_uInt16 nGroup, sal_uInt16 nBlock, String& rShortName);
void Update();
diff --git a/sw/source/ui/inc/glossary.hxx b/sw/source/ui/inc/glossary.hxx
index 3c6ce003ca8f..11328575fa4c 100644
--- a/sw/source/ui/inc/glossary.hxx
+++ b/sw/source/ui/inc/glossary.hxx
@@ -87,12 +87,12 @@ class SwGlTreeListBox : public SvTreeListBox
virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos);
+ sal_uLong& rNewChildPos);
public:
SwGlTreeListBox(Window* pParent, const ResId& rResId);
@@ -136,7 +136,7 @@ class SwGlossaryDlg : public SvxStandardDialog
String sResumeGroup;
String sResumeShortName;
- BOOL bResume;
+ sal_Bool bResume;
const sal_Bool bSelection : 1;
@@ -167,11 +167,11 @@ class SwGlossaryDlg : public SvxStandardDialog
void ShowAutoText(const String& rGroup, const String& rShortName);
void ResumeShowAutoText();
- BOOL GetResumeData(String& rGroup, String& rShortName)
+ sal_Bool GetResumeData(String& rGroup, String& rShortName)
{rGroup = sResumeGroup; rShortName = sResumeShortName; return bResume;}
void SetResumeData(const String& rGroup, const String& rShortName)
- {sResumeGroup = rGroup; sResumeShortName = rShortName; bResume = TRUE;}
- void ResetResumeData() {bResume = FALSE;}
+ {sResumeGroup = rGroup; sResumeShortName = rShortName; bResume = sal_True;}
+ void ResetResumeData() {bResume = sal_False;}
public:
SwGlossaryDlg(SfxViewFrame* pViewFrame, SwGlossaryHdl* pGlosHdl, SwWrtShell *pWrtShell);
~SwGlossaryDlg();
diff --git a/sw/source/ui/inc/glshell.hxx b/sw/source/ui/inc/glshell.hxx
index ac97aa7a7f70..85f01396910e 100644
--- a/sw/source/ui/inc/glshell.hxx
+++ b/sw/source/ui/inc/glshell.hxx
@@ -38,7 +38,7 @@ class SwGlosDocShell : public SwDocShell
using SotObject::GetInterface;
protected:
- virtual BOOL Save();
+ virtual sal_Bool Save();
public:
@@ -69,7 +69,7 @@ class SwWebGlosDocShell : public SwWebDocShell
using SotObject::GetInterface;
protected:
- virtual BOOL Save();
+ virtual sal_Bool Save();
public:
diff --git a/sw/source/ui/inc/initui.hxx b/sw/source/ui/inc/initui.hxx
index 0a81e53f6149..6c5b5b694445 100644
--- a/sw/source/ui/inc/initui.hxx
+++ b/sw/source/ui/inc/initui.hxx
@@ -67,7 +67,7 @@ SW_DLLPUBLIC SwGlossaries* GetGlossaries();
class SwGlossaryList;
-BOOL HasGlossaryList();
+sal_Bool HasGlossaryList();
SwGlossaryList* GetGlossaryList();
extern void _InitUI();
diff --git a/sw/source/ui/inc/inpdlg.hxx b/sw/source/ui/inc/inpdlg.hxx
index f0c2f13cc6bc..f2ed1b22f0d4 100644
--- a/sw/source/ui/inc/inpdlg.hxx
+++ b/sw/source/ui/inc/inpdlg.hxx
@@ -70,7 +70,7 @@ class SwFldInputDlg: public SvxStandardDialog
DECL_LINK(NextHdl, PushButton*);
public:
SwFldInputDlg( Window *pParent, SwWrtShell &rSh,
- SwField* pField, BOOL bNextButton = FALSE );
+ SwField* pField, sal_Bool bNextButton = sal_False );
~SwFldInputDlg();
};
diff --git a/sw/source/ui/inc/inputwin.hxx b/sw/source/ui/inc/inputwin.hxx
index 8693572d167f..317fb8697295 100644
--- a/sw/source/ui/inc/inputwin.hxx
+++ b/sw/source/ui/inc/inputwin.hxx
@@ -72,15 +72,15 @@ friend class InputEdit;
SwView* pView;
SfxBindings* pBindings;
String aAktTableName, sOldFml;
- USHORT nActionCnt;
+ sal_uInt16 nActionCnt;
- BOOL bFirst : 1; //Initialisierungen beim ersten Aufruf
- BOOL bActive : 1; //fuer Hide/Show beim Dokumentwechsel
- BOOL bIsTable : 1;
- BOOL bDelSel : 1;
- BOOL bDoesUndo : 1;
- BOOL bResetUndo : 1;
- BOOL bCallUndo : 1;
+ sal_Bool bFirst : 1; //Initialisierungen beim ersten Aufruf
+ sal_Bool bActive : 1; //fuer Hide/Show beim Dokumentwechsel
+ sal_Bool bIsTable : 1;
+ sal_Bool bDelSel : 1;
+ sal_Bool bDoesUndo : 1;
+ sal_Bool bResetUndo : 1;
+ sal_Bool bCallUndo : 1;
void DelBoxCntnt();
@@ -106,26 +106,26 @@ public:
void ShowWin();
- BOOL IsActive(){ return bActive; };
+ sal_Bool IsActive(){ return bActive; };
DECL_LINK( SelTblCellsNotify, SwWrtShell * );
- void SetFormula( const String& rFormula, BOOL bDelSel = TRUE );
+ void SetFormula( const String& rFormula, sal_Bool bDelSel = sal_True );
const SwView* GetView() const{return pView;}
};
class SwInputChild : public SfxChildWindow
{
- BOOL bObjVis;
+ sal_Bool bObjVis;
SfxDispatcher* pDispatch;
public:
SwInputChild( Window* ,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings*,
SfxChildWinInfo* );
~SwInputChild();
SFX_DECL_CHILDWINDOW( SwInputChild );
- void SetFormula( const String& rFormula, BOOL bDelSel = TRUE )
+ void SetFormula( const String& rFormula, sal_Bool bDelSel = sal_True )
{ ((SwInputWindow*)pWindow)->SetFormula(
rFormula, bDelSel ); }
const SwView* GetView() const{return ((SwInputWindow*)pWindow)->GetView();}
diff --git a/sw/source/ui/inc/insfnote.hxx b/sw/source/ui/inc/insfnote.hxx
index c9c51301a100..f1984a5c4f3d 100644
--- a/sw/source/ui/inc/insfnote.hxx
+++ b/sw/source/ui/inc/insfnote.hxx
@@ -48,8 +48,8 @@ class SwInsFootNoteDlg: public SvxStandardDialog
String aFontName;
CharSet eCharSet;
char cExtChar;
- BOOL bExtCharAvailable;
- BOOL bEdit;
+ sal_Bool bExtCharAvailable;
+ sal_Bool bEdit;
RadioButton aNumberAutoBtn;
RadioButton aNumberCharBtn;
Edit aNumberCharEdit;
@@ -78,13 +78,13 @@ class SwInsFootNoteDlg: public SvxStandardDialog
void Init();
public:
- SwInsFootNoteDlg(Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE);
+ SwInsFootNoteDlg(Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False);
~SwInsFootNoteDlg();
CharSet GetCharSet() { return eCharSet; }
- BOOL IsExtCharAvailable() { return bExtCharAvailable; }
+ sal_Bool IsExtCharAvailable() { return bExtCharAvailable; }
String GetFontName() { return aFontName; }
- BOOL IsEndNote() { return aEndNoteBtn.IsChecked(); }
+ sal_Bool IsEndNote() { return aEndNoteBtn.IsChecked(); }
String GetStr()
{
if ( aNumberCharBtn.IsChecked() )
diff --git a/sw/source/ui/inc/insrule.hxx b/sw/source/ui/inc/insrule.hxx
index 316a161d6c06..fff497ca2c0e 100644
--- a/sw/source/ui/inc/insrule.hxx
+++ b/sw/source/ui/inc/insrule.hxx
@@ -43,7 +43,7 @@ class SwInsertGrfRulerDlg : public SfxModalDialog
List aGrfNames;
String sSimple;
String sRulers;
- USHORT nSelPos;
+ sal_uInt16 nSelPos;
SwRulerValueSet* pExampleVS;
@@ -56,8 +56,8 @@ public:
~SwInsertGrfRulerDlg();
String GetGraphicName();
- BOOL IsSimpleLine() {return nSelPos == 1;}
- BOOL HasImages() const {return 0 != aGrfNames.Count();}
+ sal_Bool IsSimpleLine() {return nSelPos == 1;}
+ sal_Bool HasImages() const {return 0 != aGrfNames.Count();}
};
#endif
diff --git a/sw/source/ui/inc/instable.hxx b/sw/source/ui/inc/instable.hxx
index e48eece78a9f..24e54e4c0f86 100644
--- a/sw/source/ui/inc/instable.hxx
+++ b/sw/source/ui/inc/instable.hxx
@@ -92,7 +92,7 @@ public:
SwInsTableDlg( SwView& rView );
~SwInsTableDlg();
- void GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+ void GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblOpts, String& rTableAutoFmtName,
SwTableAutoFmt *& prTAFmt );
};
diff --git a/sw/source/ui/inc/javaedit.hxx b/sw/source/ui/inc/javaedit.hxx
index 239c67185e07..d78e77597d4d 100644
--- a/sw/source/ui/inc/javaedit.hxx
+++ b/sw/source/ui/inc/javaedit.hxx
@@ -76,8 +76,8 @@ private:
String aText;
String aType;
- BOOL bNew;
- BOOL bIsUrl;
+ sal_Bool bNew;
+ sal_Bool bIsUrl;
SwScriptField* pFld;
SwFldMgr* pMgr;
@@ -108,9 +108,9 @@ public:
String GetType() { return aType; }
- BOOL IsUrl() { return bIsUrl; }
- BOOL IsNew() { return bNew; }
- BOOL IsUpdate();
+ sal_Bool IsUrl() { return bIsUrl; }
+ sal_Bool IsNew() { return bNew; }
+ sal_Bool IsUpdate();
};
diff --git a/sw/source/ui/inc/label.hxx b/sw/source/ui/inc/label.hxx
index 0717ef2b6bd2..46bf210bd8da 100644
--- a/sw/source/ui/inc/label.hxx
+++ b/sw/source/ui/inc/label.hxx
@@ -56,17 +56,17 @@ class SwLabDlg : public SfxTabDialog
String sBusinessCardDlg;
String sFormat;
String sMedium;
- BOOL m_bLabel;
+ sal_Bool m_bLabel;
void _ReplaceGroup( const String &rMake );
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
SwLabDlg( Window* pParent, const SfxItemSet& rSet,
- SwNewDBMgr* pNewDBMgr, BOOL bLabel);
+ SwNewDBMgr* pNewDBMgr, sal_Bool bLabel);
~SwLabDlg();
- SwLabRec* GetRecord(const String &rRecName, BOOL bCont);
+ SwLabRec* GetRecord(const String &rRecName, sal_Bool bCont);
void GetLabItem(SwLabItem &rItem);
SwLabRecs &Recs() { return *pRecs; }
diff --git a/sw/source/ui/inc/langhelper.hxx b/sw/source/ui/inc/langhelper.hxx
index 3ff795d83f56..213092062a00 100755
--- a/sw/source/ui/inc/langhelper.hxx
+++ b/sw/source/ui/inc/langhelper.hxx
@@ -37,7 +37,7 @@ struct ESelection;
namespace SwLangHelper
{
- extern USHORT GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet );
+ extern sal_uInt16 GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet );
extern bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView &rView, SwWrtShell &rSh );
extern void SetLanguage( SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
@@ -58,10 +58,10 @@ namespace SwLangHelper
extern String GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection );
extern String GetTextForLanguageGuessing( SwWrtShell &rSh );
- extern LanguageType GetLanguage( SfxItemSet aSet, USHORT nLangWhichId );
- extern LanguageType GetLanguage( SwWrtShell &rSh, USHORT nLangWhichId );
+ extern LanguageType GetLanguage( SfxItemSet aSet, sal_uInt16 nLangWhichId );
+ extern LanguageType GetLanguage( SwWrtShell &rSh, sal_uInt16 nLangWhichId );
- extern LanguageType GetCurrentLanguage( SfxItemSet aSet, USHORT nScriptType );
+ extern LanguageType GetCurrentLanguage( SfxItemSet aSet, sal_uInt16 nScriptType );
extern LanguageType GetCurrentLanguage( SwWrtShell &rSh );
}
diff --git a/sw/source/ui/inc/linenum.hxx b/sw/source/ui/inc/linenum.hxx
index 62da2e1925ef..468b5ba44743 100644
--- a/sw/source/ui/inc/linenum.hxx
+++ b/sw/source/ui/inc/linenum.hxx
@@ -101,7 +101,7 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sw/source/ui/inc/macassgn.hxx b/sw/source/ui/inc/macassgn.hxx
index 6093a2a8cb51..ac8be8d2dd87 100644
--- a/sw/source/ui/inc/macassgn.hxx
+++ b/sw/source/ui/inc/macassgn.hxx
@@ -46,7 +46,7 @@ class SwMacroAssignDlg
{
public:
static SfxEventNamesItem AddEvents( DlgEventType eType );
- static BOOL INetFmtDlg( Window* pParent, SwWrtShell& rSh,
+ static sal_Bool INetFmtDlg( Window* pParent, SwWrtShell& rSh,
SvxMacroItem*& rpINetItem );
};
diff --git a/sw/source/ui/inc/mailconfigpage.hxx b/sw/source/ui/inc/mailconfigpage.hxx
index e2717ebb17fa..cf0022b378c8 100644
--- a/sw/source/ui/inc/mailconfigpage.hxx
+++ b/sw/source/ui/inc/mailconfigpage.hxx
@@ -90,7 +90,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sw/source/ui/inc/mailmergechildwindow.hxx b/sw/source/ui/inc/mailmergechildwindow.hxx
index 21afff7aa8bb..fb4f529f10cf 100644
--- a/sw/source/ui/inc/mailmergechildwindow.hxx
+++ b/sw/source/ui/inc/mailmergechildwindow.hxx
@@ -55,7 +55,7 @@ class SwMailMergeChildWindow : public SfxChildWindow
{
public:
SwMailMergeChildWindow( Window* ,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings*,
SfxChildWinInfo* );
diff --git a/sw/source/ui/inc/mailmrge.hxx b/sw/source/ui/inc/mailmrge.hxx
index e1f9f355c96a..43534f76a3da 100644
--- a/sw/source/ui/inc/mailmrge.hxx
+++ b/sw/source/ui/inc/mailmrge.hxx
@@ -126,7 +126,7 @@ class SwMailMergeDlg : public SvxStandardDialog
const String& rDBName;
const String& rTableName;
- USHORT nMergeType;
+ sal_uInt16 nMergeType;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > m_aSelection;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
@@ -155,7 +155,7 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >* pSelection = 0);
~SwMailMergeDlg();
- inline USHORT GetMergeType() { return nMergeType; }
+ inline sal_uInt16 GetMergeType() { return nMergeType; }
const ::rtl::OUString& GetSaveFilter() const {return m_sSaveFilter;}
inline const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const { return m_aSelection; }
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const;
@@ -177,7 +177,7 @@ public:
SwMailMergeCreateFromDlg(Window* pParent);
~SwMailMergeCreateFromDlg();
- BOOL IsThisDocument() const {return aThisDocRB.IsChecked();}
+ sal_Bool IsThisDocument() const {return aThisDocRB.IsChecked();}
};
/* -----------------04.02.2003 13:41-----------------
*
@@ -197,7 +197,7 @@ public:
SwMailMergeFieldConnectionsDlg(Window* pParent);
~SwMailMergeFieldConnectionsDlg();
- BOOL IsUseExistingConnections() const {return aUseExistingRB.IsChecked();}
+ sal_Bool IsUseExistingConnections() const {return aUseExistingRB.IsChecked();}
};
#endif
diff --git a/sw/source/ui/inc/mergetbl.hxx b/sw/source/ui/inc/mergetbl.hxx
index 44916f5d3b1d..239f776ee938 100644
--- a/sw/source/ui/inc/mergetbl.hxx
+++ b/sw/source/ui/inc/mergetbl.hxx
@@ -46,12 +46,12 @@ class SwMergeTblDlg : public SvxStandardDialog
RadioButton aMergePrevRB;
RadioButton aMergeNextRB;
- BOOL& rMergePrev;
+ sal_Bool& rMergePrev;
protected:
virtual void Apply();
public:
- SwMergeTblDlg( Window *pParent, BOOL& rWithPrev );
+ SwMergeTblDlg( Window *pParent, sal_Bool& rWithPrev );
};
#endif
diff --git a/sw/source/ui/inc/mmconfigitem.hxx b/sw/source/ui/inc/mmconfigitem.hxx
index 33454896627d..e647e934792d 100644
--- a/sw/source/ui/inc/mmconfigitem.hxx
+++ b/sw/source/ui/inc/mmconfigitem.hxx
@@ -68,8 +68,8 @@ class SW_DLLPUBLIC SwMailMergeConfigItem
::rtl::OUString m_rAddressBlockFrame;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> m_aSelection;
- USHORT m_nStartPrint;
- USHORT m_nEndPrint;
+ sal_uInt16 m_nStartPrint;
+ sal_uInt16 m_nEndPrint;
::rtl::OUString m_sSelectedPrinter;
@@ -256,10 +256,10 @@ public:
SwDocMergeInfo& GetDocumentMergeInfo(sal_uInt32 nDocument);
sal_uInt32 GetMergedDocumentCount() const;
- void SetPrintRange( USHORT nStartDocument, USHORT nEndDocument)
+ void SetPrintRange( sal_uInt16 nStartDocument, sal_uInt16 nEndDocument)
{m_nStartPrint = nStartDocument; m_nEndPrint = nEndDocument;}
- USHORT GetPrintRangeStart() const {return m_nStartPrint;}
- USHORT GetPrintRangeEnd() const {return m_nEndPrint;}
+ sal_uInt16 GetPrintRangeStart() const {return m_nStartPrint;}
+ sal_uInt16 GetPrintRangeEnd() const {return m_nEndPrint;}
const ::rtl::OUString& GetSelectedPrinter() const {return m_sSelectedPrinter;}
void SetSelectedPrinter(const ::rtl::OUString& rSet )
diff --git a/sw/source/ui/inc/multmrk.hxx b/sw/source/ui/inc/multmrk.hxx
index 7d5dae802e01..e56da31afc47 100644
--- a/sw/source/ui/inc/multmrk.hxx
+++ b/sw/source/ui/inc/multmrk.hxx
@@ -64,7 +64,7 @@ class SwMultiTOXMarkDlg : public SvxStandardDialog
CancelButton aCancelBT;
SwTOXMgr &rMgr;
- USHORT nPos;
+ sal_uInt16 nPos;
void Apply();
public:
diff --git a/sw/source/ui/inc/navicont.hxx b/sw/source/ui/inc/navicont.hxx
index 124309057953..d1f0a70272aa 100644
--- a/sw/source/ui/inc/navicont.hxx
+++ b/sw/source/ui/inc/navicont.hxx
@@ -43,19 +43,19 @@ class NaviContentBookmark
String aUrl; // URL inkl. Sprungmarke
String aDescr; // Description
long nDocSh; // Adresse der DocShell
- USHORT nDefDrag; // Description enthaelt defaultDragType
+ sal_uInt16 nDefDrag; // Description enthaelt defaultDragType
public:
NaviContentBookmark();
NaviContentBookmark( const String &rUrl, const String& rDesc,
- USHORT nDragType, const SwDocShell* );
+ sal_uInt16 nDragType, const SwDocShell* );
const String& GetURL() const { return aUrl; }
const String& GetDescription() const { return aDescr; }
- USHORT GetDefaultDragType() const { return nDefDrag; }
+ sal_uInt16 GetDefaultDragType() const { return nDefDrag; }
long GetDocShell() const { return nDocSh; }
void Copy( TransferDataContainer& rData ) const;
- BOOL Paste( TransferableDataHelper& rData );
+ sal_Bool Paste( TransferableDataHelper& rData );
};
#endif
diff --git a/sw/source/ui/inc/navipi.hxx b/sw/source/ui/inc/navipi.hxx
index b2b457bdd5d4..36dcbd7fa2e3 100644
--- a/sw/source/ui/inc/navipi.hxx
+++ b/sw/source/ui/inc/navipi.hxx
@@ -98,19 +98,19 @@ class SwNavigationPI : public Window,
long nDocLBIniHeight;
long nWishWidth;
- USHORT nAutoMarkIdx;
- USHORT nRegionMode; // 0 - URL, 1 - Bereich mit Link 2 - B. ohne Link
+ sal_uInt16 nAutoMarkIdx;
+ sal_uInt16 nRegionMode; // 0 - URL, 1 - Bereich mit Link 2 - B. ohne Link
short nZoomIn;
short nZoomOutInit;
short nZoomOut;
- BOOL bSmallMode : 1;
- BOOL bIsZoomedIn : 1;
- BOOL bPageCtrlsVisible : 1;
- BOOL bGlobalMode : 1;
+ sal_Bool bSmallMode : 1;
+ sal_Bool bIsZoomedIn : 1;
+ sal_Bool bPageCtrlsVisible : 1;
+ sal_Bool bGlobalMode : 1;
// --------- methods -----------------------------
- BOOL _IsZoomedIn() const {return bIsZoomedIn;}
+ sal_Bool _IsZoomedIn() const {return bIsZoomedIn;}
void _ZoomOut();
void _ZoomIn();
@@ -142,7 +142,7 @@ class SwNavigationPI : public Window,
protected:
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void Resize();
virtual void DataChanged( const DataChangedEvent& rDCEvt );
@@ -151,8 +151,8 @@ protected:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
NumEditAction& GetPageEdit();
- BOOL ToggleTree();
- void SetGlobalMode(BOOL bSet) {bGlobalMode = bSet;}
+ sal_Bool ToggleTree();
+ void SetGlobalMode(sal_Bool bSet) {bGlobalMode = bSet;}
public:
@@ -163,32 +163,32 @@ public:
void Update() { FillBox(); }
void UpdateListBox();
- void MoveOutline(USHORT nSource, USHORT nTarget, BOOL bWithCilds);
+ void MoveOutline(sal_uInt16 nSource, sal_uInt16 nTarget, sal_Bool bWithCilds);
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
static String CreateDropFileName( TransferableDataHelper& rData );
static void CleanEntry( String& rEntry );
- USHORT GetRegionDropMode() const {return nRegionMode;}
- void SetRegionDropMode(USHORT nNewMode);
+ sal_uInt16 GetRegionDropMode() const {return nRegionMode;}
+ void SetRegionDropMode(sal_uInt16 nNewMode);
sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
- BOOL IsGlobalDoc() const;
- BOOL IsGlobalMode() const {return bGlobalMode;}
+ sal_Bool IsGlobalDoc() const;
+ sal_Bool IsGlobalMode() const {return bGlobalMode;}
SwView* GetCreateView() const;
- void CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus);
+ void CreateNavigationTool(const Rectangle& rRect, sal_Bool bSetFocus);
};
class SwNavigationChild : public SfxChildWindowContext
{
public:
SwNavigationChild( Window* ,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings*,
SfxChildWinInfo* );
diff --git a/sw/source/ui/inc/num.hxx b/sw/source/ui/inc/num.hxx
index 2233f9609fe4..0c80939b6258 100644
--- a/sw/source/ui/inc/num.hxx
+++ b/sw/source/ui/inc/num.hxx
@@ -64,7 +64,7 @@ class SwOutlineTabDialog;
struct SwBmpItemInfo
{
SvxBrushItem* pBrushItem;
- USHORT nItemId;
+ sal_uInt16 nItemId;
};
@@ -124,11 +124,11 @@ class SwNumPositionTabPage : public SfxTabPage
SwWrtShell* pWrtSh;
SwOutlineTabDialog* pOutlineDlg;
- USHORT nActNumLvl;
+ sal_uInt16 nActNumLvl;
- BOOL bModified : 1;
- BOOL bPreset : 1;
- BOOL bInInintControl : 1; //Modify-Fehler umgehen, soll ab 391 behoben sein
+ sal_Bool bModified : 1;
+ sal_Bool bPreset : 1;
+ sal_Bool bInInintControl : 1; //Modify-Fehler umgehen, soll ab 391 behoben sein
// --> OD 2008-02-01 #newlistlevelattrs#
bool bLabelAlignmentPosAndSpaceModeActive;
// <--
@@ -162,7 +162,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet *pSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
static SfxTabPage* Create( Window* pParent,
@@ -171,10 +171,10 @@ public:
void SetOutlineTabDialog(SwOutlineTabDialog* pDlg){pOutlineDlg = pDlg;}
void SetWrtShell(SwWrtShell* pSh);
#if OSL_DEBUG_LEVEL > 1
- void SetModified(BOOL bRepaint = TRUE);
+ void SetModified(sal_Bool bRepaint = sal_True);
#else
- void SetModified(BOOL bRepaint = TRUE)
- { bModified = TRUE;
+ void SetModified(sal_Bool bRepaint = sal_True)
+ { bModified = sal_True;
if(bRepaint)
{
aPreviewWIN.SetLevel(nActNumLvl);
@@ -193,7 +193,7 @@ class SwSvxNumBulletTabDialog : public SfxTabDialog
protected:
virtual short Ok();
- virtual void PageCreated(USHORT nPageId, SfxTabPage& rPage);
+ virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage);
DECL_LINK(RemoveNumberingHdl, PushButton*);
public:
SwSvxNumBulletTabDialog(Window* pParent,
diff --git a/sw/source/ui/inc/numberingtypelistbox.hxx b/sw/source/ui/inc/numberingtypelistbox.hxx
index d70bbc9cc74c..eaf35c349417 100644
--- a/sw/source/ui/inc/numberingtypelistbox.hxx
+++ b/sw/source/ui/inc/numberingtypelistbox.hxx
@@ -44,10 +44,10 @@ class SW_DLLPUBLIC SwNumberingTypeListBox : public ListBox
public:
SwNumberingTypeListBox( Window* pWin, const ResId& rResId,
- USHORT nTypeFlags = INSERT_NUM_TYPE_PAGE_STYLE_NUMBERING|INSERT_NUM_TYPE_NO_NUMBERING|INSERT_NUM_EXTENDED_TYPES );
+ sal_uInt16 nTypeFlags = INSERT_NUM_TYPE_PAGE_STYLE_NUMBERING|INSERT_NUM_TYPE_NO_NUMBERING|INSERT_NUM_EXTENDED_TYPES );
~SwNumberingTypeListBox();
- void Reload(USHORT nTypeFlags);
+ void Reload(sal_uInt16 nTypeFlags);
sal_Int16 GetSelectedNumberingType();
sal_Bool SelectNumberingType(sal_Int16 nType);
diff --git a/sw/source/ui/inc/numfmtlb.hxx b/sw/source/ui/inc/numfmtlb.hxx
index 50d762dc4419..d21380f30358 100644
--- a/sw/source/ui/inc/numfmtlb.hxx
+++ b/sw/source/ui/inc/numfmtlb.hxx
@@ -36,49 +36,49 @@ class SwView;
class SW_DLLPUBLIC NumFormatListBox : public ListBox
{
short nCurrFormatType;
- USHORT nStdEntry;
- BOOL bOneArea;
- ULONG nDefFormat;
+ sal_uInt16 nStdEntry;
+ sal_Bool bOneArea;
+ sal_uLong nDefFormat;
SwView* pVw;
SvNumberFormatter* pOwnFormatter;
LanguageType eCurLanguage;
- BOOL bShowLanguageControl; //determine whether the language control has
+ sal_Bool bShowLanguageControl; //determine whether the language control has
//to be shown in the number format dialog
- BOOL bUseAutomaticLanguage;//determine whether language is automatically assigned
+ sal_Bool bUseAutomaticLanguage;//determine whether language is automatically assigned
SW_DLLPRIVATE DECL_LINK( SelectHdl, ListBox * );
SW_DLLPRIVATE double GetDefValue(const short nFormatType) const;
- SW_DLLPRIVATE void Init(short nFormatType, BOOL bUsrFmts);
+ SW_DLLPRIVATE void Init(short nFormatType, sal_Bool bUsrFmts);
SW_DLLPRIVATE SwView* GetView();
public:
NumFormatListBox( Window* pWin, const ResId& rResId,
- short nFormatType = NUMBERFORMAT_NUMBER, ULONG nDefFmt = 0,
- BOOL bUsrFmts = TRUE );
+ short nFormatType = NUMBERFORMAT_NUMBER, sal_uLong nDefFmt = 0,
+ sal_Bool bUsrFmts = sal_True );
NumFormatListBox( Window* pWin, SwView* pView, const ResId& rResId,
- short nFormatType = NUMBERFORMAT_NUMBER, ULONG nDefFmt = 0,
- BOOL bUsrFmts = TRUE );
+ short nFormatType = NUMBERFORMAT_NUMBER, sal_uLong nDefFmt = 0,
+ sal_Bool bUsrFmts = sal_True );
~NumFormatListBox();
void Clear();
- inline void SetOneArea(BOOL bOnlyOne = TRUE) { bOneArea = bOnlyOne; }
+ inline void SetOneArea(sal_Bool bOnlyOne = sal_True) { bOneArea = bOnlyOne; }
void SetFormatType(const short nFormatType);
inline short GetFormatType() const { return nCurrFormatType; }
- void SetDefFormat(const ULONG nDefFmt);
- ULONG GetFormat() const;
+ void SetDefFormat(const sal_uLong nDefFmt);
+ sal_uLong GetFormat() const;
inline LanguageType GetCurLanguage() const { return eCurLanguage;}
void SetLanguage(LanguageType eSet) { eCurLanguage = eSet;}
- void SetAutomaticLanguage(BOOL bSet){bUseAutomaticLanguage = bSet;}
- BOOL IsAutomaticLanguage()const {return bUseAutomaticLanguage;}
+ void SetAutomaticLanguage(sal_Bool bSet){bUseAutomaticLanguage = bSet;}
+ sal_Bool IsAutomaticLanguage()const {return bUseAutomaticLanguage;}
- void SetShowLanguageControl(BOOL bSet){bShowLanguageControl = bSet;}
+ void SetShowLanguageControl(sal_Bool bSet){bShowLanguageControl = bSet;}
};
diff --git a/sw/source/ui/inc/numpara.hxx b/sw/source/ui/inc/numpara.hxx
index f8d748c4473c..520eabffd506 100644
--- a/sw/source/ui/inc/numpara.hxx
+++ b/sw/source/ui/inc/numpara.hxx
@@ -66,8 +66,8 @@ class SwParagraphNumTabPage : public SfxTabPage
const String msOutlineNumbering;
// <--
- BOOL bModified : 1;
- BOOL bCurNumrule : 1;
+ sal_Bool bModified : 1;
+ sal_Bool bCurNumrule : 1;
DECL_LINK( NewStartHdl_Impl, CheckBox* );
DECL_LINK( StyleHdl_Impl, ListBox* );
@@ -81,9 +81,9 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void EnableNewStart();
diff --git a/sw/source/ui/inc/numprevw.hxx b/sw/source/ui/inc/numprevw.hxx
index 3ee9a2316103..5324fa8189db 100644
--- a/sw/source/ui/inc/numprevw.hxx
+++ b/sw/source/ui/inc/numprevw.hxx
@@ -42,8 +42,8 @@ class NumberingPreview : public Window
Font aStdFont;
long nPageWidth;
const String* pOutlineNames;
- BOOL bPosition;
- UINT16 nActLevel;
+ sal_Bool bPosition;
+ sal_uInt16 nActLevel;
protected:
virtual void Paint( const Rectangle& rRect );
@@ -51,7 +51,7 @@ class NumberingPreview : public Window
public:
NumberingPreview(Window* pParent, const ResId& rResId ) :
Window(pParent, rResId),
- pActNum(0),nPageWidth(0), pOutlineNames(0), bPosition(FALSE), nActLevel(USHRT_MAX) {}
+ pActNum(0),nPageWidth(0), pOutlineNames(0), bPosition(sal_False), nActLevel(USHRT_MAX) {}
~NumberingPreview();
void SetNumRule(const SwNumRule* pNum)
@@ -61,8 +61,8 @@ class NumberingPreview : public Window
void SetOutlineNames(const String* pNames)
{pOutlineNames = pNames;}
void SetPositionMode()
- { bPosition = TRUE;}
- void SetLevel(USHORT nSet) {nActLevel = nSet;}
+ { bPosition = sal_True;}
+ void SetLevel(sal_uInt16 nSet) {nActLevel = nSet;}
};
diff --git a/sw/source/ui/inc/olmenu.hxx b/sw/source/ui/inc/olmenu.hxx
index ef6a26e73f67..270c8d8e458c 100644
--- a/sw/source/ui/inc/olmenu.hxx
+++ b/sw/source/ui/inc/olmenu.hxx
@@ -64,7 +64,7 @@ class SwSpellPopup : public PopupMenu
Image aInfo16;
- void fillLangPopupMenu( PopupMenu *pPopupMenu, USHORT nLangStart,
+ void fillLangPopupMenu( PopupMenu *pPopupMenu, sal_uInt16 nLangStart,
::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq, SwWrtShell* pWrtSh,
std::map< sal_Int16, ::rtl::OUString > &rLangTable );
@@ -83,7 +83,7 @@ public:
const String & rParaText );
sal_uInt16 Execute( const Rectangle& rPopupPos, Window* pWin );
- void Execute( USHORT nId );
+ void Execute( sal_uInt16 nId );
};
diff --git a/sw/source/ui/inc/optcomp.hxx b/sw/source/ui/inc/optcomp.hxx
index 34de97517fd2..ae9de51f1ba8 100644
--- a/sw/source/ui/inc/optcomp.hxx
+++ b/sw/source/ui/inc/optcomp.hxx
@@ -60,7 +60,7 @@ private:
// impl object
SwCompatibilityOptPage_Impl* m_pImpl;
// saved options after "Reset"; used in "FillItemSet" for comparison
- ULONG m_nSavedOptions;
+ sal_uLong m_nSavedOptions;
// handler
DECL_LINK( SelectHdl, ListBox* );
@@ -69,8 +69,8 @@ private:
// private methods
void InitControls( const SfxItemSet& rSet );
void ReplaceFormatName( String& rEntry );
- void SetCurrentOptions( ULONG nOptions );
- ULONG GetDocumentOptions() const;
+ void SetCurrentOptions( sal_uLong nOptions );
+ sal_uLong GetDocumentOptions() const;
void WriteOptions();
public:
@@ -79,7 +79,7 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sw/source/ui/inc/optload.hxx b/sw/source/ui/inc/optload.hxx
index abe43c00f0a3..d883a63060c1 100644
--- a/sw/source/ui/inc/optload.hxx
+++ b/sw/source/ui/inc/optload.hxx
@@ -71,7 +71,7 @@ private:
SwWrtShell* pWrtShell;
sal_Bool bHTMLMode;
- UINT16 nLastTab;
+ sal_uInt16 nLastTab;
sal_Int32 nOldLinkMode;
DECL_LINK(CaptionHdl, PushButton*);
@@ -84,7 +84,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
@@ -180,8 +180,8 @@ private:
String sNone;
SwFldMgr *pMgr;
- USHORT eType;
- BOOL bHTMLMode;
+ sal_uInt16 eType;
+ sal_Bool bHTMLMode;
DECL_LINK( SelectHdl, ListBox *pLB = 0 );
DECL_LINK( ModifyHdl, Edit *pEdt = 0 );
@@ -190,7 +190,7 @@ private:
DECL_LINK( SaveEntryHdl, SvxCheckListBox *pLB = 0 );
void DelUserData();
- void SetOptions( const USHORT nPos,
+ void SetOptions( const sal_uInt16 nPos,
const SwCapObjType eType,
const SvGlobalName *pOleId = 0);
void SaveEntry( SvLBoxEntry* pEntry );
@@ -204,7 +204,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx
index 61b8056aa309..db631fc55757 100644
--- a/sw/source/ui/inc/optpage.hxx
+++ b/sw/source/ui/inc/optpage.hxx
@@ -102,7 +102,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
@@ -148,8 +148,8 @@ class SwAddPrinterTabPage : public SfxTabPage
ListBox aFaxLB;
String sNone;
- BOOL bAttrModified;
- BOOL bPreview;
+ sal_Bool bAttrModified;
+ sal_Bool bPreview;
void Init();
DECL_LINK( AutoClickHdl, CheckBox * );
@@ -163,11 +163,11 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void SetFax( const SvStringsDtor& );
void SelectFax( const String& );
- void SetPreview(BOOL bPrev);
+ void SetPreview(sal_Bool bPrev);
virtual void PageCreated (SfxAllItemSet aSet);
};
@@ -219,20 +219,20 @@ class SwStdFontTabPage : public SfxTabPage
SwWrtShell* pWrtShell;
LanguageType eLanguage;
// waren nur defaults vorhanden? wurden sie mit den Boxen ueberschrieben
- BOOL bListDefault :1;
- BOOL bSetListDefault :1;
- BOOL bLabelDefault :1;
- BOOL bSetLabelDefault :1;
- BOOL bIdxDefault :1;
- BOOL bSetIdxDefault :1;
- BOOL bDeletePrinter :1;
-
- BOOL bListHeightDefault :1;
- BOOL bSetListHeightDefault :1;
- BOOL bLabelHeightDefault :1;
- BOOL bSetLabelHeightDefault :1;
- BOOL bIndexHeightDefault :1;
- BOOL bSetIndexHeightDefault :1;
+ sal_Bool bListDefault :1;
+ sal_Bool bSetListDefault :1;
+ sal_Bool bLabelDefault :1;
+ sal_Bool bSetLabelDefault :1;
+ sal_Bool bIdxDefault :1;
+ sal_Bool bSetIdxDefault :1;
+ sal_Bool bDeletePrinter :1;
+
+ sal_Bool bListHeightDefault :1;
+ sal_Bool bSetListHeightDefault :1;
+ sal_Bool bLabelHeightDefault :1;
+ sal_Bool bSetLabelHeightDefault :1;
+ sal_Bool bIndexHeightDefault :1;
+ sal_Bool bSetIndexHeightDefault :1;
sal_uInt8 nFontGroup; //fontcfg.hxx: FONT_GROUP_[STANDARD|CJK|CTL]
@@ -253,7 +253,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void SetFontMode(sal_uInt8 nGroup) {nFontGroup = nGroup;}
@@ -301,7 +301,7 @@ class SwTableOptionsTabPage : public SfxTabPage
FixedText aVarFT;
SwWrtShell* pWrtShell;
- BOOL bHTMLMode;
+ sal_Bool bHTMLMode;
DECL_LINK(CheckBoxHdl, CheckBox *pCB);
@@ -315,7 +315,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void SetWrtShell(SwWrtShell* pSh) {pWrtShell = pSh;}
@@ -366,7 +366,7 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void SetWrtShell( SwWrtShell * pSh ) { m_pWrtShell = pSh; }
@@ -391,7 +391,7 @@ class SwMarkPreview : public Window
Rectangle aLeftPagePrtArea;
Rectangle aRightPagePrtArea;
- USHORT nMarkPos;
+ sal_uInt16 nMarkPos;
using OutputDevice::DrawRect;
void DrawRect(const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor);
@@ -408,7 +408,7 @@ public:
virtual ~SwMarkPreview();
inline void SetColor(const Color& rCol) { m_aMarkCol = rCol; }
- inline void SetMarkPos(USHORT nPos) { nMarkPos = nPos; }
+ inline void SetMarkPos(sal_uInt16 nPos) { nMarkPos = nPos; }
};
/*-----------------------------------------------------------------------
@@ -464,7 +464,7 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
@@ -483,7 +483,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
private:
@@ -499,7 +499,7 @@ private:
CheckBox aTest9CBox;
CheckBox aTest10CBox;
- BOOL bAttrModified;
+ sal_Bool bAttrModified;
void Init();
DECL_LINK( AutoClickHdl, CheckBox * );
diff --git a/sw/source/ui/inc/outline.hxx b/sw/source/ui/inc/outline.hxx
index 65f57636c02d..73e3a9919206 100644
--- a/sw/source/ui/inc/outline.hxx
+++ b/sw/source/ui/inc/outline.hxx
@@ -66,7 +66,7 @@ class SwChapterNumRules;
* --------------------------------------------------*/
class SwOutlineTabDialog : public SfxTabDialog
{
- static USHORT nNumLevel;
+ static sal_uInt16 nNumLevel;
String aNullStr;
String aCollNames[MAXLEVEL];
@@ -76,14 +76,14 @@ class SwOutlineTabDialog : public SfxTabDialog
SwNumRule* pNumRule;
SwChapterNumRules* pChapterNumRules;
- BOOL bModified : 1;
+ sal_Bool bModified : 1;
protected:
DECL_LINK( CancelHdl, Button * );
DECL_LINK( FormHdl, Button * );
DECL_LINK( MenuSelectHdl, Menu * );
- virtual void PageCreated(USHORT nPageId, SfxTabPage& rPage);
+ virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage);
virtual short Ok();
public:
@@ -93,11 +93,11 @@ class SwOutlineTabDialog : public SfxTabDialog
~SwOutlineTabDialog();
SwNumRule* GetNumRule() {return pNumRule;}
- USHORT GetLevel(const String &rFmtName) const;
+ sal_uInt16 GetLevel(const String &rFmtName) const;
String* GetCollNames() {return aCollNames;}
- static USHORT GetActNumLevel() {return nNumLevel;}
- static void SetActNumLevel(USHORT nSet) {nNumLevel = nSet;}
+ static sal_uInt16 GetActNumLevel() {return nNumLevel;}
+ static void SetActNumLevel(sal_uInt16 nSet) {nNumLevel = nSet;}
};
/* -----------------07.07.98 13:47-------------------
*
@@ -130,7 +130,7 @@ class SwOutlineSettingsTabPage : public SfxTabPage
SwWrtShell* pSh;
SwNumRule* pNumRule;
String* pCollNames;
- USHORT nActLevel;
+ sal_uInt16 nActLevel;
DECL_LINK( LevelHdl, ListBox * );
DECL_LINK( ToggleComplete, NumericField * );
@@ -158,7 +158,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet *pSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
diff --git a/sw/source/ui/inc/pgfnote.hxx b/sw/source/ui/inc/pgfnote.hxx
index 31bb0c68fc22..0bc2399a9eb1 100644
--- a/sw/source/ui/inc/pgfnote.hxx
+++ b/sw/source/ui/inc/pgfnote.hxx
@@ -50,9 +50,9 @@ class SwFootNotePage: public SfxTabPage
{
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
private:
diff --git a/sw/source/ui/inc/pggrid.hxx b/sw/source/ui/inc/pggrid.hxx
index 92ba2fa2ebd4..165f77be8302 100644
--- a/sw/source/ui/inc/pggrid.hxx
+++ b/sw/source/ui/inc/pggrid.hxx
@@ -101,9 +101,9 @@ class SwTextGridPage: public SfxTabPage
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
virtual void ActivatePage( const SfxItemSet& rSet );
diff --git a/sw/source/ui/inc/prcntfld.hxx b/sw/source/ui/inc/prcntfld.hxx
index e506f31de708..e36d330f22b5 100644
--- a/sw/source/ui/inc/prcntfld.hxx
+++ b/sw/source/ui/inc/prcntfld.hxx
@@ -41,12 +41,12 @@ class SW_DLLPUBLIC PercentField : public MetricField
sal_Int64 nOldBaseValue;
sal_Int64 nLastPercent;
sal_Int64 nLastValue;
- USHORT nOldDigits;
+ sal_uInt16 nOldDigits;
FieldUnit eOldUnit;
sal_Bool bLockAutoCalculation; //prevent recalcution of percent values when the
//reference value is changed
- SW_DLLPRIVATE sal_Int64 ImpPower10(USHORT n);
+ SW_DLLPRIVATE sal_Int64 ImpPower10(sal_uInt16 n);
using MetricField::SetValue;
using MetricField::GetValue;
@@ -70,7 +70,7 @@ public:
sal_Int64 GetValue(FieldUnit eOutUnit = FUNIT_NONE);
- BOOL IsValueModified();
+ sal_Bool IsValueModified();
//using NumericFormatter::SetMax;
void SetMax(sal_Int64 nNewMax, FieldUnit eInUnit = FUNIT_NONE);
@@ -87,9 +87,9 @@ public:
sal_Int64 Convert(sal_Int64 nValue, FieldUnit eInUnit, FieldUnit eOutUnit);
- void ShowPercent(BOOL bPercent);
+ void ShowPercent(sal_Bool bPercent);
- USHORT GetOldDigits() const {return nOldDigits;}
+ sal_uInt16 GetOldDigits() const {return nOldDigits;}
void LockAutoCalculation(sal_Bool bLock) {bLockAutoCalculation = bLock;}
sal_Bool IsAutoCalculationLocked()const {return bLockAutoCalculation;}
diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx
index d0d8f2cb804a..a500610139d7 100644
--- a/sw/source/ui/inc/pview.hxx
+++ b/sw/source/ui/inc/pview.hxx
@@ -54,8 +54,8 @@ class SwPagePreviewLayout;
class SwPagePreViewWin : public Window
{
ViewShell* mpViewShell;
- USHORT mnSttPage;
- BYTE mnRow, mnCol;
+ sal_uInt16 mnSttPage;
+ sal_uInt8 mnRow, mnCol;
Size maPxWinSize;
Fraction maScale;
SwPagePreView& mrView;
@@ -65,7 +65,7 @@ class SwPagePreViewWin : public Window
// OD 12.12.2002 #103492#
SwPagePreviewLayout* mpPgPrevwLayout;
- void SetPagePreview( BYTE nRow, BYTE nCol );
+ void SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol );
using Window::Scroll;
@@ -84,14 +84,14 @@ public:
ViewShell* GetViewShell() const { return mpViewShell; }
- BYTE GetRow() const { return mnRow; }
- void SetRow( BYTE n ) { if( n ) mnRow = n; }
+ sal_uInt8 GetRow() const { return mnRow; }
+ void SetRow( sal_uInt8 n ) { if( n ) mnRow = n; }
- BYTE GetCol() const { return mnCol; }
- void SetCol( BYTE n ) { if( n ) mnCol = n; }
+ sal_uInt8 GetCol() const { return mnCol; }
+ void SetCol( sal_uInt8 n ) { if( n ) mnCol = n; }
- USHORT GetSttPage() const { return mnSttPage; }
- void SetSttPage( USHORT n ) { mnSttPage = n; }
+ sal_uInt16 GetSttPage() const { return mnSttPage; }
+ void SetSttPage( sal_uInt16 n ) { mnSttPage = n; }
/** get selected page number of document preview
@@ -115,9 +115,9 @@ public:
void SetSelectedPage( sal_uInt16 _nSelectedPageNum );
//JP 19.08.98: bei Einspaltigkeit gibt es keine 0. Seite!
- USHORT GetDefSttPage() const { return 1 == mnCol ? 1 : 0; }
+ sal_uInt16 GetDefSttPage() const { return 1 == mnCol ? 1 : 0; }
- void CalcWish( BYTE nNewRow, BYTE nNewCol );
+ void CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol );
const Size& GetWinSize() const { return maPxWinSize; }
void SetWinSize( const Size& rNewSize );
@@ -128,7 +128,7 @@ public:
int MovePage( int eMoveMode );
// erzeuge den String fuer die StatusLeiste
- void GetStatusStr( String& rStr, USHORT nPageCount ) const;
+ void GetStatusStr( String& rStr, sal_uInt16 nPageCount ) const;
void RepaintCoreRect( const SwRect& rRect );
@@ -149,7 +149,7 @@ public:
return maPaintedPreviewDocRect;
}
- void Scroll(long nXMove, long nYMove, USHORT nFlags = 0);
+ void Scroll(long nXMove, long nYMove, sal_uInt16 nFlags = 0);
/** method to enable/disable book preview
@@ -159,7 +159,7 @@ public:
@param _bBookPreview
input parameter - boolean indicating, if book preview mode has to
- switch on <TRUE> or of <FALSE>
+ switch on <sal_True> or of <sal_False>
@return boolean indicating, if book preview mode has changed.
*/
@@ -185,7 +185,7 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell
//and the new cursor position if the user double click in the PagePreView
sNewCrsrPos;
// to support keyboard the number of the page to go to can be set too
- USHORT nNewPage;
+ sal_uInt16 nNewPage;
// Sichtbarer Bereich
String sPageStr;
Size aDocSz;
@@ -200,8 +200,8 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell
// aktiv sind
Window *pScrollFill;
- USHORT mnPageCount;
- BOOL bNormalPrint;
+ sal_uInt16 mnPageCount;
+ sal_Bool bNormalPrint;
// OD 09.01.2003 #106334#
// new members to reset design mode at draw view for form shell on switching
@@ -212,20 +212,20 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell
SW_DLLPRIVATE void Init(const SwViewOption* = 0);
SW_DLLPRIVATE Point AlignToPixel(const Point& rPt) const;
- SW_DLLPRIVATE int _CreateScrollbar( BOOL bHori );
+ SW_DLLPRIVATE int _CreateScrollbar( sal_Bool bHori );
SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
SW_DLLPRIVATE DECL_LINK( BtnPage, Button * );
- SW_DLLPRIVATE int ChgPage( int eMvMode, int bUpdateScrollbar = TRUE );
+ SW_DLLPRIVATE int ChgPage( int eMvMode, int bUpdateScrollbar = sal_True );
- SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
- SW_DLLPRIVATE virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
+ SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False );
+ SW_DLLPRIVATE virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
SW_DLLPRIVATE virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent,
const SfxItemSet &rOptions );
SW_DLLPRIVATE virtual PrintDialog* CreatePrintDialog( Window *pParent );
- SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, BOOL bInner );
+ SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool bInner );
/** help method to execute SfxRequest FN_PAGE_UP and FN_PAGE_DOWN
@@ -248,7 +248,7 @@ protected:
virtual void OuterResizePixel( const Point &rOfs, const Size &rSize );
virtual Size GetOptimalSizePixel() const;
- void SetZoom(SvxZoomType eSet, USHORT nFactor);
+ void SetZoom(SvxZoomType eSet, sal_uInt16 nFactor);
public:
SFX_DECL_VIEWFACTORY(SwPagePreView);
@@ -265,7 +265,7 @@ public:
void DocSzChgd(const Size& rNewSize);
const Size& GetDocSz() const { return aDocSz; }
- virtual void SetVisArea( const Rectangle&, BOOL bUpdateScrollbar = TRUE);
+ virtual void SetVisArea( const Rectangle&, sal_Bool bUpdateScrollbar = sal_True);
inline void AdjustEditWin();
@@ -275,16 +275,16 @@ public:
void ShowVScrollbar(sal_Bool bShow);
- USHORT GetPageCount() const { return mnPageCount; }
+ sal_uInt16 GetPageCount() const { return mnPageCount; }
- BOOL HandleWheelCommands( const CommandEvent& );
+ sal_Bool HandleWheelCommands( const CommandEvent& );
const String& GetPrevSwViewData() const { return sSwViewData; }
void SetNewCrsrPos( const String& rStr ) { sNewCrsrPos = rStr; }
const String& GetNewCrsrPos() const { return sNewCrsrPos; }
- USHORT GetNewPage() const {return nNewPage;}
- void SetNewPage(USHORT nSet) {nNewPage = nSet;}
+ sal_uInt16 GetNewPage() const {return nNewPage;}
+ void SetNewPage(sal_uInt16 nSet) {nNewPage = nSet;}
// Handler
void Execute(SfxRequest&);
diff --git a/sw/source/ui/inc/redlndlg.hxx b/sw/source/ui/inc/redlndlg.hxx
index 152c17387072..159e71628f46 100644
--- a/sw/source/ui/inc/redlndlg.hxx
+++ b/sw/source/ui/inc/redlndlg.hxx
@@ -57,9 +57,9 @@ struct SwRedlineDataParent
SvLBoxEntry* pTLBParent; // zugehoeriger TreeListBox-Eintrag
String sComment; // Redline-Kommentar
- inline BOOL operator==( const SwRedlineDataParent& rObj ) const
+ inline sal_Bool operator==( const SwRedlineDataParent& rObj ) const
{ return (pData && pData->GetSeqNo() == rObj.pData->GetSeqNo()); }
- inline BOOL operator< ( const SwRedlineDataParent& rObj ) const
+ inline sal_Bool operator< ( const SwRedlineDataParent& rObj ) const
{ return (pData && pData->GetSeqNo() < rObj.pData->GetSeqNo()); }
};
@@ -99,9 +99,9 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg
SvxRedlinTable* pTable; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
Link aOldSelectHdl;
Link aOldDeselectHdl;
- BOOL bOnlyFormatedRedlines;
- BOOL bHasReadonlySel;
- BOOL bRedlnAutoFmt;
+ sal_Bool bOnlyFormatedRedlines;
+ sal_Bool bHasReadonlySel;
+ sal_Bool bRedlnAutoFmt;
// prevent update dialog data during longer operations (cf #102657#)
bool bInhibitActivate;
@@ -116,27 +116,27 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg
SW_DLLPRIVATE DECL_LINK( GotoHdl, void* );
SW_DLLPRIVATE DECL_LINK( CommandHdl, void* );
- SW_DLLPRIVATE USHORT CalcDiff(USHORT nStart, BOOL bChild);
- SW_DLLPRIVATE void InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const USHORT nAutoFmt);
- SW_DLLPRIVATE void InsertParents(USHORT nStart, USHORT nEnd = USHRT_MAX);
- SW_DLLPRIVATE void RemoveParents(USHORT nStart, USHORT nEnd);
+ SW_DLLPRIVATE sal_uInt16 CalcDiff(sal_uInt16 nStart, sal_Bool bChild);
+ SW_DLLPRIVATE void InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const sal_uInt16 nAutoFmt);
+ SW_DLLPRIVATE void InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd = USHRT_MAX);
+ SW_DLLPRIVATE void RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd);
SW_DLLPRIVATE void InitAuthors();
- SW_DLLPRIVATE String GetRedlineText(const SwRedline& rRedln, DateTime &rDateTime, USHORT nStack = 0);
- SW_DLLPRIVATE const String& GetActionText(const SwRedline& rRedln, USHORT nStack = 0);
- SW_DLLPRIVATE USHORT GetRedlinePos( const SvLBoxEntry& rEntry) const;
+ SW_DLLPRIVATE String GetRedlineText(const SwRedline& rRedln, DateTime &rDateTime, sal_uInt16 nStack = 0);
+ SW_DLLPRIVATE const String& GetActionText(const SwRedline& rRedln, sal_uInt16 nStack = 0);
+ SW_DLLPRIVATE sal_uInt16 GetRedlinePos( const SvLBoxEntry& rEntry) const;
public:
- SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt = FALSE);
+ SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt = sal_False);
virtual ~SwRedlineAcceptDlg();
DECL_LINK( FilterChangedHdl, void *pDummy = 0 );
inline SvxAcceptChgCtr* GetChgCtrl() { return &aTabPagesCTRL; }
- inline BOOL HasRedlineAutoFmt() const { return bRedlnAutoFmt; }
+ inline sal_Bool HasRedlineAutoFmt() const { return bRedlnAutoFmt; }
- void Init(USHORT nStart = 0);
- void CallAcceptReject( BOOL bSelect, BOOL bAccept );
+ void Init(sal_uInt16 nStart = 0);
+ void CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept );
void Initialize(const String &rExtraData);
void FillInfo(String &rExtraData) const;
@@ -174,13 +174,13 @@ class SwRedlineAcceptChild : public SwChildWinWrapper
{
public:
SwRedlineAcceptChild( Window* ,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings*,
SfxChildWinInfo* );
SFX_DECL_CHILDWINDOW( SwRedlineAcceptChild );
- virtual BOOL ReInitDlg(SwDocShell *pDocSh);
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
};
diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx
index 0237f560da09..bcdb06393f6c 100644
--- a/sw/source/ui/inc/regionsw.hxx
+++ b/sw/source/ui/inc/regionsw.hxx
@@ -116,14 +116,14 @@ class SwEditRegionDlg : public SfxModalDialog
sfx2::DocumentInserter* m_pDocInserter;
Window* m_pOldDefDlgParent;
- BOOL bDontCheckPasswd :1;
- BOOL bWeb :1;
+ sal_Bool bDontCheckPasswd :1;
+ sal_Bool bWeb :1;
- Image BuildBitmap(BOOL bProtect,BOOL bHidden,BOOL bHighContrast);
+ Image BuildBitmap(sal_Bool bProtect,sal_Bool bHidden,sal_Bool bHighContrast);
void RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry);
- USHORT FindArrPos(const SwSectionFmt* pFmt);
+ sal_uInt16 FindArrPos(const SwSectionFmt* pFmt);
DECL_LINK( GetFirstEntryHdl, SvTreeListBox * );
DECL_LINK( DeselectHdl, SvTreeListBox * );
@@ -147,7 +147,7 @@ class SwEditRegionDlg : public SfxModalDialog
DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* );
DECL_LINK( SubRegionEventHdl, VclWindowEvent * );
- BOOL CheckPasswd(CheckBox* pBox = 0);
+ sal_Bool CheckPasswd(CheckBox* pBox = 0);
public:
SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh );
@@ -221,7 +221,7 @@ public:
void SetWrtShell(SwWrtShell& rSh);
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
static SfxTabPage* Create( Window* pParent,
@@ -260,13 +260,13 @@ class SwSectionFtnEndTabPage : public SfxTabPage
DECL_LINK( FootEndHdl, CheckBox * );
- void ResetState( BOOL bFtn, const SwFmtFtnEndAtTxtEnd& );
+ void ResetState( sal_Bool bFtn, const SwFmtFtnEndAtTxtEnd& );
public:
SwSectionFtnEndTabPage( Window *pParent, const SfxItemSet &rAttrSet );
virtual ~SwSectionFtnEndTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
static SfxTabPage* Create( Window* pParent,
@@ -290,7 +290,7 @@ public:
SwSectionIndentTabPage( Window *pParent, const SfxItemSet &rAttrSet );
virtual ~SwSectionIndentTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
static SfxTabPage* Create( Window* pParent,
@@ -308,7 +308,7 @@ class SwInsertSectionTabDialog : public SfxTabDialog
::std::auto_ptr<SwSectionData> m_pSectionData;
protected:
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
virtual short Ok();
public:
SwInsertSectionTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
@@ -325,7 +325,7 @@ class SwSectionPropertyTabDialog : public SfxTabDialog
{
SwWrtShell& rWrtSh;
protected:
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
SwSectionPropertyTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
virtual ~SwSectionPropertyTabDialog();
diff --git a/sw/source/ui/inc/scroll.hxx b/sw/source/ui/inc/scroll.hxx
index 80c57767fbe2..49d023d17605 100644
--- a/sw/source/ui/inc/scroll.hxx
+++ b/sw/source/ui/inc/scroll.hxx
@@ -33,11 +33,11 @@
class SwScrollbar: public ScrollBar
{
Size aDocSz;
- BOOL bHori :1; // Horizontal = TRUE, sonst Vertikal
- BOOL bAuto :1; // fuer Scrollingmode
- BOOL bThumbEnabled:1;
- BOOL bVisible :1; // Show/Hide sollen nur noch dieses Flag setzen
- BOOL bSizeSet :1; // wurde die Groesse bereits gesetzt?
+ sal_Bool bHori :1; // Horizontal = sal_True, sonst Vertikal
+ sal_Bool bAuto :1; // fuer Scrollingmode
+ sal_Bool bThumbEnabled:1;
+ sal_Bool bVisible :1; // Show/Hide sollen nur noch dieses Flag setzen
+ sal_Bool bSizeSet :1; // wurde die Groesse bereits gesetzt?
void AutoShow();
@@ -47,22 +47,22 @@ class SwScrollbar: public ScrollBar
public:
- void ExtendedShow( BOOL bVisible = TRUE );
- void Hide() { Show( FALSE ); }
+ void ExtendedShow( sal_Bool bVisible = sal_True );
+ void Hide() { Show( sal_False ); }
void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize );
- BOOL IsVisible(BOOL bReal) const { return bReal ? ScrollBar::IsVisible() : bVisible; }
+ sal_Bool IsVisible(sal_Bool bReal) const { return bReal ? ScrollBar::IsVisible() : bVisible; }
// Aenderung der Dokumentgroesse
void DocSzChgd(const Size &rNewSize);
// Aenderung des sichtbaren Bereiches
void ViewPortChgd(const Rectangle &rRectangle);
// was fuer einer ist es denn ??
- BOOL IsHoriScroll() const { return bHori; }
+ sal_Bool IsHoriScroll() const { return bHori; }
- void SetAuto(BOOL bSet);
- BOOL IsAuto() { return bAuto;}
+ void SetAuto(sal_Bool bSet);
+ sal_Bool IsAuto() { return bAuto;}
- SwScrollbar(Window *pParent, BOOL bHori = TRUE );
+ SwScrollbar(Window *pParent, sal_Bool bHori = sal_True );
~SwScrollbar();
};
diff --git a/sw/source/ui/inc/selglos.hxx b/sw/source/ui/inc/selglos.hxx
index 1fa693691086..357600a31c0d 100644
--- a/sw/source/ui/inc/selglos.hxx
+++ b/sw/source/ui/inc/selglos.hxx
@@ -54,8 +54,8 @@ public:
SwSelGlossaryDlg(Window * pParent, const String &rShortName);
~SwSelGlossaryDlg();
void InsertGlos(const String &rRegion, const String &rGlosName); // inline
- USHORT GetSelectedIdx() const; // inline
- void SelectEntryPos(USHORT nIdx); // inline
+ sal_uInt16 GetSelectedIdx() const; // inline
+ void SelectEntryPos(sal_uInt16 nIdx); // inline
};
inline void SwSelGlossaryDlg::InsertGlos(const String &rRegion,
@@ -66,9 +66,9 @@ inline void SwSelGlossaryDlg::InsertGlos(const String &rRegion,
aTmp += rGlosName;
aGlosBox.InsertEntry( aTmp );
}
-inline USHORT SwSelGlossaryDlg::GetSelectedIdx() const
+inline sal_uInt16 SwSelGlossaryDlg::GetSelectedIdx() const
{ return aGlosBox.GetSelectEntryPos(); }
-inline void SwSelGlossaryDlg::SelectEntryPos(USHORT nIdx)
+inline void SwSelGlossaryDlg::SelectEntryPos(sal_uInt16 nIdx)
{ aGlosBox.SelectEntryPos(nIdx); }
#endif
diff --git a/sw/source/ui/inc/shdwcrsr.hxx b/sw/source/ui/inc/shdwcrsr.hxx
index fc95e36de5e7..0652596b128c 100644
--- a/sw/source/ui/inc/shdwcrsr.hxx
+++ b/sw/source/ui/inc/shdwcrsr.hxx
@@ -40,23 +40,23 @@ class SwShadowCursor
Color aCol;
Point aOldPt;
long nOldHeight;
- USHORT nOldMode;
+ sal_uInt16 nOldMode;
- void DrawTri( const Point& rPt, long nHeight, BOOL bLeft );
- void DrawCrsr( const Point& rPt, long nHeight, USHORT nMode );
+ void DrawTri( const Point& rPt, long nHeight, sal_Bool bLeft );
+ void DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode );
public:
SwShadowCursor( Window& rWin, const Color& rCol )
: pWin( &rWin ), aCol( rCol ), nOldHeight(0), nOldMode( USHRT_MAX ) {}
~SwShadowCursor();
- void SetPos( const Point& rPt, long nHeight, USHORT nMode );
+ void SetPos( const Point& rPt, long nHeight, sal_uInt16 nMode );
void Paint();
const Point& GetPoint() const { return aOldPt; }
long GetHeight() const { return nOldHeight; }
- USHORT GetMode() const { return nOldMode; }
+ sal_uInt16 GetMode() const { return nOldMode; }
Rectangle GetRect() const;
};
diff --git a/sw/source/ui/inc/split.hxx b/sw/source/ui/inc/split.hxx
index eafe394d2b27..4929c7318891 100644
--- a/sw/source/ui/inc/split.hxx
+++ b/sw/source/ui/inc/split.hxx
@@ -68,8 +68,8 @@ public:
SwSplitTableDlg(Window *pParent, SwWrtShell& rShell );
DECL_LINK( ClickHdl, Button * );
- BOOL IsHorizontal() const { return aHorzBox.IsChecked(); }
- BOOL IsProportional() const { return aPropCB.IsChecked() && aHorzBox.IsChecked(); }
+ sal_Bool IsHorizontal() const { return aHorzBox.IsChecked(); }
+ sal_Bool IsProportional() const { return aPropCB.IsChecked() && aHorzBox.IsChecked(); }
long GetCount() const { return sal::static_int_cast< long >(aCountEdit.GetValue()); }
};
diff --git a/sw/source/ui/inc/splittbl.hxx b/sw/source/ui/inc/splittbl.hxx
index 3e21b347651a..4bc4ec45f23b 100644
--- a/sw/source/ui/inc/splittbl.hxx
+++ b/sw/source/ui/inc/splittbl.hxx
@@ -45,7 +45,7 @@ class SwSplitTblDlg : public SvxStandardDialog
RadioButton aBorderCopyRB;
SwWrtShell &rShell;
- USHORT m_nSplit;
+ sal_uInt16 m_nSplit;
protected:
virtual void Apply();
@@ -53,7 +53,7 @@ protected:
public:
SwSplitTblDlg( Window *pParent, SwWrtShell &rSh );
- USHORT GetSplitMode() const { return m_nSplit; }
+ sal_uInt16 GetSplitMode() const { return m_nSplit; }
};
#endif
diff --git a/sw/source/ui/inc/srcedtw.hxx b/sw/source/ui/inc/srcedtw.hxx
index c23ee997852d..5b4aafddbcb8 100644
--- a/sw/source/ui/inc/srcedtw.hxx
+++ b/sw/source/ui/inc/srcedtw.hxx
@@ -86,16 +86,16 @@ private:
utl::SourceViewConfig* pSourceViewConfig;
long nCurTextWidth;
- USHORT nStartLine;
+ sal_uInt16 nStartLine;
rtl_TextEncoding eSourceEncoding;
- BOOL bReadonly;
- BOOL bDoSyntaxHighlight;
- BOOL bHighlighting;
+ sal_Bool bReadonly;
+ sal_Bool bDoSyntaxHighlight;
+ sal_Bool bHighlighting;
Timer aSyntaxIdleTimer;
Table aSyntaxLineTable;
- void ImpDoHighlight( const String& rSource, USHORT nLineOff );
+ void ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff );
using OutputDevice::SetFont;
void SetFont();
@@ -114,7 +114,7 @@ protected:
// virtual void LoseFocus();
void CreateTextEngine();
- void DoSyntaxHighlight( USHORT nPara );
+ void DoSyntaxHighlight( sal_uInt16 nPara );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
@@ -127,9 +127,9 @@ public:
void SetScrollBarRanges();
void InitScrollBars();
- ULONG Read( SvStream& rInput)
+ sal_uLong Read( SvStream& rInput)
{return pTextEngine->Read(rInput);}
- ULONG Write( SvStream& rOutput)
+ sal_uLong Write( SvStream& rOutput)
{return pTextEngine->Write(rOutput);}
ExtTextView* GetTextView()
@@ -140,20 +140,20 @@ public:
TextViewOutWin* GetOutWin() {return pOutWin;}
- virtual void Invalidate( USHORT nFlags = 0 );
+ virtual void Invalidate( sal_uInt16 nFlags = 0 );
void ClearModifyFlag()
- { pTextEngine->SetModified(FALSE); }
- BOOL IsModified() const
+ { pTextEngine->SetModified(sal_False); }
+ sal_Bool IsModified() const
{ return pTextEngine->IsModified();}
void CreateScrollbars();
- void SetReadonly(BOOL bSet){bReadonly = bSet;}
- BOOL IsReadonly(){return bReadonly;}
+ void SetReadonly(sal_Bool bSet){bReadonly = bSet;}
+ sal_Bool IsReadonly(){return bReadonly;}
- void DoDelayedSyntaxHighlight( USHORT nPara );
+ void DoDelayedSyntaxHighlight( sal_uInt16 nPara );
- void SetStartLine(USHORT nLine){nStartLine = nLine;}
+ void SetStartLine(sal_uInt16 nLine){nStartLine = nLine;}
virtual void Command( const CommandEvent& rCEvt );
void HandleWheelCommand( const CommandEvent& rCEvt );
diff --git a/sw/source/ui/inc/srcview.hxx b/sw/source/ui/inc/srcview.hxx
index 574696f1fd27..e6574f5bfdce 100644
--- a/sw/source/ui/inc/srcview.hxx
+++ b/sw/source/ui/inc/srcview.hxx
@@ -48,7 +48,7 @@ class SwSrcView: public SfxViewShell
SvxSearchItem* pSearchItem;
- BOOL bSourceSaved :1;
+ sal_Bool bSourceSaved :1;
rtl_TextEncoding eLoadEncoding;
void Init();
@@ -57,10 +57,10 @@ class SwSrcView: public SfxViewShell
protected:
- USHORT StartSearchAndReplace(const SvxSearchItem& rItem,
- BOOL bFromStart,
- BOOL bApi,
- BOOL bRecursive = FALSE);
+ sal_uInt16 StartSearchAndReplace(const SvxSearchItem& rItem,
+ sal_Bool bFromStart,
+ sal_Bool bApi,
+ sal_Bool bRecursive = sal_False);
public:
@@ -79,7 +79,7 @@ public:
void SaveContent(const String& rTmpFile);
void SaveContentTo(SfxMedium& rMed);
- BOOL IsModified() {return aEditWin.IsModified();}
+ sal_Bool IsModified() {return aEditWin.IsModified();}
@@ -91,13 +91,13 @@ public:
void Load(SwDocShell* pDocShell);
- virtual USHORT SetPrinter( SfxPrinter* pNew, USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false );
- virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false );
+ virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False );
sal_Int32 PrintSource( OutputDevice *pOutDev, sal_Int32 nPage, bool bCalcNumPagesOnly );
- void SourceSaved() {bSourceSaved = TRUE;}
- BOOL HasSourceSaved() const {return bSourceSaved;}
+ void SourceSaved() {bSourceSaved = sal_True;}
+ sal_Bool HasSourceSaved() const {return bSourceSaved;}
};
diff --git a/sw/source/ui/inc/srtdlg.hxx b/sw/source/ui/inc/srtdlg.hxx
index 09d91cf64195..5c813b796051 100644
--- a/sw/source/ui/inc/srtdlg.hxx
+++ b/sw/source/ui/inc/srtdlg.hxx
@@ -98,8 +98,8 @@ class SwSortDlg : public SvxStandardDialog
SwWrtShell &rSh;
CollatorRessource* pColRes;
- USHORT nX;
- USHORT nY;
+ sal_uInt16 nX;
+ sal_uInt16 nY;
virtual void Apply();
sal_Unicode GetDelimChar() const;
diff --git a/sw/source/ui/inc/swcont.hxx b/sw/source/ui/inc/swcont.hxx
index f9d5dd049b1d..4c906ee8eacb 100644
--- a/sw/source/ui/inc/swcont.hxx
+++ b/sw/source/ui/inc/swcont.hxx
@@ -69,13 +69,13 @@ class SwContentType;
//mini rtti
class SwTypeNumber
{
- BYTE nTypeId;
+ sal_uInt8 nTypeId;
public:
- SwTypeNumber(BYTE nId) :nTypeId(nId){}
+ SwTypeNumber(sal_uInt8 nId) :nTypeId(nId){}
virtual ~SwTypeNumber();
- virtual BYTE GetTypeId();
+ virtual sal_uInt8 GetTypeId();
};
//----------------------------------------------------------------------------
@@ -84,17 +84,17 @@ class SwContent : public SwTypeNumber
const SwContentType* pParent;
String sContentName;
long nYPosition;
- BOOL bInvisible;
+ sal_Bool bInvisible;
public:
SwContent(const SwContentType* pCnt, const String& rName, long nYPos );
- virtual BOOL IsProtect() const;
+ virtual sal_Bool IsProtect() const;
const SwContentType* GetParent() const {return pParent;}
const String& GetName() const {return sContentName;}
int operator==(const SwContent& /*rCont*/) const
{
//gleich sind sie nie, sonst fallen sie aus dem Array
- return FALSE;
+ return sal_False;
}
int operator<(const SwContent& rCont) const
{
@@ -106,8 +106,8 @@ public:
long GetYPos() const {return nYPosition;}
- BOOL IsInvisible() const {return bInvisible;}
- void SetInvisible(){ bInvisible = TRUE;}
+ sal_Bool IsInvisible() const {return bInvisible;}
+ void SetInvisible(){ bInvisible = sal_True;}
};
#endif
diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx
index 041b55d9c6db..2206802fb05a 100644
--- a/sw/source/ui/inc/swdtflvr.hxx
+++ b/sw/source/ui/inc/swdtflvr.hxx
@@ -82,8 +82,8 @@ class SwTransferable : public TransferableHelper
TransferBufferType eBufferType;
- BOOL bOldIdle :1; //D&D Idle flag from the viewsettings
- BOOL bCleanUp :1; //D&D cleanup after Drop (not by internal Drop)
+ sal_Bool bOldIdle :1; //D&D Idle flag from the viewsettings
+ sal_Bool bCleanUp :1; //D&D cleanup after Drop (not by internal Drop)
// helper methods for the copy
com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > FindOLEObj( sal_Int64& nAspect ) const;
@@ -92,50 +92,50 @@ class SwTransferable : public TransferableHelper
// helper methods for the paste
static SwTransferable* GetSwTransferable( const TransferableDataHelper& rData );
- static void SetSelInShell( SwWrtShell& , BOOL , const Point* );
- static BOOL _CheckForURLOrLNKFile( TransferableDataHelper& rData,
+ static void SetSelInShell( SwWrtShell& , sal_Bool , const Point* );
+ static sal_Bool _CheckForURLOrLNKFile( TransferableDataHelper& rData,
String& rFileName, String* pTitle = 0 );
static int _TestAllowedFormat( const TransferableDataHelper& rData,
- ULONG nFormat, USHORT nDestination );
+ sal_uLong nFormat, sal_uInt16 nDestination );
static int _PasteFileContent( TransferableDataHelper&,
- SwWrtShell& rSh, ULONG nFmt, BOOL bMsg );
+ SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bMsg );
static int _PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, BYTE nActionFlags, BOOL bMsg );
+ sal_uLong nFmt, sal_uInt8 nActionFlags, sal_Bool bMsg );
static int _PasteTargetURL( TransferableDataHelper& rData, SwWrtShell& rSh,
- USHORT nAction, const Point* pPt, BOOL bInsertGRF );
+ sal_uInt16 nAction, const Point* pPt, sal_Bool bInsertGRF );
static int _PasteDDE( TransferableDataHelper& rData, SwWrtShell& rWrtShell,
- BOOL bReReadGrf, BOOL bMsg );
+ sal_Bool bReReadGrf, sal_Bool bMsg );
static int _PasteSdrFormat( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction,
- const Point* pPt, BYTE nActionFlags );
+ SwWrtShell& rSh, sal_uInt16 nAction,
+ const Point* pPt, sal_uInt8 nActionFlags );
static int _PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, USHORT nAction, const Point* pPt,
- BYTE nActionFlags, BOOL bMsg );
+ sal_uLong nFmt, sal_uInt16 nAction, const Point* pPt,
+ sal_uInt8 nActionFlags, sal_Bool bMsg );
static int _PasteImageMap( TransferableDataHelper& rData,
SwWrtShell& rSh );
static int _PasteAsHyperlink( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt );
+ SwWrtShell& rSh, sal_uLong nFmt );
static int _PasteFileName( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt, USHORT nAction,
- const Point* pPt, BYTE nActionFlags, BOOL bMsg );
+ SwWrtShell& rSh, sal_uLong nFmt, sal_uInt16 nAction,
+ const Point* pPt, sal_uInt8 nActionFlags, sal_Bool bMsg );
static int _PasteDBData( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, BOOL bLink, const Point* pDragPt,
- BOOL bMsg );
+ sal_uLong nFmt, sal_Bool bLink, const Point* pDragPt,
+ sal_Bool bMsg );
static int _PasteFileList( TransferableDataHelper& rData,
- SwWrtShell& rSh, BOOL bLink,
- const Point* pPt, BOOL bMsg );
+ SwWrtShell& rSh, sal_Bool bLink,
+ const Point* pPt, sal_Bool bMsg );
- int PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, BOOL bMove,
- BOOL bIsXSelection );
+ int PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, sal_Bool bMove,
+ sal_Bool bIsXSelection );
int PrivatePaste( SwWrtShell& rShell );
void SetDataForDragAndDrop( const Point& rSttPos );
@@ -161,7 +161,7 @@ public:
SwTransferable( SwWrtShell& );
virtual ~SwTransferable();
- static USHORT GetSotDestination( const SwWrtShell& rSh, const Point* = 0 );
+ static sal_uInt16 GetSotDestination( const SwWrtShell& rSh, const Point* = 0 );
// set properties on the document, like PageMargin, VisArea.
// And set real Size
@@ -169,8 +169,8 @@ public:
// copy - methods and helper methods for the copy
int Cut();
- int Copy( BOOL bIsCut = FALSE );
- int PrepareForCopy( BOOL bIsCut = FALSE );
+ int Copy( sal_Bool bIsCut = sal_False );
+ int PrepareForCopy( sal_Bool bIsCut = sal_False );
int CalculateAndCopy(); // special for Calculator
int CopyGlossary( SwTextBlocks& rGlossary, const String& rStr );
@@ -178,21 +178,21 @@ public:
void RemoveDDELinkFormat( const Window& rWin );
// paste - methods and helper methods for the paste
- static BOOL IsPaste( const SwWrtShell&, const TransferableDataHelper& );
+ static sal_Bool IsPaste( const SwWrtShell&, const TransferableDataHelper& );
static int Paste( SwWrtShell&, TransferableDataHelper& );
static int PasteData( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction, ULONG nFormat,
- USHORT nDestination, BOOL bIsPasteFmt,
+ SwWrtShell& rSh, sal_uInt16 nAction, sal_uLong nFormat,
+ sal_uInt16 nDestination, sal_Bool bIsPasteFmt,
sal_Bool bIsDefault,
const Point* pDDPos = 0, sal_Int8 nDropAction = 0,
- BOOL bPasteSelection = FALSE );
+ sal_Bool bPasteSelection = sal_False );
- static BOOL IsPasteSpecial( const SwWrtShell& rWrtShell,
+ static sal_Bool IsPasteSpecial( const SwWrtShell& rWrtShell,
const TransferableDataHelper& );
static int PasteUnformatted( SwWrtShell& rSh, TransferableDataHelper& );
- static int PasteSpecial( SwWrtShell& rSh, TransferableDataHelper&, ULONG& rFormatUsed );
+ static int PasteSpecial( SwWrtShell& rSh, TransferableDataHelper&, sal_uLong& rFormatUsed );
static int PasteFormat( SwWrtShell& rSh, TransferableDataHelper& rData,
- ULONG nFormat );
+ sal_uLong nFormat );
static void FillClipFmtItem( const SwWrtShell& rSh,
const TransferableDataHelper& rData,
@@ -202,7 +202,7 @@ public:
void StartDrag( Window* pWin, const Point& rPos );
SwWrtShell* GetShell() { return pWrtShell; }
- void SetCleanUp( BOOL bFlag ) { bCleanUp = bFlag; }
+ void SetCleanUp( sal_Bool bFlag ) { bCleanUp = bFlag; }
// Interfaces for Selection
/* #96392# Added pCreator to distinguish SwFrameShell from SwWrtShell. */
diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx
index a0d7ebf03ca1..7bc40b394013 100644
--- a/sw/source/ui/inc/swlbox.hxx
+++ b/sw/source/ui/inc/swlbox.hxx
@@ -51,14 +51,14 @@ class SW_DLLPUBLIC SwBoxEntry
{
friend class SwComboBox;
- BOOL bModified : 1;
- BOOL bNew : 1;
+ sal_Bool bModified : 1;
+ sal_Bool bNew : 1;
String aName;
- USHORT nId;
+ sal_uInt16 nId;
public:
- SwBoxEntry(const String& aName, USHORT nId=0);
+ SwBoxEntry(const String& aName, sal_uInt16 nId=0);
SwBoxEntry(const SwBoxEntry& rOrg);
SwBoxEntry();
@@ -69,7 +69,7 @@ public:
Beschreibung: fuer ComboBoxen
--------------------------------------------------------------------*/
-typedef USHORT SwComboBoxStyle;
+typedef sal_uInt16 SwComboBoxStyle;
namespace nsSwComboBoxStyle
{
const SwComboBoxStyle CBS_UPPER = 0x01;
@@ -84,7 +84,7 @@ class SW_DLLPUBLIC SwComboBox : public ComboBox
SwEntryLst aEntryLst;
SwEntryLst aDelEntryLst;
SwBoxEntry aDefault;
- USHORT nStyle;
+ sal_uInt16 nStyle;
SW_DLLPRIVATE void InitComboBox();
SW_DLLPRIVATE void InsertSorted(SwBoxEntry* pEntry);
@@ -98,25 +98,25 @@ public:
using ComboBox::GetEntryPos;
SwComboBox(Window* pParent, const ResId& rId,
- USHORT nStyleBits = nsSwComboBoxStyle::CBS_ALL);
+ sal_uInt16 nStyleBits = nsSwComboBoxStyle::CBS_ALL);
~SwComboBox();
virtual void KeyInput( const KeyEvent& rKEvt );
void InsertEntry(const SwBoxEntry&);
- USHORT InsertEntry( const XubString& rStr, USHORT = 0)
+ sal_uInt16 InsertEntry( const XubString& rStr, sal_uInt16 = 0)
{ InsertEntry( SwBoxEntry( rStr ) ); return 0; }
- void RemoveEntry(USHORT nPos);
+ void RemoveEntry(sal_uInt16 nPos);
- USHORT GetEntryPos(const SwBoxEntry& rEntry) const;
- const SwBoxEntry& GetEntry(USHORT) const;
+ sal_uInt16 GetEntryPos(const SwBoxEntry& rEntry) const;
+ const SwBoxEntry& GetEntry(sal_uInt16) const;
- USHORT GetRemovedCount() const;
- const SwBoxEntry& GetRemovedEntry(USHORT nPos) const;
+ sal_uInt16 GetRemovedCount() const;
+ const SwBoxEntry& GetRemovedEntry(sal_uInt16 nPos) const;
- USHORT GetStyle() const { return nStyle; }
- void SetStyle(const USHORT nSt) { nStyle = nSt; }
+ sal_uInt16 GetStyle() const { return nStyle; }
+ void SetStyle(const sal_uInt16 nSt) { nStyle = nSt; }
String GetText() const;
};
diff --git a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
index c3af65d764ff..90bc788e3c54 100644
--- a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
+++ b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
@@ -41,7 +41,7 @@ public:
SwModalRedlineAcceptDlg(Window *pParent);
~SwModalRedlineAcceptDlg();
- void AcceptAll( BOOL bAccept );
+ void AcceptAll( sal_Bool bAccept );
virtual void Activate();
};
diff --git a/sw/source/ui/inc/swtablerep.hxx b/sw/source/ui/inc/swtablerep.hxx
index 20af27911317..e874c78aa624 100644
--- a/sw/source/ui/inc/swtablerep.hxx
+++ b/sw/source/ui/inc/swtablerep.hxx
@@ -42,20 +42,20 @@ class SW_DLLPUBLIC SwTableRep
SwTwips nSpace;
SwTwips nLeftSpace;
SwTwips nRightSpace;
- USHORT nAlign;
- USHORT nColCount;
- USHORT nAllCols;
- USHORT nWidthPercent;
- BOOL bComplex : 1;
- BOOL bLineSelected : 1;
- BOOL bWidthChanged : 1;
- BOOL bColsChanged : 1;
+ sal_uInt16 nAlign;
+ sal_uInt16 nColCount;
+ sal_uInt16 nAllCols;
+ sal_uInt16 nWidthPercent;
+ sal_Bool bComplex : 1;
+ sal_Bool bLineSelected : 1;
+ sal_Bool bWidthChanged : 1;
+ sal_Bool bColsChanged : 1;
public:
- SwTableRep( const SwTabCols& rTabCol, BOOL bComplex );
+ SwTableRep( const SwTabCols& rTabCol, sal_Bool bComplex );
~SwTableRep();
- BOOL FillTabCols( SwTabCols& rTabCol ) const;
+ sal_Bool FillTabCols( SwTabCols& rTabCol ) const;
SwTwips GetLeftSpace() const {return nLeftSpace;}
void SetLeftSpace(SwTwips nSet) {nLeftSpace = nSet;}
@@ -66,24 +66,24 @@ public:
SwTwips GetWidth() const {return nTblWidth;}
void SetWidth(SwTwips nSet) {nTblWidth = nSet;}
- USHORT GetWidthPercent() const {return nWidthPercent;}
- void SetWidthPercent(USHORT nSet) {nWidthPercent = nSet;}
+ sal_uInt16 GetWidthPercent() const {return nWidthPercent;}
+ void SetWidthPercent(sal_uInt16 nSet) {nWidthPercent = nSet;}
- USHORT GetAlign() const {return nAlign;}
- void SetAlign(USHORT nSet) {nAlign = nSet;}
+ sal_uInt16 GetAlign() const {return nAlign;}
+ void SetAlign(sal_uInt16 nSet) {nAlign = nSet;}
- BOOL IsComplex() const {return bComplex;}
- USHORT GetColCount() const {return nColCount;}
- USHORT GetAllColCount() const {return nAllCols;}
+ sal_Bool IsComplex() const {return bComplex;}
+ sal_uInt16 GetColCount() const {return nColCount;}
+ sal_uInt16 GetAllColCount() const {return nAllCols;}
- BOOL HasColsChanged() const {return bColsChanged;}
- void SetColsChanged() {bColsChanged = TRUE;}
+ sal_Bool HasColsChanged() const {return bColsChanged;}
+ void SetColsChanged() {bColsChanged = sal_True;}
- BOOL HasWidthChanged() const {return bWidthChanged;}
- void SetWidthChanged() {bWidthChanged = TRUE;}
+ sal_Bool HasWidthChanged() const {return bWidthChanged;}
+ void SetWidthChanged() {bWidthChanged = sal_True;}
- BOOL IsLineSelected() const {return bLineSelected;}
- void SetLineSelected(BOOL bSet) {bLineSelected = bSet;}
+ sal_Bool IsLineSelected() const {return bLineSelected;}
+ void SetLineSelected(sal_Bool bSet) {bLineSelected = bSet;}
SwTwips GetSpace() const { return nSpace;}
void SetSpace(SwTwips nSet) {nSpace = nSet;}
diff --git a/sw/source/ui/inc/swuiccoll.hxx b/sw/source/ui/inc/swuiccoll.hxx
index 5079d9ebda08..1ed54fafe629 100644
--- a/sw/source/ui/inc/swuiccoll.hxx
+++ b/sw/source/ui/inc/swuiccoll.hxx
@@ -57,7 +57,7 @@ class SwCondCollPage : public SfxTabPage
CollName* pNms;
- BOOL bNewTemplate;
+ sal_Bool bNewTemplate;
SwCondCollPage(Window *pParent, const SfxItemSet &rSet);
@@ -75,12 +75,12 @@ class SwCondCollPage : public SfxTabPage
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet( SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet( SfxItemSet &rSet);
virtual void Reset (const SfxItemSet &rSet);
- void SetCollection( SwFmt* pFormat, BOOL bNew );
+ void SetCollection( SwFmt* pFormat, sal_Bool bNew );
};
diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx
index 4a1294187876..7a02000f7151 100644
--- a/sw/source/ui/inc/swuicnttab.hxx
+++ b/sw/source/ui/inc/swuicnttab.hxx
@@ -95,12 +95,12 @@ class SwMultiTOXTabDialog : public SfxTabDialog
CurTOXType eCurrentTOXType;
String sUserDefinedIndex;
- USHORT nTypeCount;
- USHORT nInitialTOXType;
+ sal_uInt16 nTypeCount;
+ sal_uInt16 nInitialTOXType;
- BOOL bEditTOX;
- BOOL bExampleCreated;
- BOOL bGlobalFlag;
+ sal_Bool bEditTOX;
+ sal_Bool bExampleCreated;
+ sal_Bool bGlobalFlag;
virtual short Ok();
SwTOXDescription* CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX);
@@ -111,11 +111,11 @@ class SwMultiTOXTabDialog : public SfxTabDialog
public:
SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet,
SwWrtShell &rShell,
- SwTOXBase* pCurTOX, USHORT nToxType = USHRT_MAX,
- BOOL bGlobal = FALSE);
+ SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX,
+ sal_Bool bGlobal = sal_False);
~SwMultiTOXTabDialog();
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
SwForm* GetForm(CurTOXType eType);
@@ -126,15 +126,15 @@ public:
}
void UpdateExample();
- BOOL IsTOXEditMode() const { return bEditTOX;}
+ sal_Bool IsTOXEditMode() const { return bEditTOX;}
SwWrtShell& GetWrtShell() {return rSh;}
SwTOXDescription& GetTOXDescription(CurTOXType eTOXTypes);
void CreateOrUpdateExample(
- TOXTypes nTOXIndex, USHORT nPage = 0, USHORT nCurLevel = USHRT_MAX);
+ TOXTypes nTOXIndex, sal_uInt16 nPage = 0, sal_uInt16 nCurLevel = USHRT_MAX);
- static BOOL IsNoNum(SwWrtShell& rSh, const String& rName);
+ static sal_Bool IsNoNum(SwWrtShell& rSh, const String& rName);
};
/* -----------------14.07.99 12:17-------------------
@@ -229,7 +229,7 @@ class SwTOXSelectTabPage : public SfxTabPage
const IndexEntrySupplierWrapper* pIndexEntryWrapper;
- BOOL bFirstCall;
+ sal_Bool bFirstCall;
DECL_LINK(TOXTypeHdl, ListBox* );
DECL_LINK(TOXAreaHdl, ListBox* );
@@ -253,7 +253,7 @@ public:
SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrSet);
~SwTOXSelectTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
virtual void ActivatePage( const SfxItemSet& );
@@ -282,8 +282,8 @@ class SwTokenWindow : public Window
ImageButton aRightScrollWin;
TOXControlList aControlList;
SwForm* pForm;
- USHORT nLevel;
- BOOL bValid;
+ sal_uInt16 nLevel;
+ sal_Bool bValid;
String aButtonTexts[TOKEN_END]; // Text of the buttons
String aButtonHelpTexts[TOKEN_END]; // QuickHelpText of the buttons
String sCharStyle;
@@ -311,12 +311,12 @@ public:
SwTokenWindow(SwTOXEntryTabPage* pParent, const ResId& rResId);
~SwTokenWindow();
- void SetForm(SwForm& rForm, USHORT nLevel);
- USHORT GetLastLevel()const {return nLevel;};
+ void SetForm(SwForm& rForm, sal_uInt16 nLevel);
+ sal_uInt16 GetLastLevel()const {return nLevel;};
- BOOL IsValid() const {return bValid;}
+ sal_Bool IsValid() const {return bValid;}
- void SetInvalid() {bValid = FALSE;}
+ void SetInvalid() {bValid = sal_False;}
String GetPattern() const;
@@ -329,14 +329,14 @@ public:
{ return pActiveCtrl;}
void InsertAtSelection(const String& rText, const SwFormToken& aToken);
- void RemoveControl(SwTOXButton* pDel, BOOL bInternalCall = FALSE);
+ void RemoveControl(SwTOXButton* pDel, sal_Bool bInternalCall = sal_False);
- BOOL Contains(FormTokenType) const;
+ sal_Bool Contains(FormTokenType) const;
- BOOL DetermineLinkStart();
+ sal_Bool DetermineLinkStart();
//helper for pattern buttons and edits
- BOOL CreateQuickHelp(Control* pCtrl,
+ sal_Bool CreateQuickHelp(Control* pCtrl,
const SwFormToken& rToken, const HelpEvent& );
virtual void Resize();
@@ -439,7 +439,7 @@ class SwTOXEntryTabPage : public SfxTabPage
Size aLevelFLSize;
CurTOXType aLastTOXType;
- BOOL bInLevelHdl;
+ sal_Bool bInLevelHdl;
Point aChapterEntryFTPosition; //!< holds position of ChapterEntryFT control,
//to be used in moving the element among different tokens
@@ -474,7 +474,7 @@ public:
SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet);
~SwTOXEntryTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
virtual void ActivatePage( const SfxItemSet& );
virtual int DeactivatePage( SfxItemSet* pSet = 0 );
@@ -483,7 +483,7 @@ public:
const SfxItemSet& rAttrSet);
void SetWrtShell(SwWrtShell& rSh);
- String GetLevelHelp(USHORT nLevel) const;
+ String GetLevelHelp(sal_uInt16 nLevel) const;
void PreTokenButtonRemoved(const SwFormToken& rToken);
};
@@ -524,7 +524,7 @@ public:
SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrSet);
~SwTOXStylesTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
virtual void ActivatePage( const SfxItemSet& );
diff --git a/sw/source/ui/inc/swuiidxmrk.hxx b/sw/source/ui/inc/swuiidxmrk.hxx
index 3f529f91affe..28f1d0d53e74 100644
--- a/sw/source/ui/inc/swuiidxmrk.hxx
+++ b/sw/source/ui/inc/swuiidxmrk.hxx
@@ -116,11 +116,11 @@ class SwIndexMarkDlg : public Window
sal_Bool bNewMark;
sal_Bool bSelected;
- BOOL bPhoneticED0_ChangedByUser;
- BOOL bPhoneticED1_ChangedByUser;
- BOOL bPhoneticED2_ChangedByUser;
+ sal_Bool bPhoneticED0_ChangedByUser;
+ sal_Bool bPhoneticED1_ChangedByUser;
+ sal_Bool bPhoneticED2_ChangedByUser;
LanguageType nLangForPhoneticReading; //Language of current text used for phonetic reading proposal
- BOOL bIsPhoneticReadingEnabled; //this value states wether phopentic reading is enabled in principle dependend of global cjk settings and language of current entry
+ sal_Bool bIsPhoneticReadingEnabled; //this value states wether phopentic reading is enabled in principle dependend of global cjk settings and language of current entry
com::sun::star::uno::Reference< com::sun::star::i18n::XExtendedIndexEntrySupplier >
xExtendedIndexEntrySupplier;
diff --git a/sw/source/ui/inc/swuipardlg.hxx b/sw/source/ui/inc/swuipardlg.hxx
index d9460f62ad65..74f798d7d6ca 100644
--- a/sw/source/ui/inc/swuipardlg.hxx
+++ b/sw/source/ui/inc/swuipardlg.hxx
@@ -31,20 +31,20 @@
class SwParaDlg: public SfxTabDialog
{
SwView& rView;
- USHORT nHtmlMode;
- BYTE nDlgMode;
- BOOL bDrawParaDlg;
+ sal_uInt16 nHtmlMode;
+ sal_uInt8 nDlgMode;
+ sal_Bool bDrawParaDlg;
- void PageCreated(USHORT nID, SfxTabPage& rPage);
+ void PageCreated(sal_uInt16 nID, SfxTabPage& rPage);
public:
SwParaDlg( Window *pParent,
SwView& rVw,
const SfxItemSet&,
- BYTE nDialogMode,
+ sal_uInt8 nDialogMode,
const String *pCollName = 0,
- BOOL bDraw = FALSE,
- UINT16 nDefPage = 0);
+ sal_Bool bDraw = sal_False,
+ sal_uInt16 nDefPage = 0);
~SwParaDlg();
};
diff --git a/sw/source/ui/inc/swwrtshitem.hxx b/sw/source/ui/inc/swwrtshitem.hxx
index 3e33c3722f6b..661cedfc2502 100644
--- a/sw/source/ui/inc/swwrtshitem.hxx
+++ b/sw/source/ui/inc/swwrtshitem.hxx
@@ -38,7 +38,7 @@ class SW_DLLPUBLIC SwWrtShellItem: public SfxPoolItem
public:
TYPEINFO();
SwWrtShellItem();
- SwWrtShellItem( USHORT nWhich , SwWrtShell* pWrtSh);
+ SwWrtShellItem( sal_uInt16 nWhich , SwWrtShell* pWrtSh);
SwWrtShellItem( const SwWrtShellItem& );
diff --git a/sw/source/ui/inc/syncbtn.hxx b/sw/source/ui/inc/syncbtn.hxx
index 0ae8c7009426..5022881a4854 100644
--- a/sw/source/ui/inc/syncbtn.hxx
+++ b/sw/source/ui/inc/syncbtn.hxx
@@ -59,7 +59,7 @@ class SwSyncChildWin : public SfxChildWindow
{
public:
SwSyncChildWin( Window* ,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings*,
SfxChildWinInfo* );
diff --git a/sw/source/ui/inc/tabledlg.hxx b/sw/source/ui/inc/tabledlg.hxx
index 497d16449774..9f1553a2ccd0 100644
--- a/sw/source/ui/inc/tabledlg.hxx
+++ b/sw/source/ui/inc/tabledlg.hxx
@@ -43,9 +43,9 @@ struct TColumn;
class SwTableTabDlg : public SfxTabDialog
{
SwWrtShell* pShell;
- USHORT nHtmlMode;
+ sal_uInt16 nHtmlMode;
- virtual void PageCreated(USHORT nId, SfxTabPage& rPage);
+ virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage);
public:
SwTableTabDlg( Window* pParent, SfxItemPool& Pool,
const SfxItemSet* pItemSet, SwWrtShell* pSh );
diff --git a/sw/source/ui/inc/tablemgr.hxx b/sw/source/ui/inc/tablemgr.hxx
index 4256d4069fe2..844f76833cbc 100644
--- a/sw/source/ui/inc/tablemgr.hxx
+++ b/sw/source/ui/inc/tablemgr.hxx
@@ -52,7 +52,7 @@ class SW_DLLPUBLIC SwTableFUNC
{
SwFrmFmt *pFmt;
SwWrtShell *pSh;
- BOOL bCopy;
+ sal_Bool bCopy;
SwTabCols aCols;
private:
@@ -60,18 +60,18 @@ private:
public:
inline SwTableFUNC(SwFrmFmt &);
- SwTableFUNC(SwWrtShell *pShell, BOOL bCopyFmt = FALSE);
+ SwTableFUNC(SwWrtShell *pShell, sal_Bool bCopyFmt = sal_False);
~SwTableFUNC();
void InitTabCols();
void ColWidthDlg(Window *pParent );
- SwTwips GetColWidth(USHORT nNum) const;
- SwTwips GetMaxColWidth(USHORT nNum) const;
- void SetColWidth(USHORT nNum, SwTwips nWidth );
- USHORT GetColCount() const;
- USHORT GetCurColNum() const;
+ SwTwips GetColWidth(sal_uInt16 nNum) const;
+ SwTwips GetMaxColWidth(sal_uInt16 nNum) const;
+ void SetColWidth(sal_uInt16 nNum, SwTwips nWidth );
+ sal_uInt16 GetColCount() const;
+ sal_uInt16 GetCurColNum() const;
- BOOL IsTableSelected() const { return pFmt != 0; }
+ sal_Bool IsTableSelected() const { return pFmt != 0; }
const SwFrmFmt *GetTableFmt() const { return pFmt; }
@@ -88,7 +88,7 @@ public:
inline SwTableFUNC::SwTableFUNC(SwFrmFmt &rFmt) :
pFmt(&rFmt),
pSh(0),
- bCopy(FALSE)
+ bCopy(sal_False)
{
}
diff --git a/sw/source/ui/inc/tabsh.hxx b/sw/source/ui/inc/tabsh.hxx
index 3e3c1304b1ee..a1e5c37dcc27 100644
--- a/sw/source/ui/inc/tabsh.hxx
+++ b/sw/source/ui/inc/tabsh.hxx
@@ -35,8 +35,8 @@ class SwWrtShell;
SW_DLLPUBLIC void ItemSetToTableParam( const SfxItemSet& rSet, SwWrtShell &rSh );
-extern const USHORT __FAR_DATA aUITableAttrRange[];
-SW_DLLPUBLIC const USHORT* SwuiGetUITableAttrRange();
+extern const sal_uInt16 __FAR_DATA aUITableAttrRange[];
+SW_DLLPUBLIC const sal_uInt16* SwuiGetUITableAttrRange();
class SwTableShell: public SwBaseShell
{
diff --git a/sw/source/ui/inc/tautofmt.hxx b/sw/source/ui/inc/tautofmt.hxx
index 9c35450eb208..9a9ad24947d6 100644
--- a/sw/source/ui/inc/tautofmt.hxx
+++ b/sw/source/ui/inc/tautofmt.hxx
@@ -88,14 +88,14 @@ class SwAutoFormatDlg : public SfxModalDialog
//------------------------
SwWrtShell* pShell;
SwTableAutoFmtTbl* pTableTbl;
- BYTE nIndex;
- BYTE nDfltStylePos;
- BOOL bCoreDataChanged : 1;
- BOOL bSetAutoFmt : 1;
+ sal_uInt8 nIndex;
+ sal_uInt8 nDfltStylePos;
+ sal_Bool bCoreDataChanged : 1;
+ sal_Bool bSetAutoFmt : 1;
void Init( const SwTableAutoFmt* pSelFmt );
- void UpdateChecks( const SwTableAutoFmt&, BOOL bEnableBtn );
+ void UpdateChecks( const SwTableAutoFmt&, sal_Bool bEnableBtn );
//------------------------
DECL_LINK( CheckHdl, Button * );
DECL_LINK( OkHdl, Button * );
@@ -106,7 +106,7 @@ class SwAutoFormatDlg : public SfxModalDialog
public:
SwAutoFormatDlg( Window* pParent, SwWrtShell* pShell,
- BOOL bSetAutoFmt = TRUE,
+ sal_Bool bSetAutoFmt = sal_True,
const SwTableAutoFmt* pSelFmt = 0 );
virtual ~SwAutoFormatDlg();
diff --git a/sw/source/ui/inc/tblctrl.hxx b/sw/source/ui/inc/tblctrl.hxx
index f46103098278..d96b85f21208 100644
--- a/sw/source/ui/inc/tblctrl.hxx
+++ b/sw/source/ui/inc/tblctrl.hxx
@@ -41,7 +41,7 @@ class SwTableOptimizeCtrl : public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- SwTableOptimizeCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwTableOptimizeCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwTableOptimizeCtrl();
virtual SfxPopupWindowType GetPopupWindowType() const;
diff --git a/sw/source/ui/inc/tbxanchr.hxx b/sw/source/ui/inc/tbxanchr.hxx
index a2c378f15198..9edc1e22fbe2 100644
--- a/sw/source/ui/inc/tbxanchr.hxx
+++ b/sw/source/ui/inc/tbxanchr.hxx
@@ -31,17 +31,17 @@
class SwTbxAnchor : public SfxToolBoxControl
{
- USHORT nActAnchorId;
+ sal_uInt16 nActAnchorId;
public:
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
virtual void Click();
virtual SfxPopupWindow* CreatePopupWindow();
SFX_DECL_TOOLBOX_CONTROL();
- SwTbxAnchor( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwTbxAnchor();
};
diff --git a/sw/source/ui/inc/textcontrolcombo.hxx b/sw/source/ui/inc/textcontrolcombo.hxx
index dbf42d86d085..08209cd70403 100644
--- a/sw/source/ui/inc/textcontrolcombo.hxx
+++ b/sw/source/ui/inc/textcontrolcombo.hxx
@@ -52,14 +52,14 @@ public:
Control& _rCtrl, FixedText& _rFTbefore, FixedText& _rFTafter );
virtual ~TextControlCombo();
- void Arrange( FixedText& _rOrg, BOOL bShow = true );
+ void Arrange( FixedText& _rOrg, sal_Bool bShow = true );
// identical to window functionality
- void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 );
- void Hide( USHORT nFlags = 0 ) { Show( FALSE, nFlags ); }
+ void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 );
+ void Hide( sal_uInt16 nFlags = 0 ) { Show( sal_False, nFlags ); }
- void Enable( BOOL bEnable = TRUE, BOOL bChild = TRUE );
- void Disable( BOOL bChild = TRUE ) { Enable( FALSE, bChild ); }
+ void Enable( sal_Bool bEnable = sal_True, sal_Bool bChild = sal_True );
+ void Disable( sal_Bool bChild = sal_True ) { Enable( sal_False, bChild ); }
};
diff --git a/sw/source/ui/inc/textsh.hxx b/sw/source/ui/inc/textsh.hxx
index d4ec7b99ed25..5e3358c2b20a 100644
--- a/sw/source/ui/inc/textsh.hxx
+++ b/sw/source/ui/inc/textsh.hxx
@@ -41,7 +41,7 @@ class SwTextShell: public SwBaseShell
void InsertSymbol( SfxRequest& );
void InsertHyperlink(const SvxHyperlinkItem& rHlnkItem);
bool InsertMediaDlg( SfxRequest& );
- void ChangeHeaderOrFooter(const String& rStyleName, BOOL bHeader, BOOL bOn, BOOL bShowWarning);
+ void ChangeHeaderOrFooter(const String& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning);
public:
SFX_DECL_INTERFACE(SW_TEXTSHELL)
diff --git a/sw/source/ui/inc/tmpdlg.hxx b/sw/source/ui/inc/tmpdlg.hxx
index 7971a6607915..f3feddfc89ed 100644
--- a/sw/source/ui/inc/tmpdlg.hxx
+++ b/sw/source/ui/inc/tmpdlg.hxx
@@ -39,25 +39,25 @@ class SwWrtShell;
class SwTemplateDlg: public SfxStyleDialog
{
- USHORT nType;
- USHORT nHtmlMode;
+ sal_uInt16 nType;
+ sal_uInt16 nHtmlMode;
SwWrtShell* pWrtShell;
- BOOL bNewStyle;
+ sal_Bool bNewStyle;
DECL_LINK( NumOptionsHdl, PushButton* );
public:
SwTemplateDlg( Window* pParent,
SfxStyleSheetBase& rBase,
- USHORT nRegion,
- BOOL bColumn = FALSE,
+ sal_uInt16 nRegion,
+ sal_Bool bColumn = sal_False,
SwWrtShell* pActShell = 0,
- BOOL bNew = FALSE );
+ sal_Bool bNew = sal_False );
~SwTemplateDlg();
const SfxItemSet* GetRefreshedSet();
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
virtual short Ok();
};
diff --git a/sw/source/ui/inc/tmplctrl.hxx b/sw/source/ui/inc/tmplctrl.hxx
index 206645d7fe83..1c684d6c599a 100644
--- a/sw/source/ui/inc/tmplctrl.hxx
+++ b/sw/source/ui/inc/tmplctrl.hxx
@@ -40,13 +40,13 @@ class SwTemplateControl : public SfxStatusBarControl
protected:
virtual void Command( const CommandEvent& rCEvt );
public:
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
virtual void Paint( const UserDrawEvent& rEvt );
SFX_DECL_STATUSBAR_CONTROL();
- SwTemplateControl( USHORT nSlotId, USHORT nId, StatusBar& rStb );
+ SwTemplateControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
~SwTemplateControl();
private:
diff --git a/sw/source/ui/inc/toxmgr.hxx b/sw/source/ui/inc/toxmgr.hxx
index 38cc1e5398b3..a1cc17d4c470 100644
--- a/sw/source/ui/inc/toxmgr.hxx
+++ b/sw/source/ui/inc/toxmgr.hxx
@@ -50,9 +50,9 @@ class SW_DLLPUBLIC SwTOXDescription
String* pTitle;
String* pTOUName;
SwForm* pForm;
- USHORT nContent;
- USHORT nIndexOptions;
- USHORT nOLEOptions;
+ sal_uInt16 nContent;
+ sal_uInt16 nIndexOptions;
+ sal_uInt16 nOLEOptions;
LanguageType eLanguage;
String sSortAlgorithm;
@@ -61,13 +61,13 @@ class SW_DLLPUBLIC SwTOXDescription
SwTOXSortKey eSortKey1;
SwTOXSortKey eSortKey2;
SwTOXSortKey eSortKey3;
- BYTE nLevel;
- BOOL bFromObjectNames : 1;
- BOOL bFromChapter : 1;
- BOOL bReadonly: 1;
- BOOL bLevelFromChapter : 1;
- BOOL bIsAuthSequence :1;
- BOOL bSortByDocument :1;
+ sal_uInt8 nLevel;
+ sal_Bool bFromObjectNames : 1;
+ sal_Bool bFromChapter : 1;
+ sal_Bool bReadonly: 1;
+ sal_Bool bLevelFromChapter : 1;
+ sal_Bool bIsAuthSequence :1;
+ sal_Bool bSortByDocument :1;
//TODO: TemplateNames
//const String* pTemplateName = 0, ???
@@ -90,12 +90,12 @@ public:
eLanguage((LanguageType)::GetAppLanguage()),
eCaptionDisplay(CAPTION_COMPLETE),
nLevel(MAXLEVEL),
- bFromObjectNames(FALSE),
- bFromChapter(FALSE),
- bReadonly(TRUE),
- bLevelFromChapter(FALSE),
- bIsAuthSequence(FALSE),
- bSortByDocument(TRUE)
+ bFromObjectNames(sal_False),
+ bFromChapter(sal_False),
+ bReadonly(sal_True),
+ bLevelFromChapter(sal_False),
+ bIsAuthSequence(sal_False),
+ bSortByDocument(sal_True)
{}
~SwTOXDescription()
{
@@ -107,9 +107,9 @@ public:
void SetTOXType(TOXTypes eSet) { eTOXType = eSet;}
TOXTypes GetTOXType() const { return eTOXType;}
- const String& GetStyleNames(USHORT nLvl) const
+ const String& GetStyleNames(sal_uInt16 nLvl) const
{return aStyleNames[nLvl];}
- void SetStyleNames(const String& rSet, USHORT nLvl)
+ void SetStyleNames(const String& rSet, sal_uInt16 nLvl)
{aStyleNames[nLvl] = rSet; }
const String& GetAutoMarkURL() const { return sAutoMarkURL;}
@@ -124,20 +124,20 @@ public:
void SetForm(const SwForm& rSet) {delete pForm; pForm = new SwForm(rSet);}
const SwForm* GetForm() const {return pForm;}
- void SetContentOptions(USHORT nSet) { nContent = nSet;}
- USHORT GetContentOptions() const { return nContent;}
+ void SetContentOptions(sal_uInt16 nSet) { nContent = nSet;}
+ sal_uInt16 GetContentOptions() const { return nContent;}
- void SetIndexOptions(USHORT nSet) { nIndexOptions = nSet;}
- USHORT GetIndexOptions() const { return nIndexOptions;}
+ void SetIndexOptions(sal_uInt16 nSet) { nIndexOptions = nSet;}
+ sal_uInt16 GetIndexOptions() const { return nIndexOptions;}
const String& GetMainEntryCharStyle() const {return sMainEntryCharStyle;}
void SetMainEntryCharStyle(const String& rSet) {sMainEntryCharStyle = rSet;}
- void SetLevel(BYTE nSet) {nLevel = nSet;}
- BYTE GetLevel()const {return nLevel; }
+ void SetLevel(sal_uInt8 nSet) {nLevel = nSet;}
+ sal_uInt8 GetLevel()const {return nLevel; }
- void SetCreateFromObjectNames(BOOL bSet) { bFromObjectNames = bSet;}
- BOOL IsCreateFromObjectNames() const {return bFromObjectNames;}
+ void SetCreateFromObjectNames(sal_Bool bSet) { bFromObjectNames = bSet;}
+ sal_Bool IsCreateFromObjectNames() const {return bFromObjectNames;}
const String& GetSequenceName() const {return sSequenceName;}
void SetSequenceName(const String& rSet) {sSequenceName = rSet;}
@@ -145,26 +145,26 @@ public:
SwCaptionDisplay GetCaptionDisplay() const { return eCaptionDisplay;}
void SetCaptionDisplay(SwCaptionDisplay eSet) {eCaptionDisplay = eSet;}
- void SetFromChapter(BOOL bSet) { bFromChapter = bSet;}
- BOOL IsFromChapter() const {return bFromChapter;}
+ void SetFromChapter(sal_Bool bSet) { bFromChapter = bSet;}
+ sal_Bool IsFromChapter() const {return bFromChapter;}
- void SetReadonly(BOOL bSet){bReadonly = bSet;}
- BOOL IsReadonly() const {return bReadonly;}
+ void SetReadonly(sal_Bool bSet){bReadonly = bSet;}
+ sal_Bool IsReadonly() const {return bReadonly;}
- USHORT GetOLEOptions() const {return nOLEOptions;}
- void SetOLEOptions(USHORT nOpt) {nOLEOptions = nOpt;}
+ sal_uInt16 GetOLEOptions() const {return nOLEOptions;}
+ void SetOLEOptions(sal_uInt16 nOpt) {nOLEOptions = nOpt;}
- BOOL IsLevelFromChapter() const {return bLevelFromChapter;}
- void SetLevelFromChapter(BOOL bSet) {bLevelFromChapter = bSet;}
+ sal_Bool IsLevelFromChapter() const {return bLevelFromChapter;}
+ void SetLevelFromChapter(sal_Bool bSet) {bLevelFromChapter = bSet;}
String GetAuthBrackets() const {return sAuthBrackets;}
void SetAuthBrackets(const String& rSet) {sAuthBrackets = rSet;}
- BOOL IsAuthSequence() const {return bIsAuthSequence;}
- void SetAuthSequence(BOOL bSet){bIsAuthSequence = bSet;}
+ sal_Bool IsAuthSequence() const {return bIsAuthSequence;}
+ void SetAuthSequence(sal_Bool bSet){bIsAuthSequence = bSet;}
- BOOL IsSortByDocument()const {return bSortByDocument ;}
- void SetSortByDocument(BOOL bSet) {bSortByDocument = bSet;}
+ sal_Bool IsSortByDocument()const {return bSortByDocument ;}
+ void SetSortByDocument(sal_Bool bSet) {bSortByDocument = bSet;}
void SetSortKeys(SwTOXSortKey eKey1,
SwTOXSortKey eKey2,
@@ -188,7 +188,7 @@ class SwTOXMarkDescription
{
TOXTypes eTOXType;
int nLevel;
- BOOL bMainEntry;
+ sal_Bool bMainEntry;
String* pPrimKey;
String* pSecKey;
@@ -209,7 +209,7 @@ public:
explicit SwTOXMarkDescription(TOXTypes eType) :
eTOXType(eType),
nLevel(0),
- bMainEntry(FALSE),
+ bMainEntry(sal_False),
pPrimKey(0),
pSecKey(0),
pAltStr(0),
@@ -235,8 +235,8 @@ public:
void SetLevel(int nSet) {nLevel = nSet;}
int GetLevel() const {return nLevel;}
- void SetMainEntry(BOOL bSet) {bMainEntry = bSet;}
- BOOL IsMainEntry() const {return bMainEntry;}
+ void SetMainEntry(sal_Bool bSet) {bMainEntry = bSet;}
+ sal_Bool IsMainEntry() const {return bMainEntry;}
void SetPrimKey(const String& rSet)
{delete pPrimKey; pPrimKey = new String(rSet);}
@@ -274,7 +274,7 @@ class SW_DLLPUBLIC SwTOXMgr
SwTOXMark* pCurTOXMark;
SwTOXMarks aCurMarks;
- SW_DLLPRIVATE USHORT GetUserTypeID(const String& rStr);
+ SW_DLLPRIVATE sal_uInt16 GetUserTypeID(const String& rStr);
public:
// single argument ctors shall be explicit.
@@ -289,22 +289,22 @@ public:
void DeleteTOXMark();
- void NextTOXMark(BOOL bSame=FALSE);
- void PrevTOXMark(BOOL bSame=FALSE);
+ void NextTOXMark(sal_Bool bSame=sal_False);
+ void PrevTOXMark(sal_Bool bSame=sal_False);
// Aktuelle TOXmarks holen
- USHORT GetTOXMarks();
- USHORT GetTOXMarkCount();
- SwTOXMark* GetTOXMark(USHORT nId);
+ sal_uInt16 GetTOXMarks();
+ sal_uInt16 GetTOXMarkCount();
+ SwTOXMark* GetTOXMark(sal_uInt16 nId);
SwTOXMark* GetCurTOXMark();
- void SetCurTOXMark(USHORT nId);
+ void SetCurTOXMark(sal_uInt16 nId);
//
// Methoden fuer Verzeichnisse
//
- BOOL UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase = 0, const SfxItemSet* pSet = 0);
+ sal_Bool UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase = 0, const SfxItemSet* pSet = 0);
- const SwTOXType* GetTOXType(TOXTypes eTyp, USHORT nId) const;
+ const SwTOXType* GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const;
const SwTOXBase* GetCurTOX();
};
@@ -314,7 +314,7 @@ public:
Beschreibung: Inlines
--------------------------------------------------------------------*/
-inline USHORT SwTOXMgr::GetTOXMarkCount()
+inline sal_uInt16 SwTOXMgr::GetTOXMarkCount()
{ return aCurMarks.Count(); }
diff --git a/sw/source/ui/inc/uiborder.hxx b/sw/source/ui/inc/uiborder.hxx
index a7688ac343ac..573bef720d49 100644
--- a/sw/source/ui/inc/uiborder.hxx
+++ b/sw/source/ui/inc/uiborder.hxx
@@ -41,7 +41,7 @@ public:
// SW_BORDER_MODE_TABLE
// SW_BORDER_MODE_FRAME
- SwBorderDlg(Window* pParent, SfxItemSet& rSet, USHORT nType);
+ SwBorderDlg(Window* pParent, SfxItemSet& rSet, sal_uInt16 nType);
~SwBorderDlg();
};
diff --git a/sw/source/ui/inc/uiitems.hxx b/sw/source/ui/inc/uiitems.hxx
index d559a9ea3fb9..55155e35fe59 100644
--- a/sw/source/ui/inc/uiitems.hxx
+++ b/sw/source/ui/inc/uiitems.hxx
@@ -44,7 +44,7 @@ class SW_DLLPUBLIC SwPageFtnInfoItem : public SfxPoolItem
public:
- SwPageFtnInfoItem(const USHORT nId, SwPageFtnInfo& rInfo);
+ SwPageFtnInfoItem(const sal_uInt16 nId, SwPageFtnInfo& rInfo);
SwPageFtnInfoItem(const SwPageFtnInfoItem& rItem );
~SwPageFtnInfoItem();
@@ -56,8 +56,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 );
SwPageFtnInfo& GetPageFtnInfo() { return aFtnInfo; }
const SwPageFtnInfo& GetPageFtnInfo() const { return aFtnInfo; }
@@ -71,7 +71,7 @@ class SW_DLLPUBLIC SwPtrItem : public SfxPoolItem
void* pMisc;
public:
- SwPtrItem( const USHORT nId = FN_PARAM_GRF_DIALOG, void* pPtr = 0);
+ SwPtrItem( const sal_uInt16 nId = FN_PARAM_GRF_DIALOG, void* pPtr = 0);
SwPtrItem( const SwPtrItem& rItem );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -88,15 +88,15 @@ class SW_DLLPUBLIC SwUINumRuleItem : public SfxPoolItem
SwNumRule* pRule;
public:
- SwUINumRuleItem( const SwNumRule& rRule, const USHORT = FN_PARAM_ACT_NUMBER);
+ SwUINumRuleItem( const SwNumRule& rRule, const sal_uInt16 = FN_PARAM_ACT_NUMBER);
SwUINumRuleItem( const SwUINumRuleItem& rItem );
virtual ~SwUINumRuleItem();
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
const SwNumRule* GetNumRule() const { return pRule; }
SwNumRule* GetNumRule() { return pRule; }
@@ -108,7 +108,7 @@ public:
class SwBackgroundDestinationItem : public SfxUInt16Item
{
public:
- SwBackgroundDestinationItem(USHORT nWhich, USHORT nValue);
+ SwBackgroundDestinationItem(sal_uInt16 nWhich, sal_uInt16 nValue);
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
};
diff --git a/sw/source/ui/inc/uinums.hxx b/sw/source/ui/inc/uinums.hxx
index 5ba9d6f4dfc1..1fe7e6e5f82e 100644
--- a/sw/source/ui/inc/uinums.hxx
+++ b/sw/source/ui/inc/uinums.hxx
@@ -50,7 +50,7 @@ class SW_DLLPUBLIC SwNumRulesWithName
{
SwNumFmt aFmt;
String sCharFmtName;
- USHORT nCharPoolId;
+ sal_uInt16 nCharPoolId;
_SwNumFmtsAttrs aItems;
_SwNumFmtGlobal& operator=( const _SwNumFmtGlobal& );
@@ -58,7 +58,7 @@ class SW_DLLPUBLIC SwNumRulesWithName
public:
_SwNumFmtGlobal( const SwNumFmt& rFmt );
_SwNumFmtGlobal( const _SwNumFmtGlobal& );
- _SwNumFmtGlobal( SvStream&, USHORT nVersion );
+ _SwNumFmtGlobal( SvStream&, sal_uInt16 nVersion );
~_SwNumFmtGlobal();
void Store( SvStream& );
@@ -73,7 +73,7 @@ protected:
public:
SwNumRulesWithName(const SwNumRule &, const String &);
SwNumRulesWithName( const SwNumRulesWithName & );
- SwNumRulesWithName(SvStream &, USHORT nVersion);
+ SwNumRulesWithName(SvStream &, sal_uInt16 nVersion);
~SwNumRulesWithName();
const SwNumRulesWithName &operator=(const SwNumRulesWithName &);
@@ -93,11 +93,11 @@ public:
protected:
SwNumRulesWithName *pNumRules[ MAX_NUM_RULES ];
String sFileName;
- USHORT nVersion;
- BOOL bModified;
+ sal_uInt16 nVersion;
+ sal_Bool bModified;
virtual int Load(SvStream&);
- virtual BOOL Store(SvStream&);
+ virtual sal_Bool Store(SvStream&);
void Init();
@@ -105,10 +105,10 @@ public:
SwBaseNumRules(const String& rFileName);
virtual ~SwBaseNumRules();
- inline const SwNumRulesWithName* GetRules(USHORT nIdx) const;
+ inline const SwNumRulesWithName* GetRules(sal_uInt16 nIdx) const;
virtual void ApplyNumRules(
const SwNumRulesWithName &rCopy,
- USHORT nIdx);
+ sal_uInt16 nIdx);
};
@@ -123,11 +123,11 @@ public:
virtual ~SwChapterNumRules();
virtual void ApplyNumRules( const SwNumRulesWithName &rCopy,
- USHORT nIdx);
+ sal_uInt16 nIdx);
};
// INLINE METHODE --------------------------------------------------------
-inline const SwNumRulesWithName *SwBaseNumRules::GetRules(USHORT nIdx) const
+inline const SwNumRulesWithName *SwBaseNumRules::GetRules(sal_uInt16 nIdx) const
{
ASSERT(nIdx < nMaxRules, Array der NumRules ueberindiziert.);
return pNumRules[nIdx];
diff --git a/sw/source/ui/inc/uitool.hxx b/sw/source/ui/inc/uitool.hxx
index e48f78f9aa96..3b2672e1063a 100644
--- a/sw/source/ui/inc/uitool.hxx
+++ b/sw/source/ui/inc/uitool.hxx
@@ -62,7 +62,7 @@ SW_DLLPUBLIC void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem& rTabs);
//void EraseDefTabs(SvxTabStopItem& rTabs);
// Abstand zwischen dem 1. und zweitem Element ermitteln
-SW_DLLPUBLIC USHORT GetTabDist(const SvxTabStopItem& rTabs);
+SW_DLLPUBLIC sal_uInt16 GetTabDist(const SvxTabStopItem& rTabs);
// erfrage ob im Set eine Sfx-PageDesc-Kombination vorliegt
// und setze diesen im Set und loesche die Transport Items
@@ -70,23 +70,23 @@ SW_DLLPUBLIC USHORT GetTabDist(const SvxTabStopItem& rTabs);
void SwToSfxPageDescAttr( SfxItemSet& rSet );
void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet );
-SW_DLLPUBLIC FieldUnit GetDfltMetric(BOOL bWeb);
-void SetDfltMetric(FieldUnit eMetric, BOOL bWeb);
+SW_DLLPUBLIC FieldUnit GetDfltMetric(sal_Bool bWeb);
+void SetDfltMetric(FieldUnit eMetric, sal_Bool bWeb);
// ListBox mit allen Zeichenvorlagen fuellen - ausser Standard!
-SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted = FALSE, BOOL bWithDefault = FALSE);
+SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, sal_Bool bSorted = sal_False, sal_Bool bWithDefault = sal_False);
//inserts a string sorted into a ListBox,
-SW_DLLPUBLIC USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, USHORT nOffset);
+SW_DLLPUBLIC sal_uInt16 InsertStringSorted(const String& rEntry, ListBox& rToFill, sal_uInt16 nOffset);
// Tabellenbreite und Ausrichtung ermitteln
-SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent,
+SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent,
SwWrtShell* pSh );
String GetAppLangDateTimeString( const DateTime& );
// search for a command string withing the menu structure and execute it
// at the dispatcher if there is one, if executed return true
-bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, USHORT nId );
+bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 nId );
#endif // _UITOOL_HXX
diff --git a/sw/source/ui/inc/uivwimp.hxx b/sw/source/ui/inc/uivwimp.hxx
index 9c22b44ad868..9c35c26c2002 100644
--- a/sw/source/ui/inc/uivwimp.hxx
+++ b/sw/source/ui/inc/uivwimp.hxx
@@ -93,7 +93,7 @@ public:
void ViewDestroyed() { pView = 0; }
- void AddRemoveListener( BOOL bAdd );
+ void AddRemoveListener( sal_Bool bAdd );
};
diff --git a/sw/source/ui/inc/unotools.hxx b/sw/source/ui/inc/unotools.hxx
index 6399e2acba9e..4a94628a03ad 100644
--- a/sw/source/ui/inc/unotools.hxx
+++ b/sw/source/ui/inc/unotools.hxx
@@ -121,7 +121,7 @@ public:
STAR_REFERENCE( frame::XController ) & GetController() {return _xController;}
STAR_REFERENCE( text::XTextCursor ) & GetTextCursor() {return _xCursor;}
- void ClearDocument( BOOL bStartTimer = FALSE );
+ void ClearDocument( sal_Bool bStartTimer = sal_False );
sal_Bool IsInitialized() const {return bIsInitialized;}
sal_Bool IsServiceAvailable() const {return bServiceAvailable;}
diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx
index 4990df84f43b..be3c0a993d8f 100644
--- a/sw/source/ui/inc/unotxvw.hxx
+++ b/sw/source/ui/inc/unotxvw.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 );
//XTransferableSupplier
@@ -196,12 +196,12 @@ public:
//XTextCursor - neu
virtual void SAL_CALL collapseToStart( ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL collapseToEnd( ) throw(::com::sun::star::uno::RuntimeException);
- virtual BOOL SAL_CALL isCollapsed( ) throw(::com::sun::star::uno::RuntimeException);
- virtual BOOL SAL_CALL goLeft( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
- virtual BOOL SAL_CALL goRight( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL gotoStart( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL gotoEnd( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL gotoRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isCollapsed( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goLeft( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goRight( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoStart( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoEnd( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
//XPageCursor
virtual sal_Bool SAL_CALL jumpToFirstPage(void) throw( ::com::sun::star::uno::RuntimeException );
@@ -253,7 +253,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 const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
diff --git a/sw/source/ui/inc/usrpref.hxx b/sw/source/ui/inc/usrpref.hxx
index 0758f89af8bf..e001abe24d85 100644
--- a/sw/source/ui/inc/usrpref.hxx
+++ b/sw/source/ui/inc/usrpref.hxx
@@ -41,11 +41,11 @@ class SwMasterUsrPref;
class SwContentViewConfig : public utl::ConfigItem
{
SwMasterUsrPref& rParent;
- BOOL bWeb;
+ sal_Bool bWeb;
com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
public:
- SwContentViewConfig(BOOL bWeb, SwMasterUsrPref& rParent);
+ SwContentViewConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
~SwContentViewConfig();
// utl::ConfigItem
@@ -61,11 +61,11 @@ class SwContentViewConfig : public utl::ConfigItem
class SwLayoutViewConfig : public utl::ConfigItem
{
SwMasterUsrPref& rParent;
- BOOL bWeb;
+ sal_Bool bWeb;
com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
public:
- SwLayoutViewConfig(BOOL bWeb, SwMasterUsrPref& rParent);
+ SwLayoutViewConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
~SwLayoutViewConfig();
virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
@@ -79,11 +79,11 @@ class SwLayoutViewConfig : public utl::ConfigItem
class SwGridConfig : public utl::ConfigItem
{
SwMasterUsrPref& rParent;
- BOOL bWeb;
+ sal_Bool bWeb;
com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
public:
- SwGridConfig(BOOL bWeb, SwMasterUsrPref& rParent);
+ SwGridConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
~SwGridConfig();
virtual void Commit();
@@ -156,7 +156,7 @@ class SwMasterUsrPref : public SwViewOption
SwWebColorConfig* pWebColorConfig;
public:
- SwMasterUsrPref(BOOL bWeb);
+ SwMasterUsrPref(sal_Bool bWeb);
~SwMasterUsrPref();
void SetUsrPref(const SwViewOption &rCopy);
@@ -188,7 +188,7 @@ public:
}
sal_Int32 GetUpdateLinkMode() const {return nLinkUpdateMode; }
- void SetUpdateFields(BOOL bSet, sal_Bool bNoModify = sal_False)
+ void SetUpdateFields(sal_Bool bSet, sal_Bool bNoModify = sal_False)
{
if(bSet && eFldUpdateFlags == AUTOUPD_OFF)
{
@@ -213,7 +213,7 @@ public:
aContentConfig.SetModified();
}
- void SetUpdateCharts(BOOL bSet, sal_Bool bNoModify = sal_False)
+ void SetUpdateCharts(sal_Bool bSet, sal_Bool bNoModify = sal_False)
{
if(bSet)
{
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index 78817eec874c..720a54d4b251 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -147,15 +147,15 @@ struct SwApplyTemplate
} aColl;
int eType;
- USHORT nColor;
+ sal_uInt16 nColor;
SwFormatClipboard* pFormatClipboard;
- BOOL bUndo;
+ sal_Bool bUndo;
SwApplyTemplate() :
eType(0),
nColor(0),
pFormatClipboard(0),
- bUndo(FALSE)
+ bUndo(sal_False)
{
aColl.pTxtColl = 0;
}
@@ -181,16 +181,16 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
static SvxSearchDialog *pSrchDlg;
static SvxSearchItem *pSrchItem;
- static USHORT nInsertCtrlState;
- static USHORT nWebInsertCtrlState;
- static USHORT nInsertObjectCtrlState;
- static USHORT nInsertFieldCtrlState;
- static USHORT nMoveType; // fuer Buttons unter dem Scrollbar (viewmdi)
+ static sal_uInt16 nInsertCtrlState;
+ static sal_uInt16 nWebInsertCtrlState;
+ static sal_uInt16 nInsertObjectCtrlState;
+ static sal_uInt16 nInsertFieldCtrlState;
+ static sal_uInt16 nMoveType; // fuer Buttons unter dem Scrollbar (viewmdi)
static sal_Int32 nActMark; // aktuelle Sprungmarke fuer unbenannte Merker
- static BOOL bExtra;
- static BOOL bFound;
- static BOOL bJustOpened;
+ static sal_Bool bExtra;
+ static sal_Bool bFound;
+ static sal_Bool bJustOpened;
static SearchAttrItemList* pSrchList;
static SearchAttrItemList* pReplList;
@@ -204,7 +204,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
//and the new cursor position if the user double click in the PagePreView
sNewCrsrPos;
// to support keyboard the number of the page to go to can be set too
- USHORT nNewPage;
+ sal_uInt16 nNewPage;
Point aTabColFromDocPos; //Verschieben von Tabellenspalten aus
//aus dem Dokument heraus.
@@ -252,19 +252,19 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
String aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ];
- USHORT nPageCnt;
+ sal_uInt16 nPageCnt;
// Aktueller Drawmode
- USHORT nDrawSfxId;
+ sal_uInt16 nDrawSfxId;
String sDrawCustom; //some drawing types are marked with strings!
- USHORT nFormSfxId;
- USHORT nLastPasteDestination;
+ sal_uInt16 nFormSfxId;
+ sal_uInt16 nLastPasteDestination;
// save the border distance status from SwView::StateTabWin to re-use it in SwView::ExecTabWin()
- USHORT nLeftBorderDistance;
- USHORT nRightBorderDistance;
+ sal_uInt16 nLeftBorderDistance;
+ sal_uInt16 nRightBorderDistance;
- BOOL bCenterCrsr : 1,
+ sal_Bool bCenterCrsr : 1,
bTopCrsr : 1,
bAllwaysShowSel : 1,
bTabColFromDoc : 1,
@@ -290,14 +290,14 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
// Methoden fuers Suchen
// Suchkontext setzen
- SW_DLLPRIVATE BOOL SearchAndWrap(BOOL bApi = FALSE);
- SW_DLLPRIVATE BOOL SearchAll(USHORT* pFound = 0);
- SW_DLLPRIVATE ULONG FUNC_Search( const SwSearchOptions& rOptions );
+ SW_DLLPRIVATE sal_Bool SearchAndWrap(sal_Bool bApi = sal_False);
+ SW_DLLPRIVATE sal_Bool SearchAll(sal_uInt16* pFound = 0);
+ SW_DLLPRIVATE sal_uLong FUNC_Search( const SwSearchOptions& rOptions );
SW_DLLPRIVATE void Replace();
- BOOL IsDocumentBorder();
+ sal_Bool IsDocumentBorder();
- SW_DLLPRIVATE BOOL IsTextTool() const;
+ SW_DLLPRIVATE sal_Bool IsTextTool() const;
// Bedienelemente verwalten anlegen
SW_DLLPRIVATE void CreateBtns();
@@ -312,31 +312,31 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
inline long GetYScroll() const;
SW_DLLPRIVATE Point AlignToPixel(const Point& rPt) const;
SW_DLLPRIVATE void CalcPt( Point* pPt,const Rectangle& rRect,
- USHORT nRangeX = USHRT_MAX,
- USHORT nRangeY = USHRT_MAX);
+ sal_uInt16 nRangeX = USHRT_MAX,
+ sal_uInt16 nRangeY = USHRT_MAX);
- SW_DLLPRIVATE BOOL GetPageScrollUpOffset(SwTwips& rOff) const;
- SW_DLLPRIVATE BOOL GetPageScrollDownOffset(SwTwips& rOff) const;
+ SW_DLLPRIVATE sal_Bool GetPageScrollUpOffset(SwTwips& rOff) const;
+ SW_DLLPRIVATE sal_Bool GetPageScrollDownOffset(SwTwips& rOff) const;
// Scrollbar Movements
SW_DLLPRIVATE long PageUp();
SW_DLLPRIVATE long PageDown();
- SW_DLLPRIVATE long PageUpCrsr(BOOL bSelect);
- SW_DLLPRIVATE long PageDownCrsr(BOOL bSelect);
+ SW_DLLPRIVATE long PageUpCrsr(sal_Bool bSelect);
+ SW_DLLPRIVATE long PageDownCrsr(sal_Bool bSelect);
SW_DLLPRIVATE long PhyPageUp();
SW_DLLPRIVATE long PhyPageDown();
- SW_DLLPRIVATE int _CreateScrollbar( BOOL bHori );
+ SW_DLLPRIVATE int _CreateScrollbar( sal_Bool bHori );
SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
- SW_DLLPRIVATE BOOL UpdateScrollbars();
+ SW_DLLPRIVATE sal_Bool UpdateScrollbars();
SW_DLLPRIVATE void CalcVisArea( const Size &rPixelSz );
- SW_DLLPRIVATE void CreatePageButtons(BOOL bShow);
+ SW_DLLPRIVATE void CreatePageButtons(sal_Bool bShow);
// Linguistik-Funktionen
SW_DLLPRIVATE void HyphenateDocument();
- SW_DLLPRIVATE BOOL IsDrawTextHyphenate();
+ SW_DLLPRIVATE sal_Bool IsDrawTextHyphenate();
SW_DLLPRIVATE void HyphenateDrawText();
SW_DLLPRIVATE void StartThesaurus();
@@ -344,17 +344,17 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
SW_DLLPRIVATE void StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive );
// used for spell checking and text conversion
- SW_DLLPRIVATE void SpellStart( SvxSpellArea eSpell, BOOL bStartDone,
- BOOL bEndDone, SwConversionArgs *pConvArgs = 0 );
+ SW_DLLPRIVATE void SpellStart( SvxSpellArea eSpell, sal_Bool bStartDone,
+ sal_Bool bEndDone, SwConversionArgs *pConvArgs = 0 );
SW_DLLPRIVATE void SpellEnd( SwConversionArgs *pConvArgs = 0 );
SW_DLLPRIVATE void HyphStart( SvxSpellArea eSpell );
- SW_DLLPRIVATE BOOL CheckSpecialCntnt();
- SW_DLLPRIVATE void SpellKontext(BOOL bOn = TRUE)
+ SW_DLLPRIVATE sal_Bool CheckSpecialCntnt();
+ SW_DLLPRIVATE void SpellKontext(sal_Bool bOn = sal_True)
{ bCenterCrsr = bOn; bAllwaysShowSel = bOn; }
// Methoden fuers Printing
- SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
+ SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False );
SW_DLLPRIVATE virtual PrintDialog* CreatePrintDialog( Window* pParent );
SfxTabPage* CreatePrintOptionsPage( Window* pParent,
const SfxItemSet& rSet);
@@ -369,14 +369,14 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
SW_DLLPRIVATE void _SetZoom( const Size &rEditSz,
SvxZoomType eZoomType,
short nFactor = 100,
- BOOL bViewOnly = FALSE);
- SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, BOOL bInner );
+ sal_Bool bViewOnly = sal_False);
+ SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool bInner );
SW_DLLPRIVATE void ShowAtResize();
SW_DLLPRIVATE virtual void Move();
- SW_DLLPRIVATE BOOL InsertGraphicDlg( SfxRequest& );
+ SW_DLLPRIVATE sal_Bool InsertGraphicDlg( SfxRequest& );
protected:
@@ -393,8 +393,8 @@ protected:
virtual void SelectShell();
- virtual void Activate(BOOL);
- virtual void Deactivate(BOOL);
+ virtual void Activate(sal_Bool);
+ virtual void Deactivate(sal_Bool);
virtual void InnerResizePixel( const Point &rOfs, const Size &rSize );
virtual void OuterResizePixel( const Point &rOfs, const Size &rSize );
virtual Size GetOptimalSizePixel() const;
@@ -405,7 +405,7 @@ protected:
void SetLastTblFrmFmt(const SwFrmFmt* pSet) {pLastTableFormat = pSet;}
// form letter execution
- void GenerateFormLetter(BOOL bUseCurrentDocument);
+ void GenerateFormLetter(sal_Bool bUseCurrentDocument);
using SfxShell::GetDispatcher;
@@ -420,20 +420,20 @@ public:
void GotFocus() const;
virtual SdrView* GetDrawView() const;
virtual sal_Bool HasUIFeature( sal_uInt32 nFeature );
- virtual void ShowCursor( FASTBOOL bOn = TRUE );
+ virtual void ShowCursor( FASTBOOL bOn = sal_True );
virtual ErrCode DoVerb( long nVerb );
- virtual USHORT SetPrinter( SfxPrinter* pNew,
- USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNew,
+ sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
ShellModes GetShellMode();
com::sun::star::view::XSelectionSupplier* GetUNOObject();
- String GetSelectionTextParam( BOOL bCompleteWords,
- BOOL bEraseTrail );
- virtual BOOL HasSelection( BOOL bText ) const;
- virtual String GetSelectionText( BOOL bCompleteWords = FALSE );
- virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+ String GetSelectionTextParam( sal_Bool bCompleteWords,
+ sal_Bool bEraseTrail );
+ virtual sal_Bool HasSelection( sal_Bool bText ) const;
+ virtual String GetSelectionText( sal_Bool bCompleteWords = sal_False );
+ virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
virtual void MarginChanged();
// replace word/selection with text from the thesaurus
@@ -460,58 +460,58 @@ public:
inline const Rectangle& GetVisArea() const { return aVisArea; }
- BOOL IsScroll(const Rectangle& rRect) const;
+ sal_Bool IsScroll(const Rectangle& rRect) const;
void Scroll( const Rectangle& rRect,
- USHORT nRangeX = USHRT_MAX,
- USHORT nRangeY = USHRT_MAX);
+ sal_uInt16 nRangeX = USHRT_MAX,
+ sal_uInt16 nRangeY = USHRT_MAX);
long SetVScrollMax(long lMax);
long SetHScrollMax(long lMax);
DECL_LINK( SpellError, LanguageType * );
- BOOL ExecSpellPopup( const Point& rPt );
- BOOL ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
+ sal_Bool ExecSpellPopup( const Point& rPt );
+ sal_Bool ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
// SMARTTAGS
- BOOL ExecSmartTagPopup( const Point& rPt );
+ sal_Bool ExecSmartTagPopup( const Point& rPt );
DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
- BOOL ExecDrwTxtSpellPopup(const Point& rPt);
+ sal_Bool ExecDrwTxtSpellPopup(const Point& rPt);
void SetTabColFromDocPos( const Point &rPt ) { aTabColFromDocPos = rPt; }
- void SetTabColFromDoc( BOOL b ) { bTabColFromDoc = b; }
- BOOL IsTabColFromDoc() const { return bTabColFromDoc; }
- void SetTabRowFromDoc( BOOL b ) { bTabRowFromDoc = b; }
- BOOL IsTabRowFromDoc() const { return bTabRowFromDoc; }
+ void SetTabColFromDoc( sal_Bool b ) { bTabColFromDoc = b; }
+ sal_Bool IsTabColFromDoc() const { return bTabColFromDoc; }
+ void SetTabRowFromDoc( sal_Bool b ) { bTabRowFromDoc = b; }
+ sal_Bool IsTabRowFromDoc() const { return bTabRowFromDoc; }
// -> #i23726#
void SetNumRuleNodeFromDoc( SwTxtNode * pNumRuleNode )
{ pNumRuleNodeFromDoc = pNumRuleNode; }
- void SetNumIndentFromDoc(BOOL b) { bNumIndentFromDoc = b; }
- BOOL IsNumIndentFromDoc() const { return NULL != pNumRuleNodeFromDoc; }
+ void SetNumIndentFromDoc(sal_Bool b) { bNumIndentFromDoc = b; }
+ sal_Bool IsNumIndentFromDoc() const { return NULL != pNumRuleNodeFromDoc; }
// <- #i23726#
void DocSzChgd( const Size& rNewSize );
const Size& GetDocSz() const { return aDocSz; }
- virtual void SetVisArea( const Rectangle&, BOOL bUpdateScrollbar = TRUE);
- void SetVisArea( const Point&, BOOL bUpdateScrollbar = TRUE);
+ virtual void SetVisArea( const Rectangle&, sal_Bool bUpdateScrollbar = sal_True);
+ void SetVisArea( const Point&, sal_Bool bUpdateScrollbar = sal_True);
void CheckVisArea();
static LAYOUT_NS Dialog* GetSearchDialog();
- static USHORT GetMoveType();
- static void SetMoveType(USHORT nSet);
+ static sal_uInt16 GetMoveType();
+ static void SetMoveType(sal_uInt16 nSet);
DECL_STATIC_LINK( SwView, MoveNavigationHdl, bool* ); // #i75416#
static void SetActMark(sal_Int32 nSet);
- BOOL HandleWheelCommands( const CommandEvent& );
+ sal_Bool HandleWheelCommands( const CommandEvent& );
// Rahmen einfuegen
- void InsFrmMode(USHORT nCols);
+ void InsFrmMode(sal_uInt16 nCols);
- void SetZoom( SvxZoomType eZoomType, short nFactor = 100, BOOL bViewOnly = FALSE);
+ void SetZoom( SvxZoomType eZoomType, short nFactor = 100, sal_Bool bViewOnly = sal_False);
virtual void SetZoomFactor( const Fraction &rX, const Fraction & );
- void SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly = FALSE );
+ void SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly = sal_False );
void ShowHScrollbar(sal_Bool bShow);
sal_Bool IsHScrollbarVisible()const;
@@ -550,7 +550,7 @@ public:
void ExecTabWin(SfxRequest&);
void ExecuteStatusLine(SfxRequest&);
DECL_LINK( ExecRulerClick, Ruler * );
- void ExecSearch(SfxRequest&, BOOL bNoMessage = FALSE);
+ void ExecSearch(SfxRequest&, sal_Bool bNoMessage = sal_False);
void ExecViewOptions(SfxRequest &);
void StateViewOptions(SfxItemSet &);
@@ -561,24 +561,24 @@ public:
// Funktionen fuer Drawing
void SetDrawFuncPtr(SwDrawBase* pFuncPtr);
- inline SwDrawBase* GetDrawFuncPtr(/*BOOL bBuf = FALSE*/) const { return pDrawActual; }
+ inline SwDrawBase* GetDrawFuncPtr(/*sal_Bool bBuf = sal_False*/) const { return pDrawActual; }
void GetDrawState(SfxItemSet &rSet);
void ExitDraw();
- inline BOOL IsDrawRotate() { return bDrawRotate; }
+ inline sal_Bool IsDrawRotate() { return bDrawRotate; }
inline void FlipDrawRotate() { bDrawRotate = !bDrawRotate; }
- inline BOOL IsDrawSelMode() { return bDrawSelMode; }
+ inline sal_Bool IsDrawSelMode() { return bDrawSelMode; }
void SetSelDrawSlot();
inline void FlipDrawSelMode() { bDrawSelMode = !bDrawSelMode; }
void NoRotate(); // Rotate-Mode abschalten
- BOOL EnterDrawTextMode(const Point& aDocPos);
+ sal_Bool EnterDrawTextMode(const Point& aDocPos);
void LeaveDrawCreate() { nDrawSfxId = nFormSfxId = USHRT_MAX; sDrawCustom.Erase();}
- BOOL IsDrawMode() { return (nDrawSfxId != USHRT_MAX || nFormSfxId != USHRT_MAX); }
- BOOL IsFormMode() const;
- BOOL IsBezierEditMode();
- BOOL AreOnlyFormsSelected() const;
- BOOL HasDrwObj(SdrObject *pSdrObj) const;
- BOOL HasOnlyObj(SdrObject *pSdrObj, UINT32 eObjInventor) const;
- BOOL BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=NULL,
+ sal_Bool IsDrawMode() { return (nDrawSfxId != USHRT_MAX || nFormSfxId != USHRT_MAX); }
+ sal_Bool IsFormMode() const;
+ sal_Bool IsBezierEditMode();
+ sal_Bool AreOnlyFormsSelected() const;
+ sal_Bool HasDrwObj(SdrObject *pSdrObj) const;
+ sal_Bool HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const;
+ sal_Bool BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=NULL,
Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false );
void StateTabWin(SfxItemSet&);
@@ -591,13 +591,13 @@ public:
// Links bearbeiten
void EditLinkDlg();
- void AutoCaption(const USHORT nType, const SvGlobalName *pOleId = 0);
+ void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId = 0);
void InsertCaption(const InsCaptionOpt *pOpt);
// Async Aufruf durch Core
- void UpdatePageNums(USHORT nPhyNum, USHORT nVirtNum, const String& rPgStr);
+ void UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
- String GetPageStr(USHORT nPhyNum, USHORT nVirtNum, const String& rPgStr);
+ String GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
// Shell rausreichen
SfxShell *GetCurShell() { return pShell; }
@@ -609,32 +609,32 @@ public:
//damit in DToren der SubShells ggf. pShell zurueckgesetzt werden kann
void ResetSubShell() { pShell = 0; }
- virtual void WriteUserData(String &, BOOL bBrowse = FALSE );
- virtual void ReadUserData(const String &, BOOL bBrowse = FALSE );
+ virtual void WriteUserData(String &, sal_Bool bBrowse = sal_False );
+ virtual void ReadUserData(const String &, sal_Bool bBrowse = sal_False );
virtual void ReadUserDataSequence ( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
virtual void WriteUserDataSequence ( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
- void SetCrsrAtTop( BOOL bFlag, BOOL bCenter = FALSE )
+ void SetCrsrAtTop( sal_Bool bFlag, sal_Bool bCenter = sal_False )
{ bTopCrsr = bFlag, bCenterCrsr = bCenter; }
- BOOL IsCrsrAtTop() const { return bTopCrsr; }
- BOOL IsCrsrAtCenter() const { return bCenterCrsr; }
+ sal_Bool IsCrsrAtTop() const { return bTopCrsr; }
+ sal_Bool IsCrsrAtCenter() const { return bCenterCrsr; }
- BOOL JumpToSwMark( const String& rMark );
+ sal_Bool JumpToSwMark( const String& rMark );
- long InsertDoc( USHORT nSlotId, const String& rFileName,
- const String& rFilterName, INT16 nVersion = 0 );
+ long InsertDoc( sal_uInt16 nSlotId, const String& rFileName,
+ const String& rFilterName, sal_Int16 nVersion = 0 );
void ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem );
- long InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion );
+ long InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion );
DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper * );
// status methods for clipboard.
// Status changes now notified from the clipboard.
- BOOL IsPasteAllowed();
- BOOL IsPasteSpecialAllowed();
+ sal_Bool IsPasteAllowed();
+ sal_Bool IsPasteSpecialAllowed();
// Enable mail merge - mail merge field dialog enabled
- void EnableMailMerge(BOOL bEnable = TRUE);
+ void EnableMailMerge(sal_Bool bEnable = sal_True);
//apply Accessiblity options
void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
@@ -660,9 +660,9 @@ public:
//public fuer D&D
int InsertGraphic( const String &rPath, const String &rFilter,
- BOOL bLink = TRUE, GraphicFilter *pFlt = 0,
+ sal_Bool bLink = sal_True, GraphicFilter *pFlt = 0,
Graphic* pPreviewGrf = 0,
- BOOL bRule = FALSE );
+ sal_Bool bRule = sal_False );
void ExecuteScan( SfxRequest& rReq );
@@ -691,7 +691,7 @@ inline const SwDocShell *SwView::GetDocShell() const
SfxTabPage* CreatePrintOptionsPage( Window *pParent,
const SfxItemSet &rOptions,
- BOOL bPreview);
+ sal_Bool bPreview);
#endif
diff --git a/sw/source/ui/inc/viewlayoutctrl.hxx b/sw/source/ui/inc/viewlayoutctrl.hxx
index 60d05b63a79e..999f4b845636 100644
--- a/sw/source/ui/inc/viewlayoutctrl.hxx
+++ b/sw/source/ui/inc/viewlayoutctrl.hxx
@@ -44,12 +44,12 @@ public:
SFX_DECL_STATUSBAR_CONTROL();
- SwViewLayoutControl( USHORT nSlotId, USHORT nId, StatusBar& rStb );
+ SwViewLayoutControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
~SwViewLayoutControl();
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
virtual void Paint( const UserDrawEvent& rEvt );
- virtual BOOL MouseButtonDown( const MouseEvent & );
+ virtual sal_Bool MouseButtonDown( const MouseEvent & );
};
#endif
diff --git a/sw/source/ui/inc/workctrl.hxx b/sw/source/ui/inc/workctrl.hxx
index f6a6b19c3c73..297c343a7391 100644
--- a/sw/source/ui/inc/workctrl.hxx
+++ b/sw/source/ui/inc/workctrl.hxx
@@ -70,20 +70,20 @@ class SwView;
class SwTbxInsertCtrl : public SfxToolBoxControl
{
- USHORT nLastSlotId;
+ sal_uInt16 nLastSlotId;
using SfxToolBoxControl::Select;
- virtual void Select( BOOL bMod1 = FALSE );
+ virtual void Select( sal_Bool bMod1 = sal_False );
public:
SFX_DECL_TOOLBOX_CONTROL();
- SwTbxInsertCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwTbxInsertCtrl();
virtual SfxPopupWindowType GetPopupWindowType() const;
virtual SfxPopupWindow* CreatePopupWindow();
- virtual void StateChanged( USHORT nSID,
+ virtual void StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState );
@@ -104,12 +104,12 @@ class SwTbxAutoTextCtrl : public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- SwTbxAutoTextCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwTbxAutoTextCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwTbxAutoTextCtrl();
virtual SfxPopupWindowType GetPopupWindowType() const;
virtual SfxPopupWindow* CreatePopupWindow();
- virtual void StateChanged( USHORT nSID,
+ virtual void StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState );
@@ -141,8 +141,8 @@ class SwScrollNaviPopup : public SfxPopupWindow
String sQuickHelp[2 * NID_COUNT];
- USHORT nFwdId;
- USHORT nBackId;
+ sal_uInt16 nFwdId;
+ sal_uInt16 nBackId;
void ApplyImageList();
@@ -153,10 +153,10 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
public:
- SwScrollNaviPopup( USHORT nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
+ SwScrollNaviPopup( sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
~SwScrollNaviPopup();
- static String GetQuickHelpText(BOOL bNext);
+ static String GetQuickHelpText(sal_Bool bNext);
virtual SfxPopupWindow* Clone() const;
void GrabFocus(){aToolBox.GrabFocus();}
@@ -194,9 +194,9 @@ class SwNaviImageButton : public ImageButton
class SwHlpImageButton : public ImageButton
{
- BOOL bUp;
+ sal_Bool bUp;
public:
- SwHlpImageButton(Window* pParent, const ResId& rResId, BOOL bUpBtn) :
+ SwHlpImageButton(Window* pParent, const ResId& rResId, sal_Bool bUpBtn) :
ImageButton(pParent, rResId), bUp(bUpBtn){}
virtual void RequestHelp( const HelpEvent& rHEvt );
@@ -210,10 +210,10 @@ class SwPreviewZoomControl : public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- SwPreviewZoomControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwPreviewZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwPreviewZoomControl();
- virtual void StateChanged( USHORT nSID,
+ virtual void StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState );
diff --git a/sw/source/ui/inc/wrap.hxx b/sw/source/ui/inc/wrap.hxx
index e0fc8a394c5f..6ca664ea5d84 100644
--- a/sw/source/ui/inc/wrap.hxx
+++ b/sw/source/ui/inc/wrap.hxx
@@ -55,7 +55,7 @@ class SwWrapDlg : public SfxSingleTabDialog
SwWrtShell* pWrtShell;
public:
- SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode);
+ SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode);
~SwWrapDlg();
inline SwWrtShell* GetWrtShell() { return pWrtShell; }
@@ -99,22 +99,22 @@ class SwWrapTabPage: public SfxTabPage
ImageList aWrapIL;
ImageList aWrapILH;
- USHORT nOldLeftMargin;
- USHORT nOldRightMargin;
- USHORT nOldUpperMargin;
- USHORT nOldLowerMargin;
+ sal_uInt16 nOldLeftMargin;
+ sal_uInt16 nOldRightMargin;
+ sal_uInt16 nOldUpperMargin;
+ sal_uInt16 nOldLowerMargin;
RndStdIds nAnchorId;
- USHORT nHtmlMode;
+ sal_uInt16 nHtmlMode;
Size aFrmSize;
SwWrtShell* pWrtSh;
- BOOL bFormat;
- BOOL bNew;
- BOOL bHtmlMode;
- BOOL bDrawMode;
- BOOL bContourImage;
+ sal_Bool bFormat;
+ sal_Bool bNew;
+ sal_Bool bHtmlMode;
+ sal_Bool bDrawMode;
+ sal_Bool bContourImage;
SwWrapTabPage(Window *pParent, const SfxItemSet &rSet);
~SwWrapTabPage();
@@ -136,12 +136,12 @@ public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
- static USHORT* GetRanges();
- inline void SetNewFrame(BOOL bNewFrame) { bNew = bNewFrame; }
- inline void SetFormatUsed(BOOL bFmt, BOOL bDrw) { bFormat = bFmt;
+ static sal_uInt16* GetRanges();
+ inline void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
+ inline void SetFormatUsed(sal_Bool bFmt, sal_Bool bDrw) { bFormat = bFmt;
bDrawMode = bDrw; }
inline void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; }
};
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index 20d057ecf05a..70847d8d2e75 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -106,7 +106,7 @@ public:
using SwEditShell::Insert;
- typedef long (SwWrtShell::*SELECTFUNC)(const Point *, BOOL bProp );
+ typedef long (SwWrtShell::*SELECTFUNC)(const Point *, sal_Bool bProp );
SELECTFUNC fnDrag;
SELECTFUNC fnSetCrsr;
@@ -114,160 +114,160 @@ public:
SELECTFUNC fnKillSel;
// Alle Selektionen aufheben
- long ResetSelect( const Point *, BOOL );
+ long ResetSelect( const Point *, sal_Bool );
//setzt den Cursorstack nach dem Bewegen mit PageUp/-Down
//zurueck, falls ein Stack aufgebaut ist
inline void ResetCursorStack();
SelectionType GetSelectionType() const;
- BOOL IsModePushed() const { return 0 != pModeStack; }
+ sal_Bool IsModePushed() const { return 0 != pModeStack; }
void PushMode();
void PopMode();
void SttSelect();
void EndSelect();
- BOOL IsInSelect() const { return bInSelect; }
- void SetInSelect(BOOL bSel = TRUE) { bInSelect = bSel; }
+ sal_Bool IsInSelect() const { return bInSelect; }
+ void SetInSelect(sal_Bool bSel = sal_True) { bInSelect = bSel; }
// Liegt eine Text- oder Rahmenselektion vor?
- BOOL HasSelection() const { return SwCrsrShell::HasSelection() ||
+ sal_Bool HasSelection() const { return SwCrsrShell::HasSelection() ||
IsMultiSelection() || IsSelFrmMode() || IsObjSelected(); }
- BOOL Pop( BOOL bOldCrsr = TRUE );
+ sal_Bool Pop( sal_Bool bOldCrsr = sal_True );
void EnterStdMode();
- BOOL IsStdMode() const { return !bExtMode && !bAddMode && !bBlockMode; }
+ sal_Bool IsStdMode() const { return !bExtMode && !bAddMode && !bBlockMode; }
void EnterExtMode();
void LeaveExtMode();
long ToggleExtMode();
- BOOL IsExtMode() const { return bExtMode; }
+ sal_Bool IsExtMode() const { return bExtMode; }
void EnterAddMode();
void LeaveAddMode();
long ToggleAddMode();
- BOOL IsAddMode() const { return bAddMode; }
+ sal_Bool IsAddMode() const { return bAddMode; }
void EnterBlockMode();
void LeaveBlockMode();
long ToggleBlockMode();
- BOOL IsBlockMode() const { return bBlockMode; }
+ sal_Bool IsBlockMode() const { return bBlockMode; }
- void SetInsMode( BOOL bOn = TRUE );
+ void SetInsMode( sal_Bool bOn = sal_True );
void ToggleInsMode() { SetInsMode( !bIns ); }
- BOOL IsInsMode() const { return bIns; }
- void SetRedlineModeAndCheckInsMode( USHORT eMode );
+ sal_Bool IsInsMode() const { return bIns; }
+ void SetRedlineModeAndCheckInsMode( sal_uInt16 eMode );
void EnterSelFrmMode(const Point *pStartDrag = 0);
void LeaveSelFrmMode();
- BOOL IsSelFrmMode() const { return bLayoutMode; }
+ sal_Bool IsSelFrmMode() const { return bLayoutMode; }
// Selektion von Rahmen aufheben
void UnSelectFrm();
void Invalidate();
// Tabellenzellen selektieren fuer Bearbeiten von Formeln in der Ribbonbar
- inline void SelTblCells( const Link &rLink, BOOL bMark = TRUE );
+ inline void SelTblCells( const Link &rLink, sal_Bool bMark = sal_True );
inline void EndSelTblCells();
//Wortweisen oder zeilenweisen Selektionsmodus verlassen. Wird
//in der Regel in MB-Up gerufen.
- BOOL IsExtSel() const { return bSelWrd || bSelLn; }
+ sal_Bool IsExtSel() const { return bSelWrd || bSelLn; }
// erfrage, ob der akt. fnDrag - Pointer auf BeginDrag gesetzt ist
// Wird fuer MouseMove gebraucht, um die Bugs 55592/55931 zu umgehen.
- inline BOOL Is_FnDragEQBeginDrag() const;
+ inline sal_Bool Is_FnDragEQBeginDrag() const;
//Basisabfragen
- BOOL IsInWrd() { return IsInWord(); }
- BOOL IsSttWrd() { return IsStartWord(); }
- BOOL IsEndWrd();
- BOOL IsSttOfPara() const { return IsSttPara(); }
- BOOL IsEndOfPara() const { return IsEndPara(); }
+ sal_Bool IsInWrd() { return IsInWord(); }
+ sal_Bool IsSttWrd() { return IsStartWord(); }
+ sal_Bool IsEndWrd();
+ sal_Bool IsSttOfPara() const { return IsSttPara(); }
+ sal_Bool IsEndOfPara() const { return IsEndPara(); }
//Word bzw. Satz selektieren.
- BOOL SelNearestWrd();
- BOOL SelWrd (const Point * = 0, BOOL bProp=FALSE );
+ sal_Bool SelNearestWrd();
+ sal_Bool SelWrd (const Point * = 0, sal_Bool bProp=sal_False );
// --> FME 2004-07-30 #i32329# Enhanced selection
- void SelSentence (const Point * = 0, BOOL bProp=FALSE );
- void SelPara (const Point * = 0, BOOL bProp=FALSE );
+ void SelSentence (const Point * = 0, sal_Bool bProp=sal_False );
+ void SelPara (const Point * = 0, sal_Bool bProp=sal_False );
// <--
long SelAll();
//Basiscursortravelling
-typedef BOOL (SwWrtShell:: *FNSimpleMove)();
- BOOL SimpleMove( FNSimpleMove, BOOL bSelect );
-
- BOOL Left ( USHORT nMode, BOOL bSelect,
- USHORT nCount, BOOL bBasicCall, BOOL bVisual = FALSE );
- BOOL Right ( USHORT nMode, BOOL bSelect,
- USHORT nCount, BOOL bBasicCall, BOOL bVisual = FALSE );
- BOOL Up ( BOOL bSelect = FALSE, USHORT nCount = 1,
- BOOL bBasicCall = FALSE );
- BOOL Down ( BOOL bSelect = FALSE, USHORT nCount = 1,
- BOOL bBasicCall = FALSE );
- BOOL NxtWrd ( BOOL bSelect = FALSE ) { return SimpleMove( &SwWrtShell::_NxtWrd, bSelect ); }
- BOOL PrvWrd ( BOOL bSelect = FALSE ) { return SimpleMove( &SwWrtShell::_PrvWrd, bSelect ); }
-
- BOOL LeftMargin ( BOOL bSelect, BOOL bBasicCall );
- BOOL RightMargin( BOOL bSelect, BOOL bBasicCall );
-
- BOOL SttDoc ( BOOL bSelect = FALSE );
- BOOL EndDoc ( BOOL bSelect = FALSE );
-
- BOOL SttNxtPg ( BOOL bSelect = FALSE );
- BOOL SttPrvPg ( BOOL bSelect = FALSE );
- BOOL EndNxtPg ( BOOL bSelect = FALSE );
- BOOL EndPrvPg ( BOOL bSelect = FALSE );
- BOOL SttPg ( BOOL bSelect = FALSE );
- BOOL EndPg ( BOOL bSelect = FALSE );
- BOOL SttPara ( BOOL bSelect = FALSE );
- BOOL EndPara ( BOOL bSelect = FALSE );
- BOOL FwdPara ( BOOL bSelect = FALSE )
+typedef sal_Bool (SwWrtShell:: *FNSimpleMove)();
+ sal_Bool SimpleMove( FNSimpleMove, sal_Bool bSelect );
+
+ sal_Bool Left ( sal_uInt16 nMode, sal_Bool bSelect,
+ sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual = sal_False );
+ sal_Bool Right ( sal_uInt16 nMode, sal_Bool bSelect,
+ sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual = sal_False );
+ sal_Bool Up ( sal_Bool bSelect = sal_False, sal_uInt16 nCount = 1,
+ sal_Bool bBasicCall = sal_False );
+ sal_Bool Down ( sal_Bool bSelect = sal_False, sal_uInt16 nCount = 1,
+ sal_Bool bBasicCall = sal_False );
+ sal_Bool NxtWrd ( sal_Bool bSelect = sal_False ) { return SimpleMove( &SwWrtShell::_NxtWrd, bSelect ); }
+ sal_Bool PrvWrd ( sal_Bool bSelect = sal_False ) { return SimpleMove( &SwWrtShell::_PrvWrd, bSelect ); }
+
+ sal_Bool LeftMargin ( sal_Bool bSelect, sal_Bool bBasicCall );
+ sal_Bool RightMargin( sal_Bool bSelect, sal_Bool bBasicCall );
+
+ sal_Bool SttDoc ( sal_Bool bSelect = sal_False );
+ sal_Bool EndDoc ( sal_Bool bSelect = sal_False );
+
+ sal_Bool SttNxtPg ( sal_Bool bSelect = sal_False );
+ sal_Bool SttPrvPg ( sal_Bool bSelect = sal_False );
+ sal_Bool EndNxtPg ( sal_Bool bSelect = sal_False );
+ sal_Bool EndPrvPg ( sal_Bool bSelect = sal_False );
+ sal_Bool SttPg ( sal_Bool bSelect = sal_False );
+ sal_Bool EndPg ( sal_Bool bSelect = sal_False );
+ sal_Bool SttPara ( sal_Bool bSelect = sal_False );
+ sal_Bool EndPara ( sal_Bool bSelect = sal_False );
+ sal_Bool FwdPara ( sal_Bool bSelect = sal_False )
{ return SimpleMove( &SwWrtShell::_FwdPara, bSelect ); }
- BOOL BwdPara ( BOOL bSelect = FALSE )
+ sal_Bool BwdPara ( sal_Bool bSelect = sal_False )
{ return SimpleMove( &SwWrtShell::_BwdPara, bSelect ); }
- BOOL FwdSentence( BOOL bSelect = FALSE )
+ sal_Bool FwdSentence( sal_Bool bSelect = sal_False )
{ return SimpleMove( &SwWrtShell::_FwdSentence, bSelect ); }
- BOOL BwdSentence( BOOL bSelect = FALSE )
+ sal_Bool BwdSentence( sal_Bool bSelect = sal_False )
{ return SimpleMove( &SwWrtShell::_BwdSentence, bSelect ); }
// --> FME 2004-07-30 #i20126# Enhanced table selection
- BOOL SelectTableRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false );
+ sal_Bool SelectTableRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false );
// <--
- BOOL SelectTableRow();
- BOOL SelectTableCol();
- BOOL SelectTableCell();
+ sal_Bool SelectTableRow();
+ sal_Bool SelectTableCol();
+ sal_Bool SelectTableCell();
- BOOL SelectTxtAttr( USHORT nWhich, const SwTxtAttr* pAttr = 0 );
+ sal_Bool SelectTxtAttr( sal_uInt16 nWhich, const SwTxtAttr* pAttr = 0 );
// Spaltenweise Spruenge
- BOOL StartOfColumn ( BOOL bSelect = FALSE );
- BOOL EndOfColumn ( BOOL bSelect = FALSE );
- BOOL StartOfNextColumn ( BOOL bSelect = FALSE );
- BOOL EndOfNextColumn ( BOOL bSelect = FALSE );
- BOOL StartOfPrevColumn ( BOOL bSelect = FALSE );
- BOOL EndOfPrevColumn ( BOOL bSelect = FALSE );
+ sal_Bool StartOfColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool EndOfColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool StartOfNextColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool EndOfNextColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool StartOfPrevColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool EndOfPrevColumn ( sal_Bool bSelect = sal_False );
// setze den Cursor auf die Seite "nPage" an den Anfang
// zusaetzlich zu der gleichnamigen Implementierung in crsrsh.hxx
// werden hier alle bestehenden Selektionen vor dem Setzen des
// Cursors aufgehoben
- BOOL GotoPage( USHORT nPage, BOOL bRecord );
+ sal_Bool GotoPage( sal_uInt16 nPage, sal_Bool bRecord );
//setzen des Cursors; merken der alten Position fuer Zurueckblaettern.
DECL_LINK( ExecFlyMac, void * );
- BOOL PageCrsr(SwTwips lOffset, BOOL bSelect);
+ sal_Bool PageCrsr(SwTwips lOffset, sal_Bool bSelect);
// Felder Update
- void UpdateInputFlds( SwInputFieldList* pLst = 0, BOOL bOnlyInSel = FALSE );
+ void UpdateInputFlds( SwInputFieldList* pLst = 0, sal_Bool bOnlyInSel = sal_False );
- void NoEdit(BOOL bHideCrsr = TRUE);
+ void NoEdit(sal_Bool bHideCrsr = sal_True);
void Edit();
- BOOL IsNoEdit() const { return bNoEdit; }
+ sal_Bool IsNoEdit() const { return bNoEdit; }
- BOOL IsRetainSelection() const { return mbRetainSelection; }
- void SetRetainSelection( BOOL bRet ) { mbRetainSelection = bRet; }
+ sal_Bool IsRetainSelection() const { return mbRetainSelection; }
+ void SetRetainSelection( sal_Bool bRet ) { mbRetainSelection = bRet; }
// change current data base and notify
void ChgDBData(const SwDBData& SwDBData);
@@ -279,7 +279,7 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
long DelLeft();
// loescht auch Rahmen bzw. setzt den Cursor in den Rahmen,
- // wenn bDelFrm == FALSE ist
+ // wenn bDelFrm == sal_False ist
long DelRight();
long DelToEndOfPara();
long DelToStartOfPara();
@@ -298,7 +298,7 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
WORD_SPACE_AFTER = 2,
WORD_NO_SPACE = 3
};
- int IntelligentCut(int nSelectionType, BOOL bCut = TRUE);
+ int IntelligentCut(int nSelectionType, sal_Bool bCut = sal_True);
// Editieren
void Insert(SwField &);
@@ -306,28 +306,28 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
// Graphic
void Insert( const String &rPath, const String &rFilter,
const Graphic &, SwFlyFrmAttrMgr * = 0,
- BOOL bRule = FALSE );
+ sal_Bool bRule = sal_False );
void InsertByWord( const String & );
- void InsertPageBreak(const String *pPageDesc = 0, USHORT nPgNum = 0 );
+ void InsertPageBreak(const String *pPageDesc = 0, sal_uInt16 nPgNum = 0 );
void InsertLineBreak();
void InsertColumnBreak();
- void InsertFootnote(const String &, BOOL bEndNote = FALSE, BOOL bEdit = TRUE );
- void SplitNode( BOOL bAutoFormat = FALSE, BOOL bCheckTableStart = TRUE );
- BOOL CanInsert();
+ void InsertFootnote(const String &, sal_Bool bEndNote = sal_False, sal_Bool bEdit = sal_True );
+ void SplitNode( sal_Bool bAutoFormat = sal_False, sal_Bool bCheckTableStart = sal_True );
+ sal_Bool CanInsert();
// Verzeichnisse
void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
- BOOL UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
+ sal_Bool UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
// Numerierung und Bullets
/**
Turns on numbering or bullets.
- @param bNum TRUE: turn on numbering
- FALSE: turn on bullets
+ @param bNum sal_True: turn on numbering
+ sal_False: turn on bullets
*/
- void NumOrBulletOn(BOOL bNum); // #i29560#
+ void NumOrBulletOn(sal_Bool bNum); // #i29560#
void NumOrBulletOff(); // #i29560#
void NumOn();
void BulletOn();
@@ -336,12 +336,12 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
void InsertObject( /*SvInPlaceObjectRef *pObj, */ // != 0 fuer Clipboard
const svt::EmbeddedObjectRef&,
SvGlobalName *pName = 0, // != 0 entspr. Object erzeugen.
- BOOL bActivate = TRUE,
- USHORT nSlotId = 0); // SlotId fuer Dialog
+ sal_Bool bActivate = sal_True,
+ sal_uInt16 nSlotId = 0); // SlotId fuer Dialog
- BOOL InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrmFmt **pFlyFrmFmt = 0 );
+ sal_Bool InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrmFmt **pFlyFrmFmt = 0 );
void LaunchOLEObj( long nVerb = 0 ); // Server starten
- BOOL IsOLEObj() const { return GetCntType() == CNT_OLE;}
+ sal_Bool IsOLEObj() const { return GetCntType() == CNT_OLE;}
virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset );
virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
const SwRect *pFlyPrtRect = 0,
@@ -364,32 +364,32 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
void SetPageStyle(const String &rCollName);
- String GetCurPageStyle( const BOOL bCalcFrm = TRUE ) const;
+ String GetCurPageStyle( const sal_Bool bCalcFrm = sal_True ) const;
// Aktuelle Vorlage anhand der geltenden Attribute aendern
void QuickUpdateStyle();
enum DoType { UNDO, REDO, REPEAT };
- void Do( DoType eDoType, USHORT nCnt = 1 );
+ void Do( DoType eDoType, sal_uInt16 nCnt = 1 );
String GetDoString( DoType eDoType ) const;
String GetRepeatString() const;
- USHORT GetDoStrings( DoType eDoType, SfxStringListItem& rStrLstItem ) const;
+ sal_uInt16 GetDoStrings( DoType eDoType, SfxStringListItem& rStrLstItem ) const;
//Suchen oder Ersetzen
- ULONG SearchPattern(const com::sun::star::util::SearchOptions& rSearchOpt,
- BOOL bSearchInNotes,
+ sal_uLong SearchPattern(const com::sun::star::util::SearchOptions& rSearchOpt,
+ sal_Bool bSearchInNotes,
SwDocPositions eStart, SwDocPositions eEnde,
FindRanges eFlags = FND_IN_BODY,
- int bReplace = FALSE );
+ int bReplace = sal_False );
- ULONG SearchTempl (const String &rTempl,
+ sal_uLong SearchTempl (const String &rTempl,
SwDocPositions eStart, SwDocPositions eEnde,
FindRanges eFlags = FND_IN_BODY,
const String* pReplTempl = 0 );
- ULONG SearchAttr (const SfxItemSet& rFindSet,
- BOOL bNoColls,
+ sal_uLong SearchAttr (const SfxItemSet& rFindSet,
+ sal_Bool bNoColls,
SwDocPositions eStart,SwDocPositions eEnde,
FindRanges eFlags = FND_IN_BODY,
const com::sun::star::util::SearchOptions* pSearchOpt = 0,
@@ -399,30 +399,30 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
// Aktion vor Cursorbewegung
// Hebt gfs. Selektionen auf, triggert Timer und GCAttr()
- void MoveCrsr( BOOL bWithSelect = FALSE );
+ void MoveCrsr( sal_Bool bWithSelect = sal_False );
// Eingabefelder updaten
- BOOL StartInputFldDlg(SwField*, BOOL bNextButton, Window* pParentWin = 0, ByteString* pWindowState = 0);
+ sal_Bool StartInputFldDlg(SwField*, sal_Bool bNextButton, Window* pParentWin = 0, ByteString* pWindowState = 0);
// update DropDown fields
- BOOL StartDropDownFldDlg(SwField*, BOOL bNextButton, ByteString* pWindowState = 0);
+ sal_Bool StartDropDownFldDlg(SwField*, sal_Bool bNextButton, ByteString* pWindowState = 0);
//"Handler" fuer Anederungen an der DrawView - fuer Controls.
virtual void DrawSelChanged( );
// springe zum Bookmark und setze die "Selections-Flags" wieder richtig
- BOOL GotoMark( const ::sw::mark::IMark* const pMark );
- BOOL GotoMark( const ::sw::mark::IMark* const pMark, BOOL bSelect, BOOL bStart );
- BOOL GotoMark( const ::rtl::OUString& rName );
- BOOL GoNextBookmark(); // TRUE, wenn's noch eine gab
- BOOL GoPrevBookmark();
+ sal_Bool GotoMark( const ::sw::mark::IMark* const pMark );
+ sal_Bool GotoMark( const ::sw::mark::IMark* const pMark, sal_Bool bSelect, sal_Bool bStart );
+ sal_Bool GotoMark( const ::rtl::OUString& rName );
+ sal_Bool GoNextBookmark(); // sal_True, wenn's noch eine gab
+ sal_Bool GoPrevBookmark();
bool GotoFieldmark(::sw::mark::IFieldmark const * const pMark);
- BOOL GotoField( const SwFmtFld& rFld );
+ sal_Bool GotoField( const SwFmtFld& rFld );
// jump to the next / previous hyperlink - inside text and also
// on graphics
- BOOL SelectNextPrevHyperlink( BOOL bNext = TRUE );
+ sal_Bool SelectNextPrevHyperlink( sal_Bool bNext = sal_True );
// Zugehoerige SwView ermitteln
const SwView& GetView() const { return rView; }
@@ -431,23 +431,23 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
//Weil es sonst keiner macht, gibt es hier eine ExecMacro()
void ExecMacro( const SvxMacro& rMacro, String* pRet = 0, SbxArray* pArgs = 0 );
// rufe ins dunkle Basic/JavaScript
- USHORT CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
- BOOL bCheckPtr = FALSE, SbxArray* pArgs = 0,
+ sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
+ sal_Bool bCheckPtr = sal_False, SbxArray* pArgs = 0,
const Link* pCallBack = 0 );
// ein Klick aus das angegebene Feld. Der Cursor steht auf diesem.
// Fuehre die vor definierten Aktionen aus.
void ClickToField( const SwField& rFld );
- void ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter = URLLOAD_NOFILTER );
- BOOL ClickToINetGrf( const Point& rDocPt, USHORT nFilter = URLLOAD_NOFILTER );
- inline BOOL IsInClickToEdit() const ;
+ void ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter = URLLOAD_NOFILTER );
+ sal_Bool ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter = URLLOAD_NOFILTER );
+ inline sal_Bool IsInClickToEdit() const ;
// fall ein URL-Button selektiert ist, dessen URL returnen, ansonsten
// einen LeerString
- BOOL GetURLFromButton( String& rURL, String& rDescr ) const;
+ sal_Bool GetURLFromButton( String& rURL, String& rDescr ) const;
void NavigatorPaste( const NaviContentBookmark& rBkmk,
- const USHORT nAction );
+ const sal_uInt16 nAction );
// die Core erzeugt eine Selektion, das SttSelect muss gerufen werden
virtual void NewCoreSelection();
@@ -467,14 +467,14 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
const SwViewOption *pViewOpt = 0);
virtual ~SwWrtShell();
- BOOL TryRemoveIndent(); // #i23725#
+ sal_Bool TryRemoveIndent(); // #i23725#
String GetSelDescr() const;
private:
SW_DLLPRIVATE void OpenMark();
- SW_DLLPRIVATE void CloseMark( BOOL bOkFlag );
+ SW_DLLPRIVATE void CloseMark( sal_Bool bOkFlag );
SW_DLLPRIVATE String GetWrdDelim();
SW_DLLPRIVATE String GetSDelim();
@@ -483,11 +483,11 @@ private:
struct ModeStack
{
ModeStack *pNext;
- BOOL bAdd,
+ sal_Bool bAdd,
bBlock,
bExt,
bIns;
- ModeStack(ModeStack *pNextMode, BOOL _bIns, BOOL _bExt, BOOL _bAdd, BOOL _bBlock):
+ ModeStack(ModeStack *pNextMode, sal_Bool _bIns, sal_Bool _bExt, sal_Bool _bAdd, sal_Bool _bBlock):
pNext(pNextMode),
bAdd(_bAdd),
bBlock(_bBlock),
@@ -508,11 +508,11 @@ private:
{
Point aDocPos;
CrsrStack *pNext;
- BOOL bValidCurPos : 1;
- BOOL bIsFrmSel : 1;
+ sal_Bool bValidCurPos : 1;
+ sal_Bool bIsFrmSel : 1;
SwTwips lOffset;
- CrsrStack( BOOL bValid, BOOL bFrmSel, const Point &rDocPos,
+ CrsrStack( sal_Bool bValid, sal_Bool bFrmSel, const Point &rDocPos,
SwTwips lOff, CrsrStack *pN )
: aDocPos(rDocPos),
pNext(pN),
@@ -529,39 +529,39 @@ private:
SwView &rView;
Point aDest;
- BOOL bDestOnStack;
- BOOL HasCrsrStack() const { return 0 != pCrsrStack; }
- SW_DLLPRIVATE BOOL PushCrsr(SwTwips lOffset, BOOL bSelect);
- SW_DLLPRIVATE BOOL PopCrsr(BOOL bUpdate, BOOL bSelect = FALSE);
+ sal_Bool bDestOnStack;
+ sal_Bool HasCrsrStack() const { return 0 != pCrsrStack; }
+ SW_DLLPRIVATE sal_Bool PushCrsr(SwTwips lOffset, sal_Bool bSelect);
+ SW_DLLPRIVATE sal_Bool PopCrsr(sal_Bool bUpdate, sal_Bool bSelect = sal_False);
// ENDE Cursor bei PageUp / -Down mitnehmen
- SW_DLLPRIVATE BOOL _SttWrd();
- SW_DLLPRIVATE BOOL _EndWrd();
- SW_DLLPRIVATE BOOL _NxtWrd();
- SW_DLLPRIVATE BOOL _PrvWrd();
+ SW_DLLPRIVATE sal_Bool _SttWrd();
+ SW_DLLPRIVATE sal_Bool _EndWrd();
+ SW_DLLPRIVATE sal_Bool _NxtWrd();
+ SW_DLLPRIVATE sal_Bool _PrvWrd();
// --> OD 2008-08-06 #i92468#
- SW_DLLPRIVATE BOOL _NxtWrdForDelete();
- SW_DLLPRIVATE BOOL _PrvWrdForDelete();
+ SW_DLLPRIVATE sal_Bool _NxtWrdForDelete();
+ SW_DLLPRIVATE sal_Bool _PrvWrdForDelete();
// <--
- SW_DLLPRIVATE BOOL _FwdSentence();
- SW_DLLPRIVATE BOOL _BwdSentence();
- BOOL _FwdPara();
- SW_DLLPRIVATE BOOL _BwdPara();
+ SW_DLLPRIVATE sal_Bool _FwdSentence();
+ SW_DLLPRIVATE sal_Bool _BwdSentence();
+ sal_Bool _FwdPara();
+ SW_DLLPRIVATE sal_Bool _BwdPara();
// Selektionen
- BOOL bIns :1;
- BOOL bInSelect :1;
- BOOL bExtMode :1;
- BOOL bAddMode :1;
- BOOL bBlockMode :1;
- BOOL bLayoutMode :1;
- BOOL bNoEdit :1;
- BOOL bCopy :1;
- BOOL bSelWrd :1;
- BOOL bSelLn :1;
- BOOL bIsInClickToEdit:1;
- BOOL bClearMark :1; // Selektion fuer ChartAutoPilot nicht loeschen
- BOOL mbRetainSelection :1; // Do not remove selections
+ sal_Bool bIns :1;
+ sal_Bool bInSelect :1;
+ sal_Bool bExtMode :1;
+ sal_Bool bAddMode :1;
+ sal_Bool bBlockMode :1;
+ sal_Bool bLayoutMode :1;
+ sal_Bool bNoEdit :1;
+ sal_Bool bCopy :1;
+ sal_Bool bSelWrd :1;
+ sal_Bool bSelLn :1;
+ sal_Bool bIsInClickToEdit:1;
+ sal_Bool bClearMark :1; // Selektion fuer ChartAutoPilot nicht loeschen
+ sal_Bool mbRetainSelection :1; // Do not remove selections
Point aStart;
Link aSelTblLink;
@@ -574,37 +574,37 @@ private:
SW_DLLPRIVATE void SttDragDrop(Timer *);
using SwCrsrShell::SetCrsr;
- SW_DLLPRIVATE long SetCrsr(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long SetCrsr(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long SetCrsrKillSel(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long SetCrsrKillSel(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long StdSelect(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long BeginDrag(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long Drag(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long EndDrag(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long StdSelect(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long BeginDrag(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long Drag(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long EndDrag(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long ExtSelWrd(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long ExtSelLn(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long ExtSelWrd(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long ExtSelLn(const Point *, sal_Bool bProp=sal_False );
//Verschieben von Text aus Drag and Drop; Point ist
//Destination fuer alle Selektionen.
- SW_DLLPRIVATE long MoveText(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long MoveText(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long BeginFrmDrag(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long BeginFrmDrag(const Point *, sal_Bool bProp=sal_False );
//nach SSize/Move eines Frames Update; Point ist Destination.
- SW_DLLPRIVATE long UpdateLayoutFrm(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long UpdateLayoutFrm(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long SttLeaveSelect(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long AddLeaveSelect(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long Ignore(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long SttLeaveSelect(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long AddLeaveSelect(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long Ignore(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE void LeaveExtSel() { bSelWrd = bSelLn = FALSE;}
- SW_DLLPRIVATE BOOL _CanInsert();
+ SW_DLLPRIVATE void LeaveExtSel() { bSelWrd = bSelLn = sal_False;}
+ SW_DLLPRIVATE sal_Bool _CanInsert();
- SW_DLLPRIVATE BOOL GoStart(BOOL KeepArea = FALSE, BOOL * = 0,
- BOOL bSelect = FALSE, BOOL bDontMoveRegion = FALSE);
- SW_DLLPRIVATE BOOL GoEnd(BOOL KeepArea = FALSE, BOOL * = 0);
+ SW_DLLPRIVATE sal_Bool GoStart(sal_Bool KeepArea = sal_False, sal_Bool * = 0,
+ sal_Bool bSelect = sal_False, sal_Bool bDontMoveRegion = sal_False);
+ SW_DLLPRIVATE sal_Bool GoEnd(sal_Bool KeepArea = sal_False, sal_Bool * = 0);
enum BookMarkMove
{
@@ -614,7 +614,7 @@ private:
BOOKMARK_LAST_LAST_ENTRY
};
- SW_DLLPRIVATE BOOL MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark=NULL);
+ SW_DLLPRIVATE sal_Bool MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark=NULL);
};
inline void SwWrtShell::ResetCursorStack()
@@ -623,27 +623,27 @@ inline void SwWrtShell::ResetCursorStack()
_ResetCursorStack();
}
-inline void SwWrtShell::SelTblCells(const Link &rLink, BOOL bMark )
+inline void SwWrtShell::SelTblCells(const Link &rLink, sal_Bool bMark )
{
- SetSelTblCells( TRUE );
+ SetSelTblCells( sal_True );
bClearMark = bMark;
aSelTblLink = rLink;
}
inline void SwWrtShell::EndSelTblCells()
{
- SetSelTblCells( FALSE );
- bClearMark = TRUE;
+ SetSelTblCells( sal_False );
+ bClearMark = sal_True;
}
-inline BOOL SwWrtShell::IsInClickToEdit() const { return bIsInClickToEdit; }
+inline sal_Bool SwWrtShell::IsInClickToEdit() const { return bIsInClickToEdit; }
-inline BOOL SwWrtShell::Is_FnDragEQBeginDrag() const
+inline sal_Bool SwWrtShell::Is_FnDragEQBeginDrag() const
{
#ifdef GCC
SELECTFUNC fnTmp = &SwWrtShell::BeginDrag;
return fnDrag == fnTmp;
#else
- return sal::static_int_cast< BOOL >(fnDrag == &SwWrtShell::BeginDrag);
+ return sal::static_int_cast< sal_Bool >(fnDrag == &SwWrtShell::BeginDrag);
#endif
}
diff --git a/sw/source/ui/inc/zoomctrl.hxx b/sw/source/ui/inc/zoomctrl.hxx
index f2d1843828fb..05880e12189e 100644
--- a/sw/source/ui/inc/zoomctrl.hxx
+++ b/sw/source/ui/inc/zoomctrl.hxx
@@ -35,13 +35,13 @@ private:
String sPreviewZoom;
public:
virtual void Command( const CommandEvent& rCEvt );
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
virtual void Paint( const UserDrawEvent& rEvt );
SFX_DECL_STATUSBAR_CONTROL();
- SwZoomControl( USHORT nSlotId, USHORT nId, StatusBar& rStb );
+ SwZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
~SwZoomControl();
};
diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx
index 40400f591753..66c2b7d67b7e 100644
--- a/sw/source/ui/index/cntex.cxx
+++ b/sw/source/ui/index/cntex.cxx
@@ -119,13 +119,13 @@ void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
}
void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
uno::Reference< XPropertySet > & xProps,
- USHORT nId, const String& rValue)
+ sal_uInt16 nId, const String& rValue)
{
lcl_SetProp( xInfo, xProps, SW_PROP_NAME_STR(nId), rValue);
}
void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
uno::Reference< XPropertySet > & xProps,
- USHORT nId, sal_Int16 nValue )
+ sal_uInt16 nId, sal_Int16 nValue )
{
OUString uPropName(C2U(SW_PROP_NAME_STR(nId)));
if(xInfo->hasPropertyByName(uPropName))
@@ -139,7 +139,7 @@ void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
void lcl_SetBOOLProp(
uno::Reference< beans::XPropertySetInfo > & xInfo,
uno::Reference< beans::XPropertySet > & xProps,
- USHORT nId, sal_Bool bValue )
+ sal_uInt16 nId, sal_Bool bValue )
{
OUString uPropName(C2U(SW_PROP_NAME_STR(nId)));
if(xInfo->hasPropertyByName(uPropName))
@@ -159,7 +159,7 @@ IMPL_LINK( SwMultiTOXTabDialog, CreateExample_Hdl, void*, EMPTYARG )
SwXTextDocument* pDoc = reinterpret_cast<SwXTextDocument*>(xDocTunnel->getSomething(SwXTextDocument::getUnoTunnelId()));
if( pDoc )
- pDoc->GetDocShell()->_LoadStyles( *rSh.GetView().GetDocShell(), TRUE );
+ pDoc->GetDocShell()->_LoadStyles( *rSh.GetView().GetDocShell(), sal_True );
uno::Reference< lang::XMultiServiceFactory > xFact(
xModel, uno::UNO_QUERY);
@@ -251,7 +251,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
if(xSectPr.is())
{
- BOOL bTemp = i == nTOXIndex;
+ sal_Bool bTemp = i == nTOXIndex;
aVal.setValue(&bTemp, ::getBooleanCppuType());
xSectPr->setPropertyValue(uIsVisible, aVal);
}
@@ -421,7 +421,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
if(TOKEN_TAB_STOP == aToken.eTokenType)
{
pPropValArr[2].Name = C2U("TabStopRightAligned");
- BOOL bTemp = SVX_TAB_ADJUST_END == aToken.eTabAlign;
+ sal_Bool bTemp = SVX_TAB_ADJUST_END == aToken.eTabAlign;
pPropValArr[2].Value.setValue(&bTemp, ::getBooleanCppuType());
pPropValArr[3].Name = C2U("TabStopFillCharacter");
pPropValArr[3].Value <<= OUString(aToken.cTabFillChar);
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index a453a46988ee..4d7763143725 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -233,7 +233,7 @@ public:
sal_Bool IsModified()const;
- virtual String GetCellText( long nRow, USHORT nColumn ) const;
+ virtual String GetCellText( long nRow, sal_uInt16 nColumn ) const;
};
class SwAutoMarkDlg_Impl : public ModalDialog
@@ -536,7 +536,7 @@ SwTOXDescription* SwMultiTOXTabDialog::CreateTOXDescFromTOXBase(
pDesc->SetIndexOptions(pCurTOX->GetOptions());
pDesc->SetMainEntryCharStyle(pCurTOX->GetMainEntryCharStyle());
if(pDesc->GetTOXType() != TOX_INDEX)
- pDesc->SetLevel((BYTE)pCurTOX->GetLevel());
+ pDesc->SetLevel((sal_uInt8)pCurTOX->GetLevel());
pDesc->SetCreateFromObjectNames(pCurTOX->IsFromObjectNames());
pDesc->SetSequenceName(pCurTOX->GetSequenceName());
pDesc->SetCaptionDisplay(pCurTOX->GetCaptionDisplay());
@@ -571,7 +571,7 @@ IMPL_LINK( SwMultiTOXTabDialog, ShowPreviewHdl, CheckBox *, pBox )
SvtPathOptions aOpt;
// 6.0 (extension .sxw)
- BOOL bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
+ sal_Bool bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
#ifndef MAC_WITHOUT_EXT
if( !bExist )
@@ -674,7 +674,7 @@ long SwIndexTreeLB::GetTabPos( SvLBoxEntry* pEntry, SvLBoxTab* pTab)
long nData = (long)pEntry->GetUserData();
if(nData != USHRT_MAX)
{
- long nPos = pHeaderBar->GetItemRect( static_cast< USHORT >(101 + nData) ).TopLeft().X();
+ long nPos = pHeaderBar->GetItemRect( static_cast< sal_uInt16 >(101 + nData) ).TopLeft().X();
nData = nPos;
}
else
@@ -1022,7 +1022,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS
pIndexEntryWrapper = new IndexEntrySupplierWrapper();
aLanguageLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN,
- FALSE, FALSE, FALSE );
+ sal_False, sal_False, sal_False );
sAddStyleContent = aAddStylesCB.GetText();
@@ -1246,7 +1246,7 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
aFromObjectNamesRB.Check(rDesc.IsCreateFromObjectNames());
aFromCaptionsRB.Check(!rDesc.IsCreateFromObjectNames());
aCaptionSequenceLB.SelectEntry(rDesc.GetSequenceName());
- aDisplayTypeLB.SelectEntryPos( static_cast< USHORT >(rDesc.GetCaptionDisplay()) );
+ aDisplayTypeLB.SelectEntryPos( static_cast< sal_uInt16 >(rDesc.GetCaptionDisplay()) );
RadioButtonHdl(&aFromCaptionsRB);
}
@@ -1277,11 +1277,11 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
LanguageHdl(0);
for( long nCnt = 0; nCnt < aSortAlgorithmLB.GetEntryCount(); ++nCnt )
{
- const String* pEntryData = (const String*)aSortAlgorithmLB.GetEntryData( (USHORT)nCnt );
+ const String* pEntryData = (const String*)aSortAlgorithmLB.GetEntryData( (sal_uInt16)nCnt );
DBG_ASSERT(pEntryData, "no entry data available");
if( pEntryData && *pEntryData == rDesc.GetSortAlgorithm())
{
- aSortAlgorithmLB.SelectEntryPos( (USHORT)nCnt );
+ aSortAlgorithmLB.SelectEntryPos( (sal_uInt16)nCnt );
break;
}
}
@@ -1360,7 +1360,7 @@ void SwTOXSelectTabPage::FillTOXDescription()
nOLEData |= nData;
}
}
- rDesc.SetOLEOptions((USHORT)nOLEData);
+ rDesc.SetOLEOptions((sal_uInt16)nOLEData);
}
break;
case TOX_AUTHORITIES:
@@ -1385,7 +1385,7 @@ void SwTOXSelectTabPage::FillTOXDescription()
rDesc.SetContentOptions(nContentOptions);
rDesc.SetIndexOptions(nIndexOptions);
- rDesc.SetLevel( static_cast< BYTE >(aLevelNF.GetValue()) );
+ rDesc.SetLevel( static_cast< sal_uInt8 >(aLevelNF.GetValue()) );
rDesc.SetReadonly(aReadOnlyCB.IsChecked());
@@ -1655,16 +1655,16 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox)
if( 0 != (pUserData = aSortAlgorithmLB.GetEntryData( aSortAlgorithmLB.GetSelectEntryPos())) )
sOldString = *(String*)pUserData;
void* pDel;
- USHORT nEnd = aSortAlgorithmLB.GetEntryCount();
- for( USHORT n = 0; n < nEnd; ++n )
+ sal_uInt16 nEnd = aSortAlgorithmLB.GetEntryCount();
+ for( sal_uInt16 n = 0; n < nEnd; ++n )
if( 0 != ( pDel = aSortAlgorithmLB.GetEntryData( n )) )
delete (String*)pDel;
aSortAlgorithmLB.Clear();
- USHORT nInsPos;
+ sal_uInt16 nInsPos;
String sAlg, sUINm;
- nEnd = static_cast< USHORT >(aSeq.getLength());
- for( USHORT nCnt = 0; nCnt < nEnd; ++nCnt )
+ nEnd = static_cast< sal_uInt16 >(aSeq.getLength());
+ for( sal_uInt16 nCnt = 0; nCnt < nEnd; ++nCnt )
{
sUINm = pIndexRes->GetTranslation( sAlg = aSeq[ nCnt ] );
nInsPos = aSortAlgorithmLB.InsertEntry( sUINm );
@@ -2019,7 +2019,7 @@ void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt )
SvLBoxEntry* pEntry = GetEntry( aPos );
if( pEntry )
{
- USHORT nLevel = static_cast< USHORT >(GetModel()->GetAbsPos(pEntry));
+ sal_uInt16 nLevel = static_cast< sal_uInt16 >(GetModel()->GetAbsPos(pEntry));
String sEntry = pParent->GetLevelHelp(++nLevel);
if('*' == sEntry)
sEntry = GetEntryText(pEntry);
@@ -2178,7 +2178,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
aCommaSeparatedCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
aRelToStyleCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aTabPosMF, aMetric);
aSortDocPosRB.Check();
@@ -2208,7 +2208,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
aEntryOutlineLevelFT.GetPosPixel().X();
//fill the types in
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < AUTH_FIELD_END; i++)
{
String sTmp(SW_RES(STR_AUTH_FIELD_START + i));
@@ -2326,9 +2326,9 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
m_pCurrentForm = pTOXDlg->GetForm(aCurType);
if( !( aLastTOXType == aCurType ))
{
- BOOL bToxIsAuthorities = TOX_AUTHORITIES == aCurType.eType;
- BOOL bToxIsIndex = TOX_INDEX == aCurType.eType;
- BOOL bToxIsContent = TOX_CONTENT == aCurType.eType;
+ sal_Bool bToxIsAuthorities = TOX_AUTHORITIES == aCurType.eType;
+ sal_Bool bToxIsIndex = TOX_INDEX == aCurType.eType;
+ sal_Bool bToxIsContent = TOX_CONTENT == aCurType.eType;
aLevelLB.Clear();
for(sal_uInt16 i = 1; i < m_pCurrentForm->GetFormMax(); i++)
@@ -2636,7 +2636,7 @@ IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, PushButton*, pBtn)
String sText;
FormTokenType eTokenType = TOKEN_ENTRY_NO;
String sCharStyle;
- USHORT nChapterFormat = CF_NUMBER; // i89791
+ sal_uInt16 nChapterFormat = CF_NUMBER; // i89791
if(pBtn == &aEntryNoPB)
{
sText.AssignAscii(SwForm::aFormEntryNum);
@@ -2962,7 +2962,7 @@ IMPL_LINK(SwTOXEntryTabPage, ChapterInfoHdl, ListBox*, pBox)
IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, NumericField*, pField)
{
- const sal_uInt16 nLevel = static_cast<BYTE>(pField->GetValue());
+ const sal_uInt16 nLevel = static_cast<sal_uInt8>(pField->GetValue());
Control* pCtrl = aTokenWIN.GetActiveControl();
DBG_ASSERT(pCtrl, "no active control?");
@@ -3056,7 +3056,7 @@ IMPL_LINK(SwTOXEntryTabPage, AutoRightHdl, CheckBox*, pBox)
void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh)
{
SwDocShell* pDocSh = rSh.GetView().GetDocShell();
- ::FillCharStyleListBox(aCharStyleLB, pDocSh, TRUE, TRUE);
+ ::FillCharStyleListBox(aCharStyleLB, pDocSh, sal_True, sal_True);
const String sDefault(SW_RES(STR_POOLCOLL_STANDARD));
for(sal_uInt16 i = 0; i < aCharStyleLB.GetEntryCount(); i++)
{
@@ -3141,7 +3141,7 @@ SwTokenWindow::~SwTokenWindow()
pControl->SetLoseFocusHdl( Link() );
}
- for( ULONG i = aControlList.Count(); i; )
+ for( sal_uLong i = aControlList.Count(); i; )
{
Control* pControl = aControlList.Remove( --i );
delete pControl;
@@ -3157,7 +3157,7 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
if(pForm)
{
//apply current level settings to the form
- for( ULONG i = aControlList.Count(); i; )
+ for( sal_uLong i = aControlList.Count(); i; )
{
Control* pControl = aControlList.Remove( --i );
delete pControl;
@@ -3437,9 +3437,9 @@ void SwTokenWindow::InsertAtSelection(
Selection aSel = ((SwTOXEdit*)pActiveCtrl)->GetSelection();
aSel.Justify();
String sEditText = ((SwTOXEdit*)pActiveCtrl)->GetText();
- String sLeft = sEditText.Copy( 0, static_cast< USHORT >(aSel.A()) );
- String sRight = sEditText.Copy( static_cast< USHORT >(aSel.B()),
- static_cast< USHORT >(sEditText.Len() - aSel.B()));
+ String sLeft = sEditText.Copy( 0, static_cast< sal_uInt16 >(aSel.A()) );
+ String sRight = sEditText.Copy( static_cast< sal_uInt16 >(aSel.B()),
+ static_cast< sal_uInt16 >(sEditText.Len() - aSel.B()));
((SwTOXEdit*)pActiveCtrl)->SetText(sLeft);
((SwTOXEdit*)pActiveCtrl)->AdjustSize();
@@ -3646,7 +3646,7 @@ IMPL_LINK(SwTokenWindow, ScrollHdl, ImageButton*, pBtn )
else
{
//find the first completely visible control (left edge visible)
- for(ULONG i = aControlList.Count(); i; i-- )
+ for(sal_uLong i = aControlList.Count(); i; i-- )
{
Control* pCtrl = aControlList.GetObject(i - 1);
long nCtrlWidth = pCtrl->GetSizePixel().Width();
@@ -3732,11 +3732,11 @@ sal_Bool SwTokenWindow::Contains(FormTokenType eSearchFor) const
return bRet;
}
//---------------------------------------------------
-BOOL SwTokenWindow::CreateQuickHelp(Control* pCtrl,
+sal_Bool SwTokenWindow::CreateQuickHelp(Control* pCtrl,
const SwFormToken& rToken,
const HelpEvent& rHEvt)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
sal_Bool bBalloon = Help::IsBalloonHelpEnabled();
@@ -3775,7 +3775,7 @@ BOOL SwTokenWindow::CreateQuickHelp(Control* pCtrl,
else
Help::ShowQuickHelp( this, aItemRect, sEntry,
QUICKHELP_LEFT|QUICKHELP_VCENTER );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -4229,17 +4229,17 @@ SwEntryBrowseBox::SwEntryBrowseBox(Window* pParent, const ResId& rId,
sal_Bool SwEntryBrowseBox::SeekRow( long nRow )
{
nCurrentRow = nRow;
- return TRUE;
+ return sal_True;
}
/* -----------------------------19.01.00 15:32--------------------------------
---------------------------------------------------------------------------*/
-String SwEntryBrowseBox::GetCellText(long nRow, USHORT nColumn) const
+String SwEntryBrowseBox::GetCellText(long nRow, sal_uInt16 nColumn) const
{
const String* pRet = &aEmptyStr;
if(aEntryArr.Count() > nRow)
{
- AutoMarkEntry* pEntry = aEntryArr[ static_cast< USHORT >(nRow) ];
+ AutoMarkEntry* pEntry = aEntryArr[ static_cast< sal_uInt16 >(nRow) ];
switch(nColumn)
{
case ITEM_SEARCH :pRet = &pEntry->sSearch; break;
@@ -4277,7 +4277,7 @@ void SwEntryBrowseBox::PaintCell(OutputDevice& rDev,
sal_Bool SwEntryBrowseBox::SaveModified()
{
SetModified();
- USHORT nRow = static_cast< USHORT >(GetCurRow());
+ sal_uInt16 nRow = static_cast< sal_uInt16 >(GetCurRow());
sal_uInt16 nCol = GetCurColumnId();
String sNew;
@@ -4364,7 +4364,7 @@ void SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
if( !pToInsert )
pToInsert = new AutoMarkEntry;
- USHORT nSttPos = 0;
+ sal_uInt16 nSttPos = 0;
pToInsert->sSearch = sLine.GetToken(0, ';', nSttPos );
pToInsert->sAlternative = sLine.GetToken(0, ';', nSttPos );
pToInsert->sPrimKey = sLine.GetToken(0, ';', nSttPos );
@@ -4480,7 +4480,7 @@ SwAutoMarkDlg_Impl::SwAutoMarkDlg_Impl(Window* pParent, const String& rAutoMarkU
aEntriesBB.RowInserted(0, 1, sal_True);
else
{
- SfxMedium aMed( sAutoMarkURL, STREAM_STD_READ, FALSE );
+ SfxMedium aMed( sAutoMarkURL, STREAM_STD_READ, sal_False );
if( aMed.GetInStream() && !aMed.GetInStream()->GetError() )
aEntriesBB.ReadEntries( *aMed.GetInStream() );
else
@@ -4507,7 +4507,7 @@ IMPL_LINK(SwAutoMarkDlg_Impl, OkHdl, OKButton*, EMPTYARG)
SfxMedium aMed( sAutoMarkURL,
bCreateMode ? STREAM_WRITE
: STREAM_WRITE| STREAM_TRUNC,
- FALSE );
+ sal_False );
SvStream* pStrm = aMed.GetOutStream();
pStrm->SetStreamCharSet( RTL_TEXTENCODING_MS_1253 );
if( !pStrm->GetError() )
diff --git a/sw/source/ui/index/multmrk.cxx b/sw/source/ui/index/multmrk.cxx
index c17f4b683906..0433f83a2a18 100644
--- a/sw/source/ui/index/multmrk.cxx
+++ b/sw/source/ui/index/multmrk.cxx
@@ -59,8 +59,8 @@ SwMultiTOXMarkDlg::SwMultiTOXMarkDlg( Window* pParent, SwTOXMgr& rTOXMgr ) :
{
aTOXLB.SetSelectHdl(LINK(this, SwMultiTOXMarkDlg, SelectHdl));
- USHORT nSize = rMgr.GetTOXMarkCount();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = rMgr.GetTOXMarkCount();
+ for(sal_uInt16 i=0; i < nSize; ++i)
aTOXLB.InsertEntry(rMgr.GetTOXMark(i)->GetText());
aTOXLB.SelectEntryPos(0);
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 54d1fab4cc0c..92b3f649ae9a 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -158,11 +158,11 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent,
bNewMark(bNewDlg),
bSelected(sal_False),
- bPhoneticED0_ChangedByUser(FALSE),
- bPhoneticED1_ChangedByUser(FALSE),
- bPhoneticED2_ChangedByUser(FALSE),
+ bPhoneticED0_ChangedByUser(sal_False),
+ bPhoneticED1_ChangedByUser(sal_False),
+ bPhoneticED2_ChangedByUser(sal_False),
nLangForPhoneticReading(2052),
- bIsPhoneticReadingEnabled(FALSE),
+ bIsPhoneticReadingEnabled(sal_False),
xExtendedIndexEntrySupplier(NULL),
pTOXMgr(0),
pSh(&rWrtShell)
@@ -373,10 +373,10 @@ void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading()
//no phonetic reading if no global cjk support
if( !xExtendedIndexEntrySupplier.is() )
{
- bIsPhoneticReadingEnabled = FALSE;
+ bIsPhoneticReadingEnabled = sal_False;
return;
}
- bIsPhoneticReadingEnabled = TRUE;
+ bIsPhoneticReadingEnabled = sal_True;
//get the current language
if(!bNewMark) //if dialog is opened to iterate existing marks
@@ -401,8 +401,8 @@ void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading()
}
else //if dialog is opened to create a new mark
{
- USHORT nScriptType = pSh->GetScriptType();
- USHORT nWhich;
+ sal_uInt16 nScriptType = pSh->GetScriptType();
+ sal_uInt16 nWhich;
switch(nScriptType)
{
case SCRIPTTYPE_ASIAN: nWhich = RES_CHRATR_CJK_LANGUAGE; break;
@@ -517,7 +517,7 @@ void SwIndexMarkDlg::InsertUpdate()
/*--------------------------------------------------------------------
Beschreibung: Marke einfuegen
--------------------------------------------------------------------*/
-static void lcl_SelectSameStrings(SwWrtShell& rSh, BOOL bWordOnly, BOOL bCaseSensitive)
+static void lcl_SelectSameStrings(SwWrtShell& rSh, sal_Bool bWordOnly, sal_Bool bCaseSensitive)
{
rSh.Push();
@@ -532,12 +532,12 @@ static void lcl_SelectSameStrings(SwWrtShell& rSh, BOOL bWordOnly, BOOL bCaseSen
: TransliterationModules_IGNORE_CASE) );
rSh.ClearMark();
- BOOL bCancel;
+ sal_Bool bCancel;
//todo/mba: assuming that notes should not be searched
- BOOL bSearchInNotes = FALSE;
+ sal_Bool bSearchInNotes = sal_False;
rSh.Find( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END, bCancel,
- (FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY), FALSE );
+ (FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY), sal_False );
}
@@ -574,9 +574,9 @@ void SwIndexMarkDlg::InsertMark()
}
if (aOrgStr != aEntryED.GetText())
aDesc.SetAltStr(aEntryED.GetText());
- BOOL bApplyAll = aApplyToAllCB.IsChecked();
- BOOL bWordOnly = aSearchCaseWordOnlyCB.IsChecked();
- BOOL bCaseSensitive = aSearchCaseSensitiveCB.IsChecked();
+ sal_Bool bApplyAll = aApplyToAllCB.IsChecked();
+ sal_Bool bWordOnly = aSearchCaseWordOnlyCB.IsChecked();
+ sal_Bool bCaseSensitive = aSearchCaseSensitiveCB.IsChecked();
pSh->StartAllAction();
// hier muessen alle gleichen Strings selektiert werden
@@ -589,7 +589,7 @@ void SwIndexMarkDlg::InsertMark()
SwTOXMgr aMgr(pSh);
aMgr.InsertTOXMark(aDesc);
if(bApplyAll)
- pSh->Pop(FALSE);
+ pSh->Pop(sal_False);
pSh->EndAllAction();
}
@@ -818,11 +818,11 @@ IMPL_LINK( SwIndexMarkDlg, ModifyHdl, ListBox *, pBox )
}
else //aEntryED !!aEntryED is not a ListBox but a Edit
{
- BOOL bHasText = (aEntryED.GetText().Len()>0);
+ sal_Bool bHasText = (aEntryED.GetText().Len()>0);
if(!bHasText)
{
aPhoneticED0.SetText(aEmptyStr);
- bPhoneticED0_ChangedByUser = FALSE;
+ bPhoneticED0_ChangedByUser = sal_False;
}
else if(!bPhoneticED0_ChangedByUser)
aPhoneticED0.SetText(GetDefaultPhoneticReading(aEntryED.GetText()));
@@ -1038,15 +1038,15 @@ IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox )
aKey2DCB.SetText(aEmptyStr);
aPhoneticED1.SetText(aEmptyStr);
aPhoneticED2.SetText(aEmptyStr);
- bPhoneticED1_ChangedByUser = FALSE;
- bPhoneticED2_ChangedByUser = FALSE;
+ bPhoneticED1_ChangedByUser = sal_False;
+ bPhoneticED2_ChangedByUser = sal_False;
}
else
{
if(pBox->IsInDropDown())
{
//reset bPhoneticED1_ChangedByUser if a completly new string is selected
- bPhoneticED1_ChangedByUser = FALSE;
+ bPhoneticED1_ChangedByUser = sal_False;
}
if(!bPhoneticED1_ChangedByUser)
aPhoneticED1.SetText(GetDefaultPhoneticReading(pBox->GetText()));
@@ -1059,14 +1059,14 @@ IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox )
if(!(pBox->GetText().Len()>0))
{
aPhoneticED2.SetText(aEmptyStr);
- bPhoneticED2_ChangedByUser = FALSE;
+ bPhoneticED2_ChangedByUser = sal_False;
}
else
{
if(pBox->IsInDropDown())
{
//reset bPhoneticED1_ChangedByUser if a completly new string is selected
- bPhoneticED2_ChangedByUser = FALSE;
+ bPhoneticED2_ChangedByUser = sal_False;
}
if(!bPhoneticED2_ChangedByUser)
aPhoneticED2.SetText(GetDefaultPhoneticReading(pBox->GetText()));
@@ -1103,7 +1103,7 @@ void SwIndexMarkDlg::ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark)
pTOXMgr = new SwTOXMgr(pSh);
if(pCurTOXMark)
{
- for(USHORT i = 0; i < pTOXMgr->GetTOXMarkCount(); i++)
+ for(sal_uInt16 i = 0; i < pTOXMgr->GetTOXMarkCount(); i++)
if(pTOXMgr->GetTOXMark(i) == pCurTOXMark)
{
pTOXMgr->SetCurTOXMark(i);
diff --git a/sw/source/ui/index/toxmgr.cxx b/sw/source/ui/index/toxmgr.cxx
index 8564000d26ac..dd22ad00e540 100644
--- a/sw/source/ui/index/toxmgr.cxx
+++ b/sw/source/ui/index/toxmgr.cxx
@@ -56,13 +56,13 @@ SwTOXMgr::SwTOXMgr(SwWrtShell* pShell):
--------------------------------------------------------------------*/
-USHORT SwTOXMgr::GetTOXMarks()
+sal_uInt16 SwTOXMgr::GetTOXMarks()
{
return pSh->GetCurTOXMarks(aCurMarks);
}
-SwTOXMark* SwTOXMgr::GetTOXMark(USHORT nId)
+SwTOXMark* SwTOXMgr::GetTOXMark(sal_uInt16 nId)
{
if(aCurMarks.Count() > 0)
return aCurMarks[nId];
@@ -98,7 +98,7 @@ void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc)
ASSERT(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL,
ungueltiger Level InsertTOCMark);
pMark = new SwTOXMark(pSh->GetTOXType(TOX_CONTENT, 0));
- pMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) );
+ pMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) );
if(rDesc.GetAltStr())
pMark->SetAlternativeText(*rDesc.GetAltStr());
@@ -132,10 +132,10 @@ void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc)
{
ASSERT(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL,
ungueltiger Level InsertTOCMark);
- USHORT nId = rDesc.GetTOUName() ?
+ sal_uInt16 nId = rDesc.GetTOUName() ?
GetUserTypeID(*rDesc.GetTOUName()) : 0;
pMark = new SwTOXMark(pSh->GetTOXType(TOX_USER, nId));
- pMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) );
+ pMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) );
if(rDesc.GetAltStr())
pMark->SetAlternativeText(*rDesc.GetAltStr());
@@ -195,13 +195,13 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc)
pCurTOXMark->SetMainEntry(rDesc.IsMainEntry());
}
else
- pCurTOXMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) );
+ pCurTOXMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) );
if(rDesc.GetAltStr())
{
// JP 26.08.96: Bug 30344 - entweder der Text aus dem Doc oder
// ein Alternativ-Text, beides gibts nicht!
- BOOL bReplace = pCurTOXMark->IsAlternativeText();
+ sal_Bool bReplace = pCurTOXMark->IsAlternativeText();
if( bReplace )
pCurTOXMark->SetAlternativeText( *rDesc.GetAltStr() );
else
@@ -219,7 +219,7 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc)
// Bug 36207 pCurTOXMark zeigt hier in den Wald!
if(!pCurTOXMark)
{
- pSh->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pSh->Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
pSh->GetCurTOXMarks(aCurMarks);
SetCurTOXMark(0);
}
@@ -231,10 +231,10 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc)
--------------------------------------------------------------------*/
-USHORT SwTOXMgr::GetUserTypeID(const String& rStr)
+sal_uInt16 SwTOXMgr::GetUserTypeID(const String& rStr)
{
- USHORT nSize = pSh->GetTOXTypeCount(TOX_USER);
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = pSh->GetTOXTypeCount(TOX_USER);
+ for(sal_uInt16 i=0; i < nSize; ++i)
{
const SwTOXType* pTmp = pSh->GetTOXType(TOX_USER, i);
if(pTmp && pTmp->GetTypeName() == rStr)
@@ -250,7 +250,7 @@ USHORT SwTOXMgr::GetUserTypeID(const String& rStr)
--------------------------------------------------------------------*/
-void SwTOXMgr::NextTOXMark(BOOL bSame)
+void SwTOXMgr::NextTOXMark(sal_Bool bSame)
{
ASSERT(pCurTOXMark, "kein aktuelles TOXMark");
if( pCurTOXMark )
@@ -261,7 +261,7 @@ void SwTOXMgr::NextTOXMark(BOOL bSame)
}
-void SwTOXMgr::PrevTOXMark(BOOL bSame)
+void SwTOXMgr::PrevTOXMark(sal_Bool bSame)
{
ASSERT(pCurTOXMark, "kein aktuelles TOXMark");
if( pCurTOXMark )
@@ -279,12 +279,12 @@ const SwTOXBase* SwTOXMgr::GetCurTOX()
return pSh->GetCurTOX();
}
-const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp, USHORT nId) const
+const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const
{
return pSh->GetTOXType(eTyp, nId);
}
-void SwTOXMgr::SetCurTOXMark(USHORT nId)
+void SwTOXMgr::SetCurTOXMark(sal_uInt16 nId)
{
pCurTOXMark = (nId < aCurMarks.Count()) ? aCurMarks[nId] : 0;
}
@@ -293,12 +293,12 @@ void SwTOXMgr::SetCurTOXMark(USHORT nId)
--------------------------------------------------*/
-BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
+sal_Bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
SwTOXBase** ppBase,
const SfxItemSet* pSet)
{
- SwWait aWait( *pSh->GetView().GetDocShell(), TRUE );
- BOOL bRet = TRUE;
+ SwWait aWait( *pSh->GetView().GetDocShell(), sal_True );
+ sal_Bool bRet = sal_True;
const SwTOXBase* pCurTOX = ppBase && *ppBase ? *ppBase : GetCurTOX();
SwTOXBase* pTOX = (SwTOXBase*)pCurTOX;
@@ -343,9 +343,9 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
{
if(!pCurTOX || (ppBase && !(*ppBase)))
{
- USHORT nPos = 0;
- USHORT nSize = pSh->GetTOXTypeCount(eCurTOXType);
- for(USHORT i=0; rDesc.GetTOUName() && i < nSize; ++i)
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nSize = pSh->GetTOXTypeCount(eCurTOXType);
+ for(sal_uInt16 i=0; rDesc.GetTOUName() && i < nSize; ++i)
{ const SwTOXType* pType = pSh->GetTOXType(TOX_USER, i);
if(pType->GetTypeName() == *rDesc.GetTOUName())
{ nPos = i;
@@ -417,14 +417,14 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
DBG_ASSERT(pNewTOX, "no TOXBase created!" );
if(!pNewTOX)
- return FALSE;
+ return sal_False;
pNewTOX->SetFromChapter(rDesc.IsFromChapter());
pNewTOX->SetSequenceName(rDesc.GetSequenceName());
pNewTOX->SetCaptionDisplay(rDesc.GetCaptionDisplay());
pNewTOX->SetProtected(rDesc.IsReadonly());
- for(USHORT nLevel = 0; nLevel < MAXLEVEL; nLevel++)
+ for(sal_uInt16 nLevel = 0; nLevel < MAXLEVEL; nLevel++)
pNewTOX->SetStyleNames(rDesc.GetStyleNames(nLevel), nLevel);
if(rDesc.GetTitle())
@@ -482,7 +482,7 @@ void SwTOXDescription::SetSortKeys(SwTOXSortKey eKey1,
SwTOXSortKey eKey3)
{
SwTOXSortKey aArr[3];
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if(AUTH_FIELD_END > eKey1.eField)
aArr[nPos++] = eKey1;
if(AUTH_FIELD_END > eKey2.eField)
@@ -500,7 +500,7 @@ void SwTOXDescription::SetSortKeys(SwTOXSortKey eKey1,
--------------------------------------------------*/
void SwTOXDescription::ApplyTo(SwTOXBase& rTOXBase)
{
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
rTOXBase.SetStyleNames(GetStyleNames(i), i);
rTOXBase.SetTitle(GetTitle() ? *GetTitle() : aEmptyStr);
rTOXBase.SetCreate(GetContentOptions());
diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index da07c73f6c8e..98280db3f63e 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -230,10 +230,10 @@ void SwHHCWrapper::SelectNewUnit_impl( sal_Int32 nUnitStart, sal_Int32 nUnitEnd
pCrsr->DeleteMark();
rWrtShell.Right( CRSR_SKIP_CHARS, /*bExpand*/ sal_False,
- (USHORT) (nUnitOffset + nUnitStart), sal_True );
+ (sal_uInt16) (nUnitOffset + nUnitStart), sal_True );
pCrsr->SetMark();
rWrtShell.Right( CRSR_SKIP_CHARS, /*bExpand*/ sal_True,
- (USHORT) (nUnitEnd - nUnitStart), sal_True );
+ (sal_uInt16) (nUnitEnd - nUnitStart), sal_True );
// end selection now. Otherwise SHIFT+HOME (extending the selection)
// won't work when the dialog is closed without any replacement.
// (see #116346#)
@@ -504,14 +504,14 @@ void SwHHCWrapper::ReplaceUnit(
// of the flag.
rWrtShell.EndSelect();
- rWrtShell.Left( 0, TRUE, aNewOrigText.Len(), TRUE, TRUE );
+ rWrtShell.Left( 0, sal_True, aNewOrigText.Len(), sal_True, sal_True );
}
pRuby->SetPosition( bRubyBelow );
pRuby->SetAdjustment( RubyAdjust_CENTER );
//!! the following seem not to be needed
//pRuby->SetCharFmtName( const String& rNm );
- //pRuby->SetCharFmtId( USHORT nNew );
+ //pRuby->SetCharFmtId( sal_uInt16 nNew );
#ifdef DEBUG
SwPaM *pPaM = rWrtShell.GetCrsr();
(void)pPaM;
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index e9bb702b3d66..88c0b16ab668 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -110,7 +110,7 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
-extern void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const SfxItemSet *pArgs, SfxRequest *pReq );
+extern void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq );
/*--------------------------------------------------------------------------
@@ -178,10 +178,10 @@ LanguageType lcl_CheckLanguage(
lang::Locale a3( SvxCreateLocale( aLangList[3] ) );
#endif
- INT32 nCount = sizeof(aLangList) / sizeof(aLangList[0]);
- for (INT32 i = 0; i < nCount; i++)
+ sal_Int32 nCount = sizeof(aLangList) / sizeof(aLangList[0]);
+ for (sal_Int32 i = 0; i < nCount; i++)
{
- INT16 nTmpLang = aLangList[i];
+ sal_Int16 nTmpLang = aLangList[i];
if (nTmpLang != LANGUAGE_NONE && nTmpLang != LANGUAGE_DONTKNOW)
{
if (xSpell->hasLanguage( nTmpLang ) &&
@@ -215,7 +215,7 @@ inline bool lcl_checkScriptType( sal_Int16 nScriptType, LanguageType nLang )
void SwSpellPopup::fillLangPopupMenu(
PopupMenu *pPopupMenu,
- USHORT nLangItemIdStart,
+ sal_uInt16 nLangItemIdStart,
uno::Sequence< OUString > aSeq,
SwWrtShell* pWrtSh,
std::map< sal_Int16, ::rtl::OUString > &rLangTable )
@@ -229,7 +229,7 @@ void SwSpellPopup::fillLangPopupMenu(
std::set< OUString > aLangItems;
OUString aCurLang( aSeq[0] );
- USHORT nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32());
+ sal_uInt16 nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32());
OUString aKeyboardLang( aSeq[2] );
OUString aGuessedTextLang( aSeq[3] );
@@ -285,7 +285,7 @@ void SwSpellPopup::fillLangPopupMenu(
uno::Sequence< lang::Locale > rLocales( xDocumentLanguages->getDocumentLanguages( nScriptType, nMaxCount ) );
if (rLocales.getLength() > 0)
{
- for (USHORT i = 0; i < rLocales.getLength(); ++i)
+ for (sal_uInt16 i = 0; i < rLocales.getLength(); ++i)
{
if (aLangItems.size() == (size_t)nMaxCount)
break;
@@ -297,7 +297,7 @@ void SwSpellPopup::fillLangPopupMenu(
}
- USHORT nItemId = nLangItemIdStart;
+ sal_uInt16 nItemId = nLangItemIdStart;
const OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); // multiple languages in current selection
const OUString sEmpty; // 'no language found' from language guessing
std::set< OUString >::const_iterator it;
@@ -314,7 +314,7 @@ void SwSpellPopup::fillLangPopupMenu(
if (aEntryTxt == aCurLang)
{
//make a check mark for the current language
- pPopupMenu->CheckItem( nItemId, TRUE );
+ pPopupMenu->CheckItem( nItemId, sal_True );
}
rLangTable[ nItemId ] = aEntryTxt;
++nItemId;
@@ -428,9 +428,9 @@ bGrammarResults(false)
InsertSeparator(0);
bEnable = sal_True;
- USHORT nAutoCorrItemId = MN_AUTOCORR_START;
- USHORT nItemId = MN_SUGGESTION_START;
- for (USHORT i = 0; i < nStringCount; ++i)
+ sal_uInt16 nAutoCorrItemId = MN_AUTOCORR_START;
+ sal_uInt16 nItemId = MN_SUGGESTION_START;
+ for (sal_uInt16 i = 0; i < nStringCount; ++i)
{
const String aEntry = aSuggestions[ i ];
InsertItem( nItemId, aEntry, 0, i );
@@ -449,7 +449,7 @@ bGrammarResults(false)
OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) );
OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") );
SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar );
- USHORT nItemPos = GetItemPos( MN_IGNORE_WORD );
+ sal_uInt16 nItemPos = GetItemPos( MN_IGNORE_WORD );
InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos );
SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION);
@@ -475,7 +475,7 @@ bGrammarResults(false)
pMenu = GetPopupMenu(MN_ADD_TO_DIC);
// pMenu->CreateAutoMnemonics();
pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); //! necessary to retrieve the correct dictionary name in 'Execute' below
- bEnable = FALSE; // enable MN_ADD_TO_DIC?
+ bEnable = sal_False; // enable MN_ADD_TO_DIC?
uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
if (xDicList.is())
{
@@ -488,10 +488,10 @@ bGrammarResults(false)
aDics = xDicList->getDictionaries();
const uno::Reference< linguistic2::XDictionary > *pDic = aDics.getConstArray();
- USHORT nDicCount = static_cast< USHORT >(aDics.getLength());
+ sal_uInt16 nDicCount = static_cast< sal_uInt16 >(aDics.getLength());
- USHORT nItemId = MN_DICTIONARIES_START;
- for( USHORT i = 0; i < nDicCount; i++ )
+ sal_uInt16 nItemId = MN_DICTIONARIES_START;
+ for( sal_uInt16 i = 0; i < nDicCount; i++ )
{
uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY );
if (!xDicTmp.is() || SvxGetIgnoreAllList() == xDicTmp)
@@ -574,7 +574,7 @@ bGrammarResults(false)
//////////////////////////////////////////////////////////////////////////////////
- RemoveDisabledEntries( TRUE, TRUE );
+ RemoveDisabledEntries( sal_True, sal_True );
}
/*--------------------------------------------------------------------------
@@ -595,7 +595,7 @@ aInfo16( SW_RES(IMG_INFO_16) )
{
nCheckedLanguage = SvxLocaleToLanguage( rResult.aLocale );
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
OUString aMessageText( rResult.aErrors[ nErrorInResult ].aShortComment );
InsertSeparator( nPos++ );
InsertItem( MN_SHORT_COMMENT, aMessageText, MIB_NOSELECT, nPos++ );
@@ -617,7 +617,7 @@ aInfo16( SW_RES(IMG_INFO_16) )
aImage = Image( lcl_GetImageFromPngUrl( aSuggestionImageUrl ) );
}
- USHORT nItemId = MN_SUGGESTION_START;
+ sal_uInt16 nItemId = MN_SUGGESTION_START;
for (sal_uInt16 i = 0; i < nStringCount; ++i)
{
const String aEntry = aSuggestions[ i ];
@@ -634,7 +634,7 @@ aInfo16( SW_RES(IMG_INFO_16) )
OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) );
OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") );
SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar );
- USHORT nItemPos = GetItemPos( MN_IGNORE_WORD );
+ sal_uInt16 nItemPos = GetItemPos( MN_IGNORE_WORD );
InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos );
SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION);
@@ -707,7 +707,7 @@ aInfo16( SW_RES(IMG_INFO_16) )
//////////////////////////////////////////////////////////////////////////////////
- RemoveDisabledEntries( TRUE, TRUE );
+ RemoveDisabledEntries( sal_True, sal_True );
}
/*--------------------------------------------------------------------------
@@ -723,7 +723,7 @@ sal_uInt16 SwSpellPopup::Execute( const Rectangle& rWordPos, Window* pWin )
/*-- 19.01.2006 08:15:48---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwSpellPopup::Execute( USHORT nId )
+void SwSpellPopup::Execute( sal_uInt16 nId )
{
if (nId == USHRT_MAX)
return;
@@ -800,7 +800,7 @@ void SwSpellPopup::Execute( USHORT nId )
{
SvtLinguConfig().SetProperty( A2OU( UPN_IS_GRAMMAR_INTERACTIVE ), uno::makeAny( sal_True ));
}
- pSh->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pSh->Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
{
uno::Reference<linguistic2::XDictionaryList> xDictionaryList( SvxGetDictionaryList() );
SvxDicListChgClamp aClamp( xDictionaryList );
@@ -834,7 +834,7 @@ void SwSpellPopup::Execute( USHORT nId )
if (xDic.is())
{
- INT16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, FALSE, aEmptyStr, LANGUAGE_NONE );
+ sal_Int16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, sal_False, aEmptyStr, LANGUAGE_NONE );
// save modified user-dictionary if it is persistent
uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY );
if (xSavDic.is())
@@ -888,7 +888,7 @@ void SwSpellPopup::Execute( USHORT nId )
pSh->Push(); // save cursor
SwLangHelper::SelectCurrentPara( *pSh );
SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet );
- pSh->Pop( FALSE ); // restore cursor
+ pSh->Pop( sal_False ); // restore cursor
}
else if (nId == MN_SET_PARA_NONE)
{
@@ -896,7 +896,7 @@ void SwSpellPopup::Execute( USHORT nId )
pSh->Push(); // save cursor
SwLangHelper::SelectCurrentPara( *pSh );
SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet );
- pSh->Pop( FALSE ); // restore cursor
+ pSh->Pop( sal_False ); // restore cursor
}
else if (nId == MN_SET_PARA_RESET)
{
@@ -904,7 +904,7 @@ void SwSpellPopup::Execute( USHORT nId )
pSh->Push(); // save cursor
SwLangHelper::SelectCurrentPara( *pSh );
SwLangHelper::ResetLanguages( *pSh, true );
- pSh->Pop( FALSE ); // restore cursor
+ pSh->Pop( sal_False ); // restore cursor
}
else if (nId == MN_SET_PARA_MORE)
{
@@ -912,7 +912,7 @@ void SwSpellPopup::Execute( USHORT nId )
SwLangHelper::SelectCurrentPara( *pSh );
//Open Format/Character Dialog
lcl_CharDialog( *pSh, true, nId, 0, 0 );
- pSh->Pop( FALSE ); // restore cursor
+ pSh->Pop( sal_False ); // restore cursor
}
#if 0
else if (nId == MN_SET_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries - 1)
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index feae6a64398a..77ce091d454b 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -53,17 +53,17 @@ const String BookmarkCombo::aForbiddenChars = String::CreateFromAscii("/\\@:*?\"
IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox )
{
- BOOL bSelEntries = pBox->GetSelectEntryCount() != 0;
+ sal_Bool bSelEntries = pBox->GetSelectEntryCount() != 0;
// if a string has been pasted from the clipboard then
// there may be illegal characters in the box
if(!bSelEntries)
{
String sTmp = pBox->GetText();
- USHORT nLen = sTmp.Len();
+ sal_uInt16 nLen = sTmp.Len();
String sMsg;
- for(USHORT i = 0; i < BookmarkCombo::aForbiddenChars.Len(); i++)
+ for(sal_uInt16 i = 0; i < BookmarkCombo::aForbiddenChars.Len(); i++)
{
- USHORT nTmpLen = sTmp.Len();
+ sal_uInt16 nTmpLen = sTmp.Len();
sTmp.EraseAllChars(BookmarkCombo::aForbiddenChars.GetChar(i));
if(sTmp.Len() != nTmpLen)
sMsg += BookmarkCombo::aForbiddenChars.GetChar(i);
@@ -93,11 +93,11 @@ IMPL_LINK( SwInsertBookmarkDlg, DeleteHdl, Button *, EMPTYARG )
{
// Textmarken aus der ComboBox entfernen
- for (USHORT i = aBookmarkBox.GetSelectEntryCount(); i; i-- )
+ for (sal_uInt16 i = aBookmarkBox.GetSelectEntryCount(); i; i-- )
aBookmarkBox.RemoveEntry(aBookmarkBox.GetSelectEntryPos(i - 1));
aBookmarkBox.SetText(aEmptyStr);
- aDeleteBtn.Enable(FALSE); // keine weiteren Eintraege vorhanden
+ aDeleteBtn.Enable(sal_False); // keine weiteren Eintraege vorhanden
// aBookmarkBox.SetText(aEmptyStr);
aOkBtn.Enable(); // Im OK Handler wird geloescht
@@ -115,7 +115,7 @@ void SwInsertBookmarkDlg::Apply()
{
//at first remove deleted bookmarks to prevent multiple bookmarks with the same
//name
- for (USHORT nCount = aBookmarkBox.GetRemovedCount(); nCount > 0; nCount--)
+ for (sal_uInt16 nCount = aBookmarkBox.GetRemovedCount(); nCount > 0; nCount--)
{
String sRemoved = aBookmarkBox.GetRemovedEntry( nCount -1 ).GetName();
IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
@@ -126,7 +126,7 @@ void SwInsertBookmarkDlg::Apply()
}
// Textmarke einfuegen
- USHORT nLen = aBookmarkBox.GetText().Len();
+ sal_uInt16 nLen = aBookmarkBox.GetText().Len();
SwBoxEntry aTmpEntry(aBookmarkBox.GetText(), 0 );
if ( nLen && (aBookmarkBox.GetEntryPos(aTmpEntry) == COMBOBOX_ENTRY_NOTFOUND) )
@@ -162,14 +162,14 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rS, SfxRe
rReq( rRequest )
{
aBookmarkBox.SetModifyHdl(LINK(this, SwInsertBookmarkDlg, ModifyHdl));
- aBookmarkBox.EnableMultiSelection(TRUE);
- aBookmarkBox.EnableAutocomplete( TRUE, TRUE );
+ aBookmarkBox.EnableMultiSelection(sal_True);
+ aBookmarkBox.EnableAutocomplete( sal_True, sal_True );
aDeleteBtn.SetClickHdl(LINK(this, SwInsertBookmarkDlg, DeleteHdl));
// Combobox mit vorhandenen Bookmarks fuellen
IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
for( IDocumentMarkAccess::const_iterator_t ppBookmark = pMarkAccess->getBookmarksBegin();
ppBookmark != pMarkAccess->getBookmarksEnd();
ppBookmark++)
@@ -202,7 +202,7 @@ BookmarkCombo::BookmarkCombo( Window* pWin, const ResId& rResId ) :
Beschreibung:
-----------------------------------------------------------------------*/
-USHORT BookmarkCombo::GetFirstSelEntryPos() const
+sal_uInt16 BookmarkCombo::GetFirstSelEntryPos() const
{
return GetSelEntryPos(0);
}
@@ -211,7 +211,7 @@ USHORT BookmarkCombo::GetFirstSelEntryPos() const
Beschreibung:
-----------------------------------------------------------------------*/
-USHORT BookmarkCombo::GetNextSelEntryPos(USHORT nPos) const
+sal_uInt16 BookmarkCombo::GetNextSelEntryPos(sal_uInt16 nPos) const
{
return GetSelEntryPos(nPos + 1);
}
@@ -220,11 +220,11 @@ USHORT BookmarkCombo::GetNextSelEntryPos(USHORT nPos) const
Beschreibung:
-----------------------------------------------------------------------*/
-USHORT BookmarkCombo::GetSelEntryPos(USHORT nPos) const
+sal_uInt16 BookmarkCombo::GetSelEntryPos(sal_uInt16 nPos) const
{
sal_Unicode cSep = GetMultiSelectionSeparator();
- USHORT nCnt = GetText().GetTokenCount(cSep);
+ sal_uInt16 nCnt = GetText().GetTokenCount(cSep);
for (; nPos < nCnt; nPos++)
{
@@ -242,11 +242,11 @@ USHORT BookmarkCombo::GetSelEntryPos(USHORT nPos) const
Beschreibung:
-----------------------------------------------------------------------*/
-USHORT BookmarkCombo::GetSelectEntryCount() const
+sal_uInt16 BookmarkCombo::GetSelectEntryCount() const
{
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
- USHORT nPos = GetFirstSelEntryPos();
+ sal_uInt16 nPos = GetFirstSelEntryPos();
while (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
nPos = GetNextSelEntryPos(nPos);
@@ -260,10 +260,10 @@ USHORT BookmarkCombo::GetSelectEntryCount() const
Beschreibung: Position in der Listbox (der ComboBox)
-----------------------------------------------------------------------*/
-USHORT BookmarkCombo::GetSelectEntryPos( USHORT nSelIndex ) const
+sal_uInt16 BookmarkCombo::GetSelectEntryPos( sal_uInt16 nSelIndex ) const
{
- USHORT nCnt = 0;
- USHORT nPos = GetFirstSelEntryPos();
+ sal_uInt16 nCnt = 0;
+ sal_uInt16 nPos = GetFirstSelEntryPos();
while (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 67fc32bcf1c9..9e2b1caa3894 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -81,7 +81,7 @@ SwFootNoteOptionDlg::SwFootNoteOptionDlg( Window *pParent, SwWrtShell &rS ) :
AddTabPage( TP_ENDNOTEOPTION, SwEndNoteOptionPage::Create, 0 );
}
-void SwFootNoteOptionDlg::PageCreated( USHORT /*nId*/, SfxTabPage &rPage )
+void SwFootNoteOptionDlg::PageCreated( sal_uInt16 /*nId*/, SfxTabPage &rPage )
{
((SwEndNoteOptionPage&)rPage).SetShell( rSh );
}
@@ -107,7 +107,7 @@ IMPL_LINK( SwFootNoteOptionDlg, OkHdl, Button *, pBtn )
//----------------------------------------------------------------------
-SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN,
+SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, sal_Bool bEN,
const SfxItemSet &rSet ) :
SfxTabPage( pParent, SW_RES(bEN ? TP_ENDNOTEOPTION : TP_FOOTNOTEOPTION), rSet ),
aNumTypeFT (this, SW_RES( FT_NUMTYPE )),
@@ -147,7 +147,7 @@ SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN,
aNumPage(aNumCountBox.GetEntry(FTNNUM_PAGE)),
aNumChapter(aNumCountBox.GetEntry(FTNNUM_CHAPTER)),
pSh( 0 ),
- bPosDoc(FALSE),
+ bPosDoc(sal_False),
bEndNote( bEN )
{
FreeResource();
@@ -163,7 +163,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
SwEndNoteInfo *pInf = bEndNote ? new SwEndNoteInfo( pSh->GetEndNoteInfo() )
: new SwFtnInfo( pSh->GetFtnInfo() );
SfxObjectShell * pDocSh = SfxObjectShell::Current();
- USHORT i;
+ sal_uInt16 i;
if(PTR_CAST(SwWebDocShell, pDocSh))
{
@@ -188,7 +188,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
aContFromLbl.Hide();
aContFromEdit.Hide();
aContFL.Hide();
- bPosDoc = TRUE;
+ bPosDoc = sal_True;
}
else
{
@@ -197,15 +197,15 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
if ( rInf.ePos == FTNPOS_PAGE )
{
aPosPageBox.Check();
- aPageTemplLbl.Enable(FALSE);
- aPageTemplBox.Enable(FALSE);
+ aPageTemplLbl.Enable(sal_False);
+ aPageTemplBox.Enable(sal_False);
}
else // if ( rInf.ePos == FTNPOS_CHAPTER )
{
aPosChapterBox.Check();
aNumCountBox.RemoveEntry(aNumPage);
aNumCountBox.RemoveEntry(aNumChapter);
- bPosDoc = TRUE;
+ bPosDoc = sal_True;
}
// Verweistexte
aContEdit.SetText(rInf.aQuoVadis);
@@ -254,7 +254,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
else
{
ASSERT(!pColl->IsDefault(), "Defaultvorlage fuer Fussnoten ist falsch.");
- const USHORT nPos = aParaTemplBox.GetEntryPos(pColl->GetName());
+ const sal_uInt16 nPos = aParaTemplBox.GetEntryPos(pColl->GetName());
if( LISTBOX_ENTRY_NOTFOUND != nPos )
aParaTemplBox.SelectEntryPos( nPos );
else
@@ -268,7 +268,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
for( i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i )
aPageTemplBox.InsertEntry(SwStyleNameMapper::GetUIName( i, aEmptyStr ));
- USHORT nCount = pSh->GetPageDescCnt();
+ sal_uInt16 nCount = pSh->GetPageDescCnt();
for(i = 0; i < nCount; ++i)
{
const SwPageDesc &rPageDesc = pSh->GetPageDesc(i);
@@ -286,7 +286,7 @@ SwEndNoteOptionPage::~SwEndNoteOptionPage()
SfxTabPage *SwEndNoteOptionPage::Create( Window *pParent, const SfxItemSet &rSet )
{
- return new SwEndNoteOptionPage( pParent, TRUE, rSet );
+ return new SwEndNoteOptionPage( pParent, sal_True, rSet );
}
/*------------------------------------------------------------------------
@@ -322,7 +322,7 @@ void SwEndNoteOptionPage::SelectNumbering(int eNum)
int SwEndNoteOptionPage::GetNumbering() const
{
- const USHORT nPos = aNumCountBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aNumCountBox.GetSelectEntryPos();
return (int) bPosDoc? nPos + 1: nPos;
}
@@ -353,15 +353,15 @@ void SwEndNoteOptionPage::SetShell( SwWrtShell &rShell )
IMPL_LINK( SwEndNoteOptionPage, PosPageHdl, Button *, EMPTYARG )
{
const SwFtnNum eNum = (const SwFtnNum)GetNumbering();
- bPosDoc = FALSE;
+ bPosDoc = sal_False;
if(LISTBOX_ENTRY_NOTFOUND == aNumCountBox.GetEntryPos(aNumPage))
{
aNumCountBox.InsertEntry(aNumPage, FTNNUM_PAGE);
aNumCountBox.InsertEntry(aNumChapter, FTNNUM_CHAPTER);
SelectNumbering(eNum);
}
- aPageTemplLbl.Enable(FALSE);
- aPageTemplBox.Enable(FALSE);
+ aPageTemplLbl.Enable(sal_False);
+ aPageTemplBox.Enable(sal_False);
return 0;
}
@@ -373,10 +373,10 @@ IMPL_LINK( SwEndNoteOptionPage, PosPageHdl, Button *, EMPTYARG )
IMPL_LINK( SwEndNoteOptionPage, NumCountHdl, ListBox*, EMPTYARG )
{
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if( aNumCountBox.GetEntryCount() - 1 != aNumCountBox.GetSelectEntryPos() )
{
- bEnable = FALSE;
+ bEnable = sal_False;
aOffsetFld.SetValue(1);
}
aOffsetLbl.Enable(bEnable);
@@ -397,7 +397,7 @@ IMPL_LINK_INLINE_START( SwEndNoteOptionPage, PosChapterHdl, Button *, EMPTYARG )
if ( !bPosDoc )
SelectNumbering(FTNNUM_DOC);
- bPosDoc = TRUE;
+ bPosDoc = sal_True;
aNumCountBox.RemoveEntry(aNumPage);
aNumCountBox.RemoveEntry(aNumChapter);
aPageTemplLbl.Enable();
@@ -409,8 +409,8 @@ IMPL_LINK_INLINE_END( SwEndNoteOptionPage, PosChapterHdl, Button *, EMPTYARG )
SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const String& rCharFmtName )
{
SwCharFmt* pFmt = 0;
- USHORT nChCount = pSh->GetCharFmtCount();
- for(USHORT i = 0; i< nChCount; i++)
+ sal_uInt16 nChCount = pSh->GetCharFmtCount();
+ for(sal_uInt16 i = 0; i< nChCount; i++)
{
SwCharFmt& rChFmt = pSh->GetCharFmt(i);
if(rChFmt.GetName() == rCharFmtName )
@@ -431,11 +431,11 @@ SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const String& rCharFmtName )
return pFmt;
}
-BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
+sal_Bool SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
{
SwEndNoteInfo *pInf = bEndNote ? new SwEndNoteInfo() : new SwFtnInfo();
- pInf->nFtnOffset = static_cast< USHORT >(aOffsetFld.GetValue() -1);
+ pInf->nFtnOffset = static_cast< sal_uInt16 >(aOffsetFld.GetValue() -1);
pInf->aFmt.SetNumberingType(aNumViewBox.GetSelectedNumberingType() );
pInf->SetPrefix(aPrefixED.GetText());
pInf->SetSuffix(aSuffixED.GetText());
@@ -446,7 +446,7 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
aFtnCharAnchorTemplBox.GetSelectEntry() ) );
// Absatzvorlage
- USHORT nPos = aParaTemplBox.GetSelectEntryPos();
+ sal_uInt16 nPos = aParaTemplBox.GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nPos)
{
const String aFmtName( aParaTemplBox.GetSelectEntry() );
@@ -457,7 +457,7 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
// Seitenvorlage
pInf->ChgPageDesc( pSh->FindPageDescByName(
- aPageTemplBox.GetSelectEntry(), TRUE ) );
+ aPageTemplBox.GetSelectEntry(), sal_True ) );
if ( bEndNote )
{
@@ -475,11 +475,11 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
pSh->SetFtnInfo( *pI );
}
delete pInf;
- return TRUE;
+ return sal_True;
}
SwFootNoteOptionPage::SwFootNoteOptionPage( Window *pParent, const SfxItemSet &rSet ) :
- SwEndNoteOptionPage( pParent, FALSE, rSet )
+ SwEndNoteOptionPage( pParent, sal_False, rSet )
{
}
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index e462eb7530b6..64392b6a6d6f 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -96,7 +96,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
pRenamedArr(0),
pGlosHdl(pHdl)
{
- USHORT i;
+ sal_uInt16 i;
FreeResource();
@@ -121,7 +121,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
INetURLObject aTempURL(sPath);
sPath = aTempURL.GetMainURL(INetURLObject::DECODE_WITH_CHARSET );
aPathLB.InsertEntry(sPath);
- ULONG nCaseReadonly = 0;
+ sal_uLong nCaseReadonly = 0;
utl::TempFile aTempFile(&sPath);
aTempFile.EnableKillingFile();
if(!aTempFile.IsValid())
@@ -131,9 +131,9 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
aPathLB.SetEntryData(i, (void*)nCaseReadonly);
}
aPathLB.SelectEntryPos(0);
- aPathLB.Enable(TRUE);
+ aPathLB.Enable(sal_True);
- const USHORT nCount = pHdl->GetGroupCnt();
+ const sal_uInt16 nCount = pHdl->GetGroupCnt();
for(i = 0; i < nCount; ++i)
{
String sTitle;
@@ -146,7 +146,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
String sTemp(sTitle);
//sGroup.GetToken(0, GLOS_DELIM)
sTemp += '\t';
- pData->sPath = aPathLB.GetEntry((USHORT)sGroup.GetToken(1, GLOS_DELIM).ToInt32());
+ pData->sPath = aPathLB.GetEntry((sal_uInt16)sGroup.GetToken(1, GLOS_DELIM).ToInt32());
sTemp += pData->sPath;
SvLBoxEntry* pEntry = aGroupTLB.InsertEntry(sTemp);
pEntry->SetUserData(pData);
@@ -192,8 +192,8 @@ void __EXPORT SwGlossaryGroupDlg::Apply()
if(pRemovedArr && pRemovedArr->Count())
{
- USHORT nCount = pRemovedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pRemovedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pDelEntry = (*pRemovedArr)[i];
const String sDelGroup = pDelEntry->GetToken(0, '\t');
@@ -224,8 +224,8 @@ void __EXPORT SwGlossaryGroupDlg::Apply()
//erst umbenennen, falls es schon eins gab
if(pRenamedArr && pRenamedArr->Count())
{
- USHORT nCount = pRenamedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pRenamedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
String * pEntry = (*pRenamedArr)[i];
xub_StrLen nStrSttPos = 0;
@@ -239,8 +239,8 @@ void __EXPORT SwGlossaryGroupDlg::Apply()
}
if(pInsertedArr && pInsertedArr->Count())
{
- USHORT nCount = pInsertedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pInsertedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
String sNewGroup = *(*pInsertedArr)[i];
String sNewTitle = sNewGroup.GetToken(0, GLOS_DELIM);
@@ -258,15 +258,15 @@ void __EXPORT SwGlossaryGroupDlg::Apply()
--------------------------------------------------*/
IMPL_LINK( SwGlossaryGroupDlg, SelectHdl, SvTabListBox*, EMPTYARG )
{
- aNewPB.Enable(FALSE);
+ aNewPB.Enable(sal_False);
SvLBoxEntry* pFirstEntry = aGroupTLB.FirstSelected();
if(pFirstEntry)
{
GlosBibUserData* pUserData = (GlosBibUserData*)pFirstEntry->GetUserData();
String sEntry(pUserData->sGroupName);
String sName(aNameED.GetText());
- BOOL bExists = FALSE;
- ULONG nPos = aGroupTLB.GetEntryPos(sName, 0);
+ sal_Bool bExists = sal_False;
+ sal_uLong nPos = aGroupTLB.GetEntryPos(sName, 0);
if( 0xffffffff > nPos)
{
SvLBoxEntry* pEntry = aGroupTLB.GetEntry(nPos);
@@ -318,24 +318,24 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
SvLBoxEntry* pEntry = aGroupTLB.FirstSelected();
if(!pEntry)
{
- pButton->Enable(FALSE);
+ pButton->Enable(sal_False);
return 0;
}
GlosBibUserData* pUserData = (GlosBibUserData*)pEntry->GetUserData();
String sEntry(pUserData->sGroupName);
// befindet sich der zu loeschende Name schon unter den
// den neuen - dann weg damit
- BOOL bDelete = TRUE;
+ sal_Bool bDelete = sal_True;
if(pInsertedArr && pInsertedArr->Count())
{
- USHORT nCount = pInsertedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pInsertedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pTemp = (*pInsertedArr)[i];
if(*pTemp == sEntry)
{
pInsertedArr->Remove(i);
- bDelete = FALSE;
+ bDelete = sal_False;
break;
}
@@ -346,15 +346,15 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
{
if(pRenamedArr && pRenamedArr->Count())
{
- USHORT nCount = pRenamedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pRenamedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pTemp = (*pRenamedArr)[i];
String sTemp( pTemp->GetToken(0, RENAME_TOKEN_DELIM ));
if(sTemp == sEntry)
{
pRenamedArr->Remove(i);
- bDelete = FALSE;
+ bDelete = sal_False;
break;
}
}
@@ -372,7 +372,7 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
delete pUserData;
aGroupTLB.GetModel()->Remove(pEntry);
if(!aGroupTLB.First())
- pButton->Enable(FALSE);
+ pButton->Enable(sal_False);
//the content must be deleted - otherwise the new handler would be called in Apply()
aNameED.SetText(aEmptyStr);
return 0;
@@ -397,18 +397,18 @@ IMPL_LINK( SwGlossaryGroupDlg, RenameHdl, Button *, EMPTYARG )
// befindet sich der umzubenennende Name unter den
// den neuen - dann austauschen
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if(pInsertedArr && pInsertedArr->Count())
{
- USHORT nCount = pInsertedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pInsertedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pTemp = (*pInsertedArr)[i];
if(*pTemp == sEntry)
{
pInsertedArr->Remove(i);
pInsertedArr->Insert(new String(sNewName), pInsertedArr->Count());
- bDone = TRUE;
+ bDone = sal_True;
break;
}
}
@@ -447,17 +447,17 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
{
String sEntry(aNameED.GetText());
// sEntry.ToLower();
- BOOL bEnableNew = TRUE;
- BOOL bEnableDel = FALSE;
- ULONG nCaseReadonly =
- (ULONG)aPathLB.GetEntryData(aPathLB.GetSelectEntryPos());
- BOOL bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY);
+ sal_Bool bEnableNew = sal_True;
+ sal_Bool bEnableDel = sal_False;
+ sal_uLong nCaseReadonly =
+ (sal_uLong)aPathLB.GetEntryData(aPathLB.GetSelectEntryPos());
+ sal_Bool bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY);
if(!sEntry.Len() || bDirReadonly)
- bEnableNew = FALSE;
+ bEnableNew = sal_False;
else if(sEntry.Len())
{
- ULONG nPos = 0xffffffff;
+ sal_uLong nPos = 0xffffffff;
nPos = aGroupTLB.GetEntryPos(sEntry, 0);
@@ -465,12 +465,12 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
if( 0xffffffff == nPos)
{
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
- for(USHORT i = 0; i < aGroupTLB.GetEntryCount(); i++)
+ for(sal_uInt16 i = 0; i < aGroupTLB.GetEntryCount(); i++)
{
String sTemp = aGroupTLB.GetEntryText( i, 0 );
- nCaseReadonly = (ULONG)aPathLB.GetEntryData(
+ nCaseReadonly = (sal_uLong)aPathLB.GetEntryData(
aPathLB.GetEntryPos(aGroupTLB.GetEntryText(i,1)));
- BOOL bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE);
+ sal_Bool bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE);
if( !bCase && rSCmp.isEqual( sTemp, sEntry ))
{
@@ -481,7 +481,7 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
}
if( 0xffffffff > nPos)
{
- bEnableNew = FALSE;
+ bEnableNew = sal_False;
aGroupTLB.Select(aGroupTLB.GetEntry( nPos ));
aGroupTLB.MakeVisible(aGroupTLB.GetEntry( nPos ));
}
@@ -508,23 +508,23 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
Beschreibung:
------------------------------------------------------------------------*/
-BOOL SwGlossaryGroupDlg::IsDeleteAllowed(const String &rGroup)
+sal_Bool SwGlossaryGroupDlg::IsDeleteAllowed(const String &rGroup)
{
- BOOL bDel = (!pGlosHdl->IsReadOnly(&rGroup));
+ sal_Bool bDel = (!pGlosHdl->IsReadOnly(&rGroup));
// OM: befindet sich der Name unter den den neuen Bereichsnamen,
// dann ist er auch loeschbar! Bei noch nicht existenten Bereichsnamen
- // liefert ReadOnly naemlich TRUE.
+ // liefert ReadOnly naemlich sal_True.
if(pInsertedArr && pInsertedArr->Count())
{
- USHORT nCount = pInsertedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pInsertedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pTemp = (*pInsertedArr)[i];
if(*pTemp == rGroup)
{
- bDel = TRUE;
+ bDel = sal_True;
break;
}
}
diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx
index 6ed886fb3974..2545da326b11 100644
--- a/sw/source/ui/misc/glosdoc.cxx
+++ b/sw/source/ui/misc/glosdoc.cxx
@@ -87,7 +87,7 @@ String lcl_CheckFileName( const String& rNewFilePath,
sRet.EraseLeadingChars();
sRet.EraseTrailingChars();
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
if( sRet.Len() )
{
String sTmpDir(rNewFilePath);
@@ -270,7 +270,7 @@ sal_Bool SwGlossaries::RenameGroupDoc(
sOldFileURL += INET_PATH_TOKEN;
sOldFileURL += rOldGroup.GetToken(0, GLOS_DELIM);
sOldFileURL += SwGlossaries::GetExtension();
- BOOL bExist = FStatHelper::IsDocument( sOldFileURL );
+ sal_Bool bExist = FStatHelper::IsDocument( sOldFileURL );
DBG_ASSERT(bExist, "Gruppe existiert nicht!");
if(bExist)
{
@@ -290,8 +290,8 @@ sal_Bool SwGlossaries::RenameGroupDoc(
DBG_ASSERT(!bExist, "Gruppe existiert bereits!");
if(!bExist)
{
- BOOL bCopyCompleted = SWUnoHelper::UCB_CopyFile(
- sOldFileURL, sTempNewFilePath, TRUE );
+ sal_Bool bCopyCompleted = SWUnoHelper::UCB_CopyFile(
+ sOldFileURL, sTempNewFilePath, sal_True );
if(bCopyCompleted)
{
bRet = sal_True;
@@ -341,7 +341,7 @@ sal_Bool SwGlossaries::DelGroupDoc(const String &rName)
// Auch, wenn das File nicht existiert, muss es aus der Liste
// der Textbausteinbereiche entfernt werden
// Kein && wegen CFfront
- BOOL bRemoved = SWUnoHelper::UCB_DeleteFile( sFileURL );
+ sal_Bool bRemoved = SWUnoHelper::UCB_DeleteFile( sFileURL );
DBG_ASSERT(bRemoved, "file has not been removed");
RemoveFileFromList( aName );
return bRemoved;
@@ -389,7 +389,7 @@ SwTextBlocks* SwGlossaries::GetGlosDoc( const String &rName, sal_Bool bCreate )
sFileURL += INET_PATH_TOKEN;
sFileURL += aTmp;
- BOOL bExist = FALSE;
+ sal_Bool bExist = sal_False;
if(!bCreate)
bExist = FStatHelper::IsDocument( sFileURL );
@@ -427,7 +427,7 @@ SvStrings* SwGlossaries::GetNameList()
SWUnoHelper::UCB_GetFileListOfFolder( *(*m_pPathArr)[i], aFiles,
&sExt );
- for( USHORT nFiles = 0, nFEnd = aFiles.Count();
+ for( sal_uInt16 nFiles = 0, nFEnd = aFiles.Count();
nFiles < nFEnd; ++nFiles )
{
String* pTitle = aFiles[ nFiles ];
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 2d2c1989d65c..eba08da76c56 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -134,11 +134,11 @@ struct GroupUserData
{
String sGroupName;
sal_uInt16 nPathIdx;
- BOOL bReadonly;
+ sal_Bool bReadonly;
GroupUserData()
: nPathIdx(0),
- bReadonly(FALSE) {}
+ bReadonly(sal_False) {}
};
/*------------------------------------------------------------------------
@@ -710,9 +710,9 @@ IMPL_LINK( SwGlossaryDlg, BibHdl, Button *, EMPTYARG )
//check if at least one glossary path is write enabled
SvtPathOptions aPathOpt;
String sGlosPath( aPathOpt.GetAutoTextPath() );
- USHORT nPaths = sGlosPath.GetTokenCount(';');
- BOOL bIsWritable = FALSE;
- for(USHORT nPath = 0; nPath < nPaths; nPath++)
+ sal_uInt16 nPaths = sGlosPath.GetTokenCount(';');
+ sal_Bool bIsWritable = sal_False;
+ for(sal_uInt16 nPath = 0; nPath < nPaths; nPath++)
{
String sPath = URIHelper::SmartRel2Abs(
INetURLObject(), sGlosPath.GetToken(nPath, ';'),
@@ -878,7 +878,7 @@ IMPL_LINK_INLINE_START( SwGlossaryDlg, EditHdl, Button *, EMPTYARG )
if(aEditBtn.GetCurItemId() == FN_GL_EDIT )
{
SwTextBlocks *pGroup = ::GetGlossaries()->GetGroupDoc ( GetCurrGrpName () );
- BOOL bRet = pGlossaryHdl->ConvertToNew ( *pGroup );
+ sal_Bool bRet = pGlossaryHdl->ConvertToNew ( *pGroup );
delete pGroup;
if ( bRet )
EndDialog(RET_EDIT);
@@ -1073,7 +1073,7 @@ sal_Bool SwGlTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry)
sal_Bool SwGlTreeListBox::NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& /*rpNewParent*/,
- ULONG& /*rNewChildPos*/
+ sal_uLong& /*rNewChildPos*/
)
{
pDragEntry = 0;
@@ -1121,7 +1121,7 @@ sal_Bool SwGlTreeListBox::NotifyMoving( SvLBoxEntry* pTarget,
sal_Bool SwGlTreeListBox::NotifyCopying( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& /*rpNewParent*/,
- ULONG& /*rNewChildPos*/
+ sal_uLong& /*rNewChildPos*/
)
{
pDragEntry = 0;
@@ -1230,7 +1230,7 @@ IMPL_LINK( SwGlossaryDlg, ShowPreviewHdl, CheckBox *, pBox )
}
}
- BOOL bShow = pBox->IsChecked() && !bCreated;
+ sal_Bool bShow = pBox->IsChecked() && !bCreated;
aExampleWIN.Show( bShow );
aExampleDummyWIN.Show(!bShow);
if( ::GetCurrGlosGroup() )
@@ -1243,7 +1243,7 @@ IMPL_LINK( SwGlossaryDlg, ShowPreviewHdl, CheckBox *, pBox )
--------------------------------------------------*/
IMPL_LINK( SwGlossaryDlg, PreviewLoadedHdl, void *, EMPTYARG )
{
- BOOL bShow = aShowExampleCB.IsChecked();
+ sal_Bool bShow = aShowExampleCB.IsChecked();
aExampleWIN.Show( bShow );
aExampleDummyWIN.Show(!bShow);
ResumeShowAutoText();
@@ -1259,7 +1259,7 @@ void SwGlossaryDlg::ShowAutoText(const String& rGroup, const String& rShortName)
{
SetResumeData(rGroup, rShortName);
//try to make an Undo()
- pExampleFrame->ClearDocument( TRUE );
+ pExampleFrame->ClearDocument( sal_True );
}
}
/* -----------------------------21.12.00 11:33--------------------------------
diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx
index 4d93f8d7542f..e656070796b2 100644
--- a/sw/source/ui/misc/glshell.cxx
+++ b/sw/source/ui/misc/glshell.cxx
@@ -105,7 +105,7 @@ void lcl_Execute( SwDocShell& rSh, SfxRequest& rReq )
void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet )
{
- if( SFX_ITEM_AVAILABLE >= rSet.GetItemState( SID_SAVEDOC, FALSE ))
+ if( SFX_ITEM_AVAILABLE >= rSet.GetItemState( SID_SAVEDOC, sal_False ))
{
if( !rSh.GetDoc()->IsModified() )
rSet.DisableItem( SID_SAVEDOC );
@@ -115,7 +115,7 @@ void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet )
}
-BOOL lcl_Save( SwWrtShell& rSh, const String& rGroupName,
+sal_Bool lcl_Save( SwWrtShell& rSh, const String& rGroupName,
const String& rShortNm, const String& rLongNm )
{
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
@@ -128,7 +128,7 @@ BOOL lcl_Save( SwWrtShell& rSh, const String& rGroupName,
pGlosHdl = rSh.GetView().GetGlosHdl();
pGlosHdl->GetMacros( rShortNm, aStart, aEnd, pBlock );
- USHORT nRet = rSh.SaveGlossaryDoc( *pBlock, rLongNm, rShortNm,
+ sal_uInt16 nRet = rSh.SaveGlossaryDoc( *pBlock, rLongNm, rShortNm,
pCfg->IsSaveRelFile(),
pBlock->IsOnlyTextBlock( rShortNm ) );
@@ -193,7 +193,7 @@ void SwGlosDocShell::GetState( SfxItemSet& rSet )
--------------------------------------------------------------------*/
-BOOL SwGlosDocShell::Save()
+sal_Bool SwGlosDocShell::Save()
{
// In case of an API object which holds this document, it is possible that the WrtShell is already
// dead. For instance, if the doc is modified via this API object, and then, upon office shutdown,
@@ -204,8 +204,8 @@ BOOL SwGlosDocShell::Save()
return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName );
else
{
- SetModified( FALSE );
- return FALSE;
+ SetModified( sal_False );
+ return sal_False;
}
}
@@ -256,15 +256,15 @@ void SwWebGlosDocShell::GetState( SfxItemSet& rSet )
--------------------------------------------------------------------*/
-BOOL SwWebGlosDocShell::Save()
+sal_Bool SwWebGlosDocShell::Save()
{
// same comment as in SwGlosDocShell::Save - see there
if ( GetWrtShell() )
return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName );
else
{
- SetModified( FALSE );
- return FALSE;
+ SetModified( sal_False );
+ return sal_False;
}
}
@@ -274,7 +274,7 @@ BOOL SwWebGlosDocShell::Save()
SV_IMPL_REF ( SwDocShell )
-SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rShortName, BOOL bShow )
+SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rShortName, sal_Bool bShow )
{
SwDocShellRef xDocSh;
@@ -283,7 +283,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS
{
// erfrage welche View registriert ist. Im WebWriter gibts es keine
// normale View
- USHORT nViewId = 0 != &SwView::Factory() ? 2 : 6;
+ sal_uInt16 nViewId = 0 != &SwView::Factory() ? 2 : 6;
String sLongName = pGroup->GetLongName(pGroup->GetIndex( rShortName ));
if( 6 == nViewId )
@@ -311,8 +311,8 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS
aDocTitle += ' ';
aDocTitle += sLongName;
- BOOL bDoesUndo = xDocSh->GetDoc()->DoesUndo();
- xDocSh->GetDoc()->DoUndo( FALSE );
+ sal_Bool bDoesUndo = xDocSh->GetDoc()->DoesUndo();
+ xDocSh->GetDoc()->DoUndo( sal_False );
xDocSh->GetWrtShell()->InsertGlossary( *pGroup, rShortName );
if( !xDocSh->GetDoc()->getPrinter( false ) )
diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx
index a1b305b3b7db..26255d0e3d48 100644
--- a/sw/source/ui/misc/impfnote.hxx
+++ b/sw/source/ui/misc/impfnote.hxx
@@ -83,8 +83,8 @@ class SwEndNoteOptionPage : public SfxTabPage
String aNumPage;
String aNumChapter;
SwWrtShell *pSh;
- BOOL bPosDoc;
- BOOL bEndNote;
+ sal_Bool bPosDoc;
+ sal_Bool bEndNote;
inline void SelectNumbering(int eNum);
int GetNumbering() const;
@@ -95,12 +95,12 @@ class SwEndNoteOptionPage : public SfxTabPage
public:
- SwEndNoteOptionPage( Window *pParent, BOOL bEndNote,
+ SwEndNoteOptionPage( Window *pParent, sal_Bool bEndNote,
const SfxItemSet &rSet );
~SwEndNoteOptionPage();
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset( const SfxItemSet& );
void SetShell( SwWrtShell &rShell );
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 5cc82f8473eb..adc18f0daa6b 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -52,7 +52,7 @@
#include <svx/dialogs.hrc>
#include <sfx2/viewfrm.hxx>
-static BOOL bFootnote = TRUE;
+static sal_Bool bFootnote = sal_True;
/*------------------------------------------------------------------------
Beschreibung: Einfuegen der Fussnote durch OK
@@ -68,14 +68,14 @@ void __EXPORT SwInsFootNoteDlg::Apply()
if ( bEdit )
{
rSh.StartAction();
- rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
rSh.StartUndo( UNDO_START );
SwFmtFtn aNote( aEndNoteBtn.IsChecked() );
aNote.SetNumStr( aStr );
if( rSh.SetCurFtn( aNote ) && bExtCharAvailable )
{
- rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rSh.GetCurAttr( aSet );
SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
@@ -84,8 +84,8 @@ void __EXPORT SwInsFootNoteDlg::Apply()
eCharSet, RES_CHRATR_FONT );
aSet.Put( aFont );
rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
- rSh.ResetSelect(0, FALSE);
- rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.ResetSelect(0, sal_False);
+ rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
}
rSh.EndUndo( UNDO_END );
rSh.EndAction();
@@ -98,7 +98,7 @@ void __EXPORT SwInsFootNoteDlg::Apply()
if ( bExtCharAvailable )
{
- rSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False );
SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rSh.GetAttr( aSet );
SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
@@ -108,7 +108,7 @@ void __EXPORT SwInsFootNoteDlg::Apply()
aSet.Put( aFont );
rSh.SetAttr( aSet, SETATTR_DONTEXPAND );
// zur Bearbeitung des Fussnotentextes
- rSh.ResetSelect(0, FALSE);
+ rSh.ResetSelect(0, sal_False);
rSh.GotoFtnTxt();
}
rSh.EndUndo( UNDO_UI_INSERT_FOOTNOTE );
@@ -137,7 +137,7 @@ IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberCharHdl, Button *, EMPTYARG )
IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG )
{
- aNumberCharBtn.Check( TRUE );
+ aNumberCharBtn.Check( sal_True );
aOkBtn.Enable( 0 != aNumberCharEdit.GetText().Len() );
return 0;
@@ -150,7 +150,7 @@ IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG )
IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG )
{
- aOkBtn.Enable( TRUE );
+ aOkBtn.Enable( sal_True );
return 0;
}
IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG )
@@ -161,14 +161,14 @@ IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG )
IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG )
{
- aNumberCharBtn.Check( TRUE );
+ aNumberCharBtn.Check( sal_True );
SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rSh.GetCurAttr( aSet );
const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
SfxAllItemSet aAllSet( rSh.GetAttrPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
aAllSet.Put( rFont );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -176,8 +176,8 @@ IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG )
rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
if (RET_OK == pDlg->Execute())
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pItem )
{
String sExtChars(pItem->GetValue());
@@ -193,7 +193,7 @@ IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG )
aNumberCharEdit.SetFont( aFont );
}
- bExtCharAvailable = TRUE;
+ bExtCharAvailable = sal_True;
aOkBtn.Enable(0 != aNumberCharEdit.GetText().Len());
}
}
@@ -211,7 +211,7 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn )
Apply();
// Hier zur naechsten Fuss/Endnote wandern
- rSh.ResetSelect(0, FALSE);
+ rSh.ResetSelect(0, sal_False);
if (pBtn == &aNextBT)
rSh.GotoNextFtnAnchor();
else
@@ -226,12 +226,12 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn )
Beschreibung:
------------------------------------------------------------------------*/
-SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, BOOL bEd) :
+SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, sal_Bool bEd) :
SvxStandardDialog(pParent,SW_RES(DLG_INS_FOOTNOTE)),
rSh(rShell),
- bExtCharAvailable(FALSE),
+ bExtCharAvailable(sal_False),
bEdit(bEd),
aNumberAutoBtn (this,SW_RES(RB_NUMBER_AUTO)),
aNumberCharBtn (this,SW_RES(RB_NUMBER_CHAR)),
@@ -281,7 +281,7 @@ SwInsFootNoteDlg::~SwInsFootNoteDlg()
rSh.SetCareWin(0);
if (bEdit)
- rSh.ResetSelect(0, FALSE);
+ rSh.ResetSelect(0, sal_False);
}
/*------------------------------------------------------------------------
@@ -293,7 +293,7 @@ void SwInsFootNoteDlg::Init()
SwFmtFtn aFtnNote;
String sNumStr;
Font aFont;
- bExtCharAvailable = FALSE;
+ bExtCharAvailable = sal_False;
rSh.StartAction();
@@ -303,7 +303,7 @@ void SwInsFootNoteDlg::Init()
{
sNumStr = aFtnNote.GetNumStr();
- rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rSh.GetCurAttr( aSet );
const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
@@ -313,14 +313,14 @@ void SwInsFootNoteDlg::Init()
eCharSet = rFont.GetCharSet();
aFont.SetName(aFontName);
aFont.SetCharSet(eCharSet);
- bExtCharAvailable = TRUE;
- rSh.Left( CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ bExtCharAvailable = sal_True;
+ rSh.Left( CRSR_SKIP_CHARS, sal_False, 1, sal_False );
}
bFootnote = !aFtnNote.IsEndNote();
}
aNumberCharEdit.SetFont(aFont);
- BOOL bNumChar = sNumStr.Len() != 0;
+ sal_Bool bNumChar = sNumStr.Len() != 0;
aNumberCharEdit.SetText(sNumStr);
aNumberCharBtn.Check(bNumChar);
@@ -333,12 +333,12 @@ void SwInsFootNoteDlg::Init()
else
aEndNoteBtn.Check();
- BOOL bNext = rSh.GotoNextFtnAnchor();
+ sal_Bool bNext = rSh.GotoNextFtnAnchor();
if (bNext)
rSh.GotoPrevFtnAnchor();
- BOOL bPrev = rSh.GotoPrevFtnAnchor();
+ sal_Bool bPrev = rSh.GotoPrevFtnAnchor();
if (bPrev)
rSh.GotoNextFtnAnchor();
@@ -346,7 +346,7 @@ void SwInsFootNoteDlg::Init()
aPrevBT.Enable(bPrev);
aNextBT.Enable(bNext);
- rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
rSh.EndAction();
}
diff --git a/sw/source/ui/misc/insrule.cxx b/sw/source/ui/misc/insrule.cxx
index c053030201ad..2409b773850a 100644
--- a/sw/source/ui/misc/insrule.cxx
+++ b/sw/source/ui/misc/insrule.cxx
@@ -82,7 +82,7 @@ SwInsertGrfRulerDlg::SwInsertGrfRulerDlg( Window* pParent ) :
pExampleVS->InsertItem( 1, 1);
pExampleVS->SetItemText( 1, sSimple);
- for(USHORT i = 1; i <= aGrfNames.Count(); i++)
+ for(sal_uInt16 i = 1; i <= aGrfNames.Count(); i++)
{
pExampleVS->InsertItem( i + 1, i);
pExampleVS->SetItemText( i + 1, *((String*)aGrfNames.GetObject(i-1)));
@@ -107,7 +107,7 @@ SwInsertGrfRulerDlg::~SwInsertGrfRulerDlg()
String SwInsertGrfRulerDlg::GetGraphicName()
{
String sRet;
- USHORT nSel = nSelPos - 2; //align selection position with ValueSet index
+ sal_uInt16 nSel = nSelPos - 2; //align selection position with ValueSet index
if(nSel < aGrfNames.Count())
sRet = URIHelper::SmartRel2Abs(
INetURLObject(), *(String*) aGrfNames.GetObject(nSel),
@@ -147,7 +147,7 @@ void __EXPORT SwRulerValueSet::UserDraw( const UserDrawEvent& rUDEvt )
{
Rectangle aRect = rUDEvt.GetRect();
OutputDevice* pDev = rUDEvt.GetDevice();
- USHORT nItemId = rUDEvt.GetItemId();
+ sal_uInt16 nItemId = rUDEvt.GetItemId();
Point aBLPos = aRect.TopLeft();
// Itemzaehlung beginnt bei 1, und die 1. ist die einfache Linie
@@ -189,7 +189,7 @@ void __EXPORT SwRulerValueSet::UserDraw( const UserDrawEvent& rUDEvt )
}
else
{
- SetGrfNotFound(TRUE);
+ SetGrfNotFound(sal_True);
}
}
else
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index 213c0e99e413..60c6662511c0 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -163,7 +163,7 @@ void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& )
IDocumentStylePoolAccess* pIDSPA = pSh->getIDocumentStylePoolAccess();
String sStyleName(rInf.GetCharFmt( *pIDSPA )->GetName());
- const USHORT nPos = aCharStyleLB.GetEntryPos(sStyleName);
+ const sal_uInt16 nPos = aCharStyleLB.GetEntryPos(sStyleName);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
aCharStyleLB.SelectEntryPos(nPos);
@@ -178,13 +178,13 @@ void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& )
// Format
// SwFldMgr aMgr( pSh );
- USHORT nSelFmt = rInf.GetNumType().GetNumberingType();
-// USHORT nCnt = aMgr.GetFormatCount( TYP_SEQFLD, FALSE );
+ sal_uInt16 nSelFmt = rInf.GetNumType().GetNumberingType();
+// sal_uInt16 nCnt = aMgr.GetFormatCount( TYP_SEQFLD, sal_False );
-// for( USHORT i = 0; i < nCnt; i++)
+// for( sal_uInt16 i = 0; i < nCnt; i++)
// {
// aFormatLB.InsertEntry(aMgr.GetFormatStr( TYP_SEQFLD, i));
-// USHORT nFmtId = aMgr.GetFormatId( TYP_SEQFLD, i );
+// sal_uInt16 nFmtId = aMgr.GetFormatId( TYP_SEQFLD, i );
// aFormatLB.SetEntryData( i, (void*)nFmtId );
// if( nFmtId == nSelFmt )
// aFormatLB.SelectEntryPos( i );
@@ -195,10 +195,10 @@ void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& )
// aFormatLB.SelectEntryPos(aFormatLB.GetEntryCount() - 1);
// Position
- aPosLB.SelectEntryPos((USHORT)rInf.GetPos());
+ aPosLB.SelectEntryPos((sal_uInt16)rInf.GetPos());
// Offset
- USHORT nOffset = rInf.GetPosFromLeft();
+ sal_uInt16 nOffset = rInf.GetPosFromLeft();
if (nOffset == USHRT_MAX)
nOffset = 0;
@@ -232,7 +232,7 @@ void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& )
IMPL_LINK( SwLineNumberingPage, ModifyHdl, Edit *, EMPTYARG )
{
- BOOL bHasValue = aDivisorED.GetText().Len() != 0;
+ sal_Bool bHasValue = aDivisorED.GetText().Len() != 0;
aDivIntervalFT.Enable(bHasValue);
aDivIntervalNF.Enable(bHasValue);
@@ -247,7 +247,7 @@ IMPL_LINK( SwLineNumberingPage, ModifyHdl, Edit *, EMPTYARG )
IMPL_LINK( SwLineNumberingPage, LineOnOffHdl, CheckBox *, EMPTYARG )
{
- BOOL bEnable = aNumberingOnCB.IsChecked();
+ sal_Bool bEnable = aNumberingOnCB.IsChecked();
aCharStyleFT.Enable(bEnable);
aCharStyleLB.Enable(bEnable);
@@ -279,7 +279,7 @@ IMPL_LINK( SwLineNumberingPage, LineOnOffHdl, CheckBox *, EMPTYARG )
Beschreibung:
-----------------------------------------------------------------------*/
-BOOL __EXPORT SwLineNumberingPage::FillItemSet( SfxItemSet& )
+sal_Bool __EXPORT SwLineNumberingPage::FillItemSet( SfxItemSet& )
{
SwLineNumberInfo aInf(pSh->GetLineNumberInfo());
@@ -309,16 +309,16 @@ BOOL __EXPORT SwLineNumberingPage::FillItemSet( SfxItemSet& )
aInf.SetPos((LineNumberPosition)aPosLB.GetSelectEntryPos());
// Offset
- aInf.SetPosFromLeft((USHORT)aOffsetMF.Denormalize(aOffsetMF.GetValue(FUNIT_TWIP)));
+ aInf.SetPosFromLeft((sal_uInt16)aOffsetMF.Denormalize(aOffsetMF.GetValue(FUNIT_TWIP)));
// Numerierungsoffset
- aInf.SetCountBy((USHORT)aNumIntervalNF.GetValue());
+ aInf.SetCountBy((sal_uInt16)aNumIntervalNF.GetValue());
// Teiler
aInf.SetDivider(aDivisorED.GetText());
// Teileroffset
- aInf.SetDividerCountBy((USHORT)aDivIntervalNF.GetValue());
+ aInf.SetDividerCountBy((sal_uInt16)aDivIntervalNF.GetValue());
// Zaehlen
aInf.SetCountBlankLines(aCountEmptyLinesCB.IsChecked());
@@ -329,7 +329,7 @@ BOOL __EXPORT SwLineNumberingPage::FillItemSet( SfxItemSet& )
pSh->SetLineNumberInfo(aInf);
- return FALSE;
+ return sal_False;
}
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 43c92a72a3f7..62f9b19380d0 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -93,7 +93,7 @@
#include <svl/aeitem.hxx>
#include <svl/slstitm.hxx>
-static BOOL bLastRelative = FALSE;
+static sal_Bool bLastRelative = sal_False;
/*-----------------03.12.97 10:02-------------------
@@ -134,8 +134,8 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
pSaveNum(0),
pWrtSh(0),
pOutlineDlg(0),
- bPreset( FALSE ),
- bInInintControl(FALSE),
+ bPreset( sal_False ),
+ bInInintControl(sal_False),
// --> OD 2008-02-01 #newlistlevelattrs#
bLabelAlignmentPosAndSpaceModeActive( false )
// <--
@@ -148,7 +148,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
aAlignLB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl));
// --> OD 2008-02-01 #newlistlevelattrs#
aAlign2LB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl));
- for ( USHORT i = 0; i < aAlignLB.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aAlignLB.GetEntryCount(); ++i )
{
aAlign2LB.InsertEntry( aAlignLB.GetEntry( i ) );
}
@@ -192,7 +192,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
aStandardPB.SetClickHdl(LINK(this, SwNumPositionTabPage, StandardHdl));
// Ebenen einfuegen
- for(USHORT i = 1; i <= MAXLEVEL; i++)
+ for(sal_uInt16 i = 1; i <= MAXLEVEL; i++)
aLevelLB.InsertEntry(String::CreateFromInt32(i));
String sEntry(String::CreateFromAscii("1 - "));
sEntry += String::CreateFromInt32(MAXLEVEL);
@@ -214,7 +214,7 @@ SwNumPositionTabPage::~SwNumPositionTabPage()
--------------------------------------------------*/
void SwNumPositionTabPage::InitControls()
{
- bInInintControl = TRUE;
+ bInInintControl = sal_True;
// --> OD 2008-02-01 #newlistlevelattrs#
const bool bRelative = !bLabelAlignmentPosAndSpaceModeActive &&
aRelativeCB.IsEnabled() && aRelativeCB.IsChecked();
@@ -242,11 +242,11 @@ void SwNumPositionTabPage::InitControls()
const SwNumFmt* aNumFmtArr[MAXLEVEL];
const SwFmtVertOrient* pFirstOrient = 0;
- USHORT nMask = 1;
- USHORT nLvl = USHRT_MAX;
+ sal_uInt16 nMask = 1;
+ sal_uInt16 nLvl = USHRT_MAX;
long nFirstBorderText = 0;
long nFirstBorderTextRelative = -1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
aNumFmtArr[i] = &pActNum->Get(i);
if(nActNumLvl & nMask)
@@ -329,7 +329,7 @@ void SwNumPositionTabPage::InitControls()
aDistBorderMF.SetValue(aDistBorderMF.Normalize(nDistBorderNum),FUNIT_TWIP);
}
else
- bSetDistEmpty = TRUE;
+ bSetDistEmpty = sal_True;
if(bSameDist)
aDistNumMF .SetValue(aDistNumMF.Normalize(aNumFmtArr[nLvl]->GetCharTextDistance()), FUNIT_TWIP);
@@ -342,7 +342,7 @@ void SwNumPositionTabPage::InitControls()
if(bSameAdjust)
{
- USHORT nPos = 1; // zentriert
+ sal_uInt16 nPos = 1; // zentriert
if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
nPos = 0;
else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
@@ -363,7 +363,7 @@ void SwNumPositionTabPage::InitControls()
// --> OD 2008-02-01 #newlistlevelattrs#
if ( bSameLabelFollowedBy )
{
- USHORT nPos = 0; // LISTTAB
+ sal_uInt16 nPos = 0; // LISTTAB
if ( aNumFmtArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::SPACE )
{
nPos = 1;
@@ -422,10 +422,10 @@ void SwNumPositionTabPage::InitControls()
}
// <--
- if(TRUE == bSetDistEmpty)
+ if(sal_True == bSetDistEmpty)
aDistBorderMF.SetText(aEmptyStr);
- bInInintControl = FALSE;
+ bInInintControl = sal_False;
}
/*-----------------03.12.97 10:02-------------------
@@ -434,10 +434,10 @@ void SwNumPositionTabPage::InitControls()
void SwNumPositionTabPage::ActivatePage(const SfxItemSet& )
{
const SfxPoolItem* pItem;
- UINT16 nTmpNumLvl =
+ sal_uInt16 nTmpNumLvl =
pOutlineDlg ? pOutlineDlg->GetActNumLevel() : 0;
const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
- if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, FALSE, &pItem))
+ if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, sal_False, &pItem))
{
bPreset = ((const SfxBoolItem*)pItem)->GetValue();
}
@@ -448,18 +448,18 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& )
{
*pActNum = *pSaveNum;
nActNumLvl = nTmpNumLvl;
- USHORT nMask = 1;
- aLevelLB.SetUpdateMode(FALSE);
+ sal_uInt16 nMask = 1;
+ aLevelLB.SetUpdateMode(sal_False);
aLevelLB.SetNoSelection();
aLevelLB.SelectEntryPos( MAXLEVEL, nActNumLvl == USHRT_MAX);
if(nActNumLvl != USHRT_MAX)
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
- aLevelLB.SelectEntryPos( i, TRUE);
+ aLevelLB.SelectEntryPos( i, sal_True);
nMask <<= 1 ;
}
- aLevelLB.SetUpdateMode(TRUE);
+ aLevelLB.SetUpdateMode(sal_True);
// --> OD 2008-02-01 #newlistlevelattrs#
InitPosAndSpaceMode();
@@ -480,14 +480,14 @@ int SwNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet)
SwOutlineTabDialog::SetActNumLevel(nActNumLvl);
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
/*-----------------03.12.97 10:02-------------------
--------------------------------------------------*/
-BOOL SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
{
if(pOutlineDlg)
*pOutlineDlg->GetNumRule() = *pActNum;
@@ -495,7 +495,7 @@ BOOL SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
{
*pSaveNum = *pActNum;
rSet.Put(SwUINumRuleItem( *pSaveNum ));
- rSet.Put(SfxBoolItem(FN_PARAM_NUM_PRESET, FALSE));
+ rSet.Put(SfxBoolItem(FN_PARAM_NUM_PRESET, sal_False));
}
return bModified;
}
@@ -509,27 +509,27 @@ void SwNumPositionTabPage::Reset( const SfxItemSet& rSet )
if(pOutlineDlg)
{
pSaveNum = pOutlineDlg->GetNumRule();
- aLevelLB.EnableMultiSelection(FALSE);
+ aLevelLB.EnableMultiSelection(sal_False);
}
- else if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_ACT_NUMBER, FALSE, &pItem))
+ else if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_ACT_NUMBER, sal_False, &pItem))
pSaveNum = ((SwUINumRuleItem*)pItem)->GetNumRule();
nActNumLvl = SwOutlineTabDialog::GetActNumLevel();
- USHORT nMask = 1;
- aLevelLB.SetUpdateMode(FALSE);
+ sal_uInt16 nMask = 1;
+ aLevelLB.SetUpdateMode(sal_False);
aLevelLB.SetNoSelection();
if(nActNumLvl == USHRT_MAX)
{
- aLevelLB.SelectEntryPos( MAXLEVEL, TRUE);
+ aLevelLB.SelectEntryPos( MAXLEVEL, sal_True);
}
else
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
- aLevelLB.SelectEntryPos( i, TRUE);
+ aLevelLB.SelectEntryPos( i, sal_True);
nMask <<= 1;
}
- aLevelLB.SetUpdateMode(TRUE);
+ aLevelLB.SetUpdateMode(sal_True);
if(!pActNum)
pActNum = new SwNumRule(*pSaveNum);
@@ -541,7 +541,7 @@ void SwNumPositionTabPage::Reset( const SfxItemSet& rSet )
ShowControlsDependingOnPosAndSpaceMode();
// <--
InitControls();
- bModified = FALSE;
+ bModified = sal_False;
}
// --> OD 2008-01-11 #newlistlevelattrs#
@@ -556,8 +556,8 @@ void SwNumPositionTabPage::InitPosAndSpaceMode()
SvxNumberFormat::SvxNumPositionAndSpaceMode ePosAndSpaceMode =
SvxNumberFormat::LABEL_ALIGNMENT;
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
if(nActNumLvl & nMask)
{
@@ -667,15 +667,15 @@ void SwNumPositionTabPage::SetWrtShell(SwWrtShell* pSh)
--------------------------------------------------*/
IMPL_LINK( SwNumPositionTabPage, EditModifyHdl, Edit *, EMPTYARG )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
{
SwNumFmt aNumFmt(pActNum->Get(i));
// --> OD 2008-02-01 #newlistlevelattrs#
- const USHORT nPos = aAlignLB.IsVisible()
+ const sal_uInt16 nPos = aAlignLB.IsVisible()
? aAlignLB.GetSelectEntryPos()
: aAlign2LB.GetSelectEntryPos();
// <--
@@ -697,33 +697,33 @@ IMPL_LINK( SwNumPositionTabPage, EditModifyHdl, Edit *, EMPTYARG )
--------------------------------------------------*/
IMPL_LINK( SwNumPositionTabPage, LevelHdl, ListBox *, pBox )
{
- USHORT nSaveNumLvl = nActNumLvl;
+ sal_uInt16 nSaveNumLvl = nActNumLvl;
nActNumLvl = 0;
if(pBox->IsEntryPosSelected( MAXLEVEL ) &&
(pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff))
{
nActNumLvl = 0xFFFF;
- pBox->SetUpdateMode(FALSE);
- for( USHORT i = 0; i < MAXLEVEL; i++ )
- pBox->SelectEntryPos( i, FALSE );
- pBox->SetUpdateMode(TRUE);
+ pBox->SetUpdateMode(sal_False);
+ for( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
+ pBox->SelectEntryPos( i, sal_False );
+ pBox->SetUpdateMode(sal_True);
}
else if(pBox->GetSelectEntryCount())
{
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; i++ )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
{
if(pBox->IsEntryPosSelected( i ))
nActNumLvl |= nMask;
nMask <<= 1;
}
- pBox->SelectEntryPos( MAXLEVEL, FALSE );
+ pBox->SelectEntryPos( MAXLEVEL, sal_False );
}
else
{
nActNumLvl = nSaveNumLvl;
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; i++ )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
{
if(nActNumLvl & nMask)
{
@@ -750,8 +750,8 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
if(bInInintControl)
return 0;
long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP)));
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
{
@@ -764,7 +764,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
if(0 == i)
{
long nTmp = aNumFmt.GetFirstLineOffset();
- aNumFmt.SetAbsLSpace( USHORT(nValue - nTmp));
+ aNumFmt.SetAbsLSpace( sal_uInt16(nValue - nTmp));
}
else
{
@@ -772,7 +772,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
pActNum->Get( i - 1 ).GetFirstLineOffset() -
pActNum->Get( i ).GetFirstLineOffset();
- aNumFmt.SetAbsLSpace( USHORT(nValue + nTmp));
+ aNumFmt.SetAbsLSpace( sal_uInt16(nValue + nTmp));
}
}
else
@@ -789,7 +789,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
//jetzt muss mit dem FirstLineOffset auch der AbsLSpace veraendert werden
long nDiff = nValue + aNumFmt.GetFirstLineOffset();
long nAbsLSpace = aNumFmt.GetAbsLSpace();
- aNumFmt.SetAbsLSpace(USHORT(nAbsLSpace + nDiff));
+ aNumFmt.SetAbsLSpace(sal_uInt16(nAbsLSpace + nDiff));
aNumFmt.SetFirstLineOffset( -(short)nValue );
}
@@ -810,16 +810,16 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld )
--------------------------------------------------*/
IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox )
{
- BOOL bOn = pBox->IsChecked();
- BOOL bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl;
- BOOL bSetValue = FALSE;
+ sal_Bool bOn = pBox->IsChecked();
+ sal_Bool bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl;
+ sal_Bool bSetValue = sal_False;
long nValue = 0;
if(bOn || bSingleSelection)
{
- USHORT nMask = 1;
- BOOL bFirst = TRUE;
- bSetValue = TRUE;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ sal_Bool bFirst = sal_True;
+ bSetValue = sal_True;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
{
@@ -832,7 +832,7 @@ IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox )
}
else
bSetValue = nValue == rNumFmt.GetAbsLSpace() - pActNum->Get(i - 1).GetAbsLSpace();
- bFirst = FALSE;
+ bFirst = sal_False;
}
nMask <<= 1;
}
@@ -854,7 +854,7 @@ IMPL_LINK( SwNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG )
SvxNumberFormat::SvxNumLabelFollowedBy eLabelFollowedBy =
SvxNumberFormat::LISTTAB;
{
- const USHORT nPos = aLabelFollowedByLB.GetSelectEntryPos();
+ const sal_uInt16 nPos = aLabelFollowedByLB.GetSelectEntryPos();
if ( nPos == 1 )
{
eLabelFollowedBy = SvxNumberFormat::SPACE;
@@ -867,9 +867,9 @@ IMPL_LINK( SwNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG )
// set value at the chosen list levels
bool bSameListtabPos = true;
- USHORT nFirstLvl = USHRT_MAX;
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ sal_uInt16 nFirstLvl = USHRT_MAX;
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
if ( nActNumLvl & nMask )
{
@@ -918,8 +918,8 @@ IMPL_LINK( SwNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pFld )
const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP)));
// set value at the chosen list levels
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
if ( nActNumLvl & nMask )
{
@@ -943,8 +943,8 @@ IMPL_LINK( SwNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pFld )
const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP)));
// set value at the chosen list levels
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
if ( nActNumLvl & nMask )
{
@@ -969,8 +969,8 @@ IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld )
const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP)));
// set value at the chosen list levels
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
if ( nActNumLvl & nMask )
{
@@ -996,8 +996,8 @@ IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld )
--------------------------------------------------*/
IMPL_LINK( SwNumPositionTabPage, StandardHdl, PushButton *, EMPTYARG )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
{
@@ -1037,9 +1037,9 @@ IMPL_LINK( SwNumPositionTabPage, StandardHdl, PushButton *, EMPTYARG )
}
#if OSL_DEBUG_LEVEL > 1
-void SwNumPositionTabPage::SetModified(BOOL bRepaint)
+void SwNumPositionTabPage::SetModified(sal_Bool bRepaint)
{
- bModified = TRUE;
+ bModified = sal_True;
if(bRepaint)
{
aPreviewWIN.SetLevel(nActNumLvl);
@@ -1057,7 +1057,7 @@ void SwNumPositionTabPage::SetModified(BOOL bRepaint)
SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(Window* pParent,
const SfxItemSet* pSwItemSet, SwWrtShell & rSh) :
- SfxTabDialog(pParent, SW_RES(DLG_SVXTEST_NUM_BULLET), pSwItemSet, FALSE, &aEmptyStr),
+ SfxTabDialog(pParent, SW_RES(DLG_SVXTEST_NUM_BULLET), pSwItemSet, sal_False, &aEmptyStr),
rWrtSh(rSh),
sRemoveText(SW_RES(ST_RESET)),
nRetOptionsDialog(USHRT_MAX)
@@ -1067,7 +1067,7 @@ SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(Window* pParent,
GetUserButton()->SetHelpId(HID_NUM_RESET);
GetUserButton()->SetClickHdl(LINK(this, SwSvxNumBulletTabDialog, RemoveNumberingHdl));
if(!rWrtSh.GetCurNumRule())
- GetUserButton()->Enable(FALSE);
+ GetUserButton()->Enable(sal_False);
AddTabPage( RID_SVXPAGE_PICK_SINGLE_NUM );
AddTabPage( RID_SVXPAGE_PICK_BULLET );
AddTabPage( RID_SVXPAGE_PICK_NUM );
@@ -1088,7 +1088,7 @@ SwSvxNumBulletTabDialog::~SwSvxNumBulletTabDialog()
--------------------------------------------------*/
-void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage)
+void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
{
//Namen der Vorlagen und Metric setzen
String sNumCharFmt, sBulletCharFmt;
@@ -1125,7 +1125,7 @@ void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage)
SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell();
::FillCharStyleListBox(rCharFmtLB, pDocShell);
List aList;
- for(USHORT j = 0; j < rCharFmtLB.GetEntryCount(); j++)
+ for(sal_uInt16 j = 0; j < rCharFmtLB.GetEntryCount(); j++)
{
aList.Insert( new XubString(rCharFmtLB.GetEntry(j)), LIST_APPEND );
@@ -1133,9 +1133,9 @@ void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage)
aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric) ) );
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric) ) );
rPage.PageCreated(aSet);
- for( USHORT i = (USHORT)aList.Count(); i; --i )
+ for( sal_uInt16 i = (sal_uInt16)aList.Count(); i; --i )
delete (XubString*)aList.Remove(i);
aList.Clear();
}
@@ -1145,7 +1145,7 @@ void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage)
SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell));
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric)) );
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)) );
rPage.PageCreated(aSet);
// ((SvxNumPositionTabPage&)rPage).SetWrtShell(&rWrtSh);
}
diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx
index 964d04738755..39186bb6de60 100644
--- a/sw/source/ui/misc/numberingtypelistbox.cxx
+++ b/sw/source/ui/misc/numberingtypelistbox.cxx
@@ -53,7 +53,7 @@ struct SwNumberingTypeListBox_Impl
---------------------------------------------------------------------------*/
SwNumberingTypeListBox::SwNumberingTypeListBox( Window* pWin, const ResId& rResId,
- USHORT nTypeFlags ) :
+ sal_uInt16 nTypeFlags ) :
ListBox(pWin, rResId),
pImpl(new SwNumberingTypeListBox_Impl)
{
@@ -76,7 +76,7 @@ SwNumberingTypeListBox::~SwNumberingTypeListBox()
/* -----------------------------01.03.01 16:02--------------------------------
---------------------------------------------------------------------------*/
-void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
+void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
{
Clear();
uno::Sequence<sal_Int16> aTypes;
@@ -95,7 +95,7 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
{
long nValue = rNames.GetValue(i);
sal_Bool bInsert = sal_True;
- USHORT nPos = LISTBOX_APPEND;
+ sal_uInt16 nPos = LISTBOX_APPEND;
switch(nValue)
{
case style::NumberingType::NUMBER_NONE:
@@ -125,7 +125,7 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
}
if(bInsert)
{
- USHORT nEntry = InsertEntry(rNames.GetString(i), nPos);
+ sal_uInt16 nEntry = InsertEntry(rNames.GetString(i), nPos);
SetEntryData( nEntry, (void*)nValue );
}
}
@@ -138,11 +138,11 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
sal_Int16 nCurrent = pTypes[nType];
if(nCurrent > style::NumberingType::CHARS_LOWER_LETTER_N)
{
- if(LISTBOX_ENTRY_NOTFOUND == GetEntryPos((void*)(ULONG)nCurrent))
+ if(LISTBOX_ENTRY_NOTFOUND == GetEntryPos((void*)(sal_uLong)nCurrent))
{
OUString aIdent = pImpl->xInfo->getNumberingIdentifier( nCurrent );
- USHORT nPos = InsertEntry(aIdent);
- SetEntryData(nPos,(void*)(ULONG)nCurrent);
+ sal_uInt16 nPos = InsertEntry(aIdent);
+ SetEntryData(nPos,(void*)(sal_uLong)nCurrent);
}
}
}
@@ -156,9 +156,9 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType()
{
sal_Int16 nRet = 0;
- USHORT nSelPos = GetSelectEntryPos();
+ sal_uInt16 nSelPos = GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nSelPos)
- nRet = (sal_Int16)(ULONG)GetEntryData(nSelPos);
+ nRet = (sal_Int16)(sal_uLong)GetEntryData(nSelPos);
#ifdef DBG_UTIL
else
DBG_ERROR("SwNumberingTypeListBox not selected");
@@ -170,7 +170,7 @@ sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType()
---------------------------------------------------------------------------*/
sal_Bool SwNumberingTypeListBox::SelectNumberingType(sal_Int16 nType)
{
- USHORT nPos = GetEntryPos((void*)(ULONG)nType);
+ sal_uInt16 nPos = GetEntryPos((void*)(sal_uLong)nType);
SelectEntryPos( nPos );
return LISTBOX_ENTRY_NOTFOUND != nPos;
}
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 5380a00afbaf..8658c0024b18 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -118,7 +118,7 @@ public:
~SwNumNamesDlg();
void SetUserNames(const String *pList[]);
String GetName() const { return aFormEdit.GetText(); }
- USHORT GetCurEntryPos() const { return aFormBox.GetSelectEntryPos(); }
+ sal_uInt16 GetCurEntryPos() const { return aFormBox.GetSelectEntryPos(); }
};
/*------------------------------------------------------------------------
@@ -143,8 +143,8 @@ IMPL_LINK_INLINE_END( SwNumNamesDlg, SelectHdl, ListBox *, pBox )
void SwNumNamesDlg::SetUserNames(const String *pList[])
{
- USHORT nSelect = 0;
- for(USHORT i = 0; i < SwBaseNumRules::nMaxRules; ++i)
+ sal_uInt16 nSelect = 0;
+ for(sal_uInt16 i = 0; i < SwBaseNumRules::nMaxRules; ++i)
{
if(pList[i])
{
@@ -210,10 +210,10 @@ __EXPORT SwNumNamesDlg::~SwNumNamesDlg() {}
/* -----------------08.07.98 08:46-------------------
*
* --------------------------------------------------*/
-USHORT lcl_BitToLevel(USHORT nActLevel)
+sal_uInt16 lcl_BitToLevel(sal_uInt16 nActLevel)
{
- USHORT nTmp = nActLevel;
- USHORT nTmpLevel = 0;
+ sal_uInt16 nTmp = nActLevel;
+ sal_uInt16 nTmpLevel = 0;
while( 0 != (nTmp >>= 1) )
nTmpLevel++;
return nTmpLevel;
@@ -222,12 +222,12 @@ USHORT lcl_BitToLevel(USHORT nActLevel)
/* -----------------07.07.98 14:13-------------------
*
* --------------------------------------------------*/
-USHORT SwOutlineTabDialog::nNumLevel = 1;
+sal_uInt16 SwOutlineTabDialog::nNumLevel = 1;
SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
const SfxItemSet* pSwItemSet,
SwWrtShell &rSh) :
//der UserString wird danach richtig gesetzt
- SfxTabDialog(pParent, SW_RES(DLG_TAB_OUTLINE), pSwItemSet, FALSE, &aEmptyStr),
+ SfxTabDialog(pParent, SW_RES(DLG_TAB_OUTLINE), pSwItemSet, sal_False, &aEmptyStr),
aNullStr(C2S("____")),
aFormMenu(SW_RES(MN_FORM)),
rWrtSh(rSh),
@@ -250,7 +250,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
AddTabPage(TP_OUTLINE_NUM , &SwOutlineSettingsTabPage::Create, 0);
String sHeadline;
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < MAXLEVEL; ++i )
{
@@ -262,13 +262,13 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
}
// Erfragen der Gliederungsebenen der Textvorlagen
- const USHORT nCount = rWrtSh.GetTxtFmtCollCount();
+ const sal_uInt16 nCount = rWrtSh.GetTxtFmtCollCount();
for(i = 0; i < nCount; ++i )
{
SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i);
if(!rTxtColl.IsDefault())
{
- //BYTE nOutLevel = rTxtColl.GetOutlineLevel(); //<-#outline level, removed out by zhaojianwei
+ //sal_uInt8 nOutLevel = rTxtColl.GetOutlineLevel(); //<-#outline level, removed out by zhaojianwei
//if(nOutLevel != NO_NUMBERING)
//->added by zhaojianwei
if(rTxtColl.IsAssignedToListLevelOfOutlineStyle())
@@ -292,7 +292,7 @@ SwOutlineTabDialog::~SwOutlineTabDialog()
/* -----------------07.07.98 14:13-------------------
*
* --------------------------------------------------*/
-void SwOutlineTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage)
+void SwOutlineTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
{
switch ( nPageId )
{
@@ -321,7 +321,7 @@ IMPL_LINK( SwOutlineTabDialog, CancelHdl, Button *, EMPTYARG )
IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn )
{
//PopupMenu auffuellen
- for( USHORT i = 0; i < SwChapterNumRules::nMaxRules; ++i )
+ for( sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i )
{
const SwNumRulesWithName *pRules = pChapterNumRules->GetRules(i);
if( pRules )
@@ -337,7 +337,7 @@ IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn )
* --------------------------------------------------*/
IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
{
- BYTE nLevelNo = 0;
+ sal_uInt8 nLevelNo = 0;
switch(pMenu->GetCurItemId())
{
case MN_FORM1: nLevelNo = 1; break;
@@ -354,7 +354,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
{
SwNumNamesDlg *pDlg = new SwNumNamesDlg(this);
const String *aStrArr[SwChapterNumRules::nMaxRules];
- for(USHORT i = 0; i < SwChapterNumRules::nMaxRules; ++i)
+ for(sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i)
{
const SwNumRulesWithName *pRules = pChapterNumRules->GetRules(i);
if(pRules)
@@ -389,7 +389,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
*pNumRule = *rWrtSh.GetOutlineNumRule();
}
- USHORT nPageId = GetCurPageId();
+ sal_uInt16 nPageId = GetCurPageId();
SfxTabPage* pPage = GetTabPage( nPageId );
pPage->Reset(*GetOutputItemSet());
@@ -398,9 +398,9 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
/* -----------------07.07.98 14:19-------------------
*
* --------------------------------------------------*/
-USHORT SwOutlineTabDialog::GetLevel(const String &rFmtName) const
+sal_uInt16 SwOutlineTabDialog::GetLevel(const String &rFmtName) const
{
- for(USHORT i = 0; i < MAXLEVEL; ++i)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; ++i)
{
if(aCollNames[i] == rFmtName)
return i;
@@ -426,18 +426,18 @@ short SwOutlineTabDialog::Ok()
const SwNumRule * pOutlineRule = rWrtSh.GetOutlineNumRule();
- USHORT i, nCount = rWrtSh.GetTxtFmtCollCount();
+ sal_uInt16 i, nCount = rWrtSh.GetTxtFmtCollCount();
for( i = 0; i < nCount; ++i )
{
SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i);
if( !rTxtColl.IsDefault() )
{
- //rTxtColl.SetOutlineLevel( (BYTE)GetLevel(rTxtColl.GetName()));//#outline level,removed by zhaojianwei
+ //rTxtColl.SetOutlineLevel( (sal_uInt8)GetLevel(rTxtColl.GetName()));//#outline level,removed by zhaojianwei
const SfxPoolItem & rItem =
- rTxtColl.GetFmtAttr(RES_PARATR_NUMRULE, FALSE);
+ rTxtColl.GetFmtAttr(RES_PARATR_NUMRULE, sal_False);
- //if ((BYTE)GetLevel(rTxtColl.GetName()) == NO_NUMBERING) //#outline level,removed by zhaojianwei
+ //if ((sal_uInt8)GetLevel(rTxtColl.GetName()) == NO_NUMBERING) //#outline level,removed by zhaojianwei
//{
// if (static_cast<const SwNumRuleItem &>(rItem).GetValue() ==
// pOutlineRule->GetName())
@@ -454,7 +454,7 @@ short SwOutlineTabDialog::Ok()
// rTxtColl.SetFmtAttr(aItem);
// }
//}
- if ((BYTE)GetLevel(rTxtColl.GetName()) == MAXLEVEL) //add by zhaojianwei
+ if ((sal_uInt8)GetLevel(rTxtColl.GetName()) == MAXLEVEL) //add by zhaojianwei
{
if(rTxtColl.IsAssignedToListLevelOfOutlineStyle())
{
@@ -491,7 +491,7 @@ short SwOutlineTabDialog::Ok()
//if( !aCollNames[i].Len() ) //#outline level,removed by zhaojianwei
//{
// SwTxtFmtColl* pTxtColl = rWrtSh.GetTxtCollFromPool(
- // static_cast< USHORT >(RES_POOLCOLL_HEADLINE1 + i) );
+ // static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i) );
// pTxtColl->SetOutlineLevel( NO_NUMBERING );
// pTxtColl->ResetFmtAttr(RES_PARATR_NUMRULE);
//}
@@ -501,7 +501,7 @@ short SwOutlineTabDialog::Ok()
// aCollNames[i], SwWrtShell::GETSTYLE_CREATESOME);
// if(pTxtColl)
// {
- // pTxtColl->SetOutlineLevel( static_cast< BYTE >(i) );
+ // pTxtColl->SetOutlineLevel( static_cast< sal_uInt8 >(i) );
// SwNumRuleItem aItem(pOutlineRule->GetName());
// pTxtColl->SetFmtAttr(aItem);
@@ -510,7 +510,7 @@ short SwOutlineTabDialog::Ok()
if(aCollNames[i] != sHeadline)//->added by zhaojianwei
{
SwTxtFmtColl* pTxtColl = rWrtSh.GetTxtCollFromPool(
- static_cast< USHORT >(RES_POOLCOLL_HEADLINE1 + i) );
+ static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i) );
pTxtColl->DeleteAssignmentToListLevelOfOutlineStyle();
pTxtColl->ResetFmtAttr(RES_PARATR_NUMRULE);
@@ -593,17 +593,17 @@ void SwOutlineSettingsTabPage::Update()
aCollBox.Enable(USHRT_MAX != nActLevel);
if(USHRT_MAX == nActLevel)
{
- BOOL bSamePrefix = TRUE;
- BOOL bSameSuffix = TRUE;
- BOOL bSameType = TRUE;
- BOOL bSameComplete = TRUE;
- BOOL bSameStart = TRUE;
- BOOL bSameCharFmt = TRUE;
+ sal_Bool bSamePrefix = sal_True;
+ sal_Bool bSameSuffix = sal_True;
+ sal_Bool bSameType = sal_True;
+ sal_Bool bSameComplete = sal_True;
+ sal_Bool bSameStart = sal_True;
+ sal_Bool bSameCharFmt = sal_True;
const SwNumFmt* aNumFmtArr[MAXLEVEL];
const SwCharFmt* pFirstFmt = 0;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
aNumFmtArr[ i ] = &pNumRule->Get(i);
@@ -649,8 +649,8 @@ void SwOutlineSettingsTabPage::Update()
else
aCharFmtLB.SetNoSelection();
- aAllLevelFT.Enable(TRUE);
- aAllLevelNF.Enable(TRUE);
+ aAllLevelFT.Enable(sal_True);
+ aAllLevelNF.Enable(sal_True);
aAllLevelNF.SetMax(MAXLEVEL);
if(bSameComplete)
{
@@ -663,7 +663,7 @@ void SwOutlineSettingsTabPage::Update()
}
else
{
- USHORT nTmpLevel = lcl_BitToLevel(nActLevel);
+ sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel);
String aColl(pCollNames[nTmpLevel]);
if(aColl.Len())
aCollBox.SelectEntry(aColl);
@@ -682,16 +682,16 @@ void SwOutlineSettingsTabPage::Update()
if(nTmpLevel)
{
- aAllLevelFT.Enable(TRUE);
- aAllLevelNF.Enable(TRUE);
+ aAllLevelFT.Enable(sal_True);
+ aAllLevelNF.Enable(sal_True);
aAllLevelNF.SetMax(nTmpLevel + 1);
aAllLevelNF.SetValue(rFmt.GetIncludeUpperLevels());
}
else
{
aAllLevelNF.SetText(aEmptyStr);
- aAllLevelNF.Enable(FALSE);
- aAllLevelFT.Enable(FALSE);
+ aAllLevelNF.Enable(sal_False);
+ aAllLevelFT.Enable(sal_False);
}
CheckForStartValue_Impl(rFmt.GetNumberingType());
aStartEdit.SetValue( rFmt.GetStart() );
@@ -711,8 +711,8 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox )
}
else
{
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; i++ )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
{
if(pBox->IsEntryPosSelected( i ))
nActLevel |= nMask;
@@ -727,14 +727,14 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox )
* --------------------------------------------------*/
IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pFld )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
SwNumFmt aNumFmt(pNumRule->Get(i));
- aNumFmt.SetIncludeUpperLevels( Min( (BYTE)pFld->GetValue(),
- (BYTE)(i + 1)) );
+ aNumFmt.SetIncludeUpperLevels( Min( (sal_uInt8)pFld->GetValue(),
+ (sal_uInt8)(i + 1)) );
pNumRule->Set(i, aNumFmt);
}
nMask <<= 1;
@@ -747,11 +747,11 @@ IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pFld )
* --------------------------------------------------*/
IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox )
{
- BYTE i;
+ sal_uInt8 i;
const String aCollName(pBox->GetSelectEntry());
//0xFFFF darf hier nicht sein (disable)
- USHORT nTmpLevel = lcl_BitToLevel(nActLevel);
+ sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel);
String sOldName( pCollNames[nTmpLevel] );
for( i = 0; i < MAXLEVEL; ++i)
@@ -774,7 +774,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox )
if( aSaveCollNames[ i ] == sOldName && i != nTmpLevel &&
!pCollNames[ i ].Len() )
{
- BYTE n;
+ sal_uInt8 n;
for( n = 0; n < MAXLEVEL; ++n )
if( pCollNames[ n ] == sOldName )
break;
@@ -790,7 +790,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox )
IMPL_LINK( SwOutlineSettingsTabPage, CollSelectGetFocus, ListBox *, EMPTYARG )
{
- for( BYTE i = 0; i < MAXLEVEL; ++i)
+ for( sal_uInt8 i = 0; i < MAXLEVEL; ++i)
aSaveCollNames[i] = pCollNames[i];
return 0;
}
@@ -800,9 +800,9 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelectGetFocus, ListBox *, EMPTYARG )
* --------------------------------------------------*/
IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBox )
{
- USHORT nMask = 1;
- sal_Int16 nNumberType = pBox->GetSelectedNumberingType();//(sal_Int16)(ULONG)pBox->GetEntryData(pBox->GetSelectEntryPos());
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ sal_Int16 nNumberType = pBox->GetSelectedNumberingType();//(sal_Int16)(sal_uLong)pBox->GetEntryData(pBox->GetSelectEntryPos());
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
@@ -821,8 +821,8 @@ IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBo
* --------------------------------------------------*/
IMPL_LINK( SwOutlineSettingsTabPage, DelimModify, Edit *, EMPTYARG )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
@@ -841,13 +841,13 @@ IMPL_LINK( SwOutlineSettingsTabPage, DelimModify, Edit *, EMPTYARG )
* --------------------------------------------------*/
IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pFld )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
SwNumFmt aNumFmt(pNumRule->Get(i));
- aNumFmt.SetStart( (USHORT)pFld->GetValue() );
+ aNumFmt.SetStart( (sal_uInt16)pFld->GetValue() );
pNumRule->Set(i, aNumFmt);
}
nMask <<= 1;
@@ -860,15 +860,15 @@ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pFld )
* --------------------------------------------------*/
IMPL_LINK( SwOutlineSettingsTabPage, CharFmtHdl, ListBox *, EMPTYARG )
{
-// bAutomaticCharStyles = FALSE;
+// bAutomaticCharStyles = sal_False;
String sEntry = aCharFmtLB.GetSelectEntry();
- USHORT nMask = 1;
- BOOL bFormatNone = sEntry == ViewShell::GetShellRes()->aStrNone;
+ sal_uInt16 nMask = 1;
+ sal_Bool bFormatNone = sEntry == ViewShell::GetShellRes()->aStrNone;
SwCharFmt* pFmt = 0;
if(!bFormatNone)
{
- USHORT nChCount = pSh->GetCharFmtCount();
- for(USHORT i = 0; i < nChCount; i++)
+ sal_uInt16 nChCount = pSh->GetCharFmtCount();
+ for(sal_uInt16 i = 0; i < nChCount; i++)
{
SwCharFmt& rChFmt = pSh->GetCharFmt(i);
if(rChFmt.GetName() == sEntry)
@@ -889,7 +889,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CharFmtHdl, ListBox *, EMPTYARG )
}
}
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
@@ -925,13 +925,13 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
aPreviewWIN.SetNumRule(pNumRule);
aPreviewWIN.SetOutlineNames(pCollNames);
// Startwert setzen - nActLevel muss hier 1 sein
- USHORT nTmpLevel = lcl_BitToLevel(nActLevel);
+ sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel);
const SwNumFmt& rNumFmt = pNumRule->Get( nTmpLevel );
aStartEdit.SetValue( rNumFmt.GetStart() );
// Poolformate fuer Ueberschriften anlegen
String sStr;
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < MAXLEVEL; ++i )
{
aCollBox.InsertEntry( SwStyleNameMapper::GetUIName(
@@ -943,7 +943,7 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
aLevelLB.InsertEntry( sStr );
// Erfragen der Gliederungsebenen der Textvorlagen
- const USHORT nCount = pSh->GetTxtFmtCollCount();
+ const sal_uInt16 nCount = pSh->GetTxtFmtCollCount();
for( i = 0; i < nCount; ++i )
{
SwTxtFmtColl &rTxtColl = pSh->GetTxtFmtColl(i);
@@ -956,11 +956,11 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
}
aNumberBox.SelectNumberingType(rNumFmt.GetNumberingType());
- USHORT nOutlinePos = pSh->GetOutlinePos(MAXLEVEL);
- USHORT nTmp = 0;
+ sal_uInt16 nOutlinePos = pSh->GetOutlinePos(MAXLEVEL);
+ sal_uInt16 nTmp = 0;
if(nOutlinePos != USHRT_MAX)
{
- nTmp = static_cast<USHORT>(pSh->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos));
+ nTmp = static_cast<sal_uInt16>(pSh->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos));
}
aLevelLB.SelectEntryPos(nTmp-1);//nTmp);//#outline level,zhaojianwei
@@ -996,9 +996,9 @@ int SwOutlineSettingsTabPage::DeactivatePage(SfxItemSet*)
/* -----------------07.07.98 14:19-------------------
*
* --------------------------------------------------*/
-BOOL SwOutlineSettingsTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SwOutlineSettingsTabPage::FillItemSet( SfxItemSet& )
{
- return TRUE;
+ return sal_True;
}
/* -----------------07.07.98 14:19-------------------
*
@@ -1020,8 +1020,8 @@ SfxTabPage* SwOutlineSettingsTabPage::Create( Window* pParent,
* --------------------------------------------------*/
void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType)
{
- BOOL bIsNull = aStartEdit.GetValue() == 0;
- BOOL bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC ||
+ sal_Bool bIsNull = aStartEdit.GetValue() == 0;
+ sal_Bool bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC ||
SVX_NUM_CHARS_UPPER_LETTER_N == nNumberingType ||
SVX_NUM_CHARS_LOWER_LETTER_N == nNumberingType;
aStartEdit.SetMin(bNoZeroAllowed ? 1 : 0);
@@ -1031,19 +1031,19 @@ void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType
/*-----------------09.12.97 11:54-------------------
--------------------------------------------------*/
-USHORT lcl_DrawBullet(VirtualDevice* pVDev,
- const SwNumFmt& rFmt, USHORT nXStart,
- USHORT nYStart, const Size& rSize)
+sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev,
+ const SwNumFmt& rFmt, sal_uInt16 nXStart,
+ sal_uInt16 nYStart, const Size& rSize)
{
Font aTmpFont(pVDev->GetFont());
Font aFont(*rFmt.GetBulletFont());
aFont.SetSize(rSize);
- aFont.SetTransparent(TRUE);
+ aFont.SetTransparent(sal_True);
pVDev->SetFont( aFont );
String aText(rFmt.GetBulletChar());
pVDev->DrawText( Point(nXStart, nYStart), aText );
- USHORT nRet = (USHORT)pVDev->GetTextWidth(aText);
+ sal_uInt16 nRet = (sal_uInt16)pVDev->GetTextWidth(aText);
pVDev->SetFont(aTmpFont);
return nRet;
@@ -1051,11 +1051,11 @@ USHORT lcl_DrawBullet(VirtualDevice* pVDev,
/*-----------------09.12.97 11:49-------------------
--------------------------------------------------*/
-USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, USHORT nXStart,
- USHORT nYStart, USHORT nDivision)
+sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, sal_uInt16 nXStart,
+ sal_uInt16 nYStart, sal_uInt16 nDivision)
{
const SvxBrushItem* pBrushItem = rFmt.GetBrush();
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if(pBrushItem)
{
const Graphic* pGrf = pBrushItem->GetGraphic();
@@ -1063,7 +1063,7 @@ USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, USHORT nXStar
{
Size aGSize( rFmt.GetGraphicSize());
aGSize.Width() /= nDivision;
- nRet = (USHORT)aGSize.Width();
+ nRet = (sal_uInt16)aGSize.Width();
aGSize.Height() /= nDivision;
pGrf->Draw( pVDev, Point(nXStart,nYStart),
pVDev->PixelToLogic( aGSize ) );
@@ -1091,10 +1091,10 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
if(pActNum)
{
- USHORT nWidthRelation;
+ sal_uInt16 nWidthRelation;
if(nPageWidth)
{
- nWidthRelation = USHORT (nPageWidth / aSize.Width());
+ nWidthRelation = sal_uInt16 (nPageWidth / aSize.Width());
if(bPosition)
nWidthRelation = nWidthRelation * 2 / 3;
else
@@ -1104,11 +1104,11 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
nWidthRelation = 30; // Kapiteldialog
//Hoehe pro Ebene
- USHORT nXStep = USHORT(aSize.Width() / (3 * MAXLEVEL));
+ sal_uInt16 nXStep = sal_uInt16(aSize.Width() / (3 * MAXLEVEL));
if(MAXLEVEL < 10)
nXStep /= 2;
- USHORT nYStart = 4;
- USHORT nYStep = USHORT((aSize.Height() - 6)/ MAXLEVEL);
+ sal_uInt16 nYStart = 4;
+ sal_uInt16 nYStep = sal_uInt16((aSize.Height() - 6)/ MAXLEVEL);
aStdFont = OutputDevice::GetDefaultFont(
DEFAULTFONT_UI_SANS, (LanguageType)GetAppLanguage(),
DEFAULTFONT_FLAGS_ONLYONE, this );
@@ -1116,17 +1116,17 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
aStdFont.SetColor( SwViewOption::GetFontColor() );
//
- USHORT nFontHeight = nYStep * 6 / 10;
+ sal_uInt16 nFontHeight = nYStep * 6 / 10;
if(bPosition)
nFontHeight = nYStep * 15 / 10;
aStdFont.SetSize(Size( 0, nFontHeight ));
- USHORT nPreNum = pActNum->Get(0).GetStart();
+ sal_uInt16 nPreNum = pActNum->Get(0).GetStart();
if(bPosition)
{
- USHORT nLineHeight = nFontHeight * 8 / 7;
- BYTE nStart = 0;
+ sal_uInt16 nLineHeight = nFontHeight * 8 / 7;
+ sal_uInt8 nStart = 0;
while( !(nActLevel & (1<<nStart)) )
{
nStart++;
@@ -1135,22 +1135,22 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
nStart--;
SwNumberTree::tNumberVector aNumVector;
- BYTE nEnd = Min( (BYTE)(nStart + 3), MAXLEVEL );
- for( BYTE nLevel = nStart; nLevel < nEnd; ++nLevel )
+ sal_uInt8 nEnd = Min( (sal_uInt8)(nStart + 3), MAXLEVEL );
+ for( sal_uInt8 nLevel = nStart; nLevel < nEnd; ++nLevel )
{
const SwNumFmt &rFmt = pActNum->Get(nLevel);
aNumVector.push_back(rFmt.GetStart());
// --> OD 2008-02-01 #newlistlevelattrs#
- USHORT nXStart( 0 );
+ sal_uInt16 nXStart( 0 );
short nTextOffset( 0 );
- USHORT nNumberXPos( 0 );
+ sal_uInt16 nNumberXPos( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nXStart = rFmt.GetAbsLSpace() / nWidthRelation;
nTextOffset = rFmt.GetCharTextDistance() / nWidthRelation;
nNumberXPos = nXStart;
- USHORT nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation;
+ sal_uInt16 nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation;
if(nFirstLineOffset <= nNumberXPos)
nNumberXPos = nNumberXPos - nFirstLineOffset;
@@ -1168,12 +1168,12 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
}
else
{
- nNumberXPos = static_cast<USHORT>(nTmpNumberXPos);
+ nNumberXPos = static_cast<sal_uInt16>(nTmpNumberXPos);
}
}
// <--
- USHORT nBulletWidth = 0;
+ sal_uInt16 nBulletWidth = 0;
if( SVX_NUM_BITMAP == rFmt.GetNumberingType() )
{
nBulletWidth = lcl_DrawGraphic(pVDev, rFmt,
@@ -1193,7 +1193,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
String aText(pActNum->MakeNumString( aNumVector ));
// <--
pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
- nBulletWidth = (USHORT)pVDev->GetTextWidth(aText);
+ nBulletWidth = (sal_uInt16)pVDev->GetTextWidth(aText);
nPreNum++;
}
// --> OD 2008-02-01 #newlistlevelattrs#
@@ -1203,12 +1203,12 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
pVDev->SetFont(aStdFont);
String aText(' ');
pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
- nBulletWidth = nBulletWidth + (USHORT)pVDev->GetTextWidth(aText);
+ nBulletWidth = nBulletWidth + (sal_uInt16)pVDev->GetTextWidth(aText);
}
// <--
// --> OD 2008-02-01 #newlistlevelattrs#
- USHORT nTextXPos( 0 );
+ sal_uInt16 nTextXPos( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nTextXPos = nXStart;
@@ -1223,7 +1223,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
{
case SvxNumberFormat::LISTTAB:
{
- nTextXPos = static_cast<USHORT>(
+ nTextXPos = static_cast<sal_uInt16>(
rFmt.GetListtabPos() / nWidthRelation );
if ( nTextXPos < nNumberXPos + nBulletWidth )
{
@@ -1239,7 +1239,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
break;
}
- nXStart = static_cast<USHORT>( rFmt.GetIndentAt() / nWidthRelation );
+ nXStart = static_cast<sal_uInt16>( rFmt.GetIndentAt() / nWidthRelation );
}
// <--
@@ -1256,14 +1256,14 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
else
{
SwNumberTree::tNumberVector aNumVector;
- USHORT nLineHeight = nFontHeight * 3 / 2;
- for( BYTE nLevel = 0; nLevel < MAXLEVEL;
+ sal_uInt16 nLineHeight = nFontHeight * 3 / 2;
+ for( sal_uInt8 nLevel = 0; nLevel < MAXLEVEL;
++nLevel, nYStart = nYStart + nYStep )
{
const SwNumFmt &rFmt = pActNum->Get(nLevel);
aNumVector.push_back(rFmt.GetStart());
// --> OD 2008-02-01 #newlistlevelattrs#
- USHORT nXStart( 0 );
+ sal_uInt16 nXStart( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nXStart = rFmt.GetAbsLSpace() / nWidthRelation;
@@ -1279,13 +1279,13 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
}
else
{
- nXStart = static_cast<USHORT>(nTmpXStart);
+ nXStart = static_cast<sal_uInt16>(nTmpXStart);
}
}
nXStart /= 2;
nXStart += 2;
// <--
- USHORT nTextOffset = 2 * nXStep;
+ sal_uInt16 nTextOffset = 2 * nXStep;
if( SVX_NUM_BITMAP == rFmt.GetNumberingType() )
{
lcl_DrawGraphic(pVDev, rFmt, nXStart, nYStart, nWidthRelation);
@@ -1305,7 +1305,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
String aText(pActNum->MakeNumString( aNumVector ));
// <--
pVDev->DrawText( Point(nXStart, nYStart), aText );
- nTextOffset = (USHORT)pVDev->GetTextWidth(aText);
+ nTextOffset = (sal_uInt16)pVDev->GetTextWidth(aText);
nTextOffset = nTextOffset + nXStep;
nPreNum++;
}
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 9d940b33d332..facd2cb583ef 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -70,7 +70,7 @@
Beschreibung: vordefinierte Linien in Point
--------------------------------------------------------------------*/
-static const USHORT __FAR_DATA nLines[] = {
+static const sal_uInt16 __FAR_DATA nLines[] = {
0,
50,
100,
@@ -79,9 +79,9 @@ static const USHORT __FAR_DATA nLines[] = {
500
};
-static const USHORT nLineCount = sizeof(nLines) / sizeof(nLines[0]);
+static const sal_uInt16 nLineCount = sizeof(nLines) / sizeof(nLines[0]);
-static USHORT __FAR_DATA aPageRg[] = {
+static sal_uInt16 __FAR_DATA aPageRg[] = {
FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO,
0
};
@@ -93,13 +93,13 @@ static USHORT __FAR_DATA aPageRg[] = {
------------------------------------------------------------------------*/
-BOOL lcl_HasLineWidth(USHORT nWidth)
+sal_Bool lcl_HasLineWidth(sal_uInt16 nWidth)
{
- for(USHORT i = 0; i < nLineCount; ++i) {
+ for(sal_uInt16 i = 0; i < nLineCount; ++i) {
if(nLines[i] == nWidth)
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
@@ -111,7 +111,7 @@ BOOL lcl_HasLineWidth(USHORT nWidth)
IMPL_LINK_INLINE_START( SwFootNotePage, HeightPage, Button *, EMPTYARG )
{
- aMaxHeightEdit.Enable(FALSE);
+ aMaxHeightEdit.Enable(sal_False);
return 0;
}
IMPL_LINK_INLINE_END( SwFootNotePage, HeightPage, Button *, EMPTYARG )
@@ -177,7 +177,7 @@ SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) :
FreeResource();
SetExchangeSupport();
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric( aMaxHeightEdit, aMetric );
SetMetric( aDistEdit, aMetric );
SetMetric( aLineDistEdit, aMetric );
@@ -225,12 +225,12 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
if(lHeight)
{
aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(lHeight),FUNIT_TWIP);
- aMaxHeightBtn.Check(TRUE);
+ aMaxHeightBtn.Check(sal_True);
}
else
{
- aMaxHeightPageBtn.Check(TRUE);
- aMaxHeightEdit.Enable(FALSE);
+ aMaxHeightPageBtn.Check(sal_True);
+ aMaxHeightEdit.Enable(sal_False);
}
aMaxHeightPageBtn.SetClickHdl(LINK(this,SwFootNotePage,HeightPage));
aMaxHeightBtn.SetClickHdl(LINK(this,SwFootNotePage,HeightMetric));
@@ -240,16 +240,16 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
aLineDistEdit.SetLoseFocusHdl( aLk );
// Trennlinie
- for(USHORT i = 0; i < nLineCount; ++i)
+ for(sal_uInt16 i = 0; i < nLineCount; ++i)
aLineTypeBox.InsertEntry(nLines[i]);
- const USHORT nWidth = (USHORT)pFtnInfo->GetLineWidth() * TWIP_TO_LBOX;
+ const sal_uInt16 nWidth = (sal_uInt16)pFtnInfo->GetLineWidth() * TWIP_TO_LBOX;
if ( !lcl_HasLineWidth(nWidth) )
aLineTypeBox.InsertEntry(nWidth);
aLineTypeBox.SelectEntry(nWidth);
// Position
- aLinePosBox.SelectEntryPos( static_cast< USHORT >(pFtnInfo->GetAdj()) );
+ aLinePosBox.SelectEntryPos( static_cast< sal_uInt16 >(pFtnInfo->GetAdj()) );
// Breite
Fraction aTmp( 100, 1 );
@@ -269,7 +269,7 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
--------------------------------------------------------------------*/
-BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwFootNotePage::FillItemSet(SfxItemSet &rSet)
{
SwPageFtnInfoItem aItem((const SwPageFtnInfoItem&)GetItemSet().Get(FN_PARAM_FTN_INFO));
@@ -290,7 +290,7 @@ BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet)
aLineDistEdit.Denormalize(aLineDistEdit.GetValue(FUNIT_TWIP))));
// Trennlinie
- const USHORT nPos = aLineTypeBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aLineTypeBox.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND != nPos )
rFtnInfo.SetLineWidth(nLines[nPos] / TWIP_TO_LBOX);
@@ -305,7 +305,7 @@ BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet)
aItem != *pOldItem )
rSet.Put(aItem);
- return TRUE;
+ return sal_True;
}
void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
@@ -314,7 +314,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
lMaxHeight = rSize.GetSize().Height();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), sal_False, &pItem ) )
{
const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rHeaderOn =
@@ -329,7 +329,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
}
if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_FOOTERSET),
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rFooterOn =
@@ -343,7 +343,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
}
}
- if ( rSet.GetItemState( RES_UL_SPACE , FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( RES_UL_SPACE , sal_False ) == SFX_ITEM_SET )
{
const SvxULSpaceItem &rUL = (const SvxULSpaceItem&)rSet.Get( RES_UL_SPACE );
lMaxHeight -= rUL.GetUpper() + rUL.GetLower();
@@ -361,10 +361,10 @@ int SwFootNotePage::DeactivatePage( SfxItemSet* _pSet)
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
-USHORT* SwFootNotePage::GetRanges()
+sal_uInt16* SwFootNotePage::GetRanges()
{
return aPageRg;
}
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index a6e20cc56dc3..90d600301a56 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -149,14 +149,14 @@ SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) :
XColorTable* pColorTbl = XColorTable::GetStdColorTable();
aColorLB.InsertAutomaticEntry();
- for( USHORT i = 0; i < pColorTbl->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pColorTbl->Count(); ++i )
{
XColorEntry* pEntry = pColorTbl->GetColor( i );
Color aColor = pEntry->GetColor();
String sName = pEntry->GetName();
aColorLB.InsertEntry( aColor, sName );
}
- aColorLB.SetUpdateMode( TRUE );
+ aColorLB.SetUpdateMode( sal_True );
//Get the default paper mode
SwView *pView = ::GetActiveView();
if( pView )
@@ -202,9 +202,9 @@ SfxTabPage *SwTextGridPage::Create(Window *pParent, const SfxItemSet &rSet)
/*-- 06.02.2002 15:25:40---------------------------------------------------
-----------------------------------------------------------------------*/
-BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwTextGridPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if(aNoGridRB.GetSavedValue() != aNoGridRB.IsChecked()||
aLinesGridRB.GetSavedValue() != aLinesGridRB.IsChecked()||
aLinesPerPageNF.GetSavedValue().ToInt32()
@@ -221,7 +221,7 @@ BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet)
aColorLB.GetSavedValue() != aColorLB.GetSelectEntryPos())
{
PutGridItem(rSet);
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -231,7 +231,7 @@ BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet)
-----------------------------------------------------------------------*/
void SwTextGridPage::Reset(const SfxItemSet &rSet)
{
- if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, TRUE))
+ if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, sal_True))
{
const SwTextGridItem& rGridItem = (const SwTextGridItem&)rSet.Get(RES_TEXTGRID);
RadioButton* pButton = 0;
@@ -315,7 +315,7 @@ void SwTextGridPage::PutGridItem(SfxItemSet& rSet)
---------------------------------------------------------------------------*/
void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
{
- if( SFX_ITEM_UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, TRUE ))
+ if( SFX_ITEM_UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, sal_True ))
{
const SvxFrameDirectionItem& rDirItem =
(const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR);
@@ -374,9 +374,9 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
/* -----------------------------06.02.2002 15:24------------------------------
---------------------------------------------------------------------------*/
-USHORT* SwTextGridPage::GetRanges()
+sal_uInt16* SwTextGridPage::GetRanges()
{
- static USHORT __FAR_DATA aPageRg[] = {
+ static sal_uInt16 __FAR_DATA aPageRg[] = {
RES_TEXTGRID, RES_TEXTGRID,
0};
return aPageRg;
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index 0101e92a0081..9cb595be6302 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -102,15 +102,15 @@ SV_IMPL_OP_PTRARR_SORT(SwRedlineDataParentSortArr, SwRedlineDataParentPtr)
SV_IMPL_PTRARR(SwRedlineDataChildArr, SwRedlineDataChildPtr)
SV_IMPL_PTRARR(SvLBoxEntryArr, SvLBoxEntryPtr)
-static USHORT nSortMode = 0xffff;
-static BOOL bSortDir = TRUE;
+static sal_uInt16 nSortMode = 0xffff;
+static sal_Bool bSortDir = sal_True;
/*------------------------------------------------------------------------
Beschreibung:
------------------------------------------------------------------------*/
SwRedlineAcceptChild::SwRedlineAcceptChild( Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SwChildWinWrapper( _pParent, nId )
@@ -124,11 +124,11 @@ SwRedlineAcceptChild::SwRedlineAcceptChild( Window* _pParent,
Beschreibung: Nach Dok-Wechsel Dialog neu initialisieren
--------------------------------------------------------------------*/
-BOOL SwRedlineAcceptChild::ReInitDlg(SwDocShell *pDocSh)
+sal_Bool SwRedlineAcceptChild::ReInitDlg(SwDocShell *pDocSh)
{
- BOOL bRet;
+ sal_Bool bRet;
- if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == TRUE) // Sofort aktualisieren, Dok-Wechsel
+ if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == sal_True) // Sofort aktualisieren, Dok-Wechsel
((SwModelessRedlineAcceptDlg*)GetWindow())->Activate();
return bRet;
@@ -164,13 +164,13 @@ void SwModelessRedlineAcceptDlg::Activate()
if (pChildWin->GetOldDocShell() != pDocSh)
{ // Dok-Wechsel
- SwWait aWait( *pDocSh, FALSE );
+ SwWait aWait( *pDocSh, sal_False );
SwWrtShell* pSh = pView->GetWrtShellPtr();
pChildWin->SetOldDocShell(pDocSh); // Rekursion vermeiden (durch Modified-Hdl)
- BOOL bMod = pSh->IsModified();
- SfxBoolItem aShow(FN_REDLINE_SHOW, TRUE);
+ sal_Bool bMod = pSh->IsModified();
+ SfxBoolItem aShow(FN_REDLINE_SHOW, sal_True);
pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(
FN_REDLINE_SHOW, SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, &aShow, 0L);
if (!bMod)
@@ -229,7 +229,7 @@ SwModelessRedlineAcceptDlg::~SwModelessRedlineAcceptDlg()
Beschreibung:
------------------------------------------------------------------------*/
-SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) :
+SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt) :
pParentDlg (pParent),
aTabPagesCTRL (pParent, SW_RES(CTRL_TABPAGES)),
aPopup (SW_RES(MN_REDLINE_POPUP)),
@@ -239,8 +239,8 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) :
sTableChgd (SW_RES(STR_REDLINE_TABLECHG)),
sFmtCollSet (SW_RES(STR_REDLINE_FMTCOLLSET)),
sAutoFormat (SW_RES(STR_REDLINE_AUTOFMT)),
- bOnlyFormatedRedlines( FALSE ),
- bHasReadonlySel ( FALSE ),
+ bOnlyFormatedRedlines( sal_False ),
+ bHasReadonlySel ( sal_False ),
bRedlnAutoFmt (bAutoFmt),
bInhibitActivate( false )
{
@@ -267,7 +267,7 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) :
{
pActLB->InsertEntry(sFmtCollSet);
pActLB->InsertEntry(sAutoFormat);
- pTPView->ShowUndo(TRUE);
+ pTPView->ShowUndo(sal_True);
pTPView->DisableUndo(); // Noch gibts keine UNDO-Events
}
@@ -327,11 +327,11 @@ SwRedlineAcceptDlg::~SwRedlineAcceptDlg()
Beschreibung:
------------------------------------------------------------------------*/
-void SwRedlineAcceptDlg::Init(USHORT nStart)
+void SwRedlineAcceptDlg::Init(sal_uInt16 nStart)
{
- SwWait aWait( *::GetActiveView()->GetDocShell(), FALSE );
- pTable->SetUpdateMode(FALSE);
- aUsedSeqNo.Remove((USHORT)0, aUsedSeqNo.Count());
+ SwWait aWait( *::GetActiveView()->GetDocShell(), sal_False );
+ pTable->SetUpdateMode(sal_False);
+ aUsedSeqNo.Remove((sal_uInt16)0, aUsedSeqNo.Count());
if (nStart)
RemoveParents(nStart, aRedlineParents.Count() - 1);
@@ -346,7 +346,7 @@ void SwRedlineAcceptDlg::Init(USHORT nStart)
InsertParents(nStart);
InitAuthors();
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
// #i69618# this moves the list box to the right position, visually
SvLBoxEntry* pSelEntry = pTable->FirstSelected();
if( pSelEntry )
@@ -369,12 +369,12 @@ void SwRedlineAcceptDlg::InitAuthors()
pFilterPage->ClearAuthors();
String sParent;
- USHORT nCount = pSh->GetRedlineCount();
+ sal_uInt16 nCount = pSh->GetRedlineCount();
- bOnlyFormatedRedlines = TRUE;
- bHasReadonlySel = FALSE;
- BOOL bIsNotFormated = FALSE;
- USHORT i;
+ bOnlyFormatedRedlines = sal_True;
+ bHasReadonlySel = sal_False;
+ sal_Bool bIsNotFormated = sal_False;
+ sal_uInt16 i;
// Autoren ermitteln
for ( i = 0; i < nCount; i++)
@@ -382,17 +382,17 @@ void SwRedlineAcceptDlg::InitAuthors()
const SwRedline& rRedln = pSh->GetRedline(i);
if( bOnlyFormatedRedlines && nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType() )
- bOnlyFormatedRedlines = FALSE;
+ bOnlyFormatedRedlines = sal_False;
//JP 27.9.2001: make no sense if we handle readonly sections
// if( !bHasReadonlySel && rRedln.HasReadonlySel() )
-// bHasReadonlySel = TRUE;
+// bHasReadonlySel = sal_True;
String *pAuthor = new String(rRedln.GetAuthorString());
if (!aStrings.Insert(pAuthor))
delete pAuthor;
- for (USHORT nStack = 1; nStack < rRedln.GetStackCount(); nStack++)
+ for (sal_uInt16 nStack = 1; nStack < rRedln.GetStackCount(); nStack++)
{
pAuthor = new String(rRedln.GetAuthorString(nStack));
if (!aStrings.Insert(pAuthor))
@@ -406,13 +406,13 @@ void SwRedlineAcceptDlg::InitAuthors()
if (pFilterPage->SelectAuthor(sOldAuthor) == LISTBOX_ENTRY_NOTFOUND && aStrings.Count())
pFilterPage->SelectAuthor(*aStrings[0]);
- BOOL bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
- BOOL bSel = pTable->FirstSelected() != 0;
+ sal_Bool bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
+ sal_Bool bSel = pTable->FirstSelected() != 0;
SvLBoxEntry* pSelEntry = pTable->FirstSelected();
while (pSelEntry)
{
- USHORT nPos = GetRedlinePos(*pSelEntry);
+ sal_uInt16 nPos = GetRedlinePos(*pSelEntry);
const SwRedline& rRedln = pSh->GetRedline( nPos );
bIsNotFormated |= nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType();
@@ -431,7 +431,7 @@ void SwRedlineAcceptDlg::InitAuthors()
------------------------------------------------------------------------*/
String SwRedlineAcceptDlg::GetRedlineText( const SwRedline& rRedln,
- DateTime &rDateTime, USHORT nStack)
+ DateTime &rDateTime, sal_uInt16 nStack)
{
String sEntry(GetActionText(rRedln, nStack));
sEntry += '\t';
@@ -453,7 +453,7 @@ String SwRedlineAcceptDlg::GetRedlineText( const SwRedline& rRedln,
Beschreibung:
------------------------------------------------------------------------*/
-const String &SwRedlineAcceptDlg::GetActionText(const SwRedline& rRedln, USHORT nStack)
+const String &SwRedlineAcceptDlg::GetActionText(const SwRedline& rRedln, sal_uInt16 nStack)
{
switch( rRedln.GetType(nStack) )
{
@@ -495,9 +495,9 @@ void SwRedlineAcceptDlg::Activate()
return;
SwView *pView = ::GetActiveView();
- SwWait aWait( *pView->GetDocShell(), FALSE );
+ SwWait aWait( *pView->GetDocShell(), sal_False );
- aUsedSeqNo.Remove((USHORT)0, aUsedSeqNo.Count());
+ aUsedSeqNo.Remove((sal_uInt16)0, aUsedSeqNo.Count());
if (!pView) // Kann passieren, wenn man auf eine andere App umschaltet, wenn
return; // vorher eine Listbox im Dialog den Focus hatte (eigentlich THs Bug)
@@ -510,11 +510,11 @@ void SwRedlineAcceptDlg::Activate()
// Hat sich was geaendert?
SwWrtShell* pSh = pView->GetWrtShellPtr();
- USHORT nCount = pSh->GetRedlineCount();
+ sal_uInt16 nCount = pSh->GetRedlineCount();
// Anzahl und Pointer ueberpruefen
SwRedlineDataParent *pParent = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < nCount; i++)
{
@@ -531,7 +531,7 @@ void SwRedlineAcceptDlg::Activate()
if (&rRedln.GetRedlineData() != pParent->pData)
{
// Redline-Parents wurden eingefuegt, geaendert oder geloescht
- if ((i = CalcDiff(i, FALSE)) == USHRT_MAX)
+ if ((i = CalcDiff(i, sal_False)) == USHRT_MAX)
return;
continue;
}
@@ -542,7 +542,7 @@ void SwRedlineAcceptDlg::Activate()
if (!pRedlineData && pBackupData)
{
// Redline-Childs wurden geloescht
- if ((i = CalcDiff(i, TRUE)) == USHRT_MAX)
+ if ((i = CalcDiff(i, sal_True)) == USHRT_MAX)
return;
continue;
}
@@ -553,7 +553,7 @@ void SwRedlineAcceptDlg::Activate()
if (pRedlineData != pBackupData->pChild)
{
// Redline-Childs wurden eingefuegt, geaendert oder geloescht
- if ((i = CalcDiff(i, TRUE)) == USHRT_MAX)
+ if ((i = CalcDiff(i, sal_True)) == USHRT_MAX)
return;
continue;
}
@@ -597,7 +597,7 @@ void SwRedlineAcceptDlg::Activate()
*
* --------------------------------------------------*/
-USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild)
+sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, sal_Bool bChild)
{
if (!nStart)
{
@@ -605,10 +605,10 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild)
return USHRT_MAX;
}
- pTable->SetUpdateMode(FALSE);
+ pTable->SetUpdateMode(sal_False);
SwView *pView = ::GetActiveView();
SwWrtShell* pSh = pView->GetWrtShellPtr();
- USHORT nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
+ sal_uInt16 nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
SwRedlineDataParent *pParent = aRedlineParents[nStart];
const SwRedline& rRedln = pSh->GetRedline(nStart);
@@ -632,26 +632,26 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild)
// Neue Childs einfuegen
InsertChilds(pParent, rRedln, nAutoFmt);
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
return nStart;
}
// Wurden Eintraege geloescht?
const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
- USHORT i;
+ sal_uInt16 i;
for ( i = nStart + 1; i < aRedlineParents.Count(); i++)
{
if (aRedlineParents[i]->pData == pRedlineData)
{
// Eintraege von nStart bis i-1 entfernen
RemoveParents(nStart, i - 1);
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
return nStart - 1;
}
}
// Wurden Eintraege eingefuegt?
- USHORT nCount = pSh->GetRedlineCount();
+ sal_uInt16 nCount = pSh->GetRedlineCount();
pRedlineData = aRedlineParents[nStart]->pData;
for (i = nStart + 1; i < nCount; i++)
@@ -660,12 +660,12 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild)
{
// Eintraege von nStart bis i-1 einfuegen
InsertParents(nStart, i - 1);
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
return nStart - 1;
}
}
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
Init(nStart); // Alle Eintraege bis zum Ende abgleichen
return USHRT_MAX;
}
@@ -674,19 +674,19 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild)
*
* --------------------------------------------------*/
-void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const USHORT nAutoFmt)
+void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const sal_uInt16 nAutoFmt)
{
String sChild;
SwRedlineDataChild *pLastRedlineChild = 0;
const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
- BOOL bAutoFmt = (rRedln.GetRealType() & nAutoFmt) != 0;
+ sal_Bool bAutoFmt = (rRedln.GetRealType() & nAutoFmt) != 0;
const String *pAction = &GetActionText(rRedln);
- BOOL bValidParent = !sFilterAction.Len() || sFilterAction == *pAction;
+ sal_Bool bValidParent = !sFilterAction.Len() || sFilterAction == *pAction;
bValidParent = bValidParent && pTable->IsValidEntry(&rRedln.GetAuthorString(), &rRedln.GetTimeStamp(), &rRedln.GetComment());
if (nAutoFmt)
{
- USHORT nPos;
+ sal_uInt16 nPos;
if (pParent->pData->GetSeqNo() && !aUsedSeqNo.Insert(pParent, nPos)) // Gibts schon
{
@@ -700,9 +700,9 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl
}
bValidParent = bValidParent && bAutoFmt;
}
- BOOL bValidTree = bValidParent;
+ sal_Bool bValidTree = bValidParent;
- for (USHORT nStack = 1; nStack < rRedln.GetStackCount(); nStack++)
+ for (sal_uInt16 nStack = 1; nStack < rRedln.GetStackCount(); nStack++)
{
pRedlineData = pRedlineData->Next();
@@ -716,7 +716,7 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl
pParent->pNext = pRedlineChild;
pAction = &GetActionText(rRedln, nStack);
- BOOL bValidChild = !sFilterAction.Len() || sFilterAction == *pAction;
+ sal_Bool bValidChild = !sFilterAction.Len() || sFilterAction == *pAction;
bValidChild = bValidChild && pTable->IsValidEntry(&rRedln.GetAuthorString(nStack), &rRedln.GetTimeStamp(nStack), &rRedln.GetComment());
if (nAutoFmt)
bValidChild = bValidChild && bAutoFmt;
@@ -726,7 +726,7 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl
{
RedlinData *pData = new RedlinData;
pData->pData = pRedlineChild;
- pData->bDisabled = TRUE;
+ pData->bDisabled = sal_True;
sChild = GetRedlineText(rRedln, pData->aDateTime, nStack);
SvLBoxEntry* pChild = pTable->InsertEntry(sChild, pData, pParent->pTLBParent);
@@ -757,22 +757,22 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl
*
* --------------------------------------------------*/
-void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd)
+void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
- USHORT nCount = pSh->GetRedlineCount();
+ sal_uInt16 nCount = pSh->GetRedlineCount();
SvLBoxEntryArr aLBoxArr;
// Wegen Bug der TLB, die bei Remove den SelectHandler IMMER ruft:
pTable->SetSelectHdl(aOldSelectHdl);
pTable->SetDeselectHdl(aOldDeselectHdl);
- BOOL bChildsRemoved = FALSE;
- pTable->SelectAll(FALSE);
+ sal_Bool bChildsRemoved = sal_False;
+ pTable->SelectAll(sal_False);
// Hinter dem letzten Eintrag Cursor setzen, da sonst Performance-Problem in TLB.
// TLB wuerde sonst bei jedem Remove den Cursor erneut umsetzen (teuer)
- USHORT nPos = Min((USHORT)nCount, (USHORT)aRedlineParents.Count());
+ sal_uInt16 nPos = Min((sal_uInt16)nCount, (sal_uInt16)aRedlineParents.Count());
SvLBoxEntry *pCurEntry = NULL;
while( ( pCurEntry == NULL ) && ( nPos > 0 ) )
{
@@ -785,16 +785,16 @@ void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd)
SvLBoxTreeList* pModel = pTable->GetModel();
- for (USHORT i = nStart; i <= nEnd; i++)
+ for (sal_uInt16 i = nStart; i <= nEnd; i++)
{
if (!bChildsRemoved && aRedlineParents[i]->pNext)
{
SwRedlineDataChildPtr pChildPtr = (SwRedlineDataChildPtr)aRedlineParents[i]->pNext;
- USHORT nChildPos = aRedlineChilds.GetPos(pChildPtr);
+ sal_uInt16 nChildPos = aRedlineChilds.GetPos(pChildPtr);
if (nChildPos != USHRT_MAX)
{
- USHORT nChilds = 0;
+ sal_uInt16 nChilds = 0;
while (pChildPtr)
{
@@ -803,30 +803,30 @@ void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd)
}
aRedlineChilds.DeleteAndDestroy(nChildPos, nChilds);
- bChildsRemoved = TRUE;
+ bChildsRemoved = sal_True;
}
}
SvLBoxEntry *pEntry = aRedlineParents[i]->pTLBParent;
if (pEntry)
{
long nIdx = aLBoxArr.Count() - 1L;
- ULONG nAbsPos = pModel->GetAbsPos(pEntry);
+ sal_uLong nAbsPos = pModel->GetAbsPos(pEntry);
while (nIdx >= 0 &&
- pModel->GetAbsPos(aLBoxArr[ static_cast< USHORT >(nIdx) ]) > nAbsPos)
+ pModel->GetAbsPos(aLBoxArr[ static_cast< sal_uInt16 >(nIdx) ]) > nAbsPos)
nIdx--;
- aLBoxArr.Insert( pEntry, static_cast< USHORT >(++nIdx) );
+ aLBoxArr.Insert( pEntry, static_cast< sal_uInt16 >(++nIdx) );
}
}
// TLB von hinten abraeumen
long nIdx = (long)aLBoxArr.Count() - 1L;
while (nIdx >= 0)
- pTable->RemoveEntry(aLBoxArr[ static_cast< USHORT >(nIdx--) ]);
+ pTable->RemoveEntry(aLBoxArr[ static_cast< sal_uInt16 >(nIdx--) ]);
pTable->SetSelectHdl(LINK(this, SwRedlineAcceptDlg, SelectHdl));
pTable->SetDeselectHdl(LINK(this, SwRedlineAcceptDlg, DeselectHdl));
// Durch Remove wurde leider wieder dauernd von der TLB selektiert...
- pTable->SelectAll(FALSE);
+ pTable->SelectAll(sal_False);
aRedlineParents.DeleteAndDestroy( nStart, nEnd - nStart + 1);
}
@@ -835,15 +835,15 @@ void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd)
*
* --------------------------------------------------*/
-void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd)
+void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
{
SwView *pView = ::GetActiveView();
SwWrtShell* pSh = pView->GetWrtShellPtr();
- USHORT nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
+ sal_uInt16 nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
String sParent;
- USHORT nCount = pSh->GetRedlineCount();
- nEnd = Min((USHORT)nEnd, (USHORT)(nCount - 1)); // Handelt auch nEnd=USHRT_MAX (bis zum Ende) ab
+ sal_uInt16 nCount = pSh->GetRedlineCount();
+ nEnd = Min((sal_uInt16)nEnd, (sal_uInt16)(nCount - 1)); // Handelt auch nEnd=USHRT_MAX (bis zum Ende) ab
if (nEnd == USHRT_MAX)
return; // Keine Redlines im Dokument
@@ -860,13 +860,13 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd)
pSh->SwCrsrShell::Push();
if( 0 == (pCurrRedline = pSh->SelNextRedline()))
pCurrRedline = pSh->SelPrevRedline();
- pSh->SwCrsrShell::Pop( FALSE );
+ pSh->SwCrsrShell::Pop( sal_False );
}
}
else
pCurrRedline = 0;
- for (USHORT i = nStart; i <= nEnd; i++)
+ for (sal_uInt16 i = nStart; i <= nEnd; i++)
{
const SwRedline& rRedln = pSh->GetRedline(i);
const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
@@ -881,7 +881,7 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd)
pData = new RedlinData;
pData->pData = pRedlineParent;
- pData->bDisabled = FALSE;
+ pData->bDisabled = sal_False;
sParent = GetRedlineText(rRedln, pData->aDateTime);
pParent = pTable->InsertEntry(sParent, pData, 0, i);
@@ -902,11 +902,11 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd)
*
* --------------------------------------------------*/
-void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept )
+void SwRedlineAcceptDlg::CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept )
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
SvLBoxEntry* pEntry = bSelect ? pTable->FirstSelected() : pTable->First();
- ULONG nPos = LONG_MAX;
+ sal_uLong nPos = LONG_MAX;
typedef std::vector<SvLBoxEntry*> ListBoxEntries_t;
ListBoxEntries_t aRedlines;
@@ -933,11 +933,11 @@ void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept )
pEntry = bSelect ? pTable->NextSelected(pEntry) : pTable->Next(pEntry);
}
- BOOL (SwEditShell:: *FnAccRej)( USHORT ) = &SwEditShell::AcceptRedline;
+ sal_Bool (SwEditShell:: *FnAccRej)( sal_uInt16 ) = &SwEditShell::AcceptRedline;
if( !bAccept )
FnAccRej = &SwEditShell::RejectRedline;
- SwWait aWait( *pSh->GetView().GetDocShell(), TRUE );
+ SwWait aWait( *pSh->GetView().GetDocShell(), sal_True );
pSh->StartAction();
// #111827#
@@ -968,7 +968,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept )
aIter != aEnd;
aIter++ )
{
- USHORT nPosition = GetRedlinePos( **aIter );
+ sal_uInt16 nPosition = GetRedlinePos( **aIter );
if( nPosition != USHRT_MAX )
(pSh->*FnAccRej)( nPosition );
}
@@ -1003,7 +1003,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept )
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const
+sal_uInt16 SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
return pSh->FindRedlineOfData( *((SwRedlineDataParent*)((RedlinData *)
@@ -1016,7 +1016,7 @@ USHORT SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const
IMPL_LINK( SwRedlineAcceptDlg, AcceptHdl, void*, EMPTYARG)
{
- CallAcceptReject( TRUE, TRUE );
+ CallAcceptReject( sal_True, sal_True );
return 0;
}
@@ -1026,7 +1026,7 @@ IMPL_LINK( SwRedlineAcceptDlg, AcceptHdl, void*, EMPTYARG)
IMPL_LINK( SwRedlineAcceptDlg, AcceptAllHdl, void*, EMPTYARG )
{
- CallAcceptReject( FALSE, TRUE );
+ CallAcceptReject( sal_False, sal_True );
return 0;
}
@@ -1036,7 +1036,7 @@ IMPL_LINK( SwRedlineAcceptDlg, AcceptAllHdl, void*, EMPTYARG )
IMPL_LINK( SwRedlineAcceptDlg, RejectHdl, void*, EMPTYARG )
{
- CallAcceptReject( TRUE, FALSE );
+ CallAcceptReject( sal_True, sal_False );
return 0;
}
@@ -1046,7 +1046,7 @@ IMPL_LINK( SwRedlineAcceptDlg, RejectHdl, void*, EMPTYARG )
IMPL_LINK( SwRedlineAcceptDlg, RejectAllHdl, void*, EMPTYARG )
{
- CallAcceptReject( FALSE, FALSE );
+ CallAcceptReject( sal_False, sal_False );
return 0;
}
@@ -1117,9 +1117,9 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
aSelectTimer.Stop();
- BOOL bIsNotFormated = FALSE;
- BOOL bSel = FALSE;
-// BOOL bReadonlySel = FALSE;
+ sal_Bool bIsNotFormated = sal_False;
+ sal_Bool bSel = sal_False;
+// sal_Bool bReadonlySel = sal_False;
//#98883# don't select redlines while the dialog is not focussed
//#107938# But not only ask pTable if it has the focus. To move
@@ -1150,10 +1150,10 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
}
}
else
- bSel = TRUE;
+ bSel = sal_True;
// #98864# find the selected redline (ignore, if the redline is already gone)
- USHORT nPos = GetRedlinePos(*pActEntry);
+ sal_uInt16 nPos = GetRedlinePos(*pActEntry);
if( nPos != USHRT_MAX )
{
@@ -1162,9 +1162,9 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
//JP 27.9.2001: make no sense if we handle readonly sections
// if( !bReadonlySel && rRedln.HasReadonlySel() )
-// bReadonlySel = TRUE;
+// bReadonlySel = sal_True;
- if (pSh->GotoRedline(nPos, TRUE))
+ if (pSh->GotoRedline(nPos, sal_True))
{
pSh->SetInSelect();
pSh->EnterAddMode();
@@ -1178,7 +1178,7 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
pSh->EndAction();
pSh->SetCareWin(NULL);
}
- BOOL bEnable = !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
+ sal_Bool bEnable = !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
pTPView->EnableAccept( bEnable && bSel /*&& !bReadonlySel*/ );
pTPView->EnableReject( bEnable && bSel && bIsNotFormated /*&& !bReadonlySel*/ );
pTPView->EnableRejectAll( bEnable && !bOnlyFormatedRedlines && !bHasReadonlySel );
@@ -1209,10 +1209,10 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
if (pTable->GetParent(pEntry))
pTopEntry = pTable->GetParent(pEntry);
- USHORT nPos = GetRedlinePos(*pTopEntry);
+ sal_uInt16 nPos = GetRedlinePos(*pTopEntry);
// Bei geschuetzten Bereichen kommentieren disablen
- if ((pRed = pSh->GotoRedline(nPos, TRUE)) != 0)
+ if ((pRed = pSh->GotoRedline(nPos, sal_True)) != 0)
{
if( pSh->IsCrsrPtAtEnd() )
pSh->SwapPam();
@@ -1228,20 +1228,20 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
);
aPopup.EnableItem( MN_SUB_SORT, pTable->First() != 0 );
- USHORT nColumn = pTable->GetSortedCol();
+ sal_uInt16 nColumn = pTable->GetSortedCol();
if (nColumn == 0xffff)
nColumn = 4;
PopupMenu *pSubMenu = aPopup.GetPopupMenu(MN_SUB_SORT);
if (pSubMenu)
{
- for (USHORT i = MN_SORT_ACTION; i < MN_SORT_ACTION + 5; i++)
- pSubMenu->CheckItem(i, FALSE);
+ for (sal_uInt16 i = MN_SORT_ACTION; i < MN_SORT_ACTION + 5; i++)
+ pSubMenu->CheckItem(i, sal_False);
pSubMenu->CheckItem(nColumn + MN_SORT_ACTION);
}
- USHORT nRet = aPopup.Execute(pTable, aCEvt.GetMousePosPixel());
+ sal_uInt16 nRet = aPopup.Execute(pTable, aCEvt.GetMousePosPixel());
switch( nRet )
{
@@ -1253,7 +1253,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
if (pTable->GetParent(pEntry))
pEntry = pTable->GetParent(pEntry);
- USHORT nPos = GetRedlinePos(*pEntry);
+ sal_uInt16 nPos = GetRedlinePos(*pEntry);
const SwRedline &rRedline = pSh->GetRedline(nPos);
@@ -1278,12 +1278,12 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
rRedline.GetRedlineData().GetTimeStamp() ),
SID_ATTR_POSTIT_DATE ));
- AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, FALSE );
+ AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, sal_False );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
pDlg->HideAuthor();
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch( rRedline.GetType() )
{
case nsRedlineType_t::REDLINE_INSERT:
@@ -1331,7 +1331,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
case MN_SORT_COMMENT:
case MN_SORT_POSITION:
{
- bSortDir = TRUE;
+ bSortDir = sal_True;
if (nRet - MN_SORT_ACTION == 4 && pTable->GetSortedCol() == 0xffff)
break; // Haben wir schon
@@ -1342,7 +1342,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
if (pTable->GetSortedCol() == nSortMode)
bSortDir = !pTable->GetSortDirection();
- SwWait aWait( *::GetActiveView()->GetDocShell(), FALSE );
+ SwWait aWait( *::GetActiveView()->GetDocShell(), sal_False );
pTable->SortByCol(nSortMode, bSortDir);
if (nSortMode == 0xffff)
Init(); // Alles neu fuellen
@@ -1364,16 +1364,16 @@ void SwRedlineAcceptDlg::Initialize(const String& rExtraData)
{
if (rExtraData.Len())
{
- USHORT nPos = rExtraData.Search(C2S("AcceptChgDat:"));
+ sal_uInt16 nPos = rExtraData.Search(C2S("AcceptChgDat:"));
// Versuche, den Alignment-String "ALIGN:(...)" einzulesen; wenn
// er nicht vorhanden ist, liegt eine "altere Version vor
if (nPos != STRING_NOTFOUND)
{
- USHORT n1 = rExtraData.Search('(', nPos);
+ sal_uInt16 n1 = rExtraData.Search('(', nPos);
if (n1 != STRING_NOTFOUND)
{
- USHORT n2 = rExtraData.Search(')', n1);
+ sal_uInt16 n2 = rExtraData.Search(')', n1);
if (n2 != STRING_NOTFOUND)
{
// Alignment-String herausschneiden
@@ -1382,11 +1382,11 @@ void SwRedlineAcceptDlg::Initialize(const String& rExtraData)
if (aStr.Len())
{
- USHORT nCount = static_cast< USHORT >(aStr.ToInt32());
+ sal_uInt16 nCount = static_cast< sal_uInt16 >(aStr.ToInt32());
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
- USHORT n3 = aStr.Search(';');
+ sal_uInt16 n3 = aStr.Search(';');
aStr.Erase(0, n3 + 1);
pTable->SetTab(i, aStr.ToInt32(), MAP_PIXEL);
}
@@ -1405,11 +1405,11 @@ void SwRedlineAcceptDlg::FillInfo(String &rExtraData) const
{
rExtraData.AppendAscii("AcceptChgDat:(");
- USHORT nCount = pTable->TabCount();
+ sal_uInt16 nCount = pTable->TabCount();
rExtraData += String::CreateFromInt32(nCount);
rExtraData += ';';
- for(USHORT i = 0; i < nCount; i++)
+ for(sal_uInt16 i = 0; i < nCount; i++)
{
rExtraData += String::CreateFromInt32( pTable->GetTab(i) );
rExtraData += ';';
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index be7622319626..ee879ea8e645 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -60,25 +60,25 @@
SV_IMPL_PTRARR( _FndBoxes, _FndBox* )
SV_IMPL_PTRARR( _FndLines, _FndLine* )
-static BOOL bCheck1 = TRUE;
-static BOOL bCheck2 = FALSE;
-static BOOL bCheck3 = FALSE;
+static sal_Bool bCheck1 = sal_True;
+static sal_Bool bCheck2 = sal_False;
+static sal_Bool bCheck3 = sal_False;
-static USHORT nCol1 = 1;
-static USHORT nCol2 = 1;
-static USHORT nCol3 = 1;
+static sal_uInt16 nCol1 = 1;
+static sal_uInt16 nCol2 = 1;
+static sal_uInt16 nCol3 = 1;
-static USHORT nType1 = 0;
-static USHORT nType2 = 0;
-static USHORT nType3 = 0;
+static sal_uInt16 nType1 = 0;
+static sal_uInt16 nType2 = 0;
+static sal_uInt16 nType3 = 0;
-static USHORT nLang = LANGUAGE_NONE;
+static sal_uInt16 nLang = LANGUAGE_NONE;
-static BOOL bAsc1 = TRUE;
-static BOOL bAsc2 = TRUE;
-static BOOL bAsc3 = TRUE;
-static BOOL bCol = FALSE;
-static BOOL bCsSens= FALSE;
+static sal_Bool bAsc1 = sal_True;
+static sal_Bool bAsc2 = sal_True;
+static sal_Bool bAsc3 = sal_True;
+static sal_Bool bCol = sal_False;
+static sal_Bool bCsSens= sal_False;
static sal_Unicode cDeli = '\t';
@@ -90,7 +90,7 @@ using ::rtl::OUString;
void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox )
{
void* pDel;
- for( USHORT n = 0, nEnd = rLstBox.GetEntryCount(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = rLstBox.GetEntryCount(); n < nEnd; ++n )
if( 0 != ( pDel = rLstBox.GetEntryData( n )) )
delete (String*)pDel;
rLstBox.Clear();
@@ -102,11 +102,11 @@ void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox )
--------------------------------------------------------------------*/
-BOOL lcl_GetSelTbl( SwWrtShell &rSh, USHORT& rX, USHORT& rY )
+sal_Bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY )
{
const SwTableNode* pTblNd = rSh.IsCrsrInTbl();
if( !pTblNd )
- return FALSE;
+ return sal_False;
_FndBox aFndBox( 0, 0 );
@@ -120,10 +120,10 @@ BOOL lcl_GetSelTbl( SwWrtShell &rSh, USHORT& rX, USHORT& rY )
}
rX = aFndBox.GetLines().Count();
if( !rX )
- return FALSE;
+ return sal_False;
rY = aFndBox.GetLines()[0]->GetBoxes().Count();
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -192,14 +192,14 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
aColumnRB.Check(bCol);
aColLbl.SetText(bCol ? aRowTxt : aColTxt);
aRowRB.Check(!bCol);
- aDelimTabRB.Enable(FALSE);
- aDelimFreeRB.Enable(FALSE);
- aDelimEdt.Enable(FALSE);
+ aDelimTabRB.Enable(sal_False);
+ aDelimFreeRB.Enable(sal_False);
+ aDelimEdt.Enable(sal_False);
}
else
{
- aColumnRB.Enable(FALSE);
- aRowRB.Check(TRUE);
+ aColumnRB.Enable(sal_False);
+ aRowRB.Check(sal_True);
aColLbl.SetText(aColTxt);
}
@@ -227,9 +227,9 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
// first initialise the language, then select the
if( LANGUAGE_NONE == nLang || LANGUAGE_DONTKNOW == nLang )
- nLang = (USHORT)GetAppLanguage();
+ nLang = (sal_uInt16)GetAppLanguage();
- aLangLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, TRUE, FALSE);
+ aLangLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, sal_True, sal_False);
aLangLB.SelectLanguage( nLang );
LanguageHdl( 0 );
@@ -248,7 +248,7 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
if(!aDelimTabRB.IsChecked())
{
aDelimEdt.SetText(cDeli);
- aDelimFreeRB.Check(TRUE);
+ aDelimFreeRB.Check(sal_True);
DelimHdl(&aDelimFreeRB);
}
else
@@ -257,7 +257,7 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
FreeResource();
if( ::lcl_GetSelTbl( rSh, nX, nY) )
{
- USHORT nMax = aRowRB.IsChecked()? nY : nX;
+ sal_uInt16 nMax = aRowRB.IsChecked()? nY : nX;
aColEdt1.SetMax(nMax);
aColEdt2.SetMax(nMax);
aColEdt3.SetMax(nMax);
@@ -295,9 +295,9 @@ void SwSortDlg::Apply()
bCheck2 = aKeyCB2.IsChecked();
bCheck3 = aKeyCB3.IsChecked();
- nCol1 = (USHORT)aColEdt1.GetValue();
- nCol2 = (USHORT)aColEdt2.GetValue();
- nCol3 = (USHORT)aColEdt3.GetValue();
+ nCol1 = (sal_uInt16)aColEdt1.GetValue();
+ nCol2 = (sal_uInt16)aColEdt2.GetValue();
+ nCol3 = (sal_uInt16)aColEdt3.GetValue();
nType1 = aTypDLB1.GetSelectEntryPos();
nType2 = aTypDLB2.GetSelectEntryPos();
@@ -361,9 +361,9 @@ void SwSortDlg::Apply()
aOptions.bTable = rSh.IsTableMode();
aOptions.bIgnoreCase = !bCsSens;
- BOOL bRet;
+ sal_Bool bRet;
{
- SwWait aWait( *rSh.GetView().GetDocShell(), TRUE );
+ SwWait aWait( *rSh.GetView().GetDocShell(), sal_True );
rSh.StartAllAction();
if( 0 != (bRet = rSh.Sort( aOptions )))
rSh.SetModified();
@@ -379,7 +379,7 @@ void SwSortDlg::Apply()
* --------------------------------------------------*/
IMPL_LINK( SwSortDlg, DelimHdl, RadioButton*, pButton )
{
- BOOL bEnable = pButton == &aDelimFreeRB && aDelimFreeRB.IsEnabled();
+ sal_Bool bEnable = pButton == &aDelimFreeRB && aDelimFreeRB.IsEnabled();
aDelimEdt.Enable( bEnable );
aDelimPB.Enable( bEnable );
return 0;
@@ -396,7 +396,7 @@ IMPL_LINK( SwSortDlg, DelimCharHdl, PushButton*, EMPTYARG )
rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
if( RET_OK == pMap->Execute() )
{
- SFX_ITEMSET_ARG( pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR, FALSE );
+ SFX_ITEMSET_ARG( pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR, sal_False );
if ( pItem )
aDelimEdt.SetText( sal_Unicode ( pItem->GetValue() ) );
}
@@ -427,7 +427,7 @@ IMPL_LINK( SwSortDlg, CheckHdl, CheckBox *, pCheck )
else if(!aKeyCB1.IsChecked() &&
!aKeyCB2.IsChecked() &&
!aKeyCB3.IsChecked())
- pCheck->Check(TRUE);
+ pCheck->Check(sal_True);
return 0;
}
@@ -440,11 +440,11 @@ IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox )
if( !pColRes )
pColRes = new CollatorRessource();
- const USHORT nLstBoxCnt = 3;
+ const sal_uInt16 nLstBoxCnt = 3;
ListBox* aLstArr[ nLstBoxCnt ] = { &aTypDLB1, &aTypDLB2, &aTypDLB3 };
- USHORT* aTypeArr[ nLstBoxCnt ] = { &nType1, &nType2, &nType3 };
+ sal_uInt16* aTypeArr[ nLstBoxCnt ] = { &nType1, &nType2, &nType3 };
String aOldStrArr[ nLstBoxCnt ];
- USHORT n;
+ sal_uInt16 n;
void* pUserData;
for( n = 0; n < nLstBoxCnt; ++n )
@@ -455,7 +455,7 @@ IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox )
::lcl_ClearLstBoxAndDelUserData( *pL );
}
- USHORT nInsPos;
+ sal_uInt16 nInsPos;
String sAlg, sUINm;
for( long nCnt = 0, nEnd = aSeq.getLength(); nCnt <= nEnd; ++nCnt )
{
diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
index 954d1a017a77..08ac516e4b31 100644
--- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
+++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
@@ -87,7 +87,7 @@
SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) :
SfxModalDialog(pParent, SW_RES(DLG_MOD_REDLINE_ACCEPT))
{
- pImplDlg = new SwRedlineAcceptDlg(this, TRUE);
+ pImplDlg = new SwRedlineAcceptDlg(this, sal_True);
pImplDlg->Initialize(GetExtraData());
pImplDlg->Activate(); // Zur Initialisierung der Daten
@@ -101,7 +101,7 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) :
SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg()
{
- AcceptAll(FALSE); // Alles uebriggebliebene ablehnen
+ AcceptAll(sal_False); // Alles uebriggebliebene ablehnen
pImplDlg->FillInfo(GetExtraData());
delete pImplDlg;
@@ -129,19 +129,19 @@ void SwModalRedlineAcceptDlg::Resize()
Beschreibung:
------------------------------------------------------------------------*/
-void SwModalRedlineAcceptDlg::AcceptAll( BOOL bAccept )
+void SwModalRedlineAcceptDlg::AcceptAll( sal_Bool bAccept )
{
SvxTPFilter* pFilterTP = pImplDlg->GetChgCtrl()->GetFilterPage();
if (pFilterTP->IsDate() || pFilterTP->IsAuthor() ||
pFilterTP->IsRange() || pFilterTP->IsAction())
{
- pFilterTP->CheckDate(FALSE); // Alle Filter abschalten
- pFilterTP->CheckAuthor(FALSE);
- pFilterTP->CheckRange(FALSE);
- pFilterTP->CheckAction(FALSE);
+ pFilterTP->CheckDate(sal_False); // Alle Filter abschalten
+ pFilterTP->CheckAuthor(sal_False);
+ pFilterTP->CheckRange(sal_False);
+ pFilterTP->CheckAction(sal_False);
pImplDlg->FilterChangedHdl();
}
- pImplDlg->CallAcceptReject( FALSE, bAccept );
+ pImplDlg->CallAcceptReject( sal_False, bAccept );
}
diff --git a/sw/source/ui/ribbar/conarc.cxx b/sw/source/ui/ribbar/conarc.cxx
index 4b2fafbd6040..60f733f328c7 100644
--- a/sw/source/ui/ribbar/conarc.cxx
+++ b/sw/source/ui/ribbar/conarc.cxx
@@ -61,11 +61,11 @@ ConstArc::ConstArc(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView)
-BOOL ConstArc::MouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool ConstArc::MouseButtonDown( const MouseEvent& rMEvt )
{
- BOOL bReturn;
+ sal_Bool bReturn;
- if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE)
+ if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True)
{
if (!nAnzButUp)
aStartPnt = m_pWin->PixelToLogic(rMEvt.GetPosPixel());
@@ -81,9 +81,9 @@ BOOL ConstArc::MouseButtonDown( const MouseEvent& rMEvt )
-BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
+sal_Bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if ((m_pSh->IsDrawCreate() || m_pWin->IsDrawAction()) && rMEvt.IsLeft())
{
@@ -91,7 +91,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
if (!nAnzButUp && aPnt == aStartPnt)
{
SwDrawBase::MouseButtonUp(rMEvt);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
{ nAnzButUp++;
@@ -100,7 +100,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
{
SwDrawBase::MouseButtonUp(rMEvt);
nAnzButUp = 0;
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
m_pSh->EndCreate(SDRCREATE_NEXTPOINT);
@@ -109,7 +109,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
/* else if ( pView->IsCreateObj() && rMEvt.IsRight() )
{
pView->EndCreateObj( SDRCREATE_FORCEEND );
- bReturn = TRUE;
+ bReturn = sal_True;
}*/
return (bReturn);
@@ -123,7 +123,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
-void ConstArc::Activate(const USHORT nSlotId)
+void ConstArc::Activate(const sal_uInt16 nSlotId)
{
switch (nSlotId)
{
diff --git a/sw/source/ui/ribbar/concustomshape.cxx b/sw/source/ui/ribbar/concustomshape.cxx
index 66ba929fae47..ebf3e8beba65 100644
--- a/sw/source/ui/ribbar/concustomshape.cxx
+++ b/sw/source/ui/ribbar/concustomshape.cxx
@@ -104,9 +104,9 @@ rtl::OUString ConstCustomShape::GetShapeTypeFromRequest( SfxRequest& rReq )
|*
\************************************************************************/
-BOOL ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = SwDrawBase::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = SwDrawBase::MouseButtonDown(rMEvt);
if ( bReturn )
{
SdrView *pSdrView = m_pSh->GetDrawView();
@@ -140,7 +140,7 @@ BOOL ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
{
return SwDrawBase::MouseButtonUp(rMEvt);
}
@@ -151,7 +151,7 @@ BOOL ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
|*
\************************************************************************/
-void ConstCustomShape::Activate(const USHORT nSlotId)
+void ConstCustomShape::Activate(const sal_uInt16 nSlotId)
{
m_pWin->SetSdrDrawMode( OBJ_CUSTOMSHAPE );
diff --git a/sw/source/ui/ribbar/conform.cxx b/sw/source/ui/ribbar/conform.cxx
index 8682e1d34462..1e6133d7703d 100644
--- a/sw/source/ui/ribbar/conform.cxx
+++ b/sw/source/ui/ribbar/conform.cxx
@@ -39,7 +39,7 @@
#include "drawbase.hxx"
#include "conform.hxx"
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
/*************************************************************************
|*
@@ -51,7 +51,7 @@ extern BOOL bNoInterrupt; // in mainwn.cxx
ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) :
SwDrawBase(pWrtShell, pEditWin, pSwView)
{
- m_bInsForm = TRUE;
+ m_bInsForm = sal_True;
}
/*************************************************************************
@@ -61,9 +61,9 @@ ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, S
\************************************************************************/
-BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
SdrView *pSdrView = m_pSh->GetDrawView();
@@ -72,13 +72,13 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
if (rMEvt.IsMod2())
{
- pSdrView->SetCreate1stPointAsCenter(TRUE);
- pSdrView->SetResizeAtCenter(TRUE);
+ pSdrView->SetCreate1stPointAsCenter(sal_True);
+ pSdrView->SetResizeAtCenter(sal_True);
}
else
{
- pSdrView->SetCreate1stPointAsCenter(FALSE);
- pSdrView->SetResizeAtCenter(FALSE);
+ pSdrView->SetCreate1stPointAsCenter(sal_False);
+ pSdrView->SetResizeAtCenter(sal_False);
}
SdrViewEvent aVEvt;
@@ -88,16 +88,16 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
if (rMEvt.IsLeft() && !m_pWin->IsDrawAction() &&
(eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate()))
{
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
m_pWin->CaptureMouse();
m_pWin->SetPointer(Pointer(POINTER_DRAW_RECT));
m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel());
- bReturn = m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos);
+ bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos);
if (bReturn)
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else
bReturn = SwDrawBase::MouseButtonDown(rMEvt);
@@ -112,7 +112,7 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
\************************************************************************/
-void ConstFormControl::Activate(const USHORT nSlotId)
+void ConstFormControl::Activate(const sal_uInt16 nSlotId)
{
m_pWin->SetSdrDrawMode( static_cast<SdrObjKind>(nSlotId) );
SwDrawBase::Activate(nSlotId);
@@ -136,8 +136,8 @@ void ConstFormControl::CreateDefaultObject()
m_pSh->MakeDrawView();
SdrView *pSdrView = m_pSh->GetDrawView();
- pSdrView->SetDesignMode(TRUE);
- m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos);
+ pSdrView->SetDesignMode(sal_True);
+ m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos);
m_pSh->MoveCreate(aEndPos);
m_pSh->EndCreate(SDRCREATE_FORCEEND);
}
diff --git a/sw/source/ui/ribbar/conpoly.cxx b/sw/source/ui/ribbar/conpoly.cxx
index 0dbf109cc783..00f0067435b8 100644
--- a/sw/source/ui/ribbar/conpoly.cxx
+++ b/sw/source/ui/ribbar/conpoly.cxx
@@ -61,11 +61,11 @@ ConstPolygon::ConstPolygon(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* p
-BOOL ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn;
+ sal_Bool bReturn;
- if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE)
+ if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True)
aLastPos = rMEvt.GetPosPixel();
return (bReturn);
@@ -79,9 +79,9 @@ BOOL ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
-BOOL ConstPolygon::MouseMove(const MouseEvent& rMEvt)
+sal_Bool ConstPolygon::MouseMove(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
bReturn = SwDrawBase::MouseMove(rMEvt);
@@ -96,9 +96,9 @@ BOOL ConstPolygon::MouseMove(const MouseEvent& rMEvt)
-BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if (m_pSh->IsDrawCreate())
{
@@ -109,7 +109,7 @@ BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
{
m_pSh->BreakCreate();
EnterSelectMode(rMEvt);
- return TRUE;
+ return sal_True;
}
}
else
@@ -136,7 +136,7 @@ BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
-void ConstPolygon::Activate(const USHORT nSlotId)
+void ConstPolygon::Activate(const sal_uInt16 nSlotId)
{
switch (nSlotId)
{
diff --git a/sw/source/ui/ribbar/conrect.cxx b/sw/source/ui/ribbar/conrect.cxx
index 3d77ae4829af..c1debe9eab34 100644
--- a/sw/source/ui/ribbar/conrect.cxx
+++ b/sw/source/ui/ribbar/conrect.cxx
@@ -58,7 +58,7 @@
ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin,
SwView* pSwView )
: SwDrawBase( pWrtShell, pEditWin, pSwView ),
- bMarquee(FALSE),
+ bMarquee(sal_False),
// #93382#
mbVertical(sal_False)
{
@@ -70,11 +70,11 @@ ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin,
|*
\************************************************************************/
-BOOL ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn;
+ sal_Bool bReturn;
- if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE
+ if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True
&& m_pWin->GetSdrDrawMode() == OBJ_CAPTION)
{
m_pView->NoRotate();
@@ -93,11 +93,11 @@ BOOL ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
{
Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
- BOOL bRet = SwDrawBase::MouseButtonUp(rMEvt);
+ sal_Bool bRet = SwDrawBase::MouseButtonUp(rMEvt);
if( bRet )
{
SdrView *pSdrView = m_pSh->GetDrawView();
@@ -117,13 +117,13 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
SfxItemSet aItemSet( pSdrView->GetModel()->GetItemPool(),
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
- aItemSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
- aItemSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
+ aItemSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
+ aItemSet.Put( SdrTextAutoGrowHeightItem( sal_False ) );
aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SCROLL ) );
aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
aItemSet.Put( SdrTextAniCountItem( 0 ) );
aItemSet.Put( SdrTextAniAmountItem(
- (INT16)m_pWin->PixelToLogic(Size(2,1)).Width()) );
+ (sal_Int16)m_pWin->PixelToLogic(Size(2,1)).Width()) );
pObj->SetMergedItemSetAndBroadcast(aItemSet);
}
@@ -134,10 +134,10 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
SdrTextObj* pText = (SdrTextObj*)pObj;
SfxItemSet aSet(pSdrView->GetModel()->GetItemPool());
- pText->SetVerticalWriting(TRUE);
+ pText->SetVerticalWriting(sal_True);
- 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));
@@ -160,7 +160,7 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
pCaptObj->ForceOutlinerParaObject();
OutlinerParaObject* pOPO = pCaptObj->GetOutlinerParaObject();
if( pOPO && !pOPO->IsVertical() )
- pOPO->SetVertical( TRUE );
+ pOPO->SetVertical( sal_True );
}
}
break;
@@ -176,9 +176,9 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
|*
\************************************************************************/
-void ConstRectangle::Activate(const USHORT nSlotId)
+void ConstRectangle::Activate(const sal_uInt16 nSlotId)
{
- bMarquee = bCapVertical = FALSE;
+ bMarquee = bCapVertical = sal_False;
mbVertical = sal_False;
switch (nSlotId)
@@ -196,7 +196,7 @@ void ConstRectangle::Activate(const USHORT nSlotId)
break;
case SID_DRAW_TEXT_MARQUEE:
- bMarquee = TRUE;
+ bMarquee = sal_True;
m_pWin->SetSdrDrawMode(OBJ_TEXT);
break;
@@ -211,7 +211,7 @@ void ConstRectangle::Activate(const USHORT nSlotId)
break;
case SID_DRAW_CAPTION_VERTICAL:
- bCapVertical = TRUE;
+ bCapVertical = sal_True;
// no break
case SID_DRAW_CAPTION:
m_pWin->SetSdrDrawMode(OBJ_CAPTION);
diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx
index 61dcd3f23505..5dc985d47ab1 100644
--- a/sw/source/ui/ribbar/drawbase.cxx
+++ b/sw/source/ui/ribbar/drawbase.cxx
@@ -50,9 +50,9 @@
using namespace ::com::sun::star;
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
-#define MINMOVE ((USHORT)m_pSh->GetOut()->PixelToLogic(Size(m_pSh->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width())
+#define MINMOVE ((sal_uInt16)m_pSh->GetOut()->PixelToLogic(Size(m_pSh->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width())
/*************************************************************************
@@ -67,8 +67,8 @@ SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* pSwV
m_pSh(pSwWrtShell),
m_pWin(pWindow),
m_nSlotId(USHRT_MAX),
- m_bCreateObj(TRUE),
- m_bInsForm(FALSE)
+ m_bCreateObj(sal_True),
+ m_bInsForm(sal_False)
{
if ( !m_pSh->HasDrawView() )
m_pSh->MakeDrawView();
@@ -83,7 +83,7 @@ SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* pSwV
__EXPORT SwDrawBase::~SwDrawBase()
{
if (m_pView->GetWrtShellPtr()) // Im view-Dtor koennte die wrtsh bereits geloescht worden sein...
- m_pSh->GetDrawView()->SetEditMode(TRUE);
+ m_pSh->GetDrawView()->SetEditMode(sal_True);
}
/*************************************************************************
@@ -93,9 +93,9 @@ __EXPORT SwDrawBase::~SwDrawBase()
\************************************************************************/
-BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
SdrView *pSdrView = m_pSh->GetDrawView();
@@ -106,13 +106,13 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
if (rMEvt.IsMod2())
{
- pSdrView->SetCreate1stPointAsCenter(TRUE);
- pSdrView->SetResizeAtCenter(TRUE);
+ pSdrView->SetCreate1stPointAsCenter(sal_True);
+ pSdrView->SetResizeAtCenter(sal_True);
}
else
{
- pSdrView->SetCreate1stPointAsCenter(FALSE);
- pSdrView->SetResizeAtCenter(FALSE);
+ pSdrView->SetCreate1stPointAsCenter(sal_False);
+ pSdrView->SetResizeAtCenter(sal_False);
}
SdrViewEvent aVEvt;
@@ -123,17 +123,17 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
{
if (IsCreateObj() && (eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate()))
{
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
m_pWin->CaptureMouse();
m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel());
- bReturn = m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), m_aStartPos);
+ bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), m_aStartPos);
SetDrawPointer();
if ( bReturn )
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else if (!pSdrView->IsAction())
{
@@ -142,25 +142,25 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
**********************************************************************/
m_pWin->CaptureMouse();
m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel());
- UINT16 nEditMode = m_pWin->GetBezierMode();
+ sal_uInt16 nEditMode = m_pWin->GetBezierMode();
if (eHit == SDRHIT_HANDLE && aVEvt.pHdl->GetKind() == HDL_BWGT)
{
/******************************************************************
* Handle draggen
******************************************************************/
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
bReturn = pSdrView->BegDragObj(m_aStartPos, (OutputDevice*) NULL, aVEvt.pHdl);
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else if (eHit == SDRHIT_MARKEDOBJECT && nEditMode == SID_BEZIER_INSERT)
{
/******************************************************************
* Klebepunkt einfuegen
******************************************************************/
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
bReturn = pSdrView->BegInsObjPoint(m_aStartPos, rMEvt.IsMod1());
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else if (eHit == SDRHIT_MARKEDOBJECT && rMEvt.IsMod1())
{
@@ -171,14 +171,14 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
pSdrView->UnmarkAllPoints();
bReturn = pSdrView->BegMarkPoints(m_aStartPos);
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else if (eHit == SDRHIT_MARKEDOBJECT && !rMEvt.IsShift() && !rMEvt.IsMod2())
{
/******************************************************************
* Objekt verschieben
******************************************************************/
- return FALSE;
+ return sal_False;
}
else if (eHit == SDRHIT_HANDLE)
{
@@ -209,10 +209,10 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
if (pHdl)
{
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
pSdrView->MarkPoint(*pHdl);
// bReturn = pSdrView->BegDragObj(m_aStartPos, (OutputDevice*) NULL, pHdl);
-// m_pWin->SetDrawAction(TRUE);
+// m_pWin->SetDrawAction(sal_True);
}
}
}
@@ -226,12 +226,12 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
if (pSdrView->HasMarkablePoints())
pSdrView->UnmarkAllPoints();
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
// Drag im edtwin verwenden
- return FALSE;
+ return sal_False;
}
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
if (m_pSh->IsObjSelected())
{
@@ -241,11 +241,11 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
{
//JP 10.10.2001: Bug 89619 - don't scroll the
// cursor into the visible area
- BOOL bUnlockView = !m_pSh->IsViewLocked();
- m_pSh->LockView( TRUE ); //lock visible section
+ sal_Bool bUnlockView = !m_pSh->IsViewLocked();
+ m_pSh->LockView( sal_True ); //lock visible section
m_pSh->SelectObj(Point(LONG_MAX, LONG_MAX)); // Alles deselektieren
if( bUnlockView )
- m_pSh->LockView( FALSE );
+ m_pSh->LockView( sal_False );
}
else
pSdrView->UnmarkAllPoints();
@@ -255,7 +255,7 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
m_pSh->EnterSelFrmMode(NULL);
if( 0 != (bReturn = m_pSh->BeginMark(m_aStartPos)) )
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
SetDrawPointer();
}
@@ -271,11 +271,11 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
\************************************************************************/
-BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt)
+sal_Bool SwDrawBase::MouseMove(const MouseEvent& rMEvt)
{
SdrView *pSdrView = m_pSh->GetDrawView();
Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (IsCreateObj() && !m_pWin->IsDrawSelMode() && pSdrView->IsCreateObj())
{
@@ -285,12 +285,12 @@ BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt)
pSdrView->SetAngleSnapEnabled(rMEvt.IsShift());
m_pSh->MoveCreate(aPnt);
- bRet = TRUE;
+ bRet = sal_True;
}
else if (pSdrView->IsAction() || pSdrView->IsInsObjPoint() || pSdrView->IsMarkPoints())
{
m_pSh->MoveMark(aPnt);
- bRet = TRUE;
+ bRet = sal_True;
}
return (bRet);
@@ -303,11 +303,11 @@ BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt)
\************************************************************************/
-BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
- BOOL bCheckShell = FALSE;
- BOOL bAutoCap = FALSE;
+ sal_Bool bReturn = sal_False;
+ sal_Bool bCheckShell = sal_False;
+ sal_Bool bAutoCap = sal_False;
Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
@@ -315,7 +315,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
{
const SdrObjKind nDrawMode = m_pWin->GetSdrDrawMode();
//objects with multiple point may end at the start position
- BOOL bMultiPoint = OBJ_PLIN == nDrawMode ||
+ sal_Bool bMultiPoint = OBJ_PLIN == nDrawMode ||
OBJ_PATHLINE == nDrawMode ||
OBJ_FREELINE == nDrawMode;
if(rMEvt.IsRight() || (aPnt == m_aStartPos && !bMultiPoint))
@@ -342,12 +342,12 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
{
SfxRequest aReq(m_pSh->GetView().GetViewFrame(),FN_INSERT_FRAME);
aReq.AppendItem(SfxUInt16Item( FN_INSERT_FRAME,
- static_cast<USHORT>(FLY_AT_PARA) ));
+ static_cast<sal_uInt16>(FLY_AT_PARA) ));
aReq.AppendItem(SfxPointItem( FN_PARAM_1, m_pSh->GetAnchorObjDiff()));
aReq.AppendItem(SvxSizeItem( FN_PARAM_2, m_pSh->GetObjSize()));
aReq.Done();
}
- bAutoCap = TRUE;
+ bAutoCap = sal_True;
if(m_pWin->GetFrmColCount() > 1)
{
SfxItemSet aSet(m_pView->GetPool(),RES_COL,RES_COL);
@@ -366,7 +366,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
m_pSh->EndUndo(UNDO_INSERT);
}
- bReturn = TRUE;
+ bReturn = sal_True;
EnterSelectMode(rMEvt);
}
@@ -384,7 +384,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
{
bReturn = m_pSh->EndMark();
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
if (aPnt == m_aStartPos && m_pSh->IsObjSelectable(aPnt))
{
@@ -402,7 +402,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
m_pView->NoRotate();
- bCheckShell = TRUE; // ggf BezierShell anwerfen
+ bCheckShell = sal_True; // ggf BezierShell anwerfen
}
else if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction())
{
@@ -417,7 +417,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
m_pView->NoRotate();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -435,9 +435,9 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
else
{
pSdrView->EndAction();
- bReturn = TRUE;
+ bReturn = sal_True;
}
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
if (aPnt == m_aStartPos)
{
@@ -462,7 +462,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
m_pView->NoRotate();
- bCheckShell = TRUE; // ggf BezierShell anwerfen
+ bCheckShell = sal_True; // ggf BezierShell anwerfen
}
}
@@ -475,7 +475,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
m_pSh->LeaveSelFrmMode();
m_pView->NoRotate();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -497,13 +497,13 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
\************************************************************************/
-void SwDrawBase::Activate(const USHORT nSlot)
+void SwDrawBase::Activate(const sal_uInt16 nSlot)
{
SetSlotId(nSlot);
SdrView *pSdrView = m_pSh->GetDrawView();
- pSdrView->SetCurrentObj( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()) );
- pSdrView->SetEditMode(FALSE);
+ pSdrView->SetCurrentObj( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()) );
+ pSdrView->SetEditMode(sal_False);
SetDrawPointer();
m_pSh->NoEdit();
@@ -519,16 +519,16 @@ void SwDrawBase::Activate(const USHORT nSlot)
void __EXPORT SwDrawBase::Deactivate()
{
SdrView *pSdrView = m_pSh->GetDrawView();
- pSdrView->SetOrtho(FALSE);
- pSdrView->SetAngleSnapEnabled(FALSE);
+ pSdrView->SetOrtho(sal_False);
+ pSdrView->SetAngleSnapEnabled(sal_False);
if (m_pWin->IsDrawAction() && m_pSh->IsDrawCreate())
m_pSh->BreakCreate();
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
m_pWin->ReleaseMouse();
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
// if(!m_pSh->IsObjSelected())
// m_pSh->Edit();
@@ -542,16 +542,16 @@ void __EXPORT SwDrawBase::Deactivate()
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
+sal_Bool SwDrawBase::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_Bool bReturn = sal_False;
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch (nCode)
{
@@ -563,14 +563,14 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
m_pView->LeaveDrawCreate();
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
case KEY_DELETE:
{
m_pSh->DelSelectedObj();
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
@@ -619,7 +619,7 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
pSdrView->MoveAllMarked(Size(nX, nY));
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -633,8 +633,8 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
@@ -642,7 +642,7 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
void SwDrawBase::BreakCreate()
{
m_pSh->BreakCreate();
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
m_pWin->ReleaseMouse();
Deactivate();
@@ -674,7 +674,7 @@ void SwDrawBase::SetDrawPointer()
void SwDrawBase::EnterSelectMode(const MouseEvent& rMEvt)
{
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction())
{
@@ -711,7 +711,7 @@ void SwDrawBase::CreateDefaultObject()
aEndPos.X() += 8 * MM50;
aEndPos.Y() += 4 * MM50;
Rectangle aRect(aStartPos, aEndPos);
- m_pSh->CreateDefaultShape( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId);
+ m_pSh->CreateDefaultShape( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId);
}
/* -----------------25.10.2002 14:14-----------------
*
diff --git a/sw/source/ui/ribbar/dselect.cxx b/sw/source/ui/ribbar/dselect.cxx
index b7651eba981e..c810abe1a740 100644
--- a/sw/source/ui/ribbar/dselect.cxx
+++ b/sw/source/ui/ribbar/dselect.cxx
@@ -37,7 +37,7 @@
#include "drawbase.hxx"
#include "dselect.hxx"
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
/*************************************************************************
|*
@@ -48,21 +48,21 @@ extern BOOL bNoInterrupt; // in mainwn.cxx
DrawSelection::DrawSelection(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) :
SwDrawBase(pWrtShell, pEditWin, pSwView)
{
- m_bCreateObj = FALSE;
+ m_bCreateObj = sal_False;
}
/*************************************************************************
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt)
+sal_Bool DrawSelection::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
switch (rKEvt.GetKeyCode().GetCode())
{
@@ -73,7 +73,7 @@ BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt)
m_pSh->BreakMark();
m_pWin->ReleaseMouse();
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
}
@@ -90,10 +90,10 @@ BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt)
|*
\************************************************************************/
-void DrawSelection::Activate(const USHORT nSlotId)
+void DrawSelection::Activate(const sal_uInt16 nSlotId)
{
m_pWin->SetSdrDrawMode(OBJ_NONE);
- m_pWin->SetObjectSelect( TRUE );
+ m_pWin->SetObjectSelect( sal_True );
SwDrawBase::Activate(nSlotId);
m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx
index e6d7bf26db80..f6429dbdfc9f 100755
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
@@ -75,8 +75,8 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind )
pBindings(pBind),
aAktTableName(aEmptyStr)
{
- bFirst = bDoesUndo = TRUE;
- bActive = bIsTable = bDelSel = bResetUndo = bCallUndo = FALSE;
+ bFirst = bDoesUndo = sal_True;
+ bActive = bIsTable = bDelSel = bResetUndo = bCallUndo = sal_False;
FreeResource();
@@ -94,7 +94,7 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind )
InsertWindow( ED_FORMULA, &aEdit);
SetHelpId(ED_FORMULA, HID_EDIT_FORMULA);
- BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
SetItemImage( FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC, bHC ));
SetItemImage( FN_FORMULA_CANCEL, pManager->GetImage(FN_FORMULA_CANCEL, bHC ));
SetItemImage( FN_FORMULA_APPLY, pManager->GetImage(FN_FORMULA_APPLY, bHC ));
@@ -135,8 +135,8 @@ __EXPORT SwInputWindow::~SwInputWindow()
//Lineale aufwecken
if(pView)
{
- pView->GetHLineal().SetActive( TRUE );
- pView->GetVLineal().SetActive( TRUE );
+ pView->GetHLineal().SetActive( sal_True );
+ pView->GetVLineal().SetActive( sal_True );
}
if ( pMgr )
delete pMgr;
@@ -162,7 +162,7 @@ void SwInputWindow::DataChanged( const DataChangedEvent& rDCEvt )
// update item images
SwModule *pMod = SW_MOD();
SfxImageManager *pImgMgr = SfxImageManager::GetImageManager( pMod );
- BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
//
SetItemImage( FN_FORMULA_CALC, pImgMgr->GetImage(FN_FORMULA_CALC, bHC ));
SetItemImage( FN_FORMULA_CANCEL, pImgMgr->GetImage(FN_FORMULA_CANCEL, bHC ));
@@ -191,16 +191,16 @@ void __EXPORT SwInputWindow::Resize()
void SwInputWindow::ShowWin()
{
- bIsTable = FALSE;
+ bIsTable = sal_False;
//Lineale anhalten
if(pView)
{
- pView->GetHLineal().SetActive( FALSE );
- pView->GetVLineal().SetActive( FALSE );
+ pView->GetHLineal().SetActive( sal_False );
+ pView->GetVLineal().SetActive( sal_False );
DBG_ASSERT(pWrtShell, "Keine WrtShell!");
// Cursor in Tabelle
- bIsTable = pWrtShell->IsCrsrInTbl() ? TRUE : FALSE;
+ bIsTable = pWrtShell->IsCrsrInTbl() ? sal_True : sal_False;
if( bFirst )
pWrtShell->SelTblCells( LINK( this, SwInputWindow,
@@ -208,7 +208,7 @@ void SwInputWindow::ShowWin()
if( bIsTable )
{
const String& rPos = pWrtShell->GetBoxNms();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
short nSrch = -1;
while( (nPos = rPos.Search( ':',nPos + 1 ) ) != STRING_NOTFOUND )
nSrch = (short) nPos;
@@ -233,13 +233,13 @@ void SwInputWindow::ShowWin()
{
if( bIsTable )
{
- bResetUndo = TRUE;
+ bResetUndo = sal_True;
nActionCnt = SwEditShell::GetUndoActionCount();
SwEditShell::SetUndoActionCount( nActionCnt + 1 );
bDoesUndo = pWrtShell->DoesUndo();
if( !bDoesUndo )
- pWrtShell->DoUndo( TRUE );
+ pWrtShell->DoUndo( sal_True );
if( !pWrtShell->SwCrsrShell::HasSelection() )
{
@@ -252,9 +252,9 @@ void SwInputWindow::ShowWin()
pWrtShell->StartUndo( UNDO_DELETE );
pWrtShell->Delete();
if( 0 != pWrtShell->EndUndo( UNDO_DELETE ))
- bCallUndo = TRUE;
+ bCallUndo = sal_True;
}
- pWrtShell->DoUndo( FALSE );
+ pWrtShell->DoUndo( sal_False );
SfxItemSet aSet( pWrtShell->GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA );
if( pWrtShell->GetTblBoxFormulaAttrs( aSet ))
@@ -269,7 +269,7 @@ void SwInputWindow::ShowWin()
pWrtShell->EndSelect();
}
- bFirst = FALSE;
+ bFirst = sal_False;
aEdit.SetModifyHdl( LINK( this, SwInputWindow, ModifyHdl ));
@@ -282,8 +282,8 @@ void SwInputWindow::ShowWin()
aEdit.GrabFocus();
// UserInterface fuer die Eingabe abklemmen
- pView->GetEditWin().LockKeyInput(TRUE);
- pView->GetViewFrame()->GetDispatcher()->Lock(TRUE);
+ pView->GetEditWin().LockKeyInput(sal_True);
+ pView->GetViewFrame()->GetDispatcher()->Lock(sal_True);
pWrtShell->Push();
}
ToolBox::Show();
@@ -320,7 +320,7 @@ static const char * __READONLY_DATA aStrArr[] = {
sCalc_Round
};
- USHORT nId = pMenu->GetCurItemId();
+ sal_uInt16 nId = pMenu->GetCurItemId();
if ( nId <= MN_CALC_ROUND )
{
String aTmp( String::CreateFromAscii(aStrArr[nId - 1]) );
@@ -332,7 +332,7 @@ static const char * __READONLY_DATA aStrArr[] = {
IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG )
{
- USHORT nCurID = GetCurItemId();
+ sal_uInt16 nCurID = GetCurItemId();
EndSelection(); // setzt CurItemId zurueck !
switch ( nCurID )
{
@@ -345,7 +345,7 @@ IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG )
}
}
- return TRUE;
+ return sal_True;
}
//==================================================================
@@ -353,7 +353,7 @@ IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG )
void __EXPORT SwInputWindow::Click( )
{
- USHORT nCurID = GetCurItemId();
+ sal_uInt16 nCurID = GetCurItemId();
EndSelection(); // setzt CurItemId zurueck !
switch ( nCurID )
{
@@ -374,8 +374,8 @@ void __EXPORT SwInputWindow::Click( )
void SwInputWindow::ApplyFormula()
{
- pView->GetViewFrame()->GetDispatcher()->Lock(FALSE);
- pView->GetEditWin().LockKeyInput(FALSE);
+ pView->GetViewFrame()->GetDispatcher()->Lock(sal_False);
+ pView->GetEditWin().LockKeyInput(sal_False);
if( bResetUndo )
{
DelBoxCntnt();
@@ -383,9 +383,9 @@ void SwInputWindow::ApplyFormula()
SwEditShell::SetUndoActionCount( nActionCnt );
if( bCallUndo )
pWrtShell->Undo();
- bResetUndo = FALSE;
+ bResetUndo = sal_False;
}
- pWrtShell->Pop( FALSE );
+ pWrtShell->Pop( sal_False );
// JP 13.01.97: Formel soll immer mit einem "=" beginnen, hier
// also wieder entfernen
@@ -409,8 +409,8 @@ void SwInputWindow::CancelFormula()
{
if(pView)
{
- pView->GetViewFrame()->GetDispatcher()->Lock( FALSE );
- pView->GetEditWin().LockKeyInput(FALSE);
+ pView->GetViewFrame()->GetDispatcher()->Lock( sal_False );
+ pView->GetEditWin().LockKeyInput(sal_False);
if( bResetUndo )
{
DelBoxCntnt();
@@ -418,9 +418,9 @@ void SwInputWindow::CancelFormula()
SwEditShell::SetUndoActionCount( nActionCnt );
if( bCallUndo )
pWrtShell->Undo();
- bResetUndo = FALSE;
+ bResetUndo = sal_False;
}
- pWrtShell->Pop( FALSE );
+ pWrtShell->Pop( sal_False );
if( bDelSel )
pWrtShell->EnterStdMode();
@@ -478,7 +478,7 @@ IMPL_LINK( SwInputWindow, SelTblCellsNotify, SwWrtShell *, pCaller )
}
-void SwInputWindow::SetFormula( const String& rFormula, BOOL bDelFlag )
+void SwInputWindow::SetFormula( const String& rFormula, sal_Bool bDelFlag )
{
String sEdit( '=' );
if( rFormula.Len() )
@@ -518,7 +518,7 @@ void SwInputWindow::DelBoxCntnt()
{
pWrtShell->StartAllAction();
pWrtShell->ClearMark();
- pWrtShell->Pop( FALSE );
+ pWrtShell->Pop( sal_False );
pWrtShell->Push();
pWrtShell->MoveSection( fnSectionCurr, fnSectionStart );
pWrtShell->SetMark();
@@ -559,32 +559,32 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes,
String aBoxes = aPrefix;
aBoxes += rBoxes;
Selection aSelection(GetSelection());
- USHORT nSel = (USHORT) aSelection.Len();
+ sal_uInt16 nSel = (sal_uInt16) aSelection.Len();
//OS: mit dem folgenden Ausdruck wird sichergestellt, dass im overwrite-Modus
//die selektierte schliessende Klammer nicht geloescht wird
if( nSel && ( nSel > 1 ||
- GetText().GetChar( (USHORT)aSelection.Min() ) != cClose ) )
+ GetText().GetChar( (sal_uInt16)aSelection.Min() ) != cClose ) )
Cut();
else
aSelection.Max() = aSelection.Min();
String aActText(GetText());
- const USHORT nLen = aActText.Len();
+ const sal_uInt16 nLen = aActText.Len();
if( !nLen )
{
String aStr(cOpen);
aStr += aBoxes;
aStr += cClose;
SetText(aStr);
- USHORT nPos = aStr.Search( cClose );
+ sal_uInt16 nPos = aStr.Search( cClose );
ASSERT(nPos < aStr.Len(), Delimiter nicht gefunden.);
++nPos;
SetSelection( Selection( nPos, nPos ));
}
else
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
sal_Unicode cCh;
- USHORT nPos, nEndPos = 0, nStartPos = (USHORT) aSelection.Min();
+ sal_uInt16 nPos, nEndPos = 0, nStartPos = (sal_uInt16) aSelection.Min();
if( nStartPos-- )
{
do {
@@ -598,22 +598,22 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes,
}
if( bFound )
{
- bFound = FALSE;
+ bFound = sal_False;
nEndPos = nStartPos;
while( nEndPos < nLen )
{
if( cClose == (cCh = aActText.GetChar( nEndPos )) /*||
cCh == cCloseBracket*/ )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
++nEndPos;
}
// nur wenn akt. Pos im Breich oder direkt dahinter liegt
- if( bFound && !( nStartPos < (USHORT)aSelection.Max() &&
- (USHORT)aSelection.Max() <= nEndPos + 1 ))
- bFound = FALSE;
+ if( bFound && !( nStartPos < (sal_uInt16)aSelection.Max() &&
+ (sal_uInt16)aSelection.Max() <= nEndPos + 1 ))
+ bFound = sal_False;
}
if( bFound )
{
@@ -627,7 +627,7 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes,
String aTmp( (char)cOpen );
aTmp += aBoxes;
aTmp += (char)cClose;
- nPos = (USHORT)aSelection.Min();
+ nPos = (sal_uInt16)aSelection.Min();
aActText.Insert( aTmp, nPos );
nPos = nPos + aTmp.Len();
}
@@ -645,7 +645,7 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes,
SwInputChild::SwInputChild(Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* ) :
SfxChildWindow( _pParent, nId )
@@ -660,7 +660,7 @@ SwInputChild::SwInputChild(Window* _pParent,
__EXPORT SwInputChild::~SwInputChild()
{
if(pDispatch)
- pDispatch->Lock(FALSE);
+ pDispatch->Lock(sal_False);
}
diff --git a/sw/source/ui/ribbar/tblctrl.cxx b/sw/source/ui/ribbar/tblctrl.cxx
index ad5046af6b42..a5cc0d6725ba 100644
--- a/sw/source/ui/ribbar/tblctrl.cxx
+++ b/sw/source/ui/ribbar/tblctrl.cxx
@@ -51,8 +51,8 @@ SFX_IMPL_TOOLBOX_CONTROL( SwTableOptimizeCtrl, SfxUInt16Item );
SwTableOptimizeCtrl::SwTableOptimizeCtrl(
- USHORT nSlotId,
- USHORT nId,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nId,
ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
diff --git a/sw/source/ui/ribbar/tbxanchr.cxx b/sw/source/ui/ribbar/tbxanchr.cxx
index 6c20f9dd818d..31e3c21f5e13 100644
--- a/sw/source/ui/ribbar/tbxanchr.cxx
+++ b/sw/source/ui/ribbar/tbxanchr.cxx
@@ -61,7 +61,7 @@ SFX_IMPL_TOOLBOX_CONTROL(SwTbxAnchor, SfxUInt16Item);
* Beschreibung:
******************************************************************************/
-SwTbxAnchor::SwTbxAnchor( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) :
+SwTbxAnchor::SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
nActAnchorId(0)
{
@@ -80,7 +80,7 @@ SwTbxAnchor::SwTbxAnchor( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) :
* Beschreibung:
******************************************************************************/
-void SwTbxAnchor::StateChanged( USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+void SwTbxAnchor::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) );
@@ -148,8 +148,8 @@ void SwTbxAnchor::Click()
aPopMenu.EnableItem( FN_TOOL_ANKER_FRAME, 0 != pWrtShell->IsFlyInFly() );
Rectangle aRect(GetToolBox().GetItemRect(GetId()));
- USHORT nHtmlMode = ::GetHtmlMode((SwDocShell*)SfxObjectShell::Current());
- BOOL bHtmlModeNoAnchor = ( nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((SwDocShell*)SfxObjectShell::Current());
+ sal_Bool bHtmlModeNoAnchor = ( nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS);
if (bHtmlModeNoAnchor || pWrtShell->IsInHeaderFooter())
aPopMenu.RemoveItem(aPopMenu.GetItemPos(FN_TOOL_ANKER_PAGE));
@@ -158,7 +158,7 @@ void SwTbxAnchor::Click()
aPopMenu.CheckItem(nActAnchorId);
- USHORT nSlotId = aPopMenu.Execute(&GetToolBox(), aRect);
+ sal_uInt16 nSlotId = aPopMenu.Execute(&GetToolBox(), aRect);
GetToolBox().EndSelection();
if (nSlotId)
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index cf7f4b15a33a..2e46b44cf82d 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -88,8 +88,8 @@ SFX_IMPL_TOOLBOX_CONTROL( SwTbxAutoTextCtrl, SfxBoolItem );
**********************************************************************/
SwTbxInsertCtrl::SwTbxInsertCtrl(
- USHORT nSlotId,
- USHORT nId,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nId,
ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
nLastSlotId(FN_INSERT_CTRL == nSlotId ? FN_INSERT_TABLE : SID_INSERT_DIAGRAM)
@@ -124,11 +124,11 @@ void SAL_CALL SwTbxInsertCtrl::update() throw (uno::RuntimeException)
**********************************************************************/
-void SwTbxInsertCtrl::StateChanged( USHORT /*nSID*/,
+void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* pState )
{
- USHORT nId = GetId();
+ sal_uInt16 nId = GetId();
GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) );
if( eState == SFX_ITEM_AVAILABLE )
@@ -148,7 +148,7 @@ void SwTbxInsertCtrl::StateChanged( USHORT /*nSID*/,
hasBigImages(),
rBox.GetSettings().GetStyleSettings().GetHighContrastMode() );
rBox.SetItemImage(GetId(), aImage);
- rBox.SetItemImageMirrorMode( GetId(), FALSE );
+ rBox.SetItemImageMirrorMode( GetId(), sal_False );
rBox.SetItemImageAngle( GetId(), pItem->GetRotation() );
rBox.SetItemImageMirrorMode( GetId(), pItem->IsMirrored() );
}
@@ -191,7 +191,7 @@ SfxPopupWindowType SwTbxInsertCtrl::GetPopupWindowType() const
**********************************************************************/
-void SwTbxInsertCtrl::Select( BOOL /*bMod1*/ )
+void SwTbxInsertCtrl::Select( sal_Bool /*bMod1*/ )
{
if( nLastSlotId )
{
@@ -216,8 +216,8 @@ void SwTbxInsertCtrl::Select( BOOL /*bMod1*/ )
SwTbxAutoTextCtrl::SwTbxAutoTextCtrl(
- USHORT nSlotId,
- USHORT nId,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nId,
ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
pPopup(0),
@@ -271,22 +271,22 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow()
{
pPopup = new PopupMenu;
SwGlossaryList* pGlossaryList = ::GetGlossaryList();
- USHORT nGroupCount = pGlossaryList->GetGroupCount();
- for(USHORT i = 1; i <= nGroupCount; i++)
+ sal_uInt16 nGroupCount = pGlossaryList->GetGroupCount();
+ for(sal_uInt16 i = 1; i <= nGroupCount; i++)
{
// Gruppenname mit Pfad-Extension besorgen
String sTitle;
- String sGroupName = pGlossaryList->GetGroupName(i - 1, FALSE, &sTitle);
- USHORT nBlockCount = pGlossaryList->GetBlockCount(i -1);
+ String sGroupName = pGlossaryList->GetGroupName(i - 1, sal_False, &sTitle);
+ sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1);
if(nBlockCount)
{
- USHORT nIndex = 100 * (i);
+ sal_uInt16 nIndex = 100 * (i);
// aber ohne extension einfuegen
pPopup->InsertItem( i, sTitle);//sGroupName.GetToken(0, GLOS_DELIM));
PopupMenu* pSub = new PopupMenu;
pSub->SetSelectHdl(aLnk);
pPopup->SetPopupMenu(i, pSub);
- for(USHORT j = 0; j < nBlockCount; j++)
+ for(sal_uInt16 j = 0; j < nBlockCount; j++)
{
String sEntry;
String sLongName(pGlossaryList->GetBlockName(i - 1, j, sEntry));
@@ -299,14 +299,14 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow()
}
}
ToolBox* pToolBox = &GetToolBox();
- USHORT nId = GetId();
- pToolBox->SetItemDown( nId, TRUE );
+ sal_uInt16 nId = GetId();
+ pToolBox->SetItemDown( nId, sal_True );
pPopup->Execute( pToolBox, pToolBox->GetItemRect( nId ),
(pToolBox->GetAlign() == WINDOWALIGN_TOP || pToolBox->GetAlign() == WINDOWALIGN_BOTTOM) ?
POPUPMENU_EXECUTE_DOWN : POPUPMENU_EXECUTE_RIGHT );
- pToolBox->SetItemDown( nId, FALSE );
+ pToolBox->SetItemDown( nId, sal_False );
}
GetToolBox().EndSelection();
DelPopup();
@@ -330,7 +330,7 @@ SfxPopupWindowType SwTbxAutoTextCtrl::GetPopupWindowType() const
**********************************************************************/
-void SwTbxAutoTextCtrl::StateChanged( USHORT nSID,
+void SwTbxAutoTextCtrl::StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState )
{
@@ -348,7 +348,7 @@ void SwTbxAutoTextCtrl::StateChanged( USHORT nSID,
IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu)
{
- USHORT nId = pMenu->GetCurItemId();
+ sal_uInt16 nId = pMenu->GetCurItemId();
if ( GetSlotId() == FN_INSERT_FIELD_CTRL)
{
@@ -384,11 +384,11 @@ IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu)
}
else
{
- USHORT nBlock = nId / 100;
+ sal_uInt16 nBlock = nId / 100;
SwGlossaryList* pGlossaryList = ::GetGlossaryList();
String sShortName;
- String sGroup = pGlossaryList->GetGroupName(nBlock - 1, FALSE);
+ String sGroup = pGlossaryList->GetGroupName(nBlock - 1, sal_False);
String sLongName(pGlossaryList->GetBlockName(nBlock - 1, nId - (100 * nBlock) - 1, sShortName));
SwGlossaryHdl* pGlosHdl = pView->GetGlosHdl();
@@ -397,7 +397,7 @@ IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu)
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( sGroup );
- pGlosHdl->SetCurGroup(sGroup, TRUE);
+ pGlosHdl->SetCurGroup(sGroup, sal_True);
pGlosHdl->InsertGlossary(sShortName);
}
return 0;
@@ -414,7 +414,7 @@ void SwTbxAutoTextCtrl::DelPopup()
{
if (GetSlotId() != FN_INSERT_FIELD_CTRL)
{
- for( USHORT i = 0; i < pPopup->GetItemCount(); i ++ )
+ for( sal_uInt16 i = 0; i < pPopup->GetItemCount(); i ++ )
{
PopupMenu* pSubPopup = pPopup->GetPopupMenu(pPopup->GetItemId(i));
delete pSubPopup;
@@ -429,7 +429,7 @@ void SwTbxAutoTextCtrl::DelPopup()
Navigations-Popup
--------------------------------------------------*/
// determine the order of the toolbox items
-static USHORT __READONLY_DATA aNavigationInsertIds[ NAVI_ENTRIES ] =
+static sal_uInt16 __READONLY_DATA aNavigationInsertIds[ NAVI_ENTRIES ] =
{
// -- first line
NID_TBL,
@@ -480,7 +480,7 @@ static const char* __READONLY_DATA aNavigationHelpIds[ NAVI_ENTRIES ] =
HID_NID_NEXT
};
-SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFrame )
+SwScrollNaviPopup::SwScrollNaviPopup( sal_uInt16 nId, const Reference< XFrame >& rFrame )
: SfxPopupWindow(nId, rFrame, SW_RES(RID_SCROLL_NAVIGATION_WIN) ),
aToolBox(this, 0),
aSeparator(this, SW_RES(FL_SEP)),
@@ -490,20 +490,20 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr
nFwdId(FN_START_OF_NEXT_PAGE),
nBackId(FN_START_OF_PREV_PAGE)
{
- USHORT i;
+ sal_uInt16 i;
aToolBox.SetHelpId(HID_NAVI_VS);
aToolBox.SetLineCount( 2 );
aToolBox.SetOutStyle(TOOLBOX_STYLE_FLAT);
for( i = 0; i < NID_COUNT; i++)
{
- USHORT nNaviId = aNavigationInsertIds[i];
+ sal_uInt16 nNaviId = aNavigationInsertIds[i];
String sText;
ToolBoxItemBits nTbxBits = 0;
if((NID_PREV != nNaviId) && (NID_NEXT != nNaviId))
{
// -2, there's no string for Next/Prev
- USHORT nResStr = ST_TBL - 2 + nNaviId - NID_START;
+ sal_uInt16 nResStr = ST_TBL - 2 + nNaviId - NID_START;
sText = String(SW_RES(nResStr));
nTbxBits = TIB_CHECKABLE;
}
@@ -526,7 +526,7 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr
aImgSize.Height() += 5;
Size aSz = aToolBox.CalcWindowSizePixel(2);
aToolBox.SetPosSizePixel( Point(), aSz );
- USHORT nItemId = SwView::GetMoveType();
+ sal_uInt16 nItemId = SwView::GetMoveType();
aInfoField.SetText(aToolBox.GetItemText(nItemId));
aToolBox.CheckItem( nItemId, sal_True );
Size aFTSize(aInfoField.GetSizePixel());
@@ -570,9 +570,9 @@ void SwScrollNaviPopup::ApplyImageList()
{
ImageList& rImgLst = aToolBox.GetSettings().GetStyleSettings().GetHighContrastMode() ?
aIListH : aIList;
- for(USHORT i = 0; i < NID_COUNT; i++)
+ for(sal_uInt16 i = 0; i < NID_COUNT; i++)
{
- USHORT nNaviId = aNavigationInsertIds[i];
+ sal_uInt16 nNaviId = aNavigationInsertIds[i];
aToolBox.SetItemImage(nNaviId, rImgLst.GetImage(nNaviId));
}
}
@@ -591,7 +591,7 @@ SfxPopupWindow* SwScrollNaviPopup::Clone() const
IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet)
{
- USHORT nSet = pSet->GetCurItemId();
+ sal_uInt16 nSet = pSet->GetCurItemId();
if( nSet != NID_PREV && nSet != NID_NEXT )
{
SwView::SetMoveType(nSet);
@@ -599,9 +599,9 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet)
aToolBox.SetItemText(NID_PREV, sQuickHelp[nSet - NID_START + NID_COUNT]);
aInfoField.SetText(aToolBox.GetItemText(nSet));
//check the current button only
- for(USHORT i = 0; i < NID_COUNT; i++)
+ for(sal_uInt16 i = 0; i < NID_COUNT; i++)
{
- USHORT nItemId = aToolBox.GetItemId( i );
+ sal_uInt16 nItemId = aToolBox.GetItemId( i );
aToolBox.CheckItem( nItemId, nItemId == nSet );
}
}
@@ -635,8 +635,8 @@ void SwScrollNaviToolBox::MouseButtonUp( const MouseEvent& rMEvt )
--------------------------------------------------*/
void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt )
{
- SetItemText(NID_NEXT, SwScrollNaviPopup::GetQuickHelpText(TRUE));
- SetItemText(NID_PREV, SwScrollNaviPopup::GetQuickHelpText(FALSE));
+ SetItemText(NID_NEXT, SwScrollNaviPopup::GetQuickHelpText(sal_True));
+ SetItemText(NID_PREV, SwScrollNaviPopup::GetQuickHelpText(sal_False));
ToolBox::RequestHelp( rHEvt );
}
@@ -644,9 +644,9 @@ void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt )
/*-----------------20.06.97 13:41-------------------
--------------------------------------------------*/
-String SwScrollNaviPopup::GetQuickHelpText(BOOL bNext)
+String SwScrollNaviPopup::GetQuickHelpText(sal_Bool bNext)
{
- USHORT nResId = STR_IMGBTN_START;
+ sal_uInt16 nResId = STR_IMGBTN_START;
nResId += SwView::GetMoveType() - NID_START;
if(!bNext)
nResId += NID_COUNT;
@@ -760,14 +760,14 @@ void SwNaviImageButton::DataChanged( const DataChangedEvent& rDCEvt )
* --------------------------------------------------*/
class SwZoomBox_Impl : public ComboBox
{
- USHORT nSlotId;
- BOOL bRelease;
+ sal_uInt16 nSlotId;
+ sal_Bool bRelease;
uno::Reference< frame::XDispatchProvider > m_xDispatchProvider;
public:
SwZoomBox_Impl(
Window* pParent,
- USHORT nSlot,
+ sal_uInt16 nSlot,
const Reference< XDispatchProvider >& rDispatchProvider );
~SwZoomBox_Impl();
@@ -783,17 +783,17 @@ protected:
* --------------------------------------------------*/
SwZoomBox_Impl::SwZoomBox_Impl(
Window* pParent,
- USHORT nSlot,
+ sal_uInt16 nSlot,
const Reference< XDispatchProvider >& rDispatchProvider ):
ComboBox( pParent, SW_RES(RID_PVIEW_ZOOM_LB)),
nSlotId(nSlot),
- bRelease(TRUE),
+ bRelease(sal_True),
m_xDispatchProvider( rDispatchProvider )
{
- EnableAutocomplete( FALSE );
- USHORT aZoomValues[] =
+ EnableAutocomplete( sal_False );
+ sal_uInt16 aZoomValues[] =
{ 25, 50, 75, 100, 150, 200 };
- for(USHORT i = 0; i < sizeof(aZoomValues)/sizeof(USHORT); i++)
+ for(sal_uInt16 i = 0; i < sizeof(aZoomValues)/sizeof(sal_uInt16); i++)
{
String sEntry = String::CreateFromInt32(aZoomValues[i]);
sEntry += '%';
@@ -814,7 +814,7 @@ void SwZoomBox_Impl::Select()
{
String sEntry(GetText());
sEntry.EraseAllChars( '%' );
- USHORT nZoom = (USHORT)sEntry.ToInt32();
+ sal_uInt16 nZoom = (sal_uInt16)sEntry.ToInt32();
if(nZoom < MINZOOM)
nZoom = MINZOOM;
if(nZoom > MAXZOOM)
@@ -846,7 +846,7 @@ long SwZoomBox_Impl::Notify( NotifyEvent& rNEvt )
if ( rNEvt.GetType() == EVENT_KEYINPUT )
{
- USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
+ sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
switch ( nCode )
{
@@ -854,7 +854,7 @@ long SwZoomBox_Impl::Notify( NotifyEvent& rNEvt )
case KEY_TAB:
{
if ( KEY_TAB == nCode )
- bRelease = FALSE;
+ bRelease = sal_False;
else
nHandled = 1;
Select();
@@ -883,7 +883,7 @@ void SwZoomBox_Impl::ReleaseFocus()
{
if ( !bRelease )
{
- bRelease = TRUE;
+ bRelease = sal_True;
return;
}
SfxViewShell* pCurSh = SfxViewShell::Current();
@@ -903,8 +903,8 @@ void SwZoomBox_Impl::ReleaseFocus()
SFX_IMPL_TOOLBOX_CONTROL( SwPreviewZoomControl, SfxUInt16Item);
SwPreviewZoomControl::SwPreviewZoomControl(
- USHORT nSlotId,
- USHORT nId,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nId,
ToolBox& rTbx) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
@@ -918,11 +918,11 @@ SwPreviewZoomControl::~SwPreviewZoomControl()
/* -----------------26.11.2002 09:29-----------------
*
* --------------------------------------------------*/
-void SwPreviewZoomControl::StateChanged( USHORT /*nSID*/,
+void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* pState )
{
- USHORT nId = GetId();
+ sal_uInt16 nId = GetId();
GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) );
SwZoomBox_Impl* pBox = (SwZoomBox_Impl*)GetToolBox().GetItemWindow( GetId() );
if(SFX_ITEM_AVAILABLE <= eState)
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index 8115b4ec7438..ea342e17c776 100755
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -266,9 +266,9 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
Outliner * pOutliner = pOLV->GetOutliner();
if(pOutliner)
{
- ULONG nParaCount = pOutliner->GetParagraphCount();
+ sal_uLong nParaCount = pOutliner->GetParagraphCount();
if (nParaCount > 0)
- pOLV->SelectRange(0L, USHORT(nParaCount) );
+ pOLV->SelectRange(0L, sal_uInt16(nParaCount) );
}
break;
}
@@ -363,7 +363,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
{
const SfxPoolItem* pItem = 0;
if(pNewAttrs)
- pNewAttrs->GetItemState(nSlot, FALSE, &pItem );
+ pNewAttrs->GetItemState(nSlot, sal_False, &pItem );
if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue());
break;
@@ -415,7 +415,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *rView.GetDocShell(), TRUE );
+ SwWait aWait( *rView.GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -454,7 +454,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( rView.GetWindow(), rView, aDlgAttr, DLG_CHAR,0, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet )
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -503,7 +503,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -529,7 +529,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
sal_Bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT;
const SfxPoolItem* pPoolItem;
- if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, TRUE, &pPoolItem ) )
+ if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, sal_True, &pPoolItem ) )
{
if( !( (SfxBoolItem*)pPoolItem)->GetValue() )
bLeftToRight = !bLeftToRight;
@@ -539,8 +539,8 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
0 );
- USHORT nAdjust = SVX_ADJUST_LEFT;
- if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, TRUE, &pPoolItem ) )
+ sal_uInt16 nAdjust = SVX_ADJUST_LEFT;
+ if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, sal_True, &pPoolItem ) )
nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue();
if( bLeftToRight )
@@ -593,7 +593,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
while(nWhich)
{
sal_uInt16 nEEWhich = 0;
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
case SID_ATTR_CHAR_FONT:
@@ -603,12 +603,12 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
{
if ( pOLV )
{
- USHORT nScriptType = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScriptType = pOLV->GetSelectedScriptType();
SfxItemPool* pSecondPool = aEditAttr.GetPool()->GetSecondaryPool();
if( !pSecondPool )
pSecondPool = aEditAttr.GetPool();
SvxScriptSetItem aSetItem( nSlotId, *pSecondPool );
- aSetItem.GetItemSet().Put( aEditAttr, FALSE );
+ aSetItem.GetItemSet().Put( aEditAttr, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
if( pI )
rSet.Put( *pI, nWhich );
@@ -629,7 +629,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
case FN_SET_SUPER_SCRIPT:
case FN_SET_SUB_SCRIPT:
{
- USHORT nEsc = 0;
+ sal_uInt16 nEsc = 0;
const SfxPoolItem *pEscItem = 0;
if (nWhich==FN_SET_SUPER_SCRIPT)
nEsc = SVX_ESCAPEMENT_SUPERSCRIPT;
@@ -729,7 +729,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( nWhich );
else
{
- BOOL bFlag = FALSE;
+ sal_Bool bFlag = sal_False;
switch( ( ( (SvxFrameDirectionItem&) aEditAttr.Get( EE_PARA_WRITINGDIR ) ) ).GetValue() )
{
case FRMDIR_HORI_LEFT_TOP:
@@ -776,7 +776,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
}
}
-void SwAnnotationShell::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
+void SwAnnotationShell::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
{
rView.ExecSearch(rReq,bNoMessage);
}
@@ -824,7 +824,7 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq)
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( &rView.GetEditWin() ) );
- ULONG nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
+ sal_uLong nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
if (nFormat > 0)
{
@@ -839,9 +839,9 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq)
}
case SID_CLIPBOARD_FORMAT_ITEMS:
{
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
const SfxPoolItem* pItem;
- if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET &&
+ if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET &&
pItem->ISA(SfxUInt32Item) )
{
nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
@@ -919,7 +919,7 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet)
void SwAnnotationShell::StateStatusLine(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
@@ -1018,7 +1018,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
break;
case FN_DELETE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, sal_False);
if ( pItem )
pPostItMgr->Delete( pItem->GetValue() );
break;
@@ -1039,7 +1039,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
break;
case FN_HIDE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, sal_False);
if ( pItem )
pPostItMgr->Hide( pItem->GetValue() );
}
@@ -1053,7 +1053,7 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet)
sal_uInt16 nWhich = aIter.FirstWhich();
while(nWhich)
{
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
case FN_POSTIT:
@@ -1272,7 +1272,7 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet)
{
const SfxPoolItem &rItem = rView.GetWrtShell().GetDoc()->GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage())) );
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage())) );
LanguageType nLang = ((const SvxLanguageItem &)
rItem).GetLanguage();
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
@@ -1365,10 +1365,10 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
? rView.GetPostItMgr()->GetActiveSidebarWin()->GetPostItTextHeight()
: 0;
- USHORT nId = rReq.GetSlot();
+ sal_uInt16 nId = rReq.GetSlot();
sal_uInt16 nCnt = 1;
const SfxPoolItem* pItem=0;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem ) )
nCnt = ((SfxUInt16Item*)pItem)->GetValue();
switch( nId )
{
@@ -1434,7 +1434,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
return;
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SfxUndoManager* pUndoManager = GetUndoManager();
SfxViewFrame *pSfxViewFrame = rView.GetViewFrame();
SwWrtShell &rSh = rView.GetWrtShell();
@@ -1470,7 +1470,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
{
if( pUndoManager )
{
- UniString (SfxUndoManager:: *fnGetComment)( USHORT ) const;
+ UniString (SfxUndoManager:: *fnGetComment)( sal_uInt16 ) const;
sal_uInt16 nCount;
if( SID_GETUNDOSTRINGS == nWhich )
@@ -1529,7 +1529,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
void SwAnnotationShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
rSet.DisableItem( nWhich );
@@ -1548,7 +1548,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem);
String sSym;
String sFontName;
@@ -1556,25 +1556,25 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
{
sSym = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
sFontName = pFontItem->GetValue();
}
SfxItemSet aSet(pOLV->GetAttribs());
- USHORT nScript = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScript = pOLV->GetSelectedScriptType();
SvxFontItem aSetDlgFont( RES_CHRATR_FONT );
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aSetDlgFont = *(SvxFontItem*)pI;
else
aSetDlgFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
SID_ATTR_CHAR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
if (!sFontName.Len())
sFontName = aSetDlgFont.GetFamilyName();
}
@@ -1585,7 +1585,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAllItemSet aAllSet( GetPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
SwViewOption aOpt(*rView.GetWrtShell().GetViewOptions());
String sSymbolFont = aOpt.GetSymbolFont();
@@ -1598,11 +1598,11 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet,
rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if( nResult == RET_OK )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pFontItem )
{
aFont.SetName( pFontItem->GetFamilyName() );
@@ -1627,7 +1627,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
// nicht flackern
pOLV->HideCursor();
Outliner * pOutliner = pOLV->GetOutliner();
- pOutliner->SetUpdateMode(FALSE);
+ pOutliner->SetUpdateMode(sal_False);
SfxItemSet aOldSet( pOLV->GetAttribs() );
SfxItemSet aFontSet( *aOldSet.GetPool(),
@@ -1646,7 +1646,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
aFont.GetStyleName(), aFont.GetPitch(),
aFont.GetCharSet(),
EE_CHAR_FONTINFO );
- USHORT nScriptBreak = pBreakIt->GetAllScriptsOfText( sSym );
+ sal_uInt16 nScriptBreak = pBreakIt->GetAllScriptsOfText( sSym );
if( SCRIPTTYPE_LATIN & nScriptBreak )
aSetFont.Put( aFontItem, EE_CHAR_FONTINFO );
if( SCRIPTTYPE_ASIAN & nScriptBreak )
@@ -1665,7 +1665,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
pOLV->SetAttribs( aFontSet );
// ab jetzt wieder anzeigen
- pOutliner->SetUpdateMode(TRUE);
+ pOutliner->SetUpdateMode(sal_True);
pOLV->ShowCursor();
rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) );
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 15c97f67c847..a4e26f20fbd2 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -132,16 +132,16 @@ FlyMode SwBaseShell::eFrameMode = FLY_DRAG_END;
//Fuer die Erkennung der Id, die variable von Gallery mit SID_GALLERY_BG_BRUSH
//ankommt.
-static BYTE nParagraphPos;
-static BYTE nGraphicPos;
-static BYTE nOlePos;
-static BYTE nFramePos;
-static BYTE nTablePos;
-static BYTE nTableRowPos;
-static BYTE nTableCellPos;
-static BYTE nPagePos;
-static BYTE nHeaderPos;
-static BYTE nFooterPos;
+static sal_uInt8 nParagraphPos;
+static sal_uInt8 nGraphicPos;
+static sal_uInt8 nOlePos;
+static sal_uInt8 nFramePos;
+static sal_uInt8 nTablePos;
+static sal_uInt8 nTableRowPos;
+static sal_uInt8 nTableCellPos;
+static sal_uInt8 nPagePos;
+static sal_uInt8 nHeaderPos;
+static sal_uInt8 nFooterPos;
#define Interior
#include <svx/svxslots.hxx>
@@ -194,9 +194,9 @@ void lcl_UpdateIMapDlg( SwWrtShell& rSh )
SvxIMapDlgChildWindow::UpdateIMapDlg(
aGrf, rURL.GetMap(), pList, pEditObj );
- USHORT nCount = (USHORT)pList->Count();
+ sal_uInt16 nCount = (sal_uInt16)pList->Count();
if(nCount)
- for( USHORT i = nCount; i; i-- )
+ for( sal_uInt16 i = nCount; i; i-- )
{
delete pList->GetObject(i-1);
}
@@ -204,11 +204,11 @@ void lcl_UpdateIMapDlg( SwWrtShell& rSh )
}
-BOOL lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
+sal_Bool lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
{
Graphic aGraf( rSh.GetIMapGraphic() );
GraphicType nGrfType = aGraf.GetType();
- BOOL bRet = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType;
+ sal_Bool bRet = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType;
if( bRet )
{
String aGrfName;
@@ -241,12 +241,12 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq)
if( rSh.IsNoNum() )
{
rSh.SttCrsrMove();
- BOOL bLeft = rSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ sal_Bool bLeft = rSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False );
if( bLeft )
{
// JP 28.03.96: ein Backspace im Absatz ohne Nummer wird zum Delete
//rSh.SwapPam();
- //rSh.DelRight( FALSE );
+ //rSh.DelRight( sal_False );
rSh.DelLeft();
}
@@ -285,7 +285,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
- USHORT nId = rReq.GetSlot();
+ sal_uInt16 nId = rReq.GetSlot();
sal_Bool bIgnore = sal_False;
switch( nId )
{
@@ -301,8 +301,8 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
pTransfer->Cut();
else
{
- const BOOL bLockedView = rSh.IsViewLocked();
- rSh.LockView( TRUE ); //lock visible section
+ const sal_Bool bLockedView = rSh.IsViewLocked();
+ rSh.LockView( sal_True ); //lock visible section
pTransfer->Copy();
rSh.LockView( bLockedView );
}
@@ -336,7 +336,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pFmt;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pFmt ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pFmt ) )
{
TransferableDataHelper aDataHelper(
TransferableDataHelper::CreateFromSystemClipboard(
@@ -408,7 +408,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
// temp. Variablen, da die Shell nach dem Paste schon
// zerstoert sein kann
SwView* pView = &rView;
- ULONG nFormatId = 0;
+ sal_uLong nFormatId = 0;
rReq.Ignore();
bIgnore = sal_True;
int nRet = SwTransferable::PasteSpecial( rSh, aDataHelper, nFormatId );
@@ -449,9 +449,9 @@ void SwBaseShell::StateClpbrd(SfxItemSet &rSet)
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter(rSet);
- const BOOL bCopy = rSh.HasSelection();
+ const sal_Bool bCopy = rSh.HasSelection();
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while(nWhich)
{
@@ -505,10 +505,10 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- USHORT nId = rReq.GetSlot(), nCnt = 1;
+ sal_uInt16 nId = rReq.GetSlot(), nCnt = 1;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem ))
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem ))
nCnt = ((SfxUInt16Item*)pItem)->GetValue();
// #i106349#: save pointer: undo/redo may delete the shell, i.e., this!
@@ -546,7 +546,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while(nWhich)
{
switch(nWhich)
@@ -615,9 +615,9 @@ void SwBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem *pItem;
SwWrtShell &rSh = GetShell();
const SfxItemSet* pArgs = rReq.GetArgs();
- BOOL bMore = FALSE;
+ sal_Bool bMore = sal_False;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case FN_REPAGINATE:
@@ -634,12 +634,12 @@ void SwBaseShell::Execute(SfxRequest &rReq)
SwDocStat aDocStat;
rSh.UpdateDocStat(aDocStat);
rSh.EndAllTblBoxEdit();
- rSh.ViewShell::UpdateFlds(TRUE);
+ rSh.ViewShell::UpdateFlds(sal_True);
if( rSh.IsCrsrInTbl() )
{
if( !rSh.IsTblComplexForChart() )
- SwTableFUNC( &rSh, FALSE).UpdateChart();
+ SwTableFUNC( &rSh, sal_False).UpdateChart();
rSh.ClearTblBoxCntnt();
rSh.SaveTblBoxCntnt();
}
@@ -647,7 +647,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case FN_UPDATE_CHARTS:
{
- SwWait aWait( *rView.GetDocShell(), TRUE );
+ SwWait aWait( *rView.GetDocShell(), sal_True );
rSh.UpdateAllCharts();
}
break;
@@ -659,7 +659,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if( rSh.GetLinkManager().GetLinks().Count() )
{
rSh.StartAllAction();
- rSh.GetLinkManager().UpdateAllLinks( FALSE, TRUE, TRUE );
+ rSh.GetLinkManager().UpdateAllLinks( sal_False, sal_True, sal_True );
rSh.EndAllAction();
}
SfxDispatcher &rDis = *rTempView.GetViewFrame()->GetDispatcher();
@@ -671,7 +671,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case FN_UPDATE_INPUTFIELDS:
- rSh.UpdateInputFlds(NULL, FALSE);
+ rSh.UpdateInputFlds(NULL, sal_False);
break;
case FN_PREV_BOOKMARK:
rReq.SetReturnValue(SfxBoolItem( nSlot, rSh.GoPrevBookmark()));
@@ -702,7 +702,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.ClearMark();
rSh.EndSelect();
}
- BOOL bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK);
+ sal_Bool bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK);
SwField* pCurField = bRet ? rSh.GetCurFld() : 0;
if (pCurField)
rSh.ClickToField(*pCurField);
@@ -721,15 +721,15 @@ void SwBaseShell::Execute(SfxRequest &rReq)
}
rSh.EnterStdMode();
nSlot == FN_START_DOC_DIRECT ?
- rSh.SttEndDoc(TRUE) :
- rSh.SttEndDoc(FALSE);
+ rSh.SttEndDoc(sal_True) :
+ rSh.SttEndDoc(sal_False);
}
break;
case FN_GOTO_PREV_OBJ:
case FN_GOTO_NEXT_OBJ:
{
- BOOL bSuccess = rSh.GotoObj(
- nSlot == FN_GOTO_NEXT_OBJ ? TRUE : FALSE);
+ sal_Bool bSuccess = rSh.GotoObj(
+ nSlot == FN_GOTO_NEXT_OBJ ? sal_True : sal_False);
rReq.SetReturnValue(SfxBoolItem(nSlot, bSuccess));
if (bSuccess && !rSh.IsSelFrmMode())
{
@@ -742,14 +742,14 @@ void SwBaseShell::Execute(SfxRequest &rReq)
case SID_GALLERY_FORMATS:
{
const int nSelType = rSh.GetSelectionType();
- if(SFX_ITEM_SET == pArgs->GetItemState( nSlot, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState( nSlot, sal_True, &pItem))
{
GalleryExplorer* pGal = 0;
if ( (!rSh.IsSelFrmMode() || nSelType & nsSelectionType::SEL_GRF) &&
0!= (pGal = SVX_GALLERY())&&
0 != (SGA_FORMAT_GRAPHIC & ((SfxUInt32Item*)pItem)->GetValue()))
{
- SwWait aWait( *rView.GetDocShell(), TRUE );
+ SwWait aWait( *rView.GetDocShell(), sal_True );
String aGrfName, aFltName;
const Graphic aGrf( pGal->GetGraphic() );
@@ -797,19 +797,19 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if (pArgs)
{
// aktuellen PageDescriptor ermitteln und damit den Set fuellen
- const USHORT nCurIdx = rSh.GetCurPageDesc();
+ const sal_uInt16 nCurIdx = rSh.GetCurPageDesc();
SwPageDesc aPageDesc(rSh.GetPageDesc(nCurIdx));
SwFrmFmt &rFmt = aPageDesc.GetMaster();
SwFmtCol aFmtCol = rFmt.GetCol();
- USHORT nCount;
+ sal_uInt16 nCount;
if(SFX_ITEM_SET == pArgs->GetItemState(nSlot))
nCount = ((SfxUInt16Item &)pArgs->Get(nSlot)).GetValue();
else
nCount = ((SfxUInt16Item &)pArgs->Get(SID_ATTR_COLUMNS)).GetValue();
- USHORT nGutterWidth = DEF_GUTTER_WIDTH;
+ sal_uInt16 nGutterWidth = DEF_GUTTER_WIDTH;
aFmtCol.Init(nCount ? nCount : 1, nGutterWidth, USHRT_MAX);
aFmtCol.SetWishWidth(USHRT_MAX);
@@ -820,7 +820,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.ChgPageDesc(nCurIdx, aPageDesc);
}
else
- GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_PAGE_COLUMN_DLG, FALSE);
+ GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_PAGE_COLUMN_DLG, sal_False);
}
break;
case FN_CONVERT_TABLE_TO_TEXT:
@@ -836,7 +836,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
SwTableAutoFmt* pTAFmt = 0;
SwTableAutoFmtTbl* pAutoFmtTbl = 0;
bool bDeleteFormat = true;
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_1, TRUE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_1, sal_True, &pItem))
{
aInsTblOpts.mnInsMode = 0;
//Delimiter
@@ -844,14 +844,14 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if(sDelim.Len())
cDelim = sDelim.GetChar(0);
//AutoFormat
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_2, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_2, sal_True, &pItem))
{
String sAutoFmt = static_cast< const SfxStringItem* >(pItem)->GetValue();
pAutoFmtTbl = new SwTableAutoFmtTbl;
pAutoFmtTbl->Load();
- for( USHORT i = 0, nCount = pAutoFmtTbl->Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = pAutoFmtTbl->Count(); i < nCount; i++ )
{
SwTableAutoFmt* pFmt = (*pAutoFmtTbl)[ i ];
if( pFmt->GetName() == sAutoFmt )
@@ -863,19 +863,19 @@ void SwBaseShell::Execute(SfxRequest &rReq)
}
}
//WithHeader
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_3, TRUE, &pItem) &&
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_3, sal_True, &pItem) &&
static_cast< const SfxBoolItem* >(pItem)->GetValue())
aInsTblOpts.mnInsMode |= tabopts::HEADLINE;
// RepeatHeaderLines
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_4, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_4, sal_True, &pItem))
aInsTblOpts.mnRowsToRepeat =
- (USHORT)static_cast< const SfxInt16Item* >(pItem)->GetValue();
+ (sal_uInt16)static_cast< const SfxInt16Item* >(pItem)->GetValue();
//WithBorder
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_5, TRUE, &pItem) &&
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_5, sal_True, &pItem) &&
static_cast< const SfxBoolItem* >(pItem)->GetValue())
aInsTblOpts.mnInsMode |= tabopts::DEFAULT_BORDER;
//DontSplitTable
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_6, TRUE, &pItem) &&
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_6, sal_True, &pItem) &&
!static_cast< const SfxBoolItem* >(pItem)->GetValue() )
aInsTblOpts.mnInsMode |= tabopts::SPLIT_LAYOUT;
}
@@ -899,7 +899,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
{
//Shellwechsel!
SwView& rSaveView = rView;
- BOOL bInserted = FALSE;
+ sal_Bool bInserted = sal_False;
//recording:
SfxViewFrame* pViewFrame = GetView().GetViewFrame();
@@ -950,8 +950,8 @@ void SwBaseShell::Execute(SfxRequest &rReq)
// oj #107754#
if ( SID_STYLE_WATERCAN == nSlot )
{
- const BOOL bLockedView = rSh.IsViewLocked();
- rSh.LockView( TRUE ); //lock visible section
+ const sal_Bool bLockedView = rSh.IsViewLocked();
+ rSh.LockView( sal_True ); //lock visible section
GetView().GetDocShell()->ExecStyleSheet(rReq);
@@ -968,7 +968,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case SID_IMAP:
{
- USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
pVFrame->ToggleChildWindow( nId );
@@ -997,7 +997,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case SID_CONTOUR_DLG:
{
- USHORT nId = SvxContourDlgChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
pVFrame->ToggleChildWindow( nId );
@@ -1027,7 +1027,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
SwFmtSurround aSur( (SwFmtSurround&)aSet.Get( RES_SURROUND ) );
if ( !aSur.IsContour() )
{
- aSur.SetContour( TRUE );
+ aSur.SetContour( sal_True );
if ( aSur.GetSurround() == SURROUND_NONE )
aSur.SetSurround( SURROUND_PARALLEL );
aSet.Put( aSur );
@@ -1088,7 +1088,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if (bDoMathBaselineAlignment)
rSh.AlignFormulaToBaseline( xObj );
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
if( nHtmlMode )
{
SfxItemSet aSet(GetPool(), RES_SURROUND, RES_HORI_ORIENT);
@@ -1170,10 +1170,10 @@ void SwBaseShell::Execute(SfxRequest &rReq)
{
if( rSh.GetLinkManager().GetLinks().Count() )
{
- BOOL bUpdateGrf = FALSE, bCallErrHdl = FALSE;
+ sal_Bool bUpdateGrf = sal_False, bCallErrHdl = sal_False;
rSh.EnterStdMode();
rSh.StartAllAction();
- rSh.GetLinkManager().UpdateAllLinks( FALSE, bCallErrHdl, bUpdateGrf );
+ rSh.GetLinkManager().UpdateAllLinks( sal_False, bCallErrHdl, bUpdateGrf );
rSh.EndAllAction();
}
}
@@ -1181,11 +1181,11 @@ void SwBaseShell::Execute(SfxRequest &rReq)
case FN_XFORMS_DESIGN_MODE:
if( pArgs != NULL
- && pArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET
+ && pArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET
&& pItem != NULL
&& pItem->ISA( SfxBoolItem ) )
{
- BOOL bDesignMode =
+ sal_Bool bDesignMode =
static_cast<const SfxBoolItem*>( pItem )->GetValue();
// set form design mode
@@ -1203,12 +1203,12 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
default:
- bMore = TRUE;
+ bMore = sal_True;
}
if(bMore && pArgs)
{
pItem = 0;
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
if(pItem)
switch(nSlot)
{
@@ -1231,7 +1231,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
else if ( rSh.IsFrmSelected() )
{
// Umrandungsattribute ueber Frame-Manager setzen
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
aMgr.SetAttrSet( *pArgs );
aMgr.UpdateFlyFrm();
}
@@ -1263,7 +1263,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
else if ( rSh.IsFrmSelected() )
{
// Umrandungsattribute ueber Frame-Manager setzen
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
aMgr.SetAttrSet(*pArgs);
aMgr.UpdateFlyFrm();
}
@@ -1287,25 +1287,25 @@ void SwBaseShell::Execute(SfxRequest &rReq)
* --------------------------------------------------*/
IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG )
{
- USHORT nGrfType;
+ sal_uInt16 nGrfType;
SwWrtShell &rSh = GetShell();
if( CNT_GRF == rSh.SwEditShell::GetCntType() &&
GRAPHIC_NONE != ( nGrfType = rSh.GetGraphicType() ) &&
aGrfUpdateSlots.Count() )
{
- BOOL bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
+ sal_Bool bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
SfxViewFrame* pVFrame = GetView().GetViewFrame();
- USHORT nSlot;
- for( USHORT n = 0; n < aGrfUpdateSlots.Count(); ++n )
+ sal_uInt16 nSlot;
+ for( sal_uInt16 n = 0; n < aGrfUpdateSlots.Count(); ++n )
{
- BOOL bSetState = FALSE;
- BOOL bState = FALSE;
+ sal_Bool bSetState = sal_False;
+ sal_Bool bState = sal_False;
switch( nSlot = aGrfUpdateSlots[ n ] )
{
case SID_IMAP:
case SID_IMAP_EXEC:
{
- USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
SvxIMapDlg *pDlg = pVFrame->HasChildWindow( nId ) ?
(SvxIMapDlg*) ( pVFrame->GetChildWindow( nId )
->GetWindow()) : 0;
@@ -1316,14 +1316,14 @@ IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG )
lcl_UpdateIMapDlg( rSh );
if( !bProtect && SID_IMAP == nSlot )
- bSetState = TRUE, bState = 0 != pDlg;
+ bSetState = sal_True, bState = 0 != pDlg;
}
break;
case SID_CONTOUR_DLG:
if( !bProtect )
{
- USHORT nId = SvxContourDlgChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
SvxIMapDlg *pDlg = pVFrame->HasChildWindow( nId ) ?
(SvxIMapDlg*) ( pVFrame->GetChildWindow( nId )
->GetWindow()) : 0;
@@ -1331,7 +1331,7 @@ IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG )
rSh.GetIMapInventor() )
lcl_UpdateContourDlg( rSh, nsSelectionType::SEL_GRF );
- bSetState = TRUE;
+ bSetState = sal_True;
bState = 0 != pDlg;
}
break;
@@ -1342,7 +1342,7 @@ IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG )
SfxItemSet aSet(GetPool(), RES_SURROUND, RES_SURROUND);
rSh.GetFlyFrmAttr(aSet);
const SwFmtSurround& rWrap = (const SwFmtSurround&)aSet.Get(RES_SURROUND);
- bSetState = TRUE;
+ bSetState = sal_True;
bState = rWrap.IsContour();
}
break;
@@ -1382,7 +1382,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
SwWrtShell &rSh = GetShell();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
pGetStateSet = &rSet;
while ( nWhich )
{
@@ -1396,7 +1396,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case SID_GALLERY_ENABLE_ADDCOPY:
// #108230# allow copy from gallery in Writer AND Writer/Web!
- rSet.Put( SfxBoolItem( SID_GALLERY_ENABLE_ADDCOPY, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_GALLERY_ENABLE_ADDCOPY, sal_True ) );
break;
case FN_EDIT_REGION:
if( !rSh.IsAnySectionInDoc() )
@@ -1410,7 +1410,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_CONVERT_TABLE_TO_TEXT:
{
- USHORT eFrmType = rSh.GetFrmType(0,TRUE);
+ sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
if( (eFrmType & FRMTYPE_FOOTNOTE) ||
!rSh.GetTableFmt() )
rSet.DisableItem( nWhich );
@@ -1418,7 +1418,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_CONVERT_TEXT_TO_TABLE:
{
- USHORT eFrmType = rSh.GetFrmType(0,TRUE);
+ sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
if( (eFrmType & FRMTYPE_FOOTNOTE) ||
!rSh.IsTextToTableAvailable() )
rSet.DisableItem( nWhich );
@@ -1426,7 +1426,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_CONVERT_TEXT_TABLE:
{
- USHORT eFrmType = rSh.GetFrmType(0,TRUE);
+ sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
if( (eFrmType & FRMTYPE_FOOTNOTE) ||
(!rSh.GetTableFmt() && !rSh.IsTextToTableAvailable() ) )
rSet.DisableItem( nWhich );
@@ -1441,11 +1441,11 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
if ( rSh.IsTableMode() )
{
SwFrmFmt *pFmt = rSh.GetTableFmt();
- aSet.Put(pFmt->GetFmtAttr( nWhich, TRUE ));
+ aSet.Put(pFmt->GetFmtAttr( nWhich, sal_True ));
}
else if( rSh.IsFrmSelected() )
{
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
aSet.Put( aMgr.GetAttrSet() );
}
else
@@ -1464,17 +1464,17 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
// --> OD 2006-11-08 #i59688#
// improve efficiency:
// If selected object is protected, item has to disabled.
- const BOOL bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
+ const sal_Bool bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
if ( bProtect )
{
rSet.DisableItem( nWhich );
}
else
{
- const USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId();
- const BOOL bHas = pVFrame->HasChildWindow( nId );
- const BOOL bFrmSel = rSh.IsFrmSelected();
- const BOOL bIsGraphicSelection =
+ const sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
+ const sal_Bool bHas = pVFrame->HasChildWindow( nId );
+ const sal_Bool bFrmSel = rSh.IsFrmSelected();
+ const sal_Bool bIsGraphicSelection =
rSh.GetSelectionType() == nsSelectionType::SEL_GRF;
// --> OD 2006-11-08 #i59688#
@@ -1483,10 +1483,10 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
//wenn die Grafik ausgeswappt ist, dann muss der
//Status asynchron ermittelt werden
//bis dahin wird der Slot disabled
- if ( bHas && bIsGraphicSelection && rSh.IsGrfSwapOut( TRUE ) )
+ if ( bHas && bIsGraphicSelection && rSh.IsGrfSwapOut( sal_True ) )
{
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
}
else
{
@@ -1512,17 +1512,17 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case SID_IMAP_EXEC:
{
- BOOL bDisable = FALSE;
+ sal_Bool bDisable = sal_False;
if( !rSh.IsFrmSelected())
- bDisable = TRUE;
- USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId();
+ bDisable = sal_True;
+ sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
if(!bDisable && pVFrame->HasChildWindow( nId ))
{
if(rSh.GetSelectionType() == nsSelectionType::SEL_GRF
- && rSh.IsGrfSwapOut(TRUE))
+ && rSh.IsGrfSwapOut(sal_True))
{
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
}
else
{
@@ -1541,21 +1541,21 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case SID_CONTOUR_DLG:
{
- BOOL bParentCntProt = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
+ sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
if( bParentCntProt || 0 != (HTMLMODE_ON & ::GetHtmlMode(
GetView().GetDocShell() )) )
rSet.DisableItem( nWhich );
else
{
- USHORT nId = SvxContourDlgChildWindow::GetChildWindowId();
- BOOL bHas = GetView().GetViewFrame()->HasChildWindow( nId );
+ sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
+ sal_Bool bHas = GetView().GetViewFrame()->HasChildWindow( nId );
int nSel = rSh.GetSelectionType();
- BOOL bOk = 0 != (nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE));
+ sal_Bool bOk = 0 != (nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE));
- BOOL bDisable = FALSE;
+ sal_Bool bDisable = sal_False;
if( !bHas && !bOk )
- bDisable = TRUE;
+ bDisable = sal_True;
// --> OD 2006-11-08 #i59688#
// avoid unnecessary loading of selected graphic.
// The graphic is only needed, if the dialog is open.
@@ -1563,12 +1563,12 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
// asynchron ermittelt werden bis dahin wird der Slot
// disabled
else if ( bHas && (nSel & nsSelectionType::SEL_GRF) &&
- rSh.IsGrfSwapOut(TRUE) )
+ rSh.IsGrfSwapOut(sal_True) )
{
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
// --> OD 2007-07-04 #i75481#
- bDisable = TRUE;
+ bDisable = sal_True;
// <--
}
else if( bHas && bOk )
@@ -1594,16 +1594,16 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case SID_CONTOUR_EXEC:
{
- BOOL bDisable = FALSE;
+ sal_Bool bDisable = sal_False;
int nSel = rSh.GetSelectionType();
if( !(nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE)) )
- bDisable = TRUE;
- USHORT nId = SvxContourDlgChildWindow::GetChildWindowId();
+ bDisable = sal_True;
+ sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
if( !bDisable && GetView().GetViewFrame()->HasChildWindow( nId ))
{
SvxContourDlg *pDlg = SWCONTOURDLG(GetView());
if( pDlg->GetEditingObject() != rSh.GetIMapInventor() )
- bDisable = TRUE;
+ bDisable = sal_True;
}
rSet.Put(SfxBoolItem(nWhich, bDisable));
}
@@ -1616,8 +1616,8 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
case FN_TOOL_ANKER_AT_CHAR:
case FN_TOOL_ANKER_FRAME:
{
- BOOL bObj = 0 != rSh.IsObjSelected();
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bObj = 0 != rSh.IsObjSelected();
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
if( !bParentCntProt && (bObj || rSh.IsFrmSelected()))
{
@@ -1627,7 +1627,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
else
rSh.GetFlyFrmAttr(aSet);
RndStdIds eSet = ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetAnchorId();
- const BOOL bSet =
+ const sal_Bool bSet =
((nWhich == FN_TOOL_ANKER_PAGE) &&
(eSet == FLY_AT_PAGE))
|| ((nWhich == FN_TOOL_ANKER_PARAGRAPH) &&
@@ -1640,7 +1640,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
(eSet == FLY_AS_CHAR));
if(nWhich != FN_TOOL_ANKER)
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
if( ( nWhich == FN_TOOL_ANKER_PAGE &&
((HTMLMODE_ON & nHtmlMode) && (0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS)))) ||
( nWhich == FN_TOOL_ANKER_FRAME && !rSh.IsFlyInFly() ) )
@@ -1650,7 +1650,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
}
else
{
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
switch (eSet)
{
@@ -1689,8 +1689,8 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
case FN_FRAME_WRAP_LEFT:
case FN_FRAME_WRAP_RIGHT:
{
- BOOL bObj = 0 != rSh.IsObjSelected();
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bObj = 0 != rSh.IsObjSelected();
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
if( !bParentCntProt && (bObj || rSh.IsFrmSelected()))
{
@@ -1709,9 +1709,9 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
const SwFmtSurround& rWrap = (const SwFmtSurround&)aSet.Get(RES_SURROUND);
const SvxOpaqueItem& rOpaque = (const SvxOpaqueItem&)aSet.Get(RES_OPAQUE);
- BOOL bOpaque = rOpaque.GetValue();
+ sal_Bool bOpaque = rOpaque.GetValue();
SwSurround nSurround = rWrap.GetSurround();
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
bool bDisable =
(nAnchorType == - 1) || (nAnchorType == FLY_AS_CHAR);
@@ -1761,10 +1761,10 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
{
int nSel = rSh.GetSelectionType();
if( (nSel & nsSelectionType::SEL_GRF) &&
- rSh.IsGrfSwapOut(TRUE))
+ rSh.IsGrfSwapOut(sal_True))
{
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
}
else if( rSh.IsFrmSelected() )
{
@@ -1774,7 +1774,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
GRAPHIC_NONE == rSh.GetIMapGraphic().GetType();
}
}
- bSet = bDisable ? FALSE : rWrap.IsContour();
+ bSet = bDisable ? sal_False : rWrap.IsContour();
break;
case FN_WRAP_ANCHOR_ONLY:
@@ -1832,7 +1832,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
void SwBaseShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -1848,7 +1848,7 @@ void SwBaseShell::StateDisableItems( SfxItemSet &rSet )
void SwBaseShell::StateStyle( SfxItemSet &rSet )
{
- BOOL bParentCntProt = GetShell().IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bParentCntProt = GetShell().IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
ShellModes eMode = GetView().GetShellMode();
if ( bParentCntProt ||
@@ -1859,7 +1859,7 @@ void SwBaseShell::StateStyle( SfxItemSet &rSet )
SHELL_MODE_BEZIER == eMode )
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
rSet.DisableItem( nWhich );
@@ -1875,10 +1875,10 @@ void SwBaseShell::StateStyle( SfxItemSet &rSet )
--------------------------------------------------------------------*/
-void SwBaseShell::SetWrapMode( USHORT nSlot )
+void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
{
SwWrtShell &rSh = GetShell();
- BOOL bObj = 0 != rSh.IsObjSelected();
+ sal_Bool bObj = 0 != rSh.IsObjSelected();
if( bObj || rSh.IsFrmSelected())
{
SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_SURROUND);
@@ -1895,7 +1895,7 @@ void SwBaseShell::SetWrapMode( USHORT nSlot )
case FN_FRAME_NOWRAP:
nSurround = SURROUND_NONE;
if (aWrap.IsContour())
- aWrap.SetContour(FALSE);
+ aWrap.SetContour(sal_False);
break;
case FN_FRAME_WRAP_IDEAL:
nSurround = SURROUND_IDEAL;
@@ -1919,7 +1919,7 @@ void SwBaseShell::SetWrapMode( USHORT nSlot )
break;
case FN_FRAME_WRAPTHRU_TRANSP:
if (aWrap.IsContour())
- aWrap.SetContour(FALSE);
+ aWrap.SetContour(sal_False);
// kein break!!!
case FN_FRAME_WRAPTHRU:
nSurround = SURROUND_THROUGHT;
@@ -1944,7 +1944,7 @@ void SwBaseShell::SetWrapMode( USHORT nSlot )
if (bObj && nOldSurround != nSurround &&
(nOldSurround == SURROUND_NONE || nOldSurround == SURROUND_THROUGHT))
{
- aWrap.SetContour(TRUE);
+ aWrap.SetContour(sal_True);
}
}
@@ -1982,7 +1982,7 @@ void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh )
}
else if( eMode == FLY_DRAG_END )
{
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_POSITION, SID_ATTR_SIZE, 0
};
@@ -2029,10 +2029,10 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
{
SwWrtShell &rSh = GetShell();
SvxScriptSetItem* pSSetItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SfxItemPool& rPool = rSh.GetAttrPool();
- USHORT nWhich = rPool.GetWhich( nSlot );
- USHORT nScripts = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nWhich = rPool.GetWhich( nSlot );
+ sal_uInt16 nScripts = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
SfxItemSet aHeightSet( GetPool(), RES_CHRATR_FONTSIZE, RES_CHRATR_FONTSIZE,
RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE, RES_CHRATR_CTL_FONTSIZE,
@@ -2074,7 +2074,7 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
LanguageType nInputLang = GetView().GetEditWin().GetInputLanguage();
if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM)
nScripts = SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang );
- UINT32 nHeight = static_cast< const SvxFontHeightItem& >(pArgs->Get( nWhich )).GetHeight();
+ sal_uInt32 nHeight = static_cast< const SvxFontHeightItem& >(pArgs->Get( nWhich )).GetHeight();
SwStdFontConfig* pStdFont = SW_MOD()->GetStdFontConfig();
SfxItemSet aLangSet( GetPool(), RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
@@ -2111,9 +2111,9 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
nCTLSize = (sal_Int32) nHeight;
break;
}
- aHeightSet.Put( SvxFontHeightItem( (UINT32)nWesternSize, 100, RES_CHRATR_FONTSIZE ));
- aHeightSet.Put( SvxFontHeightItem( (UINT32)nCJKSize, 100, RES_CHRATR_CJK_FONTSIZE ));
- aHeightSet.Put( SvxFontHeightItem( (UINT32)nCTLSize, 100, RES_CHRATR_CTL_FONTSIZE ));
+ aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nWesternSize, 100, RES_CHRATR_FONTSIZE ));
+ aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nCJKSize, 100, RES_CHRATR_CJK_FONTSIZE ));
+ aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nCTLSize, 100, RES_CHRATR_CTL_FONTSIZE ));
pArgs = &aHeightSet;
}
}
@@ -2142,7 +2142,7 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
delete pSSetItem;
}
else
- GetView().GetViewFrame()->GetDispatcher()->Execute( SID_CHAR_DLG, FALSE);
+ GetView().GetViewFrame()->GetDispatcher()->Execute( SID_CHAR_DLG, sal_False);
rReq.Done();
}
@@ -2159,11 +2159,11 @@ void SwBaseShell::GetTxtCtrlState( SfxItemSet& rSet )
void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
{
SwWrtShell &rSh = GetShell();
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
SfxItemSet* pFntCoreSet = 0;
- USHORT nScriptType = SCRIPTTYPE_LATIN;
+ sal_uInt16 nScriptType = SCRIPTTYPE_LATIN;
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
switch( nWhich )
@@ -2196,7 +2196,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
}
SfxItemPool& rPool = *rSet.GetPool();
SvxScriptSetItem aSetItem( rPool.GetSlotId( nWhich ), rPool );
- aSetItem.GetItemSet().Put( *pFntCoreSet, FALSE );
+ aSetItem.GetItemSet().Put( *pFntCoreSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
if( pI )
rSet.Put( *pI, nWhich );
@@ -2215,7 +2215,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
aFont.SetCharSet(((const SvxFontItem*)pI)->GetCharSet());
}
- BOOL bVertical = rSh.IsInVerticalText();
+ sal_Bool bVertical = rSh.IsInVerticalText();
aFont.SetOrientation(bVertical ? 2700 : 0);
aFont.SetVertical(bVertical);
GetView().GetEditWin().SetInputContext( InputContext( aFont, INPUTCONTEXT_TEXT |
@@ -2228,7 +2228,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
if( bFirst )
{
rSh.GetCurAttr( rSet );
- bFirst = FALSE;
+ bFirst = sal_False;
}
}
nWhich = aIter.NextWhich();
@@ -2244,7 +2244,7 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
int nSelType = rSh.GetSelectionType();
// if ( nSelType & nsSelectionType::SEL_GRF ||
@@ -2256,7 +2256,7 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet)
if ( nSelType & nsSelectionType::SEL_FRM )
{
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
if (bParentCntProt)
{
rSet.DisableItem( SID_BACKGROUND_COLOR );
@@ -2311,7 +2311,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
}
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if( !pArgs && nSlot != SID_BACKGROUND_COLOR)
return ;
@@ -2331,7 +2331,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND);
}
-// BOOL bMsgOk = FALSE;
+// sal_Bool bMsgOk = sal_False;
switch (nSlot)
{
@@ -2367,7 +2367,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
}
break;
default:
-// bMsgOk = FALSE;
+// bMsgOk = sal_False;
rReq.Ignore();
DBG_ERROR( "Unbekannte Message bei ExecuteAttr!" );
return;
@@ -2414,8 +2414,8 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
// Tabellenzelle(n) selektiert?
- BOOL bPrepare = TRUE;
- BOOL bTableMode = rSh.IsTableMode();
+ sal_Bool bPrepare = sal_True;
+ sal_Bool bTableMode = rSh.IsTableMode();
if ( bTableMode )
{
SfxItemSet aCoreSet( GetPool(),
@@ -2428,9 +2428,9 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet)
}
else if ( rSh.IsFrmSelected() )
{
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
rSet.Put( aMgr.GetAttrSet() );
- bPrepare = FALSE;
+ bPrepare = sal_False;
}
else
// Umrandungsattribute ganz normal ueber Shell holen
@@ -2451,15 +2451,15 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
Window *pMDI = &GetView().GetViewFrame()->GetWindow();
//Damit aus dem Basic keine Dialoge fuer Hintergrund-Views aufgerufen werden:
- BOOL bBackground = (&GetView() != GetActiveView());
+ sal_Bool bBackground = (&GetView() != GetActiveView());
const SfxPoolItem* pItem = 0;
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pOutSet = 0;
bool bDone = false;
if(pArgs)
- pArgs->GetItemState( GetPool().GetWhich(nSlot), FALSE, &pItem );
+ pArgs->GetItemState( GetPool().GetWhich(nSlot), sal_False, &pItem );
switch ( nSlot )
{
@@ -2468,7 +2468,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
{
if( !bBackground )
{
- const USHORT nCurIdx = rSh.GetCurPageDesc();
+ const sal_uInt16 nCurIdx = rSh.GetCurPageDesc();
const SwPageDesc& rPageDesc = rSh.GetPageDesc( nCurIdx );
//temp. View, weil die Shell nach dem Dialog nicht mehr gueltig sein muss
//z.B. Kopfzeile ausschalten
@@ -2507,7 +2507,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
else if ( rSh.IsFrmSelected() )
{
// Umrandungsattribute ueber Frame-Manager setzen
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
aSet.Put( aMgr.GetAttrSet() );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -2644,11 +2644,11 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
const SfxItemSet* pArgs = _rRequest.GetArgs();
SwWrtShell& rSh = GetShell();
- if ( !( rSh.GetFrmType( 0, TRUE ) & FRMTYPE_FOOTNOTE ) )
+ if ( !( rSh.GetFrmType( 0, sal_True ) & FRMTYPE_FOOTNOTE ) )
{
SwView &rTempView = GetView(); // Da GetView() nach Shellwechsel nicht mehr geht
- BOOL bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON);
- BOOL bCallEndUndo = FALSE;
+ sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON);
+ sal_Bool bCallEndUndo = sal_False;
if( !pArgs && rSh.IsSelection() && !rSh.IsInClickToEdit() &&
!rSh.IsTableMode() )
@@ -2657,9 +2657,9 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
SwInsertTableOptions aInsTblOpts = pModOpt->GetInsTblFlags(bHTMLMode);
rSh.StartUndo(UNDO_INSTABLE);
- bCallEndUndo = TRUE;
+ bCallEndUndo = sal_True;
- BOOL bInserted = rSh.TextToTable( aInsTblOpts, '\t', text::HoriOrientation::FULL );
+ sal_Bool bInserted = rSh.TextToTable( aInsTblOpts, '\t', text::HoriOrientation::FULL );
rSh.EnterStdMode();
if (bInserted)
rTempView.AutoCaption(TABLE_CAP);
@@ -2667,8 +2667,8 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
}
else
{
- USHORT nCols = 0;
- USHORT nRows = 0;
+ sal_uInt16 nCols = 0;
+ sal_uInt16 nRows = 0;
SwInsertTableOptions aInsTblOpts( tabopts::ALL_TBL_INS_ATTR, 1 );
String aTableName, aAutoName;
SwTableAutoFmt* pTAFmt = 0;
@@ -2694,7 +2694,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
{
SwTableAutoFmtTbl aTableTbl;
aTableTbl.Load();
- for ( USHORT n=0; n<aTableTbl.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aTableTbl.Count(); n++ )
{
if ( aTableTbl[n]->GetName() == aAutoName )
{
@@ -2706,7 +2706,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
}
if ( pFlags )
- aInsTblOpts.mnInsMode = (USHORT) pFlags->GetValue();
+ aInsTblOpts.mnInsMode = (sal_uInt16) pFlags->GetValue();
else
{
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
@@ -2741,7 +2741,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
_rRequest.Done();
rSh.StartUndo(UNDO_INSTABLE);
- bCallEndUndo = TRUE;
+ bCallEndUndo = sal_True;
rSh.StartAllAction();
if( rSh.HasSelection() )
@@ -2781,7 +2781,7 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
{
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
switch ( nWhich )
{
case SID_GALLERY_BG_BRUSH:
@@ -2792,11 +2792,11 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
nParagraphPos = nGraphicPos = nOlePos = nFramePos = nTablePos =
nTableRowPos = nTableCellPos = nPagePos =
nHeaderPos = nFooterPos = 0;
- BYTE nPos = 1;
+ sal_uInt8 nPos = 1;
pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_PAGE ), pLst->Count() );
nPagePos = nPos++;
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
- BOOL bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_Bool bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON);
if ( (!bHtmlMode || (nHtmlMode & HTMLMODE_FULL_STYLES)) &&
(nSel & nsSelectionType::SEL_TXT) )
@@ -2836,7 +2836,7 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_OLE ), pLst->Count() );
nOlePos = nPos++;
}
- const USHORT nType = rSh.GetFrmType(0,TRUE);
+ const sal_uInt16 nType = rSh.GetFrmType(0,sal_True);
if ( nType & FRMTYPE_HEADER )
{
pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_HEADER ), pLst->Count() );
@@ -2863,7 +2863,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
rSh.StartAction();
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_GALLERY_BG_BRUSH:
@@ -2872,7 +2872,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
if ( nSel & nsSelectionType::SEL_DRW_TXT )
break;
- BYTE nPos = (BYTE)((SfxUInt16Item &)pArgs->Get(SID_GALLERY_BG_POS)).GetValue();
+ sal_uInt8 nPos = (sal_uInt8)((SfxUInt16Item &)pArgs->Get(SID_GALLERY_BG_POS)).GetValue();
++nPos;
SvxBrushItem aBrush( (SvxBrushItem&)pArgs->Get(SID_GALLERY_BG_BRUSH));
@@ -2893,7 +2893,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
}
else if ( nPos == nPagePos || nPos == nHeaderPos || nPos == nFooterPos )
{
- USHORT nDesc = rSh.GetCurPageDesc();
+ sal_uInt16 nDesc = rSh.GetCurPageDesc();
SwPageDesc aDesc( rSh.GetPageDesc( nDesc ) );
if ( nPos == nPagePos )
aDesc.GetMaster().SetFmtAttr( aBrush );
@@ -2920,7 +2920,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
void SwBaseShell::ExecField( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch( nSlot )
{
case FN_CHANGE_DBFIELD:
@@ -2935,7 +2935,7 @@ void SwBaseShell::ExecField( SfxRequest& rReq )
}
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
}
}
diff --git a/sw/source/ui/shells/beziersh.cxx b/sw/source/ui/shells/beziersh.cxx
index cc6a3176643f..ce3f3c9cc1f6 100644
--- a/sw/source/ui/shells/beziersh.cxx
+++ b/sw/source/ui/shells/beziersh.cxx
@@ -89,12 +89,12 @@ void SwBezierShell::Execute(SfxRequest &rReq)
SwWrtShell *pSh = &GetShell();
SdrView* pSdrView = pSh->GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged(FALSE);
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
+ pSdrView->GetModel()->SetChanged(sal_False);
const SfxPoolItem* pItem;
if(pArgs)
- pArgs->GetItemState(nSlotId, FALSE, &pItem);
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
switch (nSlotId)
{
@@ -103,7 +103,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
if (pSh->IsObjSelected())
{
if (pSdrView->HasMarkedPoints())
- pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(SID_BEZIER_DELETE, FALSE);
+ pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(SID_BEZIER_DELETE, sal_False);
else
{
pSh->DelSelectedObj();
@@ -140,7 +140,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
case SID_BEZIER_INSERT:
{
GetView().GetEditWin().SetBezierMode(nSlotId);
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{
SID_BEZIER_INSERT,
SID_BEZIER_MOVE,
@@ -200,7 +200,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
{
pSdrView->SetMarkedPointsSmooth(eKind);
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{
SID_BEZIER_SMOOTH,
SID_BEZIER_EDGE,
@@ -236,7 +236,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
if (pSdrView->GetModel()->IsChanged())
GetShell().SetModified();
else if (bChanged)
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
}
/*--------------------------------------------------------------------
@@ -249,7 +249,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
SdrView* pSdrView = GetShell().GetDrawView();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
@@ -258,7 +258,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
case SID_BEZIER_MOVE:
case SID_BEZIER_INSERT:
{
- USHORT nEditMode = GetView().GetEditWin().GetBezierMode();
+ sal_uInt16 nEditMode = GetView().GetEditWin().GetBezierMode();
rSet.Put(SfxBoolItem(nWhich, nEditMode == nWhich));
}
@@ -289,8 +289,8 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
switch (eSegm)
{
case SDRPATHSEGMENT_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CONVERT); break;
- case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,FALSE)); break; // Button reingedrueckt = Kurve
- case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,TRUE)); break;
+ case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_False)); break; // Button reingedrueckt = Kurve
+ case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_True)); break;
default:; //prevent warning
}
}
@@ -304,7 +304,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
else
{
SdrPathSmoothKind eSmooth = pSdrView->GetMarkedPointsSmooth();
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
switch (eSmooth)
{
case SDRPATHSMOOTH_DONTCARE :
@@ -334,8 +334,8 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
switch (eClose)
{
case SDROBJCLOSED_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CLOSE); break;
- case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,FALSE)); break;
- case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,TRUE)); break;
+ case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,sal_False)); break;
+ case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,sal_True)); break;
default:; //prevent warning
}
}
diff --git a/sw/source/ui/shells/drawdlg.cxx b/sw/source/ui/shells/drawdlg.cxx
index 56b783a25711..7798c49ac119 100644
--- a/sw/source/ui/shells/drawdlg.cxx
+++ b/sw/source/ui/shells/drawdlg.cxx
@@ -65,8 +65,8 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
SwWrtShell* pSh = &GetShell();
SdrView* pView = pSh->GetDrawView();
SdrModel* pDoc = pView->GetModel();
- BOOL bChanged = pDoc->IsChanged();
- pDoc->SetChanged(FALSE);
+ sal_Bool bChanged = pDoc->IsChanged();
+ pDoc->SetChanged(sal_False);
SfxItemSet aNewAttr( pDoc->GetItemPool() );
pView->GetAttributes( aNewAttr );
@@ -81,7 +81,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
if ( pFact )
{
SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( NULL, &aNewAttr, pView );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if (nResult == RET_OK)
{
@@ -101,7 +101,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
case SID_ATTRIBUTES_AREA:
{
- BOOL bHasMarked = pView->AreObjectsMarked();
+ sal_Bool bHasMarked = pView->AreObjectsMarked();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet Factory fail!");
@@ -120,10 +120,10 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
if (bHasMarked)
pView->SetAttributes(*pDlg->GetOutputItemSet());
else
- pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), FALSE);
+ pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), sal_False);
pSh->EndAction();
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_FILL_STYLE, SID_ATTR_FILL_COLOR, 0
};
@@ -138,7 +138,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
case SID_ATTRIBUTES_LINE:
{
- BOOL bHasMarked = pView->AreObjectsMarked();
+ sal_Bool bHasMarked = pView->AreObjectsMarked();
const SdrObject* pObj = NULL;
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
@@ -157,12 +157,12 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
{
pSh->StartAction();
if(bHasMarked)
- pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), FALSE);
+ pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), sal_False);
else
- pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), FALSE);
+ pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), sal_False);
pSh->EndAction();
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_LINE_STYLE, SID_ATTR_LINE_WIDTH,
SID_ATTR_LINE_COLOR, 0
@@ -183,7 +183,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
GetShell().SetModified();
else
if (bChanged)
- pDoc->SetChanged(TRUE);
+ pDoc->SetChanged(sal_True);
}
/*--------------------------------------------------------------------
@@ -196,17 +196,17 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
SwWrtShell* pSh = &GetShell();
SdrView* pView = pSh->GetDrawView();
const SfxItemSet* pArgs = rReq.GetArgs();
- BOOL bChanged = pView->GetModel()->IsChanged();
- pView->GetModel()->SetChanged(FALSE);
+ sal_Bool bChanged = pView->GetModel()->IsChanged();
+ pView->GetModel()->SetChanged(sal_False);
GetView().NoRotate();
if (pArgs)
{
if(pView->AreObjectsMarked())
- pView->SetAttrToMarked(*rReq.GetArgs(), FALSE);
+ pView->SetAttrToMarked(*rReq.GetArgs(), sal_False);
else
- pView->SetDefaultAttr(*rReq.GetArgs(), FALSE);
+ pView->SetDefaultAttr(*rReq.GetArgs(), sal_False);
}
else
{
@@ -218,13 +218,13 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
case SID_ATTR_FILL_GRADIENT:
case SID_ATTR_FILL_HATCH:
case SID_ATTR_FILL_BITMAP:
- pDis->Execute(SID_ATTRIBUTES_AREA, FALSE);
+ pDis->Execute(SID_ATTRIBUTES_AREA, sal_False);
break;
case SID_ATTR_LINE_STYLE:
case SID_ATTR_LINE_DASH:
case SID_ATTR_LINE_WIDTH:
case SID_ATTR_LINE_COLOR:
- pDis->Execute(SID_ATTRIBUTES_LINE, FALSE);
+ pDis->Execute(SID_ATTRIBUTES_LINE, sal_False);
break;
}
}
@@ -232,7 +232,7 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
GetShell().SetModified();
else
if (bChanged)
- pView->GetModel()->SetChanged(TRUE);
+ pView->GetModel()->SetChanged(sal_True);
}
/*--------------------------------------------------------------------
@@ -246,7 +246,7 @@ void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet)
if (pSdrView->AreObjectsMarked())
{
- BOOL bDisable = Disable( rSet );
+ sal_Bool bDisable = Disable( rSet );
if( !bDisable )
pSdrView->GetAttributes( rSet );
diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx
index eb571036e322..dd632b66edcb 100644
--- a/sw/source/ui/shells/drawsh.cxx
+++ b/sw/source/ui/shells/drawsh.cxx
@@ -94,16 +94,16 @@ void SwDrawShell::Execute(SfxRequest &rReq)
SdrView *pSdrView = rSh.GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged(FALSE);
+ pSdrView->GetModel()->SetChanged(sal_False);
const SfxPoolItem* pItem;
if(pArgs)
- pArgs->GetItemState(nSlotId, FALSE, &pItem);
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
- BOOL bMirror = TRUE;
+ sal_Bool bMirror = sal_True;
switch (nSlotId)
{
@@ -173,7 +173,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
break;
case FN_FLIP_HORZ_GRAFIC:
- bMirror = FALSE;
+ bMirror = sal_False;
/* no break */
case FN_FLIP_VERT_GRAFIC:
rSh.MirrorSelection( bMirror );
@@ -182,7 +182,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
case SID_FONTWORK:
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if (pArgs)
{
@@ -239,7 +239,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -295,7 +295,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
if (pSdrView->GetModel()->IsChanged())
rSh.SetModified();
else if (bChanged)
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
}
/*--------------------------------------------------------------------
@@ -309,8 +309,8 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
SwWrtShell &rSh = GetShell();
SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
- BOOL bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
if (!bProtected) // Im Parent nachsehen
bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
@@ -336,7 +336,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
case SID_OBJECT_ROTATE:
{
- const BOOL bIsRotate = GetView().IsDrawRotate();
+ const sal_Bool bIsRotate = GetView().IsDrawRotate();
if ( (!bIsRotate && !pSdrView->IsRotateAllowed()) || bProtected )
rSet.DisableItem( nWhich );
else
@@ -365,7 +365,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( nWhich );
else
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
rSet.Put(SfxBoolItem( nWhich , GetView().GetViewFrame()->HasChildWindow(nId)));
}
}
@@ -402,8 +402,8 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
SdrView* pDrView = rSh.GetDrawView();
- BOOL bChanged = pDrView->GetModel()->IsChanged();
- pDrView->GetModel()->SetChanged(FALSE);
+ sal_Bool bChanged = pDrView->GetModel()->IsChanged();
+ pDrView->GetModel()->SetChanged(sal_False);
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
@@ -414,16 +414,16 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq)
if ( pDrView->IsTextEdit() )
{
- pDrView->SdrEndTextEdit( TRUE );
+ pDrView->SdrEndTextEdit( sal_True );
GetView().AttrChangedNotify(&rSh);
}
- if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) ==
+ if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) ==
SFX_ITEM_SET &&
((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE )
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)(GetView().GetViewFrame()->
GetChildWindow(nId)->GetWindow());
@@ -441,7 +441,7 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq)
rSh.SetModified();
else
if (bChanged)
- pDrView->GetModel()->SetChanged(TRUE);
+ pDrView->GetModel()->SetChanged(sal_True);
}
/*************************************************************************
@@ -460,7 +460,7 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
const SdrObject* pObj = NULL;
SvxFontWorkDialog* pDlg = NULL;
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if ( pVFrame->HasChildWindow(nId) )
@@ -473,14 +473,14 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
!((SdrTextObj*) pObj)->HasText() )
{
#define XATTR_ANZ 12
- static const USHORT nXAttr[ XATTR_ANZ ] =
+ static const sal_uInt16 nXAttr[ XATTR_ANZ ] =
{
XATTR_FORMTXTSTYLE, XATTR_FORMTXTADJUST, XATTR_FORMTXTDISTANCE,
XATTR_FORMTXTSTART, XATTR_FORMTXTMIRROR, XATTR_FORMTXTSTDFORM,
XATTR_FORMTXTHIDEFORM, XATTR_FORMTXTOUTLINE, XATTR_FORMTXTSHADOW,
XATTR_FORMTXTSHDWCOLOR, XATTR_FORMTXTSHDWXVAL, XATTR_FORMTXTSHDWYVAL
};
- for( USHORT i = 0; i < XATTR_ANZ; )
+ for( sal_uInt16 i = 0; i < XATTR_ANZ; )
rSet.DisableItem( nXAttr[ i++ ] );
}
else
diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx
index 2bd3a59d0810..e595db36447f 100644
--- a/sw/source/ui/shells/drwbassh.cxx
+++ b/sw/source/ui/shells/drwbassh.cxx
@@ -93,14 +93,14 @@ TYPEINIT1(SwDrawBaseShell,SwBaseShell)
SwDrawBaseShell::SwDrawBaseShell(SwView &_rView):
SwBaseShell( _rView )
{
- GetShell().NoEdit(TRUE);
+ GetShell().NoEdit(sal_True);
SwEditWin& rWin = GetView().GetEditWin();
rWin.SetBezierMode(SID_BEZIER_MOVE);
if ( !_rView.GetDrawFuncPtr() )
- _rView.GetEditWin().StdDrawMode( OBJ_NONE, TRUE );
+ _rView.GetEditWin().StdDrawMode( OBJ_NONE, sal_True );
SwTransferable::CreateSelection( GetShell() );
}
@@ -127,12 +127,12 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SwWrtShell *pSh = &GetShell();
SdrView* pSdrView = pSh->GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged(FALSE);
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
+ pSdrView->GetModel()->SetChanged(sal_False);
const SfxPoolItem* pItem = 0;
if(pArgs)
- pArgs->GetItemState(nSlotId, FALSE, &pItem);
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
//Sonderfall Align per Menue
if(pItem && nSlotId == SID_OBJECT_ALIGN)
@@ -142,11 +142,11 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
nSlotId++;
}
- BOOL bAlignPossible = pSh->IsAlignPossible();
+ sal_Bool bAlignPossible = pSh->IsAlignPossible();
- BOOL bTopParam = TRUE, bBottomParam = TRUE;
- BOOL bNotify = FALSE;
- BOOL bDone = FALSE;
+ sal_Bool bTopParam = sal_True, bBottomParam = sal_True;
+ sal_Bool bNotify = sal_False;
+ sal_Bool bDone = sal_False;
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
switch (nSlotId)
@@ -176,14 +176,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
- SfxAbstractDialog* pDlg = pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh, TRUE, RC_DLG_SWWRAPDLG );
+ SfxAbstractDialog* pDlg = pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh, sal_True, RC_DLG_SWWRAPDLG );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if (pDlg->Execute() == RET_OK)
{
const SfxPoolItem* pWrapItem;
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
- if(SFX_ITEM_SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, FALSE, &pWrapItem))
+ if(SFX_ITEM_SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, sal_False, &pWrapItem))
{
short nLayer = ((const SfxInt16Item*)pWrapItem)->GetValue();
if (nLayer == 1)
@@ -212,12 +212,12 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
SfxAbstractTabDialog *pDlg=NULL;
- BOOL bCaption = FALSE;
+ sal_Bool bCaption = sal_False;
// Erlaubte Verankerungen:
short nAnchor = pSh->GetAnchorId();
- USHORT nAllowedAnchors = SVX_OBJ_AT_CNTNT|SVX_OBJ_IN_CNTNT;
- USHORT nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell());
+ sal_uInt16 nAllowedAnchors = SVX_OBJ_AT_CNTNT|SVX_OBJ_IN_CNTNT;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell());
if( !((HTMLMODE_ON & nHtmlMode) && (0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))) )
nAllowedAnchors |= SVX_OBJ_PAGE;
@@ -225,7 +225,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
nAllowedAnchors |= SVX_OBJ_AT_FLY;
if (pObj->GetObjIdentifier() == OBJ_CAPTION )
- bCaption = TRUE;
+ bCaption = sal_True;
if (bCaption)
{
@@ -254,19 +254,19 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
}
SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked());
- const USHORT* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
+ const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
SfxItemSet aSet( *aNewAttr.GetPool(), pRange );
FieldUnit eMetric = ::GetDfltMetric(0 != dynamic_cast<SwWebView*>(&GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
- aSet.Put( aNewAttr, FALSE );
+ aSet.Put( aNewAttr, sal_False );
if (bCaption)
pSdrView->GetAttributes( aSet );
aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor));
- BOOL bRTL;
- aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(TRUE, bRTL)));
+ sal_Bool bRTL;
+ aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(sal_True, bRTL)));
aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_RTL_TEXT, bRTL));
SwFrmFmt* pFrmFmt = FindFrmFmt( pObj );
@@ -301,11 +301,11 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if (bCaption)
pSdrView->SetAttributes(*pOutSet);
- BOOL bPosCorr =
+ sal_Bool bPosCorr =
SFX_ITEM_SET != pOutSet->GetItemState(
- SID_ATTR_TRANSFORM_POS_X, FALSE ) &&
+ SID_ATTR_TRANSFORM_POS_X, sal_False ) &&
SFX_ITEM_SET != pOutSet->GetItemState(
- SID_ATTR_TRANSFORM_POS_Y, FALSE );
+ SID_ATTR_TRANSFORM_POS_Y, sal_False );
SfxItemSet aFrmAttrSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END - 1);
@@ -313,11 +313,11 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem* pAnchorItem;
if(SFX_ITEM_SET == pOutSet->GetItemState(
- SID_ATTR_TRANSFORM_ANCHOR, FALSE, &pAnchorItem))
+ SID_ATTR_TRANSFORM_ANCHOR, sal_False, &pAnchorItem))
{
if(!bSingleSelection)
pSh->ChgAnchor(((const SfxInt16Item*)pAnchorItem)
- ->GetValue(), FALSE, bPosCorr );
+ ->GetValue(), sal_False, bPosCorr );
else
{
SwFmtAnchor aAnchor(pFrmFmt->GetAnchor());
@@ -329,10 +329,10 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem* pHoriRelation = 0;
const SfxPoolItem* pHoriPosition = 0;
const SfxPoolItem* pHoriMirror = 0;
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_ORIENT, FALSE, &pHoriOrient);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_RELATION, FALSE, &pHoriRelation);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_POSITION, FALSE, &pHoriPosition);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_MIRROR, FALSE, &pHoriMirror);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_ORIENT, sal_False, &pHoriOrient);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_RELATION, sal_False, &pHoriRelation);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_POSITION, sal_False, &pHoriPosition);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_MIRROR, sal_False, &pHoriMirror);
if(pHoriOrient || pHoriRelation || pHoriPosition || pHoriMirror)
{
if(pHoriOrient)
@@ -351,9 +351,9 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem* pVertOrient = 0;
const SfxPoolItem* pVertRelation = 0;
const SfxPoolItem* pVertPosition = 0;
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_ORIENT, FALSE, &pVertOrient);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_RELATION, FALSE, &pVertRelation);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_POSITION, FALSE, &pVertPosition);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_ORIENT, sal_False, &pVertOrient);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_RELATION, sal_False, &pVertRelation);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_POSITION, sal_False, &pVertPosition);
if(pVertOrient || pVertRelation || pVertPosition )
{
if(pVertOrient)
@@ -367,14 +367,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
aFrmAttrSet.Put( aVOrient );
}
const SfxPoolItem* pFollowItem = 0;
- pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, FALSE, &pFollowItem);
+ pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, sal_False, &pFollowItem);
if(pFollowItem)
aFrmAttrSet.Put(*pFollowItem);
if(aFrmAttrSet.Count())
pSh->SetDrawingAttr(aFrmAttrSet);
- rBind.InvalidateAll(FALSE);
+ rBind.InvalidateAll(sal_False);
// --> OD 2004-07-14 #i30451#
pSh->EndUndo( UNDO_INSFMTATTR );
@@ -393,7 +393,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
case FN_BACKSPACE:
if (pSh->IsObjSelected() && !pSdrView->IsTextEdit())
{
- bDone = TRUE;
+ bDone = sal_True;
if( GetView().IsDrawRotate() )
{
@@ -423,7 +423,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
// #105852# FME
// pSh->NoEdit();
}
- bNotify = TRUE;
+ bNotify = sal_True;
}
break;
@@ -447,7 +447,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if (pSh->IsGroupSelected())
{
pSdrView->EnterMarkedGroup();
- rBind.InvalidateAll(FALSE);
+ rBind.InvalidateAll(sal_False);
}
break;
@@ -473,7 +473,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if( rMarkList.GetMarkCount() == 1 && bAlignPossible )
{ // Objekte nicht aneinander ausrichten
- USHORT nAnchor = pSh->GetAnchorId();
+ sal_uInt16 nAnchor = pSh->GetAnchorId();
if (nAnchor == FLY_AS_CHAR)
{
sal_Int16 nVertOrient = -1;
@@ -536,14 +536,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
break;
case FN_FRAME_UP:
- bTopParam = FALSE;
+ bTopParam = sal_False;
/* no break */
case SID_FRAME_TO_TOP:
pSh->SelectionToTop( bTopParam );
break;
case FN_FRAME_DOWN:
- bBottomParam = FALSE;
+ bBottomParam = sal_False;
/* no break */
case SID_FRAME_TO_BOTTOM:
pSh->SelectionToBottom( bBottomParam );
@@ -551,7 +551,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
case FN_NAME_SHAPE:
{
- bDone = TRUE;
+ bDone = sal_True;
if(1L == pSdrView->GetMarkedObjectCount())
{
@@ -583,7 +583,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
// #i68101#
case FN_TITLE_DESCRIPTION_SHAPE:
{
- bDone = TRUE;
+ bDone = sal_True;
if(1L == pSdrView->GetMarkedObjectCount())
{
@@ -625,7 +625,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if (pSdrView->GetModel()->IsChanged())
pSh->SetModified();
else if (bChanged)
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
// 40220: Nach dem Loeschen von DrawObjekten ueber die API GPF durch Selbstzerstoerung
if(bNotify)
GetView().AttrChangedNotify(pSh); // ggf Shellwechsel...
@@ -686,8 +686,8 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
SwWrtShell &rSh = GetShell();
SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
- BOOL bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
if (!bProtected) // Im Parent nachsehen
bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
@@ -778,9 +778,9 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
--------------------------------------------------------------------*/
-BOOL SwDrawBaseShell::Disable(SfxItemSet& rSet, USHORT nWhich)
+sal_Bool SwDrawBaseShell::Disable(SfxItemSet& rSet, sal_uInt16 nWhich)
{
- BOOL bDisable = GetShell().IsSelObjProtected(FLYPROTECT_CONTENT);
+ sal_Bool bDisable = GetShell().IsSelObjProtected(FLYPROTECT_CONTENT);
if (bDisable)
{
@@ -832,8 +832,8 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->bFollowTextFlow,
pValidation->bMirror, NULL, &pValidation->aPercentSize);
- BOOL bRTL;
- BOOL bIsInVertical = pSh->IsFrmVertical(TRUE, bRTL);
+ sal_Bool bRTL;
+ sal_Bool bIsInVertical = pSh->IsFrmVertical(sal_True, bRTL);
if(bIsInVertical)
{
Point aPos(aBoundRect.Pos());
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index c95ad7e64c1c..c9381d68db04 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -193,7 +193,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SvxScriptSetItem aSetItem( nSlot, *pPool2 );
// #i78017 establish the same behaviour as in Writer
- USHORT nScriptTypes = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nScriptTypes = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
if (nSlot == SID_ATTR_CHAR_FONT)
nScriptTypes = pOLV->GetSelectedScriptType();
@@ -308,7 +308,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SwView* pView = &GetView();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxItemSet aDlgAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END);
// util::Language gibts an der EditEngine nicht! Daher nicht im Set.
@@ -321,7 +321,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( pView->GetWindow(), *pView, aDlgAttr, DLG_CHAR,0, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet )
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -380,7 +380,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -403,7 +403,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
{
SwView* pView = &GetView();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxItemSet aDlgAttr(GetPool(),
EE_ITEMS_START, EE_ITEMS_END,
SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
@@ -429,7 +429,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -523,7 +523,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
sal_Bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT;
const SfxPoolItem* pPoolItem;
- if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, TRUE, &pPoolItem ) )
+ if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, sal_True, &pPoolItem ) )
{
if( !( (SfxBoolItem*)pPoolItem)->GetValue() )
bLeftToRight = !bLeftToRight;
@@ -533,8 +533,8 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
0 );
- USHORT nAdjust = SVX_ADJUST_LEFT;
- if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, TRUE, &pPoolItem ) )
+ sal_uInt16 nAdjust = SVX_ADJUST_LEFT;
+ if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, sal_True, &pPoolItem ) )
nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue();
if( bLeftToRight )
@@ -594,8 +594,8 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
while(nWhich)
{
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
- BOOL bFlag = FALSE;
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
+ sal_Bool bFlag = sal_False;
switch( nSlotId )
{
case SID_LANGUAGE_STATUS://20412:
@@ -679,7 +679,7 @@ ASK_ESCAPE:
// disable "Thesaurus" if the language is not supported
const SfxPoolItem &rItem = GetShell().GetDoc()->GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage())) );
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage())) );
LanguageType nLang = ((const SvxLanguageItem &) rItem).GetLanguage();
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
@@ -814,11 +814,11 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet)
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich = aIter.FirstWhich();
- USHORT nScriptType = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScriptType = pOLV->GetSelectedScriptType();
while(nWhich)
{
sal_uInt16 nEEWhich = 0;
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
case SID_ATTR_CHAR_FONT:
@@ -830,7 +830,7 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet)
if( !pEditPool )
pEditPool = aEditAttr.GetPool();
SvxScriptSetItem aSetItem( nSlotId, *pEditPool );
- aSetItem.GetItemSet().Put( aEditAttr, FALSE );
+ aSetItem.GetItemSet().Put( aEditAttr, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
if( pI )
rSet.Put( *pI, nWhich );
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index 78a9b05ce70b..8a0c3def7e3f 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -127,7 +127,7 @@ void SwDrawTextShell::Init()
if( !pOutliner )
return ;
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
- ULONG nCtrl = pOutliner->GetControlWord();
+ sal_uLong nCtrl = pOutliner->GetControlWord();
nCtrl |= EE_CNTRL_AUTOCORRECT;
SetUndoManager(&pOutliner->GetUndoManager());
@@ -160,7 +160,7 @@ SwDrawTextShell::SwDrawTextShell(SwView &rV) :
Init();
- rSh.NoEdit(TRUE);
+ rSh.NoEdit(sal_True);
SetName(String::CreateFromAscii("ObjectText"));
SetHelpId(SW_DRWTXTSHELL);
}
@@ -202,7 +202,7 @@ SwWrtShell& SwDrawTextShell::GetShell()
void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -239,7 +239,7 @@ void SwDrawTextShell::SetAttrToMarked(const SfxItemSet& rAttr)
-BOOL SwDrawTextShell::IsTextEdit()
+sal_Bool SwDrawTextShell::IsTextEdit()
{
return pSdrView->IsTextEdit();
}
@@ -254,7 +254,7 @@ void SwDrawTextShell::ExecFontWork(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if ( rReq.GetArgs() )
{
@@ -276,7 +276,7 @@ void SwDrawTextShell::ExecFontWork(SfxRequest& rReq)
void SwDrawTextShell::StateFontWork(SfxItemSet& rSet)
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
rSet.Put(SfxBoolItem(SID_FONTWORK, GetView().GetViewFrame()->HasChildWindow(nId)));
}
@@ -312,12 +312,12 @@ void SwDrawTextShell::ExecFormText(SfxRequest& rReq)
rTempView.AttrChangedNotify(&rSh);
}
- if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) ==
+ if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) ==
SFX_ITEM_SET &&
((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE )
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)(
pVFrame->GetChildWindow(nId)->GetWindow());
@@ -348,7 +348,7 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
const SdrObject* pObj = NULL;
SvxFontWorkDialog* pDlg = NULL;
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if ( pVFrame->HasChildWindow(nId) )
@@ -361,13 +361,13 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
!((SdrTextObj*) pObj)->HasText() )
{
#define XATTR_ANZ 12
- static const USHORT nXAttr[ XATTR_ANZ ] =
+ static const sal_uInt16 nXAttr[ XATTR_ANZ ] =
{ XATTR_FORMTXTSTYLE, XATTR_FORMTXTADJUST, XATTR_FORMTXTDISTANCE,
XATTR_FORMTXTSTART, XATTR_FORMTXTMIRROR, XATTR_FORMTXTSTDFORM,
XATTR_FORMTXTHIDEFORM, XATTR_FORMTXTOUTLINE, XATTR_FORMTXTSHADOW,
XATTR_FORMTXTSHDWCOLOR, XATTR_FORMTXTSHDWXVAL, XATTR_FORMTXTSHDWYVAL
};
- for( USHORT i = 0; i < XATTR_ANZ; )
+ for( sal_uInt16 i = 0; i < XATTR_ANZ; )
rSet.DisableItem( nXAttr[ i++ ] );
}
else
@@ -524,7 +524,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
const SfxPoolItem* pItem = 0;
if(pNewAttrs)
{
- pNewAttrs->GetItemState(nSlot, FALSE, &pItem );
+ pNewAttrs->GetItemState(nSlot, sal_False, &pItem );
pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue());
}
break;
@@ -535,9 +535,9 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner();
if(pOutliner)
{
- ULONG nParaCount = pOutliner->GetParagraphCount();
+ sal_uLong nParaCount = pOutliner->GetParagraphCount();
if (nParaCount > 0)
- pOLV->SelectRange(0L, USHORT(nParaCount) );
+ pOLV->SelectRange(0L, sal_uInt16(nParaCount) );
}
}
break;
@@ -545,7 +545,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
case FN_FORMAT_RESET: // delete hard text attributes
{
pOLV->RemoveAttribsKeepLanguages( true );
- pOLV->GetEditView().GetEditEngine()->RemoveFields(TRUE);
+ pOLV->GetEditView().GetEditEngine()->RemoveFields(sal_True);
rReq.Done();
}
break;
@@ -572,7 +572,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog(
&(GetView().GetViewFrame()->GetWindow()),
&aNewAttr, pSdrView );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if (nResult == RET_OK)
{
@@ -593,7 +593,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
return;
}
- GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
if (IsTextEdit() && pOLV->GetOutliner()->IsModified())
rSh.SetModified();
@@ -609,17 +609,17 @@ void SwDrawTextShell::ExecUndo(SfxRequest &rReq)
{
if( IsTextEdit() )
{
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
const SfxItemSet* pArgs = rReq.GetArgs();
if( pArgs )
{
- USHORT nId = rReq.GetSlot(), nCnt = 1;
+ sal_uInt16 nId = rReq.GetSlot(), nCnt = 1;
const SfxPoolItem* pItem;
switch( nId )
{
case SID_UNDO:
case SID_REDO:
- if( SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem ) &&
+ if( SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem ) &&
1 < (nCnt = ((SfxUInt16Item*)pItem)->GetValue()) )
{
// then we make by ourself.
@@ -633,7 +633,7 @@ void SwDrawTextShell::ExecUndo(SfxRequest &rReq)
while( nCnt-- )
pUndoManager->Redo(0);
}
- bCallBase = FALSE;
+ bCallBase = sal_False;
GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
}
break;
@@ -660,7 +660,7 @@ void SwDrawTextShell::StateUndo(SfxItemSet &rSet)
SfxViewFrame *pSfxViewFrame = GetView().GetViewFrame();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
switch ( nWhich )
@@ -671,7 +671,7 @@ void SwDrawTextShell::StateUndo(SfxItemSet &rSet)
SfxUndoManager* pUndoManager = GetUndoManager();
if( pUndoManager )
{
- UniString (SfxUndoManager:: *fnGetComment)( USHORT ) const;
+ UniString (SfxUndoManager:: *fnGetComment)( sal_uInt16 ) const;
sal_uInt16 nCount;
if( SID_GETUNDOSTRINGS == nWhich )
@@ -772,7 +772,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem);
String sSym;
String sFontName;
@@ -780,25 +780,25 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
{
sSym = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
sFontName = pFontItem->GetValue();
}
SfxItemSet aSet(pOLV->GetAttribs());
- USHORT nScript = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScript = pOLV->GetSelectedScriptType();
SvxFontItem aSetDlgFont( RES_CHRATR_FONT );
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aSetDlgFont = *(SvxFontItem*)pI;
else
aSetDlgFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
SID_ATTR_CHAR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
if (!sFontName.Len())
sFontName = aSetDlgFont.GetFamilyName();
}
@@ -807,7 +807,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
if(!sSym.Len())
{
SfxAllItemSet aAllSet( GetPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
SwViewOption aOpt(*rView.GetWrtShell().GetViewOptions());
String sSymbolFont = aOpt.GetSymbolFont();
@@ -820,11 +820,11 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet,
rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if( nResult == RET_OK )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pFontItem )
{
aFont.SetName( pFontItem->GetFamilyName() );
@@ -849,7 +849,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
// nicht flackern
pOLV->HideCursor();
SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner();
- pOutliner->SetUpdateMode(FALSE);
+ pOutliner->SetUpdateMode(sal_False);
SfxItemSet aOldSet( pOLV->GetAttribs() );
SfxItemSet aFontSet( *aOldSet.GetPool(),
@@ -887,7 +887,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
pOLV->SetAttribs( aFontSet );
// ab jetzt wieder anzeigen
- pOutliner->SetUpdateMode(TRUE);
+ pOutliner->SetUpdateMode(sal_True);
pOLV->ShowCursor();
rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) );
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index 1bb2ae01ba6e..07d88ea5ac5d 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -122,10 +122,10 @@ void SwFrameShell::Execute(SfxRequest &rReq)
{
//Erstmal die, die keinen FrmMgr benoetigen.
SwWrtShell &rSh = GetShell();
- BOOL bMore = FALSE;
+ sal_Bool bMore = sal_False;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
@@ -146,11 +146,11 @@ void SwFrameShell::Execute(SfxRequest &rReq)
break;
case FN_FRAME_UP:
- rSh.SelectionToTop( FALSE );
+ rSh.SelectionToTop( sal_False );
break;
case FN_FRAME_DOWN:
- rSh.SelectionToBottom( FALSE );
+ rSh.SelectionToBottom( sal_False );
break;
case FN_INSERT_FRAME:
if (!pArgs)
@@ -165,15 +165,15 @@ void SwFrameShell::Execute(SfxRequest &rReq)
else
{
// Rahmen existiert bereits, nur Spaltenanzahl wird geaendert
- USHORT nCols = 1;
- if(pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET)
+ sal_uInt16 nCols = 1;
+ if(pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET)
nCols = ((SfxUInt16Item *)pItem)->GetValue();
SfxItemSet aSet(GetPool(),RES_COL,RES_COL);
rSh.GetFlyFrmAttr( aSet );
SwFmtCol aCol((const SwFmtCol&)aSet.Get(RES_COL));
// GutterWidth wird nicht immer uebergeben, daher erst besorgen (siehe view2: Execute auf diesen Slot)
- USHORT nGutterWidth = aCol.GetGutterWidth();
+ sal_uInt16 nGutterWidth = aCol.GetGutterWidth();
if(!nCols )
nCols++;
aCol.Init(nCols, nGutterWidth, aCol.GetWishWidth());
@@ -197,7 +197,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
case SID_HYPERLINK_SETLINK:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, sal_False, &pItem))
{
const SvxHyperlinkItem& rHLinkItem = *(const SvxHyperlinkItem *)pItem;
const String& rURL = rHLinkItem.GetURL();
@@ -212,7 +212,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if (sOldName.ToUpperAscii() != sFlyName.ToUpperAscii())
{
String sName(sOldName);
- USHORT i = 1;
+ sal_uInt16 i = 1;
while (rSh.FindFlyByName(sName))
{
sName = sOldName;
@@ -221,7 +221,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
rSh.SetFlyName(sName);
}
- aURL.SetURL( rURL, FALSE );
+ aURL.SetURL( rURL, sal_False );
aURL.SetTargetFrameName(rTarget);
aSet.Put( aURL );
@@ -283,7 +283,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -298,7 +298,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
delete pDialog;
}
break;
- default: bMore = TRUE;
+ default: bMore = sal_True;
}
if ( !bMore )
@@ -306,9 +306,9 @@ void SwFrameShell::Execute(SfxRequest &rReq)
return;
}
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
- BOOL bUpdateMgr = TRUE;
- BOOL bCopyToFmt = FALSE;
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
+ sal_Bool bUpdateMgr = sal_True;
+ sal_Bool bCopyToFmt = sal_False;
switch ( nSlot )
{
case SID_OBJECT_ALIGN_MIDDLE:
@@ -371,18 +371,18 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if(pArgs)
{
aMgr.SetAttrSet( *pArgs );
- bCopyToFmt = TRUE;
+ bCopyToFmt = sal_True;
}
}
break;
case SID_ATTR_ULSPACE:
case SID_ATTR_LRSPACE:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem))
{
aMgr.SetAttrSet( *pArgs );
if(SID_ATTR_ULSPACE == nSlot && SID_ATTR_ULSPACE == nSlot)
- bCopyToFmt = TRUE;
+ bCopyToFmt = sal_True;
}
}
break;
@@ -392,7 +392,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if (nSel & nsSelectionType::SEL_GRF)
{
rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_GRAFIC_DLG);
- bUpdateMgr = FALSE;
+ bUpdateMgr = sal_False;
}
else
{
@@ -452,23 +452,23 @@ void SwFrameShell::Execute(SfxRequest &rReq)
const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() );
aSet.Put( SfxBoolItem( FN_OLE_IS_MATH, xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) );
- UINT16 nDefPage = 0;
- if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, FALSE, &pItem) == SFX_ITEM_SET)
+ sal_uInt16 nDefPage = 0;
+ if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, sal_False, &pItem) == SFX_ITEM_SET)
nDefPage = ((SfxUInt16Item *)pItem)->GetValue();
aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame()));
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric) ));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric) ));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_STD,
GetView().GetViewFrame(),
GetView().GetWindow(),
- aSet, FALSE,
+ aSet, sal_False,
nSel & nsSelectionType::SEL_GRF ? DLG_FRM_GRF :
nSel & nsSelectionType::SEL_OLE ? DLG_FRM_OLE :
DLG_FRM_STD,
- FALSE,
+ sal_False,
nDefPage);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
@@ -479,13 +479,13 @@ void SwFrameShell::Execute(SfxRequest &rReq)
{
rReq.Done(*pOutSet);
if(nSel & nsSelectionType::SEL_OLE &&
- SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, TRUE, &pItem))
+ SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, sal_True, &pItem))
{
SwViewOption aUsrPref( *pVOpt );
aUsrPref.SetKeepRatio(((const SfxBoolItem*)pItem)->GetValue());
SW_MOD()->ApplyUsrPref(aUsrPref, &GetView());
}
- if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, TRUE, &pItem))
+ if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, sal_True, &pItem))
{
// --> OD 2009-07-13 #i73249#
// rSh.SetAlternateText(((const SfxStringItem*)pItem)->GetValue());
@@ -499,7 +499,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
rSh.AutoUpdateFrame(pFmt, *pOutSet);
// alles, dass das Format nicht kann, muss hart
// gesetzt werden
- if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, sal_False, &pItem))
rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue());
SfxItemSet aShellSet(GetPool(), RES_FRM_SIZE, RES_FRM_SIZE,
RES_SURROUND, RES_SURROUND,
@@ -508,7 +508,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
0);
aShellSet.Put(*pOutSet);
aMgr.SetAttrSet(aShellSet);
- if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, sal_False, &pItem))
rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue());
}
else
@@ -517,7 +517,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
const SwFrmFmt* pCurrFlyFmt = rSh.GetFlyFrmFmt();
if(SFX_ITEM_SET ==
pOutSet->GetItemState(FN_PARAM_CHAIN_PREVIOUS,
- FALSE, &pItem))
+ sal_False, &pItem))
{
rSh.HideChainMarker();
@@ -551,7 +551,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
rSh.SetChainMarker();
}
if(SFX_ITEM_SET ==
- pOutSet->GetItemState(FN_PARAM_CHAIN_NEXT, FALSE,
+ pOutSet->GetItemState(FN_PARAM_CHAIN_NEXT, sal_False,
&pItem))
{
rSh.HideChainMarker();
@@ -588,7 +588,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
}
else
- bUpdateMgr = FALSE;
+ bUpdateMgr = sal_False;
delete pDlg;
}
}
@@ -596,19 +596,19 @@ void SwFrameShell::Execute(SfxRequest &rReq)
case FN_FRAME_MIRROR_ON_EVEN_PAGES:
{
SwFmtHoriOrient aHori(aMgr.GetHoriOrient());
- BOOL bMirror = !aHori.IsPosToggle();
+ sal_Bool bMirror = !aHori.IsPosToggle();
aHori.SetPosToggle(bMirror);
SfxItemSet aSet(GetPool(), RES_HORI_ORIENT, RES_HORI_ORIENT);
aSet.Put(aHori);
aMgr.SetAttrSet(aSet);
- bCopyToFmt = TRUE;
+ bCopyToFmt = sal_True;
rReq.SetReturnValue(SfxBoolItem(nSlot, bMirror));
}
break;
// --> OD 2009-07-14 #i73249#
case FN_TITLE_DESCRIPTION_SHAPE:
{
- bUpdateMgr = FALSE;
+ bUpdateMgr = sal_False;
SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
if ( pSdrView &&
pSdrView->GetMarkedObjectCount() == 1 )
@@ -664,7 +664,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
void SwFrameShell::GetState(SfxItemSet& rSet)
{
SwWrtShell &rSh = GetShell();
- BOOL bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell());
+ sal_Bool bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell());
if (rSh.IsFrmSelected())
{
SfxItemSet aSet( rSh.GetAttrPool(),
@@ -675,16 +675,16 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
0 );
rSh.GetFlyFrmAttr( aSet );
- BOOL bProtect = rSh.IsSelObjProtected(FLYPROTECT_POS);
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bProtect = rSh.IsSelObjProtected(FLYPROTECT_POS);
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
bProtect |= bParentCntProt;
- const USHORT eFrmType = rSh.GetFrmType(0,TRUE);
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ const sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -706,7 +706,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
case RES_PRINT:
case RES_SURROUND:
{
- rSet.Put(aSet.Get(GetPool().GetWhich(nWhich), TRUE ));
+ rSet.Put(aSet.Get(GetPool().GetWhich(nWhich), sal_True ));
}
break;
case SID_OBJECT_ALIGN_LEFT :
@@ -742,7 +742,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( nWhich );
else
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if (eFrmType & FRMTYPE_FLY_INCNT)
{
switch (nWhich)
@@ -807,7 +807,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
SfxItemSet aURLSet(GetPool(), RES_URL, RES_URL);
rSh.GetFlyFrmAttr( aURLSet );
- if(SFX_ITEM_SET == aURLSet.GetItemState(RES_URL, TRUE, &pItem))
+ if(SFX_ITEM_SET == aURLSet.GetItemState(RES_URL, sal_True, &pItem))
{
const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem;
aHLinkItem.SetURL(pFmtURL->GetURL());
@@ -837,7 +837,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
}
else
{
- BOOL bChainMode = rSh.GetView().GetEditWin().IsChainMode();
+ sal_Bool bChainMode = rSh.GetView().GetEditWin().IsChainMode();
rSet.Put( SfxBoolItem( FN_FRAME_CHAIN, bChainMode ) );
}
}
@@ -928,7 +928,7 @@ SwFrameShell::~SwFrameShell()
void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
- BOOL bDefault = FALSE;
+ sal_Bool bDefault = sal_False;
if (!rSh.IsFrmSelected())
return;
@@ -943,7 +943,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
const SvxBoxItem& rBoxItem = (const SvxBoxItem&)aFrameSet.Get(RES_BOX);
if (pPoolBoxItem == &rBoxItem)
- bDefault = TRUE;
+ bDefault = sal_True;
SvxBoxItem aBoxItem(rBoxItem);
@@ -956,7 +956,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
{
case SID_ATTR_BORDER:
{
- if (pArgs->GetItemState(RES_BOX, TRUE, &pItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(RES_BOX, sal_True, &pItem) == SFX_ITEM_SET)
{
SvxBoxItem aNewBox(*((SvxBoxItem *)pItem));
const SvxBorderLine* pBorderLine;
@@ -1000,7 +1000,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
case SID_FRAME_LINESTYLE:
{
- if (pArgs->GetItemState(SID_FRAME_LINESTYLE, FALSE, &pItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(SID_FRAME_LINESTYLE, sal_False, &pItem) == SFX_ITEM_SET)
{
const SvxLineItem* pLineItem =
(const SvxLineItem*)pItem;
@@ -1054,7 +1054,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
case SID_FRAME_LINECOLOR:
{
- if (pArgs->GetItemState(SID_FRAME_LINECOLOR, FALSE, &pItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(SID_FRAME_LINECOLOR, sal_False, &pItem) == SFX_ITEM_SET)
{
const Color& rNewColor = ((const SvxColorItem*)pItem)->GetValue();
@@ -1121,7 +1121,7 @@ void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBo
void SwFrameShell::GetLineStyleState(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
if (bParentCntProt)
{
diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index 037758450081..4b94089ded3d 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -96,7 +96,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_TWAIN_TRANSFER:
@@ -118,7 +118,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
{
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, rSh.IsFrmSelected() ?
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, rSh.IsFrmSelected() ?
FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF);
const SwViewOption* pVOpt = rSh.GetViewOptions();
SwViewOption aUsrPref( *pVOpt );
@@ -140,10 +140,10 @@ void SwGrfShell::Execute(SfxRequest &rReq)
FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
0);
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
aSet.Put(SfxUInt16Item(SID_HTML_MODE, nHtmlMode));
FieldUnit eMetric = ::GetDfltMetric((0 != (nHtmlMode&HTMLMODE_ON)));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
const SwRect* pRect = &rSh.GetAnyCurRect(RECT_PAGE);
SwFmtFrmSize aFrmSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height());
@@ -232,7 +232,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_GRF,
GetView().GetViewFrame(),
GetView().GetWindow(),
- aSet, FALSE, DLG_FRM_GRF);
+ aSet, sal_False, DLG_FRM_GRF);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if( pDlg->Execute() )
{
@@ -243,7 +243,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
rReq.Done(*pSet);
// change the 2 frmsize SizeItems to the correct SwFrmSizeItem
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_FRMSIZE, FALSE, &pItem ))
+ SID_ATTR_GRAF_FRMSIZE, sal_False, &pItem ))
{
SwFmtFrmSize aSize;
const Size& rSz = ((SvxSizeItem*)pItem)->GetSize();
@@ -251,11 +251,11 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSize.SetHeight( rSz.Height() );
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_FRMSIZE_PERCENT, FALSE, &pItem ))
+ SID_ATTR_GRAF_FRMSIZE_PERCENT, sal_False, &pItem ))
{
const Size& rRelativeSize = ((SvxSizeItem*)pItem)->GetSize();
- aSize.SetWidthPercent( static_cast< BYTE >( rRelativeSize.Width() ) );
- aSize.SetHeightPercent( static_cast< BYTE >( rRelativeSize.Height() ) );
+ aSize.SetWidthPercent( static_cast< sal_uInt8 >( rRelativeSize.Width() ) );
+ aSize.SetHeightPercent( static_cast< sal_uInt8 >( rRelativeSize.Height() ) );
}
pSet->Put( aSize );
}
@@ -279,20 +279,20 @@ void SwGrfShell::Execute(SfxRequest &rReq)
}
aMgr.UpdateFlyFrm();
- BOOL bApplyUsrPref = FALSE;
+ sal_Bool bApplyUsrPref = sal_False;
if (SFX_ITEM_SET == pSet->GetItemState(
- FN_KEEP_ASPECT_RATIO, TRUE, &pItem ))
+ FN_KEEP_ASPECT_RATIO, sal_True, &pItem ))
{
aUsrPref.SetKeepRatio(
((const SfxBoolItem*)pItem)->GetValue() );
- bApplyUsrPref = TRUE;
+ bApplyUsrPref = sal_True;
}
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_KEEP_ZOOM, TRUE, &pItem ))
+ SID_ATTR_GRAF_KEEP_ZOOM, sal_True, &pItem ))
{
aUsrPref.SetGrfKeepZoom(
((const SfxBoolItem*)pItem)->GetValue() );
- bApplyUsrPref = TRUE;
+ bApplyUsrPref = sal_True;
}
if( bApplyUsrPref )
@@ -300,7 +300,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
// and now set all the graphic attributes and other stuff
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_GRAPHIC, TRUE, &pItem ))
+ SID_ATTR_GRAF_GRAPHIC, sal_True, &pItem ))
{
if( ((SvxBrushItem*)pItem)->GetGraphicLink() )
sGrfNm = *((SvxBrushItem*)pItem)->GetGraphicLink();
@@ -315,7 +315,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if( sGrfNm.Len() )
{
SwDocShell* pDocSh = GetView().GetDocShell();
- SwWait aWait( *pDocSh, TRUE );
+ SwWait aWait( *pDocSh, sal_True );
SfxMedium* pMedium = pDocSh->GetMedium();
INetURLObject aAbs;
if( pMedium )
@@ -327,7 +327,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
}
}
if ( SFX_ITEM_SET == pSet->GetItemState(
- FN_SET_FRM_ALT_NAME, TRUE, &pItem ))
+ FN_SET_FRM_ALT_NAME, sal_True, &pItem ))
{
// --> OD 2009-07-13 #i73249#
// rSh.SetAlternateText(
@@ -368,7 +368,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
void SwGrfShell::ExecAttr( SfxRequest &rReq )
{
- USHORT nGrfType;
+ sal_uInt16 nGrfType;
if( CNT_GRF == GetShell().GetCntType() &&
( GRAPHIC_BITMAP == ( nGrfType = GetShell().GetGraphicType()) ||
GRAPHIC_GDIMETAFILE == nGrfType ))
@@ -377,8 +377,8 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
RES_GRFATR_END -1 );
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nSlot = rReq.GetSlot();
- if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, FALSE, &pItem ))
+ sal_uInt16 nSlot = rReq.GetSlot();
+ if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, sal_False, &pItem ))
pItem = 0;
switch( nSlot )
@@ -389,7 +389,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
GetShell().GetCurAttr( aGrfSet );
SwMirrorGrf aMirror( (SwMirrorGrf&)aGrfSet.Get(
RES_GRFATR_MIRRORGRF ) );
- USHORT nMirror = aMirror.GetValue();
+ sal_uInt16 nMirror = aMirror.GetValue();
if( FN_FLIP_VERT_GRAFIC == nSlot )
switch( nMirror )
{
@@ -517,27 +517,27 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
SwWrtShell &rSh = GetShell();
SfxItemSet aCoreSet( GetPool(), aNoTxtNodeSetRange );
rSh.GetCurAttr( aCoreSet );
- BOOL bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
- BOOL bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
+ sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
+ sal_Bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
// --> OD 2006-11-03 #i59688#
-// BOOL bSwappedOut = rSh.IsGrfSwapOut( TRUE );
-// BOOL bBitmapType = !bSwappedOut && GRAPHIC_BITMAP == rSh.GetGraphicType();
+// sal_Bool bSwappedOut = rSh.IsGrfSwapOut( sal_True );
+// sal_Bool bBitmapType = !bSwappedOut && GRAPHIC_BITMAP == rSh.GetGraphicType();
// <--
SetGetStateSet( &rSet );
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
- BOOL bDisable = bParentCntProt;
+ sal_Bool bDisable = bParentCntProt;
switch( nWhich )
{
case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
case SID_TWAIN_TRANSFER:
if( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
break;
case FN_SAVE_GRAPHIC:
if( rSh.GetGraphicType() == GRAPHIC_NONE )
@@ -546,7 +546,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_COLOR_SETTINGS:
{
if ( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
else
{
svx::ToolboxAccess aToolboxAccess( TOOLBOX_NAME );
@@ -606,7 +606,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_ATTR_GRAF_GAMMA:
if( !bParentCntProt )
- rSet.Put( SfxUInt32Item( nWhich, static_cast< UINT32 >(
+ rSet.Put( SfxUInt32Item( nWhich, static_cast< sal_uInt32 >(
( (SwGammaGrf&)aCoreSet.Get( RES_GRFATR_GAMMA ) ).GetValue() * 100 ) ) );
break;
case SID_ATTR_GRAF_TRANSPARENCE:
@@ -618,7 +618,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
{
if( pGrfObj->IsAnimated() ||
GRAPHIC_GDIMETAFILE == pGrfObj->GetType() )
- bDisable = TRUE;
+ bDisable = sal_True;
else
rSet.Put( SfxUInt16Item( nWhich, ((SwTransparencyGrf&)
aCoreSet.Get(RES_GRFATR_TRANSPARENCY)).GetValue() ));
@@ -651,27 +651,27 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_GRFFILTER_SOLARIZE:
{
if( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
// --> OD 2006-11-03 #i59688#
// load graphic only if type is unknown
// else if( bSwappedOut )
// {
// rSet.DisableItem( nWhich );
// if( AddGrfUpdateSlot( nWhich ))
-// rSh.GetGraphic(FALSE); // start the loading
+// rSh.GetGraphic(sal_False); // start the loading
// }
// else
// bDisable = !bBitmapType;
else
{
- const USHORT eGraphicType( rSh.GetGraphicType() );
+ const sal_uInt16 eGraphicType( rSh.GetGraphicType() );
if ( ( eGraphicType == GRAPHIC_NONE ||
eGraphicType == GRAPHIC_DEFAULT ) &&
- rSh.IsGrfSwapOut( TRUE ) )
+ rSh.IsGrfSwapOut( sal_True ) )
{
rSet.DisableItem( nWhich );
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
}
else
{
@@ -683,7 +683,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
break;
default:
- bDisable = FALSE;
+ bDisable = sal_False;
}
if( bDisable )
diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx
index 37d5e1ed5d69..83eee472e91d 100644..100755
--- a/sw/source/ui/shells/langhelper.cxx
+++ b/sw/source/ui/shells/langhelper.cxx
@@ -67,14 +67,14 @@ using namespace ::com::sun::star;
namespace SwLangHelper
{
- USHORT GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet )
+ sal_uInt16 GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet )
{
ESelection aSelection = pOLV->GetSelection();
EditView& rEditView=pOLV->GetEditView();
EditEngine* pEditEngine=rEditView.GetEditEngine();
// the value of used script types
- const USHORT nScriptType =pOLV->GetSelectedScriptType();
+ const sal_uInt16 nScriptType =pOLV->GetSelectedScriptType();
String aScriptTypesInUse( String::CreateFromInt32( nScriptType ) );//pEditEngine->GetScriptType(aSelection)
SvtLanguageTable aLangTable;
@@ -185,7 +185,7 @@ namespace SwLangHelper
if (!bForSelection) // document language to be changed...
{
rSh.StartAction();
- rSh.LockView( TRUE );
+ rSh.LockView( sal_True );
rSh.Push();
// prepare to apply new language to all text in document
@@ -205,7 +205,7 @@ namespace SwLangHelper
if (bForSelection)
{
const SwViewOption* pVOpt = rView.GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = pEditEngine->GetControlWord();
+ sal_uLong nCntrl = pEditEngine->GetControlWord();
// turn off
if (!pVOpt->IsOnlineSpell())
nCntrl &= ~EE_CNTRL_ONLINESPELLING;
@@ -227,8 +227,8 @@ namespace SwLangHelper
if (!bForSelection)
{
// need to release view and restore selection...
- rSh.Pop( FALSE );
- rSh.LockView( FALSE );
+ rSh.Pop( sal_False );
+ rSh.LockView( sal_False );
rSh.EndAction();
}
}
@@ -252,13 +252,13 @@ namespace SwLangHelper
const LanguageType nLang = SvtLanguageTable().GetType( rLangText );
if (nLang != LANGUAGE_DONTKNOW)
{
- USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
+ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL;
DBG_ASSERT( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
//get ScriptType
- USHORT nLangWhichId = 0;
+ sal_uInt16 nLangWhichId = 0;
bool bIsSingleScriptType = true;
switch (nScriptType)
{
@@ -318,7 +318,7 @@ namespace SwLangHelper
void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet )
{
// EditEngine IDs
- const USHORT aLangWhichId_EE[3] =
+ const sal_uInt16 aLangWhichId_EE[3] =
{
EE_CHAR_LANGUAGE,
EE_CHAR_LANGUAGE_CJK,
@@ -326,7 +326,7 @@ namespace SwLangHelper
};
// Writewr IDs
- const USHORT aLangWhichId_Writer[3] =
+ const sal_uInt16 aLangWhichId_Writer[3] =
{
RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE,
@@ -408,7 +408,7 @@ namespace SwLangHelper
/// If there are more than one languages used LANGUAGE_DONTKNOW will be returned.
/// @param nLangWhichId : one of
/// RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,
- LanguageType GetLanguage( SwWrtShell &rSh, USHORT nLangWhichId )
+ LanguageType GetLanguage( SwWrtShell &rSh, sal_uInt16 nLangWhichId )
{
SfxItemSet aSet( rSh.GetAttrPool(), nLangWhichId, nLangWhichId );
rSh.GetCurAttr( aSet );
@@ -416,13 +416,13 @@ namespace SwLangHelper
return GetLanguage(aSet,nLangWhichId);
}
- LanguageType GetLanguage( SfxItemSet aSet, USHORT nLangWhichId )
+ LanguageType GetLanguage( SfxItemSet aSet, sal_uInt16 nLangWhichId )
{
LanguageType nLang = LANGUAGE_SYSTEM;
const SfxPoolItem *pItem = 0;
- SfxItemState nState = aSet.GetItemState( nLangWhichId, TRUE, &pItem );
+ SfxItemState nState = aSet.GetItemState( nLangWhichId, sal_True, &pItem );
if (nState > SFX_ITEM_DEFAULT && pItem)
{
// the item is set and can be used
@@ -450,10 +450,10 @@ namespace SwLangHelper
LanguageType GetCurrentLanguage( SwWrtShell &rSh )
{
// get all script types used in current selection
- const USHORT nScriptType = rSh.GetScriptType();
+ const sal_uInt16 nScriptType = rSh.GetScriptType();
//set language attribute to use according to the script type
- USHORT nLangWhichId = 0;
+ sal_uInt16 nLangWhichId = 0;
bool bIsSingleScriptType = true;
switch (nScriptType)
{
@@ -472,7 +472,7 @@ namespace SwLangHelper
// check if all script types are set to LANGUAGE_NONE and return
// that if this is the case. Otherwise, having multiple script types
// in use always means there are several languages in use...
- const USHORT aScriptTypes[3] =
+ const sal_uInt16 aScriptTypes[3] =
{
RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE,
@@ -498,10 +498,10 @@ namespace SwLangHelper
/// 'In use' means the language(s) matching the script type(s) of the
/// selected text. Or in other words, the language a spell checker would use.
/// If there is more than one language LANGUAGE_DONTKNOW will be returned.
- LanguageType GetCurrentLanguage( SfxItemSet aSet, USHORT nScriptType )
+ LanguageType GetCurrentLanguage( SfxItemSet aSet, sal_uInt16 nScriptType )
{
//set language attribute to use according to the script type
- USHORT nLangWhichId = 0;
+ sal_uInt16 nLangWhichId = 0;
bool bIsSingleScriptType = true;
switch (nScriptType)
{
@@ -520,7 +520,7 @@ namespace SwLangHelper
// check if all script types are set to LANGUAGE_NONE and return
// that if this is the case. Otherwise, having multiple script types
// in use always means there are several languages in use...
- const USHORT aScriptTypes[3] =
+ const sal_uInt16 aScriptTypes[3] =
{
EE_CHAR_LANGUAGE,
EE_CHAR_LANGUAGE_CJK,
diff --git a/sw/source/ui/shells/listsh.cxx b/sw/source/ui/shells/listsh.cxx
index 24a8c12d992b..45746e286857 100644
--- a/sw/source/ui/shells/listsh.cxx
+++ b/sw/source/ui/shells/listsh.cxx
@@ -85,7 +85,7 @@ void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, bool bMove, bool bUp )
if ( nActPos < USHRT_MAX && rSh.IsOutlineMovable( nActPos ) )
{
rSh.Push();
- rSh.MakeOutlineSel( nActPos, nActPos, TRUE );
+ rSh.MakeOutlineSel( nActPos, nActPos, sal_True );
if ( bMove )
{
@@ -149,7 +149,7 @@ void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, bool bMove, bool bUp )
void SwListShell::Execute(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SwWrtShell& rSh = GetShell();
// --> FME 2005-01-04 #i35572#
@@ -167,8 +167,8 @@ void SwListShell::Execute(SfxRequest &rReq)
rReq.Done();
rSh.NumUpDown( ( nSlot == FN_NUM_BULLET_DOWN )
- ? TRUE
- : FALSE );
+ ? sal_True
+ : sal_False );
pFrame->GetBindings().Invalidate( SID_TABLE_CELL ); // StatusZeile updaten!
}
break;
@@ -187,7 +187,7 @@ void SwListShell::Execute(SfxRequest &rReq)
{
rReq.Ignore();
SfxRequest aReq( GetView().GetViewFrame(), FN_NUM_BULLET_ON );
- aReq.AppendItem( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aReq.AppendItem( SfxBoolItem( FN_PARAM_1, sal_False ) );
aReq.Done();
rSh.DelNumRules();
break;
@@ -197,7 +197,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, false, false );
else
- rSh.MoveNumParas(FALSE, FALSE);
+ rSh.MoveNumParas(sal_False, sal_False);
rReq.Done();
break;
@@ -205,7 +205,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, true, false );
else
- rSh.MoveNumParas(TRUE, FALSE);
+ rSh.MoveNumParas(sal_True, sal_False);
rReq.Done();
break;
@@ -213,7 +213,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, true, true );
else
- rSh.MoveNumParas(TRUE, TRUE);
+ rSh.MoveNumParas(sal_True, sal_True);
rReq.Done();
break;
@@ -221,7 +221,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, false, true );
else
- rSh.MoveNumParas(FALSE, TRUE);
+ rSh.MoveNumParas(sal_False, sal_True);
rReq.Done();
break;
@@ -232,8 +232,8 @@ void SwListShell::Execute(SfxRequest &rReq)
case FN_NUM_OR_NONUM:
{
- BOOL bApi = rReq.IsAPI();
- BOOL bDelete = !rSh.IsNoNum(!bApi);
+ sal_Bool bApi = rReq.IsAPI();
+ sal_Bool bDelete = !rSh.IsNoNum(!bApi);
if(pArgs )
bDelete = ((SfxBoolItem &)pArgs->Get(rReq.GetSlot())).GetValue();
rSh.NumOrNoNum( bDelete, !bApi );
@@ -251,15 +251,15 @@ void SwListShell::Execute(SfxRequest &rReq)
void SwListShell::GetState(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SwWrtShell& rSh = GetShell();
- BYTE nCurrentNumLevel = rSh.GetNumLevel();
+ sal_uInt8 nCurrentNumLevel = rSh.GetNumLevel();
while ( nWhich )
{
switch( nWhich )
{
case FN_NUM_OR_NONUM:
- rSet.Put(SfxBoolItem(nWhich, GetShell().IsNoNum(FALSE)));
+ rSet.Put(SfxBoolItem(nWhich, GetShell().IsNoNum(sal_False)));
break;
case FN_NUM_BULLET_OUTLINE_UP:
case FN_NUM_BULLET_UP:
diff --git a/sw/source/ui/shells/mediash.cxx b/sw/source/ui/shells/mediash.cxx
index 36aa18f2d01c..ed73541da8d6 100644
--- a/sw/source/ui/shells/mediash.cxx
+++ b/sw/source/ui/shells/mediash.cxx
@@ -104,10 +104,10 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
if( pSdrView )
{
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged( FALSE );
+ pSdrView->GetModel()->SetChanged( sal_False );
switch( nSlotId )
{
@@ -132,7 +132,7 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
{
const SfxPoolItem* pItem;
- if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, FALSE, &pItem ) ) )
+ if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, sal_False, &pItem ) ) )
pItem = NULL;
if( pItem )
@@ -163,7 +163,7 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
if( pSdrView->GetModel()->IsChanged() )
GetShell().SetModified();
else if( bChanged )
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
}
}
@@ -172,7 +172,7 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
void SwMediaShell::GetMediaState(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index bb4f1c7fb609..9f0639d9622c 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -134,7 +134,7 @@ TYPEINIT1(SwTableShell,SwBaseShell)
/************************************************************************/
-const USHORT __FAR_DATA aUITableAttrRange[] =
+const sal_uInt16 __FAR_DATA aUITableAttrRange[] =
{
FN_PARAM_TABLE_NAME, FN_PARAM_TABLE_NAME,
FN_PARAM_TABLE_HEADLINE, FN_PARAM_TABLE_HEADLINE,
@@ -161,7 +161,7 @@ const USHORT __FAR_DATA aUITableAttrRange[] =
0
};
-const USHORT* SwuiGetUITableAttrRange()
+const sal_uInt16* SwuiGetUITableAttrRange()
{
return aUITableAttrRange;
}
@@ -192,7 +192,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
SvxULSpaceItem aULSpace( pFmt->GetULSpace() );
rSet.Put( aULSpace );
- USHORT nBackgroundDestination = rSh.GetViewOptions()->GetTblDest();
+ sal_uInt16 nBackgroundDestination = rSh.GetViewOptions()->GetTblDest();
rSet.Put(SwBackgroundDestinationItem(SID_BACKGRND_DESTINATION, nBackgroundDestination ));
SvxBrushItem aBrush( RES_BACKGROUND );
// rSh.GetBoxBackground(aBrush);
@@ -209,12 +209,12 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
if(rSh.GetBoxDirection( aBoxDirection ))
rSet.Put(aBoxDirection, FN_TABLE_BOX_TEXTDIRECTION);
- BOOL bTableSel = rSh.IsTableMode();
+ sal_Bool bTableSel = rSh.IsTableMode();
if(!bTableSel)
{
rSh.StartAllAction();
rSh.Push();
- rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_TABLE_SELECT_ALL, FALSE );
+ rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_TABLE_SELECT_ALL, sal_False );
}
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
@@ -223,7 +223,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
aBoxInfo.SetTable ((rSh.IsTableMode() && rSh.GetCrsrCnt() > 1) ||
!bTableSel);
// Abstandsfeld immer anzeigen
- aBoxInfo.SetDist ((BOOL) TRUE);
+ aBoxInfo.SetDist ((sal_Bool) sal_True);
// Minimalgroesse in Tabellen und Absaetzen setzen
aBoxInfo.SetMinDist( !bTableSel || rSh.IsTableMode() ||
rSh.GetSelectionType() &
@@ -248,7 +248,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
if(!bTableSel)
{
rSh.ClearMark();
- rSh.Pop(FALSE);
+ rSh.Pop(sal_False);
rSh.EndAllAction();
}
@@ -261,12 +261,12 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
SwTableRep* pRep = new SwTableRep( aTabCols, rSh.IsTblComplex());
pRep->SetSpace(aCols.GetRightMax());
- USHORT nPercent = 0;
+ sal_uInt16 nPercent = 0;
long nWidth = ::GetTableWidth(pFmt, aCols, &nPercent, &rSh );
// Die Tabellenbreite ist fuer relative Angaben nicht korrekt
if(nPercent)
nWidth = pRep->GetSpace() * nPercent / 100;
- USHORT nAlign = pFmt->GetHoriOrient().GetHoriOrient();
+ sal_uInt16 nAlign = pFmt->GetHoriOrient().GetHoriOrient();
pRep->SetAlign(nAlign);
SvxLRSpaceItem aLRSpace( pFmt->GetLRSpace() );
SwTwips nLeft = aLRSpace.GetLeft();
@@ -314,24 +314,24 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
const SfxPoolItem* pItem = 0;
SwViewOption aUsrPref( *rSh.GetViewOptions() );
- USHORT nBackgroundDestination = aUsrPref.GetTblDest();
- if(SFX_ITEM_SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, FALSE, &pItem))
+ sal_uInt16 nBackgroundDestination = aUsrPref.GetTblDest();
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, sal_False, &pItem))
{
nBackgroundDestination = ((SfxUInt16Item*)pItem)->GetValue();
- aUsrPref.SetTblDest((BYTE)nBackgroundDestination);
+ aUsrPref.SetTblDest((sal_uInt8)nBackgroundDestination);
SW_MOD()->ApplyUsrPref(aUsrPref, &rSh.GetView());
}
- BOOL bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
+ sal_Bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) );
pItem = 0;
- BOOL bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, FALSE, &pItem );
+ sal_Bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem );
const SfxPoolItem* pRowItem = 0, *pTableItem = 0;
- bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, FALSE, &pRowItem );
- bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, FALSE, &pTableItem );
+ bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False, &pRowItem );
+ bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, sal_False, &pTableItem );
const SfxPoolItem* pSplit = 0;
- BOOL bRowSplit = SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pSplit );
+ sal_Bool bRowSplit = SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pSplit );
const SfxPoolItem* pBoxDirection = 0;
- BOOL bBoxDirection = SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, FALSE, &pBoxDirection );
+ sal_Bool bBoxDirection = SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, sal_False, &pBoxDirection );
if( bBackground || bBorder || bRowSplit || bBoxDirection)
{
/*
@@ -340,7 +340,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
Der Hintergrund wird immer auf den aktuellen Zustand angewendet.
*/
- BOOL bTableSel = rSh.IsTableMode();
+ sal_Bool bTableSel = rSh.IsTableMode();
rSh.StartAllAction();
if(bBackground)
@@ -387,19 +387,19 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
{
rSh.ClearMark();
}
- rSh.Pop(FALSE);
+ rSh.Pop(sal_False);
}
rSh.EndAllAction();
}
SwTabCols aTabCols;
- BOOL bTabCols = FALSE;
- BOOL bSingleLine = FALSE;
+ sal_Bool bTabCols = sal_False;
+ sal_Bool bSingleLine = sal_False;
SwTableRep* pRep = 0;
SwFrmFmt *pFmt = rSh.GetTableFmt();
SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
- if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, sal_False, &pItem ))
{
pRep = (SwTableRep*)((const SwPtrItem*)pItem)->GetValue();
@@ -415,7 +415,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
SwFmtFrmSize aSz( ATT_VAR_SIZE, nWidth );
if(pRep->GetWidthPercent())
{
- aSz.SetWidthPercent( (BYTE)pRep->GetWidthPercent() );
+ aSz.SetWidthPercent( (sal_uInt8)pRep->GetWidthPercent() );
}
aSet.Put(aSz);
}
@@ -436,22 +436,22 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
if(pRep->HasColsChanged())
{
- bTabCols = TRUE;
+ bTabCols = sal_True;
}
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, FALSE, &pItem))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, sal_False, &pItem))
rSh.SetRowsToRepeat( ((SfxUInt16Item*)pItem)->GetValue() );
- if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, FALSE, &pItem))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, sal_False, &pItem))
rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue());
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, sal_False, &pItem ))
rSh.SetTableName( *pFmt, ((const SfxStringItem*)pItem)->GetValue() );
// kopiere die ausgesuchten Attribute in den ItemSet
- static USHORT __READONLY_DATA aIds[] =
+ static sal_uInt16 __READONLY_DATA aIds[] =
{
RES_PAGEDESC,
RES_BREAK,
@@ -465,8 +465,8 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
// <-- collapsing borders
0
};
- for( const USHORT* pIds = aIds; *pIds; ++pIds )
- if( SFX_ITEM_SET == rSet.GetItemState( *pIds, FALSE, &pItem))
+ for( const sal_uInt16* pIds = aIds; *pIds; ++pIds )
+ if( SFX_ITEM_SET == rSet.GetItemState( *pIds, sal_False, &pItem))
aSet.Put( *pItem );
if( aSet.Count() )
@@ -503,22 +503,22 @@ static void lcl_TabGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLi
void SwTableShell::Execute(SfxRequest &rReq)
{
- BOOL bUseDialog = TRUE;
+ sal_Bool bUseDialog = sal_True;
const SfxItemSet* pArgs = rReq.GetArgs();
SwWrtShell &rSh = GetShell();
//Erstmal die Slots, die keinen FrmMgr benoetigen.
- BOOL bMore = FALSE;
+ sal_Bool bMore = sal_False;
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
- BOOL bCallDone = FALSE;
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
+ sal_Bool bCallDone = sal_False;
switch ( nSlot )
{
case SID_ATTR_BORDER:
{
-/* BOOL bPopCrsr = FALSE;
+/* sal_Bool bPopCrsr = sal_False;
if ( !rReq.IsAPI() )
{
//Keine Tabellenselektion -> Aenderung wird auf die gesamte
@@ -526,7 +526,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if ( !rSh.IsTableMode() )
{
rSh.StartAction();
- bPopCrsr = TRUE;
+ bPopCrsr = sal_True;
rSh.Push();
rSh.EnterStdMode();
rSh.MoveTable( fnTableCurr, fnTableStart );
@@ -549,29 +549,29 @@ void SwTableShell::Execute(SfxRequest &rReq)
const SvxBoxItem& rCoreBox = (const SvxBoxItem&)
aCoreSet.Get(RES_BOX);
const SfxPoolItem *pBoxItem = 0;
- if ( pArgs->GetItemState(RES_BOX, TRUE, &pBoxItem) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState(RES_BOX, sal_True, &pBoxItem) == SFX_ITEM_SET )
{
aBox = *(SvxBoxItem*)pBoxItem;
if ( !rReq.IsAPI() )
- aBox.SetDistance( Max(rCoreBox.GetDistance(),USHORT(55)) );
+ aBox.SetDistance( Max(rCoreBox.GetDistance(),sal_uInt16(55)) );
else if ( aBox.GetDistance() < MIN_BORDER_DIST )
- aBox.SetDistance( Max(rCoreBox.GetDistance(),(USHORT)MIN_BORDER_DIST) );
+ aBox.SetDistance( Max(rCoreBox.GetDistance(),(sal_uInt16)MIN_BORDER_DIST) );
}
else
{ASSERT( !this, "Wo ist das Box-Item?" )}
//since the drawing layer also supports borders the which id might be a different one
SvxBoxInfoItem aInfo( SID_ATTR_BORDER_INNER );
- if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, TRUE, &pBoxItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, sal_True, &pBoxItem) == SFX_ITEM_SET)
aInfo = *(SvxBoxInfoItem*)pBoxItem;
- else if( pArgs->GetItemState(SDRATTR_TABLE_BORDER_INNER, TRUE, &pBoxItem) == SFX_ITEM_SET )
+ else if( pArgs->GetItemState(SDRATTR_TABLE_BORDER_INNER, sal_True, &pBoxItem) == SFX_ITEM_SET )
{
aInfo = *(SvxBoxInfoItem*)pBoxItem;
aInfo.SetWhich(SID_ATTR_BORDER_INNER);
}
- aInfo.SetTable( TRUE );
- aInfo.SetValid( VALID_DISABLE, FALSE );
+ aInfo.SetTable( sal_True );
+ aInfo.SetValid( VALID_DISABLE, sal_False );
// Die Attribute aller Linien werden gelesen und das staerkste gewinnt
@@ -596,19 +596,19 @@ void SwTableShell::Execute(SfxRequest &rReq)
aBorderLine.SetOutWidth(DEF_LINE_WIDTH_0);
}
- BOOL bLine = FALSE;
+ sal_Bool bLine = sal_False;
if ( (pBorderLine = aBox.GetTop()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_TOP), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_TOP), bLine |= sal_True;
if ((pBorderLine = aBox.GetBottom()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_BOTTOM), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_BOTTOM), bLine |= sal_True;
if ((pBorderLine = aBox.GetLeft()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_LEFT), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_LEFT), bLine |= sal_True;
if ((pBorderLine = aBox.GetRight()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_RIGHT), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_RIGHT), bLine |= sal_True;
if ((pBorderLine = aInfo.GetHori()) != NULL)
- aInfo.SetLine(&aBorderLine, BOXINFO_LINE_HORI), bLine |= TRUE;
+ aInfo.SetLine(&aBorderLine, BOXINFO_LINE_HORI), bLine |= sal_True;
if ((pBorderLine = aInfo.GetVert()) != NULL)
- aInfo.SetLine(&aBorderLine, BOXINFO_LINE_VERT), bLine |= TRUE;
+ aInfo.SetLine(&aBorderLine, BOXINFO_LINE_VERT), bLine |= sal_True;
// if ( bPopCrsr && !bLine )
// aBox.SetDistance( 0 );
@@ -622,12 +622,12 @@ void SwTableShell::Execute(SfxRequest &rReq)
// the SvxBoxItem
rReq.AppendItem( aBox );
rReq.AppendItem( aInfo );
- bCallDone = TRUE;
+ bCallDone = sal_True;
/* if ( bPopCrsr )
{
rSh.KillPams();
- rSh.Pop(FALSE);
+ rSh.Pop(sal_False);
rSh.EndAction();
}*/
}
@@ -643,7 +643,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
SfxItemSet aCoreSet( GetPool(), aUITableAttrRange);
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwTableRep* pTblRep = ::lcl_TableParamToItemSet( aCoreSet, rSh );
SfxAbstractTabDialog * pDlg = NULL;
if ( bUseDialog )
@@ -695,7 +695,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if(pView)
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SvNumberFormatter* pFormatter = rSh.GetNumberFormatter();
SfxItemSet aCoreSet( GetPool(),
SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE,
@@ -743,13 +743,13 @@ void SwTableShell::Execute(SfxRequest &rReq)
const sal_uInt32* pDelArr = ((SvxNumberInfoItem*)
pNumberFormatItem)->GetDelArray();
- for ( USHORT i = 0; i < ((SvxNumberInfoItem*)pNumberFormatItem)->GetDelCount(); i++ )
+ for ( sal_uInt16 i = 0; i < ((SvxNumberInfoItem*)pNumberFormatItem)->GetDelCount(); i++ )
((SvxNumberInfoItem*)pNumberFormatItem)->
GetNumberFormatter()->DeleteEntry( pDelArr[i] );
}
if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState(
- SID_ATTR_NUMBERFORMAT_VALUE, FALSE, &pNumberFormatItem ))
+ SID_ATTR_NUMBERFORMAT_VALUE, sal_False, &pNumberFormatItem ))
{
SfxItemSet aBoxFormatSet( *aCoreSet.GetPool(),
RES_BOXATR_FORMAT, RES_BOXATR_FORMAT );
@@ -765,53 +765,53 @@ void SwTableShell::Execute(SfxRequest &rReq)
break;
case FN_CALC_TABLE:
rSh.UpdateTable();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_OPTIMAL_HEIGHT:
{
const SwFmtFrmSize aSz;
rSh.SetRowHeight( aSz );
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_TABLE_DELETE_COL:
if ( rSh.DeleteCol() && rSh.HasSelection() )
rSh.EnterStdMode();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_END_TABLE:
rSh.MoveTable( fnTableCurr, fnTableEnd );
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_START_TABLE:
rSh.MoveTable( fnTableCurr, fnTableStart );
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_GOTO_NEXT_CELL:
{
- BOOL bAppendLine = TRUE;
+ sal_Bool bAppendLine = sal_True;
if( pItem )
bAppendLine = ((SfxBoolItem*)pItem)->GetValue();
rReq.SetReturnValue( SfxBoolItem( nSlot,
rSh.GoNextCell( bAppendLine ) ) );
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_GOTO_PREV_CELL:
rReq.SetReturnValue( SfxBoolItem( nSlot, rSh.GoPrevCell() ) );
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_DELETE_ROW:
if ( rSh.DeleteRow() && rSh.HasSelection() )
rSh.EnterStdMode();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_MERGE_CELLS:
if ( rSh.IsTableMode() )
switch ( rSh.MergeTab() )
{
case TBLMERGE_OK:
- bCallDone = TRUE;
+ bCallDone = sal_True;
//no break;
case TBLMERGE_NOSELECTION: break;
case TBLMERGE_TOOCOMPLEX:
@@ -827,7 +827,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_ADJUST_CELLS:
case FN_TABLE_BALANCE_CELLS:
{
- BOOL bBalance = (FN_TABLE_BALANCE_CELLS == nSlot);
+ sal_Bool bBalance = (FN_TABLE_BALANCE_CELLS == nSlot);
if ( rSh.IsAdjustCellWidthAllowed(bBalance) )
{
{
@@ -836,13 +836,13 @@ void SwTableShell::Execute(SfxRequest &rReq)
}
rSh.AdjustCellWidth(bBalance);
}
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_TABLE_BALANCE_ROWS:
- if ( rSh.BalanceRowHeight(TRUE) )
- rSh.BalanceRowHeight(FALSE);
- bCallDone = TRUE;
+ if ( rSh.BalanceRowHeight(sal_True) )
+ rSh.BalanceRowHeight(sal_False);
+ bCallDone = sal_True;
break;
case FN_TABLE_SELECT_ALL:
rSh.EnterStdMode();
@@ -850,26 +850,26 @@ void SwTableShell::Execute(SfxRequest &rReq)
rSh.SttSelect();
rSh.MoveTable( fnTableCurr, fnTableEnd );
rSh.EndSelect();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_SELECT_COL:
rSh.EnterStdMode();
rSh.SelectTableCol();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_SELECT_ROW:
rSh.EnterStdMode();
rSh.SelectTableRow();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_SET_READ_ONLY_CELLS:
rSh.ProtectCells();
- rSh.ResetSelect( 0, FALSE );
- bCallDone = TRUE;
+ rSh.ResetSelect( 0, sal_False );
+ bCallDone = sal_True;
break;
case FN_TABLE_UNSET_READ_ONLY_CELLS:
rSh.UnProtectCells();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case SID_AUTOFORMAT:
{
@@ -901,13 +901,13 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_INSERT_COL:
case FN_TABLE_INSERT_ROW:
{
- BOOL bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL;
- USHORT nCount = 0;
- BOOL bAfter = TRUE;
+ sal_Bool bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL;
+ sal_uInt16 nCount = 0;
+ sal_Bool bAfter = sal_True;
if (pItem)
{
nCount = ((const SfxInt16Item* )pItem)->GetValue();
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, sal_True, &pItem))
bAfter = ((const SfxBoolItem* )pItem)->GetValue();
}
else if( !rReq.IsAPI() )
@@ -951,7 +951,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
}
// <--
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
}
@@ -969,8 +969,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
if( pDlg.get() && (pDlg->Execute() == 1) )
{
- USHORT nDispatchSlot = (nSlot == FN_TABLE_INSERT_COL_DLG) ? FN_TABLE_INSERT_COL : FN_TABLE_INSERT_ROW;
- SfxUInt16Item aCountItem( nDispatchSlot, static_cast< UINT16 >(pDlg->getInsertCount()) );
+ sal_uInt16 nDispatchSlot = (nSlot == FN_TABLE_INSERT_COL_DLG) ? FN_TABLE_INSERT_COL : FN_TABLE_INSERT_ROW;
+ SfxUInt16Item aCountItem( nDispatchSlot, static_cast< sal_uInt16 >(pDlg->getInsertCount()) );
SfxBoolItem aAfter( FN_PARAM_INSERT_AFTER, !pDlg->isInsertBefore() );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if( pVFrame )
@@ -982,8 +982,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_SPLIT_CELLS:
{
long nCount=0;
- BOOL bHorizontal=TRUE;
- BOOL bProportional = FALSE;
+ sal_Bool bHorizontal=sal_True;
+ sal_Bool bProportional = sal_False;
SFX_REQUEST_ARG( rReq, pSplit, SfxInt32Item, FN_TABLE_SPLIT_CELLS, sal_False );
SFX_REQUEST_ARG( rReq, pHor, SfxBoolItem, FN_PARAM_1, sal_False );
SFX_REQUEST_ARG( rReq, pProp, SfxBoolItem, FN_PARAM_2, sal_False );
@@ -1017,8 +1017,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
if ( nCount>1 )
{
- rSh.SplitTab(!bHorizontal, static_cast< USHORT >( nCount-1 ), bProportional );
- bCallDone = TRUE;
+ rSh.SplitTab(!bHorizontal, static_cast< sal_uInt16 >( nCount-1 ), bProportional );
+ bCallDone = sal_True;
}
else
rReq.Ignore();
@@ -1058,8 +1058,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_MERGE_TABLE:
{
- BOOL bPrev = rSh.CanMergeTable( TRUE );
- BOOL bNext = rSh.CanMergeTable( FALSE );
+ sal_Bool bPrev = rSh.CanMergeTable( sal_True );
+ sal_Bool bNext = rSh.CanMergeTable( sal_False );
if( bPrev && bNext )
{
@@ -1068,7 +1068,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
VclAbstractDialog* pDlg = pFact->CreateSwVclDialog( DLG_MERGE_TABLE, GetView().GetWindow(), bPrev );
DBG_ASSERT(pDlg, "dialogdiet pDlg fail!");
if( RET_OK != pDlg->Execute())
- bPrev = bNext = FALSE;
+ bPrev = bNext = sal_False;
delete pDlg;
}
@@ -1087,21 +1087,21 @@ void SwTableShell::Execute(SfxRequest &rReq)
: TBLVAR_CHGABS ) );
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{ FN_TABLE_MODE_FIX,
FN_TABLE_MODE_FIX_PROP,
FN_TABLE_MODE_VARIABLE,
0
};
rBind.Invalidate( aInva );
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_TABLE_AUTOSUM:
{
SfxViewFrame* pVFrame = GetView().GetViewFrame();
pVFrame->GetDispatcher()->Execute(FN_EDIT_FORMULA, SFX_CALLMODE_SYNCHRON);
- const USHORT nId = SwInputChild::GetChildWindowId();
+ const sal_uInt16 nId = SwInputChild::GetChildWindowId();
SwInputChild* pChildWin = (SwInputChild*)pVFrame->
GetChildWindow( nId );
String sSum;
@@ -1133,7 +1133,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
return;
//break;
default:
- bMore = TRUE;
+ bMore = sal_True;
}
if ( !bMore )
@@ -1143,7 +1143,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
return;
}
else
- bMore = FALSE;
+ bMore = sal_False;
//Jetzt die Slots, die direkt auf dem TableFmt arbeiten.
SwFrmFmt *pFmt = rSh.GetTableFmt();
switch ( nSlot )
@@ -1178,7 +1178,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
// der letzte case-Zweig der noch einen TabellenManager braucht!!
case FN_TABLE_SET_COL_WIDTH:
{
- SwTableFUNC aMgr( &rSh, FALSE);
+ SwTableFUNC aMgr( &rSh, sal_False);
aMgr.ColWidthDlg(GetView().GetWindow());
}
break;
@@ -1186,12 +1186,12 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_VERT_CENTER:
case FN_TABLE_VERT_BOTTOM:
{
- USHORT nAlign = nSlot == FN_TABLE_VERT_NONE ?
+ sal_uInt16 nAlign = nSlot == FN_TABLE_VERT_NONE ?
text::VertOrientation::NONE :
nSlot == FN_TABLE_VERT_CENTER ?
text::VertOrientation::CENTER : text::VertOrientation::BOTTOM;
rSh.SetBoxAlign(nAlign);
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
@@ -1225,7 +1225,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if(pSplit)
pSplit->SetValue(!pSplit->GetValue());
else
- pSplit = new SwFmtRowSplit(TRUE);
+ pSplit = new SwFmtRowSplit(sal_True);
}
else
{
@@ -1255,7 +1255,7 @@ void SwTableShell::GetState(SfxItemSet &rSet)
// os #124829# crash report: in case of an invalid shell selection return immediately
if(!pFmt)
return;
- USHORT nSlot = aIter.FirstWhich();
+ sal_uInt16 nSlot = aIter.FirstWhich();
while ( nSlot )
{
switch ( nSlot )
@@ -1270,19 +1270,19 @@ void SwTableShell::GetState(SfxItemSet &rSet)
break;
case FN_TABLE_BALANCE_CELLS:
- if ( !rSh.IsAdjustCellWidthAllowed(TRUE) )
+ if ( !rSh.IsAdjustCellWidthAllowed(sal_True) )
rSet.DisableItem(FN_TABLE_BALANCE_CELLS);
break;
case FN_TABLE_BALANCE_ROWS:
- if ( !rSh.BalanceRowHeight(TRUE) )
+ if ( !rSh.BalanceRowHeight(sal_True) )
rSet.DisableItem(FN_TABLE_BALANCE_ROWS);
break;
case FN_OPTIMIZE_TABLE:
if ( !rSh.IsTableMode() &&
!rSh.IsAdjustCellWidthAllowed() &&
- !rSh.IsAdjustCellWidthAllowed(TRUE) &&
- !rSh.BalanceRowHeight(TRUE) )
+ !rSh.IsAdjustCellWidthAllowed(sal_True) &&
+ !rSh.BalanceRowHeight(sal_True) )
rSet.DisableItem(FN_OPTIMIZE_TABLE);
break;
case SID_INSERT_DIAGRAM:
@@ -1329,8 +1329,8 @@ void SwTableShell::GetState(SfxItemSet &rSet)
case FN_TABLE_VERT_CENTER:
case FN_TABLE_VERT_BOTTOM:
{
- USHORT nAlign = rSh.GetBoxAlign();
- BOOL bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) ||
+ sal_uInt16 nAlign = rSh.GetBoxAlign();
+ sal_Bool bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) ||
(nSlot == FN_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER) ||
(nSlot == FN_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM);
rSet.Put(SfxBoolItem(nSlot, bSet));
@@ -1342,7 +1342,7 @@ void SwTableShell::GetState(SfxItemSet &rSet)
case FN_TABLE_MODE_VARIABLE :
{
TblChgMode nMode = rSh.GetTblChgMode();
- BOOL bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) ||
+ sal_Bool bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) ||
(nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) ||
(nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS);
rSet.Put(SfxBoolItem(nSlot, bSet));
@@ -1364,8 +1364,8 @@ void SwTableShell::GetState(SfxItemSet &rSet)
break;
case FN_TABLE_MERGE_TABLE:
{
- BOOL bAsk;
- if( !rSh.CanMergeTable( TRUE, &bAsk ))
+ sal_Bool bAsk;
+ if( !rSh.CanMergeTable( sal_True, &bAsk ))
rSet.DisableItem( nSlot );
}
break;
@@ -1469,14 +1469,14 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
case SID_FRAME_LINECOLOR:
{
/* Tabellenselektion ist abgeschafft
- BOOL bPopCrsr = FALSE;
+ sal_Bool bPopCrsr = sal_False;
if ( !rReq.IsAPI() )
{
//Keine Tabellenselektion -> Aenderung wird auf die gesamte
//Tabelle.
if ( !rSh.IsTableMode() )
{
- bPopCrsr = TRUE;
+ bPopCrsr = sal_True;
rSh.Push();
rSh.StartAction();
rSh.EnterStdMode();
@@ -1491,7 +1491,7 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
const SvxLineItem &rLineItem = (const SvxLineItem&)pArgs->
Get( SID_FRAME_LINESTYLE );
const SvxBorderLine* pBorderLine = rLineItem.GetLine();
- rSh.SetTabLineStyle( 0, TRUE, pBorderLine);
+ rSh.SetTabLineStyle( 0, sal_True, pBorderLine);
}
else
{
@@ -1504,7 +1504,7 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
/* if ( bPopCrsr )
{
rSh.KillPams();
- rSh.Pop(FALSE);
+ rSh.Pop(sal_False);
rSh.EndAction();
}*/
break;
@@ -1538,15 +1538,15 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq)
//Erstmal die Slots, die keinen FrmMgr benoetigen.
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
// Sprache immer von Cursorposition besorgen
LanguageType eLang = rSh.GetCurLang();
SvNumberFormatter* pFormatter = rSh.GetNumberFormatter();
sal_uInt32 nNumberFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
- USHORT nFmtType = 0, nOffset = 0;
+ sal_uInt16 nFmtType = 0, nOffset = 0;
switch ( nSlot )
{
@@ -1580,7 +1580,7 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq)
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx
index e4d1bc817940..584da30a17ca 100644
--- a/sw/source/ui/shells/textdrw.cxx
+++ b/sw/source/ui/shells/textdrw.cxx
@@ -69,7 +69,7 @@ void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, con
SdrView *pSdrView = rSh.GetDrawView();
// OBJ_FM_BUTTON
- pSdrView->SetDesignMode(TRUE);
+ pSdrView->SetDesignMode(sal_True);
pSdrView->SetCurrentObj(OBJ_FM_BUTTON);
pSdrView->SetEditMode(sal_False);
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index 5ac611fed854..ea30db9235c5 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -85,11 +85,11 @@
using namespace nsSwDocInfoSubType;
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
-String& lcl_AppendRedlineStr( String& rStr, USHORT nRedlId )
+String& lcl_AppendRedlineStr( String& rStr, sal_uInt16 nRedlId )
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch( nRedlId )
{
case nsRedlineType_t::REDLINE_INSERT: nResId = STR_REDLINE_INSERTED; break;
@@ -110,17 +110,17 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SwWrtShell& rSh = GetShell();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
Window *pMDI = &GetView().GetViewFrame()->GetWindow();
- BOOL bMore = FALSE;
- BOOL bIsText = TRUE;
- USHORT nInsertType = 0;
- USHORT nInsertSubType = 0;
- ULONG nInsertFormat = 0;
+ sal_Bool bMore = sal_False;
+ sal_Bool bIsText = sal_True;
+ sal_uInt16 nInsertType = 0;
+ sal_uInt16 nInsertSubType = 0;
+ sal_uLong nInsertFormat = 0;
switch(nSlot)
{
@@ -138,7 +138,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
if(rLink.IsVisible())
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( pMDI, &rSh.GetLinkManager(), FALSE, &rLink );
+ SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( pMDI, &rSh.GetLinkManager(), sal_False, &rLink );
if ( pDlg )
{
pDlg->Execute();
@@ -168,7 +168,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
const String& rMacro = ((SwMacroField*)pFld)->GetMacro();
- USHORT nPos = rMacro.Search('.', 0);
+ sal_uInt16 nPos = rMacro.Search('.', 0);
if(nPos != STRING_NOTFOUND)
{
SvxMacro aMacro( rMacro.Copy(nPos + 1), rMacro.Copy(0,nPos), STARBASIC );
@@ -181,14 +181,14 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_GOTO_NEXT_INPUTFLD:
case FN_GOTO_PREV_INPUTFLD:
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwFieldType* pFld = rSh.GetFldType( 0, RES_INPUTFLD );
if( pFld && rSh.MoveFldType( pFld,
FN_GOTO_NEXT_INPUTFLD == nSlot ))
{
rSh.ClearMark();
- rSh.StartInputFldDlg( rSh.GetCurFld(), FALSE );
- bRet = TRUE;
+ rSh.StartInputFldDlg( rSh.GetCurFld(), sal_False );
+ bRet = sal_True;
}
rReq.SetReturnValue( SfxBoolItem( nSlot, bRet ));
@@ -196,7 +196,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
default:
- bMore = TRUE;
+ bMore = sal_True;
}
if(bMore)
{
@@ -206,40 +206,40 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
case FN_INSERT_DBFIELD:
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if( pItem )
{
- ULONG nFormat = 0;
- USHORT nType = 0;
+ sal_uLong nFormat = 0;
+ sal_uInt16 nType = 0;
String aPar1 = ((SfxStringItem *)pItem)->GetValue();
String aPar2;
sal_Int32 nCommand = 0;
if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nType = ((SfxUInt16Item *)pItem)->GetValue();
aPar1 += DB_DELIM;
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_1, FALSE, &pItem ))
+ FN_PARAM_1, sal_False, &pItem ))
{
aPar1 += ((SfxStringItem *)pItem)->GetValue();
}
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_3, FALSE, &pItem ))
+ FN_PARAM_3, sal_False, &pItem ))
nCommand = ((SfxInt32Item*)pItem)->GetValue();
aPar1 += DB_DELIM;
aPar1 += String::CreateFromInt32(nCommand);
aPar1 += DB_DELIM;
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_2, FALSE, &pItem ))
+ FN_PARAM_2, sal_False, &pItem ))
{
aPar1 += ((SfxStringItem *)pItem)->GetValue();
}
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_CONTENT, FALSE, &pItem ))
+ FN_PARAM_FIELD_CONTENT, sal_False, &pItem ))
aPar2 = ((SfxStringItem *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_FORMAT, FALSE, &pItem ))
+ FN_PARAM_FIELD_FORMAT, sal_False, &pItem ))
nFormat = ((SfxUInt32Item *)pItem)->GetValue();
DBG_WARNING("Command is not yet used");
sal_Unicode cSeparator = ' ';
@@ -252,30 +252,30 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_INSERT_FIELD_CTRL:
case FN_INSERT_FIELD:
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if( pItem && nSlot != FN_INSERT_FIELD_CTRL)
{
- ULONG nFormat = 0;
- USHORT nType = 0;
- USHORT nSubType = 0;
+ sal_uLong nFormat = 0;
+ sal_uInt16 nType = 0;
+ sal_uInt16 nSubType = 0;
String aPar1 = ((SfxStringItem *)pItem)->GetValue();
String aPar2;
sal_Unicode cSeparator = ' ';
if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nType = ((SfxUInt16Item *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_SUBTYPE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nSubType = ((SfxUInt16Item *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_CONTENT, FALSE, &pItem ))
+ FN_PARAM_FIELD_CONTENT, sal_False, &pItem ))
aPar2 = ((SfxStringItem *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_FORMAT, FALSE, &pItem ))
+ FN_PARAM_FIELD_FORMAT, sal_False, &pItem ))
nFormat = ((SfxUInt32Item *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_3, FALSE, &pItem ))
+ FN_PARAM_3, sal_False, &pItem ))
{
String sTmp = ((SfxStringItem *)pItem)->GetValue();
if(sTmp.Len())
@@ -306,7 +306,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
pVFrame->ToggleChildWindow(FN_INSERT_FIELD); // Dialog anzeigen
// Flddlg auf neue TabPage umschalten
- USHORT nId = SwFldDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = SwFldDlgWrapper::GetChildWindowId();
SwFldDlgWrapper *pWrp = (SwFldDlgWrapper*)pVFrame->GetChildWindow(nId);
if (pWrp)
pWrp->ShowPage();
@@ -326,7 +326,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
case FN_DELETE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, sal_False);
if ( pNoteItem && GetView().GetPostItMgr() )
GetView().GetPostItMgr()->Delete( pNoteItem->GetValue() );
}
@@ -344,7 +344,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
case FN_HIDE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, sal_False);
if ( pNoteItem && GetView().GetPostItMgr() )
GetView().GetPostItMgr()->Hide( pNoteItem->GetValue() );
}
@@ -352,7 +352,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_POSTIT:
{
SwPostItField* pPostIt = (SwPostItField*)aFldMgr.GetCurFld();
- BOOL bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD);
+ sal_Bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD);
if (bNew || GetView().GetPostItMgr()->IsAnswer())
{
SvtUserOptions aUserOpt;
@@ -369,9 +369,9 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SwInsertFld_Data aData(TYP_POSTITFLD, 0, sAuthor, aEmptyStr, 0);
aFldMgr.InsertFld(aData);
rSh.Push();
- rSh.SwCrsrShell::Left(1, CRSR_SKIP_CHARS, FALSE);
+ rSh.SwCrsrShell::Left(1, CRSR_SKIP_CHARS, sal_False);
pPostIt = (SwPostItField*)aFldMgr.GetCurFld();
- rSh.Pop(FALSE); // Cursorpos restaurieren
+ rSh.Pop(sal_False); // Cursorpos restaurieren
}
if (pPostIt)
@@ -416,7 +416,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
sComment = pRedline->GetComment();
- BOOL bTravel = FALSE;
+ sal_Bool bTravel = sal_False;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
@@ -443,8 +443,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
pActRed = rSh.SelPrevRedline();
}
- BOOL bPrev = pActRed != 0;
- rSh.Pop(FALSE);
+ sal_Bool bPrev = pActRed != 0;
+ rSh.Pop(sal_False);
rSh.EndAction();
rSh.ClearMark();
@@ -453,8 +453,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
rSh.StartAction();
rSh.Push();
pActRed = rSh.SelNextRedline();
- BOOL bNext = pActRed != 0;
- rSh.Pop(FALSE); // Cursorpos restaurieren
+ sal_Bool bNext = pActRed != 0;
+ rSh.Pop(sal_False); // Cursorpos restaurieren
if( rSh.IsCrsrPtAtEnd() )
rSh.SwapPam();
@@ -465,7 +465,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact2 = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact2, "Dialogdiet fail!");
- AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, TRUE );
+ AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
pDlg->HideAuthor();
@@ -482,7 +482,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
}
rSh.SetCareWin(pDlg->GetWindow());
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
if ( pDlg->Execute() == RET_OK )
{
@@ -495,7 +495,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
delete pDlg;
rSh.SetCareWin(NULL);
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
rSh.ClearMark();
GetView().AttrChangedNotify(GetShellPtr());
}
@@ -505,8 +505,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_JAVAEDIT:
{
String aType, aText;
- BOOL bIsUrl=FALSE;
- BOOL bNew=FALSE, bUpdate=FALSE;
+ sal_Bool bIsUrl=sal_False;
+ sal_Bool bNew=sal_False, bUpdate=sal_False;
SwFldMgr* pMgr = new SwFldMgr;
if ( pItem )
{
@@ -563,21 +563,21 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_INSERT_FLD_DATE :
nInsertType = TYP_DATEFLD;
- bIsText = FALSE;
+ bIsText = sal_False;
goto FIELD_INSERT;
case FN_INSERT_FLD_TIME :
nInsertType = TYP_TIMEFLD;
- bIsText = FALSE;
+ bIsText = sal_False;
goto FIELD_INSERT;
case FN_INSERT_FLD_PGNUMBER:
nInsertType = TYP_PAGENUMBERFLD;
nInsertFormat = SVX_NUM_PAGEDESC; // wie Seitenvorlage
- bIsText = FALSE;
+ bIsText = sal_False;
goto FIELD_INSERT;
case FN_INSERT_FLD_PGCOUNT :
nInsertType = TYP_DOCSTATFLD;
nInsertSubType = 0;
- bIsText = FALSE;
+ bIsText = sal_False;
nInsertFormat = SVX_NUM_PAGEDESC;
goto FIELD_INSERT;
case FN_INSERT_FLD_TOPIC :
@@ -604,7 +604,7 @@ FIELD_INSERT:
}
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
}
@@ -615,8 +615,8 @@ void SwTextShell::StateField( SfxItemSet &rSet )
SwWrtShell& rSh = GetShell();
SfxWhichIter aIter( rSet );
const SwField* pField = 0;
- int bGetField = FALSE;
- USHORT nWhich = aIter.FirstWhich();
+ int bGetField = sal_False;
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -651,10 +651,10 @@ void SwTextShell::StateField( SfxItemSet &rSet )
if( !bGetField )
{
pField = rSh.GetCurFld();
- bGetField = TRUE;
+ bGetField = sal_True;
}
- USHORT nTempWhich = pField ? pField->GetTyp()->Which() : USHRT_MAX;
+ sal_uInt16 nTempWhich = pField ? pField->GetTyp()->Which() : USHRT_MAX;
if( USHRT_MAX == nTempWhich ||
RES_POSTITFLD == nTempWhich ||
RES_SCRIPTFLD == nTempWhich ||
@@ -673,7 +673,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
if(!bGetField)
{
pField = rSh.GetCurFld();
- bGetField = TRUE;
+ bGetField = sal_True;
}
if(!pField || pField->GetTyp()->Which() != RES_MACROFLD)
rSet.DisableItem(nWhich);
@@ -707,7 +707,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
break;
case FN_POSTIT :
case FN_JAVAEDIT :
- BOOL bCurField = FALSE;
+ sal_Bool bCurField = sal_False;
pField = rSh.GetCurFld();
if(nWhich == FN_POSTIT)
bCurField = pField && pField->GetTyp()->Which() == RES_POSTITFLD;
@@ -732,7 +732,7 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
const String& rName = rHlnkItem.GetName();
const String& rURL = rHlnkItem.GetURL();
const String& rTarget = rHlnkItem.GetTargetFrame();
- USHORT nType = (USHORT)rHlnkItem.GetInsertMode();
+ sal_uInt16 nType = (sal_uInt16)rHlnkItem.GetInsertMode();
nType &= ~HLINK_HTMLMODE;
const SvxMacroTableDtor* pMacroTbl = rHlnkItem.GetMacroTbl();
@@ -745,10 +745,10 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
rSh.GetCurAttr( aSet );
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem))
+ if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem))
{
// Links selektieren
- rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT, FALSE);
+ rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT, sal_False);
}
switch (nType)
{
@@ -770,13 +770,13 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
aINetFmt.SetMacro(SFX_EVENT_MOUSEOUT_OBJECT, *pMacro);
}
rSh.SttSelect();
- rSh.InsertURL( aINetFmt, rName, TRUE );
+ rSh.InsertURL( aINetFmt, rName, sal_True );
rSh.EndSelect();
}
break;
case HLINK_BUTTON:
- BOOL bSel = rSh.HasSelection();
+ sal_Bool bSel = rSh.HasSelection();
if(bSel)
rSh.DelRight();
InsertURLButton( rURL, rTarget, rName );
@@ -809,18 +809,18 @@ IMPL_LINK( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog *, pBtn )
const SwRedline *pActRed = pSh->SelNextRedline();
pSh->Pop(pActRed != 0);
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
if (pActRed)
{
pSh->StartAction();
pSh->Push();
bEnable = pSh->SelNextRedline() != 0;
- pSh->Pop(FALSE);
+ pSh->Pop(sal_False);
pSh->EndAction();
}
- pDlg->EnableTravel(bEnable, TRUE);
+ pDlg->EnableTravel(bEnable, sal_True);
if( pSh->IsCrsrPtAtEnd() )
pSh->SwapPam();
@@ -861,18 +861,18 @@ IMPL_LINK( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog *, pBtn )
const SwRedline *pActRed = pSh->SelPrevRedline();
pSh->Pop(pActRed != 0);
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
if (pActRed)
{
pSh->StartAction();
pSh->Push();
bEnable = pSh->SelPrevRedline() != 0;
- pSh->Pop(FALSE);
+ pSh->Pop(sal_False);
pSh->EndAction();
}
- pDlg->EnableTravel(TRUE, bEnable);
+ pDlg->EnableTravel(sal_True, bEnable);
pRedline = pSh->GetCurrRedline();
sComment = pRedline->GetComment();
diff --git a/sw/source/ui/shells/textglos.cxx b/sw/source/ui/shells/textglos.cxx
index a1a9f87ca918..fab748cf45f8 100644
--- a/sw/source/ui/shells/textglos.cxx
+++ b/sw/source/ui/shells/textglos.cxx
@@ -49,28 +49,28 @@
void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
::GetGlossaries()->UpdateGlosPath(!rReq.IsAPI() ||
FN_GLOSSARY_DLG == nSlot );
SwGlossaryHdl* pGlosHdl = GetView().GetGlosHdl();
// SwGlossaryList updaten?
- BOOL bUpdateList = FALSE;
+ sal_Bool bUpdateList = sal_False;
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem );
+ pArgs->GetItemState(nSlot, sal_False, &pItem );
switch( nSlot )
{
case FN_GLOSSARY_DLG:
pGlosHdl->GlossaryDlg();
- bUpdateList = TRUE;
+ bUpdateList = sal_True;
rReq.Ignore();
break;
case FN_EXPAND_GLOSSARY:
{
- BOOL bReturn;
+ sal_Bool bReturn;
bReturn = pGlosHdl->ExpandGlossary();
rReq.SetReturnValue( SfxBoolItem( nSlot, bReturn ) );
rReq.Done();
@@ -81,10 +81,10 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
String aGroup = (( const SfxStringItem *)pItem)->GetValue();
String aName;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem ))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem ))
aName = (( const SfxStringItem *)pItem)->GetValue();
String aShortName;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_2, FALSE, &pItem ))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_2, sal_False, &pItem ))
aShortName = (( const SfxStringItem *)pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -92,12 +92,12 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
- pGlosHdl->SetCurGroup(aGroup, TRUE);
+ pGlosHdl->SetCurGroup(aGroup, sal_True);
//eingestellte Gruppe muss in NewGlossary ggf. erzeugt werden!
- pGlosHdl->NewGlossary( aName, aShortName, TRUE );
+ pGlosHdl->NewGlossary( aName, aShortName, sal_True );
rReq.Done();
}
- bUpdateList = TRUE;
+ bUpdateList = sal_True;
break;
case FN_SET_ACT_GLOSSARY:
if(pItem)
@@ -117,21 +117,21 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
String aGroup = (( const SfxStringItem *)pItem)->GetValue();
String aName;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem ))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem ))
aName = (( const SfxStringItem *)pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
- pGlosHdl->SetCurGroup(aGroup, TRUE);
+ pGlosHdl->SetCurGroup(aGroup, sal_True);
rReq.SetReturnValue(SfxBoolItem(nSlot, pGlosHdl->InsertGlossary( aName )));
rReq.Done();
}
}
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
if(bUpdateList)
diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx
index 135a3435ca31..81238471dcbe 100644
--- a/sw/source/ui/shells/textidx.cxx
+++ b/sw/source/ui/shells/textidx.cxx
@@ -58,9 +58,9 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem );
+ pArgs->GetItemState(nSlot, sal_False, &pItem );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
Window *pMDI = &pVFrame->GetWindow();
@@ -93,7 +93,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
case FN_EDIT_IDX_ENTRY_DLG:
{
SwTOXMgr aMgr(GetShellPtr());
- USHORT nRet = RET_OK;
+ sal_uInt16 nRet = RET_OK;
if(aMgr.GetTOXMarkCount() > 1)
{ // Mehrere Marken, welche solls denn sein ?
//
@@ -140,11 +140,11 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
// Hoehe=Breite fuer konsistentere Vorschau (analog zu Bereich bearbeiten)
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
const SwTOXBase* pCurTOX = 0;
- BOOL bGlobal = FALSE;
+ sal_Bool bGlobal = sal_False;
if(pItem)
{
pCurTOX = (const SwTOXBase* )((SwPtrItem*)pItem)->GetValue();
- bGlobal = TRUE;
+ bGlobal = sal_True;
}
else
pCurTOX = rSh.GetCurTOX();
@@ -170,7 +170,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
const SwTOXBase* pBase = rSh.GetCurTOX();
DBG_ASSERT(pBase, "no TOXBase to remove");
if( pBase )
- rSh.DeleteTOX(*pBase, TRUE);
+ rSh.DeleteTOX(*pBase, sal_True);
}
break;
default:
@@ -189,7 +189,7 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
SfxChildWindow* pAuthMark = pVFrame->GetChildWindow(FN_INSERT_AUTH_ENTRY_DLG);
- const BOOL bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() );
+ const sal_Bool bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() );
const SwTOXBase* pBase = 0;
if( bHtmlMode || 0 != ( pBase = rSh.GetCurTOX()) )
{
@@ -207,27 +207,27 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
if(!pIdxMrk)
rSet.DisableItem( FN_INSERT_IDX_ENTRY_DLG );
else
- rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG, TRUE));
+ rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG, sal_True));
if(!pAuthMark)
rSet.DisableItem( FN_INSERT_AUTH_ENTRY_DLG );
else
- rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, TRUE));
+ rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, sal_True));
}
else //if( SFX_ITEM_UNKNOWN != rSet.GetItemState( FN_EDIT_IDX_ENTRY_DLG ))
{
- BOOL bEnableEdit = TRUE;
- BOOL bInReadonly = rSh.HasReadonlySel();
+ sal_Bool bEnableEdit = sal_True;
+ sal_Bool bInReadonly = rSh.HasReadonlySel();
if( rSh.HasSelection() || bInReadonly)
- bEnableEdit = FALSE;
+ bEnableEdit = sal_False;
else
{
SwTOXMarks aArr;
rSh.GetCurTOXMarks( aArr );
if( !aArr.Count())
- bEnableEdit = FALSE;
+ bEnableEdit = sal_False;
}
if(!bEnableEdit)
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 0d217532e32a..dfd12abffe57 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -168,9 +168,9 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem );
+ pArgs->GetItemState(nSlot, sal_False, &pItem );
switch( nSlot )
{
@@ -179,8 +179,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
rSh.InsertByWord(((const SfxStringItem *)pItem)->GetValue());
break;
case FN_INSERT_SOFT_HYPHEN:
- if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( TRUE, 0 ) &&
- CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( TRUE, -1 ))
+ if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, 0 ) &&
+ CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, -1 ))
rSh.Insert( String( CHAR_SOFTHYPHEN ) );
break;
@@ -275,7 +275,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
}
- rSh.InsertObject( xObj, 0, TRUE, nSlot);
+ rSh.InsertObject( xObj, 0, sal_True, nSlot);
}
}
}
@@ -305,7 +305,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
SvCommandList aCommandList;
if(pCommandsItem)
{
- USHORT nTemp;
+ sal_uInt16 nTemp;
aCommandList.AppendCommands( pCommandsItem->GetValue(), &nTemp );
}
@@ -346,7 +346,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
else
{
DBG_ASSERT( !pNameItem || nSlot == SID_INSERT_OBJECT, "Superfluous argument!" );
- rSh.InsertObject( xObj, pName, TRUE, nSlot);
+ rSh.InsertObject( xObj, pName, sal_True, nSlot);
rReq.Done();
}
break;
@@ -418,7 +418,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
else
{
- rSh.InsertObject( xObj, 0, TRUE, nSlot);
+ rSh.InsertObject( xObj, 0, sal_True, nSlot);
rReq.Done();
}
}
@@ -455,7 +455,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
else
bFillWithData = sal_False; // will create chart with only it's default image
- SwTableFUNC( &rSh, FALSE ).InsertChart( xDataProvider, bFillWithData, aRangeString );
+ SwTableFUNC( &rSh, sal_False ).InsertChart( xDataProvider, bFillWithData, aRangeString );
rSh.LaunchOLEObj();
svt::EmbeddedObjectRef& xObj = rSh.GetOLEObject();
@@ -483,7 +483,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
// the suggestion has to be removed before
GetView().GetEditWin().StopQuickHelp();
SvGlobalName aGlobalName( SO3_SM_CLASSID );
- rSh.InsertObject( svt::EmbeddedObjectRef(), &aGlobalName, TRUE, 0 );
+ rSh.InsertObject( svt::EmbeddedObjectRef(), &aGlobalName, sal_True, 0 );
}
break;
@@ -494,14 +494,14 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_FRAME_INTERACT_NOCOL:
case FN_INSERT_FRAME_INTERACT:
{
- USHORT nCols = 1;
- BOOL bModifier1 = rReq.GetModifier() == KEY_MOD1;
+ sal_uInt16 nCols = 1;
+ sal_Bool bModifier1 = rReq.GetModifier() == KEY_MOD1;
if(pArgs)
{
if(FN_INSERT_FRAME_INTERACT_NOCOL != nSlot &&
- pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET)
+ pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET)
nCols = ((SfxUInt16Item *)pItem)->GetValue();
- if(pArgs->GetItemState(SID_MODIFIER, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(SID_MODIFIER, sal_False, &pItem) == SFX_ITEM_SET)
bModifier1 |= KEY_MOD1 == ((SfxUInt16Item *)pItem)->GetValue();
}
if(bModifier1 )
@@ -515,7 +515,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
Size aSize(16 * MM50, 8 * MM50);
GetShell().LockPaint();
GetShell().StartAllAction();
- SwFlyFrmAttrMgr aMgr( TRUE, GetShellPtr(), FRMMGR_TYPE_TEXT );
+ SwFlyFrmAttrMgr aMgr( sal_True, GetShellPtr(), FRMMGR_TYPE_TEXT );
if(nCols > 1)
{
SwFmtCol aCol;
@@ -535,37 +535,37 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
break;
case FN_INSERT_FRAME:
{
- BOOL bSingleCol = FALSE;
+ sal_Bool bSingleCol = sal_False;
if( 0!= dynamic_cast< SwWebDocShell*>( GetView().GetDocShell()) )
{
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
- USHORT nExport = pHtmlOpt->GetExportMode();
+ sal_uInt16 nExport = pHtmlOpt->GetExportMode();
if( HTML_CFG_MSIE == nExport ||
HTML_CFG_HTML32 == nExport ||
HTML_CFG_MSIE_40 == nExport ||
HTML_CFG_HTML32 == nExport )
{
- bSingleCol = TRUE;
+ bSingleCol = sal_True;
}
}
// Rahmen neu anlegen
- SwFlyFrmAttrMgr aMgr( TRUE, GetShellPtr(), FRMMGR_TYPE_TEXT );
+ SwFlyFrmAttrMgr aMgr( sal_True, GetShellPtr(), FRMMGR_TYPE_TEXT );
if(pArgs)
{
Size aSize(aMgr.GetSize());
aSize.Width() = GetShell().GetAnyCurRect(RECT_PAGE_PRT).Width();
Point aPos = aMgr.GetPos();
RndStdIds eAnchor = FLY_AT_PARA;
- if(pArgs->GetItemState(nSlot, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(nSlot, sal_False, &pItem) == SFX_ITEM_SET)
eAnchor = (RndStdIds)((SfxUInt16Item *)pItem)->GetValue();
- if(pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem) == SFX_ITEM_SET)
aPos = ((SfxPointItem *)pItem)->GetValue();
- if(pArgs->GetItemState(FN_PARAM_2, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(FN_PARAM_2, sal_False, &pItem) == SFX_ITEM_SET)
aSize = ((SvxSizeItem *)pItem)->GetSize();
- if(pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET)
{
- USHORT nCols = ((SfxUInt16Item *)pItem)->GetValue();
+ sal_uInt16 nCols = ((SfxUInt16Item *)pItem)->GetValue();
if( !bSingleCol && 1 < nCols )
{
SwFmtCol aFmtCol;
@@ -585,7 +585,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
else
{
- static USHORT __READONLY_DATA aFrmAttrRange[] =
+ static sal_uInt16 __READONLY_DATA aFrmAttrRange[] =
{
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
@@ -614,16 +614,16 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
// Minimalgroesse in Spalten loeschen
SvxBoxInfoItem aBoxInfo((SvxBoxInfoItem &)aSet.Get(SID_ATTR_BORDER_INNER));
const SvxBoxItem& rBox = (const SvxBoxItem&)aSet.Get(RES_BOX);
- aBoxInfo.SetMinDist(FALSE);
+ aBoxInfo.SetMinDist(sal_False);
aBoxInfo.SetDefDist(rBox.GetDistance(BOX_LINE_LEFT));
aSet.Put(aBoxInfo);
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, GetView().GetDocShell()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_STD,
- GetView().GetViewFrame(), &GetView().GetViewFrame()->GetWindow(), aSet, TRUE);
+ GetView().GetViewFrame(), &GetView().GetViewFrame()->GetWindow(), aSet, sal_True);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if(pDlg->Execute() && pDlg->GetOutputItemSet())
{
@@ -647,7 +647,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
if ( xRecorder.is() )
{
//FN_INSERT_FRAME
- USHORT nAnchor = (USHORT)aMgr.GetAnchor();
+ sal_uInt16 nAnchor = (sal_uInt16)aMgr.GetAnchor();
rReq.AppendItem(SfxUInt16Item(nSlot, nAnchor));
rReq.AppendItem(SfxPointItem(FN_PARAM_1, rShell.GetObjAbsPos()));
rReq.AppendItem(SvxSizeItem(FN_PARAM_2, rShell.GetObjSize()));
@@ -674,8 +674,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_HRULER:
{
String sPath;
- BOOL bSimpleLine = FALSE;
- BOOL bRet = FALSE;
+ sal_Bool bSimpleLine = sal_False;
+ sal_Bool bRet = sal_False;
Window* pParent = GetView().GetWindow();
if ( pItem )
{
@@ -710,28 +710,28 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
if(bSimpleLine)
{
if(!(rSh.IsSttOfPara() && rSh.IsEndOfPara())) // kein leerer Absatz?
- rSh.SplitNode( FALSE, FALSE ); // dann Platz schaffen
- rSh.SplitNode( FALSE, FALSE );
- rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.SplitNode( sal_False, sal_False ); // dann Platz schaffen
+ rSh.SplitNode( sal_False, sal_False );
+ rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
rSh.SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_HTML_HR ));
- rSh.Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
- bRet = TRUE;
+ rSh.Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
+ bRet = sal_True;
}
else if(sPath.Len())
{
- SwFlyFrmAttrMgr aFrmMgr( TRUE, &rSh, FRMMGR_TYPE_GRF );
+ SwFlyFrmAttrMgr aFrmMgr( sal_True, &rSh, FRMMGR_TYPE_GRF );
// am FrmMgr muessen die richtigen Parameter eingestellt werden
aFrmMgr.SetAnchor(FLY_AS_CHAR);
- rSh.SplitNode( FALSE, FALSE );
- rSh.SplitNode( FALSE, FALSE );
- rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.SplitNode( sal_False, sal_False );
+ rSh.SplitNode( sal_False, sal_False );
+ rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
rSh.SetAttr(SvxAdjustItem(SVX_ADJUST_CENTER,RES_PARATR_ADJUST ));
- if(GRFILTER_OK == GetView().InsertGraphic(sPath, aEmptyStr, TRUE, 0, 0 ))
- bRet = TRUE;
+ if(GRFILTER_OK == GetView().InsertGraphic(sPath, aEmptyStr, sal_True, 0, 0 ))
+ bRet = sal_True;
rSh.EnterStdMode();
- rSh.Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
}
rSh.EndAllAction();
rSh.EndUndo(UNDO_UI_INSERT_RULER);
@@ -767,18 +767,18 @@ bool lcl_IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
void SwTextShell::StateInsert( SfxItemSet &rSet )
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
SfxWhichIter aIter( rSet );
SwWrtShell &rSh = GetShell();
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SvtModuleOptions aMOpt;
SfxObjectCreateMode eCreateMode =
GetView().GetDocShell()->GetCreateMode();
rSh.Push();
- const BOOL bCrsrInHidden = rSh.SelectHiddenRange();
+ const sal_Bool bCrsrInHidden = rSh.SelectHiddenRange();
// --> OD 2009-08-05 #i103839#, #b6855246#
- // Do not call method <SwCrsrShell::Pop(..)> with 1st parameter = <FALSE>
+ // Do not call method <SwCrsrShell::Pop(..)> with 1st parameter = <sal_False>
// in order to avoid that the view jumps to the visible cursor.
rSh.Pop();
// <--
@@ -827,7 +827,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
else if(SID_INSERT_FLOATINGFRAME == nWhich && nHtmlMode&HTMLMODE_ON)
{
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
- USHORT nExport = pHtmlOpt->GetExportMode();
+ sal_uInt16 nExport = pHtmlOpt->GetExportMode();
if(HTML_CFG_MSIE_40 != nExport && HTML_CFG_WRITER != nExport )
rSet.DisableItem(nWhich);
}
@@ -848,7 +848,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
SvxHyperlinkItem aHLinkItem;
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem))
+ if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem))
{
const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem;
aHLinkItem.SetURL(pINetFmt->GetValue());
@@ -869,7 +869,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
// Text des Links besorgen
rSh.StartAction();
rSh.CreateCrsr();
- rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT,TRUE);
+ rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT,sal_True);
String sLinkName = rSh.GetSelTxt();
aHLinkItem.SetName(sLinkName);
aHLinkItem.SetInsertMode(HLINK_FIELD);
@@ -914,7 +914,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
if( bDisable )
{
const SwSection* pCurrSection = rSh.GetCurrSection();
- USHORT nFullSectCnt = rSh.GetFullSelectedSectionCount();
+ sal_uInt16 nFullSectCnt = rSh.GetFullSelectedSectionCount();
if( pCurrSection && ( !rSh.HasSelection() || 0 != nFullSectCnt ))
bDisable = false;
else if(
@@ -1059,14 +1059,14 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem);
String aChars, aFontName;
if ( pItem )
{
aChars = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
aFontName = pFontItem->GetValue();
@@ -1078,19 +1078,19 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONT,
0 );
rSh.GetCurAttr( aSet );
- USHORT nScript = rSh.GetScriptType();
+ sal_uInt16 nScript = rSh.GetScriptType();
SvxFontItem aFont( RES_CHRATR_FONT );
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aFont = *(SvxFontItem*)pI;
else
aFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
RES_CHRATR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
if (!aFontName.Len())
aFontName = aFont.GetFamilyName();
}
@@ -1100,7 +1100,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
{
// Eingestellten Font als Default
SfxAllItemSet aAllSet( rSh.GetAttrPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
SwViewOption aOpt(*GetShell().GetViewOptions());
String sSymbolFont = aOpt.GetSymbolFont();
@@ -1114,8 +1114,8 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
if( RET_OK == pDlg->Execute() )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pFontItem )
{
aNewFont.SetName( pFontItem->GetFamilyName() );
@@ -1135,7 +1135,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
delete pDlg;
}
- BOOL bFontChanged = FALSE;
+ sal_Bool bFontChanged = sal_False;
if( aChars.Len() )
{
rSh.StartAllAction();
@@ -1152,14 +1152,14 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
rSh.GetCurAttr( aSet );
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aFont = *(SvxFontItem*)pI;
else
aFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
RES_CHRATR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
}
// Zeichen einfuegen
@@ -1168,7 +1168,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
// #108876# a font attribute has to be set always due to a guessed script type
if( aNewFont.GetName().Len() )
{
- bFontChanged = TRUE;
+ bFontChanged = sal_True;
SvxFontItem aNewFontItem( aFont );
aNewFontItem.GetFamilyName() = aNewFont.GetName();
aNewFontItem.GetFamily() = aNewFont.GetFamily();
@@ -1182,22 +1182,22 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
nScript = pBreakIt->GetAllScriptsOfText( aChars );
if( SCRIPTTYPE_LATIN & nScript )
{
- aRestoreSet.Put( aSet.Get( RES_CHRATR_FONT, TRUE ) );
+ aRestoreSet.Put( aSet.Get( RES_CHRATR_FONT, sal_True ) );
aSet.Put( aNewFontItem, RES_CHRATR_FONT);
}
if( SCRIPTTYPE_ASIAN & nScript )
{
- aRestoreSet.Put( aSet.Get( RES_CHRATR_CJK_FONT, TRUE ) );
+ aRestoreSet.Put( aSet.Get( RES_CHRATR_CJK_FONT, sal_True ) );
aSet.Put( aNewFontItem, RES_CHRATR_CJK_FONT );
}
if( SCRIPTTYPE_COMPLEX & nScript )
{
- aRestoreSet.Put( aSet.Get( RES_CHRATR_CTL_FONT, TRUE ) );
+ aRestoreSet.Put( aSet.Get( RES_CHRATR_CTL_FONT, sal_True ) );
aSet.Put( aNewFontItem, RES_CHRATR_CTL_FONT );
}
rSh.SetMark();
- rSh.ExtendSelection( FALSE, aChars.Len() );
+ rSh.ExtendSelection( sal_False, aChars.Len() );
rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND | nsSetAttrMode::SETATTR_NOFORMATATTR );
if( !rSh.IsCrsrPtAtEnd() )
rSh.SwapPam();
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index e084c539da19..db0bbe8599e5 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -133,10 +133,10 @@
using namespace ::com::sun::star;
-void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const SfxItemSet *pArgs, SfxRequest *pReq )
+void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq )
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rWrtSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SfxItemSet aCoreSet( rWrtSh.GetView().GetPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
@@ -146,8 +146,8 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
SID_ATTR_CHAR_WIDTH_FIT_TO_LINE, SID_ATTR_CHAR_WIDTH_FIT_TO_LINE,
0 );
rWrtSh.GetCurAttr( aCoreSet );
- BOOL bSel = rWrtSh.HasSelection();
- BOOL bSelectionPut = FALSE;
+ sal_Bool bSel = rWrtSh.HasSelection();
+ sal_Bool bSelectionPut = sal_False;
if(bSel || rWrtSh.IsInWord())
{
if(!bSel)
@@ -158,10 +158,10 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
rWrtSh.SelWrd();
}
aCoreSet.Put(SfxStringItem(FN_PARAM_SELECTION, rWrtSh.GetSelTxt()));
- bSelectionPut = TRUE;
+ bSelectionPut = sal_True;
if(!bSel)
{
- rWrtSh.Pop(FALSE);
+ rWrtSh.Pop(sal_False);
rWrtSh.EndAction();
}
}
@@ -170,7 +170,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
// Das CHRATR_BACKGROUND-Attribut wird fuer den Dialog in
// ein RES_BACKGROUND verwandelt und wieder zurueck ...
const SfxPoolItem *pTmpBrush;
- if( SFX_ITEM_SET == aCoreSet.GetItemState( RES_CHRATR_BACKGROUND, TRUE, &pTmpBrush ) )
+ if( SFX_ITEM_SET == aCoreSet.GetItemState( RES_CHRATR_BACKGROUND, sal_True, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_BACKGROUND );
@@ -201,7 +201,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
if ( pSet)
{
SfxItemSet aTmpSet( *pSet );
- if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, FALSE, &pTmpBrush ) )
+ if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, sal_False, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
@@ -211,11 +211,11 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
aTmpSet.ClearItem( RES_BACKGROUND );
const SfxPoolItem* pSelectionItem;
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
xub_StrLen nInsert = 0;
// aus ungeklaerter Ursache ist das alte Item wieder im Set
- if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, FALSE, &pSelectionItem) )
+ if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, sal_False, &pSelectionItem) )
{
String sInsert = ((const SfxStringItem*)pSelectionItem)->GetValue();
bInsert = sInsert.Len() != 0;
@@ -225,13 +225,13 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
rWrtSh.StartAction();
rWrtSh.Insert( sInsert );
rWrtSh.SetMark();
- rWrtSh.ExtendSelection(FALSE, sInsert.Len());
+ rWrtSh.ExtendSelection(sal_False, sInsert.Len());
SfxRequest aReq( rWrtSh.GetView().GetViewFrame(), FN_INSERT_STRING );
aReq.AppendItem( SfxStringItem( FN_INSERT_STRING, sInsert ) );
aReq.Done();
SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_LEFT );
aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) );
- aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, TRUE) );
+ aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_True) );
aReq1.Done();
}
}
@@ -250,7 +250,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
{
SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_RIGHT );
aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) );
- aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, FALSE) );
+ aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_False) );
aReq1.Done();
rWrtSh.SwapPam();
rWrtSh.ClearMark();
@@ -272,7 +272,7 @@ short lcl_AskRedlineMode(Window *pWin)
String( SW_RES( STR_REDLINE_TITLE ) ),
String( SW_RES( STR_REDLINE_MSG ) ) );
aQBox.SetImage( QueryBox::GetStandardImage() );
- USHORT nBtnFlags = BUTTONDIALOG_DEFBUTTON |
+ sal_uInt16 nBtnFlags = BUTTONDIALOG_DEFBUTTON |
BUTTONDIALOG_OKBUTTON |
BUTTONDIALOG_FOCUSBUTTON;
@@ -289,13 +289,13 @@ short lcl_AskRedlineMode(Window *pWin)
void SwTextShell::Execute(SfxRequest &rReq)
{
- BOOL bUseDialog = TRUE;
+ sal_Bool bUseDialog = sal_True;
const SfxItemSet *pArgs = rReq.GetArgs();
SwWrtShell& rWrtSh = GetShell();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
switch( nSlot )
{
case SID_LANGUAGE_STATUS:
@@ -330,7 +330,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
//!! due to the selection changes coming below.
rWrtSh.StartAction();
// prevent view from jumping because of (temporary) selection changes
- rWrtSh.LockView( TRUE );
+ rWrtSh.LockView( sal_True );
// save selection for later restoration
rWrtSh.Push();
@@ -389,9 +389,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
// restore selection...
- rWrtSh.Pop( FALSE );
+ rWrtSh.Pop( sal_False );
- rWrtSh.LockView( FALSE );
+ rWrtSh.LockView( sal_False );
rWrtSh.EndAction();
}
@@ -433,12 +433,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, nSlot , sal_False );
if ( pNameItem )
aStr = pNameItem->GetValue();
- BOOL bFont = pFont && pFont->GetValue().Len();
+ sal_Bool bFont = pFont && pFont->GetValue().Len();
rWrtSh.StartUndo( UNDO_UI_INSERT_FOOTNOTE );
rWrtSh.InsertFootnote( aStr, nSlot == FN_INSERT_ENDNOTE, !bFont );
if ( bFont )
{
- rWrtSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rWrtSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False );
SfxItemSet aSet( rWrtSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rWrtSh.GetCurAttr( aSet );
SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
@@ -446,7 +446,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rFont.GetStyleName(), rFont.GetPitch(), RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT );
//pCharset ? (CharSet) pCharset->GetValue() : RTL_TEXTENCODING_DONTKNOW );
rWrtSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
- rWrtSh.ResetSelect(0, FALSE);
+ rWrtSh.ResetSelect(0, sal_False);
rWrtSh.EndSelect();
rWrtSh.GotoFtnTxt();
}
@@ -459,12 +459,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE,
- GetView().GetWindow(), rWrtSh, FALSE );
+ GetView().GetWindow(), rWrtSh, sal_False );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
pDlg->SetHelpId(GetStaticInterface()->GetSlot(nSlot)->GetCommand());
if ( pDlg->Execute() == RET_OK )
{
- USHORT nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE;
+ sal_uInt16 nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE;
SfxRequest aReq( GetView().GetViewFrame(), nId );
if ( pDlg->GetStr().Len() )
aReq.AppendItem( SfxStringItem( nId, pDlg->GetStr() ) );
@@ -501,7 +501,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
// remove the languages from that)
SvUShortsSort aAttribs;
- USHORT __FAR_DATA aResetableSetRange[] = {
+ sal_uInt16 __FAR_DATA aResetableSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_LANGUAGE - 1,
RES_CHRATR_LANGUAGE + 1, RES_CHRATR_CJK_LANGUAGE - 1,
@@ -515,12 +515,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
- USHORT __FAR_DATA *pUShorts = aResetableSetRange;
+ sal_uInt16 __FAR_DATA *pUShorts = aResetableSetRange;
while (*pUShorts)
{
- USHORT nL = pUShorts[1] - pUShorts[0] + 1;
- USHORT nE = pUShorts[0];
- for (USHORT i = 0; i < nL; ++i)
+ sal_uInt16 nL = pUShorts[1] - pUShorts[0] + 1;
+ sal_uInt16 nE = pUShorts[0];
+ for (sal_uInt16 i = 0; i < nL; ++i)
aAttribs.Insert( nE++ );
pUShorts += 2;
}
@@ -531,7 +531,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
case FN_INSERT_BREAK_DLG:
{
- USHORT nKind=0, nPageNumber=0;
+ sal_uInt16 nKind=0, nPageNumber=0;
String aTemplateName;
if ( pItem )
{
@@ -616,11 +616,11 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_AUTOFORMAT_REDLINE_APPLY:
{
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags());
- // das muss fuer die Nachbearbeitung immer FALSE sein
- aFlags.bAFmtByInput = FALSE;
- aFlags.bWithRedlining = TRUE;
+ // das muss fuer die Nachbearbeitung immer sal_False sein
+ aFlags.bAFmtByInput = sal_False;
+ aFlags.bWithRedlining = sal_True;
rWrtSh.AutoFormat( &aFlags );
- aFlags.bWithRedlining = FALSE;
+ aFlags.bWithRedlining = sal_False;
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if (pVFrame->HasChildWindow(FN_REDLINE_ACCEPT))
@@ -636,7 +636,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
case RET_OK:
{
- pDlg->AcceptAll(TRUE);
+ pDlg->AcceptAll(sal_True);
SfxRequest aReq( pVFrame, FN_AUTOFORMAT_APPLY );
aReq.Done();
rReq.Ignore();
@@ -644,7 +644,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
case RET_CANCEL:
- pDlg->AcceptAll(FALSE);
+ pDlg->AcceptAll(sal_False);
rReq.Ignore();
break;
@@ -660,8 +660,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_AUTOFORMAT_APPLY:
{
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags());
- // das muss fuer die Nachbearbeitung immer FALSE sein
- aFlags.bAFmtByInput = FALSE;
+ // das muss fuer die Nachbearbeitung immer sal_False sein
+ aFlags.bAFmtByInput = sal_False;
rWrtSh.AutoFormat( &aFlags );
rReq.Done();
}
@@ -669,7 +669,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_AUTOFORMAT_AUTO:
{
SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get();
- BOOL bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() : !pACfg->IsAutoFmtByInput();
+ sal_Bool bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() : !pACfg->IsAutoFmtByInput();
if( bSet != pACfg->IsAutoFmtByInput() )
{
pACfg->SetAutoFmtByInput( bSet );
@@ -740,7 +740,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
break;
case FN_EDIT_FORMULA:
{
- const USHORT nId = SwInputChild::GetChildWindowId();
+ const sal_uInt16 nId = SwInputChild::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if(pItem)
{
@@ -748,13 +748,13 @@ void SwTextShell::Execute(SfxRequest &rReq)
if( pVFrame->HasChildWindow( nId ) )
{
pVFrame->ToggleChildWindow( nId );
- pVFrame->GetBindings().InvalidateAll( TRUE );
+ pVFrame->GetBindings().InvalidateAll( sal_True );
}
String sFormula(((const SfxStringItem*)pItem)->GetValue());
SwFldMgr aFldMgr;
rWrtSh.StartAllAction();
- BOOL bDelSel;
+ sal_Bool bDelSel;
if( 0 != (bDelSel = rWrtSh.HasSelection()) )
{
rWrtSh.StartUndo( UNDO_START );
@@ -779,7 +779,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
else
{
SvNumberFormatter* pFormatter = rWrtSh.GetNumberFormatter();
- ULONG nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM);
+ sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM);
SwInsertFld_Data aData(TYP_FORMELFLD, nsSwGetSetExpType::GSE_FORMULA, aEmptyStr, sFormula, nSysNumFmt);
aFldMgr.InsertFld(aData);
}
@@ -795,7 +795,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.EndAllTblBoxEdit();
pVFrame->ToggleChildWindow( nId );
if( !pVFrame->HasChildWindow( nId ) )
- pVFrame->GetBindings().InvalidateAll( TRUE );
+ pVFrame->GetBindings().InvalidateAll( sal_True );
rReq.Ignore();
}
}
@@ -811,7 +811,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
break;
case FN_REMOVE_HYPERLINK:
{
- BOOL bSel = rWrtSh.HasSelection();
+ sal_Bool bSel = rWrtSh.HasSelection();
if(!bSel)
{
rWrtSh.StartAction();
@@ -825,7 +825,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.ResetAttr( &aAttribs );
if(!bSel)
{
- rWrtSh.Pop(FALSE);
+ rWrtSh.Pop(sal_False);
rWrtSh.EndAction();
}
}
@@ -836,9 +836,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_TXTATR_INET :
case FN_INSERT_HYPERLINK:
{
- USHORT nWhich = GetPool().GetWhich( nSlot );
+ sal_uInt16 nWhich = GetPool().GetWhich( nSlot );
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
- bUseDialog = FALSE;
+ bUseDialog = sal_False;
// intentionally no break
}
case SID_CHAR_DLG:
@@ -851,7 +851,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.Push(); //save current cursor
SwLangHelper::SelectCurrentPara( rWrtSh );
lcl_CharDialog( rWrtSh, bUseDialog, nSlot, pArgs, &rReq );
- rWrtSh.Pop( FALSE ); //restore old cursor
+ rWrtSh.Pop( sal_False ); //restore old cursor
}
break;
case SID_ATTR_LRSPACE :
@@ -867,16 +867,16 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_FORMAT_DROPCAPS :
case FN_DROP_TEXT:
{
- USHORT nWhich = GetPool().GetWhich( nSlot );
+ sal_uInt16 nWhich = GetPool().GetWhich( nSlot );
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
- bUseDialog = FALSE;
+ bUseDialog = sal_False;
// intentionally no break
}
case SID_PARA_DLG:
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SfxItemSet aCoreSet( GetPool(),
RES_PARATR_BEGIN, RES_PARATR_END - 1,
// --> OD 2008-02-25 #refactorlists#
@@ -905,7 +905,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&)
GetPool().GetDefaultItem(RES_PARATR_TABSTOP);
- USHORT nDefDist = ::GetTabDist( rDefTabs );
+ sal_uInt16 nDefDist = ::GetTabDist( rDefTabs );
SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
aCoreSet.Put( aDefDistItem );
@@ -926,7 +926,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
//aktuelles Seitenformat
::SwToSfxPageDescAttr( aCoreSet );
- UINT16 nDefPage = 0;
+ sal_uInt16 nDefPage = 0;
if( pItem )
nDefPage = ((SfxUInt16Item *)pItem)->GetValue();
@@ -950,7 +950,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
- pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet,DLG_STD, DLG_PARA,NULL, FALSE, nDefPage );
+ pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet,DLG_STD, DLG_PARA,NULL, sal_False, nDefPage );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
}
SfxItemSet* pSet = NULL;
@@ -963,8 +963,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
// Defaults evtl umsetzen
pSet = (SfxItemSet*)pDlg->GetOutputItemSet();
- USHORT nNewDist;
- if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, FALSE, &pItem ) &&
+ sal_uInt16 nNewDist;
+ if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, sal_False, &pItem ) &&
nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) )
{
SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
@@ -973,13 +973,13 @@ void SwTextShell::Execute(SfxRequest &rReq)
pSet->ClearItem( SID_ATTR_TABSTOP_DEFAULTS );
}
- if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,FALSE,&pItem) )
+ if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,sal_False,&pItem) )
{
pSet->Put(SfxStringItem(FN_DROP_TEXT, ((const SfxStringItem*)pItem)->GetValue()));
pSet->ClearItem(FN_PARAM_1);
}
- if( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_DROP, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_DROP, sal_False, &pItem ))
{
String sCharStyleName;
if(((const SwFmtDrop*)pItem)->GetCharFmt())
@@ -1007,7 +1007,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
rWrtSh.StartAction();
// rWrtSh.StartUndo( UNDO_START );
- if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, FALSE, &pItem) )
+ if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, sal_False, &pItem) )
{
if ( ((SfxStringItem*)pItem)->GetValue().Len() )
rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
@@ -1024,17 +1024,17 @@ void SwTextShell::Execute(SfxRequest &rReq)
if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART) )
{
- //SetNumRuleStart(TRUE) restarts the numbering at the value
+ //SetNumRuleStart(sal_True) restarts the numbering at the value
//that is defined at the starting point of the numbering level
//otherwise the SetNodeNumStart() value determines the start
//if it's set to something different than USHRT_MAX
- BOOL bStart = ((SfxBoolItem&)pSet->Get(FN_NUMBER_NEWSTART)).GetValue();
+ sal_Bool bStart = ((SfxBoolItem&)pSet->Get(FN_NUMBER_NEWSTART)).GetValue();
// --> OD 2007-06-11 #b6560525#
// Default value for restart value has to be USHRT_MAX
// in order to indicate that the restart value of the list
// style has to be used on restart.
- USHORT nNumStart = USHRT_MAX;
+ sal_uInt16 nNumStart = USHRT_MAX;
// <--
if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
@@ -1045,9 +1045,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
else if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
- USHORT nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ sal_uInt16 nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
rWrtSh.SetNodeNumStart(nNumStart);
- rWrtSh.SetNumRuleStart(FALSE);
+ rWrtSh.SetNumRuleStart(sal_False);
}
// --> OD 2006-12-06 #i56253#
if ( bUndoNeeded )
@@ -1083,10 +1083,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_SELECT_PARA:
{
if(!rWrtSh.IsSttOfPara())
- rWrtSh.SttPara(FALSE);
+ rWrtSh.SttPara(sal_False);
else
rWrtSh.EnterStdMode();
- rWrtSh.EndPara(TRUE);
+ rWrtSh.EndPara(sal_True);
}
break;
@@ -1182,7 +1182,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwEditWin& rEdtWin = GetView().GetEditWin();
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
SwApplyTemplate aTempl;
- BOOL bSelection = rWrtSh.HasSelection();
+ sal_Bool bSelection = rWrtSh.HasSelection();
if(bSelection)
{
@@ -1232,8 +1232,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
String sStyleName;
if(pItem)
sStyleName = ((const SfxStringItem*)pItem)->GetValue();
- BOOL bOn = TRUE;
- if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem))
+ sal_Bool bOn = sal_True;
+ if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem))
bOn = ((const SfxBoolItem*)pItem)->GetValue();
ChangeHeaderOrFooter(sStyleName, FN_INSERT_PAGEHEADER == nSlot, bOn, !rReq.IsAPI());
rReq.Done();
@@ -1251,7 +1251,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_SELECTION_MODE_BLOCK :
{
bool bSetBlockMode = !rWrtSh.IsBlockMode();
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem))
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem))
bSetBlockMode = ((const SfxBoolItem*)pItem)->GetValue();
if( ( nSlot == FN_SELECTION_MODE_DEFAULT ) ^ bSetBlockMode )
rWrtSh.EnterBlockMode();
@@ -1269,9 +1269,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
RES_TXTATR_INETFMT,
RES_TXTATR_INETFMT);
rWrtSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, TRUE ))
+ if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ))
{
- const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, TRUE) );
+ const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, sal_True) );
if( nSlot == FN_COPY_HYPERLINK_LOCATION )
{
::uno::Reference< datatransfer::clipboard::XClipboard > xClipboard = GetView().GetEditWin().GetClipboard();
@@ -1326,7 +1326,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -1357,7 +1357,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
{
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -1452,15 +1452,15 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_INSERT_FOOTNOTE:
case FN_INSERT_FOOTNOTE_DLG:
{
- const USHORT nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER |
+ const sal_uInt16 nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER |
FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE;
- if ( (rSh.GetFrmType(0,TRUE) & nNoType) )
+ if ( (rSh.GetFrmType(0,sal_True) & nNoType) )
rSet.DisableItem(nWhich);
}
break;
case FN_INSERT_TABLE:
if ( rSh.GetTableFmt() ||
- (rSh.GetFrmType(0,TRUE) & FRMTYPE_FOOTNOTE) )
+ (rSh.GetFrmType(0,sal_True) & FRMTYPE_FOOTNOTE) )
rSet.DisableItem( nWhich );
break;
@@ -1482,17 +1482,17 @@ void SwTextShell::GetState( SfxItemSet &rSet )
break;
case FN_GLOSSARY_DLG:
{
- rSet.Put(SfxBoolItem(nWhich), TRUE);
+ rSet.Put(SfxBoolItem(nWhich), sal_True);
}
break;
case SID_DEC_INDENT:
case SID_INC_INDENT:
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin(
- SID_INC_INDENT == nWhich, TRUE ))
+ SID_INC_INDENT == nWhich, sal_True ))
rSet.DisableItem( nWhich );
}
break;
@@ -1500,11 +1500,11 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_DEC_INDENT_OFFSET:
case FN_INC_INDENT_OFFSET:
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
if( (nHtmlMode == HTMLMODE_ON) ||
!rSh.IsMoveLeftMargin( FN_INC_INDENT_OFFSET == nWhich,
- FALSE ))
+ sal_False ))
rSet.DisableItem( nWhich );
}
break;
@@ -1542,8 +1542,8 @@ void SwTextShell::GetState( SfxItemSet &rSet )
rSet.Put( SfxObjectShellItem( nWhich, GetView().GetDocShell() ));
#else
// Seitenvorlagen besorgen
- BOOL bFound = FALSE;
- USHORT n, nCnt = rSh.GetPageDescCnt();
+ sal_Bool bFound = sal_False;
+ sal_uInt16 n, nCnt = rSh.GetPageDescCnt();
for( n = 0; n < nCnt; ++n )
{
const SwPageDesc& rDesc = rSh.GetPageDesc( n );
@@ -1551,7 +1551,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
? !rDesc.GetMaster().GetHeader().IsActive()
: !rDesc.GetMaster().GetFooter().IsActive() )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -1599,7 +1599,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
RES_TXTATR_INETFMT,
RES_TXTATR_INETFMT);
rSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, TRUE ) || rSh.HasReadonlySel())
+ if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ) || rSh.HasReadonlySel())
{
rSet.DisableItem(nWhich);
}
@@ -1638,7 +1638,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
RES_TXTATR_INETFMT,
RES_TXTATR_INETFMT);
rSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, FALSE ))
+ if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_False ))
rSet.DisableItem(nWhich);
}
break;
@@ -1727,17 +1727,17 @@ void SwTextShell::GetState( SfxItemSet &rSet )
given all styles are changed
---------------------------------------------------------------------------*/
void SwTextShell::ChangeHeaderOrFooter(
- const String& rStyleName, BOOL bHeader, BOOL bOn, BOOL bShowWarning)
+ const String& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning)
{
SwWrtShell& rSh = GetShell();
rSh.StartAllAction();
rSh.StartUndo( UNDO_HEADER_FOOTER ); // #i7983#
- BOOL bExecute = TRUE;
- BOOL bCrsrSet = FALSE;
- for( USHORT nFrom = 0, nTo = rSh.GetPageDescCnt();
+ sal_Bool bExecute = sal_True;
+ sal_Bool bCrsrSet = sal_False;
+ for( sal_uInt16 nFrom = 0, nTo = rSh.GetPageDescCnt();
nFrom < nTo; ++nFrom )
{
- int bChgd = FALSE;
+ int bChgd = sal_False;
SwPageDesc aDesc( rSh.GetPageDesc( nFrom ));
String sTmp(aDesc.GetName());
if( !rStyleName.Len() || rStyleName == sTmp )
@@ -1746,19 +1746,19 @@ void SwTextShell::ChangeHeaderOrFooter(
((bHeader && aDesc.GetMaster().GetHeader().IsActive()) ||
(!bHeader && aDesc.GetMaster().GetFooter().IsActive())))
{
- bShowWarning = FALSE;
+ bShowWarning = sal_False;
//Actions have to be closed while the dialog is showing
rSh.EndAllAction();
Window* pParent = &GetView().GetViewFrame()->GetWindow();
- BOOL bRet = RET_YES == QueryBox( pParent, ResId( RID_SVXQBX_DELETE_HEADFOOT,
+ sal_Bool bRet = RET_YES == QueryBox( pParent, ResId( RID_SVXQBX_DELETE_HEADFOOT,
DIALOG_MGR() ) ).Execute();
bExecute = bRet;
rSh.StartAllAction();
}
if( bExecute )
{
- bChgd = TRUE;
+ bChgd = sal_True;
SwFrmFmt &rMaster = aDesc.GetMaster();
if(bHeader)
rMaster.SetFmtAttr( SwFmtHeader( bOn ));
diff --git a/sw/source/ui/shells/textsh2.cxx b/sw/source/ui/shells/textsh2.cxx
index 2d267e926fc8..3fe98d06eb45 100644
--- a/sw/source/ui/shells/textsh2.cxx
+++ b/sw/source/ui/shells/textsh2.cxx
@@ -108,7 +108,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
SwNewDBMgr* pNewDBMgr = GetShell().GetNewDBMgr();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
::rtl::OUString sSourceArg, sCommandArg;
sal_Int32 nCommandTypeArg = 0;
@@ -120,29 +120,29 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
const SfxPoolItem* pSelectionItem = 0;
// first get the selection of rows to be inserted
- pArgs->GetItemState(FN_DB_DATA_SELECTION_ANY, FALSE, &pSelectionItem);
+ pArgs->GetItemState(FN_DB_DATA_SELECTION_ANY, sal_False, &pSelectionItem);
Sequence<Any> aSelection;
if(pSelectionItem)
((SfxUsrAnyItem*)pSelectionItem)->GetValue() >>= aSelection;
// get the data source name
- pArgs->GetItemState(FN_DB_DATA_SOURCE_ANY, FALSE, &pSourceItem);
+ pArgs->GetItemState(FN_DB_DATA_SOURCE_ANY, sal_False, &pSourceItem);
if(pSourceItem)
((const SfxUsrAnyItem*)pSourceItem)->GetValue() >>= sSourceArg;
// get the command
- pArgs->GetItemState(FN_DB_DATA_COMMAND_ANY, FALSE, &pCommandItem);
+ pArgs->GetItemState(FN_DB_DATA_COMMAND_ANY, sal_False, &pCommandItem);
if(pCommandItem)
((const SfxUsrAnyItem*)pCommandItem)->GetValue() >>= sCommandArg;
// get the command type
- pArgs->GetItemState(FN_DB_DATA_COMMAND_TYPE_ANY, FALSE, &pCommandTypeItem);
+ pArgs->GetItemState(FN_DB_DATA_COMMAND_TYPE_ANY, sal_False, &pCommandTypeItem);
if(pCommandTypeItem)
((const SfxUsrAnyItem*)pCommandTypeItem)->GetValue() >>= nCommandTypeArg;
Reference<XConnection> xConnection;
- pArgs->GetItemState(FN_DB_CONNECTION_ANY, FALSE, &pConnectionItem);
+ pArgs->GetItemState(FN_DB_CONNECTION_ANY, sal_False, &pConnectionItem);
if ( pConnectionItem )
((const SfxUsrAnyItem*)pConnectionItem)->GetValue() >>= xConnection;
// may be we even get no connection
@@ -156,7 +156,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
// get the cursor, we use to travel, may be NULL
Reference<XResultSet> xCursor;
- pArgs->GetItemState(FN_DB_DATA_CURSOR_ANY, FALSE, &pCursorItem);
+ pArgs->GetItemState(FN_DB_DATA_CURSOR_ANY, sal_False, &pCursorItem);
if ( pCursorItem )
((const SfxUsrAnyItem*)pCursorItem)->GetValue() >>= xCursor;
@@ -186,7 +186,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
case FN_QRY_MERGE_FIELD:
{
// we don't get any cursor, so we must create our own
- BOOL bDisposeResultSet = FALSE;
+ sal_Bool bDisposeResultSet = sal_False;
if ( !xCursor.is() )
{
xCursor = SwNewDBMgr::createCursor(sSourceArg,sCommandArg,nCommandTypeArg,xConnection);
@@ -213,8 +213,8 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
const SfxPoolItem* pColumnItem = 0;
const SfxPoolItem* pColumnNameItem = 0;
- pArgs->GetItemState(FN_DB_COLUMN_ANY, FALSE, &pColumnItem);
- pArgs->GetItemState(FN_DB_DATA_COLUMN_NAME_ANY, FALSE, &pColumnNameItem);
+ pArgs->GetItemState(FN_DB_COLUMN_ANY, sal_False, &pColumnItem);
+ pArgs->GetItemState(FN_DB_DATA_COLUMN_NAME_ANY, sal_False, &pColumnNameItem);
::rtl::OUString sColumnName;
if(pColumnNameItem)
@@ -228,7 +228,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
sDBName += (String)sColumnName;
SwFldMgr aFldMgr(GetShellPtr());
- SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, FALSE, TRUE);
+ SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, sal_False, sal_True);
if(pConnectionItem)
aData.aDBConnection = ((SfxUsrAnyItem*)pConnectionItem)->GetValue();
if(pColumnItem)
diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx
index 9d90ac5d5b26..f699e2cc3853 100644
--- a/sw/source/ui/shells/txtattr.cxx
+++ b/sw/source/ui/shells/txtattr.cxx
@@ -89,12 +89,12 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
const SfxItemSet *pArgs = rReq.GetArgs();
int eState = STATE_TOGGLE;
- USHORT nWhich = rReq.GetSlot();
+ sal_uInt16 nWhich = rReq.GetSlot();
if(pArgs )
{
const SfxPoolItem* pItem;
- pArgs->GetItemState(nWhich, FALSE, &pItem);
+ pArgs->GetItemState(nWhich, sal_False, &pItem);
eState = ((const SfxBoolItem &) pArgs->
Get( nWhich )).GetValue() ? STATE_ON : STATE_OFF;
}
@@ -126,10 +126,10 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
if( nWhich == FN_SET_SUB_SCRIPT )
rBind.SetState( SfxBoolItem( FN_SET_SUPER_SCRIPT,
- FALSE ) );
+ sal_False ) );
else
rBind.SetState( SfxBoolItem( FN_SET_SUB_SCRIPT,
- FALSE ) );
+ sal_False ) );
}
break;
@@ -191,7 +191,7 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
rSh.DontExpandFmt();
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
}
@@ -199,10 +199,10 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
- BOOL bArgs = pArgs != 0 && pArgs->Count() > 0;
- int bGrow = FALSE;
+ sal_Bool bArgs = pArgs != 0 && pArgs->Count() > 0;
+ int bGrow = sal_False;
SwWrtShell& rWrtSh = GetShell();
SwTxtFmtColl* pColl = 0;
@@ -214,7 +214,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
pColl = 0;
}
SfxItemPool& rPool = GetPool();
- USHORT nWhich = rPool.GetWhich(nSlot);
+ sal_uInt16 nWhich = rPool.GetWhich(nSlot);
switch ( nSlot )
{
case FN_TXTATR_INET:
@@ -243,7 +243,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
break;
case FN_GROW_FONT_SIZE:
- bGrow = TRUE;
+ bGrow = sal_True;
// kein break !!
case FN_SHRINK_FONT_SIZE:
{
@@ -252,10 +252,10 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
SfxItemSet aAttrSet( rPool, aSetItem.GetItemSet().GetRanges() );
const SfxPoolItem* pI;
- static const USHORT aScrTypes[] = {
+ static const sal_uInt16 aScrTypes[] = {
SCRIPTTYPE_LATIN, SCRIPTTYPE_ASIAN, SCRIPTTYPE_COMPLEX, 0 };
- USHORT nScriptType = rWrtSh.GetScriptType();
- for( const USHORT* pScrpTyp = aScrTypes; *pScrpTyp; ++pScrpTyp )
+ sal_uInt16 nScriptType = rWrtSh.GetScriptType();
+ for( const sal_uInt16* pScrpTyp = aScrTypes; *pScrpTyp; ++pScrpTyp )
if( ( nScriptType & *pScrpTyp ) &&
0 != ( pI = aSetItem.GetItemOfScript( *pScrpTyp )))
{
@@ -291,7 +291,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
}
@@ -307,7 +307,7 @@ void lcl_SetAdjust(SvxAdjust eAdjst, SfxItemSet& rSet)
-void lcl_SetLineSpace(BYTE ePropL,SfxItemSet& rSet)
+void lcl_SetLineSpace(sal_uInt8 ePropL,SfxItemSet& rSet)
{
SvxLineSpacingItem aLineSpacing(ePropL, RES_PARATR_LINESPACING );
aLineSpacing.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
@@ -360,7 +360,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
void SwTextShell::ExecParaAttr(SfxRequest &rReq)
{
SvxAdjust eAdjst;
- BYTE ePropL;
+ sal_uInt8 ePropL;
const SfxItemSet* pArgs = rReq.GetArgs();
// gleich beide Attribute holen, ist nicht teuerer !!
@@ -369,7 +369,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
RES_FRAMEDIR, RES_FRAMEDIR,
0 );
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch (nSlot)
{
case SID_ATTR_PARA_ADJUST:
@@ -395,7 +395,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
SET_ADJUST:
{
aSet.Put(SvxAdjustItem(eAdjst,RES_PARATR_ADJUST));
- rReq.AppendItem( SfxBoolItem( GetPool().GetWhich(nSlot), TRUE ) );
+ rReq.AppendItem( SfxBoolItem( GetPool().GetWhich(nSlot), sal_True ) );
}
break;
@@ -427,7 +427,7 @@ SET_LINESPACE:
case SID_ATTR_PARA_LEFT_TO_RIGHT :
case SID_ATTR_PARA_RIGHT_TO_LEFT :
{
- BOOL bSet = TRUE;
+ sal_Bool bSet = sal_True;
int eState = pArgs ? pArgs->GetItemState(nSlot) : SFX_ITEM_DISABLED;
if (pArgs && SFX_ITEM_SET == eState)
bSet = ((const SfxBoolItem&)pArgs->Get(nSlot)).GetValue();
@@ -442,8 +442,8 @@ SET_LINESPACE:
SfxItemSet aAdjustSet( GetPool(),
RES_PARATR_ADJUST, RES_PARATR_ADJUST );
GetShell().GetCurAttr(aAdjustSet);
- BOOL bChgAdjust = FALSE;
- SfxItemState eAdjustState = aAdjustSet.GetItemState(RES_PARATR_ADJUST, FALSE);
+ sal_Bool bChgAdjust = sal_False;
+ SfxItemState eAdjustState = aAdjustSet.GetItemState(RES_PARATR_ADJUST, sal_False);
if(eAdjustState >= SFX_ITEM_DEFAULT)
{
int eAdjust = (int)(( const SvxAdjustItem& )
@@ -453,7 +453,7 @@ SET_LINESPACE:
(SVX_ADJUST_RIGHT == eAdjust && SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot);
}
else
- bChgAdjust = TRUE;
+ bChgAdjust = sal_True;
SvxFrameDirection eFrmDirection =
(SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ?
@@ -474,7 +474,7 @@ SET_LINESPACE:
{
SvxNumRule aRule = pCurRule->MakeSvxNumRule();
- for(USHORT i = 0; i < aRule.GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < aRule.GetLevelCount(); i++)
{
SvxNumberFormat aFmt(aRule.GetLevel(i));
if(SVX_ADJUST_LEFT == aFmt.GetNumAdjust())
@@ -490,7 +490,7 @@ SET_LINESPACE:
pCurRule->Get( 0 ).GetPositionAndSpaceMode() );
// <--
aSetRule.SetSvxRule( aRule, GetShell().GetDoc());
- aSetRule.SetAutoRule( TRUE );
+ aSetRule.SetAutoRule( sal_True );
// --> OD 2008-03-17 #refactorlists#
// no start or continuation of a list - list style is only changed
GetShell().SetCurNumRule( aSetRule, false );
@@ -501,7 +501,7 @@ SET_LINESPACE:
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
SwWrtShell& rWrtSh = GetShell();
@@ -525,9 +525,9 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem *pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
switch ( nSlot )
{
case FN_DROP_CHAR_STYLE_NAME:
@@ -567,7 +567,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
{
rSh.StartAction();
rSh.StartUndo( UNDO_START );
- if ( SFX_ITEM_SET == aSet.GetItemState(HINT_END,FALSE,&pItem) )
+ if ( SFX_ITEM_SET == aSet.GetItemState(HINT_END,sal_False,&pItem) )
{
if ( ((SfxStringItem*)pItem)->GetValue().Len() )
rSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
@@ -604,7 +604,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
}
@@ -619,12 +619,12 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
rSh.GetCurAttr(aCoreSet); // *alle* Textattribute von der Core erfragen
SfxWhichIter aIter(rSet);
- USHORT nSlot = aIter.FirstWhich();
+ sal_uInt16 nSlot = aIter.FirstWhich();
sal_Bool bFlag = sal_False;
SfxBoolItem aFlagItem;
const SfxPoolItem* pItem = 0;
int eAdjust = -1; // Illegaler Wert, um DONTCARE zu erkennen
- SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, FALSE, &pItem);
+ SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, sal_False, &pItem);
if( SFX_ITEM_DEFAULT == eState )
pItem = &rPool.GetDefaultItem(RES_PARATR_ADJUST);
@@ -632,14 +632,14 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
eAdjust = (int)(( SvxAdjustItem* ) pItem)->GetAdjust();
short nEsc = 0;
- eState = aCoreSet.GetItemState(RES_CHRATR_ESCAPEMENT, FALSE, &pItem);
+ eState = aCoreSet.GetItemState(RES_CHRATR_ESCAPEMENT, sal_False, &pItem);
if( SFX_ITEM_DEFAULT == eState )
pItem = &rPool.GetDefaultItem(RES_CHRATR_ESCAPEMENT);
if( eState >= SFX_ITEM_DEFAULT )
nEsc = ((SvxEscapementItem* )pItem)->GetEsc();
- USHORT nLineSpace = 0;
- eState = aCoreSet.GetItemState(RES_PARATR_LINESPACING, FALSE, &pItem);
+ sal_uInt16 nLineSpace = 0;
+ eState = aCoreSet.GetItemState(RES_PARATR_LINESPACING, sal_False, &pItem);
if( SFX_ITEM_DEFAULT == eState )
pItem = &rPool.GetDefaultItem(RES_PARATR_LINESPACING);
if( SFX_ITEM_DEFAULT <= eState &&
@@ -699,7 +699,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
else
{
bFlag = SVX_ADJUST_BLOCK == eAdjust;
- USHORT nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell());
if((nHtmlMode & HTMLMODE_ON) && !(nHtmlMode & (HTMLMODE_FULL_STYLES|HTMLMODE_FIRSTLINE) ))
{
rSet.DisableItem( nSlot );
@@ -722,7 +722,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONTHEIGHT,
*rSet.GetPool() );
- aSetItem.GetItemSet().Put( aCoreSet, FALSE );
+ aSetItem.GetItemSet().Put( aCoreSet, sal_False );
if( !aSetItem.GetItemOfScript( rSh.GetScriptType() ))
rSet.DisableItem( nSlot );
nSlot = 0;
@@ -761,9 +761,9 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
else
{
// is the item set?
- USHORT nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell());
if((!(nHtmlMode & HTMLMODE_ON) || (0 != (nHtmlMode & HTMLMODE_SOME_STYLES))) &&
- aCoreSet.GetItemState( RES_FRAMEDIR, FALSE ) >= SFX_ITEM_DEFAULT)
+ aCoreSet.GetItemState( RES_FRAMEDIR, sal_False ) >= SFX_ITEM_DEFAULT)
{
SvxFrameDirection eFrmDir = (SvxFrameDirection)
((const SvxFrameDirectionItem& )aCoreSet.Get(RES_FRAMEDIR)).GetValue();
@@ -791,10 +791,10 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
case RES_PARATR_DROP:
{
#if OSL_DEBUG_LEVEL > 1
- const SfxPoolItem& rItem = aCoreSet.Get(GetPool().GetWhich(nSlot), TRUE);
+ const SfxPoolItem& rItem = aCoreSet.Get(GetPool().GetWhich(nSlot), sal_True);
rSet.Put(rItem);
#else
- rSet.Put(aCoreSet.Get( GetPool().GetWhich(nSlot), TRUE));
+ rSet.Put(aCoreSet.Get( GetPool().GetWhich(nSlot), sal_True));
#endif
nSlot = 0;
}
@@ -816,10 +816,10 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT);
rSh.GetCurAttr(aSet);
#if OSL_DEBUG_LEVEL > 1
- const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, TRUE);
+ const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, sal_True);
rSet.Put(rItem);
#else
- rSet.Put(aSet.Get( RES_TXTATR_INETFMT, TRUE));
+ rSet.Put(aSet.Get( RES_TXTATR_INETFMT, sal_True));
#endif
nSlot = 0;
}
@@ -840,7 +840,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
nSlot = aIter.NextWhich();
}
- rSet.Put(aCoreSet,FALSE);
+ rSet.Put(aCoreSet,sal_False);
}
diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx
index 69f82ebf902d..8670a296f4bb 100644
--- a/sw/source/ui/shells/txtcrsr.cxx
+++ b/sw/source/ui/shells/txtcrsr.cxx
@@ -69,22 +69,22 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer();
const SfxItemSet *pArgs = rReq.GetArgs();
- BOOL bSelect = FALSE;
- USHORT nCount = 1;
+ sal_Bool bSelect = sal_False;
+ sal_uInt16 nCount = 1;
if(pArgs)
{
const SfxPoolItem *pItem;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, sal_True, &pItem))
nCount = ((const SfxInt16Item *)pItem)->GetValue();
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, sal_True, &pItem))
bSelect = ((const SfxBoolItem *)pItem)->GetValue();
}
switch(rReq.GetSlot())
{
- case FN_CHAR_LEFT_SEL: rReq.SetSlot( FN_CHAR_LEFT ); bSelect = TRUE; break;
- case FN_CHAR_RIGHT_SEL: rReq.SetSlot( FN_CHAR_RIGHT ); bSelect = TRUE; break;
- case FN_LINE_UP_SEL: rReq.SetSlot( FN_LINE_UP ); bSelect = TRUE; break;
- case FN_LINE_DOWN_SEL: rReq.SetSlot( FN_LINE_DOWN ); bSelect = TRUE; break;
+ case FN_CHAR_LEFT_SEL: rReq.SetSlot( FN_CHAR_LEFT ); bSelect = sal_True; break;
+ case FN_CHAR_RIGHT_SEL: rReq.SetSlot( FN_CHAR_RIGHT ); bSelect = sal_True; break;
+ case FN_LINE_UP_SEL: rReq.SetSlot( FN_LINE_UP ); bSelect = sal_True; break;
+ case FN_LINE_DOWN_SEL: rReq.SetSlot( FN_LINE_DOWN ); bSelect = sal_True; break;
}
uno::Reference< frame::XDispatchRecorder > xRecorder =
@@ -94,19 +94,19 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
rReq.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nCount) );
rReq.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, bSelect) );
}
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
rReq.Done();
// Get EditWin before calling the move functions (shell change may occur!)
SwEditWin& rTmpEditWin = GetView().GetEditWin();
- for( USHORT i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
switch(nSlot)
{
- case FN_CHAR_LEFT: rSh.Left( CRSR_SKIP_CELLS, bSelect, 1, FALSE, TRUE ); break;
- case FN_CHAR_RIGHT: rSh.Right( CRSR_SKIP_CELLS, bSelect, 1, FALSE, TRUE ); break;
+ case FN_CHAR_LEFT: rSh.Left( CRSR_SKIP_CELLS, bSelect, 1, sal_False, sal_True ); break;
+ case FN_CHAR_RIGHT: rSh.Right( CRSR_SKIP_CELLS, bSelect, 1, sal_False, sal_True ); break;
case FN_LINE_UP: rSh.Up ( bSelect, 1 ); break;
case FN_LINE_DOWN: rSh.Down ( bSelect, 1 ); break;
- default: ASSERT(FALSE, falscher Dispatcher); return;
+ default: ASSERT(sal_False, falscher Dispatcher); return;
}
}
@@ -120,16 +120,16 @@ void SwTextShell::ExecMove(SfxRequest &rReq)
SwEditWin& rTmpEditWin = GetView().GetEditWin();
rTmpEditWin.FlushInBuffer();
- USHORT nSlot = rReq.GetSlot();
- BOOL bRet = FALSE;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_Bool bRet = sal_False;
switch ( nSlot )
{
case FN_START_OF_LINE_SEL:
- case FN_START_OF_LINE: bRet = rSh.LeftMargin ( FN_START_OF_LINE_SEL == nSlot, FALSE );
+ case FN_START_OF_LINE: bRet = rSh.LeftMargin ( FN_START_OF_LINE_SEL == nSlot, sal_False );
break;
case FN_END_OF_LINE_SEL:
- case FN_END_OF_LINE: bRet = rSh.RightMargin( FN_END_OF_LINE_SEL == nSlot, FALSE );
+ case FN_END_OF_LINE: bRet = rSh.RightMargin( FN_END_OF_LINE_SEL == nSlot, sal_False );
break;
case FN_START_OF_DOCUMENT_SEL:
@@ -143,7 +143,7 @@ void SwTextShell::ExecMove(SfxRequest &rReq)
case FN_SELECT_WORD: bRet = rSh.SelNearestWrd(); break;
case SID_SELECTALL: bRet = 0 != rSh.SelAll(); break;
- default: ASSERT(FALSE, falscher Dispatcher); return;
+ default: ASSERT(sal_False, falscher Dispatcher); return;
}
if ( bRet )
@@ -160,7 +160,7 @@ void SwTextShell::ExecMovePage(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch( nSlot )
{
case FN_START_OF_NEXT_PAGE_SEL :
@@ -180,7 +180,7 @@ void SwTextShell::ExecMovePage(SfxRequest &rReq)
case FN_END_OF_PAGE_SEL:
case FN_END_OF_PAGE: rSh.EndPg ( FN_END_OF_PAGE_SEL == nSlot ); break;
- default: ASSERT(FALSE, falscher Dispatcher); return;
+ default: ASSERT(sal_False, falscher Dispatcher); return;
}
rReq.Done();
}
@@ -191,13 +191,13 @@ void SwTextShell::ExecMoveCol(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
switch ( rReq.GetSlot() )
{
- case FN_START_OF_COLUMN: rSh.StartOfColumn ( FALSE ); break;
- case FN_END_OF_COLUMN: rSh.EndOfColumn ( FALSE ); break;
- case FN_START_OF_NEXT_COLUMN: rSh.StartOfNextColumn( FALSE ) ; break;
- case FN_END_OF_NEXT_COLUMN: rSh.EndOfNextColumn ( FALSE ); break;
- case FN_START_OF_PREV_COLUMN: rSh.StartOfPrevColumn( FALSE ); break;
- case FN_END_OF_PREV_COLUMN: rSh.EndOfPrevColumn ( FALSE ); break;
- default: ASSERT(FALSE, falscher Dispatcher); return;
+ case FN_START_OF_COLUMN: rSh.StartOfColumn ( sal_False ); break;
+ case FN_END_OF_COLUMN: rSh.EndOfColumn ( sal_False ); break;
+ case FN_START_OF_NEXT_COLUMN: rSh.StartOfNextColumn( sal_False ) ; break;
+ case FN_END_OF_NEXT_COLUMN: rSh.EndOfNextColumn ( sal_False ); break;
+ case FN_START_OF_PREV_COLUMN: rSh.StartOfPrevColumn( sal_False ); break;
+ case FN_END_OF_PREV_COLUMN: rSh.EndOfPrevColumn ( sal_False ); break;
+ default: ASSERT(sal_False, falscher Dispatcher); return;
}
rReq.Done();
}
@@ -207,8 +207,8 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer();
- USHORT nSlot = rReq.GetSlot();
- BOOL bRet = FALSE;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_Bool bRet = sal_False;
switch ( nSlot )
{
case FN_NEXT_WORD_SEL:
@@ -235,12 +235,12 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
case FN_PREV_SENT: bRet = rSh.BwdSentence( FN_PREV_SENT_SEL == nSlot );
break;
- case FN_NEXT_PARA: bRet = rSh.FwdPara ( FALSE );
+ case FN_NEXT_PARA: bRet = rSh.FwdPara ( sal_False );
break;
- case FN_PREV_PARA: bRet = rSh.BwdPara ( FALSE );
+ case FN_PREV_PARA: bRet = rSh.BwdPara ( sal_False );
break;
- default: ASSERT(FALSE, falscher Dispatcher); return;
+ default: ASSERT(sal_False, falscher Dispatcher); return;
}
rReq.Done();
}
@@ -248,8 +248,8 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- USHORT nSlot = rReq.GetSlot();
- BOOL bSetRetVal = TRUE, bRet = TRUE;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_Bool bSetRetVal = sal_True, bRet = sal_True;
switch ( nSlot )
{
case SID_FM_TOGGLECONTROLFOCUS:
@@ -270,7 +270,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
if ( !pFilter.get() )
break;
- const SdrObject* pNearestControl = rSh.GetBestObject( TRUE, GOTOOBJ_DRAW_CONTROL, FALSE, pFilter.get() );
+ const SdrObject* pNearestControl = rSh.GetBestObject( sal_True, GOTOOBJ_DRAW_CONTROL, sal_False, pFilter.get() );
if ( !pNearestControl )
break;
@@ -283,7 +283,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
}
break;
case FN_CNTNT_TO_NEXT_FRAME:
- bRet = rSh.GotoObj(TRUE, GOTOOBJ_GOTO_ANY);
+ bRet = rSh.GotoObj(sal_True, GOTOOBJ_GOTO_ANY);
if(bRet)
{
rSh.HideCrsr();
@@ -300,27 +300,27 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
case FN_TO_HEADER:
rSh.MoveCrsr();
- if ( FRMTYPE_HEADER & rSh.GetFrmType(0,FALSE) )
+ if ( FRMTYPE_HEADER & rSh.GetFrmType(0,sal_False) )
rSh.SttPg();
else
rSh.GotoHeaderTxt();
- bSetRetVal = FALSE;
+ bSetRetVal = sal_False;
break;
case FN_TO_FOOTER:
rSh.MoveCrsr();
- if ( FRMTYPE_FOOTER & rSh.GetFrmType(0,FALSE) )
+ if ( FRMTYPE_FOOTER & rSh.GetFrmType(0,sal_False) )
rSh.EndPg();
else
rSh.GotoFooterTxt();
- bSetRetVal = FALSE;
+ bSetRetVal = sal_False;
break;
case FN_FOOTNOTE_TO_ANCHOR:
rSh.MoveCrsr();
- if ( FRMTYPE_FOOTNOTE & rSh.GetFrmType(0,FALSE) )
+ if ( FRMTYPE_FOOTNOTE & rSh.GetFrmType(0,sal_False) )
rSh.GotoFtnAnchor();
else
rSh.GotoFtnTxt();
- bSetRetVal = FALSE;
+ bSetRetVal = sal_False;
break;
case FN_TO_FOOTNOTE_AREA :
rSh.GotoFtnTxt();
@@ -339,26 +339,26 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
case FN_NEXT_TOXMARK:
- bRet = rSh.GotoNxtPrvTOXMark( TRUE );
+ bRet = rSh.GotoNxtPrvTOXMark( sal_True );
break;
case FN_PREV_TOXMARK:
- bRet = rSh.GotoNxtPrvTOXMark( FALSE );
+ bRet = rSh.GotoNxtPrvTOXMark( sal_False );
break;
case FN_NEXT_TBLFML:
- bRet = rSh.GotoNxtPrvTblFormula( TRUE, FALSE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_True, sal_False );
break;
case FN_PREV_TBLFML:
- bRet = rSh.GotoNxtPrvTblFormula( FALSE, FALSE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_False, sal_False );
break;
case FN_NEXT_TBLFML_ERR:
- bRet = rSh.GotoNxtPrvTblFormula( TRUE, TRUE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_True, sal_True );
break;
case FN_PREV_TBLFML_ERR:
- bRet = rSh.GotoNxtPrvTblFormula( FALSE, TRUE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_False, sal_True );
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx
index 0e89b96a8d6a..d3a8338e9416 100644
--- a/sw/source/ui/shells/txtnum.cxx
+++ b/sw/source/ui/shells/txtnum.cxx
@@ -59,7 +59,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case FN_NUM_NUMBERING_ON:
{
SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
- BOOL bMode = !GetShell().HasNumber(); // #i29560#
+ sal_Bool bMode = !GetShell().HasNumber(); // #i29560#
if ( pItem )
bMode = pItem->GetValue();
else
@@ -78,7 +78,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case FN_NUM_BULLET_ON:
{
SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
- BOOL bMode = !GetShell().HasBullet(); // #i29560#
+ sal_Bool bMode = !GetShell().HasBullet(); // #i29560#
if ( pItem )
bMode = pItem->GetValue();
else
@@ -97,22 +97,22 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case FN_NUMBER_BULLETS:
{
// --> OD 2008-02-29 #refactorlists#
-// // per default TRUE, damit die Schleife im Dialog richtig arbeitet!
-// BOOL bHasChild = TRUE;
+// // per default sal_True, damit die Schleife im Dialog richtig arbeitet!
+// sal_Bool bHasChild = sal_True;
// <--
SfxItemSet aSet(GetPool(),
SID_HTML_MODE, SID_HTML_MODE,
SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
0 );
SwDocShell* pDocSh = GetView().GetDocShell();
- BOOL bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh);
+ sal_Bool bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh);
const SwNumRule* pCurRule = GetShell().GetCurNumRule();
if( pCurRule )
{
SvxNumRule aRule = pCurRule->MakeSvxNumRule();
//convert type of linked bitmaps from SVX_NUM_BITMAP to (SVX_NUM_BITMAP|LINK_TOKEN)
- for(USHORT i = 0; i < aRule.GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < aRule.GetLevelCount(); i++)
{
SvxNumberFormat aFmt(aRule.GetLevel(i));
if(SVX_NUM_BITMAP == aFmt.GetNumberingType())
@@ -127,13 +127,13 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
}
if(bHtml)
- aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, FALSE);
+ aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False);
aSet.Put(SvxNumBulletItem(aRule));
// --> OD 2008-02-29 #refactorlists# - removed <bHasChild>
ASSERT( GetShell().GetNumLevel() < MAXLEVEL,
"<SwTextShell::ExecEnterNum()> - numbered node without valid list level. Serious defect -> please inform OD." );
- USHORT nLevel = GetShell().GetNumLevel();
+ sal_uInt16 nLevel = GetShell().GetNumLevel();
// <--
if( nLevel < MAXLEVEL )
{
@@ -154,7 +154,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
if( bHtml || bRightToLeft )
{
- for( BYTE n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
{
SvxNumberFormat aFmt( aSvxRule.GetLevel( n ) );
if ( n && bHtml )
@@ -170,14 +170,14 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
aFmt.SetNumAdjust( SVX_ADJUST_RIGHT );
}
// <--
- aSvxRule.SetLevel( n, aFmt, FALSE );
+ aSvxRule.SetLevel( n, aFmt, sal_False );
}
- aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, FALSE);
+ aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False);
}
aSet.Put(SvxNumBulletItem(aSvxRule));
}
- aSet.Put( SfxBoolItem( SID_PARAM_NUM_PRESET,FALSE ));
+ aSet.Put( SfxBoolItem( SID_PARAM_NUM_PRESET,sal_False ));
// vor dem Dialog wird der HtmlMode an der DocShell versenkt
pDocSh->PutItem(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(pDocSh)));
@@ -187,11 +187,11 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_SVXTEST_NUM_BULLET,
GetView().GetWindow(), &aSet, GetShell());
DBG_ASSERT(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
const SfxPoolItem* pItem;
if( RET_OK == nRet )
{
- if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem ))
{
rReq.AppendItem(*pItem);
rReq.Done();
@@ -206,7 +206,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
// <--
// <--
aSetRule.SetSvxRule( *pSetRule, GetShell().GetDoc());
- aSetRule.SetAutoRule( TRUE );
+ aSetRule.SetAutoRule( sal_True );
// --> OD 2008-03-17 #refactorlists#
// No start of new list, if an existing list style is edited.
// Otherwise start a new list.
@@ -217,7 +217,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
// wenn der Dialog mit OK verlassen wurde, aber nichts ausgewaehlt
// wurde dann muss die Numerierung zumindest eingeschaltet werden,
// wenn sie das noch nicht ist
- else if( !pCurRule && SFX_ITEM_SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem ))
+ else if( !pCurRule && SFX_ITEM_SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem ))
{
rReq.AppendItem( *pItem );
rReq.Done();
@@ -229,7 +229,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
// <--
// <--
aSetRule.SetSvxRule(*pSetRule, GetShell().GetDoc());
- aSetRule.SetAutoRule( TRUE );
+ aSetRule.SetAutoRule( sal_True );
// --> OD 2008-03-17 #refactorlists#
// start new list
GetShell().SetCurNumRule( aSetRule, true );
@@ -243,7 +243,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
}
diff --git a/sw/source/ui/smartmenu/stmenu.cxx b/sw/source/ui/smartmenu/stmenu.cxx
index 4c7b473dfc50..2181cc989ca6 100644
--- a/sw/source/ui/smartmenu/stmenu.cxx
+++ b/sw/source/ui/smartmenu/stmenu.cxx
@@ -62,10 +62,10 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
Reference <frame::XController> xController = mpSwView->GetController();
const lang::Locale aLocale( SW_BREAKITER()->GetLocale( (LanguageType)GetAppLanguage() ) );
- USHORT nMenuPos = 0;
- USHORT nSubMenuPos = 0;
- USHORT nMenuId = 1;
- USHORT nSubMenuId = MN_ST_INSERT_START;
+ sal_uInt16 nMenuPos = 0;
+ sal_uInt16 nSubMenuPos = 0;
+ sal_uInt16 nMenuId = 1;
+ sal_uInt16 nSubMenuId = MN_ST_INSERT_START;
const rtl::OUString aRangeText = mxTextRange->getString();
@@ -81,7 +81,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
InsertSeparator(0);
- for ( USHORT j = 0; j < aActionComponentsSequence.getLength(); ++j )
+ for ( sal_uInt16 j = 0; j < aActionComponentsSequence.getLength(); ++j )
{
Reference< container::XStringKeyMap > xSmartTagProperties = rStringKeyMaps[j];
@@ -118,7 +118,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
pSbMenu->InsertSeparator( nSubMenuPos++ );
// Add subitem for every action reference for the current smart tag type:
- for ( USHORT i = 0; i < rActionComponents.getLength(); ++i )
+ for ( sal_uInt16 i = 0; i < rActionComponents.getLength(); ++i )
{
xAction = rActionComponents[i];
@@ -154,7 +154,7 @@ sal_uInt16 SwSmartTagPopup::Execute( const Rectangle& rWordPos, Window* pWin )
if ( nId == MN_SMARTTAG_OPTIONS )
{
- SfxBoolItem aBool(SID_OPEN_SMARTTAGOPTIONS, TRUE);
+ SfxBoolItem aBool(SID_OPEN_SMARTTAGOPTIONS, sal_True);
mpSwView->GetViewFrame()->GetDispatcher()->Execute( SID_AUTO_CORRECT_DLG, SFX_CALLMODE_ASYNCHRON, &aBool, 0L );
}
diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx
index a11f04d55656..684c69b9852b 100644
--- a/sw/source/ui/table/chartins.cxx
+++ b/sw/source/ui/table/chartins.cxx
@@ -94,7 +94,7 @@ Point SwGetChartDialogPos( const Window *pParentWin, const Size& rDialogSize, co
Rectangle aDesktop = pParentWin->GetDesktopRectPixel();
Size aSpace = pParentWin->LogicToPixel( Size( 8, 12 ), MAP_APPFONT );
- BOOL bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft();
+ sal_Bool bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft();
bool bCenterHor = false;
if ( aDesktop.Bottom() - aObjAbs.Bottom() >= rDialogSize.Height() + aSpace.Height() )
@@ -192,7 +192,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
}
SwFlyFrmFmt *pFlyFrmFmt = 0;
- xChartModel.set( SwTableFUNC( &rWrtShell, FALSE ).InsertChart( xDataProvider, (sal_True == xDataProvider.is()), aRangeString, &pFlyFrmFmt ));
+ xChartModel.set( SwTableFUNC( &rWrtShell, sal_False ).InsertChart( xDataProvider, (sal_True == xDataProvider.is()), aRangeString, &pFlyFrmFmt ));
//open wizard
//@todo get context from writer if that has one
@@ -277,7 +277,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
void __EXPORT AutoEdit::KeyInput( const KeyEvent& rEvt )
{
- USHORT nCode = rEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rEvt.GetKeyCode().GetCode();
if( nCode != KEY_SPACE )
Edit::KeyInput( rEvt );
}
diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx
index dc28f6331566..70811c670496 100644
--- a/sw/source/ui/table/colwd.cxx
+++ b/sw/source/ui/table/colwd.cxx
@@ -63,7 +63,7 @@
IMPL_LINK_INLINE_START( SwTableWidthDlg, LoseFocusHdl, Edit *, EMPTYARG )
{
- USHORT nId = (USHORT)aColEdit.GetValue()-1;
+ sal_uInt16 nId = (sal_uInt16)aColEdit.GetValue()-1;
const SwTwips lWidth = rFnc.GetColWidth(nId);
aWidthEdit.SetValue(aWidthEdit.Normalize(lWidth), FUNIT_TWIP);
aWidthEdit.SetMax(aWidthEdit.Normalize(rFnc.GetMaxColWidth(nId)), FUNIT_TWIP);
@@ -89,10 +89,10 @@ SwTableWidthDlg::SwTableWidthDlg(Window *pParent, SwTableFUNC &rTableFnc ) :
{
FreeResource();
- BOOL bIsWeb = rTableFnc.GetShell()
- ? static_cast< BOOL >(0 != PTR_CAST( SwWebDocShell,
+ sal_Bool bIsWeb = rTableFnc.GetShell()
+ ? static_cast< sal_Bool >(0 != PTR_CAST( SwWebDocShell,
rTableFnc.GetShell()->GetView().GetDocShell()) )
- : FALSE;
+ : sal_False;
FieldUnit eFieldUnit = SW_MOD()->GetUsrPref( bIsWeb )->GetMetric();
::SetFieldUnit(aWidthEdit, eFieldUnit );
@@ -114,8 +114,8 @@ void SwTableWidthDlg::Apply()
{
rFnc.InitTabCols();
rFnc.SetColWidth(
- static_cast< USHORT >(aColEdit.GetValue() - 1),
- static_cast< USHORT >(aWidthEdit.Denormalize(aWidthEdit.GetValue(FUNIT_TWIP))));
+ static_cast< sal_uInt16 >(aColEdit.GetValue() - 1),
+ static_cast< sal_uInt16 >(aWidthEdit.Denormalize(aWidthEdit.GetValue(FUNIT_TWIP))));
}
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index 8be2bbdbb498..da3ad666fd64 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -96,13 +96,13 @@ void SwConvertTableDlg::GetValues( sal_Unicode& rDelim,
}
- USHORT nInsMode = 0;
+ sal_uInt16 nInsMode = 0;
if (aBorderCB.IsChecked())
nInsMode |= tabopts::DEFAULT_BORDER;
if (aHeaderCB.IsChecked())
nInsMode |= tabopts::HEADLINE;
if (aRepeatHeaderCB.IsEnabled() && aRepeatHeaderCB.IsChecked())
- rInsTblOpts.mnRowsToRepeat = USHORT( aRepeatHeaderNF.GetValue() );
+ rInsTblOpts.mnRowsToRepeat = sal_uInt16( aRepeatHeaderNF.GetValue() );
else
rInsTblOpts.mnRowsToRepeat = 0;
if (!aDontSplitCB.IsChecked())
@@ -184,12 +184,12 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable )
else
{
//Einfuege-Optionen verstecken
- aHeaderCB .Show(FALSE);
- aRepeatHeaderCB .Show(FALSE);
- aDontSplitCB .Show(FALSE);
- aBorderCB .Show(FALSE);
- aOptionsFL .Show(FALSE);
- aRepeatHeaderCombo.Show(FALSE);
+ aHeaderCB .Show(sal_False);
+ aRepeatHeaderCB .Show(sal_False);
+ aDontSplitCB .Show(sal_False);
+ aBorderCB .Show(sal_False);
+ aOptionsFL .Show(sal_False);
+ aRepeatHeaderCombo.Show(sal_False);
//Groesse anpassen
Size aSize(GetSizePixel());
@@ -207,10 +207,10 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable )
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
- BOOL bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
+ sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode);
- USHORT nInsTblFlags = aInsOpts.mnInsMode;
+ sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode;
aHeaderCB.Check( 0 != (nInsTblFlags & tabopts::HEADLINE) );
aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0);
@@ -233,7 +233,7 @@ IMPL_LINK( SwConvertTableDlg, AutoFmtHdl, PushButton*, pButton )
SwAbstractDialogFactory* pFact = swui::GetFactory();
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
- AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pShell, DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt);
+ AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pShell, DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
@@ -249,7 +249,7 @@ IMPL_LINK( SwConvertTableDlg, BtnHdl, Button*, pButton )
{
if( aKeepColumn.IsEnabled() )
aKeepColumn.SaveValue();
- aKeepColumn.Check( TRUE );
+ aKeepColumn.Check( sal_True );
}
aKeepColumn.Enable( aTabBtn.IsChecked() );
aOtherEd.Enable( aOtherBtn.IsChecked() );
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index 40c9f5a220f7..e6ad93335c0d 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -57,21 +57,21 @@ namespace swui
#define ROW_COL_PROD 16384
-void SwInsTableDlg::GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+void SwInsTableDlg::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblOpts, String& rAutoName,
SwTableAutoFmt *& prTAFmt )
{
- USHORT nInsMode = 0;
+ sal_uInt16 nInsMode = 0;
rName = aNameEdit.GetText();
- rRow = (USHORT)aRowEdit.GetValue();
- rCol = (USHORT)aColEdit.GetValue();
+ rRow = (sal_uInt16)aRowEdit.GetValue();
+ rCol = (sal_uInt16)aColEdit.GetValue();
if (aBorderCB.IsChecked())
nInsMode |= tabopts::DEFAULT_BORDER;
if (aHeaderCB.IsChecked())
nInsMode |= tabopts::HEADLINE;
if (aRepeatHeaderCB.IsEnabled() && aRepeatHeaderCB.IsChecked())
- rInsTblOpts.mnRowsToRepeat = USHORT( aRepeatHeaderNF.GetValue() );
+ rInsTblOpts.mnRowsToRepeat = sal_uInt16( aRepeatHeaderNF.GetValue() );
else
rInsTblOpts.mnRowsToRepeat = 0;
if (!aDontSplitCB.IsChecked())
@@ -130,11 +130,11 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView )
aColEdit.SetMax(ROW_COL_PROD/aRowEdit.GetValue());
aAutoFmtBtn.SetClickHdl(LINK(this, SwInsTableDlg, AutoFmtHdl));
- BOOL bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
+ sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode);
- USHORT nInsTblFlags = aInsOpts.mnInsMode;
+ sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode;
aHeaderCB.Check( 0 != (nInsTblFlags & tabopts::HEADLINE) );
aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0);
@@ -222,7 +222,7 @@ IMPL_LINK( SwInsTableDlg, AutoFmtHdl, PushButton*, pButton )
SwAbstractDialogFactory* pFact = swui::GetFactory();
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
- AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton,pShell, DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt );
+ AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton,pShell, DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
diff --git a/sw/source/ui/table/mergetbl.cxx b/sw/source/ui/table/mergetbl.cxx
index 486bb0af87b7..377959ec89cc 100644
--- a/sw/source/ui/table/mergetbl.cxx
+++ b/sw/source/ui/table/mergetbl.cxx
@@ -43,7 +43,7 @@
#endif
-SwMergeTblDlg::SwMergeTblDlg( Window *pParent, BOOL& rWithPrev )
+SwMergeTblDlg::SwMergeTblDlg( Window *pParent, sal_Bool& rWithPrev )
: SvxStandardDialog(pParent, SW_RES(DLG_MERGE_TABLE)),
aOKPB( this, SW_RES(PB_OK )),
aCancelPB( this, SW_RES(PB_CANCEL )),
diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx
index ab7df943e201..a6b96ab8930c 100644
--- a/sw/source/ui/table/swtablerep.cxx
+++ b/sw/source/ui/table/swtablerep.cxx
@@ -81,9 +81,9 @@
#ifdef DEBUG_TBLDLG
-void DbgTColumn(TColumn* pTColumn, USHORT nCount)
+void DbgTColumn(TColumn* pTColumn, sal_uInt16 nCount)
{
- for(USHORT i = 0; i < nCount; i++)
+ for(sal_uInt16 i = 0; i < nCount; i++)
{
String sMsg(i);
sMsg += pTColumn[i].bVisible ? " v " : " h ";
@@ -96,7 +96,7 @@ void DbgTColumn(TColumn* pTColumn, USHORT nCount)
/*-----------------20.08.96 09.43-------------------
--------------------------------------------------*/
-SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx )
+SwTableRep::SwTableRep( const SwTabCols& rTabCol, sal_Bool bCplx )
:
nTblWidth(0),
nSpace(0),
@@ -105,15 +105,15 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx )
nAlign(0),
nWidthPercent(0),
bComplex(bCplx),
- bLineSelected(FALSE),
- bWidthChanged(FALSE),
- bColsChanged(FALSE)
+ bLineSelected(sal_False),
+ bWidthChanged(sal_False),
+ bColsChanged(sal_False)
{
nAllCols = nColCount = rTabCol.Count();
pTColumns = new TColumn[ nColCount + 1 ];
SwTwips nStart = 0,
nEnd;
- for( USHORT i = 0; i < nAllCols; ++i )
+ for( sal_uInt16 i = 0; i < nAllCols; ++i )
{
nEnd = rTabCol[ i ] - rTabCol.GetLeft();
pTColumns[ i ].nWidth = nEnd - nStart;
@@ -123,7 +123,7 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx )
nStart = nEnd;
}
pTColumns[ nAllCols ].nWidth = rTabCol.GetRight() - rTabCol.GetLeft() - nStart;
- pTColumns[ nAllCols ].bVisible = TRUE;
+ pTColumns[ nAllCols ].bVisible = sal_True;
nColCount++;
nAllCols++;
}
@@ -137,18 +137,18 @@ SwTableRep::~SwTableRep()
/*-----------------20.08.96 13.33-------------------
--------------------------------------------------*/
-BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
+sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
{
long nOldLeft = rTabCols.GetLeft(),
nOldRight = rTabCols.GetRight();
- BOOL bSingleLine = FALSE;
- USHORT i;
+ sal_Bool bSingleLine = sal_False;
+ sal_uInt16 i;
for ( i = 0; i < rTabCols.Count(); ++i )
if(!pTColumns[i].bVisible)
{
- bSingleLine = TRUE;
+ bSingleLine = sal_True;
break;
}
@@ -174,18 +174,18 @@ BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
nStart = nEnd;
}
pOldTColumns[nAllCols - 1].nWidth = rTabCols.GetRight() - rTabCols.GetLeft() - nStart;
- pOldTColumns[nAllCols - 1].bVisible = TRUE;
+ pOldTColumns[nAllCols - 1].bVisible = sal_True;
#ifdef DEBUG_TBLDLG
#define DbgTColumn(pOldTColumns, nAllCols);
#endif
- USHORT nOldPos = 0;
- USHORT nNewPos = 0;
+ sal_uInt16 nOldPos = 0;
+ sal_uInt16 nNewPos = 0;
SwTwips nOld = 0;
SwTwips nNew = 0;
- BOOL bOld = FALSE;
- BOOL bFirst = TRUE;
+ sal_Bool bOld = sal_False;
+ sal_Bool bFirst = sal_True;
i = 0;
while ( i < nAllCols -1 )
@@ -204,10 +204,10 @@ BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
if(pOldTColumns[nNewPos - 1].bVisible)
break;
}
- bFirst = FALSE;
+ bFirst = sal_False;
// sie muessen sortiert eingefuegt werden
bOld = nOld < nNew;
- nPos = USHORT(bOld ? nOld : nNew);
+ nPos = sal_uInt16(bOld ? nOld : nNew);
rTabCols[i] = nPos + nLeft;
rTabCols.SetHidden( i, bOld );
i++;
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 5b26b99d012f..38b0e6e54799 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -96,7 +96,7 @@ void DbgTblRep(SwTableRep* pRep)
DBG_ERROR(String(pRep->GetColCount()))
DBG_ERROR(String(pRep->GetAllColCount()))
SwTwips nSum = 0;
- for(USHORT i = 0; i < pRep->GetAllColCount(); i++)
+ for(sal_uInt16 i = 0; i < pRep->GetAllColCount(); i++)
{
String sMsg(i);
sMsg += pRep->GetColumns()[i].bVisible ? " v " : " h ";
@@ -159,7 +159,7 @@ SwFormatTablePage::SwFormatTablePage( Window* pParent, const SfxItemSet& rSet )
pTblData(0),
nSaveWidth(0),
nMinTableWidth(MINLAY),
- bModified(FALSE),
+ bModified(sal_False),
bFull(0),
bHtmlMode(sal_False)
{
@@ -167,7 +167,7 @@ SwFormatTablePage::SwFormatTablePage( Window* pParent, const SfxItemSet& rSet )
SetExchangeSupport();
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem))
bHtmlMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
sal_Bool bCTL = SW_MOD()->GetCTLOptions().IsCTLFontEnabled();
@@ -224,7 +224,7 @@ void SwFormatTablePage::Init()
IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn )
{
DBG_ASSERT(pTblData, "Tabellendaten nicht da?");
- BOOL bIsChecked = pBtn->IsChecked();
+ sal_Bool bIsChecked = pBtn->IsChecked();
sal_Int64 nLeft = aLeftMF.DenormalizePercent(aLeftMF.GetValue(FUNIT_TWIP ));
sal_Int64 nRight = aRightMF.DenormalizePercent(aRightMF.GetValue(FUNIT_TWIP ));
aWidthMF.ShowPercent(bIsChecked);
@@ -248,11 +248,11 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn )
if(aFreeBtn.IsChecked())
{
- BOOL bEnable = !pBtn->IsChecked();
+ sal_Bool bEnable = !pBtn->IsChecked();
aRightMF.Enable(bEnable);
aRightFT.Enable(bEnable);
}
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -261,45 +261,45 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn )
------------------------------------------------------------------------*/
IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox )
{
- BOOL bRestore = TRUE,
- bLeftEnable = FALSE,
- bRightEnable= FALSE,
- bWidthEnable= FALSE,
- bOthers = TRUE;
+ sal_Bool bRestore = sal_True,
+ bLeftEnable = sal_False,
+ bRightEnable= sal_False,
+ bWidthEnable= sal_False,
+ bOthers = sal_True;
if( (RadioButton *) pBox == &aFullBtn )
{
aLeftMF.SetPrcntValue(0);
aRightMF.SetPrcntValue(0);
nSaveWidth = static_cast< SwTwips >(aWidthMF.DenormalizePercent(aWidthMF.GetValue(FUNIT_TWIP )));
aWidthMF.SetPrcntValue(aWidthMF.NormalizePercent(pTblData->GetSpace() ), FUNIT_TWIP );
- bFull = TRUE;
- bRestore = FALSE;
+ bFull = sal_True;
+ bRestore = sal_False;
}
else if( (RadioButton *) pBox == &aLeftBtn )
{
- bRightEnable = bWidthEnable = TRUE;
+ bRightEnable = bWidthEnable = sal_True;
aLeftMF.SetPrcntValue(0);
}
else if( (RadioButton *) pBox == &aFromLeftBtn )
{
- bLeftEnable = bWidthEnable = TRUE;
+ bLeftEnable = bWidthEnable = sal_True;
aRightMF.SetPrcntValue(0);
}
else if( (RadioButton *) pBox == &aRightBtn )
{
- bLeftEnable = bWidthEnable = TRUE;
+ bLeftEnable = bWidthEnable = sal_True;
aRightMF.SetPrcntValue(0);
}
else if( ( RadioButton * ) pBox == &aCenterBtn )
{
- bLeftEnable = bWidthEnable = TRUE;
+ bLeftEnable = bWidthEnable = sal_True;
}
else if( ( RadioButton * ) pBox == &aFreeBtn )
{
RightModifyHdl(&aRightMF);
- bLeftEnable = TRUE;
- bWidthEnable = TRUE;
- bOthers = FALSE;
+ bLeftEnable = sal_True;
+ bWidthEnable = sal_True;
+ bOthers = sal_False;
}
aLeftMF.Enable(bLeftEnable);
aLeftFT.Enable(bLeftEnable);
@@ -316,11 +316,11 @@ IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox )
{
// nachdem auf autom. geschaltet wurde, wurde die Breite gemerkt,
// um sie beim Zurueckschalten restaurieren zu koennen
- bFull = FALSE;
+ bFull = sal_False;
aWidthMF.SetPrcntValue(aWidthMF.NormalizePercent(nSaveWidth ), FUNIT_TWIP );
}
ModifyHdl(&aWidthMF);
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -329,13 +329,13 @@ IMPL_LINK( SwFormatTablePage, RightModifyHdl, MetricField *, EMPTYARG )
{
if(aFreeBtn.IsChecked())
{
- BOOL bEnable = aRightMF.GetValue() == 0;
+ sal_Bool bEnable = aRightMF.GetValue() == 0;
// aWidthMF.Enable(bEnable);
aRelWidthCB.Enable(bEnable);
// aWidthFT.Enable(bEnable);
if ( !bEnable )
{
- aRelWidthCB.Check(FALSE);
+ aRelWidthCB.Check(sal_False);
RelWidthClickHdl(&aRelWidthCB);
}
bEnable = aRelWidthCB.IsChecked();
@@ -430,7 +430,7 @@ void SwFormatTablePage::ModifyHdl( Edit* pEdit )
{
if(!aFromLeftBtn.IsChecked())
{
- BOOL bCenter = aCenterBtn.IsChecked();
+ sal_Bool bCenter = aCenterBtn.IsChecked();
if( bCenter )
nRight = nLeft;
if(nRight + nLeft > pTblData->GetSpace() - MINLAY )
@@ -455,7 +455,7 @@ void SwFormatTablePage::ModifyHdl( Edit* pEdit )
aWidthMF.SetPrcntValue( aWidthMF.NormalizePercent( nCurWidth ), FUNIT_TWIP );
aRightMF.SetPrcntValue( aRightMF.NormalizePercent( nRight ), FUNIT_TWIP );
aLeftMF.SetPrcntValue( aLeftMF.NormalizePercent( nLeft ), FUNIT_TWIP );
- bModified = TRUE;
+ bModified = sal_True;
}
/*------------------------------------------------------------------------
@@ -468,7 +468,7 @@ SfxTabPage* SwFormatTablePage::Create( Window* pParent,
/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
-BOOL SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet )
{
// Testen, ob eins der Control noch den Focus hat
if(aWidthMF.HasFocus())
@@ -488,9 +488,9 @@ BOOL SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet )
aTopMF.GetText() != aTopMF.GetSavedValue() )
{
SvxULSpaceItem aULSpace(RES_UL_SPACE);
- aULSpace.SetUpper( (USHORT) aTopMF.Denormalize(
+ aULSpace.SetUpper( (sal_uInt16) aTopMF.Denormalize(
aTopMF.GetValue( FUNIT_TWIP )));
- aULSpace.SetLower( (USHORT) aBottomMF.Denormalize(
+ aULSpace.SetLower( (sal_uInt16) aBottomMF.Denormalize(
aBottomMF.GetValue( FUNIT_TWIP )));
rCoreSet.Put(aULSpace);
}
@@ -499,17 +499,17 @@ BOOL SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet )
if(aNameED.GetText() != aNameED.GetSavedValue())
{
rCoreSet.Put(SfxStringItem( FN_PARAM_TABLE_NAME, aNameED.GetText()));
- bModified = TRUE;
+ bModified = sal_True;
}
- USHORT nPos;
+ sal_uInt16 nPos;
if( aTextDirectionLB.IsVisible() &&
( nPos = aTextDirectionLB.GetSelectEntryPos() ) !=
aTextDirectionLB.GetSavedValue() )
{
sal_uInt32 nDirection = (sal_uInt32)(sal_uIntPtr)aTextDirectionLB.GetEntryData( nPos );
rCoreSet.Put( SvxFrameDirectionItem( (SvxFrameDirection)nDirection, RES_FRAMEDIR));
- bModified = TRUE;
+ bModified = sal_True;
}
return bModified;
@@ -529,7 +529,7 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
aTopMF .Hide();
aBottomFT.Hide();
aBottomMF.Hide();
- aFreeBtn.Enable(FALSE);
+ aFreeBtn.Enable(sal_False);
}
FieldUnit aMetric = ::GetDfltMetric(bHtmlMode);
SetMetric( aWidthMF, aMetric );
@@ -539,20 +539,20 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
SetMetric( aBottomMF, aMetric );
//Name
- if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, sal_False, &pItem ))
{
aNameED.SetText(((const SfxStringItem*)pItem)->GetValue());
aNameED.SaveValue();
}
- if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, sal_False, &pItem ))
{
pTblData = (SwTableRep*)((const SwPtrItem*) pItem)->GetValue();
nMinTableWidth = pTblData->GetColCount() * MINLAY;
if(pTblData->GetWidthPercent())
{
- aRelWidthCB.Check(TRUE);
+ aRelWidthCB.Check(sal_True);
RelWidthClickHdl(&aRelWidthCB);
aWidthMF.SetPrcntValue(pTblData->GetWidthPercent(), FUNIT_CUSTOM);
@@ -582,45 +582,45 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
nOldAlign = pTblData->GetAlign();
- BOOL bSetRight = FALSE, bRightEnable = FALSE,
- bSetLeft = FALSE, bLeftEnable = FALSE;
+ sal_Bool bSetRight = sal_False, bRightEnable = sal_False,
+ bSetLeft = sal_False, bLeftEnable = sal_False;
switch( nOldAlign )
{
case text::HoriOrientation::NONE:
aFreeBtn.Check();
if(aRelWidthCB.IsChecked())
- bSetRight = TRUE;
+ bSetRight = sal_True;
break;
case text::HoriOrientation::FULL:
{
- bSetRight = bSetLeft = TRUE;
+ bSetRight = bSetLeft = sal_True;
aFullBtn.Check();
- aWidthMF.Enable(FALSE);
- aRelWidthCB.Enable(FALSE);
- aWidthFT.Enable(FALSE);
+ aWidthMF.Enable(sal_False);
+ aRelWidthCB.Enable(sal_False);
+ aWidthFT.Enable(sal_False);
}
break;
case text::HoriOrientation::LEFT:
{
- bSetLeft = TRUE;
+ bSetLeft = sal_True;
aLeftBtn.Check();
}
break;
case text::HoriOrientation::LEFT_AND_WIDTH :
{
- bSetRight = TRUE;
+ bSetRight = sal_True;
aFromLeftBtn.Check();
}
break;
case text::HoriOrientation::RIGHT:
{
- bSetRight = TRUE;
+ bSetRight = sal_True;
aRightBtn.Check();
}
break;
case text::HoriOrientation::CENTER:
{
- bSetRight = TRUE;
+ bSetRight = sal_True;
aCenterBtn.Check();
}
break;
@@ -639,7 +639,7 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
}
//Raender
- if(SFX_ITEM_SET == rSet.GetItemState( RES_UL_SPACE, FALSE,&pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( RES_UL_SPACE, sal_False,&pItem ))
{
aTopMF.SetValue(aTopMF.Normalize(
((const SvxULSpaceItem*)pItem)->GetUpper()), FUNIT_TWIP);
@@ -650,10 +650,10 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
}
//text direction
- if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem ) )
{
sal_uInt32 nVal = ((SvxFrameDirectionItem*)pItem)->GetValue();
- USHORT nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
+ sal_uInt16 nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
aTextDirectionLB.SelectEntryPos( nPos );
aTextDirectionLB.SaveValue();
}
@@ -728,7 +728,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
if (aRelWidthCB.IsChecked() && aRelWidthCB.IsEnabled())
{
lWidth = pTblData->GetSpace() - lRight - lLeft;
- USHORT nPercentWidth = (USHORT)aWidthMF.GetValue(FUNIT_CUSTOM);
+ sal_uInt16 nPercentWidth = (sal_uInt16)aWidthMF.GetValue(FUNIT_CUSTOM);
if(pTblData->GetWidthPercent() != nPercentWidth)
{
pTblData->SetWidthPercent(nPercentWidth);
@@ -743,7 +743,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
pTblData->SetWidth(lWidth);
SwTwips nColSum = 0;
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < pTblData->GetColCount(); i++)
{
@@ -812,7 +812,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
DbgTblRep(pTblData)
#endif
}
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Beschreibung: Seite Spaltenkonfiguration
@@ -845,9 +845,9 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent,
nMinWidth( MINLAY ),
nNoOfCols( 0 ),
nNoOfVisibleCols( 0 ),
- bModified(FALSE),
- bModifyTbl(FALSE),
- bPercentMode(FALSE)
+ bModified(sal_False),
+ bModifyTbl(sal_False),
+ bPercentMode(sal_False)
{
FreeResource();
SetExchangeSupport();
@@ -867,7 +867,7 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent,
pTextArr[5] = &aFT6;
const SfxPoolItem* pItem;
- Init((SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, FALSE,&pItem )
+ Init((SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, sal_False,&pItem )
&& ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON));
};
@@ -893,7 +893,7 @@ void SwTableColumnPage::Reset( const SfxItemSet& )
const SfxItemSet& rSet = GetItemSet();
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, sal_False, &pItem ))
{
pTblData = (SwTableRep*)((const SwPtrItem*) pItem)->GetValue();
nNoOfVisibleCols = pTblData->GetColCount();
@@ -902,7 +902,7 @@ void SwTableColumnPage::Reset( const SfxItemSet& )
pTblData->GetAlign() != text::HoriOrientation::LEFT_AND_WIDTH?
pTblData->GetWidth() : pTblData->GetSpace();
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < nNoOfCols; i++ )
{
if( pTblData->GetColumns()[i].nWidth < nMinWidth )
@@ -936,13 +936,13 @@ void SwTableColumnPage::Reset( const SfxItemSet& )
/*------------------------------------------------------------------------
------------------------------------------------------------------------*/
-void SwTableColumnPage::Init(BOOL bWeb)
+void SwTableColumnPage::Init(sal_Bool bWeb)
{
FieldUnit aMetric = ::GetDfltMetric(bWeb);
Link aLkUp = LINK( this, SwTableColumnPage, UpHdl );
Link aLkDown = LINK( this, SwTableColumnPage, DownHdl );
Link aLkLF = LINK( this, SwTableColumnPage, LoseFocusHdl );
- for( USHORT i = 0; i < MET_FIELDS; i++ )
+ for( sal_uInt16 i = 0; i < MET_FIELDS; i++ )
{
aValueTbl[i] = i;
SetMetric(*pFieldArr[i], aMetric);
@@ -971,7 +971,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
{
if(aValueTbl[0] > 0)
{
- for( USHORT i=0; i < MET_FIELDS; i++ )
+ for( sal_uInt16 i=0; i < MET_FIELDS; i++ )
aValueTbl[i] -= 1;
}
}
@@ -979,11 +979,11 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
{
if( aValueTbl[ MET_FIELDS -1 ] < nNoOfVisibleCols -1 )
{
- for(USHORT i=0;i < MET_FIELDS;i++)
+ for(sal_uInt16 i=0;i < MET_FIELDS;i++)
aValueTbl[i] += 1;
}
}
- for( USHORT i = 0; (i < nNoOfVisibleCols ) && ( i < MET_FIELDS); i++ )
+ for( sal_uInt16 i = 0; (i < nNoOfVisibleCols ) && ( i < MET_FIELDS); i++ )
{
String sEntry('~');
sEntry += String::CreateFromInt32( aValueTbl[i] + 1 );
@@ -1000,7 +1000,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
------------------------------------------------------------------------*/
IMPL_LINK_INLINE_START( SwTableColumnPage, UpHdl, PercentField *, pEdit )
{
- bModified = TRUE;
+ bModified = sal_True;
ModifyHdl( pEdit );
return 0;
};
@@ -1010,7 +1010,7 @@ IMPL_LINK_INLINE_END( SwTableColumnPage, UpHdl, PercentField *, pEdit )
------------------------------------------------------------------------*/
IMPL_LINK_INLINE_START( SwTableColumnPage, DownHdl, PercentField *, pEdit )
{
- bModified = TRUE;
+ bModified = sal_True;
ModifyHdl( pEdit );
return 0;
};
@@ -1022,7 +1022,7 @@ IMPL_LINK_INLINE_START( SwTableColumnPage, LoseFocusHdl, PercentField *, pEdit )
{
if(pEdit->IsModified())
{
- bModified = TRUE;
+ bModified = sal_True;
ModifyHdl( pEdit );
}
return 0;
@@ -1033,7 +1033,7 @@ IMPL_LINK_INLINE_END( SwTableColumnPage, LoseFocusHdl, PercentField *, pEdit )
------------------------------------------------------------------------*/
IMPL_LINK( SwTableColumnPage, ModeHdl, CheckBox*, pBox )
{
- BOOL bCheck = pBox->IsChecked();
+ sal_Bool bCheck = pBox->IsChecked();
if(pBox == &aProportionalCB)
{
if(bCheck)
@@ -1045,9 +1045,9 @@ IMPL_LINK( SwTableColumnPage, ModeHdl, CheckBox*, pBox )
/*------------------------------------------------------------------------
------------------------------------------------------------------------*/
-BOOL SwTableColumnPage::FillItemSet( SfxItemSet& )
+sal_Bool SwTableColumnPage::FillItemSet( SfxItemSet& )
{
- for( USHORT i = 0; i < MET_FIELDS; i++ )
+ for( sal_uInt16 i = 0; i < MET_FIELDS; i++ )
{
if(pFieldArr[i]->HasFocus())
{
@@ -1067,8 +1067,8 @@ BOOL SwTableColumnPage::FillItemSet( SfxItemSet& )
------------------------------------------------------------------------*/
void SwTableColumnPage::ModifyHdl( PercentField* pEdit )
{
- USHORT nAktPos;
- USHORT i;
+ sal_uInt16 nAktPos;
+ sal_uInt16 i;
for( i = 0; i < MET_FIELDS; i++)
if(pEdit == pFieldArr[i])
@@ -1082,10 +1082,10 @@ void SwTableColumnPage::ModifyHdl( PercentField* pEdit )
/*------------------------------------------------------------------------
------------------------------------------------------------------------*/
-void SwTableColumnPage::UpdateCols( USHORT nAktPos )
+void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
{
SwTwips nSum = 0;
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < nNoOfCols; i++ )
{
@@ -1093,8 +1093,8 @@ void SwTableColumnPage::UpdateCols( USHORT nAktPos )
}
SwTwips nDiff = nSum - nTableWidth;
- BOOL bModifyTable = aModifyTableCB.IsChecked();
- BOOL bProp = aProportionalCB.IsChecked();
+ sal_Bool bModifyTable = aModifyTableCB.IsChecked();
+ sal_Bool bProp = aProportionalCB.IsChecked();
if(!bModifyTable && !bProp )
{
@@ -1187,10 +1187,10 @@ void SwTableColumnPage::UpdateCols( USHORT nAktPos )
SwTwips nDiffn = nDiff/(nNoOfVisibleCols - 1);
if(nDiff < 0 && (nNoOfVisibleCols - 1) * nDiffn != nDiff)
nDiffn-- ;
- USHORT nStart = nAktPos++;
+ sal_uInt16 nStart = nAktPos++;
if(nAktPos == nNoOfVisibleCols)
nStart = 0;
- for(USHORT i = 0; i < nNoOfVisibleCols; i++ )
+ for(sal_uInt16 i = 0; i < nNoOfVisibleCols; i++ )
{
if((nVisWidth = GetVisibleWidth(i)) + nDiff < MINLAY)
{
@@ -1223,13 +1223,13 @@ DbgTblRep(pTblData)
void SwTableColumnPage::ActivatePage( const SfxItemSet& )
{
bPercentMode = pTblData->GetWidthPercent() != 0;
- for( USHORT i = 0; (i < MET_FIELDS) && (i < nNoOfVisibleCols); i++ )
+ for( sal_uInt16 i = 0; (i < MET_FIELDS) && (i < nNoOfVisibleCols); i++ )
{
pFieldArr[i]->SetRefValue(pTblData->GetWidth());
pFieldArr[i]->ShowPercent( bPercentMode );
}
- USHORT nTblAlign = pTblData->GetAlign();
+ sal_uInt16 nTblAlign = pTblData->GetAlign();
if((text::HoriOrientation::FULL != nTblAlign && nTableWidth != pTblData->GetWidth()) ||
(text::HoriOrientation::FULL == nTblAlign && nTableWidth != pTblData->GetSpace()))
{
@@ -1238,20 +1238,20 @@ void SwTableColumnPage::ActivatePage( const SfxItemSet& )
pTblData->GetWidth();
UpdateCols(0);
}
- bModifyTbl = TRUE;
+ bModifyTbl = sal_True;
if(pTblData->GetWidthPercent() ||
text::HoriOrientation::FULL == nTblAlign ||
pTblData->IsLineSelected() )
- bModifyTbl = FALSE;
+ bModifyTbl = sal_False;
if(bPercentMode)
{
- aModifyTableCB .Check(FALSE);
- aProportionalCB .Check(FALSE);
+ aModifyTableCB .Check(sal_False);
+ aProportionalCB .Check(sal_False);
}
else if( !bModifyTbl )
{
- aProportionalCB.Check(FALSE);
- aModifyTableCB.Check(FALSE);
+ aProportionalCB.Check(sal_False);
+ aModifyTableCB.Check(sal_False);
}
aSpaceFT.Enable(!bPercentMode);
aSpaceED.Enable(!bPercentMode);
@@ -1331,14 +1331,14 @@ DbgTblRep(pTblData)
#endif
_pSet->Put(SwPtrItem( FN_TABLE_REP, pTblData ));
}
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
------------------------------------------------------------------------*/
-SwTwips SwTableColumnPage::GetVisibleWidth(USHORT nPos)
+SwTwips SwTableColumnPage::GetVisibleWidth(sal_uInt16 nPos)
{
- USHORT i=0;
+ sal_uInt16 i=0;
while( nPos )
{
@@ -1357,9 +1357,9 @@ SwTwips SwTableColumnPage::GetVisibleWidth(USHORT nPos)
/*------------------------------------------------------------------------
------------------------------------------------------------------------*/
-void SwTableColumnPage::SetVisibleWidth(USHORT nPos, SwTwips nNewWidth)
+void SwTableColumnPage::SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth)
{
- USHORT i=0;
+ sal_uInt16 i=0;
while( nPos )
{
if(pTblData->GetColumns()[i].bVisible && nPos)
@@ -1394,7 +1394,7 @@ SwTableTabDlg::SwTableTabDlg(Window* pParent, SfxItemPool& ,
/*------------------------------------------------------------------------
------------------------------------------------------------------------*/
-void SwTableTabDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
+void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
if( TP_BACKGROUND == nId )
@@ -1414,7 +1414,7 @@ void SwTableTabDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
else if(TP_TABLE_TEXTFLOW == nId)
{
((SwTextFlowPage&)rPage).SetShell(pShell);
- const USHORT eType = pShell->GetFrmType(0,TRUE);
+ const sal_uInt16 eType = pShell->GetFrmType(0,sal_True);
if( !(FRMTYPE_BODY & eType) )
((SwTextFlowPage&)rPage).DisablePageBreak();
}
@@ -1453,8 +1453,8 @@ SwTextFlowPage::SwTextFlowPage( Window* pParent,
pShell(0),
- bPageBreak(TRUE),
- bHtmlMode(FALSE)
+ bPageBreak(sal_True),
+ bHtmlMode(sal_False)
{
FreeResource();
@@ -1477,7 +1477,7 @@ SwTextFlowPage::SwTextFlowPage( Window* pParent,
#ifndef SW_FILEFORMAT_40
const SfxPoolItem *pItem;
- if(SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, FALSE,&pItem )
+ if(SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, sal_False,&pItem )
&& ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
#endif
{
@@ -1507,16 +1507,16 @@ SfxTabPage* SwTextFlowPage::Create( Window* pParent,
/*-----------------12.12.96 12.22-------------------
--------------------------------------------------*/
-BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
//Ueberschrift wiederholen
if(aHeadLineCB.IsChecked() != aHeadLineCB.GetSavedValue() ||
- String::CreateFromInt32( static_cast< INT32 >(aRepeatHeaderNF.GetValue()) ) != aRepeatHeaderNF.GetSavedValue() )
+ String::CreateFromInt32( static_cast< sal_Int32 >(aRepeatHeaderNF.GetValue()) ) != aRepeatHeaderNF.GetSavedValue() )
{
bModified |= 0 != rSet.Put(
- SfxUInt16Item(FN_PARAM_TABLE_HEADLINE, aHeadLineCB.IsChecked()? USHORT(aRepeatHeaderNF.GetValue()) : 0 ));
+ SfxUInt16Item(FN_PARAM_TABLE_HEADLINE, aHeadLineCB.IsChecked()? sal_uInt16(aRepeatHeaderNF.GetValue()) : 0 ));
}
if(aKeepCB.IsChecked() != aKeepCB.GetSavedValue())
bModified |= 0 != rSet.Put( SvxFmtKeepItem( aKeepCB.IsChecked(), RES_KEEP));
@@ -1532,10 +1532,10 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
const SwFmtPageDesc* pDesc = (const SwFmtPageDesc*) GetOldItem( rSet, RES_PAGEDESC );
- BOOL bState = aPageCollCB.IsChecked();
+ sal_Bool bState = aPageCollCB.IsChecked();
//Wenn Seitenvorlage, dann kein Break
- BOOL bPageItemPut = FALSE;
+ sal_Bool bPageItemPut = sal_False;
if ( bState != aPageCollCB.GetSavedValue() ||
( bState &&
aPageCollLB.GetSelectEntryPos() != aPageCollLB.GetSavedValue() )
@@ -1547,18 +1547,18 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
{
sPage = aPageCollLB.GetSelectEntry();
}
- USHORT nPgNum = static_cast< USHORT >(aPageNoNF.GetValue());
+ sal_uInt16 nPgNum = static_cast< sal_uInt16 >(aPageNoNF.GetValue());
if ( !pDesc || !pDesc->GetPageDesc() ||
( pDesc->GetPageDesc() && ((pDesc->GetPageDesc()->GetName() != sPage) ||
aPageNoNF.GetSavedValue() != (String)nPgNum)))
{
- SwFmtPageDesc aFmt( pShell->FindPageDescByName( sPage, TRUE ) );
+ SwFmtPageDesc aFmt( pShell->FindPageDescByName( sPage, sal_True ) );
aFmt.SetNumOffset(bState ? nPgNum : 0);
bModified |= 0 != rSet.Put( aFmt );
bPageItemPut = bState;
}
}
- BOOL bIsChecked = aPgBrkCB.IsChecked();
+ sal_Bool bIsChecked = aPgBrkCB.IsChecked();
if ( !bPageItemPut &&
( bState != aPageCollCB.GetSavedValue() ||
bIsChecked != aPgBrkCB.GetSavedValue() ||
@@ -1570,7 +1570,7 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
if(bIsChecked)
{
- BOOL bBefore = aPgBrkBeforeRB.IsChecked();
+ sal_Bool bBefore = aPgBrkBeforeRB.IsChecked();
if ( aPgBrkRB.IsChecked() )
{
@@ -1602,13 +1602,13 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
{
bModified |= 0 != rSet.Put(
SvxFrameDirectionItem(
- (SvxFrameDirection)(ULONG)aTextDirectionLB.GetEntryData(aTextDirectionLB.GetSelectEntryPos())
+ (SvxFrameDirection)(sal_uLong)aTextDirectionLB.GetEntryData(aTextDirectionLB.GetSelectEntryPos())
, FN_TABLE_BOX_TEXTDIRECTION));
}
if(aVertOrientLB.GetSelectEntryPos() != aVertOrientLB.GetSavedValue())
{
- USHORT nOrient = USHRT_MAX;
+ sal_uInt16 nOrient = USHRT_MAX;
switch(aVertOrientLB.GetSelectEntryPos())
{
case 0 : nOrient = text::VertOrientation::NONE; break;
@@ -1629,12 +1629,12 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
- BOOL bFlowAllowed = !bHtmlMode || pHtmlOpt->IsPrintLayoutExtension();
+ sal_Bool bFlowAllowed = !bHtmlMode || pHtmlOpt->IsPrintLayoutExtension();
if(bFlowAllowed)
{
// Einfuegen der vorhandenen Seitenvorlagen in die Listbox
- const USHORT nCount = pShell->GetPageDescCnt();
- USHORT i;
+ const sal_uInt16 nCount = pShell->GetPageDescCnt();
+ sal_uInt16 i;
for( i = 0; i < nCount; ++i)
{
@@ -1648,12 +1648,12 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ) ))
aPageCollLB.InsertEntry( aFmtName );
- if(SFX_ITEM_SET == rSet.GetItemState( RES_KEEP, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( RES_KEEP, sal_False, &pItem ))
{
aKeepCB.Check( ((const SvxFmtKeepItem*)pItem)->GetValue() );
aKeepCB.SaveValue();
}
- if(SFX_ITEM_SET == rSet.GetItemState( RES_LAYOUT_SPLIT, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( RES_LAYOUT_SPLIT, sal_False, &pItem ))
{
aSplitCB.Check( ((const SwFmtLayoutSplit*)pItem)->GetValue() );
}
@@ -1663,7 +1663,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
aSplitCB.SaveValue();
SplitHdl_Impl(&aSplitCB);
- if(SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pItem ))
{
aSplitRowCB.Check( ((const SwFmtRowSplit*)pItem)->GetValue() );
}
@@ -1673,7 +1673,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
if(bPageBreak)
{
- if(SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, sal_False, &pItem ))
{
String sPageDesc;
const SwPageDesc* pDesc = ((const SwFmtPageDesc*)pItem)->GetPageDesc();
@@ -1694,19 +1694,19 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
aPageCollCB.Enable();
aPgBrkCB.Check();
- aPgBrkCB.Check( TRUE );
- aColBrkRB.Check( FALSE );
- aPgBrkBeforeRB.Check( TRUE );
- aPgBrkAfterRB.Check( FALSE );
+ aPgBrkCB.Check( sal_True );
+ aColBrkRB.Check( sal_False );
+ aPgBrkBeforeRB.Check( sal_True );
+ aPgBrkAfterRB.Check( sal_False );
}
else
{
aPageCollLB.SetNoSelection();
- aPageCollCB.Check(FALSE);
+ aPageCollCB.Check(sal_False);
}
}
- if(SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, sal_False, &pItem ))
{
const SvxFmtBreakItem* pPageBreak = (const SvxFmtBreakItem*)pItem;
SvxBreak eBreak = (SvxBreak)pPageBreak->GetValue();
@@ -1714,36 +1714,36 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
if ( eBreak != SVX_BREAK_NONE )
{
aPgBrkCB.Check();
- aPageCollCB.Enable(FALSE);
- aPageCollLB.Enable(FALSE);
- aPageNoFT.Enable(FALSE);
- aPageNoNF.Enable(FALSE);
+ aPageCollCB.Enable(sal_False);
+ aPageCollLB.Enable(sal_False);
+ aPageNoFT.Enable(sal_False);
+ aPageNoNF.Enable(sal_False);
}
switch ( eBreak )
{
case SVX_BREAK_PAGE_BEFORE:
- aPgBrkRB.Check( TRUE );
- aColBrkRB.Check( FALSE );
- aPgBrkBeforeRB.Check( TRUE );
- aPgBrkAfterRB.Check( FALSE );
+ aPgBrkRB.Check( sal_True );
+ aColBrkRB.Check( sal_False );
+ aPgBrkBeforeRB.Check( sal_True );
+ aPgBrkAfterRB.Check( sal_False );
break;
case SVX_BREAK_PAGE_AFTER:
- aPgBrkRB.Check( TRUE );
- aColBrkRB.Check( FALSE );
- aPgBrkBeforeRB.Check( FALSE );
- aPgBrkAfterRB.Check( TRUE );
+ aPgBrkRB.Check( sal_True );
+ aColBrkRB.Check( sal_False );
+ aPgBrkBeforeRB.Check( sal_False );
+ aPgBrkAfterRB.Check( sal_True );
break;
case SVX_BREAK_COLUMN_BEFORE:
- aPgBrkRB.Check( FALSE );
- aColBrkRB.Check( TRUE );
- aPgBrkBeforeRB.Check( TRUE );
- aPgBrkAfterRB.Check( FALSE );
+ aPgBrkRB.Check( sal_False );
+ aColBrkRB.Check( sal_True );
+ aPgBrkBeforeRB.Check( sal_True );
+ aPgBrkAfterRB.Check( sal_False );
break;
case SVX_BREAK_COLUMN_AFTER:
- aPgBrkRB.Check( FALSE );
- aColBrkRB.Check( TRUE );
- aPgBrkBeforeRB.Check( FALSE );
- aPgBrkAfterRB.Check( TRUE );
+ aPgBrkRB.Check( sal_False );
+ aColBrkRB.Check( sal_True );
+ aPgBrkBeforeRB.Check( sal_False );
+ aPgBrkAfterRB.Check( sal_True );
break;
default:; //prevent warning
}
@@ -1758,20 +1758,20 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
}
else
{
- aPgBrkRB.Enable(FALSE);
- aColBrkRB.Enable(FALSE);
- aPgBrkBeforeRB.Enable(FALSE);
- aPgBrkAfterRB.Enable(FALSE);
- aKeepCB .Enable(FALSE);
- aSplitCB.Enable(FALSE);
- aPgBrkCB.Enable(FALSE);
- aPageCollCB.Enable(FALSE);
- aPageCollLB.Enable(FALSE);
+ aPgBrkRB.Enable(sal_False);
+ aColBrkRB.Enable(sal_False);
+ aPgBrkBeforeRB.Enable(sal_False);
+ aPgBrkAfterRB.Enable(sal_False);
+ aKeepCB .Enable(sal_False);
+ aSplitCB.Enable(sal_False);
+ aPgBrkCB.Enable(sal_False);
+ aPageCollCB.Enable(sal_False);
+ aPageCollLB.Enable(sal_False);
}
- if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, sal_False, &pItem ))
{
- USHORT nRep = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nRep = ((const SfxUInt16Item*)pItem)->GetValue();
aHeadLineCB.Check( nRep > 0 );
aHeadLineCB.SaveValue();
aRepeatHeaderNF.SetValue( nRep );
@@ -1779,14 +1779,14 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
}
if ( rSet.GetItemState(FN_TABLE_BOX_TEXTDIRECTION) > SFX_ITEM_AVAILABLE )
{
- ULONG nDirection = ((const SvxFrameDirectionItem&)rSet.Get(FN_TABLE_BOX_TEXTDIRECTION)).GetValue();
+ sal_uLong nDirection = ((const SvxFrameDirectionItem&)rSet.Get(FN_TABLE_BOX_TEXTDIRECTION)).GetValue();
aTextDirectionLB.SelectEntryPos(aTextDirectionLB.GetEntryPos( (const void*)nDirection ));
}
if ( rSet.GetItemState(FN_TABLE_SET_VERT_ALIGN) > SFX_ITEM_AVAILABLE )
{
- USHORT nVert = ((const SfxUInt16Item&)rSet.Get(FN_TABLE_SET_VERT_ALIGN)).GetValue();
- USHORT nPos = 0;
+ sal_uInt16 nVert = ((const SfxUInt16Item&)rSet.Get(FN_TABLE_SET_VERT_ALIGN)).GetValue();
+ sal_uInt16 nPos = 0;
switch(nVert)
{
case text::VertOrientation::NONE: nPos = 0; break;
@@ -1819,8 +1819,8 @@ void SwTextFlowPage::SetShell(SwWrtShell* pSh)
bHtmlMode = 0 != (::GetHtmlMode(pShell->GetView().GetDocShell()) & HTMLMODE_ON);
if(bHtmlMode)
{
- aPageNoNF.Enable(FALSE);
- aPageNoFT.Enable(FALSE);
+ aPageNoNF.Enable(sal_False);
+ aPageNoFT.Enable(sal_False);
}
}
@@ -1839,7 +1839,7 @@ IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG )
{
aPageCollCB.Enable();
- BOOL bEnable = aPageCollCB.IsChecked() &&
+ sal_Bool bEnable = aPageCollCB.IsChecked() &&
aPageCollLB.GetEntryCount();
aPageCollLB.Enable(bEnable);
if(!bHtmlMode)
@@ -1851,15 +1851,15 @@ IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG )
}
else
{
- aPageCollCB.Check( FALSE );
- aPageCollCB.Enable(FALSE);
- aPageCollLB.Enable(FALSE);
- aPageNoFT.Enable(FALSE);
- aPageNoNF.Enable(FALSE);
- aPgBrkRB. Enable(FALSE);
- aColBrkRB. Enable(FALSE);
- aPgBrkBeforeRB. Enable(FALSE);
- aPgBrkAfterRB. Enable(FALSE);
+ aPageCollCB.Check( sal_False );
+ aPageCollCB.Enable(sal_False);
+ aPageCollLB.Enable(sal_False);
+ aPageNoFT.Enable(sal_False);
+ aPageNoNF.Enable(sal_False);
+ aPgBrkRB. Enable(sal_False);
+ aColBrkRB. Enable(sal_False);
+ aPgBrkBeforeRB. Enable(sal_False);
+ aPgBrkAfterRB. Enable(sal_False);
}
return 0;
}
@@ -1868,11 +1868,11 @@ IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG )
--------------------------------------------------*/
IMPL_LINK( SwTextFlowPage, ApplyCollClickHdl_Impl, CheckBox*, EMPTYARG )
{
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
if ( aPageCollCB.IsChecked() &&
aPageCollLB.GetEntryCount() )
{
- bEnable = TRUE;
+ bEnable = sal_True;
aPageCollLB.SelectEntryPos( 0 );
}
else
@@ -1898,7 +1898,7 @@ IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn )
{
aPageCollCB.Enable();
- BOOL bEnable = aPageCollCB.IsChecked() &&
+ sal_Bool bEnable = aPageCollCB.IsChecked() &&
aPageCollLB.GetEntryCount();
aPageCollLB.Enable(bEnable);
@@ -1910,11 +1910,11 @@ IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn )
}
else if ( pBtn == &aPgBrkAfterRB )
{
- aPageCollCB .Check( FALSE );
- aPageCollCB .Enable(FALSE);
- aPageCollLB .Enable(FALSE);
- aPageNoFT .Enable(FALSE);
- aPageNoNF .Enable(FALSE);
+ aPageCollCB .Check( sal_False );
+ aPageCollCB .Enable(sal_False);
+ aPageCollLB .Enable(sal_False);
+ aPageNoFT .Enable(sal_False);
+ aPageNoNF .Enable(sal_False);
}
}
return 0;
@@ -1926,11 +1926,11 @@ IMPL_LINK( SwTextFlowPage, PageBreakTypeHdl_Impl, RadioButton*, pBtn )
{
if ( pBtn == &aColBrkRB || aPgBrkAfterRB.IsChecked() )
{
- aPageCollCB .Check(FALSE);
- aPageCollCB .Enable(FALSE);
- aPageCollLB .Enable(FALSE);
- aPageNoFT .Enable(FALSE);
- aPageNoNF .Enable(FALSE);
+ aPageCollCB .Check(sal_False);
+ aPageCollCB .Enable(sal_False);
+ aPageCollLB .Enable(sal_False);
+ aPageNoFT .Enable(sal_False);
+ aPageNoNF .Enable(sal_False);
}
else if ( aPgBrkBeforeRB.IsChecked() )
PageBreakPosHdl_Impl( &aPgBrkBeforeRB );
@@ -1949,7 +1949,7 @@ IMPL_LINK( SwTextFlowPage, SplitHdl_Impl, CheckBox*, pBox )
* --------------------------------------------------*/
IMPL_LINK( SwTextFlowPage, SplitRowHdl_Impl, TriStateBox*, pBox )
{
- pBox->EnableTriState(FALSE);
+ pBox->EnableTriState(sal_False);
return 0;
}
@@ -1965,7 +1965,7 @@ IMPL_LINK( SwTextFlowPage, HeadLineCBClickHdl, void*, EMPTYARG )
--------------------------------------------------*/
void SwTextFlowPage::DisablePageBreak()
{
- bPageBreak = FALSE;
+ bPageBreak = sal_False;
aPgBrkCB .Disable();
aPgBrkRB .Disable();
aColBrkRB .Disable();
diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx
index c0f325862d82..7d4272880643 100644
--- a/sw/source/ui/table/tablemgr.cxx
+++ b/sw/source/ui/table/tablemgr.cxx
@@ -79,7 +79,7 @@ void SwTableFUNC::ColWidthDlg( Window *pParent )
--------------------------------------------------------------------*/
-SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const
+SwTwips SwTableFUNC::GetColWidth(sal_uInt16 nNum) const
{
SwTwips nWidth = 0;
@@ -95,10 +95,10 @@ SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const
else
{
SwTwips nRValid = nNum < GetColCount() ?
- aCols[(USHORT)GetRightSeparator((int)nNum)]:
+ aCols[(sal_uInt16)GetRightSeparator((int)nNum)]:
aCols.GetRight();
SwTwips nLValid = nNum ?
- aCols[(USHORT)GetRightSeparator((int)nNum - 1)]:
+ aCols[(sal_uInt16)GetRightSeparator((int)nNum - 1)]:
aCols.GetLeft();
nWidth = nRValid - nLValid;
}
@@ -111,7 +111,7 @@ SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const
-SwTwips SwTableFUNC::GetMaxColWidth( USHORT nNum ) const
+SwTwips SwTableFUNC::GetMaxColWidth( sal_uInt16 nNum ) const
{
ASSERT(nNum <= aCols.Count(), "Index out of Area");
@@ -133,35 +133,35 @@ SwTwips SwTableFUNC::GetMaxColWidth( USHORT nNum ) const
-void SwTableFUNC::SetColWidth(USHORT nNum, SwTwips nNewWidth )
+void SwTableFUNC::SetColWidth(sal_uInt16 nNum, SwTwips nNewWidth )
{
// aktuelle Breite setzen
// alle folgenden Verschieben
- BOOL bCurrentOnly = FALSE;
+ sal_Bool bCurrentOnly = sal_False;
SwTwips nWidth = 0;
if ( aCols.Count() > 0 )
{
if(aCols.Count() != GetColCount())
- bCurrentOnly = TRUE;
+ bCurrentOnly = sal_True;
nWidth = GetColWidth(nNum);
int nDiff = (int)(nNewWidth - nWidth);
if( !nNum )
- aCols[ static_cast< USHORT >(GetRightSeparator(0)) ] += nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(0)) ] += nDiff;
else if( nNum < GetColCount() )
{
if(nDiff < GetColWidth(nNum + 1) - MINLAY)
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum)) ] += nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum)) ] += nDiff;
else
{
int nDiffLeft = nDiff - (int)GetColWidth(nNum + 1) + (int)MINLAY;
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum)) ] += (nDiff - nDiffLeft);
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum - 1)) ] -= nDiffLeft;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum)) ] += (nDiff - nDiffLeft);
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum - 1)) ] -= nDiffLeft;
}
}
else
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum-1)) ] -= nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum-1)) ] -= nDiff;
}
else
aCols.SetRight( Min( nNewWidth, aCols.GetRightMax()) );
@@ -183,7 +183,7 @@ void SwTableFUNC::InitTabCols()
-SwTableFUNC::SwTableFUNC(SwWrtShell *pShell, BOOL bCopyFmt)
+SwTableFUNC::SwTableFUNC(SwWrtShell *pShell, sal_Bool bCopyFmt)
: pFmt(pShell->GetTableFmt()),
pSh(pShell),
bCopy(bCopyFmt)
@@ -230,11 +230,11 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
aName = pSh->GetTableFmt()->GetName();
// insert node before table
pSh->MoveTable( fnTableCurr, fnTableStart );
- pSh->Up( FALSE, 1, FALSE );
+ pSh->Up( sal_False, 1, sal_False );
if ( pSh->IsCrsrInTbl() )
{
if ( aName != pSh->GetTableFmt()->GetName() )
- pSh->Down( FALSE, 1, FALSE ); // two adjacent tables
+ pSh->Down( sal_False, 1, sal_False ); // two adjacent tables
}
pSh->SplitNode();
}
@@ -275,7 +275,7 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
if ( !pClient )
{
pClient = new SwOleClient( &pSh->GetView(), &pSh->GetView().GetEditWin(), aEmbObjRef );
- pSh->SetCheckForOLEInCaption( TRUE );
+ pSh->SetCheckForOLEInCaption( sal_True );
}
pSh->CalcAndSetScale( aEmbObjRef );
//#50270# Error brauchen wir nicht handeln, das erledigt das
@@ -341,11 +341,11 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
return xChartModel;
}
-USHORT SwTableFUNC::GetCurColNum() const
+sal_uInt16 SwTableFUNC::GetCurColNum() const
{
- USHORT nPos = pSh->GetCurTabColNum();
- USHORT nCount = 0;
- for(USHORT i = 0; i < nPos; i++ )
+ sal_uInt16 nPos = pSh->GetCurTabColNum();
+ sal_uInt16 nCount = 0;
+ for(sal_uInt16 i = 0; i < nPos; i++ )
if(aCols.IsHidden(i))
nCount ++;
return nPos - nCount;
@@ -354,10 +354,10 @@ USHORT SwTableFUNC::GetCurColNum() const
-USHORT SwTableFUNC::GetColCount() const
+sal_uInt16 SwTableFUNC::GetColCount() const
{
- USHORT nCount = 0;
- for(USHORT i = 0; i < aCols.Count(); i++ )
+ sal_uInt16 nCount = 0;
+ for(sal_uInt16 i = 0; i < aCols.Count(); i++ )
if(aCols.IsHidden(i))
nCount ++;
return aCols.Count() - nCount;
@@ -371,7 +371,7 @@ int SwTableFUNC::GetRightSeparator(int nNum) const
int i = 0;
while( nNum >= 0 )
{
- if( !aCols.IsHidden( static_cast< USHORT >(i)) )
+ if( !aCols.IsHidden( static_cast< sal_uInt16 >(i)) )
nNum--;
i++;
}
diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx
index 86eff4a23f08..aa9dd2490ec1 100644
--- a/sw/source/ui/table/tablepg.hxx
+++ b/sw/source/ui/table/tablepg.hxx
@@ -47,7 +47,7 @@ class SwTableRep;
struct TColumn
{
SwTwips nWidth;
- BOOL bVisible;
+ sal_Bool bVisible;
};
class SwFormatTablePage : public SfxTabPage
@@ -84,10 +84,10 @@ class SwFormatTablePage : public SfxTabPage
SwTableRep* pTblData;
SwTwips nSaveWidth;
SwTwips nMinTableWidth;
- USHORT nOldAlign;
- BOOL bModified;
- BOOL bFull:1;
- BOOL bHtmlMode : 1;
+ sal_uInt16 nOldAlign;
+ sal_Bool bModified;
+ sal_Bool bFull:1;
+ sal_Bool bHtmlMode : 1;
void Init();
void ModifyHdl( Edit* pEdit );
@@ -104,7 +104,7 @@ public:
SwFormatTablePage( Window* pParent, const SfxItemSet& rSet );
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void ActivatePage( const SfxItemSet& rSet );
virtual int DeactivatePage( SfxItemSet* pSet = 0 );
@@ -143,24 +143,24 @@ class SwTableColumnPage : public SfxTabPage
FixedText* pTextArr[MET_FIELDS];
SwTwips nTableWidth;
SwTwips nMinWidth;
- USHORT nNoOfCols;
- USHORT nNoOfVisibleCols;
+ sal_uInt16 nNoOfCols;
+ sal_uInt16 nNoOfVisibleCols;
//Breite merken, wenn auf autom. Ausrichtung gestellt wird
- USHORT aValueTbl[MET_FIELDS];//primaere Zuordnung der MetricFields
- BOOL bModified:1;
- BOOL bModifyTbl:1;
- BOOL bPercentMode:1;
+ sal_uInt16 aValueTbl[MET_FIELDS];//primaere Zuordnung der MetricFields
+ sal_Bool bModified:1;
+ sal_Bool bModifyTbl:1;
+ sal_Bool bPercentMode:1;
- void Init(BOOL bWeb);
+ void Init(sal_Bool bWeb);
DECL_LINK( AutoClickHdl, CheckBox * );
void ModifyHdl( PercentField* pEdit );
DECL_LINK( UpHdl, PercentField * );
DECL_LINK( DownHdl, PercentField * );
DECL_LINK( LoseFocusHdl, PercentField * );
DECL_LINK( ModeHdl, CheckBox * );
- void UpdateCols( USHORT nAktPos );
- SwTwips GetVisibleWidth(USHORT nPos);
- void SetVisibleWidth(USHORT nPos, SwTwips nNewWidth);
+ void UpdateCols( sal_uInt16 nAktPos );
+ SwTwips GetVisibleWidth(sal_uInt16 nPos);
+ void SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth);
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
@@ -170,7 +170,7 @@ public:
~SwTableColumnPage();
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void ActivatePage( const SfxItemSet& rSet );
virtual int DeactivatePage( SfxItemSet* pSet = 0 );
@@ -210,8 +210,8 @@ class SwTextFlowPage : public SfxTabPage
SwWrtShell* pShell;
- BOOL bPageBreak;
- BOOL bHtmlMode;
+ sal_Bool bPageBreak;
+ sal_Bool bHtmlMode;
DECL_LINK( PageBreakHdl_Impl, CheckBox* );
@@ -228,7 +228,7 @@ class SwTextFlowPage : public SfxTabPage
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void SetShell(SwWrtShell* pSh);
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index d097d5afeba5..41aaca4a4f65 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -86,7 +86,7 @@ private:
VirtualDevice aVD;
SvtScriptedTextHelper aScriptedText;
svx::frame::Array maArray; /// Implementation to draw the frame borders.
- BOOL bFitWidth;
+ sal_Bool bFitWidth;
bool mbRTL;
Size aPrvSize;
long nLabelColWidth;
@@ -108,19 +108,19 @@ private:
//-------------------------------------------
void Init ();
void DoPaint ( const Rectangle& rRect );
- void CalcCellArray ( BOOL bFitWidth );
+ void CalcCellArray ( sal_Bool bFitWidth );
void CalcLineMap ();
void PaintCells ();
- BYTE GetFormatIndex( size_t nCol, size_t nRow ) const;
+ sal_uInt8 GetFormatIndex( size_t nCol, size_t nRow ) const;
const SvxBoxItem& GetBoxItem( size_t nCol, size_t nRow ) const;
void DrawString( size_t nCol, size_t nRow );
void DrawStrings();
void DrawBackground();
- void MakeFonts ( BYTE nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont );
- String MakeNumberString( String cellString, BOOL bAddDec );
+ void MakeFonts ( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont );
+ String MakeNumberString( String cellString, sal_Bool bAddDec );
};
//========================================================================
@@ -179,7 +179,7 @@ __EXPORT SwStringInputDlg::~SwStringInputDlg()
SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell,
- BOOL bSetAutoFormat, const SwTableAutoFmt* pSelFmt )
+ sal_Bool bSetAutoFormat, const SwTableAutoFmt* pSelFmt )
: SfxModalDialog( pParent, SW_RES( DLG_AUTOFMT_TABLE ) ),
//
aFlFormat ( this, SW_RES( FL_FORMAT ) ),
@@ -210,7 +210,7 @@ SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell,
pShell ( pWrtShell ),
nIndex ( 0 ),
nDfltStylePos ( 0 ),
- bCoreDataChanged( FALSE ),
+ bCoreDataChanged( sal_False ),
bSetAutoFmt ( bSetAutoFormat )
{
pTableTbl = new SwTableAutoFmtTbl;
@@ -270,7 +270,7 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt )
nIndex = 255;
}
- for( BYTE i = 0, nCount = (BYTE)pTableTbl->Count(); i < nCount; i++ )
+ for( sal_uInt8 i = 0, nCount = (sal_uInt8)pTableTbl->Count(); i < nCount; i++ )
{
SwTableAutoFmt* pFmt = (*pTableTbl)[ i ];
aLbFormat.InsertEntry( pFmt->GetName() );
@@ -285,7 +285,7 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt )
//------------------------------------------------------------------------
-void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFmt& rFmt, BOOL bEnable )
+void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFmt& rFmt, sal_Bool bEnable )
{
aBtnNumFormat.Enable( bEnable );
aBtnNumFormat.Check( rFmt.IsValueFormat() );
@@ -325,7 +325,7 @@ void SwAutoFormatDlg::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const
IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
{
SwTableAutoFmtPtr pData = (*pTableTbl)[nIndex];
- BOOL bCheck = ((CheckBox*)pBtn)->IsChecked(), bDataChgd = TRUE;
+ sal_Bool bCheck = ((CheckBox*)pBtn)->IsChecked(), bDataChgd = sal_True;
if( pBtn == &aBtnNumFormat )
pData->SetValueFormat( bCheck );
@@ -340,14 +340,14 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
// else if ( pBtn == &aBtnAdjust )
// pData->SetIncludeWidthHeight( bCheck );
else
- bDataChgd = FALSE;
+ bDataChgd = sal_False;
if( bDataChgd )
{
if( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
pWndPreview->NotifyChange( *pData );
@@ -360,7 +360,7 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG )
{
- BOOL bOk = FALSE, bFmtInserted = FALSE;
+ sal_Bool bOk = sal_False, bFmtInserted = sal_False;
while( !bOk )
{
SwStringInputDlg* pDlg = new SwStringInputDlg( this,
@@ -374,7 +374,7 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG )
if( aFormatName.Len() > 0 )
{
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < pTableTbl->Count(); ++n )
if( (*pTableTbl)[n]->GetName() == aFormatName )
break;
@@ -395,16 +395,16 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG )
pTableTbl->Insert( pNewData, n );
aLbFormat.InsertEntry( aFormatName, nDfltStylePos + n );
aLbFormat.SelectEntryPos( nDfltStylePos + n );
- bFmtInserted = TRUE;
- aBtnAdd.Enable( FALSE );
+ bFmtInserted = sal_True;
+ aBtnAdd.Enable( sal_False );
if ( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
SelFmtHdl( 0 );
- bOk = TRUE;
+ bOk = sal_True;
}
}
@@ -417,7 +417,7 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG )
}
}
else
- bOk = TRUE;
+ bOk = sal_True;
delete pDlg;
}
return 0;
@@ -445,14 +445,14 @@ IMPL_LINK( SwAutoFormatDlg, RemoveHdl, void *, EMPTYARG )
if( !nIndex )
{
- aBtnRemove.Enable(FALSE);
- aBtnRename.Enable(FALSE);
+ aBtnRemove.Enable(sal_False);
+ aBtnRename.Enable(sal_False);
}
if( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
}
delete pBox;
@@ -464,7 +464,7 @@ IMPL_LINK( SwAutoFormatDlg, RemoveHdl, void *, EMPTYARG )
IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
while( !bOk )
{
SwStringInputDlg* pDlg = new SwStringInputDlg( this,
@@ -472,13 +472,13 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
aEmptyStr );
if( pDlg->Execute() == RET_OK )
{
- BOOL bFmtRenamed = FALSE;
+ sal_Bool bFmtRenamed = sal_False;
String aFormatName;
pDlg->GetInputString( aFormatName );
if ( aFormatName.Len() > 0 )
{
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < pTableTbl->Count(); ++n )
if ((*pTableTbl)[n]->GetName() == aFormatName)
break;
@@ -506,12 +506,12 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
if ( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
SelFmtHdl( 0 );
- bOk = TRUE;
- bFmtRenamed = TRUE;
+ bOk = sal_True;
+ bFmtRenamed = sal_True;
}
}
@@ -524,7 +524,7 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
}
}
else
- bOk = TRUE;
+ bOk = sal_True;
delete pDlg;
}
return 0;
@@ -534,30 +534,30 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
IMPL_LINK( SwAutoFormatDlg, SelFmtHdl, void *, EMPTYARG )
{
- BOOL bBtnEnable = FALSE;
- BYTE nSelPos = (BYTE) aLbFormat.GetSelectEntryPos(), nOldIdx = nIndex;
+ sal_Bool bBtnEnable = sal_False;
+ sal_uInt8 nSelPos = (sal_uInt8) aLbFormat.GetSelectEntryPos(), nOldIdx = nIndex;
if( nSelPos >= nDfltStylePos )
{
nIndex = nSelPos - nDfltStylePos;
pWndPreview->NotifyChange( *(*pTableTbl)[nIndex] );
bBtnEnable = 0 != nIndex;
- UpdateChecks( *(*pTableTbl)[nIndex], TRUE );
+ UpdateChecks( *(*pTableTbl)[nIndex], sal_True );
}
else
{
nIndex = 255;
SwTableAutoFmt aTmp( ViewShell::GetShellRes()->aStrNone );
- aTmp.SetFont( FALSE );
- aTmp.SetJustify( FALSE );
- aTmp.SetFrame( FALSE );
- aTmp.SetBackground( FALSE );
- aTmp.SetValueFormat( FALSE );
- aTmp.SetWidthHeight( FALSE );
+ aTmp.SetFont( sal_False );
+ aTmp.SetJustify( sal_False );
+ aTmp.SetFrame( sal_False );
+ aTmp.SetBackground( sal_False );
+ aTmp.SetValueFormat( sal_False );
+ aTmp.SetWidthHeight( sal_False );
if( nOldIdx != nIndex )
pWndPreview->NotifyChange( aTmp );
- UpdateChecks( aTmp, FALSE );
+ UpdateChecks( aTmp, sal_False );
}
aBtnRemove.Enable( bBtnEnable );
@@ -572,7 +572,7 @@ IMPL_LINK_INLINE_START( SwAutoFormatDlg, OkHdl, Button *, EMPTYARG )
if( bSetAutoFmt )
pShell->SetTableAutoFmt( *(*pTableTbl)[ nIndex ] );
EndDialog( RET_OK );
- return TRUE;
+ return sal_True;
}
IMPL_LINK_INLINE_END( SwAutoFormatDlg, OkHdl, Button *, EMPTYARG )
@@ -587,7 +587,7 @@ AutoFmtPreview::AutoFmtPreview( Window* pParent, const ResId& rRes, SwWrtShell*
aCurData ( aEmptyStr ),
aVD ( *this ),
aScriptedText ( aVD ),
- bFitWidth ( FALSE ),
+ bFitWidth ( sal_False ),
mbRTL ( false ),
aPrvSize ( GetSizePixel().Width() - 6, GetSizePixel().Height() - 30 ),
nLabelColWidth ( (aPrvSize.Width() - 4) / 4 - 12 ),
@@ -650,7 +650,7 @@ rFont.MethodName( Value ); \
rCJKFont.MethodName( Value ); \
rCTLFont.MethodName( Value );
-void AutoFmtPreview::MakeFonts( BYTE nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont )
+void AutoFmtPreview::MakeFonts( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont )
{
const SwBoxAutoFmt& rBoxFmt = aCurData.GetBoxFmt( nIndex );
@@ -668,14 +668,14 @@ void AutoFmtPreview::MakeFonts( BYTE nIndex, Font& rFont, Font& rCJKFont, Font&
SETONALLFONTS( SetShadow, rBoxFmt.GetShadowed().GetValue() );
SETONALLFONTS( SetColor, rBoxFmt.GetColor().GetValue() );
SETONALLFONTS( SetSize, aFontSize );
- SETONALLFONTS( SetTransparent, TRUE );
+ SETONALLFONTS( SetTransparent, sal_True );
}
//------------------------------------------------------------------------
-BYTE AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
+sal_uInt8 AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
{
- static const BYTE pnFmtMap[] =
+ static const sal_uInt8 pnFmtMap[] =
{
0, 1, 2, 1, 3,
4, 5, 6, 5, 7,
@@ -698,10 +698,10 @@ void AutoFmtPreview::DrawString( size_t nCol, size_t nRow )
//------------------------
// Ausgabe des Zelltextes:
//------------------------
- ULONG nNum;
+ sal_uLong nNum;
double nVal;
String cellString;
- BYTE nIndex = static_cast< BYTE >( maArray.GetCellIndex( nCol, nRow, mbRTL ) );
+ sal_uInt8 nIndex = static_cast< sal_uInt8 >( maArray.GetCellIndex( nCol, nRow, mbRTL ) );
switch( nIndex )
{
@@ -741,10 +741,10 @@ MAKENUMSTR:
if( aCurData.IsValueFormat() )
{
String sFmt; LanguageType eLng, eSys;
- aCurData.GetBoxFmt( (BYTE)nNum ).GetValueFormat( sFmt, eLng, eSys );
+ aCurData.GetBoxFmt( (sal_uInt8)nNum ).GetValueFormat( sFmt, eLng, eSys );
short nType;
- BOOL bNew;
+ sal_Bool bNew;
xub_StrLen nCheckPos;
sal_uInt32 nKey = pNumFmt->GetIndexPuttingAndConverting( sFmt, eLng,
eSys, nType, bNew, nCheckPos);
@@ -760,11 +760,11 @@ MAKENUMSTR:
if( cellString.Len() )
{
Size aStrSize;
- BYTE nFmtIndex = GetFormatIndex( nCol, nRow );
+ sal_uInt8 nFmtIndex = GetFormatIndex( nCol, nRow );
Rectangle cellRect = maArray.GetCellRect( nCol, nRow );
Point aPos = cellRect.TopLeft();
- USHORT nRightX = 0;
-// BOOL bJustify = aCurData.IsJustify();
+ sal_uInt16 nRightX = 0;
+// sal_Bool bJustify = aCurData.IsJustify();
// ScHorJustifyAttr aHorJustifyItem;
// CellHorJustify eJustification;
@@ -803,7 +803,7 @@ MAKENUMSTR:
aStrSize = aScriptedText.GetTextSize();
}
- nRightX = (USHORT)( cellRect.GetWidth()
+ nRightX = (sal_uInt16)( cellRect.GetWidth()
- aStrSize.Width()
- FRAME_OFFSET );
//-------------
@@ -822,7 +822,7 @@ MAKENUMSTR:
//-----------------------------
// vertikal (immer zentrieren):
//-----------------------------
- aPos.Y() += (nRowHeight - (USHORT)aStrSize.Height()) / 2;
+ aPos.Y() += (nRowHeight - (sal_uInt16)aStrSize.Height()) / 2;
//-----------
// horizontal
@@ -832,7 +832,7 @@ MAKENUMSTR:
aPos.X() += nRightX;
else if (aCurData.IsJustify())
{
- USHORT nHorPos = (USHORT)
+ sal_uInt16 nHorPos = (sal_uInt16)
((cellRect.GetWidth()-aStrSize.Width())/2);
const SvxAdjustItem& rAdj = aCurData.GetBoxFmt(nFmtIndex).GetAdjust();
switch ( rAdj.GetAdjust() )
@@ -927,14 +927,14 @@ void __EXPORT AutoFmtPreview::Init()
SetBorderStyle( GetBorderStyle() | WINDOW_BORDER_MONO );
maArray.Initialize( 5, 5 );
maArray.SetUseDiagDoubleClipping( false );
- CalcCellArray( FALSE );
+ CalcCellArray( sal_False );
CalcLineMap();
}
//------------------------------------------------------------------------
-void AutoFmtPreview::CalcCellArray( BOOL _bFitWidth )
+void AutoFmtPreview::CalcCellArray( sal_Bool _bFitWidth )
{
maArray.SetXOffset( 2 );
maArray.SetAllColWidths( _bFitWidth ? nDataColWidth2 : nDataColWidth1 );
@@ -988,7 +988,7 @@ void AutoFmtPreview::CalcLineMap()
void AutoFmtPreview::NotifyChange( const SwTableAutoFmt& rNewData )
{
aCurData = rNewData;
- bFitWidth = aCurData.IsJustify();//TRUE; //???
+ bFitWidth = aCurData.IsJustify();//sal_True; //???
CalcCellArray( bFitWidth );
CalcLineMap();
DoPaint( Rectangle( Point(0,0), GetSizePixel() ) );
@@ -1012,7 +1012,7 @@ void AutoFmtPreview::DoPaint( const Rectangle& /*rRect*/ )
Font aFont;
aFont = aVD.GetFont();
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aVD.SetFont ( aFont );
aVD.SetLineColor ();
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index 3c77dc41d4d6..c3927935870b 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -202,13 +202,13 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh )
void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
{
const SfxPoolItem* pItem = 0;
- BOOL bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
+ sal_Bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) );
pItem = 0;
- BOOL bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, FALSE, &pItem );
+ sal_Bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem );
const SfxPoolItem* pRowItem = 0, *pTableItem = 0;
- bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, FALSE, &pRowItem );
- bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, FALSE, &pTableItem );
+ bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False, &pRowItem );
+ bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, sal_False, &pTableItem );
if(bBackground)
{
@@ -230,7 +230,7 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
if(bBorder)
rSh.SetTabBorders( rSet );
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, FALSE, &pItem) )
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, sal_False, &pItem) )
rSh.SetRowsToRepeat( ((SfxUInt16Item*)pItem)->GetValue() );
SwFrmFmt* pFrmFmt = rSh.GetTableFmt();
@@ -238,57 +238,57 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
{
//RES_SHADOW
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_SHADOW), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_SHADOW), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_BREAK
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_BREAK), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_BREAK), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_PAGEDESC
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_PAGEDESC), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_PAGEDESC), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_LAYOUT_SPLIT
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_LAYOUT_SPLIT), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_LAYOUT_SPLIT), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_KEEP
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_KEEP), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_KEEP), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_FRAMEDIR
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_FRAMEDIR), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_FRAMEDIR), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, FALSE, &pItem) )
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, sal_False, &pItem) )
{
SvxFrameDirectionItem aDirection( FRMDIR_ENVIRONMENT, RES_FRAMEDIR );
aDirection.SetValue(static_cast< const SvxFrameDirectionItem* >(pItem)->GetValue());
rSh.SetBoxDirection(aDirection);
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, FALSE, &pItem))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, sal_False, &pItem))
rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue());
- if( SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pItem) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pItem) )
rSh.SetRowSplit(*static_cast<const SwFmtRowSplit*>(pItem));
//-- numberformat in cells
#ifdef FORMAT_PAINTBRUSH_ALSO_COPY_NUMBERFORMAT_FOR_TABLES
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem ))
{
SfxItemSet aBoxSet( *rSet.GetPool(), RES_BOXATR_FORMAT, RES_BOXATR_FORMAT );
aBoxSet.Put( SwTblBoxNumFormat( ((SfxUInt32Item*)pItem)->GetValue() ));
@@ -364,8 +364,8 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
{
SwPaM* pCrsr = rWrtShell.GetCrsr();
//select one character only to get the attributes of this single character only
- BOOL bHasSelection = pCrsr->HasMark();
- BOOL bForwardSelection = FALSE;
+ sal_Bool bHasSelection = pCrsr->HasMark();
+ sal_Bool bForwardSelection = sal_False;
if(!bHasSelection) //check for and handle multiselections
{
@@ -415,7 +415,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
SdrView* pDrawView = rWrtShell.GetDrawView();
if(pDrawView)
{
- BOOL bOnlyHardAttr = TRUE;
+ sal_Bool bOnlyHardAttr = sal_True;
if( pDrawView->AreObjectsMarked() )
{
pItemSet = new SfxItemSet( pDrawView->GetAttrFromMarked(bOnlyHardAttr) );
@@ -446,7 +446,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
if( pFmt )
m_aParaStyle = pFmt->GetName();
}
- rWrtShell.Pop(FALSE);
+ rWrtShell.Pop(sal_False);
rWrtShell.EndAction();
}
typedef boost::shared_ptr< SfxPoolItem > SfxPoolItemSharedPtr;
@@ -454,10 +454,10 @@ typedef std::vector< SfxPoolItemSharedPtr > ItemVector;
// #144857# collect all PoolItems from the applied styles
void lcl_AppendSetItems( ItemVector& rItemVector, const SfxItemSet& rStyleAttrSet )
{
- const USHORT* pRanges = rStyleAttrSet.GetRanges();
+ const sal_uInt16* pRanges = rStyleAttrSet.GetRanges();
while( *pRanges )
{
- for ( USHORT nWhich = *pRanges; nWhich <= *(pRanges+1); ++nWhich )
+ for ( sal_uInt16 nWhich = *pRanges; nWhich <= *(pRanges+1); ++nWhich )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rStyleAttrSet.GetItemState( nWhich, sal_False, &pItem ) )
@@ -512,7 +512,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
SwFmtCharFmt aFmt(pStyle->GetCharFmt());
// #144857# collect items from character style
lcl_AppendSetItems( aItemVector, aFmt.GetCharFmt()->GetAttrSet());
- USHORT nFlags=0; //(nMode & KEY_SHIFT) ? SETATTR_DONTREPLACE : SETATTR_DEFAULT;
+ sal_uInt16 nFlags=0; //(nMode & KEY_SHIFT) ? SETATTR_DONTREPLACE : SETATTR_DEFAULT;
rWrtShell.SetAttr( aFmt, nFlags );
}
}
@@ -535,7 +535,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
SdrView* pDrawView = rWrtShell.GetDrawView();
if(pDrawView)
{
- BOOL bReplaceAll = TRUE;
+ sal_Bool bReplaceAll = sal_True;
pDrawView->SetAttrToMarked(*m_pItemSet, bReplaceAll);
}
}
@@ -561,22 +561,22 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
{
if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART) )
{
- BOOL bStart = ((SfxBoolItem&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART)).GetValue();
- USHORT nNumStart = USHRT_MAX;
+ sal_Bool bStart = ((SfxBoolItem&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART)).GetValue();
+ sal_uInt16 nNumStart = USHRT_MAX;
if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
if(USHRT_MAX != nNumStart)
- bStart = FALSE;
+ bStart = sal_False;
}
rWrtShell.SetNumRuleStart(bStart);
rWrtShell.SetNodeNumStart(nNumStart);
}
else if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
- USHORT nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ sal_uInt16 nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
rWrtShell.SetNodeNumStart(nNumStart);
- rWrtShell.SetNumRuleStart(FALSE);
+ rWrtShell.SetNumRuleStart(sal_False);
}
}
}
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index addf6f9db512..4dd3e50ce27b 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -119,13 +119,13 @@ TYPEINIT1(SwPagePreView,SfxViewShell)
/* -----------------26.11.2002 10:41-----------------
*
* --------------------------------------------------*/
-USHORT lcl_GetNextZoomStep(USHORT nCurrentZoom, BOOL bZoomIn)
+sal_uInt16 lcl_GetNextZoomStep(sal_uInt16 nCurrentZoom, sal_Bool bZoomIn)
{
- static USHORT aZoomArr[] =
+ static sal_uInt16 aZoomArr[] =
{
25, 50, 75, 100, 150, 200, 400, 600
};
- const sal_uInt16 nZoomArrSize = sizeof(aZoomArr)/sizeof(USHORT);
+ const sal_uInt16 nZoomArrSize = sizeof(aZoomArr)/sizeof(sal_uInt16);
if(bZoomIn)
for(int i = nZoomArrSize - 1; i >= 0; --i)
{
@@ -145,7 +145,7 @@ USHORT lcl_GetNextZoomStep(USHORT nCurrentZoom, BOOL bZoomIn)
* --------------------------------------------------*/
void lcl_InvalidateZoomSlots(SfxBindings& rBindings)
{
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN, SID_ATTR_ZOOMSLIDER, FN_PREVIEW_ZOOM, FN_STAT_ZOOM,
0
@@ -207,8 +207,8 @@ SwPreViewZoomDlg::~SwPreViewZoomDlg() {}
void SwPreViewZoomDlg::Apply()
{
((SwPagePreViewWin*)GetParent())->CalcWish(
- BYTE(aRowEdit.GetValue()),
- BYTE(aColEdit.GetValue()) );
+ sal_uInt8(aRowEdit.GetValue()),
+ sal_uInt8(aColEdit.GetValue()) );
}
/*--------------------------------------------------------------------
@@ -231,7 +231,7 @@ SwPagePreViewWin::SwPagePreViewWin( Window *pParent, SwPagePreView& rPView )
SetLineColor( GetBackground().GetColor());
SetMapMode( MapMode(MAP_TWIP) );
- const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(FALSE);
+ const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(sal_False);
mnRow = pUsrPref->GetPagePrevRow(); // 1 Zeile
mnCol = pUsrPref->GetPagePrevCol(); // 1 Spalte
// OD 24.03.2003 #108282# - member <mnVirtPage> no longer exists.
@@ -285,16 +285,16 @@ void SwPagePreViewWin::Paint( const Rectangle& rRect )
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
+void SwPagePreViewWin::CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol )
{
if( !mpViewShell || !mpViewShell->GetLayout() )
return;
- USHORT nOldCol = mnCol;
+ sal_uInt16 nOldCol = mnCol;
// OD 02.12.2002 #103492# - update <mnRow> and <mnCol>.
mnRow = nNewRow;
mnCol = nNewCol;
- USHORT nPages = mnRow * mnCol,
+ sal_uInt16 nPages = mnRow * mnCol,
nLastSttPg = mrView.GetPageCount()+1 > nPages
? mrView.GetPageCount()+1 - nPages : 0;
if( mnSttPage > nLastSttPg )
@@ -314,7 +314,7 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
// Sortierung muss eingehalten werden!!
// OD 24.03.2003 #108282# - additional invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN,
FN_PREVIEW_ZOOM,
@@ -338,11 +338,11 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
int SwPagePreViewWin::MovePage( int eMoveMode )
{
// soviele Seiten hoch
- USHORT nPages = mnRow * mnCol;
- USHORT nNewSttPage = mnSttPage;
+ sal_uInt16 nPages = mnRow * mnCol;
+ sal_uInt16 nNewSttPage = mnSttPage;
// OD 04.12.2002 #103492#
- USHORT nPageCount = mrView.GetPageCount();
- USHORT nDefSttPg = GetDefSttPage();
+ sal_uInt16 nPageCount = mrView.GetPageCount();
+ sal_uInt16 nDefSttPg = GetDefSttPage();
// OD 06.12.2002 #103492#
bool bPaintPageAtFirstCol = true;
@@ -421,13 +421,13 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
maPaintedPreviewDocRect, bPaintPageAtFirstCol );
if( nNewSttPage == mnSttPage &&
eMoveMode != MV_SELPAGE )
- return FALSE;
+ return sal_False;
SetPagePreview(mnRow, mnCol);
mnSttPage = nNewSttPage;
// OD 24.03.2003 #108282# - additional invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -436,7 +436,7 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
SfxBindings& rBindings = mrView.GetViewFrame()->GetBindings();
rBindings.Invalidate( aInval );
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -477,7 +477,7 @@ void SwPagePreViewWin::SetWinSize( const Size& rNewSize )
--------------------------------------------------------------------*/
-void SwPagePreViewWin::GetStatusStr( String& rStr, USHORT nPageCnt ) const
+void SwPagePreViewWin::GetStatusStr( String& rStr, sal_uInt16 nPageCnt ) const
{
// OD 24.03.2003 #108282# - show physical and virtual page number of
// selected page, if it's visible.
@@ -509,11 +509,11 @@ void SwPagePreViewWin::GetStatusStr( String& rStr, USHORT nPageCnt ) const
void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt )
{
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
- USHORT nKey = rKeyCode.GetCode();
- BOOL bHandled = FALSE;
+ sal_uInt16 nKey = rKeyCode.GetCode();
+ sal_Bool bHandled = sal_False;
if(!rKeyCode.GetModifier())
{
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
switch(nKey)
{
case KEY_ADD : nSlot = SID_ZOOM_OUT; break;
@@ -522,7 +522,7 @@ void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt )
}
if(nSlot)
{
- bHandled = TRUE;
+ bHandled = sal_True;
mrView.GetViewFrame()->GetDispatcher()->Execute(
nSlot, SFX_CALLMODE_ASYNCHRON );
}
@@ -537,12 +537,12 @@ void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt )
void SwPagePreViewWin::Command( const CommandEvent& rCEvt )
{
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
switch( rCEvt.GetCommand() )
{
case COMMAND_CONTEXTMENU:
mrView.GetViewFrame()->GetDispatcher()->ExecutePopup();
- bCallBase = FALSE;
+ bCallBase = sal_False;
break;
case COMMAND_WHEEL:
@@ -608,7 +608,7 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
mrView.SetVScrollbarThumbPos( nNewSelectedPage );
}
// OD 24.03.2003 #108282# - invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_STAT_PAGE, 0
};
@@ -623,9 +623,9 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
******************************************************************************/
-void SwPagePreViewWin::SetPagePreview( BYTE nRow, BYTE nCol )
+void SwPagePreViewWin::SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol )
{
- SwMasterUsrPref *pOpt = (SwMasterUsrPref *)SW_MOD()->GetUsrPref(FALSE);
+ SwMasterUsrPref *pOpt = (SwMasterUsrPref *)SW_MOD()->GetUsrPref(sal_False);
if (nRow != pOpt->GetPagePrevRow() || nCol != pOpt->GetPagePrevCol())
{
@@ -720,7 +720,7 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
const int eMvMode = _bPgUp ?
SwPagePreViewWin::MV_PAGE_UP :
SwPagePreViewWin::MV_PAGE_DOWN;
- if ( ChgPage( eMvMode, TRUE ) )
+ if ( ChgPage( eMvMode, sal_True ) )
aViewWin.Invalidate();
}
else
@@ -764,7 +764,7 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
}
ScrollViewSzChg();
// OD 24.03.2003 #108282# - additional invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -786,8 +786,8 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
void SwPagePreView::Execute( SfxRequest &rReq )
{
int eMvMode;
- BYTE nRow = 1;
- BOOL bRetVal = FALSE;
+ sal_uInt8 nRow = 1;
+ sal_Bool bRetVal = sal_False;
bool bRefresh = true;
switch(rReq.GetSlot())
@@ -802,9 +802,9 @@ void SwPagePreView::Execute( SfxRequest &rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
if( pArgs && pArgs->Count() >= 2 )
{
- BYTE nCols = (BYTE)((SfxUInt16Item &)pArgs->Get(
+ sal_uInt8 nCols = (sal_uInt8)((SfxUInt16Item &)pArgs->Get(
SID_ATTR_TABLE_COLUMN)).GetValue();
- BYTE nRows = (BYTE)((SfxUInt16Item &)pArgs->Get(
+ sal_uInt8 nRows = (sal_uInt8)((SfxUInt16Item &)pArgs->Get(
SID_ATTR_TABLE_ROW)).GetValue();
aViewWin.CalcWish( nRows, nCols );
@@ -819,7 +819,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
bool bBookPreview = GetViewShell()->GetViewOptions()->IsPagePrevBookview();
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_SHOW_BOOKVIEW, FALSE, &pItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_SHOW_BOOKVIEW, sal_False, &pItem ) )
{
bBookPreview = static_cast< const SfxBoolItem* >( pItem )->GetValue();
( ( SwViewOption* ) GetViewShell()->GetViewOptions() )->SetPagePrevBookview( bBookPreview );
@@ -830,7 +830,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
// book preview mode changed. Thus, adjust scrollbars and
// invalidate corresponding states.
ScrollViewSzChg();
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, FN_SHOW_BOOKVIEW, 0
@@ -882,13 +882,13 @@ void SwPagePreView::Execute( SfxRequest &rReq )
if( pArgs )
{
enum SvxZoomType eType = SVX_ZOOM_PERCENT;
- USHORT nZoomFactor = USHRT_MAX;
- if(SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOM, TRUE, &pItem))
+ sal_uInt16 nZoomFactor = USHRT_MAX;
+ if(SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOM, sal_True, &pItem))
{
eType = ((const SvxZoomItem *)pItem)->GetType();
nZoomFactor = ((const SvxZoomItem *)pItem)->GetValue();
}
- else if(SFX_ITEM_SET == pArgs->GetItemState(FN_PREVIEW_ZOOM, TRUE, &pItem))
+ else if(SFX_ITEM_SET == pArgs->GetItemState(FN_PREVIEW_ZOOM, sal_True, &pItem))
nZoomFactor = ((const SfxUInt16Item *)pItem)->GetValue();
if(USHRT_MAX != nZoomFactor)
SetZoom(eType, nZoomFactor);
@@ -901,9 +901,9 @@ void SwPagePreView::Execute( SfxRequest &rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, TRUE, &pItem ) )
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, sal_True, &pItem ) )
{
- const USHORT nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
+ const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom );
}
}
@@ -950,12 +950,12 @@ void SwPagePreView::Execute( SfxRequest &rReq )
{
aViewWin.SetSelectedPage( nNewSelectedPage );
aViewWin.SetSttPage( nNewStartPage );
- int nRet = ChgPage( SwPagePreViewWin::MV_SELPAGE, TRUE );
+ int nRet = ChgPage( SwPagePreViewWin::MV_SELPAGE, sal_True );
bRefresh = 0 != nRet;
}
GetViewShell()->ShowPreViewSelection( nNewSelectedPage );
// OD 24.03.2003 #108282# - invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_STAT_PAGE, 0
};
@@ -978,14 +978,14 @@ void SwPagePreView::Execute( SfxRequest &rReq )
case FN_START_OF_LINE:
case FN_START_OF_DOCUMENT:
aViewWin.SetSelectedPage( 1 );
- eMvMode = SwPagePreViewWin::MV_DOC_STT; bRetVal = TRUE; goto MOVEPAGE;
+ eMvMode = SwPagePreViewWin::MV_DOC_STT; bRetVal = sal_True; goto MOVEPAGE;
case FN_END_OF_LINE:
case FN_END_OF_DOCUMENT:
aViewWin.SetSelectedPage( mnPageCount );
- eMvMode = SwPagePreViewWin::MV_DOC_END; bRetVal = TRUE; goto MOVEPAGE;
+ eMvMode = SwPagePreViewWin::MV_DOC_END; bRetVal = sal_True; goto MOVEPAGE;
MOVEPAGE:
{
- int nRet = ChgPage( eMvMode, TRUE );
+ int nRet = ChgPage( eMvMode, sal_True );
// return value fuer Basic
if(bRetVal)
rReq.SetReturnValue(SfxBoolItem(rReq.GetSlot(), nRet == 0));
@@ -1001,14 +1001,14 @@ MOVEPAGE:
// die Sache mit der Orientation
if(pPPVPD)
{
- SfxPrinter* pPrinter = GetPrinter( TRUE );
+ SfxPrinter* pPrinter = GetPrinter( sal_True );
if((pPrinter->GetOrientation() == ORIENTATION_LANDSCAPE)
!= pPPVPD->GetLandscape())
pPrinter->SetOrientation(pPPVPD->GetLandscape() ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT);
}
- ::SetAppPrintOptions( aViewWin.GetViewShell(), FALSE );
- bNormalPrint = FALSE;
- USHORT nPrtSlot = SID_PRINTDOC;
+ ::SetAppPrintOptions( aViewWin.GetViewShell(), sal_False );
+ bNormalPrint = sal_False;
+ sal_uInt16 nPrtSlot = SID_PRINTDOC;
rReq.SetSlot( nPrtSlot );
SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() );
rReq.SetSlot( FN_PRINT_PAGEPREVIEW );
@@ -1016,8 +1016,8 @@ MOVEPAGE:
}
case SID_PRINTDOCDIRECT:
case SID_PRINTDOC:
- ::SetAppPrintOptions( aViewWin.GetViewShell(), FALSE );
- bNormalPrint = TRUE;
+ ::SetAppPrintOptions( aViewWin.GetViewShell(), sal_False );
+ bNormalPrint = sal_True;
SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() );
return;
case FN_CLOSE_PAGEPREVIEW:
@@ -1029,7 +1029,7 @@ MOVEPAGE:
break;
case FN_INSERT_BREAK:
{
- USHORT nSelPage = aViewWin.SelectedPage();
+ sal_uInt16 nSelPage = aViewWin.SelectedPage();
//if a dummy page is selected (e.g. a non-existing right/left page)
//the direct neighbor is used
if(GetViewShell()->IsDummyPage( nSelPage ) && GetViewShell()->IsDummyPage( --nSelPage ))
@@ -1057,13 +1057,13 @@ MOVEPAGE:
void SwPagePreView::GetState( SfxItemSet& rSet )
{
SfxWhichIter aIter(rSet);
- BYTE nRow = 1;
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt8 nRow = 1;
+ sal_uInt16 nWhich = aIter.FirstWhich();
ASSERT(nWhich, leeres Set);
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
//#106746# zoom has to be disabled if Accessibility support is switched on
// MT 2010/01, see #110498#
- BOOL bZoomEnabled = TRUE; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
+ sal_Bool bZoomEnabled = sal_True; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
while(nWhich)
{
@@ -1131,7 +1131,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
if(bZoomEnabled)
{
const SwViewOption* pVOpt = GetViewShell()->GetViewOptions();
- const USHORT nCurrentZoom = pVOpt->GetZoom();
+ const sal_uInt16 nCurrentZoom = pVOpt->GetZoom();
SvxZoomSliderItem aZoomSliderItem( nCurrentZoom, MINZOOM, MAXZOOM );
aZoomSliderItem.AddSnappingPoint( 100 );
rSet.Put( aZoomSliderItem );
@@ -1167,7 +1167,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
break;
case FN_SHOW_BOOKVIEW:
{
- BOOL b = GetViewShell()->GetViewOptions()->IsPagePrevBookview();
+ sal_Bool b = GetViewShell()->GetViewOptions()->IsPagePrevBookview();
rSet.Put(SfxBoolItem(nWhich, b));
}
break;
@@ -1184,10 +1184,10 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
SfxItemSet aSet( *rSet.GetPool(), SID_PRINTDOC, SID_PRINTDOC );
GetSlotState( SID_PRINTDOC, SfxViewShell::GetInterface(), &aSet );
if( SFX_ITEM_DISABLED == aSet.GetItemState( SID_PRINTDOC,
- FALSE, &pItem ))
+ sal_False, &pItem ))
rSet.DisableItem( nWhich );
else if( SFX_ITEM_SET == aSet.GetItemState( SID_PRINTDOC,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
((SfxPoolItem*)pItem)->SetWhich( FN_PRINT_PAGEPREVIEW );
rSet.Put( *pItem );
@@ -1196,7 +1196,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
break;
case SID_PRINTPREVIEW:
- rSet.Put( SfxBoolItem( nWhich, TRUE ) );
+ rSet.Put( SfxBoolItem( nWhich, sal_True ) );
break;
case SID_PRINTDOC:
@@ -1216,7 +1216,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
void SwPagePreView::StateUndo(SfxItemSet& rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -1233,45 +1233,45 @@ void SwPagePreView::StateUndo(SfxItemSet& rSet)
void SwPagePreView::Init(const SwViewOption * pPrefs)
{
if ( GetViewShell()->HasDrawView() )
- GetViewShell()->GetDrawView()->SetAnimationEnabled( FALSE );
+ GetViewShell()->GetDrawView()->SetAnimationEnabled( sal_False );
- bNormalPrint = TRUE;
+ bNormalPrint = sal_True;
// Die DocSize erfragen und verarbeiten. Ueber die Handler konnte
// die Shell nicht gefunden werden, weil die Shell innerhalb CTOR-Phase
// nicht in der SFX-Verwaltung bekannt ist.
if( !pPrefs )
- pPrefs = SW_MOD()->GetUsrPref(FALSE);
+ pPrefs = SW_MOD()->GetUsrPref(sal_False);
// die Felder aktualisieren
// ACHTUNG: hochcasten auf die EditShell, um die SS zu nutzen.
// In den Methoden wird auf die akt. Shell abgefragt!
SwEditShell* pESh = (SwEditShell*)GetViewShell();
- BOOL bIsModified = pESh->IsModified();
+ sal_Bool bIsModified = pESh->IsModified();
SwViewOption aOpt( *pPrefs );
- aOpt.SetPagePreview(TRUE);
- aOpt.SetTab( FALSE );
- aOpt.SetBlank( FALSE );
- aOpt.SetHardBlank( FALSE );
- aOpt.SetParagraph( FALSE );
- aOpt.SetLineBreak( FALSE );
- aOpt.SetPageBreak( FALSE );
- aOpt.SetColumnBreak( FALSE );
- aOpt.SetSoftHyph( FALSE );
- aOpt.SetFldName( FALSE );
- aOpt.SetPostIts( FALSE );
- aOpt.SetShowHiddenChar( FALSE );
- aOpt.SetShowHiddenField( FALSE );
- aOpt.SetShowHiddenPara( FALSE );
- aOpt.SetViewHRuler( FALSE );
- aOpt.SetViewVRuler( FALSE );
- aOpt.SetGraphic( TRUE );
- aOpt.SetTable( TRUE );
- aOpt.SetSnap( FALSE );
- aOpt.SetGridVisible( FALSE );
+ aOpt.SetPagePreview(sal_True);
+ aOpt.SetTab( sal_False );
+ aOpt.SetBlank( sal_False );
+ aOpt.SetHardBlank( sal_False );
+ aOpt.SetParagraph( sal_False );
+ aOpt.SetLineBreak( sal_False );
+ aOpt.SetPageBreak( sal_False );
+ aOpt.SetColumnBreak( sal_False );
+ aOpt.SetSoftHyph( sal_False );
+ aOpt.SetFldName( sal_False );
+ aOpt.SetPostIts( sal_False );
+ aOpt.SetShowHiddenChar( sal_False );
+ aOpt.SetShowHiddenField( sal_False );
+ aOpt.SetShowHiddenPara( sal_False );
+ aOpt.SetViewHRuler( sal_False );
+ aOpt.SetViewVRuler( sal_False );
+ aOpt.SetGraphic( sal_True );
+ aOpt.SetTable( sal_True );
+ aOpt.SetSnap( sal_False );
+ aOpt.SetGridVisible( sal_False );
GetViewShell()->ApplyViewOptions( aOpt );
GetViewShell()->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions());
@@ -1283,7 +1283,7 @@ void SwPagePreView::Init(const SwViewOption * pPrefs)
if( pIDSA->get(IDocumentSettingAccess::BROWSE_MODE))
{
pIDSA->set(IDocumentSettingAccess::BROWSE_MODE, false);
- pESh->CheckBrowseView( TRUE );
+ pESh->CheckBrowseView( sal_True );
}
GetViewShell()->CalcLayout();
@@ -1321,8 +1321,8 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
SetName(String::CreateFromAscii("PageView" ));
SetWindow( &aViewWin );
SetHelpId(SW_PAGEPREVIEW);
- _CreateScrollbar( TRUE );
- _CreateScrollbar( FALSE );
+ _CreateScrollbar( sal_True );
+ _CreateScrollbar( sal_False );
SfxObjectShell* pObjShell = pViewFrame->GetObjectShell();
if ( !pOldSh )
@@ -1345,15 +1345,15 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
{
pVS = ((SwView*)pOldSh)->GetWrtShellPtr();
// save the current ViewData of the previous SwView
- pOldSh->WriteUserData( sSwViewData, FALSE );
+ pOldSh->WriteUserData( sSwViewData, sal_False );
}
else
pVS = GetDocShell()->GetWrtShell();
if( pVS )
{
// setze die akt. Seite als die erste
- USHORT nPhysPg, nVirtPg;
- ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, /*FALSE*/TRUE, FALSE );
+ sal_uInt16 nPhysPg, nVirtPg;
+ ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, /*sal_False*/sal_True, sal_False );
if( 1 != aViewWin.GetCol() && 1 == nPhysPg )
--nPhysPg;
aViewWin.SetSttPage( nPhysPg );
@@ -1423,7 +1423,7 @@ SwDocShell* SwPagePreView::GetDocShell()
--------------------------------------------------------------------*/
-int SwPagePreView::_CreateScrollbar( BOOL bHori )
+int SwPagePreView::_CreateScrollbar( sal_Bool bHori )
{
Window *pMDI = &GetViewFrame()->GetWindow();
SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar;
@@ -1447,7 +1447,7 @@ int SwPagePreView::_CreateScrollbar( BOOL bHori )
*ppScrollbar = new SwScrollbar( pMDI, bHori );
ScrollDocSzChg();
- (*ppScrollbar)->EnableDrag( TRUE );
+ (*ppScrollbar)->EnableDrag( sal_True );
(*ppScrollbar)->SetEndScrollHdl( LINK( this, SwPagePreView, EndScrollHdl ));
@@ -1504,7 +1504,7 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
{
ScrollViewSzChg();
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT,
FN_PAGEUP, FN_PAGEDOWN, 0
@@ -1526,14 +1526,14 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
// ab hier alles aus der SwView uebernommen
-void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
+void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
{
// const long nAdd = bInner ? 0 : ScrollBar::GetWindowOverlapPixel();
const StyleSettings &rSet = aViewWin.GetSettings().GetStyleSettings();
const long nTmp = rSet.GetScrollBarSize();// - nAdd;
- if ( pVScrollbar->IsVisible( FALSE ))
+ if ( pVScrollbar->IsVisible( sal_False ))
rToFill.Right() = nTmp;
- if ( pHScrollbar->IsVisible( FALSE ) )
+ if ( pHScrollbar->IsVisible( sal_False ) )
rToFill.Bottom() = nTmp;
SetBorderPixel( rToFill );
}
@@ -1546,12 +1546,12 @@ void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
void SwPagePreView::InnerResizePixel( const Point &rOfst, const Size &rSize )
{
SvBorder aBorder;
- CalcAndSetBorderPixel( aBorder, TRUE );
+ CalcAndSetBorderPixel( aBorder, sal_True );
Rectangle aRect( rOfst, rSize );
aRect += aBorder;
ViewResizePixel( aViewWin, aRect.TopLeft(), aRect.GetSize(),
aViewWin.GetOutputSizePixel(),
- TRUE,
+ sal_True,
*pVScrollbar, *pHScrollbar, pPageUpBtn, pPageDownBtn, 0,
*pScrollFill );
@@ -1567,9 +1567,9 @@ void SwPagePreView::InnerResizePixel( const Point &rOfst, const Size &rSize )
void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize )
{
SvBorder aBorder;
- CalcAndSetBorderPixel( aBorder, FALSE );
+ CalcAndSetBorderPixel( aBorder, sal_False );
ViewResizePixel( aViewWin, rOfst, rSize, aViewWin.GetOutputSizePixel(),
- FALSE, *pVScrollbar,
+ sal_False, *pVScrollbar,
*pHScrollbar, pPageUpBtn, pPageDownBtn, 0, *pScrollFill );
//EditWin niemals einstellen!
@@ -1592,7 +1592,7 @@ void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize )
--------------------------------------------------------------------*/
-void SwPagePreView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
+void SwPagePreView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollbar )
{
const Point aTopLeft(AlignToPixel(rRect.TopLeft()));
const Point aBottomRight(AlignToPixel(rRect.BottomRight()));
@@ -1657,7 +1657,7 @@ IMPL_LINK( SwPagePreView, ScrollHdl, SwScrollbar *, pScrollbar )
{
// wieviele Seiten scrollen ??
String sStateStr(sPageStr);
- USHORT nThmbPos = (USHORT)pScrollbar->GetThumbPos();
+ sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos();
if( 1 == aViewWin.GetCol() || !nThmbPos )
++nThmbPos;
sStateStr += String::CreateFromInt32( nThmbPos );
@@ -1700,7 +1700,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
if ( GetViewShell()->PagePreviewLayout()->DoesPreviewLayoutRowsFitIntoWindow() )
{
// wieviele Seiten scrollen ??
- USHORT nThmbPos = (USHORT)pScrollbar->GetThumbPos();
+ sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos();
// OD 05.12.2002 #103492# - adjust to new preview functionality
if( nThmbPos != aViewWin.SelectedPage() )
{
@@ -1721,7 +1721,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
{
aViewWin.SetSttPage( nThmbPos );
aViewWin.SetSelectedPage( nThmbPos );
- ChgPage( SwPagePreViewWin::MV_SCROLL, FALSE );
+ ChgPage( SwPagePreViewWin::MV_SCROLL, sal_False );
// OD 20.01.2003 #103492# - update scrollbars
ScrollViewSzChg();
}
@@ -1761,7 +1761,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
aViewWin.Scroll(nThmbPos - aViewWin.GetPaintedPreviewDocRect().Left(), 0);
}
// OD 24.03.2003 #108282# - additional invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -1804,7 +1804,7 @@ void SwPagePreView::DocSzChgd( const Size &rSz )
if( aVisArea.GetWidth() )
{
- ChgPage( SwPagePreViewWin::MV_CALC, TRUE );
+ ChgPage( SwPagePreViewWin::MV_CALC, sal_True );
ScrollDocSzChg();
aViewWin.Invalidate();
@@ -1827,7 +1827,7 @@ void SwPagePreView::ScrollViewSzChg()
{
//vertical scrolling by row
// OD 04.12.2002 #103492# - adjust to new preview functionality
- USHORT nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
+ sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
pVScrollbar->SetVisibleSize( nVisPages );
// OD 19.02.2003 #107369# - set selected page as scroll bar position,
// if it is visible.
@@ -1905,7 +1905,7 @@ void SwPagePreView::ScrollDocSzChg()
// alles zum Thema Drucken
-SfxPrinter* SwPagePreView::GetPrinter( BOOL bCreate )
+SfxPrinter* SwPagePreView::GetPrinter( sal_Bool bCreate )
{
return aViewWin.GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
}
@@ -1915,7 +1915,7 @@ SfxPrinter* SwPagePreView::GetPrinter( BOOL bCreate )
--------------------------------------------------------------------*/
-USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool )
+sal_uInt16 SwPagePreView::SetPrinter( SfxPrinter *pNew, sal_uInt16 nDiffFlags, bool )
{
ViewShell &rSh = *GetViewShell();
SfxPrinter* pOld = rSh.getIDocumentDeviceAccess()->getPrinter( false );
@@ -1930,15 +1930,15 @@ USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool )
rESh.SetModified();
}
if ( ( nDiffFlags & SFX_PRINTER_OPTIONS ) == SFX_PRINTER_OPTIONS )
- ::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, FALSE );
+ ::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, sal_False );
- const BOOL bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? TRUE : FALSE;
- const BOOL bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? TRUE : FALSE;
+ const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False;
+ const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False;
if ( bChgOri || bChgSize )
{
rESh.StartAllAction();
if ( bChgOri )
- rSh.ChgAllPageOrientation( USHORT(pNew->GetOrientation()) );
+ rSh.ChgAllPageOrientation( sal_uInt16(pNew->GetOrientation()) );
if ( bChgSize )
{
Size aSz( SvxPaperInfo::GetPaperSize( pNew ) );
@@ -1949,14 +1949,14 @@ USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool )
rESh.SetModified();
rESh.EndAllAction();
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE,
SID_RULER_BORDERS, SID_RULER_PAGE_POS, 0
};
#ifdef DBG_UTIL
{
- const USHORT* pPtr = aInval + 1;
+ const sal_uInt16* pPtr = aInval + 1;
do {
ASSERT( *(pPtr - 1) < *pPtr, "falsche Sortierung!" );
} while( *++pPtr );
@@ -2013,8 +2013,8 @@ Size SwPagePreView::GetOptimalSizePixel() const
Size aMaxSize( aRect.GetWidth(), aRect.GetHeight() );
Size aInSize = rWin.GetOutputSizePixel();
Size aOutSize = rWin.GetSizePixel();
- USHORT nXBorder = USHORT(aOutSize.Width() - aInSize.Width());
- USHORT nYBorder = USHORT(aOutSize.Height() - aInSize.Height());
+ sal_uInt16 nXBorder = sal_uInt16(aOutSize.Width() - aInSize.Width());
+ sal_uInt16 nYBorder = sal_uInt16(aOutSize.Height() - aInSize.Height());
aMaxSize.Width() -= nXBorder;
//'auf Verdacht' etwas vom Border abziehen (Menue)
nYBorder -= (nYBorder - nXBorder) / 2;
@@ -2099,7 +2099,7 @@ void SwPagePreViewWin::AdjustPreviewToNewZoom( const sal_uInt16 _nZoomFactor,
* when less than the desired number of rows fits into
* the view
* --------------------------------------------------*/
-void SwPagePreViewWin::Scroll(long nXMove, long nYMove, USHORT /*nFlags*/)
+void SwPagePreViewWin::Scroll(long nXMove, long nYMove, sal_uInt16 /*nFlags*/)
{
maPaintedPreviewDocRect.Move(nXMove, nYMove);
mpPgPrevwLayout->Prepare( 0, maPaintedPreviewDocRect.TopLeft(),
@@ -2108,16 +2108,16 @@ void SwPagePreViewWin::Scroll(long nXMove, long nYMove, USHORT /*nFlags*/)
}
-BOOL SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
+sal_Bool SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
const CommandWheelData* pWData = rCEvt.GetWheelData();
if( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
{
if(!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
{
- USHORT nFactor = GetViewShell()->GetViewOptions()->GetZoom();
- const USHORT nOffset = 10;
+ sal_uInt16 nFactor = GetViewShell()->GetViewOptions()->GetZoom();
+ const sal_uInt16 nOffset = 10;
if( 0L > pWData->GetDelta() )
{
nFactor -= nOffset;
@@ -2132,7 +2132,7 @@ BOOL SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
}
SetZoom(SVX_ZOOM_PERCENT, nFactor);
}
- bOk = TRUE;
+ bOk = sal_True;
}
else
bOk = aViewWin.HandleScrollCommand( rCEvt, pHScrollbar, pVScrollbar );
@@ -2178,7 +2178,7 @@ void SwPagePreView::ShowVScrollbar(sal_Bool bShow)
/* -----------------25.11.2002 16:36-----------------
*
* --------------------------------------------------*/
-void SwPagePreView::SetZoom(SvxZoomType eType, USHORT nFactor)
+void SwPagePreView::SetZoom(SvxZoomType eType, sal_uInt16 nFactor)
{
ViewShell& rSh = *GetViewShell();
SwViewOption aOpt(*rSh.GetViewOptions());
diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx
index c8ecc2d92607..22109be8a039 100644
--- a/sw/source/ui/uiview/scroll.cxx
+++ b/sw/source/ui/uiview/scroll.cxx
@@ -37,18 +37,18 @@
#define SCROLL_LINE_SIZE 250
-SwScrollbar::SwScrollbar( Window *pWin, BOOL bHoriz ) :
+SwScrollbar::SwScrollbar( Window *pWin, sal_Bool bHoriz ) :
ScrollBar( pWin,
WinBits( WB_3DLOOK | WB_HIDE | ( bHoriz ? WB_HSCROLL : WB_VSCROLL) ) ),
bHori( bHoriz ),
- bAuto( FALSE ),
- bThumbEnabled( TRUE ),
- bVisible(FALSE),
- bSizeSet(FALSE)
+ bAuto( sal_False ),
+ bThumbEnabled( sal_True ),
+ bVisible(sal_False),
+ bSizeSet(sal_False)
{
// SSA: --- RTL --- no mirroring for horizontal scrollbars
if( bHoriz )
- EnableRTL( FALSE );
+ EnableRTL( sal_False );
}
@@ -63,7 +63,7 @@ void SwScrollbar::DocSzChgd( const Size &rSize )
{
aDocSz = rSize;
SetRange( Range( 0, bHori ? rSize.Width() : rSize.Height()) );
- const ULONG nVisSize = GetVisibleSize();
+ const sal_uLong nVisSize = GetVisibleSize();
SetLineSize( SCROLL_LINE_SIZE );
// SetLineSize( nVisSize * 10 / 100 );
SetPageSize( nVisSize * 77 / 100 );
@@ -100,7 +100,7 @@ void SwScrollbar::ViewPortChgd( const Rectangle &rRect )
/*-----------------10/21/97 02:48pm-----------------
--------------------------------------------------*/
-void SwScrollbar::ExtendedShow( BOOL bSet )
+void SwScrollbar::ExtendedShow( sal_Bool bSet )
{
bVisible = bSet;
if( (!bSet || !bAuto) && IsUpdateMode() && bSizeSet)
@@ -113,7 +113,7 @@ void SwScrollbar::ExtendedShow( BOOL bSet )
void SwScrollbar::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
{
ScrollBar::SetPosSizePixel(rNewPos, rNewSize);
- bSizeSet = TRUE;
+ bSizeSet = sal_True;
if(bVisible)
ExtendedShow();
@@ -123,7 +123,7 @@ void SwScrollbar::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
/*-----------------14.04.98 11:38-------------------
--------------------------------------------------*/
-void SwScrollbar::SetAuto(BOOL bSet)
+void SwScrollbar::SetAuto(sal_Bool bSet)
{
if(bAuto != bSet)
{
@@ -131,7 +131,7 @@ void SwScrollbar::SetAuto(BOOL bSet)
// automatisch versteckt - dann anzeigen
if(!bAuto && bVisible && !ScrollBar::IsVisible())
- ExtendedShow(TRUE);
+ ExtendedShow(sal_True);
else if(bAuto)
AutoShow(); // oder automatisch verstecken
}
@@ -147,14 +147,14 @@ void SwScrollbar::AutoShow()
if( nVis >= nLen - 1)
{
if(ScrollBar::IsVisible())
- ScrollBar::Show(FALSE);
+ ScrollBar::Show(sal_False);
}
else if ( !ScrollBar::IsVisible() &&
(!bHori || nVis) ) //Optimierung fuer Browser.
//Horizontaler Scrollbar per
//default aus.
{
- ScrollBar::Show(TRUE);
+ ScrollBar::Show(sal_True);
}
}
}
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index af7e12629a73..4f9c6910011a 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -146,7 +146,7 @@ TYPEINIT1(SwSrcView, SfxViewShell)
--------------------------------------------------*/
-void lcl_PrintHeader( OutputDevice &rOutDev, USHORT nPages, USHORT nCurPage, const String& rTitle )
+void lcl_PrintHeader( OutputDevice &rOutDev, sal_uInt16 nPages, sal_uInt16 nCurPage, const String& rTitle )
{
short nLeftMargin = LMARGPRN;
Size aSz = rOutDev.GetOutputSize();
@@ -222,8 +222,8 @@ void lcl_ConvertTabsToSpaces( String& rLine )
{
if ( rLine.Len() )
{
- USHORT nPos = 0;
- USHORT nMax = rLine.Len();
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nMax = rLine.Len();
while ( nPos < nMax )
{
if ( rLine.GetChar(nPos) == '\t' )
@@ -249,7 +249,7 @@ SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) :
SfxViewShell( pViewFrame, SWSRCVIEWFLAGS ),
aEditWin( &pViewFrame->GetWindow(), this ),
pSearchItem(0),
- bSourceSaved(FALSE),
+ bSourceSaved(sal_False),
eLoadEncoding(RTL_TEXTENCODING_DONTKNOW)
{
Init();
@@ -265,7 +265,7 @@ SwSrcView::~SwSrcView()
SwDocShell* pDocShell = GetDocShell();
DBG_ASSERT(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?");
const TextSelection& rSel = aEditWin.GetTextView()->GetSelection();
- ((SwWebDocShell*)pDocShell)->SetSourcePara( static_cast< USHORT >( rSel.GetStart().GetPara() ) );
+ ((SwWebDocShell*)pDocShell)->SetSourcePara( static_cast< sal_uInt16 >( rSel.GetStart().GetPara() ) );
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
pDocShell->GetModel(), uno::UNO_QUERY_THROW);
@@ -307,11 +307,11 @@ void SwSrcView::Init()
Load(pDocShell);
else
{
- aEditWin.SetReadonly(TRUE);
+ aEditWin.SetReadonly(sal_True);
}
// StartListening(*GetViewFrame());
- StartListening(*pDocShell,TRUE);
+ StartListening(*pDocShell,sal_True);
}
/*--------------------------------------------------------------------
@@ -331,7 +331,7 @@ SwDocShell* SwSrcView::GetDocShell()
void SwSrcView::SaveContent(const String& rTmpFile)
{
- SfxMedium aMedium( rTmpFile, STREAM_WRITE, TRUE);
+ SfxMedium aMedium( rTmpFile, STREAM_WRITE, sal_True);
SvStream* pOutStream = aMedium.GetOutStream();
pOutStream->SetStreamCharSet( lcl_GetStreamCharSet(eLoadEncoding) );
aEditWin.Write(*pOutStream);//, EE_FORMAT_TEXT);
@@ -345,7 +345,7 @@ void SwSrcView::SaveContent(const String& rTmpFile)
void SwSrcView::Execute(SfxRequest& rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
TextView* pTextView = aEditWin.GetTextView();
switch( nSlot )
{
@@ -385,7 +385,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
{
SfxMedium aMedium( xFP->getFiles().getConstArray()[0],
STREAM_WRITE | STREAM_SHARE_DENYNONE,
- FALSE );
+ sal_False );
SvStream* pOutStream = aMedium.GetOutStream();
pOutStream->SetStreamCharSet(lcl_GetStreamCharSet(eLoadEncoding));
aEditWin.Write( *pOutStream );
@@ -424,11 +424,11 @@ void SwSrcView::Execute(SfxRequest& rReq)
{
const SfxItemSet* pTmpArgs = rReq.GetArgs();
- USHORT nWhich = pTmpArgs->GetWhichByPos( 0 );
+ sal_uInt16 nWhich = pTmpArgs->GetWhichByPos( 0 );
DBG_ASSERT( nWhich, "Wich fuer SearchItem ?" );
const SfxPoolItem& rItem = pTmpArgs->Get( nWhich );
SetSearchItem( (const SvxSearchItem&)rItem);
- StartSearchAndReplace( (const SvxSearchItem&)rItem, FALSE, rReq.IsAPI() );
+ StartSearchAndReplace( (const SvxSearchItem&)rItem, sal_False, rReq.IsAPI() );
if(aEditWin.IsModified())
GetDocShell()->GetDoc()->SetModified();
}
@@ -438,7 +438,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
SvxSearchItem* pSrchItem = GetSearchItem();
if(pSrchItem)
{
- StartSearchAndReplace( *pSrchItem, FALSE, rReq.IsAPI() );
+ StartSearchAndReplace( *pSrchItem, sal_False, rReq.IsAPI() );
if(aEditWin.IsModified())
GetDocShell()->GetDoc()->SetModified();
}
@@ -452,11 +452,11 @@ void SwSrcView::Execute(SfxRequest& rReq)
break;
case SID_UNDO:
pTextView->Undo();
- GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetViewFrame()->GetBindings().InvalidateAll(sal_False);
break;
case SID_REDO:
pTextView->Redo();
- GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetViewFrame()->GetBindings().InvalidateAll(sal_False);
break;
case SID_REPEAT:
break;
@@ -486,7 +486,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
void SwSrcView::GetState(SfxItemSet& rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
TextView* pTextView = aEditWin.GetTextView();
while(nWhich)
@@ -520,7 +520,7 @@ void SwSrcView::GetState(SfxItemSet& rSet)
break;
case SID_SEARCH_OPTIONS:
{
- USHORT nOpt = SRC_SEARCHOPTIONS;
+ sal_uInt16 nOpt = SRC_SEARCHOPTIONS;
if(GetDocShell()->IsReadOnly())
nOpt &= ~(SEARCH_OPTIONS_REPLACE|SEARCH_OPTIONS_REPLACE_ALL);
@@ -554,7 +554,7 @@ void SwSrcView::GetState(SfxItemSet& rSet)
case SID_REDO:
{
SfxUndoManager& rMgr = pTextView->GetTextEngine()->GetUndoManager();
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
if(nWhich == SID_UNDO)
{
nCount = rMgr.GetUndoActionCount();
@@ -601,7 +601,7 @@ void SwSrcView::GetState(SfxItemSet& rSet)
TransferableDataHelper aDataHelper(
TransferableDataHelper::CreateFromSystemClipboard(
&aEditWin) );
- BOOL bDisable = !aDataHelper.GetXTransferable().is() ||
+ sal_Bool bDisable = !aDataHelper.GetXTransferable().is() ||
0 == aDataHelper.GetFormatCount();
if( bDisable )
rSet.DisableItem(nWhich);
@@ -642,20 +642,20 @@ void SwSrcView::SetSearchItem( const SvxSearchItem& rItem )
--------------------------------------------------------------------*/
-USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
- BOOL bFromStart,
- BOOL bApi,
- BOOL bRecursive)
+sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
+ sal_Bool bFromStart,
+ sal_Bool bApi,
+ sal_Bool bRecursive)
{
ExtTextView* pTextView = aEditWin.GetTextView();
TextSelection aSel;
TextPaM aPaM;
- BOOL bForward = !rSearchItem.GetBackward();
- BOOL bAtStart = pTextView->GetSelection() == TextSelection( aPaM, aPaM );
+ sal_Bool bForward = !rSearchItem.GetBackward();
+ sal_Bool bAtStart = pTextView->GetSelection() == TextSelection( aPaM, aPaM );
if( !bForward )
- aPaM = TextPaM( (ULONG)-1, (USHORT)-1 );
+ aPaM = TextPaM( (sal_uLong)-1, (sal_uInt16)-1 );
if( bFromStart )
{
@@ -667,8 +667,8 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
aSearchOpt.Locale = SvxCreateLocale(
static_cast< LanguageType >( GetAppLanguage() ) );
- USHORT nFound;
- BOOL bAll = FALSE;
+ sal_uInt16 nFound;
+ sal_Bool bAll = sal_False;
switch( rSearchItem.GetCommand() )
{
case SVX_SEARCHCMD_FIND:
@@ -676,7 +676,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
nFound = pTextView->Search( aSearchOpt, bForward );
break;
- case SVX_SEARCHCMD_REPLACE_ALL: bAll = TRUE;
+ case SVX_SEARCHCMD_REPLACE_ALL: bAll = sal_True;
case SVX_SEARCHCMD_REPLACE:
nFound = pTextView->Replace( aSearchOpt, bAll, bForward );
break;
@@ -687,7 +687,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
if( !nFound )
{
- BOOL bNotFoundMessage = FALSE;
+ sal_Bool bNotFoundMessage = sal_False;
if(!bRecursive)
{
if(!bFromStart)
@@ -696,13 +696,13 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
}
else
{
- bNotFoundMessage = TRUE;
+ bNotFoundMessage = sal_True;
pTextView->SetSelection( aSel );
}
}
else if(bAtStart)
{
- bNotFoundMessage = TRUE;
+ bNotFoundMessage = sal_True;
}
@@ -717,7 +717,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
: MSG_SEARCH_START)).Execute())
{
pTextView->SetSelection( TextSelection( aPaM, aPaM ) );
- StartSearchAndReplace( rSearchItem, FALSE, FALSE, TRUE );
+ StartSearchAndReplace( rSearchItem, sal_False, sal_False, sal_True );
}
}
}
@@ -728,7 +728,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
+sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool )
{
SwDocShell* pDocSh = GetDocShell();
if ( (SFX_PRINTER_JOBSETUP | SFX_PRINTER_PRINTER) & nDiffFlags )
@@ -738,10 +738,10 @@ USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
pDocSh->SetModified();
}
if ( nDiffFlags & SFX_PRINTER_OPTIONS )
- ::SetPrinter( pDocSh->getIDocumentDeviceAccess(), pNew, TRUE );
+ ::SetPrinter( pDocSh->getIDocumentDeviceAccess(), pNew, sal_True );
- const BOOL bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? TRUE : FALSE;
- const BOOL bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? TRUE : FALSE;
+ const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False;
+ const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False;
if ( bChgOri || bChgSize )
{
pDocSh->SetModified();
@@ -753,7 +753,7 @@ USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
Beschreibung:
--------------------------------------------------------------------*/
-SfxPrinter* SwSrcView::GetPrinter( BOOL bCreate )
+SfxPrinter* SwSrcView::GetPrinter( sal_Bool bCreate )
{
return GetDocShell()->GetDoc()->getPrinter( bCreate );
}
@@ -787,32 +787,32 @@ sal_Int32 SwSrcView::PrintSource(
String aTitle( GetViewFrame()->GetWindow().GetText() );
- USHORT nLineHeight = (USHORT) pOutDev->GetTextHeight(); // etwas mehr.
- USHORT nParaSpace = 10;
+ sal_uInt16 nLineHeight = (sal_uInt16) pOutDev->GetTextHeight(); // etwas mehr.
+ sal_uInt16 nParaSpace = 10;
Size aPaperSz = pOutDev->GetOutputSize();
aPaperSz.Width() -= (LMARGPRN + RMARGPRN);
aPaperSz.Height() -= (TMARGPRN + BMARGPRN);
// nLinepPage stimmt nicht, wenn Zeilen umgebrochen werden muessen...
- USHORT nLinespPage = (USHORT) (aPaperSz.Height() / nLineHeight);
- USHORT nCharspLine = (USHORT) (aPaperSz.Width() / pOutDev->GetTextWidth( 'X' ));
- USHORT nParas = static_cast< USHORT >( pTextEngine->GetParagraphCount() );
+ sal_uInt16 nLinespPage = (sal_uInt16) (aPaperSz.Height() / nLineHeight);
+ sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pOutDev->GetTextWidth( 'X' ));
+ sal_uInt16 nParas = static_cast< sal_uInt16 >( pTextEngine->GetParagraphCount() );
- USHORT nPages = (USHORT) (nParas / nLinespPage + 1 );
- USHORT nCurPage = 1;
+ sal_uInt16 nPages = (sal_uInt16) (nParas / nLinespPage + 1 );
+ sal_uInt16 nCurPage = 1;
// Header drucken...
if (!bCalcNumPagesOnly && nPage == nCurPage)
lcl_PrintHeader( *pOutDev, nPages, nCurPage, aTitle );
const Point aStartPos( LMARGPRN, TMARGPRN );
Point aPos( aStartPos );
- for ( USHORT nPara = 0; nPara < nParas; ++nPara )
+ for ( sal_uInt16 nPara = 0; nPara < nParas; ++nPara )
{
String aLine( pTextEngine->GetText( nPara ) );
lcl_ConvertTabsToSpaces( aLine );
- USHORT nLines = aLine.Len() / nCharspLine + 1;
- for ( USHORT nLine = 0; nLine < nLines; ++nLine )
+ sal_uInt16 nLines = aLine.Len() / nCharspLine + 1;
+ for ( sal_uInt16 nLine = 0; nLine < nLines; ++nLine )
{
String aTmpLine( aLine, nLine * nCharspLine, nCharspLine );
aPos.Y() += nLineHeight;
@@ -855,7 +855,7 @@ void SwSrcView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
// Broadcast kommt nur einmal!
const SwDocShell* pDocSh = GetDocShell();
- const BOOL bReadonly = pDocSh->IsReadOnly();
+ const sal_Bool bReadonly = pDocSh->IsReadOnly();
aEditWin.SetReadonly(bReadonly);
}
SfxViewShell::Notify(rBC, rHint);
@@ -876,8 +876,8 @@ void SwSrcView::Load(SwDocShell* pDocShell)
SfxMedium* pMedium = pDocShell->GetMedium();
const SfxFilter* pFilter = pMedium->GetFilter();
- BOOL bHtml = pFilter && pFilter->GetUserData().EqualsAscii("HTML");
- BOOL bDocModified = pDocShell->IsModified();
+ sal_Bool bHtml = pFilter && pFilter->GetUserData().EqualsAscii("HTML");
+ sal_Bool bDocModified = pDocShell->IsModified();
if(bHtml && !bDocModified && pDocShell->HasName())
{
SvStream* pStream = pMedium->GetInStream();
@@ -901,9 +901,9 @@ void SwSrcView::Load(SwDocShell* pDocShell)
pStream->SetStreamCharSet( eDestEnc );
pStream->Seek(0);
TextEngine* pTextEngine = aEditWin.GetTextEngine();
- pTextEngine->EnableUndo(FALSE);
+ pTextEngine->EnableUndo(sal_False);
aEditWin.Read(*pStream);//, EE_FORMAT_TEXT);
- pTextEngine->EnableUndo(TRUE);
+ pTextEngine->EnableUndo(sal_True);
}
else
{
@@ -919,18 +919,18 @@ void SwSrcView::Load(SwDocShell* pDocShell)
SvtSaveOptions aOpt;
{
- SfxMedium aMedium( sFileURL,STREAM_READWRITE, TRUE );
+ SfxMedium aMedium( sFileURL,STREAM_READWRITE, sal_True );
SwWriter aWriter( aMedium, *pDocShell->GetDoc() );
WriterRef xWriter;
::GetHTMLWriter(aEmptyStr, aMedium.GetBaseURL( true ), xWriter);
String sWriteName = pDocShell->HasName() ?
pMedium->GetName() :
(const String&) sFileURL;
- ULONG nRes = aWriter.Write(xWriter, &sWriteName);
+ sal_uLong nRes = aWriter.Write(xWriter, &sWriteName);
if(nRes)
{
ErrorHandler::HandleError(ErrCode(nRes));
- aEditWin.SetReadonly(TRUE);
+ aEditWin.SetReadonly(sal_True);
}
aMedium.Commit();
SvStream* pInStream = aMedium.GetInStream();
@@ -948,9 +948,9 @@ void SwSrcView::Load(SwDocShell* pDocShell)
if(bDocModified)
pDocShell->SetModified();// das Flag wird zwischendurch zurueckgesetzt
// AutoLoad abschalten
- pDocShell->SetAutoLoad(INetURLObject(), 0, FALSE);
+ pDocShell->SetAutoLoad(INetURLObject(), 0, sal_False);
DBG_ASSERT(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?");
- USHORT nLine = ((SwWebDocShell*)pDocShell)->GetSourcePara();
+ sal_uInt16 nLine = ((SwWebDocShell*)pDocShell)->GetSourcePara();
aEditWin.SetStartLine(nLine);
aEditWin.GetTextEngine()->ResetUndo();
aEditWin.GetOutWin()->GrabFocus();
diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx
index 4265f3cf8cd0..eca1b71052fc 100644
--- a/sw/source/ui/uiview/swcli.cxx
+++ b/sw/source/ui/uiview/swcli.cxx
@@ -44,7 +44,7 @@
using namespace com::sun::star;
SwOleClient::SwOleClient( SwView *pView, SwEditWin *pWin, const svt::EmbeddedObjectRef& xObj ) :
- SfxInPlaceClient( pView, pWin, xObj.GetViewAspect() ), bInDoVerb( FALSE ),
+ SfxInPlaceClient( pView, pWin, xObj.GetViewAspect() ), bInDoVerb( sal_False ),
bOldCheckForOLEInCaption( pView->GetWrtShell().IsCheckForOLEInCaption() )
{
SetObject( xObj.GetObject() );
@@ -158,11 +158,11 @@ void SwOleClient::ViewChanged()
aVisSize.Height()= Fraction( aVisSize.Height() ) * GetScaleHeight();
SwRect aRect( Point( LONG_MIN, LONG_MIN ), aVisSize );
- rSh.LockView( TRUE ); //Scrollen im EndAction verhindern
+ rSh.LockView( sal_True ); //Scrollen im EndAction verhindern
rSh.StartAllAction();
rSh.RequestObjectResize( aRect, GetObject() );
rSh.EndAllAction();
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
}
void SwOleClient::MakeVisible()
diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx
index 73ec9ab71dd4..7050b8284d18 100644
--- a/sw/source/ui/uiview/uivwimp.cxx
+++ b/sw/source/ui/uiview/uivwimp.cxx
@@ -105,7 +105,7 @@ SwView_Impl::~SwView_Impl()
pScanEvtLstnr->ViewDestroyed();
if( xClipEvtLstnr.is() )
{
- pClipEvtLstnr->AddRemoveListener( FALSE );
+ pClipEvtLstnr->AddRemoveListener( sal_False );
pClipEvtLstnr->ViewDestroyed();
}
delete pConfigItem;
@@ -141,12 +141,12 @@ SwXTextView* SwView_Impl::GetUNOObject_Impl()
---------------------------------------------------------------------------*/
void SwView_Impl::ExecuteScan( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_TWAIN_SELECT:
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
Reference< XScannerManager > xScanMgr = SW_MOD()->GetScannerManager();
if( xScanMgr.is() )
@@ -180,7 +180,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
case SID_TWAIN_TRANSFER:
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
Reference< XScannerManager > xScanMgr = SW_MOD()->GetScannerManager();
if( xScanMgr.is() )
@@ -193,7 +193,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
{
Reference< XEventListener > xLstner = &rListener;
xScanMgr->startScan( aContexts.getConstArray()[ 0 ], xLstner );
- bDone = TRUE;
+ bDone = sal_True;
}
}
catch(...)
@@ -234,7 +234,7 @@ void SwView_Impl::AddClipboardListener()
if(!xClipEvtLstnr.is())
{
xClipEvtLstnr = pClipEvtLstnr = new SwClipboardChangeListener( *pView );
- pClipEvtLstnr->AddRemoveListener( TRUE );
+ pClipEvtLstnr->AddRemoveListener( sal_True );
}
}
/* -----------------3/31/2003 11:42AM----------------
@@ -337,7 +337,7 @@ void SAL_CALL SwClipboardChangeListener::changedContents( const CLIP_NMSPC::Clip
}
}
-void SwClipboardChangeListener::AddRemoveListener( BOOL bAdd )
+void SwClipboardChangeListener::AddRemoveListener( sal_Bool bAdd )
{
pView->AddRemoveClipboardListener( Reference< XClipboardListener >( this ), bAdd );
}
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 5abe83c3a53d..39446bfb743d 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -290,7 +290,7 @@ void SwView::SelectShell()
rDispatcher.Flush(); // alle gecachten Shells wirklich loeschen
//Zur alten Selektion merken welche Toolbar sichtbar war
- USHORT nId = static_cast< USHORT >( rDispatcher.GetObjectBarId( SFX_OBJECTBAR_OBJECT ));
+ sal_uInt16 nId = static_cast< sal_uInt16 >( rDispatcher.GetObjectBarId( SFX_OBJECTBAR_OBJECT ));
if ( nId )
pBarCfg->SetTopToolbar( nSelectionType, nId );
@@ -316,7 +316,7 @@ void SwView::SelectShell()
}
}
- BOOL bInitFormShell = sal_False;
+ sal_Bool bInitFormShell = sal_False;
if (!pFormShell)
{
bInitFormShell = sal_True;
@@ -325,7 +325,7 @@ void SwView::SelectShell()
StartListening(*pFormShell);
}
- BOOL bSetExtInpCntxt = sal_False;
+ sal_Bool bSetExtInpCntxt = sal_False;
nSelectionType = nNewSelectionType;
ShellModes eShellMode;
@@ -543,7 +543,7 @@ IMPL_LINK( SwView, AttrChangedNotify, SwWrtShell *, EMPTYARG )
// actual cursor position is a post-it field
// SwRect aFldRect;
// SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD);
-// if( pWrtShell->GetContentAtPos( pWrtShell->GetCrsrDocPos(), aCntntAtPos, FALSE, &aFldRect ) )
+// if( pWrtShell->GetContentAtPos( pWrtShell->GetCrsrDocPos(), aCntntAtPos, sal_False, &aFldRect ) )
// {
// const SwField* pFld = aCntntAtPos.aFnd.pFld;
// if (pFld->Which()== RES_POSTITFLD)
@@ -583,8 +583,8 @@ IMPL_LINK( SwView, TimeoutHdl, Timer *, EMPTYARG )
_CheckReadonlyState();
_CheckReadonlySelection();
- BOOL bOldUndo = pWrtShell->DoesUndo();
- pWrtShell->DoUndo( FALSE );
+ sal_Bool bOldUndo = pWrtShell->DoesUndo();
+ pWrtShell->DoUndo( sal_False );
SelectShell();
pWrtShell->DoUndo( bOldUndo );
bAttrChgNotified = sal_False;
@@ -780,9 +780,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
nLastPasteDestination( 0xFFFF ),
nLeftBorderDistance( 0 ),
nRightBorderDistance( 0 ),
- bInMailMerge(FALSE),
- bInDtor(FALSE),
- bOldShellWasPagePreView(FALSE)
+ bInMailMerge(sal_False),
+ bInDtor(sal_False),
+ bOldShellWasPagePreView(sal_False)
{
// OD 18.12.2002 #103492# - According to discussion with MBA and further
// investigations, no old SfxViewShell will be set as parameter <pOldSh>,
@@ -800,8 +800,8 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
bShowAtResize = bDrawSelMode = bDocSzUpdated = sal_True;
- _CreateScrollbar( TRUE );
- _CreateScrollbar( FALSE );
+ _CreateScrollbar( sal_True );
+ _CreateScrollbar( sal_False );
pViewImpl = new SwView_Impl(this);
SetName(C2S("View"));
@@ -810,7 +810,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
aTimer.SetTimeout( 120 );
SwDocShell* pDocSh = PTR_CAST( SwDocShell, _pFrame->GetObjectShell() );
- BOOL bOldModifyFlag = pDocSh->IsEnableSetModified();
+ sal_Bool bOldModifyFlag = pDocSh->IsEnableSetModified();
if(bOldModifyFlag)
pDocSh->EnableSetModified( sal_False );
ASSERT( pDocSh, "View ohne DocShell." );
@@ -826,7 +826,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
aUsrPref.SetOnlineSpell( aLinguOpt.bIsSpellAuto );
- sal_Bool bOldShellWasSrcView = FALSE;
+ sal_Bool bOldShellWasSrcView = sal_False;
// OD 18.12.2002 #103492# - determine, if there is an existing view for
// document
@@ -849,11 +849,11 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
sSwViewData = ((SwPagePreView*)pExistingSh)->GetPrevSwViewData();
sNewCrsrPos = ((SwPagePreView*)pExistingSh)->GetNewCrsrPos();
nNewPage = ((SwPagePreView*)pExistingSh)->GetNewPage();
- bOldShellWasPagePreView = TRUE;
+ bOldShellWasPagePreView = sal_True;
}
else if( pExistingSh &&
pExistingSh->IsA( TYPE( SwSrcView ) ) )
- bOldShellWasSrcView = TRUE;
+ bOldShellWasSrcView = sal_True;
RTL_LOGFILE_CONTEXT_TRACE( aLog, "before create WrtShell" );
if(PTR_CAST( SwView, pExistingSh))
@@ -940,8 +940,8 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
aUsrPref.SetViewVRuler(sal_False);
}
- StartListening( *pViewFrame, TRUE );
- StartListening( *pDocSh, TRUE );
+ StartListening( *pViewFrame, sal_True );
+ StartListening( *pDocSh, sal_True );
// Vom HLineal den ZOOM-Faktor einstellen
Fraction aZoomFract( aUsrPref.GetZoom(), 100 );
@@ -975,10 +975,10 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
SetVisArea( pDocSh->GetVisArea(ASPECT_CONTENT),sal_False);
SwEditShell::SetUndoActionCount(
- static_cast< USHORT >( SW_MOD()->GetUndoOptions().GetUndoCount() ) );
+ static_cast< sal_uInt16 >( SW_MOD()->GetUndoOptions().GetUndoCount() ) );
pWrtShell->DoUndo( 0 != SwEditShell::GetUndoActionCount() );
- const BOOL bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
SetNewWindowAllowed(!bBrowse);
ShowVScrollbar(aUsrPref.IsViewVScrollBar());
@@ -1009,7 +1009,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
SfxRequest aSfxRequest( FN_UPDATE_TOX, SFX_CALLMODE_SLOT, GetPool() );
Execute( aSfxRequest );
pWrtShell->GetDoc()->SetUpdateTOX( sal_False ); // wieder zurueck setzen
- pWrtShell->SttEndDoc(TRUE);
+ pWrtShell->SttEndDoc(sal_True);
}
// kein ResetModified, wenn es schone eine View auf dieses Doc gibt
@@ -1082,7 +1082,7 @@ SwView::~SwView()
mpPostItMgr = 0;
// <--
- bInDtor = TRUE;
+ bInDtor = sal_True;
pEditWin->Hide(); // damit kein Paint Aerger machen kann!
// An der SwDocShell den Pointer auf die View ruecksetzen
SwDocShell* pDocSh = GetDocShell();
@@ -1276,7 +1276,7 @@ void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse )
Point aCrsrPos2( nXTmp, nYTmp );
bSelectObj = pWrtShell->IsObjSelectable( aCrsrPos2 );
- pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos2, FALSE );
+ pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos2, sal_False );
if( bSelectObj )
{
pWrtShell->SelectObj( aCrsrPos2 );
@@ -1287,7 +1287,7 @@ void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse )
}
else if(USHRT_MAX != nNewPage)
{
- pWrtShell->GotoPage(nNewPage, TRUE);
+ pWrtShell->GotoPage(nNewPage, sal_True);
nNewPage = USHRT_MAX;
}
@@ -1585,8 +1585,8 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe
void SwView::ShowCursor( FASTBOOL bOn )
{
//JP 10.10.2001: Bug 90461 - don't scroll the cursor into the visible area
- BOOL bUnlockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); //lock visible section
+ sal_Bool bUnlockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True ); //lock visible section
if( !bOn )
pWrtShell->HideCrsr();
@@ -1594,7 +1594,7 @@ void SwView::ShowCursor( FASTBOOL bOn )
pWrtShell->ShowCrsr();
if( bUnlockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
@@ -1666,7 +1666,7 @@ SwGlossaryHdl* SwView::GetGlosHdl()
void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- BOOL bCallBase = sal_True;
+ sal_Bool bCallBase = sal_True;
if ( rHint.ISA(SfxSimpleHint) )
{
sal_uInt32 nId = ((SfxSimpleHint&)rHint).GetId();
@@ -1834,9 +1834,9 @@ sal_uInt16 SwView::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
// status methods for clipboard.
// Status changes now notified from the clipboard.
-BOOL SwView::IsPasteAllowed()
+sal_Bool SwView::IsPasteAllowed()
{
- USHORT nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
+ sal_uInt16 nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
if( nLastPasteDestination != nPasteDestination )
{
TransferableDataHelper aDataHelper(
@@ -1849,7 +1849,7 @@ BOOL SwView::IsPasteAllowed()
*pWrtShell, aDataHelper );
}
else
- bPasteState = bPasteSpecialState = FALSE;
+ bPasteState = bPasteSpecialState = sal_False;
if( 0xFFFF == nLastPasteDestination ) // the init value
pViewImpl->AddClipboardListener();
@@ -1858,12 +1858,12 @@ BOOL SwView::IsPasteAllowed()
return bPasteState;
}
-BOOL SwView::IsPasteSpecialAllowed()
+sal_Bool SwView::IsPasteSpecialAllowed()
{
if ( pFormShell && pFormShell->IsActiveControl() )
- return FALSE;
+ return sal_False;
- USHORT nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
+ sal_uInt16 nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
if( nLastPasteDestination != nPasteDestination )
{
TransferableDataHelper aDataHelper(
@@ -1876,7 +1876,7 @@ BOOL SwView::IsPasteSpecialAllowed()
*pWrtShell, aDataHelper );
}
else
- bPasteState = bPasteSpecialState = FALSE;
+ bPasteState = bPasteSpecialState = sal_False;
if( 0xFFFF == nLastPasteDestination ) // the init value
pViewImpl->AddClipboardListener();
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index 84000c3ae049..3fdbe514aac9 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -205,7 +205,7 @@ void lcl_SetViewMarks(SwViewOption& rVOpt, sal_Bool bOn )
rVOpt.SetHardBlank(bOn);
rVOpt.SetSoftHyph(bOn);
SwViewOption::SetAppearanceFlag(
- VIEWOPT_FIELD_SHADINGS, bOn, TRUE);
+ VIEWOPT_FIELD_SHADINGS, bOn, sal_True);
}
void lcl_SetViewMetaChars( SwViewOption& rVOpt, sal_Bool bOn)
@@ -249,7 +249,7 @@ void SwView::StateViewOptions(SfxItemSet &rSet)
{
case FN_RULER:
{
- if(!pOpt->IsViewHRuler(TRUE) && !pOpt->IsViewVRuler(TRUE))
+ if(!pOpt->IsViewHRuler(sal_True) && !pOpt->IsViewVRuler(sal_True))
{
rSet.DisableItem(nWhich);
nWhich = 0;
@@ -351,7 +351,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
eState = bSet ? STATE_ON : STATE_OFF;
}
- BOOL bFlag = STATE_ON == eState;
+ sal_Bool bFlag = STATE_ON == eState;
uno::Reference< beans::XPropertySet > xLngProp( ::GetLinguPropertySet() );
switch ( nSlot )
@@ -366,13 +366,13 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
case FN_VIEW_FIELDS:
if( STATE_TOGGLE == eState )
bFlag = !SwViewOption::IsFieldShadings() ;
- SwViewOption::SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bFlag, TRUE );
+ SwViewOption::SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bFlag, sal_True );
break;
case FN_VIEW_BOUNDS:
if( STATE_TOGGLE == eState )
bFlag = !SwViewOption::IsDocBoundaries();
- SwViewOption::SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bFlag, TRUE );
+ SwViewOption::SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bFlag, sal_True );
break;
case SID_GRID_VISIBLE:
@@ -452,7 +452,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
case FN_VIEW_TABLEGRID:
if( STATE_TOGGLE == eState )
bFlag = !SwViewOption::IsTableBoundaries();
- SwViewOption::SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bFlag, TRUE );
+ SwViewOption::SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bFlag, sal_True );
break;
case FN_VIEW_FIELDNAME:
@@ -541,15 +541,15 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
if ( nSlot == SID_AUTOSPELL_CHECK )
GetPostItMgr()->SetSpellChecking();
- const BOOL bLockedView = rSh.IsViewLocked();
- rSh.LockView( TRUE ); //lock visible section
+ const sal_Bool bLockedView = rSh.IsViewLocked();
+ rSh.LockView( sal_True ); //lock visible section
GetWrtShell().EndAction();
rSh.LockView( bLockedView );
delete pOpt;
Invalidate(rReq.GetSlot());
if(!pArgs)
- rReq.AppendItem(SfxBoolItem(nSlot, (BOOL)bFlag));
+ rReq.AppendItem(SfxBoolItem(nSlot, (sal_Bool)bFlag));
rReq.Done();
}
diff --git a/sw/source/ui/uiview/view1.cxx b/sw/source/ui/uiview/view1.cxx
index 208a9c27ebdc..2f9bdcbe9a83 100644
--- a/sw/source/ui/uiview/view1.cxx
+++ b/sw/source/ui/uiview/view1.cxx
@@ -69,7 +69,7 @@ extern int bDocSzUpdated;
--------------------------------------------------------------------*/
-void SwView::Activate(BOOL bMDIActivate)
+void SwView::Activate(sal_Bool bMDIActivate)
{
// aktuelle View anmelden an der DocShell
// die View bleibt solange an der DocShell
@@ -91,23 +91,23 @@ void SwView::Activate(BOOL bMDIActivate)
pWrtShell->MakeSelVisible();
bMakeSelectionVisible = sal_False;
}
- pHRuler->SetActive( TRUE );
- pVRuler->SetActive( TRUE );
+ pHRuler->SetActive( sal_True );
+ pVRuler->SetActive( sal_True );
if ( bMDIActivate )
{
- pWrtShell->ShGetFcs(FALSE); // Selektionen sichtbar
+ pWrtShell->ShGetFcs(sal_False); // Selektionen sichtbar
if( sSwViewData.Len() )
{
- ReadUserData( sSwViewData, FALSE );
+ ReadUserData( sSwViewData, sal_False );
sSwViewData.Erase();
}
AttrChangedNotify(pWrtShell);
// Flddlg ggf neu initialisieren (z.B. fuer TYP_SETVAR)
- USHORT nId = SwFldDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = SwFldDlgWrapper::GetChildWindowId();
SfxViewFrame* pVFrame = GetViewFrame();
SwFldDlgWrapper *pWrp = (SwFldDlgWrapper*)pVFrame->GetChildWindow(nId);
if (pWrp)
@@ -144,9 +144,9 @@ void SwView::Activate(BOOL bMDIActivate)
--------------------------------------------------------------------*/
-void SwView::Deactivate(BOOL bMDIActivate)
+void SwView::Deactivate(sal_Bool bMDIActivate)
{
- extern BOOL bFlushCharBuffer ;
+ extern sal_Bool bFlushCharBuffer ;
// Befinden sich noch Zeichen im Input Buffer?
if( bFlushCharBuffer )
GetEditWin().FlushInBuffer();
@@ -155,8 +155,8 @@ void SwView::Deactivate(BOOL bMDIActivate)
{
pWrtShell->ShLooseFcs(); // Selektionen unsichtbar
- pHRuler->SetActive( FALSE );
- pVRuler->SetActive( FALSE );
+ pHRuler->SetActive( sal_False );
+ pVRuler->SetActive( sal_False );
}
SfxViewShell::Deactivate(bMDIActivate);
}
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index eeab95b5bccd..640a27532949 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -157,14 +157,14 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::ui::dialogs;
-static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, USHORT nWhichId )
+static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, sal_uInt16 nWhichId )
{
if (nWhichId == RES_CHRATR_LANGUAGE ||
nWhichId == RES_CHRATR_CJK_LANGUAGE ||
nWhichId == RES_CHRATR_CTL_LANGUAGE)
{
rWrtSh.StartAction();
- rWrtSh.LockView( TRUE );
+ rWrtSh.LockView( sal_True );
rWrtSh.Push();
// prepare to apply new language to all text in document
@@ -176,8 +176,8 @@ static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, USHORT nWhichId
aAttribs.Insert( nWhichId );
rWrtSh.ResetAttr( &aAttribs );
- rWrtSh.Pop( FALSE );
- rWrtSh.LockView( FALSE );
+ rWrtSh.Pop( sal_False );
+ rWrtSh.LockView( sal_False );
rWrtSh.EndAction();
}
}
@@ -186,7 +186,7 @@ static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, USHORT nWhichId
Beschreibung: String fuer die Seitenanzeige in der Statusbar basteln.
----------------------------------------------------------------------------*/
-String SwView::GetPageStr( USHORT nPg, USHORT nLogPg,
+String SwView::GetPageStr( sal_uInt16 nPg, sal_uInt16 nLogPg,
const String& rDisplay )
{
String aStr( aPageStr );
@@ -208,10 +208,10 @@ String SwView::GetPageStr( USHORT nPg, USHORT nLogPg,
int SwView::InsertGraphic( const String &rPath, const String &rFilter,
- BOOL bLink, GraphicFilter *pFlt,
- Graphic* pPreviewGrf, BOOL bRule )
+ sal_Bool bLink, GraphicFilter *pFlt,
+ Graphic* pPreviewGrf, sal_Bool bRule )
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
Graphic aGrf;
int nRes = GRFILTER_OK;
@@ -226,7 +226,7 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter,
if( GRFILTER_OK == nRes )
{
- SwFlyFrmAttrMgr aFrmMgr( TRUE, GetWrtShellPtr(), FRMMGR_TYPE_GRF );
+ SwFlyFrmAttrMgr aFrmMgr( sal_True, GetWrtShellPtr(), FRMMGR_TYPE_GRF );
SwWrtShell &rSh = GetWrtShell();
rSh.StartAction();
@@ -253,15 +253,15 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter,
}
-BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
+sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
{
#ifndef ENABLE_PROP_WITHOUTLINK
#define ENABLE_PROP_WITHOUTLINK 0x08
#endif
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
SwDocShell* pDocShell = GetDocShell();
- USHORT nHtmlMode = ::GetHtmlMode(pDocShell);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(pDocShell);
// im HTML-Mode nur verknuepft einfuegen
FileDialogHelper* pFileDlg = new FileDialogHelper( SFXWB_GRAPHIC | SFXWB_SHOWSTYLES );
pFileDlg->SetTitle(SW_RESSTR(STR_INSERT_GRAPHIC ));
@@ -278,8 +278,8 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
SvStringsSortDtor aFormats;
SwDoc* pDoc = pDocShell->GetDoc();
- const USHORT nArrLen = pDoc->GetFrmFmts()->Count();
- USHORT i;
+ const sal_uInt16 nArrLen = pDoc->GetFrmFmts()->Count();
+ sal_uInt16 i;
for( i = 0; i < nArrLen; i++ )
{
SwFrmFmt* pFmt = (*pDoc->GetFrmFmts())[ i ];
@@ -326,7 +326,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
}
SFX_REQUEST_ARG( rReq, pName, SfxStringItem, SID_INSERT_GRAPHIC , sal_False );
- BOOL bShowError = !pName;
+ sal_Bool bShowError = !pName;
if( pName || ERRCODE_NONE == pFileDlg->Execute() )
{
@@ -423,7 +423,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
if(!pFmt)
pFmt = pDoc->MakeFrmFmt(sGraphicFormat,
pDocShell->GetDoc()->GetDfltFrmFmt(),
- TRUE, FALSE);
+ sal_True, sal_False);
rSh.SetFrmFmt( pFmt );
}
@@ -464,7 +464,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
else
{
// set the specific graphic attrbutes to the graphic
- bReturn = TRUE;
+ bReturn = sal_True;
AutoCaption( GRAPHIC_CAP );
rReq.Done();
}
@@ -480,10 +480,10 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
void __EXPORT SwView::Execute(SfxRequest &rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- BOOL bIgnore = FALSE;
+ sal_Bool bIgnore = sal_False;
switch( nSlot )
{
case SID_CREATE_SW_DRAWVIEW:
@@ -529,7 +529,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case FN_REDLINE_ON:
{
if( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ))
+ SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ))
{
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword();
@@ -539,7 +539,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
// xmlsec05: new password dialog
Window* pParent;
const SfxPoolItem* pParentItem;
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, sal_False, &pParentItem ) )
pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr();
else
pParent = &GetViewFrame()->GetWindow();
@@ -558,8 +558,8 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
}
- USHORT nOn = ((const SfxBoolItem*)pItem)->GetValue() ? nsRedlineMode_t::REDLINE_ON : 0;
- USHORT nMode = pWrtShell->GetRedlineMode();
+ sal_uInt16 nOn = ((const SfxBoolItem*)pItem)->GetValue() ? nsRedlineMode_t::REDLINE_ON : 0;
+ sal_uInt16 nMode = pWrtShell->GetRedlineMode();
pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
}
}
@@ -568,7 +568,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
{
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword();
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem )
&& ((SfxBoolItem*)pItem)->GetValue() == ( aPasswd.getLength() != 0 ) )
break;
@@ -576,7 +576,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
// message box for wrong password
Window* pParent;
const SfxPoolItem* pParentItem;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, sal_False, &pParentItem ) )
pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr();
else
pParent = &GetViewFrame()->GetWindow();
@@ -586,7 +586,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
aPasswdDlg.ShowExtras(SHOWEXTRAS_CONFIRM);
if (aPasswdDlg.Execute())
{
- USHORT nOn = nsRedlineMode_t::REDLINE_ON;
+ sal_uInt16 nOn = nsRedlineMode_t::REDLINE_ON;
String sNewPasswd( aPasswdDlg.GetPassword() );
Sequence <sal_Int8> aNewPasswd =
pIDRA->GetRedlinePassword();
@@ -600,20 +600,20 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
pIDRA->SetRedlinePassword(Sequence <sal_Int8> ());
nOn = 0;
}
- USHORT nMode = pIDRA->GetRedlineMode();
+ sal_uInt16 nMode = pIDRA->GetRedlineMode();
pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
rReq.AppendItem( SfxBoolItem( FN_REDLINE_PROTECT, ((nMode&nsRedlineMode_t::REDLINE_ON)==0) ) );
}
else
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
break;
case FN_REDLINE_SHOW:
if( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem))
+ SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem))
{
- USHORT nMode = ( ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)
+ sal_uInt16 nMode = ( ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)
& pWrtShell->GetRedlineMode() ) | nsRedlineMode_t::REDLINE_SHOW_INSERT;
if( ((const SfxBoolItem*)pItem)->GetValue() )
nMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE;
@@ -632,8 +632,8 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
Point aCrsrPos = pWrtShell->GetCrsrDocPos( sal_True );
if( pWrtShell->GetContentAtPos( aCrsrPos, aCntntAtPos ) )
{
- USHORT nCount = pWrtShell->GetRedlineCount();
- for( USHORT nRedline = 0; nRedline < nCount; ++nRedline )
+ sal_uInt16 nCount = pWrtShell->GetRedlineCount();
+ for( sal_uInt16 nRedline = 0; nRedline < nCount; ++nRedline )
{
const SwRedline& rRedline = pWrtShell->GetRedline( nRedline );
if( *aCntntAtPos.aFnd.pRedl == rRedline )
@@ -652,20 +652,20 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case SID_DOCUMENT_MERGE:
{
String sFileName, sFilterName;
- INT16 nVersion = 0;
+ sal_Int16 nVersion = 0;
bool bHasFileName = false;
pViewImpl->SetParam( 0 );
if( pArgs )
{
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILE_NAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILE_NAME, sal_False, &pItem ))
sFileName = ((const SfxStringItem*)pItem)->GetValue();
bHasFileName = ( sFileName.Len() > 0 );
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILTER_NAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILTER_NAME, sal_False, &pItem ))
sFilterName = ((const SfxStringItem*)pItem)->GetValue();
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_VERSION, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_VERSION, sal_False, &pItem ))
{
nVersion = ((const SfxInt16Item *)pItem)->GetValue();
pViewImpl->SetParam( nVersion );
@@ -685,7 +685,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
pVFrame->ShowChildWindow(FN_REDLINE_ACCEPT);
// RedlineDlg neu initialisieren
- USHORT nId = SwRedlineAcceptChild::GetChildWindowId();
+ sal_uInt16 nId = SwRedlineAcceptChild::GetChildWindowId();
SwRedlineAcceptChild *pRed = (SwRedlineAcceptChild*)
pVFrame->GetChildWindow(nId);
if (pRed)
@@ -693,12 +693,12 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
}
else
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
break;
case FN_SYNC_LABELS:
case FN_MAILMERGE_CHILDWINDOW:
- GetViewFrame()->ShowChildWindow(nSlot, TRUE);
+ GetViewFrame()->ShowChildWindow(nSlot, sal_True);
break;
case FN_ESCAPE:
{
@@ -745,7 +745,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
else if ( GetEditWin().IsChainMode() )
{
- GetEditWin().SetChainMode( FALSE );
+ GetEditWin().SetChainMode( sal_False );
}
else if( pWrtShell->GetFlyFrmFmt() )
{
@@ -758,9 +758,9 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
else
{
- SfxBoolItem aItem( SID_WIN_FULLSCREEN, FALSE );
+ SfxBoolItem aItem( SID_WIN_FULLSCREEN, sal_False );
GetViewFrame()->GetDispatcher()->Execute( SID_WIN_FULLSCREEN, SFX_CALLMODE_RECORD, &aItem, 0L );
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
}
break;
@@ -780,7 +780,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
{
if(pArgs)
{
- const USHORT nCurIdx = pWrtShell->GetCurPageDesc();
+ const sal_uInt16 nCurIdx = pWrtShell->GetCurPageDesc();
SwPageDesc aPageDesc( pWrtShell->GetPageDesc( nCurIdx ) );
::ItemSetToPageDesc( *pArgs, aPageDesc );
// Den Descriptor der Core veraendern.
@@ -824,12 +824,12 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
{
pWrtShell->StartAction();
pWrtShell->EnterStdMode();
- BOOL bOldCrsrInReadOnly = pWrtShell->IsReadOnlyAvailable();
- pWrtShell->SetReadOnlyAvailable( TRUE );
+ sal_Bool bOldCrsrInReadOnly = pWrtShell->IsReadOnlyAvailable();
+ pWrtShell->SetReadOnlyAvailable( sal_True );
- for( USHORT i = 0; i < 2; ++i )
+ for( sal_uInt16 i = 0; i < 2; ++i )
{
- USHORT nCount = pWrtShell->GetTOXCount();
+ sal_uInt16 nCount = pWrtShell->GetTOXCount();
if( 1 == nCount )
++i;
@@ -845,13 +845,13 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
pBase = pWrtShell->GetCurTOX();
}
- BOOL bAutoMarkApplied = FALSE;
+ sal_Bool bAutoMarkApplied = sal_False;
while( pBase )
{
if(TOX_INDEX == pBase->GetType() && !bAutoMarkApplied)
{
pWrtShell->ApplyAutoMark();
- bAutoMarkApplied = TRUE;
+ bAutoMarkApplied = sal_True;
}
// JP 15.07.96: das pBase wird nur fuer die Schnittstelle
// benoetigt. Muss mal umgetstellt werden!!!
@@ -869,9 +869,9 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
break;
case SID_ATTR_BRUSH:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_BACKGROUND, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_BACKGROUND, sal_False, &pItem))
{
- const USHORT nCurIdx = pWrtShell->GetCurPageDesc();
+ const sal_uInt16 nCurIdx = pWrtShell->GetCurPageDesc();
SwPageDesc aDesc( pWrtShell->GetPageDesc( nCurIdx ));
SwFrmFmt& rMaster = aDesc.GetMaster();
rMaster.SetFmtAttr(*pItem);
@@ -892,14 +892,14 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case FN_INSERT_CTRL:
case FN_INSERT_OBJ_CTRL:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem))
{
- USHORT nValue = ((SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nValue = ((SfxUInt16Item*)pItem)->GetValue();
switch ( nSlot )
{
case FN_INSERT_CTRL:
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
if(bWeb)
SwView::nWebInsertCtrlState = nValue;
else
@@ -922,17 +922,17 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case SID_ATTR_DEFTABSTOP:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem))
{
SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
- USHORT nTab = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nTab = ((const SfxUInt16Item*)pItem)->GetValue();
MakeDefTabs( nTab, aDefTabs );
pWrtShell->SetDefault( aDefTabs );
}
}
break;
case SID_ATTR_LANGUAGE :
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_LANGUAGE, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_LANGUAGE, sal_False, &pItem))
{
SvxLanguageItem aLang(((SvxLanguageItem*)pItem)->GetLanguage(), RES_CHRATR_LANGUAGE);
pWrtShell->SetDefault( aLang );
@@ -940,21 +940,21 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
break;
case SID_ATTR_CHAR_CTL_LANGUAGE:
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CTL_LANGUAGE, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CTL_LANGUAGE, sal_False, &pItem))
{
pWrtShell->SetDefault( *pItem );
lcl_SetAllTextToDefaultLanguage( *pWrtShell, RES_CHRATR_CTL_LANGUAGE );
}
break;
case SID_ATTR_CHAR_CJK_LANGUAGE:
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CJK_LANGUAGE, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CJK_LANGUAGE, sal_False, &pItem))
{
pWrtShell->SetDefault( *pItem );
lcl_SetAllTextToDefaultLanguage( *pWrtShell, RES_CHRATR_CJK_LANGUAGE );
}
break;
case FN_SCROLL_NEXT_PREV:
- if(pArgs && pArgs->GetItemState(FN_SCROLL_NEXT_PREV, FALSE, &pItem))
+ if(pArgs && pArgs->GetItemState(FN_SCROLL_NEXT_PREV, sal_False, &pItem))
{
// call the handlers of PageUp/DownButtons, only
bool* pbNext = new bool ( ((const SfxBoolItem*)pItem)->GetValue() );
@@ -963,7 +963,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
break;
case SID_JUMPTOMARK:
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, FALSE, &pItem))
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, sal_False, &pItem))
JumpToSwMark( (( const SfxStringItem*)pItem)->GetValue() );
break;
case SID_GALLERY :
@@ -979,15 +979,15 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
if(pVFrame->HasChildWindow(SID_BROWSER))
{
const SwDBData& rData = GetWrtShell().GetDBDesc();
- SW_MOD()->ShowDBObj(*this, rData, FALSE);
+ SW_MOD()->ShowDBObj(*this, rData, sal_False);
}
}
break;
case FN_INSERT_FIELD_DATA_ONLY :
{
- BOOL bShow = FALSE;
+ sal_Bool bShow = sal_False;
if( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ))
+ SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ))
bShow = ((const SfxBoolItem*)pItem)->GetValue();
//GetViewFrame()->ShowChildWindow(nSlot, bShow && bInMailMerge);
if((bShow && bInMailMerge) != GetViewFrame()->HasChildWindow(nSlot))
@@ -1015,7 +1015,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
pValues[0].Value <<= aData.sDataSource;
pValues[1].Value <<= aData.sCommand;
pValues[2].Value <<= aData.nCommandType;
- pNewDBMgr->ExecuteFormLetter(rSh, aProperties, TRUE);
+ pNewDBMgr->ExecuteFormLetter(rSh, aProperties, sal_True);
}
}
bInMailMerge &= bShow;
@@ -1024,8 +1024,8 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
break;
case FN_QRY_MERGE:
{
- BOOL bUseCurrentDocument = TRUE;
- BOOL bQuery = !pArgs||SFX_ITEM_SET != pArgs->GetItemState(nSlot);
+ sal_Bool bUseCurrentDocument = sal_True;
+ sal_Bool bQuery = !pArgs||SFX_ITEM_SET != pArgs->GetItemState(nSlot);
if(bQuery)
{
SfxViewFrame* pTmpFrame = GetViewFrame();
@@ -1086,7 +1086,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case SID_ALIGN_ANY_HDEFAULT :
case SID_ALIGN_ANY_VDEFAULT :
{
- USHORT nAlias = 0;
+ sal_uInt16 nAlias = 0;
if( nSelectionType & (nsSelectionType::SEL_DRW_TXT|nsSelectionType::SEL_TXT) )
{
switch( nSlot )
@@ -1160,7 +1160,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
Beschreibung: SeitenNr-Feld invalidieren
--------------------------------------------------------------------*/
-void SwView::UpdatePageNums(USHORT nPhyNum, USHORT nVirtNum, const String& rPgStr)
+void SwView::UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr)
{
String sTemp(GetPageStr( nPhyNum, nVirtNum, rPgStr ));
const SfxStringItem aTmp( FN_STAT_PAGE, sTemp );
@@ -1179,7 +1179,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
SwWrtShell& rShell = GetWrtShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
ASSERT( nWhich, "leeres Set");
while( nWhich )
@@ -1200,24 +1200,24 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
else
*/ {
// Anzahl der Seiten, log. SeitenNr. SeitenNr ermitteln
- USHORT nPage, nLogPage;
+ sal_uInt16 nPage, nLogPage;
String sDisplay;
rShell.GetPageNumber( -1, rShell.IsCrsrVisible(), nPage, nLogPage, sDisplay );
rSet.Put( SfxStringItem( FN_STAT_PAGE,
GetPageStr( nPage, nLogPage, sDisplay) ));
- USHORT nCnt = GetWrtShell().GetPageCnt();
+ sal_uInt16 nCnt = GetWrtShell().GetPageCnt();
if (nPageCnt != nCnt) // Basic benachrichtigen
{
nPageCnt = nCnt;
- SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_PAGE_COUNT, SwDocShell::GetEventName(STR_SW_EVENT_PAGE_COUNT), GetViewFrame()->GetObjectShell()), FALSE);
+ SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_PAGE_COUNT, SwDocShell::GetEventName(STR_SW_EVENT_PAGE_COUNT), GetViewFrame()->GetObjectShell()), sal_False);
}
}
break;
case FN_STAT_TEMPLATE:
{
rSet.Put(SfxStringItem( FN_STAT_TEMPLATE,
- rShell.GetCurPageStyle(FALSE)));
+ rShell.GetCurPageStyle(sal_False)));
}
break;
@@ -1248,7 +1248,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SwViewOption* pVOpt = rShell.GetViewOptions();
- const USHORT nColumns = pVOpt->GetViewLayoutColumns();
+ const sal_uInt16 nColumns = pVOpt->GetViewLayoutColumns();
const bool bBookMode = pVOpt->IsViewLayoutBookMode();
SvxViewLayoutItem aViewLayout(nColumns, bBookMode);
rSet.Put( aViewLayout );
@@ -1262,13 +1262,13 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SwViewOption* pVOpt = rShell.GetViewOptions();
- const USHORT nCurrentZoom = pVOpt->GetZoom();
+ const sal_uInt16 nCurrentZoom = pVOpt->GetZoom();
SvxZoomSliderItem aZoomSliderItem( nCurrentZoom, MINZOOM, MAXZOOM );
aZoomSliderItem.AddSnappingPoint( 100 );
if ( !pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
{
- const USHORT nColumns = pVOpt->GetViewLayoutColumns();
+ const sal_uInt16 nColumns = pVOpt->GetViewLayoutColumns();
const bool bAutomaticViewLayout = 0 == nColumns;
const SwPostItMgr* pMgr = GetPostItMgr();
@@ -1386,7 +1386,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
//const SwNumRule* pNumRule = rShell.GetCurNumRule();
//if (pNumRule) // Cursor in Numerierung
//{
- // BYTE nNumLevel = rShell.GetNumLevel();
+ // sal_uInt8 nNumLevel = rShell.GetNumLevel();
// if( IsShowNum(nNumLevel) && MAXLEVEL >
// ( nNumLevel = GetRealLevel( nNumLevel )) )
// {
@@ -1401,7 +1401,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
// rShell.GetCurAttr(aSet);
// /* const SfxPoolItem* pItem; */
// if(SFX_ITEM_AVAILABLE <=
- // aSet.GetItemState(RES_PARATR_NUMRULE, TRUE
+ // aSet.GetItemState(RES_PARATR_NUMRULE, sal_True
// /*, &pItem */ ))
// {
// const String& rNumStyle =
@@ -1427,7 +1427,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if (pNumRule && !bOutlineNum ) // Cursor in Numerierung
{
- BYTE nNumLevel = rShell.GetNumLevel();
+ sal_uInt8 nNumLevel = rShell.GetNumLevel();
// --> OD 2008-04-02 #refactorlists#
// if( IsShowNum(nNumLevel) && MAXLEVEL >
// ( nNumLevel = GetRealLevel( nNumLevel )) )
@@ -1441,7 +1441,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
rShell.GetCurAttr(aSet);
/* const SfxPoolItem* pItem; */
if(SFX_ITEM_AVAILABLE <=
- aSet.GetItemState(RES_PARATR_NUMRULE, TRUE
+ aSet.GetItemState(RES_PARATR_NUMRULE, sal_True
/*, &pItem */ ))
{
const String& rNumStyle =
@@ -1527,8 +1527,8 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
SwWrtShell &rSh = GetWrtShell();
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem=NULL;
- BOOL bUp = FALSE;
- USHORT nWhich = rReq.GetSlot();
+ sal_Bool bUp = sal_False;
+ sal_uInt16 nWhich = rReq.GetSlot();
switch( nWhich )
{
case FN_STAT_PAGE:
@@ -1541,7 +1541,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
case FN_STAT_BOOKMARK:
if ( pArgs )
{
- if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, TRUE, &pItem))
+ if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, sal_True, &pItem))
{
const IDocumentMarkAccess* pMarkAccess = rSh.getIDocumentMarkAccess();
const sal_Int32 nIdx = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
@@ -1613,19 +1613,19 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
// PAGES01
const SfxPoolItem* pViewLayoutItem = 0;
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, TRUE, &pViewLayoutItem))
+ if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, sal_True, &pViewLayoutItem))
{
- const USHORT nColumns = ((const SvxViewLayoutItem *)pViewLayoutItem)->GetValue();
+ const sal_uInt16 nColumns = ((const SvxViewLayoutItem *)pViewLayoutItem)->GetValue();
const bool bBookMode = ((const SvxViewLayoutItem *)pViewLayoutItem)->IsBookMode();
SetViewLayout( nColumns, bBookMode );
}
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_ZOOM, TRUE, &pItem))
+ if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_ZOOM, sal_True, &pItem))
{
enum SvxZoomType eType = ((const SvxZoomItem *)pItem)->GetType();
SetZoom( eType, ((const SvxZoomItem *)pItem)->GetValue() );
}
- bUp = TRUE;
+ bUp = sal_True;
if ( pItem )
rReq.AppendItem( *pItem );
rReq.Done();
@@ -1641,9 +1641,9 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) )
{
// PAGES01
- if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, TRUE, &pItem ))
+ if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, sal_True, &pItem ))
{
- const USHORT nColumns = ((const SvxViewLayoutItem *)pItem)->GetValue();
+ const sal_uInt16 nColumns = ((const SvxViewLayoutItem *)pItem)->GetValue();
const bool bBookMode = (0 == nColumns || 0 != (nColumns % 2)) ?
false :
((const SvxViewLayoutItem *)pItem)->IsBookMode();
@@ -1651,7 +1651,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
SetViewLayout( nColumns, bBookMode );
}
- bUp = TRUE;
+ bUp = sal_True;
rReq.Done();
InvalidateRulerPos();
@@ -1664,13 +1664,13 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
if ( pArgs && ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) )
{
// PAGES01
- if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, TRUE, &pItem ))
+ if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, sal_True, &pItem ))
{
- const USHORT nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
+ const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom );
}
- bUp = TRUE;
+ bUp = sal_True;
rReq.Done();
}
}
@@ -1678,7 +1678,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
case SID_ATTR_SIZE:
{
- ULONG nId = FN_INSERT_FIELD;
+ sal_uLong nId = FN_INSERT_FIELD;
if( rSh.IsCrsrInTbl() )
nId = FN_FORMAT_TABLE_DLG;
else if( rSh.GetCurTOX() )
@@ -1705,7 +1705,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
if( nId )
GetViewFrame()->GetDispatcher()->Execute(
- static_cast< USHORT >( nId ), SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
+ static_cast< sal_uInt16 >( nId ), SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
}
break;
@@ -1713,7 +1713,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
if ( pArgs )
{
- if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, TRUE, &pItem))
+ if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, sal_True, &pItem))
{
switch ( ((const SfxUInt16Item *)pItem)->GetValue() )
{
@@ -1742,23 +1742,23 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
else
rSh.ToggleBlockMode();
}
- bUp = TRUE;
+ bUp = sal_True;
break;
}
case FN_SET_ADD_MODE:
rSh.ToggleAddMode();
nWhich = FN_STAT_SELMODE;
- bUp = TRUE;
+ bUp = sal_True;
break;
case FN_SET_BLOCK_MODE:
rSh.ToggleBlockMode();
nWhich = FN_STAT_SELMODE;
- bUp = TRUE;
+ bUp = sal_True;
break;
case FN_SET_EXT_MODE:
rSh.ToggleExtMode();
nWhich = FN_STAT_SELMODE;
- bUp = TRUE;
+ bUp = sal_True;
break;
case SID_ATTR_INSERT:
SwPostItMgr* pMgr = GetPostItMgr();
@@ -1768,7 +1768,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
else
rSh.ToggleInsMode();
- bUp = TRUE;
+ bUp = sal_True;
break;
}
@@ -1780,11 +1780,11 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
}
-void SwView::InsFrmMode(USHORT nCols)
+void SwView::InsFrmMode(sal_uInt16 nCols)
{
if ( pWrtShell->HasWholeTabSelection() )
{
- SwFlyFrmAttrMgr aMgr( TRUE, pWrtShell, FRMMGR_TYPE_TEXT );
+ SwFlyFrmAttrMgr aMgr( sal_True, pWrtShell, FRMMGR_TYPE_TEXT );
const SwFrmFmt &rPageFmt =
pWrtShell->GetPageDesc(pWrtShell->GetCurPageDesc()).GetMaster();
@@ -1810,7 +1810,7 @@ void SwView::InsFrmMode(USHORT nCols)
void SwView::EditLinkDlg()
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( &GetViewFrame()->GetWindow(), &GetWrtShell().GetLinkManager(), bWeb );
if ( pDlg )
@@ -1827,22 +1827,22 @@ void SwView::EditLinkDlg()
*/
}
-BOOL SwView::JumpToSwMark( const String& rMark )
+sal_Bool SwView::JumpToSwMark( const String& rMark )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rMark.Len() )
{
// wir wollen den Bookmark aber am oberen Rand haben
- BOOL bSaveCC = IsCrsrAtCenter();
- BOOL bSaveCT = IsCrsrAtTop();
- SetCrsrAtTop( TRUE );
+ sal_Bool bSaveCC = IsCrsrAtCenter();
+ sal_Bool bSaveCT = IsCrsrAtTop();
+ SetCrsrAtTop( sal_True );
//JP 27.04.98: Bug 49786
// Damit in FrameSet auch gescrollt werden kann, muss die
// entsprechende Shell auch das Focus-Flag gesetzt haben!
- BOOL bHasShFocus = pWrtShell->HasShFcs();
+ sal_Bool bHasShFocus = pWrtShell->HasShFcs();
if( !bHasShFocus )
- pWrtShell->ShGetFcs( FALSE );
+ pWrtShell->ShGetFcs( sal_False );
const SwFmtINetFmt* pINet;
String sCmp, sMark( INetURLObject::decode( rMark, INET_HEX_ESCAPE,
@@ -1898,22 +1898,22 @@ BOOL SwView::JumpToSwMark( const String& rMark )
TransliterationModules_IGNORE_CASE );
//todo/mba: assuming that notes shouldn't be searched
- BOOL bSearchInNotes = FALSE;
+ sal_Bool bSearchInNotes = sal_False;
if( pWrtShell->SearchPattern( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END ))
{
pWrtShell->EnterStdMode(); // Selektion wieder aufheben
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if( pMarkAccess->getMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)) )
- pWrtShell->GotoMark( ppMark->get(), FALSE, TRUE ), bRet = TRUE;
+ pWrtShell->GotoMark( ppMark->get(), sal_False, sal_True ), bRet = sal_True;
else if( 0 != ( pINet = pWrtShell->FindINetAttr( sMark ) ))
bRet = pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() );
// fuer alle Arten von Flys
if( FLYCNTTYPE_ALL != eFlyType && pWrtShell->GotoFly( sName, eFlyType ))
{
- bRet = TRUE;
+ bRet = sal_True;
if( FLYCNTTYPE_FRM == eFlyType )
{
// TextFrames: Cursor in den Frame setzen
@@ -1928,7 +1928,7 @@ BOOL SwView::JumpToSwMark( const String& rMark )
}
}
else if( pMarkAccess->getMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)))
- pWrtShell->GotoMark( ppMark->get(), FALSE, TRUE ), bRet = TRUE;
+ pWrtShell->GotoMark( ppMark->get(), sal_False, sal_True ), bRet = sal_True;
else if( 0 != ( pINet = pWrtShell->FindINetAttr( sMark ) ))
bRet = pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() );
@@ -1959,9 +1959,9 @@ sal_uInt16 lcl_PageDescWithHeader( const SwDoc& rDoc )
const SwPageDesc& rPageDesc = rDoc.GetPageDesc( i );
const SwFrmFmt& rMaster = rPageDesc.GetMaster();
const SfxPoolItem* pItem;
- if( ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem ) &&
+ if( ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem ) &&
((SwFmtHeader*)pItem)->IsActive() ) ||
- ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem ) &&
+ ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem ) &&
((SwFmtFooter*)pItem)->IsActive()) )
++nRet;
}
@@ -1976,7 +1976,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
{
pViewImpl->InitRequest( rRequest );
pViewImpl->SetParam( pItem ? 1 : 0 );
- USHORT nSlot = rRequest.GetSlot();
+ sal_uInt16 nSlot = rRequest.GetSlot();
if ( !pItem )
{
@@ -1987,7 +1987,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
{
String sFile, sFilter;
sFile = ( (const SfxStringItem *)pItem )->GetValue();
- if ( SFX_ITEM_SET == rRequest.GetArgs()->GetItemState( FN_PARAM_1, TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rRequest.GetArgs()->GetItemState( FN_PARAM_1, sal_True, &pItem ) )
sFilter = ( (const SfxStringItem *)pItem )->GetValue();
bool bHasFileName = ( sFile.Len() > 0 );
@@ -2001,7 +2001,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
}
}
-long SwView::InsertDoc( USHORT nSlotId, const String& rFileName, const String& rFilterName, INT16 nVersion )
+long SwView::InsertDoc( sal_uInt16 nSlotId, const String& rFileName, const String& rFilterName, sal_Int16 nVersion )
{
SfxMedium* pMed = 0;
SwDocShell* pDocSh = GetDocShell();
@@ -2012,17 +2012,17 @@ long SwView::InsertDoc( USHORT nSlotId, const String& rFileName, const String& r
const SfxFilter* pFilter = rFact.GetFilterContainer()->GetFilter4FilterName( rFilterName );
if ( !pFilter )
{
- pMed = new SfxMedium(rFileName, STREAM_READ, TRUE, 0, 0 );
+ pMed = new SfxMedium(rFileName, STREAM_READ, sal_True, 0, 0 );
SfxFilterMatcher aMatcher( rFact.GetFilterContainer()->GetName() );
- pMed->UseInteractionHandler( TRUE );
- ErrCode nErr = aMatcher.GuessFilter( *pMed, &pFilter, FALSE );
+ pMed->UseInteractionHandler( sal_True );
+ ErrCode nErr = aMatcher.GuessFilter( *pMed, &pFilter, sal_False );
if ( nErr )
DELETEZ(pMed);
else
pMed->SetFilter( pFilter );
}
else
- pMed = new SfxMedium(rFileName, STREAM_READ, TRUE, pFilter, 0);
+ pMed = new SfxMedium(rFileName, STREAM_READ, sal_True, pFilter, 0);
}
else
{
@@ -2037,21 +2037,21 @@ long SwView::InsertDoc( USHORT nSlotId, const String& rFileName, const String& r
return InsertMedium( nSlotId, pMed, nVersion );
}
-long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
+long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion )
{
- BOOL bInsert = FALSE, bCompare = FALSE, bMerge = FALSE;
+ sal_Bool bInsert = sal_False, bCompare = sal_False, bMerge = sal_False;
long nFound = 0;
SwDocShell* pDocSh = GetDocShell();
switch( nSlotId )
{
- case SID_DOCUMENT_MERGE: bMerge = TRUE; break;
- case SID_DOCUMENT_COMPARE: bCompare = TRUE; break;
- case SID_INSERTDOC: bInsert = TRUE; break;
+ case SID_DOCUMENT_MERGE: bMerge = sal_True; break;
+ case SID_DOCUMENT_COMPARE: bCompare = sal_True; break;
+ case SID_INSERTDOC: bInsert = sal_True; break;
default:
ASSERT( !this, "Unbekannte SlotId!" );
- bInsert = TRUE;
+ bInsert = sal_True;
nSlotId = SID_INSERTDOC;
break;
}
@@ -2091,10 +2091,10 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
SwDoc *pDoc = pDocSh->GetDoc();
if( pRead && pDocSh->GetDoc() )
nUndoCheck = lcl_PageDescWithHeader( *pDoc );
- ULONG nErrno;
+ sal_uLong nErrno;
{ //Scope for SwWait-Object, to be able to execute slots
//outside this scope.
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
if ( pWrtShell->HasSelection() )
pWrtShell->DelRight(); // Selektionen loeschen
@@ -2118,7 +2118,7 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
{
SfxRequest aReq( FN_UPDATE_TOX, SFX_CALLMODE_SLOT, GetPool() );
Execute( aReq );
- pWrtShell->SetUpdateTOX( FALSE ); // wieder zurueck setzen
+ pWrtShell->SetUpdateTOX( sal_False ); // wieder zurueck setzen
}
if( pDoc )
@@ -2145,7 +2145,7 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
const String& rFileName, const String& rPasswd,
- String& rFilter, INT16 nVersion,
+ String& rFilter, sal_Int16 nVersion,
SwDocShell* pDestSh );
String sFltNm;
@@ -2153,7 +2153,7 @@ extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
sFltNm, nVersion, pDocSh );
if( nRet )
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
pWrtShell->EnterStdMode(); // Selektionen loeschen
@@ -2181,7 +2181,7 @@ extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
/* -----------------05.02.2003 12:06-----------------
*
* --------------------------------------------------*/
-void SwView::EnableMailMerge(BOOL bEnable )
+void SwView::EnableMailMerge(sal_Bool bEnable )
{
bInMailMerge = bEnable;
SfxBindings& rBind = GetViewFrame()->GetBindings();
@@ -2257,7 +2257,7 @@ class SwMergeSourceWarningBox_Impl : public ModalDialog
-void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
+void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument)
{
if(bUseCurrentDocument)
{
@@ -2274,7 +2274,7 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
}
if(!xDBContext.is())
return ;
- BOOL bCallAddressPilot = FALSE;
+ sal_Bool bCallAddressPilot = sal_False;
if ( lcl_NeedAdditionalDataSource( xDBContext ) )
{
// no data sources are available - create a new one
@@ -2284,7 +2284,7 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
// no cancel allowed
if ( RET_OK != aWarning.Execute() )
return;
- bCallAddressPilot = TRUE;
+ bCallAddressPilot = sal_True;
}
else
{
@@ -2314,12 +2314,12 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
//call insert fields with database field page available, only
SfxViewFrame* pVFrame = GetViewFrame();
//at first hide the default field dialog if currently visible
- pVFrame->SetChildWindow(FN_INSERT_FIELD, FALSE);
+ pVFrame->SetChildWindow(FN_INSERT_FIELD, sal_False);
//enable the status of the db field dialog - it is disabled in the status method
//to prevent creation of the dialog without mail merge active
EnableMailMerge();
//then show the "Data base only" field dialog
- SfxBoolItem aOn(FN_INSERT_FIELD_DATA_ONLY, TRUE);
+ SfxBoolItem aOn(FN_INSERT_FIELD_DATA_ONLY, sal_True);
pVFrame->GetDispatcher()->Execute(FN_INSERT_FIELD_DATA_ONLY,
SFX_CALLMODE_SYNCHRON, &aOn, 0L);
return;
@@ -2367,7 +2367,7 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
pValues[0].Value <<= aData.sDataSource;
pValues[1].Value <<= aData.sCommand;
pValues[2].Value <<= aData.nCommandType;
- pNewDBMgr->ExecuteFormLetter(GetWrtShell(), aProperties, TRUE);
+ pNewDBMgr->ExecuteFormLetter(GetWrtShell(), aProperties, sal_True);
}
}
else
@@ -2407,7 +2407,7 @@ IMPL_LINK( SwView, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
SfxMedium* pMed = pViewImpl->CreateMedium();
if ( pMed )
{
- USHORT nSlot = pViewImpl->GetRequest()->GetSlot();
+ sal_uInt16 nSlot = pViewImpl->GetRequest()->GetSlot();
long nFound = InsertMedium( nSlot, pMed, pViewImpl->GetParam() );
if ( SID_INSERTDOC == nSlot )
@@ -2433,7 +2433,7 @@ IMPL_LINK( SwView, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
pVFrame->ShowChildWindow(FN_REDLINE_ACCEPT);
// RedlineDlg neu initialisieren
- USHORT nId = SwRedlineAcceptChild::GetChildWindowId();
+ sal_uInt16 nId = SwRedlineAcceptChild::GetChildWindowId();
SwRedlineAcceptChild* pRed = (SwRedlineAcceptChild*)pVFrame->GetChildWindow( nId );
if ( pRed )
pRed->ReInitDlg( GetDocShell() );
diff --git a/sw/source/ui/uiview/viewcoll.cxx b/sw/source/ui/uiview/viewcoll.cxx
index e5f9350277ee..853c5639348d 100644
--- a/sw/source/ui/uiview/viewcoll.cxx
+++ b/sw/source/ui/uiview/viewcoll.cxx
@@ -50,7 +50,7 @@ void SwView::ExecColl(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- USHORT nWhich = rReq.GetSlot();
+ sal_uInt16 nWhich = rReq.GetSlot();
switch( nWhich )
{
case FN_SET_PAGE:
@@ -63,10 +63,10 @@ void SwView::ExecColl(SfxRequest &rReq)
if( pArgs )
{
if (pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState( nWhich , TRUE, &pItem ))
+ SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_True, &pItem ))
{
if( ((SfxStringItem*)pItem)->GetValue() !=
- GetWrtShell().GetCurPageStyle(FALSE) )
+ GetWrtShell().GetCurPageStyle(sal_False) )
{
SfxStringItem aName(SID_STYLE_APPLY,
((SfxStringItem*)pItem)->GetValue());
@@ -89,7 +89,7 @@ void SwView::ExecColl(SfxRequest &rReq)
}
break;
default:
- ASSERT(FALSE, falscher CommandProcessor fuer Dispatch);
+ ASSERT(sal_False, falscher CommandProcessor fuer Dispatch);
return;
}
}
diff --git a/sw/source/ui/uiview/viewdlg.cxx b/sw/source/ui/uiview/viewdlg.cxx
index 8c19c454b6ac..fa045a740b40 100644
--- a/sw/source/ui/uiview/viewdlg.cxx
+++ b/sw/source/ui/uiview/viewdlg.cxx
@@ -55,9 +55,9 @@ void SwView::ExecDlg(SfxRequest &rReq)
const SfxPoolItem* pItem = 0;
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState( GetPool().GetWhich(nSlot), FALSE, &pItem );
+ pArgs->GetItemState( GetPool().GetWhich(nSlot), sal_False, &pItem );
switch ( nSlot )
{
@@ -65,11 +65,11 @@ void SwView::ExecDlg(SfxRequest &rReq)
{
if ( pItem )
{
- USHORT nValue = ((SfxUInt16Item *)pItem)->GetValue();
- USHORT nOldValue = pWrtShell->GetPageOffset();
- USHORT nPage, nLogPage;
+ sal_uInt16 nValue = ((SfxUInt16Item *)pItem)->GetValue();
+ sal_uInt16 nOldValue = pWrtShell->GetPageOffset();
+ sal_uInt16 nPage, nLogPage;
pWrtShell->GetPageNum( nPage, nLogPage,
- pWrtShell->IsCrsrVisible(), FALSE);
+ pWrtShell->IsCrsrVisible(), sal_False);
if(nValue != nOldValue || nValue != nLogPage)
{
diff --git a/sw/source/ui/uiview/viewdlg2.cxx b/sw/source/ui/uiview/viewdlg2.cxx
index a6a64078840d..6a867b7e28a7 100644
--- a/sw/source/ui/uiview/viewdlg2.cxx
+++ b/sw/source/ui/uiview/viewdlg2.cxx
@@ -89,7 +89,7 @@ void SwView::ExecDlgExt(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE,
- pMDI, *pWrtShell, TRUE );
+ pMDI, *pWrtShell, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
pDlg->SetHelpId(GetStaticInterface()->GetSlot(FN_EDIT_FOOTNOTE)->GetCommand());
@@ -105,15 +105,15 @@ void SwView::ExecDlgExt(SfxRequest &rReq)
*
* --------------------------------------------------*/
-void SwView::AutoCaption(const USHORT nType, const SvGlobalName *pOleId)
+void SwView::AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId)
{
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
if (pModOpt->IsInsWithCaption(bWeb))
{
const InsCaptionOpt *pOpt = pModOpt->GetCapOption(bWeb, (SwCapObjType)nType, pOleId);
- if (pOpt && pOpt->UseCaption() == TRUE)
+ if (pOpt && pOpt->UseCaption() == sal_True)
InsertCaption(pOpt);
}
}
@@ -133,7 +133,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
SwWrtShell &rSh = GetWrtShell();
if(rName.Len())
{
- USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
+ sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
if( USHRT_MAX != nPoolId )
rSh.GetTxtCollFromPool(nPoolId);
// Pool-Vorlage existiert nicht: Existiert sie am Dokument?
@@ -172,16 +172,16 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
if (pFldType)
{
pFldType->SetDelimiter(pOpt->GetSeparator());
- pFldType->SetOutlineLvl( static_cast< BYTE >(pOpt->GetLevel()) );
+ pFldType->SetOutlineLvl( static_cast< sal_uInt8 >(pOpt->GetLevel()) );
}
}
- USHORT nID = USHRT_MAX;
+ sal_uInt16 nID = USHRT_MAX;
SwFieldType* pType = 0;
- const USHORT nCount = aMgr.GetFldTypeCount();
+ const sal_uInt16 nCount = aMgr.GetFldTypeCount();
if( rName.Len() )
{
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
pType = aMgr.GetFldType(USHRT_MAX, i);
String aTmpName( pType->GetName() );
@@ -206,7 +206,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
if(pType)
((SwSetExpFieldType*)pType)->SetSeqFormat(pOpt->GetNumType());
- rSh.UpdateExpFlds( TRUE );
+ rSh.UpdateExpFlds( sal_True );
rSh.EndAllAction();
diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx
index abae753c1b56..4250b8a4f0e8 100644
--- a/sw/source/ui/uiview/viewdraw.cxx
+++ b/sw/source/ui/uiview/viewdraw.cxx
@@ -355,7 +355,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
};
GetViewFrame()->GetBindings().Invalidate(aInval);
- BOOL bEndTextEdit = TRUE;
+ sal_Bool bEndTextEdit = sal_True;
if (pFuncPtr)
{
if (GetDrawFuncPtr())
@@ -373,7 +373,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
if(SID_OBJECT_SELECT == nDrawSfxId )
{
- pWrtShell->GotoObj(TRUE);
+ pWrtShell->GotoObj(sal_True);
}
else
{
@@ -390,7 +390,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
BeginTextEdit(pObj);
- bEndTextEdit = FALSE;
+ bEndTextEdit = sal_False;
}
}
}
@@ -421,7 +421,7 @@ void SwView::ExitDraw()
{
//#126062 # the shell may be invalid at close/reload/SwitchToViewShell
SfxDispatcher* pDispatch = GetViewFrame()->GetDispatcher();
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
SfxShell* pTest = 0;
do
{
diff --git a/sw/source/ui/uiview/viewfunc.hxx b/sw/source/ui/uiview/viewfunc.hxx
index f04db152ec2f..2dbe1aee0fb6 100644
--- a/sw/source/ui/uiview/viewfunc.hxx
+++ b/sw/source/ui/uiview/viewfunc.hxx
@@ -42,17 +42,17 @@ class Window;
class SwWrtShell;
// folgende Funktionen stehen im viewprt.cxx
-PrintDialog* CreatePrintDialog( Window* , USHORT, SwWrtShell* );
-void SetPrinter( IDocumentDeviceAccess*, SfxPrinter*, BOOL bWeb );
+PrintDialog* CreatePrintDialog( Window* , sal_uInt16, SwWrtShell* );
+void SetPrinter( IDocumentDeviceAccess*, SfxPrinter*, sal_Bool bWeb );
SfxTabPage* CreatePrintOptionsPage( Window*, const SfxItemSet& );
-void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb );
+void SetAppPrintOptions( ViewShell* pSh, sal_Bool bWeb );
// folgende Funktionen stehen im viewport.cxx
void ViewResizePixel( const Window &rRef,
const Point &rOfst,
const Size &rSize,
const Size &rEditSz,
- const BOOL bInner,
+ const sal_Bool bInner,
SwScrollbar& rVScrollbar,
SwScrollbar& rHScrollbar,
ImageButton* pPageUpBtn,
@@ -61,8 +61,8 @@ void ViewResizePixel( const Window &rRef,
Window& rScrollBarBox,
SvxRuler* pVLineal = 0,
SvxRuler* pHLineal = 0,
- BOOL bWebView = FALSE,
- BOOL bVRulerRight = FALSE );
+ sal_Bool bWebView = sal_False,
+ sal_Bool bVRulerRight = sal_False );
#endif
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index b3f73f7c38e4..4414a96cdf72 100755
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -554,7 +554,7 @@ void SwView::InsertThesaurusSynonym( const String &rSynonmText, const String &rL
if( !bSelection )
{
if(pWrtShell->IsEndWrd())
- pWrtShell->Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE );
+ pWrtShell->Left(CRSR_SKIP_CELLS, sal_False, 1, sal_False );
pWrtShell->SelWrd();
@@ -766,7 +766,7 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
if ( pMenu )
{
OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
- USHORT nId = ((PopupMenu*)pMenu)->Execute(pEditWin, aPixPos);
+ sal_uInt16 nId = ((PopupMenu*)pMenu)->Execute(pEditWin, aPixPos);
OUString aCommand = ((PopupMenu*)pMenu)->GetItemCommand(nId);
if (aCommand.getLength() == 0 )
{
@@ -978,7 +978,7 @@ IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox )
}
-BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM )
+sal_Bool SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM )
{
sal_Bool bRet = sal_False;
const sal_Bool bOldViewLock = pWrtShell->IsViewLocked();
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 9dfa8e79ecfa..84bce4002f11 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -83,7 +83,7 @@
#include <IDocumentSettingAccess.hxx>
#include <PostItMgr.hxx>
-USHORT SwView::nMoveType = NID_PGE;
+sal_uInt16 SwView::nMoveType = NID_PGE;
sal_Int32 SwView::nActMark = 0;
@@ -92,16 +92,16 @@ sal_Int32 SwView::nActMark = 0;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
-void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, BOOL bViewOnly )
+void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, sal_Bool bViewOnly )
{
_SetZoom( GetEditWin().GetOutputSizePixel(), eZoomType, nFactor, bViewOnly );
}
void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
- short nFactor, BOOL bViewOnly )
+ short nFactor, sal_Bool bViewOnly )
{
- BOOL bUnLockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE );
+ sal_Bool bUnLockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True );
pWrtShell->LockPaint();
{
@@ -109,7 +109,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
long nFac = nFactor;
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb);
const SwPageDesc &rDesc = pWrtShell->GetPageDesc( pWrtShell->GetCurPageDesc() );
@@ -182,19 +182,19 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
//MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen
//View updaten.
if ( !bViewOnly &&
- (USHORT(nFac) != pUsrPref->GetZoom() ||
- BYTE (eZoomType) != pUsrPref->GetZoomType()) )
+ (sal_uInt16(nFac) != pUsrPref->GetZoom() ||
+ sal_uInt8 (eZoomType) != pUsrPref->GetZoomType()) )
{
- pUsrPref->SetZoom ( USHORT(nFac) );
+ pUsrPref->SetZoom ( sal_uInt16(nFac) );
pUsrPref->SetZoomType( eZoomType );
SW_MOD()->ApplyUsrPref( *pUsrPref,
bViewOnly ? this: 0,
bViewOnly ? VIEWOPT_DEST_VIEW_ONLY : 0 );
pUsrPref->SetModified();
}
- if ( pOpt->GetZoom() != (USHORT) nFac )
+ if ( pOpt->GetZoom() != (sal_uInt16) nFac )
{
- aOpt.SetZoom ( USHORT(nFac) );
+ aOpt.SetZoom ( sal_uInt16(nFac) );
aOpt.SetReadonly(pOpt->IsReadonly());
pWrtShell->ApplyViewOptions( aOpt );
}
@@ -223,9 +223,9 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
((SwViewOption*)pWrtShell->GetViewOptions())->SetZoomType( eZoomType );
CalcVisArea( rEditSize ); //fuer das Neuberechnen des sichtbaren Bereiches
}
- else if ( USHORT(nFac) != pOpt->GetZoom() )
+ else if ( sal_uInt16(nFac) != pOpt->GetZoom() )
{
- aOpt.SetZoom ( USHORT(nFac) );
+ aOpt.SetZoom ( sal_uInt16(nFac) );
pWrtShell->ApplyViewOptions( aOpt );
}
@@ -238,7 +238,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
}
pWrtShell->UnlockPaint();
if( bUnLockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
// if ( mpPostItMgr )
// {
@@ -250,10 +250,10 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
// eZoom = eZoomType;
}
-void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
+void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly )
{
- const BOOL bUnLockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE );
+ const sal_Bool bUnLockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True );
pWrtShell->LockPaint();
{
@@ -262,7 +262,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
if ( !GetViewFrame()->GetFrame().IsInPlace() && !bViewOnly )
{
- const BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ const sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb);
//MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen
@@ -297,7 +297,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
pWrtShell->UnlockPaint();
if( bUnLockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
SfxBindings& rBnd = GetViewFrame()->GetBindings();
rBnd.Invalidate( SID_ATTR_VIEWLAYOUT );
@@ -308,7 +308,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
* Scrollbar - Handler
*/
-int SwView::_CreateScrollbar( BOOL bHori )
+int SwView::_CreateScrollbar( sal_Bool bHori )
{
Window *pMDI = &GetViewFrame()->GetWindow();
SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar;
@@ -326,7 +326,7 @@ int SwView::_CreateScrollbar( BOOL bHori )
(*ppScrollbar)->SetScrollHdl( LINK( this, SwView, ScrollHdl ));
(*ppScrollbar)->SetEndScrollHdl( LINK( this, SwView, EndScrollHdl ));
- (*ppScrollbar)->EnableDrag( TRUE );
+ (*ppScrollbar)->EnableDrag( sal_True );
if(GetWindow())
InvalidateBorder();
@@ -339,12 +339,12 @@ int SwView::_CreateScrollbar( BOOL bHori )
return 1;
}
-void SwView::CreatePageButtons(BOOL bShow)
+void SwView::CreatePageButtons(sal_Bool bShow)
{
Window *pMDI = &GetViewFrame()->GetWindow();
- pPageUpBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEUP ), TRUE );
+ pPageUpBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEUP ), sal_True );
pPageUpBtn->SetHelpId(HID_SCRL_PAGEUP);
- pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), FALSE );
+ pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), sal_False );
pPageDownBtn->SetHelpId(HID_SCRL_PAGEDOWN);
Reference< XFrame > xFrame = GetViewFrame()->GetFrame().GetFrameInterface();
pNaviBtn = new SwNaviImageButton(pMDI, xFrame );
@@ -401,12 +401,12 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
case NID_GRF:
case NID_OLE:
{
- USHORT eType = GOTOOBJ_FLY_FRM;
+ sal_uInt16 eType = GOTOOBJ_FLY_FRM;
if(nMoveType == NID_GRF)
eType = GOTOOBJ_FLY_GRF;
else if(nMoveType == NID_OLE)
eType = GOTOOBJ_FLY_OLE;
- BOOL bSuccess = bNext ?
+ sal_Bool bSuccess = bNext ?
rSh.GotoNextFly(eType) :
rSh.GotoPrevFly(eType);
if(bSuccess)
@@ -502,7 +502,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
case NID_SRCH_REP:
if(pSrchItem)
{
- BOOL bBackward = pSrchItem->GetBackward();
+ sal_Bool bBackward = pSrchItem->GetBackward();
if(rSh.HasSelection() && !bNext == rSh.IsCrsrPtAtEnd())
rSh.SwapPam();
pSrchItem->SetBackward(!bNext);
@@ -520,7 +520,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
break;
case NID_TABLE_FORMULA_ERROR:
- rSh.GotoNxtPrvTblFormula( bNext, TRUE );
+ rSh.GotoNxtPrvTblFormula( bNext, sal_True );
break;
}
pThis->pEditWin->GrabFocus();
@@ -642,7 +642,7 @@ int SwView::KillVLineal()
IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler )
{
- USHORT nDefPage = 0;
+ sal_uInt16 nDefPage = 0;
switch( pRuler->GetClickType() )
{
case RULER_TYPE_DONTKNOW:
@@ -669,7 +669,7 @@ IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler )
--------------------------------------------------*/
-USHORT SwView::GetMoveType()
+sal_uInt16 SwView::GetMoveType()
{
return nMoveType;
}
@@ -677,11 +677,11 @@ USHORT SwView::GetMoveType()
--------------------------------------------------*/
-void SwView::SetMoveType(USHORT nSet)
+void SwView::SetMoveType(sal_uInt16 nSet)
{
- BOOL bLastPage = nMoveType == NID_PGE;
+ sal_Bool bLastPage = nMoveType == NID_PGE;
nMoveType = nSet;
- BOOL bNewPage = nMoveType == NID_PGE;
+ sal_Bool bNewPage = nMoveType == NID_PGE;
if(bNewPage != bLastPage)
{
Color aColor(bNewPage ? COL_BLACK : VIEW_IMAGECOLOR);
@@ -729,7 +729,7 @@ void SwView::ShowHScrollbar(sal_Bool bShow)
sal_Bool SwView::IsHScrollbarVisible()const
{
DBG_ASSERT(pHScrollbar, "Scrollbar invalid");
- return pHScrollbar->IsVisible( FALSE ) || pHScrollbar->IsAuto();
+ return pHScrollbar->IsVisible( sal_False ) || pHScrollbar->IsAuto();
}
/* -----------------------------2002/06/26 13:57------------------------------
@@ -748,7 +748,7 @@ void SwView::ShowVScrollbar(sal_Bool bShow)
sal_Bool SwView::IsVScrollbarVisible()const
{
DBG_ASSERT(pVScrollbar, "Scrollbar invalid");
- return pVScrollbar->IsVisible( FALSE );
+ return pVScrollbar->IsVisible( sal_False );
}
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index b343619f2ea8..465227dbd0bb 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -68,11 +68,11 @@
#define WB_RIGHT_ALIGNED ((WinBits)0x00008000)
#endif
-static BOOL bProtectDocShellVisArea = FALSE;
+static sal_Bool bProtectDocShellVisArea = sal_False;
-static USHORT nPgNum = 0;
+static sal_uInt16 nPgNum = 0;
-BOOL SwView::IsDocumentBorder()
+sal_Bool SwView::IsDocumentBorder()
{
return GetDocShell()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ||
pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ||
@@ -93,13 +93,13 @@ inline long GetLeftMargin( SwView &rView )
void lcl_GetPos(SwView* pView,
Point& rPos,
SwScrollbar* pScrollbar,
- BOOL bBorder)
+ sal_Bool bBorder)
{
SwWrtShell &rSh = pView->GetWrtShell();
const Size aDocSz( rSh.GetDocSize() );
const long lBorder = bBorder ? DOCUMENTBORDER : DOCUMENTBORDER * 2;
- BOOL bHori = pScrollbar->IsHoriScroll();
+ sal_Bool bHori = pScrollbar->IsHoriScroll();
const long lPos = pScrollbar->GetThumbPos() + (bBorder ? DOCUMENTBORDER : 0);
long Point:: *pPt = bHori ? &Point::nA : &Point::nB;
@@ -127,7 +127,7 @@ void lcl_GetPos(SwView* pView,
void SwView::InvalidateRulerPos()
{
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_PARA_LRSPACE, SID_RULER_BORDERS, SID_RULER_PAGE_POS,
SID_RULER_LR_MIN_MAX, SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE,
@@ -189,14 +189,14 @@ aDocSz = rSz;
if( !pWrtShell || aVisArea.IsEmpty() ) // keine Shell -> keine Aenderung
{
- bDocSzUpdated = FALSE;
+ bDocSzUpdated = sal_False;
return;
}
//Wenn Text geloescht worden ist, kann es sein, dass die VisArea hinter
//den sichtbaren Bereich verweist
Rectangle aNewVisArea( aVisArea );
- BOOL bModified = false;
+ sal_Bool bModified = false;
SwTwips lGreenOffset = IsDocumentBorder() ? DOCUMENTBORDER : DOCUMENTBORDER * 2;
SwTwips lTmp = aDocSz.Width() + lGreenOffset;
@@ -205,7 +205,7 @@ aDocSz = rSz;
lTmp = aNewVisArea.Right() - lTmp;
aNewVisArea.Right() -= lTmp;
aNewVisArea.Left() -= lTmp;
- bModified = TRUE;
+ bModified = sal_True;
}
lTmp = aDocSz.Height() + lGreenOffset;
@@ -214,11 +214,11 @@ aDocSz = rSz;
lTmp = aNewVisArea.Bottom() - lTmp;
aNewVisArea.Bottom() -= lTmp;
aNewVisArea.Top() -= lTmp;
- bModified = TRUE;
+ bModified = sal_True;
}
if ( bModified )
- SetVisArea( aNewVisArea, FALSE );
+ SetVisArea( aNewVisArea, sal_False );
if ( UpdateScrollbars() && !bInOuterResizePixel && !bInInnerResizePixel &&
!GetViewFrame()->GetFrame().IsInPlace())
@@ -230,7 +230,7 @@ aDocSz = rSz;
Beschreibung: Visarea neu setzen
--------------------------------------------------------------------*/
-void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
+void SwView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollbar )
{
const Size aOldSz( aVisArea.GetSize() );
@@ -277,7 +277,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
aVisArea = aLR;
- const BOOL bOuterResize = bUpdateScrollbar && UpdateScrollbars();
+ const sal_Bool bOuterResize = bUpdateScrollbar && UpdateScrollbars();
if ( pWrtShell )
{
@@ -285,7 +285,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
if ( aOldSz != pWrtShell->VisArea().SSize() &&
( Abs(aOldSz.Width() - pWrtShell->VisArea().Width()) > 2 ||
Abs(aOldSz.Height() - pWrtShell->VisArea().Height()) > 2 ) )
- pWrtShell->CheckBrowseView( FALSE );
+ pWrtShell->CheckBrowseView( sal_False );
}
if ( !bProtectDocShellVisArea )
@@ -324,7 +324,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
Beschreibung: Pos VisArea setzen
--------------------------------------------------------------------*/
-void SwView::SetVisArea( const Point &rPt, BOOL bUpdateScrollbar )
+void SwView::SetVisArea( const Point &rPt, sal_Bool bUpdateScrollbar )
{
//einmal alignen, damit Brushes korrekt angesetzt werden.
//MA 31. May. 96: Das geht in der BrowseView schief, weil evlt.
@@ -364,7 +364,7 @@ void SwView::CheckVisArea()
Rectangle aNewVisArea( aVisArea );
aNewVisArea.Move( DOCUMENTBORDER - aVisArea.Left(),
DOCUMENTBORDER - aVisArea.Top() );
- SetVisArea( aNewVisArea, TRUE );
+ SetVisArea( aNewVisArea, sal_True );
}
}
}
@@ -376,12 +376,12 @@ void SwView::CheckVisArea()
Bereiches
IN Rectangle &rRect: Rechteck, das sich innerhalb des neuen
sichtbaren Bereiches befinden soll
- USHORT nRange optional exakte Angabe des Bereiches,
+ sal_uInt16 nRange optional exakte Angabe des Bereiches,
um den ggfs. gescrollt werden soll
--------------------------------------------------------------------*/
void SwView::CalcPt( Point *pPt, const Rectangle &rRect,
- USHORT nRangeX, USHORT nRangeY)
+ sal_uInt16 nRangeX, sal_uInt16 nRangeY)
{
const SwTwips lMin = IsDocumentBorder() ? DOCUMENTBORDER : 0;
@@ -428,13 +428,13 @@ void SwView::CalcPt( Point *pPt, const Rectangle &rRect,
Beschreibung: Scrolling
--------------------------------------------------------------------*/
-BOOL SwView::IsScroll( const Rectangle &rRect ) const
+sal_Bool SwView::IsScroll( const Rectangle &rRect ) const
{
return bCenterCrsr || bTopCrsr || !aVisArea.IsInside(rRect);
}
-void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
+void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRangeY )
{
if ( aVisArea.IsEmpty() )
return;
@@ -498,8 +498,8 @@ void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
aSize.Height()= Min( aSize.Height(),aVisSize.Height());
CalcPt( &aPt, Rectangle( rRect.TopLeft(), aSize ),
- static_cast< USHORT >((aVisSize.Width() - aSize.Width()) / 2),
- static_cast< USHORT >((aVisSize.Height()- aSize.Height())/ 2) );
+ static_cast< sal_uInt16 >((aVisSize.Width() - aSize.Width()) / 2),
+ static_cast< sal_uInt16 >((aVisSize.Height()- aSize.Height())/ 2) );
if( bTopCrsr )
{
@@ -561,10 +561,10 @@ void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
Liefern den Wert, um den bei PageUp / -Down gescrollt werden soll
--------------------------------------------------------------------*/
-BOOL SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
+sal_Bool SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
{
if ( !aVisArea.Top() || !aVisArea.GetHeight() )
- return FALSE;
+ return sal_False;
long nYScrl = GetYScroll() / 2;
rOff = -(aVisArea.GetHeight() - nYScrl);
//nicht vor den Dokumentanfang scrollen
@@ -572,15 +572,15 @@ BOOL SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
rOff = rOff - aVisArea.Top();
else if( GetWrtShell().GetCharRect().Top() < (aVisArea.Top() + nYScrl))
rOff += nYScrl;
- return TRUE;
+ return sal_True;
}
-BOOL SwView::GetPageScrollDownOffset( SwTwips &rOff ) const
+sal_Bool SwView::GetPageScrollDownOffset( SwTwips &rOff ) const
{
if ( !aVisArea.GetHeight() ||
(aVisArea.GetHeight() > aDocSz.Height()) )
- return FALSE;
+ return sal_False;
long nYScrl = GetYScroll() / 2;
rOff = aVisArea.GetHeight() - nYScrl;
//nicht hinter das Dokumentende scrollen
@@ -622,7 +622,7 @@ long SwView::PageDown()
long SwView::PhyPageUp()
{
//aktuell sichtbare Seite erfragen, nicht formatieren
- USHORT nActPage = pWrtShell->GetNextPrevPageNum( FALSE );
+ sal_uInt16 nActPage = pWrtShell->GetNextPrevPageNum( sal_False );
if( USHRT_MAX != nActPage )
{
@@ -643,7 +643,7 @@ long SwView::PhyPageUp()
long SwView::PhyPageDown()
{
//aktuell sichtbare Seite erfragen, nicht formatieren
- USHORT nActPage = pWrtShell->GetNextPrevPageNum( TRUE );
+ sal_uInt16 nActPage = pWrtShell->GetNextPrevPageNum( sal_True );
// falls die letzte Dokumentseite sichtbar ist, nichts tun
if( USHRT_MAX != nActPage )
{
@@ -660,16 +660,16 @@ long SwView::PhyPageDown()
}
-long SwView::PageUpCrsr( BOOL bSelect )
+long SwView::PageUpCrsr( sal_Bool bSelect )
{
if ( !bSelect )
{
- const USHORT eType = pWrtShell->GetFrmType(0,TRUE);
+ const sal_uInt16 eType = pWrtShell->GetFrmType(0,sal_True);
if ( eType & FRMTYPE_FOOTNOTE )
{
pWrtShell->MoveCrsr();
pWrtShell->GotoFtnAnchor();
- pWrtShell->Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pWrtShell->Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
return 1;
}
}
@@ -681,13 +681,13 @@ long SwView::PageUpCrsr( BOOL bSelect )
PageUp() )
{
pWrtShell->ResetCursorStack();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-long SwView::PageDownCrsr(BOOL bSelect)
+long SwView::PageDownCrsr(sal_Bool bSelect)
{
SwTwips lOff = 0;
if ( GetPageScrollDownOffset( lOff ) &&
@@ -696,9 +696,9 @@ long SwView::PageDownCrsr(BOOL bSelect)
PageDown() )
{
pWrtShell->ResetCursorStack();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
@@ -711,7 +711,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
return 0;
if ( pScrollbar->GetType() == SCROLL_DRAG )
- pWrtShell->EnableSmooth( FALSE );
+ pWrtShell->EnableSmooth( sal_False );
if(!pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
pScrollbar->GetType() == SCROLL_DRAG)
@@ -724,11 +724,11 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
Point aPos( aVisArea.TopLeft() );
lcl_GetPos(this, aPos, pScrollbar, IsDocumentBorder());
- USHORT nPhNum = 1;
- USHORT nVirtNum = 1;
+ sal_uInt16 nPhNum = 1;
+ sal_uInt16 nVirtNum = 1;
String sDisplay;
- if(pWrtShell->GetPageNumber( aPos.Y(), FALSE, nPhNum, nVirtNum, sDisplay ))
+ if(pWrtShell->GetPageNumber( aPos.Y(), sal_False, nPhNum, nVirtNum, sDisplay ))
{
// JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE,
// so we dont must do it agin.
@@ -771,7 +771,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
EndScrollHdl(pScrollbar);
if ( pScrollbar->GetType() == SCROLL_DRAG )
- pWrtShell->EnableSmooth( TRUE );
+ pWrtShell->EnableSmooth( sal_True );
return 0;
}
@@ -789,12 +789,12 @@ IMPL_LINK( SwView, EndScrollHdl, SwScrollbar *, pScrollbar )
Help::ShowQuickHelp(pScrollbar, Rectangle(), aEmptyStr, 0);
}
Point aPos( aVisArea.TopLeft() );
- BOOL bBorder = IsDocumentBorder();
+ sal_Bool bBorder = IsDocumentBorder();
lcl_GetPos(this, aPos, pScrollbar, bBorder);
if ( bBorder && aPos == aVisArea.TopLeft() )
UpdateScrollbars();
else
- SetVisArea( aPos, FALSE );
+ SetVisArea( aPos, sal_False );
GetViewFrame()->GetBindings().Update(FN_STAT_PAGE);
}
@@ -854,9 +854,9 @@ void SwView::CalcVisArea( const Size &rOutPixel )
--------------------------------------------------------------------*/
-void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
+void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
{
- BOOL bRightVRuler = pWrtShell->GetViewOptions()->IsVRulerRight();
+ sal_Bool bRightVRuler = pWrtShell->GetViewOptions()->IsVRulerRight();
if ( pVRuler->IsVisible() )
{
long nWidth = pVRuler->GetSizePixel().Width();
@@ -872,7 +872,7 @@ void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
const StyleSettings &rSet = GetEditWin().GetSettings().GetStyleSettings();
const long nTmp = rSet.GetScrollBarSize();
- if( pVScrollbar->IsVisible(FALSE) )
+ if( pVScrollbar->IsVisible(sal_False) )
{
if(bRightVRuler)
rToFill.Left() = nTmp;
@@ -892,7 +892,7 @@ void ViewResizePixel( const Window &rRef,
const Point &rOfst,
const Size &rSize,
const Size &rEditSz,
- const BOOL /*bInner*/,
+ const sal_Bool /*bInner*/,
SwScrollbar& rVScrollbar,
SwScrollbar& rHScrollbar,
ImageButton* pPageUpBtn,
@@ -901,23 +901,23 @@ void ViewResizePixel( const Window &rRef,
Window& rScrollBarBox,
SvxRuler* pVLineal,
SvxRuler* pHLineal,
- BOOL bWebView,
- BOOL bVRulerRight )
+ sal_Bool bWebView,
+ sal_Bool bVRulerRight )
{
// ViewResizePixel wird auch von der PreView benutzt!!!
- const BOOL bHLineal = pHLineal && pHLineal->IsVisible();
+ const sal_Bool bHLineal = pHLineal && pHLineal->IsVisible();
const long nHLinSzHeight = bHLineal ?
pHLineal->GetSizePixel().Height() : 0;
- const BOOL bVLineal = pVLineal && pVLineal->IsVisible();
+ const sal_Bool bVLineal = pVLineal && pVLineal->IsVisible();
const long nVLinSzWidth = bVLineal ?
pVLineal->GetSizePixel().Width() : 0;
- long nHBSzHeight2= rHScrollbar.IsVisible( FALSE ) || !rHScrollbar.IsAuto() ?
+ long nHBSzHeight2= rHScrollbar.IsVisible( sal_False ) || !rHScrollbar.IsAuto() ?
rRef.GetSettings().GetStyleSettings().GetScrollBarSize() : 0;
long nHBSzHeight =
- rHScrollbar.IsVisible(TRUE) || (rHScrollbar.IsVisible( FALSE ) && !rHScrollbar.IsAuto()) ?
+ rHScrollbar.IsVisible(sal_True) || (rHScrollbar.IsVisible( sal_False ) && !rHScrollbar.IsAuto()) ?
nHBSzHeight2:0;
- long nVBSzWidth = rVScrollbar.IsVisible(TRUE) || (rVScrollbar.IsVisible( FALSE ) && !rVScrollbar.IsAuto()) ?
+ long nVBSzWidth = rVScrollbar.IsVisible(sal_True) || (rVScrollbar.IsVisible( sal_False ) && !rVScrollbar.IsAuto()) ?
rRef.GetSettings().GetStyleSettings().GetScrollBarSize() : 0;
if(pVLineal)
@@ -986,10 +986,10 @@ void ViewResizePixel( const Window &rRef,
//#55949# wenn der Platz fuer Scrollbar und Page-Buttons zu klein wird, dann
// werden die Buttons versteckt
- USHORT nCnt = pNaviBtn ? 3 : 2;
+ sal_uInt16 nCnt = pNaviBtn ? 3 : 2;
long nSubSize = (aImgSz.Width() * nCnt );
//
- BOOL bHidePageButtons = aSize.Height() < ((bWebView ? 3 : 2) * nSubSize);
+ sal_Bool bHidePageButtons = aSize.Height() < ((bWebView ? 3 : 2) * nSubSize);
if(!bHidePageButtons)
aSize.Height() -= nSubSize;
else
@@ -1011,7 +1011,7 @@ void ViewResizePixel( const Window &rRef,
pPageDownBtn->SetPosSizePixel( aPos, aImgSz );
- if( rHScrollbar.IsVisible( FALSE ) )
+ if( rHScrollbar.IsVisible( sal_False ) )
{
aScrollFillPos.X() = aPos.X();
@@ -1024,7 +1024,7 @@ void ViewResizePixel( const Window &rRef,
void SwView::ShowAtResize()
{
- bShowAtResize = FALSE;
+ bShowAtResize = sal_False;
if ( pWrtShell->GetViewOptions()->IsViewHRuler() )
pHRuler->Show();
}
@@ -1044,15 +1044,15 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
Fraction( aSize.Height(), aObjSizePixel.Height() ) );
}
- bInInnerResizePixel = TRUE;
- const BOOL bHScrollVisible = pHScrollbar->IsVisible(TRUE);
- const BOOL bVScrollVisible = pVScrollbar->IsVisible(TRUE);
- BOOL bRepeat = FALSE;
+ bInInnerResizePixel = sal_True;
+ const sal_Bool bHScrollVisible = pHScrollbar->IsVisible(sal_True);
+ const sal_Bool bVScrollVisible = pVScrollbar->IsVisible(sal_True);
+ sal_Bool bRepeat = sal_False;
do
{
Size aSz( rSize );
SvBorder aBorder;
- CalcAndSetBorderPixel( aBorder, TRUE );
+ CalcAndSetBorderPixel( aBorder, sal_True );
if ( GetViewFrame()->GetFrame().IsInPlace() )
{
Size aViewSize( aSz );
@@ -1070,7 +1070,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
}
Size aEditSz( GetEditWin().GetOutputSizePixel() );
- ViewResizePixel( GetEditWin(), rOfst, aSz, aEditSz, TRUE, *pVScrollbar,
+ ViewResizePixel( GetEditWin(), rOfst, aSz, aEditSz, sal_True, *pVScrollbar,
*pHScrollbar, pPageUpBtn, pPageDownBtn,
pNaviBtn,
*pScrollFill, pVRuler, pHRuler,
@@ -1082,9 +1082,9 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
if( pHRuler->IsVisible() || pVRuler->IsVisible() )
{
const Fraction& rFrac = GetEditWin().GetMapMode().GetScaleX();
- USHORT nZoom = 100;
+ sal_uInt16 nZoom = 100;
if (0 != rFrac.GetDenominator())
- nZoom = USHORT(rFrac.GetNumerator() * 100L / rFrac.GetDenominator());
+ nZoom = sal_uInt16(rFrac.GetNumerator() * 100L / rFrac.GetDenominator());
const Fraction aFrac( nZoom, 100 );
pVRuler->SetZoom( aFrac );
@@ -1098,18 +1098,18 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
//EditWin niemals einstellen!
//VisArea einstellen, aber dort nicht das SetVisArea der DocShell rufen!
- bProtectDocShellVisArea = TRUE;
+ bProtectDocShellVisArea = sal_True;
CalcVisArea( aEditSz );
//visibility changes of the automatic horizontal scrollbar
//require to repeat the ViewResizePixel() call - but only once!
if(bRepeat)
- bRepeat = FALSE;
- else if(bHScrollVisible != pHScrollbar->IsVisible(TRUE) ||
- bVScrollVisible != pVScrollbar->IsVisible(TRUE))
- bRepeat = TRUE;
+ bRepeat = sal_False;
+ else if(bHScrollVisible != pHScrollbar->IsVisible(sal_True) ||
+ bVScrollVisible != pVScrollbar->IsVisible(sal_True))
+ bRepeat = sal_True;
}while( bRepeat );
- bProtectDocShellVisArea = FALSE;
- bInInnerResizePixel = FALSE;
+ bProtectDocShellVisArea = sal_False;
+ bInInnerResizePixel = sal_False;
}
@@ -1118,13 +1118,13 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
// FME 22.08.2003 #i16909# - return, if no size (caused by minimize window).
if ( bInOuterResizePixel || ( !rSize.Width() && !rSize.Height() ) )
return;
- bInOuterResizePixel = TRUE;
+ bInOuterResizePixel = sal_True;
// feststellen, ob Scrollbars angezeigt werden duerfen
- BOOL bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- BOOL bShowH = FALSE,
- bShowV = FALSE,
- bAuto = FALSE,
+ sal_Bool bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ sal_Bool bShowH = sal_False,
+ bShowV = sal_False,
+ bAuto = sal_False,
bHAuto = bBrowse;
switch( GetScrollingMode() )
{
@@ -1140,45 +1140,45 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
}
/* kein break hier */
case SCROLLING_AUTO:
- bAuto = bHAuto = TRUE;
- bShowH = bShowV = TRUE;
+ bAuto = bHAuto = sal_True;
+ bShowH = bShowV = sal_True;
break;
case SCROLLING_YES:
- bShowH = bShowV = TRUE;
+ bShowH = bShowV = sal_True;
break;
case SCROLLING_NO:
- bShowH = bShowV = bHAuto = FALSE;
+ bShowH = bShowV = bHAuto = sal_False;
break;
}
SwDocShell* pDocSh = GetDocShell();
- BOOL bIsPreview = pDocSh->IsPreview();
+ sal_Bool bIsPreview = pDocSh->IsPreview();
if( bIsPreview )
{
- bShowH = bShowV = bHAuto = bAuto = FALSE;
+ bShowH = bShowV = bHAuto = bAuto = sal_False;
}
- if(pHScrollbar->IsVisible(FALSE) != bShowH)
+ if(pHScrollbar->IsVisible(sal_False) != bShowH)
ShowHScrollbar(bShowH);
pHScrollbar->SetAuto( bHAuto );
- if(pVScrollbar->IsVisible(FALSE) != bShowV)
+ if(pVScrollbar->IsVisible(sal_False) != bShowV)
ShowVScrollbar(bShowV);
pVScrollbar->SetAuto(bAuto);
SET_CURR_SHELL( pWrtShell );
- BOOL bRepeat = FALSE;
+ sal_Bool bRepeat = sal_False;
long nCnt = 0;
- BOOL bUnLockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE );
+ sal_Bool bUnLockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True );
pWrtShell->LockPaint();
do {
++nCnt;
- const BOOL bScroll1 = pVScrollbar->IsVisible(TRUE);
- const BOOL bScroll2 = pHScrollbar->IsVisible(TRUE);
+ const sal_Bool bScroll1 = pVScrollbar->IsVisible(sal_True);
+ const sal_Bool bScroll2 = pHScrollbar->IsVisible(sal_True);
SvBorder aBorder;
- CalcAndSetBorderPixel( aBorder, FALSE );
+ CalcAndSetBorderPixel( aBorder, sal_False );
const Size aEditSz( GetEditWin().GetOutputSizePixel() );
- ViewResizePixel( GetEditWin(), rOfst, rSize, aEditSz, FALSE, *pVScrollbar,
+ ViewResizePixel( GetEditWin(), rOfst, rSize, aEditSz, sal_False, *pVScrollbar,
*pHScrollbar, pPageUpBtn, pPageDownBtn,
pNaviBtn,
*pScrollFill, pVRuler, pHRuler,
@@ -1215,12 +1215,12 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
pDocSh->SfxInPlaceObject::GetVisArea() );*/
if ( pWrtShell->GetViewOptions()->GetZoomType() != SVX_ZOOM_PERCENT &&
!pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- _SetZoom( aEditSz, (SvxZoomType)pWrtShell->GetViewOptions()->GetZoomType(), 100, TRUE );
+ _SetZoom( aEditSz, (SvxZoomType)pWrtShell->GetViewOptions()->GetZoomType(), 100, sal_True );
pWrtShell->EndAction();
- bRepeat = bScroll1 != pVScrollbar->IsVisible(TRUE);
+ bRepeat = bScroll1 != pVScrollbar->IsVisible(sal_True);
if ( !bRepeat )
- bRepeat = bScroll2 != pHScrollbar->IsVisible(TRUE);
+ bRepeat = bScroll2 != pHScrollbar->IsVisible(sal_True);
//Nicht endlosschleifen. Moeglichst dann stoppen wenn die
//(Auto-)Scrollbars sichtbar sind.
@@ -1228,14 +1228,14 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
( nCnt > 10 || ( nCnt > 3 && bHAuto && bAuto ) )
)
{
- bRepeat = FALSE;
+ bRepeat = sal_False;
}
}while ( bRepeat );
- if( pVScrollbar->IsVisible(FALSE) || pVScrollbar->IsAuto())
+ if( pVScrollbar->IsVisible(sal_False) || pVScrollbar->IsAuto())
{
- BOOL bShowButtons = pVScrollbar->IsVisible(TRUE);
+ sal_Bool bShowButtons = pVScrollbar->IsVisible(sal_True);
if(pPageUpBtn && pPageUpBtn->IsVisible() != bShowButtons)
{
pPageUpBtn->Show(bShowButtons);
@@ -1248,9 +1248,9 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
pWrtShell->UnlockPaint();
if( bUnLockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
- bInOuterResizePixel = FALSE;
+ bInOuterResizePixel = sal_False;
if ( mpPostItMgr )
{
@@ -1293,12 +1293,12 @@ Size SwView::GetOptimalSizePixel() const
}
-BOOL SwView::UpdateScrollbars()
+sal_Bool SwView::UpdateScrollbars()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !aVisArea.IsEmpty() )
{
- const BOOL bBorder = IsDocumentBorder();
+ const sal_Bool bBorder = IsDocumentBorder();
Rectangle aTmpRect( aVisArea );
if ( bBorder )
{
@@ -1312,11 +1312,11 @@ BOOL SwView::UpdateScrollbars()
aTmpSz.Width() += lOfst; aTmpSz.Height() += lOfst;
{
- const BOOL bVScrollVisible = pVScrollbar->IsVisible(TRUE);
+ const sal_Bool bVScrollVisible = pVScrollbar->IsVisible(sal_True);
pVScrollbar->DocSzChgd( aTmpSz );
pVScrollbar->ViewPortChgd( aTmpRect );
- BOOL bShowButtons = pVScrollbar->IsVisible(TRUE);
+ sal_Bool bShowButtons = pVScrollbar->IsVisible(sal_True);
if(pPageUpBtn && pPageUpBtn->IsVisible() != bShowButtons)
{
pPageUpBtn->Show(bShowButtons);
@@ -1326,16 +1326,16 @@ BOOL SwView::UpdateScrollbars()
pNaviBtn->Show(bShowButtons);
}
- if ( bVScrollVisible != pVScrollbar->IsVisible(TRUE) )
- bRet = TRUE;
+ if ( bVScrollVisible != pVScrollbar->IsVisible(sal_True) )
+ bRet = sal_True;
}
{
- const BOOL bHScrollVisible = pHScrollbar->IsVisible(TRUE);
+ const sal_Bool bHScrollVisible = pHScrollbar->IsVisible(sal_True);
pHScrollbar->DocSzChgd( aTmpSz );
pHScrollbar->ViewPortChgd( aTmpRect );
- if ( bHScrollVisible != pHScrollbar->IsVisible(TRUE) )
- bRet = TRUE;
- pScrollFill->Show(pHScrollbar->IsVisible(TRUE) && pVScrollbar->IsVisible(TRUE) );
+ if ( bHScrollVisible != pHScrollbar->IsVisible(sal_True) )
+ bRet = sal_True;
+ pScrollFill->Show(pHScrollbar->IsVisible(sal_True) && pVScrollbar->IsVisible(sal_True) );
}
}
return bRet;
@@ -1349,30 +1349,30 @@ void SwView::Move()
SfxViewShell::Move();
}
-BOOL SwView::HandleWheelCommands( const CommandEvent& rCEvt )
+sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
const CommandWheelData* pWData = rCEvt.GetWheelData();
if( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
{
- USHORT nFact = pWrtShell->GetViewOptions()->GetZoom();
+ sal_uInt16 nFact = pWrtShell->GetViewOptions()->GetZoom();
if( 0L > pWData->GetDelta() )
- nFact = static_cast< USHORT >(Max( 20, nFact - 10 ));
+ nFact = static_cast< sal_uInt16 >(Max( 20, nFact - 10 ));
else
- nFact = static_cast< USHORT >(Min( 600, nFact + 10 ));
+ nFact = static_cast< sal_uInt16 >(Min( 600, nFact + 10 ));
SetZoom( SVX_ZOOM_PERCENT, nFact );
- bOk = TRUE;
+ bOk = sal_True;
}
else
{
- if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((ULONG)0xFFFFFFFF) == pWData->GetScrollLines()))
+ if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((sal_uLong)0xFFFFFFFF) == pWData->GetScrollLines()))
{
if (pWData->GetDelta()<0)
PhyPageDown();
else
PhyPageUp();
- bOk = TRUE;
+ bOk = sal_True;
}
else
bOk = pEditWin->HandleScrollCommand( rCEvt,
diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx
index 7ddc594dd223..c463e3841072 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -98,14 +98,14 @@ using namespace ::com::sun::star;
--------------------------------------------------------------------*/
-SfxPrinter* __EXPORT SwView::GetPrinter( BOOL bCreate )
+SfxPrinter* __EXPORT SwView::GetPrinter( sal_Bool bCreate )
{
const IDocumentDeviceAccess* pIDDA = GetWrtShell().getIDocumentDeviceAccess();
SfxPrinter *pOld = pIDDA->getPrinter( false );
SfxPrinter *pPrt = pIDDA->getPrinter( bCreate );
if ( pOld != pPrt )
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
::SetAppPrintOptions( &GetWrtShell(), bWeb );
}
return pPrt;
@@ -115,7 +115,7 @@ SfxPrinter* __EXPORT SwView::GetPrinter( BOOL bCreate )
Beschreibung: Druckerwechsel weitermelden
--------------------------------------------------------------------*/
-void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb )
+void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, sal_Bool bWeb )
{
SwPrintOptions* pOpt = SW_MOD()->GetPrtOptions(bWeb);
if( !pOpt)
@@ -125,7 +125,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb )
const SfxItemSet& rSet = pNew->GetOptions();
const SwAddPrinterItem* pAddPrinterAttr;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, FALSE,
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, sal_False,
(const SfxPoolItem**)&pAddPrinterAttr ) )
{
if( pIDDA )
@@ -136,7 +136,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb )
}
-USHORT __EXPORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
+sal_uInt16 __EXPORT SwView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool )
{
SwWrtShell &rSh = GetWrtShell();
SfxPrinter* pOld = rSh.getIDocumentDeviceAccess()->getPrinter( false );
@@ -149,17 +149,17 @@ USHORT __EXPORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
if ( nDiffFlags & SFX_PRINTER_PRINTER )
rSh.SetModified();
}
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
if ( nDiffFlags & SFX_PRINTER_OPTIONS )
::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, bWeb );
- const BOOL bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? TRUE : FALSE;
- const BOOL bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? TRUE : FALSE;
+ const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False;
+ const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False;
if ( bChgOri || bChgSize )
{
rSh.StartAllAction();
if ( bChgOri )
- rSh.ChgAllPageOrientation( USHORT(pNew->GetOrientation()) );
+ rSh.ChgAllPageOrientation( sal_uInt16(pNew->GetOrientation()) );
if ( bChgSize )
{
Size aSz( SvxPaperInfo::GetPaperSize( pNew ) );
@@ -179,14 +179,14 @@ USHORT __EXPORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
SfxTabPage* __EXPORT SwView::CreatePrintOptionsPage(Window* pParent,
const SfxItemSet& rSet)
{
- return ::CreatePrintOptionsPage( pParent, rSet, FALSE );
+ return ::CreatePrintOptionsPage( pParent, rSet, sal_False );
}
/*--------------------------------------------------------------------
Beschreibung: Druckerdialog
--------------------------------------------------------------------*/
-PrintDialog* CreatePrintDialog( Window* pParent, USHORT nPg, SwWrtShell* pSh )
+PrintDialog* CreatePrintDialog( Window* pParent, sal_uInt16 nPg, SwWrtShell* pSh )
{
PrintDialog *pDlg = new PrintDialog( pParent, false );
// pDlg->ChangeFirstPage( 1 );
@@ -224,7 +224,7 @@ PrintDialog* __EXPORT SwView::CreatePrintDialog( Window* pParent )
void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
::SetAppPrintOptions( &GetWrtShell(), bWeb );
switch (rReq.GetSlot())
{
@@ -235,7 +235,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
if (sFaxName.Len())
{
SfxStringItem aPrinterName(SID_PRINTER_NAME, sFaxName);
- SfxBoolItem aSilent( SID_SILENT, TRUE );
+ SfxBoolItem aSilent( SID_SILENT, sal_True );
GetViewFrame()->GetDispatcher()->Execute( SID_PRINTDOC,
SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD,
&aPrinterName, &aSilent, 0L );
@@ -244,7 +244,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
{
InfoBox aInfoBox(&GetEditWin(), SW_RES(MSG_ERR_NO_FAX));
String sMsg = aInfoBox.GetMessText();
- USHORT nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS;
+ sal_uInt16 nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS;
sMsg.SearchAndReplace(String::CreateFromAscii("%1"), String(SW_RES(nResNo)));
aInfoBox.SetMessText(sMsg);
aInfoBox.Execute();
@@ -259,12 +259,12 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
case SID_PRINTDOCDIRECT:
{
SwWrtShell* pSh = &GetWrtShell();
- SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, FALSE);
- BOOL bSilent = pSilentItem ? pSilentItem->GetValue() : FALSE;
- SFX_REQUEST_ARG(rReq, pPrintFromMergeItem, SfxBoolItem, FN_QRY_MERGE, FALSE);
+ SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False);
+ sal_Bool bSilent = pSilentItem ? pSilentItem->GetValue() : sal_False;
+ SFX_REQUEST_ARG(rReq, pPrintFromMergeItem, SfxBoolItem, FN_QRY_MERGE, sal_False);
if(pPrintFromMergeItem)
rReq.RemoveItem(FN_QRY_MERGE);
- BOOL bFromMerge = pPrintFromMergeItem ? pPrintFromMergeItem->GetValue() : FALSE;
+ sal_Bool bFromMerge = pPrintFromMergeItem ? pPrintFromMergeItem->GetValue() : sal_False;
SwMiscConfig aMiscConfig;
bool bPrintSelection = false;
if(!bSilent && !bFromMerge &&
@@ -274,7 +274,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
short nRet = aBox.Execute();
if(RET_YES == nRet)
{
- SfxBoolItem aBool(FN_QRY_MERGE, TRUE);
+ SfxBoolItem aBool(FN_QRY_MERGE, sal_True);
GetViewFrame()->GetDispatcher()->Execute(
FN_QRY_MERGE, SFX_CALLMODE_ASYNCHRON, &aBool, 0L);
rReq.Ignore();
@@ -318,7 +318,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
--------------------------------------------------------------------*/
SfxTabPage* CreatePrintOptionsPage( Window *pParent,
- const SfxItemSet &rOptions, BOOL bPreview )
+ const SfxItemSet &rOptions, sal_Bool bPreview )
{
SfxTabPage* pPage = NULL;
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -336,7 +336,7 @@ SfxTabPage* CreatePrintOptionsPage( Window *pParent,
}
-void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb )
+void SetAppPrintOptions( ViewShell* pSh, sal_Bool bWeb )
{
SwPrintData aPrtData = *SW_MOD()->GetPrtOptions(bWeb);
const IDocumentDeviceAccess* pIDDA = pSh->getIDocumentDeviceAccess();
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index 57c7bd20623c..f622f021e1d3 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -93,9 +93,9 @@ using namespace ::com::sun::star::i18n;
struct SwSearchOptions
{
SwDocPositions eStart, eEnd;
- BOOL bDontWrap;
+ sal_Bool bDontWrap;
- SwSearchOptions( SwWrtShell* pSh, BOOL bBackward );
+ SwSearchOptions( SwWrtShell* pSh, sal_Bool bBackward );
};
@@ -115,24 +115,24 @@ inline Window* GetParentWindow( SvxSearchDialog* pSrchDlg )
--------------------------------------------------*/
-void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
+void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
- BOOL bQuiet = FALSE;
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SEARCH_QUIET, FALSE, &pItem))
+ sal_Bool bQuiet = sal_False;
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SEARCH_QUIET, sal_False, &pItem))
bQuiet = ((const SfxBoolItem*) pItem)->GetValue();
- BOOL bApi = bQuiet | bNoMessage;
+ sal_Bool bApi = bQuiet | bNoMessage;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if (nSlot == FN_REPEAT_SEARCH && !pSrchItem)
{
if(bApi)
{
- rReq.SetReturnValue(SfxBoolItem(nSlot, FALSE));
+ rReq.SetReturnValue(SfxBoolItem(nSlot, sal_False));
nSlot = 0;
}
}
@@ -149,7 +149,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
break;
case FID_SEARCH_ON:
- bJustOpened = TRUE;
+ bJustOpened = sal_True;
GetViewFrame()->GetBindings().Invalidate(SID_SEARCH_ITEM);
break;
@@ -226,7 +226,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
{
case SVX_SEARCHCMD_FIND:
{
- BOOL bRet = SearchAndWrap(bApi);
+ sal_Bool bRet = SearchAndWrap(bApi);
if( bRet )
Scroll(pWrtShell->GetCharRect().SVRect());
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
@@ -234,7 +234,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
break;
case SVX_SEARCHCMD_FIND_ALL:
{
- BOOL bRet = SearchAll();
+ sal_Bool bRet = SearchAll();
if( !bRet )
{
if( !bApi )
@@ -242,7 +242,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- bFound = FALSE;
+ bFound = sal_False;
}
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
}
@@ -255,7 +255,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
//JP 27.04.95: warum ?
// was ist, wenn man das gefundene nur attributieren will??
- USHORT nCmd = SVX_SEARCHCMD_FIND;
+ sal_uInt16 nCmd = SVX_SEARCHCMD_FIND;
if( pSrchItem->GetReplaceString().Len() ||
!pReplList )
{
@@ -263,7 +263,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
// Ersetzungsstring enthalten ist - der ersetzte String
// noch einmal gefunden wird.
- BOOL bBack = pSrchItem->GetBackward();
+ sal_Bool bBack = pSrchItem->GetBackward();
if (bBack)
pWrtShell->Push();
String aReplace( pSrchItem->GetReplaceString() );
@@ -288,9 +288,9 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
// 2) Weiter suchen (ohne zu ersetzen!)
- USHORT nOldCmd = pSrchItem->GetCommand();
+ sal_uInt16 nOldCmd = pSrchItem->GetCommand();
pSrchItem->SetCommand( nCmd );
- BOOL bRet = SearchAndWrap(bApi);
+ sal_Bool bRet = SearchAndWrap(bApi);
if( bRet )
Scroll( pWrtShell->GetCharRect().SVRect());
pSrchItem->SetCommand( nOldCmd );
@@ -307,18 +307,18 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
{
// bestehende Selektionen aufheben,
// wenn nicht in selektierten Bereichen gesucht werden soll
- (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE);
+ (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False);
if( DOCPOS_START == aOpts.eEnd )
pWrtShell->EndDoc();
else
pWrtShell->SttDoc();
}
- bExtra = FALSE;
- ULONG nFound;
+ bExtra = sal_False;
+ sal_uLong nFound;
{ //Scope for SwWait-Object
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
nFound = FUNC_Search( aOpts );
pWrtShell->EndAllAction();
@@ -331,7 +331,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- bFound = FALSE;
+ bFound = sal_False;
return;
}
@@ -360,7 +360,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
case FID_SEARCH_SEARCHSET:
case FID_SEARCH_REPLACESET:
{
- static const USHORT aNormalAttr[] =
+ static const sal_uInt16 aNormalAttr[] =
{
/* 0 */ RES_CHRATR_CASEMAP, RES_CHRATR_CASEMAP,
/* 2 */ RES_CHRATR_COLOR, RES_CHRATR_POSTURE,
@@ -378,13 +378,13 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
/*24 */ 0
};
- static const USHORT aCJKAttr[] =
+ static const sal_uInt16 aCJKAttr[] =
{
RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_WEIGHT,
RES_CHRATR_EMPHASIS_MARK, RES_CHRATR_TWO_LINES,
RES_PARATR_SCRIPTSPACE, RES_PARATR_FORBIDDEN_RULES
};
- static const USHORT aCTLAttr[] =
+ static const sal_uInt16 aCTLAttr[] =
{
RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_WEIGHT
};
@@ -404,7 +404,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
14 );
SfxItemSet aSet( pWrtShell->GetAttrPool(), aArr.GetData() );
- USHORT nWhich = SID_SEARCH_SEARCHSET;
+ sal_uInt16 nWhich = SID_SEARCH_SEARCHSET;
if ( FID_SEARCH_REPLACESET == nSlot )
{
@@ -439,7 +439,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
}
-BOOL SwView::SearchAndWrap(BOOL bApi)
+sal_Bool SwView::SearchAndWrap(sal_Bool bApi)
{
SwSearchOptions aOpts( pWrtShell, pSrchItem->GetBackward() );
@@ -451,12 +451,12 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
// falls in selektierten Bereichen gesucht werden soll, duerfen sie
// nicht aufgehoben werden
if (!pSrchItem->GetSelection())
- (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE);
+ (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False);
- SwWait *pWait = new SwWait( *GetDocShell(), TRUE );
+ SwWait *pWait = new SwWait( *GetDocShell(), sal_True );
if( FUNC_Search( aOpts ) )
{
- bFound = TRUE;
+ bFound = sal_True;
if(pWrtShell->IsSelFrmMode())
{
pWrtShell->UnSelectFrm();
@@ -465,30 +465,30 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
pWrtShell->Pop();
pWrtShell->EndAllAction();
delete pWait;
- return TRUE;
+ return sal_True;
}
delete pWait, pWait = 0;
// Suchen in den Sonderbereichen, wenn keine
// Suche in Selektionen vorliegt. Bei Suche in Selektionen
// wird ohnehin in diesen Sonderbereichen gesucht
- BOOL bHasSrchInOther = bExtra;
+ sal_Bool bHasSrchInOther = bExtra;
if (!pSrchItem->GetSelection() && !bExtra )
{
- bExtra = TRUE;
+ bExtra = sal_True;
if( FUNC_Search( aOpts ) )
{
- bFound = TRUE;
+ bFound = sal_True;
pWrtShell->Pop();
pWrtShell->EndAllAction();
- return TRUE;
+ return sal_True;
}
- bExtra = FALSE;
+ bExtra = sal_False;
}
else
bExtra = !bExtra;
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
pSrchDlg = pWrp ? static_cast <SvxSearchDialog*> (pWrp->getDialog ()) : 0;
@@ -501,9 +501,9 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- bFound = FALSE;
+ bFound = sal_False;
pWrtShell->Pop();
- return FALSE;
+ return sal_False;
}
pWrtShell->EndAllAction();
// noch mal mit WrapAround versuchen?
@@ -514,15 +514,15 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
: MSG_SEARCH_END )
).Execute() )
{
- bFound = FALSE;
+ bFound = sal_False;
pWrtShell->Pop();
- return FALSE;
+ return sal_False;
}
pWrtShell->StartAllAction();
- pWrtShell->Pop(FALSE);
- pWait = new SwWait( *GetDocShell(), TRUE );
+ pWrtShell->Pop(sal_False);
+ pWait = new SwWait( *GetDocShell(), sal_True );
- BOOL bSrchBkwrd = DOCPOS_START == aOpts.eEnd;
+ sal_Bool bSrchBkwrd = DOCPOS_START == aOpts.eEnd;
aOpts.eEnd = bSrchBkwrd ? DOCPOS_START : DOCPOS_END;
aOpts.eStart = bSrchBkwrd ? DOCPOS_END : DOCPOS_START;
@@ -546,13 +546,13 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- return bFound = FALSE;
+ return bFound = sal_False;
}
-BOOL SwView::SearchAll(USHORT* pFound)
+sal_Bool SwView::SearchAll(sal_uInt16* pFound)
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
SwSearchOptions aOpts( pWrtShell, pSrchItem->GetBackward() );
@@ -561,15 +561,15 @@ BOOL SwView::SearchAll(USHORT* pFound)
{
// bestehende Selektionen aufheben,
// wenn nicht in selektierten Bereichen gesucht werden soll
- (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE);
+ (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False);
if( DOCPOS_START == aOpts.eEnd )
pWrtShell->EndDoc();
else
pWrtShell->SttDoc();
}
- bExtra = FALSE;
- USHORT nFound = (USHORT)FUNC_Search( aOpts );
+ bExtra = sal_False;
+ sal_uInt16 nFound = (sal_uInt16)FUNC_Search( aOpts );
if(pFound)
*pFound = nFound;
bFound = 0 != nFound;
@@ -581,7 +581,7 @@ BOOL SwView::SearchAll(USHORT* pFound)
void SwView::Replace()
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
@@ -624,7 +624,7 @@ void SwView::Replace()
-SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, BOOL bBackward )
+SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, sal_Bool bBackward )
{
eStart = DOCPOS_CURR;
if( bBackward )
@@ -639,9 +639,9 @@ SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, BOOL bBackward )
}
}
-ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
+sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
{
- BOOL bDoReplace = pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE ||
+ sal_Bool bDoReplace = pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE ||
pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE_ALL;
int eRanges = pSrchItem->GetSelection() ?
@@ -652,7 +652,7 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
pWrtShell->SttSelect();
- static USHORT __READONLY_DATA aSearchAttrRange[] = {
+ static sal_uInt16 __READONLY_DATA aSearchAttrRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -686,11 +686,11 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
// build SearchOptions to be used
//
SearchOptions aSearchOpt( pSrchItem->GetSearchOptions() );
- aSearchOpt.Locale = SvxCreateLocale( (USHORT)GetAppLanguage() );
+ aSearchOpt.Locale = SvxCreateLocale( (sal_uInt16)GetAppLanguage() );
if( !bDoReplace )
aSearchOpt.replaceString = aEmptyStr;
- ULONG nFound;
+ sal_uLong nFound;
if( aSrchSet.Count() || ( pReplSet && pReplSet->Count() ))
{
nFound = pWrtShell->SearchAttr(
@@ -727,7 +727,7 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
LAYOUT_NS Dialog* SwView::GetSearchDialog()
{
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)SfxViewFrame::Current()->GetChildWindow(nId);
if ( pWrp )
pSrchDlg = pWrp->getDialog ();
@@ -739,7 +739,7 @@ LAYOUT_NS Dialog* SwView::GetSearchDialog()
void SwView::StateSearch(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while(nWhich)
{
@@ -747,7 +747,7 @@ void SwView::StateSearch(SfxItemSet &rSet)
{
case SID_SEARCH_OPTIONS:
{
- UINT16 nOpt = 0xFFFF;
+ sal_uInt16 nOpt = 0xFFFF;
if( GetDocShell()->IsReadOnly() )
nOpt &= ~( SEARCH_OPTIONS_REPLACE |
SEARCH_OPTIONS_REPLACE_ALL );
@@ -770,13 +770,13 @@ void SwView::StateSearch(SfxItemSet &rSet)
( aTxt = pWrtShell->SwCrsrShell::GetSelTxt() ).Len() )
{
pSrchItem->SetSearchString( aTxt );
- pSrchItem->SetSelection( FALSE );
+ pSrchItem->SetSelection( sal_False );
}
else
- pSrchItem->SetSelection( TRUE );
+ pSrchItem->SetSelection( sal_True );
}
- bJustOpened = FALSE;
+ bJustOpened = sal_False;
rSet.Put( *pSrchItem );
}
break;
@@ -784,7 +784,7 @@ void SwView::StateSearch(SfxItemSet &rSet)
/* case SID_SEARCH_REPLACESET:
case SID_SEARCH_SEARCHSET:
{
- static USHORT __READONLY_DATA aSearchAttrRange[] =
+ static sal_uInt16 __READONLY_DATA aSearchAttrRange[] =
{
RES_CHRATR_CASEMAP, RES_CHRATR_POSTURE,
RES_CHRATR_SHADOWED, RES_CHRATR_WORDLINEMODE,
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index 40ba6e3c6d2d..c3702734011c 100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -190,7 +190,7 @@ void SwView::GetState(SfxItemSet &rSet)
if(pWrtShell->IsInVerticalText())
aImgItem.SetRotation(2700);
if(pWrtShell->IsInRightToLeftText())
- aImgItem.SetMirrored(TRUE);
+ aImgItem.SetMirrored(sal_True);
}
rSet.Put(aImgItem);
}
@@ -208,7 +208,7 @@ void SwView::GetState(SfxItemSet &rSet)
if(pWrtShell->IsInVerticalText())
aImgItem.SetRotation(2700);
if(pWrtShell->IsInRightToLeftText())
- aImgItem.SetMirrored(TRUE);
+ aImgItem.SetMirrored(sal_True);
}
rSet.Put(aImgItem);
}
@@ -362,7 +362,7 @@ void SwView::GetState(SfxItemSet &rSet)
if(pWrtShell->IsInVerticalText())
aImageItem.SetRotation( 2700 );
if(pWrtShell->IsInRightToLeftText())
- aImageItem.SetMirrored( TRUE );
+ aImageItem.SetMirrored( sal_True );
rSet.Put(aImageItem);
}
break;
@@ -390,7 +390,7 @@ void SwView::GetState(SfxItemSet &rSet)
{
if( !pShell )
SelectShell();
- USHORT nAlias = 0;
+ sal_uInt16 nAlias = 0;
bool bDraw = false;
if( nSelectionType & (nsSelectionType::SEL_DRW_TXT|nsSelectionType::SEL_TXT) )
{
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index ca65184c74e6..ee5522595f96 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -86,19 +86,19 @@ using namespace ::com::sun::star;
void lcl_FillSvxColumn(const SwFmtCol& rCol,
- USHORT nTotalWidth,
+ sal_uInt16 nTotalWidth,
SvxColumnItem& rColItem,
long nDistance)
{
const SwColumns& rCols = rCol.GetColumns();
- USHORT nWidth = 0;
+ sal_uInt16 nWidth = 0;
- BOOL bOrtho = rCol.IsOrtho() && rCols.Count();
+ sal_Bool bOrtho = rCol.IsOrtho() && rCols.Count();
long nInnerWidth = 0;
if( bOrtho )
{
nInnerWidth = nTotalWidth;
- for ( USHORT i = 0; i < rCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rCols.Count(); ++i )
{
SwColumn* pCol = rCols[i];
nInnerWidth -= pCol->GetLeft() + pCol->GetRight();
@@ -108,17 +108,17 @@ void lcl_FillSvxColumn(const SwFmtCol& rCol,
else
nInnerWidth /= rCols.Count();
}
- for ( USHORT i = 0; i < rCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rCols.Count(); ++i )
{
SwColumn* pCol = rCols[i];
- const USHORT nStart = USHORT(pCol->GetLeft() + nWidth + nDistance);
+ const sal_uInt16 nStart = sal_uInt16(pCol->GetLeft() + nWidth + nDistance);
if( bOrtho )
- nWidth = static_cast< USHORT >(nWidth + nInnerWidth + pCol->GetLeft() + pCol->GetRight());
+ nWidth = static_cast< sal_uInt16 >(nWidth + nInnerWidth + pCol->GetLeft() + pCol->GetRight());
else
- nWidth = static_cast< USHORT >(nWidth + rCol.CalcColWidth(i, nTotalWidth));
- const USHORT nEnd = USHORT(nWidth - pCol->GetRight() + nDistance);
+ nWidth = static_cast< sal_uInt16 >(nWidth + rCol.CalcColWidth(i, nTotalWidth));
+ const sal_uInt16 nEnd = sal_uInt16(nWidth - pCol->GetRight() + nDistance);
- SvxColumnDescription aColDesc(nStart, nEnd, TRUE);
+ SvxColumnDescription aColDesc(nStart, nEnd, sal_True);
rColItem.Append(aColDesc);
}
}
@@ -129,7 +129,7 @@ void lcl_FillSvxColumn(const SwFmtCol& rCol,
void lcl_ConvertToCols(const SvxColumnItem& rColItem,
- USHORT nTotalWidth,
+ sal_uInt16 nTotalWidth,
SwFmtCol& rCols)
{
ASSERT( rCols.GetNumCols() == rColItem.Count(), "Column count mismatch" );
@@ -138,27 +138,27 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
if(rCols.GetNumCols() != rColItem.Count())
return;
- USHORT nLeft = 0;
+ sal_uInt16 nLeft = 0;
SwTwips nSumAll= 0; // Summiere alle Spalten und Raender auf
SwColumns& rArr = rCols.GetColumns();
// Tabcols der Reihe nach
- for( USHORT i=0; i < rColItem.Count()-1; ++i )
+ for( sal_uInt16 i=0; i < rColItem.Count()-1; ++i )
{
DBG_ASSERT(rColItem[i+1].nStart >= rColItem[i].nEnd,"\201berlappende Spalten" );
- USHORT nStart = static_cast< USHORT >(rColItem[i+1].nStart);
- USHORT nEnd = static_cast< USHORT >(rColItem[i].nEnd);
+ sal_uInt16 nStart = static_cast< sal_uInt16 >(rColItem[i+1].nStart);
+ sal_uInt16 nEnd = static_cast< sal_uInt16 >(rColItem[i].nEnd);
if(nStart < nEnd)
nStart = nEnd;
- const USHORT nDiff = nStart - nEnd;
- const USHORT nRight = nDiff / 2;
+ const sal_uInt16 nDiff = nStart - nEnd;
+ const sal_uInt16 nRight = nDiff / 2;
- USHORT nWidth = static_cast< USHORT >(rColItem[i].nEnd - rColItem[i].nStart);
+ sal_uInt16 nWidth = static_cast< sal_uInt16 >(rColItem[i].nEnd - rColItem[i].nStart);
nWidth += nLeft + nRight;
SwColumn* pCol = rArr[i];
- pCol->SetWishWidth( USHORT(long(rCols.GetWishWidth()) * long(nWidth) /
+ pCol->SetWishWidth( sal_uInt16(long(rCols.GetWishWidth()) * long(nWidth) /
long(nTotalWidth) ));
pCol->SetLeft( nLeft );
pCol->SetRight( nRight );
@@ -170,9 +170,9 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
//Die Differenz aus der Gesamtwunschbreite und der Summe der bisher berechneten
// Spalten und Raender sollte die Breite der letzten Spalte ergeben.
- rArr[rColItem.Count()-1]->SetWishWidth( rCols.GetWishWidth() - (USHORT)nSumAll );
+ rArr[rColItem.Count()-1]->SetWishWidth( rCols.GetWishWidth() - (sal_uInt16)nSumAll );
- rCols.SetOrtho(FALSE, 0, 0 );
+ rCols.SetOrtho(sal_False, 0, 0 );
}
/*--------------------------------------------------------------------
@@ -183,7 +183,7 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
void lcl_EraseDefTabs(SvxTabStopItem& rTabStops)
{
// Def Tabs loeschen
- for ( USHORT i = 0; i < rTabStops.Count(); )
+ for ( sal_uInt16 i = 0; i < rTabStops.Count(); )
{
// Hier auch den DefTab auf Null rausschmeissen
if ( SVX_TAB_ADJUST_DEFAULT == rTabStops[i].GetAdjustment() ||
@@ -203,7 +203,7 @@ void lcl_EraseDefTabs(SvxTabStopItem& rTabStops)
void SwView::SwapPageMargin(const SwPageDesc& rDesc, SvxLRSpaceItem& rLRSpace)
{
- USHORT nPhyPage, nVirPage;
+ sal_uInt16 nPhyPage, nVirPage;
GetWrtShell().GetPageNum( nPhyPage, nVirPage );
if ( rDesc.GetUseOn() == nsUseOnPage::PD_MIRROR && (nPhyPage % 2) == 0 )
@@ -239,30 +239,30 @@ void ResizeFrameCols(SwFmtCol& rCol,
{
// wenn die Wunschbreite zu gross wird, dann muessen alle Werte passend skaliert werden
long nScale = (0xffffl << 8)/ nNewWishWidth;
- for(USHORT i = 0; i < rArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < rArr.Count(); i++)
{
SwColumn* pCol = rArr.GetObject(i);
long nVal = pCol->GetWishWidth();
lcl_Scale(nVal, nScale);
- pCol->SetWishWidth((USHORT) nVal);
+ pCol->SetWishWidth((sal_uInt16) nVal);
nVal = pCol->GetLeft();
lcl_Scale(nVal, nScale);
- pCol->SetLeft((USHORT) nVal);
+ pCol->SetLeft((sal_uInt16) nVal);
nVal = pCol->GetRight();
lcl_Scale(nVal, nScale);
- pCol->SetRight((USHORT) nVal);
+ pCol->SetRight((sal_uInt16) nVal);
}
lcl_Scale(nNewWishWidth, nScale);
lcl_Scale(nWishDiff, nScale);
}
- rCol.SetWishWidth( (USHORT) (nNewWishWidth) );
+ rCol.SetWishWidth( (sal_uInt16) (nNewWishWidth) );
if( nLeftDelta >= 2 || nLeftDelta <= -2)
- rArr[0]->SetWishWidth(rArr[0]->GetWishWidth() + (USHORT)nWishDiff);
+ rArr[0]->SetWishWidth(rArr[0]->GetWishWidth() + (sal_uInt16)nWishDiff);
else
- rArr[rArr.Count()-1]->SetWishWidth(rArr[rArr.Count()-1]->GetWishWidth() + (USHORT)nWishDiff);
+ rArr[rArr.Count()-1]->SetWishWidth(rArr[rArr.Count()-1]->GetWishWidth() + (sal_uInt16)nWishDiff);
//reset auto width
- rCol.SetOrtho(FALSE, 0, 0 );
+ rCol.SetOrtho(sal_False, 0, 0 );
}
/*--------------------------------------------------------------------
Beschreibung: Hier werden alle Aenderungen der Tableiste
@@ -273,18 +273,18 @@ void ResizeFrameCols(SwFmtCol& rCol,
void SwView::ExecTabWin( SfxRequest& rReq )
{
SwWrtShell &rSh = GetWrtShell();
- const USHORT nFrmType = rSh.IsObjSelected() ?
+ const sal_uInt16 nFrmType = rSh.IsObjSelected() ?
FRMTYPE_DRAWOBJ :
- rSh.GetFrmType(0,TRUE);
- const BOOL bFrmSelection = rSh.IsFrmSelected();
- const BOOL bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ rSh.GetFrmType(0,sal_True);
+ const sal_Bool bFrmSelection = rSh.IsFrmSelected();
+ const sal_Bool bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- const USHORT nSlot = rReq.GetSlot();
- const USHORT nDescId = rSh.GetCurPageDesc();
+ const sal_uInt16 nSlot = rReq.GetSlot();
+ const sal_uInt16 nDescId = rSh.GetCurPageDesc();
const SwPageDesc& rDesc = rSh.GetPageDesc( nDescId );
- const BOOL bVerticalWriting = rSh.IsInVerticalText();
+ const sal_Bool bVerticalWriting = rSh.IsInVerticalText();
const SwFmtHeader& rHeaderFmt = rDesc.GetMaster().GetHeader();
SwFrmFmt *pHeaderFmt = (SwFrmFmt*)rHeaderFmt.GetHeaderFmt();
@@ -297,9 +297,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const long nPageWidth = bBrowse ? rPageRect.Width() : rFrmSize.GetWidth();
const long nPageHeight = bBrowse ? rPageRect.Height() : rFrmSize.GetHeight();
- BOOL bUnlockView = FALSE;
+ sal_Bool bUnlockView = sal_False;
rSh.StartAllAction();
- BOOL bSect = 0 != (nFrmType & FRMTYPE_COLSECT);
+ sal_Bool bSect = 0 != (nFrmType & FRMTYPE_COLSECT);
switch ( nSlot )
{
@@ -313,8 +313,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwFrmFmt* pFmt = ((SwFrmFmt*)rSh.GetFlyFrmFmt());
const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED);
- BOOL bRTL;
- BOOL bVerticalFrame = (bFrmSelection && rSh.IsFrmVertical(TRUE, bRTL))|| (!bFrmSelection && bVerticalWriting);
+ sal_Bool bRTL;
+ sal_Bool bVerticalFrame = (bFrmSelection && rSh.IsFrmVertical(sal_True, bRTL))|| (!bFrmSelection && bVerticalWriting);
long nDeltaX = bVerticalFrame ?
rRect.Right() - rPageRect.Right() + aLongLR.GetRight() :
rPageRect.Left() + aLongLR.GetLeft() - rRect.Left();
@@ -346,7 +346,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwRect aRect;
rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtWidth = aRect.Width();
- aSize.SetWidthPercent(BYTE((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth));
+ aSize.SetWidthPercent(sal_uInt8((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth));
}
else
aSize.SetWidth( nPageWidth -
@@ -381,9 +381,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
aLongLR.SetLeft( nOld > aLongLR.GetLeft() ? 0 : aLongLR.GetLeft() - nOld );
nOld = rDesc.GetMaster().GetLRSpace().GetRight();
- aLongLR.SetRight( nOld > (USHORT)aLongLR.GetRight() ? 0 : aLongLR.GetRight() - nOld );
- aLR.SetLeft((USHORT)aLongLR.GetLeft());
- aLR.SetRight((USHORT)aLongLR.GetRight());
+ aLongLR.SetRight( nOld > (sal_uInt16)aLongLR.GetRight() ? 0 : aLongLR.GetRight() - nOld );
+ aLR.SetLeft((sal_uInt16)aLongLR.GetLeft());
+ aLR.SetRight((sal_uInt16)aLongLR.GetRight());
if ( nFrmType & FRMTYPE_HEADER && pHeaderFmt )
pHeaderFmt->SetFmtAttr( aLR );
@@ -427,8 +427,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{ // Seitenraender einstellen
- aLR.SetLeft((USHORT)aLongLR.GetLeft());
- aLR.SetRight((USHORT)aLongLR.GetRight());
+ aLR.SetLeft((sal_uInt16)aLongLR.GetLeft());
+ aLR.SetRight((sal_uInt16)aLongLR.GetRight());
SwapPageMargin( rDesc, aLR );
SwPageDesc aDesc( rDesc );
aDesc.GetMaster().SetFmtAttr( aLR );
@@ -451,8 +451,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SfxItemSet aSet( GetPool(), RES_FRM_SIZE, RES_FRM_SIZE,
RES_VERT_ORIENT, RES_HORI_ORIENT, 0 );
//which of the orientation attributes is to be put depends on the frame's environment
- BOOL bRTL;
- if((bFrmSelection && rSh.IsFrmVertical(TRUE, bRTL))|| (!bFrmSelection && bVerticalWriting))
+ sal_Bool bRTL;
+ if((bFrmSelection && rSh.IsFrmVertical(sal_True, bRTL))|| (!bFrmSelection && bVerticalWriting))
{
SwFmtHoriOrient aHoriOrient(pFmt->GetHoriOrient());
aHoriOrient.SetHoriOrient(text::HoriOrientation::NONE);
@@ -472,7 +472,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwRect aRect;
rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtHeight = aRect.Height();
- aSize.SetHeightPercent(BYTE(nHeight * 100 /nPrtHeight));
+ aSize.SetHeightPercent(sal_uInt8(nHeight * 100 /nPrtHeight));
}
else
aSize.SetHeight(nHeight );
@@ -521,12 +521,12 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if ( nFrmType & ( FRMTYPE_HEADER | FRMTYPE_FOOTER ))
{
- const BOOL bHead = nFrmType & FRMTYPE_HEADER ? TRUE : FALSE;
+ const sal_Bool bHead = nFrmType & FRMTYPE_HEADER ? sal_True : sal_False;
SvxULSpaceItem aUL( rDesc.GetMaster().GetULSpace() );
if ( bHead )
- aUL.SetUpper( (USHORT)aLongULSpace.GetUpper() );
+ aUL.SetUpper( (sal_uInt16)aLongULSpace.GetUpper() );
else
- aUL.SetLower( (USHORT)aLongULSpace.GetLower() );
+ aUL.SetLower( (sal_uInt16)aLongULSpace.GetLower() );
aDesc.GetMaster().SetFmtAttr( aUL );
if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt) )
@@ -545,8 +545,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
else
{
SvxULSpaceItem aUL(RES_UL_SPACE);
- aUL.SetUpper((USHORT)aLongULSpace.GetUpper());
- aUL.SetLower((USHORT)aLongULSpace.GetLower());
+ aUL.SetUpper((sal_uInt16)aLongULSpace.GetUpper());
+ aUL.SetLower((sal_uInt16)aLongULSpace.GetLower());
aDesc.GetMaster().SetFmtAttr(aUL);
}
@@ -557,7 +557,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
case SID_ATTR_TABSTOP_VERTICAL:
case SID_ATTR_TABSTOP:
{
- USHORT nWhich = GetPool().GetWhich(nSlot);
+ sal_uInt16 nWhich = GetPool().GetWhich(nSlot);
SvxTabStopItem aTabStops( (const SvxTabStopItem&)rReq.GetArgs()->
Get( nWhich ));
aTabStops.SetWhich(RES_PARATR_TABSTOP);
@@ -576,7 +576,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
// auffuellen mit Default-Tabs
- USHORT nDef = ::GetTabDist( rDefTabs );
+ sal_uInt16 nDef = ::GetTabDist( rDefTabs );
::MakeDefTabs( nDef, aTabStops );
SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl();
@@ -601,12 +601,12 @@ void SwView::ExecTabWin( SfxRequest& rReq )
sal_Bool bLastColumn = sal_True;
if(nFrmType & FRMTYPE_COLUMN)
{
- USHORT nCurFrameCol = rSh.GetCurColNum() - 1;
+ sal_uInt16 nCurFrameCol = rSh.GetCurColNum() - 1;
bFirstColumn = !nCurFrameCol;
const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt();
const SwFmtCol* pCols = &pFmt->GetCol();
const SwColumns& rCols = pCols->GetColumns();
- USHORT nColumnCount = rCols.Count();
+ sal_uInt16 nColumnCount = rCols.Count();
bLastColumn = nColumnCount == nCurFrameCol + 1;
}
}
@@ -654,7 +654,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const SvxTabStopItem& rTabStops = (const SvxTabStopItem&)aSet.Get(RES_PARATR_TABSTOP);
// Haben wir einen Tab an Stelle Null
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < rTabStops.Count(); ++i )
if ( rTabStops[i].GetTabPos() == 0 )
@@ -673,7 +673,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const SvxTabStopItem& rDefTabs =
(const SvxTabStopItem&)rSh.GetDefault(RES_PARATR_TABSTOP);
- USHORT nDef = ::GetTabDist(rDefTabs);
+ sal_uInt16 nDef = ::GetTabDist(rDefTabs);
::MakeDefTabs( nDef, aTabStops );
if( pColl && pColl->IsAutoUpdateFmt())
@@ -698,7 +698,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
ASSERT(aColItem.Count(), "ColDesc ist leer!!");
- const BOOL bSingleLine = ((const SfxBoolItem&)rReq.
+ const sal_Bool bSingleLine = ((const SfxBoolItem&)rReq.
GetArgs()->Get(SID_RULER_ACT_LINE_ONLY)).GetValue();
SwTabCols aTabCols;
@@ -726,14 +726,14 @@ void SwView::ExecTabWin( SfxRequest& rReq )
// Tabcols der Reihe nach
// Die letzte Col wird durch den Rand definiert
//columns in right-to-left tables need to be mirrored
- BOOL bIsTableRTL =
+ sal_Bool bIsTableRTL =
IsTabColFromDoc() ?
rSh.IsMouseTableRightToLeft(aTabColFromDocPos)
: rSh.IsTableRightToLeft();
if(bIsTableRTL)
{
- USHORT nColCount = aColItem.Count() - 1;
- for ( USHORT i = 0; i < nColCount; ++i )
+ sal_uInt16 nColCount = aColItem.Count() - 1;
+ for ( sal_uInt16 i = 0; i < nColCount; ++i )
{
const SvxColumnDescription& rCol = aColItem[nColCount - i];
aTabCols[i] = aTabCols.GetRight() - rCol.nStart;
@@ -742,7 +742,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{
- for ( USHORT i = 0; i < aColItem.Count()-1; ++i )
+ for ( sal_uInt16 i = 0; i < aColItem.Count()-1; ++i )
{
const SvxColumnDescription& rCol = aColItem[i];
aTabCols[i] = rCol.nEnd + aTabCols.GetLeft();
@@ -754,8 +754,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
if( !rSh.IsViewLocked() )
{
- bUnlockView = TRUE;
- rSh.LockView( TRUE );
+ bUnlockView = sal_True;
+ rSh.LockView( sal_True );
}
rSh.SetMouseTabCols( aTabCols, bSingleLine,
aTabColFromDocPos );
@@ -783,10 +783,10 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwFmtCol aCols(
bSect ?
pSectFmt->GetCol() :
- (const SwFmtCol&)aSet.Get( RES_COL, FALSE ));
+ (const SwFmtCol&)aSet.Get( RES_COL, sal_False ));
SwRect aCurRect = rSh.GetAnyCurRect(bSect ? RECT_SECTION_PRT : RECT_FLY_PRT_EMBEDDED);
const long lWidth = bVerticalWriting ? aCurRect.Height() : aCurRect.Width();
- ::lcl_ConvertToCols( aColItem, USHORT(lWidth), aCols );
+ ::lcl_ConvertToCols( aColItem, sal_uInt16(lWidth), aCols );
aSet.Put( aCols );
if(bSect)
rSh.SetSectionAttr( aSet, pSectFmt );
@@ -810,7 +810,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwFmtCol aCols( rDesc.GetMaster().GetCol() );
const SwRect aPrtRect = rSh.GetAnyCurRect(RECT_PAGE_PRT);
::lcl_ConvertToCols( aColItem,
- USHORT(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width()),
+ sal_uInt16(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width()),
aCols );
SwPageDesc aDesc( rDesc );
aDesc.GetMaster().SetFmtAttr( aCols );
@@ -849,7 +849,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(bVerticalWriting)
{
- for ( USHORT i = aColItem.Count() - 1; i; --i )
+ for ( sal_uInt16 i = aColItem.Count() - 1; i; --i )
{
const SvxColumnDescription& rCol = aColItem[i - 1];
long nColumnPos = aTabCols.GetRight() - rCol.nEnd ;
@@ -859,23 +859,23 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{
- for ( USHORT i = 0; i < aColItem.Count()-1; ++i )
+ for ( sal_uInt16 i = 0; i < aColItem.Count()-1; ++i )
{
const SvxColumnDescription& rCol = aColItem[i];
aTabCols[i] = rCol.nEnd + aTabCols.GetLeft();
aTabCols.SetHidden( i, !rCol.bVisible );
}
}
- BOOL bSingleLine = FALSE;
+ sal_Bool bSingleLine = sal_False;
const SfxPoolItem* pSingleLine;
- if( SFX_ITEM_SET == rReq.GetArgs()->GetItemState(SID_RULER_ACT_LINE_ONLY, FALSE, &pSingleLine))
+ if( SFX_ITEM_SET == rReq.GetArgs()->GetItemState(SID_RULER_ACT_LINE_ONLY, sal_False, &pSingleLine))
bSingleLine = ((const SfxBoolItem*)pSingleLine)->GetValue();
if ( bSetTabRowFromDoc )
{
if( !rSh.IsViewLocked() )
{
- bUnlockView = TRUE;
- rSh.LockView( TRUE );
+ bUnlockView = sal_True;
+ rSh.LockView( sal_True );
}
rSh.SetMouseTabRows( aTabCols, bSingleLine, aTabColFromDocPos );
}
@@ -891,9 +891,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.EndAllAction();
if( bUnlockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
- bSetTabColFromDoc = bSetTabRowFromDoc = bTabColFromDoc = bTabRowFromDoc = FALSE;
+ bSetTabColFromDoc = bSetTabRowFromDoc = bTabColFromDoc = bTabRowFromDoc = sal_False;
SetNumRuleNodeFromDoc(NULL);
}
@@ -909,13 +909,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SwWrtShell &rSh = GetWrtShell();
const Point* pPt = IsTabColFromDoc() || IsTabRowFromDoc() ? &aTabColFromDocPos : 0;
- const USHORT nFrmType = rSh.IsObjSelected()
+ const sal_uInt16 nFrmType = rSh.IsObjSelected()
? FRMTYPE_DRAWOBJ
- : rSh.GetFrmType( pPt, TRUE );
+ : rSh.GetFrmType( pPt, sal_True );
- const BOOL bFrmSelection = rSh.IsFrmSelected();
+ const sal_Bool bFrmSelection = rSh.IsFrmSelected();
- const BOOL bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
// PageOffset/Begrenzer
const SwRect& rPageRect = rSh.GetAnyCurRect( RECT_PAGE, pPt );
const SwRect& rPagePrtRect = rSh.GetAnyCurRect( RECT_PAGE_PRT, pPt );
@@ -927,7 +927,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rSh.GetMousePageDesc(aTabColFromDocPos) : rSh.GetCurPageDesc() );
const SvxFrameDirectionItem& rFrameDir = rDesc.GetMaster().GetFrmDir();
- const BOOL bVerticalWriting = rSh.IsInVerticalText();
+ const sal_Bool bVerticalWriting = rSh.IsInVerticalText();
//enable tab stop display on the rulers depending on the writing direction
WinBits nRulerStyle = pHRuler->GetStyle() & ~WB_EXTRAFIELD;
@@ -952,7 +952,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SelectionType nSelType = rSh.GetSelectionType();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
sal_Bool bPutContentProtection = sal_False;
while ( nWhich )
@@ -1036,15 +1036,15 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
// Dokumentkoordinaten Frame auf Seitenkoordinaten umbrechen
const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt);
- aLongUL.SetUpper((USHORT)(rRect.Top() - rPageRect.Top() ));
- aLongUL.SetLower((USHORT)(rPageRect.Bottom() - rRect.Bottom() ));
+ aLongUL.SetUpper((sal_uInt16)(rRect.Top() - rPageRect.Top() ));
+ aLongUL.SetLower((sal_uInt16)(rPageRect.Bottom() - rRect.Bottom() ));
}
else if ( nFrmType & FRMTYPE_HEADER || nFrmType & FRMTYPE_FOOTER )
{
SwRect aRect( rSh.GetAnyCurRect( RECT_HEADERFOOTER, pPt));
aRect.Pos() -= rSh.GetAnyCurRect( RECT_PAGE, pPt ).Pos();
- aLongUL.SetUpper( (USHORT)aRect.Top() );
- aLongUL.SetLower( (USHORT)(nPageHeight - aRect.Bottom()) );
+ aLongUL.SetUpper( (sal_uInt16)aRect.Top() );
+ aLongUL.SetLower( (sal_uInt16)(nPageHeight - aRect.Bottom()) );
}
else if( nFrmType & FRMTYPE_DRAWOBJ)
{
@@ -1061,8 +1061,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rSet.Put( aLongUL );
else
{
- SvxULSpaceItem aULTmp((USHORT)aLongUL.GetUpper(),
- (USHORT)aLongUL.GetLower(),
+ SvxULSpaceItem aULTmp((sal_uInt16)aLongUL.GetUpper(),
+ (sal_uInt16)aLongUL.GetLower(),
nWhich);
rSet.Put(aULTmp);
}
@@ -1125,7 +1125,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
short nOffset = static_cast< short >(aLR.GetTxtLeft() +
// --> FME 2005-02-22 #i42922# Mouse move of numbering label
// has to consider the left indent of the paragraph
- pNumRuleNodeFromDoc->GetLeftMarginWithNum( TRUE ) );
+ pNumRuleNodeFromDoc->GetLeftMarginWithNum( sal_True ) );
// <--
short nFLOffset;
@@ -1168,8 +1168,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aCoreSet.Put( aBoxInfo );
rSh.GetFlyFrmAttr( aCoreSet );
const SvxBoxItem& rBox = (const SvxBoxItem&)aCoreSet.Get(RES_BOX);
- aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT));
//add the paragraph border distance
SfxItemSet aCoreSet1( GetPool(),
@@ -1177,12 +1177,12 @@ void SwView::StateTabWin(SfxItemSet& rSet)
0 );
rSh.GetCurAttr( aCoreSet1 );
const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSet1.Get(RES_BOX);
- aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT));
}
rSet.Put(aDistLR);
- nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft());
- nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight());
+ nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft());
+ nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight());
}
else if ( IsTabColFromDoc() ||
( rSh.GetTableFmt() && !bFrmSelection &&
@@ -1192,13 +1192,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
RES_BOX, RES_BOX,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 );
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
- aBoxInfo.SetTable(FALSE);
- aBoxInfo.SetDist((BOOL) TRUE);
+ aBoxInfo.SetTable(sal_False);
+ aBoxInfo.SetDist((sal_Bool) sal_True);
aCoreSet2.Put(aBoxInfo);
rSh.GetTabBorders( aCoreSet2 );
const SvxBoxItem& rBox = (const SvxBoxItem&)aCoreSet2.Get(RES_BOX);
- aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT));
//add the border distance of the paragraph
SfxItemSet aCoreSet1( GetPool(),
@@ -1206,19 +1206,19 @@ void SwView::StateTabWin(SfxItemSet& rSet)
0 );
rSh.GetCurAttr( aCoreSet1 );
const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSet1.Get(RES_BOX);
- aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT));
rSet.Put(aDistLR);
- nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft());
- nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight());
+ nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft());
+ nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight());
}
else if ( !rSh.IsDirectlyInSection() )
{
//get the page/header/footer border distance
const SwFrmFmt& rMaster = rDesc.GetMaster();
const SvxBoxItem& rBox = (const SvxBoxItem&)rMaster.GetAttrSet().Get(RES_BOX);
- aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT));
const SvxBoxItem* pBox = 0;
if(nFrmType & FRMTYPE_HEADER)
@@ -1238,8 +1238,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
if(pBox)
{
- aDistLR.SetLeft((USHORT)pBox->GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)pBox->GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)pBox->GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)pBox->GetDistance(BOX_LINE_RIGHT));
}
//add the border distance of the paragraph
@@ -1248,11 +1248,11 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 );
rSh.GetCurAttr( aCoreSetTmp );
const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSetTmp.Get(RES_BOX);
- aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT));
rSet.Put(aDistLR);
- nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft());
- nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight());
+ nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft());
+ nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight());
}
}
}
@@ -1266,7 +1266,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rSet.DisableItem(nWhich);
else
{
- BOOL bFlag = rSh.IsInRightToLeftText();
+ sal_Bool bFlag = rSh.IsInRightToLeftText();
rSet.Put(SfxBoolItem(nWhich, bFlag));
}
}
@@ -1274,13 +1274,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
case SID_RULER_BORDERS_VERTICAL:
case SID_RULER_BORDERS:
{
- BOOL bFrameRTL;
- BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection;
- BOOL bHasTable = ( IsTabColFromDoc() ||
+ sal_Bool bFrameRTL;
+ sal_Bool bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL) && bFrmSelection;
+ sal_Bool bHasTable = ( IsTabColFromDoc() ||
( rSh.GetTableFmt() && !bFrmSelection &&
!(nFrmType & FRMTYPE_COLSECT ) ) );
- BOOL bTableVertical = bHasTable && rSh.IsTableVertical();
+ sal_Bool bTableVertical = bHasTable && rSh.IsTableVertical();
if( ( (SID_RULER_BORDERS_VERTICAL == nWhich) &&
((bHasTable && !bTableVertical)||
@@ -1292,7 +1292,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if ( bHasTable )
{
SwTabCols aTabCols;
- USHORT nNum;
+ sal_uInt16 nNum;
if ( 0 != ( bSetTabColFromDoc = IsTabColFromDoc() ) )
{
rSh.GetMouseTabCols( aTabCols, aTabColFromDocPos );
@@ -1308,47 +1308,47 @@ void SwView::StateTabWin(SfxItemSet& rSet)
ASSERT(nNum <= aTabCols.Count(), "TabCol not found");
const int nLft = aTabCols.GetLeftMin() + aTabCols.GetLeft();
- const int nRgt = (USHORT)(bTableVertical ? nPageHeight : nPageWidth) -
+ const int nRgt = (sal_uInt16)(bTableVertical ? nPageHeight : nPageWidth) -
(aTabCols.GetLeftMin() +
aTabCols.GetRight());
- const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0);
- const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0);
+ const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0);
+ const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0);
SvxColumnItem aColItem(nNum, nL, nR);
- USHORT nStart = 0,
+ sal_uInt16 nStart = 0,
nEnd;
//columns in right-to-left tables need to be mirrored
- BOOL bIsTableRTL =
+ sal_Bool bIsTableRTL =
IsTabColFromDoc() ?
rSh.IsMouseTableRightToLeft(aTabColFromDocPos)
: rSh.IsTableRightToLeft();
if(bIsTableRTL)
{
- for ( USHORT i = aTabCols.Count(); i ; --i )
+ for ( sal_uInt16 i = aTabCols.Count(); i ; --i )
{
const SwTabColsEntry& rEntry = aTabCols.GetEntry( i - 1 );
- nEnd = (USHORT)aTabCols.GetRight();
- nEnd = nEnd - (USHORT)rEntry.nPos;
+ nEnd = (sal_uInt16)aTabCols.GetRight();
+ nEnd = nEnd - (sal_uInt16)rEntry.nPos;
SvxColumnDescription aColDesc( nStart, nEnd,
- (USHORT(aTabCols.GetRight() - rEntry.nMax)),
- (USHORT(aTabCols.GetRight() - rEntry.nMin)),
+ (sal_uInt16(aTabCols.GetRight() - rEntry.nMax)),
+ (sal_uInt16(aTabCols.GetRight() - rEntry.nMin)),
!aTabCols.IsHidden(i - 1) );
aColItem.Append(aColDesc);
nStart = nEnd;
}
SvxColumnDescription aColDesc(nStart,
- aTabCols.GetRight() - aTabCols.GetLeft(), TRUE);
+ aTabCols.GetRight() - aTabCols.GetLeft(), sal_True);
aColItem.Append(aColDesc);
}
else
{
- for ( USHORT i = 0; i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i )
{
const SwTabColsEntry& rEntry = aTabCols.GetEntry( i );
- nEnd = static_cast< USHORT >(rEntry.nPos - aTabCols.GetLeft());
+ nEnd = static_cast< sal_uInt16 >(rEntry.nPos - aTabCols.GetLeft());
SvxColumnDescription aColDesc( nStart, nEnd,
rEntry.nMin - aTabCols.GetLeft(), rEntry.nMax - aTabCols.GetLeft(),
!aTabCols.IsHidden(i) );
@@ -1357,7 +1357,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
SvxColumnDescription aColDesc(nStart, aTabCols.GetRight() - aTabCols.GetLeft(),
0, 0,
- TRUE);
+ sal_True);
aColItem.Append(aColDesc);
}
rSet.Put(aColItem, nWhich);
@@ -1365,7 +1365,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if ( bFrmSelection || nFrmType & ( FRMTYPE_COLUMN | FRMTYPE_COLSECT ) )
{
// Aus Rahmen oder Seite ?
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
if(bFrmSelection)
{
const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt();
@@ -1380,7 +1380,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
!bFrmSelection &&
nFrmType & FRMTYPE_COLSECT )
{
- const SwSection *pSect = rSh.GetAnySection(FALSE, pPt);
+ const SwSection *pSect = rSh.GetAnySection(sal_False, pPt);
ASSERT( pSect, "Welcher Bereich?");
if( pSect )
{
@@ -1394,14 +1394,14 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SwRect aRect = rSh.GetAnyCurRect(RECT_SECTION_PRT, pPt);
const SwRect aTmpRect = rSh.GetAnyCurRect(RECT_SECTION, pPt);
- ::lcl_FillSvxColumn(rCol, USHORT(bVerticalWriting ? aRect.Height() : aRect.Width()), aColItem, 0);
+ ::lcl_FillSvxColumn(rCol, sal_uInt16(bVerticalWriting ? aRect.Height() : aRect.Width()), aColItem, 0);
if(bVerticalWriting)
{
aRect.Pos() += Point(aTmpRect.Left(), aTmpRect.Top());
aRect.Pos().Y() -= rPageRect.Top();
- aColItem.SetLeft ((USHORT)(aRect.Top()));
- aColItem.SetRight((USHORT)(nPageHeight - aRect.Bottom() ));
+ aColItem.SetLeft ((sal_uInt16)(aRect.Top()));
+ aColItem.SetRight((sal_uInt16)(nPageHeight - aRect.Bottom() ));
}
else
{
@@ -1409,8 +1409,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
// PAGES01
// make relative to page position:
- aColItem.SetLeft ((USHORT)( aRect.Left() - rPageRect.Left() ));
- aColItem.SetRight((USHORT)( rPageRect.Right() - aRect.Right()));
+ aColItem.SetLeft ((sal_uInt16)( aRect.Left() - rPageRect.Left() ));
+ aColItem.SetRight((sal_uInt16)( rPageRect.Right() - aRect.Right()));
}
aColItem.SetOrtho(aColItem.CalcOrtho());
@@ -1432,24 +1432,24 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxColumnItem aColItem(nNum);
const SwRect &rSizeRect = rSh.GetAnyCurRect(RECT_FLY_PRT_EMBEDDED, pPt);
- BOOL bUseVertical = bFrameHasVerticalColumns || (!bFrmSelection && bVerticalWriting);
+ sal_Bool bUseVertical = bFrameHasVerticalColumns || (!bFrmSelection && bVerticalWriting);
const long lWidth = bUseVertical ? rSizeRect.Height() : rSizeRect.Width();
const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt);
long nDist2 = ((bUseVertical ? rRect.Height() : rRect.Width()) - lWidth) /2;
- ::lcl_FillSvxColumn(rCol, USHORT(lWidth), aColItem, nDist2);
+ ::lcl_FillSvxColumn(rCol, sal_uInt16(lWidth), aColItem, nDist2);
SfxItemSet aFrameSet(GetPool(), RES_LR_SPACE, RES_LR_SPACE);
rSh.GetFlyFrmAttr( aFrameSet );
if(bUseVertical)
{
- aColItem.SetLeft ((USHORT)(rRect.Top()- rPageRect.Top()));
- aColItem.SetRight((USHORT)(nPageHeight + rPageRect.Top() - rRect.Bottom() ));
+ aColItem.SetLeft ((sal_uInt16)(rRect.Top()- rPageRect.Top()));
+ aColItem.SetRight((sal_uInt16)(nPageHeight + rPageRect.Top() - rRect.Bottom() ));
}
else
{
- aColItem.SetLeft ((USHORT)(rRect.Left() - rPageRect.Left() ));
- aColItem.SetRight((USHORT)(rPageRect.Right() - rRect.Right() ));
+ aColItem.SetLeft ((sal_uInt16)(rRect.Left() - rPageRect.Left() ));
+ aColItem.SetRight((sal_uInt16)(rPageRect.Right() - rRect.Right() ));
}
aColItem.SetOrtho(aColItem.CalcOrtho());
@@ -1473,13 +1473,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const SvxBoxItem& rBox = (const SvxBoxItem&)rMaster.GetFmtAttr(RES_BOX);
long nDist = rBox.GetDistance();
::lcl_FillSvxColumn(aCol,
- USHORT(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width() ),
+ sal_uInt16(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width() ),
aColItem, nDist);
if(bBrowse)
{
- aColItem.SetLeft((USHORT)rPagePrtRect.Left());
- aColItem.SetRight(USHORT(nPageWidth - rPagePrtRect.Right()));
+ aColItem.SetLeft((sal_uInt16)rPagePrtRect.Left());
+ aColItem.SetRight(sal_uInt16(nPageWidth - rPagePrtRect.Right()));
}
else
{
@@ -1498,8 +1498,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
case SID_RULER_ROWS :
case SID_RULER_ROWS_VERTICAL:
{
- BOOL bFrameRTL;
- BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection;
+ sal_Bool bFrameRTL;
+ sal_Bool bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL) && bFrmSelection;
if( ( (SID_RULER_ROWS == nWhich) &&
((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) ) ||
@@ -1512,7 +1512,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
SwTabCols aTabCols;
//no current value necessary
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
if ( 0 != ( bSetTabRowFromDoc = IsTabRowFromDoc() ) )
{
rSh.GetMouseTabRows( aTabCols, aTabColFromDocPos );
@@ -1524,24 +1524,24 @@ void SwView::StateTabWin(SfxItemSet& rSet)
// ASSERT(nNum <= aTabCols.Count(), "TabCol not found");
const int nLft = aTabCols.GetLeftMin();
- const int nRgt = (USHORT)(bVerticalWriting ? nPageWidth : nPageHeight) -
+ const int nRgt = (sal_uInt16)(bVerticalWriting ? nPageWidth : nPageHeight) -
(aTabCols.GetLeftMin() +
aTabCols.GetRight());
- const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0);
- const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0);
+ const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0);
+ const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0);
SvxColumnItem aColItem(nNum, nL, nR);
- USHORT nStart = 0,
+ sal_uInt16 nStart = 0,
nEnd;
- for ( USHORT i = 0; i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i )
{
const SwTabColsEntry& rEntry = aTabCols.GetEntry( i );
if(bVerticalWriting)
{
- nEnd = USHORT(aTabCols.GetRight() - rEntry.nPos);
+ nEnd = sal_uInt16(aTabCols.GetRight() - rEntry.nPos);
SvxColumnDescription aColDesc( nStart, nEnd,
aTabCols.GetRight() - rEntry.nMax, aTabCols.GetRight() - rEntry.nMin,
!aTabCols.IsHidden(i) );
@@ -1549,18 +1549,18 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
else
{
- nEnd = USHORT(rEntry.nPos - aTabCols.GetLeft());
+ nEnd = sal_uInt16(rEntry.nPos - aTabCols.GetLeft());
SvxColumnDescription aColDesc( nStart, nEnd,
- USHORT(rEntry.nMin - aTabCols.GetLeft()), USHORT(rEntry.nMax - aTabCols.GetLeft()),
+ sal_uInt16(rEntry.nMin - aTabCols.GetLeft()), sal_uInt16(rEntry.nMax - aTabCols.GetLeft()),
!aTabCols.IsHidden(i) );
aColItem.Append(aColDesc);
}
nStart = nEnd;
}
if(bVerticalWriting)
- nEnd = static_cast< USHORT >(aTabCols.GetRight());
+ nEnd = static_cast< sal_uInt16 >(aTabCols.GetRight());
else
- nEnd = static_cast< USHORT >(aTabCols.GetLeft());
+ nEnd = static_cast< sal_uInt16 >(aTabCols.GetLeft());
// put a position protection when the last row cannot be moved
// due to a page break inside of a row
if(!aTabCols.IsLastRowAllowedToChange())
@@ -1568,7 +1568,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxColumnDescription aColDesc( nStart, nEnd,
aTabCols.GetRight(), aTabCols.GetRight(),
- FALSE );
+ sal_False );
aColItem.Append(aColDesc);
rSet.Put(aColItem, nWhich);
@@ -1594,15 +1594,15 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
if( nFrmType & FRMTYPE_TABLE )
{
- const USHORT nNum = rSh.GetCurTabColNum();
+ const sal_uInt16 nNum = rSh.GetCurTabColNum();
SwTabCols aTabCols;
rSh.GetTabCols( aTabCols );
const int nLft = aTabCols.GetLeftMin() + aTabCols.GetLeft();
- const int nRgt = (USHORT)nPageWidth -(aTabCols.GetLeftMin() + aTabCols.GetRight());
+ const int nRgt = (sal_uInt16)nPageWidth -(aTabCols.GetLeftMin() + aTabCols.GetRight());
- const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0);
- const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0);
+ const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0);
+ const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0);
aRectangle.Left() = nL;
if(nNum > 1)
@@ -1623,8 +1623,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const SwFmtCol* pCols = pFmt ? &pFmt->GetCol():
&rDesc.GetMaster().GetCol();
const SwColumns& rCols = pCols->GetColumns();
- USHORT nNum = rSh.GetCurOutColNum();
- USHORT nCount = Min(USHORT(nNum + 1), rCols.Count());
+ sal_uInt16 nNum = rSh.GetCurOutColNum();
+ sal_uInt16 nCount = Min(sal_uInt16(nNum + 1), rCols.Count());
const SwRect aRect( rSh.GetAnyCurRect( pFmt
? RECT_FLY_PRT_EMBEDDED
: RECT_PAGE_PRT, pPt ));
@@ -1633,14 +1633,14 @@ void SwView::StateTabWin(SfxItemSet& rSet)
: RECT_PAGE, pPt ));
//die Breite im Rahmen bzw. innerhalbe der Seitenraender
- const USHORT nTotalWidth = (USHORT)aRect.Width();
+ const sal_uInt16 nTotalWidth = (sal_uInt16)aRect.Width();
//die gesamte Rahmenbreite - die Differenz ist der doppelte Abstand zum Rand
- const USHORT nOuterWidth = (USHORT)aAbsRect.Width();
+ const sal_uInt16 nOuterWidth = (sal_uInt16)aAbsRect.Width();
int nWidth = 0,
nStart = 0,
nEnd = 0;
aRectangle.Left() = 0;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
SwColumn* pCol = rCols[i];
nStart = pCol->GetLeft() + nWidth;
@@ -1682,13 +1682,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if ( ((nFrmType & FRMTYPE_TABLE) || IsTabColFromDoc()) &&
!bFrmSelection )
{
- BOOL bColumn;
+ sal_Bool bColumn;
if ( IsTabColFromDoc() )
bColumn = rSh.GetCurMouseColNum( aTabColFromDocPos ) != 0;
else
bColumn = (nFrmType & (FRMTYPE_COLUMN|FRMTYPE_FLY_ANY|
FRMTYPE_COLSECTOUTTAB)) ?
- TRUE : FALSE;
+ sal_True : sal_False;
if ( !bColumn )
{
if( nFrmType & FRMTYPE_FLY_ANY && IsTabColFromDoc() )
@@ -1714,16 +1714,16 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
else
{ //hier nur fuer Tabelle in mehrspaltigen Seiten und Rahmen
- BOOL bSectOutTbl = (nFrmType & FRMTYPE_TABLE) ? TRUE : FALSE;
- BOOL bFrame = (nFrmType & FRMTYPE_FLY_ANY) ? TRUE : FALSE;
- BOOL bColSct = (nFrmType & ( bSectOutTbl
+ sal_Bool bSectOutTbl = (nFrmType & FRMTYPE_TABLE) ? sal_True : sal_False;
+ sal_Bool bFrame = (nFrmType & FRMTYPE_FLY_ANY) ? sal_True : sal_False;
+ sal_Bool bColSct = (nFrmType & ( bSectOutTbl
? FRMTYPE_COLSECTOUTTAB
: FRMTYPE_COLSECT )
- ) ? TRUE : FALSE;
+ ) ? sal_True : sal_False;
//Damit man auch mit der Mouse ziehen kann,
//ohne in der Tabelle zu stehen
CurRectType eRecType = RECT_PAGE_PRT;
- USHORT nNum = IsTabColFromDoc() ?
+ sal_uInt16 nNum = IsTabColFromDoc() ?
rSh.GetCurMouseColNum( aTabColFromDocPos ):
rSh.GetCurOutColNum();
const SwFrmFmt* pFmt = NULL;
@@ -1744,7 +1744,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const SwFmtCol* pCols = pFmt ? &pFmt->GetCol():
&rDesc.GetMaster().GetCol();
const SwColumns& rCols = pCols->GetColumns();
- const USHORT nBorder = pFmt ? pFmt->GetBox().GetDistance() :
+ const sal_uInt16 nBorder = pFmt ? pFmt->GetBox().GetDistance() :
rDesc.GetMaster().GetBox().GetDistance();
/* RECT_FLY_PRT_EMBEDDED returns the relative position to
@@ -1756,7 +1756,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aRect.Pos() += rSh.GetAnyCurRect( RECT_FLY_EMBEDDED,
pPt ).Pos();
- const USHORT nTotalWidth = (USHORT)aRect.Width();
+ const sal_uInt16 nTotalWidth = (sal_uInt16)aRect.Width();
//nStart und nEnd initialisieren fuer nNum == 0
int nWidth = 0,
nStart = 0,
@@ -1768,7 +1768,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
nNum = rCols.Count();
}
- for( USHORT i = 0; i < nNum; ++i )
+ for( sal_uInt16 i = 0; i < nNum; ++i )
{
SwColumn* pCol = rCols[i];
nStart = pCol->GetLeft() + nWidth;
@@ -1814,7 +1814,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
if(bFrmSelection)
{
- BYTE nProtect = pWrtShell->IsSelObjProtected( FLYPROTECT_SIZE|FLYPROTECT_POS|FLYPROTECT_CONTENT );
+ sal_uInt8 nProtect = pWrtShell->IsSelObjProtected( FLYPROTECT_SIZE|FLYPROTECT_POS|FLYPROTECT_CONTENT );
SvxProtectItem aProt(SID_RULER_PROTECT);
aProt.SetCntntProtect((nProtect & FLYPROTECT_CONTENT) != 0);
@@ -1827,8 +1827,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxProtectItem aProtect(SID_RULER_PROTECT);
if(bBrowse && !(nFrmType & (FRMTYPE_DRAWOBJ|FRMTYPE_COLUMN)) && !rSh.GetTableFmt())
{
- aProtect.SetSizeProtect(TRUE);
- aProtect.SetPosProtect(TRUE);
+ aProtect.SetSizeProtect(sal_True);
+ aProtect.SetPosProtect(sal_True);
}
rSet.Put(aProtect);
}
@@ -1840,7 +1840,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
if(bPutContentProtection)
{
SvxProtectItem aProtect(SID_RULER_PROTECT);
- aProtect.SetCntntProtect(TRUE);
+ aProtect.SetCntntProtect(sal_True);
rSet.Put(aProtect);
}
}
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index 9b847644234f..57eeb265e109 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -753,14 +753,14 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
case HANDLE_FIELD_AUTO_UPDATE:
{
SwFldUpdateFlags nFlags = mpDoc->getFieldUpdateFlags(true);
- BOOL bFieldUpd = (nFlags == AUTOUPD_FIELD_ONLY || nFlags == AUTOUPD_FIELD_AND_CHARTS );
+ sal_Bool bFieldUpd = (nFlags == AUTOUPD_FIELD_ONLY || nFlags == AUTOUPD_FIELD_AND_CHARTS );
rValue.setValue(&bFieldUpd, ::getBooleanCppuType());
}
break;
case HANDLE_CHART_AUTO_UPDATE:
{
SwFldUpdateFlags nFlags = mpDoc->getFieldUpdateFlags(true);
- BOOL bChartUpd = nFlags == AUTOUPD_FIELD_AND_CHARTS;
+ sal_Bool bChartUpd = nFlags == AUTOUPD_FIELD_AND_CHARTS;
rValue.setValue(&bChartUpd, ::getBooleanCppuType());
}
break;
diff --git a/sw/source/ui/uno/swdet2.cxx b/sw/source/ui/uno/swdet2.cxx
index cf27027148a7..2adba8f5c841 100644
--- a/sw/source/ui/uno/swdet2.cxx
+++ b/sw/source/ui/uno/swdet2.cxx
@@ -57,16 +57,16 @@ bool IsDocShellRegistered()
//-------------------------------------------------------------------------
-ULONG SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter )
+sal_uLong SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter )
{
- ULONG nRet = ERRCODE_NONE;
+ sal_uLong nRet = ERRCODE_NONE;
if( *ppFilter )
{
// verify the given filter
String aPrefFlt = (*ppFilter)->GetUserData();
// detection for TextFilter needs an additional checking
- BOOL bDetected = SwIoSystem::IsFileFilter( rMedium, aPrefFlt );
+ sal_Bool bDetected = SwIoSystem::IsFileFilter( rMedium, aPrefFlt );
return bDetected ? nRet : ERRCODE_ABORT;
}
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index aa54b4707935..133935a5330c 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -180,7 +180,7 @@ SwFilterDetect::~SwFilterDetect()
SfxApplication* pApp = SFX_APP();
SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() );
TransformParameters( SID_OPENDOC, lDescriptor, *pSet );
- SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
bWasReadOnly = pItem && pItem->GetValue();
@@ -200,8 +200,8 @@ SwFilterDetect::~SwFilterDetect()
else
{
// ctor of SfxMedium uses owner transition of ItemSet
- SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet );
- aMedium.UseInteractionHandler( TRUE );
+ SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet );
+ aMedium.UseInteractionHandler( sal_True );
if ( aMedium.GetErrorCode() == ERRCODE_NONE )
{
// remember input stream and content and put them into the descriptor later
@@ -210,7 +210,7 @@ SwFilterDetect::~SwFilterDetect()
xContent = aMedium.GetContent();
bReadOnly = aMedium.IsReadOnly();
- BOOL bIsStorage = aMedium.IsStorage();
+ sal_Bool bIsStorage = aMedium.IsStorage();
if ( bIsStorage )
{
uno::Reference< embed::XStorage > xStorage = aMedium.GetStorage( sal_False );
@@ -256,7 +256,7 @@ SwFilterDetect::~SwFilterDetect()
aTypeName = pPreFilter->GetTypeName();
}
- aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pPreFilter ? pPreFilter->IsOwnTemplateFormat() : FALSE, &aFilterName );
+ aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pPreFilter ? pPreFilter->IsOwnTemplateFormat() : sal_False, &aFilterName );
}
catch( lang::WrappedTargetException& aWrap )
{
@@ -329,9 +329,9 @@ SwFilterDetect::~SwFilterDetect()
else
pFilter = SfxFilterMatcher().GetFilter4EA( aTypeName );
- BOOL bTestWriter = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.TextDocument") ||
+ sal_Bool bTestWriter = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.TextDocument") ||
pFilter->GetServiceName().EqualsAscii("com.sun.star.text.WebDocument");
- BOOL bTestGlobal = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.GlobalDocument");
+ sal_Bool bTestGlobal = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.GlobalDocument");
const SfxFilter* pOrigFilter = NULL;
if ( !bTestWriter && !bTestGlobal && pFilter )
@@ -341,10 +341,10 @@ SwFilterDetect::~SwFilterDetect()
// example: HTML filter for Calc
pOrigFilter = pFilter;
pFilter = SfxFilterMatcher().GetFilter4EA( pFilter->GetTypeName() );
- bTestWriter = TRUE;
+ bTestWriter = sal_True;
}
- ULONG nErr = ERRCODE_NONE;
+ sal_uLong nErr = ERRCODE_NONE;
if ( pFilter || bTestWriter )
nErr = DetectFilter( aMedium, &pFilter );
if ( nErr != ERRCODE_NONE )
diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx
index d3c65df67ce5..507d6eb0c386 100644
--- a/sw/source/ui/uno/swdetect.hxx
+++ b/sw/source/ui/uno/swdetect.hxx
@@ -78,8 +78,8 @@ class SfxFilter;
class SwFilterDetect : public ::cppu::WeakImplHelper2< ::com::sun::star::document::XExtendedFilterDetection, ::com::sun::star::lang::XServiceInfo >
{
- static ULONG DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
- static ULONG GlobDetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
+ static sal_uLong DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
+ static sal_uLong GlobDetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
public:
SwFilterDetect( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
virtual ~SwFilterDetect();
diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index 4578ef27c2ea..f763792a3ef9 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -134,7 +134,7 @@ uno::Any SwXAutoTextContainer::getByIndex(sal_Int32 nIndex)
uno::Any aRet;
sal_uInt16 nCount = pGlossaries->GetGroupCnt();
if ( 0 <= nIndex && nIndex < nCount )
- aRet = getByName(pGlossaries->GetGroupName( static_cast< USHORT >(nIndex) ));
+ aRet = getByName(pGlossaries->GetGroupName( static_cast< sal_uInt16 >(nIndex) ));
else
throw lang::IndexOutOfBoundsException();
return aRet;
@@ -165,8 +165,8 @@ uno::Any SwXAutoTextContainer::getByName(const OUString& GroupName)
uno::Reference< text::XAutoTextGroup > xGroup;
if ( pGlossaries && hasByName( GroupName ) ) // group name already known?
- // TRUE = create group if not already available
- xGroup = pGlossaries->GetAutoTextGroup( GroupName, TRUE );
+ // sal_True = create group if not already available
+ xGroup = pGlossaries->GetAutoTextGroup( GroupName, sal_True );
if ( !xGroup.is() )
throw container::NoSuchElementException();
@@ -274,15 +274,15 @@ OUString SwXAutoTextContainer::getImplementationName(void) throw( uno::RuntimeEx
/* -----------------------------06.04.00 11:11--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXAutoTextContainer::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXAutoTextContainer::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
const uno::Sequence< OUString > aNames = SwXAutoTextContainer_getSupportedServiceNames();
for(sal_Int32 nService = 0; nService < aNames.getLength(); nService++)
{
if(aNames.getConstArray()[nService] == rServiceName)
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/* -----------------------------06.04.00 11:11--------------------------------
@@ -837,7 +837,7 @@ OUString SwXAutoTextGroup::getImplementationName(void) throw( uno::RuntimeExcept
/* -----------------------------06.04.00 11:11--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXAutoTextGroup::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXAutoTextGroup::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.text.AutoTextGroup") == rServiceName;
}
@@ -961,7 +961,7 @@ void SwXAutoTextEntry::GetBodyText ()
{
::vos::OGuard aGuard(Application::GetSolarMutex());
- xDocSh = pGlossaries->EditGroupDoc ( sGroupName, sEntryName, FALSE );
+ xDocSh = pGlossaries->EditGroupDoc ( sGroupName, sEntryName, sal_False );
DBG_ASSERT( xDocSh.Is(), "SwXAutoTextEntry::GetBodyText: unexpected: no doc returned by EditGroupDoc!" );
// start listening at the document
@@ -1159,7 +1159,7 @@ OUString SwXAutoTextEntry::getImplementationName(void) throw( uno::RuntimeExcept
/* -----------------------------06.04.00 11:11--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXAutoTextEntry::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
+sal_Bool SwXAutoTextEntry::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.text.AutoTextEntry") == rServiceName;
}
@@ -1220,7 +1220,7 @@ OUString SwAutoTextEventDescriptor::getImplementationName()
---------------------------------------------------------------------------*/
void SwAutoTextEventDescriptor::replaceByName(
- const USHORT nEvent,
+ const sal_uInt16 nEvent,
const SvxMacro& rMacro)
throw(
lang::IllegalArgumentException,
@@ -1242,7 +1242,7 @@ void SwAutoTextEventDescriptor::replaceByName(
if( pBlocks && !pBlocks->GetError())
{
- USHORT nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() );
+ sal_uInt16 nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() );
if( nIndex != USHRT_MAX )
{
SvxMacroTableDtor aMacroTable;
@@ -1263,7 +1263,7 @@ void SwAutoTextEventDescriptor::replaceByName(
---------------------------------------------------------------------------*/
void SwAutoTextEventDescriptor::getByName(
SvxMacro& rMacro,
- const USHORT nEvent )
+ const sal_uInt16 nEvent )
throw(
container::NoSuchElementException,
lang::WrappedTargetException,
@@ -1287,7 +1287,7 @@ void SwAutoTextEventDescriptor::getByName(
if ( pBlocks && !pBlocks->GetError())
{
- USHORT nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() );
+ sal_uInt16 nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() );
if( nIndex != USHRT_MAX )
{
SvxMacroTableDtor aMacroTable;
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index 06b9e62b4a94..0051d98324a7 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -154,11 +154,11 @@ static CloseResult CloseModelAndDocSh(
////////////////////////////////////////////////////////////
-static BOOL LoadFromURL_impl(
+static sal_Bool LoadFromURL_impl(
Reference< frame::XModel > &rxModel,
SfxObjectShellRef &rxDocSh,
const String &rURL,
- BOOL bClose )
+ sal_Bool bClose )
throw (RuntimeException)
{
// try to open the document readonly and hidden
@@ -176,7 +176,7 @@ static BOOL LoadFromURL_impl(
}
catch( Exception & )
{
- return FALSE;
+ return sal_False;
}
// try to get the DocShell
@@ -189,7 +189,7 @@ static BOOL LoadFromURL_impl(
pTmpDocShell = pTextDoc ? pTextDoc->GetDocShell() : 0;
}
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (xTmpModel.is() && pTmpDocShell) // everything available?
{
if (bClose)
@@ -197,7 +197,7 @@ static BOOL LoadFromURL_impl(
// set new stuff
rxModel = xTmpModel;
rxDocSh = pTmpDocShell;
- bRes = TRUE;
+ bRes = sal_True;
}
else
{
@@ -373,15 +373,15 @@ namespace
////////////////////////////////////////////////////////////
-static BOOL DeleteTmpFile_Impl(
+static sal_Bool DeleteTmpFile_Impl(
Reference< frame::XModel > &rxModel,
SfxObjectShellRef &rxDocSh,
const String &rTmpFileURL )
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (rTmpFileURL.Len())
{
- BOOL bDelete = TRUE;
+ sal_Bool bDelete = sal_True;
if ( eVetoed == CloseModelAndDocSh( rxModel, rxDocSh ) )
{
// somebody vetoed the closing, and took the ownership of the document
@@ -389,7 +389,7 @@ static BOOL DeleteTmpFile_Impl(
Reference< XEventListener > xEnsureDelete( new DelayedFileDeletion( rxModel, rTmpFileURL ) );
// note: as soon as #106931# is fixed, the whole DelayedFileDeletion is to be superseeded by
// a better solution
- bDelete = FALSE;
+ bDelete = sal_False;
}
rxModel = 0;
@@ -404,7 +404,7 @@ static BOOL DeleteTmpFile_Impl(
}
}
else
- bRes = TRUE; // file will be deleted delayed
+ bRes = sal_True; // file will be deleted delayed
}
return bRes;
}
@@ -494,7 +494,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
const OUString &rName = pArguments[i].Name;
const Any &rValue = pArguments[i].Value;
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
if (rName.equalsAscii( GetPropName( UNO_NAME_SELECTION ) ))
bOK = rValue >>= aCurSelection;
else if (rName.equalsAscii( GetPropName( UNO_NAME_RESULT_SET ) ))
@@ -513,7 +513,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
{
bOK = rValue >>= aCurDocumentURL;
if (aCurDocumentURL.getLength()
- && !LoadFromURL_impl( xCurModel, xCurDocSh, aCurDocumentURL, FALSE ))
+ && !LoadFromURL_impl( xCurModel, xCurDocSh, aCurDocumentURL, sal_False ))
throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to create document from URL: " ) ) + aCurDocumentURL, static_cast < cppu::OWeakObject * > ( this ) );
}
else if (rName.equalsAscii( GetPropName( UNO_NAME_OUTPUT_URL ) ))
@@ -624,7 +624,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
aCurSelection = aTranslated;
}
- SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, FALSE);
+ SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, sal_False);
SwView *pView = PTR_CAST( SwView, pFrame->GetViewShell() );
if (!pView)
throw RuntimeException();
@@ -690,7 +690,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
// aDescriptor[ svx::daColumnObject ] not used
aDescriptor[ svx::daSelection ] <<= aCurSelection;
- USHORT nMergeType;
+ sal_uInt16 nMergeType;
switch (nCurOutputType)
{
case MailMergeType::PRINTER : nMergeType = DBMGR_MERGE_MAILMERGE; break;
@@ -711,7 +711,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
uno::Reference< mail::XMailService > xInService;
if (MailMergeType::PRINTER == nCurOutputType)
{
- SwPrintData aPrtData = *SW_MOD()->GetPrtOptions( FALSE );
+ SwPrintData aPrtData = *SW_MOD()->GetPrtOptions( sal_False );
IDocumentDeviceAccess* pIDDA = rSh.getIDocumentDeviceAccess();
SwPrintData* pShellPrintData = pIDDA->getPrintData();
if (pShellPrintData)
@@ -823,13 +823,13 @@ uno::Any SAL_CALL SwXMailMerge::execute(
if ( !bStoredAsTemporary )
throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to save temporary file." ) ), static_cast < cppu::OWeakObject * > ( this ) );
- pMgr->SetMergeSilent( TRUE ); // suppress dialogs, message boxes, etc.
+ pMgr->SetMergeSilent( sal_True ); // suppress dialogs, message boxes, etc.
const SwXMailMerge *pOldSrc = pMgr->GetMailMergeEvtSrc();
DBG_ASSERT( !pOldSrc || pOldSrc == this, "Ooops... different event source already set." );
pMgr->SetMailMergeEvtSrc( this ); // launch events for listeners
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), xCurDocSh));
- BOOL bSucc = pMgr->MergeNew( aMergeDesc );
+ sal_Bool bSucc = pMgr->MergeNew( aMergeDesc );
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), xCurDocSh));
pMgr->SetMailMergeEvtSrc( pOldSrc );
@@ -965,7 +965,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
OUString aText;
bOK = rValue >>= aText;
if (aText.getLength()
- && !LoadFromURL_impl( xModel, xDocSh, aText, TRUE ))
+ && !LoadFromURL_impl( xModel, xDocSh, aText, sal_True ))
throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to create document from URL: " ) ) + aText, static_cast < cppu::OWeakObject * > ( this ) );
aDocumentURL = aText;
}
@@ -1038,7 +1038,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
if (bChanged)
{
PropertyChangeEvent aChgEvt( (XPropertySet *) this, rPropertyName,
- FALSE, pCur->nWID, aOld, rValue );
+ sal_False, pCur->nWID, aOld, rValue );
launchEvent( aChgEvt );
}
}
diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx
index 75b76b6de887..31e28fccb5d6 100644
--- a/sw/source/ui/uno/unomod.cxx
+++ b/sw/source/ui/uno/unomod.cxx
@@ -292,9 +292,9 @@ sal_Bool SwXModule::supportsService(const OUString& rServiceName) throw( Runtime
for(sal_Int32 nService = 0; nService < aNames.getLength(); nService++)
{
if(aNames.getConstArray()[nService] == rServiceName)
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/* -----------------------------06.04.00 10:59--------------------------------
@@ -685,10 +685,10 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
case HANDLE_VIEWSET_DRAWINGS : mpViewOption->SetDraw(bVal); break;
case HANDLE_VIEWSET_FIELD_COMMANDS : mpViewOption->SetFldName(bVal); break;
case HANDLE_VIEWSET_ANNOTATIONS : mpViewOption->SetPostIts(bVal); break;
- case HANDLE_VIEWSET_INDEX_MARK_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break;
+ case HANDLE_VIEWSET_INDEX_MARK_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break;
case HANDLE_VIEWSET_NONPRINTING_CHARACTERS: mpViewOption->SetViewMetaChars( bVal ); break;
- case HANDLE_VIEWSET_FOOTNOTE_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break;
- case HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break;
+ case HANDLE_VIEWSET_FOOTNOTE_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break;
+ case HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break;
case HANDLE_VIEWSET_PARA_BREAKS : mpViewOption->SetParagraph(bVal); break;
case HANDLE_VIEWSET_SOFT_HYPHENS : mpViewOption->SetSoftHyph(bVal); break;
case HANDLE_VIEWSET_SPACES : mpViewOption->SetBlank(bVal); break;
@@ -698,7 +698,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
case HANDLE_VIEWSET_HIDDEN_TEXT : mpViewOption->SetShowHiddenField(bVal); break;
case HANDLE_VIEWSET_HIDDEN_CHARACTERS : mpViewOption->SetShowHiddenChar(bVal); break;
case HANDLE_VIEWSET_HIDDEN_PARAGRAPHS : mpViewOption->SetShowHiddenPara(bVal); break;
- case HANDLE_VIEWSET_TABLE_BOUNDARIES : mpViewOption->SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bVal, TRUE); break;
+ case HANDLE_VIEWSET_TABLE_BOUNDARIES : mpViewOption->SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bVal, sal_True); break;
case HANDLE_VIEWSET_TEXT_BOUNDARIES : mpViewOption->SetDocBoundaries(bVal); break;
case HANDLE_VIEWSET_SMOOTH_SCROLLING : mpViewOption->SetSmoothScroll(bVal); break;
case HANDLE_VIEWSET_SOLID_MARK_HANDLES : mpViewOption->SetSolidMarkHdl(bVal); break;
@@ -890,13 +890,13 @@ void SwXViewSettings::_preGetValues ()
void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue )
throw(UnknownPropertyException, WrappedTargetException )
{
- sal_Bool bBool = TRUE;
+ sal_Bool bBool = sal_True;
sal_Bool bBoolVal;
switch( rInfo.mnHandle )
{
case HANDLE_VIEWSET_SHOW_RULER: bBoolVal = mpConstViewOption->IsViewAnyRuler(); break;
- case HANDLE_VIEWSET_HRULER : bBoolVal = mpConstViewOption->IsViewHRuler(TRUE); break;
- case HANDLE_VIEWSET_VRULER : bBoolVal = mpConstViewOption->IsViewVRuler(TRUE);break;
+ case HANDLE_VIEWSET_HRULER : bBoolVal = mpConstViewOption->IsViewHRuler(sal_True); break;
+ case HANDLE_VIEWSET_VRULER : bBoolVal = mpConstViewOption->IsViewVRuler(sal_True);break;
case HANDLE_VIEWSET_VRULER_RIGHT : bBoolVal = mpConstViewOption->IsVRulerRight();break;
case HANDLE_VIEWSET_HSCROLL: bBoolVal = mpConstViewOption->IsViewHScrollBar();break;
case HANDLE_VIEWSET_VSCROLL: bBoolVal = mpConstViewOption->IsViewVScrollBar();break;
@@ -926,28 +926,28 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u
case HANDLE_VIEWSET_IS_RASTER_VISIBLE : bBoolVal = mpConstViewOption->IsGridVisible(); break;
case HANDLE_VIEWSET_IS_SNAP_TO_RASTER : bBoolVal = mpConstViewOption->IsSnap(); break;
case HANDLE_VIEWSET_RASTER_RESOLUTION_X :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int32) TWIP_TO_MM100(mpConstViewOption->GetSnapSize().Width());
break;
case HANDLE_VIEWSET_RASTER_RESOLUTION_Y :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int32) TWIP_TO_MM100(mpConstViewOption->GetSnapSize().Height());
break;
case HANDLE_VIEWSET_RASTER_SUBDIVISION_X :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int32) mpConstViewOption->GetDivisionX();
break;
case HANDLE_VIEWSET_RASTER_SUBDIVISION_Y :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int32) mpConstViewOption->GetDivisionY();
break;
case HANDLE_VIEWSET_ZOOM :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int16)mpConstViewOption->GetZoom();
break;
case HANDLE_VIEWSET_ZOOM_TYPE:
{
- bBool = FALSE;
+ bBool = sal_False;
sal_Int16 nRet(0);
switch (mpConstViewOption->GetZoomType())
{
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index b0b95657600c..549988b106a3 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -191,7 +191,7 @@ SwPrintUIOptions * lcl_GetPrintUIOptions(
if (!pDocShell)
return NULL;
- const BOOL bWebDoc = NULL != dynamic_cast< const SwWebDocShell * >(pDocShell);
+ const sal_Bool bWebDoc = NULL != dynamic_cast< const SwWebDocShell * >(pDocShell);
const bool bSwSrcView = NULL != dynamic_cast< const SwSrcView * >(pView);
const SwView * pSwView = dynamic_cast< const SwView * >(pView);
const bool bHasSelection = pSwView ? pSwView->HasSelection( sal_False ) : false; // check for any selection, not just text selection
@@ -222,7 +222,7 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell )
{
// check if the view frame still exists
SfxViewFrame* pFound = SfxViewFrame::GetFirst( pDocShell,
- FALSE );
+ sal_False );
while(pFound)
{
if( pFound == pToClose)
@@ -232,7 +232,7 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell )
}
pFound = SfxViewFrame::GetNext( *pFound,
pDocShell,
- FALSE );
+ sal_False );
}
}
/* -----------------------------10.03.00 18:02--------------------------------
@@ -818,7 +818,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
0);
pSearch->FillSearchItemSet(aSearch);
pSearch->FillReplaceItemSet(aReplace);
- BOOL bCancel;
+ sal_Bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
@@ -830,7 +830,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
SwTxtFmtColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc());
SwTxtFmtColl *pReplaceColl = lcl_GetParaStyle(pSearch->sReplaceText, pUnoCrsr->GetDoc());;
- BOOL bCancel;
+ sal_Bool bCancel;
nResult = pUnoCrsr->Find( *pSearchColl,
eStart, eEnd, bCancel,
(FindRanges)eRanges, pReplaceColl );
@@ -839,8 +839,8 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
else
{
//todo/mba: assuming that notes should be omitted
- BOOL bSearchInNotes = FALSE;
- BOOL bCancel;
+ sal_Bool bSearchInNotes = sal_False;
+ sal_Bool bCancel;
nResult = pUnoCrsr->Find( aSearchOpt, bSearchInNotes,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
@@ -950,7 +950,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT,
0);
pSearch->FillSearchItemSet(aSearch);
- BOOL bCancel;
+ sal_Bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
@@ -962,7 +962,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
SwTxtFmtColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc());
//pSearch->sReplaceText
SwTxtFmtColl *pReplaceColl = 0;
- BOOL bCancel;
+ sal_Bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( *pSearchColl,
eStart, eEnd, bCancel,
(FindRanges)eRanges, pReplaceColl );
@@ -970,8 +970,8 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
else
{
//todo/mba: assuming that notes should be omitted
- BOOL bSearchInNotes = FALSE;
- BOOL bCancel;
+ sal_Bool bSearchInNotes = sal_False;
+ sal_Bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( aSearchOpt, bSearchInNotes,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
@@ -1088,7 +1088,7 @@ Sequence< beans::PropertyValue > SwXTextDocument::getPagePrintSettings(void)
pArray[6] = beans::PropertyValue(C2U("HoriMargin"), -1, aVal, PropertyState_DIRECT_VALUE);
aVal <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(aData.GetVertSpace());
pArray[7] = beans::PropertyValue(C2U("VertMargin"), -1, aVal, PropertyState_DIRECT_VALUE);
- BOOL bTemp = aData.GetLandscape();
+ sal_Bool bTemp = aData.GetLandscape();
aVal.setValue(&bTemp, ::getCppuBooleanType());
pArray[8] = beans::PropertyValue(C2U("IsLandscape"), -1, aVal, PropertyState_DIRECT_VALUE);
}
@@ -1120,7 +1120,7 @@ sal_uInt32 lcl_Any_To_ULONG(const Any& rValue, sal_Bool& bException)
/*-- 09.06.2004 12:18:10---------------------------------------------------
-----------------------------------------------------------------------*/
-String lcl_CreateOutlineString( USHORT nIndex,
+String lcl_CreateOutlineString( sal_uInt16 nIndex,
const SwOutlineNodes& rOutlineNodes, const SwNumRule* pOutlRule)
{
String sEntry;
@@ -1167,13 +1167,13 @@ void SwXTextDocument::setPagePrintSettings(const Sequence< beans::PropertyValue
{
if(!nVal || nVal > 0xff)
throw RuntimeException();
- aData.SetRow((BYTE)nVal);
+ aData.SetRow((sal_uInt8)nVal);
}
else if(COMPARE_EQUAL == sName.CompareToAscii("PageColumns"))
{
if(!nVal || nVal > 0xff)
throw RuntimeException();
- aData.SetCol((BYTE)nVal);
+ aData.SetCol((sal_uInt8)nVal);
}
else if(COMPARE_EQUAL == sName.CompareToAscii("LeftMargin"))
{
@@ -1536,7 +1536,7 @@ void SwXTextDocument::Reactivate(SwDocShell* pNewDocShell)
if(pDocShell && pDocShell != pNewDocShell)
Invalidate();
pDocShell = pNewDocShell;
- bObjectValid = TRUE;
+ bObjectValid = sal_True;
}
/*-- 18.12.98 11:55:26---------------------------------------------------
@@ -1914,9 +1914,9 @@ sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( R
)
return sal_True;
- BOOL bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell));
- BOOL bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell));
- BOOL bTextDoc = (!bWebDoc && !bGlobalDoc);
+ sal_Bool bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell));
+ sal_Bool bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell));
+ sal_Bool bTextDoc = (!bWebDoc && !bGlobalDoc);
return (
(bWebDoc && rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.WebDocument" ))) ||
@@ -1929,9 +1929,9 @@ sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( R
* --------------------------------------------------*/
Sequence< OUString > SwXTextDocument::getSupportedServiceNames(void) throw( RuntimeException )
{
- BOOL bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell));
- BOOL bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell));
- BOOL bTextDoc = (!bWebDoc && !bGlobalDoc);
+ sal_Bool bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell));
+ sal_Bool bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell));
+ sal_Bool bTextDoc = (!bWebDoc && !bGlobalDoc);
Sequence< OUString > aRet (3);
OUString* pArray = aRet.getArray();
@@ -2220,7 +2220,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
break;
case WID_DOC_HIDE_TIPS :
{
- BOOL bTemp = SW_MOD()->GetModuleConfig()->IsHideFieldTips();
+ sal_Bool bTemp = SW_MOD()->GetModuleConfig()->IsHideFieldTips();
aAny.setValue(&bTemp, ::getBooleanCppuType());
}
break;
@@ -2247,7 +2247,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
break;
case WID_DOC_TWO_DIGIT_YEAR:
{
- aAny <<= static_cast < sal_Int16 > (pDocShell->GetDoc()->GetNumberFormatter ( TRUE )->GetYear2000());
+ aAny <<= static_cast < sal_Int16 > (pDocShell->GetDoc()->GetNumberFormatter ( sal_True )->GetYear2000());
}
break;
case WID_DOC_AUTOMATIC_CONTROL_FOCUS:
@@ -2413,7 +2413,7 @@ void SwXTextDocument::updateLinks( ) throw(RuntimeException)
if( rLnkMan.GetLinks().Count() )
{
UnoActionContext aAction(pDoc);
- rLnkMan.UpdateAllLinks( FALSE, FALSE, TRUE );
+ rLnkMan.UpdateAllLinks( sal_False, sal_False, sal_True );
}
}
//XPropertyState
@@ -2741,7 +2741,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
// --> FME 2005-05-23 #122919# Force field update before PDF export:
- pWrtShell->ViewShell::UpdateFlds(TRUE);
+ pWrtShell->ViewShell::UpdateFlds(sal_True);
// <--
if( bStateChanged )
pRenderDocShell->EnableSetModified( sal_True );
@@ -2857,7 +2857,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
// determine the correct page number from the renderer index
// --> OD 2010-10-01 #i114875
// consider brochure print
- const USHORT nPage = bPrintProspect
+ const sal_uInt16 nPage = bPrintProspect
? nRenderer + 1
: m_pRenderData->GetPagesToPrint()[ nRenderer ];
// <--
@@ -3229,50 +3229,50 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages(
//USER STYLES
const SwCharFmts *pFmts = pDoc->GetCharFmts();
- for(USHORT i = 0; i < pFmts->Count(); ++i)
+ for(sal_uInt16 i = 0; i < pFmts->Count(); ++i)
{
const SwAttrSet &rAttrSet = (*pFmts)[i]->GetAttrSet();
LanguageType nLang = LANGUAGE_DONTKNOW;
if (bLatin)
{
- nLang = rAttrSet.GetLanguage( FALSE ).GetLanguage();
+ nLang = rAttrSet.GetLanguage( sal_False ).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bAsian)
{
- nLang = rAttrSet.GetCJKLanguage( FALSE ).GetLanguage();
+ nLang = rAttrSet.GetCJKLanguage( sal_False ).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bComplex)
{
- nLang = rAttrSet.GetCTLLanguage( FALSE ).GetLanguage();
+ nLang = rAttrSet.GetCTLLanguage( sal_False ).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
}
const SwTxtFmtColls *pColls = pDoc->GetTxtFmtColls();
- for (USHORT i = 0; i < pColls->Count(); ++i)
+ for (sal_uInt16 i = 0; i < pColls->Count(); ++i)
{
const SwAttrSet &rAttrSet = (*pColls)[i]->GetAttrSet();
LanguageType nLang = LANGUAGE_DONTKNOW;;
if (bLatin)
{
- nLang = rAttrSet.GetLanguage( FALSE ).GetLanguage();
+ nLang = rAttrSet.GetLanguage( sal_False ).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bAsian)
{
- nLang = rAttrSet.GetCJKLanguage( FALSE ).GetLanguage();
+ nLang = rAttrSet.GetCJKLanguage( sal_False ).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bComplex)
{
- nLang = rAttrSet.GetCTLLanguage( FALSE ).GetLanguage();
+ nLang = rAttrSet.GetCTLLanguage( sal_False ).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
@@ -3297,19 +3297,19 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages(
LanguageType nLang = LANGUAGE_DONTKNOW;
if (bLatin)
{
- nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_LANGUAGE, FALSE )).GetLanguage();
+ nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_LANGUAGE, sal_False )).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bAsian)
{
- nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CJK_LANGUAGE, FALSE )).GetLanguage();
+ nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CJK_LANGUAGE, sal_False )).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bComplex)
{
- nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CTL_LANGUAGE, FALSE )).GetLanguage();
+ nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CTL_LANGUAGE, sal_False )).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
@@ -3326,38 +3326,38 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages(
if(pOutliner)
{
EditEngine& rEditEng = (EditEngine&)pOutliner->GetEditEngine();
- ULONG nParCount = pOutliner->GetParagraphCount();
- for (ULONG nPar=0; nPar<nParCount; nPar++)
+ sal_uLong nParCount = pOutliner->GetParagraphCount();
+ for (sal_uLong nPar=0; nPar<nParCount; nPar++)
{
//every paragraph
SvUShorts aPortions;
- rEditEng.GetPortions( (USHORT)nPar, aPortions );
+ rEditEng.GetPortions( (sal_uInt16)nPar, aPortions );
- for ( USHORT nPos = aPortions.Count(); nPos; )
+ for ( sal_uInt16 nPos = aPortions.Count(); nPos; )
{
//every position
--nPos;
- USHORT nEnd = aPortions.GetObject( nPos );
- USHORT nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0;
- ESelection aSelection( (USHORT)nPar, nStart, (USHORT)nPar, nEnd );
+ sal_uInt16 nEnd = aPortions.GetObject( nPos );
+ sal_uInt16 nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0;
+ ESelection aSelection( (sal_uInt16)nPar, nStart, (sal_uInt16)nPar, nEnd );
SfxItemSet aAttr = rEditEng.GetAttribs( aSelection );
LanguageType nLang = LANGUAGE_DONTKNOW;
if (bLatin)
{
- nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE, FALSE )).GetLanguage();
+ nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE, sal_False )).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bAsian)
{
- nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CJK, FALSE )).GetLanguage();
+ nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CJK, sal_False )).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bComplex)
{
- nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CTL, FALSE )).GetLanguage();
+ nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CTL, sal_False )).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
@@ -3810,7 +3810,7 @@ Any lcl_GetDisplayBitmap(String sLinkSuffix)
if(USHRT_MAX != nImgId)
{
nImgId += 20000;
- BOOL bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
ImageList aEntryImages( SW_RES(bHighContrast ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP) );
const Image& rImage = aEntryImages.GetImage( nImgId );
Bitmap aBitmap( rImage.GetBitmapEx().GetBitmap() );
@@ -4130,15 +4130,15 @@ SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions)
// disable anything in the view that should not be printed (or exported to PDF) by default
// (see also dialog "Tools/Options - StarOffice Writer - Formatting Aids"
// in section "Display of ...")
- aRenderViewOptions.SetParagraph( FALSE ); // paragraph end
- aRenderViewOptions.SetSoftHyph( FALSE ); // aka custom hyphens
- aRenderViewOptions.SetBlank( FALSE ); // spaces
- aRenderViewOptions.SetHardBlank( FALSE ); // non-breaking spaces
- aRenderViewOptions.SetTab( FALSE ); // tabs
- aRenderViewOptions.SetLineBreak( FALSE ); // breaks (type 1)
- aRenderViewOptions.SetPageBreak( FALSE ); // breaks (type 2)
- aRenderViewOptions.SetColumnBreak( FALSE ); // breaks (type 3)
- BOOL bVal = pPrtOptions? pPrtOptions->bPrintHiddenText : FALSE;
+ aRenderViewOptions.SetParagraph( sal_False ); // paragraph end
+ aRenderViewOptions.SetSoftHyph( sal_False ); // aka custom hyphens
+ aRenderViewOptions.SetBlank( sal_False ); // spaces
+ aRenderViewOptions.SetHardBlank( sal_False ); // non-breaking spaces
+ aRenderViewOptions.SetTab( sal_False ); // tabs
+ aRenderViewOptions.SetLineBreak( sal_False ); // breaks (type 1)
+ aRenderViewOptions.SetPageBreak( sal_False ); // breaks (type 2)
+ aRenderViewOptions.SetColumnBreak( sal_False ); // breaks (type 3)
+ sal_Bool bVal = pPrtOptions? pPrtOptions->bPrintHiddenText : sal_False;
if (bContainsHiddenChars)
aRenderViewOptions.SetShowHiddenChar( bVal ); // hidden text
if (bContainsHiddenFields)
@@ -4149,16 +4149,16 @@ SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions)
if (bContainsPlaceHolders)
{
// should always be printed in PDF export!
- bVal = pPrtOptions ? pPrtOptions->bPrintTextPlaceholder : TRUE;
+ bVal = pPrtOptions ? pPrtOptions->bPrintTextPlaceholder : sal_True;
aRenderViewOptions.SetShowPlaceHolderFields( bVal );
}
if (bContainsFields)
- aRenderViewOptions.SetFldName( FALSE );
+ aRenderViewOptions.SetFldName( sal_False );
// we need to set this flag in order to get to see the visible effect of
// some of the above settings (needed for correct rendering)
- aRenderViewOptions.SetViewMetaChars( TRUE );
+ aRenderViewOptions.SetViewMetaChars( sal_True );
if (m_aOldViewOptions != aRenderViewOptions) // check if reformatting is necessary
{
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index c03935464abf..5e977275dfd8 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -797,11 +797,11 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
SwRubyList aList;
- USHORT nCount = pDoc->FillRubyList( *rSh.GetCrsr(), aList, 0 );
+ sal_uInt16 nCount = pDoc->FillRubyList( *rSh.GetCrsr(), aList, 0 );
Sequence< Sequence< PropertyValue > > aRet(nCount);
Sequence< PropertyValue >* pRet = aRet.getArray();
String aString;
- for(USHORT n = 0; n < nCount; n++)
+ for(sal_uInt16 n = 0; n < nCount; n++)
{
const SwRubyListEntryPtr pEntry = aList[n];
@@ -895,7 +895,7 @@ void SAL_CALL SwXTextView::setRubyList(
pEntry->GetRubyAttr().SetPosition(bValue ? 0 : 1);
}
}
- aList.Insert(pEntry, (USHORT)nPos);
+ aList.Insert(pEntry, (sal_uInt16)nPos);
}
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
pDoc->SetRubyList( *rSh.GetCrsr(), aList, 0 );
@@ -1058,7 +1058,7 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue(
if (nWID == WID_PAGE_COUNT)
nCount = m_pView->GetDocShell()->GetDoc()->GetPageCount();
else // WID_LINE_COUNT
- nCount = m_pView->GetWrtShell().GetLineCount( FALSE /*of whole document*/ );
+ nCount = m_pView->GetWrtShell().GetLineCount( sal_False /*of whole document*/ );
aRet <<= nCount;
}
break;
@@ -1070,7 +1070,7 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue(
const SwViewOption *pOpt = m_pView->GetWrtShell().GetViewOptions();
if (!pOpt)
throw RuntimeException();
- UINT32 nFlag = VIEWOPT_1_ONLINESPELL;
+ sal_uInt32 nFlag = VIEWOPT_1_ONLINESPELL;
sal_Bool bVal = 0 != (pOpt->GetCoreOptions() & nFlag);
aRet <<= bVal;
}
@@ -1129,7 +1129,7 @@ OUString SwXTextView::getImplementationName(void) throw( RuntimeException )
/* -----------------------------06.04.00 11:07--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTextView::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXTextView::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return rServiceName.equalsAscii("com.sun.star.text.TextDocumentView") ||
rServiceName.equalsAscii("com.sun.star.view.OfficeDocumentView");
@@ -1537,7 +1537,7 @@ sal_Bool SwXTextViewCursor::jumpToFirstPage(void) throw( uno::RuntimeException )
rSh.LeaveSelFrmMode();
}
rSh.EnterStdMode();
- bRet = rSh.SttEndDoc(TRUE);
+ bRet = rSh.SttEndDoc(sal_True);
}
else
throw uno::RuntimeException();
@@ -1559,7 +1559,7 @@ sal_Bool SwXTextViewCursor::jumpToLastPage(void) throw( uno::RuntimeException )
rSh.LeaveSelFrmMode();
}
rSh.EnterStdMode();
- bRet = rSh.SttEndDoc(FALSE);
+ bRet = rSh.SttEndDoc(sal_False);
rSh.SttPg();
}
else
@@ -1574,7 +1574,7 @@ sal_Bool SwXTextViewCursor::jumpToPage(sal_Int16 nPage) throw( uno::RuntimeExcep
::vos::OGuard aGuard(Application::GetSolarMutex());
sal_Bool bRet = sal_False;
if(m_pView)
- bRet = m_pView->GetWrtShell().GotoPage(nPage, TRUE);
+ bRet = m_pView->GetWrtShell().GotoPage(nPage, sal_True);
else
throw uno::RuntimeException();
return bRet;
@@ -1642,7 +1642,7 @@ sal_Int16 SwXTextViewCursor::getPage(void) throw( uno::RuntimeException )
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- nRet = (short)pShellCrsr->GetPageNum( TRUE, 0 );
+ nRet = (short)pShellCrsr->GetPageNum( sal_True, 0 );
}
else
throw uno::RuntimeException();
@@ -2078,7 +2078,7 @@ OUString SwXTextViewCursor::getImplementationName(void) throw( RuntimeException
/* -----------------------------06.04.00 11:07--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwXTextViewCursor::supportsService(const OUString& rServiceName) throw( RuntimeException )
+sal_Bool SwXTextViewCursor::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return !rServiceName.compareToAscii("com.sun.star.text.TextViewCursor") ||
!rServiceName.compareToAscii("com.sun.star.style.CharacterProperties") ||
@@ -2171,8 +2171,8 @@ uno::Reference< datatransfer::XTransferable > SAL_CALL SwXTextView::getTransfera
else
{
SwTransferable* pTransfer = new SwTransferable( rSh );
- const BOOL bLockedView = rSh.IsViewLocked();
- rSh.LockView( TRUE ); //lock visible section
+ const sal_Bool bLockedView = rSh.IsViewLocked();
+ rSh.LockView( sal_True ); //lock visible section
pTransfer->PrepareForCopy();
rSh.LockView( bLockedView );
return uno::Reference< datatransfer::XTransferable >( pTransfer );
@@ -2190,7 +2190,7 @@ void SAL_CALL SwXTextView::insertTransferable( const uno::Reference< datatransfe
{
SdrView *pSdrView = rSh.GetDrawView();
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
- pOLV->GetEditView().InsertText( xTrans, GetView()->GetDocShell()->GetMedium()->GetBaseURL(), FALSE );
+ pOLV->GetEditView().InsertText( xTrans, GetView()->GetDocShell()->GetMedium()->GetBaseURL(), sal_False );
}
else
{
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index 418ea4a4559b..1b4dcc90f82d 100644
--- a/sw/source/ui/utlui/attrdesc.cxx
+++ b/sw/source/ui/utlui/attrdesc.cxx
@@ -88,7 +88,7 @@ static sal_Char __READONLY_DATA sKomma[] = ", ";
SfxItemIter aIter( *this );
const IntlWrapper rInt( ::comphelper::getProcessServiceFactory(),
GetAppLanguage() );
- while( TRUE )
+ while( sal_True )
{
aIter.GetCurItem()->GetPresentation( ePres, eCoreMetric,
ePresMetric, aStr,
@@ -284,7 +284,7 @@ SfxItemPresentation SwRegisterItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF;
+ sal_uInt16 nId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -347,7 +347,7 @@ SfxItemPresentation SwParaConnectBorderItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF;
+ sal_uInt16 nId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -398,7 +398,7 @@ SfxItemPresentation SwFmtFrmSize::GetPresentation
{
rText += ',';
rText += ' ';
- const USHORT nId = ATT_FIX_SIZE == eFrmHeightType ?
+ const sal_uInt16 nId = ATT_FIX_SIZE == eFrmHeightType ?
STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT;
rText += SW_RESSTR( nId );
rText += ' ';
@@ -441,7 +441,7 @@ SfxItemPresentation SwFmtHeader::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- const USHORT nId = GetHeaderFmt() ? STR_HEADER : STR_NO_HEADER;
+ const sal_uInt16 nId = GetHeaderFmt() ? STR_HEADER : STR_NO_HEADER;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -471,7 +471,7 @@ SfxItemPresentation SwFmtFooter::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- const USHORT nId = GetFooterFmt() ? STR_FOOTER : STR_NO_FOOTER;
+ const sal_uInt16 nId = GetFooterFmt() ? STR_FOOTER : STR_NO_FOOTER;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -498,7 +498,7 @@ SfxItemPresentation SwFmtSurround::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( (SwSurround)GetValue() )
{
case SURROUND_NONE:
@@ -558,7 +558,7 @@ SfxItemPresentation SwFmtVertOrient::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetVertOrient() )
{
case text::VertOrientation::NONE:
@@ -619,7 +619,7 @@ SfxItemPresentation SwFmtHoriOrient::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetHoriOrient() )
{
case text::HoriOrientation::NONE:
@@ -679,7 +679,7 @@ SfxItemPresentation SwFmtAnchor::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetAnchorId() )
{
case FLY_AT_PARA:
@@ -752,7 +752,7 @@ SfxItemPresentation SwFmtCol::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nCnt = GetNumCols();
+ sal_uInt16 nCnt = GetNumCols();
if ( nCnt > 1 )
{
rText = String::CreateFromInt32(nCnt);
@@ -760,7 +760,7 @@ SfxItemPresentation SwFmtCol::GetPresentation
rText += SW_RESSTR( STR_COLUMNS );
if ( COLADJ_NONE != GetLineAdj() )
{
- USHORT nWdth = USHORT(GetLineWidth());
+ sal_uInt16 nWdth = sal_uInt16(GetLineWidth());
rText += ' ';
rText += SW_RESSTR( STR_LINE_WIDTH );
rText += ' ';
@@ -923,7 +923,7 @@ SfxItemPresentation SwFmtFtnEndAtTxtEnd::GetPresentation
// String sPrefix;
// String sSuffix;
// SvxNumberType aFmt;
-// USHORT nOffset;
+// sal_uInt16 nOffset;
// rText +=
}
break;
@@ -1026,7 +1026,7 @@ SfxItemPresentation SwTextGridItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetGridType() )
{
@@ -1092,7 +1092,7 @@ SfxItemPresentation SwMirrorGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId;
+ sal_uInt16 nId;
switch( GetValue() )
{
case RES_MIRROR_GRAPH_DONT: nId = STR_NO_MIRROR; break;
@@ -1197,7 +1197,7 @@ SfxItemPresentation SwChannelGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_COMPLETE:
if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
{
- USHORT nId;
+ sal_uInt16 nId;
switch ( Which() )
{
case RES_GRFATR_CHANNELR: nId = STR_CHANNELR; break;
@@ -1257,7 +1257,7 @@ SfxItemPresentation SwInvertGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_COMPLETE:
if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
{
- USHORT nId = 0 != GetValue() ? STR_INVERT : STR_INVERT_NOT;
+ sal_uInt16 nId = 0 != GetValue() ? STR_INVERT : STR_INVERT_NOT;
rText = SW_RESSTR( nId );
}
break;
@@ -1303,7 +1303,7 @@ SfxItemPresentation SwDrawModeGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_COMPLETE:
if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
{
- USHORT nId;
+ sal_uInt16 nId;
switch ( GetValue() )
{
@@ -1336,7 +1336,7 @@ SfxItemPresentation SwFmtFollowTextFlow::GetPresentation( SfxItemPresentation eP
break;
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW;
+ sal_uInt16 nId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW;
rText = SW_RESSTR( nId );
}
break;
diff --git a/sw/source/ui/utlui/bookctrl.cxx b/sw/source/ui/utlui/bookctrl.cxx
index 3b2567673020..5b112f84ba0d 100644
--- a/sw/source/ui/utlui/bookctrl.cxx
+++ b/sw/source/ui/utlui/bookctrl.cxx
@@ -63,10 +63,10 @@ class BookmarkPopup_Impl : public PopupMenu
public:
BookmarkPopup_Impl();
- USHORT GetCurId() const { return nCurId; }
+ sal_uInt16 GetCurId() const { return nCurId; }
private:
- USHORT nCurId;
+ sal_uInt16 nCurId;
virtual void Select();
};
@@ -88,8 +88,8 @@ void BookmarkPopup_Impl::Select()
// class SvxZoomStatusBarControl ------------------------------------------
-SwBookmarkControl::SwBookmarkControl( USHORT _nSlotId,
- USHORT _nId,
+SwBookmarkControl::SwBookmarkControl( sal_uInt16 _nSlotId,
+ sal_uInt16 _nId,
StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb )
{
@@ -104,7 +104,7 @@ SwBookmarkControl::~SwBookmarkControl()
// -----------------------------------------------------------------------
void SwBookmarkControl::StateChanged(
- USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+ sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
if( eState != SFX_ITEM_AVAILABLE || pState->ISA( SfxVoidItem ) )
GetStatusBar().SetItemText( GetId(), String() );
@@ -136,8 +136,8 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt )
{
IDocumentMarkAccess* const pMarkAccess = pWrtShell->getIDocumentMarkAccess();
IDocumentMarkAccess::const_iterator_t ppBookmarkStart = pMarkAccess->getBookmarksBegin();
- USHORT nPopupId = 1;
- ::std::map<sal_Int32, USHORT> aBookmarkIdx;
+ sal_uInt16 nPopupId = 1;
+ ::std::map<sal_Int32, sal_uInt16> aBookmarkIdx;
for(IDocumentMarkAccess::const_iterator_t ppBookmark = ppBookmarkStart;
ppBookmark != pMarkAccess->getBookmarksEnd();
ppBookmark++)
@@ -145,12 +145,12 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt )
if(IDocumentMarkAccess::BOOKMARK == IDocumentMarkAccess::GetType(**ppBookmark))
{
aPop.InsertItem( nPopupId, ppBookmark->get()->GetName() );
- aBookmarkIdx[nPopupId] = static_cast<USHORT>(ppBookmark - ppBookmarkStart);
+ aBookmarkIdx[nPopupId] = static_cast<sal_uInt16>(ppBookmark - ppBookmarkStart);
nPopupId++;
}
}
aPop.Execute( &GetStatusBar(), rCEvt.GetMousePosPixel());
- USHORT nCurrId = aPop.GetCurId();
+ sal_uInt16 nCurrId = aPop.GetCurId();
if( nCurrId != USHRT_MAX)
{
SfxUInt16Item aBookmark( FN_STAT_BOOKMARK, aBookmarkIdx[nCurrId] );
diff --git a/sw/source/ui/utlui/condedit.cxx b/sw/source/ui/utlui/condedit.cxx
index b534b538ca54..ed2379dae8b1 100644
--- a/sw/source/ui/utlui/condedit.cxx
+++ b/sw/source/ui/utlui/condedit.cxx
@@ -51,7 +51,7 @@ using namespace ::com::sun::star::uno;
ConditionEdit::ConditionEdit( Window* pParent, const ResId& rResId )
: Edit( pParent, rResId ),
DropTargetHelper( this ),
- bBrackets( TRUE ), bEnableDrop( TRUE )
+ bBrackets( sal_True ), bEnableDrop( sal_True )
{
}
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 6eab64f68a60..11456749c164 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -303,7 +303,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
case CONTENT_TYPE_BOOKMARK:
{
IDocumentMarkAccess* const pMarkAccess = pWrtShell->getIDocumentMarkAccess();
- nMemberCount = static_cast<USHORT>(count_if(
+ nMemberCount = static_cast<sal_uInt16>(count_if(
pMarkAccess->getBookmarksBegin(),
pMarkAccess->getBookmarksEnd(),
&lcl_IsUiVisibleBookmark));
@@ -336,7 +336,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
{
const String& rSectionName =
pFmt->GetSection()->GetSectionName();
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
SwSectionFmt* pParentFmt = pFmt->GetParent();
while(pParentFmt)
{
@@ -699,7 +699,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
{
String sSectionName = pFmt->GetSection()->GetSectionName();
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
SwSectionFmt* pParentFmt = pFmt->GetParent();
while(pParentFmt)
{
@@ -873,7 +873,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
pMember->Insert(pCnt);
nMemberCount++;
if(nOldMemberCount > (int)i &&
- (pOldMember->GetObject((USHORT)i))->IsInvisible() != pCnt->IsInvisible())
+ (pOldMember->GetObject((sal_uInt16)i))->IsInvisible() != pCnt->IsInvisible())
*pbLevelOrVisibiblityChanged = sal_True;
}
}
@@ -1352,7 +1352,7 @@ void SwContentTree::Display( sal_Bool bActive )
{
if(!bIsImageListInitialized)
{
- USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
bIsImageListInitialized = sal_True;
}
@@ -2304,7 +2304,7 @@ DragDropMode SwContentTree::NotifyStartDrag(
sal_Bool SwContentTree::NotifyMoving( SvLBoxEntry* pTarget,
- SvLBoxEntry* pEntry, SvLBoxEntry*& , ULONG& )
+ SvLBoxEntry* pEntry, SvLBoxEntry*& , sal_uLong& )
{
if(!bDocChgdInDragging)
{
@@ -2344,7 +2344,7 @@ sal_Bool SwContentTree::NotifyMoving( SvLBoxEntry* pTarget,
sal_Bool SwContentTree::NotifyCopying( SvLBoxEntry* pTarget,
- SvLBoxEntry* pEntry, SvLBoxEntry*& , ULONG& )
+ SvLBoxEntry* pEntry, SvLBoxEntry*& , sal_uLong& )
{
if(!bDocChgdInDragging)
{
@@ -2476,7 +2476,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
!pActiveShell->GetView().GetDocShell()->IsReadOnly())
{
EditEntry(pEntry, EDIT_MODE_DELETE);
- bViewHasChanged = TRUE;
+ bViewHasChanged = sal_True;
GetParentWindow()->UpdateListBox();
TimerUpdate(&aUpdTimer);
GrabFocus();
@@ -2494,7 +2494,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
{
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
@@ -2593,13 +2593,13 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
else
Help::ShowQuickHelp( this, aItemRect, sEntry,
QUICKHELP_LEFT|QUICKHELP_VCENTER );
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
else
{
Help::ShowQuickHelp( this, Rectangle(), aEmptyStr, 0 );
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
}
@@ -2612,7 +2612,7 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
***************************************************************************/
-void SwContentTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
+void SwContentTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
{
SvLBoxEntry* pFirst = FirstSelected();
switch( nSelectedPopupEntry )
@@ -3193,7 +3193,7 @@ sal_Bool NaviContentBookmark::Paste( TransferableDataHelper& rData )
xub_StrLen nPos = 0;
aUrl = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos );
aDescr = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos );
- nDefDrag= (USHORT)sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32();
+ nDefDrag= (sal_uInt16)sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32();
nDocSh = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32();
}
return bRet;
@@ -3255,7 +3255,7 @@ void SwContentTree::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
FindActiveTypeAndRemoveUserData();
Display(sal_True);
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index d8849b48e10f..2b7efb0037b5 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -153,17 +153,17 @@ static const char* __FAR_DATA aHelpForMenu[] =
---------------------------------------------------------------------------*/
class SwGlobalFrameListener_Impl : public SfxListener
{
- BOOL bValid;
+ sal_Bool bValid;
public:
SwGlobalFrameListener_Impl(SfxViewFrame& rFrame) :
- bValid(TRUE)
+ bValid(sal_True)
{
StartListening(rFrame);
}
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- BOOL IsValid() const {return bValid;}
+ sal_Bool IsValid() const {return bValid;}
};
/* -----------------------------24.08.00 12:05--------------------------------
@@ -172,7 +172,7 @@ void SwGlobalFrameListener_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHi
{
if( rHint.ISA(SfxSimpleHint) &&
(((SfxSimpleHint&) rHint).GetId() == SFX_HINT_DYING))
- bValid = FALSE;
+ bValid = sal_False;
}
/*-----------------12.06.97 09:38-------------------
@@ -190,9 +190,9 @@ SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) :
pDocContent ( NULL ),
pDocInserter ( NULL ),
- bIsInternalDrag ( FALSE ),
- bLastEntryEmphasis ( FALSE ),
- bIsImageListInitialized ( FALSE )
+ bIsInternalDrag ( sal_False ),
+ bLastEntryEmphasis ( sal_False ),
+ bIsImageListInitialized ( sal_False )
{
SetDragDropMode(SV_DRAGDROP_APP_COPY |
@@ -202,7 +202,7 @@ SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) :
aUpdateTimer.SetTimeout(GLOBAL_UPDATE_TIMEOUT);
aUpdateTimer.SetTimeoutHdl(LINK(this, SwGlobalTree, Timeout));
aUpdateTimer.Start();
- for(USHORT i = 0; i < GLOBAL_CONTEXT_COUNT; i++)
+ for(sal_uInt16 i = 0; i < GLOBAL_CONTEXT_COUNT; i++)
{
aContextStrings[i] = SW_RESSTR(i+ ST_GLOBAL_CONTEXT_FIRST);
}
@@ -230,19 +230,19 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
SvLBoxEntry* pLast = (SvLBoxEntry*)LastVisible();
if(pEmphasisEntry)
{
- ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE );
+ ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False );
pEmphasisEntry = 0;
}
else if(bLastEntryEmphasis && pLast)
{
- ImplShowTargetEmphasis( pLast, FALSE);
+ ImplShowTargetEmphasis( pLast, sal_False);
}
SvLBoxEntry* pDropEntry = bLastEntryEmphasis ? 0 : GetEntry(rEvt.maPosPixel);
if( bIsInternalDrag )
{
SvLBoxEntry* pDummy = 0;
- ULONG nInsertionPos = LIST_APPEND;
+ sal_uLong nInsertionPos = LIST_APPEND;
NotifyMoving( pDropEntry, pDDSource, pDummy, nInsertionPos );
}
else
@@ -260,12 +260,12 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
int nAbsContPos = pDropEntry ?
(int) GetModel()->GetAbsPos(pDropEntry):
- 1;
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
// Daten holen
FileList aFileList;
aData.GetFileList( FORMAT_FILE_LIST, aFileList );
- for ( USHORT n = (USHORT)aFileList.Count(); n--; )
+ for ( sal_uInt16 n = (sal_uInt16)aFileList.Count(); n--; )
{
sFileName = aFileList.GetFile(n);
InsertRegion(pCnt, &sFileName);
@@ -281,7 +281,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
nEntryCount++;
nAbsContPos++;
- pCnt = pTempContents->GetObject( static_cast< USHORT >(nAbsContPos) );
+ pCnt = pTempContents->GetObject( static_cast< sal_uInt16 >(nAbsContPos) );
}
}
}
@@ -299,7 +299,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
}
}
}
- bLastEntryEmphasis = FALSE;
+ bLastEntryEmphasis = sal_False;
return nRet;
}
@@ -317,14 +317,14 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
{
if( pEmphasisEntry )
{
- ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE );
+ ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False );
pEmphasisEntry = 0;
}
else if(bLastEntryEmphasis && pLast)
{
- ImplShowTargetEmphasis( pLast, FALSE);
+ ImplShowTargetEmphasis( pLast, sal_False);
}
- bLastEntryEmphasis = FALSE;
+ bLastEntryEmphasis = sal_False;
}
else
{
@@ -346,11 +346,11 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
nRet = DND_ACTION_LINK;
if(pEmphasisEntry && pEmphasisEntry != pDropEntry)
- ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE );
+ ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False );
else if(pLast && bLastEntryEmphasis && pDropEntry)
{
- ImplShowTargetEmphasis( pLast, FALSE);
- bLastEntryEmphasis = FALSE;
+ ImplShowTargetEmphasis( pLast, sal_False);
+ bLastEntryEmphasis = sal_False;
}
if(pDropEntry)
@@ -358,7 +358,7 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
else if(pLast)
{
ImplShowTargetEmphasis( pLast, DND_ACTION_NONE != nRet );
- bLastEntryEmphasis = TRUE;
+ bLastEntryEmphasis = sal_True;
}
pEmphasisEntry = pDropEntry;
}
@@ -373,12 +373,12 @@ PopupMenu* SwGlobalTree::CreateContextMenu()
if(pActiveShell &&
!pActiveShell->GetView().GetDocShell()->IsReadOnly())
{
- USHORT nEnableFlags = GetEnableFlags();
+ sal_uInt16 nEnableFlags = GetEnableFlags();
pPop = new PopupMenu;
PopupMenu* pSubPop1 = new PopupMenu;
PopupMenu* pSubPop2 = new PopupMenu;
- for (USHORT i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
+ for (sal_uInt16 i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
{
pSubPop2->InsertItem( i, aContextStrings[ST_UPDATE_SEL - ST_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] );
pSubPop2->SetHelpId(i, aHelpForMenu[i]);
@@ -430,13 +430,13 @@ PopupMenu* SwGlobalTree::CreateContextMenu()
/*-----------------16.06.97 10:41-------------------
--------------------------------------------------*/
-void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox)
+void SwGlobalTree::TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox)
{
- USHORT nEnableFlags = GetEnableFlags();
+ sal_uInt16 nEnableFlags = GetEnableFlags();
if(FN_GLOBAL_OPEN == nTbxId)
{
PopupMenu *pMenu = new PopupMenu;
- for (USHORT i = CTX_INSERT_ANY_INDEX; i <= CTX_INSERT_TEXT; i++)
+ for (sal_uInt16 i = CTX_INSERT_ANY_INDEX; i <= CTX_INSERT_TEXT; i++)
{
pMenu->InsertItem( i, aContextStrings[ST_INDEX - ST_GLOBAL_CONTEXT_FIRST - CTX_INSERT_ANY_INDEX + i] );
pMenu->SetHelpId(i, aHelpForMenu[i] );
@@ -456,7 +456,7 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox)
else if(FN_GLOBAL_UPDATE == nTbxId)
{
PopupMenu *pMenu = new PopupMenu;
- for (USHORT i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
+ for (sal_uInt16 i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
{
pMenu->InsertItem( i, aContextStrings[ST_UPDATE_SEL - ST_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] );
pMenu->SetHelpId(i, aHelpForMenu[i] );
@@ -472,14 +472,14 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox)
/*-----------------16.06.97 11:02-------------------
--------------------------------------------------*/
-USHORT SwGlobalTree::GetEnableFlags() const
+sal_uInt16 SwGlobalTree::GetEnableFlags() const
{
SvLBoxEntry* pEntry = FirstSelected();
- USHORT nSelCount = (USHORT)GetSelectionCount();
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nSelCount = (sal_uInt16)GetSelectionCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
SvLBoxEntry* pPrevEntry = pEntry ? Prev(pEntry) : 0;
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if(nSelCount == 1 || !nEntryCount)
nRet |= ENABLE_INSERT_IDX|ENABLE_INSERT_FILE;
if(nSelCount == 1)
@@ -507,9 +507,9 @@ USHORT SwGlobalTree::GetEnableFlags() const
--------------------------------------------------*/
void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
{
- BOOL bParent = TRUE;
- Update(TRUE);
- Display(TRUE);
+ sal_Bool bParent = sal_True;
+ Update(sal_True);
+ Display(sal_True);
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
@@ -518,7 +518,7 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
(const SwGlblDocContent*)pEntry->GetUserData() : 0;
if( pCont && GLBLDOC_SECTION == pCont->GetType())
{
- bParent = FALSE;
+ bParent = sal_False;
SvLBoxTab* pTab;
SvLBoxItem* pItem = GetItem( pEntry, aPos.X(), &pTab );
if(pItem && SV_ITEM_ID_LBOXSTRING == pItem->IsA())
@@ -558,11 +558,11 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
void SwGlobalTree::SelectHdl()
{
- USHORT nSelCount = (USHORT)GetSelectionCount();
+ sal_uInt16 nSelCount = (sal_uInt16)GetSelectionCount();
SvLBoxEntry* pSel = FirstSelected();
- USHORT nAbsPos = pSel ? (USHORT)GetModel()->GetAbsPos(pSel) : 0;
+ sal_uInt16 nAbsPos = pSel ? (sal_uInt16)GetModel()->GetAbsPos(pSel) : 0;
SwNavigationPI* pNavi = GetParentWindow();
- BOOL bReadonly = !pActiveShell ||
+ sal_Bool bReadonly = !pActiveShell ||
pActiveShell->GetView().GetDocShell()->IsReadOnly();
pNavi->aGlobalToolBox.EnableItem(FN_GLOBAL_EDIT, nSelCount == 1 && !bReadonly);
pNavi->aGlobalToolBox.EnableItem(FN_GLOBAL_OPEN, nSelCount <= 1 && !bReadonly);
@@ -570,7 +570,7 @@ void SwGlobalTree::SelectHdl()
pNavi->aGlobalToolBox.EnableItem(FN_ITEM_UP,
nSelCount == 1 && nAbsPos && !bReadonly);
pNavi->aGlobalToolBox.EnableItem(FN_ITEM_DOWN,
- nSelCount == 1 && nAbsPos < ((USHORT)GetEntryCount()) - 1 && !bReadonly);
+ nSelCount == 1 && nAbsPos < ((sal_uInt16)GetEntryCount()) - 1 && !bReadonly);
}
/*-----------------16.06.97 16:15-------------------
@@ -587,7 +587,7 @@ void SwGlobalTree::DeselectHdl()
DragDropMode SwGlobalTree::NotifyStartDrag( TransferDataContainer& ,
SvLBoxEntry* pEntry )
{
- bIsInternalDrag = TRUE;
+ bIsInternalDrag = sal_True;
pDDSource = pEntry;
return SV_DRAGDROP_CTRL_MOVE;
}
@@ -603,37 +603,37 @@ long SwGlobalTree::GetTabPos( SvLBoxEntry*, SvLBoxTab* pTab)
/*-----------------12.06.97 09:38-------------------
--------------------------------------------------*/
-BOOL SwGlobalTree::NotifyMoving( SvLBoxEntry* pTarget,
+sal_Bool SwGlobalTree::NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry*&,
- ULONG&
+ sal_uLong&
)
{
SvTreeList* _pModel = GetModel();
- USHORT nSource = (USHORT) _pModel->GetAbsPos(pSource);
- USHORT nDest = pTarget ? (USHORT) _pModel->GetAbsPos(pTarget) : pSwGlblDocContents->Count();
+ sal_uInt16 nSource = (sal_uInt16) _pModel->GetAbsPos(pSource);
+ sal_uInt16 nDest = pTarget ? (sal_uInt16) _pModel->GetAbsPos(pTarget) : pSwGlblDocContents->Count();
if( pActiveShell->MoveGlobalDocContent(
*pSwGlblDocContents, nSource, nSource + 1, nDest ) &&
- Update( FALSE ))
+ Update( sal_False ))
Display();
- return FALSE;
+ return sal_False;
}
/*-----------------12.06.97 09:39-------------------
--------------------------------------------------*/
-BOOL SwGlobalTree::NotifyCopying( SvLBoxEntry* /*pTarget*/,
+sal_Bool SwGlobalTree::NotifyCopying( SvLBoxEntry* /*pTarget*/,
SvLBoxEntry* /*pEntry*/,
SvLBoxEntry*& /*rpNewParent*/,
- ULONG& /*rNewChildPos*/
+ sal_uLong& /*rNewChildPos*/
)
{
- return FALSE;
+ return sal_False;
}
/*-----------------12.06.97 09:39-------------------
--------------------------------------------------*/
-BOOL SwGlobalTree::NotifyAcceptDrop( SvLBoxEntry* pEntry)
+sal_Bool SwGlobalTree::NotifyAcceptDrop( SvLBoxEntry* pEntry)
{
return pEntry != 0;
}
@@ -651,7 +651,7 @@ void SwGlobalTree::StartDrag( sal_Int8 nAction, const Point& rPt )
void SwGlobalTree::DragFinished( sal_Int8 nAction )
{
SvTreeListBox::DragFinished( nAction );
- bIsInternalDrag = FALSE;
+ bIsInternalDrag = sal_False;
}
/***************************************************************************
@@ -661,7 +661,7 @@ void SwGlobalTree::DragFinished( sal_Int8 nAction )
void SwGlobalTree::MouseButtonDown( const MouseEvent& rMEvt )
{
Point aPos( rMEvt.GetPosPixel());
- SvLBoxEntry* pEntry = GetEntry( aPos, TRUE );
+ SvLBoxEntry* pEntry = GetEntry( aPos, sal_True );
if( !pEntry && rMEvt.IsLeft() && rMEvt.IsMod1() && (rMEvt.GetClicks() % 2) == 0)
Control::MouseButtonDown( rMEvt );
else
@@ -673,7 +673,7 @@ void SwGlobalTree::MouseButtonDown( const MouseEvent& rMEvt )
--------------------------------------------------*/
void SwGlobalTree::GetFocus()
{
- if(Update( FALSE ))
+ if(Update( sal_False ))
Display();
SvTreeListBox::GetFocus();
}
@@ -709,19 +709,19 @@ void SwGlobalTree::Clear()
/*-----------------12.06.97 12:38-------------------
--------------------------------------------------*/
-void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
+void SwGlobalTree::Display(sal_Bool bOnlyUpdateUserData)
{
if(!bIsImageListInitialized)
{
- USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
- bIsImageListInitialized = TRUE;
+ bIsImageListInitialized = sal_True;
}
- USHORT nCount = pSwGlblDocContents->Count();
+ sal_uInt16 nCount = pSwGlblDocContents->Count();
if(bOnlyUpdateUserData && GetEntryCount() == pSwGlblDocContents->Count())
{
SvLBoxEntry* pEntry = First();
- for( USHORT i = 0; i < nCount; i++)
+ for( sal_uInt16 i = 0; i < nCount; i++)
{
SwGlblDocContentPtr pCont = pSwGlblDocContents->GetObject(i);
pEntry->SetUserData(pCont);
@@ -730,21 +730,21 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
}
else
{
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
SvLBoxEntry* pOldSelEntry = FirstSelected();
String sEntryName; // Name des Eintrags
- USHORT nSelPos = USHRT_MAX;
+ sal_uInt16 nSelPos = USHRT_MAX;
if(pOldSelEntry)
{
sEntryName = GetEntryText(pOldSelEntry);
- nSelPos = (USHORT)GetModel()->GetAbsPos(pOldSelEntry);
+ nSelPos = (sal_uInt16)GetModel()->GetAbsPos(pOldSelEntry);
}
Clear();
if(!pSwGlblDocContents)
- Update( FALSE );
+ Update( sal_False );
SvLBoxEntry* pSelEntry = 0;
- for( USHORT i = 0; i < nCount; i++)
+ for( sal_uInt16 i = 0; i < nCount; i++)
{
SwGlblDocContentPtr pCont = pSwGlblDocContents->GetObject(i);
String sEntry;
@@ -773,7 +773,7 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
break;
}
SvLBoxEntry* pEntry = InsertEntry(sEntry, aImage, aImage,
- 0, FALSE, LIST_APPEND, pCont);
+ 0, sal_False, LIST_APPEND, pCont);
if(sEntry == sEntryName)
{
pSelEntry = pEntry;
@@ -791,7 +791,7 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
Select(First());
else
SelectHdl();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
}
@@ -825,7 +825,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const String* pF
--------------------------------------------------*/
void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
{
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
switch( pCont->GetType() )
{
case GLBLDOC_UNKNOWN:
@@ -852,7 +852,7 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
if(nSlot)
{
pActiveShell->GetView().GetViewFrame()->GetDispatcher()->Execute(nSlot);
- if(Update( FALSE ))
+ if(Update( sal_False ))
Display();
}
}
@@ -863,15 +863,15 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
IMPL_LINK( SwGlobalTree, PopupHdl, Menu* , pMenu)
{
ExcecuteContextMenuAction( pMenu->GetCurItemId());
- return TRUE;
+ return sal_True;
}
/* -----------------26.08.2003 11:57-----------------
--------------------------------------------------*/
-void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
+void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
//IMPL_LINK( SwGlobalTree, PopupHdl, Menu* , pMenu)
{
-// USHORT nId = pMenu->GetCurItemId();
+// sal_uInt16 nId = pMenu->GetCurItemId();
SvLBoxEntry* pEntry = FirstSelected();
SwGlblDocContent* pCont = pEntry ? (SwGlblDocContent*)pEntry->GetUserData() : 0;
// wird waehrend des Dialogs ein RequestHelp gerufen,
@@ -881,7 +881,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
if(pCont)
pContCopy = new SwGlblDocContent(pCont->GetDocPos());
SfxDispatcher& rDispatch = *pActiveShell->GetView().GetViewFrame()->GetDispatcher();
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
bool bDeleteContentCopy = true;
switch( nSelectedPopupEntry )
{
@@ -920,7 +920,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
case CTX_UPDATE_LINK:
case CTX_UPDATE_ALL:
{
- pActiveShell->GetLinkManager().UpdateAllLinks(TRUE);
+ pActiveShell->GetLinkManager().UpdateAllLinks(sal_True);
if(CTX_UPDATE_ALL == nSelectedPopupEntry)
nSlot = FN_UPDATE_TOX;
pCont = 0;
@@ -952,7 +952,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
{
pActiveShell->DeleteGlobalDocContent(
pTempContents ? *pTempContents : *pSwGlblDocContents,
- (USHORT)GetModel()->GetAbsPos(pSelEntry));
+ (sal_uInt16)GetModel()->GetAbsPos(pSelEntry));
pSelEntry = PrevSelected(pSelEntry);
if(pSelEntry)
{
@@ -987,7 +987,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
*pActiveShell,
0,
USHRT_MAX,
- TRUE);
+ sal_True);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
@@ -1016,7 +1016,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
SfxViewFrame* pGlobFrm = pActiveShell->GetView().GetViewFrame();
SwGlobalFrameListener_Impl aFrmListener(*pGlobFrm);
- ULONG nEntryPos = pEntry ? GetModel()->GetAbsPos(pEntry) : (ULONG)-1;
+ sal_uLong nEntryPos = pEntry ? GetModel()->GetAbsPos(pEntry) : (sal_uLong)-1;
// neues Dok anlegen
SfxStringItem aFactory(SID_NEWDOCDIRECT,
SwDocShell::Factory().GetFilterContainer()->GetName());
@@ -1043,9 +1043,9 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
{
pGlobFrm->ToTop();
// durch das Update sind die Eintraege invalid
- if(nEntryPos != (ULONG)-1)
+ if(nEntryPos != (sal_uLong)-1)
{
- Update( FALSE );
+ Update( sal_False );
Display();
Select(GetModel()->GetEntryAtAbsPos(nEntryPos));
pEntry = FirstSelected();
@@ -1080,7 +1080,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
else
{
pActiveShell->SplitNode(); // leeres Dokument
- pActiveShell->Up( FALSE, 1 );
+ pActiveShell->Up( sal_False, 1 );
}
pActiveShell->GetView().GetEditWin().GrabFocus();
}
@@ -1095,13 +1095,13 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
GotoContent(pCont);
if(nSlot)
rDispatch.Execute(nSlot);
- if(Update( FALSE ))
+ if(Update( sal_False ))
Display();
if ( bDeleteContentCopy )
delete pContCopy;
else
bDeleteContentCopy = true;
-// return TRUE;
+// return sal_True;
}
/*-----------------16.06.97 07:57-------------------
@@ -1109,7 +1109,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
--------------------------------------------------*/
IMPL_LINK( SwGlobalTree, Timeout, Timer*, EMPTYARG )
{
- if(!HasFocus() && Update( FALSE ))
+ if(!HasFocus() && Update( sal_False ))
Display();
return 0;
}
@@ -1157,7 +1157,7 @@ void SwGlobalTree::HideTree()
/*-----------------18.06.97 10:02-------------------
--------------------------------------------------*/
-void SwGlobalTree::ExecCommand(USHORT nCmd)
+void SwGlobalTree::ExecCommand(sal_uInt16 nCmd)
{
SvLBoxEntry* pEntry = FirstSelected();
DBG_ASSERT(pEntry, "gleich knallt's");
@@ -1171,14 +1171,14 @@ void SwGlobalTree::ExecCommand(USHORT nCmd)
{
if(GetSelectionCount() == 1)
{
- BOOL bMove = FALSE;
- USHORT nSource = (USHORT)GetModel()->GetAbsPos(pEntry);
- USHORT nDest = nSource;
+ sal_Bool bMove = sal_False;
+ sal_uInt16 nSource = (sal_uInt16)GetModel()->GetAbsPos(pEntry);
+ sal_uInt16 nDest = nSource;
switch(nCmd)
{
case FN_ITEM_DOWN:
{
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
bMove = nEntryCount > nSource + 1;
nDest+= 2;
}
@@ -1193,7 +1193,7 @@ void SwGlobalTree::ExecCommand(USHORT nCmd)
}
if( bMove && pActiveShell->MoveGlobalDocContent(
*pSwGlblDocContents, nSource, nSource + 1, nDest ) &&
- Update( FALSE ))
+ Update( sal_False ))
Display();
}
}
@@ -1202,10 +1202,10 @@ void SwGlobalTree::ExecCommand(USHORT nCmd)
/*-----------------16.06.97 07:43-------------------
--------------------------------------------------*/
-BOOL SwGlobalTree::Update(BOOL bHard)
+sal_Bool SwGlobalTree::Update(sal_Bool bHard)
{
SwView* pActView = GetParentWindow()->GetCreateView();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if(pActView && pActView->GetWrtShellPtr())
{
const SwWrtShell* pOldShell = pActiveShell;
@@ -1218,23 +1218,23 @@ BOOL SwGlobalTree::Update(BOOL bHard)
if(!pSwGlblDocContents)
{
pSwGlblDocContents = new SwGlblDocContents;
- bRet = TRUE;
+ bRet = sal_True;
pActiveShell->GetGlobalDocContent(*pSwGlblDocContents);
}
else
{
- BOOL bCopy = FALSE;
+ sal_Bool bCopy = sal_False;
SwGlblDocContents* pTempContents = new SwGlblDocContents;
pActiveShell->GetGlobalDocContent(*pTempContents);
if(pTempContents->Count() != pSwGlblDocContents->Count() ||
pTempContents->Count() != GetEntryCount())
{
- bRet = TRUE;
- bCopy = TRUE;
+ bRet = sal_True;
+ bCopy = sal_True;
}
else
{
- for(USHORT i = 0; i < pTempContents->Count() && !bCopy; i++)
+ for(sal_uInt16 i = 0; i < pTempContents->Count() && !bCopy; i++)
{
SwGlblDocContent* pLeft = pTempContents->GetObject(i);
SwGlblDocContent* pRight = pSwGlblDocContents->GetObject(i);
@@ -1253,13 +1253,13 @@ BOOL SwGlobalTree::Update(BOOL bHard)
)
)
{
- bCopy = bRet = TRUE;
+ bCopy = bRet = sal_True;
}
}
}
if(bCopy || bHard)
{
- USHORT i;
+ sal_uInt16 i;
pSwGlblDocContents->DeleteAndDestroy(0, pSwGlblDocContents->Count());
for( i = 0; i < pTempContents->Count(); i++)
@@ -1291,14 +1291,14 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
{
String sFileName(pCont->GetSection()->GetLinkFileName().GetToken(0,
sfx2::cTokenSeperator));
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
const SfxObjectShell* pCurr = SfxObjectShell::GetFirst();
while( !bFound && pCurr )
{
if(pCurr->GetMedium() &&
String(pCurr->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI)) == sFileName)
{
- bFound = TRUE;
+ bFound = sal_True;
SwGlobalTree::SetShowShell(pCurr);
Application::PostUserEvent( STATIC_LINK(
this, SwGlobalTree, ShowFrameHdl ) );
@@ -1311,7 +1311,7 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
{
SfxStringItem aURL(SID_FILE_NAME,
sFileName);
- SfxBoolItem aReadOnly(SID_DOC_READONLY, FALSE);
+ SfxBoolItem aReadOnly(SID_DOC_READONLY, sal_False);
SfxStringItem aTargetFrameName( SID_TARGETNAME, String::CreateFromAscii("_blank") );
SfxStringItem aReferer(SID_REFERER, pActiveShell->GetView().GetDocShell()->GetTitle());
pActiveShell->GetView().GetViewFrame()->GetDispatcher()->
@@ -1354,7 +1354,7 @@ void SwGlobalTree::InitEntry(SvLBoxEntry* pEntry,
const XubString& rStr ,const Image& rImg1,const Image& rImg2,
SvLBoxButtonKind eButtonKind)
{
- USHORT nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2"
+ sal_uInt16 nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2"
SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind );
SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nColToHilite );
SwLBoxString* pStr = new SwLBoxString( pEntry, 0, pCol->GetText() );
@@ -1364,7 +1364,7 @@ void SwGlobalTree::InitEntry(SvLBoxEntry* pEntry,
*
* --------------------------------------------------*/
-void SwLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags,
+void SwLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
SvLBoxEntry* pEntry )
{
SwGlblDocContent* pCont = (SwGlblDocContent*)pEntry->GetUserData();
@@ -1391,7 +1391,7 @@ void SwGlobalTree::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ sal_uInt16 nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
Update(sal_True);
}
@@ -1403,24 +1403,24 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
sal_Int32 nFiles = _rFiles.getLength();
if ( nFiles )
{
- BOOL bMove = FALSE;
+ sal_Bool bMove = sal_False;
if ( !_pContent )
{
SvLBoxEntry* pLast = (SvLBoxEntry*)LastVisible();
_pContent = (SwGlblDocContent*)pLast->GetUserData();
- bMove = TRUE;
+ bMove = sal_True;
}
String sFilePassword;
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
const OUString* pFileNames = _rFiles.getConstArray();
SwWrtShell& rSh = GetParentWindow()->GetCreateView()->GetWrtShell();
rSh.StartAction();
// after insertion of the first new content the 'pCont' parameter becomes invalid
// find the index of the 'anchor' content to always use a current anchor content
- USHORT nAnchorContent = pSwGlblDocContents->Count() - 1;
+ sal_uInt16 nAnchorContent = pSwGlblDocContents->Count() - 1;
if ( !bMove )
{
- for( USHORT nContent = 0; nContent < pSwGlblDocContents->Count(); ++nContent )
+ for( sal_uInt16 nContent = 0; nContent < pSwGlblDocContents->Count(); ++nContent )
{
if( *_pContent == *pSwGlblDocContents->GetObject( nContent ) )
{
@@ -1437,7 +1437,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
SwGlblDocContent* pAnchorContent = 0;
DBG_ASSERT(aTempContents.Count() > (nAnchorContent + nFile), "invalid anchor content -> last insertion failed");
if ( aTempContents.Count() > (nAnchorContent + nFile) )
- pAnchorContent = aTempContents.GetObject(nAnchorContent + (USHORT)nFile);
+ pAnchorContent = aTempContents.GetObject(nAnchorContent + (sal_uInt16)nFile);
else
pAnchorContent = aTempContents.GetObject(aTempContents.Count() - 1);
String sFileName(pFileNames[nFile]);
@@ -1446,10 +1446,10 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
String sSectionName(String(aFileUrl.GetLastName(
INetURLObject::DECODE_UNAMBIGUOUS)).GetToken(0,
sfx2::cTokenSeperator));
- USHORT nSectCount = rSh.GetSectionFmtCount();
+ sal_uInt16 nSectCount = rSh.GetSectionFmtCount();
String sTempSectionName(sSectionName);
- USHORT nAddNumber = 0;
- USHORT nCount = 0;
+ sal_uInt16 nAddNumber = 0;
+ sal_uInt16 nCount = 0;
// evtl : und Index anhaengen, wenn der Bereichsname schon vergeben ist
while ( nCount < nSectCount )
{
@@ -1482,12 +1482,12 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
}
if ( bMove )
{
- Update( FALSE );
+ Update( sal_False );
rSh.MoveGlobalDocContent(
- *pSwGlblDocContents, nEntryCount, nEntryCount + (USHORT)nFiles, nEntryCount - (USHORT)nFiles );
+ *pSwGlblDocContents, nEntryCount, nEntryCount + (sal_uInt16)nFiles, nEntryCount - (sal_uInt16)nFiles );
}
rSh.EndAction();
- Update( FALSE );
+ Update( sal_False );
Display();
}
}
diff --git a/sw/source/ui/utlui/gloslst.cxx b/sw/source/ui/utlui/gloslst.cxx
index 5c3350346201..3d80e55e1ace 100644
--- a/sw/source/ui/utlui/gloslst.cxx
+++ b/sw/source/ui/utlui/gloslst.cxx
@@ -139,7 +139,7 @@ IMPL_LINK(SwGlossDecideDlg, SelectHdl, ListBox*, EMPTYARG)
SwGlossaryList::SwGlossaryList() :
- bFilled(FALSE)
+ bFilled(sal_False)
{
SvtPathOptions aPathOpt;
sPath = aPathOpt.GetAutoTextPath();
@@ -163,7 +163,7 @@ SwGlossaryList::~SwGlossaryList()
********************************************************************/
-BOOL SwGlossaryList::GetShortName(const String& rLongName,
+sal_Bool SwGlossaryList::GetShortName(const String& rLongName,
String& rShortName, String& rGroupName )
{
if(!bFilled)
@@ -171,13 +171,13 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
TripleStrings aTripleStrings;
- USHORT nCount = aGroupArr.Count();
- USHORT nFound = 0;
- for(USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = aGroupArr.Count();
+ sal_uInt16 nFound = 0;
+ for(sal_uInt16 i = 0; i < nCount; i++ )
{
AutoTextGroup* pGroup = aGroupArr.GetObject(i);
if(!rGroupName.Len() || rGroupName == pGroup->sName)
- for(USHORT j = 0; j < pGroup->nCount; j++)
+ for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
{
String sLong = pGroup->sLongNames.GetToken(j, STRING_DELIM);
if((rLongName == sLong))
@@ -191,14 +191,14 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
}
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
nCount = aTripleStrings.Count();
if(1 == nCount )
{
TripleString* pTriple = aTripleStrings[0];
rShortName = pTriple->sShort;
rGroupName = pTriple->sGroup;
- bRet = TRUE;
+ bRet = sal_True;
}
else if(1 < nCount)
{
@@ -209,7 +209,7 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
aDlg.SetText(sTitle);
ListBox& rLB = aDlg.GetListBox();
- for(USHORT i = 0; i < nCount; i++ )
+ for(sal_uInt16 i = 0; i < nCount; i++ )
rLB.InsertEntry(aTripleStrings[i]->sGroup.GetToken(0, GLOS_DELIM));
rLB.SelectEntryPos(0);
@@ -219,10 +219,10 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
TripleString* pTriple = aTripleStrings[rLB.GetSelectEntryPos()];
rShortName = pTriple->sShort;
rGroupName = pTriple->sGroup;
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
@@ -232,7 +232,7 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
********************************************************************/
-USHORT SwGlossaryList::GetGroupCount()
+sal_uInt16 SwGlossaryList::GetGroupCount()
{
if(!bFilled)
Update();
@@ -244,7 +244,7 @@ USHORT SwGlossaryList::GetGroupCount()
********************************************************************/
-String SwGlossaryList::GetGroupName(USHORT nPos, BOOL bNoPath, String* pTitle)
+String SwGlossaryList::GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath, String* pTitle)
{
DBG_ASSERT(aGroupArr.Count() > nPos, "Gruppe nicht vorhanden");
String sRet(aEmptyStr);
@@ -266,7 +266,7 @@ String SwGlossaryList::GetGroupName(USHORT nPos, BOOL bNoPath, String* pTitle)
********************************************************************/
-USHORT SwGlossaryList::GetBlockCount(USHORT nGroup)
+sal_uInt16 SwGlossaryList::GetBlockCount(sal_uInt16 nGroup)
{
DBG_ASSERT(aGroupArr.Count() > nGroup, "Gruppe nicht vorhanden");
if(nGroup < aGroupArr.Count())
@@ -282,7 +282,7 @@ USHORT SwGlossaryList::GetBlockCount(USHORT nGroup)
********************************************************************/
-String SwGlossaryList::GetBlockName(USHORT nGroup, USHORT nBlock, String& rShortName)
+String SwGlossaryList::GetBlockName(sal_uInt16 nGroup, sal_uInt16 nBlock, String& rShortName)
{
DBG_ASSERT(aGroupArr.Count() > nGroup, "Gruppe nicht vorhanden");
if(nGroup < aGroupArr.Count())
@@ -309,7 +309,7 @@ void SwGlossaryList::Update()
if(sTemp != sPath)
{
sPath = sTemp;
- bFilled = FALSE;
+ bFilled = sal_False;
ClearGroups();
}
SwGlossaries* pGlossaries = ::GetGlossaries();
@@ -317,11 +317,11 @@ void SwGlossaryList::Update()
String sExt( SwGlossaries::GetExtension() );
if(!bFilled)
{
- USHORT nGroupCount = pGlossaries->GetGroupCnt();
- for(USHORT i = 0; i < nGroupCount; i++)
+ sal_uInt16 nGroupCount = pGlossaries->GetGroupCnt();
+ for(sal_uInt16 i = 0; i < nGroupCount; i++)
{
String sGrpName = pGlossaries->GetGroupName(i);
- USHORT nPath = (USHORT)sGrpName.GetToken(1, GLOS_DELIM).ToInt32();
+ sal_uInt16 nPath = (sal_uInt16)sGrpName.GetToken(1, GLOS_DELIM).ToInt32();
if(nPath < pPathArr->Count())
{
AutoTextGroup* pGroup = new AutoTextGroup;
@@ -340,11 +340,11 @@ void SwGlossaryList::Update()
aGroupArr.Insert( pGroup, i );
}
}
- bFilled = TRUE;
+ bFilled = sal_True;
}
else
{
- for(USHORT nPath = 0; nPath < pPathArr->Count(); nPath++)
+ for(sal_uInt16 nPath = 0; nPath < pPathArr->Count(); nPath++)
{
SvStringsDtor aFoundGroupNames;
SvStrings aFiles( 16, 16 );
@@ -352,7 +352,7 @@ void SwGlossaryList::Update()
SWUnoHelper::UCB_GetFileListOfFolder( *(*pPathArr)[nPath], aFiles,
&sExt, &aDateTimeArr );
- for( USHORT nFiles = 0, nFEnd = aFiles.Count();
+ for( sal_uInt16 nFiles = 0, nFEnd = aFiles.Count();
nFiles < nFEnd; ++nFiles )
{
String* pTitle = aFiles[ nFiles ];
@@ -385,20 +385,20 @@ void SwGlossaryList::Update()
delete pDT;
}
- USHORT nArrCount = aGroupArr.Count();
- for( USHORT i = nArrCount; i; --i)
+ sal_uInt16 nArrCount = aGroupArr.Count();
+ for( sal_uInt16 i = nArrCount; i; --i)
{
// evtl. geloeschte Gruppen entfernen
AutoTextGroup* pGroup = aGroupArr.GetObject(i - 1);
- USHORT nGroupPath = (USHORT)pGroup->sName.GetToken( 1,
+ sal_uInt16 nGroupPath = (sal_uInt16)pGroup->sName.GetToken( 1,
GLOS_DELIM).ToInt32();
// nur die Gruppen werden geprueft, die fuer den
// aktuellen Teilpfad registriert sind
if(nGroupPath == nPath)
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
String sCompareGroup = pGroup->sName.GetToken(0, GLOS_DELIM);
- for( USHORT j = 0; j < aFoundGroupNames.Count() && !bFound; ++j)
+ for( sal_uInt16 j = 0; j < aFoundGroupNames.Count() && !bFound; ++j)
{
bFound = sCompareGroup == *aFoundGroupNames[j];
}
@@ -432,7 +432,7 @@ void SwGlossaryList::Timeout()
AutoTextGroup* SwGlossaryList::FindGroup(const String& rGroupName)
{
- for(USHORT i = 0; i < aGroupArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < aGroupArr.Count(); i++)
{
AutoTextGroup* pRet = aGroupArr.GetObject(i);
if(pRet->sName == rGroupName)
@@ -454,7 +454,7 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries)
if(pBlock)
pGroup->sTitle = pBlock->GetName();
- for(USHORT j = 0; j < pGroup->nCount; j++)
+ for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
{
pGroup->sLongNames += pBlock->GetLongName(j);
pGroup->sLongNames += STRING_DELIM;
@@ -469,19 +469,19 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries)
passendem Anfang zurueckgeben
********************************************************************/
-BOOL SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames )
+sal_Bool SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames )
{
if(!bFilled)
Update();
- USHORT nFound = 0;
- USHORT nCount = aGroupArr.Count();
- USHORT nBeginLen = rBegin.Len();
+ sal_uInt16 nFound = 0;
+ sal_uInt16 nCount = aGroupArr.Count();
+ sal_uInt16 nBeginLen = rBegin.Len();
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
- for(USHORT i = 0; i < nCount; i++ )
+ for(sal_uInt16 i = 0; i < nCount; i++ )
{
AutoTextGroup* pGroup = aGroupArr.GetObject(i);
- for(USHORT j = 0; j < pGroup->nCount; j++)
+ for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
{
String sBlock = pGroup->sLongNames.GetToken(j, STRING_DELIM);
if( rSCmp.isEqual( sBlock.Copy(0, nBeginLen), rBegin ) &&
@@ -503,12 +503,12 @@ BOOL SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLong
********************************************************************/
void SwGlossaryList::ClearGroups()
{
- USHORT nCount = aGroupArr.Count();
- for( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = aGroupArr.Count();
+ for( sal_uInt16 i = 0; i < nCount; ++i )
delete aGroupArr.GetObject( i );
aGroupArr.Remove( 0, nCount );
- bFilled = FALSE;
+ bFilled = sal_False;
}
diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx
index 75e412a27eb6..565b32339792 100644
--- a/sw/source/ui/utlui/initui.cxx
+++ b/sw/source/ui/utlui/initui.cxx
@@ -181,7 +181,7 @@ ShellResource::ShellResource()
sPageDescFollowName( SW_RES(STR_PAGEDESC_FOLLOWNAME)),
sPageDescName( SW_RES(STR_PAGEDESC_NAME))
{
- const USHORT nCount = FLD_DOCINFO_END - FLD_DOCINFO_BEGIN;
+ const sal_uInt16 nCount = FLD_DOCINFO_END - FLD_DOCINFO_BEGIN;
KeyCode aCode( KEY_SPACE );
KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
@@ -190,7 +190,7 @@ ShellResource::ShellResource()
aModStr.SearchAndReplaceAllAscii( "+", String() );
aHyperlinkClick.SearchAndReplaceAllAscii( "%s", aModStr );
- for(USHORT i = 0; i < nCount; ++i)
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
String* pNew = new SW_RESSTR(FLD_DOCINFO_BEGIN + i);
aDocInfoLst.Insert(pNew, aDocInfoLst.Count());
@@ -205,7 +205,7 @@ ShellResource::~ShellResource()
delete pAutoFmtNameLst, pAutoFmtNameLst = 0;
}
-String ShellResource::GetPageDescName( USHORT nNo, BOOL bIsFirst, BOOL bFollow )
+String ShellResource::GetPageDescName( sal_uInt16 nNo, sal_Bool bIsFirst, sal_Bool bFollow )
{
String sRet( bIsFirst ? sPageDescFirstName
: bFollow ? sPageDescFollowName
@@ -222,7 +222,7 @@ SwGlossaries* GetGlossaries()
return (pGlossaries);
}
-BOOL HasGlossaryList()
+sal_Bool HasGlossaryList()
{
return pGlossaryList != 0;
}
@@ -250,7 +250,7 @@ void ShellResource::_GetAutoFmtNameLst() const
ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( SvStringsDtor& rLst )
: Resource( ResId(RID_SHELLRES_AUTOFMTSTRS, *pSwResMgr) )
{
- for( USHORT n = 0; n < STR_AUTOFMTREDL_END; ++n )
+ for( sal_uInt16 n = 0; n < STR_AUTOFMTREDL_END; ++n )
{
String* p = new String( ResId( n + 1, *pSwResMgr) );
if(STR_AUTOFMTREDL_TYPO == n)
@@ -279,13 +279,13 @@ const String& SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType)
if(!pAuthFieldNameList)
{
pAuthFieldNameList = new SvStringsDtor(AUTH_FIELD_END, 1);
- for(USHORT i = 0; i < AUTH_FIELD_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
{
String* pTmp = new String(SW_RES(STR_AUTH_FIELD_START + i));
pAuthFieldNameList->Insert(pTmp, pAuthFieldNameList->Count());
}
}
- return *pAuthFieldNameList->GetObject( static_cast< USHORT >(eType) );
+ return *pAuthFieldNameList->GetObject( static_cast< sal_uInt16 >(eType) );
}
/* -----------------16.09.99 12:29-------------------
@@ -295,12 +295,12 @@ const String& SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType)
if(!pAuthFieldTypeList)
{
pAuthFieldTypeList = new SvStringsDtor(AUTH_TYPE_END, 1);
- for(USHORT i = 0; i < AUTH_TYPE_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_TYPE_END; i++)
pAuthFieldTypeList->Insert(
new String(SW_RES(STR_AUTH_TYPE_START + i)),
pAuthFieldTypeList->Count());
}
- return *pAuthFieldTypeList->GetObject( static_cast< USHORT >(eType) );
+ return *pAuthFieldTypeList->GetObject( static_cast< sal_uInt16 >(eType) );
}
diff --git a/sw/source/ui/utlui/navicfg.cxx b/sw/source/ui/utlui/navicfg.cxx
index 435f5583cd30..2edc5e9d8f71 100644
--- a/sw/source/ui/utlui/navicfg.cxx
+++ b/sw/source/ui/utlui/navicfg.cxx
@@ -77,8 +77,8 @@ SwNavigationConfig::SwNavigationConfig() :
nOutlineLevel(MAXLEVEL),
nRegionMode(REGION_MODE_NONE),
nActiveBlock(0),
- bIsSmall(FALSE),
- bIsGlobalActive(TRUE)
+ bIsSmall(sal_False),
+ bIsGlobalActive(sal_True)
{
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx
index 25633a7b691f..3fc2f9c047c7 100644
--- a/sw/source/ui/utlui/navipi.cxx
+++ b/sw/source/ui/utlui/navipi.cxx
@@ -110,7 +110,7 @@ SFX_IMPL_CHILDWINDOW_CONTEXT( SwNavigationChild, SID_NAVIGATOR, SwView )
void SwNavigationPI::CleanEntry( String& rEntry )
{
- USHORT i = rEntry.Len();
+ sal_uInt16 i = rEntry.Len();
if( i )
for( sal_Unicode* pStr = rEntry.GetBufferAccess(); i; --i, ++pStr )
if( *pStr == 10 || *pStr == 9 )
@@ -121,8 +121,8 @@ void SwNavigationPI::CleanEntry( String& rEntry )
mit und ohne Childs
------------------------------------------------------------------------*/
-void SwNavigationPI::MoveOutline(USHORT nSource, USHORT nTarget,
- BOOL bWithChilds)
+void SwNavigationPI::MoveOutline(sal_uInt16 nSource, sal_uInt16 nTarget,
+ sal_Bool bWithChilds)
{
SwView *pView = GetCreateView();
SwWrtShell &rSh = pView->GetWrtShell();
@@ -134,9 +134,9 @@ void SwNavigationPI::MoveOutline(USHORT nSource, USHORT nTarget,
short nMove = nTarget-nSource; //( nDir<0 ) ? 1 : 0 ;
rSh.GotoOutline(nSource);
if (bWithChilds)
- rSh.MakeOutlineSel(nSource, nSource, TRUE);
+ rSh.MakeOutlineSel(nSource, nSource, sal_True);
// Die selektierten Children zaehlen bei der Bewegung vorwaerts nicht mit
- USHORT nLastOutlinePos = rSh.GetOutlinePos(MAXLEVEL);
+ sal_uInt16 nLastOutlinePos = rSh.GetOutlinePos(MAXLEVEL);
if(bWithChilds && nMove > 1 &&
nLastOutlinePos < nTarget)
{
@@ -208,7 +208,7 @@ void SwNavigationPI::FillBox()
if(pContentWrtShell)
{
aContentTree.SetHiddenShell( pContentWrtShell );
- aContentTree.Display( FALSE );
+ aContentTree.Display( sal_False );
}
else
{
@@ -223,7 +223,7 @@ void SwNavigationPI::FillBox()
aContentTree.SetActiveShell(pWrtShell);
}
else
- aContentTree.Display( TRUE );
+ aContentTree.Display( sal_True );
pActContView = pView;
}
}
@@ -239,8 +239,8 @@ void SwNavigationPI::UsePage(SwWrtShell *pSh)
}
if (pSh)
{
- const USHORT nPageCnt = pSh->GetPageCnt();
- USHORT nPhyPage, nVirPage;
+ const sal_uInt16 nPageCnt = pSh->GetPageCnt();
+ sal_uInt16 nPhyPage, nVirPage;
pSh->GetPageNum(nPhyPage, nVirPage);
GetPageEdit().SetMax(nPageCnt);
@@ -256,7 +256,7 @@ void SwNavigationPI::UsePage(SwWrtShell *pSh)
IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
{
- const USHORT nCurrItemId = pBox->GetCurItemId();
+ const sal_uInt16 nCurrItemId = pBox->GetCurItemId();
SwView *pView = GetCreateView();
if (!pView)
return 1;
@@ -265,9 +265,9 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
//Standard: Unterebenen werden mitgenommen
// mit Ctrl Unterebenen nicht mitnehmen
- BOOL bOutlineWithChilds = ( KEY_MOD1 != pBox->GetModifier());
+ sal_Bool bOutlineWithChilds = ( KEY_MOD1 != pBox->GetModifier());
int nFuncId = 0;
- BOOL bFocusToDoc = FALSE;
+ sal_Bool bFocusToDoc = sal_False;
switch (nCurrItemId)
{
case FN_UP:
@@ -296,14 +296,14 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
_ZoomIn();
}
}
- return TRUE;
+ return sal_True;
//break;
// Funktionen, die eine direkte Aktion ausloesen
case FN_SELECT_FOOTER:
{
rSh.MoveCrsr();
- const USHORT eType = rSh.GetFrmType(0,FALSE);
+ const sal_uInt16 eType = rSh.GetFrmType(0,sal_False);
if (eType & FRMTYPE_FOOTER)
{
if (rSh.EndPg())
@@ -311,13 +311,13 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
}
else if (rSh.GotoFooterTxt())
nFuncId = FN_TO_FOOTER;
- bFocusToDoc = TRUE;
+ bFocusToDoc = sal_True;
}
break;
case FN_SELECT_HEADER:
{
rSh.MoveCrsr();
- const USHORT eType = rSh.GetFrmType(0,FALSE);
+ const sal_uInt16 eType = rSh.GetFrmType(0,sal_False);
if (eType & FRMTYPE_HEADER)
{
if (rSh.SttPg())
@@ -325,13 +325,13 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
}
else if (rSh.GotoHeaderTxt())
nFuncId = FN_TO_HEADER;
- bFocusToDoc = TRUE;
+ bFocusToDoc = sal_True;
}
break;
case FN_SELECT_FOOTNOTE:
{
rSh.MoveCrsr();
- const USHORT eFrmType = rSh.GetFrmType(0,FALSE);
+ const sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_False);
// aus Fussnote zum Anker springen
if (eFrmType & FRMTYPE_FOOTNOTE)
{
@@ -350,7 +350,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
else if (rSh.GotoPrevFtnAnchor())
nFuncId = FN_PREV_FOOTNOTE;
}
- bFocusToDoc = TRUE;
+ bFocusToDoc = sal_True;
}
break;
@@ -377,7 +377,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
break;
case FN_GLOBAL_SAVE_CONTENT:
{
- BOOL bSave = rSh.IsGlblDocSaveLinks();
+ sal_Bool bSave = rSh.IsGlblDocSaveLinks();
rSh.SetGlblDocSaveLinks( !bSave );
pBox->CheckItem(FN_GLOBAL_SAVE_CONTENT, !bSave );
}
@@ -390,7 +390,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
}
if(bFocusToDoc)
pView->GetEditWin().GrabFocus();
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Beschreibung: ClickHandler der Toolboxen
@@ -399,7 +399,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox )
{
- const USHORT nCurrItemId = pBox->GetCurItemId();
+ const sal_uInt16 nCurrItemId = pBox->GetCurItemId();
switch (nCurrItemId)
{
case FN_GLOBAL_UPDATE:
@@ -410,7 +410,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox )
break;
}
- return TRUE;
+ return sal_True;
}
/*-----------------13.07.04 -------------------
@@ -418,12 +418,12 @@ IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox )
IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox )
{
- const USHORT nCurrItemId = pBox->GetCurItemId();
+ const sal_uInt16 nCurrItemId = pBox->GetCurItemId();
switch (nCurrItemId)
{
case FN_CREATE_NAVIGATION:
{
- CreateNavigationTool(pBox->GetItemRect(FN_CREATE_NAVIGATION), TRUE);
+ CreateNavigationTool(pBox->GetItemRect(FN_CREATE_NAVIGATION), sal_True);
}
break;
@@ -436,18 +436,18 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox )
HID_NAVI_DRAG_COPY,
};
PopupMenu *pMenu = new PopupMenu;
- for (USHORT i = 0; i <= REGION_MODE_EMBEDDED; i++)
+ for (sal_uInt16 i = 0; i <= REGION_MODE_EMBEDDED; i++)
{
pMenu->InsertItem( i + 1, aContextArr[i] );
pMenu->SetHelpId(i + 1, aHIDs[i]);
}
pMenu->CheckItem( nRegionMode + 1 );
pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl));
- pBox->SetItemDown( nCurrItemId, TRUE );
+ pBox->SetItemDown( nCurrItemId, sal_True );
pMenu->Execute( pBox,
pBox->GetItemRect(FN_DROP_REGION),
POPUPMENU_EXECUTE_DOWN );
- pBox->SetItemDown( nCurrItemId, FALSE );
+ pBox->SetItemDown( nCurrItemId, sal_False );
pBox->EndSelection();
delete pMenu;
pBox->Invalidate();
@@ -456,25 +456,25 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox )
case FN_OUTLINE_LEVEL:
{
PopupMenu *pMenu = new PopupMenu;
- for (USHORT i = 101; i <= 100 + MAXLEVEL; i++)
+ for (sal_uInt16 i = 101; i <= 100 + MAXLEVEL; i++)
{
pMenu->InsertItem( i, String::CreateFromInt32(i - 100) );
pMenu->SetHelpId( i, HID_NAVI_OUTLINES );
}
pMenu->CheckItem( aContentTree.GetOutlineLevel() + 100 );
pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl));
- pBox->SetItemDown( nCurrItemId, TRUE );
+ pBox->SetItemDown( nCurrItemId, sal_True );
pMenu->Execute( pBox,
pBox->GetItemRect(FN_OUTLINE_LEVEL),
POPUPMENU_EXECUTE_DOWN );
- pBox->SetItemDown( nCurrItemId, FALSE );
+ pBox->SetItemDown( nCurrItemId, sal_False );
delete pMenu;
pBox->EndSelection();
pBox->Invalidate();
}
break;
}
- return TRUE;
+ return sal_True;
}
/*-----------------13.07.04 -------------------
@@ -491,7 +491,7 @@ void SwNavHelpToolBox::MouseButtonDown(const MouseEvent &rEvt)
if(rEvt.GetButtons() == MOUSE_LEFT &&
FN_CREATE_NAVIGATION == GetItemId(rEvt.GetPosPixel()))
{
- ((SwNavigationPI*)GetParent())->CreateNavigationTool(GetItemRect(FN_CREATE_NAVIGATION), FALSE);
+ ((SwNavigationPI*)GetParent())->CreateNavigationTool(GetItemRect(FN_CREATE_NAVIGATION), sal_False);
}
else
SwHelpToolBox::MouseButtonDown(rEvt);
@@ -499,7 +499,7 @@ void SwNavHelpToolBox::MouseButtonDown(const MouseEvent &rEvt)
/* -----------------------------12.03.2002 16:55------------------------------
---------------------------------------------------------------------------*/
-void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus)
+void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, sal_Bool bSetFocus)
{
// SfxBindings& rBind = GetCreateView()->GetViewFrame()->GetBindings();
// rBind.ENTERREGISTRATIONS();
@@ -527,7 +527,7 @@ void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus
--------------------------------------------------*/
void SwNavHelpToolBox::RequestHelp( const HelpEvent& rHEvt )
{
- USHORT nItemId = GetItemId(ScreenToOutputPixel(rHEvt.GetMousePosPixel()));
+ sal_uInt16 nItemId = GetItemId(ScreenToOutputPixel(rHEvt.GetMousePosPixel()));
if( FN_UP == nItemId || FN_DOWN == nItemId )
{
SetItemText(nItemId, SwScrollNaviPopup::GetQuickHelpText((FN_DOWN == nItemId)));
@@ -548,7 +548,7 @@ IMPL_LINK( SwNavigationPI, EditAction, NumEditAction *, pEdit )
{
if(aPageChgTimer.IsActive())
aPageChgTimer.Stop();
- pCreateView->GetWrtShell().GotoPage((USHORT)pEdit->GetValue(), TRUE);
+ pCreateView->GetWrtShell().GotoPage((sal_uInt16)pEdit->GetValue(), sal_True);
pCreateView->GetEditWin().GrabFocus();
pCreateView->GetViewFrame()->GetBindings().Invalidate(FN_STAT_PAGE);
}
@@ -568,7 +568,7 @@ IMPL_LINK( SwNavigationPI, EditGetFocus, NumEditAction *, pEdit )
return 0;
SwWrtShell &rSh = pView->GetWrtShell();
- const USHORT nPageCnt = rSh.GetPageCnt();
+ const sal_uInt16 nPageCnt = rSh.GetPageCnt();
pEdit->SetMax(nPageCnt);
pEdit->SetLast(nPageCnt);
return 0;
@@ -578,12 +578,12 @@ IMPL_LINK( SwNavigationPI, EditGetFocus, NumEditAction *, pEdit )
Beschreibung:
------------------------------------------------------------------------*/
-BOOL SwNavigationPI::Close()
+sal_Bool SwNavigationPI::Close()
{
SfxViewFrame* pVFrame = pCreateView->GetViewFrame();
pVFrame->GetBindings().Invalidate(SID_NAVIGATOR);
pVFrame->GetDispatcher()->Execute(SID_NAVIGATOR);
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
@@ -643,7 +643,7 @@ void SwNavigationPI::_ZoomOut()
if (_IsZoomedIn())
{
FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
- bIsZoomedIn = FALSE;
+ bIsZoomedIn = sal_False;
Size aSz(GetOutputSizePixel());
aSz.Height() = nZoomOut;
Size aMinOutSizePixel = ((SfxDockingWindow*)GetParent())->GetMinOutputSizePixel();
@@ -662,8 +662,8 @@ void SwNavigationPI::_ZoomOut()
}
SvLBoxEntry* pFirst = aContentTree.FirstSelected();
if(pFirst)
- aContentTree.Select(pFirst, TRUE); // toolbox enablen
- pConfig->SetSmall( FALSE );
+ aContentTree.Select(pFirst, sal_True); // toolbox enablen
+ pConfig->SetSmall( sal_False );
aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX);
}
}
@@ -681,7 +681,7 @@ void SwNavigationPI::_ZoomIn()
aContentTree.HideTree();
aDocListBox.Hide();
aGlobalTree.HideTree();
- bIsZoomedIn = TRUE;
+ bIsZoomedIn = sal_True;
Size aSz(GetOutputSizePixel());
if( aSz.Height() > nZoomIn )
nZoomOut = ( short ) aSz.Height();
@@ -693,9 +693,9 @@ void SwNavigationPI::_ZoomIn()
pFloat->SetOutputSizePixel(aSz);
SvLBoxEntry* pFirst = aContentTree.FirstSelected();
if(pFirst)
- aContentTree.Select(pFirst, TRUE); // toolbox enablen
- pConfig->SetSmall( TRUE );
- aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, FALSE);
+ aContentTree.Select(pFirst, sal_True); // toolbox enablen
+ pConfig->SetSmall( sal_True );
+ aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_False);
}
}
/*------------------------------------------------------------------------
@@ -787,10 +787,10 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
nAutoMarkIdx(1),
nRegionMode(REGION_MODE_NONE),
- bSmallMode(FALSE),
- bIsZoomedIn(FALSE),
- bPageCtrlsVisible(FALSE),
- bGlobalMode(FALSE)
+ bSmallMode(sal_False),
+ bIsZoomedIn(sal_False),
+ bPageCtrlsVisible(sal_False),
+ bGlobalMode(sal_False)
{
GetCreateView();
InitImageList();
@@ -809,15 +809,15 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
pEdit->SetGetFocusHdl(LINK(this, SwNavigationPI, EditGetFocus));
pEdit->SetModifyHdl(LINK(this, SwNavigationPI, PageEditModifyHdl));
- bPageCtrlsVisible = TRUE;
+ bPageCtrlsVisible = sal_True;
// Rectangle aFirstRect = aContentToolBox.GetItemRect(FN_SHOW_ROOT);
-// USHORT nWidth = 2 * (USHORT)aFirstRect.Left();
+// sal_uInt16 nWidth = 2 * (sal_uInt16)aFirstRect.Left();
//doppelte Separatoren sind nicht erlaubt, also muss
//die passende Groesse anders ermittelt werden
Rectangle aFirstRect = aContentToolBox.GetItemRect(FN_SELECT_FOOTNOTE);
Rectangle aSecondRect = aContentToolBox.GetItemRect(FN_SELECT_HEADER);
- USHORT nWidth = USHORT(aFirstRect.Left() - aSecondRect.Left());
+ sal_uInt16 nWidth = sal_uInt16(aFirstRect.Left() - aSecondRect.Left());
Size aItemWinSize( nWidth , aFirstRect.Bottom() - aFirstRect.Top() );
pEdit->SetSizePixel(aItemWinSize);
@@ -827,7 +827,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
aContentToolBox.SetHelpId(FN_PAGENUMBER, HID_NAVI_TBX16);
aContentToolBox.ShowItem( FN_PAGENUMBER );
- for( USHORT i = 0; i <= REGION_MODE_EMBEDDED; i++ )
+ for( sal_uInt16 i = 0; i <= REGION_MODE_EMBEDDED; i++ )
{
aContextArr[i] = SW_RESSTR(ST_HYPERLINK + i);
aStatusArr[i] = SW_RESSTR(ST_STATUS_FIRST + i);
@@ -875,9 +875,9 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
aContentTree.SetDragDropMode( SV_DRAGDROP_CTRL_MOVE |
SV_DRAGDROP_CTRL_COPY |
SV_DRAGDROP_ENABLE_TOP );
- aContentTree.EnableAsyncDrag(TRUE);
+ aContentTree.EnableAsyncDrag(sal_True);
aContentTree.ShowTree();
- aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, TRUE);
+ aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_True);
// TreeListBox fuer Globaldokument
aGlobalTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y );
@@ -898,7 +898,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
aContentToolBox.SetDropdownClickHdl( LINK(this, SwNavigationPI, ToolBoxDropdownClickHdl) );
aGlobalToolBox.SetClickHdl( LINK(this, SwNavigationPI, ToolBoxClickHdl) );
aGlobalToolBox.SetDropdownClickHdl( LINK(this, SwNavigationPI, ToolBoxDropdownClickHdl) );
- aGlobalToolBox.CheckItem(FN_GLOBAL_SWITCH, TRUE);
+ aGlobalToolBox.CheckItem(FN_GLOBAL_SWITCH, sal_True);
Font aFont(GetFont());
aFont.SetWeight(WEIGHT_NORMAL);
@@ -946,7 +946,7 @@ SwNavigationPI::~SwNavigationPI()
SwView *pView = GetCreateView();
SwWrtShell &rSh = pView->GetWrtShell();
if( !rSh.IsAllProtect() )
- pView->GetDocShell()->SetReadOnlyUI(FALSE);
+ pView->GetDocShell()->SetReadOnlyUI(sal_False);
}
EndListening(*SFX_APP());
@@ -1022,7 +1022,7 @@ IMPL_LINK( SwNavigationPI, ClosePopupWindow, SfxPopupWindow *, pWindow )
Beschreibung:
------------------------------------------------------------------------*/
-void SwNavigationPI::StateChanged( USHORT nSID, SfxItemState /*eState*/,
+void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
const SfxPoolItem* /*pState*/ )
{
if(nSID == SID_DOCFULLNAME)
@@ -1032,7 +1032,7 @@ void SwNavigationPI::StateChanged( USHORT nSID, SfxItemState /*eState*/,
{
SwWrtShell* pWrtShell = pActView->GetWrtShellPtr();
aContentTree.SetActiveShell(pWrtShell);
- BOOL bGlobal = IsGlobalDoc();
+ sal_Bool bGlobal = IsGlobalDoc();
aContentToolBox.EnableItem(FN_GLOBAL_SWITCH, bGlobal);
if( (!bGlobal && IsGlobalMode()) ||
(!IsGlobalMode() && pConfig->IsGlobalActive()) )
@@ -1136,7 +1136,7 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint )
aContentTree.SetActiveShell(pWrtShell);
if(aGlobalTree.IsVisible())
{
- if(aGlobalTree.Update( FALSE ))
+ if(aGlobalTree.Update( sal_False ))
aGlobalTree.Display();
else
// wenn kein Update notwendig, dann zumindest painten
@@ -1155,13 +1155,13 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint )
IMPL_LINK( SwNavigationPI, MenuSelectHdl, Menu *, pMenu )
{
- USHORT nMenuId = pMenu->GetCurItemId();
+ sal_uInt16 nMenuId = pMenu->GetCurItemId();
if(nMenuId != USHRT_MAX)
{
if(nMenuId < 100)
SetRegionDropMode( --nMenuId);
else
- aContentTree.SetOutlineLevel( static_cast< BYTE >(nMenuId - 100) );
+ aContentTree.SetOutlineLevel( static_cast< sal_uInt8 >(nMenuId - 100) );
}
return 0;
}
@@ -1173,14 +1173,14 @@ IMPL_LINK( SwNavigationPI, MenuSelectHdl, Menu *, pMenu )
void SwNavigationPI::UpdateListBox()
{
- aDocListBox.SetUpdateMode(FALSE);
+ aDocListBox.SetUpdateMode(sal_False);
aDocListBox.Clear();
SwView *pActView = GetCreateView();
- BOOL bDisable = pActView == 0;
+ sal_Bool bDisable = pActView == 0;
SwView *pView = SwModule::GetFirstView();
- USHORT nCount = 0;
- USHORT nAct = 0;
- USHORT nConstPos = 0;
+ sal_uInt16 nCount = 0;
+ sal_uInt16 nAct = 0;
+ sal_uInt16 nConstPos = 0;
const SwView* pConstView = aContentTree.IsConstantView() &&
aContentTree.GetActiveWrtShell() ?
&aContentTree.GetActiveWrtShell()->GetView():
@@ -1222,12 +1222,12 @@ void SwNavigationPI::UpdateListBox()
sEntry += aStatusArr[ST_HIDDEN - ST_STATUS_FIRST];
sEntry += ')';
aDocListBox.InsertEntry(sEntry);
- bDisable = FALSE;
+ bDisable = sal_False;
}
if(aContentTree.IsActiveView())
{
//entweder den Namen des akt. Docs oder "Aktives Dokument"
- USHORT nTmp = pActView ? nAct : --nCount;
+ sal_uInt16 nTmp = pActView ? nAct : --nCount;
aDocListBox.SelectEntryPos( nTmp );
}
else if(aContentTree.IsHiddenView())
@@ -1238,7 +1238,7 @@ void SwNavigationPI::UpdateListBox()
aDocListBox.SelectEntryPos(nConstPos);
aDocListBox.Enable( !bDisable );
- aDocListBox.SetUpdateMode(TRUE);
+ aDocListBox.SetUpdateMode(sal_True);
}
/*-----------------16.06.97 15:05-------------------
@@ -1275,7 +1275,7 @@ IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem *, pItem)
String SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData )
{
String sFileName;
- ULONG nFmt;
+ sal_uLong nFmt;
if( rData.HasFormat( nFmt = FORMAT_FILE_LIST ))
{
FileList aFileList;
@@ -1364,12 +1364,12 @@ sal_Int8 SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt )
--------------------------------------------------*/
-void SwNavigationPI::SetRegionDropMode(USHORT nNewMode)
+void SwNavigationPI::SetRegionDropMode(sal_uInt16 nNewMode)
{
nRegionMode = nNewMode;
pConfig->SetRegionMode( nRegionMode );
- USHORT nDropId = FN_DROP_REGION;
+ sal_uInt16 nDropId = FN_DROP_REGION;
if(nRegionMode == REGION_MODE_LINK)
nDropId = FN_DROP_REGION_LINK;
else if(nRegionMode == REGION_MODE_EMBEDDED)
@@ -1387,13 +1387,13 @@ void SwNavigationPI::SetRegionDropMode(USHORT nNewMode)
--------------------------------------------------*/
-BOOL SwNavigationPI::ToggleTree()
+sal_Bool SwNavigationPI::ToggleTree()
{
- BOOL bRet = TRUE;
- BOOL bGlobalDoc = IsGlobalDoc();
+ sal_Bool bRet = sal_True;
+ sal_Bool bGlobalDoc = IsGlobalDoc();
if(!IsGlobalMode() && bGlobalDoc)
{
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
if(_IsZoomedIn())
_ZoomOut();
aGlobalTree.ShowTree();
@@ -1401,8 +1401,8 @@ BOOL SwNavigationPI::ToggleTree()
aContentTree.HideTree();
aContentToolBox.Hide();
aDocListBox.Hide();
- SetGlobalMode(TRUE);
- SetUpdateMode(TRUE);
+ SetGlobalMode(sal_True);
+ SetUpdateMode(sal_True);
}
else
{
@@ -1414,8 +1414,8 @@ BOOL SwNavigationPI::ToggleTree()
aContentToolBox.Show();
aDocListBox.Show();
}
- bRet = FALSE;
- SetGlobalMode(FALSE);
+ bRet = sal_False;
+ SetGlobalMode(sal_False);
}
return bRet;
}
@@ -1423,9 +1423,9 @@ BOOL SwNavigationPI::ToggleTree()
/*-----------------13.06.97 09:42-------------------
--------------------------------------------------*/
-BOOL SwNavigationPI::IsGlobalDoc() const
+sal_Bool SwNavigationPI::IsGlobalDoc() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwView *pView = GetCreateView();
if(pView)
{
@@ -1482,7 +1482,7 @@ SwView* SwNavigationPI::GetCreateView() const
------------------------------------------------------------------------*/
SwNavigationChild::SwNavigationChild( Window* pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* _pBindings,
SfxChildWinInfo* pInfo )
: SfxChildWindowContext( nId )
@@ -1494,14 +1494,14 @@ SwNavigationChild::SwNavigationChild( Window* pParent,
SwNavigationConfig* pNaviConfig = SW_MOD()->GetNavigationConfig();
- USHORT nRootType = static_cast< USHORT >( pNaviConfig->GetRootType() );
+ sal_uInt16 nRootType = static_cast< sal_uInt16 >( pNaviConfig->GetRootType() );
if( nRootType < CONTENT_TYPE_MAX )
{
pNavi->aContentTree.SetRootType(nRootType);
- pNavi->aContentToolBox.CheckItem(FN_SHOW_ROOT, TRUE);
+ pNavi->aContentToolBox.CheckItem(FN_SHOW_ROOT, sal_True);
}
- pNavi->aContentTree.SetOutlineLevel( static_cast< BYTE >( pNaviConfig->GetOutlineLevel() ) );
- pNavi->SetRegionDropMode( static_cast< USHORT >( pNaviConfig->GetRegionMode() ) );
+ pNavi->aContentTree.SetOutlineLevel( static_cast< sal_uInt8 >( pNaviConfig->GetOutlineLevel() ) );
+ pNavi->SetRegionDropMode( static_cast< sal_uInt16 >( pNaviConfig->GetRegionMode() ) );
if(GetFloatingWindow() && pNaviConfig->IsSmall())
{
@@ -1529,7 +1529,7 @@ void SwNavigationPI::DataChanged( const DataChangedEvent& rDCEvt )
---------------------------------------------------------------------------*/
void SwNavigationPI::InitImageList()
{
- USHORT k;
+ sal_uInt16 k;
ImageList& rImgLst = aContentToolBox.GetSettings().GetStyleSettings().GetHighContrastMode() ?
aContentImageListH : aContentImageList;
@@ -1541,7 +1541,7 @@ void SwNavigationPI::InitImageList()
aGlobalToolBox.SetItemImage(aGlobalToolBox.GetItemId(k),
rImgLst.GetImage(aGlobalToolBox.GetItemId(k)));
- USHORT nDropId = FN_DROP_REGION;
+ sal_uInt16 nDropId = FN_DROP_REGION;
if(nRegionMode == REGION_MODE_LINK)
nDropId = FN_DROP_REGION_LINK;
else if(nRegionMode == REGION_MODE_EMBEDDED)
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index b059c12a4a50..03b3d58ec5a7 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -71,17 +71,17 @@ using namespace ::com::sun::star::lang;
--------------------------------------------------------------------*/
NumFormatListBox::NumFormatListBox( Window* pWin, const ResId& rResId,
- short nFormatType, ULONG nDefFmt,
- BOOL bUsrFmts ) :
+ short nFormatType, sal_uLong nDefFmt,
+ sal_Bool bUsrFmts ) :
ListBox ( pWin, rResId ),
nCurrFormatType (-1),
nStdEntry (0),
- bOneArea (FALSE),
+ bOneArea (sal_False),
nDefFormat (nDefFmt),
pVw (0),
pOwnFormatter (0),
- bShowLanguageControl(FALSE),
- bUseAutomaticLanguage(TRUE)
+ bShowLanguageControl(sal_False),
+ bUseAutomaticLanguage(sal_True)
{
Init(nFormatType, bUsrFmts);
}
@@ -92,16 +92,16 @@ NumFormatListBox::NumFormatListBox( Window* pWin, const ResId& rResId,
NumFormatListBox::NumFormatListBox( Window* pWin, SwView* pView,
const ResId& rResId, short nFormatType,
- ULONG nDefFmt, BOOL bUsrFmts ) :
+ sal_uLong nDefFmt, sal_Bool bUsrFmts ) :
ListBox ( pWin, rResId ),
nCurrFormatType (-1),
nStdEntry (0),
- bOneArea (FALSE),
+ bOneArea (sal_False),
nDefFormat (nDefFmt),
pVw (pView),
pOwnFormatter (0),
- bShowLanguageControl(FALSE),
- bUseAutomaticLanguage(TRUE)
+ bShowLanguageControl(sal_False),
+ bUseAutomaticLanguage(sal_True)
{
Init(nFormatType, bUsrFmts);
}
@@ -110,7 +110,7 @@ NumFormatListBox::NumFormatListBox( Window* pWin, SwView* pView,
*
* --------------------------------------------------*/
-void NumFormatListBox::Init(short nFormatType, BOOL bUsrFmts)
+void NumFormatListBox::Init(short nFormatType, sal_Bool bUsrFmts)
{
SwView *pView = GetView();
@@ -119,7 +119,7 @@ void NumFormatListBox::Init(short nFormatType, BOOL bUsrFmts)
else
eCurLanguage = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
- if (bUsrFmts == FALSE)
+ if (bUsrFmts == sal_False)
{
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
pOwnFormatter = new SvNumberFormatter(xMSF, eCurLanguage);
@@ -242,17 +242,17 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
}
const SvNumberformat* pFmt;
- USHORT nPos, i = 0;
- ULONG nFormat;
+ sal_uInt16 nPos, i = 0;
+ sal_uLong nFormat;
Color* pCol;
double fVal = GetDefValue( nFormatType );
String sValue;
- ULONG nSysNumFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysNumFmt = pFormatter->GetFormatIndex(
NF_NUMBER_SYSTEM, eCurLanguage );
- ULONG nSysShortDateFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex(
NF_DATE_SYSTEM_SHORT, eCurLanguage );
- ULONG nSysLongDateFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex(
NF_DATE_SYSTEM_LONG, eCurLanguage );
for( long nIndex = eOffsetStart; nIndex <= eOffsetEnd; ++nIndex )
@@ -302,7 +302,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
Beschreibung:
--------------------------------------------------------------------*/
-void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
+void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
{
if (nDefFmt == ULONG_MAX)
{
@@ -327,11 +327,11 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
SetFormatType(nType);
- ULONG nFormat = pFormatter->GetFormatForLanguageIfBuiltIn(nDefFmt, eCurLanguage);
+ sal_uLong nFormat = pFormatter->GetFormatForLanguageIfBuiltIn(nDefFmt, eCurLanguage);
- for (USHORT i = 0; i < GetEntryCount(); i++)
+ for (sal_uInt16 i = 0; i < GetEntryCount(); i++)
{
- if (nFormat == (ULONG)GetEntryData(i))
+ if (nFormat == (sal_uLong)GetEntryData(i))
{
SelectEntryPos(i);
nStdEntry = i;
@@ -353,20 +353,20 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
else
pFormatter->GetOutputString(fValue, nDefFmt, sValue, &pCol);
- USHORT nPos = 0;
- while ((ULONG)GetEntryData(nPos) == ULONG_MAX)
+ sal_uInt16 nPos = 0;
+ while ((sal_uLong)GetEntryData(nPos) == ULONG_MAX)
nPos++;
//
- ULONG nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
- ULONG nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage);
- ULONG nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage);
- BOOL bSysLang = FALSE;
+ sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
+ sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage);
+ sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage);
+ sal_Bool bSysLang = sal_False;
if( eCurLanguage == GetAppLanguage() )
- bSysLang = TRUE;
- ULONG nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFmt, LANGUAGE_SYSTEM );
- ULONG nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM );
- ULONG nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM );
+ bSysLang = sal_True;
+ sal_uLong nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFmt, LANGUAGE_SYSTEM );
+ sal_uLong nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM );
+ sal_uLong nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM );
if (
nDefFmt == nSysNumFmt ||
@@ -395,11 +395,11 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
Beschreibung:
--------------------------------------------------------------------*/
-ULONG NumFormatListBox::GetFormat() const
+sal_uLong NumFormatListBox::GetFormat() const
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
- return (ULONG)GetEntryData(nPos);
+ return (sal_uLong)GetEntryData(nPos);
}
/*--------------------------------------------------------------------
@@ -408,7 +408,7 @@ ULONG NumFormatListBox::GetFormat() const
IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
{
- USHORT nPos = pBox->GetSelectEntryPos();
+ sal_uInt16 nPos = pBox->GetSelectEntryPos();
String sDefine(SW_RES( STR_DEFINE_NUMBERFORMAT ));
SwView *pView = GetView();
@@ -428,7 +428,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
double fValue = GetDefValue( nCurrFormatType);
- ULONG nFormat = pFormatter->GetStandardFormat( nCurrFormatType, eCurLanguage);
+ sal_uLong nFormat = pFormatter->GetStandardFormat( nCurrFormatType, eCurLanguage);
aCoreSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, nFormat ));
aCoreSet.Put( SvxNumberInfoItem( pFormatter, fValue,
@@ -457,15 +457,15 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
{
const sal_uInt32* pDelArr = ((SvxNumberInfoItem*)pItem)->GetDelArray();
- for ( USHORT i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ )
+ for ( sal_uInt16 i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ )
pFormatter->DeleteEntry( pDelArr[i] );
}
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
if( SFX_ITEM_SET == pOutSet->GetItemState(
- SID_ATTR_NUMBERFORMAT_VALUE, FALSE, &pItem ))
+ SID_ATTR_NUMBERFORMAT_VALUE, sal_False, &pItem ))
{
- UINT32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue();
+ sal_uInt32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue();
// oj #105473# change order of calls
const SvNumberformat* pFmt = pFormatter->GetEntry(nNumberFormat);
if( pFmt )
@@ -474,7 +474,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
SetDefFormat(nNumberFormat);
}
if( bShowLanguageControl && SFX_ITEM_SET == pOutSet->GetItemState(
- SID_ATTR_NUMBERFORMAT_ADD_AUTO, FALSE, &pItem ))
+ SID_ATTR_NUMBERFORMAT_ADD_AUTO, sal_False, &pItem ))
{
bUseAutomaticLanguage = ((const SfxBoolItem*)pItem)->GetValue();
}
@@ -507,7 +507,7 @@ double NumFormatListBox::GetDefValue(const short nFormatType) const
break;
/* {
String sValue("31.8.1997 16:57:34");
- ULONG nFormat = pFormatter->GetStandardFormat(nFormatType, LANGUAGE_GERMAN);
+ sal_uLong nFormat = pFormatter->GetStandardFormat(nFormatType, LANGUAGE_GERMAN);
pFormatter->IsNumberFormat( sValue, nFormat, fDefValue );
}
break;*/
diff --git a/sw/source/ui/utlui/prcntfld.cxx b/sw/source/ui/utlui/prcntfld.cxx
index 9ab9d9f47b34..f439c1fe1139 100644
--- a/sw/source/ui/utlui/prcntfld.cxx
+++ b/sw/source/ui/utlui/prcntfld.cxx
@@ -74,7 +74,7 @@ void PercentField::SetRefValue(sal_Int64 nValue)
Beschreibung:
--------------------------------------------------------------------*/
-void PercentField::ShowPercent(BOOL bPercent)
+void PercentField::ShowPercent(sal_Bool bPercent)
{
if ((bPercent && GetUnit() == FUNIT_CUSTOM) ||
(!bPercent && GetUnit() != FUNIT_CUSTOM))
@@ -293,10 +293,10 @@ sal_Int64 PercentField::DenormalizePercent(sal_Int64 nValue)
Beschreibung:
--------------------------------------------------------------------*/
-BOOL PercentField::IsValueModified()
+sal_Bool PercentField::IsValueModified()
{
if (GetUnit() == FUNIT_CUSTOM)
- return TRUE;
+ return sal_True;
else
return MetricField::IsValueModified();
}
@@ -305,9 +305,9 @@ BOOL PercentField::IsValueModified()
Beschreibung:
--------------------------------------------------------------------*/
-sal_Int64 PercentField::ImpPower10( USHORT n )
+sal_Int64 PercentField::ImpPower10( sal_uInt16 n )
{
- USHORT i;
+ sal_uInt16 i;
sal_Int64 nValue = 1;
for ( i=0; i < n; i++ )
diff --git a/sw/source/ui/utlui/shdwcrsr.cxx b/sw/source/ui/utlui/shdwcrsr.cxx
index a5c2e6dfe419..58acbd39d8ec 100644
--- a/sw/source/ui/utlui/shdwcrsr.cxx
+++ b/sw/source/ui/utlui/shdwcrsr.cxx
@@ -44,7 +44,7 @@ SwShadowCursor::~SwShadowCursor()
DrawCrsr( aOldPt, nOldHeight, nOldMode );
}
-void SwShadowCursor::SetPos( const Point& rPt, long nHeight, USHORT nMode )
+void SwShadowCursor::SetPos( const Point& rPt, long nHeight, sal_uInt16 nMode )
{
Point aPt( pWin->LogicToPixel( rPt ));
nHeight = pWin->LogicToPixel( Size( 0, nHeight )).Height();
@@ -60,7 +60,7 @@ void SwShadowCursor::SetPos( const Point& rPt, long nHeight, USHORT nMode )
}
}
-void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, BOOL bLeft )
+void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, sal_Bool bLeft )
{
long nLineDiff = ( nHeight / 2 );
long nLineDiffHalf = nLineDiff / 2;
@@ -79,7 +79,7 @@ void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, BOOL bLeft )
}
}
-void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, USHORT nMode )
+void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode )
{
nHeight = (((nHeight / 4)+1) * 4) + 1;
@@ -96,9 +96,9 @@ void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, USHORT nMode )
// 2. das Dreieck
if( text::HoriOrientation::LEFT == nMode || text::HoriOrientation::CENTER == nMode ) // Pfeil nach rechts
- DrawTri( rPt, nHeight, FALSE );
+ DrawTri( rPt, nHeight, sal_False );
if( text::HoriOrientation::RIGHT == nMode || text::HoriOrientation::CENTER == nMode ) // Pfeil nach links
- DrawTri( rPt, nHeight, TRUE );
+ DrawTri( rPt, nHeight, sal_True );
pWin->Pop();
}
diff --git a/sw/source/ui/utlui/textcontrolcombo.cxx b/sw/source/ui/utlui/textcontrolcombo.cxx
index c5325b554548..629d527ca872 100644
--- a/sw/source/ui/utlui/textcontrolcombo.cxx
+++ b/sw/source/ui/utlui/textcontrolcombo.cxx
@@ -45,7 +45,7 @@ TextControlCombo::~TextControlCombo()
{
}
-void TextControlCombo::Arrange( FixedText& _rFTcomplete, BOOL /*bShow*/ )
+void TextControlCombo::Arrange( FixedText& _rFTcomplete, sal_Bool /*bShow*/ )
{
Point aBasePos( GetPosPixel() );
Size aMetricVals( GetSizePixel() );
@@ -96,14 +96,14 @@ void TextControlCombo::Arrange( FixedText& _rFTcomplete, BOOL /*bShow*/ )
Window::Hide();
}
-void TextControlCombo::Show( BOOL _bVisible, USHORT _nFlags )
+void TextControlCombo::Show( sal_Bool _bVisible, sal_uInt16 _nFlags )
{
mrCtrl.Show( _bVisible, _nFlags );
mrFTbefore.Show( _bVisible, _nFlags );
mrFTafter.Show( _bVisible, _nFlags );
}
-void TextControlCombo::Enable( BOOL _bEnable, BOOL _bChild )
+void TextControlCombo::Enable( sal_Bool _bEnable, sal_Bool _bChild )
{
mrCtrl.Enable( _bEnable, _bChild );
mrFTbefore.Enable( _bEnable, _bChild );
diff --git a/sw/source/ui/utlui/tmplctrl.cxx b/sw/source/ui/utlui/tmplctrl.cxx
index df78a355d8c8..bcae8fa9cd24 100644
--- a/sw/source/ui/utlui/tmplctrl.cxx
+++ b/sw/source/ui/utlui/tmplctrl.cxx
@@ -61,10 +61,10 @@ class TemplatePopup_Impl : public PopupMenu
public:
TemplatePopup_Impl();
- USHORT GetCurId() const { return nCurId; }
+ sal_uInt16 GetCurId() const { return nCurId; }
private:
- USHORT nCurId;
+ sal_uInt16 nCurId;
virtual void Select();
};
@@ -86,8 +86,8 @@ void TemplatePopup_Impl::Select()
// class SvxZoomStatusBarControl ------------------------------------------
-SwTemplateControl::SwTemplateControl( USHORT _nSlotId,
- USHORT _nId,
+SwTemplateControl::SwTemplateControl( sal_uInt16 _nSlotId,
+ sal_uInt16 _nId,
StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb )
{
@@ -102,7 +102,7 @@ SwTemplateControl::~SwTemplateControl()
// -----------------------------------------------------------------------
void SwTemplateControl::StateChanged(
- USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+ sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
if( eState != SFX_ITEM_AVAILABLE || pState->ISA( SfxVoidItem ) )
GetStatusBar().SetItemText( GetId(), String() );
@@ -142,7 +142,7 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt )
pPool->SetSearchMask(SFX_STYLE_FAMILY_PAGE, SFXSTYLEBIT_ALL);
if( pPool->Count() > 1 )
{
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
SfxStyleSheetBase* pStyle = pPool->First();
while( pStyle )
{
@@ -152,7 +152,7 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt )
}
aPop.Execute( &GetStatusBar(), rCEvt.GetMousePosPixel());
- USHORT nCurrId = aPop.GetCurId();
+ sal_uInt16 nCurrId = aPop.GetCurId();
if( nCurrId != USHRT_MAX)
{
// sieht etwas umstaendlich aus, anders geht's aber nicht
diff --git a/sw/source/ui/utlui/uiitems.cxx b/sw/source/ui/utlui/uiitems.cxx
index baaff628fe5b..b539adea4353 100644
--- a/sw/source/ui/utlui/uiitems.cxx
+++ b/sw/source/ui/utlui/uiitems.cxx
@@ -47,7 +47,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
// Breitenangaben der Fussnotenlinien, mit TabPage abstimmen
-static const USHORT __FAR_DATA nFtnLines[] = {
+static const sal_uInt16 __FAR_DATA nFtnLines[] = {
0,
10,
50,
@@ -59,7 +59,7 @@ static const USHORT __FAR_DATA nFtnLines[] = {
#define FTN_LINE_STYLE_COUNT 5
-SwPageFtnInfoItem::SwPageFtnInfoItem( const USHORT nId, SwPageFtnInfo& rInfo) :
+SwPageFtnInfoItem::SwPageFtnInfoItem( const sal_uInt16 nId, SwPageFtnInfo& rInfo) :
SfxPoolItem( nId ),
aFtnInfo(rInfo)
{
@@ -108,7 +108,7 @@ SfxItemPresentation SwPageFtnInfoItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nHght = (USHORT) GetPageFtnInfo().GetHeight();
+ sal_uInt16 nHght = (sal_uInt16) GetPageFtnInfo().GetHeight();
if ( nHght )
{
rText = SW_RESSTR( STR_MAX_FTN_HEIGHT );
@@ -125,7 +125,7 @@ SfxItemPresentation SwPageFtnInfoItem::GetPresentation
/* -----------------------------26.04.01 12:25--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwPageFtnInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
+sal_Bool SwPageFtnInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
sal_Bool bRet = sal_True;
switch(nMemberId & ~CONVERT_TWIPS)
@@ -151,7 +151,7 @@ BOOL SwPageFtnInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
/* -----------------------------26.04.01 12:26--------------------------------
---------------------------------------------------------------------------*/
-BOOL SwPageFtnInfoItem::PutValue(const Any& rVal, BYTE nMemberId)
+sal_Bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
{
sal_Int32 nSet32 = 0;
sal_Bool bRet = sal_True;
@@ -214,7 +214,7 @@ BOOL SwPageFtnInfoItem::PutValue(const Any& rVal, BYTE nMemberId)
return bRet;
}
-SwPtrItem::SwPtrItem( const USHORT nId, void* pPtr ) :
+SwPtrItem::SwPtrItem( const sal_uInt16 nId, void* pPtr ) :
SfxPoolItem( nId ),
pMisc(pPtr)
{
@@ -256,7 +256,7 @@ int SwPtrItem::operator==( const SfxPoolItem& rAttr ) const
/*-----------------12.11.97 12:55-------------------------------
SwUINumRuleItem fuer die NumTabPages der FormatNumRule/Stylisten
---------------------------------------------------------------*/
-SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul, const USHORT nId )
+SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul, const sal_uInt16 nId )
: SfxPoolItem( nId ), pRule( new SwNumRule( rRul ) )
{
}
@@ -284,13 +284,13 @@ int SwUINumRuleItem::operator==( const SfxPoolItem& rAttr ) const
return *pRule == *((SwUINumRuleItem&)rAttr).pRule;
}
-BOOL SwUINumRuleItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
+sal_Bool SwUINumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
uno::Reference< container::XIndexReplace >xRules = new SwXNumberingRules(*pRule);
rVal.setValue(&xRules, ::getCppuType((uno::Reference< container::XIndexReplace>*)0));
- return TRUE;
+ return sal_True;
}
-BOOL SwUINumRuleItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
+sal_Bool SwUINumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
uno::Reference< container::XIndexReplace> xRulesRef;
if(rVal >>= xRulesRef)
@@ -303,12 +303,12 @@ BOOL SwUINumRuleItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
*pRule = *pSwXRules->GetNumRule();
}
}
- return TRUE;
+ return sal_True;
}
/* -----------------17.06.98 17:43-------------------
*
* --------------------------------------------------*/
-SwBackgroundDestinationItem::SwBackgroundDestinationItem(USHORT _nWhich, USHORT nValue) :
+SwBackgroundDestinationItem::SwBackgroundDestinationItem(sal_uInt16 _nWhich, sal_uInt16 nValue) :
SfxUInt16Item(_nWhich, nValue)
{
}
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index 32c355313d7f..9ccb68c3bef4 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -134,14 +134,14 @@ void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh)
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
const SfxPoolItem *pBoxInfo;
if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER,
- TRUE, &pBoxInfo))
+ sal_True, &pBoxInfo))
aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo;
// Tabellenvariante, wenn mehrere Tabellenzellen selektiert
rSh.GetCrsr(); //Damit GetCrsrCnt() auch das Richtige liefert
aBoxInfo.SetTable (rSh.IsTableMode() && rSh.GetCrsrCnt() > 1);
// Abstandsfeld immer anzeigen
- aBoxInfo.SetDist ((BOOL) TRUE);
+ aBoxInfo.SetDist ((sal_Bool) sal_True);
// Minimalgroesse in Tabellen und Absaetzen setzen
aBoxInfo.SetMinDist (rSh.IsTableMode() || rSh.GetSelectionType() & (nsSelectionType::SEL_TXT | nsSelectionType::SEL_TBL));
// Default-Abstand immer setzen
@@ -193,7 +193,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
const SvxPageItem& rPageItem = (const SvxPageItem&)rSet.Get(SID_ATTR_PAGE);
- USHORT nUse = (USHORT)rPageItem.GetPageUsage();
+ sal_uInt16 nUse = (sal_uInt16)rPageItem.GetPageUsage();
if(nUse & 0x04)
nUse |= 0x03;
if(nUse)
@@ -216,7 +216,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
//
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_HEADERSET,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rHeaderOn = (const SfxBoolItem&)rHeaderSet.Get(SID_ATTR_PAGE_ON);
@@ -225,7 +225,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
// Werte uebernehmen
if(!rMaster.GetHeader().IsActive())
- rMaster.SetFmtAttr(SwFmtHeader(TRUE));
+ rMaster.SetFmtAttr(SwFmtHeader(sal_True));
// Das Headerformat rausholen und anpassen
//
@@ -243,8 +243,8 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
//
if(rMaster.GetHeader().IsActive())
{
- rMaster.SetFmtAttr(SwFmtHeader(BOOL(FALSE)));
- rPageDesc.ChgHeaderShare(FALSE);
+ rMaster.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False)));
+ rPageDesc.ChgHeaderShare(sal_False);
}
}
}
@@ -252,7 +252,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Fusszeilen-Attribute auswerten
//
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_FOOTERSET,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rFooterOn = (const SfxBoolItem&)rFooterSet.Get(SID_ATTR_PAGE_ON);
@@ -261,7 +261,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
// Werte uebernehmen
if(!rMaster.GetFooter().IsActive())
- rMaster.SetFmtAttr(SwFmtFooter(TRUE));
+ rMaster.SetFmtAttr(SwFmtFooter(sal_True));
// Das Footerformat rausholen und anpassen
//
@@ -279,8 +279,8 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
//
if(rMaster.GetFooter().IsActive())
{
- rMaster.SetFmtAttr(SwFmtFooter(BOOL(FALSE)));
- rPageDesc.ChgFooterShare(FALSE);
+ rMaster.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False)));
+ rPageDesc.ChgFooterShare(sal_False);
}
}
}
@@ -288,7 +288,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Fussnoten
//
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_FTN_INFO,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
rPageDesc.SetFtnInfo( ((SwPageFtnInfoItem*)pItem)->GetPageFtnInfo() );
@@ -299,20 +299,20 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Registerhaltigkeit
if(SFX_ITEM_SET == rSet.GetItemState(
- SID_SWREGISTER_MODE, FALSE, &pItem))
+ SID_SWREGISTER_MODE, sal_False, &pItem))
{
- BOOL bSet = ((const SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bSet = ((const SfxBoolItem*)pItem)->GetValue();
if(!bSet)
rPageDesc.SetRegisterFmtColl(0);
else if(SFX_ITEM_SET == rSet.GetItemState(
- SID_SWREGISTER_COLLECTION, FALSE, &pItem))
+ SID_SWREGISTER_COLLECTION, sal_False, &pItem))
{
const String& rColl = ((const SfxStringItem*)pItem)->GetValue();
SwDoc& rDoc = *rMaster.GetDoc();
SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( rColl );
if( !pColl )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( rColl, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rColl, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if( USHRT_MAX != nId )
pColl = rDoc.GetTxtCollFromPool( nId );
else
@@ -320,7 +320,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
(SwTxtFmtColl*)rDoc.GetDfltTxtFmtColl() );
}
if( pColl )
- pColl->SetFmtAttr( SwRegisterItem ( TRUE ));
+ pColl->SetFmtAttr( SwRegisterItem ( sal_True ));
rPageDesc.SetRegisterFmtColl( pColl );
}
}
@@ -359,14 +359,14 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
const SfxPoolItem *pBoxInfo;
if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER,
- TRUE, &pBoxInfo) )
+ sal_True, &pBoxInfo) )
aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo;
- aBoxInfo.SetTable( FALSE );
+ aBoxInfo.SetTable( sal_False );
// Abstandsfeld immer anzeigen
- aBoxInfo.SetDist( TRUE);
+ aBoxInfo.SetDist( sal_True);
// Minimalgroesse in Tabellen und Absaetzen setzen
- aBoxInfo.SetMinDist( FALSE );
+ aBoxInfo.SetMinDist( sal_False );
// Default-Abstand immer setzen
aBoxInfo.SetDefDist( MIN_BORDER_DIST );
// Einzelne Linien koennen nur in Tabellen DontCare-Status haben
@@ -398,7 +398,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
// dynamische oder feste Hoehe
//
- SfxBoolItem aOn(SID_ATTR_PAGE_ON, TRUE);
+ SfxBoolItem aOn(SID_ATTR_PAGE_ON, sal_True);
aHeaderSet.Put(aOn);
const SwFmtFrmSize &rFrmSize = pHeaderFmt->GetFrmSize();
@@ -444,7 +444,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
// dynamische oder feste Hoehe
//
- SfxBoolItem aOn(SID_ATTR_PAGE_ON, TRUE);
+ SfxBoolItem aOn(SID_ATTR_PAGE_ON, sal_True);
aFooterSet.Put(aOn);
const SwFmtFrmSize &rFrmSize = pFooterFmt->GetFrmSize();
@@ -510,11 +510,11 @@ void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem& rTabs)
--------------------------------------------------------------------*/
-USHORT GetTabDist(const SvxTabStopItem& rTabs)
+sal_uInt16 GetTabDist(const SvxTabStopItem& rTabs)
{
- USHORT nDefDist;
+ sal_uInt16 nDefDist;
if( rTabs.Count() )
- nDefDist = (USHORT)( rTabs[0].GetTabPos() );
+ nDefDist = (sal_uInt16)( rTabs[0].GetTabPos() );
else
nDefDist = 1134; // 2cm
return nDefDist;
@@ -527,14 +527,14 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet )
const SfxPoolItem* pItem;
SwFmtPageDesc aPgDesc;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
// Seitennummer
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_PARA_PAGENUM, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_PARA_PAGENUM, sal_False, &pItem))
{
aPgDesc.SetNumOffset(((SfxUInt16Item*)pItem)->GetValue());
- bChanged = TRUE;
+ bChanged = sal_True;
}
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, sal_False, &pItem ))
{
const String& rDescName = ((SvxPageModelItem*)pItem)->GetValue();
if( rDescName.Len() ) // kein Name -> PageDesc ausschalten!
@@ -542,18 +542,18 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet )
// nur loeschen, wenn PageDesc eingschaltet wird!
rSet.ClearItem( RES_BREAK );
SwPageDesc* pDesc = ((SwWrtShell&)rShell).FindPageDescByName(
- rDescName, TRUE );
+ rDescName, sal_True );
if( pDesc )
pDesc->Add( &aPgDesc );
}
rSet.ClearItem( SID_ATTR_PARA_MODEL );
- bChanged = TRUE;
+ bChanged = sal_True;
}
else
{
SfxItemSet aCoreSet(rShell.GetView().GetPool(), RES_PAGEDESC, RES_PAGEDESC );
rShell.GetCurAttr( aCoreSet );
- if(SFX_ITEM_SET == aCoreSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) )
+ if(SFX_ITEM_SET == aCoreSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) )
{
if( ((SwFmtPageDesc*)pItem)->GetPageDesc() )
{
@@ -573,9 +573,9 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
{
const SfxPoolItem* pItem = 0;
String aName;
- USHORT nPageNum = 0;
- BOOL bPut = TRUE;
- switch( rCoreSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) )
+ sal_uInt16 nPageNum = 0;
+ sal_Bool bPut = sal_True;
+ switch( rCoreSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) )
{
case SFX_ITEM_SET:
{
@@ -593,13 +593,13 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
break;
default:
- bPut = FALSE;
+ bPut = sal_False;
}
SfxUInt16Item aPageNum( SID_ATTR_PARA_PAGENUM, nPageNum );
rCoreSet.Put( aPageNum );
if(bPut)
- rCoreSet.Put( SvxPageModelItem( aName, TRUE, SID_ATTR_PARA_MODEL ) );
+ rCoreSet.Put( SvxPageModelItem( aName, sal_True, SID_ATTR_PARA_MODEL ) );
}
/*--------------------------------------------------------------------
@@ -607,7 +607,7 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
--------------------------------------------------------------------*/
-FieldUnit GetDfltMetric(BOOL bWeb)
+FieldUnit GetDfltMetric(sal_Bool bWeb)
{
return SW_MOD()->GetUsrPref(bWeb)->GetMetric();
}
@@ -617,7 +617,7 @@ FieldUnit GetDfltMetric(BOOL bWeb)
--------------------------------------------------------------------*/
-void SetDfltMetric( FieldUnit eMetric, BOOL bWeb )
+void SetDfltMetric( FieldUnit eMetric, sal_Bool bWeb )
{
SW_MOD()->ApplyUserMetric(eMetric, bWeb);
}
@@ -625,9 +625,9 @@ void SetDfltMetric( FieldUnit eMetric, BOOL bWeb )
/*-----------------09.04.98 16:58-------------------
--------------------------------------------------*/
-USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, USHORT nOffset )
+sal_uInt16 InsertStringSorted(const String& rEntry, ListBox& rToFill, sal_uInt16 nOffset )
{
- USHORT i = nOffset;
+ sal_uInt16 i = nOffset;
CollatorWrapper& rCaseColl = ::GetAppCaseCollator();
for( ; i < rToFill.GetEntryCount(); i++ )
@@ -637,9 +637,9 @@ USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, USHORT nOffset
}
return rToFill.InsertEntry(rEntry, i);
}
-void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BOOL bWithDefault)
+void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, sal_Bool bSorted, sal_Bool bWithDefault)
{
- BOOL bHasOffset = rToFill.GetEntryCount() > 0;
+ sal_Bool bHasOffset = rToFill.GetEntryCount() > 0;
SfxStyleSheetBasePool* pPool = pDocSh->GetStyleSheetPool();
pPool->SetSearchMask(SFX_STYLE_FAMILY_CHAR, SFXSTYLEBIT_ALL);
SwDoc* pDoc = pDocSh->GetDoc();
@@ -650,7 +650,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
{
if(bWithDefault || pBase->GetName() != sStandard)
{
- USHORT nPos;
+ sal_uInt16 nPos;
if(bSorted)
nPos = InsertStringSorted(pBase->GetName(), rToFill, bHasOffset );
else
@@ -662,7 +662,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
}
// non-pool styles
const SwCharFmts* pFmts = pDoc->GetCharFmts();
- for(USHORT i = 0; i < pFmts->Count(); i++)
+ for(sal_uInt16 i = 0; i < pFmts->Count(); i++)
{
const SwCharFmt* pFmt = (*pFmts)[i];
if(pFmt->IsDefault())
@@ -670,7 +670,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
const String& rName = pFmt->GetName();
if(rToFill.GetEntryPos(rName) == LISTBOX_ENTRY_NOTFOUND)
{
- USHORT nPos;
+ sal_uInt16 nPos;
if(bSorted)
nPos = InsertStringSorted(rName, rToFill, bHasOffset );
else
@@ -684,7 +684,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
/* -----------------27.04.98 08:26-------------------
*
* --------------------------------------------------*/
-SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent,
+SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent,
SwWrtShell* pSh )
{
//Die Breite zu besorgen ist etwas komplizierter.
@@ -733,19 +733,19 @@ String GetAppLangDateTimeString( const DateTime& rDT )
const SvtSysLocale aSysLocale;
const LocaleDataWrapper& rAppLclData = aSysLocale.GetLocaleData();
String sRet( rAppLclData.getDate( rDT ));
- ( sRet += ' ' ) += rAppLclData.getTime( rDT, FALSE, FALSE );
+ ( sRet += ' ' ) += rAppLclData.getTime( rDT, sal_False, sal_False );
return sRet;
}
/*-- 26.01.2006 08:06:33---------------------------------------------------
-----------------------------------------------------------------------*/
-bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, USHORT nId )
+bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 nId )
{
bool bRet = false;
- USHORT nItemCount = rMenu.GetItemCount();
+ sal_uInt16 nItemCount = rMenu.GetItemCount();
String sCommand;
- for( USHORT nItem = 0; nItem < nItemCount; ++nItem)
+ for( sal_uInt16 nItem = 0; nItem < nItemCount; ++nItem)
{
PopupMenu* pPopup = rMenu.GetPopupMenu( rMenu.GetItemId( nItem ) );
if(pPopup)
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index e944c3b383cf..42df7d4a8dac 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -169,7 +169,7 @@ void SwOneExampleFrame::CreateControl()
uno::Sequence<beans::PropertyValue> aSeq(3);
beans::PropertyValue* pValues = aSeq.getArray();
pValues[0].Name = C2U("ReadOnly");
- BOOL bTrue = sal_True;
+ sal_Bool bTrue = sal_True;
pValues[0].Value.setValue(&bTrue, ::getBooleanCppuType());
pValues[1].Name = C2U("OpenFlags");
pValues[1].Value <<= C2U("-RB");
@@ -367,7 +367,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
/* -----------------------------27.12.99 09:59--------------------------------
---------------------------------------------------------------------------*/
-void SwOneExampleFrame::ClearDocument( BOOL bStartUpdateTimer )
+void SwOneExampleFrame::ClearDocument( sal_Bool bStartUpdateTimer )
{
uno::Reference< lang::XUnoTunnel> xTunnel( _xCursor, uno::UNO_QUERY);
if( xTunnel.is() )
@@ -392,8 +392,8 @@ void SwOneExampleFrame::ClearDocument( BOOL bStartUpdateTimer )
}
else
{
- _xCursor->gotoStart(FALSE);
- _xCursor->gotoEnd(TRUE);
+ _xCursor->gotoStart(sal_False);
+ _xCursor->gotoEnd(sal_True);
_xCursor->setString(OUString());
}
}
diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx
index dbee2286731a..1b755391c319 100644
--- a/sw/source/ui/utlui/viewlayoutctrl.cxx
+++ b/sw/source/ui/utlui/viewlayoutctrl.cxx
@@ -58,7 +58,7 @@ const long nImageHeight = 11;
struct SwViewLayoutControl::SwViewLayoutControl_Impl
{
- USHORT mnState; // 0 = single, 1 = auto, 2 = book, 3 = none
+ sal_uInt16 mnState; // 0 = single, 1 = auto, 2 = book, 3 = none
Image maImageSingleColumn;
Image maImageSingleColumn_Active;
Image maImageAutomatic;
@@ -69,7 +69,7 @@ struct SwViewLayoutControl::SwViewLayoutControl_Impl
// class SwViewLayoutControl ------------------------------------------
-SwViewLayoutControl::SwViewLayoutControl( USHORT _nSlotId, USHORT _nId, StatusBar& rStb ) :
+SwViewLayoutControl::SwViewLayoutControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb ),
mpImpl( new SwViewLayoutControl_Impl )
{
@@ -93,14 +93,14 @@ SwViewLayoutControl::~SwViewLayoutControl()
// -----------------------------------------------------------------------
-void SwViewLayoutControl::StateChanged( USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
if ( SFX_ITEM_AVAILABLE != eState || pState->ISA( SfxVoidItem ) )
GetStatusBar().SetItemText( GetId(), String() );
else
{
DBG_ASSERT( pState->ISA( SvxViewLayoutItem ), "invalid item type" );
- const USHORT nColumns = static_cast<const SvxViewLayoutItem*>( pState )->GetValue();
+ const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem*>( pState )->GetValue();
const bool bBookMode = static_cast<const SvxViewLayoutItem*>( pState )->IsBookMode();
// SingleColumn Mode
@@ -165,13 +165,13 @@ void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt )
//pDev->SetFillColor( aOldFillColor );
}
-BOOL SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
+sal_Bool SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
{
const Rectangle aRect = getControlRect();
const Point aPoint = rEvt.GetPosPixel();
const long nXDiff = aPoint.X() - aRect.Left();
- USHORT nColumns = 1;
+ sal_uInt16 nColumns = 1;
bool bBookMode = false;
const long nXOffset = (aRect.GetWidth() - nImageWidthSum)/2;
@@ -205,5 +205,5 @@ BOOL SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
execute( aArgs );
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/ui/utlui/zoomctrl.cxx b/sw/source/ui/utlui/zoomctrl.cxx
index 48cf53b6263a..13cc237812d6 100644
--- a/sw/source/ui/utlui/zoomctrl.cxx
+++ b/sw/source/ui/utlui/zoomctrl.cxx
@@ -46,8 +46,8 @@
SFX_IMPL_STATUSBAR_CONTROL( SwZoomControl, SvxZoomItem );
-SwZoomControl::SwZoomControl( USHORT _nSlotId,
- USHORT _nId,
+SwZoomControl::SwZoomControl( sal_uInt16 _nSlotId,
+ sal_uInt16 _nId,
StatusBar& rStb ) :
SvxZoomStatusBarControl( _nSlotId, _nId, rStb )
{
@@ -61,7 +61,7 @@ SwZoomControl::~SwZoomControl()
// -----------------------------------------------------------------------
-void SwZoomControl::StateChanged( USHORT nSID, SfxItemState eState,
+void SwZoomControl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState )
{
if(SFX_ITEM_AVAILABLE == eState && pState->ISA( SfxStringItem ))
diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx
index 50ab62dd904f..d68df940810b 100644
--- a/sw/source/ui/vba/vbadocumentproperties.cxx
+++ b/sw/source/ui/vba/vbadocumentproperties.cxx
@@ -150,7 +150,7 @@ public:
SwFEShell* pFEShell = mpDocShell->GetFEShell();
if(pFEShell)
{
- aReturn <<= pFEShell->GetLineCount(FALSE);
+ aReturn <<= pFEShell->GetLineCount(sal_False);
}
}
}
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index a33b3c208c8f..1b4fc953b04d 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -239,10 +239,10 @@ xub_StrLen _ReadFieldParams::FindNextStringPiece(const xub_StrLen nStart)
// read parameters "1-3" or 1-3 with both values between 1 and nMax
-bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax)
+bool _ReadFieldParams::GetTokenSttFromTo(sal_uInt16* pFrom, sal_uInt16* pTo, sal_uInt16 nMax)
{
- USHORT nStart = 0;
- USHORT nEnd = 0;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nEnd = 0;
xub_StrLen n = GoToTokenParam();
if( STRING_NOTFOUND != n )
{
@@ -253,8 +253,8 @@ bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax
String sStart( sParams.GetToken(0, '-', nIndex) );
if( STRING_NOTFOUND != nIndex )
{
- nStart = static_cast<USHORT>(sStart.ToInt32());
- nEnd = static_cast<USHORT>(sParams.Copy(nIndex).ToInt32());
+ nStart = static_cast<sal_uInt16>(sStart.ToInt32());
+ nEnd = static_cast<sal_uInt16>(sParams.Copy(nIndex).ToInt32());
}
}
if( pFrom ) *pFrom = nStart;
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index 620e44fa413b..2143cd079a93 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -112,7 +112,7 @@ SwVbaSelection::setText( const rtl::OUString& rText ) throw ( uno::RuntimeExcept
void SAL_CALL
SwVbaSelection::TypeText( const rtl::OUString& rText ) throw ( uno::RuntimeException )
{
- // FIXME: handle the property Options.ReplaceSelection, the default value is TRUE
+ // FIXME: handle the property Options.ReplaceSelection, the default value is sal_True
setText( rText );
}
diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx
index d1e7fe672a38..cf25a31adf19 100644
--- a/sw/source/ui/web/wview.cxx
+++ b/sw/source/ui/web/wview.cxx
@@ -136,11 +136,11 @@ SwWebView::~SwWebView()
void SwWebView::SelectShell()
{
// Entscheidung, ob UpdateTable gerufen werden muss
- BOOL bUpdateTable = FALSE;
+ sal_Bool bUpdateTable = sal_False;
const SwFrmFmt* pCurTableFmt = GetWrtShell().GetTableFmt();
if(pCurTableFmt && pCurTableFmt != GetLastTblFrmFmt())
{
- bUpdateTable = TRUE; // kann erst spaeter ausgefuehrt werden
+ bUpdateTable = sal_True; // kann erst spaeter ausgefuehrt werden
}
SetLastTblFrmFmt(pCurTableFmt);
//SEL_TBL und SEL_TBL_CELLS koennen verodert sein!
@@ -150,7 +150,7 @@ void SwWebView::SelectShell()
int _nSelectionType = GetSelectionType();
if ( nNewSelectionType == _nSelectionType )
{
- GetViewFrame()->GetBindings().InvalidateAll( FALSE );
+ GetViewFrame()->GetBindings().InvalidateAll( sal_False );
if ( _nSelectionType & nsSelectionType::SEL_OLE ||
_nSelectionType & nsSelectionType::SEL_GRF )
//Fuer Grafiken und OLE kann sich natuerlich das Verb aendern!
@@ -173,8 +173,8 @@ void SwWebView::SelectShell()
pBarCfg->SetTopToolbar( _nSelectionType, nId );
SfxShell *pSfxShell;
- USHORT i;
- for ( i = 0; TRUE; ++i )
+ sal_uInt16 i;
+ for ( i = 0; sal_True; ++i )
{
pSfxShell = rDispatcher.GetShell( i );
if ( !( pSfxShell->ISA( SwBaseShell ) ||
@@ -186,15 +186,15 @@ void SwWebView::SelectShell()
rDispatcher.Pop( *pSfxShell, SFX_SHELL_POP_UNTIL | SFX_SHELL_POP_DELETE);
}
- BOOL bInitFormShell = FALSE;
+ sal_Bool bInitFormShell = sal_False;
if( !GetFormShell() )
{
- bInitFormShell = TRUE;
+ bInitFormShell = sal_True;
SetFormShell( new FmFormShell( this ) );
rDispatcher.Push( *GetFormShell() );
}
- BOOL bSetExtInpCntxt = FALSE;
+ sal_Bool bSetExtInpCntxt = sal_False;
_nSelectionType = nNewSelectionType;
SetSelectionType( _nSelectionType );
ShellModes eShellMode;
@@ -266,7 +266,7 @@ void SwWebView::SelectShell()
}
else
{
- bSetExtInpCntxt = TRUE;
+ bSetExtInpCntxt = sal_True;
eShellMode = SHELL_MODE_TEXT;
if ( _nSelectionType & nsSelectionType::SEL_NUM )
{
@@ -290,7 +290,7 @@ void SwWebView::SelectShell()
if( !GetDocShell()->IsReadOnly() )
{
if( bSetExtInpCntxt && GetWrtShell().HasReadonlySel() )
- bSetExtInpCntxt = FALSE;
+ bSetExtInpCntxt = sal_False;
InputContext aCntxt( GetEditWin().GetInputContext() );
aCntxt.SetOptions( bSetExtInpCntxt
@@ -324,7 +324,7 @@ void SwWebView::SelectShell()
//Guenstiger Zeitpunkt fuer die Kommunikation mit OLE-Objekten?
if ( GetDocShell()->GetDoc()->IsOLEPrtNotifyPending() )
- GetDocShell()->GetDoc()->PrtOLENotify( FALSE );
+ GetDocShell()->GetDoc()->PrtOLENotify( sal_False );
//jetzt das Tabellen-Update
if(bUpdateTable)
diff --git a/sw/source/ui/wrtsh/delete.cxx b/sw/source/ui/wrtsh/delete.cxx
index 182fb5e37854..d307f75af908 100644
--- a/sw/source/ui/wrtsh/delete.cxx
+++ b/sw/source/ui/wrtsh/delete.cxx
@@ -50,7 +50,7 @@ inline void SwWrtShell::OpenMark()
SetMark();
}
-inline void SwWrtShell::CloseMark( BOOL bOkFlag )
+inline void SwWrtShell::CloseMark( sal_Bool bOkFlag )
{
if( bOkFlag )
UpdateAttr();
@@ -62,9 +62,9 @@ inline void SwWrtShell::CloseMark( BOOL bOkFlag )
}
// #i23725#
-BOOL SwWrtShell::TryRemoveIndent()
+sal_Bool SwWrtShell::TryRemoveIndent()
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SfxItemSet aAttrSet(GetAttrPool(), RES_LR_SPACE, RES_LR_SPACE);
GetCurAttr(aAttrSet);
@@ -75,19 +75,19 @@ BOOL SwWrtShell::TryRemoveIndent()
if (aOldFirstLineOfst > 0)
{
aItem.SetTxtFirstLineOfst(0);
- bResult = TRUE;
+ bResult = sal_True;
}
else if (aOldFirstLineOfst < 0)
{
aItem.SetTxtFirstLineOfst(0);
aItem.SetLeft(aItem.GetLeft() + aOldFirstLineOfst);
- bResult = TRUE;
+ bResult = sal_True;
}
else if (aItem.GetLeft() != 0)
{
aItem.SetLeft(0);
- bResult = TRUE;
+ bResult = sal_True;
}
if (bResult)
@@ -119,7 +119,7 @@ long SwWrtShell::DelLine()
// if(!IsEndOfPara())
// SwCrsrShell::Right();
long nRet = Delete();
- Pop(FALSE);
+ Pop(sal_False);
if( nRet )
UpdateAttr();
return nRet;
@@ -203,7 +203,7 @@ long SwWrtShell::DelLeft()
}
// JP 29.06.95: nie eine davor stehende Tabelle loeschen.
- BOOL bSwap = FALSE;
+ sal_Bool bSwap = sal_False;
const SwTableNode * pWasInTblNd = SwCrsrShell::IsCrsrInTbl();
if( SwCrsrShell::IsSttPara())
@@ -239,7 +239,7 @@ long SwWrtShell::DelLeft()
OpenMark();
SwCrsrShell::Right(1,CRSR_SKIP_CHARS);
SwCrsrShell::SwapPam();
- bSwap = TRUE;
+ bSwap = sal_True;
}
else
{
@@ -316,7 +316,7 @@ long SwWrtShell::DelRight()
}
// restore cursor
- SwCrsrShell::Pop( FALSE );
+ SwCrsrShell::Pop( sal_False );
if( bDelFull )
{
@@ -356,14 +356,14 @@ long SwWrtShell::DelRight()
have moved to a different cell */
if (pSNdOld != pSNdNew)
{
- SwCrsrShell::Pop( TRUE );
+ SwCrsrShell::Pop( sal_True );
break;
}
}
}
// restore cursor
- SwCrsrShell::Pop( FALSE );
+ SwCrsrShell::Pop( sal_False );
}
}
@@ -440,11 +440,11 @@ long SwWrtShell::DelToEndOfPara()
SetMark();
if( !MovePara(fnParaCurr,fnParaEnd))
{
- Pop(FALSE);
+ Pop(sal_False);
return 0;
}
long nRet = Delete();
- Pop(FALSE);
+ Pop(sal_False);
if( nRet )
UpdateAttr();
return nRet;
@@ -460,11 +460,11 @@ long SwWrtShell::DelToStartOfPara()
SetMark();
if( !MovePara(fnParaCurr,fnParaStart))
{
- Pop(FALSE);
+ Pop(sal_False);
return 0;
}
long nRet = Delete();
- Pop(FALSE);
+ Pop(sal_False);
if( nRet )
UpdateAttr();
return nRet;
@@ -544,11 +544,11 @@ long SwWrtShell::DelPrvWord()
{
// skip over all-1 spaces
short n = -1;
- while( ' ' == GetChar( FALSE, n ))
+ while( ' ' == GetChar( sal_False, n ))
--n;
if( ++n )
- ExtendSelection( FALSE, -n );
+ ExtendSelection( sal_False, -n );
}
}
else if( IsSttPara())
diff --git a/sw/source/ui/wrtsh/move.cxx b/sw/source/ui/wrtsh/move.cxx
index dc196de9d9da..34a9b5554c36 100644
--- a/sw/source/ui/wrtsh/move.cxx
+++ b/sw/source/ui/wrtsh/move.cxx
@@ -54,12 +54,12 @@ const long nReadOnlyScrollOfst = 10;
class ShellMoveCrsr
{
SwWrtShell* pSh;
- BOOL bAct;
+ sal_Bool bAct;
public:
- inline ShellMoveCrsr( SwWrtShell* pWrtSh, BOOL bSel )
+ inline ShellMoveCrsr( SwWrtShell* pWrtSh, sal_Bool bSel )
{
- bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrmType(0,FALSE) & FRMTYPE_FLY_ANY);
- ( pSh = pWrtSh )->MoveCrsr( BOOL(bSel) );
+ bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrmType(0,sal_False) & FRMTYPE_FLY_ANY);
+ ( pSh = pWrtSh )->MoveCrsr( sal_Bool(bSel) );
pWrtSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_HYPERLINK_GETLINK);
}
inline ~ShellMoveCrsr()
@@ -74,7 +74,7 @@ public:
}
};
-void SwWrtShell::MoveCrsr( BOOL bWithSelect )
+void SwWrtShell::MoveCrsr( sal_Bool bWithSelect )
{
ResetCursorStack();
if ( IsGCAttr() )
@@ -87,35 +87,35 @@ void SwWrtShell::MoveCrsr( BOOL bWithSelect )
else
{
EndSelect();
- (this->*fnKillSel)( 0, FALSE );
+ (this->*fnKillSel)( 0, sal_False );
}
}
-BOOL SwWrtShell::SimpleMove( FNSimpleMove FnSimpleMove, BOOL bSelect )
+sal_Bool SwWrtShell::SimpleMove( FNSimpleMove FnSimpleMove, sal_Bool bSelect )
{
- BOOL nRet;
+ sal_Bool nRet;
if( bSelect )
{
SttCrsrMove();
- MoveCrsr( TRUE );
+ MoveCrsr( sal_True );
nRet = (this->*FnSimpleMove)();
EndCrsrMove();
}
else if( 0 != ( nRet = (this->*FnSimpleMove)() ) )
- MoveCrsr( FALSE );
+ MoveCrsr( sal_False );
return nRet;
}
-BOOL SwWrtShell::Left( USHORT nMode, BOOL bSelect,
- USHORT nCount, BOOL bBasicCall, BOOL bVisual )
+sal_Bool SwWrtShell::Left( sal_uInt16 nMode, sal_Bool bSelect,
+ sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly())
{
Point aTmp( VisArea().Pos() );
aTmp.X() -= VisArea().Width() * nReadOnlyScrollOfst / 100;
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -126,8 +126,8 @@ BOOL SwWrtShell::Left( USHORT nMode, BOOL bSelect,
-BOOL SwWrtShell::Right( USHORT nMode, BOOL bSelect,
- USHORT nCount, BOOL bBasicCall, BOOL bVisual )
+sal_Bool SwWrtShell::Right( sal_uInt16 nMode, sal_Bool bSelect,
+ sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly() )
{
@@ -135,7 +135,7 @@ BOOL SwWrtShell::Right( USHORT nMode, BOOL bSelect,
aTmp.X() += VisArea().Width() * nReadOnlyScrollOfst / 100;
aTmp.X() = rView.SetHScrollMax( aTmp.X() );
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -146,14 +146,14 @@ BOOL SwWrtShell::Right( USHORT nMode, BOOL bSelect,
-BOOL SwWrtShell::Up( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
+sal_Bool SwWrtShell::Up( sal_Bool bSelect, sal_uInt16 nCount, sal_Bool bBasicCall )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly())
{
Point aTmp( VisArea().Pos() );
aTmp.Y() -= VisArea().Height() * nReadOnlyScrollOfst / 100;
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -164,7 +164,7 @@ BOOL SwWrtShell::Up( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
-BOOL SwWrtShell::Down( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
+sal_Bool SwWrtShell::Down( sal_Bool bSelect, sal_uInt16 nCount, sal_Bool bBasicCall )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly())
{
@@ -172,7 +172,7 @@ BOOL SwWrtShell::Down( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
aTmp.Y() += VisArea().Height() * nReadOnlyScrollOfst / 100;
aTmp.Y() = rView.SetVScrollMax( aTmp.Y() );
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -183,14 +183,14 @@ BOOL SwWrtShell::Down( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
-BOOL SwWrtShell::LeftMargin( BOOL bSelect, BOOL bBasicCall )
+sal_Bool SwWrtShell::LeftMargin( sal_Bool bSelect, sal_Bool bBasicCall )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() )
{
Point aTmp( VisArea().Pos() );
aTmp.X() = DOCUMENTBORDER;
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -201,7 +201,7 @@ BOOL SwWrtShell::LeftMargin( BOOL bSelect, BOOL bBasicCall )
-BOOL SwWrtShell::RightMargin( BOOL bSelect, BOOL bBasicCall )
+sal_Bool SwWrtShell::RightMargin( sal_Bool bSelect, sal_Bool bBasicCall )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() )
{
@@ -210,7 +210,7 @@ BOOL SwWrtShell::RightMargin( BOOL bSelect, BOOL bBasicCall )
if( DOCUMENTBORDER > aTmp.X() )
aTmp.X() = DOCUMENTBORDER;
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -221,12 +221,12 @@ BOOL SwWrtShell::RightMargin( BOOL bSelect, BOOL bBasicCall )
-BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable,
- BOOL bSelect, BOOL bDontMoveRegion )
+sal_Bool SwWrtShell::GoStart( sal_Bool bKeepArea, sal_Bool *pMoveTable,
+ sal_Bool bSelect, sal_Bool bDontMoveRegion )
{
if ( IsCrsrInTbl() )
{
- const BOOL bBoxSelection = HasBoxSelection();
+ const sal_Bool bBoxSelection = HasBoxSelection();
if( !bBlockMode )
{
if ( !bSelect )
@@ -239,14 +239,14 @@ BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable,
|| bDontMoveRegion))
{
if ( pMoveTable )
- *pMoveTable = FALSE;
- return TRUE;
+ *pMoveTable = sal_False;
+ return sal_True;
}
if( MoveTable( fnTableCurr, fnTableStart ) || bDontMoveRegion )
{
if ( pMoveTable )
- *pMoveTable = TRUE;
- return TRUE;
+ *pMoveTable = sal_True;
+ return sal_True;
}
else if( bBoxSelection && pMoveTable )
{
@@ -255,8 +255,8 @@ BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable,
// SelAll gesetzt). Dann darf die Tabelle nicht
// verlassen werden; sonst ist keine Selektion der
// gesamten Tabelle moeglich!
- *pMoveTable = TRUE;
- return TRUE;
+ *pMoveTable = sal_True;
+ return sal_True;
}
}
@@ -267,29 +267,29 @@ BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable,
else
SttSelect();
}
- const USHORT nFrmType = GetFrmType(0,FALSE);
+ const sal_uInt16 nFrmType = GetFrmType(0,sal_False);
if ( FRMTYPE_FLY_ANY & nFrmType )
{
if( MoveSection( fnSectionCurr, fnSectionStart ) )
- return TRUE;
+ return sal_True;
else if ( FRMTYPE_FLY_FREE & nFrmType || bDontMoveRegion )
- return FALSE;
+ return sal_False;
}
if(( FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE ) & nFrmType )
{
if ( MoveSection( fnSectionCurr, fnSectionStart ) )
- return TRUE;
+ return sal_True;
else if ( bKeepArea )
- return TRUE;
+ return sal_True;
}
// Bereiche ???
return SwCrsrShell::MoveRegion( fnRegionCurrAndSkip, fnRegionStart ) ||
- SwCrsrShell::SttEndDoc(TRUE);
+ SwCrsrShell::SttEndDoc(sal_True);
}
-BOOL SwWrtShell::GoEnd(BOOL bKeepArea, BOOL *pMoveTable)
+sal_Bool SwWrtShell::GoEnd(sal_Bool bKeepArea, sal_Bool *pMoveTable)
{
if ( pMoveTable && *pMoveTable )
return MoveTable( fnTableCurr, fnTableEnd );
@@ -298,49 +298,49 @@ BOOL SwWrtShell::GoEnd(BOOL bKeepArea, BOOL *pMoveTable)
{
if ( MoveSection( fnSectionCurr, fnSectionEnd ) ||
MoveTable( fnTableCurr, fnTableEnd ) )
- return TRUE;
+ return sal_True;
}
else
{
- const USHORT nFrmType = GetFrmType(0,FALSE);
+ const sal_uInt16 nFrmType = GetFrmType(0,sal_False);
if ( FRMTYPE_FLY_ANY & nFrmType )
{
if ( MoveSection( fnSectionCurr, fnSectionEnd ) )
- return TRUE;
+ return sal_True;
else if ( FRMTYPE_FLY_FREE & nFrmType )
- return FALSE;
+ return sal_False;
}
if(( FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE ) & nFrmType )
{
if ( MoveSection( fnSectionCurr, fnSectionEnd) )
- return TRUE;
+ return sal_True;
else if ( bKeepArea )
- return TRUE;
+ return sal_True;
}
}
// Bereiche ???
return SwCrsrShell::MoveRegion( fnRegionCurrAndSkip, fnRegionEnd ) ||
- SwCrsrShell::SttEndDoc(FALSE);
+ SwCrsrShell::SttEndDoc(sal_False);
}
-BOOL SwWrtShell::SttDoc( BOOL bSelect )
+sal_Bool SwWrtShell::SttDoc( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
- return GoStart(FALSE, 0, bSelect );
+ return GoStart(sal_False, 0, bSelect );
}
-BOOL SwWrtShell::EndDoc( BOOL bSelect)
+sal_Bool SwWrtShell::EndDoc( sal_Bool bSelect)
{
ShellMoveCrsr aTmp( this, bSelect );
return GoEnd();
}
-BOOL SwWrtShell::SttNxtPg( BOOL bSelect )
+sal_Bool SwWrtShell::SttNxtPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPageNext, fnPageStart );
@@ -348,7 +348,7 @@ BOOL SwWrtShell::SttNxtPg( BOOL bSelect )
-BOOL SwWrtShell::SttPrvPg( BOOL bSelect )
+sal_Bool SwWrtShell::SttPrvPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPagePrev, fnPageStart );
@@ -356,7 +356,7 @@ BOOL SwWrtShell::SttPrvPg( BOOL bSelect )
-BOOL SwWrtShell::EndNxtPg( BOOL bSelect )
+sal_Bool SwWrtShell::EndNxtPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPageNext, fnPageEnd );
@@ -364,7 +364,7 @@ BOOL SwWrtShell::EndNxtPg( BOOL bSelect )
-BOOL SwWrtShell::EndPrvPg( BOOL bSelect )
+sal_Bool SwWrtShell::EndPrvPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPagePrev, fnPageEnd );
@@ -372,7 +372,7 @@ BOOL SwWrtShell::EndPrvPg( BOOL bSelect )
-BOOL SwWrtShell::SttPg( BOOL bSelect )
+sal_Bool SwWrtShell::SttPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPageCurr, fnPageStart );
@@ -380,7 +380,7 @@ BOOL SwWrtShell::SttPg( BOOL bSelect )
-BOOL SwWrtShell::EndPg( BOOL bSelect )
+sal_Bool SwWrtShell::EndPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPageCurr, fnPageEnd );
@@ -388,7 +388,7 @@ BOOL SwWrtShell::EndPg( BOOL bSelect )
-BOOL SwWrtShell::SttPara( BOOL bSelect )
+sal_Bool SwWrtShell::SttPara( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePara( fnParaCurr, fnParaStart );
@@ -396,7 +396,7 @@ BOOL SwWrtShell::SttPara( BOOL bSelect )
-BOOL SwWrtShell::EndPara( BOOL bSelect )
+sal_Bool SwWrtShell::EndPara( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePara(fnParaCurr,fnParaEnd);
@@ -411,7 +411,7 @@ BOOL SwWrtShell::EndPara( BOOL bSelect )
-BOOL SwWrtShell::StartOfColumn( BOOL bSelect )
+sal_Bool SwWrtShell::StartOfColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnCurr, fnColumnStart);
@@ -419,7 +419,7 @@ BOOL SwWrtShell::StartOfColumn( BOOL bSelect )
-BOOL SwWrtShell::EndOfColumn( BOOL bSelect )
+sal_Bool SwWrtShell::EndOfColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnCurr, fnColumnEnd);
@@ -427,7 +427,7 @@ BOOL SwWrtShell::EndOfColumn( BOOL bSelect )
-BOOL SwWrtShell::StartOfNextColumn( BOOL bSelect )
+sal_Bool SwWrtShell::StartOfNextColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn( fnColumnNext, fnColumnStart);
@@ -435,7 +435,7 @@ BOOL SwWrtShell::StartOfNextColumn( BOOL bSelect )
-BOOL SwWrtShell::EndOfNextColumn( BOOL bSelect )
+sal_Bool SwWrtShell::EndOfNextColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnNext, fnColumnEnd);
@@ -443,7 +443,7 @@ BOOL SwWrtShell::EndOfNextColumn( BOOL bSelect )
-BOOL SwWrtShell::StartOfPrevColumn( BOOL bSelect )
+sal_Bool SwWrtShell::StartOfPrevColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnPrev, fnColumnStart);
@@ -451,7 +451,7 @@ BOOL SwWrtShell::StartOfPrevColumn( BOOL bSelect )
-BOOL SwWrtShell::EndOfPrevColumn( BOOL bSelect )
+sal_Bool SwWrtShell::EndOfPrevColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnPrev, fnColumnEnd);
@@ -459,9 +459,9 @@ BOOL SwWrtShell::EndOfPrevColumn( BOOL bSelect )
-BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
+sal_Bool SwWrtShell::PushCrsr(SwTwips lOffset, sal_Bool bSelect)
{
- BOOL bDiff = FALSE;
+ sal_Bool bDiff = sal_False;
SwRect aOldRect( GetCharRect() ), aTmpArea( VisArea() );
//bDestOnStack besagt, ob ich den Cursor nicht an die aktuelle Position
@@ -478,15 +478,15 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
aPt.Y() += lOffset;
aDest = GetCntntPos(aPt,lOffset > 0);
aDest.X() = aPt.X();
- bDestOnStack = TRUE;
+ bDestOnStack = sal_True;
}
//falls wir eine Rahmenselektion hatten, muss diese nach dem
//fnSetCrsr entfernt werden und damit wir da wieder hinkommen
//auf dem Stack gemerkt werden.
- BOOL bIsFrmSel = FALSE;
+ sal_Bool bIsFrmSel = sal_False;
- BOOL bIsObjSel = FALSE;
+ sal_Bool bIsObjSel = sal_False;
//Zielposition liegt jetzt innerhalb des sichtbaren Bereiches -->
//Cursor an die Zielposition setzen; merken, dass keine Ziel-
@@ -517,7 +517,7 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
CallChgLnk();
}
- (this->*fnSetCrsr)( &aDest, TRUE );
+ (this->*fnSetCrsr)( &aDest, sal_True );
bDiff = aOldRect != GetCharRect();
@@ -530,7 +530,7 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
}
// Zuruecksetzen des Dest. SPoint Flags
- bDestOnStack = FALSE;
+ bDestOnStack = sal_False;
}
// Position auf den Stack; bDiff besagt, ob ein Unterschied zwischen
@@ -542,12 +542,12 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
-BOOL SwWrtShell::PopCrsr(BOOL bUpdate, BOOL bSelect)
+sal_Bool SwWrtShell::PopCrsr(sal_Bool bUpdate, sal_Bool bSelect)
{
if( 0 == pCrsrStack)
- return FALSE;
+ return sal_False;
- const BOOL bValidPos = pCrsrStack->bValidCurPos;
+ const sal_Bool bValidPos = pCrsrStack->bValidCurPos;
if( bUpdate && bValidPos )
{
// falls ein Vorgaenger auf dem Stack steht, dessen Flag fuer eine
@@ -575,7 +575,7 @@ BOOL SwWrtShell::PopCrsr(BOOL bUpdate, BOOL bSelect)
else
{
_ResetCursorStack();
- return FALSE;
+ return sal_False;
}
}
CrsrStack *pTmp = pCrsrStack;
@@ -584,7 +584,7 @@ BOOL SwWrtShell::PopCrsr(BOOL bUpdate, BOOL bSelect)
if( 0 == pCrsrStack )
{
ePageMove = MV_NO;
- bDestOnStack = FALSE;
+ bDestOnStack = sal_False;
}
return bValidPos;
}
@@ -606,7 +606,7 @@ void SwWrtShell::_ResetCursorStack()
pCrsrStack = pTmp;
}
ePageMove = MV_NO;
- bDestOnStack = FALSE;
+ bDestOnStack = sal_False;
}
/**************
@@ -621,10 +621,10 @@ void SwWrtShell::_ResetCursorStack()
-BOOL SwWrtShell::PageCrsr(SwTwips lOffset, BOOL bSelect)
+sal_Bool SwWrtShell::PageCrsr(SwTwips lOffset, sal_Bool bSelect)
{
// nichts tun, wenn ein Offset von 0 angegeben wurde
- if(!lOffset) return FALSE;
+ if(!lOffset) return sal_False;
// Diente mal dazu, eine Neuformatierung fuer das Layout
// zu erzwingen.
// Hat so nicht funktioniert, da der Cursor nicht gesetzt
@@ -640,19 +640,19 @@ BOOL SwWrtShell::PageCrsr(SwTwips lOffset, BOOL bSelect)
// ViewShell::StartAction();
PageMove eDir = lOffset > 0? MV_PAGE_DOWN: MV_PAGE_UP;
// Richtungswechsel und Stack vorhanden
- if( eDir != ePageMove && ePageMove != MV_NO && PopCrsr( TRUE, bSelect ))
- return TRUE;
+ if( eDir != ePageMove && ePageMove != MV_NO && PopCrsr( sal_True, bSelect ))
+ return sal_True;
- const BOOL bRet = PushCrsr(lOffset, bSelect);
+ const sal_Bool bRet = PushCrsr(lOffset, bSelect);
ePageMove = eDir;
return bRet;
}
-BOOL SwWrtShell::GotoPage(USHORT nPage, BOOL bRecord)
+sal_Bool SwWrtShell::GotoPage(sal_uInt16 nPage, sal_Bool bRecord)
{
- ShellMoveCrsr aTmp( this, FALSE);
+ ShellMoveCrsr aTmp( this, sal_False);
if( SwCrsrShell::GotoPage(nPage) && bRecord)
{
if(IsSelFrmMode())
@@ -660,14 +660,14 @@ BOOL SwWrtShell::GotoPage(USHORT nPage, BOOL bRecord)
UnSelectFrm();
LeaveSelFrmMode();
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, BOOL bSelect, BOOL bStart )
+sal_Bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, sal_Bool bSelect, sal_Bool bStart )
{
ShellMoveCrsr aTmp( this, bSelect );
return SwCrsrShell::GotoMark( pMark, bStart );
@@ -675,13 +675,13 @@ BOOL SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, BOOL bSelect, B
-BOOL SwWrtShell::SelectTxtAttr( USHORT nWhich, const SwTxtAttr* pAttr )
+sal_Bool SwWrtShell::SelectTxtAttr( sal_uInt16 nWhich, const SwTxtAttr* pAttr )
{
- BOOL bRet;
+ sal_Bool bRet;
{
MV_KONTEXT(this);
SttSelect();
- bRet = SwCrsrShell::SelectTxtAttr( nWhich, FALSE, pAttr );
+ bRet = SwCrsrShell::SelectTxtAttr( nWhich, sal_False, pAttr );
}
EndSelect();
return bRet;
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index 9acf40160bc3..badceaa0b572 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -62,7 +62,7 @@ using namespace ::com::sun::star::util;
static long nStartDragX = 0, nStartDragY = 0;
-static BOOL bStartDrag = FALSE;
+static sal_Bool bStartDrag = sal_False;
void SwWrtShell::Invalidate()
{
@@ -71,21 +71,21 @@ void SwWrtShell::Invalidate()
GetView().GetViewFrame()->GetBindings().Invalidate( FN_STAT_SELMODE );
}
-BOOL SwWrtShell::SelNearestWrd()
+sal_Bool SwWrtShell::SelNearestWrd()
{
MV_KONTEXT(this);
if( !IsInWrd() && !IsEndWrd() && !IsSttWrd() )
PrvWrd();
if( IsEndWrd() )
- Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE );
+ Left(CRSR_SKIP_CELLS, sal_False, 1, sal_False );
return SelWrd();
}
-BOOL SwWrtShell::SelWrd(const Point *pPt, BOOL )
+sal_Bool SwWrtShell::SelWrd(const Point *pPt, sal_Bool )
{
- BOOL bRet;
+ sal_Bool bRet;
{
MV_KONTEXT(this);
SttSelect();
@@ -94,14 +94,14 @@ BOOL SwWrtShell::SelWrd(const Point *pPt, BOOL )
EndSelect();
if( bRet )
{
- bSelWrd = TRUE;
+ bSelWrd = sal_True;
if(pPt)
aStart = *pPt;
}
return bRet;
}
-void SwWrtShell::SelSentence(const Point *pPt, BOOL )
+void SwWrtShell::SelSentence(const Point *pPt, sal_Bool )
{
{
MV_KONTEXT(this);
@@ -113,11 +113,11 @@ void SwWrtShell::SelSentence(const Point *pPt, BOOL )
EndSelect();
if(pPt)
aStart = *pPt;
- bSelLn = TRUE;
- bSelWrd = FALSE; // SelWord abschalten, sonst geht kein SelLine weiter
+ bSelLn = sal_True;
+ bSelWrd = sal_False; // SelWord abschalten, sonst geht kein SelLine weiter
}
-void SwWrtShell::SelPara(const Point *pPt, BOOL )
+void SwWrtShell::SelPara(const Point *pPt, sal_Bool )
{
{
MV_KONTEXT(this);
@@ -129,20 +129,20 @@ void SwWrtShell::SelPara(const Point *pPt, BOOL )
EndSelect();
if(pPt)
aStart = *pPt;
- bSelLn = FALSE;
- bSelWrd = FALSE; // SelWord abschalten, sonst geht kein SelLine weiter
+ bSelLn = sal_False;
+ bSelWrd = sal_False; // SelWord abschalten, sonst geht kein SelLine weiter
}
long SwWrtShell::SelAll()
{
- const BOOL bLockedView = IsViewLocked();
- LockView( TRUE );
+ const sal_Bool bLockedView = IsViewLocked();
+ LockView( sal_True );
{
if(bBlockMode)
LeaveBlockMode();
MV_KONTEXT(this);
- BOOL bMoveTable = FALSE;
+ sal_Bool bMoveTable = sal_False;
SwPosition *pStartPos = 0;
SwPosition *pEndPos = 0;
SwShellCrsr* pTmpCrsr = 0;
@@ -157,19 +157,19 @@ long SwWrtShell::SelAll()
pEndPos = new SwPosition( *pTmpCrsr->GetMark() );
}
Push();
- BOOL bIsFullSel = !MoveSection( fnSectionCurr, fnSectionStart);
+ sal_Bool bIsFullSel = !MoveSection( fnSectionCurr, fnSectionStart);
SwapPam();
bIsFullSel &= !MoveSection( fnSectionCurr, fnSectionEnd);
- Pop(FALSE);
- GoStart(TRUE, &bMoveTable, FALSE, !bIsFullSel);
+ Pop(sal_False);
+ GoStart(sal_True, &bMoveTable, sal_False, !bIsFullSel);
}
else
{
EnterStdMode();
- SttEndDoc(TRUE);
+ SttEndDoc(sal_True);
}
SttSelect();
- GoEnd(TRUE, &bMoveTable);
+ GoEnd(sal_True, &bMoveTable);
if( pStartPos )
{
pTmpCrsr = getShellCrsr( false );
@@ -183,7 +183,7 @@ long SwWrtShell::SelAll()
if( *pTmpCrsr->GetPoint() < *pEndPos ||
( *pStartPos == *pTmpCrsr->GetMark() &&
*pEndPos == *pTmpCrsr->GetPoint() ) )
- SwCrsrShell::SttEndDoc(FALSE);
+ SwCrsrShell::SttEndDoc(sal_False);
}
delete pStartPos;
delete pEndPos;
@@ -199,15 +199,15 @@ long SwWrtShell::SelAll()
------------------------------------------------------------------------*/
-ULONG SwWrtShell::SearchPattern( const SearchOptions& rSearchOpt, BOOL bSearchInNotes,
+sal_uLong SwWrtShell::SearchPattern( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes,
SwDocPositions eStt, SwDocPositions eEnd,
FindRanges eFlags, int bReplace )
{
// keine Erweiterung bestehender Selektionen
if(!(eFlags & FND_IN_SEL))
ClearMark();
- BOOL bCancel = FALSE;
- ULONG nRet = Find( rSearchOpt, bSearchInNotes, eStt, eEnd, bCancel, eFlags, bReplace );
+ sal_Bool bCancel = sal_False;
+ sal_uLong nRet = Find( rSearchOpt, bSearchInNotes, eStt, eEnd, bCancel, eFlags, bReplace );
if(bCancel)
{
Undo(UNDO_EMPTY, 1);
@@ -221,7 +221,7 @@ ULONG SwWrtShell::SearchPattern( const SearchOptions& rSearchOpt, BOOL bSearchIn
-ULONG SwWrtShell::SearchTempl( const String &rTempl,
+sal_uLong SwWrtShell::SearchTempl( const String &rTempl,
SwDocPositions eStt, SwDocPositions eEnd,
FindRanges eFlags, const String* pReplTempl )
{
@@ -233,8 +233,8 @@ ULONG SwWrtShell::SearchTempl( const String &rTempl,
if( pReplTempl )
pReplaceColl = GetParaStyle(*pReplTempl, SwWrtShell::GETSTYLE_CREATESOME );
- BOOL bCancel = FALSE;
- ULONG nRet = Find(pColl? *pColl: GetDfltTxtFmtColl(),
+ sal_Bool bCancel = sal_False;
+ sal_uLong nRet = Find(pColl? *pColl: GetDfltTxtFmtColl(),
eStt,eEnd, bCancel, eFlags, pReplaceColl);
if(bCancel)
{
@@ -248,7 +248,7 @@ ULONG SwWrtShell::SearchTempl( const String &rTempl,
-ULONG SwWrtShell::SearchAttr( const SfxItemSet& rFindSet, BOOL bNoColls,
+sal_uLong SwWrtShell::SearchAttr( const SfxItemSet& rFindSet, sal_Bool bNoColls,
SwDocPositions eStart, SwDocPositions eEnde,
FindRanges eFlags, const SearchOptions* pSearchOpt,
const SfxItemSet* pReplaceSet )
@@ -258,8 +258,8 @@ ULONG SwWrtShell::SearchAttr( const SfxItemSet& rFindSet, BOOL bNoColls,
ClearMark();
// Suchen
- BOOL bCancel = FALSE;
- ULONG nRet = Find( rFindSet, bNoColls, eStart, eEnde, bCancel, eFlags, pSearchOpt, pReplaceSet);
+ sal_Bool bCancel = sal_False;
+ sal_uLong nRet = Find( rFindSet, bNoColls, eStart, eEnde, bCancel, eFlags, pSearchOpt, pReplaceSet);
if(bCancel)
{
@@ -306,7 +306,7 @@ void SwWrtShell::PopMode()
-long SwWrtShell::SetCrsr(const Point *pPt, BOOL bTextOnly)
+long SwWrtShell::SetCrsr(const Point *pPt, sal_Bool bTextOnly)
{
/*
* eine gfs. bestehende Selektion an der Position des
@@ -320,10 +320,10 @@ long SwWrtShell::SetCrsr(const Point *pPt, BOOL bTextOnly)
}
-long SwWrtShell::SetCrsrKillSel(const Point *pPt, BOOL bTextOnly )
+long SwWrtShell::SetCrsrKillSel(const Point *pPt, sal_Bool bTextOnly )
{
ACT_KONTEXT(this);
- ResetSelect(pPt,FALSE);
+ ResetSelect(pPt,sal_False);
return SwCrsrShell::SetCrsr(*pPt, bTextOnly);
}
@@ -343,7 +343,7 @@ void SwWrtShell::UnSelectFrm()
-long SwWrtShell::ResetSelect(const Point *,BOOL)
+long SwWrtShell::ResetSelect(const Point *,sal_Bool)
{
if(IsSelFrmMode())
{
@@ -360,7 +360,7 @@ long SwWrtShell::ResetSelect(const Point *,BOOL)
*/
{
ACT_KONTEXT(this);
- bSelWrd = bSelLn = FALSE;
+ bSelWrd = bSelLn = sal_False;
KillPams();
ClearMark();
fnKillSel = &SwWrtShell::Ignore;
@@ -382,7 +382,7 @@ long SwWrtShell::ResetSelect(const Point *,BOOL)
/*
* tue nichts
*/
-long SwWrtShell::Ignore(const Point *, BOOL ) {
+long SwWrtShell::Ignore(const Point *, sal_Bool ) {
return 1;
}
@@ -406,7 +406,7 @@ void SwWrtShell::SttSelect()
}
fnKillSel = &SwWrtShell::Ignore;
fnSetCrsr = &SwWrtShell::SetCrsr;
- bInSelect = TRUE;
+ bInSelect = sal_True;
Invalidate();
SwTransferable::CreateSelection( *this );
}
@@ -420,8 +420,8 @@ void SwWrtShell::EndSelect()
{
if(!bInSelect || bExtMode)
return;
- bInSelect = FALSE;
- (this->*fnLeaveSelect)(0,FALSE);
+ bInSelect = sal_False;
+ (this->*fnLeaveSelect)(0,sal_False);
if(!bAddMode) {
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
@@ -431,14 +431,14 @@ void SwWrtShell::EndSelect()
* zu erweitern.
*/
-inline BOOL operator<(const Point &rP1,const Point &rP2)
+inline sal_Bool operator<(const Point &rP1,const Point &rP2)
{
return rP1.Y() < rP2.Y() || (rP1.Y() == rP2.Y() && rP1.X() < rP2.X());
}
-long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL )
+long SwWrtShell::ExtSelWrd(const Point *pPt, sal_Bool )
{
MV_KONTEXT(this);
if( IsTableMode() )
@@ -448,7 +448,7 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL )
// Then destroy the actual an go to prev, this will be expand
if( !HasMark() && GoPrevCrsr() )
{
- BOOL bHasMark = HasMark(); // thats wrong!
+ sal_Bool bHasMark = HasMark(); // thats wrong!
GoNextCrsr();
if( bHasMark )
{
@@ -458,19 +458,19 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL )
}
// check the direction of the selection with the new point
- BOOL bRet = FALSE, bMoveCrsr = TRUE, bToTop = FALSE;
+ sal_Bool bRet = sal_False, bMoveCrsr = sal_True, bToTop = sal_False;
SwCrsrShell::SelectWord( &aStart ); // select the startword
SwCrsrShell::Push(); // save the cursor
SwCrsrShell::SetCrsr( *pPt ); // and check the direction
switch( SwCrsrShell::CompareCursor( StackMkCurrPt ))
{
- case -1: bToTop = FALSE; break;
- case 1: bToTop = TRUE; break;
- default: bMoveCrsr = FALSE; break;
+ case -1: bToTop = sal_False; break;
+ case 1: bToTop = sal_True; break;
+ default: bMoveCrsr = sal_False; break;
}
- SwCrsrShell::Pop( FALSE ); // retore the saved cursor
+ SwCrsrShell::Pop( sal_False ); // retore the saved cursor
if( bMoveCrsr )
{
@@ -485,22 +485,22 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL )
if( bToTop )
SwapPam();
Combine();
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
- SwCrsrShell::Pop( FALSE );
+ SwCrsrShell::Pop( sal_False );
if( bToTop )
SwapPam();
}
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
-long SwWrtShell::ExtSelLn(const Point *pPt, BOOL )
+long SwWrtShell::ExtSelLn(const Point *pPt, sal_Bool )
{
MV_KONTEXT(this);
SwCrsrShell::SetCrsr(*pPt);
@@ -511,7 +511,7 @@ long SwWrtShell::ExtSelLn(const Point *pPt, BOOL )
// Then destroy the actual an go to prev, this will be expand
if( !HasMark() && GoPrevCrsr() )
{
- BOOL bHasMark = HasMark(); // thats wrong!
+ sal_Bool bHasMark = HasMark(); // thats wrong!
GoNextCrsr();
if( bHasMark )
{
@@ -521,7 +521,7 @@ long SwWrtShell::ExtSelLn(const Point *pPt, BOOL )
}
// ggfs. den Mark der Selektion anpassen
- BOOL bToTop = !IsCrsrPtAtEnd();
+ sal_Bool bToTop = !IsCrsrPtAtEnd();
SwapPam();
// der "Mark" muss am Zeilenende/-anfang stehen
@@ -552,9 +552,9 @@ void SwWrtShell::EnterStdMode()
LeaveAddMode();
if(bBlockMode)
LeaveBlockMode();
- bBlockMode = FALSE;
- bExtMode = FALSE;
- bInSelect = FALSE;
+ bBlockMode = sal_False;
+ bExtMode = sal_False;
+ bInSelect = sal_False;
if(IsSelFrmMode())
{
UnSelectFrm();
@@ -568,7 +568,7 @@ void SwWrtShell::EnterStdMode()
*/
{
ACT_KONTEXT(this);
- bSelWrd = bSelLn = FALSE;
+ bSelWrd = bSelLn = sal_False;
if( !IsRetainSelection() )
KillPams();
ClearMark();
@@ -594,9 +594,9 @@ void SwWrtShell::EnterExtMode()
KillPams();
ClearMark();
}
- bExtMode = TRUE;
- bAddMode = FALSE;
- bBlockMode = FALSE;
+ bExtMode = sal_True;
+ bAddMode = sal_False;
+ bBlockMode = sal_False;
SttSelect();
}
@@ -604,7 +604,7 @@ void SwWrtShell::EnterExtMode()
void SwWrtShell::LeaveExtMode()
{
- bExtMode = FALSE;
+ bExtMode = sal_False;
EndSelect();
}
/*
@@ -614,7 +614,7 @@ void SwWrtShell::LeaveExtMode()
-long SwWrtShell::SttLeaveSelect(const Point *, BOOL )
+long SwWrtShell::SttLeaveSelect(const Point *, sal_Bool )
{
if(SwCrsrShell::HasSelection() && !IsSelTblCells() && bClearMark) {
return 0;
@@ -629,7 +629,7 @@ long SwWrtShell::SttLeaveSelect(const Point *, BOOL )
-long SwWrtShell::AddLeaveSelect(const Point *, BOOL )
+long SwWrtShell::AddLeaveSelect(const Point *, sal_Bool )
{
if(IsTableMode()) LeaveAddMode();
else if(SwCrsrShell::HasSelection())
@@ -650,9 +650,9 @@ void SwWrtShell::EnterAddMode()
fnLeaveSelect = &SwWrtShell::AddLeaveSelect;
fnKillSel = &SwWrtShell::Ignore;
fnSetCrsr = &SwWrtShell::SetCrsr;
- bAddMode = TRUE;
- bBlockMode = FALSE;
- bExtMode = FALSE;
+ bAddMode = sal_True;
+ bBlockMode = sal_False;
+ bExtMode = sal_False;
if(SwCrsrShell::HasSelection())
CreateCrsr();
Invalidate();
@@ -665,7 +665,7 @@ void SwWrtShell::LeaveAddMode()
fnLeaveSelect = &SwWrtShell::SttLeaveSelect;
fnKillSel = &SwWrtShell::ResetSelect;
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
- bAddMode = FALSE;
+ bAddMode = sal_False;
Invalidate();
}
@@ -675,9 +675,9 @@ void SwWrtShell::LeaveAddMode()
void SwWrtShell::EnterBlockMode()
{
- bBlockMode = FALSE;
+ bBlockMode = sal_False;
EnterStdMode();
- bBlockMode = TRUE;
+ bBlockMode = sal_True;
CrsrToBlockCrsr();
Invalidate();
}
@@ -686,7 +686,7 @@ void SwWrtShell::EnterBlockMode()
void SwWrtShell::LeaveBlockMode()
{
- bBlockMode = FALSE;
+ bBlockMode = sal_False;
BlockCrsrToCrsr();
EndSelect();
Invalidate();
@@ -696,7 +696,7 @@ void SwWrtShell::LeaveBlockMode()
-void SwWrtShell::SetInsMode( BOOL bOn )
+void SwWrtShell::SetInsMode( sal_Bool bOn )
{
bIns = bOn;
SwCrsrShell::SetOverwriteCrsr( !bIns );
@@ -707,7 +707,7 @@ void SwWrtShell::SetInsMode( BOOL bOn )
Invalidate();
}
//Overwrite mode is incompatible with red-lining
-void SwWrtShell::SetRedlineModeAndCheckInsMode( USHORT eMode )
+void SwWrtShell::SetRedlineModeAndCheckInsMode( sal_uInt16 eMode )
{
SetRedlineMode( eMode );
if (IsRedlineOn())
@@ -719,16 +719,16 @@ void SwWrtShell::SetRedlineModeAndCheckInsMode( USHORT eMode )
*/
-long SwWrtShell::BeginFrmDrag(const Point *pPt, BOOL)
+long SwWrtShell::BeginFrmDrag(const Point *pPt, sal_Bool)
{
fnDrag = &SwFEShell::Drag;
if(bStartDrag)
{
Point aTmp( nStartDragX, nStartDragY );
- SwFEShell::BeginDrag( &aTmp, FALSE );
+ SwFEShell::BeginDrag( &aTmp, sal_False );
}
else
- SwFEShell::BeginDrag( pPt, FALSE );
+ SwFEShell::BeginDrag( pPt, sal_False );
return 1;
}
@@ -740,9 +740,9 @@ void SwWrtShell::EnterSelFrmMode(const Point *pPos)
{
nStartDragX = pPos->X();
nStartDragY = pPos->Y();
- bStartDrag = TRUE;
+ bStartDrag = sal_True;
}
- bNoEdit = bLayoutMode = TRUE;
+ bNoEdit = bLayoutMode = sal_True;
HideCrsr();
// gleicher Aufruf von BeginDrag an der SwFEShell
@@ -758,8 +758,8 @@ void SwWrtShell::LeaveSelFrmMode()
{
fnDrag = &SwWrtShell::BeginDrag;
fnEndDrag = &SwWrtShell::EndDrag;
- bLayoutMode = FALSE;
- bStartDrag = FALSE;
+ bLayoutMode = sal_False;
+ bStartDrag = sal_False;
Edit();
SwBaseShell::SetFrmMode( FLY_DRAG_END, this );
Invalidate();
@@ -780,7 +780,7 @@ IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFmt )
{
const SvxMacro &rMac = rFmtMac.GetMacro(SW_EVENT_OBJECT_SELECT);
if( IsFrmSelected() )
- bLayoutMode = TRUE;
+ bLayoutMode = sal_True;
CallChgLnk();
ExecMacro( rMac );
}
@@ -789,10 +789,10 @@ IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFmt )
-long SwWrtShell::UpdateLayoutFrm(const Point *pPt, BOOL )
+long SwWrtShell::UpdateLayoutFrm(const Point *pPt, sal_Bool )
{
// voerst Dummy
- SwFEShell::EndDrag( pPt, FALSE );
+ SwFEShell::EndDrag( pPt, sal_False );
fnDrag = &SwWrtShell::BeginFrmDrag;
return 1;
}
@@ -831,11 +831,11 @@ long SwWrtShell::ToggleExtMode()
-long SwWrtShell::BeginDrag(const Point * /*pPt*/, BOOL )
+long SwWrtShell::BeginDrag(const Point * /*pPt*/, sal_Bool )
{
if(bSelWrd)
{
- bInSelect = TRUE;
+ bInSelect = sal_True;
if( !IsCrsrPtAtEnd() )
SwapPam();
@@ -844,7 +844,7 @@ long SwWrtShell::BeginDrag(const Point * /*pPt*/, BOOL )
}
else if(bSelLn)
{
- bInSelect = TRUE;
+ bInSelect = sal_True;
fnDrag = &SwWrtShell::ExtSelLn;
fnSetCrsr = &SwWrtShell::Ignore;
}
@@ -859,7 +859,7 @@ long SwWrtShell::BeginDrag(const Point * /*pPt*/, BOOL )
-long SwWrtShell::Drag(const Point *, BOOL )
+long SwWrtShell::Drag(const Point *, sal_Bool )
{
if( IsSelTblCells() )
aSelTblLink.Call(this);
@@ -869,7 +869,7 @@ long SwWrtShell::Drag(const Point *, BOOL )
-long SwWrtShell::EndDrag(const Point * /*pPt*/, BOOL )
+long SwWrtShell::EndDrag(const Point * /*pPt*/, sal_Bool )
{
fnDrag = &SwWrtShell::BeginDrag;
if( IsExtSel() )
@@ -882,7 +882,7 @@ long SwWrtShell::EndDrag(const Point * /*pPt*/, BOOL )
}
// --> FME 2004-07-30 #i32329# Enhanced table selection
-BOOL SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag )
+sal_Bool SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag )
{
MV_KONTEXT(this);
SttSelect();
@@ -890,9 +890,9 @@ BOOL SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bR
{
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// <--
@@ -900,39 +900,39 @@ BOOL SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bR
Beschreibung: Selektion einer Tabellenzeile / Spalte
------------------------------------------------------------------------*/
-BOOL SwWrtShell::SelectTableRow()
+sal_Bool SwWrtShell::SelectTableRow()
{
if ( SelTblRow() )
{
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwWrtShell::SelectTableCol()
+sal_Bool SwWrtShell::SelectTableCol()
{
if ( SelTblCol() )
{
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwWrtShell::SelectTableCell()
+sal_Bool SwWrtShell::SelectTableCell()
{
if ( SelTblBox() )
{
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
Beschreibung: Prueft, ob eine Wortselektion vorliegt.
@@ -943,28 +943,28 @@ BOOL SwWrtShell::SelectTableCell()
-int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut)
+int SwWrtShell::IntelligentCut(int nSelection, sal_Bool bCut)
{
// kein intelligentes Drag and Drop bei Mehrfachselektion
// es existieren mehrere Cursor, da ein zweiter bereits
// an die Zielposition gesetzt wurde
if( IsAddMode() || !(nSelection & nsSelectionType::SEL_TXT) )
- return FALSE;
+ return sal_False;
String sTxt;
CharClass& rCC = GetAppCharClass();
// wenn das erste und das letzte Zeichen kein Wortzeichen ist,
// ist kein Wort selektiert.
- sal_Unicode cPrev = GetChar(FALSE);
- sal_Unicode cNext = GetChar(TRUE, -1);
+ sal_Unicode cPrev = GetChar(sal_False);
+ sal_Unicode cNext = GetChar(sal_True, -1);
if( !cPrev || !cNext ||
!rCC.isLetterNumeric( ( sTxt = cPrev), 0 ) ||
!rCC.isLetterNumeric( ( sTxt = cNext), 0 ) )
return NO_WORD;
- cPrev = GetChar(FALSE, -1);
- cNext = GetChar(TRUE);
+ cPrev = GetChar(sal_False, -1);
+ cNext = GetChar(sal_True);
int cWord = NO_WORD;
// ist ein Wort selektiert?
@@ -988,7 +988,7 @@ int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut)
SetMark();
SwCrsrShell::Left(1,CRSR_SKIP_CHARS);
SwFEShell::Delete();
- Pop( FALSE );
+ Pop( sal_False );
}
}
else if(cWord == WORD_NO_SPACE && cNext == ' ')
@@ -1002,7 +1002,7 @@ int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut)
SetMark();
SwCrsrShell::Right(1,CRSR_SKIP_CHARS);
SwFEShell::Delete();
- Pop( FALSE );
+ Pop( sal_False );
}
}
return cWord;
@@ -1012,24 +1012,24 @@ int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut)
// jump to the next / previous hyperlink - inside text and also
// on graphics
-BOOL SwWrtShell::SelectNextPrevHyperlink( BOOL bNext )
+sal_Bool SwWrtShell::SelectNextPrevHyperlink( sal_Bool bNext )
{
StartAction();
- BOOL bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext );
+ sal_Bool bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext );
if( !bRet )
{
// will we have this feature?
EnterStdMode();
if( bNext )
- SttEndDoc(TRUE);
+ SttEndDoc(sal_True);
else
- SttEndDoc(FALSE);
+ SttEndDoc(sal_False);
bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext );
}
EndAction();
- BOOL bCreateXSelection = FALSE;
- const BOOL bFrmSelected = IsFrmSelected() || IsObjSelected();
+ sal_Bool bCreateXSelection = sal_False;
+ const sal_Bool bFrmSelected = IsFrmSelected() || IsObjSelected();
if( IsSelection() )
{
if ( bFrmSelected )
@@ -1039,18 +1039,18 @@ BOOL SwWrtShell::SelectNextPrevHyperlink( BOOL bNext )
// bei Cursor setzen
fnKillSel = &SwWrtShell::ResetSelect;
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
else if( bFrmSelected )
{
EnterSelFrmMode();
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
else if( (CNT_GRF | CNT_OLE ) & GetCntType() )
{
SelectObj( GetCharRect().Pos() );
EnterSelFrmMode();
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
if( bCreateXSelection )
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index 919ebbe079ba..701bdc3d7e79 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -124,12 +124,12 @@ using namespace com::sun::star;
ePageMove(MV_NO),\
pCrsrStack(0), \
rView(rShell),\
- bDestOnStack(FALSE), \
+ bDestOnStack(sal_False), \
fnLeaveSelect(&SwWrtShell::SttLeaveSelect)
#define BITFLD_INI_LIST \
bClearMark = \
- bIns = TRUE;\
+ bIns = sal_True;\
bAddMode = \
bBlockMode = \
bExtMode = \
@@ -140,7 +140,7 @@ using namespace com::sun::star;
bSelWrd = \
bSelLn = \
bIsInClickToEdit = \
- mbRetainSelection = FALSE;
+ mbRetainSelection = sal_False;
SvxAutoCorrect* lcl_IsAutoCorr()
@@ -153,11 +153,11 @@ SvxAutoCorrect* lcl_IsAutoCorr()
return pACorr;
}
-void SwWrtShell::NoEdit(BOOL bHideCrsr)
+void SwWrtShell::NoEdit(sal_Bool bHideCrsr)
{
if(bHideCrsr)
HideCrsr();
- bNoEdit = TRUE;
+ bNoEdit = sal_True;
}
@@ -167,17 +167,17 @@ void SwWrtShell::Edit()
if (CanInsert())
{
ShowCrsr();
- bNoEdit = FALSE;
+ bNoEdit = sal_False;
}
}
-BOOL SwWrtShell::IsEndWrd()
+sal_Bool SwWrtShell::IsEndWrd()
{
MV_KONTEXT(this);
if(IsEndPara() && !IsSttPara())
- return TRUE;
+ return sal_True;
return IsEndWord();
}
@@ -189,14 +189,14 @@ BOOL SwWrtShell::IsEndWrd()
-BOOL SwWrtShell::_CanInsert()
+sal_Bool SwWrtShell::_CanInsert()
{
if(!CanInsert())
{
Sound::Beep();
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Beschreibung: String einfuegen
@@ -206,11 +206,11 @@ void SwWrtShell::InsertByWord( const String & rStr)
{
if( rStr.Len() )
{
- BOOL bDelim = GetAppCharClass().isLetterNumeric( rStr, 0 );
+ sal_Bool bDelim = GetAppCharClass().isLetterNumeric( rStr, 0 );
xub_StrLen nPos = 0, nStt = 0;
for( ; nPos < rStr.Len(); nPos++ )
{
- BOOL bTmpDelim = GetAppCharClass().isLetterNumeric( rStr, nPos );
+ sal_Bool bTmpDelim = GetAppCharClass().isLetterNumeric( rStr, nPos );
if( bTmpDelim != bDelim )
{
Insert( rStr.Copy( nStt, nPos - nStt ));
@@ -229,7 +229,7 @@ void SwWrtShell::Insert( const String &rStr )
if( !_CanInsert() )
return;
- BOOL bStarted = FALSE, bHasSel = HasSelection(),
+ sal_Bool bStarted = sal_False, bHasSel = HasSelection(),
bCallIns = bIns /*|| bHasSel*/;
bool bDeleted = false;
@@ -254,7 +254,7 @@ void SwWrtShell::Insert( const String &rStr )
}
StartUndo(UNDO_REPLACE, &aRewriter);
- bStarted = TRUE;
+ bStarted = sal_True;
bDeleted = DelRight() != 0;
}
@@ -289,7 +289,7 @@ JP 21.01.98: Ueberschreiben ueberschreibt nur die Selektion, nicht das
void SwWrtShell::Insert( const String &rPath, const String &rFilter,
const Graphic &rGrf, SwFlyFrmAttrMgr *pFrmMgr,
- BOOL bRule )
+ sal_Bool bRule )
{
ResetCursorStack();
if ( !_CanInsert() )
@@ -311,13 +311,13 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter,
EnterSelFrmMode();
- BOOL bSetGrfSize = TRUE;
- BOOL bOwnMgr = FALSE;
+ sal_Bool bSetGrfSize = sal_True;
+ sal_Bool bOwnMgr = sal_False;
if ( !pFrmMgr )
{
- bOwnMgr = TRUE;
- pFrmMgr = new SwFlyFrmAttrMgr( TRUE, this, FRMMGR_TYPE_GRF );
+ bOwnMgr = sal_True;
+ pFrmMgr = new SwFlyFrmAttrMgr( sal_True, this, FRMMGR_TYPE_GRF );
// VORSICHT
// GetAttrSet nimmt einen Abgleich vor
@@ -335,7 +335,7 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter,
pFrmMgr->SetSize( aSz );
}
else if ( aSz.Width() != DFLT_WIDTH && aSz.Height() != DFLT_HEIGHT )
- bSetGrfSize = FALSE;
+ bSetGrfSize = sal_False;
pFrmMgr->SetHeightSizeType(ATT_FIX_SIZE);
@@ -389,7 +389,7 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter,
void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName *pName,
- BOOL bActivate, USHORT nSlotId )
+ sal_Bool bActivate, sal_uInt16 nSlotId )
{
ResetCursorStack();
if( !_CanInsert() )
@@ -400,7 +400,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
// temporary storage
svt::EmbeddedObjectRef xObj;
uno::Reference < embed::XStorage > xStor = comphelper::OStorageHelper::GetTemporaryStorage();
- BOOL bDoVerb = TRUE;
+ sal_Bool bDoVerb = sal_True;
if ( pName )
{
comphelper::EmbeddedObjectContainer aCnt( xStor );
@@ -481,7 +481,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
if ( !pClient )
{
pClient = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
- SetCheckForOLEInCaption( TRUE );
+ SetCheckForOLEInCaption( sal_True );
}
if ( xObj.GetViewAspect() == embed::Aspects::MSOLE_ICON )
@@ -520,7 +520,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
Vom ClipBoard oder Insert
------------------------------------------------------------------------*/
-BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFmt **pFlyFrmFmt )
+sal_Bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFmt **pFlyFrmFmt )
{
ResetCursorStack();
StartAllAction();
@@ -534,9 +534,9 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm
// break should be insertet. StarMath objects are character bound and
// no break should be inserted.
//3. If an selektion is passed to a StarMath object, this object should
- // not be activated. FALSE should be returned then.
- BOOL bStarMath = TRUE;
- BOOL bActivate = TRUE;
+ // not be activated. sal_False should be returned then.
+ sal_Bool bStarMath = sal_True;
+ sal_Bool bActivate = sal_True;
// set parent to get correct VisArea(in case of object needing parent printer)
uno::Reference < container::XChild > xChild( xRef.GetObject(), uno::UNO_QUERY );
@@ -560,7 +560,7 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm
try
{
xSet->setPropertyValue( ::rtl::OUString::createFromAscii("Formula"), uno::makeAny( ::rtl::OUString( aMathData ) ) );
- bActivate = FALSE;
+ bActivate = sal_False;
}
catch ( uno::Exception& )
{
@@ -572,11 +572,11 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm
}
if ( !bStarMath )
- SwFEShell::SplitNode( FALSE, FALSE );
+ SwFEShell::SplitNode( sal_False, sal_False );
EnterSelFrmMode();
- SwFlyFrmAttrMgr aFrmMgr( TRUE, this, FRMMGR_TYPE_OLE );
+ SwFlyFrmAttrMgr aFrmMgr( sal_True, this, FRMMGR_TYPE_OLE );
aFrmMgr.SetHeightSizeType(ATT_FIX_SIZE);
SwRect aBound;
@@ -641,12 +641,12 @@ void SwWrtShell::LaunchOLEObj( long nVerb )
if ( !pCli )
pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xRef );
- ((SwOleClient*)pCli)->SetInDoVerb( TRUE );
+ ((SwOleClient*)pCli)->SetInDoVerb( sal_True );
CalcAndSetScale( xRef );
pCli->DoVerb( nVerb );
- ((SwOleClient*)pCli)->SetInDoVerb( FALSE );
+ ((SwOleClient*)pCli)->SetInDoVerb( sal_False );
CalcAndSetScale( xRef );
}
}
@@ -725,7 +725,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
bool bResetEnableSetModified(false);
if ( GetDoc()->GetDocShell()->IsEnableSetModified() )
{
- GetDoc()->GetDocShell()->EnableSetModified( FALSE );
+ GetDoc()->GetDocShell()->EnableSetModified( sal_False );
bResetEnableSetModified = true;
}
@@ -738,7 +738,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
if ( bResetEnableSetModified )
{
- GetDoc()->GetDocShell()->EnableSetModified( TRUE );
+ GetDoc()->GetDocShell()->EnableSetModified( sal_True );
}
}
// <--
@@ -915,7 +915,7 @@ void SwWrtShell::ConnectObj( svt::EmbeddedObjectRef& xObj, const SwRect &rPrt,
-void SwWrtShell::InsertPageBreak(const String *pPageDesc, USHORT nPgNum )
+void SwWrtShell::InsertPageBreak(const String *pPageDesc, sal_uInt16 nPgNum )
{
ResetCursorStack();
if( _CanInsert() )
@@ -931,7 +931,7 @@ void SwWrtShell::InsertPageBreak(const String *pPageDesc, USHORT nPgNum )
}
const SwPageDesc *pDesc = pPageDesc
- ? FindPageDescByName( *pPageDesc, TRUE ) : 0;
+ ? FindPageDescByName( *pPageDesc, sal_True ) : 0;
if( pDesc )
{
SwFmtPageDesc aDesc( pDesc );
@@ -983,7 +983,7 @@ void SwWrtShell::InsertColumnBreak()
{
if(HasSelection())
DelRight();
- SwFEShell::SplitNode( FALSE, FALSE );
+ SwFEShell::SplitNode( sal_False, sal_False );
}
SetAttr(SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK));
@@ -997,7 +997,7 @@ void SwWrtShell::InsertColumnBreak()
------------------------------------------------------------------------*/
-void SwWrtShell::InsertFootnote(const String &rStr, BOOL bEndNote, BOOL bEdit )
+void SwWrtShell::InsertFootnote(const String &rStr, sal_Bool bEndNote, sal_Bool bEdit )
{
ResetCursorStack();
if( _CanInsert() )
@@ -1019,7 +1019,7 @@ void SwWrtShell::InsertFootnote(const String &rStr, BOOL bEndNote, BOOL bEdit )
if( bEdit )
{
// zur Bearbeiung des Fussnotentextes
- Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
GotoFtnTxt();
}
}
@@ -1031,7 +1031,7 @@ void SwWrtShell::InsertFootnote(const String &rStr, BOOL bEndNote, BOOL bEdit )
------------------------------------------------------------------------*/
-void SwWrtShell::SplitNode( BOOL bAutoFmt, BOOL bCheckTableStart )
+void SwWrtShell::SplitNode( sal_Bool bAutoFmt, sal_Bool bCheckTableStart )
{
ResetCursorStack();
if( _CanInsert() )
@@ -1039,7 +1039,7 @@ void SwWrtShell::SplitNode( BOOL bAutoFmt, BOOL bCheckTableStart )
ACT_KONTEXT(this);
rView.GetEditWin().FlushInBuffer();
- BOOL bHasSel = HasSelection();
+ sal_Bool bHasSel = HasSelection();
if( bHasSel )
{
StartUndo( UNDO_INSERT );
@@ -1066,11 +1066,11 @@ void SwWrtShell::SplitNode( BOOL bAutoFmt, BOOL bCheckTableStart )
// -> #i40041#
// --> OD 2005-10-25 #b6340308#
// Preconditions (as far as OD has figured out):
-// - <SwEditShell::HasNumber()> is FALSE, if <bNum> is TRUE
-// - <SwEditShell::HasBullet()> is FALSE, if <bNum> is FALSE
+// - <SwEditShell::HasNumber()> is sal_False, if <bNum> is sal_True
+// - <SwEditShell::HasBullet()> is sal_False, if <bNum> is sal_False
// Behavior of method is determined by the current situation at the current
// cursor position in the document.
-void SwWrtShell::NumOrBulletOn(BOOL bNum)
+void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
{
// determine numbering rule found at current cursor position in the docment.
const SwNumRule* pCurRule = GetCurNumRule();
@@ -1081,12 +1081,12 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
// --> OD 2005-10-25 #b6340308#
// - activate outline rule respectively turning on outline rule for
- // current text node. But, only for turning on a numbering (<bNum> == TRUE).
+ // current text node. But, only for turning on a numbering (<bNum> == sal_True).
// - overwrite found numbering rule at current cursor position, if
// no numbering rule can be retrieved from the paragraph style.
bool bContinueFoundNumRule( false );
bool bActivateOutlineRule( false );
- int nActivateOutlineLvl( MAXLEVEL ); // only relevant, if <bActivateOutlineRule> == TRUE
+ int nActivateOutlineLvl( MAXLEVEL ); // only relevant, if <bActivateOutlineRule> == sal_True
SwTxtFmtColl * pColl = GetCurTxtFmtColl();
if ( pColl )
{
@@ -1100,7 +1100,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
if ( pCollRule && pCollRule == GetDoc()->GetOutlineNumRule() )
{
const SwNumRule* pDirectCollRule =
- pDoc->FindNumRulePtr(pColl->GetNumRule( FALSE ).GetValue());
+ pDoc->FindNumRulePtr(pColl->GetNumRule( sal_False ).GetValue());
if ( !pDirectCollRule )
{
pCollRule = 0;
@@ -1145,7 +1145,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
ASSERT( pColl->IsAssignedToListLevelOfOutlineStyle(), //<-end,zhaojianwei
"<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
if ( pColl->IsAssignedToListLevelOfOutlineStyle() && //<-end,zhaojianwei
- pCollRule->Get( static_cast<USHORT>(nActivateOutlineLvl) ).GetNumberingType()
+ pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType()
== SVX_NUM_NUMBER_NONE )
{
// activate outline numbering
@@ -1161,7 +1161,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
{
// --> OD 2009-08-27 #i101234#
// activate outline numbering, because from the precondition
- // it's known, that <SwEdit::HasNumber()> == FALSE
+ // it's known, that <SwEdit::HasNumber()> == sal_False
bActivateOutlineRule = true;
nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();//<-end,zhaojianwei
}
@@ -1172,11 +1172,11 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
// Check, if corresponding list level of the outline numbering
// has already a numbering format set.
nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();//<-end,zhaojianwei,need further consideration
- if ( pCollRule->Get( static_cast<USHORT>(nActivateOutlineLvl) ).GetNumberingType()
+ if ( pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType()
== SVX_NUM_NUMBER_NONE )
{
// activate outline numbering, because from the precondition
- // it's known, that <SwEdit::HasNumber()> == FALSE
+ // it's known, that <SwEdit::HasNumber()> == sal_False
bActivateOutlineRule = true;
}
else
@@ -1194,7 +1194,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
ASSERT( pColl->IsAssignedToListLevelOfOutlineStyle(),//#outline level,zhaojianwei
"<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
if ( pColl->IsAssignedToListLevelOfOutlineStyle() &&//#outline level,zhaojianwei
- pCollRule->Get( static_cast<USHORT>(nActivateOutlineLvl) ).GetNumberingType()
+ pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType()
== SVX_NUM_NUMBER_NONE )
{
// activate outline numbering
@@ -1266,7 +1266,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
if (nLevel >= MAXLEVEL)
nLevel = MAXLEVEL - 1;
- SwNumFmt aFmt(aNumRule.Get(static_cast<USHORT>(nLevel)));
+ SwNumFmt aFmt(aNumRule.Get(static_cast<sal_uInt16>(nLevel)));
if (bNum)
aFmt.SetNumberingType(SVX_NUM_ARABIC);
@@ -1280,10 +1280,10 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
aFmt.SetBulletFont( pFnt );
}
// <--
- aFmt.SetBulletChar( numfunc::GetBulletChar(static_cast<BYTE>(nLevel)));
+ aFmt.SetBulletChar( numfunc::GetBulletChar(static_cast<sal_uInt8>(nLevel)));
aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
}
- aNumRule.Set(static_cast<USHORT>(nLevel), aFmt);
+ aNumRule.Set(static_cast<sal_uInt16>(nLevel), aFmt);
}
}
// <--
@@ -1330,7 +1330,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
const bool bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh);
const bool bRightToLeft = IsInRightToLeftText();
- for( BYTE nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
+ for( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
{
SwNumFmt aFmt( aNumRule.Get( nLvl ) );
aFmt.SetCharFmt( pChrFmt );
@@ -1419,7 +1419,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
void SwWrtShell::NumOn()
{
- NumOrBulletOn(TRUE);
+ NumOrBulletOn(sal_True);
}
void SwWrtShell::NumOrBulletOff()
@@ -1456,7 +1456,7 @@ void SwWrtShell::NumOrBulletOff()
// --> OD 2005-10-24 #126346# - Cursor can not be anymore in front of
// a label, because numbering/bullet is switched off.
- SetInFrontOfLabel( FALSE );
+ SetInFrontOfLabel( sal_False );
// <--
}
}
@@ -1468,7 +1468,7 @@ void SwWrtShell::NumOrBulletOff()
void SwWrtShell::BulletOn()
{
- NumOrBulletOn(FALSE);
+ NumOrBulletOn(sal_False);
}
@@ -1580,7 +1580,7 @@ SwTxtFmtColl *SwWrtShell::GetParaStyle(const String &rCollName, GetStyle eCreate
SwTxtFmtColl* pColl = FindTxtFmtCollByName( rCollName );
if( !pColl && GETSTYLE_NOCREATE != eCreate )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( rCollName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rCollName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if( USHRT_MAX != nId || GETSTYLE_CREATEANY == eCreate )
pColl = GetTxtCollFromPool( nId );
}
@@ -1600,7 +1600,7 @@ SwCharFmt *SwWrtShell::GetCharStyle(const String &rFmtName, GetStyle eCreate )
SwCharFmt* pFmt = FindCharFmtByName( rFmtName );
if( !pFmt && GETSTYLE_NOCREATE != eCreate )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( rFmtName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rFmtName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
if( USHRT_MAX != nId || GETSTYLE_CREATEANY == eCreate )
pFmt = (SwCharFmt*)GetFmtFromPool( nId );
}
@@ -1619,7 +1619,7 @@ SwCharFmt *SwWrtShell::GetCharStyle(const String &rFmtName, GetStyle eCreate )
SwFrmFmt *SwWrtShell::GetTblStyle(const String &rFmtName)
{
SwFrmFmt *pFmt = 0;
- for( USHORT i = GetTblFrmFmtCount(); i; )
+ for( sal_uInt16 i = GetTblFrmFmtCount(); i; )
if( !( pFmt = &GetTblFrmFmt( --i ) )->IsDefault() &&
pFmt->GetName() == rFmtName && IsUsed( *pFmt ) )
return pFmt;
@@ -1637,7 +1637,7 @@ void SwWrtShell::SetPageStyle(const String &rCollName)
{
if( !SwCrsrShell::HasSelection() && !IsSelFrmMode() && !IsObjSelected() )
{
- SwPageDesc* pDesc = FindPageDescByName( rCollName, TRUE );
+ SwPageDesc* pDesc = FindPageDescByName( rCollName, sal_True );
if( pDesc )
ChgCurPageDesc( *pDesc );
}
@@ -1649,7 +1649,7 @@ void SwWrtShell::SetPageStyle(const String &rCollName)
-String SwWrtShell::GetCurPageStyle( const BOOL bCalcFrm ) const
+String SwWrtShell::GetCurPageStyle( const sal_Bool bCalcFrm ) const
{
return GetPageDesc(GetCurPageDesc( bCalcFrm )).GetName();
}
@@ -1688,19 +1688,19 @@ void SwWrtShell::AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet
SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM,
0 );
GetCurAttr( aCoreSet );
- BOOL bReset = FALSE;
+ sal_Bool bReset = sal_False;
SfxItemIter aParaIter( aCoreSet );
const SfxPoolItem* pParaItem = aParaIter.FirstItem();
while( pParaItem )
{
if(!IsInvalidItem(pParaItem))
{
- USHORT nWhich = pParaItem->Which();
+ sal_uInt16 nWhich = pParaItem->Which();
if(SFX_ITEM_SET == aCoreSet.GetItemState(nWhich) &&
SFX_ITEM_SET == rStyleSet.GetItemState(nWhich))
{
aCoreSet.ClearItem(nWhich);
- bReset = TRUE;
+ bReset = sal_True;
}
}
pParaItem = aParaIter.NextItem();
@@ -1735,14 +1735,14 @@ void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar )
ResetCursorStack();
if(_CanInsert())
{
- BOOL bStarted = FALSE;
+ sal_Bool bStarted = sal_False;
if(HasSelection())
{
// nur hier klammern, da das normale Insert schon an der
// Editshell geklammert ist
StartAllAction();
StartUndo(UNDO_INSERT);
- bStarted = TRUE;
+ bStarted = sal_True;
DelRight();
}
SwEditShell::AutoCorrect( rACorr, IsInsMode(), cChar );
@@ -1800,14 +1800,14 @@ SwWrtShell::~SwWrtShell()
SET_CURR_SHELL( this );
while(IsModePushed())
PopMode();
- while(PopCrsr(FALSE))
+ while(PopCrsr(sal_False))
;
SwTransferable::ClearSelection( *this );
}
-BOOL SwWrtShell::Pop( BOOL bOldCrsr )
+sal_Bool SwWrtShell::Pop( sal_Bool bOldCrsr )
{
- BOOL bRet = SwCrsrShell::Pop( bOldCrsr );
+ sal_Bool bRet = SwCrsrShell::Pop( bOldCrsr );
if( bRet && IsSelection() )
{
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
@@ -1819,7 +1819,7 @@ BOOL SwWrtShell::Pop( BOOL bOldCrsr )
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-BOOL SwWrtShell::CanInsert()
+sal_Bool SwWrtShell::CanInsert()
{
return (!(IsSelFrmMode() | IsObjSelected() | (GetView().GetDrawFuncPtr() != NULL) | (GetView().GetPostItMgr()->GetActiveSidebarWin()!= NULL)));
}
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index 0e51cd4c756c..c1ace145f7c5 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -107,7 +107,7 @@ void SwWrtShell::Insert(SwField &rFld)
-void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, BOOL bOnlyInSel )
+void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, sal_Bool bOnlyInSel )
{
// ueber die Liste der Eingabefelder gehen und Updaten
SwInputFieldList* pTmp = pLst;
@@ -117,21 +117,21 @@ void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, BOOL bOnlyInSel )
if (bOnlyInSel)
pTmp->RemoveUnselectedFlds();
- const USHORT nCnt = pTmp->Count();
+ const sal_uInt16 nCnt = pTmp->Count();
if(nCnt)
{
pTmp->PushCrsr();
- BOOL bCancel = FALSE;
+ sal_Bool bCancel = sal_False;
ByteString aDlgPos;
- for( USHORT i = 0; i < nCnt && !bCancel; ++i )
+ for( sal_uInt16 i = 0; i < nCnt && !bCancel; ++i )
{
pTmp->GotoFieldPos( i );
SwField* pField = pTmp->GetField( i );
if(pField->GetTyp()->Which() == RES_DROPDOWN)
- bCancel = StartDropDownFldDlg( pField, TRUE, &aDlgPos );
+ bCancel = StartDropDownFldDlg( pField, sal_True, &aDlgPos );
else
- bCancel = StartInputFldDlg( pField, TRUE, 0, &aDlgPos);
+ bCancel = StartInputFldDlg( pField, sal_True, 0, &aDlgPos);
// Sonst Updatefehler bei Multiselektion:
pTmp->GetField( i )->GetTyp()->UpdateFlds();
@@ -150,7 +150,7 @@ void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, BOOL bOnlyInSel )
-BOOL SwWrtShell::StartInputFldDlg( SwField* pFld, BOOL bNextButton,
+sal_Bool SwWrtShell::StartInputFldDlg( SwField* pFld, sal_Bool bNextButton,
Window* pParentWin, ByteString* pWindowState )
{
//JP 14.08.96: Bug 30332 - nach Umbau der modularietaet im SFX, muss jetzt
@@ -164,7 +164,7 @@ BOOL SwWrtShell::StartInputFldDlg( SwField* pFld, BOOL bNextButton,
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if(pWindowState && pWindowState->Len())
pDlg->SetWindowState(*pWindowState);
- BOOL bRet = RET_CANCEL == pDlg->Execute();
+ sal_Bool bRet = RET_CANCEL == pDlg->Execute();
if(pWindowState)
*pWindowState = pDlg->GetWindowState();
@@ -175,7 +175,7 @@ BOOL SwWrtShell::StartInputFldDlg( SwField* pFld, BOOL bNextButton,
/* -----------------17.06.2003 10:18-----------------
--------------------------------------------------*/
-BOOL SwWrtShell::StartDropDownFldDlg(SwField* pFld, BOOL bNextButton, ByteString* pWindowState)
+sal_Bool SwWrtShell::StartDropDownFldDlg(SwField* pFld, sal_Bool bNextButton, ByteString* pWindowState)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
@@ -184,11 +184,11 @@ BOOL SwWrtShell::StartDropDownFldDlg(SwField* pFld, BOOL bNextButton, ByteString
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if(pWindowState && pWindowState->Len())
pDlg->SetWindowState(*pWindowState);
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(pWindowState)
*pWindowState = pDlg->GetWindowState();
delete pDlg;
- BOOL bRet = RET_CANCEL == nRet;
+ sal_Bool bRet = RET_CANCEL == nRet;
GetWin()->Update();
if(RET_YES == nRet)
{
@@ -219,9 +219,9 @@ void SwWrtShell::InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
Beschreibung: Verzeichnis Updaten Selektion loeschen
--------------------------------------------------------------------*/
-BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
+sal_Bool SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
if(_CanInsert())
{
@@ -245,12 +245,12 @@ BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
void SwWrtShell::ClickToField( const SwField& rFld )
{
- bIsInClickToEdit = TRUE;
+ bIsInClickToEdit = sal_True;
switch( rFld.GetTyp()->Which() )
{
case RES_JUMPEDITFLD:
{
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
switch( rFld.GetFormat() )
{
case JE_FMT_TABLE:
@@ -267,7 +267,7 @@ void SwWrtShell::ClickToField( const SwField& rFld )
// case JE_FMT_TEXT:
}
- Right( CRSR_SKIP_CHARS, TRUE, 1, FALSE ); // Feld selektieren
+ Right( CRSR_SKIP_CHARS, sal_True, 1, sal_False ); // Feld selektieren
if( nSlotId )
{
@@ -308,29 +308,29 @@ void SwWrtShell::ClickToField( const SwField& rFld )
break;
case RES_INPUTFLD:
- StartInputFldDlg( (SwField*)&rFld, FALSE );
+ StartInputFldDlg( (SwField*)&rFld, sal_False );
break;
case RES_SETEXPFLD:
if( ((SwSetExpField&)rFld).GetInputFlag() )
- StartInputFldDlg( (SwField*)&rFld, FALSE );
+ StartInputFldDlg( (SwField*)&rFld, sal_False );
break;
case RES_DROPDOWN :
- StartDropDownFldDlg( (SwField*)&rFld, FALSE );
+ StartDropDownFldDlg( (SwField*)&rFld, sal_False );
break;
}
- bIsInClickToEdit = FALSE;
+ bIsInClickToEdit = sal_False;
}
-void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter )
+void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter )
{
if( !rItem.GetValue().Len() )
return ;
- bIsInClickToEdit = TRUE;
+ bIsInClickToEdit = sal_True;
// erstmal das evt. gesetzte ObjectSelect Macro ausfuehren
const SvxMacro* pMac = rItem.GetMacro( SFX_EVENT_MOUSECLICK_OBJECT );
@@ -338,7 +338,7 @@ void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter )
{
SwCallMouseEvent aCallEvent;
aCallEvent.Set( &rItem );
- GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, FALSE );
+ GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, sal_False );
}
// damit die Vorlagenumsetzung sofort angezeigt wird
@@ -350,27 +350,27 @@ void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter )
const_cast<SwTxtINetFmt*>(pTxtAttr)->SetVisitedValid( true );
}
- bIsInClickToEdit = FALSE;
+ bIsInClickToEdit = sal_False;
}
-BOOL SwWrtShell::ClickToINetGrf( const Point& rDocPt, USHORT nFilter )
+sal_Bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sURL;
String sTargetFrameName;
const SwFrmFmt* pFnd = IsURLGrfAtPos( rDocPt, &sURL, &sTargetFrameName );
if( pFnd && sURL.Len() )
{
- bRet = TRUE;
+ bRet = sal_True;
// erstmal das evt. gesetzte ObjectSelect Macro ausfuehren
const SvxMacro* pMac = &pFnd->GetMacro().GetMacro( SFX_EVENT_MOUSECLICK_OBJECT );
if( pMac )
{
SwCallMouseEvent aCallEvent;
aCallEvent.Set( EVENT_OBJECT_URLITEM, pFnd );
- GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, FALSE );
+ GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, sal_False );
}
::LoadURL( sURL, this, nFilter, &sTargetFrameName);
@@ -379,7 +379,7 @@ BOOL SwWrtShell::ClickToINetGrf( const Point& rDocPt, USHORT nFilter )
}
-void LoadURL( const String& rURL, ViewShell* pVSh, USHORT nFilter,
+void LoadURL( const String& rURL, ViewShell* pVSh, sal_uInt16 nFilter,
const String *pTargetFrameName )
{
ASSERT( rURL.Len() && pVSh, "was soll hier geladen werden?" );
@@ -419,10 +419,10 @@ void LoadURL( const String& rURL, ViewShell* pVSh, USHORT nFilter,
SfxStringItem aTargetFrameName( SID_TARGETNAME, sTargetFrame );
SfxStringItem aReferer( SID_REFERER, sReferer );
- SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, FALSE );
+ SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_False );
//#39076# Silent kann lt. SFX entfernt werden.
-// SfxBoolItem aSilent( SID_SILENT, TRUE );
- SfxBoolItem aBrowse( SID_BROWSE, TRUE );
+// SfxBoolItem aSilent( SID_SILENT, sal_True );
+ SfxBoolItem aBrowse( SID_BROWSE, sal_True );
if( nFilter & URLLOAD_NEWVIEW )
aTargetFrameName.SetValue( String::CreateFromAscii("_blank") );
@@ -441,7 +441,7 @@ void LoadURL( const String& rURL, ViewShell* pVSh, USHORT nFilter,
}
void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk,
- const USHORT nAction )
+ const sal_uInt16 nAction )
{
if( EXCHG_IN_ACTION_COPY == nAction )
{
@@ -479,9 +479,9 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk,
// the update of content from linked section at time delete
// the undostack. Then the change of the section dont create
// any undoobject. - BUG 69145
- BOOL bDoesUndo = DoesUndo();
+ sal_Bool bDoesUndo = DoesUndo();
if( UNDO_INSSECTION != GetUndoIds() )
- DoUndo( FALSE );
+ DoUndo( sal_False );
UpdateSection( GetSectionFmtPos( *pIns->GetFmt() ), aSection );
DoUndo( bDoesUndo );
}
diff --git a/sw/source/ui/wrtsh/wrtsh3.cxx b/sw/source/ui/wrtsh/wrtsh3.cxx
index 460d89a07a1c..9988d42abd2a 100644
--- a/sw/source/ui/wrtsh/wrtsh3.cxx
+++ b/sw/source/ui/wrtsh/wrtsh3.cxx
@@ -57,13 +57,13 @@ using ::rtl::OUString;
extern sal_Bool bNoInterrupt; // in mainwn.cxx
-BOOL SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark)
+sal_Bool SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark)
{
//JP 08.03.96: die Wizards brauchen die Selektion !!
// EndSelect();
(this->*fnKillSel)( 0, sal_False );
- BOOL bRet = sal_True;
+ sal_Bool bRet = sal_True;
switch(eFuncId)
{
case BOOKMARK_INDEX:bRet = SwCrsrShell::GotoMark( pMark );break;
@@ -85,11 +85,11 @@ BOOL SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* co
return bRet;
}
-BOOL SwWrtShell::GotoField( const SwFmtFld& rFld )
+sal_Bool SwWrtShell::GotoField( const SwFmtFld& rFld )
{
(this->*fnKillSel)( 0, sal_False );
- BOOL bRet = SwCrsrShell::GotoFld( rFld );
+ sal_Bool bRet = SwCrsrShell::GotoFld( rFld );
if( bRet && IsSelFrmMode() )
{
UnSelectFrm();
@@ -143,7 +143,7 @@ void SwWrtShell::DrawSelChanged( )
bNoInterrupt = bOldVal;
}
-BOOL SwWrtShell::GotoMark( const ::rtl::OUString& rName )
+sal_Bool SwWrtShell::GotoMark( const ::rtl::OUString& rName )
{
IDocumentMarkAccess::const_iterator_t ppMark = getIDocumentMarkAccess()->findMark( rName );
if(ppMark == getIDocumentMarkAccess()->getMarksEnd()) return false;
@@ -151,19 +151,19 @@ BOOL SwWrtShell::GotoMark( const ::rtl::OUString& rName )
}
-BOOL SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark )
+sal_Bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark )
{
return MoveBookMark( BOOKMARK_INDEX, pMark );
}
-BOOL SwWrtShell::GoNextBookmark()
+sal_Bool SwWrtShell::GoNextBookmark()
{
return MoveBookMark( BOOKMARK_NEXT );
}
-BOOL SwWrtShell::GoPrevBookmark()
+sal_Bool SwWrtShell::GoPrevBookmark()
{
return MoveBookMark( BOOKMARK_PREV );
}
diff --git a/sw/source/ui/wrtsh/wrtsh4.cxx b/sw/source/ui/wrtsh/wrtsh4.cxx
index 541674e912a3..abc1933560ca 100644
--- a/sw/source/ui/wrtsh/wrtsh4.cxx
+++ b/sw/source/ui/wrtsh/wrtsh4.cxx
@@ -46,7 +46,7 @@
*/
-BOOL SwWrtShell::_SttWrd()
+sal_Bool SwWrtShell::_SttWrd()
{
if ( IsSttPara() )
return 1;
@@ -72,7 +72,7 @@ BOOL SwWrtShell::_SttWrd()
-BOOL SwWrtShell::_EndWrd()
+sal_Bool SwWrtShell::_EndWrd()
{
if ( IsEndWrd() )
return 1;
@@ -90,14 +90,14 @@ BOOL SwWrtShell::_EndWrd()
-BOOL SwWrtShell::_NxtWrd()
+sal_Bool SwWrtShell::_NxtWrd()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while( IsEndPara() ) // wenn schon am Ende, dann naechsten ???
{
if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS)) // Document - Ende ??
{
- Pop( FALSE );
+ Pop( sal_False );
return bRet;
}
bRet = IsStartWord();
@@ -114,21 +114,21 @@ BOOL SwWrtShell::_NxtWrd()
bRet = IsStartWord();
}
else
- bRet = TRUE;
+ bRet = sal_True;
}
ClearMark();
Combine();
return bRet;
}
-BOOL SwWrtShell::_PrvWrd()
+sal_Bool SwWrtShell::_PrvWrd()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while( IsSttPara() )
{ // wenn schon am Anfang, dann naechsten ???
if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS))
{ // Document - Anfang ??
- Pop( FALSE );
+ Pop( sal_False );
return bRet;
}
bRet = IsStartWord();
@@ -145,7 +145,7 @@ BOOL SwWrtShell::_PrvWrd()
bRet = IsStartWord();
}
else
- bRet = TRUE;
+ bRet = sal_True;
}
ClearMark();
Combine();
@@ -154,16 +154,16 @@ BOOL SwWrtShell::_PrvWrd()
// --> OD 2008-08-06 #i92468#
// method code of <SwWrtShell::_NxtWrd()> before fix for issue i72162
-BOOL SwWrtShell::_NxtWrdForDelete()
+sal_Bool SwWrtShell::_NxtWrdForDelete()
{
if ( IsEndPara() )
{
if ( !SwCrsrShell::Right(1,CRSR_SKIP_CHARS) )
{
- Pop( FALSE );
- return FALSE;
+ Pop( sal_False );
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
Push();
ClearMark();
@@ -173,20 +173,20 @@ BOOL SwWrtShell::_NxtWrdForDelete()
}
ClearMark();
Combine();
- return TRUE;
+ return sal_True;
}
// method code of <SwWrtShell::_PrvWrd()> before fix for issue i72162
-BOOL SwWrtShell::_PrvWrdForDelete()
+sal_Bool SwWrtShell::_PrvWrdForDelete()
{
if ( IsSttPara() )
{
if ( !SwCrsrShell::Left(1,CRSR_SKIP_CHARS) )
{
- Pop( FALSE );
- return FALSE;
+ Pop( sal_False );
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
Push();
ClearMark();
@@ -196,18 +196,18 @@ BOOL SwWrtShell::_PrvWrdForDelete()
}
ClearMark();
Combine();
- return TRUE;
+ return sal_True;
}
// <--
-BOOL SwWrtShell::_FwdSentence()
+sal_Bool SwWrtShell::_FwdSentence()
{
Push();
ClearMark();
if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS))
{
- Pop(FALSE);
+ Pop(sal_False);
return 0;
}
if( !GoNextSentence() && !IsEndPara() )
@@ -220,13 +220,13 @@ BOOL SwWrtShell::_FwdSentence()
-BOOL SwWrtShell::_BwdSentence()
+sal_Bool SwWrtShell::_BwdSentence()
{
Push();
ClearMark();
if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS))
{
- Pop(FALSE);
+ Pop(sal_False);
return 0;
}
if(IsSttPara())
@@ -243,7 +243,7 @@ BOOL SwWrtShell::_BwdSentence()
}
-BOOL SwWrtShell::_FwdPara()
+sal_Bool SwWrtShell::_FwdPara()
{
Push();
ClearMark();
@@ -252,12 +252,12 @@ BOOL SwWrtShell::_FwdPara()
// accessibility events due to the cursor movements.
// if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS))
// {
-// Pop(FALSE);
+// Pop(sal_False);
// return 0;
// }
// SwCrsrShell::Left(1,CRSR_SKIP_CHARS);
// <--
- BOOL bRet = SwCrsrShell::MovePara(fnParaNext, fnParaStart);
+ sal_Bool bRet = SwCrsrShell::MovePara(fnParaNext, fnParaStart);
ClearMark();
Combine();
@@ -265,7 +265,7 @@ BOOL SwWrtShell::_FwdPara()
}
-BOOL SwWrtShell::_BwdPara()
+sal_Bool SwWrtShell::_BwdPara()
{
Push();
ClearMark();
@@ -274,7 +274,7 @@ BOOL SwWrtShell::_BwdPara()
// accessibility events due to the cursor movements.
// if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS))
// {
-// Pop(FALSE);
+// Pop(sal_False);
// return 0;
// }
// SwCrsrShell::Right(1,CRSR_SKIP_CHARS);
@@ -285,7 +285,7 @@ BOOL SwWrtShell::_BwdPara()
// due to cursor movements.
// if(!IsSttOfPara())
// SttPara();
- BOOL bRet = SwCrsrShell::MovePara(fnParaPrev, fnParaStart);
+ sal_Bool bRet = SwCrsrShell::MovePara(fnParaPrev, fnParaStart);
if ( !bRet && !IsSttOfPara() )
{
SttPara();
diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx
index 8a20a03be0f0..89ee4821b0d8 100644
--- a/sw/source/ui/wrtsh/wrtundo.cxx
+++ b/sw/source/ui/wrtsh/wrtundo.cxx
@@ -48,7 +48,7 @@
// ist, muss die fuer die weiteren Aktionen beruecksichtigt werden.
-void SwWrtShell::Do( DoType eDoType, USHORT nCnt )
+void SwWrtShell::Do( DoType eDoType, sal_uInt16 nCnt )
{
// #105332# save current state of DoesUndo()
sal_Bool bSaveDoesUndo = DoesUndo();
@@ -77,8 +77,8 @@ void SwWrtShell::Do( DoType eDoType, USHORT nCnt )
// #105332# restore undo state
DoUndo(bSaveDoesUndo);
- BOOL bCreateXSelection = FALSE;
- const BOOL bFrmSelected = IsFrmSelected() || IsObjSelected();
+ sal_Bool bCreateXSelection = sal_False;
+ const sal_Bool bFrmSelected = IsFrmSelected() || IsObjSelected();
if ( IsSelection() )
{
if ( bFrmSelected )
@@ -88,18 +88,18 @@ void SwWrtShell::Do( DoType eDoType, USHORT nCnt )
// bei Cursor setzen
fnKillSel = &SwWrtShell::ResetSelect;
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
else if ( bFrmSelected )
{
EnterSelFrmMode();
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
else if( (CNT_GRF | CNT_OLE ) & GetCntType() )
{
SelectObj( GetCharRect().Pos() );
EnterSelFrmMode();
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
if( bCreateXSelection )
@@ -114,7 +114,7 @@ void SwWrtShell::Do( DoType eDoType, USHORT nCnt )
String SwWrtShell::GetDoString( DoType eDoType ) const
{
String aStr, aUndoStr;
- USHORT nResStr = STR_UNDO;
+ sal_uInt16 nResStr = STR_UNDO;
switch( eDoType )
{
case UNDO:
@@ -134,7 +134,7 @@ String SwWrtShell::GetDoString( DoType eDoType ) const
return aStr;
}
-USHORT SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs ) const
+sal_uInt16 SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs ) const
{
SwUndoIds aIds;
switch( eDoType )
@@ -149,7 +149,7 @@ USHORT SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs ) cons
}
String sList;
- for( USHORT n = 0, nEnd = aIds.Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = aIds.Count(); n < nEnd; ++n )
{
const SwUndoIdAndName& rIdNm = *aIds[ n ];
if( rIdNm.GetUndoStr() )