summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-03-14 16:51:14 +0000
committerMichael Meeks <michael.meeks@novell.com>2011-03-14 16:51:14 +0000
commited40f62e64564d2b22c9285cfdc6778aeac8fd68 (patch)
tree1a29a28c991a80ec1f3c6de1ce0cd28d4996fe21 /sw/source/core
parent6cd7d7c69ce62fbf788fc4e971cb14ab24d4c5ed (diff)
parent20529755b301c7af2c5ab461329b2d979b2cdbff (diff)
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Conflicts: starmath/inc/applicat.hxx starmath/inc/dialog.hxx starmath/inc/document.hxx starmath/inc/edit.hxx starmath/inc/format.hxx starmath/inc/node.hxx starmath/inc/parse.hxx starmath/inc/rect.hxx starmath/inc/smdll.hxx starmath/inc/smmod.hxx starmath/inc/starmath.hrc starmath/inc/symbol.hxx starmath/inc/toolbox.hxx starmath/inc/utility.hxx starmath/inc/view.hxx starmath/prj/build.lst starmath/qa/cppunit/version.map starmath/sdi/smslots.sdi starmath/source/accessibility.cxx starmath/source/cfgitem.cxx starmath/source/cfgitem.hxx starmath/source/config.cxx starmath/source/dialog.cxx starmath/source/document.cxx starmath/source/edit.cxx starmath/source/format.cxx starmath/source/makefile.mk starmath/source/math_pch.cxx starmath/source/mathmlexport.cxx starmath/source/mathmlimport.cxx starmath/source/mathtype.cxx starmath/source/node.cxx starmath/source/parse.cxx starmath/source/rect.cxx starmath/source/register.cxx starmath/source/smdetect.cxx starmath/source/smdll.cxx starmath/source/smmod.cxx starmath/source/smres.src starmath/source/symbol.cxx starmath/source/toolbox.cxx starmath/source/unomodel.cxx starmath/source/utility.cxx starmath/source/view.cxx sw/JunitTest_sw_unoapi.mk sw/Library_swd.mk sw/Makefile sw/inc/IDocumentFieldsAccess.hxx sw/inc/IDocumentSettingAccess.hxx sw/inc/IDocumentUndoRedo.hxx sw/inc/IShellCursorSupplier.hxx sw/inc/SwUndoField.hxx sw/inc/acmplwrd.hxx sw/inc/authfld.hxx sw/inc/bparr.hxx sw/inc/calbck.hxx sw/inc/calc.hxx sw/inc/ccoll.hxx sw/inc/cellatr.hxx sw/inc/cellfml.hxx sw/inc/chpfld.hxx sw/inc/cmdid.h sw/inc/crsrsh.hxx sw/inc/crstate.hxx sw/inc/dbfld.hxx sw/inc/dbmgr.hxx sw/inc/dcontact.hxx sw/inc/ddefld.hxx sw/inc/doc.hxx sw/inc/docary.hxx sw/inc/docsh.hxx sw/inc/docstat.hxx sw/inc/docstyle.hxx sw/inc/docufld.hxx sw/inc/editsh.hxx sw/inc/errhdl.hxx sw/inc/expfld.hxx sw/inc/fchrfmt.hxx sw/inc/fesh.hxx sw/inc/fldbas.hxx sw/inc/flddat.hxx sw/inc/flddropdown.hxx sw/inc/flypos.hxx sw/inc/fmtanchr.hxx sw/inc/fmtautofmt.hxx sw/inc/fmtclds.hxx sw/inc/fmtcnct.hxx sw/inc/fmtcol.hxx sw/inc/fmtfsize.hxx sw/inc/fmtftn.hxx sw/inc/fmtftntx.hxx sw/inc/fmthdft.hxx sw/inc/fmtinfmt.hxx sw/inc/fmtline.hxx sw/inc/fmtornt.hxx sw/inc/fmtpdsc.hxx sw/inc/fmtruby.hxx sw/inc/fmtsrnd.hxx sw/inc/fmturl.hxx sw/inc/fmtwrapinfluenceonobjpos.hxx sw/inc/format.hxx sw/inc/frmatr.hxx sw/inc/frmfmt.hxx sw/inc/grfatr.hxx sw/inc/helpid.h sw/inc/hintids.hxx sw/inc/hints.hxx sw/inc/htmltbl.hxx sw/inc/inetfld.hxx sw/inc/io.hxx sw/inc/iodetect.hxx sw/inc/itabenum.hxx sw/inc/ndarr.hxx sw/inc/ndgrf.hxx sw/inc/ndindex.hxx sw/inc/ndnotxt.hxx sw/inc/ndole.hxx sw/inc/ndtxt.hxx sw/inc/ndtyp.hxx sw/inc/node.hxx sw/inc/numrule.hxx sw/inc/pagedesc.hxx sw/inc/pagepreviewlayout.hxx sw/inc/pam.hxx sw/inc/paratr.hxx sw/inc/poolfmt.awk sw/inc/poolfmt.hxx sw/inc/printdata.hxx sw/inc/reffld.hxx sw/inc/shellio.hxx sw/inc/shellres.hxx sw/inc/swabstdlg.hxx sw/inc/swatrset.hxx sw/inc/swerror.h sw/inc/swprtopt.hxx sw/inc/swtable.hxx sw/inc/swtypes.hxx sw/inc/tblafmt.hxx sw/inc/tgrditem.hxx sw/inc/tox.hxx sw/inc/undobj.hxx sw/inc/unocoll.hxx sw/inc/unoframe.hxx sw/inc/unoprnms.hxx sw/inc/usrfld.hxx sw/inc/viewopt.hxx sw/inc/viewsh.hxx sw/inc/viscrs.hxx sw/prj/build.lst sw/qa/complex/accessibility/makefile.mk sw/qa/core/Test-BigPtrArray.cxx sw/qa/core/makefile.mk sw/sdi/makefile.mk sw/source/core/access/makefile.mk sw/source/core/access/textmarkuphelper.cxx sw/source/core/attr/calbck.cxx sw/source/core/attr/cellatr.cxx sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx sw/source/core/attr/format.cxx sw/source/core/attr/hints.cxx sw/source/core/bastyp/calc.cxx sw/source/core/bastyp/init.cxx sw/source/core/bastyp/makefile.mk sw/source/core/bastyp/swcache.cxx sw/source/core/crsr/bookmrk.cxx sw/source/core/crsr/callnk.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/crsr/crstrvl.cxx sw/source/core/crsr/findattr.cxx sw/source/core/crsr/findcoll.cxx sw/source/core/crsr/makefile.mk sw/source/core/crsr/pam.cxx sw/source/core/crsr/swcrsr.cxx sw/source/core/crsr/trvltbl.cxx sw/source/core/crsr/unocrsr.cxx sw/source/core/crsr/viscrs.cxx sw/source/core/doc/acmplwrd.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docbm.cxx sw/source/core/doc/doccomp.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docedt.cxx sw/source/core/doc/docfld.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docftn.cxx sw/source/core/doc/docglbl.cxx sw/source/core/doc/docglos.cxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/docruby.cxx sw/source/core/doc/docsort.cxx sw/source/core/doc/docstat.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/fmtcol.cxx sw/source/core/doc/gctable.cxx sw/source/core/doc/htmltbl.cxx sw/source/core/doc/makefile.mk sw/source/core/doc/number.cxx sw/source/core/doc/poolfmt.cxx sw/source/core/doc/tblafmt.cxx sw/source/core/doc/tblcpy.cxx sw/source/core/doc/tblrwcl.cxx sw/source/core/docnode/makefile.mk sw/source/core/docnode/ndcopy.cxx sw/source/core/docnode/ndnum.cxx sw/source/core/docnode/ndsect.cxx sw/source/core/docnode/ndtbl.cxx sw/source/core/docnode/ndtbl1.cxx sw/source/core/docnode/node.cxx sw/source/core/docnode/node2lay.cxx sw/source/core/docnode/nodes.cxx sw/source/core/docnode/section.cxx sw/source/core/docnode/swbaslnk.cxx sw/source/core/draw/dcontact.cxx sw/source/core/draw/dflyobj.cxx sw/source/core/draw/drawdoc.cxx sw/source/core/draw/dview.cxx sw/source/core/draw/makefile.mk sw/source/core/edit/autofmt.cxx sw/source/core/edit/edattr.cxx sw/source/core/edit/eddel.cxx sw/source/core/edit/edfcol.cxx sw/source/core/edit/edfld.cxx sw/source/core/edit/edfldexp.cxx sw/source/core/edit/edfmt.cxx sw/source/core/edit/edglss.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/edit/ednumber.cxx sw/source/core/edit/edsect.cxx sw/source/core/edit/edtab.cxx sw/source/core/edit/edtox.cxx sw/source/core/edit/edundo.cxx sw/source/core/edit/makefile.mk sw/source/core/except/dbgloop.cxx sw/source/core/except/errhdl.cxx sw/source/core/fields/authfld.cxx sw/source/core/fields/cellfml.cxx sw/source/core/fields/chpfld.cxx sw/source/core/fields/dbfld.cxx sw/source/core/fields/ddefld.cxx sw/source/core/fields/ddetbl.cxx sw/source/core/fields/docufld.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/fldbas.cxx sw/source/core/fields/flddat.cxx sw/source/core/fields/flddropdown.cxx sw/source/core/fields/macrofld.cxx sw/source/core/fields/makefile.mk sw/source/core/fields/reffld.cxx sw/source/core/fields/scrptfld.cxx sw/source/core/fields/tblcalc.cxx sw/source/core/fields/usrfld.cxx sw/source/core/frmedt/fecopy.cxx sw/source/core/frmedt/fedesc.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/frmedt/feshview.cxx sw/source/core/frmedt/fetab.cxx sw/source/core/frmedt/fews.cxx sw/source/core/frmedt/makefile.mk sw/source/core/frmedt/tblsel.cxx sw/source/core/graphic/grfatr.cxx sw/source/core/inc/SwUndoFmt.hxx sw/source/core/inc/SwUndoTOXChange.hxx sw/source/core/inc/anchoredobjectposition.hxx sw/source/core/inc/dbgloop.hxx sw/source/core/inc/drawfont.hxx sw/source/core/inc/flowfrm.hxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/inc/layact.hxx sw/source/core/inc/layfrm.hxx sw/source/core/inc/notxtfrm.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/rootfrm.hxx sw/source/core/inc/scriptinfo.hxx sw/source/core/inc/swblocks.hxx sw/source/core/inc/swcache.hxx sw/source/core/inc/tabfrm.hxx sw/source/core/inc/txmsrt.hxx sw/source/core/inc/undoflystrattr.hxx sw/source/core/inc/viewimp.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/calcmove.cxx sw/source/core/layout/dbg_lay.cxx sw/source/core/layout/findfrm.cxx sw/source/core/layout/flowfrm.cxx sw/source/core/layout/fly.cxx sw/source/core/layout/flycnt.cxx sw/source/core/layout/flyincnt.cxx sw/source/core/layout/flylay.cxx sw/source/core/layout/frmtool.cxx sw/source/core/layout/ftnfrm.cxx sw/source/core/layout/layact.cxx sw/source/core/layout/laycache.cxx sw/source/core/layout/makefile.mk sw/source/core/layout/objectformatter.cxx sw/source/core/layout/pagechg.cxx sw/source/core/layout/pagedesc.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/layout/sectfrm.cxx sw/source/core/layout/tabfrm.cxx sw/source/core/layout/trvlfrm.cxx sw/source/core/layout/unusedf.cxx sw/source/core/layout/wsfrm.cxx sw/source/core/makefile.mk sw/source/core/objectpositioning/anchoredobjectposition.cxx sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx sw/source/core/objectpositioning/makefile.mk sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx sw/source/core/ole/ndole.cxx sw/source/core/para/makefile.mk sw/source/core/para/paratr.cxx sw/source/core/sw3io/makefile.mk sw/source/core/sw3io/sw3convert.cxx sw/source/core/swg/SwXMLTextBlocks.cxx sw/source/core/swg/makefile.mk sw/source/core/swg/swblocks.cxx sw/source/core/table/swnewtable.cxx sw/source/core/table/swtable.cxx sw/source/core/text/EnhancedPDFExportHelper.cxx sw/source/core/text/atrstck.cxx sw/source/core/text/frmcrsr.cxx sw/source/core/text/frmform.cxx sw/source/core/text/itrcrsr.cxx sw/source/core/text/itrform2.cxx sw/source/core/text/makefile.mk sw/source/core/text/porlay.cxx sw/source/core/text/pormulti.cxx sw/source/core/text/txtfld.cxx sw/source/core/text/txtfrm.cxx sw/source/core/text/txtio.cxx sw/source/core/tox/makefile.mk sw/source/core/tox/txmsrt.cxx sw/source/core/txtnode/fmtatr2.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/txtnode/fntcap.cxx sw/source/core/txtnode/makefile.mk sw/source/core/txtnode/ndhints.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/swfont.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtatr2.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/SwUndoField.cxx sw/source/core/undo/SwUndoPageDesc.cxx sw/source/core/undo/SwUndoTOXChange.cxx sw/source/core/undo/docundo.cxx sw/source/core/undo/makefile.mk sw/source/core/undo/rolbck.cxx sw/source/core/undo/unbkmk.cxx sw/source/core/undo/undel.cxx sw/source/core/undo/undobj.cxx sw/source/core/undo/undobj1.cxx sw/source/core/undo/unfmco.cxx sw/source/core/undo/unins.cxx sw/source/core/undo/unnum.cxx sw/source/core/undo/unoutl.cxx sw/source/core/undo/unredln.cxx sw/source/core/undo/unsect.cxx sw/source/core/undo/unsort.cxx sw/source/core/undo/unspnd.cxx sw/source/core/undo/untbl.cxx sw/source/core/unocore/makefile.mk sw/source/core/unocore/swunohelper.cxx sw/source/core/unocore/unobkm.cxx sw/source/core/unocore/unocoll.cxx sw/source/core/unocore/unocrsrhelper.cxx sw/source/core/unocore/unodraw.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unoredlines.cxx sw/source/core/unocore/unosett.cxx sw/source/core/unocore/unosrch.cxx sw/source/core/unocore/unostyle.cxx sw/source/core/unocore/unotbl.cxx sw/source/core/view/vdraw.cxx sw/source/core/view/viewimp.cxx sw/source/core/view/viewpg.cxx sw/source/core/view/viewsh.cxx sw/source/core/view/vnew.cxx sw/source/core/view/vprint.cxx sw/source/filter/ascii/ascatr.cxx sw/source/filter/ascii/makefile.mk sw/source/filter/ascii/wrtasc.cxx sw/source/filter/basflt/fltini.cxx sw/source/filter/basflt/iodetect.cxx sw/source/filter/basflt/makefile.mk sw/source/filter/html/SwAppletImpl.cxx sw/source/filter/html/css1atr.cxx sw/source/filter/html/htmlatr.cxx sw/source/filter/html/htmlbas.cxx sw/source/filter/html/htmlcss1.cxx sw/source/filter/html/htmlfly.cxx sw/source/filter/html/htmlftn.cxx sw/source/filter/html/htmlgrin.cxx sw/source/filter/html/htmlnum.cxx sw/source/filter/html/htmlplug.cxx sw/source/filter/html/htmltab.cxx sw/source/filter/html/makefile.mk sw/source/filter/html/parcss1.cxx sw/source/filter/html/svxcss1.cxx sw/source/filter/html/swhtml.cxx sw/source/filter/inc/msfilter.hxx sw/source/filter/inc/wrtswtbl.hxx sw/source/filter/rtf/makefile.mk sw/source/filter/rtf/rtffly.cxx sw/source/filter/rtf/rtfnum.cxx sw/source/filter/rtf/rtftbl.cxx sw/source/filter/rtf/swparrtf.cxx sw/source/filter/rtf/swparrtf.hxx sw/source/filter/writer/makefile.mk sw/source/filter/writer/writer.cxx sw/source/filter/writer/wrt_fn.cxx sw/source/filter/writer/wrtswtbl.cxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww1/makefile.mk sw/source/filter/ww1/w1class.cxx sw/source/filter/ww1/w1class.hxx sw/source/filter/ww1/w1filter.cxx sw/source/filter/ww1/w1par.cxx sw/source/filter/ww1/w1sprm.cxx sw/source/filter/ww1/w1struct.hxx sw/source/filter/ww8/README-rtf.txt sw/source/filter/ww8/attributeoutputbase.hxx sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/docxattributeoutput.hxx sw/source/filter/ww8/docxexport.cxx sw/source/filter/ww8/docxexport.hxx sw/source/filter/ww8/docxexportfilter.cxx sw/source/filter/ww8/dump/dump8.cxx sw/source/filter/ww8/dump/dump8a.cxx sw/source/filter/ww8/dump/msvbasic.cxx sw/source/filter/ww8/dump/msvbasic.hxx sw/source/filter/ww8/dump/ww8darr.cxx sw/source/filter/ww8/dump/ww8darr.hxx sw/source/filter/ww8/dump/ww8dout.cxx sw/source/filter/ww8/dump/ww8dout.hxx sw/source/filter/ww8/dump/ww8scan.cxx sw/source/filter/ww8/dump/ww8scan.hxx sw/source/filter/ww8/dump/ww8struc.hxx sw/source/filter/ww8/makefile.mk sw/source/filter/ww8/rtfattributeoutput.cxx sw/source/filter/ww8/rtfattributeoutput.hxx sw/source/filter/ww8/rtfexport.cxx sw/source/filter/ww8/rtfexport.hxx sw/source/filter/ww8/rtfexportfilter.cxx sw/source/filter/ww8/rtfexportfilter.hxx sw/source/filter/ww8/rtfimportfilter.cxx sw/source/filter/ww8/rtfimportfilter.hxx sw/source/filter/ww8/rtfsdrexport.cxx sw/source/filter/ww8/rtfsdrexport.hxx sw/source/filter/ww8/writerhelper.cxx sw/source/filter/ww8/writerwordglue.cxx sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtw8num.cxx sw/source/filter/ww8/wrtw8sty.cxx sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/wrtww8.hxx sw/source/filter/ww8/wrtww8gr.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8attributeoutput.hxx sw/source/filter/ww8/ww8graf.cxx sw/source/filter/ww8/ww8graf.hxx sw/source/filter/ww8/ww8graf2.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.hxx sw/source/filter/ww8/ww8par2.cxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par5.cxx sw/source/filter/ww8/ww8par6.cxx sw/source/filter/ww8/ww8scan.cxx sw/source/filter/ww8/ww8scan.hxx sw/source/filter/ww8/ww8struc.hxx sw/source/filter/xml/makefile.mk sw/source/filter/xml/xmlimpit.cxx sw/source/filter/xml/xmltble.cxx sw/source/filter/xml/xmltbli.cxx sw/source/ui/app/appenv.cxx sw/source/ui/app/apphdl.cxx sw/source/ui/app/applab.cxx sw/source/ui/app/appopt.cxx sw/source/ui/app/docsh.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/docshini.cxx sw/source/ui/app/docst.cxx sw/source/ui/app/docstyle.cxx sw/source/ui/app/makefile.mk sw/source/ui/app/mn.src sw/source/ui/app/swmodul1.cxx sw/source/ui/cctrl/makefile.mk sw/source/ui/cctrl/swlbox.cxx sw/source/ui/chrdlg/break.cxx sw/source/ui/chrdlg/ccoll.cxx sw/source/ui/chrdlg/chardlg.cxx sw/source/ui/chrdlg/drpcps.cxx sw/source/ui/chrdlg/makefile.mk sw/source/ui/chrdlg/numpara.cxx sw/source/ui/chrdlg/pardlg.cxx sw/source/ui/chrdlg/swuiccoll.cxx sw/source/ui/config/barcfg.cxx sw/source/ui/config/caption.cxx sw/source/ui/config/cfgitems.cxx sw/source/ui/config/fontcfg.cxx sw/source/ui/config/mailconfigpage.cxx sw/source/ui/config/makefile.mk sw/source/ui/config/modcfg.cxx sw/source/ui/config/optcomp.cxx sw/source/ui/config/optload.cxx sw/source/ui/config/optpage.cxx sw/source/ui/config/prtopt.cxx sw/source/ui/config/uinums.cxx sw/source/ui/config/usrpref.cxx sw/source/ui/config/viewopt.cxx sw/source/ui/dbui/dbinsdlg.cxx sw/source/ui/dbui/dbmgr.cxx sw/source/ui/dbui/dbtree.cxx sw/source/ui/dbui/makefile.mk sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dbui/mmdocselectpage.cxx sw/source/ui/dbui/mmoutputpage.cxx sw/source/ui/dbui/swdbtoolsclient.cxx sw/source/ui/dialog/abstract.cxx sw/source/ui/dialog/ascfldlg.cxx sw/source/ui/dialog/macassgn.cxx sw/source/ui/dialog/makefile.mk sw/source/ui/dialog/regionsw.cxx sw/source/ui/dialog/swdlgfact.cxx sw/source/ui/dialog/swdlgfact.hxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/dochdl/gloshdl.cxx sw/source/ui/dochdl/makefile.mk sw/source/ui/dochdl/swdtflvr.cxx sw/source/ui/docvw/PostItMgr.cxx sw/source/ui/docvw/SidebarWin.cxx sw/source/ui/docvw/edtdd.cxx sw/source/ui/docvw/edtwin.cxx sw/source/ui/docvw/edtwin2.cxx sw/source/ui/docvw/edtwin3.cxx sw/source/ui/docvw/makefile.mk sw/source/ui/docvw/romenu.cxx sw/source/ui/docvw/romenu.hxx sw/source/ui/docvw/srcedtw.cxx sw/source/ui/envelp/envfmt.cxx sw/source/ui/envelp/envimg.cxx sw/source/ui/envelp/envlop1.cxx sw/source/ui/envelp/envprt.cxx sw/source/ui/envelp/label1.cxx sw/source/ui/envelp/labfmt.cxx sw/source/ui/envelp/labprt.cxx sw/source/ui/envelp/mailmrge.cxx sw/source/ui/envelp/makefile.mk sw/source/ui/fldui/flddb.cxx sw/source/ui/fldui/flddinf.cxx sw/source/ui/fldui/flddok.cxx sw/source/ui/fldui/fldedt.cxx sw/source/ui/fldui/fldfunc.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/fldui/fldpage.cxx sw/source/ui/fldui/fldref.cxx sw/source/ui/fldui/fldtdlg.cxx sw/source/ui/fldui/fldvar.cxx sw/source/ui/fldui/fldwrap.cxx sw/source/ui/fldui/inpdlg.cxx sw/source/ui/fldui/makefile.mk sw/source/ui/fmtui/makefile.mk sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/frmdlg/colmgr.cxx sw/source/ui/frmdlg/column.cxx sw/source/ui/frmdlg/cption.cxx sw/source/ui/frmdlg/frmdlg.cxx sw/source/ui/frmdlg/frmmgr.cxx sw/source/ui/frmdlg/frmpage.cxx sw/source/ui/frmdlg/makefile.mk sw/source/ui/frmdlg/wrap.cxx sw/source/ui/globdoc/makefile.mk sw/source/ui/inc/bmpwin.hxx sw/source/ui/inc/colmgr.hxx sw/source/ui/inc/column.hxx sw/source/ui/inc/envimg.hxx sw/source/ui/inc/envlop.hxx sw/source/ui/inc/frmpage.hxx sw/source/ui/inc/inputwin.hxx sw/source/ui/inc/javaedit.hxx sw/source/ui/inc/num.hxx sw/source/ui/inc/optpage.hxx sw/source/ui/inc/regionsw.hxx sw/source/ui/inc/split.hxx sw/source/ui/inc/swlbox.hxx sw/source/ui/inc/swmn_tmpl.hrc sw/source/ui/inc/swuiidxmrk.hxx sw/source/ui/inc/tabsh.hxx sw/source/ui/inc/toxmgr.hxx sw/source/ui/inc/uiitems.hxx sw/source/ui/inc/view.hxx sw/source/ui/inc/workctrl.hxx sw/source/ui/inc/wrap.hxx sw/source/ui/inc/wrtsh.hxx sw/source/ui/index/cnttab.cxx sw/source/ui/index/makefile.mk sw/source/ui/index/toxmgr.cxx sw/source/ui/lingu/hhcwrp.cxx sw/source/ui/lingu/makefile.mk sw/source/ui/lingu/olmenu.cxx sw/source/ui/misc/bookmark.cxx sw/source/ui/misc/docfnote.cxx sw/source/ui/misc/glosbib.cxx sw/source/ui/misc/glosdoc.cxx sw/source/ui/misc/glshell.cxx sw/source/ui/misc/insfnote.cxx sw/source/ui/misc/linenum.cxx sw/source/ui/misc/makefile.mk sw/source/ui/misc/num.cxx sw/source/ui/misc/numberingtypelistbox.cxx sw/source/ui/misc/outline.cxx sw/source/ui/misc/pgfnote.cxx sw/source/ui/misc/pggrid.cxx sw/source/ui/misc/redlndlg.cxx sw/source/ui/misc/srtdlg.cxx sw/source/ui/misc/swmodalredlineacceptdlg.cxx sw/source/ui/ribbar/conarc.cxx sw/source/ui/ribbar/drawbase.cxx sw/source/ui/ribbar/inputwin.cxx sw/source/ui/ribbar/inputwin.src sw/source/ui/ribbar/makefile.mk sw/source/ui/ribbar/tbxanchr.cxx sw/source/ui/ribbar/workctrl.cxx sw/source/ui/ribbar/workctrl.src sw/source/ui/shells/annotsh.cxx sw/source/ui/shells/basesh.cxx sw/source/ui/shells/beziersh.cxx sw/source/ui/shells/drawdlg.cxx sw/source/ui/shells/drwbassh.cxx sw/source/ui/shells/drwtxtex.cxx sw/source/ui/shells/drwtxtsh.cxx sw/source/ui/shells/frmsh.cxx sw/source/ui/shells/grfsh.cxx sw/source/ui/shells/grfshex.cxx sw/source/ui/shells/makefile.mk sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textfld.cxx sw/source/ui/shells/textglos.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtattr.cxx sw/source/ui/shells/txtcrsr.cxx sw/source/ui/shells/txtnum.cxx sw/source/ui/table/convert.cxx sw/source/ui/table/instable.cxx sw/source/ui/table/makefile.mk sw/source/ui/table/swtablerep.cxx sw/source/ui/table/tabledlg.cxx sw/source/ui/table/tablemgr.cxx sw/source/ui/table/tablepg.hxx sw/source/ui/table/tautofmt.cxx sw/source/ui/uiview/formatclipboard.cxx sw/source/ui/uiview/makefile.mk sw/source/ui/uiview/pview.cxx sw/source/ui/uiview/pview.src sw/source/ui/uiview/scroll.cxx sw/source/ui/uiview/srcview.cxx sw/source/ui/uiview/swcli.cxx sw/source/ui/uiview/uivwimp.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uiview/view1.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/uiview/viewcoll.cxx sw/source/ui/uiview/viewdlg2.cxx sw/source/ui/uiview/viewling.cxx sw/source/ui/uiview/viewmdi.cxx sw/source/ui/uiview/viewport.cxx sw/source/ui/uiview/viewprt.cxx sw/source/ui/uiview/viewsrch.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/uno/SwXDocumentSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.hxx sw/source/ui/uno/unoatxt.cxx sw/source/ui/uno/unomod.cxx sw/source/ui/uno/unotxdoc.cxx sw/source/ui/uno/unotxvw.cxx sw/source/ui/utlui/attrdesc.cxx sw/source/ui/utlui/content.cxx sw/source/ui/utlui/glbltree.cxx sw/source/ui/utlui/initui.cxx sw/source/ui/utlui/makefile.mk sw/source/ui/utlui/navipi.cxx sw/source/ui/utlui/navipi.src sw/source/ui/utlui/numfmtlb.cxx sw/source/ui/utlui/prcntfld.cxx sw/source/ui/utlui/uiitems.cxx sw/source/ui/utlui/uitool.cxx sw/source/ui/utlui/unotools.cxx sw/source/ui/utlui/viewlayoutctrl.cxx sw/source/ui/utlui/zoomctrl.cxx sw/source/ui/vba/makefile.mk sw/source/ui/vba/service.cxx sw/source/ui/web/makefile.mk sw/source/ui/wrtsh/makefile.mk sw/source/ui/wrtsh/wrtsh1.cxx sw/source/ui/wrtsh/wrtsh2.cxx sw/source/ui/wrtsh/wrtsh4.cxx sw/source/ui/wrtsh/wrtundo.cxx sw/util/hidother.src sw/util/makefile.mk sw/util/msword.map
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/SwNumberTree/SwNodeNum.cxx2
-rw-r--r--sw/source/core/SwNumberTree/makefile.mk50
-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/makefile.mk97
-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.cxx96
-rw-r--r--sw/source/core/attr/hints.cxx40
-rw-r--r--sw/source/core/attr/makefile.mk58
-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.cxx148
-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/makefile.mk79
-rw-r--r--sw/source/core/bastyp/swcache.cxx40
-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/swtypes.cxx3
-rw-r--r--sw/source/core/bastyp/tabcol.cxx20
-rw-r--r--sw/source/core/crsr/bookmrk.cxx18
-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.cxx505
-rw-r--r--sw/source/core/crsr/crstrvl.cxx322
-rw-r--r--sw/source/core/crsr/crstrvl1.cxx30
-rw-r--r--sw/source/core/crsr/findattr.cxx243
-rw-r--r--sw/source/core/crsr/findcoll.cxx31
-rw-r--r--sw/source/core/crsr/findfmt.cxx14
-rw-r--r--sw/source/core/crsr/findtxt.cxx94
-rw-r--r--sw/source/core/crsr/makefile.mk80
-rw-r--r--sw/source/core/crsr/pam.cxx220
-rw-r--r--sw/source/core/crsr/paminit.cxx14
-rw-r--r--sw/source/core/crsr/swcrsr.cxx454
-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.cxx52
-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.cxx105
-rw-r--r--sw/source/core/doc/doc.cxx480
-rw-r--r--sw/source/core/doc/docbasic.cxx30
-rw-r--r--sw/source/core/doc/docbm.cxx105
-rw-r--r--sw/source/core/doc/docchart.cxx12
-rw-r--r--sw/source/core/doc/doccomp.cxx335
-rw-r--r--sw/source/core/doc/doccorr.cxx243
-rw-r--r--sw/source/core/doc/docdde.cxx42
-rw-r--r--sw/source/core/doc/docdesc.cxx150
-rw-r--r--sw/source/core/doc/docdraw.cxx98
-rw-r--r--sw/source/core/doc/docedt.cxx242
-rw-r--r--sw/source/core/doc/docfld.cxx350
-rw-r--r--sw/source/core/doc/docfly.cxx203
-rw-r--r--sw/source/core/doc/docfmt.cxx395
-rw-r--r--sw/source/core/doc/docftn.cxx74
-rw-r--r--sw/source/core/doc/docglbl.cxx67
-rw-r--r--sw/source/core/doc/docglos.cxx26
-rw-r--r--sw/source/core/doc/doclay.cxx288
-rw-r--r--sw/source/core/doc/docnew.cxx165
-rw-r--r--sw/source/core/doc/docnum.cxx507
-rw-r--r--sw/source/core/doc/docredln.cxx536
-rw-r--r--sw/source/core/doc/docruby.cxx49
-rw-r--r--sw/source/core/doc/docsort.cxx196
-rw-r--r--sw/source/core/doc/docstat.cxx4
-rw-r--r--sw/source/core/doc/doctxm.cxx272
-rw-r--r--sw/source/core/doc/extinput.cxx32
-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.cxx480
-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/makefile.mk92
-rw-r--r--sw/source/core/doc/notxtfrm.cxx102
-rw-r--r--sw/source/core/doc/number.cxx130
-rw-r--r--sw/source/core/doc/poolfmt.cxx419
-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.cxx220
-rw-r--r--sw/source/core/doc/tblcpy.cxx213
-rw-r--r--sw/source/core/doc/tblrwcl.cxx1005
-rw-r--r--sw/source/core/doc/visiturl.cxx16
-rw-r--r--sw/source/core/docnode/makefile.mk73
-rw-r--r--sw/source/core/docnode/ndcopy.cxx246
-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.cxx18
-rw-r--r--sw/source/core/docnode/ndsect.cxx212
-rw-r--r--sw/source/core/docnode/ndtbl.cxx1065
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx348
-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.cxx335
-rw-r--r--sw/source/core/docnode/section.cxx171
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx88
-rw-r--r--sw/source/core/draw/dcontact.cxx58
-rw-r--r--sw/source/core/draw/dflyobj.cxx76
-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.cxx110
-rw-r--r--sw/source/core/draw/makefile.mk58
-rw-r--r--sw/source/core/edit/acorrect.cxx88
-rw-r--r--sw/source/core/edit/autofmt.cxx502
-rw-r--r--sw/source/core/edit/edatmisc.cxx38
-rw-r--r--sw/source/core/edit/edattr.cxx108
-rw-r--r--sw/source/core/edit/eddel.cxx52
-rw-r--r--sw/source/core/edit/edfcol.cxx23
-rw-r--r--sw/source/core/edit/edfld.cxx97
-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.cxx92
-rw-r--r--sw/source/core/edit/edglss.cxx48
-rw-r--r--sw/source/core/edit/editsh.cxx136
-rw-r--r--sw/source/core/edit/edlingu.cxx55
-rw-r--r--sw/source/core/edit/ednumber.cxx172
-rw-r--r--sw/source/core/edit/edredln.cxx26
-rw-r--r--sw/source/core/edit/edsect.cxx45
-rw-r--r--sw/source/core/edit/edtab.cxx99
-rw-r--r--sw/source/core/edit/edtox.cxx96
-rw-r--r--sw/source/core/edit/edundo.cxx212
-rw-r--r--sw/source/core/edit/edws.cxx56
-rw-r--r--sw/source/core/edit/makefile.mk71
-rw-r--r--sw/source/core/except/dbgloop.cxx168
-rw-r--r--sw/source/core/except/errhdl.cxx136
-rw-r--r--sw/source/core/fields/authfld.cxx79
-rw-r--r--sw/source/core/fields/cellfml.cxx76
-rw-r--r--sw/source/core/fields/chpfld.cxx14
-rw-r--r--sw/source/core/fields/dbfld.cxx129
-rw-r--r--sw/source/core/fields/ddefld.cxx36
-rw-r--r--sw/source/core/fields/ddetbl.cxx18
-rw-r--r--sw/source/core/fields/docufld.cxx143
-rw-r--r--sw/source/core/fields/expfld.cxx210
-rw-r--r--sw/source/core/fields/fldbas.cxx109
-rw-r--r--sw/source/core/fields/flddat.cxx20
-rw-r--r--sw/source/core/fields/flddropdown.cxx6
-rw-r--r--sw/source/core/fields/fldlst.cxx28
-rw-r--r--sw/source/core/fields/macrofld.cxx37
-rw-r--r--sw/source/core/fields/makefile.mk92
-rw-r--r--sw/source/core/fields/reffld.cxx87
-rw-r--r--sw/source/core/fields/scrptfld.cxx6
-rw-r--r--sw/source/core/fields/tblcalc.cxx60
-rw-r--r--sw/source/core/fields/usrfld.cxx41
-rw-r--r--sw/source/core/frmedt/fecopy.cxx191
-rw-r--r--sw/source/core/frmedt/fedesc.cxx46
-rw-r--r--sw/source/core/frmedt/fefly1.cxx166
-rw-r--r--sw/source/core/frmedt/feflyole.cxx12
-rw-r--r--sw/source/core/frmedt/feshview.cxx323
-rw-r--r--sw/source/core/frmedt/fetab.cxx312
-rw-r--r--sw/source/core/frmedt/fews.cxx270
-rw-r--r--sw/source/core/frmedt/makefile.mk76
-rw-r--r--sw/source/core/frmedt/tblsel.cxx402
-rw-r--r--sw/source/core/graphic/grfatr.cxx48
-rw-r--r--sw/source/core/graphic/makefile.mk53
-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/SwUndoFmt.hxx255
-rw-r--r--sw/source/core/inc/SwUndoPageDesc.hxx96
-rw-r--r--sw/source/core/inc/SwUndoTOXChange.hxx52
-rw-r--r--sw/source/core/inc/SwXMLTextBlocks.hxx58
-rw-r--r--sw/source/core/inc/UndoAttribute.hxx288
-rw-r--r--sw/source/core/inc/UndoBookmark.hxx83
-rw-r--r--sw/source/core/inc/UndoCore.hxx263
-rw-r--r--sw/source/core/inc/UndoDelete.hxx115
-rw-r--r--sw/source/core/inc/UndoDraw.hxx150
-rw-r--r--sw/source/core/inc/UndoInsert.hxx235
-rw-r--r--sw/source/core/inc/UndoManager.hxx124
-rw-r--r--sw/source/core/inc/UndoNumbering.hxx150
-rw-r--r--sw/source/core/inc/UndoOverwrite.hxx105
-rw-r--r--sw/source/core/inc/UndoRedline.hxx145
-rw-r--r--sw/source/core/inc/UndoSection.hxx82
-rw-r--r--sw/source/core/inc/UndoSort.hxx97
-rw-r--r--sw/source/core/inc/UndoSplitMove.hxx96
-rw-r--r--sw/source/core/inc/UndoTable.hxx391
-rw-r--r--sw/source/core/inc/acorrect.hxx36
-rw-r--r--sw/source/core/inc/anchoredobjectposition.hxx58
-rw-r--r--sw/source/core/inc/blink.hxx16
-rw-r--r--sw/source/core/inc/bodyfrm.hxx2
-rw-r--r--sw/source/core/inc/cellfrm.hxx11
-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.hxx77
-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.hxx129
-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.hxx434
-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.hxx47
-rw-r--r--sw/source/core/inc/layouter.hxx10
-rw-r--r--sw/source/core/inc/makefile.mk26
-rw-r--r--sw/source/core/inc/mvsave.hxx54
-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.hxx19
-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/rolbck.hxx439
-rw-r--r--sw/source/core/inc/rootfrm.hxx116
-rw-r--r--sw/source/core/inc/rowfrm.hxx24
-rw-r--r--sw/source/core/inc/scriptinfo.hxx105
-rw-r--r--sw/source/core/inc/sectfrm.hxx60
-rw-r--r--sw/source/core/inc/swblocks.hxx70
-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.hxx91
-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.hxx110
-rw-r--r--sw/source/core/inc/txtfrm.hxx56
-rw-r--r--sw/source/core/inc/txttypes.hxx4
-rw-r--r--sw/source/core/inc/undoflystrattr.hxx11
-rw-r--r--sw/source/core/inc/unometa.hxx2
-rw-r--r--sw/source/core/inc/viewimp.hxx55
-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.cxx101
-rw-r--r--sw/source/core/layout/calcmove.cxx291
-rw-r--r--sw/source/core/layout/colfrm.cxx77
-rw-r--r--sw/source/core/layout/dbg_lay.cxx130
-rw-r--r--sw/source/core/layout/findfrm.cxx85
-rw-r--r--sw/source/core/layout/flowfrm.cxx326
-rw-r--r--sw/source/core/layout/fly.cxx205
-rw-r--r--sw/source/core/layout/flycnt.cxx273
-rw-r--r--sw/source/core/layout/flyincnt.cxx30
-rw-r--r--sw/source/core/layout/flylay.cxx80
-rw-r--r--sw/source/core/layout/flypos.cxx14
-rw-r--r--sw/source/core/layout/frmtool.cxx274
-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.cxx386
-rw-r--r--sw/source/core/layout/laycache.cxx223
-rw-r--r--sw/source/core/layout/layhelp.hxx86
-rw-r--r--sw/source/core/layout/layouter.cxx36
-rw-r--r--sw/source/core/layout/makefile.mk105
-rw-r--r--sw/source/core/layout/newfrm.cxx92
-rw-r--r--sw/source/core/layout/objectformatter.cxx4
-rw-r--r--sw/source/core/layout/pagechg.cxx216
-rw-r--r--sw/source/core/layout/pagedesc.cxx22
-rw-r--r--sw/source/core/layout/paintfrm.cxx415
-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.cxx102
-rw-r--r--sw/source/core/layout/tabfrm.cxx488
-rw-r--r--sw/source/core/layout/trvlfrm.cxx324
-rw-r--r--sw/source/core/layout/unusedf.cxx30
-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.cxx312
-rw-r--r--sw/source/core/makefile.mk99
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx101
-rw-r--r--sw/source/core/objectpositioning/makefile.mk62
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx123
-rw-r--r--sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx12
-rw-r--r--sw/source/core/ole/makefile.mk55
-rw-r--r--sw/source/core/ole/ndole.cxx88
-rw-r--r--sw/source/core/para/makefile.mk57
-rw-r--r--sw/source/core/para/paratr.cxx8
-rw-r--r--sw/source/core/sw3io/makefile.mk52
-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.cxx125
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks1.cxx34
-rw-r--r--sw/source/core/swg/makefile.mk55
-rw-r--r--sw/source/core/swg/swblocks.cxx180
-rw-r--r--sw/source/core/table/makefile.mk48
-rw-r--r--sw/source/core/table/swnewtable.cxx362
-rw-r--r--sw/source/core/table/swtable.cxx399
-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.cxx37
-rw-r--r--sw/source/core/text/frmform.cxx24
-rw-r--r--sw/source/core/text/frmpaint.cxx8
-rw-r--r--sw/source/core/text/guess.cxx18
-rw-r--r--sw/source/core/text/inftxt.cxx110
-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.cxx42
-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.cxx56
-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.cxx22
-rw-r--r--sw/source/core/text/itrtxt.hxx4
-rw-r--r--sw/source/core/text/makefile.mk104
-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.cxx198
-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.cxx174
-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.cxx94
-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.cxx125
-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/txtio.cxx6
-rw-r--r--sw/source/core/text/txttab.cxx19
-rw-r--r--sw/source/core/text/widorp.cxx12
-rw-r--r--sw/source/core/text/wrong.cxx14
-rw-r--r--sw/source/core/tox/makefile.mk56
-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.cxx123
-rw-r--r--sw/source/core/txtnode/atrfld.cxx21
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx20
-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.cxx44
-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/makefile.mk77
-rw-r--r--sw/source/core/txtnode/ndhints.cxx58
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx430
-rw-r--r--sw/source/core/txtnode/swfntcch.cxx8
-rw-r--r--sw/source/core/txtnode/swfont.cxx170
-rw-r--r--sw/source/core/txtnode/thints.cxx245
-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.cxx239
-rw-r--r--sw/source/core/undo/SwUndoField.cxx41
-rw-r--r--sw/source/core/undo/SwUndoFmt.cxx123
-rw-r--r--sw/source/core/undo/SwUndoPageDesc.cxx96
-rw-r--r--sw/source/core/undo/SwUndoTOXChange.cxx15
-rw-r--r--sw/source/core/undo/docundo.cxx1128
-rw-r--r--sw/source/core/undo/makefile.mk81
-rw-r--r--sw/source/core/undo/rolbck.cxx164
-rw-r--r--sw/source/core/undo/unattr.cxx332
-rw-r--r--sw/source/core/undo/unbkmk.cxx18
-rw-r--r--sw/source/core/undo/undel.cxx160
-rw-r--r--sw/source/core/undo/undo.src2
-rw-r--r--sw/source/core/undo/undobj.cxx371
-rw-r--r--sw/source/core/undo/undobj1.cxx185
-rw-r--r--sw/source/core/undo/undoflystrattr.cxx9
-rw-r--r--sw/source/core/undo/undraw.cxx109
-rw-r--r--sw/source/core/undo/unfmco.cxx42
-rw-r--r--sw/source/core/undo/unins.cxx347
-rw-r--r--sw/source/core/undo/unmove.cxx49
-rw-r--r--sw/source/core/undo/unnum.cxx208
-rw-r--r--sw/source/core/undo/unoutl.cxx28
-rw-r--r--sw/source/core/undo/unovwr.cxx126
-rw-r--r--sw/source/core/undo/unredln.cxx188
-rw-r--r--sw/source/core/undo/unsect.cxx72
-rw-r--r--sw/source/core/undo/unsort.cxx106
-rw-r--r--sw/source/core/undo/unspnd.cxx56
-rw-r--r--sw/source/core/undo/untbl.cxx695
-rw-r--r--sw/source/core/undo/untblk.cxx90
-rw-r--r--sw/source/core/unocore/makefile.mk122
-rw-r--r--sw/source/core/unocore/swunohelper.cxx52
-rw-r--r--sw/source/core/unocore/unobkm.cxx9
-rw-r--r--sw/source/core/unocore/unochart.cxx12
-rw-r--r--sw/source/core/unocore/unocoll.cxx6
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx36
-rw-r--r--sw/source/core/unocore/unodraw.cxx19
-rw-r--r--sw/source/core/unocore/unoevent.cxx4
-rw-r--r--sw/source/core/unocore/unofield.cxx65
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx18
-rw-r--r--sw/source/core/unocore/unoframe.cxx54
-rw-r--r--sw/source/core/unocore/unoidx.cxx12
-rw-r--r--sw/source/core/unocore/unomap.cxx3
-rw-r--r--sw/source/core/unocore/unoobj.cxx73
-rw-r--r--sw/source/core/unocore/unoobj2.cxx47
-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.cxx6
-rw-r--r--sw/source/core/unocore/unoredline.cxx10
-rw-r--r--sw/source/core/unocore/unoredlines.cxx4
-rw-r--r--sw/source/core/unocore/unorefmk.cxx2
-rw-r--r--sw/source/core/unocore/unosect.cxx15
-rw-r--r--sw/source/core/unocore/unosett.cxx58
-rw-r--r--sw/source/core/unocore/unosrch.cxx64
-rw-r--r--sw/source/core/unocore/unostyle.cxx55
-rw-r--r--sw/source/core/unocore/unotbl.cxx123
-rw-r--r--sw/source/core/unocore/unotext.cxx68
-rw-r--r--sw/source/core/unocore/unotextmarkup.cxx12
-rw-r--r--sw/source/core/view/makefile.mk61
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx9
-rw-r--r--sw/source/core/view/printdata.cxx198
-rw-r--r--sw/source/core/view/vdraw.cxx30
-rw-r--r--sw/source/core/view/viewimp.cxx28
-rw-r--r--sw/source/core/view/viewpg.cxx6
-rw-r--r--sw/source/core/view/viewsh.cxx281
-rw-r--r--sw/source/core/view/vnew.cxx26
-rw-r--r--sw/source/core/view/vprint.cxx215
428 files changed, 23185 insertions, 21398 deletions
diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx
index b831f4c1a991..100cc9ffda9d 100644
--- a/sw/source/core/SwNumberTree/SwNodeNum.cxx
+++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx
@@ -320,7 +320,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/SwNumberTree/makefile.mk b/sw/source/core/SwNumberTree/makefile.mk
deleted file mode 100644
index a7cfff9cecd2..000000000000
--- a/sw/source/core/SwNumberTree/makefile.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=SwNumberTree
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/SwNodeNum.obj \
- $(SLO)$/SwNumberTree.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 9b6c86969073..7e13c561bc8b 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -316,7 +316,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 aa08282ed745..3ca75ead3523 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -2595,7 +2595,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 6103177a92d6..87a59379fb38 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -147,7 +147,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!
@@ -187,7 +187,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;
@@ -198,9 +198,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 ) )
{
@@ -222,7 +222,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() )
{
@@ -258,7 +258,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() )
{
@@ -320,7 +320,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 /* ??? */ );
}
}
@@ -544,7 +544,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();
@@ -578,8 +578,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
@@ -651,13 +651,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(
@@ -731,12 +731,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 );
@@ -1472,9 +1472,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 );
@@ -1490,7 +1490,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() );
@@ -1499,7 +1499,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 );
}
}
@@ -1508,7 +1508,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 );
}
// <--
@@ -1530,7 +1530,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
const SfxPoolItem* pItem( 0 );
// #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 );
@@ -1633,12 +1633,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
@@ -1730,7 +1730,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;
@@ -2063,7 +2063,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 0c8bbcde6175..062af1aa8940 100644
--- a/sw/source/core/access/accpara.hxx
+++ b/sw/source/core/access/accpara.hxx
@@ -112,7 +112,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 230db4ca2d12..0142391027b8 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -115,7 +115,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!" );
@@ -137,7 +137,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;
@@ -145,7 +145,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(),
@@ -225,7 +225,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" );
@@ -269,7 +269,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(...)
@@ -361,7 +361,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" );
@@ -389,7 +389,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(
@@ -502,7 +502,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,
@@ -545,7 +545,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" );
@@ -578,14 +578,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);
@@ -617,7 +617,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
@@ -661,41 +661,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;
@@ -730,21 +730,21 @@ 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 ] );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx
index ee37121ca2bc..ef04e7ff56eb 100644
--- a/sw/source/core/access/accportions.hxx
+++ b/sw/source/core/access/accportions.hxx
@@ -91,11 +91,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,
@@ -103,10 +103,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();
@@ -131,16 +131,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;
@@ -159,16 +159,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 afd6306d968c..563a000a3230 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -1450,7 +1450,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/makefile.mk b/sw/source/core/access/makefile.mk
deleted file mode 100644
index 3a3802dda733..000000000000
--- a/sw/source/core/access/makefile.mk
+++ /dev/null
@@ -1,97 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=access
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/acccell.obj \
- $(SLO)$/acccontext.obj \
- $(SLO)$/accdoc.obj \
- $(SLO)$/accembedded.obj \
- $(SLO)$/accfootnote.obj \
- $(SLO)$/accframe.obj \
- $(SLO)$/accframebase.obj \
- $(SLO)$/accfrmobj.obj \
- $(SLO)$/accfrmobjmap.obj \
- $(SLO)$/accfrmobjslist.obj \
- $(SLO)$/accgraphic.obj \
- $(SLO)$/accheaderfooter.obj \
- $(SLO)$/acchyperlink.obj \
- $(SLO)$/acchypertextdata.obj \
- $(SLO)$/accmap.obj \
- $(SLO)$/accnotextframe.obj \
- $(SLO)$/accpage.obj \
- $(SLO)$/accpara.obj \
- $(SLO)$/accportions.obj \
- $(SLO)$/accpreview.obj \
- $(SLO)$/accselectionhelper.obj \
- $(SLO)$/acctable.obj \
- $(SLO)$/acctextframe.obj \
- $(SLO)$/textmarkuphelper.obj \
- $(SLO)$/parachangetrackinginfo.obj
-
-EXCEPTIONSFILES= \
- $(SLO)$/acccell.obj \
- $(SLO)$/acccontext.obj \
- $(SLO)$/accdoc.obj \
- $(SLO)$/accembedded.obj \
- $(SLO)$/accfootnote.obj \
- $(SLO)$/accframe.obj \
- $(SLO)$/accframebase.obj \
- $(SLO)$/accfrmobj.obj \
- $(SLO)$/accfrmobjmap.obj \
- $(SLO)$/accfrmobjslist.obj \
- $(SLO)$/accgraphic.obj \
- $(SLO)$/accheaderfooter.obj \
- $(SLO)$/acchyperlink.obj \
- $(SLO)$/acchypertextdata.obj \
- $(SLO)$/accmap.obj \
- $(SLO)$/accnotextframe.obj \
- $(SLO)$/accpage.obj \
- $(SLO)$/accpara.obj \
- $(SLO)$/accportions.obj \
- $(SLO)$/accpreview.obj \
- $(SLO)$/accselectionhelper.obj \
- $(SLO)$/acctable.obj \
- $(SLO)$/acctextframe.obj \
- $(SLO)$/textmarkuphelper.obj \
- $(SLO)$/parachangetrackinginfo.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/sw/source/core/access/parachangetrackinginfo.cxx b/sw/source/core/access/parachangetrackinginfo.cxx
index 3d0b5c4b5bf3..b8c2cdfa68ff 100644
--- a/sw/source/core/access/parachangetrackinginfo.cxx
+++ b/sw/source/core/access/parachangetrackinginfo.cxx
@@ -91,7 +91,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 434714be4306..6eb9ffa9edab 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) );
OSL_ENSURE( 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 20595280817b..f25f117b36f1 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -57,8 +57,8 @@ SwClient::SwClient(SwModify *pToRegisterIn)
bModifyLocked =
bInModify =
bInDocDTOR =
- bInCache = FALSE;
- bInSwFntCache = FALSE;
+ bInCache = sal_False;
+ bInSwFntCache = sal_False;
if(pToRegisterIn)
pToRegisterIn->Add(this);
@@ -106,9 +106,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
}
/*************************************************************************
@@ -187,7 +187,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 );
}
@@ -199,7 +199,7 @@ void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
#if OSL_DEBUG_LEVEL > 1
if( !pOldValue )
- bInModify = TRUE;
+ bInModify = sal_True;
else
// following Modifies don't calls an ASSRT
switch( pOldValue->Which() )
@@ -213,13 +213,13 @@ 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;
}
#else
- bInModify = TRUE;
+ bInModify = sal_True;
#endif
SwClientIter aIter( *this );
@@ -232,15 +232,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 )
{
@@ -351,7 +351,7 @@ SwClient *SwModify::_Remove(SwClient * pDepend)
pDepend->pRight = 0;
}
else {
- OSL_ENSURE( FALSE, "SwModify::Remove(): pDepend nicht gefunden");
+ OSL_ENSURE( sal_False, "SwModify::Remove(): pDepend nicht gefunden");
}
pDepend->pRegisteredIn = 0;
return pDepend;
@@ -359,16 +359,16 @@ SwClient *SwModify::_Remove(SwClient * pDepend)
/*************************************************************************
-|* SwModify::CheckCaching( const USHORT nWhich )
+|* SwModify::CheckCaching( const sal_uInt16 nWhich )
*************************************************************************/
-void SwModify::CheckCaching( const USHORT nWhich )
+void SwModify::CheckCaching( const sal_uInt16 nWhich )
{
if (isCHRATR(nWhich))
{
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
}
else
switch ( nWhich )
@@ -376,7 +376,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:
@@ -388,7 +388,7 @@ void SwModify::CheckCaching( const USHORT nWhich )
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
break;
}
@@ -431,9 +431,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 57a507cd66ad..aae83558ca47 100644
--- a/sw/source/core/attr/cellatr.cxx
+++ b/sw/source/core/attr/cellatr.cxx
@@ -52,7 +52,7 @@
*************************************************************************/
-SwTblBoxNumFormat::SwTblBoxNumFormat( UINT32 nFormat, BOOL bFlag )
+SwTblBoxNumFormat::SwTblBoxNumFormat( sal_uInt32 nFormat, sal_Bool bFlag )
: SfxUInt32Item( RES_BOXATR_FORMAT, nFormat ), bAuto( bFlag )
{
}
@@ -140,7 +140,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 ;
}
@@ -158,7 +158,7 @@ void SwTblBoxFormula::ChangeState( const SfxPoolItem* pItem )
// setze das Value-Flag zurueck
// JP 17.06.96: interne Darstellung auf alle Formeln
// (Referenzen auf andere Tabellen!!!)
- ChgValid( FALSE );
+ ChgValid( sal_False );
break;
case TBL_BOXNAME:
// ist es die gesuchte Tabelle ??
@@ -182,20 +182,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 6fe71ac0ddc0..038776466d43 100644
--- a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
+++ b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
@@ -76,7 +76,7 @@ SfxPoolItem* SwFmtWrapInfluenceOnObjPos::Clone( SfxItemPool * ) const
return new SwFmtWrapInfluenceOnObjPos(*this);
}
-bool SwFmtWrapInfluenceOnObjPos::QueryValue( Any& rVal, BYTE nMemberId ) const
+bool SwFmtWrapInfluenceOnObjPos::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
bool bRet = true;
@@ -95,7 +95,7 @@ bool SwFmtWrapInfluenceOnObjPos::QueryValue( Any& rVal, BYTE nMemberId ) const
return bRet;
}
-bool SwFmtWrapInfluenceOnObjPos::PutValue( const Any& rVal, BYTE nMemberId )
+bool SwFmtWrapInfluenceOnObjPos::PutValue( const Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
bool bRet = true;
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index a3af389964a9..d4b217e49d11 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -47,7 +47,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 ),
@@ -57,8 +57,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 );
@@ -66,7 +66,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 ),
@@ -76,8 +76,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 );
@@ -94,7 +94,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;
@@ -121,9 +121,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() ),
@@ -190,16 +190,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;
@@ -249,7 +249,7 @@ SwFmt::~SwFmt()
{
OSL_ENSURE(DerivedFrom(), "SwFmt::~SwFmt: Def Abhaengige!" );
- bFmtInDTOR = TRUE;
+ bFmtInDTOR = sal_True;
SwFmt *pParentFmt = DerivedFrom();
if (!pParentFmt)
@@ -280,9 +280,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 )
{
@@ -326,7 +326,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:
@@ -352,7 +352,7 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
pClient = aIter.Next() )
pClient->Modify( pOldValue, pNewValue );
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
break;
@@ -360,14 +360,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 ????
// OSL_ENSURE( FALSE, "Modify ohne Absender verschickt" );
//JP 11.06.96: DropCaps koennen hierher kommen
OSL_ENSURE( RES_PARATR_DROP == nWhich, "Modify ohne Absender verschickt" );
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
} // default
@@ -382,7 +382,7 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
}
-BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
+sal_Bool SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
{
if ( pDerFrom )
{
@@ -391,7 +391,7 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
while ( pFmt != 0 )
{
if ( pFmt == this )
- return FALSE;
+ return sal_False;
pFmt=pFmt->DerivedFrom();
}
@@ -404,7 +404,7 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
pDerFrom = pDerFrom->DerivedFrom();
}
if ( (pDerFrom == DerivedFrom()) || (pDerFrom == this) )
- return FALSE;
+ return sal_False;
OSL_ENSURE( Which()==pDerFrom->Which()
|| ( Which()==RES_CONDTXTFMTCOLL && pDerFrom->Which()==RES_TXTFMTCOLL)
@@ -415,9 +415,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 );
@@ -426,22 +426,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 ) ) )
@@ -475,22 +475,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 ||
@@ -524,17 +524,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 );
}
@@ -546,7 +546,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 )
{
@@ -561,7 +561,7 @@ BOOL SwFmt::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 )
// #i73790#
// method renamed
-USHORT SwFmt::ResetAllFmtAttr()
+sal_uInt16 SwFmt::ResetAllFmtAttr()
{
if( !aSet.Count() )
return 0;
@@ -569,9 +569,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() )
@@ -579,7 +579,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 )
{
@@ -596,9 +596,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;
}
@@ -611,9 +611,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() )
@@ -624,7 +624,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 4dc1400c8786..8be07e422fc1 100644
--- a/sw/source/core/attr/hints.cxx
+++ b/sw/source/core/attr/hints.cxx
@@ -66,7 +66,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 ),
@@ -101,7 +101,7 @@ SwTableFmlUpdate::SwTableFmlUpdate( const SwTable* pNewTbl )
eFlags( TBL_CALC )
{
DATA.pDelTbl = 0;
- bModified = bBehindSplitLine = FALSE;
+ bModified = bBehindSplitLine = sal_False;
OSL_ENSURE( pTbl, "es muss ein Table-Pointer gesetzt werden!" );
}
@@ -114,7 +114,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 )
{}
@@ -122,7 +122,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 );
@@ -138,7 +138,7 @@ SwAttrSetChg::~SwAttrSetChg()
#if OSL_DEBUG_LEVEL > 1
-void SwAttrSetChg::ClearItem( USHORT nWhch )
+void SwAttrSetChg::ClearItem( sal_uInt16 nWhch )
{
OSL_ENSURE( bDelSet, "der Set darf nicht veraendert werden!" );
pChgSet->ClearItem( nWhch );
@@ -147,7 +147,7 @@ void SwAttrSetChg::ClearItem( USHORT nWhch )
#endif
-SwMsgPoolItem::SwMsgPoolItem( USHORT nWhch )
+SwMsgPoolItem::SwMsgPoolItem( sal_uInt16 nWhch )
: SfxPoolItem( nWhch )
{}
@@ -155,14 +155,14 @@ SwMsgPoolItem::SwMsgPoolItem( USHORT nWhch )
// "Overhead" vom SfxPoolItem
int SwMsgPoolItem::operator==( const SfxPoolItem& ) const
{
- OSL_ENSURE( FALSE, "SwMsgPoolItem kennt kein ==" );
+ OSL_ENSURE( sal_False, "SwMsgPoolItem kennt kein ==" );
return 0;
}
SfxPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const
{
- OSL_ENSURE( FALSE, "SwMsgPoolItem kennt kein Clone" );
+ OSL_ENSURE( sal_False, "SwMsgPoolItem kennt kein Clone" );
return 0;
}
@@ -173,7 +173,7 @@ SfxPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const
* Used to be inlined (hintids.hxx) in PRODUCT.
******************************************************************************/
#if OSL_DEBUG_LEVEL > 1
-const SfxPoolItem* GetDfltAttr( USHORT nWhich )
+const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich )
{
OSL_ASSERT( nWhich < POOLATTR_END && nWhich >= POOLATTR_BEGIN );
@@ -182,7 +182,7 @@ const SfxPoolItem* GetDfltAttr( USHORT nWhich )
return pHt;
}
#else
-const SfxPoolItem* GetDfltAttr( USHORT nWhich )
+const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich )
{
return aAttrTab[ nWhich - POOLATTR_BEGIN ];
}
@@ -214,7 +214,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() )
@@ -224,20 +224,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:
@@ -273,13 +273,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/makefile.mk b/sw/source/core/attr/makefile.mk
deleted file mode 100644
index baf327dcac36..000000000000
--- a/sw/source/core/attr/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=attr
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES = \
- $(SLO)$/cellatr.obj \
- $(SLO)$/format.obj \
- $(SLO)$/hints.obj \
- $(SLO)$/swatrset.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/calbck.obj \
- $(SLO)$/fmtfollowtextflow.obj \
- $(SLO)$/fmtwrapinfluenceonobjpos.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
index 236075975f63..558f5ba7caf4 100644
--- a/sw/source/core/attr/swatrset.cxx
+++ b/sw/source/core/attr/swatrset.cxx
@@ -70,13 +70,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 )
{
}
@@ -87,7 +87,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() )
{
@@ -101,11 +101,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();
}
@@ -142,24 +142,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 )
{
OSL_ENSURE( 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;
@@ -203,14 +203,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
@@ -226,7 +226,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 );
@@ -255,14 +255,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 ) );
@@ -273,7 +273,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();
@@ -322,7 +322,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
// 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 );
@@ -381,15 +381,15 @@ 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;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/bparr.cxx b/sw/source/core/bastyp/bparr.cxx
index 4e448882ab9e..f7f87e160dad 100644
--- a/sw/source/core/bastyp/bparr.cxx
+++ b/sw/source/core/bastyp/bparr.cxx
@@ -37,18 +37,18 @@
// 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;
#if OSL_DEBUG_LEVEL > 2
#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
@@ -81,7 +81,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;
@@ -93,9 +93,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 !!!!
@@ -105,7 +105,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 )
@@ -113,10 +113,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(;;)
@@ -137,12 +137,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 ];
@@ -162,7 +162,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 ];
@@ -187,11 +187,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 )
@@ -208,10 +208,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 )
{
@@ -228,7 +228,7 @@ void BigPtrArray::UpdIndex( USHORT pos )
-BlockInfo* BigPtrArray::InsBlock( USHORT pos )
+BlockInfo* BigPtrArray::InsBlock( sal_uInt16 pos )
{
if( nBlock == nMaxBlock )
{
@@ -257,7 +257,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 )
@@ -273,12 +273,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 );
@@ -354,14 +354,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++;
@@ -373,28 +373,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++;
@@ -422,7 +422,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 )
@@ -458,15 +458,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;
}
@@ -474,7 +474,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 );
@@ -485,17 +485,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
@@ -516,7 +516,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 b47b18e5f6a4..c571e389acf8 100644
--- a/sw/source/core/bastyp/breakit.cxx
+++ b/sw/source/core/bastyp/breakit.cxx
@@ -101,11 +101,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() )
@@ -134,17 +134,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 4e27f465a4df..ba6aa92fadb6 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -216,16 +216,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 )
@@ -237,7 +237,7 @@ inline LanguageType GetDocAppScriptLang( SwDoc& rDoc )
{
return ((SvxLanguageItem&)rDoc.GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ))
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ))
)).GetLanguage();
}
@@ -331,25 +331,25 @@ static const sal_Char* const sNTypeTab[ 27 ] =
// diese sind mit doppelten HashIds
sNType25, sNType26
};
-static USHORT const aHashValue[ 27 ] =
+static sal_uInt16 const 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 const aAdrToken[ 12 ] =
+static sal_uInt16 const 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::* const aDocStat1[ 3 ] =
+static sal_uInt16 SwDocStat::* const aDocStat1[ 3 ] =
{
&SwDocStat::nTbl, &SwDocStat::nGrf, &SwDocStat::nOLE
};
-static ULONG SwDocStat::* const aDocStat2[ 4 ] =
+static sal_uLong SwDocStat::* const aDocStat2[ 4 ] =
{
&SwDocStat::nPage, &SwDocStat::nPara,
&SwDocStat::nWord, &SwDocStat::nChar
@@ -363,7 +363,7 @@ static ULONG SwDocStat::* const aDocStat2[ 4 ] =
SwSbxValue nVal;
String sTmpStr;
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < 25; ++n )
{
@@ -371,8 +371,8 @@ static ULONG SwDocStat::* const 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 );
@@ -405,7 +405,7 @@ static ULONG SwDocStat::* const 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;
@@ -444,15 +444,15 @@ 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.
|*
|******************************************************************************/
-String SwCalc::GetStrResult( const SwSbxValue& rVal, BOOL bRound )
+String SwCalc::GetStrResult( const SwSbxValue& rVal, sal_Bool bRound )
{
if( !rVal.IsDouble() )
return rVal.GetString();
@@ -461,7 +461,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 )
@@ -476,7 +476,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,
@@ -501,14 +501,14 @@ SwCalcExp* SwCalc::VarInsert( const String &rStr )
/******************************************************************************
|*
-|* SwCalcExp* SwCalc::VarLook( const String& , USHORT ins )
+|* SwCalcExp* SwCalc::VarLook( const String& , sal_uInt16 ins )
|*
|******************************************************************************/
-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 );
@@ -542,7 +542,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;
@@ -600,7 +600,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();
@@ -655,7 +655,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 )
|*
|******************************************************************************/
@@ -670,7 +670,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 )
@@ -685,17 +685,17 @@ void SwCalc::VarChange( const String& rStr, const SwSbxValue& rValue )
/******************************************************************************
|*
-|* BOOL SwCalc::Push( const void* pPtr )
+|* sal_Bool SwCalc::Push( const void* pPtr )
|*
|******************************************************************************/
-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;
}
/******************************************************************************
@@ -738,13 +738,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 )
{
@@ -788,20 +788,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 )
{
@@ -878,14 +878,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;
}
}
@@ -897,10 +897,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;
@@ -908,14 +908,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 )
@@ -1030,15 +1030,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;
}
@@ -1135,26 +1135,26 @@ SwSbxValue SwCalc::Term()
nLastLeft = left;
for(;;)
{
- USHORT nSbxOper = USHRT_MAX;
+ sal_uInt16 nSbxOper = USHRT_MAX;
switch( eCurrOper )
{
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;
@@ -1191,7 +1191,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;
@@ -1215,7 +1215,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;
@@ -1223,24 +1223,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
@@ -1308,7 +1308,7 @@ SwSbxValue SwCalc::Prim()
pfCalc pFnc = 0;
- BOOL bChkTrig = FALSE, bChkPow = FALSE;
+ sal_Bool bChkTrig = sal_False, bChkPow = sal_False;
switch( eCurrOper )
{
@@ -1316,8 +1316,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();
@@ -1352,7 +1352,7 @@ SwSbxValue SwCalc::Prim()
else
{
nErg = nNumberValue;
- bChkPow = TRUE;
+ bChkPow = sal_True;
}
break;
@@ -1365,7 +1365,7 @@ SwSbxValue SwCalc::Prim()
else
{
nErg = VarLook( aVarName )->nValue;
- bChkPow = TRUE;
+ bChkPow = sal_True;
}
break;
@@ -1381,7 +1381,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;
@@ -1557,11 +1557,10 @@ lcl_Str2Double( const String& rCommand, xub_StrLen& rCommandPos, double& rVal,
}
/******************************************************************************
- * Methode : BOOL SwCalc::Str2Double( double& )
- * Beschreibung:
+ * Methode : sal_Bool SwCalc::Str2Double( double& )
******************************************************************************/
bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
- double& rVal, const LocaleDataWrapper* const pLclData )
+ double& rVal, const LocaleDataWrapper* const pLclData )
{
const SvtSysLocale aSysLocale;
return lcl_Str2Double( rCommand, rCommandPos, rVal,
@@ -1569,14 +1568,15 @@ bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
}
bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
- double& rVal, SwDoc* const pDoc )
+ double& rVal, SwDoc* const pDoc )
{
const SvtSysLocale aSysLocale;
::std::auto_ptr<const LocaleDataWrapper> pLclD;
if( pDoc )
{
LanguageType eLang = GetDocAppScriptLang( *pDoc );
- if( eLang != SvxLocaleToLanguage( aSysLocale.GetLocaleData().getLocale() ) )
+ if (eLang !=
+ SvxLocaleToLanguage(aSysLocale.GetLocaleData().getLocale()))
{
pLclD.reset( new LocaleDataWrapper(
::comphelper::getProcessServiceFactory(),
@@ -1592,10 +1592,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.
@@ -1637,9 +1637,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;
}
@@ -1657,7 +1657,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 f40115c68143..32457b85c960 100644
--- a/sw/source/core/bastyp/index.cxx
+++ b/sw/source/core/bastyp/index.cxx
@@ -206,7 +206,7 @@ SwIndex& SwIndex::operator=( const SwIndex& rIdx )
Remove();
pArray = rIdx.pArray;
pNext = pPrev = 0;
- bEqual = FALSE;
+ bEqual = sal_False;
}
else
bEqual = rIdx.nIndex == nIndex;
@@ -394,7 +394,7 @@ xub_StrLen SwIndex::operator-=( const SwIndex & rIndex )
|* SwIndex::operator<( const SwIndex & )
*************************************************************************/
-BOOL SwIndex::operator<( const SwIndex & rIndex ) const
+sal_Bool SwIndex::operator<( const SwIndex & rIndex ) const
{
OSL_ENSURE( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex < rIndex.nIndex;
@@ -404,7 +404,7 @@ BOOL SwIndex::operator<( const SwIndex & rIndex ) const
|* SwIndex::operator<=( const SwIndex & )
*************************************************************************/
-BOOL SwIndex::operator<=( const SwIndex & rIndex ) const
+sal_Bool SwIndex::operator<=( const SwIndex & rIndex ) const
{
OSL_ENSURE( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex <= rIndex.nIndex;
@@ -414,7 +414,7 @@ BOOL SwIndex::operator<=( const SwIndex & rIndex ) const
|* SwIndex::operator>( const SwIndex & )
*************************************************************************/
-BOOL SwIndex::operator>( const SwIndex & rIndex ) const
+sal_Bool SwIndex::operator>( const SwIndex & rIndex ) const
{
OSL_ENSURE( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex > rIndex.nIndex;
@@ -424,7 +424,7 @@ BOOL SwIndex::operator>( const SwIndex & rIndex ) const
|* SwIndex::operator>=( const SwIndex & )
*************************************************************************/
-BOOL SwIndex::operator>=( const SwIndex & rIndex ) const
+sal_Bool SwIndex::operator>=( const SwIndex & rIndex ) const
{
OSL_ENSURE( 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 5b7606d940d8..270385c63bbb 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -144,14 +144,14 @@ extern void ClearFEShellTabCols();
|* einige Bereiche fuer die Set in Collections / Nodes
|*************************************************************************/
// AttrSet-Range fuer die 2 Break-Attribute
-USHORT aBreakSetRange[] = {
+sal_uInt16 aBreakSetRange[] = {
RES_PAGEDESC, RES_BREAK,
0 };
// AttrSet-Range fuer die TxtFmtColl
// list attributes ( RES_PARATR_LIST_BEGIN - RES_PARATR_LIST_END ) are not
// included in the paragraph style's itemset.
-USHORT aTxtFmtCollSetRange[] = {
+sal_uInt16 aTxtFmtCollSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -160,7 +160,7 @@ USHORT aTxtFmtCollSetRange[] = {
};
// AttrSet-Range fuer die GrfFmtColl
-USHORT aGrfFmtCollSetRange[] = {
+sal_uInt16 aGrfFmtCollSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_GRFATR_BEGIN, RES_GRFATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
@@ -168,7 +168,7 @@ USHORT aGrfFmtCollSetRange[] = {
};
// AttrSet-Range fuer die TextNode
-USHORT aTxtNodeSetRange[] = {
+sal_uInt16 aTxtNodeSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -178,14 +178,14 @@ USHORT aTxtNodeSetRange[] = {
};
// AttrSet-Range fuer die NoTxtNode
-USHORT aNoTxtNodeSetRange[] = {
+sal_uInt16 aNoTxtNodeSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_GRFATR_BEGIN, RES_GRFATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
-USHORT aTableSetRange[] = {
+sal_uInt16 aTableSetRange[] = {
RES_FILL_ORDER, RES_FRM_SIZE,
RES_LR_SPACE, RES_BREAK,
RES_BACKGROUND, RES_SHADOW,
@@ -200,7 +200,7 @@ USHORT aTableSetRange[] = {
0
};
-USHORT aTableLineSetRange[] = {
+sal_uInt16 aTableLineSetRange[] = {
RES_FILL_ORDER, RES_FRM_SIZE,
RES_LR_SPACE, RES_UL_SPACE,
RES_BACKGROUND, RES_SHADOW,
@@ -211,7 +211,7 @@ USHORT aTableLineSetRange[] = {
0
};
-USHORT aTableBoxSetRange[] = {
+sal_uInt16 aTableBoxSetRange[] = {
RES_FILL_ORDER, RES_FRM_SIZE,
RES_LR_SPACE, RES_UL_SPACE,
RES_BACKGROUND, RES_SHADOW,
@@ -224,21 +224,21 @@ USHORT aTableBoxSetRange[] = {
};
// AttrSet-Range fuer die SwFrmFmt
-USHORT aFrmFmtSetRange[] = {
+sal_uInt16 aFrmFmtSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
// AttrSet-Range fuer die SwCharFmt
-USHORT aCharFmtSetRange[] = {
+sal_uInt16 aCharFmtSetRange[] = {
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
// AttrSet-Range fuer die character autostyles
-USHORT aCharAutoFmtSetRange[] = {
+sal_uInt16 aCharAutoFmtSetRange[] = {
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
@@ -246,7 +246,7 @@ USHORT aCharAutoFmtSetRange[] = {
};
// AttrSet-Range fuer die SwPageDescFmt
-USHORT aPgFrmFmtSetRange[] = {
+sal_uInt16 aPgFrmFmtSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
@@ -421,13 +421,13 @@ SfxItemInfo 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;
// #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* pMarkToTable = "table";
@@ -482,9 +482,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
@@ -503,10 +503,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
@@ -548,12 +548,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;
@@ -562,9 +562,9 @@ void _InitCore()
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;
aAttrTab[ RES_FRM_SIZE- POOLATTR_BEGIN ] = new SwFmtFrmSize;
@@ -588,7 +588,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;
@@ -603,9 +603,9 @@ void _InitCore()
aAttrTab[ RES_ROW_SPLIT - POOLATTR_BEGIN ] = new SwFmtRowSplit;
// #i18732#
- aAttrTab[ RES_FOLLOW_TEXT_FLOW - POOLATTR_BEGIN ] = new SwFmtFollowTextFlow( TRUE );
+ aAttrTab[ RES_FOLLOW_TEXT_FLOW - POOLATTR_BEGIN ] = new SwFmtFollowTextFlow( sal_True );
// collapsing borders #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 );
// #i28701#
// #i35017# - constant name has changed
aAttrTab[ RES_WRAP_INFLUENCE_ON_OBJPOS - POOLATTR_BEGIN ] =
@@ -656,8 +656,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 )
@@ -671,7 +671,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 )
@@ -680,7 +680,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 )
@@ -691,7 +691,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 )
@@ -699,14 +699,14 @@ void _InitCore()
// #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 )
@@ -762,7 +762,7 @@ void _FinitCore()
#if OSL_DEBUG_LEVEL > 1
//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;
@@ -807,7 +807,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;
@@ -822,7 +822,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;
}
@@ -839,7 +839,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/makefile.mk b/sw/source/core/bastyp/makefile.mk
deleted file mode 100644
index 513e34ba7635..000000000000
--- a/sw/source/core/bastyp/makefile.mk
+++ /dev/null
@@ -1,79 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=bastyp
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-CXXFILES = \
- bparr.cxx \
- breakit.cxx \
- calc.cxx \
- checkit.cxx \
- index.cxx \
- init.cxx \
- ring.cxx \
- swcache.cxx \
- swrect.cxx \
- swregion.cxx \
- swtypes.cxx \
- tabcol.cxx \
- SwSmartTagMgr.cxx
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/bparr.obj \
- $(SLO)$/checkit.obj \
- $(SLO)$/index.obj \
- $(SLO)$/ring.obj \
- $(SLO)$/swcache.obj \
- $(SLO)$/swrect.obj \
- $(SLO)$/swregion.obj
-
-EXCEPTIONSFILES = \
- $(SLO)$/SwSmartTagMgr.obj \
- $(SLO)$/breakit.obj \
- $(SLO)$/calc.obj \
- $(SLO)$/init.obj \
- $(SLO)$/swtypes.obj \
- $(SLO)$/tabcol.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index 5175d404c3b7..34502cdcc920 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -54,8 +54,8 @@ void SwCache::Check()
//Konsistenspruefung.
OSL_ENSURE( !pLast->GetNext(), "Last but not last." );
OSL_ENSURE( !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 )
@@ -68,7 +68,7 @@ void SwCache::Check()
++nCnt;
if ( pObj == pFirst )
- bFirstFound = TRUE;
+ bFirstFound = sal_True;
if ( !pObj->GetNext() )
OSL_ENSURE( pObj == pLast, "Last not Found." );
pObj = pObj->GetNext();
@@ -92,12 +92,12 @@ void SwCache::Check()
|*************************************************************************/
-SwCache::SwCache( const USHORT nInitSize, const USHORT nGrowSize
+SwCache::SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize
#if OSL_DEBUG_LEVEL > 1
, const ByteString &rNm
#endif
) :
- SwCacheObjArr( (BYTE)nInitSize, (BYTE)nGrowSize ),
+ SwCacheObjArr( (sal_uInt8)nInitSize, (sal_uInt8)nGrowSize ),
aFreePositions( 5, 5 ),
pRealFirst( 0 ),
pFirst( 0 ),
@@ -166,7 +166,7 @@ SwCache::~SwCache()
|*************************************************************************/
-void SwCache::Flush( const BYTE )
+void SwCache::Flush( const sal_uInt8 )
{
INCREMENT( nFlushCnt );
SwCacheObj *pObj = pRealFirst;
@@ -277,8 +277,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) )
@@ -301,7 +301,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 ) )
@@ -364,7 +364,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 )
@@ -383,7 +383,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 );
}
@@ -393,12 +393,12 @@ void SwCache::Delete( const void *pOwner )
|*************************************************************************/
-BOOL SwCache::Insert( SwCacheObj *pNew )
+sal_Bool SwCache::Insert( SwCacheObj *pNew )
{
CHECK;
OSL_ENSURE( !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.
@@ -410,7 +410,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 );
@@ -425,8 +425,8 @@ BOOL SwCache::Insert( SwCacheObj *pNew )
pObj = pObj->GetPrev();
if ( !pObj )
{
- OSL_ENSURE( FALSE, "Cache overflow." );
- return FALSE;
+ OSL_ENSURE( sal_False, "Cache overflow." );
+ return sal_False;
}
nPos = pObj->GetCachePos();
@@ -467,7 +467,7 @@ BOOL SwCache::Insert( SwCacheObj *pNew )
pFirst = pNew;
CHECK;
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -475,14 +475,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();
@@ -562,7 +562,7 @@ void SwCacheAccess::_Get()
|* SwCacheAccess::IsAvailable()
|*************************************************************************/
-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 b3e9d62346ec..616c375f70d1 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -147,7 +147,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();
@@ -161,7 +161,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())
@@ -171,7 +171,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())
@@ -188,12 +188,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;
}
/*************************************************************************
@@ -254,13 +254,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 7a4e12dc2d86..5b812314da95 100644
--- a/sw/source/core/bastyp/swregion.cxx
+++ b/sw/source/core/bastyp/swregion.cxx
@@ -44,9 +44,9 @@ SV_IMPL_VARARR( SwRects, SwRect );
|* SwRegionRects::SwRegionRects()
|*************************************************************************/
-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 );
@@ -56,18 +56,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() );
@@ -87,8 +87,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) ) )
{
@@ -98,7 +98,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.
@@ -167,10 +167,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();
@@ -197,7 +197,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 )
{
@@ -207,13 +207,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;
}
@@ -235,7 +235,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/swtypes.cxx b/sw/source/core/bastyp/swtypes.cxx
index 25c934b7a2f2..a683ed170c0f 100644
--- a/sw/source/core/bastyp/swtypes.cxx
+++ b/sw/source/core/bastyp/swtypes.cxx
@@ -40,7 +40,8 @@
#include <frmfmt.hxx>
#include <frmtool.hxx>
#include <ndtxt.hxx>
-#include <undobj.hxx>
+#include <UndoDelete.hxx>
+#include <UndoInsert.hxx>
#include <swtable.hxx>
#include <viscrs.hxx>
#include <fntcache.hxx>
diff --git a/sw/source/core/bastyp/tabcol.cxx b/sw/source/core/bastyp/tabcol.cxx
index 256a5fde067d..a6c943b8dcde 100644
--- a/sw/source/core/bastyp/tabcol.cxx
+++ b/sw/source/core/bastyp/tabcol.cxx
@@ -34,7 +34,7 @@
#include "tabcol.hxx"
-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/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 2712a017bace..12b32dd6a853 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -32,13 +32,14 @@
#include <bookmrk.hxx>
#include <IDocumentMarkAccess.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <doc.hxx>
#include <ndtxt.hxx>
#include <pam.hxx>
#include <swserv.hxx>
#include <sfx2/linkmgr.hxx>
#include <swtypes.hxx>
-#include <undobj.hxx>
+#include <UndoBookmark.hxx>
#include <unobookmark.hxx>
#include <rtl/random.h>
#include <xmloff/odffields.hxx>
@@ -79,14 +80,15 @@ namespace
{
SwPosition& rStart = pField->GetMarkStart();
SwPosition& rEnd = pField->GetMarkEnd();
- SwTxtNode const * const pStartTxtNode = io_pDoc->GetNodes()[rStart.nNode]->GetTxtNode();
- SwTxtNode const * const pEndTxtNode = io_pDoc->GetNodes()[rEnd.nNode]->GetTxtNode();
+ SwTxtNode const*const pStartTxtNode =
+ rStart.nNode.GetNode().GetTxtNode();
+ SwTxtNode const*const pEndTxtNode = rEnd.nNode.GetNode().GetTxtNode();
const sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(rStart.nContent.GetIndex());
xub_StrLen nEndPos = rEnd.nContent.GetIndex() == 0 ? 0 : rEnd.nContent.GetIndex() - 1;
const sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar( nEndPos );
SwPaM aStartPaM(rStart);
SwPaM aEndPaM(rEnd);
- io_pDoc->StartUndo(UNDO_UI_REPLACE, NULL);
+ io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, NULL);
if( ( ch_start != aStartMark ) && ( aEndMark != CH_TXT_ATR_FORMELEMENT ) )
{
io_pDoc->InsertString(aStartPaM, aStartMark);
@@ -97,7 +99,7 @@ namespace
io_pDoc->InsertString(aEndPaM, aEndMark);
rEnd.nContent++;
}
- io_pDoc->EndUndo(UNDO_UI_REPLACE, NULL);
+ io_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_UI_REPLACE, NULL);
};
}
@@ -232,10 +234,10 @@ namespace sw { namespace mark
void Bookmark::InitDoc(SwDoc* const io_pDoc)
{
- if(io_pDoc->DoesUndo())
+ if (io_pDoc->GetIDocumentUndoRedo().DoesUndo())
{
- io_pDoc->ClearRedo();
- io_pDoc->AppendUndo(new SwUndoInsBookmark(*this));
+ io_pDoc->GetIDocumentUndoRedo().AppendUndo(
+ new SwUndoInsBookmark(*this));
}
io_pDoc->SetModified();
}
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 810997335843..7a496a422298 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -52,8 +52,8 @@
#include<vcl/window.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 )
@@ -140,8 +140,8 @@ SwCallLink::~SwCallLink()
}
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();
// Register the Shell as dependent at the current Node. By doing this all
// attribute changes can be signaled over the link.
@@ -176,7 +176,7 @@ SwCallLink::~SwCallLink()
{
const SwpHints &rHts = ((SwTxtNode*)pCNd)->GetSwpHints();
- USHORT n;
+ sal_uInt16 n;
xub_StrLen nStart;
const xub_StrLen *pEnd;
@@ -230,7 +230,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();
@@ -247,7 +247,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 24f6b3aa0bab..b710b5db96c3 100644
--- a/sw/source/core/crsr/callnk.hxx
+++ b/sw/source/core/crsr/callnk.hxx
@@ -37,19 +37,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 aeb4de951138..7ec342cfd3bc 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -155,27 +155,42 @@ 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
OSL_ENSURE( !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;
+}
+
+
+SwPaM & SwCrsrShell::CreateNewShellCursor()
+{
+ if (HasSelection())
+ {
+ (void) CreateCrsr(); // n.b. returns old cursor
+ }
+ return *GetCrsr();
+}
+
+SwPaM & SwCrsrShell::GetCurrentShellCursor()
+{
+ return *GetCrsr();
}
// gebe den aktuellen zurueck
-SwPaM* SwCrsrShell::GetCrsr( BOOL bMakeTblCrsr ) const
+SwPaM* SwCrsrShell::GetCrsr( sal_Bool bMakeTblCrsr ) const
{
if( pTblCrsr )
{
@@ -186,7 +201,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 );
@@ -214,7 +229,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;
}
@@ -222,10 +237,10 @@ void SwCrsrShell::StartAction()
}
-void SwCrsrShell::EndAction( const BOOL bIdleEnd )
+void SwCrsrShell::EndAction( const sal_Bool bIdleEnd )
{
- BOOL bVis = bSVCrsrVis;
+ sal_Bool bVis = bSVCrsrVis;
// Idle-Formatierung ?
if( bIdleEnd && Imp()->GetRegion() )
@@ -239,8 +254,8 @@ void SwCrsrShell::EndAction( const BOOL bIdleEnd )
// 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
@@ -265,20 +280,20 @@ void SwCrsrShell::EndAction( const BOOL bIdleEnd )
{
// 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
@@ -286,19 +301,19 @@ void SwCrsrShell::EndAction( const BOOL bIdleEnd )
{
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
}
}
@@ -312,25 +327,25 @@ void SwCrsrShell::SttCrsrMove()
StartAction();
}
-void SwCrsrShell::EndCrsrMove( const BOOL bIdleEnd )
+void SwCrsrShell::EndCrsrMove( const sal_Bool bIdleEnd )
{
OSL_ENSURE( 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;
@@ -345,8 +360,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
@@ -357,25 +372,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();
// #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 );
}
}
@@ -393,11 +408,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;
@@ -413,7 +428,7 @@ void SwCrsrShell::UpdateMarkedListLevel()
{
if ( !pTxtNd->IsNumbered() )
{
- pCurCrsr->_SetInFrontOfLabel( FALSE );
+ pCurCrsr->_SetInFrontOfLabel( sal_False );
MarkListLevel( String(), 0 );
}
else if ( pCurCrsr->IsInFrontOfLabel() )
@@ -434,17 +449,17 @@ 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 );
// #i40019# UpDown should always reset the bInFrontOfLabel flag:
- bRet = SetInFrontOfLabel(FALSE) || bRet;
+ bRet = SetInFrontOfLabel(sal_False) || bRet;
if( pBlockCrsr )
pBlockCrsr->clearPoints();
@@ -458,39 +473,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 )
@@ -500,19 +515,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 )
@@ -540,9 +555,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() )
@@ -554,35 +569,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;
@@ -599,7 +614,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();
@@ -607,7 +622,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 );
@@ -616,7 +631,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 );
@@ -636,11 +651,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 |
@@ -686,9 +701,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;
}
@@ -698,7 +713,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;
@@ -721,7 +736,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;
}
@@ -743,10 +758,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!
}
}
@@ -839,7 +854,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);
@@ -859,8 +874,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 );
@@ -876,7 +891,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
@@ -885,15 +900,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;
}
@@ -977,20 +992,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() )
{
@@ -1001,12 +1016,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 )
@@ -1015,8 +1030,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
@@ -1037,7 +1052,7 @@ void SwCrsrShell::GetPageNum( USHORT &rnPhyNum, USHORT &rnVirtNum,
}
-USHORT SwCrsrShell::GetNextPrevPageNum( BOOL bNext )
+sal_uInt16 SwCrsrShell::GetNextPrevPageNum( sal_Bool bNext )
{
SET_CURR_SHELL( this );
@@ -1078,7 +1093,7 @@ USHORT SwCrsrShell::GetNextPrevPageNum( BOOL bNext )
}
-USHORT SwCrsrShell::GetPageCnt()
+sal_uInt16 SwCrsrShell::GetPageCnt()
{
SET_CURR_SHELL( this );
// gebe die Anzahl der Seiten zurueck
@@ -1088,11 +1103,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
@@ -1104,17 +1119,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
@@ -1127,7 +1142,7 @@ BOOL SwCrsrShell::GoPrevCrsr()
pCurCrsr->Show();
}
- return TRUE;
+ return sal_True;
}
@@ -1138,11 +1153,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();
}
@@ -1172,13 +1187,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();
@@ -1192,9 +1207,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.
@@ -1286,7 +1301,7 @@ class SwNotifyAccAboutInvalidTextSelections
}
};
// <--
-void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
+void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
{
SET_CURR_SHELL( this );
@@ -1298,7 +1313,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 !!
}
@@ -1307,7 +1322,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
if ( bIgnoreReadonly )
{
- bIgnoreReadonly = FALSE;
+ bIgnoreReadonly = sal_False;
eFlags |= SwCrsrShell::READONLY;
}
@@ -1323,8 +1338,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() );
@@ -1361,7 +1376,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() );
OSL_ENSURE( pMarkTblFrm, "Tabelle Crsr nicht im Content ??" );
if ( pMarkTblFrm )
@@ -1416,7 +1431,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() );
@@ -1485,7 +1500,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() &&
@@ -1499,14 +1514,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;
@@ -1515,12 +1530,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!
}
}
@@ -1563,15 +1578,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
@@ -1597,20 +1612,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;
@@ -1619,16 +1634,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 );
@@ -1637,7 +1652,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();
@@ -1683,7 +1698,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();
@@ -1705,7 +1720,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;
}
@@ -1890,20 +1905,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;
@@ -1944,12 +1959,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;
}
/*
@@ -1969,10 +1984,10 @@ void SwCrsrShell::Combine()
if( pCrsrStk->HasMark() ) // nur wenn GetMark gesetzt wurde
{
#if OSL_DEBUG_LEVEL > 1
- if( !CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, TRUE ))
+ if( !CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, sal_True ))
OSL_ENSURE( !this, "StackCrsr & akt. Crsr nicht in gleicher Section." );
#else
- CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, TRUE );
+ CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, sal_True );
#endif
// kopiere das GetMark
if( !pCurCrsr->HasMark() )
@@ -1988,7 +2003,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
@@ -2013,7 +2028,7 @@ void SwCrsrShell::HideCrsrs()
-void SwCrsrShell::ShowCrsrs( BOOL bCrsrVis )
+void SwCrsrShell::ShowCrsrs( sal_Bool bCrsrVis )
{
if( !bHasFocus || bAllProtect || bBasicHideCrsr )
return;
@@ -2033,7 +2048,7 @@ void SwCrsrShell::ShowCrsr()
{
if( !bBasicHideCrsr )
{
- bSVCrsrVis = TRUE;
+ bSVCrsrVis = sal_True;
UpdateCrsr();
}
}
@@ -2043,7 +2058,7 @@ void SwCrsrShell::HideCrsr()
{
if( !bBasicHideCrsr )
{
- bSVCrsrVis = FALSE;
+ bSVCrsrVis = sal_False;
// evt. die sel. Bereiche aufheben !!
SET_CURR_SHELL( this );
pVisCrsr->Hide();
@@ -2055,25 +2070,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;
@@ -2082,16 +2097,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;
}
@@ -2103,11 +2118,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 ||
@@ -2115,7 +2130,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();
@@ -2129,12 +2144,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 );
}
@@ -2143,12 +2158,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
}
}
@@ -2190,7 +2205,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;
@@ -2214,10 +2229,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();
@@ -2229,47 +2244,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() )
@@ -2280,7 +2295,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 ))
@@ -2298,13 +2313,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() );
@@ -2316,10 +2331,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 )
{
@@ -2332,10 +2347,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 );
@@ -2345,7 +2360,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();
@@ -2361,10 +2376,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();
@@ -2376,7 +2391,7 @@ BOOL SwCrsrShell::ParkTblCrsr()
*pCurCrsr->GetMark() = *pCurCrsr->GetPoint() = *pTblCrsr->GetPoint();
pCurCrsr->DeleteMark();
- return TRUE;
+ return sal_True;
}
/***********************************************************************
@@ -2394,7 +2409,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 ?
@@ -2415,22 +2430,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 )
@@ -2531,9 +2546,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 );
mbMacroExecAllowed = rShell.IsMacroExecAllowed();
}
@@ -2570,9 +2585,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 );
mbMacroExecAllowed = true;
@@ -2627,13 +2642,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 <
@@ -2641,7 +2656,7 @@ BOOL SwCrsrShell::ShouldWait() const
}
-USHORT SwCrsrShell::UpdateTblSelBoxes()
+sal_uInt16 SwCrsrShell::UpdateTblSelBoxes()
{
if( pTblCrsr && ( pTblCrsr->IsChgd() || !pTblCrsr->GetBoxesCount() ))
GetLayout()->MakeTblCrsrs( *pTblCrsr );
@@ -2685,18 +2700,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 ??
{
OSL_ENSURE( !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() )
@@ -2704,12 +2719,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() )
{
@@ -2719,17 +2734,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();
}
@@ -2742,7 +2757,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.)
@@ -2785,15 +2800,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
@@ -2802,14 +2817,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
@@ -2817,7 +2832,7 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
}
else
{
- bOk = TRUE;
+ bOk = sal_True;
break; // eine nicht geschuetzte Zelle gef.
}
}
@@ -2825,13 +2840,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 );
@@ -2856,7 +2871,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();
@@ -2873,13 +2888,13 @@ void SwCrsrShell::NewCoreSelection()
}
-BOOL SwCrsrShell::IsCrsrReadonly() const
+sal_Bool SwCrsrShell::IsCrsrReadonly() const
{
if ( GetViewOptions()->IsReadonly() ||
// Formular view
GetViewOptions()->IsFormView() )
{
- SwFrm *pFrm = GetCurrFrm( FALSE );
+ SwFrm *pFrm = GetCurrFrm( sal_False );
const SwFlyFrm* pFly;
const SwSection* pSection;
@@ -2889,24 +2904,24 @@ BOOL SwCrsrShell::IsCrsrReadonly() const
!pFly->Lower()->IsNoTxtFrm() &&
!GetDrawView()->GetMarkedObjectList().GetMarkCount() )
{
- return FALSE;
+ return sal_False;
}
// 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() ||
@@ -2925,9 +2940,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() || GetViewOptions()->IsFormView() )
{
if( pTblCrsr )
@@ -2939,16 +2954,16 @@ BOOL SwCrsrShell::HasReadonlySel() const
do {
if( pCrsr->HasReadonlySel( 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() )
@@ -2982,13 +2997,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
@@ -3029,39 +3044,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 )
{
@@ -3069,7 +3084,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();
@@ -3239,7 +3254,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 );
@@ -3261,7 +3276,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;
@@ -3310,7 +3325,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 )
{
@@ -3354,7 +3369,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 )
{
@@ -3374,7 +3389,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
@@ -3405,16 +3420,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 - 1;
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 f14608eda0a5..610b3f988a3a 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -38,6 +38,7 @@
#include <svx/svdobj.hxx>
#include <crsrsh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pagefrm.hxx>
#include <cntfrm.hxx>
#include <rootfrm.hxx>
@@ -80,9 +81,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,
@@ -120,9 +121,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,
@@ -161,7 +162,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() )
@@ -190,7 +191,7 @@ BOOL SwCrsrShell::GotoHeaderTxt()
// springe aus dem Content zum Footer
-BOOL SwCrsrShell::GotoFooterTxt()
+sal_Bool SwCrsrShell::GotoFooterTxt()
{
const SwPageFrm* pFrm = GetCurrFrm()->FindPageFrm();
if( pFrm )
@@ -226,9 +227,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 );
@@ -238,7 +239,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 ) )
{
@@ -277,7 +278,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
@@ -301,13 +302,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;
@@ -348,13 +349,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;
@@ -395,12 +396,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.
@@ -446,12 +447,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;
@@ -474,15 +475,15 @@ 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;
const SwTableBox* pTBox;
- USHORT n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount( RES_BOXATR_FORMULA );
+ sal_uInt32 n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount2( RES_BOXATR_FORMULA );
for( n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem(
+ if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2(
RES_BOXATR_FORMULA, n ) ) &&
0 != (pTBox = ((SwTblBoxFormula*)pItem)->GetTableBox() ) &&
pTBox->GetSttNd() &&
@@ -493,7 +494,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 );
@@ -503,7 +504,7 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors )
: ( aCmp < aCurGEF && aFndGEF < aCmp ))
{
aFndGEF = aCmp;
- bFnd = TRUE;
+ bFnd = sal_True;
}
}
}
@@ -527,12 +528,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;
@@ -544,21 +545,21 @@ 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;
const SwCntntFrm* pCFrm;
const SwTxtNode* pTxtNd;
const SwTxtTOXMark* pTxtTOX;
- USHORT n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount( RES_TXTATR_TOXMARK );
+ sal_uInt32 n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount2( RES_TXTATR_TOXMARK );
for( n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem(
+ if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2(
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.
@@ -569,7 +570,7 @@ BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext )
: ( aCmp < aCurGEF && aFndGEF < aCmp ))
{
aFndGEF = aCmp;
- bFnd = TRUE;
+ bFnd = sal_True;
}
}
}
@@ -619,14 +620,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())
@@ -636,7 +637,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(
@@ -648,8 +649,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 );
@@ -657,7 +658,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() );
@@ -666,22 +667,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() );
@@ -689,9 +690,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
@@ -706,14 +707,13 @@ 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(
(SwDateTimeFieldType*)pDoc->GetSysFldType( RES_DATETIMEFLD ) ) );
- pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex(),
- pDoc->IsClipBoard() );
+ pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex() );
pTxtFld->ChgTxtNode( pTNd );
}
@@ -722,10 +722,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();
@@ -737,13 +737,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 );
@@ -753,7 +753,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);
@@ -761,9 +761,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 );
@@ -784,7 +784,7 @@ BOOL SwCrsrShell::GotoFld( const SwFmtFld& rFld )
}
-void SwCrsrShell::GotoOutline( USHORT nIdx )
+void SwCrsrShell::GotoOutline( sal_uInt16 nIdx )
{
SwCursor* pCrsr = getShellCrsr( true );
@@ -802,7 +802,7 @@ void SwCrsrShell::GotoOutline( USHORT nIdx )
}
-BOOL SwCrsrShell::GotoOutline( const String& rName )
+sal_Bool SwCrsrShell::GotoOutline( const String& rName )
{
SwCursor* pCrsr = getShellCrsr( true );
@@ -810,29 +810,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 ];
@@ -842,30 +842,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
@@ -883,13 +883,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
@@ -905,13 +905,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
@@ -919,7 +919,7 @@ BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
if( nSttPos > nEndPos ) // sollte jemand das vertauscht haben?
{
OSL_ENSURE( !this, "Start- > Ende-Position im Array" );
- USHORT nTmp = nSttPos;
+ sal_uInt16 nTmp = nSttPos;
nSttPos = nEndPos;
nEndPos = nTmp;
}
@@ -957,7 +957,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;
@@ -965,14 +965,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() )
@@ -983,26 +983,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() )
{
@@ -1013,16 +1013,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();
@@ -1034,14 +1034,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#
@@ -1069,17 +1069,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 )
{
@@ -1089,7 +1089,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();
}
@@ -1153,7 +1153,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
rCntntAtPos.aFnd.pFld = pFld;
rCntntAtPos.pFndTxtAttr = pTxtAttr;
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FIELD;
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -1164,7 +1164,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;
}
}
@@ -1173,12 +1173,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;
@@ -1186,7 +1186,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,
@@ -1194,19 +1194,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 )
@@ -1251,7 +1251,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
if( pTxtAttr )
{
- bRet = TRUE;
+ bRet = sal_True;
if( bSetCrsr )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
@@ -1260,7 +1260,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();
}
@@ -1297,7 +1297,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 );
@@ -1306,7 +1306,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();
}
@@ -1334,7 +1334,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 );
@@ -1358,12 +1358,12 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
pSttNd->GetIndex() )) &&
#if OSL_DEBUG_LEVEL > 1
( 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
)
{
@@ -1397,7 +1397,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,
@@ -1405,7 +1405,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();
}
@@ -1432,7 +1432,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();
@@ -1481,7 +1481,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 ))
{
@@ -1507,7 +1507,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
+= sAttrs;
}
}
- bRet = TRUE;
+ bRet = sal_True;
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_CURR_ATTRS;
}
#endif
@@ -1547,7 +1547,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 )
@@ -1574,7 +1574,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
@@ -1615,11 +1615,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() )
{
@@ -1648,7 +1648,7 @@ BOOL SwCrsrShell::SelectTxtAttr( USHORT nWhich, BOOL bExpand,
if( !pCurCrsr->IsSelOvr() )
{
UpdateCrsr();
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -1656,9 +1656,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 );
@@ -1683,14 +1683,15 @@ 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() )
+ if (!IsTableMode() && !HasSelection()
+ && GetDoc()->GetIDocumentUndoRedo().DoesUndo())
{
Point aPt( rPt );
SwPosition aPos( *pCurCrsr->GetPoint() );
@@ -1704,18 +1705,19 @@ 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() )
+ if (!IsTableMode() && !HasSelection()
+ && GetDoc()->GetIDocumentUndoRedo().DoesUndo())
{
Point aPt( rPt );
SwPosition aPos( *pCurCrsr->GetPoint() );
@@ -1739,7 +1741,7 @@ BOOL SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
pCNd && pCNd->Len() )
nUndoId = UNDO_EMPTY;
- GetDoc()->StartUndo( nUndoId, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( nUndoId, NULL );
SwTxtFmtColl* pNextFmt = 0;
SwTxtNode* pTNd = pCNd->GetTxtNode();
@@ -1760,7 +1762,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 )
@@ -1842,10 +1844,10 @@ BOOL SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
break;
}
- GetDoc()->EndUndo( nUndoId, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( nUndoId, NULL );
EndAction();
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -1887,7 +1889,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
@@ -1902,7 +1904,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 );
@@ -1925,7 +1927,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() );
@@ -1955,7 +1957,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() )
@@ -1964,15 +1966,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;
@@ -1991,7 +1993,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 ))
{
@@ -2026,7 +2028,7 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
break;
default:
- bDel = FALSE;
+ bDel = sal_False;
}
if( bDel )
@@ -2040,7 +2042,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 ||
@@ -2051,7 +2053,7 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
{
// neuen Cursor erzeugen
CreateCrsr();
- bCheck = TRUE;
+ bCheck = sal_True;
}
nArrPos = nFndPos;
}
@@ -2067,12 +2069,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 ) );
@@ -2089,7 +2091,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 ] );
@@ -2125,13 +2127,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() ) )
@@ -2148,7 +2150,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 )
@@ -2170,7 +2172,7 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext )
{
UpdateCrsr( SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|
SwCrsrShell::READONLY );
- bRet = TRUE;
+ bRet = sal_True;
}
}
// find a draw object ?
@@ -2179,16 +2181,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 9f9a8d474e9a..0c28f43c0965 100644
--- a/sw/source/core/crsr/crstrvl1.cxx
+++ b/sw/source/core/crsr/crstrvl1.cxx
@@ -34,72 +34,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 4e169f68188b..d0b1a455f73a 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -46,13 +46,14 @@
#include <fchrfmt.hxx>
#include <charfmt.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <swcrsr.hxx>
#include <editsh.hxx>
#include <ndtxt.hxx>
#include <pamtyp.hxx>
#include <swundo.hxx>
#include <crsskip.hxx>
-#include <undobj.hxx>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
@@ -83,7 +84,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() )
@@ -97,7 +98,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 )
@@ -113,14 +114,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 );
@@ -143,15 +144,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)))
@@ -159,9 +160,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;
}
@@ -169,7 +170,7 @@ BOOL lcl_Search( const SwTxtNode& rTxtNd, SwPaM& rPam,
struct _SwSrchChrAttr
{
- USHORT nWhich;
+ sal_uInt16 nWhich;
xub_StrLen nStt, nEnd;
_SwSrchChrAttr( const SfxPoolItem& rItem,
@@ -182,11 +183,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 );
@@ -195,7 +196,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();
@@ -215,7 +216,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;
@@ -270,9 +271,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 ) )
@@ -323,7 +324,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;
@@ -338,7 +339,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;
@@ -348,10 +349,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
@@ -401,7 +402,7 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
}
}
- BOOL bContinue = FALSE;
+ sal_Bool bContinue = sal_False;
if( SFX_ITEM_DONTCARE == eState )
{
@@ -418,7 +419,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 ?
@@ -426,7 +427,7 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
{
pFndArr[ nWhch - nArrStart ] = aTmp;
++nFound;
- bContinue = TRUE;
+ bContinue = sal_True;
}
// tja, dann muss es auf den Stack
@@ -455,7 +456,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;
@@ -478,7 +479,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;
@@ -493,7 +494,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;
@@ -503,10 +504,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
@@ -555,7 +556,7 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
}
}
- BOOL bContinue = FALSE;
+ sal_Bool bContinue = sal_False;
if( SFX_ITEM_DONTCARE == eState )
{
// wird Attribut gueltig ?
@@ -571,7 +572,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 ?
@@ -579,7 +580,7 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
{
pFndArr[ nWhch - nArrStart ] = aTmp;
++nFound;
- bContinue = TRUE;
+ bContinue = sal_True;
}
// tja, dann muss es auf den Stack
@@ -608,7 +609,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;
@@ -624,7 +625,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;
@@ -636,7 +637,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;
@@ -647,9 +648,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 )
@@ -688,16 +689,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.
@@ -710,8 +711,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;
@@ -721,8 +722,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;
}
}
@@ -741,16 +742,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;
}
@@ -762,16 +763,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.
@@ -785,8 +786,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
@@ -797,8 +798,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;
}
}
@@ -821,32 +822,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 ))
@@ -854,36 +855,36 @@ 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
{
nWhich = pItem->Which();
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;
@@ -893,10 +894,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();
@@ -917,7 +918,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))
@@ -935,7 +936,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
@@ -943,7 +944,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;
}
}
@@ -959,14 +960,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;
@@ -974,7 +975,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)
@@ -987,10 +988,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();
@@ -1013,7 +1014,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
@@ -1040,7 +1041,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;
}
}
@@ -1058,13 +1059,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 ),
@@ -1072,22 +1073,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 ?
{
@@ -1095,7 +1096,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?
{
@@ -1104,7 +1105,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
@@ -1129,7 +1130,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 ) &&
@@ -1200,11 +1201,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() )
@@ -1232,8 +1233,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 )
{
@@ -1242,23 +1243,27 @@ 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;
- if( bSttUndo )
- pDoc->StartUndo( UNDO_REPLACE, NULL );
+ bool const bStartUndo = pDoc->GetIDocumentUndoRedo().DoesUndo() && bReplace;
+ if (bStartUndo)
+ {
+ pDoc->GetIDocumentUndoRedo().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();
- if( bSttUndo )
- pDoc->EndUndo( UNDO_REPLACE, NULL );
+ if (bStartUndo)
+ {
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_REPLACE, NULL );
+ }
return nRet;
}
diff --git a/sw/source/core/crsr/findcoll.cxx b/sw/source/core/crsr/findcoll.cxx
index f3b5cba3e2b3..b3f3f39e8a97 100644
--- a/sw/source/core/crsr/findcoll.cxx
+++ b/sw/source/core/crsr/findcoll.cxx
@@ -29,14 +29,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <tools/resid.hxx>
#include <swcrsr.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pamtyp.hxx>
#include <swundo.hxx>
-#include <undobj.hxx>
+#include <SwRewriter.hxx>
#include <comcore.hrc>
-#include <tools/resid.hxx>
//------------------ Methoden der CrsrShell ---------------------------
@@ -49,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;
@@ -81,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 !!
@@ -90,27 +91,31 @@ ULONG SwCursor::Find( const SwTxtFmtColl& rFmtColl,
Link aLnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- BOOL bSttUndo = pDoc->DoesUndo() && pReplFmtColl;
- if( bSttUndo )
+ bool const bStartUndo =
+ pDoc->GetIDocumentUndoRedo().DoesUndo() && pReplFmtColl;
+ if (bStartUndo)
{
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, rFmtColl.GetName());
aRewriter.AddRule(UNDO_ARG2, SW_RES(STR_YIELDS));
aRewriter.AddRule(UNDO_ARG3, pReplFmtColl->GetName());
- pDoc->StartUndo( UNDO_UI_REPLACE_STYLE, &aRewriter );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_UI_REPLACE_STYLE,
+ &aRewriter );
}
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 )
pDoc->SetModified();
- if( bSttUndo )
- pDoc->EndUndo( UNDO_UI_REPLACE_STYLE, NULL );
+ if (bStartUndo)
+ {
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, 0);
+ }
return nRet;
}
diff --git a/sw/source/core/crsr/findfmt.cxx b/sw/source/core/crsr/findfmt.cxx
index e9a4fe7485b5..7a548c393f33 100644
--- a/sw/source/core/crsr/findfmt.cxx
+++ b/sw/source/core/crsr/findfmt.cxx
@@ -34,11 +34,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
@@ -46,17 +46,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 4964ee905a71..f53f2ef23a98 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -28,15 +28,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/util/SearchFlags.hpp>
-
-
#define _SVSTDARR_USHORTS
#define _SVSTDARR_ULONGS
#include <svl/svstdarr.hxx>
+
#include <vcl/svapp.hxx>
+#include <vcl/window.hxx>
+
#include <txatritr.hxx>
#include <fldbas.hxx>
#include <fmtfld.hxx>
@@ -44,15 +46,16 @@
#include <txtfld.hxx>
#include <swcrsr.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pamtyp.hxx>
#include <ndtxt.hxx>
#include <swundo.hxx>
+#include <UndoInsert.hxx>
#include <breakit.hxx>
#include <docsh.hxx>
#include <PostItMgr.hxx>
#include <viewsh.hxx>
-#include <vcl/window.hxx>
using namespace ::com::sun::star;
using namespace util;
@@ -69,7 +72,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;
@@ -142,10 +145,9 @@ 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(
- rNd.GetDoc()->IsClipBoard()).Len());
+ ->GetFld().GetFld()->ExpandField(true).Len());
if ( bEmpty && nStart == nAkt )
{
rArr.Insert( nAkt, rArr.Count() );
@@ -178,7 +180,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 )
@@ -224,15 +226,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;
@@ -243,10 +245,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();
@@ -254,14 +256,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;
@@ -270,11 +272,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;
@@ -420,7 +422,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;
@@ -452,8 +454,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() )
@@ -524,7 +526,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;
}
@@ -548,7 +550,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;
}
@@ -562,13 +564,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();
};
@@ -578,12 +580,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 );
if( bFnd && bReplace ) // String ersetzen ??
@@ -631,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 !!
@@ -641,21 +643,27 @@ ULONG SwCursor::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes,
Link aLnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- BOOL bSttUndo = pDoc->DoesUndo() && bReplace;
- if( bSttUndo )
- pDoc->StartUndo( UNDO_REPLACE, NULL );
+ bool const bStartUndo = pDoc->GetIDocumentUndoRedo().DoesUndo() && bReplace;
+ if (bStartUndo)
+ {
+ pDoc->GetIDocumentUndoRedo().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();
- if( bSttUndo )
- pDoc->EndUndo( UNDO_REPLACE, NULL );
+ if (bStartUndo)
+ {
+ SwRewriter rewriter(MakeUndoReplaceRewriter(
+ nRet, rSearchOpt.searchString, rSearchOpt.replaceString));
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_REPLACE, & rewriter );
+ }
return nRet;
}
@@ -665,8 +673,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/makefile.mk b/sw/source/core/crsr/makefile.mk
deleted file mode 100644
index c5c59b8ba120..000000000000
--- a/sw/source/core/crsr/makefile.mk
+++ /dev/null
@@ -1,80 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=crsr
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS+=-Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES= \
- $(SLO)$/BlockCursor.obj \
- $(SLO)$/bookmrk.obj \
- $(SLO)$/callnk.obj \
- $(SLO)$/crbm.obj \
- $(SLO)$/crossrefbookmark.obj \
- $(SLO)$/crsrsh.obj \
- $(SLO)$/crstrvl.obj \
- $(SLO)$/crstrvl1.obj \
- $(SLO)$/findattr.obj \
- $(SLO)$/findcoll.obj \
- $(SLO)$/findfmt.obj \
- $(SLO)$/findtxt.obj \
- $(SLO)$/pam.obj \
- $(SLO)$/paminit.obj \
- $(SLO)$/swcrsr.obj \
- $(SLO)$/trvlcol.obj \
- $(SLO)$/trvlfnfl.obj \
- $(SLO)$/trvlreg.obj \
- $(SLO)$/trvltbl.obj \
- $(SLO)$/unocrsr.obj \
- $(SLO)$/viscrs.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-.IF "$(mydebug)" != ""
-SLOFILES += \
- $(SLO)$/pamio.obj
-.ENDIF
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 902e0f7d0c93..24a51cd362e1 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -57,7 +57,7 @@
#include <xmloff/odffields.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();
}
@@ -105,58 +105,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 );
}
@@ -258,9 +258,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 );
@@ -268,14 +268,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();
@@ -284,29 +284,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 )
@@ -328,34 +328,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;
@@ -364,14 +364,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;
@@ -561,9 +561,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;
@@ -612,7 +612,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) ||
@@ -624,7 +624,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)
@@ -634,7 +634,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;
@@ -667,15 +667,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;
@@ -685,31 +685,31 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
if( pFrm && ( pFrm->IsProtected() ||
( bFormView && 0 == ( pSttEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
- bRet = TRUE;
+ bRet = sal_True;
else if( pNd )
{
const SwSectionNode* pSNd = pNd->GetSectionNode();
if( pSNd && ( pSNd->GetSection().IsProtectFlag() ||
(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;
if( pFrm && ( pFrm->IsProtected() ||
( bFormView && 0 == ( pEndEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
- bRet = TRUE;
+ bRet = sal_True;
else if( pNd )
{
const SwSectionNode* pSNd = pNd->GetSectionNode();
if( pSNd && ( pSNd->GetSection().IsProtectFlag() ||
(bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
- bRet = TRUE;
+ bRet = sal_True;
}
if ( !bRet && bFormView )
@@ -717,18 +717,18 @@ 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;
}
// oder sollte eine geschuetzte Section innerhalb der
// 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;
}
@@ -739,14 +739,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);
OSL_ENSURE( 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() )
{
@@ -756,10 +756,10 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
if( CONTENT_SECTION == rSect.GetType() )
{
RestoreSavePos();
- return TRUE;
+ return sal_True;
}
*/
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -788,7 +788,7 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
{
// Unhandled fieldmarks case shouldn't be edited manually to avoid breaking anything
if ( ( pA == pB ) && bUnhandledMark )
- bRet = TRUE;
+ bRet = sal_True;
else
{
// Form protection case
@@ -816,8 +816,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;
@@ -826,7 +826,7 @@ SwCntntNode* GetNode( SwPaM & rPam, BOOL& rbFirst, SwMoveFn fnMove,
{
if( rbFirst )
{
- rbFirst = FALSE;
+ rbFirst = sal_False;
pNd = rPam.GetCntntNode();
if( pNd )
{
@@ -849,18 +849,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 ));
@@ -910,7 +910,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 );
}
@@ -920,7 +920,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-- );
@@ -936,35 +936,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 ) );
@@ -972,35 +972,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 );
}
@@ -1009,7 +1009,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 ) )
{
@@ -1018,13 +1018,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();
@@ -1036,24 +1036,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 ) )
{
@@ -1062,14 +1062,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
@@ -1077,10 +1077,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,
@@ -1089,7 +1089,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
@@ -1100,17 +1100,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
@@ -1121,13 +1121,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;
}
String SwPaM::GetTxt() const
@@ -1178,7 +1178,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());
}
@@ -1197,7 +1197,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 f423bdc335c0..726c7fbbe8ac 100644
--- a/sw/source/core/crsr/paminit.cxx
+++ b/sw/source/core/crsr/paminit.cxx
@@ -76,9 +76,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;
@@ -87,10 +87,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 93a6e68706ba..68571ba25b20 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -44,6 +44,7 @@
#include <swcrsr.hxx>
#include <unocrsr.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <ndtxt.hxx>
#include <section.hxx>
@@ -66,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 );
}
@@ -88,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
@@ -158,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();
}
@@ -196,7 +197,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();
@@ -216,7 +217,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 );
@@ -226,17 +227,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
@@ -256,7 +257,7 @@ BOOL SwCursor::IsSelOvr( int eFlags )
{
// dann wars das schon
RestoreSavePos();
- return TRUE;
+ return sal_True;
}
// dann setze den Cursor auf die neue Position:
@@ -274,14 +275,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() ) )
@@ -298,32 +299,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);
OSL_ENSURE( 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
@@ -332,7 +333,7 @@ BOOL SwCursor::IsSelOvr( int eFlags )
if( CONTENT_SECTION == rSect.GetType() )
{
RestoreSavePos();
- return TRUE;
+ return sal_True;
}
}
}
@@ -384,7 +385,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;
}
}
@@ -393,7 +394,7 @@ BOOL SwCursor::IsSelOvr( int eFlags )
{
DeleteMark();
RestoreSavePos();
- return TRUE; // ohne Frames geht gar nichts!
+ return sal_True; // ohne Frames geht gar nichts!
}
}
@@ -402,19 +403,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();
@@ -424,21 +425,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 !!
@@ -446,14 +447,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;
@@ -466,8 +467,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)
@@ -479,7 +480,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();
@@ -490,21 +491,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 )
@@ -514,20 +515,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;
@@ -542,11 +543,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!
@@ -556,7 +557,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
@@ -573,7 +574,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() )
@@ -597,7 +598,7 @@ SetNextCrsr:
if( pTmpCNd )
{
GetPoint()->nContent.Assign( pTmpCNd, 0 );
- return FALSE;
+ return sal_False;
}
return IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
@@ -614,12 +615,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;
}
@@ -634,7 +635,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() )
@@ -658,7 +659,7 @@ SetPrevCrsr:
if( pTmpCNd )
{
GetPoint()->nContent.Assign( pTmpCNd, 0 );
- return FALSE;
+ return sal_False;
}
return IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
@@ -674,18 +675,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();
@@ -694,23 +695,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* ) {}
@@ -732,22 +733,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();
+ bool const bDoesUndo = pDoc->GetIDocumentUndoRedo().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() ))
@@ -797,25 +798,26 @@ ULONG lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
if( !( eFndRngs & FND_IN_SELALL) )
{
- bEnde = TRUE;
+ bEnde = sal_True;
break;
}
- if( coSrchRplcThreshold == nFound && pDoc->DoesUndo()
+ if ((coSrchRplcThreshold == nFound)
+ && pDoc->GetIDocumentUndoRedo().DoesUndo()
&& rParas.IsReplaceMode())
{
short nRet = pCurCrsr->MaxReplaceArived();
if( RET_YES == nRet )
{
- pDoc->DelAllUndoObj();
- pDoc->DoUndo( FALSE );
+ pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
}
else
{
- bEnde = TRUE;
+ bEnde = sal_True;
if(RET_CANCEL == nRet)
{
- bCancel = TRUE;
+ bCancel = sal_True;
//unwind() ??
}
break;
@@ -853,7 +855,7 @@ ULONG lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
pFndRing = pCurCrsr->Create();
delete pPHdl;
- pDoc->DoUndo( bDoesUndo );
+ pDoc->GetIDocumentUndoRedo().DoUndo(bDoesUndo);
return nFound;
}
@@ -862,7 +864,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();
@@ -872,18 +874,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();
@@ -894,7 +896,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();
@@ -904,18 +906,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();
@@ -925,20 +927,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();
@@ -1034,8 +1036,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 );
@@ -1090,7 +1092,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();
@@ -1104,18 +1106,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:
@@ -1138,49 +1140,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() )
{
@@ -1193,9 +1195,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() )
{
@@ -1209,9 +1211,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() )
{
@@ -1220,7 +1222,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 &&
@@ -1234,9 +1236,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;
@@ -1251,9 +1253,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() )
{
@@ -1263,21 +1265,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() )
{
@@ -1287,22 +1289,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() )
{
@@ -1318,15 +1320,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() )
{
@@ -1345,18 +1347,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()) )
@@ -1388,7 +1390,7 @@ BOOL SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt )
GetMark()->nContent = rEnd.nContent;
GetMark()->nContent--; //Don't select the end delimiter
}
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -1407,7 +1409,7 @@ BOOL SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt )
SetMark();
GetMark()->nContent = (xub_StrLen)aBndry.startPos;
if( !IsSelOvr() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -1434,7 +1436,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 ];
@@ -1456,9 +1458,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() )
{
@@ -1486,7 +1488,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;
@@ -1497,7 +1499,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,
@@ -1512,16 +1514,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())
@@ -1557,14 +1559,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 );
@@ -1574,7 +1576,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;
@@ -1597,7 +1599,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 );
@@ -1621,8 +1623,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();
@@ -1672,12 +1674,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 )
{
@@ -1713,7 +1715,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 )
{
@@ -1747,7 +1749,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 );
}
@@ -1767,8 +1769,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 )
{
@@ -1782,7 +1784,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);
@@ -1790,15 +1792,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;
@@ -1821,10 +1823,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 )
{
@@ -1832,7 +1834,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();
OSL_ENSURE( pTblNd, "pTblCrsr without SwTableNode?" );
if ( pTblNd ) // safety first
@@ -1879,7 +1881,7 @@ BOOL SwCursor::UpDown( BOOL bUp, USHORT nCnt,
}
pFrm->GetCrsrOfst( GetPoint(), aPt, &eTmpState );
}
- bRet = TRUE;
+ bRet = sal_True;
}
else
*GetPoint() = aOldPos;
@@ -1890,7 +1892,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() );
@@ -1903,9 +1905,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 )
@@ -1920,16 +1922,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 );
@@ -1937,11 +1939,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
@@ -1959,7 +1961,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();
@@ -1974,7 +1976,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());
@@ -1992,20 +1994,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 ) );
@@ -2022,9 +2024,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 )
{
@@ -2043,7 +2045,7 @@ BOOL SwCursor::GotoTblBox( const String& rName )
return bRet;
}
-BOOL SwCursor::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
+sal_Bool SwCursor::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
{
//for optimization test something before
const SwNode* pNd = &GetPoint()->nNode.GetNode();
@@ -2078,18 +2080,18 @@ 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 );
}
@@ -2109,8 +2111,8 @@ void SwCursor::RestoreSavePos()
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;
}
@@ -2118,32 +2120,32 @@ 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();
+ sal_uInt16 nO = rTmp.Count();
if( nO > 0 )
{
nO--;
- USHORT nU = 0;
+ sal_uInt16 nU = 0;
while( nU <= nO )
{
- USHORT nM = nU + ( nO - nU ) / 2;
+ sal_uInt16 nM = nU + ( nO - nU ) / 2;
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;
}
@@ -2158,10 +2160,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.
@@ -2170,22 +2172,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() )
@@ -2194,7 +2196,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() )
@@ -2204,7 +2206,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
aTmp.Remove( nPos );
}
else
- bDel = TRUE;
+ bDel = sal_True;
pCur = (SwPaM*)pCur->GetNext();
if( bDel )
@@ -2227,7 +2229,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
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() )
@@ -2247,7 +2249,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
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() );
}
@@ -2260,14 +2262,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();
@@ -2287,7 +2289,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 );
@@ -2314,16 +2316,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;
}
@@ -2343,18 +2345,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 6dafd069c86c..855b2d26b495 100644
--- a/sw/source/core/crsr/trvlcol.cxx
+++ b/sw/source/core/crsr/trvlcol.cxx
@@ -92,9 +92,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();
@@ -118,11 +118,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 550717942c1f..c2ead9272ea0 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -48,21 +48,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)
@@ -76,7 +76,7 @@ BOOL SwCursor::GotoFtnTxt()
SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection(
&GetPoint()->nNode,
- TRUE, !IsReadOnlyAvailable() );
+ sal_True, !IsReadOnlyAvailable() );
if( pCNd )
{
GetPoint()->nContent.Assign( pCNd, 0 );
@@ -87,9 +87,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() ?
@@ -135,7 +135,7 @@ BOOL SwCrsrShell::GotoFtnTxt()
}
-BOOL SwCursor::GotoFtnAnchor()
+sal_Bool SwCursor::GotoFtnAnchor()
{
// springe aus der Fussnote zum Anker
const SwNode* pSttNd = GetNode()->FindFootnoteStartNode();
@@ -144,7 +144,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() )
{
@@ -159,14 +159,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
@@ -177,22 +177,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 ))
{
@@ -200,7 +200,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 ];
@@ -236,7 +236,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 );
@@ -249,17 +249,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 ];
@@ -294,7 +294,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 );
@@ -307,12 +307,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 );
}
@@ -320,7 +320,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();
@@ -329,7 +329,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 );
@@ -345,10 +345,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 a95194d53e34..25550b03958a 100644
--- a/sw/source/core/crsr/trvlreg.cxx
+++ b/sw/source/core/crsr/trvlreg.cxx
@@ -42,8 +42,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();
@@ -68,7 +68,7 @@ BOOL GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
{
aIdx = *pNd;
SwCntntNode* pCNd = pNd->GetNodes().GoNextSection( &aIdx,
- TRUE, !bInReadOnly );
+ sal_True, !bInReadOnly );
if( !pCNd )
{
aIdx--;
@@ -80,7 +80,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 );
@@ -90,22 +90,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()) )
@@ -124,7 +124,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 );
@@ -136,7 +136,7 @@ BOOL GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
{
aIdx = *pNd->EndOfSectionNode();
SwCntntNode* pCNd = pNd->GetNodes().GoPrevSection( &aIdx,
- TRUE, !bInReadOnly );
+ sal_True, !bInReadOnly );
if( !pCNd )
{
aIdx++;
@@ -146,33 +146,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 )
@@ -185,34 +185,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;
}
@@ -222,18 +222,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) &&
@@ -243,21 +243,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;
@@ -278,10 +278,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 00a2873e80fd..2734a6ab3d8c 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -52,16 +52,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:
@@ -76,7 +76,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();
}
}
@@ -89,7 +89,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
@@ -106,7 +106,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();
}
}
@@ -117,9 +117,9 @@ BOOL SwCrsrShell::GoNextCell( BOOL bAppendLine )
}
-BOOL SwCrsrShell::GoPrevCell()
+sal_Bool SwCrsrShell::GoPrevCell()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( IsTableMode() || IsCrsrInTbl() )
{
SwCursor* pCrsr = pTblCrsr ? pTblCrsr : pCurCrsr;
@@ -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 9311ba482e43..48bb4b1f2cf4 100644
--- a/sw/source/core/crsr/unocrsr.cxx
+++ b/sw/source/core/crsr/unocrsr.cxx
@@ -42,9 +42,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 )
{}
@@ -63,7 +63,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 );
@@ -113,7 +113,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
}
@@ -123,7 +123,7 @@ void SwUnoCrsr::DoSetBidiLevelUpDown()
return; // not for uno cursor
}
-BOOL SwUnoCrsr::IsSelOvr( int eFlags )
+sal_Bool SwUnoCrsr::IsSelOvr( int eFlags )
{
if( bRemainInSection )
{
@@ -134,8 +134,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.
@@ -189,14 +189,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 );
@@ -205,7 +205,7 @@ BOOL SwUnoCrsr::IsSelOvr( int eFlags )
{
rPtIdx = GetSavePos()->nNode;
GetPoint()->nContent.Assign( GetCntntNode(), GetSavePos()->nCntnt );
- return TRUE;
+ return sal_True;
}
}
}
@@ -218,7 +218,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()
@@ -227,9 +227,9 @@ SwUnoTableCrsr::~SwUnoTableCrsr()
delete aTblSel.GetNext(); // und loeschen
}
-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();
@@ -246,13 +246,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 859f5013f29a..251e4d7fc23b 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -77,11 +77,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 ); // 50 millisecond delay
#endif
}
@@ -108,7 +108,7 @@ void SwVisCrsr::Show()
{
if( !bIsVisible )
{
- bIsVisible = TRUE;
+ bIsVisible = sal_True;
// display at all?
if( pCrsrShell->VisArea().IsOver( pCrsrShell->aCharRect ) )
@@ -136,7 +136,7 @@ void SwVisCrsr::Hide()
{
if( bIsVisible )
{
- bIsVisible = FALSE;
+ bIsVisible = sal_False;
#ifdef SW_CRSR_TIMER
if( IsActive() )
@@ -162,13 +162,13 @@ void 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() )
@@ -215,7 +215,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();
@@ -261,7 +261,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 );
@@ -392,7 +392,7 @@ void SwSelPaintRects::Show()
void SwSelPaintRects::Invalidate( const SwRect& rRect )
{
- USHORT nSz = Count();
+ sal_uInt16 nSz = Count();
if( !nSz )
return;
@@ -562,7 +562,7 @@ short SwShellCrsr::MaxReplaceArived()
// Terminate old actions. The table-frames get constructed and
// a SSelection can be created.
SvUShorts aArr;
- USHORT nActCnt;
+ sal_uInt16 nActCnt;
ViewShell *pShell = GetDoc()->GetRootFrm()->GetCurrShell(),
*pSh = pShell;
do {
@@ -575,7 +575,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();
@@ -594,7 +594,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() );
@@ -605,7 +605,7 @@ BOOL SwShellCrsr::UpDown( BOOL bUp, USHORT nCnt )
// JP 05.03.98: To test the UNO-Crsr behavior here the implementation on the
// visible cursor.
-BOOL SwShellCrsr::IsSelOvr( int eFlags )
+sal_Bool SwShellCrsr::IsSelOvr( int eFlags )
{
return SwCursor::IsSelOvr( eFlags );
}
@@ -613,13 +613,13 @@ BOOL SwShellCrsr::IsSelOvr( int eFlags )
#endif
// TRUE: The cursor can be set to the position.
-BOOL SwShellCrsr::IsAtValidPos( BOOL bPoint ) const
+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 );
}
@@ -671,13 +671,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
@@ -686,7 +686,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();
}
@@ -713,19 +713,19 @@ void SwShellTableCrsr::FillRects()
// Check if the SPoint is within the Table-SSelection.
-BOOL SwShellTableCrsr::IsInside( const Point& rPt ) const
+sal_Bool SwShellTableCrsr::IsInside( const Point& rPt ) const
{
// Calculate the new rectangles.
// JP 16.01.98: If the cursor is still "parked" do nothing!!
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;
@@ -734,23 +734,23 @@ BOOL SwShellTableCrsr::IsInside( const Point& rPt ) const
pFrm = pFrm->GetUpper();
OSL_ENSURE( pFrm, "Node nicht in einer Tabelle" );
if( pFrm && pFrm->Frm().IsInside( rPt ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
#if OSL_DEBUG_LEVEL > 1
// JP 05.03.98: To test the UNO-Crsr behavior here the implementation on the
// visible 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 84b390f16cb5..eb653789da52 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -1091,7 +1091,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[] =
{
@@ -1106,7 +1106,7 @@ const String SwStyleNameMapper::GetSpecialExtraProgName( const String& rExtraUIN
{
if (aRes == *rExtraArr[ *pIds ])
{
- bChgName = TRUE;
+ bChgName = sal_True;
break;
}
}
@@ -1118,7 +1118,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[] =
{
@@ -1134,7 +1134,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 1feb032d2814..dd4219417214 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -56,7 +56,7 @@ class SwAutoCompleteClient : public SwClient
SwAutoCompleteWord* pAutoCompleteWord;
SwDoc* pDoc;
#if OSL_DEBUG_LEVEL > 1
- static ULONG nSwAutoCompleteClientCount;
+ static sal_uLong nSwAutoCompleteClientCount;
#endif
public:
SwAutoCompleteClient(SwAutoCompleteWord& rToTell, SwDoc& rSwDoc);
@@ -68,7 +68,7 @@ public:
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
const SwDoc& GetDoc(){return *pDoc;}
#if OSL_DEBUG_LEVEL > 1
- static ULONG GetElementCount() {return nSwAutoCompleteClientCount;}
+ static sal_uLong GetElementCount() {return nSwAutoCompleteClientCount;}
#endif
};
@@ -90,7 +90,7 @@ typedef std::vector<SwDocPtr> SwDocPtrVector;
class SwAutoCompleteString : public String
{
#if OSL_DEBUG_LEVEL > 1
- static ULONG nSwAutoCompleteStringCount;
+ static sal_uLong nSwAutoCompleteStringCount;
#endif
SwDocPtrVector aSourceDocs;
public:
@@ -101,12 +101,12 @@ class SwAutoCompleteString : public String
//returns true if last document reference has been removed
sal_Bool RemoveDocument(const SwDoc& rDoc);
#if OSL_DEBUG_LEVEL > 1
- static ULONG GetElementCount() {return nSwAutoCompleteStringCount;}
+ static sal_uLong GetElementCount() {return nSwAutoCompleteStringCount;}
#endif
};
#if OSL_DEBUG_LEVEL > 1
- ULONG SwAutoCompleteClient::nSwAutoCompleteClientCount = 0;
- ULONG SwAutoCompleteString::nSwAutoCompleteStringCount = 0;
+ sal_uLong SwAutoCompleteClient::nSwAutoCompleteClientCount = 0;
+ sal_uLong SwAutoCompleteString::nSwAutoCompleteStringCount = 0;
#endif
SwAutoCompleteClient::SwAutoCompleteClient(SwAutoCompleteWord& rToTell, SwDoc& rSwDoc) :
@@ -227,18 +227,18 @@ sal_Bool SwAutoCompleteString::RemoveDocument(const SwDoc& rDoc)
return sal_False;
}
-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 );
@@ -246,13 +246,13 @@ SwAutoCompleteWord::~SwAutoCompleteWord()
}
delete pImpl;
#if OSL_DEBUG_LEVEL > 1
- 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;
@@ -269,7 +269,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;
@@ -279,10 +279,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
@@ -322,15 +322,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++ ] );
OSL_ENSURE( USHRT_MAX != nPos, "String nicht gefunden" );
void * pDel = aWordLst[nPos];
aWordLst.Remove(nPos);
@@ -341,7 +341,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?
@@ -350,13 +350,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 );
OSL_ENSURE( USHRT_MAX != nDelPos, "String nicht gefunden" );
aLRULst.Remove( nDelPos );
--nPos;
@@ -367,8 +367,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 );
@@ -383,8 +383,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 )
{
@@ -394,7 +394,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 );
OSL_ENSURE( USHRT_MAX != nPos, "String nicht gefunden" );
aLRULst.Remove( nPos );
delete (SwAutoCompleteString*)pDel;
@@ -409,7 +409,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 );
OSL_ENSURE( USHRT_MAX != nPos, "String nicht gefunden" );
aLRULst.Remove( nPos );
delete (SwAutoCompleteString*)pDel;
@@ -425,13 +425,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 ec4560da5492..2bf98e0576ba 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -43,6 +43,7 @@
#include <docary.hxx>
#include <swundo.hxx>
#include <undobj.hxx>
+#include <numrule.hxx>
#include <doc.hxx>
#include <frmfmt.hxx>
#include <fmtanchr.hxx>
@@ -119,15 +120,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)
@@ -343,7 +344,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]);
@@ -474,7 +475,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();
@@ -603,7 +604,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 +=
@@ -616,7 +617,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)
{
@@ -722,7 +723,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)
{
@@ -731,10 +732,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);
@@ -743,8 +744,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;
@@ -787,8 +788,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)
{
@@ -809,43 +810,10 @@ String lcl_dbg_out(const SwUndo & rUndo)
{
String aStr("[ ", RTL_TEXTENCODING_ASCII_US);
- aStr += String::CreateFromInt32(rUndo.GetId());
+ aStr += String::CreateFromInt32(
+ static_cast<SfxUndoAction const&>(rUndo).GetId());
aStr += String(": ", RTL_TEXTENCODING_ASCII_US);
- switch(rUndo.GetId())
- {
- case UNDO_START:
- aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
- aStr +=
- String::CreateFromInt32(dynamic_cast
- <const SwUndoStart &>(rUndo).
- GetUserId());
- aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
- aStr += String::CreateFromInt32(dynamic_cast
- <const SwUndoStart &>(rUndo).
- GetEndOffset());
- aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
-
- break;
-
- case UNDO_END:
- aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
- aStr +=
- String::CreateFromInt32(dynamic_cast
- <const SwUndoEnd &>(rUndo).
- GetId());
- aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
- aStr += String::CreateFromInt32(dynamic_cast
- <const SwUndoEnd &>(rUndo).
- GetSttOffset());
- aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
-
- break;
-
- default:
- break;
- }
-
aStr += rUndo.GetComment();
aStr += String(" ]", RTL_TEXTENCODING_ASCII_US);
@@ -861,7 +829,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);
@@ -877,39 +845,6 @@ SW_DLLPUBLIC const char * dbg_out(SwOutlineNodes & rNodes)
return dbg_out(lcl_dbg_out(rNodes));
}
-String lcl_dbg_out(const SwUndos & rUndos)
-{
- USHORT nIndent = 0;
-
- String aStr("[\n", RTL_TEXTENCODING_ASCII_US);
-
- for (USHORT n = 0; n < rUndos.Count(); n++)
- {
- SwUndo * pUndo = rUndos[n];
-
- if (pUndo->GetId() == UNDO_END)
- nIndent--;
-
- for (USHORT nI = 0; n < nIndent; nI++)
- aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
-
- aStr += lcl_dbg_out(*pUndo);
- aStr += String("\n", RTL_TEXTENCODING_ASCII_US);
-
- if (pUndo->GetId() == UNDO_START)
- nIndent++;
- }
-
- aStr += String("]\n", RTL_TEXTENCODING_ASCII_US);
-
- return aStr;
-}
-
-SW_DLLPUBLIC const char * dbg_out(const SwUndos & rUndos)
-{
- return dbg_out(lcl_dbg_out(rUndos));
-}
-
String lcl_dbg_out(const SwRewriter & rRewriter)
{
(void) rRewriter;
@@ -941,7 +876,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);
@@ -991,7 +926,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 0c0a92a84620..43cbc83ec773 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -28,7 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <doc.hxx>
+#include <UndoManager.hxx>
#include <hintids.hxx>
#include <tools/shl.hxx>
@@ -80,7 +82,10 @@
#include <pam.hxx>
#include <ndtxt.hxx>
#include <swundo.hxx> // fuer die UndoIds
-#include <undobj.hxx>
+#include <UndoCore.hxx>
+#include <UndoInsert.hxx>
+#include <UndoSplitMove.hxx>
+#include <UndoTable.hxx>
#include <pagedesc.hxx> //DTor
#include <breakit.hxx>
#include <ndole.hxx>
@@ -100,7 +105,6 @@
#include <fldupde.hxx>
#include <swbaslnk.hxx>
#include <printdata.hxx>
-#include <swprtopt.hxx>
#include <cmdid.h> // fuer den dflt - Printer in SetJob
#include <statstr.hrc> // StatLine-String
#include <comcore.hrc>
@@ -113,6 +117,8 @@
#include <viewsh.hxx>
#include <shellres.hxx>
#include <txtfrm.hxx>
+#include <wdocsh.hxx> // SwWebDocShell
+#include <prtopt.hxx> // SwPrintOptions
#include <vector>
#include <map>
@@ -199,6 +205,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const
case PURGE_OLE: return mbPurgeOLE;
case KERN_ASIAN_PUNCTUATION: return mbKernAsianPunctuation;
case DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT: return mbDoNotResetParaAttrsForNumFont;
+ case MATH_BASELINE_ALIGNMENT: return mbMathBaselineAlignment;
default:
OSL_ENSURE(false, "Invalid setting id");
}
@@ -237,8 +244,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();
@@ -352,24 +359,26 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
case DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT:
mbDoNotResetParaAttrsForNumFont = value;
break;
-
+ case MATH_BASELINE_ALIGNMENT:
+ mbMathBaselineAlignment = value;
+ break;
default:
OSL_ENSURE(false, "Invalid setting id");
}
}
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.is() )
- 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.is() )
@@ -451,7 +460,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();
}
@@ -594,8 +603,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 )
{
@@ -604,7 +613,7 @@ void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup )
if ( pPrt->GetJobSetup() != rJobSetup )
{
pPrt->SetJobSetup( rJobSetup );
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
}
else
@@ -626,18 +635,30 @@ void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup )
else
{
pPrt = p;
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
}
if ( bDataChanged && !get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) )
PrtDataChanged();
}
-SwPrintData* SwDoc::getPrintData() const
+const SwPrintData & SwDoc::getPrintData() const
{
if(!pPrtData)
- ((SwDoc*)this)->pPrtData = new SwPrintData;
- return pPrtData;
+ {
+ SwDoc * pThis = const_cast< SwDoc * >(this);
+ pThis->pPrtData = new SwPrintData;
+
+ // SwPrintData should be initialized from the configuration,
+ // the respective config item is implememted by SwPrintOptions which
+ // is also derived from SwPrintData
+ const SwDocShell *pDocSh = GetDocShell();
+ DBG_ASSERT( pDocSh, "pDocSh is 0, can't determine if this is a WebDoc or not" );
+ bool bWeb = 0 != dynamic_cast< const SwWebDocShell * >(pDocSh);
+ SwPrintOptions aPrintOptions( bWeb );
+ *pThis->pPrtData = aPrintOptions;
+ }
+ return *pPrtData;
}
void SwDoc::setPrintData(/*[in]*/ const SwPrintData& rPrtData )
@@ -677,14 +698,14 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
}
SwUndoSplitNode* pUndo = 0;
- if ( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
+ GetIDocumentUndoRedo().ClearRedo();
// einfuegen vom Undo-Object, z.Z. nur beim TextNode
if( pNode->IsTxtNode() )
{
pUndo = new SwUndoSplitNode( this, rPos, bChkTableStart );
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
}
@@ -694,7 +715,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 +738,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 +760,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 +792,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() ))
{
@@ -791,10 +812,8 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
bool SwDoc::AppendTxtNode( SwPosition& rPos )
{
- /*
- * Neuen Node vor EndOfContent erzeugen.
- */
- SwTxtNode *pCurNode = GetNodes()[ rPos.nNode ]->GetTxtNode();
+ // create new node before EndOfContent
+ SwTxtNode * pCurNode = rPos.nNode.GetNode().GetTxtNode();
if( !pCurNode )
{
// dann kann ja einer angelegt werden!
@@ -808,10 +827,9 @@ bool SwDoc::AppendTxtNode( SwPosition& rPos )
rPos.nNode++;
rPos.nContent.Assign( pCurNode, 0 );
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoInsert( rPos.nNode ));
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoInsert( rPos.nNode ) );
}
if( IsRedlineOn() || (!IsIgnoreRedline() && pRedlineTbl->Count() ))
@@ -826,15 +844,15 @@ bool SwDoc::AppendTxtNode( SwPosition& rPos )
}
SetModified();
- return TRUE;
+ return sal_True;
}
bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
const enum InsertFlags nInsertMode )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
+ GetIDocumentUndoRedo().ClearRedo(); // AppendUndo not always called!
}
const SwPosition& rPos = *rRg.GetPoint();
@@ -856,15 +874,16 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
SwDataChanged aTmp( rRg, 0 );
- if( !DoesUndo() || !DoesGroupUndo() )
+ if (!GetIDocumentUndoRedo().DoesUndo() ||
+ !GetIDocumentUndoRedo().DoesGroupUndo())
{
pNode->InsertText( rStr, rPos.nContent, nInsertMode );
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndoInsert * const pUndo( new SwUndoInsert(
rPos.nNode, rPos.nContent.GetIndex(), rStr.Len(), nInsertMode));
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
}
else
@@ -874,25 +893,12 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
// don't group the start if hints at the start should be expanded
if (!(nInsertMode & IDocumentContentOperations::INS_FORCEHINTEXPAND))
{
- USHORT const nUndoSize = pUndos->Count();
- if (0 != nUndoSize)
+ SwUndo *const pLastUndo = GetUndoManager().GetLastUndo();
+ SwUndoInsert *const pUndoInsert(
+ dynamic_cast<SwUndoInsert *>(pLastUndo) );
+ if (pUndoInsert && pUndoInsert->CanGrouping(rPos))
{
- SwUndo * const pLastUndo = (*pUndos)[ nUndoSize - 1 ];
-
- switch (pLastUndo->GetId())
- {
- case UNDO_INSERT:
- case UNDO_TYPING:
- if (static_cast<SwUndoInsert*>(pLastUndo)
- ->CanGrouping( rPos ))
- {
- pUndo = static_cast<SwUndoInsert*>(pLastUndo);
- }
- break;
-
- default:
- break;
- }
+ pUndo = pUndoInsert;
}
}
@@ -903,7 +909,7 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
{
pUndo = new SwUndoInsert( rPos.nNode, nInsPos, 0, nInsertMode,
!rCC.isLetterNumeric( rStr, 0 ) );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
pNode->InsertText( rStr, rPos.nContent, nInsertMode );
@@ -911,12 +917,12 @@ 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,
!rCC.isLetterNumeric( rStr, i ) );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
}
}
@@ -993,7 +999,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;
@@ -1032,9 +1038,9 @@ SwFlyFrmFmt* SwDoc::InsertOLE(const SwPaM &rRg, const String& rObjName,
|* SwDoc::GetFldType()
|* 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;
@@ -1058,9 +1064,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
{
@@ -1068,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,
@@ -1080,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() )
@@ -1088,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;
@@ -1142,7 +1148,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 const sTmp[] = " : ";
@@ -1182,7 +1188,7 @@ static void lcl_FormatPostIt(
pIDCO->SplitNode( *aPam.GetPoint(), false );
aStr = pField->GetPar2();
-#if defined( WIN ) || defined( WNT ) || defined( PM2 )
+#if defined( WNT ) || defined( PM2 )
// Bei Windows und Co alle CR rausschmeissen
aStr.EraseAllChars( '\r' );
#endif
@@ -1197,7 +1203,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();
@@ -1234,30 +1240,30 @@ void SwDoc::CalculatePagesForPrinting(
const SwPageFrm *pStPage = (SwPageFrm*)pLayout->Lower();
const SwFrm *pEndPage = pStPage;
- USHORT nFirstPageNo = 0;
- USHORT nLastPageNo = 0;
+ sal_uInt16 nFirstPageNo = 0;
+ sal_uInt16 nLastPageNo = 0;
- 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();
}
@@ -1270,7 +1276,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;
@@ -1282,7 +1288,7 @@ void SwDoc::CalculatePagesForPrinting(
aMulti = aTmpMulti;
// Ende des HACKs
- USHORT nPageNo = nFirstPageNo;
+ sal_uInt16 nPageNo = nFirstPageNo;
std::map< sal_Int32, sal_Int32 > &rPrinterPaperTrays = rData.GetPrinterPaperTrays();
std::set< sal_Int32 > &rValidPages = rData.GetValidPagesSet();
@@ -1291,7 +1297,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) ) )
@@ -1373,7 +1379,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 );
@@ -1397,9 +1403,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;
@@ -1639,7 +1645,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;
@@ -1654,7 +1660,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 ];
@@ -1733,7 +1739,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() )
{
@@ -1766,7 +1772,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);
@@ -1825,10 +1831,10 @@ void SwDoc::DocInfoChgd( )
const SwFmtRefMark* SwDoc::GetRefMark( const String& rName ) const
{
const SfxPoolItem* pItem;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK );
- for( USHORT n = 0; n < nMaxItems; ++n )
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
- if( 0 == (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n ) ))
+ if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n ) ))
continue;
const SwFmtRefMark* pFmtRef = (SwFmtRefMark*)pItem;
@@ -1841,16 +1847,16 @@ 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;
const SwFmtRefMark* pRet = 0;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK );
- USHORT nCount = 0;
- for( USHORT n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n )) &&
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK );
+ sal_uInt32 nCount = 0;
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) &&
0 != (pTxtRef = ((SwFmtRefMark*)pItem)->GetTxtRefMark()) &&
&pTxtRef->GetTxtNode().GetNodes() == &GetNodes() )
{
@@ -1868,15 +1874,15 @@ 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;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK );
- USHORT nCount = 0;
- for( USHORT n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n )) &&
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK );
+ sal_uInt32 nCount = 0;
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) &&
0 != (pTxtRef = ((SwFmtRefMark*)pItem)->GetTxtRefMark()) &&
&pTxtRef->GetTxtNode().GetNodes() == &GetNodes() )
{
@@ -1947,13 +1953,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() )
@@ -1966,17 +1972,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;
- nUndoSavePos = nUndoPos;
+ pDocStat->bModified = sal_False;
+ GetIDocumentUndoRedo().SetUndoNoModifiedPosition();
if( nCall && aOle2Link.IsSet() )
{
- mbInCallModified = TRUE;
+ mbInCallModified = sal_True;
aOle2Link.Call( (void*)nCall );
- mbInCallModified = FALSE;
+ mbInCallModified = sal_False;
}
}
@@ -1989,10 +1995,9 @@ void SwDoc::ReRead( SwPaM& rPam, const String& rGrfName,
|| rPam.GetPoint()->nNode.GetIndex() == rPam.GetMark()->nNode.GetIndex() )
&& 0 != ( pGrfNd = rPam.GetPoint()->nNode.GetNode().GetGrfNode() ) )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoReRead( rPam, *pGrfNd ) );
+ GetIDocumentUndoRedo().AppendUndo(new SwUndoReRead(rPam, *pGrfNd));
}
// Weil nicht bekannt ist, ob sich die Grafik spiegeln laesst,
@@ -2001,15 +2006,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 )
@@ -2031,13 +2036,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 );
@@ -2049,20 +2054,20 @@ 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 )
{
OSL_ENSURE( GetRootFrm(), "SpellAgain: Where's my RootFrm?" );
if( bInvalid )
@@ -2097,7 +2102,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 );
@@ -2111,9 +2116,9 @@ const SwFmtINetFmt* SwDoc::FindINetAttr( const String& rName ) const
const SwFmtINetFmt* pItem;
const SwTxtINetFmt* pTxtAttr;
const SwTxtNode* pTxtNd;
- USHORT n, nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_INETFMT );
+ sal_uInt32 n, nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );
for( n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = (SwFmtINetFmt*)GetAttrPool().GetItem(
+ if( 0 != (pItem = (SwFmtINetFmt*)GetAttrPool().GetItem2(
RES_TXTATR_INETFMT, n ) ) &&
pItem->GetName().Equals( rName ) &&
0 != ( pTxtAttr = pItem->GetTxtINetFmt()) &&
@@ -2126,27 +2131,27 @@ 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();
+ const sal_uLong nIndex = rOutNds[ i ]->GetIndex();
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() )
{
@@ -2168,7 +2173,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;
@@ -2178,7 +2183,7 @@ void SwDoc::Summary( SwDoc* pExtDoc, BYTE nLevel, BYTE nPara, BOOL bImpress )
{
SwTxtFmtColl* pMyColl = pNd->GetTxtColl();
- const USHORT nHeadLine = static_cast<USHORT>(
+ const sal_uInt16 nHeadLine = static_cast<sal_uInt16>(
!pMyColl->IsAssignedToListLevelOfOutlineStyle() //<-end,zhaojianwei
? RES_POOLCOLL_HEADLINE2
: RES_POOLCOLL_HEADLINE1 );
@@ -2188,7 +2193,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 );
}
}
@@ -2201,10 +2206,10 @@ 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()
+bool SwDoc::RemoveInvisibleContent()
{
- BOOL bRet = FALSE;
- StartUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL );
+ sal_Bool bRet = sal_False;
+ GetIDocumentUndoRedo().StartUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL );
{
SwTxtNode* pTxtNd;
@@ -2217,7 +2222,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:
@@ -2243,7 +2248,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 )
@@ -2252,8 +2257,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
@@ -2275,8 +2280,8 @@ BOOL SwDoc::RemoveInvisibleContent()
}
else if ( pTxtNd->HasHiddenCharAttribute( false ) )
{
- bRemoved = TRUE;
- bRet = TRUE;
+ bRemoved = sal_True;
+ bRet = sal_True;
SwScriptInfo::DeleteHiddenRanges( *pTxtNd );
}
@@ -2291,7 +2296,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; )
{
@@ -2330,7 +2335,7 @@ BOOL SwDoc::RemoveInvisibleContent()
SwSectionNode* pSectNd = pSectFmt->GetSectionNode();
if( pSectNd )
{
- bRet = TRUE;
+ bRet = sal_True;
SwPaM aPam( *pSectNd );
if( pSectNd->StartOfSectionNode()->StartOfSectionIndex() ==
@@ -2366,15 +2371,78 @@ BOOL SwDoc::RemoveInvisibleContent()
if( bRet )
SetModified();
- EndUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL );
+ return bRet;
+}
+/*-- 25.08.2010 14:18:12---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+bool SwDoc::HasInvisibleContent() const
+{
+ sal_Bool bRet = sal_False;
+
+ SwClientIter aIter( *GetSysFldType( RES_HIDDENPARAFLD ) );
+ if( aIter.First( TYPE( SwFmtFld ) ) )
+ bRet = sal_True;
+
+ //
+ // Search for any hidden paragraph (hidden text attribute)
+ //
+ if( ! bRet )
+ {
+ for( sal_uLong n = GetNodes().Count(); !bRet && (n > 0); )
+ {
+ SwTxtNode* pTxtNd = GetNodes()[ --n ]->GetTxtNode();
+ if ( pTxtNd )
+ {
+ SwPaM aPam( *pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().Len() );
+ if( pTxtNd->HasHiddenCharAttribute( true ) || ( pTxtNd->HasHiddenCharAttribute( false ) ) )
+ {
+ bRet = sal_True;
+ }
+ }
+ }
+ }
+
+ if( ! bRet )
+ {
+ const SwSectionFmts& rSectFmts = GetSections();
+ sal_uInt16 n;
+
+ for( n = rSectFmts.Count(); !bRet && (n > 0); )
+ {
+ SwSectionFmt* pSectFmt = rSectFmts[ --n ];
+ // don't add sections in Undo/Redo
+ if( !pSectFmt->IsInNodesArr())
+ continue;
+ SwSection* pSect = pSectFmt->GetSection();
+ if( pSect->IsHidden() )
+ bRet = sal_True;
+ }
+ }
return bRet;
}
-BOOL SwDoc::ConvertFieldsToText